From owner-svn-src-head@freebsd.org Sun Apr 9 01:35:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B247D34B04; Sun, 9 Apr 2017 01:35:21 +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 13005B8; Sun, 9 Apr 2017 01:35:20 +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 v391ZKRE064490; Sun, 9 Apr 2017 01:35:20 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v391ZJ6p064486; Sun, 9 Apr 2017 01:35:19 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201704090135.v391ZJ6p064486@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 9 Apr 2017 01:35:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316647 - in head: . share/mk tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Apr 2017 01:35:21 -0000 Author: emaste Date: Sun Apr 9 01:35:19 2017 New Revision: 316647 URL: https://svnweb.freebsd.org/changeset/base/316647 Log: Introduce LLD_BOOTSTRAP to control lld as bootstrap linker Add WITH_LLD_BOOTSTRAP and WITHOUT_LLD_BOOTSTRAP knobs, similar to the Clang bootstrap knobs. Reviewed by: dim Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D10249 Added: head/tools/build/options/WITHOUT_LLD_BOOTSTRAP (contents, props changed) head/tools/build/options/WITH_LLD_BOOTSTRAP (contents, props changed) Modified: head/Makefile.inc1 head/share/mk/src.opts.mk Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sat Apr 8 21:57:59 2017 (r316646) +++ head/Makefile.inc1 Sun Apr 9 01:35:19 2017 (r316647) @@ -171,7 +171,7 @@ CROSS_BINUTILS_PREFIX?=${CROSS_TOOLCHAIN # riscv64-binutils port or package. .if !make(showconfig) .if !empty(BROKEN_OPTIONS:MBINUTILS_BOOTSTRAP) && \ - ${MK_LLD_IS_LD} == "no" && \ + ${MK_LLD_BOOTSTRAP} == "no" && \ !defined(CROSS_BINUTILS_PREFIX) CROSS_BINUTILS_PREFIX=/usr/local/${TARGET_ARCH}-freebsd/bin/ .if !exists(${CROSS_BINUTILS_PREFIX}) @@ -1665,9 +1665,10 @@ ${_bt}-usr.bin/yacc: ${_bt}-lib/liby _gensnmptree= usr.sbin/bsnmpd/gensnmptree .endif -# We need to build tblgen when we're building clang either as -# the bootstrap compiler, or as the part of the normal build. -.if ${MK_CLANG_BOOTSTRAP} != "no" || ${MK_CLANG} != "no" +# We need to build tblgen when we're building clang or lld, either as +# bootstrap tools, or as the part of the normal build. +.if ${MK_CLANG_BOOTSTRAP} != "no" || ${MK_CLANG} != "no" || \ + ${MK_LLD_BOOTSTRAP} != "no" || ${MK_LLD} != "no" _clang_tblgen= \ lib/clang/libllvmminimal \ usr.bin/clang/llvm-tblgen \ @@ -1828,9 +1829,6 @@ _elftctools= lib/libelftc \ # cross-build on a FreeBSD 10 host: _elftctools+= usr.bin/addr2line .endif -.if ${MK_LLD_IS_LD} != "no" -_lld= usr.bin/clang/lld -.endif .elif ${TARGET_ARCH} != ${MACHINE_ARCH} && ${MK_ELFTOOLCHAIN_BOOTSTRAP} != "no" # If cross-building with an external binutils we still need to build strip for # the target (for at least crunchide). @@ -1841,6 +1839,11 @@ _elftctools= lib/libelftc \ .if ${MK_CLANG_BOOTSTRAP} != "no" _clang= usr.bin/clang +.endif +.if ${MK_LLD_BOOTSTRAP} != "no" +_lld= usr.bin/clang/lld +.endif +.if ${MK_CLANG_BOOTSTRAP} != "no" || ${MK_LLD_BOOTSTRAP} != "no" _clang_libs= lib/clang .endif .if ${MK_GCC_BOOTSTRAP} != "no" Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Sat Apr 8 21:57:59 2017 (r316646) +++ head/share/mk/src.opts.mk Sun Apr 9 01:35:19 2017 (r316647) @@ -250,9 +250,9 @@ __DEFAULT_YES_OPTIONS+=LLVM_LIBUNWIND __DEFAULT_NO_OPTIONS+=LLVM_LIBUNWIND .endif .if ${__T} == "aarch64" -__DEFAULT_YES_OPTIONS+=LLD_IS_LD +__DEFAULT_YES_OPTIONS+=LLD_BOOTSTRAP LLD_IS_LD .else -__DEFAULT_NO_OPTIONS+=LLD_IS_LD +__DEFAULT_NO_OPTIONS+=LLD_BOOTSTRAP LLD_IS_LD .endif .if ${__T} == "aarch64" || ${__T} == "amd64" __DEFAULT_YES_OPTIONS+=LLDB Added: head/tools/build/options/WITHOUT_LLD_BOOTSTRAP ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_LLD_BOOTSTRAP Sun Apr 9 01:35:19 2017 (r316647) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to not build the LLD linker during the bootstrap phase of +the build. +To be able to build the system, either Binutils or LLD bootstrap must be +enabled unless an alternate linker is provided via XLD. Added: head/tools/build/options/WITH_LLD_BOOTSTRAP ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_LLD_BOOTSTRAP Sun Apr 9 01:35:19 2017 (r316647) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to build the LLD linker during the bootstrap phase of the build. From owner-svn-src-head@freebsd.org Sun Apr 9 02:00:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66222D35058; Sun, 9 Apr 2017 02:00:07 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 30C3FC8D; Sun, 9 Apr 2017 02:00:07 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v39206nQ072891; Sun, 9 Apr 2017 02:00:06 GMT (envelope-from pkelsey@FreeBSD.org) Received: (from pkelsey@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v39203Vf072867; Sun, 9 Apr 2017 02:00:03 GMT (envelope-from pkelsey@FreeBSD.org) Message-Id: <201704090200.v39203Vf072867@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pkelsey set sender to pkelsey@FreeBSD.org using -f From: Patrick Kelsey Date: Sun, 9 Apr 2017 02:00:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316648 - in head/sys: amd64/amd64 amd64/include arm/arm arm/include arm64/include cddl/dev/dtrace/aarch64 cddl/dev/dtrace/amd64 cddl/dev/dtrace/arm cddl/dev/dtrace/i386 cddl/dev/dtrace... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Apr 2017 02:00:07 -0000 Author: pkelsey Date: Sun Apr 9 02:00:03 2017 New Revision: 316648 URL: https://svnweb.freebsd.org/changeset/base/316648 Log: Corrected misspelled versions of rendezvous. The MFC will include a compat definition of smp_no_rendevous_barrier() that calls smp_no_rendezvous_barrier(). Reviewed by: gnn, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D10313 Modified: head/sys/amd64/amd64/pmap.c head/sys/amd64/include/counter.h head/sys/arm/arm/pmap-v6.c head/sys/arm/include/counter.h head/sys/arm64/include/counter.h head/sys/cddl/dev/dtrace/aarch64/dtrace_subr.c head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c head/sys/cddl/dev/dtrace/arm/dtrace_subr.c head/sys/cddl/dev/dtrace/i386/dtrace_subr.c head/sys/cddl/dev/dtrace/mips/dtrace_subr.c head/sys/cddl/dev/dtrace/powerpc/dtrace_subr.c head/sys/cddl/dev/dtrace/riscv/dtrace_subr.c head/sys/dev/acpica/acpi_cpu.c head/sys/i386/i386/pmap.c head/sys/i386/include/counter.h head/sys/kern/kern_rmlock.c head/sys/kern/subr_smp.c head/sys/mips/include/counter.h head/sys/powerpc/include/counter.h head/sys/powerpc/ofw/ofw_machdep.c head/sys/riscv/include/counter.h head/sys/sparc64/include/counter.h head/sys/sys/smp.h head/sys/x86/x86/tsc.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Sun Apr 9 01:35:19 2017 (r316647) +++ head/sys/amd64/amd64/pmap.c Sun Apr 9 02:00:03 2017 (r316648) @@ -1733,7 +1733,7 @@ pmap_update_pde(pmap_t pmap, vm_offset_t act.newpde = newpde; CPU_SET(cpuid, &active); smp_rendezvous_cpus(active, - smp_no_rendevous_barrier, pmap_update_pde_action, + smp_no_rendezvous_barrier, pmap_update_pde_action, pmap_update_pde_teardown, &act); } else { pmap_update_pde_store(pmap, pde, newpde); Modified: head/sys/amd64/include/counter.h ============================================================================== --- head/sys/amd64/include/counter.h Sun Apr 9 01:35:19 2017 (r316647) +++ head/sys/amd64/include/counter.h Sun Apr 9 02:00:03 2017 (r316648) @@ -69,8 +69,8 @@ static inline void counter_u64_zero_inline(counter_u64_t c) { - smp_rendezvous(smp_no_rendevous_barrier, counter_u64_zero_one_cpu, - smp_no_rendevous_barrier, c); + smp_rendezvous(smp_no_rendezvous_barrier, counter_u64_zero_one_cpu, + smp_no_rendezvous_barrier, c); } #endif Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Sun Apr 9 01:35:19 2017 (r316647) +++ head/sys/arm/arm/pmap-v6.c Sun Apr 9 02:00:03 2017 (r316648) @@ -3322,7 +3322,7 @@ pmap_change_pte1(pmap_t pmap, pt1_entry_ act.va = va; act.npte1 = npte1; act.update = PCPU_GET(cpuid); - smp_rendezvous_cpus(all_cpus, smp_no_rendevous_barrier, + smp_rendezvous_cpus(all_cpus, smp_no_rendezvous_barrier, pmap_update_pte1_action, NULL, &act); sched_unpin(); } else { Modified: head/sys/arm/include/counter.h ============================================================================== --- head/sys/arm/include/counter.h Sun Apr 9 01:35:19 2017 (r316647) +++ head/sys/arm/include/counter.h Sun Apr 9 02:00:03 2017 (r316648) @@ -70,8 +70,8 @@ static inline void counter_u64_zero_inline(counter_u64_t c) { - smp_rendezvous(smp_no_rendevous_barrier, counter_u64_zero_one_cpu, - smp_no_rendevous_barrier, c); + smp_rendezvous(smp_no_rendezvous_barrier, counter_u64_zero_one_cpu, + smp_no_rendezvous_barrier, c); } #endif Modified: head/sys/arm64/include/counter.h ============================================================================== --- head/sys/arm64/include/counter.h Sun Apr 9 01:35:19 2017 (r316647) +++ head/sys/arm64/include/counter.h Sun Apr 9 02:00:03 2017 (r316648) @@ -68,8 +68,8 @@ static inline void counter_u64_zero_inline(counter_u64_t c) { - smp_rendezvous(smp_no_rendevous_barrier, counter_u64_zero_one_cpu, - smp_no_rendevous_barrier, c); + smp_rendezvous(smp_no_rendezvous_barrier, counter_u64_zero_one_cpu, + smp_no_rendezvous_barrier, c); } #endif Modified: head/sys/cddl/dev/dtrace/aarch64/dtrace_subr.c ============================================================================== --- head/sys/cddl/dev/dtrace/aarch64/dtrace_subr.c Sun Apr 9 01:35:19 2017 (r316647) +++ head/sys/cddl/dev/dtrace/aarch64/dtrace_subr.c Sun Apr 9 02:00:03 2017 (r316648) @@ -134,8 +134,8 @@ dtrace_xcall(processorid_t cpu, dtrace_x else CPU_SETOF(cpu, &cpus); - smp_rendezvous_cpus(cpus, smp_no_rendevous_barrier, func, - smp_no_rendevous_barrier, arg); + smp_rendezvous_cpus(cpus, smp_no_rendezvous_barrier, func, + smp_no_rendezvous_barrier, arg); } static void Modified: head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c ============================================================================== --- head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c Sun Apr 9 01:35:19 2017 (r316647) +++ head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c Sun Apr 9 02:00:03 2017 (r316648) @@ -125,8 +125,8 @@ dtrace_xcall(processorid_t cpu, dtrace_x else CPU_SETOF(cpu, &cpus); - smp_rendezvous_cpus(cpus, smp_no_rendevous_barrier, func, - smp_no_rendevous_barrier, arg); + smp_rendezvous_cpus(cpus, smp_no_rendezvous_barrier, func, + smp_no_rendezvous_barrier, arg); } static void @@ -331,7 +331,7 @@ dtrace_gethrtime_init(void *arg) smp_rendezvous_cpus(map, NULL, dtrace_gethrtime_init_cpu, - smp_no_rendevous_barrier, (void *)(uintptr_t) i); + smp_no_rendezvous_barrier, (void *)(uintptr_t) i); tsc_skew[i] = tgt_cpu_tsc - hst_cpu_tsc; } Modified: head/sys/cddl/dev/dtrace/arm/dtrace_subr.c ============================================================================== --- head/sys/cddl/dev/dtrace/arm/dtrace_subr.c Sun Apr 9 01:35:19 2017 (r316647) +++ head/sys/cddl/dev/dtrace/arm/dtrace_subr.c Sun Apr 9 02:00:03 2017 (r316648) @@ -136,8 +136,8 @@ dtrace_xcall(processorid_t cpu, dtrace_x else CPU_SETOF(cpu, &cpus); - smp_rendezvous_cpus(cpus, smp_no_rendevous_barrier, func, - smp_no_rendevous_barrier, arg); + smp_rendezvous_cpus(cpus, smp_no_rendezvous_barrier, func, + smp_no_rendezvous_barrier, arg); } static void Modified: head/sys/cddl/dev/dtrace/i386/dtrace_subr.c ============================================================================== --- head/sys/cddl/dev/dtrace/i386/dtrace_subr.c Sun Apr 9 01:35:19 2017 (r316647) +++ head/sys/cddl/dev/dtrace/i386/dtrace_subr.c Sun Apr 9 02:00:03 2017 (r316648) @@ -127,8 +127,8 @@ dtrace_xcall(processorid_t cpu, dtrace_x else CPU_SETOF(cpu, &cpus); - smp_rendezvous_cpus(cpus, smp_no_rendevous_barrier, func, - smp_no_rendevous_barrier, arg); + smp_rendezvous_cpus(cpus, smp_no_rendezvous_barrier, func, + smp_no_rendezvous_barrier, arg); } static void @@ -333,7 +333,7 @@ dtrace_gethrtime_init(void *arg) smp_rendezvous_cpus(map, NULL, dtrace_gethrtime_init_cpu, - smp_no_rendevous_barrier, (void *)(uintptr_t) i); + smp_no_rendezvous_barrier, (void *)(uintptr_t) i); tsc_skew[i] = tgt_cpu_tsc - hst_cpu_tsc; } Modified: head/sys/cddl/dev/dtrace/mips/dtrace_subr.c ============================================================================== --- head/sys/cddl/dev/dtrace/mips/dtrace_subr.c Sun Apr 9 01:35:19 2017 (r316647) +++ head/sys/cddl/dev/dtrace/mips/dtrace_subr.c Sun Apr 9 02:00:03 2017 (r316648) @@ -131,8 +131,8 @@ dtrace_xcall(processorid_t cpu, dtrace_x else CPU_SETOF(cpu, &cpus); - smp_rendezvous_cpus(cpus, smp_no_rendevous_barrier, func, - smp_no_rendevous_barrier, arg); + smp_rendezvous_cpus(cpus, smp_no_rendezvous_barrier, func, + smp_no_rendezvous_barrier, arg); } static void Modified: head/sys/cddl/dev/dtrace/powerpc/dtrace_subr.c ============================================================================== --- head/sys/cddl/dev/dtrace/powerpc/dtrace_subr.c Sun Apr 9 01:35:19 2017 (r316647) +++ head/sys/cddl/dev/dtrace/powerpc/dtrace_subr.c Sun Apr 9 02:00:03 2017 (r316648) @@ -133,8 +133,8 @@ dtrace_xcall(processorid_t cpu, dtrace_x else CPU_SETOF(cpu, &cpus); - smp_rendezvous_cpus(cpus, smp_no_rendevous_barrier, func, - smp_no_rendevous_barrier, arg); + smp_rendezvous_cpus(cpus, smp_no_rendezvous_barrier, func, + smp_no_rendezvous_barrier, arg); } static void @@ -212,7 +212,7 @@ dtrace_gethrtime_init(void *arg) smp_rendezvous_cpus(map, NULL, dtrace_gethrtime_init_cpu, - smp_no_rendevous_barrier, (void *)(uintptr_t) i); + smp_no_rendezvous_barrier, (void *)(uintptr_t) i); timebase_skew[i] = tgt_cpu_tsc - hst_cpu_tsc; } Modified: head/sys/cddl/dev/dtrace/riscv/dtrace_subr.c ============================================================================== --- head/sys/cddl/dev/dtrace/riscv/dtrace_subr.c Sun Apr 9 01:35:19 2017 (r316647) +++ head/sys/cddl/dev/dtrace/riscv/dtrace_subr.c Sun Apr 9 02:00:03 2017 (r316648) @@ -137,8 +137,8 @@ dtrace_xcall(processorid_t cpu, dtrace_x else CPU_SETOF(cpu, &cpus); - smp_rendezvous_cpus(cpus, smp_no_rendevous_barrier, func, - smp_no_rendevous_barrier, arg); + smp_rendezvous_cpus(cpus, smp_no_rendezvous_barrier, func, + smp_no_rendezvous_barrier, arg); } static void Modified: head/sys/dev/acpica/acpi_cpu.c ============================================================================== --- head/sys/dev/acpica/acpi_cpu.c Sun Apr 9 01:35:19 2017 (r316647) +++ head/sys/dev/acpica/acpi_cpu.c Sun Apr 9 02:00:03 2017 (r316648) @@ -466,8 +466,8 @@ disable_idle(struct acpi_cpu_softc *sc) * is called and executed in such a context with interrupts being re-enabled * right before return. */ - smp_rendezvous_cpus(cpuset, smp_no_rendevous_barrier, NULL, - smp_no_rendevous_barrier, NULL); + smp_rendezvous_cpus(cpuset, smp_no_rendezvous_barrier, NULL, + smp_no_rendezvous_barrier, NULL); } static void Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Sun Apr 9 01:35:19 2017 (r316647) +++ head/sys/i386/i386/pmap.c Sun Apr 9 02:00:03 2017 (r316648) @@ -1195,7 +1195,7 @@ pmap_update_pde(pmap_t pmap, vm_offset_t act.newpde = newpde; CPU_SET(cpuid, &active); smp_rendezvous_cpus(active, - smp_no_rendevous_barrier, pmap == kernel_pmap ? + smp_no_rendezvous_barrier, pmap == kernel_pmap ? pmap_update_pde_kernel : pmap_update_pde_user, pmap_update_pde_teardown, &act); } else { Modified: head/sys/i386/include/counter.h ============================================================================== --- head/sys/i386/include/counter.h Sun Apr 9 01:35:19 2017 (r316647) +++ head/sys/i386/include/counter.h Sun Apr 9 02:00:03 2017 (r316648) @@ -148,8 +148,8 @@ counter_u64_zero_inline(counter_u64_t c) *(uint64_t *)((char *)c + sizeof(struct pcpu) * i) = 0; critical_exit(); } else { - smp_rendezvous(smp_no_rendevous_barrier, - counter_u64_zero_one_cpu, smp_no_rendevous_barrier, c); + smp_rendezvous(smp_no_rendezvous_barrier, + counter_u64_zero_one_cpu, smp_no_rendezvous_barrier, c); } } #endif Modified: head/sys/kern/kern_rmlock.c ============================================================================== --- head/sys/kern/kern_rmlock.c Sun Apr 9 01:35:19 2017 (r316647) +++ head/sys/kern/kern_rmlock.c Sun Apr 9 02:00:03 2017 (r316648) @@ -556,9 +556,9 @@ _rm_wlock(struct rmlock *rm) */ #ifdef SMP smp_rendezvous_cpus(readcpus, - smp_no_rendevous_barrier, + smp_no_rendezvous_barrier, rm_cleanIPI, - smp_no_rendevous_barrier, + smp_no_rendezvous_barrier, rm); #else Modified: head/sys/kern/subr_smp.c ============================================================================== --- head/sys/kern/subr_smp.c Sun Apr 9 01:35:19 2017 (r316647) +++ head/sys/kern/subr_smp.c Sun Apr 9 02:00:03 2017 (r316648) @@ -451,7 +451,7 @@ smp_rendezvous_action(void) * function. Ensure all CPUs have completed the setup * function before moving on to the action function. */ - if (local_setup_func != smp_no_rendevous_barrier) { + if (local_setup_func != smp_no_rendezvous_barrier) { if (smp_rv_setup_func != NULL) smp_rv_setup_func(smp_rv_func_arg); atomic_add_int(&smp_rv_waiters[1], 1); @@ -462,7 +462,7 @@ smp_rendezvous_action(void) if (local_action_func != NULL) local_action_func(local_func_arg); - if (local_teardown_func != smp_no_rendevous_barrier) { + if (local_teardown_func != smp_no_rendezvous_barrier) { /* * Signal that the main action has been completed. If a * full exit rendezvous is requested, then all CPUs will @@ -815,10 +815,10 @@ SYSINIT(cpu_mp_setvariables, SI_SUB_TUNA #endif /* SMP */ void -smp_no_rendevous_barrier(void *dummy) +smp_no_rendezvous_barrier(void *dummy) { #ifdef SMP - KASSERT((!smp_started),("smp_no_rendevous called and smp is started")); + KASSERT((!smp_started),("smp_no_rendezvous called and smp is started")); #endif } Modified: head/sys/mips/include/counter.h ============================================================================== --- head/sys/mips/include/counter.h Sun Apr 9 01:35:19 2017 (r316647) +++ head/sys/mips/include/counter.h Sun Apr 9 02:00:03 2017 (r316648) @@ -72,8 +72,8 @@ static inline void counter_u64_zero_inline(counter_u64_t c) { - smp_rendezvous(smp_no_rendevous_barrier, counter_u64_zero_one_cpu, - smp_no_rendevous_barrier, c); + smp_rendezvous(smp_no_rendezvous_barrier, counter_u64_zero_one_cpu, + smp_no_rendezvous_barrier, c); } #endif Modified: head/sys/powerpc/include/counter.h ============================================================================== --- head/sys/powerpc/include/counter.h Sun Apr 9 01:35:19 2017 (r316647) +++ head/sys/powerpc/include/counter.h Sun Apr 9 02:00:03 2017 (r316648) @@ -72,8 +72,8 @@ static inline void counter_u64_zero_inline(counter_u64_t c) { - smp_rendezvous(smp_no_rendevous_barrier, counter_u64_zero_one_cpu, - smp_no_rendevous_barrier, c); + smp_rendezvous(smp_no_rendezvous_barrier, counter_u64_zero_one_cpu, + smp_no_rendezvous_barrier, c); } #endif @@ -138,8 +138,8 @@ static inline void counter_u64_zero_inline(counter_u64_t c) { - smp_rendezvous(smp_no_rendevous_barrier, counter_u64_zero_one_cpu, - smp_no_rendevous_barrier, c); + smp_rendezvous(smp_no_rendezvous_barrier, counter_u64_zero_one_cpu, + smp_no_rendezvous_barrier, c); } #endif Modified: head/sys/powerpc/ofw/ofw_machdep.c ============================================================================== --- head/sys/powerpc/ofw/ofw_machdep.c Sun Apr 9 01:35:19 2017 (r316647) +++ head/sys/powerpc/ofw/ofw_machdep.c Sun Apr 9 02:00:03 2017 (r316648) @@ -528,8 +528,8 @@ openfirmware(void *args) #ifdef SMP rv_args.args = args; rv_args.in_progress = 1; - smp_rendezvous(smp_no_rendevous_barrier, ofw_rendezvous_dispatch, - smp_no_rendevous_barrier, &rv_args); + smp_rendezvous(smp_no_rendezvous_barrier, ofw_rendezvous_dispatch, + smp_no_rendezvous_barrier, &rv_args); result = rv_args.retval; #else result = openfirmware_core(args); Modified: head/sys/riscv/include/counter.h ============================================================================== --- head/sys/riscv/include/counter.h Sun Apr 9 01:35:19 2017 (r316647) +++ head/sys/riscv/include/counter.h Sun Apr 9 02:00:03 2017 (r316648) @@ -71,8 +71,8 @@ static inline void counter_u64_zero_inline(counter_u64_t c) { - smp_rendezvous(smp_no_rendevous_barrier, counter_u64_zero_one_cpu, - smp_no_rendevous_barrier, c); + smp_rendezvous(smp_no_rendezvous_barrier, counter_u64_zero_one_cpu, + smp_no_rendezvous_barrier, c); } #endif Modified: head/sys/sparc64/include/counter.h ============================================================================== --- head/sys/sparc64/include/counter.h Sun Apr 9 01:35:19 2017 (r316647) +++ head/sys/sparc64/include/counter.h Sun Apr 9 02:00:03 2017 (r316648) @@ -71,8 +71,8 @@ static inline void counter_u64_zero_inline(counter_u64_t c) { - smp_rendezvous(smp_no_rendevous_barrier, counter_u64_zero_one_cpu, - smp_no_rendevous_barrier, c); + smp_rendezvous(smp_no_rendezvous_barrier, counter_u64_zero_one_cpu, + smp_no_rendezvous_barrier, c); } #endif Modified: head/sys/sys/smp.h ============================================================================== --- head/sys/sys/smp.h Sun Apr 9 01:35:19 2017 (r316647) +++ head/sys/sys/smp.h Sun Apr 9 02:00:03 2017 (r316648) @@ -240,7 +240,7 @@ extern struct mtx smp_ipi_mtx; int quiesce_all_cpus(const char *, int); int quiesce_cpus(cpuset_t, const char *, int); -void smp_no_rendevous_barrier(void *); +void smp_no_rendezvous_barrier(void *); void smp_rendezvous(void (*)(void *), void (*)(void *), void (*)(void *), Modified: head/sys/x86/x86/tsc.c ============================================================================== --- head/sys/x86/x86/tsc.c Sun Apr 9 01:35:19 2017 (r316647) +++ head/sys/x86/x86/tsc.c Sun Apr 9 02:00:03 2017 (r316648) @@ -443,12 +443,12 @@ retry: for (i = 0, tsc = data; i < N; i++, tsc += size) smp_rendezvous(tsc_read_0, tsc_read_1, tsc_read_2, tsc); smp_tsc = 1; /* XXX */ - smp_rendezvous(smp_no_rendevous_barrier, comp_smp_tsc, - smp_no_rendevous_barrier, data); + smp_rendezvous(smp_no_rendezvous_barrier, comp_smp_tsc, + smp_no_rendezvous_barrier, data); if (!smp_tsc && adj < smp_tsc_adjust) { adj++; - smp_rendezvous(smp_no_rendevous_barrier, adj_smp_tsc, - smp_no_rendevous_barrier, data); + smp_rendezvous(smp_no_rendezvous_barrier, adj_smp_tsc, + smp_no_rendezvous_barrier, data); goto retry; } free(data, M_TEMP); From owner-svn-src-head@freebsd.org Sun Apr 9 03:50:49 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74284D35F07; Sun, 9 Apr 2017 03:50:49 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 45D4B8E6; Sun, 9 Apr 2017 03:50:49 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v393om2M017689; Sun, 9 Apr 2017 03:50:48 GMT (envelope-from kan@FreeBSD.org) Received: (from kan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v393omna017688; Sun, 9 Apr 2017 03:50:48 GMT (envelope-from kan@FreeBSD.org) Message-Id: <201704090350.v393omna017688@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kan set sender to kan@FreeBSD.org using -f From: Alexander Kabaev Date: Sun, 9 Apr 2017 03:50:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316649 - head/lib/libz X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Apr 2017 03:50:49 -0000 Author: kan Date: Sun Apr 9 03:50:48 2017 New Revision: 316649 URL: https://svnweb.freebsd.org/changeset/base/316649 Log: Add missing double quote to fix r316635 commit. Modified: head/lib/libz/Makefile Modified: head/lib/libz/Makefile ============================================================================== --- head/lib/libz/Makefile Sun Apr 9 02:00:03 2017 (r316648) +++ head/lib/libz/Makefile Sun Apr 9 03:50:48 2017 (r316649) @@ -40,7 +40,7 @@ SRCS+= uncompr.c SRCS+= zopen.c SRCS+= zutil.c -.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64 +.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" CFLAGS+= -DUNALIGNED_OK .endif From owner-svn-src-head@freebsd.org Sun Apr 9 04:54:12 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1F97D35DB0 for ; Sun, 9 Apr 2017 04:54:12 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: from mail-lf0-f67.google.com (mail-lf0-f67.google.com [209.85.215.67]) (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 5957B3E6 for ; Sun, 9 Apr 2017 04:54:12 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: by mail-lf0-f67.google.com with SMTP id i3so2280772lfh.2 for ; Sat, 08 Apr 2017 21:54:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=4sDyreoZ57lEKFLEaTxeAWmDMOzH++bca9a2LKIQ9ck=; b=fTXuuvmqnA2odQXz0T+ZkBnpJQp+szoaCu3CZ/2abyWFfqwNiIV1a51LtYj8/hThpI l+pdiZ45u9YQCGOk6i3g1UFcscCFgrfoW4RCosiYSz/XwxheD085XjPoEX/pItSl95Sf 3eSxMA9GwuMjyndLt79Mk+f1w+OfYTod1zn4YNEac6fzAVG41eCD9/haHMonihNZV8Hz tSV8lTI85UyPxgnvWLkQorhzkbGKggA/Zn5lbW2t9QXiD0+tzi808tlOpnF/WMLIZcJc bE0gFPZRJ7FKafgkbFfdEimPiMNh/pL8nvaeBXye5ysIzO4oT/5W94CNRC0V0Wg5/DS4 Li9Q== X-Gm-Message-State: AFeK/H1/PP0BB5UEJf6O8I+uC4JGJMD7fQFtQXPZiDasK92o+kHDD14oIzvLwBNUZMP5TQ== X-Received: by 10.46.69.133 with SMTP id s127mr13507950lja.44.1491713649481; Sat, 08 Apr 2017 21:54:09 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by smtp.gmail.com with ESMTPSA id i1sm2000887ljd.47.2017.04.08.21.54.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Apr 2017 21:54:08 -0700 (PDT) Subject: Re: svn commit: r316642 - head/sys/dev/syscons To: Bruce Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201704081000.v38A0dBU078784@repo.freebsd.org> From: Andrey Chernov Message-ID: <4a498d83-3b64-18ac-bb0f-890a0c2893fc@freebsd.org> Date: Sun, 9 Apr 2017 07:54:04 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <201704081000.v38A0dBU078784@repo.freebsd.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Apr 2017 04:54:12 -0000 On 08.04.2017 13:00, Bruce Evans wrote: > Log: > Quick fix for removal of the mouse cursor in vga direct graphics modes > (that is, in all supported 8, 15, 16 and 24-color modes). Moving the > mouse cursor while holding down a button (giving cut marking) left a > trail of garbage from misremoved mouse cursors (usually colored > rectangles and not cursor shapes). Cases with a button not held down > worked better and may even have worked. > > No renderer support for removing (software) mouse cursors is needed > (and many renderers don't have any), since sc_remove_mouse_image() > marks for update the region containing the image and usually much > more. The mouse cursor can be (partially) over as many as 4 character > cells, and removing it in only the 1-4 cells occupied by it would be > best for efficiency and for avoiding flicker. Please don't forget that this 5 cells range (0xd0-0xd4, last one becomes SC_CURSOR_CHAR) can be redefined with "vidcontrol -M", it is needed for the case they overlap valid characters region for some code tables. From owner-svn-src-head@freebsd.org Sun Apr 9 05:24:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49218D35437 for ; Sun, 9 Apr 2017 05:24:03 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: from mail-lf0-f66.google.com (mail-lf0-f66.google.com [209.85.215.66]) (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 F06D7CB for ; Sun, 9 Apr 2017 05:24:02 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: by mail-lf0-f66.google.com with SMTP id i3so2304246lfh.2 for ; Sat, 08 Apr 2017 22:24:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=1fnU/57/69WsPAPZDyrTfgev2j7+LI7nrpZ2LxO/2kQ=; b=qHGCuNQ4fpHmPluDVPRe6bG5imRbGjaW73BX8ODSOiFlXefxFKwc6+0J6fyLSBtju7 kH3MUDN3X4pLwUn37WY15KEJBvhFWh7Q2TqW4bC811o/vxrVW7gmKOxvhQiQNmbmR6At j7YJfXwiG8UWiSt6N1OnvmrcILCcn0oD/Xf8zomFyDoqu+9qszTAovZXu+CjQ9VuIQ37 wXcXPS+KThz/Ab0Wb4aHN+ONz97oR4y/u6oGJaOYQ7XyNYs7agnSKwZkl6n9cMzUYps2 IGt8HejRe+/y6JMdssMHb2PL1gHxGuRvFnvdsJh9+Ol12+HkdkZhp2Wos0KRmQ03RbFE A8xA== X-Gm-Message-State: AFeK/H2RHPa2xL7bk56qKVHOXoELO7rPk80hJnR7uZO/LGkjBbOlXVEglHdnuLdnEf99pg== X-Received: by 10.25.43.205 with SMTP id r196mr13847821lfr.116.1491715440488; Sat, 08 Apr 2017 22:24:00 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by smtp.gmail.com with ESMTPSA id e124sm1969792lfg.8.2017.04.08.22.23.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Apr 2017 22:23:59 -0700 (PDT) Subject: Re: svn commit: r316642 - head/sys/dev/syscons To: Bruce Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201704081000.v38A0dBU078784@repo.freebsd.org> <4a498d83-3b64-18ac-bb0f-890a0c2893fc@freebsd.org> From: Andrey Chernov Message-ID: <23b8c635-f856-51b5-a338-d9bb53aefc7c@freebsd.org> Date: Sun, 9 Apr 2017 08:23:55 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <4a498d83-3b64-18ac-bb0f-890a0c2893fc@freebsd.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Apr 2017 05:24:03 -0000 On 09.04.2017 7:54, Andrey Chernov wrote: > On 08.04.2017 13:00, Bruce Evans wrote: >> Log: >> Quick fix for removal of the mouse cursor in vga direct graphics modes >> (that is, in all supported 8, 15, 16 and 24-color modes). Moving the >> mouse cursor while holding down a button (giving cut marking) left a >> trail of garbage from misremoved mouse cursors (usually colored >> rectangles and not cursor shapes). Cases with a button not held down >> worked better and may even have worked. >> >> No renderer support for removing (software) mouse cursors is needed >> (and many renderers don't have any), since sc_remove_mouse_image() >> marks for update the region containing the image and usually much >> more. The mouse cursor can be (partially) over as many as 4 character >> cells, and removing it in only the 1-4 cells occupied by it would be >> best for efficiency and for avoiding flicker. > > Please don't forget that this 5 cells range (0xd0-0xd4, last one becomes > SC_CURSOR_CHAR) can be redefined with "vidcontrol -M", it is needed for > the case they overlap valid characters region for some code tables. Probably we just can change default to remove additional vidcontrol -M setup. I usually have this range started with 0x03. From owner-svn-src-head@freebsd.org Sun Apr 9 06:47:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0505D357FC; Sun, 9 Apr 2017 06:47:03 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 8C74A3D2; Sun, 9 Apr 2017 06:47:02 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id F24C042727A; Sun, 9 Apr 2017 16:46:54 +1000 (AEST) Date: Sun, 9 Apr 2017 16:46:54 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Andrey Chernov cc: Bruce Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r316642 - head/sys/dev/syscons In-Reply-To: <4a498d83-3b64-18ac-bb0f-890a0c2893fc@freebsd.org> Message-ID: <20170409150512.B1318@besplex.bde.org> References: <201704081000.v38A0dBU078784@repo.freebsd.org> <4a498d83-3b64-18ac-bb0f-890a0c2893fc@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.2 cv=KeqiiUQD c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=2kjGuNizMhM4yULxnWoA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Apr 2017 06:47:04 -0000 On Sun, 9 Apr 2017, Andrey Chernov wrote: > On 08.04.2017 13:00, Bruce Evans wrote: >> Log: >> Quick fix for removal of the mouse cursor in vga direct graphics modes >> (that is, in all supported 8, 15, 16 and 24-color modes). Moving the >> mouse cursor while holding down a button (giving cut marking) left a >> trail of garbage from misremoved mouse cursors (usually colored >> rectangles and not cursor shapes). Cases with a button not held down >> worked better and may even have worked. >> >> No renderer support for removing (software) mouse cursors is needed >> (and many renderers don't have any), since sc_remove_mouse_image() >> marks for update the region containing the image and usually much >> more. The mouse cursor can be (partially) over as many as 4 character >> cells, and removing it in only the 1-4 cells occupied by it would be >> best for efficiency and for avoiding flicker. > > Please don't forget that this 5 cells range (0xd0-0xd4, last one becomes > SC_CURSOR_CHAR) can be redefined with "vidcontrol -M", it is needed for > the case they overlap valid characters region for some code tables. I didn't forget it, but these cells are only used in text mode and there are only 4 of them AFAIK (-M goes up to 252, which leaves space for only 4 cells 252-255). Text mode is is one case that has no renderer support for the mouse cursor. Later I found that some renderer support is needed in all graphics modes and would be needed in text mode too if it supported a reduced window (say 79x24) so that the mouse cursor works better. Normally the mouse course is reduced to 1 dot if it is at the right or bottom border, but in graphics modes there is sometimes extra space outside of the text window. E.g., in 800x600 mode, the default text window with an 8x16 font is 100x37 which occupies 800x592, so there is no extra space at the right border and 8 pixels at the bottom border. Users who wantt to see the full mouse cursor at the borders should configure a 99x36 or just an 80x25 text window. In text modes, there is no option to reduce the text window. So in graphics but not in text modes, the mouse cursor renderer must have special support for erasing the mouse outside of the text window, since other drawing methods top at the border. I don't understand SC_CURSOR_CHAR completely yet, but my cursor fixes so far are mainly to prepare for improving the keyboard cursor. SC_CURSOR_CHAR is normally statically configured as (0x07) SC_MOUSE_CHAR as (0xd0) (both with bogus parentheses). SC_CURSOR_CHAR is ifdefed but is not a supported option. SC_MOUSE_CHAR is a supported option. NOTES gives the example of setting it to 0x3. Then if the configured SC_CURSOR_CHAR is inside the 4-char range for the mouse cursor, then SC_CURSOR_CHAR is moved to (SC_MOUSE_CHAR + 4), although this is even more broken if the mouse range is 252-255 and the cursor char is in this range -- then the cursor char ends up as the invalid char 256. Reconfiguring the mouse char range using -M causes similar problems. There is no way to reconfigure the cursor char AFAIK. In fact, it doesn't even seem to be configured -- SC_CURSOR_CHAR is never used, so I think sc->cursor_char is only statically initialized to 0. This is a smaller bug with scteken. Teken breaks support for printing character 0 (which is normally blank in syscons' fonts), so this font position for this character is always available for use as the cursor character. I tested using the cursor char a little. I normally use a non-blinking normal keyboard cursor and see only negative advantages for the cursor character. But it would be useful to switch the cursor character(s) or attributes occasionally to highlight the cursor by blinking it once or twice, as is done using ripples for mouse cursors in some systems. Changing the charcter is more interesting than blinking, and needed more if there are only 2 colors. The "normal" keyboard cursor should be the character under the cursor with its bg modified to a unique color. This only happens in some cases now. Text mode usually works right, except the preferred unique color is hard-coded as white and when the fg or bg or the current char is also white, reverse video is used instead. Other modes mostly use reverse video. Reverse video is worse than usual when it is done more than once. Cur marking also gives reverse video. The sc cursor over cut marking is reversed again, making it look strange. The vt cursor over cut marking is not reversed again, making it invisible. The mouse cursor mostly works better by being destructive. Bruce From owner-svn-src-head@freebsd.org Sun Apr 9 07:53:32 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8320D36852; Sun, 9 Apr 2017 07:53:32 +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 B861A64F; Sun, 9 Apr 2017 07:53:32 +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 v397rVpZ017352; Sun, 9 Apr 2017 07:53:31 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v397rVI3017350; Sun, 9 Apr 2017 07:53:31 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201704090753.v397rVI3017350@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 9 Apr 2017 07:53:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316652 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Apr 2017 07:53:33 -0000 Author: mav Date: Sun Apr 9 07:53:31 2017 New Revision: 316652 URL: https://svnweb.freebsd.org/changeset/base/316652 Log: Fix few minor issues found by Clang Analyzer. MFC after: 2 weeks Modified: head/sys/dev/isp/isp.c head/sys/dev/isp/isp_freebsd.c Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Sun Apr 9 06:44:31 2017 (r316651) +++ head/sys/dev/isp/isp.c Sun Apr 9 07:53:31 2017 (r316652) @@ -2662,7 +2662,8 @@ isp_plogx(ispsoftc_t *isp, int chan, uin break; } if (msg) { - isp_prt(isp, ISP_LOGERR, "Chan %d PLOGX PortID 0x%06x to N-Port handle 0x%x: %s", chan, portid, handle, msg); + isp_prt(isp, lev, "Chan %d PLOGX PortID 0x%06x to N-Port handle 0x%x: %s", + chan, portid, handle, msg); } return (rval); } Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Sun Apr 9 06:44:31 2017 (r316651) +++ head/sys/dev/isp/isp_freebsd.c Sun Apr 9 07:53:31 2017 (r316652) @@ -3779,7 +3779,6 @@ changed: nlstate = reason = 0; } va_end(ap); - fc = ISP_FC_PC(isp, bus); if (evt == ISPASYNC_CHANGE_PDB) { msg = "Port Database Changed"; From owner-svn-src-head@freebsd.org Sun Apr 9 07:54:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44AF9D368B8; Sun, 9 Apr 2017 07:54:41 +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 EF703821; Sun, 9 Apr 2017 07:54:40 +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 v397sekH017431; Sun, 9 Apr 2017 07:54:40 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v397sdxA017429; Sun, 9 Apr 2017 07:54:39 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201704090754.v397sdxA017429@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 9 Apr 2017 07:54:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316653 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Apr 2017 07:54:41 -0000 Author: mav Date: Sun Apr 9 07:54:39 2017 New Revision: 316653 URL: https://svnweb.freebsd.org/changeset/base/316653 Log: Fix few minor issues found by Clang Analyzer. MFC after: 2 weeks Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_frontend_iscsi.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Sun Apr 9 07:53:31 2017 (r316652) +++ head/sys/cam/ctl/ctl.c Sun Apr 9 07:54:39 2017 (r316653) @@ -7047,7 +7047,7 @@ ctl_get_lba_status(struct ctl_scsiio *ct lbalen->len = total_len; lbalen->flags = 0; retval = lun->backend->config_read((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); + return (retval); } int Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_iscsi.c Sun Apr 9 07:53:31 2017 (r316652) +++ head/sys/cam/ctl/ctl_frontend_iscsi.c Sun Apr 9 07:54:39 2017 (r316653) @@ -321,11 +321,10 @@ cfiscsi_pdu_handle(struct icl_pdu *reque static void cfiscsi_receive_callback(struct icl_pdu *request) { +#ifdef ICL_KERNEL_PROXY struct cfiscsi_session *cs; cs = PDU_SESSION(request); - -#ifdef ICL_KERNEL_PROXY if (cs->cs_waiting_for_ctld || cs->cs_login_phase) { if (cs->cs_login_pdu == NULL) cs->cs_login_pdu = request; @@ -1709,6 +1708,13 @@ cfiscsi_ioctl_list(struct ctl_iscsi *ci) sbuf_finish(sb); error = copyout(sbuf_data(sb), cilp->conn_xml, sbuf_len(sb) + 1); + if (error != 0) { + sbuf_delete(sb); + snprintf(ci->error_str, sizeof(ci->error_str), + "copyout failed with error %d", error); + ci->status = CTL_ISCSI_ERROR; + return; + } cilp->fill_len = sbuf_len(sb) + 1; ci->status = CTL_ISCSI_OK; sbuf_delete(sb); @@ -2163,9 +2169,9 @@ cfiscsi_ioctl_port_create(struct ctl_req retval = ctl_port_register(port); if (retval != 0) { ctl_free_opts(&port->options); - cfiscsi_target_release(ct); free(port->port_devid, M_CFISCSI); free(port->target_devid, M_CFISCSI); + cfiscsi_target_release(ct); req->status = CTL_LUN_ERROR; snprintf(req->error_str, sizeof(req->error_str), "ctl_port_register() failed with error %d", retval); From owner-svn-src-head@freebsd.org Sun Apr 9 07:58:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99557D369C8; Sun, 9 Apr 2017 07:58:47 +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 2EEB1A45; Sun, 9 Apr 2017 07:58:46 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id 2CDA3D6823A; Sun, 9 Apr 2017 17:33:10 +1000 (AEST) Date: Sun, 9 Apr 2017 17:33:10 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Andrey Chernov cc: Bruce Evans , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r316642 - head/sys/dev/syscons In-Reply-To: <23b8c635-f856-51b5-a338-d9bb53aefc7c@freebsd.org> Message-ID: <20170409164754.E1567@besplex.bde.org> References: <201704081000.v38A0dBU078784@repo.freebsd.org> <4a498d83-3b64-18ac-bb0f-890a0c2893fc@freebsd.org> <23b8c635-f856-51b5-a338-d9bb53aefc7c@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.2 cv=KeqiiUQD c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=zyuj5AaQCvbWOqxV1wsA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Apr 2017 07:58:47 -0000 On Sun, 9 Apr 2017, Andrey Chernov wrote: > On 09.04.2017 7:54, Andrey Chernov wrote: >> On 08.04.2017 13:00, Bruce Evans wrote: >>> Log: >>> Quick fix for removal of the mouse cursor in vga direct graphics modes >>> ... >> >> Please don't forget that this 5 cells range (0xd0-0xd4, last one becomes >> SC_CURSOR_CHAR) can be redefined with "vidcontrol -M", it is needed for >> the case they overlap valid characters region for some code tables. > > Probably we just can change default to remove additional vidcontrol -M > setup. I usually have this range started with 0x03. That can only work if you also avoid 9-bit text modes. 9-bit modes give 1-bit separations between characters, except for those in the graphics range (starting at about 0xd0). Hmm, syscons already seems to have bugs handling this. The mouse cursor is always 8x16, usually split into 4. For cells placed outside the graphics region, this gives 1-bit gaps in 9-bit mode. For cells placed in the graphics region, it is a difficult or impossible transformation which is not done to rearrange the pixels to fill in the gaps correctly. 9-bit mode basically gives an 9x16 cursor, but the 9th bit is already unusable within a single cell, since it would extend the rightmost pixels in the 8x16 cursor in an ugly way. These pixels are for 1 end of the arrow and the end of its right barb. The extension occurs every 8th x position when the cursor is moved from left to right. Also, when the cursor is moved over an ordinary character, the ordinary character is merged into the cursor and drawn as part of the cursor. This gives ugly extensions of '0' characters in a font carefully designed for 9-bit mode (the '0' characters are a full 8 bits wide and if they are in the graphics range the become 9 bits wide with extra pixels on the right). This problem doesn't occur in graphics mode. However, graphics mode should support 9-bit mode in software, so that the fonts carefully designed for 9-bit mode can be used. 8 bits wide is too narrow for a good font (it requires '0' to be only 7 bits wide...), and is even worse when used with fonts designed for 9-bit mode (their '0's and 'M's are not separated). vt uses a 10x16 mouse cursor and only supports it in graphics mode. The extra bit makes it look much better. Support for 9-bit mode is otherwise worse in vt than in sc. E.g, the cp437 glyphs for line drawing characters don't work in 9-bit text mode, since a gap is left between then. I think the bit that controls extension is forced off together with the bit that controls blinking fg/bg brightness, so even if these glyphs are rendered using a char in the graphics range, they are not extended. 9-bit text modes are hard to avoid. 90-column sc modes avoid them, but tend to be broken on newer hardware. The newer hardware tends to force 9-bit modes because this is normal and works better. I have just 1 system (an 11 year old laptop) than forces 8-bit mode instead. Bruce From owner-svn-src-head@freebsd.org Sun Apr 9 08:12:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9687DD36FDC; Sun, 9 Apr 2017 08:12:19 +0000 (UTC) (envelope-from tsoome@me.com) Received: from st13p35im-asmtp001.me.com (st13p35im-asmtp001.me.com [17.164.199.64]) (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 6BC433A7; Sun, 9 Apr 2017 08:12:19 +0000 (UTC) (envelope-from tsoome@me.com) Received: from process-dkim-sign-daemon.st13p35im-asmtp001.me.com by st13p35im-asmtp001.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) id <0OO400I00UEDRU00@st13p35im-asmtp001.me.com>; Sun, 09 Apr 2017 08:12:18 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=4d515a; t=1491725538; bh=kGzK2dSWXEL7PDU/fEfFVBvd+FvXoBDLvXGsyUroNvw=; h=From:Message-id:Content-type:MIME-version:Subject:Date:To; b=VOmlUlKeGTrTvfSMlqvS6OU7uXSOchILVaGIGLu+LhXzOF0dZAqaZ3/ynIRiHt0/S jvANv193/vtpMRiNqc4dtxf/QfChWz+ZQyImDYFI+oNWWyL3l1OHPxOwq9bEsldNCe CpiNLZszcVCJKohvYZlR5M3KrktaAahuNTxZTNGkvAVKhaa8vomtDJb49XPkTezrSV ioC05mgnRVa9GPmD5YQSBd2glaIRxnrtHKlcRKoUw+/fbnolVPbS+ea6PkZ5DXqtge CpR+u4NdkE9QxYEWnFmxlbY3+vWfOOjdIVKMat5LixKV/nuXCrB01bUFQRloUlGhhT Yc2YhGOLvSnPg== Received: from icloud.com ([127.0.0.1]) by st13p35im-asmtp001.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) with ESMTPSA id <0OO400DSGUSEYM00@st13p35im-asmtp001.me.com>; Sun, 09 Apr 2017 08:12:17 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-04-09_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1034 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1701120000 definitions=main-1704090074 From: Toomas Soome Message-id: <32C6ACC7-C1A5-4797-81E1-7F630FB94D14@me.com> MIME-version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r316585 - in head/sys/boot: efi/boot1 efi/loader i386/common i386/loader i386/zfsboot zfs Date: Sun, 09 Apr 2017 11:12:14 +0300 In-reply-to: <20170408221653.qtqdvgcosguvugtt@mutt-hbsd> Cc: Toomas Soome , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Shawn Webb References: <201704061817.v36IHT8i088712@repo.freebsd.org> <20170408221653.qtqdvgcosguvugtt@mutt-hbsd> X-Mailer: Apple Mail (2.3273) 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Apr 2017 08:12:19 -0000 > On 9. apr 2017, at 1:16, Shawn Webb = wrote: >=20 > On Thu, Apr 06, 2017 at 06:17:29PM +0000, Toomas Soome wrote: >> Author: tsoome >> Date: Thu Apr 6 18:17:29 2017 >> New Revision: 316585 >> URL: https://svnweb.freebsd.org/changeset/base/316585 >>=20 >> Log: >> loader: zfs reader should check all labels >>=20 >> The current zfs reader is only checking first label from each = device, however, >> we do have 4 labels on device and we should check all 4 to be = protected >> against disk failures and incomplete label updates. >>=20 >> The difficulty is about the fact that 2 label copies are in front of = the >> pool data, and 2 are at the end, which means, we have to know the = size of >> the pool data area. >>=20 >> Since we have now the mechanism from common/disk.c to use the = partition >> information, it does help us in this task; however, there are still = some >> corner cases. >>=20 >> Namely, if the pool is created without partition, directly on the = disk, >> and firmware will give us the wrong size for the disk, we only can = check >> the first two label copies. >>=20 >> Reviewed by: allanjude >> Differential Revision: https://reviews.freebsd.org/D10203 >=20 > This breaks bhyve userboot: >=20 > # sh /usr/share/examples/bhyve/vmrun.sh -c 8 -m 16g -t tap4 -C = /dev/nmdm-laptop-dev-03-A -d = /dev/zvol/enctank/bhyve/laptop-dev-03/disk-01 laptop-dev-03 > /boot/userboot.so: Undefined symbol "ldi_get_size" >=20 > Thanks, >=20 > --=20 > Shawn Webb > Cofounder and Security Engineer > HardenedBSD >=20 > GPG Key ID: 0x6A84658F52456EEE > GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 = 6EEE Yep, the fix is posted as part of https://reviews.freebsd.org/D10302 = - I=E2=80=99m currently running the = build to double check and I think I=E2=80=99ll make the userboot commit = as soon as it is verified. Sorry for the mess. rgds, toomas From owner-svn-src-head@freebsd.org Sun Apr 9 08:55:10 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B038D35B24 for ; Sun, 9 Apr 2017 08:55:10 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: from mail-lf0-f66.google.com (mail-lf0-f66.google.com [209.85.215.66]) (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 E128DAE7 for ; Sun, 9 Apr 2017 08:55:09 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: by mail-lf0-f66.google.com with SMTP id 75so772125lfs.3 for ; Sun, 09 Apr 2017 01:55:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=b/oUDmp7cG8z4xoz+xQyltif3CN0KWPfj4gt6vvmPDY=; b=pEcBB8PrBSQ0TcTaNkpTLqYyifsmiWWKRFBO4p4ygWEuwQnJtp87kXg9z2NikHs5Wk Jq0gNGnzC30CeHAtFpHVI+tk5HALK6UOqd5FAcjUdeWttw/EP9j1jJ+kxdsh084bhvY7 WZkgjwGs+maZg2YYvrKPTBl+0uVFkU/dmUiphWovUPvM2ejRjDQi+8ozLmvP7/Ec8WI/ 2idWkg9rHWG33S+CU01pcTlcA8lcyfkYVTP+s+d19FlcvzPdtgXWPHteK9hLExPg7s3W ayNy1F0KfobB0MF4IoYl9VkTwYhN38X5x6Vhepo5KNPjsjb8wjE7rsJfHAPvwt+V5pAc GFug== X-Gm-Message-State: AFeK/H1CU7r9rWyHibHyRfSsWNQuq6tYBrjoUk0cDvAa2FPNWsA9I9sYXoN9iMagS0y6dw== X-Received: by 10.25.17.153 with SMTP id 25mr15794043lfr.39.1491728107592; Sun, 09 Apr 2017 01:55:07 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by smtp.gmail.com with ESMTPSA id l2sm2050866lfe.69.2017.04.09.01.55.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Apr 2017 01:55:07 -0700 (PDT) Subject: Re: svn commit: r316642 - head/sys/dev/syscons To: Bruce Evans References: <201704081000.v38A0dBU078784@repo.freebsd.org> <4a498d83-3b64-18ac-bb0f-890a0c2893fc@freebsd.org> <20170409150512.B1318@besplex.bde.org> Cc: Bruce Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Andrey Chernov Message-ID: <5d76f933-7d70-411f-9233-0f1e6b72023e@freebsd.org> Date: Sun, 9 Apr 2017 11:55:00 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170409150512.B1318@besplex.bde.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Apr 2017 08:55:10 -0000 On 09.04.2017 9:46, Bruce Evans wrote: >> Please don't forget that this 5 cells range (0xd0-0xd4, last one becomes >> SC_CURSOR_CHAR) can be redefined with "vidcontrol -M", it is needed for >> the case they overlap valid characters region for some code tables. > > I didn't forget it, but these cells are only used in text mode and there > are only 4 of them AFAIK (-M goes up to 252, which leaves space for only > 4 cells 252-255). Text mode is is one case that has no renderer support > for the mouse cursor. Here is 5th one (depends of SC_MOUSE_CHAR which can be set in the kernel config): #if SC_MOUSE_CHAR <= SC_CURSOR_CHAR && SC_CURSOR_CHAR < (SC_MOUSE_CHAR + 4) #undef SC_CURSOR_CHAR #define SC_CURSOR_CHAR (SC_MOUSE_CHAR + 4) #endif > NOTES gives the example of setting it to 0x3. Then if the configured > SC_CURSOR_CHAR is inside the 4-char range for the mouse cursor, then AFAIK SC_CURSOR_CHAR kernel config or vidcontrol is not supported. > There is no way to reconfigure the cursor char AFAIK. In fact, it > doesn't even seem to be configured -- SC_CURSOR_CHAR is never used, I remember times it was used but not remember how, log history needs to be browsed. From owner-svn-src-head@freebsd.org Sun Apr 9 09:00:51 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02F9CD35DEE for ; Sun, 9 Apr 2017 09:00:51 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: from mail-lf0-f67.google.com (mail-lf0-f67.google.com [209.85.215.67]) (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 7FF4CCD1 for ; Sun, 9 Apr 2017 09:00:50 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: by mail-lf0-f67.google.com with SMTP id r36so9105894lfi.0 for ; Sun, 09 Apr 2017 02:00:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=7ua5i1h1pb7agbu5zTqmjGE/SdLgvAfURASwwB1XgXI=; b=sL6Mae47Xkpl3rZ68hEHmBko+CvpfZ8tuUIrh3vpY7ptHboBGux4/0xy5dGYT/4r/I GKiSP3VJuLhWIsXLupUBhZKnWb5lpyl2ABJ8efhNayEGGYlsyGixQSWds3EsWP1kLF59 ahPLHyhdNL58XCQ3W7ARYEAeBYSEGF+o/4fRr0zMIjVVd0vKs9Jw/+r9H2rScb+MUEiJ U34Ee4ShY+2M0IyIUWYOvp5Coffm5oKpJUclEWQZyLmLj6SJ0/6sStqz8um4luj1QgIE FmJHXQOMQY1iSzWu2cz0dsmNUCWB/ENIMZSL8ucoTkpfeGFa64poWaJ4UYhedTpwrBy1 uC2w== X-Gm-Message-State: AFeK/H0pwnqkuvC3OBq6VFwGu9wxkxV2BejWb+rzj0hwrkuGTQSn8I+KvQALulMixVQOcg== X-Received: by 10.46.22.11 with SMTP id w11mr13676064ljd.68.1491728448415; Sun, 09 Apr 2017 02:00:48 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by smtp.gmail.com with ESMTPSA id o80sm2056831lff.25.2017.04.09.02.00.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Apr 2017 02:00:48 -0700 (PDT) Subject: Re: svn commit: r316642 - head/sys/dev/syscons To: Bruce Evans References: <201704081000.v38A0dBU078784@repo.freebsd.org> <4a498d83-3b64-18ac-bb0f-890a0c2893fc@freebsd.org> <23b8c635-f856-51b5-a338-d9bb53aefc7c@freebsd.org> <20170409164754.E1567@besplex.bde.org> Cc: Bruce Evans , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org From: Andrey Chernov Message-ID: Date: Sun, 9 Apr 2017 12:00:43 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170409164754.E1567@besplex.bde.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Apr 2017 09:00:51 -0000 On 09.04.2017 10:33, Bruce Evans wrote: > On Sun, 9 Apr 2017, Andrey Chernov wrote: > >> On 09.04.2017 7:54, Andrey Chernov wrote: >>> On 08.04.2017 13:00, Bruce Evans wrote: >>>> Log: >>>> Quick fix for removal of the mouse cursor in vga direct graphics >>>> modes >>>> ... >>> >>> Please don't forget that this 5 cells range (0xd0-0xd4, last one becomes >>> SC_CURSOR_CHAR) can be redefined with "vidcontrol -M", it is needed for >>> the case they overlap valid characters region for some code tables. >> >> Probably we just can change default to remove additional vidcontrol -M >> setup. I usually have this range started with 0x03. > > That can only work if you also avoid 9-bit text modes. 9-bit modes > give 1-bit separations between characters, except for those in the > graphics range (starting at about 0xd0). Then let is stays as it is. For me small line in the mouse cursor looks less distractive that junk in all 4 chars around, which happens if fonts codepage have 0xd0-0xd3 as valid characters. From owner-svn-src-head@freebsd.org Sun Apr 9 10:32:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F52CD34FE9; Sun, 9 Apr 2017 10:32:45 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id 682F6B6; Sun, 9 Apr 2017 10:32:44 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id 7B4B21A092C; Sun, 9 Apr 2017 20:32:37 +1000 (AEST) Date: Sun, 9 Apr 2017 20:32:36 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Andrey Chernov cc: Bruce Evans , Bruce Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r316642 - head/sys/dev/syscons In-Reply-To: <5d76f933-7d70-411f-9233-0f1e6b72023e@freebsd.org> Message-ID: <20170409195358.I2327@besplex.bde.org> References: <201704081000.v38A0dBU078784@repo.freebsd.org> <4a498d83-3b64-18ac-bb0f-890a0c2893fc@freebsd.org> <20170409150512.B1318@besplex.bde.org> <5d76f933-7d70-411f-9233-0f1e6b72023e@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.2 cv=VbSHBBh9 c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=lf6DMTtkoMZp8MRgiEkA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Apr 2017 10:32:45 -0000 On Sun, 9 Apr 2017, Andrey Chernov wrote: > On 09.04.2017 9:46, Bruce Evans wrote: >>> Please don't forget that this 5 cells range (0xd0-0xd4, last one becomes >>> SC_CURSOR_CHAR) can be redefined with "vidcontrol -M", it is needed for >>> the case they overlap valid characters region for some code tables. >> >> I didn't forget it, but these cells are only used in text mode and there >> are only 4 of them AFAIK (-M goes up to 252, which leaves space for only >> 4 cells 252-255). Text mode is is one case that has no renderer support >> for the mouse cursor. > > Here is 5th one (depends of SC_MOUSE_CHAR which can be set in the kernel > config): > > #if SC_MOUSE_CHAR <= SC_CURSOR_CHAR && SC_CURSOR_CHAR < (SC_MOUSE_CHAR + 4) > #undef SC_CURSOR_CHAR > #define SC_CURSOR_CHAR (SC_MOUSE_CHAR + 4) > #endif > >> NOTES gives the example of setting it to 0x3. Then if the configured >> SC_CURSOR_CHAR is inside the 4-char range for the mouse cursor, then > > AFAIK SC_CURSOR_CHAR kernel config or vidcontrol is not supported. > >> There is no way to reconfigure the cursor char AFAIK. In fact, it >> doesn't even seem to be configured -- SC_CURSOR_CHAR is never used, > > I remember times it was used but not remember how, log history needs to > be browsed. The initializations are well hidden in MD code: {arm,mips,powerpc,sparc64} /.../sc_machdep.c and isa/syscons_isa.c. This is sort of backwards. The MI initializations of sc->cursor_char are in MD files, while the more MD default value of SC_CURSOR_CHAR is in an MI file. Then sc->cursor_char is only used by the vga renderer for text mode. This is closely associated with isa, so the initializations are mostly irrelevant since their result is not used. How do you initialize actual use of sc->cursor_char? It is only used when SC_NO_FONT_LOADING is not defined. Configuring SC_PIXEL_MODE forces SC_NO_FONT_LOADING to be undefined. Except to test sc->cursor_char, I removed the #undef for this. Next, sc->cursor_char is only used if scp->curs.attr_flags & CONS_CHAR_CURSOR. vidcontrol only supports this with blinking too, and I know I don't want that. Anyway, font loading is almost always defined. Apparently the char cursor is turned off with loadable fonts since it would mess up special fonts more than the default font. But not as much as the mouse cursor. Bruce From owner-svn-src-head@freebsd.org Sun Apr 9 11:09:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1402DD366F6; Sun, 9 Apr 2017 11:09:16 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id D12F01C1; Sun, 9 Apr 2017 11:09:15 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id 408B91A1881; Sun, 9 Apr 2017 21:09:14 +1000 (AEST) Date: Sun, 9 Apr 2017 21:09:14 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Andrey Chernov cc: Bruce Evans , Bruce Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r316642 - head/sys/dev/syscons In-Reply-To: Message-ID: <20170409203245.I2327@besplex.bde.org> References: <201704081000.v38A0dBU078784@repo.freebsd.org> <4a498d83-3b64-18ac-bb0f-890a0c2893fc@freebsd.org> <23b8c635-f856-51b5-a338-d9bb53aefc7c@freebsd.org> <20170409164754.E1567@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.2 cv=KeqiiUQD c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=pFTmfaicEet0DjLtfrUA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Apr 2017 11:09:16 -0000 On Sun, 9 Apr 2017, Andrey Chernov wrote: > On 09.04.2017 10:33, Bruce Evans wrote: >> On Sun, 9 Apr 2017, Andrey Chernov wrote: >> >>> On 09.04.2017 7:54, Andrey Chernov wrote: >>>> On 08.04.2017 13:00, Bruce Evans wrote: >>>>> Log: >>>>> Quick fix for removal of the mouse cursor in vga direct graphics >>>>> modes >>>>> ... >>>> >>>> Please don't forget that this 5 cells range (0xd0-0xd4, last one becomes >>>> SC_CURSOR_CHAR) can be redefined with "vidcontrol -M", it is needed for >>>> the case they overlap valid characters region for some code tables. >>> >>> Probably we just can change default to remove additional vidcontrol -M >>> setup. I usually have this range started with 0x03. >> >> That can only work if you also avoid 9-bit text modes. 9-bit modes >> give 1-bit separations between characters, except for those in the >> graphics range (starting at about 0xd0). > > Then let is stays as it is. For me small line in the mouse cursor looks > less distractive that junk in all 4 chars around, which happens if fonts > codepage have 0xd0-0xd3 as valid characters. Both look bad. Low characters are a better choice if you don't mind the gap, since sc has too many magic characters whose magic can't be turned off with a flag line -opost. These chars are 7-13 and 27. Also 0 with scteken. I don't know of any way to reach the glyphs behind these characters using syscons. The cursor would have to have to consist of vertical lines of width 2 or more for it to be translatable across all positions (reduce to width 1 at the gap so that the hardware extends back to width 2). 8x16 doesn't have enough pixels for that. The border has width 1 in most places. Bruce From owner-svn-src-head@freebsd.org Sun Apr 9 11:16:17 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DABD5D36AEE; Sun, 9 Apr 2017 11:16:17 +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 9DE61A59; Sun, 9 Apr 2017 11:16:17 +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 v39BGGij001025; Sun, 9 Apr 2017 11:16:16 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v39BGGJu001023; Sun, 9 Apr 2017 11:16:16 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201704091116.v39BGGJu001023@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Sun, 9 Apr 2017 11:16:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316654 - head/sys/boot/userboot/userboot X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Apr 2017 11:16:18 -0000 Author: tsoome Date: Sun Apr 9 11:16:16 2017 New Revision: 316654 URL: https://svnweb.freebsd.org/changeset/base/316654 Log: loader: r316585 did miss userboot update The work to implement zfs reader to inspect all pool label copies did miss the userboot, this update does correct this issue. Since userboot is already using common/disk.c API (disk_open() etc), the fix is quite simple - we only need to make sure the userdisk_iocl() will call disk_ioctl(). In addition, the diskioctl callback does return int, not pointer. Note, the review request is actually addressing the sparc and userboot, but as testing the fix for sparc will take some more time, I am posting the userboot fix now. This patch is part of the implementation presented in review: https://reviews.freebsd.org/D10302 Once we have the sparc part tested, we will have the complete fix for the issue. Reviewed by: imp Modified: head/sys/boot/userboot/userboot/main.c head/sys/boot/userboot/userboot/userboot_disk.c Modified: head/sys/boot/userboot/userboot/main.c ============================================================================== --- head/sys/boot/userboot/userboot/main.c Sun Apr 9 07:54:39 2017 (r316653) +++ head/sys/boot/userboot/userboot/main.c Sun Apr 9 11:16:16 2017 (r316654) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "bootstrap.h" #include "disk.h" @@ -270,6 +271,16 @@ command_reloadbe(int argc, char *argv[]) return (CMD_OK); } + +uint64_t +ldi_get_size(void *priv) +{ + int fd = (uintptr_t) priv; + uint64_t size; + + ioctl(fd, DIOCGMEDIASIZE, &size); + return (size); +} #endif /* USERBOOT_ZFS_SUPPORT */ COMMAND_SET(quit, "quit", "exit the loader", command_quit); Modified: head/sys/boot/userboot/userboot/userboot_disk.c ============================================================================== --- head/sys/boot/userboot/userboot/userboot_disk.c Sun Apr 9 07:54:39 2017 (r316653) +++ head/sys/boot/userboot/userboot/userboot_disk.c Sun Apr 9 11:16:16 2017 (r316654) @@ -91,8 +91,8 @@ userdisk_init(void) return (ENOMEM); for (i = 0; i < userdisk_maxunit; i++) { if (CALLBACK(diskioctl, i, DIOCGSECTORSIZE, - §orsize) != NULL || CALLBACK(diskioctl, i, - DIOCGMEDIASIZE, &mediasize) != NULL) + §orsize) != 0 || CALLBACK(diskioctl, i, + DIOCGMEDIASIZE, &mediasize) != 0) return (ENXIO); ud_info[i].mediasize = mediasize; ud_info[i].sectorsize = sectorsize; @@ -230,7 +230,12 @@ static int userdisk_ioctl(struct open_file *f, u_long cmd, void *data) { struct disk_devdesc *dev; + int rc; dev = (struct disk_devdesc *)f->f_devdata; + rc = disk_ioctl(dev, cmd, data); + if (rc != ENOTTY) + return (rc); + return (CALLBACK(diskioctl, dev->d_unit, cmd, data)); } From owner-svn-src-head@freebsd.org Sun Apr 9 12:32:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DAECDD2AFB9; Sun, 9 Apr 2017 12:32:23 +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 ACC6A620; Sun, 9 Apr 2017 12:32:23 +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 v39CWM5D033704; Sun, 9 Apr 2017 12:32:22 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v39CWMDn033703; Sun, 9 Apr 2017 12:32:22 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201704091232.v39CWMDn033703@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 9 Apr 2017 12:32:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316655 - head/sys/fs/nfsclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Apr 2017 12:32:24 -0000 Author: rmacklem Date: Sun Apr 9 12:32:22 2017 New Revision: 316655 URL: https://svnweb.freebsd.org/changeset/base/316655 Log: Fix parsing failure for NFSv4 Setattr operation for failed case. If an operation that preceeds a Setattr in an NFSv4 compound fails, there is no bitmap of attributes to parse. Without this patch, the parsing would fail and return EBADRPC instead of the correct failure error. This could break recovery from a server crash/reboot. Tested by: cperciva PR: 215883 MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clrpcops.c Modified: head/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clrpcops.c Sun Apr 9 11:16:16 2017 (r316654) +++ head/sys/fs/nfsclient/nfs_clrpcops.c Sun Apr 9 12:32:22 2017 (r316655) @@ -1190,7 +1190,7 @@ nfsrpc_setattrrpc(vnode_t vp, struct vat return (error); if (nd->nd_flag & (ND_NFSV3 | ND_NFSV4)) error = nfscl_wcc_data(nd, vp, rnap, attrflagp, NULL, stuff); - if ((nd->nd_flag & ND_NFSV4) && !error) + if ((nd->nd_flag & (ND_NFSV4 | ND_NOMOREDATA)) == ND_NFSV4 && !error) error = nfsrv_getattrbits(nd, &attrbits, NULL, NULL); if (!(nd->nd_flag & ND_NFSV3) && !nd->nd_repstat && !error) error = nfscl_postop_attr(nd, rnap, attrflagp, stuff); From owner-svn-src-head@freebsd.org Sun Apr 9 12:55:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8375CD35596 for ; Sun, 9 Apr 2017 12:55:39 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: from mail-lf0-f67.google.com (mail-lf0-f67.google.com [209.85.215.67]) (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 15032EC7 for ; Sun, 9 Apr 2017 12:55:38 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: by mail-lf0-f67.google.com with SMTP id r36so9335628lfi.0 for ; Sun, 09 Apr 2017 05:55:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=g0kPzCUkskRCJJ4ke2bpsEyJr6SWqsM1Hyks52MTSP0=; b=e/eiexgFl9JRKa5LE//0zOODHiPp/xrsVAJkdsrZ62kASlo5L2eG39X4qa/NPSz/D4 gsYb/8rOo4ixsCEb0rsLrvB61mG2nUX6W+S44myE+gR3iEqC1v8rJlVZKZRIvmD/FKXB alVpj/AqWHgqsc0zxcnWeceCuPwZ0tBJqAXts0fp9ZRFWbE/HCmt91/e2pPmPBBbcQiu XEVewKCmJajGOefxnEuZZ7xDV2v2cG3Pckx2ylne5oZK5Zlhk2Jyt3edJ783RfjVWE6/ sNrw+z5rj6h2zs9Y+ss1nKYMWw5ftT13A9e8Dr00h20qOXs34JASKRzc790WYIRnhY1K q8rA== X-Gm-Message-State: AFeK/H3l7/7N1r1wCnmSaHa3e7XFcBQbcrkNr9vslVOWCOfigcZ5z+S07escUntFU/3XpA== X-Received: by 10.46.92.65 with SMTP id q62mr13648794ljb.48.1491742536546; Sun, 09 Apr 2017 05:55:36 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by smtp.gmail.com with ESMTPSA id q123sm2138961ljb.18.2017.04.09.05.55.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Apr 2017 05:55:36 -0700 (PDT) Subject: Re: svn commit: r316642 - head/sys/dev/syscons To: Bruce Evans References: <201704081000.v38A0dBU078784@repo.freebsd.org> <4a498d83-3b64-18ac-bb0f-890a0c2893fc@freebsd.org> <20170409150512.B1318@besplex.bde.org> <5d76f933-7d70-411f-9233-0f1e6b72023e@freebsd.org> <20170409195358.I2327@besplex.bde.org> Cc: Bruce Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Andrey Chernov Message-ID: <579d9011-a042-4f69-892a-703042706bd3@freebsd.org> Date: Sun, 9 Apr 2017 15:55:31 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170409195358.I2327@besplex.bde.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Apr 2017 12:55:39 -0000 On 09.04.2017 13:32, Bruce Evans wrote: > How do you initialize actual use of sc->cursor_char? It is only used > when SC_NO_FONT_LOADING is not defined. Configuring SC_PIXEL_MODE > forces SC_NO_FONT_LOADING to be undefined. Except to test sc->cursor_char, I use text console mode with loading national codepage font. I don't touch sc->cursor_char directly, I only use 'vidcontrol -M' to move range start to 0x03 since 0xd0-0xd3 and 0xd4 are valid characters in my codepage. Loading font and changing mousechar start are both through rc.conf variables: font8x14="cp866-8x14" font8x16="cp866b-8x16" font8x8="cp866-8x8" mousechar_start="3" > is almost always defined. Apparently the char cursor is turned off with > loadable fonts since it would mess up special fonts more than the default > font. But not as much as the mouse cursor. If you mean just cursor, I have it (even not block but underline cursor). It is not strictly char (i.e. text cursor), but emulation of it via loaded font change on the fly. Via rc.conf variable too: cursor="destructive" From owner-svn-src-head@freebsd.org Sun Apr 9 13:42:18 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D9DED35891; Sun, 9 Apr 2017 13:42:18 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4783D97B; Sun, 9 Apr 2017 13:42:17 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 5582F1FE021; Sun, 9 Apr 2017 15:40:37 +0200 (CEST) Subject: Re: svn commit: r316033 - in head/sys/compat/linuxkpi/common: include/asm include/linux src To: Ed Maste References: <201703271704.v2RH4BBl084239@repo.freebsd.org> Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Hans Petter Selasky Message-ID: <6358cefa-37b4-6e5a-43ad-1b283bb169f1@selasky.org> Date: Sun, 9 Apr 2017 15:40:15 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Apr 2017 13:42:18 -0000 On 04/08/17 20:08, Ed Maste wrote: > On 27 March 2017 at 13:04, Hans Petter Selasky wrote: >> Author: hselasky >> Date: Mon Mar 27 17:04:11 2017 >> New Revision: 316033 >> URL: https://svnweb.freebsd.org/changeset/base/316033 > > powerpc.GENERIC is now failing with: > > In file included from > /scratch/tmp/emaste/freebsd/sys/compat/linuxkpi/common/include/linux/gfp.h:39, > from > /scratch/tmp/emaste/freebsd/sys/compat/linuxkpi/common/include/linux/slab.h:41, > from > /scratch/tmp/emaste/freebsd/sys/compat/linuxkpi/common/include/linux/sched.h:44, > from > /scratch/tmp/emaste/freebsd/sys/compat/linuxkpi/common/include/linux/kernel.h:49, > from > /scratch/tmp/emaste/freebsd/sys/compat/linuxkpi/common/include/linux/kobject.h:36, > from > /scratch/tmp/emaste/freebsd/sys/modules/linuxkpi/../../compat/linuxkpi/common/src/linux_compat.c:58: > /scratch/tmp/emaste/freebsd/sys/compat/linuxkpi/common/include/linux/page.h:43: > error: conflicting types for 'pte_t' > ./machine/pte.h:127: error: previous declaration of 'pte_t' was here > cc1: warnings being treated as errors > /scratch/tmp/emaste/freebsd/sys/modules/linuxkpi/../../compat/linuxkpi/common/src/linux_compat.c: > In function 'linux_cdev_pager_populate': > /scratch/tmp/emaste/freebsd/sys/modules/linuxkpi/../../compat/linuxkpi/common/src/linux_compat.c:414: > warning: cast to pointer from integer of different size > [-Wint-to-pointer-cast] > *** [linux_compat.o] Error code 1 > > I'm on it. Thank you for the notice. --HPS From owner-svn-src-head@freebsd.org Sun Apr 9 14:31:42 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1196D3642C; Sun, 9 Apr 2017 14:31:42 +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 7A15DDE1; Sun, 9 Apr 2017 14:31:42 +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 v39EVfoR078865; Sun, 9 Apr 2017 14:31:41 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v39EVfLW078861; Sun, 9 Apr 2017 14:31:41 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201704091431.v39EVfLW078861@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 9 Apr 2017 14:31:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316656 - in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Apr 2017 14:31:42 -0000 Author: hselasky Date: Sun Apr 9 14:31:41 2017 New Revision: 316656 URL: https://svnweb.freebsd.org/changeset/base/316656 Log: Fix compilation of LinuxKPI for PowerPC. Found by: emaste @ MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/mm.h head/sys/compat/linuxkpi/common/include/linux/page.h head/sys/compat/linuxkpi/common/src/linux_compat.c Modified: head/sys/compat/linuxkpi/common/include/linux/mm.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/mm.h Sun Apr 9 12:32:22 2017 (r316655) +++ head/sys/compat/linuxkpi/common/include/linux/mm.h Sun Apr 9 14:31:41 2017 (r316656) @@ -91,7 +91,7 @@ CTASSERT((VM_PROT_ALL & -(1 << 8)) == 0) #define FAULT_FLAG_REMOTE (1 << 7) #define FAULT_FLAG_INSTRUCTION (1 << 8) -typedef int (*pte_fn_t)(pte_t *, pgtable_t, unsigned long addr, void *data); +typedef int (*pte_fn_t)(linux_pte_t *, pgtable_t, unsigned long addr, void *data); struct vm_area_struct { vm_offset_t vm_start; Modified: head/sys/compat/linuxkpi/common/include/linux/page.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/page.h Sun Apr 9 12:32:22 2017 (r316655) +++ head/sys/compat/linuxkpi/common/include/linux/page.h Sun Apr 9 14:31:41 2017 (r316656) @@ -40,9 +40,9 @@ #include #include -typedef unsigned long pte_t; -typedef unsigned long pmd_t; -typedef unsigned long pgd_t; +typedef unsigned long linux_pte_t; +typedef unsigned long linux_pmd_t; +typedef unsigned long linux_pgd_t; typedef unsigned long pgprot_t; #define page vm_page Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_compat.c Sun Apr 9 12:32:22 2017 (r316655) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Sun Apr 9 14:31:41 2017 (r316656) @@ -411,7 +411,7 @@ linux_cdev_pager_populate(vm_object_t vm MPASS(vmap->vm_private_data == vm_obj->handle); /* fill out VM fault structure */ - vmf.virtual_address = (void *)(pidx << PAGE_SHIFT); + vmf.virtual_address = (void *)((uintptr_t)pidx << PAGE_SHIFT); vmf.flags = (fault_type & VM_PROT_WRITE) ? FAULT_FLAG_WRITE : 0; vmf.pgoff = 0; vmf.page = NULL; From owner-svn-src-head@freebsd.org Sun Apr 9 15:17:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5AD55D3547F; Sun, 9 Apr 2017 15:17:56 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A498B57; Sun, 9 Apr 2017 15:17:56 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v39FHt0L098721; Sun, 9 Apr 2017 15:17:55 GMT (envelope-from bcr@FreeBSD.org) Received: (from bcr@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v39FHtkY098720; Sun, 9 Apr 2017 15:17:55 GMT (envelope-from bcr@FreeBSD.org) Message-Id: <201704091517.v39FHtkY098720@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bcr set sender to bcr@FreeBSD.org using -f From: Benedict Reuschling Date: Sun, 9 Apr 2017 15:17:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316657 - head/sbin/setkey X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Apr 2017 15:17:56 -0000 Author: bcr (doc committer) Date: Sun Apr 9 15:17:55 2017 New Revision: 316657 URL: https://svnweb.freebsd.org/changeset/base/316657 Log: Make setkey(8) more clear about anti-replay window size option semantics. PR: 172913 Submitted by: john@saltant.com Reviewed by: ae@ MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D10304 Modified: head/sbin/setkey/setkey.8 Modified: head/sbin/setkey/setkey.8 ============================================================================== --- head/sbin/setkey/setkey.8 Sun Apr 9 14:31:41 2017 (r316656) +++ head/sbin/setkey/setkey.8 Sun Apr 9 15:17:55 2017 (r316657) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 5, 2017 +.Dd April 9, 2017 .Dt SETKEY 8 .Os .\" @@ -290,12 +290,13 @@ The default value is .Li any . .\" .It Fl r Ar size -Specify window size of bytes for replay prevention. +Specify the bitmap size in octets of the anti-replay window. .Ar size -must be decimal number in 32-bit word. +is a 32-bit unsigned integer, and its value is one eighth of the +anti-replay window size in packets. If .Ar size -is zero or not specified, replay check does not take place. +is zero or not specified, an anti-replay check does not take place. .\" .It Fl u Ar id Specify the identifier of the policy entry in SPD. From owner-svn-src-head@freebsd.org Sun Apr 9 15:27:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0DAAED35840; Sun, 9 Apr 2017 15:27:06 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C66E01CB; Sun, 9 Apr 2017 15:27:05 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v39FR4k7002724; Sun, 9 Apr 2017 15:27:04 GMT (envelope-from avatar@FreeBSD.org) Received: (from avatar@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v39FR4O2002722; Sun, 9 Apr 2017 15:27:04 GMT (envelope-from avatar@FreeBSD.org) Message-Id: <201704091527.v39FR4O2002722@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avatar set sender to avatar@FreeBSD.org using -f From: Tai-hwa Liang Date: Sun, 9 Apr 2017 15:27:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316658 - head/sys/compat/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Apr 2017 15:27:06 -0000 Author: avatar Date: Sun Apr 9 15:27:04 2017 New Revision: 316658 URL: https://svnweb.freebsd.org/changeset/base/316658 Log: Adding SIOCGIFNAME support in Linuxulator. This should silence the console warning associated with linux-opera: linux: pid 23492 (opera): ioctl fd=5, cmd=0x8910 ('\M^I',16) is not implemented linux: pid 23492 (opera): ioctl fd=28, cmd=0x8910 ('\M^I',16) is not implemented ... Reviewed by: kib, marcel, dchagin Tested with: linux-opera-12.16_3 MFC after: 1 month Modified: head/sys/compat/linux/linux_ioctl.c head/sys/compat/linux/linux_ioctl.h Modified: head/sys/compat/linux/linux_ioctl.c ============================================================================== --- head/sys/compat/linux/linux_ioctl.c Sun Apr 9 15:17:55 2017 (r316657) +++ head/sys/compat/linux/linux_ioctl.c Sun Apr 9 15:27:04 2017 (r316658) @@ -2167,6 +2167,49 @@ ifname_linux_to_bsd(struct thread *td, c } /* + * Implement the SIOCGIFNAME ioctl + */ + +static int +linux_ioctl_ifname(struct thread *td, struct l_ifreq *uifr) +{ + struct l_ifreq ifr; + struct ifnet *ifp; + int error, ethno, index; + + error = copyin(uifr, &ifr, sizeof(ifr)); + if (error != 0) + return (error); + + CURVNET_SET(TD_TO_VNET(curthread)); + IFNET_RLOCK(); + index = 1; /* ifr.ifr_ifindex starts from 1 */ + ethno = 0; + error = ENODEV; + TAILQ_FOREACH(ifp, &V_ifnet, if_link) { + if (ifr.ifr_ifindex == index) { + if (IFP_IS_ETH(ifp)) + snprintf(ifr.ifr_name, LINUX_IFNAMSIZ, + "eth%d", ethno); + else + strlcpy(ifr.ifr_name, ifp->if_xname, + LINUX_IFNAMSIZ); + error = 0; + break; + } + if (IFP_IS_ETH(ifp)) + ethno++; + index++; + } + IFNET_RUNLOCK(); + if (error == 0) + error = copyout(&ifr, uifr, sizeof(ifr)); + CURVNET_RESTORE(); + + return (error); +} + +/* * Implement the SIOCGIFCONF ioctl */ @@ -2393,6 +2436,7 @@ linux_ioctl_socket(struct thread *td, st case LINUX_SIOCADDMULTI: case LINUX_SIOCATMARK: case LINUX_SIOCDELMULTI: + case LINUX_SIOCGIFNAME: case LINUX_SIOCGIFCONF: case LINUX_SIOCGPGRP: case LINUX_SIOCSPGRP: @@ -2478,6 +2522,10 @@ linux_ioctl_socket(struct thread *td, st /* LINUX_SIOCGSTAMP */ + case LINUX_SIOCGIFNAME: + error = linux_ioctl_ifname(td, (struct l_ifreq *)args->arg); + break; + case LINUX_SIOCGIFCONF: error = linux_ifconf(td, (struct ifconf *)args->arg); break; Modified: head/sys/compat/linux/linux_ioctl.h ============================================================================== --- head/sys/compat/linux/linux_ioctl.h Sun Apr 9 15:17:55 2017 (r316657) +++ head/sys/compat/linux/linux_ioctl.h Sun Apr 9 15:27:04 2017 (r316658) @@ -226,6 +226,7 @@ #define LINUX_SIOCGPGRP 0x8904 #define LINUX_SIOCATMARK 0x8905 #define LINUX_SIOCGSTAMP 0x8906 +#define LINUX_SIOCGIFNAME 0x8910 #define LINUX_SIOCGIFCONF 0x8912 #define LINUX_SIOCGIFFLAGS 0x8913 #define LINUX_SIOCGIFADDR 0x8915 From owner-svn-src-head@freebsd.org Sun Apr 9 16:01:00 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2AB8D3680A; Sun, 9 Apr 2017 16:01:00 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C463B9D0; Sun, 9 Apr 2017 16:01:00 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id E09E57F65; Sun, 9 Apr 2017 16:00:59 +0000 (UTC) Date: Sun, 9 Apr 2017 16:00:59 +0000 From: Alexey Dokuchaev To: Cy Schubert Cc: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313495 - head/sys/kern Message-ID: <20170409160059.GA75974@FreeBSD.org> References: <201702092335.v19NZvSQ026869@repo.freebsd.org> <201702100521.v1A5LgfJ003611@slippy.cwsent.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201702100521.v1A5LgfJ003611@slippy.cwsent.com> User-Agent: Mutt/1.7.1 (2016-10-04) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Apr 2017 16:01:01 -0000 On Thu, Feb 09, 2017 at 09:21:42PM -0800, Cy Schubert wrote: > In message <201702092335.v19NZvSQ026869@repo.freebsd.org>, Konstantin > Belousov writes: > > New Revision: 313495 > > URL: https://svnweb.freebsd.org/changeset/base/313495 > > > > Log: > > ... > > Restructure the block in vn_open_vnode() which handles O_EXLOCK and > > O_SHLOCK open flags to make it easier to quit its execution earlier > > with an error. > > This broke dhclient. I've attached typescript output at the end of this > email. > > > @@ -376,20 +384,20 @@ vn_open_vnode(struct vnode *vp, int fmod > > * Ensure the vnode is still able to be opened for > > * writing after the lock has been obtained. > > */ > > - if (error == 0 && accmode & VWRITE) > > + if ((accmode & VWRITE) != 0) > > error = vn_writechk(vp); > > + break; > > + } Could it be related to this hunk? It unconditionally breaks out of the loop now (missing { } in that `if')? PVS-Studio trips at here: /usr/src/sys/kern/vfs_vnops.c:389:1: warning: V612 An unconditional 'break' within a loop. ./danfe From owner-svn-src-head@freebsd.org Sun Apr 9 18:31:35 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 072A4D36050; Sun, 9 Apr 2017 18:31:35 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD8941EA; Sun, 9 Apr 2017 18:31:34 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v39IVXPE079244; Sun, 9 Apr 2017 18:31:33 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v39IVX2D079243; Sun, 9 Apr 2017 18:31:33 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201704091831.v39IVX2D079243@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 9 Apr 2017 18:31:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316659 - head/sys/arm/freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Apr 2017 18:31:35 -0000 Author: ian Date: Sun Apr 9 18:31:33 2017 New Revision: 316659 URL: https://svnweb.freebsd.org/changeset/base/316659 Log: Remove some old interrupt handling workaround code from the pre-INTRNG days. At this point, INTRNG is not going away (the option may go away, but the code is not), so we no longer need code to support workarounds that handled the lack of INTRNG functionality. Modified: head/sys/arm/freescale/imx/imx6_machdep.c Modified: head/sys/arm/freescale/imx/imx6_machdep.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_machdep.c Sun Apr 9 15:27:04 2017 (r316658) +++ head/sys/arm/freescale/imx/imx6_machdep.c Sun Apr 9 18:31:33 2017 (r316659) @@ -54,49 +54,11 @@ __FBSDID("$FreeBSD$"); #include "platform_if.h" -static uint32_t gpio1_node; - static platform_attach_t imx6_attach; static platform_devmap_init_t imx6_devmap_init; static platform_late_init_t imx6_late_init; static platform_cpu_reset_t imx6_cpu_reset; -#ifndef INTRNG -/* - * Work around the linux workaround for imx6 erratum 006687, in which some - * ethernet interrupts don't go to the GPC and thus won't wake the system from - * Wait mode. We don't use Wait mode (which halts the GIC, leaving only GPC - * interrupts able to wake the system), so we don't experience the bug at all. - * The linux workaround is to reconfigure GPIO1_6 as the ENET interrupt by - * writing magic values to an undocumented IOMUX register, then letting the gpio - * interrupt driver notify the ethernet driver. We'll be able to do all that - * (even though we don't need to) once the INTRNG project is committed and the - * imx_gpio driver becomes an interrupt driver. Until then, this crazy little - * workaround watches for requests to map an interrupt 6 with the interrupt - * controller node referring to gpio1, and it substitutes the proper ffec - * interrupt number. - */ -static int -imx6_decode_fdt(uint32_t iparent, uint32_t *intr, int *interrupt, - int *trig, int *pol) -{ - - if (fdt32_to_cpu(intr[0]) == 6 && - OF_node_from_xref(iparent) == gpio1_node) { - *interrupt = 150; - *trig = INTR_TRIGGER_CONFORM; - *pol = INTR_POLARITY_CONFORM; - return (0); - } - return (gic_decode_fdt(iparent, intr, interrupt, trig, pol)); -} - -fdt_pic_decode_t fdt_pic_table[] = { - &imx6_decode_fdt, - NULL -}; -#endif - /* * Fix FDT data related to interrupts. * @@ -184,10 +146,6 @@ imx6_late_init(platform_t plat) const uint32_t IMX6_WDOG_SR_PHYS = 0x020bc004; imx_wdog_init_last_reset(IMX6_WDOG_SR_PHYS); - - /* Cache the gpio1 node handle for imx6_decode_fdt() workaround code. */ - gpio1_node = OF_node_from_xref( - OF_finddevice("/soc/aips-bus@02000000/gpio@0209c000")); } /* From owner-svn-src-head@freebsd.org Sun Apr 9 20:41:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F0F7D36A1F; Sun, 9 Apr 2017 20:41:02 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB8F6EDE; Sun, 9 Apr 2017 20:41:01 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v39Kf1IV030324; Sun, 9 Apr 2017 20:41:01 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v39Kf1U4030323; Sun, 9 Apr 2017 20:41:01 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201704092041.v39Kf1U4030323@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 9 Apr 2017 20:41:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316661 - head/sys/arm/freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Apr 2017 20:41:02 -0000 Author: ian Date: Sun Apr 9 20:41:00 2017 New Revision: 316661 URL: https://svnweb.freebsd.org/changeset/base/316661 Log: Update the code that compensates for the lack of a GPC interrupt controller driver for imx6. Some newer dts source puts the GIC node at the root instead of under /soc, so look in both places. Also, sometimes the GIC node doesn't list itself as its own interrupt-parent, allow that too. Modified: head/sys/arm/freescale/imx/imx6_machdep.c Modified: head/sys/arm/freescale/imx/imx6_machdep.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_machdep.c Sun Apr 9 19:30:49 2017 (r316660) +++ head/sys/arm/freescale/imx/imx6_machdep.c Sun Apr 9 20:41:00 2017 (r316661) @@ -78,7 +78,7 @@ static platform_cpu_reset_t imx6_cpu_res * We validate that we have data that looks like we expect before changing it: * - SOC node exists and has GPC as its interrupt parent. * - GPC node exists and has GIC as its interrupt parent. - * - GIC node exists and is its own interrupt parent. + * - GIC node exists and is its own interrupt parent or has no parent. * * This applies to all models of imx6. Luckily all of them have the devices * involved at the same addresses on the same buses, so we don't need any @@ -102,14 +102,20 @@ fix_fdt_interrupt_data(void) if (result <= 0) return; + /* GIC node may be child of soc node, or appear directly at root. */ gicnode = OF_finddevice("/soc/interrupt-controller@00a01000"); + if (gicnode == -1) { + gicnode = OF_finddevice("/interrupt-controller@00a01000"); if (gicnode == -1) return; + } + gicxref = OF_xref_from_node(gicnode); + + /* If gic node has no parent, pretend it is its own parent. */ result = OF_getencprop(gicnode, "interrupt-parent", &gicipar, sizeof(gicipar)); if (result <= 0) - return; - gicxref = OF_xref_from_node(gicnode); + gicipar = gicxref; gpcnode = OF_finddevice("/soc/aips-bus@02000000/gpc@020dc000"); if (gpcnode == -1) From owner-svn-src-head@freebsd.org Sun Apr 9 20:59:13 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACD96D36E73; Sun, 9 Apr 2017 20:59:13 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C4A718EC; Sun, 9 Apr 2017 20:59:13 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v39KxCpl036389; Sun, 9 Apr 2017 20:59:12 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v39KxCsX036387; Sun, 9 Apr 2017 20:59:12 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201704092059.v39KxCsX036387@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 9 Apr 2017 20:59:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316664 - head/sys/arm/freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Apr 2017 20:59:13 -0000 Author: ian Date: Sun Apr 9 20:59:12 2017 New Revision: 316664 URL: https://svnweb.freebsd.org/changeset/base/316664 Log: Add code/constants for detecting imx6ul (ultralite) chips, a species of imx6 based on a single cortex-a7 core. Other changes to imx6 drivers and support code are needed to fully support the imx6ul. Also fix an indentation glitch committed in the prior change. Modified: head/sys/arm/freescale/imx/imx6_machdep.c head/sys/arm/freescale/imx/imx_machdep.h Modified: head/sys/arm/freescale/imx/imx6_machdep.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_machdep.c Sun Apr 9 20:54:33 2017 (r316663) +++ head/sys/arm/freescale/imx/imx6_machdep.c Sun Apr 9 20:59:12 2017 (r316664) @@ -106,8 +106,8 @@ fix_fdt_interrupt_data(void) gicnode = OF_finddevice("/soc/interrupt-controller@00a01000"); if (gicnode == -1) { gicnode = OF_finddevice("/interrupt-controller@00a01000"); - if (gicnode == -1) - return; + if (gicnode == -1) + return; } gicxref = OF_xref_from_node(gicnode); @@ -234,6 +234,7 @@ imx_soc_type(void) #define HWSOC_MX6DL 0x61 #define HWSOC_MX6SOLO 0x62 #define HWSOC_MX6Q 0x63 +#define HWSOC_MX6UL 0x64 if (soctype != 0) return (soctype); @@ -272,6 +273,9 @@ imx_soc_type(void) case HWSOC_MX6Q : soctype = IMXSOC_6Q; break; + case HWSOC_MX6UL: + soctype = IMXSOC_6UL; + break; default: printf("imx_soc_type: Don't understand hwsoc 0x%02x, " "digprog 0x%08x; assuming IMXSOC_6Q\n", hwsoc, digprog); @@ -323,3 +327,4 @@ static platform_method_t imx6_methods[] FDT_PLATFORM_DEF2(imx6, imx6s, "i.MX6 Solo", 0, "fsl,imx6s", 0); FDT_PLATFORM_DEF2(imx6, imx6d, "i.MX6 Dual", 0, "fsl,imx6dl", 0); FDT_PLATFORM_DEF2(imx6, imx6q, "i.MX6 Quad", 0, "fsl,imx6q", 0); +FDT_PLATFORM_DEF2(imx6, imx6ul, "i.MX6 UltraLite", 0, "fsl,imx6ul", 0); Modified: head/sys/arm/freescale/imx/imx_machdep.h ============================================================================== --- head/sys/arm/freescale/imx/imx_machdep.h Sun Apr 9 20:54:33 2017 (r316663) +++ head/sys/arm/freescale/imx/imx_machdep.h Sun Apr 9 20:59:12 2017 (r316664) @@ -55,6 +55,7 @@ void imx_wdog_init_last_reset(vm_offset_ #define IMXSOC_6DL 0x61000000 #define IMXSOC_6S 0x62000000 #define IMXSOC_6Q 0x63000000 +#define IMXSOC_6UL 0x64000000 #define IMXSOC_FAMSHIFT 28 u_int imx_soc_type(void); From owner-svn-src-head@freebsd.org Sun Apr 9 21:02:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 071FBD3661E; Sun, 9 Apr 2017 21:02:07 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6611401; Sun, 9 Apr 2017 21:02:06 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v39L25o3040069; Sun, 9 Apr 2017 21:02:05 GMT (envelope-from cognet@FreeBSD.org) Received: (from cognet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v39L25oh040066; Sun, 9 Apr 2017 21:02:05 GMT (envelope-from cognet@FreeBSD.org) Message-Id: <201704092102.v39L25oh040066@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cognet set sender to cognet@FreeBSD.org using -f From: Olivier Houchard Date: Sun, 9 Apr 2017 21:02:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316665 - in head/sys: compat/linuxkpi/common/src contrib/ck/include contrib/ck/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Apr 2017 21:02:07 -0000 Author: cognet Date: Sun Apr 9 21:02:05 2017 New Revision: 316665 URL: https://svnweb.freebsd.org/changeset/base/316665 Log: Import CK as of commit 6b141c0bdd21ce8b3e14147af8f87f22b20ecf32 This brings us changes we needed in ck_epoch. Modified: head/sys/compat/linuxkpi/common/src/linux_rcu.c head/sys/contrib/ck/include/ck_epoch.h head/sys/contrib/ck/src/ck_epoch.c Modified: head/sys/compat/linuxkpi/common/src/linux_rcu.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_rcu.c Sun Apr 9 20:59:12 2017 (r316664) +++ head/sys/compat/linuxkpi/common/src/linux_rcu.c Sun Apr 9 21:02:05 2017 (r316665) @@ -105,7 +105,7 @@ linux_rcu_runtime_init(void *arg __unuse ck_epoch_record_t *record; record = malloc(sizeof(*record), M_LRCU, M_WAITOK | M_ZERO); - ck_epoch_register(&linux_epoch, record); + ck_epoch_register(&linux_epoch, record, NULL); DPCPU_ID_SET(i, linux_reader_epoch_record, record); } @@ -116,7 +116,7 @@ linux_rcu_runtime_init(void *arg __unuse record = malloc(sizeof(*record), M_LRCU, M_WAITOK | M_ZERO); - ck_epoch_register(&linux_epoch, &record->epoch_record); + ck_epoch_register(&linux_epoch, &record->epoch_record, NULL); mtx_init(&record->head_lock, "LRCU-HEAD", NULL, MTX_DEF); mtx_init(&record->sync_lock, "LRCU-SYNC", NULL, MTX_DEF); TASK_INIT(&record->task, 0, linux_rcu_cleaner_func, record); @@ -170,14 +170,14 @@ linux_srcu_get_record(void) * NOTE: The only records that are unregistered and can be * recycled are srcu_epoch_records. */ - record = (struct srcu_epoch_record *)ck_epoch_recycle(&linux_epoch); + record = (struct srcu_epoch_record *)ck_epoch_recycle(&linux_epoch, NULL); if (__predict_true(record != NULL)) return (record); record = malloc(sizeof(*record), M_LRCU, M_WAITOK | M_ZERO); mtx_init(&record->read_lock, "SRCU-READ", NULL, MTX_DEF | MTX_NOWITNESS); mtx_init(&record->sync_lock, "SRCU-SYNC", NULL, MTX_DEF | MTX_NOWITNESS); - ck_epoch_register(&linux_epoch, &record->epoch_record); + ck_epoch_register(&linux_epoch, &record->epoch_record, NULL); return (record); } Modified: head/sys/contrib/ck/include/ck_epoch.h ============================================================================== --- head/sys/contrib/ck/include/ck_epoch.h Sun Apr 9 20:59:12 2017 (r316664) +++ head/sys/contrib/ck/include/ck_epoch.h Sun Apr 9 21:02:05 2017 (r316665) @@ -83,6 +83,7 @@ struct ck_epoch_ref { }; struct ck_epoch_record { + ck_stack_entry_t record_next; struct ck_epoch *global; unsigned int state; unsigned int epoch; @@ -92,17 +93,16 @@ struct ck_epoch_record { } local CK_CC_CACHELINE; unsigned int n_pending; unsigned int n_peak; - unsigned long n_dispatch; + unsigned int n_dispatch; + void *ct; ck_stack_t pending[CK_EPOCH_LENGTH]; - ck_stack_entry_t record_next; } CK_CC_CACHELINE; typedef struct ck_epoch_record ck_epoch_record_t; struct ck_epoch { unsigned int epoch; - char pad[CK_MD_CACHELINE - sizeof(unsigned int)]; - ck_stack_t records; unsigned int n_free; + ck_stack_t records; }; typedef struct ck_epoch ck_epoch_t; @@ -110,7 +110,14 @@ typedef struct ck_epoch ck_epoch_t; * Internal functions. */ void _ck_epoch_addref(ck_epoch_record_t *, ck_epoch_section_t *); -void _ck_epoch_delref(ck_epoch_record_t *, ck_epoch_section_t *); +bool _ck_epoch_delref(ck_epoch_record_t *, ck_epoch_section_t *); + +CK_CC_FORCE_INLINE static void * +ck_epoch_record_ct(const ck_epoch_record_t *record) +{ + + return ck_pr_load_ptr(&record->ct); +} /* * Marks the beginning of an epoch-protected section. @@ -160,9 +167,10 @@ ck_epoch_begin(ck_epoch_record_t *record } /* - * Marks the end of an epoch-protected section. + * Marks the end of an epoch-protected section. Returns true if no more + * sections exist for the caller. */ -CK_CC_FORCE_INLINE static void +CK_CC_FORCE_INLINE static bool ck_epoch_end(ck_epoch_record_t *record, ck_epoch_section_t *section) { @@ -170,15 +178,19 @@ ck_epoch_end(ck_epoch_record_t *record, ck_pr_store_uint(&record->active, record->active - 1); if (section != NULL) - _ck_epoch_delref(record, section); + return _ck_epoch_delref(record, section); - return; + return record->active == 0; } /* * Defers the execution of the function pointed to by the "cb" * argument until an epoch counter loop. This allows for a * non-blocking deferral. + * + * We can get away without a fence here due to the monotonic nature + * of the epoch counter. Worst case, this will result in some delays + * before object destruction. */ CK_CC_FORCE_INLINE static void ck_epoch_call(ck_epoch_record_t *record, @@ -195,13 +207,74 @@ ck_epoch_call(ck_epoch_record_t *record, return; } +/* + * Same as ck_epoch_call, but allows for records to be shared and is reentrant. + */ +CK_CC_FORCE_INLINE static void +ck_epoch_call_strict(ck_epoch_record_t *record, + ck_epoch_entry_t *entry, + ck_epoch_cb_t *function) +{ + struct ck_epoch *epoch = record->global; + unsigned int e = ck_pr_load_uint(&epoch->epoch); + unsigned int offset = e & (CK_EPOCH_LENGTH - 1); + + ck_pr_inc_uint(&record->n_pending); + entry->function = function; + + /* Store fence is implied by push operation. */ + ck_stack_push_upmc(&record->pending[offset], &entry->stack_entry); + return; +} + +/* + * This callback is used for synchronize_wait to allow for custom blocking + * behavior. + */ +typedef void ck_epoch_wait_cb_t(ck_epoch_t *, ck_epoch_record_t *, + void *); + +/* + * Return latest epoch value. This operation provides load ordering. + */ +CK_CC_FORCE_INLINE static unsigned int +ck_epoch_value(const ck_epoch_t *ep) +{ + + ck_pr_fence_load(); + return ck_pr_load_uint(&ep->epoch); +} + void ck_epoch_init(ck_epoch_t *); -ck_epoch_record_t *ck_epoch_recycle(ck_epoch_t *); -void ck_epoch_register(ck_epoch_t *, ck_epoch_record_t *); + +/* + * Attempts to recycle an unused epoch record. If one is successfully + * allocated, the record context pointer is also updated. + */ +ck_epoch_record_t *ck_epoch_recycle(ck_epoch_t *, void *); + +/* + * Registers an epoch record. An optional context pointer may be passed that + * is retrievable with ck_epoch_record_ct. + */ +void ck_epoch_register(ck_epoch_t *, ck_epoch_record_t *, void *); + +/* + * Marks a record as available for re-use by a subsequent recycle operation. + * Note that the record cannot be physically destroyed. + */ void ck_epoch_unregister(ck_epoch_record_t *); + bool ck_epoch_poll(ck_epoch_record_t *); void ck_epoch_synchronize(ck_epoch_record_t *); +void ck_epoch_synchronize_wait(ck_epoch_t *, ck_epoch_wait_cb_t *, void *); void ck_epoch_barrier(ck_epoch_record_t *); +void ck_epoch_barrier_wait(ck_epoch_record_t *, ck_epoch_wait_cb_t *, void *); + +/* + * Reclaim entries associated with a record. This is safe to call only on + * the caller's record or records that are using call_strict. + */ void ck_epoch_reclaim(ck_epoch_record_t *); #endif /* CK_EPOCH_H */ Modified: head/sys/contrib/ck/src/ck_epoch.c ============================================================================== --- head/sys/contrib/ck/src/ck_epoch.c Sun Apr 9 20:59:12 2017 (r316664) +++ head/sys/contrib/ck/src/ck_epoch.c Sun Apr 9 21:02:05 2017 (r316665) @@ -139,7 +139,7 @@ CK_STACK_CONTAINER(struct ck_epoch_entry #define CK_EPOCH_SENSE_MASK (CK_EPOCH_SENSE - 1) -void +bool _ck_epoch_delref(struct ck_epoch_record *record, struct ck_epoch_section *section) { @@ -150,7 +150,7 @@ _ck_epoch_delref(struct ck_epoch_record current->count--; if (current->count > 0) - return; + return false; /* * If the current bucket no longer has any references, then @@ -161,8 +161,7 @@ _ck_epoch_delref(struct ck_epoch_record * If no other active bucket exists, then the record will go * inactive in order to allow for forward progress. */ - other = &record->local.bucket[(i + 1) & - CK_EPOCH_SENSE_MASK]; + other = &record->local.bucket[(i + 1) & CK_EPOCH_SENSE_MASK]; if (other->count > 0 && ((int)(current->epoch - other->epoch) < 0)) { /* @@ -172,7 +171,7 @@ _ck_epoch_delref(struct ck_epoch_record ck_pr_store_uint(&record->epoch, other->epoch); } - return; + return true; } void @@ -230,7 +229,7 @@ ck_epoch_init(struct ck_epoch *global) } struct ck_epoch_record * -ck_epoch_recycle(struct ck_epoch *global) +ck_epoch_recycle(struct ck_epoch *global, void *ct) { struct ck_epoch_record *record; ck_stack_entry_t *cursor; @@ -249,6 +248,12 @@ ck_epoch_recycle(struct ck_epoch *global CK_EPOCH_STATE_USED); if (state == CK_EPOCH_STATE_FREE) { ck_pr_dec_uint(&global->n_free); + ck_pr_store_ptr(&record->ct, ct); + + /* + * The context pointer is ordered by a + * subsequent protected section. + */ return record; } } @@ -258,7 +263,8 @@ ck_epoch_recycle(struct ck_epoch *global } void -ck_epoch_register(struct ck_epoch *global, struct ck_epoch_record *record) +ck_epoch_register(struct ck_epoch *global, struct ck_epoch_record *record, + void *ct) { size_t i; @@ -269,6 +275,7 @@ ck_epoch_register(struct ck_epoch *globa record->n_dispatch = 0; record->n_peak = 0; record->n_pending = 0; + record->ct = ct; memset(&record->local, 0, sizeof record->local); for (i = 0; i < CK_EPOCH_LENGTH; i++) @@ -295,6 +302,7 @@ ck_epoch_unregister(struct ck_epoch_reco for (i = 0; i < CK_EPOCH_LENGTH; i++) ck_stack_init(&record->pending[i]); + ck_pr_store_ptr(&record->ct, NULL); ck_pr_fence_store(); ck_pr_store_uint(&record->state, CK_EPOCH_STATE_FREE); ck_pr_inc_uint(&global->n_free); @@ -345,11 +353,10 @@ ck_epoch_dispatch(struct ck_epoch_record { unsigned int epoch = e & (CK_EPOCH_LENGTH - 1); ck_stack_entry_t *head, *next, *cursor; + unsigned int n_pending, n_peak; unsigned int i = 0; - head = CK_STACK_FIRST(&record->pending[epoch]); - ck_stack_init(&record->pending[epoch]); - + head = ck_stack_batch_pop_upmc(&record->pending[epoch]); for (cursor = head; cursor != NULL; cursor = next) { struct ck_epoch_entry *entry = ck_epoch_entry_container(cursor); @@ -359,11 +366,18 @@ ck_epoch_dispatch(struct ck_epoch_record i++; } - if (record->n_pending > record->n_peak) - record->n_peak = record->n_pending; + n_peak = ck_pr_load_uint(&record->n_peak); + n_pending = ck_pr_load_uint(&record->n_pending); + + /* We don't require accuracy around peak calculation. */ + if (n_pending > n_peak) + ck_pr_store_uint(&record->n_peak, n_peak); + + if (i > 0) { + ck_pr_add_uint(&record->n_dispatch, i); + ck_pr_sub_uint(&record->n_pending, i); + } - record->n_dispatch += i; - record->n_pending -= i; return; } @@ -381,13 +395,24 @@ ck_epoch_reclaim(struct ck_epoch_record return; } +CK_CC_FORCE_INLINE static void +epoch_block(struct ck_epoch *global, struct ck_epoch_record *cr, + ck_epoch_wait_cb_t *cb, void *ct) +{ + + if (cb != NULL) + cb(global, cr, ct); + + return; +} + /* * This function must not be called with-in read section. */ void -ck_epoch_synchronize(struct ck_epoch_record *record) +ck_epoch_synchronize_wait(struct ck_epoch *global, + ck_epoch_wait_cb_t *cb, void *ct) { - struct ck_epoch *global = record->global; struct ck_epoch_record *cr; unsigned int delta, epoch, goal, i; bool active; @@ -424,10 +449,27 @@ ck_epoch_synchronize(struct ck_epoch_rec * period. */ e_d = ck_pr_load_uint(&global->epoch); - if (e_d != delta) { - delta = e_d; - goto reload; + if (e_d == delta) { + epoch_block(global, cr, cb, ct); + continue; } + + /* + * If the epoch has been updated, we may have already + * met our goal. + */ + delta = e_d; + if ((goal > epoch) & (delta >= goal)) + goto leave; + + epoch_block(global, cr, cb, ct); + + /* + * If the epoch has been updated, then a grace period + * requires that all threads are observed idle at the + * same epoch. + */ + cr = NULL; } /* @@ -459,20 +501,6 @@ ck_epoch_synchronize(struct ck_epoch_rec * Otherwise, we have just acquired latest snapshot. */ delta = delta + r; - continue; - -reload: - if ((goal > epoch) & (delta >= goal)) { - /* - * Right now, epoch overflow is handled as an edge - * case. If we have already observed an epoch - * generation, then we can be sure no hazardous - * references exist to objects from this generation. We - * can actually avoid an addtional scan step at this - * point. - */ - break; - } } /* @@ -480,8 +508,16 @@ reload: * However, if non-temporal instructions are used, full barrier * semantics are necessary. */ +leave: ck_pr_fence_memory(); - record->epoch = delta; + return; +} + +void +ck_epoch_synchronize(struct ck_epoch_record *record) +{ + + ck_epoch_synchronize_wait(record->global, NULL, NULL); return; } @@ -494,6 +530,16 @@ ck_epoch_barrier(struct ck_epoch_record return; } +void +ck_epoch_barrier_wait(struct ck_epoch_record *record, ck_epoch_wait_cb_t *cb, + void *ct) +{ + + ck_epoch_synchronize_wait(record->global, cb, ct); + ck_epoch_reclaim(record); + return; +} + /* * It may be worth it to actually apply these deferral semantics to an epoch * that was observed at ck_epoch_call time. The problem is that the latter @@ -509,7 +555,6 @@ ck_epoch_poll(struct ck_epoch_record *re { bool active; unsigned int epoch; - unsigned int snapshot; struct ck_epoch_record *cr = NULL; struct ck_epoch *global = record->global; @@ -533,12 +578,7 @@ ck_epoch_poll(struct ck_epoch_record *re } /* If an active thread exists, rely on epoch observation. */ - if (ck_pr_cas_uint_value(&global->epoch, epoch, epoch + 1, - &snapshot) == false) { - record->epoch = snapshot; - } else { - record->epoch = epoch + 1; - } + (void)ck_pr_cas_uint(&global->epoch, epoch, epoch + 1); ck_epoch_dispatch(record, epoch + 1); return true; From owner-svn-src-head@freebsd.org Sun Apr 9 21:06:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA181D36901; Sun, 9 Apr 2017 21:06:22 +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 9A5819BB; Sun, 9 Apr 2017 21:06:22 +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 v39L6L3F040241; Sun, 9 Apr 2017 21:06:21 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v39L6L6g040240; Sun, 9 Apr 2017 21:06:21 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201704092106.v39L6L6g040240@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 9 Apr 2017 21:06:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316666 - head/sys/fs/nfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Apr 2017 21:06:22 -0000 Author: rmacklem Date: Sun Apr 9 21:06:21 2017 New Revision: 316666 URL: https://svnweb.freebsd.org/changeset/base/316666 Log: Fix the NFSv4.1 client for NFSERR_BADSESSION recovery via ReclaimComplete. For the ReclaimComplete operation, the RPC layer should not loop on NFSERR_BADSESSION. If it does, the recovery thread (nfscl) can get stuck looping and will not do a recovery. This patch fixes it so it does not loop. This bug only affects NFSv4.1 and only when a server reboots. Tested by: cperciva PR: 215886 MFC after: 2 weeks Modified: head/sys/fs/nfs/nfs_commonsubs.c Modified: head/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- head/sys/fs/nfs/nfs_commonsubs.c Sun Apr 9 21:02:05 2017 (r316665) +++ head/sys/fs/nfs/nfs_commonsubs.c Sun Apr 9 21:06:21 2017 (r316666) @@ -148,7 +148,7 @@ struct nfsv4_opflag nfsv4_opflag[NFSV41_ { 0, 0, 0, 0, LK_EXCLUSIVE, 1, 1 }, /* Test StateID */ { 0, 0, 0, 0, LK_EXCLUSIVE, 1, 1 }, /* Want Delegation */ { 0, 0, 0, 0, LK_EXCLUSIVE, 0, 0 }, /* Destroy ClientID */ - { 0, 0, 0, 0, LK_EXCLUSIVE, 1, 1 }, /* Reclaim Complete */ + { 0, 0, 0, 0, LK_EXCLUSIVE, 1, 0 }, /* Reclaim Complete */ }; #endif /* !APPLEKEXT */ From owner-svn-src-head@freebsd.org Sun Apr 9 21:50:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2BABD362DA; Sun, 9 Apr 2017 21:50:22 +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 949BEECF; Sun, 9 Apr 2017 21:50:22 +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 v39LoLMd056729; Sun, 9 Apr 2017 21:50:21 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v39LoLw3056728; Sun, 9 Apr 2017 21:50:21 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201704092150.v39LoLw3056728@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 9 Apr 2017 21:50:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316667 - head/sys/fs/nfsclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Apr 2017 21:50:22 -0000 Author: rmacklem Date: Sun Apr 9 21:50:21 2017 New Revision: 316667 URL: https://svnweb.freebsd.org/changeset/base/316667 Log: Fix the NFSv4 client hndling of a stale write verifier in the Commit operation. When the NFSv4 client Commit operation encountered a stale write verifier, it erroneously mapped that to EIO. This could have caused recently written data to be lost when a server crashes/reboots between an UNSTABLE write and the subsequent commit. This patch fixes this. The bug was only for the NFSv4 client and did not affect NFSv3. Tested by: cperciva PR: 215887 MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clport.c Modified: head/sys/fs/nfsclient/nfs_clport.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clport.c Sun Apr 9 21:06:21 2017 (r316666) +++ head/sys/fs/nfsclient/nfs_clport.c Sun Apr 9 21:50:21 2017 (r316667) @@ -1196,7 +1196,7 @@ nfscl_maperr(struct thread *td, int erro { struct proc *p; - if (error < 10000) + if (error < 10000 || error >= NFSERR_STALEWRITEVERF) return (error); if (td != NULL) p = td->td_proc; From owner-svn-src-head@freebsd.org Sun Apr 9 22:57:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3E76D36723; Sun, 9 Apr 2017 22:57:54 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) (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 380AF877; Sun, 9 Apr 2017 22:57:53 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-wm0-f47.google.com with SMTP id u2so25021981wmu.0; Sun, 09 Apr 2017 15:57:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=yYKoNSmFexX0HaiB2Lgbo6BaghpvWD/OU8AK+xKzRMM=; b=ANtUMmva4lK3texLdGyNpvjlMmO+BWupSNTWn4dK24Pr7YzavbVmg2X2n485PGPSkL D/c1fHHo23a/XnVPbvnuQGYU0wS2ERvwMqC6mWPiMQHR1BW3rk/0xNJS3cDf8vk0c+32 lU7hL7g89QNJuzZ7UswXKfm0WQHFrAApCA8StCaJKA1d6RYzcRnWGXTylTAr3dD2q/SW jgrX+ldeprOwS1fDRx1Kzj8yG8d6+Ygx1BEs8Ru06aV2r6YNOKsKjkd6mtkxd4eVDvEx Y52sz+ucb/O/9WMQRW8CCt3//TtOk2XlLuWgCV902SWcGYW0qFaIKSc11qgGQWx3xXAX ad3Q== X-Gm-Message-State: AN3rC/6l+cGPZXImoqZ8ExsAsfKbqqctU467lsHoEphUvGwcaaeGIu1e dOIMv8d6mfeQ/A== X-Received: by 10.28.132.144 with SMTP id g138mr7788748wmd.51.1491778199300; Sun, 09 Apr 2017 15:49:59 -0700 (PDT) Received: from mail-wr0-f179.google.com (mail-wr0-f179.google.com. [209.85.128.179]) by smtp.gmail.com with ESMTPSA id p38sm15026705wrb.31.2017.04.09.15.49.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Apr 2017 15:49:58 -0700 (PDT) Received: by mail-wr0-f179.google.com with SMTP id o21so109482300wrb.2; Sun, 09 Apr 2017 15:49:58 -0700 (PDT) X-Received: by 10.223.160.239 with SMTP id n44mr46177036wrn.198.1491778198378; Sun, 09 Apr 2017 15:49:58 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.80.169.4 with HTTP; Sun, 9 Apr 2017 15:49:57 -0700 (PDT) In-Reply-To: <201704092102.v39L25oh040066@repo.freebsd.org> References: <201704092102.v39L25oh040066@repo.freebsd.org> From: Conrad Meyer Date: Sun, 9 Apr 2017 15:49:57 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r316665 - in head/sys: compat/linuxkpi/common/src contrib/ck/include contrib/ck/src To: Olivier Houchard Cc: 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Apr 2017 22:57:54 -0000 On Sun, Apr 9, 2017 at 2:02 PM, Olivier Houchard wrote= : > Author: cognet > Date: Sun Apr 9 21:02:05 2017 > New Revision: 316665 > URL: https://svnweb.freebsd.org/changeset/base/316665 > > Log: > Import CK as of commit 6b141c0bdd21ce8b3e14147af8f87f22b20ecf32 > This brings us changes we needed in ck_epoch. Out of curiosity =E2=80=94 what changes did we need, and why? Thanks, Conrad From owner-svn-src-head@freebsd.org Sun Apr 9 23:08:49 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0B518D36A3E; Sun, 9 Apr 2017 23:08:49 +0000 (UTC) (envelope-from cognet@ci0.org) Received: from kanar.ci0.org (kanar.ci0.org [IPv6:2001:bc8:35e6::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "sd-123398", Issuer "sd-123398" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 9D3D3D7B; Sun, 9 Apr 2017 23:08:48 +0000 (UTC) (envelope-from cognet@ci0.org) Received: from kanar.ci0.org (pluxor@localhost [127.0.0.1]) by kanar.ci0.org (8.15.2/8.15.2) with ESMTPS id v39N8eZp090370 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 10 Apr 2017 01:08:40 +0200 (CEST) (envelope-from cognet@ci0.org) Received: (from doginou@localhost) by kanar.ci0.org (8.15.2/8.15.2/Submit) id v39N8efJ090369; Mon, 10 Apr 2017 01:08:40 +0200 (CEST) (envelope-from cognet@ci0.org) X-Authentication-Warning: kanar.ci0.org: doginou set sender to cognet@ci0.org using -f Date: Mon, 10 Apr 2017 01:08:40 +0200 From: Olivier Houchard To: Conrad Meyer Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r316665 - in head/sys: compat/linuxkpi/common/src contrib/ck/include contrib/ck/src Message-ID: <20170409230840.GA90254@ci0.org> References: <201704092102.v39L25oh040066@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.0 (2017-02-23) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Apr 2017 23:08:49 -0000 On Sun, Apr 09, 2017 at 03:49:57PM -0700, Conrad Meyer wrote: > On Sun, Apr 9, 2017 at 2:02 PM, Olivier Houchard wrote: > > Author: cognet > > Date: Sun Apr 9 21:02:05 2017 > > New Revision: 316665 > > URL: https://svnweb.freebsd.org/changeset/base/316665 > > > > Log: > > Import CK as of commit 6b141c0bdd21ce8b3e14147af8f87f22b20ecf32 > > This brings us changes we needed in ck_epoch. > > Out of curiosity ??? what changes did we need, and why? > Hi Conrad, What ck_epoch lacked was any way to do priority propagation, which led to some nice deadlocks to the linuxkpi folks. Regards, Olivier From owner-svn-src-head@freebsd.org Mon Apr 10 01:28:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B878CD35671; Mon, 10 Apr 2017 01:28:02 +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 8A55A14A; Mon, 10 Apr 2017 01:28:02 +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 v3A1S1wI045658; Mon, 10 Apr 2017 01:28:01 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3A1S1b2045657; Mon, 10 Apr 2017 01:28:01 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201704100128.v3A1S1b2045657@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 10 Apr 2017 01:28:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316669 - head/sys/fs/nfsclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Apr 2017 01:28:02 -0000 Author: rmacklem Date: Mon Apr 10 01:28:01 2017 New Revision: 316669 URL: https://svnweb.freebsd.org/changeset/base/316669 Log: Avoid starvation of the server crash recovery thread for the NFSv4 client. This patch gives a requestor of the exclusive lock on the client state in the NFSv4 client priority over shared lock requestors. This avoids the server crash recovery thread being starved out by other threads doing RPCs. Tested by: cperciva PR: 216087 MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clstate.c Modified: head/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clstate.c Mon Apr 10 01:26:12 2017 (r316668) +++ head/sys/fs/nfsclient/nfs_clstate.c Mon Apr 10 01:28:01 2017 (r316669) @@ -797,8 +797,18 @@ nfscl_getcl(struct mount *mp, struct ucr (mp->mnt_kern_flag & MNTK_UNMOUNTF) == 0) igotlock = nfsv4_lock(&clp->nfsc_lock, 1, NULL, NFSCLSTATEMUTEXPTR, mp); - if (!igotlock) + if (igotlock == 0) { + /* + * Call nfsv4_lock() with "iwantlock == 0" so that it will + * wait for a pending exclusive lock request. This gives the + * exclusive lock request priority over this shared lock + * request. + * An exclusive lock on nfsc_lock is used mainly for server + * crash recoveries. + */ + nfsv4_lock(&clp->nfsc_lock, 0, NULL, NFSCLSTATEMUTEXPTR, mp); nfsv4_getref(&clp->nfsc_lock, NULL, NFSCLSTATEMUTEXPTR, mp); + } if (igotlock == 0 && (mp->mnt_kern_flag & MNTK_UNMOUNTF) != 0) { /* * Both nfsv4_lock() and nfsv4_getref() know to check From owner-svn-src-head@freebsd.org Mon Apr 10 02:46:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86E09D32E2A; Mon, 10 Apr 2017 02:46:40 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 58E61B8D; Mon, 10 Apr 2017 02:46:40 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3A2kdt2077668; Mon, 10 Apr 2017 02:46:39 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3A2kdUH077667; Mon, 10 Apr 2017 02:46:39 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201704100246.v3A2kdUH077667@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 10 Apr 2017 02:46:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316670 - head/sys/arm/freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Apr 2017 02:46:40 -0000 Author: ian Date: Mon Apr 10 02:46:39 2017 New Revision: 316670 URL: https://svnweb.freebsd.org/changeset/base/316670 Log: Add support for imx6ul soc. Modified: head/sys/arm/freescale/imx/imx_iomux.c Modified: head/sys/arm/freescale/imx/imx_iomux.c ============================================================================== --- head/sys/arm/freescale/imx/imx_iomux.c Mon Apr 10 01:28:01 2017 (r316669) +++ head/sys/arm/freescale/imx/imx_iomux.c Mon Apr 10 02:46:39 2017 (r316670) @@ -79,6 +79,7 @@ static struct ofw_compat_data compat_dat {"fsl,imx6dl-iomuxc", true}, {"fsl,imx6q-iomuxc", true}, {"fsl,imx6sl-iomuxc", true}, + {"fsl,imx6ul-iomuxc", true}, {"fsl,imx6sx-iomuxc", true}, {"fsl,imx53-iomuxc", true}, {"fsl,imx51-iomuxc", true}, @@ -223,6 +224,9 @@ iomux_attach(device_t dev) case IMXSOC_6Q: sc->last_gpreg = 13; break; + case IMXSOC_6UL: + sc->last_gpreg = 14; + break; default: device_printf(dev, "Unknown SoC type\n"); return (ENXIO); From owner-svn-src-head@freebsd.org Mon Apr 10 06:19:11 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 389ECD3663F; Mon, 10 Apr 2017 06:19:11 +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 13E9EEA5; Mon, 10 Apr 2017 06:19:11 +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 v3A6JAFE064552; Mon, 10 Apr 2017 06:19:10 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3A6JAIu064550; Mon, 10 Apr 2017 06:19:10 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201704100619.v3A6JAIu064550@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Mon, 10 Apr 2017 06:19:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316675 - head/sys/dev/syscons X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Apr 2017 06:19:11 -0000 Author: bde Date: Mon Apr 10 06:19:09 2017 New Revision: 316675 URL: https://svnweb.freebsd.org/changeset/base/316675 Log: Special rendering methods for removing mouse cursors cannot be removed like I hoped, since they are needed for removing parts over the border. Continue fixing bugs in them. In the vga planar mode renderer, remove removal of the part of the image over the text window. This was hard-coded for nearly 8x16 fonts and in practice didn't remove enough for 8x8 fonts. This used the wrong attribute over cutmarked regions. The caller refreshes with the correct attribute later, so the attribute bug only caused flicker. The caller uses the same hard-coding, so the refreshes fix up all the spots with the wrong attribute, but keep missing the missed spots. This still gives trails of bits of cursors for cursor motions in the affected configurations (mainly depth 4 modes with 8x8) fonts. 8x14 fonts barely escape the problem since although the cursor is drawn as 16x16, its active part is only 9x13 and the active part fits in the hard-coded 2x2 character cell window for 8x14 fonts. 8x8 fonts need a 2x3 window. In the fb non-sparc64 renderer, the buggy image removal was buggier and was already avoided by returning before it. Remove it completely and fix nearby style bugs. It was essentially the same as for the vga planar mode renderer (obfuscated by swapping x and y). This was buggier since fb should handle more types of hardware so the hard-coding is wronger. The remaining fb image removal is also buggier. It never supported software cursors drawn into the border, and the hardware cursor is probably broken by other bugs to be fixed soon. Modified: head/sys/dev/syscons/scgfbrndr.c head/sys/dev/syscons/scvgarndr.c Modified: head/sys/dev/syscons/scgfbrndr.c ============================================================================== --- head/sys/dev/syscons/scgfbrndr.c Mon Apr 10 05:17:18 2017 (r316674) +++ head/sys/dev/syscons/scgfbrndr.c Mon Apr 10 06:19:09 2017 (r316675) @@ -335,28 +335,14 @@ static void gfb_mouse(scr_stat *scp, int x, int y, int on) { #ifdef __sparc64__ - vidd_putm(scp->sc->adp, x, y, mouse_pointer, - on ? 0xffffffff : 0x0, 22, 12); + vidd_putm(scp->sc->adp, x, y, mouse_pointer, + on ? 0xffffffff : 0x0, 22, 12); #else - int i, pos; - if (on) { - - /* Display the mouse pointer image... */ vidd_putm(scp->sc->adp, x, y, mouse_pointer, 0xffffffff, 16, 8); } else { - - /* - Erase the mouse cursor image by redrawing the text - underneath it... - */ - return; - pos = x*scp->xsize + y; - i = (y < scp->xsize - 1) ? 2 : 1; - (*scp->rndr->draw)(scp, pos, i, FALSE); - if (x < scp->ysize - 1) - (*scp->rndr->draw)(scp, pos + scp->xsize, i, FALSE); + /* XXX: removal is incomplete for h/w cursors and borders. */ } #endif } Modified: head/sys/dev/syscons/scvgarndr.c ============================================================================== --- head/sys/dev/syscons/scvgarndr.c Mon Apr 10 05:17:18 2017 (r316674) +++ head/sys/dev/syscons/scvgarndr.c Mon Apr 10 06:19:09 2017 (r316675) @@ -1101,21 +1101,16 @@ remove_pxlmouse_planar(scr_stat *scp, in { vm_offset_t p; int col, row; - int pos; int line_width; int ymax; int i; - /* erase the mouse cursor image */ + /* + * The caller will remove parts of the mouse image over the text + * window better than we can do. Remove only parts over the border. + */ col = x/8 - scp->xoff; row = y/scp->font_size - scp->yoff; - pos = row*scp->xsize + col; - i = (col < scp->xsize - 1) ? 2 : 1; - (*scp->rndr->draw)(scp, pos, i, FALSE); - if (row < scp->ysize - 1) - (*scp->rndr->draw)(scp, pos + scp->xsize, i, FALSE); - - /* paint border if necessary */ line_width = scp->sc->adp->va_line_width; outw(GDCIDX, 0x0005); /* read mode 0, write mode 0 */ outw(GDCIDX, 0x0003); /* data rotate/function select */ From owner-svn-src-head@freebsd.org Mon Apr 10 08:19:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F215D36581; Mon, 10 Apr 2017 08:19:37 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1BFCD1A6; Mon, 10 Apr 2017 08:19:37 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3A8Jaxa014537; Mon, 10 Apr 2017 08:19:36 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3A8JZCh014531; Mon, 10 Apr 2017 08:19:35 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201704100819.v3A8JZCh014531@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Mon, 10 Apr 2017 08:19:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316676 - in head/sys/netinet: . tcp_stacks X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Apr 2017 08:19:37 -0000 Author: smh Date: Mon Apr 10 08:19:35 2017 New Revision: 316676 URL: https://svnweb.freebsd.org/changeset/base/316676 Log: Use estimated RTT for receive buffer auto resizing instead of timestamps Switched from using timestamps to RTT estimates when performing TCP receive buffer auto resizing, as not all hosts support / enable TCP timestamps. Disabled reset of receive buffer auto scaling when not in bulk receive mode, which gives an extra 20% performance increase. Also extracted auto resizing to a common method shared between standard and fastpath modules. With this AWS S3 downloads at ~17ms latency on a 1Gbps connection jump from ~3MB/s to ~100MB/s using the default settings. Reviewed by: lstewart, gnn MFC after: 2 weeks Relnotes: Yes Sponsored by: Multiplay Differential Revision: https://reviews.freebsd.org/D9668 Modified: head/sys/netinet/in_kdtrace.c head/sys/netinet/in_kdtrace.h head/sys/netinet/tcp_input.c head/sys/netinet/tcp_output.c head/sys/netinet/tcp_stacks/fastpath.c head/sys/netinet/tcp_var.h Modified: head/sys/netinet/in_kdtrace.c ============================================================================== --- head/sys/netinet/in_kdtrace.c Mon Apr 10 06:19:09 2017 (r316675) +++ head/sys/netinet/in_kdtrace.c Mon Apr 10 08:19:35 2017 (r316676) @@ -132,6 +132,14 @@ SDT_PROBE_DEFINE6_XLATE(tcp, , , state__ "void *", "void *", "int", "tcplsinfo_t *"); +SDT_PROBE_DEFINE6_XLATE(tcp, , , receive__autoresize, + "void *", "void *", + "struct tcpcb *", "csinfo_t *", + "struct mbuf *", "ipinfo_t *", + "struct tcpcb *", "tcpsinfo_t *" , + "struct tcphdr *", "tcpinfoh_t *", + "int", "int"); + SDT_PROBE_DEFINE5_XLATE(udp, , , receive, "void *", "pktinfo_t *", "struct inpcb *", "csinfo_t *", Modified: head/sys/netinet/in_kdtrace.h ============================================================================== --- head/sys/netinet/in_kdtrace.h Mon Apr 10 06:19:09 2017 (r316675) +++ head/sys/netinet/in_kdtrace.h Mon Apr 10 08:19:35 2017 (r316676) @@ -65,6 +65,7 @@ SDT_PROBE_DECLARE(tcp, , , debug__input) SDT_PROBE_DECLARE(tcp, , , debug__output); SDT_PROBE_DECLARE(tcp, , , debug__user); SDT_PROBE_DECLARE(tcp, , , debug__drop); +SDT_PROBE_DECLARE(tcp, , , receive__autoresize); SDT_PROBE_DECLARE(udp, , , receive); SDT_PROBE_DECLARE(udp, , , send); Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Mon Apr 10 06:19:09 2017 (r316675) +++ head/sys/netinet/tcp_input.c Mon Apr 10 08:19:35 2017 (r316676) @@ -1486,6 +1486,68 @@ drop: return (IPPROTO_DONE); } +/* + * Automatic sizing of receive socket buffer. Often the send + * buffer size is not optimally adjusted to the actual network + * conditions at hand (delay bandwidth product). Setting the + * buffer size too small limits throughput on links with high + * bandwidth and high delay (eg. trans-continental/oceanic links). + * + * On the receive side the socket buffer memory is only rarely + * used to any significant extent. This allows us to be much + * more aggressive in scaling the receive socket buffer. For + * the case that the buffer space is actually used to a large + * extent and we run out of kernel memory we can simply drop + * the new segments; TCP on the sender will just retransmit it + * later. Setting the buffer size too big may only consume too + * much kernel memory if the application doesn't read() from + * the socket or packet loss or reordering makes use of the + * reassembly queue. + * + * The criteria to step up the receive buffer one notch are: + * 1. Application has not set receive buffer size with + * SO_RCVBUF. Setting SO_RCVBUF clears SB_AUTOSIZE. + * 2. the number of bytes received during the time it takes + * one timestamp to be reflected back to us (the RTT); + * 3. received bytes per RTT is within seven eighth of the + * current socket buffer size; + * 4. receive buffer size has not hit maximal automatic size; + * + * This algorithm does one step per RTT at most and only if + * we receive a bulk stream w/o packet losses or reorderings. + * Shrinking the buffer during idle times is not necessary as + * it doesn't consume any memory when idle. + * + * TODO: Only step up if the application is actually serving + * the buffer to better manage the socket buffer resources. + */ +int +tcp_autorcvbuf(struct mbuf *m, struct tcphdr *th, struct socket *so, + struct tcpcb *tp, int tlen) +{ + int newsize = 0; + + if (V_tcp_do_autorcvbuf && (so->so_rcv.sb_flags & SB_AUTOSIZE) && + tp->t_srtt != 0 && tp->rfbuf_ts != 0 && + TCP_TS_TO_TICKS(tcp_ts_getticks() - tp->rfbuf_ts) > + (tp->t_srtt >> TCP_RTT_SHIFT)) { + if (tp->rfbuf_cnt > (so->so_rcv.sb_hiwat / 8 * 7) && + so->so_rcv.sb_hiwat < V_tcp_autorcvbuf_max) { + newsize = min(so->so_rcv.sb_hiwat + + V_tcp_autorcvbuf_inc, V_tcp_autorcvbuf_max); + } + TCP_PROBE6(receive__autoresize, NULL, tp, m, tp, th, newsize); + + /* Start over with next RTT. */ + tp->rfbuf_ts = 0; + tp->rfbuf_cnt = 0; + } else { + tp->rfbuf_cnt += tlen; /* add up */ + } + + return (newsize); +} + void tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, struct tcpcb *tp, int drop_hdrlen, int tlen, uint8_t iptos, @@ -1849,62 +1911,7 @@ tcp_do_segment(struct mbuf *m, struct tc #endif TCP_PROBE3(debug__input, tp, th, m); - /* - * Automatic sizing of receive socket buffer. Often the send - * buffer size is not optimally adjusted to the actual network - * conditions at hand (delay bandwidth product). Setting the - * buffer size too small limits throughput on links with high - * bandwidth and high delay (eg. trans-continental/oceanic links). - * - * On the receive side the socket buffer memory is only rarely - * used to any significant extent. This allows us to be much - * more aggressive in scaling the receive socket buffer. For - * the case that the buffer space is actually used to a large - * extent and we run out of kernel memory we can simply drop - * the new segments; TCP on the sender will just retransmit it - * later. Setting the buffer size too big may only consume too - * much kernel memory if the application doesn't read() from - * the socket or packet loss or reordering makes use of the - * reassembly queue. - * - * The criteria to step up the receive buffer one notch are: - * 1. Application has not set receive buffer size with - * SO_RCVBUF. Setting SO_RCVBUF clears SB_AUTOSIZE. - * 2. the number of bytes received during the time it takes - * one timestamp to be reflected back to us (the RTT); - * 3. received bytes per RTT is within seven eighth of the - * current socket buffer size; - * 4. receive buffer size has not hit maximal automatic size; - * - * This algorithm does one step per RTT at most and only if - * we receive a bulk stream w/o packet losses or reorderings. - * Shrinking the buffer during idle times is not necessary as - * it doesn't consume any memory when idle. - * - * TODO: Only step up if the application is actually serving - * the buffer to better manage the socket buffer resources. - */ - if (V_tcp_do_autorcvbuf && - (to.to_flags & TOF_TS) && - to.to_tsecr && - (so->so_rcv.sb_flags & SB_AUTOSIZE)) { - if (TSTMP_GT(to.to_tsecr, tp->rfbuf_ts) && - to.to_tsecr - tp->rfbuf_ts < hz) { - if (tp->rfbuf_cnt > - (so->so_rcv.sb_hiwat / 8 * 7) && - so->so_rcv.sb_hiwat < - V_tcp_autorcvbuf_max) { - newsize = - min(so->so_rcv.sb_hiwat + - V_tcp_autorcvbuf_inc, - V_tcp_autorcvbuf_max); - } - /* Start over with next RTT. */ - tp->rfbuf_ts = 0; - tp->rfbuf_cnt = 0; - } else - tp->rfbuf_cnt += tlen; /* add up */ - } + newsize = tcp_autorcvbuf(m, th, so, tp, tlen); /* Add data to socket buffer. */ SOCKBUF_LOCK(&so->so_rcv); @@ -1945,10 +1952,6 @@ tcp_do_segment(struct mbuf *m, struct tc win = 0; tp->rcv_wnd = imax(win, (int)(tp->rcv_adv - tp->rcv_nxt)); - /* Reset receive buffer auto scaling when not in bulk receive mode. */ - tp->rfbuf_ts = 0; - tp->rfbuf_cnt = 0; - switch (tp->t_state) { /* Modified: head/sys/netinet/tcp_output.c ============================================================================== --- head/sys/netinet/tcp_output.c Mon Apr 10 06:19:09 2017 (r316675) +++ head/sys/netinet/tcp_output.c Mon Apr 10 08:19:35 2017 (r316676) @@ -831,11 +831,13 @@ send: to.to_tsval = tcp_ts_getticks() + tp->ts_offset; to.to_tsecr = tp->ts_recent; to.to_flags |= TOF_TS; - /* Set receive buffer autosizing timestamp. */ - if (tp->rfbuf_ts == 0 && - (so->so_rcv.sb_flags & SB_AUTOSIZE)) - tp->rfbuf_ts = tcp_ts_getticks(); } + + /* Set receive buffer autosizing timestamp. */ + if (tp->rfbuf_ts == 0 && + (so->so_rcv.sb_flags & SB_AUTOSIZE)) + tp->rfbuf_ts = tcp_ts_getticks(); + /* Selective ACK's. */ if (tp->t_flags & TF_SACK_PERMIT) { if (flags & TH_SYN) Modified: head/sys/netinet/tcp_stacks/fastpath.c ============================================================================== --- head/sys/netinet/tcp_stacks/fastpath.c Mon Apr 10 06:19:09 2017 (r316675) +++ head/sys/netinet/tcp_stacks/fastpath.c Mon Apr 10 08:19:35 2017 (r316676) @@ -399,62 +399,8 @@ tcp_do_fastnewdata(struct mbuf *m, struc (void *)tcp_saveipgen, &tcp_savetcp, 0); #endif TCP_PROBE3(debug__input, tp, th, m); - /* - * Automatic sizing of receive socket buffer. Often the send - * buffer size is not optimally adjusted to the actual network - * conditions at hand (delay bandwidth product). Setting the - * buffer size too small limits throughput on links with high - * bandwidth and high delay (eg. trans-continental/oceanic links). - * - * On the receive side the socket buffer memory is only rarely - * used to any significant extent. This allows us to be much - * more aggressive in scaling the receive socket buffer. For - * the case that the buffer space is actually used to a large - * extent and we run out of kernel memory we can simply drop - * the new segments; TCP on the sender will just retransmit it - * later. Setting the buffer size too big may only consume too - * much kernel memory if the application doesn't read() from - * the socket or packet loss or reordering makes use of the - * reassembly queue. - * - * The criteria to step up the receive buffer one notch are: - * 1. Application has not set receive buffer size with - * SO_RCVBUF. Setting SO_RCVBUF clears SB_AUTOSIZE. - * 2. the number of bytes received during the time it takes - * one timestamp to be reflected back to us (the RTT); - * 3. received bytes per RTT is within seven eighth of the - * current socket buffer size; - * 4. receive buffer size has not hit maximal automatic size; - * - * This algorithm does one step per RTT at most and only if - * we receive a bulk stream w/o packet losses or reorderings. - * Shrinking the buffer during idle times is not necessary as - * it doesn't consume any memory when idle. - * - * TODO: Only step up if the application is actually serving - * the buffer to better manage the socket buffer resources. - */ - if (V_tcp_do_autorcvbuf && - (to->to_flags & TOF_TS) && - to->to_tsecr && - (so->so_rcv.sb_flags & SB_AUTOSIZE)) { - if (TSTMP_GT(to->to_tsecr, tp->rfbuf_ts) && - to->to_tsecr - tp->rfbuf_ts < hz) { - if (tp->rfbuf_cnt > - (so->so_rcv.sb_hiwat / 8 * 7) && - so->so_rcv.sb_hiwat < - V_tcp_autorcvbuf_max) { - newsize = - min(so->so_rcv.sb_hiwat + - V_tcp_autorcvbuf_inc, - V_tcp_autorcvbuf_max); - } - /* Start over with next RTT. */ - tp->rfbuf_ts = 0; - tp->rfbuf_cnt = 0; - } else - tp->rfbuf_cnt += tlen; /* add up */ - } + + newsize = tcp_autorcvbuf(m, th, so, tp, tlen); /* Add data to socket buffer. */ SOCKBUF_LOCK(&so->so_rcv); @@ -532,10 +478,6 @@ tcp_do_slowpath(struct mbuf *m, struct t win = 0; tp->rcv_wnd = imax(win, (int)(tp->rcv_adv - tp->rcv_nxt)); - /* Reset receive buffer auto scaling when not in bulk receive mode. */ - tp->rfbuf_ts = 0; - tp->rfbuf_cnt = 0; - switch (tp->t_state) { /* Modified: head/sys/netinet/tcp_var.h ============================================================================== --- head/sys/netinet/tcp_var.h Mon Apr 10 06:19:09 2017 (r316675) +++ head/sys/netinet/tcp_var.h Mon Apr 10 08:19:35 2017 (r316676) @@ -778,6 +778,8 @@ void hhook_run_tcp_est_in(struct tcpcb * #endif int tcp_input(struct mbuf **, int *, int); +int tcp_autorcvbuf(struct mbuf *, struct tcphdr *, struct socket *, + struct tcpcb *, int); void tcp_do_segment(struct mbuf *, struct tcphdr *, struct socket *, struct tcpcb *, int, int, uint8_t, int); From owner-svn-src-head@freebsd.org Mon Apr 10 10:38:14 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06937D35168; Mon, 10 Apr 2017 10:38: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 BDA40A15; Mon, 10 Apr 2017 10:38: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 v3AAcCBm073303; Mon, 10 Apr 2017 10:38:12 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3AAcCYc073301; Mon, 10 Apr 2017 10:38:12 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201704101038.v3AAcCYc073301@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 10 Apr 2017 10:38:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316677 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Apr 2017 10:38:14 -0000 Author: mav Date: Mon Apr 10 10:38:12 2017 New Revision: 316677 URL: https://svnweb.freebsd.org/changeset/base/316677 Log: Do not register in CTL portal groups without portals. From config synthax point of view such portal groups are not incorrect, but they are useless since can not receive any connection. And since CTL port resource is very limited, it is good to save it. MFC after: 2 weeks Modified: head/usr.sbin/ctld/ctld.c head/usr.sbin/ctld/ctld.h Modified: head/usr.sbin/ctld/ctld.c ============================================================================== --- head/usr.sbin/ctld/ctld.c Mon Apr 10 08:19:35 2017 (r316676) +++ head/usr.sbin/ctld/ctld.c Mon Apr 10 10:38:12 2017 (r316677) @@ -1237,7 +1237,6 @@ port_new(struct conf *conf, struct targe port->p_target = target; TAILQ_INSERT_TAIL(&pg->pg_ports, port, p_pgs); port->p_portal_group = pg; - port->p_foreign = pg->pg_foreign; return (port); } @@ -1310,6 +1309,19 @@ port_delete(struct port *port) free(port); } +int +port_is_dummy(struct port *port) +{ + + if (port->p_portal_group) { + if (port->p_portal_group->pg_foreign) + return (1); + if (TAILQ_EMPTY(&port->p_portal_group->pg_portals)) + return (1); + } + return (0); +} + struct target * target_new(struct conf *conf, const char *name) { @@ -1887,10 +1899,10 @@ conf_apply(struct conf *oldconf, struct * and missing in the new one. */ TAILQ_FOREACH_SAFE(oldport, &oldconf->conf_ports, p_next, tmpport) { - if (oldport->p_foreign) + if (port_is_dummy(oldport)) continue; newport = port_find(newconf, oldport->p_name); - if (newport != NULL && !newport->p_foreign) + if (newport != NULL && !port_is_dummy(newport)) continue; log_debugx("removing port \"%s\"", oldport->p_name); error = kernel_port_remove(oldport); @@ -2010,11 +2022,11 @@ conf_apply(struct conf *oldconf, struct * Now add new ports or modify existing ones. */ TAILQ_FOREACH(newport, &newconf->conf_ports, p_next) { - if (newport->p_foreign) + if (port_is_dummy(newport)) continue; oldport = port_find(oldconf, newport->p_name); - if (oldport == NULL || oldport->p_foreign) { + if (oldport == NULL || port_is_dummy(oldport)) { log_debugx("adding port \"%s\"", newport->p_name); error = kernel_port_add(newport); } else { Modified: head/usr.sbin/ctld/ctld.h ============================================================================== --- head/usr.sbin/ctld/ctld.h Mon Apr 10 08:19:35 2017 (r316676) +++ head/usr.sbin/ctld/ctld.h Mon Apr 10 10:38:12 2017 (r316677) @@ -149,7 +149,6 @@ struct port { struct portal_group *p_portal_group; struct pport *p_pport; struct target *p_target; - int p_foreign; uint32_t p_ctl_port; }; @@ -373,6 +372,7 @@ struct port *port_find(const struct con struct port *port_find_in_pg(const struct portal_group *pg, const char *target); void port_delete(struct port *port); +int port_is_dummy(struct port *port); struct target *target_new(struct conf *conf, const char *name); void target_delete(struct target *target); From owner-svn-src-head@freebsd.org Mon Apr 10 12:36:00 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33889D36446; Mon, 10 Apr 2017 12:36:00 +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 E9E0F188; Mon, 10 Apr 2017 12:35:59 +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 v3ACZx4G025365; Mon, 10 Apr 2017 12:35:59 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3ACZwU2025362; Mon, 10 Apr 2017 12:35:58 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201704101235.v3ACZwU2025362@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 10 Apr 2017 12:35:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316678 - in head/sys/arm: conf freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Apr 2017 12:36:00 -0000 Author: andrew Date: Mon Apr 10 12:35:58 2017 New Revision: 316678 URL: https://svnweb.freebsd.org/changeset/base/316678 Log: Port the IMX6 kernel configuration to use MULTIDELAY. This will help adding the i.MX series of SoCs to the armv6 GENERIC kernel. This uses updated times from ian@. Reviewed by: ian Sponsored by: ABT Systems Ltd Modified: head/sys/arm/conf/IMX6 head/sys/arm/freescale/imx/imx6_machdep.c head/sys/arm/freescale/imx/imx_gpt.c Modified: head/sys/arm/conf/IMX6 ============================================================================== --- head/sys/arm/conf/IMX6 Mon Apr 10 10:38:12 2017 (r316677) +++ head/sys/arm/conf/IMX6 Mon Apr 10 12:35:58 2017 (r316678) @@ -32,6 +32,7 @@ options INCLUDE_CONFIG_FILE # Include t options PLATFORM options PLATFORM_SMP options SMP # Enable multiple cores +options MULTIDELAY # NFS root from boopt/dhcp #options BOOTP Modified: head/sys/arm/freescale/imx/imx6_machdep.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_machdep.c Mon Apr 10 10:38:12 2017 (r316677) +++ head/sys/arm/freescale/imx/imx6_machdep.c Mon Apr 10 12:35:58 2017 (r316678) @@ -324,7 +324,7 @@ static platform_method_t imx6_methods[] PLATFORMMETHOD_END, }; -FDT_PLATFORM_DEF2(imx6, imx6s, "i.MX6 Solo", 0, "fsl,imx6s", 0); -FDT_PLATFORM_DEF2(imx6, imx6d, "i.MX6 Dual", 0, "fsl,imx6dl", 0); -FDT_PLATFORM_DEF2(imx6, imx6q, "i.MX6 Quad", 0, "fsl,imx6q", 0); -FDT_PLATFORM_DEF2(imx6, imx6ul, "i.MX6 UltraLite", 0, "fsl,imx6ul", 0); +FDT_PLATFORM_DEF2(imx6, imx6s, "i.MX6 Solo", 0, "fsl,imx6s", 80); +FDT_PLATFORM_DEF2(imx6, imx6d, "i.MX6 Dual", 0, "fsl,imx6dl", 80); +FDT_PLATFORM_DEF2(imx6, imx6q, "i.MX6 Quad", 0, "fsl,imx6q", 80); +FDT_PLATFORM_DEF2(imx6, imx6ul, "i.MX6 UltraLite", 0, "fsl,imx6ul", 67); Modified: head/sys/arm/freescale/imx/imx_gpt.c ============================================================================== --- head/sys/arm/freescale/imx/imx_gpt.c Mon Apr 10 10:38:12 2017 (r316677) +++ head/sys/arm/freescale/imx/imx_gpt.c Mon Apr 10 12:35:58 2017 (r316678) @@ -40,6 +40,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#ifdef MULTIDELAY +#include /* For arm_set_delay */ +#endif #include #include @@ -62,6 +65,8 @@ static int imx_gpt_timer_start(struct ev sbintime_t); static int imx_gpt_timer_stop(struct eventtimer *); +static void imx_gpt_do_delay(int, void *); + static int imx_gpt_intr(void *); static int imx_gpt_probe(device_t); static int imx_gpt_attach(device_t); @@ -87,6 +92,7 @@ struct imx_gpt_softc { struct eventtimer et; }; +#ifndef MULTIDELAY /* Global softc pointer for use in DELAY(). */ static struct imx_gpt_softc *imx_gpt_sc; @@ -98,6 +104,7 @@ static struct imx_gpt_softc *imx_gpt_sc; * we're attached the delay loop switches to using the timer hardware. */ static const int imx_gpt_delay_count = 78; +#endif /* Try to divide down an available fast clock to this frequency. */ #define TARGET_FREQUENCY 1000000000 @@ -275,8 +282,13 @@ imx_gpt_attach(device_t dev) tc_init(&imx_gpt_timecounter); /* If this is the first unit, store the softc for use in DELAY. */ - if (device_get_unit(dev) == 0) - imx_gpt_sc = sc; + if (device_get_unit(dev) == 0) { +#ifdef MULTIDELAY + arm_set_delay(imx_gpt_do_delay, sc); +#else + imx_gpt_sc = sc; +#endif + } return (0); } @@ -396,19 +408,12 @@ static devclass_t imx_gpt_devclass; EARLY_DRIVER_MODULE(imx_gpt, simplebus, imx_gpt_driver, imx_gpt_devclass, 0, 0, BUS_PASS_TIMER); -void -DELAY(int usec) +static void +imx_gpt_do_delay(int usec, void *arg) { + struct imx_gpt_softc *sc = arg; uint64_t curcnt, endcnt, startcnt, ticks; - /* If the timer hardware is not accessible, just use a loop. */ - if (imx_gpt_sc == NULL) { - while (usec-- > 0) - for (ticks = 0; ticks < imx_gpt_delay_count; ++ticks) - cpufunc_nullop(); - return; - } - /* * Calculate the tick count with 64-bit values so that it works for any * clock frequency. Loop until the hardware count reaches start+ticks. @@ -417,12 +422,30 @@ DELAY(int usec) * that doing this on each loop iteration is inefficient -- we're trying * to waste time here. */ - ticks = 1 + ((uint64_t)usec * imx_gpt_sc->clkfreq) / 1000000; - curcnt = startcnt = READ4(imx_gpt_sc, IMX_GPT_CNT); + ticks = 1 + ((uint64_t)usec * sc->clkfreq) / 1000000; + curcnt = startcnt = READ4(sc, IMX_GPT_CNT); endcnt = startcnt + ticks; while (curcnt < endcnt) { - curcnt = READ4(imx_gpt_sc, IMX_GPT_CNT); + curcnt = READ4(sc, IMX_GPT_CNT); if (curcnt < startcnt) curcnt += 1ULL << 32; } } + +#ifndef MULTIDELAY +void +DELAY(int usec) +{ + uint64_t ticks; + + /* If the timer hardware is not accessible, just use a loop. */ + if (imx_gpt_sc == NULL) { + while (usec-- > 0) + for (ticks = 0; ticks < imx_gpt_delay_count; ++ticks) + cpufunc_nullop(); + return; + } else + imx_gpt_do_delay(usec, imx_gpt_sc); + +} +#endif From owner-svn-src-head@freebsd.org Mon Apr 10 13:20:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4162DD379A2; Mon, 10 Apr 2017 13:20:33 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 09DF313AA; Mon, 10 Apr 2017 13:20:32 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 0DE241FE021; Mon, 10 Apr 2017 15:18:56 +0200 (CEST) Subject: Re: svn commit: r316665 - in head/sys: compat/linuxkpi/common/src contrib/ck/include contrib/ck/src To: Olivier Houchard , Conrad Meyer References: <201704092102.v39L25oh040066@repo.freebsd.org> <20170409230840.GA90254@ci0.org> Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Hans Petter Selasky Message-ID: <6e177da0-2367-c5b1-cb0e-bd8535cdf53e@selasky.org> Date: Mon, 10 Apr 2017 15:18:37 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <20170409230840.GA90254@ci0.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Apr 2017 13:20:33 -0000 On 04/10/17 01:08, Olivier Houchard wrote: > On Sun, Apr 09, 2017 at 03:49:57PM -0700, Conrad Meyer wrote: >> On Sun, Apr 9, 2017 at 2:02 PM, Olivier Houchard wrote: >>> Author: cognet >>> Date: Sun Apr 9 21:02:05 2017 >>> New Revision: 316665 >>> URL: https://svnweb.freebsd.org/changeset/base/316665 >>> >>> Log: >>> Import CK as of commit 6b141c0bdd21ce8b3e14147af8f87f22b20ecf32 >>> This brings us changes we needed in ck_epoch. >> >> Out of curiosity ??? what changes did we need, and why? >> > > Hi Conrad, > > What ck_epoch lacked was any way to do priority propagation, which led > to some nice deadlocks to the linuxkpi folks. > > Regards, > > Olivier > > Hi, There will be some updates to the RCU implementation soon, using the new APIs provided by the CK. Thank you! --HPS From owner-svn-src-head@freebsd.org Mon Apr 10 14:43:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E30DAD376A9 for ; Mon, 10 Apr 2017 14:43:19 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail-oi0-x236.google.com (mail-oi0-x236.google.com [IPv6:2607:f8b0:4003: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 A2B12ED7 for ; Mon, 10 Apr 2017 14:43:19 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: by mail-oi0-x236.google.com with SMTP id b187so150425173oif.0 for ; Mon, 10 Apr 2017 07:43:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sippysoft-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:from:date:message-id:subject:to:cc; bh=n0TSvGB58HLpA+Df/BNlBbeuE0Bc1MwzXZJGKpJjxVI=; b=kyLgazzqVn3q1AaQturl7hNwV1rnSGuud6BDDRxS5US+lRJMUhn2947ZHIDGrOigEF o6C6RTZ9rt7LmKlko5jmqfQEaO65ne3AuOkkSbQDejmWB1ENY0dLtvWh3krDjJnNnkH8 oc9WwvwWmNydjCXkowIxNPNAO6TBxR1UCav+KLcDcjDGrfqok/7LbGaC+ABsxeTfn6D9 36sROrmJ0XDP20iiSrZgL/94l8rORpSeQlXa56S3df4WmkRVmyKSiOfikEu6LIlASdXr OuLf3SOKM8Bg2hX9a/IgFnZP4WUr8bxVoXoMCqm5UR1vp2s8YBfWiCab3yY7+VeS89o8 Usiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to:cc; bh=n0TSvGB58HLpA+Df/BNlBbeuE0Bc1MwzXZJGKpJjxVI=; b=qGuV2kUJsnUgrBvHroKGn+Dvhc5/xf/eQeKWNCJEVJaJIdxGRizPdC1nYyDE/2OR1o KAyIAwygbSioGd1NqID0h+ik4JlHpxkwfXCT7jsbHFQ/YKX58gez6QXXXXWmIYosswhN H9rKHdzthJn6PFqWeczsGVkAZa9g13sW7kSqTu7egDKVrdggWu/A1tI1MAZ6PQUlt9/B TVfKXspLZGMZEEAOY5WrZFLx6dDt5vWKXob2dbS/Qwp/05AiXB/s2/cBE4ExMY75tZir omlKgV/EbZhZM3Se7qFufkz+7ylw0Z8mtPIpMTyu9zhHp4ZbeSxnvWM8lIqBIFb4s7eP kUkw== X-Gm-Message-State: AN3rC/5PcEEVznhiVGDKkcfiVJtGRUDCzaP4vaejNn4HNLIP7Ami468m8h0xmy0ePt3XwKMkOjNdxr9s01njyLx/ X-Received: by 10.36.47.78 with SMTP id j75mr12342902itj.72.1491835398795; Mon, 10 Apr 2017 07:43:18 -0700 (PDT) MIME-Version: 1.0 Sender: sobomax@sippysoft.com Received: by 10.36.112.210 with HTTP; Mon, 10 Apr 2017 07:43:18 -0700 (PDT) From: Maxim Sobolev Date: Mon, 10 Apr 2017 07:43:18 -0700 X-Google-Sender-Auth: g-9ZBlkpvRCQMJ6HOriztZACAMM Message-ID: Subject: On shutting down UDP socket [Re: svn commit: r285910 - in head: lib/libc/sys sys/kern sys/sys] To: Ed Schouten Cc: Alexander Kabaev , Ed Schouten , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, mjg@freebsd.org, gnn@freebsd.org, network@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Apr 2017 14:43:20 -0000 Hi Guys, I am sorry to bring this old thread up, but I think Ed's comparison with other OSes here and in the relevant differential was not entirely correct. What linux does (tested with 4.4.0) when UDP socket is shut down is actually shutting down receiving end, so any threads that are blocked in recv() on that socket return. Still shutdown() system call itself returns ENOTCONN. FreeBSD on the other hand does not do anything for the socket, so that the threads just hang. I am pretty sure there are at least some software out there that relies on that behavior, at least in our case we do. Bumped into this after upgrading to the 11.0. Therefore, I am curious about possibility to make our behavior match that of Linux's, so we are not the odd one with regards to this, that is return an error but still shutdown the socket? Small test case is attached. Both FreeBSD 10.3 and Linux 4.4.0 pass (albeit Linux's shutdown() returns with an error), FreeBSD 11.0 fails. -Max On Sun, Aug 9, 2015 at 6:08 AM, Ed Schouten wrote: > Hi Alexander, > > 2015-08-09 14:55 GMT+02:00 Alexander Kabaev : > > On Sun, 9 Aug 2015 09:37:13 +0200 > > It most definitely does work, this is what I have done to get my > > network scripts work again. I wonder if there are other means of > > restricting raw sockets that can be used to achieve the result > > authors of rtsold had hoped or? > > Yes, there sure are. We could for example call cap_rights_limit() on > the socket and whitelist the exacty set of actions that the program > needs. > > That said, it wouldn't make a difference in the end. It looks like > rtsol/rtsold don't seem to drop any privileges or switch credentials > after startup, assuming I haven't overlooked anything. Even if we were > to restrict the raw socket, the process could always open a new one > later on. > > I think it would make sense for now to just commit the patch that I > proposed. Will push it into the tree tomorrow. > > Thanks, > -- > Ed Schouten > Nuxi, 's-Hertogenbosch, the Netherlands > KvK/VAT number: 62051717 > > From owner-svn-src-head@freebsd.org Mon Apr 10 14:51:42 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B74AED37921; Mon, 10 Apr 2017 14:51:42 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8947F7F6; Mon, 10 Apr 2017 14:51:42 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (106-68-100-234.dyn.iinet.net.au [106.68.100.234]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id v3AEpZcb050412 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 10 Apr 2017 07:51:39 -0700 (PDT) (envelope-from julian@freebsd.org) Subject: Re: svn commit: r316676 - in head/sys/netinet: . tcp_stacks To: Steven Hartland , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201704100819.v3A8JZCh014531@repo.freebsd.org> From: Julian Elischer Message-ID: <5dc195ac-d78d-1c7c-10dd-a1e21f503330@freebsd.org> Date: Mon, 10 Apr 2017 22:51:29 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <201704100819.v3A8JZCh014531@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Apr 2017 14:51:42 -0000 If possible MFC to 10 too would be nice.. thanks On 10/4/17 4:19 pm, Steven Hartland wrote: > Author: smh > Date: Mon Apr 10 08:19:35 2017 > New Revision: 316676 > URL: https://svnweb.freebsd.org/changeset/base/316676 > > Log: > Use estimated RTT for receive buffer auto resizing instead of timestamps > > Switched from using timestamps to RTT estimates when performing TCP receive > buffer auto resizing, as not all hosts support / enable TCP timestamps. > > Disabled reset of receive buffer auto scaling when not in bulk receive mode, > which gives an extra 20% performance increase. > > Also extracted auto resizing to a common method shared between standard and > fastpath modules. > > With this AWS S3 downloads at ~17ms latency on a 1Gbps connection jump from > ~3MB/s to ~100MB/s using the default settings. > > Reviewed by: lstewart, gnn > MFC after: 2 weeks > Relnotes: Yes > Sponsored by: Multiplay > Differential Revision: https://reviews.freebsd.org/D9668 > > Modified: > head/sys/netinet/in_kdtrace.c > head/sys/netinet/in_kdtrace.h > head/sys/netinet/tcp_input.c > head/sys/netinet/tcp_output.c > head/sys/netinet/tcp_stacks/fastpath.c > head/sys/netinet/tcp_var.h > > Modified: head/sys/netinet/in_kdtrace.c > ============================================================================== > --- head/sys/netinet/in_kdtrace.c Mon Apr 10 06:19:09 2017 (r316675) > +++ head/sys/netinet/in_kdtrace.c Mon Apr 10 08:19:35 2017 (r316676) > @@ -132,6 +132,14 @@ SDT_PROBE_DEFINE6_XLATE(tcp, , , state__ > "void *", "void *", > "int", "tcplsinfo_t *"); > > +SDT_PROBE_DEFINE6_XLATE(tcp, , , receive__autoresize, > + "void *", "void *", > + "struct tcpcb *", "csinfo_t *", > + "struct mbuf *", "ipinfo_t *", > + "struct tcpcb *", "tcpsinfo_t *" , > + "struct tcphdr *", "tcpinfoh_t *", > + "int", "int"); > + > SDT_PROBE_DEFINE5_XLATE(udp, , , receive, > "void *", "pktinfo_t *", > "struct inpcb *", "csinfo_t *", > > Modified: head/sys/netinet/in_kdtrace.h > ============================================================================== > --- head/sys/netinet/in_kdtrace.h Mon Apr 10 06:19:09 2017 (r316675) > +++ head/sys/netinet/in_kdtrace.h Mon Apr 10 08:19:35 2017 (r316676) > @@ -65,6 +65,7 @@ SDT_PROBE_DECLARE(tcp, , , debug__input) > SDT_PROBE_DECLARE(tcp, , , debug__output); > SDT_PROBE_DECLARE(tcp, , , debug__user); > SDT_PROBE_DECLARE(tcp, , , debug__drop); > +SDT_PROBE_DECLARE(tcp, , , receive__autoresize); > > SDT_PROBE_DECLARE(udp, , , receive); > SDT_PROBE_DECLARE(udp, , , send); > > Modified: head/sys/netinet/tcp_input.c > ============================================================================== > --- head/sys/netinet/tcp_input.c Mon Apr 10 06:19:09 2017 (r316675) > +++ head/sys/netinet/tcp_input.c Mon Apr 10 08:19:35 2017 (r316676) > @@ -1486,6 +1486,68 @@ drop: > return (IPPROTO_DONE); > } > > +/* > + * Automatic sizing of receive socket buffer. Often the send > + * buffer size is not optimally adjusted to the actual network > + * conditions at hand (delay bandwidth product). Setting the > + * buffer size too small limits throughput on links with high > + * bandwidth and high delay (eg. trans-continental/oceanic links). > + * > + * On the receive side the socket buffer memory is only rarely > + * used to any significant extent. This allows us to be much > + * more aggressive in scaling the receive socket buffer. For > + * the case that the buffer space is actually used to a large > + * extent and we run out of kernel memory we can simply drop > + * the new segments; TCP on the sender will just retransmit it > + * later. Setting the buffer size too big may only consume too > + * much kernel memory if the application doesn't read() from > + * the socket or packet loss or reordering makes use of the > + * reassembly queue. > + * > + * The criteria to step up the receive buffer one notch are: > + * 1. Application has not set receive buffer size with > + * SO_RCVBUF. Setting SO_RCVBUF clears SB_AUTOSIZE. > + * 2. the number of bytes received during the time it takes > + * one timestamp to be reflected back to us (the RTT); > + * 3. received bytes per RTT is within seven eighth of the > + * current socket buffer size; > + * 4. receive buffer size has not hit maximal automatic size; > + * > + * This algorithm does one step per RTT at most and only if > + * we receive a bulk stream w/o packet losses or reorderings. > + * Shrinking the buffer during idle times is not necessary as > + * it doesn't consume any memory when idle. > + * > + * TODO: Only step up if the application is actually serving > + * the buffer to better manage the socket buffer resources. > + */ > +int > +tcp_autorcvbuf(struct mbuf *m, struct tcphdr *th, struct socket *so, > + struct tcpcb *tp, int tlen) > +{ > + int newsize = 0; > + > + if (V_tcp_do_autorcvbuf && (so->so_rcv.sb_flags & SB_AUTOSIZE) && > + tp->t_srtt != 0 && tp->rfbuf_ts != 0 && > + TCP_TS_TO_TICKS(tcp_ts_getticks() - tp->rfbuf_ts) > > + (tp->t_srtt >> TCP_RTT_SHIFT)) { > + if (tp->rfbuf_cnt > (so->so_rcv.sb_hiwat / 8 * 7) && > + so->so_rcv.sb_hiwat < V_tcp_autorcvbuf_max) { > + newsize = min(so->so_rcv.sb_hiwat + > + V_tcp_autorcvbuf_inc, V_tcp_autorcvbuf_max); > + } > + TCP_PROBE6(receive__autoresize, NULL, tp, m, tp, th, newsize); > + > + /* Start over with next RTT. */ > + tp->rfbuf_ts = 0; > + tp->rfbuf_cnt = 0; > + } else { > + tp->rfbuf_cnt += tlen; /* add up */ > + } > + > + return (newsize); > +} > + > void > tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, > struct tcpcb *tp, int drop_hdrlen, int tlen, uint8_t iptos, > @@ -1849,62 +1911,7 @@ tcp_do_segment(struct mbuf *m, struct tc > #endif > TCP_PROBE3(debug__input, tp, th, m); > > - /* > - * Automatic sizing of receive socket buffer. Often the send > - * buffer size is not optimally adjusted to the actual network > - * conditions at hand (delay bandwidth product). Setting the > - * buffer size too small limits throughput on links with high > - * bandwidth and high delay (eg. trans-continental/oceanic links). > - * > - * On the receive side the socket buffer memory is only rarely > - * used to any significant extent. This allows us to be much > - * more aggressive in scaling the receive socket buffer. For > - * the case that the buffer space is actually used to a large > - * extent and we run out of kernel memory we can simply drop > - * the new segments; TCP on the sender will just retransmit it > - * later. Setting the buffer size too big may only consume too > - * much kernel memory if the application doesn't read() from > - * the socket or packet loss or reordering makes use of the > - * reassembly queue. > - * > - * The criteria to step up the receive buffer one notch are: > - * 1. Application has not set receive buffer size with > - * SO_RCVBUF. Setting SO_RCVBUF clears SB_AUTOSIZE. > - * 2. the number of bytes received during the time it takes > - * one timestamp to be reflected back to us (the RTT); > - * 3. received bytes per RTT is within seven eighth of the > - * current socket buffer size; > - * 4. receive buffer size has not hit maximal automatic size; > - * > - * This algorithm does one step per RTT at most and only if > - * we receive a bulk stream w/o packet losses or reorderings. > - * Shrinking the buffer during idle times is not necessary as > - * it doesn't consume any memory when idle. > - * > - * TODO: Only step up if the application is actually serving > - * the buffer to better manage the socket buffer resources. > - */ > - if (V_tcp_do_autorcvbuf && > - (to.to_flags & TOF_TS) && > - to.to_tsecr && > - (so->so_rcv.sb_flags & SB_AUTOSIZE)) { > - if (TSTMP_GT(to.to_tsecr, tp->rfbuf_ts) && > - to.to_tsecr - tp->rfbuf_ts < hz) { > - if (tp->rfbuf_cnt > > - (so->so_rcv.sb_hiwat / 8 * 7) && > - so->so_rcv.sb_hiwat < > - V_tcp_autorcvbuf_max) { > - newsize = > - min(so->so_rcv.sb_hiwat + > - V_tcp_autorcvbuf_inc, > - V_tcp_autorcvbuf_max); > - } > - /* Start over with next RTT. */ > - tp->rfbuf_ts = 0; > - tp->rfbuf_cnt = 0; > - } else > - tp->rfbuf_cnt += tlen; /* add up */ > - } > + newsize = tcp_autorcvbuf(m, th, so, tp, tlen); > > /* Add data to socket buffer. */ > SOCKBUF_LOCK(&so->so_rcv); > @@ -1945,10 +1952,6 @@ tcp_do_segment(struct mbuf *m, struct tc > win = 0; > tp->rcv_wnd = imax(win, (int)(tp->rcv_adv - tp->rcv_nxt)); > > - /* Reset receive buffer auto scaling when not in bulk receive mode. */ > - tp->rfbuf_ts = 0; > - tp->rfbuf_cnt = 0; > - > switch (tp->t_state) { > > /* > > Modified: head/sys/netinet/tcp_output.c > ============================================================================== > --- head/sys/netinet/tcp_output.c Mon Apr 10 06:19:09 2017 (r316675) > +++ head/sys/netinet/tcp_output.c Mon Apr 10 08:19:35 2017 (r316676) > @@ -831,11 +831,13 @@ send: > to.to_tsval = tcp_ts_getticks() + tp->ts_offset; > to.to_tsecr = tp->ts_recent; > to.to_flags |= TOF_TS; > - /* Set receive buffer autosizing timestamp. */ > - if (tp->rfbuf_ts == 0 && > - (so->so_rcv.sb_flags & SB_AUTOSIZE)) > - tp->rfbuf_ts = tcp_ts_getticks(); > } > + > + /* Set receive buffer autosizing timestamp. */ > + if (tp->rfbuf_ts == 0 && > + (so->so_rcv.sb_flags & SB_AUTOSIZE)) > + tp->rfbuf_ts = tcp_ts_getticks(); > + > /* Selective ACK's. */ > if (tp->t_flags & TF_SACK_PERMIT) { > if (flags & TH_SYN) > > Modified: head/sys/netinet/tcp_stacks/fastpath.c > ============================================================================== > --- head/sys/netinet/tcp_stacks/fastpath.c Mon Apr 10 06:19:09 2017 (r316675) > +++ head/sys/netinet/tcp_stacks/fastpath.c Mon Apr 10 08:19:35 2017 (r316676) > @@ -399,62 +399,8 @@ tcp_do_fastnewdata(struct mbuf *m, struc > (void *)tcp_saveipgen, &tcp_savetcp, 0); > #endif > TCP_PROBE3(debug__input, tp, th, m); > - /* > - * Automatic sizing of receive socket buffer. Often the send > - * buffer size is not optimally adjusted to the actual network > - * conditions at hand (delay bandwidth product). Setting the > - * buffer size too small limits throughput on links with high > - * bandwidth and high delay (eg. trans-continental/oceanic links). > - * > - * On the receive side the socket buffer memory is only rarely > - * used to any significant extent. This allows us to be much > - * more aggressive in scaling the receive socket buffer. For > - * the case that the buffer space is actually used to a large > - * extent and we run out of kernel memory we can simply drop > - * the new segments; TCP on the sender will just retransmit it > - * later. Setting the buffer size too big may only consume too > - * much kernel memory if the application doesn't read() from > - * the socket or packet loss or reordering makes use of the > - * reassembly queue. > - * > - * The criteria to step up the receive buffer one notch are: > - * 1. Application has not set receive buffer size with > - * SO_RCVBUF. Setting SO_RCVBUF clears SB_AUTOSIZE. > - * 2. the number of bytes received during the time it takes > - * one timestamp to be reflected back to us (the RTT); > - * 3. received bytes per RTT is within seven eighth of the > - * current socket buffer size; > - * 4. receive buffer size has not hit maximal automatic size; > - * > - * This algorithm does one step per RTT at most and only if > - * we receive a bulk stream w/o packet losses or reorderings. > - * Shrinking the buffer during idle times is not necessary as > - * it doesn't consume any memory when idle. > - * > - * TODO: Only step up if the application is actually serving > - * the buffer to better manage the socket buffer resources. > - */ > - if (V_tcp_do_autorcvbuf && > - (to->to_flags & TOF_TS) && > - to->to_tsecr && > - (so->so_rcv.sb_flags & SB_AUTOSIZE)) { > - if (TSTMP_GT(to->to_tsecr, tp->rfbuf_ts) && > - to->to_tsecr - tp->rfbuf_ts < hz) { > - if (tp->rfbuf_cnt > > - (so->so_rcv.sb_hiwat / 8 * 7) && > - so->so_rcv.sb_hiwat < > - V_tcp_autorcvbuf_max) { > - newsize = > - min(so->so_rcv.sb_hiwat + > - V_tcp_autorcvbuf_inc, > - V_tcp_autorcvbuf_max); > - } > - /* Start over with next RTT. */ > - tp->rfbuf_ts = 0; > - tp->rfbuf_cnt = 0; > - } else > - tp->rfbuf_cnt += tlen; /* add up */ > - } > + > + newsize = tcp_autorcvbuf(m, th, so, tp, tlen); > > /* Add data to socket buffer. */ > SOCKBUF_LOCK(&so->so_rcv); > @@ -532,10 +478,6 @@ tcp_do_slowpath(struct mbuf *m, struct t > win = 0; > tp->rcv_wnd = imax(win, (int)(tp->rcv_adv - tp->rcv_nxt)); > > - /* Reset receive buffer auto scaling when not in bulk receive mode. */ > - tp->rfbuf_ts = 0; > - tp->rfbuf_cnt = 0; > - > switch (tp->t_state) { > > /* > > Modified: head/sys/netinet/tcp_var.h > ============================================================================== > --- head/sys/netinet/tcp_var.h Mon Apr 10 06:19:09 2017 (r316675) > +++ head/sys/netinet/tcp_var.h Mon Apr 10 08:19:35 2017 (r316676) > @@ -778,6 +778,8 @@ void hhook_run_tcp_est_in(struct tcpcb * > #endif > > int tcp_input(struct mbuf **, int *, int); > +int tcp_autorcvbuf(struct mbuf *, struct tcphdr *, struct socket *, > + struct tcpcb *, int); > void tcp_do_segment(struct mbuf *, struct tcphdr *, > struct socket *, struct tcpcb *, int, int, uint8_t, > int); > > From owner-svn-src-head@freebsd.org Mon Apr 10 15:18:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C534D375FE for ; Mon, 10 Apr 2017 15:18:02 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: from mail-wm0-x230.google.com (mail-wm0-x230.google.com [IPv6:2a00:1450:400c:c09::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 9DFD1FB6 for ; Mon, 10 Apr 2017 15:18:01 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: by mail-wm0-x230.google.com with SMTP id u2so40145599wmu.0 for ; Mon, 10 Apr 2017 08:18:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=from:subject:to:references:message-id:date:user-agent:mime-version :in-reply-to; bh=DRSUZLWBMillVV/f1IYZl3lYWB9nNiONsNMrnQziDWI=; b=uuvUKoyxL0ac50KpIJuLPfYJKlirDHlv0W90OpLD1JlDcWOQQooVE/hsuUyHQRGUtI Gp3i6s4TaYknJXrk9/vCTwgWPSEf2lnKHaEkxKABCWbppwvGjG4aCHQsK2YWiNpfz9l8 8JChsjMUiuBIkYL8p0+QsBcnuZwFNUEEgHHQaDYfzDkwXWY7ROF2JiysjfEixhTVpWOm KAj7cUIAeB8hDy7kpafqMVudRdhClo86NjDgRlWtrv1qKb2jWfsEZlhQ0ysMEpmGkag+ E3YnakvZAlO8cqbaIuQdLo+/S/niN/6e+uULA8SABLL0w3RMkETJ6Rk71IBmAYB2wqe2 qYvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:references:message-id:date :user-agent:mime-version:in-reply-to; bh=DRSUZLWBMillVV/f1IYZl3lYWB9nNiONsNMrnQziDWI=; b=ND0eB/ZnduaUFBnr1nXYLy/0D3yHb12NMy+tdgWkzzNuFv1R7bJ5A4wnqGySAgPfQp X+Bk5zGCw7eP6L0kJjfI6FOEP02B1DvZ03Ht7ZgxyVz8Y27FpJ73B0PD28INFWNggv9F 2B6cK3FBhNBJDaynhgqWRIUfQqqvcyOPehNZ0ZbhTwTWe519p2fkZHoC86e6EYE9TmbF bLrjkRgOYMzGHXdrf1SdndFOil5JNAG91Cx3IBZmTo225fnBechwRqhKG5htT8/7CAyX xU85AtITN57vyW1B3mzDidPzUBK+w5ed0SKJ5kI5OaMyte/qUz2bglTOBeHoY2c/QrxJ CneQ== X-Gm-Message-State: AN3rC/6Pfcv/0QfUZg/4X3S51pIvXJf51K6/dhAE3GkMVJ+6238MLZnmwTywLR9nDum80X7H X-Received: by 10.28.91.82 with SMTP id p79mr9916525wmb.130.1491837479234; Mon, 10 Apr 2017 08:17:59 -0700 (PDT) Received: from [10.10.1.58] ([185.97.61.26]) by smtp.gmail.com with ESMTPSA id 201sm10697188wmr.5.2017.04.10.08.17.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Apr 2017 08:17:58 -0700 (PDT) From: Steven Hartland X-Google-Original-From: Steven Hartland Subject: Re: svn commit: r316676 - in head/sys/netinet: . tcp_stacks To: Julian Elischer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201704100819.v3A8JZCh014531@repo.freebsd.org> <5dc195ac-d78d-1c7c-10dd-a1e21f503330@freebsd.org> Message-ID: <6f86b644-1ae3-101e-629b-4e9437e8bb85@freebsd.org> Date: Mon, 10 Apr 2017 16:17:59 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <5dc195ac-d78d-1c7c-10dd-a1e21f503330@freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Apr 2017 15:18:02 -0000 I don't tend to MFC 10.x now, but do agree given the impact that for this one it should be done. The fix is a little different, due to code restructuring in 11 / head, but I do have a 10.x version already. Regards Steve On 10/04/2017 15:51, Julian Elischer wrote: > If possible MFC to 10 too would be nice.. > thanks > > > On 10/4/17 4:19 pm, Steven Hartland wrote: >> Author: smh >> Date: Mon Apr 10 08:19:35 2017 >> New Revision: 316676 >> URL: https://svnweb.freebsd.org/changeset/base/316676 >> >> Log: >> Use estimated RTT for receive buffer auto resizing instead of >> timestamps >> Switched from using timestamps to RTT estimates when performing >> TCP receive >> buffer auto resizing, as not all hosts support / enable TCP >> timestamps. >> Disabled reset of receive buffer auto scaling when not in bulk >> receive mode, >> which gives an extra 20% performance increase. >> Also extracted auto resizing to a common method shared between >> standard and >> fastpath modules. >> With this AWS S3 downloads at ~17ms latency on a 1Gbps >> connection jump from >> ~3MB/s to ~100MB/s using the default settings. >> Reviewed by: lstewart, gnn >> MFC after: 2 weeks >> Relnotes: Yes >> Sponsored by: Multiplay >> Differential Revision: https://reviews.freebsd.org/D9668 >> >> Modified: >> head/sys/netinet/in_kdtrace.c >> head/sys/netinet/in_kdtrace.h >> head/sys/netinet/tcp_input.c >> head/sys/netinet/tcp_output.c >> head/sys/netinet/tcp_stacks/fastpath.c >> head/sys/netinet/tcp_var.h >> >> Modified: head/sys/netinet/in_kdtrace.c >> ============================================================================== >> >> --- head/sys/netinet/in_kdtrace.c Mon Apr 10 06:19:09 2017 (r316675) >> +++ head/sys/netinet/in_kdtrace.c Mon Apr 10 08:19:35 2017 (r316676) >> @@ -132,6 +132,14 @@ SDT_PROBE_DEFINE6_XLATE(tcp, , , state__ >> "void *", "void *", >> "int", "tcplsinfo_t *"); >> +SDT_PROBE_DEFINE6_XLATE(tcp, , , receive__autoresize, >> + "void *", "void *", >> + "struct tcpcb *", "csinfo_t *", >> + "struct mbuf *", "ipinfo_t *", >> + "struct tcpcb *", "tcpsinfo_t *" , >> + "struct tcphdr *", "tcpinfoh_t *", >> + "int", "int"); >> + >> SDT_PROBE_DEFINE5_XLATE(udp, , , receive, >> "void *", "pktinfo_t *", >> "struct inpcb *", "csinfo_t *", >> >> Modified: head/sys/netinet/in_kdtrace.h >> ============================================================================== >> >> --- head/sys/netinet/in_kdtrace.h Mon Apr 10 06:19:09 2017 (r316675) >> +++ head/sys/netinet/in_kdtrace.h Mon Apr 10 08:19:35 2017 (r316676) >> @@ -65,6 +65,7 @@ SDT_PROBE_DECLARE(tcp, , , debug__input) >> SDT_PROBE_DECLARE(tcp, , , debug__output); >> SDT_PROBE_DECLARE(tcp, , , debug__user); >> SDT_PROBE_DECLARE(tcp, , , debug__drop); >> +SDT_PROBE_DECLARE(tcp, , , receive__autoresize); >> SDT_PROBE_DECLARE(udp, , , receive); >> SDT_PROBE_DECLARE(udp, , , send); >> >> Modified: head/sys/netinet/tcp_input.c >> ============================================================================== >> >> --- head/sys/netinet/tcp_input.c Mon Apr 10 06:19:09 2017 (r316675) >> +++ head/sys/netinet/tcp_input.c Mon Apr 10 08:19:35 2017 (r316676) >> @@ -1486,6 +1486,68 @@ drop: >> return (IPPROTO_DONE); >> } >> +/* >> + * Automatic sizing of receive socket buffer. Often the send >> + * buffer size is not optimally adjusted to the actual network >> + * conditions at hand (delay bandwidth product). Setting the >> + * buffer size too small limits throughput on links with high >> + * bandwidth and high delay (eg. trans-continental/oceanic links). >> + * >> + * On the receive side the socket buffer memory is only rarely >> + * used to any significant extent. This allows us to be much >> + * more aggressive in scaling the receive socket buffer. For >> + * the case that the buffer space is actually used to a large >> + * extent and we run out of kernel memory we can simply drop >> + * the new segments; TCP on the sender will just retransmit it >> + * later. Setting the buffer size too big may only consume too >> + * much kernel memory if the application doesn't read() from >> + * the socket or packet loss or reordering makes use of the >> + * reassembly queue. >> + * >> + * The criteria to step up the receive buffer one notch are: >> + * 1. Application has not set receive buffer size with >> + * SO_RCVBUF. Setting SO_RCVBUF clears SB_AUTOSIZE. >> + * 2. the number of bytes received during the time it takes >> + * one timestamp to be reflected back to us (the RTT); >> + * 3. received bytes per RTT is within seven eighth of the >> + * current socket buffer size; >> + * 4. receive buffer size has not hit maximal automatic size; >> + * >> + * This algorithm does one step per RTT at most and only if >> + * we receive a bulk stream w/o packet losses or reorderings. >> + * Shrinking the buffer during idle times is not necessary as >> + * it doesn't consume any memory when idle. >> + * >> + * TODO: Only step up if the application is actually serving >> + * the buffer to better manage the socket buffer resources. >> + */ >> +int >> +tcp_autorcvbuf(struct mbuf *m, struct tcphdr *th, struct socket *so, >> + struct tcpcb *tp, int tlen) >> +{ >> + int newsize = 0; >> + >> + if (V_tcp_do_autorcvbuf && (so->so_rcv.sb_flags & SB_AUTOSIZE) && >> + tp->t_srtt != 0 && tp->rfbuf_ts != 0 && >> + TCP_TS_TO_TICKS(tcp_ts_getticks() - tp->rfbuf_ts) > >> + (tp->t_srtt >> TCP_RTT_SHIFT)) { >> + if (tp->rfbuf_cnt > (so->so_rcv.sb_hiwat / 8 * 7) && >> + so->so_rcv.sb_hiwat < V_tcp_autorcvbuf_max) { >> + newsize = min(so->so_rcv.sb_hiwat + >> + V_tcp_autorcvbuf_inc, V_tcp_autorcvbuf_max); >> + } >> + TCP_PROBE6(receive__autoresize, NULL, tp, m, tp, th, newsize); >> + >> + /* Start over with next RTT. */ >> + tp->rfbuf_ts = 0; >> + tp->rfbuf_cnt = 0; >> + } else { >> + tp->rfbuf_cnt += tlen; /* add up */ >> + } >> + >> + return (newsize); >> +} >> + >> void >> tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, >> struct tcpcb *tp, int drop_hdrlen, int tlen, uint8_t iptos, >> @@ -1849,62 +1911,7 @@ tcp_do_segment(struct mbuf *m, struct tc >> #endif >> TCP_PROBE3(debug__input, tp, th, m); >> - /* >> - * Automatic sizing of receive socket buffer. Often the send >> - * buffer size is not optimally adjusted to the actual network >> - * conditions at hand (delay bandwidth product). Setting the >> - * buffer size too small limits throughput on links with high >> - * bandwidth and high delay (eg. trans-continental/oceanic >> links). >> - * >> - * On the receive side the socket buffer memory is only rarely >> - * used to any significant extent. This allows us to be much >> - * more aggressive in scaling the receive socket buffer. For >> - * the case that the buffer space is actually used to a large >> - * extent and we run out of kernel memory we can simply drop >> - * the new segments; TCP on the sender will just retransmit it >> - * later. Setting the buffer size too big may only consume too >> - * much kernel memory if the application doesn't read() from >> - * the socket or packet loss or reordering makes use of the >> - * reassembly queue. >> - * >> - * The criteria to step up the receive buffer one notch are: >> - * 1. Application has not set receive buffer size with >> - * SO_RCVBUF. Setting SO_RCVBUF clears SB_AUTOSIZE. >> - * 2. the number of bytes received during the time it takes >> - * one timestamp to be reflected back to us (the RTT); >> - * 3. received bytes per RTT is within seven eighth of the >> - * current socket buffer size; >> - * 4. receive buffer size has not hit maximal automatic size; >> - * >> - * This algorithm does one step per RTT at most and only if >> - * we receive a bulk stream w/o packet losses or reorderings. >> - * Shrinking the buffer during idle times is not necessary as >> - * it doesn't consume any memory when idle. >> - * >> - * TODO: Only step up if the application is actually serving >> - * the buffer to better manage the socket buffer resources. >> - */ >> - if (V_tcp_do_autorcvbuf && >> - (to.to_flags & TOF_TS) && >> - to.to_tsecr && >> - (so->so_rcv.sb_flags & SB_AUTOSIZE)) { >> - if (TSTMP_GT(to.to_tsecr, tp->rfbuf_ts) && >> - to.to_tsecr - tp->rfbuf_ts < hz) { >> - if (tp->rfbuf_cnt > >> - (so->so_rcv.sb_hiwat / 8 * 7) && >> - so->so_rcv.sb_hiwat < >> - V_tcp_autorcvbuf_max) { >> - newsize = >> - min(so->so_rcv.sb_hiwat + >> - V_tcp_autorcvbuf_inc, >> - V_tcp_autorcvbuf_max); >> - } >> - /* Start over with next RTT. */ >> - tp->rfbuf_ts = 0; >> - tp->rfbuf_cnt = 0; >> - } else >> - tp->rfbuf_cnt += tlen; /* add up */ >> - } >> + newsize = tcp_autorcvbuf(m, th, so, tp, tlen); >> /* Add data to socket buffer. */ >> SOCKBUF_LOCK(&so->so_rcv); >> @@ -1945,10 +1952,6 @@ tcp_do_segment(struct mbuf *m, struct tc >> win = 0; >> tp->rcv_wnd = imax(win, (int)(tp->rcv_adv - tp->rcv_nxt)); >> - /* Reset receive buffer auto scaling when not in bulk receive >> mode. */ >> - tp->rfbuf_ts = 0; >> - tp->rfbuf_cnt = 0; >> - >> switch (tp->t_state) { >> /* >> >> Modified: head/sys/netinet/tcp_output.c >> ============================================================================== >> >> --- head/sys/netinet/tcp_output.c Mon Apr 10 06:19:09 2017 (r316675) >> +++ head/sys/netinet/tcp_output.c Mon Apr 10 08:19:35 2017 (r316676) >> @@ -831,11 +831,13 @@ send: >> to.to_tsval = tcp_ts_getticks() + tp->ts_offset; >> to.to_tsecr = tp->ts_recent; >> to.to_flags |= TOF_TS; >> - /* Set receive buffer autosizing timestamp. */ >> - if (tp->rfbuf_ts == 0 && >> - (so->so_rcv.sb_flags & SB_AUTOSIZE)) >> - tp->rfbuf_ts = tcp_ts_getticks(); >> } >> + >> + /* Set receive buffer autosizing timestamp. */ >> + if (tp->rfbuf_ts == 0 && >> + (so->so_rcv.sb_flags & SB_AUTOSIZE)) >> + tp->rfbuf_ts = tcp_ts_getticks(); >> + >> /* Selective ACK's. */ >> if (tp->t_flags & TF_SACK_PERMIT) { >> if (flags & TH_SYN) >> >> Modified: head/sys/netinet/tcp_stacks/fastpath.c >> ============================================================================== >> >> --- head/sys/netinet/tcp_stacks/fastpath.c Mon Apr 10 06:19:09 >> 2017 (r316675) >> +++ head/sys/netinet/tcp_stacks/fastpath.c Mon Apr 10 08:19:35 >> 2017 (r316676) >> @@ -399,62 +399,8 @@ tcp_do_fastnewdata(struct mbuf *m, struc >> (void *)tcp_saveipgen, &tcp_savetcp, 0); >> #endif >> TCP_PROBE3(debug__input, tp, th, m); >> - /* >> - * Automatic sizing of receive socket buffer. Often the send >> - * buffer size is not optimally adjusted to the actual network >> - * conditions at hand (delay bandwidth product). Setting the >> - * buffer size too small limits throughput on links with high >> - * bandwidth and high delay (eg. trans-continental/oceanic links). >> - * >> - * On the receive side the socket buffer memory is only rarely >> - * used to any significant extent. This allows us to be much >> - * more aggressive in scaling the receive socket buffer. For >> - * the case that the buffer space is actually used to a large >> - * extent and we run out of kernel memory we can simply drop >> - * the new segments; TCP on the sender will just retransmit it >> - * later. Setting the buffer size too big may only consume too >> - * much kernel memory if the application doesn't read() from >> - * the socket or packet loss or reordering makes use of the >> - * reassembly queue. >> - * >> - * The criteria to step up the receive buffer one notch are: >> - * 1. Application has not set receive buffer size with >> - * SO_RCVBUF. Setting SO_RCVBUF clears SB_AUTOSIZE. >> - * 2. the number of bytes received during the time it takes >> - * one timestamp to be reflected back to us (the RTT); >> - * 3. received bytes per RTT is within seven eighth of the >> - * current socket buffer size; >> - * 4. receive buffer size has not hit maximal automatic size; >> - * >> - * This algorithm does one step per RTT at most and only if >> - * we receive a bulk stream w/o packet losses or reorderings. >> - * Shrinking the buffer during idle times is not necessary as >> - * it doesn't consume any memory when idle. >> - * >> - * TODO: Only step up if the application is actually serving >> - * the buffer to better manage the socket buffer resources. >> - */ >> - if (V_tcp_do_autorcvbuf && >> - (to->to_flags & TOF_TS) && >> - to->to_tsecr && >> - (so->so_rcv.sb_flags & SB_AUTOSIZE)) { >> - if (TSTMP_GT(to->to_tsecr, tp->rfbuf_ts) && >> - to->to_tsecr - tp->rfbuf_ts < hz) { >> - if (tp->rfbuf_cnt > >> - (so->so_rcv.sb_hiwat / 8 * 7) && >> - so->so_rcv.sb_hiwat < >> - V_tcp_autorcvbuf_max) { >> - newsize = >> - min(so->so_rcv.sb_hiwat + >> - V_tcp_autorcvbuf_inc, >> - V_tcp_autorcvbuf_max); >> - } >> - /* Start over with next RTT. */ >> - tp->rfbuf_ts = 0; >> - tp->rfbuf_cnt = 0; >> - } else >> - tp->rfbuf_cnt += tlen; /* add up */ >> - } >> + >> + newsize = tcp_autorcvbuf(m, th, so, tp, tlen); >> /* Add data to socket buffer. */ >> SOCKBUF_LOCK(&so->so_rcv); >> @@ -532,10 +478,6 @@ tcp_do_slowpath(struct mbuf *m, struct t >> win = 0; >> tp->rcv_wnd = imax(win, (int)(tp->rcv_adv - tp->rcv_nxt)); >> - /* Reset receive buffer auto scaling when not in bulk receive >> mode. */ >> - tp->rfbuf_ts = 0; >> - tp->rfbuf_cnt = 0; >> - >> switch (tp->t_state) { >> /* >> >> Modified: head/sys/netinet/tcp_var.h >> ============================================================================== >> >> --- head/sys/netinet/tcp_var.h Mon Apr 10 06:19:09 2017 (r316675) >> +++ head/sys/netinet/tcp_var.h Mon Apr 10 08:19:35 2017 (r316676) >> @@ -778,6 +778,8 @@ void hhook_run_tcp_est_in(struct tcpcb * >> #endif >> int tcp_input(struct mbuf **, int *, int); >> +int tcp_autorcvbuf(struct mbuf *, struct tcphdr *, struct socket *, >> + struct tcpcb *, int); >> void tcp_do_segment(struct mbuf *, struct tcphdr *, >> struct socket *, struct tcpcb *, int, int, uint8_t, >> int); >> >> > From owner-svn-src-head@freebsd.org Mon Apr 10 15:32:27 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58D58D37D53; Mon, 10 Apr 2017 15:32:27 +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 29577E8C; Mon, 10 Apr 2017 15:32:27 +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 v3AFWQhd004168; Mon, 10 Apr 2017 15:32:26 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3AFWQvO004167; Mon, 10 Apr 2017 15:32:26 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201704101532.v3AFWQvO004167@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 10 Apr 2017 15:32:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316679 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Apr 2017 15:32:27 -0000 Author: kib Date: Mon Apr 10 15:32:26 2017 New Revision: 316679 URL: https://svnweb.freebsd.org/changeset/base/316679 Log: Do not lose dirty bits for removing PROT_WRITE on arm64. Arm64 pmap interprets accessed writable ptes as modified, since ARMv8.0 does not track Dirty Bit Modifier in hardware. If writable bit is removed, page must be marked as dirty for MI VM. This change is most important for COW, where fork caused losing content of the dirty pages which were not yet scanned by pagedaemon. Reviewed by: alc, andrew Reported and tested by: Mark Millard PR: 217138, 217239 Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/arm64/arm64/pmap.c Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Mon Apr 10 12:35:58 2017 (r316678) +++ head/sys/arm64/arm64/pmap.c Mon Apr 10 15:32:26 2017 (r316679) @@ -2481,6 +2481,11 @@ pmap_protect(pmap_t pmap, vm_offset_t sv sva += L3_SIZE) { l3 = pmap_load(l3p); if (pmap_l3_valid(l3)) { + if ((l3 & ATTR_SW_MANAGED) && + pmap_page_dirty(l3)) { + vm_page_dirty(PHYS_TO_VM_PAGE(l3 & + ~ATTR_MASK)); + } pmap_set(l3p, ATTR_AP(ATTR_AP_RO)); PTE_SYNC(l3p); /* XXX: Use pmap_invalidate_range */ From owner-svn-src-head@freebsd.org Mon Apr 10 17:05:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70F25D37279; Mon, 10 Apr 2017 17:05:56 +0000 (UTC) (envelope-from bms@fastmail.net) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38A72C62; Mon, 10 Apr 2017 17:05:55 +0000 (UTC) (envelope-from bms@fastmail.net) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 7774820AAE; Mon, 10 Apr 2017 13:05:49 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Mon, 10 Apr 2017 13:05:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.net; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=rFDYadD/totDgU+Zi9 xBtWSFRm1LaIDHDxkvZY39H7Y=; b=fB4S0R7ZB4fi+RZlJAJOMC+HC2yKzoMw+F 31swXsMLs7QiBcDXdcSjwOIXE4a/Vx85zEnGrJHMQ2pHoj7YY4Wm8IWLmEJy4Rgi 6QSQhdJz9lgyIIZft8libcMUupS52mCiMeso2HH75pXU53oteubLfdya5PYxdG7a 7UZ+dk4zNBkfWPQ2zC92GMpJL/dAM1Mk7agULuoiohua4ppJJGY89vR92U4Ic2+m R+jl4UNnkSKCOq10eUFRg/XDqfm+qGVr8rQvGm0exxTGOXySrbF3X+iiZqXoQB+M 5QjVBdKdIufB7VA0lRiDZRZJfn7PMdWCtYUV1CGKRs5ryofCXb3Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=rFDYadD/totDgU+Zi9xBtWSFRm1LaIDHDxkvZY39H7Y=; b=kb8iiOhm PyV0Cu+Cv9SQKgHU87uciLRN/+FG2pQQsi8czz6hq8+5PHhojp2uejDWM/GamQTf sjWr2myKqNsPRwtbNb9Y3d9egUdU9vFN6BwNhxPejXUg6fSZGkmkWX17koDzEbrN yp1qTRC/niWwonWkafvFAiPP4Y5aHjq8Zh1Hfzr/ZwnOMpNLID4L0/TVkrzjxGRc vIH5xhD6qAtto/ofuMXysMjHcXekhsCCf2aXZAq7PauM/I7QTThWGjCZvPUc63Jz 1EPKwEFo0jIf5PS/QWhZQfIIng9JXkSQKcPzVhynPNuWAbESICnWhFUaLxYbpc4L Iv2Uk8+lYLD9UQ== X-ME-Sender: X-Sasl-enc: 0D3zZ2Q6HkFfAawxa/sWtoIH/+Fm00lu7wUY+X9ktptf 1491843949 Received: from [192.168.1.88] (cpc96954-walt26-2-0-cust843.13-2.cable.virginm.net [82.31.91.76]) by mail.messagingengine.com (Postfix) with ESMTPA id D2AED7E168; Mon, 10 Apr 2017 13:05:48 -0400 (EDT) Subject: Re: svn commit: r316676 - in head/sys/netinet: . tcp_stacks To: Steven Hartland , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201704100819.v3A8JZCh014531@repo.freebsd.org> From: Bruce Simpson Message-ID: <68e9768e-0562-6d2e-8934-689fb85235a7@fastmail.net> Date: Mon, 10 Apr 2017 18:05:48 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <201704100819.v3A8JZCh014531@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Apr 2017 17:05:56 -0000 This is a really good thing to have in. Thanks, Steven and others, for optimizing for this big case. From owner-svn-src-head@freebsd.org Mon Apr 10 17:16:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2985D37648; Mon, 10 Apr 2017 17:16:00 +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 AB9F1615; Mon, 10 Apr 2017 17:16:00 +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 v3AHFx5g046836; Mon, 10 Apr 2017 17:15:59 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3AHFxlq046835; Mon, 10 Apr 2017 17:15:59 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201704101715.v3AHFxlq046835@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 10 Apr 2017 17:15:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316681 - head/sys/geom/mirror X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Apr 2017 17:16:01 -0000 Author: markj Date: Mon Apr 10 17:15:59 2017 New Revision: 316681 URL: https://svnweb.freebsd.org/changeset/base/316681 Log: Handle NULL entries in gmirror disk ds_bios arrays. Entries may be removed and freed if an I/O error occurs during mirror synchronization, so we cannot assume that all entries of ds_bios are valid. Also ensure that a synchronization BIO's array index is preserved after a successful write. Reported and tested by: pho MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/sys/geom/mirror/g_mirror.c Modified: head/sys/geom/mirror/g_mirror.c ============================================================================== --- head/sys/geom/mirror/g_mirror.c Mon Apr 10 16:09:19 2017 (r316680) +++ head/sys/geom/mirror/g_mirror.c Mon Apr 10 17:15:59 2017 (r316681) @@ -1304,11 +1304,13 @@ g_mirror_sync_release(struct g_mirror_so static void g_mirror_sync_request_free(struct g_mirror_disk *disk, struct bio *bp) { - int i; + int idx; if (disk != NULL && disk->d_sync.ds_bios != NULL) { - i = (int)(uintptr_t)bp->bio_caller1; - disk->d_sync.ds_bios[i] = NULL; + idx = (int)(uintptr_t)bp->bio_caller1; + KASSERT(disk->d_sync.ds_bios[idx] == bp, + ("unexpected sync BIO at %p:%d", disk, idx)); + disk->d_sync.ds_bios[idx] = NULL; } free(bp->bio_data, M_MIRROR); g_destroy_bio(bp); @@ -1375,7 +1377,7 @@ g_mirror_sync_request(struct bio *bp) { off_t offset; void *data; - int i; + int i, idx; KFAIL_POINT_ERROR(DEBUG_FP, g_mirror_sync_request_write, bp->bio_error); @@ -1413,6 +1415,7 @@ g_mirror_sync_request(struct bio *bp) /* Send next synchronization request. */ data = bp->bio_data; + idx = (int)(uintptr_t)bp->bio_caller1; g_reset_bio(bp); bp->bio_cmd = BIO_READ; bp->bio_offset = sync->ds_offset; @@ -1422,6 +1425,7 @@ g_mirror_sync_request(struct bio *bp) bp->bio_data = data; bp->bio_from = sync->ds_consumer; bp->bio_to = sc->sc_provider; + bp->bio_caller1 = (void *)(uintptr_t)idx; G_MIRROR_LOGREQ(3, bp, "Sending synchronization request."); sync->ds_consumer->index++; /* @@ -1439,7 +1443,7 @@ g_mirror_sync_request(struct bio *bp) offset = sc->sc_mediasize; for (i = 0; i < g_mirror_syncreqs; i++) { bp = sync->ds_bios[i]; - if (bp->bio_offset < offset) + if (bp != NULL && bp->bio_offset < offset) offset = bp->bio_offset; } if (sync->ds_offset_done + (MAXPHYS * 100) < offset) { From owner-svn-src-head@freebsd.org Mon Apr 10 17:23:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D801FD37B96; Mon, 10 Apr 2017 17:23:22 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) by mx1.freebsd.org (Postfix) with ESMTP id C726DE84; Mon, 10 Apr 2017 17:23:19 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Subject: Re: svn commit: r316648 - in head/sys: amd64/amd64 amd64/include arm/arm arm/include arm64/include cddl/dev/dtrace/aarch64 cddl/dev/dtrace/amd64 cddl/dev/dtrace/arm cddl/dev/dtrace/i386 cddl/dev/dtrace... To: Patrick Kelsey , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201704090200.v39203Vf072867@repo.freebsd.org> From: Jung-uk Kim Message-ID: <0da40261-7829-8d63-c4aa-775a028367a2@FreeBSD.org> Date: Mon, 10 Apr 2017 13:23:04 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.0 MIME-Version: 1.0 In-Reply-To: <201704090200.v39203Vf072867@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="q1QRfIsUf1EHVoJpE1712dtiNcPGqbBK1" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Apr 2017 17:23:22 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --q1QRfIsUf1EHVoJpE1712dtiNcPGqbBK1 Content-Type: multipart/mixed; boundary="vMuji50HhwuDT5VqX6l3cgAiJRGX2ctiO"; protected-headers="v1" From: Jung-uk Kim To: Patrick Kelsey , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <0da40261-7829-8d63-c4aa-775a028367a2@FreeBSD.org> Subject: Re: svn commit: r316648 - in head/sys: amd64/amd64 amd64/include arm/arm arm/include arm64/include cddl/dev/dtrace/aarch64 cddl/dev/dtrace/amd64 cddl/dev/dtrace/arm cddl/dev/dtrace/i386 cddl/dev/dtrace... References: <201704090200.v39203Vf072867@repo.freebsd.org> In-Reply-To: <201704090200.v39203Vf072867@repo.freebsd.org> --vMuji50HhwuDT5VqX6l3cgAiJRGX2ctiO Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: quoted-printable On 04/08/2017 22:00, Patrick Kelsey wrote: > Author: pkelsey > Date: Sun Apr 9 02:00:03 2017 > New Revision: 316648 > URL: https://svnweb.freebsd.org/changeset/base/316648 >=20 > Log: > Corrected misspelled versions of rendezvous. > =20 > The MFC will include a compat definition of smp_no_rendevous_barrier(= ) > that calls smp_no_rendezvous_barrier(). > =20 > Reviewed by: gnn, kib > MFC after: 1 week > Differential Revision: https://reviews.freebsd.org/D10313 =2E.. We knew about the problem but we didn't fix it because it breaks KPI. For example, sysutils/virtualbox-ose-kmod. If you really want to MFC this change, you have to implement shims. Jung-uk Kim --vMuji50HhwuDT5VqX6l3cgAiJRGX2ctiO-- --q1QRfIsUf1EHVoJpE1712dtiNcPGqbBK1 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEl1bqgKaRyqfWXu/CfJ+WJvzb8UYFAljrv4UACgkQfJ+WJvzb 8UaGDwf/QRKyUXTynN5TbMmYNN36+q64XuRxRa8450kzb35093lC9sc0XyBxzWVk FLCOoFKALe+daXyIvXIjht1tz8SQY9rcZg7J7IJ5ZCdefhuSycUG8pxKDOkDmTVA oM9WAQ+H/6Z2QcnSVaAayQkCk1e7SXIuFn3LhsMmM+sVZS2FFUNft7yfpQKQKFv5 HJIoiz4jPOPUv1Ex8sWsECMCsWxAaYNmIo3r57wwTR2cuDwRjChwgUnEnjYRlSTk bnHJY3g+tcV+KylGMILyhwb2CHuMrlh4UY5P9tEZTxgRz6XAFQacOi/pW32IzeAE pfmXWwaljcwJRe+jEHPhOn9LGa2rGA== =uI0u -----END PGP SIGNATURE----- --q1QRfIsUf1EHVoJpE1712dtiNcPGqbBK1-- From owner-svn-src-head@freebsd.org Mon Apr 10 17:26:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 275ECD37C8F; Mon, 10 Apr 2017 17:26:46 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) by mx1.freebsd.org (Postfix) with ESMTP id 29A0283; Mon, 10 Apr 2017 17:26:42 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Subject: Re: svn commit: r316648 - in head/sys: amd64/amd64 amd64/include arm/arm arm/include arm64/include cddl/dev/dtrace/aarch64 cddl/dev/dtrace/amd64 cddl/dev/dtrace/arm cddl/dev/dtrace/i386 cddl/dev/dtrace... To: Patrick Kelsey , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201704090200.v39203Vf072867@repo.freebsd.org> <0da40261-7829-8d63-c4aa-775a028367a2@FreeBSD.org> From: Jung-uk Kim Message-ID: <7472f248-0dac-dd6c-da91-25e579e0631e@FreeBSD.org> Date: Mon, 10 Apr 2017 13:26:35 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.0 MIME-Version: 1.0 In-Reply-To: <0da40261-7829-8d63-c4aa-775a028367a2@FreeBSD.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="vUiMNhfSbNFda01EdsAJnEAv5VOU3qjhL" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Apr 2017 17:26:46 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --vUiMNhfSbNFda01EdsAJnEAv5VOU3qjhL Content-Type: multipart/mixed; boundary="l069xuQ9bgnNn0RULMcCfXANxn0Q2NaUF"; protected-headers="v1" From: Jung-uk Kim To: Patrick Kelsey , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <7472f248-0dac-dd6c-da91-25e579e0631e@FreeBSD.org> Subject: Re: svn commit: r316648 - in head/sys: amd64/amd64 amd64/include arm/arm arm/include arm64/include cddl/dev/dtrace/aarch64 cddl/dev/dtrace/amd64 cddl/dev/dtrace/arm cddl/dev/dtrace/i386 cddl/dev/dtrace... References: <201704090200.v39203Vf072867@repo.freebsd.org> <0da40261-7829-8d63-c4aa-775a028367a2@FreeBSD.org> In-Reply-To: <0da40261-7829-8d63-c4aa-775a028367a2@FreeBSD.org> --l069xuQ9bgnNn0RULMcCfXANxn0Q2NaUF Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: quoted-printable On 04/10/2017 13:23, Jung-uk Kim wrote: > On 04/08/2017 22:00, Patrick Kelsey wrote: >> Author: pkelsey >> Date: Sun Apr 9 02:00:03 2017 >> New Revision: 316648 >> URL: https://svnweb.freebsd.org/changeset/base/316648 >> >> Log: >> Corrected misspelled versions of rendezvous. >> =20 >> The MFC will include a compat definition of smp_no_rendevous_barrier= () >> that calls smp_no_rendezvous_barrier(). >> =20 >> Reviewed by: gnn, kib >> MFC after: 1 week >> Differential Revision: https://reviews.freebsd.org/D10313 > ... >=20 > We knew about the problem but we didn't fix it because it breaks KPI. > For example, sysutils/virtualbox-ose-kmod. If you really want to MFC > this change, you have to implement shims. Actually, I meant to say current also needs a shim. Otherwise, _FreeBSD_version must be bumped. Sorry, I wasn't clear about this. Jung-uk Kim --l069xuQ9bgnNn0RULMcCfXANxn0Q2NaUF-- --vUiMNhfSbNFda01EdsAJnEAv5VOU3qjhL Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEl1bqgKaRyqfWXu/CfJ+WJvzb8UYFAljrwE4ACgkQfJ+WJvzb 8UZhogf/ZgdQ7QI1d8H+88OurskP4oVCYGLiz2tkt8rNbXxbEH01RmntIVgkxTKu OgeAY6dtRHHaSwSKlH+AWTtxmOIL+pwZEFcAwev9ZRbI8zbXouNM46E/zg9LbbhW 0BuAdkqlbz0gLDmt0luE1G8wf/b+BhFDsQWyaNe+pJm1PmDRyNfcYhmL2Q5/yb7m kJbAODpcETOR6K/KrxtSlBi7bORFyWfffX729HGraT/7TUEINzCZbuPV1ilNXCT6 iuLHEokEBIvFFr2/W8jzlQxCio+v+DP2x0gBumQBr/eoSiIa13yGV6W7rccuNNi7 E6dU+lsPymtCpKr7oQHRQpfFpDAlnw== =mDQZ -----END PGP SIGNATURE----- --vUiMNhfSbNFda01EdsAJnEAv5VOU3qjhL-- From owner-svn-src-head@freebsd.org Mon Apr 10 17:42:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 249EAD3721D; Mon, 10 Apr 2017 17:42:40 +0000 (UTC) (envelope-from pkelsey@gmail.com) Received: from mail-pf0-x234.google.com (mail-pf0-x234.google.com [IPv6:2607:f8b0:400e:c00::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 E7243CBD; Mon, 10 Apr 2017 17:42:39 +0000 (UTC) (envelope-from pkelsey@gmail.com) Received: by mail-pf0-x234.google.com with SMTP id i5so36585977pfc.2; Mon, 10 Apr 2017 10:42:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=BODPESfqF0rhFUOGYI+n6EecFVSVMKS6Sf+IWETZeRs=; b=Y3wiXOvgISkbRxRbATYFcXWAQphnmTeILCn+vW+3AkQ4p67Prosgoch8Htie2gfW14 7SQCkSLvTC0Zm7X3HxcFHEw4Cg/dNY9LPc5xP4BwTf8Mdf9kKkEN2d6x8pMF80Vg1tr1 5EZf2Cir4UM9411Pmob8S9nYnYYMexjH7gGAZzYEnsm3spTo7+G1mMBlVnKCyBKH/VNJ MTEVYu0sLhYT0ympC3rqvJCVChoCZU77GCiukdvezDH0TPnR5IkgGIvOoTYaPOH7ydZQ eEsJqOSWKpfRl2ovaCY1qxXbo578cFdFX9djYA6xo56KKMJXXgXrSqzOny80dNLXC+SW XPMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=BODPESfqF0rhFUOGYI+n6EecFVSVMKS6Sf+IWETZeRs=; b=T/w3fd/0w4SV4yYF4AGSKSgCeIBPBTJ1pjvmrDdRkSRLbDCmzFQNUwOBSRMVJyYDcl NM3hynat79laC1hHjqGQxpQJPifK/kONzdz1viJQwBiwfT6nAA0Lq9l6vvU0TwZMgUEj tzTHtZitWjWU257lRveqEHw2qS5p7huLkxCgBA7SKF/FWMUJRhAdRcCydfxfBTV3pEcF jFLWZ7HF7iUbwn5XNjHu9sBccgLPOagWrZD0ajn7aAM2AZiV3Y+RsARonbGRdBvfJduv fSsTS5PB/+TN11avy0FddUwXHpEFHQGD/52thLlCAHlzgGzY8Mxl/Y6FVRLlxxIcObf/ R4AQ== X-Gm-Message-State: AFeK/H2OB3MWswoV6Bh+F2usBsdcd8mzBtC5gZQPFi5xnK1IRvq8Il+mEZ4uTk86YoaRJ8V0fNLn96Sj+CXfGw== X-Received: by 10.99.117.8 with SMTP id q8mr50861553pgc.106.1491846159301; Mon, 10 Apr 2017 10:42:39 -0700 (PDT) MIME-Version: 1.0 Sender: pkelsey@gmail.com Received: by 10.100.162.34 with HTTP; Mon, 10 Apr 2017 10:42:38 -0700 (PDT) In-Reply-To: <7472f248-0dac-dd6c-da91-25e579e0631e@FreeBSD.org> References: <201704090200.v39203Vf072867@repo.freebsd.org> <0da40261-7829-8d63-c4aa-775a028367a2@FreeBSD.org> <7472f248-0dac-dd6c-da91-25e579e0631e@FreeBSD.org> From: Patrick Kelsey Date: Mon, 10 Apr 2017 13:42:38 -0400 X-Google-Sender-Auth: OlQ6dq6ECd_YtXrhcQG_WqggVCE Message-ID: Subject: Re: svn commit: r316648 - in head/sys: amd64/amd64 amd64/include arm/arm arm/include arm64/include cddl/dev/dtrace/aarch64 cddl/dev/dtrace/amd64 cddl/dev/dtrace/arm cddl/dev/dtrace/i386 cddl/dev/dtrace... To: Jung-uk Kim Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Apr 2017 17:42:40 -0000 On Mon, Apr 10, 2017 at 1:26 PM, Jung-uk Kim wrote: > On 04/10/2017 13:23, Jung-uk Kim wrote: > > On 04/08/2017 22:00, Patrick Kelsey wrote: > >> Author: pkelsey > >> Date: Sun Apr 9 02:00:03 2017 > >> New Revision: 316648 > >> URL: https://svnweb.freebsd.org/changeset/base/316648 > >> > >> Log: > >> Corrected misspelled versions of rendezvous. > >> > >> The MFC will include a compat definition of smp_no_rendevous_barrier() > >> that calls smp_no_rendezvous_barrier(). > >> > >> Reviewed by: gnn, kib > >> MFC after: 1 week > >> Differential Revision: https://reviews.freebsd.org/D10313 > > ... > > > > We knew about the problem but we didn't fix it because it breaks KPI. > > For example, sysutils/virtualbox-ose-kmod. If you really want to MFC > > this change, you have to implement shims. > > Actually, I meant to say current also needs a shim. Otherwise, > _FreeBSD_version must be bumped. > > Sorry, I wasn't clear about this. > > I'm glad you clarified, as I was reading your last message just now wondering what I was missing. With respect to current, the intention is for the misspelled version to be gone in 12. The lack of a version bump was due to my misunderstanding of whether KPI changes were or weren't being tracked in __FreeBSD_version prior to a .0 release, but now that I've gone and found 1.6 in the Porter's Handbook, it's clear that they are. Thanks for catching this. -Patrick From owner-svn-src-head@freebsd.org Mon Apr 10 17:57:57 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD7B8D37B4F; Mon, 10 Apr 2017 17:57:57 +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 70D43990; Mon, 10 Apr 2017 17:57:57 +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 v3AHvunR063598; Mon, 10 Apr 2017 17:57:56 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3AHvu4J063594; Mon, 10 Apr 2017 17:57:56 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201704101757.v3AHvu4J063594@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Mon, 10 Apr 2017 17:57:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316682 - in head/sys/boot: ofw/libofw sparc64/loader X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Apr 2017 17:57:57 -0000 Author: tsoome Date: Mon Apr 10 17:57:56 2017 New Revision: 316682 URL: https://svnweb.freebsd.org/changeset/base/316682 Log: loader: r316585 did miss sparc/ofw This update does add the code to pass partition size to vdev_probe() via simple callback. Tested via tinderbox build, but not yet with actual boot. The code can be improved still, but to verify the idea to read media block size and amedia size has to be confirmed first. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D10302 Modified: head/sys/boot/ofw/libofw/ofw_disk.c head/sys/boot/ofw/libofw/openfirm.c head/sys/boot/ofw/libofw/openfirm.h head/sys/boot/sparc64/loader/main.c Modified: head/sys/boot/ofw/libofw/ofw_disk.c ============================================================================== --- head/sys/boot/ofw/libofw/ofw_disk.c Mon Apr 10 17:15:59 2017 (r316681) +++ head/sys/boot/ofw/libofw/ofw_disk.c Mon Apr 10 17:57:56 2017 (r316682) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include "bootstrap.h" #include "libofw.h" @@ -154,11 +155,26 @@ ofwd_close(struct open_file *f) } static int -ofwd_ioctl(struct open_file *f __unused, u_long cmd __unused, - void *data __unused) +ofwd_ioctl(struct open_file *f, u_long cmd, void *data) { + struct ofw_devdesc *dev = f->f_devdata; + int block_size; + unsigned int n; - return (EINVAL); + switch (cmd) { + case DIOCGSECTORSIZE: + block_size = OF_block_size(dev->d_handle); + *(u_int *)data = block_size; + break; + case DIOCGMEDIASIZE: + block_size = OF_block_size(dev->d_handle); + n = OF_blocks(dev->d_handle); + *(uint64_t *)data = (uint64_t)(n * block_size); + break; + default: + return (ENOTTY); + } + return (0); } static int Modified: head/sys/boot/ofw/libofw/openfirm.c ============================================================================== --- head/sys/boot/ofw/libofw/openfirm.c Mon Apr 10 17:15:59 2017 (r316681) +++ head/sys/boot/ofw/libofw/openfirm.c Mon Apr 10 17:57:56 2017 (r316682) @@ -622,6 +622,53 @@ OF_seek(ihandle_t instance, u_int64_t po return (args.status); } +/* Blocks. */ +unsigned int +OF_blocks(ihandle_t instance) +{ + static struct { + cell_t name; + cell_t nargs; + cell_t nreturns; + cell_t instance; + cell_t result; + cell_t blocks; + } args = { + (cell_t)"#blocks", + 2, + 1, + }; + + args.instance = instance; + if (openfirmware(&args) == -1) + return ((unsigned int)-1); + return (args.blocks); +} + +/* Block size. */ +int +OF_block_size(ihandle_t instance) +{ + static struct { + cell_t name; + cell_t nargs; + cell_t nreturns; + cell_t instance; + cell_t result; + cell_t size; + } args = { + (cell_t)"block-size", + 2, + 1, + }; + + args.instance = instance; + if (openfirmware(&args) == -1) + return (512); + return (args.size); +} + +/* /* * Memory functions */ Modified: head/sys/boot/ofw/libofw/openfirm.h ============================================================================== --- head/sys/boot/ofw/libofw/openfirm.h Mon Apr 10 17:15:59 2017 (r316681) +++ head/sys/boot/ofw/libofw/openfirm.h Mon Apr 10 17:57:56 2017 (r316682) @@ -105,6 +105,8 @@ void OF_close(ihandle_t); int OF_read(ihandle_t, void *, int); int OF_write(ihandle_t, void *, int); int OF_seek(ihandle_t, u_quad_t); +unsigned int OF_blocks(ihandle_t); +int OF_block_size(ihandle_t); /* Memory functions */ void *OF_claim(void *, u_int, u_int); Modified: head/sys/boot/sparc64/loader/main.c ============================================================================== --- head/sys/boot/sparc64/loader/main.c Mon Apr 10 17:15:59 2017 (r316681) +++ head/sys/boot/sparc64/loader/main.c Mon Apr 10 17:57:56 2017 (r316682) @@ -735,6 +735,16 @@ tlb_init_sun4u(void) } #ifdef LOADER_ZFS_SUPPORT + +/* Set by sparc64_zfs_probe to provide partition size. */ +static size_t part_size; + +uint64_t +ldi_get_size(void *priv __unused) +{ + return ((uint64_t)part_size); +} + static void sparc64_zfs_probe(void) { @@ -742,13 +752,11 @@ sparc64_zfs_probe(void) char alias[64], devname[sizeof(alias) + sizeof(":x") - 1]; char type[sizeof("device_type")]; char *bdev, *dev, *odev; - uint64_t guid; + uint64_t guid, *guidp; int fd, len, part; phandle_t aliases, options; - /* Get the GUID of the ZFS pool on the boot device. */ guid = 0; - zfs_probe_dev(bootpath, &guid); /* * Get the GUIDs of the ZFS pools on any additional disks listed in @@ -771,12 +779,6 @@ sparc64_zfs_probe(void) continue; strcpy(alias, dev); (void)OF_getprop(aliases, dev, alias, sizeof(alias)); - /* - * Don't probe the boot disk twice. Note that bootpath - * includes the partition specifier. - */ - if (strncmp(alias, bootpath, strlen(alias)) == 0) - continue; if (OF_getprop(OF_finddevice(alias), "device_type", type, sizeof(type)) == -1) continue; @@ -798,8 +800,14 @@ sparc64_zfs_probe(void) if (part == 2 || vtoc.part[part].tag != VTOC_TAG_FREEBSD_ZFS) continue; + part_size = vtoc.map[part].nblks; (void)sprintf(devname, "%s:%c", alias, part + 'a'); - if (zfs_probe_dev(devname, NULL) == ENXIO) + /* Get the GUID of the ZFS pool on the boot device. */ + if (strcmp(devname, bootpath) == 0) + guidp = &guid; + else + guidp = NULL; + if (zfs_probe_dev(devname, guidp) == ENXIO) break; } } From owner-svn-src-head@freebsd.org Mon Apr 10 17:59:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9473D37C30; Mon, 10 Apr 2017 17:59:30 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB4C4AFB; Mon, 10 Apr 2017 17:59:30 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3AHxTko063702; Mon, 10 Apr 2017 17:59:29 GMT (envelope-from pkelsey@FreeBSD.org) Received: (from pkelsey@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3AHxTfg063701; Mon, 10 Apr 2017 17:59:29 GMT (envelope-from pkelsey@FreeBSD.org) Message-Id: <201704101759.v3AHxTfg063701@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pkelsey set sender to pkelsey@FreeBSD.org using -f From: Patrick Kelsey Date: Mon, 10 Apr 2017 17:59:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316683 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Apr 2017 17:59:31 -0000 Author: pkelsey Date: Mon Apr 10 17:59:29 2017 New Revision: 316683 URL: https://svnweb.freebsd.org/changeset/base/316683 Log: Bump __FreeBSD_version due to r316648, rename of smp_no_redevous_barrier() to smp_no_rendezvous_barrier() Reported by: jkim Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Mon Apr 10 17:57:56 2017 (r316682) +++ head/sys/sys/param.h Mon Apr 10 17:59:29 2017 (r316683) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1200027 /* Master, propagated to newvers */ +#define __FreeBSD_version 1200028 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-head@freebsd.org Mon Apr 10 18:10:08 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0419D37EE1; Mon, 10 Apr 2017 18:10:08 +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 CEEF8331; Mon, 10 Apr 2017 18:10:08 +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 E988A10A87D; Mon, 10 Apr 2017 14:10:06 -0400 (EDT) From: John Baldwin To: Olivier Houchard Cc: Conrad Meyer , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r316665 - in head/sys: compat/linuxkpi/common/src contrib/ck/include contrib/ck/src Date: Mon, 10 Apr 2017 10:31:43 -0700 Message-ID: <7068804.e9AF6kJOBM@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <20170409230840.GA90254@ci0.org> References: <201704092102.v39L25oh040066@repo.freebsd.org> <20170409230840.GA90254@ci0.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, 10 Apr 2017 14:10:07 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Apr 2017 18:10:09 -0000 On Monday, April 10, 2017 01:08:40 AM Olivier Houchard wrote: > On Sun, Apr 09, 2017 at 03:49:57PM -0700, Conrad Meyer wrote: > > On Sun, Apr 9, 2017 at 2:02 PM, Olivier Houchard wrote: > > > Author: cognet > > > Date: Sun Apr 9 21:02:05 2017 > > > New Revision: 316665 > > > URL: https://svnweb.freebsd.org/changeset/base/316665 > > > > > > Log: > > > Import CK as of commit 6b141c0bdd21ce8b3e14147af8f87f22b20ecf32 > > > This brings us changes we needed in ck_epoch. > > > > Out of curiosity ??? what changes did we need, and why? > > > > Hi Conrad, > > What ck_epoch lacked was any way to do priority propagation, which led > to some nice deadlocks to the linuxkpi folks. This type of information should be in the commit log in future commits. -- John Baldwin From owner-svn-src-head@freebsd.org Mon Apr 10 18:10:13 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBAA0D37F09; Mon, 10 Apr 2017 18:10:13 +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 B871E378; Mon, 10 Apr 2017 18:10:13 +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 8A79F10A82D; Mon, 10 Apr 2017 14:10:05 -0400 (EDT) From: John Baldwin To: Jung-uk Kim Cc: Patrick Kelsey , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r316648 - in head/sys: amd64/amd64 amd64/include arm/arm arm/include arm64/include cddl/dev/dtrace/aarch64 cddl/dev/dtrace/amd64 cddl/dev/dtrace/arm cddl/dev/dtrace/i386 cddl/dev/dtrace... Date: Mon, 10 Apr 2017 10:43:12 -0700 Message-ID: <3233183.B722KJrnTC@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <0da40261-7829-8d63-c4aa-775a028367a2@FreeBSD.org> References: <201704090200.v39203Vf072867@repo.freebsd.org> <0da40261-7829-8d63-c4aa-775a028367a2@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, 10 Apr 2017 14:10:05 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Apr 2017 18:10:14 -0000 On Monday, April 10, 2017 01:23:04 PM Jung-uk Kim wrote: > On 04/08/2017 22:00, Patrick Kelsey wrote: > > Author: pkelsey > > Date: Sun Apr 9 02:00:03 2017 > > New Revision: 316648 > > URL: https://svnweb.freebsd.org/changeset/base/316648 > > > > Log: > > Corrected misspelled versions of rendezvous. > > > > The MFC will include a compat definition of smp_no_rendevous_barrier() > > that calls smp_no_rendezvous_barrier(). > > > > Reviewed by: gnn, kib > > MFC after: 1 week > > Differential Revision: https://reviews.freebsd.org/D10313 > ... > > We knew about the problem but we didn't fix it because it breaks KPI. > For example, sysutils/virtualbox-ose-kmod. If you really want to MFC > this change, you have to implement shims. Also, the function isn't actually called, but is only used in comparisons in smp_rendezvous_action(). To do a compat shim you will need to either change these comparisons to compare against both function pointers or define the alternate symbol as an alias of the existing function. That only helps the KBI though. For the KPI would just use a #define to point to the new name. Also, as Jung-uk notes, this already breaks virtualbox on HEAD, so you will need to patch the port now, not only if you MFC. -- John Baldwin From owner-svn-src-head@freebsd.org Mon Apr 10 18:21:32 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14FFAD374EB; Mon, 10 Apr 2017 18:21:32 +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 DB13CFA7; Mon, 10 Apr 2017 18:21:31 +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 v3AILVGn074190; Mon, 10 Apr 2017 18:21:31 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3AILVs5074189; Mon, 10 Apr 2017 18:21:31 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201704101821.v3AILVs5074189@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 10 Apr 2017 18:21:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316684 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Apr 2017 18:21:32 -0000 Author: emaste Date: Mon Apr 10 18:21:30 2017 New Revision: 316684 URL: https://svnweb.freebsd.org/changeset/base/316684 Log: Make WITHOUT_TOOLCHAIN imply WITHOUT_LLD. LLD is a toolchain component. Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Mon Apr 10 17:59:29 2017 (r316683) +++ head/share/mk/src.opts.mk Mon Apr 10 18:21:30 2017 (r316684) @@ -408,6 +408,7 @@ MK_CLANG:= no MK_GCC:= no MK_GDB:= no MK_INCLUDES:= no +MK_LLD:= no MK_LLDB:= no .endif From owner-svn-src-head@freebsd.org Mon Apr 10 19:22:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89FC7D37D8D; Mon, 10 Apr 2017 19:22:16 +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 56FC71C8; Mon, 10 Apr 2017 19:22:16 +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 v3AJMF67001218; Mon, 10 Apr 2017 19:22:15 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3AJMFEK001217; Mon, 10 Apr 2017 19:22:15 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201704101922.v3AJMFEK001217@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 10 Apr 2017 19:22:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316685 - head/contrib/elftoolchain/libelf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Apr 2017 19:22:16 -0000 Author: emaste Date: Mon Apr 10 19:22:15 2017 New Revision: 316685 URL: https://svnweb.freebsd.org/changeset/base/316685 Log: libelf: add an assert that msz is non-zero Reported by: Coverity CID: 976023 Modified: head/contrib/elftoolchain/libelf/elf_update.c Modified: head/contrib/elftoolchain/libelf/elf_update.c ============================================================================== --- head/contrib/elftoolchain/libelf/elf_update.c Mon Apr 10 18:21:30 2017 (r316684) +++ head/contrib/elftoolchain/libelf/elf_update.c Mon Apr 10 19:22:15 2017 (r316685) @@ -808,6 +808,7 @@ _libelf_write_scn(Elf *e, unsigned char assert(d->d_buf != NULL); assert(d->d_version == e->e_version); + assert(msz != 0); assert(d->d_size % msz == 0); nobjects = (size_t) (d->d_size / msz); From owner-svn-src-head@freebsd.org Mon Apr 10 19:40:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE598D37597 for ; Mon, 10 Apr 2017 19:40:37 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail-io0-x231.google.com (mail-io0-x231.google.com [IPv6:2607:f8b0:4001:c06::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6BBF91DA for ; Mon, 10 Apr 2017 19:40:37 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: by mail-io0-x231.google.com with SMTP id r16so53529731ioi.2 for ; Mon, 10 Apr 2017 12:40:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sippysoft-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=YwLfaDvJ3jOj0sxFtz/I4C+OqWxRBYOhuoYPierNsYI=; b=AqaX/fO/hcZhWtSt6X2l+VrQ2JGChACMpwo6orE7ZlLhupRpf+ZBSnQmnpBJOE0zvG mFnnyou8Phj2Z1elB8rTop04Y8KSRulyiRXSJref/7hByh95QOjy5AZS1tT2xcs55fMO 3bluvHtZczhnw7N28a/cfcnBMXmVCBlzKNEOPeVNQYkgLnz+XZxLFcb6BF0nNWG3wNpP OhuN5BjG5MMh9+3ON+zItGc9Dy39xRTGL49U8qCy4SZy6b0A70zyT0gVFFWyvrKuMVUb k7w0gXk+NL0v92tbHWk98xd9vkKhkRDpWzJciG6x5ADeIAu1iude++cTDkmjr83mm9We GUmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=YwLfaDvJ3jOj0sxFtz/I4C+OqWxRBYOhuoYPierNsYI=; b=gIv3oMGXFnosX0Z43gENDbK1IjU20pXhLTtuc1fbz1Lhd+PaTcVsjlEGUL6YUXWIUz NRCH6173+J8xm7MSDJ2rD2fsiCrTgQ5gP0gihLOYhzf1DnFLQSSIPRXImj5DQGTRotyc oZOKNHFbEKQdMl58CllwIpGkQj5TKg95R5U4hwwGSbLVzCZZU9+nHQZ+BPvwiAzsVyB2 gKilCZf9bwfUImuE25XoLvKZyuHcr9O93gLSqtKrlMfh2RoIIG4qOKOngZ000hCHFbyC lgvDQIBtYv82vnE7iyAOXOUH0uFlgJ+9J809Gx0mNKs7EPRoNAcY92KghDCg4XNImNV6 UILQ== X-Gm-Message-State: AN3rC/7xGafX3OFbEgstu6TleREADeXzW2w3fSukDBrTfKCz/bFcC6hUxqzmD+k4ttFZSAZhbh74KkxRHYvAxipG X-Received: by 10.36.170.68 with SMTP id y4mr13297852iti.7.1491853234973; Mon, 10 Apr 2017 12:40:34 -0700 (PDT) MIME-Version: 1.0 Sender: sobomax@sippysoft.com Received: by 10.36.112.210 with HTTP; Mon, 10 Apr 2017 12:40:34 -0700 (PDT) In-Reply-To: References: From: Maxim Sobolev Date: Mon, 10 Apr 2017 12:40:34 -0700 X-Google-Sender-Auth: QeyKm__Oqj-uId0iQMz0NyIxWCw Message-ID: Subject: Re: On shutting down UDP socket [Re: svn commit: r285910 - in head: lib/libc/sys sys/kern sys/sys] To: Ed Schouten Cc: Alexander Kabaev , Ed Schouten , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, mjg@freebsd.org, gnn@freebsd.org, FreeBSD Net Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Apr 2017 19:40:37 -0000 JFYI. I've opened a follow-up differential for this potential regression: https://reviews.freebsd.org/D10351 Thanks! -Max On Mon, Apr 10, 2017 at 7:43 AM, Maxim Sobolev wrote: > Hi Guys, I am sorry to bring this old thread up, but I think Ed's > comparison with other OSes here and in the relevant differential was not > entirely correct. What linux does (tested with 4.4.0) when UDP socket is > shut down is actually shutting down receiving end, so any threads that are > blocked in recv() on that socket return. Still shutdown() system call > itself returns ENOTCONN. FreeBSD on the other hand does not do anything for > the socket, so that the threads just hang. I am pretty sure there are at > least some software out there that relies on that behavior, at least in our > case we do. Bumped into this after upgrading to the 11.0. > > Therefore, I am curious about possibility to make our behavior match that > of Linux's, so we are not the odd one with regards to this, that is return > an error but still shutdown the socket? > > Small test case is attached. Both FreeBSD 10.3 and Linux 4.4.0 pass > (albeit Linux's shutdown() returns with an error), FreeBSD 11.0 fails. > > -Max > > On Sun, Aug 9, 2015 at 6:08 AM, Ed Schouten wrote: > >> Hi Alexander, >> >> 2015-08-09 14:55 GMT+02:00 Alexander Kabaev : >> > On Sun, 9 Aug 2015 09:37:13 +0200 >> > It most definitely does work, this is what I have done to get my >> > network scripts work again. I wonder if there are other means of >> > restricting raw sockets that can be used to achieve the result >> > authors of rtsold had hoped or? >> >> Yes, there sure are. We could for example call cap_rights_limit() on >> the socket and whitelist the exacty set of actions that the program >> needs. >> >> That said, it wouldn't make a difference in the end. It looks like >> rtsol/rtsold don't seem to drop any privileges or switch credentials >> after startup, assuming I haven't overlooked anything. Even if we were >> to restrict the raw socket, the process could always open a new one >> later on. >> >> I think it would make sense for now to just commit the patch that I >> proposed. Will push it into the tree tomorrow. >> >> Thanks, >> -- >> Ed Schouten >> Nuxi, 's-Hertogenbosch, the Netherlands >> KvK/VAT number: 62051717 >> >> > From owner-svn-src-head@freebsd.org Mon Apr 10 20:26:05 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3058AD38BD8; Mon, 10 Apr 2017 20:26:05 +0000 (UTC) (envelope-from pkelsey@gmail.com) Received: from mail-pg0-x242.google.com (mail-pg0-x242.google.com [IPv6:2607:f8b0:400e:c05::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 F372FCAB; Mon, 10 Apr 2017 20:26:04 +0000 (UTC) (envelope-from pkelsey@gmail.com) Received: by mail-pg0-x242.google.com with SMTP id o123so27070116pga.1; Mon, 10 Apr 2017 13:26:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=2MKwh83P0V6tdM0xOKCyMmLz3e4eJn92TpXzNxxV6K4=; b=R13nbTPkXGYKJNI6EYBgXmvhImebHduG6ym3CZb7ToYg4qwtiw7SL+uQNO/PWup3/Y 6bH4+6tfo8hmbUU7Px+aSEZfQiIpkcnX5LXwSPxxeJIibYEPpAkmLlLJBchV0ucA5D6B Z8TUJmt97POzLeIttmqcwDQW+iHPU8ET2IEUhrLfZdoAswQKeq3sz9izOCTbFygCtUW6 q02jpXpPOOop2EG+D7BI/T2UOul84qfQJTt9w8289AbttRahimbmfbs4NGhb+tt07ksY fa5hjGkW+UYBcuX9a0AqtjxZJBUx0ioe+PPcB5lnFSwV9g3IHw3B/zCAxbwwbuzrb1cM /Haw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=2MKwh83P0V6tdM0xOKCyMmLz3e4eJn92TpXzNxxV6K4=; b=s73cVCVQYgzECDjtZPX9+GXEH7zRMhcGyNy0IS6yjHvn0wMmTimkdUQ8GmYln7w2OC 8oxMiFmvhZ+SKlhoZXbOO9qaRg8Lt+frSFTNUpZGJ+Z8xghIdu/Z65KHILJkoMRQiEnG a7QOlF/4qsZj08GwpqQMvOVF06JjXCYMKgu5X4bxWNQCB4HufA3kYeKPlC7auUnDhoJ2 zZH3MrbEMo2gRF35fxH8bknsx0lE/trKl0G2VnP12cAbW3RLK40hkqVZupbXAM7TbT1A TbDi/qzLmMYpHBbih2RWSUKG7Lq9f1TviilicAHncPCx6un5mImh005elUlpoAj93YXI ZycA== X-Gm-Message-State: AFeK/H2t2d7mTScUu8Ud1tMeKoK45Ix3SyeqZXIzo3BlhxrlGm0F4pcCIBYVfZQj0CxcGXxcrO+MsGi5J+aDdg== X-Received: by 10.98.11.218 with SMTP id 87mr55227440pfl.214.1491855964432; Mon, 10 Apr 2017 13:26:04 -0700 (PDT) MIME-Version: 1.0 Sender: pkelsey@gmail.com Received: by 10.100.162.34 with HTTP; Mon, 10 Apr 2017 13:26:03 -0700 (PDT) In-Reply-To: <3233183.B722KJrnTC@ralph.baldwin.cx> References: <201704090200.v39203Vf072867@repo.freebsd.org> <0da40261-7829-8d63-c4aa-775a028367a2@FreeBSD.org> <3233183.B722KJrnTC@ralph.baldwin.cx> From: Patrick Kelsey Date: Mon, 10 Apr 2017 16:26:03 -0400 X-Google-Sender-Auth: n2cwKOQheJKgt8BaYt0iDis21Ak Message-ID: Subject: Re: svn commit: r316648 - in head/sys: amd64/amd64 amd64/include arm/arm arm/include arm64/include cddl/dev/dtrace/aarch64 cddl/dev/dtrace/amd64 cddl/dev/dtrace/arm cddl/dev/dtrace/i386 cddl/dev/dtrace... To: John Baldwin Cc: Jung-uk Kim , 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Apr 2017 20:26:05 -0000 On Mon, Apr 10, 2017 at 1:43 PM, John Baldwin wrote: > On Monday, April 10, 2017 01:23:04 PM Jung-uk Kim wrote: > > On 04/08/2017 22:00, Patrick Kelsey wrote: > > > Author: pkelsey > > > Date: Sun Apr 9 02:00:03 2017 > > > New Revision: 316648 > > > URL: https://svnweb.freebsd.org/changeset/base/316648 > > > > > > Log: > > > Corrected misspelled versions of rendezvous. > > > > > > The MFC will include a compat definition of > smp_no_rendevous_barrier() > > > that calls smp_no_rendezvous_barrier(). > > > > > > Reviewed by: gnn, kib > > > MFC after: 1 week > > > Differential Revision: https://reviews.freebsd.org/D10313 > > ... > > > > We knew about the problem but we didn't fix it because it breaks KPI. > > For example, sysutils/virtualbox-ose-kmod. If you really want to MFC > > this change, you have to implement shims. > > Also, the function isn't actually called, but is only used in comparisons > in smp_rendezvous_action(). To do a compat shim you will need to either > change these comparisons to compare against both function pointers or > define the alternate symbol as an alias of the existing function. That > only helps the KBI though. For the KPI would just use a #define to point > to the new name. > That's a good point about the comparisons in smp_rendezvous_action() - if I had managed to miss that detail all the way through the compat shim implementation, it would have littered pointless empty function invocations and atomic increments into all the uses of smp_rendezvous() that used smp_no_rendezvous_barrier for at least one of the stages. I don't think we have an established place to define machine-independent symbol aliases. Approaching that through linker scripts would require spamming a PROVIDE() statement into each of the arch-specific scripts. Since this is a function, I think a better way than the symbol alias + #define approach would be to just define a function pointer called smp_no_rendevous_barrier that gets statically initialized to smp_no_rendezvous_barrier. In that case, the extern decl takes care of the KPI, the corresponding symbol definition takes care of the KBI, and it has a minimal, MI, code footprint. > > Also, as Jung-uk notes, this already breaks virtualbox on HEAD, so you will > need to patch the port now, not only if you MFC. Either that, or I relax the goal of purging it entirely and put the compat shim in current also to sidestep the port-patching issue. -Patrick From owner-svn-src-head@freebsd.org Mon Apr 10 20:30:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2BCD2D38CC2; Mon, 10 Apr 2017 20:30:40 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x234.google.com (mail-io0-x234.google.com [IPv6:2607:f8b0:4001:c06::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 E8ECFE85; Mon, 10 Apr 2017 20:30:39 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io0-x234.google.com with SMTP id r16so55208673ioi.2; Mon, 10 Apr 2017 13:30:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=4C63+u220a3RBK6g+JVqephf5WC3JWUnEA42EVvWGlQ=; b=Jpl8QnHgF/J8e1Mr7QLdfIkTQfLfiggwweEaX1ZKAKlUcPG2NxPuWmnovrSEUhypK+ /NByEUsImTNp9HlEHq87xgSn/wsvl6XOA6vBlyleVBYHJRxxjQCpUrpam/JugAEECwgp dXCX1awyZXzNfkI2QEWUuWizfABRMcvtJIHjOHq0H6JzogvDMDFqv+01uUHDYJUEtdHG dJ9ZEBlaNlNzb/i17gzw3NSiyg1+bKAdE1CgkHJ4jf2seFif88YqMNr+7b9ETszW8tc1 +8LQW13XL54D+meGSzruJmgpChZHgnViYaEN1t4EoLKg81G3Kc5iGZPWXtgLal1aqkXZ SCjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=4C63+u220a3RBK6g+JVqephf5WC3JWUnEA42EVvWGlQ=; b=YoOhNKsygp+MW7TEjE8AYOkTWNOg5EPcjE2nSsEtIiBrsCziyLvoeYkYzbgerTahzg Z92NPyckQXJDXxnQYcG+jFD4dh3EFprqYGwmsuMq7G0n8xDtldCAetUFyvVvY2yigWf2 hsZd2IV0YkYnZ0pLKYhZCE9Cs4ddcGrnQw0buPWixnFkrhmUMxO6S0Ssup+cRLDT/eGI DEi8vMzacovVAwzUDfLO32Q7azjQUlHSVt0yyAO9EMOKmSc2nuh9577/ZFyvkXVqLYsT gmQHrUTtUee/ZOrQh2oxpjhsUDYoLl7aqj+6Whl6FZlLiIbvlqT2rCjPHzNV5nPgaa8L fb7g== X-Gm-Message-State: AFeK/H2jNpkoxy9wBkXR+nBsqzNh2KMKuZSztMz6Bf/aADz2ryq2qr4ErGP2uVOoCvdh4JRWzMVz7CYpCvqPfw== X-Received: by 10.107.37.12 with SMTP id l12mr50790029iol.159.1491856239096; Mon, 10 Apr 2017 13:30:39 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.30.209 with HTTP; Mon, 10 Apr 2017 13:30:18 -0700 (PDT) In-Reply-To: <201704092102.v39L25oh040066@repo.freebsd.org> References: <201704092102.v39L25oh040066@repo.freebsd.org> From: Ed Maste Date: Mon, 10 Apr 2017 16:30:18 -0400 X-Google-Sender-Auth: ZLSslqDLjLxr0aVNhN1pq3ls7js Message-ID: Subject: Re: svn commit: r316665 - in head/sys: compat/linuxkpi/common/src contrib/ck/include contrib/ck/src To: Olivier Houchard 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Apr 2017 20:30:40 -0000 On 9 April 2017 at 17:02, Olivier Houchard wrote: > > Author: cognet > Date: Sun Apr 9 21:02:05 2017 > New Revision: 316665 > URL: https://svnweb.freebsd.org/changeset/base/316665 > > Log: > Import CK as of commit 6b141c0bdd21ce8b3e14147af8f87f22b20ecf32 > This brings us changes we needed in ck_epoch. My tinderbox build now fails when building MIPS kernels, e.g. from _.mips.OCTEON1: ck_epoch.o: In function `ck_epoch_poll': /scratch/tmp/emaste/freebsd/sys/contrib/ck/src/ck_epoch.c:(.text+0x4b4): undefined reference to `__sync_bool_compare_and_swap_4' /scratch/tmp/emaste/freebsd/sys/contrib/ck/src/ck_epoch.c:(.text+0x4b4): relocation truncated to fit: R_MIPS_26 against `__sync_bool_compare_and_swap_4' From owner-svn-src-head@freebsd.org Mon Apr 10 20:30:58 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE76ED38D14; Mon, 10 Apr 2017 20:30:58 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qk0-x234.google.com (mail-qk0-x234.google.com [IPv6:2607:f8b0:400d: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 6CD74FF0; Mon, 10 Apr 2017 20:30:58 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-qk0-x234.google.com with SMTP id f133so106694229qke.2; Mon, 10 Apr 2017 13:30:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ez25hHZP3AJRq5Hor/ZNxOVVQ8qkYfn3kUH33O1WuJQ=; b=JwWf7LZFLXh5XPVRbPwizZz5TgBHq9VsZuBhPZpFZbtTtK/Pw2abzqSr0nA+UQcbzl FTrvYsirFnV1kOjY7A8VWO1bsnjixD7f8UZH7heQD3cJOPWY44/ady0ebXYv6fQ4jx9V yu/KgBmnTgbzHxSDuaOVQyDf53FM/9VbpRjxGy9fVaUl5dPtlun6UhZjBVuOfyfILerD /s01DhG21S62Sa7buAfWNZeFDcOPB7AnTMoeJq9r7AqiIohrKL+e55hBbN8sSzbcCYyM mx1YRXLZODb5+1QUUatcxr5x0C25lSi19U+38hbL+FcALkRSOfq3HTPfUIo7NFGz4fhG h3NA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ez25hHZP3AJRq5Hor/ZNxOVVQ8qkYfn3kUH33O1WuJQ=; b=ivscglHeaumvm8BZQvvVmC+i8A8jnQl5RnWw9feI3v9X2E5uuNeQsH11b9XaFFTtpk Sx0MPY7krCI8O4eSBek7f084SnUtJGBZ8qf4I+GHvj66dyezmGwIlztl3jOCPELJ+9rR hmI5JCqUtIWfGPGGhBN6fnKyfCvy2ejQ4kaJqgTJDhD/CqFsUqS2q55oTGoATlXGQ+1r Bz9tXhdpCnFfG2iMJgdGGijHsz88UHZHbBNkTXx0+c5lq95f/B0e34RC6oLtD8OnnSrU uRTk9I/nBJ/mblmh3+la/Eruib+UUfYkZ15cLxqKVcpFvPuRX33HdMabBZVVBkIh6uq9 +W7w== X-Gm-Message-State: AFeK/H1v+PQD+Jr+EBwbY/vuICD1Zqmiml7FIH9QqFQnhxGe1wGjQPmDqDO5ceECCJm0SVkiL2fSUxVJruti4A== X-Received: by 10.55.18.91 with SMTP id c88mr50089512qkh.3.1491856257419; Mon, 10 Apr 2017 13:30:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.93.83 with HTTP; Mon, 10 Apr 2017 13:30:57 -0700 (PDT) In-Reply-To: <201704101821.v3AILVs5074189@repo.freebsd.org> References: <201704101821.v3AILVs5074189@repo.freebsd.org> From: Ngie Cooper Date: Mon, 10 Apr 2017 13:30:57 -0700 Message-ID: Subject: Re: svn commit: r316684 - head/share/mk To: Ed Maste 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Apr 2017 20:30:58 -0000 On Mon, Apr 10, 2017 at 11:21 AM, Ed Maste wrote: > Author: emaste > Date: Mon Apr 10 18:21:30 2017 > New Revision: 316684 > URL: https://svnweb.freebsd.org/changeset/base/316684 > > Log: > Make WITHOUT_TOOLCHAIN imply WITHOUT_LLD. > > LLD is a toolchain component. src.conf(5) needs to be regenerated now. -Ngie From owner-svn-src-head@freebsd.org Mon Apr 10 20:55:43 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD0D1D3746C; Mon, 10 Apr 2017 20:55:43 +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 AF239AF; Mon, 10 Apr 2017 20:55:43 +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 v3AKtg8g040138; Mon, 10 Apr 2017 20:55:42 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3AKtg4h040137; Mon, 10 Apr 2017 20:55:42 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201704102055.v3AKtg4h040137@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 10 Apr 2017 20:55:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316686 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Apr 2017 20:55:44 -0000 Author: markj Date: Mon Apr 10 20:55:42 2017 New Revision: 316686 URL: https://svnweb.freebsd.org/changeset/base/316686 Log: Add some bounds assertions to the vm_map_entry clip functions. Reviewed by: kib MFC after: 1 week Sponsored by: Dell EMC Isilon X-Differential Revision: https://reviews.freebsd.org/D10349 Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Mon Apr 10 19:22:15 2017 (r316685) +++ head/sys/vm/vm_map.c Mon Apr 10 20:55:42 2017 (r316686) @@ -1655,6 +1655,8 @@ _vm_map_clip_start(vm_map_t map, vm_map_ vm_map_entry_t new_entry; VM_MAP_ASSERT_LOCKED(map); + KASSERT(entry->end > start && entry->start < start, + ("_vm_map_clip_start: invalid clip of entry %p", entry)); /* * Split off the front portion -- note that we must insert the new @@ -1739,6 +1741,8 @@ _vm_map_clip_end(vm_map_t map, vm_map_en vm_map_entry_t new_entry; VM_MAP_ASSERT_LOCKED(map); + KASSERT(entry->start < end && entry->end > end, + ("_vm_map_clip_end: invalid clip of entry %p", entry)); /* * If there is no object backing this entry, we might as well create From owner-svn-src-head@freebsd.org Mon Apr 10 20:57:18 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28E88D3751F; Mon, 10 Apr 2017 20:57:18 +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 D2BBD20E; Mon, 10 Apr 2017 20:57:17 +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 v3AKvGPd040268; Mon, 10 Apr 2017 20:57:16 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3AKvGwp040267; Mon, 10 Apr 2017 20:57:16 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201704102057.v3AKvGwp040267@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 10 Apr 2017 20:57:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316687 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Apr 2017 20:57:18 -0000 Author: markj Date: Mon Apr 10 20:57:16 2017 New Revision: 316687 URL: https://svnweb.freebsd.org/changeset/base/316687 Log: Consistently use for-loops in vm_map_protect(). No functional change. Reviewed by: kib MFC after: 1 week Sponsored by: Dell EMC Isilon X-Differential Revision: https://reviews.freebsd.org/D10349 Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Mon Apr 10 20:55:42 2017 (r316686) +++ head/sys/vm/vm_map.c Mon Apr 10 20:57:16 2017 (r316687) @@ -1976,8 +1976,8 @@ vm_map_protect(vm_map_t map, vm_offset_t /* * Make a first pass to check for protection violations. */ - current = entry; - while ((current != &map->header) && (current->start < end)) { + for (current = entry; current != &map->header && current->start < end; + current = current->next) { if (current->eflags & MAP_ENTRY_IS_SUB_MAP) { vm_map_unlock(map); return (KERN_INVALID_ARGUMENT); @@ -1986,17 +1986,15 @@ vm_map_protect(vm_map_t map, vm_offset_t vm_map_unlock(map); return (KERN_PROTECTION_FAILURE); } - current = current->next; } - /* * Do an accounting pass for private read-only mappings that * now will do cow due to allowed write (e.g. debugger sets * breakpoint on text segment) */ - for (current = entry; (current != &map->header) && - (current->start < end); current = current->next) { + for (current = entry; current != &map->header && current->start < end; + current = current->next) { vm_map_clip_end(map, current, end); @@ -2049,8 +2047,8 @@ vm_map_protect(vm_map_t map, vm_offset_t * Go back and fix up protections. [Note that clipping is not * necessary the second time.] */ - current = entry; - while ((current != &map->header) && (current->start < end)) { + for (current = entry; current != &map->header && current->start < end; + current = current->next) { old_prot = current->protection; if (set_max) @@ -2084,7 +2082,6 @@ vm_map_protect(vm_map_t map, vm_offset_t #undef MASK } vm_map_simplify_entry(map, current); - current = current->next; } vm_map_unlock(map); return (KERN_SUCCESS); From owner-svn-src-head@freebsd.org Mon Apr 10 21:00:48 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0B59D377AC; Mon, 10 Apr 2017 21:00:48 +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 9BCFB961; Mon, 10 Apr 2017 21:00:48 +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 v3AL0lD5041546; Mon, 10 Apr 2017 21:00:47 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3AL0lJX041545; Mon, 10 Apr 2017 21:00:47 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201704102100.v3AL0lJX041545@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 10 Apr 2017 21:00:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316688 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Apr 2017 21:00:48 -0000 Author: emaste Date: Mon Apr 10 21:00:47 2017 New Revision: 316688 URL: https://svnweb.freebsd.org/changeset/base/316688 Log: regenerate src.conf.5 after r316647 and r316684 Sponsored by: The FreeBSD Foundation Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Mon Apr 10 20:57:16 2017 (r316687) +++ head/share/man/man5/src.conf.5 Mon Apr 10 21:00:47 2017 (r316688) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 315768 2017-03-23 02:26:15Z ngie .\" $FreeBSD$ -.Dd March 22, 2017 +.Dd April 10, 2017 .Dt SRC.CONF 5 .Os .Sh NAME @@ -197,7 +197,7 @@ as part of the bootstrap process. This is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64. .It Va WITHOUT_BLACKLIST -.\" from FreeBSD: head/tools/build/options/WITHOUT_BLACKLIST 313788 2017-02-16 04:21:24Z ngie +.\" from FreeBSD: head/tools/build/options/WITHOUT_BLACKLIST 313169 2017-02-03 19:09:46Z wblock Set this if you do not want to build blacklistd/blacklistctl. When set, it enforces these options: .Pp @@ -278,7 +278,7 @@ When set, it enforces these options: .\" from FreeBSD: head/tools/build/options/WITHOUT_CASPER 258838 2013-12-02 08:21:28Z pjd Set to not build Casper program and related libraries. .It Va WITH_CCACHE_BUILD -.\" from FreeBSD: head/tools/build/options/WITH_CCACHE_BUILD 313788 2017-02-16 04:21:24Z ngie +.\" from FreeBSD: head/tools/build/options/WITH_CCACHE_BUILD 313169 2017-02-03 19:09:46Z wblock Set to use .Xr ccache 1 for the build. @@ -354,7 +354,7 @@ Set to build the Clang C/C++ compiler du This is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpcspe. .It Va WITHOUT_CLANG_BOOTSTRAP -.\" from FreeBSD: head/tools/build/options/WITHOUT_CLANG_BOOTSTRAP 313788 2017-02-16 04:21:24Z ngie +.\" from FreeBSD: head/tools/build/options/WITHOUT_CLANG_BOOTSTRAP 313169 2017-02-03 19:09:46Z wblock Set to not build the Clang C/C++ compiler during the bootstrap phase of the build. To be able to build the system, either gcc or clang bootstrap must be @@ -410,7 +410,7 @@ amd64/amd64, arm/arm, arm/armeb, arm/arm Set to not build .Xr cpp 1 . .It Va WITHOUT_CROSS_COMPILER -.\" from FreeBSD: head/tools/build/options/WITHOUT_CROSS_COMPILER 313788 2017-02-16 04:21:24Z ngie +.\" from FreeBSD: head/tools/build/options/WITHOUT_CROSS_COMPILER 313169 2017-02-03 19:09:46Z wblock Set to not build any cross compiler in the cross-tools stage of buildworld. When compiling a different version of .Fx @@ -520,7 +520,7 @@ When set, it enforces these options: Set to avoid building or installing standalone debug files for each executable binary and shared library. .It Va WITHOUT_DIALOG -.\" from FreeBSD: head/tools/build/options/WITHOUT_DIALOG 313788 2017-02-16 04:21:24Z ngie +.\" from FreeBSD: head/tools/build/options/WITHOUT_DIALOG 313169 2017-02-03 19:09:46Z wblock Set to not build .Xr dialog 1 , .Xr dialog 3 , @@ -537,7 +537,7 @@ When set, it enforces these options: .\" from FreeBSD: head/tools/build/options/WITHOUT_DICT 156932 2006-03-21 07:50:50Z ru Set to not build the Webster dictionary files. .It Va WITH_DIRDEPS_BUILD -.\" from FreeBSD: head/tools/build/options/WITH_DIRDEPS_BUILD 313788 2017-02-16 04:21:24Z ngie +.\" from FreeBSD: head/tools/build/options/WITH_DIRDEPS_BUILD 313169 2017-02-03 19:09:46Z wblock This is an experimental build system. For details see http://www.crufty.net/sjg/docs/freebsd-meta-mode.htm. @@ -625,10 +625,10 @@ This must be set in the environment, mak not .Pa /etc/src.conf . .It Va WITHOUT_DMAGENT -.\" from FreeBSD: head/tools/build/options/WITHOUT_DMAGENT 313788 2017-02-16 04:21:24Z ngie +.\" from FreeBSD: head/tools/build/options/WITHOUT_DMAGENT 313169 2017-02-03 19:09:46Z wblock Set to not build dma Mail Transport Agent. .It Va WITHOUT_DOCCOMPRESS -.\" from FreeBSD: head/tools/build/options/WITHOUT_DOCCOMPRESS 313788 2017-02-16 04:21:24Z ngie +.\" from FreeBSD: head/tools/build/options/WITHOUT_DOCCOMPRESS 313169 2017-02-03 19:09:46Z wblock Set to not install compressed system documentation. Only the uncompressed version will be installed. .It Va WITH_DTRACE_TESTS @@ -835,7 +835,7 @@ Set to not build .Xr gpioctl 8 as part of the base system. .It Va WITHOUT_GPL_DTC -.\" from FreeBSD: head/tools/build/options/WITHOUT_GPL_DTC 313788 2017-02-16 04:21:24Z ngie +.\" from FreeBSD: head/tools/build/options/WITHOUT_GPL_DTC 313169 2017-02-03 19:09:46Z wblock Set to build the BSD licensed version of the device tree compiler rather than the GPLed one from elinux.org. .It Va WITHOUT_GROFF @@ -904,7 +904,7 @@ Set to not build .\" from FreeBSD: head/tools/build/options/WITHOUT_INET_SUPPORT 221266 2011-04-30 17:58:28Z bz Set to build libraries, programs, and kernel modules without IPv4 support. .It Va WITHOUT_INSTALLLIB -.\" from FreeBSD: head/tools/build/options/WITHOUT_INSTALLLIB 313788 2017-02-16 04:21:24Z ngie +.\" from FreeBSD: head/tools/build/options/WITHOUT_INSTALLLIB 313172 2017-02-03 19:21:28Z wblock Set this to not install optional libraries. For example, when creating a .Xr nanobsd 8 @@ -913,7 +913,7 @@ image. The option does not work for build targets. .Ef .It Va WITH_INSTALL_AS_USER -.\" from FreeBSD: head/tools/build/options/WITH_INSTALL_AS_USER 313788 2017-02-16 04:21:24Z ngie +.\" from FreeBSD: head/tools/build/options/WITH_INSTALL_AS_USER 313169 2017-02-03 19:09:46Z wblock Set to make install targets succeed for non-root users by installing files with owner and group attributes set to that of the user running the @@ -953,7 +953,7 @@ Set to not build and .Xr truss 1 . .It Va WITHOUT_KERBEROS -.\" from FreeBSD: head/tools/build/options/WITHOUT_KERBEROS 313788 2017-02-16 04:21:24Z ngie +.\" from FreeBSD: head/tools/build/options/WITHOUT_KERBEROS 313169 2017-02-03 19:09:46Z wblock Set this to not build Kerberos 5 (KTH Heimdal). When set, it enforces these options: .Pp @@ -1086,14 +1086,29 @@ Set to build the LLDB debugger. .Pp This is a default setting on amd64/amd64 and arm64/aarch64. +.It Va WITHOUT_LLD_BOOTSTRAP +.\" from FreeBSD: head/tools/build/options/WITHOUT_LLD_BOOTSTRAP 316647 2017-04-09 01:35:19Z emaste +Set to not build the LLD linker during the bootstrap phase of +the build. +To be able to build the system, either Binutils or LLD bootstrap must be +enabled unless an alternate linker is provided via XLD. +.Pp +This is a default setting on +amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64. +.It Va WITH_LLD_BOOTSTRAP +.\" from FreeBSD: head/tools/build/options/WITH_LLD_BOOTSTRAP 316647 2017-04-09 01:35:19Z emaste +Set to build the LLD linker during the bootstrap phase of the build. +.Pp +This is a default setting on +arm64/aarch64. .It Va WITHOUT_LLD_IS_LD -.\" from FreeBSD: head/tools/build/options/WITHOUT_LLD_IS_LD 313788 2017-02-16 04:21:24Z ngie +.\" from FreeBSD: head/tools/build/options/WITHOUT_LLD_IS_LD 312855 2017-01-27 01:59:12Z emaste Set to use GNU binutils ld as the system linker, instead of LLVM's LLD. .Pp This is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64. .It Va WITH_LLD_IS_LD -.\" from FreeBSD: head/tools/build/options/WITH_LLD_IS_LD 313788 2017-02-16 04:21:24Z ngie +.\" from FreeBSD: head/tools/build/options/WITH_LLD_IS_LD 312855 2017-01-27 01:59:12Z emaste Set to use LLVM's LLD as the system linker, instead of GNU binutils ld. .Pp This is a default setting on @@ -1189,7 +1204,7 @@ Set to not build utilities for manual pa .Xr manctl 8 , and related support files. .It Va WITH_META_MODE -.\" from FreeBSD: head/tools/build/options/WITH_META_MODE 313788 2017-02-16 04:21:24Z ngie +.\" from FreeBSD: head/tools/build/options/WITH_META_MODE 313169 2017-02-03 19:09:46Z wblock Create .Xr make 1 meta files when building, which can provide a reliable incremental build when @@ -1524,7 +1539,7 @@ This must be set in the environment, mak not .Pa /etc/src.conf . .It Va WITH_STAGING_MAN -.\" from FreeBSD: head/tools/build/options/WITH_STAGING_MAN 313788 2017-02-16 04:21:24Z ngie +.\" from FreeBSD: head/tools/build/options/WITH_STAGING_MAN 313169 2017-02-03 19:09:46Z wblock Enable staging of man pages to stage tree. .It Va WITH_STAGING_PROG .\" from FreeBSD: head/tools/build/options/WITH_STAGING_PROG 284708 2015-06-22 20:21:57Z sjg @@ -1679,6 +1694,8 @@ When set, it enforces these options: .It .Va WITHOUT_INCLUDES .It +.Va WITHOUT_LLD +.It .Va WITHOUT_LLDB .El .It Va WITHOUT_UNBOUND @@ -1690,7 +1707,7 @@ and related programs. .\" from FreeBSD: head/tools/build/options/WITHOUT_USB 156932 2006-03-21 07:50:50Z ru Set to not build USB-related programs and libraries. .It Va WITHOUT_USB_GADGET_EXAMPLES -.\" from FreeBSD: head/tools/build/options/WITHOUT_USB_GADGET_EXAMPLES 311550 2017-01-06 21:27:39Z ngie +.\" from FreeBSD: head/tools/build/options/WITHOUT_USB_GADGET_EXAMPLES 311548 2017-01-06 21:08:19Z ngie Set to not build USB gadget kernel modules. .It Va WITHOUT_UTMPX .\" from FreeBSD: head/tools/build/options/WITHOUT_UTMPX 231530 2012-02-11 20:28:42Z ed From owner-svn-src-head@freebsd.org Mon Apr 10 21:01:44 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1434DD3797F; Mon, 10 Apr 2017 21:01: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 D806AC7B; Mon, 10 Apr 2017 21:01:43 +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 v3AL1gsJ042364; Mon, 10 Apr 2017 21:01:42 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3AL1gdt042363; Mon, 10 Apr 2017 21:01:42 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201704102101.v3AL1gdt042363@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 10 Apr 2017 21:01:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316689 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Apr 2017 21:01:44 -0000 Author: markj Date: Mon Apr 10 21:01:42 2017 New Revision: 316689 URL: https://svnweb.freebsd.org/changeset/base/316689 Log: Busy the map in vm_map_protect(). We are otherwise susceptible to a race with a concurrent vm_map_wire(), which may drop the map lock to fault pages into the object chain. In particular, vm_map_protect() will only copy newly writable wired pages into the top-level object when MAP_ENTRY_USER_WIRED is set, but vm_map_wire() only sets this flag after its fault loop. We may thus end up with a writable wired entry whose top-level object does not contain the entire range of pages. Reported and tested by: pho Reviewed by: kib MFC after: 1 week Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D10349 Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Mon Apr 10 21:00:47 2017 (r316688) +++ head/sys/vm/vm_map.c Mon Apr 10 21:01:42 2017 (r316689) @@ -1965,6 +1965,14 @@ vm_map_protect(vm_map_t map, vm_offset_t vm_map_lock(map); + /* + * Ensure that we are not concurrently wiring pages. vm_map_wire() may + * need to fault pages into the map and will drop the map lock while + * doing so, and the VM object may end up in an inconsistent state if we + * update the protection on the map entry in between faults. + */ + vm_map_wait_busy(map); + VM_MAP_RANGE_CHECK(map, start, end); if (vm_map_lookup_entry(map, start, &entry)) { From owner-svn-src-head@freebsd.org Mon Apr 10 21:14:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39B4FD37E05; Mon, 10 Apr 2017 21:14:01 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x233.google.com (mail-io0-x233.google.com [IPv6:2607:f8b0:4001:c06::233]) (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 038447C5; Mon, 10 Apr 2017 21:14:01 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io0-x233.google.com with SMTP id a103so48218164ioj.1; Mon, 10 Apr 2017 14:14:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to; bh=D8BUkBmag+ffBLSojvAknC0bMQaV2vZf1Lec12rJ0ws=; b=A5XsEziN4/KdW0FxHLRvoy6PrJkihXhAHtPXr6j5S0eysGEEmYvJsiDL46JafXxh6H kpkV93AQtvVxQe5OCBApL6+X17yGtoVN7FhlnGl9aZFUGS4nc/sJ008WJi3H74af0Fdv nZtp2JSblSVp4Onxy8oV/vzLhhOhoaa7eX2oUFsub4Gs1uDWuw8uIOgm/JL0mx9ak8Ws b38MdHHWHSQNpYS5FMyGcnxfEmmun0GkCml70QqroPnee+TxSP4TJ/1YawxY2zt9a3+Q 3mqoQUwzN13GrIaMHH/wkuq0cxzimHJXuSJeXwRM7iOeDx0hfGVVbTIBPo6J6dMEw3la MYNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to; bh=D8BUkBmag+ffBLSojvAknC0bMQaV2vZf1Lec12rJ0ws=; b=k8HcyL8pkSzL/aIZA0zmaclcInnOfXnmkag8UoPXz47I9dR4Lo/NDscZ5cGS5hij00 DHC8bQ6l1zhNB5P9Zi6ZBcK1tBFeNfkEGNbPlFlkwWdfE93LJF4N9fTyLQkiqnu3+iAW E9KBCfYDAOjOm8fKBnw6atYx3cbfQ0lG1Sj0fkm2m4H4J1flzE17XHdAHMLd4VbV57Dn xL/it6JYw+M6Hk6HHEu2QPm13YYZSQDrFdDcnQz/zTSCKv1yNF57IEhcZx5ZoOihrfMk KoOYiRKUoVoNy/OE7+XYugDuF+FrYCzG0dUg5ISocvQZMIab6ipgmb7lfBreL6CvG7mq rCow== X-Gm-Message-State: AFeK/H2dpwUZWjZP0IEgwyd/m9OB/W2+RMeYZINsmVRUDRuo6E/nNKL1G4j3OvZfGLj99SJ4h3zwWfWAm28jLQ== X-Received: by 10.107.47.102 with SMTP id j99mr54159180ioo.52.1491858840156; Mon, 10 Apr 2017 14:14:00 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.30.209 with HTTP; Mon, 10 Apr 2017 14:13:39 -0700 (PDT) In-Reply-To: <201704102100.v3AL0lJX041545@repo.freebsd.org> References: <201704102100.v3AL0lJX041545@repo.freebsd.org> From: Ed Maste Date: Mon, 10 Apr 2017 17:13:39 -0400 X-Google-Sender-Auth: 8fEM9CxYwLhiponX4x2nS9jkiIw Message-ID: Subject: Re: svn commit: r316688 - head/share/man/man5 To: "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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Apr 2017 21:14:01 -0000 On 10 April 2017 at 17:00, Ed Maste wrote: > Author: emaste > Date: Mon Apr 10 21:00:47 2017 > New Revision: 316688 > URL: https://svnweb.freebsd.org/changeset/base/316688 > ... > -.\" from FreeBSD: head/tools/build/options/WITHOUT_CLANG_BOOTSTRAP 313788 2017-02-16 04:21:24Z ngie > +.\" from FreeBSD: head/tools/build/options/WITHOUT_CLANG_BOOTSTRAP 313169 2017-02-03 19:09:46Z wblock It looks like several of these $FreeBSD$ entries on the individual WITH_/WITHOUT_ entries ended up with bogus rev numbers on the previous src.conf.5 regen so there are a number of spurious entries in this diff, but I confirmed that the content changes are as desired. I'd like to change makeman to eliminate the copied $FreeBSD$ content from each WITH_/WITHOUT_ block, leaving one $FreeBSD$ for the generated file as a whole. My initial motivation was to allow src.conf.5 to be generated in a git working tree or other VCS that does not expand the $FreeBSD$ tags, but it also eliminates spurious diffs when regenerating on a stable branch and would have avoided the spurious changes here. That change is in Phabricator review D7997: https://reviews.freebsd.org/D7997. From owner-svn-src-head@freebsd.org Mon Apr 10 21:26:38 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C39CED38329; Mon, 10 Apr 2017 21:26:38 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 93B7AFEB; Mon, 10 Apr 2017 21:26:38 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3ALQbcw053346; Mon, 10 Apr 2017 21:26:37 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3ALQbvs053345; Mon, 10 Apr 2017 21:26:37 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201704102126.v3ALQbvs053345@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 10 Apr 2017 21:26:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316690 - head/contrib/ofed/libibverbs/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Apr 2017 21:26:38 -0000 Author: bdrewery Date: Mon Apr 10 21:26:37 2017 New Revision: 316690 URL: https://svnweb.freebsd.org/changeset/base/316690 Log: Fix build with LLD by removing duplicate symbols already in IBVERBS_1.0. Reviewed by: emaste MFC after: 2 weeks Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D10352 Modified: head/contrib/ofed/libibverbs/src/libibverbs.map Modified: head/contrib/ofed/libibverbs/src/libibverbs.map ============================================================================== --- head/contrib/ofed/libibverbs/src/libibverbs.map Mon Apr 10 21:01:42 2017 (r316689) +++ head/contrib/ofed/libibverbs/src/libibverbs.map Mon Apr 10 21:26:37 2017 (r316690) @@ -77,12 +77,6 @@ IBVERBS_1.0 { IBVERBS_1.1 { global: - ibv_get_device_list; - ibv_free_device_list; - ibv_get_device_name; - ibv_get_device_guid; - ibv_open_device; - ibv_close_device; ibv_resolve_eth_gid; ibv_init_ah_from_wc; From owner-svn-src-head@freebsd.org Mon Apr 10 21:44:15 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2BF38D3866D; Mon, 10 Apr 2017 21:44:15 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F0429AF0; Mon, 10 Apr 2017 21:44:14 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3ALiEQd061568; Mon, 10 Apr 2017 21:44:14 GMT (envelope-from cognet@FreeBSD.org) Received: (from cognet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3ALiExG061567; Mon, 10 Apr 2017 21:44:14 GMT (envelope-from cognet@FreeBSD.org) Message-Id: <201704102144.v3ALiExG061567@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cognet set sender to cognet@FreeBSD.org using -f From: Olivier Houchard Date: Mon, 10 Apr 2017 21:44:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316691 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Apr 2017 21:44:15 -0000 Author: cognet Date: Mon Apr 10 21:44:13 2017 New Revision: 316691 URL: https://svnweb.freebsd.org/changeset/base/316691 Log: Provide some kind of __sync_bool_compare_and_swap_4(), as it is used by CK, and our gcc is too ancient to provide it. This should fix the build on mips. Modified: head/sys/mips/mips/stdatomic.c Modified: head/sys/mips/mips/stdatomic.c ============================================================================== --- head/sys/mips/mips/stdatomic.c Mon Apr 10 21:26:37 2017 (r316690) +++ head/sys/mips/mips/stdatomic.c Mon Apr 10 21:44:13 2017 (r316691) @@ -287,8 +287,8 @@ EMIT_BITWISE_FETCH_AND_OP_N(2, uint16_t, * 32-bit routines. */ -uint32_t -__sync_val_compare_and_swap_4(uint32_t *mem, uint32_t expected, +static __inline uint32_t +do_compare_and_swap_4(uint32_t *mem, uint32_t expected, uint32_t desired) { uint32_t old, temp; @@ -307,6 +307,23 @@ __sync_val_compare_and_swap_4(uint32_t * return (old); } +uint32_t +__sync_val_compare_and_swap_4(uint32_t *mem, uint32_t expected, + uint32_t desired) +{ + + return (do_compare_and_swap_4(mem, expected, desired)); +} + +bool +__sync_bool_compare_and_swap_4(uint32_t *mem, uint32_t expected, + uint32_t desired) +{ + + return (do_compare_and_swap_4(mem, expected, desired) == + desired); +} + #define EMIT_FETCH_AND_OP_4(name, op) \ uint32_t \ __sync_##name##_4(uint32_t *mem, uint32_t val) \ From owner-svn-src-head@freebsd.org Mon Apr 10 21:45:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11876D386CD; Mon, 10 Apr 2017 21:45:07 +0000 (UTC) (envelope-from cognet@ci0.org) Received: from kanar.ci0.org (kanar.ci0.org [IPv6:2001:bc8:35e6::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "sd-123398", Issuer "sd-123398" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id ABCD8C4F; Mon, 10 Apr 2017 21:45:06 +0000 (UTC) (envelope-from cognet@ci0.org) Received: from kanar.ci0.org (pluxor@localhost [127.0.0.1]) by kanar.ci0.org (8.15.2/8.15.2) with ESMTPS id v3ALiweJ000385 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 10 Apr 2017 23:44:58 +0200 (CEST) (envelope-from cognet@ci0.org) Received: (from doginou@localhost) by kanar.ci0.org (8.15.2/8.15.2/Submit) id v3ALiveg000383; Mon, 10 Apr 2017 23:44:57 +0200 (CEST) (envelope-from cognet@ci0.org) X-Authentication-Warning: kanar.ci0.org: doginou set sender to cognet@ci0.org using -f Date: Mon, 10 Apr 2017 23:44:57 +0200 From: Olivier Houchard To: Ed Maste Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r316665 - in head/sys: compat/linuxkpi/common/src contrib/ck/include contrib/ck/src Message-ID: <20170410214457.GA357@ci0.org> References: <201704092102.v39L25oh040066@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.0 (2017-02-23) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Apr 2017 21:45:07 -0000 On Mon, Apr 10, 2017 at 04:30:18PM -0400, Ed Maste wrote: > On 9 April 2017 at 17:02, Olivier Houchard wrote: > > > > Author: cognet > > Date: Sun Apr 9 21:02:05 2017 > > New Revision: 316665 > > URL: https://svnweb.freebsd.org/changeset/base/316665 > > > > Log: > > Import CK as of commit 6b141c0bdd21ce8b3e14147af8f87f22b20ecf32 > > This brings us changes we needed in ck_epoch. > > My tinderbox build now fails when building MIPS kernels, e.g. from > _.mips.OCTEON1: > > ck_epoch.o: In function `ck_epoch_poll': > /scratch/tmp/emaste/freebsd/sys/contrib/ck/src/ck_epoch.c:(.text+0x4b4): > undefined reference to `__sync_bool_compare_and_swap_4' > /scratch/tmp/emaste/freebsd/sys/contrib/ck/src/ck_epoch.c:(.text+0x4b4): > relocation truncated to fit: R_MIPS_26 against > `__sync_bool_compare_and_swap_4' Hi Ed, Sorry about that, it should be fixed now. Regards, Olivier From owner-svn-src-head@freebsd.org Mon Apr 10 21:49:36 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85E9DD387AE; Mon, 10 Apr 2017 21:49:36 +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 55171EDF; Mon, 10 Apr 2017 21:49:36 +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 v3ALnZrX062245; Mon, 10 Apr 2017 21:49:35 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3ALnZYk062244; Mon, 10 Apr 2017 21:49:35 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201704102149.v3ALnZYk062244@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 10 Apr 2017 21:49:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316692 - head/sys/fs/nfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Apr 2017 21:49:36 -0000 Author: rmacklem Date: Mon Apr 10 21:49:35 2017 New Revision: 316692 URL: https://svnweb.freebsd.org/changeset/base/316692 Log: Set initial values for nfsstatfs in the NFSv4 client. The AmazonEFS NFSv4.1 server does not support the FILES_FREE and FILES_TOTAL attributes. As such, an NFSv4.1 mount to the server would return garbage for these values. This patch initializes the fields of the nfsstatfs structure, so that "df" and friends will at least return consistent bogus values. This patch should have effect when mounting other NFSv4.1 servers. Reported by: cperciva MFC after: 2 weeks Modified: head/sys/fs/nfs/nfs_commonsubs.c Modified: head/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- head/sys/fs/nfs/nfs_commonsubs.c Mon Apr 10 21:44:13 2017 (r316691) +++ head/sys/fs/nfs/nfs_commonsubs.c Mon Apr 10 21:49:35 2017 (r316692) @@ -888,6 +888,14 @@ nfsv4_loadattr(struct nfsrv_descript *nd pc->pc_caseinsensitive = 0; pc->pc_casepreserving = 1; } + if (sfp != NULL) { + sfp->sf_ffiles = UINT64_MAX; + sfp->sf_tfiles = UINT64_MAX; + sfp->sf_afiles = UINT64_MAX; + sfp->sf_fbytes = UINT64_MAX; + sfp->sf_tbytes = UINT64_MAX; + sfp->sf_abytes = UINT64_MAX; + } } /* From owner-svn-src-head@freebsd.org Mon Apr 10 22:47:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66F7AD37927; Mon, 10 Apr 2017 22:47:20 +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 1E78DA9; Mon, 10 Apr 2017 22:47:20 +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 v3AMlJBD087479; Mon, 10 Apr 2017 22:47:19 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3AMlJaw087476; Mon, 10 Apr 2017 22:47:19 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201704102247.v3AMlJaw087476@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 10 Apr 2017 22:47:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316694 - head/sys/rpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Apr 2017 22:47:20 -0000 Author: rmacklem Date: Mon Apr 10 22:47:18 2017 New Revision: 316694 URL: https://svnweb.freebsd.org/changeset/base/316694 Log: Fix a crash during unmount of an NFSv4.1 mount. Larry Rosenman reported a crash on freebsd-current@ which was caused by a premature release of the krpc backchannel socket structure. I believe this was caused by a race between the SVC_RELEASE() in clnt_vc.c and the xprt_unregister() in the higher layer (clnt_rc.c), which tried to lock the mutex in the xprt structure and crashed. This patch fixes this by removing the xprt_unregister() in the clnt_vc layer and allowing this to always be done by the clnt_rc (higher reconnect layer). Reported by: ler@lerctr.org Tested by: ler@letctr.org MFC after: 2 weeks Modified: head/sys/rpc/clnt_rc.c head/sys/rpc/clnt_vc.c Modified: head/sys/rpc/clnt_rc.c ============================================================================== --- head/sys/rpc/clnt_rc.c Mon Apr 10 22:46:34 2017 (r316693) +++ head/sys/rpc/clnt_rc.c Mon Apr 10 22:47:18 2017 (r316694) @@ -450,7 +450,6 @@ clnt_reconnect_control(CLIENT *cl, u_int case CLSET_BACKCHANNEL: xprt = (SVCXPRT *)info; - SVC_ACQUIRE(xprt); xprt_register(xprt); rc->rc_backchannel = info; break; Modified: head/sys/rpc/clnt_vc.c ============================================================================== --- head/sys/rpc/clnt_vc.c Mon Apr 10 22:46:34 2017 (r316693) +++ head/sys/rpc/clnt_vc.c Mon Apr 10 22:47:18 2017 (r316694) @@ -790,7 +790,7 @@ clnt_vc_destroy(CLIENT *cl) sx_xlock(&xprt->xp_lock); mtx_lock(&ct->ct_lock); xprt->xp_p2 = NULL; - xprt_unregister(xprt); + sx_xunlock(&xprt->xp_lock); } if (ct->ct_socket) { @@ -800,10 +800,6 @@ clnt_vc_destroy(CLIENT *cl) } mtx_unlock(&ct->ct_lock); - if (xprt != NULL) { - sx_xunlock(&xprt->xp_lock); - SVC_RELEASE(xprt); - } mtx_destroy(&ct->ct_lock); if (so) { From owner-svn-src-head@freebsd.org Mon Apr 10 22:56:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D33DD37B2B; Mon, 10 Apr 2017 22:56:40 +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 C5C3B88A; Mon, 10 Apr 2017 22:56:39 +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 v3AMucrm091690; Mon, 10 Apr 2017 22:56:38 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3AMucPC091689; Mon, 10 Apr 2017 22:56:38 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201704102256.v3AMucPC091689@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 10 Apr 2017 22:56:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316695 - head/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Apr 2017 22:56:40 -0000 Author: pfg Date: Mon Apr 10 22:56:38 2017 New Revision: 316695 URL: https://svnweb.freebsd.org/changeset/base/316695 Log: MFV r316693: 8046 Let calloc() do the multiplication in libzfs_fru_refresh https://github.com/illumos/illumos-gate/commit/5697e03e6e3e2697f56ae341c7c8ce79680d6a2e https://www.illumos.org/issues/8046 Reviewed by: Matthew Ahrens Reviewed by: Paul Dagnelie Approved by: Robert Mustacchi Author: Pedro Giffuni MFC after: 3 days Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_fru.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_fru.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_fru.c Mon Apr 10 22:47:18 2017 (r316694) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_fru.c Mon Apr 10 22:56:38 2017 (r316695) @@ -282,7 +282,7 @@ libzfs_fru_refresh(libzfs_handle_t *hdl) if (hdl->libzfs_fru_hash == NULL && (hdl->libzfs_fru_hash = - calloc(ZFS_FRU_HASH_SIZE * sizeof (void *), 1)) == NULL) + calloc(ZFS_FRU_HASH_SIZE, sizeof (void *))) == NULL) return; /* From owner-svn-src-head@freebsd.org Tue Apr 11 00:05:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA715D38C81; Tue, 11 Apr 2017 00:05:28 +0000 (UTC) (envelope-from yaneurabeya@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 86A09B77; Tue, 11 Apr 2017 00:05:28 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-qt0-x22f.google.com with SMTP id v3so69896876qtd.3; Mon, 10 Apr 2017 17:05:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=bXPHlrA1BMk/qX3ci3IV5qssW47b5QzdqzO+XmEgUY4=; b=QHcYg/ARYg/TZVNYD/0i9JRm4lwdSQAfliCxUeOrxlWH3Uo9tu9MFlcyUNUrpLHCH8 aKw2e/8l26nzJEU7DXCldBlTbne62tbUeEjGSSJ/5lbBq2g4GY1Zs2fTxAf5PBtvv6if Fnpw7x8zfBtt2NfH/iJ2iWiVXgZbb+99MsjyKSE8/OfwDvXL1Hd7gqRtRNr5F+bm8ksf yS0U7VLJ56RUiYLyFza19kttzAH5dJsC9nhuFf+TFob9LYKee2Wr+6yOEuMt8mRRZyEa bVcWKN7DvgmNtmikR5agpoJjGATTPl/QnFnhbO/Y+MyBLC7Xvadi0slmup6mzy/Sx6D0 OJPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=bXPHlrA1BMk/qX3ci3IV5qssW47b5QzdqzO+XmEgUY4=; b=P2mluyTNYFN5u0SspnffxcabaaRzophxsy4szJ/lJaLd9g3/tlZogZ3bHEBf+fYT2a Pdjhs753xnETtwP1c2BBomTSbTj4WtjGycRLiqOVjgXOBeWae7pukvwM7f+UFbMC78dw ICBzCCw4eqxKObEq8kHrDf9F5l58FaZK6G+tigKA+tf0i9Xb4VAcGfAD3CWcAiC2FWOx pGKuSbdmBWB/gGxPMecOGDqXm6irViq21RBookXw5wVgTyvoO/kvnyJ4WIsT5x0vjZup pTegIjzV32rmjYcbB8EMiqlgz07nRG4zSN7dwiyEI4+bjE3v3YF8+IFQV3eb9/kMXI3M Yt4Q== X-Gm-Message-State: AN3rC/45y9bqp4N3H3SAj9Lhen2pVikH+4UlTKeEQDJtaKR/7WhZJSS5b7FTkkJQQexY6F61QEPZH8uQP2TY5A== X-Received: by 10.200.37.136 with SMTP id e8mr8552233qte.30.1491869127527; Mon, 10 Apr 2017 17:05:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.93.83 with HTTP; Mon, 10 Apr 2017 17:05:27 -0700 (PDT) In-Reply-To: References: <201704102100.v3AL0lJX041545@repo.freebsd.org> From: Ngie Cooper Date: Mon, 10 Apr 2017 17:05:27 -0700 Message-ID: Subject: Re: svn commit: r316688 - head/share/man/man5 To: Ed Maste 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Apr 2017 00:05:28 -0000 On Mon, Apr 10, 2017 at 2:13 PM, Ed Maste wrote: ... > It looks like several of these $FreeBSD$ entries on the individual > WITH_/WITHOUT_ entries ended up with bogus rev numbers on the previous > src.conf.5 regen so there are a number of spurious entries in this > diff, but I confirmed that the content changes are as desired. > > I'd like to change makeman to eliminate the copied $FreeBSD$ content > from each WITH_/WITHOUT_ block, leaving one $FreeBSD$ for the > generated file as a whole. My initial motivation was to allow > src.conf.5 to be generated in a git working tree or other VCS that > does not expand the $FreeBSD$ tags, but it also eliminates spurious > diffs when regenerating on a stable branch and would have avoided the > spurious changes here. > > That change is in Phabricator review D7997: https://reviews.freebsd.org/D7997. The reason for the bogus $FreeBSD$ entries is actually because the files themselves are fixed in time (due to svn copy/svn switch'es and the like). Admittedly, this is a good case for getting rid of the RCS metadata altogether. Thanks! -Ngie From owner-svn-src-head@freebsd.org Tue Apr 11 05:24:57 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9032AD2FC48; Tue, 11 Apr 2017 05:24:57 +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 4F41F8C4; Tue, 11 Apr 2017 05:24:56 +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 F2F8C10A7B9; Tue, 11 Apr 2017 01:24:54 -0400 (EDT) From: John Baldwin To: Patrick Kelsey Cc: Jung-uk Kim , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r316648 - in head/sys: amd64/amd64 amd64/include arm/arm arm/include arm64/include cddl/dev/dtrace/aarch64 cddl/dev/dtrace/amd64 cddl/dev/dtrace/arm cddl/dev/dtrace/i386 cddl/dev/dtrace... Date: Mon, 10 Apr 2017 22:24:38 -0700 Message-ID: <2086739.zQDsh9Zz6K@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: References: <201704090200.v39203Vf072867@repo.freebsd.org> <3233183.B722KJrnTC@ralph.baldwin.cx> 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, 11 Apr 2017 01:24:55 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Apr 2017 05:24:57 -0000 On Monday, April 10, 2017 04:26:03 PM Patrick Kelsey wrote: > On Mon, Apr 10, 2017 at 1:43 PM, John Baldwin wrote: > > > On Monday, April 10, 2017 01:23:04 PM Jung-uk Kim wrote: > > > On 04/08/2017 22:00, Patrick Kelsey wrote: > > > > Author: pkelsey > > > > Date: Sun Apr 9 02:00:03 2017 > > > > New Revision: 316648 > > > > URL: https://svnweb.freebsd.org/changeset/base/316648 > > > > > > > > Log: > > > > Corrected misspelled versions of rendezvous. > > > > > > > > The MFC will include a compat definition of > > smp_no_rendevous_barrier() > > > > that calls smp_no_rendezvous_barrier(). > > > > > > > > Reviewed by: gnn, kib > > > > MFC after: 1 week > > > > Differential Revision: https://reviews.freebsd.org/D10313 > > > ... > > > > > > We knew about the problem but we didn't fix it because it breaks KPI. > > > For example, sysutils/virtualbox-ose-kmod. If you really want to MFC > > > this change, you have to implement shims. > > > > Also, the function isn't actually called, but is only used in comparisons > > in smp_rendezvous_action(). To do a compat shim you will need to either > > change these comparisons to compare against both function pointers or > > define the alternate symbol as an alias of the existing function. That > > only helps the KBI though. For the KPI would just use a #define to point > > to the new name. > > > > That's a good point about the comparisons in smp_rendezvous_action() - if I > had managed to miss that detail all the way through the compat shim > implementation, it would have littered pointless empty function invocations > and atomic increments into all the uses of smp_rendezvous() that used > smp_no_rendezvous_barrier for at least one of the stages. > > I don't think we have an established place to define machine-independent > symbol aliases. Approaching that through linker scripts would require > spamming a PROVIDE() statement into each of the arch-specific scripts. > Since this is a function, I think a better way than the symbol alias + > #define approach would be to just define a function pointer called > smp_no_rendevous_barrier that gets statically initialized to > smp_no_rendezvous_barrier. In that case, the extern decl takes care of the > KPI, the corresponding symbol definition takes care of the KBI, and it has > a minimal, MI, code footprint. I was thinking something along the lines of __weak_reference() from sys/cdefs.h. Actually, maybe __strong_reference(smp_no_rendezvous, smp_no_rendevous_barrier) would be sufficient? > Either that, or I relax the goal of purging it entirely and put the compat > shim in current also to sidestep the port-patching issue. Well, I'd like to not have it live around forever, but we could add the compat shim to HEAD in the short term (also makes MFC slightly simpler as you just group the two commits together when you MFC). Once the port is patched with the updated FreeBSD_version we can remove the shim from HEAD. -- John Baldwin From owner-svn-src-head@freebsd.org Tue Apr 11 06:21:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5705D39A68; Tue, 11 Apr 2017 06:21:06 +0000 (UTC) (envelope-from pkelsey@gmail.com) Received: from mail-pf0-x244.google.com (mail-pf0-x244.google.com [IPv6:2607:f8b0:400e:c00::244]) (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 6D18CFFD; Tue, 11 Apr 2017 06:21:06 +0000 (UTC) (envelope-from pkelsey@gmail.com) Received: by mail-pf0-x244.google.com with SMTP id o126so11802874pfb.1; Mon, 10 Apr 2017 23:21:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=cFbAu4IRz2bq1VNmWydhWGGEuKEiVTawLVOdBnumFTY=; b=aQ7kvlQaKUAfBlmTiW2ciE3sDiOA56TpIu3z5eZkSWORZ2dni9qw5nDa+x5DbK/2kD 23yCIS5HNhUDiKHWFkvw7FATNwQwEecCbZjzwryAq5ghtmR1d5pHyij9iP5yaBbqJz61 y9ZklQ6NBgx1HhWr5dGXl7YahSMN6nm9x9ct6bTIoVAdL3hjq8Q0TRj811L8ZiFJAV7Y SjiNn0GkL0p491BDiYs8x6jLoE2dICus8AsivKYxzdspZxJxIaJjE3ckH1x8Kq+XGIya wWiWBEOz96UDVrXxytMbNKE5Yq2UaB2AtUTx7hq+QaQaAqJqYvurF89uaYNWThOyFGpE EmfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=cFbAu4IRz2bq1VNmWydhWGGEuKEiVTawLVOdBnumFTY=; b=SCFX62OXsylqMDYE1+B1LWb16kcddNKm3TELkARhhAmzQh45vJsGGvJ+33ascAsQFo 6iryCj+4omG/kEQkiAbpDf7Wt2/LCc1Hw9ZVouAm4sCuUJlBYbexpdbqACScAx5YVDG3 LK61g4uaeyDfADIPaiQ9vIy1VT10gzvsPQXTnI7IETi0hGyS0ODKmC82f3dIsBIsgVW5 6Le1HfPK3NzUE2LWBxpsFgXLQqFeqV6C3hnWN5eiqvRxfe2047iiRcjLqaLrKnjEMcYV xjgZEiBwfWpag2K0THUJLPr2PLP0SYQCGFKV8yBPVMuBUk9yTvvD7f46lI3+YvhucWNy 3hgA== X-Gm-Message-State: AFeK/H3euhwFYaHUxT9HQ7F5GnAzuRKkdzZzyZV+rUeOqIOVv83LgCEcN3V02dyZFcwG7Guxs/yWl7agL3qinw== X-Received: by 10.99.117.8 with SMTP id q8mr53551030pgc.106.1491891665796; Mon, 10 Apr 2017 23:21:05 -0700 (PDT) MIME-Version: 1.0 Sender: pkelsey@gmail.com Received: by 10.100.162.34 with HTTP; Mon, 10 Apr 2017 23:21:05 -0700 (PDT) In-Reply-To: <2086739.zQDsh9Zz6K@ralph.baldwin.cx> References: <201704090200.v39203Vf072867@repo.freebsd.org> <3233183.B722KJrnTC@ralph.baldwin.cx> <2086739.zQDsh9Zz6K@ralph.baldwin.cx> From: Patrick Kelsey Date: Tue, 11 Apr 2017 02:21:05 -0400 X-Google-Sender-Auth: hda3QoAVw-NhHhcV7RYBOt5ygHA Message-ID: Subject: Re: svn commit: r316648 - in head/sys: amd64/amd64 amd64/include arm/arm arm/include arm64/include cddl/dev/dtrace/aarch64 cddl/dev/dtrace/amd64 cddl/dev/dtrace/arm cddl/dev/dtrace/i386 cddl/dev/dtrace... To: John Baldwin Cc: Jung-uk Kim , 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Apr 2017 06:21:06 -0000 On Tue, Apr 11, 2017 at 1:24 AM, John Baldwin wrote: > On Monday, April 10, 2017 04:26:03 PM Patrick Kelsey wrote: > > On Mon, Apr 10, 2017 at 1:43 PM, John Baldwin wrote: > > > > > On Monday, April 10, 2017 01:23:04 PM Jung-uk Kim wrote: > > > > On 04/08/2017 22:00, Patrick Kelsey wrote: > > > > > Author: pkelsey > > > > > Date: Sun Apr 9 02:00:03 2017 > > > > > New Revision: 316648 > > > > > URL: https://svnweb.freebsd.org/changeset/base/316648 > > > > > > > > > > Log: > > > > > Corrected misspelled versions of rendezvous. > > > > > > > > > > The MFC will include a compat definition of > > > smp_no_rendevous_barrier() > > > > > that calls smp_no_rendezvous_barrier(). > > > > > > > > > > Reviewed by: gnn, kib > > > > > MFC after: 1 week > > > > > Differential Revision: https://reviews.freebsd.org/D10313 > > > > ... > > > > > > > > We knew about the problem but we didn't fix it because it breaks KPI. > > > > For example, sysutils/virtualbox-ose-kmod. If you really want to MFC > > > > this change, you have to implement shims. > > > > > > Also, the function isn't actually called, but is only used in > comparisons > > > in smp_rendezvous_action(). To do a compat shim you will need to > either > > > change these comparisons to compare against both function pointers or > > > define the alternate symbol as an alias of the existing function. That > > > only helps the KBI though. For the KPI would just use a #define to > point > > > to the new name. > > > > > > > That's a good point about the comparisons in smp_rendezvous_action() - > if I > > had managed to miss that detail all the way through the compat shim > > implementation, it would have littered pointless empty function > invocations > > and atomic increments into all the uses of smp_rendezvous() that used > > smp_no_rendezvous_barrier for at least one of the stages. > > > > I don't think we have an established place to define machine-independent > > symbol aliases. Approaching that through linker scripts would require > > spamming a PROVIDE() statement into each of the arch-specific scripts. > > Since this is a function, I think a better way than the symbol alias + > > #define approach would be to just define a function pointer called > > smp_no_rendevous_barrier that gets statically initialized to > > smp_no_rendezvous_barrier. In that case, the extern decl takes care of > the > > KPI, the corresponding symbol definition takes care of the KBI, and it > has > > a minimal, MI, code footprint. > > I was thinking something along the lines of __weak_reference() from > sys/cdefs.h. Actually, maybe > __strong_reference(smp_no_rendezvous, smp_no_rendevous_barrier) > would be sufficient? > > __strong_reference() is it. > > Either that, or I relax the goal of purging it entirely and put the > compat > > shim in current also to sidestep the port-patching issue. > > Well, I'd like to not have it live around forever, but we could add the > compat shim to HEAD in the short term (also makes MFC slightly simpler as > you just group the two commits together when you MFC). Once the port is > patched with the updated FreeBSD_version we can remove the shim from HEAD. > > So far it doesn't look like patching ports will be much of an issue. I extracted sources for all ports that contained INSTALL_KLD in their Makefile and grepped them for smp_no_rendevous - the only ports turned up that way are emulators/virtualbox-ose-additions and emulators/virtualbox-ose-kmod. One set of patches will serve both, and I've sent them off to the maintainers. -Patrick From owner-svn-src-head@freebsd.org Tue Apr 11 07:05:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6AD67D39483; Tue, 11 Apr 2017 07:05:56 +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 4623E9F4; Tue, 11 Apr 2017 07:05:56 +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 v3B75tNc094740; Tue, 11 Apr 2017 07:05:55 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3B75tlV094739; Tue, 11 Apr 2017 07:05:55 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201704110705.v3B75tlV094739@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 11 Apr 2017 07:05:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316696 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Apr 2017 07:05:56 -0000 Author: adrian Date: Tue Apr 11 07:05:55 2017 New Revision: 316696 URL: https://svnweb.freebsd.org/changeset/base/316696 Log: [net80211] refactor out "add slot" and "purge slot" for A-MPDU. This is in preparation for A-MSDU decap in A-MPDU support. * refactor out the code to purge a single reorder slot into ampdu_rx_purge_slot(). * refactor out the code to add a frame to the given reorder slot to ampdu_rx_add_slot(). This should be a big no-op as far as current code is concerned. Tested: * QCA9880v2, STA mode (11ac) * iwn(4), STA mode (11n) Reviewed by: avos Differential Revision: https://reviews.freebsd.org/D10328 Modified: head/sys/net80211/ieee80211_ht.c Modified: head/sys/net80211/ieee80211_ht.c ============================================================================== --- head/sys/net80211/ieee80211_ht.c Mon Apr 10 22:56:38 2017 (r316695) +++ head/sys/net80211/ieee80211_ht.c Tue Apr 11 07:05:55 2017 (r316696) @@ -513,23 +513,67 @@ ieee80211_decap_amsdu(struct ieee80211_n } /* + * Add the given frame to the current RX reorder slot. + * + * For future offloaded A-MSDU handling where multiple frames with + * the same sequence number show up here, this routine will append + * those frames as long as they're appropriately tagged. + */ +static int +ampdu_rx_add_slot(struct ieee80211_rx_ampdu *rap, int off, int tid, + ieee80211_seq rxseq, + struct ieee80211_node *ni, + struct mbuf *m) +{ + struct ieee80211vap *vap = ni->ni_vap; + + if (rap->rxa_m[off] == NULL) { + rap->rxa_m[off] = m; + rap->rxa_qframes++; + rap->rxa_qbytes += m->m_pkthdr.len; + vap->iv_stats.is_ampdu_rx_reorder++; + return (0); + } else { + IEEE80211_DISCARD_MAC(vap, + IEEE80211_MSG_INPUT | IEEE80211_MSG_11N, + ni->ni_macaddr, "a-mpdu duplicate", + "seqno %u tid %u BA win <%u:%u>", + rxseq, tid, rap->rxa_start, + IEEE80211_SEQ_ADD(rap->rxa_start, rap->rxa_wnd-1)); + vap->iv_stats.is_rx_dup++; + IEEE80211_NODE_STAT(ni, rx_dup); + m_freem(m); + return (-1); + } +} + +static void +ampdu_rx_purge_slot(struct ieee80211_rx_ampdu *rap, int i) +{ + struct mbuf *m; + + m = rap->rxa_m[i]; + if (m == NULL) + return; + + rap->rxa_m[i] = NULL; + rap->rxa_qbytes -= m->m_pkthdr.len; + rap->rxa_qframes--; + m_freem(m); +} + +/* * Purge all frames in the A-MPDU re-order queue. */ static void ampdu_rx_purge(struct ieee80211_rx_ampdu *rap) { - struct mbuf *m; int i; for (i = 0; i < rap->rxa_wnd; i++) { - m = rap->rxa_m[i]; - if (m != NULL) { - rap->rxa_m[i] = NULL; - rap->rxa_qbytes -= m->m_pkthdr.len; - m_freem(m); - if (--rap->rxa_qframes == 0) - break; - } + ampdu_rx_purge_slot(rap, i); + if (rap->rxa_qframes == 0) + break; } KASSERT(rap->rxa_qbytes == 0 && rap->rxa_qframes == 0, ("lost %u data, %u frames on ampdu rx q", @@ -949,23 +993,9 @@ again: rap->rxa_age = ticks; } - /* save packet */ - if (rap->rxa_m[off] == NULL) { - rap->rxa_m[off] = m; - rap->rxa_qframes++; - rap->rxa_qbytes += m->m_pkthdr.len; - vap->iv_stats.is_ampdu_rx_reorder++; - } else { - IEEE80211_DISCARD_MAC(vap, - IEEE80211_MSG_INPUT | IEEE80211_MSG_11N, - ni->ni_macaddr, "a-mpdu duplicate", - "seqno %u tid %u BA win <%u:%u>", - rxseq, tid, rap->rxa_start, - IEEE80211_SEQ_ADD(rap->rxa_start, rap->rxa_wnd-1)); - vap->iv_stats.is_rx_dup++; - IEEE80211_NODE_STAT(ni, rx_dup); - m_freem(m); - } + /* save packet - this consumes, no matter what */ + ampdu_rx_add_slot(rap, off, tid, rxseq, ni, m); + return CONSUMED; } if (off < IEEE80211_SEQ_BA_RANGE) { From owner-svn-src-head@freebsd.org Tue Apr 11 08:29:14 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F207D38F6C; Tue, 11 Apr 2017 08:29:14 +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 015CE7A6; Tue, 11 Apr 2017 08:29:13 +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 v3B8TDfb027806; Tue, 11 Apr 2017 08:29:13 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3B8TDge027805; Tue, 11 Apr 2017 08:29:13 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201704110829.v3B8TDge027805@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 11 Apr 2017 08:29:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316698 - head/sys/fs/nfsclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Apr 2017 08:29:14 -0000 Author: kib Date: Tue Apr 11 08:29:12 2017 New Revision: 316698 URL: https://svnweb.freebsd.org/changeset/base/316698 Log: Remove debugging printf. Instead, issue a diagnostic and return appropriate error if ncl_flush() was unable to clean buffer queue after the specified number or retries. Reviewed by: rmacklem Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clvnops.c Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Tue Apr 11 07:40:43 2017 (r316697) +++ head/sys/fs/nfsclient/nfs_clvnops.c Tue Apr 11 08:29:12 2017 (r316698) @@ -2971,14 +2971,17 @@ done: free(bvec, M_TEMP); if (error == 0 && commit != 0 && waitfor == MNT_WAIT && (bo->bo_dirty.bv_cnt != 0 || bo->bo_numoutput != 0 || - np->n_directio_asyncwr != 0) && trycnt++ < 5) { - /* try, try again... */ - passone = 1; - wcred = NULL; - bvec = NULL; - bvecsize = 0; -printf("try%d\n", trycnt); - goto again; + np->n_directio_asyncwr != 0)) { + if (trycnt++ < 5) { + /* try, try again... */ + passone = 1; + wcred = NULL; + bvec = NULL; + bvecsize = 0; + goto again; + } + vn_printf(vp, "ncl_flush failed"); + error = called_from_renewthread != 0 ? EIO : EBUSY; } return (error); } From owner-svn-src-head@freebsd.org Tue Apr 11 08:56:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D3EED377E5; Tue, 11 Apr 2017 08:56:20 +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 479C47FA; Tue, 11 Apr 2017 08:56:20 +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 v3B8uJ0j039809; Tue, 11 Apr 2017 08:56:19 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3B8uJq5039806; Tue, 11 Apr 2017 08:56:19 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201704110856.v3B8uJq5039806@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 11 Apr 2017 08:56:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316699 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Apr 2017 08:56:20 -0000 Author: ae Date: Tue Apr 11 08:56:18 2017 New Revision: 316699 URL: https://svnweb.freebsd.org/changeset/base/316699 Log: Do not adjust interface MTU automatically. Leave this task to the system administrator. This restores the behavior that was prior to r274246. No objection from: #network MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D10215 Modified: head/sys/net/if_gre.c head/sys/net/if_gre.h head/sys/net/if_me.c Modified: head/sys/net/if_gre.c ============================================================================== --- head/sys/net/if_gre.c Tue Apr 11 08:29:12 2017 (r316698) +++ head/sys/net/if_gre.c Tue Apr 11 08:56:18 2017 (r316699) @@ -88,7 +88,7 @@ __FBSDID("$FreeBSD$"); #include #include -#define GREMTU 1500 +#define GREMTU 1476 static const char grename[] = "gre"; static MALLOC_DEFINE(M_GRE, grename, "Generic Routing Encapsulation"); static VNET_DEFINE(struct mtx, gre_mtx); @@ -173,7 +173,7 @@ gre_clone_create(struct if_clone *ifc, i GRE2IFP(sc)->if_softc = sc; if_initname(GRE2IFP(sc), grename, unit); - GRE2IFP(sc)->if_mtu = sc->gre_mtu = GREMTU; + GRE2IFP(sc)->if_mtu = GREMTU; GRE2IFP(sc)->if_flags = IFF_POINTOPOINT|IFF_MULTICAST; GRE2IFP(sc)->if_output = gre_output; GRE2IFP(sc)->if_ioctl = gre_ioctl; @@ -231,7 +231,8 @@ gre_ioctl(struct ifnet *ifp, u_long cmd, /* XXX: */ if (ifr->ifr_mtu < 576) return (EINVAL); - break; + ifp->if_mtu = ifr->ifr_mtu; + return (0); case SIOCSIFADDR: ifp->if_flags |= IFF_UP; case SIOCSIFFLAGS: @@ -255,12 +256,6 @@ gre_ioctl(struct ifnet *ifp, u_long cmd, } error = 0; switch (cmd) { - case SIOCSIFMTU: - GRE_WLOCK(sc); - sc->gre_mtu = ifr->ifr_mtu; - gre_updatehdr(sc); - GRE_WUNLOCK(sc); - goto end; case SIOCSIFPHYADDR: #ifdef INET6 case SIOCSIFPHYADDR_IN6: @@ -549,7 +544,6 @@ gre_updatehdr(struct gre_softc *sc) } else sc->gre_oseq = 0; gh->gre_flags = htons(flags); - GRE2IFP(sc)->if_mtu = sc->gre_mtu - sc->gre_hlen; } static void Modified: head/sys/net/if_gre.h ============================================================================== --- head/sys/net/if_gre.h Tue Apr 11 08:29:12 2017 (r316698) +++ head/sys/net/if_gre.h Tue Apr 11 08:56:18 2017 (r316699) @@ -69,7 +69,6 @@ struct gre_softc { uint32_t gre_oseq; uint32_t gre_key; uint32_t gre_options; - uint32_t gre_mtu; u_int gre_fibnum; u_int gre_hlen; /* header size */ union { Modified: head/sys/net/if_me.c ============================================================================== --- head/sys/net/if_me.c Tue Apr 11 08:29:12 2017 (r316698) +++ head/sys/net/if_me.c Tue Apr 11 08:56:18 2017 (r316699) @@ -66,7 +66,7 @@ __FBSDID("$FreeBSD$"); #include #include -#define MEMTU 1500 +#define MEMTU (1500 - sizeof(struct mobhdr)) static const char mename[] = "me"; static MALLOC_DEFINE(M_IFME, mename, "Minimal Encapsulation for IP"); static VNET_DEFINE(struct mtx, me_mtx); @@ -186,7 +186,7 @@ me_clone_create(struct if_clone *ifc, in ME2IFP(sc)->if_softc = sc; if_initname(ME2IFP(sc), mename, unit); - ME2IFP(sc)->if_mtu = MEMTU - sizeof(struct mobhdr); + ME2IFP(sc)->if_mtu = MEMTU;; ME2IFP(sc)->if_flags = IFF_POINTOPOINT|IFF_MULTICAST; ME2IFP(sc)->if_output = me_output; ME2IFP(sc)->if_ioctl = me_ioctl; @@ -236,7 +236,7 @@ me_ioctl(struct ifnet *ifp, u_long cmd, case SIOCSIFMTU: if (ifr->ifr_mtu < 576) return (EINVAL); - ifp->if_mtu = ifr->ifr_mtu - sizeof(struct mobhdr); + ifp->if_mtu = ifr->ifr_mtu; return (0); case SIOCSIFADDR: ifp->if_flags |= IFF_UP; From owner-svn-src-head@freebsd.org Tue Apr 11 10:46:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3BBA2D39E0F for ; Tue, 11 Apr 2017 10:46:03 +0000 (UTC) (envelope-from jdwatson@rocketmail.com) Received: from nm5-vm4.bullet.mail.gq1.yahoo.com (nm5-vm4.bullet.mail.gq1.yahoo.com [98.136.218.179]) (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 12B291B92 for ; Tue, 11 Apr 2017 10:46:02 +0000 (UTC) (envelope-from jdwatson@rocketmail.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rocketmail.com; s=s2048; t=1491907555; bh=XabrsBkh1Fa7BfZaU9jHCrxlbfiwnxVzFKcX/k2cj3E=; h=From:Subject:Date:To:From:Subject; b=TA2aWLpgpUIJp7Km425E1r8oLG2sXbOfLPpfbf09KuPOaO2kyRb0YX+M2By31R4ixKOEN4YEzPeDyQdWFYywNunYYKU//PGRVAF7CO/Mf6fl8iwRlKudwgI+aU+YY3T19ST9ZwiZtkQGXXJqzDR1s+8BAptnGy+TQcBEVSOA7VXs1ftM4nK+Bgyu3pVWcuU8LxkaxNxfTxuGjc2/coH2UfzEsWRwDGJbSjTZUNwn0Z6DWAHQaHJv8owvmwig7d1zxXa5pfYu2zSBCr6DVJoW9zoRyO06C0HAOk+MdyHw+XVvcagJaaScQQAOUjK9Z7mQZtVmJk1Z8UdsPu07UXdkCg== Received: from [98.137.12.61] by nm5.bullet.mail.gq1.yahoo.com with NNFMP; 11 Apr 2017 10:45:55 -0000 Received: from [98.136.164.73] by tm6.bullet.mail.gq1.yahoo.com with NNFMP; 11 Apr 2017 10:45:55 -0000 Received: from [127.0.0.1] by smtp235.mail.gq1.yahoo.com with NNFMP; 11 Apr 2017 10:45:55 -0000 X-Yahoo-Newman-Id: 932219.16812.bm@smtp235.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: qp0szcQVM1k2JhhGabyZk9bT8T.CMA7VtSj5X5f2g0Qoaw2 oW3TvzlSNtkUwVQjPUqTfK24U_qOG7Em4x.pO.f2jr4KFhYhcoBxh7bTgGFa eszPUCfY9afSKZkTx.bI4Ob8EWJL1tlq6VdII2rhJ3H.j_rogG33wTO6IHqO exyiAor51HSx4fuxaiZkGZm_MKI2F_OI0n..68MxoH7IBuGjmPFibcp3wIny YnCwvaW3CXtKu3eDYRJZN0eemThm4CEsnINUKLvi1rzopAwOPE7NMjRNg2Dx jKAlyJGJY4mC3p8Yl8wCpcJoRAD3bwCrUaIES9oUy3ATobIUszhbVbSex..D Nn53zAdMAvdW0N_PD_DQZWpLLZqGOSKg6vJ1c0IgzZL0HI4P8MLdedzoeoY. 2sO3Lq5O3_zWBCqb0.fLyl3xpWELv2gDnE8ob.BPSynITdUJd0mNShSd4_7e 0EGvw0Rv2kikOo4Ym7elK1H7VZ0zYkzpfEIyypM_pYLXTJK5w1C5s1vogynL bP.hh6d3PugjixJiWAgWpaVpU6RJCvYQbDnD3XY6xwvE0_ASJ X-Yahoo-SMTP: C8Jbmo.swBDqhJFVoTBoYHFmT5UnrxR5 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii From: John Watson Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r290171 - head/sys/arm/broadcom/bcm2835 Message-Id: <4408AEAB-2B04-4C74-9C99-C45E004E6212@rocketmail.com> Date: Tue, 11 Apr 2017 06:45:54 -0400 To: svn-src-head@freebsd.org X-Mailer: iPhone Mail (14E304) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Apr 2017 10:46:03 -0000 Trying to install GNOME3 on an rpi3 using the raspbsd.org image.=20 Do you know where I can get some help? The only link with a contact is yours= .=20 Had to download and add ports to the image and install from there. Configure= d rc.conf per FreeBSD but not able. Seems to make X11 but won't make GNOME From owner-svn-src-head@freebsd.org Tue Apr 11 13:31:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98BBFD393DD; Tue, 11 Apr 2017 13:31:28 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 692C3FBC; Tue, 11 Apr 2017 13:31:28 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3BDVRtC051527; Tue, 11 Apr 2017 13:31:27 GMT (envelope-from cognet@FreeBSD.org) Received: (from cognet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3BDVRYj051526; Tue, 11 Apr 2017 13:31:27 GMT (envelope-from cognet@FreeBSD.org) Message-Id: <201704111331.v3BDVRYj051526@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cognet set sender to cognet@FreeBSD.org using -f From: Olivier Houchard Date: Tue, 11 Apr 2017 13:31:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316702 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Apr 2017 13:31:28 -0000 Author: cognet Date: Tue Apr 11 13:31:27 2017 New Revision: 316702 URL: https://svnweb.freebsd.org/changeset/base/316702 Log: This file is also used in libcompiler_rt, so bring in stdbool.h if we're not in the kernel. Modified: head/sys/mips/mips/stdatomic.c Modified: head/sys/mips/mips/stdatomic.c ============================================================================== --- head/sys/mips/mips/stdatomic.c Tue Apr 11 12:49:25 2017 (r316701) +++ head/sys/mips/mips/stdatomic.c Tue Apr 11 13:31:27 2017 (r316702) @@ -33,6 +33,10 @@ __FBSDID("$FreeBSD$"); #include #include +#ifndef _KERNEL +#include +#endif /* _KERNEL */ + #if defined(__SYNC_ATOMICS) /* From owner-svn-src-head@freebsd.org Tue Apr 11 15:20:34 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2397AD39C6E; Tue, 11 Apr 2017 15:20:34 +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 D13C0B70; Tue, 11 Apr 2017 15:20:33 +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 v3BFKXMJ097542; Tue, 11 Apr 2017 15:20:33 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3BFKWAi097541; Tue, 11 Apr 2017 15:20:32 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201704111520.v3BFKWAi097541@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Tue, 11 Apr 2017 15:20:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316704 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Apr 2017 15:20:34 -0000 Author: tsoome Date: Tue Apr 11 15:20:32 2017 New Revision: 316704 URL: https://svnweb.freebsd.org/changeset/base/316704 Log: loader.efi: only fetch zfs pool guid for the actual boot device With the zfs probe cleanup, the mistake did slip in the probe code; instead of reading the pool GUID for the actual boot device (partition), we read GUID for first found pool from the boot disk. This will break the case when there are both zfs pool and ufs on the boot disk, and the ufs is used for boot, not zfs. Reviewed by: smh Differential Revision: https://reviews.freebsd.org/D10359 Modified: head/sys/boot/efi/loader/main.c Modified: head/sys/boot/efi/loader/main.c ============================================================================== --- head/sys/boot/efi/loader/main.c Tue Apr 11 13:42:26 2017 (r316703) +++ head/sys/boot/efi/loader/main.c Tue Apr 11 15:20:32 2017 (r316704) @@ -804,38 +804,26 @@ efi_zfs_probe(void) pdinfo_t *hd, *pd = NULL; EFI_GUID imgid = LOADED_IMAGE_PROTOCOL; EFI_LOADED_IMAGE *img; - EFI_HANDLE boot_disk = NULL; char devname[SPECNAMELEN + 1]; - uint64_t *guidp = NULL; BS->HandleProtocol(IH, &imgid, (VOID**)&img); - - /* Find the handle for the boot disk. */ hdi = efiblk_get_pdinfo_list(&efipart_hddev); - STAILQ_FOREACH(hd, hdi, pd_link) { - STAILQ_FOREACH(pd, &hd->pd_part, pd_link) { - if (pd->pd_handle == img->DeviceHandle) - boot_disk = hd->pd_handle; - } - } /* - * We provide non-NULL guid pointer if the disk was used for boot, - * and reset after the first found pool. - * Technically this solution is not very correct, we assume the boot - * pool is the first pool on this disk. + * Find the handle for the boot device. The boot1 did find the + * device with loader binary, now we need to search for the + * same device and if it is part of the zfs pool, we record the + * pool GUID for currdev setup. */ - STAILQ_FOREACH(hd, hdi, pd_link) { - if (hd->pd_handle == boot_disk) - guidp = &pool_guid; - STAILQ_FOREACH(pd, &hd->pd_part, pd_link) { + snprintf(devname, sizeof(devname), "%s%dp%d:", efipart_hddev.dv_name, hd->pd_unit, pd->pd_unit); - (void) zfs_probe_dev(devname, guidp); - if (guidp != NULL && pool_guid != 0) - guidp = NULL; + if (pd->pd_handle == img->DeviceHandle) + (void) zfs_probe_dev(devname, &pool_guid); + else + (void) zfs_probe_dev(devname, NULL); } } } From owner-svn-src-head@freebsd.org Tue Apr 11 16:51:36 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ECC7BD3A5C2; Tue, 11 Apr 2017 16:51:36 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5085AA0; Tue, 11 Apr 2017 16:51:36 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v3BGpZJ9075425; Tue, 11 Apr 2017 09:51:35 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v3BGpZi9075424; Tue, 11 Apr 2017 09:51:35 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201704111651.v3BGpZi9075424@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r316699 - head/sys/net In-Reply-To: <201704110856.v3B8uJq5039806@repo.freebsd.org> To: "Andrey V. Elsukov" Date: Tue, 11 Apr 2017 09:51:35 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Apr 2017 16:51:37 -0000 > Author: ae > Date: Tue Apr 11 08:56:18 2017 > New Revision: 316699 > URL: https://svnweb.freebsd.org/changeset/base/316699 > > Log: > Do not adjust interface MTU automatically. Leave this task to the system > administrator. > > This restores the behavior that was prior to r274246. > > No objection from: #network > MFC after: 2 weeks > Differential Revision: https://reviews.freebsd.org/D10215 > > Modified: > head/sys/net/if_gre.c > head/sys/net/if_gre.h > head/sys/net/if_me.c > > Modified: head/sys/net/if_gre.c > ============================================================================== > --- head/sys/net/if_gre.c Tue Apr 11 08:29:12 2017 (r316698) > +++ head/sys/net/if_gre.c Tue Apr 11 08:56:18 2017 (r316699) > @@ -88,7 +88,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > > -#define GREMTU 1500 > +#define GREMTU 1476 I would of thought that this was #define GREMTU ETHERMTU and now should probably be: #define GREMTU ETHERMTU - gre_hlen; Or what ever the approprite sizeof(foo) is; Isn't this arguably wrong in the face of JumboFrames? > static const char grename[] = "gre"; > static MALLOC_DEFINE(M_GRE, grename, "Generic Routing Encapsulation"); > static VNET_DEFINE(struct mtx, gre_mtx); > @@ -173,7 +173,7 @@ gre_clone_create(struct if_clone *ifc, i > GRE2IFP(sc)->if_softc = sc; > if_initname(GRE2IFP(sc), grename, unit); > > - GRE2IFP(sc)->if_mtu = sc->gre_mtu = GREMTU; > + GRE2IFP(sc)->if_mtu = GREMTU; > GRE2IFP(sc)->if_flags = IFF_POINTOPOINT|IFF_MULTICAST; > GRE2IFP(sc)->if_output = gre_output; > GRE2IFP(sc)->if_ioctl = gre_ioctl; > @@ -231,7 +231,8 @@ gre_ioctl(struct ifnet *ifp, u_long cmd, > /* XXX: */ > if (ifr->ifr_mtu < 576) This is another magic constant that should be in a #define. > return (EINVAL); > - break; > + ifp->if_mtu = ifr->ifr_mtu; > + return (0); > case SIOCSIFADDR: > ifp->if_flags |= IFF_UP; > case SIOCSIFFLAGS: > @@ -255,12 +256,6 @@ gre_ioctl(struct ifnet *ifp, u_long cmd, > } > error = 0; > switch (cmd) { > - case SIOCSIFMTU: > - GRE_WLOCK(sc); > - sc->gre_mtu = ifr->ifr_mtu; > - gre_updatehdr(sc); > - GRE_WUNLOCK(sc); > - goto end; > case SIOCSIFPHYADDR: > #ifdef INET6 > case SIOCSIFPHYADDR_IN6: > @@ -549,7 +544,6 @@ gre_updatehdr(struct gre_softc *sc) > } else > sc->gre_oseq = 0; > gh->gre_flags = htons(flags); > - GRE2IFP(sc)->if_mtu = sc->gre_mtu - sc->gre_hlen; > } > > static void > > Modified: head/sys/net/if_gre.h > ============================================================================== > --- head/sys/net/if_gre.h Tue Apr 11 08:29:12 2017 (r316698) > +++ head/sys/net/if_gre.h Tue Apr 11 08:56:18 2017 (r316699) > @@ -69,7 +69,6 @@ struct gre_softc { > uint32_t gre_oseq; > uint32_t gre_key; > uint32_t gre_options; > - uint32_t gre_mtu; > u_int gre_fibnum; > u_int gre_hlen; /* header size */ > union { > > Modified: head/sys/net/if_me.c > ============================================================================== > --- head/sys/net/if_me.c Tue Apr 11 08:29:12 2017 (r316698) > +++ head/sys/net/if_me.c Tue Apr 11 08:56:18 2017 (r316699) > @@ -66,7 +66,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > > -#define MEMTU 1500 > +#define MEMTU (1500 - sizeof(struct mobhdr)) 1500 -> ETHERMTU? > static const char mename[] = "me"; > static MALLOC_DEFINE(M_IFME, mename, "Minimal Encapsulation for IP"); > static VNET_DEFINE(struct mtx, me_mtx); > @@ -186,7 +186,7 @@ me_clone_create(struct if_clone *ifc, in > ME2IFP(sc)->if_softc = sc; > if_initname(ME2IFP(sc), mename, unit); > > - ME2IFP(sc)->if_mtu = MEMTU - sizeof(struct mobhdr); > + ME2IFP(sc)->if_mtu = MEMTU;; > ME2IFP(sc)->if_flags = IFF_POINTOPOINT|IFF_MULTICAST; > ME2IFP(sc)->if_output = me_output; > ME2IFP(sc)->if_ioctl = me_ioctl; > @@ -236,7 +236,7 @@ me_ioctl(struct ifnet *ifp, u_long cmd, > case SIOCSIFMTU: > if (ifr->ifr_mtu < 576) > return (EINVAL); > - ifp->if_mtu = ifr->ifr_mtu - sizeof(struct mobhdr); > + ifp->if_mtu = ifr->ifr_mtu; > return (0); > case SIOCSIFADDR: > ifp->if_flags |= IFF_UP; > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Tue Apr 11 16:55:44 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D8B0D3A654; Tue, 11 Apr 2017 16:55:44 +0000 (UTC) (envelope-from hiren@strugglingcoder.info) Received: from mail.strugglingcoder.info (strugglingcoder.info [104.236.146.68]) by mx1.freebsd.org (Postfix) with ESMTP id 1F57BCF9; Tue, 11 Apr 2017 16:55:43 +0000 (UTC) (envelope-from hiren@strugglingcoder.info) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPA id C2B8117893; Tue, 11 Apr 2017 09:47:55 -0700 (PDT) Date: Tue, 11 Apr 2017 09:47:55 -0700 From: hiren panchasara To: "Andrey V. Elsukov" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r316699 - head/sys/net Message-ID: <20170411164755.GK74488@strugglingcoder.info> References: <201704110856.v3B8uJq5039806@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="zH41lVBEV8cLJnCl" Content-Disposition: inline In-Reply-To: <201704110856.v3B8uJq5039806@repo.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Apr 2017 16:55:44 -0000 --zH41lVBEV8cLJnCl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 04/11/17 at 08:56P, Andrey V. Elsukov wrote: > Author: ae > Date: Tue Apr 11 08:56:18 2017 > New Revision: 316699 > URL: https://svnweb.freebsd.org/changeset/base/316699 >=20 > Log: > Do not adjust interface MTU automatically. Leave this task to the system > administrator. > =20 > This restores the behavior that was prior to r274246. Hi Andrey, I was going to ask for more context and then I saw that phabric review has a lot more details that I wish were a part of the commit log. Cheers, Hiren --zH41lVBEV8cLJnCl Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAABCgBmBQJY7Qi4XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/lhF0H/2Mi8YgIhEdwxVQBcYNJK4Cb yEuSgfgY85xhIr1ggeu9EYoWT44Vi2RawSGHcNXa7U4niwHDnT/jV9dhex9A8UF/ 66WX6Hg6reTtMZeS5HmXu5Iy1NvRDSvvVkl5T9g4rdguz8ZpqGdpGs3ZWDST2Tbu qUePhDwtoj2EVMseEtHFtvsqw1VyNNGQClGrMSkqd1qSTtJXT1IB8rGIFVsgGgR2 B2OfX1AH6TB7bHZjJHwsj4xBIAii5ueCmeXm7J9ixqiDKnELaXmsc/QAKRlCDDoP dASH2aGWrRTA3OzT71XHCDqsjVjzmjnJX43+Cz/0zwYdU6RXs1gVL1i7EU/C6vw= =hXhD -----END PGP SIGNATURE----- --zH41lVBEV8cLJnCl-- From owner-svn-src-head@freebsd.org Tue Apr 11 17:01:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F09ECD3A7A5; Tue, 11 Apr 2017 17:01:21 +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 A74C8FD2; Tue, 11 Apr 2017 17:01:21 +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 v3BH1Kfc043419; Tue, 11 Apr 2017 17:01:20 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3BH1Kxq043418; Tue, 11 Apr 2017 17:01:20 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201704111701.v3BH1Kxq043418@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 11 Apr 2017 17:01:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316706 - head/tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Apr 2017 17:01:22 -0000 Author: emaste Date: Tue Apr 11 17:01:20 2017 New Revision: 316706 URL: https://svnweb.freebsd.org/changeset/base/316706 Log: makeman: don't copy $FreeBSD$ tags from source files into output Copying the source VCS ID from WITH_/WITHOUT_* into the generated src.conf.5 is not necessary, as it is generally possible to determine the same information using the VCS to examine commit metadata. The individual source files also match the name of the option recorded in the generated file, so it is clear from where the content originated. The copied IDs generate extraneous, non-content noise in the generated src.conf.5 in some cases, including the first time the file is generated on a stable branch. In addition, the source file $FreeBSD$ tags are not expanded by git or other non-Subversion VCSs, which means that makeman previously could not be used in a non-Subversion working tree. I accept that there's some desire to keep these, but on balance believe there is more benefit in removing them. Reviewed by: imp, ngie MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D7997 Modified: head/tools/build/options/makeman Modified: head/tools/build/options/makeman ============================================================================== --- head/tools/build/options/makeman Tue Apr 11 16:32:46 2017 (r316705) +++ head/tools/build/options/makeman Tue Apr 11 17:01:20 2017 (r316706) @@ -1,12 +1,12 @@ #!/bin/sh # # This file is in the public domain. +# +# $FreeBSD$ set -o errexit export LC_ALL=C -ident='$FreeBSD$' - t=$(mktemp -d -t makeman) trap 'test -d $t && rm -rf $t' exit @@ -126,12 +126,9 @@ main() { echo "building src.conf.5 man page from files in ${PWD}" >&2 - ident=${ident#$} - ident=${ident% $} fbsdid='$'FreeBSD'$' cat < Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1DB3DD3AA73; Tue, 11 Apr 2017 17:06:54 +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 C2FD88A9; Tue, 11 Apr 2017 17:06:53 +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 v3BH6qPh045038; Tue, 11 Apr 2017 17:06:52 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3BH6qlY045037; Tue, 11 Apr 2017 17:06:52 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201704111706.v3BH6qlY045037@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 11 Apr 2017 17:06:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316707 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Apr 2017 17:06:54 -0000 Author: emaste Date: Tue Apr 11 17:06:52 2017 New Revision: 316707 URL: https://svnweb.freebsd.org/changeset/base/316707 Log: Regenerate src.conf.5 after r316706 Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Tue Apr 11 17:01:20 2017 (r316706) +++ head/share/man/man5/src.conf.5 Tue Apr 11 17:06:52 2017 (r316707) @@ -1,5 +1,4 @@ .\" DO NOT EDIT-- this file is automatically generated. -.\" from FreeBSD: head/tools/build/options/makeman 315768 2017-03-23 02:26:15Z ngie .\" $FreeBSD$ .Dd April 10, 2017 .Dt SRC.CONF 5 @@ -94,56 +93,45 @@ This list provides a name and short desc that can be used for source builds. .Bl -tag -width indent .It Va WITHOUT_ACCT -.\" from FreeBSD: head/tools/build/options/WITHOUT_ACCT 223201 2011-06-17 20:47:44Z ed Set to not build process accounting tools such as .Xr accton 8 and .Xr sa 8 . .It Va WITHOUT_ACPI -.\" from FreeBSD: head/tools/build/options/WITHOUT_ACPI 156932 2006-03-21 07:50:50Z ru Set to not build .Xr acpiconf 8 , .Xr acpidump 8 and related programs. .It Va WITHOUT_AMD -.\" from FreeBSD: head/tools/build/options/WITHOUT_AMD 183242 2008-09-21 22:02:26Z sam Set to not build .Xr amd 8 , and related programs. .It Va WITHOUT_APM -.\" from FreeBSD: head/tools/build/options/WITHOUT_APM 183242 2008-09-21 22:02:26Z sam Set to not build .Xr apm 8 , .Xr apmd 8 and related programs. .It Va WITHOUT_ASSERT_DEBUG -.\" from FreeBSD: head/tools/build/options/WITHOUT_ASSERT_DEBUG 162215 2006-09-11 13:55:27Z ru Set to compile programs and libraries without the .Xr assert 3 checks. .It Va WITHOUT_AT -.\" from FreeBSD: head/tools/build/options/WITHOUT_AT 183242 2008-09-21 22:02:26Z sam Set to not build .Xr at 1 and related utilities. .It Va WITHOUT_ATM -.\" from FreeBSD: head/tools/build/options/WITHOUT_ATM 156932 2006-03-21 07:50:50Z ru Set to not build programs and libraries related to ATM networking. .It Va WITHOUT_AUDIT -.\" from FreeBSD: head/tools/build/options/WITHOUT_AUDIT 156932 2006-03-21 07:50:50Z ru Set to not build audit support into system programs. .It Va WITHOUT_AUTHPF -.\" from FreeBSD: head/tools/build/options/WITHOUT_AUTHPF 156932 2006-03-21 07:50:50Z ru Set to not build .Xr authpf 8 . .It Va WITHOUT_AUTOFS -.\" from FreeBSD: head/tools/build/options/WITHOUT_AUTOFS 296264 2016-03-01 11:36:10Z trasz Set to not build .Xr autofs 5 related programs, libraries, and kernel modules. .It Va WITH_AUTO_OBJ -.\" from FreeBSD: head/tools/build/options/WITH_AUTO_OBJ 284708 2015-06-22 20:21:57Z sjg Enable automatic creation of objdirs. .Pp This must be set in the environment, make command line, or @@ -151,14 +139,12 @@ This must be set in the environment, mak not .Pa /etc/src.conf . .It Va WITHOUT_BHYVE -.\" from FreeBSD: head/tools/build/options/WITHOUT_BHYVE 277727 2015-01-26 06:44:48Z ngie Set to not build or install .Xr bhyve 8 , associated utilities, and examples. .Pp This option only affects amd64/amd64. .It Va WITHOUT_BINUTILS -.\" from FreeBSD: head/tools/build/options/WITHOUT_BINUTILS 286332 2015-08-05 18:30:00Z emaste Set to not build or install binutils (as, ld, objcopy, and objdump ) as part of the normal system build. The resulting system cannot build programs from source. @@ -172,14 +158,12 @@ When set, it enforces these options: .Va WITHOUT_GDB .El .It Va WITH_BINUTILS -.\" from FreeBSD: head/tools/build/options/WITH_BINUTILS 295491 2016-02-11 00:14:00Z emaste Set to build and install binutils (as, ld, objcopy, and objdump) as part of the normal system build. .Pp This is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64. .It Va WITHOUT_BINUTILS_BOOTSTRAP -.\" from FreeBSD: head/tools/build/options/WITHOUT_BINUTILS_BOOTSTRAP 295490 2016-02-10 23:57:09Z emaste Set to not build binutils (as, ld, objcopy and objdump) as part of the bootstrap process. .Bf -symbolic @@ -190,14 +174,12 @@ toolchain is provided. This is a default setting on arm64/aarch64. .It Va WITH_BINUTILS_BOOTSTRAP -.\" from FreeBSD: head/tools/build/options/WITH_BINUTILS_BOOTSTRAP 295491 2016-02-11 00:14:00Z emaste Set build binutils (as, ld, objcopy and objdump) as part of the bootstrap process. .Pp This is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64. .It Va WITHOUT_BLACKLIST -.\" from FreeBSD: head/tools/build/options/WITHOUT_BLACKLIST 313169 2017-02-03 19:09:46Z wblock Set this if you do not want to build blacklistd/blacklistctl. When set, it enforces these options: .Pp @@ -206,7 +188,6 @@ When set, it enforces these options: .Va WITHOUT_BLACKLIST_SUPPORT .El .It Va WITHOUT_BLACKLIST_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_BLACKLIST_SUPPORT 301554 2016-06-07 16:35:55Z lidl Set to build some programs without blacklistd support, like .Xr fingerd 8 , .Xr ftpd 8 , @@ -215,39 +196,30 @@ Set to build some programs without black and .Xr sshd 8 . .It Va WITHOUT_BLUETOOTH -.\" from FreeBSD: head/tools/build/options/WITHOUT_BLUETOOTH 156932 2006-03-21 07:50:50Z ru Set to not build Bluetooth related kernel modules, programs and libraries. .It Va WITHOUT_BOOT -.\" from FreeBSD: head/tools/build/options/WITHOUT_BOOT 156932 2006-03-21 07:50:50Z ru Set to not build the boot blocks and loader. .It Va WITHOUT_BOOTPARAMD -.\" from FreeBSD: head/tools/build/options/WITHOUT_BOOTPARAMD 278192 2015-02-04 10:19:32Z ngie Set to not build or install .Xr bootparamd 8 . .It Va WITHOUT_BOOTPD -.\" from FreeBSD: head/tools/build/options/WITHOUT_BOOTPD 278192 2015-02-04 10:19:32Z ngie Set to not build or install .Xr bootpd 8 . .It Va WITHOUT_BSDINSTALL -.\" from FreeBSD: head/tools/build/options/WITHOUT_BSDINSTALL 277677 2015-01-25 04:43:13Z ngie Set to not build .Xr bsdinstall 8 , .Xr sade 8 , and related programs. .It Va WITHOUT_BSD_CPIO -.\" from FreeBSD: head/tools/build/options/WITHOUT_BSD_CPIO 179813 2008-06-16 05:48:15Z dougb Set to not build the BSD licensed version of cpio based on .Xr libarchive 3 . .It Va WITH_BSD_GREP -.\" from FreeBSD: head/tools/build/options/WITH_BSD_GREP 222273 2011-05-25 01:04:12Z obrien Install BSD-licensed grep as '[ef]grep' instead of GNU grep. .It Va WITHOUT_BSNMP -.\" from FreeBSD: head/tools/build/options/WITHOUT_BSNMP 183306 2008-09-23 16:15:42Z sam Set to not build or install .Xr bsnmpd 1 and related libraries and data files. .It Va WITHOUT_BZIP2 -.\" from FreeBSD: head/tools/build/options/WITHOUT_BZIP2 174550 2007-12-12 16:43:17Z ru Set to not build contributed bzip2 software as a part of the base system. .Bf -symbolic The option has no effect yet. @@ -259,14 +231,11 @@ When set, it enforces these options: .Va WITHOUT_BZIP2_SUPPORT .El .It Va WITHOUT_BZIP2_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_BZIP2_SUPPORT 166255 2007-01-26 10:19:08Z delphij Set to build some programs without optional bzip2 support. .It Va WITHOUT_CALENDAR -.\" from FreeBSD: head/tools/build/options/WITHOUT_CALENDAR 156932 2006-03-21 07:50:50Z ru Set to not build .Xr calendar 1 . .It Va WITHOUT_CAPSICUM -.\" from FreeBSD: head/tools/build/options/WITHOUT_CAPSICUM 229319 2012-01-02 21:57:58Z rwatson Set to not build Capsicum support into system programs. When set, it enforces these options: .Pp @@ -275,10 +244,8 @@ When set, it enforces these options: .Va WITHOUT_CASPER .El .It Va WITHOUT_CASPER -.\" from FreeBSD: head/tools/build/options/WITHOUT_CASPER 258838 2013-12-02 08:21:28Z pjd Set to not build Casper program and related libraries. .It Va WITH_CCACHE_BUILD -.\" from FreeBSD: head/tools/build/options/WITH_CCACHE_BUILD 313169 2017-02-03 19:09:46Z wblock Set to use .Xr ccache 1 for the build. @@ -318,12 +285,10 @@ See .Xr ccache 1 for more configuration options. .It Va WITHOUT_CCD -.\" from FreeBSD: head/tools/build/options/WITHOUT_CCD 277678 2015-01-25 04:52:48Z ngie Set to not build .Xr geom_ccd 4 and related utilities. .It Va WITHOUT_CDDL -.\" from FreeBSD: head/tools/build/options/WITHOUT_CDDL 163861 2006-11-01 09:02:11Z jb Set to not build code licensed under Sun's CDDL. When set, it enforces these options: .Pp @@ -334,7 +299,6 @@ When set, it enforces these options: .Va WITHOUT_ZFS .El .It Va WITHOUT_CLANG -.\" from FreeBSD: head/tools/build/options/WITHOUT_CLANG 264660 2014-04-18 17:03:58Z imp Set to not build the Clang C/C++ compiler during the regular phase of the build. .Pp This is a default setting on @@ -348,13 +312,11 @@ When set, it enforces these options: .Va WITHOUT_CLANG_FULL .El .It Va WITH_CLANG -.\" from FreeBSD: head/tools/build/options/WITH_CLANG 264660 2014-04-18 17:03:58Z imp Set to build the Clang C/C++ compiler during the normal phase of the build. .Pp This is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpcspe. .It Va WITHOUT_CLANG_BOOTSTRAP -.\" from FreeBSD: head/tools/build/options/WITHOUT_CLANG_BOOTSTRAP 313169 2017-02-03 19:09:46Z wblock Set to not build the Clang C/C++ compiler during the bootstrap phase of the build. To be able to build the system, either gcc or clang bootstrap must be @@ -363,30 +325,25 @@ enabled unless an alternate compiler is This is a default setting on mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64. .It Va WITH_CLANG_BOOTSTRAP -.\" from FreeBSD: head/tools/build/options/WITH_CLANG_BOOTSTRAP 264660 2014-04-18 17:03:58Z imp Set to build the Clang C/C++ compiler during the bootstrap phase of the build. .Pp This is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64 and i386/i386. .It Va WITH_CLANG_EXTRAS -.\" from FreeBSD: head/tools/build/options/WITH_CLANG_EXTRAS 231057 2012-02-05 23:56:22Z dim Set to build additional clang and llvm tools, such as bugpoint. .It Va WITHOUT_CLANG_FULL -.\" from FreeBSD: head/tools/build/options/WITHOUT_CLANG_FULL 246259 2013-02-02 22:28:29Z dim Set to avoid building the ARCMigrate, Rewriter and StaticAnalyzer components of the Clang C/C++ compiler. .Pp This is a default setting on sparc64/sparc64. .It Va WITH_CLANG_FULL -.\" from FreeBSD: head/tools/build/options/WITH_CLANG_FULL 246259 2013-02-02 22:28:29Z dim Set to build the ARCMigrate, Rewriter and StaticAnalyzer components of the Clang C/C++ compiler. .Pp This is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpcspe. .It Va WITHOUT_CLANG_IS_CC -.\" from FreeBSD: head/tools/build/options/WITHOUT_CLANG_IS_CC 242629 2012-11-05 21:53:23Z brooks Set to install the GCC compiler as .Pa /usr/bin/cc , .Pa /usr/bin/c++ @@ -396,7 +353,6 @@ and This is a default setting on mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64. .It Va WITH_CLANG_IS_CC -.\" from FreeBSD: head/tools/build/options/WITH_CLANG_IS_CC 235342 2012-05-12 16:12:36Z gjb Set to install the Clang C/C++ compiler as .Pa /usr/bin/cc , .Pa /usr/bin/c++ @@ -406,11 +362,9 @@ and This is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64 and i386/i386. .It Va WITHOUT_CPP -.\" from FreeBSD: head/tools/build/options/WITHOUT_CPP 156932 2006-03-21 07:50:50Z ru Set to not build .Xr cpp 1 . .It Va WITHOUT_CROSS_COMPILER -.\" from FreeBSD: head/tools/build/options/WITHOUT_CROSS_COMPILER 313169 2017-02-03 19:09:46Z wblock Set to not build any cross compiler in the cross-tools stage of buildworld. When compiling a different version of .Fx @@ -436,7 +390,6 @@ When set, it enforces these options: .Va WITHOUT_GCC_BOOTSTRAP .El .It Va WITHOUT_CRYPT -.\" from FreeBSD: head/tools/build/options/WITHOUT_CRYPT 156932 2006-03-21 07:50:50Z ru Set to not build any crypto code. When set, it enforces these options: .Pp @@ -460,34 +413,28 @@ When set, these options are also in effe is set explicitly) .El .It Va WITH_CTF -.\" from FreeBSD: head/tools/build/options/WITH_CTF 228159 2011-11-30 18:22:44Z fjoe Set to compile with CTF (Compact C Type Format) data. CTF data encapsulates a reduced form of debugging information similar to DWARF and the venerable stabs and is required for DTrace. .It Va WITHOUT_CTM -.\" from FreeBSD: head/tools/build/options/WITHOUT_CTM 183242 2008-09-21 22:02:26Z sam Set to not build .Xr ctm 1 and related utilities. .It Va WITHOUT_CUSE -.\" from FreeBSD: head/tools/build/options/WITHOUT_CUSE 270171 2014-08-19 15:40:26Z hselasky Set to not build CUSE-related programs and libraries. .It Va WITHOUT_CXGBETOOL -.\" from FreeBSD: head/tools/build/options/WITHOUT_CXGBETOOL 314579 2017-03-03 03:11:58Z np Set to not build .Xr cxgbetool 8 .Pp This is a default setting on arm/arm, arm/armeb, arm/armv6, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc and powerpc/powerpcspe. .It Va WITH_CXGBETOOL -.\" from FreeBSD: head/tools/build/options/WITH_CXGBETOOL 314579 2017-03-03 03:11:58Z np Set to build .Xr cxgbetool 8 .Pp This is a default setting on amd64/amd64, arm64/aarch64, i386/i386, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_CXX -.\" from FreeBSD: head/tools/build/options/WITHOUT_CXX 281053 2015-04-03 23:55:04Z bdrewery Set to not build .Xr c++ 1 and related libraries. @@ -516,11 +463,9 @@ When set, it enforces these options: .Va WITHOUT_TESTS_SUPPORT .El .It Va WITHOUT_DEBUG_FILES -.\" from FreeBSD: head/tools/build/options/WITHOUT_DEBUG_FILES 290059 2015-10-27 20:49:56Z emaste Set to avoid building or installing standalone debug files for each executable binary and shared library. .It Va WITHOUT_DIALOG -.\" from FreeBSD: head/tools/build/options/WITHOUT_DIALOG 313169 2017-02-03 19:09:46Z wblock Set to not build .Xr dialog 1 , .Xr dialog 3 , @@ -534,10 +479,8 @@ When set, it enforces these options: .Va WITHOUT_BSDINSTALL .El .It Va WITHOUT_DICT -.\" from FreeBSD: head/tools/build/options/WITHOUT_DICT 156932 2006-03-21 07:50:50Z ru Set to not build the Webster dictionary files. .It Va WITH_DIRDEPS_BUILD -.\" from FreeBSD: head/tools/build/options/WITH_DIRDEPS_BUILD 313169 2017-02-03 19:09:46Z wblock This is an experimental build system. For details see http://www.crufty.net/sjg/docs/freebsd-meta-mode.htm. @@ -614,7 +557,6 @@ This must be set in the environment, mak not .Pa /etc/src.conf . .It Va WITH_DIRDEPS_CACHE -.\" from FreeBSD: head/tools/build/options/WITH_DIRDEPS_CACHE 290816 2015-11-14 03:24:48Z sjg Cache result of dirdeps.mk which can save significant time for subsequent builds. Depends on @@ -625,38 +567,31 @@ This must be set in the environment, mak not .Pa /etc/src.conf . .It Va WITHOUT_DMAGENT -.\" from FreeBSD: head/tools/build/options/WITHOUT_DMAGENT 313169 2017-02-03 19:09:46Z wblock Set to not build dma Mail Transport Agent. .It Va WITHOUT_DOCCOMPRESS -.\" from FreeBSD: head/tools/build/options/WITHOUT_DOCCOMPRESS 313169 2017-02-03 19:09:46Z wblock Set to not install compressed system documentation. Only the uncompressed version will be installed. .It Va WITH_DTRACE_TESTS -.\" from FreeBSD: head/tools/build/options/WITH_DTRACE_TESTS 286174 2015-08-02 00:37:33Z markj Set to build and install the DTrace test suite in .Pa /usr/tests/cddl/usr.sbin/dtrace . This test suite is considered experimental on architectures other than amd64/amd64 and running it may cause system instability. .It Va WITHOUT_DYNAMICROOT -.\" from FreeBSD: head/tools/build/options/WITHOUT_DYNAMICROOT 156932 2006-03-21 07:50:50Z ru Set this if you do not want to link .Pa /bin and .Pa /sbin dynamically. .It Va WITHOUT_ED_CRYPTO -.\" from FreeBSD: head/tools/build/options/WITHOUT_ED_CRYPTO 235660 2012-05-19 20:05:27Z marcel Set to build .Xr ed 1 without support for encryption/decryption. .It Va WITHOUT_EE -.\" from FreeBSD: head/tools/build/options/WITHOUT_EE 277663 2015-01-25 00:03:44Z ngie Set to not build and install .Xr edit 1 , .Xr ee 1 , and related programs. .It Va WITHOUT_EFI -.\" from FreeBSD: head/tools/build/options/WITHOUT_EFI 311135 2017-01-02 20:07:56Z ngie Set not to build .Xr efivar 3 and @@ -665,7 +600,6 @@ and This is a default setting on mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64. .It Va WITH_EFI -.\" from FreeBSD: head/tools/build/options/WITH_EFI 311135 2017-01-02 20:07:56Z ngie Set to build .Xr efivar 3 and @@ -674,7 +608,6 @@ and This is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64 and i386/i386. .It Va WITHOUT_ELFTOOLCHAIN_BOOTSTRAP -.\" from FreeBSD: head/tools/build/options/WITHOUT_ELFTOOLCHAIN_BOOTSTRAP 295491 2016-02-11 00:14:00Z emaste Set to not build ELF Tool Chain tools (addr2line, nm, size, strings and strip) as part of the bootstrap process. @@ -682,76 +615,60 @@ as part of the bootstrap process. An alternate bootstrap tool chain must be provided. .Ef .It Va WITHOUT_EXAMPLES -.\" from FreeBSD: head/tools/build/options/WITHOUT_EXAMPLES 156938 2006-03-21 09:06:24Z ru Set to avoid installing examples to .Pa /usr/share/examples/ . .It Va WITH_EXTRA_TCP_STACKS -.\" from FreeBSD: head/tools/build/options/WITH_EXTRA_TCP_STACKS 302247 2016-06-28 13:37:01Z jtl Set to build extra TCP stack modules. .It Va WITHOUT_FDT -.\" from FreeBSD: head/tools/build/options/WITHOUT_FDT 221539 2011-05-06 19:10:27Z ru Set to not build Flattened Device Tree support as part of the base system. This includes the device tree compiler (dtc) and libfdt support library. .It Va WITHOUT_FILE -.\" from FreeBSD: head/tools/build/options/WITHOUT_FILE 278193 2015-02-04 10:24:40Z ngie Set to not build .Xr file 1 and related programs. .It Va WITHOUT_FINGER -.\" from FreeBSD: head/tools/build/options/WITHOUT_FINGER 278192 2015-02-04 10:19:32Z ngie Set to not build or install .Xr finger 1 and .Xr fingerd 8 . .It Va WITHOUT_FLOPPY -.\" from FreeBSD: head/tools/build/options/WITHOUT_FLOPPY 221540 2011-05-06 19:13:03Z ru Set to not build or install programs for operating floppy disk driver. .It Va WITHOUT_FMTREE -.\" from FreeBSD: head/tools/build/options/WITHOUT_FMTREE 261299 2014-01-30 21:37:43Z brooks Set to not build and install .Pa /usr/sbin/fmtree . .It Va WITHOUT_FORMAT_EXTENSIONS -.\" from FreeBSD: head/tools/build/options/WITHOUT_FORMAT_EXTENSIONS 250658 2013-05-15 13:04:10Z brooks Set to not enable .Fl fformat-extensions when compiling the kernel. Also disables all format checking. .It Va WITHOUT_FORTH -.\" from FreeBSD: head/tools/build/options/WITHOUT_FORTH 156932 2006-03-21 07:50:50Z ru Set to build bootloaders without Forth support. .It Va WITHOUT_FP_LIBC -.\" from FreeBSD: head/tools/build/options/WITHOUT_FP_LIBC 156932 2006-03-21 07:50:50Z ru Set to build .Nm libc without floating-point support. .It Va WITHOUT_FREEBSD_UPDATE -.\" from FreeBSD: head/tools/build/options/WITHOUT_FREEBSD_UPDATE 183242 2008-09-21 22:02:26Z sam Set to not build .Xr freebsd-update 8 . .It Va WITHOUT_FTP -.\" from FreeBSD: head/tools/build/options/WITHOUT_FTP 278192 2015-02-04 10:19:32Z ngie Set to not build or install .Xr ftp 1 and .Xr ftpd 8 . .It Va WITHOUT_GAMES -.\" from FreeBSD: head/tools/build/options/WITHOUT_GAMES 156932 2006-03-21 07:50:50Z ru Set to not build games. .It Va WITHOUT_GCC -.\" from FreeBSD: head/tools/build/options/WITHOUT_GCC 264660 2014-04-18 17:03:58Z imp Set to not build and install gcc and g++ as part of the normal build process. .Pp This is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64 and i386/i386. .It Va WITH_GCC -.\" from FreeBSD: head/tools/build/options/WITH_GCC 255326 2013-09-06 20:49:48Z zeising Set to build and install gcc and g++. .Pp This is a default setting on mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64. .It Va WITHOUT_GCC_BOOTSTRAP -.\" from FreeBSD: head/tools/build/options/WITHOUT_GCC_BOOTSTRAP 273177 2014-10-16 18:28:11Z skreuzer Set to not build gcc and g++ as part of the bootstrap process. You must enable either gcc or clang bootstrap to be able to build the system, unless an alternative compiler is provided via @@ -760,32 +677,27 @@ XCC. This is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64 and i386/i386. .It Va WITH_GCC_BOOTSTRAP -.\" from FreeBSD: head/tools/build/options/WITH_GCC_BOOTSTRAP 264660 2014-04-18 17:03:58Z imp Set to build gcc and g++ as part of the bootstrap process. .Pp This is a default setting on mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64. .It Va WITHOUT_GCOV -.\" from FreeBSD: head/tools/build/options/WITHOUT_GCOV 156932 2006-03-21 07:50:50Z ru Set to not build the .Xr gcov 1 tool. .It Va WITHOUT_GDB -.\" from FreeBSD: head/tools/build/options/WITHOUT_GDB 156932 2006-03-21 07:50:50Z ru Set to not build .Xr gdb 1 . .Pp This is a default setting on arm64/aarch64. .It Va WITH_GDB -.\" from FreeBSD: head/tools/build/options/WITH_GDB 295493 2016-02-11 00:30:51Z emaste Set to build .Xr gdb 1 . .Pp This is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64. .It Va WITHOUT_GNU -.\" from FreeBSD: head/tools/build/options/WITHOUT_GNU 174550 2007-12-12 16:43:17Z ru Set to not build contributed GNU software as a part of the base system. This option can be useful if the system built must not contain any code covered by the GNU Public License due to legal reasons. @@ -799,47 +711,38 @@ When set, it enforces these options: .Va WITHOUT_GNU_SUPPORT .El .It Va WITHOUT_GNUCXX -.\" from FreeBSD: head/tools/build/options/WITHOUT_GNUCXX 255321 2013-09-06 20:08:03Z theraven Do not build the GNU C++ stack (g++, libstdc++). This is the default on platforms where clang is the system compiler. .Pp This is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64 and i386/i386. .It Va WITH_GNUCXX -.\" from FreeBSD: head/tools/build/options/WITH_GNUCXX 255321 2013-09-06 20:08:03Z theraven Build the GNU C++ stack (g++, libstdc++). This is the default on platforms where gcc is the system compiler. .Pp This is a default setting on mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64. .It Va WITHOUT_GNU_DIFF -.\" from FreeBSD: head/tools/build/options/WITHOUT_GNU_DIFF 307674 2016-10-20 14:48:57Z emaste Set to not build GNU .Xr diff 1 and .Xr diff3 1 . .It Va WITHOUT_GNU_GREP -.\" from FreeBSD: head/tools/build/options/WITHOUT_GNU_GREP 307674 2016-10-20 14:48:57Z emaste Set to not build GNU .Xr grep 1 . .It Va WITHOUT_GNU_GREP_COMPAT -.\" from FreeBSD: head/tools/build/options/WITHOUT_GNU_GREP_COMPAT 273421 2014-10-21 20:44:33Z emaste Set this option to omit the gnu extensions to grep from being included in BSD grep. .It Va WITHOUT_GNU_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_GNU_SUPPORT 156932 2006-03-21 07:50:50Z ru Set to build some programs without optional GNU support. .It Va WITHOUT_GPIO -.\" from FreeBSD: head/tools/build/options/WITHOUT_GPIO 228081 2011-11-28 17:54:34Z dim Set to not build .Xr gpioctl 8 as part of the base system. .It Va WITHOUT_GPL_DTC -.\" from FreeBSD: head/tools/build/options/WITHOUT_GPL_DTC 313169 2017-02-03 19:09:46Z wblock Set to build the BSD licensed version of the device tree compiler rather than the GPLed one from elinux.org. .It Va WITHOUT_GROFF -.\" from FreeBSD: head/tools/build/options/WITHOUT_GROFF 218941 2011-02-22 08:13:49Z uqs Set to not build .Xr groff 1 and @@ -847,27 +750,20 @@ and You should consider installing the textproc/groff port to not break .Xr man 1 . .It Va WITHOUT_GSSAPI -.\" from FreeBSD: head/tools/build/options/WITHOUT_GSSAPI 174548 2007-12-12 16:39:32Z ru Set to not build libgssapi. .It Va WITHOUT_HAST -.\" from FreeBSD: head/tools/build/options/WITHOUT_HAST 277725 2015-01-26 06:27:07Z ngie Set to not build .Xr hastd 8 and related utilities. .It Va WITH_HESIOD -.\" from FreeBSD: head/tools/build/options/WITH_HESIOD 156932 2006-03-21 07:50:50Z ru Set to build Hesiod support. .It Va WITHOUT_HTML -.\" from FreeBSD: head/tools/build/options/WITHOUT_HTML 156932 2006-03-21 07:50:50Z ru Set to not build HTML docs. .It Va WITHOUT_HYPERV -.\" from FreeBSD: head/tools/build/options/WITHOUT_HYPERV 271493 2014-09-13 02:15:31Z delphij Set to not build or install HyperV utilities. .It Va WITHOUT_ICONV -.\" from FreeBSD: head/tools/build/options/WITHOUT_ICONV 254919 2013-08-26 17:15:56Z antoine Set to not build iconv as part of libc. .It Va WITHOUT_INCLUDES -.\" from FreeBSD: head/tools/build/options/WITHOUT_INCLUDES 275138 2014-11-26 20:43:09Z gjb Set to not install header files. This option used to be spelled .Va NO_INCS . @@ -875,7 +771,6 @@ This option used to be spelled The option does not work for build targets. .Ef .It Va WITHOUT_INET -.\" from FreeBSD: head/tools/build/options/WITHOUT_INET 221266 2011-04-30 17:58:28Z bz Set to not build programs and libraries related to IPv4 networking. When set, it enforces these options: .Pp @@ -884,7 +779,6 @@ When set, it enforces these options: .Va WITHOUT_INET_SUPPORT .El .It Va WITHOUT_INET6 -.\" from FreeBSD: head/tools/build/options/WITHOUT_INET6 156932 2006-03-21 07:50:50Z ru Set to not build programs and libraries related to IPv6 networking. When set, it enforces these options: @@ -894,17 +788,13 @@ When set, it enforces these options: .Va WITHOUT_INET6_SUPPORT .El .It Va WITHOUT_INET6_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_INET6_SUPPORT 156932 2006-03-21 07:50:50Z ru Set to build libraries, programs, and kernel modules without IPv6 support. .It Va WITHOUT_INETD -.\" from FreeBSD: head/tools/build/options/WITHOUT_INETD 278192 2015-02-04 10:19:32Z ngie Set to not build .Xr inetd 8 . .It Va WITHOUT_INET_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_INET_SUPPORT 221266 2011-04-30 17:58:28Z bz Set to build libraries, programs, and kernel modules without IPv4 support. .It Va WITHOUT_INSTALLLIB -.\" from FreeBSD: head/tools/build/options/WITHOUT_INSTALLLIB 313172 2017-02-03 19:21:28Z wblock Set this to not install optional libraries. For example, when creating a .Xr nanobsd 8 @@ -913,7 +803,6 @@ image. The option does not work for build targets. .Ef .It Va WITH_INSTALL_AS_USER -.\" from FreeBSD: head/tools/build/options/WITH_INSTALL_AS_USER 313169 2017-02-03 19:09:46Z wblock Set to make install targets succeed for non-root users by installing files with owner and group attributes set to that of the user running the @@ -923,13 +812,10 @@ The user still must set the .Va DESTDIR variable to point to a directory where the user has write permissions. .It Va WITHOUT_IPFILTER -.\" from FreeBSD: head/tools/build/options/WITHOUT_IPFILTER 156932 2006-03-21 07:50:50Z ru Set to not build IP Filter package. .It Va WITHOUT_IPFW -.\" from FreeBSD: head/tools/build/options/WITHOUT_IPFW 183242 2008-09-21 22:02:26Z sam Set to not build IPFW tools. .It Va WITHOUT_IPSEC_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_IPSEC_SUPPORT 315765 2017-03-23 02:13:59Z ngie Set to not build the kernel with .Xr ipsec 4 support. @@ -938,22 +824,18 @@ This option is needed for and .Xr tcpmd5 4 . .It Va WITHOUT_ISCSI -.\" from FreeBSD: head/tools/build/options/WITHOUT_ISCSI 277675 2015-01-25 04:20:11Z ngie Set to not build .Xr iscid 8 and related utilities. .It Va WITHOUT_JAIL -.\" from FreeBSD: head/tools/build/options/WITHOUT_JAIL 249966 2013-04-27 04:09:09Z eadler Set to not build tools for the support of jails; e.g., .Xr jail 8 . .It Va WITHOUT_KDUMP -.\" from FreeBSD: head/tools/build/options/WITHOUT_KDUMP 240690 2012-09-19 11:38:37Z zeising Set to not build .Xr kdump 1 and .Xr truss 1 . .It Va WITHOUT_KERBEROS -.\" from FreeBSD: head/tools/build/options/WITHOUT_KERBEROS 313169 2017-02-03 19:09:46Z wblock Set this to not build Kerberos 5 (KTH Heimdal). When set, it enforces these options: .Pp @@ -971,7 +853,6 @@ When set, these options are also in effe is set explicitly) .El .It Va WITHOUT_KERBEROS_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_KERBEROS_SUPPORT 251794 2013-06-15 20:29:07Z eadler Set to build some programs without Kerberos support, like .Xr ssh 1 , .Xr telnet 1 , @@ -979,13 +860,11 @@ Set to build some programs without Kerbe and .Xr telnetd 8 . .It Va WITHOUT_KERNEL_SYMBOLS -.\" from FreeBSD: head/tools/build/options/WITHOUT_KERNEL_SYMBOLS 222189 2011-05-22 18:23:17Z imp Set to not install kernel symbol files. .Bf -symbolic This option is recommended for those people who have small root partitions. .Ef .It Va WITHOUT_KVM -.\" from FreeBSD: head/tools/build/options/WITHOUT_KVM 174550 2007-12-12 16:43:17Z ru Set to not build the .Nm libkvm library as a part of the base system. @@ -999,12 +878,10 @@ When set, it enforces these options: .Va WITHOUT_KVM_SUPPORT .El .It Va WITHOUT_KVM_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_KVM_SUPPORT 170644 2007-06-13 02:08:04Z sepotvin Set to build some programs without optional .Nm libkvm support. .It Va WITHOUT_LDNS -.\" from FreeBSD: head/tools/build/options/WITHOUT_LDNS 255591 2013-09-15 13:11:13Z des Setting this variable will prevent the LDNS library from being built. When set, it enforces these options: .Pp @@ -1015,27 +892,22 @@ When set, it enforces these options: .Va WITHOUT_UNBOUND .El .It Va WITHOUT_LDNS_UTILS -.\" from FreeBSD: head/tools/build/options/WITHOUT_LDNS_UTILS 255850 2013-09-24 14:33:31Z des Setting this variable will prevent building the LDNS utilities .Xr drill 1 and .Xr host 1 . .It Va WITHOUT_LEGACY_CONSOLE -.\" from FreeBSD: head/tools/build/options/WITHOUT_LEGACY_CONSOLE 296264 2016-03-01 11:36:10Z trasz Set to not build programs that support a legacy PC console; e.g., .Xr kbdcontrol 1 and .Xr vidcontrol 1 . .It Va WITHOUT_LIB32 -.\" from FreeBSD: head/tools/build/options/WITHOUT_LIB32 274664 2014-11-18 17:06:48Z imp On 64-bit platforms, set to not build 32-bit library set and a .Nm ld-elf32.so.1 runtime linker. .It Va WITHOUT_LIBCPLUSPLUS -.\" from FreeBSD: head/tools/build/options/WITHOUT_LIBCPLUSPLUS 246262 2013-02-02 22:42:46Z dim Set to avoid building libcxxrt and libc++. .It Va WITHOUT_LIBPTHREAD -.\" from FreeBSD: head/tools/build/options/WITHOUT_LIBPTHREAD 188848 2009-02-20 11:09:55Z mtm Set to not build the .Nm libpthread providing library, @@ -1047,17 +919,14 @@ When set, it enforces these options: .Va WITHOUT_LIBTHR .El .It Va WITH_LIBSOFT -.\" from FreeBSD: head/tools/build/options/WITH_LIBSOFT 300325 2016-05-20 19:23:07Z bdrewery On armv6 only, set to enable soft float ABI compatibility libraries. This option is for transitioning to the new hard float ABI. .It Va WITHOUT_LIBTHR -.\" from FreeBSD: head/tools/build/options/WITHOUT_LIBTHR 156932 2006-03-21 07:50:50Z ru Set to not build the .Nm libthr (1:1 threading) library. .It Va WITHOUT_LLD -.\" from FreeBSD: head/tools/build/options/WITHOUT_LLD 309124 2016-11-24 22:54:55Z dim Set to not build LLVM's lld linker. .Pp This is a default setting on @@ -1069,25 +938,21 @@ When set, it enforces these options: .Va WITHOUT_LLD_IS_LD .El .It Va WITH_LLD -.\" from FreeBSD: head/tools/build/options/WITH_LLD 309124 2016-11-24 22:54:55Z dim Set to build LLVM's lld linker. .Pp This is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64 and i386/i386. .It Va WITHOUT_LLDB -.\" from FreeBSD: head/tools/build/options/WITHOUT_LLDB 289275 2015-10-14 00:23:31Z emaste Set to not build the LLDB debugger. .Pp This is a default setting on arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64. .It Va WITH_LLDB -.\" from FreeBSD: head/tools/build/options/WITH_LLDB 255722 2013-09-20 01:52:02Z emaste Set to build the LLDB debugger. .Pp This is a default setting on amd64/amd64 and arm64/aarch64. .It Va WITHOUT_LLD_BOOTSTRAP -.\" from FreeBSD: head/tools/build/options/WITHOUT_LLD_BOOTSTRAP 316647 2017-04-09 01:35:19Z emaste Set to not build the LLD linker during the bootstrap phase of the build. To be able to build the system, either Binutils or LLD bootstrap must be @@ -1096,19 +961,16 @@ enabled unless an alternate linker is pr This is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64. .It Va WITH_LLD_BOOTSTRAP -.\" from FreeBSD: head/tools/build/options/WITH_LLD_BOOTSTRAP 316647 2017-04-09 01:35:19Z emaste Set to build the LLD linker during the bootstrap phase of the build. .Pp This is a default setting on arm64/aarch64. .It Va WITHOUT_LLD_IS_LD -.\" from FreeBSD: head/tools/build/options/WITHOUT_LLD_IS_LD 312855 2017-01-27 01:59:12Z emaste Set to use GNU binutils ld as the system linker, instead of LLVM's LLD. .Pp This is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64. .It Va WITH_LLD_IS_LD -.\" from FreeBSD: head/tools/build/options/WITH_LLD_IS_LD 312855 2017-01-27 01:59:12Z emaste Set to use LLVM's LLD as the system linker, instead of GNU binutils ld. .Pp This is a default setting on @@ -1122,41 +984,33 @@ When set, these options are also in effe is set explicitly) .El .It Va WITHOUT_LLVM_LIBUNWIND -.\" from FreeBSD: head/tools/build/options/WITHOUT_LLVM_LIBUNWIND 293450 2016-01-09 00:42:07Z emaste Set to use GCC's stack unwinder (instead of LLVM's libunwind). .Pp This is a default setting on arm/arm, arm/armeb, arm/armv6, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64. .It Va WITH_LLVM_LIBUNWIND -.\" from FreeBSD: head/tools/build/options/WITH_LLVM_LIBUNWIND 293450 2016-01-09 00:42:07Z emaste Set to use LLVM's libunwind stack unwinder (instead of GCC's unwinder). .Pp This is a default setting on amd64/amd64, arm64/aarch64 and i386/i386. .It Va WITHOUT_LOCALES -.\" from FreeBSD: head/tools/build/options/WITHOUT_LOCALES 156932 2006-03-21 07:50:50Z ru Set to not build localization files; see .Xr locale 1 . .It Va WITHOUT_LOCATE -.\" from FreeBSD: head/tools/build/options/WITHOUT_LOCATE 183242 2008-09-21 22:02:26Z sam Set to not build .Xr locate 1 and related programs. .It Va WITHOUT_LPR -.\" from FreeBSD: head/tools/build/options/WITHOUT_LPR 156932 2006-03-21 07:50:50Z ru Set to not build .Xr lpr 1 and related programs. .It Va WITHOUT_LS_COLORS -.\" from FreeBSD: head/tools/build/options/WITHOUT_LS_COLORS 235660 2012-05-19 20:05:27Z marcel Set to build .Xr ls 1 without support for colors to distinguish file types. .It Va WITHOUT_LZMA_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_LZMA_SUPPORT 245171 2013-01-08 18:37:12Z obrien Set to build some programs without optional lzma compression support. .It Va WITHOUT_MAIL -.\" from FreeBSD: head/tools/build/options/WITHOUT_MAIL 183242 2008-09-21 22:02:26Z sam Set to not build any mail support (MUA or MTA). When set, it enforces these options: .Pp @@ -1169,17 +1023,14 @@ When set, it enforces these options: .Va WITHOUT_SENDMAIL .El .It Va WITHOUT_MAILWRAPPER -.\" from FreeBSD: head/tools/build/options/WITHOUT_MAILWRAPPER 156932 2006-03-21 07:50:50Z ru Set to not build the .Xr mailwrapper 8 MTA selector. .It Va WITHOUT_MAKE -.\" from FreeBSD: head/tools/build/options/WITHOUT_MAKE 183242 2008-09-21 22:02:26Z sam Set to not install .Xr make 1 and related support files. .It Va WITHOUT_MAN -.\" from FreeBSD: head/tools/build/options/WITHOUT_MAN 156932 2006-03-21 07:50:50Z ru Set to not build manual pages. When set, these options are also in effect: .Pp @@ -1190,11 +1041,9 @@ When set, these options are also in effe is set explicitly) .El .It Va WITHOUT_MANCOMPRESS -.\" from FreeBSD: head/tools/build/options/WITHOUT_MANCOMPRESS 266752 2014-05-27 15:52:27Z gjb Set to not to install compressed man pages. Only the uncompressed versions will be installed. .It Va WITHOUT_MAN_UTILS -.\" from FreeBSD: head/tools/build/options/WITHOUT_MAN_UTILS 208322 2010-05-20 00:07:21Z jkim Set to not build utilities for manual pages, .Xr apropos 1 , .Xr catman 1 , @@ -1204,7 +1053,6 @@ Set to not build utilities for manual pa .Xr manctl 8 , and related support files. .It Va WITH_META_MODE -.\" from FreeBSD: head/tools/build/options/WITH_META_MODE 313169 2017-02-03 19:09:46Z wblock Create .Xr make 1 meta files when building, which can provide a reliable incremental build when @@ -1261,19 +1109,15 @@ This must be set in the environment, mak not .Pa /etc/src.conf . .It Va WITH_NAND -.\" from FreeBSD: head/tools/build/options/WITH_NAND 235537 2012-05-17 10:11:18Z gber Set to build the NAND Flash components. .It Va WITHOUT_NDIS -.\" from FreeBSD: head/tools/build/options/WITHOUT_NDIS 183242 2008-09-21 22:02:26Z sam Set to not build programs and libraries related to NDIS emulation support. .It Va WITHOUT_NETCAT -.\" from FreeBSD: head/tools/build/options/WITHOUT_NETCAT 156932 2006-03-21 07:50:50Z ru Set to not build .Xr nc 1 utility. .It Va WITHOUT_NETGRAPH -.\" from FreeBSD: head/tools/build/options/WITHOUT_NETGRAPH 183242 2008-09-21 22:02:26Z sam Set to not build applications to support .Xr netgraph 4 . When set, it enforces these options: @@ -1287,10 +1131,8 @@ When set, it enforces these options: .Va WITHOUT_NETGRAPH_SUPPORT .El .It Va WITHOUT_NETGRAPH_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_NETGRAPH_SUPPORT 183305 2008-09-23 16:11:15Z sam Set to build libraries, programs, and kernel modules without netgraph support. .It Va WITHOUT_NIS -.\" from FreeBSD: head/tools/build/options/WITHOUT_NIS 156932 2006-03-21 07:50:50Z ru Set to not build .Xr NIS 8 support and related programs. @@ -1300,14 +1142,11 @@ and remove .Sq nis entries. .It Va WITHOUT_NLS -.\" from FreeBSD: head/tools/build/options/WITHOUT_NLS 156932 2006-03-21 07:50:50Z ru Set to not build NLS catalogs. .It Va WITHOUT_NLS_CATALOGS -.\" from FreeBSD: head/tools/build/options/WITHOUT_NLS_CATALOGS 156932 2006-03-21 07:50:50Z ru Set to not build NLS catalog support for .Xr csh 1 . .It Va WITHOUT_NS_CACHING -.\" from FreeBSD: head/tools/build/options/WITHOUT_NS_CACHING 172803 2007-10-19 14:01:25Z ru Set to disable name caching in the .Pa nsswitch subsystem. @@ -1315,23 +1154,18 @@ The generic caching daemon, .Xr nscd 8 , will not be built either if this option is set. .It Va WITHOUT_NTP -.\" from FreeBSD: head/tools/build/options/WITHOUT_NTP 183242 2008-09-21 22:02:26Z sam Set to not build .Xr ntpd 8 and related programs. .It Va WITH_OFED -.\" from FreeBSD: head/tools/build/options/WITH_OFED 228081 2011-11-28 17:54:34Z dim Set to build the .Dq "OpenFabrics Enterprise Distribution" Infiniband software stack. .It Va WITH_OPENLDAP -.\" from FreeBSD: head/tools/build/options/WITH_OPENLDAP 264902 2014-04-24 23:17:31Z imp Enable building openldap support for kerberos. .It Va WITHOUT_OPENSSH -.\" from FreeBSD: head/tools/build/options/WITHOUT_OPENSSH 156932 2006-03-21 07:50:50Z ru Set to not build OpenSSH. .It Va WITHOUT_OPENSSL -.\" from FreeBSD: head/tools/build/options/WITHOUT_OPENSSL 156932 2006-03-21 07:50:50Z ru Set to not build OpenSSL. When set, it enforces these options: .Pp @@ -1353,7 +1187,6 @@ When set, these options are also in effe is set explicitly) .El .It Va WITHOUT_PAM -.\" from FreeBSD: head/tools/build/options/WITHOUT_PAM 174550 2007-12-12 16:43:17Z ru Set to not build PAM library and modules. .Bf -symbolic This option is deprecated and does nothing. @@ -1365,18 +1198,15 @@ When set, it enforces these options: .Va WITHOUT_PAM_SUPPORT .El .It Va WITHOUT_PAM_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_PAM_SUPPORT 156932 2006-03-21 07:50:50Z ru Set to build some programs without PAM support, particularly .Xr ftpd 8 and .Xr ppp 8 . .It Va WITHOUT_PC_SYSINSTALL -.\" from FreeBSD: head/tools/build/options/WITHOUT_PC_SYSINSTALL 245606 2013-01-18 15:57:09Z eadler Set to not build .Xr pc-sysinstall 8 and related programs. .It Va WITHOUT_PF -.\" from FreeBSD: head/tools/build/options/WITHOUT_PF 156932 2006-03-21 07:50:50Z ru Set to not build PF firewall package. When set, it enforces these options: .Pp @@ -1385,41 +1215,33 @@ When set, it enforces these options: .Va WITHOUT_AUTHPF .El .It Va WITHOUT_PKGBOOTSTRAP -.\" from FreeBSD: head/tools/build/options/WITHOUT_PKGBOOTSTRAP 258924 2013-12-04 15:58:42Z bdrewery Set to not build .Xr pkg 7 bootstrap tool. .It Va WITHOUT_PMC -.\" from FreeBSD: head/tools/build/options/WITHOUT_PMC 183242 2008-09-21 22:02:26Z sam Set to not build .Xr pmccontrol 8 and related programs. .It Va WITHOUT_PORTSNAP -.\" from FreeBSD: head/tools/build/options/WITHOUT_PORTSNAP 183242 2008-09-21 22:02:26Z sam Set to not build or install .Xr portsnap 8 and related files. .It Va WITHOUT_PPP -.\" from FreeBSD: head/tools/build/options/WITHOUT_PPP 183242 2008-09-21 22:02:26Z sam Set to not build .Xr ppp 8 and related programs. .It Va WITHOUT_PROFILE -.\" from FreeBSD: head/tools/build/options/WITHOUT_PROFILE 228196 2011-12-02 09:09:54Z fjoe Set to avoid compiling profiled libraries. .It Va WITHOUT_QUOTAS -.\" from FreeBSD: head/tools/build/options/WITHOUT_QUOTAS 296264 2016-03-01 11:36:10Z trasz Set to not build .Xr quota 1 and related programs. .It Va WITHOUT_RADIUS_SUPPORT *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Tue Apr 11 18:16:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86C14D3A971; Tue, 11 Apr 2017 18:16:56 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward2p.cmail.yandex.net (forward2p.cmail.yandex.net [IPv6:2a02:6b8:0:1465::12]) (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 263CF122; Tue, 11 Apr 2017 18:16:55 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [IPv6:2a02:6b8:0:801::ab]) by forward2p.cmail.yandex.net (Yandex) with ESMTP id B99BD20FAD; Tue, 11 Apr 2017 21:16:42 +0300 (MSK) Received: from smtp1j.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp1j.mail.yandex.net (Yandex) with ESMTP id BF0DA3C807F1; Tue, 11 Apr 2017 21:16:40 +0300 (MSK) Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id dXWgLJ60xq-GdJmCRwC; Tue, 11 Apr 2017 21:16: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=1491934599; bh=P+tVge53SkqWA0resiUVCJtwc1k1iIeH7WW3yI2TRvM=; h=Subject:To:Cc:References:From:Message-ID:Date:In-Reply-To; b=mtDMKgtYarHxJj1cUzpfhFxrSuFuqTVQw7a+NJBnFSmqw8240HgvPpnDNuKpO+2Ot tDQWcTrFWtCmyr0M1Qi529+VhAQDOtiqOIU+/S5HDs2lxVMMHwcB8cXLonPUDz793U OPMyUMmaF4crkZWmdfoyKS/X6wwbOhTt2xFjTK3w= Authentication-Results: smtp1j.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: r316699 - head/sys/net To: rgrimes@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201704111651.v3BGpZi9075424@pdx.rh.CN85.dnsmgr.net> From: "Andrey V. Elsukov" Openpgp: id=E6591E1B41DA1516F0C9BC0001C5EA0410C8A17A Message-ID: Date: Tue, 11 Apr 2017 21:15:26 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.0 MIME-Version: 1.0 In-Reply-To: <201704111651.v3BGpZi9075424@pdx.rh.CN85.dnsmgr.net> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="q7enxoxO3R9ralDvMPPHsDLWwrGP6tsB7" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Apr 2017 18:16:56 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --q7enxoxO3R9ralDvMPPHsDLWwrGP6tsB7 Content-Type: multipart/mixed; boundary="VmNqvIwPW5XB04HhqASNk2ljKML4Gnv4p"; protected-headers="v1" From: "Andrey V. Elsukov" To: rgrimes@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r316699 - head/sys/net References: <201704111651.v3BGpZi9075424@pdx.rh.CN85.dnsmgr.net> In-Reply-To: <201704111651.v3BGpZi9075424@pdx.rh.CN85.dnsmgr.net> --VmNqvIwPW5XB04HhqASNk2ljKML4Gnv4p Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 11.04.2017 19:51, Rodney W. Grimes wrote: >> Modified: head/sys/net/if_gre.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/net/if_gre.c Tue Apr 11 08:29:12 2017 (r316698) >> +++ head/sys/net/if_gre.c Tue Apr 11 08:56:18 2017 (r316699) >> @@ -88,7 +88,7 @@ __FBSDID("$FreeBSD$"); >> #include >> #include >> =20 >> -#define GREMTU 1500 >> +#define GREMTU 1476 >=20 > I would of thought that this was > #define GREMTU ETHERMTU > and now should probably be: > #define GREMTU ETHERMTU - gre_hlen;=20 > Or what ever the approprite sizeof(foo) is; I just returned back constants that were here :) The man page says: "The MTU of gre interfaces is set to 1476 by default, to match the value used by Cisco routers." > Isn't this arguably wrong in the face of JumboFrames? > I don't see why it may be wrong for jumbo frames. The default MTU value used by any interfaces is ETHERMTU, if you know that your NIC supports jumbo frames, you will configure specific MTU value. If you want 9k MTU on gre(4), you should configure it. >> static const char grename[] =3D "gre"; >> static MALLOC_DEFINE(M_GRE, grename, "Generic Routing Encapsulation")= ; >> static VNET_DEFINE(struct mtx, gre_mtx); >> @@ -173,7 +173,7 @@ gre_clone_create(struct if_clone *ifc, i >> GRE2IFP(sc)->if_softc =3D sc; >> if_initname(GRE2IFP(sc), grename, unit); >> =20 >> - GRE2IFP(sc)->if_mtu =3D sc->gre_mtu =3D GREMTU; >> + GRE2IFP(sc)->if_mtu =3D GREMTU; >> GRE2IFP(sc)->if_flags =3D IFF_POINTOPOINT|IFF_MULTICAST; >> GRE2IFP(sc)->if_output =3D gre_output; >> GRE2IFP(sc)->if_ioctl =3D gre_ioctl; >> @@ -231,7 +231,8 @@ gre_ioctl(struct ifnet *ifp, u_long cmd, >> /* XXX: */ >> if (ifr->ifr_mtu < 576) >=20 > This is another magic constant that should be in a #define. It was here too. I think it is something from the past and can be removed= =2E =46rom RFC791: "It is recommended that hosts only send datagrams larger than 576 octets". >> return (EINVAL); >> - break; >> + ifp->if_mtu =3D ifr->ifr_mtu; >> + return (0); >> case SIOCSIFADDR: >> ifp->if_flags |=3D IFF_UP; >> case SIOCSIFFLAGS: >> @@ -255,12 +256,6 @@ gre_ioctl(struct ifnet *ifp, u_long cmd, >> } >> error =3D 0; >> switch (cmd) { >> - case SIOCSIFMTU: >> - GRE_WLOCK(sc); >> - sc->gre_mtu =3D ifr->ifr_mtu; >> - gre_updatehdr(sc); >> - GRE_WUNLOCK(sc); >> - goto end; >> case SIOCSIFPHYADDR: >> #ifdef INET6 >> case SIOCSIFPHYADDR_IN6: >> @@ -549,7 +544,6 @@ gre_updatehdr(struct gre_softc *sc) >> } else >> sc->gre_oseq =3D 0; >> gh->gre_flags =3D htons(flags); >> - GRE2IFP(sc)->if_mtu =3D sc->gre_mtu - sc->gre_hlen; >> } >> =20 >> static void >> >> Modified: head/sys/net/if_gre.h >> =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/net/if_gre.h Tue Apr 11 08:29:12 2017 (r316698) >> +++ head/sys/net/if_gre.h Tue Apr 11 08:56:18 2017 (r316699) >> @@ -69,7 +69,6 @@ struct gre_softc { >> uint32_t gre_oseq; >> uint32_t gre_key; >> uint32_t gre_options; >> - uint32_t gre_mtu; >> u_int gre_fibnum; >> u_int gre_hlen; /* header size */ >> union { >> >> Modified: head/sys/net/if_me.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/net/if_me.c Tue Apr 11 08:29:12 2017 (r316698) >> +++ head/sys/net/if_me.c Tue Apr 11 08:56:18 2017 (r316699) >> @@ -66,7 +66,7 @@ __FBSDID("$FreeBSD$"); >> #include >> #include >> =20 >> -#define MEMTU 1500 >> +#define MEMTU (1500 - sizeof(struct mobhdr)) >=20 > 1500 -> ETHERMTU? Feel free to fix this. Many pseudo interfaces has similar MTU limitations= =2E --=20 WBR, Andrey V. Elsukov --VmNqvIwPW5XB04HhqASNk2ljKML4Gnv4p-- --q7enxoxO3R9ralDvMPPHsDLWwrGP6tsB7 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEzBAEBCAAdFiEE5lkeG0HaFRbwybwAAcXqBBDIoXoFAljtHT4ACgkQAcXqBBDI oXoJ3Qf/YsC3Y5+ViZTmCbjs8iNY1b1S91ECVIbNGPrPNIJwQS55dU/46tPzaUzw 55aVCd7zcb+6c98wEInEd3vR69ExXTReT6dfbaoQOxKOjRfVKtxsYFuuFSj9Nhhi moqVlPEODEkJxHOl/+hdHXMUaI1K39rhClZLEfSgnU95ruw2RcNluYF65YUz49Wp H8r+1bpIuHDj/BHPLcKX/M7aDqYJ1jXO+Oggx8zkJQAmLQzpiaIuL06YPTf9AKoC NphIX5NFDJsI3YeD6oF3addW8TZ3AfNwTkToBJvTmh9muiUpiGwULNO6cTlSvwGd GEMNCUJvcV+5xDQEa9wpNqqvqklgYw== =mJxp -----END PGP SIGNATURE----- --q7enxoxO3R9ralDvMPPHsDLWwrGP6tsB7-- From owner-svn-src-head@freebsd.org Tue Apr 11 18:49:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 27A3CD3A9FA; Tue, 11 Apr 2017 18:49:59 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 12B931039; Tue, 11 Apr 2017 18:49:58 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v3BInv62075893; Tue, 11 Apr 2017 11:49:57 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v3BInuuB075892; Tue, 11 Apr 2017 11:49:56 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201704111849.v3BInuuB075892@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r316699 - head/sys/net In-Reply-To: To: "Andrey V. Elsukov" Date: Tue, 11 Apr 2017 11:49:56 -0700 (PDT) CC: rgrimes@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Apr 2017 18:49:59 -0000 [ Charset UTF-8 unsupported, converting... ] > On 11.04.2017 19:51, Rodney W. Grimes wrote: > >> Modified: head/sys/net/if_gre.c > >> ============================================================================== > >> --- head/sys/net/if_gre.c Tue Apr 11 08:29:12 2017 (r316698) > >> +++ head/sys/net/if_gre.c Tue Apr 11 08:56:18 2017 (r316699) > >> @@ -88,7 +88,7 @@ __FBSDID("$FreeBSD$"); > >> #include > >> #include > >> > >> -#define GREMTU 1500 > >> +#define GREMTU 1476 > > > > I would of thought that this was > > #define GREMTU ETHERMTU > > and now should probably be: > > #define GREMTU ETHERMTU - gre_hlen; > > Or what ever the approprite sizeof(foo) is; > > I just returned back constants that were here :) Can we try to improve on this, or maybe just ignore it? > The man page says: > "The MTU of gre interfaces is set to 1476 by default, to match the > value used by Cisco routers." That might need some clean up too? > > Isn't this arguably wrong in the face of JumboFrames? > > > > I don't see why it may be wrong for jumbo frames. The default MTU value > used by any interfaces is ETHERMTU, if you know that your NIC supports > jumbo frames, you will configure specific MTU value. > If you want 9k MTU on gre(4), you should configure it. I may some day want to #define ETHERMTU 9000 and just have all the right magic happen, wouldnt that be nice? > >> static const char grename[] = "gre"; > >> static MALLOC_DEFINE(M_GRE, grename, "Generic Routing Encapsulation"); > >> static VNET_DEFINE(struct mtx, gre_mtx); > >> @@ -173,7 +173,7 @@ gre_clone_create(struct if_clone *ifc, i > >> GRE2IFP(sc)->if_softc = sc; > >> if_initname(GRE2IFP(sc), grename, unit); > >> > >> - GRE2IFP(sc)->if_mtu = sc->gre_mtu = GREMTU; > >> + GRE2IFP(sc)->if_mtu = GREMTU; > >> GRE2IFP(sc)->if_flags = IFF_POINTOPOINT|IFF_MULTICAST; > >> GRE2IFP(sc)->if_output = gre_output; > >> GRE2IFP(sc)->if_ioctl = gre_ioctl; > >> @@ -231,7 +231,8 @@ gre_ioctl(struct ifnet *ifp, u_long cmd, > >> /* XXX: */ > >> if (ifr->ifr_mtu < 576) > > > > This is another magic constant that should be in a #define. > > It was here too. I think it is something from the past and can be removed. > > From RFC791: "It is recommended that hosts only send datagrams larger > than 576 octets". No, I doubt we want to remove that, it is also part of ipv6 documentation, and iirc part of some BCP's. You really dont want to be running on the internet with MTU < 576. It use to be 296 in the days when we had SLIP. > > >> return (EINVAL); > >> - break; > >> + ifp->if_mtu = ifr->ifr_mtu; > >> + return (0); > >> case SIOCSIFADDR: > >> ifp->if_flags |= IFF_UP; > >> case SIOCSIFFLAGS: > >> @@ -255,12 +256,6 @@ gre_ioctl(struct ifnet *ifp, u_long cmd, > >> } > >> error = 0; > >> switch (cmd) { > >> - case SIOCSIFMTU: > >> - GRE_WLOCK(sc); > >> - sc->gre_mtu = ifr->ifr_mtu; > >> - gre_updatehdr(sc); > >> - GRE_WUNLOCK(sc); > >> - goto end; > >> case SIOCSIFPHYADDR: > >> #ifdef INET6 > >> case SIOCSIFPHYADDR_IN6: > >> @@ -549,7 +544,6 @@ gre_updatehdr(struct gre_softc *sc) > >> } else > >> sc->gre_oseq = 0; > >> gh->gre_flags = htons(flags); > >> - GRE2IFP(sc)->if_mtu = sc->gre_mtu - sc->gre_hlen; > >> } > >> > >> static void > >> > >> Modified: head/sys/net/if_gre.h > >> ============================================================================== > >> --- head/sys/net/if_gre.h Tue Apr 11 08:29:12 2017 (r316698) > >> +++ head/sys/net/if_gre.h Tue Apr 11 08:56:18 2017 (r316699) > >> @@ -69,7 +69,6 @@ struct gre_softc { > >> uint32_t gre_oseq; > >> uint32_t gre_key; > >> uint32_t gre_options; > >> - uint32_t gre_mtu; > >> u_int gre_fibnum; > >> u_int gre_hlen; /* header size */ > >> union { > >> > >> Modified: head/sys/net/if_me.c > >> ============================================================================== > >> --- head/sys/net/if_me.c Tue Apr 11 08:29:12 2017 (r316698) > >> +++ head/sys/net/if_me.c Tue Apr 11 08:56:18 2017 (r316699) > >> @@ -66,7 +66,7 @@ __FBSDID("$FreeBSD$"); > >> #include > >> #include > >> > >> -#define MEMTU 1500 > >> +#define MEMTU (1500 - sizeof(struct mobhdr)) > > > > 1500 -> ETHERMTU? > > Feel free to fix this. Many pseudo interfaces has similar MTU limitations. > > -- > WBR, Andrey V. Elsukov > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Tue Apr 11 19:00:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A68DD3AE4F; Tue, 11 Apr 2017 19:00:41 +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 23A3519FD; Tue, 11 Apr 2017 19:00: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 2B76510A7DB; Tue, 11 Apr 2017 15:00:40 -0400 (EDT) From: John Baldwin To: Patrick Kelsey Cc: Jung-uk Kim , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r316648 - in head/sys: amd64/amd64 amd64/include arm/arm arm/include arm64/include cddl/dev/dtrace/aarch64 cddl/dev/dtrace/amd64 cddl/dev/dtrace/arm cddl/dev/dtrace/i386 cddl/dev/dtrace... Date: Tue, 11 Apr 2017 11:51:33 -0700 Message-ID: <3414873.bffRg8lynz@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: References: <201704090200.v39203Vf072867@repo.freebsd.org> <2086739.zQDsh9Zz6K@ralph.baldwin.cx> 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, 11 Apr 2017 15:00:40 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Apr 2017 19:00:41 -0000 On Tuesday, April 11, 2017 02:21:05 AM Patrick Kelsey wrote: > On Tue, Apr 11, 2017 at 1:24 AM, John Baldwin wrote: > > > Either that, or I relax the goal of purging it entirely and put the > > compat > > > shim in current also to sidestep the port-patching issue. > > > > Well, I'd like to not have it live around forever, but we could add the > > compat shim to HEAD in the short term (also makes MFC slightly simpler as > > you just group the two commits together when you MFC). Once the port is > > patched with the updated FreeBSD_version we can remove the shim from HEAD. > > > > > So far it doesn't look like patching ports will be much of an issue. I > extracted sources for all ports that contained INSTALL_KLD in their > Makefile and grepped them for smp_no_rendevous - the only ports turned up > that way are emulators/virtualbox-ose-additions and > emulators/virtualbox-ose-kmod. One set of patches will serve both, and > I've sent them off to the maintainers. Yes, I can't think of any other ports that would use these. Thanks! -- John Baldwin From owner-svn-src-head@freebsd.org Tue Apr 11 19:03:38 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38F27D3A01A; Tue, 11 Apr 2017 19:03:38 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward5p.cmail.yandex.net (forward5p.cmail.yandex.net [IPv6:2a02:6b8:0:1465::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 CD60C1EE2; Tue, 11 Apr 2017 19:03:37 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from smtp2p.mail.yandex.net (smtp2p.mail.yandex.net [77.88.29.85]) by forward5p.cmail.yandex.net (Yandex) with ESMTP id 7919720EAB; Tue, 11 Apr 2017 22:03:34 +0300 (MSK) Received: from smtp2p.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp2p.mail.yandex.net (Yandex) with ESMTP id BCA301A80060; Tue, 11 Apr 2017 22:03:32 +0300 (MSK) Received: by smtp2p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id Fqf15KSlEL-3VJuc0Z2; Tue, 11 Apr 2017 22:03:31 +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=1491937411; bh=CaWKc1Bv8rgwrOmZ5g+94RKwe8KX3YSLPiQYAjWs7Dg=; h=Subject:To:Cc:References:From:Message-ID:Date:In-Reply-To; b=eSYr8KpaqsZumaaen+GR2a4QGUr8DjsiVSerHqDunKLA0lsFalBRXVV6rKXgThSIT QLRKyKKfUh6O47x3A36cmy0fcZWSy4NC4Hkf5p2okYzqAPUc7LGaNBWt+CVPowvY5i SrTKnFgab93QblZhlpolKXgSPcMgMYhDwGtS2RjY= Authentication-Results: smtp2p.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: r316699 - head/sys/net To: rgrimes@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201704111849.v3BInuuB075892@pdx.rh.CN85.dnsmgr.net> From: "Andrey V. Elsukov" Openpgp: id=E6591E1B41DA1516F0C9BC0001C5EA0410C8A17A Message-ID: <7b4a8622-d7cc-a597-846e-0bdf5519a5d7@yandex.ru> Date: Tue, 11 Apr 2017 22:02:23 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.0 MIME-Version: 1.0 In-Reply-To: <201704111849.v3BInuuB075892@pdx.rh.CN85.dnsmgr.net> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="BtcLklFV8pe6eumSxBQguHsfFS5qDn0Tg" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Apr 2017 19:03:38 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --BtcLklFV8pe6eumSxBQguHsfFS5qDn0Tg Content-Type: multipart/mixed; boundary="FrwCIHriBBhRQ12cpNfdJBv4Esigd5Qx9"; protected-headers="v1" From: "Andrey V. Elsukov" To: rgrimes@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <7b4a8622-d7cc-a597-846e-0bdf5519a5d7@yandex.ru> Subject: Re: svn commit: r316699 - head/sys/net References: <201704111849.v3BInuuB075892@pdx.rh.CN85.dnsmgr.net> In-Reply-To: <201704111849.v3BInuuB075892@pdx.rh.CN85.dnsmgr.net> --FrwCIHriBBhRQ12cpNfdJBv4Esigd5Qx9 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 11.04.2017 21:49, Rodney W. Grimes wrote: >>>> -#define GREMTU 1500 >>>> +#define GREMTU 1476 >>> >>> I would of thought that this was >>> #define GREMTU ETHERMTU >>> and now should probably be: >>> #define GREMTU ETHERMTU - gre_hlen;=20 >>> Or what ever the approprite sizeof(foo) is; >> >> I just returned back constants that were here :) >=20 > Can we try to improve on this, or maybe just ignore it? There are a lot of things that we need and can improve, but usually we choose the most interested or important. >=20 >> The man page says: >> "The MTU of gre interfaces is set to 1476 by default, to match the >> value used by Cisco routers." >=20 > That might need some clean up too? >=20 >>> Isn't this arguably wrong in the face of JumboFrames? >>> >> >> I don't see why it may be wrong for jumbo frames. The default MTU valu= e >> used by any interfaces is ETHERMTU, if you know that your NIC supports= >> jumbo frames, you will configure specific MTU value. >> If you want 9k MTU on gre(4), you should configure it. >=20 > I may some day want to #define ETHERMTU 9000 and just have all the righ= t > magic happen, wouldnt that be nice? It would be nice. >>>> static const char grename[] =3D "gre"; >>>> static MALLOC_DEFINE(M_GRE, grename, "Generic Routing Encapsulation= "); >>>> static VNET_DEFINE(struct mtx, gre_mtx); >>>> @@ -173,7 +173,7 @@ gre_clone_create(struct if_clone *ifc, i >>>> GRE2IFP(sc)->if_softc =3D sc; >>>> if_initname(GRE2IFP(sc), grename, unit); >>>> =20 >>>> - GRE2IFP(sc)->if_mtu =3D sc->gre_mtu =3D GREMTU; >>>> + GRE2IFP(sc)->if_mtu =3D GREMTU; >>>> GRE2IFP(sc)->if_flags =3D IFF_POINTOPOINT|IFF_MULTICAST; >>>> GRE2IFP(sc)->if_output =3D gre_output; >>>> GRE2IFP(sc)->if_ioctl =3D gre_ioctl; >>>> @@ -231,7 +231,8 @@ gre_ioctl(struct ifnet *ifp, u_long cmd, >>>> /* XXX: */ >>>> if (ifr->ifr_mtu < 576) >>> >>> This is another magic constant that should be in a #define. >> >> It was here too. I think it is something from the past and can be remo= ved. >> >> From RFC791: "It is recommended that hosts only send datagrams larger >> than 576 octets". >=20 > No, I doubt we want to remove that, it is also part of ipv6 documentati= on, > and iirc part of some BCP's. You really dont want to be running on the= > internet with MTU < 576. It use to be 296 in the days when we had SLIP= =2E Why not? We have many things that allow foot shooting. =3D=3D=3D=3D=3D=3D >>>> --- head/sys/net/if_me.c Tue Apr 11 08:29:12 2017 (r316698) >>>> +++ head/sys/net/if_me.c Tue Apr 11 08:56:18 2017 (r316699) >>>> @@ -66,7 +66,7 @@ __FBSDID("$FreeBSD$"); >>>> #include >>>> #include >>>> =20 >>>> -#define MEMTU 1500 >>>> +#define MEMTU (1500 - sizeof(struct mobhdr)) >>> >>> 1500 -> ETHERMTU? >> >> Feel free to fix this. Many pseudo interfaces has similar MTU limitati= ons. --=20 WBR, Andrey V. Elsukov --FrwCIHriBBhRQ12cpNfdJBv4Esigd5Qx9-- --BtcLklFV8pe6eumSxBQguHsfFS5qDn0Tg Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEzBAEBCAAdFiEE5lkeG0HaFRbwybwAAcXqBBDIoXoFAljtKD8ACgkQAcXqBBDI oXp5nwf9FMYpUVQwnMCo4aKesU47c2l8jRCrU5rczAWNvVmW0AyUp5lNjn+IG9ya zd9NiHXs+RDwVF1h/cbIel7t3Qg6m293aJyLeoVxCBjknuNb+iTU+o5fRUQ1lfAR nXw2LIzLOBFaedxnJapYD8a2wHP5bWav/1zD1n+S+JLnLjUn/VeGrrrC9xmFyjCm n/p5FZJowQe4DhQm50xnCLgcWqr6cYMhe9WSChvCXmqLRPm7eZRylXHWKlPC4JLS MG2S3bEEzDp3lJaSQUw3lTPCO0trkG3fMrjvPUZHrUkVSfCSEmL7aPlzYvCurKsm 3hHINip2g4uA4of4i2jbwJDM/NKgrA== =TIIx -----END PGP SIGNATURE----- --BtcLklFV8pe6eumSxBQguHsfFS5qDn0Tg-- From owner-svn-src-head@freebsd.org Tue Apr 11 19:05:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20435D3A09E; Tue, 11 Apr 2017 19:05:23 +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 D5CE9B5; Tue, 11 Apr 2017 19:05:22 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1cy16I-000NuO-1A; Tue, 11 Apr 2017 22:05:14 +0300 Date: Tue, 11 Apr 2017 22:05:13 +0300 From: Slawa Olhovchenkov To: rgrimes@freebsd.org Cc: "Andrey V. Elsukov" , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r316699 - head/sys/net Message-ID: <20170411190513.GE20974@zxy.spb.ru> References: <201704111849.v3BInuuB075892@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201704111849.v3BInuuB075892@pdx.rh.CN85.dnsmgr.net> 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Apr 2017 19:05:23 -0000 On Tue, Apr 11, 2017 at 11:49:56AM -0700, Rodney W. Grimes wrote: > [ Charset UTF-8 unsupported, converting... ] > > On 11.04.2017 19:51, Rodney W. Grimes wrote: > > >> Modified: head/sys/net/if_gre.c > > >> ============================================================================== > > >> --- head/sys/net/if_gre.c Tue Apr 11 08:29:12 2017 (r316698) > > >> +++ head/sys/net/if_gre.c Tue Apr 11 08:56:18 2017 (r316699) > > >> @@ -88,7 +88,7 @@ __FBSDID("$FreeBSD$"); > > >> #include > > >> #include > > >> > > >> -#define GREMTU 1500 > > >> +#define GREMTU 1476 > > > > > > I would of thought that this was > > > #define GREMTU ETHERMTU > > > and now should probably be: > > > #define GREMTU ETHERMTU - gre_hlen; > > > Or what ever the approprite sizeof(foo) is; > > > > I just returned back constants that were here :) > > Can we try to improve on this, or maybe just ignore it? > > > The man page says: > > "The MTU of gre interfaces is set to 1476 by default, to match the > > value used by Cisco routers." > > That might need some clean up too? > > > > Isn't this arguably wrong in the face of JumboFrames? > > > > > > > I don't see why it may be wrong for jumbo frames. The default MTU value > > used by any interfaces is ETHERMTU, if you know that your NIC supports > > jumbo frames, you will configure specific MTU value. > > If you want 9k MTU on gre(4), you should configure it. > > I may some day want to #define ETHERMTU 9000 and just have all the right > magic happen, wouldnt that be nice? Not before 2038. From owner-svn-src-head@freebsd.org Tue Apr 11 19:20:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41108D3A756; Tue, 11 Apr 2017 19:20:22 +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 EBDE2CBD; Tue, 11 Apr 2017 19:20:21 +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 v3BJKLH9099586; Tue, 11 Apr 2017 19:20:21 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3BJKKA0099584; Tue, 11 Apr 2017 19:20:20 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201704111920.v3BJKKA0099584@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 11 Apr 2017 19:20:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316715 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Apr 2017 19:20:22 -0000 Author: ae Date: Tue Apr 11 19:20:20 2017 New Revision: 316715 URL: https://svnweb.freebsd.org/changeset/base/316715 Log: Make sysctl identifiers for direct netisr queue unique. Introduce IPCTL_INTRDQMAXLEN and IPCTL_INTRDQDROPS macros for this purpose. Reviewed by: gnn MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D10358 Modified: head/sys/netinet/in.h head/sys/netinet/ip_input.c Modified: head/sys/netinet/in.h ============================================================================== --- head/sys/netinet/in.h Tue Apr 11 18:48:17 2017 (r316714) +++ head/sys/netinet/in.h Tue Apr 11 19:20:20 2017 (r316715) @@ -633,6 +633,8 @@ int getsourcefilter(int, uint32_t, struc #define IPCTL_FASTFORWARDING 14 /* use fast IP forwarding code */ /* 15, unused, was: IPCTL_KEEPFAITH */ #define IPCTL_GIF_TTL 16 /* default TTL for gif encap packet */ +#define IPCTL_INTRDQMAXLEN 17 /* max length of direct netisr queue */ +#define IPCTL_INTRDQDROPS 18 /* number of direct netisr q drops */ #endif /* __BSD_VISIBLE */ Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Tue Apr 11 18:48:17 2017 (r316714) +++ head/sys/netinet/ip_input.c Tue Apr 11 19:20:20 2017 (r316715) @@ -266,9 +266,9 @@ sysctl_netinet_intr_direct_queue_maxlen( return (EINVAL); return (netisr_setqlimit(&ip_direct_nh, qlimit)); } -SYSCTL_PROC(_net_inet_ip, IPCTL_INTRQMAXLEN, intr_direct_queue_maxlen, - CTLTYPE_INT|CTLFLAG_RW, 0, 0, sysctl_netinet_intr_direct_queue_maxlen, "I", - "Maximum size of the IP direct input queue"); +SYSCTL_PROC(_net_inet_ip, IPCTL_INTRDQMAXLEN, intr_direct_queue_maxlen, + CTLTYPE_INT|CTLFLAG_RW, 0, 0, sysctl_netinet_intr_direct_queue_maxlen, + "I", "Maximum size of the IP direct input queue"); static int sysctl_netinet_intr_direct_queue_drops(SYSCTL_HANDLER_ARGS) @@ -287,7 +287,7 @@ sysctl_netinet_intr_direct_queue_drops(S return (0); } -SYSCTL_PROC(_net_inet_ip, IPCTL_INTRQDROPS, intr_direct_queue_drops, +SYSCTL_PROC(_net_inet_ip, IPCTL_INTRDQDROPS, intr_direct_queue_drops, CTLTYPE_INT|CTLFLAG_RD, 0, 0, sysctl_netinet_intr_direct_queue_drops, "I", "Number of packets dropped from the IP direct input queue"); #endif /* RSS */ From owner-svn-src-head@freebsd.org Tue Apr 11 19:23:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9408ED3A9CE; Tue, 11 Apr 2017 19:23:26 +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 63D5517E; Tue, 11 Apr 2017 19:23:26 +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 v3BJNPDW003458; Tue, 11 Apr 2017 19:23:25 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3BJNPJG003457; Tue, 11 Apr 2017 19:23:25 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201704111923.v3BJNPJG003457@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 11 Apr 2017 19:23:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316716 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Apr 2017 19:23:26 -0000 Author: ae Date: Tue Apr 11 19:23:25 2017 New Revision: 316716 URL: https://svnweb.freebsd.org/changeset/base/316716 Log: Inherit IPv6 checksum offloading flags to vlan interfaces. if_vlan(4) interfaces inherit IPv4 checksum offloading flags from the parent when VLAN_HWCSUM and VLAN_HWTAGGING flags are present on the parent interface. Do the same for IPv6 checksum offloading flags. Reported by: Harry Schmalzbauer Reviewed by: np, gnn MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D10356 Modified: head/sys/net/if_vlan.c Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Tue Apr 11 19:20:20 2017 (r316715) +++ head/sys/net/if_vlan.c Tue Apr 11 19:23:25 2017 (r316716) @@ -1555,13 +1555,16 @@ vlan_capabilities(struct ifvlan *ifv) * offloading requires hardware VLAN tagging. */ if (p->if_capabilities & IFCAP_VLAN_HWCSUM) - ifp->if_capabilities = p->if_capabilities & IFCAP_HWCSUM; + ifp->if_capabilities = + p->if_capabilities & (IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6); if (p->if_capenable & IFCAP_VLAN_HWCSUM && p->if_capenable & IFCAP_VLAN_HWTAGGING) { - ifp->if_capenable = p->if_capenable & IFCAP_HWCSUM; + ifp->if_capenable = + p->if_capenable & (IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6); ifp->if_hwassist = p->if_hwassist & (CSUM_IP | CSUM_TCP | - CSUM_UDP | CSUM_SCTP); + CSUM_UDP | CSUM_SCTP | CSUM_TCP_IPV6 | CSUM_UDP_IPV6 | + CSUM_SCTP_IPV6); } else { ifp->if_capenable = 0; ifp->if_hwassist = 0; From owner-svn-src-head@freebsd.org Tue Apr 11 20:28:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD779D3AEE9; Tue, 11 Apr 2017 20:28:16 +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 5AFA9986; Tue, 11 Apr 2017 20:28:16 +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 v3BKSFdo028475; Tue, 11 Apr 2017 20:28:15 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3BKSFTZ028474; Tue, 11 Apr 2017 20:28:15 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201704112028.v3BKSFTZ028474@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Tue, 11 Apr 2017 20:28:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316717 - head/sys/fs/nfsclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Apr 2017 20:28:16 -0000 Author: rmacklem Date: Tue Apr 11 20:28:15 2017 New Revision: 316717 URL: https://svnweb.freebsd.org/changeset/base/316717 Log: During a server crash recovery, fix the NFSv4.1 client for a NFSERR_BADSESSION during recovery. If the NFSv4.1 client gets a NFSv4.1 NFSERR_BADSESSION reply to an Open/Lock operation while recovering from the server crash/reboot, allow the opens to be retained for a subsequent recovery attempt. Since NFSv4.1 servers should only reply NFSERR_BADSESSION after a crash/reboot that has lost state, this case should almost never happen. However, for the AmazonEFS file service, this has been observed when the client does a fresh TCP connection for RPCs. Reported by: cperciva Tested by: cperciva PR: 216088 MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clstate.c Modified: head/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clstate.c Tue Apr 11 19:23:25 2017 (r316716) +++ head/sys/fs/nfsclient/nfs_clstate.c Tue Apr 11 20:28:15 2017 (r316717) @@ -1981,7 +1981,7 @@ nfscl_recover(struct nfsclclient *clp, s op = LIST_FIRST(&owp->nfsow_open); while (op != NULL) { nop = LIST_NEXT(op, nfso_list); - if (error != NFSERR_NOGRACE) { + if (error != NFSERR_NOGRACE && error != NFSERR_BADSESSION) { /* Search for a delegation to reclaim with the open */ TAILQ_FOREACH(dp, &clp->nfsc_deleg, nfsdl_list) { if (!(dp->nfsdl_flags & NFSCLDL_NEEDRECLAIM)) @@ -2050,11 +2050,10 @@ nfscl_recover(struct nfsclclient *clp, s len = NFS64BITSSET; else len = lop->nfslo_end - lop->nfslo_first; - if (error != NFSERR_NOGRACE) - error = nfscl_trylock(nmp, NULL, - op->nfso_fh, op->nfso_fhlen, lp, - firstlock, 1, lop->nfslo_first, len, - lop->nfslo_type, tcred, p); + error = nfscl_trylock(nmp, NULL, + op->nfso_fh, op->nfso_fhlen, lp, + firstlock, 1, lop->nfslo_first, len, + lop->nfslo_type, tcred, p); if (error != 0) nfscl_freelock(lop, 0); else @@ -2066,10 +2065,10 @@ nfscl_recover(struct nfsclclient *clp, s nfscl_freelockowner(lp, 0); lp = nlp; } - } else { - nfscl_freeopen(op, 0); } } + if (error != 0 && error != NFSERR_BADSESSION) + nfscl_freeopen(op, 0); op = nop; } owp = nowp; @@ -2100,7 +2099,7 @@ nfscl_recover(struct nfsclclient *clp, s nfscl_lockinit(&nowp->nfsow_rwlock); } nop = NULL; - if (error != NFSERR_NOGRACE) { + if (error != NFSERR_NOGRACE && error != NFSERR_BADSESSION) { MALLOC(nop, struct nfsclopen *, sizeof (struct nfsclopen) + dp->nfsdl_fhlen - 1, M_NFSCLOPEN, M_WAITOK); nop->nfso_own = nowp; From owner-svn-src-head@freebsd.org Tue Apr 11 21:55:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39A05D3A9BF; Tue, 11 Apr 2017 21:55:41 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E502EDD8; Tue, 11 Apr 2017 21:55:40 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3BLtenj065824; Tue, 11 Apr 2017 21:55:40 GMT (envelope-from sobomax@FreeBSD.org) Received: (from sobomax@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3BLtepk065823; Tue, 11 Apr 2017 21:55:40 GMT (envelope-from sobomax@FreeBSD.org) Message-Id: <201704112155.v3BLtepk065823@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sobomax set sender to sobomax@FreeBSD.org using -f From: Maxim Sobolev Date: Tue, 11 Apr 2017 21:55:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316718 - head/sbin/mksnap_ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Apr 2017 21:55:41 -0000 Author: sobomax Date: Tue Apr 11 21:55:39 2017 New Revision: 316718 URL: https://svnweb.freebsd.org/changeset/base/316718 Log: Work around an issue with mksnap_ffs not working in chroot'ed environment. The problem is that the statfs(2) system call used to determine the relevant mount point returns path within real root in the f_mntonname, causing nmount(2) system call to fail with ENOENT. Use a bit of heuristics to skip over few starting path elements when it happens until we hit an actual mount point. For this to work properly the whole mount should be accessible within the chroot, it's going to still fail if chroot only has access to a part of the mounted fs. Reviewed by: mckusick Approved by: mckusick MFC after: 2 weeks Modified: head/sbin/mksnap_ffs/mksnap_ffs.c Modified: head/sbin/mksnap_ffs/mksnap_ffs.c ============================================================================== --- head/sbin/mksnap_ffs/mksnap_ffs.c Tue Apr 11 20:28:15 2017 (r316717) +++ head/sbin/mksnap_ffs/mksnap_ffs.c Tue Apr 11 21:55:39 2017 (r316718) @@ -58,6 +58,33 @@ usage(void) errx(EX_USAGE, "usage: mksnap_ffs snapshot_name"); } +static int +isdir(const char *path) +{ + struct stat stbuf; + + if (stat(path, &stbuf) < 0) + return (-1); + if (!S_ISDIR(stbuf.st_mode)) + return (0); + return (1); +} + +static int +issamefs(const char *path, struct statfs *stfsp) +{ + struct statfs stfsbuf; + + if (isdir(path) != 1) + return (-1); + if (statfs(path, &stfsbuf) < 0) + return (-1); + if ((stfsbuf.f_fsid.val[0] != stfsp->f_fsid.val[0]) || + (stfsbuf.f_fsid.val[1] != stfsp->f_fsid.val[1])) + return (0); + return (1); +} + int main(int argc, char **argv) { @@ -96,16 +123,33 @@ main(int argc, char **argv) } if (statfs(path, &stfsbuf) < 0) err(1, "%s", path); - if (stat(path, &stbuf) < 0) + switch (isdir(path)) { + case -1: err(1, "%s", path); - if (!S_ISDIR(stbuf.st_mode)) + case 0: errx(1, "%s: Not a directory", path); + default: + break; + } if (access(path, W_OK) < 0) err(1, "Lack write permission in %s", path); if ((stbuf.st_mode & S_ISTXT) && stbuf.st_uid != getuid()) errx(1, "Lack write permission in %s: Sticky bit set", path); /* + * Work around an issue when mksnap_ffs is started in chroot'ed + * environment and f_mntonname contains absolute path within + * real root. + */ + for (cp = stfsbuf.f_mntonname; issamefs(cp, &stfsbuf) != 1; + cp = strchrnul(cp + 1, '/')) { + if (cp[0] == '\0') + errx(1, "%s: Not a mount point", stfsbuf.f_mntonname); + } + if (cp != stfsbuf.f_mntonname) + strlcpy(stfsbuf.f_mntonname, cp, sizeof(stfsbuf.f_mntonname)); + + /* * Having verified access to the directory in which the * snapshot is to be built, proceed with creating it. */ From owner-svn-src-head@freebsd.org Tue Apr 11 22:47:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D3DDD3AA91; Tue, 11 Apr 2017 22:47:03 +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 1F0B9F9C; Tue, 11 Apr 2017 22:47:03 +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 v3BMl2hV086169; Tue, 11 Apr 2017 22:47:02 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3BMl2L7086168; Tue, 11 Apr 2017 22:47:02 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201704112247.v3BMl2L7086168@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Tue, 11 Apr 2017 22:47:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316719 - head/sys/fs/nfsclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Apr 2017 22:47:03 -0000 Author: rmacklem Date: Tue Apr 11 22:47:02 2017 New Revision: 316719 URL: https://svnweb.freebsd.org/changeset/base/316719 Log: Don't throw away Open state when a NFSv4.1 client recovery fails. If the ExchangeID/CreateSession operations done by an NFSv4.1 client after the server crashes/reboots fails, it is possible that some process/thread is waiting for an open_owner lock. If the client state is free'd, this can cause a crash. This would not normally happen, but has been observed on a mount of the AmazonEFS service. Reported by: cperciva Tested by: cperciva PR: 216086 MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clstate.c Modified: head/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clstate.c Tue Apr 11 21:55:39 2017 (r316718) +++ head/sys/fs/nfsclient/nfs_clstate.c Tue Apr 11 22:47:02 2017 (r316719) @@ -1934,10 +1934,9 @@ nfscl_recover(struct nfsclclient *clp, s error == NFSERR_BADSESSION || error == NFSERR_STALEDONTRECOVER) && --trycnt > 0); if (error) { - nfscl_cleanclient(clp); NFSLOCKCLSTATE(); - clp->nfsc_flags &= ~(NFSCLFLAGS_HASCLIENTID | - NFSCLFLAGS_RECOVER | NFSCLFLAGS_RECVRINPROG); + clp->nfsc_flags &= ~(NFSCLFLAGS_RECOVER | + NFSCLFLAGS_RECVRINPROG); wakeup(&clp->nfsc_flags); nfsv4_unlock(&clp->nfsc_lock, 0); NFSUNLOCKCLSTATE(); @@ -2254,13 +2253,8 @@ nfscl_hasexpired(struct nfsclclient *clp error == NFSERR_BADSESSION || error == NFSERR_STALEDONTRECOVER) && --trycnt > 0); if (error) { - /* - * Clear out any state. - */ - nfscl_cleanclient(clp); NFSLOCKCLSTATE(); - clp->nfsc_flags &= ~(NFSCLFLAGS_HASCLIENTID | - NFSCLFLAGS_RECOVER); + clp->nfsc_flags &= ~NFSCLFLAGS_RECOVER; } else { /* * Expire the state for the client. From owner-svn-src-head@freebsd.org Wed Apr 12 00:52:11 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3EF30D374AD; Wed, 12 Apr 2017 00:52:11 +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 0F81980; Wed, 12 Apr 2017 00:52:10 +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 v3C0qAYA038405; Wed, 12 Apr 2017 00:52:10 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3C0qABq038403; Wed, 12 Apr 2017 00:52:10 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201704120052.v3C0qABq038403@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Wed, 12 Apr 2017 00:52:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316720 - head/sys/dev/qlnx/qlnxe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Apr 2017 00:52:11 -0000 Author: davidcs Date: Wed Apr 12 00:52:09 2017 New Revision: 316720 URL: https://svnweb.freebsd.org/changeset/base/316720 Log: Fix defects reported by Coverity 1. Deadcode in ecore_init_cache_line_size(), qlnx_ioctl() and qlnx_clean_filters() 2. ARRAY_VS_SINGLETON issue in qlnx_remove_all_mcast_mac() and qlnx_update_rx_prod() MFC after:5 days Modified: head/sys/dev/qlnx/qlnxe/bcm_osal.h head/sys/dev/qlnx/qlnxe/qlnx_os.c Modified: head/sys/dev/qlnx/qlnxe/bcm_osal.h ============================================================================== --- head/sys/dev/qlnx/qlnxe/bcm_osal.h Tue Apr 11 22:47:02 2017 (r316719) +++ head/sys/dev/qlnx/qlnxe/bcm_osal.h Wed Apr 12 00:52:09 2017 (r316720) @@ -144,7 +144,14 @@ rounddown_pow_of_two(unsigned long x) #define OSAL_CPU_TO_LE16(val) htole16(val) #define OSAL_LE16_TO_CPU(val) le16toh(val) -#define OSAL_CACHE_LINE_SIZE CACHE_LINE_SIZE +static __inline uint32_t +qlnx_get_cache_line_size(void) +{ + return (CACHE_LINE_SIZE); +} + +#define OSAL_CACHE_LINE_SIZE qlnx_get_cache_line_size() + #define OSAL_BE32 uint32_t #define dma_addr_t bus_addr_t #define osal_size_t size_t Modified: head/sys/dev/qlnx/qlnxe/qlnx_os.c ============================================================================== --- head/sys/dev/qlnx/qlnxe/qlnx_os.c Tue Apr 11 22:47:02 2017 (r316719) +++ head/sys/dev/qlnx/qlnxe/qlnx_os.c Wed Apr 12 00:52:09 2017 (r316720) @@ -2167,9 +2167,6 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd } QLNX_UNLOCK(ha); - - if (ret) - ret = EINVAL; } break; @@ -5910,25 +5907,26 @@ qlnx_update_rx_prod(struct ecore_hwfn *p uint16_t bd_prod; uint16_t cqe_prod; - struct eth_rx_prod_data rx_prods = {0}; + union { + struct eth_rx_prod_data rx_prod_data; + uint32_t data32; + } rx_prods; bd_prod = ecore_chain_get_prod_idx(&rxq->rx_bd_ring); cqe_prod = ecore_chain_get_prod_idx(&rxq->rx_comp_ring); /* Update producers */ - rx_prods.bd_prod = htole16(bd_prod); - rx_prods.cqe_prod = htole16(cqe_prod); + rx_prods.rx_prod_data.bd_prod = htole16(bd_prod); + rx_prods.rx_prod_data.cqe_prod = htole16(cqe_prod); /* Make sure that the BD and SGE data is updated before updating the * producers since FW might read the BD/SGE right after the producer * is updated. */ wmb(); - //bus_barrier(ha->pci_reg, 0, 0, BUS_SPACE_BARRIER_READ); - //bus_barrier(ha->pci_dbells, 0, 0, BUS_SPACE_BARRIER_READ); internal_ram_wr(p_hwfn, rxq->hw_rxq_prod_addr, - sizeof(rx_prods), (u32 *)&rx_prods); + sizeof(rx_prods), &rx_prods.data32); /* mmiowb is needed to synchronize doorbell writes from more than one * processor. It guarantees that the write arrives to the device before @@ -6342,9 +6340,8 @@ qlnx_remove_all_mcast_mac(qlnx_host_t *h ha->mcast[i].addr[2] || ha->mcast[i].addr[3] || ha->mcast[i].addr[4] || ha->mcast[i].addr[5]) { - memcpy(&mcast->mac[0], &ha->mcast[i].addr[0], ETH_ALEN); + memcpy(&mcast->mac[i], &ha->mcast[i].addr[0], ETH_ALEN); mcast->num_mc_addrs++; - mcast++; } } mcast = &ha->ecore_mcast; @@ -6363,7 +6360,7 @@ qlnx_clean_filters(qlnx_host_t *ha) int rc = 0; /* Remove all unicast macs */ - qlnx_remove_all_ucast_mac(ha); + rc = qlnx_remove_all_ucast_mac(ha); if (rc) return rc; From owner-svn-src-head@freebsd.org Wed Apr 12 01:15:34 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9870AD37B6E; Wed, 12 Apr 2017 01:15:34 +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 65BBFD74; Wed, 12 Apr 2017 01:15:34 +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 v3C1FXFx047748; Wed, 12 Apr 2017 01:15:33 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3C1FXP1047747; Wed, 12 Apr 2017 01:15:33 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201704120115.v3C1FXP1047747@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Wed, 12 Apr 2017 01:15:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316721 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Apr 2017 01:15:34 -0000 Author: kevlo Date: Wed Apr 12 01:15:33 2017 New Revision: 316721 URL: https://svnweb.freebsd.org/changeset/base/316721 Log: Most wireless drivers don't support altq(4). Modified: head/share/man/man4/altq.4 Modified: head/share/man/man4/altq.4 ============================================================================== --- head/share/man/man4/altq.4 Wed Apr 12 00:52:09 2017 (r316720) +++ head/share/man/man4/altq.4 Wed Apr 12 01:15:33 2017 (r316721) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 24, 2015 +.Dd April 12, 2017 .Dt ALTQ 4 .Os .Sh NAME @@ -130,7 +130,6 @@ They have been applied to the following .Xr alc 4 , .Xr ale 4 , .Xr an 4 , -.Xr ath 4 , .Xr aue 4 , .Xr axe 4 , .Xr bce 4 , @@ -150,8 +149,6 @@ They have been applied to the following .Xr gem 4 , .Xr hme 4 , .Xr igb 4 , -.Xr ipw 4 , -.Xr iwi 4 , .Xr ixgbe 4 , .Xr jme 4 , .Xr le 4 , @@ -162,10 +159,8 @@ They have been applied to the following .Xr nge 4 , .Xr npe 4 , .Xr qlxgb 4 , -.Xr ral 4 , .Xr re 4 , .Xr rl 4 , -.Xr rum 4 , .Xr sf 4 , .Xr sge 4 , .Xr sis 4 , @@ -175,11 +170,9 @@ They have been applied to the following .Xr ti 4 , .Xr txp 4 , .Xr udav 4 , -.Xr ural 4 , .Xr vge 4 , .Xr vr 4 , .Xr vte 4 , -.Xr wi 4 , and .Xr xl 4 . .Pp From owner-svn-src-head@freebsd.org Wed Apr 12 07:21:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C8FAD3A50A; Wed, 12 Apr 2017 07:21:56 +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 420A5B02; Wed, 12 Apr 2017 07:21:56 +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 v3C7Lt7C098197; Wed, 12 Apr 2017 07:21:55 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3C7LtcR098194; Wed, 12 Apr 2017 07:21:55 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201704120721.v3C7LtcR098194@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Wed, 12 Apr 2017 07:21:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316723 - in head/sys/dev/rtwn: rtl8188e rtl8192c rtl8812a X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Apr 2017 07:21:56 -0000 Author: avos Date: Wed Apr 12 07:21:54 2017 New Revision: 316723 URL: https://svnweb.freebsd.org/changeset/base/316723 Log: rtwn: remove out-of-bounds access + fix debug output. Omit unused rates while initializing / dumping Tx power values. They were not accessed anywhere (except for debugging), so this is (mostly) no-op. Tested with * RTL8188EU, STA mode. * RTL8812AU, STA mode. Found by: PVS-Studio Modified: head/sys/dev/rtwn/rtl8188e/r88e_chan.c head/sys/dev/rtwn/rtl8192c/r92c_chan.c head/sys/dev/rtwn/rtl8812a/r12a_chan.c Modified: head/sys/dev/rtwn/rtl8188e/r88e_chan.c ============================================================================== --- head/sys/dev/rtwn/rtl8188e/r88e_chan.c Wed Apr 12 06:24:35 2017 (r316722) +++ head/sys/dev/rtwn/rtl8188e/r88e_chan.c Wed Apr 12 07:21:54 2017 (r316723) @@ -110,7 +110,7 @@ r88e_get_txpower(struct rtwn_softc *sc, for (ridx = RTWN_RIDX_CCK1; ridx <= RTWN_RIDX_CCK11; ridx++) power[ridx] = base->pwr[0][ridx]; } - for (ridx = RTWN_RIDX_OFDM6; ridx < RTWN_RIDX_COUNT; ridx++) { + for (ridx = RTWN_RIDX_OFDM6; ridx <= max_mcs; ridx++) { if (rs->regulatory == 3) power[ridx] = base->pwr[0][ridx]; else if (rs->regulatory == 1) { Modified: head/sys/dev/rtwn/rtl8192c/r92c_chan.c ============================================================================== --- head/sys/dev/rtwn/rtl8192c/r92c_chan.c Wed Apr 12 06:24:35 2017 (r316722) +++ head/sys/dev/rtwn/rtl8192c/r92c_chan.c Wed Apr 12 07:21:54 2017 (r316723) @@ -229,13 +229,13 @@ r92c_set_txpower(struct rtwn_softc *sc, rtwn_r92c_get_txpower(sc, i, c, power); #ifdef RTWN_DEBUG if (sc->sc_debug & RTWN_DEBUG_TXPWR) { - int ridx; + int max_mcs, ridx; + + max_mcs = RTWN_RIDX_MCS(sc->ntxchains * 8 - 1); /* Dump per-rate Tx power values. */ printf("Tx power for chain %d:\n", i); - for (ridx = RTWN_RIDX_CCK1; - ridx < RTWN_RIDX_COUNT; - ridx++) + for (ridx = RTWN_RIDX_CCK1; ridx <= max_mcs; ridx++) printf("Rate %d = %u\n", ridx, power[ridx]); } #endif Modified: head/sys/dev/rtwn/rtl8812a/r12a_chan.c ============================================================================== --- head/sys/dev/rtwn/rtl8812a/r12a_chan.c Wed Apr 12 06:24:35 2017 (r316722) +++ head/sys/dev/rtwn/rtl8812a/r12a_chan.c Wed Apr 12 07:21:54 2017 (r316723) @@ -247,7 +247,7 @@ r12a_get_txpower(struct rtwn_softc *sc, if (sc->sc_debug & RTWN_DEBUG_TXPWR) { /* Dump per-rate Tx power values. */ printf("Tx power for chain %d:\n", chain); - for (ridx = RTWN_RIDX_CCK1; ridx < RTWN_RIDX_COUNT; ridx++) + for (ridx = RTWN_RIDX_CCK1; ridx <= max_mcs; ridx++) printf("Rate %d = %u\n", ridx, power[ridx]); } #endif From owner-svn-src-head@freebsd.org Wed Apr 12 10:34:51 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C793D3B3AE; Wed, 12 Apr 2017 10:34:51 +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 116D5A69; Wed, 12 Apr 2017 10:34:51 +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 v3CAYoab078671; Wed, 12 Apr 2017 10:34:50 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3CAYoY3078670; Wed, 12 Apr 2017 10:34:50 GMT (envelope-from br@FreeBSD.org) Message-Id: <201704121034.v3CAYoY3078670@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Wed, 12 Apr 2017 10:34:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316728 - head/sys/riscv/riscv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Apr 2017 10:34:51 -0000 Author: br Date: Wed Apr 12 10:34:50 2017 New Revision: 316728 URL: https://svnweb.freebsd.org/changeset/base/316728 Log: Provide a NULL pointer to device tree blob so GENERIC kernel can be compiled. We will need to get pointer to DTB from hardware, so mark as TODO. Sponsored by: DARPA, AFRL Modified: head/sys/riscv/riscv/machdep.c Modified: head/sys/riscv/riscv/machdep.c ============================================================================== --- head/sys/riscv/riscv/machdep.c Wed Apr 12 09:22:02 2017 (r316727) +++ head/sys/riscv/riscv/machdep.c Wed Apr 12 10:34:50 2017 (r316728) @@ -718,7 +718,12 @@ try_load_dtb(caddr_t kmdp) { vm_offset_t dtbp; +#if defined(FDT_DTB_STATIC) dtbp = (vm_offset_t)&fdt_static_dtb; +#else + /* TODO */ + dtbp = (vm_offset_t)NULL; +#endif if (dtbp == (vm_offset_t)NULL) { printf("ERROR loading DTB\n"); return; From owner-svn-src-head@freebsd.org Wed Apr 12 10:40:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA4F6D3B459; Wed, 12 Apr 2017 10:40: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 7ABD4C21; Wed, 12 Apr 2017 10:40: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 v3CAeUd3078924; Wed, 12 Apr 2017 10:40:30 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3CAeULD078923; Wed, 12 Apr 2017 10:40:30 GMT (envelope-from br@FreeBSD.org) Message-Id: <201704121040.v3CAeULD078923@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Wed, 12 Apr 2017 10:40:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316729 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Apr 2017 10:40:31 -0000 Author: br Date: Wed Apr 12 10:40:30 2017 New Revision: 316729 URL: https://svnweb.freebsd.org/changeset/base/316729 Log: Disable fformat-extensions for RISC-V target as GCC 6.1 external compiler has no support for that. Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D10348 Modified: head/sys/conf/kern.opts.mk Modified: head/sys/conf/kern.opts.mk ============================================================================== --- head/sys/conf/kern.opts.mk Wed Apr 12 10:34:50 2017 (r316728) +++ head/sys/conf/kern.opts.mk Wed Apr 12 10:40:30 2017 (r316729) @@ -74,6 +74,10 @@ BROKEN_OPTIONS+= CDDL ZFS SSP BROKEN_OPTIONS+= ZFS .endif +.if ${MACHINE_CPUARCH} == "riscv" +BROKEN_OPTIONS+= FORMAT_EXTENSIONS +.endif + # Things that don't work because the kernel doesn't have the support # for them. .if ${MACHINE} != "i386" && ${MACHINE} != "amd64" From owner-svn-src-head@freebsd.org Wed Apr 12 10:45:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C9A6AD3B643; Wed, 12 Apr 2017 10:45:20 +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 83A78BD; Wed, 12 Apr 2017 10:45:20 +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 v3CAjJqE082718; Wed, 12 Apr 2017 10:45:19 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3CAjJZh082717; Wed, 12 Apr 2017 10:45:19 GMT (envelope-from br@FreeBSD.org) Message-Id: <201704121045.v3CAjJZh082717@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Wed, 12 Apr 2017 10:45:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316730 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Apr 2017 10:45:20 -0000 Author: br Date: Wed Apr 12 10:45:19 2017 New Revision: 316730 URL: https://svnweb.freebsd.org/changeset/base/316730 Log: Include RISC-V target to universe build. Check if RISC-V external toolchain package is installed, otherwise skip build. Reviewed by: emaste Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D10344 Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Wed Apr 12 10:40:30 2017 (r316729) +++ head/Makefile Wed Apr 12 10:45:19 2017 (r316730) @@ -417,16 +417,28 @@ worlds: .PHONY # existing system is. # .if make(universe) || make(universe_kernels) || make(tinderbox) || make(targets) -TARGETS?=amd64 arm arm64 i386 mips powerpc sparc64 +TARGETS?=amd64 arm arm64 i386 mips powerpc riscv sparc64 _UNIVERSE_TARGETS= ${TARGETS} TARGET_ARCHES_arm?= arm armeb armv6 TARGET_ARCHES_arm64?= aarch64 TARGET_ARCHES_mips?= mipsel mips mips64el mips64 mipsn32 mipselhf mipshf mips64elhf mips64hf TARGET_ARCHES_powerpc?= powerpc powerpc64 powerpcspe +TARGET_ARCHES_riscv?= riscv64 riscv64sf .for target in ${TARGETS} TARGET_ARCHES_${target}?= ${target} .endfor +MAKE_PARAMS_riscv?= CROSS_TOOLCHAIN=riscv64-gcc + +# XXX Remove riscv from universe if the required toolchain package is missing. +.if !exists(/usr/local/share/toolchains/riscv64-gcc.mk) && ${TARGETS:Mriscv} +_UNIVERSE_TARGETS:= ${_UNIVERSE_TARGETS:Nriscv} +universe: universe_riscv_skip .PHONY +universe_epilogue: universe_riscv_skip .PHONY +universe_riscv_skip: universe_prologue .PHONY + @echo ">> riscv skipped - install riscv64-xtoolchain-gcc port or package to build" +.endif + .if defined(UNIVERSE_TARGET) MAKE_JUST_WORLDS= YES .else @@ -476,6 +488,7 @@ universe_${target}_${target_arch}: unive ${SUB_MAKE} ${JFLAG} ${UNIVERSE_TARGET} \ TARGET=${target} \ TARGET_ARCH=${target_arch} \ + ${MAKE_PARAMS_${target}} \ > _.${target}.${target_arch}.${UNIVERSE_TARGET} 2>&1 || \ (echo "${target}.${target_arch} ${UNIVERSE_TARGET} failed," \ "check _.${target}.${target_arch}.${UNIVERSE_TARGET} for details" | \ @@ -531,6 +544,7 @@ universe_kernconf_${TARGET}_${kernel}: . ${SUB_MAKE} ${JFLAG} buildkernel \ TARGET=${TARGET} \ TARGET_ARCH=${TARGET_ARCH_${kernel}} \ + ${MAKE_PARAMS_${TARGET}} \ KERNCONF=${kernel} \ > _.${TARGET}.${kernel} 2>&1 || \ (echo "${TARGET} ${kernel} kernel failed," \ From owner-svn-src-head@freebsd.org Wed Apr 12 11:41:36 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E92AD39879; Wed, 12 Apr 2017 11:41:36 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 10ACDCD; Wed, 12 Apr 2017 11:41:35 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3CBfZMa006054; Wed, 12 Apr 2017 11:41:35 GMT (envelope-from maxim@FreeBSD.org) Received: (from maxim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3CBfZKd006053; Wed, 12 Apr 2017 11:41:35 GMT (envelope-from maxim@FreeBSD.org) Message-Id: <201704121141.v3CBfZKd006053@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: maxim set sender to maxim@FreeBSD.org using -f From: Maxim Konovalov Date: Wed, 12 Apr 2017 11:41:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316731 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Apr 2017 11:41:36 -0000 Author: maxim Date: Wed Apr 12 11:41:35 2017 New Revision: 316731 URL: https://svnweb.freebsd.org/changeset/base/316731 Log: OpenBSD 6.1 release added. Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree ============================================================================== --- head/share/misc/bsd-family-tree Wed Apr 12 10:45:19 2017 (r316730) +++ head/share/misc/bsd-family-tree Wed Apr 12 11:41:35 2017 (r316731) @@ -352,6 +352,7 @@ FreeBSD 5.2 | | | 11.0 10.12 | | | | | NetBSD 7.1 | | | | | | DragonFly 4.8.0 + | | | OpenBSD 6.1 | | | | | | FreeBSD 12 -current | NetBSD -current OpenBSD -current DragonFly -current | | | | | @@ -710,6 +711,7 @@ macOS 10.12 2016-09-20 [APL] FreeBSD 11.0 2016-10-10 [FBD] NetBSD 7.1 2017-03-11 [NBD] DragonFly 4.8.0 2017-03-27 [DFB] +OpenBSD 6.1 2017-04-11 [OBD] Bibliography ------------------------ From owner-svn-src-head@freebsd.org Wed Apr 12 12:34:29 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6DCFED3A617; Wed, 12 Apr 2017 12:34:29 +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 30227768; Wed, 12 Apr 2017 12:34:29 +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 v3CCYSMI027207; Wed, 12 Apr 2017 12:34:28 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3CCYScL027204; Wed, 12 Apr 2017 12:34:28 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201704121234.v3CCYScL027204@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 12 Apr 2017 12:34:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316732 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Apr 2017 12:34:29 -0000 Author: andrew Date: Wed Apr 12 12:34:27 2017 New Revision: 316732 URL: https://svnweb.freebsd.org/changeset/base/316732 Log: Use the unprivileged variant of the load and store instructions most places possible in the kernel. This forces these functions to fail if userspace is unable to access a given memory location, even if it is in the user memory range. This will simplify adding Privileged Access Never support later. MFC after: 1 week Sponsored by: DARPA, AFRL Modified: head/sys/arm64/arm64/copyinout.S head/sys/arm64/arm64/support.S Modified: head/sys/arm64/arm64/copyinout.S ============================================================================== --- head/sys/arm64/arm64/copyinout.S Wed Apr 12 11:41:35 2017 (r316731) +++ head/sys/arm64/arm64/copyinout.S Wed Apr 12 12:34:27 2017 (r316732) @@ -103,7 +103,8 @@ ENTRY(copyinstr) ldr x7, =VM_MAXUSER_ADDRESS 1: cmp x0, x7 b.cs copyio_fault - ldrb w4, [x0], #1 /* Load from uaddr */ + ldtrb w4, [x0] /* Load from uaddr */ + add x0, x0, #1 /* Next char */ strb w4, [x1], #1 /* Store in kaddr */ add x5, x5, #1 /* count++ */ cbz w4, 2f /* Break when NUL-terminated */ Modified: head/sys/arm64/arm64/support.S ============================================================================== --- head/sys/arm64/arm64/support.S Wed Apr 12 11:41:35 2017 (r316731) +++ head/sys/arm64/arm64/support.S Wed Apr 12 12:34:27 2017 (r316732) @@ -97,7 +97,7 @@ ENTRY(fubyte) b.cs fsu_fault_nopcb adr x6, fsu_fault /* Load the fault handler */ SET_FAULT_HANDLER(x6, x1) /* And set it */ - ldrb w0, [x0] /* Try loading the data */ + ldtrb w0, [x0] /* Try loading the data */ SET_FAULT_HANDLER(xzr, x1) /* Reset the fault handler */ ret /* Return */ END(fubyte) @@ -111,7 +111,7 @@ ENTRY(fuword16) b.cs fsu_fault_nopcb adr x6, fsu_fault /* Load the fault handler */ SET_FAULT_HANDLER(x6, x1) /* And set it */ - ldrh w0, [x0] /* Try loading the data */ + ldtrh w0, [x0] /* Try loading the data */ SET_FAULT_HANDLER(xzr, x1) /* Reset the fault handler */ ret /* Return */ END(fuword16) @@ -125,7 +125,7 @@ ENTRY(fueword32) b.cs fsu_fault_nopcb adr x6, fsu_fault /* Load the fault handler */ SET_FAULT_HANDLER(x6, x2) /* And set it */ - ldr w0, [x0] /* Try loading the data */ + ldtr w0, [x0] /* Try loading the data */ SET_FAULT_HANDLER(xzr, x2) /* Reset the fault handler */ str w0, [x1] /* Save the data in kernel space */ mov w0, #0 /* Success */ @@ -143,7 +143,7 @@ EENTRY(fueword64) b.cs fsu_fault_nopcb adr x6, fsu_fault /* Load the fault handler */ SET_FAULT_HANDLER(x6, x2) /* And set it */ - ldr x0, [x0] /* Try loading the data */ + ldtr x0, [x0] /* Try loading the data */ SET_FAULT_HANDLER(xzr, x2) /* Reset the fault handler */ str x0, [x1] /* Save the data in kernel space */ mov x0, #0 /* Success */ @@ -160,7 +160,7 @@ ENTRY(subyte) b.cs fsu_fault_nopcb adr x6, fsu_fault /* Load the fault handler */ SET_FAULT_HANDLER(x6, x2) /* And set it */ - strb w1, [x0] /* Try storing the data */ + sttrb w1, [x0] /* Try storing the data */ SET_FAULT_HANDLER(xzr, x2) /* Reset the fault handler */ mov x0, #0 /* Success */ ret /* Return */ @@ -175,7 +175,7 @@ ENTRY(suword16) b.cs fsu_fault_nopcb adr x6, fsu_fault /* Load the fault handler */ SET_FAULT_HANDLER(x6, x2) /* And set it */ - strh w1, [x0] /* Try storing the data */ + sttrh w1, [x0] /* Try storing the data */ SET_FAULT_HANDLER(xzr, x2) /* Reset the fault handler */ mov x0, #0 /* Success */ ret /* Return */ @@ -190,7 +190,7 @@ ENTRY(suword32) b.cs fsu_fault_nopcb adr x6, fsu_fault /* Load the fault handler */ SET_FAULT_HANDLER(x6, x2) /* And set it */ - str w1, [x0] /* Try storing the data */ + sttr w1, [x0] /* Try storing the data */ SET_FAULT_HANDLER(xzr, x2) /* Reset the fault handler */ mov x0, #0 /* Success */ ret /* Return */ @@ -206,7 +206,7 @@ EENTRY(suword64) b.cs fsu_fault_nopcb adr x6, fsu_fault /* Load the fault handler */ SET_FAULT_HANDLER(x6, x2) /* And set it */ - str x1, [x0] /* Try storing the data */ + sttr x1, [x0] /* Try storing the data */ SET_FAULT_HANDLER(xzr, x2) /* Reset the fault handler */ mov x0, #0 /* Success */ ret /* Return */ @@ -237,7 +237,7 @@ ENTRY(fuswintr) b.cs fsu_fault_nopcb adr x6, fsu_intr_fault /* Load the fault handler */ SET_FAULT_HANDLER(x6, x1) /* And set it */ - ldr w0, [x0] /* Try loading the data */ + ldtr w0, [x0] /* Try loading the data */ SET_FAULT_HANDLER(xzr, x1) /* Reset the fault handler */ ret /* Return */ END(fuswintr) @@ -251,7 +251,7 @@ ENTRY(suswintr) b.cs fsu_fault_nopcb adr x6, fsu_intr_fault /* Load the fault handler */ SET_FAULT_HANDLER(x6, x2) /* And set it */ - str w1, [x0] /* Try storing the data */ + sttr w1, [x0] /* Try storing the data */ SET_FAULT_HANDLER(xzr, x2) /* Reset the fault handler */ mov x0, #0 /* Success */ ret /* Return */ From owner-svn-src-head@freebsd.org Wed Apr 12 16:00:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 047CED3A451; Wed, 12 Apr 2017 16:00:01 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-wm0-f45.google.com (mail-wm0-f45.google.com [74.125.82.45]) (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 B29F2691; Wed, 12 Apr 2017 16:00:00 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-wm0-f45.google.com with SMTP id o81so91269769wmb.1; Wed, 12 Apr 2017 09:00:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=Hc7MUahevWXwFTv4XlT2l7hDlOzZ3RXNJLKiFDgeNW0=; b=TxHK+/OgWt9bLvfGLp367eFsTKUFnBTWgCF7jM+Dw2tMz1j5+nlEoZbykBE9OBfzXA CZo38YTSwDQhk1NBYjH6d+SBrQHYyHcXOtC053V2zZEVo9MJCyKZS1N6tRxYs0wiRwz7 bkK1PEbfijlP+xSs7m23IiJkxhXiDjsb/za1KgvOCpbLAqIo5vQwuglFdQBrShfTzV42 aCR5Q7mPUKMvohd7iHBUr9x6UaDSV2K/9MIgfIBmMuOm+S9t0y81pZx+mdW7LAQM/mxe QV5D3+zaqnwTNPW61Up3pfpN9c++Q8twKh4hvu6LkciGPzz5lrhc96WhC4aUaS6DI28Z O9fg== X-Gm-Message-State: AN3rC/4ulrhkILHeHMWeS44ZS16oDljhKJvlnQSq05ZD6sFPLW30ahMJ BIFgO7Ubqnm1HxSRFac= X-Received: by 10.28.225.10 with SMTP id y10mr19266320wmg.34.1492012315164; Wed, 12 Apr 2017 08:51:55 -0700 (PDT) Received: from mail-wr0-f170.google.com (mail-wr0-f170.google.com. [209.85.128.170]) by smtp.gmail.com with ESMTPSA id o15sm26010281wra.61.2017.04.12.08.51.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Apr 2017 08:51:55 -0700 (PDT) Received: by mail-wr0-f170.google.com with SMTP id l28so20304152wre.0; Wed, 12 Apr 2017 08:51:55 -0700 (PDT) X-Received: by 10.223.131.67 with SMTP id 61mr3781432wrd.57.1492012314865; Wed, 12 Apr 2017 08:51:54 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.80.169.4 with HTTP; Wed, 12 Apr 2017 08:51:54 -0700 (PDT) In-Reply-To: <201704112155.v3BLtepk065823@repo.freebsd.org> References: <201704112155.v3BLtepk065823@repo.freebsd.org> From: Conrad Meyer Date: Wed, 12 Apr 2017 08:51:54 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r316718 - head/sbin/mksnap_ffs To: Maxim Sobolev Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Apr 2017 16:00:01 -0000 Hi Maxim, This breaks several stbuf checks in main() following the stat() call you removed to isdir(). Coverity reported this as CID 1374247. On Tue, Apr 11, 2017 at 2:55 PM, Maxim Sobolev wrote: > Author: sobomax > Date: Tue Apr 11 21:55:39 2017 > New Revision: 316718 > URL: https://svnweb.freebsd.org/changeset/base/316718 > > ... > --- head/sbin/mksnap_ffs/mksnap_ffs.c Tue Apr 11 20:28:15 2017 (r316717) > +++ head/sbin/mksnap_ffs/mksnap_ffs.c Tue Apr 11 21:55:39 2017 (r316718) > @@ -58,6 +58,33 @@ usage(void) > errx(EX_USAGE, "usage: mksnap_ffs snapshot_name"); > } > > +static int > +isdir(const char *path) > +{ > + struct stat stbuf; > + > + if (stat(path, &stbuf) < 0) > + return (-1); ^^^^^^^^^^^^^^^^^^ moved here > + if (!S_ISDIR(stbuf.st_mode)) > + return (0); > + return (1); > +} > ... > @@ -96,16 +123,33 @@ main(int argc, char **argv) > } > if (statfs(path, &stfsbuf) < 0) > err(1, "%s", path); > - if (stat(path, &stbuf) < 0) ^^^^^^^^^^^^^^^^^^^ from here > + switch (isdir(path)) { > + case -1: > err(1, "%s", path); > - if (!S_ISDIR(stbuf.st_mode)) > + case 0: > errx(1, "%s: Not a directory", path); > + default: > + break; > + } > if (access(path, W_OK) < 0) > err(1, "Lack write permission in %s", path); > if ((stbuf.st_mode & S_ISTXT) && stbuf.st_uid != getuid()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ now uninitialized use From owner-svn-src-head@freebsd.org Wed Apr 12 16:21:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C580FD3AC3F; Wed, 12 Apr 2017 16:21:56 +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 A0C2F3ED; Wed, 12 Apr 2017 16:21:56 +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 v3CGLt50020618; Wed, 12 Apr 2017 16:21:55 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3CGLtkP020617; Wed, 12 Apr 2017 16:21:55 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201704121621.v3CGLtkP020617@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Wed, 12 Apr 2017 16:21:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316733 - head/sys/dev/syscons X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Apr 2017 16:21:56 -0000 Author: bde Date: Wed Apr 12 16:21:55 2017 New Revision: 316733 URL: https://svnweb.freebsd.org/changeset/base/316733 Log: Fix clobbering of the default attribute and the screen position in scteken_init(). Move the internals of scteken_sync() into a local function to help do this. scteken_init() reset or adjusted the default attribute and screen position at least 3 and 5 times, respectively. Warm init shouldn't do any more than reset the "input" state. (scterm-sc.c (which still works after minor editing), only resets the escape state and the saved cursor position, and then does a nearly-null sync of the current color.) This mainly broke mode changes, and was most noticeable when the background color is not teken's default (usually black). Then the screen gets cleared in the wrong color. vidcontrol restores the default normal attribute and tries to restore the default reverse attribute. vidcontrol doesn't clear the screen again after restoring the attribute(s), and it is too late to do it there without flicker. Now the default normal attribute is restored before the change affects the rendering. When the foreground color is not teken's default, clearing with the wrong attributes gave strange cursor colors for some cursor types. The default reverse attribute is not restored since it is unsupported. 2/3 of the clobbering was from 2 resetting window resizing calls. The second one is needed to restore the size, but must not reset. Window resizing also sanitizes the cursor position, and after the main reset resets the window size, the cursor row would often be adjusted from 24 to 23 if it were not already reset to 0. scteken_sync() is good for restoring the window size and the cursor position in the correct order, but was unusable at init time since scp->ts is not always initialized then. Adjust to use its internals. I didn't notice any problems from the cursor reset. The cursor should be reset, and a previous fix was to reset it consistently a little later. Doing nothing for warm init works almost as well, if not better. It is not very useful to reset the escape state for mode changes, since the reset is especially likely to be null then. The escape state is most likely to be non-initial and corrupted by its most normal uses -- sloppy non-atomic output where a context switch or just mixing stdout with stderr splits up escape sequences. Modified: head/sys/dev/syscons/scterm-teken.c Modified: head/sys/dev/syscons/scterm-teken.c ============================================================================== --- head/sys/dev/syscons/scterm-teken.c Wed Apr 12 12:34:27 2017 (r316732) +++ head/sys/dev/syscons/scterm-teken.c Wed Apr 12 16:21:55 2017 (r316733) @@ -72,6 +72,8 @@ typedef struct { static teken_stat reserved_teken_stat; +static void scteken_sync_internal(scr_stat *, teken_stat *); + static sc_term_sw_t sc_term_scteken = { { NULL, NULL }, "scteken", /* emulator name */ @@ -116,7 +118,7 @@ static int scteken_init(scr_stat *scp, void **softc, int code) { teken_stat *ts; - teken_pos_t tp; + teken_attr_t ta; if (*softc == NULL) { if (reserved_teken_stat.ts_busy) @@ -131,17 +133,16 @@ scteken_init(scr_stat *scp, void **softc ts->ts_busy = 1; /* FALLTHROUGH */ case SC_TE_WARM_INIT: + ta = *teken_get_defattr(&ts->ts_teken); teken_init(&ts->ts_teken, &scteken_funcs, scp); + teken_set_defattr(&ts->ts_teken, &ta); #ifndef TEKEN_UTF8 teken_set_8bit(&ts->ts_teken); #endif /* !TEKEN_UTF8 */ #ifdef TEKEN_CONS25 teken_set_cons25(&ts->ts_teken); #endif /* TEKEN_CONS25 */ - - tp.tp_row = scp->ysize; - tp.tp_col = scp->xsize; - teken_set_winsize(&ts->ts_teken, &tp); + scteken_sync_internal(scp, ts); break; } @@ -219,7 +220,7 @@ scteken_clear(scr_stat *scp) teken_stat *ts = scp->ts; sc_move_cursor(scp, 0, 0); - scteken_sync(scp); + scteken_sync_internal(scp, ts); sc_vtb_clear(&scp->vtb, scp->sc->scr_map[0x20], scteken_te_to_sc_attr(teken_get_curattr(&ts->ts_teken)) << 8); @@ -284,9 +285,8 @@ scteken_fkeystr(scr_stat *scp, int c) } static void -scteken_sync(scr_stat *scp) +scteken_sync_internal(scr_stat *scp, teken_stat *ts) { - teken_stat *ts = scp->ts; teken_pos_t tp; tp.tp_col = scp->xsize; @@ -298,6 +298,12 @@ scteken_sync(scr_stat *scp) } static void +scteken_sync(scr_stat *scp) +{ + scteken_sync_internal(scp, scp->ts); +} + +static void scteken_nop(void) { From owner-svn-src-head@freebsd.org Wed Apr 12 16:28:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AFB20D3B1CA; Wed, 12 Apr 2017 16:28:41 +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 8AFA5C44; Wed, 12 Apr 2017 16:28:41 +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 v3CGSeaQ023660; Wed, 12 Apr 2017 16:28:40 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3CGSe7d023658; Wed, 12 Apr 2017 16:28:40 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201704121628.v3CGSe7d023658@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 12 Apr 2017 16:28:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316734 - in head/sys/arm64: arm64 include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Apr 2017 16:28:41 -0000 Author: andrew Date: Wed Apr 12 16:28:40 2017 New Revision: 316734 URL: https://svnweb.freebsd.org/changeset/base/316734 Log: Start to use the User and Privileged execute-never bits in the arm64 pagetables. This sets both bits when entering an address we know shouldn't be executed. I expect we could mark all userspace pages as Privileged execute-never to ensure the kernel doesn't branch to one of these addresses. While here add the ARMv8.1 upper attributes. Reviewed by: alc, kib (previous version) MFC after: 1 week Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D10360 Modified: head/sys/arm64/arm64/pmap.c head/sys/arm64/include/pte.h Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Wed Apr 12 16:21:55 2017 (r316733) +++ head/sys/arm64/arm64/pmap.c Wed Apr 12 16:28:40 2017 (r316734) @@ -606,7 +606,7 @@ pmap_bootstrap_dmap(vm_offset_t kern_l1, l1_slot = ((va - DMAP_MIN_ADDRESS) >> L1_SHIFT); pmap_load_store(&pagetable_dmap[l1_slot], - (pa & ~L1_OFFSET) | ATTR_DEFAULT | + (pa & ~L1_OFFSET) | ATTR_DEFAULT | ATTR_XN | ATTR_IDX(CACHED_MEMORY) | L1_BLOCK); } @@ -2428,14 +2428,16 @@ pmap_protect(pmap_t pmap, vm_offset_t sv { vm_offset_t va, va_next; pd_entry_t *l0, *l1, *l2; - pt_entry_t *l3p, l3; + pt_entry_t *l3p, l3, nbits; - if ((prot & VM_PROT_READ) == VM_PROT_NONE) { + KASSERT((prot & ~VM_PROT_ALL) == 0, ("invalid prot %x", prot)); + if (prot == VM_PROT_NONE) { pmap_remove(pmap, sva, eva); return; } - if ((prot & VM_PROT_WRITE) == VM_PROT_WRITE) + if ((prot & (VM_PROT_WRITE | VM_PROT_EXECUTE)) == + (VM_PROT_WRITE | VM_PROT_EXECUTE)) return; PMAP_LOCK(pmap); @@ -2480,17 +2482,25 @@ pmap_protect(pmap_t pmap, vm_offset_t sv for (l3p = pmap_l2_to_l3(l2, sva); sva != va_next; l3p++, sva += L3_SIZE) { l3 = pmap_load(l3p); - if (pmap_l3_valid(l3)) { + if (!pmap_l3_valid(l3)) + continue; + + nbits = 0; + if ((prot & VM_PROT_WRITE) == 0) { if ((l3 & ATTR_SW_MANAGED) && pmap_page_dirty(l3)) { vm_page_dirty(PHYS_TO_VM_PAGE(l3 & ~ATTR_MASK)); } - pmap_set(l3p, ATTR_AP(ATTR_AP_RO)); - PTE_SYNC(l3p); - /* XXX: Use pmap_invalidate_range */ - pmap_invalidate_page(pmap, va); + nbits |= ATTR_AP(ATTR_AP_RO); } + if ((prot & VM_PROT_EXECUTE) == 0) + nbits |= ATTR_XN; + + pmap_set(l3p, nbits); + PTE_SYNC(l3p); + /* XXX: Use pmap_invalidate_range */ + pmap_invalidate_page(pmap, va); } } PMAP_UNLOCK(pmap); @@ -2709,6 +2719,8 @@ pmap_enter(pmap_t pmap, vm_offset_t va, L3_PAGE); if ((prot & VM_PROT_WRITE) == 0) new_l3 |= ATTR_AP(ATTR_AP_RO); + if ((prot & VM_PROT_EXECUTE) == 0) + new_l3 |= ATTR_XN; if ((flags & PMAP_ENTER_WIRED) != 0) new_l3 |= ATTR_SW_WIRED; if ((va >> 63) == 0) @@ -3115,6 +3127,8 @@ pmap_enter_quick_locked(pmap_t pmap, vm_ pa = VM_PAGE_TO_PHYS(m) | ATTR_DEFAULT | ATTR_IDX(m->md.pv_memattr) | ATTR_AP(ATTR_AP_RO) | L3_PAGE; + if ((prot & VM_PROT_EXECUTE) == 0) + pa |= ATTR_XN; /* * Now validate mapping with RO protection Modified: head/sys/arm64/include/pte.h ============================================================================== --- head/sys/arm64/include/pte.h Wed Apr 12 16:21:55 2017 (r316733) +++ head/sys/arm64/include/pte.h Wed Apr 12 16:28:40 2017 (r316734) @@ -46,6 +46,11 @@ typedef uint64_t pt_entry_t; /* page ta /* Bits 58:55 are reserved for software */ #define ATTR_SW_MANAGED (1UL << 56) #define ATTR_SW_WIRED (1UL << 55) +#define ATTR_UXN (1UL << 54) +#define ATTR_PXN (1UL << 53) +#define ATTR_XN (ATTR_PXN | ATTR_UXN) +#define ATTR_CONTIGUOUS (1UL << 52) +#define ATTR_DBM (1UL << 51) #define ATTR_nG (1 << 11) #define ATTR_AF (1 << 10) #define ATTR_SH(x) ((x) << 8) From owner-svn-src-head@freebsd.org Wed Apr 12 17:06:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B5D2D3B147; Wed, 12 Apr 2017 17:06: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 2AE77E69; Wed, 12 Apr 2017 17:06: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 v3CH6Oa5040244; Wed, 12 Apr 2017 17:06:24 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3CH6OTM040243; Wed, 12 Apr 2017 17:06:24 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201704121706.v3CH6OTM040243@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Wed, 12 Apr 2017 17:06:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316735 - head/sys/dev/syscons X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Apr 2017 17:06:25 -0000 Author: bde Date: Wed Apr 12 17:06:24 2017 New Revision: 316735 URL: https://svnweb.freebsd.org/changeset/base/316735 Log: Fix removing of the mouse image in vga planar mode with 8x8 fonts, and reduce hard-coded assumptions on font sizes so that the cursor size can be more independent of the font size. Moving the mouse in the buggy mode left trails of garbage. The mouse cursor currently has size 9x13 in all modes. This can occupy 2x3 character cells with 8x8 fonts, but the algorithm was hard-coded for only 2x2 character cells. Rearrange to hard-code only a maximum cursor size (now 10x16) and to not hard-code in the logic. The number of cells needed is now over-estimated in some cases. 2x3 character cells should also be used in text mode with 8x8 fonts (except with large pixels, the cursor size should be reduced), but hard-coding for 2x2 in the implementation makes it not very easy to expand, and it practice it shifts out bits to reduce to 2x2. In graphics modes, expansion is easier and there is no shifting out for 9x13 cursors (but 9 is a limit for hard-coding for 2 8-bit VGA cells wide). A previous commit removed the same buggy hard-coding for removal at a lower level in planar mode. Another previous commit fixed the much larger code for lower-level removal in direct mode; this is independent of the font size so worked for 8x8 fonts. Text mode always depended on the higher-level removal here, and always worked since everything was hard-coded consistently for 2x2 character cells. Modified: head/sys/dev/syscons/scmouse.c Modified: head/sys/dev/syscons/scmouse.c ============================================================================== --- head/sys/dev/syscons/scmouse.c Wed Apr 12 16:28:40 2017 (r316734) +++ head/sys/dev/syscons/scmouse.c Wed Apr 12 17:06:24 2017 (r316735) @@ -232,30 +232,33 @@ sc_draw_mouse_image(scr_stat *scp) void sc_remove_mouse_image(scr_stat *scp) { - int size; - int i; + int cols, i, rows; if (ISGRAPHSC(scp)) return; SC_VIDEO_LOCK(scp->sc); - (*scp->rndr->draw_mouse)(scp, - (scp->mouse_oldpos%scp->xsize + scp->xoff) - * scp->font_width, - (scp->mouse_oldpos/scp->xsize + scp->yoff) - * scp->font_size, + (*scp->rndr->draw_mouse)(scp, scp->mouse_oldxpos, scp->mouse_oldypos, FALSE); - size = scp->xsize*scp->ysize; + /* + * To simplify the renderer and ensure undrawing with correct + * attributes, mark for update a region containing the cursor + * (usually 2x2 character cells joined by almost a full line o + * character cells). + * + * The renderer should only undraw any pixels outside of the text + * window (e.g., ones in borders and hardware cursors). + */ i = scp->mouse_oldpos; mark_for_update(scp, i); mark_for_update(scp, i); - if (i + scp->xsize + 1 < size) { - mark_for_update(scp, i + scp->xsize + 1); - } else if (i + scp->xsize < size) { - mark_for_update(scp, i + scp->xsize); - } else if (i + 1 < size) { - mark_for_update(scp, i + 1); - } + cols = 1 + howmany(10 - 1, scp->font_width); /* up to VGA cursor width 9 */ + cols = imax(cols, 2); /* in case it is text mode 2x2 char cells */ + cols = imin(cols, scp->xsize - i % scp->xsize); + rows = 1 + howmany(16 - 1, scp->font_size); /* up to VGA cursor height 16 */ + rows = imax(rows, 2); /* don't bother reducing 3 to 2 if text */ + rows = imin(rows, scp->ysize - i / scp->xsize); + mark_for_update(scp, i + (rows - 1) * scp->xsize + cols - 1); scp->status &= ~MOUSE_VISIBLE; SC_VIDEO_UNLOCK(scp->sc); } From owner-svn-src-head@freebsd.org Wed Apr 12 17:08:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 380E6D3B237; Wed, 12 Apr 2017 17:08:30 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk0-x230.google.com (mail-qk0-x230.google.com [IPv6:2607:f8b0:400d:c09::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 E5B7011A; Wed, 12 Apr 2017 17:08:29 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qk0-x230.google.com with SMTP id f133so28685342qke.2; Wed, 12 Apr 2017 10:08:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=fhHRY29d8blkqmT7jzEq7UwooqXC0/iJIjcVcsRDwG0=; b=rZBIvUYeIQjgFSkTPlQWOMhxadIi+vlulEwP2XsNiOi6htrY3ylo8fRxaxdlwl5ajT p08xEPqkRhk09hQhcFdgVy//9TvWCPAU6QcDFlnh+8S9Bpt+k1g5mbpnCyk7DAQ2Sr1q dysoARRSLIE0WZ3aCIE8Kw63kfikbCRx6kZ0so8Jaxu48sUKpmuxg22pOglco18NQ3Mj GHVx4e9oy/8kLWqg/FOOVKQQQptuRxgyvZyam2ndNARqZzSTUeAk0Ea5z1t7lSWeFdVf +sZGqlU9T/qhHmJA8Z89hyyTdWi4pBFqrUK/X503Ot6mrTtSxhE9oJkcarwG1DCmpbY2 rKTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=fhHRY29d8blkqmT7jzEq7UwooqXC0/iJIjcVcsRDwG0=; b=cJyCia96RzHDGapqO96f2/l0W/NnvD3pjUncOdt2jWdVD1ss0ujmcZ6Z4M2QY82jcd 1Hl4Mmgb7TXl9KeD+JhrGfFWC7lC51J5vULJnlFSKy7AwHx5l9EhQWsFr8wtqtLZEwSS pW82ucwfjm8d3RKy6oqGI7db20U10RD2hbTQgE1/zs2vOJr1bnng9MtoyemHgPt8y5fq cRp+EpbdZGW0O7ND6AE++1I1fTSt7jIQKrheAo8IvCNNWjLKZT9tHfEQPqVjQKX1NTAr hD2ni3QMFQCNfD3DP1Kmbj48w0RbB2rxH1Px9tDf9pupTrTsZpPfJvXzxB1n0ZcAkwQn kSmA== X-Gm-Message-State: AN3rC/7IeqsXZqozBILWhqvmsuhkTaDY1JM9Aua/cxQZkCmtSF2L1LLeMQ3dnQhge8ntqg== X-Received: by 10.55.66.136 with SMTP id p130mr31465186qka.89.1492016908922; Wed, 12 Apr 2017 10:08:28 -0700 (PDT) Received: from wkstn-mjohnston.west.isilon.com (c-76-104-201-218.hsd1.wa.comcast.net. [76.104.201.218]) by smtp.gmail.com with ESMTPSA id j1sm13798856qkf.57.2017.04.12.10.08.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Apr 2017 10:08:28 -0700 (PDT) Sender: Mark Johnston Date: Wed, 12 Apr 2017 10:07:18 -0700 From: Mark Johnston To: Eric Badger Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r314690 - in head: share/man/man5 sys/conf sys/fs/procfs sys/modules/procfs Message-ID: <20170412170718.GA14764@wkstn-mjohnston.west.isilon.com> References: <201703050305.v2535OYk020986@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201703050305.v2535OYk020986@repo.freebsd.org> User-Agent: Mutt/1.8.0 (2017-02-23) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Apr 2017 17:08:30 -0000 On Sun, Mar 05, 2017 at 03:05:24AM +0000, Eric Badger wrote: > Author: badger > Date: Sun Mar 5 03:05:24 2017 > New Revision: 314690 > URL: https://svnweb.freebsd.org/changeset/base/314690 > > Log: > remove procfs ctl interface > > This interface has no in-tree consumers and has been more or less > non-functional for several releases. On a related note, can we also get rid of procctl(8)? It seems rather obsolete at this point and its name is confusing given the existence of the unrelated procctl(2) and /usr/bin/proccontrol. From owner-svn-src-head@freebsd.org Wed Apr 12 17:38:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F4BED3BCEA; Wed, 12 Apr 2017 17:38:01 +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 6C5BF1D14; Wed, 12 Apr 2017 17:38:01 +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 v3CHc0Uv053647; Wed, 12 Apr 2017 17:38:00 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3CHc0np053646; Wed, 12 Apr 2017 17:38:00 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201704121738.v3CHc0np053646@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Wed, 12 Apr 2017 17:38:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316736 - head/sys/dev/syscons X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Apr 2017 17:38:01 -0000 Author: bde Date: Wed Apr 12 17:38:00 2017 New Revision: 316736 URL: https://svnweb.freebsd.org/changeset/base/316736 Log: Trival style fix to previous commit to add this detail. The previous commit also fixed the coordinates passed to the mouse removal renderer. The coordinates were rounded down to a character boundary, and thus essentially unusable. The renderer had to keep track of the previous position, or clear a larger area. The latter is only safe in the border, which is all that needs special handling anyway. I think no renderer depends on the bug. They have the following handling: - gfb sparc64: this seems to assume non-rounded coordinates - gfb other: does nothing (seems to be missing border handling) - vga text: does nothing (doesn't need border handling) - vga planar: clears extras in the border, with some bugs. The fixes will use the precise coordinates to optimize. - vga direct: clears at the previous position with no check that it is active, and clears everything. Checking finds this bug. - others: are there any? Modified: head/sys/dev/syscons/scmouse.c Modified: head/sys/dev/syscons/scmouse.c ============================================================================== --- head/sys/dev/syscons/scmouse.c Wed Apr 12 17:06:24 2017 (r316735) +++ head/sys/dev/syscons/scmouse.c Wed Apr 12 17:38:00 2017 (r316736) @@ -252,7 +252,7 @@ sc_remove_mouse_image(scr_stat *scp) i = scp->mouse_oldpos; mark_for_update(scp, i); mark_for_update(scp, i); - cols = 1 + howmany(10 - 1, scp->font_width); /* up to VGA cursor width 9 */ + cols = 1 + howmany(10 - 1, scp->font_width); /* up to VGA cursor width 9 */ cols = imax(cols, 2); /* in case it is text mode 2x2 char cells */ cols = imin(cols, scp->xsize - i % scp->xsize); rows = 1 + howmany(16 - 1, scp->font_size); /* up to VGA cursor height 16 */ From owner-svn-src-head@freebsd.org Wed Apr 12 18:30:10 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 197D4D3B118 for ; Wed, 12 Apr 2017 18:30:10 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail-io0-x231.google.com (mail-io0-x231.google.com [IPv6:2607:f8b0:4001:c06::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DB634771 for ; Wed, 12 Apr 2017 18:30:09 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: by mail-io0-x231.google.com with SMTP id a103so53314017ioj.1 for ; Wed, 12 Apr 2017 11:30:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sippysoft-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=8rCAp7vIzYvlYtUfzWotWPi/p0fCAejfcKQQGhHtqj8=; b=B7ihqaBr8Yxl6RzvePE//wOUF5qRhIoOjbbLjGickcS3VFAFhtd3D/+7x/CloHaZX3 eEaui24+lM4bleTGypULLqWwQW0uz/0u/9SQAy4scgJBLc08B7ct2ro91WmNqNJDKml6 pHCGX9AAjpQK5VCptKHvsUj78b6jlclKB/cwWVVSnYTAYmZDNNshOp2H+5bu12Stdjz5 qTo9pUrPP5RU2/mtAnKDBvazPAh80LsN4NDPJAxE6kVNKeEi0kFncM1bh2Tshqb25pyX 1db8cXZOv8AXprfJqVzurMZpmsu6ryyxm5BKcDC0yOVSegg3ZzR89TxSUIhQ4RR4JiBh 7v+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=8rCAp7vIzYvlYtUfzWotWPi/p0fCAejfcKQQGhHtqj8=; b=WNj9Jr4mFMFr1YRv/iO6CkXvWziIS6Lh8NajHrVs25t4W+PuBzqjXMRIwNz9O2wzD1 /sJLfFXWNbcOPZGqT8vJNym0scx7Y3SNbSy1DJPDUPqxg6Mn6KF9+1RV9Es2q6DIBs8I W3ulc1wN5qLTlOtT6Xna8E6bfB78hsnRFUzKj324XyfAOYKRt4AjLWkwpBYms/PvLbLu 8c3vTA1bZsCpTBK0nPJvtlWxuIojG3QBrQ3CeeU4a/V1zLGi7bhnyEzl9hNIJk/dMTqD 0dkdo/XJrzl6tljzWkZEkqJlXYBrkOJa6G4ROyd74sZ285D1sLe41qE9pHMf3Ms88tES 3V3g== X-Gm-Message-State: AN3rC/6reBUjKvXguH4ezyRdtseuGYtKbKlmRqU7bHYasX7gNX5uELxg NVXWGULQzTxQXuhx1BilPKhNpwOfg2SA X-Received: by 10.36.74.196 with SMTP id k187mr23598993itb.49.1492021809131; Wed, 12 Apr 2017 11:30:09 -0700 (PDT) MIME-Version: 1.0 Sender: sobomax@sippysoft.com Received: by 10.36.112.210 with HTTP; Wed, 12 Apr 2017 11:30:08 -0700 (PDT) In-Reply-To: References: <201704112155.v3BLtepk065823@repo.freebsd.org> From: Maxim Sobolev Date: Wed, 12 Apr 2017 11:30:08 -0700 X-Google-Sender-Auth: Cimcvlq5itCR34mMPUJtEmU35dI Message-ID: Subject: Re: svn commit: r316718 - head/sbin/mksnap_ffs To: "Conrad E. Meyer" Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Apr 2017 18:30:10 -0000 Ah, that's right. Good catch, sorry about that. I will fix it momentarily. -Maxim On Wed, Apr 12, 2017 at 8:51 AM, Conrad Meyer wrote: > Hi Maxim, > > This breaks several stbuf checks in main() following the stat() call > you removed to isdir(). Coverity reported this as CID 1374247. > > On Tue, Apr 11, 2017 at 2:55 PM, Maxim Sobolev > wrote: > > Author: sobomax > > Date: Tue Apr 11 21:55:39 2017 > > New Revision: 316718 > > URL: https://svnweb.freebsd.org/changeset/base/316718 > > > > ... > > --- head/sbin/mksnap_ffs/mksnap_ffs.c Tue Apr 11 20:28:15 2017 > (r316717) > > +++ head/sbin/mksnap_ffs/mksnap_ffs.c Tue Apr 11 21:55:39 2017 > (r316718) > > @@ -58,6 +58,33 @@ usage(void) > > errx(EX_USAGE, "usage: mksnap_ffs snapshot_name"); > > } > > > > +static int > > +isdir(const char *path) > > +{ > > + struct stat stbuf; > > + > > + if (stat(path, &stbuf) < 0) > > + return (-1); > ^^^^^^^^^^^^^^^^^^ moved here > > > + if (!S_ISDIR(stbuf.st_mode)) > > + return (0); > > + return (1); > > +} > > ... > > @@ -96,16 +123,33 @@ main(int argc, char **argv) > > } > > if (statfs(path, &stfsbuf) < 0) > > err(1, "%s", path); > > - if (stat(path, &stbuf) < 0) > ^^^^^^^^^^^^^^^^^^^ from here > > > + switch (isdir(path)) { > > + case -1: > > err(1, "%s", path); > > - if (!S_ISDIR(stbuf.st_mode)) > > + case 0: > > errx(1, "%s: Not a directory", path); > > + default: > > + break; > > + } > > if (access(path, W_OK) < 0) > > err(1, "Lack write permission in %s", path); > > if ((stbuf.st_mode & S_ISTXT) && stbuf.st_uid != getuid()) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ now uninitialized use > > From owner-svn-src-head@freebsd.org Wed Apr 12 18:52:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DDD9CD3B953; Wed, 12 Apr 2017 18:52:07 +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 9F815964; Wed, 12 Apr 2017 18:52:07 +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 v3CIq6cx085861; Wed, 12 Apr 2017 18:52:06 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3CIq6Gm085860; Wed, 12 Apr 2017 18:52:06 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201704121852.v3CIq6Gm085860@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Wed, 12 Apr 2017 18:52:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316737 - head/sys/dev/syscons X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Apr 2017 18:52:08 -0000 Author: bde Date: Wed Apr 12 18:52:06 2017 New Revision: 316737 URL: https://svnweb.freebsd.org/changeset/base/316737 Log: Fix removal of mouse image by the vga planar renderer in the right border in unusual cases. Optimize and significantly clean up removal in this renderer. Optimize removal in the vga direct renderer. Removal only needs to be done in the border (the part with pixels) in both cases. The planar renderer used the condition scp->xoff > 0 to test whether a right border exists. This actually tests for a left border, and when the total horizontal border is 8 pixels, rounding gives only a right border. This was the unusual broken case. An example is easy to configure using something like "vidcontrol -f 8x16 iso-8x16 -g 79x25 MODE_27". Optimize the planar case a little by only removing 9x13 active pixels out of 16x16. Optimize it a lot by not doing anything if there is no overlap with the border. Don't unroll the main loop or hard-code so many assumptions about font sizes in it. On my Haswell system, graphics memory and i/o accesses takes about 520 cycles each so optimizations from unrolling are in the noise. Optimize the direct case to not do anything if there is no overlap with the border. Do a sanity check on the saveunder's coordinates. This requires a previous change to pass non-rounded coordinates. Modified: head/sys/dev/syscons/scvgarndr.c Modified: head/sys/dev/syscons/scvgarndr.c ============================================================================== --- head/sys/dev/syscons/scvgarndr.c Wed Apr 12 17:38:00 2017 (r316736) +++ head/sys/dev/syscons/scvgarndr.c Wed Apr 12 18:52:06 2017 (r316737) @@ -159,6 +159,8 @@ RENDERER_MODULE(vga, vga_set); #ifndef SC_NO_CUTPASTE #if !defined(SC_ALT_MOUSE_IMAGE) || defined(SC_PIXEL_MODE) +#define MOUSE_IMAGE_HEIGHT 13 +#define MOUSE_IMAGE_WIDTH 9 static u_short mouse_and_mask[16] = { 0xc000, 0xe000, 0xf000, 0xf800, 0xfc00, 0xfe00, 0xff00, 0xff80, 0xfe00, 0x1e00, 0x1f00, 0x0f00, 0x0f00, 0x0000, 0x0000, 0x0000 @@ -1100,49 +1102,31 @@ static void remove_pxlmouse_planar(scr_stat *scp, int x, int y) { vm_offset_t p; - int col, row; - int line_width; - int ymax; - int i; + int bx, by, i, line_width, xend, xoff, yend, yoff; /* - * The caller will remove parts of the mouse image over the text - * window better than we can do. Remove only parts over the border. + * It is only necessary to remove the mouse image where it overlaps + * the border. Determine the overlap, and do nothing if it is empty. */ - col = x/8 - scp->xoff; - row = y/scp->font_size - scp->yoff; + bx = (scp->xoff + scp->xsize) * 8; + by = (scp->yoff + scp->ysize) * scp->font_size; + xend = imin(x + MOUSE_IMAGE_WIDTH, scp->xpixel); + yend = imin(y + MOUSE_IMAGE_HEIGHT, scp->ypixel); + if (xend <= bx && yend <= by) + return; + + /* Repaint the non-empty overlap. */ line_width = scp->sc->adp->va_line_width; outw(GDCIDX, 0x0005); /* read mode 0, write mode 0 */ outw(GDCIDX, 0x0003); /* data rotate/function select */ outw(GDCIDX, 0x0f01); /* set/reset enable */ outw(GDCIDX, 0xff08); /* bit mask */ outw(GDCIDX, (scp->border << 8) | 0x00); /* set/reset */ - if (row == scp->ysize - 1) { - i = (scp->ysize + scp->yoff)*scp->font_size; - ymax = imin(i + scp->font_size, scp->ypixel); - p = scp->sc->adp->va_window + i*line_width + scp->xoff + col; - if (col < scp->xsize - 1) { - for (; i < ymax; ++i) { - writeb(p, 0); - writeb(p + 1, 0); - p += line_width; - } - } else { - for (; i < ymax; ++i) { - writeb(p, 0); - p += line_width; - } - } - } - if ((col == scp->xsize - 1) && (scp->xoff > 0)) { - i = (row + scp->yoff)*scp->font_size; - ymax = imin(i + scp->font_size*2, scp->ypixel); - p = scp->sc->adp->va_window + i*line_width - + scp->xoff + scp->xsize; - for (; i < ymax; ++i) { + for (i = x / 8, xoff = i * 8; xoff < xend; ++i, xoff += 8) { + yoff = (xoff >= bx) ? y : by; + p = scp->sc->adp->va_window + yoff * line_width + i; + for (; yoff < yend; ++yoff, p += line_width) writeb(p, 0); - p += line_width; - } } outw(GDCIDX, 0x0000); /* set/reset */ outw(GDCIDX, 0x0001); /* set/reset enable */ @@ -1162,6 +1146,16 @@ vga_pxlmouse_direct(scr_stat *scp, int x uint8_t *u8; int bpp; + /* + * Determine overlap with the border and then if removing, do nothing + * if the overlap is empty. + */ + xend = imin(x + 16, scp->xpixel); + yend = imin(y + 16, scp->ypixel); + if (!on && xend <= (scp->xoff + scp->xsize) * 8 && + yend <= (scp->yoff + scp->ysize) * scp->font_size) + return; + bpp = scp->sc->adp->va_info.vi_depth; if ((bpp == 16) && (scp->sc->adp->va_info.vi_pixel_fsizes[1] == 5)) @@ -1170,12 +1164,18 @@ vga_pxlmouse_direct(scr_stat *scp, int x line_width = scp->sc->adp->va_line_width; pixel_size = scp->sc->adp->va_info.vi_pixel_size; - xend = imin(x + 16, scp->xpixel); - yend = imin(y + 16, scp->ypixel); - if (on) goto do_on; + /* + * Repaint overlap with the border and nearby. Unlike in the planar + * case, we kept track of everything under the cursor so can restore + * it all, but we don't completely trust the saved state to be still + * relevant, so do nothing if it is obviously stale. + */ + if (x != x_old || y != y_old || xend != xend_old || yend != yend_old) + return; + p = scp->sc->adp->va_window + y_old * line_width + x_old * pixel_size; for (i = 0; i < (yend_old - y_old); i++) { From owner-svn-src-head@freebsd.org Wed Apr 12 19:23:42 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F286DD3B746; Wed, 12 Apr 2017 19:23:42 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C29E7295; Wed, 12 Apr 2017 19:23:42 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3CJNfFN098470; Wed, 12 Apr 2017 19:23:41 GMT (envelope-from sobomax@FreeBSD.org) Received: (from sobomax@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3CJNf6i098469; Wed, 12 Apr 2017 19:23:41 GMT (envelope-from sobomax@FreeBSD.org) Message-Id: <201704121923.v3CJNf6i098469@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sobomax set sender to sobomax@FreeBSD.org using -f From: Maxim Sobolev Date: Wed, 12 Apr 2017 19:23:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316738 - head/sbin/mksnap_ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Apr 2017 19:23:43 -0000 Author: sobomax Date: Wed Apr 12 19:23:41 2017 New Revision: 316738 URL: https://svnweb.freebsd.org/changeset/base/316738 Log: Fix an issue in the rev.316718 causing variable to be unsed uninitialized. Reported by: Coverity Nudged by: cem MFC after: 2 weeks Modified: head/sbin/mksnap_ffs/mksnap_ffs.c Modified: head/sbin/mksnap_ffs/mksnap_ffs.c ============================================================================== --- head/sbin/mksnap_ffs/mksnap_ffs.c Wed Apr 12 18:52:06 2017 (r316737) +++ head/sbin/mksnap_ffs/mksnap_ffs.c Wed Apr 12 19:23:41 2017 (r316738) @@ -59,13 +59,12 @@ usage(void) } static int -isdir(const char *path) +isdir(const char *path, struct stat *stbufp) { - struct stat stbuf; - if (stat(path, &stbuf) < 0) + if (stat(path, stbufp) < 0) return (-1); - if (!S_ISDIR(stbuf.st_mode)) + if (!S_ISDIR(stbufp->st_mode)) return (0); return (1); } @@ -74,8 +73,9 @@ static int issamefs(const char *path, struct statfs *stfsp) { struct statfs stfsbuf; + struct stat stbuf; - if (isdir(path) != 1) + if (isdir(path, &stbuf) != 1) return (-1); if (statfs(path, &stfsbuf) < 0) return (-1); @@ -123,7 +123,7 @@ main(int argc, char **argv) } if (statfs(path, &stfsbuf) < 0) err(1, "%s", path); - switch (isdir(path)) { + switch (isdir(path, &stbuf)) { case -1: err(1, "%s", path); case 0: From owner-svn-src-head@freebsd.org Wed Apr 12 19:27:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0FFA8D3B90F; Wed, 12 Apr 2017 19:27:16 +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 D120A6C5; Wed, 12 Apr 2017 19:27:15 +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 v3CJREKS098656; Wed, 12 Apr 2017 19:27:14 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3CJREU8098655; Wed, 12 Apr 2017 19:27:14 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201704121927.v3CJREU8098655@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 12 Apr 2017 19:27:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316739 - head/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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Apr 2017 19:27:16 -0000 Author: kib Date: Wed Apr 12 19:27:14 2017 New Revision: 316739 URL: https://svnweb.freebsd.org/changeset/base/316739 Log: Report _SC_SEM_NSEMS_MAX and _SC_SEM_VALUE_MAX which show parameters of the current usermode implementation of the POSIX semaphores. For NSEMS_MAX, return -1 without changing errno, which indicates that the variable has no limit. Before, sysconf(3) returned parameters queried from the ksem(9) legacy implementation, which apparently has low defaults for NSEMS_MAX. Reported and tested by: jbeich Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/lib/libc/gen/sysconf.c Modified: head/lib/libc/gen/sysconf.c ============================================================================== --- head/lib/libc/gen/sysconf.c Wed Apr 12 19:23:41 2017 (r316738) +++ head/lib/libc/gen/sysconf.c Wed Apr 12 19:27:14 2017 (r316739) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include #include /* we just need the limits */ +#include #include #include #include "un-namespace.h" @@ -299,13 +300,9 @@ do_NAME_MAX: mib[1] = CTL_P1003_1B_RTSIG_MAX; goto yesno; case _SC_SEM_NSEMS_MAX: - mib[0] = CTL_P1003_1B; - mib[1] = CTL_P1003_1B_SEM_NSEMS_MAX; - goto yesno; + return (-1); case _SC_SEM_VALUE_MAX: - mib[0] = CTL_P1003_1B; - mib[1] = CTL_P1003_1B_SEM_VALUE_MAX; - goto yesno; + return (SEM_VALUE_MAX); case _SC_SIGQUEUE_MAX: mib[0] = CTL_P1003_1B; mib[1] = CTL_P1003_1B_SIGQUEUE_MAX; From owner-svn-src-head@freebsd.org Wed Apr 12 20:08:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1EDF1D3A7FE; Wed, 12 Apr 2017 20:08:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E03F2639; Wed, 12 Apr 2017 20:08:40 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3CK8eMf015487; Wed, 12 Apr 2017 20:08:40 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3CK8eXZ015485; Wed, 12 Apr 2017 20:08:40 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201704122008.v3CK8eXZ015485@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 12 Apr 2017 20:08:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316740 - head/sbin/savecore X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Apr 2017 20:08:41 -0000 Author: ngie Date: Wed Apr 12 20:08:39 2017 New Revision: 316740 URL: https://svnweb.freebsd.org/changeset/base/316740 Log: Clarify `minfree` warning message in check_space(..) - State that the units are kB. - Be more complete/concise in terms of what is required (in this case `minfree` must be at least `X`kB) MFC after: 7 weeks Sponsored by: Dell EMC Isilon Modified: head/sbin/savecore/savecore.c Modified: head/sbin/savecore/savecore.c ============================================================================== --- head/sbin/savecore/savecore.c Wed Apr 12 19:27:14 2017 (r316739) +++ head/sbin/savecore/savecore.c Wed Apr 12 20:08:39 2017 (r316740) @@ -303,7 +303,8 @@ check_space(const char *savedir, off_t d needed -= saved_dump_size(bounds); if ((minfree > 0 ? spacefree : totfree) - needed < minfree) { syslog(LOG_WARNING, - "no dump, not enough free space on device (%lld available, need %lld)", + "no dump: not enough free space on device (%lldkB " + "available; need at least %lldkB)", (long long)(minfree > 0 ? spacefree : totfree), (long long)needed); return (0); From owner-svn-src-head@freebsd.org Wed Apr 12 20:18:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE608D3AACD; Wed, 12 Apr 2017 20:18:39 +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 99E8CC44; Wed, 12 Apr 2017 20:18:39 +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 v3CKIcp5019867; Wed, 12 Apr 2017 20:18:38 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3CKIcHe019866; Wed, 12 Apr 2017 20:18:38 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201704122018.v3CKIcHe019866@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Wed, 12 Apr 2017 20:18:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316741 - head/sys/dev/syscons X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Apr 2017 20:18:39 -0000 Author: bde Date: Wed Apr 12 20:18:38 2017 New Revision: 316741 URL: https://svnweb.freebsd.org/changeset/base/316741 Log: Improve drawing of the vga planar mode mouse image a little. Unobfuscate the method a lot. Reduce the AND mask to the complement of the cursor's frame, so that area inside the frame is not drawn first in black and then in lightwhite. The AND-OR method is only directly suitable for the text mouse image, since it doesn't go to the hardware there. Planar mode Mouse cursor drawing takes 10-20 usec on my Haswell system (approx. 100 graphics accesses at 130 nsec each), so the transient was not visible. The method used the fancy read mode 1 and its color compare and color don't care registers with value 0 in them so that all colors matched. All that this did was make byte reads of frame buffer memory return 0xff, so that the x86 case could obfuscate read+write as "and". The read must be done for its side effect on the graphics controller but is not used, except it must return 0xff to avoid affecting the write when the write is obfuscated as a read-modify-write "and". Perhaps that was a good optimization for 8088 CPUs where each extra instruction byte took as long as a byte memory access. Just use read+write after removing the fancy read mode. Remove x86 ifdefs that did the "and". After removing the "and" in the non-x86 part of the ifdefs, fix 4 of 6 cases where the shift was wrong. Modified: head/sys/dev/syscons/scvgarndr.c Modified: head/sys/dev/syscons/scvgarndr.c ============================================================================== --- head/sys/dev/syscons/scvgarndr.c Wed Apr 12 20:08:39 2017 (r316740) +++ head/sys/dev/syscons/scvgarndr.c Wed Apr 12 20:18:38 2017 (r316741) @@ -1038,34 +1038,26 @@ draw_pxlmouse_planar(scr_stat *scp, int yoff = y - rounddown(y, line_width); ymax = imin(y + 16, scp->ypixel); - outw(GDCIDX, 0x0805); /* read mode 1, write mode 0 */ + outw(GDCIDX, 0x0005); /* read mode 0, write mode 0 */ outw(GDCIDX, 0x0001); /* set/reset enable */ - outw(GDCIDX, 0x0002); /* color compare */ - outw(GDCIDX, 0x0007); /* color don't care */ outw(GDCIDX, 0xff08); /* bit mask */ outw(GDCIDX, 0x0803); /* data rotate/function select (and) */ p = scp->sc->adp->va_window + line_width*y + x/8; if (x < scp->xpixel - 8) { for (i = y, j = 0; i < ymax; ++i, ++j) { - m = ~(mouse_and_mask[j] >> xoff); -#if defined(__i386__) || defined(__amd64__) - *(u_char *)p &= m >> 8; - *(u_char *)(p + 1) &= m; -#else - writeb(p, readb(p) & (m >> 8)); - writeb(p + 1, readb(p + 1) & (m >> 8)); -#endif + m = ~((mouse_and_mask[j] & ~mouse_or_mask[j]) >> xoff); + readb(p); + writeb(p, m >> 8); + readb(p + 1); + writeb(p + 1, m); p += line_width; } } else { xoff += 8; for (i = y, j = 0; i < ymax; ++i, ++j) { - m = ~(mouse_and_mask[j] >> xoff); -#if defined(__i386__) || defined(__amd64__) - *(u_char *)p &= m; -#else - writeb(p, readb(p) & (m >> 8)); -#endif + m = ~((mouse_and_mask[j] & ~mouse_or_mask[j]) >> xoff); + readb(p); + writeb(p, m); p += line_width; } } @@ -1074,27 +1066,20 @@ draw_pxlmouse_planar(scr_stat *scp, int if (x < scp->xpixel - 8) { for (i = y, j = 0; i < ymax; ++i, ++j) { m = mouse_or_mask[j] >> xoff; -#if defined(__i386__) || defined(__amd64__) - *(u_char *)p &= m >> 8; - *(u_char *)(p + 1) &= m; -#else - writeb(p, readb(p) & (m >> 8)); - writeb(p + 1, readb(p + 1) & (m >> 8)); -#endif + readb(p); + writeb(p, m >> 8); + readb(p + 1); + writeb(p + 1, m); p += line_width; } } else { for (i = y, j = 0; i < ymax; ++i, ++j) { m = mouse_or_mask[j] >> xoff; -#if defined(__i386__) || defined(__amd64__) - *(u_char *)p &= m; -#else - writeb(p, readb(p) & (m >> 8)); -#endif + readb(p); + writeb(p, m); p += line_width; } } - outw(GDCIDX, 0x0005); /* read mode 0, write mode 0 */ outw(GDCIDX, 0x0003); /* data rotate/function select */ } From owner-svn-src-head@freebsd.org Wed Apr 12 20:20:05 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DFAB5D3AB71; Wed, 12 Apr 2017 20:20:05 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B01AFDB9; Wed, 12 Apr 2017 20:20:05 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3CKK49e019980; Wed, 12 Apr 2017 20:20:04 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3CKK4bt019979; Wed, 12 Apr 2017 20:20:04 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201704122020.v3CKK4bt019979@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 12 Apr 2017 20:20:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316742 - head/sbin/savecore X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Apr 2017 20:20:06 -0000 Author: ngie Date: Wed Apr 12 20:20:04 2017 New Revision: 316742 URL: https://svnweb.freebsd.org/changeset/base/316742 Log: Clarify units for mediasize and sectorsize in DoFile(..) They're byte quantities. MFC after: 7 weeks Sponsored by: Dell EMC Isilon Modified: head/sbin/savecore/savecore.c Modified: head/sbin/savecore/savecore.c ============================================================================== --- head/sbin/savecore/savecore.c Wed Apr 12 20:18:38 2017 (r316741) +++ head/sbin/savecore/savecore.c Wed Apr 12 20:20:04 2017 (r316742) @@ -519,8 +519,8 @@ DoFile(const char *savedir, const char * } if (verbose) { - printf("mediasize = %lld\n", (long long)mediasize); - printf("sectorsize = %u\n", sectorsize); + printf("mediasize = %lld bytes\n", (long long)mediasize); + printf("sectorsize = %u bytes\n", sectorsize); } if (sectorsize < sizeof(kdhl)) { From owner-svn-src-head@freebsd.org Wed Apr 12 20:27:17 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2282D3AD79; Wed, 12 Apr 2017 20:27:16 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF44C321; Wed, 12 Apr 2017 20:27:16 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3CKRF3x023860; Wed, 12 Apr 2017 20:27:15 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3CKRFTn023858; Wed, 12 Apr 2017 20:27:15 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201704122027.v3CKRFTn023858@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 12 Apr 2017 20:27:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316743 - in head/sys/netinet: . tcp_stacks X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Apr 2017 20:27:17 -0000 Author: tuexen Date: Wed Apr 12 20:27:15 2017 New Revision: 316743 URL: https://svnweb.freebsd.org/changeset/base/316743 Log: The sysctl variable net.inet.tcp.drop_synfin is not honored in all states, for example not in SYN-SENT. This patch adds code to check the sysctl variable in other states than LISTEN. Thanks to ae and gnn for providing comments. Reviewed by: gnn MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D9894 Modified: head/sys/netinet/tcp_input.c head/sys/netinet/tcp_stacks/fastpath.c Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Wed Apr 12 20:20:04 2017 (r316742) +++ head/sys/netinet/tcp_input.c Wed Apr 12 20:27:15 2017 (r316743) @@ -1613,6 +1613,16 @@ tcp_do_segment(struct mbuf *m, struct tc tcp_pcap_add(th, m, &(tp->t_inpkts)); #endif + if ((thflags & TH_SYN) && (thflags & TH_FIN) && V_drop_synfin) { + if ((s = tcp_log_addrs(inc, th, NULL, NULL))) { + log(LOG_DEBUG, "%s; %s: " + "SYN|FIN segment ignored (based on " + "sysctl setting)\n", s, __func__); + free(s, M_TCPLOG); + } + goto drop; + } + /* * Segment received on connection. * Reset idle time and keep-alive timer. Modified: head/sys/netinet/tcp_stacks/fastpath.c ============================================================================== --- head/sys/netinet/tcp_stacks/fastpath.c Wed Apr 12 20:20:04 2017 (r316742) +++ head/sys/netinet/tcp_stacks/fastpath.c Wed Apr 12 20:27:15 2017 (r316743) @@ -132,6 +132,8 @@ VNET_DECLARE(int, tcp_insecure_rst); #define V_tcp_insecure_rst VNET(tcp_insecure_rst) VNET_DECLARE(int, tcp_insecure_syn); #define V_tcp_insecure_syn VNET(tcp_insecure_syn) +VNET_DECLARE(int, drop_synfin); +#define V_drop_synfin VNET(drop_synfin) static void tcp_do_segment_fastslow(struct mbuf *, struct tcphdr *, struct socket *, struct tcpcb *, int, int, uint8_t, @@ -1729,7 +1731,6 @@ tcp_do_segment_fastslow(struct mbuf *m, struct tcpopt to; thflags = th->th_flags; - tp->sackhint.last_sack_ack = 0; inc = &tp->t_inpcb->inp_inc; nsegs = max(1, m->m_pkthdr.lro_nsegs); /* @@ -1760,6 +1761,23 @@ tcp_do_segment_fastslow(struct mbuf *m, KASSERT(tp->t_state != TCPS_TIME_WAIT, ("%s: TCPS_TIME_WAIT", __func__)); + if ((thflags & TH_SYN) && (thflags & TH_FIN) && V_drop_synfin) { + if ((s = tcp_log_addrs(inc, th, NULL, NULL))) { + log(LOG_DEBUG, "%s; %s: " + "SYN|FIN segment ignored (based on " + "sysctl setting)\n", s, __func__); + free(s, M_TCPLOG); + } + if (ti_locked == TI_RLOCKED) { + INP_INFO_RUNLOCK(&V_tcbinfo); + } + INP_WUNLOCK(tp->t_inpcb); + m_freem(m); + return; + } + + tp->sackhint.last_sack_ack = 0; + /* * Segment received on connection. * Reset idle time and keep-alive timer. @@ -2175,7 +2193,6 @@ tcp_do_segment_fastack(struct mbuf *m, s struct tcpopt to; thflags = th->th_flags; - tp->sackhint.last_sack_ack = 0; inc = &tp->t_inpcb->inp_inc; /* * If this is either a state-changing packet or current state isn't @@ -2205,6 +2222,23 @@ tcp_do_segment_fastack(struct mbuf *m, s KASSERT(tp->t_state != TCPS_TIME_WAIT, ("%s: TCPS_TIME_WAIT", __func__)); + if ((thflags & TH_SYN) && (thflags & TH_FIN) && V_drop_synfin) { + if ((s = tcp_log_addrs(inc, th, NULL, NULL))) { + log(LOG_DEBUG, "%s; %s: " + "SYN|FIN segment ignored (based on " + "sysctl setting)\n", s, __func__); + free(s, M_TCPLOG); + } + if (ti_locked == TI_RLOCKED) { + INP_INFO_RUNLOCK(&V_tcbinfo); + } + INP_WUNLOCK(tp->t_inpcb); + m_freem(m); + return; + } + + tp->sackhint.last_sack_ack = 0; + /* * Segment received on connection. * Reset idle time and keep-alive timer. From owner-svn-src-head@freebsd.org Wed Apr 12 21:15:57 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12E62D3BA20; Wed, 12 Apr 2017 21:15:57 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D7806F47; Wed, 12 Apr 2017 21:15:56 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3CLFtVK044575; Wed, 12 Apr 2017 21:15:55 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3CLFtSY044574; Wed, 12 Apr 2017 21:15:55 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201704122115.v3CLFtSY044574@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Wed, 12 Apr 2017 21:15:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316744 - head/bin/sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Apr 2017 21:15:57 -0000 Author: jilles Date: Wed Apr 12 21:15:55 2017 New Revision: 316744 URL: https://svnweb.freebsd.org/changeset/base/316744 Log: sh: Reduce size of limits table. Modified: head/bin/sh/miscbltin.c Modified: head/bin/sh/miscbltin.c ============================================================================== --- head/bin/sh/miscbltin.c Wed Apr 12 20:27:15 2017 (r316743) +++ head/bin/sh/miscbltin.c Wed Apr 12 21:15:55 2017 (r316744) @@ -367,7 +367,7 @@ struct limits { const char *name; const char *units; int cmd; - int factor; /* multiply by to get rlim_{cur,max} values */ + short factor; /* multiply by to get rlim_{cur,max} values */ char option; }; From owner-svn-src-head@freebsd.org Wed Apr 12 21:37:14 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14297D3BE33; Wed, 12 Apr 2017 21:37:14 +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 BE471A7C; Wed, 12 Apr 2017 21:37:13 +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 v3CLbCOr052530; Wed, 12 Apr 2017 21:37:12 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3CLbCoA052529; Wed, 12 Apr 2017 21:37:12 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201704122137.v3CLbCoA052529@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Wed, 12 Apr 2017 21:37:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316745 - head/sys/fs/nfsclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Apr 2017 21:37:14 -0000 Author: rmacklem Date: Wed Apr 12 21:37:12 2017 New Revision: 316745 URL: https://svnweb.freebsd.org/changeset/base/316745 Log: Fix the NFS client for "text file modified, process killed" mmap'd case. When an mmap'd text file is written and then executed immediately afterwards, it was possible that the modify time would change after the text file was executing, resulting in the process executing the file being killed. This was usually only observed when the file system's times were set to higher resolution, but could have occurred for any time resolution. This was reported on a recent email list discussion. This patch adds a VOP_SET_TEXT() to the NFS client which flushed all dirty pages to the NFS server and then makes sure that n_mtime is up to date to avoid this from occurring. Thanks go to kib@ and pho@ for their help with developing this patch. Tested by: pho Reviewed by: kib MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clvnops.c Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Wed Apr 12 21:15:55 2017 (r316744) +++ head/sys/fs/nfsclient/nfs_clvnops.c Wed Apr 12 21:37:12 2017 (r316745) @@ -140,6 +140,7 @@ static vop_advlock_t nfs_advlock; static vop_advlockasync_t nfs_advlockasync; static vop_getacl_t nfs_getacl; static vop_setacl_t nfs_setacl; +static vop_set_text_t nfs_set_text; /* * Global vfs data structures for nfs @@ -176,6 +177,7 @@ struct vop_vector newnfs_vnodeops = { .vop_write = ncl_write, .vop_getacl = nfs_getacl, .vop_setacl = nfs_setacl, + .vop_set_text = nfs_set_text, }; struct vop_vector newnfs_fifoops = { @@ -3381,6 +3383,39 @@ nfs_setacl(struct vop_setacl_args *ap) return (error); } +static int +nfs_set_text(struct vop_set_text_args *ap) +{ + struct vnode *vp = ap->a_vp; + struct nfsnode *np; + + /* + * If the text file has been mmap'd, flush any dirty pages to the + * buffer cache and then... + * Make sure all writes are pushed to the NFS server. If this is not + * done, the modify time of the file can change while the text + * file is being executed. This will cause the process that is + * executing the text file to be terminated. + */ + if (vp->v_object != NULL) { + VM_OBJECT_WLOCK(vp->v_object); + vm_object_page_clean(vp->v_object, 0, 0, OBJPC_SYNC); + VM_OBJECT_WUNLOCK(vp->v_object); + } + + /* Now, flush the buffer cache. */ + ncl_flush(vp, MNT_WAIT, NULL, curthread, 0, 0); + + /* And, finally, make sure that n_mtime is up to date. */ + np = VTONFS(vp); + mtx_lock(&np->n_mtx); + np->n_mtime = np->n_vattr.na_mtime; + mtx_unlock(&np->n_mtx); + + vp->v_vflag |= VV_TEXT; + return (0); +} + /* * Return POSIX pathconf information applicable to nfs filesystems. */ From owner-svn-src-head@freebsd.org Thu Apr 13 00:07:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1BF4DD3B39A; Thu, 13 Apr 2017 00:07:41 +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 D4385F25; Thu, 13 Apr 2017 00:07:40 +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 v3D07epG014410; Thu, 13 Apr 2017 00:07:40 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3D07eQ9014409; Thu, 13 Apr 2017 00:07:40 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201704130007.v3D07eQ9014409@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Thu, 13 Apr 2017 00:07:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316746 - head/share/examples/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 00:07:41 -0000 Author: allanjude Date: Thu Apr 13 00:07:39 2017 New Revision: 316746 URL: https://svnweb.freebsd.org/changeset/base/316746 Log: Add UEFI support to vmrun.sh Adds: -E: Use UEFI mode -f: path to UEFI firmware image (default: path to uefi-edk2-bhyve package) -F: UEFI framebuffer size (default: w=1024,h=768) -L: IP to listen for VNC connections on (default: 127.0.0.1) -P: Port to listen for VNC connections on (default: 5900) -T: Enable tablnet device (for VNC) -v: Wait for VNC client before booting VM Submitted by: Shawn Webb MFC after: 2 weeks Relnotes: yes Differential Revision: https://reviews.freebsd.org/D10378 Modified: head/share/examples/bhyve/vmrun.sh Modified: head/share/examples/bhyve/vmrun.sh ============================================================================== --- head/share/examples/bhyve/vmrun.sh Wed Apr 12 21:37:12 2017 (r316745) +++ head/share/examples/bhyve/vmrun.sh Thu Apr 13 00:07:39 2017 (r316746) @@ -46,10 +46,12 @@ errmsg() { usage() { local msg=$1 - echo "Usage: vmrun.sh [-ahi] [-c ] [-C ] [-d ]" - echo " [-e ] [-g ] [-H ]" + echo "Usage: vmrun.sh [-aEhiTv] [-c ] [-C ] [-d ]" + echo " [-e ] [-f ] [-F ]" + echo " [-g ] [-H ]" echo " [-I ] [-l ]" - echo " [-m ] [-t ] " + echo " [-L ]" + echo " [-m ] [-P ] [-t ] " echo "" echo " -h: display this help message" echo " -a: force memory mapped local APIC access" @@ -57,15 +59,22 @@ usage() { echo " -C: console device (default is ${DEFAULT_CONSOLE})" echo " -d: virtio diskdev file (default is ${DEFAULT_VIRTIO_DISK})" echo " -e: set FreeBSD loader environment variable" + echo " -E: Use UEFI mode" + echo " -f: Use a specific UEFI firmware" + echo " -F: Use a custom UEFI GOP framebuffer size (default: w=1024,h=768)" echo " -g: listen for connection from kgdb at " echo " -H: host filesystem to export to the loader" echo " -i: force boot of the Installation CDROM image" echo " -I: Installation CDROM image location (default is ${DEFAULT_ISOFILE})" echo " -l: the OS loader to use (default is /boot/userboot.so)" + echo " -L: IP address for UEFI GOP VNC server (default: 127.0.0.1)" echo " -m: memory size (default is ${DEFAULT_MEMSIZE})" echo " -p: pass-through a host PCI device at bus/slot/func (e.g. 10/0/0)" + echo " -P: UEFI GOP VNC port (default: 5900)" echo " -t: tap device for virtio-net (default is $DEFAULT_TAPDEV)" + echo " -T: Enable tablet device (for UEFI GOP)" echo " -u: RTC keeps UTC time" + echo " -v: Wait for VNC client connection before booting VM" echo " -w: ignore unimplemented MSRs" echo "" [ -n "$msg" ] && errmsg "$msg" @@ -95,7 +104,16 @@ loader_opt="" bhyverun_opt="-H -A -P" pass_total=0 -while getopts ac:C:d:e:g:hH:iI:l:m:p:t:uw c ; do +# EFI-specific options +efi_mode=0 +efi_firmware="/usr/local/share/uefi-firmware/BHYVE_UEFI.fd" +vncwait="" +vnchost="127.0.0.1" +vncport=5900 +fbsize="w=1024,h=768" +tablet="" + +while getopts ac:C:d:e:Ef:F:g:hH:iI:l:m:p:P:t:Tuvw c ; do case $c in a) bhyverun_opt="${bhyverun_opt} -a" @@ -116,6 +134,15 @@ while getopts ac:C:d:e:g:hH:iI:l:m:p:t:u e) loader_opt="${loader_opt} -e ${OPTARG}" ;; + E) + efi_mode=1 + ;; + f) + efi_firmware="${OPTARG}" + ;; + F) + fbsize="${OPTARG}" + ;; g) gdbport=${OPTARG} ;; @@ -131,6 +158,9 @@ while getopts ac:C:d:e:g:hH:iI:l:m:p:t:u l) loader_opt="${loader_opt} -l ${OPTARG}" ;; + L) + vnchost="${OPTARG}" + ;; m) memsize=${OPTARG} ;; @@ -138,13 +168,22 @@ while getopts ac:C:d:e:g:hH:iI:l:m:p:t:u eval "pass_dev${pass_total}=\"${OPTARG}\"" pass_total=$(($pass_total + 1)) ;; + P) + vncport="${OPTARG}" + ;; t) eval "tap_dev${tap_total}=\"${OPTARG}\"" tap_total=$(($tap_total + 1)) ;; + T) + tablet="-s 30,xhci,tablet" + ;; u) bhyverun_opt="${bhyverun_opt} -u" ;; + v) + vncwait=",wait" + ;; w) bhyverun_opt="${bhyverun_opt} -w" ;; @@ -181,6 +220,13 @@ if [ ${pass_total} -gt 0 ]; then bhyverun_opt="${bhyverun_opt} -S" fi +if [ ${efi_mode} -gt 0 ]; then + if [ ! -f ${efi_firmware} ]; then + echo "Error: EFI Firmware ${efi_firmware} doesn't exist. Try: pkg install uefi-edk2-bhyve" + exit 1 + fi +fi + make_and_check_diskdev() { local virtio_diskdev="$1" @@ -243,11 +289,13 @@ while [ 1 ]; do installer_opt="" fi - ${LOADER} -c ${console} -m ${memsize} ${BOOTDISKS} ${loader_opt} \ - ${vmname} - bhyve_exit=$? - if [ $bhyve_exit -ne 0 ]; then - break + if [ ${efi_mode} -eq 0 ]; then + ${LOADER} -c ${console} -m ${memsize} ${BOOTDISKS} ${loader_opt} \ + ${vmname} + bhyve_exit=$? + if [ $bhyve_exit -ne 0 ]; then + break + fi fi # @@ -281,10 +329,18 @@ while [ 1 ]; do i=$(($i + 1)) done + efiargs="" + if [ ${efi_mode} -gt 0 ]; then + efiargs="-s 29,fbuf,tcp=${vnchost}:${vncport},${fbsize}${vncwait}" + efiargs="${efiargs} -l bootrom,${efi_firmware}" + efiargs="${efiargs} ${tablet}" + fi + ${FBSDRUN} -c ${cpus} -m ${memsize} ${bhyverun_opt} \ -g ${gdbport} \ -s 0:0,hostbridge \ -s 1:0,lpc \ + ${efiargs} \ ${devargs} \ -l com1,${console} \ ${installer_opt} \ From owner-svn-src-head@freebsd.org Thu Apr 13 01:17:50 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78C68D38AB4; Thu, 13 Apr 2017 01:17:50 +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 48EDC96E; Thu, 13 Apr 2017 01:17:50 +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 v3D1HnBq042516; Thu, 13 Apr 2017 01:17:49 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3D1Hntp042515; Thu, 13 Apr 2017 01:17:49 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201704130117.v3D1Hntp042515@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Thu, 13 Apr 2017 01:17:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316747 - head/sys/dev/qlnx/qlnxe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 01:17:50 -0000 Author: davidcs Date: Thu Apr 13 01:17:49 2017 New Revision: 316747 URL: https://svnweb.freebsd.org/changeset/base/316747 Log: Fix rss_ind_table entry for num_funcs > 1 MFC after:3 days Modified: head/sys/dev/qlnx/qlnxe/qlnx_os.c Modified: head/sys/dev/qlnx/qlnxe/qlnx_os.c ============================================================================== --- head/sys/dev/qlnx/qlnxe/qlnx_os.c Thu Apr 13 00:07:39 2017 (r316746) +++ head/sys/dev/qlnx/qlnxe/qlnx_os.c Thu Apr 13 01:17:49 2017 (r316747) @@ -5840,7 +5840,7 @@ qlnx_update_vport(struct ecore_dev *cdev ha->num_rss; fp = &ha->fp_array[fp_index]; - rss->rss_ind_table[i] = fp->rxq->handle; + rss->rss_ind_table[j] = fp->rxq->handle; } for (j = 0; j < ECORE_RSS_IND_TABLE_SIZE;) { From owner-svn-src-head@freebsd.org Thu Apr 13 01:56:17 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 22079D3A694; Thu, 13 Apr 2017 01:56:17 +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 DAD06EE0; Thu, 13 Apr 2017 01:56:16 +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 v3D1uFPL058486; Thu, 13 Apr 2017 01:56:15 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3D1uFws058484; Thu, 13 Apr 2017 01:56:15 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201704130156.v3D1uFws058484@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Thu, 13 Apr 2017 01:56:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316749 - in head/sys/dev/drm2: . i915 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 01:56:17 -0000 Author: cem Date: Thu Apr 13 01:56:15 2017 New Revision: 316749 URL: https://svnweb.freebsd.org/changeset/base/316749 Log: drm2: Add some missing PCIIDs for some Haswell systems Submitted by: Jia-Shiun Li Modified: head/sys/dev/drm2/drm_pciids.h head/sys/dev/drm2/i915/i915_drv.c Modified: head/sys/dev/drm2/drm_pciids.h ============================================================================== --- head/sys/dev/drm2/drm_pciids.h Thu Apr 13 01:36:51 2017 (r316748) +++ head/sys/dev/drm2/drm_pciids.h Thu Apr 13 01:56:15 2017 (r316749) @@ -54,6 +54,7 @@ {0x8086, 0x0412, 0, "Intel Haswell (GT2 desktop)"}, \ {0x8086, 0x0416, 0, "Intel Haswell (GT2 mobile)"}, \ {0x8086, 0x041A, 0, "Intel Haswell (GT2 server)"}, \ + {0x8086, 0x041E, 0, "Intel Haswell (GT2 desktop)"}, \ {0x8086, 0x0422, 0, "Intel Haswell (GT2 desktop)"}, \ {0x8086, 0x0426, 0, "Intel Haswell (GT2 mobile)"}, \ {0x8086, 0x042A, 0, "Intel Haswell (GT2 server)"}, \ Modified: head/sys/dev/drm2/i915/i915_drv.c ============================================================================== --- head/sys/dev/drm2/i915/i915_drv.c Thu Apr 13 01:36:51 2017 (r316748) +++ head/sys/dev/drm2/i915/i915_drv.c Thu Apr 13 01:56:15 2017 (r316749) @@ -380,6 +380,7 @@ static const struct intel_gfx_device_id INTEL_VGA_DEVICE(0x016a, &intel_ivybridge_d_info), /* GT2 server */ INTEL_VGA_DEVICE(0x0402, &intel_haswell_d_info), /* GT1 desktop */ INTEL_VGA_DEVICE(0x0412, &intel_haswell_d_info), /* GT2 desktop */ + INTEL_VGA_DEVICE(0x041e, &intel_haswell_d_info), /* GT2 desktop */ INTEL_VGA_DEVICE(0x0422, &intel_haswell_d_info), /* GT2 desktop */ INTEL_VGA_DEVICE(0x040a, &intel_haswell_d_info), /* GT1 server */ INTEL_VGA_DEVICE(0x041a, &intel_haswell_d_info), /* GT2 server */ From owner-svn-src-head@freebsd.org Thu Apr 13 04:10:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 770D4D3BE87; Thu, 13 Apr 2017 04:10:28 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39574A72; Thu, 13 Apr 2017 04:10:28 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3D4ARjQ013812; Thu, 13 Apr 2017 04:10:27 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3D4AR7T013811; Thu, 13 Apr 2017 04:10:27 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201704130410.v3D4AR7T013811@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 13 Apr 2017 04:10:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316750 - head/contrib/netbsd-tests/usr.bin/grep X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 04:10:28 -0000 Author: ngie Date: Thu Apr 13 04:10:27 2017 New Revision: 316750 URL: https://svnweb.freebsd.org/changeset/base/316750 Log: Fix expectations for testcases per bsdgrep vs gnu grep from base/ports The following failures occur with various versions of grep: BSD grep: - :context - :context2 GNU grep (base): - :color - :oflag_zerolen GNU grep (ports): - :recurse_symlink Tested with: bsdgrep (^/head@r316542), gnu grep (base/2.5.1), gnu grep (ports/2.27) Reported by: Jenkins (bsdgrep failures) Sponsored by: Dell EMC Isilon Modified: head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh Modified: head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh ============================================================================== --- head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh Thu Apr 13 01:56:15 2017 (r316749) +++ head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh Thu Apr 13 04:10:27 2017 (r316750) @@ -69,6 +69,12 @@ recurse_symlink_head() } recurse_symlink_body() { + # Begin FreeBSD + grep_type + if [ $? -eq $GREP_TYPE_GNU ]; then + atf_expect_fail "this test doesn't pass with gnu grep from ports" + fi + # End FreeBSD mkdir -p test/c/d (cd test/c/d && ln -s ../d .) echo "Test string" > test/c/match @@ -153,6 +159,12 @@ context_head() } context_body() { + # Begin FreeBSD + grep_type + if [ $? -eq $GREP_TYPE_BSD ]; then + atf_expect_fail "this test doesn't pass with BSD grep yet" + fi + # End FreeBSD cp $(atf_get_srcdir)/d_context_*.* . atf_check -o file:d_context_a.out grep -C2 bamboo d_context_a.in @@ -214,6 +226,12 @@ context2_head() } context2_body() { + # Begin FreeBSD + grep_type + if [ $? -eq $GREP_TYPE_BSD ]; then + atf_expect_fail "this test doesn't pass with BSD grep yet" + fi + # End FreeBSD printf "haddock\000cod\000plaice\000" > test1 printf "mackeral\000cod\000crab\000" > test2 @@ -227,6 +245,38 @@ context2_body() grep -z -C1 cod test1 test2 } # Begin FreeBSD + +# What grep(1) are we working with? +# - 0 : bsdgrep +# - 1 : gnu grep 2.51 (base) +# - 2 : gnu grep (ports) +GREP_TYPE_BSD=0 +GREP_TYPE_GNU_FREEBSD=1 +GREP_TYPE_GNU=2 +GREP_TYPE_UNKNOWN=3 + +grep_type() +{ + local grep_version=$(grep --version) + + case "$grep_version" in + *"BSD grep"*) + return $GREP_TYPE_BSD + ;; + *"GNU grep"*) + case "$grep_version" in + *2.5.1-FreeBSD*) + return $GREP_TYPE_GNU_FREEBSD + ;; + *) + return $GREP_TYPE_GNU + ;; + esac + ;; + esac + atf_fail "unknown grep type: $grep_version" +} + atf_test_case oflag_zerolen oflag_zerolen_head() { @@ -234,6 +284,11 @@ oflag_zerolen_head() } oflag_zerolen_body() { + grep_type + if [ $? -eq $GREP_TYPE_GNU_FREEBSD ]; then + atf_expect_fail "this test doesn't pass with gnu grep in base" + fi + atf_check -o file:"$(atf_get_srcdir)/d_oflag_zerolen_a.out" \ grep -Eo '(^|:)0*' "$(atf_get_srcdir)/d_oflag_zerolen_a.in" @@ -271,6 +326,11 @@ color_head() } color_body() { + grep_type + if [ $? -eq $GREP_TYPE_GNU_FREEBSD ]; then + atf_expect_fail "this test doesn't pass with gnu grep in base" + fi + echo 'abcd*' > grepfile echo 'abc$' >> grepfile echo '^abc' >> grepfile From owner-svn-src-head@freebsd.org Thu Apr 13 04:17:34 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2714D3B1E8; Thu, 13 Apr 2017 04:17:34 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x241.google.com (mail-pf0-x241.google.com [IPv6:2607:f8b0:400e:c00::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 92322216; Thu, 13 Apr 2017 04:17:34 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x241.google.com with SMTP id a188so8349202pfa.2; Wed, 12 Apr 2017 21:17:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=ExHWzLmus0zbe26GquCQtyEKWj9Coo7X2HPwOuvIz2I=; b=DfBcUifN4maevJT9v/G5lt2YUu7HlfIUtlyMfY6fut1aavTLLFuzY+KuzwhPRvty1f 7IZ33dnvUuVbc4vT3e3yvnnRyDrcv7nv+ZBKVvGxVMHpFEBts1Xwc6YzSG5BREV+Hf1s grENq2XUho+ztkXvvVXQms6XW0iWtN+avj2d+i+xSs3UMu4YqDpnlIuCw3hJL7hw4SOz PBXMqZ0fEp26xx3ZDdyiMlDU4UM3MK/ouRVULgEohuiDpf7ICs7g8YeSqeR1E2yiDNfA +pxmdF4rGwyZax/dKF3+ajoVLhwnwYfm5n/qenuN/FCE0YT0KWlWIAs/4mhNNb7vD3Ct l9vQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=ExHWzLmus0zbe26GquCQtyEKWj9Coo7X2HPwOuvIz2I=; b=PvKSBJFFnzCbLtQDsc1BFETMJVgEyJPOxNZ9mst9pPnfOy+DleDark7VM4BMGSmuTZ D0W0qJ7GCStCyTuG+MEyblfpcm2UCllx3VRvyznpTvI5OeefVHE/ItQ1Nh9TAOyulvdC ZyAITBm16OiPn6gaSWmb9RPtR4F9hlcRZvXismbX8aZBtwnU1esWAgnOPgt7AOAZv/n8 L1IUSIW9KemWbMXA4fr2qXHU/sT4qzK2u26HIQaMEMPC37uVELvuqdmM0xeIf/gr0dlR ZI7ra4jVEzUy0Fd4vvDEm37+nYTNbXarM5I79RvILn8iDrrJJseBs6tqf9ER5bxSzFb0 Gjpw== X-Gm-Message-State: AN3rC/6vsLSzpX0YxkMINgYh+FIjQxn1jCCATkuXNjFkEBgTZP80pDmM pXyHxwGeYWpPeJYYVio= X-Received: by 10.99.111.138 with SMTP id k132mr1255869pgc.138.1492057054025; Wed, 12 Apr 2017 21:17:34 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id e5sm39209081pga.13.2017.04.12.21.17.32 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 12 Apr 2017 21:17:33 -0700 (PDT) Subject: Re: svn commit: r316750 - head/contrib/netbsd-tests/usr.bin/grep Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_EE7EF8DB-89B5-43B5-A576-D1BA76896037"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201704130410.v3D4AR7T013811@repo.freebsd.org> Date: Wed, 12 Apr 2017 21:17:32 -0700 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201704130410.v3D4AR7T013811@repo.freebsd.org> To: Ngie Cooper X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 04:17:34 -0000 --Apple-Mail=_EE7EF8DB-89B5-43B5-A576-D1BA76896037 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Apr 12, 2017, at 21:10, Ngie Cooper wrote: >=20 > Author: ngie > Date: Thu Apr 13 04:10:27 2017 > New Revision: 316750 > URL: https://svnweb.freebsd.org/changeset/base/316750 =E2=80=A6 > Reported by: Jenkins (bsdgrep failures) Slight correction: Jenkins is reporting failures with gnu grep from = base, not bsdgrep, since bsdgrep is still not the default grep. Thanks, -Ngie --Apple-Mail=_EE7EF8DB-89B5-43B5-A576-D1BA76896037 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----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJY7vvcAAoJEPWDqSZpMIYVpJ4P/2LXa60ljSd8D07BYDzsoQDP tj5tcRVl3T4/zyEU9dHx5Pi2vkyFhnvLIhRGBPsIL65VOOoIkfraBknvPzjrvaC2 BaW5HwOkdKRFlGbaOrF1OIkW+ADlucBOS5+iAL4LMAf8h/0ZtSfloujlf/LeGx6c hQJiLhRDe4dhkoOlPxsk7z0LTr1gPhK++s0VnTvO6f4pGRtyTm7G+JG5Vm8i4a6F YJ1d5DPyHBz+hQhg9FWHsqHjOMuJ+Vti77O+P/rZuLcCO2Z0YfjmUBuCl+wp8RKF GNd2lBnOA8e6JkGs46PZeQzkaZvCrLogsoFoAf34lMKHroUDxxtFX6+V3up1a87K 5wf+Bn9aGpYANagfeYqwx0EUic4hOR2b61XSDIcbzRIHnMPnQzKkdBoYHtmLXGML YnRGwhl5fYS0zVk+xVxqFDK86TsFU+e5w4Y6Z5iucg8kIlQ/kLtHNY8xf78FkBKJ GucYqRZenRGHd1bDmCgkSBJ+yi3ROvmJrBlFyKNgxXVd7buOAt4GfrbUTCVqxe1Q taP5q3mYD51LxcY69dywt92er3pHvsDX+pYQdImiLDDv+p3V5ijvjpSgalOr8fXB /2nkO6dEbgL4mqvYkw8oxWG9gyB0Azdhd8vx97DYomrtbN12zVy3ySfeGhrAqcod rKNU5Lz2sq5iJ+Syj6eu =oyHC -----END PGP SIGNATURE----- --Apple-Mail=_EE7EF8DB-89B5-43B5-A576-D1BA76896037-- From owner-svn-src-head@freebsd.org Thu Apr 13 09:59:13 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 917CED3C7F5; Thu, 13 Apr 2017 09:59:13 +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 53071124; Thu, 13 Apr 2017 09:59:13 +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 v3D9xCSC056521; Thu, 13 Apr 2017 09:59:12 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3D9xCOo056518; Thu, 13 Apr 2017 09:59:12 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201704130959.v3D9xCOo056518@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: Thu, 13 Apr 2017 09:59:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316754 - in head/sys/boot: common i386/libi386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 09:59:13 -0000 Author: royger Date: Thu Apr 13 09:59:12 2017 New Revision: 316754 URL: https://svnweb.freebsd.org/changeset/base/316754 Log: loader/multiboot: fix multiboot loading The current multiboot loader code doesn't clean the metadata added to the kernel after the bi_load64 dry run, which breaks accounting of the required memory for the metadata. This issue didn't show itself before because all the metadata items where small (8bytes), but after r316343 there's a big blob in the metadata, which triggers this. Fix it by cleaning the metadata added to the kernel after the bi_load64 dry run. Also add a comment describing the memory layout when booting using multiboot (Xen Dom0). This unbreaks booting a FreeBSD/Xen Dom0 after r316343. MFC after: 3 weeks Sponsored by: Citrix Systems R&D Modified: head/sys/boot/common/bootstrap.h head/sys/boot/common/module.c head/sys/boot/i386/libi386/multiboot.c Modified: head/sys/boot/common/bootstrap.h ============================================================================== --- head/sys/boot/common/bootstrap.h Thu Apr 13 08:21:29 2017 (r316753) +++ head/sys/boot/common/bootstrap.h Thu Apr 13 09:59:12 2017 (r316754) @@ -228,6 +228,7 @@ void file_discard(struct preloaded_file void file_addmetadata(struct preloaded_file *fp, int type, size_t size, void *p); int file_addmodule(struct preloaded_file *fp, char *modname, int version, struct kernel_module **newmp); +void file_removemetadata(struct preloaded_file *fp); /* MI module loaders */ #ifdef __elfN Modified: head/sys/boot/common/module.c ============================================================================== --- head/sys/boot/common/module.c Thu Apr 13 08:21:29 2017 (r316753) +++ head/sys/boot/common/module.c Thu Apr 13 09:59:12 2017 (r316754) @@ -663,6 +663,22 @@ file_findmetadata(struct preloaded_file return(md); } +/* + * Remove all metadata from the file. + */ +void +file_removemetadata(struct preloaded_file *fp) +{ + struct file_metadata *md, *next; + + for (md = fp->f_metadata; md != NULL; md = next) + { + next = md->md_next; + free(md); + } + fp->f_metadata = NULL; +} + struct file_metadata * metadata_next(struct file_metadata *md, int type) { Modified: head/sys/boot/i386/libi386/multiboot.c ============================================================================== --- head/sys/boot/i386/libi386/multiboot.c Thu Apr 13 08:21:29 2017 (r316753) +++ head/sys/boot/i386/libi386/multiboot.c Thu Apr 13 09:59:12 2017 (r316754) @@ -267,7 +267,39 @@ multiboot_exec(struct preloaded_file *fp * information is placed at the start of the second module and * the original modulep value is saved together with the other * metadata, so we can relocate everything. + * + * Native layout: + * fp->f_addr + fp->f_size + * +---------+----------------+------------+ + * | | | | + * | Kernel | Modules | Metadata | + * | | | | + * +---------+----------------+------------+ + * fp->f_addr modulep kernend + * + * Xen layout: + * + * Initial: + * fp->f_addr + fp->f_size + * +---------+----------+----------------+------------+ + * | | | | | + * | Kernel | Reserved | Modules | Metadata | + * | | | | dry run | + * +---------+----------+----------------+------------+ + * fp->f_addr + * + * After metadata polacement (ie: final): + * fp->f_addr + fp->f_size + * +-----------+---------+----------+----------------+ + * | | | | | + * | Kernel | Free | Metadata | Modules | + * | | | | | + * +-----------+---------+----------+----------------+ + * fp->f_addr modulep kernend + * \__________/ \__________________________/ + * Multiboot module 0 Multiboot module 1 */ + fp = file_findfile(NULL, "elf kernel"); if (fp == NULL) { printf("No FreeBSD kernel provided, aborting\n"); @@ -275,6 +307,13 @@ multiboot_exec(struct preloaded_file *fp goto error; } + if (fp->f_metadata != NULL) { + printf("FreeBSD kernel already contains metadata, aborting\n"); + error = EINVAL; + goto error; + } + + mb_mod = malloc(sizeof(struct multiboot_mod_list) * NUM_MODULES); if (mb_mod == NULL) { error = ENOMEM; @@ -312,6 +351,9 @@ multiboot_exec(struct preloaded_file *fp goto error; } + /* Clean the metadata added to the kernel in the bi_load64 dry run */ + file_removemetadata(fp); + /* * This is the position where the second multiboot module * will be placed. From owner-svn-src-head@freebsd.org Thu Apr 13 10:29:29 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE1B9D3C309; Thu, 13 Apr 2017 10:29:29 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B406EBBD; Thu, 13 Apr 2017 10:29:29 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v3DATS4X000974; Thu, 13 Apr 2017 03:29:28 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v3DATSUQ000973; Thu, 13 Apr 2017 03:29:28 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201704131029.v3DATSUQ000973@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r316746 - head/share/examples/bhyve In-Reply-To: <201704130007.v3D07eQ9014409@repo.freebsd.org> To: Allan Jude Date: Thu, 13 Apr 2017 03:29:28 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 10:29:30 -0000 > Author: allanjude > Date: Thu Apr 13 00:07:39 2017 > New Revision: 316746 > URL: https://svnweb.freebsd.org/changeset/base/316746 > > Log: > Add UEFI support to vmrun.sh > > Adds: > -E: Use UEFI mode > -f: path to UEFI firmware image (default: path to uefi-edk2-bhyve package) > -F: UEFI framebuffer size (default: w=1024,h=768) > -L: IP to listen for VNC connections on (default: 127.0.0.1) > -P: Port to listen for VNC connections on (default: 5900) > -T: Enable tablnet device (for VNC) > -v: Wait for VNC client before booting VM > > Submitted by: Shawn Webb > MFC after: 2 weeks > Relnotes: yes > Differential Revision: https://reviews.freebsd.org/D10378 This spent 15 minutes in differtial? Something is wrong if that is how we use the diffential process. That isnt even enough time for someone to have reacted to a notice this was there. We do mailing list CC: for bugzilla for when bugs are related to areas, do we do anything like that in reviews.freebsd.org? Or just the projects lists? As a general not I dont think we want vmrun.sh to become a too relied upon way to start bhyve vm's, a million options to this and you still wont have it doing what needs done, and the more we add to this the more we are going to have to keep it around and support it. I would like to see vmrun.sh go away sooner rather than later with the use of config files. > Modified: > head/share/examples/bhyve/vmrun.sh > > Modified: head/share/examples/bhyve/vmrun.sh > ============================================================================== > --- head/share/examples/bhyve/vmrun.sh Wed Apr 12 21:37:12 2017 (r316745) > +++ head/share/examples/bhyve/vmrun.sh Thu Apr 13 00:07:39 2017 (r316746) > @@ -46,10 +46,12 @@ errmsg() { > usage() { > local msg=$1 > > - echo "Usage: vmrun.sh [-ahi] [-c ] [-C ] [-d ]" > - echo " [-e ] [-g ] [-H ]" > + echo "Usage: vmrun.sh [-aEhiTv] [-c ] [-C ] [-d ]" > + echo " [-e ] [-f ] [-F ]" > + echo " [-g ] [-H ]" > echo " [-I ] [-l ]" > - echo " [-m ] [-t ] " > + echo " [-L ]" > + echo " [-m ] [-P ] [-t ] " > echo "" > echo " -h: display this help message" > echo " -a: force memory mapped local APIC access" > @@ -57,15 +59,22 @@ usage() { > echo " -C: console device (default is ${DEFAULT_CONSOLE})" > echo " -d: virtio diskdev file (default is ${DEFAULT_VIRTIO_DISK})" > echo " -e: set FreeBSD loader environment variable" > + echo " -E: Use UEFI mode" > + echo " -f: Use a specific UEFI firmware" > + echo " -F: Use a custom UEFI GOP framebuffer size (default: w=1024,h=768)" > echo " -g: listen for connection from kgdb at " > echo " -H: host filesystem to export to the loader" > echo " -i: force boot of the Installation CDROM image" > echo " -I: Installation CDROM image location (default is ${DEFAULT_ISOFILE})" > echo " -l: the OS loader to use (default is /boot/userboot.so)" > + echo " -L: IP address for UEFI GOP VNC server (default: 127.0.0.1)" > echo " -m: memory size (default is ${DEFAULT_MEMSIZE})" > echo " -p: pass-through a host PCI device at bus/slot/func (e.g. 10/0/0)" > + echo " -P: UEFI GOP VNC port (default: 5900)" > echo " -t: tap device for virtio-net (default is $DEFAULT_TAPDEV)" > + echo " -T: Enable tablet device (for UEFI GOP)" > echo " -u: RTC keeps UTC time" > + echo " -v: Wait for VNC client connection before booting VM" > echo " -w: ignore unimplemented MSRs" > echo "" > [ -n "$msg" ] && errmsg "$msg" > @@ -95,7 +104,16 @@ loader_opt="" > bhyverun_opt="-H -A -P" > pass_total=0 > > -while getopts ac:C:d:e:g:hH:iI:l:m:p:t:uw c ; do > +# EFI-specific options > +efi_mode=0 > +efi_firmware="/usr/local/share/uefi-firmware/BHYVE_UEFI.fd" Hard coding /usr/local in the base system is not a good idea, as far as I know this has never been acceptable as the user is allowed to load ports to any PREFIX they prefer. > +vncwait="" > +vnchost="127.0.0.1" > +vncport=5900 > +fbsize="w=1024,h=768" These already have defaults inside the binaries, duplicating them here only leads to maintanance issues. > +tablet="" > + > +while getopts ac:C:d:e:Ef:F:g:hH:iI:l:m:p:P:t:Tuvw c ; do > case $c in > a) > bhyverun_opt="${bhyverun_opt} -a" > @@ -116,6 +134,15 @@ while getopts ac:C:d:e:g:hH:iI:l:m:p:t:u > e) > loader_opt="${loader_opt} -e ${OPTARG}" > ;; > + E) > + efi_mode=1 > + ;; > + f) > + efi_firmware="${OPTARG}" > + ;; > + F) > + fbsize="${OPTARG}" > + ;; > g) > gdbport=${OPTARG} > ;; > @@ -131,6 +158,9 @@ while getopts ac:C:d:e:g:hH:iI:l:m:p:t:u > l) > loader_opt="${loader_opt} -l ${OPTARG}" > ;; > + L) > + vnchost="${OPTARG}" > + ;; > m) > memsize=${OPTARG} > ;; > @@ -138,13 +168,22 @@ while getopts ac:C:d:e:g:hH:iI:l:m:p:t:u > eval "pass_dev${pass_total}=\"${OPTARG}\"" > pass_total=$(($pass_total + 1)) > ;; > + P) > + vncport="${OPTARG}" > + ;; > t) > eval "tap_dev${tap_total}=\"${OPTARG}\"" > tap_total=$(($tap_total + 1)) > ;; > + T) > + tablet="-s 30,xhci,tablet" > + ;; > u) > bhyverun_opt="${bhyverun_opt} -u" > ;; > + v) > + vncwait=",wait" > + ;; > w) > bhyverun_opt="${bhyverun_opt} -w" > ;; > @@ -181,6 +220,13 @@ if [ ${pass_total} -gt 0 ]; then > bhyverun_opt="${bhyverun_opt} -S" > fi > > +if [ ${efi_mode} -gt 0 ]; then > + if [ ! -f ${efi_firmware} ]; then > + echo "Error: EFI Firmware ${efi_firmware} doesn't exist. Try: pkg install uefi-edk2-bhyve" Not sure if it is a good idea to make recomendations that well probably outdate faster than releases, and uefi-edk2 is not the only optional firmware we can load, iirc. > + exit 1 > + fi > +fi > + > make_and_check_diskdev() > { > local virtio_diskdev="$1" > @@ -243,11 +289,13 @@ while [ 1 ]; do > installer_opt="" > fi > > - ${LOADER} -c ${console} -m ${memsize} ${BOOTDISKS} ${loader_opt} \ > - ${vmname} > - bhyve_exit=$? > - if [ $bhyve_exit -ne 0 ]; then > - break > + if [ ${efi_mode} -eq 0 ]; then > + ${LOADER} -c ${console} -m ${memsize} ${BOOTDISKS} ${loader_opt} \ > + ${vmname} > + bhyve_exit=$? > + if [ $bhyve_exit -ne 0 ]; then > + break > + fi > fi > > # > @@ -281,10 +329,18 @@ while [ 1 ]; do > i=$(($i + 1)) > done > > + efiargs="" > + if [ ${efi_mode} -gt 0 ]; then > + efiargs="-s 29,fbuf,tcp=${vnchost}:${vncport},${fbsize}${vncwait}" This can be recoded so that if the user does not set vnchost, vncport, fbsize, vncwait these are nulled and the defaults that already exist in the binary are used. > + efiargs="${efiargs} -l bootrom,${efi_firmware}" > + efiargs="${efiargs} ${tablet}" > + fi > + > ${FBSDRUN} -c ${cpus} -m ${memsize} ${bhyverun_opt} \ > -g ${gdbport} \ > -s 0:0,hostbridge \ > -s 1:0,lpc \ > + ${efiargs} \ > ${devargs} \ > -l com1,${console} \ > ${installer_opt} \ > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Thu Apr 13 11:56:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93DD4D3BD69; Thu, 13 Apr 2017 11:56:28 +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 4AA82B24; Thu, 13 Apr 2017 11:56:28 +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 v3DBuRdT008715; Thu, 13 Apr 2017 11:56:27 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3DBuRKI008713; Thu, 13 Apr 2017 11:56:27 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201704131156.v3DBuRKI008713@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 13 Apr 2017 11:56:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316755 - in head/sys/arm64: arm64 include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 11:56:28 -0000 Author: andrew Date: Thu Apr 13 11:56:27 2017 New Revision: 316755 URL: https://svnweb.freebsd.org/changeset/base/316755 Log: Add SCTLR bits added in ARMv8.1 and ARMv8.2 and start to use them in the early boot code. Sponsored by: DARPA, AFRL Modified: head/sys/arm64/arm64/locore.S head/sys/arm64/include/armreg.h Modified: head/sys/arm64/arm64/locore.S ============================================================================== --- head/sys/arm64/arm64/locore.S Thu Apr 13 09:59:12 2017 (r316754) +++ head/sys/arm64/arm64/locore.S Thu Apr 13 11:56:27 2017 (r316755) @@ -626,12 +626,13 @@ tcr: TCR_CACHE_ATTRS | TCR_SMP_ATTRS) sctlr_set: /* Bits to set */ - .quad (SCTLR_UCI | SCTLR_nTWE | SCTLR_nTWI | SCTLR_UCT | SCTLR_DZE | \ + .quad (SCTLR_LSMAOE | SCTLR_nTLSMD | SCTLR_UCI | SCTLR_SPAN | \ + SCTLR_nTWE | SCTLR_nTWI | SCTLR_UCT | SCTLR_DZE | \ SCTLR_I | SCTLR_SED | SCTLR_SA0 | SCTLR_SA | SCTLR_C | SCTLR_M) sctlr_clear: /* Bits to clear */ - .quad (SCTLR_EE | SCTLR_EOE | SCTLR_WXN | SCTLR_UMA | SCTLR_ITD | \ - SCTLR_THEE | SCTLR_CP15BEN | SCTLR_A) + .quad (SCTLR_EE | SCTLR_EOE | SCTLR_IESB | SCTLR_WXN | SCTLR_UMA | \ + SCTLR_ITD | SCTLR_THEE | SCTLR_CP15BEN | SCTLR_A) .globl abort abort: Modified: head/sys/arm64/include/armreg.h ============================================================================== --- head/sys/arm64/include/armreg.h Thu Apr 13 09:59:12 2017 (r316754) +++ head/sys/arm64/include/armreg.h Thu Apr 13 11:56:27 2017 (r316755) @@ -384,8 +384,8 @@ #define PAR_S_MASK (0x1 << PAR_S_SHIFT) /* SCTLR_EL1 - System Control Register */ -#define SCTLR_RES0 0xc8222400 /* Reserved, write 0 */ -#define SCTLR_RES1 0x30d00800 /* Reserved, write 1 */ +#define SCTLR_RES0 0xc8222400 /* Reserved ARMv8.0, write 0 */ +#define SCTLR_RES1 0x30d00800 /* Reserved ARMv8.0, write 1 */ #define SCTLR_M 0x00000001 #define SCTLR_A 0x00000002 @@ -403,9 +403,13 @@ #define SCTLR_nTWI 0x00010000 #define SCTLR_nTWE 0x00040000 #define SCTLR_WXN 0x00080000 +#define SCTLR_IESB 0x00200000 +#define SCTLR_SPAN 0x00800000 #define SCTLR_EOE 0x01000000 #define SCTLR_EE 0x02000000 #define SCTLR_UCI 0x04000000 +#define SCTLR_nTLSMD 0x10000000 +#define SCTLR_LSMAOE 0x20000000 /* SPSR_EL1 */ /* From owner-svn-src-head@freebsd.org Thu Apr 13 13:46:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59884D3BC1B; Thu, 13 Apr 2017 13:46:03 +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 1CA86F88; Thu, 13 Apr 2017 13:46:03 +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 v3DDk2JM053444; Thu, 13 Apr 2017 13:46:02 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3DDk1hQ053436; Thu, 13 Apr 2017 13:46:01 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201704131346.v3DDk1hQ053436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 13 Apr 2017 13:46:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316756 - in head/sys/arm64: arm64 include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 13:46:03 -0000 Author: andrew Date: Thu Apr 13 13:46:01 2017 New Revision: 316756 URL: https://svnweb.freebsd.org/changeset/base/316756 Log: In ARMv8.1 ARM has added a process state bit to disable access to userspace from the kernel. Make use of this to restrict accessing userspace to just the functions that explicitly handle crossing the user kernel boundary. Reported by: kib Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D10371 Modified: head/sys/arm64/arm64/copyinout.S head/sys/arm64/arm64/machdep.c head/sys/arm64/arm64/mp_machdep.c head/sys/arm64/arm64/support.S head/sys/arm64/include/armreg.h head/sys/arm64/include/asm.h head/sys/arm64/include/cpufunc.h Modified: head/sys/arm64/arm64/copyinout.S ============================================================================== --- head/sys/arm64/arm64/copyinout.S Thu Apr 13 11:56:27 2017 (r316755) +++ head/sys/arm64/arm64/copyinout.S Thu Apr 13 13:46:01 2017 (r316756) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); */ ENTRY(copyio_fault) SET_FAULT_HANDLER(xzr, x1) /* Clear the handler */ + EXIT_USER_ACCESS_CHECK(w0, x1) copyio_fault_nopcb: mov x0, #EFAULT ret @@ -99,6 +100,7 @@ ENTRY(copyinstr) adr x6, copyio_fault /* Get the handler address */ SET_FAULT_HANDLER(x6, x7) /* Set the handler */ + ENTER_USER_ACCESS(w6, x7) ldr x7, =VM_MAXUSER_ADDRESS 1: cmp x0, x7 @@ -111,7 +113,9 @@ ENTRY(copyinstr) sub x2, x2, #1 /* len-- */ cbnz x2, 1b -2: SET_FAULT_HANDLER(xzr, x7) /* Clear the handler */ +2: EXIT_USER_ACCESS(w6) + SET_FAULT_HANDLER(xzr, x7) /* Clear the handler */ + 3: cbz x3, 4f /* Check if done != NULL */ str x5, [x3] /* done = count */ @@ -145,7 +149,7 @@ END(copyinstr) copycommon: adr x6, copyio_fault /* Get the handler address */ SET_FAULT_HANDLER(x6, x7) /* Set the handler */ - + ENTER_USER_ACCESS(w6, x7) /* Check alignment */ orr x3, x0, x1 @@ -214,6 +218,7 @@ last_byte: strb w3, [x1] ending: + EXIT_USER_ACCESS_CHECK(w6, x7) SET_FAULT_HANDLER(xzr, x7) /* Clear the handler */ mov x0, xzr /* return 0 */ Modified: head/sys/arm64/arm64/machdep.c ============================================================================== --- head/sys/arm64/arm64/machdep.c Thu Apr 13 11:56:27 2017 (r316755) +++ head/sys/arm64/arm64/machdep.c Thu Apr 13 13:46:01 2017 (r316756) @@ -118,6 +118,7 @@ int64_t dcache_line_size; /* The minimum int64_t icache_line_size; /* The minimum I cache line size */ int64_t idcache_line_size; /* The minimum cache line size */ int64_t dczva_line_size; /* The size of cache line the dc zva zeroes */ +int has_pan; /* pagezero_* implementations are provided in support.S */ void pagezero_simple(void *); @@ -127,6 +128,37 @@ void pagezero_cache(void *); void (*pagezero)(void *p) = pagezero_simple; static void +pan_setup(void) +{ + uint64_t id_aa64mfr1; + + id_aa64mfr1 = READ_SPECIALREG(id_aa64mmfr1_el1); + if (ID_AA64MMFR1_PAN(id_aa64mfr1) != ID_AA64MMFR1_PAN_NONE) + has_pan = 1; +} + +void +pan_enable(void) +{ + + /* + * The LLVM integrated assembler doesn't understand the PAN + * PSTATE field. Because of this we need to manually create + * the instruction in an asm block. This is equivalent to: + * msr pan, #1 + * + * This sets the PAN bit, stopping the kernel from accessing + * memory when userspace can also access it unless the kernel + * uses the userspace load/store instructions. + */ + if (has_pan) { + WRITE_SPECIALREG(sctlr_el1, + READ_SPECIALREG(sctlr_el1) & ~SCTLR_SPAN); + __asm __volatile(".inst 0xd500409f | (0x1 << 8)"); + } +} + +static void cpu_startup(void *dummy) { @@ -997,6 +1029,7 @@ initarm(struct arm64_bootparams *abp) init_param1(); cache_setup(); + pan_setup(); /* Bootstrap enough of pmap to enter the kernel proper */ pmap_bootstrap(abp->kern_l0pt, abp->kern_l1pt, @@ -1019,6 +1052,7 @@ initarm(struct arm64_bootparams *abp) dbg_monitor_init(); kdb_init(); + pan_enable(); early_boot = 0; } Modified: head/sys/arm64/arm64/mp_machdep.c ============================================================================== --- head/sys/arm64/arm64/mp_machdep.c Thu Apr 13 11:56:27 2017 (r316755) +++ head/sys/arm64/arm64/mp_machdep.c Thu Apr 13 13:46:01 2017 (r316756) @@ -272,6 +272,7 @@ init_secondary(uint64_t cpu) #endif dbg_monitor_init(); + pan_enable(); /* Enable interrupts */ intr_enable(); Modified: head/sys/arm64/arm64/support.S ============================================================================== --- head/sys/arm64/arm64/support.S Thu Apr 13 11:56:27 2017 (r316755) +++ head/sys/arm64/arm64/support.S Thu Apr 13 13:46:01 2017 (r316756) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); */ ENTRY(fsu_fault) SET_FAULT_HANDLER(xzr, x1) /* Reset the handler function */ + EXIT_USER_ACCESS_CHECK(w0, x1) fsu_fault_nopcb: mov x0, #-1 ret @@ -57,11 +58,13 @@ ENTRY(casueword32) b.cs fsu_fault_nopcb adr x6, fsu_fault /* Load the fault handler */ SET_FAULT_HANDLER(x6, x4) /* And set it */ + ENTER_USER_ACCESS(w6, x4) 1: ldxr w4, [x0] /* Load-exclusive the data */ cmp w4, w1 /* Compare */ b.ne 2f /* Not equal, exit */ stxr w5, w3, [x0] /* Store the new data */ cbnz w5, 1b /* Retry on failure */ + EXIT_USER_ACCESS(w6) 2: SET_FAULT_HANDLER(xzr, x5) /* Reset the fault handler */ str w4, [x2] /* Store the read data */ mov x0, #0 /* Success */ @@ -77,11 +80,13 @@ ENTRY(casueword) b.cs fsu_fault_nopcb adr x6, fsu_fault /* Load the fault handler */ SET_FAULT_HANDLER(x6, x4) /* And set it */ + ENTER_USER_ACCESS(w6, x4) 1: ldxr x4, [x0] /* Load-exclusive the data */ cmp x4, x1 /* Compare */ b.ne 2f /* Not equal, exit */ stxr w5, x3, [x0] /* Store the new data */ cbnz w5, 1b /* Retry on failure */ + EXIT_USER_ACCESS(w6) 2: SET_FAULT_HANDLER(xzr, x5) /* Reset the fault handler */ str x4, [x2] /* Store the read data */ mov x0, #0 /* Success */ @@ -224,6 +229,7 @@ END(suword) */ ENTRY(fsu_intr_fault) SET_FAULT_HANDLER(xzr, x1) /* Reset the handler function */ + EXIT_USER_ACCESS_CHECK(w0, x1) mov x0, #-1 ret END(fsu_fault) Modified: head/sys/arm64/include/armreg.h ============================================================================== --- head/sys/arm64/include/armreg.h Thu Apr 13 11:56:27 2017 (r316755) +++ head/sys/arm64/include/armreg.h Thu Apr 13 13:46:01 2017 (r316756) @@ -312,6 +312,7 @@ #define ID_AA64MMFR1_PAN(x) ((x) & ID_AA64MMFR1_PAN_MASK) #define ID_AA64MMFR1_PAN_NONE (0x0 << ID_AA64MMFR1_PAN_SHIFT) #define ID_AA64MMFR1_PAN_IMPL (0x1 << ID_AA64MMFR1_PAN_SHIFT) +#define ID_AA64MMFR1_PAN_ATS1E1 (0x2 << ID_AA64MMFR1_PAN_SHIFT) /* ID_AA64PFR0_EL1 */ #define ID_AA64PFR0_MASK 0x0fffffff Modified: head/sys/arm64/include/asm.h ============================================================================== --- head/sys/arm64/include/asm.h Thu Apr 13 11:56:27 2017 (r316755) +++ head/sys/arm64/include/asm.h Thu Apr 13 13:46:01 2017 (r316756) @@ -71,4 +71,23 @@ ldr tmp, [tmp, #TD_PCB]; /* Load the pcb */ \ str handler, [tmp, #PCB_ONFAULT] /* Set the handler */ +#define ENTER_USER_ACCESS(reg, tmp) \ + ldr tmp, =has_pan; /* Get the addr of has_pan */ \ + ldr reg, [tmp]; /* Read it */ \ + cbz reg, 997f; /* If no PAN skip */ \ + .inst 0xd500409f | (0 << 8); /* Clear PAN */ \ + 997: + +#define EXIT_USER_ACCESS(reg) \ + cbz reg, 998f; /* If no PAN skip */ \ + .inst 0xd500409f | (1 << 8); /* Set PAN */ \ + 998: + +#define EXIT_USER_ACCESS_CHECK(reg, tmp) \ + ldr tmp, =has_pan; /* Get the addr of has_pan */ \ + ldr reg, [tmp]; /* Read it */ \ + cbz reg, 999f; /* If no PAN skip */ \ + .inst 0xd500409f | (1 << 8); /* Set PAN */ \ + 999: + #endif /* _MACHINE_ASM_H_ */ Modified: head/sys/arm64/include/cpufunc.h ============================================================================== --- head/sys/arm64/include/cpufunc.h Thu Apr 13 11:56:27 2017 (r316755) +++ head/sys/arm64/include/cpufunc.h Thu Apr 13 13:46:01 2017 (r316756) @@ -33,6 +33,8 @@ #include +void pan_enable(void); + static __inline void breakpoint(void) { From owner-svn-src-head@freebsd.org Thu Apr 13 14:23:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74A8AD3CA34; Thu, 13 Apr 2017 14:23:28 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4423E29F; Thu, 13 Apr 2017 14:23:28 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3DENRGg069717; Thu, 13 Apr 2017 14:23:27 GMT (envelope-from kan@FreeBSD.org) Received: (from kan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3DENRiK069715; Thu, 13 Apr 2017 14:23:27 GMT (envelope-from kan@FreeBSD.org) Message-Id: <201704131423.v3DENRiK069715@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kan set sender to kan@FreeBSD.org using -f From: Alexander Kabaev Date: Thu, 13 Apr 2017 14:23:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316757 - in head/sys: arm/arm arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 14:23:28 -0000 Author: kan Date: Thu Apr 13 14:23:27 2017 New Revision: 316757 URL: https://svnweb.freebsd.org/changeset/base/316757 Log: Use proper fields to check for interrupt trigger mode. Modified: head/sys/arm/arm/gic.c head/sys/arm64/arm64/gic_v3.c Modified: head/sys/arm/arm/gic.c ============================================================================== --- head/sys/arm/arm/gic.c Thu Apr 13 13:46:01 2017 (r316756) +++ head/sys/arm/arm/gic.c Thu Apr 13 14:23:27 2017 (r316757) @@ -987,7 +987,7 @@ arm_gic_setup_intr(device_t dev, struct gi->gi_trig = trig; /* Edge triggered interrupts need an early EOI sent */ - if (gi->gi_pol == INTR_TRIGGER_EDGE) + if (gi->gi_trig == INTR_TRIGGER_EDGE) gi->gi_flags |= GI_FLAG_EARLY_EOI; } Modified: head/sys/arm64/arm64/gic_v3.c ============================================================================== --- head/sys/arm64/arm64/gic_v3.c Thu Apr 13 13:46:01 2017 (r316756) +++ head/sys/arm64/arm64/gic_v3.c Thu Apr 13 14:23:27 2017 (r316757) @@ -437,11 +437,11 @@ arm_gic_v3_intr(void *arg) #endif } else if (active_irq >= GIC_FIRST_PPI && active_irq <= GIC_LAST_SPI) { - if (gi->gi_pol == INTR_TRIGGER_EDGE) + if (gi->gi_trig == INTR_TRIGGER_EDGE) gic_icc_write(EOIR1, gi->gi_irq); if (intr_isrc_dispatch(&gi->gi_isrc, tf) != 0) { - if (gi->gi_pol != INTR_TRIGGER_EDGE) + if (gi->gi_trig != INTR_TRIGGER_EDGE) gic_icc_write(EOIR1, gi->gi_irq); gic_v3_disable_intr(sc->dev, &gi->gi_isrc); device_printf(sc->dev, @@ -781,7 +781,7 @@ gic_v3_post_filter(device_t dev, struct { struct gic_v3_irqsrc *gi = (struct gic_v3_irqsrc *)isrc; - if (gi->gi_pol == INTR_TRIGGER_EDGE) + if (gi->gi_trig == INTR_TRIGGER_EDGE) return; gic_icc_write(EOIR1, gi->gi_irq); From owner-svn-src-head@freebsd.org Thu Apr 13 14:40:50 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00F90D3CF08; Thu, 13 Apr 2017 14:40:50 +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 B89A9F1C; Thu, 13 Apr 2017 14:40: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 v3DEemmC074721; Thu, 13 Apr 2017 14:40:48 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3DEem18074719; Thu, 13 Apr 2017 14:40:48 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201704131440.v3DEem18074719@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 13 Apr 2017 14:40:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316758 - head/sys/dev/sound/pci/hda X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 14:40:50 -0000 Author: mav Date: Thu Apr 13 14:40:48 2017 New Revision: 316758 URL: https://svnweb.freebsd.org/changeset/base/316758 Log: Update list of Conexant and Realtek codecs. MFC after: 2 weeks Modified: head/sys/dev/sound/pci/hda/hdac.h head/sys/dev/sound/pci/hda/hdacc.c Modified: head/sys/dev/sound/pci/hda/hdac.h ============================================================================== --- head/sys/dev/sound/pci/hda/hdac.h Thu Apr 13 14:23:27 2017 (r316757) +++ head/sys/dev/sound/pci/hda/hdac.h Thu Apr 13 14:40:48 2017 (r316758) @@ -339,7 +339,13 @@ /* Realtek */ #define REALTEK_VENDORID 0x10ec #define HDA_CODEC_ALC221 HDA_CODEC_CONSTRUCT(REALTEK, 0x0221) +#define HDA_CODEC_ALC225 HDA_CODEC_CONSTRUCT(REALTEK, 0x0225) +#define HDA_CODEC_ALC231 HDA_CODEC_CONSTRUCT(REALTEK, 0x0231) #define HDA_CODEC_ALC233 HDA_CODEC_CONSTRUCT(REALTEK, 0x0233) +#define HDA_CODEC_ALC234 HDA_CODEC_CONSTRUCT(REALTEK, 0x0234) +#define HDA_CODEC_ALC235 HDA_CODEC_CONSTRUCT(REALTEK, 0x0235) +#define HDA_CODEC_ALC255 HDA_CODEC_CONSTRUCT(REALTEK, 0x0255) +#define HDA_CODEC_ALC256 HDA_CODEC_CONSTRUCT(REALTEK, 0x0256) #define HDA_CODEC_ALC260 HDA_CODEC_CONSTRUCT(REALTEK, 0x0260) #define HDA_CODEC_ALC262 HDA_CODEC_CONSTRUCT(REALTEK, 0x0262) #define HDA_CODEC_ALC267 HDA_CODEC_CONSTRUCT(REALTEK, 0x0267) @@ -348,8 +354,23 @@ #define HDA_CODEC_ALC270 HDA_CODEC_CONSTRUCT(REALTEK, 0x0270) #define HDA_CODEC_ALC272 HDA_CODEC_CONSTRUCT(REALTEK, 0x0272) #define HDA_CODEC_ALC273 HDA_CODEC_CONSTRUCT(REALTEK, 0x0273) +#define HDA_CODEC_ALC274 HDA_CODEC_CONSTRUCT(REALTEK, 0x0274) #define HDA_CODEC_ALC275 HDA_CODEC_CONSTRUCT(REALTEK, 0x0275) #define HDA_CODEC_ALC276 HDA_CODEC_CONSTRUCT(REALTEK, 0x0276) +#define HDA_CODEC_ALC280 HDA_CODEC_CONSTRUCT(REALTEK, 0x0280) +#define HDA_CODEC_ALC282 HDA_CODEC_CONSTRUCT(REALTEK, 0x0282) +#define HDA_CODEC_ALC283 HDA_CODEC_CONSTRUCT(REALTEK, 0x0283) +#define HDA_CODEC_ALC284 HDA_CODEC_CONSTRUCT(REALTEK, 0x0284) +#define HDA_CODEC_ALC285 HDA_CODEC_CONSTRUCT(REALTEK, 0x0285) +#define HDA_CODEC_ALC286 HDA_CODEC_CONSTRUCT(REALTEK, 0x0286) +#define HDA_CODEC_ALC288 HDA_CODEC_CONSTRUCT(REALTEK, 0x0288) +#define HDA_CODEC_ALC290 HDA_CODEC_CONSTRUCT(REALTEK, 0x0290) +#define HDA_CODEC_ALC292 HDA_CODEC_CONSTRUCT(REALTEK, 0x0292) +#define HDA_CODEC_ALC293 HDA_CODEC_CONSTRUCT(REALTEK, 0x0293) +#define HDA_CODEC_ALC294 HDA_CODEC_CONSTRUCT(REALTEK, 0x0294) +#define HDA_CODEC_ALC295 HDA_CODEC_CONSTRUCT(REALTEK, 0x0295) +#define HDA_CODEC_ALC298 HDA_CODEC_CONSTRUCT(REALTEK, 0x0298) +#define HDA_CODEC_ALC299 HDA_CODEC_CONSTRUCT(REALTEK, 0x0299) #define HDA_CODEC_ALC292 HDA_CODEC_CONSTRUCT(REALTEK, 0x0292) #define HDA_CODEC_ALC295 HDA_CODEC_CONSTRUCT(REALTEK, 0x0295) #define HDA_CODEC_ALC660 HDA_CODEC_CONSTRUCT(REALTEK, 0x0660) @@ -357,7 +378,11 @@ #define HDA_CODEC_ALC663 HDA_CODEC_CONSTRUCT(REALTEK, 0x0663) #define HDA_CODEC_ALC665 HDA_CODEC_CONSTRUCT(REALTEK, 0x0665) #define HDA_CODEC_ALC670 HDA_CODEC_CONSTRUCT(REALTEK, 0x0670) +#define HDA_CODEC_ALC671 HDA_CODEC_CONSTRUCT(REALTEK, 0x0671) #define HDA_CODEC_ALC680 HDA_CODEC_CONSTRUCT(REALTEK, 0x0680) +#define HDA_CODEC_ALC700 HDA_CODEC_CONSTRUCT(REALTEK, 0x0700) +#define HDA_CODEC_ALC701 HDA_CODEC_CONSTRUCT(REALTEK, 0x0701) +#define HDA_CODEC_ALC703 HDA_CODEC_CONSTRUCT(REALTEK, 0x0703) #define HDA_CODEC_ALC861 HDA_CODEC_CONSTRUCT(REALTEK, 0x0861) #define HDA_CODEC_ALC861VD HDA_CODEC_CONSTRUCT(REALTEK, 0x0862) #define HDA_CODEC_ALC880 HDA_CODEC_CONSTRUCT(REALTEK, 0x0880) @@ -370,6 +395,7 @@ #define HDA_CODEC_ALC892 HDA_CODEC_CONSTRUCT(REALTEK, 0x0892) #define HDA_CODEC_ALC899 HDA_CODEC_CONSTRUCT(REALTEK, 0x0899) #define HDA_CODEC_ALC1150 HDA_CODEC_CONSTRUCT(REALTEK, 0x0900) +#define HDA_CODEC_ALC1220 HDA_CODEC_CONSTRUCT(REALTEK, 0x1220) #define HDA_CODEC_ALCXXXX HDA_CODEC_CONSTRUCT(REALTEK, 0xffff) /* Motorola */ @@ -546,6 +572,17 @@ #define HDA_CODEC_CX20652 HDA_CODEC_CONSTRUCT(CONEXANT, 0x50ac) #define HDA_CODEC_CX20664 HDA_CODEC_CONSTRUCT(CONEXANT, 0x50b8) #define HDA_CODEC_CX20665 HDA_CODEC_CONSTRUCT(CONEXANT, 0x50b9) +#define HDA_CODEC_CX21722 HDA_CODEC_CONSTRUCT(CONEXANT, 0x50f1) +#define HDA_CODEC_CX20722 HDA_CODEC_CONSTRUCT(CONEXANT, 0x50f2) +#define HDA_CODEC_CX21724 HDA_CODEC_CONSTRUCT(CONEXANT, 0x50f3) +#define HDA_CODEC_CX20724 HDA_CODEC_CONSTRUCT(CONEXANT, 0x50f4) +#define HDA_CODEC_CX20751 HDA_CODEC_CONSTRUCT(CONEXANT, 0x510f) +#define HDA_CODEC_CX20751_2 HDA_CODEC_CONSTRUCT(CONEXANT, 0x5110) +#define HDA_CODEC_CX20753 HDA_CODEC_CONSTRUCT(CONEXANT, 0x5111) +#define HDA_CODEC_CX20755 HDA_CODEC_CONSTRUCT(CONEXANT, 0x5113) +#define HDA_CODEC_CX20756 HDA_CODEC_CONSTRUCT(CONEXANT, 0x5114) +#define HDA_CODEC_CX20757 HDA_CODEC_CONSTRUCT(CONEXANT, 0x5115) +#define HDA_CODEC_CX20952 HDA_CODEC_CONSTRUCT(CONEXANT, 0x51d7) #define HDA_CODEC_CXXXXX HDA_CODEC_CONSTRUCT(CONEXANT, 0xffff) /* VIA */ Modified: head/sys/dev/sound/pci/hda/hdacc.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdacc.c Thu Apr 13 14:23:27 2017 (r316757) +++ head/sys/dev/sound/pci/hda/hdacc.c Thu Apr 13 14:40:48 2017 (r316758) @@ -77,7 +77,13 @@ static const struct { { HDA_CODEC_CS4207, 0, "Cirrus Logic CS4207" }, { HDA_CODEC_CS4210, 0, "Cirrus Logic CS4210" }, { HDA_CODEC_ALC221, 0, "Realtek ALC221" }, + { HDA_CODEC_ALC225, 0, "Realtek ALC225" }, + { HDA_CODEC_ALC231, 0, "Realtek ALC231" }, { HDA_CODEC_ALC233, 0, "Realtek ALC233" }, + { HDA_CODEC_ALC234, 0, "Realtek ALC234" }, + { HDA_CODEC_ALC235, 0, "Realtek ALC235" }, + { HDA_CODEC_ALC255, 0, "Realtek ALC255" }, + { HDA_CODEC_ALC256, 0, "Realtek ALC256" }, { HDA_CODEC_ALC260, 0, "Realtek ALC260" }, { HDA_CODEC_ALC262, 0, "Realtek ALC262" }, { HDA_CODEC_ALC267, 0, "Realtek ALC267" }, @@ -86,17 +92,36 @@ static const struct { { HDA_CODEC_ALC270, 0, "Realtek ALC270" }, { HDA_CODEC_ALC272, 0, "Realtek ALC272" }, { HDA_CODEC_ALC273, 0, "Realtek ALC273" }, + { HDA_CODEC_ALC274, 0, "Realtek ALC274" }, { HDA_CODEC_ALC275, 0, "Realtek ALC275" }, { HDA_CODEC_ALC276, 0, "Realtek ALC276" }, { HDA_CODEC_ALC292, 0, "Realtek ALC292" }, { HDA_CODEC_ALC295, 0, "Realtek ALC295" }, + { HDA_CODEC_ALC280, 0, "Realtek ALC280" }, + { HDA_CODEC_ALC282, 0, "Realtek ALC282" }, + { HDA_CODEC_ALC283, 0, "Realtek ALC283" }, + { HDA_CODEC_ALC284, 0, "Realtek ALC284" }, + { HDA_CODEC_ALC285, 0, "Realtek ALC285" }, + { HDA_CODEC_ALC286, 0, "Realtek ALC286" }, + { HDA_CODEC_ALC288, 0, "Realtek ALC288" }, + { HDA_CODEC_ALC290, 0, "Realtek ALC290" }, + { HDA_CODEC_ALC292, 0, "Realtek ALC292" }, + { HDA_CODEC_ALC293, 0, "Realtek ALC293" }, + { HDA_CODEC_ALC294, 0, "Realtek ALC294" }, + { HDA_CODEC_ALC295, 0, "Realtek ALC295" }, + { HDA_CODEC_ALC298, 0, "Realtek ALC298" }, + { HDA_CODEC_ALC299, 0, "Realtek ALC299" }, { HDA_CODEC_ALC660, 0, "Realtek ALC660-VD" }, { HDA_CODEC_ALC662, 0x0002, "Realtek ALC662 rev2" }, { HDA_CODEC_ALC662, 0, "Realtek ALC662" }, { HDA_CODEC_ALC663, 0, "Realtek ALC663" }, { HDA_CODEC_ALC665, 0, "Realtek ALC665" }, { HDA_CODEC_ALC670, 0, "Realtek ALC670" }, + { HDA_CODEC_ALC671, 0, "Realtek ALC671" }, { HDA_CODEC_ALC680, 0, "Realtek ALC680" }, + { HDA_CODEC_ALC700, 0, "Realtek ALC700" }, + { HDA_CODEC_ALC701, 0, "Realtek ALC701" }, + { HDA_CODEC_ALC703, 0, "Realtek ALC703" }, { HDA_CODEC_ALC861, 0x0340, "Realtek ALC660" }, { HDA_CODEC_ALC861, 0, "Realtek ALC861" }, { HDA_CODEC_ALC861VD, 0, "Realtek ALC861-VD" }, @@ -113,6 +138,7 @@ static const struct { { HDA_CODEC_ALC892, 0, "Realtek ALC892" }, { HDA_CODEC_ALC899, 0, "Realtek ALC899" }, { HDA_CODEC_ALC1150, 0, "Realtek ALC1150" }, + { HDA_CODEC_ALC1220, 0, "Realtek ALC1220" }, { HDA_CODEC_AD1882, 0, "Analog Devices AD1882" }, { HDA_CODEC_AD1882A, 0, "Analog Devices AD1882A" }, { HDA_CODEC_AD1883, 0, "Analog Devices AD1883" }, @@ -248,6 +274,17 @@ static const struct { { HDA_CODEC_CX20652, 0, "Conexant CX20652" }, { HDA_CODEC_CX20664, 0, "Conexant CX20664" }, { HDA_CODEC_CX20665, 0, "Conexant CX20665" }, + { HDA_CODEC_CX21722, 0, "Conexant CX21722" }, + { HDA_CODEC_CX20722, 0, "Conexant CX20722" }, + { HDA_CODEC_CX21724, 0, "Conexant CX21724" }, + { HDA_CODEC_CX20724, 0, "Conexant CX20724" }, + { HDA_CODEC_CX20751, 0, "Conexant CX20751/2" }, + { HDA_CODEC_CX20751_2, 0, "Conexant CX20751/2" }, + { HDA_CODEC_CX20753, 0, "Conexant CX20753/4" }, + { HDA_CODEC_CX20755, 0, "Conexant CX20755" }, + { HDA_CODEC_CX20756, 0, "Conexant CX20756" }, + { HDA_CODEC_CX20757, 0, "Conexant CX20757" }, + { HDA_CODEC_CX20952, 0, "Conexant CX20952" }, { HDA_CODEC_VT1708_8, 0, "VIA VT1708_8" }, { HDA_CODEC_VT1708_9, 0, "VIA VT1708_9" }, { HDA_CODEC_VT1708_A, 0, "VIA VT1708_A" }, From owner-svn-src-head@freebsd.org Thu Apr 13 14:44:18 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2FBFD3B10B; Thu, 13 Apr 2017 14:44:18 +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 A4C981332; Thu, 13 Apr 2017 14:44:18 +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 v3DEiHwB078659; Thu, 13 Apr 2017 14:44:17 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3DEiHUX078655; Thu, 13 Apr 2017 14:44:17 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201704131444.v3DEiHUX078655@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 13 Apr 2017 14:44:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316759 - in head: lib/libipsec sbin/setkey sys/netipsec X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 14:44:18 -0000 Author: ae Date: Thu Apr 13 14:44:17 2017 New Revision: 316759 URL: https://svnweb.freebsd.org/changeset/base/316759 Log: Add large replay widow support to setkey(8) and libipsec. When the replay window size is large than UINT8_MAX, add to the request the SADB_X_EXT_SA_REPLAY extension header that was added in r309144. Also add support of SADB_X_EXT_NAT_T_TYPE, SADB_X_EXT_NAT_T_SPORT, SADB_X_EXT_NAT_T_DPORT, SADB_X_EXT_NAT_T_OAI, SADB_X_EXT_NAT_T_OAR, SADB_X_EXT_SA_REPLAY, SADB_X_EXT_NEW_ADDRESS_SRC, SADB_X_EXT_NEW_ADDRESS_DST extension headers to the key_debug that is used by `setkey -x`. Modify kdebug_sockaddr() to use inet_ntop() for IP addresses formatting. And modify kdebug_sadb_x_policy() to show policy scope and priority. Reviewed by: gnn, Emeric Poupon MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D10375 Modified: head/lib/libipsec/pfkey.c head/sbin/setkey/Makefile head/sbin/setkey/parse.y head/sys/netipsec/key_debug.c Modified: head/lib/libipsec/pfkey.c ============================================================================== --- head/lib/libipsec/pfkey.c Thu Apr 13 14:40:48 2017 (r316758) +++ head/lib/libipsec/pfkey.c Thu Apr 13 14:44:17 2017 (r316759) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -69,6 +70,7 @@ static caddr_t pfkey_setsadbmsg(caddr_t, u_int, u_int32_t, pid_t); static caddr_t pfkey_setsadbsa(caddr_t, caddr_t, u_int32_t, u_int, u_int, u_int, u_int32_t); +static caddr_t pfkey_setsadbxreplay(caddr_t, caddr_t, uint32_t); static caddr_t pfkey_setsadbaddr(caddr_t, caddr_t, u_int, struct sockaddr *, u_int, u_int); static caddr_t pfkey_setsadbkey(caddr_t, caddr_t, u_int, caddr_t, u_int); @@ -1196,6 +1198,13 @@ pfkey_send_x1(so, type, satype, mode, sr + sizeof(struct sadb_lifetime) + sizeof(struct sadb_lifetime); + if (wsize > UINT8_MAX) { + if (wsize > (UINT32_MAX - 32) >> 3) { + __ipsec_errcode = EIPSEC_INVAL_ARGUMENT; + return (-1); + } + len += sizeof(struct sadb_x_sa_replay); + } if (e_type != SADB_EALG_NONE) len += (sizeof(struct sadb_key) + PFKEY_ALIGN8(e_keylen)); if (a_type != SADB_AALG_NONE) @@ -1223,6 +1232,13 @@ pfkey_send_x1(so, type, satype, mode, sr free(newmsg); return -1; } + if (wsize > UINT8_MAX) { + p = pfkey_setsadbxreplay(p, ep, wsize); + if (!p) { + free(newmsg); + return (-1); + } + } p = pfkey_setsadbaddr(p, ep, SADB_EXT_ADDRESS_SRC, src, plen, IPSEC_ULPROTO_ANY); if (!p) { @@ -1982,7 +1998,7 @@ pfkey_setsadbsa(buf, lim, spi, wsize, au p->sadb_sa_len = PFKEY_UNIT64(len); p->sadb_sa_exttype = SADB_EXT_SA; p->sadb_sa_spi = spi; - p->sadb_sa_replay = wsize; + p->sadb_sa_replay = wsize > UINT8_MAX ? UINT8_MAX: wsize; p->sadb_sa_state = SADB_SASTATE_LARVAL; p->sadb_sa_auth = auth; p->sadb_sa_encrypt = enc; @@ -1992,6 +2008,31 @@ pfkey_setsadbsa(buf, lim, spi, wsize, au } /* + * Set data into sadb_x_sa_replay. + * `buf' must has been allocated sufficiently. + */ +static caddr_t +pfkey_setsadbxreplay(caddr_t buf, caddr_t lim, uint32_t wsize) +{ + struct sadb_x_sa_replay *p; + u_int len; + + p = (struct sadb_x_sa_replay *)buf; + len = sizeof(struct sadb_x_sa_replay); + + if (buf + len > lim) + return (NULL); + + memset(p, 0, len); + p->sadb_x_sa_replay_len = PFKEY_UNIT64(len); + p->sadb_x_sa_replay_exttype = SADB_X_EXT_SA_REPLAY; + /* Convert wsize from bytes to number of packets. */ + p->sadb_x_sa_replay_replay = wsize << 3; + + return (buf + len); +} + +/* * set data into sadb_address. * `buf' must has been allocated sufficiently. * prefixlen is in bits. Modified: head/sbin/setkey/Makefile ============================================================================== --- head/sbin/setkey/Makefile Thu Apr 13 14:40:48 2017 (r316758) +++ head/sbin/setkey/Makefile Thu Apr 13 14:44:17 2017 (r316759) @@ -51,6 +51,9 @@ CFLAGS+= -I${SRCTOP}/sys SRCS+= y.tab.h y.tab.h: parse.y CFLAGS+= -DIPSEC_DEBUG -DYY_NO_UNPUT +.if ${MK_INET_SUPPORT} != "no" +CFLAGS+= -DINET +.endif .if ${MK_INET6_SUPPORT} != "no" CFLAGS+= -DINET6 .endif Modified: head/sbin/setkey/parse.y ============================================================================== --- head/sbin/setkey/parse.y Thu Apr 13 14:40:48 2017 (r316758) +++ head/sbin/setkey/parse.y Thu Apr 13 14:44:17 2017 (r316759) @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -513,6 +514,8 @@ extension return -1; } p_replay = $2; + if (p_replay > (UINT32_MAX - 32) >> 3) + yyerror("replay window is too large"); } | F_LIFETIME_HARD DECSTRING { p_lt_hard = $2; } | F_LIFETIME_SOFT DECSTRING { p_lt_soft = $2; } @@ -899,6 +902,7 @@ setkeymsg_addr(type, satype, srcs, dsts, int l, l0, len; struct sadb_sa m_sa; struct sadb_x_sa2 m_sa2; + struct sadb_x_sa_replay m_replay; struct sadb_address m_addr; struct addrinfo *s, *d; int n; @@ -920,7 +924,8 @@ setkeymsg_addr(type, satype, srcs, dsts, m_sa.sadb_sa_len = PFKEY_UNIT64(len); m_sa.sadb_sa_exttype = SADB_EXT_SA; m_sa.sadb_sa_spi = htonl(p_spi); - m_sa.sadb_sa_replay = p_replay; + m_sa.sadb_sa_replay = p_replay > UINT8_MAX ? UINT8_MAX: + p_replay; m_sa.sadb_sa_state = 0; m_sa.sadb_sa_auth = p_alg_auth; m_sa.sadb_sa_encrypt = p_alg_enc; @@ -937,6 +942,17 @@ setkeymsg_addr(type, satype, srcs, dsts, memcpy(buf + l, &m_sa2, len); l += len; + + if (p_replay > UINT8_MAX) { + len = sizeof(struct sadb_x_sa_replay); + m_replay.sadb_x_sa_replay_len = PFKEY_UNIT64(len); + m_replay.sadb_x_sa_replay_exttype = + SADB_X_EXT_SA_REPLAY; + m_replay.sadb_x_sa_replay_replay = p_replay << 3; + + memcpy(buf + l, &m_replay, len); + l += len; + } } l0 = l; @@ -1017,6 +1033,7 @@ setkeymsg_add(type, satype, srcs, dsts) struct sadb_sa m_sa; struct sadb_x_sa2 m_sa2; struct sadb_address m_addr; + struct sadb_x_sa_replay m_replay; struct addrinfo *s, *d; int n; int plen; @@ -1100,7 +1117,7 @@ setkeymsg_add(type, satype, srcs, dsts) m_sa.sadb_sa_len = PFKEY_UNIT64(len); m_sa.sadb_sa_exttype = SADB_EXT_SA; m_sa.sadb_sa_spi = htonl(p_spi); - m_sa.sadb_sa_replay = p_replay; + m_sa.sadb_sa_replay = p_replay > UINT8_MAX ? UINT8_MAX: p_replay; m_sa.sadb_sa_state = 0; m_sa.sadb_sa_auth = p_alg_auth; m_sa.sadb_sa_encrypt = p_alg_enc; @@ -1118,6 +1135,15 @@ setkeymsg_add(type, satype, srcs, dsts) memcpy(buf + l, &m_sa2, len); l += len; + if (p_replay > UINT8_MAX) { + len = sizeof(struct sadb_x_sa_replay); + m_replay.sadb_x_sa_replay_len = PFKEY_UNIT64(len); + m_replay.sadb_x_sa_replay_exttype = SADB_X_EXT_SA_REPLAY; + m_replay.sadb_x_sa_replay_replay = p_replay << 3; + + memcpy(buf + l, &m_replay, len); + l += len; + } l0 = l; n = 0; Modified: head/sys/netipsec/key_debug.c ============================================================================== --- head/sys/netipsec/key_debug.c Thu Apr 13 14:40:48 2017 (r316758) +++ head/sys/netipsec/key_debug.c Thu Apr 13 14:44:17 2017 (r316759) @@ -63,6 +63,7 @@ #include #include #include +#include #endif /* !_KERNEL */ static void kdebug_sadb_prop(struct sadb_ext *); @@ -73,6 +74,8 @@ static void kdebug_sadb_sa(struct sadb_e static void kdebug_sadb_address(struct sadb_ext *); static void kdebug_sadb_key(struct sadb_ext *); static void kdebug_sadb_x_sa2(struct sadb_ext *); +static void kdebug_sadb_x_sa_replay(struct sadb_ext *); +static void kdebug_sadb_x_natt(struct sadb_ext *); #ifdef _KERNEL static void kdebug_secreplay(struct secreplay *); @@ -131,6 +134,10 @@ kdebug_sadb(struct sadb_msg *base) case SADB_EXT_ADDRESS_SRC: case SADB_EXT_ADDRESS_DST: case SADB_EXT_ADDRESS_PROXY: + case SADB_X_EXT_NAT_T_OAI: + case SADB_X_EXT_NAT_T_OAR: + case SADB_X_EXT_NEW_ADDRESS_SRC: + case SADB_X_EXT_NEW_ADDRESS_DST: kdebug_sadb_address(ext); break; case SADB_EXT_KEY_AUTH: @@ -159,6 +166,14 @@ kdebug_sadb(struct sadb_msg *base) case SADB_X_EXT_SA2: kdebug_sadb_x_sa2(ext); break; + case SADB_X_EXT_SA_REPLAY: + kdebug_sadb_x_sa_replay(ext); + break; + case SADB_X_EXT_NAT_T_TYPE: + case SADB_X_EXT_NAT_T_SPORT: + case SADB_X_EXT_NAT_T_DPORT: + kdebug_sadb_x_natt(ext); + break; default: printf("%s: invalid ext_type %u\n", __func__, ext->sadb_ext_type); @@ -342,8 +357,6 @@ kdebug_sadb_address(struct sadb_ext *ext ((u_char *)&addr->sadb_address_reserved)[1]); kdebug_sockaddr((struct sockaddr *)((caddr_t)ext + sizeof(*addr))); - - return; } static void @@ -392,6 +405,41 @@ kdebug_sadb_x_sa2(struct sadb_ext *ext) return; } +static void +kdebug_sadb_x_sa_replay(struct sadb_ext *ext) +{ + struct sadb_x_sa_replay *replay; + + /* sanity check */ + if (ext == NULL) + panic("%s: NULL pointer was passed.\n", __func__); + + replay = (struct sadb_x_sa_replay *)ext; + printf("sadb_x_sa_replay{ replay=%u }\n", + replay->sadb_x_sa_replay_replay); +} + +static void +kdebug_sadb_x_natt(struct sadb_ext *ext) +{ + struct sadb_x_nat_t_type *type; + struct sadb_x_nat_t_port *port; + + /* sanity check */ + if (ext == NULL) + panic("%s: NULL pointer was passed.\n", __func__); + + if (ext->sadb_ext_type == SADB_X_EXT_NAT_T_TYPE) { + type = (struct sadb_x_nat_t_type *)ext; + printf("sadb_x_nat_t_type{ type=%u }\n", + type->sadb_x_nat_t_type_type); + } else { + port = (struct sadb_x_nat_t_port *)ext; + printf("sadb_x_nat_t_port{ port=%u }\n", + ntohs(port->sadb_x_nat_t_port_port)); + } +} + void kdebug_sadb_x_policy(struct sadb_ext *ext) { @@ -402,9 +450,11 @@ kdebug_sadb_x_policy(struct sadb_ext *ex if (ext == NULL) panic("%s: NULL pointer was passed.\n", __func__); - printf("sadb_x_policy{ type=%u dir=%u id=%x }\n", + printf("sadb_x_policy{ type=%u dir=%u id=%x scope=%u %s=%u }\n", xpl->sadb_x_policy_type, xpl->sadb_x_policy_dir, - xpl->sadb_x_policy_id); + xpl->sadb_x_policy_id, xpl->sadb_x_policy_scope, + xpl->sadb_x_policy_scope == IPSEC_POLICYSCOPE_IFNET ? + "ifindex": "priority", xpl->sadb_x_policy_priority); if (xpl->sadb_x_policy_type == IPSEC_POLICY_IPSEC) { int tlen; @@ -850,39 +900,42 @@ ipsec_sa2str(struct secasvar *sav, char void kdebug_sockaddr(struct sockaddr *addr) { - struct sockaddr_in *sin4; -#ifdef INET6 - struct sockaddr_in6 *sin6; -#endif + char buf[IPSEC_ADDRSTRLEN]; /* sanity check */ if (addr == NULL) panic("%s: NULL pointer was passed.\n", __func__); - /* NOTE: We deal with port number as host byte order. */ - printf("sockaddr{ len=%u family=%u", addr->sa_len, addr->sa_family); - switch (addr->sa_family) { - case AF_INET: - sin4 = (struct sockaddr_in *)addr; - printf(" port=%u\n", ntohs(sin4->sin_port)); - ipsec_hexdump((caddr_t)&sin4->sin_addr, sizeof(sin4->sin_addr)); +#ifdef INET + case AF_INET: { + struct sockaddr_in *sin; + + sin = (struct sockaddr_in *)addr; + inet_ntop(AF_INET, &sin->sin_addr, buf, sizeof(buf)); break; + } +#endif #ifdef INET6 - case AF_INET6: + case AF_INET6: { + struct sockaddr_in6 *sin6; + sin6 = (struct sockaddr_in6 *)addr; - printf(" port=%u\n", ntohs(sin6->sin6_port)); - printf(" flowinfo=0x%08x, scope_id=0x%08x\n", - sin6->sin6_flowinfo, sin6->sin6_scope_id); - ipsec_hexdump((caddr_t)&sin6->sin6_addr, - sizeof(sin6->sin6_addr)); + if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) { + snprintf(buf, sizeof(buf), "%s%%%u", + inet_ntop(AF_INET6, &sin6->sin6_addr, buf, + sizeof(buf)), sin6->sin6_scope_id); + } else + inet_ntop(AF_INET6, &sin6->sin6_addr, buf, + sizeof(buf)); break; + } #endif + default: + sprintf(buf, "unknown"); } - - printf(" }\n"); - - return; + printf("sockaddr{ len=%u family=%u addr=%s }\n", addr->sa_len, + addr->sa_family, buf); } void From owner-svn-src-head@freebsd.org Thu Apr 13 14:51:35 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3874D3B247; Thu, 13 Apr 2017 14:51:35 +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 C0A5D1693; Thu, 13 Apr 2017 14:51:35 +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 v3DEpYC9079956; Thu, 13 Apr 2017 14:51:34 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3DEpYbe079955; Thu, 13 Apr 2017 14:51:34 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201704131451.v3DEpYbe079955@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 13 Apr 2017 14:51:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316760 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 14:51:36 -0000 Author: asomers Date: Thu Apr 13 14:51:34 2017 New Revision: 316760 URL: https://svnweb.freebsd.org/changeset/base/316760 Log: Fix vdev_geom_attach_by_guids for partitioned disks When opening a vdev whose path is unknown, vdev_geom must find a geom provider with a label whose guids match the desired vdev. However, due to partitioning, it is possible that two non-synonomous providers will share some labels. For example, if the first partition starts at the beginning of the drive, then ada0 and ada0p1 will share the first label. More troubling, if the last partition runs to the end of the drive, then ada0p3 and ada0 will share the last label. If vdev_geom opens ada0 when it should've opened ada0p3, then the pool won't be readable. If it opens ada0 when it should've opened ada0p1, then it will corrupt some other partition when it writes the 3rd and 4th labels. The easiest way to reproduce this problem is to install a mirrored root pool with the default partition layout, then swap the positions of the two boot drives and reboot. Whether the bug manifests depends on the order in which geom lists its providers, which is arbitrary. Fix this situation by modifying the search algorithm to prefer geom providers that have all four labels intact. If no such provider exists, then open whichever provider has the most. Reviewed by: mav MFC after: 3 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D10365 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Thu Apr 13 14:44:17 2017 (r316759) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Thu Apr 13 14:51:34 2017 (r316760) @@ -400,12 +400,17 @@ vdev_geom_io(struct g_consumer *cp, int kmem_free(bios, bios_size); } +/* + * Read the vdev config from a device. Return the number of valid labels that + * were found. The vdev config will be returned in config if and only if at + * least one valid label was found. + */ static int vdev_geom_read_config(struct g_consumer *cp, nvlist_t **config) { struct g_provider *pp; vdev_phys_t *vdev_lists[VDEV_LABELS]; - char *p, *buf; + char *buf; size_t buflen; uint64_t psize, state, txg; off_t offsets[VDEV_LABELS]; @@ -413,7 +418,7 @@ vdev_geom_read_config(struct g_consumer off_t sizes[VDEV_LABELS]; int cmds[VDEV_LABELS]; int errors[VDEV_LABELS]; - int l, len; + int l, nlabels; g_topology_assert_not(); @@ -444,6 +449,7 @@ vdev_geom_read_config(struct g_consumer VDEV_LABELS); /* Parse the labels */ + nlabels = 0; for (l = 0; l < VDEV_LABELS; l++) { if (errors[l] != 0) continue; @@ -469,14 +475,14 @@ vdev_geom_read_config(struct g_consumer continue; } - break; + nlabels++; } /* Free the label storage */ for (l = 0; l < VDEV_LABELS; l++) kmem_free(vdev_lists[l], size); - return (*config == NULL ? ENOENT : 0); + return (nlabels); } static void @@ -559,7 +565,7 @@ vdev_geom_read_pool_label(const char *na struct g_consumer *zcp; nvlist_t *vdev_cfg; uint64_t pool_guid; - int error; + int error, nlabels; DROP_GIANT(); g_topology_lock(); @@ -580,10 +586,10 @@ vdev_geom_read_pool_label(const char *na if (zcp == NULL) continue; g_topology_unlock(); - error = vdev_geom_read_config(zcp, &vdev_cfg); + nlabels = vdev_geom_read_config(zcp, &vdev_cfg); g_topology_lock(); vdev_geom_detach(zcp, B_TRUE); - if (error) + if (nlabels == 0) continue; ZFS_LOG(1, "successfully read vdev config"); @@ -599,9 +605,13 @@ vdev_geom_read_pool_label(const char *na } enum match { - NO_MATCH, - TOP_MATCH, - FULL_MATCH + NO_MATCH = 0, /* No matching labels found */ + TOPGUID_MATCH = 1, /* Labels match top guid, not vdev guid*/ + ZERO_MATCH = 1, /* Should never be returned */ + ONE_MATCH = 2, /* 1 label matching the vdev_guid */ + TWO_MATCH = 3, /* 2 label matching the vdev_guid */ + THREE_MATCH = 4, /* 3 label matching the vdev_guid */ + FULL_MATCH = 5 /* all labels match the vdev_guid */ }; static enum match @@ -610,6 +620,7 @@ vdev_attach_ok(vdev_t *vd, struct g_prov nvlist_t *config; uint64_t pool_guid, top_guid, vdev_guid; struct g_consumer *cp; + int nlabels; cp = vdev_geom_attach(pp, NULL); if (cp == NULL) { @@ -618,7 +629,8 @@ vdev_attach_ok(vdev_t *vd, struct g_prov return (NO_MATCH); } g_topology_unlock(); - if (vdev_geom_read_config(cp, &config) != 0) { + nlabels = vdev_geom_read_config(cp, &config); + if (nlabels == 0) { g_topology_lock(); vdev_geom_detach(cp, B_TRUE); ZFS_LOG(1, "Unable to read config from %s.", pp->name); @@ -653,10 +665,10 @@ vdev_attach_ok(vdev_t *vd, struct g_prov */ if (vdev_guid == vd->vdev_guid) { ZFS_LOG(1, "guids match for provider %s.", pp->name); - return (FULL_MATCH); + return (ZERO_MATCH + nlabels); } else if (top_guid == vd->vdev_guid && vd == vd->vdev_top) { ZFS_LOG(1, "top vdev guid match for provider %s.", pp->name); - return (TOP_MATCH); + return (TOPGUID_MATCH); } ZFS_LOG(1, "vdev guid mismatch for provider %s: %ju != %ju.", pp->name, (uintmax_t)vd->vdev_guid, (uintmax_t)vdev_guid); @@ -668,13 +680,15 @@ vdev_geom_attach_by_guids(vdev_t *vd) { struct g_class *mp; struct g_geom *gp; - struct g_provider *pp; + struct g_provider *pp, *best_pp; struct g_consumer *cp; - enum match m; + enum match match, best_match; g_topology_assert(); cp = NULL; + best_pp = NULL; + best_match = NO_MATCH; LIST_FOREACH(mp, &g_classes, class) { if (mp == &zfs_vdev_class) continue; @@ -682,26 +696,25 @@ vdev_geom_attach_by_guids(vdev_t *vd) if (gp->flags & G_GEOM_WITHER) continue; LIST_FOREACH(pp, &gp->provider, provider) { - m = vdev_attach_ok(vd, pp); - if (m == NO_MATCH) - continue; - if (cp != NULL) { - if (m == FULL_MATCH) - vdev_geom_detach(cp, B_TRUE); - else - continue; + match = vdev_attach_ok(vd, pp); + if (match > best_match) { + best_match = match; + best_pp = pp; } - cp = vdev_geom_attach(pp, vd); - if (cp == NULL) { - printf("ZFS WARNING: Unable to " - "attach to %s.\n", pp->name); - continue; - } - if (m == FULL_MATCH) - return (cp); + if (match == FULL_MATCH) + goto out; } } } + +out: + if (best_pp) { + cp = vdev_geom_attach(best_pp, vd); + if (cp == NULL) { + printf("ZFS WARNING: Unable to attach to %s.\n", + best_pp->name); + } + } return (cp); } From owner-svn-src-head@freebsd.org Thu Apr 13 15:03:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DFB46D3B8C7; Thu, 13 Apr 2017 15:03:04 +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 A207A236; Thu, 13 Apr 2017 15:03:04 +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 v3DF3314086791; Thu, 13 Apr 2017 15:03:03 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3DF33cS086790; Thu, 13 Apr 2017 15:03:03 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201704131503.v3DF33cS086790@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 13 Apr 2017 15:03:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316761 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 15:03:05 -0000 Author: andrew Date: Thu Apr 13 15:03:03 2017 New Revision: 316761 URL: https://svnweb.freebsd.org/changeset/base/316761 Log: Set the arm64 Execute-never bits in more places. We need to set the Execute-never bits when mapping device memory as the hardware may perform speculative instruction fetches. Set the Privileged Execute-ever bit on userspace memory to stop the kernel if it is tricked into executing it. Reviewed by: kib Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D10382 Modified: head/sys/arm64/arm64/pmap.c Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Thu Apr 13 14:51:34 2017 (r316760) +++ head/sys/arm64/arm64/pmap.c Thu Apr 13 15:03:03 2017 (r316761) @@ -1127,7 +1127,7 @@ static void pmap_kenter(vm_offset_t sva, vm_size_t size, vm_paddr_t pa, int mode) { pd_entry_t *pde; - pt_entry_t *pte; + pt_entry_t *pte, attr; vm_offset_t va; int lvl; @@ -1138,6 +1138,10 @@ pmap_kenter(vm_offset_t sva, vm_size_t s KASSERT((size & PAGE_MASK) == 0, ("pmap_kenter: Mapping is not page-sized")); + attr = ATTR_DEFAULT | ATTR_IDX(mode) | L3_PAGE; + if (mode == DEVICE_MEMORY) + attr |= ATTR_XN; + va = sva; while (size != 0) { pde = pmap_pde(kernel_pmap, va, &lvl); @@ -1146,8 +1150,7 @@ pmap_kenter(vm_offset_t sva, vm_size_t s KASSERT(lvl == 2, ("pmap_kenter: Invalid level %d", lvl)); pte = pmap_l2_to_l3(pde, va); - pmap_load_store(pte, (pa & ~L3_OFFSET) | ATTR_DEFAULT | - ATTR_IDX(mode) | L3_PAGE); + pmap_load_store(pte, (pa & ~L3_OFFSET) | attr); PTE_SYNC(pte); va += PAGE_SIZE; @@ -1259,6 +1262,8 @@ pmap_qenter(vm_offset_t sva, vm_page_t * m = ma[i]; pa = VM_PAGE_TO_PHYS(m) | ATTR_DEFAULT | ATTR_AP(ATTR_AP_RW) | ATTR_IDX(m->md.pv_memattr) | L3_PAGE; + if (m->md.pv_memattr == DEVICE_MEMORY) + pa |= ATTR_XN; pte = pmap_l2_to_l3(pde, va); pmap_load_store(pte, pa); PTE_SYNC(pte); @@ -2719,12 +2724,12 @@ pmap_enter(pmap_t pmap, vm_offset_t va, L3_PAGE); if ((prot & VM_PROT_WRITE) == 0) new_l3 |= ATTR_AP(ATTR_AP_RO); - if ((prot & VM_PROT_EXECUTE) == 0) + if ((prot & VM_PROT_EXECUTE) == 0 || m->md.pv_memattr == DEVICE_MEMORY) new_l3 |= ATTR_XN; if ((flags & PMAP_ENTER_WIRED) != 0) new_l3 |= ATTR_SW_WIRED; if ((va >> 63) == 0) - new_l3 |= ATTR_AP(ATTR_AP_USER); + new_l3 |= ATTR_AP(ATTR_AP_USER) | ATTR_PXN; CTR2(KTR_PMAP, "pmap_enter: %.16lx -> %.16lx", va, pa); @@ -3127,8 +3132,10 @@ pmap_enter_quick_locked(pmap_t pmap, vm_ pa = VM_PAGE_TO_PHYS(m) | ATTR_DEFAULT | ATTR_IDX(m->md.pv_memattr) | ATTR_AP(ATTR_AP_RO) | L3_PAGE; - if ((prot & VM_PROT_EXECUTE) == 0) + if ((prot & VM_PROT_EXECUTE) == 0 || m->md.pv_memattr == DEVICE_MEMORY) pa |= ATTR_XN; + else if (va < VM_MAXUSER_ADDRESS) + pa |= ATTR_PXN; /* * Now validate mapping with RO protection @@ -4263,6 +4270,8 @@ pmap_change_attr_locked(vm_offset_t va, l3 = pmap_load(pte); l3 &= ~ATTR_IDX_MASK; l3 |= ATTR_IDX(mode); + if (mode == DEVICE_MEMORY) + l3 |= ATTR_XN; pmap_update_entry(kernel_pmap, pte, l3, tmpva, PAGE_SIZE); From owner-svn-src-head@freebsd.org Thu Apr 13 15:43:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE05BD3C6AC; Thu, 13 Apr 2017 15:43:45 +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 7E639C6; Thu, 13 Apr 2017 15:43:45 +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 v3DFhiWe003485; Thu, 13 Apr 2017 15:43:44 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3DFhiHB003484; Thu, 13 Apr 2017 15:43:44 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201704131543.v3DFhiHB003484@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 13 Apr 2017 15:43:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316764 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 15:43:45 -0000 Author: andrew Date: Thu Apr 13 15:43:44 2017 New Revision: 316764 URL: https://svnweb.freebsd.org/changeset/base/316764 Log: Don't prefix zero with 0x in assym.s. The arm64 binutils only accepts 0 as an offset to the Load-Acquire Register instructions where llvm will acceps both 0 and 0x0. The thread switching code uses these with SCHED_ULE to block waiting for a lock to be released. As the offset of the data to be loaded is zero this is safe, however it is useful to keep the offset in the instruction to document what is being loaded. To work around this issue in binutils only generate the 0x prefix for non-zero values. Reported by: kan Sponsored by: DARPA, AFRL Modified: head/sys/kern/genassym.sh Modified: head/sys/kern/genassym.sh ============================================================================== --- head/sys/kern/genassym.sh Thu Apr 13 15:40:57 2017 (r316763) +++ head/sys/kern/genassym.sh Thu Apr 13 15:43:44 2017 (r316764) @@ -32,12 +32,15 @@ work() sub("^0*", "", w) if (w == "") w = "0" + hex = "" + if (w != "0") + hex = "0x" sub("w3$", "", $3) # This still has minor problems representing INT_MIN, etc. # E.g., # with 32-bit 2''s complement ints, this prints -0x80000000, # which has the wrong type (unsigned int). - printf("#define\t%s\t%s0x%s\n", $3, sign, w) + printf("#define\t%s\t%s%s%s\n", $3, sign, hex, w) } ' } From owner-svn-src-head@freebsd.org Thu Apr 13 15:49:34 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21129D3C814; Thu, 13 Apr 2017 15:49:34 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E586D762; Thu, 13 Apr 2017 15:49:33 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3DFnXYq003991; Thu, 13 Apr 2017 15:49:33 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3DFnXNa003990; Thu, 13 Apr 2017 15:49:33 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201704131549.v3DFnXNa003990@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 13 Apr 2017 15:49:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316766 - head/lib/libutil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 15:49:34 -0000 Author: brooks Date: Thu Apr 13 15:49:32 2017 New Revision: 316766 URL: https://svnweb.freebsd.org/changeset/base/316766 Log: Correct an out of bounds read with HN_AUTOSCALE and very large numbers. The maximum scale is 6 (K, M, G, T, P, E) (B is 0). Overly large explict scales were checked correctly, but for sufficently large numbers HN_AUTOSCALE would get to 7 resulting in an out of bounds read. Found with humanize_number_test and CHERI bounds checking. Reviewed by: emaste Obtained from: CheriBSD MFC after: 1 week Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D10376 Modified: head/lib/libutil/humanize_number.c Modified: head/lib/libutil/humanize_number.c ============================================================================== --- head/lib/libutil/humanize_number.c Thu Apr 13 15:47:58 2017 (r316765) +++ head/lib/libutil/humanize_number.c Thu Apr 13 15:49:32 2017 (r316766) @@ -43,7 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include -static const int maxscale = 7; +static const int maxscale = 6; int humanize_number(char *buf, size_t len, int64_t quotient, @@ -64,7 +64,7 @@ humanize_number(char *buf, size_t len, i return (-1); if (scale < 0) return (-1); - else if (scale >= maxscale && + else if (scale > maxscale && ((scale & ~(HN_AUTOSCALE|HN_GETSCALE)) != 0)) return (-1); if ((flags & HN_DIVISOR_1000) && (flags & HN_IEC_PREFIXES)) From owner-svn-src-head@freebsd.org Thu Apr 13 15:49:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 51968D3C85E; Thu, 13 Apr 2017 15:49: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 23D168B5; Thu, 13 Apr 2017 15:49: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 v3DFntlm004051; Thu, 13 Apr 2017 15:49:55 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3DFnt9I004050; Thu, 13 Apr 2017 15:49:55 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201704131549.v3DFnt9I004050@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 13 Apr 2017 15:49:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316767 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 15:49:56 -0000 Author: kib Date: Thu Apr 13 15:49:55 2017 New Revision: 316767 URL: https://svnweb.freebsd.org/changeset/base/316767 Log: Map DMAP as nx. Demotions preserve PG_NX, so it is enough to set nx bit for initial lowest-level paging entries. Suggested and reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Thu Apr 13 15:49:32 2017 (r316766) +++ head/sys/amd64/amd64/pmap.c Thu Apr 13 15:49:55 2017 (r316767) @@ -933,14 +933,14 @@ create_pagetables(vm_paddr_t *firstaddr) pd_p[j] = (vm_paddr_t)i << PDRSHIFT; /* Preset PG_M and PG_A because demotion expects it. */ pd_p[j] |= X86_PG_RW | X86_PG_V | PG_PS | X86_PG_G | - X86_PG_M | X86_PG_A; + X86_PG_M | X86_PG_A | pg_nx; } pdp_p = (pdp_entry_t *)DMPDPphys; for (i = 0; i < ndm1g; i++) { pdp_p[i] = (vm_paddr_t)i << PDPSHIFT; /* Preset PG_M and PG_A because demotion expects it. */ pdp_p[i] |= X86_PG_RW | X86_PG_V | PG_PS | X86_PG_G | - X86_PG_M | X86_PG_A; + X86_PG_M | X86_PG_A | pg_nx; } for (j = 0; i < ndmpdp; i++, j++) { pdp_p[i] = DMPDphys + ptoa(j); From owner-svn-src-head@freebsd.org Thu Apr 13 15:52:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D35CD3CA2A; Thu, 13 Apr 2017 15:52:46 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E9FBCC5; Thu, 13 Apr 2017 15:52:46 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3DFqjXM008034; Thu, 13 Apr 2017 15:52:45 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3DFqjZ3008033; Thu, 13 Apr 2017 15:52:45 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201704131552.v3DFqjZ3008033@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 13 Apr 2017 15:52:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316768 - head/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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 15:52:46 -0000 Author: brooks Date: Thu Apr 13 15:52:45 2017 New Revision: 316768 URL: https://svnweb.freebsd.org/changeset/base/316768 Log: Fix an out-of-bounds write when a zero-length buffer is passed. Found with ttyname_test and CHERI bounds checking. Reviewed by: emaste Obtained from: CheriBSD MFC after: 1 week Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D10377 Modified: head/lib/libc/gen/ttyname.c Modified: head/lib/libc/gen/ttyname.c ============================================================================== --- head/lib/libc/gen/ttyname.c Thu Apr 13 15:49:55 2017 (r316767) +++ head/lib/libc/gen/ttyname.c Thu Apr 13 15:52:45 2017 (r316768) @@ -61,6 +61,10 @@ ttyname_r(int fd, char *buf, size_t len) { size_t used; + /* Don't write off the end of a zero-length buffer. */ + if (len < 1) + return (ERANGE); + *buf = '\0'; /* Must be a terminal. */ From owner-svn-src-head@freebsd.org Thu Apr 13 16:14:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1387D3CEB9; Thu, 13 Apr 2017 16:14:20 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB3E5910; Thu, 13 Apr 2017 16:14:20 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 9D9675A9F14; Thu, 13 Apr 2017 16:14:19 +0000 (UTC) Date: Thu, 13 Apr 2017 16:14:19 +0000 From: Brooks Davis To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r316766 - head/lib/libutil Message-ID: <20170413161419.GC95141@spindle.one-eyed-alien.net> References: <201704131549.v3DFnXNa003990@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qtZFehHsKgwS5rPz" Content-Disposition: inline In-Reply-To: <201704131549.v3DFnXNa003990@repo.freebsd.org> User-Agent: Mutt/1.8.0 (2017-02-23) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 16:14:20 -0000 --qtZFehHsKgwS5rPz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 13, 2017 at 03:49:33PM +0000, Brooks Davis wrote: > Author: brooks > Date: Thu Apr 13 15:49:32 2017 > New Revision: 316766 > URL: https://svnweb.freebsd.org/changeset/base/316766 >=20 > Log: > Correct an out of bounds read with HN_AUTOSCALE and very large numbers. > =20 > The maximum scale is 6 (K, M, G, T, P, E) (B is 0). > =20 > Overly large explict scales were checked correctly, but for sufficently > large numbers HN_AUTOSCALE would get to 7 resulting in an out of bounds > read. > =20 > Found with humanize_number_test and CHERI bounds checking. IMO the real cause of this off-by-one error is the failure to use a proper array of prefixes. FreeBSD makes the case worse than the NetBSD code we started from by adding Ki, Mi, etc so the prefixes strings are all three characters per suffix making the code unreadable. -- Brooks --qtZFehHsKgwS5rPz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJY76PaAAoJEKzQXbSebgfAs38H/Agg6l9/n2+ZCRHuIWQmWb0L EZbQ708MZKhHM5tXVodIB2V2eqAOtTV+NzZI5UvtjIe4nwMJ7gFfjRg06hput0Lv alaKU4cloFkb1pjA9io+HZEc2J+ezt2UZseKYk0enqLaJtcYqHbQBKoelKRPnNnP PT5oeawfKvcEdDQ15C5GbKnnmmerfF/HNHPl6SrqIcht6OrO/qDG8vzqRU8wA8PU Mf47U6+sDIH8AxNA4LuPW8vAXQBXC0moa56aDrSiWG5+hrBcPcR994C2MXXPxExZ hNFAs0ZA3a6o83S6RoEndxxrKeZj1yku7HeYqNJ8NOHOJBDX55TAGH2VoZlluEI= =iRvC -----END PGP SIGNATURE----- --qtZFehHsKgwS5rPz-- From owner-svn-src-head@freebsd.org Thu Apr 13 16:57:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93118D3CE0C; Thu, 13 Apr 2017 16:57:03 +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 636F2617; Thu, 13 Apr 2017 16:57:03 +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 v3DGv2LQ033396; Thu, 13 Apr 2017 16:57:02 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3DGv2mB033394; Thu, 13 Apr 2017 16:57:02 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201704131657.v3DGv2mB033394@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 13 Apr 2017 16:57:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316769 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 16:57:03 -0000 Author: andrew Date: Thu Apr 13 16:57:02 2017 New Revision: 316769 URL: https://svnweb.freebsd.org/changeset/base/316769 Log: Rather than checking if the top bit in a virtual address is a 0 or 1 compare against VM_MAXUSER_ADDRESS as we should have been doing. Sponsored by: DARPA, AFRL Modified: head/sys/arm64/arm64/pmap.c head/sys/arm64/arm64/trap.c Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Thu Apr 13 15:52:45 2017 (r316768) +++ head/sys/arm64/arm64/pmap.c Thu Apr 13 16:57:02 2017 (r316769) @@ -2728,7 +2728,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, new_l3 |= ATTR_XN; if ((flags & PMAP_ENTER_WIRED) != 0) new_l3 |= ATTR_SW_WIRED; - if ((va >> 63) == 0) + if (va < VM_MAXUSER_ADDRESS) new_l3 |= ATTR_AP(ATTR_AP_USER) | ATTR_PXN; CTR2(KTR_PMAP, "pmap_enter: %.16lx -> %.16lx", va, pa); Modified: head/sys/arm64/arm64/trap.c ============================================================================== --- head/sys/arm64/arm64/trap.c Thu Apr 13 15:52:45 2017 (r316768) +++ head/sys/arm64/arm64/trap.c Thu Apr 13 16:57:02 2017 (r316769) @@ -184,7 +184,7 @@ data_abort(struct trapframe *frame, uint map = &p->p_vmspace->vm_map; else { /* The top bit tells us which range to use */ - if ((far >> 63) == 1) { + if (far >= VM_MAXUSER_ADDRESS) { map = kernel_map; } else { map = &p->p_vmspace->vm_map; From owner-svn-src-head@freebsd.org Thu Apr 13 17:03:58 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBDA0D3B0BE; Thu, 13 Apr 2017 17:03:58 +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 92912C50; Thu, 13 Apr 2017 17:03:58 +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 v3DH3ve2037563; Thu, 13 Apr 2017 17:03:57 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3DH3v4P037561; Thu, 13 Apr 2017 17:03:57 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201704131703.v3DH3v4P037561@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 13 Apr 2017 17:03:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316770 - in head/sys: netinet netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 17:03:59 -0000 Author: ae Date: Thu Apr 13 17:03:57 2017 New Revision: 316770 URL: https://svnweb.freebsd.org/changeset/base/316770 Log: Clear h/w csum flags on mbuf handled by UDP. When checksums of received IP and UDP header already checked, UDP uses sbappendaddr_locked() to pass received data to the socket. sbappendaddr_locked() uses given mbuf as is, and if NIC supports checksum offloading, mbuf contains csum_data and csum_flags that were calculated for already stripped headers. Some NICs support only limited checksums offloading and do not use CSUM_PSEUDO_HDR flag, and csum_data contains some value that UDP/TCP should use for pseudo header checksum calculation. When L2TP is used for tunneling with mpd5, ng_ksocket receives mbuf with filled csum_flags and csum_data, that were calculated for outer headers. When L2TP header is stripped, a packet that was tunneled goes to the IP layer and due to presence of csum_flags (without CSUM_PSEUDO_HDR) and csum_data, the UDP/TCP checksum check fails for this packet. Reported by: Irina Liakh Tested by: Irina Liakh MFC after: 1 week Modified: head/sys/netinet/udp_usrreq.c head/sys/netinet6/udp6_usrreq.c Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Thu Apr 13 16:57:02 2017 (r316769) +++ head/sys/netinet/udp_usrreq.c Thu Apr 13 17:03:57 2017 (r316770) @@ -372,6 +372,9 @@ udp_append(struct inpcb *inp, struct ip append_sa = (struct sockaddr *)&udp_in[0]; m_adj(n, off); + /* Clear any h/w csum flags as they are no longer valid. */ + n->m_pkthdr.csum_flags &= ~(CSUM_DATA_VALID | CSUM_IP_VALID); + so = inp->inp_socket; SOCKBUF_LOCK(&so->so_rcv); if (sbappendaddr_locked(&so->so_rcv, append_sa, n, opts) == 0) { Modified: head/sys/netinet6/udp6_usrreq.c ============================================================================== --- head/sys/netinet6/udp6_usrreq.c Thu Apr 13 16:57:02 2017 (r316769) +++ head/sys/netinet6/udp6_usrreq.c Thu Apr 13 17:03:57 2017 (r316770) @@ -187,6 +187,9 @@ udp6_append(struct inpcb *inp, struct mb } m_adj(n, off + sizeof(struct udphdr)); + /* Clear any h/w csum flags as they are no longer valid. */ + n->m_pkthdr.csum_flags &= ~CSUM_DATA_VALID; + so = inp->inp_socket; SOCKBUF_LOCK(&so->so_rcv); if (sbappendaddr_locked(&so->so_rcv, (struct sockaddr *)&fromsa[0], n, From owner-svn-src-head@freebsd.org Thu Apr 13 17:11:51 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 474FAD3B2D7; Thu, 13 Apr 2017 17:11:51 +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 0E909A2; Thu, 13 Apr 2017 17:11:50 +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 v3DHBoeZ039289; Thu, 13 Apr 2017 17:11:50 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3DHBoOh039288; Thu, 13 Apr 2017 17:11:50 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201704131711.v3DHBoOh039288@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Thu, 13 Apr 2017 17:11:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316771 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 17:11:51 -0000 Author: cem Date: Thu Apr 13 17:11:49 2017 New Revision: 316771 URL: https://svnweb.freebsd.org/changeset/base/316771 Log: loader: Avoid possible overflow via environment variable Reported by: Coverity (CWE-120) CID: 1006704 Sponsored by: Dell EMC Isilon Modified: head/sys/boot/common/commands.c Modified: head/sys/boot/common/commands.c ============================================================================== --- head/sys/boot/common/commands.c Thu Apr 13 17:03:57 2017 (r316770) +++ head/sys/boot/common/commands.c Thu Apr 13 17:11:49 2017 (r316771) @@ -132,7 +132,7 @@ command_help(int argc, char *argv[]) char *topic, *subtopic, *t, *s, *d; /* page the help text from our load path */ - sprintf(buf, "%s/boot/loader.help", getenv("loaddev")); + snprintf(buf, sizeof(buf), "%s/boot/loader.help", getenv("loaddev")); if ((hfd = open(buf, O_RDONLY)) < 0) { printf("Verbose help not available, use '?' to list commands\n"); return(CMD_OK); From owner-svn-src-head@freebsd.org Thu Apr 13 17:16:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA8CDD3B7A4; Thu, 13 Apr 2017 17:16:37 +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 A0E05BED; Thu, 13 Apr 2017 17:16:37 +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 v3DHGabe041847; Thu, 13 Apr 2017 17:16:36 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3DHGa4D041844; Thu, 13 Apr 2017 17:16:36 GMT (envelope-from np@FreeBSD.org) Message-Id: <201704131716.v3DHGa4D041844@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 13 Apr 2017 17:16:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316774 - in head/sys/dev/cxgbe: . common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 17:16:38 -0000 Author: np Date: Thu Apr 13 17:16:36 2017 New Revision: 316774 URL: https://svnweb.freebsd.org/changeset/base/316774 Log: cxgbe: Query some more RDMA related parameters from the firmware. MFC after: 3 days Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/common/common.h head/sys/dev/cxgbe/offload.h head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/common/common.h ============================================================================== --- head/sys/dev/cxgbe/common/common.h Thu Apr 13 17:13:08 2017 (r316773) +++ head/sys/dev/cxgbe/common/common.h Thu Apr 13 17:16:36 2017 (r316774) @@ -366,6 +366,9 @@ struct adapter_params { unsigned int ofldq_wr_cred; unsigned int eo_wr_cred; + + unsigned int max_ordird_qp; + unsigned int max_ird_adapter; }; #define CHELSIO_T4 0x4 Modified: head/sys/dev/cxgbe/offload.h ============================================================================== --- head/sys/dev/cxgbe/offload.h Thu Apr 13 17:13:08 2017 (r316773) +++ head/sys/dev/cxgbe/offload.h Thu Apr 13 17:16:36 2017 (r316774) @@ -121,6 +121,7 @@ struct t4_virt_res { struct t4_range pbl; struct t4_range qp; struct t4_range cq; + struct t4_range srq; struct t4_range ocq; struct t4_range l2t; }; Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Thu Apr 13 17:13:08 2017 (r316773) +++ head/sys/dev/cxgbe/t4_main.c Thu Apr 13 17:16:36 2017 (r316774) @@ -3494,6 +3494,21 @@ get_params__post_init(struct adapter *sc sc->vres.cq.size = val[3] - val[2] + 1; sc->vres.ocq.start = val[4]; sc->vres.ocq.size = val[5] - val[4] + 1; + + param[0] = FW_PARAM_PFVF(SRQ_START); + param[1] = FW_PARAM_PFVF(SRQ_END); + param[2] = FW_PARAM_DEV(MAXORDIRD_QP); + param[3] = FW_PARAM_DEV(MAXIRD_ADAPTER); + rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 4, param, val); + if (rc != 0) { + device_printf(sc->dev, + "failed to query RDMA parameters(3): %d.\n", rc); + return (rc); + } + sc->vres.srq.start = val[0]; + sc->vres.srq.size = val[1] - val[0] + 1; + sc->params.max_ordird_qp = val[2]; + sc->params.max_ird_adapter = val[3]; } if (sc->iscsicaps) { param[0] = FW_PARAM_PFVF(ISCSI_START); From owner-svn-src-head@freebsd.org Thu Apr 13 17:34:53 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49F54D3BFC7; Thu, 13 Apr 2017 17:34:53 +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 02107CF1; Thu, 13 Apr 2017 17:34:52 +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 v3DHYqMO050434; Thu, 13 Apr 2017 17:34:52 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3DHYqAm050433; Thu, 13 Apr 2017 17:34:52 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201704131734.v3DHYqAm050433@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Thu, 13 Apr 2017 17:34:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316776 - head/sys/compat/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 17:34:53 -0000 Author: cem Date: Thu Apr 13 17:34:51 2017 New Revision: 316776 URL: https://svnweb.freebsd.org/changeset/base/316776 Log: linux_ioctl: Refactor some v4l2 struct converters According to the C standard, it is invalid to copy beyond the end of an object, even if that object is obviously a member of a larger object (a struct, in this case). Appease the standard and Coverity by refactoring the copy in a straightforward way. No functional change. Reported by: Coverity (CWE-120) CIDs: 1007819, 1007820, 1007821, 1007822, 1009668, 1009669 Security: no (false positive detection) Sponsored by: Dell EMC Isilon Modified: head/sys/compat/linux/linux_ioctl.c Modified: head/sys/compat/linux/linux_ioctl.c ============================================================================== --- head/sys/compat/linux/linux_ioctl.c Thu Apr 13 17:30:33 2017 (r316775) +++ head/sys/compat/linux/linux_ioctl.c Thu Apr 13 17:34:51 2017 (r316776) @@ -3185,7 +3185,12 @@ linux_to_bsd_v4l2_standard(struct l_v4l2 { vstd->index = lvstd->index; vstd->id = lvstd->id; - memcpy(&vstd->name, &lvstd->name, sizeof(*lvstd) - offsetof(struct l_v4l2_standard, name)); + CTASSERT(sizeof(vstd->name) == sizeof(lvstd->name)); + memcpy(vstd->name, lvstd->name, sizeof(vstd->name)); + vstd->frameperiod = lvstd->frameperiod; + vstd->framelines = lvstd->framelines; + CTASSERT(sizeof(vstd->reserved) == sizeof(lvstd->reserved)); + memcpy(vstd->reserved, lvstd->reserved, sizeof(vstd->reserved)); return (0); } @@ -3194,7 +3199,12 @@ bsd_to_linux_v4l2_standard(struct v4l2_s { lvstd->index = vstd->index; lvstd->id = vstd->id; - memcpy(&lvstd->name, &vstd->name, sizeof(*lvstd) - offsetof(struct l_v4l2_standard, name)); + CTASSERT(sizeof(vstd->name) == sizeof(lvstd->name)); + memcpy(lvstd->name, vstd->name, sizeof(lvstd->name)); + lvstd->frameperiod = vstd->frameperiod; + lvstd->framelines = vstd->framelines; + CTASSERT(sizeof(vstd->reserved) == sizeof(lvstd->reserved)); + memcpy(lvstd->reserved, vstd->reserved, sizeof(lvstd->reserved)); return (0); } From owner-svn-src-head@freebsd.org Thu Apr 13 17:47:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33FC4D3C54B; Thu, 13 Apr 2017 17:47:46 +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 00FC76BA; Thu, 13 Apr 2017 17:47:45 +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 v3DHljxa054435; Thu, 13 Apr 2017 17:47:45 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3DHli6R054433; Thu, 13 Apr 2017 17:47:44 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201704131747.v3DHli6R054433@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Thu, 13 Apr 2017 17:47:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316777 - head/sys/netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 17:47:46 -0000 Author: cem Date: Thu Apr 13 17:47:44 2017 New Revision: 316777 URL: https://svnweb.freebsd.org/changeset/base/316777 Log: dummynet: Use strlcpy to appease static checkers Some dummynet modules used strcpy() to copy from a larger buffer (dn_aqm->name) to a smaller buffer (dn_extra_parms->name). It happens that the lengths of the strings in the dn_aqm buffers were always hardcoded to be smaller than the dn_extra_parms buffer ("CODEL", "PIE"). Use strlcpy() instead, to appease static checkers. No functional change. Reported by: Coverity CIDs: 1356163, 1356165 Sponsored by: Dell EMC Isilon Modified: head/sys/netpfil/ipfw/dn_aqm_codel.c head/sys/netpfil/ipfw/dn_aqm_pie.c Modified: head/sys/netpfil/ipfw/dn_aqm_codel.c ============================================================================== --- head/sys/netpfil/ipfw/dn_aqm_codel.c Thu Apr 13 17:34:51 2017 (r316776) +++ head/sys/netpfil/ipfw/dn_aqm_codel.c Thu Apr 13 17:47:44 2017 (r316777) @@ -416,7 +416,7 @@ aqm_codel_getconfig(struct dn_fsk *fs, s struct dn_aqm_codel_parms *ccfg; if (fs->aqmcfg) { - strcpy(ep->name, codel_desc.name); + strlcpy(ep->name, codel_desc.name, sizeof(ep->name)); ccfg = fs->aqmcfg; ep->par[0] = ccfg->target / AQM_TIME_1US; ep->par[1] = ccfg->interval / AQM_TIME_1US; Modified: head/sys/netpfil/ipfw/dn_aqm_pie.c ============================================================================== --- head/sys/netpfil/ipfw/dn_aqm_pie.c Thu Apr 13 17:34:51 2017 (r316776) +++ head/sys/netpfil/ipfw/dn_aqm_pie.c Thu Apr 13 17:47:44 2017 (r316777) @@ -755,7 +755,7 @@ aqm_pie_getconfig (struct dn_fsk *fs, st { struct dn_aqm_pie_parms *pcfg; if (fs->aqmcfg) { - strcpy(ep->name, pie_desc.name); + strlcpy(ep->name, pie_desc.name, sizeof(ep->name)); pcfg = fs->aqmcfg; ep->par[0] = pcfg->qdelay_ref / AQM_TIME_1US; ep->par[1] = pcfg->tupdate / AQM_TIME_1US; From owner-svn-src-head@freebsd.org Thu Apr 13 18:13:12 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12C9BD3CFA3; Thu, 13 Apr 2017 18:13:12 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D8F15BC3; Thu, 13 Apr 2017 18:13:11 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3DIDBSZ066697; Thu, 13 Apr 2017 18:13:11 GMT (envelope-from maxim@FreeBSD.org) Received: (from maxim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3DIDAm0066695; Thu, 13 Apr 2017 18:13:10 GMT (envelope-from maxim@FreeBSD.org) Message-Id: <201704131813.v3DIDAm0066695@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: maxim set sender to maxim@FreeBSD.org using -f From: Maxim Konovalov Date: Thu, 13 Apr 2017 18:13:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316778 - head/sys/netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 18:13:12 -0000 Author: maxim Date: Thu Apr 13 18:13:10 2017 New Revision: 316778 URL: https://svnweb.freebsd.org/changeset/base/316778 Log: o Redundant assignments removed. Found by: PVS-Stdio, V519 Reviewed by: ae Modified: head/sys/netpfil/ipfw/ip_fw_dynamic.c head/sys/netpfil/ipfw/ip_fw_table_algo.c Modified: head/sys/netpfil/ipfw/ip_fw_dynamic.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_dynamic.c Thu Apr 13 17:47:44 2017 (r316777) +++ head/sys/netpfil/ipfw/ip_fw_dynamic.c Thu Apr 13 18:13:10 2017 (r316778) @@ -978,7 +978,6 @@ ipfw_install_state(struct ip_fw_chain *c if (parent->count >= conn_limit) { if (V_fw_verbose && last_log != time_uptime) { - last_log = time_uptime; char sbuf[24]; last_log = time_uptime; snprintf(sbuf, sizeof(sbuf), Modified: head/sys/netpfil/ipfw/ip_fw_table_algo.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_table_algo.c Thu Apr 13 17:47:44 2017 (r316777) +++ head/sys/netpfil/ipfw/ip_fw_table_algo.c Thu Apr 13 18:13:10 2017 (r316778) @@ -2319,7 +2319,6 @@ ta_del_ifidx(void *ta_state, struct tabl tb = (struct ta_buf_ifidx *)ta_buf; ifname = (char *)tei->paddr; icfg = (struct iftable_cfg *)ta_state; - ife = tb->ife; ife = (struct ifentry *)ipfw_objhash_lookup_name(icfg->ii, 0, ifname); From owner-svn-src-head@freebsd.org Thu Apr 13 19:27:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7DB1AD3CB5E; Thu, 13 Apr 2017 19:27:47 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48A9FECD; Thu, 13 Apr 2017 19:27:47 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3DJRkMK095663; Thu, 13 Apr 2017 19:27:46 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3DJRkXe095662; Thu, 13 Apr 2017 19:27:46 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201704131927.v3DJRkXe095662@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 13 Apr 2017 19:27:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316780 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 19:27:47 -0000 Author: bdrewery Date: Thu Apr 13 19:27:46 2017 New Revision: 316780 URL: https://svnweb.freebsd.org/changeset/base/316780 Log: Pass COMPILER_FEATURES down to submakes for installworld. This is for WITH_SYSTEM_COMPILER, WITHOUT_CROSS_COMPILER, external compiler, etc. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Apr 13 18:28:40 2017 (r316779) +++ head/Makefile.inc1 Thu Apr 13 19:27:46 2017 (r316780) @@ -135,7 +135,8 @@ TEST_SYSTEM_COMPILER_VARS= \ MK_CROSS_COMPILER MK_CLANG_BOOTSTRAP MK_GCC_BOOTSTRAP \ WANT_COMPILER_TYPE WANT_COMPILER_VERSION WANT_COMPILER_VERSION_FILE \ WANT_COMPILER_FREEBSD_VERSION WANT_COMPILER_FREEBSD_VERSION_FILE \ - CC COMPILER_TYPE COMPILER_VERSION COMPILER_FREEBSD_VERSION + CC COMPILER_TYPE COMPILER_FEATURES COMPILER_VERSION \ + COMPILER_FREEBSD_VERSION test-system-compiler: .PHONY .for v in ${TEST_SYSTEM_COMPILER_VARS} ${_+_}@printf "%-35s= %s\n" "${v}" "${${v}}" @@ -153,9 +154,11 @@ test-system-compiler: .PHONY .if !defined(X_COMPILER_TYPE) CROSSENV+= COMPILER_VERSION=${COMPILER_VERSION} \ COMPILER_TYPE=${COMPILER_TYPE} \ + COMPILER_FEATURES=${COMPILER_FEATURES} \ COMPILER_FREEBSD_VERSION=${COMPILER_FREEBSD_VERSION} .else CROSSENV+= COMPILER_VERSION=${X_COMPILER_VERSION} \ + COMPILER_FEATURES=${X_COMPILER_FEATURES} \ COMPILER_TYPE=${X_COMPILER_TYPE} \ COMPILER_FREEBSD_VERSION=${X_COMPILER_FREEBSD_VERSION} .endif From owner-svn-src-head@freebsd.org Thu Apr 13 20:16:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E364D3CDEE; Thu, 13 Apr 2017 20:16:31 +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 E4492CD3; Thu, 13 Apr 2017 20:16:30 +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 v3DKGUQZ017622; Thu, 13 Apr 2017 20:16:30 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3DKGU3x017621; Thu, 13 Apr 2017 20:16:30 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201704132016.v3DKGU3x017621@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Thu, 13 Apr 2017 20:16:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316782 - head/sys/fs/nfsclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 20:16:31 -0000 Author: rmacklem Date: Thu Apr 13 20:16:29 2017 New Revision: 316782 URL: https://svnweb.freebsd.org/changeset/base/316782 Log: Add call to svcpool_close() for the NFSv4 callback pool (svcpool_nfscbd). A function called svcpool_close() was added to the server side krpc by r313735, so that a pool could be closed without destroying the data structures. This little patch adds a call to it for the callback pool (svcpool_nfscbd), so that the nfscbd daemon can be killed/restarted and continue to work correctly. MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clkrpc.c Modified: head/sys/fs/nfsclient/nfs_clkrpc.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clkrpc.c Thu Apr 13 19:48:45 2017 (r316781) +++ head/sys/fs/nfsclient/nfs_clkrpc.c Thu Apr 13 20:16:29 2017 (r316782) @@ -278,6 +278,11 @@ nfsrvd_cbinit(int terminating) while (nfs_numnfscbd > 0) msleep(&nfs_numnfscbd, NFSDLOCKMUTEXPTR, PZERO, "nfscbdt", 0); + if (nfscbd_pool != NULL) { + NFSD_UNLOCK(); + svcpool_close(nfscbd_pool); + NFSD_LOCK(); + } } if (nfscbd_pool == NULL) { From owner-svn-src-head@freebsd.org Thu Apr 13 21:54:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BDBACD3CB05; Thu, 13 Apr 2017 21:54:21 +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 8CD5FA82; Thu, 13 Apr 2017 21:54:21 +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 v3DLsKJq058643; Thu, 13 Apr 2017 21:54:20 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3DLsKp7058635; Thu, 13 Apr 2017 21:54:20 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201704132154.v3DLsKp7058635@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Thu, 13 Apr 2017 21:54:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316792 - in head/sys: fs/nfs fs/nfsclient nfsclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 21:54:21 -0000 Author: rmacklem Date: Thu Apr 13 21:54:19 2017 New Revision: 316792 URL: https://svnweb.freebsd.org/changeset/base/316792 Log: Add an NFSv4.1 mount option for "use one openowner". Some NFSv4.1 servers such as AmazonEFS can only support a small fixed number of open_owner4s. This patch adds a mount option called "oneopenown" that can be used for NFSv4.1 mounts to make the client do all Opens with the same open_owner4 string. This option can only be used with NFSv4.1 and may not work correctly when Delegations are is use. Reported by: cperciva Tested by: cperciva MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D8988 Modified: head/sys/fs/nfs/nfs_var.h head/sys/fs/nfs/nfsport.h head/sys/fs/nfsclient/nfs_clport.c head/sys/fs/nfsclient/nfs_clrpcops.c head/sys/fs/nfsclient/nfs_clstate.c head/sys/fs/nfsclient/nfs_clvfsops.c head/sys/nfsclient/nfsargs.h Modified: head/sys/fs/nfs/nfs_var.h ============================================================================== --- head/sys/fs/nfs/nfs_var.h Thu Apr 13 20:36:40 2017 (r316791) +++ head/sys/fs/nfs/nfs_var.h Thu Apr 13 21:54:19 2017 (r316792) @@ -502,8 +502,8 @@ int nfscl_open(vnode_t, u_int8_t *, int, int *, int *, int); int nfscl_getstateid(vnode_t, u_int8_t *, int, u_int32_t, int, struct ucred *, NFSPROC_T *, nfsv4stateid_t *, void **); -void nfscl_ownerrelease(struct nfsclowner *, int, int, int); -void nfscl_openrelease(struct nfsclopen *, int, int); +void nfscl_ownerrelease(struct nfsmount *, struct nfsclowner *, int, int, int); +void nfscl_openrelease(struct nfsmount *, struct nfsclopen *, int, int); int nfscl_getcl(struct mount *, struct ucred *, NFSPROC_T *, int, struct nfsclclient **); struct nfsclclient *nfscl_findcl(struct nfsmount *); Modified: head/sys/fs/nfs/nfsport.h ============================================================================== --- head/sys/fs/nfs/nfsport.h Thu Apr 13 20:36:40 2017 (r316791) +++ head/sys/fs/nfs/nfsport.h Thu Apr 13 21:54:19 2017 (r316792) @@ -929,6 +929,8 @@ int newnfs_realign(struct mbuf **, int); #define NFSHASNOLAYOUTCOMMIT(n) ((n)->nm_state & NFSSTA_NOLAYOUTCOMMIT) #define NFSHASSESSPERSIST(n) ((n)->nm_state & NFSSTA_SESSPERSIST) #define NFSHASPNFS(n) ((n)->nm_state & NFSSTA_PNFS) +#define NFSHASONEOPENOWN(n) (((n)->nm_flag & NFSMNT_ONEOPENOWN) != 0 && \ + (n)->nm_minorvers > 0) /* * Gets the stats field out of the mount structure. Modified: head/sys/fs/nfsclient/nfs_clport.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clport.c Thu Apr 13 20:36:40 2017 (r316791) +++ head/sys/fs/nfsclient/nfs_clport.c Thu Apr 13 21:54:19 2017 (r316792) @@ -634,7 +634,7 @@ nfscl_filllockowner(void *id, u_int8_t * struct proc *p; if (id == NULL) { - printf("NULL id\n"); + /* Return the single open_owner of all 0 bytes. */ bzero(cp, NFSV4CL_LOCKNAMELEN); return; } @@ -1255,7 +1255,14 @@ nfscl_procdoesntexist(u_int8_t *own) } tl; struct proc *p; pid_t pid; - int ret = 0; + int i, ret = 0; + + /* For the single open_owner of all 0 bytes, just return 0. */ + for (i = 0; i < NFSV4CL_LOCKNAMELEN; i++) + if (own[i] != 0) + break; + if (i == NFSV4CL_LOCKNAMELEN) + return (0); tl.cval[0] = *own++; tl.cval[1] = *own++; Modified: head/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clrpcops.c Thu Apr 13 20:36:40 2017 (r316791) +++ head/sys/fs/nfsclient/nfs_clrpcops.c Thu Apr 13 21:54:19 2017 (r316792) @@ -347,7 +347,7 @@ else printf(" fhl=0\n"); */ if (!error) op->nfso_opencnt++; - nfscl_openrelease(op, error, newone); + nfscl_openrelease(nmp, op, error, newone); if (error == NFSERR_GRACE || error == NFSERR_STALECLIENTID || error == NFSERR_STALEDONTRECOVER || error == NFSERR_DELAY || error == NFSERR_BADSESSION) { @@ -1893,7 +1893,7 @@ nfsrpc_create(vnode_t dvp, char *name, i if (dp != NULL) (void) nfscl_deleg(nmp->nm_mountp, owp->nfsow_clp, (*nfhpp)->nfh_fh, (*nfhpp)->nfh_len, cred, p, &dp); - nfscl_ownerrelease(owp, error, newone, unlocked); + nfscl_ownerrelease(nmp, owp, error, newone, unlocked); if (error == NFSERR_GRACE || error == NFSERR_STALECLIENTID || error == NFSERR_STALEDONTRECOVER || error == NFSERR_DELAY || error == NFSERR_BADSESSION) { @@ -2198,7 +2198,7 @@ nfsrpc_createv4(vnode_t dvp, char *name, error = ret; } } - nfscl_openrelease(op, error, newone); + nfscl_openrelease(nmp, op, error, newone); *unlockedp = 1; } if (nd->nd_repstat != 0 && error == 0) Modified: head/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clstate.c Thu Apr 13 20:36:40 2017 (r316791) +++ head/sys/fs/nfsclient/nfs_clstate.c Thu Apr 13 21:54:19 2017 (r316792) @@ -247,7 +247,6 @@ nfscl_open(vnode_t vp, u_int8_t *nfhp, i * If none found, add the new one or return error, depending upon * "create". */ - nfscl_filllockowner(p->td_proc, own, F_POSIX); NFSLOCKCLSTATE(); dp = NULL; /* First check the delegation list */ @@ -264,10 +263,17 @@ nfscl_open(vnode_t vp, u_int8_t *nfhp, i } } - if (dp != NULL) + if (dp != NULL) { + nfscl_filllockowner(p->td_proc, own, F_POSIX); ohp = &dp->nfsdl_owner; - else + } else { + /* For NFSv4.1 and this option, use a single open_owner. */ + if (NFSHASONEOPENOWN(VFSTONFS(vnode_mount(vp)))) + nfscl_filllockowner(NULL, own, F_POSIX); + else + nfscl_filllockowner(p->td_proc, own, F_POSIX); ohp = &clp->nfsc_owner; + } /* Now, search for an openowner */ LIST_FOREACH(owp, ohp, nfsow_list) { if (!NFSBCMP(owp->nfsow_owner, own, NFSV4CL_LOCKNAMELEN)) @@ -300,9 +306,24 @@ nfscl_open(vnode_t vp, u_int8_t *nfhp, i /* * Serialize modifications to the open owner for multiple threads * within the same process using a read/write sleep lock. + * For NFSv4.1 and a single OpenOwner, allow concurrent open operations + * by acquiring a shared lock. The close operations still use an + * exclusive lock for this case. */ - if (lockit) - nfscl_lockexcl(&owp->nfsow_rwlock, NFSCLSTATEMUTEXPTR); + if (lockit != 0) { + if (NFSHASONEOPENOWN(VFSTONFS(vnode_mount(vp)))) { + /* + * Get a shared lock on the OpenOwner, but first + * wait for any pending exclusive lock, so that the + * exclusive locker gets priority. + */ + nfsv4_lock(&owp->nfsow_rwlock, 0, NULL, + NFSCLSTATEMUTEXPTR, NULL); + nfsv4_getref(&owp->nfsow_rwlock, NULL, + NFSCLSTATEMUTEXPTR, NULL); + } else + nfscl_lockexcl(&owp->nfsow_rwlock, NFSCLSTATEMUTEXPTR); + } NFSUNLOCKCLSTATE(); if (nowp != NULL) FREE((caddr_t)nowp, M_NFSCLOWNER); @@ -545,7 +566,10 @@ nfscl_getstateid(vnode_t vp, u_int8_t *n * If p != NULL, we want to search the parentage tree * for a matching OpenOwner and use that. */ - nfscl_filllockowner(p->td_proc, own, F_POSIX); + if (NFSHASONEOPENOWN(VFSTONFS(vnode_mount(vp)))) + nfscl_filllockowner(NULL, own, F_POSIX); + else + nfscl_filllockowner(p->td_proc, own, F_POSIX); lp = NULL; error = nfscl_getopen(&clp->nfsc_owner, nfhp, fhlen, own, own, mode, &lp, &op); @@ -679,15 +703,19 @@ nfscl_getopen(struct nfsclownerhead *ohp * with the open owner. */ APPLESTATIC void -nfscl_ownerrelease(struct nfsclowner *owp, __unused int error, - __unused int candelete, int unlocked) +nfscl_ownerrelease(struct nfsmount *nmp, struct nfsclowner *owp, + __unused int error, __unused int candelete, int unlocked) { if (owp == NULL) return; NFSLOCKCLSTATE(); - if (!unlocked) - nfscl_lockunlock(&owp->nfsow_rwlock); + if (unlocked == 0) { + if (NFSHASONEOPENOWN(nmp)) + nfsv4_relref(&owp->nfsow_rwlock); + else + nfscl_lockunlock(&owp->nfsow_rwlock); + } nfscl_clrelease(owp->nfsow_clp); NFSUNLOCKCLSTATE(); } @@ -696,7 +724,8 @@ nfscl_ownerrelease(struct nfsclowner *ow * Release use of an open structure under an open owner. */ APPLESTATIC void -nfscl_openrelease(struct nfsclopen *op, int error, int candelete) +nfscl_openrelease(struct nfsmount *nmp, struct nfsclopen *op, int error, + int candelete) { struct nfsclclient *clp; struct nfsclowner *owp; @@ -705,7 +734,10 @@ nfscl_openrelease(struct nfsclopen *op, return; NFSLOCKCLSTATE(); owp = op->nfso_own; - nfscl_lockunlock(&owp->nfsow_rwlock); + if (NFSHASONEOPENOWN(nmp)) + nfsv4_relref(&owp->nfsow_rwlock); + else + nfscl_lockunlock(&owp->nfsow_rwlock); clp = owp->nfsow_clp; if (error && candelete && op->nfso_opencnt == 0) nfscl_freeopen(op, 0); @@ -997,7 +1029,10 @@ nfscl_getbytelock(vnode_t vp, u_int64_t } else { nfscl_filllockowner(id, own, flags); ownp = own; - nfscl_filllockowner(p->td_proc, openown, F_POSIX); + if (NFSHASONEOPENOWN(VFSTONFS(vnode_mount(vp)))) + nfscl_filllockowner(NULL, openown, F_POSIX); + else + nfscl_filllockowner(p->td_proc, openown, F_POSIX); openownp = openown; } if (!recovery) { @@ -1725,6 +1760,7 @@ nfscl_cleanupkext(struct nfsclclient *cl struct nfsclowner *owp, *nowp; struct nfsclopen *op; struct nfscllockowner *lp, *nlp; + struct nfscldeleg *dp; NFSPROCLISTLOCK(); NFSLOCKCLSTATE(); @@ -1738,6 +1774,20 @@ nfscl_cleanupkext(struct nfsclclient *cl if (nfscl_procdoesntexist(owp->nfsow_owner)) nfscl_cleanup_common(clp, owp->nfsow_owner); } + + /* + * For the single open_owner case, these lock owners need to be + * checked to see if they still exist separately. + * This is because nfscl_procdoesntexist() never returns true for + * the single open_owner so that the above doesn't ever call + * nfscl_cleanup_common(). + */ + TAILQ_FOREACH(dp, &clp->nfsc_deleg, nfsdl_list) { + LIST_FOREACH_SAFE(lp, &dp->nfsdl_lock, nfsl_list, nlp) { + if (nfscl_procdoesntexist(lp->nfsl_owner)) + nfscl_cleanup_common(clp, lp->nfsl_owner); + } + } NFSUNLOCKCLSTATE(); NFSPROCLISTUNLOCK(); } Modified: head/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvfsops.c Thu Apr 13 20:36:40 2017 (r316791) +++ head/sys/fs/nfsclient/nfs_clvfsops.c Thu Apr 13 21:54:19 2017 (r316792) @@ -592,6 +592,12 @@ nfs_decode_args(struct mount *mp, struct nmp->nm_flag &= ~NFSMNT_RDIRPLUS; } + /* Clear ONEOPENOWN for NFSv2, 3 and 4.0. */ + if (nmp->nm_minorvers == 0) { + argp->flags &= ~NFSMNT_ONEOPENOWN; + nmp->nm_flag &= ~NFSMNT_ONEOPENOWN; + } + /* Re-bind if rsrvd port requested and wasn't on one */ adjsock = !(nmp->nm_flag & NFSMNT_RESVPORT) && (argp->flags & NFSMNT_RESVPORT); @@ -727,7 +733,7 @@ static const char *nfs_opts[] = { "from" "resvport", "readahead", "hostname", "timeo", "timeout", "addr", "fh", "nfsv3", "sec", "principal", "nfsv4", "gssname", "allgssname", "dirpath", "minorversion", "nametimeo", "negnametimeo", "nocto", "noncontigwr", - "pnfs", "wcommitsize", + "pnfs", "wcommitsize", "oneopenown", NULL }; /* @@ -962,6 +968,8 @@ nfs_mount(struct mount *mp) args.flags |= NFSMNT_NONCONTIGWR; if (vfs_getopt(mp->mnt_optnew, "pnfs", NULL, NULL) == 0) args.flags |= NFSMNT_PNFS; + if (vfs_getopt(mp->mnt_optnew, "oneopenown", NULL, NULL) == 0) + args.flags |= NFSMNT_ONEOPENOWN; if (vfs_getopt(mp->mnt_optnew, "readdirsize", (void **)&opt, NULL) == 0) { if (opt == NULL) { vfs_mount_error(mp, "illegal readdirsize"); @@ -1172,8 +1180,8 @@ nfs_mount(struct mount *mp) /* * When doing an update, we can't change version, - * security, switch lockd strategies or change cookie - * translation + * security, switch lockd strategies, change cookie + * translation or switch oneopenown. */ args.flags = (args.flags & ~(NFSMNT_NFSV3 | @@ -1181,6 +1189,7 @@ nfs_mount(struct mount *mp) NFSMNT_KERB | NFSMNT_INTEGRITY | NFSMNT_PRIVACY | + NFSMNT_ONEOPENOWN | NFSMNT_NOLOCKD /*|NFSMNT_XLATECOOKIE*/)) | (nmp->nm_flag & (NFSMNT_NFSV3 | @@ -1188,6 +1197,7 @@ nfs_mount(struct mount *mp) NFSMNT_KERB | NFSMNT_INTEGRITY | NFSMNT_PRIVACY | + NFSMNT_ONEOPENOWN | NFSMNT_NOLOCKD /*|NFSMNT_XLATECOOKIE*/)); nfs_decode_args(mp, nmp, &args, NULL, td->td_ucred, td); goto out; @@ -1946,6 +1956,8 @@ void nfscl_retopts(struct nfsmount *nmp, &blen); nfscl_printopt(nmp, (nmp->nm_flag & NFSMNT_PNFS) != 0, ",pnfs", &buf, &blen); + nfscl_printopt(nmp, (nmp->nm_flag & NFSMNT_ONEOPENOWN) != 0 && + nmp->nm_minorvers > 0, ",oneopenown", &buf, &blen); } nfscl_printopt(nmp, (nmp->nm_flag & NFSMNT_NFSV3) != 0, "nfsv3", &buf, &blen); Modified: head/sys/nfsclient/nfsargs.h ============================================================================== --- head/sys/nfsclient/nfsargs.h Thu Apr 13 20:36:40 2017 (r316791) +++ head/sys/nfsclient/nfsargs.h Thu Apr 13 21:54:19 2017 (r316792) @@ -76,7 +76,7 @@ struct nfs_args { #define NFSMNT_MAXGRPS 0x00000020 /* set maximum grouplist size */ #define NFSMNT_INT 0x00000040 /* allow interrupts on hard mount */ #define NFSMNT_NOCONN 0x00000080 /* Don't Connect the socket */ -/* 0x100 free, was NFSMNT_NQNFS */ +#define NFSMNT_ONEOPENOWN 0x00000100 /* Use one OpenOwner for NFSv4.1 */ #define NFSMNT_NFSV3 0x00000200 /* Use NFS Version 3 protocol */ #define NFSMNT_KERB 0x00000400 /* Use RPCSEC_GSS/Krb5 */ #define NFSMNT_DUMBTIMR 0x00000800 /* Don't estimate rtt dynamically */ From owner-svn-src-head@freebsd.org Thu Apr 13 22:05:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B1C6D3CD8C; Thu, 13 Apr 2017 22:05:25 +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 5CFCCF4B; Thu, 13 Apr 2017 22:05:25 +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 v3DM5OMK062862; Thu, 13 Apr 2017 22:05:24 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3DM5Okw062861; Thu, 13 Apr 2017 22:05:24 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201704132205.v3DM5Okw062861@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Thu, 13 Apr 2017 22:05:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316793 - head/sbin/mount_nfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 22:05:25 -0000 Author: rmacklem Date: Thu Apr 13 22:05:24 2017 New Revision: 316793 URL: https://svnweb.freebsd.org/changeset/base/316793 Log: Document the "oneopenown" option added by r316792. This is a content change. MFC after: 2 weeks Modified: head/sbin/mount_nfs/mount_nfs.8 Modified: head/sbin/mount_nfs/mount_nfs.8 ============================================================================== --- head/sbin/mount_nfs/mount_nfs.8 Thu Apr 13 21:54:19 2017 (r316792) +++ head/sbin/mount_nfs/mount_nfs.8 Thu Apr 13 22:05:24 2017 (r316793) @@ -28,7 +28,7 @@ .\" @(#)mount_nfs.8 8.3 (Berkeley) 3/29/95 .\" $FreeBSD$ .\" -.Dd September 10, 2016 +.Dd April 13, 2017 .Dt MOUNT_NFS 8 .Os .Sh NAME @@ -201,6 +201,14 @@ The only minor version currently support This option is only meaningful when used with the .Cm nfsv4 option. +.It Cm oneopenown +Make a minor version 1 of the NFS Version 4 protocol mount use a single OpenOwner +for all Opens. +This may be useful for a server with a very low limit on OpenOwners, such as +AmazonEFS. +It can only be used with an NFSv4.1 mount. +It may not work correctly when Delegations are being issued by a server, +but note that the AmazonEFS server does not issued delegations at this time. .It Cm pnfs Enable support for parallel NFS (pNFS) for minor version 1 of the NFS Version 4 protocol. From owner-svn-src-head@freebsd.org Thu Apr 13 22:07:36 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 50750D3CE6B; Thu, 13 Apr 2017 22:07:36 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B65C10EA; Thu, 13 Apr 2017 22:07:36 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3DM7ZuR062981; Thu, 13 Apr 2017 22:07:35 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3DM7Z8a062979; Thu, 13 Apr 2017 22:07:35 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201704132207.v3DM7Z8a062979@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 13 Apr 2017 22:07:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316794 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 22:07:36 -0000 Author: bdrewery Date: Thu Apr 13 22:07:34 2017 New Revision: 316794 URL: https://svnweb.freebsd.org/changeset/base/316794 Log: Cache compiler metadata and reuse it at installworld time. Right after cross-tools, a compiler-metadata.mk file is created that stores all of the bsd.compiler.mk metadata. It is then read in with a fail-safe during installworld time. The file is explicitly removed when invoking cross-tools to ensure that a stale file is not left around from odd manual 'make _cross-tools' -> 'make installworld' invocations. This fixes several issues: - With WITH_SYSTEM_COMPILER (default yes on head and no on releng/11.0): If you build on a system where the bootstrap compiler does not build due to the host compiler matching the in-tree one, but then installworld on another system where that logic fails (a bootstrap compiler is needed), the installworld immediately fails with: sh: cc: not found Note that fixing this logic may then hit a case where a rebuild is attempted in installworld. Normally cc would be ran with 'CFLAGS+=ERROR-tried-to-rebuild-during-make-install' to cause an error such as: cc: error: no such file or directory: 'ERROR-tried-to-rebuild-during-make-install' However, now it will just fail with the 'cc: not found' error. Inspection of the compile line will show 'ERROR-tried-to-rebuild-during-make-install'; It's not useful to set CC to anything other than 'cc' during install as it is more helpful to see the attempted compile rather than some other bogus error. - This now avoids running bsd.compiler.mk (cc executions) even more during installworld. There are compiler-dependent SUBDIR in the tree which required having a compiler during install. There is at least 1 case where CC is still executed in the install, such as from a LOOKUP!= in secure/lib/libcrypto/Makefile.inc checking for 'vzeroall' support. This is not significant for installworld as the lookup has a fallback (and hides its error) and only modifies CFLAGS, thus it's not worth fixing. PR: 212877 MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/Makefile head/Makefile.inc1 Modified: head/Makefile ============================================================================== --- head/Makefile Thu Apr 13 22:05:24 2017 (r316793) +++ head/Makefile Thu Apr 13 22:07:34 2017 (r316794) @@ -127,7 +127,7 @@ TGTS= all all-man buildenv buildenvvars installworld kernel-toolchain libraries lint maninstall \ obj objlink rerelease showconfig tags toolchain update \ _worldtmp _legacy _bootstrap-tools _cleanobj _obj \ - _build-tools _cross-tools _includes _libraries \ + _build-tools _compiler-metadata _cross-tools _includes _libraries \ build32 distribute32 install32 buildsoft distributesoft installsoft \ builddtb xdev xdev-build xdev-install \ xdev-links native-xtools stageworld stagekernel stage-packages \ Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Apr 13 22:05:24 2017 (r316793) +++ head/Makefile.inc1 Thu Apr 13 22:07:34 2017 (r316794) @@ -78,6 +78,19 @@ MK_CLANG_BOOTSTRAP= no MK_GCC_BOOTSTRAP= no .endif +MAKEOBJDIRPREFIX?= /usr/obj +.if ${MACHINE} == ${TARGET} && ${MACHINE_ARCH} == ${TARGET_ARCH} && !defined(CROSS_BUILD_TESTING) +OBJTREE= ${MAKEOBJDIRPREFIX} +.else +OBJTREE= ${MAKEOBJDIRPREFIX}/${TARGET}.${TARGET_ARCH} +.endif + +# Pull in compiler metadata from buildworld/toolchain if possible to avoid +# running CC from bsd.compiler.mk. +.if make(installworld) || make(install) +.-include "${OBJTREE}${.CURDIR}/compiler-metadata.mk" +.endif + # Pull in COMPILER_TYPE and COMPILER_FREEBSD_VERSION early. .include .include "share/mk/src.opts.mk" @@ -163,6 +176,20 @@ CROSSENV+= COMPILER_VERSION=${X_COMPILER COMPILER_FREEBSD_VERSION=${X_COMPILER_FREEBSD_VERSION} .endif .endif +# Store some compiler metadata for use in installworld where we don't +# want to invoke CC at all. +_COMPILER_METADATA_VARS= COMPILER_VERSION \ + COMPILER_TYPE \ + COMPILER_FEATURES \ + COMPILER_FREEBSD_VERSION +compiler-metadata.mk: .PHONY .META + @: > ${.TARGET} + @echo ".info Using cached compiler metadata from build at $$(hostname) on $$(date)" \ + > ${.TARGET} +.for v in ${_COMPILER_METADATA_VARS} + @echo "${v}=${${v}}" >> ${.TARGET} +.endfor + @echo ".export ${_COMPILER_METADATA_VARS}" >> ${.TARGET} # Handle external binutils. .if defined(CROSS_TOOLCHAIN_PREFIX) @@ -304,7 +331,6 @@ SVN= ${_P}/${_S} .endif SVNFLAGS?= -r HEAD -MAKEOBJDIRPREFIX?= /usr/obj .if !defined(OSRELDATE) .if exists(/usr/include/osreldate.h) OSRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \ @@ -401,11 +427,6 @@ BUILD_ARCH!= uname -p .error To cross-build, set TARGET_ARCH. .endif .endif -.if ${MACHINE} == ${TARGET} && ${MACHINE_ARCH} == ${TARGET_ARCH} && !defined(CROSS_BUILD_TESTING) -OBJTREE= ${MAKEOBJDIRPREFIX} -.else -OBJTREE= ${MAKEOBJDIRPREFIX}/${TARGET}.${TARGET_ARCH} -.endif WORLDTMP= ${OBJTREE}${.CURDIR}/tmp BPATH= ${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/bin XPATH= ${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin @@ -766,8 +787,15 @@ _cross-tools: @echo "--------------------------------------------------------------" @echo ">>> stage 3: cross tools" @echo "--------------------------------------------------------------" + @rm -f ${.OBJDIR}/compiler-metadata.mk ${_+_}cd ${.CURDIR}; ${XMAKE} cross-tools ${_+_}cd ${.CURDIR}; ${XMAKE} kernel-tools +_compiler-metadata: + @echo + @echo "--------------------------------------------------------------" + @echo ">>> stage 3.1: recording compiler metadata" + @echo "--------------------------------------------------------------" + ${_+_}cd ${.CURDIR}; ${WMAKE} compiler-metadata.mk _includes: @echo @echo "--------------------------------------------------------------" @@ -801,6 +829,7 @@ WMAKE_TGTS+= _worldtmp _legacy WMAKE_TGTS+= _bootstrap-tools .endif WMAKE_TGTS+= _cleanobj _obj _build-tools _cross-tools +WMAKE_TGTS+= _compiler-metadata WMAKE_TGTS+= _includes _libraries WMAKE_TGTS+= everything .if defined(LIBCOMPAT) && empty(SUBDIR_OVERRIDE) From owner-svn-src-head@freebsd.org Thu Apr 13 22:59:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30E81D3D2F5; Thu, 13 Apr 2017 22:59:19 +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 DCFD1F33; Thu, 13 Apr 2017 22:59: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 v3DMxIos083418; Thu, 13 Apr 2017 22:59:18 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3DMxHPs083416; Thu, 13 Apr 2017 22:59:17 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201704132259.v3DMxHPs083416@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Thu, 13 Apr 2017 22:59:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316795 - in head/usr.sbin/ctm: ctm_dequeue ctm_smail X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 22:59:19 -0000 Author: cem Date: Thu Apr 13 22:59:17 2017 New Revision: 316795 URL: https://svnweb.freebsd.org/changeset/base/316795 Log: ctm: Fix some trivial argv buffer overruns It may not do the right thing with these obviously wrong inputs, but at least it won't smash the stack. Reported by: Coverity (CWE-120) CIDs: 1006697, 1006698 Sponsored by: Dell EMC Isilon Modified: head/usr.sbin/ctm/ctm_dequeue/ctm_dequeue.c head/usr.sbin/ctm/ctm_smail/ctm_smail.c Modified: head/usr.sbin/ctm/ctm_dequeue/ctm_dequeue.c ============================================================================== --- head/usr.sbin/ctm/ctm_dequeue/ctm_dequeue.c Thu Apr 13 22:07:34 2017 (r316794) +++ head/usr.sbin/ctm/ctm_dequeue/ctm_dequeue.c Thu Apr 13 22:59:17 2017 (r316795) @@ -115,7 +115,8 @@ main(int argc, char **argv) if (ftsent->fts_info != FTS_F || ftsent->fts_name[0] == '.') continue; - sprintf(filename, "%s/%s", queue_dir, ftsent->fts_name); + snprintf(filename, sizeof(filename), "%s/%s", queue_dir, + ftsent->fts_name); fd = open(filename, O_RDONLY); if (fd < 0) { Modified: head/usr.sbin/ctm/ctm_smail/ctm_smail.c ============================================================================== --- head/usr.sbin/ctm/ctm_smail/ctm_smail.c Thu Apr 13 22:07:34 2017 (r316794) +++ head/usr.sbin/ctm/ctm_smail/ctm_smail.c Thu Apr 13 22:59:17 2017 (r316795) @@ -190,13 +190,13 @@ chop_and_send(FILE *dfp, char *delta, lo * Construct the tmp queue file name of a delta piece. */ #define mk_tmp_name(fn,qd,p) \ - sprintf((fn), "%s/.%08ld.%03d", (qd), (long)getpid(), (p)) + snprintf((fn), sizeof(fn), "%s/.%08ld.%03d", (qd), (long)getpid(), (p)) /* * Construct the final queue file name of a delta piece. */ #define mk_queue_name(fn,qd,d,p,n) \ - sprintf((fn), "%s/%s+%03d-%03d", (qd), (d), (p), (n)) + snprintf((fn), sizeof(fn), "%s/%s+%03d-%03d", (qd), (d), (p), (n)) /* * Carve our CTM delta into pieces, encode them, and queue them. From owner-svn-src-head@freebsd.org Thu Apr 13 23:00:27 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8239CD3D376; Thu, 13 Apr 2017 23:00:27 +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 546CAF9; Thu, 13 Apr 2017 23:00: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 v3DN0QxK083540; Thu, 13 Apr 2017 23:00:26 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3DN0QGN083539; Thu, 13 Apr 2017 23:00:26 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201704132300.v3DN0QGN083539@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 13 Apr 2017 23:00:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316796 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 23:00:27 -0000 Author: jkim Date: Thu Apr 13 23:00:26 2017 New Revision: 316796 URL: https://svnweb.freebsd.org/changeset/base/316796 Log: Attempt to clear logos more thoroughly. PR: 202288 Reviewed by: cem Modified: head/sys/dev/vt/vt_cpulogos.c Modified: head/sys/dev/vt/vt_cpulogos.c ============================================================================== --- head/sys/dev/vt/vt_cpulogos.c Thu Apr 13 22:59:17 2017 (r316795) +++ head/sys/dev/vt/vt_cpulogos.c Thu Apr 13 23:00:26 2017 (r316796) @@ -153,6 +153,7 @@ vt_fini_logos(void *dummy __unused) struct winsize wsz; term_pos_t size; unsigned int i; + int row; if (!vt_draw_logo_cpus) return; @@ -170,7 +171,7 @@ vt_fini_logos(void *dummy __unused) vt_draw_logo_cpus = 0; VT_UNLOCK(vd); - for (i = 0; i < VT_MAXWINDOWS; i++) { + for (i = row = 0; i < VT_MAXWINDOWS; i++) { vw = vd->vd_windows[i]; if (vw == NULL) continue; @@ -193,11 +194,16 @@ vt_fini_logos(void *dummy __unused) vt_compute_drawable_area(vw); if (vd->vd_curwindow == vw) { + row = vw->vw_draw_area.tr_begin.tp_row; vd->vd_flags |= VDF_INVALID; vt_resume_flush_timer(vd, 0); } VT_UNLOCK(vd); } + + if (row > 0 && vd->vd_driver->vd_drawrect != NULL) + vd->vd_driver->vd_drawrect(vd, 0, 0, vd->vd_width, row - 1, + 1, TC_BLACK); } static void From owner-svn-src-head@freebsd.org Thu Apr 13 23:22:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 576F0D3DA14; Thu, 13 Apr 2017 23:22:19 +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 2995DFE7; Thu, 13 Apr 2017 23:22:19 +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 v3DNMIHk095363; Thu, 13 Apr 2017 23:22:18 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3DNMIWh095362; Thu, 13 Apr 2017 23:22:18 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201704132322.v3DNMIWh095362@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Thu, 13 Apr 2017 23:22:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316797 - head/usr.bin/banner X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 23:22:19 -0000 Author: cem Date: Thu Apr 13 23:22:18 2017 New Revision: 316797 URL: https://svnweb.freebsd.org/changeset/base/316797 Log: banner(6): Squash a harmless coverity warning The destination buffer is sized as the sum of program argument lengths, so it has plenty of room for *argv. Appease Coverity by using strlcpy instead of strcpy. Similar to a nearby cleanup performed in r316500. No functional change. Reported by: Coverity (CWE-120) CID: 1006703 Sponsored by: Dell EMC Isilon Modified: head/usr.bin/banner/banner.c Modified: head/usr.bin/banner/banner.c ============================================================================== --- head/usr.bin/banner/banner.c Thu Apr 13 23:00:26 2017 (r316796) +++ head/usr.bin/banner/banner.c Thu Apr 13 23:22:18 2017 (r316797) @@ -1062,7 +1062,7 @@ main(int argc, char *argv[]) j += strlen(argv[i]) + 1; if ((message = malloc((size_t)j)) == NULL) err(1, "malloc"); - strcpy(message, *argv); + strlcpy(message, *argv, j); while (*++argv) { strlcat(message, " ", j); strlcat(message, *argv, j); From owner-svn-src-head@freebsd.org Fri Apr 14 00:14:42 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14321D3CC23; Fri, 14 Apr 2017 00:14:42 +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 C0A54EA8; Fri, 14 Apr 2017 00:14:41 +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 v3E0EeBE015640; Fri, 14 Apr 2017 00:14:40 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3E0EeC2015639; Fri, 14 Apr 2017 00:14:40 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201704140014.v3E0EeC2015639@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Fri, 14 Apr 2017 00:14:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316799 - head/sbin/restore X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 00:14:42 -0000 Author: cem Date: Fri Apr 14 00:14:40 2017 New Revision: 316799 URL: https://svnweb.freebsd.org/changeset/base/316799 Log: restore(8): Prevent some heap overflows The environment variable TMPDIR was copied unchecked into a fixed-size heap buffer. Use a length-limiting snprintf in place of ordinary sprintf to prevent the overflow. Long TMPDIR variables can still cause odd truncated filenames, which may be undesirable. Reported by: Coverity (CWE-120) CIDs: 1006706, 1006707 Sponsored by: Dell EMC Isilon Modified: head/sbin/restore/dirs.c Modified: head/sbin/restore/dirs.c ============================================================================== --- head/sbin/restore/dirs.c Fri Apr 14 00:13:33 2017 (r316798) +++ head/sbin/restore/dirs.c Fri Apr 14 00:14:40 2017 (r316799) @@ -140,7 +140,8 @@ extractdirs(int genmode) vprintf(stdout, "Extract directories from tape\n"); if ((tmpdir = getenv("TMPDIR")) == NULL || tmpdir[0] == '\0') tmpdir = _PATH_TMP; - (void) sprintf(dirfile, "%s/rstdir%jd", tmpdir, (intmax_t)dumpdate); + (void) snprintf(dirfile, sizeof(dirfile), "%s/rstdir%jd", tmpdir, + (intmax_t)dumpdate); if (command != 'r' && command != 'R') { (void) strcat(dirfile, "-XXXXXX"); fd = mkstemp(dirfile); @@ -153,8 +154,8 @@ extractdirs(int genmode) done(1); } if (genmode != 0) { - (void) sprintf(modefile, "%s/rstmode%jd", tmpdir, - (intmax_t)dumpdate); + (void) snprintf(modefile, sizeof(modefile), "%s/rstmode%jd", + tmpdir, (intmax_t)dumpdate); if (command != 'r' && command != 'R') { (void) strcat(modefile, "-XXXXXX"); fd = mkstemp(modefile); @@ -568,8 +569,8 @@ setdirmodes(int flags) if ((tmpdir = getenv("TMPDIR")) == NULL || tmpdir[0] == '\0') tmpdir = _PATH_TMP; if (command == 'r' || command == 'R') - (void) sprintf(modefile, "%s/rstmode%jd", tmpdir, - (intmax_t)dumpdate); + (void) snprintf(modefile, sizeof(modefile), "%s/rstmode%jd", + tmpdir, (intmax_t)dumpdate); if (modefile[0] == '#') { panic("modefile not defined\n"); fprintf(stderr, "directory mode, owner, and times not set\n"); From owner-svn-src-head@freebsd.org Fri Apr 14 00:20:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF3D0D3CE71; Fri, 14 Apr 2017 00:20:56 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id A7C9B28C; Fri, 14 Apr 2017 00:20:56 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id v3E0KtiZ048427 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 13 Apr 2017 17:20:55 -0700 (PDT) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id v3E0KtjJ048426; Thu, 13 Apr 2017 17:20:55 -0700 (PDT) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 13 Apr 2017 17:20:55 -0700 From: Gleb Smirnoff To: Julian Elischer Cc: "Andrey V. Elsukov" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r316435 - in head: sbin/ipfw sys/conf sys/modules sys/modules/ipfw_pmod sys/netpfil/ipfw/pmod Message-ID: <20170414002055.GG1033@FreeBSD.org> References: <201704030307.v3337mfs039014@repo.freebsd.org> <2fb0e146-8486-09c3-0c44-75c71a74fc2f@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2fb0e146-8486-09c3-0c44-75c71a74fc2f@freebsd.org> User-Agent: Mutt/1.8.0 (2017-02-23) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 00:20:56 -0000 On Mon, Apr 03, 2017 at 10:12:11PM +0800, Julian Elischer wrote: J> On 3/4/17 11:07 am, Andrey V. Elsukov wrote: J> > Author: ae J> > Date: Mon Apr 3 03:07:48 2017 J> > New Revision: 316435 J> > URL: https://svnweb.freebsd.org/changeset/base/316435 J> J> it was always my intention to hook netgraph modules into ipfw in this way Yes, ng_tcpmss (written in 2004) and ng_ipfw (written in 2005) allow to do that. However, this comes with extra CPU cycles, and design flaws. Packet filter is functional and synchronous, while netgraph isn't. Coupling them requires hacks. So nothing wrong in ipfw module. -- Totus tuus, Glebius. From owner-svn-src-head@freebsd.org Fri Apr 14 00:22:29 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C02B0D3A045; Fri, 14 Apr 2017 00:22:29 +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 909E18AD; Fri, 14 Apr 2017 00:22:29 +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 v3E0MSRl019703; Fri, 14 Apr 2017 00:22:28 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3E0MSZC019702; Fri, 14 Apr 2017 00:22:28 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201704140022.v3E0MSZC019702@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Fri, 14 Apr 2017 00:22:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316801 - head/sbin/fsck X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 00:22:29 -0000 Author: cem Date: Fri Apr 14 00:22:28 2017 New Revision: 316801 URL: https://svnweb.freebsd.org/changeset/base/316801 Log: fsck(8): Don't overrun mount device buffer Apply a very similar fix to r299460 (fsck_ffs) to apparently duplicated code in fsck. Reported by: Coverity CID: 1006789 Sponsored by: Dell EMC Isilon Modified: head/sbin/fsck/fsutil.c Modified: head/sbin/fsck/fsutil.c ============================================================================== --- head/sbin/fsck/fsutil.c Fri Apr 14 00:15:34 2017 (r316800) +++ head/sbin/fsck/fsutil.c Fri Apr 14 00:22:28 2017 (r316801) @@ -172,6 +172,9 @@ getmntpt(const char *name) statfsp = &mntbuf[i]; dev_name = statfsp->f_mntfromname; if (*dev_name != '/') { + if (strlen(_PATH_DEV) + strlen(dev_name) + 1 > + sizeof(statfsp->f_mntfromname)) + continue; strcpy(device, _PATH_DEV); strcat(device, dev_name); strcpy(statfsp->f_mntfromname, device); From owner-svn-src-head@freebsd.org Fri Apr 14 00:36:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3ABED3A466; Fri, 14 Apr 2017 00:36:46 +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 93FAAE31; Fri, 14 Apr 2017 00:36:46 +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 v3E0ajHl024021; Fri, 14 Apr 2017 00:36:45 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3E0aja0024020; Fri, 14 Apr 2017 00:36:45 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201704140036.v3E0aja0024020@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Fri, 14 Apr 2017 00:36:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316802 - head/usr.sbin/bsdinstall/partedit X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 00:36:46 -0000 Author: cem Date: Fri Apr 14 00:36:45 2017 New Revision: 316802 URL: https://svnweb.freebsd.org/changeset/base/316802 Log: bsdinstall(8): Sprinkle a snprintf to fixed size buffer Use a snprintf to write an environment variable to a fixed-size buffer to avoid stack overflow. Reported by: Coverity (CWE-120) CID: 1238926 Sponsored by: Dell EMC Isilon Modified: head/usr.sbin/bsdinstall/partedit/gpart_ops.c Modified: head/usr.sbin/bsdinstall/partedit/gpart_ops.c ============================================================================== --- head/usr.sbin/bsdinstall/partedit/gpart_ops.c Fri Apr 14 00:22:28 2017 (r316801) +++ head/usr.sbin/bsdinstall/partedit/gpart_ops.c Fri Apr 14 00:36:45 2017 (r316802) @@ -146,7 +146,7 @@ newfs_command(const char *fstype, char * strcpy(command, "zpool create -f -m none "); if (getenv("BSDINSTALL_TMPBOOT") != NULL) { char zfsboot_path[MAXPATHLEN]; - sprintf(zfsboot_path, "%s/zfs", + snprintf(zfsboot_path, sizeof(zfsboot_path), "%s/zfs", getenv("BSDINSTALL_TMPBOOT")); mkdir(zfsboot_path, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH); From owner-svn-src-head@freebsd.org Fri Apr 14 00:45:10 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 42A27D3A803; Fri, 14 Apr 2017 00:45:10 +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 0F2183CE; Fri, 14 Apr 2017 00:45:09 +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 v3E0j9Mf027846; Fri, 14 Apr 2017 00:45:09 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3E0j9je027845; Fri, 14 Apr 2017 00:45:09 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201704140045.v3E0j9je027845@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Fri, 14 Apr 2017 00:45:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316803 - head/contrib/tcp_wrappers X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 00:45:10 -0000 Author: cem Date: Fri Apr 14 00:45:09 2017 New Revision: 316803 URL: https://svnweb.freebsd.org/changeset/base/316803 Log: tcp_wrappers: Sprinkle some bounds-checked string copying It isn't clear if tcpd.c is even compiled in FreeBSD. Reported by: Coverity CIDs: 1006710, 1006804 Sponsored by: Dell EMC Isilon Modified: head/contrib/tcp_wrappers/tcpd.c Modified: head/contrib/tcp_wrappers/tcpd.c ============================================================================== --- head/contrib/tcp_wrappers/tcpd.c Fri Apr 14 00:36:45 2017 (r316802) +++ head/contrib/tcp_wrappers/tcpd.c Fri Apr 14 00:45:09 2017 (r316803) @@ -62,10 +62,10 @@ char **argv; */ if (argv[0][0] == '/') { - strcpy(path, argv[0]); + strlcpy(path, argv[0], sizeof(path)); argv[0] = strrchr(argv[0], '/') + 1; } else { - sprintf(path, "%s/%s", REAL_DAEMON_DIR, argv[0]); + snprintf(path, sizeof(path), "%s/%s", REAL_DAEMON_DIR, argv[0]); } /* From owner-svn-src-head@freebsd.org Fri Apr 14 01:56:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD75AD3DBE3; Fri, 14 Apr 2017 01:56:16 +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 9D91491D; Fri, 14 Apr 2017 01:56:16 +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 v3E1uFD1057115; Fri, 14 Apr 2017 01:56:15 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3E1uFNi057114; Fri, 14 Apr 2017 01:56:15 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201704140156.v3E1uFNi057114@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 14 Apr 2017 01:56:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316804 - head/sys/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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 01:56:16 -0000 Author: glebius Date: Fri Apr 14 01:56:15 2017 New Revision: 316804 URL: https://svnweb.freebsd.org/changeset/base/316804 Log: Fix potential NULL deref. Found by: PVS Studio Modified: head/sys/netpfil/pf/pf_ioctl.c Modified: head/sys/netpfil/pf/pf_ioctl.c ============================================================================== --- head/sys/netpfil/pf/pf_ioctl.c Fri Apr 14 00:45:09 2017 (r316803) +++ head/sys/netpfil/pf/pf_ioctl.c Fri Apr 14 01:56:15 2017 (r316804) @@ -2428,11 +2428,12 @@ DIOCGETSTATES_full: #undef ERROUT DIOCCHANGEADDR_error: - if (newpa->kif) - pfi_kif_unref(newpa->kif); - PF_RULES_WUNLOCK(); - if (newpa != NULL) + if (newpa != NULL) { + if (newpa->kif) + pfi_kif_unref(newpa->kif); free(newpa, M_PFRULE); + } + PF_RULES_WUNLOCK(); if (kif != NULL) free(kif, PFI_MTYPE); break; From owner-svn-src-head@freebsd.org Fri Apr 14 02:24:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E2D8D3D44D; Fri, 14 Apr 2017 02:24:03 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 403EF8CD; Fri, 14 Apr 2017 02:24:03 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3E2O26V069084; Fri, 14 Apr 2017 02:24:02 GMT (envelope-from yongari@FreeBSD.org) Received: (from yongari@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3E2O2R0069083; Fri, 14 Apr 2017 02:24:02 GMT (envelope-from yongari@FreeBSD.org) Message-Id: <201704140224.v3E2O2R0069083@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: yongari set sender to yongari@FreeBSD.org using -f From: Pyun YongHyeon Date: Fri, 14 Apr 2017 02:24:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316805 - head/sys/dev/ae X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 02:24:03 -0000 Author: yongari Date: Fri Apr 14 02:24:02 2017 New Revision: 316805 URL: https://svnweb.freebsd.org/changeset/base/316805 Log: Fix a potentially forever loop. Found by: PVS-Studio Modified: head/sys/dev/ae/if_ae.c Modified: head/sys/dev/ae/if_ae.c ============================================================================== --- head/sys/dev/ae/if_ae.c Fri Apr 14 01:56:15 2017 (r316804) +++ head/sys/dev/ae/if_ae.c Fri Apr 14 02:24:02 2017 (r316805) @@ -1696,7 +1696,7 @@ ae_stop_txmac(ae_softc_t *sc) /* * Wait for IDLE state. */ - for (i = 0; i < AE_IDLE_TIMEOUT; i--) { + for (i = 0; i < AE_IDLE_TIMEOUT; i++) { val = AE_READ_4(sc, AE_IDLE_REG); if ((val & (AE_IDLE_TXMAC | AE_IDLE_DMAREAD)) == 0) break; From owner-svn-src-head@freebsd.org Fri Apr 14 02:33:27 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F28BD3D7B8; Fri, 14 Apr 2017 02:33:27 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 10FABF0F; Fri, 14 Apr 2017 02:33:26 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3E2XQlG072937; Fri, 14 Apr 2017 02:33:26 GMT (envelope-from yongari@FreeBSD.org) Received: (from yongari@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3E2XQCh072936; Fri, 14 Apr 2017 02:33:26 GMT (envelope-from yongari@FreeBSD.org) Message-Id: <201704140233.v3E2XQCh072936@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: yongari set sender to yongari@FreeBSD.org using -f From: Pyun YongHyeon Date: Fri, 14 Apr 2017 02:33:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316806 - head/sys/dev/fxp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 02:33:27 -0000 Author: yongari Date: Fri Apr 14 02:33:26 2017 New Revision: 316806 URL: https://svnweb.freebsd.org/changeset/base/316806 Log: Remove unnecessary comparison. Found by: PVS-Studio Modified: head/sys/dev/fxp/if_fxp.c Modified: head/sys/dev/fxp/if_fxp.c ============================================================================== --- head/sys/dev/fxp/if_fxp.c Fri Apr 14 02:24:02 2017 (r316805) +++ head/sys/dev/fxp/if_fxp.c Fri Apr 14 02:33:26 2017 (r316806) @@ -2212,18 +2212,15 @@ fxp_stop(struct fxp_softc *sc) * Release any xmit buffers. */ txp = sc->fxp_desc.tx_list; - if (txp != NULL) { - for (i = 0; i < FXP_NTXCB; i++) { - if (txp[i].tx_mbuf != NULL) { - bus_dmamap_sync(sc->fxp_txmtag, txp[i].tx_map, - BUS_DMASYNC_POSTWRITE); - bus_dmamap_unload(sc->fxp_txmtag, - txp[i].tx_map); - m_freem(txp[i].tx_mbuf); - txp[i].tx_mbuf = NULL; - /* clear this to reset csum offload bits */ - txp[i].tx_cb->tbd[0].tb_addr = 0; - } + for (i = 0; i < FXP_NTXCB; i++) { + if (txp[i].tx_mbuf != NULL) { + bus_dmamap_sync(sc->fxp_txmtag, txp[i].tx_map, + BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(sc->fxp_txmtag, txp[i].tx_map); + m_freem(txp[i].tx_mbuf); + txp[i].tx_mbuf = NULL; + /* clear this to reset csum offload bits */ + txp[i].tx_cb->tbd[0].tb_addr = 0; } } bus_dmamap_sync(sc->cbl_tag, sc->cbl_map, From owner-svn-src-head@freebsd.org Fri Apr 14 03:20:35 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9EE6CD3D390; Fri, 14 Apr 2017 03:20:35 +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 6E4E6776; Fri, 14 Apr 2017 03:20:35 +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 v3E3KYsQ089788; Fri, 14 Apr 2017 03:20:34 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3E3KY03089787; Fri, 14 Apr 2017 03:20:34 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201704140320.v3E3KY03089787@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 14 Apr 2017 03:20:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316807 - head/contrib/gcc/config/rs6000 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 03:20:35 -0000 Author: jhibbits Date: Fri Apr 14 03:20:34 2017 New Revision: 316807 URL: https://svnweb.freebsd.org/changeset/base/316807 Log: Default powerpcspe processor target to 8540 This prevents internal compiler errors when -mcpu is omitted. Modified: head/contrib/gcc/config/rs6000/freebsdspe.h Modified: head/contrib/gcc/config/rs6000/freebsdspe.h ============================================================================== --- head/contrib/gcc/config/rs6000/freebsdspe.h Fri Apr 14 02:33:26 2017 (r316806) +++ head/contrib/gcc/config/rs6000/freebsdspe.h Fri Apr 14 03:20:34 2017 (r316807) @@ -28,6 +28,7 @@ #undef TARGET_DEFAULT #define TARGET_DEFAULT (MASK_POWERPC | MASK_NEW_MNEMONICS | MASK_STRICT_ALIGN) +#undef PROCESSOR_DEFAULT #undef TARGET_SPE_ABI #undef TARGET_SPE #undef TARGET_E500 @@ -36,6 +37,7 @@ #undef TARGET_E500_SINGLE #undef TARGET_E500_DOUBLE +#define PROCESSOR_DEFAULT PROCESSOR_PPC8540 #define TARGET_SPE_ABI rs6000_spe_abi #define TARGET_SPE rs6000_spe #define TARGET_E500 (rs6000_cpu == PROCESSOR_PPC8540) From owner-svn-src-head@freebsd.org Fri Apr 14 03:23:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB857D3D618; Fri, 14 Apr 2017 03:23:04 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BBCABBA7; Fri, 14 Apr 2017 03:23:04 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3E3N3Tc093705; Fri, 14 Apr 2017 03:23:03 GMT (envelope-from yongari@FreeBSD.org) Received: (from yongari@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3E3N3M0093704; Fri, 14 Apr 2017 03:23:03 GMT (envelope-from yongari@FreeBSD.org) Message-Id: <201704140323.v3E3N3M0093704@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: yongari set sender to yongari@FreeBSD.org using -f From: Pyun YongHyeon Date: Fri, 14 Apr 2017 03:23:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316808 - head/sys/dev/txp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 03:23:05 -0000 Author: yongari Date: Fri Apr 14 03:23:03 2017 New Revision: 316808 URL: https://svnweb.freebsd.org/changeset/base/316808 Log: Remove unnecessary check aginst NULL. txp_ext_command() with TXP_CMD_WAIT argument allocates a response buffer. If the allocation fails, txp_ext_command() returns an error and it's handed in caller. Found by: PVS-Studio Modified: head/sys/dev/txp/if_txp.c Modified: head/sys/dev/txp/if_txp.c ============================================================================== --- head/sys/dev/txp/if_txp.c Fri Apr 14 03:20:34 2017 (r316807) +++ head/sys/dev/txp/if_txp.c Fri Apr 14 03:23:03 2017 (r316808) @@ -400,8 +400,7 @@ txp_attach(device_t dev) "Unknown Typhoon sleep image version: %u:0x%08x\n", rsp->rsp_numdesc, p2); } - if (rsp != NULL) - free(rsp, M_DEVBUF); + free(rsp, M_DEVBUF); sc->sc_xcvr = TXP_XCVR_AUTO; txp_command(sc, TXP_CMD_XCVR_SELECT, TXP_XCVR_AUTO, 0, 0, From owner-svn-src-head@freebsd.org Fri Apr 14 03:54:38 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3FBBD3DD34; Fri, 14 Apr 2017 03:54:37 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4551D09; Fri, 14 Apr 2017 03:54:37 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3E3saZr005933; Fri, 14 Apr 2017 03:54:36 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3E3sawZ005932; Fri, 14 Apr 2017 03:54:36 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201704140354.v3E3sawZ005932@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 14 Apr 2017 03:54:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316809 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 03:54:38 -0000 Author: cy Date: Fri Apr 14 03:54:36 2017 New Revision: 316809 URL: https://svnweb.freebsd.org/changeset/base/316809 Log: Fix a use after free panic in ipfilter's fragment processing. Memory is malloc'd, then a search for a match in the fragment table is made and if the fragment matches, the wrong fragment table is freed, causing a use after free panic. This commit fixes this. A symptom of the problem is a kernel page fault in bcopy() called by ipf_frag_lookup() at line 715 in ip_frag.c. Another symptom is a kernel page fault in ipf_frag_delete() when called by ipf_frag_expire() via ipf_slowtimer(). MFC after: 1 week Modified: head/sys/contrib/ipfilter/netinet/ip_frag.c Modified: head/sys/contrib/ipfilter/netinet/ip_frag.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_frag.c Fri Apr 14 03:23:03 2017 (r316808) +++ head/sys/contrib/ipfilter/netinet/ip_frag.c Fri Apr 14 03:54:36 2017 (r316809) @@ -474,7 +474,7 @@ ipfr_frag_new(softc, softf, fin, pass, t IPFR_CMPSZ)) { RWLOCK_EXIT(lock); FBUMPD(ifs_exists); - KFREE(fra); + KFREE(fran); return NULL; } From owner-svn-src-head@freebsd.org Fri Apr 14 04:11:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A541D38042; Fri, 14 Apr 2017 04:11:21 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.139]) (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 41617767; Fri, 14 Apr 2017 04:11:20 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id ysV2cyvQ1C3JIysV3c8uUc; Thu, 13 Apr 2017 22:06:22 -0600 X-Authority-Analysis: v=2.2 cv=XbT59Mx5 c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=AzvcPWV-tVgA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=xWCwz7DcOcEKQ8ft5MQA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy8 [10.2.2.6]) by spqr.komquats.com (Postfix) with ESMTPS id 0CBFE2124; Thu, 13 Apr 2017 21:06:20 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v3E46JOb017269; Thu, 13 Apr 2017 21:06:19 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201704140406.v3E46JOb017269@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: Cy Schubert cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r316809 - head/sys/contrib/ipfilter/netinet In-Reply-To: Message from Cy Schubert of "Fri, 14 Apr 2017 03:54:36 -0000." <201704140354.v3E3sawZ005932@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 13 Apr 2017 21:06:19 -0700 X-CMAE-Envelope: MS4wfHppKTTm7OjMT1D+bGn27TSyxJBRd9efzprQQmGtxN5j4QgXETI8J5jPf8+zpmId+k2rYU9ePcmV1CigwDQ2sibdRk7BOW24RAv1DxRxxqAE+/ai5+GL fOYF4JZufQWePkjYvDwKQYWJvYnFX5m0CZX0cZv2v6IJJopReVRuyPcxHl2GWKAqF4RwCm63xd/XvxWxLMsZVqjtQlUsF7WiG8i91ek21WzztPLnJo7P6KGo k4IIKr1WoGM0laxblEQnYrCQEJmBtX+1n/i8jmQ4MXkGwf3pDDBfx2x/IvdAKRiK X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 04:11:21 -0000 In message <201704140354.v3E3sawZ005932@repo.freebsd.org>, Cy Schubert writes: > Author: cy > Date: Fri Apr 14 03:54:36 2017 > New Revision: 316809 > URL: https://svnweb.freebsd.org/changeset/base/316809 > > Log: > Fix a use after free panic in ipfilter's fragment processing. > Memory is malloc'd, then a search for a match in the fragment table > is made and if the fragment matches, the wrong fragment table is > freed, causing a use after free panic. This commit fixes this. > > A symptom of the problem is a kernel page fault in bcopy() called by > ipf_frag_lookup() at line 715 in ip_frag.c. Another symptom is a > kernel page fault in ipf_frag_delete() when called by ipf_frag_expire() > via ipf_slowtimer(). > > MFC after: 1 week > > Modified: > head/sys/contrib/ipfilter/netinet/ip_frag.c > > Modified: head/sys/contrib/ipfilter/netinet/ip_frag.c > ============================================================================= > = > --- head/sys/contrib/ipfilter/netinet/ip_frag.c Fri Apr 14 03:23:03 201 > 7 (r316808) > +++ head/sys/contrib/ipfilter/netinet/ip_frag.c Fri Apr 14 03:54:36 201 > 7 (r316809) > @@ -474,7 +474,7 @@ ipfr_frag_new(softc, softf, fin, pass, t > IPFR_CMPSZ)) { > RWLOCK_EXIT(lock); > FBUMPD(ifs_exists); > - KFREE(fra); > + KFREE(fran); > return NULL; > } > > It's surprising how few people/sites have encountered this panic. I only encounter this problem on the ShawOpen network anywhere in Edmonton, AB, Canada. However all other networks, including ShawOpen networks in other cities in Canada don't pass fragments that cause this panic, which by looking at the code should happen frequently. There is a similar panic, with a sometimes similar backtrace to the panics I experiences in FreeBSD, documented in NetBSD-7. -- 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-head@freebsd.org Fri Apr 14 05:12:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C84DCD3D2AA; Fri, 14 Apr 2017 05:12:02 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7ED091B0; Fri, 14 Apr 2017 05:12:02 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3E5C1gX038999; Fri, 14 Apr 2017 05:12:01 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3E5C1Ug038997; Fri, 14 Apr 2017 05:12:01 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201704140512.v3E5C1Ug038997@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 14 Apr 2017 05:12:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316810 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 05:12:02 -0000 Author: cy Date: Fri Apr 14 05:12:01 2017 New Revision: 316810 URL: https://svnweb.freebsd.org/changeset/base/316810 Log: Keep state incorrectly assumes keep frags. This is counter to the ipfilter man pages. This also currently restricts keep frags to only when keep state is used, which is redundant because keep state currently assumes keep frags. This commit fixes this. To the user this change means that to maintain the current behaviour one must add keep frags to any ipfilter keep state rule (as documented in the man pages). This patch also allows the flexability to specify and use keep frags separate from keep state, as documented in an example in ipf.conf.5, instead of the currently broken behaviour. Relnotes: yes Modified: head/sys/contrib/ipfilter/netinet/fil.c head/sys/contrib/ipfilter/netinet/ip_state.c Modified: head/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/fil.c Fri Apr 14 03:54:36 2017 (r316809) +++ head/sys/contrib/ipfilter/netinet/fil.c Fri Apr 14 05:12:01 2017 (r316810) @@ -2786,7 +2786,7 @@ ipf_firewall(fin, passp) * If the rule has "keep frag" and the packet is actually a fragment, * then create a fragment state entry. */ - if ((pass & (FR_KEEPFRAG|FR_KEEPSTATE)) == FR_KEEPFRAG) { + if (pass & FR_KEEPFRAG) { if (fin->fin_flx & FI_FRAG) { if (ipf_frag_new(softc, fin, pass) == -1) { LBUMP(ipf_stats[out].fr_bnfr); Modified: head/sys/contrib/ipfilter/netinet/ip_state.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_state.c Fri Apr 14 03:54:36 2017 (r316809) +++ head/sys/contrib/ipfilter/netinet/ip_state.c Fri Apr 14 05:12:01 2017 (r316810) @@ -3414,7 +3414,8 @@ ipf_state_check(fin, passp) * If this packet is a fragment and the rule says to track fragments, * then create a new fragment cache entry. */ - if ((fin->fin_flx & FI_FRAG) && FR_ISPASS(is->is_pass)) + if (((fin->fin_flx & FI_FRAG) && FR_ISPASS(is->is_pass)) && + ((is->is_pass & FR_KEEPFRAG))) (void) ipf_frag_new(softc, fin, is->is_pass); /* From owner-svn-src-head@freebsd.org Fri Apr 14 05:13:52 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B157D3D36D; Fri, 14 Apr 2017 05:13:52 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF9CA6F1; Fri, 14 Apr 2017 05:13:51 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3E5DpES039092; Fri, 14 Apr 2017 05:13:51 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3E5Dp7v039091; Fri, 14 Apr 2017 05:13:51 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201704140513.v3E5Dp7v039091@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 14 Apr 2017 05:13:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316811 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 05:13:52 -0000 Author: cy Date: Fri Apr 14 05:13:50 2017 New Revision: 316811 URL: https://svnweb.freebsd.org/changeset/base/316811 Log: Add missing free()'s after calls to randomize(). PR: NetBSD PR/50559 Obtained from: Netbsd radix_ipf.c r1.6 MFC after: 1 week Modified: head/sys/contrib/ipfilter/netinet/radix_ipf.c Modified: head/sys/contrib/ipfilter/netinet/radix_ipf.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/radix_ipf.c Fri Apr 14 05:12:01 2017 (r316810) +++ head/sys/contrib/ipfilter/netinet/radix_ipf.c Fri Apr 14 05:13:50 2017 (r316811) @@ -38,7 +38,7 @@ static void buildnodes __P((addrfamily_t static ipf_rdx_node_t *ipf_rx_find_addr __P((ipf_rdx_node_t *, u_32_t *)); static ipf_rdx_node_t *ipf_rx_lookup __P((ipf_rdx_head_t *, addrfamily_t *, addrfamily_t *)); -static ipf_rdx_node_t *ipf_rx_match __P((ipf_rdx_head_t *, addrfamily_t *)); +/* $NetBSD: radix_ipf.c,v 1.6 2015/12/15 12:30:34 christos Exp $ */ /* * Foreword. @@ -1509,6 +1509,8 @@ random_add(rnh) add_addr(rnh, i, order[i]); checktree(rnh); } + + free(order); } @@ -1526,5 +1528,7 @@ random_delete(rnh) delete_addr(rnh, i); checktree(rnh); } + + free(order); } #endif /* RDX_DEBUG */ From owner-svn-src-head@freebsd.org Fri Apr 14 05:18:43 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4EF6D3D403; Fri, 14 Apr 2017 05:18:43 +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 76FE58C7; Fri, 14 Apr 2017 05:18:43 +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 v3E5IgP8039392; Fri, 14 Apr 2017 05:18:42 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3E5IgQ6039391; Fri, 14 Apr 2017 05:18:42 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201704140518.v3E5IgQ6039391@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 14 Apr 2017 05:18:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316812 - head/sys/dev/hyperv/input X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 05:18:43 -0000 Author: sephe Date: Fri Apr 14 05:18:42 2017 New Revision: 316812 URL: https://svnweb.freebsd.org/changeset/base/316812 Log: hyperv/kbd: Remove unnecessary assignment. Reported by: PVS MFC after: 3 days Sponsored by: Microsoft Modified: head/sys/dev/hyperv/input/hv_kbdc.c Modified: head/sys/dev/hyperv/input/hv_kbdc.c ============================================================================== --- head/sys/dev/hyperv/input/hv_kbdc.c Fri Apr 14 05:13:50 2017 (r316811) +++ head/sys/dev/hyperv/input/hv_kbdc.c Fri Apr 14 05:18:42 2017 (r316812) @@ -298,7 +298,6 @@ hv_kbd_read_channel(struct vmbus_channel int ret = 0; hv_kbd_sc *sc = (hv_kbd_sc*)context; - channel = vmbus_get_channel(sc->dev); buf = sc->buf; buflen = sc->buflen; for (;;) { From owner-svn-src-head@freebsd.org Fri Apr 14 05:25:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 220E3D3D701; Fri, 14 Apr 2017 05:25: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 E85A8E4A; Fri, 14 Apr 2017 05:25: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 v3E5PMVd043289; Fri, 14 Apr 2017 05:25:22 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3E5PMer043288; Fri, 14 Apr 2017 05:25:22 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201704140525.v3E5PMer043288@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 14 Apr 2017 05:25:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316813 - head/sys/dev/hyperv/storvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 05:25:23 -0000 Author: sephe Date: Fri Apr 14 05:25:21 2017 New Revision: 316813 URL: https://svnweb.freebsd.org/changeset/base/316813 Log: hyperv/storvsc: Use ULL for 64bits value shift. Reported by: PVS MFC after: 3 days Sponsored by: Microsoft Modified: head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Fri Apr 14 05:18:42 2017 (r316812) +++ head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Fri Apr 14 05:25:21 2017 (r316813) @@ -1771,7 +1771,7 @@ storvsc_check_bounce_buffer_sgl(bus_dma_ } pre_aligned = TRUE; } else { - tmp_bits |= 1 << i; + tmp_bits |= 1ULL << i; if (!pre_aligned) { if (phys_addr != vtophys(sgl[i-1].ds_addr + sgl[i-1].ds_len)) { From owner-svn-src-head@freebsd.org Fri Apr 14 05:25:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73F1AD3D764; Fri, 14 Apr 2017 05:25:41 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 422ACFB6; Fri, 14 Apr 2017 05:25:41 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3E5Pest043344; Fri, 14 Apr 2017 05:25:40 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3E5Pebv043343; Fri, 14 Apr 2017 05:25:40 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201704140525.v3E5Pebv043343@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 14 Apr 2017 05:25:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316814 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 05:25:41 -0000 Author: cy Date: Fri Apr 14 05:25:40 2017 New Revision: 316814 URL: https://svnweb.freebsd.org/changeset/base/316814 Log: Document change in (incorrect) ipfilter behaviour fixed by r316810. Keep frags can be used with keep state independently. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Fri Apr 14 05:25:21 2017 (r316813) +++ head/UPDATING Fri Apr 14 05:25:40 2017 (r316814) @@ -51,6 +51,15 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 ****************************** SPECIAL WARNING: ****************************** +20170413: + As of r316810 for ipfilter, keep frags is no longer assumed when + keep state is specified in a rule. r316810 aligns ipfilter with + documentation in man pages separating keep frags from keep state. + This allows keep state to specified without forcing keep frags + and allows keep frags to be specified independently of keep state. + To maintain previous behaviour, also specify keep frags with + keep state (as documented in ipf.conf.5. + 20170407: arm64 builds now use the base system LLD 4.0.0 linker by default, instead of requiring that the aarch64-binutils port or package be From owner-svn-src-head@freebsd.org Fri Apr 14 05:29:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 841FBD3D840; Fri, 14 Apr 2017 05:29:28 +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 4D4BC1B8; Fri, 14 Apr 2017 05:29:28 +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 v3E5TRYi043507; Fri, 14 Apr 2017 05:29:27 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3E5TRbd043506; Fri, 14 Apr 2017 05:29:27 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201704140529.v3E5TRbd043506@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 14 Apr 2017 05:29:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316815 - head/sys/dev/hyperv/utilities X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 05:29:28 -0000 Author: sephe Date: Fri Apr 14 05:29:27 2017 New Revision: 316815 URL: https://svnweb.freebsd.org/changeset/base/316815 Log: hyperv/kvp: Remove always false condition. Reported by: PVS MFC after: 3 days Sponsored by: Microsoft Modified: head/sys/dev/hyperv/utilities/hv_kvp.c Modified: head/sys/dev/hyperv/utilities/hv_kvp.c ============================================================================== --- head/sys/dev/hyperv/utilities/hv_kvp.c Fri Apr 14 05:25:40 2017 (r316814) +++ head/sys/dev/hyperv/utilities/hv_kvp.c Fri Apr 14 05:29:27 2017 (r316815) @@ -516,7 +516,7 @@ hv_kvp_convert_usermsg_to_hostmsg(struct /* Use values by string */ host_exchg_data->value_type = HV_REG_SZ; - if ((hkey_len < 0) || (hvalue_len < 0)) + if (hvalue_len < 0) return (EINVAL); return (0); From owner-svn-src-head@freebsd.org Fri Apr 14 05:32:05 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25EDBD3DA3F; Fri, 14 Apr 2017 05:32:05 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EAAE090B; Fri, 14 Apr 2017 05:32:04 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3E5W4ha045363; Fri, 14 Apr 2017 05:32:04 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3E5W4EE045362; Fri, 14 Apr 2017 05:32:04 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201704140532.v3E5W4EE045362@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 14 Apr 2017 05:32:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316816 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 05:32:05 -0000 Author: cy Date: Fri Apr 14 05:32:03 2017 New Revision: 316816 URL: https://svnweb.freebsd.org/changeset/base/316816 Log: Add missing bracket (typo). Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Fri Apr 14 05:29:27 2017 (r316815) +++ head/UPDATING Fri Apr 14 05:32:03 2017 (r316816) @@ -58,7 +58,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 This allows keep state to specified without forcing keep frags and allows keep frags to be specified independently of keep state. To maintain previous behaviour, also specify keep frags with - keep state (as documented in ipf.conf.5. + keep state (as documented in ipf.conf.5). 20170407: arm64 builds now use the base system LLD 4.0.0 linker by default, From owner-svn-src-head@freebsd.org Fri Apr 14 06:33:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E587D3D841; Fri, 14 Apr 2017 06:33:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 508C32E5; Fri, 14 Apr 2017 06:33:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3E6XFoZ072894; Fri, 14 Apr 2017 06:33:15 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3E6XFf3072893; Fri, 14 Apr 2017 06:33:15 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201704140633.v3E6XFf3072893@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 14 Apr 2017 06:33:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316817 - head/etc/pam.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 06:33:16 -0000 Author: ngie Date: Fri Apr 14 06:33:15 2017 New Revision: 316817 URL: https://svnweb.freebsd.org/changeset/base/316817 Log: Derive {AT,RCMDS}{DIR,MODE} from FILE{DIR,MODE} This reduces duplicity a bit. MFC after: 7 weeks Sponsored by: Dell EMC Isilon Modified: head/etc/pam.d/Makefile Modified: head/etc/pam.d/Makefile ============================================================================== --- head/etc/pam.d/Makefile Fri Apr 14 05:32:03 2017 (r316816) +++ head/etc/pam.d/Makefile Fri Apr 14 06:33:15 2017 (r316817) @@ -17,24 +17,25 @@ FILES= README \ telnetd \ xdm +FILESDIR= /etc/pam.d +FILESMODE= 644 + .if ${MK_AT} != "no" FILESGROUPS+= AT AT+= atrun ATPACKAGE+= at -ATDIR= /etc/pam.d -ATMODE= 644 +ATDIR= ${FILESDIR} +ATMODE= ${FILESMODE} .endif .if ${MK_RCMDS} != "no" FILESGROUPS+= RCMDS RCMDS+= rsh RCMDSPACKAGE+= rcmds -RCMDSDIR= /etc/pam.d -RCMDSMODE= 644 +RCMDSDIR= ${FILESDIR} +RCMDSMODE= ${FILESMODE} .endif -FILESDIR= /etc/pam.d -FILESMODE= 644 FILESMODE_README= 444 LINKS= ${FILESDIR}/ftpd ${FILESDIR}/ftp From owner-svn-src-head@freebsd.org Fri Apr 14 06:42:48 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4CFF8D3DA82; Fri, 14 Apr 2017 06:42:48 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EDEE899A; Fri, 14 Apr 2017 06:42:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3E6glMF076752; Fri, 14 Apr 2017 06:42:47 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3E6gkOi076750; Fri, 14 Apr 2017 06:42:46 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201704140642.v3E6gkOi076750@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 14 Apr 2017 06:42:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316818 - in head: etc/pam.d tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 06:42:48 -0000 Author: ngie Date: Fri Apr 14 06:42:46 2017 New Revision: 316818 URL: https://svnweb.freebsd.org/changeset/base/316818 Log: Conditionally install /etc/pam.d/ftp* and /etc/pam.d/telnetd /etc/pam.d/ftp* should be installed with MK_FTP != no and /etc/pam.d/telnetd should be installed when MK_TELNET != no. MFC after: 7 weeks Sponsored by: Dell EMC Isilon Modified: head/etc/pam.d/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/etc/pam.d/Makefile ============================================================================== --- head/etc/pam.d/Makefile Fri Apr 14 06:33:15 2017 (r316817) +++ head/etc/pam.d/Makefile Fri Apr 14 06:42:46 2017 (r316818) @@ -8,13 +8,11 @@ FILESGROUPS= FILES FILES= README \ cron \ - ftpd \ imap \ login \ other \ passwd pop3 \ sshd su system \ - telnetd \ xdm FILESDIR= /etc/pam.d @@ -28,6 +26,15 @@ ATDIR= ${FILESDIR} ATMODE= ${FILESMODE} .endif +.if ${MK_FTP} != "no" +FILESGROUPS+= FTP +FTP+= ftpd +FTPPACKAGE+= ftp +FTPDIR= ${FILESDIR} +FTPMODE= ${FILESMODE} +LINKS= ${FILESDIR}/ftpd ${FILESDIR}/ftp +.endif + .if ${MK_RCMDS} != "no" FILESGROUPS+= RCMDS RCMDS+= rsh @@ -36,7 +43,14 @@ RCMDSDIR= ${FILESDIR} RCMDSMODE= ${FILESMODE} .endif +.if ${MK_TELNET} != "no" +FILESGROUPS+= TELNET +TELNET+= telnetd +TELNETPACKAGE+= telnet +TELNETDIR= ${FILESDIR} +TELNETMODE= ${FILESMODE} +.endif + FILESMODE_README= 444 -LINKS= ${FILESDIR}/ftpd ${FILESDIR}/ftp .include Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Fri Apr 14 06:33:15 2017 (r316817) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Fri Apr 14 06:42:46 2017 (r316818) @@ -1613,6 +1613,8 @@ OLD_FILES+=usr/share/man/man8/fmtree.8.g .if ${MK_FTP} == no OLD_FILES+=etc/ftpusers +OLD_FILES+=etc/pam.d/ftp +OLD_FILES+=etc/pam.d/ftpd OLD_FILES+=etc/rc.d/ftpd OLD_FILES+=usr/bin/ftp OLD_FILES+=usr/bin/gate-ftp @@ -8037,6 +8039,7 @@ OLD_FILES+=usr/share/nls/uk_UA.UTF-8/tcs .endif .if ${MK_TELNET} == no +OLD_FILES+=etc/pam.d/telnetd OLD_FILES+=usr/bin/telnet OLD_FILES+=usr/libexec/telnetd OLD_FILES+=usr/share/man/man1/telnet.1.gz From owner-svn-src-head@freebsd.org Fri Apr 14 07:27:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A0FAD3D49F; Fri, 14 Apr 2017 07:27:25 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE3F7C59; Fri, 14 Apr 2017 07:27:24 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3E7RO4T093115; Fri, 14 Apr 2017 07:27:24 GMT (envelope-from yongari@FreeBSD.org) Received: (from yongari@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3E7ROsb093114; Fri, 14 Apr 2017 07:27:24 GMT (envelope-from yongari@FreeBSD.org) Message-Id: <201704140727.v3E7ROsb093114@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: yongari set sender to yongari@FreeBSD.org using -f From: Pyun YongHyeon Date: Fri, 14 Apr 2017 07:27:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316819 - head/sys/dev/msk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 07:27:25 -0000 Author: yongari Date: Fri Apr 14 07:27:23 2017 New Revision: 316819 URL: https://svnweb.freebsd.org/changeset/base/316819 Log: Remove unnecessary assignment. Found by: PVS-Studio Modified: head/sys/dev/msk/if_msk.c Modified: head/sys/dev/msk/if_msk.c ============================================================================== --- head/sys/dev/msk/if_msk.c Fri Apr 14 06:42:46 2017 (r316818) +++ head/sys/dev/msk/if_msk.c Fri Apr 14 07:27:23 2017 (r316819) @@ -4493,7 +4493,7 @@ msk_sysctl_node(struct msk_if_softc *sc_ tree = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "stats", CTLFLAG_RD, NULL, "MSK Statistics"); - schild = child = SYSCTL_CHILDREN(tree); + schild = SYSCTL_CHILDREN(tree); tree = SYSCTL_ADD_NODE(ctx, schild, OID_AUTO, "rx", CTLFLAG_RD, NULL, "MSK RX Statistics"); child = SYSCTL_CHILDREN(tree); From owner-svn-src-head@freebsd.org Fri Apr 14 08:11:51 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58A9DD3C2BE; Fri, 14 Apr 2017 08:11:51 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D3AF149E; Fri, 14 Apr 2017 08:11:51 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3E8BoPW011806; Fri, 14 Apr 2017 08:11:50 GMT (envelope-from yongari@FreeBSD.org) Received: (from yongari@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3E8BoSa011805; Fri, 14 Apr 2017 08:11:50 GMT (envelope-from yongari@FreeBSD.org) Message-Id: <201704140811.v3E8BoSa011805@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: yongari set sender to yongari@FreeBSD.org using -f From: Pyun YongHyeon Date: Fri, 14 Apr 2017 08:11:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316820 - head/sys/dev/jme X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 08:11:51 -0000 Author: yongari Date: Fri Apr 14 08:11:50 2017 New Revision: 316820 URL: https://svnweb.freebsd.org/changeset/base/316820 Log: Don't overwrite mapped bits. Found by: PVS-Studio Modified: head/sys/dev/jme/if_jme.c Modified: head/sys/dev/jme/if_jme.c ============================================================================== --- head/sys/dev/jme/if_jme.c Fri Apr 14 07:27:23 2017 (r316819) +++ head/sys/dev/jme/if_jme.c Fri Apr 14 08:11:50 2017 (r316820) @@ -557,7 +557,7 @@ jme_map_intr_vector(struct jme_softc *sc bzero(map, sizeof(map)); /* Map Tx interrupts source to MSI/MSIX vector 2. */ - map[MSINUM_REG_INDEX(N_INTR_TXQ0_COMP)] = + map[MSINUM_REG_INDEX(N_INTR_TXQ0_COMP)] |= MSINUM_INTR_SOURCE(2, N_INTR_TXQ0_COMP); map[MSINUM_REG_INDEX(N_INTR_TXQ1_COMP)] |= MSINUM_INTR_SOURCE(2, N_INTR_TXQ1_COMP); @@ -579,37 +579,37 @@ jme_map_intr_vector(struct jme_softc *sc MSINUM_INTR_SOURCE(2, N_INTR_TXQ_COAL_TO); /* Map Rx interrupts source to MSI/MSIX vector 1. */ - map[MSINUM_REG_INDEX(N_INTR_RXQ0_COMP)] = + map[MSINUM_REG_INDEX(N_INTR_RXQ0_COMP)] |= MSINUM_INTR_SOURCE(1, N_INTR_RXQ0_COMP); - map[MSINUM_REG_INDEX(N_INTR_RXQ1_COMP)] = + map[MSINUM_REG_INDEX(N_INTR_RXQ1_COMP)] |= MSINUM_INTR_SOURCE(1, N_INTR_RXQ1_COMP); - map[MSINUM_REG_INDEX(N_INTR_RXQ2_COMP)] = + map[MSINUM_REG_INDEX(N_INTR_RXQ2_COMP)] |= MSINUM_INTR_SOURCE(1, N_INTR_RXQ2_COMP); - map[MSINUM_REG_INDEX(N_INTR_RXQ3_COMP)] = + map[MSINUM_REG_INDEX(N_INTR_RXQ3_COMP)] |= MSINUM_INTR_SOURCE(1, N_INTR_RXQ3_COMP); - map[MSINUM_REG_INDEX(N_INTR_RXQ0_DESC_EMPTY)] = + map[MSINUM_REG_INDEX(N_INTR_RXQ0_DESC_EMPTY)] |= MSINUM_INTR_SOURCE(1, N_INTR_RXQ0_DESC_EMPTY); - map[MSINUM_REG_INDEX(N_INTR_RXQ1_DESC_EMPTY)] = + map[MSINUM_REG_INDEX(N_INTR_RXQ1_DESC_EMPTY)] |= MSINUM_INTR_SOURCE(1, N_INTR_RXQ1_DESC_EMPTY); - map[MSINUM_REG_INDEX(N_INTR_RXQ2_DESC_EMPTY)] = + map[MSINUM_REG_INDEX(N_INTR_RXQ2_DESC_EMPTY)] |= MSINUM_INTR_SOURCE(1, N_INTR_RXQ2_DESC_EMPTY); - map[MSINUM_REG_INDEX(N_INTR_RXQ3_DESC_EMPTY)] = + map[MSINUM_REG_INDEX(N_INTR_RXQ3_DESC_EMPTY)] |= MSINUM_INTR_SOURCE(1, N_INTR_RXQ3_DESC_EMPTY); - map[MSINUM_REG_INDEX(N_INTR_RXQ0_COAL)] = + map[MSINUM_REG_INDEX(N_INTR_RXQ0_COAL)] |= MSINUM_INTR_SOURCE(1, N_INTR_RXQ0_COAL); - map[MSINUM_REG_INDEX(N_INTR_RXQ1_COAL)] = + map[MSINUM_REG_INDEX(N_INTR_RXQ1_COAL)] |= MSINUM_INTR_SOURCE(1, N_INTR_RXQ1_COAL); - map[MSINUM_REG_INDEX(N_INTR_RXQ2_COAL)] = + map[MSINUM_REG_INDEX(N_INTR_RXQ2_COAL)] |= MSINUM_INTR_SOURCE(1, N_INTR_RXQ2_COAL); - map[MSINUM_REG_INDEX(N_INTR_RXQ3_COAL)] = + map[MSINUM_REG_INDEX(N_INTR_RXQ3_COAL)] |= MSINUM_INTR_SOURCE(1, N_INTR_RXQ3_COAL); - map[MSINUM_REG_INDEX(N_INTR_RXQ0_COAL_TO)] = + map[MSINUM_REG_INDEX(N_INTR_RXQ0_COAL_TO)] |= MSINUM_INTR_SOURCE(1, N_INTR_RXQ0_COAL_TO); - map[MSINUM_REG_INDEX(N_INTR_RXQ1_COAL_TO)] = + map[MSINUM_REG_INDEX(N_INTR_RXQ1_COAL_TO)] |= MSINUM_INTR_SOURCE(1, N_INTR_RXQ1_COAL_TO); - map[MSINUM_REG_INDEX(N_INTR_RXQ2_COAL_TO)] = + map[MSINUM_REG_INDEX(N_INTR_RXQ2_COAL_TO)] |= MSINUM_INTR_SOURCE(1, N_INTR_RXQ2_COAL_TO); - map[MSINUM_REG_INDEX(N_INTR_RXQ3_COAL_TO)] = + map[MSINUM_REG_INDEX(N_INTR_RXQ3_COAL_TO)] |= MSINUM_INTR_SOURCE(1, N_INTR_RXQ3_COAL_TO); /* Map all other interrupts source to MSI/MSIX vector 0. */ From owner-svn-src-head@freebsd.org Fri Apr 14 08:27:43 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9BF32D3C6EA; Fri, 14 Apr 2017 08:27:43 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 601C31D09; Fri, 14 Apr 2017 08:27:43 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3E8Rgvl018534; Fri, 14 Apr 2017 08:27:42 GMT (envelope-from yongari@FreeBSD.org) Received: (from yongari@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3E8RgRK018533; Fri, 14 Apr 2017 08:27:42 GMT (envelope-from yongari@FreeBSD.org) Message-Id: <201704140827.v3E8RgRK018533@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: yongari set sender to yongari@FreeBSD.org using -f From: Pyun YongHyeon Date: Fri, 14 Apr 2017 08:27:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316821 - head/sys/dev/age X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 08:27:43 -0000 Author: yongari Date: Fri Apr 14 08:27:42 2017 New Revision: 316821 URL: https://svnweb.freebsd.org/changeset/base/316821 Log: Remove dead code. Modified: head/sys/dev/age/if_age.c Modified: head/sys/dev/age/if_age.c ============================================================================== --- head/sys/dev/age/if_age.c Fri Apr 14 08:11:50 2017 (r316820) +++ head/sys/dev/age/if_age.c Fri Apr 14 08:27:42 2017 (r316821) @@ -2161,11 +2161,6 @@ age_int_task(void *arg, int pending) sc->age_cdata.age_cmb_block_map, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); -#if 0 - printf("INTR: 0x%08x\n", status); - status &= ~INTR_DIS_DMA; - CSR_WRITE_4(sc, AGE_INTR_STATUS, status | INTR_DIS_INT); -#endif ifp = sc->age_ifp; if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { if ((status & INTR_CMB_RX) != 0) From owner-svn-src-head@freebsd.org Fri Apr 14 09:00:49 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA2EBD3D437; Fri, 14 Apr 2017 09:00:49 +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 A07B4DB3; Fri, 14 Apr 2017 09:00:49 +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 v3E90mni030552; Fri, 14 Apr 2017 09:00:48 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3E90mJU030549; Fri, 14 Apr 2017 09:00:48 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201704140900.v3E90mJU030549@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 14 Apr 2017 09:00:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316822 - in head/sys: kern netinet netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 09:00:50 -0000 Author: ae Date: Fri Apr 14 09:00:48 2017 New Revision: 316822 URL: https://svnweb.freebsd.org/changeset/base/316822 Log: Rework r316770 to make it protocol independent and general, like we do for streaming sockets. And do more cleanup in the sbappendaddr_locked_internal() to prevent leak information from existing mbuf to the one, that will be possible created later by netgraph. Suggested by: glebius Tested by: Irina Liakh MFC after: 1 week Modified: head/sys/kern/uipc_sockbuf.c head/sys/netinet/udp_usrreq.c head/sys/netinet6/udp6_usrreq.c Modified: head/sys/kern/uipc_sockbuf.c ============================================================================== --- head/sys/kern/uipc_sockbuf.c Fri Apr 14 08:27:42 2017 (r316821) +++ head/sys/kern/uipc_sockbuf.c Fri Apr 14 09:00:48 2017 (r316822) @@ -794,8 +794,20 @@ sbappendaddr_locked_internal(struct sock return (0); m->m_len = asa->sa_len; bcopy(asa, mtod(m, caddr_t), asa->sa_len); - if (m0) + if (m0) { m_clrprotoflags(m0); + m_tag_delete_chain(m0); + /* + * Clear some persistent info from pkthdr. + * We don't use m_demote(), because some netgraph consumers + * expect M_PKTHDR presence. + */ + m0->m_pkthdr.rcvif = NULL; + m0->m_pkthdr.flowid = 0; + m0->m_pkthdr.csum_flags = 0; + m0->m_pkthdr.fibnum = 0; + m0->m_pkthdr.rsstype = 0; + } if (ctrl_last) ctrl_last->m_next = m0; /* concatenate data to control */ else Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Fri Apr 14 08:27:42 2017 (r316821) +++ head/sys/netinet/udp_usrreq.c Fri Apr 14 09:00:48 2017 (r316822) @@ -372,9 +372,6 @@ udp_append(struct inpcb *inp, struct ip append_sa = (struct sockaddr *)&udp_in[0]; m_adj(n, off); - /* Clear any h/w csum flags as they are no longer valid. */ - n->m_pkthdr.csum_flags &= ~(CSUM_DATA_VALID | CSUM_IP_VALID); - so = inp->inp_socket; SOCKBUF_LOCK(&so->so_rcv); if (sbappendaddr_locked(&so->so_rcv, append_sa, n, opts) == 0) { Modified: head/sys/netinet6/udp6_usrreq.c ============================================================================== --- head/sys/netinet6/udp6_usrreq.c Fri Apr 14 08:27:42 2017 (r316821) +++ head/sys/netinet6/udp6_usrreq.c Fri Apr 14 09:00:48 2017 (r316822) @@ -187,9 +187,6 @@ udp6_append(struct inpcb *inp, struct mb } m_adj(n, off + sizeof(struct udphdr)); - /* Clear any h/w csum flags as they are no longer valid. */ - n->m_pkthdr.csum_flags &= ~CSUM_DATA_VALID; - so = inp->inp_socket; SOCKBUF_LOCK(&so->so_rcv); if (sbappendaddr_locked(&so->so_rcv, (struct sockaddr *)&fromsa[0], n, From owner-svn-src-head@freebsd.org Fri Apr 14 10:21:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6B3ED3C122; Fri, 14 Apr 2017 10:21:39 +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 A7121B8A; Fri, 14 Apr 2017 10:21:39 +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 v3EALcvI065857; Fri, 14 Apr 2017 10:21:38 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3EALcX1065856; Fri, 14 Apr 2017 10:21:38 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201704141021.v3EALcX1065856@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 14 Apr 2017 10:21:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316823 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 10:21:39 -0000 Author: ae Date: Fri Apr 14 10:21:38 2017 New Revision: 316823 URL: https://svnweb.freebsd.org/changeset/base/316823 Log: Fix the build. Reported by: lwhsu Modified: head/sys/kern/uipc_sockbuf.c Modified: head/sys/kern/uipc_sockbuf.c ============================================================================== --- head/sys/kern/uipc_sockbuf.c Fri Apr 14 09:00:48 2017 (r316822) +++ head/sys/kern/uipc_sockbuf.c Fri Apr 14 10:21:38 2017 (r316823) @@ -796,7 +796,7 @@ sbappendaddr_locked_internal(struct sock bcopy(asa, mtod(m, caddr_t), asa->sa_len); if (m0) { m_clrprotoflags(m0); - m_tag_delete_chain(m0); + m_tag_delete_chain(m0, NULL); /* * Clear some persistent info from pkthdr. * We don't use m_demote(), because some netgraph consumers From owner-svn-src-head@freebsd.org Fri Apr 14 11:19:10 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87F79D3D6B7; Fri, 14 Apr 2017 11:19:10 +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 3FFB8AB6; Fri, 14 Apr 2017 11:19:10 +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 v3EBJ9cM086894; Fri, 14 Apr 2017 11:19:09 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3EBJ9dH086893; Fri, 14 Apr 2017 11:19:09 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201704141119.v3EBJ9dH086893@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 14 Apr 2017 11:19:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316824 - head/sys/netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 11:19:10 -0000 Author: ae Date: Fri Apr 14 11:19:09 2017 New Revision: 316824 URL: https://svnweb.freebsd.org/changeset/base/316824 Log: The rule field in the ipfw_dyn_rule structure is used as storage to pass rule number and rule set to userland. In r272840 the kernel internal rule representation was changed and the rulenum field of struct ip_fw_rule got the type uint32_t, but userlevel representation still have the type uint16_t. To not overflow the size of pointer on the systems with 32-bit pointer size use separate variable to copy rulenum and set. Reported by: PVS-Studio MFC after: 1 week Modified: head/sys/netpfil/ipfw/ip_fw_dynamic.c Modified: head/sys/netpfil/ipfw/ip_fw_dynamic.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_dynamic.c Fri Apr 14 10:21:38 2017 (r316823) +++ head/sys/netpfil/ipfw/ip_fw_dynamic.c Fri Apr 14 11:19:09 2017 (r316824) @@ -1709,15 +1709,17 @@ ipfw_dyn_get_count(void) static void export_dyn_rule(ipfw_dyn_rule *src, ipfw_dyn_rule *dst) { + uint16_t rulenum; + rulenum = (uint16_t)src->rule->rulenum; memcpy(dst, src, sizeof(*src)); - memcpy(&(dst->rule), &(src->rule->rulenum), sizeof(src->rule->rulenum)); + memcpy(&dst->rule, &rulenum, sizeof(rulenum)); /* * store set number into high word of * dst->rule pointer. */ - memcpy((char *)&dst->rule + sizeof(src->rule->rulenum), - &(src->rule->set), sizeof(src->rule->set)); + memcpy((char *)&dst->rule + sizeof(rulenum), &src->rule->set, + sizeof(src->rule->set)); /* * store a non-null value in "next". * The userland code will interpret a @@ -1725,8 +1727,8 @@ export_dyn_rule(ipfw_dyn_rule *src, ipfw * for the last dynamic rule. */ memcpy(&dst->next, &dst, sizeof(dst)); - dst->expire = - TIME_LEQ(dst->expire, time_uptime) ? 0 : dst->expire - time_uptime; + dst->expire = TIME_LEQ(dst->expire, time_uptime) ? 0: + dst->expire - time_uptime; } /* From owner-svn-src-head@freebsd.org Fri Apr 14 11:41:10 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67D3FD3DDA2; Fri, 14 Apr 2017 11:41:10 +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 34C21876; Fri, 14 Apr 2017 11:41:10 +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 v3EBf9jr097086; Fri, 14 Apr 2017 11:41:09 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3EBf9MC097085; Fri, 14 Apr 2017 11:41:09 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201704141141.v3EBf9MC097085@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 14 Apr 2017 11:41:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316825 - head/sys/netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 11:41:10 -0000 Author: ae Date: Fri Apr 14 11:41:09 2017 New Revision: 316825 URL: https://svnweb.freebsd.org/changeset/base/316825 Log: Use address of specific union member instead of whole union address to fix PVS-Studio warnings. MFC after: 1 week Modified: head/sys/netpfil/ipfw/ip_fw_table_algo.c Modified: head/sys/netpfil/ipfw/ip_fw_table_algo.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_table_algo.c Fri Apr 14 11:19:09 2017 (r316824) +++ head/sys/netpfil/ipfw/ip_fw_table_algo.c Fri Apr 14 11:41:09 2017 (r316825) @@ -526,7 +526,8 @@ ta_dump_radix_tentry(void *ta_state, str #ifdef INET6 } else { xn = (struct radix_addr_xentry *)e; - memcpy(&tent->k, &xn->addr6.sin6_addr, sizeof(struct in6_addr)); + memcpy(&tent->k.addr6, &xn->addr6.sin6_addr, + sizeof(struct in6_addr)); tent->masklen = xn->masklen; tent->subtype = AF_INET6; tent->v.kidx = xn->value; @@ -1381,7 +1382,7 @@ ta_dump_chash_tentry(void *ta_state, str tent->v.kidx = ent->value; #ifdef INET6 } else { - memcpy(&tent->k, &ent->a.a6, sizeof(struct in6_addr)); + memcpy(&tent->k.addr6, &ent->a.a6, sizeof(struct in6_addr)); tent->masklen = cfg->mask6; tent->subtype = AF_INET6; tent->v.kidx = ent->value; @@ -3983,7 +3984,8 @@ ta_dump_kfib_tentry_int(struct sockaddr if (paddr->sa_family == AF_INET6) { addr6 = (struct sockaddr_in6 *)paddr; mask6 = (struct sockaddr_in6 *)pmask; - memcpy(&tent->k, &addr6->sin6_addr, sizeof(struct in6_addr)); + memcpy(&tent->k.addr6, &addr6->sin6_addr, + sizeof(struct in6_addr)); len = 128; if (mask6 != NULL) len = contigmask((uint8_t *)&mask6->sin6_addr, 128); From owner-svn-src-head@freebsd.org Fri Apr 14 11:52:48 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5110AD3C24D for ; Fri, 14 Apr 2017 11:52:48 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-yw0-x22b.google.com (mail-yw0-x22b.google.com [IPv6:2607:f8b0:4002:c05::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 1A709F9 for ; Fri, 14 Apr 2017 11:52:47 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-yw0-x22b.google.com with SMTP id l189so34882789ywb.0 for ; Fri, 14 Apr 2017 04:52:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=VwYDLFPpsVaKzUuZyRVhhej9gYF68lHZQ2JrSR2w3gE=; b=bCs4rk2CMJqDEJLueXyPBvAV3PwSo3MFBm9XgZRLcB/0NN7XwfLHxt3oi0dD6oZX5l 5RJrl0bOxErO+nF2eBaqd0jcYnqvjoL1WJc/xC0NG1oHU0cykUvKCJIE4hOMay/2sSvp MY8jtKiJrN8V+6ivQwAm5qcJ1zH58L+wOhcJjWXJ4weRexm/neaj2HlwVyzUuwwxsJOd lf2W9rhPv4k765BwqR6CWJCY4D4hVIpvFWi3iBCTOQ3Kc9wTNtZdc9a6lmXE3sxvtidT No1cswCHl79qkqUwT+AyVryb3x+MoKCKaeBvJM9OModU84T9HvA9KeDxtXZ9s14asLdW dvYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=VwYDLFPpsVaKzUuZyRVhhej9gYF68lHZQ2JrSR2w3gE=; b=Se4L0776NEXYkEEv36XnSeG2LKNeLcOcIrXF0XAMBl0U+Z0bIahAFK9XXvDe2b9oC5 AUQmlGIyVkbbvezOMoSGTNnlIsNbd96hgn+7ZT0h9cl4l3TPHpPm1K9+MBXMU6ZVMvnD RTgeP2dLKcO99nElGRYEOsu0qN9Gsi54/jkBk+OdUEpyBDiIc1oN1m13YOdQ40Zue97Y uzfCytqIlDt05mvXadwn1ErBGu1ICo7jVJtxpiO/7GAgsWnoHV6Z76xhVXN1Pdx/ZNV5 7889uPCP4m0rzDQG2t36FMVloYu6B5CNrpiafM0jz35NfjZ94O+jq8d7JMdDMW43YJy7 tJaA== X-Gm-Message-State: AN3rC/5VqXEcgEq5L5PdwhWl23eUUpU89jiapjkR1rO5Xns7RujdByCz 5KQLXkPWPNwbUu+stj4e73RvgPEP0w== X-Received: by 10.129.93.214 with SMTP id r205mr5669459ywb.95.1492170766731; Fri, 14 Apr 2017 04:52:46 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.105.198 with HTTP; Fri, 14 Apr 2017 04:52:16 -0700 (PDT) In-Reply-To: <201704141141.v3EBf9MC097085@repo.freebsd.org> References: <201704141141.v3EBf9MC097085@repo.freebsd.org> From: Ed Schouten Date: Fri, 14 Apr 2017 13:52:16 +0200 Message-ID: Subject: Re: svn commit: r316825 - head/sys/netpfil/ipfw To: "Andrey V. Elsukov" Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 11:52:48 -0000 Hi there, 2017-04-14 13:41 GMT+02:00 Andrey V. Elsukov : > - memcpy(&tent->k, &xn->addr6.sin6_addr, sizeof(struct in6_addr)); > + memcpy(&tent->k.addr6, &xn->addr6.sin6_addr, > + sizeof(struct in6_addr)); In this case the code could be abbreviated by simply using assignment, right? tent->k.addr6 = xn->addr6.sin6_addr; -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 From owner-svn-src-head@freebsd.org Fri Apr 14 11:56:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 75B8ED3C40B; Fri, 14 Apr 2017 11:56:21 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward3m.cmail.yandex.net (forward3m.cmail.yandex.net [IPv6:2a02:6b8:b030::1a]) (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 F2AA53B0; Fri, 14 Apr 2017 11:56:20 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from smtp1h.mail.yandex.net (smtp1h.mail.yandex.net [84.201.187.144]) by forward3m.cmail.yandex.net (Yandex) with ESMTP id 76AE82130D; Fri, 14 Apr 2017 14:56:08 +0300 (MSK) Received: from smtp1h.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp1h.mail.yandex.net (Yandex) with ESMTP id E5E498C0D2D; Fri, 14 Apr 2017 14:55:54 +0300 (MSK) Received: by smtp1h.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id Z1Av2Xek1V-trka5dB5; Fri, 14 Apr 2017 14:55:53 +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=1492170953; bh=DMseF4lk8tqjZRJxC3+C8gX+YkYGl8GFQBrl8vtpOTA=; h=Subject:To:Cc:References:From:Message-ID:Date:In-Reply-To; b=J+iqEMY5ZJH+LlLCMsEQ6cmzv2QWihDeRcjSbAquztzfxKgytfEMgMzUDioLU/HMS R+rKAyGKLNCdfLaRIiFWpy242Ikc8sHu9ohV62L6mMVmJYPA4tHKN1qIvy4YIeMghf cUTTH76YCrO8WzZSaCMq/ugfO/eE++vQHYOaDPAs= Authentication-Results: smtp1h.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: r316825 - head/sys/netpfil/ipfw To: Ed Schouten Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201704141141.v3EBf9MC097085@repo.freebsd.org> From: "Andrey V. Elsukov" Openpgp: id=E6591E1B41DA1516F0C9BC0001C5EA0410C8A17A Message-ID: <0be15fbe-ede3-804f-e844-dd75beef69ab@yandex.ru> Date: Fri, 14 Apr 2017 14:55:15 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="MGD7QnffHXeINlkLRMdWm5h7vgjNVh2Be" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 11:56:21 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --MGD7QnffHXeINlkLRMdWm5h7vgjNVh2Be Content-Type: multipart/mixed; boundary="VpFmwvFChMvEMHVqLwMkR4hVKeNccDpiX"; protected-headers="v1" From: "Andrey V. Elsukov" To: Ed Schouten Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <0be15fbe-ede3-804f-e844-dd75beef69ab@yandex.ru> Subject: Re: svn commit: r316825 - head/sys/netpfil/ipfw References: <201704141141.v3EBf9MC097085@repo.freebsd.org> In-Reply-To: --VpFmwvFChMvEMHVqLwMkR4hVKeNccDpiX Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 14.04.2017 14:52, Ed Schouten wrote: > Hi there, >=20 > 2017-04-14 13:41 GMT+02:00 Andrey V. Elsukov : >> - memcpy(&tent->k, &xn->addr6.sin6_addr, sizeof(struct i= n6_addr)); >> + memcpy(&tent->k.addr6, &xn->addr6.sin6_addr, >> + sizeof(struct in6_addr)); >=20 > In this case the code could be abbreviated by simply using assignment, = right? >=20 > tent->k.addr6 =3D xn->addr6.sin6_addr; Yes. --=20 WBR, Andrey V. Elsukov --VpFmwvFChMvEMHVqLwMkR4hVKeNccDpiX-- --MGD7QnffHXeINlkLRMdWm5h7vgjNVh2Be Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEzBAEBCAAdFiEE5lkeG0HaFRbwybwAAcXqBBDIoXoFAljwuKMACgkQAcXqBBDI oXrPiAgAnu+BGS9OaGl1IgS33+keDSowl70bhtxUup2D/TKWY7Lb4aGDKFX/qsnF dNQw1xKUqGPnmKIFs9QJ6nb+uEzbBkiXbVuyDqkgBzvnt3EorKA9FL1HGMBe3AKY XpSW9T4fhZ9TzCUfmgp6hiY9jbzMb8agsOMu2QgLzZ8D/EAVMdR3wKdqeO/ZSJUe CRuyoW785Ojo4CU2HyptdVh8eA93zwXRUe+e2B8837IqHoDAayAnOgT3ivdRs/5k jMogTRRWUDSsZao9Gh4Hoao6ribg0No859deZOIevHXZ087qRRAxLSY3ISO11DlD EBBW5KnC8s9T/rdmxtUUyzN1nyqMBQ== =qy0D -----END PGP SIGNATURE----- --MGD7QnffHXeINlkLRMdWm5h7vgjNVh2Be-- From owner-svn-src-head@freebsd.org Fri Apr 14 11:58:42 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A45B5D3C545; Fri, 14 Apr 2017 11:58: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 6EA097CE; Fri, 14 Apr 2017 11:58: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 v3EBwfBW003148; Fri, 14 Apr 2017 11:58:41 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3EBwfLm003147; Fri, 14 Apr 2017 11:58:41 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201704141158.v3EBwfLm003147@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 14 Apr 2017 11:58:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316826 - head/sys/netpfil/ipfw/nat64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 11:58:42 -0000 Author: ae Date: Fri Apr 14 11:58:41 2017 New Revision: 316826 URL: https://svnweb.freebsd.org/changeset/base/316826 Log: Avoid undefined behavior. The 'pktid' variable is modified while being used twice between sequence points, probably due to htonl() is macro. Reported by: PVS-Studio MFC after: 1 week Modified: head/sys/netpfil/ipfw/nat64/nat64stl.c Modified: head/sys/netpfil/ipfw/nat64/nat64stl.c ============================================================================== --- head/sys/netpfil/ipfw/nat64/nat64stl.c Fri Apr 14 11:41:09 2017 (r316825) +++ head/sys/netpfil/ipfw/nat64/nat64stl.c Fri Apr 14 11:58:41 2017 (r316826) @@ -75,7 +75,8 @@ nat64stl_log(struct pfloghdr *plog, stru plog->action = PF_NAT; plog->dir = PF_IN; plog->rulenr = htonl(kidx); - plog->subrulenr = htonl(++pktid); + pktid++; + plog->subrulenr = htonl(pktid); plog->ruleset[0] = '\0'; strlcpy(plog->ifname, "NAT64STL", sizeof(plog->ifname)); ipfw_bpf_mtap2(plog, PFLOG_HDRLEN, m); From owner-svn-src-head@freebsd.org Fri Apr 14 12:03:35 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9384ED3D09E; Fri, 14 Apr 2017 12:03:35 +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 56487EEC; Fri, 14 Apr 2017 12:03:35 +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 v3EC3Ybo007154; Fri, 14 Apr 2017 12:03:34 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3EC3YGn007153; Fri, 14 Apr 2017 12:03:34 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201704141203.v3EC3YGn007153@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Fri, 14 Apr 2017 12:03:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316827 - head/sys/dev/syscons X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 12:03:35 -0000 Author: bde Date: Fri Apr 14 12:03:34 2017 New Revision: 316827 URL: https://svnweb.freebsd.org/changeset/base/316827 Log: Further unobfuscate the method of drawing the mouse cursor in vga planar mode. Don't manually unroll the 2 inner loops. On Haswell, doing so gave a speedup of about 0.5% (about 4 cycles per iteration out of 1400), but hard-coded a limit of width 9 and made better better optimizations harder to see. gcc-4.2.1 -O does the unrolling anyway, unless tricked with a volatile hack. gcc's unrolling is not very good and gives a a speedup of about half as much (about 2 cycles per iteration). (All timing on i386.) Manual unrolling was only feasible because the inner loop only iterates once or twice. Usually twice, but a dynamic check is needed to decide, and was not moved from the second-innermost loop manually or by gcc. This commit basically adds another dynamic check in the inner loop. Cursor widths of 10-17 require 3 iterations in the inner loop and this is not so easy to unroll -- even gcc stops at 2. Modified: head/sys/dev/syscons/scvgarndr.c Modified: head/sys/dev/syscons/scvgarndr.c ============================================================================== --- head/sys/dev/syscons/scvgarndr.c Fri Apr 14 11:58:41 2017 (r316826) +++ head/sys/dev/syscons/scvgarndr.c Fri Apr 14 12:03:34 2017 (r316827) @@ -1031,7 +1031,7 @@ draw_pxlmouse_planar(scr_stat *scp, int int xoff, yoff; int ymax; u_short m; - int i, j; + int i, j, k; line_width = scp->sc->adp->va_line_width; xoff = (x - scp->xoff*8)%8; @@ -1043,42 +1043,27 @@ draw_pxlmouse_planar(scr_stat *scp, int outw(GDCIDX, 0xff08); /* bit mask */ outw(GDCIDX, 0x0803); /* data rotate/function select (and) */ p = scp->sc->adp->va_window + line_width*y + x/8; - if (x < scp->xpixel - 8) { - for (i = y, j = 0; i < ymax; ++i, ++j) { - m = ~((mouse_and_mask[j] & ~mouse_or_mask[j]) >> xoff); - readb(p); - writeb(p, m >> 8); - readb(p + 1); - writeb(p + 1, m); - p += line_width; - } - } else { - xoff += 8; - for (i = y, j = 0; i < ymax; ++i, ++j) { - m = ~((mouse_and_mask[j] & ~mouse_or_mask[j]) >> xoff); - readb(p); - writeb(p, m); - p += line_width; + for (i = y, j = 0; i < ymax; ++i, ++j) { + m = ~((mouse_and_mask[j] & ~mouse_or_mask[j]) >> xoff); + for (k = 0; k < 2; ++k) { + if (x + 8 * k < scp->xpixel) { + readb(p + k); + writeb(p + k, m >> (8 * (1 - k))); + } } + p += line_width; } outw(GDCIDX, 0x1003); /* data rotate/function select (or) */ p = scp->sc->adp->va_window + line_width*y + x/8; - if (x < scp->xpixel - 8) { - for (i = y, j = 0; i < ymax; ++i, ++j) { - m = mouse_or_mask[j] >> xoff; - readb(p); - writeb(p, m >> 8); - readb(p + 1); - writeb(p + 1, m); - p += line_width; - } - } else { - for (i = y, j = 0; i < ymax; ++i, ++j) { - m = mouse_or_mask[j] >> xoff; - readb(p); - writeb(p, m); - p += line_width; + for (i = y, j = 0; i < ymax; ++i, ++j) { + m = mouse_or_mask[j] >> xoff; + for (k = 0; k < 2; ++k) { + if (x + 8 * k < scp->xpixel) { + readb(p + k); + writeb(p + k, m >> (8 * (1 - k))); + } } + p += line_width; } outw(GDCIDX, 0x0003); /* data rotate/function select */ } From owner-svn-src-head@freebsd.org Fri Apr 14 12:54:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F65DD3DFCE; Fri, 14 Apr 2017 12:54:40 +0000 (UTC) (envelope-from schweikh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C5B7DE6; Fri, 14 Apr 2017 12:54:40 +0000 (UTC) (envelope-from schweikh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3ECsdDI028561; Fri, 14 Apr 2017 12:54:39 GMT (envelope-from schweikh@FreeBSD.org) Received: (from schweikh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3ECsd5d028560; Fri, 14 Apr 2017 12:54:39 GMT (envelope-from schweikh@FreeBSD.org) Message-Id: <201704141254.v3ECsd5d028560@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: schweikh set sender to schweikh@FreeBSD.org using -f From: Jens Schweikhardt Date: Fri, 14 Apr 2017 12:54:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316828 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 12:54:40 -0000 Author: schweikh Date: Fri Apr 14 12:54:39 2017 New Revision: 316828 URL: https://svnweb.freebsd.org/changeset/base/316828 Log: Correct minor grammos; minor white-space fixes. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Fri Apr 14 12:03:34 2017 (r316827) +++ head/UPDATING Fri Apr 14 12:54:39 2017 (r316828) @@ -55,7 +55,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 As of r316810 for ipfilter, keep frags is no longer assumed when keep state is specified in a rule. r316810 aligns ipfilter with documentation in man pages separating keep frags from keep state. - This allows keep state to specified without forcing keep frags + This allows keep state to be specified without forcing keep frags and allows keep frags to be specified independently of keep state. To maintain previous behaviour, also specify keep frags with keep state (as documented in ipf.conf.5). @@ -100,7 +100,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 20170311: The old drm (sys/dev/drm/) drivers for i915 and radeon have been removed as the userland we provide cannot use them. The KMS version - (sys/dev/drm2) support the same hardware. + (sys/dev/drm2) supports the same hardware. 20170302: Clang, llvm, lldb, compiler-rt and libc++ have been upgraded to 4.0.0. @@ -214,7 +214,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 20160818: Remove the openbsd_poll system call. - __FreeBSD_version has been bumped because of this. + __FreeBSD_version has been bumped because of this. 20160622: The libc stub for the pipe(2) system call has been replaced with @@ -256,7 +256,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 packages will be needed. To update an existing self-hosted armv6hf system, you must add - TARGET_ARCH=armv6 on the make command line for both the build + TARGET_ARCH=armv6 on the make command line for both the build and the install steps. 20160510: @@ -507,7 +507,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 # pw groupmod video -m $USER 20150806: - The menu.rc and loader.rc files will now be replaced during + The menu.rc and loader.rc files will now be replaced during upgrades. Please migrate local changes to menu.rc.local and loader.rc.local instead. @@ -1242,7 +1242,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 behavior in parallel build. 20130429: - Fix a bug that allows NFS clients to issue READDIR on files. + Fix a bug that allows NFS clients to issue READDIR on files. 20130426: The WITHOUT_IDEA option has been removed because From owner-svn-src-head@freebsd.org Fri Apr 14 13:25:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E630D3D6F4; Fri, 14 Apr 2017 13:25:47 +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 D4B99DF5; Fri, 14 Apr 2017 13:25:46 +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 v3EDPkcs041185; Fri, 14 Apr 2017 13:25:46 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3EDPj06041181; Fri, 14 Apr 2017 13:25:45 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201704141325.v3EDPj06041181@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Fri, 14 Apr 2017 13:25:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316829 - in head/sys/fs: nfs nfsclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 13:25:47 -0000 Author: rmacklem Date: Fri Apr 14 13:25:45 2017 New Revision: 316829 URL: https://svnweb.freebsd.org/changeset/base/316829 Log: Remove unused "cred" argument to ncl_flush(). The "cred" argument of ncl_flush() is unused and it was confusing to have the code passing in NULL for this argument in some cases. This patch deletes this argument. There is no semantic change because of this patch. MFC after: 2 weeks Modified: head/sys/fs/nfs/nfs_var.h head/sys/fs/nfsclient/nfs_clnode.c head/sys/fs/nfsclient/nfs_clstate.c head/sys/fs/nfsclient/nfs_clvnops.c Modified: head/sys/fs/nfs/nfs_var.h ============================================================================== --- head/sys/fs/nfs/nfs_var.h Fri Apr 14 12:54:39 2017 (r316828) +++ head/sys/fs/nfs/nfs_var.h Fri Apr 14 13:25:45 2017 (r316829) @@ -592,7 +592,7 @@ int nfscl_maperr(NFSPROC_T *, int, uid_t void nfscl_init(void); /* nfs_clbio.c */ -int ncl_flush(vnode_t, int, struct ucred *, NFSPROC_T *, int, int); +int ncl_flush(vnode_t, int, NFSPROC_T *, int, int); /* nfs_clnode.c */ void ncl_invalcaches(vnode_t); Modified: head/sys/fs/nfsclient/nfs_clnode.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clnode.c Fri Apr 14 12:54:39 2017 (r316828) +++ head/sys/fs/nfsclient/nfs_clnode.c Fri Apr 14 13:25:45 2017 (r316829) @@ -248,7 +248,7 @@ ncl_inactive(struct vop_inactive_args *a } else retv = TRUE; if (retv == TRUE) { - (void)ncl_flush(vp, MNT_WAIT, NULL, ap->a_td, 1, 0); + (void)ncl_flush(vp, MNT_WAIT, ap->a_td, 1, 0); (void)nfsrpc_close(vp, 1, ap->a_td); } } Modified: head/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clstate.c Fri Apr 14 12:54:39 2017 (r316828) +++ head/sys/fs/nfsclient/nfs_clstate.c Fri Apr 14 13:25:45 2017 (r316829) @@ -3878,8 +3878,7 @@ nfscl_recalldeleg(struct nfsclclient *cl if ((dp->nfsdl_flags & NFSCLDL_WRITE) && (np->n_flag & NMODIFIED)) { np->n_flag |= NDELEGRECALL; NFSUNLOCKNODE(np); - ret = ncl_flush(vp, MNT_WAIT, cred, p, 1, - called_from_renewthread); + ret = ncl_flush(vp, MNT_WAIT, p, 1, called_from_renewthread); NFSLOCKNODE(np); np->n_flag &= ~NDELEGRECALL; } Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Fri Apr 14 12:54:39 2017 (r316828) +++ head/sys/fs/nfsclient/nfs_clvnops.c Fri Apr 14 13:25:45 2017 (r316829) @@ -709,12 +709,12 @@ nfs_close(struct vop_close_args *ap) * traditional vnode locking implemented for Vnode Ops. */ int cm = newnfs_commit_on_close ? 1 : 0; - error = ncl_flush(vp, MNT_WAIT, cred, ap->a_td, cm, 0); + error = ncl_flush(vp, MNT_WAIT, ap->a_td, cm, 0); /* np->n_flag &= ~NMODIFIED; */ } else if (NFS_ISV4(vp)) { if (nfscl_mustflush(vp) != 0) { int cm = newnfs_commit_on_close ? 1 : 0; - error = ncl_flush(vp, MNT_WAIT, cred, ap->a_td, + error = ncl_flush(vp, MNT_WAIT, ap->a_td, cm, 0); /* * as above w.r.t races when clearing @@ -2631,7 +2631,7 @@ nfs_fsync(struct vop_fsync_args *ap) */ return (0); } - return (ncl_flush(ap->a_vp, ap->a_waitfor, NULL, ap->a_td, 1, 0)); + return (ncl_flush(ap->a_vp, ap->a_waitfor, ap->a_td, 1, 0)); } /* @@ -2643,7 +2643,7 @@ nfs_fsync(struct vop_fsync_args *ap) * waiting for a buffer write to complete. */ int -ncl_flush(struct vnode *vp, int waitfor, struct ucred *cred, struct thread *td, +ncl_flush(struct vnode *vp, int waitfor, struct thread *td, int commit, int called_from_renewthread) { struct nfsnode *np = VTONFS(vp); @@ -3024,7 +3024,7 @@ nfs_advlock(struct vop_advlock_args *ap) if (ap->a_op == F_UNLCK && nfscl_checkwritelocked(vp, ap->a_fl, cred, td, ap->a_id, ap->a_flags)) - (void) ncl_flush(vp, MNT_WAIT, cred, td, 1, 0); + (void) ncl_flush(vp, MNT_WAIT, td, 1, 0); /* * Loop around doing the lock op, while a blocking lock @@ -3404,7 +3404,7 @@ nfs_set_text(struct vop_set_text_args *a } /* Now, flush the buffer cache. */ - ncl_flush(vp, MNT_WAIT, NULL, curthread, 0, 0); + ncl_flush(vp, MNT_WAIT, curthread, 0, 0); /* And, finally, make sure that n_mtime is up to date. */ np = VTONFS(vp); From owner-svn-src-head@freebsd.org Fri Apr 14 14:00:15 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 441ABD3D129; Fri, 14 Apr 2017 14:00:15 +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 EED607D; Fri, 14 Apr 2017 14:00:14 +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 v3EE0El2053722; Fri, 14 Apr 2017 14:00:14 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3EE0Eo8053721; Fri, 14 Apr 2017 14:00:14 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201704141400.v3EE0Eo8053721@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Fri, 14 Apr 2017 14:00:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316830 - head/sys/dev/syscons X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 14:00:15 -0000 Author: bde Date: Fri Apr 14 14:00:13 2017 New Revision: 316830 URL: https://svnweb.freebsd.org/changeset/base/316830 Log: Optimize drawing of the mouse cursor in vga planar mode almost as much as possible, by avoiding null ANDs and ORs to the frame buffer. Mouse cursors are fairly sparse, especially for their frame. Pixels are written in groups of 8 in planar mode and the per-group sparseness is not as large, but it still averages about 40% with the current 9x13 mouse cursor. The average drawing time is reduced by about this amount (from 22 usec constant to 12.5 usec average on Haswell). This optimization is relatively larger with larger cursors. Width 10 requires 6 frame buffer accesses per line instead of 4 if not done sparsely, but rarely more than 4 if done sparsely. Modified: head/sys/dev/syscons/scvgarndr.c Modified: head/sys/dev/syscons/scvgarndr.c ============================================================================== --- head/sys/dev/syscons/scvgarndr.c Fri Apr 14 13:25:45 2017 (r316829) +++ head/sys/dev/syscons/scvgarndr.c Fri Apr 14 14:00:13 2017 (r316830) @@ -1032,6 +1032,7 @@ draw_pxlmouse_planar(scr_stat *scp, int int ymax; u_short m; int i, j, k; + uint8_t m1; line_width = scp->sc->adp->va_line_width; xoff = (x - scp->xoff*8)%8; @@ -1046,9 +1047,10 @@ draw_pxlmouse_planar(scr_stat *scp, int for (i = y, j = 0; i < ymax; ++i, ++j) { m = ~((mouse_and_mask[j] & ~mouse_or_mask[j]) >> xoff); for (k = 0; k < 2; ++k) { - if (x + 8 * k < scp->xpixel) { + m1 = m >> (8 * (1 - k)); + if (m1 != 0xff && x + 8 * k < scp->xpixel) { readb(p + k); - writeb(p + k, m >> (8 * (1 - k))); + writeb(p + k, m1); } } p += line_width; @@ -1058,9 +1060,10 @@ draw_pxlmouse_planar(scr_stat *scp, int for (i = y, j = 0; i < ymax; ++i, ++j) { m = mouse_or_mask[j] >> xoff; for (k = 0; k < 2; ++k) { - if (x + 8 * k < scp->xpixel) { + m1 = m >> (8 * (1 - k)); + if (m1 != 0 && x + 8 * k < scp->xpixel) { readb(p + k); - writeb(p + k, m >> (8 * (1 - k))); + writeb(p + k, m1); } } p += line_width; From owner-svn-src-head@freebsd.org Fri Apr 14 14:38:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1771D3DFC9; Fri, 14 Apr 2017 14:38:28 +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 A1DBC19F; Fri, 14 Apr 2017 14:38:28 +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 v3EEcRML070488; Fri, 14 Apr 2017 14:38:27 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3EEcRfX070487; Fri, 14 Apr 2017 14:38:27 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201704141438.v3EEcRfX070487@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Fri, 14 Apr 2017 14:38:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316837 - head/sys/dev/usb/quirk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 14:38:28 -0000 Author: kevlo Date: Fri Apr 14 14:38:27 2017 New Revision: 316837 URL: https://svnweb.freebsd.org/changeset/base/316837 Log: Remove RTL8153 quirk since ure(4) supports this chip. Modified: head/sys/dev/usb/quirk/usb_quirk.c Modified: head/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- head/sys/dev/usb/quirk/usb_quirk.c Fri Apr 14 14:34:48 2017 (r316836) +++ head/sys/dev/usb/quirk/usb_quirk.c Fri Apr 14 14:38:27 2017 (r316837) @@ -95,7 +95,6 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(SILICONPORTALS, YAPPHONE, 0x100, 0x100, UQ_AU_INP_ASYNC), USB_QUIRK(LOGITECH, UN53B, 0x0000, 0xffff, UQ_NO_STRINGS), USB_QUIRK(REALTEK, RTL8196EU, 0x0000, 0xffff, UQ_CFG_INDEX_1), - USB_QUIRK(REALTEK, RTL8153, 0x0000, 0xffff, UQ_CFG_INDEX_1), USB_QUIRK(ELSA, MODEM1, 0x0000, 0xffff, UQ_CFG_INDEX_1), USB_QUIRK(PLANEX2, MZKUE150N, 0x0000, 0xffff, UQ_CFG_INDEX_1), USB_QUIRK(CISCOLINKSYS, USB3GIGV1, 0x0000, 0xffff, UQ_CFG_INDEX_1), From owner-svn-src-head@freebsd.org Fri Apr 14 15:16:43 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 426CBD3D245; Fri, 14 Apr 2017 15:16:43 +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 12134FA6; Fri, 14 Apr 2017 15:16:42 +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 v3EFGgxM087766; Fri, 14 Apr 2017 15:16:42 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3EFGgK9087765; Fri, 14 Apr 2017 15:16:42 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201704141516.v3EFGgK9087765@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 14 Apr 2017 15:16:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316851 - head/sys/x86/iommu X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 15:16:43 -0000 Author: kib Date: Fri Apr 14 15:16:41 2017 New Revision: 316851 URL: https://svnweb.freebsd.org/changeset/base/316851 Log: Correct calculation of the entry->free_down in the invariants-checking code. Reported by: maxim Found by: PVS studio scan Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/x86/iommu/intel_gas.c Modified: head/sys/x86/iommu/intel_gas.c ============================================================================== --- head/sys/x86/iommu/intel_gas.c Fri Apr 14 15:09:30 2017 (r316850) +++ head/sys/x86/iommu/intel_gas.c Fri Apr 14 15:16:41 2017 (r316851) @@ -198,7 +198,7 @@ dmar_gas_check_free(struct dmar_domain * l->free_down)); } else { v = MAX(entry->free_after, l->free_down); - v = MAX(entry->free_down, r->free_down); + v = MAX(v, r->free_down); MPASS(entry->free_down == v); } } From owner-svn-src-head@freebsd.org Fri Apr 14 15:22:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2442AD3D505; Fri, 14 Apr 2017 15:22: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 E57EA784; Fri, 14 Apr 2017 15:22:01 +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 v3EFM0of092172; Fri, 14 Apr 2017 15:22:00 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3EFM09u092171; Fri, 14 Apr 2017 15:22:00 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201704141522.v3EFM09u092171@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 14 Apr 2017 15:22:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316852 - head/sbin/fsck_ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 15:22:02 -0000 Author: kib Date: Fri Apr 14 15:22:00 2017 New Revision: 316852 URL: https://svnweb.freebsd.org/changeset/base/316852 Log: In fsck_ffs pass1, prevent the inosused variable from wrapping. The loop that scans the used inode map when soft updates is in use assumes that the inosused variable is signed. However, ino_t is unsigned, so the loop invariant is incorrect and the check for inosused wrapping to < 0 can never be true. Instead of checking for wrap after the fact just prevent it from happening in the first place. PR: 218592 Submitted by: Todd Miller Reviewed by: mckusick MFC after: 1 week Modified: head/sbin/fsck_ffs/pass1.c Modified: head/sbin/fsck_ffs/pass1.c ============================================================================== --- head/sbin/fsck_ffs/pass1.c Fri Apr 14 15:16:41 2017 (r316851) +++ head/sbin/fsck_ffs/pass1.c Fri Apr 14 15:22:00 2017 (r316852) @@ -133,9 +133,14 @@ pass1(void) */ if ((preen || inoopt) && usedsoftdep && !rebuildcg) { cp = &cg_inosused(cgp)[(inosused - 1) / CHAR_BIT]; - for ( ; inosused > 0; inosused -= CHAR_BIT, cp--) { - if (*cp == 0) + for ( ; inosused != 0; cp--) { + if (*cp == 0) { + if (inosused > CHAR_BIT) + inosused -= CHAR_BIT; + else + inosused = 0; continue; + } for (i = 1 << (CHAR_BIT - 1); i > 0; i >>= 1) { if (*cp & i) break; @@ -143,8 +148,6 @@ pass1(void) } break; } - if (inosused < 0) - inosused = 0; } /* * Allocate inoinfo structures for the allocated inodes. From owner-svn-src-head@freebsd.org Fri Apr 14 15:31:05 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4EE51D3D91E; Fri, 14 Apr 2017 15:31:05 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 20A07DF3; Fri, 14 Apr 2017 15:31:05 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3EFV4H0093448; Fri, 14 Apr 2017 15:31:04 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3EFV4EZ093447; Fri, 14 Apr 2017 15:31:04 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201704141531.v3EFV4EZ093447@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 14 Apr 2017 15:31:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316853 - head/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 15:31:05 -0000 Author: avg Date: Fri Apr 14 15:31:04 2017 New Revision: 316853 URL: https://svnweb.freebsd.org/changeset/base/316853 Log: dtrace: fix normalization of stddev aggregation To be upstreamed. Discussed with: Bryan Cantrill MFC after: 2 weeks Sponsored by: Panzura Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Fri Apr 14 15:22:00 2017 (r316852) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Fri Apr 14 15:31:04 2017 (r316853) @@ -389,8 +389,10 @@ dt_stddev(uint64_t *data, uint64_t norma * The standard approximation for standard deviation is * sqrt(average(x**2) - average(x)**2), i.e. the square root * of the average of the squares minus the square of the average. + * When normalizing, we should divide the sum of x**2 by normal**2. */ dt_divide_128(data + 2, normal, avg_of_squares); + dt_divide_128(avg_of_squares, normal, avg_of_squares); dt_divide_128(avg_of_squares, data[0], avg_of_squares); norm_avg = (int64_t)data[1] / (int64_t)normal / (int64_t)data[0]; From owner-svn-src-head@freebsd.org Fri Apr 14 15:32:43 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74EEFD3DBCD; Fri, 14 Apr 2017 15:32:43 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-wr0-f170.google.com (mail-wr0-f170.google.com [209.85.128.170]) (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 14F111193; Fri, 14 Apr 2017 15:32:42 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-wr0-f170.google.com with SMTP id c55so52602443wrc.3; Fri, 14 Apr 2017 08:32:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=NcItDyFqITnWjbEYmgvYUg2HtgxFjs08oe1Fib1gP8k=; b=aen8Nff4ZQIzz8Yy8jA2ZV4VMzf9zcDiObde+r9rm2yhBVhQ4gMQnSZgLJTm/i2+0X 23WqjZCldhkNyhGTwqOMCt57cAE/ADWIX6AKKUDwz2B88BoSzCiL/vdP5a3u4OIYAgtu z3bPlOec68Ai1UtDuyJ2CValsb/Rubcwuo0Xz9xnuMBcLGgCit7obdTBpvGD1igG1AlP Om7fuTtcZSe+vtGBShfYcSkIQlrfsmHAOA4T23ZPx6RW7sk9L8c4IRliv6vLoP4otoNR T73irsYuWFS1UcEGBPKfdVNq2jC7r7ZmIk7dMmqiKDLoG3aiDGEXZzbwenanEp4fY7hN BwCA== X-Gm-Message-State: AN3rC/7MPdfQUevvEQOH+tjlrfqpfu9yhnM5k+gJSqrYbEgUAZhuxy5a mdyucmCFf6c8MlMJyzkh9Q== X-Received: by 10.223.166.9 with SMTP id k9mr8049963wrc.177.1492183954925; Fri, 14 Apr 2017 08:32:34 -0700 (PDT) Received: from mail-wr0-f171.google.com (mail-wr0-f171.google.com. [209.85.128.171]) by smtp.gmail.com with ESMTPSA id n198sm3133528wmd.30.2017.04.14.08.32.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Apr 2017 08:32:34 -0700 (PDT) Received: by mail-wr0-f171.google.com with SMTP id l28so52549459wre.0; Fri, 14 Apr 2017 08:32:34 -0700 (PDT) X-Received: by 10.223.181.132 with SMTP id c4mr525428wre.178.1492183954681; Fri, 14 Apr 2017 08:32:34 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.80.169.4 with HTTP; Fri, 14 Apr 2017 08:32:34 -0700 (PDT) In-Reply-To: <201704141158.v3EBwfLm003147@repo.freebsd.org> References: <201704141158.v3EBwfLm003147@repo.freebsd.org> From: Conrad Meyer Date: Fri, 14 Apr 2017 08:32:34 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r316826 - head/sys/netpfil/ipfw/nat64 To: "Andrey V. Elsukov" Cc: 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 15:32:43 -0000 On Fri, Apr 14, 2017 at 4:58 AM, Andrey V. Elsukov wrote: > Author: ae > Date: Fri Apr 14 11:58:41 2017 > New Revision: 316826 > URL: https://svnweb.freebsd.org/changeset/base/316826 > > Log: > Avoid undefined behavior. > > The 'pktid' variable is modified while being used twice between > sequence points, probably due to htonl() is macro. FYI =E2=80=94 there are a ton of similar reports in sys/rpc due to the XDR macros (which read a network value off a pointer and increment it). See e.g., IXDR_GET_UINT32() macro. Best, Conrad From owner-svn-src-head@freebsd.org Fri Apr 14 15:35:08 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA843D3DC78; Fri, 14 Apr 2017 15:35:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 743B31373; Fri, 14 Apr 2017 15:35:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3EFZ7tE096443; Fri, 14 Apr 2017 15:35:07 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3EFZ7BY096442; Fri, 14 Apr 2017 15:35:07 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201704141535.v3EFZ7BY096442@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 14 Apr 2017 15:35:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316854 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 15:35:08 -0000 Author: avg Date: Fri Apr 14 15:35:07 2017 New Revision: 316854 URL: https://svnweb.freebsd.org/changeset/base/316854 Log: rename vfs.zfs.debug_flags to vfs.zfs.debugflags While the former name is easier to read, the "_flags" suffix has a special meaning for loader(8) and, thus, it was impossible to set the knob via loader.conf(5). The loader interpreted the setting as flags that should be passed to a kernel module named "vfs.zfs.debug". Discussed with: smh MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Fri Apr 14 15:31:04 2017 (r316853) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Fri Apr 14 15:35:07 2017 (r316854) @@ -353,7 +353,7 @@ sysctl_vfs_zfs_debug_flags(SYSCTL_HANDLE return (0); } -SYSCTL_PROC(_vfs_zfs, OID_AUTO, debug_flags, +SYSCTL_PROC(_vfs_zfs, OID_AUTO, debugflags, CTLTYPE_UINT | CTLFLAG_MPSAFE | CTLFLAG_RWTUN, 0, sizeof(int), sysctl_vfs_zfs_debug_flags, "IU", "Debug flags for ZFS testing."); From owner-svn-src-head@freebsd.org Fri Apr 14 15:49:15 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1FA24D3D0FA; Fri, 14 Apr 2017 15:49:15 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-wr0-f176.google.com (mail-wr0-f176.google.com [209.85.128.176]) (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 B464A1C55; Fri, 14 Apr 2017 15:49:14 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-wr0-f176.google.com with SMTP id l28so52746212wre.0; Fri, 14 Apr 2017 08:49:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=f9Es0/dLKhDQ7Fu/1RotCHOYaUCZ3XIEB742ihaoBVI=; b=L7OC3blNnQ7w2nx3KPX6tWp7livQWU6k44Is48oKoFmH4rPwZEKeDyM6R3ay3LV7Rk yqSua79qe2r72sZAcIXyhQYd1eBAjwg1AdHzN7A3CsZJaCbr+jgs1oK5L2oVR+hp4xyc sNWBkDtclVNxuly8E65hCmoa2AgVcCulc3u2npby4v1iwCakoIMzWHAzk9oJ6bgu4EAO dq8RgLOXPsA8HB6zxNgJ6z3aCM+s+pw2dS8zVgpkPiEXEyy5wI5rHIMYDCNyFknK++JB 8ZxhFtkap/mAGLjyNqKEmP19mwVcVDQ3pvJlVuSfNu8xN758e9vyDdujSY1nl8GGz1BU 9WKQ== X-Gm-Message-State: AN3rC/6DUZhsVygAMSjZCZeeo5cHpkmiFJXjafURFZ7EHT9+TV1E002z ZHFYjhiv3aCBNg== X-Received: by 10.223.182.155 with SMTP id j27mr7594745wre.152.1492184446133; Fri, 14 Apr 2017 08:40:46 -0700 (PDT) Received: from mail-wr0-f181.google.com (mail-wr0-f181.google.com. [209.85.128.181]) by smtp.gmail.com with ESMTPSA id m90sm3155392wmi.34.2017.04.14.08.40.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Apr 2017 08:40:46 -0700 (PDT) Received: by mail-wr0-f181.google.com with SMTP id o21so52725981wrb.2; Fri, 14 Apr 2017 08:40:45 -0700 (PDT) X-Received: by 10.223.181.132 with SMTP id c4mr552425wre.178.1492184445858; Fri, 14 Apr 2017 08:40:45 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.80.169.4 with HTTP; Fri, 14 Apr 2017 08:40:45 -0700 (PDT) In-Reply-To: <201704141516.v3EFGgK9087765@repo.freebsd.org> References: <201704141516.v3EFGgK9087765@repo.freebsd.org> From: Conrad Meyer Date: Fri, 14 Apr 2017 08:40:45 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r316851 - head/sys/x86/iommu To: Konstantin Belousov Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 15:49:15 -0000 On Fri, Apr 14, 2017 at 8:16 AM, Konstantin Belousov wrote: > Author: kib > Date: Fri Apr 14 15:16:41 2017 > New Revision: 316851 > URL: https://svnweb.freebsd.org/changeset/base/316851 > > Log: > Correct calculation of the entry->free_down in the invariants-checking > code. > > Reported by: maxim > Found by: PVS studio scan This was also reported by Coverity in CID 1304880 as an unused value. Coverity also reports a NULL check (l. 547) after all paths have dereferenced the pointer ("next") already in dmar_gas_alloc_region() of the same file (CID 1199386). Best, Conrad From owner-svn-src-head@freebsd.org Fri Apr 14 15:54:35 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8ED5D3D4F4 for ; Fri, 14 Apr 2017 15:54:35 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CF7C213 for ; Fri, 14 Apr 2017 15:54:35 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 6e5378af-212a-11e7-8c46-c35e37f62db1 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound2.ore.mailhop.org (Halon) with ESMTPSA id 6e5378af-212a-11e7-8c46-c35e37f62db1; Fri, 14 Apr 2017 15:52:58 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v3EFrQfG006295; Fri, 14 Apr 2017 09:53:26 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1492185206.73883.126.camel@freebsd.org> Subject: Re: svn commit: r316826 - head/sys/netpfil/ipfw/nat64 From: Ian Lepore To: cem@freebsd.org, "Andrey V. Elsukov" Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Fri, 14 Apr 2017 09:53:26 -0600 In-Reply-To: References: <201704141158.v3EBwfLm003147@repo.freebsd.org> Content-Type: text/plain; charset="windows-1251" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 15:54:35 -0000 On Fri, 2017-04-14 at 08:32 -0700, Conrad Meyer wrote: > On Fri, Apr 14, 2017 at 4:58 AM, Andrey V. Elsukov > wrote: > > > > Author: ae > > Date: Fri Apr 14 11:58:41 2017 > > New Revision: 316826 > > URL: https://svnweb.freebsd.org/changeset/base/316826 > > > > Log: > >   Avoid undefined behavior. > > > >   The 'pktid' variable is modified while being used twice between > >   sequence points, probably due to htonl() is macro. > FYI — there are a ton of similar reports in sys/rpc due to the XDR > macros (which read a network value off a pointer and increment it). > See e.g., IXDR_GET_UINT32() macro. > > Best, > Conrad Aren't they all false positives, since the macros involved are g'teed not to evaluate their arguments more than once as written (because __builtin_constant_p always evaluates at compile time)?  Do we really want to churn our source code to eliminate false positives from some tool that appears to still be in its alpha-testing state? -- Ian From owner-svn-src-head@freebsd.org Fri Apr 14 15:55:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C4ECD3D57F; Fri, 14 Apr 2017 15:55:41 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-yb0-x22e.google.com (mail-yb0-x22e.google.com [IPv6:2607:f8b0:4002: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 EF70E3A7; Fri, 14 Apr 2017 15:55:40 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-yb0-x22e.google.com with SMTP id i124so19901835ybc.3; Fri, 14 Apr 2017 08:55:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=0l92peGyC1c0oC3XKcey8A1obDtlicssyrnmqUeajBQ=; b=W6paLrdJ8vuks2rrB/O1HKPhzSSSHb/a6p/ZLl93X7vTlRI4KNC+zoLbqEdeack55V YNxr0twJnUofwVWQILf1jSMkhDupAJW69V452tyU6Cg2NRAtqnVPNa7RMEYfHpm7dIKn 4+DE48nWGhmXpl7gv6IHh9nw0AujbfvwUPuLuySklmMBM+OtMbZcl0CKU5Gojs2gg9V9 cScHju3SeZmWfMkRlujq6MOFngsz0J8hIYQIKUm49he3cDMCK5+oWw9YRIebpvIGKilb MMaMQx290b2Tdw4ts/5YX58casmPUuCiJ+jA4uRY9s4FV0jAnyk9MTbtTskXChcYOeL8 q+iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=0l92peGyC1c0oC3XKcey8A1obDtlicssyrnmqUeajBQ=; b=Kp+LBqzlJQRMYfudzU/X7TTFkQ2EoyHd086V/JAFn4PWn5sGC1qGSpIRSDdbfRYW0B j+1TE2FDjpHr4gGrJIC1ocyr4LfdXUheFqWVKV66qI2ADJVF2vJlF1QHA6sajhUPFR6B wFRjRXVMGveQEyeLe4audCw6HtBrxCVwC2HySgdRLJidw0WWa7Q8go7kqsmz88raoQ0U EzjZTbX/OLnxy5xv9QBzzy1wv7uVPtKO06T268BdfN+GcPbCWh9TypZajVLG1ZJhM1eI wVFXlZH5iu1xlqTptIlR9CQFkUkZu/NCw8K3ZN5PNFK8sBzD6CwbtTgcuPylaaM/fjnM 5TDA== X-Gm-Message-State: AN3rC/7b3pje9CytmQK7sjejzWR80c9dfbrT1U8jy3spetGiHVSPt1T8 3wvnALN9CAc2WRndyNdN6aoGGF1p4Q== X-Received: by 10.37.171.132 with SMTP id v4mr6800266ybi.9.1492185339833; Fri, 14 Apr 2017 08:55:39 -0700 (PDT) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.129.20.214 with HTTP; Fri, 14 Apr 2017 08:55:39 -0700 (PDT) In-Reply-To: <201704141535.v3EFZ7BY096442@repo.freebsd.org> References: <201704141535.v3EFZ7BY096442@repo.freebsd.org> From: Alan Somers Date: Fri, 14 Apr 2017 09:55:39 -0600 X-Google-Sender-Auth: qaM-nqDQv4EqBkrcmiFkuTqDOho Message-ID: Subject: Re: svn commit: r316854 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs To: Andriy Gapon 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 15:55:41 -0000 Are you sure it's a good idea to MFC this change? Doing so will upset anybody currently setting that sysctl in /etc/sysctl.conf. On Fri, Apr 14, 2017 at 9:35 AM, Andriy Gapon wrote: > Author: avg > Date: Fri Apr 14 15:35:07 2017 > New Revision: 316854 > URL: https://svnweb.freebsd.org/changeset/base/316854 > > Log: > rename vfs.zfs.debug_flags to vfs.zfs.debugflags > > While the former name is easier to read, the "_flags" suffix has a special > meaning for loader(8) and, thus, it was impossible to set the knob via > loader.conf(5). The loader interpreted the setting as flags that should > be passed to a kernel module named "vfs.zfs.debug". > > Discussed with: smh > MFC after: 2 weeks > > Modified: > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c > > Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c > ============================================================================== > --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Fri Apr 14 15:31:04 2017 (r316853) > +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Fri Apr 14 15:35:07 2017 (r316854) > @@ -353,7 +353,7 @@ sysctl_vfs_zfs_debug_flags(SYSCTL_HANDLE > return (0); > } > > -SYSCTL_PROC(_vfs_zfs, OID_AUTO, debug_flags, > +SYSCTL_PROC(_vfs_zfs, OID_AUTO, debugflags, > CTLTYPE_UINT | CTLFLAG_MPSAFE | CTLFLAG_RWTUN, 0, sizeof(int), > sysctl_vfs_zfs_debug_flags, "IU", "Debug flags for ZFS testing."); > > From owner-svn-src-head@freebsd.org Fri Apr 14 16:20:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D33B1D3DECB; Fri, 14 Apr 2017 16:20:56 +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 96C4794F; Fri, 14 Apr 2017 16:20:55 +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 TAA09263; Fri, 14 Apr 2017 19:20:48 +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 1cz3xo-000EYA-3S; Fri, 14 Apr 2017 19:20:48 +0300 Subject: Re: svn commit: r316854 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs To: Alan Somers Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" References: <201704141535.v3EFZ7BY096442@repo.freebsd.org> From: Andriy Gapon Message-ID: Date: Fri, 14 Apr 2017 19:19:26 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 16:20:56 -0000 On 14/04/2017 18:55, Alan Somers wrote: > Are you sure it's a good idea to MFC this change? Doing so will upset > anybody currently setting that sysctl in /etc/sysctl.conf. Well, this is a debug knob, so I expected that it is tweaked by hand on as needed basis. I don't expect that it is used as a permanent setting. But to err on the side of caution I can add a compatibility sysctl name. > On Fri, Apr 14, 2017 at 9:35 AM, Andriy Gapon wrote: >> Author: avg >> Date: Fri Apr 14 15:35:07 2017 >> New Revision: 316854 >> URL: https://svnweb.freebsd.org/changeset/base/316854 >> >> Log: >> rename vfs.zfs.debug_flags to vfs.zfs.debugflags >> >> While the former name is easier to read, the "_flags" suffix has a special >> meaning for loader(8) and, thus, it was impossible to set the knob via >> loader.conf(5). The loader interpreted the setting as flags that should >> be passed to a kernel module named "vfs.zfs.debug". >> >> Discussed with: smh >> MFC after: 2 weeks >> >> Modified: >> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c >> >> Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c >> ============================================================================== >> --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Fri Apr 14 15:31:04 2017 (r316853) >> +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Fri Apr 14 15:35:07 2017 (r316854) >> @@ -353,7 +353,7 @@ sysctl_vfs_zfs_debug_flags(SYSCTL_HANDLE >> return (0); >> } >> >> -SYSCTL_PROC(_vfs_zfs, OID_AUTO, debug_flags, >> +SYSCTL_PROC(_vfs_zfs, OID_AUTO, debugflags, >> CTLTYPE_UINT | CTLFLAG_MPSAFE | CTLFLAG_RWTUN, 0, sizeof(int), >> sysctl_vfs_zfs_debug_flags, "IU", "Debug flags for ZFS testing."); >> >> -- Andriy Gapon From owner-svn-src-head@freebsd.org Fri Apr 14 16:21:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C437D3DF53; Fri, 14 Apr 2017 16:21:19 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com [74.125.82.51]) (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 CF3F6AE1; Fri, 14 Apr 2017 16:21:18 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-wm0-f51.google.com with SMTP id o81so132887970wmb.1; Fri, 14 Apr 2017 09:21:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=MuF1fL4wP1zl7aYEqmI8Old8lhHcMrsWjX5dgV/Tm8o=; b=Pn5yft7JzApttt5k5KT6suBsVGaSdWS/zFF4zgTiW7hl1ryR0HyT7sAtS8Y1Q33/XS DxTP1CTY1wDaMjdIewdSxEUyOM5bSeWsb0kQyoxxWjp+2trgNlvD8TWgUFgER8WnNnLf umHF4cJUFSLIziomMpwSNvSrzf3PKtWaQHiPlQHXAs3mPz3xF8ypvw/2zy7lpXO66KFL 4avPhnushUzj83eYfb7J8al4NK7m3p/bH5LXOBvpkmKOzVaGExbckD6lT8M86BY843UB AmPNc1klAMoZkahgGMSrIC1XJo14tPR/J73e9U8DkvzppX34Dj8xCX2D05YjE3qckBeJ 7f4Q== X-Gm-Message-State: AN3rC/6Dgcfs0A6d3az6JD6p7fVw/r6XKF/ATYLH6MqvzPxEy+lBC66d nO0HU527G0EwWg== X-Received: by 10.28.133.139 with SMTP id h133mr30643769wmd.87.1492186535977; Fri, 14 Apr 2017 09:15:35 -0700 (PDT) Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com. [74.125.82.50]) by smtp.gmail.com with ESMTPSA id v7sm2916446wrd.0.2017.04.14.09.15.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Apr 2017 09:15:35 -0700 (PDT) Received: by mail-wm0-f50.google.com with SMTP id u2so67538663wmu.0; Fri, 14 Apr 2017 09:15:35 -0700 (PDT) X-Received: by 10.28.218.197 with SMTP id r188mr8272286wmg.0.1492186535731; Fri, 14 Apr 2017 09:15:35 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.80.169.4 with HTTP; Fri, 14 Apr 2017 09:15:35 -0700 (PDT) In-Reply-To: <1492185206.73883.126.camel@freebsd.org> References: <201704141158.v3EBwfLm003147@repo.freebsd.org> <1492185206.73883.126.camel@freebsd.org> From: Conrad Meyer Date: Fri, 14 Apr 2017 09:15:35 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r316826 - head/sys/netpfil/ipfw/nat64 To: Ian Lepore Cc: "Andrey V. Elsukov" , 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 16:21:19 -0000 Ian, I don't know about "guaranteed," but it certainly looks like the htonl/bswap macros intend to avoid double-evaluating macro parameters. On Fri, Apr 14, 2017 at 8:53 AM, Ian Lepore wrote: > On Fri, 2017-04-14 at 08:32 -0700, Conrad Meyer wrote: >> On Fri, Apr 14, 2017 at 4:58 AM, Andrey V. Elsukov >> wrote: >> > >> > Author: ae >> > Date: Fri Apr 14 11:58:41 2017 >> > New Revision: 316826 >> > URL: https://svnweb.freebsd.org/changeset/base/316826 >> > >> > Log: >> > Avoid undefined behavior. >> > >> > The 'pktid' variable is modified while being used twice between >> > sequence points, probably due to htonl() is macro. >> FYI =E2=80=94 there are a ton of similar reports in sys/rpc due to the X= DR >> macros (which read a network value off a pointer and increment it). >> See e.g., IXDR_GET_UINT32() macro. >> >> Best, >> Conrad > > Aren't they all false positives, since the macros involved are g'teed > not to evaluate their arguments more than once as written (because > __builtin_constant_p always evaluates at compile time)? Do we really > want to churn our source code to eliminate false positives from some > tool that appears to still be in its alpha-testing state? > > -- Ian From owner-svn-src-head@freebsd.org Fri Apr 14 16:30:38 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B43F1D3E0AD; Fri, 14 Apr 2017 16:30:38 +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 808B3DE8; Fri, 14 Apr 2017 16:30:38 +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 v3EGUbdf018455; Fri, 14 Apr 2017 16:30:37 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3EGUbFe018438; Fri, 14 Apr 2017 16:30:37 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201704141630.v3EGUbFe018438@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 14 Apr 2017 16:30:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316856 - head/cddl/contrib/opensolaris/cmd/zdb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 16:30:38 -0000 Author: asomers Date: Fri Apr 14 16:30:37 2017 New Revision: 316856 URL: https://svnweb.freebsd.org/changeset/base/316856 Log: MFV 316855 7900 zdb shouldn't print the path of a znode at verbosity < 5 Reviewed by: Paul Dagnelie Reviewed by: Matt Ahrens Approved by: Dan McDonald Author: Alan Somers illumos/illumos-gate@e548d2fa41d1baa06662ed9abbb8bcec86e27dd9 https://www.illumos.org/issues/7900 MFC after: 3 weeks Sponsored by: Spectra Logic Corp Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Fri Apr 14 16:18:53 2017 (r316855) +++ head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Fri Apr 14 16:30:37 2017 (r316856) @@ -1718,23 +1718,19 @@ dump_znode(objset_t *os, uint64_t object return; } - error = zfs_obj_to_path(os, object, path, sizeof (path)); - if (error != 0) { - (void) snprintf(path, sizeof (path), "\?\?\?", - (u_longlong_t)object); - } - if (dump_opt['d'] < 3) { - (void) printf("\t%s\n", path); - (void) sa_handle_destroy(hdl); - return; - } - z_crtime = (time_t)crtm[0]; z_atime = (time_t)acctm[0]; z_mtime = (time_t)modtm[0]; z_ctime = (time_t)chgtm[0]; - (void) printf("\tpath %s\n", path); + if (dump_opt['d'] > 4) { + error = zfs_obj_to_path(os, object, path, sizeof (path)); + if (error != 0) { + (void) snprintf(path, sizeof (path), + "\?\?\?", (u_longlong_t)object); + } + (void) printf("\tpath %s\n", path); + } dump_uidgid(os, uid, gid); (void) printf("\tatime %s", ctime(&z_atime)); (void) printf("\tmtime %s", ctime(&z_mtime)); From owner-svn-src-head@freebsd.org Fri Apr 14 16:54:51 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB0A0D3E9A2; Fri, 14 Apr 2017 16:54:51 +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 9CC42856; Fri, 14 Apr 2017 16:54:51 +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 v3EGsoOA030617; Fri, 14 Apr 2017 16:54:50 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3EGsoJw030616; Fri, 14 Apr 2017 16:54:50 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201704141654.v3EGsoJw030616@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 14 Apr 2017 16:54:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316859 - head/sys/geom/mirror X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 16:54:51 -0000 Author: markj Date: Fri Apr 14 16:54:50 2017 New Revision: 316859 URL: https://svnweb.freebsd.org/changeset/base/316859 Log: Stop mirror synchronization before draining the I/O queue. Regular I/O requests may be blocked by concurrent synchronization requests targeted to the same LBAs, in which case they are moved to a holding queue until the conflicting I/O completes. We therefore want to stop synchronization before completing pending I/O in g_mirror_destroy_provider() since this ensures that blocked I/O requests are completed as well. Tested by: pho MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/sys/geom/mirror/g_mirror.c Modified: head/sys/geom/mirror/g_mirror.c ============================================================================== --- head/sys/geom/mirror/g_mirror.c Fri Apr 14 16:53:34 2017 (r316858) +++ head/sys/geom/mirror/g_mirror.c Fri Apr 14 16:54:50 2017 (r316859) @@ -2170,6 +2170,11 @@ g_mirror_destroy_provider(struct g_mirro KASSERT(sc->sc_provider != NULL, ("NULL provider (device=%s).", sc->sc_name)); + LIST_FOREACH(disk, &sc->sc_disks, d_next) { + if (disk->d_state == G_MIRROR_DISK_STATE_SYNCHRONIZING) + g_mirror_sync_stop(disk, 1); + } + g_topology_lock(); g_error_provider(sc->sc_provider, ENXIO); mtx_lock(&sc->sc_queue_mtx); @@ -2193,10 +2198,6 @@ g_mirror_destroy_provider(struct g_mirro sc->sc_provider = NULL; G_MIRROR_DEBUG(0, "Device %s: provider destroyed.", sc->sc_name); g_topology_unlock(); - LIST_FOREACH(disk, &sc->sc_disks, d_next) { - if (disk->d_state == G_MIRROR_DISK_STATE_SYNCHRONIZING) - g_mirror_sync_stop(disk, 1); - } } static void From owner-svn-src-head@freebsd.org Fri Apr 14 17:02:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67447D3EFE6; Fri, 14 Apr 2017 17:02: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 37A7699D; Fri, 14 Apr 2017 17:02: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 v3EH2OX7032026; Fri, 14 Apr 2017 17:02:24 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3EH2OrW032025; Fri, 14 Apr 2017 17:02:24 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201704141702.v3EH2OrW032025@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Fri, 14 Apr 2017 17:02:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316865 - head/sys/dev/syscons X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 17:02:25 -0000 Author: bde Date: Fri Apr 14 17:02:24 2017 New Revision: 316865 URL: https://svnweb.freebsd.org/changeset/base/316865 Log: Adjust shifting so that cursor widths up to 17 (was 9) work in vga planar mode. Direct mode always supported widths up to 32, except for its hard-coded 16s matching the pixmap size. Text mode is still limited to 9 its 2x2 character cell method and missing adjustments for the gap between characters, if any. Cursor heights can be almost anything in graphics modes. Modified: head/sys/dev/syscons/scvgarndr.c Modified: head/sys/dev/syscons/scvgarndr.c ============================================================================== --- head/sys/dev/syscons/scvgarndr.c Fri Apr 14 17:01:00 2017 (r316864) +++ head/sys/dev/syscons/scvgarndr.c Fri Apr 14 17:02:24 2017 (r316865) @@ -1045,9 +1045,9 @@ draw_pxlmouse_planar(scr_stat *scp, int outw(GDCIDX, 0x0803); /* data rotate/function select (and) */ p = scp->sc->adp->va_window + line_width*y + x/8; for (i = y, j = 0; i < ymax; ++i, ++j) { - m = ~((mouse_and_mask[j] & ~mouse_or_mask[j]) >> xoff); - for (k = 0; k < 2; ++k) { - m1 = m >> (8 * (1 - k)); + m = ~((mouse_and_mask[j] & ~mouse_or_mask[j]) << 8 >> xoff); + for (k = 0; k < 3; ++k) { + m1 = m >> (8 * (2 - k)); if (m1 != 0xff && x + 8 * k < scp->xpixel) { readb(p + k); writeb(p + k, m1); @@ -1058,9 +1058,9 @@ draw_pxlmouse_planar(scr_stat *scp, int outw(GDCIDX, 0x1003); /* data rotate/function select (or) */ p = scp->sc->adp->va_window + line_width*y + x/8; for (i = y, j = 0; i < ymax; ++i, ++j) { - m = mouse_or_mask[j] >> xoff; - for (k = 0; k < 2; ++k) { - m1 = m >> (8 * (1 - k)); + m = mouse_or_mask[j] << 8 >> xoff; + for (k = 0; k < 3; ++k) { + m1 = m >> (8 * (2 - k)); if (m1 != 0 && x + 8 * k < scp->xpixel) { readb(p + k); writeb(p + k, m1); From owner-svn-src-head@freebsd.org Fri Apr 14 17:03:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A04F7D3D0D5; Fri, 14 Apr 2017 17:03:33 +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 7271AC43; Fri, 14 Apr 2017 17:03:33 +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 v3EH3WnY035123; Fri, 14 Apr 2017 17:03:32 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3EH3W5H035122; Fri, 14 Apr 2017 17:03:32 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201704141703.v3EH3W5H035122@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 14 Apr 2017 17:03:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316866 - head/sys/geom/mirror X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 17:03:33 -0000 Author: markj Date: Fri Apr 14 17:03:32 2017 New Revision: 316866 URL: https://svnweb.freebsd.org/changeset/base/316866 Log: Check for a provider error before enqueuing mirror I/O. We are otherwise susceptible to a race with a concurrent teardown of the mirror provider, causing the I/O to be left uncompleted after the mirror started withering. Tested by: pho MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/sys/geom/mirror/g_mirror.c Modified: head/sys/geom/mirror/g_mirror.c ============================================================================== --- head/sys/geom/mirror/g_mirror.c Fri Apr 14 17:02:24 2017 (r316865) +++ head/sys/geom/mirror/g_mirror.c Fri Apr 14 17:03:32 2017 (r316866) @@ -1176,6 +1176,11 @@ g_mirror_start(struct bio *bp) return; } mtx_lock(&sc->sc_queue_mtx); + if (bp->bio_to->error != 0) { + mtx_unlock(&sc->sc_queue_mtx); + g_io_deliver(bp, bp->bio_to->error); + return; + } bioq_insert_tail(&sc->sc_queue, bp); mtx_unlock(&sc->sc_queue_mtx); G_MIRROR_DEBUG(4, "%s: Waking up %p.", __func__, sc); From owner-svn-src-head@freebsd.org Fri Apr 14 17:08:38 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CEF6BD3D4EC; Fri, 14 Apr 2017 17:08:38 +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 9F221F7; Fri, 14 Apr 2017 17:08:38 +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 v3EH8bLb035394; Fri, 14 Apr 2017 17:08:37 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3EH8beb035393; Fri, 14 Apr 2017 17:08:37 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201704141708.v3EH8beb035393@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 14 Apr 2017 17:08:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316867 - head/sys/geom/mirror X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 17:08:38 -0000 Author: markj Date: Fri Apr 14 17:08:37 2017 New Revision: 316867 URL: https://svnweb.freebsd.org/changeset/base/316867 Log: Don't set the mirror GEOM softc to NULL in g_mirror_destroy(). At this point we have not rendezvous'ed with the mirror worker thread, and I/O may still be in flight. Various I/O completion paths expect to be able to obtain a reference to the mirror softc from the GEOM, so setting it to NULL may result in various NULL pointer dereferences if the mirror is stopped with -f or the kernel is shut down while a mirror is synchronizing. The worker thread will clear the softc pointer before exiting. Tested by: pho MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/sys/geom/mirror/g_mirror.c Modified: head/sys/geom/mirror/g_mirror.c ============================================================================== --- head/sys/geom/mirror/g_mirror.c Fri Apr 14 17:03:32 2017 (r316866) +++ head/sys/geom/mirror/g_mirror.c Fri Apr 14 17:08:37 2017 (r316867) @@ -3076,15 +3076,8 @@ g_mirror_destroy(struct g_mirror_softc * } } - g_topology_lock(); - if (sc->sc_geom->softc == NULL) { - g_topology_unlock(); + if ((sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROY) != 0) return (0); - } - sc->sc_geom->softc = NULL; - sc->sc_sync.ds_geom->softc = NULL; - g_topology_unlock(); - sc->sc_flags |= G_MIRROR_DEVICE_FLAG_DESTROY; sc->sc_flags |= G_MIRROR_DEVICE_FLAG_WAIT; G_MIRROR_DEBUG(4, "%s: Waking up %p.", __func__, sc); From owner-svn-src-head@freebsd.org Fri Apr 14 17:13:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 495A0D3DB09; Fri, 14 Apr 2017 17:13:59 +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 24A37CD1; Fri, 14 Apr 2017 17:13:59 +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 v3EHDw2H039406; Fri, 14 Apr 2017 17:13:58 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3EHDwdp039404; Fri, 14 Apr 2017 17:13:58 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201704141713.v3EHDwdp039404@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 14 Apr 2017 17:13:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316869 - head/sys/geom/mirror X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 17:13:59 -0000 Author: markj Date: Fri Apr 14 17:13:57 2017 New Revision: 316869 URL: https://svnweb.freebsd.org/changeset/base/316869 Log: Rename two gmirror state flags to make their meanings slightly clearer. No functional change. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/sys/geom/mirror/g_mirror.c head/sys/geom/mirror/g_mirror.h Modified: head/sys/geom/mirror/g_mirror.c ============================================================================== --- head/sys/geom/mirror/g_mirror.c Fri Apr 14 17:13:49 2017 (r316868) +++ head/sys/geom/mirror/g_mirror.c Fri Apr 14 17:13:57 2017 (r316869) @@ -1825,7 +1825,7 @@ g_mirror_try_destroy(struct g_mirror_sof } sc->sc_geom->softc = NULL; sc->sc_sync.ds_geom->softc = NULL; - if ((sc->sc_flags & G_MIRROR_DEVICE_FLAG_WAIT) != 0) { + if ((sc->sc_flags & G_MIRROR_DEVICE_FLAG_DRAIN) != 0) { g_topology_unlock(); G_MIRROR_DEBUG(4, "%s: Waking up %p.", __func__, &sc->sc_worker); @@ -2911,8 +2911,8 @@ g_mirror_destroy_delayed(void *arg, int sx_xlock(&sc->sc_lock); KASSERT((sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROY) == 0, ("DESTROY flag set on %s.", sc->sc_name)); - KASSERT((sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROYING) != 0, - ("DESTROYING flag not set on %s.", sc->sc_name)); + KASSERT((sc->sc_flags & G_MIRROR_DEVICE_FLAG_CLOSEWAIT) != 0, + ("CLOSEWAIT flag not set on %s.", sc->sc_name)); G_MIRROR_DEBUG(1, "Destroying %s (delayed).", sc->sc_name); error = g_mirror_destroy(sc, G_MIRROR_DESTROY_SOFT); if (error != 0) { @@ -2939,7 +2939,7 @@ g_mirror_access(struct g_provider *pp, i g_topology_unlock(); sx_xlock(&sc->sc_lock); if ((sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROY) != 0 || - (sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROYING) != 0 || + (sc->sc_flags & G_MIRROR_DEVICE_FLAG_CLOSEWAIT) != 0 || LIST_EMPTY(&sc->sc_disks)) { if (acr > 0 || acw > 0 || ace > 0) error = ENXIO; @@ -2948,7 +2948,7 @@ g_mirror_access(struct g_provider *pp, i sc->sc_provider_open += acr + acw + ace; if (pp->acw + acw == 0) g_mirror_idle(sc, 0); - if ((sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROYING) != 0 && + if ((sc->sc_flags & G_MIRROR_DEVICE_FLAG_CLOSEWAIT) != 0 && sc->sc_provider_open == 0) g_post_event(g_mirror_destroy_delayed, sc, M_WAITOK, sc, NULL); end: @@ -3068,7 +3068,7 @@ g_mirror_destroy(struct g_mirror_softc * g_mirror_sync_stop(disk, 1); } } - sc->sc_flags |= G_MIRROR_DEVICE_FLAG_DESTROYING; + sc->sc_flags |= G_MIRROR_DEVICE_FLAG_CLOSEWAIT; return (EBUSY); case G_MIRROR_DESTROY_HARD: G_MIRROR_DEBUG(1, "Device %s is still open, so it " @@ -3079,7 +3079,7 @@ g_mirror_destroy(struct g_mirror_softc * if ((sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROY) != 0) return (0); sc->sc_flags |= G_MIRROR_DEVICE_FLAG_DESTROY; - sc->sc_flags |= G_MIRROR_DEVICE_FLAG_WAIT; + sc->sc_flags |= G_MIRROR_DEVICE_FLAG_DRAIN; G_MIRROR_DEBUG(4, "%s: Waking up %p.", __func__, sc); sx_xunlock(&sc->sc_lock); mtx_lock(&sc->sc_queue_mtx); Modified: head/sys/geom/mirror/g_mirror.h ============================================================================== --- head/sys/geom/mirror/g_mirror.h Fri Apr 14 17:13:49 2017 (r316868) +++ head/sys/geom/mirror/g_mirror.h Fri Apr 14 17:13:57 2017 (r316869) @@ -157,8 +157,8 @@ struct g_mirror_event { }; #define G_MIRROR_DEVICE_FLAG_DESTROY 0x0100000000000000ULL -#define G_MIRROR_DEVICE_FLAG_WAIT 0x0200000000000000ULL -#define G_MIRROR_DEVICE_FLAG_DESTROYING 0x0400000000000000ULL +#define G_MIRROR_DEVICE_FLAG_DRAIN 0x0200000000000000ULL +#define G_MIRROR_DEVICE_FLAG_CLOSEWAIT 0x0400000000000000ULL #define G_MIRROR_DEVICE_FLAG_TASTING 0x0800000000000000ULL #define G_MIRROR_DEVICE_FLAG_WIPE 0x1000000000000000ULL From owner-svn-src-head@freebsd.org Fri Apr 14 17:23:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 10D85D3E3D2; Fri, 14 Apr 2017 17:23:30 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B8FBAFED; Fri, 14 Apr 2017 17:23:29 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3EHNSDt043903; Fri, 14 Apr 2017 17:23:28 GMT (envelope-from sobomax@FreeBSD.org) Received: (from sobomax@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3EHNS3B043902; Fri, 14 Apr 2017 17:23:28 GMT (envelope-from sobomax@FreeBSD.org) Message-Id: <201704141723.v3EHNS3B043902@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sobomax set sender to sobomax@FreeBSD.org using -f From: Maxim Sobolev Date: Fri, 14 Apr 2017 17:23:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316874 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 17:23:30 -0000 Author: sobomax Date: Fri Apr 14 17:23:28 2017 New Revision: 316874 URL: https://svnweb.freebsd.org/changeset/base/316874 Log: Restore ability to shutdown DGRAM sockets, still forcing ENOTCONN to be returned by the shutdown(2) system call. This ability has been lost as part of the svn revision 285910. Reviewed by: ed, rwatson, glebius, hiren MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D10351 Modified: head/sys/kern/uipc_socket.c Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Fri Apr 14 17:22:54 2017 (r316873) +++ head/sys/kern/uipc_socket.c Fri Apr 14 17:23:28 2017 (r316874) @@ -2343,13 +2343,27 @@ int soshutdown(struct socket *so, int how) { struct protosw *pr = so->so_proto; - int error; + int error, soerror_enotconn; if (!(how == SHUT_RD || how == SHUT_WR || how == SHUT_RDWR)) return (EINVAL); + + soerror_enotconn = 0; if ((so->so_state & - (SS_ISCONNECTED | SS_ISCONNECTING | SS_ISDISCONNECTING)) == 0) - return (ENOTCONN); + (SS_ISCONNECTED | SS_ISCONNECTING | SS_ISDISCONNECTING)) == 0) { + /* + * POSIX mandates us to return ENOTCONN when shutdown(2) is + * invoked on a datagram sockets, however historically we would + * actually tear socket down. This is known to be leveraged by + * some applications to unblock process waiting in recvXXX(2) + * by other process that it shares that socket with. Try to meet + * both backward-compatibility and POSIX requirements by forcing + * ENOTCONN but still asking protocol to perform pru_shutdown(). + */ + if (so->so_type != SOCK_DGRAM) + return (ENOTCONN); + soerror_enotconn = 1; + } CURVNET_SET(so->so_vnet); if (pr->pr_usrreqs->pru_flush != NULL) @@ -2360,11 +2374,12 @@ soshutdown(struct socket *so, int how) error = (*pr->pr_usrreqs->pru_shutdown)(so); wakeup(&so->so_timeo); CURVNET_RESTORE(); - return (error); + return ((error == 0 && soerror_enotconn) ? ENOTCONN : error); } wakeup(&so->so_timeo); CURVNET_RESTORE(); - return (0); + + return (soerror_enotconn ? ENOTCONN : 0); } void From owner-svn-src-head@freebsd.org Fri Apr 14 17:38:44 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB645D3E8D9; Fri, 14 Apr 2017 17:38:44 +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 7D924EB6; Fri, 14 Apr 2017 17:38:44 +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 v3EHcht5048365; Fri, 14 Apr 2017 17:38:43 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3EHch8f048364; Fri, 14 Apr 2017 17:38:43 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201704141738.v3EHch8f048364@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Fri, 14 Apr 2017 17:38:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316878 - head/sys/dev/syscons X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 17:38:44 -0000 Author: bde Date: Fri Apr 14 17:38:43 2017 New Revision: 316878 URL: https://svnweb.freebsd.org/changeset/base/316878 Log: Oops, the previous revision was missing the update of the shift variable. Modified: head/sys/dev/syscons/scvgarndr.c Modified: head/sys/dev/syscons/scvgarndr.c ============================================================================== --- head/sys/dev/syscons/scvgarndr.c Fri Apr 14 17:27:09 2017 (r316877) +++ head/sys/dev/syscons/scvgarndr.c Fri Apr 14 17:38:43 2017 (r316878) @@ -1030,7 +1030,7 @@ draw_pxlmouse_planar(scr_stat *scp, int int line_width; int xoff, yoff; int ymax; - u_short m; + uint32_t m; int i, j, k; uint8_t m1; From owner-svn-src-head@freebsd.org Fri Apr 14 18:49:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DFD1DD3ED98; Fri, 14 Apr 2017 18:49:31 +0000 (UTC) (envelope-from peter@wemm.org) Received: from smtp2.wemm.org (smtp2.wemm.org [192.203.228.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp2.wemm.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CB517946; Fri, 14 Apr 2017 18:49:31 +0000 (UTC) (envelope-from peter@wemm.org) Received: from overcee.wemm.org (canning.wemm.org [192.203.228.65]) by smtp2.wemm.org (Postfix) with ESMTP id 925FA2B8; Fri, 14 Apr 2017 11:49:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=m20140428; t=1492195770; bh=Z6xPhUHRlm0fby4MJ07uURjrHumflpZpZe9s5a5CBU8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Eq/a4hbvCtInowN0e9QMSQXxYRxwdAmm5bQTkH+vX8Q3ZfZ2bZlgVntM+JshJfvAq MMgWqhhN5H9PbB7B9mXwIlOMKasIdiiRYKpiwA+deW2TJ6g8CjmCAR30ZO3u59X10B gVeduMKRiHDe8h24FDOzV5y8XZ30wc8K+gb1RWmI= From: Peter Wemm To: svn-src-all@freebsd.org Cc: Maxim Sobolev , src-committers@freebsd.org, svn-src-head@freebsd.org, Hiren Panchasara Subject: Re: svn commit: r316874 - head/sys/kern Date: Fri, 14 Apr 2017 11:49:26 -0700 Message-ID: <1599271.FxKGEkh3s8@overcee.wemm.org> User-Agent: KMail/4.14.10 (FreeBSD/12.0-CURRENT; KDE/4.14.10; amd64; ; ) In-Reply-To: <201704141723.v3EHNS3B043902@repo.freebsd.org> References: <201704141723.v3EHNS3B043902@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2770083.al7Ir3C4kI"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 18:49:32 -0000 --nextPart2770083.al7Ir3C4kI Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="us-ascii" On Friday, April 14, 2017 05:23:28 PM Maxim Sobolev wrote: > Author: sobomax > Date: Fri Apr 14 17:23:28 2017 > New Revision: 316874 > URL: https://svnweb.freebsd.org/changeset/base/316874 >=20 > Log: > Restore ability to shutdown DGRAM sockets, still forcing ENOTCONN t= o be > returned by the shutdown(2) system call. This ability has been lost a= s part > of the svn revision 285910. >=20 > Reviewed by:=09ed, rwatson, glebius, hiren > MFC after:=092 weeks > Differential Revision:=09https://reviews.freebsd.org/D10351 This appears to have broken syslogd and had a major change in behavior = with=20 regards to select(2). If you run syslogd with the -s flag (which is default), it now spins at= 100%=20 cpu as all the shutdown sockets now return readable from select. Old releases / jails also manifest this behavor. If it wasn't for losi= ng the=20 ability to run old branch binaries I'd suggest changing syslogd instead= , but=20 we depend on this in the cluster and I expect others do too. I'm not 100% certain that this change is the culprit but a heads-up can= 't=20 hurt. I'll try reverting it on the freebsd cluster next, after fixing t= he=20 broken auditing changes. =2DPeter =2D-=20 Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI= 6FJV UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246 --nextPart2770083.al7Ir3C4kI Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEBgrA0Vr/vfNVuPoUNdaXCeyAngQFAljxGbYACgkQNdaXCeyA ngQBCggApmBnRNEPOo6bYCm9FDdP12t08FtP6ZOC5mZjgxzOQ5dIUYoZ9HvLQ0Qq uM9Z/nVdk5hwb/SsIDPy3VsU6ASmwApVzOxv84/y4O0acDVVoiVu0HQ5Bz3dqz1s HJoS6wlv0afr14hba+4tnLK5krwze6/CHJ2k1MgBZHqNjqwhsgzTK8gjgNuJhClI dXFbHB8vBXcMz4r1MEAWlTUV/fCzTFGGxAvYSUNcJNAjaRd3fvpEdkMv+cvGw3OE ge447UmbAVH7aBv+8ExeelIYR5fexcQ3XkfdXWamm/p9xOfY/e3mnfk7ei3cHwOI YQSShQKA4RQj1czUeCotMq9mboC34A== =hHRC -----END PGP SIGNATURE----- --nextPart2770083.al7Ir3C4kI-- From owner-svn-src-head@freebsd.org Fri Apr 14 19:15:32 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A78AD3EB95; Fri, 14 Apr 2017 19:15:32 +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 3C910BCF; Fri, 14 Apr 2017 19:15:32 +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 v3EJFVQM093442; Fri, 14 Apr 2017 19:15:31 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3EJFVMX093441; Fri, 14 Apr 2017 19:15:31 GMT (envelope-from np@FreeBSD.org) Message-Id: <201704141915.v3EJFVMX093441@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 14 Apr 2017 19:15:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316936 - head/sys/dev/cxgbe/iw_cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 19:15:32 -0000 Author: np Date: Fri Apr 14 19:15:31 2017 New Revision: 316936 URL: https://svnweb.freebsd.org/changeset/base/316936 Log: cxgbe/iw_cxgbe: hw supports 64K (not 32K) Protection Domains. MFC after: 3 days Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/iw_cxgbe/t4.h Modified: head/sys/dev/cxgbe/iw_cxgbe/t4.h ============================================================================== --- head/sys/dev/cxgbe/iw_cxgbe/t4.h Fri Apr 14 18:56:00 2017 (r316935) +++ head/sys/dev/cxgbe/iw_cxgbe/t4.h Fri Apr 14 19:15:31 2017 (r316936) @@ -61,7 +61,7 @@ #define T4_MAX_NUM_QP (1<<16) #define T4_MAX_NUM_CQ (1<<15) -#define T4_MAX_NUM_PD (1<<15) +#define T4_MAX_NUM_PD 65536 #define T4_EQ_STATUS_ENTRIES (L1_CACHE_BYTES > 64 ? 2 : 1) #define T4_MAX_EQ_SIZE (65520 - T4_EQ_STATUS_ENTRIES) #define T4_MAX_IQ_SIZE (65520 - 1) From owner-svn-src-head@freebsd.org Fri Apr 14 19:18:51 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E46CDD3EC60; Fri, 14 Apr 2017 19:18:51 +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 B108CD5B; Fri, 14 Apr 2017 19:18:51 +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 v3EJIowj093600; Fri, 14 Apr 2017 19:18:50 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3EJIotl093598; Fri, 14 Apr 2017 19:18:50 GMT (envelope-from np@FreeBSD.org) Message-Id: <201704141918.v3EJIotl093598@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 14 Apr 2017 19:18:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316937 - in head: contrib/ofed/libcxgb4/src sys/dev/cxgbe/iw_cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 19:18:52 -0000 Author: np Date: Fri Apr 14 19:18:50 2017 New Revision: 316937 URL: https://svnweb.freebsd.org/changeset/base/316937 Log: cxgbe/iw_cxgbe: Report accurate page_size_cap in ib_query_device. MFC after: 3 days Sponsored by: Chelsio Communications Modified: head/contrib/ofed/libcxgb4/src/t4.h head/sys/dev/cxgbe/iw_cxgbe/t4.h Modified: head/contrib/ofed/libcxgb4/src/t4.h ============================================================================== --- head/contrib/ofed/libcxgb4/src/t4.h Fri Apr 14 19:15:31 2017 (r316936) +++ head/contrib/ofed/libcxgb4/src/t4.h Fri Apr 14 19:18:50 2017 (r316937) @@ -102,7 +102,7 @@ #define T4_MAX_CQ_DEPTH (T4_MAX_IQ_SIZE - 1) #define T4_MAX_NUM_STAG (1<<15) #define T4_MAX_MR_SIZE (~0ULL - 1) -#define T4_PAGESIZE_MASK 0xffff000 /* 4KB-128MB */ +#define T4_PAGESIZE_MASK 0xffffffff000 /* 4KB-8TB */ #define T4_STAG_UNSET 0xffffffff #define T4_FW_MAJ 0 Modified: head/sys/dev/cxgbe/iw_cxgbe/t4.h ============================================================================== --- head/sys/dev/cxgbe/iw_cxgbe/t4.h Fri Apr 14 19:15:31 2017 (r316936) +++ head/sys/dev/cxgbe/iw_cxgbe/t4.h Fri Apr 14 19:18:50 2017 (r316937) @@ -70,7 +70,7 @@ #define T4_MAX_QP_DEPTH (T4_MAX_RQ_SIZE - 1) #define T4_MAX_CQ_DEPTH (T4_MAX_IQ_SIZE - 1) #define T4_MAX_MR_SIZE (~0ULL - 1) -#define T4_PAGESIZE_MASK 0xffff000 /* 4KB-128MB */ +#define T4_PAGESIZE_MASK 0xffffffff000 /* 4KB-8TB */ #define T4_STAG_UNSET 0xffffffff #define T4_FW_MAJ 0 #define T4_EQ_STATUS_ENTRIES (L1_CACHE_BYTES > 64 ? 2 : 1) From owner-svn-src-head@freebsd.org Fri Apr 14 19:32:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AFB96D3E0A8; Fri, 14 Apr 2017 19:32:19 +0000 (UTC) (envelope-from peter@wemm.org) Received: from smtp2.wemm.org (smtp2.wemm.org [IPv6:2001:470:67:39d::78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp2.wemm.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9AECE8C5; Fri, 14 Apr 2017 19:32:19 +0000 (UTC) (envelope-from peter@wemm.org) Received: from overcee.wemm.org (canning.wemm.org [192.203.228.65]) by smtp2.wemm.org (Postfix) with ESMTP id C0D532FA; Fri, 14 Apr 2017 12:32:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=m20140428; t=1492198338; bh=kHIaA7a0IjEX2MvS6UZarJy9E0ji9RDq6eE4gfsVa7k=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=P0EVA9E6K0m1Q6EeOeIRvV2Er5Nbxqiy5O2jumSQyyVeVGWfgfZng7KZW+GpqXveA 6MvbOfDkj6WbobFu9gsVXwwpTgUPCEDVG1mLTAQVWk+W7nhj14PCcL5EZ3tQkxwvGK Z55/SnTP+7IHrzOWnaY9NRMxdH0y+NMw1aBKhfo0= From: Peter Wemm To: svn-src-all@freebsd.org Cc: svn-src-head@freebsd.org, Maxim Sobolev , src-committers@freebsd.org, Hiren Panchasara Subject: Re: svn commit: r316874 - head/sys/kern Date: Fri, 14 Apr 2017 12:32:14 -0700 Message-ID: <12133324.zHp9vo75vZ@overcee.wemm.org> User-Agent: KMail/4.14.10 (FreeBSD/12.0-CURRENT; KDE/4.14.10; amd64; ; ) In-Reply-To: <1599271.FxKGEkh3s8@overcee.wemm.org> References: <201704141723.v3EHNS3B043902@repo.freebsd.org> <1599271.FxKGEkh3s8@overcee.wemm.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart16221178.3qmYparrNt"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 19:32:19 -0000 --nextPart16221178.3qmYparrNt Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="us-ascii" On Friday, April 14, 2017 11:49:26 AM Peter Wemm wrote: > On Friday, April 14, 2017 05:23:28 PM Maxim Sobolev wrote: > > Author: sobomax > > Date: Fri Apr 14 17:23:28 2017 > > New Revision: 316874 > > URL: https://svnweb.freebsd.org/changeset/base/316874 > >=20 > > Log: > > Restore ability to shutdown DGRAM sockets, still forcing ENOTCONN= to be > >=20 > > returned by the shutdown(2) system call. This ability has been lost= as > > part > > of the svn revision 285910. > >=20 > > Reviewed by:=09ed, rwatson, glebius, hiren > > MFC after:=092 weeks > > Differential Revision:=09https://reviews.freebsd.org/D10351 >=20 > This appears to have broken syslogd and had a major change in behavio= r with > regards to select(2). >=20 > If you run syslogd with the -s flag (which is default), it now spins = at 100% > cpu as all the shutdown sockets now return readable from select. >=20 > Old releases / jails also manifest this behavor. If it wasn't for lo= sing > the ability to run old branch binaries I'd suggest changing syslogd > instead, but we depend on this in the cluster and I expect others do = too. >=20 > I'm not 100% certain that this change is the culprit but a heads-up c= an't > hurt. I'll try reverting it on the freebsd cluster next, after fixing= the > broken auditing changes. >=20 > -Peter I can confirm that reverting r316874 fixes syslogd and backwards compat= ability=20 with old branches. =2D-=20 Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI= 6FJV UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246 --nextPart16221178.3qmYparrNt Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEBgrA0Vr/vfNVuPoUNdaXCeyAngQFAljxI74ACgkQNdaXCeyA ngQkywf+Mmm+D59fuaA2/VIm1MZFYTUmfKFjQt1CkoRhul4dUF82c+2LUoFsTXLD hl/gq6+J5jcO1HaVgUe29BMFK+R7egZknGQzil1kLEtRAe6W3lomdJH+4aZHM1g1 SmhN8eNONP5qCRfrGiYufYOJQqCXbgGrVbZNraVI8s2CkTlmATF/eBbuPwn/9T6z oKFiR84IZXblwbWpFyq6k72F2Q3Y/17Jf3IpwscefvM9VSlk+Ak7QfqJK8lKOfI9 tcp+7tlR4Kp2oqwI88J2WzEwcxiOwaFrJljYyBvX7wRnHAE13WGQzX9e0+ZUqiS8 L3mDZ7fHDXDl/iaVgYrhAl3xSmS5JQ== =lG7i -----END PGP SIGNATURE----- --nextPart16221178.3qmYparrNt-- From owner-svn-src-head@freebsd.org Fri Apr 14 19:41:49 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81239D3E2C2; Fri, 14 Apr 2017 19:41:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 41DCECBB; Fri, 14 Apr 2017 19:41:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3EJfmNN003372; Fri, 14 Apr 2017 19:41:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3EJfmCW003347; Fri, 14 Apr 2017 19:41:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201704141941.v3EJfmCW003347@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 14 Apr 2017 19:41:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316938 - head/sbin/savecore X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 19:41:49 -0000 Author: ngie Date: Fri Apr 14 19:41:48 2017 New Revision: 316938 URL: https://svnweb.freebsd.org/changeset/base/316938 Log: savecore: fix space calculation with respect to `minfree` in check_space(..) - Use strtoll(3) instead of atoi(3), because atoi(3) limits the representable data to INT_MAX. Check the values received from strtoll(3), trimming trailing whitespace off the end to maintain POLA. - Use `KiB` instead of `kB` when describing free space, total space, etc. I am now fully aware of `KiB` being the IEC standard for 1024 bytes and `kB` being the IEC standard for 1000 bytes. - Store available number of KiB in `available` so it can be more easily queried and compared to ensure that there are enough KiB to store the dump image on disk. - Print out the reserved space on disk, per `minfree`, so end-users can troubleshoot why check_space(..) is reporting that there isn't enough free space. MFC after: 7 weeks Reviewed by: Anton Rang (earlier diff), cem (earlier diff) Tested with: positive/negative cases (see review); make tinderbox Sponsored by: Dell EMC Isilon Differential Revision: D10379 Modified: head/sbin/savecore/savecore.c Modified: head/sbin/savecore/savecore.c ============================================================================== --- head/sbin/savecore/savecore.c Fri Apr 14 19:18:50 2017 (r316937) +++ head/sbin/savecore/savecore.c Fri Apr 14 19:41:48 2017 (r316938) @@ -68,6 +68,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -278,7 +279,7 @@ static int check_space(const char *savedir, off_t dumpsize, int bounds) { FILE *fp; - off_t minfree, spacefree, totfree, needed; + off_t available, minfree, spacefree, totfree, needed; struct statfs fsbuf; char buf[100]; @@ -294,19 +295,37 @@ check_space(const char *savedir, off_t d else { if (fgets(buf, sizeof(buf), fp) == NULL) minfree = 0; - else - minfree = atoi(buf); + else { + char *endp; + + errno = 0; + minfree = strtoll(buf, &endp, 10); + if (minfree == 0 && errno != 0) + minfree = -1; + else { + while (*endp != '\0' && isspace(*endp)) + endp++; + if (*endp != '\0' || minfree < 0) + minfree = -1; + } + if (minfree < 0) + syslog(LOG_WARNING, + "`minfree` didn't contain a valid size " + "(`%s`). Defaulting to 0", buf); + } (void)fclose(fp); } + available = minfree > 0 ? spacefree - minfree : totfree; needed = dumpsize / 1024 + 2; /* 2 for info file */ needed -= saved_dump_size(bounds); - if ((minfree > 0 ? spacefree : totfree) - needed < minfree) { + if (available < needed) { syslog(LOG_WARNING, - "no dump: not enough free space on device (%lldkB " - "available; need at least %lldkB)", - (long long)(minfree > 0 ? spacefree : totfree), - (long long)needed); + "no dump: not enough free space on device (need at least " + "%jdKiB for dump; %jdKiB available; %jdKiB reserved)", + (intmax_t)needed, + (intmax_t)available + minfree, + (intmax_t)minfree); return (0); } if (spacefree - needed < 0) From owner-svn-src-head@freebsd.org Fri Apr 14 19:41:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8BA3DD3E2E5 for ; Fri, 14 Apr 2017 19:41:54 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail-io0-x234.google.com (mail-io0-x234.google.com [IPv6:2607:f8b0:4001:c06::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 4D1FBCF9 for ; Fri, 14 Apr 2017 19:41:54 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: by mail-io0-x234.google.com with SMTP id k87so98090855ioi.0 for ; Fri, 14 Apr 2017 12:41:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sippysoft-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=U+04fCFBtpnXmIt97UNzs1eFNXVni3GjYsE6IpsJvLQ=; b=DWQHG/FljMXszjBRHAjlEhLTm9ZJcGlh6ezuWnCg4yxc/W0Ljo9b2G5IX9lv/8KEwG HKivCwyWg/Hi7f6MPhvQ8cfEDgeC6UU1LlZjzB/D3nBhCGWV+Gn6AhtzJKs2EJsdLkY3 eaeqPZszsvh3wCH75kYjlrQsm1A5l0YwN9knRW+lVN9Qd0N/5Jig5ICQHGA7buLrvcoa J+BOIxr1qpQPgBe71fjvPuZuz5QyqOezbchveqAPWR+nRC9V5WlvDjC3Z14iqmUjmajD N+rkBi6imOaiylQ0ULdpGSmZLG2UhXtcjSbo+JdsUZJJOSyf7/kbOWilBpQ5Zx5BRYL/ IvLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=U+04fCFBtpnXmIt97UNzs1eFNXVni3GjYsE6IpsJvLQ=; b=W54F7TTIms+WivqAuB6aqraCNMt5jil7IQrXffaminU1MQWE18/UBa7say+b1x5eOg pD1EU6WlFcFZ/VZ1dqBwexa/us3W7sP1LQD10k49Vw554lMezXXvHX/JpTvq3ABdohub hgda1nO2ESpH/4gzsbtdIQfdGdrw6V1de2QynA/q21n+Z4ULyCTStlxdmpNeH2GMVBhE Rb270y5L2flt2BiIcWnDCy3AQoZoK3yvPl2jkEpbycefQYPnkkEycPIEEJKTY44km0d5 kocUHdCr0OCrTaVdCqMdOsNO4SYzwD1ripke5CErvbY6xMJnTF7p941neuMnMVCyCXW6 8FFQ== X-Gm-Message-State: AN3rC/7O6cjVjZ/09zRcH+xd/Uhsc+MPEmRPiHmg058miZNuIXtnD/sc oE+nFuEc2NJXdWaNOJVFgz6bYj3gBTPH X-Received: by 10.107.170.163 with SMTP id g35mr12721853ioj.101.1492198913628; Fri, 14 Apr 2017 12:41:53 -0700 (PDT) MIME-Version: 1.0 Sender: sobomax@sippysoft.com Received: by 10.36.104.135 with HTTP; Fri, 14 Apr 2017 12:41:52 -0700 (PDT) Received: by 10.36.104.135 with HTTP; Fri, 14 Apr 2017 12:41:52 -0700 (PDT) In-Reply-To: <12133324.zHp9vo75vZ@overcee.wemm.org> References: <201704141723.v3EHNS3B043902@repo.freebsd.org> <1599271.FxKGEkh3s8@overcee.wemm.org> <12133324.zHp9vo75vZ@overcee.wemm.org> From: Maxim Sobolev Date: Fri, 14 Apr 2017 12:41:52 -0700 X-Google-Sender-Auth: huJXHFzfgMcZtTnq7WY_iiD_uT8 Message-ID: Subject: Re: svn commit: r316874 - head/sys/kern To: Peter Wemm Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Hiren Panchasara Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 19:41:54 -0000 Thanks, Peter. I will try to look into this asap. -Max On Apr 14, 2017 12:32 PM, "Peter Wemm" wrote: > On Friday, April 14, 2017 11:49:26 AM Peter Wemm wrote: > > On Friday, April 14, 2017 05:23:28 PM Maxim Sobolev wrote: > > > Author: sobomax > > > Date: Fri Apr 14 17:23:28 2017 > > > New Revision: 316874 > > > URL: https://svnweb.freebsd.org/changeset/base/316874 > > > > > > Log: > > > Restore ability to shutdown DGRAM sockets, still forcing ENOTCONN to > be > > > > > > returned by the shutdown(2) system call. This ability has been lost as > > > part > > > of the svn revision 285910. > > > > > > Reviewed by: ed, rwatson, glebius, hiren > > > MFC after: 2 weeks > > > Differential Revision: https://reviews.freebsd.org/D10351 > > > > This appears to have broken syslogd and had a major change in behavior > with > > regards to select(2). > > > > If you run syslogd with the -s flag (which is default), it now spins at > 100% > > cpu as all the shutdown sockets now return readable from select. > > > > Old releases / jails also manifest this behavor. If it wasn't for losing > > the ability to run old branch binaries I'd suggest changing syslogd > > instead, but we depend on this in the cluster and I expect others do too. > > > > I'm not 100% certain that this change is the culprit but a heads-up can't > > hurt. I'll try reverting it on the freebsd cluster next, after fixing the > > broken auditing changes. > > > > -Peter > > I can confirm that reverting r316874 fixes syslogd and backwards > compatability > with old branches. > > -- > Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; > KI6FJV > UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246 From owner-svn-src-head@freebsd.org Fri Apr 14 19:46:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85B0CD3E45F; Fri, 14 Apr 2017 19:46:45 +0000 (UTC) (envelope-from peter@wemm.org) Received: from smtp2.wemm.org (smtp2.wemm.org [192.203.228.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp2.wemm.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 677CC167; Fri, 14 Apr 2017 19:46:45 +0000 (UTC) (envelope-from peter@wemm.org) Received: from overcee.wemm.org (canning.wemm.org [192.203.228.65]) by smtp2.wemm.org (Postfix) with ESMTP id 87F6330B; Fri, 14 Apr 2017 12:46:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=m20140428; t=1492199204; bh=m6agFC2SgIbVxFOItBosMjIOBCmP/5eC2Z7fDXiUXkQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=jMht7rxDaLoK1Xa56IfEXntQ8+VNpL4hpq+fmgi/Mh5ngmXXtK+S8yydwsW5Ynlcd kdpfUQiNlsc+lOI6SGxuo9LfjERu+TsJQPi8yw3OpMCD9OVD3BB1LqvexW7wYSc3Vq WLZf+lW3+Efn3FQ5F+cxQnQKciOSqxe36ThGQ3Bc= From: Peter Wemm To: Maxim Sobolev Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Hiren Panchasara Subject: Re: svn commit: r316874 - head/sys/kern Date: Fri, 14 Apr 2017 12:46:39 -0700 Message-ID: <6942092.OsECkgAp13@overcee.wemm.org> User-Agent: KMail/4.14.10 (FreeBSD/12.0-CURRENT; KDE/4.14.10; amd64; ; ) In-Reply-To: References: <201704141723.v3EHNS3B043902@repo.freebsd.org> <12133324.zHp9vo75vZ@overcee.wemm.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1639610.4lUEG6eNod"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 19:46:45 -0000 --nextPart1639610.4lUEG6eNod Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="us-ascii" On Friday, April 14, 2017 12:41:52 PM Maxim Sobolev wrote: > Thanks, Peter. I will try to look into this asap. I don't understand what is going on yet. Presumably there must be other= =20 changes in play that affect udp/select sometime between the original 20= 15=20 change and this. The syslogd -s code is Old(TM). I'm also wondering wh= ether=20 the -s code even works at all since the 2015 / r285910 change... > -Max >=20 > On Apr 14, 2017 12:32 PM, "Peter Wemm" wrote: > > On Friday, April 14, 2017 11:49:26 AM Peter Wemm wrote: > > > On Friday, April 14, 2017 05:23:28 PM Maxim Sobolev wrote: > > > > Author: sobomax > > > > Date: Fri Apr 14 17:23:28 2017 > > > > New Revision: 316874 > > > > URL: https://svnweb.freebsd.org/changeset/base/316874 > > > >=20 > > > > Log: > > > > Restore ability to shutdown DGRAM sockets, still forcing ENOT= CONN to > >=20 > > be > >=20 > > > > returned by the shutdown(2) system call. This ability has been = lost as > > > > part > > > > of the svn revision 285910. > > > >=20 > > > > Reviewed by: ed, rwatson, glebius, hiren > > > > MFC after: 2 weeks > > > > Differential Revision: https://reviews.freebsd.org/D10351 > > >=20 > > > This appears to have broken syslogd and had a major change in beh= avior > >=20 > > with > >=20 > > > regards to select(2). > > >=20 > > > If you run syslogd with the -s flag (which is default), it now sp= ins at > >=20 > > 100% > >=20 > > > cpu as all the shutdown sockets now return readable from select. > > >=20 > > > Old releases / jails also manifest this behavor. If it wasn't fo= r > > > losing > > > the ability to run old branch binaries I'd suggest changing syslo= gd > > > instead, but we depend on this in the cluster and I expect others= do > > > too. > > >=20 > > > I'm not 100% certain that this change is the culprit but a heads-= up > > > can't > > > hurt. I'll try reverting it on the freebsd cluster next, after fi= xing > > > the > > > broken auditing changes. > > >=20 > > > -Peter > >=20 > > I can confirm that reverting r316874 fixes syslogd and backwards > > compatability > > with old branches. > >=20 > > -- > > Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com= ; > > KI6FJV > > UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246 =2D-=20 Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI= 6FJV UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246 --nextPart1639610.4lUEG6eNod Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEBgrA0Vr/vfNVuPoUNdaXCeyAngQFAljxJyAACgkQNdaXCeyA ngRplwf/Z34dHsDsqm0Tpqsh9RMxDQNv4ezIMqoId2egNpmIrcXPm4JTBq8/pbTA J+Mi/zotWeDtfmcqtALCr0gQcNBL1ff3kxjWcMngcv7OtSK4JHyvdFUZhuTJIZrg iWklMg7HYinB8RdxLgctMmOMi0/ekn7QbhHoOqbtEGeLmJCTlvF0kmBbq7kqx+Sz 8cluLIS7KQTsr2ffsnfGpLI4Dcy0ycFeFfJ+t2uYdZWMCY1ocLHGKHTd1yXLAErW /p7KjZSXppK4a7ujh5tfvdrT7YPsY0A4wuRT4McPh/ZAIOLwMWXnlsUUUBKB2hZL YqFbimvrSpd4dXoeGNFZ6YtQAJIzog== =oxwE -----END PGP SIGNATURE----- --nextPart1639610.4lUEG6eNod-- From owner-svn-src-head@freebsd.org Fri Apr 14 19:48:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB23ED3E512; Fri, 14 Apr 2017 19:48:22 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x242.google.com (mail-pf0-x242.google.com [IPv6:2607:f8b0:400e:c00::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 76EAB2FC; Fri, 14 Apr 2017 19:48:22 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x242.google.com with SMTP id g23so1724326pfj.1; Fri, 14 Apr 2017 12:48:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=ScnLmnTl10AuSyzoRwdRXpeEA5pDH6cGQw09fgGaPKw=; b=UxxlaZPjj3jW+xN0bBosYcNfZJPIXbRjqULddHzg+KYmJUBgXapUkAK5obJGYh5c0Q 7I5o7K/e2gJj6fzEM8iaf/Z0hUvoYfVMUsvJAUR2VwT6Ku2k4iLU/4s6jeJ6EQmsxu9v r9lnf/c/VeSWiSty2yDNRnoyuyzFo1EOmR7HYcXHS8g3qMnDkloJ3ilI073L+VNx/wD+ SmOkdudelckDT2nL+V48sM4vzW2IW6vn8ktXm7gb5NqWWUZJJ66kT53hbkieccnnIbQh zAtJzFYgizDj5XhIx00zCrqWGgkZyvEzsDi2+XmpAk+pQnmB+t/QscCXcvCmWgEhi3Pw etOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=ScnLmnTl10AuSyzoRwdRXpeEA5pDH6cGQw09fgGaPKw=; b=QTDT5/Q7Bmpjt9K+9W8CZYMsihbqmFfaauG2tpSlICd/sx9fe6eRAYvGWvRzJWlwjx w6zrB1G6RxTmAPdbG7U3Pfxuiel41iGk3XeJMplpXUuDhl4hLfOCzBi65H4nqfeD60nb FkvyXR3KmPXcdeFkA8Bx7dOJcw5WY5OVVUE+Z1myt7O9u9ZsJpwI7A6Xc8NKrTsLqgZj NKxoLdhC7puctSvhzdX9nrJG/wR6EfhHa0C09EctuXb8J5c3yFV+zdlljjT4g1aLSRMD VcfCP1XUP27Xc1o0Cf04X0ayGiPpK6hgDuE2vFMAhIlTt3qsFc8T4z51cKxDCyqm/Rjg Gkkg== X-Gm-Message-State: AN3rC/6lBVaanm5cffmiNa2m4acfFajiGKs6zsLDx2i+SFTbgAXB0tkN 1EHVdffq/PBMWCY7hkg= X-Received: by 10.98.23.23 with SMTP id 23mr8459884pfx.30.1492199302010; Fri, 14 Apr 2017 12:48:22 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id k190sm4697723pge.5.2017.04.14.12.48.20 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Apr 2017 12:48:21 -0700 (PDT) Subject: Re: svn commit: r316874 - head/sys/kern Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_295A5878-6B12-4554-8BA1-06DBD9BD5B5C"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <6942092.OsECkgAp13@overcee.wemm.org> Date: Fri, 14 Apr 2017 12:48:19 -0700 Cc: Maxim Sobolev , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Hiren Panchasara Message-Id: <513B1846-02E3-49E0-BAA2-CA923EDC5DFF@gmail.com> References: <201704141723.v3EHNS3B043902@repo.freebsd.org> <12133324.zHp9vo75vZ@overcee.wemm.org> <6942092.OsECkgAp13@overcee.wemm.org> To: Peter Wemm X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 19:48:22 -0000 --Apple-Mail=_295A5878-6B12-4554-8BA1-06DBD9BD5B5C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Apr 14, 2017, at 12:46, Peter Wemm wrote: >=20 > On Friday, April 14, 2017 12:41:52 PM Maxim Sobolev wrote: >> Thanks, Peter. I will try to look into this asap. >=20 > I don't understand what is going on yet. Presumably there must be = other > changes in play that affect udp/select sometime between the original = 2015 > change and this. The syslogd -s code is Old(TM). I'm also wondering = whether > the -s code even works at all since the 2015 / r285910 change... syslogd has been refactored a lot on ^/head. I don=E2=80=99t think = it=E2=80=99s safe to say that the ^/head and ^/stable/11 and earlier = copies will function the same. Thanks, -Ngie --Apple-Mail=_295A5878-6B12-4554-8BA1-06DBD9BD5B5C 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----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJY8SeEAAoJEPWDqSZpMIYVkjEQAKWTNBjVhGrwWDyObgZfh4NO EPms3XEhTZZC8nqS/fx4j4mgj00wXuScKSALyBnWwIV/Q4xbI7ftkdsPl80Nefq6 q2tyGRxuhlpB7FXzViEW/TTnT1Ip0DZzQAb4gq5Uur0Nfr3qDSiU3ME0U0kob4yP 9/pTDsj+x8l1TrwYvQOwR7jEx+2bwgtR+NX7pA50RfBs/AgCUIxxBxf1y1Djm2/r /jBA/47P130xUNzCj/Cpfdm73TFuUdj2n5m1B0ARVepwk12snbQJwptg5+2TS9tN KefLlA1BV6lTYfLqhjxJQTt5tpROU71jG4TnFCkCeAK0soxzCU1yVk4gvmnvm+ib XI2/KdpYpx4lrLvnUU0zrT2qbF64Q7DYD5B3S0QQaeeOF5pkSQgQhrJxKfiyHSz3 WCL26Ueyyq9Ok3quDJeM75zyVoBVlwUm80VS9YB3TbO3IwZlNqKG9laa4VKez2/8 mScLMHFQC6t9oyHwYW7Hca9clm7PKaenvit7jbSHr/oiHH6XxH1287bRrpe6053C rluVOZYOHKjxTAjG6uz9b36L1m8hUGSenMdtwm6giS1qRckX1n6YEgK9Id/zFg8m zAbcq+5pHBpyxO32TKMv5qlNH6lT6SwQYV+xQmdd5DhMxMxwEThZafnXTZeXDL44 dbmfE2mrR/RoW1iu3aj1 =uqRp -----END PGP SIGNATURE----- --Apple-Mail=_295A5878-6B12-4554-8BA1-06DBD9BD5B5C-- From owner-svn-src-head@freebsd.org Fri Apr 14 19:49:53 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C360D3E5A1; Fri, 14 Apr 2017 19:49:53 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-yw0-x233.google.com (mail-yw0-x233.google.com [IPv6:2607:f8b0:4002:c05::233]) (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 BF1C2698; Fri, 14 Apr 2017 19:49:52 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-yw0-x233.google.com with SMTP id l189so38612669ywb.0; Fri, 14 Apr 2017 12:49:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=C1FabYwjIqfc5ycgQxc1t6ytsKcmb59yVIMvFQN2zYg=; b=iHbvJixczuQSOLiho1pGnfFqsSsNCbAXSB3Pj8bj+xce7Uwbz3BftlvOZERJDNtoXr jMYb/VOIrF6pEonF5o2XxZM/oMwEUq3HCvFWi3bVH0+1W0n6GyKcLd/2xkQXvKdPw1cg GVOeH8B9L+qk/ar/LrS+juB0wVNNeEoh8ZkRxk7rrl7JHx1K2YhHafEIB52WZBYXdIHs CZR7qsSXJ7/zgnaQI5kIMX84SzwiHvhZazUW/U1SeDlPO9+UNd/E/PXgyr4KuPczu2kN LHWSqCDiX6ttmhEdsXjomswdUViDtAvX+UuvtTXwhKqB2dulESTy546T61v23n0JcQ2F I6BQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=C1FabYwjIqfc5ycgQxc1t6ytsKcmb59yVIMvFQN2zYg=; b=XLGe9qTfe2oD5aF87hZF3VzbFH7Ugv2aRSOalt7ElFMhLKFlS59O2VjpiQHh0h6AHW KE4tylu0De6wbzMsDOMIE8gpvpXTIzS/ki+FpHP72KgVFbPTaYLy2b1bxNLvs7bWqZph 1tbgqOrfAhfapmQacxUj0sMuZ34j5UPO9Nz4Foj+RfB3MOIEb6W8mz22R/bGPUI2DP5H zPymraJ5QES/Ik68+26cRb873BhLYl//vZ46P5oGzPLgsfEMODq/5VRGBdWvLZbI9Cjd /+PwxdGQ9Npz7ZldIJKsHxBGf8+QLFvs/GWf5Fh/iF75KsIcsl94SllbrJOKBMz92Oqw ExGQ== X-Gm-Message-State: AN3rC/6dphNIufntR+PG+XzEZPM6y4+NCSwjyKgt1RTYaoiW8RdOXK/P Ih9llk7Cl1oteKxtRsT4HAQQ3biMFuk4 X-Received: by 10.129.154.203 with SMTP id r194mr7164595ywg.252.1492199391588; Fri, 14 Apr 2017 12:49:51 -0700 (PDT) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.129.20.214 with HTTP; Fri, 14 Apr 2017 12:49:51 -0700 (PDT) In-Reply-To: <201704141941.v3EJfmCW003347@repo.freebsd.org> References: <201704141941.v3EJfmCW003347@repo.freebsd.org> From: Alan Somers Date: Fri, 14 Apr 2017 13:49:51 -0600 X-Google-Sender-Auth: nDfBDp64etuuyVaVZW4vpZRre8M Message-ID: Subject: Re: svn commit: r316938 - head/sbin/savecore To: Ngie Cooper 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 19:49:53 -0000 On Fri, Apr 14, 2017 at 1:41 PM, Ngie Cooper wrote: > Author: ngie > Date: Fri Apr 14 19:41:48 2017 > New Revision: 316938 > URL: https://svnweb.freebsd.org/changeset/base/316938 > > Log: > savecore: fix space calculation with respect to `minfree` in check_space(..) > > - Use strtoll(3) instead of atoi(3), because atoi(3) limits the > representable data to INT_MAX. Check the values received from > strtoll(3), trimming trailing whitespace off the end to maintain > POLA. > - Use `KiB` instead of `kB` when describing free space, total space, > etc. I am now fully aware of `KiB` being the IEC standard for 1024 > bytes and `kB` being the IEC standard for 1000 bytes. > - Store available number of KiB in `available` so it can be more > easily queried and compared to ensure that there are enough KiB to > store the dump image on disk. > - Print out the reserved space on disk, per `minfree`, so end-users > can troubleshoot why check_space(..) is reporting that there isn't > enough free space. > > MFC after: 7 weeks > Reviewed by: Anton Rang (earlier diff), cem (earlier diff) > Tested with: positive/negative cases (see review); make tinderbox > Sponsored by: Dell EMC Isilon > Differential Revision: D10379 The free space calculation is still uselessly conservative, because it doesn't account for the fact that core dumps will always be either spare or compressed. The result is that savecore will frequently refuse to save corefiles even when there's plenty of space. I proposed removing the space check altogether in https://reviews.freebsd.org/D2587. However, I agreed to wait until after the compressed core dump feature was merged, because then mostly accurate space checks will be possible. AFAIK the compressed core dump feature still hasn't been finished. -Alan From owner-svn-src-head@freebsd.org Fri Apr 14 19:59:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 237F2D3E857; Fri, 14 Apr 2017 19:59:02 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x244.google.com (mail-pf0-x244.google.com [IPv6:2607:f8b0:400e:c00::244]) (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 D7FDBC28; Fri, 14 Apr 2017 19:59:01 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x244.google.com with SMTP id i5so16380000pfc.3; Fri, 14 Apr 2017 12:59:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=2dUsuqeUfLqT86ns1MJ7HYUh3LQxnufSMaWUgtXhgGk=; b=dCiPZKvHSpEJNNnovdIeEUJ8n8ThPr/EUp7pHiZz3/6EdEY00F8kB8j6QJwXKM+cGb LSpscht182mVhEi5eRXuvjM+VOfxPm9ti1wXTlmGwpS5GWhJZElHy6TZ+ZMX49T54E9J 5n0G9AfKamGuI8WSaAmxahbgSEXdgnb+7dMTlh34yR/R3nJ/fphSOIusY4aNglncKDMM lxxHhZmD+T/a1TU+xqZO5zvcFCjGWQhGd1HxKLFXB38xYN5YFk6UGSakA+dRBWFnJY9U BaQT0b7hE/PvZmXoymCGssDke3RjKxxA7D4mgY+VHsmZlGtxFjR+v1ovlFlyrzAxGVKw CEPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=2dUsuqeUfLqT86ns1MJ7HYUh3LQxnufSMaWUgtXhgGk=; b=XsSnWLsN2zDHOnjRG+9HFwXk/iupbnLv4SQ2QkLffVbpgVBCCr/vrv3B+Qumri6ViU mLGkiupcC5kZ8wb+zcfdGXtwl0iebNJ9FiMC/3qBaao4RxGkn35mDgzAXel+QCDNUEbK PW1C0MR2Pw4HsuuXmmivMWoow7/8JE2TFYU8Gg2UAmVMseB3ZAQHNVJPjiaO3+YMjNEg T+vTvYv3MnfRN9vgj0PkvCanbyu2Nhmbal3PczqTxpRWGN/xdVqoWOZC3KH1tDDTrqRM PEhL+3N8M22bFO3yfDx5czn/omOXVG6e1shOFfHXoaHajD61cHLQbVC1HrR6XVVkPgvr 3gMw== X-Gm-Message-State: AN3rC/5NBfhIwqTTraKArBOQIxVXrXf9IF1mbnZ4fCxwh+4cNHs+RO40 Z6n5j1pE3EtyRzqxSeA= X-Received: by 10.99.253.5 with SMTP id d5mr8566739pgh.47.1492199941167; Fri, 14 Apr 2017 12:59:01 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id u22sm4697072pgo.67.2017.04.14.12.59.00 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Apr 2017 12:59:00 -0700 (PDT) Subject: Re: svn commit: r316938 - head/sbin/savecore Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_69D9A5FD-DCAF-404A-BB19-ACFAB5E1FD7B"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: Date: Fri, 14 Apr 2017 12:58:59 -0700 Cc: Ngie Cooper , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <499FA6FF-E691-4941-B96C-3806072D14AA@gmail.com> References: <201704141941.v3EJfmCW003347@repo.freebsd.org> To: Alan Somers X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 19:59:02 -0000 --Apple-Mail=_69D9A5FD-DCAF-404A-BB19-ACFAB5E1FD7B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Apr 14, 2017, at 12:49, Alan Somers wrote: >=20 > On Fri, Apr 14, 2017 at 1:41 PM, Ngie Cooper wrote: >> Author: ngie >> Date: Fri Apr 14 19:41:48 2017 >> New Revision: 316938 >> URL: https://svnweb.freebsd.org/changeset/base/316938 >>=20 >> Log: >> savecore: fix space calculation with respect to `minfree` in = check_space(..) >>=20 >> - Use strtoll(3) instead of atoi(3), because atoi(3) limits the >> representable data to INT_MAX. Check the values received from >> strtoll(3), trimming trailing whitespace off the end to maintain >> POLA. >> - Use `KiB` instead of `kB` when describing free space, total space, >> etc. I am now fully aware of `KiB` being the IEC standard for 1024 >> bytes and `kB` being the IEC standard for 1000 bytes. >> - Store available number of KiB in `available` so it can be more >> easily queried and compared to ensure that there are enough KiB to >> store the dump image on disk. >> - Print out the reserved space on disk, per `minfree`, so end-users >> can troubleshoot why check_space(..) is reporting that there isn't >> enough free space. >>=20 >> MFC after: 7 weeks >> Reviewed by: Anton Rang (earlier diff), cem (earlier = diff) >> Tested with: positive/negative cases (see review); make tinderbox >> Sponsored by: Dell EMC Isilon >> Differential Revision: D10379 >=20 > The free space calculation is still uselessly conservative, because it > doesn't account for the fact that core dumps will always be either > spare or compressed. The result is that savecore will frequently > refuse to save corefiles even when there's plenty of space. I > proposed removing the space check altogether in > https://reviews.freebsd.org/D2587. However, I agreed to wait until > after the compressed core dump feature was merged, because then mostly > accurate space checks will be possible. AFAIK the compressed core > dump feature still hasn't been finished. That CR concerns me. The whole being able to check how much space we have on disk before = dumping is a wonderful tool because it prevents users from having = /var/crash be full of truncated full dumps, text dumps, and/or mini = dumps. The real problem that you=E2=80=99re bringing up is that the size being = passed in to check_size(..) is wrong. It needs to be the on-disk size = (which can be a pessimization from gzip/zlib), not the in-memory size of = all of the dumped pages. Thanks for the note =E2=80=94 this helps me with another related issue = at $work that will likely prevent me from being able to write proper = tests to test out panic dumps on OneFS :). Cheers! -Ngie --Apple-Mail=_69D9A5FD-DCAF-404A-BB19-ACFAB5E1FD7B 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----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJY8SoDAAoJEPWDqSZpMIYV7voQAKbufDeLzoHSyypP7EJKI49d 3s+0YWJUpPNC6JSxxzMF5CBEJvdPYrjXlPsLiswrwjxwN9DhH3MipoO+KKwvH6q0 XU91WgtlgKoEb93DN7/SE1NeEDBwBT/v/iQYlay+jEQT8Oc7gZJk+FuVuuJBec6d Fx+r1tq7JYSUHUEHVyMBJj9v3n9CjGxm0Cf7g9bWICwJZto9gbwMxMsVeB9Wl37w i2l83PNRGbUy5fduu+xwYgDRfGV/1tA88zwT+bl87mX1TEMkExAO3ZVTbVgVktkc /hS6x/Ao1+l5EcbI/7sDJ20yW8hVv/XCkO+ysOCJNbWCb355BiQXypvFi/oCOTEl CO3+YOadHsPEArC5dbsczI+lTcH/e8pY0d+EteoN7b4UiOQkIn6+ZjfC7Zih36ZM kcvPG367Wdzjhcb5YJSqQEZ3nNHM5pVeHWnIr6Vc/ul1ECYNq/aRLPG1DGd+fhGa x3zVPhCj1ouq5Tb/lNbsAjCh5sOThRC6172Sn3V8vln673mr2ZNl/z+T8lmv6RHo FjYh7gQS3oorcrsPINBakEf9I8rzWVD7Xj4mMdfbUgS09rRyzVN53HDWGfUbWKzB z0LwE46P0IvofiYl+b8Q3FiZscag3MSn5dRadFeFe/F9DQG+mwG9jtjl/FL1o6XV AVe62xAQbTWB01VUPAbE =r1XN -----END PGP SIGNATURE----- --Apple-Mail=_69D9A5FD-DCAF-404A-BB19-ACFAB5E1FD7B-- From owner-svn-src-head@freebsd.org Fri Apr 14 20:02:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A25DDD3EA16; Fri, 14 Apr 2017 20:02:26 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-yw0-x22d.google.com (mail-yw0-x22d.google.com [IPv6:2607:f8b0:4002:c05::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 5ED1D8D; Fri, 14 Apr 2017 20:02:26 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-yw0-x22d.google.com with SMTP id j9so38734649ywj.3; Fri, 14 Apr 2017 13:02:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=vAjVSUbuLlx43u8jTu+lI3olwW+D77R43yXKBe3r3Tw=; b=pD8yb4/rZgW4GM9Srnq4Vcnsss+d9k77kLJyqCrejEg73+DrIAN8nfJNHutCsrUsFn Z9+yxL1C/1kqxgoJg0olLMr1xEKQQCpSDK7pdQsVaeraU5bA8JcH41gtrbD5sBwHWK8k aQFNnQtioSFVyeOUDpZsj9iAhNiM8txAIfgFUkraQPq1sXrPsLXRMaJGRfA1F/wLNcvr htJewdUcaYrOm8z+PlDb/7GbNZEsex4iOdBTvwODQUxE9awPIKTOL8UneP4+GsZR99XX vJ+JsDPwuO7NINZFx4W/iy4uFbfigchnNJQ8M4fGd8pfsbvVlc+B+lrwE3Bpq202MX/4 wvGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=vAjVSUbuLlx43u8jTu+lI3olwW+D77R43yXKBe3r3Tw=; b=CzroFN+bVDc+LDbJbc4wRRX1p7Kq4Rg2zuXpPnJdoGwnR+zocenRcxlG56YkE8Fjsh NvWmG0m1BYEJ/TBsxMl8nPuDeIG7B6dven+U3ZmP4glZdU3Y1E2GfDSW1MoDQ8EUZUxu Y7kfhLzIe/DASckfBNMTGsOEzsVPXIOLWzq7HIn5aifP8MJXHULaqUkaWXfw3bkqArLk Z1PWHBZCocEX9sDzHoeYrXQCaaFzMwy0yiJOu0EP5g/NkUwo98chO/mXKAMiHdSnQe8g Wg44G73Oex6AmLGci0+2l818Nd308DjLYQVYbsOBaRBj+/hrFp0e+IHJAC4jcSPT71LC 1L0A== X-Gm-Message-State: AN3rC/5HvCunv64nc5jHvzQbU127yJxFjqyBpNV8ABZ1imsOiBL6bIfd YM095UeULJyn722MCuHK8HMbd2Mz9g== X-Received: by 10.129.173.69 with SMTP id l5mr7325877ywk.351.1492200145360; Fri, 14 Apr 2017 13:02:25 -0700 (PDT) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.129.20.214 with HTTP; Fri, 14 Apr 2017 13:02:24 -0700 (PDT) In-Reply-To: <499FA6FF-E691-4941-B96C-3806072D14AA@gmail.com> References: <201704141941.v3EJfmCW003347@repo.freebsd.org> <499FA6FF-E691-4941-B96C-3806072D14AA@gmail.com> From: Alan Somers Date: Fri, 14 Apr 2017 14:02:24 -0600 X-Google-Sender-Auth: pEMtt7mKqj2zrkS9xyxsVjfjzq0 Message-ID: Subject: Re: svn commit: r316938 - head/sbin/savecore To: "Ngie Cooper (yaneurabeya)" Cc: Ngie Cooper , "src-committers@freebsd.org" , "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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 20:02:26 -0000 On Fri, Apr 14, 2017 at 1:58 PM, Ngie Cooper (yaneurabeya) wrote: > >> On Apr 14, 2017, at 12:49, Alan Somers wrote: >> >> On Fri, Apr 14, 2017 at 1:41 PM, Ngie Cooper wrote: >>> Author: ngie >>> Date: Fri Apr 14 19:41:48 2017 >>> New Revision: 316938 >>> URL: https://svnweb.freebsd.org/changeset/base/316938 >>> >>> Log: >>> savecore: fix space calculation with respect to `minfree` in check_spa= ce(..) >>> >>> - Use strtoll(3) instead of atoi(3), because atoi(3) limits the >>> representable data to INT_MAX. Check the values received from >>> strtoll(3), trimming trailing whitespace off the end to maintain >>> POLA. >>> - Use `KiB` instead of `kB` when describing free space, total space, >>> etc. I am now fully aware of `KiB` being the IEC standard for 1024 >>> bytes and `kB` being the IEC standard for 1000 bytes. >>> - Store available number of KiB in `available` so it can be more >>> easily queried and compared to ensure that there are enough KiB to >>> store the dump image on disk. >>> - Print out the reserved space on disk, per `minfree`, so end-users >>> can troubleshoot why check_space(..) is reporting that there isn't >>> enough free space. >>> >>> MFC after: 7 weeks >>> Reviewed by: Anton Rang (earlier diff), cem (earlier d= iff) >>> Tested with: positive/negative cases (see review); make tinderbox >>> Sponsored by: Dell EMC Isilon >>> Differential Revision: D10379 >> >> The free space calculation is still uselessly conservative, because it >> doesn't account for the fact that core dumps will always be either >> spare or compressed. The result is that savecore will frequently >> refuse to save corefiles even when there's plenty of space. I >> proposed removing the space check altogether in >> https://reviews.freebsd.org/D2587. However, I agreed to wait until >> after the compressed core dump feature was merged, because then mostly >> accurate space checks will be possible. AFAIK the compressed core >> dump feature still hasn't been finished. > > That CR concerns me. > > The whole being able to check how much space we have on disk before dumpi= ng is a wonderful tool because it prevents users from having /var/crash be = full of truncated full dumps, text dumps, and/or mini dumps. > > The real problem that you=E2=80=99re bringing up is that the size being p= assed in to check_size(..) is wrong. It needs to be the on-disk size (which= can be a pessimization from gzip/zlib), not the in-memory size of all of t= he dumped pages. > > Thanks for the note =E2=80=94 this helps me with another related issue at= $work that will likely prevent me from being able to write proper tests to= test out panic dumps on OneFS :). > > Cheers! > -Ngie Right: check_size() needs to know the on-disk size of the core dump. But it doesn't have any way to know the on-disk size until after it's written everything to disk. That's why I simply disabled the check at $WORK. Another possibility would be for savecore to ignore the up-front check, but handle ENOSPC by deleting the fragmentary vmcore file. I never tried to implement that. -Alan From owner-svn-src-head@freebsd.org Fri Apr 14 20:04:36 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56E60D3EA9D; Fri, 14 Apr 2017 20:04:36 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x230.google.com (mail-pf0-x230.google.com [IPv6:2607:f8b0:400e:c00::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 217DA1FD; Fri, 14 Apr 2017 20:04:36 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x230.google.com with SMTP id s16so44179652pfs.0; Fri, 14 Apr 2017 13:04:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=ZebSJd16E7ja05nWnz39h9nKWC2zCPpDy73zRsqwB44=; b=gvq+YFJAXHClT2fyhZ6qWT2AsnwEnadAQZA3bOi2+ooNJepC8HIOEID/slfLs1fcaT 04du6qdOfP4zRPwly8FJMDAmtEPX8Ba1lXznsoMkrny0p2N9WPc71Wx41FU2hjpDh2X9 Zfl8ln0ik/dwaZbuIxMjQdJtLFzb8NM+G/w/VlfCjzXC0ns5Qxf9FGrb7TFGU9nOQkLE A5LwzmFhnukoQ4CKGwG8bC2OwX/CFbgwBSkZSHPU5SUVqrUBShCxA1HGnMQe4bA2xuTi 2YGQxElf2LSJs91wAtsVazTkNSOKXu8IWnTvX0vC3Jagr4W78ojPhzcKL6IR4dh72Shg /pLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=ZebSJd16E7ja05nWnz39h9nKWC2zCPpDy73zRsqwB44=; b=aSGCXZmMTEWOXsQu/AWaUAkGcC3l6d1VRKDJTjs5bjn+O0DmrXWRtOrHnLv3rJrwme JkbMtZwG6jpWLHmP6u0b5dxqkc81NAgA8ocsOB0W+Iy/zW6ruPBU53UerGoI8pbHgnkx wbcp3N5id5HVBmXnQWrMinOsA5gCmUajzf8+fBXHLr/wAfwHc4TIACMniwEVoTGzhZZs R7lR72QynAGyMuDgArylsZ+VekzuXj5bSQOJZeWpP6C8aVTDxogcUTBlCRGLS3lghTix 8zGyRdrCspMFe7SL4aT0xeZml9hAObMyeImMfOFzjeox1MwuOzGxR37byxBPHErkz7YQ 8vqg== X-Gm-Message-State: AN3rC/6I8czDtu7ct1qCyLdaiuQNNQfBqsfnHkYbldSnmAuv2dFS2fxw wBmUWGaQNOQ03cx4Vd8= X-Received: by 10.99.223.70 with SMTP id h6mr8945310pgj.50.1492200275476; Fri, 14 Apr 2017 13:04:35 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id b128sm4727562pgc.16.2017.04.14.13.04.34 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Apr 2017 13:04:34 -0700 (PDT) Subject: Re: svn commit: r316938 - head/sbin/savecore Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_9D992930-BC47-4C34-9469-C80D9504EB99"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: Date: Fri, 14 Apr 2017 13:04:33 -0700 Cc: Ngie Cooper , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <7DCBB59B-388F-463D-8FFF-06390E5B5165@gmail.com> References: <201704141941.v3EJfmCW003347@repo.freebsd.org> <499FA6FF-E691-4941-B96C-3806072D14AA@gmail.com> To: Alan Somers X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 20:04:36 -0000 --Apple-Mail=_9D992930-BC47-4C34-9469-C80D9504EB99 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Apr 14, 2017, at 13:02, Alan Somers wrote: ... > Right: check_size() needs to know the on-disk size of the core dump. > But it doesn't have any way to know the on-disk size until after it's > written everything to disk. That's why I simply disabled the check at > $WORK. Another possibility would be for savecore to ignore the > up-front check, but handle ENOSPC by deleting the fragmentary vmcore > file. I never tried to implement that. Let me dig through the gzip format a bit. There should be a reasonably = good upper bound approximation that we can use for compressed minidumps. Thanks! -Ngie --Apple-Mail=_9D992930-BC47-4C34-9469-C80D9504EB99 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----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJY8StRAAoJEPWDqSZpMIYVHy4P/3WBVmu2EtkkpvcIGCcO/2Bx YGCw021TgUG5BP1YF99gQUwgRaIk0cX6wj1XQxqS+UOyZPmsiyVGA64qF0ExibGt U1D8e8wBx/cz/3i0czH4oWGvboeN3S/5GRPDfPLcXKqqrBJIXw7a58zuS8Zvm6W8 2xHRD6DtxwsPW5RSPYnWcyb0Dvya1Y7U6BnEmirVjlKxbWeQE3zYiVuMvXiPoIUy TSMvO5gKpWuRkvg9uz8Uzl9d0pb6Z6EHm8UI6uUXDq4oZCULCkrG0quloedQTu5m EWRnK6Y6xxXNt1g8zre7/Ivyixs/7JirXVRpiYtSLNT4FOCXbYeF7iFiLdkOpZlN Xffz3wvw4l9a48Z/2gAEHd8D10NdmYMU5sfkykeCJMjHnBL+DScPxZb4HdOD9PDi 1Jj7pfSDZAk3E6FEV6z2i3wOlnwVI/r0UFORDX3M2bPjHCrI4PI6lRMZSiVUSqSE IqvkEMM9iI1twKKbS0F3UF8znbS3SPfX2FJ3WaG21plXMTCGoWU2k0PWIPn1FFHj yMgfTZUnFgvTywsQNVNe1newV663kYZxX0iXB8glmtGmw4nWi+eqcGQWSVJhJsNN A+8uayzrRspjr4RhQfBBirb4JbbNQ5vClkdkvISD0W88m6Nf8YT3iswgzPZwoYBn 96RzsLFZZ9HWLxUvLZze =Q9El -----END PGP SIGNATURE----- --Apple-Mail=_9D992930-BC47-4C34-9469-C80D9504EB99-- From owner-svn-src-head@freebsd.org Fri Apr 14 20:07:05 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 130D2D3EB54; Fri, 14 Apr 2017 20:07:05 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x229.google.com (mail-pg0-x229.google.com [IPv6:2607:f8b0:400e:c05::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CE38F3D6; Fri, 14 Apr 2017 20:07:04 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x229.google.com with SMTP id 21so47247360pgg.1; Fri, 14 Apr 2017 13:07:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=yiuIOuGgHvcF9QEPTc6Ud+VoZlP4Bs8fN9mWL+y0jv8=; b=RCL9DK2Vpdh1ZuYau4h3Jcr5IJBRhxY3EcYtRap4W4Rg/PtAPLAOwmE4rierNd0mAc VdAHxWDBIO45hK9IpEC2FzCqhlYgD6DRwnFCHPM9iLnZpeAXYca+UVBUslmS/8V74oXe g8GoSu0cgacaiC7TYtaPOQBx1cglDYuoOQ+WFt+LlfOR9dzebin1zDXn00f4pE55Klli o4eQAPikP8kFk7cDk4CZAiCcJtghSEMRL9EXyau4U/K8rW/IztRaJ0Pes0HsBv32Ti5k YlyvIOzYYCkOTBsyDU41erWv/lUg+ggE00GfrZ9gqKZL5aHxo9ztMS+BQD2JQTGLoe/0 ijIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=yiuIOuGgHvcF9QEPTc6Ud+VoZlP4Bs8fN9mWL+y0jv8=; b=kGSbjHvUAD3S7+ffxTlOmDcq6ZUoRr0VYSU47QdL0svfZPSdY9GjaitKn8yAexG04J jKpqux+kGIbIdAC5moRQwEcgRqCU+LL56BMlLoWool7DSqz9O0tr4ihfDEuK1G51nLjv HCg2jXiCQNPwmfJYcepa8IedXXaFhv7wk8Jbt5p0MwcAPQeoYhCIxSmJ3xla98Cq3dD4 OiPISOHvvuSst6APi8sW3yH7LfujOs/OiufyG01EYV1tDJ+MjfJB+dnGlKpWj0+O7kg1 AkcNBSDBKD8hnufBIndCYHVnMuTAm4jWRXH56/uqbWBMxt3apKIGnYXOSgZqhePioUx0 AyeQ== X-Gm-Message-State: AN3rC/5FRxim5S/OWIZORC+s3tFRo/t0Vhf6EiuR9bUfX4yNZT2IVLM3 00O29YRUT8UObS/cBBg= X-Received: by 10.99.61.130 with SMTP id k124mr8572887pga.68.1492200424177; Fri, 14 Apr 2017 13:07:04 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id a77sm4732452pfj.1.2017.04.14.13.07.02 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Apr 2017 13:07:03 -0700 (PDT) Subject: Re: svn commit: r316938 - head/sbin/savecore Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_A38279AE-4145-470F-902C-5F719E69AB0A"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <7DCBB59B-388F-463D-8FFF-06390E5B5165@gmail.com> Date: Fri, 14 Apr 2017 13:07:02 -0700 Cc: Ngie Cooper , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <25EDEFF2-4993-4C95-B005-8670DF513B72@gmail.com> References: <201704141941.v3EJfmCW003347@repo.freebsd.org> <499FA6FF-E691-4941-B96C-3806072D14AA@gmail.com> <7DCBB59B-388F-463D-8FFF-06390E5B5165@gmail.com> To: Alan Somers X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 20:07:05 -0000 --Apple-Mail=_A38279AE-4145-470F-902C-5F719E69AB0A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Apr 14, 2017, at 13:04, Ngie Cooper (yaneurabeya) = wrote: >=20 >=20 >> On Apr 14, 2017, at 13:02, Alan Somers wrote: >=20 > ... >=20 >> Right: check_size() needs to know the on-disk size of the core dump. >> But it doesn't have any way to know the on-disk size until after it's >> written everything to disk. That's why I simply disabled the check = at >> $WORK. Another possibility would be for savecore to ignore the >> up-front check, but handle ENOSPC by deleting the fragmentary vmcore >> file. I never tried to implement that. >=20 > Let me dig through the gzip format a bit. There should be a reasonably = good upper bound approximation that we can use for compressed mini = dumps. Also: deleting truncated dumps sounds great to me: their value when = truncated is pretty low from what I remember. -Ngie --Apple-Mail=_A38279AE-4145-470F-902C-5F719E69AB0A 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----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJY8SvmAAoJEPWDqSZpMIYVMwUP/is9SwaUluIZqVpzW7koduPG DNu4ejTX6ZgR0YZ8//+PiTNI4S7WfKUiCZdeIaScDDQWtftLRWUzKyhvSnyfPwLg /WPc5+NDjpih7rwmMvXm+uBRV6VhQosY83cl81DSBD7q3bhC8g00WLDH8325xaFe OPUWG2XCzyo2jzTXeABHxiX1Px/+L/+17UzorBxhnXrNAxlzBkjKwrWucmu2oef5 YgfPM/M3CkqCNPsbnVCiTQ2VQR3EsOGd6IAfJ7sQkcWiRE5o9hmpIpT62s05sftr rGjOiEXlgfMmRpxRE2r7StJ5ltPorwMI61Svc8cNTLbsOxJPwd5D4l8qvpSwVvWf HicHbLVkXegMt3yOfkD7d6aQ+PzUW68kz4zHnr8JaaTxhqEUc8fRpfeiMtyZTl2T twoD7nShU0r4whbvRfTO5nozzhVHlHwSuuvsNbEeLOyEx0hi2sv2IuN6HoV2WdHP wmSDua3qlFZYPfiFj64mXDvr8ncKkjBNQ4ycuQQVObqQrc8IfV7/P0NSwDVLaxzm 0nd+qDE+Tna18ThBwZXFOHrR0Cl91TYPL4GkHF5pdrL3VJeVWL9Xgcae79DqRWK5 YXsTk0v4dswr4gLCs3buI2Hl+wfqCGJHT5UH8fAOK2OCuHwx/ZhWvhH6K9eFjL5J 9PsHnv/15xiDkLzUhrtV =9WWL -----END PGP SIGNATURE----- --Apple-Mail=_A38279AE-4145-470F-902C-5F719E69AB0A-- From owner-svn-src-head@freebsd.org Fri Apr 14 20:10:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63A56D3EC0A; Fri, 14 Apr 2017 20:10:19 +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 3311D7C2; Fri, 14 Apr 2017 20:10:19 +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 v3EKAIlK013843; Fri, 14 Apr 2017 20:10:18 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3EKAINl013842; Fri, 14 Apr 2017 20:10:18 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201704142010.v3EKAINl013842@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 14 Apr 2017 20:10:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316939 - head/lib/lib80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 20:10:19 -0000 Author: adrian Date: Fri Apr 14 20:10:18 2017 New Revision: 316939 URL: https://svnweb.freebsd.org/changeset/base/316939 Log: [lib80211] fix a missing cleanup path. PR: lib/218655 Reported by: Modified: head/lib/lib80211/lib80211_regdomain.c Modified: head/lib/lib80211/lib80211_regdomain.c ============================================================================== --- head/lib/lib80211/lib80211_regdomain.c Fri Apr 14 19:41:48 2017 (r316938) +++ head/lib/lib80211/lib80211_regdomain.c Fri Apr 14 20:10:18 2017 (r316939) @@ -569,6 +569,7 @@ cleanup_bands(netband_head *head) nb = LIST_FIRST(head); if (nb == NULL) break; + LIST_REMOVE(nb, next); free(nb); } } From owner-svn-src-head@freebsd.org Fri Apr 14 20:14:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF5E8D3EFA4; Fri, 14 Apr 2017 20:14:39 +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 6B431C96; Fri, 14 Apr 2017 20:14:39 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1cz7bz-000AG5-Js; Fri, 14 Apr 2017 23:14:31 +0300 Date: Fri, 14 Apr 2017 23:14:31 +0300 From: Slawa Olhovchenkov To: Alan Somers Cc: Ngie Cooper , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r316938 - head/sbin/savecore Message-ID: <20170414201431.GF20974@zxy.spb.ru> References: <201704141941.v3EJfmCW003347@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 20:14:39 -0000 On Fri, Apr 14, 2017 at 01:49:51PM -0600, Alan Somers wrote: > On Fri, Apr 14, 2017 at 1:41 PM, Ngie Cooper wrote: > > Author: ngie > > Date: Fri Apr 14 19:41:48 2017 > > New Revision: 316938 > > URL: https://svnweb.freebsd.org/changeset/base/316938 > > > > Log: > > savecore: fix space calculation with respect to `minfree` in check_space(..) > > > > - Use strtoll(3) instead of atoi(3), because atoi(3) limits the > > representable data to INT_MAX. Check the values received from > > strtoll(3), trimming trailing whitespace off the end to maintain > > POLA. > > - Use `KiB` instead of `kB` when describing free space, total space, > > etc. I am now fully aware of `KiB` being the IEC standard for 1024 > > bytes and `kB` being the IEC standard for 1000 bytes. > > - Store available number of KiB in `available` so it can be more > > easily queried and compared to ensure that there are enough KiB to > > store the dump image on disk. > > - Print out the reserved space on disk, per `minfree`, so end-users > > can troubleshoot why check_space(..) is reporting that there isn't > > enough free space. > > > > MFC after: 7 weeks > > Reviewed by: Anton Rang (earlier diff), cem (earlier diff) > > Tested with: positive/negative cases (see review); make tinderbox > > Sponsored by: Dell EMC Isilon > > Differential Revision: D10379 > > The free space calculation is still uselessly conservative, because it > doesn't account for the fact that core dumps will always be either > spare or compressed. The result is that savecore will frequently > refuse to save corefiles even when there's plenty of space. I > proposed removing the space check altogether in > https://reviews.freebsd.org/D2587. However, I agreed to wait until > after the compressed core dump feature was merged, because then mostly > accurate space checks will be possible. AFAIK the compressed core > dump feature still hasn't been finished. Is posible (in the future) to use multiple swaps (on multiple disks) for save core dumps? From owner-svn-src-head@freebsd.org Fri Apr 14 20:15:18 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C9447D3A00A; Fri, 14 Apr 2017 20:15:18 +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 8A496DEB; Fri, 14 Apr 2017 20:15:18 +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 v3EKFH3u017570; Fri, 14 Apr 2017 20:15:17 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3EKFHrT017566; Fri, 14 Apr 2017 20:15:17 GMT (envelope-from np@FreeBSD.org) Message-Id: <201704142015.v3EKFHrT017566@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 14 Apr 2017 20:15:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316940 - head/sys/dev/cxgbe/iw_cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 20:15:18 -0000 Author: np Date: Fri Apr 14 20:15:17 2017 New Revision: 316940 URL: https://svnweb.freebsd.org/changeset/base/316940 Log: cxgbe/iw_cxgbe: Report the actual values of various parameters as configured by the firmware. MFC after: 3 days Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/iw_cxgbe/provider.c head/sys/dev/cxgbe/iw_cxgbe/qp.c head/sys/dev/cxgbe/iw_cxgbe/t4.h Modified: head/sys/dev/cxgbe/iw_cxgbe/provider.c ============================================================================== --- head/sys/dev/cxgbe/iw_cxgbe/provider.c Fri Apr 14 20:10:18 2017 (r316939) +++ head/sys/dev/cxgbe/iw_cxgbe/provider.c Fri Apr 14 20:15:17 2017 (r316940) @@ -307,6 +307,7 @@ c4iw_query_device(struct ib_device *ibde { struct c4iw_dev *dev = to_c4iw_dev(ibdev); struct adapter *sc = dev->rdev.adap; + const int spg_ndesc = sc->params.sge.spg_len / EQ_ESIZE; CTR3(KTR_IW_CXGBE, "%s ibdev %p, props %p", __func__, ibdev, props); @@ -320,13 +321,15 @@ c4iw_query_device(struct ib_device *ibde props->vendor_id = pci_get_vendor(sc->dev); props->vendor_part_id = pci_get_device(sc->dev); props->max_mr_size = T4_MAX_MR_SIZE; - props->max_qp = T4_MAX_NUM_QP; - props->max_qp_wr = T4_MAX_QP_DEPTH; + props->max_qp = sc->vres.qp.size / 2; + props->max_qp_wr = T4_MAX_QP_DEPTH(spg_ndesc); props->max_sge = T4_MAX_RECV_SGE; props->max_sge_rd = 1; - props->max_qp_rd_atom = c4iw_max_read_depth; - props->max_qp_init_rd_atom = c4iw_max_read_depth; - props->max_cq = T4_MAX_NUM_CQ; + props->max_res_rd_atom = sc->params.max_ird_adapter; + props->max_qp_rd_atom = min(sc->params.max_ordird_qp, + c4iw_max_read_depth); + props->max_qp_init_rd_atom = props->max_qp_rd_atom; + props->max_cq = sc->vres.qp.size; props->max_cqe = T4_MAX_CQ_DEPTH; props->max_mr = c4iw_num_stags(&dev->rdev); props->max_pd = T4_MAX_NUM_PD; Modified: head/sys/dev/cxgbe/iw_cxgbe/qp.c ============================================================================== --- head/sys/dev/cxgbe/iw_cxgbe/qp.c Fri Apr 14 20:10:18 2017 (r316939) +++ head/sys/dev/cxgbe/iw_cxgbe/qp.c Fri Apr 14 20:15:17 2017 (r316940) @@ -133,6 +133,7 @@ static int create_qp(struct c4iw_rdev *r int ret; int eqsize; struct wrqe *wr; + const int spg_ndesc = sc->params.sge.spg_len / EQ_ESIZE; wq->sq.qid = c4iw_get_qpid(rdev, uctx); if (!wq->sq.qid) @@ -214,8 +215,7 @@ static int create_qp(struct c4iw_rdev *r res->u.sqrq.op = FW_RI_RES_OP_WRITE; /* eqsize is the number of 64B entries plus the status page size. */ - eqsize = wq->sq.size * T4_SQ_NUM_SLOTS + - (sc->params.sge.spg_len / EQ_ESIZE); + eqsize = wq->sq.size * T4_SQ_NUM_SLOTS + spg_ndesc; res->u.sqrq.fetchszm_to_iqid = cpu_to_be32( V_FW_RI_RES_WR_HOSTFCMODE(0) | /* no host cidx updates */ @@ -237,8 +237,7 @@ static int create_qp(struct c4iw_rdev *r res->u.sqrq.op = FW_RI_RES_OP_WRITE; /* eqsize is the number of 64B entries plus the status page size. */ - eqsize = wq->rq.size * T4_RQ_NUM_SLOTS + - (sc->params.sge.spg_len / EQ_ESIZE); + eqsize = wq->rq.size * T4_RQ_NUM_SLOTS + spg_ndesc; res->u.sqrq.fetchszm_to_iqid = cpu_to_be32( V_FW_RI_RES_WR_HOSTFCMODE(0) | /* no host cidx updates */ V_FW_RI_RES_WR_CPRIO(0) | /* don't keep in chip cache */ @@ -1523,7 +1522,7 @@ c4iw_create_qp(struct ib_pd *pd, struct struct c4iw_create_qp_resp uresp; int sqsize, rqsize; struct c4iw_ucontext *ucontext; - int ret; + int ret, spg_ndesc; struct c4iw_mm_entry *mm1, *mm2, *mm3, *mm4; CTR2(KTR_IW_CXGBE, "%s ib_pd %p", __func__, pd); @@ -1541,12 +1540,13 @@ c4iw_create_qp(struct ib_pd *pd, struct if (attrs->cap.max_inline_data > T4_MAX_SEND_INLINE) return ERR_PTR(-EINVAL); + spg_ndesc = rhp->rdev.adap->params.sge.spg_len / EQ_ESIZE; rqsize = roundup(attrs->cap.max_recv_wr + 1, 16); - if (rqsize > T4_MAX_RQ_SIZE) + if (rqsize > T4_MAX_RQ_SIZE(spg_ndesc)) return ERR_PTR(-E2BIG); sqsize = roundup(attrs->cap.max_send_wr + 1, 16); - if (sqsize > T4_MAX_SQ_SIZE) + if (sqsize > T4_MAX_SQ_SIZE(spg_ndesc)) return ERR_PTR(-E2BIG); ucontext = pd->uobject ? to_c4iw_ucontext(pd->uobject->context) : NULL; @@ -1556,9 +1556,10 @@ c4iw_create_qp(struct ib_pd *pd, struct if (!qhp) return ERR_PTR(-ENOMEM); qhp->wq.sq.size = sqsize; - qhp->wq.sq.memsize = (sqsize + 1) * sizeof *qhp->wq.sq.queue; + qhp->wq.sq.memsize = (sqsize + spg_ndesc) * sizeof *qhp->wq.sq.queue + + 16 * sizeof(__be64); qhp->wq.rq.size = rqsize; - qhp->wq.rq.memsize = (rqsize + 1) * sizeof *qhp->wq.rq.queue; + qhp->wq.rq.memsize = (rqsize + spg_ndesc) * sizeof *qhp->wq.rq.queue; if (ucontext) { qhp->wq.sq.memsize = roundup(qhp->wq.sq.memsize, PAGE_SIZE); Modified: head/sys/dev/cxgbe/iw_cxgbe/t4.h ============================================================================== --- head/sys/dev/cxgbe/iw_cxgbe/t4.h Fri Apr 14 20:10:18 2017 (r316939) +++ head/sys/dev/cxgbe/iw_cxgbe/t4.h Fri Apr 14 20:15:17 2017 (r316940) @@ -59,21 +59,17 @@ #define CIDXINC_SHIFT 0 #define CIDXINC(x) ((x) << CIDXINC_SHIFT) -#define T4_MAX_NUM_QP (1<<16) -#define T4_MAX_NUM_CQ (1<<15) #define T4_MAX_NUM_PD 65536 -#define T4_EQ_STATUS_ENTRIES (L1_CACHE_BYTES > 64 ? 2 : 1) -#define T4_MAX_EQ_SIZE (65520 - T4_EQ_STATUS_ENTRIES) -#define T4_MAX_IQ_SIZE (65520 - 1) -#define T4_MAX_RQ_SIZE (8192 - T4_EQ_STATUS_ENTRIES) -#define T4_MAX_SQ_SIZE (T4_MAX_EQ_SIZE - 1) -#define T4_MAX_QP_DEPTH (T4_MAX_RQ_SIZE - 1) -#define T4_MAX_CQ_DEPTH (T4_MAX_IQ_SIZE - 1) +#define T4_MAX_EQ_SIZE 65520 +#define T4_MAX_IQ_SIZE 65520 +#define T4_MAX_RQ_SIZE(n) (8192 - (n) - 1) +#define T4_MAX_SQ_SIZE(n) (T4_MAX_EQ_SIZE - (n) - 1) +#define T4_MAX_QP_DEPTH(n) (T4_MAX_RQ_SIZE(n)) +#define T4_MAX_CQ_DEPTH (T4_MAX_IQ_SIZE - 2) #define T4_MAX_MR_SIZE (~0ULL - 1) #define T4_PAGESIZE_MASK 0xffffffff000 /* 4KB-8TB */ #define T4_STAG_UNSET 0xffffffff #define T4_FW_MAJ 0 -#define T4_EQ_STATUS_ENTRIES (L1_CACHE_BYTES > 64 ? 2 : 1) #define A_PCIE_MA_SYNC 0x30b4 struct t4_status_page { From owner-svn-src-head@freebsd.org Fri Apr 14 20:15:35 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0029D3A063; Fri, 14 Apr 2017 20:15:35 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 774DDEF9; Fri, 14 Apr 2017 20:15:35 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3EKFYsQ017624; Fri, 14 Apr 2017 20:15:34 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3EKFYWA017623; Fri, 14 Apr 2017 20:15:34 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201704142015.v3EKFYWA017623@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 14 Apr 2017 20:15:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316941 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 20:15:35 -0000 Author: trasz Date: Fri Apr 14 20:15:34 2017 New Revision: 316941 URL: https://svnweb.freebsd.org/changeset/base/316941 Log: Don't try to write out bufs that have already failed with ENXIO. This fixes some panics after disconnecting mounted disks. Submitted by: imp (slightly different version, which I've then lost) Reviewed by: kib, imp, mckusick MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D9674 Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Fri Apr 14 20:15:17 2017 (r316940) +++ head/sys/kern/vfs_bio.c Fri Apr 14 20:15:34 2017 (r316941) @@ -2290,18 +2290,28 @@ brelse(struct buf *bp) bdirty(bp); } if (bp->b_iocmd == BIO_WRITE && (bp->b_ioflags & BIO_ERROR) && + (bp->b_error != ENXIO || !LIST_EMPTY(&bp->b_dep)) && !(bp->b_flags & B_INVAL)) { /* - * Failed write, redirty. Must clear BIO_ERROR to prevent - * pages from being scrapped. + * Failed write, redirty. All errors except ENXIO (which + * means the device is gone) are expected to be potentially + * transient - underlying media might work if tried again + * after EIO, and memory might be available after an ENOMEM. + * + * Do this also for buffers that failed with ENXIO, but have + * non-empty dependencies - the soft updates code might need + * to access the buffer to untangle them. + * + * Must clear BIO_ERROR to prevent pages from being scrapped. */ bp->b_ioflags &= ~BIO_ERROR; bdirty(bp); } else if ((bp->b_flags & (B_NOCACHE | B_INVAL)) || (bp->b_ioflags & BIO_ERROR) || (bp->b_bufsize <= 0)) { /* - * Either a failed read I/O or we were asked to free or not - * cache the buffer. + * Either a failed read I/O, or we were asked to free or not + * cache the buffer, or we failed to write to a device that's + * no longer present. */ bp->b_flags |= B_INVAL; if (!LIST_EMPTY(&bp->b_dep)) From owner-svn-src-head@freebsd.org Fri Apr 14 20:19:52 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9D3BD3A190; Fri, 14 Apr 2017 20:19:52 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x243.google.com (mail-pg0-x243.google.com [IPv6:2607:f8b0:400e:c05::243]) (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 A4CA110D6; Fri, 14 Apr 2017 20:19:52 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x243.google.com with SMTP id g2so17747784pge.2; Fri, 14 Apr 2017 13:19:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=jJo3k3OACHc01NZ8uBPNNbceYVwkKcvH3Bt72g26Oe4=; b=bH/dl/JXE8n6VXGD1DyeICnAVUne1XbeiHSKFSmiVtvEjgzPcBqRbuFcLx1pThbYdV F89EZPzj44JMyC/6Jd9cpC5fX4/bODHEXmQDroVUfzqUcew+fdDBMHOWZqtl5hlp6Vaj o+CfHwRwMQxMVgTW3vk/7SOJxL0N6hBQ8VCAaRFSjgHhD17QBuuRxrkgUrqn64BWrEYo C07T2rFlfq+1YIN8EF37vGFRthZ2jisvtYvzgMHpVj6lB23N9u5In39sPggNR4KHwWEg BnCc550/vkh/A8rgefhaaR4QYM8g9d7V5GFQANvvHMf99Zt863k4KBNKQVAfGgrtXt30 Xwlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=jJo3k3OACHc01NZ8uBPNNbceYVwkKcvH3Bt72g26Oe4=; b=ZS7W74EmRvU0TchpOnUsTi4Q4kqMOZAiiMkVZE01TpWupmi1XB0zCm0NHufJBP/Vam GHXK/y3YSRLEXJbV6XVZvPYsvYkv8I2ezk0EI6U3rlB3S36Ns7rxMIZlR85gj/w7uHXO VEpV0m9yk1zqQf3Dd0s+Sq7p6QTVkp6yitNaFXG3YsJg128VGAq3VK7VfWH5cNzHvqwb pclTIpRPXDtcdBO/dSPS3Qe+/Cy8YvsefuXfzeesS8qBoz6vR8CiavTe3X/75LnlWW6j Agnax5ZNrYBvcFZR9sDM136+UyA8zWDcLDRk4UwLJoD0PG1eYujsTDMQqHaLFolc1h7G g4jw== X-Gm-Message-State: AN3rC/4U5TJpw3ZthBbGAlBNSBBZUuFF4vqFyTfkbw3rk3vX1i6ZDiCx Z/RA041IGI1sD7GMdvg= X-Received: by 10.99.238.69 with SMTP id n5mr8791443pgk.6.1492201192141; Fri, 14 Apr 2017 13:19:52 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id g5sm4755745pfe.12.2017.04.14.13.19.50 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Apr 2017 13:19:51 -0700 (PDT) Subject: Re: svn commit: r316938 - head/sbin/savecore Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_F6044C16-A008-41A2-B2C9-8CDBA517C385"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <20170414201431.GF20974@zxy.spb.ru> Date: Fri, 14 Apr 2017 13:19:49 -0700 Cc: Alan Somers , Ngie Cooper , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Message-Id: References: <201704141941.v3EJfmCW003347@repo.freebsd.org> <20170414201431.GF20974@zxy.spb.ru> To: Slawa Olhovchenkov X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 20:19:53 -0000 --Apple-Mail=_F6044C16-A008-41A2-B2C9-8CDBA517C385 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Apr 14, 2017, at 13:14, Slawa Olhovchenkov wrote: >=20 > On Fri, Apr 14, 2017 at 01:49:51PM -0600, Alan Somers wrote: >=20 >> On Fri, Apr 14, 2017 at 1:41 PM, Ngie Cooper = wrote: >>> Author: ngie >>> Date: Fri Apr 14 19:41:48 2017 >>> New Revision: 316938 >>> URL: https://svnweb.freebsd.org/changeset/base/316938 >>>=20 >>> Log: >>> savecore: fix space calculation with respect to `minfree` in = check_space(..) >>>=20 >>> - Use strtoll(3) instead of atoi(3), because atoi(3) limits the >>> representable data to INT_MAX. Check the values received from >>> strtoll(3), trimming trailing whitespace off the end to maintain >>> POLA. >>> - Use `KiB` instead of `kB` when describing free space, total = space, >>> etc. I am now fully aware of `KiB` being the IEC standard for = 1024 >>> bytes and `kB` being the IEC standard for 1000 bytes. >>> - Store available number of KiB in `available` so it can be more >>> easily queried and compared to ensure that there are enough KiB = to >>> store the dump image on disk. >>> - Print out the reserved space on disk, per `minfree`, so end-users >>> can troubleshoot why check_space(..) is reporting that there = isn't >>> enough free space. >>>=20 >>> MFC after: 7 weeks >>> Reviewed by: Anton Rang (earlier diff), cem = (earlier diff) >>> Tested with: positive/negative cases (see review); make tinderbox >>> Sponsored by: Dell EMC Isilon >>> Differential Revision: D10379 >>=20 >> The free space calculation is still uselessly conservative, because = it >> doesn't account for the fact that core dumps will always be either >> spare or compressed. The result is that savecore will frequently >> refuse to save corefiles even when there's plenty of space. I >> proposed removing the space check altogether in >> https://reviews.freebsd.org/D2587. However, I agreed to wait until >> after the compressed core dump feature was merged, because then = mostly >> accurate space checks will be possible. AFAIK the compressed core >> dump feature still hasn't been finished. >=20 > Is posible (in the future) to use multiple swaps (on multiple disks) > for save core dumps? Multiple swap devices is already handled by savecore(8), if one uses = fstab(5) or dumpon(8). Otherwise, you must invoke savecore(8) on = individual devices. As far as saving to multiple disks is concerned, I would hope that one = is using a redundancy capable filesystem (zfs) or RAID-like technology = (gmirror, graid, LSI Fusion=E2=80=99s RAID product line) to stripe = and/or mirror the data across multiple disks. Thanks! -Ngie --Apple-Mail=_F6044C16-A008-41A2-B2C9-8CDBA517C385 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----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJY8S7mAAoJEPWDqSZpMIYVD0YP/1KlgFSYpCIlRRlB0/oCMf60 CNmZheuJosq0Hg4ddFIUY3qtkeCGlflCBGT87TtkjUO9JjchT9qThHoxrK6WM+nS URNkAWephN9ZR2XuwkNAtXwOYMBHXvVARYD31YCpCcoCvTIKaVcW4YGfEbNgQOAR k2u64ca8VZEso6BL8CDjR9OWnn61cMKezdi8tnwkgfVbvs2pZo9DpyWpQm0syW8B IjwPe68d7MA74tgggSdAUBnso8GUjJU3QLXYw8vu11x+o9G4OHwQ0d9kO9l7AF3e ACcDF+1pRi4x9qNWpirPeRl2u+BHCbvAExK5OPFemuBFM/tFRgy4hNGTVRPfKmPM w0+zK3PpBJVjh5PS+LdKCRjE5vQvnQF88k2tJmoIlq5a7xCGpoCCLLDrUpv3U3gt vaworVe6X+4WVvOtxdWy77hPKW8LoprrxY7HADBl6SK/713wgX0UqtpOywffkc59 G55JqxKwi/5WyAFRixpFgzN1GXykVUKaROXJhJFHmOK9ET0Evxc4qJsQ3TLW+VGn 7ELzrfd+WjNAoaCtCtufWDhopZO+gzy3JzuzISpVyXlXF0MQjg89ByXqlihi6obK +jmj0mbvrKKEnX9ZQNVEEoHmsVdD0oxa0Ujh0BYH334VyfU3gWV23ogmmZDvI3JI NLtwHCAagYRtm9jSSWzw =nYn+ -----END PGP SIGNATURE----- --Apple-Mail=_F6044C16-A008-41A2-B2C9-8CDBA517C385-- From owner-svn-src-head@freebsd.org Fri Apr 14 20:26:52 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2961D3A388; Fri, 14 Apr 2017 20:26:52 +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 8EC0C15B9; Fri, 14 Apr 2017 20:26:52 +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=Content-transfer-encoding:Content-type:Mime-version:In-Reply-To: References:Message-ID:CC:To:From:Subject:Date: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=TA6nEgScfnIN5WmScTSR/Pz7prf/sBUM22JQDb+Sspo=; b=E53AwMNqOTbbyhaO40EsPo8Pco FH5CnJzQ7Mgz1Fgpt/yKbWvslAdBlAugexc1o6P8wQ2lxHLuycSxLLP0od311r02TlZuMW9eV7tta fip7DBR9+zJDhROWC24Roo6BEcSJOAMVdbB6PIxzH6moGNRg6L4sQo0Ay+skjk1RtQog=; Received: from [74.203.163.58] (port=50895 helo=[10.106.10.41]) by thebighonker.lerctr.org with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89 (FreeBSD)) (envelope-from ) id 1cz7nv-000IAx-7m; Fri, 14 Apr 2017 15:26:51 -0500 User-Agent: Microsoft-MacOutlook/f.21.0.170409 Date: Fri, 14 Apr 2017 15:26:20 -0500 Subject: Re: svn commit: r316938 - head/sbin/savecore From: Larry Rosenman To: "Ngie Cooper (yaneurabeya)" , Slawa Olhovchenkov CC: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Ngie Cooper , Alan Somers Message-ID: <0CAE4B1C-228B-4C71-86E9-4337753DFF74@lerctr.org> Thread-Topic: svn commit: r316938 - head/sbin/savecore References: <201704141941.v3EJfmCW003347@repo.freebsd.org> <20170414201431.GF20974@zxy.spb.ru> In-Reply-To: Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 20:26:52 -0000 On 4/14/17, 3:19 PM, "Ngie Cooper (yaneurabeya)" wrote: =20 > On Apr 14, 2017, at 13:14, Slawa Olhovchenkov wrote: >=20 > On Fri, Apr 14, 2017 at 01:49:51PM -0600, Alan Somers wrote: >=20 >> On Fri, Apr 14, 2017 at 1:41 PM, Ngie Cooper wrot= e: >>> Author: ngie >>> Date: Fri Apr 14 19:41:48 2017 >>> New Revision: 316938 >>> URL: https://svnweb.freebsd.org/changeset/base/316938 >>>=20 >>> Log: >>> savecore: fix space calculation with respect to `minfree` in check= _space(..) >>>=20 >>> - Use strtoll(3) instead of atoi(3), because atoi(3) limits the >>> representable data to INT_MAX. Check the values received from >>> strtoll(3), trimming trailing whitespace off the end to maintain >>> POLA. >>> - Use `KiB` instead of `kB` when describing free space, total spac= e, >>> etc. I am now fully aware of `KiB` being the IEC standard for 10= 24 >>> bytes and `kB` being the IEC standard for 1000 bytes. >>> - Store available number of KiB in `available` so it can be more >>> easily queried and compared to ensure that there are enough KiB = to >>> store the dump image on disk. >>> - Print out the reserved space on disk, per `minfree`, so end-user= s >>> can troubleshoot why check_space(..) is reporting that there isn= 't >>> enough free space. >>>=20 >>> MFC after: 7 weeks >>> Reviewed by: Anton Rang (earlier diff), cem (earli= er diff) >>> Tested with: positive/negative cases (see review); make tinderbox >>> Sponsored by: Dell EMC Isilon >>> Differential Revision: D10379 >>=20 >> The free space calculation is still uselessly conservative, because = it >> doesn't account for the fact that core dumps will always be either >> spare or compressed. The result is that savecore will frequently >> refuse to save corefiles even when there's plenty of space. I >> proposed removing the space check altogether in >> https://reviews.freebsd.org/D2587. However, I agreed to wait until >> after the compressed core dump feature was merged, because then most= ly >> accurate space checks will be possible. AFAIK the compressed core >> dump feature still hasn't been finished. >=20 > Is posible (in the future) to use multiple swaps (on multiple disks) > for save core dumps? =20 Multiple swap devices is already handled by savecore(8), if one uses fs= tab(5) or dumpon(8). Otherwise, you must invoke savecore(8) on individual de= vices. =20 As far as saving to multiple disks is concerned, I would hope that one = is using a redundancy capable filesystem (zfs) or RAID-like technology (gmir= ror, graid, LSI Fusion=E2=80=99s RAID product line) to stripe and/or mirror the da= ta across multiple disks. =20 Thanks! -Ngie =20 How do I use multiple devices to have the system dump on all of my swap? I= got a message about not enough space, but there (I think) was enough betwee= n multiple drives=E2=80=A6. From owner-svn-src-head@freebsd.org Fri Apr 14 20:29:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6F30D3A484; Fri, 14 Apr 2017 20:29:40 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qt0-x22e.google.com (mail-qt0-x22e.google.com [IPv6:2607:f8b0:400d:c0d::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 8E65A1760; Fri, 14 Apr 2017 20:29:40 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qt0-x22e.google.com with SMTP id m36so70993782qtb.0; Fri, 14 Apr 2017 13:29:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=VovzLQB9qyODv+kHXRjOTRsdIRJA83w3RA3ZxyZPyNo=; b=m4UCUVCTwc3Axhp5SJl/MlS1wHatvP4zKgylh+m4BQMiJnqXjWZdoL+N8gLFNoyYDx lcLMyu6nu8LeToMALAYXtZ1b04K52CT1Atk/nx4vcUplOb0nMb1XZTE4WhI6hJtYXKHI n+EW4CyC3msP4cwRZ+pONhnu95xGWT+8lF0NM/kIbcZ4OWr4Wfh1Ia7JQ7f7q9Zyo3RW TXEPeqZQ+RqCedi5H0/TXfBBPGcwM+0oN2YZ7RmDOA/it/wJh7kN+LEJlIdcRfXIAXSR GQPmThyE5lsBdh63yeU1L5Hy28HtI5LxKvL6jwfToni6Cal5Kf2zuD/5MZZdSAGj2WPO DOQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=VovzLQB9qyODv+kHXRjOTRsdIRJA83w3RA3ZxyZPyNo=; b=Z+F0tBHGQIwtJ0PVGvejkq3urTUH+CP3Dub3mtqHgqU37LcvJAYAuK5rBEYaJyqAJb FeckUediaAYZv/dnPnscCKH2VspGIFBPVm5REaQjxD7bsx2Rgnmvu2op4zVA8lKYNF+c 8iNwgY7HVZn0K/vBaUKqDv4tCgZWWDHtoTQPCIxB86KiEC7PJChuj2mTQ/D0wDQCFl/a WIKswGzt0ErdrOKGkWib5x40Gi8LfRINW/DWPtrsFpYljYaC0JolYZKuqpKfuqopaL4G fLES2SzaWWeWqOR8we5ZVqO4oO+EdhoyL95KFZATvJ5H0do6LYN/J668T2dPS7kmNe0l UzxQ== X-Gm-Message-State: AN3rC/48bY7hZRQ7Jbldi5Fhf0FXgxM2jY37LfEFsA4LSOQ12v08Afyq 5cG01e6KOwU2HAg6 X-Received: by 10.237.62.46 with SMTP id l43mr8403536qtf.88.1492201779507; Fri, 14 Apr 2017 13:29:39 -0700 (PDT) Received: from wkstn-mjohnston.west.isilon.com (c-76-104-201-218.hsd1.wa.comcast.net. [76.104.201.218]) by smtp.gmail.com with ESMTPSA id a19sm1880352qta.48.2017.04.14.13.29.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Apr 2017 13:29:38 -0700 (PDT) Sender: Mark Johnston Date: Fri, 14 Apr 2017 13:29:18 -0700 From: Mark Johnston To: Alan Somers Cc: Ngie Cooper , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r316938 - head/sbin/savecore Message-ID: <20170414202918.GD5039@wkstn-mjohnston.west.isilon.com> References: <201704141941.v3EJfmCW003347@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.0 (2017-02-23) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 20:29:40 -0000 On Fri, Apr 14, 2017 at 01:49:51PM -0600, Alan Somers wrote: > On Fri, Apr 14, 2017 at 1:41 PM, Ngie Cooper wrote: > > Author: ngie > > Date: Fri Apr 14 19:41:48 2017 > > New Revision: 316938 > > URL: https://svnweb.freebsd.org/changeset/base/316938 > > > > Log: > > savecore: fix space calculation with respect to `minfree` in check_space(..) > > > > - Use strtoll(3) instead of atoi(3), because atoi(3) limits the > > representable data to INT_MAX. Check the values received from > > strtoll(3), trimming trailing whitespace off the end to maintain > > POLA. > > - Use `KiB` instead of `kB` when describing free space, total space, > > etc. I am now fully aware of `KiB` being the IEC standard for 1024 > > bytes and `kB` being the IEC standard for 1000 bytes. > > - Store available number of KiB in `available` so it can be more > > easily queried and compared to ensure that there are enough KiB to > > store the dump image on disk. > > - Print out the reserved space on disk, per `minfree`, so end-users > > can troubleshoot why check_space(..) is reporting that there isn't > > enough free space. > > > > MFC after: 7 weeks > > Reviewed by: Anton Rang (earlier diff), cem (earlier diff) > > Tested with: positive/negative cases (see review); make tinderbox > > Sponsored by: Dell EMC Isilon > > Differential Revision: D10379 > > The free space calculation is still uselessly conservative, because it > doesn't account for the fact that core dumps will always be either > spare or compressed. The result is that savecore will frequently > refuse to save corefiles even when there's plenty of space. I > proposed removing the space check altogether in > https://reviews.freebsd.org/D2587. However, I agreed to wait until > after the compressed core dump feature was merged, because then mostly > accurate space checks will be possible. AFAIK the compressed core > dump feature still hasn't been finished. I had held off on it for a while because it was going to conflict with the work to add encrypted dump support, which of course has finished. The patch to add compression support is here and should largely still work: https://people.freebsd.org/~markj/patches/core-compression/20141110-kern_dump.diff I've been hesitant about pushing it forward: - The dump_write* APIs need some simplification after the addition of encrypted dump support and support for dumping to 4Kn drives. - I'm not sure how encryption should compose with compression. It seems intuitively obvious that we should compress before encrypting if the compression is to be of any use, but I don't know enough to know whether the compression might somehow compromise the effectiveness of the encryption. If anyone has some insight on the second of these two points, I'd appreciate hearing it. From owner-svn-src-head@freebsd.org Fri Apr 14 20:33:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19E2BD3A6C9; Fri, 14 Apr 2017 20:33:40 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x242.google.com (mail-pg0-x242.google.com [IPv6:2607:f8b0:400e:c05::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 D7ABF1BE6; Fri, 14 Apr 2017 20:33:39 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x242.google.com with SMTP id o123so17792320pga.1; Fri, 14 Apr 2017 13:33:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=ScsIUx0yl2WRPiXfY9B8lhBsRrBh7N01AuMlX7XjJZA=; b=QDD86mMtmGUMM63Gk3JUy/7PSA/2w2KFxDjOfEoToSczKZRV5A5VPnQcDM4yCh1OUf 81LSMNHNZp1KtkoMgCVRV172S4EAFONG+/6FGD1HUPiVAnVLjGjUGaRFIUNFu2Vrbl8r JXXKUxcqsbmrNviFtvdgfkwDqH9HBWlAq2/BV1sA2tIMD7k4gV2RGokLVIKG2sddbtJ0 iIVNQJrir9cPTRiQptebSc4i7rCinbyI4zbCtTp2wamY3NyBJQVGnK2bX2Qt0bsPHX9p CsV5DDYTcCdKVePVZZhfUFYU/0SOckjizhHvuQwbXbdKBCySvRGHH4Jd/nEXiiucdXUo aCjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=ScsIUx0yl2WRPiXfY9B8lhBsRrBh7N01AuMlX7XjJZA=; b=Rv5j0HFOHpJiSddPKFgdtttCOoBPPFBLTpYJoywqi+3MeT+bhfA1iw5WwFfpgrImG9 hIgpRajh2Cigq/QlqyrOtTl/6MW9A48+CcRXSh2C9Rxa9Rkhvil86pmU1f6T3Sjhd8cM MlY7fZYr5aJSrbVMRUaptEXhSJ1JVQLRgsva2yTqc+XOEHhG9q1PiSxxdCLBY37eKTxZ NIWyLui28CgxWU04X6nz0FotKdIeyOTXRY2YsT5gcomc1UFV8l7kDzm1FPAbGNda32ck Eyk75ozVBwcbPSBCaWj0qJgIEhPas3wzCaVPQJu2ekfogq37c3jmoKdHBzd+vsh+VPID tXaQ== X-Gm-Message-State: AN3rC/6VIu1U3/ddiIO73QKcXn6s1JGYH6pKEgsz/EuiFoeAbQt+9pFU +xWsDHrV+v0L7A== X-Received: by 10.84.224.73 with SMTP id a9mr11219074plt.38.1492202019371; Fri, 14 Apr 2017 13:33:39 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id p2sm4762491pfj.93.2017.04.14.13.33.37 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Apr 2017 13:33:38 -0700 (PDT) Subject: Re: svn commit: r316938 - head/sbin/savecore Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_C790D917-BF6F-4C2A-8142-67B1435377E7"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <0CAE4B1C-228B-4C71-86E9-4337753DFF74@lerctr.org> Date: Fri, 14 Apr 2017 13:33:36 -0700 Cc: Slawa Olhovchenkov , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Ngie Cooper , Alan Somers Message-Id: References: <201704141941.v3EJfmCW003347@repo.freebsd.org> <20170414201431.GF20974@zxy.spb.ru> <0CAE4B1C-228B-4C71-86E9-4337753DFF74@lerctr.org> To: Larry Rosenman X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 20:33:40 -0000 --Apple-Mail=_C790D917-BF6F-4C2A-8142-67B1435377E7 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Apr 14, 2017, at 13:26, Larry Rosenman wrote: >=20 > On 4/14/17, 3:19 PM, "Ngie Cooper (yaneurabeya)" = = wrote: >=20 >> On Apr 14, 2017, at 13:14, Slawa Olhovchenkov wrote: >>=20 >> On Fri, Apr 14, 2017 at 01:49:51PM -0600, Alan Somers wrote: >>=20 >>> On Fri, Apr 14, 2017 at 1:41 PM, Ngie Cooper = wrote: >>>> Author: ngie >>>> Date: Fri Apr 14 19:41:48 2017 >>>> New Revision: 316938 >>>> URL: https://svnweb.freebsd.org/changeset/base/316938 >>>>=20 >>>> Log: >>>> savecore: fix space calculation with respect to `minfree` in = check_space(..) >>>>=20 >>>> - Use strtoll(3) instead of atoi(3), because atoi(3) limits the >>>> representable data to INT_MAX. Check the values received from >>>> strtoll(3), trimming trailing whitespace off the end to maintain >>>> POLA. >>>> - Use `KiB` instead of `kB` when describing free space, total = space, >>>> etc. I am now fully aware of `KiB` being the IEC standard for = 1024 >>>> bytes and `kB` being the IEC standard for 1000 bytes. >>>> - Store available number of KiB in `available` so it can be more >>>> easily queried and compared to ensure that there are enough KiB = to >>>> store the dump image on disk. >>>> - Print out the reserved space on disk, per `minfree`, so end-users >>>> can troubleshoot why check_space(..) is reporting that there = isn't >>>> enough free space. >>>>=20 >>>> MFC after: 7 weeks >>>> Reviewed by: Anton Rang (earlier diff), cem = (earlier diff) >>>> Tested with: positive/negative cases (see review); make tinderbox >>>> Sponsored by: Dell EMC Isilon >>>> Differential Revision: D10379 >>>=20 >>> The free space calculation is still uselessly conservative, because = it >>> doesn't account for the fact that core dumps will always be either >>> spare or compressed. The result is that savecore will frequently >>> refuse to save corefiles even when there's plenty of space. I >>> proposed removing the space check altogether in >>> https://reviews.freebsd.org/D2587. However, I agreed to wait until >>> after the compressed core dump feature was merged, because then = mostly >>> accurate space checks will be possible. AFAIK the compressed core >>> dump feature still hasn't been finished. >>=20 >> Is posible (in the future) to use multiple swaps (on multiple disks) >> for save core dumps? >=20 > Multiple swap devices is already handled by savecore(8), if one = uses fstab(5) or dumpon(8). Otherwise, you must invoke savecore(8) on = individual devices. >=20 > As far as saving to multiple disks is concerned, I would hope that = one is using a redundancy capable filesystem (zfs) or RAID-like = technology (gmirror, graid, LSI Fusion=E2=80=99s RAID product line) to = stripe and/or mirror the data across multiple disks. =E2=80=A6 > How do I use multiple devices to have the system dump on all of my = swap? I got a message about not enough space, but there (I think) was = enough between multiple drives=E2=80=A6. Something like: - Create a zpool - Mount zpool to /crashdumps - Change dumpdir in /etc/rc.conf to be /crashdumps, e.g., echo = =E2=80=98dumpdir=3D/crashdumps=E2=80=99 ? HTH, -Ngie PS The issue with lack of space might be the issue that Alan brought up = earlier with compressed dumps and overly conservative free space checks, = or it might be the fact that dumpdir (default: /var/crash) is full. --Apple-Mail=_C790D917-BF6F-4C2A-8142-67B1435377E7 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----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJY8TIhAAoJEPWDqSZpMIYVLx0P/iUXgYmmooUe4Wxn+Pml9V5g kXBFrlo082lBIiz+YYkUdwyt4jdthXgminrGzugXmpXdWalB3GbLL9m76z2CCQ85 IJ6HBpyWUs918P7I0yhA4YnXCXVwP9cbcsdBcpMQH6bVDGE0slncJdMqtsYqItpo eHd03Bmw+6F+J+wh1Ysh1lo3gfHWW6HpKi4Q8R4oWInODH8Nz2d7U6YAlSu9udMo Plt2grjGsCqwfiz6ZY6/zC3cjFmB8LnVlcKmjprri7eM1RWdiqiXYpHxDKGHOjgs DAEmNMTf3wXUKQlKEF4GyTN1Nb6Q033v/LHi7JbDD56f+A7MHy0+MaPMMcx31IAI HGIicG8cpdhKkt9SOsENfN3aw/7UlNjdyKchWUS1dQrvaf1GcOqP7eZW34F0f7Se 2VOG4YPUsEBVTPA9nM5APvHVlEiDikpx5KSg1cSg4feB0fJBbGgQZcqUi4Fynasn yrFWlary8j3FSjStDMGd+vgXl75m7RwBpIY7IZyuELODDCGRyeHzE6PXOlPDDfOw oZPeSxSpbH3qvGuevgiZQpshttGo7koeIl1so7SM9PDWRzIFlXo0yajAGcF5rgVR WUzbeMoqkPPv3iJU3OqxPz4H6N1O8OJ2kic1TFqQpXZ+nyVxq2zCmCaQTAdNi/TZ +zIlkOp5WrlJh/g00GPs =SxUU -----END PGP SIGNATURE----- --Apple-Mail=_C790D917-BF6F-4C2A-8142-67B1435377E7-- From owner-svn-src-head@freebsd.org Fri Apr 14 20:37:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B29ADD3A7D5; Fri, 14 Apr 2017 20:37:41 +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 8D9731E27; Fri, 14 Apr 2017 20:37:41 +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=Content-transfer-encoding:Content-type:Mime-version:In-Reply-To: References:Message-ID:CC:To:From:Subject:Date: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=MVZQOjrlrhpsxebE2wLM+/juVvbJKm5HlqSqgOSVnfw=; b=nSO2/jCDAoOnt0I9QgZQBMKRfS S0Jj736Y7DOI/yOoM1rXJ1rAuKmPGv11nM4eGKMqImfxYdOAYl1cD8eBJoGwW6lttgjZaFjfHnOZi u3pKOdJw2NZrZgakj3LDh9BPYKCVncTSZDcNgIz/FWig4OoSwQCwX2VyREumHWzx/ZG8=; Received: from [74.203.163.58] (port=32826 helo=[10.106.10.41]) by thebighonker.lerctr.org with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89 (FreeBSD)) (envelope-from ) id 1cz7yO-000IUK-Go; Fri, 14 Apr 2017 15:37:40 -0500 User-Agent: Microsoft-MacOutlook/f.21.0.170409 Date: Fri, 14 Apr 2017 15:37:10 -0500 Subject: Re: svn commit: r316938 - head/sbin/savecore From: Larry Rosenman To: "Ngie Cooper (yaneurabeya)" CC: Slawa Olhovchenkov , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Ngie Cooper , Alan Somers Message-ID: Thread-Topic: svn commit: r316938 - head/sbin/savecore References: <201704141941.v3EJfmCW003347@repo.freebsd.org> <20170414201431.GF20974@zxy.spb.ru> <0CAE4B1C-228B-4C71-86E9-4337753DFF74@lerctr.org> In-Reply-To: Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 20:37:41 -0000 On 4/14/17, 3:33 PM, "Ngie Cooper (yaneurabeya)" wr= ote: =20 > On Apr 14, 2017, at 13:26, Larry Rosenman wrote: >=20 > On 4/14/17, 3:19 PM, "Ngie Cooper (yaneurabeya)" wrote: >=20 >> On Apr 14, 2017, at 13:14, Slawa Olhovchenkov wrote= : >>=20 >> On Fri, Apr 14, 2017 at 01:49:51PM -0600, Alan Somers wrote: >>=20 >>> On Fri, Apr 14, 2017 at 1:41 PM, Ngie Cooper wro= te: >>>> Author: ngie >>>> Date: Fri Apr 14 19:41:48 2017 >>>> New Revision: 316938 >>>> URL: https://svnweb.freebsd.org/changeset/base/316938 >>>>=20 >>>> Log: >>>> savecore: fix space calculation with respect to `minfree` in check= _space(..) >>>>=20 >>>> - Use strtoll(3) instead of atoi(3), because atoi(3) limits the >>>> representable data to INT_MAX. Check the values received from >>>> strtoll(3), trimming trailing whitespace off the end to maintain >>>> POLA. >>>> - Use `KiB` instead of `kB` when describing free space, total spac= e, >>>> etc. I am now fully aware of `KiB` being the IEC standard for 10= 24 >>>> bytes and `kB` being the IEC standard for 1000 bytes. >>>> - Store available number of KiB in `available` so it can be more >>>> easily queried and compared to ensure that there are enough KiB = to >>>> store the dump image on disk. >>>> - Print out the reserved space on disk, per `minfree`, so end-user= s >>>> can troubleshoot why check_space(..) is reporting that there isn= 't >>>> enough free space. >>>>=20 >>>> MFC after: 7 weeks >>>> Reviewed by: Anton Rang (earlier diff), cem (earli= er diff) >>>> Tested with: positive/negative cases (see review); make tinderbox >>>> Sponsored by: Dell EMC Isilon >>>> Differential Revision: D10379 >>>=20 >>> The free space calculation is still uselessly conservative, because= it >>> doesn't account for the fact that core dumps will always be either >>> spare or compressed. The result is that savecore will frequently >>> refuse to save corefiles even when there's plenty of space. I >>> proposed removing the space check altogether in >>> https://reviews.freebsd.org/D2587. However, I agreed to wait until >>> after the compressed core dump feature was merged, because then mos= tly >>> accurate space checks will be possible. AFAIK the compressed core >>> dump feature still hasn't been finished. >>=20 >> Is posible (in the future) to use multiple swaps (on multiple disks) >> for save core dumps? >=20 > Multiple swap devices is already handled by savecore(8), if one us= es fstab(5) or dumpon(8). Otherwise, you must invoke savecore(8) on individu= al devices. >=20 > As far as saving to multiple disks is concerned, I would hope that= one is using a redundancy capable filesystem (zfs) or RAID-like technology = (gmirror, graid, LSI Fusion=E2=80=99s RAID product line) to stripe and/or mirror t= he data across multiple disks. =20 =E2=80=A6 =20 > How do I use multiple devices to have the system dump on all of my sw= ap? I got a message about not enough space, but there (I think) was enough = between multiple drives=E2=80=A6. =20 Something like: =20 - Create a zpool - Mount zpool to /crashdumps - Change dumpdir in /etc/rc.conf to be /crashdumps, e.g., echo =E2=80=98dumpd= ir=3D/crashdumps=E2=80=99 =20 ? HTH, -Ngie =20 PS The issue with lack of space might be the issue that Alan brought up= earlier with compressed dumps and overly conservative free space checks, or= it might be the fact that dumpdir (default: /var/crash) is full. I was talking about the actual crashdump to swap by the system. /var/crash= has 10T of space (my root pool). =20 From owner-svn-src-head@freebsd.org Fri Apr 14 20:39:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AECFCD3A86B; Fri, 14 Apr 2017 20:39:47 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x244.google.com (mail-pf0-x244.google.com [IPv6:2607:f8b0:400e:c00::244]) (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 772781F8C; Fri, 14 Apr 2017 20:39:47 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x244.google.com with SMTP id c198so16534130pfc.0; Fri, 14 Apr 2017 13:39:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=irXVje+m8CLSJAb62ehT2qVpRpQqepcvon8JPA5q4cA=; b=Vh1a82+EpcqoVw9QVXhdnCub7Kf+15J/oVpgvxMfcslHFDXvb1VJPa3IE9JG4ehCz+ M5dlKRkXn/2OUJ6cy7Rpz9C3PwU1hwFi5FCk7B4DnDbutjFH791MD0am5fWyebuyd5Np cNsd9/kY4/JuFQGJqzsugEm9r/KSR4nbhAVlu0IvhnzXt5jEU7NyQAQ9aWtVKVqYLNuP 6lH/gn0FMm1vcPQuLIsXkUw/wsiBmjIF8E4IYFOJs1/Uyn8ug0JsZBSE+ecMwX6HKfO2 T/jlONxNbHoDc7N5KCbi4ZYC6s5AVNo+IfvDjcVqIJyXWrB7M+TgQoefnj4vzGyCu5EG DbiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=irXVje+m8CLSJAb62ehT2qVpRpQqepcvon8JPA5q4cA=; b=NRUCzFGIyrByGAHfqfAuemfB0qo0P6Grb7R9u//s9YrZOcjseWssP9ZXA/aPOD4TOI IjzJCh4RNlMbJ3OM4XQT0ZuUCmN0zn3eJFnkDL4V5Rt4Q14goFiGopBgSthfirhbh1kH 3PQugm1HQQBkgZzt8y/lWRHEMCtxfP7qb6qUC9eQQ6zoW1nBCbD9D/+AEJ/etzQr53ho CKFwfSmdsgIkfDCefvOCGpr2qTcZciF/z2thDz1VbYUlsHjx//FPLtTwV3ctck1svuEs UtN1ZTWExMeMaTCN3YWr2ma7iOiayNBI7ubYQ7GOowx2Y7QzBr04fMeYZIh8BPCnMQ9d x9dQ== X-Gm-Message-State: AN3rC/7guOCOemBDyAJzUGpU2myC3hDXersM7zJzY+Pp3tsZlWdDE9zb whVxJIdYXjNCbw== X-Received: by 10.99.135.193 with SMTP id i184mr8670201pge.120.1492202387036; Fri, 14 Apr 2017 13:39:47 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id f24sm4770477pfk.88.2017.04.14.13.39.45 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Apr 2017 13:39:45 -0700 (PDT) Subject: Re: svn commit: r316938 - head/sbin/savecore Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_215A0B22-5F85-4831-9C44-17E7863F09D3"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: Date: Fri, 14 Apr 2017 13:39:44 -0700 Cc: Slawa Olhovchenkov , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Ngie Cooper , Alan Somers Message-Id: <12820BAB-D8BA-4EDE-89BC-4BDB56B1E57A@gmail.com> References: <201704141941.v3EJfmCW003347@repo.freebsd.org> <20170414201431.GF20974@zxy.spb.ru> <0CAE4B1C-228B-4C71-86E9-4337753DFF74@lerctr.org> To: Larry Rosenman X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 20:39:47 -0000 --Apple-Mail=_215A0B22-5F85-4831-9C44-17E7863F09D3 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Apr 14, 2017, at 13:37, Larry Rosenman wrote: >=20 > On 4/14/17, 3:33 PM, "Ngie Cooper (yaneurabeya)" = wrote: >=20 >> On Apr 14, 2017, at 13:26, Larry Rosenman wrote: >>=20 >> On 4/14/17, 3:19 PM, "Ngie Cooper (yaneurabeya)" = = wrote: >>=20 >>> On Apr 14, 2017, at 13:14, Slawa Olhovchenkov = wrote: >>>=20 >>> On Fri, Apr 14, 2017 at 01:49:51PM -0600, Alan Somers wrote: >>>=20 >>>> On Fri, Apr 14, 2017 at 1:41 PM, Ngie Cooper = wrote: >>>>> Author: ngie >>>>> Date: Fri Apr 14 19:41:48 2017 >>>>> New Revision: 316938 >>>>> URL: https://svnweb.freebsd.org/changeset/base/316938 >>>>>=20 >>>>> Log: >>>>> savecore: fix space calculation with respect to `minfree` in = check_space(..) >>>>>=20 >>>>> - Use strtoll(3) instead of atoi(3), because atoi(3) limits the >>>>> representable data to INT_MAX. Check the values received from >>>>> strtoll(3), trimming trailing whitespace off the end to maintain >>>>> POLA. >>>>> - Use `KiB` instead of `kB` when describing free space, total = space, >>>>> etc. I am now fully aware of `KiB` being the IEC standard for = 1024 >>>>> bytes and `kB` being the IEC standard for 1000 bytes. >>>>> - Store available number of KiB in `available` so it can be more >>>>> easily queried and compared to ensure that there are enough KiB = to >>>>> store the dump image on disk. >>>>> - Print out the reserved space on disk, per `minfree`, so = end-users >>>>> can troubleshoot why check_space(..) is reporting that there = isn't >>>>> enough free space. >>>>>=20 >>>>> MFC after: 7 weeks >>>>> Reviewed by: Anton Rang (earlier diff), cem = (earlier diff) >>>>> Tested with: positive/negative cases (see review); make tinderbox >>>>> Sponsored by: Dell EMC Isilon >>>>> Differential Revision: D10379 >>>>=20 >>>> The free space calculation is still uselessly conservative, because = it >>>> doesn't account for the fact that core dumps will always be either >>>> spare or compressed. The result is that savecore will frequently >>>> refuse to save corefiles even when there's plenty of space. I >>>> proposed removing the space check altogether in >>>> https://reviews.freebsd.org/D2587. However, I agreed to wait until >>>> after the compressed core dump feature was merged, because then = mostly >>>> accurate space checks will be possible. AFAIK the compressed core >>>> dump feature still hasn't been finished. >>>=20 >>> Is posible (in the future) to use multiple swaps (on multiple disks) >>> for save core dumps? >>=20 >> Multiple swap devices is already handled by savecore(8), if one = uses fstab(5) or dumpon(8). Otherwise, you must invoke savecore(8) on = individual devices. >>=20 >> As far as saving to multiple disks is concerned, I would hope that = one is using a redundancy capable filesystem (zfs) or RAID-like = technology (gmirror, graid, LSI Fusion=E2=80=99s RAID product line) to = stripe and/or mirror the data across multiple disks. >=20 > =E2=80=A6 >=20 >> How do I use multiple devices to have the system dump on all of my = swap? I got a message about not enough space, but there (I think) was = enough between multiple drives=E2=80=A6. >=20 > Something like: >=20 > - Create a zpool > - Mount zpool to /crashdumps > - Change dumpdir in /etc/rc.conf to be /crashdumps, e.g., echo = =E2=80=98dumpdir=3D/crashdumps=E2=80=99 >=20 > ? > HTH, > -Ngie >=20 > PS The issue with lack of space might be the issue that Alan = brought up earlier with compressed dumps and overly conservative free = space checks, or it might be the fact that dumpdir (default: /var/crash) = is full. >=20 >=20 > I was talking about the actual crashdump to swap by the system. = /var/crash has 10T of space (my root pool). If your memory is bigger than your swap, you=E2=80=99re unfortunately = not able to save the mini dump if the size of the saved pages exceed the = space on swap. I think this is where markj=E2=80=99s compressed dumps = feature will come in handy. Thanks! -Ngie --Apple-Mail=_215A0B22-5F85-4831-9C44-17E7863F09D3 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----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJY8TOQAAoJEPWDqSZpMIYVIckP/1/wc/m+cB8E/xrSul7Da/3t rEEac5Wd87AcepXrjWINm76mV4ptWr2Wxob/1JH7xBC0tw3Tv8FcqKhsPRKW6Pyu phufjxc3yy1KZCZWRPhz6SA1k3hD3Q6zfnXbtxy13YH8M7CpLb78ni/wSmhuEorD VjJgdijY5y19f3JTfhw/FU3+5OOR/n+0058o5cEKavIZ6VWZmG2iQ4iujx808xpm V5q4OOVGlNNWXGIxGWnvea98dITdVIJYnUbW0ENLRAnxEcsFg0S0TWDFbBQA9qeR L3Co0SCfQaOw+nnPY8u84aiPqhaefrVzcn5iUr+M4qU9v3WPupj3Z0j2A5ZMExR9 19UQm6Aofm0ZnS1/Gp+wi7XLbMfxkhsVxlljLpRBR5q4KtWwttFwZijnLvdlYw0v zLiJqu0jCW5ZA+U3qKIXlU4uIqSmLj9iZEETA2/6J4SvcllMRI+raHgugIbHSBEl UlqFC/p40ByArQvzU4xWb2Ll8VR6iaKSWledkukKpRruHc0JU0h7GmIW4qzx1HlF Fsp9fzcTL1nAGJfqy3CW1SaBQ8d+kaw/9zLGSSRpzHkF6FUYl20+TWIxiB1luB3y 8UcYFNJdYh5NjXv2gybPvjogueU48ZceBQ9t3UM1ZKDvKSt2Tb/kzpGiXP5kf45t /Xw83eOleAC2Tq3Egj/t =288l -----END PGP SIGNATURE----- --Apple-Mail=_215A0B22-5F85-4831-9C44-17E7863F09D3-- From owner-svn-src-head@freebsd.org Fri Apr 14 20:41:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 364D4D3AA90; Fri, 14 Apr 2017 20:41:28 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-yb0-x231.google.com (mail-yb0-x231.google.com [IPv6:2607:f8b0:4002:c09::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E7C89363; Fri, 14 Apr 2017 20:41:27 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-yb0-x231.google.com with SMTP id l201so21111924ybf.0; Fri, 14 Apr 2017 13:41:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=PFysNNThXkZBd3AVBwh5zjHDsdLezan9OO7QdSDNKZE=; b=bcZod9JZK1oK2kWjO1mKm3qgoL7yqzJNOkx+6lH5NSwGJM6W9VHvzot6UritHasq6o ubhZjFrzatdYbMT/QfQYDA9FntE3upSVXrHSHQzgKAA3Lf6q2YpeY94/AuzmZeamQKQC S07YKVhFf3gSYl+pRAfc/7YzVro+aBo2Ru2ua/7NgxVbz3mwiuCeUsLzsBCPPQKeeCj8 KA4unDUksOv8Sc//2biUHL0qal5xY2qEOmkw8wm1q/4B1h6cm0+4Pcp0YVay7EQ5Rjdq TMQZ7ZJVLQTip82mz4rTXgXM0SL7mNfT9PV0e9f6gpv/vteXdIu8tf/y8FOIAeAHWlfV CAhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=PFysNNThXkZBd3AVBwh5zjHDsdLezan9OO7QdSDNKZE=; b=ajBjKY5Snf6tnEht0ulXqMzA1OT9xdlMQCknAi5Obd4PL7R2zsWupGVIaLgmfOkW4v pHTqtfpr/1W7+6noJfJanO9/nBuuns1juQUEHciquP89G0UPORKzLu4DUtxFdYZhgtIq d8KAHQ7VksVRKP6qPzbVmd4T0+WXyHFYOHKZrVaLGP1Y/rHoFKznuOIxrsEB4CQQbjrz Q+sX5HY8B7H6yE93pltToQH5vk8OTpd3MGGHxK3Odq45qqlabN4+UfatL498aI6uB7at aRucJm7LAYum1wRAU3xiC2FMn1mDmZl2G+62xiuvuUzoH/5fuDFOUjoDXfMLtP4/nQEN enYQ== X-Gm-Message-State: AN3rC/5uEjZEocwS8jfE7tKTibjJEX78mfrrxoKw65xdJo+h9RezwLcj 1xFNOi+RLTlqtLNxPIiKzdOdUmV2kP+D X-Received: by 10.37.165.8 with SMTP id h8mr7369341ybi.113.1492202485931; Fri, 14 Apr 2017 13:41:25 -0700 (PDT) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.129.20.214 with HTTP; Fri, 14 Apr 2017 13:41:25 -0700 (PDT) In-Reply-To: <20170414202918.GD5039@wkstn-mjohnston.west.isilon.com> References: <201704141941.v3EJfmCW003347@repo.freebsd.org> <20170414202918.GD5039@wkstn-mjohnston.west.isilon.com> From: Alan Somers Date: Fri, 14 Apr 2017 14:41:25 -0600 X-Google-Sender-Auth: _BCSZgroLun7ev6CXaeVUzQSnTY Message-ID: Subject: Re: svn commit: r316938 - head/sbin/savecore To: Mark Johnston Cc: Ngie Cooper , "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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 20:41:28 -0000 On Fri, Apr 14, 2017 at 2:29 PM, Mark Johnston wrote: > On Fri, Apr 14, 2017 at 01:49:51PM -0600, Alan Somers wrote: >> On Fri, Apr 14, 2017 at 1:41 PM, Ngie Cooper wrote: >> > Author: ngie >> > Date: Fri Apr 14 19:41:48 2017 >> > New Revision: 316938 >> > URL: https://svnweb.freebsd.org/changeset/base/316938 >> > >> > Log: >> > savecore: fix space calculation with respect to `minfree` in check_space(..) >> > >> > - Use strtoll(3) instead of atoi(3), because atoi(3) limits the >> > representable data to INT_MAX. Check the values received from >> > strtoll(3), trimming trailing whitespace off the end to maintain >> > POLA. >> > - Use `KiB` instead of `kB` when describing free space, total space, >> > etc. I am now fully aware of `KiB` being the IEC standard for 1024 >> > bytes and `kB` being the IEC standard for 1000 bytes. >> > - Store available number of KiB in `available` so it can be more >> > easily queried and compared to ensure that there are enough KiB to >> > store the dump image on disk. >> > - Print out the reserved space on disk, per `minfree`, so end-users >> > can troubleshoot why check_space(..) is reporting that there isn't >> > enough free space. >> > >> > MFC after: 7 weeks >> > Reviewed by: Anton Rang (earlier diff), cem (earlier diff) >> > Tested with: positive/negative cases (see review); make tinderbox >> > Sponsored by: Dell EMC Isilon >> > Differential Revision: D10379 >> >> The free space calculation is still uselessly conservative, because it >> doesn't account for the fact that core dumps will always be either >> spare or compressed. The result is that savecore will frequently >> refuse to save corefiles even when there's plenty of space. I >> proposed removing the space check altogether in >> https://reviews.freebsd.org/D2587. However, I agreed to wait until >> after the compressed core dump feature was merged, because then mostly >> accurate space checks will be possible. AFAIK the compressed core >> dump feature still hasn't been finished. > > I had held off on it for a while because it was going to conflict with > the work to add encrypted dump support, which of course has finished. > > The patch to add compression support is here and should largely still > work: > https://people.freebsd.org/~markj/patches/core-compression/20141110-kern_dump.diff > > I've been hesitant about pushing it forward: > - The dump_write* APIs need some simplification after the addition of > encrypted dump support and support for dumping to 4Kn drives. > - I'm not sure how encryption should compose with compression. It seems > intuitively obvious that we should compress before encrypting if the > compression is to be of any use, but I don't know enough to know > whether the compression might somehow compromise the effectiveness of > the encryption. > > If anyone has some insight on the second of these two points, I'd > appreciate hearing it. I think compress then encrypt should be ok. AFAIK all attacks against compress-then-encrypt systems have involved either incredibly short payloads that are easy to guess, or a stream of separately compressed blocks that can be fingerprinted. But core dumps are very long, and they can't be fingerprinted in whole because they're unique. If you were to encrypt each page individually then pages could be fingerprinted, so don't do that. Instead, compress the entire core dump as a single stream and you should be ok. -Alan From owner-svn-src-head@freebsd.org Fri Apr 14 20:42:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1838D3AB96; Fri, 14 Apr 2017 20:42:22 +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 7EA178C4; Fri, 14 Apr 2017 20:42:22 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1cz82t-000AqM-AD; Fri, 14 Apr 2017 23:42:19 +0300 Date: Fri, 14 Apr 2017 23:42:19 +0300 From: Slawa Olhovchenkov To: "Ngie Cooper (yaneurabeya)" Cc: Larry Rosenman , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Ngie Cooper , Alan Somers Subject: Re: svn commit: r316938 - head/sbin/savecore Message-ID: <20170414204219.GB70430@zxy.spb.ru> References: <201704141941.v3EJfmCW003347@repo.freebsd.org> <20170414201431.GF20974@zxy.spb.ru> <0CAE4B1C-228B-4C71-86E9-4337753DFF74@lerctr.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 20:42:22 -0000 On Fri, Apr 14, 2017 at 01:33:36PM -0700, Ngie Cooper (yaneurabeya) wrote: > > > On Apr 14, 2017, at 13:26, Larry Rosenman wrote: > > > > On 4/14/17, 3:19 PM, "Ngie Cooper (yaneurabeya)" wrote: > > > >> On Apr 14, 2017, at 13:14, Slawa Olhovchenkov wrote: > >> > >> On Fri, Apr 14, 2017 at 01:49:51PM -0600, Alan Somers wrote: > >> > >>> On Fri, Apr 14, 2017 at 1:41 PM, Ngie Cooper wrote: > >>>> Author: ngie > >>>> Date: Fri Apr 14 19:41:48 2017 > >>>> New Revision: 316938 > >>>> URL: https://svnweb.freebsd.org/changeset/base/316938 > >>>> > >>>> Log: > >>>> savecore: fix space calculation with respect to `minfree` in check_space(..) > >>>> > >>>> - Use strtoll(3) instead of atoi(3), because atoi(3) limits the > >>>> representable data to INT_MAX. Check the values received from > >>>> strtoll(3), trimming trailing whitespace off the end to maintain > >>>> POLA. > >>>> - Use `KiB` instead of `kB` when describing free space, total space, > >>>> etc. I am now fully aware of `KiB` being the IEC standard for 1024 > >>>> bytes and `kB` being the IEC standard for 1000 bytes. > >>>> - Store available number of KiB in `available` so it can be more > >>>> easily queried and compared to ensure that there are enough KiB to > >>>> store the dump image on disk. > >>>> - Print out the reserved space on disk, per `minfree`, so end-users > >>>> can troubleshoot why check_space(..) is reporting that there isn't > >>>> enough free space. > >>>> > >>>> MFC after: 7 weeks > >>>> Reviewed by: Anton Rang (earlier diff), cem (earlier diff) > >>>> Tested with: positive/negative cases (see review); make tinderbox > >>>> Sponsored by: Dell EMC Isilon > >>>> Differential Revision: D10379 > >>> > >>> The free space calculation is still uselessly conservative, because it > >>> doesn't account for the fact that core dumps will always be either > >>> spare or compressed. The result is that savecore will frequently > >>> refuse to save corefiles even when there's plenty of space. I > >>> proposed removing the space check altogether in > >>> https://reviews.freebsd.org/D2587. However, I agreed to wait until > >>> after the compressed core dump feature was merged, because then mostly > >>> accurate space checks will be possible. AFAIK the compressed core > >>> dump feature still hasn't been finished. > >> > >> Is posible (in the future) to use multiple swaps (on multiple disks) > >> for save core dumps? > > > > Multiple swap devices is already handled by savecore(8), if one uses fstab(5) or dumpon(8). Otherwise, you must invoke savecore(8) on individual devices. > > > > As far as saving to multiple disks is concerned, I would hope that one is using a redundancy capable filesystem (zfs) or RAID-like technology (gmirror, graid, LSI Fusion’s RAID product line) to stripe and/or mirror the data across multiple disks. > > … > > > How do I use multiple devices to have the system dump on all of my swap? I got a message about not enough space, but there (I think) was enough between multiple drives…. > > Something like: > > - Create a zpool > - Mount zpool to /crashdumps > - Change dumpdir in /etc/rc.conf to be /crashdumps, e.g., echo ‘dumpdir=/crashdumps’ > > ? No, something like: % swapinfo Device 1K-blocks Used Avail Capacity /dev/ada0p2 33554432 0 33554432 0% /dev/ada1p2 33554432 0 33554432 0% Total 67108864 0 67108864 0% > > PS The issue with lack of space might be the issue that Alan brought up earlier with compressed dumps and overly conservative free space checks, or it might be the fact that dumpdir (default: /var/crash) is full. From owner-svn-src-head@freebsd.org Fri Apr 14 20:44:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D6BAD3ACC8; Fri, 14 Apr 2017 20:44:04 +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 77500A8B; Fri, 14 Apr 2017 20:44:04 +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=Content-transfer-encoding:Content-type:Mime-version:In-Reply-To: References:Message-ID:CC:To:From:Subject:Date: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=VD2ICm0DhFwAuihFl/K9aLXlSBiBeBQz+AZiLt8g++g=; b=WW4vNruYl+NmKrjTiIGggu1mKQ cMQFyAkGVY+0sGfy9F13trfO0MJ9S5qxZrJuqlnaljyGLamRubMnP1FDCTjV0JOWzQF2Snq6iEVIU N/OgCMsXUmmy4BDbeQHnPdH9Q09Mckq+Q/q81TBJi6AMOY1nETPqBGwpa3JSJ4/f6E30=; Received: from [74.203.163.58] (port=22830 helo=[10.106.10.41]) by thebighonker.lerctr.org with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89 (FreeBSD)) (envelope-from ) id 1cz84Z-000Ifi-Rl; Fri, 14 Apr 2017 15:44:03 -0500 User-Agent: Microsoft-MacOutlook/f.21.0.170409 Date: Fri, 14 Apr 2017 15:43:34 -0500 Subject: Re: svn commit: r316938 - head/sbin/savecore From: Larry Rosenman To: "Ngie Cooper (yaneurabeya)" CC: "src-committers@freebsd.org" , Alan Somers , "svn-src-all@freebsd.org" , Slawa Olhovchenkov , "svn-src-head@freebsd.org" , Ngie Cooper Message-ID: Thread-Topic: svn commit: r316938 - head/sbin/savecore References: <201704141941.v3EJfmCW003347@repo.freebsd.org> <20170414201431.GF20974@zxy.spb.ru> <0CAE4B1C-228B-4C71-86E9-4337753DFF74@lerctr.org> <12820BAB-D8BA-4EDE-89BC-4BDB56B1E57A@gmail.com> In-Reply-To: <12820BAB-D8BA-4EDE-89BC-4BDB56B1E57A@gmail.com> Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 20:44:04 -0000 On 4/14/17, 3:39 PM, "Ngie Cooper (yaneurabeya)" wrote: =20 > On Apr 14, 2017, at 13:37, Larry Rosenman wrote: >=20 > On 4/14/17, 3:33 PM, "Ngie Cooper (yaneurabeya)" wrote: >=20 >> On Apr 14, 2017, at 13:26, Larry Rosenman wrote: >>=20 >> On 4/14/17, 3:19 PM, "Ngie Cooper (yaneurabeya)" wrote: >>=20 >>> On Apr 14, 2017, at 13:14, Slawa Olhovchenkov wrot= e: >>>=20 >>> On Fri, Apr 14, 2017 at 01:49:51PM -0600, Alan Somers wrote: >>>=20 >>>> On Fri, Apr 14, 2017 at 1:41 PM, Ngie Cooper wr= ote: >>>>> Author: ngie >>>>> Date: Fri Apr 14 19:41:48 2017 >>>>> New Revision: 316938 >>>>> URL: https://svnweb.freebsd.org/changeset/base/316938 >>>>>=20 >>>>> Log: >>>>> savecore: fix space calculation with respect to `minfree` in chec= k_space(..) >>>>>=20 >>>>> - Use strtoll(3) instead of atoi(3), because atoi(3) limits the >>>>> representable data to INT_MAX. Check the values received from >>>>> strtoll(3), trimming trailing whitespace off the end to maintain >>>>> POLA. >>>>> - Use `KiB` instead of `kB` when describing free space, total spa= ce, >>>>> etc. I am now fully aware of `KiB` being the IEC standard for 10= 24 >>>>> bytes and `kB` being the IEC standard for 1000 bytes. >>>>> - Store available number of KiB in `available` so it can be more >>>>> easily queried and compared to ensure that there are enough KiB = to >>>>> store the dump image on disk. >>>>> - Print out the reserved space on disk, per `minfree`, so end-use= rs >>>>> can troubleshoot why check_space(..) is reporting that there isn= 't >>>>> enough free space. >>>>>=20 >>>>> MFC after: 7 weeks >>>>> Reviewed by: Anton Rang (earlier diff), cem (earl= ier diff) >>>>> Tested with: positive/negative cases (see review); make tinderbo= x >>>>> Sponsored by: Dell EMC Isilon >>>>> Differential Revision: D10379 >>>>=20 >>>> The free space calculation is still uselessly conservative, becaus= e it >>>> doesn't account for the fact that core dumps will always be either >>>> spare or compressed. The result is that savecore will frequently >>>> refuse to save corefiles even when there's plenty of space. I >>>> proposed removing the space check altogether in >>>> https://reviews.freebsd.org/D2587. However, I agreed to wait unti= l >>>> after the compressed core dump feature was merged, because then mo= stly >>>> accurate space checks will be possible. AFAIK the compressed core >>>> dump feature still hasn't been finished. >>>=20 >>> Is posible (in the future) to use multiple swaps (on multiple disks= ) >>> for save core dumps? >>=20 >> Multiple swap devices is already handled by savecore(8), if one us= es fstab(5) or dumpon(8). Otherwise, you must invoke savecore(8) on individu= al devices. >>=20 >> As far as saving to multiple disks is concerned, I would hope that= one is using a redundancy capable filesystem (zfs) or RAID-like technology = (gmirror, graid, LSI Fusion=E2=80=99s RAID product line) to stripe and/or mirror t= he data across multiple disks. >=20 > =E2=80=A6 >=20 >> How do I use multiple devices to have the system dump on all of my s= wap? I got a message about not enough space, but there (I think) was enough= between multiple drives=E2=80=A6. >=20 > Something like: >=20 > - Create a zpool > - Mount zpool to /crashdumps > - Change dumpdir in /etc/rc.conf to be /crashdumps, e.g., echo =E2=80=98= dumpdir=3D/crashdumps=E2=80=99 >=20 > ? > HTH, > -Ngie >=20 > PS The issue with lack of space might be the issue that Alan broug= ht up earlier with compressed dumps and overly conservative free space check= s, or it might be the fact that dumpdir (default: /var/crash) is full. >=20 >=20 > I was talking about the actual crashdump to swap by the system. /var= /crash has 10T of space (my root pool). =20 If your memory is bigger than your swap, you=E2=80=99re unfortunately not abl= e to save the mini dump if the size of the saved pages exceed the space on s= wap. I think this is where markj=E2=80=99s compressed dumps feature will come in h= andy. Thanks! -Ngie Yeah, I have the following: borg.lerctr.org /home/ler $ swapctl -l Device: 1024-blocks Used: /dev/mfid0p3 8388608 0 /dev/mfid1p3 8388608 0 /dev/mfid2p3 8388608 0 /dev/mfid3p3 8388608 0 /dev/mfid4p3 8388608 0 /dev/mfid5p3 8388608 0 borg.lerctr.org /home/ler $ sysctl hw.physmem hw.physmem: 137368682496 borg.lerctr.org /home/ler $ SO 6 8G partitions (48G), but the dump is larger than 8G.=20 =20 From owner-svn-src-head@freebsd.org Fri Apr 14 20:45:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 243DAD3AD49; Fri, 14 Apr 2017 20:45:25 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x241.google.com (mail-pg0-x241.google.com [IPv6:2607:f8b0:400e:c05::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 E1A8BBF6; Fri, 14 Apr 2017 20:45:24 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x241.google.com with SMTP id 63so4731264pgh.0; Fri, 14 Apr 2017 13:45:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=2WaHE29vm44UIcg18q6Pcav3tJytdv0guw+NIYZ6WK4=; b=iK+9DBFUnn2xgiN5YgchU+3X2sEo8kYUzNZmjPVQh4PZaxoyN2YdSzsplqddD5AnO4 zv8qA+OwfN8hqebhxfCBwAL7uBdeXQjSF0eJB/Jx6FYtAzizLvt3LbsL0huOTLfHGD5k Hm31iAeDcJjl3Veeetj5J3KRr6CjkuFDnnbJFZneLuKzbv6wCZVZeKtzLcA2IDG8MbrA 7j8UMf0Nlfs5zeIeHbvk1saQAkwnox36mvA2sHsUzOdc9zUZAJTDAoUzUungZYkVqPgo NSkAuyB4bgNUHPHcjq3owXoi+CnJnlIpLW+ow0gTHsPDWjgpH0j1CgV4ztWUQa4gEaq2 isbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=2WaHE29vm44UIcg18q6Pcav3tJytdv0guw+NIYZ6WK4=; b=KFTs2DeEyNdmlSJuFhQs07N7xamiqO14QXKygXAxUMVkTZjsMkjBMAfCU9gmWRbYU9 PVe3W0cexw/D9QP/nCRQLJ6mdobJixyG+dTX5gunoppXvkNNUsUdY+zyuCL+koGrOz1C vT0bj3S4Rh0kxCOMUApAqDnhuSdfaf/cghMB6MdPRFBe5nS+hOldZEU6xp9R2TbtGgEx 2BT0Ja0eaBLnpMcXmEOLZ1iQaDKiDC4Zk1TNOFAMIyBIZz9tJZrVXxPn4mxR3rnSvyXQ ZhH1Bd8+PyqzYN/B4iXKr5VQ9mhelqv5hGFpn43k83CX2whlf2HEDhcgWDFprmmdvnPW wYrg== X-Gm-Message-State: AN3rC/5Us/6dwQkmWJSniA9YEUmaD0fMGS7PPw1a5VS+kEKf+vsHp+Zb IIg7coapPixB7A== X-Received: by 10.84.128.47 with SMTP id 44mr10976100pla.35.1492202724482; Fri, 14 Apr 2017 13:45:24 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id j4sm4771390pfk.91.2017.04.14.13.45.22 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Apr 2017 13:45:23 -0700 (PDT) Subject: Re: svn commit: r316938 - head/sbin/savecore Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_686C0686-354A-4705-A42A-46B7ACB999BC"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <20170414204219.GB70430@zxy.spb.ru> Date: Fri, 14 Apr 2017 13:45:22 -0700 Cc: Larry Rosenman , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Ngie Cooper , Alan Somers Message-Id: <5B71CE05-0791-4D90-A457-EA251F3989D2@gmail.com> References: <201704141941.v3EJfmCW003347@repo.freebsd.org> <20170414201431.GF20974@zxy.spb.ru> <0CAE4B1C-228B-4C71-86E9-4337753DFF74@lerctr.org> <20170414204219.GB70430@zxy.spb.ru> To: Slawa Olhovchenkov X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 20:45:25 -0000 --Apple-Mail=_686C0686-354A-4705-A42A-46B7ACB999BC Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Apr 14, 2017, at 13:42, Slawa Olhovchenkov wrote: =E2=80=A6 > No, something like: > % swapinfo > Device 1K-blocks Used Avail Capacity > /dev/ada0p2 33554432 0 33554432 0% > /dev/ada1p2 33554432 0 33554432 0% > Total 67108864 0 67108864 0% Striping dumps across multiple swap devices isn=E2=80=99t supported. = Sorry. -Ngie --Apple-Mail=_686C0686-354A-4705-A42A-46B7ACB999BC 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----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJY8TTiAAoJEPWDqSZpMIYVFY0P/01YafKD3OXv9rrhvHwaUCJ4 7ZKiOFZVNuneiV+xci0Qj8JhRBAuylGY0i9Rtn3/5Dz2NFpu9H3CBmxsrK37ljtW G7zac5RIbsoGakOs1J81TMeWF10xhJgUScN+Ub+CrZkKDT6Rvojd3zKfwhQc0qps 8KFPv5bzubO7rHzzZK4eGFJGWTT9WCgDU5E8m690gdHf/A+CDALM4kSZloR5yI11 0KYmp6u7j3EvM5AuO7Rw9km7cj0a2IOJ1/YpkrlDzkKgpNIelprBOK5nSAL6OHSj k4smT+b2/jeyH7xrsMI3qBgxIB0vN7h8KQNc2+wR5Jm0TFwaMi9R9PB5U5WTKcc7 TcouvqckPkkhHCbdyB+t8F7EVSceqlObA2RGxfFH5D1ccHzzZQS8mhVTO85Z4oRI eDC6ujE4HIagYPNXv3KMeb1RtX2pS060ZO5XoOP68lLTdSj5WLN6QlaYpCaYFLxB VUIEzmi8rNVUD0/hLRyIuI9KBZCbSg20QaGRi3xe/eB6uxJMhhmMGnwwxb25xjyh sGB7d43t9x6RNEQVmZhm4ev73DAF9ni0PtTikZ5hxWjiyAyEBe3W//+f7WRWqtRK h3U3ksJ1RXh89KFDHkLstDfxtBxOwTHhv2F1gR01/FfBy60OmkaoEZ9qewN/sKh2 K8/HHR9oCnuZEmjZbpyI =3eC1 -----END PGP SIGNATURE----- --Apple-Mail=_686C0686-354A-4705-A42A-46B7ACB999BC-- From owner-svn-src-head@freebsd.org Fri Apr 14 20:46:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01E40D3ADE8; Fri, 14 Apr 2017 20:46:46 +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 B3993D50; Fri, 14 Apr 2017 20:46:45 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1cz878-000Aux-To; Fri, 14 Apr 2017 23:46:42 +0300 Date: Fri, 14 Apr 2017 23:46:42 +0300 From: Slawa Olhovchenkov To: "Ngie Cooper (yaneurabeya)" Cc: Larry Rosenman , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Ngie Cooper , Alan Somers Subject: Re: svn commit: r316938 - head/sbin/savecore Message-ID: <20170414204642.GC70430@zxy.spb.ru> References: <201704141941.v3EJfmCW003347@repo.freebsd.org> <20170414201431.GF20974@zxy.spb.ru> <0CAE4B1C-228B-4C71-86E9-4337753DFF74@lerctr.org> <20170414204219.GB70430@zxy.spb.ru> <5B71CE05-0791-4D90-A457-EA251F3989D2@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5B71CE05-0791-4D90-A457-EA251F3989D2@gmail.com> 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 20:46:46 -0000 On Fri, Apr 14, 2017 at 01:45:22PM -0700, Ngie Cooper (yaneurabeya) wrote: > > > On Apr 14, 2017, at 13:42, Slawa Olhovchenkov wrote: > > … > > > No, something like: > > % swapinfo > > Device 1K-blocks Used Avail Capacity > > /dev/ada0p2 33554432 0 33554432 0% > > /dev/ada1p2 33554432 0 33554432 0% > > Total 67108864 0 67108864 0% > > Striping dumps across multiple swap devices isn’t supported. Sorry. What about support in the future? From owner-svn-src-head@freebsd.org Fri Apr 14 20:46:51 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC2AFD3AE36; Fri, 14 Apr 2017 20:46:51 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x244.google.com (mail-pf0-x244.google.com [IPv6:2607:f8b0:400e:c00::244]) (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 A386CD98; Fri, 14 Apr 2017 20:46:51 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x244.google.com with SMTP id i5so16482288pfc.3; Fri, 14 Apr 2017 13:46:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=8BWiGTiW0VOVw6dRH/rMAUFkS4N3ARiMg1FyOTVnKn8=; b=IjqSuRymmJcPpTXp86aYz02cxnxBhFi3SE75ZmmNZcM/oJvPFL87B5PiANktf/kvJ4 UbC/DnrWxSt34wP67ltRiviGaAiyBWo7P/Y56Zo33rgpH7uNeeK3+v0YBkYH7Y6zwaHw w318Zxp8F7BIs09AZarkUtkIken8aGkO/DpGs7YCBDWt53zyzjFOK0mGimzVdG0CCsaN GI0LsD4YXmdKD8LHDs1/sF8UlUn6y+ogoIFryjOyrEQfkDtBmNgUAYO84VsymSlkIfNc EJ2KhaRrhpxnFs1la7hwu8VVVJb9RvXhUCWElYE+FTYDj7aNdNqYGpgFpNfRs4TwwX/E Dh8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=8BWiGTiW0VOVw6dRH/rMAUFkS4N3ARiMg1FyOTVnKn8=; b=RUN5A/Wds4ojq1HFGEgktWzr3WbiDOhdSqYO9d0D1UJ0N5Eqf/tI4dzl7jn9q831Bw MMss7/1yhs8zTUoB12YyS5JxRNBrYeBpnJuPjrWh2V16LhoFcuKjeJn+3O9TQ00PB8jU HnG8zWGu6TH5gKYdF2X5ewi7RQI7tB20Uyjt3dcJEUAStw7YAREf5i6UL4BoxA6hzN94 HHjz2c2VGBG1MsIFQbg0gHwEvbaOciyw04uZbRYTKttwyqnOe2GfEe5Od0kiI7LolI/t W7ejudmYCuH+IgPBy7XPVXfO18QTmvMRQ17rASHqMaL3BxuReFUdzaCoXYTnzgvJjUDu TIsQ== X-Gm-Message-State: AN3rC/7XO+VjfUjTuyyDc8CYjRQ/fUb1J9n68ojRsc8U594/HupEzjP3 GndwswhuD6w5oQ== X-Received: by 10.98.214.12 with SMTP id r12mr8621067pfg.204.1492202811246; Fri, 14 Apr 2017 13:46:51 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id p11sm4806807pfl.4.2017.04.14.13.46.49 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Apr 2017 13:46:49 -0700 (PDT) Subject: Re: svn commit: r316938 - head/sbin/savecore Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_A2F74109-396E-4EE1-B8D1-4DB860669382"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: Date: Fri, 14 Apr 2017 13:46:49 -0700 Cc: "src-committers@freebsd.org" , Alan Somers , "svn-src-all@freebsd.org" , Slawa Olhovchenkov , "svn-src-head@freebsd.org" , Ngie Cooper Message-Id: <15ABDD42-E2C4-4519-B736-04A56FA8C2D0@gmail.com> References: <201704141941.v3EJfmCW003347@repo.freebsd.org> <20170414201431.GF20974@zxy.spb.ru> <0CAE4B1C-228B-4C71-86E9-4337753DFF74@lerctr.org> <12820BAB-D8BA-4EDE-89BC-4BDB56B1E57A@gmail.com> To: Larry Rosenman X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 20:46:52 -0000 --Apple-Mail=_A2F74109-396E-4EE1-B8D1-4DB860669382 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Apr 14, 2017, at 13:43, Larry Rosenman wrote: >=20 > On 4/14/17, 3:39 PM, "Ngie Cooper (yaneurabeya)" = = wrote: >=20 >> On Apr 14, 2017, at 13:37, Larry Rosenman wrote: >>=20 >> On 4/14/17, 3:33 PM, "Ngie Cooper (yaneurabeya)" = wrote: >>=20 >>> On Apr 14, 2017, at 13:26, Larry Rosenman wrote: >>>=20 >>> On 4/14/17, 3:19 PM, "Ngie Cooper (yaneurabeya)" = = wrote: >>>=20 >>>> On Apr 14, 2017, at 13:14, Slawa Olhovchenkov = wrote: >>>>=20 >>>> On Fri, Apr 14, 2017 at 01:49:51PM -0600, Alan Somers wrote: >>>>=20 >>>>> On Fri, Apr 14, 2017 at 1:41 PM, Ngie Cooper = wrote: >>>>>> Author: ngie >>>>>> Date: Fri Apr 14 19:41:48 2017 >>>>>> New Revision: 316938 >>>>>> URL: https://svnweb.freebsd.org/changeset/base/316938 >>>>>>=20 >>>>>> Log: >>>>>> savecore: fix space calculation with respect to `minfree` in = check_space(..) >>>>>>=20 >>>>>> - Use strtoll(3) instead of atoi(3), because atoi(3) limits the >>>>>> representable data to INT_MAX. Check the values received from >>>>>> strtoll(3), trimming trailing whitespace off the end to maintain >>>>>> POLA. >>>>>> - Use `KiB` instead of `kB` when describing free space, total = space, >>>>>> etc. I am now fully aware of `KiB` being the IEC standard for = 1024 >>>>>> bytes and `kB` being the IEC standard for 1000 bytes. >>>>>> - Store available number of KiB in `available` so it can be more >>>>>> easily queried and compared to ensure that there are enough KiB = to >>>>>> store the dump image on disk. >>>>>> - Print out the reserved space on disk, per `minfree`, so = end-users >>>>>> can troubleshoot why check_space(..) is reporting that there = isn't >>>>>> enough free space. >>>>>>=20 >>>>>> MFC after: 7 weeks >>>>>> Reviewed by: Anton Rang (earlier diff), cem = (earlier diff) >>>>>> Tested with: positive/negative cases (see review); make = tinderbox >>>>>> Sponsored by: Dell EMC Isilon >>>>>> Differential Revision: D10379 >>>>>=20 >>>>> The free space calculation is still uselessly conservative, = because it >>>>> doesn't account for the fact that core dumps will always be either >>>>> spare or compressed. The result is that savecore will frequently >>>>> refuse to save corefiles even when there's plenty of space. I >>>>> proposed removing the space check altogether in >>>>> https://reviews.freebsd.org/D2587. However, I agreed to wait = until >>>>> after the compressed core dump feature was merged, because then = mostly >>>>> accurate space checks will be possible. AFAIK the compressed core >>>>> dump feature still hasn't been finished. >>>>=20 >>>> Is posible (in the future) to use multiple swaps (on multiple = disks) >>>> for save core dumps? >>>=20 >>> Multiple swap devices is already handled by savecore(8), if one = uses fstab(5) or dumpon(8). Otherwise, you must invoke savecore(8) on = individual devices. >>>=20 >>> As far as saving to multiple disks is concerned, I would hope that = one is using a redundancy capable filesystem (zfs) or RAID-like = technology (gmirror, graid, LSI Fusion=E2=80=99s RAID product line) to = stripe and/or mirror the data across multiple disks. >>=20 >> =E2=80=A6 >>=20 >>> How do I use multiple devices to have the system dump on all of my = swap? I got a message about not enough space, but there (I think) was = enough between multiple drives=E2=80=A6. >>=20 >> Something like: >>=20 >> - Create a zpool >> - Mount zpool to /crashdumps >> - Change dumpdir in /etc/rc.conf to be /crashdumps, e.g., echo = =E2=80=98dumpdir=3D/crashdumps=E2=80=99 >>=20 >> ? >> HTH, >> -Ngie >>=20 >> PS The issue with lack of space might be the issue that Alan = brought up earlier with compressed dumps and overly conservative free = space checks, or it might be the fact that dumpdir (default: /var/crash) = is full. >>=20 >>=20 >> I was talking about the actual crashdump to swap by the system. = /var/crash has 10T of space (my root pool). >=20 > If your memory is bigger than your swap, you=E2=80=99re = unfortunately not able to save the mini dump if the size of the saved = pages exceed the space on swap. I think this is where markj=E2=80=99s = compressed dumps feature will come in handy. > Thanks! > -Ngie >=20 >=20 > Yeah, I have the following: > borg.lerctr.org /home/ler $ swapctl -l > Device: 1024-blocks Used: > /dev/mfid0p3 8388608 0 > /dev/mfid1p3 8388608 0 > /dev/mfid2p3 8388608 0 > /dev/mfid3p3 8388608 0 > /dev/mfid4p3 8388608 0 > /dev/mfid5p3 8388608 0 > borg.lerctr.org /home/ler $ sysctl hw.physmem > hw.physmem: 137368682496 > borg.lerctr.org /home/ler $ >=20 > SO 6 8G partitions (48G), but the dump is larger than 8G. Yup, that=E2=80=99s not going to work. Since you=E2=80=99re using = mfi(4), I=E2=80=99d try creating another 48GB large RAID-0 volume to = help deal with that issue. Cheers, -Ngie --Apple-Mail=_A2F74109-396E-4EE1-B8D1-4DB860669382 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----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJY8TU5AAoJEPWDqSZpMIYV/ZsP/R26qszjM8/4ZKtWuVhoNk5x fqKWa2SccHz3QgKomh13v92Yi+omgxUKxjrG3hoya0gs3ijDuAATu0ulbgp6NMMe a874IZZ+vZ6LxBS0+r3urcurqp26vmBDwqIj7OEC2IY7l6gmbErhAwbwLspJs06w tS1xxsmE7SSXnVMmUPHR5HAE/mLcMtI1evLZfHOoI7e6gHqtCSfDuA8od8UZDQse v7s1jdGJPIyRqifnTahrvx6nKEUU1zd3p2zCundIOARiIviCfNWHJyJ91SvQlIte cL8F2dvGhw6ORSRvKfj/45W0si/20vXT/3H/sNB2r3MQmWjGKx9jQhWPJgYrQoW7 ZiDFt6bBTeNmiiWCJijjCpLJM64dE4zjZ1rXx5YRgxPrasnVknE1MPNd93OTq/FB OuWA26NDPvzMRrAnjSKSxiEjUmkLtlbGzOJt7ekRqMjDl3GkJRheBTJblaMW1n1I qr4+G++kvWiuxBpmtW8tZlBRnEKLEEyiAU9MGi+WqzzM0pvovJa+/NfeBpV+NwUN RBrvhSEOOevBCSN5821BMfkwVt42ozwINLHyg6vkV+MgR4wZ8jEfz8Ns61ChtRX5 gb19gawJcIw4VrB8dp3Z1gXHLoK/nbFBlpycM14GUOiLxG9dLFY7pIjBrlM9+jjX lXzqkxuEqsjnRjqUXnQP =O4ss -----END PGP SIGNATURE----- --Apple-Mail=_A2F74109-396E-4EE1-B8D1-4DB860669382-- From owner-svn-src-head@freebsd.org Fri Apr 14 20:47:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33613D3AF71; Fri, 14 Apr 2017 20:47:59 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.81]) (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 EFFF4AD; Fri, 14 Apr 2017 20:47:57 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smtp.greenhost.nl ([213.108.104.138]) by smarthost1.greenhost.nl with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1cz88I-0005S3-Li; Fri, 14 Apr 2017 22:47:55 +0200 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: "Alan Somers" , "Mark Johnston" Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , "Ngie Cooper" Subject: Re: svn commit: r316938 - head/sbin/savecore References: <201704141941.v3EJfmCW003347@repo.freebsd.org> <20170414202918.GD5039@wkstn-mjohnston.west.isilon.com> Date: Fri, 14 Apr 2017 22:47:53 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Ronald Klop" Message-ID: In-Reply-To: <20170414202918.GD5039@wkstn-mjohnston.west.isilon.com> User-Agent: Opera Mail/12.16 (FreeBSD) X-Authenticated-As-Hash: 398f5522cb258ce43cb679602f8cfe8b62a256d1 X-Virus-Scanned: by clamav at smarthost1.samage.net X-Spam-Level: / X-Spam-Score: -0.2 X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 autolearn=disabled version=3.4.0 X-Scan-Signature: 4868b52b90b9144be14ceb212c82ef23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 20:47:59 -0000 On Fri, 14 Apr 2017 22:29:18 +0200, Mark Johnston wrote: > On Fri, Apr 14, 2017 at 01:49:51PM -0600, Alan Somers wrote: >> On Fri, Apr 14, 2017 at 1:41 PM, Ngie Cooper wrote: >> > Author: ngie >> > Date: Fri Apr 14 19:41:48 2017 >> > New Revision: 316938 >> > URL: https://svnweb.freebsd.org/changeset/base/316938 >> > >> > Log: >> > savecore: fix space calculation with respect to `minfree` in >> check_space(..) >> > >> > - Use strtoll(3) instead of atoi(3), because atoi(3) limits the >> > representable data to INT_MAX. Check the values received from >> > strtoll(3), trimming trailing whitespace off the end to maintain >> > POLA. >> > - Use `KiB` instead of `kB` when describing free space, total space, >> > etc. I am now fully aware of `KiB` being the IEC standard for 1024 >> > bytes and `kB` being the IEC standard for 1000 bytes. >> > - Store available number of KiB in `available` so it can be more >> > easily queried and compared to ensure that there are enough KiB to >> > store the dump image on disk. >> > - Print out the reserved space on disk, per `minfree`, so end-users >> > can troubleshoot why check_space(..) is reporting that there isn't >> > enough free space. >> > >> > MFC after: 7 weeks >> > Reviewed by: Anton Rang (earlier diff), cem >> (earlier diff) >> > Tested with: positive/negative cases (see review); make tinderbox >> > Sponsored by: Dell EMC Isilon >> > Differential Revision: D10379 >> >> The free space calculation is still uselessly conservative, because it >> doesn't account for the fact that core dumps will always be either >> spare or compressed. The result is that savecore will frequently >> refuse to save corefiles even when there's plenty of space. I >> proposed removing the space check altogether in >> https://reviews.freebsd.org/D2587. However, I agreed to wait until >> after the compressed core dump feature was merged, because then mostly >> accurate space checks will be possible. AFAIK the compressed core >> dump feature still hasn't been finished. > > I had held off on it for a while because it was going to conflict with > the work to add encrypted dump support, which of course has finished. > > The patch to add compression support is here and should largely still > work: > https://people.freebsd.org/~markj/patches/core-compression/20141110-kern_dump.diff > > I've been hesitant about pushing it forward: > - The dump_write* APIs need some simplification after the addition of > encrypted dump support and support for dumping to 4Kn drives. > - I'm not sure how encryption should compose with compression. It seems > intuitively obvious that we should compress before encrypting if the > compression is to be of any use, but I don't know enough to know > whether the compression might somehow compromise the effectiveness of > the encryption. > > If anyone has some insight on the second of these two points, I'd > appreciate hearing it. About compression before encryption there is some information. For example: https://en.wikipedia.org/wiki/CRIME Openssh removed compression in pre-authentication in http://www.openssh.com/txt/release-7.4 Regards, Ronald. From owner-svn-src-head@freebsd.org Fri Apr 14 20:48:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4AAEDD3AFFF; Fri, 14 Apr 2017 20:48:20 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x244.google.com (mail-pf0-x244.google.com [IPv6:2607:f8b0:400e:c00::244]) (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 0445D280; Fri, 14 Apr 2017 20:48:20 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x244.google.com with SMTP id g23so1851842pfj.1; Fri, 14 Apr 2017 13:48:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=2/WXq9IIH1TBB3wberFA1DU/gs02HjPRE/sNCjaIgCA=; b=gtu2MidoEOcoySk0IZt/jpkrddSOzPYadgAYiewdrUUPRzjmTP8r+355G/UyjnDVFa gXU/O/Scj/BW/h2Or+tSrjvrwWi6TUmcGcDdRrW6n5xJPlh6zOrf4Ob6mU81M274/O+c tkjAdhHpZRakb88wpHy0GFTLC5V0J2Vbdo+m+bhRvN+wcpucox1AoakFxhhOGmUNns/u BnPPZw2AvWRZUF0wL+slJp3tQU2jiL2uMv0DRRX0ZeZk/NUboHW38lW35wn+Xv/8uqeQ /NAD16SRP3KmRMu+Ho0CBaAFJNxQ49Rfey6HOxBlwAUHe+RpiAMzfScXcvporqGCqP7o WBiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=2/WXq9IIH1TBB3wberFA1DU/gs02HjPRE/sNCjaIgCA=; b=XYh02dMtztlUozvCXeANJnepJF2ZN0re7gNNKvQu+shE+DA7AvNKbyy+DrB2MD0LJ1 IKnbZ2wrc3FPqRDMPlKmcrSN0vLu9W92nlbNlHjZYeg3Wp5a/O7IyEq/aeHfRrmG4ayp /avjj4Botebqeai2I5pmWxG+uPn5+B0TMNbnH5383F1xn6+8WuRxGPnqG1J2U3AS971T 08b4uKSEVnM7And4wam9VyCXFHGlzGYR/S6UyEkeu/M1dvVw92nb5uqW8itJ0DTeQxjT CHodCas0cbDypLDNt3gfySxLLGS5ZDR2Vm0BV/ZusOWQz5nX052JBpBx5Y47vjS2gKda aDTA== X-Gm-Message-State: AN3rC/7SnaO2HBblENagXlnN2URFWdEhtXXgIGRmbB0XH9L8eF7V2ppv cKAsqW66YMz2fQ== X-Received: by 10.98.141.216 with SMTP id p85mr4619336pfk.195.1492202899671; Fri, 14 Apr 2017 13:48:19 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id w23sm4787379pfa.84.2017.04.14.13.48.18 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Apr 2017 13:48:18 -0700 (PDT) Subject: Re: svn commit: r316938 - head/sbin/savecore Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_53E51C39-2BFA-4461-AA7B-BCEE9F52B13C"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <20170414204642.GC70430@zxy.spb.ru> Date: Fri, 14 Apr 2017 13:48:17 -0700 Cc: Larry Rosenman , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Ngie Cooper , Alan Somers Message-Id: <15897BA3-F2AC-40B0-9C71-5DC4E213309B@gmail.com> References: <201704141941.v3EJfmCW003347@repo.freebsd.org> <20170414201431.GF20974@zxy.spb.ru> <0CAE4B1C-228B-4C71-86E9-4337753DFF74@lerctr.org> <20170414204219.GB70430@zxy.spb.ru> <5B71CE05-0791-4D90-A457-EA251F3989D2@gmail.com> <20170414204642.GC70430@zxy.spb.ru> To: Slawa Olhovchenkov X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 20:48:20 -0000 --Apple-Mail=_53E51C39-2BFA-4461-AA7B-BCEE9F52B13C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Apr 14, 2017, at 13:46, Slawa Olhovchenkov wrote: >=20 > On Fri, Apr 14, 2017 at 01:45:22PM -0700, Ngie Cooper (yaneurabeya) = wrote: >=20 >>=20 >>> On Apr 14, 2017, at 13:42, Slawa Olhovchenkov = wrote: >>=20 >> =E2=80=A6 >>=20 >>> No, something like: >>> % swapinfo >>> Device 1K-blocks Used Avail Capacity >>> /dev/ada0p2 33554432 0 33554432 0% >>> /dev/ada1p2 33554432 0 33554432 0% >>> Total 67108864 0 67108864 0% >>=20 >> Striping dumps across multiple swap devices isn=E2=80=99t supported. = Sorry. >=20 > What about support in the future? *shrugs* I don=E2=80=99t have a crystal ball to say yay or nay, but = saving full dumps out to disk seems foolhardy to say the least. = Shrinking down the dataset seems like a more sensible problem to solve = than striping data across disks. -Ngie --Apple-Mail=_53E51C39-2BFA-4461-AA7B-BCEE9F52B13C 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----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJY8TWRAAoJEPWDqSZpMIYVyhsQAImJEM0imKHDWEZQW1yeYe4n Cy3zB6m3hcJYrgl4esoZorzz2sWspCKGalvG9zh6sexRt7tbn9jfyp9G+mUiStpM 2qTGSqKb/Fz7GowVRx9klQaonKLv9v3OPdH9ybqT5etJqlYz/qYZvrn5MW9mVZLh YSqsfrkzZjDfEsZGA72IdyA4oR+OIztN4DTRST6RsM7nj6UgpWKm6ABY+gEDM/cj 4fz2tdksKAg6Ke42/iaxmIpFSxV3cqEMUAORB9H+WUozI9LFqAvBaFrdeW33w1JJ nl5XaGSw751qgA2I1vjZjavsD8zJhzZ2o6akaCXcaoGarupjQvaM6O+99+HRt5Pn K6OvPFQy6B4fBY8UPtgeyXmdMgRnMdSJrle45ST4CfzuC6ZFAPjfhrH662sKfcTF 0oofcodvzVT0CapfB2yzlC9RH/Ok6aQ/CxykjkIAz5yl8sqCwK2Ga/WElqkFO4K4 D5dT8FHHHZzjekKhv2XcBY98keCNBNPtkVNjlFjU4+kO9rBnqAayq7mDYHNkhJgp 4dns+Rs+hpWoigsJ2AnFX8fuz3BB36YxJ7692+zYKPvU15KkrkbJCDtLAr77I5++ jrQi4udCHafZkGsl1jz2NMhsMRTHIP2s7RBtWvmQC6F7PPwgcP/FqFGACBUgBpCt bkHCpWsC35Vtz/cPwJ6Z =zdrZ -----END PGP SIGNATURE----- --Apple-Mail=_53E51C39-2BFA-4461-AA7B-BCEE9F52B13C-- From owner-svn-src-head@freebsd.org Fri Apr 14 20:48:36 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACEB4D3E06E; Fri, 14 Apr 2017 20:48:36 +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 780A03D3; Fri, 14 Apr 2017 20:48:36 +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=Content-transfer-encoding:Content-type:Mime-version:In-Reply-To: References:Message-ID:CC:To:From:Subject:Date: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=UDTZ+qx6i9G3JJzEIg+awJVN7S5+HgnqaL8gTSQpJyE=; b=FQE2oGRw1i1zV3aSNwHMbr2oOA T+dfQJnEb5CQ3nu75weBgzflpNUs+vjLLoBSGsk8nZVreFbscz4fh0GTdeX37COeFnU/08PNprysO snklbYgOuyLmrzDOF8Wvt1zP0LkzXkQcScWmE/I9M7X9ZBqy0KjelhHPC3FppNEsME8U=; Received: from [74.203.163.58] (port=3743 helo=[10.106.10.41]) by thebighonker.lerctr.org with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89 (FreeBSD)) (envelope-from ) id 1cz88x-000Izz-Rf; Fri, 14 Apr 2017 15:48:35 -0500 User-Agent: Microsoft-MacOutlook/f.21.0.170409 Date: Fri, 14 Apr 2017 15:48:06 -0500 Subject: Re: svn commit: r316938 - head/sbin/savecore From: Larry Rosenman To: "Ngie Cooper (yaneurabeya)" CC: "src-committers@freebsd.org" , Alan Somers , "svn-src-all@freebsd.org" , Slawa Olhovchenkov , "svn-src-head@freebsd.org" , Ngie Cooper Message-ID: <3D9A20AF-074F-494A-95FF-7A39CC964EA3@lerctr.org> Thread-Topic: svn commit: r316938 - head/sbin/savecore References: <201704141941.v3EJfmCW003347@repo.freebsd.org> <20170414201431.GF20974@zxy.spb.ru> <0CAE4B1C-228B-4C71-86E9-4337753DFF74@lerctr.org> <12820BAB-D8BA-4EDE-89BC-4BDB56B1E57A@gmail.com> <15ABDD42-E2C4-4519-B736-04A56FA8C2D0@gmail.com> In-Reply-To: <15ABDD42-E2C4-4519-B736-04A56FA8C2D0@gmail.com> Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 20:48:36 -0000 On 4/14/17, 3:46 PM, "Ngie Cooper (yaneurabeya)" wr= ote: =20 > On Apr 14, 2017, at 13:43, Larry Rosenman wrote: >=20 > On 4/14/17, 3:39 PM, "Ngie Cooper (yaneurabeya)" wrote: >=20 >> On Apr 14, 2017, at 13:37, Larry Rosenman wrote: >>=20 >> On 4/14/17, 3:33 PM, "Ngie Cooper (yaneurabeya)" wrote: >>=20 >>> On Apr 14, 2017, at 13:26, Larry Rosenman wrote: >>>=20 >>> On 4/14/17, 3:19 PM, "Ngie Cooper (yaneurabeya)" wrote: >>>=20 >>>> On Apr 14, 2017, at 13:14, Slawa Olhovchenkov wro= te: >>>>=20 >>>> On Fri, Apr 14, 2017 at 01:49:51PM -0600, Alan Somers wrote: >>>>=20 >>>>> On Fri, Apr 14, 2017 at 1:41 PM, Ngie Cooper w= rote: >>>>>> Author: ngie >>>>>> Date: Fri Apr 14 19:41:48 2017 >>>>>> New Revision: 316938 >>>>>> URL: https://svnweb.freebsd.org/changeset/base/316938 >>>>>>=20 >>>>>> Log: >>>>>> savecore: fix space calculation with respect to `minfree` in che= ck_space(..) >>>>>>=20 >>>>>> - Use strtoll(3) instead of atoi(3), because atoi(3) limits the >>>>>> representable data to INT_MAX. Check the values received from >>>>>> strtoll(3), trimming trailing whitespace off the end to maintain >>>>>> POLA. >>>>>> - Use `KiB` instead of `kB` when describing free space, total sp= ace, >>>>>> etc. I am now fully aware of `KiB` being the IEC standard for 10= 24 >>>>>> bytes and `kB` being the IEC standard for 1000 bytes. >>>>>> - Store available number of KiB in `available` so it can be more >>>>>> easily queried and compared to ensure that there are enough KiB = to >>>>>> store the dump image on disk. >>>>>> - Print out the reserved space on disk, per `minfree`, so end-us= ers >>>>>> can troubleshoot why check_space(..) is reporting that there isn= 't >>>>>> enough free space. >>>>>>=20 >>>>>> MFC after: 7 weeks >>>>>> Reviewed by: Anton Rang (earlier diff), cem (ear= lier diff) >>>>>> Tested with: positive/negative cases (see review); make tinderb= ox >>>>>> Sponsored by: Dell EMC Isilon >>>>>> Differential Revision: D10379 >>>>>=20 >>>>> The free space calculation is still uselessly conservative, becau= se it >>>>> doesn't account for the fact that core dumps will always be eithe= r >>>>> spare or compressed. The result is that savecore will frequently >>>>> refuse to save corefiles even when there's plenty of space. I >>>>> proposed removing the space check altogether in >>>>> https://reviews.freebsd.org/D2587. However, I agreed to wait unt= il >>>>> after the compressed core dump feature was merged, because then m= ostly >>>>> accurate space checks will be possible. AFAIK the compressed cor= e >>>>> dump feature still hasn't been finished. >>>>=20 >>>> Is posible (in the future) to use multiple swaps (on multiple disk= s) >>>> for save core dumps? >>>=20 >>> Multiple swap devices is already handled by savecore(8), if one us= es fstab(5) or dumpon(8). Otherwise, you must invoke savecore(8) on individu= al devices. >>>=20 >>> As far as saving to multiple disks is concerned, I would hope that= one is using a redundancy capable filesystem (zfs) or RAID-like technology = (gmirror, graid, LSI Fusion=E2=80=99s RAID product line) to stripe and/or mirror t= he data across multiple disks. >>=20 >> =E2=80=A6 >>=20 >>> How do I use multiple devices to have the system dump on all of my = swap? I got a message about not enough space, but there (I think) was enoug= h between multiple drives=E2=80=A6. >>=20 >> Something like: >>=20 >> - Create a zpool >> - Mount zpool to /crashdumps >> - Change dumpdir in /etc/rc.conf to be /crashdumps, e.g., echo =E2=80=98= dumpdir=3D/crashdumps=E2=80=99 >>=20 >> ? >> HTH, >> -Ngie >>=20 >> PS The issue with lack of space might be the issue that Alan broug= ht up earlier with compressed dumps and overly conservative free space check= s, or it might be the fact that dumpdir (default: /var/crash) is full. >>=20 >>=20 >> I was talking about the actual crashdump to swap by the system. /va= r/crash has 10T of space (my root pool). >=20 > If your memory is bigger than your swap, you=E2=80=99re unfortunately no= t able to save the mini dump if the size of the saved pages exceed the space= on swap. I think this is where markj=E2=80=99s compressed dumps feature will come= in handy. > Thanks! > -Ngie >=20 >=20 > Yeah, I have the following: > borg.lerctr.org /home/ler $ swapctl -l > Device: 1024-blocks Used: > /dev/mfid0p3 8388608 0 > /dev/mfid1p3 8388608 0 > /dev/mfid2p3 8388608 0 > /dev/mfid3p3 8388608 0 > /dev/mfid4p3 8388608 0 > /dev/mfid5p3 8388608 0 > borg.lerctr.org /home/ler $ sysctl hw.physmem > hw.physmem: 137368682496 > borg.lerctr.org /home/ler $ >=20 > SO 6 8G partitions (48G), but the dump is larger than 8G. =20 Yup, that=E2=80=99s not going to work. Since you=E2=80=99re using mfi(4), I=E2=80=99d try= creating another 48GB large RAID-0 volume to help deal with that issue. Cheers, -Ngie No can do, the rest of the space is zpool. borg.lerctr.org /home/ler $ gpart show =3D> 40 3905945520 mfid0 GPT (1.8T) 40 1600 1 efi (800K) 1640 1024 2 freebsd-boot (512K) 2664 1432 - free - (716K) 4096 16777216 3 freebsd-swap (8.0G) 16781312 3889162240 4 freebsd-zfs (1.8T) 3905943552 2008 - free - (1.0M) =3D> 40 3905945520 mfid1 GPT (1.8T) 40 1600 1 efi (800K) 1640 1024 2 freebsd-boot (512K) 2664 1432 - free - (716K) 4096 16777216 3 freebsd-swap (8.0G) 16781312 3889162240 4 freebsd-zfs (1.8T) 3905943552 2008 - free - (1.0M) =3D> 40 3905945520 mfid2 GPT (1.8T) 40 1600 1 efi (800K) 1640 1024 2 freebsd-boot (512K) 2664 1432 - free - (716K) 4096 16777216 3 freebsd-swap (8.0G) 16781312 3889162240 4 freebsd-zfs (1.8T) 3905943552 2008 - free - (1.0M) =3D> 40 3905945520 mfid3 GPT (1.8T) 40 1600 1 efi (800K) 1640 1024 2 freebsd-boot (512K) 2664 1432 - free - (716K) 4096 16777216 3 freebsd-swap (8.0G) 16781312 3889162240 4 freebsd-zfs (1.8T) 3905943552 2008 - free - (1.0M) =3D> 40 3905945520 mfid4 GPT (1.8T) 40 1600 1 efi (800K) 1640 1024 2 freebsd-boot (512K) 2664 1432 - free - (716K) 4096 16777216 3 freebsd-swap (8.0G) 16781312 3889162240 4 freebsd-zfs (1.8T) 3905943552 2008 - free - (1.0M) =3D> 40 3905945520 mfid5 GPT (1.8T) 40 1600 1 efi (800K) 1640 1024 2 freebsd-boot (512K) 2664 1432 - free - (716K) 4096 16777216 3 freebsd-swap (8.0G) 16781312 3889162240 4 freebsd-zfs (1.8T) 3905943552 2008 - free - (1.0M) borg.lerctr.org /home/ler $ =20 From owner-svn-src-head@freebsd.org Fri Apr 14 20:53:18 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40125D3E2C0; Fri, 14 Apr 2017 20:53:18 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x243.google.com (mail-pf0-x243.google.com [IPv6:2607:f8b0:400e:c00::243]) (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 0B774B8A; Fri, 14 Apr 2017 20:53:18 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x243.google.com with SMTP id c198so16561613pfc.0; Fri, 14 Apr 2017 13:53:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=cwle98wvSi0uS7NqzRk4PyX4DLYcx8oD+XkFO6B+FvU=; b=tJSP8LfXBYdERYdQvPAkujMaZisltxMFycnFZg2fsj3D5ai+U2cswRsPBuqw9t3Lv3 fxHc2RwxMaXg9XFGAXVRb38Cl2uziudxu1pJMSuH7QHNaIIdB/2w2HLnBfVD7kE8qlUF CfWi95pkl53iQ4RhkrrDrdYVB7LRi3/PArbidHcv+ZnGkB0lkw2Fn/jmyanZK8yonCmm trCi7B8L+B1sX9fdZCf0cd9azOwvMqaRSESyj9tsicCVz6U0nsxN50QxmLKo6h7CMbMX t9hoX8T9YhTXlxVDaeQv24HSM13Ob9FcKLJjKUvqbbvV+kh1CmCDgaTWmZCgmhfm7Ty6 fi7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=cwle98wvSi0uS7NqzRk4PyX4DLYcx8oD+XkFO6B+FvU=; b=nrb5LjCoqf3PdM8tpeoNi57e5801lJm9u4zT9cpXWNiKfDA2BW3J7Pw9fNwZsfo4eT 3rxuDLc8azUwkw80eZlLLCzjjWwrregYbXETeuUreLjJT9utfLlQG0wu6UqPLhw9qiDs NErhcy450nbOk45x7Q3qXTcRHyiMLxI7uZvQfVv7FWyPB2XQVyFedfOvcIalnujwrl8s zKl9VLnt4lv9t78dFMpOuwRejn+7Ta0/aNM1bg7oZBoKbNoGzoA7YLlbuE8KMPClyTnS GzkSMSo/BICjKPsvUXcxdGtw8ISlN2zqtOnSXyq9h08jWNAFOK9zgOm1FBq3N332wxTC k1fg== X-Gm-Message-State: AN3rC/44NtEaNAzjaFKW23sI9NjSqjTg1aT9/A9+JLhzceOIZOqOSGVh Y4u07FHSgljtZteR7Y8= X-Received: by 10.98.34.20 with SMTP id i20mr9007789pfi.102.1492203197653; Fri, 14 Apr 2017 13:53:17 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id e76sm4792355pfk.75.2017.04.14.13.53.16 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Apr 2017 13:53:16 -0700 (PDT) Subject: Re: svn commit: r316938 - head/sbin/savecore Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_DA8712BE-056C-41D2-850D-848F4A200F8D"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <3D9A20AF-074F-494A-95FF-7A39CC964EA3@lerctr.org> Date: Fri, 14 Apr 2017 13:53:15 -0700 Cc: "src-committers@freebsd.org" , Alan Somers , "svn-src-all@freebsd.org" , Slawa Olhovchenkov , "svn-src-head@freebsd.org" , Ngie Cooper Message-Id: <6F064C87-173F-47DF-A72A-D52B07F9F9A0@gmail.com> References: <201704141941.v3EJfmCW003347@repo.freebsd.org> <20170414201431.GF20974@zxy.spb.ru> <0CAE4B1C-228B-4C71-86E9-4337753DFF74@lerctr.org> <12820BAB-D8BA-4EDE-89BC-4BDB56B1E57A@gmail.com> <15ABDD42-E2C4-4519-B736-04A56FA8C2D0@gmail.com> <3D9A20AF-074F-494A-95FF-7A39CC964EA3@lerctr.org> To: Larry Rosenman X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 20:53:18 -0000 --Apple-Mail=_DA8712BE-056C-41D2-850D-848F4A200F8D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Apr 14, 2017, at 13:48, Larry Rosenman wrote: =E2=80=A6 > No can do, the rest of the space is pool. >_>=E2=80=A6 that sucks. This is part of the reason why I still make my = swap partitions greater than or equal to the amount of memory I have in = systems :/.. The best recommendation I have is either: wait for compressed dump = support, repartition/shuffle around data on your disks so the = configuration fits, or try and get ccd to work *shrugs*. -Ngie --Apple-Mail=_DA8712BE-056C-41D2-850D-848F4A200F8D 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----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJY8Ta7AAoJEPWDqSZpMIYVbxsP/1D2tbeJPwFwpkRQJElBupGg VSBfLo4j94MOpILkE8vYnWzmcxVHC9rjgZLjXbkGnmOmr+5BUS1+RTsYie75VTaN Mu7vJdan21/ijHufZqCeOFt/YTiDGM0KS2HUw0RTd3XAknk/sKzxqg60r/U5WvEg VqXEffF8f7YcqPrQIoE6GaeHdJ/PnQty/YG1ej92uU5UgJwa0lyOIPiRT8cUPaH0 xivhaD5Jrqy49QWKEzSGS6E1l6ExoksMek7ac9lWvy7CHft+3TcimePw7G1Nxe6P lo0mfeXqQVNg+LDwd/UtvV6B22D61hb90WJV4kIzb4NRzEOqkVfJaBBP9Q132fKj h/YfZMdep1NaUS62tah8OSPMUqMxLcKD4SqaRNtq91niB7EEilM+lSgiWd3YP+vA ELdmsRKzlma6wewnJ91/TnKWe7cYqi4iIjTWQl2qvkWYk3LLzq6X4YO+kYKtYr2E mw3U5tS0qQuXlstIeTNEXBRlwRpz/icbKDLVBWNaknw/CQ1HxX7MpgB+EyIASQki lkedahaI9aMzGJEceEC3kkUaUwbygdKjqBVuP9CNCpKLv94kZOlaOcitXLZbfNyD 7/PnTOgqoeK/c1V3c/y6dfxtvv4FCxwanXQxW6MAsOpY5l6Im6SoYj8/jpGIWbMr iHOjrgSxFvKk3FRNnSpU =zDTX -----END PGP SIGNATURE----- --Apple-Mail=_DA8712BE-056C-41D2-850D-848F4A200F8D-- From owner-svn-src-head@freebsd.org Fri Apr 14 20:54:05 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFFBDD3E336; Fri, 14 Apr 2017 20:54:05 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com [74.125.82.51]) (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 8D7EBCD9; Fri, 14 Apr 2017 20:54:05 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-wm0-f51.google.com with SMTP id y18so2655266wmh.0; Fri, 14 Apr 2017 13:54:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=jLJHTvhQ45fPLtF6i8vRX49c8KtjsF7jFekdo0eCAAE=; b=q9FzmMpvspeIaiHFKQvnsVx/MOpL2ei9o8/wr++jexAYkdfHIek4nMqRqSw1+dH8O4 c8e0HYtbIb27wBbqju0HUbWjijy7ZO17mdHLB/JBxz+EEDDK0Y+k1CIrftPtK+Zsp8Ev 27F4hRTgeoQo6eD2qAzSe+pUCU7OEyMwefMMKG5GOM1RUMH/j5JA2Cvalw1jR7AHSXkq zSMeBt+1y48JdGFfteVzVHH2wBRRopQCo9gBcUZpAp5YWzcsOIIDkZgj0109KRWOCjNZ ddTunqCkuuyJOdC7nvRwRckvSO1vTdczO2adEDk3coF5/tQGdNJWLhXMhkIc0tYH345+ RXvQ== X-Gm-Message-State: AN3rC/7KX7wi6QMQBvYTQT+2s6nxEmdPslaaSgQ5cccTZoXP+muRuF4S eW4nvgnu05ecjzWLjkbbsw== X-Received: by 10.28.7.18 with SMTP id 18mr64052wmh.80.1492203243425; Fri, 14 Apr 2017 13:54:03 -0700 (PDT) Received: from mail-wr0-f173.google.com (mail-wr0-f173.google.com. [209.85.128.173]) by smtp.gmail.com with ESMTPSA id y66sm3740141wrb.39.2017.04.14.13.54.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Apr 2017 13:54:03 -0700 (PDT) Received: by mail-wr0-f173.google.com with SMTP id z109so55818787wrb.1; Fri, 14 Apr 2017 13:54:03 -0700 (PDT) X-Received: by 10.223.160.214 with SMTP id n22mr9389993wrn.198.1492203243152; Fri, 14 Apr 2017 13:54:03 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.80.169.4 with HTTP; Fri, 14 Apr 2017 13:54:02 -0700 (PDT) In-Reply-To: References: <201704141941.v3EJfmCW003347@repo.freebsd.org> <20170414202918.GD5039@wkstn-mjohnston.west.isilon.com> From: Conrad Meyer Date: Fri, 14 Apr 2017 13:54:02 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r316938 - head/sbin/savecore To: Alan Somers Cc: Mark Johnston , "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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 20:54:06 -0000 On Fri, Apr 14, 2017 at 1:41 PM, Alan Somers wrote: > On Fri, Apr 14, 2017 at 2:29 PM, Mark Johnston wrote: >> I've been hesitant about pushing it forward: >> - The dump_write* APIs need some simplification after the addition of >> encrypted dump support and support for dumping to 4Kn drives. >> - I'm not sure how encryption should compose with compression. It seems >> intuitively obvious that we should compress before encrypting if the >> compression is to be of any use, but I don't know enough to know >> whether the compression might somehow compromise the effectiveness of >> the encryption. >> >> If anyone has some insight on the second of these two points, I'd >> appreciate hearing it. > > I think compress then encrypt should be ok. AFAIK all attacks against > compress-then-encrypt systems have involved either incredibly short > payloads that are easy to guess, or a stream of separately compressed > blocks that can be fingerprinted. But core dumps are very long, and > they can't be fingerprinted in whole because they're unique. If you > were to encrypt each page individually then pages could be > fingerprinted, so don't do that. Instead, compress the entire core > dump as a single stream and you should be ok. +1. From owner-svn-src-head@freebsd.org Fri Apr 14 20:57:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D4ADD3E3BE; Fri, 14 Apr 2017 20:57:25 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-oi0-x22c.google.com (mail-oi0-x22c.google.com [IPv6:2607:f8b0:4003:c06::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 C3561E51; Fri, 14 Apr 2017 20:57:24 +0000 (UTC) (envelope-from delphij@gmail.com) Received: by mail-oi0-x22c.google.com with SMTP id f22so100861290oib.2; Fri, 14 Apr 2017 13:57:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=LsQ9R81ymmjNdMlanNSo9alSr4oIT8XWYPIgpRLGJtw=; b=AtSIxN/u3DXnd3vgXZgJtmOGAGUYKnOll1eBraLKlK7lgbX5pg4r0vTbN23NpLsqit HB62p7f7vWc0njpkGL9MlsCWgmFk6I1mE/YI0kCNbhL6zagiMcwJvA7DWG6OUcQFcC/5 tuB++aBFkyeoG5hNUuzn1s7MzTvXDBA3+RNXwXPa4xPXt4pGt0vVHFELyHO0BUP8nntD UCHP6XH3UPEedFvHH6Re9yHaLcGW8BBfSesOckl7dMC2BtUrI6joKHD4xw/5QTrlJk/G jR/k6RXesEM8oRZWAXZDctJMtc3mdZNrjdQ8JVMu9fc3yttiv/kez/JMQ1agGWQi5Hls ljDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=LsQ9R81ymmjNdMlanNSo9alSr4oIT8XWYPIgpRLGJtw=; b=SFHd656iL7qCgIkQmjhuiPM6CG1b2vLuAVsU36F/Bg2Cq0BAGRukKcSA/3HTSWczNj 8wJd+2p8ZqNrcIOexppo3ifO3clCKN/z9xqlG/N2GsOxHPNwctBcesPHiJFD0y2+8FJT mb/XAX3tpZBbOw9hh5HO7HZYJntTGz5dR3CFSMvR4lP0XoKNZpJofOCyT4Q78IfXLwyT 9zg/jD2Xf5DLfTmd7KdeDGDrfjCamrpGL5hNiTgUmTr7JNjZkTb2gXjr4k8z9Qye9Os7 cp9nmPl0ph26K8q7bNP/+wf0cDw3MDzkSJ78acj1y0i40X99FrZMRfJwetjfRCLyEGr2 TCuw== X-Gm-Message-State: AN3rC/7/BZlryhIlG++FRyIVqtghgEi+DqXGa+ltF5oGJdYCOpVpNY7G +qjtW1rDntpujzDtC1J9Pprg/5pajQac X-Received: by 10.202.215.67 with SMTP id o64mr5480427oig.83.1492203443948; Fri, 14 Apr 2017 13:57:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.63.179 with HTTP; Fri, 14 Apr 2017 13:57:23 -0700 (PDT) In-Reply-To: References: <201704141941.v3EJfmCW003347@repo.freebsd.org> <20170414202918.GD5039@wkstn-mjohnston.west.isilon.com> From: Xin LI Date: Fri, 14 Apr 2017 13:57:23 -0700 Message-ID: Subject: Re: svn commit: r316938 - head/sbin/savecore To: Ronald Klop Cc: Alan Somers , Mark Johnston , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Ngie Cooper Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 20:57:25 -0000 No, this is not the threat model for swaps. On Fri, Apr 14, 2017 at 1:47 PM, Ronald Klop wrote: > On Fri, 14 Apr 2017 22:29:18 +0200, Mark Johnston wrote: > >> On Fri, Apr 14, 2017 at 01:49:51PM -0600, Alan Somers wrote: >>> >>> On Fri, Apr 14, 2017 at 1:41 PM, Ngie Cooper wrote: >>> > Author: ngie >>> > Date: Fri Apr 14 19:41:48 2017 >>> > New Revision: 316938 >>> > URL: https://svnweb.freebsd.org/changeset/base/316938 >>> > >>> > Log: >>> > savecore: fix space calculation with respect to `minfree` in >>> > check_space(..) >>> > >>> > - Use strtoll(3) instead of atoi(3), because atoi(3) limits the >>> > representable data to INT_MAX. Check the values received from >>> > strtoll(3), trimming trailing whitespace off the end to maintain >>> > POLA. >>> > - Use `KiB` instead of `kB` when describing free space, total space, >>> > etc. I am now fully aware of `KiB` being the IEC standard for 1024 >>> > bytes and `kB` being the IEC standard for 1000 bytes. >>> > - Store available number of KiB in `available` so it can be more >>> > easily queried and compared to ensure that there are enough KiB to >>> > store the dump image on disk. >>> > - Print out the reserved space on disk, per `minfree`, so end-users >>> > can troubleshoot why check_space(..) is reporting that there isn't >>> > enough free space. >>> > >>> > MFC after: 7 weeks >>> > Reviewed by: Anton Rang (earlier diff), cem (earlier >>> > diff) >>> > Tested with: positive/negative cases (see review); make tinderbox >>> > Sponsored by: Dell EMC Isilon >>> > Differential Revision: D10379 >>> >>> The free space calculation is still uselessly conservative, because it >>> doesn't account for the fact that core dumps will always be either >>> spare or compressed. The result is that savecore will frequently >>> refuse to save corefiles even when there's plenty of space. I >>> proposed removing the space check altogether in >>> https://reviews.freebsd.org/D2587. However, I agreed to wait until >>> after the compressed core dump feature was merged, because then mostly >>> accurate space checks will be possible. AFAIK the compressed core >>> dump feature still hasn't been finished. >> >> >> I had held off on it for a while because it was going to conflict with >> the work to add encrypted dump support, which of course has finished. >> >> The patch to add compression support is here and should largely still >> work: >> >> https://people.freebsd.org/~markj/patches/core-compression/20141110-kern_dump.diff >> >> I've been hesitant about pushing it forward: >> - The dump_write* APIs need some simplification after the addition of >> encrypted dump support and support for dumping to 4Kn drives. >> - I'm not sure how encryption should compose with compression. It seems >> intuitively obvious that we should compress before encrypting if the >> compression is to be of any use, but I don't know enough to know >> whether the compression might somehow compromise the effectiveness of >> the encryption. >> >> If anyone has some insight on the second of these two points, I'd >> appreciate hearing it. > > > About compression before encryption there is some information. For example: > https://en.wikipedia.org/wiki/CRIME > Openssh removed compression in pre-authentication in > http://www.openssh.com/txt/release-7.4 > > Regards, > Ronald. > From owner-svn-src-head@freebsd.org Fri Apr 14 21:10:58 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7445DD3E5ED for ; Fri, 14 Apr 2017 21:10:58 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail-io0-x22c.google.com (mail-io0-x22c.google.com [IPv6:2607:f8b0:4001:c06::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 382056EC for ; Fri, 14 Apr 2017 21:10:58 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: by mail-io0-x22c.google.com with SMTP id k87so98888873ioi.0 for ; Fri, 14 Apr 2017 14:10:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sippysoft-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=omPZ9aZno4X4MatDoAzosacGpeYjIkg4UH5YgK8z+IY=; b=fz4Z3Svqy78+ACqjb0f+HJYUYRp2D3KIuonqFuhlRk+S9uxj/8380xkmeJLYAZrarQ aPHcveF3uySDvbo1Ds0irFD3DF42hujY8DUVqTb05itLFhyv2UUew2vdJ1CZkEq9sjSZ Ej23ArpwuAUJm2n/QrT/7T+VY+F3wplWAlgXkIo7Ag4GCYcW3Y+fzlaS54L4DYIfa0HQ OQ1HvyvghJVTHG+9vExeMPJV6bqEaArd770qi33bBoeBqzWU6D7Q/a8Xq2JDyxz459UP BQ3gwSUmBbtCKQMvv2cfLd/zkdX3XGwQnHJR9Raecd1BZ3w0NSVybf57NTsY5I11BgjM 7icA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=omPZ9aZno4X4MatDoAzosacGpeYjIkg4UH5YgK8z+IY=; b=fbNIH6A1cYcPaMBaAJucvIGe3bUbf3aVmvfD8q/vKlBgrl3SW2sqCc0Ik7Ir3NdSVx w//TopN1z/518miIoxk8bI4mubivT/vWjWtfX5De8WrUo2XsqSbKjRSqLpCUoDABMp+X dbH+Lm7tyBUOHGO5SmxtjRSoXFCpkKLD+6TBbl+rgZGBAC5SlEMrb/BeWXe6esQNN7gy i7JzlrEnrNn2sXXC+HctIOXVGkuVD26pD6kxBkJn2tSCaUEa/27afwYfCRnIaO4B8RDt XEi3UFRmbm+UzrOj+nbh4iGD3Y8Nx60CSew19Z+y0v/0EEx+IiclwWSjxOV0c/z/IO7P RO5g== X-Gm-Message-State: AN3rC/5ojkC8/swOi2/xmPCjPDSNttwGHvNPHqjXExW72Z0yYB7huWaJ T+00GwT8cBJMc5Jy7e5m9yhf8+qM/Qcl X-Received: by 10.107.128.69 with SMTP id b66mr13293094iod.25.1492204257567; Fri, 14 Apr 2017 14:10:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.104.135 with HTTP; Fri, 14 Apr 2017 14:10:56 -0700 (PDT) In-Reply-To: <513B1846-02E3-49E0-BAA2-CA923EDC5DFF@gmail.com> References: <201704141723.v3EHNS3B043902@repo.freebsd.org> <12133324.zHp9vo75vZ@overcee.wemm.org> <6942092.OsECkgAp13@overcee.wemm.org> <513B1846-02E3-49E0-BAA2-CA923EDC5DFF@gmail.com> From: Maxim Sobolev Date: Fri, 14 Apr 2017 14:10:56 -0700 Message-ID: Subject: Re: svn commit: r316874 - head/sys/kern To: "Ngie Cooper (yaneurabeya)" Cc: Peter Wemm , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Hiren Panchasara Content-Type: multipart/mixed; boundary=001a113f8c6cb4eaad054d26e0ee X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 21:10:58 -0000 --001a113f8c6cb4eaad054d26e0ee Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Peter, Ngie, Looks like out of that refactoring came a logical bug that is present in the head, which causes syslod to first to shutdown the socket for reading and then try to select/recv on it (which is somewhat stupid). And that issue has been masked by shutdown() on datagram socket becoming effectively a NOP in 11 & head 20 months ago. It only affects head though, 11-stable still has the old code which does not include that half-closed socket into the select list. Attached patch is expected to fix head, Peter, it would be nice if you can give it a try (restoring latest changes into uipc_sockets.c) and let me know if it helps. Thanks! On Fri, Apr 14, 2017 at 12:48 PM, Ngie Cooper (yaneurabeya) < yaneurabeya@gmail.com> wrote: > > > On Apr 14, 2017, at 12:46, Peter Wemm wrote: > > > > On Friday, April 14, 2017 12:41:52 PM Maxim Sobolev wrote: > >> Thanks, Peter. I will try to look into this asap. > > > > I don't understand what is going on yet. Presumably there must be other > > changes in play that affect udp/select sometime between the original 20= 15 > > change and this. The syslogd -s code is Old(TM). I'm also wondering > whether > > the -s code even works at all since the 2015 / r285910 change... > > syslogd has been refactored a lot on ^/head. I don=E2=80=99t think it=E2= =80=99s safe to > say that the ^/head and ^/stable/11 and earlier copies will function the > same. > Thanks, > -Ngie > --=20 Maksym Sobolyev Sippy Software, Inc. Internet Telephony (VoIP) Experts Tel (Canada): +1-778-783-0474 Tel (Toll-Free): +1-855-747-7779 Fax: +1-866-857-6942 Web: http://www.sippysoft.com MSN: sales@sippysoft.com Skype: SippySoft --001a113f8c6cb4eaad054d26e0ee Content-Type: text/plain; charset=US-ASCII; name="syslogd.diff" Content-Disposition: attachment; filename="syslogd.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_j1ibuchu1 SW5kZXg6IHN5c2xvZ2QuYwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBzeXNsb2dkLmMJKHJldmlzaW9uIDMxNjg1 NCkKKysrIHN5c2xvZ2QuYwkod29ya2luZyBjb3B5KQpAQCAtNzAyLDcgKzcwMiw3IEBACiAJCSAg ICBzaXplb2YoZmRfbWFzaykpOwogCiAJCVNUQUlMUV9GT1JFQUNIKHNsLCAmc2hlYWQsIG5leHQp IHsKLQkJCWlmIChzbC0+c2xfc29ja2V0ICE9IC0xKQorCQkJaWYgKHNsLT5zbF9zb2NrZXQgIT0g LTEgJiYgc2wtPnNsX3JlY3YgIT0gTlVMTCkKIAkJCQlGRF9TRVQoc2wtPnNsX3NvY2tldCwgZmRz cik7CiAJCX0KIAkJaSA9IHNlbGVjdChmZHNybWF4ICsgMSwgZmRzciwgTlVMTCwgTlVMTCwKQEAg LTI4NzcsNiArMjg3Nyw3IEBACiAJc3RydWN0IGFkZHJpbmZvIGhpbnRzLCAqcmVzLCAqcmVzMDsK IAlpbnQgZXJyb3I7CiAJY2hhciAqY3A7CisJaW50ICgqc2xfcmVjdikoc3RydWN0IHNvY2tsaXN0 ICopOwogCS8qCiAJICogV2UgaGF2ZSB0byBoYW5kbGUgdGhpcyBjYXNlIGZvciBiYWNrd2FyZHMg Y29tcGF0aWJpbGl0eToKIAkgKiBJZiB0aGVyZSBhcmUgdHdvIChvciBtb3JlKSBjb2xvbnMgYnV0 IG5vICdbJyBhbmQgJ10nLApAQCAtMzAwMyw2ICszMDA0LDcgQEAKIAkJfQogCQlkcHJpbnRmKCJu ZXcgc29ja2V0IGZkIGlzICVkXG4iLCBzKTsKIAkJbGlzdGVuKHMsIDUpOworCQlzbF9yZWN2ID0g c29ja2xpc3RfcmVjdl9zb2NrOwogCQlkcHJpbnRmKCJzaHV0ZG93blxuIik7CiAJCWlmIChTZWN1 cmVNb2RlIHx8IHJlcy0+YWlfZmFtaWx5ID09IEFGX0xPQ0FMKSB7CiAJCQkvKiBGb3JiaWQgY29t bXVuaWNhdGlvbiBpbiBzZWN1cmUgbW9kZS4gKi8KQEAgLTMwMTMsNiArMzAxNSw3IEBACiAJCQkJ CWRpZSgwKTsKIAkJCX0KIAkJCWRwcmludGYoImxpc3RlbmluZyBvbiBzb2NrZXRcbiIpOworCQkJ c2xfcmVjdiA9IE5VTEw7CiAJCX0gZWxzZQogCQkJZHByaW50Zigic2VuZGluZyBvbiBzb2NrZXRc biIpOwogCQlhZGRzb2NrKHJlcy0+YWlfYWRkciwgcmVzLT5haV9hZGRybGVuLApAQCAtMzAxOSw3 ICszMDIyLDcgQEAKIAkJICAgICYoc3RydWN0IHNvY2tsaXN0KXsKIAkJCS5zbF9zb2NrZXQgPSBz LAogCQkJLnNsX3BlZXIgPSBwZSwKLQkJCS5zbF9yZWN2ID0gc29ja2xpc3RfcmVjdl9zb2NrCisJ CQkuc2xfcmVjdiA9IHNsX3JlY3YKIAkJfSk7CiAJfQogCWZyZWVhZGRyaW5mbyhyZXMwKTsK --001a113f8c6cb4eaad054d26e0ee-- From owner-svn-src-head@freebsd.org Fri Apr 14 21:14:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A87B1D3E782; Fri, 14 Apr 2017 21:14:19 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x244.google.com (mail-pg0-x244.google.com [IPv6:2607:f8b0:400e:c05::244]) (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 6A6A09D6; Fri, 14 Apr 2017 21:14:19 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x244.google.com with SMTP id g2so17875861pge.2; Fri, 14 Apr 2017 14:14:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=h4i/VrxLXNXu4AdNnGtVuBN267xh0HMiY/nNoJoer5U=; b=seBb1XUaqSTe7YObmx3n6JYMmYuJcHXFgKjumSykPtqS/htfK4ZdYyhgIU/7VmE0+/ flr6CWqsziCnzOB4tr7k0LBQmO1I9UnvXf2xRWWGsZjc7Qyg8mbadWbJpWNT/LXreLAt gxPRIhsGpST+3UekI9Kr8T3jh+nNSEdKW0lyqL/ZU9v95cwliDp8sv/VoyLlqn/xDUy0 GIknAoJvrLlyJtuXIZE4Xyui6/ytImx5fY0B3TdKtTMcErR5MDDlbCcxmjZcUagEKK/z Nj9chgiedMvF2johp2SayXtaNymq/P0/gTaRxcDLXFwXMMooJn7T3jthHqc65ie8w1FV 9t5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=h4i/VrxLXNXu4AdNnGtVuBN267xh0HMiY/nNoJoer5U=; b=UoMmwA3pTXIsvVAeXuYjsZdN+dsGWi5Z5xxaIZmTq3ELR3s5oKxOrmqDDbdGshHT4E 2wmEXjW6IVJFjk2e6hLOAXhh7GRhPi6lPNdjKheIIcQH+12W2K2nOkF3cChs0ULbQIiu NcmjCJcBij452jvjiB9VA6dqul4VBciMJ3rQ9b0JejbBWF/aTzFvNYCcV21y3dB/a1f4 jPeMJCo5d8helTpm4taAT721qfGSQSMXgvUxXOryFpAX5pRaeCebUiNK1f4YMApEGT11 9sXf0adrtJrUQaR9OcwVEkw4/HZ2wTYe5+DBM/c9rJ0CA7yzyMM4twoxAo9JE5qug5Cl 1mlA== X-Gm-Message-State: AN3rC/7Of6Ym0y44pbuNzRc9MYF7RqxSakFbKJqqSSGgw4bQ+Vakgz7z +qulT3NJFGJQ5wGLg2Q= X-Received: by 10.84.232.68 with SMTP id f4mr11137225pln.90.1492204458970; Fri, 14 Apr 2017 14:14:18 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id p189sm4814546pfb.128.2017.04.14.14.14.17 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Apr 2017 14:14:18 -0700 (PDT) Subject: Re: svn commit: r316874 - head/sys/kern Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_33D0C2FF-AD51-4BEE-9D9E-6749C1E773C8"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: Date: Fri, 14 Apr 2017 14:14:16 -0700 Cc: Peter Wemm , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Hiren Panchasara , Hiroki Sato Message-Id: References: <201704141723.v3EHNS3B043902@repo.freebsd.org> <12133324.zHp9vo75vZ@overcee.wemm.org> <6942092.OsECkgAp13@overcee.wemm.org> <513B1846-02E3-49E0-BAA2-CA923EDC5DFF@gmail.com> To: Maxim Sobolev X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 21:14:19 -0000 --Apple-Mail=_33D0C2FF-AD51-4BEE-9D9E-6749C1E773C8 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Apr 14, 2017, at 14:10, Maxim Sobolev = wrote: >=20 > Peter, Ngie, >=20 > Looks like out of that refactoring came a logical bug that is present = in the head, which causes syslod to first to shutdown the socket for = reading and then try to select/recv on it (which is somewhat stupid). = And that issue has been masked by shutdown() on datagram socket becoming = effectively a NOP in 11 & head 20 months ago. It only affects head = though, 11-stable still has the old code which does not include that = half-closed socket into the select list. Attached patch is expected to = fix head, Peter, it would be nice if you can give it a try (restoring = latest changes into uipc_sockets.c) and let me know if it helps. >=20 > Thanks! CCing hrs@ for input as he did the refactoring. Thanks! -Ngie PS LGTM with the change. Will wait for feedback from wemm@. --Apple-Mail=_33D0C2FF-AD51-4BEE-9D9E-6749C1E773C8 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----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJY8TupAAoJEPWDqSZpMIYVO/0QAJT8tq4nDLxs65X7lQ2HjOlk v+ba03skz4hkhPU2k3N1sz67CuwFvsqFzlyu1wARBEje5yD1urBy7w6pKNQZbiYi jYdT78AE4q40XZU6XBD7Ne94BSczTe4uI8lfU3VMpv+Fnb1bL54HJ1MFUpTY4IZs KO1/CMv7XOqwuNiZDE2WFFEfTJQIB+JB/tgdQTiW3Aac7XNHiXS7i7hHC4WFp7Vi lsMZ/VGI0Umx6gvOmoimpjAK1fL2QbDh/JHDnklhm3evdIVSiS7cv9cOf+DZMsEH p8iJMHO8x7H4JVvAbJMBLZpLFDCfm47HMkDJZxaZAGhIWN43acefYgDaFnxk6oXt UJL4FoBF8XyTaHevv8Y/3KuxsBRHio36GpSpQ7/EbTw9TielxqZkUlXLAuQThtUt CsAXktFGZa3DAuOQ23/VXx0tTazNwfNuZalnIzaNfAIjCDv5K1Y0xXlz8yJqhmOe QTUOCt5Jz3M1XHhX9fGmx36utuMbavLPvhVEsueQ0JEDGhKXSBlxNIN6XB85YU29 c25O1PkvbcTlBppCMCshAONDcuSBqdjpUGbzPQmv5PXFO+IhNetQHu9PnayLbDNY JCKXIPATL1ZS28xZGASHORSe1oFze30OG5y18O2FbpUOoyDR2m9oOPjDlBZKVRcz qpJ2cJK2xWX7AD0tv3LW =aXDt -----END PGP SIGNATURE----- --Apple-Mail=_33D0C2FF-AD51-4BEE-9D9E-6749C1E773C8-- From owner-svn-src-head@freebsd.org Fri Apr 14 21:21:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C22ACD3EBC3 for ; Fri, 14 Apr 2017 21:21:06 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail-it0-x230.google.com (mail-it0-x230.google.com [IPv6:2607:f8b0:4001:c0b::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 90D39E1A for ; Fri, 14 Apr 2017 21:21:06 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: by mail-it0-x230.google.com with SMTP id b15so1235249iti.1 for ; Fri, 14 Apr 2017 14:21:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sippysoft-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=Lt6woQbb8f2svgqmCXk3kRKPVnCzTbs8xRXehv558k4=; b=t8zzk+y3HvFTfLvluYbi++ati550vbrgc6oxxVVvUKcn7+83f1/aYBuZ3uWDUYRcQa IlqJJL0i/DuxPdipAMHGzHYhxp91J+8x9BU54z3JqckbOYC91RJ7k6rd7P3MM9n7X8rU 9GVIxGq/3BBVomSAk56SgHcpN59gyHwIPTCgXsmVtmuaEq1Kd6tddY9c4n6LbOmEJI2Z kraVhcLIL43ylIvTY7HmKd79US60ilbLBIaqlWCzHYL7iDvTLeUqDeoh5hwNUORxXXR6 pAVq2g8O4vIR3VW5MUJGa88NY/dYrYEA0DPxsmvvoF92b2qch4JBTfHiLu7nLGGa4Mo+ 8mCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=Lt6woQbb8f2svgqmCXk3kRKPVnCzTbs8xRXehv558k4=; b=qrGmUwT9zW8CMsbiaL6Yq1rTL11TJNlPm13xyu4jOvJpOHZC0i0/pZgf/DbRSPDnul nX619DIjKijQQzVYccg5XVX0K5oQhQyW2+HM1w9VVo5jME+mTgNIhnQ4k2fg6ymGP5w0 Eh8qYJWFsTt4meYarq3JvgVpFeAlf54j+ZhsvuLC59V5rP2BS0dHdMc528X4k5suJGo1 uP6iVm+e4ewxwrfdCCmP/cm4qnUqWmeScqbVE7NfJIy9uvzV+Y/L3Bp1+3gBmJ0MJfhB +aow0Gr6JPK2SMVzayIQ071X3voNe5A79vSWNw+PLq+FYNqeRRpGL+j3iGtAG7h2Azzu VyGA== X-Gm-Message-State: AN3rC/6n+oniOdzkygiKtaxwCj3BavESxlFXrB6+VK9wv0llYu6O/AGd TBos1U+IQfIShEX7YvjklemoLeS5vngyZmk= X-Received: by 10.36.10.129 with SMTP id 123mr632176itw.80.1492204865866; Fri, 14 Apr 2017 14:21:05 -0700 (PDT) MIME-Version: 1.0 Sender: sobomax@sippysoft.com Received: by 10.36.104.135 with HTTP; Fri, 14 Apr 2017 14:21:05 -0700 (PDT) In-Reply-To: <6942092.OsECkgAp13@overcee.wemm.org> References: <201704141723.v3EHNS3B043902@repo.freebsd.org> <12133324.zHp9vo75vZ@overcee.wemm.org> <6942092.OsECkgAp13@overcee.wemm.org> From: Maxim Sobolev Date: Fri, 14 Apr 2017 14:21:05 -0700 X-Google-Sender-Auth: kV0jSDJWo39zLMRQyxdbuopta60 Message-ID: Subject: Re: svn commit: r316874 - head/sys/kern To: Peter Wemm Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Hiren Panchasara Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 21:21:06 -0000 Peter, It is actually the other way around. If you take syslogd code out of 11-stable and earlier that would work just fine with or without r316874. But since r285910 syslogd in head had been refactored a lot and I think that particular bug has introduced that has been masked by the shutdown() on datagram sockets becoming a NOP after r285910. Then r316874 restored our historical behavior for the shutdown(2) and bingo, bug in the new syslogd code is now causing it to spin when shutdown() != NOP. -Max On Fri, Apr 14, 2017 at 12:46 PM, Peter Wemm wrote: > On Friday, April 14, 2017 12:41:52 PM Maxim Sobolev wrote: > > Thanks, Peter. I will try to look into this asap. > > I don't understand what is going on yet. Presumably there must be other > changes in play that affect udp/select sometime between the original 2015 > change and this. The syslogd -s code is Old(TM). I'm also wondering > whether > the -s code even works at all since the 2015 / r285910 change... > > > -Max > > > > On Apr 14, 2017 12:32 PM, "Peter Wemm" wrote: > > > On Friday, April 14, 2017 11:49:26 AM Peter Wemm wrote: > > > > On Friday, April 14, 2017 05:23:28 PM Maxim Sobolev wrote: > > > > > Author: sobomax > > > > > Date: Fri Apr 14 17:23:28 2017 > > > > > New Revision: 316874 > > > > > URL: https://svnweb.freebsd.org/changeset/base/316874 > > > > > > > > > > Log: > > > > > Restore ability to shutdown DGRAM sockets, still forcing > ENOTCONN to > > > > > > be > > > > > > > > returned by the shutdown(2) system call. This ability has been > lost as > > > > > part > > > > > of the svn revision 285910. > > > > > > > > > > Reviewed by: ed, rwatson, glebius, hiren > > > > > MFC after: 2 weeks > > > > > Differential Revision: https://reviews.freebsd.org/D10351 > > > > > > > > This appears to have broken syslogd and had a major change in > behavior > > > > > > with > > > > > > > regards to select(2). > > > > > > > > If you run syslogd with the -s flag (which is default), it now spins > at > > > > > > 100% > > > > > > > cpu as all the shutdown sockets now return readable from select. > > > > > > > > Old releases / jails also manifest this behavor. If it wasn't for > > > > losing > > > > the ability to run old branch binaries I'd suggest changing syslogd > > > > instead, but we depend on this in the cluster and I expect others do > > > > too. > > > > > > > > I'm not 100% certain that this change is the culprit but a heads-up > > > > can't > > > > hurt. I'll try reverting it on the freebsd cluster next, after fixing > > > > the > > > > broken auditing changes. > > > > > > > > -Peter > > > > > > I can confirm that reverting r316874 fixes syslogd and backwards > > > compatability > > > with old branches. > > > > > > -- > > > Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; > > > KI6FJV > > > UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246 > > -- > Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; > KI6FJV > UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246 > From owner-svn-src-head@freebsd.org Fri Apr 14 21:28:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2AD9D3EDE4; Fri, 14 Apr 2017 21:28:59 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-oi0-x234.google.com (mail-oi0-x234.google.com [IPv6:2607:f8b0:4003:c06::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 5A38714D; Fri, 14 Apr 2017 21:28:59 +0000 (UTC) (envelope-from delphij@gmail.com) Received: by mail-oi0-x234.google.com with SMTP id b187so101325647oif.0; Fri, 14 Apr 2017 14:28:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=eE4MoZ/XDlqBy+Axod21BQKoeZTwInjgWQdw7Pmj2qY=; b=MNggiWNNqhWBnxXjksZDQWzjo5/OyAFdHkboMwTR41qaz4q741xfZnmKljv3e7mH7I VQucMXDS8CyLk11sEGek6l1uImGH1s5du6d/rJNb0sp0OzzvZQmYt6aUHlQ2WVAVcZ9W lAJjUI4di4XWxTQ9stVnZX4Dr+eTvgENSTzUxItuEpwt7aSwOPXPMesngztZMmMCIpOC +qeKGSs2U9fv7gxHlni+OS67MgEK4MMNRXAQsuurmiDSnbMzSoOV2ClXoafv7O9zaLT4 g2mzbx/AVX7/Sf2UjswUye9iRab1he/5+n6WOtpDCTG9yevhq87pB2Zc92wv2K3i3qSg WhGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=eE4MoZ/XDlqBy+Axod21BQKoeZTwInjgWQdw7Pmj2qY=; b=Gb0QDzb1HtB/UP+Oy7hrxmqBKQGac8uIF+VIB3Uwcxr79M4JzLHs0sWhEjU3vHiXoC axB/eueougec1Sq+Jsp+6w1EV6fpBIfyYNuPf7ob5DHgEFIKwu3p9fNqzaYdzsDTd5Z5 rTLv8vtSAHysoLojT8J0k0OXnkMU8IzeXiTFobVy0xyVXEHLNrgZwzgk739+RgcHNHAB vb2VsPmvnMhY/9G0uUdlDxV8KwK6sc0C5fPl3mzyzMMggsh5mr5ZsPxfDaqDAdNSNo8e j8VoJEW3BIt+TZD5OYn78HclQDZ4S2nr09NcN4UfXlLWJ2BK9oZ719k1ttojBkk4UGCd 3dqQ== X-Gm-Message-State: AN3rC/6B1vvEgY8sdj7kuEJkhGTz3gC007sjHZUMCA9Qy0CxbK4FvqWF uVGnx44jNyp/jXcFhJVHXCCWMb/DrKTIAZQ= X-Received: by 10.202.253.5 with SMTP id b5mr6249040oii.156.1492205338311; Fri, 14 Apr 2017 14:28:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.63.179 with HTTP; Fri, 14 Apr 2017 14:28:57 -0700 (PDT) In-Reply-To: <20170414202918.GD5039@wkstn-mjohnston.west.isilon.com> References: <201704141941.v3EJfmCW003347@repo.freebsd.org> <20170414202918.GD5039@wkstn-mjohnston.west.isilon.com> From: Xin LI Date: Fri, 14 Apr 2017 14:28:57 -0700 Message-ID: Subject: Re: svn commit: r316938 - head/sbin/savecore To: Mark Johnston Cc: Alan Somers , Ngie Cooper , "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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 21:28:59 -0000 On Fri, Apr 14, 2017 at 1:29 PM, Mark Johnston wrote: > - I'm not sure how encryption should compose with compression. It seems > intuitively obvious that we should compress before encrypting if the > compression is to be of any use, but I don't know enough to know > whether the compression might somehow compromise the effectiveness of > the encryption. I think the biggest concern is the added code involved in the dump process (which happen when the kernel is already unhealthy), which can jeopardize it and defeat the usefulness of having a crash dump being set up in the first place. And with textdumps available, the benefit of having compression is limited because we can request for minidump or full dumps only when the textdumps are not good enough for diagnosing the kernel bug. I don't think security (e.g. leaking information because of the use of compression) is a very big concern in this context because in order for the potential attacker to read the raw material needs a compromised system (unlike an attack from the network, where someone who controls the network would have access to the raw material); the dump is usually quite large, and measuring downtime would be hard at that scale. By the way (not meant to bikeshed) if I was to do this I'd prefer using lz4 or something that compresses faster than zlib. Cheers, From owner-svn-src-head@freebsd.org Fri Apr 14 21:30:12 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 380D6D3EE6F; Fri, 14 Apr 2017 21:30:12 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 225912D9; Fri, 14 Apr 2017 21:30:11 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id v3ELU9Xj056487 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 14 Apr 2017 14:30:10 -0700 (PDT) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id v3ELU9NE056486; Fri, 14 Apr 2017 14:30:09 -0700 (PDT) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 14 Apr 2017 14:30:09 -0700 From: Gleb Smirnoff To: "Andrey V. Elsukov" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r316822 - in head/sys: kern netinet netinet6 Message-ID: <20170414213009.GI1033@FreeBSD.org> References: <201704140900.v3E90mJU030549@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201704140900.v3E90mJU030549@repo.freebsd.org> User-Agent: Mutt/1.8.0 (2017-02-23) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 21:30:12 -0000 Andrey, On Fri, Apr 14, 2017 at 09:00:48AM +0000, Andrey V. Elsukov wrote: A> Log: A> Rework r316770 to make it protocol independent and general, like we A> do for streaming sockets. A> A> And do more cleanup in the sbappendaddr_locked_internal() to prevent A> leak information from existing mbuf to the one, that will be possible A> created later by netgraph. Thanks! Your comment actually made me think that this can be improved... A> @@ -794,8 +794,20 @@ sbappendaddr_locked_internal(struct sock A> return (0); A> m->m_len = asa->sa_len; A> bcopy(asa, mtod(m, caddr_t), asa->sa_len); A> - if (m0) A> + if (m0) { A> m_clrprotoflags(m0); A> + m_tag_delete_chain(m0); A> + /* A> + * Clear some persistent info from pkthdr. A> + * We don't use m_demote(), because some netgraph consumers A> + * expect M_PKTHDR presence. A> + */ Looks like you are right and only netgraph wants to see M_PKTHDR there. Rest of datagram socket consumers just use m_nextpkt to differentiate records from parts of records. I'll see if we can fix ng_ksocket and use same code on datagram sockbufs as we do on stream ones. -- Totus tuus, Glebius. From owner-svn-src-head@freebsd.org Fri Apr 14 21:36:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44FC1D3C063; Fri, 14 Apr 2017 21:36:46 +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 102C19A8; Fri, 14 Apr 2017 21:36:45 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id 7B06BD65E7D; Sat, 15 Apr 2017 07:36:37 +1000 (AEST) Date: Sat, 15 Apr 2017 07:36:35 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Edward Tomasz Napierala cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r316941 - head/sys/kern In-Reply-To: <201704142015.v3EKFYWA017623@repo.freebsd.org> Message-ID: <20170415064658.L4428@besplex.bde.org> References: <201704142015.v3EKFYWA017623@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.2 cv=KeqiiUQD c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=dWgNT7XYNQrq3qRgAOUA:9 a=+jEqtf1s3R9VXZ0wqowq2kgwd+I=:19 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 21:36:46 -0000 On Fri, 14 Apr 2017, Edward Tomasz Napierala wrote: > Log: > Don't try to write out bufs that have already failed with ENXIO. > This fixes some panics after disconnecting mounted disks. > > Submitted by: imp (slightly different version, which I've then lost) > Reviewed by: kib, imp, mckusick > MFC after: 2 weeks > Differential Revision: https://reviews.freebsd.org/D9674 > > Modified: > head/sys/kern/vfs_bio.c > > Modified: head/sys/kern/vfs_bio.c > ============================================================================== > --- head/sys/kern/vfs_bio.c Fri Apr 14 20:15:17 2017 (r316940) > +++ head/sys/kern/vfs_bio.c Fri Apr 14 20:15:34 2017 (r316941) > @@ -2290,18 +2290,28 @@ brelse(struct buf *bp) > bdirty(bp); > } > if (bp->b_iocmd == BIO_WRITE && (bp->b_ioflags & BIO_ERROR) && > + (bp->b_error != ENXIO || !LIST_EMPTY(&bp->b_dep)) && > !(bp->b_flags & B_INVAL)) { > /* > - * Failed write, redirty. Must clear BIO_ERROR to prevent > - * pages from being scrapped. > + * Failed write, redirty. All errors except ENXIO (which > + * means the device is gone) are expected to be potentially > + * transient - underlying media might work if tried again > + * after EIO, and memory might be available after an ENOMEM. > + * > + * Do this also for buffers that failed with ENXIO, but have > + * non-empty dependencies - the soft updates code might need > + * to access the buffer to untangle them. > + * > + * Must clear BIO_ERROR to prevent pages from being scrapped. > */ This is hard to fix, but I have used a version that only retries after EIO for 15-20 years. I didn't think of ENOMEM. The media is unlikely to come back after EIO too. For removable media, you might be able to get the write done to new media, but a panic reading from the new media is just as likely. Geom "tasting" might prevent the new media being used. ENXIO is actually the one error that can often be recovered from. I wrote a form of "tasting" in a toy OS 30-35 years ago. It handled removal of "mounted" disks with pending writes too well, in a way that made recovery from non-transient I/O errors almost impossible without turning off the system. ENXIO was treated as a transient I/O error. It was recovered from perfectly if the user could find the original media and unremove it. The "tasting" usually worked to detect different media and disallow writing cached data to a different disk. Media errors were common, and when one occurred for writing the method of replacing the disk by a garbage one did't work since it was a different disk. The most common one was writing to a write protected disk, and that was recoverable by removing the write protection. But often you really didn't want to write to that disk, but wanted to write somewhere. The only way to continue was to reboot to discard the write. Bruce From owner-svn-src-head@freebsd.org Fri Apr 14 21:40:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CF6ED3C32E; Fri, 14 Apr 2017 21:40:31 +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 E07F0CF1; Fri, 14 Apr 2017 21:40:30 +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 2BCDC10A7B9; Fri, 14 Apr 2017 17:40:23 -0400 (EDT) From: John Baldwin To: Ngie Cooper Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r316938 - head/sbin/savecore Date: Fri, 14 Apr 2017 14:40:18 -0700 Message-ID: <1940104.87G28XVdqf@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201704141941.v3EJfmCW003347@repo.freebsd.org> References: <201704141941.v3EJfmCW003347@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, 14 Apr 2017 17:40:23 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 21:40:31 -0000 On Friday, April 14, 2017 07:41:48 PM Ngie Cooper wrote: > Author: ngie > Date: Fri Apr 14 19:41:48 2017 > New Revision: 316938 > URL: https://svnweb.freebsd.org/changeset/base/316938 > > Log: > savecore: fix space calculation with respect to `minfree` in check_space(..) > > - Use strtoll(3) instead of atoi(3), because atoi(3) limits the > representable data to INT_MAX. Check the values received from > strtoll(3), trimming trailing whitespace off the end to maintain > POLA. > - Use `KiB` instead of `kB` when describing free space, total space, > etc. I am now fully aware of `KiB` being the IEC standard for 1024 > bytes and `kB` being the IEC standard for 1000 bytes. I will just rant lightly that no one actually uses this in the real world. Good lucking finding a "16 GiB" DIMM on crucial.com or a 4Kin drive. A kilobyte is a power of 2. The End. (Next up we'll have to rename 4k displays to 4k) -- John Baldwin From owner-svn-src-head@freebsd.org Fri Apr 14 21:53:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 36D7AD3C8C7; Fri, 14 Apr 2017 21:53:01 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x244.google.com (mail-pf0-x244.google.com [IPv6:2607:f8b0:400e:c00::244]) (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 EB46CA6C; Fri, 14 Apr 2017 21:53:00 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x244.google.com with SMTP id c198so16676760pfc.0; Fri, 14 Apr 2017 14:53:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=DouJjrZtawbv5aB7UicdReH5kJHRfbk0BzTXHYzGiOU=; b=I1NX1HCeyBgBTVmDs/fx/cw7KLnfNHxKTk8nmzEee28g2D1IW6Mi37Q86MsO8TwMKM j44LKstXTn3S4GG5dsVohtNOl7odJ/z9YOZ3D1+XjP+VL6w+eieNrGGSI4YWQhrIE6j5 0FGvjS9BLiw46WJ9/mBB8UMxWbpr+0Lbqr0z2e6txz0pbL2AH+d2jqwy3UJS0u4CsZGS Ouko6Z4+5ejFxEQK2G8J1TA9YUb80HUmyxyVMlsRrrWTEtrYa5cA8nQLdpOeOiBOe8u/ B8HfBV4cLMKFS6Qmk1jNi5B3TONCv2TbpMezrVp6gJMaw+H9+kym/ck4dj/gvs5YpG0X klUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=DouJjrZtawbv5aB7UicdReH5kJHRfbk0BzTXHYzGiOU=; b=niHfm/ODD03oHUlMmAl+gxWr6Ysmnn2iZcu1IEFtPmcg34xjXIg0q8qQoJeCbPE8xN f/u0s5m/wZYJD1MjWavp4jBdZMmapD59OR4pY3v87Jrg1g6NBfxCvsKt2bDrzfrjbgX/ dwcoiQkfJg7OhLJLTaHa0uHDCsokVcd9/Kv8hBcql9x9QbU1oBoaSXogexRuCjEsfPD7 BWKL06sRNd5abzqr/ZXgj4Fou5rEAV9p05UXIsvrBrgfuUcJloUQxRh2T5k1xDTb9kk7 WzP3HDViXk+y3fDv4n6V5lt1blfdCGxwiBWtMxcWcXmC6VMAhMpH1U3s/uw4ypcPVPRo f1Ig== X-Gm-Message-State: AN3rC/4narnkNHo+FJxiKLG5Pg7bd0kR6BnmV3VBmPsXCOWWBarK9glr cdKfA05YttwhXOpHrcI= X-Received: by 10.98.130.10 with SMTP id w10mr8784118pfd.12.1492206780327; Fri, 14 Apr 2017 14:53:00 -0700 (PDT) Received: from fuji-wireless.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id q70sm4897380pgq.45.2017.04.14.14.52.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Apr 2017 14:52:58 -0700 (PDT) From: "Ngie Cooper (yaneurabeya)" Message-Id: <6B556967-35B0-4F4F-9F1E-C088F8D48C80@gmail.com> Content-Type: multipart/signed; boundary="Apple-Mail=_D8477057-EBD8-4E0F-93BC-4449869DD05B"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r316938 - head/sbin/savecore Date: Fri, 14 Apr 2017 14:52:56 -0700 In-Reply-To: <1940104.87G28XVdqf@ralph.baldwin.cx> Cc: Ngie Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org To: John Baldwin References: <201704141941.v3EJfmCW003347@repo.freebsd.org> <1940104.87G28XVdqf@ralph.baldwin.cx> X-Mailer: Apple Mail (2.3273) X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 21:53:01 -0000 --Apple-Mail=_D8477057-EBD8-4E0F-93BC-4449869DD05B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Apr 14, 2017, at 2:40 PM, John Baldwin wrote: >=20 > On Friday, April 14, 2017 07:41:48 PM Ngie Cooper wrote: >> Author: ngie >> Date: Fri Apr 14 19:41:48 2017 >> New Revision: 316938 >> URL: https://svnweb.freebsd.org/changeset/base/316938 >>=20 >> Log: >> savecore: fix space calculation with respect to `minfree` in = check_space(..) >>=20 >> - Use strtoll(3) instead of atoi(3), because atoi(3) limits the >> representable data to INT_MAX. Check the values received from >> strtoll(3), trimming trailing whitespace off the end to maintain >> POLA. >> - Use `KiB` instead of `kB` when describing free space, total space, >> etc. I am now fully aware of `KiB` being the IEC standard for 1024 >> bytes and `kB` being the IEC standard for 1000 bytes. >=20 > I will just rant lightly that no one actually uses this in the real = world. >=20 > Good lucking finding a "16 GiB" DIMM on crucial.com = or a 4Kin drive. A > kilobyte is a power of 2. The End. >=20 > (Next up we'll have to rename 4k displays to > 4k) https://media0.giphy.com/media/7rj2ZgttvgomY/giphy.gif = :P. -Ngie --Apple-Mail=_D8477057-EBD8-4E0F-93BC-4449869DD05B Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJY8US5AAoJEPWDqSZpMIYVCfUP/3wA5+5dTcBrRjYxgWZQ2o1X RRumpB5eNc12qs5dz64H3gpPdFYfaAqop0EGXWX/wJxS/8SpJVV5PEOMy2pBH7ag 8L33dfRJAh7UxeC1MM8ms0q7TsP7cIRXcYr+cAjL+n/R+1u5n8AkIiTJKX64bdBl HSo6CLpRT8UrkHTPXPSGYx014D3hU/YOY1TwuzOm70I1x4uqQl1oxv3hSCSeOlWW OBAaxuIRO8O2+6GYf/cPQZsfX2GDdlLWls/9nv47CRC7JD/AcksYaCVm2X8WA4nj czN1Dwtm60aPjFAltfChgi8m+yedJD36BvfT0WAm1eL1ZW7qYN6ATjS1HaWpuUnk Tcg1O/TMB8StpdamzI5TCXgANS2Xw45/IB9NAEHGrqohztxX6CHfudIrPpHWCOil 3gDt54YlNlPSeAFDu+6dA+/W3CqtIo75DufPVFutVAhmZFIOaS7IFswTqIWzM/d4 KXKle7ViKyT+KnGHuolHMpmA0+acf9HVFN0zQLNYVnCXwk9vWE5knKNymg7YkfJZ 5yJndqZQg+02RcH8rJoJjQ2DhflItAJQvfPI4c1QueOPHHMCCLrb9UkHkRSos8Np B8lgFHoXAxzybVAjweqr1R3nNIiJPH78niD9ZLhftDQHOI/izNvekT0Gb6ytFeYE iIslnKaBhFyHx6wog75J =eVXV -----END PGP SIGNATURE----- --Apple-Mail=_D8477057-EBD8-4E0F-93BC-4449869DD05B-- From owner-svn-src-head@freebsd.org Fri Apr 14 22:00:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2FFD2D3C9CD; Fri, 14 Apr 2017 22:00:40 +0000 (UTC) (envelope-from peter@wemm.org) Received: from smtp2.wemm.org (smtp2.wemm.org [IPv6:2001:470:67:39d::78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp2.wemm.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 102F8C39; Fri, 14 Apr 2017 22:00:39 +0000 (UTC) (envelope-from peter@wemm.org) Received: from overcee.wemm.org (canning.wemm.org [192.203.228.65]) by smtp2.wemm.org (Postfix) with ESMTP id F3525400; Fri, 14 Apr 2017 15:00:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=m20140428; t=1492207239; bh=fXgRQ2q2E5wm0YvlJSJyZHDaHkg1bU4iLzzfqNnJBl4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=uuTDIqRdb5Zg+UYhdfGvz/CrR8Ttap/G8SWnmL9zDEC9qRKBYGDNO+rA03At4ddRx eCmoVUY9MvG0jeRPqFybOGmelj139MMZEMjtJebvW1cwjmz6kSpvrmTNL2kXjGHmNM 0/EMnHjLlwNi2XZ1WQnG1liR8vIm7l9uIaKI8ciU= From: Peter Wemm To: Maxim Sobolev Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Hiren Panchasara Subject: Re: svn commit: r316874 - head/sys/kern Date: Fri, 14 Apr 2017 15:00:34 -0700 Message-ID: <57394216.x4KIjm5Ndu@overcee.wemm.org> User-Agent: KMail/4.14.10 (FreeBSD/12.0-CURRENT; KDE/4.14.10; amd64; ; ) In-Reply-To: References: <201704141723.v3EHNS3B043902@repo.freebsd.org> <6942092.OsECkgAp13@overcee.wemm.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1570723.Szc7POMjpa"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 22:00:40 -0000 --nextPart1570723.Szc7POMjpa Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="us-ascii" On Friday, April 14, 2017 02:21:05 PM Maxim Sobolev wrote: > Peter, It is actually the other way around. If you take syslogd code = out of > 11-stable and earlier that would work just fine with or without r3168= 74. > But since r285910 syslogd in head had been refactored a lot and I thi= nk > that particular bug has introduced that has been masked by the shutdo= wn() > on datagram sockets becoming a NOP after r285910. Then r316874 restor= ed our > historical behavior for the shutdown(2) and bingo, bug in the new sys= logd > code is now causing it to spin when shutdown() !=3D NOP. Ok, this makes sense. Just to be sure I'm on the same page, I should apply the syslogd.diff f= rom a=20 few messages ago and restore the shutdown(2) kernel code and give it a = spin. =20 Correct? =2DPeter > -Max >=20 > On Fri, Apr 14, 2017 at 12:46 PM, Peter Wemm wrote: > > On Friday, April 14, 2017 12:41:52 PM Maxim Sobolev wrote: > > > Thanks, Peter. I will try to look into this asap. > >=20 > > I don't understand what is going on yet. Presumably there must be o= ther > > changes in play that affect udp/select sometime between the origina= l 2015 > > change and this. The syslogd -s code is Old(TM). I'm also wonderin= g > > whether > > the -s code even works at all since the 2015 / r285910 change... > >=20 > > > -Max > > >=20 > > > On Apr 14, 2017 12:32 PM, "Peter Wemm" wrote: > > > > On Friday, April 14, 2017 11:49:26 AM Peter Wemm wrote: > > > > > On Friday, April 14, 2017 05:23:28 PM Maxim Sobolev wrote: > > > > > > Author: sobomax > > > > > > Date: Fri Apr 14 17:23:28 2017 > > > > > > New Revision: 316874 > > > > > > URL: https://svnweb.freebsd.org/changeset/base/316874 > > > > > >=20 > > > > > > Log: > > > > > > Restore ability to shutdown DGRAM sockets, still forcing > >=20 > > ENOTCONN to > >=20 > > > > be > > > >=20 > > > > > > returned by the shutdown(2) system call. This ability has b= een > >=20 > > lost as > >=20 > > > > > > part > > > > > > of the svn revision 285910. > > > > > >=20 > > > > > > Reviewed by: ed, rwatson, glebius, hiren > > > > > > MFC after: 2 weeks > > > > > > Differential Revision: https://reviews.freebsd.org/D10= 351 > > > > >=20 > > > > > This appears to have broken syslogd and had a major change in= > >=20 > > behavior > >=20 > > > > with > > > >=20 > > > > > regards to select(2). > > > > >=20 > > > > > If you run syslogd with the -s flag (which is default), it no= w spins > >=20 > > at > >=20 > > > > 100% > > > >=20 > > > > > cpu as all the shutdown sockets now return readable from sele= ct. > > > > >=20 > > > > > Old releases / jails also manifest this behavor. If it wasn'= t for > > > > > losing > > > > > the ability to run old branch binaries I'd suggest changing s= yslogd > > > > > instead, but we depend on this in the cluster and I expect ot= hers do > > > > > too. > > > > >=20 > > > > > I'm not 100% certain that this change is the culprit but a he= ads-up > > > > > can't > > > > > hurt. I'll try reverting it on the freebsd cluster next, afte= r > > > > > fixing > > > > > the > > > > > broken auditing changes. > > > > >=20 > > > > > -Peter > > > >=20 > > > > I can confirm that reverting r316874 fixes syslogd and backward= s > > > > compatability > > > > with old branches. > > > >=20 > > > > -- > > > > Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc= .com; > > > > KI6FJV > > > > UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246= > >=20 > > -- > > Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com= ; > > KI6FJV > > UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246 =2D-=20 Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI= 6FJV UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246 --nextPart1570723.Szc7POMjpa Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEBgrA0Vr/vfNVuPoUNdaXCeyAngQFAljxRoIACgkQNdaXCeyA ngREUQf8DY28PmkYhSKmWCSz4JA1TNcgiLCFr6ybdF9FSzjHQqXph7OOFa/Galwo G14G9x1QinloDPC8bERnnOwmkJoOAr6dH4SSMsmGva00o6N8L2QJ/cUHZsntS0a9 gOnz77N3VDoRcg9x29N9LwteovKNraXRddefG+fZopkfepiBs0Xy9NHamsdodlag fN/2lThxfYNjqs+A9KWnkhOgdHal7nnwC1zhwG05I7S/0vnJRnH9j6BG+DJvo9Yh MSpyZ5fb0h62Qw61eoUtGVsr5Wz6ln1/XO+6xkCUjZwSnoTZribUaXoEH9aLArRE Uz94Fy5Uy19VNcLIffN5Kb2ERKpuLA== =wok4 -----END PGP SIGNATURE----- --nextPart1570723.Szc7POMjpa-- From owner-svn-src-head@freebsd.org Fri Apr 14 22:05:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ABB50D3CD77; Fri, 14 Apr 2017 22:05:47 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qt0-x235.google.com (mail-qt0-x235.google.com [IPv6:2607:f8b0:400d:c0d::235]) (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 627172C1; Fri, 14 Apr 2017 22:05:47 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qt0-x235.google.com with SMTP id c45so71856139qtb.1; Fri, 14 Apr 2017 15:05:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=7gopmosH31OJwG+IolzNb79ufMc3IE6ZJvahzevUjHM=; b=Fy3+1q22QWwTSPhR1Egbd9JXHFQYcRvMZlL0VQCHPgmxS40yO/PBjb7Na2h4D3jCbY iA2/F24pbWu735ZOuZFGNW5QpNbgoPKAgYdF8Gx3YEvzZMuqxoD2NZivJBOYSFD3KZu6 hu6W0ZA4/zLd2Q1+yqJgYVVZbxn0HW6iK8/25A33I4zKQVJnxsFga3S4yOig4CJVv6PF lxH7OM3Fq8eAaXOZlo1ww4HSwFLt3Oz22YXrsYhfBFXnoAAjnOeNEe08F/+YMGBiourG ex6uOfn4c0UilhHSKCzJXtrHp4jyEEWgEbKPa3LB7Ni2apmcMEnojAyJdYWsPHdaneRa tMRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=7gopmosH31OJwG+IolzNb79ufMc3IE6ZJvahzevUjHM=; b=o5jQ39wIdNNfAXEdQlwDlX8Gy7XyVgPA+wm45MjPTKC0Hh2+YeTEgfisurKeB2GUB7 y4z7v6MbV0Vt8PQjPqibPCHKNussVTUCnjDx5PtuizKvSsDQbY4QhmFpAuCcDRpb9nRH vbKAbQfjTUSuubh4sEf+CmADdpjbaoxdYDmKREJGd+1ojVwniVPKPn8p3Rx2peKbT2XZ DSoCbO+96XpjNg7cX8O1g960zSCj7On/RfdE/CaMnczIGf50iVDkEvG4dlIJHrkEzd7m 0zjoCK9pB/9l9SytDghFvhObx6ziOie7E+7bfhimrhfLhhcG8nDMMJmdVXaGWHSxqOkE yqQg== X-Gm-Message-State: AN3rC/5laKizfZF37qatmzh/5azp4aQZDAhg02jkSAZRdbjLHTwUc3I6 ziXUHUZawm2Bgg== X-Received: by 10.237.36.212 with SMTP id u20mr9823403qtc.217.1492207546548; Fri, 14 Apr 2017 15:05:46 -0700 (PDT) Received: from wkstn-mjohnston.west.isilon.com (c-76-104-201-218.hsd1.wa.comcast.net. [76.104.201.218]) by smtp.gmail.com with ESMTPSA id t22sm2023063qke.49.2017.04.14.15.05.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Apr 2017 15:05:45 -0700 (PDT) Sender: Mark Johnston Date: Fri, 14 Apr 2017 15:05:25 -0700 From: Mark Johnston To: Xin LI Cc: Alan Somers , Ngie Cooper , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r316938 - head/sbin/savecore Message-ID: <20170414220525.GF5039@wkstn-mjohnston.west.isilon.com> References: <201704141941.v3EJfmCW003347@repo.freebsd.org> <20170414202918.GD5039@wkstn-mjohnston.west.isilon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.0 (2017-02-23) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 22:05:47 -0000 On Fri, Apr 14, 2017 at 02:28:57PM -0700, Xin LI wrote: > On Fri, Apr 14, 2017 at 1:29 PM, Mark Johnston wrote: > > - I'm not sure how encryption should compose with compression. It seems > > intuitively obvious that we should compress before encrypting if the > > compression is to be of any use, but I don't know enough to know > > whether the compression might somehow compromise the effectiveness of > > the encryption. > > I think the biggest concern is the added code involved in the dump > process (which happen when the kernel is already unhealthy), which can > jeopardize it and defeat the usefulness of having a crash dump being > set up in the first place. I agree in principle but this doesn't appear to cause problems in practice. zlib allocates memory only at initialization time, so its requirements in panic context are quite minimal. I wrote a little bit of zlib glue, used currently for compressed userland core dumps, which works properly in panic context as well. > And with textdumps available, the benefit > of having compression is limited because we can request for minidump > or full dumps only when the textdumps are not good enough for > diagnosing the kernel bug. Sure, but in this case the compression may be vital. > > I don't think security (e.g. leaking information because of the use of > compression) is a very big concern in this context because in order > for the potential attacker to read the raw material needs a > compromised system (unlike an attack from the network, where someone > who controls the network would have access to the raw material); the > dump is usually quite large, and measuring downtime would be hard at > that scale. Ok. > > By the way (not meant to bikeshed) if I was to do this I'd prefer > using lz4 or something that compresses faster than zlib. I agree, but I think the existing lz4 implementation in the kernel is not so well suited to running after a panic. It seems fixable, but compression speed also isn't hugely important here IMO. From owner-svn-src-head@freebsd.org Fri Apr 14 22:59:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5975AD3DBC8; Fri, 14 Apr 2017 22:59:16 +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 1E265E05; Fri, 14 Apr 2017 22:59:16 +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 v3EMxFCq083237; Fri, 14 Apr 2017 22:59:15 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3EMxEAa083233; Fri, 14 Apr 2017 22:59:14 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201704142259.v3EMxEAa083233@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 14 Apr 2017 22:59:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316945 - in head: etc/defaults etc/periodic/daily share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 22:59:16 -0000 Author: asomers Date: Fri Apr 14 22:59:14 2017 New Revision: 316945 URL: https://svnweb.freebsd.org/changeset/base/316945 Log: Add 410.status-mfi, a periodic script for mfi(4) arrays PR: 176049 Submitted by: doconnor@gsoft.com.au Reviewed by: scottl, Larry Rosenman MFC after: 3 weeks Relnotes: yes Added: head/etc/periodic/daily/410.status-mfi (contents, props changed) Modified: head/etc/defaults/periodic.conf head/etc/periodic/daily/Makefile head/share/man/man5/periodic.conf.5 Modified: head/etc/defaults/periodic.conf ============================================================================== --- head/etc/defaults/periodic.conf Fri Apr 14 22:02:08 2017 (r316944) +++ head/etc/defaults/periodic.conf Fri Apr 14 22:59:14 2017 (r316945) @@ -112,6 +112,9 @@ daily_status_gstripe_enable="NO" # Che # 409.status-gconcat daily_status_gconcat_enable="NO" # Check gconcat(8) +# 410.status-mfi +daily_status_mfi_enable="NO" # Check mfiutil(8) + # 420.status-network daily_status_network_enable="YES" # Check network status daily_status_network_usedns="YES" # DNS lookups are ok Added: head/etc/periodic/daily/410.status-mfi ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/periodic/daily/410.status-mfi Fri Apr 14 22:59:14 2017 (r316945) @@ -0,0 +1,33 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$daily_status_mfi_enable" in + [Yy][Ee][Ss]) + echo + echo 'Checking status of mfi(4) devices:' + + if mfiutil show volumes; then + if mfiutil show volumes | grep -q DEGRADED; then + rc=3 + else + rc=0 + fi + else + rc=2 + fi + ;; + + *) rc=0;; +esac + +exit $rc Modified: head/etc/periodic/daily/Makefile ============================================================================== --- head/etc/periodic/daily/Makefile Fri Apr 14 22:02:08 2017 (r316944) +++ head/etc/periodic/daily/Makefile Fri Apr 14 22:59:14 2017 (r316945) @@ -13,6 +13,7 @@ FILES= 100.clean-disks \ 400.status-disks \ 401.status-graid \ 406.status-gmirror \ + 410.status-mfi \ 407.status-graid3 \ 408.status-gstripe \ 409.status-gconcat \ Modified: head/share/man/man5/periodic.conf.5 ============================================================================== --- head/share/man/man5/periodic.conf.5 Fri Apr 14 22:02:08 2017 (r316944) +++ head/share/man/man5/periodic.conf.5 Fri Apr 14 22:59:14 2017 (r316945) @@ -399,6 +399,15 @@ if you want to run on your .Xr gconcat 8 devices. +.It Va daily_status_mfi_enable +.Pq Vt bool +Set to +.Dq Li YES +if you want to run +.Nm mfiutil Cm status +on your +.Xr mfi 4 +devices. .It Va daily_status_network_enable .Pq Vt bool Set to From owner-svn-src-head@freebsd.org Fri Apr 14 23:08:51 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC8C7D3E0EF; Fri, 14 Apr 2017 23:08:51 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.81]) (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 8D638A3E; Fri, 14 Apr 2017 23:08:51 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smtp.greenhost.nl ([213.108.104.138]) by smarthost1.greenhost.nl with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1czAKe-0001nR-51; Sat, 15 Apr 2017 01:08:48 +0200 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, "Stanislav Galabov" Subject: Re: svn commit: r313343 - head/sys/arm/arm References: <201702061458.v16EwOjU015633@repo.freebsd.org> Date: Sat, 15 Apr 2017 01:08:47 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Ronald Klop" Message-ID: In-Reply-To: <201702061458.v16EwOjU015633@repo.freebsd.org> User-Agent: Opera Mail/12.16 (FreeBSD) X-Authenticated-As-Hash: 398f5522cb258ce43cb679602f8cfe8b62a256d1 X-Virus-Scanned: by clamav at smarthost1.samage.net X-Spam-Level: / X-Spam-Score: -0.2 X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 autolearn=disabled version=3.4.0 X-Scan-Signature: 3ced5df4177ef3a93a84b902ce7c160e X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 23:08:51 -0000 With this change merged to 11-CURRENT my SHEEVAPLUG/arm displays different information in dmesg: messages:Apr 15 00:53:07 sheeva2 kernel: Little-endian DC enabled IC enabled WA disabled DC streaming enabled messages:Apr 15 00:53:07 sheeva2 kernel: WB enabled LABT branch prediction enabled messages.0.bz2:Apr 11 20:02:06 sheeva2 kernel: Little-endian DC enabled IC disabled WA disabled DC streaming enabled messages.0.bz2:Apr 11 20:02:06 sheeva2 kernel: WB enabled LABT branch prediction disabled IC changed from disabled to enabled and LABT branch prediction is displayed as enabled also. Is this only cosmetically? Or does it really change behaviour? Anybody willing to MFC this 11? Regards, Ronald. On Mon, 06 Feb 2017 15:58:24 +0100, Stanislav Galabov wrote: > Author: sgalabov > Date: Mon Feb 6 14:58:24 2017 > New Revision: 313343 > URL: https://svnweb.freebsd.org/changeset/base/313343 > > Log: > sys/arm/arm/identcpu-v4.c: fix identify_arm_cpu() > identify_arm_cpu() in sys/arm/arm/identcpu-v4.c incorrectly uses a > u_int8_t variable to store the result of cpu_get_control(). > It should really use a u_int variable, the same way as done for > cpu_ident() > in the same function, as both cpuid and control registers are 32-bit.. > This issue causes users of identcpu-v4 to incorrectly report things > such as > icache status (bit 12 in cpu control register) and basically anything > defined in bits above bit 7 :-) > Reviewed by: manu > Sponsored by: Smartcom - Bulgaria AD > Differential Revision: https://reviews.freebsd.org/D9460 > > Modified: > head/sys/arm/arm/identcpu-v4.c > > Modified: head/sys/arm/arm/identcpu-v4.c > ============================================================================== > --- head/sys/arm/arm/identcpu-v4.c Mon Feb 6 14:41:34 2017 (r313342) > +++ head/sys/arm/arm/identcpu-v4.c Mon Feb 6 14:58:24 2017 (r313343) > @@ -294,8 +294,7 @@ u_int cpu_pfr(int num) > void > identify_arm_cpu(void) > { > - u_int cpuid; > - u_int8_t ctrl; > + u_int cpuid, ctrl; > int i; > ctrl = cpu_get_control(); > _______________________________________________ > svn-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-head@freebsd.org Fri Apr 14 23:11:43 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 07A45D3E294 for ; Fri, 14 Apr 2017 23:11:43 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-ua0-x22e.google.com (mail-ua0-x22e.google.com [IPv6:2607:f8b0:400c:c08::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 B35E5CA0 for ; Fri, 14 Apr 2017 23:11:42 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-ua0-x22e.google.com with SMTP id h2so25321383uaa.1 for ; Fri, 14 Apr 2017 16:11:42 -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=jWMSvyKxdaiuuUhvRIKfCzvv1JA9vhTsPTvetYEXbk0=; b=fRIssKpkcWHgsmVWV+yYAmi6sJgU3XtzImajapeqa+9XWL1G2V+QTAKLS7QOzb9v8/ gg/TMXc/tyQQi6j59nqjgznuBNfzt3GbRnIMKs7mt4F/bajjQz9QvXgsOBtE9eUEzCuf KCU48h+hYYMKoA5+JejBzyI6cbaX6+CbR3Ur/hlut67A758EK51jjJ/z2M5HtlcHEPh6 OCu6eFwCJ10ACbhmv7pTTQUSECHb/lRVf/jrTe4nVmKcrcyD2iDlcuuMtZlpjp+5KeTy mJaN+trHiZAsBc0Y30If5FQfau1oZ107xyveb142wFA/Ta23WHj91DqR7noJ/i4A845u YWig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=jWMSvyKxdaiuuUhvRIKfCzvv1JA9vhTsPTvetYEXbk0=; b=t3Q4MqjNAb8GX+guN1QTmCD5A23xNoYJ7g+22kZiv/m3TMwWo2TLUliz8Fat/1VYO4 2E0JNf2ET1sQT4N/+cwqk25wuEvX7JF536PVfQaeWLtwisvB/IjWWRoVJQSVrYnvKHh8 netXKxnBOSCCUFw0PPhI5Met3hVZFpwDnHngs/Lz3xeGFXB6yFpKh7zkhyqWrfRQzwGv wdYzD1FSBxqHfZ9AA9kbRbR8dS9TGrmOIlOvL/EH4io+CaaFwOvs5LlRR5Ju8S2TrkjP VZARVNVt6NvZXQBS2l5dUEe3BueX9lbZdDti16TTJTi56Ae4j6i5ygiuYAjWZimVy6qZ L9RQ== X-Gm-Message-State: AN3rC/7Ni19KMG4WgEwz0Qy2J8YT67SrXG2ImjPWbHg0IK/Tj15OUxTe Uk0btmf5QzGlXPzMclhgLirvIMRYUU+y X-Received: by 10.176.91.8 with SMTP id u8mr5037084uae.150.1492211501769; Fri, 14 Apr 2017 16:11:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.0.79 with HTTP; Fri, 14 Apr 2017 16:11:41 -0700 (PDT) In-Reply-To: <201704142259.v3EMxEAa083233@repo.freebsd.org> References: <201704142259.v3EMxEAa083233@repo.freebsd.org> From: Oliver Pinter Date: Sat, 15 Apr 2017 01:11:41 +0200 Message-ID: Subject: Re: svn commit: r316945 - in head: etc/defaults etc/periodic/daily share/man/man5 To: Alan Somers Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 23:11:43 -0000 On Saturday, April 15, 2017, Alan Somers wrote: > Author: asomers > Date: Fri Apr 14 22:59:14 2017 > New Revision: 316945 > URL: https://svnweb.freebsd.org/changeset/base/316945 > > Log: > Add 410.status-mfi, a periodic script for mfi(4) arrays > > PR: 176049 > Submitted by: doconnor@gsoft.com.au > Reviewed by: scottl, Larry Rosenman > > MFC after: 3 weeks > Relnotes: yes > > Added: > head/etc/periodic/daily/410.status-mfi (contents, props changed) > Modified: > head/etc/defaults/periodic.conf > head/etc/periodic/daily/Makefile > head/share/man/man5/periodic.conf.5 > > Modified: head/etc/defaults/periodic.conf > ============================================================ > ================== > --- head/etc/defaults/periodic.conf Fri Apr 14 22:02:08 2017 > (r316944) > +++ head/etc/defaults/periodic.conf Fri Apr 14 22:59:14 2017 > (r316945) > @@ -112,6 +112,9 @@ daily_status_gstripe_enable="NO" # > Che > # 409.status-gconcat > daily_status_gconcat_enable="NO" # Check gconcat(8) > > +# 410.status-mfi > +daily_status_mfi_enable="NO" # Check mfiutil(8) > + > # 420.status-network > daily_status_network_enable="YES" # Check network > status > daily_status_network_usedns="YES" # DNS lookups are > ok > > Added: head/etc/periodic/daily/410.status-mfi > ============================================================ > ================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/etc/periodic/daily/410.status-mfi Fri Apr 14 22:59:14 2017 > (r316945) > @@ -0,0 +1,33 @@ > +#!/bin/sh > +# > +# $FreeBSD$ > +# > + > +# If there is a global system configuration file, suck it in. > +# > +if [ -r /etc/defaults/periodic.conf ] > +then > + . /etc/defaults/periodic.conf > + source_periodic_confs > +fi > + > +case "$daily_status_mfi_enable" in > + [Yy][Ee][Ss]) > + echo > + echo 'Checking status of mfi(4) devices:' > + > + if mfiutil show volumes; then > + if mfiutil show volumes | grep -q DEGRADED; then > + rc=3 > + else > + rc=0 > + fi > + else > + rc=2 > + fi > + ;; > + > + *) rc=0;; > +esac > + > +exit $rc > > Modified: head/etc/periodic/daily/Makefile > ============================================================ > ================== > --- head/etc/periodic/daily/Makefile Fri Apr 14 22:02:08 2017 > (r316944) > +++ head/etc/periodic/daily/Makefile Fri Apr 14 22:59:14 2017 > (r316945) > @@ -13,6 +13,7 @@ FILES= 100.clean-disks \ > 400.status-disks \ > 401.status-graid \ > 406.status-gmirror \ > + 410.status-mfi \ This should be in different place, this list is ordered, as I see from this context. > 407.status-graid3 \ > 408.status-gstripe \ > 409.status-gconcat \ > > Modified: head/share/man/man5/periodic.conf.5 > ============================================================ > ================== > --- head/share/man/man5/periodic.conf.5 Fri Apr 14 22:02:08 2017 > (r316944) > +++ head/share/man/man5/periodic.conf.5 Fri Apr 14 22:59:14 2017 > (r316945) > @@ -399,6 +399,15 @@ if you want to run > on your > .Xr gconcat 8 > devices. > +.It Va daily_status_mfi_enable > +.Pq Vt bool > +Set to > +.Dq Li YES > +if you want to run > +.Nm mfiutil Cm status > +on your > +.Xr mfi 4 > +devices. > .It Va daily_status_network_enable > .Pq Vt bool > Set to > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org > " > From owner-svn-src-head@freebsd.org Fri Apr 14 23:29:29 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 934CBD3E563; Fri, 14 Apr 2017 23:29:29 +0000 (UTC) (envelope-from peter@wemm.org) Received: from smtp2.wemm.org (smtp2.wemm.org [192.203.228.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp2.wemm.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 76A2066B; Fri, 14 Apr 2017 23:29:28 +0000 (UTC) (envelope-from peter@wemm.org) Received: from overcee.wemm.org (canning.wemm.org [192.203.228.65]) by smtp2.wemm.org (Postfix) with ESMTP id 1B4E344A; Fri, 14 Apr 2017 16:29:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=m20140428; t=1492212568; bh=cMcMeJoAYRoCXlg7oUSdKI58oKccAOyLqdzRHi3f+Uw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=p4+fnF8e9p/ARQRzq7V01xxzIaKjlGcjYfJQ1PZLgejrCNlegGAr0k+D/xwM1ggJW WR8tlDksw0pClcG9JJgZTZAXPvDrqI55QOCgOKHCX56m/+XucTq0MjpHegDJtpiApl oWFdhxlf8BHq0qu/wacp8w5LTvWM5W6EDXj3NYew= From: Peter Wemm To: Maxim Sobolev Cc: "Ngie Cooper (yaneurabeya)" , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Hiren Panchasara Subject: Re: svn commit: r316874 - head/sys/kern Date: Fri, 14 Apr 2017 16:29:23 -0700 Message-ID: <3928506.Yjk9xjcQnh@overcee.wemm.org> User-Agent: KMail/4.14.10 (FreeBSD/12.0-CURRENT; KDE/4.14.10; amd64; ; ) In-Reply-To: References: <201704141723.v3EHNS3B043902@repo.freebsd.org> <513B1846-02E3-49E0-BAA2-CA923EDC5DFF@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart9883833.pL1s3BkVMp"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 23:29:29 -0000 --nextPart9883833.pL1s3BkVMp Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" On Friday, April 14, 2017 02:10:56 PM Maxim Sobolev wrote: > Peter, Ngie, >=20 > Looks like out of that refactoring came a logical bug that is present= in > the head, which causes syslod to first to shutdown the socket for rea= ding > and then try to select/recv on it (which is somewhat stupid). And tha= t > issue has been masked by shutdown() on datagram socket becoming effec= tively > a NOP in 11 & head 20 months ago. It only affects head though, 11-sta= ble > still has the old code which does not include that half-closed socket= into > the select list. Attached patch is expected to fix head, Peter, it wo= uld be > nice if you can give it a try (restoring latest changes into > uipc_sockets.c) and let me know if it helps. Confirmed - resting uipc_socket.c to HEAD and applying the patch to sys= logd=20 does solve the problem we encountered. Thanks! > Thanks! >=20 > On Fri, Apr 14, 2017 at 12:48 PM, Ngie Cooper (yaneurabeya) < >=20 > yaneurabeya@gmail.com> wrote: > > > On Apr 14, 2017, at 12:46, Peter Wemm wrote: > > >=20 > > > On Friday, April 14, 2017 12:41:52 PM Maxim Sobolev wrote: > > >> Thanks, Peter. I will try to look into this asap. > > >=20 > > > I don't understand what is going on yet. Presumably there must be= other > > > changes in play that affect udp/select sometime between the origi= nal > > > 2015 > > > change and this. The syslogd -s code is Old(TM). I'm also wonder= ing > >=20 > > whether > >=20 > > > the -s code even works at all since the 2015 / r285910 change... > >=20 > > syslogd has been refactored a lot on ^/head. I don=E2=80=99t think = it=E2=80=99s safe to > > say that the ^/head and ^/stable/11 and earlier copies will functio= n the > > same. > > Thanks, > > -Ngie =2D-=20 Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI= 6FJV UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246 --nextPart9883833.pL1s3BkVMp Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEBgrA0Vr/vfNVuPoUNdaXCeyAngQFAljxW1MACgkQNdaXCeyA ngTWkQf+O4ofbVLIQ6jlydSdqRO5AgThl07dr4cjRUMzZzldtqkjj/Zk5/SvvvwS 82aYqorZfxapvJIz13Vw0QXIJPeZbWII805+6KACbmWMkqYk9bNC/FhO0NKbfDeq wH/138PvFA6iyDhTmqknvLVyjvJFElanVJB6bLbBpcTAVqSqjyhJ5EyKYlZotscO ciP3yRxHRDKmhfsOsgG3PSIw48e1PR/KJmuYrnFb1UigEXFV35yonMxebPZbHIHQ oLWbk1re3oxGYoQYn7ZMk93O2wqohCR7HjOKOILIKNOCI5mhmz7JiKrPADUqr98e hfWEIR7+2IWPj0c9RMmbnUuIk1ZDkQ== =VKpE -----END PGP SIGNATURE----- --nextPart9883833.pL1s3BkVMp-- From owner-svn-src-head@freebsd.org Sat Apr 15 00:39:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0FC45D3D6E7; Sat, 15 Apr 2017 00:39:47 +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 C7C11831; Sat, 15 Apr 2017 00:39:46 +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 v3F0djgi023690; Sat, 15 Apr 2017 00:39:45 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3F0djY2023689; Sat, 15 Apr 2017 00:39:45 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201704150039.v3F0djY2023689@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sat, 15 Apr 2017 00:39:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316946 - head/etc/periodic/daily X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 00:39:47 -0000 Author: asomers Date: Sat Apr 15 00:39:45 2017 New Revision: 316946 URL: https://svnweb.freebsd.org/changeset/base/316946 Log: Reorder Makefile entries from r316945 PR: 176049 Reported by: Oliver Pinter MFC after: 3 weeks X-MFC-With: 316945 Modified: head/etc/periodic/daily/Makefile Modified: head/etc/periodic/daily/Makefile ============================================================================== --- head/etc/periodic/daily/Makefile Fri Apr 14 22:59:14 2017 (r316945) +++ head/etc/periodic/daily/Makefile Sat Apr 15 00:39:45 2017 (r316946) @@ -13,10 +13,10 @@ FILES= 100.clean-disks \ 400.status-disks \ 401.status-graid \ 406.status-gmirror \ - 410.status-mfi \ 407.status-graid3 \ 408.status-gstripe \ 409.status-gconcat \ + 410.status-mfi \ 420.status-network \ 430.status-uptime \ 450.status-security \ From owner-svn-src-head@freebsd.org Sat Apr 15 01:15:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95DC7D3E7E1; Sat, 15 Apr 2017 01:15:20 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 73B80FF9; Sat, 15 Apr 2017 01:15:20 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v3F1FBTn009133; Fri, 14 Apr 2017 18:15:11 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v3F1FAbU009132; Fri, 14 Apr 2017 18:15:10 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201704150115.v3F1FAbU009132@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r316936 - head/sys/dev/cxgbe/iw_cxgbe In-Reply-To: <201704141915.v3EJFVMX093441@repo.freebsd.org> To: Navdeep Parhar Date: Fri, 14 Apr 2017 18:15:10 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 01:15:20 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: np > Date: Fri Apr 14 19:15:31 2017 > New Revision: 316936 > URL: https://svnweb.freebsd.org/changeset/base/316936 > > Log: > cxgbe/iw_cxgbe: hw supports 64K (not 32K) Protection Domains. > > MFC after: 3 days > Sponsored by: Chelsio Communications > > Modified: > head/sys/dev/cxgbe/iw_cxgbe/t4.h > > Modified: head/sys/dev/cxgbe/iw_cxgbe/t4.h > ============================================================================== > --- head/sys/dev/cxgbe/iw_cxgbe/t4.h Fri Apr 14 18:56:00 2017 (r316935) > +++ head/sys/dev/cxgbe/iw_cxgbe/t4.h Fri Apr 14 19:15:31 2017 (r316936) > @@ -61,7 +61,7 @@ > > #define T4_MAX_NUM_QP (1<<16) > #define T4_MAX_NUM_CQ (1<<15) > -#define T4_MAX_NUM_PD (1<<15) > +#define T4_MAX_NUM_PD 65536 Why the change in methods of expressing powers of 2 here? This, imho, would better match the near by code as #define T4_MAX_NUM_PD (1<<16) > #define T4_EQ_STATUS_ENTRIES (L1_CACHE_BYTES > 64 ? 2 : 1) > #define T4_MAX_EQ_SIZE (65520 - T4_EQ_STATUS_ENTRIES) > #define T4_MAX_IQ_SIZE (65520 - 1) > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sat Apr 15 01:30:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7EC36D3D1BB; Sat, 15 Apr 2017 01:30:19 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 681ACA27; Sat, 15 Apr 2017 01:30:19 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v3F1UHg1009182; Fri, 14 Apr 2017 18:30:17 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v3F1UHpR009181; Fri, 14 Apr 2017 18:30:17 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201704150130.v3F1UHpR009181@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r316938 - head/sbin/savecore In-Reply-To: <20170414202918.GD5039@wkstn-mjohnston.west.isilon.com> To: Mark Johnston Date: Fri, 14 Apr 2017 18:30:17 -0700 (PDT) CC: Alan Somers , Ngie Cooper , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 01:30:19 -0000 > On Fri, Apr 14, 2017 at 01:49:51PM -0600, Alan Somers wrote: > > On Fri, Apr 14, 2017 at 1:41 PM, Ngie Cooper wrote: > > > Author: ngie > > > Date: Fri Apr 14 19:41:48 2017 > > > New Revision: 316938 > > > URL: https://svnweb.freebsd.org/changeset/base/316938 > > > > > > Log: > > > savecore: fix space calculation with respect to `minfree` in check_space(..) > > > > > > - Use strtoll(3) instead of atoi(3), because atoi(3) limits the > > > representable data to INT_MAX. Check the values received from > > > strtoll(3), trimming trailing whitespace off the end to maintain > > > POLA. > > > - Use `KiB` instead of `kB` when describing free space, total space, > > > etc. I am now fully aware of `KiB` being the IEC standard for 1024 > > > bytes and `kB` being the IEC standard for 1000 bytes. > > > - Store available number of KiB in `available` so it can be more > > > easily queried and compared to ensure that there are enough KiB to > > > store the dump image on disk. > > > - Print out the reserved space on disk, per `minfree`, so end-users > > > can troubleshoot why check_space(..) is reporting that there isn't > > > enough free space. > > > > > > MFC after: 7 weeks > > > Reviewed by: Anton Rang (earlier diff), cem (earlier diff) > > > Tested with: positive/negative cases (see review); make tinderbox > > > Sponsored by: Dell EMC Isilon > > > Differential Revision: D10379 > > > > The free space calculation is still uselessly conservative, because it > > doesn't account for the fact that core dumps will always be either > > spare or compressed. The result is that savecore will frequently > > refuse to save corefiles even when there's plenty of space. I > > proposed removing the space check altogether in > > https://reviews.freebsd.org/D2587. However, I agreed to wait until > > after the compressed core dump feature was merged, because then mostly > > accurate space checks will be possible. AFAIK the compressed core > > dump feature still hasn't been finished. > > I had held off on it for a while because it was going to conflict with > the work to add encrypted dump support, which of course has finished. > > The patch to add compression support is here and should largely still > work: > https://people.freebsd.org/~markj/patches/core-compression/20141110-kern_dump.diff > > I've been hesitant about pushing it forward: > - The dump_write* APIs need some simplification after the addition of > encrypted dump support and support for dumping to 4Kn drives. > - I'm not sure how encryption should compose with compression. It seems > intuitively obvious that we should compress before encrypting if the > compression is to be of any use, but I don't know enough to know > whether the compression might somehow compromise the effectiveness of > the encryption. > > If anyone has some insight on the second of these two points, I'd > appreciate hearing it. I have a large amount of reworking and modulization of the dump code incuding intergration of your (markj) compressed dumps. Layer isnt implemented but is in the plan. I should not of held off on the net dump code as it got smashed by encrypted dumps, then again by the libif'ing for all the Intel drives that had been netdump modified. Basically now starting over :-( Minidump is an lkm for me, and main dump is almost an lkm for me too. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sat Apr 15 01:35:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B51ABD3D3F4 for ; Sat, 15 Apr 2017 01:35:31 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 95C58E55 for ; Sat, 15 Apr 2017 01:35:31 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v3F1ZEc7009212; Fri, 14 Apr 2017 18:35:14 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v3F1ZD2S009211; Fri, 14 Apr 2017 18:35:13 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201704150135.v3F1ZD2S009211@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r316938 - head/sbin/savecore In-Reply-To: To: Larry Rosenman Date: Fri, 14 Apr 2017 18:35:13 -0700 (PDT) CC: "Ngie Cooper (yaneurabeya)" , "src-committers@freebsd.org" , Alan Somers , "svn-src-all@freebsd.org" , Slawa Olhovchenkov , "svn-src-head@freebsd.org" , Ngie Cooper Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 01:35:31 -0000 > On 4/14/17, 3:39 PM, "Ngie Cooper (yaneurabeya)" wrote: > > > > On Apr 14, 2017, at 13:37, Larry Rosenman wrote: > > > > On 4/14/17, 3:33 PM, "Ngie Cooper (yaneurabeya)" wrote: > > > >> On Apr 14, 2017, at 13:26, Larry Rosenman wrote: > >> > >> On 4/14/17, 3:19 PM, "Ngie Cooper (yaneurabeya)" wrote: > >> > >>> On Apr 14, 2017, at 13:14, Slawa Olhovchenkov wrote: > >>> > >>> On Fri, Apr 14, 2017 at 01:49:51PM -0600, Alan Somers wrote: > >>> > >>>> On Fri, Apr 14, 2017 at 1:41 PM, Ngie Cooper wrote: > >>>>> Author: ngie > >>>>> Date: Fri Apr 14 19:41:48 2017 > >>>>> New Revision: 316938 > >>>>> URL: https://svnweb.freebsd.org/changeset/base/316938 > >>>>> > >>>>> Log: > >>>>> savecore: fix space calculation with respect to `minfree` in check_space(..) > >>>>> > >>>>> - Use strtoll(3) instead of atoi(3), because atoi(3) limits the > >>>>> representable data to INT_MAX. Check the values received from > >>>>> strtoll(3), trimming trailing whitespace off the end to maintain > >>>>> POLA. > >>>>> - Use `KiB` instead of `kB` when describing free space, total space, > >>>>> etc. I am now fully aware of `KiB` being the IEC standard for 1024 > >>>>> bytes and `kB` being the IEC standard for 1000 bytes. > >>>>> - Store available number of KiB in `available` so it can be more > >>>>> easily queried and compared to ensure that there are enough KiB to > >>>>> store the dump image on disk. > >>>>> - Print out the reserved space on disk, per `minfree`, so end-users > >>>>> can troubleshoot why check_space(..) is reporting that there isn't > >>>>> enough free space. > >>>>> > >>>>> MFC after: 7 weeks > >>>>> Reviewed by: Anton Rang (earlier diff), cem (earlier diff) > >>>>> Tested with: positive/negative cases (see review); make tinderbox > >>>>> Sponsored by: Dell EMC Isilon > >>>>> Differential Revision: D10379 > >>>> > >>>> The free space calculation is still uselessly conservative, because it > >>>> doesn't account for the fact that core dumps will always be either > >>>> spare or compressed. The result is that savecore will frequently > >>>> refuse to save corefiles even when there's plenty of space. I > >>>> proposed removing the space check altogether in > >>>> https://reviews.freebsd.org/D2587. However, I agreed to wait until > >>>> after the compressed core dump feature was merged, because then mostly > >>>> accurate space checks will be possible. AFAIK the compressed core > >>>> dump feature still hasn't been finished. > >>> > >>> Is posible (in the future) to use multiple swaps (on multiple disks) > >>> for save core dumps? > >> > >> Multiple swap devices is already handled by savecore(8), if one uses fstab(5) or dumpon(8). Otherwise, you must invoke savecore(8) on individual devices. > >> > >> As far as saving to multiple disks is concerned, I would hope that one is using a redundancy capable filesystem (zfs) or RAID-like technology (gmirror, graid, LSI Fusion?s RAID product line) to stripe and/or mirror the data across multiple disks. > > > > ? > > > >> How do I use multiple devices to have the system dump on all of my swap? I got a message about not enough space, but there (I think) was enough between multiple drives?. > > > > Something like: > > > > - Create a zpool > > - Mount zpool to /crashdumps > > - Change dumpdir in /etc/rc.conf to be /crashdumps, e.g., echo ?dumpdir=/crashdumps? > > > > ? > > HTH, > > -Ngie > > > > PS The issue with lack of space might be the issue that Alan brought up earlier with compressed dumps and overly conservative free space checks, or it might be the fact that dumpdir (default: /var/crash) is full. > > > > > > I was talking about the actual crashdump to swap by the system. /var/crash has 10T of space (my root pool). > > If your memory is bigger than your swap, you?re unfortunately not able to save the mini dump if the size of the saved pages exceed the space on swap. I think this is where markj?s compressed dumps feature will come in handy. > Thanks! > -Ngie > > > Yeah, I have the following: > borg.lerctr.org /home/ler $ swapctl -l > Device: 1024-blocks Used: > /dev/mfid0p3 8388608 0 > /dev/mfid1p3 8388608 0 > /dev/mfid2p3 8388608 0 > /dev/mfid3p3 8388608 0 > /dev/mfid4p3 8388608 0 > /dev/mfid5p3 8388608 0 > borg.lerctr.org /home/ler $ sysctl hw.physmem > hw.physmem: 137368682496 > borg.lerctr.org /home/ler $ > > SO 6 8G partitions (48G), but the dump is larger than 8G. Larry, This is a very good concern and point given todays more common huge memory foot prints and lots of spindles. I'll keep this in they back of my mind as I tromp around in the dump code. I have another solution that may work for you and that is to use Netdump rather than swapdump. This basically eliminates the trip to swap space and you end up going to savecore style output on the netdump server. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sat Apr 15 01:37:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73792D3D498; Sat, 15 Apr 2017 01:37:33 +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 4F02EFB8; Sat, 15 Apr 2017 01:37:33 +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=Content-transfer-encoding:Content-type:Mime-version:In-Reply-To: References:Message-ID:CC:To:From:Subject:Date: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=oW5nAUe6ldn1gksap39WnQpWmW1MjwvAJ/nAu+p571g=; b=rTZQWbgWvA1CeeaPnLAzD2XOM7 TyuK53k7LJ5zU/C/3c+ab7D3yQoo7LTCYNSFcVP2LBxNuH5kQhcA09HtHZ26/9oqbtgELnMalb5BE BlUi3YmioFkF7oDwCyIH8KkfR/oAmd2MUI7iI/DXzB3r0wtp7SQdjB+ovaKQn302NqUA=; Received: from [47.220.164.50] (port=57864 helo=[192.168.200.198]) by thebighonker.lerctr.org with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89 (FreeBSD)) (envelope-from ) id 1czCea-0001Nl-3F; Fri, 14 Apr 2017 20:37:32 -0500 User-Agent: Microsoft-MacOutlook/f.21.0.170409 Date: Fri, 14 Apr 2017 20:37:30 -0500 Subject: Re: svn commit: r316938 - head/sbin/savecore From: Larry Rosenman To: CC: "Ngie Cooper (yaneurabeya)" , "src-committers@freebsd.org" , Alan Somers , "svn-src-all@freebsd.org" , Slawa Olhovchenkov , "svn-src-head@freebsd.org" , Ngie Cooper Message-ID: Thread-Topic: svn commit: r316938 - head/sbin/savecore References: <201704150135.v3F1ZD2S009211@pdx.rh.CN85.dnsmgr.net> In-Reply-To: <201704150135.v3F1ZD2S009211@pdx.rh.CN85.dnsmgr.net> Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 01:37:33 -0000 On 4/14/17, 8:35 PM, "Rodney W. Grimes" wr= ote: > Yeah, I have the following: > borg.lerctr.org /home/ler $ swapctl -l > Device: 1024-blocks Used: > /dev/mfid0p3 8388608 0 > /dev/mfid1p3 8388608 0 > /dev/mfid2p3 8388608 0 > /dev/mfid3p3 8388608 0 > /dev/mfid4p3 8388608 0 > /dev/mfid5p3 8388608 0 > borg.lerctr.org /home/ler $ sysctl hw.physmem > hw.physmem: 137368682496 > borg.lerctr.org /home/ler $ >=20 > SO 6 8G partitions (48G), but the dump is larger than 8G.=20 =20 Larry, This is a very good concern and point given todays more common huge memory foot prints and lots of spindles. I'll keep this in they back of my mind as I tromp around in the dump code. I have another solution that may work for you and that is to use Netdump rather than swapdump. This basically eliminates the trip to swap space and you end up going to savecore style output on the netdump server. =20 --=20 Rod Grimes rgrimes@free= bsd.org =20 What does it take for NetDump to work to a FreeNAS (9.10 nightly) server si= nce that=E2=80=99s what is =E2=80=9Cnext to=E2=80=9D this server? =20 From owner-svn-src-head@freebsd.org Sat Apr 15 01:41:42 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF16FD3D573; Sat, 15 Apr 2017 01:41:42 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AFF19396; Sat, 15 Apr 2017 01:41:42 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v3F1fWxW009237; Fri, 14 Apr 2017 18:41:32 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v3F1fWn1009236; Fri, 14 Apr 2017 18:41:32 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201704150141.v3F1fWn1009236@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r316938 - head/sbin/savecore In-Reply-To: <20170414204642.GC70430@zxy.spb.ru> To: Slawa Olhovchenkov Date: Fri, 14 Apr 2017 18:41:32 -0700 (PDT) CC: "Ngie Cooper (yaneurabeya)" , Larry Rosenman , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Ngie Cooper , Alan Somers Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 01:41:42 -0000 [ Charset UTF-8 unsupported, converting... ] > On Fri, Apr 14, 2017 at 01:45:22PM -0700, Ngie Cooper (yaneurabeya) wrote: > > > > > > On Apr 14, 2017, at 13:42, Slawa Olhovchenkov wrote: > > > > ? > > > > > No, something like: > > > % swapinfo > > > Device 1K-blocks Used Avail Capacity > > > /dev/ada0p2 33554432 0 33554432 0% > > > /dev/ada1p2 33554432 0 33554432 0% > > > Total 67108864 0 67108864 0% > > > > Striping dumps across multiple swap devices isn?t supported. Sorry. > > What about support in the future? Added to my project list at people.freebsd.org/~rgrimes. No promises, but I'll look at it while I am doing the other work. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sat Apr 15 01:44:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D61BCD3D74E; Sat, 15 Apr 2017 01:44:47 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A0B2A82F; Sat, 15 Apr 2017 01:44:47 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3F1ikRh054096; Sat, 15 Apr 2017 01:44:46 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3F1ijKm054081; Sat, 15 Apr 2017 01:44:45 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201704150144.v3F1ijKm054081@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Sat, 15 Apr 2017 01:44:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316949 - in head: contrib/bmake contrib/bmake/mk contrib/bmake/unit-tests usr.bin/bmake X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 01:44:47 -0000 Author: sjg Date: Sat Apr 15 01:44:45 2017 New Revision: 316949 URL: https://svnweb.freebsd.org/changeset/base/316949 Log: Update to bmake 20170413 Modified: head/contrib/bmake/ChangeLog head/contrib/bmake/Makefile head/contrib/bmake/job.c head/contrib/bmake/main.c head/contrib/bmake/mk/ChangeLog head/contrib/bmake/mk/auto.obj.mk head/contrib/bmake/mk/dirdeps.mk head/contrib/bmake/mk/install-mk head/contrib/bmake/mk/meta.stage.mk head/contrib/bmake/mk/meta2deps.py head/contrib/bmake/mk/mkopt.sh head/contrib/bmake/str.c head/contrib/bmake/unit-tests/modmatch.exp head/contrib/bmake/unit-tests/modmatch.mk head/usr.bin/bmake/Makefile Directory Properties: head/contrib/bmake/ (props changed) Modified: head/contrib/bmake/ChangeLog ============================================================================== --- head/contrib/bmake/ChangeLog Sat Apr 15 00:51:35 2017 (r316948) +++ head/contrib/bmake/ChangeLog Sat Apr 15 01:44:45 2017 (r316949) @@ -1,8 +1,35 @@ +2017-04-13 Simon J. Gerraty + + * Makefile (_MAKE_VERSION): 20170413 + Merge with NetBSD make, pick up + o main.c: when setting .OBJDIR ignore '$' in paths. + + * job.c: use MALLOC_OPTIONS to set malloc_options. + +2017-04-11 Simon J. Gerraty + + * Makefile (_MAKE_VERSION): 20170411 + Merge with NetBSD make, pick up + o str.c: Str_Match: allow [^a-z] to behave as expected. + +2017-03-26 Simon J. Gerraty + + * Makefile (_MAKE_VERSION): 20170326 + Merge with NetBSD make, pick up + o main.c: purge relative paths from realpath cache when .OBJDIR + is changed. + +2017-03-11 Simon J. Gerraty + + * Makefile (_MAKE_VERSION): 20170311 + Merge with NetBSD make, pick up + o main.c: only use -C arg "as is" if it starts with '/'. + 2017-03-01 Simon J. Gerraty * Makefile (_MAKE_VERSION): 20170301 Merge with NetBSD make, pick up - o main.c: use -C arg as is rather than getcwd() + o main.c: use -C arg "as is" rather than getcwd() if they identify the same directory. o parse.c: ensure loadfile buffer is \n terminated in non-mmap case Modified: head/contrib/bmake/Makefile ============================================================================== --- head/contrib/bmake/Makefile Sat Apr 15 00:51:35 2017 (r316948) +++ head/contrib/bmake/Makefile Sat Apr 15 01:44:45 2017 (r316949) @@ -1,7 +1,7 @@ -# $Id: Makefile,v 1.81 2017/03/01 17:01:23 sjg Exp $ +# $Id: Makefile,v 1.85 2017/04/13 16:29:40 sjg Exp $ # Base version on src date -_MAKE_VERSION= 20170301 +_MAKE_VERSION= 20170413 PROG= bmake Modified: head/contrib/bmake/job.c ============================================================================== --- head/contrib/bmake/job.c Sat Apr 15 00:51:35 2017 (r316948) +++ head/contrib/bmake/job.c Sat Apr 15 01:44:45 2017 (r316949) @@ -389,7 +389,10 @@ static void JobSigLock(sigset_t *); static void JobSigUnlock(sigset_t *); static void JobSigReset(void); -const char *malloc_options="A"; +#if !defined(MALLOC_OPTIONS) +# define MALLOC_OPTIONS "A" +#endif +const char *malloc_options= MALLOC_OPTIONS; static void job_table_dump(const char *where) Modified: head/contrib/bmake/main.c ============================================================================== --- head/contrib/bmake/main.c Sat Apr 15 00:51:35 2017 (r316948) +++ head/contrib/bmake/main.c Sat Apr 15 01:44:45 2017 (r316949) @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.257 2017/02/08 17:47:36 christos Exp $ */ +/* $NetBSD: main.c,v 1.260 2017/04/13 13:55:23 christos Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,7 +69,7 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: main.c,v 1.257 2017/02/08 17:47:36 christos Exp $"; +static char rcsid[] = "$NetBSD: main.c,v 1.260 2017/04/13 13:55:23 christos Exp $"; #else #include #ifndef lint @@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19 #if 0 static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: main.c,v 1.257 2017/02/08 17:47:36 christos Exp $"); +__RCSID("$NetBSD: main.c,v 1.260 2017/04/13 13:55:23 christos Exp $"); #endif #endif /* not lint */ #endif @@ -722,22 +722,15 @@ Boolean Main_SetObjdir(const char *fmt, ...) { struct stat sb; - char *p, *path; - char buf[MAXPATHLEN + 1], pbuf[MAXPATHLEN + 1]; + char *path; + char buf[MAXPATHLEN + 1]; Boolean rc = FALSE; va_list ap; va_start(ap, fmt); - vsnprintf(path = pbuf, MAXPATHLEN, fmt, ap); + vsnprintf(path = buf, MAXPATHLEN, fmt, ap); va_end(ap); - /* expand variable substitutions */ - if (strchr(path, '$') != 0) { - snprintf(buf, MAXPATHLEN, "%s", path); - path = p = Var_Subst(NULL, buf, VAR_GLOBAL, VARF_WANTRES); - } else - p = NULL; - if (path[0] != '/') { snprintf(buf, MAXPATHLEN, "%s/%s", curdir, path); path = buf; @@ -753,25 +746,35 @@ Main_SetObjdir(const char *fmt, ...) Var_Set(".OBJDIR", objdir, VAR_GLOBAL, 0); setenv("PWD", objdir, 1); Dir_InitDot(); + cached_realpath(".OBJDIR", NULL); /* purge */ rc = TRUE; if (enterFlag && strcmp(objdir, curdir) != 0) enterFlagObj = TRUE; } } - free(p); return rc; } static Boolean Main_SetVarObjdir(const char *var, const char *suffix) { - char *p1, *path; - if ((path = Var_Value(var, VAR_CMD, &p1)) == NULL) + char *p, *path, *xpath; + + if ((path = Var_Value(var, VAR_CMD, &p)) == NULL) return FALSE; - (void)Main_SetObjdir("%s%s", path, suffix); - free(p1); + /* expand variable substitutions */ + if (strchr(path, '$') != 0) + xpath = Var_Subst(NULL, path, VAR_GLOBAL, VARF_WANTRES); + else + xpath = path; + + (void)Main_SetObjdir("%s%s", xpath, suffix); + + if (xpath != path) + free(xpath); + free(p); return TRUE; } @@ -1923,7 +1926,23 @@ cached_realpath(const char *pathname, ch cache->flags = INTERNAL; #endif } - + if (resolved == NULL && strcmp(pathname, ".OBJDIR") == 0) { + /* purge any relative paths */ + Hash_Entry *he, *nhe; + Hash_Search hs; + + he = Hash_EnumFirst(&cache->context, &hs); + while (he) { + nhe = Hash_EnumNext(&hs); + if (he->name[0] != '/') { + if (DEBUG(DIR)) + fprintf(stderr, "cached_realpath: purging %s\n", he->name); + Hash_DeleteEntry(&cache->context, he); + } + he = nhe; + } + return NULL; + } if ((rp = Var_Value(pathname, cache, &cp)) != NULL) { /* a hit */ strlcpy(resolved, rp, MAXPATHLEN); Modified: head/contrib/bmake/mk/ChangeLog ============================================================================== --- head/contrib/bmake/mk/ChangeLog Sat Apr 15 00:51:35 2017 (r316948) +++ head/contrib/bmake/mk/ChangeLog Sat Apr 15 01:44:45 2017 (r316949) @@ -1,3 +1,24 @@ +2017-04-01 Simon J. Gerraty + + * install-mk (MK_VERSION): 20170401 + + * meta2deps.py: add is_src so we can check if obj dependency + is also a src dependency. + +2017-03-26 Simon J. Gerraty + + * install-mk (MK_VERSION): 20170326 + + * meta.stage.mk: do nothing if NO_STAGING is defined. + +2017-03-24 Simon J. Gerraty + + * auto.obj.mk: handle the case of __objdir=obj or obj.${MACHINE} etc. + +2017-03-18 Simon J. Gerraty + + * mkopt.sh: treat WITH_*=NO like no; ie. WITHOUT_* + 2017-03-01 Simon J. Gerraty * install-mk (MK_VERSION): 20170301 Modified: head/contrib/bmake/mk/auto.obj.mk ============================================================================== --- head/contrib/bmake/mk/auto.obj.mk Sat Apr 15 00:51:35 2017 (r316948) +++ head/contrib/bmake/mk/auto.obj.mk Sat Apr 15 01:44:45 2017 (r316949) @@ -1,4 +1,4 @@ -# $Id: auto.obj.mk,v 1.12 2015/12/16 01:57:06 sjg Exp $ +# $Id: auto.obj.mk,v 1.13 2017/03/24 20:53:22 sjg Exp $ # # @(#) Copyright (c) 2004, Simon J. Gerraty # @@ -57,7 +57,10 @@ __objdir_made != echo ${__objdir}/; umas # This causes make to use the specified directory as .OBJDIR .OBJDIR: ${__objdir} .if ${.OBJDIR:tA} != ${__objdir:tA} && ${__objdir_made:Uno:M${__objdir}/*} != "" +# watch out for __objdir being relative path +.if !(${__objdir:M/*} == "" && ${.OBJDIR:tA} == ${${.CURDIR}/${__objdir}:L:tA}) .error could not use ${__objdir}: .OBJDIR=${.OBJDIR} .endif .endif .endif +.endif Modified: head/contrib/bmake/mk/dirdeps.mk ============================================================================== --- head/contrib/bmake/mk/dirdeps.mk Sat Apr 15 00:51:35 2017 (r316948) +++ head/contrib/bmake/mk/dirdeps.mk Sat Apr 15 01:44:45 2017 (r316949) @@ -1,4 +1,4 @@ -# $Id: dirdeps.mk,v 1.86 2017/03/01 20:26:51 sjg Exp $ +# $Id: dirdeps.mk,v 1.87 2017/03/07 01:49:03 sjg Exp $ # Copyright (c) 2010-2013, Juniper Networks, Inc. # All rights reserved. @@ -57,7 +57,7 @@ # distinguish them from others. # # Before each Makefile.depend file is read, we set -# DEP_RELDIR to be the the RELDIR (path relative to SRCTOP) for +# DEP_RELDIR to be the RELDIR (path relative to SRCTOP) for # its directory, and DEP_MACHINE etc according to the . # represented by the suffix of the corresponding target. # Modified: head/contrib/bmake/mk/install-mk ============================================================================== --- head/contrib/bmake/mk/install-mk Sat Apr 15 00:51:35 2017 (r316948) +++ head/contrib/bmake/mk/install-mk Sat Apr 15 01:44:45 2017 (r316949) @@ -55,7 +55,7 @@ # Simon J. Gerraty # RCSid: -# $Id: install-mk,v 1.138 2017/03/01 20:26:51 sjg Exp $ +# $Id: install-mk,v 1.140 2017/04/03 21:04:09 sjg Exp $ # # @(#) Copyright (c) 1994 Simon J. Gerraty # @@ -70,7 +70,7 @@ # sjg@crufty.net # -MK_VERSION=20170301 +MK_VERSION=20170401 OWNER= GROUP= MODE=444 Modified: head/contrib/bmake/mk/meta.stage.mk ============================================================================== --- head/contrib/bmake/mk/meta.stage.mk Sat Apr 15 00:51:35 2017 (r316948) +++ head/contrib/bmake/mk/meta.stage.mk Sat Apr 15 01:44:45 2017 (r316949) @@ -1,4 +1,4 @@ -# $Id: meta.stage.mk,v 1.48 2017/03/01 22:48:07 sjg Exp $ +# $Id: meta.stage.mk,v 1.49 2017/04/01 02:10:34 sjg Exp $ # # @(#) Copyright (c) 2011-2017, Simon J. Gerraty # @@ -13,6 +13,8 @@ # sjg@crufty.net # +.ifndef NO_STAGING + .if !target(__${.PARSEFILE}__) # the guard target is defined later @@ -324,3 +326,4 @@ stale_staged: staging .NOMETA .endif .endif .endif +.endif Modified: head/contrib/bmake/mk/meta2deps.py ============================================================================== --- head/contrib/bmake/mk/meta2deps.py Sat Apr 15 00:51:35 2017 (r316948) +++ head/contrib/bmake/mk/meta2deps.py Sat Apr 15 01:44:45 2017 (r316949) @@ -37,7 +37,7 @@ We only pay attention to a subset of the """ RCSid: - $Id: meta2deps.py,v 1.24 2017/02/08 22:17:10 sjg Exp $ + $Id: meta2deps.py,v 1.25 2017/04/03 21:04:09 sjg Exp $ Copyright (c) 2011-2013, Juniper Networks, Inc. All rights reserved. @@ -491,6 +491,21 @@ class MetaFile: if not file: f.close() + def is_src(self, base, dir, rdir): + """is base in srctop""" + for dir in [dir,rdir]: + if not dir: + continue + path = '/'.join([dir,base]) + srctop = self.find_top(path, self.srctops) + if srctop: + if self.dpdeps: + self.add(self.file_deps, path.replace(srctop,''), 'file') + self.add(self.src_deps, dir.replace(srctop,''), 'src') + self.seenit(dir) + return True + return False + def parse_path(self, path, cwd, op=None, w=[]): """look at a path for the op specified""" @@ -519,10 +534,9 @@ class MetaFile: # to the src dir, we may need to add dependencies for each rdir = dir dir = abspath(dir, cwd, self.last_dir, self.debug, self.debug_out) - if rdir == dir or rdir.find('./') > 0: - rdir = None - if os.path.islink(dir): rdir = os.path.realpath(dir) + if rdir == dir: + rdir = None # now put path back together path = '/'.join([dir,base]) if self.debug > 1: @@ -543,17 +557,9 @@ class MetaFile: # finally, we get down to it if dir == self.cwd or dir == self.curdir: return - srctop = self.find_top(path, self.srctops) - if srctop: - if self.dpdeps: - self.add(self.file_deps, path.replace(srctop,''), 'file') - self.add(self.src_deps, dir.replace(srctop,''), 'src') + if self.is_src(base, dir, rdir): self.seenit(w[2]) - self.seenit(dir) - if rdir and not rdir.startswith(srctop): - dir = rdir # for below - rdir = None - else: + if not rdir: return objroot = None Modified: head/contrib/bmake/mk/mkopt.sh ============================================================================== --- head/contrib/bmake/mk/mkopt.sh Sat Apr 15 00:51:35 2017 (r316948) +++ head/contrib/bmake/mk/mkopt.sh Sat Apr 15 01:44:45 2017 (r316949) @@ -1,5 +1,5 @@ : -# $Id: mkopt.sh,v 1.10 2015/06/07 17:29:08 sjg Exp $ +# $Id: mkopt.sh,v 1.11 2017/03/18 21:36:42 sjg Exp $ # # @(#) Copyright (c) 2014, Simon J. Gerraty # @@ -40,7 +40,7 @@ _mk_opt() { eval "_mov=\$$_mo _wov=\$$_wo _wiv=\$$_wi" case "$_wiv" in - no) _wov=no;; + [Nn][Oo]) _wov=no;; esac _v=${_mov:-${_wov:+no}} _v=${_v:-${_wiv:+yes}} Modified: head/contrib/bmake/str.c ============================================================================== --- head/contrib/bmake/str.c Sat Apr 15 00:51:35 2017 (r316948) +++ head/contrib/bmake/str.c Sat Apr 15 01:44:45 2017 (r316949) @@ -1,4 +1,4 @@ -/* $NetBSD: str.c,v 1.36 2016/04/06 09:57:00 gson Exp $ */ +/* $NetBSD: str.c,v 1.37 2017/04/11 17:30:13 sjg Exp $ */ /*- * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: str.c,v 1.36 2016/04/06 09:57:00 gson Exp $"; +static char rcsid[] = "$NetBSD: str.c,v 1.37 2017/04/11 17:30:13 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)str.c 5.8 (Berkeley) 6/1/90"; #else -__RCSID("$NetBSD: str.c,v 1.36 2016/04/06 09:57:00 gson Exp $"); +__RCSID("$NetBSD: str.c,v 1.37 2017/04/11 17:30:13 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -373,16 +373,23 @@ Str_Match(const char *string, const char * by a range (two characters separated by "-"). */ if (*pattern == '[') { + int nomatch; + ++pattern; + if (*pattern == '^') { + ++pattern; + nomatch = 1; + } else + nomatch = 0; for (;;) { if ((*pattern == ']') || (*pattern == 0)) - return(0); + return(nomatch); if (*pattern == *string) break; if (pattern[1] == '-') { c2 = pattern[2]; if (c2 == 0) - return(0); + return(nomatch); if ((*pattern <= *string) && (c2 >= *string)) break; @@ -393,6 +400,8 @@ Str_Match(const char *string, const char } ++pattern; } + if (nomatch) + return 0; while ((*pattern != ']') && (*pattern != 0)) ++pattern; goto thisCharOK; Modified: head/contrib/bmake/unit-tests/modmatch.exp ============================================================================== --- head/contrib/bmake/unit-tests/modmatch.exp Sat Apr 15 00:51:35 2017 (r316948) +++ head/contrib/bmake/unit-tests/modmatch.exp Sat Apr 15 01:44:45 2017 (r316949) @@ -14,4 +14,6 @@ LIB=e X_LIBS:M${LIB${LIB:tu}} is "/tmp/l LIB=e X_LIBS:M*/lib${LIB}.a is "/tmp/libe.a" LIB=e X_LIBS:M*/lib${LIB}.a:tu is "/TMP/LIBE.A" Mscanner=OK +Upper=One Two Three Four +Lower=five six seven exit status 0 Modified: head/contrib/bmake/unit-tests/modmatch.mk ============================================================================== --- head/contrib/bmake/unit-tests/modmatch.mk Sat Apr 15 00:51:35 2017 (r316948) +++ head/contrib/bmake/unit-tests/modmatch.mk Sat Apr 15 01:44:45 2017 (r316949) @@ -15,7 +15,9 @@ res = no res = OK .endif -all: +all: show-libs check-cclass + +show-libs: @for x in $X; do ${.MAKE} -f ${MAKEFILE} show LIB=$$x; done @echo "Mscanner=${res}" @@ -23,3 +25,9 @@ show: @echo 'LIB=${LIB} X_LIBS:M$${LIB$${LIB:tu}} is "${X_LIBS:M${LIB${LIB:tu}}}"' @echo 'LIB=${LIB} X_LIBS:M*/lib$${LIB}.a is "${X_LIBS:M*/lib${LIB}.a}"' @echo 'LIB=${LIB} X_LIBS:M*/lib$${LIB}.a:tu is "${X_LIBS:M*/lib${LIB}.a:tu}"' + +LIST= One Two Three Four five six seven + +check-cclass: + @echo Upper=${LIST:M[A-Z]*} + @echo Lower=${LIST:M[^A-Z]*} Modified: head/usr.bin/bmake/Makefile ============================================================================== --- head/usr.bin/bmake/Makefile Sat Apr 15 00:51:35 2017 (r316948) +++ head/usr.bin/bmake/Makefile Sat Apr 15 01:44:45 2017 (r316949) @@ -14,10 +14,10 @@ CFLAGS+= -I${.CURDIR} CLEANDIRS+= FreeBSD CLEANFILES+= bootstrap -# $Id: Makefile,v 1.81 2017/03/01 17:01:23 sjg Exp $ +# $Id: Makefile,v 1.85 2017/04/13 16:29:40 sjg Exp $ # Base version on src date -_MAKE_VERSION= 20170301 +_MAKE_VERSION= 20170413 PROG?= ${.CURDIR:T} From owner-svn-src-head@freebsd.org Sat Apr 15 01:49:57 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 124B2D3D836; Sat, 15 Apr 2017 01:49:57 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E387C9AA; Sat, 15 Apr 2017 01:49:56 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v3F1nuD5009275; Fri, 14 Apr 2017 18:49:56 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v3F1nu0D009274; Fri, 14 Apr 2017 18:49:56 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201704150149.v3F1nu0D009274@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r316938 - head/sbin/savecore In-Reply-To: <1940104.87G28XVdqf@ralph.baldwin.cx> To: John Baldwin Date: Fri, 14 Apr 2017 18:49:56 -0700 (PDT) CC: Ngie Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 01:49:57 -0000 > On Friday, April 14, 2017 07:41:48 PM Ngie Cooper wrote: > > Author: ngie > > Date: Fri Apr 14 19:41:48 2017 > > New Revision: 316938 > > URL: https://svnweb.freebsd.org/changeset/base/316938 > > > > Log: > > savecore: fix space calculation with respect to `minfree` in check_space(..) > > > > - Use strtoll(3) instead of atoi(3), because atoi(3) limits the > > representable data to INT_MAX. Check the values received from > > strtoll(3), trimming trailing whitespace off the end to maintain > > POLA. > > - Use `KiB` instead of `kB` when describing free space, total space, > > etc. I am now fully aware of `KiB` being the IEC standard for 1024 > > bytes and `kB` being the IEC standard for 1000 bytes. > > I will just rant lightly that no one actually uses this in the real world. > > Good lucking finding a "16 GiB" DIMM on crucial.com or a 4Kin drive. A > kilobyte is a power of 2. The End. > > (Next up we'll have to rename 4k displays to > 4k) Do we use KiB, MiB, GiB,... any place else in the system? I cant think of a place we do this, so please, lets not start doing this here? Yes, these are newer standards, perhaps some day we should make a global switch to them, but lets not start mixing and matching things. > -- > John Baldwin -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sat Apr 15 01:52:50 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9C33D3DA46; Sat, 15 Apr 2017 01:52:50 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B8FA7D7F; Sat, 15 Apr 2017 01:52:50 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3F1qnYm057933; Sat, 15 Apr 2017 01:52:49 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3F1qnk4057932; Sat, 15 Apr 2017 01:52:49 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201704150152.v3F1qnk4057932@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Sat, 15 Apr 2017 01:52:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316950 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 01:52:51 -0000 Author: sjg Date: Sat Apr 15 01:52:49 2017 New Revision: 316950 URL: https://svnweb.freebsd.org/changeset/base/316950 Log: Update to latest, handle case of __objdir=obj Modified: head/share/mk/auto.obj.mk Modified: head/share/mk/auto.obj.mk ============================================================================== --- head/share/mk/auto.obj.mk Sat Apr 15 01:44:45 2017 (r316949) +++ head/share/mk/auto.obj.mk Sat Apr 15 01:52:49 2017 (r316950) @@ -58,7 +58,10 @@ __objdir_made != echo ${__objdir}/; umas # This causes make to use the specified directory as .OBJDIR .OBJDIR: ${__objdir} .if ${.OBJDIR:tA} != ${__objdir:tA} && ${__objdir_made:Uno:M${__objdir}/*} != "" +# watch out for __objdir being relative path +.if !(${__objdir:M/*} == "" && ${.OBJDIR:tA} == ${${.CURDIR}/${__objdir}:L:tA}) .error could not use ${__objdir}: .OBJDIR=${.OBJDIR} .endif .endif .endif +.endif From owner-svn-src-head@freebsd.org Sat Apr 15 01:55:42 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 65EFAD3DB3F; Sat, 15 Apr 2017 01:55:42 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 508B9F94; Sat, 15 Apr 2017 01:55:41 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v3F1temm009310; Fri, 14 Apr 2017 18:55:40 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v3F1teNW009309; Fri, 14 Apr 2017 18:55:40 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201704150155.v3F1teNW009309@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r316945 - in head: etc/defaults etc/periodic/daily share/man/man5 In-Reply-To: <201704142259.v3EMxEAa083233@repo.freebsd.org> To: Alan Somers Date: Fri, 14 Apr 2017 18:55:40 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 01:55:42 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: asomers > Date: Fri Apr 14 22:59:14 2017 > New Revision: 316945 > URL: https://svnweb.freebsd.org/changeset/base/316945 > > Log: > Add 410.status-mfi, a periodic script for mfi(4) arrays > > PR: 176049 > Submitted by: doconnor@gsoft.com.au > Reviewed by: scottl, Larry Rosenman > MFC after: 3 weeks > Relnotes: yes > > Added: > head/etc/periodic/daily/410.status-mfi (contents, props changed) > Modified: > head/etc/defaults/periodic.conf > head/etc/periodic/daily/Makefile > head/share/man/man5/periodic.conf.5 > > Modified: head/etc/defaults/periodic.conf > ============================================================================== > --- head/etc/defaults/periodic.conf Fri Apr 14 22:02:08 2017 (r316944) > +++ head/etc/defaults/periodic.conf Fri Apr 14 22:59:14 2017 (r316945) > @@ -112,6 +112,9 @@ daily_status_gstripe_enable="NO" # Che > # 409.status-gconcat > daily_status_gconcat_enable="NO" # Check gconcat(8) > > +# 410.status-mfi > +daily_status_mfi_enable="NO" # Check mfiutil(8) > + > # 420.status-network > daily_status_network_enable="YES" # Check network status > daily_status_network_usedns="YES" # DNS lookups are ok > > Added: head/etc/periodic/daily/410.status-mfi > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/etc/periodic/daily/410.status-mfi Fri Apr 14 22:59:14 2017 (r316945) > @@ -0,0 +1,33 @@ > +#!/bin/sh > +# > +# $FreeBSD$ > +# > + > +# If there is a global system configuration file, suck it in. > +# > +if [ -r /etc/defaults/periodic.conf ] > +then > + . /etc/defaults/periodic.conf > + source_periodic_confs > +fi > + > +case "$daily_status_mfi_enable" in > + [Yy][Ee][Ss]) > + echo > + echo 'Checking status of mfi(4) devices:' > + > + if mfiutil show volumes; then > + if mfiutil show volumes | grep -q DEGRADED; then > + rc=3 > + else > + rc=0 > + fi > + else > + rc=2 > + fi > + ;; > + > + *) rc=0;; > +esac > + > +exit $rc > > Modified: head/etc/periodic/daily/Makefile > ============================================================================== > --- head/etc/periodic/daily/Makefile Fri Apr 14 22:02:08 2017 (r316944) > +++ head/etc/periodic/daily/Makefile Fri Apr 14 22:59:14 2017 (r316945) > @@ -13,6 +13,7 @@ FILES= 100.clean-disks \ > 400.status-disks \ > 401.status-graid \ > 406.status-gmirror \ > + 410.status-mfi \ > 407.status-graid3 \ > 408.status-gstripe \ > 409.status-gconcat \ Insered into the middle of a number sorted list? > > Modified: head/share/man/man5/periodic.conf.5 > ============================================================================== > --- head/share/man/man5/periodic.conf.5 Fri Apr 14 22:02:08 2017 (r316944) > +++ head/share/man/man5/periodic.conf.5 Fri Apr 14 22:59:14 2017 (r316945) > @@ -399,6 +399,15 @@ if you want to run > on your > .Xr gconcat 8 > devices. > +.It Va daily_status_mfi_enable > +.Pq Vt bool > +Set to > +.Dq Li YES > +if you want to run > +.Nm mfiutil Cm status > +on your > +.Xr mfi 4 > +devices. > .It Va daily_status_network_enable > .Pq Vt bool > Set to > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sat Apr 15 01:59:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B4FCD3DC20 for ; Sat, 15 Apr 2017 01:59:55 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 26220179 for ; Sat, 15 Apr 2017 01:59:55 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v3F1xd5k009326; Fri, 14 Apr 2017 18:59:39 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v3F1xd0q009325; Fri, 14 Apr 2017 18:59:39 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201704150159.v3F1xd0q009325@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r316938 - head/sbin/savecore In-Reply-To: To: Larry Rosenman Date: Fri, 14 Apr 2017 18:59:39 -0700 (PDT) CC: rgrimes@freebsd.org, "Ngie Cooper (yaneurabeya)" , "src-committers@freebsd.org" , Alan Somers , "svn-src-all@freebsd.org" , Slawa Olhovchenkov , "svn-src-head@freebsd.org" , Ngie Cooper Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 01:59:55 -0000 > On 4/14/17, 8:35 PM, "Rodney W. Grimes" wrote: > > > Yeah, I have the following: > > borg.lerctr.org /home/ler $ swapctl -l > > Device: 1024-blocks Used: > > /dev/mfid0p3 8388608 0 > > /dev/mfid1p3 8388608 0 > > /dev/mfid2p3 8388608 0 > > /dev/mfid3p3 8388608 0 > > /dev/mfid4p3 8388608 0 > > /dev/mfid5p3 8388608 0 > > borg.lerctr.org /home/ler $ sysctl hw.physmem > > hw.physmem: 137368682496 > > borg.lerctr.org /home/ler $ > > > > SO 6 8G partitions (48G), but the dump is larger than 8G. > > Larry, > This is a very good concern and point given todays more > common huge memory foot prints and lots of spindles. I'll > keep this in they back of my mind as I tromp around in the > dump code. I have another solution that may work for you > and that is to use Netdump rather than swapdump. This > basically eliminates the trip to swap space and you end > up going to savecore style output on the netdump server. > > -- > Rod Grimes rgrimes@freebsd.org > > What does it take for NetDump to work to a FreeNAS (9.10 nightly) server since that?s what is ?next to? this server? As a netdump server FreeNAS would be fairly trivial to compile the netdump client code for. I should have running 11.0 and 10.2 code around some place. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sat Apr 15 02:00:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45C59D3DD07; Sat, 15 Apr 2017 02:00:46 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) (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 D6C0C32C; Sat, 15 Apr 2017 02:00:45 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-wm0-f52.google.com with SMTP id y18so2967620wmh.0; Fri, 14 Apr 2017 19:00:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=2t/rMT2428TW1GPxzTB7NyVngexKkxSCH6edOxr82/E=; b=dg3QOPleFI3Ln6glsthEkhrn3rOuXB+T1n1LywZVjqdy+jP71uHVsJEoxV5B+JMuHL 0Gr8AYSgNG3ldEOKPe8//ytyY3GQpjf6BdoQiQqBmr3oaNuAPTxeqMpK3nreVZP/HvRa qKkdglaOSJXQSWw1ko+gPR3aFCU++LC2MSt1Q78FVqiQ5uwKiFRfO0ts/0BavryvK5GO KmfhvDjjxhdPeEZWSADhzHEYdVn5SpARFVPjb/oL+DzmP9KtxPZcndryXBs9vs3EQ+Yi iOZ7U8B4TPuGO7kFZX5jE3CVmLCB/XNyTR8e5hDXH2CjONiNJ4BBKIcvcEYrB/Si4Wqc 1a0Q== X-Gm-Message-State: AN3rC/6/Zvs75QUYdLvMtCvl8eV2OI9zl2LV+/lGT7ufP8gKqJNbp35a riow2YQgXXE91c4nfquaww== X-Received: by 10.28.55.138 with SMTP id e132mr866602wma.6.1492221637685; Fri, 14 Apr 2017 19:00:37 -0700 (PDT) Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com. [74.125.82.52]) by smtp.gmail.com with ESMTPSA id c53sm4499301wra.16.2017.04.14.19.00.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Apr 2017 19:00:37 -0700 (PDT) Received: by mail-wm0-f52.google.com with SMTP id y18so2967612wmh.0; Fri, 14 Apr 2017 19:00:37 -0700 (PDT) X-Received: by 10.28.130.210 with SMTP id e201mr849620wmd.128.1492221637431; Fri, 14 Apr 2017 19:00:37 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.80.169.4 with HTTP; Fri, 14 Apr 2017 19:00:36 -0700 (PDT) In-Reply-To: References: <201704150135.v3F1ZD2S009211@pdx.rh.CN85.dnsmgr.net> From: Conrad Meyer Date: Fri, 14 Apr 2017 19:00:36 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r316938 - head/sbin/savecore To: Larry Rosenman Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Ngie Cooper Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 02:00:46 -0000 Larry, You just need to run netdumpd on the nearby server. It could be a port (although I'm not aware that it is ported yet). Best, Conrad On Fri, Apr 14, 2017 at 6:37 PM, Larry Rosenman wrote: > On 4/14/17, 8:35 PM, "Rodney W. Grimes" = wrote: > >> Yeah, I have the following: > > borg.lerctr.org /home/ler $ swapctl -l > > Device: 1024-blocks Used: > > /dev/mfid0p3 8388608 0 > > /dev/mfid1p3 8388608 0 > > /dev/mfid2p3 8388608 0 > > /dev/mfid3p3 8388608 0 > > /dev/mfid4p3 8388608 0 > > /dev/mfid5p3 8388608 0 > > borg.lerctr.org /home/ler $ sysctl hw.physmem > > hw.physmem: 137368682496 > > borg.lerctr.org /home/ler $ > > > > SO 6 8G partitions (48G), but the dump is larger than 8G. > > Larry, > This is a very good concern and point given todays more > common huge memory foot prints and lots of spindles. I'll > keep this in they back of my mind as I tromp around in the > dump code. I have another solution that may work for you > and that is to use Netdump rather than swapdump. This > basically eliminates the trip to swap space and you end > up going to savecore style output on the netdump server. > > -- > Rod Grimes rgrimes@fr= eebsd.org > > What does it take for NetDump to work to a FreeNAS (9.10 nightly) server = since that=E2=80=99s what is =E2=80=9Cnext to=E2=80=9D this server? > > > From owner-svn-src-head@freebsd.org Sat Apr 15 02:01:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 169E3D3DEAC; Sat, 15 Apr 2017 02:01:25 +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 E69887DA; Sat, 15 Apr 2017 02:01:24 +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=Content-transfer-encoding:Content-type:Mime-version:In-Reply-To: References:Message-ID:CC:To:From:Subject:Date: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=IgKwWs3WbrGru2Zbg7jp+axhpaw1ZDg3hn9ZKvUvhyI=; b=SzcqLUPlRlo+RlG4JxFrau1y6U eH7SKzi8HjbsMRPxrnptf+VQW8hYetj3VRKMsIQlthCCtzg7s1X59uD+gtKcuaGtFGRaFjTfcpsso VZG5rk/HbYfjH5rE9ogbfXYG+PqrkmUUGvLdTHym8zG7TuZ6wDTK00jSPdM9LGna5sDM=; Received: from [47.220.164.50] (port=12168 helo=[192.168.200.198]) by thebighonker.lerctr.org with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89 (FreeBSD)) (envelope-from ) id 1czD1f-0002Dn-UQ; Fri, 14 Apr 2017 21:01:24 -0500 User-Agent: Microsoft-MacOutlook/f.21.0.170409 Date: Fri, 14 Apr 2017 21:01:22 -0500 Subject: Re: svn commit: r316938 - head/sbin/savecore From: Larry Rosenman To: CC: "Ngie Cooper (yaneurabeya)" , "src-committers@freebsd.org" , Alan Somers , "svn-src-all@freebsd.org" , Slawa Olhovchenkov , "svn-src-head@freebsd.org" , Ngie Cooper Message-ID: <1920E973-DAB4-447D-B578-274288C251FF@lerctr.org> Thread-Topic: svn commit: r316938 - head/sbin/savecore References: <201704150159.v3F1xd0q009325@pdx.rh.CN85.dnsmgr.net> In-Reply-To: <201704150159.v3F1xd0q009325@pdx.rh.CN85.dnsmgr.net> Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 02:01:25 -0000 On 4/14/17, 8:59 PM, "Rodney W. Grimes" wr= ote: > On 4/14/17, 8:35 PM, "Rodney W. Grimes" wrote: >=20 > > Yeah, I have the following: > > borg.lerctr.org /home/ler $ swapctl -l > > Device: 1024-blocks Used: > > /dev/mfid0p3 8388608 0 > > /dev/mfid1p3 8388608 0 > > /dev/mfid2p3 8388608 0 > > /dev/mfid3p3 8388608 0 > > /dev/mfid4p3 8388608 0 > > /dev/mfid5p3 8388608 0 > > borg.lerctr.org /home/ler $ sysctl hw.physmem > > hw.physmem: 137368682496 > > borg.lerctr.org /home/ler $ > >=20 > > SO 6 8G partitions (48G), but the dump is larger than 8G.=20 > =20 > Larry, > This is a very good concern and point given todays more > common huge memory foot prints and lots of spindles. I'll > keep this in they back of my mind as I tromp around in the > dump code. I have another solution that may work for you > and that is to use Netdump rather than swapdump. This > basically eliminates the trip to swap space and you end > up going to savecore style output on the netdump server. > =20 > --=20 > Rod Grimes rgrime= s@freebsd.org > =20 > What does it take for NetDump to work to a FreeNAS (9.10 nightly) ser= ver since that?s what is ?next to? this server? =20 =20 As a netdump server FreeNAS would be fairly trivial to compile the netd= ump client code for. I should have running 11.0 and 10.2 code around some place. =20 --=20 Rod Grimes rgrimes@free= bsd.org =20 I=E2=80=99m also running: borg.lerctr.org /home/ler $ uname -a FreeBSD borg.lerctr.org 12.0-CURRENT FreeBSD 12.0-CURRENT #23 r316945: Fri = Apr 14 18:37:13 CDT 2017 root@borg.lerctr.org:/usr/obj/usr/src/sys/VT-LE= R amd64 borg.lerctr.org /home/ler $ From owner-svn-src-head@freebsd.org Sat Apr 15 02:02:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0DD0BD3E0FC; Sat, 15 Apr 2017 02:02:06 +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 B1453AB0; Sat, 15 Apr 2017 02:02:06 +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=Content-transfer-encoding:Content-type:Mime-version:In-Reply-To: References:Message-ID:CC:To:From:Subject:Date: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=yY/+NQmGvceB/o+TcZiQAnA9wHZtoFo5rJaLwKZ2acA=; b=Sp81T0cEwxfC3E7kM5bLo4S+eG CzAWT4Oc7N2u2QbtRKbL8/D1I2L40zjA4vSKpCx0twmAliV+u+HJvoAE4mVF7up/iSX6TCJfNrbRy 16P5uuHLnRwmYkclO++bWjeJyrRrj5gGfL08HmmjkhOGkEbHsFr1YsZAYLHmO0hM8UQo=; Received: from [47.220.164.50] (port=12168 helo=[192.168.200.198]) by thebighonker.lerctr.org with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89 (FreeBSD)) (envelope-from ) id 1czD2L-0002Dn-UZ; Fri, 14 Apr 2017 21:02:06 -0500 User-Agent: Microsoft-MacOutlook/f.21.0.170409 Date: Fri, 14 Apr 2017 21:02:05 -0500 Subject: Re: svn commit: r316938 - head/sbin/savecore From: Larry Rosenman To: CC: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Ngie Cooper Message-ID: <263DC438-1846-47D8-BB10-AC2E46FD4D56@lerctr.org> Thread-Topic: svn commit: r316938 - head/sbin/savecore References: <201704150135.v3F1ZD2S009211@pdx.rh.CN85.dnsmgr.net> In-Reply-To: Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 02:02:07 -0000 It looked like the netdump code might need some stuff for current =E2=80=93CURREN= T.=20 --=20 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 =20 =20 On 4/14/17, 9:00 PM, "Conrad Meyer" wrote: Larry, =20 You just need to run netdumpd on the nearby server. It could be a port (although I'm not aware that it is ported yet). =20 Best, Conrad =20 On Fri, Apr 14, 2017 at 6:37 PM, Larry Rosenman wrote: > On 4/14/17, 8:35 PM, "Rodney W. Grimes" wrote: > >> Yeah, I have the following: > > borg.lerctr.org /home/ler $ swapctl -l > > Device: 1024-blocks Used: > > /dev/mfid0p3 8388608 0 > > /dev/mfid1p3 8388608 0 > > /dev/mfid2p3 8388608 0 > > /dev/mfid3p3 8388608 0 > > /dev/mfid4p3 8388608 0 > > /dev/mfid5p3 8388608 0 > > borg.lerctr.org /home/ler $ sysctl hw.physmem > > hw.physmem: 137368682496 > > borg.lerctr.org /home/ler $ > > > > SO 6 8G partitions (48G), but the dump is larger than 8G. > > Larry, > This is a very good concern and point given todays more > common huge memory foot prints and lots of spindles. I'll > keep this in they back of my mind as I tromp around in the > dump code. I have another solution that may work for you > and that is to use Netdump rather than swapdump. This > basically eliminates the trip to swap space and you end > up going to savecore style output on the netdump server. > > -- > Rod Grimes rgrime= s@freebsd.org > > What does it take for NetDump to work to a FreeNAS (9.10 nightly) ser= ver since that=E2=80=99s what is =E2=80=9Cnext to=E2=80=9D this server? > > > =20 From owner-svn-src-head@freebsd.org Sat Apr 15 02:05:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF276D3E1E9; Sat, 15 Apr 2017 02:05:06 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A74F4CA4; Sat, 15 Apr 2017 02:05:06 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v3F251t7009389; Fri, 14 Apr 2017 19:05:01 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v3F251PX009388; Fri, 14 Apr 2017 19:05:01 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201704150205.v3F251PX009388@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r316938 - head/sbin/savecore In-Reply-To: <201704150159.v3F1xd0q009325@pdx.rh.CN85.dnsmgr.net> To: rgrimes@freebsd.org Date: Fri, 14 Apr 2017 19:05:01 -0700 (PDT) CC: Larry Rosenman , "Ngie Cooper (yaneurabeya)" , "src-committers@freebsd.org" , Alan Somers , "svn-src-all@freebsd.org" , Slawa Olhovchenkov , "svn-src-head@freebsd.org" , Ngie Cooper Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 02:05:07 -0000 > > On 4/14/17, 8:35 PM, "Rodney W. Grimes" wrote: > > > > > Yeah, I have the following: > > > borg.lerctr.org /home/ler $ swapctl -l > > > Device: 1024-blocks Used: > > > /dev/mfid0p3 8388608 0 > > > /dev/mfid1p3 8388608 0 > > > /dev/mfid2p3 8388608 0 > > > /dev/mfid3p3 8388608 0 > > > /dev/mfid4p3 8388608 0 > > > /dev/mfid5p3 8388608 0 > > > borg.lerctr.org /home/ler $ sysctl hw.physmem > > > hw.physmem: 137368682496 > > > borg.lerctr.org /home/ler $ > > > > > > SO 6 8G partitions (48G), but the dump is larger than 8G. > > > > Larry, > > This is a very good concern and point given todays more > > common huge memory foot prints and lots of spindles. I'll > > keep this in they back of my mind as I tromp around in the > > dump code. I have another solution that may work for you > > and that is to use Netdump rather than swapdump. This > > basically eliminates the trip to swap space and you end > > up going to savecore style output on the netdump server. > > > > -- > > Rod Grimes rgrimes@freebsd.org > > > > What does it take for NetDump to work to a FreeNAS (9.10 nightly) server since that?s what is ?next to? this server? > > As a netdump server FreeNAS would be fairly trivial to compile the netdump > client code for. I should have running 11.0 and 10.2 code around > some place. You know, maybe we should get the client side code pushed in, that has been stable and not stomped on by other changes and is usable for those of us who have kernels that can do netdump. It is a fairly simple daemon that listens on a socket and stores the dumps. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sat Apr 15 02:16:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06EA5D3E4EF; Sat, 15 Apr 2017 02:16:16 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com [74.125.82.51]) (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 92CD9279; Sat, 15 Apr 2017 02:16:15 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-wm0-f51.google.com with SMTP id o81so3764983wmb.1; Fri, 14 Apr 2017 19:16:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=mjPqNTvtFsKYZEqjZMOx+i3hywXCIHlEwZT0swO21fU=; b=rhRq6RIt4aM/P4LsXvaICTyC530jTK9Tqd2+RFQOuk/dLKe4YpP/Bt2jLMRrqxYT1U dTXmXyaOuHFHpGEBsi42z9Z3bK55PoKr4+HAHReHOPFZ48GX7MjKxxcOZ1QkVPdHK78o z0MET4E4wf6mKeT79THLXFSFGqIy9wxt90RbPRo3L5nkzVcFueNGmO7LzoSBG9sCBkGO z5396unxTaxh4R2fvDSIzzZp/A8Pu+Ung6ZRjL2Z3LDPybUGB8fX1PXw3VyLr15ZyMd0 S6FlV3eoxSP36hHa3WblLyv9nvasvAdZfpjj2kF2Fc6+98bcM9Bcac6/fRl3L5UivRKD nV2g== X-Gm-Message-State: AN3rC/5Z0fGOVLYgwl1OA8JnWeunDXqAA1ug4zvidCwbAJXGuoYDOvWz 9g02RgqVh1JmzulN2W8V/Q== X-Received: by 10.28.10.70 with SMTP id 67mr904228wmk.131.1492222572960; Fri, 14 Apr 2017 19:16:12 -0700 (PDT) Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com. [74.125.82.44]) by smtp.gmail.com with ESMTPSA id 13sm709634wmt.22.2017.04.14.19.16.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Apr 2017 19:16:12 -0700 (PDT) Received: by mail-wm0-f44.google.com with SMTP id u2so3586746wmu.0; Fri, 14 Apr 2017 19:16:12 -0700 (PDT) X-Received: by 10.28.111.134 with SMTP id c6mr890207wmi.128.1492222572740; Fri, 14 Apr 2017 19:16:12 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.80.169.4 with HTTP; Fri, 14 Apr 2017 19:16:11 -0700 (PDT) In-Reply-To: <263DC438-1846-47D8-BB10-AC2E46FD4D56@lerctr.org> References: <201704150135.v3F1ZD2S009211@pdx.rh.CN85.dnsmgr.net> <263DC438-1846-47D8-BB10-AC2E46FD4D56@lerctr.org> From: Conrad Meyer Date: Fri, 14 Apr 2017 19:16:11 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r316938 - head/sbin/savecore To: Larry Rosenman Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Ngie Cooper Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 02:16:16 -0000 On Fri, Apr 14, 2017 at 7:02 PM, Larry Rosenman wrote: > It looked like the netdump code might need some stuff for current =E2=80= =93CURRENT. Not for the server (netdumpd) =E2=80=94 it's just a simple UDP daemon that writes incoming UDP streams to disk. Best, Conrad From owner-svn-src-head@freebsd.org Sat Apr 15 02:17:14 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35EF6D3E55F; Sat, 15 Apr 2017 02:17:14 +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 123475FB; Sat, 15 Apr 2017 02:17:14 +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=Content-transfer-encoding:Content-type:Mime-version:In-Reply-To: References:Message-ID:CC:To:From:Subject:Date: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=WJFQVbDZVf+KQH8uKj/pbR2SLYvvu0nWSe4jyCW/1WA=; b=EoEwVXxf3ncl/nl/wnF6UGopyG 4ki4cbAhSqJy6jKreOiPVyhXcFNGRO7I8Xpjx5N1K0fP9cpqp4CVg3afWiEKsj11zKziX9LmXl2fL iQkhx2sLfrTw/BiR5y1vfaxkAdXFz8AqcW9F1jzS1fLkioz/FGStoJlbEkY4sYkyXSvs=; Received: from [47.220.164.50] (port=36695 helo=[192.168.200.198]) by thebighonker.lerctr.org with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89 (FreeBSD)) (envelope-from ) id 1czDGz-0002cy-Du; Fri, 14 Apr 2017 21:17:13 -0500 User-Agent: Microsoft-MacOutlook/f.21.0.170409 Date: Fri, 14 Apr 2017 21:17:13 -0500 Subject: Re: svn commit: r316938 - head/sbin/savecore From: Larry Rosenman To: CC: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Ngie Cooper Message-ID: <5E527867-0C83-4CA5-8228-23A72B914F10@lerctr.org> Thread-Topic: svn commit: r316938 - head/sbin/savecore References: <201704150135.v3F1ZD2S009211@pdx.rh.CN85.dnsmgr.net> <263DC438-1846-47D8-BB10-AC2E46FD4D56@lerctr.org> In-Reply-To: Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 02:17:14 -0000 On 4/14/17, 9:16 PM, "Conrad Meyer" wrote: On Fri, Apr 14, 2017 at 7:02 PM, Larry Rosenman wrote: > It looked like the netdump code might need some stuff for current =E2=80=93= CURRENT. =20 Not for the server (netdumpd) =E2=80=94 it's just a simple UDP daemon that writes incoming UDP streams to disk. =20 Best, Conrad =20 I was referring to the code to actually dump to netdumpd. From owner-svn-src-head@freebsd.org Sat Apr 15 02:21:48 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21830D3E6A9; Sat, 15 Apr 2017 02:21:48 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) (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 B18BD958; Sat, 15 Apr 2017 02:21:47 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-wm0-f52.google.com with SMTP id w64so3814577wma.0; Fri, 14 Apr 2017 19:21:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=jcu6uWzM5KSUxLK24bczoDNuf1ay1cNkkc5NmebYBOo=; b=Mt9va6yNqRgf3YUk8Ge41FgSWY7Rj8x8oHKKs6xd0OPPXuqYzOVZY6MhsQmssimAfa BkywmyTONPhfN4+PpsbnyddhLWr5jANuChNhGQjwpLv9yAc4JvEjRI+J0igU6Sh5kfWM YaXa495fhpnCJcsc1fZl30ziFTrQ9QZXx5QUkboy13gaMhPUGbJKav3hSPNRTZ6l2Div 185SVgLzEn7tuxs9UrWeLT5lZIYXEy0xxxp4pIKEOgSGUE4nImeKSOTP9LsawbMxFxnA 32ic3Kqdh+G9y4B8hez7gMC8rlqNTirK2HKUyij6e7mtaJZAT0cUdiwmN0GBRamACuMP GgbA== X-Gm-Message-State: AN3rC/6cbXi2V+3aelX3r4tLCKo1VKXlRDm1ruYewh0LqkWbbpbJ7hOH GlIRu/kzzSlUODgJwkhV2Q== X-Received: by 10.28.178.17 with SMTP id b17mr892226wmf.23.1492222905137; Fri, 14 Apr 2017 19:21:45 -0700 (PDT) Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com. [74.125.82.51]) by smtp.gmail.com with ESMTPSA id l19sm4512417wre.2.2017.04.14.19.21.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Apr 2017 19:21:45 -0700 (PDT) Received: by mail-wm0-f51.google.com with SMTP id o81so3801060wmb.1; Fri, 14 Apr 2017 19:21:44 -0700 (PDT) X-Received: by 10.28.211.73 with SMTP id k70mr917338wmg.0.1492222904846; Fri, 14 Apr 2017 19:21:44 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.80.169.4 with HTTP; Fri, 14 Apr 2017 19:21:44 -0700 (PDT) In-Reply-To: <5E527867-0C83-4CA5-8228-23A72B914F10@lerctr.org> References: <201704150135.v3F1ZD2S009211@pdx.rh.CN85.dnsmgr.net> <263DC438-1846-47D8-BB10-AC2E46FD4D56@lerctr.org> <5E527867-0C83-4CA5-8228-23A72B914F10@lerctr.org> From: Conrad Meyer Date: Fri, 14 Apr 2017 19:21:44 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r316938 - head/sbin/savecore To: Larry Rosenman Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Ngie Cooper Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 02:21:48 -0000 That has not actually been committed yet. Mark Johnston has a patch for it= . On Fri, Apr 14, 2017 at 7:17 PM, Larry Rosenman wrote: > > On 4/14/17, 9:16 PM, "Conrad Meyer" wrote: > > On Fri, Apr 14, 2017 at 7:02 PM, Larry Rosenman wrot= e: > > It looked like the netdump code might need some stuff for current = =E2=80=93CURRENT. > > Not for the server (netdumpd) =E2=80=94 it's just a simple UDP daemon= that > writes incoming UDP streams to disk. > > Best, > Conrad > > > I was referring to the code to actually dump to netdumpd. > > > From owner-svn-src-head@freebsd.org Sat Apr 15 02:24:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7770D3E894; Sat, 15 Apr 2017 02:24:23 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 80B85C55; Sat, 15 Apr 2017 02:24:23 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3F2OMV9070093; Sat, 15 Apr 2017 02:24:22 GMT (envelope-from sobomax@FreeBSD.org) Received: (from sobomax@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3F2OMQq070092; Sat, 15 Apr 2017 02:24:22 GMT (envelope-from sobomax@FreeBSD.org) Message-Id: <201704150224.v3F2OMQq070092@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sobomax set sender to sobomax@FreeBSD.org using -f From: Maxim Sobolev Date: Sat, 15 Apr 2017 02:24:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316951 - head/usr.sbin/syslogd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 02:24:23 -0000 Author: sobomax Date: Sat Apr 15 02:24:22 2017 New Revision: 316951 URL: https://svnweb.freebsd.org/changeset/base/316951 Log: Since shutdown(2) on datagram socket is no longer a NOP after rev 316874 don't bother to select/recv on that socket. This prevents syslogd(8) from spinning endlessly when started with the -s option (default). Reported by: peter Modified: head/usr.sbin/syslogd/syslogd.c Modified: head/usr.sbin/syslogd/syslogd.c ============================================================================== --- head/usr.sbin/syslogd/syslogd.c Sat Apr 15 01:52:49 2017 (r316950) +++ head/usr.sbin/syslogd/syslogd.c Sat Apr 15 02:24:22 2017 (r316951) @@ -702,7 +702,7 @@ main(int argc, char *argv[]) sizeof(fd_mask)); STAILQ_FOREACH(sl, &shead, next) { - if (sl->sl_socket != -1) + if (sl->sl_socket != -1 && sl->sl_recv != NULL) FD_SET(sl->sl_socket, fdsr); } i = select(fdsrmax + 1, fdsr, NULL, NULL, @@ -2877,6 +2877,7 @@ socksetup(struct peer *pe) struct addrinfo hints, *res, *res0; int error; char *cp; + int (*sl_recv)(struct socklist *); /* * We have to handle this case for backwards compatibility: * If there are two (or more) colons but no '[' and ']', @@ -3003,6 +3004,7 @@ socksetup(struct peer *pe) } dprintf("new socket fd is %d\n", s); listen(s, 5); + sl_recv = socklist_recv_sock; dprintf("shutdown\n"); if (SecureMode || res->ai_family == AF_LOCAL) { /* Forbid communication in secure mode. */ @@ -3013,13 +3015,14 @@ socksetup(struct peer *pe) die(0); } dprintf("listening on socket\n"); + sl_recv = NULL; } else dprintf("sending on socket\n"); addsock(res->ai_addr, res->ai_addrlen, &(struct socklist){ .sl_socket = s, .sl_peer = pe, - .sl_recv = socklist_recv_sock + .sl_recv = sl_recv }); } freeaddrinfo(res0); From owner-svn-src-head@freebsd.org Sat Apr 15 02:25:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF28AD3E912; Sat, 15 Apr 2017 02:25:19 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-yw0-x241.google.com (mail-yw0-x241.google.com [IPv6:2607:f8b0:4002:c05::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 7D8E5DAE; Sat, 15 Apr 2017 02:25:19 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-yw0-x241.google.com with SMTP id 203so6904738ywk.3; Fri, 14 Apr 2017 19:25:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=svkWcF/LSWA6FNC6mkNgSpF8aW1CiUQJFzayvdkdE1s=; b=Y/lhJbNRlNNTsvUoTOg3RiazXW1XL3kf2KhlwsrjmAoGZvCpwK9GiJnFFc1N7cUi58 j8aL/20oS4AB//e+MA5CpNDx4BWEjnVtiYQd+Oij7qLyQfURR2zc6iMTQBSrd8m5Xlhi wF5q8Re3R/S8yPhup9uPecJ6R2iB5VuJ9nDNOtNL2OLwK/3+NgWmOyYOg2RWWeWvV/yh hPa9gUKP+T5kEeKiktaFDdRf19OGS2qE8sAVWGMWGT4+qM74U7KUcLOjexAdR4FIdSW8 q1y8kn/BJJRsieusK/cMoOTj4eZ7zyjEGiHhz7h66+CGRclD9DZ55t251dWSvWwx2Do3 3z8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=svkWcF/LSWA6FNC6mkNgSpF8aW1CiUQJFzayvdkdE1s=; b=AqVoq3MCye3Z/auKMc7ggYvxypUq81WhKoJyHroPbFfi/Je4Drywk8aJpQ1/RuVPEQ sVhmw2kCKJpw6nVirLZSDkEopLCn17pdP6cCwaMN2eZvhngsB7Vg6mpI4sL2YJb+8ntp vfnkWk76G1+6Z1sSmcdudIO2n6H3LZeKVp9K+ne48rMl1TVK/cEUSyxfrnooM+btkzKS kQN1Mipj0wMRz6RP2r6ilF1XFkNJze/RSVkBqiteeEBZZnm0hgdS2uo1kWW0qw72uFmN r1wrSmegHoUQY8VJ3a1Dfd8hgzP/AzoFeOi5JxPts634hWyBPMD0UlQB9WjFOlKCgl87 XpAQ== X-Gm-Message-State: AN3rC/5xSaio2cdMHNauJlPPIb9DwBA5F7P4Y51MtJhyYUBBJ0ZkDscH eA94vCK2R1NHu2fRshGoVMJMFQpIoCoJpy0= X-Received: by 10.13.223.134 with SMTP id i128mr8029213ywe.117.1492223118479; Fri, 14 Apr 2017 19:25:18 -0700 (PDT) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.129.20.214 with HTTP; Fri, 14 Apr 2017 19:25:18 -0700 (PDT) In-Reply-To: <201704150155.v3F1teNW009309@pdx.rh.CN85.dnsmgr.net> References: <201704142259.v3EMxEAa083233@repo.freebsd.org> <201704150155.v3F1teNW009309@pdx.rh.CN85.dnsmgr.net> From: Alan Somers Date: Fri, 14 Apr 2017 20:25:18 -0600 X-Google-Sender-Auth: n9fFYu7UOWSlL-HaZiOmk-ogngI Message-ID: Subject: Re: svn commit: r316945 - in head: etc/defaults etc/periodic/daily share/man/man5 To: rgrimes@freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 02:25:19 -0000 On Fri, Apr 14, 2017 at 7:55 PM, Rodney W. Grimes wrote: > [ Charset UTF-8 unsupported, converting... ] >> Author: asomers >> Date: Fri Apr 14 22:59:14 2017 >> New Revision: 316945 >> URL: https://svnweb.freebsd.org/changeset/base/316945 >> >> Log: >> Add 410.status-mfi, a periodic script for mfi(4) arrays >> >> PR: 176049 >> Submitted by: doconnor@gsoft.com.au >> Reviewed by: scottl, Larry Rosenman >> MFC after: 3 weeks >> Relnotes: yes >> >> Added: >> head/etc/periodic/daily/410.status-mfi (contents, props changed) >> Modified: >> head/etc/defaults/periodic.conf >> head/etc/periodic/daily/Makefile >> head/share/man/man5/periodic.conf.5 >> >> Modified: head/etc/periodic/daily/Makefile >> ============================================================================== >> --- head/etc/periodic/daily/Makefile Fri Apr 14 22:02:08 2017 (r316944) >> +++ head/etc/periodic/daily/Makefile Fri Apr 14 22:59:14 2017 (r316945) >> @@ -13,6 +13,7 @@ FILES= 100.clean-disks \ >> 400.status-disks \ >> 401.status-graid \ >> 406.status-gmirror \ >> + 410.status-mfi \ >> 407.status-graid3 \ >> 408.status-gstripe \ >> 409.status-gconcat \ > > Insered into the middle of a number sorted list? Mea culpa. Already fixed in r316946. > Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sat Apr 15 02:32:38 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E73B8D3EB14; Sat, 15 Apr 2017 02:32:38 +0000 (UTC) (envelope-from peter@wemm.org) Received: from smtp2.wemm.org (smtp2.wemm.org [IPv6:2001:470:67:39d::78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp2.wemm.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C90ED1F5; Sat, 15 Apr 2017 02:32:38 +0000 (UTC) (envelope-from peter@wemm.org) Received: from overcee.wemm.org (canning.wemm.org [192.203.228.65]) by smtp2.wemm.org (Postfix) with ESMTP id 52AA14E1; Fri, 14 Apr 2017 19:32:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=m20140428; t=1492223558; bh=+oGZTFoQn2TkAKJP/d4Kr4khMczEO+XEnmZQb8Q/WWU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=WrDEOdybLm4i1tJ7+JYBFallGREa/0MiYHQv8symN+0X1XN7SPkc1Vvg5jO7V9nLx fmsGhZciFd2JuLjwwO+uMbeM9+hOA6+1QDSs8bBb2mVE7ghpnIyIuKpTa8X3wXQBs9 WC5NO0valg/3/PP6WriK+RCGT+Sg0Znk34ZuW4fg= From: Peter Wemm To: Maxim Sobolev Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Hiren Panchasara Subject: Re: svn commit: r316874 - head/sys/kern Date: Fri, 14 Apr 2017 19:32:33 -0700 Message-ID: <6546471.KH0i3bg3hj@overcee.wemm.org> User-Agent: KMail/4.14.10 (FreeBSD/12.0-CURRENT; KDE/4.14.10; amd64; ; ) In-Reply-To: References: <201704141723.v3EHNS3B043902@repo.freebsd.org> <6942092.OsECkgAp13@overcee.wemm.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2010007.ntouo2SN7c"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 02:32:39 -0000 --nextPart2010007.ntouo2SN7c Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="us-ascii" On Friday, April 14, 2017 02:21:05 PM Maxim Sobolev wrote: > Peter, It is actually the other way around. If you take syslogd code = out of > 11-stable and earlier that would work just fine with or without r3168= 74. > But since r285910 syslogd in head had been refactored a lot and I thi= nk > that particular bug has introduced that has been masked by the shutdo= wn() > on datagram sockets becoming a NOP after r285910. Then r316874 restor= ed our > historical behavior for the shutdown(2) and bingo, bug in the new sys= logd > code is now causing it to spin when shutdown() !=3D NOP. >=20 > -Max Hmm, there's a new problem: 45104 auditd CALL socket(PF_LOCAL,0x10000002,0) 45104 auditd RET socket 3 45104 auditd CALL connect(0x3,0x7fffffffdbd8,0x6a) 45104 auditd STRU struct sockaddr { AF_LOCAL, /var/run/logpriv } 45104 auditd NAMI "/var/run/logpriv" 45104 auditd RET connect 0 45104 auditd CALL sendto(0x3,0x7fffffffe130,0x2f,0,0,0) 45104 auditd RET sendto -1 errno 55 No buffer space available 45104 auditd CALL open(0x800da5c67,0x100005) 45104 auditd NAMI "/dev/console" 45104 auditd RET open 4 .. and it all goes to /dev/console instead. On restarting syslogd: Apr 15 02:17:43 repoman2 syslogd: exiting on signal 15 sonewconn: pcb 0xfffff80051e72680: Listen queue overflow: 16 already in= queue=20 already Umm.. did the patch forget to listen to incoming connections or somethi= ng? I haven't seen this before anywhere except when syslogd is wedged. >=20 > On Fri, Apr 14, 2017 at 12:46 PM, Peter Wemm wrote: > > On Friday, April 14, 2017 12:41:52 PM Maxim Sobolev wrote: > > > Thanks, Peter. I will try to look into this asap. > >=20 > > I don't understand what is going on yet. Presumably there must be o= ther > > changes in play that affect udp/select sometime between the origina= l 2015 > > change and this. The syslogd -s code is Old(TM). I'm also wonderin= g > > whether > > the -s code even works at all since the 2015 / r285910 change... > >=20 > > > -Max > > >=20 > > > On Apr 14, 2017 12:32 PM, "Peter Wemm" wrote: > > > > On Friday, April 14, 2017 11:49:26 AM Peter Wemm wrote: > > > > > On Friday, April 14, 2017 05:23:28 PM Maxim Sobolev wrote: > > > > > > Author: sobomax > > > > > > Date: Fri Apr 14 17:23:28 2017 > > > > > > New Revision: 316874 > > > > > > URL: https://svnweb.freebsd.org/changeset/base/316874 > > > > > >=20 > > > > > > Log: > > > > > > Restore ability to shutdown DGRAM sockets, still forcing > >=20 > > ENOTCONN to > >=20 > > > > be > > > >=20 > > > > > > returned by the shutdown(2) system call. This ability has b= een > >=20 > > lost as > >=20 > > > > > > part > > > > > > of the svn revision 285910. > > > > > >=20 > > > > > > Reviewed by: ed, rwatson, glebius, hiren > > > > > > MFC after: 2 weeks > > > > > > Differential Revision: https://reviews.freebsd.org/D10= 351 > > > > >=20 > > > > > This appears to have broken syslogd and had a major change in= > >=20 > > behavior > >=20 > > > > with > > > >=20 > > > > > regards to select(2). > > > > >=20 > > > > > If you run syslogd with the -s flag (which is default), it no= w spins > >=20 > > at > >=20 > > > > 100% > > > >=20 > > > > > cpu as all the shutdown sockets now return readable from sele= ct. > > > > >=20 > > > > > Old releases / jails also manifest this behavor. If it wasn'= t for > > > > > losing > > > > > the ability to run old branch binaries I'd suggest changing s= yslogd > > > > > instead, but we depend on this in the cluster and I expect ot= hers do > > > > > too. > > > > >=20 > > > > > I'm not 100% certain that this change is the culprit but a he= ads-up > > > > > can't > > > > > hurt. I'll try reverting it on the freebsd cluster next, afte= r > > > > > fixing > > > > > the > > > > > broken auditing changes. > > > > >=20 > > > > > -Peter > > > >=20 > > > > I can confirm that reverting r316874 fixes syslogd and backward= s > > > > compatability > > > > with old branches. > > > >=20 > > > > -- > > > > Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc= .com; > > > > KI6FJV > > > > UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246= > >=20 > > -- > > Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com= ; > > KI6FJV > > UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246 =2D-=20 Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI= 6FJV UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246 --nextPart2010007.ntouo2SN7c Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEBgrA0Vr/vfNVuPoUNdaXCeyAngQFAljxhkEACgkQNdaXCeyA ngSYuwgAiYaKQFKr1C2yjuahP9uc782BCIvuvn7w+Eb+WzfU966Jh87jQlmzswxT ukf1hVk96LPALs55NqX6Z1ZfZ2oa0YN92dZ1px0+AryrAx+CPpgYYe+2Yrf3vYHu i84Z6ZgZjPb0Uf5Nmk7l8ypWHNxvCHZoyJDvFzwFbMECVrur1r6gYY76M3YCR2UK xQsKIrypebjc8j0Qe+GPLCOpaibYXRSA0Vl63pyp05aEf9KVN5PWjwmlnRHFNSh3 DH6O5vucb5IugU88FVNoxBJX8LmoRy6JI/ewyuDphKgquu45gRxFffaTAsO9wG/Y fNr5yzkas9EbmwLaTjOiOsh6/u4Jyg== =KM3L -----END PGP SIGNATURE----- --nextPart2010007.ntouo2SN7c-- From owner-svn-src-head@freebsd.org Sat Apr 15 02:36:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 985DED3EBBB; Sat, 15 Apr 2017 02:36:55 +0000 (UTC) (envelope-from peter@wemm.org) Received: from smtp2.wemm.org (smtp2.wemm.org [IPv6:2001:470:67:39d::78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp2.wemm.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 81FE63B0; Sat, 15 Apr 2017 02:36:55 +0000 (UTC) (envelope-from peter@wemm.org) Received: from overcee.wemm.org (canning.wemm.org [192.203.228.65]) by smtp2.wemm.org (Postfix) with ESMTP id 4B8B94E7; Fri, 14 Apr 2017 19:36:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=m20140428; t=1492223815; bh=5h1T8H24HJ5mooEhKY2+WJVm9aCJPa9mIJnSn3W+RZw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=tzmIBOOzOLLPn8Bw6HAzR871jTUyb+7IGjpykGhuJ71E87inF6DkPsO9OJi/lw/KE tsG7jicKQT0/SUqf9XFxqkaM1bytkaQF55Q8ahKNf8OGFm5snLhVKaSXmEetQycAQY NDuSdyjIfeyXXLfczeKsE63soqDVfbRDLSEy1Wms= From: Peter Wemm To: "Ngie Cooper (yaneurabeya)" Cc: Maxim Sobolev , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Hiren Panchasara , Hiroki Sato Subject: Re: svn commit: r316874 - head/sys/kern Date: Fri, 14 Apr 2017 19:36:55 -0700 Message-ID: <13691757.t3s7Qik7v1@overcee.wemm.org> User-Agent: KMail/4.14.10 (FreeBSD/12.0-CURRENT; KDE/4.14.10; amd64; ; ) In-Reply-To: References: <201704141723.v3EHNS3B043902@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart3238559.iu6D6HdEu8"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 02:36:55 -0000 --nextPart3238559.iu6D6HdEu8 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="us-ascii" On Friday, April 14, 2017 02:14:16 PM Ngie Cooper wrote: > > On Apr 14, 2017, at 14:10, Maxim Sobolev wr= ote: > >=20 > > Peter, Ngie, > >=20 > > Looks like out of that refactoring came a logical bug that is prese= nt in > > the head, which causes syslod to first to shutdown the socket for r= eading > > and then try to select/recv on it (which is somewhat stupid). And t= hat > > issue has been masked by shutdown() on datagram socket becoming > > effectively a NOP in 11 & head 20 months ago. It only affects head > > though, 11-stable still has the old code which does not include tha= t > > half-closed socket into the select list. Attached patch is expected= to > > fix head, Peter, it would be nice if you can give it a try (restori= ng > > latest changes into uipc_sockets.c) and let me know if it helps. > >=20 > > Thanks! >=20 > CCing hrs@ for input as he did the refactoring. > Thanks! > -Ngie >=20 > PS LGTM with the change. Will wait for feedback from wemm@. This is definitely not working. I get ENOSPC and listen queue overflo= ws on=20 /var/run/logpriv now. Grabbing an old 10.3 /usr/sbin/syslogd and placing it on the top of the= 12.x=20 one worked fine, aside from the include statements. =2D-=20 Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI= 6FJV UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246 --nextPart3238559.iu6D6HdEu8 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEBgrA0Vr/vfNVuPoUNdaXCeyAngQFAljxh0cACgkQNdaXCeyA ngTMEAf/ZfGz2aGu0L9XPstos2TSqePLeyPsBf0RNANU3vhgbFcKQzLtIV0GXaKs rpadYtXEpunawlbe/vzz//BQU14Acf5v65YmMxjMS78ZEI2atalwAyZLLVKs2uRg ehTlq3mH0DaPi2E7Fd5BxdzNX3QsO6WC8cJ6QVKD4THNlCvYbyHANtBY31FUrKf1 a6UfWauFO1V0AVwhV6Ooj1SjRmGLpENSxFhs/dfieb6khE40V/aSnY7ngaGEBq8B eZZk/8p6K8gS4L1cBN/0BmVSCOkQvtD0jAdAJmbts2Qbk2hVGTjAsr+dr47jMPjG huf95KmoT3toCJvWLcQP3Iid/q/BmA== =HNXh -----END PGP SIGNATURE----- --nextPart3238559.iu6D6HdEu8-- From owner-svn-src-head@freebsd.org Sat Apr 15 02:41:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D80ED3EE73; Sat, 15 Apr 2017 02:41:01 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x241.google.com (mail-pg0-x241.google.com [IPv6:2607:f8b0:400e:c05::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 1A177823; Sat, 15 Apr 2017 02:41:01 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x241.google.com with SMTP id 34so15700330pgx.3; Fri, 14 Apr 2017 19:41:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=3clz1G6XAVVc2KHWDeHsqLNVtbyTMXGvGcXRpKw45xs=; b=ZIARgD/laQ9kb+hL3UmmanIOaZ1nQzGSuurNnrO1dE6n100s44TzbawjrtXCyJSaNz 3zuTs+f0t6rnk4eE0jETwxnEzAnkv6SOzSDmQMzwDWoppSAVoH55orL82FZPvPoJ3Nqw NTtixr39n/o044QC9wm7fV+iKAQTxysu+KtlfTrEGUhdi5bWOxMEiQkML71a/FLBAYMi XYS/hhw2obpIA9fp3hrUKi5I7qDycpBDqjWZoOCquO6kyuaBeLhk/Fq8P8QA9CZYsoYx IP69gB55WtzySUoPLvEHfYAr0jfAal7mAgftebMsc/oItw2XBai9k0ABTHw9DcoBaIn0 czxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=3clz1G6XAVVc2KHWDeHsqLNVtbyTMXGvGcXRpKw45xs=; b=gFQ+tMEG8W6OVIlgINvtWJHrZWXvT9XUKwitRXNMG31dV+oSrB2jVqqtk+YXcus7vU hfeoisvul0br7tjJ7BbvcWK1CWv17I8Ng4lZsact/Zvw1jnDvLmlmW6VTcxKhHrIAC0M Nb3v9utbzkuRvpCgnT11G4tYqLWcUChvlBQTiHSUAxptS3Rb+EaRbpTlcT0LHk0ntIGO dnbZfwC3OA03PkxTLI5vPknnjKut1sjooGHdIsnZD7y88ldLFL4o+qWICzAisdskiKvb suUIvUrUI+TEJKQcVG+50DHdclzy5XGQw1jFF+4ZXU2poQBQJ9n1npopzBCeRbTFVflo QO3A== X-Gm-Message-State: AN3rC/7EavRjONcrFUeq05YBIyyK+Udm8/1sB39jK6MysBmo4aI4bFyS 2tGCQJpToate8ACm0Wo= X-Received: by 10.98.52.193 with SMTP id b184mr645132pfa.82.1492224060279; Fri, 14 Apr 2017 19:41:00 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id d82sm5369610pfl.124.2017.04.14.19.40.58 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Apr 2017 19:40:58 -0700 (PDT) Subject: Re: svn commit: r316938 - head/sbin/savecore Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_D704F685-4935-47FC-9D53-C6152B6B9F90"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201704150149.v3F1nu0D009274@pdx.rh.CN85.dnsmgr.net> Date: Fri, 14 Apr 2017 19:40:57 -0700 Cc: John Baldwin , Ngie Cooper , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <4CBF25DF-F407-4F50-8724-B73F64734E19@gmail.com> References: <201704150149.v3F1nu0D009274@pdx.rh.CN85.dnsmgr.net> To: rgrimes@freebsd.org X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 02:41:01 -0000 --Apple-Mail=_D704F685-4935-47FC-9D53-C6152B6B9F90 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Apr 14, 2017, at 18:49, Rodney W. Grimes = wrote: >=20 >> On Friday, April 14, 2017 07:41:48 PM Ngie Cooper wrote: >>> Author: ngie >>> Date: Fri Apr 14 19:41:48 2017 >>> New Revision: 316938 >>> URL: https://svnweb.freebsd.org/changeset/base/316938 >>>=20 >>> Log: >>> savecore: fix space calculation with respect to `minfree` in = check_space(..) >>>=20 >>> - Use strtoll(3) instead of atoi(3), because atoi(3) limits the >>> representable data to INT_MAX. Check the values received from >>> strtoll(3), trimming trailing whitespace off the end to maintain >>> POLA. >>> - Use `KiB` instead of `kB` when describing free space, total = space, >>> etc. I am now fully aware of `KiB` being the IEC standard for = 1024 >>> bytes and `kB` being the IEC standard for 1000 bytes. >>=20 >> I will just rant lightly that no one actually uses this in the real = world. >>=20 >> Good lucking finding a "16 GiB" DIMM on crucial.com or a 4Kin drive. = A >> kilobyte is a power of 2. The End. >>=20 >> (Next up we'll have to rename 4k displays to >> 4k) >=20 > Do we use KiB, MiB, GiB,... any place else in the system? I cant = think of > a place we do this, so please, lets not start doing this here? humanize_number(3) from libutil uses IEC units. > Yes, these are newer standards, perhaps some day we should make a = global > switch to them, but lets not start mixing and matching things. I understand and agree. I=E2=80=99m not 100% sold on that one way or = another, but since I was going to redo the number representation in save = core with humanize_number(3), because reading `KiB` is = not ideal usability wise, and I don=E2=80=99t want to reinvent the wheel = normalizing numbers and printing out the unit. Perhaps there should be a flag baked into humanize_number, etc for = parsing IEC vs non-IEC unit values? Thanks for the input :)! -Ngie --Apple-Mail=_D704F685-4935-47FC-9D53-C6152B6B9F90 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----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJY8Yg5AAoJEPWDqSZpMIYVGtkP/RkTXwoej2EaIuPE/hJDOKk1 aKqIsNETeXbzHEeLnIxGMIdEjdxPLSQ7blIMsju67lFBRi0CDnYOHNa2Qy6cltUC ZclqMH+1wkvenu8j5H13KMeqjclXLHnmZJ8HzZfTTjhAUE9k/tYFl/UCEigDFe7w vhwfa2l06D+jPXQuM/pb3TqFrwPKv4x1EB/EYhnhSzgexgXZ5sxxBeHM9+uFfeC4 +62M60IpJWDotj1quAicYtWHqrtGtpVl62LRcRFJ664kfcqch1/5YhB7u4Ow4d1g g1BJYcgS1WAsCqBT0tACACWnJMEk1GR0vxCDFqYbEabnGJ1BQPSp9ctd+7PHjvQq vCHe0kYE+jiYgkvo8E+wBanuVM9bjWeuRqijiwr9jQ+cE4LXr61A7wnWdJpsE6O7 LghVkG/keWkv0Mev5TdsOg73TlW8yDauo/GlIczeB2U7EIDe6h8MYFF5FvtNuUpd 40BIjwEw5gidp4luiWDmk4aVKMNYqBmV9t4RcNZ2uh496bFtW+cCLjl108xkxuf6 Ue/BLDzWE7kn93F/wBG3qfkQ5LQGrVaUE7vTxP5LeVks5fvxsqn1YYt4E+pkm8ZN 4BaqBrd7mobgGJgB3i+X9AD9R2iOlyprVSfBDhl1xhR+/z+MhflWIp8JwGQppnjL v3QKHADSxxOA2QhmXztk =q2LA -----END PGP SIGNATURE----- --Apple-Mail=_D704F685-4935-47FC-9D53-C6152B6B9F90-- From owner-svn-src-head@freebsd.org Sat Apr 15 02:49:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFBEDD3EFA0; Sat, 15 Apr 2017 02:49:22 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x241.google.com (mail-pf0-x241.google.com [IPv6:2607:f8b0:400e:c00::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 ADFD7C06; Sat, 15 Apr 2017 02:49:22 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x241.google.com with SMTP id c198so17213818pfc.0; Fri, 14 Apr 2017 19:49:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=p3uIRJNIMPh8x9A/tfe7L9yK2ok5amYDkfg7ABq5Oj0=; b=BA43LuDtg+iIVTkF7cVP9pot0Dc2nK0o7sfxPl/vky6OoGXRqyS8snyRRBee0j4Uqy gWi9pUpfQCW4Ru0imL5fPKJP23xarVNONtYrtQbeVD83XyE8N/pSOWnj28466K/if3sF MHqyBgC/+06Dr6n0xiBJ0O+J2nBcSWaIf1JVTuYGAomD5l6Qi5Yz2m/tN2ZM/YRsorww Nxx6eyFGXcWmjmupYCOBI2xhBYI39MJysufpB2KvlH9vNP0IEieFhrLNDs2G1F4Q1nHc LJH4t+jbbiCvqgVEKg6ERxjcGpm6RxTA4pFQNnHSOp0Y/ViFomqplqLspQWy73rA+Y3C PdjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=p3uIRJNIMPh8x9A/tfe7L9yK2ok5amYDkfg7ABq5Oj0=; b=uKiTuVcbd1fu2G99pvntk0cpLEViMaTrj/cMxyfw73AXS3jpZnit5iN+0dBfNaaU16 cfCIHFEQW2gHqYqj/RcO0mbsSSzTiepaF25J16zwSKpHIS2cCQJc45kuDKkSXRCEie/r 3KVe84nwcljDYlHbr/aQLLgdvVqiNt028zZ0or6KjI63Dos0V6TOmFLgA145aWk2OTll tkocJuMGh6YDnyJNxJoUa6OjWhaYMvKNIeFuR553vme2kQrfQX2aEduHbjnW1HzNOz4A G8ksPf41+ki4Mg3J5IlV7WDB3XbQAnrrpt8VdBFZWerQIT2Mm9sCRQpap0jmCDXZUeZH B+Bw== X-Gm-Message-State: AN3rC/6UYHY7rFTzmmnGSwR+G01225qbFCGZerxR0nIDHTgxVeS/Dmd9 +fZRgqQLU/sdSRqta9c= X-Received: by 10.99.104.69 with SMTP id d66mr668400pgc.93.1492224562051; Fri, 14 Apr 2017 19:49:22 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id e76sm5396308pfk.75.2017.04.14.19.49.21 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Apr 2017 19:49:21 -0700 (PDT) Subject: Re: svn commit: r316938 - head/sbin/savecore Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_7EEE690C-291E-4F6A-BEAF-F17DAD12193F"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <4CBF25DF-F407-4F50-8724-B73F64734E19@gmail.com> Date: Fri, 14 Apr 2017 19:49:20 -0700 Cc: John Baldwin , Ngie Cooper , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <62071184-0DDD-4996-867E-866BF1F8DC25@gmail.com> References: <201704150149.v3F1nu0D009274@pdx.rh.CN85.dnsmgr.net> <4CBF25DF-F407-4F50-8724-B73F64734E19@gmail.com> To: rgrimes@freebsd.org X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 02:49:23 -0000 --Apple-Mail=_7EEE690C-291E-4F6A-BEAF-F17DAD12193F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Apr 14, 2017, at 19:40, Ngie Cooper (yaneurabeya) = wrote: >=20 >>=20 >> On Apr 14, 2017, at 18:49, Rodney W. Grimes = wrote: >>=20 >>> On Friday, April 14, 2017 07:41:48 PM Ngie Cooper wrote: >>>> Author: ngie >>>> Date: Fri Apr 14 19:41:48 2017 >>>> New Revision: 316938 >>>> URL: https://svnweb.freebsd.org/changeset/base/316938 >>>>=20 >>>> Log: >>>> savecore: fix space calculation with respect to `minfree` in = check_space(..) >>>>=20 >>>> - Use strtoll(3) instead of atoi(3), because atoi(3) limits the >>>> representable data to INT_MAX. Check the values received from >>>> strtoll(3), trimming trailing whitespace off the end to maintain >>>> POLA. >>>> - Use `KiB` instead of `kB` when describing free space, total = space, >>>> etc. I am now fully aware of `KiB` being the IEC standard for = 1024 >>>> bytes and `kB` being the IEC standard for 1000 bytes. >>>=20 >>> I will just rant lightly that no one actually uses this in the real = world. >>>=20 >>> Good lucking finding a "16 GiB" DIMM on crucial.com or a 4Kin drive. = A >>> kilobyte is a power of 2. The End. >>>=20 >>> (Next up we'll have to rename 4k displays to >>> 4k) >>=20 >> Do we use KiB, MiB, GiB,... any place else in the system? I cant = think of >> a place we do this, so please, lets not start doing this here? >=20 > humanize_number(3) from libutil uses IEC units. >=20 >> Yes, these are newer standards, perhaps some day we should make a = global >> switch to them, but lets not start mixing and matching things. >=20 > I understand and agree. I=E2=80=99m not 100% sold on that one way or = another, but since I was going to redo the number representation in save = core with humanize_number(3), because reading `KiB` is = not ideal usability wise, and I don=E2=80=99t want to reinvent the wheel = normalizing numbers and printing out the unit. *unit. =E2=80=94> *unit, KiB seemed like a logical next step after = discussing it at long length in the CR. -Ngie --Apple-Mail=_7EEE690C-291E-4F6A-BEAF-F17DAD12193F 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----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJY8YowAAoJEPWDqSZpMIYVdU0QAMtoqa/sNeFe4pWmE4zMlH7C phHTNmNrYYGi7Uy0y0FoD7QsXW50JnBMK/EzpaEsZ5qZcJVHUwgGbzQChfcYtYNg lb57F8ma3RG/bQbXfgoNS5vhVUQeqJXUW/6S3/eRJxpnHck7okncs850ON0zyX+s jXEEbV2n6MiqwPkfpWE61h7H6IbNao1rxa4qfZtuIkne+ZmGZ85VR3F0ufAnu8ab g0b0Jf7+LtZCf6f50242kUa/g4y2u9J/3l8fqlA+jxj5kgmwwdSw6x35J9cqtgmV SpOz5SxBhLwIV2xKBwB544KDivL4u6HsO3vVLWVZxzX2xRDN7U574GlUlOeoON2p me3KON4lkKi+mv+2S2K6tYnSQHg61SSlMpF1yI/ncG2s1UW8Cq1H7sX/icQ1Gw9B Lu717C1gKVPN2liKVudUzpWOdnvPlnliyiE2FT6THtuwQtpnlHHavTkKaUfnoldX zaiq+yGt/XqmTN2Uaga1GJiPpGJML8bAZW8lGr1x2yis/8yXfXQDLb8BzR2yfQ4D 1BGWl0VB9MdXPKttELz4J+Y2sI4goO0LKZcg7W8Nf0ygrVl6iP3n6ZUI5GWXJ8LH 4SCWreJ3ieEq/sTwA/MmX3nXNAJafJL8gSalvMPoj0w033QIyMqwvkIUu3YNq0G1 wBTKgZ0kqId6hDlZJJu1 =qfu7 -----END PGP SIGNATURE----- --Apple-Mail=_7EEE690C-291E-4F6A-BEAF-F17DAD12193F-- From owner-svn-src-head@freebsd.org Sat Apr 15 03:05:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AFD6BD3E8AA; Sat, 15 Apr 2017 03:05:55 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 84CCE90; Sat, 15 Apr 2017 03:05:55 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v3F35reH009781; Fri, 14 Apr 2017 20:05:53 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v3F35rNJ009780; Fri, 14 Apr 2017 20:05:53 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201704150305.v3F35rNJ009780@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r316938 - head/sbin/savecore In-Reply-To: <4CBF25DF-F407-4F50-8724-B73F64734E19@gmail.com> To: "Ngie Cooper (yaneurabeya)" Date: Fri, 14 Apr 2017 20:05:53 -0700 (PDT) CC: rgrimes@freebsd.org, John Baldwin , Ngie Cooper , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 03:05:55 -0000 > > > On Apr 14, 2017, at 18:49, Rodney W. Grimes wrote: > > > >> On Friday, April 14, 2017 07:41:48 PM Ngie Cooper wrote: > >>> Author: ngie > >>> Date: Fri Apr 14 19:41:48 2017 > >>> New Revision: 316938 > >>> URL: https://svnweb.freebsd.org/changeset/base/316938 > >>> > >>> Log: > >>> savecore: fix space calculation with respect to `minfree` in check_space(..) > >>> > >>> - Use strtoll(3) instead of atoi(3), because atoi(3) limits the > >>> representable data to INT_MAX. Check the values received from > >>> strtoll(3), trimming trailing whitespace off the end to maintain > >>> POLA. > >>> - Use `KiB` instead of `kB` when describing free space, total space, > >>> etc. I am now fully aware of `KiB` being the IEC standard for 1024 > >>> bytes and `kB` being the IEC standard for 1000 bytes. > >> > >> I will just rant lightly that no one actually uses this in the real world. > >> > >> Good lucking finding a "16 GiB" DIMM on crucial.com or a 4Kin drive. A > >> kilobyte is a power of 2. The End. > >> > >> (Next up we'll have to rename 4k displays to > >> 4k) > > > > Do we use KiB, MiB, GiB,... any place else in the system? I cant think of > > a place we do this, so please, lets not start doing this here? > > humanize_number(3) from libutil uses IEC units. And how many things bother to use this library function? Do the ones that do call it produce the traditional output that has been around for 40 years? > > Yes, these are newer standards, perhaps some day we should make a global > > switch to them, but lets not start mixing and matching things. > > I understand and agree. I?m not 100% sold on that one way or another, but > since I was going to redo the number representation in save core with > humanize_number(3), because reading `KiB` is not ideal ^^^ I hope we are not already reading KiB anyplace.... > usability wise, and I don?t want to reinvent the wheel normalizing numbers > and printing out the unit. > > Perhaps there should be a flag baked into humanize_number, etc for parsing IEC vs non-IEC unit values? I dont think it parses anything, but as far as producing strings from values it already has an IEC flag: HN_IEC_PREFIXES, please lets not use this flag, and if we are using it anyplace lets see if we can remove that use. Also be careful, this function only accepts signed int 64, which means we are not gona be able to use this in all places that probably need this, so perhaps a larger can of paint for a bigger bike shead is needed? > Thanks for the input :)! input++; -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sat Apr 15 03:12:18 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B9AED3ED85; Sat, 15 Apr 2017 03:12:18 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x241.google.com (mail-pf0-x241.google.com [IPv6:2607:f8b0:400e:c00::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 45738ABC; Sat, 15 Apr 2017 03:12:18 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x241.google.com with SMTP id i5so17183045pfc.3; Fri, 14 Apr 2017 20:12:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=cFwOynXpsrq9KFOMYOXHT4+jWPP4juCGRefHRuAIkAM=; b=rcLlGrU8UxD1Pr82NK+qcxUqedfZ5TRllnZfxGeOnEj0txN0cZm3NzERl4sKFvp1BE i9PKHK+S/nbCs4XYF6Rdf090X2LJaDr8ekPIddcgUjogBhCCknfESVoPKzKptw72yQw0 oPMH+Xw8pmppHTLeSfpmdyt2ARRReetidmbZjC5suAe3a1Nhrg8FFd/ET300TTiiY2E9 ynhMzKQBw4YNMRKJrCEj7XjanGPfGgV1wcQfDzIJtMeIj0JwdR0zSmIMMpgmMFzGRk5y SoyfSDNY/HA+vuZqExP+vr3mIa1Vp9GvD8ppYtW6QsJhYLq5+hmUolRUTaGqhRMo3pp4 6//g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=cFwOynXpsrq9KFOMYOXHT4+jWPP4juCGRefHRuAIkAM=; b=Iq0i1uRycEw0RzDd+KjHH6lmn8FF4Xj+OGnyowHJ/FAVc+WGFa2D4J8U7XtiWvdZsk /lZNqk7k4L4PtLKzBRIfFY/Jt2hbojBKSt0amTFlB/1eROx8qGWxI6Mb0kuaiyKnfpxj RLeD7C6Ii1T4lHpUrs3JtY4WpoynpadQSTcpCzwmT6ZkD1z0yyRxnfEzCizAdoG9ervh 37Nc/DXogN8NMDp0yxMmpXBTt3HrYimPIfvDn04/VMtX/VWxaJ5uahfnwnpr7/cV66U6 tIAzLbMgaesBD5lCwbDV4M4eNfqOac9ES0ETrfs5EyaNxAIqcmTJq7pmGfB01gCl7p9R aohA== X-Gm-Message-State: AN3rC/7xJbLSTzGKS0EVbORNp2vDypGEQwF1hsa1qJy57WU9nnO0EnJ/ fsAACf8USWBDAur+89o= X-Received: by 10.99.223.70 with SMTP id h6mr764210pgj.50.1492225937633; Fri, 14 Apr 2017 20:12:17 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id c3sm5462476pfg.46.2017.04.14.20.12.16 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Apr 2017 20:12:16 -0700 (PDT) Subject: Re: svn commit: r316938 - head/sbin/savecore Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_9A2FC2C8-030A-456C-B117-169918E25B68"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201704150305.v3F35rNJ009780@pdx.rh.CN85.dnsmgr.net> Date: Fri, 14 Apr 2017 20:12:15 -0700 Cc: John Baldwin , Ngie Cooper , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <1DC7F131-3EC6-4C59-8941-DC3EE77764C2@gmail.com> References: <201704150305.v3F35rNJ009780@pdx.rh.CN85.dnsmgr.net> To: rgrimes@freebsd.org X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 03:12:18 -0000 --Apple-Mail=_9A2FC2C8-030A-456C-B117-169918E25B68 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Apr 14, 2017, at 20:05, Rodney W. Grimes = wrote: >=20 >>>=20 >>> On Apr 14, 2017, at 18:49, Rodney W. Grimes = wrote: >>>=20 >>>> On Friday, April 14, 2017 07:41:48 PM Ngie Cooper wrote: >>>>> Author: ngie >>>>> Date: Fri Apr 14 19:41:48 2017 >>>>> New Revision: 316938 >>>>> URL: https://svnweb.freebsd.org/changeset/base/316938 >>>>>=20 >>>>> Log: >>>>> savecore: fix space calculation with respect to `minfree` in = check_space(..) >>>>>=20 >>>>> - Use strtoll(3) instead of atoi(3), because atoi(3) limits the >>>>> representable data to INT_MAX. Check the values received from >>>>> strtoll(3), trimming trailing whitespace off the end to maintain >>>>> POLA. >>>>> - Use `KiB` instead of `kB` when describing free space, total = space, >>>>> etc. I am now fully aware of `KiB` being the IEC standard for = 1024 >>>>> bytes and `kB` being the IEC standard for 1000 bytes. >>>>=20 >>>> I will just rant lightly that no one actually uses this in the real = world. >>>>=20 >>>> Good lucking finding a "16 GiB" DIMM on crucial.com or a 4Kin = drive. A >>>> kilobyte is a power of 2. The End. >>>>=20 >>>> (Next up we'll have to rename 4k displays to >>>> 4k) >>>=20 >>> Do we use KiB, MiB, GiB,... any place else in the system? I cant = think of >>> a place we do this, so please, lets not start doing this here? >>=20 >> humanize_number(3) from libutil uses IEC units. >=20 > And how many things bother to use this library function? Do the > ones that do call it produce the traditional output that has been > around for 40 years? >=20 >>> Yes, these are newer standards, perhaps some day we should make a = global >>> switch to them, but lets not start mixing and matching things. >>=20 >> I understand and agree. I?m not 100% sold on that one way or another, = but >> since I was going to redo the number representation in save core with >> humanize_number(3), because reading `KiB` is not = ideal > ^^^ > I hope we are not already reading KiB anyplace=E2=80=A6. I meant it=E2=80=99s a lot harder for humans to read = `KiB` instead of = ``. >> usability wise, and I don?t want to reinvent the wheel normalizing = numbers >> and printing out the unit. >>=20 >> Perhaps there should be a flag baked into humanize_number, etc for = parsing IEC vs non-IEC unit values? >=20 > I dont think it parses anything, but as far as producing strings from = values > it already has an IEC flag: HN_IEC_PREFIXES, please lets not use this = flag, > and if we are using it anyplace lets see if we can remove that use. I don=E2=80=99t see it used anywhere in the tree, based on a quick grep. > Also be careful, this function only accepts signed int 64, which means > we are not gona be able to use this in all places that probably need > this, so perhaps a larger can of paint for a bigger bike shead is = needed? I don=E2=80=99t necessarily follow the above statement 100%. Are you = warning against mass-conversion to libutil (if so, I agree=E2=80=A6 this = was just a case where it really helps readability in savecore(8))? Thanks! -Ngie --Apple-Mail=_9A2FC2C8-030A-456C-B117-169918E25B68 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----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJY8Y+QAAoJEPWDqSZpMIYVX5kP/A0O7rb3xexdwfkxcWpizQG2 LqVrwCJfslZsuleUKtxWlaf1DH+uOBihXhlFYv5wjDBFkdw+fkzrQf9XdREElceF 35L7XOWZVvzriL2sBLH2VkK+xa9W2k60zJIRKefRtij1GDxvzq7EmoOFHZB6qUhk LAswQb2qrxdEhKJ8fHbKLBTTcYFm7/IQzUX61+lZiOtcsZ08iDCzW/NP6XBNoy26 VHwKGWUHcAp/fY4le80ie2NeLL96Av2TpSkDmTAKwI2qdGSV6eLkpgzf7AN8Y9HV A1YNuq1eC5LOAUnU7DuyT4Qaj96eDhpkRSMeFQ66OWIxCnxqby0HXPn2bvAN8TaM wPyC7GnvGZSTVUBtGumYMrWbdvz/zxRJGXwTKcoHpci+PPI6RlDUGmsE2dUZcLgo Xg+oh1wvp14JGl2woNmjmF7dlCZy7UjWjIT4bxw0EkKx20Vg0pIe1KDgUGSdAGDF lafih0LxFWO57hO3aa+bE/U5s0SeTN0uRmLQy3xQjD5Dx63INpJcOCMq2F6wqb3u E3vfiIuF1nhU2SYu67cL61R+haiG7rgUOZRFsWaOHIDrEbEYBG/pnevJNu+1DzeU tzomNMV1J2nK1aMc97Y28eiEe9soFiQOP5lq0HHSbU4G+B+OI8tp1hm8Q/D4MlPb 59fBblARl1BM9i6qsIHC =QKDO -----END PGP SIGNATURE----- --Apple-Mail=_9A2FC2C8-030A-456C-B117-169918E25B68-- From owner-svn-src-head@freebsd.org Sat Apr 15 03:12:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8F3ED3EDEA; Sat, 15 Apr 2017 03:12:25 +0000 (UTC) (envelope-from peter@wemm.org) Received: from smtp2.wemm.org (smtp2.wemm.org [IPv6:2001:470:67:39d::78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp2.wemm.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8E4F5B99; Sat, 15 Apr 2017 03:12:25 +0000 (UTC) (envelope-from peter@wemm.org) Received: from overcee.wemm.org (canning.wemm.org [192.203.228.65]) by smtp2.wemm.org (Postfix) with ESMTP id 25D5F524; Fri, 14 Apr 2017 20:12:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=m20140428; t=1492225945; bh=oLc7AKggZ+nsnGgz0Uv1Kg3/D/Q+fRPdahbZVaLJCpc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=NjMwmT+4slYYNB0YlSYdjn9yRyOoQ5kREToRrXiN7zgr+w/nMmJeWhh+UIBv9z0BC 1kkiber7CZV9JkMxY3xyjmQjK9FRQ95rgWsrgbZAHksF/It0EaFYAn0i4qsFVMjQdK K5YjtvrQhrFBDqWohq/34o7f9yNPTK9/CcVP2IbI= From: Peter Wemm To: svn-src-all@freebsd.org Cc: "Ngie Cooper (yaneurabeya)" , src-committers , Hiroki Sato , Hiren Panchasara , svn-src-head@freebsd.org, Maxim Sobolev Subject: Re: svn commit: r316874 - head/sys/kern Date: Fri, 14 Apr 2017 20:12:20 -0700 Message-ID: <2109294.KVn8xeR1jZ@overcee.wemm.org> User-Agent: KMail/4.14.10 (FreeBSD/12.0-CURRENT; KDE/4.14.10; amd64; ; ) In-Reply-To: <13691757.t3s7Qik7v1@overcee.wemm.org> References: <201704141723.v3EHNS3B043902@repo.freebsd.org> <13691757.t3s7Qik7v1@overcee.wemm.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1786590.cuBigVQMDk"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 03:12:25 -0000 --nextPart1786590.cuBigVQMDk Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="us-ascii" On Friday, April 14, 2017 07:36:55 PM Peter Wemm wrote: > On Friday, April 14, 2017 02:14:16 PM Ngie Cooper wrote: > > > On Apr 14, 2017, at 14:10, Maxim Sobolev = wrote: > > >=20 > > > Peter, Ngie, > > >=20 > > > Looks like out of that refactoring came a logical bug that is pre= sent in > > > the head, which causes syslod to first to shutdown the socket for= > > > reading > > > and then try to select/recv on it (which is somewhat stupid). And= that > > > issue has been masked by shutdown() on datagram socket becoming > > > effectively a NOP in 11 & head 20 months ago. It only affects hea= d > > > though, 11-stable still has the old code which does not include t= hat > > > half-closed socket into the select list. Attached patch is expect= ed to > > > fix head, Peter, it would be nice if you can give it a try (resto= ring > > > latest changes into uipc_sockets.c) and let me know if it helps. > > >=20 > > > Thanks! > >=20 > > CCing hrs@ for input as he did the refactoring. > > Thanks! > > -Ngie > >=20 > > PS LGTM with the change. Will wait for feedback from wemm@. >=20 > This is definitely not working. I get ENOSPC and listen queue overf= lows on > /var/run/logpriv now. >=20 > Grabbing an old 10.3 /usr/sbin/syslogd and placing it on the top of t= he 12.x > one worked fine, aside from the include statements. This can't be right: if (SecureMode || res->ai_family =3D=3D AF_LOCAL) { /* Forbid communication in secure mode. */ if (shutdown(s, SHUT_RD) < 0 && errno !=3D ENOTCONN) { logerror("shutdown"); if (!Debug) die(0); } dprintf("listening on socket\n"); sl_recv =3D NULL; } This appears to disable unix domain sockets like /var/run/log and=20 /var/run/logpriv. =2D- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI= 6FJV UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246 --nextPart1786590.cuBigVQMDk Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEBgrA0Vr/vfNVuPoUNdaXCeyAngQFAljxj5UACgkQNdaXCeyA ngQ3sQf/cDAHTNNMDmJHh7PtKclwVJGRNNWkRZ5dEfS5ES6eLB9+QZta48WStxby 9/0dTRJ2HjBctbVw+LpjCxVt0rEljCI3MNmYm+6mCOWSzeGhswGvfFjaHFASxXCT Im0MNV47FEhupGvYbC1m+Lq1nB8v/91E4Rb0R/pr1eSVjlsidUOj60VL7J31p3Ge OuuPn65pIT9AJLaMm17pvvujy5Y3lnvz1fRPFmNSiwRqK+v8UULRS08NttFebU+Q 1L1RlWJjc/voemKCslc14ET5x6Wz8MOorHKABFxgSrTksPkWbE0bwN0bVu/yO6tI QGb1a5oESB2F4TpqB7bJ8Vyp7KCtMg== =ErrD -----END PGP SIGNATURE----- --nextPart1786590.cuBigVQMDk-- From owner-svn-src-head@freebsd.org Sat Apr 15 03:13:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89926D3EEF5; Sat, 15 Apr 2017 03:13:55 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x244.google.com (mail-pf0-x244.google.com [IPv6:2607:f8b0:400e:c00::244]) (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 54ABEE36; Sat, 15 Apr 2017 03:13:55 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x244.google.com with SMTP id i5so17186069pfc.3; Fri, 14 Apr 2017 20:13:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=N1qYd7azVucW/WZoUC0Jix+IlO+4w9+U7IHv4bXb51o=; b=h9Oj303ooOeT7kLluXXoet7KTajwTbnB4wyMwClQMmLVcS4wncpA1CB+11IUJto0rG ZCyrWPwOMqEVIWd879a4EGKWuWWQHNa8LFaoDH6pktKBkw/P9rOxH1XK5gEE8UD2aDvY T4gVY5KnWL8va+zvnc7AsoAdwXZlyVTnWh1Lbi3i/Bd2Sl4xt2eLF+oGMeLMnPACRFE8 uHWta8pAQSogEaRJG/EcEYKORZ0jhpRrYkYOfU+KeGl1ryTfzzE5MYeoJEa9YTqN1bJs pktFUYJiiKA7Vb0KtohBvIKPxNaIqBQ0n6roJE1UNFpAi8c8I+hkuCN93Na69PRmPKPo riwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=N1qYd7azVucW/WZoUC0Jix+IlO+4w9+U7IHv4bXb51o=; b=XOxUALkZC6+VacKfFPoMBZgvucEbuangk3H5ronVMEVYChyUl+DfxiUIbZsXDFZwlM tSm9q9fBtrzT+RjKqnD+Uc15rYa89Szzlik0Q/FRErwH4+v6ZvdV5jjaksqhO/bo9egD pJp7nFCQYM+0sleLBMsull/OhQFcZe6ayWh95BKtKJXZMHurL0M/+TSnnXlkNWXmIAyQ MA6nIqQ8OWTATto/XQvlqDz16CboRRN4RpZjRWQz34MUI9WovpqbwhyQdpojySvCmWf4 LHBl083GWszm4UB0TYY68+VsUDoPeLufPzD5enoAMB4S5NU5PSQIU9i9hsRO/oXro6ox MKUQ== X-Gm-Message-State: AN3rC/6/4GN2CL4Q4mwOvXKTfbf+idrjuvmzw8CHIVsglW8Qy3gLcyS9 +Pj4IMW87eP/jUBaeVk= X-Received: by 10.98.210.2 with SMTP id c2mr746191pfg.83.1492226034957; Fri, 14 Apr 2017 20:13:54 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id c64sm5458569pfa.110.2017.04.14.20.13.53 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Apr 2017 20:13:53 -0700 (PDT) Subject: Re: svn commit: r316874 - head/sys/kern Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_79513F97-9C0D-417F-A76A-8914AC4F4E2A"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <2109294.KVn8xeR1jZ@overcee.wemm.org> Date: Fri, 14 Apr 2017 20:13:52 -0700 Cc: svn-src-all@freebsd.org, src-committers , Hiroki Sato , Hiren Panchasara , svn-src-head@freebsd.org, Maxim Sobolev Message-Id: References: <201704141723.v3EHNS3B043902@repo.freebsd.org> <13691757.t3s7Qik7v1@overcee.wemm.org> <2109294.KVn8xeR1jZ@overcee.wemm.org> To: Peter Wemm X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 03:13:55 -0000 --Apple-Mail=_79513F97-9C0D-417F-A76A-8914AC4F4E2A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Apr 14, 2017, at 20:12, Peter Wemm wrote: >=20 > On Friday, April 14, 2017 07:36:55 PM Peter Wemm wrote: >> On Friday, April 14, 2017 02:14:16 PM Ngie Cooper wrote: >>>> On Apr 14, 2017, at 14:10, Maxim Sobolev = wrote: >>>>=20 >>>> Peter, Ngie, >>>>=20 >>>> Looks like out of that refactoring came a logical bug that is = present in >>>> the head, which causes syslod to first to shutdown the socket for >>>> reading >>>> and then try to select/recv on it (which is somewhat stupid). And = that >>>> issue has been masked by shutdown() on datagram socket becoming >>>> effectively a NOP in 11 & head 20 months ago. It only affects head >>>> though, 11-stable still has the old code which does not include = that >>>> half-closed socket into the select list. Attached patch is expected = to >>>> fix head, Peter, it would be nice if you can give it a try = (restoring >>>> latest changes into uipc_sockets.c) and let me know if it helps. >>>>=20 >>>> Thanks! >>>=20 >>> CCing hrs@ for input as he did the refactoring. >>> Thanks! >>> -Ngie >>>=20 >>> PS LGTM with the change. Will wait for feedback from wemm@. >>=20 >> This is definitely not working. I get ENOSPC and listen queue = overflows on >> /var/run/logpriv now. >>=20 >> Grabbing an old 10.3 /usr/sbin/syslogd and placing it on the top of = the 12.x >> one worked fine, aside from the include statements. >=20 > This can't be right: > if (SecureMode || res->ai_family =3D=3D AF_LOCAL) { > /* Forbid communication in secure mode. */ > if (shutdown(s, SHUT_RD) < 0 && > errno !=3D ENOTCONN) { > logerror("shutdown"); > if (!Debug) > die(0); > } > dprintf("listening on socket\n"); > sl_recv =3D NULL; > } >=20 > This appears to disable unix domain sockets like /var/run/log and > /var/run/logpriv. ACK. This looks like a fun bug. -Ngie --Apple-Mail=_79513F97-9C0D-417F-A76A-8914AC4F4E2A 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----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJY8Y/wAAoJEPWDqSZpMIYVld4P+wSZvWY/Mi1eEcmz7h3u4B4D PktRfN2fdnsVnFjKBLWOz5ys3IB5xWWDmopZqelK+a5q7ze+hLevmBWnJE1i6R87 uXS/IRiMfq/0v2o1CeAkFVjNuFgVhyn6w2z+76HFWV4YTOYrOYk9Ol/EnrIUsFUA WmoH31qx87LMDJW5nsZGsNgW2UjElGPC30I95pf0b0CLTz47uDwIuN+Jb55E4d9Q pPdFhEz2iVm6l86Cpd0DOX8wyQxoXtHb5LzPfHwZCOOzo3ehwCBM17A/zOMTQ7ZS TlpbBWHkD9BNq+3U/Eu51Bq+mBf4yTnn5fqFGfhtQvTLiV8gLDiyQ2KucNEMoVDx VQy0AI1tyZVfnme4o/h77XYbwbDD0cZGdz3xKE+cSqZ9lcNNxRhtZD6/SwGas8cJ l3CpPT2YC6jmHjAufrtc/MkYEjy7IMs5EQV2pER7xgP2Bq5HBGfgCWJ6VbgNFYIB 21a8JRoyzZLdMC+OsNuuk6LnB6dGV0x8VofefV9yT+2o0ZFGQ9p4WtldfTPiHkTi kIxA6w/lFyMgyOUOE+iWDdljMNXFG5W1qzxM8CCckVPCMO6jX1+5P53qbCRyMGZ8 DXDRz0JqQvAMWEXPDIiRceB5CMOxk8XK8XppMIuDJdNY+aUNVTWvPd8j2m8Km4/g CbiNw5iABeF6fmZbWThC =zLg3 -----END PGP SIGNATURE----- --Apple-Mail=_79513F97-9C0D-417F-A76A-8914AC4F4E2A-- From owner-svn-src-head@freebsd.org Sat Apr 15 03:18:48 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A2CED3E0D5; Sat, 15 Apr 2017 03:18:48 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 081B5176; Sat, 15 Apr 2017 03:18:47 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v3F3IkFh009853; Fri, 14 Apr 2017 20:18:46 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v3F3IjMe009852; Fri, 14 Apr 2017 20:18:45 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201704150318.v3F3IjMe009852@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r316938 - head/sbin/savecore In-Reply-To: <62071184-0DDD-4996-867E-866BF1F8DC25@gmail.com> To: "Ngie Cooper (yaneurabeya)" Date: Fri, 14 Apr 2017 20:18:45 -0700 (PDT) CC: rgrimes@freebsd.org, John Baldwin , Ngie Cooper , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 03:18:48 -0000 > > > On Apr 14, 2017, at 19:40, Ngie Cooper (yaneurabeya) wrote: > > > >> > >> On Apr 14, 2017, at 18:49, Rodney W. Grimes wrote: > >> > >>> On Friday, April 14, 2017 07:41:48 PM Ngie Cooper wrote: > >>>> Author: ngie > >>>> Date: Fri Apr 14 19:41:48 2017 > >>>> New Revision: 316938 > >>>> URL: https://svnweb.freebsd.org/changeset/base/316938 > >>>> > >>>> Log: > >>>> savecore: fix space calculation with respect to `minfree` in check_space(..) > >>>> > >>>> - Use strtoll(3) instead of atoi(3), because atoi(3) limits the > >>>> representable data to INT_MAX. Check the values received from > >>>> strtoll(3), trimming trailing whitespace off the end to maintain > >>>> POLA. > >>>> - Use `KiB` instead of `kB` when describing free space, total space, > >>>> etc. I am now fully aware of `KiB` being the IEC standard for 1024 > >>>> bytes and `kB` being the IEC standard for 1000 bytes. > >>> > >>> I will just rant lightly that no one actually uses this in the real world. > >>> > >>> Good lucking finding a "16 GiB" DIMM on crucial.com or a 4Kin drive. A > >>> kilobyte is a power of 2. The End. > >>> > >>> (Next up we'll have to rename 4k displays to > >>> 4k) > >> > >> Do we use KiB, MiB, GiB,... any place else in the system? I cant think of > >> a place we do this, so please, lets not start doing this here? > > > > humanize_number(3) from libutil uses IEC units. > > > >> Yes, these are newer standards, perhaps some day we should make a global > >> switch to them, but lets not start mixing and matching things. > > > > I understand and agree. I?m not 100% sold on that one way or another, but since I was going to redo the number representation in save core with humanize_number(3), because reading `KiB` is not ideal usability wise, and I don?t want to reinvent the wheel normalizing numbers and printing out the unit. > > *unit. ?> *unit, KiB seemed like a logical next step after discussing it at long length in the CR. I do not see any long length discussion in the CR. I see an assertion that KiB is the new IEC standard, I see a miss understanding of what kB and KB means, and I see someone wanting to push the tree towards IEC. I see here on the mailling list a push to NOT start IEC'ing things, at least by myself and jhb. I would not consider 2 or 3 peole have a 15 line converstaion in a CR as reasonable grounds for a change like this. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sat Apr 15 03:28:15 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38272D3E555; Sat, 15 Apr 2017 03:28:15 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1F5ECBD; Sat, 15 Apr 2017 03:28:14 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3F3SEMM095851; Sat, 15 Apr 2017 03:28:14 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3F3SE8k095850; Sat, 15 Apr 2017 03:28:14 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201704150328.v3F3SE8k095850@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Sat, 15 Apr 2017 03:28:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316952 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 03:28:15 -0000 Author: sjg Date: Sat Apr 15 03:28:13 2017 New Revision: 316952 URL: https://svnweb.freebsd.org/changeset/base/316952 Log: Latest version, we need to realpath anyway to check if an obj dependency is also a src dependency. Modified: head/share/mk/meta2deps.py Modified: head/share/mk/meta2deps.py ============================================================================== --- head/share/mk/meta2deps.py Sat Apr 15 02:24:22 2017 (r316951) +++ head/share/mk/meta2deps.py Sat Apr 15 03:28:13 2017 (r316952) @@ -492,6 +492,21 @@ class MetaFile: if not file: f.close() + def is_src(self, base, dir, rdir): + """is base in srctop""" + for dir in [dir,rdir]: + if not dir: + continue + path = '/'.join([dir,base]) + srctop = self.find_top(path, self.srctops) + if srctop: + if self.dpdeps: + self.add(self.file_deps, path.replace(srctop,''), 'file') + self.add(self.src_deps, dir.replace(srctop,''), 'src') + self.seenit(dir) + return True + return False + def parse_path(self, path, cwd, op=None, w=[]): """look at a path for the op specified""" @@ -520,10 +535,9 @@ class MetaFile: # to the src dir, we may need to add dependencies for each rdir = dir dir = abspath(dir, cwd, self.last_dir, self.debug, self.debug_out) - if rdir == dir or rdir.find('./') > 0: - rdir = None - if os.path.islink(dir): rdir = os.path.realpath(dir) + if rdir == dir: + rdir = None # now put path back together path = '/'.join([dir,base]) if self.debug > 1: @@ -544,17 +558,9 @@ class MetaFile: # finally, we get down to it if dir == self.cwd or dir == self.curdir: return - srctop = self.find_top(path, self.srctops) - if srctop: - if self.dpdeps: - self.add(self.file_deps, path.replace(srctop,''), 'file') - self.add(self.src_deps, dir.replace(srctop,''), 'src') + if self.is_src(base, dir, rdir): self.seenit(w[2]) - self.seenit(dir) - if rdir and not rdir.startswith(srctop): - dir = rdir # for below - rdir = None - else: + if not rdir: return objroot = None From owner-svn-src-head@freebsd.org Sat Apr 15 03:31:13 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0BD1D3E720; Sat, 15 Apr 2017 03:31:13 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 99EC6F29; Sat, 15 Apr 2017 03:31:13 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v3F3VBDm009906; Fri, 14 Apr 2017 20:31:11 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v3F3VB5b009905; Fri, 14 Apr 2017 20:31:11 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201704150331.v3F3VB5b009905@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r316938 - head/sbin/savecore In-Reply-To: <1DC7F131-3EC6-4C59-8941-DC3EE77764C2@gmail.com> To: "Ngie Cooper (yaneurabeya)" Date: Fri, 14 Apr 2017 20:31:11 -0700 (PDT) CC: rgrimes@freebsd.org, John Baldwin , Ngie Cooper , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 03:31:13 -0000 [ Charset UTF-8 unsupported, converting... ] > > > On Apr 14, 2017, at 20:05, Rodney W. Grimes wrote: > > > >>> > >>> On Apr 14, 2017, at 18:49, Rodney W. Grimes wrote: > >>> > >>>> On Friday, April 14, 2017 07:41:48 PM Ngie Cooper wrote: > >>>>> Author: ngie > >>>>> Date: Fri Apr 14 19:41:48 2017 > >>>>> New Revision: 316938 > >>>>> URL: https://svnweb.freebsd.org/changeset/base/316938 > >>>>> > >>>>> Log: > >>>>> savecore: fix space calculation with respect to `minfree` in check_space(..) > >>>>> > >>>>> - Use strtoll(3) instead of atoi(3), because atoi(3) limits the > >>>>> representable data to INT_MAX. Check the values received from > >>>>> strtoll(3), trimming trailing whitespace off the end to maintain > >>>>> POLA. > >>>>> - Use `KiB` instead of `kB` when describing free space, total space, > >>>>> etc. I am now fully aware of `KiB` being the IEC standard for 1024 > >>>>> bytes and `kB` being the IEC standard for 1000 bytes. > >>>> > >>>> I will just rant lightly that no one actually uses this in the real world. > >>>> > >>>> Good lucking finding a "16 GiB" DIMM on crucial.com or a 4Kin drive. A > >>>> kilobyte is a power of 2. The End. > >>>> > >>>> (Next up we'll have to rename 4k displays to > >>>> 4k) > >>> > >>> Do we use KiB, MiB, GiB,... any place else in the system? I cant think of > >>> a place we do this, so please, lets not start doing this here? > >> > >> humanize_number(3) from libutil uses IEC units. > > > > And how many things bother to use this library function? Do the > > ones that do call it produce the traditional output that has been > > around for 40 years? > > > >>> Yes, these are newer standards, perhaps some day we should make a global > >>> switch to them, but lets not start mixing and matching things. > >> > >> I understand and agree. I?m not 100% sold on that one way or another, but > >> since I was going to redo the number representation in save core with > >> humanize_number(3), because reading `KiB` is not ideal > > ^^^ > > I hope we are not already reading KiB anyplace?. > > I meant it?s a lot harder for humans to read `KiB` > instead of ``. And I am agreeing on the scaled, and disagreeing on the KiB, another words please revert to printing KB as the former code did as far as a Unit goes. Lets not use Ki Mi Gi, etc. > >> usability wise, and I don?t want to reinvent the wheel normalizing numbers > >> and printing out the unit. > >> > >> Perhaps there should be a flag baked into humanize_number, etc for parsing IEC vs non-IEC unit values? > > > > I dont think it parses anything, but as far as producing strings from values > > it already has an IEC flag: HN_IEC_PREFIXES, please lets not use this flag, > > and if we are using it anyplace lets see if we can remove that use. > > I don?t see it used anywhere in the tree, based on a quick grep. YEA!!! Thanks for doing the search. > > Also be careful, this function only accepts signed int 64, which means > > we are not gona be able to use this in all places that probably need > > this, so perhaps a larger can of paint for a bigger bike shead is needed? > > I don?t necessarily follow the above statement 100%. Are you warning > against mass-conversion to libutil (if so, I agree? this was just a case > where it really helps readability in savecore(8))? Yes, I am warning against mass conversion, or for that that matter much conversion to humanize_number because it shall need to be revamped if it is ever to become a real solutions due to it being a very narrow minded function (no unsigned implementation for very large values that are probably the ones that could benifit the most from this type of function.) You also may want to still report full sizes in output (you maybe I have not read the final code:) >From kernel boot: real memory = 134217728 (128 MB) avail memory = 120832000 (115 MB) -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sat Apr 15 05:37:35 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1B74D3E52C; Sat, 15 Apr 2017 05:37:35 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-pf0-x241.google.com (mail-pf0-x241.google.com [IPv6:2607:f8b0:400e:c00::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 706A81546; Sat, 15 Apr 2017 05:37:35 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-pf0-x241.google.com with SMTP id a188so17527165pfa.2; Fri, 14 Apr 2017 22:37:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=5JArcHcnxcEoIM1ckH5QmZ5xTkdEOXllHClfyOnP4PY=; b=nr9GQg0xLiYYjNCAzppJeKuw1/qwEzBjCVPF4f2QjzIkIW7Fvww90h5nnKo3e4BNmn eOxPU+uTnxQ6ySrb3Pcaw+ernQqIhjpTPyOLRm7ZW4HOJxIGDNDiueJOGguLGD+Luzp5 0yQe7XYTz1jMOKnu9ZDv5kzp4rR3uLHPpcATTBqdD9Wl6JnElghJCElsoU7i/5dN7sR+ yO8HdjpxfU97EHno+LKwTL5EcKZaoQr+rkBEriMqwQqNcYWuGYqGtwUIp6Ad9UUNwAUh 5CLTIxmAQYu4C2dLJkmJdG2hNr//INCZ+d2+EvlLQm/3LbT+NbwtaortJVQ2IQ9+EIyo MLaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=5JArcHcnxcEoIM1ckH5QmZ5xTkdEOXllHClfyOnP4PY=; b=ZPSTXbmnu2I1bNxjNfCzKk+K8zWIteTPlSJ867Peu2gW1YrAQ899bNV4QtNIKolro/ ARCC7gjiCHxaPeYbzDYd4ai/iqwG579Sjy5mOFh5YKS6OSMr8slPB18R5POv7D/PwbM0 5azd5thgueE5+aaraWhz/Z0qX0sZ8H/nsuVqXIP9VbXIL4kXLQGSh+hCgg0vGDlesntv H6GZQ4VZR0vW07N8K58fgHdcIoO4JF/M6kElJILTlgKgj0b7R4hzcTT1sb7UnjZgfNMY N9uCihxJREG/ofj5MCbv6adYArDD+6aVC3OIXBJk4ZDF4m6jph9RmQxQUD/wysmFTkn4 +YAA== X-Gm-Message-State: AN3rC/6vb0yErzWgcZvDt2QN2B2BlqEu0TqxjOEx4eVFkpcZW7oL0wpL vI5YXqv6ZKjIpgBIgYU= X-Received: by 10.84.241.3 with SMTP id a3mr526981pll.117.1492234654884; Fri, 14 Apr 2017 22:37:34 -0700 (PDT) Received: from raichu ([2604:4080:1102:0:ca60:ff:fe9d:3963]) by smtp.gmail.com with ESMTPSA id e13sm6087558pfb.30.2017.04.14.22.37.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Apr 2017 22:37:33 -0700 (PDT) Sender: Mark Johnston Date: Fri, 14 Apr 2017 22:37:29 -0700 From: Mark Johnston To: rgrimes@freebsd.org Cc: Alan Somers , Ngie Cooper , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r316938 - head/sbin/savecore Message-ID: <20170415053729.GA76139@raichu> References: <20170414202918.GD5039@wkstn-mjohnston.west.isilon.com> <201704150130.v3F1UHpR009181@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201704150130.v3F1UHpR009181@pdx.rh.CN85.dnsmgr.net> User-Agent: Mutt/1.8.0 (2017-02-23) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 05:37:35 -0000 On Fri, Apr 14, 2017 at 06:30:17PM -0700, Rodney W. Grimes wrote: > > The patch to add compression support is here and should largely still > > work: > > https://people.freebsd.org/~markj/patches/core-compression/20141110-kern_dump.diff > > > > I've been hesitant about pushing it forward: > > - The dump_write* APIs need some simplification after the addition of > > encrypted dump support and support for dumping to 4Kn drives. > > - I'm not sure how encryption should compose with compression. It seems > > intuitively obvious that we should compress before encrypting if the > > compression is to be of any use, but I don't know enough to know > > whether the compression might somehow compromise the effectiveness of > > the encryption. > > > > If anyone has some insight on the second of these two points, I'd > > appreciate hearing it. > > I have a large amount of reworking and modulization of the dump code > incuding intergration of your (markj) compressed dumps. Layer isnt > implemented but is in the plan. I should not of held off on the net > dump code as it got smashed by encrypted dumps, then again by > the libif'ing for all the Intel drives that had been netdump modified. > > Basically now starting over :-( Could you post your patches somewhere? I've been sitting on this (and the netdump patches, for which I have quite a few modifications) for far too long, and would like to finish them and get them in soon. I'll note that the netdump code posted a few years ago had some problems that are fixed in Isilon's version, which I'm working on rebasing on HEAD. In particular, I simplified the driver integration a bit, changed the code to avoid allocating mbufs from UMA after a panic, plumbed a configuration interface through dumpon, and fixed some problems with netdumpd. I'm working on integrating netdump with Isilon's internal infrastructure at the moment. The conversion of em and igb to iflib does complicate things a bit; I haven't yet looked at how hard it would be to support netdump in iflib'ed drivers. > Minidump is an lkm for me, and main dump is almost an lkm for me too. Does "lkm" mean "loadable kernel module"? If so, why? From owner-svn-src-head@freebsd.org Sat Apr 15 05:43:34 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6144CD3E7D3; Sat, 15 Apr 2017 05:43:34 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-pf0-x234.google.com (mail-pf0-x234.google.com [IPv6:2607:f8b0:400e:c00::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 2E2101B46; Sat, 15 Apr 2017 05:43:34 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-pf0-x234.google.com with SMTP id s16so47595566pfs.0; Fri, 14 Apr 2017 22:43:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=BD7VUsaBcnwN4QaZQ2JOVR/Lez+QBvm6sY8eXr/WkFA=; b=S05IcGFlS5+tQl+G59tUHb36k9OKPg2xg/vzped6q1Tjap8t7P3dviRaAwv2QpK6Uc lFmBWcMlubRz1muk3r86hxSN4fTEssxGnG98R3EdiqoBCfUxvxEzxpWCuYH59otjFhzJ goMKeFnFt+DUTnUhI1Utpcsptupf8yCpJBkeOmJ5+1uZ0d74cmdqfbnFGfkHQ3PEa7b0 BTTQzZEZbJ39PE+kMp3Vm1jKmAI1NZydW2mZhPl6M7VRB1W1veslK3KCqk49OlBqN49G 71qq9gzqicD6NnTi2PIrL5u5qgHPqlD7uZx4w+tN8eiomMQXbynV0xaaYKcHcvc9uv0k uyWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=BD7VUsaBcnwN4QaZQ2JOVR/Lez+QBvm6sY8eXr/WkFA=; b=t/QYDX0lhTFcd/+Fo4QP4sQRaAXcHGWUdKup4DsTTcZ/QI9bChDShd1hCn2udqz6My qc9cqEjaTPj1UHUlBpi2sl2cqr8JTyIuu642ScIylHFBjdWTGsbBKRRkWM5/66pEKik7 8vseoIWOxbwHAVP54KpF6KEyOe5rOGMexovD8v29cyNtsjK2syJLEnlp/Dty1eCn6XtE qNWzUPx4sJ1R2tdS7q/cVOkq5tp3lN0mGs4VDaO+u6ha7amtwLzq7/xhETChitZFLxGy pyBkKC/MeDu1y+n7rw3lPB3RvEq+yh0ZvQQNgDV7qQ2dlGzCkNNP/NEnfxbsEahhsqN0 PNzw== X-Gm-Message-State: AN3rC/6Fej/yKxUVw5WsHVNtXi3PnyRqstPPqIFOm8tcn72ptupWEb13 TTtuhHA9FW9/D6rzACg= X-Received: by 10.98.28.193 with SMTP id c184mr1145477pfc.212.1492235013448; Fri, 14 Apr 2017 22:43:33 -0700 (PDT) Received: from raichu ([2604:4080:1102:0:ca60:ff:fe9d:3963]) by smtp.gmail.com with ESMTPSA id e131sm164794pfg.10.2017.04.14.22.43.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Apr 2017 22:43:32 -0700 (PDT) Sender: Mark Johnston Date: Fri, 14 Apr 2017 22:43:31 -0700 From: Mark Johnston To: Conrad Meyer Cc: Larry Rosenman , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Ngie Cooper Subject: Re: svn commit: r316938 - head/sbin/savecore Message-ID: <20170415054331.GB76139@raichu> References: <201704150135.v3F1ZD2S009211@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.8.0 (2017-02-23) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 05:43:34 -0000 On Fri, Apr 14, 2017 at 07:00:36PM -0700, Conrad Meyer wrote: > Larry, > > You just need to run netdumpd on the nearby server. It could be a > port (although I'm not aware that it is ported yet). I was working on a port makefile for netdumpd before this thread started. :) It would be a bit more usable as a port; I prefer it that way since Isilon's infrastructure folks would like to run netdumpd on 11.0. For what it's worth, I've got my revision of the code here: https://github.com/markjdb/netdumpd This version fixes some performance problems in the original, and runs most of the code in capability mode. The capsicum integration hasn't yet been reviewed, however. > > Best, > Conrad > > On Fri, Apr 14, 2017 at 6:37 PM, Larry Rosenman wrote: > > On 4/14/17, 8:35 PM, "Rodney W. Grimes" wrote: > > > >> Yeah, I have the following: > > > borg.lerctr.org /home/ler $ swapctl -l > > > Device: 1024-blocks Used: > > > /dev/mfid0p3 8388608 0 > > > /dev/mfid1p3 8388608 0 > > > /dev/mfid2p3 8388608 0 > > > /dev/mfid3p3 8388608 0 > > > /dev/mfid4p3 8388608 0 > > > /dev/mfid5p3 8388608 0 > > > borg.lerctr.org /home/ler $ sysctl hw.physmem > > > hw.physmem: 137368682496 > > > borg.lerctr.org /home/ler $ > > > > > > SO 6 8G partitions (48G), but the dump is larger than 8G. > > > > Larry, > > This is a very good concern and point given todays more > > common huge memory foot prints and lots of spindles. I'll > > keep this in they back of my mind as I tromp around in the > > dump code. I have another solution that may work for you > > and that is to use Netdump rather than swapdump. This > > basically eliminates the trip to swap space and you end > > up going to savecore style output on the netdump server. > > > > -- > > Rod Grimes rgrimes@freebsd.org > > > > What does it take for NetDump to work to a FreeNAS (9.10 nightly) server since that’s what is “next to†this server? > > > > > > > From owner-svn-src-head@freebsd.org Sat Apr 15 06:42:08 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA1A6D3F6BF; Sat, 15 Apr 2017 06:42:08 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D2D936E3; Sat, 15 Apr 2017 06:42:08 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v3F6g5tm010450; Fri, 14 Apr 2017 23:42:05 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v3F6g41p010449; Fri, 14 Apr 2017 23:42:04 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201704150642.v3F6g41p010449@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r316938 - head/sbin/savecore In-Reply-To: <20170415053729.GA76139@raichu> To: Mark Johnston Date: Fri, 14 Apr 2017 23:42:04 -0700 (PDT) CC: rgrimes@freebsd.org, Alan Somers , Ngie Cooper , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 06:42:09 -0000 > On Fri, Apr 14, 2017 at 06:30:17PM -0700, Rodney W. Grimes wrote: > > > The patch to add compression support is here and should largely still > > > work: > > > https://people.freebsd.org/~markj/patches/core-compression/20141110-kern_dump.diff > > > > > > I've been hesitant about pushing it forward: > > > - The dump_write* APIs need some simplification after the addition of > > > encrypted dump support and support for dumping to 4Kn drives. > > > - I'm not sure how encryption should compose with compression. It seems > > > intuitively obvious that we should compress before encrypting if the > > > compression is to be of any use, but I don't know enough to know > > > whether the compression might somehow compromise the effectiveness of > > > the encryption. > > > > > > If anyone has some insight on the second of these two points, I'd > > > appreciate hearing it. > > > > I have a large amount of reworking and modulization of the dump code > > incuding intergration of your (markj) compressed dumps. Layer isnt > > implemented but is in the plan. I should not of held off on the net > > dump code as it got smashed by encrypted dumps, then again by > > the libif'ing for all the Intel drives that had been netdump modified. > > > > Basically now starting over :-( > > Could you post your patches somewhere? I've been sitting on this (and > the netdump patches, for which I have quite a few modifications) for far > too long, and would like to finish them and get them in soon. I'll note > that the netdump code posted a few years ago had some problems that are > fixed in Isilon's version, which I'm working on rebasing on HEAD. In Isnt the code I rebaed in December to -12 your code from Isiolon???? Or tell me you handed me your patches to upstream, and then continued to evolved the code without letting me know? Are YOUR patckes some place public? I dont think mine are, but I do have a link in http://people.freebsd.org/~rgrimes pointing to the other Netdump version that I think is an old version of your code. > particular, I simplified the driver integration a bit, changed the code > to avoid allocating mbufs from UMA after a panic, plumbed a > configuration interface through dumpon, and fixed some problems with > netdumpd. I'm working on integrating netdump with Isilon's internal > infrastructure at the moment. The conversion of em and igb to iflib does > complicate things a bit; I haven't yet looked at how hard it would be > to support netdump in iflib'ed drivers. > > > Minidump is an lkm for me, and main dump is almost an lkm for me too. > > Does "lkm" mean "loadable kernel module"? If so, why? Yes, so you dont have to reboot to write and debug new versions, so you can have a kernel without minidump if you want, and I am sure there are others. More importantly, why not? Modules are good, staticially linked rarely used code is bad. I also have a version of minidump that can be asked, if I panicked right now how big would hte dump be? -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sat Apr 15 06:53:09 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A817D3F92F; Sat, 15 Apr 2017 06:53:09 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0D2BCC9; Sat, 15 Apr 2017 06:53:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3F6r85l081001; Sat, 15 Apr 2017 06:53:08 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3F6r7hJ081000; Sat, 15 Apr 2017 06:53:07 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201704150653.v3F6r7hJ081000@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 15 Apr 2017 06:53:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316953 - head/sbin/savecore X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 06:53:09 -0000 Author: ngie Date: Sat Apr 15 06:53:07 2017 New Revision: 316953 URL: https://svnweb.freebsd.org/changeset/base/316953 Log: Switch back to non-IEC units for 1024 bytes I was swayed a little too quickly when I saw the wiki page discussing kB vs KiB. Switch back as none of the code in base openly uses IEC units via humanize_number(3) (which was my next step), and there's a large degree of dislike with IEC vs more SI-like units. MFC after: 7 weeks Submitted by: jhb, rgrimes Sponsored by: Dell EMC Isilon Modified: head/sbin/savecore/savecore.c Modified: head/sbin/savecore/savecore.c ============================================================================== --- head/sbin/savecore/savecore.c Sat Apr 15 03:28:13 2017 (r316952) +++ head/sbin/savecore/savecore.c Sat Apr 15 06:53:07 2017 (r316953) @@ -322,7 +322,7 @@ check_space(const char *savedir, off_t d if (available < needed) { syslog(LOG_WARNING, "no dump: not enough free space on device (need at least " - "%jdKiB for dump; %jdKiB available; %jdKiB reserved)", + "%jdkB for dump; %jdkB available; %jdkB reserved)", (intmax_t)needed, (intmax_t)available + minfree, (intmax_t)minfree); From owner-svn-src-head@freebsd.org Sat Apr 15 06:55:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94A2AD3F9DD; Sat, 15 Apr 2017 06:55:24 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7822BE81; Sat, 15 Apr 2017 06:55:24 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v3F6tN5P010504; Fri, 14 Apr 2017 23:55:23 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v3F6tMvg010503; Fri, 14 Apr 2017 23:55:23 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201704150655.v3F6tMvg010503@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r316953 - head/sbin/savecore In-Reply-To: <201704150653.v3F6r7hJ081000@repo.freebsd.org> To: Ngie Cooper Date: Fri, 14 Apr 2017 23:55:22 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 06:55:24 -0000 > Author: ngie > Date: Sat Apr 15 06:53:07 2017 > New Revision: 316953 > URL: https://svnweb.freebsd.org/changeset/base/316953 > > Log: > Switch back to non-IEC units for 1024 bytes > > I was swayed a little too quickly when I saw the wiki page discussing > kB vs KiB. Switch back as none of the code in base openly uses > IEC units via humanize_number(3) (which was my next step), and there's > a large degree of dislike with IEC vs more SI-like units. > > MFC after: 7 weeks > Submitted by: jhb, rgrimes > Sponsored by: Dell EMC Isilon > > Modified: > head/sbin/savecore/savecore.c > > Modified: head/sbin/savecore/savecore.c > ============================================================================== > --- head/sbin/savecore/savecore.c Sat Apr 15 03:28:13 2017 (r316952) > +++ head/sbin/savecore/savecore.c Sat Apr 15 06:53:07 2017 (r316953) > @@ -322,7 +322,7 @@ check_space(const char *savedir, off_t d > if (available < needed) { > syslog(LOG_WARNING, > "no dump: not enough free space on device (need at least " > - "%jdKiB for dump; %jdKiB available; %jdKiB reserved)", > + "%jdkB for dump; %jdkB available; %jdkB reserved)", > (intmax_t)needed, > (intmax_t)available + minfree, > (intmax_t)minfree); Thank you! -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sat Apr 15 06:59:00 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE63FD3FB08; Sat, 15 Apr 2017 06:59:00 +0000 (UTC) (envelope-from peter@wemm.org) Received: from smtp2.wemm.org (smtp2.wemm.org [192.203.228.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp2.wemm.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C84C4A0; Sat, 15 Apr 2017 06:59:00 +0000 (UTC) (envelope-from peter@wemm.org) Received: from overcee.wemm.org (canning.wemm.org [192.203.228.65]) by smtp2.wemm.org (Postfix) with ESMTP id 94EE75B4; Fri, 14 Apr 2017 23:58:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=m20140428; t=1492239539; bh=JQXK13kc4JvQcILPSn/aG6FqsfP/HE0UDbkepQ/3yoo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=erV80m+ZrW+lNNT0+HhO+AxWnU+Kf8F5JFNQRDOll4gdMO3kqeO99/BNThEBuDLOO rXMf2rOrQO/qCnvq39lQ1L4/e6v7FDZbQ+yi8hix7CJHizKkQ1O8G/dcsDz81oAxYI UDfqSnVa8hF4HdBDVntiuHWWPuOAsTI+TfEiTtNg= From: Peter Wemm To: "Ngie Cooper (yaneurabeya)" Cc: svn-src-all@freebsd.org, src-committers , Hiroki Sato , Hiren Panchasara , svn-src-head@freebsd.org, Maxim Sobolev Subject: Re: svn commit: r316874 - head/sys/kern Date: Fri, 14 Apr 2017 23:58:55 -0700 Message-ID: <11221477.gRA6BXfcIE@overcee.wemm.org> User-Agent: KMail/4.14.10 (FreeBSD/12.0-CURRENT; KDE/4.14.10; amd64; ; ) In-Reply-To: References: <201704141723.v3EHNS3B043902@repo.freebsd.org> <2109294.KVn8xeR1jZ@overcee.wemm.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart10292938.hy7NMZA4S1"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 06:59:01 -0000 --nextPart10292938.hy7NMZA4S1 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="us-ascii" On Friday, April 14, 2017 08:13:52 PM Ngie Cooper wrote: > > On Apr 14, 2017, at 20:12, Peter Wemm wrote: > >=20 > > On Friday, April 14, 2017 07:36:55 PM Peter Wemm wrote: > >> On Friday, April 14, 2017 02:14:16 PM Ngie Cooper wrote: > >>>> On Apr 14, 2017, at 14:10, Maxim Sobolev = wrote: > >>>>=20 > >>>> Peter, Ngie, > >>>>=20 > >>>> Looks like out of that refactoring came a logical bug that is pr= esent > >>>> in > >>>> the head, which causes syslod to first to shutdown the socket fo= r > >>>> reading > >>>> and then try to select/recv on it (which is somewhat stupid). An= d that > >>>> issue has been masked by shutdown() on datagram socket becoming > >>>> effectively a NOP in 11 & head 20 months ago. It only affects he= ad > >>>> though, 11-stable still has the old code which does not include = that > >>>> half-closed socket into the select list. Attached patch is expec= ted to > >>>> fix head, Peter, it would be nice if you can give it a try (rest= oring > >>>> latest changes into uipc_sockets.c) and let me know if it helps.= > >>>>=20 > >>>> Thanks! > >>>=20 > >>> CCing hrs@ for input as he did the refactoring. > >>> Thanks! > >>> -Ngie > >>>=20 > >>> PS LGTM with the change. Will wait for feedback from wemm@. > >>=20 > >> This is definitely not working. I get ENOSPC and listen queue ov= erflows > >> on /var/run/logpriv now. > >>=20 > >> Grabbing an old 10.3 /usr/sbin/syslogd and placing it on the top o= f the > >> 12.x one worked fine, aside from the include statements. > >=20 > > This can't be right: > > if (SecureMode || res->ai_family =3D=3D AF_LOCAL) {= > > =20 > > /* Forbid communication in secure mode. */ > > if (shutdown(s, SHUT_RD) < 0 && > > =20 > > errno !=3D ENOTCONN) { > > =20 > > logerror("shutdown"); > > if (!Debug) > > =20 > > die(0); > > =20 > > } > > dprintf("listening on socket\n"); > > sl_recv =3D NULL; > > =20 > > } > >=20 > > This appears to disable unix domain sockets like /var/run/log and > > /var/run/logpriv. >=20 > ACK. This looks like a fun bug. > -Ngie I suspect it's meant to be "if (SecureMode && res->ai_family !=3D AF_LO= CAL) {"=20 as a simple logic inversion error of another line earlier. However the= re's an=20 awful lot of strange things in this code. 1) listen(s, 5) - on datagram sockets. 2) dprintf("shutdown") in code regardless of whether the shutdown is go= ing to=20 happen. 3) dprintf("listening on socket") in code that only happens when we're = NOT=20 going to listen. 4) dprintf("sending on socket") in the code path when we're going to li= sten. 5) shutdown on all unix domain sockets, regardless of securemode.. This code block makes my head spin. =2D-=20 Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI= 6FJV UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246 --nextPart10292938.hy7NMZA4S1 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEBgrA0Vr/vfNVuPoUNdaXCeyAngQFAljxxK8ACgkQNdaXCeyA ngTWzAgAwTxqh8URPRWoP4xssbIcrHxQp24Vo3b2ybHpVmG+4VNudT2X2gb5tRso CpCy4rMNZd8OY+rIcC8lzIexFgmvnwGEfZQgBjXiDK1cup5ylg6aR/CPziJ38jk/ uR56sh3hPiIONPHht5TlRrXpZAMN3NrX08GqTP1gXC5uoB0nCViffBkew+54bK+h OduYGUkqkiIV2aHzVKDX/sv8dnqS0SOJKZIf4YRyDp5qyg3Wu2yAj7427+vI2pPc d1R4A5BHajEPLcxssFRWD/SQug0hUG7cZwyX7d8qoD3LqZEFecF/Oe3sdJAFFiQZ ZGxmddHKfLwJhhtvOwIbYn+4IFvc9g== =XJBZ -----END PGP SIGNATURE----- --nextPart10292938.hy7NMZA4S1-- From owner-svn-src-head@freebsd.org Sat Apr 15 07:12:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18BEED3FF1C; Sat, 15 Apr 2017 07:12:47 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: from mail-pf0-x22a.google.com (mail-pf0-x22a.google.com [IPv6:2607:f8b0:400e:c00::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 DB5E2B54; Sat, 15 Apr 2017 07:12:46 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: by mail-pf0-x22a.google.com with SMTP id s16so48154878pfs.0; Sat, 15 Apr 2017 00:12:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=oZZv8PFhZ9HAk7iLSf5uS9UsFwa4APOBnVnrMmTJXYs=; b=Z9jDK+2vs75B94SmrBZCyLgDLT4mWNVMQvSlfuis6liae7znW2wJ0RfdKrGMpQIGiP dHkXWMfBcRAcA7lsHpf/ZKoWUmkoJrZ5ocXlebXdkTleBidLR41opQb/4IZOT6sN3LAy 1d9Cgxier7HfLeWa1AFcca6Z1O9VRdRNpy000GQAu3MaCfij4UQIrDmJmlBtVeNxAH1w 1kgbx2aXwQMRevk/2hgQ9NqdyYF/8iMUVXF1LBvmk8hyqAOkY/1EiPlw+jA+2hojt4Vn zGdB/Xi1f+aB3rYahT2IkZSAzVaLks/pVAyzlQRIcv4h4WjQB8TJISxwJpB87IRL5VJS B4ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=oZZv8PFhZ9HAk7iLSf5uS9UsFwa4APOBnVnrMmTJXYs=; b=TW9WGeNTH1kZBCMOo2lfpw/MaL29hsu3Ay+BRayOF//H+q1VEq12iVRX6bCFoHZozX DOqnD0hAJKcgCxQmbLyQA4HWHF/4UlKojB5g+0Uu2qWw0SRuQmHbYO2GJfMhZQUyXLPd UC1G6CrrqCHWdOiuI4euOP4TJky4Pw2KKN4QZSZlJmwtqnLdQ1KJqMLpIyaKfwCYt89h +QAbsCaiKMPYo5wpYT+05zBBUd39qn7vRq0l7jlVReEPuoHSSs9GXTMvZ/Y8HepWAQKn 8hB/3slibTmEmjqqtCA8M0RIhmEKh4rx7X+dfT6EfrzU5sP1xAzD2ER22E3CmkekmNVa a4bQ== X-Gm-Message-State: AN3rC/4Fh9orriDO7fO53NDlwpv3TVM3mZh8AashYbZTxoquZYTlyQ17 KqiwH6bopJdI+qEs X-Received: by 10.98.44.142 with SMTP id s136mr1429244pfs.244.1492240366384; Sat, 15 Apr 2017 00:12:46 -0700 (PDT) Received: from ox ([2601:641:c000:b800:201d:8cb6:8467:a85c]) by smtp.gmail.com with ESMTPSA id p80sm6676691pfk.50.2017.04.15.00.12.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 15 Apr 2017 00:12:45 -0700 (PDT) Sender: Navdeep Parhar Date: Sat, 15 Apr 2017 00:12:33 -0700 From: Navdeep Parhar To: rgrimes@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r316936 - head/sys/dev/cxgbe/iw_cxgbe Message-ID: <20170415071233.GA12250@ox> Mail-Followup-To: rgrimes@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201704141915.v3EJFVMX093441@repo.freebsd.org> <201704150115.v3F1FAbU009132@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201704150115.v3F1FAbU009132@pdx.rh.CN85.dnsmgr.net> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 07:12:47 -0000 On Fri, Apr 14, 2017 at 06:15:10PM -0700, Rodney W. Grimes wrote: > [ Charset UTF-8 unsupported, converting... ] > > Author: np > > Date: Fri Apr 14 19:15:31 2017 > > New Revision: 316936 > > URL: https://svnweb.freebsd.org/changeset/base/316936 > > > > Log: > > cxgbe/iw_cxgbe: hw supports 64K (not 32K) Protection Domains. > > > > MFC after: 3 days > > Sponsored by: Chelsio Communications > > > > Modified: > > head/sys/dev/cxgbe/iw_cxgbe/t4.h > > > > Modified: head/sys/dev/cxgbe/iw_cxgbe/t4.h > > ============================================================================== > > --- head/sys/dev/cxgbe/iw_cxgbe/t4.h Fri Apr 14 18:56:00 2017 (r316935) > > +++ head/sys/dev/cxgbe/iw_cxgbe/t4.h Fri Apr 14 19:15:31 2017 (r316936) > > @@ -61,7 +61,7 @@ > > > > #define T4_MAX_NUM_QP (1<<16) > > #define T4_MAX_NUM_CQ (1<<15) > > -#define T4_MAX_NUM_PD (1<<15) > > +#define T4_MAX_NUM_PD 65536 > > Why the change in methods of expressing powers of 2 here? > This, imho, would better match the near by code as > #define T4_MAX_NUM_PD (1<<16) > r316940 removed both of the 1< Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38709D3E1ED; Sat, 15 Apr 2017 07:27:57 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D507F85; Sat, 15 Apr 2017 07:27:56 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v3F7Rtql010659; Sat, 15 Apr 2017 00:27:55 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v3F7Rt9e010658; Sat, 15 Apr 2017 00:27:55 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201704150727.v3F7Rt9e010658@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r316936 - head/sys/dev/cxgbe/iw_cxgbe In-Reply-To: <20170415071233.GA12250@ox> To: Navdeep Parhar Date: Sat, 15 Apr 2017 00:27:55 -0700 (PDT) CC: rgrimes@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 07:27:57 -0000 > On Fri, Apr 14, 2017 at 06:15:10PM -0700, Rodney W. Grimes wrote: > > [ Charset UTF-8 unsupported, converting... ] > > > Author: np > > > Date: Fri Apr 14 19:15:31 2017 > > > New Revision: 316936 > > > URL: https://svnweb.freebsd.org/changeset/base/316936 > > > > > > Log: > > > cxgbe/iw_cxgbe: hw supports 64K (not 32K) Protection Domains. > > > > > > MFC after: 3 days > > > Sponsored by: Chelsio Communications > > > > > > Modified: > > > head/sys/dev/cxgbe/iw_cxgbe/t4.h > > > > > > Modified: head/sys/dev/cxgbe/iw_cxgbe/t4.h > > > ============================================================================== > > > --- head/sys/dev/cxgbe/iw_cxgbe/t4.h Fri Apr 14 18:56:00 2017 (r316935) > > > +++ head/sys/dev/cxgbe/iw_cxgbe/t4.h Fri Apr 14 19:15:31 2017 (r316936) > > > @@ -61,7 +61,7 @@ > > > > > > #define T4_MAX_NUM_QP (1<<16) > > > #define T4_MAX_NUM_CQ (1<<15) > > > -#define T4_MAX_NUM_PD (1<<15) > > > +#define T4_MAX_NUM_PD 65536 > > > > Why the change in methods of expressing powers of 2 here? > > This, imho, would better match the near by code as > > #define T4_MAX_NUM_PD (1<<16) > > > > r316940 removed both of the 1< in this part of the header match nearby code: > > #define T4_MAX_NUM_PD 65536 > #define T4_MAX_EQ_SIZE 65520 > #define T4_MAX_IQ_SIZE 65520 > #define T4_MAX_RQ_SIZE(n) (8192 - (n) - 1) ^^^ unexplained off by 1 Magic??? Ok, but why not code those as (1<<16), ((1<<16)-16) to me it makes it more clear as to what is going on here. I suspect the -16 is actually sizeof(something). So even more clear is to do something like: #define X ((1<<16)-sizeof(somethingXreleated)) Magic constants like 65520 that dont even have a comment as to why they are 65520 are in bad form as well. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sat Apr 15 08:11:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41FC1D3C258; Sat, 15 Apr 2017 08:11:46 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id CDB0881B; Sat, 15 Apr 2017 08:11:44 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id C67691A2B48; Sat, 15 Apr 2017 18:11:35 +1000 (AEST) Date: Sat, 15 Apr 2017 18:11:34 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Ngie Cooper cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r316953 - head/sbin/savecore In-Reply-To: <201704150653.v3F6r7hJ081000@repo.freebsd.org> Message-ID: <20170415170730.T1682@besplex.bde.org> References: <201704150653.v3F6r7hJ081000@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.2 cv=AYLBJzfG c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=obLidZeR02VS5v7W5h0A:9 a=yYNlLnx4y4jV7yTa:21 a=NO8rpTwOmFYFgm1h:21 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 08:11:46 -0000 On Sat, 15 Apr 2017, Ngie Cooper wrote: > Log: > Switch back to non-IEC units for 1024 bytes > > I was swayed a little too quickly when I saw the wiki page discussing > kB vs KiB. Switch back as none of the code in base openly uses > IEC units via humanize_number(3) (which was my next step), and there's > a large degree of dislike with IEC vs more SI-like units. > Modified: head/sbin/savecore/savecore.c > ============================================================================== > --- head/sbin/savecore/savecore.c Sat Apr 15 03:28:13 2017 (r316952) > +++ head/sbin/savecore/savecore.c Sat Apr 15 06:53:07 2017 (r316953) > @@ -322,7 +322,7 @@ check_space(const char *savedir, off_t d > if (available < needed) { > syslog(LOG_WARNING, > "no dump: not enough free space on device (need at least " > - "%jdKiB for dump; %jdKiB available; %jdKiB reserved)", > + "%jdkB for dump; %jdkB available; %jdkB reserved)", > (intmax_t)needed, > (intmax_t)available + minfree, > (intmax_t)minfree); Thanks, but kB is almost as uncouth as KiB. Real K are in K or KB (except for thermodynamicists, reak K are temperatures), and the K are real here. It would have been reasonable to standardize kB for disk sellers' kilobytes, but K was already taken for "Kelvin" in dehumanized (scientific) units, and the same method was unavailable for disk seller's megabytes since m was already taken for "milli". (Since millibytes don't exist, mB for disk sellers' megabytes would work OK, but it needs the B suffix.) "M" is also needed for decimal "million" in frequency and network bandwidth descriptions. For network bandwidths the uncouth term is mb/sec (millibits per second), or better yet, mbs (master of business selling or millibit-seconds). dehumanize^Wscientificize^Whumanize_number(3) does use k for 1000 and K for 1024. This is actually documented. dedehumanize^descientificize^Wexpand_number() doesn't understand this or any of the uncouth formats produced by dehumanize_number(). It has undocumented support for other lower case "prefixes" and only supports upper case ones by converting to lower case. For k and K, this immediately forgets the difference. dedehumanize_number() only supports powers of 2. So when dehumanize_number() prints 1000 as 1k, dedehumanize_number() misparses it the same as 1K and produces 1024 for both. dedehumanize_number() has undocumented support for a [bB] suffix. It is unclear if this suffix is for bytes or the common zeroth power of 2 and 10. dedehumanize_number() has related parsing errors. It stops after the first letter after digits. So it correctly parses 1iKB as garbage, but it parses 1KiB as 1K and discards the the garbage after the K. dehumanize_number() documents B a bit better, but says that it is a "prefix" meaning "bytes". But since it means "bytes", it is a pure suffix. The other "prefixes" are also suffixes in normal use. They are suffixes to the number and only prefixes to the units, but the units are normally left out. It is confusing to describe prefixes to empty strings as being prefixes. [bB] should also be avoided as a "prefix" since in dd it actually is a prefix, meaning 512-blocks. dd has much better number parsers than dedehumanize_number(), with less than 100 known bugs (counting duplicated bugs separately). It supports almost any number of prefixes with any values as multipliers. E.g., bs=1 iseek='1024*1000*1000*1000' seeks through a real K of disk sellers' GB. It even attempts to detect overflow in the multiplications and shifts. To get near 100 bugs in it, I count minor things like: - no support for E (exa) - 8 bugs for the 8 supported multiplier letters by accepting both uppor and lower case as meaning powers of 2. Letters are in short supply even for powers of 2. Backwards compatibilty prevents changing the meaning of k to 1000. This was originally broken by only using lower case letters. This wasn't unimproved until 2004 when upper case aliases were added. Bruce From owner-svn-src-head@freebsd.org Sat Apr 15 08:23:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C6EED3C55F; Sat, 15 Apr 2017 08:23:24 +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 49D49E69; Sat, 15 Apr 2017 08:23:24 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 4C2DF1044DFC; Sat, 15 Apr 2017 18:23:16 +1000 (AEST) Date: Sat, 15 Apr 2017 18:23:15 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: rgrimes@freebsd.org cc: Navdeep Parhar , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r316936 - head/sys/dev/cxgbe/iw_cxgbe In-Reply-To: <201704150727.v3F7Rt9e010658@pdx.rh.CN85.dnsmgr.net> Message-ID: <20170415181258.E1854@besplex.bde.org> References: <201704150727.v3F7Rt9e010658@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=KeqiiUQD c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=XnfSFxyx20jCCp17jlQA:9 a=THTVO4oSvBJ2XBti:21 a=NLJJKto-OsRgpRGp:21 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 08:23:24 -0000 On Sat, 15 Apr 2017, Rodney W. Grimes wrote: >> On Fri, Apr 14, 2017 at 06:15:10PM -0700, Rodney W. Grimes wrote: >>> [ Charset UTF-8 unsupported, converting... ] >>>> Author: np >>>> Date: Fri Apr 14 19:15:31 2017 >>>> New Revision: 316936 >>>> URL: https://svnweb.freebsd.org/changeset/base/316936 >>>> >>>> Log: >>>> cxgbe/iw_cxgbe: hw supports 64K (not 32K) Protection Domains. >>>> >>>> MFC after: 3 days >>>> Sponsored by: Chelsio Communications >>>> >>>> Modified: >>>> head/sys/dev/cxgbe/iw_cxgbe/t4.h >>>> >>>> Modified: head/sys/dev/cxgbe/iw_cxgbe/t4.h >>>> ============================================================================== >>>> --- head/sys/dev/cxgbe/iw_cxgbe/t4.h Fri Apr 14 18:56:00 2017 (r316935) >>>> +++ head/sys/dev/cxgbe/iw_cxgbe/t4.h Fri Apr 14 19:15:31 2017 (r316936) >>>> @@ -61,7 +61,7 @@ >>>> >>>> #define T4_MAX_NUM_QP (1<<16) >>>> #define T4_MAX_NUM_CQ (1<<15) >>>> -#define T4_MAX_NUM_PD (1<<15) >>>> +#define T4_MAX_NUM_PD 65536 >>> >>> Why the change in methods of expressing powers of 2 here? >>> This, imho, would better match the near by code as >>> #define T4_MAX_NUM_PD (1<<16) >> >> r316940 removed both of the 1<> in this part of the header match nearby code: >> >> #define T4_MAX_NUM_PD 65536 >> #define T4_MAX_EQ_SIZE 65520 >> #define T4_MAX_IQ_SIZE 65520 >> #define T4_MAX_RQ_SIZE(n) (8192 - (n) - 1) > ^^^ unexplained off by 1 Magic??? > > Ok, but why not code those as (1<<16), ((1<<16)-16) to me it makes > it more clear as to what is going on here. I suspect the -16 is > actually sizeof(something). So even more clear is > to do something like: > #define X ((1<<16)-sizeof(somethingXreleated)) > > Magic constants like 65520 that dont even have a comment as to > why they are 65520 are in bad form as well. When the expressions are even slightly complicated, it can be better to have magic numbers (but spell ones near 64K in hex). Try vmparam.h and related files to figure out where basic addresses are. Most are perfectly unreadably parametrized by going through about 5 layers of nested macros leading back to not very many basic parameters. Bruce From owner-svn-src-head@freebsd.org Sat Apr 15 08:39:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DFC31D3C9F0; Sat, 15 Apr 2017 08:39:56 +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 9FA9B6DB; Sat, 15 Apr 2017 08:39:56 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1czJFI-000LrG-RZ; Sat, 15 Apr 2017 11:39:52 +0300 Date: Sat, 15 Apr 2017 11:39:52 +0300 From: Slawa Olhovchenkov To: Mark Johnston Cc: Xin LI , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Ngie Cooper , Alan Somers Subject: Re: svn commit: r316938 - head/sbin/savecore Message-ID: <20170415083952.GA83631@zxy.spb.ru> References: <201704141941.v3EJfmCW003347@repo.freebsd.org> <20170414202918.GD5039@wkstn-mjohnston.west.isilon.com> <20170414220525.GF5039@wkstn-mjohnston.west.isilon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170414220525.GF5039@wkstn-mjohnston.west.isilon.com> 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 08:39:57 -0000 On Fri, Apr 14, 2017 at 03:05:25PM -0700, Mark Johnston wrote: > > And with textdumps available, the benefit > > of having compression is limited because we can request for minidump > > or full dumps only when the textdumps are not good enough for > > diagnosing the kernel bug. > > Sure, but in this case the compression may be vital. > > > > > I don't think security (e.g. leaking information because of the use of > > compression) is a very big concern in this context because in order > > for the potential attacker to read the raw material needs a > > compromised system (unlike an attack from the network, where someone > > who controls the network would have access to the raw material); the > > dump is usually quite large, and measuring downtime would be hard at > > that scale. > > Ok. > > > > > By the way (not meant to bikeshed) if I was to do this I'd prefer > > using lz4 or something that compresses faster than zlib. > > I agree, but I think the existing lz4 implementation in the kernel is > not so well suited to running after a panic. It seems fixable, but > compression speed also isn't hugely important here IMO. On production system this is downtime. For may case, dumped about 32GB (from 256GB RAM). This is take several minutes. Can compression increase this to hour? From owner-svn-src-head@freebsd.org Sat Apr 15 09:56:43 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A14B4D3C5CD; Sat, 15 Apr 2017 09:56:43 +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 7CC5C892; Sat, 15 Apr 2017 09:56:43 +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 v3F9ugS4053775; Sat, 15 Apr 2017 09:56:42 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3F9ugob053774; Sat, 15 Apr 2017 09:56:42 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201704150956.v3F9ugob053774@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 15 Apr 2017 09:56:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316956 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 09:56:43 -0000 Author: bapt Date: Sat Apr 15 09:56:42 2017 New Revision: 316956 URL: https://svnweb.freebsd.org/changeset/base/316956 Log: Update to 2017.04.03 Modified: head/share/misc/pci_vendors Modified: head/share/misc/pci_vendors ============================================================================== --- head/share/misc/pci_vendors Sat Apr 15 09:33:42 2017 (r316955) +++ head/share/misc/pci_vendors Sat Apr 15 09:56:42 2017 (r316956) @@ -3,8 +3,8 @@ # # List of PCI ID's # -# Version: 2017.03.16 -# Date: 2017-03-16 03:15:01 +# Version: 2017.04.03 +# Date: 2017-04-03 03:15:02 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at http://pci-ids.ucw.cz/. @@ -10674,7 +10674,7 @@ 1430 GM206GL [Quadro M2000] 1431 GM206GL [Tesla M4] 1436 GM206GLM [Quadro M2200 Mobile] - 15f0 GP100GL + 15f0 GP100GL [Quadro GP100] 15f1 GP100GL 15f7 GP100GL [Tesla P100 PCIe 12GB] 15f8 GP100GL [Tesla P100 PCIe 16GB] @@ -10707,7 +10707,7 @@ 1ba0 GP104M [GeForce GTX 1080 Mobile] 1ba1 GP104M [GeForce GTX 1070 Mobile] 1bb0 GP104GL [Quadro P5000] - 1bb1 GP104GL + 1bb1 GP104GL [Quadro P4000] 1bb3 GP104GL [Tesla P4] 1bb4 GP104GL 1bb6 GP104GLM [Quadro P5000 Mobile] @@ -10720,7 +10720,7 @@ 1c02 GP106 [GeForce GTX 1060 3GB] 1c03 GP106 [GeForce GTX 1060 6GB] 1c20 GP106M [GeForce GTX 1060 Mobile] - 1c30 GP106GL + 1c30 GP106GL [Quadro P2000] 1c35 GP106 1c60 GP106M [GeForce GTX 1060 Mobile] 1c61 GP106M [GeForce GTX 1050 Ti Mobile] @@ -10735,6 +10735,9 @@ 1ca7 GP107GL 1ca8 GP107GL 1caa GP107GL + 1cb1 GP107GL [Quardo P1000] + 1cb2 GP107GL [Quardo P600] + 1cb3 GP107GL [Quardo P400] 1d01 GP108 1d81 GV100 10df Emulex Corporation @@ -16467,7 +16470,7 @@ 1028 1fc2 Express Flash NVMe PM1725 1.6TB SFF 1028 1fc4 Express Flash NVMe PM1725 1.6TB AIC a822 NVMe SSD Controller 172Xa - 1028 1fd9 Express Flash NVMe PM1725a 800GB SFF + 1028 1fd9 Express Flash PM1725a 800GB SFF 1028 1fda Express Flash PM1725a 1.6TB SFF 1028 1fdb Express Flash PM1725a 3.2TB SFF 1028 1fdc Express Flash PM1725a 6.4TB SFF @@ -20300,6 +20303,7 @@ 1b79 Absolute Analysis 1b85 OCZ Technology Group, Inc. 1041 RevoDrive 3 X2 PCI-Express SSD 240 GB (Marvell Controller) + 6018 RD400/400A SSD 8788 RevoDrive Hybrid 1b94 Signatec / Dynamic Signals Corp e400 PX14400 Dual Xilinx Virtex5 based Digitizer @@ -23094,6 +23098,7 @@ 8086 0000 Ethernet Converged Network Adapter X710-T 8086 0001 Ethernet Converged Network Adapter X710-T4 8086 0002 Ethernet Converged Network Adapter X710-T4 + 8086 0003 Ethernet Converged Network Adapter X710-T 8086 1003 Ethernet Converged Network Adapter X710-T 158a Ethernet Controller XXV710 for 25GbE backplane 158b Ethernet Controller XXV710 for 25GbE SFP28 @@ -27004,7 +27009,7 @@ 1001 8086 mPCI 3B Europe ZZE 1002 8086 mPCI 3B Japan ZZJ 1003 8086 mPCI 3B High-Band ZZH - 1351 103c Compaq NC6220 + 103c 1351 Compaq nc6220 4224 PRO/Wireless 2915ABG [Calexico2] Network Connection 4227 PRO/Wireless 3945ABG [Golan] Network Connection 8086 1010 ThinkPad R60e @@ -27127,6 +27132,7 @@ 5845 QEMU NVM Express Controller 1af4 1100 QEMU Virtual Machine 5902 HD Graphics 610 + 5912 HD Graphics 630 5a84 Celeron N3350/Pentium N4200/Atom E3900 Series Integrated Graphics Controller 5a88 Celeron N3350/Pentium N4200/Atom E3900 Series Imaging Unit 5a98 Celeron N3350/Pentium N4200/Atom E3900 Series Audio Cluster From owner-svn-src-head@freebsd.org Sat Apr 15 11:00:29 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 790C0D3DD6E for ; Sat, 15 Apr 2017 11:00:29 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail-it0-x235.google.com (mail-it0-x235.google.com [IPv6:2607:f8b0:4001:c0b::235]) (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 3EE8587F for ; Sat, 15 Apr 2017 11:00:29 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: by mail-it0-x235.google.com with SMTP id 70so5945055ita.0 for ; Sat, 15 Apr 2017 04:00:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sippysoft-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=60fVQhkct5u0itCHcRSu+pTGq9Bkbgi0zZWye7m03ak=; b=HFrbFjRW4kBnlaPZBzzFk5EUh/Xx8V+2CKJxlqwc3dbHANAnt0/7+0Nep1/oqjwlBM EtVZ5ytvzyMxfAsy9m65T+QQioUD0LYHWqZE10O7AH3XFsXGcV1pQJn1jkjF6C5moMK6 hg/7bPDCv5kXzVfRPOU+MeBVYmbQ3xfwMb2Wt+SGEGzIRyF7NUWa9FTObHW2GOlizUCV TWZzScJ/c6SbDUrdvo4x2sZGdCKJfoiCK3y+1zeX3Ddp/UW5BZihmQcDHYbT9AeaDXPB vv98xm28AtU2LrVcdPqBrGcrgyDQHPMZnANLicwHYtmojIjazNb3G46jy3Y+9Y29osJz Xyig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=60fVQhkct5u0itCHcRSu+pTGq9Bkbgi0zZWye7m03ak=; b=pQvx2EFw3rjQ4CmKEJ1YSzzWn8tjw7l75Hdb+X8eWWo+S9Yz11ZVvlXhVtkoDAlq35 AIcTwYNMNHJ2NbHza3EY6KV0tHWzJklXwDvgk5zcAcqmeQO6MuZjkQz2ysYlbPUCpBW7 goAiWqp32wm6YjCNh+THT/iKexA6jKtqGC3NumsnBtnqKtPVnoW2ABOkazZ/KUo9wPqe yy+CdgIg3IVL6KwmoZC5ggtDbEoAgpohoZY3x3S1xtu+4ci3Kdl3h61b5iliRX3ldvvF TOdSBeod56qT6bMe2G6MtG6NWoaB59+w7OqZLa7NpDju/bgI5erWG+1gGOLDitt2HHQC RGCg== X-Gm-Message-State: AN3rC/7iOJgcPhhPD/64Vdsb6n69zi8QgGcKs3Wwfi37/acNvLCLqSJf moM6iHTf8tjk76iNdkCDcE/NV/Z5Mx+h X-Received: by 10.36.213.3 with SMTP id a3mr1577012itg.106.1492254027517; Sat, 15 Apr 2017 04:00:27 -0700 (PDT) MIME-Version: 1.0 Sender: sobomax@sippysoft.com Received: by 10.36.104.135 with HTTP; Sat, 15 Apr 2017 04:00:27 -0700 (PDT) In-Reply-To: <11221477.gRA6BXfcIE@overcee.wemm.org> References: <201704141723.v3EHNS3B043902@repo.freebsd.org> <2109294.KVn8xeR1jZ@overcee.wemm.org> <11221477.gRA6BXfcIE@overcee.wemm.org> From: Maxim Sobolev Date: Sat, 15 Apr 2017 04:00:27 -0700 X-Google-Sender-Auth: BJWAbN0NakrI4QHXYjpmFGGOfr4 Message-ID: Subject: Re: svn commit: r316874 - head/sys/kern To: Peter Wemm Cc: "Ngie Cooper (yaneurabeya)" , svn-src-all@freebsd.org, src-committers , Hiroki Sato , Hiren Panchasara , svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 11:00:29 -0000 Peter, Ngie, none of this stuff is really directly related to the shutdown(2) change, so I'll probably let Hiroki to clean it up. -Max On Fri, Apr 14, 2017 at 11:58 PM, Peter Wemm wrote: > On Friday, April 14, 2017 08:13:52 PM Ngie Cooper wrote: > > > On Apr 14, 2017, at 20:12, Peter Wemm wrote: > > > > > > On Friday, April 14, 2017 07:36:55 PM Peter Wemm wrote: > > >> On Friday, April 14, 2017 02:14:16 PM Ngie Cooper wrote: > > >>>> On Apr 14, 2017, at 14:10, Maxim Sobolev > wrote: > > >>>> > > >>>> Peter, Ngie, > > >>>> > > >>>> Looks like out of that refactoring came a logical bug that is > present > > >>>> in > > >>>> the head, which causes syslod to first to shutdown the socket for > > >>>> reading > > >>>> and then try to select/recv on it (which is somewhat stupid). And > that > > >>>> issue has been masked by shutdown() on datagram socket becoming > > >>>> effectively a NOP in 11 & head 20 months ago. It only affects head > > >>>> though, 11-stable still has the old code which does not include that > > >>>> half-closed socket into the select list. Attached patch is expected > to > > >>>> fix head, Peter, it would be nice if you can give it a try > (restoring > > >>>> latest changes into uipc_sockets.c) and let me know if it helps. > > >>>> > > >>>> Thanks! > > >>> > > >>> CCing hrs@ for input as he did the refactoring. > > >>> Thanks! > > >>> -Ngie > > >>> > > >>> PS LGTM with the change. Will wait for feedback from wemm@. > > >> > > >> This is definitely not working. I get ENOSPC and listen queue > overflows > > >> on /var/run/logpriv now. > > >> > > >> Grabbing an old 10.3 /usr/sbin/syslogd and placing it on the top of > the > > >> 12.x one worked fine, aside from the include statements. > > > > > > This can't be right: > > > if (SecureMode || res->ai_family == AF_LOCAL) { > > > > > > /* Forbid communication in secure mode. */ > > > if (shutdown(s, SHUT_RD) < 0 && > > > > > > errno != ENOTCONN) { > > > > > > logerror("shutdown"); > > > if (!Debug) > > > > > > die(0); > > > > > > } > > > dprintf("listening on socket\n"); > > > sl_recv = NULL; > > > > > > } > > > > > > This appears to disable unix domain sockets like /var/run/log and > > > /var/run/logpriv. > > > > ACK. This looks like a fun bug. > > > -Ngie > > I suspect it's meant to be "if (SecureMode && res->ai_family != AF_LOCAL) > {" > as a simple logic inversion error of another line earlier. However > there's an > awful lot of strange things in this code. > > 1) listen(s, 5) - on datagram sockets. > 2) dprintf("shutdown") in code regardless of whether the shutdown is going > to > happen. > 3) dprintf("listening on socket") in code that only happens when we're NOT > going to listen. > 4) dprintf("sending on socket") in the code path when we're going to > listen. > 5) shutdown on all unix domain sockets, regardless of securemode.. > > This code block makes my head spin. > > -- > Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; > KI6FJV > UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246 > From owner-svn-src-head@freebsd.org Sat Apr 15 13:02:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE1D3D3E510; Sat, 15 Apr 2017 13:02:24 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A269EB59; Sat, 15 Apr 2017 13:02:24 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id D47D8393F; Sat, 15 Apr 2017 13:02:23 +0000 (UTC) Date: Sat, 15 Apr 2017 13:02:23 +0000 From: Alexey Dokuchaev To: Ngie Cooper Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r316953 - head/sbin/savecore Message-ID: <20170415130223.GB97090@FreeBSD.org> References: <201704150653.v3F6r7hJ081000@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201704150653.v3F6r7hJ081000@repo.freebsd.org> User-Agent: Mutt/1.7.1 (2016-10-04) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 13:02:24 -0000 On Sat, Apr 15, 2017 at 06:53:07AM +0000, Ngie Cooper wrote: > New Revision: 316953 > URL: https://svnweb.freebsd.org/changeset/base/316953 > > Log: > Switch back to non-IEC units for 1024 bytes > > I was swayed a little too quickly when I saw the wiki page discussing > kB vs KiB. Switch back as none of the code in base openly uses > IEC units via humanize_number(3) (which was my next step), and there's > a large degree of dislike with IEC vs more SI-like units. > ... > @@ -322,7 +322,7 @@ check_space(const char *savedir, off_t d > if (available < needed) { > syslog(LOG_WARNING, > "no dump: not enough free space on device (need at least " > - "%jdKiB for dump; %jdKiB available; %jdKiB reserved)", > + "%jdkB for dump; %jdkB available; %jdkB reserved)", Thank you. For once, the sanity had won. ./danfe From owner-svn-src-head@freebsd.org Sat Apr 15 13:05:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44CDED3E5D4; Sat, 15 Apr 2017 13:05:26 +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 1FAC0D01; Sat, 15 Apr 2017 13:05:26 +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=Content-transfer-encoding:Content-type:Mime-version:In-Reply-To: References:Message-ID:CC:To:From:Subject:Date: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=B2dMYJKB7nMj+Rhw4omfBFG8Ncss7Y1GUoYV48kCRJc=; b=A5wx3+NWPqoCpScqNI1Auaip2d ZLLG61nAXg29aTpCnmzaUSYxbkDQKEpP5zDMGWBf8bg6QjgTmIRdKc2zNS4PudcPVmOY8a3ZVsH9F 8e1Ho+6FVZncgJHwnC/+LHAU3aEaSQn+glJxqlK8m5YGvOqrSuBg0rpwNNABJOs84hhI=; Received: from [47.220.164.50] (port=52564 helo=[192.168.200.198]) by thebighonker.lerctr.org with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89 (FreeBSD)) (envelope-from ) id 1czNOG-000NiA-PI; Sat, 15 Apr 2017 08:05:24 -0500 User-Agent: Microsoft-MacOutlook/f.21.0.170409 Date: Sat, 15 Apr 2017 08:05:23 -0500 Subject: Re: svn commit: r316874 - head/sys/kern From: Larry Rosenman To: Maxim Sobolev , Peter Wemm CC: src-committers , , Hiroki Sato , Hiren Panchasara , , "Ngie Cooper (yaneurabeya)" Message-ID: <5B7F917E-EA2A-4DB4-B032-48BBBEDD7556@lerctr.org> Thread-Topic: svn commit: r316874 - head/sys/kern References: <201704141723.v3EHNS3B043902@repo.freebsd.org> <2109294.KVn8xeR1jZ@overcee.wemm.org> <11221477.gRA6BXfcIE@overcee.wemm.org> In-Reply-To: Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 13:05:26 -0000 On 4/15/17, 6:00 AM, "Maxim Sobolev" wrote: Peter, Ngie, none of this stuff is really directly related to the shutdown(2) change, so I'll probably let Hiroki to clean it up. =20 -Max =20 I=E2=80=99ve backed off to my previous root. Is someone working on this? It=E2=80=99s= PAINFUL. From owner-svn-src-head@freebsd.org Sat Apr 15 13:33:29 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 10E7CD3E16C; Sat, 15 Apr 2017 13:33:29 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E48B3D5D; Sat, 15 Apr 2017 13:33:28 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 15B7C3DFB; Sat, 15 Apr 2017 13:33:28 +0000 (UTC) Date: Sat, 15 Apr 2017 13:33:28 +0000 From: Alexey Dokuchaev To: rgrimes@freebsd.org Cc: Slawa Olhovchenkov , "src-committers@freebsd.org" , Alan Somers , "svn-src-all@freebsd.org" , "Ngie Cooper (yaneurabeya)" , Larry Rosenman , "svn-src-head@freebsd.org" , Ngie Cooper Subject: Re: svn commit: r316938 - head/sbin/savecore Message-ID: <20170415133328.GD97090@FreeBSD.org> References: <20170414204642.GC70430@zxy.spb.ru> <201704150141.v3F1fWn1009236@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201704150141.v3F1fWn1009236@pdx.rh.CN85.dnsmgr.net> User-Agent: Mutt/1.7.1 (2016-10-04) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 13:33:29 -0000 On Fri, Apr 14, 2017 at 06:41:32PM -0700, Rodney W. Grimes wrote: > On Apr 14, 2017, at 13:46, Slawa Olhovchenkov wrote: > > On Fri, Apr 14, 2017 at 01:45:22PM -0700, Ngie Cooper (yaneurabeya) wrote: > > > > On Apr 14, 2017, at 13:42, Slawa Olhovchenkov wrote: > > > > ... > > > > No, something like: > > > > % swapinfo > > > > Device 1K-blocks Used Avail Capacity > > > > /dev/ada0p2 33554432 0 33554432 0% > > > > /dev/ada1p2 33554432 0 33554432 0% > > > > Total 67108864 0 67108864 0% > > > > > > Striping dumps across multiple swap devices isn't supported. Sorry. It's kind of funny how many emails required to understand what people ask for while it seemed quite obvious up-front. :-) (This is one of the most desired feature for me as well). > > What about support in the future? > > Added to my project list at people.freebsd.org/~rgrimes. No promises, > but I'll look at it while I am doing the other work. Thanks Rod, appreciate and glad to hear this. ./danfe From owner-svn-src-head@freebsd.org Sat Apr 15 13:37:36 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2CB8AD3E263; Sat, 15 Apr 2017 13:37:36 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0FD4BF19; Sat, 15 Apr 2017 13:37:36 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 3A3053F55; Sat, 15 Apr 2017 13:37:35 +0000 (UTC) Date: Sat, 15 Apr 2017 13:37:35 +0000 From: Alexey Dokuchaev To: Andriy Gapon Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r316854 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <20170415133735.GE97090@FreeBSD.org> References: <201704141535.v3EFZ7BY096442@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201704141535.v3EFZ7BY096442@repo.freebsd.org> User-Agent: Mutt/1.7.1 (2016-10-04) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 13:37:36 -0000 On Fri, Apr 14, 2017 at 03:35:07PM +0000, Andriy Gapon wrote: > New Revision: 316854 > URL: https://svnweb.freebsd.org/changeset/base/316854 > > Log: > rename vfs.zfs.debug_flags to vfs.zfs.debugflags > > While the former name is easier to read, the "_flags" suffix has a > special meaning for loader(8) and, thus, it was impossible to set the > knob via loader.conf(5). Nice, it also makes it consistent with `kern.geom.debugflags'. ./danfe From owner-svn-src-head@freebsd.org Sat Apr 15 13:57:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2013FD3E7A8; Sat, 15 Apr 2017 13:57:37 +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 E470A1AB7; Sat, 15 Apr 2017 13:57:36 +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 v3FDvaeJ051104; Sat, 15 Apr 2017 13:57:36 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3FDvZFW051101; Sat, 15 Apr 2017 13:57:35 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201704151357.v3FDvZFW051101@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 15 Apr 2017 13:57:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316959 - head/usr.bin/diff X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 13:57:37 -0000 Author: bapt Date: Sat Apr 15 13:57:35 2017 New Revision: 316959 URL: https://svnweb.freebsd.org/changeset/base/316959 Log: Clean up headers declaration Modified: head/usr.bin/diff/diff.c head/usr.bin/diff/diffdir.c head/usr.bin/diff/diffreg.c Modified: head/usr.bin/diff/diff.c ============================================================================== --- head/usr.bin/diff/diff.c Sat Apr 15 11:16:11 2017 (r316958) +++ head/usr.bin/diff/diff.c Sat Apr 15 13:57:35 2017 (r316959) @@ -27,11 +27,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include -#include #include #include #include Modified: head/usr.bin/diff/diffdir.c ============================================================================== --- head/usr.bin/diff/diffdir.c Sat Apr 15 11:16:11 2017 (r316958) +++ head/usr.bin/diff/diffdir.c Sat Apr 15 13:57:35 2017 (r316959) @@ -28,17 +28,13 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include -#include #include #include #include -#include #include #include "diff.h" -#include "xmalloc.h" static int selectfile(const struct dirent *); static void diffit(struct dirent *, char *, size_t, char *, size_t, int); Modified: head/usr.bin/diff/diffreg.c ============================================================================== --- head/usr.bin/diff/diffreg.c Sat Apr 15 11:16:11 2017 (r316958) +++ head/usr.bin/diff/diffreg.c Sat Apr 15 13:57:35 2017 (r316959) @@ -80,6 +80,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include From owner-svn-src-head@freebsd.org Sat Apr 15 14:01:09 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38D76D3E92C; Sat, 15 Apr 2017 14:01:09 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F164C1E42; Sat, 15 Apr 2017 14:01:08 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v3FE0vnT012251; Sat, 15 Apr 2017 07:00:57 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v3FE0vXk012250; Sat, 15 Apr 2017 07:00:57 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201704151400.v3FE0vXk012250@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r316938 - head/sbin/savecore In-Reply-To: <20170415083952.GA83631@zxy.spb.ru> To: Slawa Olhovchenkov Date: Sat, 15 Apr 2017 07:00:57 -0700 (PDT) CC: Mark Johnston , Xin LI , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Ngie Cooper , Alan Somers Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 14:01:09 -0000 > On Fri, Apr 14, 2017 at 03:05:25PM -0700, Mark Johnston wrote: > > > > And with textdumps available, the benefit > > > of having compression is limited because we can request for minidump > > > or full dumps only when the textdumps are not good enough for > > > diagnosing the kernel bug. > > > > Sure, but in this case the compression may be vital. > > > > > > > > I don't think security (e.g. leaking information because of the use of > > > compression) is a very big concern in this context because in order > > > for the potential attacker to read the raw material needs a > > > compromised system (unlike an attack from the network, where someone > > > who controls the network would have access to the raw material); the > > > dump is usually quite large, and measuring downtime would be hard at > > > that scale. > > > > Ok. > > > > > > > > By the way (not meant to bikeshed) if I was to do this I'd prefer > > > using lz4 or something that compresses faster than zlib. > > > > I agree, but I think the existing lz4 implementation in the kernel is > > not so well suited to running after a panic. It seems fixable, but > > compression speed also isn't hugely important here IMO. > > On production system this is downtime. > For may case, dumped about 32GB (from 256GB RAM). This is take several > minutes. Can compression increase this to hour? On productions systems the compression layer of dump may very well be a win situation depending on choosen algorith (you want something fairly fast, but still effective). If your rate to compress bytes is close to the disk write bandwith you have an over all win caused by writting less to disk. Someone who enjoys math should write an equation for given compression bandwidth cb and given disk bandwidth db and compression ratio cr what do the curves look like? IIRC we measure cpu/memory bandwidth in the 10'sG bytes/sec range, compression should be some place under that, and our disk bandwidth even on SSD is in the 500MB range, even the fastest 15k rpm spinning rust is in the <200MB range, we should be able to compress at a higher rate than this. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sat Apr 15 14:07:43 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 860D7D3EB48; Sat, 15 Apr 2017 14:07:43 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 67948150; Sat, 15 Apr 2017 14:07:43 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 980C54770; Sat, 15 Apr 2017 14:07:42 +0000 (UTC) Date: Sat, 15 Apr 2017 14:07:42 +0000 From: Alexey Dokuchaev To: rgrimes@freebsd.org Cc: Mark Johnston , "src-committers@freebsd.org" , Alan Somers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Ngie Cooper Subject: Re: svn commit: r316938 - head/sbin/savecore Message-ID: <20170415140742.GF97090@FreeBSD.org> References: <20170415053729.GA76139@raichu> <201704150642.v3F6g41p010449@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201704150642.v3F6g41p010449@pdx.rh.CN85.dnsmgr.net> User-Agent: Mutt/1.7.1 (2016-10-04) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 14:07:43 -0000 On Fri, Apr 14, 2017 at 11:42:04PM -0700, Rodney W. Grimes wrote: > On Fri, Apr 14, 2017 at 10:37:29PM -0700, Mark Johnston wrote: > > ... > > Does "lkm" mean "loadable kernel module"? If so, why? > > Yes, so you dont have to reboot to write and debug new versions, so > you can have a kernel without minidump if you want, and I am sure > there are others. More importantly, why not? Modules are good, > staticially linked rarely used code is bad. That sounds pretty awesome, keep it up! ./danfe ("modularize everything" proponent) From owner-svn-src-head@freebsd.org Sat Apr 15 14:28:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F3AAD3F0DD; Sat, 15 Apr 2017 14:28:33 +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 5CDC17C; Sat, 15 Apr 2017 14:28:32 +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 E267D10A7B9; Sat, 15 Apr 2017 10:28:30 -0400 (EDT) From: John Baldwin To: "Ngie Cooper (yaneurabeya)" , src-committers Cc: rgrimes@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r316938 - head/sbin/savecore Date: Sat, 15 Apr 2017 07:26:41 -0700 Message-ID: <1774031.vuxxQt1GW8@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <4CBF25DF-F407-4F50-8724-B73F64734E19@gmail.com> References: <201704150149.v3F1nu0D009274@pdx.rh.CN85.dnsmgr.net> <4CBF25DF-F407-4F50-8724-B73F64734E19@gmail.com> 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); Sat, 15 Apr 2017 10:28:31 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 14:28:33 -0000 On Friday, April 14, 2017 07:40:57 PM Ngie Cooper wrote: > > > On Apr 14, 2017, at 18:49, Rodney W. Grimes wrote: > > Do we use KiB, MiB, GiB,... any place else in the system? I cant think of > > a place we do this, so please, lets not start doing this here? The du manpage does at least. > humanize_number(3) from libutil uses IEC units. Note that it is optional though. You can use flags to decide what you want and the default is to not use IEC. ls -h uses humanize_number but not with IEC units. In particular, there are flags to control the scaling and prefixes used: HN_DIVISOR_1000 and HN_IEC_PREFIXES. The default is to use power-of-2 scaling with non-IEC prefixes (so KB == 1024 by default). Currently nothing in base uses HN_IEC_PREFIXES. (I see you already reverted the printf, just wanted to point out that the humanize_number behavior is configurable.) -- John Baldwin From owner-svn-src-head@freebsd.org Sat Apr 15 14:43:17 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9FF7ED3F8F6; Sat, 15 Apr 2017 14:43:17 +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 60A55F0D; Sat, 15 Apr 2017 14:43:17 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1czOuv-0001T5-I8; Sat, 15 Apr 2017 17:43:13 +0300 Date: Sat, 15 Apr 2017 17:43:13 +0300 From: Slawa Olhovchenkov To: rgrimes@freebsd.org Cc: Mark Johnston , Xin LI , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Ngie Cooper , Alan Somers Subject: Re: svn commit: r316938 - head/sbin/savecore Message-ID: <20170415144313.GG70430@zxy.spb.ru> References: <20170415083952.GA83631@zxy.spb.ru> <201704151400.v3FE0vXk012250@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201704151400.v3FE0vXk012250@pdx.rh.CN85.dnsmgr.net> 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 14:43:17 -0000 On Sat, Apr 15, 2017 at 07:00:57AM -0700, Rodney W. Grimes wrote: > > On Fri, Apr 14, 2017 at 03:05:25PM -0700, Mark Johnston wrote: > > > > > > And with textdumps available, the benefit > > > > of having compression is limited because we can request for minidump > > > > or full dumps only when the textdumps are not good enough for > > > > diagnosing the kernel bug. > > > > > > Sure, but in this case the compression may be vital. > > > > > > > > > > > I don't think security (e.g. leaking information because of the use of > > > > compression) is a very big concern in this context because in order > > > > for the potential attacker to read the raw material needs a > > > > compromised system (unlike an attack from the network, where someone > > > > who controls the network would have access to the raw material); the > > > > dump is usually quite large, and measuring downtime would be hard at > > > > that scale. > > > > > > Ok. > > > > > > > > > > > By the way (not meant to bikeshed) if I was to do this I'd prefer > > > > using lz4 or something that compresses faster than zlib. > > > > > > I agree, but I think the existing lz4 implementation in the kernel is > > > not so well suited to running after a panic. It seems fixable, but > > > compression speed also isn't hugely important here IMO. > > > > On production system this is downtime. > > For may case, dumped about 32GB (from 256GB RAM). This is take several > > minutes. Can compression increase this to hour? > > On productions systems the compression layer of dump may very well > be a win situation depending on choosen algorith (you want something > fairly fast, but still effective). If your rate to compress bytes > is close to the disk write bandwith you have an over all win caused > by writting less to disk. > > Someone who enjoys math should write an equation for given > compression bandwidth cb and given disk bandwidth db and > compression ratio cr what do the curves look like? > > IIRC we measure cpu/memory bandwidth in the 10'sG bytes/sec wrong. single thread cpu/memory bandwidth very different on i7 and e5 cpu (e5 less, about 6 GB/s). > range, compression should be some place under that, and > our disk bandwidth even on SSD is in the 500MB range, > even the fastest 15k rpm spinning rust is in the <200MB > range, we should be able to compress at a higher rate than > this. yes. From owner-svn-src-head@freebsd.org Sat Apr 15 14:53:35 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F04C3D3FDA3 for ; Sat, 15 Apr 2017 14:53:35 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-43.reflexion.net [208.70.210.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 916BE6D2 for ; Sat, 15 Apr 2017 14:53:34 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 8681 invoked from network); 15 Apr 2017 14:56:32 -0000 Received: from unknown (HELO mail-cs-02.app.dca.reflexion.local) (10.81.19.2) by 0 (rfx-qmail) with SMTP; 15 Apr 2017 14:56:32 -0000 Received: by mail-cs-02.app.dca.reflexion.local (Reflexion email security v8.40.0) with SMTP; Sat, 15 Apr 2017 10:53:32 -0400 (EDT) Received: (qmail 31297 invoked from network); 15 Apr 2017 14:53:32 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 15 Apr 2017 14:53:32 -0000 Received: from [192.168.1.106] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id EB915EC7B2C; Sat, 15 Apr 2017 07:53:31 -0700 (PDT) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r316874 - head/sys/kern Message-Id: <5DBF14FE-5D54-4E34-ACD4-7C2BBC058BA6@dsl-only.net> Date: Sat, 15 Apr 2017 07:53:31 -0700 To: sobomax@FreeBSD.org, svn-src-head@freebsd.org X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 14:53:36 -0000 Peter Wemm peter at wemm.org on Fri Apr 14 18:49:32 UTC 2017 wrote: > This appears to have broken syslogd and had a major change in behavior = with=20 > regards to select(2). I end up with the following run-away processes: send-mail -i root (sendmail) /usr/local/bin/dbus-daemon --system (I'm just guessing at the cause being this same change.) =3D=3D=3D Mark Millard markmi at dsl-only.net From owner-svn-src-head@freebsd.org Sat Apr 15 15:11:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5CD8D3E43D; Sat, 15 Apr 2017 15:11:22 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id 8E409852; Sat, 15 Apr 2017 15:11:22 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id AFB501A2009; Sun, 16 Apr 2017 01:11:20 +1000 (AEST) Date: Sun, 16 Apr 2017 01:11:20 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: John Baldwin cc: "Ngie Cooper (yaneurabeya)" , src-committers , rgrimes@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r316938 - head/sbin/savecore In-Reply-To: <1774031.vuxxQt1GW8@ralph.baldwin.cx> Message-ID: <20170416003716.I2908@besplex.bde.org> References: <201704150149.v3F1nu0D009274@pdx.rh.CN85.dnsmgr.net> <4CBF25DF-F407-4F50-8724-B73F64734E19@gmail.com> <1774031.vuxxQt1GW8@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=VbSHBBh9 c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=iKhvJSA4AAAA:8 a=BJNNuotrTlMSYgykdtQA:9 a=wmQd6wXe6-s_8t1q:21 a=HpH15m97YzivtNej:21 a=CjuIK1q_8ugA:10 a=odh9cflL3HIXMm4fY7Wr:22 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 15:11:22 -0000 On Sat, 15 Apr 2017, John Baldwin wrote: > On Friday, April 14, 2017 07:40:57 PM Ngie Cooper wrote: >> >>> On Apr 14, 2017, at 18:49, Rodney W. Grimes wrote: >>> Do we use KiB, MiB, GiB,... any place else in the system? I cant think of >>> a place we do this, so please, lets not start doing this here? > > The du manpage does at least. > >> humanize_number(3) from libutil uses IEC units. > > Note that it is optional though. You can use flags to decide what you want > and the default is to not use IEC. ls -h uses humanize_number but not with > IEC units. In particular, there are flags to control the scaling and > prefixes used: HN_DIVISOR_1000 and HN_IEC_PREFIXES. The default is to use > power-of-2 scaling with non-IEC prefixes (so KB == 1024 by default). > Currently nothing in base uses HN_IEC_PREFIXES. > > (I see you already reverted the printf, just wanted to point out that the > humanize_number behavior is configurable.) There is already the environment variable BLOCKSIZE to turn off bogus units in a for places. I think most uses set this to 1 real K and barely remember how bad the defaults are without it until they somehow run a shell without it set (perhaps in single-user mode). Its designers didn't forsee IEC mistakes, else it would with be more than a single number, and have meta-info to turn off bogus unit names. ls(1) and df(1) don't properly document that -h (or whatever IEC mistakes might be in it) have precedence over BLOCKSIZE. du(1) does document this properly. Bruce From owner-svn-src-head@freebsd.org Sat Apr 15 15:46:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 266D3D3F2FC; Sat, 15 Apr 2017 15:46:59 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8E56D15CC; Sat, 15 Apr 2017 15:46:57 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from thor.intern.walstatt.dynvpn.de ([85.179.171.81]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MAxyW-1crkvh02o0-00A0f0; Sat, 15 Apr 2017 17:46:53 +0200 Date: Sat, 15 Apr 2017 17:46:44 +0200 From: "O. Hartmann" To: Larry Rosenman Cc: Maxim Sobolev , Peter Wemm , src-committers , svn-src-all@freebsd.org, Hiroki Sato , Hiren Panchasara , svn-src-head@freebsd.org, "Ngie Cooper \(yaneurabeya\)" Subject: Re: svn commit: r316874 - head/sys/kern Message-ID: <20170415174533.3dd6349a@thor.intern.walstatt.dynvpn.de> In-Reply-To: <5B7F917E-EA2A-4DB4-B032-48BBBEDD7556@lerctr.org> References: <201704141723.v3EHNS3B043902@repo.freebsd.org> <2109294.KVn8xeR1jZ@overcee.wemm.org> <11221477.gRA6BXfcIE@overcee.wemm.org> <5B7F917E-EA2A-4DB4-B032-48BBBEDD7556@lerctr.org> Organization: WALSTATT User-Agent: OutScare 3.1415926 X-Operating-System: ImNotAnOperatingSystem 3.141592527 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/=_F=FZjbc/DcCH9liXt+hz/"; protocol="application/pgp-signature" X-Provags-ID: V03:K0:WzbBZpRDiwEX31fM5Ti3ys1+3ArAhwHkdQ0DpG6aie5anbrDArD ikpWLC4Jop/ZUCfpTrXOp9ovvf/kOQEK5wjDAT6bx1TJig5j0cFOrtQUGQVnLOZ4D01U5T2 ggKKrmqaFWttgS8plDr3Uq6ei8QcrMvS69chRGqivb4tP0qH+ZLQYxpvWSML3iRmsAiRP34 mRXtg1rH9Fmo7oiDEYjoQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:qEocvc8zKEU=:MiQRwnkrofhrV1bfhKWCUU uSZq+UbwLyujli5ua8oHdjMS5OrICHgLjz14hBokUtB9yF8GCkiyZX2sSfgzWY/ANEKoPiTkc F01q0NMFFYnzj7AE5SN8HnjMppQ5syk18kdOxUIOVuRQQsoL+rrAWYbxct4VHVqoVNbcxLySd AojXKXmeCreZczqWGeeFRyu1yw6hy4J13Q3xtzuptTAKFUf71OFh7crinzHYyefns6HHhhYdG 6YLsszujTmgfVe4TfG7WRtH28dF/v/GqyPxFPNhgTzDohwcLRG1yIIePEPCbwV4WW4k6VsfQK BrtBAIBZUTVqHOD1PNWMRU+JET5apCGx25rjnw0t/cFLxRLM4a2IS+/YON7CiQRsIHGrVYVCo sXcoJsfHRyOBCJ9FdpnnnfzOJLkLnpkXeKSuOKvbmTdtWzhElvt962/EOLlxY5q4Ztkf7tNnv FINjA89ynL3hnFRJNzBLp+UL/fT15xqmxAxGTqOa/QrbAQdxwZB9zr7wjEtAK6Hdc6GgbzApF KgQtAmapUAHiE/Bn22pgbsS5XMMzXcgRAOyxo6Sf9vOVz3LeW6C5asELLQOSqQaUH7zAXQMiC esh5u4b7YaXzseZQobMIm0Y7CvY4EaXuKTSyn3UJlbtXPtfBx/PEyGegGna2xtHaMeMhVvKzc p5u42NEPe2gr1nbmi1lEJwl9s2VVD8FvDM9zL0mjy/VndyBi9nUUtpCprLPO+LZNFEdgTFpWt wLCcgwpslyp7BhSJZX87q0zq4HBJXb/XEKeX0Oy8GAWhXsz8whFdSwth2RQ= X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 15:46:59 -0000 --Sig_/=_F=FZjbc/DcCH9liXt+hz/ Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Am Sat, 15 Apr 2017 08:05:23 -0500 Larry Rosenman schrieb: > On 4/15/17, 6:00 AM, "Maxim Sobolev" sobomax@freebsd.org> wrote: >=20 > Peter, Ngie, none of this stuff is really directly related to the > shutdown(2) change, so I'll probably let Hiroki to clean it up. > =20 > -Max > =20 >=20 > I=E2=80=99ve backed off to my previous root. Is someone working on this?= It=E2=80=99s PAINFUL. >=20 [...] Processes do not even hang when system is booting/spinning up. On my router project, I've running asterisk13 on a small appliance. Startin= g asterisk with "service asterisk start" starts the service, but then, stopping the se= rvice calling "service asterisk stop" reports Asterisk ending (0). but the process is still running as top reveals: PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU CO= MMAN 1352 asterisk 19 52 0 105M 25284K uwrlck 3 17:40 67.94% as= teri [...] This is weird :-( kill -9 1352 works. Finally. Regards, Oliver --=20 O. Hartmann Ich widerspreche der Nutzung oder =C3=9Cbermittlung meiner Daten f=C3=BCr Werbezwecke oder f=C3=BCr die Markt- oder Meinungsforschung (=C2=A7 28 Abs.= 4 BDSG). --Sig_/=_F=FZjbc/DcCH9liXt+hz/ Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCWPJAZQAKCRDS528fyFhY lE6eAf9pMgModWiBT73rYEwmmSeARwGwL+3icTRsxU3rPpc3ZeOp+GPE0HYZ/nf3 ySmLLkfcjaRPV2rfGAbrIIBTw2JyAf99Da7f6EqyP9UzkZ7Fq/BXdojdho0rurtv EeVweRd+884SMk7ZEtLDKBIhGiur3g+5XV5tGbfpikTMUC3/aL9i =TTw+ -----END PGP SIGNATURE----- --Sig_/=_F=FZjbc/DcCH9liXt+hz/-- From owner-svn-src-head@freebsd.org Sat Apr 15 16:24:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF357D3F336; Sat, 15 Apr 2017 16:24:56 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-pf0-x242.google.com (mail-pf0-x242.google.com [IPv6:2607:f8b0:400e:c00::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 C18CF636; Sat, 15 Apr 2017 16:24:56 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-pf0-x242.google.com with SMTP id c198so18918391pfc.0; Sat, 15 Apr 2017 09:24:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=2yaTR6Gnn19Q6prbALa96dNw2DJuimhXJrBerbJngkA=; b=UAuJbTUg4t/bRt9rAWqxOc7jDH1OvJVZL7UGcsmU+O2ToIOWk+eYVCpoecvl1c7ioV /+TzHH60rG3k2YB6rRPsVBkKYg0WKNynudeH8Bf59UCg4jpoBpUVHMGtm1SqnP7yMMUl tQguPov9I4QFuEoJseB2RzPv0CHcqD4IrPqAEh6Owkq4fWseQZbTjpsdjPY2lG65DDw1 L9eNunnQQ4TezoZHr64uYcU/43Np+E3fjKdvOQkamZpxOR+aWQUf8rQCJpqWK6tOuHct MhbpLqa91wBNXHxN7K2lK+N0O4Ze2V5sLwmy+iDE94T6uaxSjM5Jl/IAHa2EKlbiNKNG dLLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=2yaTR6Gnn19Q6prbALa96dNw2DJuimhXJrBerbJngkA=; b=uXkFnbqPRBY8yOLcLPtgKso2B9JnQlULwXNTUuoJLsCNz/AyVKWKnzbcEDsYzF9vqe aQSJwmoT3S/7n1IQKvF+KVd1TESEfAszcB/h7POWhUhEUPst/kwiY8WagcQ1idXHqLsv dWjhQsxHqGTrzuycabryYUBfgoCRsICywBb4xdnMkZ4d2zE8yyG4OD0+kjSQ/1QTYpIr UKhOWUq/U2RANSOKqnwLFde13tCmav5MqYNuDi5FC8m35PEFtP5QNo5hobyMYYza5YEx W8KgHEFXRenWwnFGBXWx364w2gsqjGfq8ZNj7btVmPynpoKhtaYXMtzunMaAIC3zQSF8 pIoA== X-Gm-Message-State: AN3rC/6lxUFWP/WYFTnXJvtFSSCgfrqqGZivP0W7G4MOGKhvgLFi2qhy j+9OkJQAPSFPZg/lXLc= X-Received: by 10.99.114.80 with SMTP id c16mr3412472pgn.121.1492273496064; Sat, 15 Apr 2017 09:24:56 -0700 (PDT) Received: from raichu ([2604:4080:1102:0:ca60:ff:fe9d:3963]) by smtp.gmail.com with ESMTPSA id g5sm9370012pfe.12.2017.04.15.09.24.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 15 Apr 2017 09:24:55 -0700 (PDT) Sender: Mark Johnston Date: Sat, 15 Apr 2017 09:24:51 -0700 From: Mark Johnston To: rgrimes@freebsd.org Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r316938 - head/sbin/savecore Message-ID: <20170415162437.GA89653@raichu> References: <20170415053729.GA76139@raichu> <201704150642.v3F6g41p010449@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201704150642.v3F6g41p010449@pdx.rh.CN85.dnsmgr.net> User-Agent: Mutt/1.8.0 (2017-02-23) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 16:24:57 -0000 On Fri, Apr 14, 2017 at 11:42:04PM -0700, Rodney W. Grimes wrote: > > On Fri, Apr 14, 2017 at 06:30:17PM -0700, Rodney W. Grimes wrote: > > > > The patch to add compression support is here and should largely still > > > > work: > > > > https://people.freebsd.org/~markj/patches/core-compression/20141110-kern_dump.diff > > > > > > > > I've been hesitant about pushing it forward: > > > > - The dump_write* APIs need some simplification after the addition of > > > > encrypted dump support and support for dumping to 4Kn drives. > > > > - I'm not sure how encryption should compose with compression. It seems > > > > intuitively obvious that we should compress before encrypting if the > > > > compression is to be of any use, but I don't know enough to know > > > > whether the compression might somehow compromise the effectiveness of > > > > the encryption. > > > > > > > > If anyone has some insight on the second of these two points, I'd > > > > appreciate hearing it. > > > > > > I have a large amount of reworking and modulization of the dump code > > > incuding intergration of your (markj) compressed dumps. Layer isnt > > > implemented but is in the plan. I should not of held off on the net > > > dump code as it got smashed by encrypted dumps, then again by > > > the libif'ing for all the Intel drives that had been netdump modified. > > > > > > Basically now starting over :-( > > > > Could you post your patches somewhere? I've been sitting on this (and > > the netdump patches, for which I have quite a few modifications) for far > > too long, and would like to finish them and get them in soon. I'll note > > that the netdump code posted a few years ago had some problems that are > > fixed in Isilon's version, which I'm working on rebasing on HEAD. In > > Isnt the code I rebaed in December to -12 your code from Isiolon???? I don't know exactly what code you're referring to. > Or tell me you handed me your patches to upstream, and then continued > to evolved the code without letting me know? Are YOUR patckes some > place public? I dont think mine are, but I do have a link in > http://people.freebsd.org/~rgrimes pointing to the other Netdump version > that I think is an old version of your code. I haven't changed the compression patch since I posted it a long time ago: https://people.freebsd.org/~markj/patches/core-compression/20141110-kern_dump.diff I've made a fairly large set of changes to the netdump code linked on your page. Some of the changes were motivated by the objections raised to the original set of patches. I currently don't have a working copy of my netdump patches against HEAD, but here are some internal patches: https://people.freebsd.org/~markj/patches/netdump/ A recent revision of the netdumpd code is here: https://github.com/markjdb/netdumpd From owner-svn-src-head@freebsd.org Sat Apr 15 16:29:05 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1CFBD3F440; Sat, 15 Apr 2017 16:29:05 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-pf0-x242.google.com (mail-pf0-x242.google.com [IPv6:2607:f8b0:400e:c00::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 7E419AAE; Sat, 15 Apr 2017 16:29:05 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-pf0-x242.google.com with SMTP id i5so18850881pfc.3; Sat, 15 Apr 2017 09:29:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=YhlFxMVUtSS8ZA3iuignQGEkCC7tEVx1WCCxemmcv0s=; b=hUTCK1TWX4aadTsDkOE8FOA72op7m0dmm6dE7moYdl7FlhqC4FTmw451/NGa54HVe4 zI657lQNHrWhE1QiZsxU96oPRPCKucEFiwtAMpwcXoJUkPZb5ElhO6INJj2JErr1qmXN vY1qyNSKFz4M9X70RFnENL8pllW6GCFNoWrTpe1vUjIUnJmVBRr1eRuwL3gQpCX7Uyiv v4MTsIyrHY/5YK92TQBoe5vhBjU5HUOZAkMrMnzDlTiQJN4oPFiHuA9KiC50ePW9ZWqf k7dEnbHfNQefYQ63Yp5+91WAtFnchqdc2QCdpgG922UIc3CYfwA2/gP/NSXzweuiK5Ta X06A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=YhlFxMVUtSS8ZA3iuignQGEkCC7tEVx1WCCxemmcv0s=; b=mOMQ6GtWcLtbvAAVnOgLcmOakFMZf1dQBIL+A+hC9sS+q8UeQVdJArHwsTwUrmyUbZ 3+64+HMUdcabnYrn1GoAG1MrkaFL7wTyYwkywm73sNpSXBNcE2A+6Dd97NkOLG3pf58F FW2S9hBJjUnI9M2ApUKnS8BzbrXD2FOWT66C6sOoO/E7CpQrDJpkcKcf3b6pXllKg7lm 2U0seLkN4z5z++JqO5+KbxiWGzSiMWoOce6AtwUA6agTL3hZ/tXBhalVJwNSGnoHbNCv ENTQqqRrwjuZRHeibbxRzsh7Hj5Wh59ZNgSpJiNVvroE3ifgrmkaqgLV/4pnntr+R5kx lsKg== X-Gm-Message-State: AN3rC/76sCgywPTXbLObcP9wQ2gV304lWoUw3JZquJ7dFfqw6XHcmEU7 1t3uh7udk+Ictw== X-Received: by 10.99.189.2 with SMTP id a2mr3449645pgf.85.1492273745123; Sat, 15 Apr 2017 09:29:05 -0700 (PDT) Received: from raichu ([2604:4080:1102:0:ca60:ff:fe9d:3963]) by smtp.gmail.com with ESMTPSA id 21sm9340692pfl.129.2017.04.15.09.29.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 15 Apr 2017 09:29:04 -0700 (PDT) Sender: Mark Johnston Date: Sat, 15 Apr 2017 09:29:02 -0700 From: Mark Johnston To: Slawa Olhovchenkov Cc: Xin LI , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Ngie Cooper , Alan Somers Subject: Re: svn commit: r316938 - head/sbin/savecore Message-ID: <20170415162902.GB89653@raichu> References: <201704141941.v3EJfmCW003347@repo.freebsd.org> <20170414202918.GD5039@wkstn-mjohnston.west.isilon.com> <20170414220525.GF5039@wkstn-mjohnston.west.isilon.com> <20170415083952.GA83631@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170415083952.GA83631@zxy.spb.ru> User-Agent: Mutt/1.8.0 (2017-02-23) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 16:29:05 -0000 On Sat, Apr 15, 2017 at 11:39:52AM +0300, Slawa Olhovchenkov wrote: > On Fri, Apr 14, 2017 at 03:05:25PM -0700, Mark Johnston wrote: > > > > And with textdumps available, the benefit > > > of having compression is limited because we can request for minidump > > > or full dumps only when the textdumps are not good enough for > > > diagnosing the kernel bug. > > > > Sure, but in this case the compression may be vital. > > > > > > > > I don't think security (e.g. leaking information because of the use of > > > compression) is a very big concern in this context because in order > > > for the potential attacker to read the raw material needs a > > > compromised system (unlike an attack from the network, where someone > > > who controls the network would have access to the raw material); the > > > dump is usually quite large, and measuring downtime would be hard at > > > that scale. > > > > Ok. > > > > > > > > By the way (not meant to bikeshed) if I was to do this I'd prefer > > > using lz4 or something that compresses faster than zlib. > > > > I agree, but I think the existing lz4 implementation in the kernel is > > not so well suited to running after a panic. It seems fixable, but > > compression speed also isn't hugely important here IMO. > > On production system this is downtime. > For may case, dumped about 32GB (from 256GB RAM). This is take several > minutes. Can compression increase this to hour? It would have to be tested. The compression also speeds up recovery somewhat since fewer bytes need to be transferred from the dump device to a filesystem. I should also point out that the feature implementation is not closely tied to the compression algorithm, which could be changed for something faster later. From owner-svn-src-head@freebsd.org Sat Apr 15 16:48:48 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7A92D3FA7B; Sat, 15 Apr 2017 16:48:48 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8A094A2B; Sat, 15 Apr 2017 16:48:48 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (58-7-95-3.dyn.iinet.net.au [58.7.95.3]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id v3FGmYJr079447 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sat, 15 Apr 2017 09:48:38 -0700 (PDT) (envelope-from julian@freebsd.org) Subject: Re: svn commit: r316938 - head/sbin/savecore To: Larry Rosenman , "Ngie Cooper (yaneurabeya)" References: <201704141941.v3EJfmCW003347@repo.freebsd.org> <20170414201431.GF20974@zxy.spb.ru> <0CAE4B1C-228B-4C71-86E9-4337753DFF74@lerctr.org> Cc: Slawa Olhovchenkov , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Ngie Cooper , Alan Somers From: Julian Elischer Message-ID: Date: Sun, 16 Apr 2017 00:48:28 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 16:48:48 -0000 On 15/4/17 4:37 am, Larry Rosenman wrote: > On 4/14/17, 3:33 PM, "Ngie Cooper (yaneurabeya)" wrote: > > > > On Apr 14, 2017, at 13:26, Larry Rosenman wrote: > > > > On 4/14/17, 3:19 PM, "Ngie Cooper (yaneurabeya)" wrote: > > > >> On Apr 14, 2017, at 13:14, Slawa Olhovchenkov wrote: > >> > >> On Fri, Apr 14, 2017 at 01:49:51PM -0600, Alan Somers wrote: > >> > >>> On Fri, Apr 14, 2017 at 1:41 PM, Ngie Cooper wrote: > >>>> Author: ngie > >>>> Date: Fri Apr 14 19:41:48 2017 > >>>> New Revision: 316938 > >>>> URL: https://svnweb.freebsd.org/changeset/base/316938 > >>>> > >>>> Log: > >>>> savecore: fix space calculation with respect to `minfree` in check_space(..) > >>>> > >>>> - Use strtoll(3) instead of atoi(3), because atoi(3) limits the > >>>> representable data to INT_MAX. Check the values received from > >>>> strtoll(3), trimming trailing whitespace off the end to maintain > >>>> POLA. > >>>> - Use `KiB` instead of `kB` when describing free space, total space, > >>>> etc. I am now fully aware of `KiB` being the IEC standard for 1024 > >>>> bytes and `kB` being the IEC standard for 1000 bytes. > >>>> - Store available number of KiB in `available` so it can be more > >>>> easily queried and compared to ensure that there are enough KiB to > >>>> store the dump image on disk. > >>>> - Print out the reserved space on disk, per `minfree`, so end-users > >>>> can troubleshoot why check_space(..) is reporting that there isn't > >>>> enough free space. > >>>> > >>>> MFC after: 7 weeks > >>>> Reviewed by: Anton Rang (earlier diff), cem (earlier diff) > >>>> Tested with: positive/negative cases (see review); make tinderbox > >>>> Sponsored by: Dell EMC Isilon > >>>> Differential Revision: D10379 > >>> > >>> The free space calculation is still uselessly conservative, because it > >>> doesn't account for the fact that core dumps will always be either > >>> spare or compressed. The result is that savecore will frequently > >>> refuse to save corefiles even when there's plenty of space. I > >>> proposed removing the space check altogether in > >>> https://reviews.freebsd.org/D2587. However, I agreed to wait until > >>> after the compressed core dump feature was merged, because then mostly > >>> accurate space checks will be possible. AFAIK the compressed core > >>> dump feature still hasn't been finished. > >> > >> Is posible (in the future) to use multiple swaps (on multiple disks) > >> for save core dumps? > > > > Multiple swap devices is already handled by savecore(8), if one uses fstab(5) or dumpon(8). Otherwise, you must invoke savecore(8) on individual devices. > > > > As far as saving to multiple disks is concerned, I would hope that one is using a redundancy capable filesystem (zfs) or RAID-like technology (gmirror, graid, LSI Fusion’s RAID product line) to stripe and/or mirror the data across multiple disks. > > … > > > How do I use multiple devices to have the system dump on all of my swap? I got a message about not enough space, but there (I think) was enough between multiple drives…. > > Something like: > > - Create a zpool > - Mount zpool to /crashdumps > - Change dumpdir in /etc/rc.conf to be /crashdumps, e.g., echo ‘dumpdir=/crashdumps’ > > ? > HTH, > -Ngie > > PS The issue with lack of space might be the issue that Alan brought up earlier with compressed dumps and overly conservative free space checks, or it might be the fact that dumpdir (default: /var/crash) is full. > > > I was talking about the actual crashdump to swap by the system. /var/crash has 10T of space (my root pool). > > > > > > > PAnzura have kernel changes to allow the dumpdev to be a list of devices and it will write the core dump across the devices in the order specified. It's a bit "private code" quality, but I think we'd be happy to share it if soemone would be interested in polishing it. we have multiple 24G swap devices but 64G of ramso a full dump goes a cross the first 3 devices. We also do both a text dump AND a real dump one after the other. From owner-svn-src-head@freebsd.org Sat Apr 15 16:55:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D947FD3FCC6; Sat, 15 Apr 2017 16:55:47 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 9CCE9FBF; Sat, 15 Apr 2017 16:55:47 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (58-7-95-3.dyn.iinet.net.au [58.7.95.3]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id v3FGh0xj079418 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sat, 15 Apr 2017 09:43:03 -0700 (PDT) (envelope-from julian@freebsd.org) Subject: Re: svn commit: r316938 - head/sbin/savecore To: Slawa Olhovchenkov , Alan Somers References: <201704141941.v3EJfmCW003347@repo.freebsd.org> <20170414201431.GF20974@zxy.spb.ru> Cc: Ngie Cooper , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" From: Julian Elischer Message-ID: Date: Sun, 16 Apr 2017 00:42:54 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170414201431.GF20974@zxy.spb.ru> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 16:55:48 -0000 On 15/4/17 4:14 am, Slawa Olhovchenkov wrote: > On Fri, Apr 14, 2017 at 01:49:51PM -0600, Alan Somers wrote: > >> On Fri, Apr 14, 2017 at 1:41 PM, Ngie Cooper wrote: >>> Author: ngie >>> Date: Fri Apr 14 19:41:48 2017 >>> New Revision: 316938 >>> URL: https://svnweb.freebsd.org/changeset/base/316938 >>> >>> Log: >>> savecore: fix space calculation with respect to `minfree` in check_space(..) >>> >>> - Use strtoll(3) instead of atoi(3), because atoi(3) limits the >>> representable data to INT_MAX. Check the values received from >>> strtoll(3), trimming trailing whitespace off the end to maintain >>> POLA. >>> - Use `KiB` instead of `kB` when describing free space, total space, >>> etc. I am now fully aware of `KiB` being the IEC standard for 1024 >>> bytes and `kB` being the IEC standard for 1000 bytes. >>> - Store available number of KiB in `available` so it can be more >>> easily queried and compared to ensure that there are enough KiB to >>> store the dump image on disk. >>> - Print out the reserved space on disk, per `minfree`, so end-users >>> can troubleshoot why check_space(..) is reporting that there isn't >>> enough free space. >>> >>> MFC after: 7 weeks >>> Reviewed by: Anton Rang (earlier diff), cem (earlier diff) >>> Tested with: positive/negative cases (see review); make tinderbox >>> Sponsored by: Dell EMC Isilon >>> Differential Revision: D10379 >> The free space calculation is still uselessly conservative, because it >> doesn't account for the fact that core dumps will always be either >> spare or compressed. The result is that savecore will frequently >> refuse to save corefiles even when there's plenty of space. I >> proposed removing the space check altogether in >> https://reviews.freebsd.org/D2587. However, I agreed to wait until >> after the compressed core dump feature was merged, because then mostly >> accurate space checks will be possible. AFAIK the compressed core >> dump feature still hasn't been finished. > Is posible (in the future) to use multiple swaps (on multiple disks) > for save core dumps? We ($JOB) already have code that does this. dumpon can be called multiple times and the coredump code will span multiple devices, From owner-svn-src-head@freebsd.org Sat Apr 15 17:00:51 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A588D3FFF8; Sat, 15 Apr 2017 17:00:51 +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 54E70640; Sat, 15 Apr 2017 17:00:51 +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 v3FH0ohI027340; Sat, 15 Apr 2017 17:00:50 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3FH0oCd027337; Sat, 15 Apr 2017 17:00:50 GMT (envelope-from np@FreeBSD.org) Message-Id: <201704151700.v3FH0oCd027337@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 15 Apr 2017 17:00:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316971 - in head/sys/dev/cxgbe: . common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 17:00:51 -0000 Author: np Date: Sat Apr 15 17:00:50 2017 New Revision: 316971 URL: https://svnweb.freebsd.org/changeset/base/316971 Log: cxgbe: Add a tunable to configure the SGE time scaler, which is available starting with T6. The values in the timer holdoff registers are multiplied by the scaling factor before use. dev...holdoff_timers shows the final values of the timers in microseconds. MFC after: 1 week Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/common/common.h head/sys/dev/cxgbe/common/t4_hw.c head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/common/common.h ============================================================================== --- head/sys/dev/cxgbe/common/common.h Sat Apr 15 15:38:15 2017 (r316970) +++ head/sys/dev/cxgbe/common/common.h Sat Apr 15 17:00:50 2017 (r316971) @@ -210,7 +210,7 @@ struct tp_rdma_stats { }; struct sge_params { - int timer_val[SGE_NTIMERS]; + int timer_val[SGE_NTIMERS]; /* final, scaled values */ int counter_val[SGE_NCOUNTERS]; int fl_starve_threshold; int fl_starve_threshold2; Modified: head/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- head/sys/dev/cxgbe/common/t4_hw.c Sat Apr 15 15:38:15 2017 (r316970) +++ head/sys/dev/cxgbe/common/t4_hw.c Sat Apr 15 17:00:50 2017 (r316971) @@ -7907,7 +7907,7 @@ int t4_init_sge_params(struct adapter *a { u32 r; struct sge_params *sp = &adapter->params.sge; - unsigned i; + unsigned i, tscale = 1; r = t4_read_reg(adapter, A_SGE_INGRESS_RX_THRESHOLD); sp->counter_val[0] = G_THRESHOLD_0(r); @@ -7915,15 +7915,24 @@ int t4_init_sge_params(struct adapter *a sp->counter_val[2] = G_THRESHOLD_2(r); sp->counter_val[3] = G_THRESHOLD_3(r); + if (chip_id(adapter) >= CHELSIO_T6) { + r = t4_read_reg(adapter, A_SGE_ITP_CONTROL); + tscale = G_TSCALE(r); + if (tscale == 0) + tscale = 1; + else + tscale += 2; + } + r = t4_read_reg(adapter, A_SGE_TIMER_VALUE_0_AND_1); - sp->timer_val[0] = core_ticks_to_us(adapter, G_TIMERVALUE0(r)); - sp->timer_val[1] = core_ticks_to_us(adapter, G_TIMERVALUE1(r)); + sp->timer_val[0] = core_ticks_to_us(adapter, G_TIMERVALUE0(r)) * tscale; + sp->timer_val[1] = core_ticks_to_us(adapter, G_TIMERVALUE1(r)) * tscale; r = t4_read_reg(adapter, A_SGE_TIMER_VALUE_2_AND_3); - sp->timer_val[2] = core_ticks_to_us(adapter, G_TIMERVALUE2(r)); - sp->timer_val[3] = core_ticks_to_us(adapter, G_TIMERVALUE3(r)); + sp->timer_val[2] = core_ticks_to_us(adapter, G_TIMERVALUE2(r)) * tscale; + sp->timer_val[3] = core_ticks_to_us(adapter, G_TIMERVALUE3(r)) * tscale; r = t4_read_reg(adapter, A_SGE_TIMER_VALUE_4_AND_5); - sp->timer_val[4] = core_ticks_to_us(adapter, G_TIMERVALUE4(r)); - sp->timer_val[5] = core_ticks_to_us(adapter, G_TIMERVALUE5(r)); + sp->timer_val[4] = core_ticks_to_us(adapter, G_TIMERVALUE4(r)) * tscale; + sp->timer_val[5] = core_ticks_to_us(adapter, G_TIMERVALUE5(r)) * tscale; r = t4_read_reg(adapter, A_SGE_CONM_CTRL); sp->fl_starve_threshold = G_EGRTHRESHOLD(r) * 2 + 1; Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Sat Apr 15 15:38:15 2017 (r316970) +++ head/sys/dev/cxgbe/t4_sge.c Sat Apr 15 17:00:50 2017 (r316971) @@ -150,6 +150,13 @@ TUNABLE_INT("hw.cxgbe.largest_rx_cluster static int safest_rx_cluster = PAGE_SIZE; TUNABLE_INT("hw.cxgbe.safest_rx_cluster", &safest_rx_cluster); +/* + * The interrupt holdoff timers are multiplied by this value on T6+. + * 1 and 3-17 (both inclusive) are legal values. + */ +static int tscale = 1; +TUNABLE_INT("hw.cxgbe.tscale", &tscale); + struct txpkts { u_int wr_type; /* type 0 or type 1 */ u_int npkt; /* # of packets in this work request */ @@ -391,6 +398,12 @@ t4_sge_modload(void) cong_drop = 0; } + if (tscale != 1 && (tscale < 3 || tscale > 17)) { + printf("Invalid hw.cxgbe.tscale value (%d)," + " using 1 instead.\n", tscale); + tscale = 1; + } + extfree_refs = counter_u64_alloc(M_WAITOK); extfree_rels = counter_u64_alloc(M_WAITOK); counter_u64_zero(extfree_refs); @@ -583,6 +596,15 @@ t4_tweak_chip_settings(struct adapter *s V_TIMERVALUE5(us_to_core_ticks(sc, intr_timer[5])); t4_write_reg(sc, A_SGE_TIMER_VALUE_4_AND_5, v); + if (chip_id(sc) >= CHELSIO_T6) { + m = V_TSCALE(M_TSCALE); + if (tscale == 1) + v = 0; + else + v = V_TSCALE(tscale - 2); + t4_set_reg_field(sc, A_SGE_ITP_CONTROL, m, v); + } + /* 4K, 16K, 64K, 256K DDP "page sizes" for TDDP */ v = V_HPZ0(0) | V_HPZ1(2) | V_HPZ2(4) | V_HPZ3(6); t4_write_reg(sc, A_ULP_RX_TDDP_PSZ, v); From owner-svn-src-head@freebsd.org Sat Apr 15 17:02:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE5C4D3E4BD; Sat, 15 Apr 2017 17:02:33 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 80703BBE; Sat, 15 Apr 2017 17:02:33 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3FH2WvX029053; Sat, 15 Apr 2017 17:02:32 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3FH2W3j029052; Sat, 15 Apr 2017 17:02:32 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201704151702.v3FH2W3j029052@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 15 Apr 2017 17:02:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316972 - head/sys/arm/freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 17:02:33 -0000 Author: ian Date: Sat Apr 15 17:02:32 2017 New Revision: 316972 URL: https://svnweb.freebsd.org/changeset/base/316972 Log: Add support for the imx6ul SoC. Modified: head/sys/arm/freescale/imx/imx_gpt.c Modified: head/sys/arm/freescale/imx/imx_gpt.c ============================================================================== --- head/sys/arm/freescale/imx/imx_gpt.c Sat Apr 15 17:00:50 2017 (r316971) +++ head/sys/arm/freescale/imx/imx_gpt.c Sat Apr 15 17:02:32 2017 (r316972) @@ -118,6 +118,7 @@ static struct resource_spec imx_gpt_spec static struct ofw_compat_data compat_data[] = { {"fsl,imx6dl-gpt", 1}, {"fsl,imx6q-gpt", 1}, + {"fsl,imx6ul-gpt", 1}, {"fsl,imx53-gpt", 1}, {"fsl,imx51-gpt", 1}, {"fsl,imx31-gpt", 1}, @@ -133,6 +134,15 @@ imx_gpt_probe(device_t dev) if (!ofw_bus_status_okay(dev)) return (ENXIO); + /* + * We only support a single unit, because the only thing this driver + * does with the complex timer hardware is supply the system + * timecounter and eventtimer. There is nothing useful we can do with + * the additional device instances that exist in some chips. + */ + if (device_get_unit(dev) > 0) + return (ENXIO); + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data != 0) { device_set_desc(dev, "Freescale i.MX GPT timer"); return (BUS_PROBE_DEFAULT); From owner-svn-src-head@freebsd.org Sat Apr 15 18:20:12 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6238ED3FFAE; Sat, 15 Apr 2017 18:20:12 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 344501C62; Sat, 15 Apr 2017 18:20:12 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3FIKBDW057771; Sat, 15 Apr 2017 18:20:11 GMT (envelope-from sobomax@FreeBSD.org) Received: (from sobomax@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3FIKBhM057770; Sat, 15 Apr 2017 18:20:11 GMT (envelope-from sobomax@FreeBSD.org) Message-Id: <201704151820.v3FIKBhM057770@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sobomax set sender to sobomax@FreeBSD.org using -f From: Maxim Sobolev Date: Sat, 15 Apr 2017 18:20:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316973 - head/usr.sbin/syslogd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 18:20:12 -0000 Author: sobomax Date: Sat Apr 15 18:20:11 2017 New Revision: 316973 URL: https://svnweb.freebsd.org/changeset/base/316973 Log: Fix another logic bug that came out of recent syslogd refactoring and exposed by the r316874: don't call shutdown(2) on all sockets, but only net ones, which seems to be the behaviour existed before that refactoring. Also don't call listen(2) in datagram sockets and fix misplaced debug messages while I am here. Reported by: peter Modified: head/usr.sbin/syslogd/syslogd.c Modified: head/usr.sbin/syslogd/syslogd.c ============================================================================== --- head/usr.sbin/syslogd/syslogd.c Sat Apr 15 17:02:32 2017 (r316972) +++ head/usr.sbin/syslogd/syslogd.c Sat Apr 15 18:20:11 2017 (r316973) @@ -3003,10 +3003,14 @@ socksetup(struct peer *pe) continue; } dprintf("new socket fd is %d\n", s); - listen(s, 5); + if (res->ai_socktype != SOCK_DGRAM) { + listen(s, 5); + } sl_recv = socklist_recv_sock; - dprintf("shutdown\n"); - if (SecureMode || res->ai_family == AF_LOCAL) { +#if defined(INET) || defined(INET6) + if (SecureMode && (res->ai_family == AF_INET || + res->ai_family == AF_INET6)) { + dprintf("shutdown\n"); /* Forbid communication in secure mode. */ if (shutdown(s, SHUT_RD) < 0 && errno != ENOTCONN) { @@ -3014,10 +3018,11 @@ socksetup(struct peer *pe) if (!Debug) die(0); } - dprintf("listening on socket\n"); sl_recv = NULL; } else - dprintf("sending on socket\n"); +#endif + dprintf("listening on socket\n"); + dprintf("sending on socket\n"); addsock(res->ai_addr, res->ai_addrlen, &(struct socklist){ .sl_socket = s, From owner-svn-src-head@freebsd.org Sat Apr 15 18:22:42 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37BCBD3F16A for ; Sat, 15 Apr 2017 18:22:42 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail-it0-x22c.google.com (mail-it0-x22c.google.com [IPv6:2607:f8b0:4001:c0b::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 EA512A4 for ; Sat, 15 Apr 2017 18:22:41 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: by mail-it0-x22c.google.com with SMTP id 70so8685773ita.0 for ; Sat, 15 Apr 2017 11:22:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sippysoft-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=DLozSrGsXwdyk/MqJmwDFqPw9dg5VIzq8jG/L5FGoms=; b=kNOF65J3tOGwL2kJSDlPQu4qCzYLnfN5eUv45DixJoiSfKvRsSlIB8QKaKij1XzjLD R64OQ8Kl9omKvOTtsMGv3YdW9dWVU3tQlJ6bdMuU8fUL/+bdyeSc/9tmqlLhhOlLDYrp 75ZZl72rQbYQ9JXOu/KJ01l/WLrnsbuNne5GAOe3g1r7ZXwQP9WoiMo7oKlJf0A6igBA hK8hEZEJ2dsbJukMZpnMVBjDOKes3fDwMBjkDN4O25pCp8bWxik83g5zpyIAyiK+h4AQ a7hTcgo6Cvi9sDC76IpXePoumH4G1sQoG+z1rwBDdpdPIj0yx3mg0WlBiy2PAqJEcQUS cMZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=DLozSrGsXwdyk/MqJmwDFqPw9dg5VIzq8jG/L5FGoms=; b=K5MnTb79kufb6ZdHRjKF4jQmavK6Mfbun75h47RxCtk2IPrPEF+CpiUESmWKd2Q2Fa WTl9AKeX6tzn9tt+0ue1kq06uKi8ae91+DGmta8hcAn1Ro/oJI7WWoAkUW/VrtSU3VwM URuFTFX8cW6uMcHQOiRuiKXDO7PCqPTJPKgk0MrvmMImWpb7PgbPbua+iq3Lp4mrLTNq nCJQVhPTSTyVxOuhxP/JOpI5mpsmPl25W7H4lwR6zU0tVBxCAmWeUOB9BgARMH2u8Nde KGymOloXGoX+CGWySiQrJ1/eVZBjQuaP3nVpJPCHX8oISMoOcF65uwrRidiYHc/bRRlO ggFQ== X-Gm-Message-State: AN3rC/6uREF06PAn8p6aIh9209SRBhrIFF+d8CU12NKenf4mJr9fvWuv jFkjRWxUkuBc8aY2bk7c4sdOxqCj/Vx3 X-Received: by 10.36.85.148 with SMTP id e142mr3941743itb.106.1492280561297; Sat, 15 Apr 2017 11:22:41 -0700 (PDT) MIME-Version: 1.0 Sender: sobomax@sippysoft.com Received: by 10.36.104.135 with HTTP; Sat, 15 Apr 2017 11:22:40 -0700 (PDT) In-Reply-To: <20170415174533.3dd6349a@thor.intern.walstatt.dynvpn.de> References: <201704141723.v3EHNS3B043902@repo.freebsd.org> <2109294.KVn8xeR1jZ@overcee.wemm.org> <11221477.gRA6BXfcIE@overcee.wemm.org> <5B7F917E-EA2A-4DB4-B032-48BBBEDD7556@lerctr.org> <20170415174533.3dd6349a@thor.intern.walstatt.dynvpn.de> From: Maxim Sobolev Date: Sat, 15 Apr 2017 11:22:40 -0700 X-Google-Sender-Auth: i4VUea8Gc_FzFWXmaK8nFNDdxTk Message-ID: Subject: Re: svn commit: r316874 - head/sys/kern To: "O. Hartmann" Cc: Larry Rosenman , Peter Wemm , src-committers , svn-src-all@freebsd.org, Hiroki Sato , Hiren Panchasara , svn-src-head@freebsd.org, "Ngie Cooper (yaneurabeya)" 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 18:22:42 -0000 I've committed another fix for the syslogd code in question which should hopefully make it functional again. Peter, please let me know if you still having any issues. Thanks! -Max On Sat, Apr 15, 2017 at 8:46 AM, O. Hartmann wrote= : > Am Sat, 15 Apr 2017 08:05:23 -0500 > Larry Rosenman schrieb: > > > On 4/15/17, 6:00 AM, "Maxim Sobolev" behalf of > > sobomax@freebsd.org> wrote: > > > > Peter, Ngie, none of this stuff is really directly related to the > > shutdown(2) change, so I'll probably let Hiroki to clean it up. > > > > -Max > > > > > > I=E2=80=99ve backed off to my previous root. Is someone working on thi= s? It=E2=80=99s > PAINFUL. > > > [...] > > Processes do not even hang when system is booting/spinning up. > > On my router project, I've running asterisk13 on a small appliance. > Starting asterisk > with "service asterisk start" starts the service, but then, stopping the > service calling > "service asterisk stop" reports > > Asterisk ending (0). > > but the process is still running as top reveals: > > PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU > COMMAN > 1352 asterisk 19 52 0 105M 25284K uwrlck 3 17:40 67.94% > asteri > [...] > > This is weird :-( > > kill -9 1352 works. Finally. > > Regards, > Oliver > -- > O. Hartmann > > Ich widerspreche der Nutzung oder =C3=9Cbermittlung meiner Daten f=C3=BCr > Werbezwecke oder f=C3=BCr die Markt- oder Meinungsforschung (=C2=A7 28 Ab= s. 4 BDSG). > From owner-svn-src-head@freebsd.org Sat Apr 15 19:17:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C85CD3F372; Sat, 15 Apr 2017 19:17:20 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3D105BF5; Sat, 15 Apr 2017 19:17:20 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v3FJHGs3013258; Sat, 15 Apr 2017 12:17:16 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v3FJHGSf013257; Sat, 15 Apr 2017 12:17:16 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201704151917.v3FJHGSf013257@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r316938 - head/sbin/savecore In-Reply-To: <1774031.vuxxQt1GW8@ralph.baldwin.cx> To: John Baldwin Date: Sat, 15 Apr 2017 12:17:16 -0700 (PDT) CC: "Ngie Cooper (yaneurabeya)" , src-committers , rgrimes@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 19:17:20 -0000 > On Friday, April 14, 2017 07:40:57 PM Ngie Cooper wrote: > > > > > On Apr 14, 2017, at 18:49, Rodney W. Grimes wrote: > > > Do we use KiB, MiB, GiB,... any place else in the system? I cant think of > > > a place we do this, so please, lets not start doing this here? > > The du manpage does at least. Should that be reverted? My 5.4p8 man pages does not have any IEC units in it. Doesnt du -h print stuff in none IEC units, so this is kinda a man page vs actual code error. Oh wait, it is more errorful than that, using -h leaves off units and only prints scale of K/M/G/... and not KB/MB/GB :-(. > > humanize_number(3) from libutil uses IEC units. > > Note that it is optional though. You can use flags to decide what you want > and the default is to not use IEC. ls -h uses humanize_number but not with > IEC units. In particular, there are flags to control the scaling and > prefixes used: HN_DIVISOR_1000 and HN_IEC_PREFIXES. The default is to use > power-of-2 scaling with non-IEC prefixes (so KB == 1024 by default). > Currently nothing in base uses HN_IEC_PREFIXES. > > (I see you already reverted the printf, just wanted to point out that the > humanize_number behavior is configurable.) Yes, and it would be nice to round out this functional set fixing its lack of uint64_t support, fixing all the things Bruce pointed out and then to start using it. Oh, and probably add an environment control to get either IEC or non IEC and scale either 1024 or 1000. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sat Apr 15 19:22:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0B9FDD3F8AA; Sat, 15 Apr 2017 19:22:59 +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 D34E0152; Sat, 15 Apr 2017 19:22:58 +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=Content-type:Mime-version:In-Reply-To:References:Message-ID:CC: To:From:Subject:Date:Sender:Reply-To:Content-Transfer-Encoding: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=wP+DciefGgj4xRkt1sCRhDaoO4v7NvYvYXVVGjXYMGY=; b=DubvvxJHGUPagU6ZQgagDm5C9o 4lpEoR238CwWgIN0OlscPbtAUPAMS/BsQbcvl5Gnl+qjkcWUvtRJUZGXTlZ8gQgI79GwzlUTF8yHX +//rrVhgSoM4PdC3iCrJjRY8pEn4o1eC0+jjNIeKvy3DA5qvoBRHq6kSlKYqXAsqhnOc=; Received: from [47.220.164.50] (port=64281 helo=[192.168.200.198]) by thebighonker.lerctr.org with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89 (FreeBSD)) (envelope-from ) id 1czTHd-0009Y5-P5; Sat, 15 Apr 2017 14:22:57 -0500 User-Agent: Microsoft-MacOutlook/f.21.0.170409 Date: Sat, 15 Apr 2017 14:22:57 -0500 Subject: Re: svn commit: r316874 - head/sys/kern From: Larry Rosenman To: Maxim Sobolev , "O. Hartmann" CC: Peter Wemm , src-committers , , Hiroki Sato , Hiren Panchasara , , "Ngie Cooper (yaneurabeya)" Message-ID: <04DD11C2-A001-49C8-A91F-7B4119CAD16A@lerctr.org> Thread-Topic: svn commit: r316874 - head/sys/kern References: <201704141723.v3EHNS3B043902@repo.freebsd.org> <2109294.KVn8xeR1jZ@overcee.wemm.org> <11221477.gRA6BXfcIE@overcee.wemm.org> <5B7F917E-EA2A-4DB4-B032-48BBBEDD7556@lerctr.org> <20170415174533.3dd6349a@thor.intern.walstatt.dynvpn.de> In-Reply-To: Mime-version: 1.0 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 19:22:59 -0000 This looks MUCH better, startup was it=E2=80=99s usual speedy self. =20 =20 --=20 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 =20 =20 =20 From: Maksym Sobolyev on behalf of Maxim Sobolev Date: Saturday, April 15, 2017 at 1:22 PM To: "O. Hartmann" Cc: Larry Rosenman , Peter Wemm , src-commi= tters , , Hiroki Sato <= hrs@freebsd.org>, Hiren Panchasara , , Ngie Cooper Subject: Re: svn commit: r316874 - head/sys/kern =20 I've committed another fix for the syslogd code in question which should ho= pefully make it functional again. Peter, please let me know if you still hav= ing any issues. Thanks! =20 -Max =20 On Sat, Apr 15, 2017 at 8:46 AM, O. Hartmann wrote= : Am Sat, 15 Apr 2017 08:05:23 -0500 Larry Rosenman schrieb: > On 4/15/17, 6:00 AM, "Maxim Sobolev" sobomax@freebsd.org> wrote: > > Peter, Ngie, none of this stuff is really directly related to the > shutdown(2) change, so I'll probably let Hiroki to clean it up. > > -Max > > > I=E2=80=99ve backed off to my previous root. Is someone working on this? It=E2=80= =99s PAINFUL. > [...] Processes do not even hang when system is booting/spinning up. On my router project, I've running asterisk13 on a small appliance. Startin= g asterisk with "service asterisk start" starts the service, but then, stopping the se= rvice calling "service asterisk stop" reports Asterisk ending (0). but the process is still running as top reveals: PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU CO= MMAN 1352 asterisk 19 52 0 105M 25284K uwrlck 3 17:40 67.94% as= teri [...] This is weird :-( kill -9 1352 works. Finally. Regards, Oliver -- O. Hartmann Ich widerspreche der Nutzung oder =C3=9Cbermittlung meiner Daten f=C3=BCr Werbezwecke oder f=C3=BCr die Markt- oder Meinungsforschung (=C2=A7 28 Abs. 4 BDSG)= . =20 From owner-svn-src-head@freebsd.org Sat Apr 15 19:27:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E065D3FB16; Sat, 15 Apr 2017 19:27:40 +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 788327D2; Sat, 15 Apr 2017 19:27:40 +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 v3FJRdSc085772; Sat, 15 Apr 2017 19:27:39 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3FJRdiu085771; Sat, 15 Apr 2017 19:27:39 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201704151927.v3FJRdiu085771@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Sat, 15 Apr 2017 19:27:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316974 - head/sys/dev/syscons X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 19:27:40 -0000 Author: bde Date: Sat Apr 15 19:27:39 2017 New Revision: 316974 URL: https://svnweb.freebsd.org/changeset/base/316974 Log: Structure the mouse cursor data so that it is easier to switch, and access it via pointers (still to only 1 instance, now with a less generic name). Restructure the "and" and "or" masks as border and interior masks (where the "and" mask was for the union of the border and the interior). "and" and "or" were only a detail in a not very good implementation, and after fixing that the union was only used to calculate the border at runtime. Use the metric data in more places to clip to active pixels earlier. Modified: head/sys/dev/syscons/scvgarndr.c Modified: head/sys/dev/syscons/scvgarndr.c ============================================================================== --- head/sys/dev/syscons/scvgarndr.c Sat Apr 15 18:20:11 2017 (r316973) +++ head/sys/dev/syscons/scvgarndr.c Sat Apr 15 19:27:39 2017 (r316974) @@ -159,15 +159,19 @@ RENDERER_MODULE(vga, vga_set); #ifndef SC_NO_CUTPASTE #if !defined(SC_ALT_MOUSE_IMAGE) || defined(SC_PIXEL_MODE) -#define MOUSE_IMAGE_HEIGHT 13 -#define MOUSE_IMAGE_WIDTH 9 -static u_short mouse_and_mask[16] = { - 0xc000, 0xe000, 0xf000, 0xf800, 0xfc00, 0xfe00, 0xff00, 0xff80, - 0xfe00, 0x1e00, 0x1f00, 0x0f00, 0x0f00, 0x0000, 0x0000, 0x0000 +struct mousedata { + u_short md_border[16]; + u_short md_interior[16]; + u_short md_width; + u_short md_height; }; -static u_short mouse_or_mask[16] = { + +static const struct mousedata mouse9x13 = { { + 0xc000, 0xa000, 0x9000, 0x8800, 0x8400, 0x8200, 0x8100, 0x9780, + 0xf200, 0x1200, 0x1900, 0x0900, 0x0f00, 0x0000, 0x0000, 0x0000, }, { 0x0000, 0x4000, 0x6000, 0x7000, 0x7800, 0x7c00, 0x7e00, 0x6800, - 0x0c00, 0x0c00, 0x0600, 0x0600, 0x0000, 0x0000, 0x0000, 0x0000 + 0x0c00, 0x0c00, 0x0600, 0x0600, 0x0000, 0x0000, 0x0000, 0x0000, }, + 9, 13, }; #endif #endif @@ -404,6 +408,7 @@ draw_txtmouse(scr_stat *scp, int x, int { #ifndef SC_ALT_MOUSE_IMAGE if (ISMOUSEAVAIL(scp->sc->adp->va_flags)) { + const struct mousedata *mdp; u_char font_buf[128]; u_short cursor[32]; u_char c; @@ -412,6 +417,8 @@ draw_txtmouse(scr_stat *scp, int x, int int crtc_addr; int i; + mdp = &mouse9x13; + /* prepare mousepointer char's bitmaps */ pos = (y/scp->font_size - scp->yoff)*scp->xsize + x/8 - scp->xoff; bcopy(scp->font + sc_vtb_getc(&scp->scr, pos)*scp->font_size, @@ -434,8 +441,8 @@ draw_txtmouse(scr_stat *scp, int x, int yoffset = y%scp->font_size; for (i = 0; i < 16; ++i) { cursor[i + yoffset] = - (cursor[i + yoffset] & ~(mouse_and_mask[i] >> xoffset)) - | (mouse_or_mask[i] >> xoffset); + (cursor[i + yoffset] & ~(mdp->md_border[i] >> xoffset)) + | (mdp->md_interior[i] >> xoffset); } for (i = 0; i < scp->font_size; ++i) { font_buf[i] = (cursor[i] & 0xff00) >> 8; @@ -1026,6 +1033,7 @@ vga_pxlblink_planar(scr_stat *scp, int a static void draw_pxlmouse_planar(scr_stat *scp, int x, int y) { + const struct mousedata *mdp; vm_offset_t p; int line_width; int xoff, yoff; @@ -1034,10 +1042,11 @@ draw_pxlmouse_planar(scr_stat *scp, int int i, j, k; uint8_t m1; + mdp = &mouse9x13; line_width = scp->sc->adp->va_line_width; xoff = (x - scp->xoff*8)%8; yoff = y - rounddown(y, line_width); - ymax = imin(y + 16, scp->ypixel); + ymax = imin(y + mdp->md_height, scp->ypixel); outw(GDCIDX, 0x0005); /* read mode 0, write mode 0 */ outw(GDCIDX, 0x0001); /* set/reset enable */ @@ -1045,7 +1054,7 @@ draw_pxlmouse_planar(scr_stat *scp, int outw(GDCIDX, 0x0803); /* data rotate/function select (and) */ p = scp->sc->adp->va_window + line_width*y + x/8; for (i = y, j = 0; i < ymax; ++i, ++j) { - m = ~((mouse_and_mask[j] & ~mouse_or_mask[j]) << 8 >> xoff); + m = ~(mdp->md_border[j] << 8 >> xoff); for (k = 0; k < 3; ++k) { m1 = m >> (8 * (2 - k)); if (m1 != 0xff && x + 8 * k < scp->xpixel) { @@ -1058,7 +1067,7 @@ draw_pxlmouse_planar(scr_stat *scp, int outw(GDCIDX, 0x1003); /* data rotate/function select (or) */ p = scp->sc->adp->va_window + line_width*y + x/8; for (i = y, j = 0; i < ymax; ++i, ++j) { - m = mouse_or_mask[j] << 8 >> xoff; + m = mdp->md_interior[j] << 8 >> xoff; for (k = 0; k < 3; ++k) { m1 = m >> (8 * (2 - k)); if (m1 != 0 && x + 8 * k < scp->xpixel) { @@ -1074,17 +1083,20 @@ draw_pxlmouse_planar(scr_stat *scp, int static void remove_pxlmouse_planar(scr_stat *scp, int x, int y) { + const struct mousedata *mdp; vm_offset_t p; int bx, by, i, line_width, xend, xoff, yend, yoff; + mdp = &mouse9x13; + /* * It is only necessary to remove the mouse image where it overlaps * the border. Determine the overlap, and do nothing if it is empty. */ bx = (scp->xoff + scp->xsize) * 8; by = (scp->yoff + scp->ysize) * scp->font_size; - xend = imin(x + MOUSE_IMAGE_WIDTH, scp->xpixel); - yend = imin(y + MOUSE_IMAGE_HEIGHT, scp->ypixel); + xend = imin(x + mdp->md_width, scp->xpixel); + yend = imin(y + mdp->md_height, scp->ypixel); if (xend <= bx && yend <= by) return; @@ -1108,6 +1120,7 @@ remove_pxlmouse_planar(scr_stat *scp, in static void vga_pxlmouse_direct(scr_stat *scp, int x, int y, int on) { + const struct mousedata *mdp; vm_offset_t p; int line_width, pixel_size; int xend, yend; @@ -1119,12 +1132,14 @@ vga_pxlmouse_direct(scr_stat *scp, int x uint8_t *u8; int bpp; + mdp = &mouse9x13; + /* * Determine overlap with the border and then if removing, do nothing * if the overlap is empty. */ - xend = imin(x + 16, scp->xpixel); - yend = imin(y + 16, scp->ypixel); + xend = imin(x + mdp->md_width, scp->xpixel); + yend = imin(y + mdp->md_height, scp->ypixel); if (!on && xend <= (scp->xoff + scp->xsize) * 8 && yend <= (scp->yoff + scp->ysize) * scp->font_size) return; @@ -1184,33 +1199,33 @@ do_on: case 32: u32 = (uint32_t*)(p + j * pixel_size); mouse_buf32[i * 16 + j] = *u32; - if (mouse_or_mask[i] & (1 << (15 - j))) + if (mdp->md_interior[i] & (1 << (15 - j))) writel(u32, vga_palette32[15]); - else if (mouse_and_mask[i] & (1 << (15 - j))) + else if (mdp->md_border[i] & (1 << (15 - j))) writel(u32, 0); break; case 16: u16 = (uint16_t*)(p + j * pixel_size); mouse_buf16[i * 16 + j] = *u16; - if (mouse_or_mask[i] & (1 << (15 - j))) + if (mdp->md_interior[i] & (1 << (15 - j))) writew(u16, vga_palette16[15]); - else if (mouse_and_mask[i] & (1 << (15 - j))) + else if (mdp->md_border[i] & (1 << (15 - j))) writew(u16, 0); break; case 15: u16 = (uint16_t*)(p + j * pixel_size); mouse_buf16[i * 16 + j] = *u16; - if (mouse_or_mask[i] & (1 << (15 - j))) + if (mdp->md_interior[i] & (1 << (15 - j))) writew(u16, vga_palette15[15]); - else if (mouse_and_mask[i] & (1 << (15 - j))) + else if (mdp->md_border[i] & (1 << (15 - j))) writew(u16, 0); break; case 8: u8 = (uint8_t*)(p + j * pixel_size); mouse_buf8[i * 16 + j] = *u8; - if (mouse_or_mask[i] & (1 << (15 - j))) + if (mdp->md_interior[i] & (1 << (15 - j))) writeb(u8, 15); - else if (mouse_and_mask[i] & (1 << (15 - j))) + else if (mdp->md_border[i] & (1 << (15 - j))) writeb(u8, 0); break; } From owner-svn-src-head@freebsd.org Sat Apr 15 20:03:51 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9050BD3F748; Sat, 15 Apr 2017 20:03:51 +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 3E79CFDC; Sat, 15 Apr 2017 20:03:51 +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 v3FK3oIu002357; Sat, 15 Apr 2017 20:03:50 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3FK3o3w002356; Sat, 15 Apr 2017 20:03:50 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201704152003.v3FK3o3w002356@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Sat, 15 Apr 2017 20:03:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316977 - head/sys/dev/syscons X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 20:03:51 -0000 Author: bde Date: Sat Apr 15 20:03:50 2017 New Revision: 316977 URL: https://svnweb.freebsd.org/changeset/base/316977 Log: Add a 10x16 mouse cursor and use it in all graphics (strictly, pixel) modes if the font size is >= 14. This is the X cursor XC_left_ptr (#68) (glyph #45 in an X cursor font). Also found in vt. The old 9x13 cursor is the 10x16 one trimmed not very well. 8x8 fonts need a smaller cursor instead of a larger one, except when the pixel size is small. Text mode is still limited to width and height 1 more than the font (so the 9x13 is already 4 pixels too high for it). Modified: head/sys/dev/syscons/scvgarndr.c Modified: head/sys/dev/syscons/scvgarndr.c ============================================================================== --- head/sys/dev/syscons/scvgarndr.c Sat Apr 15 19:47:50 2017 (r316976) +++ head/sys/dev/syscons/scvgarndr.c Sat Apr 15 20:03:50 2017 (r316977) @@ -173,6 +173,14 @@ static const struct mousedata mouse9x13 0x0c00, 0x0c00, 0x0600, 0x0600, 0x0000, 0x0000, 0x0000, 0x0000, }, 9, 13, }; + +static const struct mousedata mouse10x16 = { { + 0xc000, 0xa000, 0x9000, 0x8800, 0x8400, 0x8200, 0x8100, 0x8080, + 0x8040, 0x83c0, 0x9200, 0xa900, 0xc900, 0x0480, 0x0480, 0x0300, }, { + 0x0000, 0x4000, 0x6000, 0x7000, 0x7800, 0x7c00, 0x7e00, 0x7f00, + 0x7f80, 0x7c00, 0x6c00, 0x4600, 0x0600, 0x0300, 0x0300, 0x0000, }, + 10, 16, +}; #endif #endif @@ -1042,7 +1050,7 @@ draw_pxlmouse_planar(scr_stat *scp, int int i, j, k; uint8_t m1; - mdp = &mouse9x13; + mdp = (scp->font_size < 14) ? &mouse9x13 : &mouse10x16; line_width = scp->sc->adp->va_line_width; xoff = (x - scp->xoff*8)%8; yoff = y - rounddown(y, line_width); @@ -1087,7 +1095,7 @@ remove_pxlmouse_planar(scr_stat *scp, in vm_offset_t p; int bx, by, i, line_width, xend, xoff, yend, yoff; - mdp = &mouse9x13; + mdp = (scp->font_size < 14) ? &mouse9x13 : &mouse10x16; /* * It is only necessary to remove the mouse image where it overlaps @@ -1132,7 +1140,7 @@ vga_pxlmouse_direct(scr_stat *scp, int x uint8_t *u8; int bpp; - mdp = &mouse9x13; + mdp = (scp->font_size < 14) ? &mouse9x13 : &mouse10x16; /* * Determine overlap with the border and then if removing, do nothing From owner-svn-src-head@freebsd.org Sat Apr 15 20:05:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D33E4D3F7C4; Sat, 15 Apr 2017 20:05:23 +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 B020B195; Sat, 15 Apr 2017 20:05:23 +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 v3FK5Msf002465; Sat, 15 Apr 2017 20:05:22 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3FK5M2j002459; Sat, 15 Apr 2017 20:05:22 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201704152005.v3FK5M2j002459@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 15 Apr 2017 20:05:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316978 - in head: contrib/zstd etc/mtree lib lib/libzstd share/mk usr.bin usr.bin/zstd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 20:05:23 -0000 Author: bapt Date: Sat Apr 15 20:05:22 2017 New Revision: 316978 URL: https://svnweb.freebsd.org/changeset/base/316978 Log: Import zstandard 1.1.4 in base zstandard is a new compression library/tool which is very fast at compression/decompression For now import as a private library Added: head/contrib/zstd/ - copied from r316976, vendor/zstd/dist/ head/lib/libzstd/ head/lib/libzstd/Makefile (contents, props changed) head/usr.bin/zstd/ head/usr.bin/zstd/Makefile (contents, props changed) Modified: head/etc/mtree/BSD.usr.dist head/lib/Makefile head/share/mk/src.libnames.mk head/usr.bin/Makefile Modified: head/etc/mtree/BSD.usr.dist ============================================================================== --- head/etc/mtree/BSD.usr.dist Sat Apr 15 20:03:50 2017 (r316977) +++ head/etc/mtree/BSD.usr.dist Sat Apr 15 20:05:22 2017 (r316978) @@ -17,6 +17,8 @@ .. ucl .. + zstd + .. .. .. lib Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Sat Apr 15 20:03:50 2017 (r316977) +++ head/lib/Makefile Sat Apr 15 20:05:22 2017 (r316978) @@ -90,6 +90,7 @@ SUBDIR= ${SUBDIR_BOOTSTRAP} \ libxo \ liby \ libz \ + libzstd \ ncurses # Inter-library dependencies. When the makefile for a library contains LDADD Added: head/lib/libzstd/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libzstd/Makefile Sat Apr 15 20:05:22 2017 (r316978) @@ -0,0 +1,34 @@ +# $FreeBSD$ + +LIB= zstd +SRCS= entropy_common.c \ + error_private.c \ + fse_decompress.c \ + pool.c \ + threading.c \ + xxhash.c \ + zstd_common.c \ + fse_compress.c \ + huf_compress.c \ + zstd_compress.c \ + zstdmt_compress.c \ + huf_decompress.c \ + zstd_decompress.c \ + zbuff_common.c \ + zbuff_compress.c \ + zbuff_decompress.c \ + cover.c \ + divsufsort.c \ + zdict.c +WARNS= 2 +INCS= zstd.h +CFLAGS+= -I${ZSTDDIR}/lib -I${ZSTDDIR}/lib/common -DXXH_NAMESPACE=ZSTD_ + +PRIVATELIB= yes + +ZSTDDIR= ${SRCTOP}/contrib/zstd +.PATH: ${ZSTDDIR}/lib/common ${ZSTDDIR}/lib/compress \ + ${ZSTDDIR}/lib/decompress ${ZSTDDIR}/lib/deprecated \ + ${ZSTDDIR}/lib/dictBuilder ${ZSTDDIR}/lib + +.include Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Sat Apr 15 20:03:50 2017 (r316977) +++ head/share/mk/src.libnames.mk Sat Apr 15 20:05:22 2017 (r316978) @@ -24,7 +24,8 @@ _PRIVATELIBS= \ sqlite3 \ ssh \ ucl \ - unbound + unbound \ + zstd _INTERNALLIBS= \ amu \ Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Sat Apr 15 20:03:50 2017 (r316977) +++ head/usr.bin/Makefile Sat Apr 15 20:05:22 2017 (r316978) @@ -189,7 +189,8 @@ SUBDIR= alias \ xo \ xz \ xzdec \ - yes + yes \ + zstd # NB: keep these sorted by MK_* knobs Added: head/usr.bin/zstd/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/zstd/Makefile Sat Apr 15 20:05:22 2017 (r316978) @@ -0,0 +1,21 @@ +# $FreeBSD$ + +PROG= zstd +SRCS= bench.c \ + datagen.c \ + dibio.c \ + fileio.c \ + zstdcli.c + +CFLAGS+= -I${SRCTOP}/contrib/zstd/programs \ + -I${SRCTOP}/contrib/zstd/lib/common \ + -I${SRCTOP}/contrib/zstd/lib/compress \ + -I${SRCTOP}/contrib/zstd/lib/dictBuilder \ + -I${SRCTOP}/contrib/zstd/lib \ + -DXXH_NAMESPACE=ZSTD_ + +WARNS= 2 +LIBADD= zstd +.PATH: ${SRCTOP}/contrib/zstd/programs + +.include From owner-svn-src-head@freebsd.org Sat Apr 15 20:06:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C37F9D3F874; Sat, 15 Apr 2017 20:06:25 +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 93EEF32B; Sat, 15 Apr 2017 20:06:25 +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 v3FK6OOu002543; Sat, 15 Apr 2017 20:06:24 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3FK6Ogw002541; Sat, 15 Apr 2017 20:06:24 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201704152006.v3FK6Ogw002541@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 15 Apr 2017 20:06:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316979 - head/usr.bin/less X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 20:06:25 -0000 Author: bapt Date: Sat Apr 15 20:06:24 2017 New Revision: 316979 URL: https://svnweb.freebsd.org/changeset/base/316979 Log: Add a zstdless equivalent to zless, bzless xzless Modified: head/usr.bin/less/Makefile head/usr.bin/less/lesspipe.sh Modified: head/usr.bin/less/Makefile ============================================================================== --- head/usr.bin/less/Makefile Sat Apr 15 20:05:22 2017 (r316978) +++ head/usr.bin/less/Makefile Sat Apr 15 20:06:24 2017 (r316979) @@ -12,7 +12,8 @@ LIBADD= ncursesw LINKS= ${BINDIR}/less ${BINDIR}/more \ ${BINDIR}/zless ${BINDIR}/bzless \ ${BINDIR}/zless ${BINDIR}/xzless \ - ${BINDIR}/zless ${BINDIR}/lzless + ${BINDIR}/zless ${BINDIR}/lzless \ + ${BINDIR}/zless ${BINDIR}/zstless MLINKS= less.1 more.1 CLEANFILES= less.1 Modified: head/usr.bin/less/lesspipe.sh ============================================================================== --- head/usr.bin/less/lesspipe.sh Sat Apr 15 20:05:22 2017 (r316978) +++ head/usr.bin/less/lesspipe.sh Sat Apr 15 20:06:24 2017 (r316979) @@ -22,4 +22,7 @@ case "$1" in *.lzma) exec lzma -d -c "$1" 2>/dev/null ;; + *.zst) + exec zstd -d -q -c "$1" 2>/dev/null + ;; esac From owner-svn-src-head@freebsd.org Sat Apr 15 20:15:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C4347D3FAD7; Sat, 15 Apr 2017 20:15:45 +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 86CC6A08; Sat, 15 Apr 2017 20:15:45 +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 v3FKFiJF006838; Sat, 15 Apr 2017 20:15:44 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3FKFiwZ006836; Sat, 15 Apr 2017 20:15:44 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201704152015.v3FKFiwZ006836@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 15 Apr 2017 20:15:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316980 - head/contrib/zstd/programs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 20:15:45 -0000 Author: bapt Date: Sat Apr 15 20:15:44 2017 New Revision: 316980 URL: https://svnweb.freebsd.org/changeset/base/316980 Log: Change some default to make zstd a dropin replacement for gzip,bzip etc in most cases Changes ares: - quiet by default - remove the source files one compression completion by default Modified: head/contrib/zstd/programs/fileio.c head/contrib/zstd/programs/zstdcli.c Modified: head/contrib/zstd/programs/fileio.c ============================================================================== --- head/contrib/zstd/programs/fileio.c Sat Apr 15 20:06:24 2017 (r316979) +++ head/contrib/zstd/programs/fileio.c Sat Apr 15 20:15:44 2017 (r316980) @@ -138,7 +138,7 @@ static U32 g_dictIDFlag = 1; void FIO_setDictIDFlag(unsigned dictIDFlag) { g_dictIDFlag = dictIDFlag; } static U32 g_checksumFlag = 1; void FIO_setChecksumFlag(unsigned checksumFlag) { g_checksumFlag = checksumFlag; } -static U32 g_removeSrcFile = 0; +static U32 g_removeSrcFile = 1; void FIO_setRemoveSrcFile(unsigned flag) { g_removeSrcFile = (flag>0); } static U32 g_memLimit = 0; void FIO_setMemLimit(unsigned memLimit) { g_memLimit = memLimit; } Modified: head/contrib/zstd/programs/zstdcli.c ============================================================================== --- head/contrib/zstd/programs/zstdcli.c Sat Apr 15 20:06:24 2017 (r316979) +++ head/contrib/zstd/programs/zstdcli.c Sat Apr 15 20:15:44 2017 (r316980) @@ -61,7 +61,7 @@ #define MB *(1 <<20) #define GB *(1U<<30) -#define DEFAULT_DISPLAY_LEVEL 2 +#define DEFAULT_DISPLAY_LEVEL 1 static const char* g_defaultDictName = "dictionary"; static const unsigned g_defaultMaxDictSize = 110 KB; From owner-svn-src-head@freebsd.org Sat Apr 15 20:21:52 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9DD8ED3FDC9; Sat, 15 Apr 2017 20:21:52 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 134CBD6; Sat, 15 Apr 2017 20:21:51 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from thor.intern.walstatt.dynvpn.de ([85.179.171.81]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lt1eU-1c1W291fDe-012ZOI; Sat, 15 Apr 2017 22:21:43 +0200 Date: Sat, 15 Apr 2017 22:21:36 +0200 From: "O. Hartmann" To: Bruce Evans Cc: FreeBSD CURRENT , svn-src-head@freebsd.org Subject: Re: svn commit: r316977 - head/sys/dev/syscons Message-ID: <20170415222136.6c58a00d@thor.intern.walstatt.dynvpn.de> In-Reply-To: <201704152003.v3FK3o3w002356@repo.freebsd.org> References: <201704152003.v3FK3o3w002356@repo.freebsd.org> Organization: WALSTATT User-Agent: OutScare 3.1415926 X-Operating-System: ImNotAnOperatingSystem 3.141592527 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/JAMg6MZfkRLtgW_8a6nHCI4"; protocol="application/pgp-signature" X-Provags-ID: V03:K0:hwROznmUk/jAPRB/idEVZfJMZf52hVfSZVj8WbX5x3lT4q72i1W BNNFjcbVkVcS26GOZy9Q8KGsYuwkldt+wIwBZIlZW2aXK8s04KcHhJbSkX3JOSJe+KuzKO5 wVeAdI82uWzlH8FlhUftfnXYCf1Rzdb6/67UcE5jr7vZij5zvSBpK5pgYkCdDLMVu7sSi1O PY8P2QfW4PD5nAHMOBtaw== X-UI-Out-Filterresults: notjunk:1;V01:K0:DIfKdXluKU8=:sK4D6n/shaU7wpD474fuoT XPADMEaymNY5lava7h8ay8lIEc9v9MrUTCOpq5GQHvPWsWSHxMvCf/mNYI2OMYOfynRzam+g7 XQzA5GW2p6Ux+RpDCpD7rITysC4xEFcCxDNJblBqNBc4kU0VR600/PUV0AYVwLYTmSdldwdqk +jN38JeoNlSEG4wv4m+1Pa3iXU1Q0yOBjO/jQZPMGAif2ZnZyE6Fku1rY8Ad4d66CQ676KpsR TweDaEsbUZOuYBOMRkH48tXi79CiEa0Oa8zOftJwCDQ/Z/CcB+gjqTugAxI9T6B4NJJ9704ZF CC3Kk8UMkXXrLhQXY5Mb1LR2rxxkbVlwuDvvEKbhbCVVpWeQVnOH6YqnJJ05224GbzJl1WoOU hBA1eVUFR3MRQ2YrzSvdEMgUyT1VmBbutcPGafki4Am3QUAcx1lLISZaWiDYF32HFVCn0Kyik 4XAABteJAfGXgBj+GpjFrUAbUPrfx8IGBxsCBYwfpS3EV94uOeQbJecUu0f9smaQt5fSYnuhr nwc5SGDPJERjX1nVG1feTG4gZBMtLzt3MK5vM9Y5wj1Hux2DXHr6pkxoNOKzuGEmDpKvzVisx /XlQU5/AbKKAjhDI7XQVUnP02KBv0zlNCRTYAG0PJ/Nk/dc1/3X7APjDj1Ch6zru6d+G1QhqW u6Ob8cM65AJRSzC0/0+YqcGJ8YfK0cvED9fkVf31VyftzivVV7WknOREbZagh2KHbzHmtj6nJ yd+4znEJmJ+lSq+WHwjjwX63O9ly9ee5hAgkcn9QJ8YKlOYGlrWPc1UTNEU= X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 20:21:52 -0000 --Sig_/JAMg6MZfkRLtgW_8a6nHCI4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Am Sat, 15 Apr 2017 20:03:50 +0000 (UTC) Bruce Evans schrieb: > Author: bde > Date: Sat Apr 15 20:03:50 2017 > New Revision: 316977 > URL: https://svnweb.freebsd.org/changeset/base/316977 >=20 > Log: > Add a 10x16 mouse cursor and use it in all graphics (strictly, pixel) > modes if the font size is >=3D 14. > =20 > This is the X cursor XC_left_ptr (#68) (glyph #45 in an X cursor font). > Also found in vt. The old 9x13 cursor is the 10x16 one trimmed not very > well. > =20 > 8x8 fonts need a smaller cursor instead of a larger one, except when > the pixel size is small. Text mode is still limited to width and height > 1 more than the font (so the 9x13 is already 4 pixels too high for it). >=20 > Modified: > head/sys/dev/syscons/scvgarndr.c >=20 > Modified: head/sys/dev/syscons/scvgarndr.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/syscons/scvgarndr.c Sat Apr 15 19:47:50 2017 (r316976) > +++ head/sys/dev/syscons/scvgarndr.c Sat Apr 15 20:03:50 2017 (r316977) > @@ -173,6 +173,14 @@ static const struct mousedata mouse9x13=20 > 0x0c00, 0x0c00, 0x0600, 0x0600, 0x0000, 0x0000, 0x0000, 0x0000, }, > 9, 13, > }; > + > +static const struct mousedata mouse10x16 =3D { { > + 0xc000, 0xa000, 0x9000, 0x8800, 0x8400, 0x8200, 0x8100, 0x8080, > + 0x8040, 0x83c0, 0x9200, 0xa900, 0xc900, 0x0480, 0x0480, 0x0300, }, { > + 0x0000, 0x4000, 0x6000, 0x7000, 0x7800, 0x7c00, 0x7e00, 0x7f00, > + 0x7f80, 0x7c00, 0x6c00, 0x4600, 0x0600, 0x0300, 0x0300, 0x0000, }, > + 10, 16, > +}; > #endif > #endif > =20 > @@ -1042,7 +1050,7 @@ draw_pxlmouse_planar(scr_stat *scp, int=20 > int i, j, k; > uint8_t m1; > =20 > - mdp =3D &mouse9x13; > + mdp =3D (scp->font_size < 14) ? &mouse9x13 : &mouse10x16; > line_width =3D scp->sc->adp->va_line_width; > xoff =3D (x - scp->xoff*8)%8; > yoff =3D y - rounddown(y, line_width); > @@ -1087,7 +1095,7 @@ remove_pxlmouse_planar(scr_stat *scp, in > vm_offset_t p; > int bx, by, i, line_width, xend, xoff, yend, yoff; > =20 > - mdp =3D &mouse9x13; > + mdp =3D (scp->font_size < 14) ? &mouse9x13 : &mouse10x16; > =20 > /* > * It is only necessary to remove the mouse image where it overlaps > @@ -1132,7 +1140,7 @@ vga_pxlmouse_direct(scr_stat *scp, int x > uint8_t *u8; > int bpp; > =20 > - mdp =3D &mouse9x13; > + mdp =3D (scp->font_size < 14) ? &mouse9x13 : &mouse10x16; > =20 > /* > * Determine overlap with the border and then if removing, do nothing There is a lot of development going on theses days for syscons. What's abou= t vt()? vt() is considered broken for x11/nvidia-driver and vt() is considered a requiremen= t when UEFI is boot scheme, isn't it? I'm just curious. regards, oh --=20 O. Hartmann Ich widerspreche der Nutzung oder =C3=9Cbermittlung meiner Daten f=C3=BCr Werbezwecke oder f=C3=BCr die Markt- oder Meinungsforschung (=C2=A7 28 Abs.= 4 BDSG). --Sig_/JAMg6MZfkRLtgW_8a6nHCI4 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCWPKA0AAKCRDS528fyFhY lJqfAgCPq5IumlxQf2Uz7bYZPQrXGlScayd+aZ1in3C9ijuf4umTj5hB/a4SyIEX Yf/c6CmBJ+Xd59kodhnr3egZ/8YTAf9JKnsHTdhGBgAvGhRJVnUU8GRMIFH2NqGs TGNf6lxT/ojJNv2yzjFD9ys/hsUYYHMwKgwXHHTi/Aqd72hmMdGo =K6Pe -----END PGP SIGNATURE----- --Sig_/JAMg6MZfkRLtgW_8a6nHCI4-- From owner-svn-src-head@freebsd.org Sat Apr 15 20:37:36 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74045D3F5E3; Sat, 15 Apr 2017 20:37:36 +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 510DBF12; Sat, 15 Apr 2017 20:37:36 +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 v3FKbZe2015052; Sat, 15 Apr 2017 20:37:35 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3FKbZ91015048; Sat, 15 Apr 2017 20:37:35 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201704152037.v3FKbZ91015048@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 15 Apr 2017 20:37:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316981 - head/usr.sbin/newsyslog X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 20:37:36 -0000 Author: bapt Date: Sat Apr 15 20:37:34 2017 New Revision: 316981 URL: https://svnweb.freebsd.org/changeset/base/316981 Log: Add a new Y flag to newsyslog.conf This makes newsyslog use zstandard to compress log files. Given Z is already taken for gzip and zstandard compression level stands in between gzip and xz (which has the X flag) chosing Y sounds ok :) Modified: head/usr.sbin/newsyslog/newsyslog.8 head/usr.sbin/newsyslog/newsyslog.c head/usr.sbin/newsyslog/newsyslog.conf.5 head/usr.sbin/newsyslog/pathnames.h Modified: head/usr.sbin/newsyslog/newsyslog.8 ============================================================================== --- head/usr.sbin/newsyslog/newsyslog.8 Sat Apr 15 20:15:44 2017 (r316980) +++ head/usr.sbin/newsyslog/newsyslog.8 Sat Apr 15 20:37:34 2017 (r316981) @@ -17,7 +17,7 @@ .\" the suitability of this software for any purpose. It is .\" provided "as is" without express or implied warranty. .\" -.Dd September 23, 2014 +.Dd April 15, 2017 .Dt NEWSYSLOG 8 .Os .Sh NAME @@ -288,6 +288,7 @@ accepted for backwards compatibility. .Xr bzip2 1 , .Xr gzip 1 , .Xr xz 1 , +.Xr zst 1 , .Xr syslog 3 , .Xr newsyslog.conf 5 , .Xr chown 8 , Modified: head/usr.sbin/newsyslog/newsyslog.c ============================================================================== --- head/usr.sbin/newsyslog/newsyslog.c Sat Apr 15 20:15:44 2017 (r316980) +++ head/usr.sbin/newsyslog/newsyslog.c Sat Apr 15 20:37:34 2017 (r316981) @@ -100,17 +100,22 @@ __FBSDID("$FreeBSD$"); #define COMPRESS_SUFFIX_XZ ".xz" #endif +#ifndef COMPRESS_SUFFIX_ZST +#define COMPRESS_SUFFIX_ZST ".zst" +#endif + #define COMPRESS_SUFFIX_MAXLEN MAX(MAX(sizeof(COMPRESS_SUFFIX_GZ),sizeof(COMPRESS_SUFFIX_BZ2)),sizeof(COMPRESS_SUFFIX_XZ)) /* * Compression types */ -#define COMPRESS_TYPES 4 /* Number of supported compression types */ +#define COMPRESS_TYPES 5 /* Number of supported compression types */ #define COMPRESS_NONE 0 #define COMPRESS_GZIP 1 #define COMPRESS_BZIP2 2 #define COMPRESS_XZ 3 +#define COMPRESS_ZSTD 4 /* * Bit-values for the 'flags' parsed from a config-file entry. @@ -149,7 +154,8 @@ static const struct compress_types compr { "", "", "" }, /* no compression */ { "Z", COMPRESS_SUFFIX_GZ, _PATH_GZIP }, /* gzip compression */ { "J", COMPRESS_SUFFIX_BZ2, _PATH_BZIP2 }, /* bzip2 compression */ - { "X", COMPRESS_SUFFIX_XZ, _PATH_XZ } /* xz compression */ + { "X", COMPRESS_SUFFIX_XZ, _PATH_XZ }, /* xz compression */ + { "Y", COMPRESS_SUFFIX_ZST, _PATH_ZSTD } /* zst compression */ }; struct conf_entry { @@ -1299,6 +1305,9 @@ no_trimat: case 'x': working->compress = COMPRESS_XZ; break; + case 'y': + working->compress = COMPRESS_ZSTD; + break; case 'z': working->compress = COMPRESS_GZIP; break; Modified: head/usr.sbin/newsyslog/newsyslog.conf.5 ============================================================================== --- head/usr.sbin/newsyslog/newsyslog.conf.5 Sat Apr 15 20:15:44 2017 (r316980) +++ head/usr.sbin/newsyslog/newsyslog.conf.5 Sat Apr 15 20:37:34 2017 (r316981) @@ -21,7 +21,7 @@ .\" the suitability of this software for any purpose. It is .\" provided "as is" without express or implied warranty. .\" -.Dd October 24, 2015 +.Dd April 15, 2017 .Dt NEWSYSLOG.CONF 5 .Os .Sh NAME @@ -303,6 +303,12 @@ indicates that should attempt to save disk space by compressing the rotated log file using .Xr xz 1 . +.It Cm Y +indicates that +.Xr newsyslog 8 +should attempt to save disk space by compressing the rotated +log file using +.Xr zstd 1 . .It Cm N indicates that there is no process which needs to be signaled when this log file is rotated. Modified: head/usr.sbin/newsyslog/pathnames.h ============================================================================== --- head/usr.sbin/newsyslog/pathnames.h Sat Apr 15 20:15:44 2017 (r316980) +++ head/usr.sbin/newsyslog/pathnames.h Sat Apr 15 20:37:34 2017 (r316981) @@ -27,3 +27,4 @@ provided "as is" without express or impl #define _PATH_BZIP2 "/usr/bin/bzip2" #define _PATH_GZIP "/usr/bin/gzip" #define _PATH_XZ "/usr/bin/xz" +#define _PATH_ZSTD "/usr/bin/zstd" From owner-svn-src-head@freebsd.org Sat Apr 15 20:51:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8312ED3FB27; Sat, 15 Apr 2017 20:51:55 +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 463A7C28; Sat, 15 Apr 2017 20:51:55 +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 v3FKpskN020508; Sat, 15 Apr 2017 20:51:54 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3FKpr38020502; Sat, 15 Apr 2017 20:51:53 GMT (envelope-from des@FreeBSD.org) Message-Id: <201704152051.v3FKpr38020502@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Sat, 15 Apr 2017 20:51:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316982 - in head/sys: conf crypto/chacha20 modules modules/chacha20 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 20:51:55 -0000 Author: des Date: Sat Apr 15 20:51:53 2017 New Revision: 316982 URL: https://svnweb.freebsd.org/changeset/base/316982 Log: 3BSD-licensed implementation of the chacha20 stream cipher, intended for use by the upcoming arc4random replacement. Added: head/sys/crypto/chacha20/ head/sys/crypto/chacha20/chacha20.c (contents, props changed) head/sys/crypto/chacha20/chacha20.h (contents, props changed) head/sys/modules/chacha20/ head/sys/modules/chacha20/Makefile (contents, props changed) Modified: head/sys/conf/files head/sys/modules/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sat Apr 15 20:37:34 2017 (r316981) +++ head/sys/conf/files Sat Apr 15 20:51:53 2017 (r316982) @@ -591,6 +591,7 @@ crypto/blowfish/bf_ecb.c optional ipsec crypto/blowfish/bf_skey.c optional crypto | ipsec | ipsec_support crypto/camellia/camellia.c optional crypto | ipsec | ipsec_support crypto/camellia/camellia-api.c optional crypto | ipsec | ipsec_support +crypto/chacha20/chacha20.c optional chacha20 crypto/des/des_ecb.c optional crypto | ipsec | ipsec_support | netsmb crypto/des/des_setkey.c optional crypto | ipsec | ipsec_support | netsmb crypto/rc4/rc4.c optional netgraph_mppc_encryption | kgssapi Added: head/sys/crypto/chacha20/chacha20.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/crypto/chacha20/chacha20.c Sat Apr 15 20:51:53 2017 (r316982) @@ -0,0 +1,210 @@ +/*- + * Copyright (c) 2017 Dag-Erling Smørgrav + * 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. + * 3. The name of the author may not be used to endorse or promote + * products derived from this software without specific prior written + * permission. + * + * 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$"); + +#ifdef _KERNEL +#include +#include +#include +#include +#include +#include +#else +#include +#include +#endif + +#include + + +#include + +#define rol32(x, n) \ + ((x) << ((n) & 0x1f) | (x) >> (-(n) & 0x1f)) + +#define CHACHA_QR(x, a, b, c, d) \ + do { \ + x[a] = x[a] + x[b]; x[d] = rol32(x[d] ^ x[a], 16); \ + x[c] = x[c] + x[d]; x[b] = rol32(x[b] ^ x[c], 12); \ + x[a] = x[a] + x[b]; x[d] = rol32(x[d] ^ x[a], 8); \ + x[c] = x[c] + x[d]; x[b] = rol32(x[b] ^ x[c], 7); \ + } while (0) + +static const char magic128[] = "expand 16-byte k"; +static const char magic256[] = "expand 32-byte k"; + +/* + * Fill the state array with 16 bytes of magic and 32 bytes of key, + * repeating the key if necessary. The 8-byte stream position and the + * 8-byte nonce are initialized to all-zeroes. + */ +void +chacha20_init(chacha20_ctx *ctx, const uint8_t *key, size_t keylen) +{ + + memset(ctx, 0, sizeof *ctx); + if (keylen == 32) { + /* magic */ + ctx->state[ 0] = le32dec(magic256 + 0); + ctx->state[ 1] = le32dec(magic256 + 4); + ctx->state[ 2] = le32dec(magic256 + 8); + ctx->state[ 3] = le32dec(magic256 + 12); + /* first half of key */ + ctx->state[ 4] = le32dec(key + 0); + ctx->state[ 5] = le32dec(key + 4); + ctx->state[ 6] = le32dec(key + 8); + ctx->state[ 7] = le32dec(key + 12); + /* second half of key */ + ctx->state[ 8] = le32dec(key + 16); + ctx->state[ 9] = le32dec(key + 20); + ctx->state[10] = le32dec(key + 24); + ctx->state[11] = le32dec(key + 28); + } else { + /* magic */ + ctx->state[ 0] = le32dec(magic128 + 0); + ctx->state[ 1] = le32dec(magic128 + 4); + ctx->state[ 2] = le32dec(magic128 + 8); + ctx->state[ 3] = le32dec(magic128 + 12); + /* first half of key */ + ctx->state[ 4] = le32dec(key + 0); + ctx->state[ 5] = le32dec(key + 4); + ctx->state[ 6] = le32dec(key + 8); + ctx->state[ 7] = le32dec(key + 12); + /* repeat first half of key */ + ctx->state[ 8] = le32dec(key + 0); + ctx->state[ 9] = le32dec(key + 4); + ctx->state[10] = le32dec(key + 8); + ctx->state[11] = le32dec(key + 12); + } +} + +/* + * Reset the stream position and load a new nonce. + */ +void +chacha20_reset(chacha20_ctx *ctx, const uint8_t *nonce) +{ + + /* reset stream counter */ + ctx->state[12] = 0; + ctx->state[13] = 0; + /* copy nonce */ + ctx->state[14] = le32dec(nonce + 0); + ctx->state[15] = le32dec(nonce + 4); +} + +/* + * Encryption: generate a block of keystream, xor it with the plaintext to + * produce the ciphertext, and increment the stream position. If vpt is + * NULL, simply copy the requested keystream to the output buffer. + */ +size_t +chacha20_encrypt(chacha20_ctx *ctx, const void *vpt, uint8_t *ct, size_t len) +{ + const uint8_t *pt = vpt; + uint64_t ctr; + uint32_t mix[16]; + uint8_t ks[64]; + unsigned int b, i; + + len -= len % sizeof ks; + for (b = 0; b < len; b += sizeof ks) { + memcpy(mix, ctx->state, sizeof mix); + for (i = 0; i < 20; i += 2) { + CHACHA_QR(mix, 0, 4, 8, 12); + CHACHA_QR(mix, 1, 5, 9, 13); + CHACHA_QR(mix, 2, 6, 10, 14); + CHACHA_QR(mix, 3, 7, 11, 15); + CHACHA_QR(mix, 0, 5, 10, 15); + CHACHA_QR(mix, 1, 6, 11, 12); + CHACHA_QR(mix, 2, 7, 8, 13); + CHACHA_QR(mix, 3, 4, 9, 14); + } + for (i = 0; i < 16; ++i) + le32enc(ks + i * 4, ctx->state[i] + mix[i]); + if (pt == NULL) { + memcpy(ct, ks, sizeof ks); + ct += sizeof ks; + } else { + for (i = 0; i < 64 && i < len; ++i) + *ct++ = *pt++ ^ ks[i]; + } + ctr = le64dec(ctx->state + 12); + le64enc(ctx->state + 12, ++ctr); + } + return (len); +} + +/* + * Decryption: identical to encryption. + */ +size_t +chacha20_decrypt(chacha20_ctx *ctx, const uint8_t *ct, void *vpt, size_t len) +{ + + return (chacha20_encrypt(ctx, ct, vpt, len)); +} + +/* + * Wipe our state. + */ +void +chacha20_finish(chacha20_ctx *ctx) +{ + + memset(ctx, 0, sizeof *ctx); +} + +#ifdef _KERNEL + +static int +chacha20_modevent(module_t mod, int evtype, void *unused) +{ + + switch (evtype) { + case MOD_LOAD: + return (0); + case MOD_UNLOAD: + return (0); + default: + return (EOPNOTSUPP); + } +} + +static moduledata_t chacha20_mod = { + "chacha20", + chacha20_modevent, + 0 +}; + +DECLARE_MODULE(chacha20, chacha20_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST); +MODULE_VERSION(chacha20, 1); +#endif Added: head/sys/crypto/chacha20/chacha20.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/crypto/chacha20/chacha20.h Sat Apr 15 20:51:53 2017 (r316982) @@ -0,0 +1,53 @@ +/*- + * Copyright (c) 2017 Dag-Erling Smørgrav + * 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. + * 3. The name of the author may not be used to endorse or promote + * products derived from this software without specific prior written + * permission. + * + * 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 SYS_CRYPTO_CHACHA20_H_INCLUDED +#define SYS_CRYPTO_CHACHA20_H_INCLUDED + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct { + uint32_t state[16]; +} chacha20_ctx; + +void chacha20_init(chacha20_ctx *, const uint8_t *, size_t); +void chacha20_reset(chacha20_ctx *, const uint8_t *); +size_t chacha20_encrypt(chacha20_ctx *, const void *, uint8_t *, size_t); +size_t chacha20_decrypt(chacha20_ctx *, const uint8_t *, void *, size_t); +void chacha20_finish(chacha20_ctx *); + +#ifdef __cplusplus +} +#endif + +#endif Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Sat Apr 15 20:37:34 2017 (r316981) +++ head/sys/modules/Makefile Sat Apr 15 20:51:53 2017 (r316982) @@ -73,6 +73,7 @@ SUBDIR= \ cd9660_iconv \ ${_ce} \ ${_cfi} \ + chacha20 \ ${_chromebook_platform} \ ${_ciss} \ cloudabi \ Added: head/sys/modules/chacha20/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/chacha20/Makefile Sat Apr 15 20:51:53 2017 (r316982) @@ -0,0 +1,8 @@ +# $FreeBSD$ + +.PATH: ${SRCTOP}/sys/crypto/chacha20 + +KMOD= chacha20 +SRCS= chacha20.c + +.include From owner-svn-src-head@freebsd.org Sat Apr 15 20:53:52 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6415D3FD75; Sat, 15 Apr 2017 20:53:52 +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 7347AF1F; Sat, 15 Apr 2017 20:53:52 +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 v3FKrpXr023441; Sat, 15 Apr 2017 20:53:51 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3FKrpYU023440; Sat, 15 Apr 2017 20:53:51 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201704152053.v3FKrpYU023440@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 15 Apr 2017 20:53:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316983 - head/usr.bin/zstd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 20:53:52 -0000 Author: bapt Date: Sat Apr 15 20:53:51 2017 New Revision: 316983 URL: https://svnweb.freebsd.org/changeset/base/316983 Log: Add forgotten links for zstdcat and unzstd Modified: head/usr.bin/zstd/Makefile Modified: head/usr.bin/zstd/Makefile ============================================================================== --- head/usr.bin/zstd/Makefile Sat Apr 15 20:51:53 2017 (r316982) +++ head/usr.bin/zstd/Makefile Sat Apr 15 20:53:51 2017 (r316983) @@ -13,6 +13,10 @@ CFLAGS+= -I${SRCTOP}/contrib/zstd/progra -I${SRCTOP}/contrib/zstd/lib/dictBuilder \ -I${SRCTOP}/contrib/zstd/lib \ -DXXH_NAMESPACE=ZSTD_ +LINKS= ${BINDIR}/zstd ${BINDIR}/unzstd \ + ${BINDIR}/zstd ${BINDIR}/zstdcat +MLINKS= zstd.1 unzstd.1 \ + zstd.1 zstdcat.1 WARNS= 2 LIBADD= zstd From owner-svn-src-head@freebsd.org Sat Apr 15 20:55:10 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89FE7D3FE7C; Sat, 15 Apr 2017 20:55:10 +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 5A96D10C3; Sat, 15 Apr 2017 20:55:10 +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 v3FKt9YB023678; Sat, 15 Apr 2017 20:55:09 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3FKt9jt023677; Sat, 15 Apr 2017 20:55:09 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201704152055.v3FKt9jt023677@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 15 Apr 2017 20:55:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316984 - head/usr.bin/less X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 20:55:10 -0000 Author: bapt Date: Sat Apr 15 20:55:09 2017 New Revision: 316984 URL: https://svnweb.freebsd.org/changeset/base/316984 Log: rename zstless into zstdless to be consistent with other zstdcommands Modified: head/usr.bin/less/Makefile Modified: head/usr.bin/less/Makefile ============================================================================== --- head/usr.bin/less/Makefile Sat Apr 15 20:53:51 2017 (r316983) +++ head/usr.bin/less/Makefile Sat Apr 15 20:55:09 2017 (r316984) @@ -13,7 +13,7 @@ LINKS= ${BINDIR}/less ${BINDIR}/more \ ${BINDIR}/zless ${BINDIR}/bzless \ ${BINDIR}/zless ${BINDIR}/xzless \ ${BINDIR}/zless ${BINDIR}/lzless \ - ${BINDIR}/zless ${BINDIR}/zstless + ${BINDIR}/zless ${BINDIR}/zstdless MLINKS= less.1 more.1 CLEANFILES= less.1 From owner-svn-src-head@freebsd.org Sat Apr 15 20:56:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6263CD3FF1C; Sat, 15 Apr 2017 20:56:04 +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 E768C1385; Sat, 15 Apr 2017 20:56:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:470:7a58::1d46:7fe3:2385:fefb] (unknown [IPv6:2001:470:7a58:0:1d46:7fe3:2385:fefb]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 1E21626BB0; Sat, 15 Apr 2017 22:55:54 +0200 (CEST) From: Dimitry Andric Message-Id: <27D3BC32-DEAB-404C-A60B-ABCD00011949@FreeBSD.org> Content-Type: multipart/signed; boundary="Apple-Mail=_9EFBF763-547F-4F0F-AC9E-85B6840AA00E"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r316979 - head/usr.bin/less Date: Sat, 15 Apr 2017 22:55:42 +0200 In-Reply-To: <201704152006.v3FK6Ogw002541@repo.freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Baptiste Daroussin References: <201704152006.v3FK6Ogw002541@repo.freebsd.org> X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 20:56:04 -0000 --Apple-Mail=_9EFBF763-547F-4F0F-AC9E-85B6840AA00E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 15 Apr 2017, at 22:06, Baptiste Daroussin wrote: >=20 > Author: bapt > Date: Sat Apr 15 20:06:24 2017 > New Revision: 316979 > URL: https://svnweb.freebsd.org/changeset/base/316979 >=20 > Log: > Add a zstdless equivalent to zless, bzless xzless >=20 > Modified: > head/usr.bin/less/Makefile > head/usr.bin/less/lesspipe.sh >=20 > Modified: head/usr.bin/less/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/usr.bin/less/Makefile Sat Apr 15 20:05:22 2017 = (r316978) > +++ head/usr.bin/less/Makefile Sat Apr 15 20:06:24 2017 = (r316979) > @@ -12,7 +12,8 @@ LIBADD=3D ncursesw > LINKS=3D ${BINDIR}/less ${BINDIR}/more \ > ${BINDIR}/zless ${BINDIR}/bzless \ > ${BINDIR}/zless ${BINDIR}/xzless \ > - ${BINDIR}/zless ${BINDIR}/lzless > + ${BINDIR}/zless ${BINDIR}/lzless \ > + ${BINDIR}/zless ${BINDIR}/zstless s/zstless/zstdless/ here? -Dimitry --Apple-Mail=_9EFBF763-547F-4F0F-AC9E-85B6840AA00E Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.30 iEYEARECAAYFAljyiNgACgkQsF6jCi4glqNnUgCgkQk6S+ulveE0wvh5lckrp4RG vXQAn1CcKKEpe6zcP7z+sQemAIa/PTYJ =daFb -----END PGP SIGNATURE----- --Apple-Mail=_9EFBF763-547F-4F0F-AC9E-85B6840AA00E-- From owner-svn-src-head@freebsd.org Sat Apr 15 21:12:13 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F98DD3F531; Sat, 15 Apr 2017 21:12:13 +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 E0A091EA5; Sat, 15 Apr 2017 21:12:12 +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 v3FLCBBr030793; Sat, 15 Apr 2017 21:12:11 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3FLCBep030792; Sat, 15 Apr 2017 21:12:11 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201704152112.v3FLCBep030792@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 15 Apr 2017 21:12:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316985 - head/usr.bin/zstd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 21:12:13 -0000 Author: bapt Date: Sat Apr 15 21:12:11 2017 New Revision: 316985 URL: https://svnweb.freebsd.org/changeset/base/316985 Log: Install the zstdgrep shell wrapper Modified: head/usr.bin/zstd/Makefile Modified: head/usr.bin/zstd/Makefile ============================================================================== --- head/usr.bin/zstd/Makefile Sat Apr 15 20:55:09 2017 (r316984) +++ head/usr.bin/zstd/Makefile Sat Apr 15 21:12:11 2017 (r316985) @@ -13,6 +13,7 @@ CFLAGS+= -I${SRCTOP}/contrib/zstd/progra -I${SRCTOP}/contrib/zstd/lib/dictBuilder \ -I${SRCTOP}/contrib/zstd/lib \ -DXXH_NAMESPACE=ZSTD_ +SCRIPTS= zstdgrep LINKS= ${BINDIR}/zstd ${BINDIR}/unzstd \ ${BINDIR}/zstd ${BINDIR}/zstdcat MLINKS= zstd.1 unzstd.1 \ From owner-svn-src-head@freebsd.org Sat Apr 15 21:19:50 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE35DD3F653; Sat, 15 Apr 2017 21:19:50 +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 9118B123; Sat, 15 Apr 2017 21:19:50 +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 v3FLJnMp031648; Sat, 15 Apr 2017 21:19:49 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3FLJnd9031647; Sat, 15 Apr 2017 21:19:49 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201704152119.v3FLJnd9031647@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 15 Apr 2017 21:19:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316986 - in head/contrib/zstd: build lib/dll programs/windres X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 21:19:51 -0000 Author: bapt Date: Sat Apr 15 21:19:49 2017 New Revision: 316986 URL: https://svnweb.freebsd.org/changeset/base/316986 Log: Remove files which seems to confuse the git converter Deleted: head/contrib/zstd/build/ head/contrib/zstd/lib/dll/ head/contrib/zstd/programs/windres/ From owner-svn-src-head@freebsd.org Sat Apr 15 22:35:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2EE2D3FFB4; Sat, 15 Apr 2017 22:35:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [96.47.72.37]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B652B12FC; Sat, 15 Apr 2017 22:35:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3FMYMgc064412; Sat, 15 Apr 2017 22:34:22 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3FMYMCB064410; Sat, 15 Apr 2017 22:34:22 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201704152234.v3FMYMCB064410@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 15 Apr 2017 22:34:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316989 - head/contrib/llvm/lib/Target/X86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 22:35:39 -0000 Author: dim Date: Sat Apr 15 22:34:22 2017 New Revision: 316989 URL: https://svnweb.freebsd.org/changeset/base/316989 Log: Pull in r300404 from upstream llvm trunk (by me): Use correct registers for "A" inline asm constraint Summary: In PR32594, inline assembly using the 'A' constraint on x86_64 causes llvm to crash with a "Cannot select" stack trace. This is because `X86TargetLowering::getRegForInlineAsmConstraint` hardcodes that 'A' means the EAX and EDX registers. However, on x86_64 it means the RAX and RDX registers, and on 16-bit x86 (ia16?) it means the old AX and DX registers. Add new register classes in `X86RegisterInfo.td` to support these cases, and amend the logic in `getRegForInlineAsmConstraint` to cope with different subtargets. Also add a test case, derived from PR32594. Reviewers: craig.topper, qcolombet, RKSimon, ab Reviewed By: ab Subscribers: ab, emaste, royger, llvm-commits Differential Revision: https://reviews.llvm.org/D31902 This should fix crashes when using the 'A' constraint on amd64, for example as it is being used in Xen. Reported by: royger MFC after: 3 days Modified: head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp head/contrib/llvm/lib/Target/X86/X86RegisterInfo.td Modified: head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp ============================================================================== --- head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp Sat Apr 15 21:33:44 2017 (r316988) +++ head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp Sat Apr 15 22:34:22 2017 (r316989) @@ -34717,10 +34717,20 @@ X86TargetLowering::getRegForInlineAsmCon return Res; } - // 'A' means EAX + EDX. + // 'A' means [ER]AX + [ER]DX. if (Constraint == "A") { - Res.first = X86::EAX; - Res.second = &X86::GR32_ADRegClass; + if (Subtarget.is64Bit()) { + Res.first = X86::RAX; + Res.second = &X86::GR64_ADRegClass; + } else if (Subtarget.is32Bit()) { + Res.first = X86::EAX; + Res.second = &X86::GR32_ADRegClass; + } else if (Subtarget.is16Bit()) { + Res.first = X86::AX; + Res.second = &X86::GR16_ADRegClass; + } else { + llvm_unreachable("Expecting 64, 32 or 16 bit subtarget"); + } return Res; } return Res; Modified: head/contrib/llvm/lib/Target/X86/X86RegisterInfo.td ============================================================================== --- head/contrib/llvm/lib/Target/X86/X86RegisterInfo.td Sat Apr 15 21:33:44 2017 (r316988) +++ head/contrib/llvm/lib/Target/X86/X86RegisterInfo.td Sat Apr 15 22:34:22 2017 (r316989) @@ -437,8 +437,10 @@ def LOW32_ADDR_ACCESS : RegisterClass<"X def LOW32_ADDR_ACCESS_RBP : RegisterClass<"X86", [i32], 32, (add LOW32_ADDR_ACCESS, RBP)>; -// A class to support the 'A' assembler constraint: EAX then EDX. +// A class to support the 'A' assembler constraint: [ER]AX then [ER]DX. +def GR16_AD : RegisterClass<"X86", [i16], 16, (add AX, DX)>; def GR32_AD : RegisterClass<"X86", [i32], 32, (add EAX, EDX)>; +def GR64_AD : RegisterClass<"X86", [i64], 64, (add RAX, RDX)>; // Scalar SSE2 floating point registers. def FR32 : RegisterClass<"X86", [f32], 32, (sequence "XMM%u", 0, 15)>; From owner-svn-src-head@freebsd.org Sat Apr 15 22:42:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0B024D3F238; Sat, 15 Apr 2017 22:42:25 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB9E71988; Sat, 15 Apr 2017 22:42:24 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3FMgNhm068155; Sat, 15 Apr 2017 22:42:23 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3FMgNIN068154; Sat, 15 Apr 2017 22:42:23 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201704152242.v3FMgNIN068154@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Sat, 15 Apr 2017 22:42:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316990 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 22:42:25 -0000 Author: neel Date: Sat Apr 15 22:42:23 2017 New Revision: 316990 URL: https://svnweb.freebsd.org/changeset/base/316990 Log: Due to time constraints remove myself as a vmm(4) maintainer. Modified: head/MAINTAINERS Modified: head/MAINTAINERS ============================================================================== --- head/MAINTAINERS Sat Apr 15 22:34:22 2017 (r316989) +++ head/MAINTAINERS Sat Apr 15 22:42:23 2017 (r316990) @@ -100,7 +100,7 @@ usr.sbin/bsdconfig dteske Pre-commit pha usr.sbin/dpv dteske Pre-commit review requested. Keep in sync with libdpv. usr.sbin/pkg pkg@ Please coordinate behavior or flag changes with pkg team. usr.sbin/sysrc dteske Pre-commit phabricator review requested. Keep in sync with bsdconfig(8) sysrc.subr. -vmm(4) neel,grehan Pre-commit review requested. +vmm(4) grehan Pre-commit review requested. autofs(5) trasz Pre-commit review recommended. iscsi(4) trasz Pre-commit review recommended. rctl(8) trasz Pre-commit review recommended. From owner-svn-src-head@freebsd.org Sat Apr 15 22:57:29 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ABDB3D3F813; Sat, 15 Apr 2017 22:57:29 +0000 (UTC) (envelope-from rizzo.unipi@gmail.com) Received: from mail-io0-x22c.google.com (mail-io0-x22c.google.com [IPv6:2607:f8b0:4001:c06::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 73F9D688; Sat, 15 Apr 2017 22:57:29 +0000 (UTC) (envelope-from rizzo.unipi@gmail.com) Received: by mail-io0-x22c.google.com with SMTP id k87so107654920ioi.0; Sat, 15 Apr 2017 15:57:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=OWtmZI9sf3A3VqmNufh3ckeDqMK/qXVEZPLGD6HwSDY=; b=ipH8mWdaul0UslTF9N4e52zo6ojusIat5jyG6FTLeFY3AvYBcT+GV9A8vg4k9aBvIR aaJnIy0wUqWkJyFuX24MIGI4i+5r8WXZzOvRHin6TrkX1WipQIiKK4aV7YcGk6jRvps0 BOzGikc8RTBGCFDgzlwWHCPx3Rmrp5wum/oLekkD6x2ScjYcJtqxVClN8rtxaPvplsdK ClUhzNcf4P5vpmuRk8obXA1wqDOWB8ovD7WjWYTcnsFWyOUaJ9Urn0LYm+jVt/Sls2ma Zezp5IMk6lljPe6JjjhxQOraEYEg1xJr5e6Emw80qTKakthNUXM0mYexsXeFCB85/j3e eOwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=OWtmZI9sf3A3VqmNufh3ckeDqMK/qXVEZPLGD6HwSDY=; b=fA+7DvrN0M3nEyPwSbd/iwkqJI8wBF/696Wtwiw1tv+n4XwE1nc2zYCCMjDTbBHL+/ dj9NRuCcGhfULwLrEmRWTPsaL33knc39Vdxc15AZa3YtAYYghXR/VNkLtGQP0USpLpQa HCZOPi6uL+b+fw4TinZMHNCFmGBUKQLI+IuH+D1ENhwA/UiA3fwGUQpNPMwuwrruagxr mfnwzRpCrdOpNcTIg67WQFzMrNepigF0Ub8N9WrozyZJoiKAPExKnqvCGefUsLPNJaMZ pZ2aWb8knP6/H5Wcl1jicm6hWzPks+4gAF3McA8E80J8Db8a3nvk4xSOKk7syUrbixzH hrug== X-Gm-Message-State: AN3rC/6AGbIPKlAy5YdxQfyz/p/CsY+Hnb8QfL6hLSnniRVhqzlDzJUC 04TjdgqgR/9hySAYfvl9LHUuIOPYJw== X-Received: by 10.107.156.200 with SMTP id f191mr3713256ioe.9.1492297048711; Sat, 15 Apr 2017 15:57:28 -0700 (PDT) MIME-Version: 1.0 Sender: rizzo.unipi@gmail.com Received: by 10.107.173.165 with HTTP; Sat, 15 Apr 2017 15:57:27 -0700 (PDT) In-Reply-To: <201704152242.v3FMgNIN068154@repo.freebsd.org> References: <201704152242.v3FMgNIN068154@repo.freebsd.org> From: Luigi Rizzo Date: Sat, 15 Apr 2017 15:57:27 -0700 X-Google-Sender-Auth: EHWlRKKr3d3Wn8g7JHgVL6ipxZ4 Message-ID: Subject: Re: svn commit: r316990 - head To: Neel Natu Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 22:57:29 -0000 On Sunday, April 16, 2017, Neel Natu wrote: > Author: neel > Date: Sat Apr 15 22:42:23 2017 > New Revision: 316990 > URL: https://svnweb.freebsd.org/changeset/base/316990 > > Log: > Due to time constraints remove myself as a vmm(4) maintainer. Too bad, when i saw the email I was going to reply "welcome back!" > Modified: > head/MAINTAINERS > > Modified: head/MAINTAINERS > ============================================================ > ================== > --- head/MAINTAINERS Sat Apr 15 22:34:22 2017 (r316989) > +++ head/MAINTAINERS Sat Apr 15 22:42:23 2017 (r316990) > @@ -100,7 +100,7 @@ usr.sbin/bsdconfig dteske Pre-commit pha > usr.sbin/dpv dteske Pre-commit review requested. Keep in sync with > libdpv. > usr.sbin/pkg pkg@ Please coordinate behavior or flag changes with > pkg team. > usr.sbin/sysrc dteske Pre-commit phabricator review requested. Keep in > sync with bsdconfig(8) sysrc.subr. > -vmm(4) neel,grehan Pre-commit review requested. > +vmm(4) grehan Pre-commit review requested. > autofs(5) trasz Pre-commit review recommended. > iscsi(4) trasz Pre-commit review recommended. > rctl(8) trasz Pre-commit review recommended. > > -- -----------------------------------------+------------------------------- Prof. Luigi RIZZO, rizzo@iet.unipi.it . Dip. di Ing. dell'Informazione http://www.iet.unipi.it/~luigi/ . Universita` di Pisa TEL +39-050-2217533 . via Diotisalvi 2 Mobile +39-338-6809875 . 56122 PISA (Italy) -----------------------------------------+------------------------------- From owner-svn-src-head@freebsd.org Sat Apr 15 23:34:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92145D3F010; Sat, 15 Apr 2017 23:34:06 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 62523175; Sat, 15 Apr 2017 23:34:06 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3FNY5uL088004; Sat, 15 Apr 2017 23:34:05 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3FNY51Z088003; Sat, 15 Apr 2017 23:34:05 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201704152334.v3FNY51Z088003@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sat, 15 Apr 2017 23:34:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316991 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 23:34:06 -0000 Author: cy Date: Sat Apr 15 23:34:05 2017 New Revision: 316991 URL: https://svnweb.freebsd.org/changeset/base/316991 Log: Clean up extraneous brackets. Modified: head/sys/contrib/ipfilter/netinet/ip_state.c Modified: head/sys/contrib/ipfilter/netinet/ip_state.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_state.c Sat Apr 15 22:42:23 2017 (r316990) +++ head/sys/contrib/ipfilter/netinet/ip_state.c Sat Apr 15 23:34:05 2017 (r316991) @@ -3414,8 +3414,8 @@ ipf_state_check(fin, passp) * If this packet is a fragment and the rule says to track fragments, * then create a new fragment cache entry. */ - if (((fin->fin_flx & FI_FRAG) && FR_ISPASS(is->is_pass)) && - ((is->is_pass & FR_KEEPFRAG))) + if (fin->fin_flx & FI_FRAG && FR_ISPASS(is->is_pass) && + is->is_pass & FR_KEEPFRAG) (void) ipf_frag_new(softc, fin, is->is_pass); /* From owner-svn-src-head@freebsd.org Sat Apr 15 23:37:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A255D3F0D8; Sat, 15 Apr 2017 23:37:06 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B4D7E688; Sat, 15 Apr 2017 23:37:05 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v3FNb2u1014054; Sat, 15 Apr 2017 16:37:02 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v3FNb2m1014053; Sat, 15 Apr 2017 16:37:02 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201704152337.v3FNb2m1014053@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r316978 - in head: contrib/zstd etc/mtree lib lib/libzstd share/mk usr.bin usr.bin/zstd In-Reply-To: <201704152005.v3FK5M2j002459@repo.freebsd.org> To: Baptiste Daroussin Date: Sat, 15 Apr 2017 16:37:02 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 23:37:06 -0000 And we need this in base for what great purpose??? > Author: bapt > Date: Sat Apr 15 20:05:22 2017 > New Revision: 316978 > URL: https://svnweb.freebsd.org/changeset/base/316978 > > Log: > Import zstandard 1.1.4 in base > > zstandard is a new compression library/tool which is very fast at > compression/decompression > > For now import as a private library > > Added: > head/contrib/zstd/ > - copied from r316976, vendor/zstd/dist/ > head/lib/libzstd/ > head/lib/libzstd/Makefile (contents, props changed) > head/usr.bin/zstd/ > head/usr.bin/zstd/Makefile (contents, props changed) > Modified: > head/etc/mtree/BSD.usr.dist > head/lib/Makefile > head/share/mk/src.libnames.mk > head/usr.bin/Makefile > > Modified: head/etc/mtree/BSD.usr.dist > ============================================================================== > --- head/etc/mtree/BSD.usr.dist Sat Apr 15 20:03:50 2017 (r316977) > +++ head/etc/mtree/BSD.usr.dist Sat Apr 15 20:05:22 2017 (r316978) > @@ -17,6 +17,8 @@ > .. > ucl > .. > + zstd > + .. > .. > .. > lib > > Modified: head/lib/Makefile > ============================================================================== > --- head/lib/Makefile Sat Apr 15 20:03:50 2017 (r316977) > +++ head/lib/Makefile Sat Apr 15 20:05:22 2017 (r316978) > @@ -90,6 +90,7 @@ SUBDIR= ${SUBDIR_BOOTSTRAP} \ > libxo \ > liby \ > libz \ > + libzstd \ > ncurses > > # Inter-library dependencies. When the makefile for a library contains LDADD > > Added: head/lib/libzstd/Makefile > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/lib/libzstd/Makefile Sat Apr 15 20:05:22 2017 (r316978) > @@ -0,0 +1,34 @@ > +# $FreeBSD$ > + > +LIB= zstd > +SRCS= entropy_common.c \ > + error_private.c \ > + fse_decompress.c \ > + pool.c \ > + threading.c \ > + xxhash.c \ > + zstd_common.c \ > + fse_compress.c \ > + huf_compress.c \ > + zstd_compress.c \ > + zstdmt_compress.c \ > + huf_decompress.c \ > + zstd_decompress.c \ > + zbuff_common.c \ > + zbuff_compress.c \ > + zbuff_decompress.c \ > + cover.c \ > + divsufsort.c \ > + zdict.c > +WARNS= 2 > +INCS= zstd.h > +CFLAGS+= -I${ZSTDDIR}/lib -I${ZSTDDIR}/lib/common -DXXH_NAMESPACE=ZSTD_ > + > +PRIVATELIB= yes > + > +ZSTDDIR= ${SRCTOP}/contrib/zstd > +.PATH: ${ZSTDDIR}/lib/common ${ZSTDDIR}/lib/compress \ > + ${ZSTDDIR}/lib/decompress ${ZSTDDIR}/lib/deprecated \ > + ${ZSTDDIR}/lib/dictBuilder ${ZSTDDIR}/lib > + > +.include > > Modified: head/share/mk/src.libnames.mk > ============================================================================== > --- head/share/mk/src.libnames.mk Sat Apr 15 20:03:50 2017 (r316977) > +++ head/share/mk/src.libnames.mk Sat Apr 15 20:05:22 2017 (r316978) > @@ -24,7 +24,8 @@ _PRIVATELIBS= \ > sqlite3 \ > ssh \ > ucl \ > - unbound > + unbound \ > + zstd > > _INTERNALLIBS= \ > amu \ > > Modified: head/usr.bin/Makefile > ============================================================================== > --- head/usr.bin/Makefile Sat Apr 15 20:03:50 2017 (r316977) > +++ head/usr.bin/Makefile Sat Apr 15 20:05:22 2017 (r316978) > @@ -189,7 +189,8 @@ SUBDIR= alias \ > xo \ > xz \ > xzdec \ > - yes > + yes \ > + zstd > > # NB: keep these sorted by MK_* knobs > > > Added: head/usr.bin/zstd/Makefile > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.bin/zstd/Makefile Sat Apr 15 20:05:22 2017 (r316978) > @@ -0,0 +1,21 @@ > +# $FreeBSD$ > + > +PROG= zstd > +SRCS= bench.c \ > + datagen.c \ > + dibio.c \ > + fileio.c \ > + zstdcli.c > + > +CFLAGS+= -I${SRCTOP}/contrib/zstd/programs \ > + -I${SRCTOP}/contrib/zstd/lib/common \ > + -I${SRCTOP}/contrib/zstd/lib/compress \ > + -I${SRCTOP}/contrib/zstd/lib/dictBuilder \ > + -I${SRCTOP}/contrib/zstd/lib \ > + -DXXH_NAMESPACE=ZSTD_ > + > +WARNS= 2 > +LIBADD= zstd > +.PATH: ${SRCTOP}/contrib/zstd/programs > + > +.include > > -- Rod Grimes rgrimes@freebsd.org