From owner-svn-src-stable@freebsd.org Sun Aug 12 00:33:26 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F12791057E78; Sun, 12 Aug 2018 00:33:25 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 93D74973A2; Sun, 12 Aug 2018 00:33:25 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6F50B1EAC9; Sun, 12 Aug 2018 00:33:25 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7C0XPTe072039; Sun, 12 Aug 2018 00:33:25 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7C0XOEj072036; Sun, 12 Aug 2018 00:33:24 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201808120033.w7C0XOEj072036@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 12 Aug 2018 00:33:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337668 - in stable/11/sys: amd64/amd64 dev/efidev sys X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable/11/sys: amd64/amd64 dev/efidev sys X-SVN-Commit-Revision: 337668 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Aug 2018 00:33:26 -0000 Author: kevans Date: Sun Aug 12 00:33:24 2018 New Revision: 337668 URL: https://svnweb.freebsd.org/changeset/base/337668 Log: MFC r337331: efirt: Don't enter EFI context early, convert addrs to KVA efi_enter here was needed because efi_runtime dereference causes a fault outside of EFI context, due to runtime table living in runtime service space. This may cause problems early in boot, though, so instead access it by converting paddr to KVA for access. While here, remove the other direct PHYS_TO_DMAP calls and the explicit DMAP requirement from efidev. Modified: stable/11/sys/amd64/amd64/efirt_machdep.c stable/11/sys/dev/efidev/efirt.c stable/11/sys/sys/efi.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/efirt_machdep.c ============================================================================== --- stable/11/sys/amd64/amd64/efirt_machdep.c Sun Aug 12 00:09:52 2018 (r337667) +++ stable/11/sys/amd64/amd64/efirt_machdep.c Sun Aug 12 00:33:24 2018 (r337668) @@ -85,6 +85,19 @@ efi_destroy_1t1_map(void) efi_pml4_page = NULL; } +/* + * Map a physical address from EFI runtime space into KVA space. Returns 0 to + * indicate a failed mapping so that the caller may handle error. + */ +vm_offset_t +efi_phys_to_kva(vm_paddr_t paddr) +{ + + if (paddr >= dmaplimit) + return (0); + return (PHYS_TO_DMAP(paddr)); +} + static vm_page_t efi_1t1_page(void) { Modified: stable/11/sys/dev/efidev/efirt.c ============================================================================== --- stable/11/sys/dev/efidev/efirt.c Sun Aug 12 00:09:52 2018 (r337667) +++ stable/11/sys/dev/efidev/efirt.c Sun Aug 12 00:33:24 2018 (r337668) @@ -131,9 +131,10 @@ efi_init(void) { struct efi_map_header *efihdr; struct efi_md *map; + struct efi_rt *rtdm; caddr_t kmdp; size_t efisz; - int rt_disabled; + int ndesc, rt_disabled; rt_disabled = 0; TUNABLE_INT_FETCH("efi.rt.disabled", &rt_disabled); @@ -146,8 +147,9 @@ efi_init(void) printf("EFI systbl not available\n"); return (0); } - efi_systbl = (struct efi_systbl *)PHYS_TO_DMAP(efi_systbl_phys); - if (efi_systbl->st_hdr.th_sig != EFI_SYSTBL_SIG) { + + efi_systbl = (struct efi_systbl *)efi_phys_to_kva(efi_systbl_phys); + if (efi_systbl == NULL || efi_systbl->st_hdr.th_sig != EFI_SYSTBL_SIG) { efi_systbl = NULL; if (bootverbose) printf("EFI systbl signature invalid\n"); @@ -175,8 +177,8 @@ efi_init(void) if (efihdr->descriptor_size == 0) return (ENOMEM); - if (!efi_create_1t1_map(map, efihdr->memory_size / - efihdr->descriptor_size, efihdr->descriptor_size)) { + ndesc = efihdr->memory_size / efihdr->descriptor_size; + if (!efi_create_1t1_map(map, ndesc, efihdr->descriptor_size)) { if (bootverbose) printf("EFI cannot create runtime map\n"); return (ENOMEM); @@ -191,6 +193,7 @@ efi_init(void) return (ENXIO); } +#if defined(__aarch64__) || defined(__amd64__) /* * Some UEFI implementations have multiple implementations of the * RS->GetTime function. They switch from one we can only use early @@ -198,14 +201,10 @@ efi_init(void) * call RS->SetVirtualAddressMap. As this is not always the case, e.g. * with an old loader.efi, check if the RS->GetTime function is within * the EFI map, and fail to attach if not. - * - * We need to enter into the EFI environment as efi_runtime may point - * to an EFI address. */ - efi_enter(); - if (!efi_is_in_map(map, efihdr->memory_size / efihdr->descriptor_size, - efihdr->descriptor_size, (vm_offset_t)efi_runtime->rt_gettime)) { - efi_leave(); + rtdm = (struct efi_rt *)efi_phys_to_kva((uintptr_t)efi_runtime); + if (rtdm == NULL || !efi_is_in_map(map, ndesc, efihdr->descriptor_size, + (vm_offset_t)rtdm->rt_gettime)) { if (bootverbose) printf( "EFI runtime services table has an invalid pointer\n"); @@ -213,7 +212,7 @@ efi_init(void) efi_destroy_1t1_map(); return (ENXIO); } - efi_leave(); +#endif return (0); } @@ -292,7 +291,7 @@ efi_get_table(struct uuid *uuid, void **ptr) ct = efi_cfgtbl; while (count--) { if (!bcmp(&ct->ct_uuid, uuid, sizeof(*uuid))) { - *ptr = (void *)PHYS_TO_DMAP(ct->ct_data); + *ptr = (void *)efi_phys_to_kva(ct->ct_data); return (0); } ct++; Modified: stable/11/sys/sys/efi.h ============================================================================== --- stable/11/sys/sys/efi.h Sun Aug 12 00:09:52 2018 (r337667) +++ stable/11/sys/sys/efi.h Sun Aug 12 00:33:24 2018 (r337668) @@ -172,6 +172,7 @@ extern vm_paddr_t efi_systbl_phys; /* Internal MD EFI functions */ int efi_arch_enter(void); void efi_arch_leave(void); +vm_offset_t efi_phys_to_kva(vm_paddr_t); bool efi_create_1t1_map(struct efi_md *, int, int); void efi_destroy_1t1_map(void); From owner-svn-src-stable@freebsd.org Sun Aug 12 03:22:29 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1BB9D1061863; Sun, 12 Aug 2018 03:22:29 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C428A75A32; Sun, 12 Aug 2018 03:22:28 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A4BDA20838; Sun, 12 Aug 2018 03:22:28 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7C3MSYC062077; Sun, 12 Aug 2018 03:22:28 GMT (envelope-from truckman@FreeBSD.org) Received: (from truckman@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7C3MSgD062076; Sun, 12 Aug 2018 03:22:28 GMT (envelope-from truckman@FreeBSD.org) Message-Id: <201808120322.w7C3MSgD062076@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: truckman set sender to truckman@FreeBSD.org using -f From: Don Lewis Date: Sun, 12 Aug 2018 03:22:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337678 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: truckman X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 337678 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Aug 2018 03:22:29 -0000 Author: truckman Date: Sun Aug 12 03:22:28 2018 New Revision: 337678 URL: https://svnweb.freebsd.org/changeset/base/337678 Log: MFC r336855 Fix the long term ULE load balancer so that it actually works. The initial call to sched_balance() during startup is meant to initialize balance_ticks, but does not actually do that since smp_started is still zero at that time. Since balance_ticks does not get set, there are no further calls to sched_balance(). Fix this by setting balance_ticks in sched_initticks() since we know the value of balance_interval at that time, and eliminate the useless startup call to sched_balance(). We don't need to randomize the intial value of balance_ticks. Since there is now only one call to sched_balance(), we can hoist the tests at the top of this function out to the caller and avoid the overhead of the function call when running a SMP kernel on UP hardware. PR: 223914 Reviewed by: kib Modified: stable/11/sys/kern/sched_ule.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/sched_ule.c ============================================================================== --- stable/11/sys/kern/sched_ule.c Sun Aug 12 03:15:30 2018 (r337677) +++ stable/11/sys/kern/sched_ule.c Sun Aug 12 03:22:28 2018 (r337678) @@ -882,9 +882,6 @@ sched_balance(void) { struct tdq *tdq; - if (smp_started == 0 || rebalance == 0) - return; - balance_ticks = max(balance_interval / 2, 1) + (sched_random() % balance_interval); tdq = TDQ_SELF(); @@ -1408,7 +1405,6 @@ sched_setup_smp(void) panic("Can't find cpu group for %d\n", i); } balance_tdq = TDQ_SELF(); - sched_balance(); } #endif @@ -1469,6 +1465,7 @@ sched_initticks(void *dummy) * what realstathz is. */ balance_interval = realstathz; + balance_ticks = balance_interval; affinity = SCHED_AFFINITY_DEFAULT; #endif if (sched_idlespinthresh < 0) @@ -2384,7 +2381,7 @@ sched_clock(struct thread *td) /* * We run the long term load balancer infrequently on the first cpu. */ - if (balance_tdq == tdq) { + if (balance_tdq == tdq && smp_started != 0 && rebalance != 0) { if (balance_ticks && --balance_ticks == 0) sched_balance(); } From owner-svn-src-stable@freebsd.org Sun Aug 12 08:42:07 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A74D310691FA; Sun, 12 Aug 2018 08:42:07 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 589A97F1A7; Sun, 12 Aug 2018 08:42:07 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3967F23C29; Sun, 12 Aug 2018 08:42:07 +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 w7C8g7D8026830; Sun, 12 Aug 2018 08:42:07 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7C8g6EC026827; Sun, 12 Aug 2018 08:42:06 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201808120842.w7C8g6EC026827@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 12 Aug 2018 08:42:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337681 - in stable/11: . lib/ofed/libibverbs lib/ofed/libmlx5 X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/11: . lib/ofed/libibverbs lib/ofed/libmlx5 X-SVN-Commit-Revision: 337681 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Aug 2018 08:42:07 -0000 Author: kib Date: Sun Aug 12 08:42:06 2018 New Revision: 337681 URL: https://svnweb.freebsd.org/changeset/base/337681 Log: MFC r336568: Move OFED libraries libmlx5.so.1 and libibverbs.so.1 to /lib. Modified: stable/11/ObsoleteFiles.inc stable/11/lib/ofed/libibverbs/Makefile stable/11/lib/ofed/libmlx5/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/ObsoleteFiles.inc ============================================================================== --- stable/11/ObsoleteFiles.inc Sun Aug 12 07:47:44 2018 (r337680) +++ stable/11/ObsoleteFiles.inc Sun Aug 12 08:42:06 2018 (r337681) @@ -38,6 +38,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20180812: move of libmlx5.so.1 and libibverbs.so.1 +OLD_LIBS+=usr/lib/libmlx5.so.1 +OLD_LIBS+=usr/lib/libibverbs.so.1 # 20180714: new clang import which bumps version from 6.0.0 to 6.0.1. OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/allocator_interface.h OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/asan_interface.h Modified: stable/11/lib/ofed/libibverbs/Makefile ============================================================================== --- stable/11/lib/ofed/libibverbs/Makefile Sun Aug 12 07:47:44 2018 (r337680) +++ stable/11/lib/ofed/libibverbs/Makefile Sun Aug 12 08:42:06 2018 (r337681) @@ -5,7 +5,7 @@ _spath= ${SRCTOP}/contrib/ofed/libibverbs LIB= ibverbs SHLIB_MAJOR= 1 -SHLIBDIR?= /usr/lib +SHLIBDIR?= /lib MK_PROFILE= no VERSION_MAP= ${_spath}/libibverbs.map Modified: stable/11/lib/ofed/libmlx5/Makefile ============================================================================== --- stable/11/lib/ofed/libmlx5/Makefile Sun Aug 12 07:47:44 2018 (r337680) +++ stable/11/lib/ofed/libmlx5/Makefile Sun Aug 12 08:42:06 2018 (r337681) @@ -3,7 +3,7 @@ _spath= ${SRCTOP}/contrib/ofed/libmlx5 .PATH: ${_spath} -SHLIBDIR?= /usr/lib +SHLIBDIR?= /lib LIB= mlx5 SHLIB_MAJOR= 1 MK_PROFILE= no From owner-svn-src-stable@freebsd.org Sun Aug 12 08:45:24 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4AB21069341; Sun, 12 Aug 2018 08:45:24 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 59CE07F3A0; Sun, 12 Aug 2018 08:45:24 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3AF9C23C55; Sun, 12 Aug 2018 08:45:24 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7C8jOBw027746; Sun, 12 Aug 2018 08:45:24 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7C8jNQU027742; Sun, 12 Aug 2018 08:45:23 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201808120845.w7C8jNQU027742@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 12 Aug 2018 08:45:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337682 - in stable/11: share/mk tools/build/options usr.bin/ofed usr.bin/ofed/infiniband-diags X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/11: share/mk tools/build/options usr.bin/ofed usr.bin/ofed/infiniband-diags X-SVN-Commit-Revision: 337682 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Aug 2018 08:45:24 -0000 Author: kib Date: Sun Aug 12 08:45:23 2018 New Revision: 337682 URL: https://svnweb.freebsd.org/changeset/base/337682 Log: MFC r336569: Move mostly useless examples binaries from OFED, as well as the Subnet Manager, under the new option WITH_OFED_EXTRA, disabled by default. Added: stable/11/tools/build/options/WITH_OFED_EXTRA - copied unchanged from r336569, head/tools/build/options/WITH_OFED_EXTRA Modified: stable/11/share/mk/src.opts.mk stable/11/usr.bin/ofed/Makefile stable/11/usr.bin/ofed/infiniband-diags/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/share/mk/src.opts.mk ============================================================================== --- stable/11/share/mk/src.opts.mk Sun Aug 12 08:42:06 2018 (r337681) +++ stable/11/share/mk/src.opts.mk Sun Aug 12 08:45:23 2018 (r337682) @@ -197,6 +197,7 @@ __DEFAULT_NO_OPTIONS = \ LOADER_FORCE_LE \ NAND \ OFED \ + OFED_EXTRA \ OPENLDAP \ REPRODUCIBLE_BUILD \ RPCBIND_WARMSTART_SUPPORT \ @@ -400,6 +401,10 @@ MK_NLS_CATALOGS:= no .if ${MK_OPENSSL} == "no" MK_OPENSSH:= no MK_KERBEROS:= no +.endif + +.if ${MK_OFED} == "no" +MK_OFED_EXTRA:= no .endif .if ${MK_PF} == "no" Copied: stable/11/tools/build/options/WITH_OFED_EXTRA (from r336569, head/tools/build/options/WITH_OFED_EXTRA) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/tools/build/options/WITH_OFED_EXTRA Sun Aug 12 08:45:23 2018 (r337682, copy of r336569, head/tools/build/options/WITH_OFED_EXTRA) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to build the non-essential components of the +.Dq "OpenFabrics Enterprise Distribution" +Infiniband software stack, mostly examples. Modified: stable/11/usr.bin/ofed/Makefile ============================================================================== --- stable/11/usr.bin/ofed/Makefile Sun Aug 12 08:42:06 2018 (r337681) +++ stable/11/usr.bin/ofed/Makefile Sun Aug 12 08:45:23 2018 (r337682) @@ -1,10 +1,13 @@ # $FreeBSD$ +.include + SUBDIR= \ libibverbs \ librdmacm \ - opensm \ infiniband-diags + +SUBDIR.${MK_OFED_EXTRA}+= opensm SUBDIR_PARALLEL= Modified: stable/11/usr.bin/ofed/infiniband-diags/Makefile ============================================================================== --- stable/11/usr.bin/ofed/infiniband-diags/Makefile Sun Aug 12 08:42:06 2018 (r337681) +++ stable/11/usr.bin/ofed/infiniband-diags/Makefile Sun Aug 12 08:45:23 2018 (r337682) @@ -1,27 +1,33 @@ # $FreeBSD$ +.include + SUBDIR= \ -dump_fts \ -ibaddr \ -ibcacheedit \ -ibccconfig \ -ibccquery \ -iblinkinfo \ -ibmirror \ -ibnetdiscover \ -ibping \ -ibportstate \ -ibqueryerrors \ -ibroute \ -ibstat \ -ibsysstat \ -ibtracert \ -perfquery \ -saquery \ -sminfo \ -smpdump \ -smpquery \ -vendstat + ibstat + +.if ${MK_OFED_EXTRA} != "no" +SUBDIR+= \ + dump_fts \ + ibaddr \ + ibcacheedit \ + ibccconfig \ + ibccquery \ + iblinkinfo \ + ibmirror \ + ibnetdiscover \ + ibping \ + ibportstate \ + ibqueryerrors \ + ibroute \ + ibsysstat \ + ibtracert \ + perfquery \ + saquery \ + sminfo \ + smpdump \ + smpquery \ + vendstat +.endif SUBDIR_PARALLEL= From owner-svn-src-stable@freebsd.org Sun Aug 12 15:51:00 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68AA71074A27; Sun, 12 Aug 2018 15:51:00 +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 C10E68DA77; Sun, 12 Aug 2018 15:50:59 +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 w7CFovnW033113; Sun, 12 Aug 2018 08:50: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 w7CFovDw033112; Sun, 12 Aug 2018 08:50:57 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201808121550.w7CFovDw033112@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r337682 - in stable/11: share/mk tools/build/options usr.bin/ofed usr.bin/ofed/infiniband-diags In-Reply-To: <201808120845.w7C8jNQU027742@repo.freebsd.org> To: Konstantin Belousov Date: Sun, 12 Aug 2018 08:50:57 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@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-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Aug 2018 15:51:00 -0000 > Author: kib > Date: Sun Aug 12 08:45:23 2018 > New Revision: 337682 > URL: https://svnweb.freebsd.org/changeset/base/337682 > > Log: > MFC r336569: > Move mostly useless examples binaries from OFED, as well as the Subnet > Manager, under the new option WITH_OFED_EXTRA, disabled by default. I never got a response on putting opensm out from under _EXTRA. > Added: > stable/11/tools/build/options/WITH_OFED_EXTRA > - copied unchanged from r336569, head/tools/build/options/WITH_OFED_EXTRA > Modified: > stable/11/share/mk/src.opts.mk > stable/11/usr.bin/ofed/Makefile > stable/11/usr.bin/ofed/infiniband-diags/Makefile > Directory Properties: > stable/11/ (props changed) > > Modified: stable/11/share/mk/src.opts.mk > ============================================================================== > --- stable/11/share/mk/src.opts.mk Sun Aug 12 08:42:06 2018 (r337681) > +++ stable/11/share/mk/src.opts.mk Sun Aug 12 08:45:23 2018 (r337682) > @@ -197,6 +197,7 @@ __DEFAULT_NO_OPTIONS = \ > LOADER_FORCE_LE \ > NAND \ > OFED \ > + OFED_EXTRA \ > OPENLDAP \ > REPRODUCIBLE_BUILD \ > RPCBIND_WARMSTART_SUPPORT \ > @@ -400,6 +401,10 @@ MK_NLS_CATALOGS:= no > .if ${MK_OPENSSL} == "no" > MK_OPENSSH:= no > MK_KERBEROS:= no > +.endif > + > +.if ${MK_OFED} == "no" > +MK_OFED_EXTRA:= no > .endif > > .if ${MK_PF} == "no" > > Copied: stable/11/tools/build/options/WITH_OFED_EXTRA (from r336569, head/tools/build/options/WITH_OFED_EXTRA) > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ stable/11/tools/build/options/WITH_OFED_EXTRA Sun Aug 12 08:45:23 2018 (r337682, copy of r336569, head/tools/build/options/WITH_OFED_EXTRA) > @@ -0,0 +1,4 @@ > +.\" $FreeBSD$ > +Set to build the non-essential components of the > +.Dq "OpenFabrics Enterprise Distribution" > +Infiniband software stack, mostly examples. > > Modified: stable/11/usr.bin/ofed/Makefile > ============================================================================== > --- stable/11/usr.bin/ofed/Makefile Sun Aug 12 08:42:06 2018 (r337681) > +++ stable/11/usr.bin/ofed/Makefile Sun Aug 12 08:45:23 2018 (r337682) > @@ -1,10 +1,13 @@ > # $FreeBSD$ > > +.include > + > SUBDIR= \ > libibverbs \ > librdmacm \ > - opensm \ > infiniband-diags > + > +SUBDIR.${MK_OFED_EXTRA}+= opensm > > SUBDIR_PARALLEL= > > > Modified: stable/11/usr.bin/ofed/infiniband-diags/Makefile > ============================================================================== > --- stable/11/usr.bin/ofed/infiniband-diags/Makefile Sun Aug 12 08:42:06 2018 (r337681) > +++ stable/11/usr.bin/ofed/infiniband-diags/Makefile Sun Aug 12 08:45:23 2018 (r337682) > @@ -1,27 +1,33 @@ > # $FreeBSD$ > > +.include > + > SUBDIR= \ > -dump_fts \ > -ibaddr \ > -ibcacheedit \ > -ibccconfig \ > -ibccquery \ > -iblinkinfo \ > -ibmirror \ > -ibnetdiscover \ > -ibping \ > -ibportstate \ > -ibqueryerrors \ > -ibroute \ > -ibstat \ > -ibsysstat \ > -ibtracert \ > -perfquery \ > -saquery \ > -sminfo \ > -smpdump \ > -smpquery \ > -vendstat > + ibstat > + > +.if ${MK_OFED_EXTRA} != "no" > +SUBDIR+= \ > + dump_fts \ > + ibaddr \ > + ibcacheedit \ > + ibccconfig \ > + ibccquery \ > + iblinkinfo \ > + ibmirror \ > + ibnetdiscover \ > + ibping \ > + ibportstate \ > + ibqueryerrors \ > + ibroute \ > + ibsysstat \ > + ibtracert \ > + perfquery \ > + saquery \ > + sminfo \ > + smpdump \ > + smpquery \ > + vendstat > +.endif > > SUBDIR_PARALLEL= > > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-stable@freebsd.org Sun Aug 12 15:54:18 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 282011074EA7; Sun, 12 Aug 2018 15:54:18 +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 8B6278E004; Sun, 12 Aug 2018 15:54:17 +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 w7CFsGCD033131; Sun, 12 Aug 2018 08:54: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 w7CFsGXX033130; Sun, 12 Aug 2018 08:54:16 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201808121554.w7CFsGXX033130@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r337682 - in stable/11: share/mk tools/build/options usr.bin/ofed usr.bin/ofed/infiniband-diags In-Reply-To: <201808120845.w7C8jNQU027742@repo.freebsd.org> To: Konstantin Belousov Date: Sun, 12 Aug 2018 08:54:15 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@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-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Aug 2018 15:54:18 -0000 > Author: kib > Date: Sun Aug 12 08:45:23 2018 > New Revision: 337682 > URL: https://svnweb.freebsd.org/changeset/base/337682 > > Log: > MFC r336569: > Move mostly useless examples binaries from OFED, as well as the Subnet > Manager, under the new option WITH_OFED_EXTRA, disabled by default. > > Added: > stable/11/tools/build/options/WITH_OFED_EXTRA > - copied unchanged from r336569, head/tools/build/options/WITH_OFED_EXTRA This is also now kinda a POLA issue for those who have been building on stable/11 with just OFED defined, on our next builds a bunch of stuff is gona go missing. The needs an UPDATING entry, and defanitly a ReleaseNotes: Yes > Modified: > stable/11/share/mk/src.opts.mk > stable/11/usr.bin/ofed/Makefile > stable/11/usr.bin/ofed/infiniband-diags/Makefile > Directory Properties: > stable/11/ (props changed) > > Modified: stable/11/share/mk/src.opts.mk > ============================================================================== > --- stable/11/share/mk/src.opts.mk Sun Aug 12 08:42:06 2018 (r337681) > +++ stable/11/share/mk/src.opts.mk Sun Aug 12 08:45:23 2018 (r337682) > @@ -197,6 +197,7 @@ __DEFAULT_NO_OPTIONS = \ > LOADER_FORCE_LE \ > NAND \ > OFED \ > + OFED_EXTRA \ > OPENLDAP \ > REPRODUCIBLE_BUILD \ > RPCBIND_WARMSTART_SUPPORT \ > @@ -400,6 +401,10 @@ MK_NLS_CATALOGS:= no > .if ${MK_OPENSSL} == "no" > MK_OPENSSH:= no > MK_KERBEROS:= no > +.endif > + > +.if ${MK_OFED} == "no" > +MK_OFED_EXTRA:= no > .endif > > .if ${MK_PF} == "no" > > Copied: stable/11/tools/build/options/WITH_OFED_EXTRA (from r336569, head/tools/build/options/WITH_OFED_EXTRA) > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ stable/11/tools/build/options/WITH_OFED_EXTRA Sun Aug 12 08:45:23 2018 (r337682, copy of r336569, head/tools/build/options/WITH_OFED_EXTRA) > @@ -0,0 +1,4 @@ > +.\" $FreeBSD$ > +Set to build the non-essential components of the > +.Dq "OpenFabrics Enterprise Distribution" > +Infiniband software stack, mostly examples. > > Modified: stable/11/usr.bin/ofed/Makefile > ============================================================================== > --- stable/11/usr.bin/ofed/Makefile Sun Aug 12 08:42:06 2018 (r337681) > +++ stable/11/usr.bin/ofed/Makefile Sun Aug 12 08:45:23 2018 (r337682) > @@ -1,10 +1,13 @@ > # $FreeBSD$ > > +.include > + > SUBDIR= \ > libibverbs \ > librdmacm \ > - opensm \ > infiniband-diags > + > +SUBDIR.${MK_OFED_EXTRA}+= opensm > > SUBDIR_PARALLEL= > > > Modified: stable/11/usr.bin/ofed/infiniband-diags/Makefile > ============================================================================== > --- stable/11/usr.bin/ofed/infiniband-diags/Makefile Sun Aug 12 08:42:06 2018 (r337681) > +++ stable/11/usr.bin/ofed/infiniband-diags/Makefile Sun Aug 12 08:45:23 2018 (r337682) > @@ -1,27 +1,33 @@ > # $FreeBSD$ > > +.include > + > SUBDIR= \ > -dump_fts \ > -ibaddr \ > -ibcacheedit \ > -ibccconfig \ > -ibccquery \ > -iblinkinfo \ > -ibmirror \ > -ibnetdiscover \ > -ibping \ > -ibportstate \ > -ibqueryerrors \ > -ibroute \ > -ibstat \ > -ibsysstat \ > -ibtracert \ > -perfquery \ > -saquery \ > -sminfo \ > -smpdump \ > -smpquery \ > -vendstat > + ibstat > + > +.if ${MK_OFED_EXTRA} != "no" > +SUBDIR+= \ > + dump_fts \ > + ibaddr \ > + ibcacheedit \ > + ibccconfig \ > + ibccquery \ > + iblinkinfo \ > + ibmirror \ > + ibnetdiscover \ > + ibping \ > + ibportstate \ > + ibqueryerrors \ > + ibroute \ > + ibsysstat \ > + ibtracert \ > + perfquery \ > + saquery \ > + sminfo \ > + smpdump \ > + smpquery \ > + vendstat > +.endif > > SUBDIR_PARALLEL= > > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-stable@freebsd.org Sun Aug 12 21:42:22 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2D7C107D50E; Sun, 12 Aug 2018 21:42:21 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A8FA77AEB5; Sun, 12 Aug 2018 21:42:21 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8B81E2B909; Sun, 12 Aug 2018 21:42:21 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7CLgLl8030913; Sun, 12 Aug 2018 21:42:21 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7CLgL2I030912; Sun, 12 Aug 2018 21:42:21 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201808122142.w7CLgL2I030912@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 12 Aug 2018 21:42:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337691 - stable/11/etc X-SVN-Group: stable-11 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: stable/11/etc X-SVN-Commit-Revision: 337691 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Aug 2018 21:42:22 -0000 Author: delphij Date: Sun Aug 12 21:42:21 2018 New Revision: 337691 URL: https://svnweb.freebsd.org/changeset/base/337691 Log: Remove mention of FreeBSD 9.x which is EoL'ed now. Modified: stable/11/etc/portsnap.conf Modified: stable/11/etc/portsnap.conf ============================================================================== --- stable/11/etc/portsnap.conf Sun Aug 12 21:04:53 2018 (r337690) +++ stable/11/etc/portsnap.conf Sun Aug 12 21:42:21 2018 (r337691) @@ -30,6 +30,5 @@ KEYPRINT=9b5feee6d69f170e3dd0a2c8e469ddbd64f13f978f2f3 # REFUSE korean polish portuguese russian ukrainian vietnamese # List of INDEX files to build and the DESCRIBE file to use for each -#INDEX INDEX-9 DESCRIBE.9 #INDEX INDEX-10 DESCRIBE.10 INDEX INDEX-11 DESCRIBE.11 From owner-svn-src-stable@freebsd.org Sun Aug 12 21:44:00 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7518107D852; Sun, 12 Aug 2018 21:44:00 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7ABFB7B219; Sun, 12 Aug 2018 21:44:00 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5CB6E2BA28; Sun, 12 Aug 2018 21:44:00 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7CLi0t5031747; Sun, 12 Aug 2018 21:44:00 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7CLi0Xv031746; Sun, 12 Aug 2018 21:44:00 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201808122144.w7CLi0Xv031746@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 12 Aug 2018 21:44:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r337692 - stable/10/etc X-SVN-Group: stable-10 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: stable/10/etc X-SVN-Commit-Revision: 337692 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Aug 2018 21:44:01 -0000 Author: delphij Date: Sun Aug 12 21:43:59 2018 New Revision: 337692 URL: https://svnweb.freebsd.org/changeset/base/337692 Log: Remove mention of FreeBSD 9.x which is EoL'ed now. Modified: stable/10/etc/portsnap.conf Modified: stable/10/etc/portsnap.conf ============================================================================== --- stable/10/etc/portsnap.conf Sun Aug 12 21:42:21 2018 (r337691) +++ stable/10/etc/portsnap.conf Sun Aug 12 21:43:59 2018 (r337692) @@ -30,5 +30,4 @@ KEYPRINT=9b5feee6d69f170e3dd0a2c8e469ddbd64f13f978f2f3 # REFUSE korean polish portuguese russian ukrainian vietnamese # List of INDEX files to build and the DESCRIBE file to use for each -INDEX INDEX-9 DESCRIBE.9 INDEX INDEX-10 DESCRIBE.10 From owner-svn-src-stable@freebsd.org Mon Aug 13 08:47:55 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AFE8B106A9E3; Mon, 13 Aug 2018 08:47:55 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 65222705E3; Mon, 13 Aug 2018 08:47:55 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2C173240D; Mon, 13 Aug 2018 08:47:55 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7D8lskW070002; Mon, 13 Aug 2018 08:47:54 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7D8lshj070000; Mon, 13 Aug 2018 08:47:54 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201808130847.w7D8lshj070000@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Mon, 13 Aug 2018 08:47:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337705 - stable/11/sys/dev/extres/regulator X-SVN-Group: stable-11 X-SVN-Commit-Author: mmel X-SVN-Commit-Paths: stable/11/sys/dev/extres/regulator X-SVN-Commit-Revision: 337705 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Aug 2018 08:47:55 -0000 Author: mmel Date: Mon Aug 13 08:47:54 2018 New Revision: 337705 URL: https://svnweb.freebsd.org/changeset/base/337705 Log: MFC r335249: Fix handling of enable counter for shared GPIO line in fixed regulator. Modified: stable/11/sys/dev/extres/regulator/regnode_if.m stable/11/sys/dev/extres/regulator/regulator.c stable/11/sys/dev/extres/regulator/regulator_fixed.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/extres/regulator/regnode_if.m ============================================================================== --- stable/11/sys/dev/extres/regulator/regnode_if.m Mon Aug 13 07:28:25 2018 (r337704) +++ stable/11/sys/dev/extres/regulator/regnode_if.m Mon Aug 13 08:47:54 2018 (r337705) @@ -31,6 +31,15 @@ HEADER { struct regnode; } +CODE { + static int + regnode_default_stop(struct regnode *regnode, int *udelay) + { + + return(REGNODE_ENABLE(regnode, false, udelay)); + } +} + # # Initialize regulator # Returns 0 on success or a standard errno value. @@ -80,3 +89,12 @@ METHOD int get_voltage { struct regnode *regnode; int *uvolt; }; + +# +# Stop (shutdown) regulator +# Returns 0 on success or a standard errno value. +# +METHOD int stop { + struct regnode *regnode; + int *udelay; +} DEFAULT regnode_default_stop; Modified: stable/11/sys/dev/extres/regulator/regulator.c ============================================================================== --- stable/11/sys/dev/extres/regulator/regulator.c Mon Aug 13 07:28:25 2018 (r337704) +++ stable/11/sys/dev/extres/regulator/regulator.c Mon Aug 13 08:47:54 2018 (r337705) @@ -515,7 +515,7 @@ regnode_stop(struct regnode *regnode, int depth) /* Disable regulator for each node in chain, starting from consumer */ if ((regnode->enable_cnt == 0) && ((regnode->flags & REGULATOR_FLAGS_NOT_DISABLE) == 0)) { - rv = REGNODE_ENABLE(regnode, false, &udelay); + rv = REGNODE_STOP(regnode, &udelay); if (rv != 0) { REGNODE_UNLOCK(regnode); return (rv); @@ -527,7 +527,7 @@ regnode_stop(struct regnode *regnode, int depth) rv = regnode_resolve_parent(regnode); if (rv != 0) return (rv); - if (regnode->parent != NULL) + if (regnode->parent != NULL && regnode->parent->enable_cnt == 0) rv = regnode_stop(regnode->parent, depth + 1); return (rv); } Modified: stable/11/sys/dev/extres/regulator/regulator_fixed.c ============================================================================== --- stable/11/sys/dev/extres/regulator/regulator_fixed.c Mon Aug 13 07:28:25 2018 (r337704) +++ stable/11/sys/dev/extres/regulator/regulator_fixed.c Mon Aug 13 08:47:54 2018 (r337705) @@ -56,6 +56,7 @@ struct gpio_entry { struct gpiobus_pin gpio_pin; int use_cnt; int enable_cnt; + bool always_on; }; static gpio_list_t gpio_list = TAILQ_HEAD_INITIALIZER(gpio_list); static struct mtx gpio_list_mtx; @@ -71,12 +72,14 @@ static int regnode_fixed_init(struct regnode *regnode) static int regnode_fixed_enable(struct regnode *regnode, bool enable, int *udelay); static int regnode_fixed_status(struct regnode *regnode, int *status); +static int regnode_fixed_stop(struct regnode *regnode, int *udelay); static regnode_method_t regnode_fixed_methods[] = { /* Regulator interface */ REGNODEMETHOD(regnode_init, regnode_fixed_init), REGNODEMETHOD(regnode_enable, regnode_fixed_enable), REGNODEMETHOD(regnode_status, regnode_fixed_status), + REGNODEMETHOD(regnode_stop, regnode_fixed_stop), REGNODEMETHOD_END }; DEFINE_CLASS_1(regnode_fixed, regnode_fixed_class, regnode_fixed_methods, @@ -188,8 +191,6 @@ regnode_fixed_enable(struct regnode *regnode, bool ena dev = regnode_get_device(regnode); *udelay = 0; - if (sc->param->always_on && !enable) - return (0); if (sc->gpio_entry == NULL) return (0); pin = &sc->gpio_entry->gpio_pin; @@ -204,6 +205,8 @@ regnode_fixed_enable(struct regnode *regnode, bool ena if (sc->gpio_entry->enable_cnt >= 1) return (0); } + if (sc->gpio_entry->always_on && !enable) + return (0); if (!sc->param->enable_active_high) enable = !enable; rv = GPIO_PIN_SET(pin->dev, pin->pin, enable); @@ -215,7 +218,43 @@ regnode_fixed_enable(struct regnode *regnode, bool ena return (0); } +/* + * Stop (physicaly shutdown) regulator. + * Take shared GPIO pins in account + */ static int +regnode_fixed_stop(struct regnode *regnode, int *udelay) +{ + device_t dev; + struct regnode_fixed_sc *sc; + struct gpiobus_pin *pin; + int rv; + + sc = regnode_get_softc(regnode); + dev = regnode_get_device(regnode); + + *udelay = 0; + if (sc->gpio_entry == NULL) + return (0); + if (sc->gpio_entry->always_on) + return (0); + pin = &sc->gpio_entry->gpio_pin; + if (sc->gpio_entry->enable_cnt > 0) { + /* Other regulator(s) are enabled. */ + /* XXXX Any diagnostic message? Or error? */ + return (0); + } + rv = GPIO_PIN_SET(pin->dev, pin->pin, + sc->param->enable_active_high ? false: true); + if (rv != 0) { + device_printf(dev, "Cannot set GPIO pin: %d\n", pin->pin); + return (rv); + } + *udelay = sc->param->enable_delay; + return (0); +} + +static int regnode_fixed_status(struct regnode *regnode, int *status) { struct regnode_fixed_sc *sc; @@ -264,6 +303,10 @@ regnode_fixed_register(device_t dev, struct regnode_fi device_printf(dev, "Cannot register regulator.\n"); return(ENXIO); } + + if (sc->gpio_entry != NULL) + sc->gpio_entry->always_on |= sc->param->always_on; + return (0); } From owner-svn-src-stable@freebsd.org Mon Aug 13 14:24:01 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C353C10742B8; Mon, 13 Aug 2018 14:24:01 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 695B77BF9D; Mon, 13 Aug 2018 14:24:01 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4A69C5F11; Mon, 13 Aug 2018 14:24:01 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7DEO1rv054164; Mon, 13 Aug 2018 14:24:01 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7DEO1hu054163; Mon, 13 Aug 2018 14:24:01 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201808131424.w7DEO1hu054163@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 13 Aug 2018 14:24:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r337710 - in stable: 10/release/tools 11/release/tools X-SVN-Group: stable-10 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable: 10/release/tools 11/release/tools X-SVN-Commit-Revision: 337710 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Aug 2018 14:24:02 -0000 Author: gjb Date: Mon Aug 13 14:24:00 2018 New Revision: 337710 URL: https://svnweb.freebsd.org/changeset/base/337710 Log: MFC r337555, r337556: r337555: Update and replace old rc daemons for GCE images. r337556: Invoke the growfs rc script for each boot on GCE. PR: 229000, 230275 Sponsored by: The FreeBSD Foundation Modified: stable/10/release/tools/gce.conf Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/release/tools/gce.conf Directory Properties: stable/11/ (props changed) Modified: stable/10/release/tools/gce.conf ============================================================================== --- stable/10/release/tools/gce.conf Mon Aug 13 14:13:25 2018 (r337709) +++ stable/10/release/tools/gce.conf Mon Aug 13 14:24:00 2018 (r337710) @@ -5,15 +5,13 @@ # Set to a list of packages to install. export VM_EXTRA_PACKAGES="firstboot-freebsd-update firstboot-pkgs \ - google-cloud-sdk panicmail sudo firstboot-growfs \ - sysutils/py-google-compute-engine" + google-cloud-sdk panicmail sudo sysutils/py-google-compute-engine" # Set to a list of third-party software to enable in rc.conf(5). -export VM_RC_LIST="ntpd sshd firstboot_growfs \ +export VM_RC_LIST="ntpd sshd growfs\ firstboot_pkgs firstboot_freebsd_update google_startup \ google_accounts_daemon google_clock_skew_daemon \ - google_instance_setup google_ip_forwarding_daemon \ - google_network_setup" + google_instance_setup google_network_daemon" vm_extra_install_base() { echo 'search google.internal' > ${DESTDIR}/etc/resolv.conf @@ -22,6 +20,10 @@ vm_extra_install_base() { } vm_extra_pre_umount() { + # Enable growfs on every boot, not only the first, as as instance's disk can + # be enlarged post-creation + sed -i -e '/KEYWORD: firstboot/d' /etc/rc.d/growfs + cat << EOF >> ${DESTDIR}/etc/rc.conf dumpdev="AUTO" ifconfig_DEFAULT="SYNCDHCP mtu 1460" From owner-svn-src-stable@freebsd.org Mon Aug 13 14:24:02 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D41310742BD; Mon, 13 Aug 2018 14:24:02 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D7F1D7BF9E; Mon, 13 Aug 2018 14:24:01 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B900B5F12; Mon, 13 Aug 2018 14:24:01 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7DEO13b054170; Mon, 13 Aug 2018 14:24:01 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7DEO1LF054169; Mon, 13 Aug 2018 14:24:01 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201808131424.w7DEO1LF054169@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 13 Aug 2018 14:24:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337710 - in stable: 10/release/tools 11/release/tools X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable: 10/release/tools 11/release/tools X-SVN-Commit-Revision: 337710 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Aug 2018 14:24:02 -0000 Author: gjb Date: Mon Aug 13 14:24:00 2018 New Revision: 337710 URL: https://svnweb.freebsd.org/changeset/base/337710 Log: MFC r337555, r337556: r337555: Update and replace old rc daemons for GCE images. r337556: Invoke the growfs rc script for each boot on GCE. PR: 229000, 230275 Sponsored by: The FreeBSD Foundation Modified: stable/11/release/tools/gce.conf Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/release/tools/gce.conf Directory Properties: stable/10/ (props changed) Modified: stable/11/release/tools/gce.conf ============================================================================== --- stable/11/release/tools/gce.conf Mon Aug 13 14:13:25 2018 (r337709) +++ stable/11/release/tools/gce.conf Mon Aug 13 14:24:00 2018 (r337710) @@ -5,15 +5,13 @@ # Set to a list of packages to install. export VM_EXTRA_PACKAGES="firstboot-freebsd-update firstboot-pkgs \ - google-cloud-sdk panicmail sudo firstboot-growfs \ - sysutils/py-google-compute-engine" + google-cloud-sdk panicmail sudo sysutils/py-google-compute-engine" # Set to a list of third-party software to enable in rc.conf(5). -export VM_RC_LIST="ntpd sshd firstboot_growfs \ +export VM_RC_LIST="ntpd sshd growfs\ firstboot_pkgs firstboot_freebsd_update google_startup \ google_accounts_daemon google_clock_skew_daemon \ - google_instance_setup google_ip_forwarding_daemon \ - google_network_setup" + google_instance_setup google_network_daemon" vm_extra_install_base() { echo 'search google.internal' > ${DESTDIR}/etc/resolv.conf @@ -22,6 +20,10 @@ vm_extra_install_base() { } vm_extra_pre_umount() { + # Enable growfs on every boot, not only the first, as as instance's disk can + # be enlarged post-creation + sed -i -e '/KEYWORD: firstboot/d' /etc/rc.d/growfs + cat << EOF >> ${DESTDIR}/etc/rc.conf dumpdev="AUTO" ifconfig_DEFAULT="SYNCDHCP mtu 1460" From owner-svn-src-stable@freebsd.org Tue Aug 14 01:45:23 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 725291060BD4; Tue, 14 Aug 2018 01:45:23 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 28501774AC; Tue, 14 Aug 2018 01:45:23 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0ACD214EC6; Tue, 14 Aug 2018 01:45:23 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7E1jMmH028270; Tue, 14 Aug 2018 01:45:22 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7E1jMDB028269; Tue, 14 Aug 2018 01:45:22 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201808140145.w7E1jMDB028269@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 14 Aug 2018 01:45:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337733 - stable/11/bin/cat X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/bin/cat X-SVN-Commit-Revision: 337733 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2018 01:45:23 -0000 Author: kevans Date: Tue Aug 14 01:45:22 2018 New Revision: 337733 URL: https://svnweb.freebsd.org/changeset/base/337733 Log: MFC r322325: cat: fix build with -DNO_UDOM_SUPPORT PR: 230489 Modified: stable/11/bin/cat/cat.c Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/cat/cat.c ============================================================================== --- stable/11/bin/cat/cat.c Tue Aug 14 00:14:17 2018 (r337732) +++ stable/11/bin/cat/cat.c Tue Aug 14 01:45:22 2018 (r337733) @@ -51,12 +51,12 @@ __FBSDID("$FreeBSD$"); #ifndef NO_UDOM_SUPPORT #include #include -#include #include #endif #include #include +#include #include #include #include From owner-svn-src-stable@freebsd.org Tue Aug 14 01:57:12 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11EF510617C0; Tue, 14 Aug 2018 01:57:12 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B97FF77D27; Tue, 14 Aug 2018 01:57:11 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9AB90150A1; Tue, 14 Aug 2018 01:57:11 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7E1vB72033476; Tue, 14 Aug 2018 01:57:11 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7E1vBMp033475; Tue, 14 Aug 2018 01:57:11 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201808140157.w7E1vBMp033475@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 14 Aug 2018 01:57:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r337734 - stable/10/bin/cat X-SVN-Group: stable-10 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/10/bin/cat X-SVN-Commit-Revision: 337734 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2018 01:57:12 -0000 Author: kevans Date: Tue Aug 14 01:57:11 2018 New Revision: 337734 URL: https://svnweb.freebsd.org/changeset/base/337734 Log: MFC r322325: cat: fix build with -DNO_UDOM_SUPPORT PR: 230489 Modified: stable/10/bin/cat/cat.c Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/cat/cat.c ============================================================================== --- stable/10/bin/cat/cat.c Tue Aug 14 01:45:22 2018 (r337733) +++ stable/10/bin/cat/cat.c Tue Aug 14 01:57:11 2018 (r337734) @@ -51,11 +51,11 @@ __FBSDID("$FreeBSD$"); #ifndef NO_UDOM_SUPPORT #include #include -#include #endif #include #include +#include #include #include #include From owner-svn-src-stable@freebsd.org Tue Aug 14 11:15:06 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 547B91074BCD; Tue, 14 Aug 2018 11:15:06 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0857A8A616; Tue, 14 Aug 2018 11:15:06 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DE9B31AD41; Tue, 14 Aug 2018 11:15:05 +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 w7EBF5Ri020227; Tue, 14 Aug 2018 11:15:05 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7EBF5rA020224; Tue, 14 Aug 2018 11:15:05 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201808141115.w7EBF5rA020224@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 14 Aug 2018 11:15:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r337741 - stable/10/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/10/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 337741 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2018 11:15:06 -0000 Author: hselasky Date: Tue Aug 14 11:15:05 2018 New Revision: 337741 URL: https://svnweb.freebsd.org/changeset/base/337741 Log: MFC r336407: Handle jumbo frames without requiring big clusters in mlx5en(4). The scatter list is formed by the chunks of MCLBYTES each, and larger than default packets are returned to the stack as the mbuf chain. Submitted by: kib@ Sponsored by: Mellanox Technologies Modified: stable/10/sys/dev/mlx5/mlx5_en/en.h stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_en/en.h Tue Aug 14 11:01:52 2018 (r337740) +++ stable/10/sys/dev/mlx5/mlx5_en/en.h Tue Aug 14 11:15:05 2018 (r337741) @@ -83,8 +83,19 @@ #define MLX5E_PARAMS_DEFAULT_LOG_RQ_SIZE 0xa #define MLX5E_PARAMS_MAXIMUM_LOG_RQ_SIZE 0xe -/* freeBSD HW LRO is limited by 16KB - the size of max mbuf */ +#define MLX5E_MAX_RX_SEGS 7 + +#ifndef MLX5E_MAX_RX_BYTES +#define MLX5E_MAX_RX_BYTES MCLBYTES +#endif + +#if (MLX5E_MAX_RX_SEGS == 1) +/* FreeBSD HW LRO is limited by 16KB - the size of max mbuf */ #define MLX5E_PARAMS_DEFAULT_LRO_WQE_SZ MJUM16BYTES +#else +#define MLX5E_PARAMS_DEFAULT_LRO_WQE_SZ \ + MIN(65535, MLX5E_MAX_RX_SEGS * MLX5E_MAX_RX_BYTES) +#endif #define MLX5E_PARAMS_DEFAULT_RX_CQ_MODERATION_USEC 0x10 #define MLX5E_PARAMS_DEFAULT_RX_CQ_MODERATION_USEC_FROM_CQE 0x3 #define MLX5E_PARAMS_DEFAULT_RX_CQ_MODERATION_PKTS 0x20 @@ -476,6 +487,7 @@ struct mlx5e_rq { struct mtx mtx; bus_dma_tag_t dma_tag; u32 wqe_sz; + u32 nsegs; struct mlx5e_rq_mbuf *mbuf; struct ifnet *ifp; struct mlx5e_rq_stats stats; @@ -709,8 +721,11 @@ struct mlx5e_tx_wqe { struct mlx5e_rx_wqe { struct mlx5_wqe_srq_next_seg next; - struct mlx5_wqe_data_seg data; + struct mlx5_wqe_data_seg data[]; }; + +/* the size of the structure above must be power of two */ +CTASSERT(powerof2(sizeof(struct mlx5e_rx_wqe))); struct mlx5e_eeprom { int lock_bit; Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Tue Aug 14 11:01:52 2018 (r337740) +++ stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Tue Aug 14 11:15:05 2018 (r337741) @@ -34,6 +34,8 @@ char mlx5e_version[] = "Mellanox Ethernet driver" " (" ETH_DRIVER_VERSION ")"; +static int mlx5e_get_wqe_sz(struct mlx5e_priv *priv, u32 *wqe_sz, u32 *nsegs); + struct mlx5e_channel_param { struct mlx5e_rq_param rq; struct mlx5e_sq_param sq; @@ -654,7 +656,12 @@ mlx5e_create_rq(struct mlx5e_channel *c, int wq_sz; int err; int i; + u32 nsegs, wqe_sz; + err = mlx5e_get_wqe_sz(priv, &wqe_sz, &nsegs); + if (err != 0) + goto done; + /* Create DMA descriptor TAG */ if ((err = -bus_dma_tag_create( bus_get_dma_tag(mdev->pdev->dev.bsddev), @@ -663,9 +670,9 @@ mlx5e_create_rq(struct mlx5e_channel *c, BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MJUM16BYTES, /* maxsize */ - 1, /* nsegments */ - MJUM16BYTES, /* maxsegsize */ + nsegs * MLX5E_MAX_RX_BYTES, /* maxsize */ + nsegs, /* nsegments */ + nsegs * MLX5E_MAX_RX_BYTES, /* maxsegsize */ 0, /* flags */ NULL, NULL, /* lockfunc, lockfuncarg */ &rq->dma_tag))) @@ -678,29 +685,19 @@ mlx5e_create_rq(struct mlx5e_channel *c, rq->wq.db = &rq->wq.db[MLX5_RCV_DBR]; - if (priv->params.hw_lro_en) { - rq->wqe_sz = priv->params.lro_wqe_sz; - } else { - rq->wqe_sz = MLX5E_SW2MB_MTU(priv->ifp->if_mtu); - } - if (rq->wqe_sz > MJUM16BYTES) { - err = -ENOMEM; + err = mlx5e_get_wqe_sz(priv, &rq->wqe_sz, &rq->nsegs); + if (err != 0) goto err_rq_wq_destroy; - } else if (rq->wqe_sz > MJUM9BYTES) { - rq->wqe_sz = MJUM16BYTES; - } else if (rq->wqe_sz > MJUMPAGESIZE) { - rq->wqe_sz = MJUM9BYTES; - } else if (rq->wqe_sz > MCLBYTES) { - rq->wqe_sz = MJUMPAGESIZE; - } else { - rq->wqe_sz = MCLBYTES; - } wq_sz = mlx5_wq_ll_get_size(&rq->wq); rq->mbuf = malloc(wq_sz * sizeof(rq->mbuf[0]), M_MLX5EN, M_WAITOK | M_ZERO); for (i = 0; i != wq_sz; i++) { struct mlx5e_rx_wqe *wqe = mlx5_wq_ll_get_wqe(&rq->wq, i); +#if (MLX5E_MAX_RX_SEGS == 1) uint32_t byte_count = rq->wqe_sz - MLX5E_NET_IP_ALIGN; +#else + int j; +#endif err = -bus_dmamap_create(rq->dma_tag, 0, &rq->mbuf[i].dma_map); if (err != 0) { @@ -708,8 +705,15 @@ mlx5e_create_rq(struct mlx5e_channel *c, bus_dmamap_destroy(rq->dma_tag, rq->mbuf[i].dma_map); goto err_rq_mbuf_free; } - wqe->data.lkey = c->mkey_be; - wqe->data.byte_count = cpu_to_be32(byte_count | MLX5_HW_START_PADDING); + + /* set value for constant fields */ +#if (MLX5E_MAX_RX_SEGS == 1) + wqe->data[0].lkey = c->mkey_be; + wqe->data[0].byte_count = cpu_to_be32(byte_count | MLX5_HW_START_PADDING); +#else + for (j = 0; j < rq->nsegs; j++) + wqe->data[j].lkey = c->mkey_be; +#endif } rq->ifp = c->ifp; @@ -1655,16 +1659,51 @@ mlx5e_close_channel_wait(struct mlx5e_channel *volatil free(c, M_MLX5EN); } +static int +mlx5e_get_wqe_sz(struct mlx5e_priv *priv, u32 *wqe_sz, u32 *nsegs) +{ + u32 r, n; + + r = priv->params.hw_lro_en ? priv->params.lro_wqe_sz : + MLX5E_SW2MB_MTU(priv->ifp->if_mtu); + if (r > MJUM16BYTES) + return (-ENOMEM); + + if (r > MJUM9BYTES) + r = MJUM16BYTES; + else if (r > MJUMPAGESIZE) + r = MJUM9BYTES; + else if (r > MCLBYTES) + r = MJUMPAGESIZE; + else + r = MCLBYTES; + + /* + * n + 1 must be a power of two, because stride size must be. + * Stride size is 16 * (n + 1), as the first segment is + * control. + */ + for (n = howmany(r, MLX5E_MAX_RX_BYTES); !powerof2(n + 1); n++) + ; + + *wqe_sz = r; + *nsegs = n; + return (0); +} + static void mlx5e_build_rq_param(struct mlx5e_priv *priv, struct mlx5e_rq_param *param) { void *rqc = param->rqc; void *wq = MLX5_ADDR_OF(rqc, rqc, wq); + u32 wqe_sz, nsegs; + mlx5e_get_wqe_sz(priv, &wqe_sz, &nsegs); MLX5_SET(wq, wq, wq_type, MLX5_WQ_TYPE_LINKED_LIST); MLX5_SET(wq, wq, end_padding_mode, MLX5_WQ_END_PAD_MODE_ALIGN); - MLX5_SET(wq, wq, log_wq_stride, ilog2(sizeof(struct mlx5e_rx_wqe))); + MLX5_SET(wq, wq, log_wq_stride, ilog2(sizeof(struct mlx5e_rx_wqe) + + nsegs * sizeof(struct mlx5_wqe_data_seg))); MLX5_SET(wq, wq, log_wq_sz, priv->params.log_rq_size); MLX5_SET(wq, wq, pd, priv->pdn); Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c Tue Aug 14 11:01:52 2018 (r337740) +++ stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c Tue Aug 14 11:15:05 2018 (r337741) @@ -32,21 +32,47 @@ static inline int mlx5e_alloc_rx_wqe(struct mlx5e_rq *rq, struct mlx5e_rx_wqe *wqe, u16 ix) { - bus_dma_segment_t segs[1]; + bus_dma_segment_t segs[rq->nsegs]; struct mbuf *mb; int nsegs; int err; - +#if (MLX5E_MAX_RX_SEGS != 1) + struct mbuf *mb_head; + int i; +#endif if (rq->mbuf[ix].mbuf != NULL) return (0); +#if (MLX5E_MAX_RX_SEGS == 1) mb = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, rq->wqe_sz); if (unlikely(!mb)) return (-ENOMEM); - /* set initial mbuf length */ mb->m_pkthdr.len = mb->m_len = rq->wqe_sz; +#else + mb_head = mb = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, + MLX5E_MAX_RX_BYTES); + if (unlikely(mb == NULL)) + return (-ENOMEM); + mb->m_len = MLX5E_MAX_RX_BYTES; + mb->m_pkthdr.len = MLX5E_MAX_RX_BYTES; + + for (i = 1; i < rq->nsegs; i++) { + if (mb_head->m_pkthdr.len >= rq->wqe_sz) + break; + mb = mb->m_next = m_getjcl(M_NOWAIT, MT_DATA, 0, + MLX5E_MAX_RX_BYTES); + if (unlikely(mb == NULL)) { + m_freem(mb_head); + return (-ENOMEM); + } + mb->m_len = MLX5E_MAX_RX_BYTES; + mb_head->m_pkthdr.len += MLX5E_MAX_RX_BYTES; + } + /* rewind to first mbuf in chain */ + mb = mb_head; +#endif /* get IP header aligned */ m_adj(mb, MLX5E_NET_IP_ALIGN); @@ -54,12 +80,26 @@ mlx5e_alloc_rx_wqe(struct mlx5e_rq *rq, mb, segs, &nsegs, BUS_DMA_NOWAIT); if (err != 0) goto err_free_mbuf; - if (unlikely(nsegs != 1)) { + if (unlikely(nsegs == 0)) { bus_dmamap_unload(rq->dma_tag, rq->mbuf[ix].dma_map); err = -ENOMEM; goto err_free_mbuf; } - wqe->data.addr = cpu_to_be64(segs[0].ds_addr); +#if (MLX5E_MAX_RX_SEGS == 1) + wqe->data[0].addr = cpu_to_be64(segs[0].ds_addr); +#else + wqe->data[0].addr = cpu_to_be64(segs[0].ds_addr); + wqe->data[0].byte_count = cpu_to_be32(segs[0].ds_len | + MLX5_HW_START_PADDING); + for (i = 1; i != nsegs; i++) { + wqe->data[i].addr = cpu_to_be64(segs[i].ds_addr); + wqe->data[i].byte_count = cpu_to_be32(segs[i].ds_len); + } + for (; i < rq->nsegs; i++) { + wqe->data[i].addr = 0; + wqe->data[i].byte_count = 0; + } +#endif rq->mbuf[ix].mbuf = mb; rq->mbuf[ix].data = mb->m_data; @@ -185,6 +225,9 @@ mlx5e_build_rx_mbuf(struct mlx5_cqe64 *cqe, u32 cqe_bcnt) { struct ifnet *ifp = rq->ifp; +#if (MLX5E_MAX_RX_SEGS != 1) + struct mbuf *mb_head; +#endif int lro_num_seg; /* HW LRO session aggregated packets counter */ lro_num_seg = be32_to_cpu(cqe->srqn) >> 24; @@ -194,7 +237,26 @@ mlx5e_build_rx_mbuf(struct mlx5_cqe64 *cqe, rq->stats.lro_bytes += cqe_bcnt; } +#if (MLX5E_MAX_RX_SEGS == 1) mb->m_pkthdr.len = mb->m_len = cqe_bcnt; +#else + mb->m_pkthdr.len = cqe_bcnt; + for (mb_head = mb; mb != NULL; mb = mb->m_next) { + if (mb->m_len > cqe_bcnt) + mb->m_len = cqe_bcnt; + cqe_bcnt -= mb->m_len; + if (likely(cqe_bcnt == 0)) { + if (likely(mb->m_next != NULL)) { + /* trim off empty mbufs */ + m_freem(mb->m_next); + mb->m_next = NULL; + } + break; + } + } + /* rewind to first mbuf in chain */ + mb = mb_head; +#endif /* check if a Toeplitz hash was computed */ if (cqe->rss_hash_type != 0) { mb->m_pkthdr.flowid = be32_to_cpu(cqe->rss_hash_result); @@ -360,6 +422,10 @@ mlx5e_poll_rx_cq(struct mlx5e_rq *rq, int budget) } if ((MHLEN - MLX5E_NET_IP_ALIGN) >= byte_cnt && (mb = m_gethdr(M_NOWAIT, MT_DATA)) != NULL) { +#if (MLX5E_MAX_RX_SEGS != 1) + /* set maximum mbuf length */ + mb->m_len = MHLEN - MLX5E_NET_IP_ALIGN; +#endif /* get IP header aligned */ mb->m_data += MLX5E_NET_IP_ALIGN; From owner-svn-src-stable@freebsd.org Tue Aug 14 11:19:06 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 75B2A1074D88; Tue, 14 Aug 2018 11:19:06 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 28D968A836; Tue, 14 Aug 2018 11:19:06 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 03F651AD44; Tue, 14 Aug 2018 11:19:06 +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 w7EBJ5ut020436; Tue, 14 Aug 2018 11:19:05 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7EBJ47s020429; Tue, 14 Aug 2018 11:19:04 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201808141119.w7EBJ47s020429@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 14 Aug 2018 11:19:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r337742 - in stable/10/sys/dev/mlx5: . mlx5_core mlx5_en X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/10/sys/dev/mlx5: . mlx5_core mlx5_en X-SVN-Commit-Revision: 337742 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2018 11:19:06 -0000 Author: hselasky Date: Tue Aug 14 11:19:04 2018 New Revision: 337742 URL: https://svnweb.freebsd.org/changeset/base/337742 Log: MFC r336450: Do not inline transmit headers and use HW VLAN tagging if supported by mlx5en(4). Query the minimal inline mode supported by the card. When creating a send queue, cache the queried mode and optimize the transmit if no inlining is required. In this case, we can avoid touching the headers cache line and avoid dirtying several more lines by copying headers into the send WQEs. Also, if no inline headers are used, hardware assists in the VLAN tag framing. Submitted by: kib@, slavash@ Sponsored by: Mellanox Technologies Modified: stable/10/sys/dev/mlx5/device.h stable/10/sys/dev/mlx5/mlx5_core/mlx5_vport.c stable/10/sys/dev/mlx5/mlx5_en/en.h stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c stable/10/sys/dev/mlx5/qp.h stable/10/sys/dev/mlx5/vport.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mlx5/device.h ============================================================================== --- stable/10/sys/dev/mlx5/device.h Tue Aug 14 11:15:05 2018 (r337741) +++ stable/10/sys/dev/mlx5/device.h Tue Aug 14 11:19:04 2018 (r337742) @@ -1311,6 +1311,13 @@ enum { MLX5_CMD_HCA_CAP_MIN_WQE_INLINE_MODE_NOT_REQUIRED = 0x2 }; +enum mlx5_inline_modes { + MLX5_INLINE_MODE_NONE, + MLX5_INLINE_MODE_L2, + MLX5_INLINE_MODE_IP, + MLX5_INLINE_MODE_TCP_UDP, +}; + enum { MLX5_QUERY_VPORT_STATE_OUT_STATE_FOLLOW = 0x2, }; Modified: stable/10/sys/dev/mlx5/mlx5_core/mlx5_vport.c ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_core/mlx5_vport.c Tue Aug 14 11:15:05 2018 (r337741) +++ stable/10/sys/dev/mlx5/mlx5_core/mlx5_vport.c Tue Aug 14 11:19:04 2018 (r337742) @@ -228,6 +228,58 @@ int mlx5_vport_query_out_of_rx_buffer(struct mlx5_core return err; } +int mlx5_query_nic_vport_min_inline(struct mlx5_core_dev *mdev, + u16 vport, u8 *min_inline) +{ + u32 out[MLX5_ST_SZ_DW(query_nic_vport_context_out)] = {0}; + int err; + + err = mlx5_query_nic_vport_context(mdev, vport, out, sizeof(out)); + if (!err) + *min_inline = MLX5_GET(query_nic_vport_context_out, out, + nic_vport_context.min_wqe_inline_mode); + return err; +} +EXPORT_SYMBOL_GPL(mlx5_query_nic_vport_min_inline); + +void mlx5_query_min_inline(struct mlx5_core_dev *mdev, + u8 *min_inline_mode) +{ + switch (MLX5_CAP_ETH(mdev, wqe_inline_mode)) { + case MLX5_CAP_INLINE_MODE_L2: + *min_inline_mode = MLX5_INLINE_MODE_L2; + break; + case MLX5_CAP_INLINE_MODE_VPORT_CONTEXT: + mlx5_query_nic_vport_min_inline(mdev, 0, min_inline_mode); + break; + case MLX5_CAP_INLINE_MODE_NOT_REQUIRED: + *min_inline_mode = MLX5_INLINE_MODE_NONE; + break; + } +} +EXPORT_SYMBOL_GPL(mlx5_query_min_inline); + +int mlx5_modify_nic_vport_min_inline(struct mlx5_core_dev *mdev, + u16 vport, u8 min_inline) +{ + u32 in[MLX5_ST_SZ_DW(modify_nic_vport_context_in)] = {0}; + int inlen = MLX5_ST_SZ_BYTES(modify_nic_vport_context_in); + void *nic_vport_ctx; + + MLX5_SET(modify_nic_vport_context_in, in, + field_select.min_wqe_inline_mode, 1); + MLX5_SET(modify_nic_vport_context_in, in, vport_number, vport); + MLX5_SET(modify_nic_vport_context_in, in, other_vport, 1); + + nic_vport_ctx = MLX5_ADDR_OF(modify_nic_vport_context_in, + in, nic_vport_context); + MLX5_SET(nic_vport_context, nic_vport_ctx, + min_wqe_inline_mode, min_inline); + + return mlx5_modify_nic_vport_context(mdev, in, inlen); +} +EXPORT_SYMBOL_GPL(mlx5_modify_nic_vport_min_inline); + int mlx5_query_nic_vport_mac_address(struct mlx5_core_dev *mdev, u16 vport, u8 *addr) { Modified: stable/10/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_en/en.h Tue Aug 14 11:15:05 2018 (r337741) +++ stable/10/sys/dev/mlx5/mlx5_en/en.h Tue Aug 14 11:19:04 2018 (r337742) @@ -404,6 +404,8 @@ struct mlx5e_params { u16 rx_hash_log_tbl_sz; u32 tx_pauseframe_control; u32 rx_pauseframe_control; + u16 tx_max_inline; + u8 tx_min_inline_mode; }; #define MLX5E_PARAMS(m) \ @@ -560,6 +562,9 @@ struct mlx5e_sq { u32 sqn; u32 bf_buf_size; u32 mkey_be; + u16 max_inline; + u8 min_inline_mode; + u8 vlan_inline_cap; /* control path */ struct mlx5_wq_ctrl wq_ctrl; @@ -851,5 +856,6 @@ int mlx5e_enable_sq(struct mlx5e_sq *, struct mlx5e_sq int mlx5e_modify_sq(struct mlx5e_sq *, int curr_state, int next_state); void mlx5e_disable_sq(struct mlx5e_sq *); void mlx5e_drain_sq(struct mlx5e_sq *); +u8 mlx5e_params_calculate_tx_min_inline(struct mlx5_core_dev *mdev); #endif /* _MLX5_EN_H_ */ Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Tue Aug 14 11:15:05 2018 (r337741) +++ stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Tue Aug 14 11:19:04 2018 (r337742) @@ -1022,6 +1022,9 @@ mlx5e_create_sq(struct mlx5e_channel *c, sq->ifp = priv->ifp; sq->priv = priv; sq->tc = tc; + sq->max_inline = priv->params.tx_max_inline; + sq->min_inline_mode = priv->params.tx_min_inline_mode; + sq->vlan_inline_cap = MLX5_CAP_ETH(mdev, wqe_vlan_insert); /* check if we should allocate a second packet buffer */ if (priv->params_ethtool.tx_bufring_disable == 0) { @@ -2840,6 +2843,16 @@ mlx5e_check_required_hca_cap(struct mlx5_core_dev *mde return (0); } +static u16 +mlx5e_get_max_inline_cap(struct mlx5_core_dev *mdev) +{ + int bf_buf_size = (1 << MLX5_CAP_GEN(mdev, log_bf_reg_size)) / 2; + + return bf_buf_size - + sizeof(struct mlx5e_tx_wqe) + + 2 /*sizeof(mlx5e_tx_wqe.inline_hdr_start)*/; +} + static void mlx5e_build_ifp_priv(struct mlx5_core_dev *mdev, struct mlx5e_priv *priv, @@ -2875,6 +2888,8 @@ mlx5e_build_ifp_priv(struct mlx5_core_dev *mdev, priv->params.num_tc = 1; priv->params.default_vlan_prio = 0; priv->counter_set_id = -1; + priv->params.tx_max_inline = mlx5e_get_max_inline_cap(mdev); + mlx5_query_min_inline(mdev, &priv->params.tx_min_inline_mode); /* * hw lro is currently defaulted to off. when it won't anymore we @@ -2971,6 +2986,20 @@ sysctl_firmware(SYSCTL_HANDLER_ARGS) fw_rev_sub(priv->mdev)); error = sysctl_handle_string(oidp, fw, sizeof(fw), req); return (error); +} + +u8 +mlx5e_params_calculate_tx_min_inline(struct mlx5_core_dev *mdev) +{ + u8 min_inline_mode; + + min_inline_mode = MLX5_INLINE_MODE_L2; + mlx5_query_min_inline(mdev, &min_inline_mode); + if (min_inline_mode == MLX5_INLINE_MODE_NONE && + !MLX5_CAP_ETH(mdev, wqe_vlan_insert)) + min_inline_mode = MLX5_INLINE_MODE_L2; + + return (min_inline_mode); } static void Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Tue Aug 14 11:15:05 2018 (r337741) +++ stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Tue Aug 14 11:19:04 2018 (r337742) @@ -137,7 +137,43 @@ mlx5e_select_queue(struct ifnet *ifp, struct mbuf *mb) static inline u16 mlx5e_get_inline_hdr_size(struct mlx5e_sq *sq, struct mbuf *mb) { - return (MIN(MLX5E_MAX_TX_INLINE, mb->m_len)); + + switch(sq->min_inline_mode) { + case MLX5_INLINE_MODE_NONE: + /* + * When inline mode is NONE, we do not need to copy + * headers into WQEs, except when vlan tag framing is + * requested. Hardware might offload vlan tagging on + * transmit. This is a separate capability, which is + * known to be disabled on ConnectX-5 due to a hardware + * bug RM 931383. If vlan_inline_cap is not present and + * the packet has vlan tag, fall back to inlining. + */ + if ((mb->m_flags & M_VLANTAG) != 0 && + sq->vlan_inline_cap == 0) + break; + return (0); + case MLX5_INLINE_MODE_L2: + /* + * Due to hardware limitations, when trust mode is + * DSCP, the hardware may request MLX5_INLINE_MODE_L2 + * while it really needs all L2 headers and the 4 first + * bytes of the IP header (which include the + * TOS/traffic-class). + * + * To avoid doing a firmware command for querying the + * trust state and parsing the mbuf for doing + * unnecessary checks (VLAN/eth_type) in the fast path, + * we are going for the worth case (22 Bytes) if + * the mb->m_pkthdr.len allows it. + */ + if (mb->m_pkthdr.len > ETHER_HDR_LEN + + ETHER_VLAN_ENCAP_LEN + 4) + return (MIN(sq->max_inline, ETHER_HDR_LEN + + ETHER_VLAN_ENCAP_LEN + 4)); + break; + } + return (MIN(sq->max_inline, mb->m_pkthdr.len)); } static int @@ -275,37 +311,47 @@ mlx5e_sq_xmit(struct mlx5e_sq *sq, struct mbuf **mbp) sq->mbuf[pi].num_bytes = max_t (unsigned int, mb->m_pkthdr.len, ETHER_MIN_LEN - ETHER_CRC_LEN); } - if (mb->m_flags & M_VLANTAG) { - struct ether_vlan_header *eh = - (struct ether_vlan_header *)wqe->eth.inline_hdr_start; - - /* Range checks */ - if (ihs > (MLX5E_MAX_TX_INLINE - ETHER_VLAN_ENCAP_LEN)) - ihs = (MLX5E_MAX_TX_INLINE - ETHER_VLAN_ENCAP_LEN); - else if (ihs < ETHER_HDR_LEN) { - err = EINVAL; - goto tx_drop; + if (ihs == 0) { + if ((mb->m_flags & M_VLANTAG) != 0) { + wqe->eth.vlan_cmd = htons(0x8000); /* bit 0 CVLAN */ + wqe->eth.vlan_hdr = htons(mb->m_pkthdr.ether_vtag); + } else { + wqe->eth.inline_hdr_sz = 0; } - m_copydata(mb, 0, ETHER_HDR_LEN, (caddr_t)eh); - m_adj(mb, ETHER_HDR_LEN); - /* Insert 4 bytes VLAN tag into data stream */ - eh->evl_proto = eh->evl_encap_proto; - eh->evl_encap_proto = htons(ETHERTYPE_VLAN); - eh->evl_tag = htons(mb->m_pkthdr.ether_vtag); - /* Copy rest of header data, if any */ - m_copydata(mb, 0, ihs - ETHER_HDR_LEN, (caddr_t)(eh + 1)); - m_adj(mb, ihs - ETHER_HDR_LEN); - /* Extend header by 4 bytes */ - ihs += ETHER_VLAN_ENCAP_LEN; } else { - m_copydata(mb, 0, ihs, wqe->eth.inline_hdr_start); - m_adj(mb, ihs); + if ((mb->m_flags & M_VLANTAG) != 0) { + struct ether_vlan_header *eh = (struct ether_vlan_header + *)wqe->eth.inline_hdr_start; + + /* Range checks */ + if (ihs > (MLX5E_MAX_TX_INLINE - ETHER_VLAN_ENCAP_LEN)) + ihs = (MLX5E_MAX_TX_INLINE - + ETHER_VLAN_ENCAP_LEN); + else if (ihs < ETHER_HDR_LEN) { + err = EINVAL; + goto tx_drop; + } + m_copydata(mb, 0, ETHER_HDR_LEN, (caddr_t)eh); + m_adj(mb, ETHER_HDR_LEN); + /* Insert 4 bytes VLAN tag into data stream */ + eh->evl_proto = eh->evl_encap_proto; + eh->evl_encap_proto = htons(ETHERTYPE_VLAN); + eh->evl_tag = htons(mb->m_pkthdr.ether_vtag); + /* Copy rest of header data, if any */ + m_copydata(mb, 0, ihs - ETHER_HDR_LEN, (caddr_t)(eh + + 1)); + m_adj(mb, ihs - ETHER_HDR_LEN); + /* Extend header by 4 bytes */ + ihs += ETHER_VLAN_ENCAP_LEN; + } else { + m_copydata(mb, 0, ihs, wqe->eth.inline_hdr_start); + m_adj(mb, ihs); + } + wqe->eth.inline_hdr_sz = cpu_to_be16(ihs); } - wqe->eth.inline_hdr_sz = cpu_to_be16(ihs); - ds_cnt = sizeof(*wqe) / MLX5_SEND_WQE_DS; - if (likely(ihs > sizeof(wqe->eth.inline_hdr_start))) { + if (ihs > sizeof(wqe->eth.inline_hdr_start)) { ds_cnt += DIV_ROUND_UP(ihs - sizeof(wqe->eth.inline_hdr_start), MLX5_SEND_WQE_DS); } Modified: stable/10/sys/dev/mlx5/qp.h ============================================================================== --- stable/10/sys/dev/mlx5/qp.h Tue Aug 14 11:15:05 2018 (r337741) +++ stable/10/sys/dev/mlx5/qp.h Tue Aug 14 11:19:04 2018 (r337742) @@ -236,8 +236,16 @@ struct mlx5_wqe_eth_seg { u8 swp_flags; __be16 mss; __be32 rsvd2; - __be16 inline_hdr_sz; - u8 inline_hdr_start[2]; + union { + struct { + __be16 inline_hdr_sz; + u8 inline_hdr_start[2]; + }; + struct { + __be16 vlan_cmd; + __be16 vlan_hdr; + }; + }; }; struct mlx5_wqe_xrc_seg { Modified: stable/10/sys/dev/mlx5/vport.h ============================================================================== --- stable/10/sys/dev/mlx5/vport.h Tue Aug 14 11:15:05 2018 (r337741) +++ stable/10/sys/dev/mlx5/vport.h Tue Aug 14 11:19:04 2018 (r337742) @@ -29,6 +29,13 @@ #define __MLX5_VPORT_H__ #include + +enum { + MLX5_CAP_INLINE_MODE_L2, + MLX5_CAP_INLINE_MODE_VPORT_CONTEXT, + MLX5_CAP_INLINE_MODE_NOT_REQUIRED, +}; + int mlx5_vport_alloc_q_counter(struct mlx5_core_dev *mdev, int client_id, u16 *counter_set_id); int mlx5_vport_dealloc_q_counter(struct mlx5_core_dev *mdev, int client_id, @@ -69,6 +76,11 @@ int mlx5_modify_nic_vport_mac_address(struct mlx5_core u16 vport, u8 mac[ETH_ALEN]); int mlx5_set_nic_vport_current_mac(struct mlx5_core_dev *mdev, int vport, bool other_vport, u8 *addr); +int mlx5_query_nic_vport_min_inline(struct mlx5_core_dev *mdev, + u16 vport, u8 *min_inline); +void mlx5_query_min_inline(struct mlx5_core_dev *mdev, u8 *min_inline); +int mlx5_modify_nic_vport_min_inline(struct mlx5_core_dev *mdev, + u16 vport, u8 min_inline); int mlx5_modify_nic_vport_port_guid(struct mlx5_core_dev *mdev, u32 vport, u64 port_guid); int mlx5_modify_nic_vport_node_guid(struct mlx5_core_dev *mdev, From owner-svn-src-stable@freebsd.org Tue Aug 14 11:24:15 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E2291075080; Tue, 14 Aug 2018 11:24:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 14FE98AD36; Tue, 14 Aug 2018 11:24:15 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E4A4B1AED5; Tue, 14 Aug 2018 11:24:14 +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 w7EBOE0Q025722; Tue, 14 Aug 2018 11:24:14 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7EBOExD025720; Tue, 14 Aug 2018 11:24:14 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201808141124.w7EBOExD025720@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 14 Aug 2018 11:24:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r337743 - in stable/10/sys/dev/mlx5: mlx5_core mlx5_en X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/10/sys/dev/mlx5: mlx5_core mlx5_en X-SVN-Commit-Revision: 337743 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2018 11:24:15 -0000 Author: hselasky Date: Tue Aug 14 11:24:14 2018 New Revision: 337743 URL: https://svnweb.freebsd.org/changeset/base/337743 Log: Enter error state when handling bad device in mlx5core and add checks for error state to mlx5en(4) to make live migration work. This is a direct commit. Sponsored by: Mellanox Technologies Modified: stable/10/sys/dev/mlx5/mlx5_core/mlx5_health.c stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Modified: stable/10/sys/dev/mlx5/mlx5_core/mlx5_health.c ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_core/mlx5_health.c Tue Aug 14 11:19:04 2018 (r337742) +++ stable/10/sys/dev/mlx5/mlx5_core/mlx5_health.c Tue Aug 14 11:24:14 2018 (r337743) @@ -56,10 +56,13 @@ static void health_care(struct work_struct *work) priv = container_of(health, struct mlx5_priv, health); dev = container_of(priv, struct mlx5_core_dev, priv); mlx5_core_warn(dev, "handling bad device here\n"); - /* nothing yet */ + spin_lock_irq(&health_lock); list_del_init(&health->list); spin_unlock_irq(&health_lock); + + /* enter error state */ + mlx5_enter_error_state(dev); } } Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Tue Aug 14 11:19:04 2018 (r337742) +++ stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Tue Aug 14 11:24:14 2018 (r337743) @@ -921,8 +921,11 @@ mlx5e_close_rq(struct mlx5e_rq *rq) static void mlx5e_close_rq_wait(struct mlx5e_rq *rq) { + struct mlx5_core_dev *mdev = rq->channel->priv->mdev; + /* wait till RQ is empty */ - while (!mlx5_wq_ll_is_empty(&rq->wq)) { + while (!mlx5_wq_ll_is_empty(&rq->wq) && + (mdev->state != MLX5_DEVICE_STATE_INTERNAL_ERROR)) { msleep(4); rq->cq.mcq.comp(&rq->cq.mcq); } @@ -1264,6 +1267,7 @@ void mlx5e_drain_sq(struct mlx5e_sq *sq) { int error; + struct mlx5_core_dev *mdev = sq->priv->mdev; /* * Check if already stopped. @@ -1296,7 +1300,8 @@ mlx5e_drain_sq(struct mlx5e_sq *sq) /* wait till SQ is empty or link is down */ mtx_lock(&sq->lock); while (sq->cc != sq->pc && - (sq->priv->media_status_last & IFM_ACTIVE) != 0) { + (sq->priv->media_status_last & IFM_ACTIVE) != 0 && + mdev->state != MLX5_DEVICE_STATE_INTERNAL_ERROR) { mtx_unlock(&sq->lock); msleep(1); sq->cq.mcq.comp(&sq->cq.mcq); @@ -1313,7 +1318,8 @@ mlx5e_drain_sq(struct mlx5e_sq *sq) /* wait till SQ is empty */ mtx_lock(&sq->lock); - while (sq->cc != sq->pc) { + while (sq->cc != sq->pc && + mdev->state != MLX5_DEVICE_STATE_INTERNAL_ERROR) { mtx_unlock(&sq->lock); msleep(1); sq->cq.mcq.comp(&sq->cq.mcq); From owner-svn-src-stable@freebsd.org Tue Aug 14 11:43:03 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D54F107593C; Tue, 14 Aug 2018 11:43:03 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 33E2E8B84B; Tue, 14 Aug 2018 11:43:03 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 14E631B20D; Tue, 14 Aug 2018 11:43:03 +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 w7EBh2Zx035850; Tue, 14 Aug 2018 11:43:02 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7EBh2Ml035847; Tue, 14 Aug 2018 11:43:02 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201808141143.w7EBh2Ml035847@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 14 Aug 2018 11:43:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r337746 - stable/10/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/10/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 337746 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2018 11:43:03 -0000 Author: hselasky Date: Tue Aug 14 11:43:02 2018 New Revision: 337746 URL: https://svnweb.freebsd.org/changeset/base/337746 Log: MFC r325661: Expose the current hardware MTU in mlx5en(4) as a separate entry in the sysctl tree. Sponsored by: Mellanox Technologies Modified: stable/10/sys/dev/mlx5/mlx5_en/en.h stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_en/en.h Tue Aug 14 11:42:32 2018 (r337745) +++ stable/10/sys/dev/mlx5/mlx5_en/en.h Tue Aug 14 11:43:02 2018 (r337746) @@ -428,7 +428,8 @@ struct mlx5e_params { m(+1, u64 hw_lro, "hw_lro", "set to enable hw_lro") \ m(+1, u64 cqe_zipping, "cqe_zipping", "0 : CQE zipping disabled") \ m(+1, u64 diag_pci_enable, "diag_pci_enable", "0: Disabled 1: Enabled") \ - m(+1, u64 diag_general_enable, "diag_general_enable", "0: Disabled 1: Enabled") + m(+1, u64 diag_general_enable, "diag_general_enable", "0: Disabled 1: Enabled") \ + m(+1, u64 hw_mtu, "hw_mtu", "Current hardware MTU value") #define MLX5E_PARAMS_NUM (0 MLX5E_PARAMS(MLX5E_STATS_COUNT)) Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Tue Aug 14 11:42:32 2018 (r337745) +++ stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Tue Aug 14 11:43:02 2018 (r337746) @@ -714,7 +714,8 @@ mlx5e_create_ethtool(struct mlx5e_priv *priv) return; for (x = 0; x != MLX5E_PARAMS_NUM; x++) { /* check for read-only parameter */ - if (strstr(mlx5e_params_desc[2 * x], "_max") != NULL) { + if (strstr(mlx5e_params_desc[2 * x], "_max") != NULL || + strstr(mlx5e_params_desc[2 * x], "_mtu") != NULL) { SYSCTL_ADD_PROC(&priv->sysctl_ctx, SYSCTL_CHILDREN(node), OID_AUTO, mlx5e_params_desc[2 * x], CTLTYPE_U64 | CTLFLAG_RD | CTLFLAG_MPSAFE, priv, x, &mlx5e_ethtool_handler, "QU", Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Tue Aug 14 11:42:32 2018 (r337745) +++ stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Tue Aug 14 11:43:02 2018 (r337746) @@ -2353,10 +2353,13 @@ mlx5e_set_dev_port_mtu(struct ifnet *ifp, int sw_mtu) __func__, sw_mtu, err); return (err); } + + ifp->if_mtu = sw_mtu; err = mlx5_query_port_oper_mtu(mdev, &hw_mtu); if (err) { if_printf(ifp, "Query port MTU, after setting new " "MTU value, failed\n"); + return (err); } else if (MLX5E_HW2SW_MTU(hw_mtu) < sw_mtu) { err = -E2BIG, if_printf(ifp, "Port MTU %d is smaller than " @@ -2366,7 +2369,8 @@ mlx5e_set_dev_port_mtu(struct ifnet *ifp, int sw_mtu) if_printf(ifp, "Port MTU %d is bigger than " "ifp mtu %d\n", hw_mtu, sw_mtu); } - ifp->if_mtu = sw_mtu; + priv->params_ethtool.hw_mtu = hw_mtu; + return (err); } From owner-svn-src-stable@freebsd.org Tue Aug 14 11:44:12 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6115110759CE; Tue, 14 Aug 2018 11:44:12 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 175738B9B2; Tue, 14 Aug 2018 11:44:12 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ED6861B20E; Tue, 14 Aug 2018 11:44:11 +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 w7EBiBwZ035978; Tue, 14 Aug 2018 11:44:11 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7EBiBqG035977; Tue, 14 Aug 2018 11:44:11 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201808141144.w7EBiBqG035977@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 14 Aug 2018 11:44:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r337747 - stable/10/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/10/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 337747 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2018 11:44:12 -0000 Author: hselasky Date: Tue Aug 14 11:44:11 2018 New Revision: 337747 URL: https://svnweb.freebsd.org/changeset/base/337747 Log: MFC r330657: Use vport rather than physical-port MTU in mlx5en(4). Set and report vport MTU rather than physical MTU, The driver will set both vport and physical port mtu and will rely on the query of vport mtu. SRIOV VFs have to report their MTU to their vport manager (PF), and this will allow them to work with any MTU they need without failing the request. Also for some cases where the PF is not a port owner, PF can work with MTU less than the physical port mtu if set physical port mtu didn't take effect. Based on Linux upstream commit: cd255efff9baadd654d6160e52d17ae7c568c9d3 Submitted by: Meny Yossefi Sponsored by: Mellanox Technologies Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Tue Aug 14 11:43:02 2018 (r337746) +++ stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Tue Aug 14 11:44:11 2018 (r337747) @@ -2347,15 +2347,29 @@ mlx5e_set_dev_port_mtu(struct ifnet *ifp, int sw_mtu) int hw_mtu; int err; - err = mlx5_set_port_mtu(mdev, MLX5E_SW2HW_MTU(sw_mtu)); + hw_mtu = MLX5E_SW2HW_MTU(sw_mtu); + + err = mlx5_set_port_mtu(mdev, hw_mtu); if (err) { if_printf(ifp, "%s: mlx5_set_port_mtu failed setting %d, err=%d\n", __func__, sw_mtu, err); return (err); } + /* Update vport context MTU */ + err = mlx5_set_vport_mtu(mdev, hw_mtu); + if (err) { + if_printf(ifp, "%s: Failed updating vport context with MTU size, err=%d\n", + __func__, err); + } + ifp->if_mtu = sw_mtu; - err = mlx5_query_port_oper_mtu(mdev, &hw_mtu); + + err = mlx5_query_vport_mtu(mdev, &hw_mtu); + if (err || !hw_mtu) { + /* fallback to port oper mtu */ + err = mlx5_query_port_oper_mtu(mdev, &hw_mtu); + } if (err) { if_printf(ifp, "Query port MTU, after setting new " "MTU value, failed\n"); From owner-svn-src-stable@freebsd.org Tue Aug 14 11:52:07 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 116331075BF3; Tue, 14 Aug 2018 11:52:07 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B2C858BD90; Tue, 14 Aug 2018 11:52:06 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 951951B36C; Tue, 14 Aug 2018 11:52:06 +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 w7EBq67d037736; Tue, 14 Aug 2018 11:52:06 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7EBq66J037734; Tue, 14 Aug 2018 11:52:06 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201808141152.w7EBq66J037734@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 14 Aug 2018 11:52:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r337748 - in stable/10/sys/dev/mlx5: mlx5_core mlx5_en mlx5_ib X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/10/sys/dev/mlx5: mlx5_core mlx5_en mlx5_ib X-SVN-Commit-Revision: 337748 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2018 11:52:07 -0000 Author: hselasky Date: Tue Aug 14 11:52:05 2018 New Revision: 337748 URL: https://svnweb.freebsd.org/changeset/base/337748 Log: Bump the mlx5core, mlx5en(4) and mlx5ib driver version. This is a direct commit. Sponsored by: Mellanox Technologies Modified: stable/10/sys/dev/mlx5/mlx5_core/mlx5_core.h stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c stable/10/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Modified: stable/10/sys/dev/mlx5/mlx5_core/mlx5_core.h ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_core/mlx5_core.h Tue Aug 14 11:44:11 2018 (r337747) +++ stable/10/sys/dev/mlx5/mlx5_core/mlx5_core.h Tue Aug 14 11:52:05 2018 (r337748) @@ -33,8 +33,8 @@ #include #define DRIVER_NAME "mlx5_core" -#define DRIVER_VERSION "1.23.0 (03 Mar 2015)" -#define DRIVER_RELDATE "03 Mar 2015" +#define DRIVER_VERSION "3.2.1" +#define DRIVER_RELDATE "August 2018" extern int mlx5_core_debug_mask; Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Tue Aug 14 11:44:11 2018 (r337747) +++ stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Tue Aug 14 11:52:05 2018 (r337748) @@ -30,7 +30,7 @@ #include #include -#define ETH_DRIVER_VERSION "3.1.0-dev" +#define ETH_DRIVER_VERSION "3.2.1" char mlx5e_version[] = "Mellanox Ethernet driver" " (" ETH_DRIVER_VERSION ")"; Modified: stable/10/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Tue Aug 14 11:44:11 2018 (r337747) +++ stable/10/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Tue Aug 14 11:52:05 2018 (r337748) @@ -50,8 +50,8 @@ #include #define DRIVER_NAME "mlx5_ib" -#define DRIVER_VERSION "3.2-rc1" -#define DRIVER_RELDATE "May 2016" +#define DRIVER_VERSION "3.2.1" +#define DRIVER_RELDATE "August 2018" #undef MODULE_VERSION #include From owner-svn-src-stable@freebsd.org Tue Aug 14 14:01:13 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C65E2107907D; Tue, 14 Aug 2018 14:01:13 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 79EE7704E4; Tue, 14 Aug 2018 14:01:13 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5C88C1C752; Tue, 14 Aug 2018 14:01: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 w7EE1DW8004305; Tue, 14 Aug 2018 14:01:13 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7EE1D1P004300; Tue, 14 Aug 2018 14:01:13 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201808141401.w7EE1D1P004300@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 14 Aug 2018 14:01:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337753 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 337753 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2018 14:01:14 -0000 Author: kib Date: Tue Aug 14 14:01:12 2018 New Revision: 337753 URL: https://svnweb.freebsd.org/changeset/base/337753 Log: MFC r337430, r337436: Add missed handling of local relocs against ifunc target in the obj modules. Modified: stable/11/sys/kern/link_elf_obj.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/link_elf_obj.c ============================================================================== --- stable/11/sys/kern/link_elf_obj.c Tue Aug 14 13:56:49 2018 (r337752) +++ stable/11/sys/kern/link_elf_obj.c Tue Aug 14 14:01:12 2018 (r337753) @@ -140,7 +140,7 @@ static int link_elf_each_function_name(linker_file_t, static int link_elf_each_function_nameval(linker_file_t, linker_function_nameval_callback_t, void *); -static int link_elf_reloc_local(linker_file_t); +static int link_elf_reloc_local(linker_file_t, bool); static long link_elf_symtab_get(linker_file_t, const Elf_Sym **); static long link_elf_strtab_get(linker_file_t, caddr_t *); @@ -439,10 +439,9 @@ link_elf_link_preload(linker_class_t cls, const char * } /* Local intra-module relocations */ - error = link_elf_reloc_local(lf); + error = link_elf_reloc_local(lf, false); if (error != 0) goto out; - *result = lf; return (0); @@ -477,13 +476,20 @@ link_elf_link_preload_finish(linker_file_t lf) ef = (elf_file_t)lf; error = relocate_file(ef); if (error) - return error; + return (error); /* Notify MD code that a module is being loaded. */ error = elf_cpu_load_file(lf); if (error) return (error); +#if defined(__i386__) || defined(__amd64__) + /* Now ifuncs. */ + error = link_elf_reloc_local(lf, true); + if (error != 0) + return (error); +#endif + /* Invoke .ctors */ link_elf_invoke_ctors(lf->ctors_addr, lf->ctors_size); return (0); @@ -962,7 +968,7 @@ link_elf_load_file(linker_class_t cls, const char *fil } /* Local intra-module relocations */ - error = link_elf_reloc_local(lf); + error = link_elf_reloc_local(lf, false); if (error != 0) goto out; @@ -983,6 +989,13 @@ link_elf_load_file(linker_class_t cls, const char *fil if (error) goto out; +#if defined(__i386__) || defined(__amd64__) + /* Now ifuncs. */ + error = link_elf_reloc_local(lf, true); + if (error != 0) + goto out; +#endif + /* Invoke .ctors */ link_elf_invoke_ctors(lf->ctors_addr, lf->ctors_size); @@ -1366,7 +1379,10 @@ elf_obj_lookup(linker_file_t lf, Elf_Size symidx, int /* Quick answer if there is a definition included. */ if (sym->st_shndx != SHN_UNDEF) { - *res = sym->st_value; + res1 = (Elf_Addr)sym->st_value; + if (ELF_ST_TYPE(sym->st_info) == STT_GNU_IFUNC) + res1 = ((Elf_Addr (*)(void))res1)(); + *res = res1; return (0); } @@ -1462,7 +1478,7 @@ link_elf_fix_link_set(elf_file_t ef) } static int -link_elf_reloc_local(linker_file_t lf) +link_elf_reloc_local(linker_file_t lf, bool ifuncs) { elf_file_t ef = (elf_file_t)lf; const Elf_Rel *rellim; @@ -1497,8 +1513,15 @@ link_elf_reloc_local(linker_file_t lf) /* Only do local relocs */ if (ELF_ST_BIND(sym->st_info) != STB_LOCAL) continue; - elf_reloc_local(lf, base, rel, ELF_RELOC_REL, - elf_obj_lookup); + if ((ELF_ST_TYPE(sym->st_info) == STT_GNU_IFUNC) == + ifuncs) + elf_reloc_local(lf, base, rel, ELF_RELOC_REL, + elf_obj_lookup); +#if defined(__i386__) || defined(__amd64__) + else if (ifuncs) + elf_reloc_ifunc(lf, base, rel, ELF_RELOC_REL, + elf_obj_lookup); +#endif } } @@ -1523,8 +1546,15 @@ link_elf_reloc_local(linker_file_t lf) /* Only do local relocs */ if (ELF_ST_BIND(sym->st_info) != STB_LOCAL) continue; - elf_reloc_local(lf, base, rela, ELF_RELOC_RELA, - elf_obj_lookup); + if ((ELF_ST_TYPE(sym->st_info) == STT_GNU_IFUNC) == + ifuncs) + elf_reloc_local(lf, base, rela, ELF_RELOC_RELA, + elf_obj_lookup); +#if defined(__i386__) || defined(__amd64__) + else if (ifuncs) + elf_reloc_ifunc(lf, base, rela, ELF_RELOC_RELA, + elf_obj_lookup); +#endif } } return (0); From owner-svn-src-stable@freebsd.org Tue Aug 14 14:17:22 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05CE910797B3; Tue, 14 Aug 2018 14:17:22 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AE7D271189; Tue, 14 Aug 2018 14:17:21 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8B3C71CA6B; Tue, 14 Aug 2018 14:17:21 +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 w7EEHL9x013431; Tue, 14 Aug 2018 14:17:21 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7EEHLCF013430; Tue, 14 Aug 2018 14:17:21 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201808141417.w7EEHLCF013430@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 14 Aug 2018 14:17:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337755 - stable/11/sys/dev/mii X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/sys/dev/mii X-SVN-Commit-Revision: 337755 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2018 14:17:22 -0000 Author: markj Date: Tue Aug 14 14:17:20 2018 New Revision: 337755 URL: https://svnweb.freebsd.org/changeset/base/337755 Log: MFC r337425: Recognize ICS1893C PHYs. Modified: stable/11/sys/dev/mii/icsphy.c stable/11/sys/dev/mii/miidevs Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mii/icsphy.c ============================================================================== --- stable/11/sys/dev/mii/icsphy.c Tue Aug 14 14:02:53 2018 (r337754) +++ stable/11/sys/dev/mii/icsphy.c Tue Aug 14 14:17:20 2018 (r337755) @@ -111,6 +111,7 @@ static const struct mii_phydesc icsphys[] = { MII_PHY_DESC(ICS, 1890), MII_PHY_DESC(ICS, 1892), MII_PHY_DESC(ICS, 1893), + MII_PHY_DESC(ICS, 1893C), MII_PHY_END }; Modified: stable/11/sys/dev/mii/miidevs ============================================================================== --- stable/11/sys/dev/mii/miidevs Tue Aug 14 14:02:53 2018 (r337754) +++ stable/11/sys/dev/mii/miidevs Tue Aug 14 14:17:20 2018 (r337755) @@ -224,6 +224,7 @@ model ICS 1889 0x0001 ICS1889 10/100 media interface model ICS 1890 0x0002 ICS1890 10/100 media interface model ICS 1892 0x0003 ICS1892 10/100 media interface model ICS 1893 0x0004 ICS1893 10/100 media interface +model ICS 1893C 0x0005 ICS1893C 10/100 media interface /* Intel Corporation PHYs */ model xxINTEL I82553 0x0000 i82553 10/100 media interface From owner-svn-src-stable@freebsd.org Tue Aug 14 14:17:56 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C36611079807; Tue, 14 Aug 2018 14:17:56 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7718F712B3; Tue, 14 Aug 2018 14:17:56 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5847F1CA6D; Tue, 14 Aug 2018 14:17:56 +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 w7EEHu5o013508; Tue, 14 Aug 2018 14:17:56 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7EEHuWR013507; Tue, 14 Aug 2018 14:17:56 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201808141417.w7EEHuWR013507@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 14 Aug 2018 14:17:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337756 - stable/11/sbin/ifconfig X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/sbin/ifconfig X-SVN-Commit-Revision: 337756 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2018 14:17:56 -0000 Author: markj Date: Tue Aug 14 14:17:55 2018 New Revision: 337756 URL: https://svnweb.freebsd.org/changeset/base/337756 Log: MFC r337426: ifconfig: Fix use of _Noreturn Modified: stable/11/sbin/ifconfig/ifconfig.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ifconfig/ifconfig.c ============================================================================== --- stable/11/sbin/ifconfig/ifconfig.c Tue Aug 14 14:17:20 2018 (r337755) +++ stable/11/sbin/ifconfig/ifconfig.c Tue Aug 14 14:17:55 2018 (r337756) @@ -106,7 +106,7 @@ static int ifconfig(int argc, char *const *argv, int i static void status(const struct afswtch *afp, const struct sockaddr_dl *sdl, struct ifaddrs *ifa); static void tunnel_status(int s); -static void usage(void) _Noreturn; +static _Noreturn void usage(void); static struct afswtch *af_getbyname(const char *name); static struct afswtch *af_getbyfamily(int af); From owner-svn-src-stable@freebsd.org Tue Aug 14 14:19:57 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1ABD1079920; Tue, 14 Aug 2018 14:19:57 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 96CEC71539; Tue, 14 Aug 2018 14:19:57 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 77E5D1CA6F; Tue, 14 Aug 2018 14:19:57 +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 w7EEJvgO013650; Tue, 14 Aug 2018 14:19:57 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7EEJvEI013649; Tue, 14 Aug 2018 14:19:57 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201808141419.w7EEJvEI013649@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 14 Aug 2018 14:19:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r337757 - stable/10/sbin/ifconfig X-SVN-Group: stable-10 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/10/sbin/ifconfig X-SVN-Commit-Revision: 337757 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2018 14:19:58 -0000 Author: markj Date: Tue Aug 14 14:19:57 2018 New Revision: 337757 URL: https://svnweb.freebsd.org/changeset/base/337757 Log: MFC r337426: ifconfig: Fix use of _Noreturn. Modified: stable/10/sbin/ifconfig/ifconfig.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ifconfig/ifconfig.c ============================================================================== --- stable/10/sbin/ifconfig/ifconfig.c Tue Aug 14 14:17:55 2018 (r337756) +++ stable/10/sbin/ifconfig/ifconfig.c Tue Aug 14 14:19:57 2018 (r337757) @@ -103,7 +103,7 @@ static int ifconfig(int argc, char *const *argv, int i static void status(const struct afswtch *afp, const struct sockaddr_dl *sdl, struct ifaddrs *ifa); static void tunnel_status(int s); -static void usage(void) _Noreturn; +static _Noreturn void usage(void); static struct afswtch *af_getbyname(const char *name); static struct afswtch *af_getbyfamily(int af); From owner-svn-src-stable@freebsd.org Tue Aug 14 16:22:05 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E47F6107D2B0; Tue, 14 Aug 2018 16:22:04 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9A11177C4F; Tue, 14 Aug 2018 16:22:04 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7B6651DEA7; Tue, 14 Aug 2018 16:22:04 +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 w7EGM42s081252; Tue, 14 Aug 2018 16:22:04 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7EGM4ve081251; Tue, 14 Aug 2018 16:22:04 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201808141622.w7EGM4ve081251@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 14 Aug 2018 16:22:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337766 - stable/11/contrib/flex X-SVN-Group: stable-11 X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: stable/11/contrib/flex X-SVN-Commit-Revision: 337766 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2018 16:22:05 -0000 Author: brooks Date: Tue Aug 14 16:22:04 2018 New Revision: 337766 URL: https://svnweb.freebsd.org/changeset/base/337766 Log: MFC r337508: Terminate filter_create_ext() args with NULL, not 0. filter_create_ext() is documented to take a NULL terminated set of arguments. 0 is promoted to an int so this would fail on 64-bit systems if the value was not passed in a register. On all currently supported 64-bit architectures it is. Obtained from: CheriBSD Sponsored by: DARPA, AFRL Modified: stable/11/contrib/flex/main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/flex/main.c ============================================================================== --- stable/11/contrib/flex/main.c Tue Aug 14 16:18:56 2018 (r337765) +++ stable/11/contrib/flex/main.c Tue Aug 14 16:22:04 2018 (r337766) @@ -364,7 +364,7 @@ void check_options () output_chain = filter_create_int(NULL, filter_tee_header, headerfilename); if ( !(m4 = getenv("M4"))) m4 = M4; - filter_create_ext(output_chain, m4, "-gP", 0); + filter_create_ext(output_chain, m4, "-gP", NULL); filter_create_int(output_chain, filter_fix_linedirs, NULL); /* For debugging, only run the requested number of filters. */ From owner-svn-src-stable@freebsd.org Tue Aug 14 16:25:10 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 79F06107D44C; Tue, 14 Aug 2018 16:25:10 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2EF8D7802C; Tue, 14 Aug 2018 16:25:10 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1120B1DFCB; Tue, 14 Aug 2018 16:25:10 +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 w7EGP9EF082197; Tue, 14 Aug 2018 16:25:09 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7EGP9Li082196; Tue, 14 Aug 2018 16:25:09 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201808141625.w7EGP9Li082196@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 14 Aug 2018 16:25:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r337768 - stable/10/contrib/flex X-SVN-Group: stable-10 X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: stable/10/contrib/flex X-SVN-Commit-Revision: 337768 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2018 16:25:10 -0000 Author: brooks Date: Tue Aug 14 16:25:09 2018 New Revision: 337768 URL: https://svnweb.freebsd.org/changeset/base/337768 Log: MFC r337508: Terminate filter_create_ext() args with NULL, not 0. filter_create_ext() is documented to take a NULL terminated set of arguments. 0 is promoted to an int so this would fail on 64-bit systems if the value was not passed in a register. On all currently supported 64-bit architectures it is. Obtained from: CheriBSD Sponsored by: DARPA, AFRL Modified: stable/10/contrib/flex/main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/flex/main.c ============================================================================== --- stable/10/contrib/flex/main.c Tue Aug 14 16:22:14 2018 (r337767) +++ stable/10/contrib/flex/main.c Tue Aug 14 16:25:09 2018 (r337768) @@ -364,7 +364,7 @@ void check_options () output_chain = filter_create_int(NULL, filter_tee_header, headerfilename); if ( !(m4 = getenv("M4"))) m4 = M4; - filter_create_ext(output_chain, m4, "-gP", 0); + filter_create_ext(output_chain, m4, "-gP", NULL); filter_create_int(output_chain, filter_fix_linedirs, NULL); /* For debugging, only run the requested number of filters. */ From owner-svn-src-stable@freebsd.org Tue Aug 14 17:43:12 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1231A107F9E8; Tue, 14 Aug 2018 17:43:12 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B79217DD4E; Tue, 14 Aug 2018 17:43:11 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7EB621ED4E; Tue, 14 Aug 2018 17:43:11 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7EHhBfi026884; Tue, 14 Aug 2018 17:43:11 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7EHhBKS026883; Tue, 14 Aug 2018 17:43:11 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201808141743.w7EHhBKS026883@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Tue, 14 Aug 2018 17:43:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337789 - stable/11/sys/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: jtl X-SVN-Commit-Paths: stable/11/sys/netinet X-SVN-Commit-Revision: 337789 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2018 17:43:12 -0000 Author: jtl Date: Tue Aug 14 17:43:11 2018 New Revision: 337789 URL: https://svnweb.freebsd.org/changeset/base/337789 Log: MFC r337775: Improve hashing of IPv4 fragments. Currently, IPv4 fragments are hashed into buckets based on a 32-bit key which is calculated by (src_ip ^ ip_id) and combined with a random seed. However, because an attacker can control the values of src_ip and ip_id, it is possible to construct an attack which causes very deep chains to form in a given bucket. To ensure more uniform distribution (and lower predictability for an attacker), calculate the hash based on a key which includes all the fields we use to identify a reassembly queue (dst_ip, src_ip, ip_id, and the ip protocol) as well as a random seed. Security: FreeBSD-SA-18:10.ip Security: CVE-2018-6923 Modified: stable/11/sys/netinet/ip_reass.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/ip_reass.c ============================================================================== --- stable/11/sys/netinet/ip_reass.c Tue Aug 14 17:36:21 2018 (r337788) +++ stable/11/sys/netinet/ip_reass.c Tue Aug 14 17:43:11 2018 (r337789) @@ -148,7 +148,7 @@ ip_reass(struct mbuf *m) struct ipqhead *head; int i, hlen, next; u_int8_t ecn, ecn0; - uint32_t hash; + uint32_t hash, hashkey[3]; #ifdef RSS uint32_t rss_hash, rss_type; #endif @@ -202,8 +202,12 @@ ip_reass(struct mbuf *m) m->m_data += hlen; m->m_len -= hlen; - hash = ip->ip_src.s_addr ^ ip->ip_id; - hash = jenkins_hash32(&hash, 1, V_ipq_hashseed) & IPREASS_HMASK; + hashkey[0] = ip->ip_src.s_addr; + hashkey[1] = ip->ip_dst.s_addr; + hashkey[2] = (uint32_t)ip->ip_p << 16; + hashkey[2] += ip->ip_id; + hash = jenkins_hash32(hashkey, nitems(hashkey), V_ipq_hashseed); + hash &= IPREASS_HMASK; head = &V_ipq[hash].head; IPQ_LOCK(hash); From owner-svn-src-stable@freebsd.org Tue Aug 14 17:46:55 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38E94107FACA; Tue, 14 Aug 2018 17:46:55 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E09177DFAA; Tue, 14 Aug 2018 17:46:54 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A49371ED4F; Tue, 14 Aug 2018 17:46:54 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7EHksGZ027122; Tue, 14 Aug 2018 17:46:54 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7EHkskL027121; Tue, 14 Aug 2018 17:46:54 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201808141746.w7EHkskL027121@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Tue, 14 Aug 2018 17:46:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337790 - stable/11/sys/netinet6 X-SVN-Group: stable-11 X-SVN-Commit-Author: jtl X-SVN-Commit-Paths: stable/11/sys/netinet6 X-SVN-Commit-Revision: 337790 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2018 17:46:55 -0000 Author: jtl Date: Tue Aug 14 17:46:54 2018 New Revision: 337790 URL: https://svnweb.freebsd.org/changeset/base/337790 Log: MFC r337776: Improve IPv6 reassembly performance by hashing fragments into buckets. Currently, all IPv6 fragment reassembly queues are kept in a flat linked list. This has a number of implications. Two significant implications are: all reassembly operations share a common lock, and it is possible for the linked list to grow quite large. Improve IPv6 reassembly performance by hashing fragments into buckets, each of which has its own lock. Calculate the hash key using a Jenkins hash with a random seed. Approved by: so Security: FreeBSD-SA-18:10.ip Security: CVE-2018-6923 Modified: stable/11/sys/netinet6/frag6.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet6/frag6.c ============================================================================== --- stable/11/sys/netinet6/frag6.c Tue Aug 14 17:43:11 2018 (r337789) +++ stable/11/sys/netinet6/frag6.c Tue Aug 14 17:46:54 2018 (r337790) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -47,6 +48,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include #include #include @@ -63,29 +66,41 @@ __FBSDID("$FreeBSD$"); #include -static void frag6_enq(struct ip6asfrag *, struct ip6asfrag *); -static void frag6_deq(struct ip6asfrag *); -static void frag6_insque(struct ip6q *, struct ip6q *); -static void frag6_remque(struct ip6q *); -static void frag6_freef(struct ip6q *); - -static struct mtx ip6qlock; /* - * These fields all protected by ip6qlock. + * Reassembly headers are stored in hash buckets. */ -static VNET_DEFINE(u_int, frag6_nfragpackets); -static VNET_DEFINE(u_int, frag6_nfrags); -static VNET_DEFINE(struct ip6q, ip6q); /* ip6 reassemble queue */ +#define IP6REASS_NHASH_LOG2 6 +#define IP6REASS_NHASH (1 << IP6REASS_NHASH_LOG2) +#define IP6REASS_HMASK (IP6REASS_NHASH - 1) +static void frag6_enq(struct ip6asfrag *, struct ip6asfrag *, + uint32_t bucket __unused); +static void frag6_deq(struct ip6asfrag *, uint32_t bucket __unused); +static void frag6_insque_head(struct ip6q *, struct ip6q *, + uint32_t bucket __unused); +static void frag6_remque(struct ip6q *, uint32_t bucket __unused); +static void frag6_freef(struct ip6q *, uint32_t bucket); + +struct ip6qbucket { + struct ip6q ip6q; + struct mtx lock; +}; + +static VNET_DEFINE(volatile u_int, frag6_nfragpackets); +static VNET_DEFINE(volatile u_int, frag6_nfrags); +static VNET_DEFINE(struct ip6qbucket, ip6q[IP6REASS_NHASH]); +static VNET_DEFINE(uint32_t, ip6q_hashseed); + #define V_frag6_nfragpackets VNET(frag6_nfragpackets) #define V_frag6_nfrags VNET(frag6_nfrags) #define V_ip6q VNET(ip6q) +#define V_ip6q_hashseed VNET(ip6q_hashseed) -#define IP6Q_LOCK_INIT() mtx_init(&ip6qlock, "ip6qlock", NULL, MTX_DEF); -#define IP6Q_LOCK() mtx_lock(&ip6qlock) -#define IP6Q_TRYLOCK() mtx_trylock(&ip6qlock) -#define IP6Q_LOCK_ASSERT() mtx_assert(&ip6qlock, MA_OWNED) -#define IP6Q_UNLOCK() mtx_unlock(&ip6qlock) +#define IP6Q_LOCK(i) mtx_lock(&V_ip6q[(i)].lock) +#define IP6Q_TRYLOCK(i) mtx_trylock(&V_ip6q[(i)].lock) +#define IP6Q_LOCK_ASSERT(i) mtx_assert(&V_ip6q[(i)].lock, MA_OWNED) +#define IP6Q_UNLOCK(i) mtx_unlock(&V_ip6q[(i)].lock) +#define IP6Q_HEAD(i) (&V_ip6q[(i)].ip6q) static MALLOC_DEFINE(M_FTABLE, "fragment", "fragment reassembly header"); @@ -103,18 +118,22 @@ frag6_change(void *tag) void frag6_init(void) { + struct ip6q *q6; + int i; V_ip6_maxfragpackets = nmbclusters / 4; V_ip6_maxfrags = nmbclusters / 4; - V_ip6q.ip6q_next = V_ip6q.ip6q_prev = &V_ip6q; - + for (i = 0; i < IP6REASS_NHASH; i++) { + q6 = IP6Q_HEAD(i); + q6->ip6q_next = q6->ip6q_prev = q6; + mtx_init(&V_ip6q[i].lock, "ip6qlock", NULL, MTX_DEF); + } + V_ip6q_hashseed = arc4random(); if (!IS_DEFAULT_VNET(curvnet)) return; EVENTHANDLER_REGISTER(nmbclusters_change, frag6_change, NULL, EVENTHANDLER_PRI_ANY); - - IP6Q_LOCK_INIT(); } /* @@ -155,12 +174,13 @@ frag6_input(struct mbuf **mp, int *offp, int proto) struct mbuf *m = *mp, *t; struct ip6_hdr *ip6; struct ip6_frag *ip6f; - struct ip6q *q6; + struct ip6q *head, *q6; struct ip6asfrag *af6, *ip6af, *af6dwn; struct in6_ifaddr *ia; int offset = *offp, nxt, i, next; int first_frag = 0; int fragoff, frgpartlen; /* must be larger than u_int16_t */ + uint32_t hash, hashkey[sizeof(struct in6_addr) * 2 + 1], *hashkeyp; struct ifnet *dstifp; u_int8_t ecn, ecn0; #ifdef RSS @@ -229,7 +249,16 @@ frag6_input(struct mbuf **mp, int *offp, int proto) return (ip6f->ip6f_nxt); } - IP6Q_LOCK(); + hashkeyp = hashkey; + memcpy(hashkeyp, &ip6->ip6_src, sizeof(struct in6_addr)); + hashkeyp += sizeof(struct in6_addr) / sizeof(*hashkeyp); + memcpy(hashkeyp, &ip6->ip6_dst, sizeof(struct in6_addr)); + hashkeyp += sizeof(struct in6_addr) / sizeof(*hashkeyp); + *hashkeyp = ip6f->ip6f_ident; + hash = jenkins_hash32(hashkey, nitems(hashkey), V_ip6q_hashseed); + hash &= IP6REASS_HMASK; + head = IP6Q_HEAD(hash); + IP6Q_LOCK(hash); /* * Enforce upper bound on number of fragments. @@ -241,7 +270,7 @@ frag6_input(struct mbuf **mp, int *offp, int proto) else if (V_frag6_nfrags >= (u_int)V_ip6_maxfrags) goto dropfrag; - for (q6 = V_ip6q.ip6q_next; q6 != &V_ip6q; q6 = q6->ip6q_next) + for (q6 = head->ip6q_next; q6 != head; q6 = q6->ip6q_next) if (ip6f->ip6f_ident == q6->ip6q_ident && IN6_ARE_ADDR_EQUAL(&ip6->ip6_src, &q6->ip6q_src) && IN6_ARE_ADDR_EQUAL(&ip6->ip6_dst, &q6->ip6q_dst) @@ -251,7 +280,7 @@ frag6_input(struct mbuf **mp, int *offp, int proto) ) break; - if (q6 == &V_ip6q) { + if (q6 == head) { /* * the first fragment to arrive, create a reassembly queue. */ @@ -268,7 +297,7 @@ frag6_input(struct mbuf **mp, int *offp, int proto) ; else if (V_frag6_nfragpackets >= (u_int)V_ip6_maxfragpackets) goto dropfrag; - V_frag6_nfragpackets++; + atomic_add_int(&V_frag6_nfragpackets, 1); q6 = (struct ip6q *)malloc(sizeof(struct ip6q), M_FTABLE, M_NOWAIT); if (q6 == NULL) @@ -281,7 +310,7 @@ frag6_input(struct mbuf **mp, int *offp, int proto) } mac_ip6q_create(m, q6); #endif - frag6_insque(q6, &V_ip6q); + frag6_insque_head(q6, head, hash); /* ip6q_nxt will be filled afterwards, from 1st fragment */ q6->ip6q_down = q6->ip6q_up = (struct ip6asfrag *)q6; @@ -322,14 +351,14 @@ frag6_input(struct mbuf **mp, int *offp, int proto) icmp6_error(m, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_HEADER, offset - sizeof(struct ip6_frag) + offsetof(struct ip6_frag, ip6f_offlg)); - IP6Q_UNLOCK(); + IP6Q_UNLOCK(hash); return (IPPROTO_DONE); } } else if (fragoff + frgpartlen > IPV6_MAXPACKET) { icmp6_error(m, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_HEADER, offset - sizeof(struct ip6_frag) + offsetof(struct ip6_frag, ip6f_offlg)); - IP6Q_UNLOCK(); + IP6Q_UNLOCK(hash); return (IPPROTO_DONE); } /* @@ -348,7 +377,7 @@ frag6_input(struct mbuf **mp, int *offp, int proto) int erroff = af6->ip6af_offset; /* dequeue the fragment. */ - frag6_deq(af6); + frag6_deq(af6, hash); free(af6, M_FTABLE); /* adjust pointer. */ @@ -446,7 +475,7 @@ frag6_input(struct mbuf **mp, int *offp, int proto) } af6 = af6->ip6af_down; m_freem(IP6_REASS_MBUF(af6->ip6af_up)); - frag6_deq(af6->ip6af_up); + frag6_deq(af6->ip6af_up, hash); } #else /* @@ -498,26 +527,26 @@ insert: * Move to front of packet queue, as we are * the most recently active fragmented packet. */ - frag6_enq(ip6af, af6->ip6af_up); - V_frag6_nfrags++; + frag6_enq(ip6af, af6->ip6af_up, hash); + atomic_add_int(&V_frag6_nfrags, 1); q6->ip6q_nfrag++; #if 0 /* xxx */ - if (q6 != V_ip6q.ip6q_next) { - frag6_remque(q6); - frag6_insque(q6, &V_ip6q); + if (q6 != head->ip6q_next) { + frag6_remque(q6, hash); + frag6_insque_head(q6, head, hash); } #endif next = 0; for (af6 = q6->ip6q_down; af6 != (struct ip6asfrag *)q6; af6 = af6->ip6af_down) { if (af6->ip6af_off != next) { - IP6Q_UNLOCK(); + IP6Q_UNLOCK(hash); return IPPROTO_DONE; } next += af6->ip6af_frglen; } if (af6->ip6af_up->ip6af_mff) { - IP6Q_UNLOCK(); + IP6Q_UNLOCK(hash); return IPPROTO_DONE; } @@ -527,7 +556,7 @@ insert: ip6af = q6->ip6q_down; t = m = IP6_REASS_MBUF(ip6af); af6 = ip6af->ip6af_down; - frag6_deq(ip6af); + frag6_deq(ip6af, hash); while (af6 != (struct ip6asfrag *)q6) { m->m_pkthdr.csum_flags &= IP6_REASS_MBUF(af6)->m_pkthdr.csum_flags; @@ -535,7 +564,7 @@ insert: IP6_REASS_MBUF(af6)->m_pkthdr.csum_data; af6dwn = af6->ip6af_down; - frag6_deq(af6); + frag6_deq(af6, hash); while (t->m_next) t = t->m_next; m_adj(IP6_REASS_MBUF(af6), af6->ip6af_offset); @@ -562,13 +591,13 @@ insert: #endif if (ip6_deletefraghdr(m, offset, M_NOWAIT) != 0) { - frag6_remque(q6); - V_frag6_nfrags -= q6->ip6q_nfrag; + frag6_remque(q6, hash); + atomic_subtract_int(&V_frag6_nfrags, q6->ip6q_nfrag); #ifdef MAC mac_ip6q_destroy(q6); #endif free(q6, M_FTABLE); - V_frag6_nfragpackets--; + atomic_subtract_int(&V_frag6_nfragpackets, 1); goto dropfrag; } @@ -579,14 +608,14 @@ insert: m_copyback(m, ip6_get_prevhdr(m, offset), sizeof(uint8_t), (caddr_t)&nxt); - frag6_remque(q6); - V_frag6_nfrags -= q6->ip6q_nfrag; + frag6_remque(q6, hash); + atomic_subtract_int(&V_frag6_nfrags, q6->ip6q_nfrag); #ifdef MAC mac_ip6q_reassemble(q6, m); mac_ip6q_destroy(q6); #endif free(q6, M_FTABLE); - V_frag6_nfragpackets--; + atomic_subtract_int(&V_frag6_nfragpackets, 1); if (m->m_flags & M_PKTHDR) { /* Isn't it always true? */ int plen = 0; @@ -608,7 +637,7 @@ insert: m_tag_prepend(m, mtag); #endif - IP6Q_UNLOCK(); + IP6Q_UNLOCK(hash); IP6STAT_INC(ip6s_reassembled); in6_ifstat_inc(dstifp, ifs6_reass_ok); @@ -630,7 +659,7 @@ insert: return nxt; dropfrag: - IP6Q_UNLOCK(); + IP6Q_UNLOCK(hash); in6_ifstat_inc(dstifp, ifs6_reass_fail); IP6STAT_INC(ip6s_fragdropped); m_freem(m); @@ -641,19 +670,19 @@ insert: * Free a fragment reassembly header and all * associated datagrams. */ -void -frag6_freef(struct ip6q *q6) +static void +frag6_freef(struct ip6q *q6, uint32_t bucket) { struct ip6asfrag *af6, *down6; - IP6Q_LOCK_ASSERT(); + IP6Q_LOCK_ASSERT(bucket); for (af6 = q6->ip6q_down; af6 != (struct ip6asfrag *)q6; af6 = down6) { struct mbuf *m = IP6_REASS_MBUF(af6); down6 = af6->ip6af_down; - frag6_deq(af6); + frag6_deq(af6, bucket); /* * Return ICMP time exceeded error for the 1st fragment. @@ -675,24 +704,25 @@ frag6_freef(struct ip6q *q6) m_freem(m); free(af6, M_FTABLE); } - frag6_remque(q6); - V_frag6_nfrags -= q6->ip6q_nfrag; + frag6_remque(q6, bucket); + atomic_subtract_int(&V_frag6_nfrags, q6->ip6q_nfrag); #ifdef MAC mac_ip6q_destroy(q6); #endif free(q6, M_FTABLE); - V_frag6_nfragpackets--; + atomic_subtract_int(&V_frag6_nfragpackets, 1); } /* * Put an ip fragment on a reassembly chain. * Like insque, but pointers in middle of structure. */ -void -frag6_enq(struct ip6asfrag *af6, struct ip6asfrag *up6) +static void +frag6_enq(struct ip6asfrag *af6, struct ip6asfrag *up6, + uint32_t bucket __unused) { - IP6Q_LOCK_ASSERT(); + IP6Q_LOCK_ASSERT(bucket); af6->ip6af_up = up6; af6->ip6af_down = up6->ip6af_down; @@ -703,21 +733,24 @@ frag6_enq(struct ip6asfrag *af6, struct ip6asfrag *up6 /* * To frag6_enq as remque is to insque. */ -void -frag6_deq(struct ip6asfrag *af6) +static void +frag6_deq(struct ip6asfrag *af6, uint32_t bucket __unused) { - IP6Q_LOCK_ASSERT(); + IP6Q_LOCK_ASSERT(bucket); af6->ip6af_up->ip6af_down = af6->ip6af_down; af6->ip6af_down->ip6af_up = af6->ip6af_up; } -void -frag6_insque(struct ip6q *new, struct ip6q *old) +static void +frag6_insque_head(struct ip6q *new, struct ip6q *old, uint32_t bucket __unused) { - IP6Q_LOCK_ASSERT(); + IP6Q_LOCK_ASSERT(bucket); + KASSERT(IP6Q_HEAD(bucket) == old, + ("%s: attempt to insert at head of wrong bucket" + " (bucket=%u, old=%p)", __func__, bucket, old)); new->ip6q_prev = old; new->ip6q_next = old->ip6q_next; @@ -725,11 +758,11 @@ frag6_insque(struct ip6q *new, struct ip6q *old) old->ip6q_next = new; } -void -frag6_remque(struct ip6q *p6) +static void +frag6_remque(struct ip6q *p6, uint32_t bucket __unused) { - IP6Q_LOCK_ASSERT(); + IP6Q_LOCK_ASSERT(bucket); p6->ip6q_prev->ip6q_next = p6->ip6q_next; p6->ip6q_next->ip6q_prev = p6->ip6q_prev; @@ -744,37 +777,42 @@ void frag6_slowtimo(void) { VNET_ITERATOR_DECL(vnet_iter); - struct ip6q *q6; + struct ip6q *head, *q6; + int i; VNET_LIST_RLOCK_NOSLEEP(); - IP6Q_LOCK(); VNET_FOREACH(vnet_iter) { CURVNET_SET(vnet_iter); - q6 = V_ip6q.ip6q_next; - if (q6) - while (q6 != &V_ip6q) { - --q6->ip6q_ttl; - q6 = q6->ip6q_next; - if (q6->ip6q_prev->ip6q_ttl == 0) { - IP6STAT_INC(ip6s_fragtimeout); - /* XXX in6_ifstat_inc(ifp, ifs6_reass_fail) */ - frag6_freef(q6->ip6q_prev); + for (i = 0; i < IP6REASS_NHASH; i++) { + IP6Q_LOCK(i); + head = IP6Q_HEAD(i); + q6 = head->ip6q_next; + if (q6) + while (q6 != head) { + --q6->ip6q_ttl; + q6 = q6->ip6q_next; + if (q6->ip6q_prev->ip6q_ttl == 0) { + IP6STAT_INC(ip6s_fragtimeout); + /* XXX in6_ifstat_inc(ifp, ifs6_reass_fail) */ + frag6_freef(q6->ip6q_prev, i); + } } + /* + * If we are over the maximum number of fragments + * (due to the limit being lowered), drain off + * enough to get down to the new limit. + */ + while (V_frag6_nfragpackets > + (u_int)V_ip6_maxfragpackets && + head->ip6q_prev != head) { + IP6STAT_INC(ip6s_fragoverflow); + /* XXX in6_ifstat_inc(ifp, ifs6_reass_fail) */ + frag6_freef(head->ip6q_prev, i); } - /* - * If we are over the maximum number of fragments - * (due to the limit being lowered), drain off - * enough to get down to the new limit. - */ - while (V_frag6_nfragpackets > (u_int)V_ip6_maxfragpackets && - V_ip6q.ip6q_prev) { - IP6STAT_INC(ip6s_fragoverflow); - /* XXX in6_ifstat_inc(ifp, ifs6_reass_fail) */ - frag6_freef(V_ip6q.ip6q_prev); + IP6Q_UNLOCK(i); } CURVNET_RESTORE(); } - IP6Q_UNLOCK(); VNET_LIST_RUNLOCK_NOSLEEP(); } @@ -785,22 +823,25 @@ void frag6_drain(void) { VNET_ITERATOR_DECL(vnet_iter); + struct ip6q *head; + int i; VNET_LIST_RLOCK_NOSLEEP(); - if (IP6Q_TRYLOCK() == 0) { - VNET_LIST_RUNLOCK_NOSLEEP(); - return; - } VNET_FOREACH(vnet_iter) { CURVNET_SET(vnet_iter); - while (V_ip6q.ip6q_next != &V_ip6q) { - IP6STAT_INC(ip6s_fragdropped); - /* XXX in6_ifstat_inc(ifp, ifs6_reass_fail) */ - frag6_freef(V_ip6q.ip6q_next); + for (i = 0; i < IP6REASS_NHASH; i++) { + if (IP6Q_TRYLOCK(i) == 0) + continue; + head = IP6Q_HEAD(i); + while (head->ip6q_next != head) { + IP6STAT_INC(ip6s_fragdropped); + /* XXX in6_ifstat_inc(ifp, ifs6_reass_fail) */ + frag6_freef(head->ip6q_next, i); + } + IP6Q_UNLOCK(i); } CURVNET_RESTORE(); } - IP6Q_UNLOCK(); VNET_LIST_RUNLOCK_NOSLEEP(); } From owner-svn-src-stable@freebsd.org Tue Aug 14 17:48:29 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9DB65107FB87; Tue, 14 Aug 2018 17:48:29 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 536367E28A; Tue, 14 Aug 2018 17:48:29 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3422C1ED52; Tue, 14 Aug 2018 17:48:29 +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 w7EHmTAT027325; Tue, 14 Aug 2018 17:48:29 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7EHmTI3027324; Tue, 14 Aug 2018 17:48:29 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201808141748.w7EHmTI3027324@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 14 Aug 2018 17:48:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337792 - stable/11/sys/amd64/amd64 X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/amd64/amd64 X-SVN-Commit-Revision: 337792 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2018 17:48:29 -0000 Author: kib Date: Tue Aug 14 17:48:28 2018 New Revision: 337792 URL: https://svnweb.freebsd.org/changeset/base/337792 Log: MFC r337774: Reserve page at the physical address zero on amd64. Approved by: so (insta-MFC) Modified: stable/11/sys/amd64/amd64/pmap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/pmap.c ============================================================================== --- stable/11/sys/amd64/amd64/pmap.c Tue Aug 14 17:48:02 2018 (r337791) +++ stable/11/sys/amd64/amd64/pmap.c Tue Aug 14 17:48:28 2018 (r337792) @@ -1220,6 +1220,9 @@ pmap_init(void) vm_size_t s; int error, i, pv_npg, ret, skz63; + /* L1TF, reserve page @0 unconditionally */ + vm_page_blacklist_add(0, bootverbose); + /* Detect bare-metal Skylake Server and Skylake-X. */ if (vm_guest == VM_GUEST_NO && cpu_vendor_id == CPU_VENDOR_INTEL && CPUID_TO_FAMILY(cpu_id) == 0x6 && CPUID_TO_MODEL(cpu_id) == 0x55) { From owner-svn-src-stable@freebsd.org Tue Aug 14 17:49:53 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96082107FC3E; Tue, 14 Aug 2018 17:49:53 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BC077E435; Tue, 14 Aug 2018 17:49:53 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2CE351ED53; Tue, 14 Aug 2018 17:49:53 +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 w7EHnqPj027447; Tue, 14 Aug 2018 17:49:52 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7EHnq1f027446; Tue, 14 Aug 2018 17:49:52 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201808141749.w7EHnq1f027446@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 14 Aug 2018 17:49:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337793 - stable/11/sys/x86/include X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/x86/include X-SVN-Commit-Revision: 337793 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2018 17:49:53 -0000 Author: kib Date: Tue Aug 14 17:49:52 2018 New Revision: 337793 URL: https://svnweb.freebsd.org/changeset/base/337793 Log: MFC r337777: Add definitions related to the L1D flush operation capability and MSR. Approved by: so (insta-MFC) Modified: stable/11/sys/x86/include/specialreg.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/x86/include/specialreg.h ============================================================================== --- stable/11/sys/x86/include/specialreg.h Tue Aug 14 17:48:28 2018 (r337792) +++ stable/11/sys/x86/include/specialreg.h Tue Aug 14 17:49:52 2018 (r337793) @@ -387,6 +387,7 @@ */ #define CPUID_STDEXT3_IBPB 0x04000000 #define CPUID_STDEXT3_STIBP 0x08000000 +#define CPUID_STDEXT3_L1D_FLUSH 0x10000000 #define CPUID_STDEXT3_ARCH_CAP 0x20000000 #define CPUID_STDEXT3_SSBD 0x80000000 @@ -438,6 +439,7 @@ #define MSR_IA32_EXT_CONFIG 0x0ee /* Undocumented. Core Solo/Duo only */ #define MSR_MTRRcap 0x0fe #define MSR_IA32_ARCH_CAP 0x10a +#define MSR_IA32_FLUSH_CMD 0x10b #define MSR_BBL_CR_ADDR 0x116 #define MSR_BBL_CR_DECC 0x118 #define MSR_BBL_CR_CTL 0x119 @@ -591,6 +593,9 @@ /* MSR IA32_PRED_CMD */ #define IA32_PRED_CMD_IBPB_BARRIER 0x0000000000000001ULL + +/* MSR IA32_FLUSH_CMD */ +#define IA32_FLUSH_CMD_L1D 0x00000001 /* * PAT modes. From owner-svn-src-stable@freebsd.org Tue Aug 14 17:51:14 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49CFC107FCFC; Tue, 14 Aug 2018 17:51:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EED7F7E6A0; Tue, 14 Aug 2018 17:51:13 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D10791ED98; Tue, 14 Aug 2018 17:51: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 w7EHpDZJ029092; Tue, 14 Aug 2018 17:51:13 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7EHpDM9029089; Tue, 14 Aug 2018 17:51:13 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201808141751.w7EHpDM9029089@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 14 Aug 2018 17:51:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337794 - stable/11/sys/amd64/vmm/intel X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/amd64/vmm/intel X-SVN-Commit-Revision: 337794 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2018 17:51:14 -0000 Author: kib Date: Tue Aug 14 17:51:12 2018 New Revision: 337794 URL: https://svnweb.freebsd.org/changeset/base/337794 Log: MFC r337785: Provide part of the mitigation for L1TF-VMM. Security: CVE-2018-3646 Approved by: so (insta-MFC) Modified: stable/11/sys/amd64/vmm/intel/vmx.c stable/11/sys/amd64/vmm/intel/vmx_genassym.c stable/11/sys/amd64/vmm/intel/vmx_support.S Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/vmm/intel/vmx.c ============================================================================== --- stable/11/sys/amd64/vmm/intel/vmx.c Tue Aug 14 17:49:52 2018 (r337793) +++ stable/11/sys/amd64/vmm/intel/vmx.c Tue Aug 14 17:51:12 2018 (r337794) @@ -185,6 +185,12 @@ static u_int vpid_alloc_failed; SYSCTL_UINT(_hw_vmm_vmx, OID_AUTO, vpid_alloc_failed, CTLFLAG_RD, &vpid_alloc_failed, 0, NULL); +static int guest_l1d_flush; +SYSCTL_INT(_hw_vmm_vmx, OID_AUTO, l1d_flush, CTLFLAG_RD, + &guest_l1d_flush, 0, NULL); + +uint64_t vmx_msr_flush_cmd; + /* * Use the last page below 4GB as the APIC access address. This address is * occupied by the boot firmware so it is guaranteed that it will not conflict @@ -719,6 +725,12 @@ vmx_init(int ipinum) printf("vmx_init: ept initialization failed (%d)\n", error); return (error); } + + guest_l1d_flush = (cpu_ia32_arch_caps & IA32_ARCH_CAP_RDCL_NO) == 0; + TUNABLE_INT_FETCH("hw.vmm.l1d_flush", &guest_l1d_flush); + if (guest_l1d_flush && + (cpu_stdext_feature3 & CPUID_STDEXT3_L1D_FLUSH) != 0) + vmx_msr_flush_cmd = IA32_FLUSH_CMD_L1D; /* * Stash the cr0 and cr4 bits that must be fixed to 0 or 1 Modified: stable/11/sys/amd64/vmm/intel/vmx_genassym.c ============================================================================== --- stable/11/sys/amd64/vmm/intel/vmx_genassym.c Tue Aug 14 17:49:52 2018 (r337793) +++ stable/11/sys/amd64/vmm/intel/vmx_genassym.c Tue Aug 14 17:51:12 2018 (r337794) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include "vmx_cpufunc.h" @@ -86,3 +87,6 @@ ASSYM(PM_EPTGEN, offsetof(struct pmap, pm_eptgen)); ASSYM(KERNEL_SS, GSEL(GDATA_SEL, SEL_KPL)); ASSYM(KERNEL_CS, GSEL(GCODE_SEL, SEL_KPL)); + +ASSYM(PAGE_SIZE, PAGE_SIZE); +ASSYM(KERNBASE, KERNBASE); Modified: stable/11/sys/amd64/vmm/intel/vmx_support.S ============================================================================== --- stable/11/sys/amd64/vmm/intel/vmx_support.S Tue Aug 14 17:49:52 2018 (r337793) +++ stable/11/sys/amd64/vmm/intel/vmx_support.S Tue Aug 14 17:51:12 2018 (r337794) @@ -30,6 +30,7 @@ */ #include +#include #include "vmx_assym.h" @@ -175,9 +176,47 @@ ENTRY(vmx_enter_guest) jbe invept_error /* Check invept instruction error */ guest_restore: - cmpl $0, %edx - je do_launch + /* + * Flush L1D cache if requested. Use IA32_FLUSH_CMD MSR if available, + * otherwise load enough of the data from the zero_region to flush + * existing L1D content. + */ +#define L1D_FLUSH_SIZE (64 * 1024) + movl %edx, %r8d + cmpb $0, guest_l1d_flush(%rip) + je after_l1d + movq vmx_msr_flush_cmd(%rip), %rax + testq %rax, %rax + jz 1f + movq %rax, %rdx + shrq $32, %rdx + movl $MSR_IA32_FLUSH_CMD, %ecx + wrmsr + jmp after_l1d +1: movq $KERNBASE, %r9 + movq $-L1D_FLUSH_SIZE, %rcx + /* + * pass 1: Preload TLB. + * Kernel text is mapped using superpages. TLB preload is + * done for the benefit of older CPUs which split 2M page + * into 4k TLB entries. + */ +2: movb L1D_FLUSH_SIZE(%r9, %rcx), %al + addq $PAGE_SIZE, %rcx + jne 2b + xorl %eax, %eax + cpuid + movq $-L1D_FLUSH_SIZE, %rcx + /* pass 2: Read each cache line */ +3: movb L1D_FLUSH_SIZE(%r9, %rcx), %al + addq $64, %rcx + jne 3b + lfence +#undef L1D_FLUSH_SIZE +after_l1d: + cmpl $0, %r8d + je do_launch VMX_GUEST_RESTORE vmresume /* From owner-svn-src-stable@freebsd.org Tue Aug 14 17:52:07 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0CFE107FE93; Tue, 14 Aug 2018 17:52:06 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 970F17E977; Tue, 14 Aug 2018 17:52:06 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 784BE1EDD4; Tue, 14 Aug 2018 17:52:06 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7EHq62X031390; Tue, 14 Aug 2018 17:52:06 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7EHq63A031389; Tue, 14 Aug 2018 17:52:06 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201808141752.w7EHq63A031389@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Tue, 14 Aug 2018 17:52:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337795 - stable/11/sys/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: jtl X-SVN-Commit-Paths: stable/11/sys/netinet X-SVN-Commit-Revision: 337795 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2018 17:52:07 -0000 Author: jtl Date: Tue Aug 14 17:52:06 2018 New Revision: 337795 URL: https://svnweb.freebsd.org/changeset/base/337795 Log: MFC r337778: Add a global limit on the number of IPv4 fragments. The IP reassembly fragment limit is based on the number of mbuf clusters, which are a global resource. However, the limit is currently applied on a per-VNET basis. Given enough VNETs (or given sufficient customization of enough VNETs), it is possible that the sum of all the VNET limits will exceed the number of mbuf clusters available in the system. Given the fact that the fragment limit is intended (at least in part) to regulate access to a global resource, the fragment limit should be applied on a global basis. VNET-specific limits can be adjusted by modifying the net.inet.ip.maxfragpackets and net.inet.ip.maxfragsperpacket sysctls. To disable fragment reassembly globally, set net.inet.ip.maxfrags to 0. To disable fragment reassembly for a particular VNET, set net.inet.ip.maxfragpackets to 0. Approved by: so Security: FreeBSD-SA-18:10.ip Security: CVE-2018-6923 Modified: stable/11/sys/netinet/ip_reass.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/ip_reass.c ============================================================================== --- stable/11/sys/netinet/ip_reass.c Tue Aug 14 17:51:12 2018 (r337794) +++ stable/11/sys/netinet/ip_reass.c Tue Aug 14 17:52:06 2018 (r337795) @@ -110,6 +110,15 @@ ipq_drop(struct ipqhead *head, struct ipq *fp) ipq_free(head, fp); } +static int maxfrags; +static volatile u_int nfrags; +SYSCTL_INT(_net_inet_ip, OID_AUTO, maxfrags, CTLFLAG_RW, + &maxfrags, 0, + "Maximum number of IPv4 fragments allowed across all reassembly queues"); +SYSCTL_UINT(_net_inet_ip, OID_AUTO, curfrags, CTLFLAG_RD, + __DEVOLATILE(u_int *, &nfrags), 0, + "Current number of IPv4 fragments across all reassembly queues"); + static VNET_DEFINE(uma_zone_t, ipq_zone); #define V_ipq_zone VNET(ipq_zone) SYSCTL_PROC(_net_inet_ip, OID_AUTO, maxfragpackets, CTLFLAG_VNET | @@ -146,7 +155,7 @@ ip_reass(struct mbuf *m) struct mbuf *p, *q, *nq, *t; struct ipq *fp; struct ipqhead *head; - int i, hlen, next; + int i, hlen, next, tmpmax; u_int8_t ecn, ecn0; uint32_t hash, hashkey[3]; #ifdef RSS @@ -156,8 +165,12 @@ ip_reass(struct mbuf *m) /* * If no reassembling or maxfragsperpacket are 0, * never accept fragments. + * Also, drop packet if it would exceed the maximum + * number of fragments. */ - if (V_noreass == 1 || V_maxfragsperpacket == 0) { + tmpmax = maxfrags; + if (V_noreass == 1 || V_maxfragsperpacket == 0 || + (tmpmax >= 0 && nfrags >= (u_int)tmpmax)) { IPSTAT_INC(ips_fragments); IPSTAT_INC(ips_fragdropped); m_freem(m); @@ -241,6 +254,7 @@ ip_reass(struct mbuf *m) #endif TAILQ_INSERT_HEAD(head, fp, ipq_list); fp->ipq_nfrags = 1; + atomic_add_int(&nfrags, 1); fp->ipq_ttl = IPFRAGTTL; fp->ipq_p = ip->ip_p; fp->ipq_id = ip->ip_id; @@ -251,6 +265,7 @@ ip_reass(struct mbuf *m) goto done; } else { fp->ipq_nfrags++; + atomic_add_int(&nfrags, 1); #ifdef MAC mac_ipq_update(m, fp); #endif @@ -327,6 +342,7 @@ ip_reass(struct mbuf *m) m->m_nextpkt = nq; IPSTAT_INC(ips_fragdropped); fp->ipq_nfrags--; + atomic_subtract_int(&nfrags, 1); m_freem(q); } @@ -392,6 +408,7 @@ ip_reass(struct mbuf *m) while (m->m_pkthdr.csum_data & 0xffff0000) m->m_pkthdr.csum_data = (m->m_pkthdr.csum_data & 0xffff) + (m->m_pkthdr.csum_data >> 16); + atomic_subtract_int(&nfrags, fp->ipq_nfrags); #ifdef MAC mac_ipq_reassemble(fp, m); mac_ipq_destroy(fp); @@ -451,8 +468,10 @@ ip_reass(struct mbuf *m) dropfrag: IPSTAT_INC(ips_fragdropped); - if (fp != NULL) + if (fp != NULL) { fp->ipq_nfrags--; + atomic_subtract_int(&nfrags, 1); + } m_freem(m); done: IPQ_UNLOCK(hash); @@ -479,9 +498,11 @@ ipreass_init(void) NULL, UMA_ALIGN_PTR, 0); uma_zone_set_max(V_ipq_zone, nmbclusters / 32); - if (IS_DEFAULT_VNET(curvnet)) + if (IS_DEFAULT_VNET(curvnet)) { + maxfrags = nmbclusters / 32; EVENTHANDLER_REGISTER(nmbclusters_change, ipreass_zone_change, NULL, EVENTHANDLER_PRI_ANY); + } } /* @@ -564,9 +585,19 @@ ipreass_drain_tomax(void) static void ipreass_zone_change(void *tag) { + VNET_ITERATOR_DECL(vnet_iter); + int max; - uma_zone_set_max(V_ipq_zone, nmbclusters / 32); - ipreass_drain_tomax(); + maxfrags = nmbclusters / 32; + max = nmbclusters / 32; + VNET_LIST_RLOCK_NOSLEEP(); + VNET_FOREACH(vnet_iter) { + CURVNET_SET(vnet_iter); + uma_zone_set_max(V_ipq_zone, max); + ipreass_drain_tomax(); + CURVNET_RESTORE(); + } + VNET_LIST_RUNLOCK_NOSLEEP(); } /* @@ -629,6 +660,7 @@ ipq_reuse(int start) struct mbuf *m; IPSTAT_ADD(ips_fragtimeout, fp->ipq_nfrags); + atomic_subtract_int(&nfrags, fp->ipq_nfrags); while (fp->ipq_frags) { m = fp->ipq_frags; fp->ipq_frags = m->m_nextpkt; @@ -653,6 +685,7 @@ ipq_free(struct ipqhead *fhp, struct ipq *fp) { struct mbuf *q; + atomic_subtract_int(&nfrags, fp->ipq_nfrags); while (fp->ipq_frags) { q = fp->ipq_frags; fp->ipq_frags = q->m_nextpkt; From owner-svn-src-stable@freebsd.org Tue Aug 14 17:54:40 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CEE5C107FF61; Tue, 14 Aug 2018 17:54:40 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 80C8A7F0EC; Tue, 14 Aug 2018 17:54:40 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5E10E1EEF0; Tue, 14 Aug 2018 17:54:40 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7EHsenw032466; Tue, 14 Aug 2018 17:54:40 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7EHsejC032465; Tue, 14 Aug 2018 17:54:40 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201808141754.w7EHsejC032465@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Tue, 14 Aug 2018 17:54:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337796 - stable/11/sys/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: jtl X-SVN-Commit-Paths: stable/11/sys/netinet X-SVN-Commit-Revision: 337796 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2018 17:54:41 -0000 Author: jtl Date: Tue Aug 14 17:54:39 2018 New Revision: 337796 URL: https://svnweb.freebsd.org/changeset/base/337796 Log: MFC r337780: Implement a limit on on the number of IPv4 reassembly queues per bucket. There is a hashing algorithm which should distribute IPv4 reassembly queues across the available buckets in a relatively even way. However, if there is a flaw in the hashing algorithm which allows a large number of IPv4 fragment reassembly queues to end up in a single bucket, a per- bucket limit could help mitigate the performance impact of this flaw. Implement such a limit, with a default of twice the maximum number of reassembly queues divided by the number of buckets. Recalculate the limit any time the maximum number of reassembly queues changes. However, allow the user to override the value using a sysctl (net.inet.ip.maxfragbucketsize). Approved by: so Security: FreeBSD-SA-18:10.ip Security: CVE-2018-6923 Modified: stable/11/sys/netinet/ip_reass.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/ip_reass.c ============================================================================== --- stable/11/sys/netinet/ip_reass.c Tue Aug 14 17:52:06 2018 (r337795) +++ stable/11/sys/netinet/ip_reass.c Tue Aug 14 17:54:39 2018 (r337796) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -70,6 +71,7 @@ SYSCTL_DECL(_net_inet_ip); struct ipqbucket { TAILQ_HEAD(ipqhead, ipq) head; struct mtx lock; + int count; }; static VNET_DEFINE(struct ipqbucket, ipq[IPREASS_NHASH]); @@ -82,6 +84,9 @@ static VNET_DEFINE(uint32_t, ipq_hashseed); #define IPQ_UNLOCK(i) mtx_unlock(&V_ipq[i].lock) #define IPQ_LOCK_ASSERT(i) mtx_assert(&V_ipq[i].lock, MA_OWNED) +static VNET_DEFINE(int, ipreass_maxbucketsize); +#define V_ipreass_maxbucketsize VNET(ipreass_maxbucketsize) + void ipreass_init(void); void ipreass_drain(void); void ipreass_slowtimo(void); @@ -89,25 +94,26 @@ void ipreass_slowtimo(void); void ipreass_destroy(void); #endif static int sysctl_maxfragpackets(SYSCTL_HANDLER_ARGS); +static int sysctl_maxfragbucketsize(SYSCTL_HANDLER_ARGS); static void ipreass_zone_change(void *); static void ipreass_drain_tomax(void); -static void ipq_free(struct ipqhead *, struct ipq *); +static void ipq_free(struct ipqbucket *, struct ipq *); static struct ipq * ipq_reuse(int); static inline void -ipq_timeout(struct ipqhead *head, struct ipq *fp) +ipq_timeout(struct ipqbucket *bucket, struct ipq *fp) { IPSTAT_ADD(ips_fragtimeout, fp->ipq_nfrags); - ipq_free(head, fp); + ipq_free(bucket, fp); } static inline void -ipq_drop(struct ipqhead *head, struct ipq *fp) +ipq_drop(struct ipqbucket *bucket, struct ipq *fp) { IPSTAT_ADD(ips_fragdropped, fp->ipq_nfrags); - ipq_free(head, fp); + ipq_free(bucket, fp); } static int maxfrags; @@ -136,6 +142,10 @@ static VNET_DEFINE(int, maxfragsperpacket); SYSCTL_INT(_net_inet_ip, OID_AUTO, maxfragsperpacket, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(maxfragsperpacket), 0, "Maximum number of IPv4 fragments allowed per packet"); +SYSCTL_PROC(_net_inet_ip, OID_AUTO, maxfragbucketsize, + CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_MPSAFE | CTLFLAG_RW, NULL, 0, + sysctl_maxfragbucketsize, "I", + "Maximum number of IPv4 fragment reassembly queue entries per bucket"); /* * Take incoming datagram fragment and try to reassemble it into @@ -241,9 +251,12 @@ ip_reass(struct mbuf *m) * If first fragment to arrive, create a reassembly queue. */ if (fp == NULL) { - fp = uma_zalloc(V_ipq_zone, M_NOWAIT); + if (V_ipq[hash].count < V_ipreass_maxbucketsize) + fp = uma_zalloc(V_ipq_zone, M_NOWAIT); if (fp == NULL) fp = ipq_reuse(hash); + if (fp == NULL) + goto dropfrag; #ifdef MAC if (mac_ipq_init(fp, M_NOWAIT) != 0) { uma_zfree(V_ipq_zone, fp); @@ -253,6 +266,7 @@ ip_reass(struct mbuf *m) mac_ipq_create(m, fp); #endif TAILQ_INSERT_HEAD(head, fp, ipq_list); + V_ipq[hash].count++; fp->ipq_nfrags = 1; atomic_add_int(&nfrags, 1); fp->ipq_ttl = IPFRAGTTL; @@ -360,7 +374,7 @@ ip_reass(struct mbuf *m) for (p = NULL, q = fp->ipq_frags; q; p = q, q = q->m_nextpkt) { if (ntohs(GETIP(q)->ip_off) != next) { if (fp->ipq_nfrags > V_maxfragsperpacket) - ipq_drop(head, fp); + ipq_drop(&V_ipq[hash], fp); goto done; } next += ntohs(GETIP(q)->ip_len); @@ -368,7 +382,7 @@ ip_reass(struct mbuf *m) /* Make sure the last packet didn't have the IP_MF flag */ if (p->m_flags & M_IP_FRAG) { if (fp->ipq_nfrags > V_maxfragsperpacket) - ipq_drop(head, fp); + ipq_drop(&V_ipq[hash], fp); goto done; } @@ -379,7 +393,7 @@ ip_reass(struct mbuf *m) ip = GETIP(q); if (next + (ip->ip_hl << 2) > IP_MAXPACKET) { IPSTAT_INC(ips_toolong); - ipq_drop(head, fp); + ipq_drop(&V_ipq[hash], fp); goto done; } @@ -423,6 +437,7 @@ ip_reass(struct mbuf *m) ip->ip_src = fp->ipq_src; ip->ip_dst = fp->ipq_dst; TAILQ_REMOVE(head, fp, ipq_list); + V_ipq[hash].count--; uma_zfree(V_ipq_zone, fp); m->m_len += (ip->ip_hl << 2); m->m_data -= (ip->ip_hl << 2); @@ -486,17 +501,21 @@ done: void ipreass_init(void) { + int max; for (int i = 0; i < IPREASS_NHASH; i++) { TAILQ_INIT(&V_ipq[i].head); mtx_init(&V_ipq[i].lock, "IP reassembly", NULL, MTX_DEF | MTX_DUPOK); + V_ipq[i].count = 0; } V_ipq_hashseed = arc4random(); V_maxfragsperpacket = 16; V_ipq_zone = uma_zcreate("ipq", sizeof(struct ipq), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); - uma_zone_set_max(V_ipq_zone, nmbclusters / 32); + max = nmbclusters / 32; + max = uma_zone_set_max(V_ipq_zone, max); + V_ipreass_maxbucketsize = imax(max / (IPREASS_NHASH / 2), 1); if (IS_DEFAULT_VNET(curvnet)) { maxfrags = nmbclusters / 32; @@ -517,7 +536,7 @@ ipreass_slowtimo(void) IPQ_LOCK(i); TAILQ_FOREACH_SAFE(fp, &V_ipq[i].head, ipq_list, tmp) if (--fp->ipq_ttl == 0) - ipq_timeout(&V_ipq[i].head, fp); + ipq_timeout(&V_ipq[i], fp); IPQ_UNLOCK(i); } } @@ -532,7 +551,10 @@ ipreass_drain(void) for (int i = 0; i < IPREASS_NHASH; i++) { IPQ_LOCK(i); while(!TAILQ_EMPTY(&V_ipq[i].head)) - ipq_drop(&V_ipq[i].head, TAILQ_FIRST(&V_ipq[i].head)); + ipq_drop(&V_ipq[i], TAILQ_FIRST(&V_ipq[i].head)); + KASSERT(V_ipq[i].count == 0, + ("%s: V_ipq[%d] count %d (V_ipq=%p)", __func__, i, + V_ipq[i].count, V_ipq)); IPQ_UNLOCK(i); } } @@ -560,9 +582,23 @@ ipreass_destroy(void) static void ipreass_drain_tomax(void) { + struct ipq *fp; int target; /* + * Make sure each bucket is under the new limit. If + * necessary, drop enough of the oldest elements from + * each bucket to get under the new limit. + */ + for (int i = 0; i < IPREASS_NHASH; i++) { + IPQ_LOCK(i); + while (V_ipq[i].count > V_ipreass_maxbucketsize && + (fp = TAILQ_LAST(&V_ipq[i].head, ipqhead)) != NULL) + ipq_timeout(&V_ipq[i], fp); + IPQ_UNLOCK(i); + } + + /* * If we are over the maximum number of fragments, * drain off enough to get down to the new limit, * stripping off last elements on queues. Every @@ -570,13 +606,11 @@ ipreass_drain_tomax(void) */ target = uma_zone_get_max(V_ipq_zone); while (uma_zone_get_cur(V_ipq_zone) > target) { - struct ipq *fp; - for (int i = 0; i < IPREASS_NHASH; i++) { IPQ_LOCK(i); fp = TAILQ_LAST(&V_ipq[i].head, ipqhead); if (fp != NULL) - ipq_timeout(&V_ipq[i].head, fp); + ipq_timeout(&V_ipq[i], fp); IPQ_UNLOCK(i); } } @@ -593,7 +627,8 @@ ipreass_zone_change(void *tag) VNET_LIST_RLOCK_NOSLEEP(); VNET_FOREACH(vnet_iter) { CURVNET_SET(vnet_iter); - uma_zone_set_max(V_ipq_zone, max); + max = uma_zone_set_max(V_ipq_zone, max); + V_ipreass_maxbucketsize = imax(max / (IPREASS_NHASH / 2), 1); ipreass_drain_tomax(); CURVNET_RESTORE(); } @@ -625,6 +660,7 @@ sysctl_maxfragpackets(SYSCTL_HANDLER_ARGS) * and place an extreme upper bound. */ max = uma_zone_set_max(V_ipq_zone, max); + V_ipreass_maxbucketsize = imax(max / (IPREASS_NHASH / 2), 1); ipreass_drain_tomax(); V_noreass = 0; } else if (max == 0) { @@ -633,6 +669,7 @@ sysctl_maxfragpackets(SYSCTL_HANDLER_ARGS) } else if (max == -1) { V_noreass = 0; uma_zone_set_max(V_ipq_zone, 0); + V_ipreass_maxbucketsize = INT_MAX; } else return (EINVAL); return (0); @@ -646,16 +683,15 @@ static struct ipq * ipq_reuse(int start) { struct ipq *fp; - int i; + int bucket, i; IPQ_LOCK_ASSERT(start); - for (i = start;; i++) { - if (i == IPREASS_NHASH) - i = 0; - if (i != start && IPQ_TRYLOCK(i) == 0) + for (i = 0; i < IPREASS_NHASH; i++) { + bucket = (start + i) % IPREASS_NHASH; + if (bucket != start && IPQ_TRYLOCK(bucket) == 0) continue; - fp = TAILQ_LAST(&V_ipq[i].head, ipqhead); + fp = TAILQ_LAST(&V_ipq[bucket].head, ipqhead); if (fp) { struct mbuf *m; @@ -666,22 +702,24 @@ ipq_reuse(int start) fp->ipq_frags = m->m_nextpkt; m_freem(m); } - TAILQ_REMOVE(&V_ipq[i].head, fp, ipq_list); - if (i != start) - IPQ_UNLOCK(i); - IPQ_LOCK_ASSERT(start); - return (fp); + TAILQ_REMOVE(&V_ipq[bucket].head, fp, ipq_list); + V_ipq[bucket].count--; + if (bucket != start) + IPQ_UNLOCK(bucket); + break; } - if (i != start) - IPQ_UNLOCK(i); + if (bucket != start) + IPQ_UNLOCK(bucket); } + IPQ_LOCK_ASSERT(start); + return (fp); } /* * Free a fragment reassembly header and all associated datagrams. */ static void -ipq_free(struct ipqhead *fhp, struct ipq *fp) +ipq_free(struct ipqbucket *bucket, struct ipq *fp) { struct mbuf *q; @@ -691,6 +729,26 @@ ipq_free(struct ipqhead *fhp, struct ipq *fp) fp->ipq_frags = q->m_nextpkt; m_freem(q); } - TAILQ_REMOVE(fhp, fp, ipq_list); + TAILQ_REMOVE(&bucket->head, fp, ipq_list); + bucket->count--; uma_zfree(V_ipq_zone, fp); +} + +/* + * Get or set the maximum number of reassembly queues per bucket. + */ +static int +sysctl_maxfragbucketsize(SYSCTL_HANDLER_ARGS) +{ + int error, max; + + max = V_ipreass_maxbucketsize; + error = sysctl_handle_int(oidp, &max, 0, req); + if (error || !req->newptr) + return (error); + if (max <= 0) + return (EINVAL); + V_ipreass_maxbucketsize = max; + ipreass_drain_tomax(); + return (0); } From owner-svn-src-stable@freebsd.org Tue Aug 14 17:59:43 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 627DC10800E7; Tue, 14 Aug 2018 17:59:43 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 14D0B7F377; Tue, 14 Aug 2018 17:59:43 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EA9711EEF3; Tue, 14 Aug 2018 17:59:42 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7EHxgB4032733; Tue, 14 Aug 2018 17:59:42 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7EHxgfa032730; Tue, 14 Aug 2018 17:59:42 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201808141759.w7EHxgfa032730@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Tue, 14 Aug 2018 17:59:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337797 - stable/11/sys/netinet6 X-SVN-Group: stable-11 X-SVN-Commit-Author: jtl X-SVN-Commit-Paths: stable/11/sys/netinet6 X-SVN-Commit-Revision: 337797 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2018 17:59:43 -0000 Author: jtl Date: Tue Aug 14 17:59:42 2018 New Revision: 337797 URL: https://svnweb.freebsd.org/changeset/base/337797 Log: MFC r337781: Make the IPv6 fragment limits be global, rather than per-VNET, limits. The IPv6 reassembly fragment limit is based on the number of mbuf clusters, which are a global resource. However, the limit is currently applied on a per-VNET basis. Given enough VNETs (or given sufficient customization on enough VNETs), it is possible that the sum of all the VNET fragment limits will exceed the number of mbuf clusters available in the system. Given the fact that the fragment limits are intended (at least in part) to regulate access to a global resource, the IPv6 fragment limit should be applied on a global basis. Note that it is still possible to disable fragmentation for a particular VNET by setting the net.inet6.ip6.maxfragpackets sysctl to 0 for that VNET. In addition, it is now possible to disable fragmentation globally by setting the net.inet6.ip6.maxfrags sysctl to 0. Approved by: so Security: FreeBSD-SA-18:10.ip Security: CVE-2018-6923 Modified: stable/11/sys/netinet6/frag6.c stable/11/sys/netinet6/in6_proto.c stable/11/sys/netinet6/ip6_var.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet6/frag6.c ============================================================================== --- stable/11/sys/netinet6/frag6.c Tue Aug 14 17:54:39 2018 (r337796) +++ stable/11/sys/netinet6/frag6.c Tue Aug 14 17:59:42 2018 (r337797) @@ -87,12 +87,11 @@ struct ip6qbucket { }; static VNET_DEFINE(volatile u_int, frag6_nfragpackets); -static VNET_DEFINE(volatile u_int, frag6_nfrags); +volatile u_int frag6_nfrags = 0; static VNET_DEFINE(struct ip6qbucket, ip6q[IP6REASS_NHASH]); static VNET_DEFINE(uint32_t, ip6q_hashseed); #define V_frag6_nfragpackets VNET(frag6_nfragpackets) -#define V_frag6_nfrags VNET(frag6_nfrags) #define V_ip6q VNET(ip6q) #define V_ip6q_hashseed VNET(ip6q_hashseed) @@ -110,9 +109,16 @@ static MALLOC_DEFINE(M_FTABLE, "fragment", "fragment r static void frag6_change(void *tag) { + VNET_ITERATOR_DECL(vnet_iter); - V_ip6_maxfragpackets = nmbclusters / 4; - V_ip6_maxfrags = nmbclusters / 4; + ip6_maxfrags = nmbclusters / 4; + VNET_LIST_RLOCK_NOSLEEP(); + VNET_FOREACH(vnet_iter) { + CURVNET_SET(vnet_iter); + V_ip6_maxfragpackets = nmbclusters / 4; + CURVNET_RESTORE(); + } + VNET_LIST_RUNLOCK_NOSLEEP(); } void @@ -122,7 +128,6 @@ frag6_init(void) int i; V_ip6_maxfragpackets = nmbclusters / 4; - V_ip6_maxfrags = nmbclusters / 4; for (i = 0; i < IP6REASS_NHASH; i++) { q6 = IP6Q_HEAD(i); q6->ip6q_next = q6->ip6q_prev = q6; @@ -132,6 +137,7 @@ frag6_init(void) if (!IS_DEFAULT_VNET(curvnet)) return; + ip6_maxfrags = nmbclusters / 4; EVENTHANDLER_REGISTER(nmbclusters_change, frag6_change, NULL, EVENTHANDLER_PRI_ANY); } @@ -265,9 +271,9 @@ frag6_input(struct mbuf **mp, int *offp, int proto) * If maxfrag is 0, never accept fragments. * If maxfrag is -1, accept all fragments without limitation. */ - if (V_ip6_maxfrags < 0) + if (ip6_maxfrags < 0) ; - else if (V_frag6_nfrags >= (u_int)V_ip6_maxfrags) + else if (frag6_nfrags >= (u_int)ip6_maxfrags) goto dropfrag; for (q6 = head->ip6q_next; q6 != head; q6 = q6->ip6q_next) @@ -528,7 +534,7 @@ insert: * the most recently active fragmented packet. */ frag6_enq(ip6af, af6->ip6af_up, hash); - atomic_add_int(&V_frag6_nfrags, 1); + atomic_add_int(&frag6_nfrags, 1); q6->ip6q_nfrag++; #if 0 /* xxx */ if (q6 != head->ip6q_next) { @@ -592,7 +598,7 @@ insert: if (ip6_deletefraghdr(m, offset, M_NOWAIT) != 0) { frag6_remque(q6, hash); - atomic_subtract_int(&V_frag6_nfrags, q6->ip6q_nfrag); + atomic_subtract_int(&frag6_nfrags, q6->ip6q_nfrag); #ifdef MAC mac_ip6q_destroy(q6); #endif @@ -609,7 +615,7 @@ insert: (caddr_t)&nxt); frag6_remque(q6, hash); - atomic_subtract_int(&V_frag6_nfrags, q6->ip6q_nfrag); + atomic_subtract_int(&frag6_nfrags, q6->ip6q_nfrag); #ifdef MAC mac_ip6q_reassemble(q6, m); mac_ip6q_destroy(q6); @@ -705,7 +711,7 @@ frag6_freef(struct ip6q *q6, uint32_t bucket) free(af6, M_FTABLE); } frag6_remque(q6, bucket); - atomic_subtract_int(&V_frag6_nfrags, q6->ip6q_nfrag); + atomic_subtract_int(&frag6_nfrags, q6->ip6q_nfrag); #ifdef MAC mac_ip6q_destroy(q6); #endif Modified: stable/11/sys/netinet6/in6_proto.c ============================================================================== --- stable/11/sys/netinet6/in6_proto.c Tue Aug 14 17:54:39 2018 (r337796) +++ stable/11/sys/netinet6/in6_proto.c Tue Aug 14 17:59:42 2018 (r337797) @@ -383,7 +383,7 @@ VNET_DEFINE(int, ip6_no_radr) = 0; VNET_DEFINE(int, ip6_norbit_raif) = 0; VNET_DEFINE(int, ip6_rfc6204w3) = 0; VNET_DEFINE(int, ip6_maxfragpackets); /* initialized in frag6.c:frag6_init() */ -VNET_DEFINE(int, ip6_maxfrags); /* initialized in frag6.c:frag6_init() */ +int ip6_maxfrags; /* initialized in frag6.c:frag6_init() */ VNET_DEFINE(int, ip6_log_interval) = 5; VNET_DEFINE(int, ip6_hdrnestlimit) = 15;/* How many header options will we * process? */ @@ -557,8 +557,10 @@ SYSCTL_INT(_net_inet6_ip6, IPV6CTL_USE_DEFAULTZONE, us CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_use_defzone), 0, "Use the default scope zone when none is specified"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_MAXFRAGS, maxfrags, - CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_maxfrags), 0, - "Maximum allowed number of outstanding IPv6 packet fragments"); + CTLFLAG_RW, &ip6_maxfrags, 0, + "Maximum allowed number of outstanding IPv6 packet fragments. " + "A value of 0 means no fragmented packets will be accepted, while a " + "a value of -1 means no limit"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_MCAST_PMTU, mcast_pmtu, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_mcast_pmtu), 0, "Enable path MTU discovery for multicast packets"); Modified: stable/11/sys/netinet6/ip6_var.h ============================================================================== --- stable/11/sys/netinet6/ip6_var.h Tue Aug 14 17:54:39 2018 (r337796) +++ stable/11/sys/netinet6/ip6_var.h Tue Aug 14 17:59:42 2018 (r337797) @@ -296,7 +296,7 @@ VNET_DECLARE(struct socket *, ip6_mrouter); /* multica VNET_DECLARE(int, ip6_sendredirects); /* send IP redirects when forwarding? */ VNET_DECLARE(int, ip6_maxfragpackets); /* Maximum packets in reassembly * queue */ -VNET_DECLARE(int, ip6_maxfrags); /* Maximum fragments in reassembly +extern int ip6_maxfrags; /* Maximum fragments in reassembly * queue */ VNET_DECLARE(int, ip6_accept_rtadv); /* Acts as a host not a router */ VNET_DECLARE(int, ip6_no_radr); /* No defroute from RA */ @@ -312,7 +312,6 @@ VNET_DECLARE(int, ip6_dad_count); /* DupAddrDetectionT #define V_ip6_mrouter VNET(ip6_mrouter) #define V_ip6_sendredirects VNET(ip6_sendredirects) #define V_ip6_maxfragpackets VNET(ip6_maxfragpackets) -#define V_ip6_maxfrags VNET(ip6_maxfrags) #define V_ip6_accept_rtadv VNET(ip6_accept_rtadv) #define V_ip6_no_radr VNET(ip6_no_radr) #define V_ip6_norbit_raif VNET(ip6_norbit_raif) From owner-svn-src-stable@freebsd.org Tue Aug 14 18:07:00 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE56B1080379; Tue, 14 Aug 2018 18:07:00 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 723CD7F8D0; Tue, 14 Aug 2018 18:07:00 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 391761F084; Tue, 14 Aug 2018 18:07:00 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7EI70Gv038089; Tue, 14 Aug 2018 18:07:00 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7EI6xqm038081; Tue, 14 Aug 2018 18:06:59 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201808141806.w7EI6xqm038081@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Tue, 14 Aug 2018 18:06:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337798 - stable/11/sys/netinet6 X-SVN-Group: stable-11 X-SVN-Commit-Author: jtl X-SVN-Commit-Paths: stable/11/sys/netinet6 X-SVN-Commit-Revision: 337798 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2018 18:07:01 -0000 Author: jtl Date: Tue Aug 14 18:06:59 2018 New Revision: 337798 URL: https://svnweb.freebsd.org/changeset/base/337798 Log: MFC r337782: Add a limit of the number of fragments per IPv6 packet. The IPv4 fragment reassembly code supports a limit on the number of fragments per packet. The default limit is currently 17 fragments. Among other things, this limit serves to limit the number of fragments the code must parse when trying to reassembly a packet. Add a limit to the IPv6 reassembly code. By default, limit a packet to 65 fragments (64 on the queue, plus one final fragment to complete the packet). This allows an average fragment size of 1,008 bytes, which should be sufficient to hold a fragment. (Recall that the IPv6 minimum MTU is 1280 bytes. Therefore, this configuration allows a full-size IPv6 packet to be fragmented on a link with the minimum MTU and still carry approximately 272 bytes of headers before the fragmented portion of the packet.) Users can adjust this limit using the net.inet6.ip6.maxfragsperpacket sysctl. Approved by: so Security: FreeBSD-SA-18:10.ip Security: CVE-2018-6923 Modified: stable/11/sys/netinet6/frag6.c stable/11/sys/netinet6/in6.h stable/11/sys/netinet6/in6_proto.c stable/11/sys/netinet6/ip6_var.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet6/frag6.c ============================================================================== --- stable/11/sys/netinet6/frag6.c Tue Aug 14 17:59:42 2018 (r337797) +++ stable/11/sys/netinet6/frag6.c Tue Aug 14 18:06:59 2018 (r337798) @@ -134,6 +134,7 @@ frag6_init(void) mtx_init(&V_ip6q[i].lock, "ip6qlock", NULL, MTX_DEF); } V_ip6q_hashseed = arc4random(); + V_ip6_maxfragsperpacket = 64; if (!IS_DEFAULT_VNET(curvnet)) return; @@ -530,6 +531,7 @@ insert: /* * Stick new segment in its place; * check for complete reassembly. + * If not complete, check fragment limit. * Move to front of packet queue, as we are * the most recently active fragmented packet. */ @@ -546,12 +548,20 @@ insert: for (af6 = q6->ip6q_down; af6 != (struct ip6asfrag *)q6; af6 = af6->ip6af_down) { if (af6->ip6af_off != next) { + if (q6->ip6q_nfrag > V_ip6_maxfragsperpacket) { + IP6STAT_INC(ip6s_fragdropped); + frag6_freef(q6, hash); + } IP6Q_UNLOCK(hash); return IPPROTO_DONE; } next += af6->ip6af_frglen; } if (af6->ip6af_up->ip6af_mff) { + if (q6->ip6q_nfrag > V_ip6_maxfragsperpacket) { + IP6STAT_INC(ip6s_fragdropped); + frag6_freef(q6, hash); + } IP6Q_UNLOCK(hash); return IPPROTO_DONE; } Modified: stable/11/sys/netinet6/in6.h ============================================================================== --- stable/11/sys/netinet6/in6.h Tue Aug 14 17:59:42 2018 (r337797) +++ stable/11/sys/netinet6/in6.h Tue Aug 14 18:06:59 2018 (r337798) @@ -637,7 +637,8 @@ struct ip6_mtuinfo { #define IPV6CTL_INTRQMAXLEN 51 /* max length of IPv6 netisr queue */ #define IPV6CTL_INTRDQMAXLEN 52 /* max length of direct IPv6 netisr * queue */ -#define IPV6CTL_MAXID 53 +#define IPV6CTL_MAXFRAGSPERPACKET 53 /* Max fragments per packet */ +#define IPV6CTL_MAXID 54 #endif /* __BSD_VISIBLE */ /* Modified: stable/11/sys/netinet6/in6_proto.c ============================================================================== --- stable/11/sys/netinet6/in6_proto.c Tue Aug 14 17:59:42 2018 (r337797) +++ stable/11/sys/netinet6/in6_proto.c Tue Aug 14 18:06:59 2018 (r337798) @@ -384,6 +384,7 @@ VNET_DEFINE(int, ip6_norbit_raif) = 0; VNET_DEFINE(int, ip6_rfc6204w3) = 0; VNET_DEFINE(int, ip6_maxfragpackets); /* initialized in frag6.c:frag6_init() */ int ip6_maxfrags; /* initialized in frag6.c:frag6_init() */ +VNET_DEFINE(int, ip6_maxfragsperpacket); /* initialized in frag6.c:frag6_init() */ VNET_DEFINE(int, ip6_log_interval) = 5; VNET_DEFINE(int, ip6_hdrnestlimit) = 15;/* How many header options will we * process? */ @@ -561,6 +562,9 @@ SYSCTL_INT(_net_inet6_ip6, IPV6CTL_MAXFRAGS, maxfrags, "Maximum allowed number of outstanding IPv6 packet fragments. " "A value of 0 means no fragmented packets will be accepted, while a " "a value of -1 means no limit"); +SYSCTL_INT(_net_inet6_ip6, IPV6CTL_MAXFRAGSPERPACKET, maxfragsperpacket, + CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_maxfragsperpacket), 0, + "Maximum allowed number of fragments per packet"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_MCAST_PMTU, mcast_pmtu, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_mcast_pmtu), 0, "Enable path MTU discovery for multicast packets"); Modified: stable/11/sys/netinet6/ip6_var.h ============================================================================== --- stable/11/sys/netinet6/ip6_var.h Tue Aug 14 17:59:42 2018 (r337797) +++ stable/11/sys/netinet6/ip6_var.h Tue Aug 14 18:06:59 2018 (r337798) @@ -298,6 +298,7 @@ VNET_DECLARE(int, ip6_maxfragpackets); /* Maximum pack * queue */ extern int ip6_maxfrags; /* Maximum fragments in reassembly * queue */ +VNET_DECLARE(int, ip6_maxfragsperpacket); /* Maximum fragments per packet */ VNET_DECLARE(int, ip6_accept_rtadv); /* Acts as a host not a router */ VNET_DECLARE(int, ip6_no_radr); /* No defroute from RA */ VNET_DECLARE(int, ip6_norbit_raif); /* Disable R-bit in NA on RA @@ -312,6 +313,7 @@ VNET_DECLARE(int, ip6_dad_count); /* DupAddrDetectionT #define V_ip6_mrouter VNET(ip6_mrouter) #define V_ip6_sendredirects VNET(ip6_sendredirects) #define V_ip6_maxfragpackets VNET(ip6_maxfragpackets) +#define V_ip6_maxfragsperpacket VNET(ip6_maxfragsperpacket) #define V_ip6_accept_rtadv VNET(ip6_accept_rtadv) #define V_ip6_no_radr VNET(ip6_no_radr) #define V_ip6_norbit_raif VNET(ip6_norbit_raif) From owner-svn-src-stable@freebsd.org Tue Aug 14 18:10:27 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E51741080581; Tue, 14 Aug 2018 18:10:26 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9B19C7FBF0; Tue, 14 Aug 2018 18:10:26 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7879D1F088; Tue, 14 Aug 2018 18:10:26 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7EIAQFV038297; Tue, 14 Aug 2018 18:10:26 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7EIAPgd038294; Tue, 14 Aug 2018 18:10:25 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201808141810.w7EIAPgd038294@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Tue, 14 Aug 2018 18:10:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337799 - stable/11/sys/netinet6 X-SVN-Group: stable-11 X-SVN-Commit-Author: jtl X-SVN-Commit-Paths: stable/11/sys/netinet6 X-SVN-Commit-Revision: 337799 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2018 18:10:27 -0000 Author: jtl Date: Tue Aug 14 18:10:25 2018 New Revision: 337799 URL: https://svnweb.freebsd.org/changeset/base/337799 Log: MFC r337783: Implement a limit on on the number of IPv6 reassembly queues per bucket. There is a hashing algorithm which should distribute IPv6 reassembly queues across the available buckets in a relatively even way. However, if there is a flaw in the hashing algorithm which allows a large number of IPv6 fragment reassembly queues to end up in a single bucket, a per- bucket limit could help mitigate the performance impact of this flaw. Implement such a limit, with a default of twice the maximum number of reassembly queues divided by the number of buckets. Recalculate the limit any time the maximum number of reassembly queues changes. However, allow the user to override the value using a sysctl (net.inet6.ip6.maxfragbucketsize). Approved by: so Security: FreeBSD-SA-18:10.ip Security: CVE-2018-6923 Modified: stable/11/sys/netinet6/frag6.c stable/11/sys/netinet6/in6.h stable/11/sys/netinet6/in6_proto.c stable/11/sys/netinet6/ip6_var.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet6/frag6.c ============================================================================== --- stable/11/sys/netinet6/frag6.c Tue Aug 14 18:06:59 2018 (r337798) +++ stable/11/sys/netinet6/frag6.c Tue Aug 14 18:10:25 2018 (r337799) @@ -77,13 +77,14 @@ static void frag6_enq(struct ip6asfrag *, struct ip6as uint32_t bucket __unused); static void frag6_deq(struct ip6asfrag *, uint32_t bucket __unused); static void frag6_insque_head(struct ip6q *, struct ip6q *, - uint32_t bucket __unused); -static void frag6_remque(struct ip6q *, uint32_t bucket __unused); + uint32_t bucket); +static void frag6_remque(struct ip6q *, uint32_t bucket); static void frag6_freef(struct ip6q *, uint32_t bucket); struct ip6qbucket { struct ip6q ip6q; struct mtx lock; + int count; }; static VNET_DEFINE(volatile u_int, frag6_nfragpackets); @@ -106,6 +107,15 @@ static MALLOC_DEFINE(M_FTABLE, "fragment", "fragment r /* * Initialise reassembly queue and fragment identifier. */ +void +frag6_set_bucketsize() +{ + int i; + + if ((i = V_ip6_maxfragpackets) > 0) + V_ip6_maxfragbucketsize = imax(i / (IP6REASS_NHASH / 2), 1); +} + static void frag6_change(void *tag) { @@ -116,6 +126,7 @@ frag6_change(void *tag) VNET_FOREACH(vnet_iter) { CURVNET_SET(vnet_iter); V_ip6_maxfragpackets = nmbclusters / 4; + frag6_set_bucketsize(); CURVNET_RESTORE(); } VNET_LIST_RUNLOCK_NOSLEEP(); @@ -128,10 +139,12 @@ frag6_init(void) int i; V_ip6_maxfragpackets = nmbclusters / 4; + frag6_set_bucketsize(); for (i = 0; i < IP6REASS_NHASH; i++) { q6 = IP6Q_HEAD(i); q6->ip6q_next = q6->ip6q_prev = q6; mtx_init(&V_ip6q[i].lock, "ip6qlock", NULL, MTX_DEF); + V_ip6q[i].count = 0; } V_ip6q_hashseed = arc4random(); V_ip6_maxfragsperpacket = 64; @@ -302,7 +315,8 @@ frag6_input(struct mbuf **mp, int *offp, int proto) */ if (V_ip6_maxfragpackets < 0) ; - else if (V_frag6_nfragpackets >= (u_int)V_ip6_maxfragpackets) + else if (V_ip6q[hash].count >= V_ip6_maxfragbucketsize || + V_frag6_nfragpackets >= (u_int)V_ip6_maxfragpackets) goto dropfrag; atomic_add_int(&V_frag6_nfragpackets, 1); q6 = (struct ip6q *)malloc(sizeof(struct ip6q), M_FTABLE, @@ -760,7 +774,7 @@ frag6_deq(struct ip6asfrag *af6, uint32_t bucket __unu } static void -frag6_insque_head(struct ip6q *new, struct ip6q *old, uint32_t bucket __unused) +frag6_insque_head(struct ip6q *new, struct ip6q *old, uint32_t bucket) { IP6Q_LOCK_ASSERT(bucket); @@ -772,16 +786,18 @@ frag6_insque_head(struct ip6q *new, struct ip6q *old, new->ip6q_next = old->ip6q_next; old->ip6q_next->ip6q_prev= new; old->ip6q_next = new; + V_ip6q[bucket].count++; } static void -frag6_remque(struct ip6q *p6, uint32_t bucket __unused) +frag6_remque(struct ip6q *p6, uint32_t bucket) { IP6Q_LOCK_ASSERT(bucket); p6->ip6q_prev->ip6q_next = p6->ip6q_next; p6->ip6q_next->ip6q_prev = p6->ip6q_prev; + V_ip6q[bucket].count--; } /* @@ -803,29 +819,58 @@ frag6_slowtimo(void) IP6Q_LOCK(i); head = IP6Q_HEAD(i); q6 = head->ip6q_next; - if (q6) - while (q6 != head) { - --q6->ip6q_ttl; - q6 = q6->ip6q_next; - if (q6->ip6q_prev->ip6q_ttl == 0) { - IP6STAT_INC(ip6s_fragtimeout); - /* XXX in6_ifstat_inc(ifp, ifs6_reass_fail) */ - frag6_freef(q6->ip6q_prev, i); - } + if (q6 == NULL) { + /* + * XXXJTL: This should never happen. This + * should turn into an assertion. + */ + IP6Q_UNLOCK(i); + continue; + } + while (q6 != head) { + --q6->ip6q_ttl; + q6 = q6->ip6q_next; + if (q6->ip6q_prev->ip6q_ttl == 0) { + IP6STAT_INC(ip6s_fragtimeout); + /* XXX in6_ifstat_inc(ifp, ifs6_reass_fail) */ + frag6_freef(q6->ip6q_prev, i); } + } /* * If we are over the maximum number of fragments * (due to the limit being lowered), drain off * enough to get down to the new limit. + * Note that we drain all reassembly queues if + * maxfragpackets is 0 (fragmentation is disabled), + * and don't enforce a limit when maxfragpackets + * is negative. */ - while (V_frag6_nfragpackets > - (u_int)V_ip6_maxfragpackets && + while ((V_ip6_maxfragpackets == 0 || + (V_ip6_maxfragpackets > 0 && + V_ip6q[i].count > V_ip6_maxfragbucketsize)) && head->ip6q_prev != head) { IP6STAT_INC(ip6s_fragoverflow); /* XXX in6_ifstat_inc(ifp, ifs6_reass_fail) */ frag6_freef(head->ip6q_prev, i); } IP6Q_UNLOCK(i); + } + /* + * If we are still over the maximum number of fragmented + * packets, drain off enough to get down to the new limit. + */ + i = 0; + while (V_ip6_maxfragpackets >= 0 && + V_frag6_nfragpackets > (u_int)V_ip6_maxfragpackets) { + IP6Q_LOCK(i); + head = IP6Q_HEAD(i); + if (head->ip6q_prev != head) { + IP6STAT_INC(ip6s_fragoverflow); + /* XXX in6_ifstat_inc(ifp, ifs6_reass_fail) */ + frag6_freef(head->ip6q_prev, i); + } + IP6Q_UNLOCK(i); + i = (i + 1) % IP6REASS_NHASH; } CURVNET_RESTORE(); } Modified: stable/11/sys/netinet6/in6.h ============================================================================== --- stable/11/sys/netinet6/in6.h Tue Aug 14 18:06:59 2018 (r337798) +++ stable/11/sys/netinet6/in6.h Tue Aug 14 18:10:25 2018 (r337799) @@ -638,7 +638,8 @@ struct ip6_mtuinfo { #define IPV6CTL_INTRDQMAXLEN 52 /* max length of direct IPv6 netisr * queue */ #define IPV6CTL_MAXFRAGSPERPACKET 53 /* Max fragments per packet */ -#define IPV6CTL_MAXID 54 +#define IPV6CTL_MAXFRAGBUCKETSIZE 54 /* Max reassembly queues per bucket */ +#define IPV6CTL_MAXID 55 #endif /* __BSD_VISIBLE */ /* Modified: stable/11/sys/netinet6/in6_proto.c ============================================================================== --- stable/11/sys/netinet6/in6_proto.c Tue Aug 14 18:06:59 2018 (r337798) +++ stable/11/sys/netinet6/in6_proto.c Tue Aug 14 18:10:25 2018 (r337799) @@ -384,6 +384,7 @@ VNET_DEFINE(int, ip6_norbit_raif) = 0; VNET_DEFINE(int, ip6_rfc6204w3) = 0; VNET_DEFINE(int, ip6_maxfragpackets); /* initialized in frag6.c:frag6_init() */ int ip6_maxfrags; /* initialized in frag6.c:frag6_init() */ +VNET_DEFINE(int, ip6_maxfragbucketsize);/* initialized in frag6.c:frag6_init() */ VNET_DEFINE(int, ip6_maxfragsperpacket); /* initialized in frag6.c:frag6_init() */ VNET_DEFINE(int, ip6_log_interval) = 5; VNET_DEFINE(int, ip6_hdrnestlimit) = 15;/* How many header options will we @@ -471,6 +472,20 @@ sysctl_ip6_tempvltime(SYSCTL_HANDLER_ARGS) return (0); } +static int +sysctl_ip6_maxfragpackets(SYSCTL_HANDLER_ARGS) +{ + int error, val; + + val = V_ip6_maxfragpackets; + error = sysctl_handle_int(oidp, &val, 0, req); + if (error != 0 || !req->newptr) + return (error); + V_ip6_maxfragpackets = val; + frag6_set_bucketsize(); + return (0); +} + SYSCTL_INT(_net_inet6_ip6, IPV6CTL_FORWARDING, forwarding, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_forwarding), 0, "Enable forwarding of IPv6 packets between interfaces"); @@ -483,8 +498,9 @@ SYSCTL_INT(_net_inet6_ip6, IPV6CTL_DEFHLIM, hlim, SYSCTL_VNET_PCPUSTAT(_net_inet6_ip6, IPV6CTL_STATS, stats, struct ip6stat, ip6stat, "IP6 statistics (struct ip6stat, netinet6/ip6_var.h)"); -SYSCTL_INT(_net_inet6_ip6, IPV6CTL_MAXFRAGPACKETS, maxfragpackets, - CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_maxfragpackets), 0, +SYSCTL_PROC(_net_inet6_ip6, IPV6CTL_MAXFRAGPACKETS, maxfragpackets, + CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RW, NULL, 0, + sysctl_ip6_maxfragpackets, "I", "Default maximum number of outstanding fragmented IPv6 packets. " "A value of 0 means no fragmented packets will be accepted, while a " "a value of -1 means no limit"); @@ -562,6 +578,9 @@ SYSCTL_INT(_net_inet6_ip6, IPV6CTL_MAXFRAGS, maxfrags, "Maximum allowed number of outstanding IPv6 packet fragments. " "A value of 0 means no fragmented packets will be accepted, while a " "a value of -1 means no limit"); +SYSCTL_INT(_net_inet6_ip6, IPV6CTL_MAXFRAGBUCKETSIZE, maxfragbucketsize, + CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_maxfragbucketsize), 0, + "Maximum number of reassembly queues per hash bucket"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_MAXFRAGSPERPACKET, maxfragsperpacket, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_maxfragsperpacket), 0, "Maximum allowed number of fragments per packet"); Modified: stable/11/sys/netinet6/ip6_var.h ============================================================================== --- stable/11/sys/netinet6/ip6_var.h Tue Aug 14 18:06:59 2018 (r337798) +++ stable/11/sys/netinet6/ip6_var.h Tue Aug 14 18:10:25 2018 (r337799) @@ -298,6 +298,7 @@ VNET_DECLARE(int, ip6_maxfragpackets); /* Maximum pack * queue */ extern int ip6_maxfrags; /* Maximum fragments in reassembly * queue */ +VNET_DECLARE(int, ip6_maxfragbucketsize); /* Maximum reassembly queues per bucket */ VNET_DECLARE(int, ip6_maxfragsperpacket); /* Maximum fragments per packet */ VNET_DECLARE(int, ip6_accept_rtadv); /* Acts as a host not a router */ VNET_DECLARE(int, ip6_no_radr); /* No defroute from RA */ @@ -313,6 +314,7 @@ VNET_DECLARE(int, ip6_dad_count); /* DupAddrDetectionT #define V_ip6_mrouter VNET(ip6_mrouter) #define V_ip6_sendredirects VNET(ip6_sendredirects) #define V_ip6_maxfragpackets VNET(ip6_maxfragpackets) +#define V_ip6_maxfragbucketsize VNET(ip6_maxfragbucketsize) #define V_ip6_maxfragsperpacket VNET(ip6_maxfragsperpacket) #define V_ip6_accept_rtadv VNET(ip6_accept_rtadv) #define V_ip6_no_radr VNET(ip6_no_radr) @@ -400,6 +402,7 @@ int ip6_fragment(struct ifnet *, struct mbuf *, int, u int route6_input(struct mbuf **, int *, int); +void frag6_set_bucketsize(void); void frag6_init(void); int frag6_input(struct mbuf **, int *, int); void frag6_slowtimo(void); From owner-svn-src-stable@freebsd.org Tue Aug 14 18:12:03 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3955108077F; Tue, 14 Aug 2018 18:12:02 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A92BF800B3; Tue, 14 Aug 2018 18:12:02 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8A6071F0FE; Tue, 14 Aug 2018 18:12:02 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7EIC2MC042900; Tue, 14 Aug 2018 18:12:02 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7EIC2i1042899; Tue, 14 Aug 2018 18:12:02 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201808141812.w7EIC2i1042899@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Tue, 14 Aug 2018 18:12:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337801 - stable/11/sys/netinet6 X-SVN-Group: stable-11 X-SVN-Commit-Author: jtl X-SVN-Commit-Paths: stable/11/sys/netinet6 X-SVN-Commit-Revision: 337801 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2018 18:12:03 -0000 Author: jtl Date: Tue Aug 14 18:12:02 2018 New Revision: 337801 URL: https://svnweb.freebsd.org/changeset/base/337801 Log: MFC r337784: Drop 0-byte IPv6 fragments. Currently, we process IPv6 fragments with 0 bytes of payload, add them to the reassembly queue, and do not recognize them as duplicating or overlapping with adjacent 0-byte fragments. An attacker can exploit this to create long fragment queues. There is no legitimate reason for a fragment with no payload. However, because IPv6 packets with an empty payload are acceptable, allow an "atomic" fragment with no payload. Approved by: so Security: FreeBSD-SA-18:10.ip Security: CVE-2018-6923 Modified: stable/11/sys/netinet6/frag6.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet6/frag6.c ============================================================================== --- stable/11/sys/netinet6/frag6.c Tue Aug 14 18:11:06 2018 (r337800) +++ stable/11/sys/netinet6/frag6.c Tue Aug 14 18:12:02 2018 (r337801) @@ -269,6 +269,16 @@ frag6_input(struct mbuf **mp, int *offp, int proto) return (ip6f->ip6f_nxt); } + /* Get fragment length and discard 0-byte fragments. */ + frgpartlen = sizeof(struct ip6_hdr) + ntohs(ip6->ip6_plen) - offset; + if (frgpartlen == 0) { + icmp6_error(m, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_HEADER, + offsetof(struct ip6_hdr, ip6_plen)); + in6_ifstat_inc(dstifp, ifs6_reass_fail); + IP6STAT_INC(ip6s_fragdropped); + return IPPROTO_DONE; + } + hashkeyp = hashkey; memcpy(hashkeyp, &ip6->ip6_src, sizeof(struct in6_addr)); hashkeyp += sizeof(struct in6_addr) / sizeof(*hashkeyp); @@ -365,7 +375,6 @@ frag6_input(struct mbuf **mp, int *offp, int proto) * in size. * If it would exceed, discard the fragment and return an ICMP error. */ - frgpartlen = sizeof(struct ip6_hdr) + ntohs(ip6->ip6_plen) - offset; if (q6->ip6q_unfrglen >= 0) { /* The 1st fragment has already arrived. */ if (q6->ip6q_unfrglen + fragoff + frgpartlen > IPV6_MAXPACKET) { From owner-svn-src-stable@freebsd.org Tue Aug 14 18:13:38 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9915108083B; Tue, 14 Aug 2018 18:13:37 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8E21F80274; Tue, 14 Aug 2018 18:13:37 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 513A71F22C; Tue, 14 Aug 2018 18:13:37 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7EIDbKv043017; Tue, 14 Aug 2018 18:13:37 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7EIDbDL043016; Tue, 14 Aug 2018 18:13:37 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201808141813.w7EIDbDL043016@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Tue, 14 Aug 2018 18:13:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337802 - stable/11/sys/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: jtl X-SVN-Commit-Paths: stable/11/sys/netinet X-SVN-Commit-Revision: 337802 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2018 18:13:38 -0000 Author: jtl Date: Tue Aug 14 18:13:36 2018 New Revision: 337802 URL: https://svnweb.freebsd.org/changeset/base/337802 Log: MFC r337786: Lower the default limits on the IPv4 reassembly queue. In particular, try to ensure that no bucket will have a reassembly queue larger than approximately 100 items. This limits the cost to find the correct reassembly queue when processing an incoming fragment. Due to the low limits on each bucket's length, increase the size of the hash table from 64 to 1024. Approved by: so Security: FreeBSD-SA-18:10.ip Security: CVE-2018-6923 Modified: stable/11/sys/netinet/ip_reass.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/ip_reass.c ============================================================================== --- stable/11/sys/netinet/ip_reass.c Tue Aug 14 18:12:02 2018 (r337801) +++ stable/11/sys/netinet/ip_reass.c Tue Aug 14 18:13:36 2018 (r337802) @@ -64,7 +64,7 @@ SYSCTL_DECL(_net_inet_ip); /* * Reassembly headers are stored in hash buckets. */ -#define IPREASS_NHASH_LOG2 6 +#define IPREASS_NHASH_LOG2 10 #define IPREASS_NHASH (1 << IPREASS_NHASH_LOG2) #define IPREASS_HMASK (IPREASS_NHASH - 1) @@ -116,6 +116,22 @@ ipq_drop(struct ipqbucket *bucket, struct ipq *fp) ipq_free(bucket, fp); } +/* + * By default, limit the number of IP fragments across all reassembly + * queues to 1/32 of the total number of mbuf clusters. + * + * Limit the total number of reassembly queues per VNET to the + * IP fragment limit, but ensure the limit will not allow any bucket + * to grow above 100 items. (The bucket limit is + * IP_MAXFRAGPACKETS / (IPREASS_NHASH / 2), so the 50 is the correct + * multiplier to reach a 100-item limit.) + * The 100-item limit was chosen as brief testing seems to show that + * this produces "reasonable" performance on some subset of systems + * under DoS attack. + */ +#define IP_MAXFRAGS (nmbclusters / 32) +#define IP_MAXFRAGPACKETS (imin(IP_MAXFRAGS, IPREASS_NHASH * 50)) + static int maxfrags; static volatile u_int nfrags; SYSCTL_INT(_net_inet_ip, OID_AUTO, maxfrags, CTLFLAG_RW, @@ -513,12 +529,12 @@ ipreass_init(void) V_maxfragsperpacket = 16; V_ipq_zone = uma_zcreate("ipq", sizeof(struct ipq), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); - max = nmbclusters / 32; + max = IP_MAXFRAGPACKETS; max = uma_zone_set_max(V_ipq_zone, max); V_ipreass_maxbucketsize = imax(max / (IPREASS_NHASH / 2), 1); if (IS_DEFAULT_VNET(curvnet)) { - maxfrags = nmbclusters / 32; + maxfrags = IP_MAXFRAGS; EVENTHANDLER_REGISTER(nmbclusters_change, ipreass_zone_change, NULL, EVENTHANDLER_PRI_ANY); } @@ -622,8 +638,8 @@ ipreass_zone_change(void *tag) VNET_ITERATOR_DECL(vnet_iter); int max; - maxfrags = nmbclusters / 32; - max = nmbclusters / 32; + maxfrags = IP_MAXFRAGS; + max = IP_MAXFRAGPACKETS; VNET_LIST_RLOCK_NOSLEEP(); VNET_FOREACH(vnet_iter) { CURVNET_SET(vnet_iter); From owner-svn-src-stable@freebsd.org Tue Aug 14 18:15:11 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D92610808D2; Tue, 14 Aug 2018 18:15:11 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E5716803EC; Tue, 14 Aug 2018 18:15:10 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C68FF1F22D; Tue, 14 Aug 2018 18:15:10 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7EIFAYd043146; Tue, 14 Aug 2018 18:15:10 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7EIFAeF043145; Tue, 14 Aug 2018 18:15:10 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201808141815.w7EIFAeF043145@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Tue, 14 Aug 2018 18:15:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337803 - stable/11/sys/netinet6 X-SVN-Group: stable-11 X-SVN-Commit-Author: jtl X-SVN-Commit-Paths: stable/11/sys/netinet6 X-SVN-Commit-Revision: 337803 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2018 18:15:11 -0000 Author: jtl Date: Tue Aug 14 18:15:10 2018 New Revision: 337803 URL: https://svnweb.freebsd.org/changeset/base/337803 Log: MFC r337787: Lower the default limits on the IPv6 reassembly queue. Currently, the limits are quite high. On machines with millions of mbuf clusters, the reassembly queue limits can also run into the millions. Lower these values. Also, try to ensure that no bucket will have a reassembly queue larger than approximately 100 items. This limits the cost to find the correct reassembly queue when processing an incoming fragment. Due to the low limits on each bucket's length, increase the size of the hash table from 64 to 1024. Approved by: so Security: FreeBSD-SA-18:10.ip Security: CVE-2018-6923 Modified: stable/11/sys/netinet6/frag6.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet6/frag6.c ============================================================================== --- stable/11/sys/netinet6/frag6.c Tue Aug 14 18:13:36 2018 (r337802) +++ stable/11/sys/netinet6/frag6.c Tue Aug 14 18:15:10 2018 (r337803) @@ -69,7 +69,7 @@ __FBSDID("$FreeBSD$"); /* * Reassembly headers are stored in hash buckets. */ -#define IP6REASS_NHASH_LOG2 6 +#define IP6REASS_NHASH_LOG2 10 #define IP6REASS_NHASH (1 << IP6REASS_NHASH_LOG2) #define IP6REASS_HMASK (IP6REASS_NHASH - 1) @@ -105,6 +105,22 @@ static VNET_DEFINE(uint32_t, ip6q_hashseed); static MALLOC_DEFINE(M_FTABLE, "fragment", "fragment reassembly header"); /* + * By default, limit the number of IP6 fragments across all reassembly + * queues to 1/32 of the total number of mbuf clusters. + * + * Limit the total number of reassembly queues per VNET to the + * IP6 fragment limit, but ensure the limit will not allow any bucket + * to grow above 100 items. (The bucket limit is + * IP_MAXFRAGPACKETS / (IPREASS_NHASH / 2), so the 50 is the correct + * multiplier to reach a 100-item limit.) + * The 100-item limit was chosen as brief testing seems to show that + * this produces "reasonable" performance on some subset of systems + * under DoS attack. + */ +#define IP6_MAXFRAGS (nmbclusters / 32) +#define IP6_MAXFRAGPACKETS (imin(IP6_MAXFRAGS, IP6REASS_NHASH * 50)) + +/* * Initialise reassembly queue and fragment identifier. */ void @@ -121,11 +137,11 @@ frag6_change(void *tag) { VNET_ITERATOR_DECL(vnet_iter); - ip6_maxfrags = nmbclusters / 4; + ip6_maxfrags = IP6_MAXFRAGS; VNET_LIST_RLOCK_NOSLEEP(); VNET_FOREACH(vnet_iter) { CURVNET_SET(vnet_iter); - V_ip6_maxfragpackets = nmbclusters / 4; + V_ip6_maxfragpackets = IP6_MAXFRAGPACKETS; frag6_set_bucketsize(); CURVNET_RESTORE(); } @@ -138,7 +154,7 @@ frag6_init(void) struct ip6q *q6; int i; - V_ip6_maxfragpackets = nmbclusters / 4; + V_ip6_maxfragpackets = IP6_MAXFRAGPACKETS; frag6_set_bucketsize(); for (i = 0; i < IP6REASS_NHASH; i++) { q6 = IP6Q_HEAD(i); @@ -151,7 +167,7 @@ frag6_init(void) if (!IS_DEFAULT_VNET(curvnet)) return; - ip6_maxfrags = nmbclusters / 4; + ip6_maxfrags = IP6_MAXFRAGS; EVENTHANDLER_REGISTER(nmbclusters_change, frag6_change, NULL, EVENTHANDLER_PRI_ANY); } From owner-svn-src-stable@freebsd.org Tue Aug 14 18:17:06 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6FF5F10809B2; Tue, 14 Aug 2018 18:17:06 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 23C95806E9; Tue, 14 Aug 2018 18:17:06 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 00C081F22F; Tue, 14 Aug 2018 18:17:05 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7EIH5o7043400; Tue, 14 Aug 2018 18:17:05 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7EIH5de043398; Tue, 14 Aug 2018 18:17:05 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201808141817.w7EIH5de043398@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Tue, 14 Aug 2018 18:17:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337804 - stable/11/share/man/man4 X-SVN-Group: stable-11 X-SVN-Commit-Author: jtl X-SVN-Commit-Paths: stable/11/share/man/man4 X-SVN-Commit-Revision: 337804 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2018 18:17:06 -0000 Author: jtl Date: Tue Aug 14 18:17:05 2018 New Revision: 337804 URL: https://svnweb.freebsd.org/changeset/base/337804 Log: MFC r337788: Update the inet(4) and inet6(4) man pages to reflect the changes made to the reassembly code in r337778, r337780, r337781, r337782, and r337783. Approved by: so Security: FreeBSD-SA-18:10.ip Security: CVE-2018-6923 Modified: stable/11/share/man/man4/inet.4 stable/11/share/man/man4/inet6.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/inet.4 ============================================================================== --- stable/11/share/man/man4/inet.4 Tue Aug 14 18:15:10 2018 (r337803) +++ stable/11/share/man/man4/inet.4 Tue Aug 14 18:17:05 2018 (r337804) @@ -28,7 +28,7 @@ .\" From: @(#)inet.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd Feb 4, 2016 +.Dd August 14, 2018 .Dt INET 4 .Os .Sh NAME @@ -229,15 +229,38 @@ At the same time, on high-speed links, it can decrease cycle greatly. Default is 0 (sequential IP IDs). IPv6 flow IDs and fragment IDs are always random. +.It Va ip.maxfrags +Integer: maximum number of fragments the host will accept and simultaneously +hold across all reassembly queues in all VNETs. +If set to 0, reassembly is disabled. +If set to -1, this limit is not applied. +This limit is recalculated when the number of mbuf clusters is changed. +This is a global limit. .It Va ip.maxfragpackets -Integer: maximum number of fragmented packets the host will accept and hold -in the reassembling queue simultaneously. -0 means that the host will not accept any fragmented packets. -\-1 means that the host will accept as many fragmented packets as it receives. +Integer: maximum number of fragmented packets the host will accept and +simultaneously hold in the reassembly queue for a particular VNET. +0 means that the host will not accept any fragmented packets for that VNET. +\-1 means that the host will not apply this limit for that VNET. +This limit is recalculated when the number of mbuf clusters is changed. +This is a per-VNET limit. +.It Va ip.maxfragbucketsize +Integer: maximum number of reassembly queues per bucket. +Fragmented packets are hashed to buckets. +Each bucket has a list of reassembly queues. +The system must compare the incoming packets to the existing reassembly queues +in the bucket to find a matching reassembly queue. +To preserve system resources, the system limits the number of reassembly +queues allowed in each bucket. +This limit is recalculated when the number of mbuf clusters is changed or +when the value of +.Va ip.maxfragpackets +changes. +This is a per-VNET limit. .It Va ip.maxfragsperpacket Integer: maximum number of fragments the host will accept and hold -in the reassembling queue for a packet. -0 means that the host will not accept any fragmented packets. +in the reassembly queue for a packet. +0 means that the host will not accept any fragmented packets for the VNET. +This is a per-VNET limit. .El .Sh SEE ALSO .Xr ioctl 2 , Modified: stable/11/share/man/man4/inet6.4 ============================================================================== --- stable/11/share/man/man4/inet6.4 Tue Aug 14 18:15:10 2018 (r337803) +++ stable/11/share/man/man4/inet6.4 Tue Aug 14 18:17:05 2018 (r337804) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 2, 2009 +.Dd August 14, 2018 .Dt INET6 4 .Os .Sh NAME @@ -219,12 +219,41 @@ packets. This value applies to all the transport protocols on top of .Tn IPv6 . There are APIs to override the value. +.It Dv IPV6CTL_MAXFRAGS +.Pq ip6.maxfrags +Integer: maximum number of fragments the host will accept and simultaneously +hold across all reassembly queues in all VNETs. +If set to 0, fragment reassembly is disabled. +If set to -1, this limit is not applied. +This limit is recalculated when the number of mbuf clusters is changed. +This is a global limit. .It Dv IPV6CTL_MAXFRAGPACKETS .Pq ip6.maxfragpackets -Integer: default maximum number of fragmented packets the node will accept. -0 means that the node will not accept any fragmented packets. --1 means that the node will accept as many fragmented packets as it receives. -The flag is provided basically for avoiding possible DoS attacks. +Integer: maximum number of fragmented packets the node will accept and +simultaneously hold in the reassembly queue for a particular VNET. +0 means that the node will not accept any fragmented packets for that VNET. +-1 means that the node will not apply this limit for that VNET. +This limit is recalculated when the number of mbuf clusters is changed. +This is a per-VNET limit. +.It Dv IPV6CTL_MAXFRAGBUCKETSIZE +.Pq ip6.maxfragbucketsize +Integer: maximum number of reassembly queues per bucket. +Fragmented packets are hashed to buckets. +Each bucket has a list of reassembly queues. +The system must compare the incoming packets to the existing reassembly queues +in the bucket to find a matching reassembly queue. +To preserve system resources, the system limits the number of reassembly +queues allowed in each bucket. +This limit is recalculated when the number of mbuf clusters is changed or +when the value of +.Va ip6.maxfragpackets +changes. +This is a per-VNET limit. +.It Dv IPV6CTL_MAXFRAGSPERPACKET +.Pq ip6.maxfragsperpacket +Integer: maximum number of fragments the host will accept and hold in the +ressembly queue for a packet. +This is a per-VNET limit. .It Dv IPV6CTL_ACCEPT_RTADV .Pq ip6.accept_rtadv Boolean: the default value of a per-interface flag to From owner-svn-src-stable@freebsd.org Tue Aug 14 19:42:19 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73F201055EE8; Tue, 14 Aug 2018 19:42:19 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2995284581; Tue, 14 Aug 2018 19:42:19 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0A99A2007A; Tue, 14 Aug 2018 19:42:19 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7EJgIc2090268; Tue, 14 Aug 2018 19:42:18 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7EJgIfn090267; Tue, 14 Aug 2018 19:42:18 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201808141942.w7EJgIfn090267@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 14 Aug 2018 19:42:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337815 - stable/11/stand/uboot/common X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/stand/uboot/common X-SVN-Commit-Revision: 337815 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2018 19:42:19 -0000 Author: kevans Date: Tue Aug 14 19:42:18 2018 New Revision: 337815 URL: https://svnweb.freebsd.org/changeset/base/337815 Log: ubldr: Bump heap size, 1MB -> 2MB 1MB was leaving very little margin in some of the worse-case scenarios with lualoader. 2MB is still low enough that we shouldn't have any problems with UBoot-supported boards. Modified: stable/11/stand/uboot/common/main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/stand/uboot/common/main.c ============================================================================== --- stable/11/stand/uboot/common/main.c Tue Aug 14 19:31:06 2018 (r337814) +++ stable/11/stand/uboot/common/main.c Tue Aug 14 19:42:18 2018 (r337815) @@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$"); #endif #ifndef HEAP_SIZE -#define HEAP_SIZE (1 * 1024 * 1024) +#define HEAP_SIZE (2 * 1024 * 1024) #endif struct uboot_devdesc currdev; From owner-svn-src-stable@freebsd.org Tue Aug 14 19:44:37 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA1961058339; Tue, 14 Aug 2018 19:44:37 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 704DB84980; Tue, 14 Aug 2018 19:44:37 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 52B692008E; Tue, 14 Aug 2018 19:44:37 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7EJibPs090672; Tue, 14 Aug 2018 19:44:37 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7EJiaAv090670; Tue, 14 Aug 2018 19:44:36 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201808141944.w7EJiaAv090670@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 14 Aug 2018 19:44:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337816 - in stable/11/stand/i386: gptboot isoboot X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable/11/stand/i386: gptboot isoboot X-SVN-Commit-Revision: 337816 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2018 19:44:37 -0000 Author: kevans Date: Tue Aug 14 19:44:36 2018 New Revision: 337816 URL: https://svnweb.freebsd.org/changeset/base/337816 Log: MFC r337520: Fix WITHOUT_LOADER_GELI (gptboot) and isoboot in general gptboot was broken when r316078 added the LOADER_GELI_SUPPORT #ifdef to not pass geliargs via __exec. KARGS_FLAGS_EXTARG must not be used if we're not going to pass an additional argument to __exec. PR: 228151 Modified: stable/11/stand/i386/gptboot/gptboot.c stable/11/stand/i386/isoboot/isoboot.c Directory Properties: stable/11/ (props changed) Modified: stable/11/stand/i386/gptboot/gptboot.c ============================================================================== --- stable/11/stand/i386/gptboot/gptboot.c Tue Aug 14 19:42:18 2018 (r337815) +++ stable/11/stand/i386/gptboot/gptboot.c Tue Aug 14 19:44:36 2018 (r337816) @@ -482,9 +482,10 @@ load(void) #endif __exec((caddr_t)addr, RB_BOOTINFO | (opts & RBX_MASK), MAKEBOOTDEV(dev_maj[dsk.type], dsk.part + 1, dsk.unit, 0xff), - KARGS_FLAGS_EXTARG, 0, 0, VTOP(&bootinfo) #ifdef LOADER_GELI_SUPPORT - , geliargs + KARGS_FLAGS_EXTARG, 0, 0, VTOP(&bootinfo), geliargs +#else + 0, 0, 0, VTOP(&bootinfo) #endif ); } Modified: stable/11/stand/i386/isoboot/isoboot.c ============================================================================== --- stable/11/stand/i386/isoboot/isoboot.c Tue Aug 14 19:42:18 2018 (r337815) +++ stable/11/stand/i386/isoboot/isoboot.c Tue Aug 14 19:44:36 2018 (r337816) @@ -417,7 +417,7 @@ load(void) bootinfo.bi_bios_dev = dsk.drive; __exec((caddr_t)addr, RB_BOOTINFO | (opts & RBX_MASK), MAKEBOOTDEV(dev_maj[dsk.type], 0, dsk.unit, 0), - KARGS_FLAGS_EXTARG, 0, 0, VTOP(&bootinfo)); + 0, 0, 0, VTOP(&bootinfo)); } static int From owner-svn-src-stable@freebsd.org Tue Aug 14 20:02:04 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2CA5105B04B; Tue, 14 Aug 2018 20:02:03 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 75D4585950; Tue, 14 Aug 2018 20:02:03 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 56CFA20398; Tue, 14 Aug 2018 20:02:03 +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 w7EK23Wf000156; Tue, 14 Aug 2018 20:02:03 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7EK22GQ098425; Tue, 14 Aug 2018 20:02:02 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201808142002.w7EK22GQ098425@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 14 Aug 2018 20:02:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337817 - in stable/11: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/patches contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/driv... X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable/11: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/patches contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers contrib/wpa/src/eap_c... X-SVN-Commit-Revision: 337817 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2018 20:02:04 -0000 Author: cy Date: Tue Aug 14 20:02:01 2018 New Revision: 337817 URL: https://svnweb.freebsd.org/changeset/base/337817 Log: MFC r336203, r336499, r336501-r336502, r336506, r336510, r336512-r336513, r336515, r336528-r336531 r336203: MFV r324714: Update wpa 2.5 --> 2.6. r336499: MFV: r336485 Address: hostapd: Avoid key reinstallation in FT handshake Obtained from: https://w1.fi/security/2017-1/\ rebased-v2.6-0001-hostapd-Avoid-key-\ reinstallation-in-FT-handshake.patch r336501: MFV: r336486 Prevent reinstallation of an already in-use group key. Upline git commit cb5132bb35698cc0c743e34fe0e845dfc4c3e410. Obtained from: https://w1.fi/security/2017-1/\ rebased-v2.6-0002-Prevent-reinstallation-\ of-an-already-in-use-group-ke.patch r336502: MFV r336487: Import upline security patch: Extend protection of GTK/IGTK reinstallation of WNM-Sleep Mode cases. This git commit 87e2db16bafcbc60b8d0016175814a73c1e8ed45. This commit is is simply a pops change as r324696 already plugged this vulnerability. To maintain consistency with the vendor branch props will be changed. Obtained from: https://w1.fi/security/2017-1/\ rebased-v2.6-0003-Extend-protection-of-GTK-IGTK-\ reinstallation-of-WNM-.patch r336506: MFV r336490: Prevent installation of an all-zero TK. This is also upline git commit 53bb18cc8b7a4da72e47e4b3752d0d2135cffb23. Obtained from: https://w1.fi/security/2017-1/\ rebased-v2.6-0004-Prevent-installation-\ of-an-all-zero-TK.patch r336510: MFV r336493: Fix PTK rekeying to generate a new ANonce. This is also upline git commit 0adc9b28b39d414d5febfff752f6a1576f785c85. This commit is a NOP, just changing props as the heavy lifting was done by r324696. This just brings us into line with the vendor branch. Obtained from: https://w1.fi/security/2017-1/\ rebased-v2.6-0005-Fix-PTK-rekeying-to-\ generate-a-new-ANonce.patch r336512: MFV r336494: TDLS: Reject TPK-TK reconfiguration. This is also upline git commmit ff89af96e5a35c86f50330d2b86c18323318a60c. Once again this is a NOP as this is a props change to sync up with the vendor branch. The real commit is in r324696. Obtained from: https://w1.fi/security/2017-1/\ rebased-v2.6-0006-TDLS-Reject-TPK-TK-\ reconfiguration.patch r336513: MFV r336495: Another props change. The real work was done by r324696. We're simply syncing up with the vendor branch again. mport upline security patch: WNM: Ignore WNM-Sleep Mode Request in wnm_sleep_mode=0 case. This is also upline git commit 114f2830d2c2aee6db23d48240e93415a256a37c. Obtained from: https://w1.fi/security/2017-1/\ rebased-v2.6-0007-WNM-Ignore-WNM-Sleep-Mode-\ Response-without-pending-r.patch r336515: MFV r336496: A props change to sync up with the vendor branch. The real work was done by r324696. FILS: Do not allow multiple (Re)Association Response frames. This is also upline git commit e760851176c77ae6de19821bb1d5bf3ae2cb5187. Obtained from: https://w1.fi/security/2017-1/\ rebased-v2.6-0008-FT-Do-not-allow-multiple-\ Reassociation-Response-fram.patch r336528: Revert r336501. It was a of the wrong rev from the vendor branch. r336529: MFV: r336486 Prevent reinstallation of an already in-use group key. Upline git commit cb5132bb35698cc0c743e34fe0e845dfc4c3e410. Obtained from: https://w1.fi/security/2017-1/\ rebased-v2.6-0002-Prevent-reinstallation-\ of-an-already-in-use-group-ke.patch r336530: To reduce our diff between our sources and our upline, sync up with upline. Also making it easier to read. Obtained from: diffing base with ports r336531: Remove a redundant declaration. While at it add a blank line, conforming with the convention used in this file. Added: stable/11/contrib/wpa/src/ap/mbo_ap.c - copied unchanged from r336203, head/contrib/wpa/src/ap/mbo_ap.c stable/11/contrib/wpa/src/ap/mbo_ap.h - copied unchanged from r336203, head/contrib/wpa/src/ap/mbo_ap.h stable/11/contrib/wpa/src/ap/neighbor_db.c - copied unchanged from r336203, head/contrib/wpa/src/ap/neighbor_db.c stable/11/contrib/wpa/src/ap/neighbor_db.h - copied unchanged from r336203, head/contrib/wpa/src/ap/neighbor_db.h stable/11/contrib/wpa/src/ap/rrm.c - copied unchanged from r336203, head/contrib/wpa/src/ap/rrm.c stable/11/contrib/wpa/src/ap/rrm.h - copied unchanged from r336203, head/contrib/wpa/src/ap/rrm.h stable/11/contrib/wpa/src/ap/taxonomy.c - copied unchanged from r336203, head/contrib/wpa/src/ap/taxonomy.c stable/11/contrib/wpa/src/ap/taxonomy.h - copied unchanged from r336203, head/contrib/wpa/src/ap/taxonomy.h stable/11/contrib/wpa/src/ap/vlan.c - copied unchanged from r336203, head/contrib/wpa/src/ap/vlan.c stable/11/contrib/wpa/src/ap/vlan.h - copied unchanged from r336203, head/contrib/wpa/src/ap/vlan.h stable/11/contrib/wpa/src/ap/vlan_full.c - copied unchanged from r336203, head/contrib/wpa/src/ap/vlan_full.c stable/11/contrib/wpa/src/ap/vlan_ifconfig.c - copied unchanged from r336203, head/contrib/wpa/src/ap/vlan_ifconfig.c stable/11/contrib/wpa/src/ap/vlan_ioctl.c - copied unchanged from r336203, head/contrib/wpa/src/ap/vlan_ioctl.c stable/11/contrib/wpa/src/common/cli.c - copied unchanged from r336203, head/contrib/wpa/src/common/cli.c stable/11/contrib/wpa/src/common/cli.h - copied unchanged from r336203, head/contrib/wpa/src/common/cli.h stable/11/contrib/wpa/src/common/ctrl_iface_common.c - copied unchanged from r336203, head/contrib/wpa/src/common/ctrl_iface_common.c stable/11/contrib/wpa/src/common/ctrl_iface_common.h - copied unchanged from r336203, head/contrib/wpa/src/common/ctrl_iface_common.h stable/11/contrib/wpa/src/crypto/sha384-internal.c - copied unchanged from r336203, head/contrib/wpa/src/crypto/sha384-internal.c stable/11/contrib/wpa/src/crypto/sha384_i.h - copied unchanged from r336203, head/contrib/wpa/src/crypto/sha384_i.h stable/11/contrib/wpa/src/crypto/sha512-internal.c - copied unchanged from r336203, head/contrib/wpa/src/crypto/sha512-internal.c stable/11/contrib/wpa/src/crypto/sha512_i.h - copied unchanged from r336203, head/contrib/wpa/src/crypto/sha512_i.h stable/11/contrib/wpa/src/crypto/tls_openssl.h - copied unchanged from r336203, head/contrib/wpa/src/crypto/tls_openssl.h stable/11/contrib/wpa/src/crypto/tls_openssl_ocsp.c - copied unchanged from r336203, head/contrib/wpa/src/crypto/tls_openssl_ocsp.c stable/11/contrib/wpa/src/tls/tlsv1_client_ocsp.c - copied unchanged from r336203, head/contrib/wpa/src/tls/tlsv1_client_ocsp.c stable/11/contrib/wpa/src/utils/module_tests.h - copied unchanged from r336203, head/contrib/wpa/src/utils/module_tests.h stable/11/contrib/wpa/wpa_supplicant/Android.mk - copied unchanged from r336203, head/contrib/wpa/wpa_supplicant/Android.mk stable/11/contrib/wpa/wpa_supplicant/README-Windows.txt - copied unchanged from r336203, head/contrib/wpa/wpa_supplicant/README-Windows.txt stable/11/contrib/wpa/wpa_supplicant/android.config - copied unchanged from r336203, head/contrib/wpa/wpa_supplicant/android.config stable/11/contrib/wpa/wpa_supplicant/binder/ - copied from r336203, head/contrib/wpa/wpa_supplicant/binder/ stable/11/contrib/wpa/wpa_supplicant/libwpa_test.c - copied unchanged from r336203, head/contrib/wpa/wpa_supplicant/libwpa_test.c stable/11/contrib/wpa/wpa_supplicant/mbo.c - copied unchanged from r336203, head/contrib/wpa/wpa_supplicant/mbo.c stable/11/contrib/wpa/wpa_supplicant/systemd/ - copied from r336203, head/contrib/wpa/wpa_supplicant/systemd/ stable/11/contrib/wpa/wpa_supplicant/vs2005/ - copied from r336203, head/contrib/wpa/wpa_supplicant/vs2005/ Deleted: stable/11/contrib/wpa/patches/openssl-0.9.8za-tls-extensions.patch stable/11/contrib/wpa/patches/openssl-0.9.8zf-tls-extensions.patch stable/11/contrib/wpa/wpa_supplicant/tests/link_test.c stable/11/contrib/wpa/wpa_supplicant/tests/test_eap_sim_common.c stable/11/contrib/wpa/wpa_supplicant/tests/test_wpa.c Modified: stable/11/contrib/wpa/CONTRIBUTIONS stable/11/contrib/wpa/COPYING stable/11/contrib/wpa/README stable/11/contrib/wpa/hostapd/ChangeLog stable/11/contrib/wpa/hostapd/README stable/11/contrib/wpa/hostapd/config_file.c stable/11/contrib/wpa/hostapd/ctrl_iface.c stable/11/contrib/wpa/hostapd/defconfig stable/11/contrib/wpa/hostapd/hapd_module_tests.c stable/11/contrib/wpa/hostapd/hlr_auc_gw.c stable/11/contrib/wpa/hostapd/hostapd.conf stable/11/contrib/wpa/hostapd/hostapd_cli.c stable/11/contrib/wpa/hostapd/main.c stable/11/contrib/wpa/hs20/client/Android.mk stable/11/contrib/wpa/hs20/client/Makefile stable/11/contrib/wpa/hs20/client/est.c stable/11/contrib/wpa/hs20/client/osu_client.c stable/11/contrib/wpa/src/ap/accounting.c stable/11/contrib/wpa/src/ap/accounting.h stable/11/contrib/wpa/src/ap/acs.c stable/11/contrib/wpa/src/ap/ap_config.c stable/11/contrib/wpa/src/ap/ap_config.h stable/11/contrib/wpa/src/ap/ap_drv_ops.c stable/11/contrib/wpa/src/ap/ap_drv_ops.h stable/11/contrib/wpa/src/ap/ap_mlme.c stable/11/contrib/wpa/src/ap/authsrv.c stable/11/contrib/wpa/src/ap/beacon.c stable/11/contrib/wpa/src/ap/beacon.h stable/11/contrib/wpa/src/ap/ctrl_iface_ap.c stable/11/contrib/wpa/src/ap/ctrl_iface_ap.h stable/11/contrib/wpa/src/ap/dfs.c stable/11/contrib/wpa/src/ap/dhcp_snoop.c stable/11/contrib/wpa/src/ap/drv_callbacks.c stable/11/contrib/wpa/src/ap/gas_serv.c stable/11/contrib/wpa/src/ap/gas_serv.h stable/11/contrib/wpa/src/ap/hostapd.c stable/11/contrib/wpa/src/ap/hostapd.h stable/11/contrib/wpa/src/ap/hw_features.c stable/11/contrib/wpa/src/ap/iapp.c stable/11/contrib/wpa/src/ap/ieee802_11.c stable/11/contrib/wpa/src/ap/ieee802_11.h stable/11/contrib/wpa/src/ap/ieee802_11_auth.c stable/11/contrib/wpa/src/ap/ieee802_11_auth.h stable/11/contrib/wpa/src/ap/ieee802_11_ht.c stable/11/contrib/wpa/src/ap/ieee802_11_shared.c stable/11/contrib/wpa/src/ap/ieee802_11_vht.c stable/11/contrib/wpa/src/ap/ieee802_1x.c stable/11/contrib/wpa/src/ap/ieee802_1x.h stable/11/contrib/wpa/src/ap/ndisc_snoop.c stable/11/contrib/wpa/src/ap/pmksa_cache_auth.c stable/11/contrib/wpa/src/ap/pmksa_cache_auth.h stable/11/contrib/wpa/src/ap/sta_info.c stable/11/contrib/wpa/src/ap/sta_info.h stable/11/contrib/wpa/src/ap/vlan_init.c stable/11/contrib/wpa/src/ap/vlan_init.h stable/11/contrib/wpa/src/ap/vlan_util.c stable/11/contrib/wpa/src/ap/vlan_util.h stable/11/contrib/wpa/src/ap/wnm_ap.c stable/11/contrib/wpa/src/ap/wnm_ap.h stable/11/contrib/wpa/src/ap/wpa_auth.c stable/11/contrib/wpa/src/ap/wpa_auth.h stable/11/contrib/wpa/src/ap/wpa_auth_ft.c stable/11/contrib/wpa/src/ap/wpa_auth_glue.c stable/11/contrib/wpa/src/ap/wpa_auth_i.h stable/11/contrib/wpa/src/ap/wpa_auth_ie.c stable/11/contrib/wpa/src/ap/wps_hostapd.c stable/11/contrib/wpa/src/common/common_module_tests.c stable/11/contrib/wpa/src/common/defs.h stable/11/contrib/wpa/src/common/eapol_common.h stable/11/contrib/wpa/src/common/ieee802_11_common.c stable/11/contrib/wpa/src/common/ieee802_11_common.h stable/11/contrib/wpa/src/common/ieee802_11_defs.h stable/11/contrib/wpa/src/common/ieee802_1x_defs.h stable/11/contrib/wpa/src/common/qca-vendor.h stable/11/contrib/wpa/src/common/sae.c stable/11/contrib/wpa/src/common/sae.h stable/11/contrib/wpa/src/common/version.h stable/11/contrib/wpa/src/common/wpa_common.c stable/11/contrib/wpa/src/common/wpa_common.h stable/11/contrib/wpa/src/common/wpa_ctrl.c stable/11/contrib/wpa/src/common/wpa_ctrl.h stable/11/contrib/wpa/src/common/wpa_helpers.c stable/11/contrib/wpa/src/crypto/aes-cbc.c stable/11/contrib/wpa/src/crypto/aes-omac1.c stable/11/contrib/wpa/src/crypto/crypto.h stable/11/contrib/wpa/src/crypto/crypto_internal.c stable/11/contrib/wpa/src/crypto/crypto_module_tests.c stable/11/contrib/wpa/src/crypto/crypto_openssl.c stable/11/contrib/wpa/src/crypto/dh_group5.c stable/11/contrib/wpa/src/crypto/dh_groups.c stable/11/contrib/wpa/src/crypto/fips_prf_openssl.c stable/11/contrib/wpa/src/crypto/md4-internal.c stable/11/contrib/wpa/src/crypto/md5-internal.c stable/11/contrib/wpa/src/crypto/ms_funcs.c stable/11/contrib/wpa/src/crypto/sha1-internal.c stable/11/contrib/wpa/src/crypto/sha256-internal.c stable/11/contrib/wpa/src/crypto/sha256-prf.c stable/11/contrib/wpa/src/crypto/sha256.h stable/11/contrib/wpa/src/crypto/tls.h stable/11/contrib/wpa/src/crypto/tls_gnutls.c stable/11/contrib/wpa/src/crypto/tls_internal.c stable/11/contrib/wpa/src/crypto/tls_none.c stable/11/contrib/wpa/src/crypto/tls_openssl.c stable/11/contrib/wpa/src/drivers/driver.h stable/11/contrib/wpa/src/drivers/driver_bsd.c stable/11/contrib/wpa/src/drivers/driver_common.c stable/11/contrib/wpa/src/drivers/driver_macsec_qca.c stable/11/contrib/wpa/src/drivers/driver_ndis.c stable/11/contrib/wpa/src/drivers/driver_nl80211.h stable/11/contrib/wpa/src/drivers/driver_nl80211_capa.c stable/11/contrib/wpa/src/drivers/driver_nl80211_event.c stable/11/contrib/wpa/src/drivers/driver_nl80211_monitor.c stable/11/contrib/wpa/src/drivers/driver_nl80211_scan.c stable/11/contrib/wpa/src/drivers/driver_privsep.c stable/11/contrib/wpa/src/drivers/driver_wired.c stable/11/contrib/wpa/src/drivers/drivers.c stable/11/contrib/wpa/src/eap_common/eap_eke_common.c stable/11/contrib/wpa/src/eap_common/eap_fast_common.c stable/11/contrib/wpa/src/eap_common/eap_fast_common.h stable/11/contrib/wpa/src/eap_common/eap_gpsk_common.c stable/11/contrib/wpa/src/eap_common/eap_pax_common.c stable/11/contrib/wpa/src/eap_common/eap_pwd_common.c stable/11/contrib/wpa/src/eap_common/eap_sake_common.c stable/11/contrib/wpa/src/eap_common/ikev2_common.c stable/11/contrib/wpa/src/eap_peer/eap.c stable/11/contrib/wpa/src/eap_peer/eap_aka.c stable/11/contrib/wpa/src/eap_peer/eap_config.h stable/11/contrib/wpa/src/eap_peer/eap_eke.c stable/11/contrib/wpa/src/eap_peer/eap_fast.c stable/11/contrib/wpa/src/eap_peer/eap_fast_pac.c stable/11/contrib/wpa/src/eap_peer/eap_gpsk.c stable/11/contrib/wpa/src/eap_peer/eap_gtc.c stable/11/contrib/wpa/src/eap_peer/eap_i.h stable/11/contrib/wpa/src/eap_peer/eap_ikev2.c stable/11/contrib/wpa/src/eap_peer/eap_leap.c stable/11/contrib/wpa/src/eap_peer/eap_md5.c stable/11/contrib/wpa/src/eap_peer/eap_methods.c stable/11/contrib/wpa/src/eap_peer/eap_methods.h stable/11/contrib/wpa/src/eap_peer/eap_mschapv2.c stable/11/contrib/wpa/src/eap_peer/eap_otp.c stable/11/contrib/wpa/src/eap_peer/eap_pax.c stable/11/contrib/wpa/src/eap_peer/eap_peap.c stable/11/contrib/wpa/src/eap_peer/eap_psk.c stable/11/contrib/wpa/src/eap_peer/eap_pwd.c stable/11/contrib/wpa/src/eap_peer/eap_sake.c stable/11/contrib/wpa/src/eap_peer/eap_sim.c stable/11/contrib/wpa/src/eap_peer/eap_tls.c stable/11/contrib/wpa/src/eap_peer/eap_tls_common.c stable/11/contrib/wpa/src/eap_peer/eap_tnc.c stable/11/contrib/wpa/src/eap_peer/eap_ttls.c stable/11/contrib/wpa/src/eap_peer/eap_vendor_test.c stable/11/contrib/wpa/src/eap_peer/eap_wsc.c stable/11/contrib/wpa/src/eap_peer/ikev2.c stable/11/contrib/wpa/src/eap_peer/tncc.c stable/11/contrib/wpa/src/eap_server/eap_methods.h stable/11/contrib/wpa/src/eap_server/eap_server_aka.c stable/11/contrib/wpa/src/eap_server/eap_server_eke.c stable/11/contrib/wpa/src/eap_server/eap_server_fast.c stable/11/contrib/wpa/src/eap_server/eap_server_gpsk.c stable/11/contrib/wpa/src/eap_server/eap_server_gtc.c stable/11/contrib/wpa/src/eap_server/eap_server_identity.c stable/11/contrib/wpa/src/eap_server/eap_server_ikev2.c stable/11/contrib/wpa/src/eap_server/eap_server_md5.c stable/11/contrib/wpa/src/eap_server/eap_server_methods.c stable/11/contrib/wpa/src/eap_server/eap_server_mschapv2.c stable/11/contrib/wpa/src/eap_server/eap_server_pax.c stable/11/contrib/wpa/src/eap_server/eap_server_peap.c stable/11/contrib/wpa/src/eap_server/eap_server_psk.c stable/11/contrib/wpa/src/eap_server/eap_server_pwd.c stable/11/contrib/wpa/src/eap_server/eap_server_sake.c stable/11/contrib/wpa/src/eap_server/eap_server_sim.c stable/11/contrib/wpa/src/eap_server/eap_server_tls.c stable/11/contrib/wpa/src/eap_server/eap_server_tls_common.c stable/11/contrib/wpa/src/eap_server/eap_server_tnc.c stable/11/contrib/wpa/src/eap_server/eap_server_ttls.c stable/11/contrib/wpa/src/eap_server/eap_server_vendor_test.c stable/11/contrib/wpa/src/eap_server/eap_server_wsc.c stable/11/contrib/wpa/src/eap_server/eap_sim_db.c stable/11/contrib/wpa/src/eap_server/eap_sim_db.h stable/11/contrib/wpa/src/eap_server/ikev2.c stable/11/contrib/wpa/src/eap_server/tncs.c stable/11/contrib/wpa/src/eapol_auth/eapol_auth_sm.c stable/11/contrib/wpa/src/eapol_auth/eapol_auth_sm_i.h stable/11/contrib/wpa/src/eapol_supp/eapol_supp_sm.c stable/11/contrib/wpa/src/fst/fst.c stable/11/contrib/wpa/src/fst/fst_ctrl_aux.c stable/11/contrib/wpa/src/fst/fst_ctrl_iface.c stable/11/contrib/wpa/src/fst/fst_defs.h stable/11/contrib/wpa/src/fst/fst_group.c stable/11/contrib/wpa/src/fst/fst_group.h stable/11/contrib/wpa/src/fst/fst_iface.c stable/11/contrib/wpa/src/fst/fst_iface.h stable/11/contrib/wpa/src/fst/fst_session.c stable/11/contrib/wpa/src/p2p/p2p.c stable/11/contrib/wpa/src/p2p/p2p.h stable/11/contrib/wpa/src/p2p/p2p_build.c stable/11/contrib/wpa/src/p2p/p2p_go_neg.c stable/11/contrib/wpa/src/p2p/p2p_group.c stable/11/contrib/wpa/src/p2p/p2p_i.h stable/11/contrib/wpa/src/p2p/p2p_invitation.c stable/11/contrib/wpa/src/p2p/p2p_parse.c stable/11/contrib/wpa/src/p2p/p2p_pd.c stable/11/contrib/wpa/src/p2p/p2p_sd.c stable/11/contrib/wpa/src/pae/ieee802_1x_cp.c stable/11/contrib/wpa/src/pae/ieee802_1x_cp.h stable/11/contrib/wpa/src/pae/ieee802_1x_kay.c stable/11/contrib/wpa/src/pae/ieee802_1x_kay.h stable/11/contrib/wpa/src/pae/ieee802_1x_kay_i.h stable/11/contrib/wpa/src/pae/ieee802_1x_secy_ops.c stable/11/contrib/wpa/src/pae/ieee802_1x_secy_ops.h stable/11/contrib/wpa/src/radius/radius.c stable/11/contrib/wpa/src/radius/radius.h stable/11/contrib/wpa/src/radius/radius_client.c stable/11/contrib/wpa/src/radius/radius_client.h stable/11/contrib/wpa/src/radius/radius_das.c stable/11/contrib/wpa/src/radius/radius_das.h stable/11/contrib/wpa/src/rsn_supp/pmksa_cache.c stable/11/contrib/wpa/src/rsn_supp/pmksa_cache.h stable/11/contrib/wpa/src/rsn_supp/preauth.c stable/11/contrib/wpa/src/rsn_supp/preauth.h stable/11/contrib/wpa/src/rsn_supp/tdls.c stable/11/contrib/wpa/src/rsn_supp/wpa.c stable/11/contrib/wpa/src/rsn_supp/wpa.h stable/11/contrib/wpa/src/rsn_supp/wpa_i.h stable/11/contrib/wpa/src/rsn_supp/wpa_ie.c stable/11/contrib/wpa/src/tls/asn1.h stable/11/contrib/wpa/src/tls/pkcs5.c stable/11/contrib/wpa/src/tls/tlsv1_client.c stable/11/contrib/wpa/src/tls/tlsv1_client.h stable/11/contrib/wpa/src/tls/tlsv1_client_i.h stable/11/contrib/wpa/src/tls/tlsv1_client_read.c stable/11/contrib/wpa/src/tls/tlsv1_client_write.c stable/11/contrib/wpa/src/tls/tlsv1_common.c stable/11/contrib/wpa/src/tls/tlsv1_common.h stable/11/contrib/wpa/src/tls/tlsv1_cred.c stable/11/contrib/wpa/src/tls/tlsv1_cred.h stable/11/contrib/wpa/src/tls/tlsv1_server_i.h stable/11/contrib/wpa/src/tls/tlsv1_server_read.c stable/11/contrib/wpa/src/tls/tlsv1_server_write.c stable/11/contrib/wpa/src/tls/x509v3.c stable/11/contrib/wpa/src/tls/x509v3.h stable/11/contrib/wpa/src/utils/browser-android.c stable/11/contrib/wpa/src/utils/common.c stable/11/contrib/wpa/src/utils/common.h stable/11/contrib/wpa/src/utils/edit_simple.c stable/11/contrib/wpa/src/utils/eloop.c stable/11/contrib/wpa/src/utils/eloop.h stable/11/contrib/wpa/src/utils/eloop_win.c stable/11/contrib/wpa/src/utils/ext_password.c stable/11/contrib/wpa/src/utils/ext_password_i.h stable/11/contrib/wpa/src/utils/http_curl.c stable/11/contrib/wpa/src/utils/os.h stable/11/contrib/wpa/src/utils/os_unix.c stable/11/contrib/wpa/src/utils/pcsc_funcs.c stable/11/contrib/wpa/src/utils/platform.h stable/11/contrib/wpa/src/utils/radiotap.c stable/11/contrib/wpa/src/utils/radiotap.h stable/11/contrib/wpa/src/utils/radiotap_iter.h stable/11/contrib/wpa/src/utils/trace.c stable/11/contrib/wpa/src/utils/trace.h stable/11/contrib/wpa/src/utils/utils_module_tests.c stable/11/contrib/wpa/src/utils/wpa_debug.c stable/11/contrib/wpa/src/utils/wpabuf.c stable/11/contrib/wpa/src/utils/wpabuf.h stable/11/contrib/wpa/src/utils/xml_libxml2.c stable/11/contrib/wpa/src/wps/wps.c stable/11/contrib/wpa/src/wps/wps.h stable/11/contrib/wpa/src/wps/wps_attr_build.c stable/11/contrib/wpa/src/wps/wps_attr_parse.c stable/11/contrib/wpa/src/wps/wps_attr_process.c stable/11/contrib/wpa/src/wps/wps_common.c stable/11/contrib/wpa/src/wps/wps_defs.h stable/11/contrib/wpa/src/wps/wps_enrollee.c stable/11/contrib/wpa/src/wps/wps_i.h stable/11/contrib/wpa/src/wps/wps_module_tests.c stable/11/contrib/wpa/src/wps/wps_registrar.c stable/11/contrib/wpa/src/wps/wps_upnp.c stable/11/contrib/wpa/src/wps/wps_upnp.h stable/11/contrib/wpa/src/wps/wps_upnp_i.h stable/11/contrib/wpa/src/wps/wps_upnp_ssdp.c stable/11/contrib/wpa/src/wps/wps_upnp_web.c stable/11/contrib/wpa/wpa_supplicant/ChangeLog stable/11/contrib/wpa/wpa_supplicant/README stable/11/contrib/wpa/wpa_supplicant/README-HS20 stable/11/contrib/wpa/wpa_supplicant/README-P2P stable/11/contrib/wpa/wpa_supplicant/ap.c stable/11/contrib/wpa/wpa_supplicant/ap.h stable/11/contrib/wpa/wpa_supplicant/autoscan.c stable/11/contrib/wpa/wpa_supplicant/autoscan.h stable/11/contrib/wpa/wpa_supplicant/bgscan.c stable/11/contrib/wpa/wpa_supplicant/bgscan.h stable/11/contrib/wpa/wpa_supplicant/bss.c stable/11/contrib/wpa/wpa_supplicant/bss.h stable/11/contrib/wpa/wpa_supplicant/config.c stable/11/contrib/wpa/wpa_supplicant/config.h stable/11/contrib/wpa/wpa_supplicant/config_file.c stable/11/contrib/wpa/wpa_supplicant/config_ssid.h stable/11/contrib/wpa/wpa_supplicant/ctrl_iface.c stable/11/contrib/wpa/wpa_supplicant/ctrl_iface_udp.c stable/11/contrib/wpa/wpa_supplicant/ctrl_iface_unix.c stable/11/contrib/wpa/wpa_supplicant/dbus/dbus-wpa_supplicant.conf stable/11/contrib/wpa/wpa_supplicant/dbus/dbus_common_i.h stable/11/contrib/wpa/wpa_supplicant/dbus/dbus_dict_helpers.c stable/11/contrib/wpa/wpa_supplicant/dbus/dbus_dict_helpers.h stable/11/contrib/wpa/wpa_supplicant/dbus/dbus_new.c stable/11/contrib/wpa/wpa_supplicant/dbus/dbus_new.h stable/11/contrib/wpa/wpa_supplicant/dbus/dbus_new_handlers.c stable/11/contrib/wpa/wpa_supplicant/dbus/dbus_new_handlers.h stable/11/contrib/wpa/wpa_supplicant/dbus/dbus_new_handlers_p2p.c stable/11/contrib/wpa/wpa_supplicant/dbus/dbus_new_handlers_p2p.h stable/11/contrib/wpa/wpa_supplicant/dbus/dbus_new_handlers_wps.c stable/11/contrib/wpa/wpa_supplicant/dbus/dbus_new_helpers.c stable/11/contrib/wpa/wpa_supplicant/dbus/dbus_new_helpers.h stable/11/contrib/wpa/wpa_supplicant/dbus/dbus_new_introspect.c stable/11/contrib/wpa/wpa_supplicant/dbus/dbus_old_handlers.c stable/11/contrib/wpa/wpa_supplicant/defconfig stable/11/contrib/wpa/wpa_supplicant/driver_i.h stable/11/contrib/wpa/wpa_supplicant/eapol_test.c stable/11/contrib/wpa/wpa_supplicant/events.c stable/11/contrib/wpa/wpa_supplicant/gas_query.c stable/11/contrib/wpa/wpa_supplicant/gas_query.h stable/11/contrib/wpa/wpa_supplicant/hs20_supplicant.c stable/11/contrib/wpa/wpa_supplicant/hs20_supplicant.h stable/11/contrib/wpa/wpa_supplicant/ibss_rsn.c stable/11/contrib/wpa/wpa_supplicant/ibss_rsn.h stable/11/contrib/wpa/wpa_supplicant/interworking.c stable/11/contrib/wpa/wpa_supplicant/interworking.h stable/11/contrib/wpa/wpa_supplicant/main.c stable/11/contrib/wpa/wpa_supplicant/mesh.c stable/11/contrib/wpa/wpa_supplicant/mesh.h stable/11/contrib/wpa/wpa_supplicant/mesh_mpm.c stable/11/contrib/wpa/wpa_supplicant/mesh_mpm.h stable/11/contrib/wpa/wpa_supplicant/mesh_rsn.c stable/11/contrib/wpa/wpa_supplicant/mesh_rsn.h stable/11/contrib/wpa/wpa_supplicant/notify.c stable/11/contrib/wpa/wpa_supplicant/notify.h stable/11/contrib/wpa/wpa_supplicant/offchannel.c stable/11/contrib/wpa/wpa_supplicant/p2p_supplicant.c stable/11/contrib/wpa/wpa_supplicant/p2p_supplicant.h stable/11/contrib/wpa/wpa_supplicant/p2p_supplicant_sd.c stable/11/contrib/wpa/wpa_supplicant/scan.c stable/11/contrib/wpa/wpa_supplicant/scan.h stable/11/contrib/wpa/wpa_supplicant/sme.c stable/11/contrib/wpa/wpa_supplicant/wmm_ac.h stable/11/contrib/wpa/wpa_supplicant/wnm_sta.c stable/11/contrib/wpa/wpa_supplicant/wnm_sta.h stable/11/contrib/wpa/wpa_supplicant/wpa_cli.c stable/11/contrib/wpa/wpa_supplicant/wpa_priv.c stable/11/contrib/wpa/wpa_supplicant/wpa_supplicant.c stable/11/contrib/wpa/wpa_supplicant/wpa_supplicant.conf stable/11/contrib/wpa/wpa_supplicant/wpa_supplicant_i.h stable/11/contrib/wpa/wpa_supplicant/wpas_glue.c stable/11/contrib/wpa/wpa_supplicant/wpas_kay.c stable/11/contrib/wpa/wpa_supplicant/wpas_module_tests.c stable/11/contrib/wpa/wpa_supplicant/wps_supplicant.c stable/11/contrib/wpa/wpa_supplicant/wps_supplicant.h stable/11/usr.sbin/wpa/Makefile.inc stable/11/usr.sbin/wpa/hostapd/Makefile stable/11/usr.sbin/wpa/hostapd_cli/Makefile stable/11/usr.sbin/wpa/wpa_cli/Makefile stable/11/usr.sbin/wpa/wpa_supplicant/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/wpa/CONTRIBUTIONS ============================================================================== --- stable/11/contrib/wpa/CONTRIBUTIONS Tue Aug 14 19:44:36 2018 (r337816) +++ stable/11/contrib/wpa/CONTRIBUTIONS Tue Aug 14 20:02:01 2018 (r337817) @@ -29,6 +29,34 @@ using your real name. Pseudonyms or anonymous contribu unfortunately be accepted. +The preferred method of submitting the contribution to the project is by +email to the hostap mailing list: +hostap@lists.infradead.org +Note that the list may require subscription before accepting message +without moderation. You can subscribe to the list at this address: +http://lists.infradead.org/mailman/listinfo/hostap + +The message should contain an inlined patch against the current +development branch (i.e., the master branch of +git://w1.fi/hostap.git). Please make sure the software you use for +sending the patch does not corrupt whitespace. If that cannot be fixed +for some reason, it is better to include an attached version of the +patch file than just send a whitespace damaged version in the message +body. + +The patches should be separate logical changes rather than doing +everything in a single patch. In other words, please keep cleanup, new +features, and bug fixes all in their own patches. Each patch needs a +commit log that describes the changes (what the changes fix, what +functionality is added, why the changes are useful, etc.). + +Please try to follow the coding style used in the project. + +In general, the best way of generating a suitable formatted patch file +is by committing the changes to a cloned git repository and using git +format-patch. The patch can then be sent, e.g., with git send-email. + + History of license and contributions terms ------------------------------------------ @@ -112,7 +140,7 @@ The license terms used for hostap.git files Modified BSD license (no advertisement clause): -Copyright (c) 2002-2015, Jouni Malinen and contributors +Copyright (c) 2002-2016, Jouni Malinen and contributors All Rights Reserved. Redistribution and use in source and binary forms, with or without Modified: stable/11/contrib/wpa/COPYING ============================================================================== --- stable/11/contrib/wpa/COPYING Tue Aug 14 19:44:36 2018 (r337816) +++ stable/11/contrib/wpa/COPYING Tue Aug 14 20:02:01 2018 (r337817) @@ -1,7 +1,7 @@ wpa_supplicant and hostapd -------------------------- -Copyright (c) 2002-2015, Jouni Malinen and contributors +Copyright (c) 2002-2016, Jouni Malinen and contributors All Rights Reserved. Modified: stable/11/contrib/wpa/README ============================================================================== --- stable/11/contrib/wpa/README Tue Aug 14 19:44:36 2018 (r337816) +++ stable/11/contrib/wpa/README Tue Aug 14 20:02:01 2018 (r337817) @@ -1,7 +1,7 @@ wpa_supplicant and hostapd -------------------------- -Copyright (c) 2002-2015, Jouni Malinen and contributors +Copyright (c) 2002-2016, Jouni Malinen and contributors All Rights Reserved. These programs are licensed under the BSD license (the one with Modified: stable/11/contrib/wpa/hostapd/ChangeLog ============================================================================== --- stable/11/contrib/wpa/hostapd/ChangeLog Tue Aug 14 19:44:36 2018 (r337816) +++ stable/11/contrib/wpa/hostapd/ChangeLog Tue Aug 14 20:02:01 2018 (r337817) @@ -1,5 +1,78 @@ ChangeLog for hostapd +2016-10-02 - v2.6 + * fixed EAP-pwd last fragment validation + [http://w1.fi/security/2015-7/] (CVE-2015-5314) + * fixed WPS configuration update vulnerability with malformed passphrase + [http://w1.fi/security/2016-1/] (CVE-2016-4476) + * extended channel switch support for VHT bandwidth changes + * added support for configuring new ANQP-elements with + anqp_elem=: + * fixed Suite B 192-bit AKM to use proper PMK length + (note: this makes old releases incompatible with the fixed behavior) + * added no_probe_resp_if_max_sta=1 parameter to disable Probe Response + frame sending for not-associated STAs if max_num_sta limit has been + reached + * added option (-S as command line argument) to request all interfaces + to be started at the same time + * modified rts_threshold and fragm_threshold configuration parameters + to allow -1 to be used to disable RTS/fragmentation + * EAP-pwd: added support for Brainpool Elliptic Curves + (with OpenSSL 1.0.2 and newer) + * fixed EAPOL reauthentication after FT protocol run + * fixed FTIE generation for 4-way handshake after FT protocol run + * fixed and improved various FST operations + * TLS server + - support SHA384 and SHA512 hashes + - support TLS v1.2 signature algorithm with SHA384 and SHA512 + - support PKCS #5 v2.0 PBES2 + - support PKCS #5 with PKCS #12 style key decryption + - minimal support for PKCS #12 + - support OCSP stapling (including ocsp_multi) + * added support for OpenSSL 1.1 API changes + - drop support for OpenSSL 0.9.8 + - drop support for OpenSSL 1.0.0 + * EAP-PEAP: support fast-connect crypto binding + * RADIUS + - fix Called-Station-Id to not escape SSID + - add Event-Timestamp to all Accounting-Request packets + - add Acct-Session-Id to Accounting-On/Off + - add Acct-Multi-Session-Id ton Access-Request packets + - add Service-Type (= Frames) + - allow server to provide PSK instead of passphrase for WPA-PSK + Tunnel_password case + - update full message for interim accounting updates + - add Acct-Delay-Time into Accounting messages + - add require_message_authenticator configuration option to require + CoA/Disconnect-Request packets to be authenticated + * started to postpone WNM-Notification frame sending by 100 ms so that + the STA has some more time to configure the key before this frame is + received after the 4-way handshake + * VHT: added interoperability workaround for 80+80 and 160 MHz channels + * extended VLAN support (per-STA vif, etc.) + * fixed PMKID derivation with SAE + * nl80211 + - added support for full station state operations + - fix IEEE 802.1X/WEP EAP reauthentication and rekeying to use + unencrypted EAPOL frames + * added initial MBO support; number of extensions to WNM BSS Transition + Management + * added initial functionality for location related operations + * added assocresp_elements parameter to allow vendor specific elements + to be added into (Re)Association Response frames + * improved Public Action frame addressing + - use Address 3 = wildcard BSSID in GAS response if a query from an + unassociated STA used that address + - fix TX status processing for Address 3 = wildcard BSSID + - add gas_address3 configuration parameter to control Address 3 + behavior + * added command line parameter -i to override interface parameter in + hostapd.conf + * added command completion support to hostapd_cli + * added passive client taxonomy determination (CONFIG_TAXONOMY=y + compile option and "SIGNATURE " control interface command) + * number of small fixes + 2015-09-27 - v2.5 * fixed WPS UPnP vulnerability with HTTP chunked transfer encoding [http://w1.fi/security/2015-2/] (CVE-2015-4141) Modified: stable/11/contrib/wpa/hostapd/README ============================================================================== --- stable/11/contrib/wpa/hostapd/README Tue Aug 14 19:44:36 2018 (r337816) +++ stable/11/contrib/wpa/hostapd/README Tue Aug 14 20:02:01 2018 (r337817) @@ -2,7 +2,7 @@ hostapd - user space IEEE 802.11 AP and IEEE 802.1X/WP Authenticator and RADIUS authentication server ================================================================ -Copyright (c) 2002-2015, Jouni Malinen and contributors +Copyright (c) 2002-2016, Jouni Malinen and contributors All Rights Reserved. This program is licensed under the BSD license (the one with Modified: stable/11/contrib/wpa/hostapd/config_file.c ============================================================================== --- stable/11/contrib/wpa/hostapd/config_file.c Tue Aug 14 19:44:36 2018 (r337816) +++ stable/11/contrib/wpa/hostapd/config_file.c Tue Aug 14 20:02:01 2018 (r337817) @@ -97,6 +97,8 @@ static int hostapd_config_read_vlan_file(struct hostap } vlan->vlan_id = vlan_id; + vlan->vlan_desc.untagged = vlan_id; + vlan->vlan_desc.notempty = !!vlan_id; os_strlcpy(vlan->ifname, pos, sizeof(vlan->ifname)); vlan->next = bss->vlan; bss->vlan = vlan; @@ -197,7 +199,10 @@ static int hostapd_config_read_maclist(const char *fna *acl = newacl; os_memcpy((*acl)[*num].addr, addr, ETH_ALEN); - (*acl)[*num].vlan_id = vlan_id; + os_memset(&(*acl)[*num].vlan_id, 0, + sizeof((*acl)[*num].vlan_id)); + (*acl)[*num].vlan_id.untagged = vlan_id; + (*acl)[*num].vlan_id.notempty = !!vlan_id; (*num)++; } @@ -631,8 +636,7 @@ hostapd_parse_radius_attr(const char *value) } -static int hostapd_parse_das_client(struct hostapd_bss_config *bss, - const char *val) +static int hostapd_parse_das_client(struct hostapd_bss_config *bss, char *val) { char *secret; @@ -640,7 +644,7 @@ static int hostapd_parse_das_client(struct hostapd_bss if (secret == NULL) return -1; - secret++; + *secret++ = '\0'; if (hostapd_parse_ip_addr(val, &bss->radius_das_client_addr)) return -1; @@ -1519,6 +1523,54 @@ fail: } +static int parse_anqp_elem(struct hostapd_bss_config *bss, char *buf, int line) +{ + char *delim; + u16 infoid; + size_t len; + struct wpabuf *payload; + struct anqp_element *elem; + + delim = os_strchr(buf, ':'); + if (!delim) + return -1; + delim++; + infoid = atoi(buf); + len = os_strlen(delim); + if (len & 1) + return -1; + len /= 2; + payload = wpabuf_alloc(len); + if (!payload) + return -1; + if (hexstr2bin(delim, wpabuf_put(payload, len), len) < 0) { + wpabuf_free(payload); + return -1; + } + + dl_list_for_each(elem, &bss->anqp_elem, struct anqp_element, list) { + if (elem->infoid == infoid) { + /* Update existing entry */ + wpabuf_free(elem->payload); + elem->payload = payload; + return 0; + } + } + + /* Add a new entry */ + elem = os_zalloc(sizeof(*elem)); + if (!elem) { + wpabuf_free(payload); + return -1; + } + elem->infoid = infoid; + elem->payload = payload; + dl_list_add(&bss->anqp_elem, &elem->list); + + return 0; +} + + static int parse_qos_map_set(struct hostapd_bss_config *bss, char *buf, int line) { @@ -1867,31 +1919,6 @@ static int hs20_parse_osu_service_desc(struct hostapd_ #endif /* CONFIG_HS20 */ -#ifdef CONFIG_WPS_NFC -static struct wpabuf * hostapd_parse_bin(const char *buf) -{ - size_t len; - struct wpabuf *ret; - - len = os_strlen(buf); - if (len & 0x01) - return NULL; - len /= 2; - - ret = wpabuf_alloc(len); - if (ret == NULL) - return NULL; - - if (hexstr2bin(buf, wpabuf_put(ret, len), len)) { - wpabuf_free(ret); - return NULL; - } - - return ret; -} -#endif /* CONFIG_WPS_NFC */ - - #ifdef CONFIG_ACS static int hostapd_config_parse_acs_chan_bias(struct hostapd_config *conf, char *pos) @@ -1934,6 +1961,31 @@ fail: #endif /* CONFIG_ACS */ +static int parse_wpabuf_hex(int line, const char *name, struct wpabuf **buf, + const char *val) +{ + struct wpabuf *elems; + + if (val[0] == '\0') { + wpabuf_free(*buf); + *buf = NULL; + return 0; + } + + elems = wpabuf_parse_bin(val); + if (!elems) { + wpa_printf(MSG_ERROR, "Line %d: Invalid %s '%s'", + line, name, val); + return -1; + } + + wpabuf_free(*buf); + *buf = elems; + + return 0; +} + + static int hostapd_config_fill(struct hostapd_config *conf, struct hostapd_bss_config *bss, const char *buf, char *pos, int line) @@ -2084,6 +2136,9 @@ static int hostapd_config_fill(struct hostapd_config * } else if (os_strcmp(buf, "ocsp_stapling_response") == 0) { os_free(bss->ocsp_stapling_response); bss->ocsp_stapling_response = os_strdup(pos); + } else if (os_strcmp(buf, "ocsp_stapling_response_multi") == 0) { + os_free(bss->ocsp_stapling_response_multi); + bss->ocsp_stapling_response_multi = os_strdup(pos); } else if (os_strcmp(buf, "dh_file") == 0) { os_free(bss->dh_file); bss->dh_file = os_strdup(pos); @@ -2139,6 +2194,8 @@ static int hostapd_config_fill(struct hostapd_config * } else if (os_strcmp(buf, "eap_sim_db") == 0) { os_free(bss->eap_sim_db); bss->eap_sim_db = os_strdup(pos); + } else if (os_strcmp(buf, "eap_sim_db_timeout") == 0) { + bss->eap_sim_db_timeout = atoi(pos); } else if (os_strcmp(buf, "eap_sim_aka_result_ind") == 0) { bss->eap_sim_aka_result_ind = atoi(pos); #endif /* EAP_SERVER_SIM */ @@ -2353,6 +2410,9 @@ static int hostapd_config_fill(struct hostapd_config * bss->radius_das_time_window = atoi(pos); } else if (os_strcmp(buf, "radius_das_require_event_timestamp") == 0) { bss->radius_das_require_event_timestamp = atoi(pos); + } else if (os_strcmp(buf, "radius_das_require_message_authenticator") == + 0) { + bss->radius_das_require_message_authenticator = atoi(pos); #endif /* CONFIG_NO_RADIUS */ } else if (os_strcmp(buf, "auth_algs") == 0) { bss->auth_algs = atoi(pos); @@ -2644,7 +2704,7 @@ static int hostapd_config_fill(struct hostapd_config * } } else if (os_strcmp(buf, "rts_threshold") == 0) { conf->rts_threshold = atoi(pos); - if (conf->rts_threshold < 0 || conf->rts_threshold > 2347) { + if (conf->rts_threshold < -1 || conf->rts_threshold > 65535) { wpa_printf(MSG_ERROR, "Line %d: invalid rts_threshold %d", line, conf->rts_threshold); @@ -2652,8 +2712,10 @@ static int hostapd_config_fill(struct hostapd_config * } } else if (os_strcmp(buf, "fragm_threshold") == 0) { conf->fragm_threshold = atoi(pos); - if (conf->fragm_threshold < 256 || - conf->fragm_threshold > 2346) { + if (conf->fragm_threshold == -1) { + /* allow a value of -1 */ + } else if (conf->fragm_threshold < 256 || + conf->fragm_threshold > 2346) { wpa_printf(MSG_ERROR, "Line %d: invalid fragm_threshold %d", line, conf->fragm_threshold); @@ -2686,6 +2748,8 @@ static int hostapd_config_fill(struct hostapd_config * conf->preamble = LONG_PREAMBLE; } else if (os_strcmp(buf, "ignore_broadcast_ssid") == 0) { bss->ignore_broadcast_ssid = atoi(pos); + } else if (os_strcmp(buf, "no_probe_resp_if_max_sta") == 0) { + bss->no_probe_resp_if_max_sta = atoi(pos); } else if (os_strcmp(buf, "wep_default_key") == 0) { bss->ssid.wep.idx = atoi(pos); if (bss->ssid.wep.idx > 3) { @@ -2707,6 +2771,8 @@ static int hostapd_config_fill(struct hostapd_config * #ifndef CONFIG_NO_VLAN } else if (os_strcmp(buf, "dynamic_vlan") == 0) { bss->ssid.dynamic_vlan = atoi(pos); + } else if (os_strcmp(buf, "per_sta_vif") == 0) { + bss->ssid.per_sta_vif = atoi(pos); } else if (os_strcmp(buf, "vlan_file") == 0) { if (hostapd_config_read_vlan_file(bss, pos)) { wpa_printf(MSG_ERROR, "Line %d: failed to read VLAN file '%s'", @@ -2762,6 +2828,8 @@ static int hostapd_config_fill(struct hostapd_config * line); return 1; } + } else if (os_strcmp(buf, "use_driver_iface_addr") == 0) { + conf->use_driver_iface_addr = atoi(pos); #ifdef CONFIG_IEEE80211W } else if (os_strcmp(buf, "ieee80211w") == 0) { bss->ieee80211w = atoi(pos); @@ -2827,6 +2895,8 @@ static int hostapd_config_fill(struct hostapd_config * conf->vht_oper_centr_freq_seg1_idx = atoi(pos); } else if (os_strcmp(buf, "vendor_vht") == 0) { bss->vendor_vht = atoi(pos); + } else if (os_strcmp(buf, "use_sta_nsts") == 0) { + bss->use_sta_nsts = atoi(pos); #endif /* CONFIG_IEEE80211AC */ } else if (os_strcmp(buf, "max_listen_interval") == 0) { bss->max_listen_interval = atoi(pos); @@ -2965,15 +3035,15 @@ static int hostapd_config_fill(struct hostapd_config * bss->wps_nfc_pw_from_config = 1; } else if (os_strcmp(buf, "wps_nfc_dh_pubkey") == 0) { wpabuf_free(bss->wps_nfc_dh_pubkey); - bss->wps_nfc_dh_pubkey = hostapd_parse_bin(pos); + bss->wps_nfc_dh_pubkey = wpabuf_parse_bin(pos); bss->wps_nfc_pw_from_config = 1; } else if (os_strcmp(buf, "wps_nfc_dh_privkey") == 0) { wpabuf_free(bss->wps_nfc_dh_privkey); - bss->wps_nfc_dh_privkey = hostapd_parse_bin(pos); + bss->wps_nfc_dh_privkey = wpabuf_parse_bin(pos); bss->wps_nfc_pw_from_config = 1; } else if (os_strcmp(buf, "wps_nfc_dev_pw") == 0) { wpabuf_free(bss->wps_nfc_dev_pw); - bss->wps_nfc_dev_pw = hostapd_parse_bin(pos); + bss->wps_nfc_dev_pw = wpabuf_parse_bin(pos); bss->wps_nfc_pw_from_config = 1; #endif /* CONFIG_WPS_NFC */ #endif /* CONFIG_WPS */ @@ -3136,6 +3206,9 @@ static int hostapd_config_fill(struct hostapd_config * } else if (os_strcmp(buf, "nai_realm") == 0) { if (parse_nai_realm(bss, pos, line) < 0) return 1; + } else if (os_strcmp(buf, "anqp_elem") == 0) { + if (parse_anqp_elem(bss, pos, line) < 0) + return 1; } else if (os_strcmp(buf, "gas_frag_limit") == 0) { bss->gas_frag_limit = atoi(pos); } else if (os_strcmp(buf, "gas_comeback_delay") == 0) { @@ -3149,13 +3222,15 @@ static int hostapd_config_fill(struct hostapd_config * os_free(bss->dump_msk_file); bss->dump_msk_file = os_strdup(pos); #endif /* CONFIG_RADIUS_TEST */ +#ifdef CONFIG_PROXYARP + } else if (os_strcmp(buf, "proxy_arp") == 0) { + bss->proxy_arp = atoi(pos); +#endif /* CONFIG_PROXYARP */ #ifdef CONFIG_HS20 } else if (os_strcmp(buf, "hs20") == 0) { bss->hs20 = atoi(pos); } else if (os_strcmp(buf, "disable_dgaf") == 0) { bss->disable_dgaf = atoi(pos); - } else if (os_strcmp(buf, "proxy_arp") == 0) { - bss->proxy_arp = atoi(pos); } else if (os_strcmp(buf, "na_mcast_to_ucast") == 0) { bss->na_mcast_to_ucast = atoi(pos); } else if (os_strcmp(buf, "osen") == 0) { @@ -3231,6 +3306,10 @@ static int hostapd_config_fill(struct hostapd_config * } else if (os_strcmp(buf, "subscr_remediation_method") == 0) { bss->subscr_remediation_method = atoi(pos); #endif /* CONFIG_HS20 */ +#ifdef CONFIG_MBO + } else if (os_strcmp(buf, "mbo") == 0) { + bss->mbo_enabled = atoi(pos); +#endif /* CONFIG_MBO */ #ifdef CONFIG_TESTING_OPTIONS #define PARSE_TEST_PROBABILITY(_val) \ } else if (os_strcmp(buf, #_val) == 0) { \ @@ -3249,6 +3328,8 @@ static int hostapd_config_fill(struct hostapd_config * PARSE_TEST_PROBABILITY(ignore_assoc_probability) PARSE_TEST_PROBABILITY(ignore_reassoc_probability) PARSE_TEST_PROBABILITY(corrupt_gtk_rekey_mic_probability) + } else if (os_strcmp(buf, "ecsa_ie_only") == 0) { + conf->ecsa_ie_only = atoi(pos); } else if (os_strcmp(buf, "bss_load_test") == 0) { WPA_PUT_LE16(bss->bss_load_test, atoi(pos)); pos = os_strchr(pos, ':'); @@ -3269,7 +3350,15 @@ static int hostapd_config_fill(struct hostapd_config * WPA_PUT_LE16(&bss->bss_load_test[3], atoi(pos)); bss->bss_load_test_set = 1; } else if (os_strcmp(buf, "radio_measurements") == 0) { - bss->radio_measurements = atoi(pos); + /* + * DEPRECATED: This parameter will be removed in the future. + * Use rrm_neighbor_report instead. + */ + int val = atoi(pos); + + if (val & BIT(0)) + bss->radio_measurements[0] |= + WLAN_RRM_CAPS_NEIGHBOR_REPORT; } else if (os_strcmp(buf, "own_ie_override") == 0) { struct wpabuf *tmp; size_t len = os_strlen(pos) / 2; @@ -3290,35 +3379,11 @@ static int hostapd_config_fill(struct hostapd_config * bss->own_ie_override = tmp; #endif /* CONFIG_TESTING_OPTIONS */ } else if (os_strcmp(buf, "vendor_elements") == 0) { - struct wpabuf *elems; - size_t len = os_strlen(pos); - if (len & 0x01) { - wpa_printf(MSG_ERROR, - "Line %d: Invalid vendor_elements '%s'", - line, pos); + if (parse_wpabuf_hex(line, buf, &bss->vendor_elements, pos)) return 1; - } - len /= 2; - if (len == 0) { - wpabuf_free(bss->vendor_elements); - bss->vendor_elements = NULL; - return 0; - } - - elems = wpabuf_alloc(len); - if (elems == NULL) + } else if (os_strcmp(buf, "assocresp_elements") == 0) { + if (parse_wpabuf_hex(line, buf, &bss->assocresp_elements, pos)) return 1; - - if (hexstr2bin(pos, wpabuf_put(elems, len), len)) { - wpabuf_free(elems); - wpa_printf(MSG_ERROR, - "Line %d: Invalid vendor_elements '%s'", - line, pos); - return 1; - } - - wpabuf_free(bss->vendor_elements); - bss->vendor_elements = elems; } else if (os_strcmp(buf, "sae_anti_clogging_threshold") == 0) { bss->sae_anti_clogging_threshold = atoi(pos); } else if (os_strcmp(buf, "sae_groups") == 0) { @@ -3391,7 +3456,8 @@ static int hostapd_config_fill(struct hostapd_config * return -1; } val = strtol(pos, &endp, 0); - if (*endp || val < 1 || val > FST_MAX_LLT_MS) { + if (*endp || val < 1 || + (unsigned long int) val > FST_MAX_LLT_MS) { wpa_printf(MSG_ERROR, "Line %d: Invalid fst_llt %ld (%s) (expected 1..%u)", line, val, pos, FST_MAX_LLT_MS); @@ -3409,6 +3475,22 @@ static int hostapd_config_fill(struct hostapd_config * } else if (os_strcmp(buf, "no_auth_if_seen_on") == 0) { os_free(bss->no_auth_if_seen_on); bss->no_auth_if_seen_on = os_strdup(pos); + } else if (os_strcmp(buf, "lci") == 0) { + wpabuf_free(conf->lci); + conf->lci = wpabuf_parse_bin(pos); + } else if (os_strcmp(buf, "civic") == 0) { + wpabuf_free(conf->civic); + conf->civic = wpabuf_parse_bin(pos); + } else if (os_strcmp(buf, "rrm_neighbor_report") == 0) { + if (atoi(pos)) + bss->radio_measurements[0] |= + WLAN_RRM_CAPS_NEIGHBOR_REPORT; + } else if (os_strcmp(buf, "gas_address3") == 0) { + bss->gas_address3 = atoi(pos); + } else if (os_strcmp(buf, "ftm_responder") == 0) { + bss->ftm_responder = atoi(pos); + } else if (os_strcmp(buf, "ftm_initiator") == 0) { + bss->ftm_initiator = atoi(pos); } else { wpa_printf(MSG_ERROR, "Line %d: unknown configuration item '%s'", @@ -3429,7 +3511,7 @@ struct hostapd_config * hostapd_config_read(const char { struct hostapd_config *conf; FILE *f; - char buf[512], *pos; + char buf[4096], *pos; int line = 0; int errors = 0; size_t i; Modified: stable/11/contrib/wpa/hostapd/ctrl_iface.c ============================================================================== --- stable/11/contrib/wpa/hostapd/ctrl_iface.c Tue Aug 14 19:44:36 2018 (r337816) +++ stable/11/contrib/wpa/hostapd/ctrl_iface.c Tue Aug 14 20:02:01 2018 (r337817) @@ -19,10 +19,16 @@ #include #include +#ifdef CONFIG_CTRL_IFACE_UDP +#include +#endif /* CONFIG_CTRL_IFACE_UDP */ + #include "utils/common.h" #include "utils/eloop.h" +#include "utils/module_tests.h" #include "common/version.h" #include "common/ieee802_11_defs.h" +#include "common/ctrl_iface_common.h" #include "crypto/tls.h" #include "drivers/driver.h" #include "eapol_auth/eapol_auth_sm.h" @@ -42,6 +48,8 @@ #include "ap/wnm_ap.h" #include "ap/wpa_auth.h" #include "ap/beacon.h" +#include "ap/neighbor_db.h" +#include "ap/rrm.h" #include "wps/wps_defs.h" #include "wps/wps.h" #include "fst/fst_ctrl_iface.h" @@ -51,96 +59,43 @@ #define HOSTAPD_CLI_DUP_VALUE_MAX_LEN 256 -struct wpa_ctrl_dst { - struct wpa_ctrl_dst *next; - struct sockaddr_un addr; - socklen_t addrlen; - int debug_level; - int errors; -}; +#ifdef CONFIG_CTRL_IFACE_UDP +#define COOKIE_LEN 8 +static unsigned char cookie[COOKIE_LEN]; +static unsigned char gcookie[COOKIE_LEN]; +#define HOSTAPD_CTRL_IFACE_PORT 8877 +#define HOSTAPD_CTRL_IFACE_PORT_LIMIT 50 +#define HOSTAPD_GLOBAL_CTRL_IFACE_PORT 8878 +#define HOSTAPD_GLOBAL_CTRL_IFACE_PORT_LIMIT 50 +#endif /* CONFIG_CTRL_IFACE_UDP */ - static void hostapd_ctrl_iface_send(struct hostapd_data *hapd, int level, enum wpa_msg_type type, const char *buf, size_t len); static int hostapd_ctrl_iface_attach(struct hostapd_data *hapd, - struct sockaddr_un *from, + struct sockaddr_storage *from, socklen_t fromlen) { - struct wpa_ctrl_dst *dst; - - dst = os_zalloc(sizeof(*dst)); - if (dst == NULL) - return -1; - os_memcpy(&dst->addr, from, sizeof(struct sockaddr_un)); - dst->addrlen = fromlen; - dst->debug_level = MSG_INFO; - dst->next = hapd->ctrl_dst; - hapd->ctrl_dst = dst; - wpa_hexdump(MSG_DEBUG, "CTRL_IFACE monitor attached", - (u8 *) from->sun_path, - fromlen - offsetof(struct sockaddr_un, sun_path)); - return 0; + return ctrl_iface_attach(&hapd->ctrl_dst, from, fromlen); } static int hostapd_ctrl_iface_detach(struct hostapd_data *hapd, - struct sockaddr_un *from, + struct sockaddr_storage *from, socklen_t fromlen) { - struct wpa_ctrl_dst *dst, *prev = NULL; - - dst = hapd->ctrl_dst; - while (dst) { - if (fromlen == dst->addrlen && - os_memcmp(from->sun_path, dst->addr.sun_path, - fromlen - offsetof(struct sockaddr_un, sun_path)) - == 0) { - wpa_hexdump(MSG_DEBUG, "CTRL_IFACE monitor detached", - (u8 *) from->sun_path, - fromlen - - offsetof(struct sockaddr_un, sun_path)); - if (prev == NULL) - hapd->ctrl_dst = dst->next; - else - prev->next = dst->next; - os_free(dst); - return 0; - } - prev = dst; - dst = dst->next; - } - return -1; + return ctrl_iface_detach(&hapd->ctrl_dst, from, fromlen); } static int hostapd_ctrl_iface_level(struct hostapd_data *hapd, - struct sockaddr_un *from, + struct sockaddr_storage *from, socklen_t fromlen, char *level) { - struct wpa_ctrl_dst *dst; - - wpa_printf(MSG_DEBUG, "CTRL_IFACE LEVEL %s", level); - - dst = hapd->ctrl_dst; - while (dst) { - if (fromlen == dst->addrlen && - os_memcmp(from->sun_path, dst->addr.sun_path, - fromlen - offsetof(struct sockaddr_un, sun_path)) - == 0) { - wpa_hexdump(MSG_DEBUG, "CTRL_IFACE changed monitor " - "level", (u8 *) from->sun_path, fromlen - - offsetof(struct sockaddr_un, sun_path)); - dst->debug_level = atoi(level); - return 0; - } - dst = dst->next; - } - - return -1; + return ctrl_iface_level(&hapd->ctrl_dst, from, fromlen, level); } @@ -884,6 +839,8 @@ static int hostapd_ctrl_iface_bss_tm_req(struct hostap int ret; u8 nei_rep[1000]; u8 *nei_pos = nei_rep; + u8 mbo[10]; + size_t mbo_len = 0; if (hwaddr_aton(cmd, addr)) { wpa_printf(MSG_DEBUG, "Invalid STA MAC address"); @@ -1049,10 +1006,66 @@ static int hostapd_ctrl_iface_bss_tm_req(struct hostap if (os_strstr(cmd, " disassoc_imminent=1")) req_mode |= WNM_BSS_TM_REQ_DISASSOC_IMMINENT; +#ifdef CONFIG_MBO + pos = os_strstr(cmd, "mbo="); + if (pos) { + unsigned int mbo_reason, cell_pref, reassoc_delay; + u8 *mbo_pos = mbo; + + ret = sscanf(pos, "mbo=%u:%u:%u", &mbo_reason, + &reassoc_delay, &cell_pref); + if (ret != 3) { + wpa_printf(MSG_DEBUG, + "MBO requires three arguments: mbo=::"); + return -1; + } + + if (mbo_reason > MBO_TRANSITION_REASON_PREMIUM_AP) { + wpa_printf(MSG_DEBUG, + "Invalid MBO transition reason code %u", + mbo_reason); + return -1; + } + + /* Valid values for Cellular preference are: 0, 1, 255 */ + if (cell_pref != 0 && cell_pref != 1 && cell_pref != 255) { + wpa_printf(MSG_DEBUG, + "Invalid MBO cellular capability %u", + cell_pref); + return -1; + } + + if (reassoc_delay > 65535 || + (reassoc_delay && + !(req_mode & WNM_BSS_TM_REQ_DISASSOC_IMMINENT))) { + wpa_printf(MSG_DEBUG, + "MBO: Assoc retry delay is only valid in disassoc imminent mode"); + return -1; + } + + *mbo_pos++ = MBO_ATTR_ID_TRANSITION_REASON; + *mbo_pos++ = 1; + *mbo_pos++ = mbo_reason; + *mbo_pos++ = MBO_ATTR_ID_CELL_DATA_PREF; + *mbo_pos++ = 1; + *mbo_pos++ = cell_pref; + + if (reassoc_delay) { + *mbo_pos++ = MBO_ATTR_ID_ASSOC_RETRY_DELAY; + *mbo_pos++ = 2; + WPA_PUT_LE16(mbo_pos, reassoc_delay); + mbo_pos += 2; + } + + mbo_len = mbo_pos - mbo; + } +#endif /* CONFIG_MBO */ + ret = wnm_send_bss_tm_req(hapd, sta, req_mode, disassoc_timer, valid_int, bss_term_dur, url, nei_pos > nei_rep ? nei_rep : NULL, - nei_pos - nei_rep); + nei_pos - nei_rep, mbo_len ? mbo : NULL, + mbo_len); os_free(url); return ret; } @@ -1320,9 +1333,28 @@ static int hostapd_ctrl_iface_set(struct hostapd_data } else if (os_strcasecmp(cmd, "ext_eapol_frame_io") == 0) { hapd->ext_eapol_frame_io = atoi(value); #endif /* CONFIG_TESTING_OPTIONS */ +#ifdef CONFIG_MBO + } else if (os_strcasecmp(cmd, "mbo_assoc_disallow") == 0) { + int val; + + if (!hapd->conf->mbo_enabled) + return -1; + + val = atoi(value); + if (val < 0 || val > 1) + return -1; + + hapd->mbo_assoc_disallow = val; + ieee802_11_update_beacons(hapd->iface); + + /* + * TODO: Need to configure drivers that do AP MLME offload with + * disallowing station logic. + */ +#endif /* CONFIG_MBO */ } else { struct sta_info *sta; - int vlan_id; + struct vlan_description vlan_id; ret = hostapd_set_iface(hapd->iconf, hapd->conf, cmd, value); if (ret) @@ -1334,7 +1366,8 @@ static int hostapd_ctrl_iface_set(struct hostapd_data hapd->conf->deny_mac, hapd->conf->num_deny_mac, sta->addr, &vlan_id) && - (!vlan_id || vlan_id == sta->vlan_id)) + (!vlan_id.notempty || + !vlan_compare(&vlan_id, sta->vlan_desc))) ap_sta_disconnect( hapd, sta, sta->addr, WLAN_REASON_UNSPECIFIED); @@ -1346,7 +1379,8 @@ static int hostapd_ctrl_iface_set(struct hostapd_data hapd->conf->accept_mac, hapd->conf->num_accept_mac, sta->addr, &vlan_id) || - (vlan_id && vlan_id != sta->vlan_id)) + (vlan_id.notempty && + vlan_compare(&vlan_id, sta->vlan_desc))) ap_sta_disconnect( hapd, sta, sta->addr, WLAN_REASON_UNSPECIFIED); @@ -1557,8 +1591,8 @@ static u16 ipv4_hdr_checksum(const void *buf, size_t l #define HWSIM_PACKETLEN 1500 #define HWSIM_IP_LEN (HWSIM_PACKETLEN - sizeof(struct ether_header)) -void hostapd_data_test_rx(void *ctx, const u8 *src_addr, const u8 *buf, - size_t len) +static void hostapd_data_test_rx(void *ctx, const u8 *src_addr, const u8 *buf, + size_t len) { struct hostapd_data *hapd = ctx; const struct ether_header *eth; @@ -1745,8 +1779,6 @@ done: static int hostapd_ctrl_test_alloc_fail(struct hostapd_data *hapd, char *cmd) { #ifdef WPA_TRACE_BFD - extern char wpa_trace_fail_func[256]; - extern unsigned int wpa_trace_fail_after; char *pos; wpa_trace_fail_after = atoi(cmd); @@ -1770,9 +1802,6 @@ static int hostapd_ctrl_get_alloc_fail(struct hostapd_ char *buf, size_t buflen) { #ifdef WPA_TRACE_BFD - extern char wpa_trace_fail_func[256]; - extern unsigned int wpa_trace_fail_after; - return os_snprintf(buf, buflen, "%u:%s", wpa_trace_fail_after, wpa_trace_fail_func); #else /* WPA_TRACE_BFD */ @@ -1784,8 +1813,6 @@ static int hostapd_ctrl_get_alloc_fail(struct hostapd_ static int hostapd_ctrl_test_fail(struct hostapd_data *hapd, char *cmd) { #ifdef WPA_TRACE_BFD - extern char wpa_trace_test_fail_func[256]; - extern unsigned int wpa_trace_test_fail_after; char *pos; wpa_trace_test_fail_after = atoi(cmd); @@ -1809,9 +1836,6 @@ static int hostapd_ctrl_get_fail(struct hostapd_data * char *buf, size_t buflen) { #ifdef WPA_TRACE_BFD - extern char wpa_trace_test_fail_func[256]; - extern unsigned int wpa_trace_test_fail_after; - return os_snprintf(buf, buflen, "%u:%s", wpa_trace_test_fail_after, wpa_trace_test_fail_func); #else /* WPA_TRACE_BFD */ @@ -1875,13 +1899,13 @@ static int hostapd_ctrl_iface_vendor(struct hostapd_da /* cmd: [] */ vendor_id = strtoul(cmd, &pos, 16); - if (!isblank(*pos)) + if (!isblank((unsigned char) *pos)) return -EINVAL; subcmd = strtoul(pos, &pos, 10); if (*pos != '\0') { - if (!isblank(*pos++)) + if (!isblank((unsigned char) *pos++)) return -EINVAL; data_len = os_strlen(pos); } @@ -2016,6 +2040,9 @@ static int hostapd_ctrl_iface_track_sta_list(struct ho struct hostapd_sta_info *info; struct os_reltime now; + if (!iface->num_sta_seen) + return 0; + sta_track_expire(iface, 0); pos = buf; @@ -2040,10 +2067,228 @@ static int hostapd_ctrl_iface_track_sta_list(struct ho #endif /* NEED_AP_MLME */ +static int hostapd_ctrl_iface_req_lci(struct hostapd_data *hapd, + const char *cmd) +{ + u8 addr[ETH_ALEN]; + + if (hwaddr_aton(cmd, addr)) { + wpa_printf(MSG_INFO, "CTRL: REQ_LCI: Invalid MAC address"); + return -1; + } + + return hostapd_send_lci_req(hapd, addr); +} + + +static int hostapd_ctrl_iface_req_range(struct hostapd_data *hapd, char *cmd) +{ + u8 addr[ETH_ALEN]; + char *token, *context = NULL; + int random_interval, min_ap; + u8 responders[ETH_ALEN * RRM_RANGE_REQ_MAX_RESPONDERS]; + unsigned int n_responders; + + token = str_token(cmd, " ", &context); + if (!token || hwaddr_aton(token, addr)) { + wpa_printf(MSG_INFO, + "CTRL: REQ_RANGE - Bad destination address"); + return -1; + } + + token = str_token(cmd, " ", &context); + if (!token) + return -1; + + random_interval = atoi(token); + if (random_interval < 0 || random_interval > 0xffff) + return -1; + + token = str_token(cmd, " ", &context); + if (!token) + return -1; + + min_ap = atoi(token); + if (min_ap <= 0 || min_ap > WLAN_RRM_RANGE_REQ_MAX_MIN_AP) + return -1; + + n_responders = 0; + while ((token = str_token(cmd, " ", &context))) { + if (n_responders == RRM_RANGE_REQ_MAX_RESPONDERS) { + wpa_printf(MSG_INFO, + "CTRL: REQ_RANGE: Too many responders"); + return -1; + } + + if (hwaddr_aton(token, responders + n_responders * ETH_ALEN)) { + wpa_printf(MSG_INFO, + "CTRL: REQ_RANGE: Bad responder address"); + return -1; + } + + n_responders++; + } + + if (!n_responders) { + wpa_printf(MSG_INFO, + "CTRL: REQ_RANGE - No FTM responder address"); + return -1; + } + + return hostapd_send_range_req(hapd, addr, random_interval, min_ap, + responders, n_responders); +} + + +static int hostapd_ctrl_iface_set_neighbor(struct hostapd_data *hapd, char *buf) +{ + struct wpa_ssid_value ssid; + u8 bssid[ETH_ALEN]; + struct wpabuf *nr, *lci = NULL, *civic = NULL; + char *tmp; + int ret; + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Tue Aug 14 20:16:37 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CCF7E105B85A; Tue, 14 Aug 2018 20:16:37 +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 2A980863A0; Tue, 14 Aug 2018 20:16: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 w7EKGQqI044106; Tue, 14 Aug 2018 13:16:27 -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 w7EKGPiZ044105; Tue, 14 Aug 2018 13:16:25 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201808142016.w7EKGPiZ044105@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r337816 - in stable/11/stand/i386: gptboot isoboot In-Reply-To: <201808141944.w7EJiaAv090670@repo.freebsd.org> To: Kyle Evans Date: Tue, 14 Aug 2018 13:16:25 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@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-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2018 20:16:38 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: kevans > Date: Tue Aug 14 19:44:36 2018 > New Revision: 337816 > URL: https://svnweb.freebsd.org/changeset/base/337816 > > Log: > MFC r337520: Fix WITHOUT_LOADER_GELI (gptboot) and isoboot in general ^^^^^^^^^^^^^^^^ This fixes the hybrid mode .iso build so that you can dd the disc1.iso to a USB memory stick and boot it. You no longer need a "special" memory image. > > gptboot was broken when r316078 added the LOADER_GELI_SUPPORT #ifdef to > not pass geliargs via __exec. KARGS_FLAGS_EXTARG must not be used if we're > not going to pass an additional argument to __exec. > > PR: 228151 > > Modified: > stable/11/stand/i386/gptboot/gptboot.c > stable/11/stand/i386/isoboot/isoboot.c > Directory Properties: > stable/11/ (props changed) > > Modified: stable/11/stand/i386/gptboot/gptboot.c > ============================================================================== > --- stable/11/stand/i386/gptboot/gptboot.c Tue Aug 14 19:42:18 2018 (r337815) > +++ stable/11/stand/i386/gptboot/gptboot.c Tue Aug 14 19:44:36 2018 (r337816) > @@ -482,9 +482,10 @@ load(void) > #endif > __exec((caddr_t)addr, RB_BOOTINFO | (opts & RBX_MASK), > MAKEBOOTDEV(dev_maj[dsk.type], dsk.part + 1, dsk.unit, 0xff), > - KARGS_FLAGS_EXTARG, 0, 0, VTOP(&bootinfo) > #ifdef LOADER_GELI_SUPPORT > - , geliargs > + KARGS_FLAGS_EXTARG, 0, 0, VTOP(&bootinfo), geliargs > +#else > + 0, 0, 0, VTOP(&bootinfo) > #endif > ); > } > > Modified: stable/11/stand/i386/isoboot/isoboot.c > ============================================================================== > --- stable/11/stand/i386/isoboot/isoboot.c Tue Aug 14 19:42:18 2018 (r337815) > +++ stable/11/stand/i386/isoboot/isoboot.c Tue Aug 14 19:44:36 2018 (r337816) > @@ -417,7 +417,7 @@ load(void) > bootinfo.bi_bios_dev = dsk.drive; > __exec((caddr_t)addr, RB_BOOTINFO | (opts & RBX_MASK), > MAKEBOOTDEV(dev_maj[dsk.type], 0, dsk.unit, 0), > - KARGS_FLAGS_EXTARG, 0, 0, VTOP(&bootinfo)); > + 0, 0, 0, VTOP(&bootinfo)); > } > > static int > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-stable@freebsd.org Tue Aug 14 22:57:29 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C89511068AB3; Tue, 14 Aug 2018 22:57:29 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7C3358CBF3; Tue, 14 Aug 2018 22:57:29 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5D19421F7F; Tue, 14 Aug 2018 22:57:29 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7EMvTVC088202; Tue, 14 Aug 2018 22:57:29 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7EMvTIZ088201; Tue, 14 Aug 2018 22:57:29 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201808142257.w7EMvTIZ088201@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 14 Aug 2018 22:57:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337823 - stable/11/usr.bin/printf X-SVN-Group: stable-11 X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: stable/11/usr.bin/printf X-SVN-Commit-Revision: 337823 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2018 22:57:30 -0000 Author: pfg Date: Tue Aug 14 22:57:28 2018 New Revision: 337823 URL: https://svnweb.freebsd.org/changeset/base/337823 Log: MFC r337458, r337618: Fix printf(1) ignores width and precision in %b format. The precision with the conversion specifier b is specified by POSIX: see point 7 in the reference documentation. Include fix from jilles@ to avoid breaking the testsuite. Reference: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/printf.html PR: 229641 Reported by: Rudolf Cejka Submitted by: Garrett D'Amore (illumos) Modified: stable/11/usr.bin/printf/printf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/printf/printf.c ============================================================================== --- stable/11/usr.bin/printf/printf.c Tue Aug 14 20:45:43 2018 (r337822) +++ stable/11/usr.bin/printf/printf.c Tue Aug 14 22:57:28 2018 (r337823) @@ -1,4 +1,5 @@ /*- + * Copyright 2018 Staysail Systems, Inc. * Copyright 2014 Garrett D'Amore * Copyright 2010 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 1989, 1993 @@ -378,13 +379,16 @@ printf_doformat(char *fmt, int *rval) char *p; int getout; - p = strdup(getstr()); - if (p == NULL) { + /* Convert "b" to "s" for output. */ + start[strlen(start) - 1] = 's'; + if ((p = strdup(getstr())) == NULL) { warnx("%s", strerror(ENOMEM)); return (NULL); } getout = escape(p, 0, &len); - fputs(p, stdout); + PF(start, p); + /* Restore format for next loop. */ + free(p); if (getout) return (end_fmt); From owner-svn-src-stable@freebsd.org Wed Aug 15 01:24:44 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 644DB106D42A; Wed, 15 Aug 2018 01:24:44 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 16E9971922; Wed, 15 Aug 2018 01:24:44 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ECCBC2376E; Wed, 15 Aug 2018 01:24:43 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7F1Oh26064292; Wed, 15 Aug 2018 01:24:43 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7F1OhGo064291; Wed, 15 Aug 2018 01:24:43 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201808150124.w7F1OhGo064291@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 15 Aug 2018 01:24:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337825 - stable/11/usr.bin/apply X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/usr.bin/apply X-SVN-Commit-Revision: 337825 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 01:24:44 -0000 Author: kevans Date: Wed Aug 15 01:24:43 2018 New Revision: 337825 URL: https://svnweb.freebsd.org/changeset/base/337825 Log: MFC r337504: apply(1): Fix magic number substitution with a magic space Using a space as the magic character would result in problems if the command started with a number: - For a 'valid' number n, n < size of argv, it would erroneously get replaced with that argument; e.g. `apply -a ' ' -d 1rm x => `execxrm x` - For an 'invalid' number n, n >= size of argv, it would segfault. e.g. `apply -a ' ' 2to3 test.py` would try to access argv[2] This problem occurred because apply(1) would prepend "exec " to the command string before doing the actual magic number replacements, so it would come across "exec 2to3 1" and assume that the " 2" is also a magic number to be replaced. Re-work this to instead just append "exec " to the command sbuf and workaround the ugliness. This also simplifies stuff in the process. PR: 226948 Modified: stable/11/usr.bin/apply/apply.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/apply/apply.c ============================================================================== --- stable/11/usr.bin/apply/apply.c Wed Aug 15 00:15:40 2018 (r337824) +++ stable/11/usr.bin/apply/apply.c Wed Aug 15 01:24:43 2018 (r337825) @@ -53,7 +53,8 @@ __FBSDID("$FreeBSD$"); #include #include -#define EXEC "exec " +#define ISMAGICNO(p) \ + (p)[0] == magic && isdigit((unsigned char)(p)[1]) && (p)[1] != '0' static int exec_shell(const char *, const char *, const char *); static void usage(void); @@ -63,8 +64,9 @@ main(int argc, char *argv[]) { struct sbuf *cmdbuf; long arg_max; - int ch, debug, i, magic, n, nargs, offset, rval; + int ch, debug, i, magic, n, nargs, rval; size_t cmdsize; + char buf[4]; char *cmd, *name, *p, *shell, *slashp, *tmpshell; debug = 0; @@ -73,7 +75,7 @@ main(int argc, char *argv[]) while ((ch = getopt(argc, argv, "a:d0123456789")) != -1) switch (ch) { case 'a': - if (optarg[1] != '\0') + if (optarg[0] == '\0' || optarg[1] != '\0') errx(1, "illegal magic character specification"); magic = optarg[0]; @@ -103,7 +105,7 @@ main(int argc, char *argv[]) * largest one. */ for (n = 0, p = argv[0]; *p != '\0'; ++p) - if (p[0] == magic && isdigit(p[1]) && p[1] != '0') { + if (ISMAGICNO(p)) { ++p; if (p[0] - '0' > n) n = p[0] - '0'; @@ -132,28 +134,19 @@ main(int argc, char *argv[]) * Allocate enough space to hold the maximum command. Save the * size to pass to snprintf(). */ - cmdsize = sizeof(EXEC) - 1 + strlen(argv[0]) - + 9 * (sizeof(" %1") - 1) + 1; - if ((cmd = malloc(cmdsize)) == NULL) - err(1, NULL); - if (n == 0) { + cmdsize = strlen(argv[0]) + 9 * (sizeof(" %1") - 1) + 1; + if ((cmd = malloc(cmdsize)) == NULL) + err(1, NULL); + strlcpy(cmd, argv[0], cmdsize); + /* If nargs not set, default to a single argument. */ if (nargs == -1) nargs = 1; - p = cmd; - offset = snprintf(cmd, cmdsize, EXEC "%s", argv[0]); - if ((size_t)offset >= cmdsize) - errx(1, "snprintf() failed"); - p += offset; - cmdsize -= offset; for (i = 1; i <= nargs; i++) { - offset = snprintf(p, cmdsize, " %c%d", magic, i); - if ((size_t)offset >= cmdsize) - errx(1, "snprintf() failed"); - p += offset; - cmdsize -= offset; + snprintf(buf, sizeof(buf), " %c%d", magic, i); + strlcat(cmd, buf, cmdsize); } /* @@ -163,9 +156,8 @@ main(int argc, char *argv[]) if (nargs == 0) nargs = 1; } else { - offset = snprintf(cmd, cmdsize, EXEC "%s", argv[0]); - if ((size_t)offset >= cmdsize) - errx(1, "snprintf() failed"); + if ((cmd = strdup(argv[0])) == NULL) + err(1, NULL); nargs = n; } @@ -182,9 +174,10 @@ main(int argc, char *argv[]) */ for (rval = 0; argc > nargs; argc -= nargs, argv += nargs) { sbuf_clear(cmdbuf); + sbuf_cat(cmdbuf, "exec "); /* Expand command argv references. */ for (p = cmd; *p != '\0'; ++p) { - if (p[0] == magic && isdigit(p[1]) && p[1] != '0') { + if (ISMAGICNO(p)) { if (sbuf_cat(cmdbuf, argv[(++p)[0] - '0']) == -1) errc(1, ENOMEM, "sbuf"); From owner-svn-src-stable@freebsd.org Wed Aug 15 01:29:03 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39438106D5F7; Wed, 15 Aug 2018 01:29:03 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DA17871AFF; Wed, 15 Aug 2018 01:29:02 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AD18E23772; Wed, 15 Aug 2018 01:29:02 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7F1T2mo064555; Wed, 15 Aug 2018 01:29:02 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7F1T23r064553; Wed, 15 Aug 2018 01:29:02 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201808150129.w7F1T23r064553@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 15 Aug 2018 01:29:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337826 - stable/11/bin/ls X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/bin/ls X-SVN-Commit-Revision: 337826 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 01:29:03 -0000 Author: kevans Date: Wed Aug 15 01:29:02 2018 New Revision: 337826 URL: https://svnweb.freebsd.org/changeset/base/337826 Log: MFC r337506: ls(1): Enable colors with COLORTERM is set in the environment COLORTERM is the de facto standard, while CLICOLOR is generally specific to FreeBSD and ls(1). PR: 230101 Modified: stable/11/bin/ls/ls.1 stable/11/bin/ls/ls.c Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/ls/ls.1 ============================================================================== --- stable/11/bin/ls/ls.1 Wed Aug 15 01:24:43 2018 (r337825) +++ stable/11/bin/ls/ls.1 Wed Aug 15 01:29:02 2018 (r337826) @@ -32,7 +32,7 @@ .\" @(#)ls.1 8.7 (Berkeley) 7/29/94 .\" $FreeBSD$ .\" -.Dd December 1, 2015 +.Dd August 8, 2018 .Dt LS 1 .Os .Sh NAME @@ -140,6 +140,8 @@ after each that is a Enable colorized output. This option is equivalent to defining .Ev CLICOLOR +or +.Ev COLORTERM in the environment. (See below.) This functionality can be compiled out by removing the definition of @@ -636,6 +638,10 @@ The variable still needs to reference a color capable terminal however otherwise it is not possible to determine which color sequences to use. +.It Ev COLORTERM +See description for +.Ev CLICOLOR +above. .It Ev COLUMNS If this variable contains a string representing a decimal integer, it is used as the @@ -660,7 +666,9 @@ for more information. .It Ev LSCOLORS The value of this variable describes what color to use for which attribute when colors are enabled with -.Ev CLICOLOR . +.Ev CLICOLOR +or +.Ev COLORTERM . This string is a concatenation of pairs of the format .Ar f Ns Ar b , where @@ -767,6 +775,8 @@ option for more details. .It Ev TERM The .Ev CLICOLOR +and +.Ev COLORTERM functionality depends on a terminal type with color capabilities. .It Ev TZ The timezone to use when displaying dates. Modified: stable/11/bin/ls/ls.c ============================================================================== --- stable/11/bin/ls/ls.c Wed Aug 15 01:24:43 2018 (r337825) +++ stable/11/bin/ls/ls.c Wed Aug 15 01:29:02 2018 (r337826) @@ -374,7 +374,7 @@ main(int argc, char *argv[]) f_listdot = 1; /* Enabling of colours is conditional on the environment. */ - if (getenv("CLICOLOR") && + if ((getenv("CLICOLOR") || getenv("COLORTERM")) && (isatty(STDOUT_FILENO) || getenv("CLICOLOR_FORCE"))) #ifdef COLORLS if (tgetent(termcapbuf, getenv("TERM")) == 1) { From owner-svn-src-stable@freebsd.org Wed Aug 15 02:11:42 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D2F4106E608; Wed, 15 Aug 2018 02:11: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 85FA072C35; Wed, 15 Aug 2018 02:11: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 w7F1ftmV045151; Tue, 14 Aug 2018 18:41: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 w7F1ft69045150; Tue, 14 Aug 2018 18:41:55 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201808150141.w7F1ft69045150@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r337826 - stable/11/bin/ls In-Reply-To: <201808150129.w7F1T23r064553@repo.freebsd.org> To: Kyle Evans Date: Tue, 14 Aug 2018 18:41:55 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@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-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 02:11:42 -0000 > Author: kevans > Date: Wed Aug 15 01:29:02 2018 > New Revision: 337826 > URL: https://svnweb.freebsd.org/changeset/base/337826 > > Log: > MFC r337506: ls(1): Enable colors with COLORTERM is set in the environment > > COLORTERM is the de facto standard, while CLICOLOR is generally specific to > FreeBSD and ls(1). I have already seen one "Who enabled %&*@(#$@) colored ls output in 12?" Seems that the defaults for xfce terminal is to have COLORTERM. > PR: 230101 > > Modified: > stable/11/bin/ls/ls.1 > stable/11/bin/ls/ls.c > Directory Properties: > stable/11/ (props changed) > > Modified: stable/11/bin/ls/ls.1 > ============================================================================== > --- stable/11/bin/ls/ls.1 Wed Aug 15 01:24:43 2018 (r337825) > +++ stable/11/bin/ls/ls.1 Wed Aug 15 01:29:02 2018 (r337826) > @@ -32,7 +32,7 @@ > .\" @(#)ls.1 8.7 (Berkeley) 7/29/94 > .\" $FreeBSD$ > .\" > -.Dd December 1, 2015 > +.Dd August 8, 2018 > .Dt LS 1 > .Os > .Sh NAME > @@ -140,6 +140,8 @@ after each that is a > Enable colorized output. > This option is equivalent to defining > .Ev CLICOLOR > +or > +.Ev COLORTERM > in the environment. > (See below.) > This functionality can be compiled out by removing the definition of > @@ -636,6 +638,10 @@ The > variable still needs to reference a color capable terminal however > otherwise it is not possible to determine which color sequences to > use. > +.It Ev COLORTERM > +See description for > +.Ev CLICOLOR > +above. > .It Ev COLUMNS > If this variable contains a string representing a > decimal integer, it is used as the > @@ -660,7 +666,9 @@ for more information. > .It Ev LSCOLORS > The value of this variable describes what color to use for which > attribute when colors are enabled with > -.Ev CLICOLOR . > +.Ev CLICOLOR > +or > +.Ev COLORTERM . > This string is a concatenation of pairs of the format > .Ar f Ns Ar b , > where > @@ -767,6 +775,8 @@ option for more details. > .It Ev TERM > The > .Ev CLICOLOR > +and > +.Ev COLORTERM > functionality depends on a terminal type with color capabilities. > .It Ev TZ > The timezone to use when displaying dates. > > Modified: stable/11/bin/ls/ls.c > ============================================================================== > --- stable/11/bin/ls/ls.c Wed Aug 15 01:24:43 2018 (r337825) > +++ stable/11/bin/ls/ls.c Wed Aug 15 01:29:02 2018 (r337826) > @@ -374,7 +374,7 @@ main(int argc, char *argv[]) > f_listdot = 1; > > /* Enabling of colours is conditional on the environment. */ > - if (getenv("CLICOLOR") && > + if ((getenv("CLICOLOR") || getenv("COLORTERM")) && > (isatty(STDOUT_FILENO) || getenv("CLICOLOR_FORCE"))) > #ifdef COLORLS > if (tgetent(termcapbuf, getenv("TERM")) == 1) { > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-stable@freebsd.org Wed Aug 15 02:14:50 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6BABE106E6D9; Wed, 15 Aug 2018 02:14:50 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1C7AA72E2D; Wed, 15 Aug 2018 02:14:50 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E62F123F7A; Wed, 15 Aug 2018 02:14:49 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7F2Enr6089946; Wed, 15 Aug 2018 02:14:49 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7F2ElCX089932; Wed, 15 Aug 2018 02:14:47 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201808150214.w7F2ElCX089932@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 15 Aug 2018 02:14:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337827 - in stable/11: contrib/file contrib/file/doc contrib/file/magic contrib/file/magic/Magdir contrib/file/python contrib/file/src contrib/file/tests lib/libmagic X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: in stable/11: contrib/file contrib/file/doc contrib/file/magic contrib/file/magic/Magdir contrib/file/python contrib/file/src contrib/file/tests lib/libmagic X-SVN-Commit-Revision: 337827 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 02:14:50 -0000 Author: eadler Date: Wed Aug 15 02:14:46 2018 New Revision: 337827 URL: https://svnweb.freebsd.org/changeset/base/337827 Log: MFC r333919, r333922, r333944, r337442: Update file to file 5.34 (through 5.33) Added: stable/11/contrib/file/magic/Magdir/beetle - copied unchanged from r333919, head/contrib/file/magic/Magdir/beetle stable/11/contrib/file/magic/Magdir/dataone - copied unchanged from r337442, head/contrib/file/magic/Magdir/dataone stable/11/contrib/file/magic/Magdir/dbpf - copied, changed from r333919, head/contrib/file/magic/Magdir/dbpf stable/11/contrib/file/magic/Magdir/measure - copied, changed from r333919, head/contrib/file/magic/Magdir/measure stable/11/contrib/file/magic/Magdir/rpi - copied unchanged from r333919, head/contrib/file/magic/Magdir/rpi stable/11/contrib/file/magic/Magdir/tplink - copied unchanged from r333919, head/contrib/file/magic/Magdir/tplink stable/11/contrib/file/magic/Magdir/zip - copied unchanged from r333919, head/contrib/file/magic/Magdir/zip stable/11/contrib/file/python/CHANGELOG.md - copied unchanged from r337442, head/contrib/file/python/CHANGELOG.md stable/11/contrib/file/python/LICENSE - copied unchanged from r337442, head/contrib/file/python/LICENSE stable/11/contrib/file/python/README.md - copied unchanged from r337442, head/contrib/file/python/README.md stable/11/contrib/file/python/tests.py - copied unchanged from r337442, head/contrib/file/python/tests.py stable/11/contrib/file/src/buffer.c - copied unchanged from r333919, head/contrib/file/src/buffer.c stable/11/contrib/file/src/seccomp.c - copied, changed from r333919, head/contrib/file/src/seccomp.c stable/11/contrib/file/tests/JW07022A.mp3.result - copied unchanged from r337442, head/contrib/file/tests/JW07022A.mp3.result stable/11/contrib/file/tests/JW07022A.mp3.testfile - copied unchanged from r337442, head/contrib/file/tests/JW07022A.mp3.testfile Deleted: stable/11/contrib/file/python/README Modified: stable/11/contrib/file/ChangeLog stable/11/contrib/file/README stable/11/contrib/file/TODO stable/11/contrib/file/config.h.in stable/11/contrib/file/configure stable/11/contrib/file/configure.ac stable/11/contrib/file/doc/file.man stable/11/contrib/file/doc/magic.man stable/11/contrib/file/magic/Magdir/acorn stable/11/contrib/file/magic/Magdir/animation stable/11/contrib/file/magic/Magdir/apple stable/11/contrib/file/magic/Magdir/archive stable/11/contrib/file/magic/Magdir/audio stable/11/contrib/file/magic/Magdir/c64 stable/11/contrib/file/magic/Magdir/cad stable/11/contrib/file/magic/Magdir/compress stable/11/contrib/file/magic/Magdir/console stable/11/contrib/file/magic/Magdir/database stable/11/contrib/file/magic/Magdir/dump stable/11/contrib/file/magic/Magdir/elf stable/11/contrib/file/magic/Magdir/filesystems stable/11/contrib/file/magic/Magdir/fonts stable/11/contrib/file/magic/Magdir/fsav stable/11/contrib/file/magic/Magdir/games stable/11/contrib/file/magic/Magdir/geo stable/11/contrib/file/magic/Magdir/gnu stable/11/contrib/file/magic/Magdir/images stable/11/contrib/file/magic/Magdir/intel stable/11/contrib/file/magic/Magdir/linux stable/11/contrib/file/magic/Magdir/macintosh stable/11/contrib/file/magic/Magdir/make stable/11/contrib/file/magic/Magdir/mozilla stable/11/contrib/file/magic/Magdir/msdos stable/11/contrib/file/magic/Magdir/msooxml stable/11/contrib/file/magic/Magdir/netbsd stable/11/contrib/file/magic/Magdir/ole2compounddocs stable/11/contrib/file/magic/Magdir/pdf stable/11/contrib/file/magic/Magdir/pgp stable/11/contrib/file/magic/Magdir/revision stable/11/contrib/file/magic/Magdir/riff stable/11/contrib/file/magic/Magdir/sgi stable/11/contrib/file/magic/Magdir/sgml stable/11/contrib/file/magic/Magdir/spectrum stable/11/contrib/file/magic/Magdir/ssl stable/11/contrib/file/magic/Magdir/terminfo stable/11/contrib/file/magic/Magdir/vorbis stable/11/contrib/file/magic/Magdir/windows stable/11/contrib/file/magic/Makefile.am stable/11/contrib/file/magic/Makefile.in stable/11/contrib/file/python/Makefile.am stable/11/contrib/file/python/Makefile.in stable/11/contrib/file/python/magic.py stable/11/contrib/file/python/setup.py stable/11/contrib/file/src/Makefile.am stable/11/contrib/file/src/Makefile.in stable/11/contrib/file/src/apprentice.c stable/11/contrib/file/src/ascmagic.c stable/11/contrib/file/src/cdf.c stable/11/contrib/file/src/compress.c stable/11/contrib/file/src/der.c stable/11/contrib/file/src/encoding.c stable/11/contrib/file/src/file.c stable/11/contrib/file/src/file.h stable/11/contrib/file/src/file_opts.h stable/11/contrib/file/src/funcs.c stable/11/contrib/file/src/is_tar.c stable/11/contrib/file/src/readcdf.c stable/11/contrib/file/src/readelf.c stable/11/contrib/file/src/readelf.h stable/11/contrib/file/src/softmagic.c stable/11/contrib/file/tests/Makefile.am stable/11/contrib/file/tests/Makefile.in stable/11/lib/libmagic/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/file/ChangeLog ============================================================================== --- stable/11/contrib/file/ChangeLog Wed Aug 15 01:29:02 2018 (r337826) +++ stable/11/contrib/file/ChangeLog Wed Aug 15 02:14:46 2018 (r337827) @@ -1,3 +1,40 @@ +2018-07-25 8:50 Christos Zoulas + + * release 5.34 + +2018-06-22 16:38 Christos Zoulas + + * Add Quad indirect offsets + +2018-05-24 14:10 Christos Zoulas + + * Enable parsing of ELF dynamic sections to handle PIE better + +2018-04-15 14:52 Christos Zoulas + + * release 5.33 + +2018-02-24 14:50 Christos Zoulas + + * extend the support for ${x?:} expansions for magic descriptions + +2018-02-21 16:25 Christos Zoulas + + * add support for ${x?:} in mime types to handle + pie binaries. + +2017-11-03 9:23 Christos Zoulas + + * add support for negative offsets (offsets from the end of file) + +2017-09-26 8:22 Christos Zoulas + + * close the file on error when writing magic (Steve Grubb) + +2017-09-24 12:02 Christos Zoulas + + * seccomp support (Paul Moore) + 2017-09-02 11:53 Christos Zoulas * release 5.32 Modified: stable/11/contrib/file/README ============================================================================== --- stable/11/contrib/file/README Wed Aug 15 01:29:02 2018 (r337826) +++ stable/11/contrib/file/README Wed Aug 15 02:14:46 2018 (r337827) @@ -1,14 +1,13 @@ ## README for file(1) Command ## - @(#) $File: README,v 1.50 2016/04/16 22:40:54 christos Exp $ + @(#) $File: README,v 1.54 2018/05/30 03:06:56 christos Exp $ -Mailing List: file@mx.gw.com -Mailing List archives: http://mx.gw.com/pipermail/file/ -Bug tracker: http://bugs.gw.com/ +Mailing List: file@astron.com +Mailing List archives: http://mailman.astron.com/pipermail/file/ +Bug tracker: http://bugs.astron.com/ E-mail: christos@astron.com +Build Status: https://travis-ci.org/file/file -[![Build Status](https://travis-ci.org/file/file.png?branch=master)](https://travis-ci.org/file/file) - Phone: Do not even think of telephoning me about this program. Send cash first! This is Release 5.x of Ian Darwin's (copyright but distributable) @@ -67,28 +66,6 @@ in magic(5) format please, to the maintainer, Christos COPYING - read this first. README - read this second (you are currently reading this file). INSTALL - read on how to install -src/localtime_r.c -src/magic.c -src/magic.h -src/mygetopt.h -src/newtest2.c -src/newtest3.c -src/pread.c -src/print.c -src/readcdf.c -src/readelf.c -src/readelf.h -src/regex.c -src/regex2.c -src/softmagic.c -src/strcasestr.c -src/strlcat.c -src/strlcpy.c -src/strndup.c -src/tar.h -src/teststrchr.c -src/vasprintf.c -src/x.c src/apprentice.c - parses /etc/magic to learn magic src/apptype.c - used for OS/2 specific application type magic src/ascmagic.c - third & last set of tests, based on hardwired assumptions. @@ -96,6 +73,7 @@ src/asctime_r.c - replacement for OS's that don't have src/asprintf.c - replacement for OS's that don't have it. src/asctime_r.c - replacement for OS's that don't have it. src/asprintf.c - replacement for OS's that don't have it. +src/buffer.c - buffer handling functions. src/cdf.[ch] - parser for Microsoft Compound Document Files src/cdf_time.c - time converter for CDF. src/compress.c - handles decompressing files to look inside. @@ -128,6 +106,7 @@ src/mygetopt.h - replacement for OS's that don't have src/strcasestr.c - replacement for OS's that don't have it. src/strlcat.c - replacement for OS's that don't have it. src/strlcpy.c - replacement for OS's that don't have it. +src/strndup.c - replacement for OS's that don't have it. src/tar.h - tar file definitions src/vasprintf.c - for systems that don't have it. doc/file.man - man page for the command @@ -155,6 +134,19 @@ guidelines: * Further reference, such as documentation of format ------------------------------------------------------------------------------ + +gpg for dummies: + +$ gpg --verify file-X.YY.tar.gz.asc file-X.YY.tar.gz +gpg: assuming signed data in `file-X.YY.tar.gz' +gpg: Signature made WWW MMM DD HH:MM:SS YYYY ZZZ using DSA key ID KKKKKKKK + +To download the key: + +$ gpg --keyserver hkp://keys.gnupg.net --recv-keys KKKKKKKK + +------------------------------------------------------------------------------ + Parts of this software were developed at SoftQuad Inc., developers of SGML/HTML/XML publishing software, in Toronto, Canada. Modified: stable/11/contrib/file/TODO ============================================================================== --- stable/11/contrib/file/TODO Wed Aug 15 01:29:02 2018 (r337826) +++ stable/11/contrib/file/TODO Wed Aug 15 02:14:46 2018 (r337827) @@ -31,6 +31,19 @@ could require structural changes to the matching code # rule 2 >0 .... ... +--- +- Merge the stat code dance in one place and keep it in one place + (perhaps struct buffer). +- Enable seeking around if offset > nbytes if possible (the fd + is seekable). +- We could use file_pipe2file more (for EOF offsets, CDF documents), + but that is expensive; perhaps we should provide a way to disable it +- The implementation of struct buffer needs re-thinking and more work. + For example we don't always pass the fd in the child. This is not + important yet as we don't have yet cases where use/indirect magic + needs negative offsets. +- Really the whole thing just needs here's an (offset, buffer, size) + you have (filebuffer, filebuffersize &&|| fd), fill the buffer with + data from offset. The buffer API should be changed to just do that. christos - Modified: stable/11/contrib/file/config.h.in ============================================================================== --- stable/11/contrib/file/config.h.in Wed Aug 15 01:29:02 2018 (r337826) +++ stable/11/contrib/file/config.h.in Wed Aug 15 02:14:46 2018 (r337827) @@ -77,6 +77,9 @@ /* Define to 1 if you have the `gnurx' library (-lgnurx). */ #undef HAVE_LIBGNURX +/* Define to 1 if you have the `seccomp' library (-lseccomp). */ +#undef HAVE_LIBSECCOMP + /* Define to 1 if you have the `z' library (-lz). */ #undef HAVE_LIBZ Modified: stable/11/contrib/file/configure ============================================================================== --- stable/11/contrib/file/configure Wed Aug 15 01:29:02 2018 (r337826) +++ stable/11/contrib/file/configure Wed Aug 15 02:14:46 2018 (r337827) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for file 5.32. +# Generated by GNU Autoconf 2.69 for file 5.34. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='file' PACKAGE_TARNAME='file' -PACKAGE_VERSION='5.32' -PACKAGE_STRING='file 5.32' +PACKAGE_VERSION='5.34' +PACKAGE_STRING='file 5.34' PACKAGE_BUGREPORT='christos@astron.com' PACKAGE_URL='' @@ -767,6 +767,7 @@ enable_silent_rules enable_elf enable_elf_core enable_zlib +enable_libseccomp enable_fsect_man5 enable_dependency_tracking enable_static @@ -1328,7 +1329,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures file 5.32 to adapt to many kinds of systems. +\`configure' configures file 5.34 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1398,7 +1399,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of file 5.32:";; + short | recursive ) echo "Configuration of file 5.34:";; esac cat <<\_ACEOF @@ -1411,6 +1412,7 @@ Optional Features: --disable-elf disable builtin ELF support --disable-elf-core disable ELF core file support --disable-zlib disable zlib compression support [default=auto] + --disable-libseccomp disable libseccomp sandboxing [default=auto] --enable-fsect-man5 enable file formats in man section 5 --enable-dependency-tracking do not reject slow dependency extractors @@ -1509,7 +1511,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -file configure 5.32 +file configure 5.34 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2165,7 +2167,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by file $as_me 5.32, which was +It was created by file $as_me 5.34, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3031,7 +3033,7 @@ fi # Define the identity of the package. PACKAGE='file' - VERSION='5.32' + VERSION='5.34' cat >>confdefs.h <<_ACEOF @@ -3230,6 +3232,16 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_zlib" >&5 $as_echo "$enable_zlib" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libseccomp support" >&5 +$as_echo_n "checking for libseccomp support... " >&6; } +# Check whether --enable-libseccomp was given. +if test "${enable_libseccomp+set}" = set; then : + enableval=$enable_libseccomp; +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_libseccomp" >&5 +$as_echo "$enable_libseccomp" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file formats in man section 5" >&5 $as_echo_n "checking for file formats in man section 5... " >&6; } # Check whether --enable-fsect-man5 was given. @@ -14461,6 +14473,53 @@ _ACEOF fi fi +if test "$enable_libseccomp" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for seccomp_init in -lseccomp" >&5 +$as_echo_n "checking for seccomp_init in -lseccomp... " >&6; } +if ${ac_cv_lib_seccomp_seccomp_init+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lseccomp $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char seccomp_init (); +int +main () +{ +return seccomp_init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_seccomp_seccomp_init=yes +else + ac_cv_lib_seccomp_seccomp_init=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_seccomp_seccomp_init" >&5 +$as_echo "$ac_cv_lib_seccomp_seccomp_init" >&6; } +if test "x$ac_cv_lib_seccomp_seccomp_init" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSECCOMP 1 +_ACEOF + + LIBS="-lseccomp $LIBS" + +fi + +fi if test "$MINGW" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for regexec in -lgnurx" >&5 $as_echo_n "checking for regexec in -lgnurx... " >&6; } @@ -15075,7 +15134,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by file $as_me 5.32, which was +This file was extended by file $as_me 5.34, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15141,7 +15200,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -file config.status 5.32 +file config.status 5.34 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: stable/11/contrib/file/configure.ac ============================================================================== --- stable/11/contrib/file/configure.ac Wed Aug 15 01:29:02 2018 (r337826) +++ stable/11/contrib/file/configure.ac Wed Aug 15 02:14:46 2018 (r337827) @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([file],[5.32],[christos@astron.com]) +AC_INIT([file],[5.34],[christos@astron.com]) AM_INIT_AUTOMAKE([subdir-objects foreign]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) @@ -39,6 +39,11 @@ AC_ARG_ENABLE(zlib, [AS_HELP_STRING([--disable-zlib], [disable zlib compression support @<:@default=auto@:>@])]) AC_MSG_RESULT($enable_zlib) +AC_MSG_CHECKING(for libseccomp support) +AC_ARG_ENABLE(libseccomp, +[AS_HELP_STRING([--disable-libseccomp], [disable libseccomp sandboxing @<:@default=auto@:>@])]) +AC_MSG_RESULT($enable_libseccomp) + AC_MSG_CHECKING(for file formats in man section 5) AC_ARG_ENABLE(fsect-man5, [ --enable-fsect-man5 enable file formats in man section 5], @@ -157,6 +162,9 @@ AC_REPLACE_FUNCS(getopt_long asprintf vasprintf strlcp dnl Checks for libraries if test "$enable_zlib" != "no"; then AC_CHECK_LIB(z, gzopen) +fi +if test "$enable_libseccomp" != "no"; then + AC_CHECK_LIB(seccomp, seccomp_init) fi if test "$MINGW" = 1; then AC_CHECK_LIB(gnurx,regexec,,AC_MSG_ERROR([libgnurx is required to build file(1) with MinGW])) Modified: stable/11/contrib/file/doc/file.man ============================================================================== --- stable/11/contrib/file/doc/file.man Wed Aug 15 01:29:02 2018 (r337826) +++ stable/11/contrib/file/doc/file.man Wed Aug 15 02:14:46 2018 (r337827) @@ -1,5 +1,5 @@ -.\" $File: file.man,v 1.125 2017/01/03 11:24:46 christos Exp $ -.Dd October 19, 2016 +.\" $File: file.man,v 1.131 2018/07/24 21:33:56 christos Exp $ +.Dd July 25, 2018 .Dt FILE __CSECTION__ .Os .Sh NAME @@ -8,7 +8,7 @@ .Sh SYNOPSIS .Nm .Bk -words -.Op Fl bcdEhiklLNnprsvzZ0 +.Op Fl bcdEhiklLNnprsSvzZ0 .Op Fl Fl apple .Op Fl Fl extension .Op Fl Fl mime-encoding @@ -168,7 +168,8 @@ in any of the character sets listed above is simply sa .Bl -tag -width indent .It Fl Fl apple Causes the file command to output the file type and creator code as -used by older MacOS versions. The code consists of eight letters, +used by older MacOS versions. +The code consists of eight letters, the first describing the file type, the latter the creator. .It Fl b , Fl Fl brief Do not prepend filenames to output lines (brief mode). @@ -215,12 +216,14 @@ elf magic is found. .It soft Consults magic files. .It tar -Examines tar files. +Examines tar files by verifying the checksum of the 512 byte tar header. +Excluding this test can provide more detailed content description by using +the soft magic method. .It text A synonym for .Sq ascii . .El -.It Fl Fl extension +.It Fl Fl extension Print a slash-separated list of valid extensions for the file type found. .It Fl F , Fl Fl separator Ar separator Use the specified string as the separator between the filename and the @@ -350,6 +353,16 @@ This option also causes to disregard the file size as reported by .Xr stat 2 since on some systems it reports a zero size for raw disk partitions. +.It Fl S , Fl Fl no-sandbox +On systems where libseccomp +.Pa ( https://github.com/seccomp/libseccomp ) +is available, the +.Fl S +flag disables sandboxing which is enabled by default. +This option is needed for file to execute external descompressing programs, +i.e. when the +.Fl z +flag is specified and the built-in decompressors are not available. .It Fl v , Fl Fl version Print the version of the program and exit. .It Fl z , Fl Fl uncompress @@ -366,20 +379,13 @@ Nice to the output. This does not affect the separator, which is still printed. .Pp -If this option is repeated more than once, then +If this option is repeated more than once, then .Nm prints just the filename followed by a NUL followed by the description (or ERROR: text) followed by a second NUL for each entry. .It Fl -help Print a help message and exit. .El -.Sh FILES -.Bl -tag -width __MAGIC__.mgc -compact -.It Pa __MAGIC__.mgc -Default compiled list of magic. -.It Pa __MAGIC__ -Directory containing default magic files. -.El .Sh ENVIRONMENT The environment variable .Ev MAGIC @@ -392,11 +398,6 @@ will not attempt to open adds .Dq Pa .mgc to the value of this variable as appropriate. -However, -.Pa file -has to exist in order for -.Pa file.mime -to be considered. The environment variable .Ev POSIXLY_CORRECT controls (on systems that support symbolic links), whether @@ -410,6 +411,65 @@ This is also controlled by the and .Fl h options. +.Sh FILES +.Bl -tag -width __MAGIC__.mgc -compact +.It Pa __MAGIC__.mgc +Default compiled list of magic. +.It Pa __MAGIC__ +Directory containing default magic files. +.El +.Sh EXIT STATUS +.Nm +will exit with +.Dv 0 +if the operation was successful or +.Dv >0 +if an error was encountered. +The following errors cause diagnostic messages, but don't affect the program +exit code (as POSIX requires), unless +.Fl E +is specified: +.Bl -bullet -compact -offset indent +.It +A file cannot be found +.It +There is no permission to read a file +.It +The file type cannot be determined +.El +.Sh EXAMPLES +.Bd -literal -offset indent +$ file file.c file /dev/{wd0a,hda} +file.c: C program text +file: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), + dynamically linked (uses shared libs), stripped +/dev/wd0a: block special (0/0) +/dev/hda: block special (3/0) + +$ file -s /dev/wd0{b,d} +/dev/wd0b: data +/dev/wd0d: x86 boot sector + +$ file -s /dev/hda{,1,2,3,4,5,6,7,8,9,10} +/dev/hda: x86 boot sector +/dev/hda1: Linux/i386 ext2 filesystem +/dev/hda2: x86 boot sector +/dev/hda3: x86 boot sector, extended partition table +/dev/hda4: Linux/i386 ext2 filesystem +/dev/hda5: Linux/i386 swap file +/dev/hda6: Linux/i386 swap file +/dev/hda7: Linux/i386 swap file +/dev/hda8: Linux/i386 swap file +/dev/hda9: empty +/dev/hda10: empty + +$ file -i file.c file /dev/{wd0a,hda} +file.c: text/x-c +file: application/x-executable +/dev/hda: application/x-not-regular-file +/dev/wd0a: application/x-not-regular-file + +.Ed .Sh SEE ALSO .Xr hexdump 1 , .Xr od 1 , @@ -462,6 +522,23 @@ for example, .Bd -literal -offset indent \*[Gt]16 long\*[Am]0x7fffffff \*[Gt]0 not stripped .Ed +.Sh SECURITY +On systems where libseccomp +.Pa ( https://github.com/seccomp/libseccomp ) +is available, +.Nm +is enforces limiting system calls to only the ones necessary for the +operation of the program. +This enforcement does not provide any security benefit when +.Nm +is asked to decompress input files running external programs with +the +.Fl z +option. +To enable execution of external decompressors, one needs to disable +sandboxing using the +.Fl S +flag. .Sh MAGIC DIRECTORY The magic file entries have been collected from various sources, mainly USENET, and contributed by various authors. @@ -479,39 +556,6 @@ command uses a magic file, keep the old magic file around for comparison purposes (rename it to .Pa __MAGIC__.orig ) . -.Sh EXAMPLES -.Bd -literal -offset indent -$ file file.c file /dev/{wd0a,hda} -file.c: C program text -file: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), - dynamically linked (uses shared libs), stripped -/dev/wd0a: block special (0/0) -/dev/hda: block special (3/0) - -$ file -s /dev/wd0{b,d} -/dev/wd0b: data -/dev/wd0d: x86 boot sector - -$ file -s /dev/hda{,1,2,3,4,5,6,7,8,9,10} -/dev/hda: x86 boot sector -/dev/hda1: Linux/i386 ext2 filesystem -/dev/hda2: x86 boot sector -/dev/hda3: x86 boot sector, extended partition table -/dev/hda4: Linux/i386 ext2 filesystem -/dev/hda5: Linux/i386 swap file -/dev/hda6: Linux/i386 swap file -/dev/hda7: Linux/i386 swap file -/dev/hda8: Linux/i386 swap file -/dev/hda9: empty -/dev/hda10: empty - -$ file -i file.c file /dev/{wd0a,hda} -file.c: text/x-c -file: application/x-executable -/dev/hda: application/x-not-regular-file -/dev/wd0a: application/x-not-regular-file - -.Ed .Sh HISTORY There has been a .Nm @@ -533,7 +577,7 @@ Geoff Collyer found several inadequacies and provided some magic file entries. Contributions of the .Sq \*[Am] -operator by Rob McMahon, +operator by Rob McMahon, .Aq cudcv@warwick.ac.uk , 1989. .Pp @@ -583,16 +627,13 @@ and were written by John Gilmore from his public-domain .Xr tar 1 program, and are not covered by the above license. -.Sh RETURN CODE -.Nm -returns 0 on success, and non-zero on error. .Sh BUGS Please report bugs and send patches to the bug tracker at -.Pa http://bugs.gw.com/ +.Pa http://bugs.astron.com/ or the mailing list at -.Aq file@mx.gw.com +.Aq file@astron.com (visit -.Pa http://mx.gw.com/mailman/listinfo/file +.Pa http://mailman.astron.com/mailman/listinfo/file first to subscribe). .Sh TODO Fix output so that tests for MIME and APPLE flags are not needed all Modified: stable/11/contrib/file/doc/magic.man ============================================================================== --- stable/11/contrib/file/doc/magic.man Wed Aug 15 01:29:02 2018 (r337826) +++ stable/11/contrib/file/doc/magic.man Wed Aug 15 02:14:46 2018 (r337827) @@ -1,5 +1,6 @@ -.\" $File: magic.man,v 1.91 2017/02/12 15:30:08 christos Exp $ -.Dd February 12, 2017 +.It S2 +.\" $File: magic.man,v 1.93 2018/06/22 20:39:49 christos Exp $ +.Dd June 22, 2018 .Dt MAGIC __FSECTION__ .Os .\" install as magic.4 on USG, magic.5 on V7, Berkeley and Linux systems. @@ -36,8 +37,20 @@ If the test succeeds, a message is printed. The line consists of the following fields: .Bl -tag -width ".Dv message" .It Dv offset -A number specifying the offset, in bytes, into the file of the data +A number specifying the offset (in bytes) into the file of the data which is to be tested. +This offset can be a negative number if it is: +.Bl -bullet -compact +.It +The first direct offset of the magic entry (at continuation level 0), +in which case it is interpreted an offset from end end of the file +going backwards. +This works only when a file descriptor to the file is a available and it +is a regular file. +.It +A continuation offset relative to the end of the last up-level field +.Dv ( \*[Am] ) . +.El .It Dv type The type of the data to be tested. The possible values are: @@ -541,12 +554,12 @@ the file. The value at that offset is read, and is used again as an offset in the file. Indirect offsets are of the form: -.Em (( x [[.,][bislBISL]][+\-][ y ]) . +.Em (( x [[.,][bBcCeEfFgGhHiIlmsSqQ]][+\-][ y ]) . The value of .Em x is used as an offset in the file. A byte, id3 length, short or long is read at that offset depending on the -.Em [bislBISLm] +.Em [bBcCeEfFgGhHiIlmsSqQ] type specifier. The value is treated as signed if .Dq , @@ -563,6 +576,20 @@ To that number the value of .Em y is added and the result is used as an offset in the file. The default type if one is not specified is long. +The following types are recognized: +.Bl -column -offset indent "Type" "Half/Short" "Little" "Size" +.It Sy Type Sy Mnemonic Sy Endian Sy Size +.It bcBc Byte/Char N/A 1 +.It efg Double Little 8 +.It EFG Double Big 8 +.It hs Half/Short Little 2 +.It HS Half/Short Big 2 +.It i ID3 Little 4 +.It I ID3 Big 4 +.It m Middle Middle 4 +.It q Quad Little 8 +.It Q Quad Big 8 +.El .Pp That way variable length structures can be examined: .Bd -literal -offset indent Modified: stable/11/contrib/file/magic/Magdir/acorn ============================================================================== --- stable/11/contrib/file/magic/Magdir/acorn Wed Aug 15 01:29:02 2018 (r337826) +++ stable/11/contrib/file/magic/Magdir/acorn Wed Aug 15 02:14:46 2018 (r337827) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: acorn,v 1.5 2009/09/19 16:28:07 christos Exp $ +# $File: acorn,v 1.6 2017/10/19 16:40:37 christos Exp $ # acorn: file(1) magic for files found on Acorn systems # @@ -67,3 +67,36 @@ >>8 byte x version %d, >>10 leshort =1 1 pattern >>10 leshort !1 %d patterns + +# From: Joerg Jenderek +# URL: https://www.kyzer.me.uk/pack/xad/#PackDir +# reference: https://www.kyzer.me.uk/pack/xad/xad_PackDir.lha/PackDir.c +# GRR: line below is too general as it matches also "Git pack" in ./revision +0 string PACK\0 +# check for valid compression method 0-4 +>5 ulelong <5 +# https://www.riscosopen.org/wiki/documentation/show/Introduction%20To%20Filing%20Systems +# To skip "Git pack" version 0 test for root directory object like +# ADFS::RPC.$.websitezip.FONTFIX +>>9 string >ADFS\ PackDir archive (RISC OS) +# TrID labels above as "Acorn PackDir compressed Archive" +# compression mode y (0 - 4) for GIF LZW with a maximum n bits +# (y~n,0~12,1~13,2~14,3~15,4~16) +>>>5 ulelong+12 x \b, LZW %u-bits compression +# http://www.filebase.org.uk/filetypes +# !Packdir compressed archive has three hexadecimal digits code 68E +!:mime application/x-acorn-68E +!:ext pkd/bin +# null terminated root directory object like IDEFS::IDE-4.$.Apps.GRAPHICS.!XFMPdemo +>>>9 string x \b, root "%s" +# load address 0xFFFtttdd, ttt is the object filetype and dddddddddd is time +>>>>&1 ulelong x \b, load address 0x%x +# execution address 0xdddddddd dddddddddd is 40 bit unsigned centiseconds since 1.1.1900 UTC +>>>>&5 ulelong x \b, exec address 0x%x +# attributes (bits: 0~owner read,1~owner write,3~no delete,4~public read,5~public write) +>>>>&9 ulelong x \b, attributes 0x%x +# number of entries in this directory. for root dir 0 +#>>>&13 ulelong x \b, entries 0x%x +# the entries start here with object name +>>>>&17 string x \b, 1st object "%s" + Modified: stable/11/contrib/file/magic/Magdir/animation ============================================================================== --- stable/11/contrib/file/magic/Magdir/animation Wed Aug 15 01:29:02 2018 (r337826) +++ stable/11/contrib/file/magic/Magdir/animation Wed Aug 15 02:14:46 2018 (r337827) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: animation,v 1.63 2017/05/26 14:33:07 christos Exp $ +# $File: animation,v 1.68 2018/05/06 16:08:07 christos Exp $ # animation: file(1) magic for animation/movie formats # # animation formats @@ -56,20 +56,20 @@ >>11 byte 6 \b, Release 6 MBMS Extended Presentations >>11 byte 7 \b, Release 7 MBMS Extended Presentations >8 string 3gg \b, MPEG v4 system, 3GPP ->11 byte 6 \b, Release 6 General Profile !:mime video/3gpp +>>11 byte 6 \b, Release 6 General Profile >8 string 3gp \b, MPEG v4 system, 3GPP ->11 byte 1 \b, Release %d (non existent) ->11 byte 2 \b, Release %d (non existent) ->11 byte 3 \b, Release %d (non existent) ->11 byte 4 \b, Release %d ->11 byte 5 \b, Release %d ->11 byte 6 \b, Release %d ->11 byte 7 \b, Release %d Streaming Servers !:mime video/3gpp +>>11 byte 1 \b, Release %d (non existent) +>>11 byte 2 \b, Release %d (non existent) +>>11 byte 3 \b, Release %d (non existent) +>>11 byte 4 \b, Release %d +>>11 byte 5 \b, Release %d +>>11 byte 6 \b, Release %d +>>11 byte 7 \b, Release %d Streaming Servers >8 string 3gs \b, MPEG v4 system, 3GPP ->11 byte 7 \b, Release %d Streaming Servers !:mime video/3gpp +>>11 byte 7 \b, Release %d Streaming Servers >8 string avc1 \b, MPEG v4 system, 3GPP JVT AVC [ISO 14496-12:2005] !:mime video/mp4 >8 string/W qt \b, Apple QuickTime movie @@ -188,6 +188,36 @@ >8 string pana \b, Panasonic Digital Camera >8 string qt \b, Apple QuickTime (.MOV/QT) !:mime video/quicktime +# HEIF image format +# see https://nokiatech.github.io/heif/technical.html +>8 string mif1 \b, HEIF Image +!:mime image/heif +>8 string msf1 \b, HEIF Image Sequence +!:mime image/heif-sequence +>8 string heic \b, HEIF Image HEVC Main or Main Still Picture Profile +!:mime image/heic +>8 string heix \b, HEIF Image HEVC Main 10 Profile +!:mime image/heic +>8 string hevc \b, HEIF Image Sequenz HEVC Main or Main Still Picture Profile +!:mime image/heic-sequence +>8 string hevx \b, HEIF Image Sequence HEVC Main 10 Profile +!:mime image/heic-sequence +# following HEIF brands are not mentioned in the heif technical info currently (Oct 2017) +# but used in the reference implementation: +# https://github.com/nokiatech/heif/blob/d5e9a21c8ba8df712bdf643021dd9f6518134776/Srcs/reader/hevcimagefilereader.cpp +>8 string heim \b, HEIF Image L-HEVC +!:mime image/heif +>8 string heis \b, HEIF Image L-HEVC +!:mime image/heif +>8 string avic \b, HEIF Image AVC +!:mime image/heif +>8 string hevm \b, HEIF Image Sequence L-HEVC +!:mime image/heif-sequence +>8 string hevs \b, HEIF Image Sequence L-HEVC +!:mime image/heif-sequence +>8 string avcs \b, HEIF Image Sequence AVC +!:mime image/heif-sequence + >8 string ROSS \b, Ross Video >8 string sdv \b, SD Memory Card Video >8 string ssc1 \b, Samsung stereo, single stream (patent pending) @@ -1027,3 +1057,10 @@ 0 string \x06\x0e\x2b\x34\x02\x05\x01\x01\x0d\x01\x02\x01\x01\x02 Material exchange container format !:ext mxf !:mime application/mxf + +# Recognize LucasArts Smush video files (cf. +# https://wiki.multimedia.cx/index.php/Smush) +0 string ANIM +>8 string AHDR LucasArts Smush Animation Format (SAN) video +0 string SANM +>8 string SHDR LucasArts Smush v2 (SANM) video Modified: stable/11/contrib/file/magic/Magdir/apple ============================================================================== --- stable/11/contrib/file/magic/Magdir/apple Wed Aug 15 01:29:02 2018 (r337826) +++ stable/11/contrib/file/magic/Magdir/apple Wed Aug 15 02:14:46 2018 (r337827) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: apple,v 1.36 2017/03/17 21:35:28 christos Exp $ +# $File: apple,v 1.39 2018/03/02 15:26:39 christos Exp $ # apple: file(1) magic for Apple file formats # 0 search/1/t FiLeStArTfIlEsTaRt binscii (apple ][) text @@ -431,3 +431,19 @@ >>>>0 use appleworks >0 belong 0x0481ad00 >>0 use appleworks + +# magic for Apple File System (APFS) +# from Alex Myczko +32 string NXSB Apple File System (APFS) +>36 ulelong x \b, blocksize %u + +# iTunes cover art (versions 1 and 2) +4 string itch +>24 string artw +>>0x1e8 string data iTunes cover art +>>>0x1ed string PNG (PNG) +>>>0x1ec beshort 0xffd8 (JPEG) + +# MacPaint image +65 string PNTGMPNT MacPaint image data +#0 belong 2 MacPaint image data Modified: stable/11/contrib/file/magic/Magdir/archive ============================================================================== --- stable/11/contrib/file/magic/Magdir/archive Wed Aug 15 01:29:02 2018 (r337826) +++ stable/11/contrib/file/magic/Magdir/archive Wed Aug 15 02:14:46 2018 (r337827) @@ -1,16 +1,151 @@ #------------------------------------------------------------------------------ -# $File: archive,v 1.108 2017/08/30 13:45:10 christos Exp $ +# $File: archive,v 1.119 2018/04/24 23:19:45 christos Exp $ # archive: file(1) magic for archive formats (see also "msdos" for self- # extracting compressed archives) # # cpio, ar, arc, arj, hpack, lha/lharc, rar, squish, uc2, zip, zoo, etc. -# pre-POSIX "tar" archives are handled in the C code. +# pre-POSIX "tar" archives are also handled in the C code ../../src/is_tar.c. # POSIX tar archives -257 string ustar\0 POSIX tar archive -!:mime application/x-tar # encoding: posix -257 string ustar\040\040\0 GNU tar archive -!:mime application/x-tar # encoding: gnu +# URL: https://en.wikipedia.org/wiki/Tar_(computing) +# Reference: https://www.freebsd.org/cgi/man.cgi?query=tar&sektion=5&manpath=FreeBSD+8-current +# header mainly padded with nul bytes +500 quad 0 +!:strength /2 +# filename or extended attribute printable strings in range space null til umlaut ue +>0 ubeshort >0x1F00 +>>0 ubeshort <0xFCFD +# last 4 header bytes often null but tar\0 in gtarfail2.tar gtarfail.tar-bad +# at https://sourceforge.net/projects/s-tar/files/testscripts/ +>>>508 ubelong&0x8B9E8DFF 0 +# nul, space or ascii digit 0-7 at start of mode +>>>>100 ubyte&0xC8 =0 +>>>>>101 ubyte&0xC8 =0 +# nul, space at end of check sum +>>>>>>155 ubyte&0xDF =0 +# space or ascii digit 0 at start of check sum +>>>>>>>148 ubyte&0xEF =0x20 +>>>>>>>>0 use tar-file +# minimal check and then display tar archive information which can also be +# embedded inside others like Android Backup, Clam AntiVirus database +0 name tar-file +>257 string !ustar +# header padded with nuls +>>257 ulong =0 +# GNU tar version 1.29 with non pax format option without refusing +# creates misleading V7 header for Long path, Multi-volume, Volume type +>>>156 ubyte 0x4c GNU tar archive +!:mime application/x-gtar +!:ext tar/gtar +>>>156 ubyte 0x4d GNU tar archive +!:mime application/x-gtar +!:ext tar/gtar +>>>156 ubyte 0x56 GNU tar archive +!:mime application/x-gtar +!:ext tar/gtar +>>>156 default x tar archive (V7) +!:mime application/x-tar +!:ext tar +# other stuff in padding +# some implementations add new fields to the blank area at the end of the header record +# created for example by DOS TAR 3.20g 1994 Tim V.Shapore with -j option +>>257 ulong !0 tar archive (old) +!:mime application/x-tar +!:ext tar +# magic in newer, GNU, posix variants +>257 string =ustar +# 2 last char of magic and UStar version because string expression does not work +# 2 space characters followed by a null for GNU variant +>>261 ubelong =0x72202000 POSIX tar archive (GNU) +!:mime application/x-gtar +!:ext tar/gtar +# UStar version with ASCII "00" +>>261 ubelong 0x72003030 POSIX +# gLOBAL and ExTENSION type only found in POSIX.1-2001 format +>>>156 ubyte 0x67 \b.1-2001 +>>>156 ubyte 0x78 \b.1-2001 +>>>156 ubyte x tar archive +!:mime application/x-ustar +!:ext tar/ustar +# version with 2 binary nuls embedded in Android Backup like com.android.settings.ab +>>261 ubelong 0x72000000 tar archive (ustar) +!:mime application/x-ustar +!:ext tar/ustar +# not seen ustar variant with garbish version +>>261 default x tar archive (unknown ustar) +!:mime application/x-ustar +!:ext tar/ustar +# type flag of 1st tar archive member +#>156 ubyte x \b, %c-type +>156 ubyte x +>>156 ubyte 0 \b, file +>>156 ubyte 0x30 \b, file +>>156 ubyte 0x31 \b, hard link +>>156 ubyte 0x32 \b, symlink +>>156 ubyte 0x33 \b, char device +>>156 ubyte 0x34 \b, block device +>>156 ubyte 0x35 \b, directory +>>156 ubyte 0x36 \b, fifo +>>156 ubyte 0x37 \b, reserved +>>156 ubyte 0x4c \b, long path +>>156 ubyte 0x4d \b, multi volume +>>156 ubyte 0x56 \b, volume +>>156 ubyte 0x67 \b, global +>>156 ubyte 0x78 \b, extension +>>156 default x \b, type +>>>156 ubyte x '%c' +# name[100] +>0 string >\0 %-.60s +# mode mainly stored as an octal number in ASCII null or space terminated +>100 string >\0 \b, mode %-.7s +# user id mainly as octal numbers in ASCII null or space terminated +>108 string >\0 \b, uid %-.7s +# group id mainly as octal numbers in ASCII null or space terminated +>116 string >\0 \b, gid %-.7s +# size mainly as octal number in ASCII +>124 ubyte <0x38 +>>124 string >\0 \b, size %-.12s +# coding indicated by setting the high-order bit of the leftmost byte +>124 ubyte >0xEF \b, size 0x +>>124 ubyte !0xff \b%2.2x +>>125 ubyte !0xff \b%2.2x +>>126 ubyte !0xff \b%2.2x +>>127 ubyte !0xff \b%2.2x +>>128 ubyte !0xff \b%2.2x +>>129 ubyte !0xff \b%2.2x +>>130 ubyte !0xff \b%2.2x +>>131 ubyte !0xff \b%2.2x +>>132 ubyte !0xff \b%2.2x +>>133 ubyte !0xff \b%2.2x +>>134 ubyte !0xff \b%2.2x +>>135 ubyte !0xff \b%2.2x +# seconds since 0:0:0 1 jan 1970 UTC as octal number mainly in ASCII null or space terminated +>136 string >\0 \b, seconds %-.11s +# header checksum stored as an octal number in ASCII null or space terminated +#>148 string x \b, cksum %.7s +# linkname[100] +>157 string >\0 \b, linkname %-.40s +# additional fields for ustar +>257 string =ustar +# owner user name null terminated +>>265 string >\0 \b, user %-.32s +# group name null terminated +>>297 string >\0 \b, group %-.32s +# device major minor if not zero *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Wed Aug 15 02:29:11 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA457106EC3A; Wed, 15 Aug 2018 02:29:11 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8D8107361D; Wed, 15 Aug 2018 02:29:11 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 2B42E10606; Wed, 15 Aug 2018 02:29:11 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lj1-f170.google.com with SMTP id j19-v6so16948612ljc.7; Tue, 14 Aug 2018 19:29:11 -0700 (PDT) X-Gm-Message-State: AOUpUlFyDLtf+dae+2qBUPEvFKl2GJAsaFYOsqTW/HywZgPEusSP4fQa fi1E3kCGPO8ZQXLfim5lRHVrJSpr8oRTQTb2VLk= X-Google-Smtp-Source: AA+uWPwKAxvK5FAFEYl11x1OWJxI46RtU35GA3AEM49sGE+8Ejh/yuNsPVKXOod6fVNqAVBp4DJBJqiWUBoVxC8N6uk= X-Received: by 2002:a2e:2e02:: with SMTP id u2-v6mr17649914lju.77.1534300149809; Tue, 14 Aug 2018 19:29:09 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:5742:0:0:0:0:0 with HTTP; Tue, 14 Aug 2018 19:28:49 -0700 (PDT) In-Reply-To: <201808150141.w7F1ft69045150@pdx.rh.CN85.dnsmgr.net> References: <201808150129.w7F1T23r064553@repo.freebsd.org> <201808150141.w7F1ft69045150@pdx.rh.CN85.dnsmgr.net> From: Kyle Evans Date: Tue, 14 Aug 2018 21:28:49 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r337826 - stable/11/bin/ls To: "Rodney W. Grimes" Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 02:29:12 -0000 On Tue, Aug 14, 2018 at 8:41 PM, Rodney W. Grimes wrote: >> Author: kevans >> Date: Wed Aug 15 01:29:02 2018 >> New Revision: 337826 >> URL: https://svnweb.freebsd.org/changeset/base/337826 >> >> Log: >> MFC r337506: ls(1): Enable colors with COLORTERM is set in the environment >> >> COLORTERM is the de facto standard, while CLICOLOR is generally specific to >> FreeBSD and ls(1). > > I have already seen one "Who enabled %&*@(#$@) colored ls output in 12?" > Seems that the defaults for xfce terminal is to have COLORTERM. > Hmm? No one's pointed me at any such complaints, and I've not seen any seen pass by -- neither in response to the initial commit mail, or on -current@ Thanks, Kyle Evans From owner-svn-src-stable@freebsd.org Wed Aug 15 05:03:55 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0853710728A5; Wed, 15 Aug 2018 05:03:55 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9FA3378378; Wed, 15 Aug 2018 05:03:54 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7B63F25BDB; Wed, 15 Aug 2018 05:03:54 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7F53sad077146; Wed, 15 Aug 2018 05:03:54 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7F53s4c077145; Wed, 15 Aug 2018 05:03:54 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201808150503.w7F53s4c077145@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 15 Aug 2018 05:03:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337831 - stable/11/contrib/wpa/src/rsn_supp X-SVN-Group: stable-11 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: stable/11/contrib/wpa/src/rsn_supp X-SVN-Commit-Revision: 337831 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 05:03:55 -0000 Author: delphij Date: Wed Aug 15 05:03:54 2018 New Revision: 337831 URL: https://svnweb.freebsd.org/changeset/base/337831 Log: MFC r337819 (cy@): MFV r337818: WPA: Ignore unauthenticated encrypted EAPOL-Key data Approved by: so Security: CVE-2018-14526 Security: FreeBSD-SA-18:11.hostapd Modified: stable/11/contrib/wpa/src/rsn_supp/wpa.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/wpa/src/rsn_supp/wpa.c ============================================================================== --- stable/11/contrib/wpa/src/rsn_supp/wpa.c Wed Aug 15 03:03:01 2018 (r337830) +++ stable/11/contrib/wpa/src/rsn_supp/wpa.c Wed Aug 15 05:03:54 2018 (r337831) @@ -2072,6 +2072,17 @@ int wpa_sm_rx_eapol(struct wpa_sm *sm, const u8 *src_a if ((sm->proto == WPA_PROTO_RSN || sm->proto == WPA_PROTO_OSEN) && (key_info & WPA_KEY_INFO_ENCR_KEY_DATA)) { + /* + * Only decrypt the Key Data field if the frame's authenticity + * was verified. When using AES-SIV (FILS), the MIC flag is not + * set, so this check should only be performed if mic_len != 0 + * which is the case in this code branch. + */ + if (!(key_info & WPA_KEY_INFO_MIC)) { + wpa_msg(sm->ctx->msg_ctx, MSG_WARNING, + "WPA: Ignore EAPOL-Key with encrypted but unauthenticated data"); + goto out; + } if (wpa_supplicant_decrypt_key_data(sm, key, ver, key_data, &key_data_len)) goto out; From owner-svn-src-stable@freebsd.org Wed Aug 15 05:05:03 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A92FD1072924; Wed, 15 Aug 2018 05:05:03 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5B4FD784BA; Wed, 15 Aug 2018 05:05:03 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3C4CB25BDC; Wed, 15 Aug 2018 05:05:03 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7F5532j077251; Wed, 15 Aug 2018 05:05:03 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7F5535x077250; Wed, 15 Aug 2018 05:05:03 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201808150505.w7F5535x077250@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 15 Aug 2018 05:05:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r337832 - stable/10/contrib/wpa/src/rsn_supp X-SVN-Group: stable-10 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: stable/10/contrib/wpa/src/rsn_supp X-SVN-Commit-Revision: 337832 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 05:05:03 -0000 Author: delphij Date: Wed Aug 15 05:05:02 2018 New Revision: 337832 URL: https://svnweb.freebsd.org/changeset/base/337832 Log: Fix unauthenticated EAPOL-Key decryption vulnerability. [SA-18:11.hostapd] Approved by: so Modified: stable/10/contrib/wpa/src/rsn_supp/wpa.c Modified: stable/10/contrib/wpa/src/rsn_supp/wpa.c ============================================================================== --- stable/10/contrib/wpa/src/rsn_supp/wpa.c Wed Aug 15 05:03:54 2018 (r337831) +++ stable/10/contrib/wpa/src/rsn_supp/wpa.c Wed Aug 15 05:05:02 2018 (r337832) @@ -1829,6 +1829,17 @@ int wpa_sm_rx_eapol(struct wpa_sm *sm, const u8 *src_a if (sm->proto == WPA_PROTO_RSN && (key_info & WPA_KEY_INFO_ENCR_KEY_DATA)) { + /* + * Only decrypt the Key Data field if the frame's authenticity + * was verified. When using AES-SIV (FILS), the MIC flag is not + * set, so this check should only be performed if mic_len != 0 + * which is the case in this code branch. + */ + if (!(key_info & WPA_KEY_INFO_MIC)) { + wpa_msg(sm->ctx->msg_ctx, MSG_WARNING, + "WPA: Ignore EAPOL-Key with encrypted but unauthenticated data"); + goto out; + } if (wpa_supplicant_decrypt_key_data(sm, key, ver)) goto out; extra_len = WPA_GET_BE16(key->key_data_length); From owner-svn-src-stable@freebsd.org Wed Aug 15 15:37:18 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB59A105BFDC; Wed, 15 Aug 2018 15:37:18 +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 2791692AC8; Wed, 15 Aug 2018 15:37:17 +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 w7FFbDhs048176; Wed, 15 Aug 2018 08:37:13 -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 w7FFbDie048175; Wed, 15 Aug 2018 08:37:13 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201808151537.w7FFbDie048175@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r337826 - stable/11/bin/ls In-Reply-To: To: Kyle Evans Date: Wed, 15 Aug 2018 08:37:13 -0700 (PDT) CC: "Rodney W. Grimes" , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@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-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 15:37:19 -0000 [ Charset UTF-8 unsupported, converting... ] > On Tue, Aug 14, 2018 at 8:41 PM, Rodney W. Grimes > wrote: > >> Author: kevans > >> Date: Wed Aug 15 01:29:02 2018 > >> New Revision: 337826 > >> URL: https://svnweb.freebsd.org/changeset/base/337826 > >> > >> Log: > >> MFC r337506: ls(1): Enable colors with COLORTERM is set in the environment > >> > >> COLORTERM is the de facto standard, while CLICOLOR is generally specific to > >> FreeBSD and ls(1). > > > > I have already seen one "Who enabled %&*@(#$@) colored ls output in 12?" > > Seems that the defaults for xfce terminal is to have COLORTERM. > > > > Hmm? No one's pointed me at any such complaints, and I've not seen any > seen pass by -- neither in response to the initial commit mail, or on > -current@ It was not in a public forum. And it was just yesterday, so it takes times for these things to trickle out and be noticed. Just be aware, this change is gona have a few shocked users as it proliferates. My 'changes' that are made take 1 to 2 years before the mass user community notices there over all effects. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-stable@freebsd.org Wed Aug 15 15:40:12 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7BF3A1065199; Wed, 15 Aug 2018 15:40:12 +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 F24EE92CAF; Wed, 15 Aug 2018 15:40:11 +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 w7FFeABc048196; Wed, 15 Aug 2018 08:40:10 -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 w7FFeAFC048195; Wed, 15 Aug 2018 08:40:10 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201808151540.w7FFeAFC048195@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r337826 - stable/11/bin/ls In-Reply-To: <201808151537.w7FFbDie048175@pdx.rh.CN85.dnsmgr.net> To: rgrimes@freebsd.org Date: Wed, 15 Aug 2018 08:40:10 -0700 (PDT) CC: Kyle Evans , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@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-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 15:40:12 -0000 > [ Charset UTF-8 unsupported, converting... ] > > On Tue, Aug 14, 2018 at 8:41 PM, Rodney W. Grimes > > wrote: > > >> Author: kevans > > >> Date: Wed Aug 15 01:29:02 2018 > > >> New Revision: 337826 > > >> URL: https://svnweb.freebsd.org/changeset/base/337826 > > >> > > >> Log: > > >> MFC r337506: ls(1): Enable colors with COLORTERM is set in the environment > > >> > > >> COLORTERM is the de facto standard, while CLICOLOR is generally specific to > > >> FreeBSD and ls(1). > > > > > > I have already seen one "Who enabled %&*@(#$@) colored ls output in 12?" > > > Seems that the defaults for xfce terminal is to have COLORTERM. > > > > > > > Hmm? No one's pointed me at any such complaints, and I've not seen any > > seen pass by -- neither in response to the initial commit mail, or on > > -current@ > > It was not in a public forum. And it was just yesterday, so it > takes times for these things to trickle out and be noticed. > Just be aware, this change is gona have a few shocked users as > it proliferates. > > My 'changes' that are made take 1 to 2 years before the mass user My -> Many > community notices there over all effects. > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-stable@freebsd.org Wed Aug 15 16:04:57 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9A8E106605B; Wed, 15 Aug 2018 16:04:57 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-it0-x234.google.com (mail-it0-x234.google.com [IPv6:2607:f8b0:4001:c0b::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F8A993E38; Wed, 15 Aug 2018 16:04:57 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-it0-x234.google.com with SMTP id s7-v6so2370101itb.4; Wed, 15 Aug 2018 09:04:57 -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=01Aq6Eda2ZZALZ39NfssddgnbxfhnvNqDMiW5mCkdj4=; b=OOFB3vAotPWTFmFiXxqMO1U0dw9bGe2OOqLngqNrZ7mYxdz1fVpv3It2gA8AGi1BP7 86iVB9FUtfXfmf85QGK+jsEqm9jTM3gE0cqZdDr1TIsNFvLbT+98mjoFGMxTSW/5cIm9 94LPa7xrAxXJ2gPAdetKJTRcnnp2cumaDevSIrYA9hlL5+EqN//mERDYitxuWVuHDpVa M91E/bHeaCDN6V5XhqA94PNJY+eI07eN0ehuXkHQOLydwocWMSwAS1vgc9811o1mf1nu 3ysw4Mv023TUEuNSBEeNnU4U9VrCJbiRVKzv2iEkGQJVdx7iJukrGw+iMfXFOlytB2Fg d+Pw== 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=01Aq6Eda2ZZALZ39NfssddgnbxfhnvNqDMiW5mCkdj4=; b=gbkduo8AUiixncyvztmbnZL1U54Y2RUbQ7yo5bnKe78LZv/VqONNB3sVtTIBEYYUUd trS3e7CplHyh0o+r3c0oZOa7K4pMNMrQkD0a0P6OKdYDaT7BTFqKg1FxQinbhAIx7u0E ZZUmcrvIYl+r5ijo8a34adbpVby24b4Z0leRPlAWDiBlu/7YW0VYX3BP6Yba2FHFJcjr 67Bok1Grje7YF0SsGNlZQyj0F8Efe6klRS5qL54h/Yiko1/WbZa4vfdgIpbzucM4yjZb 7RP3S7zIp8m+991D+kfxHYEnLdX9c20woM4RJEWsCffID8BK/cb2qmLNCV1Rb2PNiA4P UdGQ== X-Gm-Message-State: AOUpUlFPNd2beT6ghfkrcRZPE8LFzx0D5nz3HzxHmMhcBfp1hxxnTed7 1FwRdWAeqpvUN28yU41inwK+JaAtB6+XBybXjwVsDw== X-Google-Smtp-Source: AA+uWPxRbooc+jk3Rp4w+zTefZc90dKZvf0mQNiVV6P6rot8aUrY2A8JWhlx7WNKuZPkcqJ3zwO+wtk2+jnNKhzcofM= X-Received: by 2002:a24:4d8d:: with SMTP id l135-v6mr18216462itb.49.1534349096454; Wed, 15 Aug 2018 09:04:56 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 2002:a6b:4a08:0:0:0:0:0 with HTTP; Wed, 15 Aug 2018 09:04:35 -0700 (PDT) In-Reply-To: <201808150141.w7F1ft69045150@pdx.rh.CN85.dnsmgr.net> References: <201808150129.w7F1T23r064553@repo.freebsd.org> <201808150141.w7F1ft69045150@pdx.rh.CN85.dnsmgr.net> From: Ed Maste Date: Wed, 15 Aug 2018 12:04:35 -0400 X-Google-Sender-Auth: Mv695Y4xkcOCdETcll1p3Y6q_hM Message-ID: Subject: Re: svn commit: r337826 - stable/11/bin/ls To: "Rodney W. Grimes" Cc: Kyle Evans , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 16:04:57 -0000 On 14 August 2018 at 21:41, Rodney W. Grimes wrote: >> Author: kevans >> Date: Wed Aug 15 01:29:02 2018 >> New Revision: 337826 >> URL: https://svnweb.freebsd.org/changeset/base/337826 >> >> Log: >> MFC r337506: ls(1): Enable colors with COLORTERM is set in the environment >> >> COLORTERM is the de facto standard, while CLICOLOR is generally specific to >> FreeBSD and ls(1). > > I have already seen one "Who enabled %&*@(#$@) colored ls output in 12?" > Seems that the defaults for xfce terminal is to have COLORTERM. If xfce's default is to request colour via the de-facto environment variable then we should generally honour it -- the answer to the %&*@(#$@) question is "you did, via your terminal's default." From owner-svn-src-stable@freebsd.org Wed Aug 15 16:07:31 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E60111066169; Wed, 15 Aug 2018 16:07:30 +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 6E51093FF1; Wed, 15 Aug 2018 16:07:30 +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 w7FG7SLS048318; Wed, 15 Aug 2018 09:07: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 w7FG7Smo048317; Wed, 15 Aug 2018 09:07:28 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201808151607.w7FG7Smo048317@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r337826 - stable/11/bin/ls In-Reply-To: To: Ed Maste Date: Wed, 15 Aug 2018 09:07:27 -0700 (PDT) CC: "Rodney W. Grimes" , Kyle Evans , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@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-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 16:07:31 -0000 [ Charset UTF-8 unsupported, converting... ] > On 14 August 2018 at 21:41, Rodney W. Grimes > wrote: > >> Author: kevans > >> Date: Wed Aug 15 01:29:02 2018 > >> New Revision: 337826 > >> URL: https://svnweb.freebsd.org/changeset/base/337826 > >> > >> Log: > >> MFC r337506: ls(1): Enable colors with COLORTERM is set in the environment > >> > >> COLORTERM is the de facto standard, while CLICOLOR is generally specific to > >> FreeBSD and ls(1). > > > > I have already seen one "Who enabled %&*@(#$@) colored ls output in 12?" > > Seems that the defaults for xfce terminal is to have COLORTERM. > > If xfce's default is to request colour via the de-facto environment > variable then we should generally honour it -- the answer to the > %&*@(#$@) question is "you did, via your terminal's default." And I pointed that out to them, but it is kinda a POLA, people have had to take explicit action to get colorls, that is no longer true and that suprises them when they see it. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-stable@freebsd.org Wed Aug 15 16:12:14 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A2E010663AE; Wed, 15 Aug 2018 16:12:14 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E515B94486; Wed, 15 Aug 2018 16:12:13 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AC1344C6F; Wed, 15 Aug 2018 16:12:13 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7FGCDYo021406; Wed, 15 Aug 2018 16:12:13 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7FGCD0e021405; Wed, 15 Aug 2018 16:12:13 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201808151612.w7FGCD0e021405@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Wed, 15 Aug 2018 16:12:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337855 - stable/11/sys/net X-SVN-Group: stable-11 X-SVN-Commit-Author: loos X-SVN-Commit-Paths: stable/11/sys/net X-SVN-Commit-Revision: 337855 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 16:12:14 -0000 Author: loos Date: Wed Aug 15 16:12:13 2018 New Revision: 337855 URL: https://svnweb.freebsd.org/changeset/base/337855 Log: MFC r312953: The stf(4) interface name does not conform with the default naming convention for interfaces, because only one stf(4) interface can exist in the system. This disallow the use of unit numbers different than 0, however, it is possible to create the clone without specify the unit number (wildcard). In the wildcard case we must update the interface name before return. This fix an infinite recursion in pf code that keeps track of network interfaces and groups: 1 - a group for the cloned type of the interface is added (stf in this case); 2 - the system will now try to add an interface named stf (instead of stf0) to stf group; 3 - when pfi_kif_attach() tries to search for an already existing 'stf' interface, the 'stf' group is returned and thus the group is added as an interface of itself; This will now cause a crash at the first attempt to traverse the groups which the stf interface belongs (which loops over itself). Obtained from: pfSense Sponsored by: Rubicon Communications, LLC (Netgate) Modified: stable/11/sys/net/if_stf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/if_stf.c ============================================================================== --- stable/11/sys/net/if_stf.c Wed Aug 15 15:44:30 2018 (r337854) +++ stable/11/sys/net/if_stf.c Wed Aug 15 16:12:13 2018 (r337855) @@ -202,10 +202,16 @@ stf_clone_match(struct if_clone *ifc, const char *name static int stf_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) { - int err, unit; + char *dp; + int err, unit, wildcard; struct stf_softc *sc; struct ifnet *ifp; + err = ifc_name2unit(name, &unit); + if (err != 0) + return (err); + wildcard = (unit < 0); + /* * We can only have one unit, but since unit allocation is * already locked, we use it to keep from allocating extra @@ -229,7 +235,20 @@ stf_clone_create(struct if_clone *ifc, char *name, siz /* * Set the name manually rather then using if_initname because * we don't conform to the default naming convention for interfaces. + * In the wildcard case, we need to update the name. */ + if (wildcard) { + for (dp = name; *dp != '\0'; dp++); + if (snprintf(dp, len - (dp-name), "%d", unit) > + len - (dp-name) - 1) { + /* + * This can only be a programmer error and + * there's no straightforward way to recover if + * it happens. + */ + panic("if_clone_create(): interface name too long"); + } + } strlcpy(ifp->if_xname, name, IFNAMSIZ); ifp->if_dname = stfname; ifp->if_dunit = IF_DUNIT_NONE; From owner-svn-src-stable@freebsd.org Wed Aug 15 16:17:00 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 164811066472; Wed, 15 Aug 2018 16:17:00 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C0914946CD; Wed, 15 Aug 2018 16:16:59 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A31564D96; Wed, 15 Aug 2018 16:16:59 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7FGGxmd021638; Wed, 15 Aug 2018 16:16:59 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7FGGxX8021637; Wed, 15 Aug 2018 16:16:59 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201808151616.w7FGGxX8021637@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Wed, 15 Aug 2018 16:16:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337856 - stable/11/sys/dev/vmware/vmxnet3 X-SVN-Group: stable-11 X-SVN-Commit-Author: loos X-SVN-Commit-Paths: stable/11/sys/dev/vmware/vmxnet3 X-SVN-Commit-Revision: 337856 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 16:17:00 -0000 Author: loos Date: Wed Aug 15 16:16:59 2018 New Revision: 337856 URL: https://svnweb.freebsd.org/changeset/base/337856 Log: MFC r313911: Spell VMXNET3_LEGACY_TX correctly. Modified: stable/11/sys/dev/vmware/vmxnet3/if_vmxvar.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/vmware/vmxnet3/if_vmxvar.h ============================================================================== --- stable/11/sys/dev/vmware/vmxnet3/if_vmxvar.h Wed Aug 15 16:12:13 2018 (r337855) +++ stable/11/sys/dev/vmware/vmxnet3/if_vmxvar.h Wed Aug 15 16:16:59 2018 (r337856) @@ -131,7 +131,7 @@ struct vmxnet3_txq_stats { struct vmxnet3_txqueue { struct mtx vxtxq_mtx; struct vmxnet3_softc *vxtxq_sc; -#ifndef VMXNET3_TX_LEGACY +#ifndef VMXNET3_LEGACY_TX struct buf_ring *vxtxq_br; #endif int vxtxq_id; @@ -142,7 +142,7 @@ struct vmxnet3_txqueue { struct vmxnet3_txq_stats vxtxq_stats; struct vmxnet3_txq_shared *vxtxq_ts; struct sysctl_oid_list *vxtxq_sysctl; -#ifndef VMXNET3_TX_LEGACY +#ifndef VMXNET3_LEGACY_TX struct task vxtxq_defrtask; #endif char vxtxq_name[16]; From owner-svn-src-stable@freebsd.org Wed Aug 15 16:27:53 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C15410668BA; Wed, 15 Aug 2018 16:27:53 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C388394F48; Wed, 15 Aug 2018 16:27:52 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A656C4F42; Wed, 15 Aug 2018 16:27:52 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7FGRqGS027265; Wed, 15 Aug 2018 16:27:52 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7FGRqHZ027264; Wed, 15 Aug 2018 16:27:52 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201808151627.w7FGRqHZ027264@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Wed, 15 Aug 2018 16:27:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337858 - stable/11/sys/dev/sdhci X-SVN-Group: stable-11 X-SVN-Commit-Author: loos X-SVN-Commit-Paths: stable/11/sys/dev/sdhci X-SVN-Commit-Revision: 337858 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 16:27:53 -0000 Author: loos Date: Wed Aug 15 16:27:52 2018 New Revision: 337858 URL: https://svnweb.freebsd.org/changeset/base/337858 Log: MFC r317800: Add support for the no-1-8-v and wp-inverted properties in generic SDHCI FDT glue. Sponsored by: Rubicon Communications, LLC (Netgate) Modified: stable/11/sys/dev/sdhci/sdhci_fdt.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/sdhci/sdhci_fdt.c ============================================================================== --- stable/11/sys/dev/sdhci/sdhci_fdt.c Wed Aug 15 16:22:12 2018 (r337857) +++ stable/11/sys/dev/sdhci/sdhci_fdt.c Wed Aug 15 16:27:52 2018 (r337858) @@ -70,6 +70,9 @@ struct sdhci_fdt_softc { int num_slots; /* Number of slots on this controller*/ struct sdhci_slot slots[MAX_SLOTS]; struct resource *mem_res[MAX_SLOTS]; /* Memory resource */ + + bool wp_inverted; /* WP pin is inverted */ + bool no_18v; /* No 1.8V support */ }; static uint8_t @@ -110,8 +113,13 @@ static uint32_t sdhci_fdt_read_4(device_t dev, struct sdhci_slot *slot, bus_size_t off) { struct sdhci_fdt_softc *sc = device_get_softc(dev); + uint32_t val32; - return (bus_read_4(sc->mem_res[slot->num], off)); + val32 = bus_read_4(sc->mem_res[slot->num], off); + if (off == SDHCI_CAPABILITIES && sc->no_18v) + val32 &= ~SDHCI_CAN_VDD_180; + + return (val32); } static void @@ -152,6 +160,14 @@ sdhci_fdt_intr(void *arg) } static int +sdhci_fdt_get_ro(device_t bus, device_t dev) +{ + struct sdhci_fdt_softc *sc = device_get_softc(bus); + + return (sdhci_generic_get_ro(bus, dev) ^ sc->wp_inverted); +} + +static int sdhci_fdt_probe(device_t dev) { struct sdhci_fdt_softc *sc = device_get_softc(dev); @@ -182,6 +198,10 @@ sdhci_fdt_probe(device_t dev) sc->num_slots = cid; if ((OF_getencprop(node, "max-frequency", &cid, sizeof(cid))) > 0) sc->max_clk = cid; + if (OF_hasprop(node, "no-1-8-v")) + sc->no_18v = true; + if (OF_hasprop(node, "wp-inverted")) + sc->wp_inverted = true; return (0); } @@ -279,7 +299,7 @@ static device_method_t sdhci_fdt_methods[] = { /* mmcbr_if */ DEVMETHOD(mmcbr_update_ios, sdhci_generic_update_ios), DEVMETHOD(mmcbr_request, sdhci_generic_request), - DEVMETHOD(mmcbr_get_ro, sdhci_generic_get_ro), + DEVMETHOD(mmcbr_get_ro, sdhci_fdt_get_ro), DEVMETHOD(mmcbr_acquire_host, sdhci_generic_acquire_host), DEVMETHOD(mmcbr_release_host, sdhci_generic_release_host), From owner-svn-src-stable@freebsd.org Wed Aug 15 16:34:32 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1E9B1066CAA; Wed, 15 Aug 2018 16:34:31 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A8668954F0; Wed, 15 Aug 2018 16:34:31 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 891B350D6; Wed, 15 Aug 2018 16:34:31 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7FGYVLR032001; Wed, 15 Aug 2018 16:34:31 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7FGYVPt032000; Wed, 15 Aug 2018 16:34:31 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201808151634.w7FGYVPt032000@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Wed, 15 Aug 2018 16:34:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337859 - stable/11/sys/net X-SVN-Group: stable-11 X-SVN-Commit-Author: loos X-SVN-Commit-Paths: stable/11/sys/net X-SVN-Commit-Revision: 337859 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 16:34:32 -0000 Author: loos Date: Wed Aug 15 16:34:31 2018 New Revision: 337859 URL: https://svnweb.freebsd.org/changeset/base/337859 Log: MFC r321649: Remove the unused mutex since r273220. Sponsored by: Rubicon Communications, LLC (Netgate) Modified: stable/11/sys/net/if_stf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/if_stf.c ============================================================================== --- stable/11/sys/net/if_stf.c Wed Aug 15 16:27:52 2018 (r337858) +++ stable/11/sys/net/if_stf.c Wed Aug 15 16:34:31 2018 (r337859) @@ -139,7 +139,6 @@ SYSCTL_INT(_net_link_stf, OID_AUTO, permit_rfc1918, CT struct stf_softc { struct ifnet *sc_ifp; - struct mtx sc_ro_mtx; u_int sc_fibnum; const struct encaptab *encap_cookie; }; @@ -147,10 +146,6 @@ struct stf_softc { static const char stfname[] = "stf"; -/* - * Note that mutable fields in the softc are not currently locked. - * We do lock sc_ro in stf_output though. - */ static MALLOC_DEFINE(M_STF, stfname, "6to4 Tunnel Interface"); static const int ip_stf_ttl = 40; @@ -253,7 +248,6 @@ stf_clone_create(struct if_clone *ifc, char *name, siz ifp->if_dname = stfname; ifp->if_dunit = IF_DUNIT_NONE; - mtx_init(&(sc)->sc_ro_mtx, "stf ro", NULL, MTX_DEF); sc->encap_cookie = encap_attach_func(AF_INET, IPPROTO_IPV6, stf_encapcheck, &in_stf_protosw, sc); if (sc->encap_cookie == NULL) { @@ -280,7 +274,6 @@ stf_clone_destroy(struct if_clone *ifc, struct ifnet * err = encap_detach(sc->encap_cookie); KASSERT(err == 0, ("Unexpected error detaching encap_cookie")); - mtx_destroy(&(sc)->sc_ro_mtx); bpfdetach(ifp); if_detach(ifp); if_free(ifp); From owner-svn-src-stable@freebsd.org Wed Aug 15 17:30:42 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 482091069A98; Wed, 15 Aug 2018 17:30:42 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D086A97E49; Wed, 15 Aug 2018 17:30:41 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 467FB1616D; Wed, 15 Aug 2018 17:30:41 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lf1-f46.google.com with SMTP id 95-v6so1418121lfy.9; Wed, 15 Aug 2018 10:30:41 -0700 (PDT) X-Gm-Message-State: AOUpUlH+05n3ddHqgVwHMARU9Bi9O31reL//A/eG36TaThYNq/tl2exL Xo4bZLNkSzoT9FSqQHd64crfaI0q0s802x7aZpU= X-Google-Smtp-Source: AA+uWPzxZD71hIrozGdI6D1f3XSIy2S52ei/VnNsXBT0LlMh/XK3XuuFtli/pNrs4xuhb/mslD2akplzC51uQXnYYMs= X-Received: by 2002:a19:26d2:: with SMTP id m201-v6mr16556099lfm.43.1534354238962; Wed, 15 Aug 2018 10:30:38 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:5742:0:0:0:0:0 with HTTP; Wed, 15 Aug 2018 10:30:18 -0700 (PDT) In-Reply-To: <201808151607.w7FG7Smo048317@pdx.rh.CN85.dnsmgr.net> References: <201808151607.w7FG7Smo048317@pdx.rh.CN85.dnsmgr.net> From: Kyle Evans Date: Wed, 15 Aug 2018 12:30:18 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r337826 - stable/11/bin/ls To: "Rodney W. Grimes" Cc: Ed Maste , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 17:30:42 -0000 On Wed, Aug 15, 2018 at 11:07 AM, Rodney W. Grimes wrote: > [ Charset UTF-8 unsupported, converting... ] >> On 14 August 2018 at 21:41, Rodney W. Grimes >> wrote: >> >> Author: kevans >> >> Date: Wed Aug 15 01:29:02 2018 >> >> New Revision: 337826 >> >> URL: https://svnweb.freebsd.org/changeset/base/337826 >> >> >> >> Log: >> >> MFC r337506: ls(1): Enable colors with COLORTERM is set in the environment >> >> >> >> COLORTERM is the de facto standard, while CLICOLOR is generally specific to >> >> FreeBSD and ls(1). >> > >> > I have already seen one "Who enabled %&*@(#$@) colored ls output in 12?" >> > Seems that the defaults for xfce terminal is to have COLORTERM. >> >> If xfce's default is to request colour via the de-facto environment >> variable then we should generally honour it -- the answer to the >> %&*@(#$@) question is "you did, via your terminal's default." > > And I pointed that out to them, but it is kinda a POLA, people have > had to take explicit action to get colorls, that is no longer true > and that suprises them when they see it. > I find the POLA angle kind-of hard to buy, though. Nothing in the base system offers a way for the default behavior of ls(1) to be altered, and this whole change is only honoring a de-facto standard for indicating that a colored terminal is supported and desired. IMO, one should be aware of how the software they use is affecting their environment and the kinds of repercussions these changes may have. This is hardly the first bit of software that respects COLORTERM, and it surely won't be the last (in general... no specific plans here). =( From owner-svn-src-stable@freebsd.org Wed Aug 15 17:36:28 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3F601069EFB; Wed, 15 Aug 2018 17:36:27 +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 5E43B70A45; Wed, 15 Aug 2018 17:36:27 +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 w7FHaPrU048872; Wed, 15 Aug 2018 10:36:25 -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 w7FHaPiw048871; Wed, 15 Aug 2018 10:36:25 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201808151736.w7FHaPiw048871@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r337826 - stable/11/bin/ls In-Reply-To: To: Kyle Evans Date: Wed, 15 Aug 2018 10:36:25 -0700 (PDT) CC: "Rodney W. Grimes" , Ed Maste , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@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-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 17:36:28 -0000 > On Wed, Aug 15, 2018 at 11:07 AM, Rodney W. Grimes > wrote: > > [ Charset UTF-8 unsupported, converting... ] > >> On 14 August 2018 at 21:41, Rodney W. Grimes > >> wrote: > >> >> Author: kevans > >> >> Date: Wed Aug 15 01:29:02 2018 > >> >> New Revision: 337826 > >> >> URL: https://svnweb.freebsd.org/changeset/base/337826 > >> >> > >> >> Log: > >> >> MFC r337506: ls(1): Enable colors with COLORTERM is set in the environment > >> >> > >> >> COLORTERM is the de facto standard, while CLICOLOR is generally specific to > >> >> FreeBSD and ls(1). > >> > > >> > I have already seen one "Who enabled %&*@(#$@) colored ls output in 12?" > >> > Seems that the defaults for xfce terminal is to have COLORTERM. > >> > >> If xfce's default is to request colour via the de-facto environment > >> variable then we should generally honour it -- the answer to the > >> %&*@(#$@) question is "you did, via your terminal's default." > > > > And I pointed that out to them, but it is kinda a POLA, people have > > had to take explicit action to get colorls, that is no longer true > > and that suprises them when they see it. > > > > I find the POLA angle kind-of hard to buy, though. Nothing in the base > system offers a way for the default behavior of ls(1) to be altered, > and this whole change is only honoring a de-facto standard for > indicating that a colored terminal is supported and desired. > > IMO, one should be aware of how the software they use is affecting > their environment and the kinds of repercussions these changes may > have. This is hardly the first bit of software that respects > COLORTERM, and it surely won't be the last (in general... no specific > plans here). =( You can say it isnt a POLA, but the user was asstonished when it happened and made the comment, hence forth, it is POLA. Personally, I dont care, I do not use xfce's default terminal, I specificially invoke xterm. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-stable@freebsd.org Wed Aug 15 17:37:45 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97B4F1069FB1 for ; Wed, 15 Aug 2018 17:37:45 +0000 (UTC) (envelope-from adamw@adamw.org) Received: from mail-yw1-xc2a.google.com (mail-yw1-xc2a.google.com [IPv6:2607:f8b0:4864:20::c2a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3995E70BAF for ; Wed, 15 Aug 2018 17:37:45 +0000 (UTC) (envelope-from adamw@adamw.org) Received: by mail-yw1-xc2a.google.com with SMTP id l9-v6so1391087ywc.11 for ; Wed, 15 Aug 2018 10:37:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adamw-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2o/D6NVOXAM/8mEYxoD28JjGviFQGRDibWQuQFfxxcc=; b=oOEJCZmSNIMxbI6aUuwLJr7q1c4vXPrNdmGvcSbR1o2z3mnxIYZ42Cm8oC0ygTNhm/ 1i7KeGO4jSaapgPABwQGUKzzY4zVoNpRs/LSPN+ohIXOjENl5wE5GZ8MnBdfqOgWbTaF GaKEALS0tygEi/inzk/bayE8AJDPPFbil3fXRi4NQ/DHbHadtsT6r1fueJCl4PApTNsD f2LbkyMsb5IUNNUYP7lFmITmMSk9sE0HIesaqx1wvJOsAY4YRIhSwMPdk4i+AzuCpp3c twNTO2fjzua8LgwH/6jRPoz/eAulrR5IPN6GUrxpDjJJECHPNGysly8olLf3RyQRtSUu jfmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2o/D6NVOXAM/8mEYxoD28JjGviFQGRDibWQuQFfxxcc=; b=G2sxwBFq83ND8eGHR4tyQFTBB/ty7rnw5abFxhHA7cumdqfEy+ukvTpPSd09bJsxHk jTtNcAwJvDgmBUc/amYAmlYg8F0sA1PZ4Kw+vF5QaKltmHeNWXfX6JhH661u+MJHvm26 2GsOni0Pt1coBPQGLZYga08bOdoVbdmDcnKgPF2moeKWtjOinaZJiIGOVnsV3ZMt+vLq BcW/AYQpThW8zQfge/8Z6dzgXp2LD9vA5RcabH3IFVQcCB0yTGF0u7dKGQ4CJP5+BhpV 5iM+yZekCPA+yveKS9HR75fud/SubeHoRJZMAodD5AgAqTVyT+bqT/YPbTzgqES8UrTL 8CMw== X-Gm-Message-State: AOUpUlG6jG2Ot+vB7WTKLqhc8ALKnr5UPozrJovAGOQgmy+Rp9MFOdgl ulgaTqvpIgGKn29eabaLMlqEpTAbMm+PbVac1h9RmA== X-Google-Smtp-Source: AA+uWPzNr0v3ahHAgKkEV0YkOjBAeNB3jimuDR9WH+1hxerJdSSWAWybq7eAyXKFmHstMvWs4BaLIj0LqwrZQyemLoQ= X-Received: by 2002:a25:61cd:: with SMTP id v196-v6mr14574516ybb.246.1534354664537; Wed, 15 Aug 2018 10:37:44 -0700 (PDT) MIME-Version: 1.0 References: <201808151607.w7FG7Smo048317@pdx.rh.CN85.dnsmgr.net> In-Reply-To: From: Adam Weinberger Date: Wed, 15 Aug 2018 11:37:28 -0600 Message-ID: Subject: Re: svn commit: r337826 - stable/11/bin/ls To: kevans@freebsd.org Cc: rgrimes@freebsd.org, svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, emaste@freebsd.org, svn-src-stable-11@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 17:37:45 -0000 On Wed, Aug 15, 2018 at 11:31 AM Kyle Evans wrote: > > On Wed, Aug 15, 2018 at 11:07 AM, Rodney W. Grimes > wrote: > > [ Charset UTF-8 unsupported, converting... ] > >> On 14 August 2018 at 21:41, Rodney W. Grimes > >> wrote: > >> >> Author: kevans > >> >> Date: Wed Aug 15 01:29:02 2018 > >> >> New Revision: 337826 > >> >> URL: https://svnweb.freebsd.org/changeset/base/337826 > >> >> > >> >> Log: > >> >> MFC r337506: ls(1): Enable colors with COLORTERM is set in the environment > >> >> > >> >> COLORTERM is the de facto standard, while CLICOLOR is generally specific to > >> >> FreeBSD and ls(1). > >> > > >> > I have already seen one "Who enabled %&*@(#$@) colored ls output in 12?" > >> > Seems that the defaults for xfce terminal is to have COLORTERM. > >> > >> If xfce's default is to request colour via the de-facto environment > >> variable then we should generally honour it -- the answer to the > >> %&*@(#$@) question is "you did, via your terminal's default." > > > > And I pointed that out to them, but it is kinda a POLA, people have > > had to take explicit action to get colorls, that is no longer true > > and that suprises them when they see it. > > > > I find the POLA angle kind-of hard to buy, though. Nothing in the base > system offers a way for the default behavior of ls(1) to be altered, > and this whole change is only honoring a de-facto standard for > indicating that a colored terminal is supported and desired. > > IMO, one should be aware of how the software they use is affecting > their environment and the kinds of repercussions these changes may > have. This is hardly the first bit of software that respects > COLORTERM, and it surely won't be the last (in general... no specific > plans here). =( Respecting the same env var that other OS's do seems like a reduction in POLA. Please consider putting a note in one or more of /usr/src/UPDATING, /usr/ports/UPDATING, and xfce/pkg-message explaining the change and what people should do to get the old behaviour. They're the best tools we have for improving POLA. # Adam -- Adam Weinberger adamw@adamw.org https://www.adamw.org From owner-svn-src-stable@freebsd.org Wed Aug 15 17:43:14 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE71D106A2D4; Wed, 15 Aug 2018 17:43: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 583867113A; Wed, 15 Aug 2018 17:43: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 w7FHhBOm048919; Wed, 15 Aug 2018 10:43: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 w7FHhBT9048918; Wed, 15 Aug 2018 10:43:11 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201808151743.w7FHhBT9048918@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r337826 - stable/11/bin/ls In-Reply-To: To: Adam Weinberger Date: Wed, 15 Aug 2018 10:43:11 -0700 (PDT) CC: kevans@freebsd.org, rgrimes@freebsd.org, svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, emaste@freebsd.org, svn-src-stable-11@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-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 17:43:14 -0000 [ Charset UTF-8 unsupported, converting... ] > On Wed, Aug 15, 2018 at 11:31 AM Kyle Evans wrote: > > > > On Wed, Aug 15, 2018 at 11:07 AM, Rodney W. Grimes > > wrote: > > > [ Charset UTF-8 unsupported, converting... ] > > >> On 14 August 2018 at 21:41, Rodney W. Grimes > > >> wrote: > > >> >> Author: kevans > > >> >> Date: Wed Aug 15 01:29:02 2018 > > >> >> New Revision: 337826 > > >> >> URL: https://svnweb.freebsd.org/changeset/base/337826 > > >> >> > > >> >> Log: > > >> >> MFC r337506: ls(1): Enable colors with COLORTERM is set in the environment > > >> >> > > >> >> COLORTERM is the de facto standard, while CLICOLOR is generally specific to > > >> >> FreeBSD and ls(1). > > >> > > > >> > I have already seen one "Who enabled %&*@(#$@) colored ls output in 12?" > > >> > Seems that the defaults for xfce terminal is to have COLORTERM. > > >> > > >> If xfce's default is to request colour via the de-facto environment > > >> variable then we should generally honour it -- the answer to the > > >> %&*@(#$@) question is "you did, via your terminal's default." > > > > > > And I pointed that out to them, but it is kinda a POLA, people have > > > had to take explicit action to get colorls, that is no longer true > > > and that suprises them when they see it. > > > > > > > I find the POLA angle kind-of hard to buy, though. Nothing in the base > > system offers a way for the default behavior of ls(1) to be altered, > > and this whole change is only honoring a de-facto standard for > > indicating that a colored terminal is supported and desired. > > > > IMO, one should be aware of how the software they use is affecting > > their environment and the kinds of repercussions these changes may > > have. This is hardly the first bit of software that respects > > COLORTERM, and it surely won't be the last (in general... no specific > > plans here). =( > > Respecting the same env var that other OS's do seems like a reduction in POLA. > > Please consider putting a note in one or more of /usr/src/UPDATING, > /usr/ports/UPDATING, and xfce/pkg-message explaining the change and > what people should do to get the old behaviour. They're the best tools > we have for improving POLA. >From the Linux man page at: http://man7.org/linux/man-pages/man1/ls.1.html Using color to distinguish file types is disabled both by default and with --color=never. With --color=auto, ls emits color codes only when standard output is connected to a terminal. The LS_COLORS environment variable can change the settings. Use the dircolors command to set it. Um, so by default we should not be doing any colour... and we are... > > # Adam > > > -- > Adam Weinberger > adamw@adamw.org > https://www.adamw.org > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-stable@freebsd.org Wed Aug 15 17:44:33 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 903FF106A365 for ; Wed, 15 Aug 2018 17:44:33 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2r.ore.mailhop.org (outbound2r.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 1B92771292 for ; Wed, 15 Aug 2018 17:44:32 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: d8d88d2a-a0b2-11e8-904b-1d2e466b3c59 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound2.ore.mailhop.org (Halon) with ESMTPSA id d8d88d2a-a0b2-11e8-904b-1d2e466b3c59; Wed, 15 Aug 2018 17:44:24 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w7FHiNww075553; Wed, 15 Aug 2018 11:44:23 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1534355063.1466.6.camel@freebsd.org> Subject: Re: svn commit: r337826 - stable/11/bin/ls From: Ian Lepore To: rgrimes@freebsd.org, Kyle Evans Cc: Ed Maste , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Date: Wed, 15 Aug 2018 11:44:23 -0600 In-Reply-To: <201808151736.w7FHaPiw048871@pdx.rh.CN85.dnsmgr.net> References: <201808151736.w7FHaPiw048871@pdx.rh.CN85.dnsmgr.net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 17:44:33 -0000 On Wed, 2018-08-15 at 10:36 -0700, Rodney W. Grimes wrote: > > > > On Wed, Aug 15, 2018 at 11:07 AM, Rodney W. Grimes > > wrote: > > > > > > [ Charset UTF-8 unsupported, converting... ] > > > > > > > > On 14 August 2018 at 21:41, Rodney W. Grimes > > > > wrote: > > > > > > > > > > > > > > > > > Author: kevans > > > > > > Date: Wed Aug 15 01:29:02 2018 > > > > > > New Revision: 337826 > > > > > > URL: https://svnweb.freebsd.org/changeset/base/337826 > > > > > > > > > > > > Log: > > > > > >   MFC r337506: ls(1): Enable colors with COLORTERM is set > > > > > > in the environment > > > > > > > > > > > >   COLORTERM is the de facto standard, while CLICOLOR is > > > > > > generally specific to > > > > > >   FreeBSD and ls(1). > > > > > I have already seen one "Who enabled %&*@(#$@) colored ls > > > > > output in 12?" > > > > > Seems that the defaults for xfce terminal is to have > > > > > COLORTERM. > > > > If xfce's default is to request colour via the de-facto > > > > environment > > > > variable then we should generally honour it -- the answer to > > > > the > > > > %&*@(#$@) question is "you did, via your terminal's default." > > > And I pointed that out to them, but it is kinda a POLA, people > > > have > > > had to take explicit action to get colorls, that is no longer > > > true > > > and that suprises them when they see it. > > > > > I find the POLA angle kind-of hard to buy, though. Nothing in the > > base > > system offers a way for the default behavior of ls(1) to be > > altered, > > and this whole change is only honoring a de-facto standard for > > indicating that a colored terminal is supported and desired. > > > > IMO, one should be aware of how the software they use is affecting > > their environment and the kinds of repercussions these changes may > > have. This is hardly the first bit of software that respects > > COLORTERM, and it surely won't be the last (in general... no > > specific > > plans here). =( > You can say it isnt a POLA, but the user was asstonished when it > happened and made the comment, hence forth, it is POLA. > > Personally, I dont care, I do not use xfce's default terminal, > I specificially invoke xterm. > I would expect the thing that would lead to the most astonishment by most users would be "Even though I (or my shell) set COLORTERM, nothing in freebsd respects that and I still have to turn 18 other knobs to get color support from standard utilities." There's not much I hate more than colored output in my preferred black- on-white terminal windows, but having to enable or disable that support in multiple places is the kind of thing that would rank right up there. -- Ian From owner-svn-src-stable@freebsd.org Wed Aug 15 18:18:13 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B43F8106B132; Wed, 15 Aug 2018 18:18:13 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 644A87253F; Wed, 15 Aug 2018 18:18:13 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 00FC316673; Wed, 15 Aug 2018 18:18:12 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lf1-f48.google.com with SMTP id n96-v6so1532562lfi.1; Wed, 15 Aug 2018 11:18:12 -0700 (PDT) X-Gm-Message-State: AOUpUlHirp9HA18wPIRRxvJWYdgS/N2E5N+Yx94CS3zZm4kW6VPBBEFw BBvPiwMzUTcziRgMMWvF68PXcpn8JU1VWEPn7gI= X-Google-Smtp-Source: AA+uWPwvAJp1gdp1wEZS5RfyK8iY30O80onWy50Gz664qcQ6/hT2zPoIz3kKWjX/vSabKvcr90OcnVpSHB5a7REXUBg= X-Received: by 2002:a19:26d2:: with SMTP id m201-v6mr16642582lfm.43.1534357091599; Wed, 15 Aug 2018 11:18:11 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:5742:0:0:0:0:0 with HTTP; Wed, 15 Aug 2018 11:17:50 -0700 (PDT) In-Reply-To: <201808151743.w7FHhBT9048918@pdx.rh.CN85.dnsmgr.net> References: <201808151743.w7FHhBT9048918@pdx.rh.CN85.dnsmgr.net> From: Kyle Evans Date: Wed, 15 Aug 2018 13:17:50 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r337826 - stable/11/bin/ls To: "Rodney W. Grimes" Cc: Adam Weinberger , Kyle Evans , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers , Ed Maste , svn-src-stable-11@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 18:18:13 -0000 On Wed, Aug 15, 2018 at 12:43 PM, Rodney W. Grimes wrote: > > From the Linux man page at: http://man7.org/linux/man-pages/man1/ls.1.html > > Using color to distinguish file types is disabled both by default and > with --color=never. With --color=auto, ls emits color codes only > when standard output is connected to a terminal. The LS_COLORS > environment variable can change the settings. Use the dircolors > command to set it. > > Um, so by default we should not be doing any colour... and we are... > I don't recall making any argument that we're trying to match GNU ls(1) behavior. Furthermore, again, we aren't doing any color by default- only when the COLORTERM environment variable is set. ls(1) on FreeBSD historically honors -an- environment variable for enabling color. This environment variable is CLICOLOR. This commit switched the environment variable honored to the more-standard COLORTERM that is honored in other software and set by terminals that are generally expected to be used with color. I'm writing an UPDATING entry for this now to notify these users that they should remove COLORTERM from their environment if they do not, in fact, want a colored terminal. From owner-svn-src-stable@freebsd.org Wed Aug 15 19:35:00 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35739106DD38; Wed, 15 Aug 2018 19:35:00 +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 C072876C73; Wed, 15 Aug 2018 19:34:49 +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 w7FJYlf4049358; Wed, 15 Aug 2018 12:34:47 -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 w7FJYloG049357; Wed, 15 Aug 2018 12:34:47 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201808151934.w7FJYloG049357@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r337826 - stable/11/bin/ls In-Reply-To: To: Kyle Evans Date: Wed, 15 Aug 2018 12:34:47 -0700 (PDT) CC: "Rodney W. Grimes" , Adam Weinberger , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers , Ed Maste , svn-src-stable-11@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-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 19:35:01 -0000 [ Charset UTF-8 unsupported, converting... ] > On Wed, Aug 15, 2018 at 12:43 PM, Rodney W. Grimes > wrote: > > > > From the Linux man page at: http://man7.org/linux/man-pages/man1/ls.1.html > > > > Using color to distinguish file types is disabled both by default and > > with --color=never. With --color=auto, ls emits color codes only > > when standard output is connected to a terminal. The LS_COLORS > > environment variable can change the settings. Use the dircolors > > command to set it. > > > > Um, so by default we should not be doing any colour... and we are... > > > > I don't recall making any argument that we're trying to match GNU > ls(1) behavior. Furthermore, again, we aren't doing any color by > default- only when the COLORTERM environment variable is set. So we are intentially being different? > > ls(1) on FreeBSD historically honors -an- environment variable for > enabling color. Short history, long history it had no color support at all. > This environment variable is CLICOLOR. This commit > switched the environment variable honored to the more-standard > COLORTERM that is honored in other software and set by terminals that > are generally expected to be used with color. > > I'm writing an UPDATING entry for this now to notify these users that > they should remove COLORTERM from their environment if they do not, in > fact, want a colored terminal. Is that the only way to turn this off? That may not be desired either. Atleast GNU ls allows me to force it off on command invocation with --color=never, do we have an equivelent? -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-stable@freebsd.org Wed Aug 15 19:43:24 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C80F106E39B; Wed, 15 Aug 2018 19:43:24 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3D3F17789C; Wed, 15 Aug 2018 19:43:24 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id D157E16F94; Wed, 15 Aug 2018 19:43:23 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lf1-f51.google.com with SMTP id j143-v6so1675786lfj.12; Wed, 15 Aug 2018 12:43:23 -0700 (PDT) X-Gm-Message-State: AOUpUlEtxO6dn4KE16yKKYkf2il5bkoWvovtBfvJ49te+Hj3GJNzSjCp /qGDIvz84ltHbTqTyTFNGV+KyU6GxeI9jpLJ6Ac= X-Google-Smtp-Source: AA+uWPxa/0EFpNztpA2qi+/hp/ijaTpRtC2yb+Ogp7fulgNIXuaCGeKwC0Opas/K6xej3i/OwweWzhvgD6QYiPtNr8E= X-Received: by 2002:a19:ded7:: with SMTP id i84-v6mr2082353lfl.146.1534362202493; Wed, 15 Aug 2018 12:43:22 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:5742:0:0:0:0:0 with HTTP; Wed, 15 Aug 2018 12:43:01 -0700 (PDT) In-Reply-To: <201808151934.w7FJYloG049357@pdx.rh.CN85.dnsmgr.net> References: <201808151934.w7FJYloG049357@pdx.rh.CN85.dnsmgr.net> From: Kyle Evans Date: Wed, 15 Aug 2018 14:43:01 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r337826 - stable/11/bin/ls To: "Rodney W. Grimes" Cc: Adam Weinberger , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers , Ed Maste , svn-src-stable-11@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 19:43:24 -0000 On Wed, Aug 15, 2018 at 2:34 PM, Rodney W. Grimes wrote: > [ Charset UTF-8 unsupported, converting... ] >> On Wed, Aug 15, 2018 at 12:43 PM, Rodney W. Grimes >> wrote: >> > >> > From the Linux man page at: http://man7.org/linux/man-pages/man1/ls.1.html >> > >> > Using color to distinguish file types is disabled both by default and >> > with --color=never. With --color=auto, ls emits color codes only >> > when standard output is connected to a terminal. The LS_COLORS >> > environment variable can change the settings. Use the dircolors >> > command to set it. >> > >> > Um, so by default we should not be doing any colour... and we are... >> > >> >> I don't recall making any argument that we're trying to match GNU >> ls(1) behavior. Furthermore, again, we aren't doing any color by >> default- only when the COLORTERM environment variable is set. > > So we are intentially being different? > No, we are not intentionally being different. See: the next paragraph, where I described that we've now-historically been honoring an environment variable for this and have simply added a more standard name for this variable. >> >> ls(1) on FreeBSD historically honors -an- environment variable for >> enabling color. > > Short history, long history it had no color support at all. Color support in ls(1) is now old enough to drink having been introduced in 2000- I think that's long enough to call it "historically" here in 2018. > >> This environment variable is CLICOLOR. This commit >> switched the environment variable honored to the more-standard >> COLORTERM that is honored in other software and set by terminals that >> are generally expected to be used with color. >> >> I'm writing an UPDATING entry for this now to notify these users that >> they should remove COLORTERM from their environment if they do not, in >> fact, want a colored terminal. > > Is that the only way to turn this off? > That may not be desired either. > Atleast GNU ls allows me to force it off on command invocation > with --color=never, do we have an equivelent? > Sure- it gets turned off the same way it got turned on. =) I'm certainly not averse to adding a --color long option, and will do so when I find the time (later today, most likely). Thanks, Kyle Evans From owner-svn-src-stable@freebsd.org Wed Aug 15 19:55:04 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6CA1E106E83A; Wed, 15 Aug 2018 19:55:04 +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 ED57C7818C; Wed, 15 Aug 2018 19:55:03 +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 w7FJt2CV049461; Wed, 15 Aug 2018 12:55: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 w7FJt2Bk049460; Wed, 15 Aug 2018 12:55:02 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201808151955.w7FJt2Bk049460@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r337826 - stable/11/bin/ls In-Reply-To: To: Kyle Evans Date: Wed, 15 Aug 2018 12:55:02 -0700 (PDT) CC: "Rodney W. Grimes" , Adam Weinberger , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers , Ed Maste , svn-src-stable-11@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-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 19:55:04 -0000 > On Wed, Aug 15, 2018 at 2:34 PM, Rodney W. Grimes > wrote: > > [ Charset UTF-8 unsupported, converting... ] > >> On Wed, Aug 15, 2018 at 12:43 PM, Rodney W. Grimes > >> wrote: > >> > > >> > From the Linux man page at: http://man7.org/linux/man-pages/man1/ls.1.html > >> > > >> > Using color to distinguish file types is disabled both by default and > >> > with --color=never. With --color=auto, ls emits color codes only > >> > when standard output is connected to a terminal. The LS_COLORS > >> > environment variable can change the settings. Use the dircolors > >> > command to set it. > >> > > >> > Um, so by default we should not be doing any colour... and we are... > >> > > >> > >> I don't recall making any argument that we're trying to match GNU > >> ls(1) behavior. Furthermore, again, we aren't doing any color by > >> default- only when the COLORTERM environment variable is set. > > > > So we are intentially being different? > > > > No, we are not intentionally being different. See: the next paragraph, > where I described that we've now-historically been honoring an > environment variable for this and have simply added a more standard > name for this variable. And one that is set by default many more places than the one that had been set before, changing behavior people have been seeing for a long time, and some of those people did not expect that, nor seem to want it either. > > >> > >> ls(1) on FreeBSD historically honors -an- environment variable for > >> enabling color. > > > > Short history, long history it had no color support at all. > > Color support in ls(1) is now old enough to drink having been > introduced in 2000- I think that's long enough to call it > "historically" here in 2018. ok, but for 25 years that ls has output in b&w even in a colour terminal unless I took action to make it color output. > >> This environment variable is CLICOLOR. This commit > >> switched the environment variable honored to the more-standard > >> COLORTERM that is honored in other software and set by terminals that > >> are generally expected to be used with color. > >> > >> I'm writing an UPDATING entry for this now to notify these users that > >> they should remove COLORTERM from their environment if they do not, in > >> fact, want a colored terminal. > > > > Is that the only way to turn this off? > > That may not be desired either. > > Atleast GNU ls allows me to force it off on command invocation > > with --color=never, do we have an equivelent? > > > > Sure- it gets turned off the same way it got turned on. =) Well, it now gets turned on when it was not turned on before, and as is I now have to completly decolor to decolor ls(1), I have no easy knob to turn off colorls only. > I'm > certainly not averse to adding a --color long option, and will do so > when I find the time (later today, most likely). That would help, atleast the annoyed can alias ls ls --color=never. NB: from the GNU ls documentation there is a significant performance impact with having colorls turned on as you now have to stat every file in a directory listing. Is this also true of the BSD colorls? > Thanks, > Kyle Evans -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-stable@freebsd.org Wed Aug 15 20:18:23 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 879AF106EF8F; Wed, 15 Aug 2018 20:18:23 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2A7BC790E4; Wed, 15 Aug 2018 20:18:23 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id B72AF1728A; Wed, 15 Aug 2018 20:18:22 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lf1-f43.google.com with SMTP id f18-v6so1770796lfc.2; Wed, 15 Aug 2018 13:18:22 -0700 (PDT) X-Gm-Message-State: AOUpUlFQxR1I2RqzAHqhv++l6sF595bDQDK+d9qSzYCzWeHTmBzransg t4iTZMY1tZKcQCiP5DRjTB3rzpQuYKBGkMwSbSc= X-Google-Smtp-Source: AA+uWPxDjd1q+eTbNlCJdpeIZ8b9K6JW8zsExnEsMHKg9hJGSo5OMszJsgVH9V2q9vUmZFyJ0K4pyhHshfuDaBmvqbA= X-Received: by 2002:a19:be54:: with SMTP id o81-v6mr1917068lff.31.1534364301247; Wed, 15 Aug 2018 13:18:21 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:5742:0:0:0:0:0 with HTTP; Wed, 15 Aug 2018 13:18:00 -0700 (PDT) In-Reply-To: <201808151955.w7FJt2Bk049460@pdx.rh.CN85.dnsmgr.net> References: <201808151955.w7FJt2Bk049460@pdx.rh.CN85.dnsmgr.net> From: Kyle Evans Date: Wed, 15 Aug 2018 15:18:00 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r337826 - stable/11/bin/ls To: "Rodney W. Grimes" Cc: Adam Weinberger , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers , Ed Maste , svn-src-stable-11@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 20:18:23 -0000 On Wed, Aug 15, 2018 at 2:55 PM, Rodney W. Grimes wrote: >> On Wed, Aug 15, 2018 at 2:34 PM, Rodney W. Grimes >> wrote: >> > [ Charset UTF-8 unsupported, converting... ] >> >> On Wed, Aug 15, 2018 at 12:43 PM, Rodney W. Grimes >> >> wrote: >> >> > >> >> > From the Linux man page at: http://man7.org/linux/man-pages/man1/ls.1.html >> >> > >> >> > Using color to distinguish file types is disabled both by default and >> >> > with --color=never. With --color=auto, ls emits color codes only >> >> > when standard output is connected to a terminal. The LS_COLORS >> >> > environment variable can change the settings. Use the dircolors >> >> > command to set it. >> >> > >> >> > Um, so by default we should not be doing any colour... and we are... >> >> > >> >> >> >> I don't recall making any argument that we're trying to match GNU >> >> ls(1) behavior. Furthermore, again, we aren't doing any color by >> >> default- only when the COLORTERM environment variable is set. >> > >> > So we are intentially being different? >> > >> >> No, we are not intentionally being different. See: the next paragraph, >> where I described that we've now-historically been honoring an >> environment variable for this and have simply added a more standard >> name for this variable. > > And one that is set by default many more places than the one that > had been set before, changing behavior people have been seeing for > a long time, and some of those people did not expect that, > nor seem to want it either. Will backing out the MFC and leaving this a 12.0 feature end this? =( Many changes we make fit the same same description that you just wrote, perhaps with "many many more places" replaced with "". Standardization is hard to argue against, leaving one knob to turn everything off or on and not having to have a profile full of: LSCOLORS=yes; export LSCOLORS GREPCOLORS=yes; export GREPCOLORS DPVCOLORS=yes; export DPVCOLORS ... I would hazard a guess that most people err to one side or the other: all the colors or none of the colors. >> >> >> >> >> ls(1) on FreeBSD historically honors -an- environment variable for >> >> enabling color. >> > >> > Short history, long history it had no color support at all. >> >> Color support in ls(1) is now old enough to drink having been >> introduced in 2000- I think that's long enough to call it >> "historically" here in 2018. > > ok, but for 25 years that ls has output in b&w even in > a colour terminal unless I took action to make it color output. And still, with a base FreeBSD install, you take action to make it color output. Some third party software claims COLORTERM for you, and you should be aware if this is the case. Not all color terminals will set COLORTERM for you. >> >> This environment variable is CLICOLOR. This commit >> >> switched the environment variable honored to the more-standard >> >> COLORTERM that is honored in other software and set by terminals that >> >> are generally expected to be used with color. >> >> >> >> I'm writing an UPDATING entry for this now to notify these users that >> >> they should remove COLORTERM from their environment if they do not, in >> >> fact, want a colored terminal. >> > >> > Is that the only way to turn this off? >> > That may not be desired either. >> > Atleast GNU ls allows me to force it off on command invocation >> > with --color=never, do we have an equivelent? >> > >> >> Sure- it gets turned off the same way it got turned on. =) > > Well, it now gets turned on when it was not turned on before, > and as is I now have to completly decolor to decolor ls(1), > I have no easy knob to turn off colorls only. > >> I'm >> certainly not averse to adding a --color long option, and will do so >> when I find the time (later today, most likely). > > That would help, atleast the annoyed can alias ls ls --color=never. > Ok > NB: from the GNU ls documentation there is a significant performance > impact with having colorls turned on as you now have to stat every > file in a directory listing. Is this also true of the BSD colorls? > No clue. From owner-svn-src-stable@freebsd.org Wed Aug 15 20:26:25 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B122E106F41E; Wed, 15 Aug 2018 20:26:25 +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 153047990B; Wed, 15 Aug 2018 20:26: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 w7FKQG8g049628; Wed, 15 Aug 2018 13:26: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 w7FKQGBN049627; Wed, 15 Aug 2018 13:26:16 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201808152026.w7FKQGBN049627@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r337826 - stable/11/bin/ls In-Reply-To: To: Kyle Evans Date: Wed, 15 Aug 2018 13:26:16 -0700 (PDT) CC: "Rodney W. Grimes" , Adam Weinberger , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers , Ed Maste , svn-src-stable-11@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-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 20:26:25 -0000 [ Charset UTF-8 unsupported, converting... ] > On Wed, Aug 15, 2018 at 2:55 PM, Rodney W. Grimes > wrote: > >> On Wed, Aug 15, 2018 at 2:34 PM, Rodney W. Grimes > >> wrote: > >> > [ Charset UTF-8 unsupported, converting... ] > >> >> On Wed, Aug 15, 2018 at 12:43 PM, Rodney W. Grimes > >> >> wrote: > >> >> > > >> >> > From the Linux man page at: http://man7.org/linux/man-pages/man1/ls.1.html > >> >> > > >> >> > Using color to distinguish file types is disabled both by default and > >> >> > with --color=never. With --color=auto, ls emits color codes only > >> >> > when standard output is connected to a terminal. The LS_COLORS > >> >> > environment variable can change the settings. Use the dircolors > >> >> > command to set it. > >> >> > > >> >> > Um, so by default we should not be doing any colour... and we are... > >> >> > > >> >> > >> >> I don't recall making any argument that we're trying to match GNU > >> >> ls(1) behavior. Furthermore, again, we aren't doing any color by > >> >> default- only when the COLORTERM environment variable is set. > >> > > >> > So we are intentially being different? > >> > > >> > >> No, we are not intentionally being different. See: the next paragraph, > >> where I described that we've now-historically been honoring an > >> environment variable for this and have simply added a more standard > >> name for this variable. > > > > And one that is set by default many more places than the one that > > had been set before, changing behavior people have been seeing for > > a long time, and some of those people did not expect that, > > nor seem to want it either. > > Will backing out the MFC and leaving this a 12.0 feature end this? =( Sadly no, as the person responded with that reaction when they installed 12.0-ALPHA :-(. > Many changes we make fit the same same description that you just > wrote, perhaps with "many many more places" replaced with "". > Standardization is hard to argue against, leaving one knob to turn > everything off or on and not having to have a profile full of: > > LSCOLORS=yes; export LSCOLORS > GREPCOLORS=yes; export GREPCOLORS > DPVCOLORS=yes; export DPVCOLORS > ... > > I would hazard a guess that most people err to one side or the other: > all the colors or none of the colors. Yes, and probably those people have figured out how to turn on all the colour stuff, so this has little to no effect on them, it does however effect the people who have intentionally turned off colors, it now suddenly pops on, and they are now having to do something like your list above to disable more and more color things. It is a double edge sword, I can see neither side is right nor wrong, its just a mess. > >> >> ls(1) on FreeBSD historically honors -an- environment variable for > >> >> enabling color. > >> > > >> > Short history, long history it had no color support at all. > >> > >> Color support in ls(1) is now old enough to drink having been > >> introduced in 2000- I think that's long enough to call it > >> "historically" here in 2018. > > > > ok, but for 25 years that ls has output in b&w even in > > a colour terminal unless I took action to make it color output. > > And still, with a base FreeBSD install, you take action to make it > color output. Some third party software claims COLORTERM for you, and > you should be aware if this is the case. Not all color terminals will > set COLORTERM for you. > > >> >> This environment variable is CLICOLOR. This commit > >> >> switched the environment variable honored to the more-standard > >> >> COLORTERM that is honored in other software and set by terminals that > >> >> are generally expected to be used with color. > >> >> > >> >> I'm writing an UPDATING entry for this now to notify these users that > >> >> they should remove COLORTERM from their environment if they do not, in > >> >> fact, want a colored terminal. > >> > > >> > Is that the only way to turn this off? > >> > That may not be desired either. > >> > Atleast GNU ls allows me to force it off on command invocation > >> > with --color=never, do we have an equivelent? > >> > > >> > >> Sure- it gets turned off the same way it got turned on. =) > > > > Well, it now gets turned on when it was not turned on before, > > and as is I now have to completly decolor to decolor ls(1), > > I have no easy knob to turn off colorls only. > > > >> I'm > >> certainly not averse to adding a --color long option, and will do so > >> when I find the time (later today, most likely). > > > > That would help, atleast the annoyed can alias ls ls --color=never. > > > > Ok > > > NB: from the GNU ls documentation there is a significant performance > > impact with having colorls turned on as you now have to stat every > > file in a directory listing. Is this also true of the BSD colorls? > > > > No clue. We should probalby find out and document that. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-stable@freebsd.org Wed Aug 15 20:29:06 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B248E106F545 for ; Wed, 15 Aug 2018 20:29:06 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 28EE079B42 for ; Wed, 15 Aug 2018 20:29:06 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: d5f616cb-a0c9-11e8-93fa-f3ebd9db2b94 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound1.ore.mailhop.org (Halon) with ESMTPSA id d5f616cb-a0c9-11e8-93fa-f3ebd9db2b94; Wed, 15 Aug 2018 20:28:58 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w7FKSvXN075864; Wed, 15 Aug 2018 14:28:57 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1534364937.1466.11.camel@freebsd.org> Subject: Re: svn commit: r337826 - stable/11/bin/ls From: Ian Lepore To: rgrimes@freebsd.org, Kyle Evans Cc: Adam Weinberger , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers , Ed Maste , svn-src-stable-11@freebsd.org Date: Wed, 15 Aug 2018 14:28:57 -0600 In-Reply-To: <201808152026.w7FKQGBN049627@pdx.rh.CN85.dnsmgr.net> References: <201808152026.w7FKQGBN049627@pdx.rh.CN85.dnsmgr.net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 20:29:06 -0000 On Wed, 2018-08-15 at 13:26 -0700, Rodney W. Grimes wrote: > >  > > Will backing out the MFC and leaving this a 12.0 feature end this? > =( > > Sadly no, as the person responded with that reaction when > they installed 12.0-ALPHA :-(. So one whiner can demand of the project that any new feature be removed before a new release is made? -- Ian From owner-svn-src-stable@freebsd.org Wed Aug 15 20:32:56 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93EC3106F9C7 for ; Wed, 15 Aug 2018 20:32:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x22f.google.com (mail-io0-x22f.google.com [IPv6:2607:f8b0:4001:c06::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1CA157A177 for ; Wed, 15 Aug 2018 20:32:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x22f.google.com with SMTP id n18-v6so2063374ioa.9 for ; Wed, 15 Aug 2018 13:32:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=nEqTrIFP4brdYAS9pr7f2jo0HwUqN1ueqgl+/FyZ08Y=; b=OmzAuhd2frEt4sWqrAB/oVGYHWpcJ/iLeUc89tIcE3CvTEfqVr8VfrSfmxJlc0L8fc iTXXhbfRpjae7nbeDGm6pgfX6EzQv9K1u5j41Db/tYo1UdGFQ6MJE2sNG2g99PX24JuU rEkZTHnhLqHI4RMMeQIqG6Biy1+ZH3bSyKOeSILz02zbIrCndHkt6NyYsz2sergQ/mUF NvcOTckv2PASXrz9kfNGfH6lccUnccGXcctLlwQdCCP8ItkD8wMx+No6uis5doOA/th3 c7D6pEd7V6K4Cm8nuwZ9niYKpWtsiWP3Ys5hTxKV2KqzxuILiFIQDtKw3Bw5aDeCFMGW TFTg== 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=nEqTrIFP4brdYAS9pr7f2jo0HwUqN1ueqgl+/FyZ08Y=; b=e7vwNG8yha/8oXbxXubTl49grdFkopHiCKhHroQidrmz5sc8qnjA+Uay6tQHcWGsqI YV2dfxllfhgsUK2U8Hm7fN/8gcw7+YLfFIU5/TR3ocZQen79fWS0y4tOaiCZNdz2kUHs DaP6VqGDLIQDqseNwMYCO1RvpFGtoNm2z8Mcl5hH/tM/pgcW4AMoBoSIHjiJIZ00d/GJ wmUu+M3BKAOBuQeVuV6E3+KuBJpW6+KgPaFzG4ztag2l2wkAvaWiJht8Xsn7wTx9TXNi tZZ4H4aMmkxTnkLf2HDtc6Hv/Pw4XsPDRyAxiqsQMdaCR9kM/+IaIG2rUN/l4Vgu3VE6 03hg== X-Gm-Message-State: AOUpUlHfEuzi9q1VWe/WaF4U1niEBu/0a3V0zHyMD5W7CWBJDf0kMdmt l+S0b8+T0Awfnnm/giji8TUWDXVbvCR1v2RjrQcFIQ== X-Google-Smtp-Source: AA+uWPxncpHGiEwp831C4wF6yWFMOxZXDAiRz3pGvCDJJsN5Oh0ERdXBeVyIgImSuOx04wShTtVujtfoTea4OQmx1zM= X-Received: by 2002:a6b:3902:: with SMTP id g2-v6mr23588051ioa.168.1534365175174; Wed, 15 Aug 2018 13:32:55 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:257:0:0:0:0:0 with HTTP; Wed, 15 Aug 2018 13:32:54 -0700 (PDT) X-Originating-IP: [50.227.106.226] In-Reply-To: <1534364937.1466.11.camel@freebsd.org> References: <201808152026.w7FKQGBN049627@pdx.rh.CN85.dnsmgr.net> <1534364937.1466.11.camel@freebsd.org> From: Warner Losh Date: Wed, 15 Aug 2018 14:32:54 -0600 X-Google-Sender-Auth: HC8ODzl_HqIKtLYPGOjY9_i_WJc Message-ID: Subject: Re: svn commit: r337826 - stable/11/bin/ls To: Ian Lepore Cc: "Rodney W. Grimes" , Kyle Evans , Adam Weinberger , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers , Ed Maste , svn-src-stable-11@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 20:32:56 -0000 On Wed, Aug 15, 2018 at 2:28 PM, Ian Lepore wrote: > On Wed, 2018-08-15 at 13:26 -0700, Rodney W. Grimes wrote: > > > > > > Will backing out the MFC and leaving this a 12.0 feature end this? > > =( > > > > Sadly no, as the person responded with that reaction when > > they installed 12.0-ALPHA :-(. > > So one whiner can demand of the project that any new feature be removed > before a new release is made? > This is a good change. I don't see why people are so fussed about it... For people fighting colored environments a simple unsetenv COLORTERM seems to solve this problem no only on FreeBSD but for any other system they have access to... Warner From owner-svn-src-stable@freebsd.org Wed Aug 15 20:34:34 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EBC94106FACE; Wed, 15 Aug 2018 20:34:33 +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 6F9667A320; Wed, 15 Aug 2018 20:34:33 +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 w7FKYTm3049695; Wed, 15 Aug 2018 13:34:29 -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 w7FKYTss049694; Wed, 15 Aug 2018 13:34:29 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201808152034.w7FKYTss049694@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r337826 - stable/11/bin/ls In-Reply-To: <1534364937.1466.11.camel@freebsd.org> To: Ian Lepore Date: Wed, 15 Aug 2018 13:34:29 -0700 (PDT) CC: rgrimes@freebsd.org, Kyle Evans , Adam Weinberger , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers , Ed Maste , svn-src-stable-11@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-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 20:34:34 -0000 > On Wed, 2018-08-15 at 13:26 -0700, Rodney W. Grimes wrote: > > >? > > > Will backing out the MFC and leaving this a 12.0 feature end this? > > =( > > > > Sadly no, as the person responded with that reaction when > > they installed 12.0-ALPHA :-(. > > So one whiner can demand of the project that any new feature be removed > before a new release is made? Saddly our sample size is never reflective of the user base, any and all feedback from ANY user, one or one hundred should be considered. Most people have come to the point that they wont even say anything any more cause the FreeBSD developer community just ignores them, and that I hear from many more than 1. I doubt very many of the "user" base is running with this patch in place yet. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-stable@freebsd.org Wed Aug 15 20:43:01 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1CEE106FEFD for ; Wed, 15 Aug 2018 20:43:01 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC6CD7A904 for ; Wed, 15 Aug 2018 20:43:00 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: c40dc9b6-a0cb-11e8-aff6-0b9b8210da61 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound1.eu.mailhop.org (Halon) with ESMTPSA id c40dc9b6-a0cb-11e8-aff6-0b9b8210da61; Wed, 15 Aug 2018 20:42:47 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w7FKgkTh075908; Wed, 15 Aug 2018 14:42:46 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1534365765.1466.15.camel@freebsd.org> Subject: Re: svn commit: r337826 - stable/11/bin/ls From: Ian Lepore To: rgrimes@freebsd.org Cc: Kyle Evans , Adam Weinberger , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers , Ed Maste , svn-src-stable-11@freebsd.org Date: Wed, 15 Aug 2018 14:42:45 -0600 In-Reply-To: <201808152034.w7FKYTss049694@pdx.rh.CN85.dnsmgr.net> References: <201808152034.w7FKYTss049694@pdx.rh.CN85.dnsmgr.net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 20:43:01 -0000 On Wed, 2018-08-15 at 13:34 -0700, Rodney W. Grimes wrote: > > > > On Wed, 2018-08-15 at 13:26 -0700, Rodney W. Grimes wrote: > > > > > > > > > > > ? > > > > Will backing out the MFC and leaving this a 12.0 feature end > > > > this? > > > =( > > > > > > Sadly no, as the person responded with that reaction when > > > they installed 12.0-ALPHA :-(. > > So one whiner can demand of the project that any new feature be > > removed > > before a new release is made? > Saddly our sample size is never reflective of the user base, > any and all feedback from ANY user, one or one hundred should > be considered.  Most people have come to the point that they > wont even say anything any more cause the FreeBSD developer > community just ignores them, and that I hear from many more > than 1. > > I doubt very many of the "user" base is running with this > patch in place yet. > > If citing invisible armies of supporters is acceptable, it appears that any single person can in fact demand removal of something. -- Ian From owner-svn-src-stable@freebsd.org Wed Aug 15 20:48:16 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C56610700D0; Wed, 15 Aug 2018 20:48:16 +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 04F777AC0D; Wed, 15 Aug 2018 20:48:15 +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 w7FKmEus049853; Wed, 15 Aug 2018 13:48: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 w7FKmEDM049852; Wed, 15 Aug 2018 13:48:14 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201808152048.w7FKmEDM049852@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r337826 - stable/11/bin/ls In-Reply-To: <1534365765.1466.15.camel@freebsd.org> To: Ian Lepore Date: Wed, 15 Aug 2018 13:48:14 -0700 (PDT) CC: rgrimes@freebsd.org, Kyle Evans , Adam Weinberger , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers , Ed Maste , svn-src-stable-11@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-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 20:48:16 -0000 > On Wed, 2018-08-15 at 13:34 -0700, Rodney W. Grimes wrote: > > > > > > On Wed, 2018-08-15 at 13:26 -0700, Rodney W. Grimes wrote: > > > > > > > > > > > > > > ? > > > > > Will backing out the MFC and leaving this a 12.0 feature end > > > > > this? > > > > =( > > > > > > > > Sadly no, as the person responded with that reaction when > > > > they installed 12.0-ALPHA :-(. > > > So one whiner can demand of the project that any new feature be > > > removed > > > before a new release is made? > > Saddly our sample size is never reflective of the user base, > > any and all feedback from ANY user, one or one hundred should > > be considered.??Most people have come to the point that they > > wont even say anything any more cause the FreeBSD developer > > community just ignores them, and that I hear from many more > > than 1. > > > > I doubt very many of the "user" base is running with this > > patch in place yet. > > > > > > If citing invisible armies of supporters is acceptable, it appears that > any single person can in fact demand removal of something. No one is demanding any removal of anything here, your going very far off on that. I have how ever asked, and in one case Kyle has already said he would add --color= support, that we maintain some simbliance of compatibility with respect to knob turning. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-stable@freebsd.org Wed Aug 15 20:41:41 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03539106FE76; Wed, 15 Aug 2018 20:41:41 +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 843D97A76E; Wed, 15 Aug 2018 20:41:40 +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 w7FKfbhL049765; Wed, 15 Aug 2018 13:41:37 -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 w7FKfbCU049764; Wed, 15 Aug 2018 13:41:37 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201808152041.w7FKfbCU049764@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r337826 - stable/11/bin/ls In-Reply-To: To: Warner Losh Date: Wed, 15 Aug 2018 13:41:37 -0700 (PDT) CC: Ian Lepore , "Rodney W. Grimes" , Kyle Evans , Adam Weinberger , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers , Ed Maste , svn-src-stable-11@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-Mailman-Approved-At: Wed, 15 Aug 2018 20:50:32 +0000 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 20:41:41 -0000 > On Wed, Aug 15, 2018 at 2:28 PM, Ian Lepore wrote: > > > On Wed, 2018-08-15 at 13:26 -0700, Rodney W. Grimes wrote: > > > > > > > > Will backing out the MFC and leaving this a 12.0 feature end this? > > > =( > > > > > > Sadly no, as the person responded with that reaction when > > > they installed 12.0-ALPHA :-(. > > > > So one whiner can demand of the project that any new feature be removed > > before a new release is made? > > > > This is a good change. I don't see why people are so fussed about it... For > people fighting colored environments a simple unsetenv COLORTERM seems to > solve this problem no only on FreeBSD but for any other system they have > access to... This is exactly the dismissive attitude by FreeBSD developers that I was speaking to in my reply to Ian. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-stable@freebsd.org Wed Aug 15 21:35:08 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4354F107184F; Wed, 15 Aug 2018 21:35:08 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B00B07D6E6; Wed, 15 Aug 2018 21:35:07 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id w7FLYuvo041810 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 16 Aug 2018 00:34:59 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w7FLYuvo041810 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w7FLYu8J041809; Thu, 16 Aug 2018 00:34:56 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 16 Aug 2018 00:34:56 +0300 From: Konstantin Belousov To: rgrimes@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r337682 - in stable/11: share/mk tools/build/options usr.bin/ofed usr.bin/ofed/infiniband-diags Message-ID: <20180815213456.GD2340@kib.kiev.ua> References: <201808120845.w7C8jNQU027742@repo.freebsd.org> <201808121550.w7CFovDw033112@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201808121550.w7CFovDw033112@pdx.rh.CN85.dnsmgr.net> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 21:35:08 -0000 On Sun, Aug 12, 2018 at 08:50:57AM -0700, Rodney W. Grimes wrote: > > Author: kib > > Date: Sun Aug 12 08:45:23 2018 > > New Revision: 337682 > > URL: https://svnweb.freebsd.org/changeset/base/337682 > > > > Log: > > MFC r336569: > > Move mostly useless examples binaries from OFED, as well as the Subnet > > Manager, under the new option WITH_OFED_EXTRA, disabled by default. > > I never got a response on putting opensm out from under _EXTRA. I thought that I already answered. If no, sorry. I do not see much point in this split. Right now you get either nothing or everyting, the split allows to get nothing/libs/everything. I do not see allowing SM by a separate option to serve significant number of users to justify me spending several more days tinderboxing the change. If somebody else wants to do that, I have no objections. From owner-svn-src-stable@freebsd.org Wed Aug 15 21:36:41 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF02C10718DA; Wed, 15 Aug 2018 21:36:40 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 45F047D847; Wed, 15 Aug 2018 21:36:40 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id w7FLaUsw042972 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 16 Aug 2018 00:36:33 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w7FLaUsw042972 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w7FLaUTM042971; Thu, 16 Aug 2018 00:36:30 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 16 Aug 2018 00:36:30 +0300 From: Konstantin Belousov To: rgrimes@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r337682 - in stable/11: share/mk tools/build/options usr.bin/ofed usr.bin/ofed/infiniband-diags Message-ID: <20180815213629.GE2340@kib.kiev.ua> References: <201808120845.w7C8jNQU027742@repo.freebsd.org> <201808121554.w7CFsGXX033130@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201808121554.w7CFsGXX033130@pdx.rh.CN85.dnsmgr.net> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 21:36:41 -0000 On Sun, Aug 12, 2018 at 08:54:15AM -0700, Rodney W. Grimes wrote: > > Author: kib > > Date: Sun Aug 12 08:45:23 2018 > > New Revision: 337682 > > URL: https://svnweb.freebsd.org/changeset/base/337682 > > > > Log: > > MFC r336569: > > Move mostly useless examples binaries from OFED, as well as the Subnet > > Manager, under the new option WITH_OFED_EXTRA, disabled by default. > > > > Added: > > stable/11/tools/build/options/WITH_OFED_EXTRA > > - copied unchanged from r336569, head/tools/build/options/WITH_OFED_EXTRA > > This is also now kinda a POLA issue for those who have been building > on stable/11 with just OFED defined, on our next builds a bunch of > stuff is gona go missing. The needs an UPDATING entry, and defanitly a > > ReleaseNotes: Yes Using this thread to inform about what happens next: there are several missed commits in stable/11 which do not allow to enable OFED unconditionally on several architectures. I will only enable it on amd64 and add some UPDATING text. From owner-svn-src-stable@freebsd.org Wed Aug 15 21:38:14 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC89610719B2; Wed, 15 Aug 2018 21:38:14 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 485077D9E9; Wed, 15 Aug 2018 21:38:11 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D60A3102DD; Wed, 15 Aug 2018 21:38:10 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7FLcAB9092437; Wed, 15 Aug 2018 21:38:10 GMT (envelope-from jamie@FreeBSD.org) Received: (from jamie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7FLcAax092436; Wed, 15 Aug 2018 21:38:10 GMT (envelope-from jamie@FreeBSD.org) Message-Id: <201808152138.w7FLcAax092436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jamie set sender to jamie@FreeBSD.org using -f From: Jamie Gritton Date: Wed, 15 Aug 2018 21:38:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337875 - stable/11/lib/libjail X-SVN-Group: stable-11 X-SVN-Commit-Author: jamie X-SVN-Commit-Paths: stable/11/lib/libjail X-SVN-Commit-Revision: 337875 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 21:38:14 -0000 Author: jamie Date: Wed Aug 15 21:38:10 2018 New Revision: 337875 URL: https://svnweb.freebsd.org/changeset/base/337875 Log: MFC r331332: If a jail parameter isn't found, try loading a related kernel module. PR: 192092 Modified: stable/11/lib/libjail/jail.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libjail/jail.c ============================================================================== --- stable/11/lib/libjail/jail.c Wed Aug 15 21:38:06 2018 (r337874) +++ stable/11/lib/libjail/jail.c Wed Aug 15 21:38:10 2018 (r337875) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -57,6 +58,7 @@ __FBSDID("$FreeBSD$"); static int jailparam_import_enum(const char **values, int nvalues, const char *valstr, size_t valsize, int *value); static int jailparam_type(struct jailparam *jp); +static int kldload_param(const char *name); static char *noname(const char *name); static char *nononame(const char *name); @@ -885,6 +887,9 @@ jailparam_type(struct jailparam *jp) "sysctl(0.3.%s): %s", name, strerror(errno)); return (-1); } + if (kldload_param(name) >= 0 && sysctl(mib, 2, mib + 2, &miblen, + desc.s, strlen(desc.s)) >= 0) + goto mib_desc; /* * The parameter probably doesn't exist. But it might be * the "no" counterpart to a boolean. @@ -1021,6 +1026,33 @@ jailparam_type(struct jailparam *jp) jp->jp_valuelen = 0; } return (0); +} + +/* + * Attempt to load a kernel module matching an otherwise nonexistent parameter. + */ +static int +kldload_param(const char *name) +{ + int kl; + + if (strcmp(name, "linux") == 0 || strncmp(name, "linux.", 6) == 0) + kl = kldload("linux"); + else if (strcmp(name, "sysvmsg") == 0 || strcmp(name, "sysvsem") == 0 || + strcmp(name, "sysvshm") == 0) + kl = kldload(name); + else { + errno = ENOENT; + return (-1); + } + if (kl < 0 && errno == EEXIST) { + /* + * In the module is already loaded, then it must not contain + * the parameter. + */ + errno = ENOENT; + } + return kl; } /* From owner-svn-src-stable@freebsd.org Wed Aug 15 21:38:45 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 880831071A69; Wed, 15 Aug 2018 21:38:45 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3C3EF7DBF7; Wed, 15 Aug 2018 21:38:45 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1EE21102DF; Wed, 15 Aug 2018 21:38:45 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7FLcikn092514; Wed, 15 Aug 2018 21:38:44 GMT (envelope-from jamie@FreeBSD.org) Received: (from jamie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7FLciGW092513; Wed, 15 Aug 2018 21:38:44 GMT (envelope-from jamie@FreeBSD.org) Message-Id: <201808152138.w7FLciGW092513@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jamie set sender to jamie@FreeBSD.org using -f From: Jamie Gritton Date: Wed, 15 Aug 2018 21:38:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r337876 - stable/10/lib/libjail X-SVN-Group: stable-10 X-SVN-Commit-Author: jamie X-SVN-Commit-Paths: stable/10/lib/libjail X-SVN-Commit-Revision: 337876 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 21:38:45 -0000 Author: jamie Date: Wed Aug 15 21:38:44 2018 New Revision: 337876 URL: https://svnweb.freebsd.org/changeset/base/337876 Log: MFC r331332: If a jail parameter isn't found, try loading a related kernel module. PR: 192092 Modified: stable/10/lib/libjail/jail.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libjail/jail.c ============================================================================== --- stable/10/lib/libjail/jail.c Wed Aug 15 21:38:10 2018 (r337875) +++ stable/10/lib/libjail/jail.c Wed Aug 15 21:38:44 2018 (r337876) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -57,6 +58,7 @@ __FBSDID("$FreeBSD$"); static int jailparam_import_enum(const char **values, int nvalues, const char *valstr, size_t valsize, int *value); static int jailparam_type(struct jailparam *jp); +static int kldload_param(const char *name); static char *noname(const char *name); static char *nononame(const char *name); @@ -885,6 +887,9 @@ jailparam_type(struct jailparam *jp) "sysctl(0.3.%s): %s", name, strerror(errno)); return (-1); } + if (kldload_param(name) >= 0 && sysctl(mib, 2, mib + 2, &miblen, + desc.s, strlen(desc.s)) >= 0) + goto mib_desc; /* * The parameter probably doesn't exist. But it might be * the "no" counterpart to a boolean. @@ -1021,6 +1026,33 @@ jailparam_type(struct jailparam *jp) jp->jp_valuelen = 0; } return (0); +} + +/* + * Attempt to load a kernel module matching an otherwise nonexistent parameter. + */ +static int +kldload_param(const char *name) +{ + int kl; + + if (strcmp(name, "linux") == 0 || strncmp(name, "linux.", 6) == 0) + kl = kldload("linux"); + else if (strcmp(name, "sysvmsg") == 0 || strcmp(name, "sysvsem") == 0 || + strcmp(name, "sysvshm") == 0) + kl = kldload(name); + else { + errno = ENOENT; + return (-1); + } + if (kl < 0 && errno == EEXIST) { + /* + * In the module is already loaded, then it must not contain + * the parameter. + */ + errno = ENOENT; + } + return kl; } /* From owner-svn-src-stable@freebsd.org Wed Aug 15 22:29:00 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DCC321072A32 for ; Wed, 15 Aug 2018 22:28:59 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x231.google.com (mail-it0-x231.google.com [IPv6:2607:f8b0:4001:c0b::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 717C67F8D4 for ; Wed, 15 Aug 2018 22:28:59 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x231.google.com with SMTP id d10-v6so3806782itj.5 for ; Wed, 15 Aug 2018 15:28:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=Qh0OLXbZ+Ov9GPkKAkXhRv8QX/SqTydWQzltzyCpf9E=; b=cc/oAlT33fyoQeXFEdfFwVa1h0xtndcERMaa6eFTZztq7Hqnxz+m3Osus1DnsKY1nr qG/lrUsForwfN3qMe/Lebm1gSCL4ErzH+xscHBcxGVv3RZp1aXnQHZ+Ed4/F2HawAVqx EOwjZAws/zx8lDh9DgSn+vvzlBGWb9dSzOrzm40qD/uv30bgrXYlxLosI8ZFVhA+6Pm8 XCpssgTW8iuM+cgsLWe8SgI5JRu4hCC5hkQAbS2Lb0Xa2PO0uhsVTgsGQ/aUnlfcJUud t4pjSmYuEZQDz3g/I/fetWMzFRrTa2E+R/EcjDp7HNhG6HZLX6+OD/4guDtrQlzg9i4r mc4w== 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=Qh0OLXbZ+Ov9GPkKAkXhRv8QX/SqTydWQzltzyCpf9E=; b=VXO7adAlIZuR3BXpZcmNp2kmOoxJtF6VZX4oX78dfYx2pZSAPSf9YDxZt0J6WK7gYE bOXMGpJQLG93+CCYMcAB+NmGQdwv87qO2BVaEDyEAx2JVXG42bxYgX6TOEUayKFytvvf 32hdMccokEp3cbupyt5bI4CGcLtPF+HxT6nwgnxJbpPPwTnEc/SuAWYpgI3lvxzt7F08 bfSD6cNRF5Qf5vKkJpDQkSRjFHzrVoFRkOxFcMbD76kCmzWOJcKc3KFxieVdojpIjgGQ wCnbf9zeSmGBN6FOBaJkllDUy16ZN7lbpNouJx2PleM4YqyBXjWNbVSRfo6Muf4HwZGO mQtQ== X-Gm-Message-State: AOUpUlFgkDB49V5dzzw4mpXBplJAW+lCfgIap3tpdq31PX8+R5eQSOXo dhGl7uf3yNQ7DJQkoYUOlk3Xk5TtttYAZHaDceN9iw== X-Google-Smtp-Source: AA+uWPxBoiFLa6El4zweYr/SU1O+2uEKcitwLRJgF+fEUM8csjnAst3p+97KTSTL9lxzBl9VpioBXYWHX6zjITqoPuQ= X-Received: by 2002:a24:b211:: with SMTP id u17-v6mr19084958ite.1.1534372138701; Wed, 15 Aug 2018 15:28:58 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:257:0:0:0:0:0 with HTTP; Wed, 15 Aug 2018 15:28:58 -0700 (PDT) X-Originating-IP: [172.58.56.51] In-Reply-To: <201808152041.w7FKfbCU049764@pdx.rh.CN85.dnsmgr.net> References: <201808152041.w7FKfbCU049764@pdx.rh.CN85.dnsmgr.net> From: Warner Losh Date: Wed, 15 Aug 2018 16:28:58 -0600 X-Google-Sender-Auth: Uv6KOLSjmDydFk9IdZStY7MSOqI Message-ID: Subject: Re: svn commit: r337826 - stable/11/bin/ls To: "Rodney W. Grimes" Cc: Ian Lepore , Kyle Evans , Adam Weinberger , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers , Ed Maste , svn-src-stable-11@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 22:29:00 -0000 On Wed, Aug 15, 2018 at 2:41 PM, Rodney W. Grimes < freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > > On Wed, Aug 15, 2018 at 2:28 PM, Ian Lepore wrote: > > > > > On Wed, 2018-08-15 at 13:26 -0700, Rodney W. Grimes wrote: > > > > > > > > > > Will backing out the MFC and leaving this a 12.0 feature end this? > > > > =( > > > > > > > > Sadly no, as the person responded with that reaction when > > > > they installed 12.0-ALPHA :-(. > > > > > > So one whiner can demand of the project that any new feature be removed > > > before a new release is made? > > > > > > > This is a good change. I don't see why people are so fussed about it... > For > > people fighting colored environments a simple unsetenv COLORTERM seems to > > solve this problem no only on FreeBSD but for any other system they have > > access to... > > This is exactly the dismissive attitude by FreeBSD developers that > I was speaking to in my reply to Ian. > I see how it disagrees with you, but it's not dismissive. It's just asking for better data to support your view given that in general when all systems do X when Y happens, except FreeBSD, we generally make FreeBSD do X when Y unless there's a compelling reason not to. I've not seen a compelling reason not to yet. Basically, why should this be different than our general pattern of being in line with industry standards? Warner From owner-svn-src-stable@freebsd.org Wed Aug 15 22:32:44 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA11B1072C90; Wed, 15 Aug 2018 22:32:44 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5FCA57FE22; Wed, 15 Aug 2018 22:32:44 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 420FD10CA2; Wed, 15 Aug 2018 22:32:44 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7FMWiv9022769; Wed, 15 Aug 2018 22:32:44 GMT (envelope-from jamie@FreeBSD.org) Received: (from jamie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7FMWixM022768; Wed, 15 Aug 2018 22:32:44 GMT (envelope-from jamie@FreeBSD.org) Message-Id: <201808152232.w7FMWixM022768@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jamie set sender to jamie@FreeBSD.org using -f From: Jamie Gritton Date: Wed, 15 Aug 2018 22:32:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337879 - stable/11/lib/libjail X-SVN-Group: stable-11 X-SVN-Commit-Author: jamie X-SVN-Commit-Paths: stable/11/lib/libjail X-SVN-Commit-Revision: 337879 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 22:32:44 -0000 Author: jamie Date: Wed Aug 15 22:32:43 2018 New Revision: 337879 URL: https://svnweb.freebsd.org/changeset/base/337879 Log: Load filesystem modules associated with allow.mount permissions. PR: 192092 Modified: stable/11/lib/libjail/jail.c Modified: stable/11/lib/libjail/jail.c ============================================================================== --- stable/11/lib/libjail/jail.c Wed Aug 15 22:25:05 2018 (r337878) +++ stable/11/lib/libjail/jail.c Wed Aug 15 22:32:43 2018 (r337879) @@ -513,7 +513,18 @@ jailparam_set(struct jailparam *jp, unsigned njp, int } jiov[i - 1].iov_base = nname; jiov[i - 1].iov_len = strlen(nname) + 1; - + } + /* + * Load filesystem modules associated with allow.mount + * permissions. Ignore failure, since the module may + * be static, and even a failure to load is not a jail + * error. + */ + if (strncmp(jp[j].jp_name, "allow.mount.", 12) == 0) { + if (kldload(jp[j].jp_name + 12) < 0 && + errno == ENOENT && + strncmp(jp[j].jp_name + 12, "no", 2) == 0) + (void)kldload(jp[j].jp_name + 14); } } else { /* From owner-svn-src-stable@freebsd.org Wed Aug 15 22:32:56 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34F751072CC3; Wed, 15 Aug 2018 22:32:56 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DF0987FF1F; Wed, 15 Aug 2018 22:32:55 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C189910CA4; Wed, 15 Aug 2018 22:32:55 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7FMWtT0022835; Wed, 15 Aug 2018 22:32:55 GMT (envelope-from jamie@FreeBSD.org) Received: (from jamie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7FMWtMf022834; Wed, 15 Aug 2018 22:32:55 GMT (envelope-from jamie@FreeBSD.org) Message-Id: <201808152232.w7FMWtMf022834@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jamie set sender to jamie@FreeBSD.org using -f From: Jamie Gritton Date: Wed, 15 Aug 2018 22:32:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r337880 - stable/10/lib/libjail X-SVN-Group: stable-10 X-SVN-Commit-Author: jamie X-SVN-Commit-Paths: stable/10/lib/libjail X-SVN-Commit-Revision: 337880 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 22:32:56 -0000 Author: jamie Date: Wed Aug 15 22:32:55 2018 New Revision: 337880 URL: https://svnweb.freebsd.org/changeset/base/337880 Log: Load filesystem modules associated with allow.mount permissions. PR: 192092 Modified: stable/10/lib/libjail/jail.c Modified: stable/10/lib/libjail/jail.c ============================================================================== --- stable/10/lib/libjail/jail.c Wed Aug 15 22:32:43 2018 (r337879) +++ stable/10/lib/libjail/jail.c Wed Aug 15 22:32:55 2018 (r337880) @@ -513,7 +513,18 @@ jailparam_set(struct jailparam *jp, unsigned njp, int } jiov[i - 1].iov_base = nname; jiov[i - 1].iov_len = strlen(nname) + 1; - + } + /* + * Load filesystem modules associated with allow.mount + * permissions. Ignore failure, since the module may + * be static, and even a failure to load is not a jail + * error. + */ + if (strncmp(jp[j].jp_name, "allow.mount.", 12) == 0) { + if (kldload(jp[j].jp_name + 12) < 0 && + errno == ENOENT && + strncmp(jp[j].jp_name + 12, "no", 2) == 0) + (void)kldload(jp[j].jp_name + 14); } } else { /* From owner-svn-src-stable@freebsd.org Thu Aug 16 01:02:02 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F0AB1076803; Thu, 16 Aug 2018 01:02:02 +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 0C50185D5C; Thu, 16 Aug 2018 01:02:01 +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 w7G11x16051009; Wed, 15 Aug 2018 18:01:59 -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 w7G11wZD051008; Wed, 15 Aug 2018 18:01:58 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201808160101.w7G11wZD051008@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r337826 - stable/11/bin/ls In-Reply-To: To: Kyle Evans Date: Wed, 15 Aug 2018 18:01:58 -0700 (PDT) CC: "Rodney W. Grimes" , Adam Weinberger , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers , Ed Maste , svn-src-stable-11@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-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Aug 2018 01:02:02 -0000 > On Wed, Aug 15, 2018 at 2:55 PM, Rodney W. Grimes > wrote: > >> On Wed, Aug 15, 2018 at 2:34 PM, Rodney W. Grimes > >> wrote: > >> > [ Charset UTF-8 unsupported, converting... ] > >> >> On Wed, Aug 15, 2018 at 12:43 PM, Rodney W. Grimes > >> >> wrote: > >> >> > > >> >> > From the Linux man page at: http://man7.org/linux/man-pages/man1/ls.1.html > >> >> > > >> >> > Using color to distinguish file types is disabled both by default and > >> >> > with --color=never. With --color=auto, ls emits color codes only > >> >> > when standard output is connected to a terminal. The LS_COLORS > >> >> > environment variable can change the settings. Use the dircolors > >> >> > command to set it. > >> >> > > >> >> > Um, so by default we should not be doing any colour... and we are... > >> >> > > >> >> > >> >> I don't recall making any argument that we're trying to match GNU > >> >> ls(1) behavior. Furthermore, again, we aren't doing any color by > >> >> default- only when the COLORTERM environment variable is set. > >> > > >> > So we are intentially being different? > >> > > >> > >> No, we are not intentionally being different. See: the next paragraph, > >> where I described that we've now-historically been honoring an > >> environment variable for this and have simply added a more standard > >> name for this variable. > > > > And one that is set by default many more places than the one that > > had been set before, changing behavior people have been seeing for > > a long time, and some of those people did not expect that, > > nor seem to want it either. > > Will backing out the MFC and leaving this a 12.0 feature end this? =( >From some other private discussion with Warner I think it may be wise at this time to revert the MFC until some other things are done in 12.0 to address some of the concerns and merge a more complete solution. Thanks, Rod -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-stable@freebsd.org Thu Aug 16 01:05:41 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7F3810769DB for ; Thu, 16 Aug 2018 01:05:40 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x236.google.com (mail-it0-x236.google.com [IPv6:2607:f8b0:4001:c0b::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 616DE8608A for ; Thu, 16 Aug 2018 01:05:40 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x236.google.com with SMTP id p81-v6so4522917itp.1 for ; Wed, 15 Aug 2018 18:05:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=/BAEypin/3PcM7TlEV8VQ9LiVEogkgfwM37m43KpeA8=; b=QInY2lPMGM8V58tqbuPRv6uSvJD9RXGGRSmEM4Zy44ScKkStTi1moPDblr/KVmRjb+ V7AhLp0a2QFWu/ou8A+Ign987auxiMYYBRADZVMtCMmfb4yxWsQrAYaKPkip3B9ledFh O1t9g5RhO8+LF2+qrbO/HMWklTsmaA7ahnhGfievDqJuj4Mny/xqAMQJAKqQfKfoUEQP HKYoLhcCdSGB+tLla/bZAHjJXrQYOBpCCtI1UmO4mRZQr/L6yqKjtdXP5UcJNtHjgWnJ bfNTWhb0IKFhSdMnfVTz0zfronMxK5M3qLKGKjCO7Zlmspa2vId2uyQuf7FdThIgsbyi fO1g== 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=/BAEypin/3PcM7TlEV8VQ9LiVEogkgfwM37m43KpeA8=; b=ovQ0C2lX21QpTZhP8NEgScD74+Y0QJ6KnCTswRiRRKpnoyw/MmT4LWjLHpXZq7JkvG I7EID7nnok8kjMC3GXPhGYV3g4tlOHDDjwUsEV5d2FALUS5Ctt1CEQ6RHMQoWp7wuZD9 eDdhug9V2P9QqWO2K8+X4z2bCUIwR7AnZLv3aZ91VL9Sz1Z0+vhFkJPThZRTyZYB6xO3 cwszjThMNVdJv/VQXi6AFAxJuiHzDk0nRocioe2sVn5u8Wd+uE1imYaeQtRtI6CXiV2l 234y+ooZ3G5e/seXitGi9WDLdnv6KkLSgrGeEtcjdlxg5D9GgkDayUGEofSpnAgmJOE3 Gmyw== X-Gm-Message-State: AOUpUlFAKhkXvXYYaBcTwi0VhvbXRkw6tMUuiNWs8/f1asHNp9L5ppQe wS/Zs1VUze6c8Vdfla5n6MwbJnLBDEk+McUdNN4opA== X-Google-Smtp-Source: AA+uWPycQQ3zc6ES0XTh6ArSm/VyD82sorbFg7T72kgB/7ywS+MgqGhwpCvbB26I3o/a83lRdQt1Fsw4cIhrjeM8jFs= X-Received: by 2002:a24:3ec3:: with SMTP id s186-v6mr20006625its.73.1534381539623; Wed, 15 Aug 2018 18:05:39 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:257:0:0:0:0:0 with HTTP; Wed, 15 Aug 2018 18:05:38 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: References: <201808152041.w7FKfbCU049764@pdx.rh.CN85.dnsmgr.net> From: Warner Losh Date: Wed, 15 Aug 2018 19:05:38 -0600 X-Google-Sender-Auth: WVhJ9sCkFsJYXDOohiJsAb3QA_M Message-ID: Subject: Re: svn commit: r337826 - stable/11/bin/ls To: "Rodney W. Grimes" Cc: Ian Lepore , Kyle Evans , Adam Weinberger , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers , Ed Maste , svn-src-stable-11@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Aug 2018 01:05:41 -0000 On Wed, Aug 15, 2018 at 4:28 PM, Warner Losh wrote: > > > On Wed, Aug 15, 2018 at 2:41 PM, Rodney W. Grimes < > freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > >> > On Wed, Aug 15, 2018 at 2:28 PM, Ian Lepore wrote: >> > >> > > On Wed, 2018-08-15 at 13:26 -0700, Rodney W. Grimes wrote: >> > > > > >> > > > > Will backing out the MFC and leaving this a 12.0 feature end this? >> > > > =( >> > > > >> > > > Sadly no, as the person responded with that reaction when >> > > > they installed 12.0-ALPHA :-(. >> > > >> > > So one whiner can demand of the project that any new feature be >> removed >> > > before a new release is made? >> > > >> > >> > This is a good change. I don't see why people are so fussed about it... >> For >> > people fighting colored environments a simple unsetenv COLORTERM seems >> to >> > solve this problem no only on FreeBSD but for any other system they have >> > access to... >> >> This is exactly the dismissive attitude by FreeBSD developers that >> I was speaking to in my reply to Ian. >> > > I see how it disagrees with you, but it's not dismissive. It's just asking > for better data to support your view given that in general when all systems > do X when Y happens, except FreeBSD, we generally make FreeBSD do X when Y > unless there's a compelling reason not to. I've not seen a compelling > reason not to yet. > > Basically, why should this be different than our general pattern of being > in line with industry standards? > > It has been pointed out privately to me that I was being dismissive in the second sentence. I accept that. I'd like to apologize for that. I just took a close look at both gnu coretuils' ls code and our ls code. There's one minor difference in behavior. With gnu ls, if COLORTERM is empty, it will be ignored. With our code, we'll assume an empty value means to use colors. That difference should be fixed. This difference is clear if you look at the unit-tests from coreutils ls as well. I'll leave for others to debate the meaning of 'standard behavior' and just focus on what gnu ls does, because that's what Linux users expect, and that is what the fix was designed to implement. There's a wide variety of terminals that set this, however. For info see https://gist. github.com/XVilka/8346728 which goes into detail about it wrt COLORTERM=truecolor, but is good reading. I have a patch to make the behavior the same that I've shared that fixes this, though it's a bit ugly. There's also -color=xxx in gnu ls that would be a more complete solution, but our current ls doesn't have long options at all, so it's more of a heavy lift to merge that functionality into our ls. Warner From owner-svn-src-stable@freebsd.org Thu Aug 16 01:18:22 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16DFB1076F4D; Thu, 16 Aug 2018 01:18:22 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C147B8690D; Thu, 16 Aug 2018 01:18:21 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 999CC1267D; Thu, 16 Aug 2018 01:18:21 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7G1ILxp006513; Thu, 16 Aug 2018 01:18:21 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7G1IL90006511; Thu, 16 Aug 2018 01:18:21 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201808160118.w7G1IL90006511@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 16 Aug 2018 01:18:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337884 - stable/11/bin/ls X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/bin/ls X-SVN-Commit-Revision: 337884 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Aug 2018 01:18:22 -0000 Author: kevans Date: Thu Aug 16 01:18:20 2018 New Revision: 337884 URL: https://svnweb.freebsd.org/changeset/base/337884 Log: Revert r337826: MFC of ls(1) COLORTERM honoring It was not ready, and was much-objected-to. Modified: stable/11/bin/ls/ls.1 stable/11/bin/ls/ls.c Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/ls/ls.1 ============================================================================== --- stable/11/bin/ls/ls.1 Thu Aug 16 00:50:14 2018 (r337883) +++ stable/11/bin/ls/ls.1 Thu Aug 16 01:18:20 2018 (r337884) @@ -32,7 +32,7 @@ .\" @(#)ls.1 8.7 (Berkeley) 7/29/94 .\" $FreeBSD$ .\" -.Dd August 8, 2018 +.Dd December 1, 2015 .Dt LS 1 .Os .Sh NAME @@ -140,8 +140,6 @@ after each that is a Enable colorized output. This option is equivalent to defining .Ev CLICOLOR -or -.Ev COLORTERM in the environment. (See below.) This functionality can be compiled out by removing the definition of @@ -638,10 +636,6 @@ The variable still needs to reference a color capable terminal however otherwise it is not possible to determine which color sequences to use. -.It Ev COLORTERM -See description for -.Ev CLICOLOR -above. .It Ev COLUMNS If this variable contains a string representing a decimal integer, it is used as the @@ -666,9 +660,7 @@ for more information. .It Ev LSCOLORS The value of this variable describes what color to use for which attribute when colors are enabled with -.Ev CLICOLOR -or -.Ev COLORTERM . +.Ev CLICOLOR . This string is a concatenation of pairs of the format .Ar f Ns Ar b , where @@ -775,8 +767,6 @@ option for more details. .It Ev TERM The .Ev CLICOLOR -and -.Ev COLORTERM functionality depends on a terminal type with color capabilities. .It Ev TZ The timezone to use when displaying dates. Modified: stable/11/bin/ls/ls.c ============================================================================== --- stable/11/bin/ls/ls.c Thu Aug 16 00:50:14 2018 (r337883) +++ stable/11/bin/ls/ls.c Thu Aug 16 01:18:20 2018 (r337884) @@ -374,7 +374,7 @@ main(int argc, char *argv[]) f_listdot = 1; /* Enabling of colours is conditional on the environment. */ - if ((getenv("CLICOLOR") || getenv("COLORTERM")) && + if (getenv("CLICOLOR") && (isatty(STDOUT_FILENO) || getenv("CLICOLOR_FORCE"))) #ifdef COLORLS if (tgetent(termcapbuf, getenv("TERM")) == 1) { From owner-svn-src-stable@freebsd.org Thu Aug 16 01:24:03 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5ECE210773E3; Thu, 16 Aug 2018 01:24:03 +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 CAAED86E81; Thu, 16 Aug 2018 01:24:02 +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 w7G1O1WM051119; Wed, 15 Aug 2018 18:24: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 w7G1O1mb051118; Wed, 15 Aug 2018 18:24:01 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201808160124.w7G1O1mb051118@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r337884 - stable/11/bin/ls In-Reply-To: <201808160118.w7G1IL90006511@repo.freebsd.org> To: Kyle Evans Date: Wed, 15 Aug 2018 18:24:01 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@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-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Aug 2018 01:24:03 -0000 > Author: kevans > Date: Thu Aug 16 01:18:20 2018 > New Revision: 337884 > URL: https://svnweb.freebsd.org/changeset/base/337884 > > Log: > Revert r337826: MFC of ls(1) COLORTERM honoring > > It was not ready, and was much-objected-to. Thanks, just objected to, not much. I think once the --color=foo and the NULL COLORTERM fix goes in this should work as expected and not cause the issue seen by the user, or if it does I can tell them how to get color VIM, but not color ls without too much magic. > > Modified: > stable/11/bin/ls/ls.1 > stable/11/bin/ls/ls.c > Directory Properties: > stable/11/ (props changed) > > Modified: stable/11/bin/ls/ls.1 > ============================================================================== > --- stable/11/bin/ls/ls.1 Thu Aug 16 00:50:14 2018 (r337883) > +++ stable/11/bin/ls/ls.1 Thu Aug 16 01:18:20 2018 (r337884) > @@ -32,7 +32,7 @@ > .\" @(#)ls.1 8.7 (Berkeley) 7/29/94 > .\" $FreeBSD$ > .\" > -.Dd August 8, 2018 > +.Dd December 1, 2015 > .Dt LS 1 > .Os > .Sh NAME > @@ -140,8 +140,6 @@ after each that is a > Enable colorized output. > This option is equivalent to defining > .Ev CLICOLOR > -or > -.Ev COLORTERM > in the environment. > (See below.) > This functionality can be compiled out by removing the definition of > @@ -638,10 +636,6 @@ The > variable still needs to reference a color capable terminal however > otherwise it is not possible to determine which color sequences to > use. > -.It Ev COLORTERM > -See description for > -.Ev CLICOLOR > -above. > .It Ev COLUMNS > If this variable contains a string representing a > decimal integer, it is used as the > @@ -666,9 +660,7 @@ for more information. > .It Ev LSCOLORS > The value of this variable describes what color to use for which > attribute when colors are enabled with > -.Ev CLICOLOR > -or > -.Ev COLORTERM . > +.Ev CLICOLOR . > This string is a concatenation of pairs of the format > .Ar f Ns Ar b , > where > @@ -775,8 +767,6 @@ option for more details. > .It Ev TERM > The > .Ev CLICOLOR > -and > -.Ev COLORTERM > functionality depends on a terminal type with color capabilities. > .It Ev TZ > The timezone to use when displaying dates. > > Modified: stable/11/bin/ls/ls.c > ============================================================================== > --- stable/11/bin/ls/ls.c Thu Aug 16 00:50:14 2018 (r337883) > +++ stable/11/bin/ls/ls.c Thu Aug 16 01:18:20 2018 (r337884) > @@ -374,7 +374,7 @@ main(int argc, char *argv[]) > f_listdot = 1; > > /* Enabling of colours is conditional on the environment. */ > - if ((getenv("CLICOLOR") || getenv("COLORTERM")) && > + if (getenv("CLICOLOR") && > (isatty(STDOUT_FILENO) || getenv("CLICOLOR_FORCE"))) > #ifdef COLORLS > if (tgetent(termcapbuf, getenv("TERM")) == 1) { > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-stable@freebsd.org Thu Aug 16 08:05:05 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69AF01081581; Thu, 16 Aug 2018 08:05:05 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1C42A7317C; Thu, 16 Aug 2018 08:05:05 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F20FA16A58; Thu, 16 Aug 2018 08:05:04 +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 w7G854xB015700; Thu, 16 Aug 2018 08:05:04 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7G854Pi015699; Thu, 16 Aug 2018 08:05:04 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201808160805.w7G854Pi015699@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 16 Aug 2018 08:05:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337893 - stable/11/sys/i386/include X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/i386/include X-SVN-Commit-Revision: 337893 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Aug 2018 08:05:05 -0000 Author: hselasky Date: Thu Aug 16 08:05:04 2018 New Revision: 337893 URL: https://svnweb.freebsd.org/changeset/base/337893 Log: MFC r337529: Implement missing atomic_fcmpset_XXX() support for i386. Sponsored by: Mellanox Technologies Modified: stable/11/sys/i386/include/atomic.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/i386/include/atomic.h ============================================================================== --- stable/11/sys/i386/include/atomic.h Thu Aug 16 07:34:10 2018 (r337892) +++ stable/11/sys/i386/include/atomic.h Thu Aug 16 08:05:04 2018 (r337893) @@ -128,6 +128,7 @@ u_##TYPE atomic_load_acq_##TYPE(volatile u_##TYPE *p) void atomic_store_rel_##TYPE(volatile u_##TYPE *p, u_##TYPE v) int atomic_cmpset_64(volatile uint64_t *, uint64_t, uint64_t); +int atomic_fcmpset_64(volatile uint64_t *, uint64_t *, uint64_t); uint64_t atomic_load_acq_64(volatile uint64_t *); void atomic_store_rel_64(volatile uint64_t *, uint64_t); uint64_t atomic_swap_64(volatile uint64_t *, uint64_t); @@ -402,6 +403,18 @@ atomic_cmpset_64_i386(volatile uint64_t *dst, uint64_t return (res); } +static __inline int +atomic_fcmpset_64_i386(volatile uint64_t *dst, uint64_t *expect, uint64_t src) +{ + + if (atomic_cmpset_64_i386(dst, *expect, src)) { + return (1); + } else { + *expect = *dst; + return (0); + } +} + static __inline uint64_t atomic_load_acq_64_i386(volatile uint64_t *p) { @@ -481,6 +494,24 @@ atomic_cmpset_64_i586(volatile uint64_t *dst, uint64_t return (res); } +static __inline int +atomic_fcmpset_64_i586(volatile uint64_t *dst, uint64_t *expect, uint64_t src) +{ + u_char res; + + __asm __volatile( + " " MPLOCKED " " + " cmpxchg8b %1 ; " + " sete %0" + : "=q" (res), /* 0 */ + "+m" (*dst), /* 1 */ + "+A" (*expect) /* 2 */ + : "b" ((uint32_t)src), /* 3 */ + "c" ((uint32_t)(src >> 32)) /* 4 */ + : "memory", "cc"); + return (res); +} + static __inline uint64_t atomic_load_acq_64_i586(volatile uint64_t *p) { @@ -540,6 +571,16 @@ atomic_cmpset_64(volatile uint64_t *dst, uint64_t expe return (atomic_cmpset_64_i586(dst, expect, src)); } +static __inline int +atomic_fcmpset_64(volatile uint64_t *dst, uint64_t *expect, uint64_t src) +{ + + if ((cpu_feature & CPUID_CX8) == 0) + return (atomic_fcmpset_64_i386(dst, expect, src)); + else + return (atomic_fcmpset_64_i586(dst, expect, src)); +} + static __inline uint64_t atomic_load_acq_64(volatile uint64_t *p) { @@ -653,6 +694,14 @@ atomic_cmpset_long(volatile u_long *dst, u_long expect (u_int)src)); } +static __inline int +atomic_fcmpset_long(volatile u_long *dst, u_long *expect, u_long src) +{ + + return (atomic_fcmpset_int((volatile u_int *)dst, (u_int *)expect, + (u_int)src)); +} + static __inline u_long atomic_fetchadd_long(volatile u_long *p, u_long v) { @@ -832,6 +881,8 @@ u_long atomic_swap_long(volatile u_long *p, u_long v); /* Operations on 64-bit quad words. */ #define atomic_cmpset_acq_64 atomic_cmpset_64 #define atomic_cmpset_rel_64 atomic_cmpset_64 +#define atomic_fcmpset_acq_64 atomic_fcmpset_64 +#define atomic_fcmpset_rel_64 atomic_fcmpset_64 #define atomic_fetchadd_acq_64 atomic_fetchadd_64 #define atomic_fetchadd_rel_64 atomic_fetchadd_64 #define atomic_add_acq_64 atomic_add_64 From owner-svn-src-stable@freebsd.org Thu Aug 16 08:08:31 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 302EB1081688; Thu, 16 Aug 2018 08:08:31 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D747573330; Thu, 16 Aug 2018 08:08:30 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B882216A5A; Thu, 16 Aug 2018 08:08:30 +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 w7G88UwI015904; Thu, 16 Aug 2018 08:08:30 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7G88UdZ015903; Thu, 16 Aug 2018 08:08:30 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201808160808.w7G88UdZ015903@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 16 Aug 2018 08:08:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337894 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 337894 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Aug 2018 08:08:31 -0000 Author: hselasky Date: Thu Aug 16 08:08:30 2018 New Revision: 337894 URL: https://svnweb.freebsd.org/changeset/base/337894 Log: MFC r337232: Implement ktime_add_ms() and ktime_before() in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Modified: stable/11/sys/compat/linuxkpi/common/include/linux/ktime.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/ktime.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/ktime.h Thu Aug 16 08:05:04 2018 (r337893) +++ stable/11/sys/compat/linuxkpi/common/include/linux/ktime.h Thu Aug 16 08:08:30 2018 (r337894) @@ -86,6 +86,13 @@ ktime_add_ns(ktime_t kt, int64_t ns) } static inline ktime_t +ktime_add_ms(ktime_t kt, int64_t ms) +{ + + return (ktime_add_ns(kt, ms * NSEC_PER_MSEC)); +} + +static inline ktime_t ktime_sub_ns(ktime_t kt, int64_t ns) { return (kt - ns); @@ -144,6 +151,13 @@ ktime_after(const ktime_t cmp1, const ktime_t cmp2) { return (ktime_compare(cmp1, cmp2) > 0); +} + +static inline bool +ktime_before(const ktime_t cmp1, const ktime_t cmp2) +{ + + return (ktime_compare(cmp1, cmp2) < 0); } static inline ktime_t From owner-svn-src-stable@freebsd.org Thu Aug 16 08:09:26 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D26BE1081735; Thu, 16 Aug 2018 08:09:26 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 881927347C; Thu, 16 Aug 2018 08:09:26 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6949C16A5C; Thu, 16 Aug 2018 08:09:26 +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 w7G89QCm016006; Thu, 16 Aug 2018 08:09:26 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7G89QE3016005; Thu, 16 Aug 2018 08:09:26 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201808160809.w7G89QE3016005@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 16 Aug 2018 08:09:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337895 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 337895 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Aug 2018 08:09:27 -0000 Author: hselasky Date: Thu Aug 16 08:09:26 2018 New Revision: 337895 URL: https://svnweb.freebsd.org/changeset/base/337895 Log: MFC r337373: Define __poll_t type in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Modified: stable/11/sys/compat/linuxkpi/common/include/linux/types.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/types.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/types.h Thu Aug 16 08:08:30 2018 (r337894) +++ stable/11/sys/compat/linuxkpi/common/include/linux/types.h Thu Aug 16 08:09:26 2018 (r337895) @@ -59,6 +59,7 @@ typedef uint64_t loff_t; typedef vm_paddr_t resource_size_t; typedef uint16_t __bitwise__ __sum16; typedef unsigned long pgoff_t; +typedef unsigned __poll_t; typedef u64 phys_addr_t; From owner-svn-src-stable@freebsd.org Thu Aug 16 08:10:12 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A52410817CE; Thu, 16 Aug 2018 08:10:12 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2F8A6735C0; Thu, 16 Aug 2018 08:10:12 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 10A5616A62; Thu, 16 Aug 2018 08:10:12 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7G8ABrX016123; Thu, 16 Aug 2018 08:10:11 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7G8ABQT016122; Thu, 16 Aug 2018 08:10:11 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201808160810.w7G8ABQT016122@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 16 Aug 2018 08:10:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337896 - stable/11/sys/compat/linuxkpi/common/include/asm X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/asm X-SVN-Commit-Revision: 337896 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Aug 2018 08:10:12 -0000 Author: hselasky Date: Thu Aug 16 08:10:11 2018 New Revision: 337896 URL: https://svnweb.freebsd.org/changeset/base/337896 Log: MFC r337374: Implement atomic_long_cmpxchg() function in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Modified: stable/11/sys/compat/linuxkpi/common/include/asm/atomic-long.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/asm/atomic-long.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/asm/atomic-long.h Thu Aug 16 08:09:26 2018 (r337895) +++ stable/11/sys/compat/linuxkpi/common/include/asm/atomic-long.h Thu Aug 16 08:10:11 2018 (r337896) @@ -81,6 +81,21 @@ atomic_long_xchg(atomic_long_t *v, long val) return atomic_swap_long(&v->counter, val); } +static inline long +atomic_long_cmpxchg(atomic_long_t *v, long old, long new) +{ + long ret = old; + + for (;;) { + if (atomic_cmpset_long(&v->counter, old, new)) + break; + ret = READ_ONCE(v->counter); + if (ret != old) + break; + } + return (ret); +} + static inline int atomic_long_add_unless(atomic_long_t *v, long a, long u) { From owner-svn-src-stable@freebsd.org Thu Aug 16 08:11:19 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4BA29108183E; Thu, 16 Aug 2018 08:11:19 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 01C8973794; Thu, 16 Aug 2018 08:11:19 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D716916B99; Thu, 16 Aug 2018 08:11:18 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7G8BIf6017859; Thu, 16 Aug 2018 08:11:18 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7G8BIBN017856; Thu, 16 Aug 2018 08:11:18 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201808160811.w7G8BIBN017856@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 16 Aug 2018 08:11:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337897 - in stable/11/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys/compat/linuxkpi/common: include/linux src X-SVN-Commit-Revision: 337897 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Aug 2018 08:11:19 -0000 Author: hselasky Date: Thu Aug 16 08:11:17 2018 New Revision: 337897 URL: https://svnweb.freebsd.org/changeset/base/337897 Log: MFC r337376: Implement current_work() function in the LinuxKPI. Tested by: Johannes Lundberg Sponsored by: Mellanox Technologies Modified: stable/11/sys/compat/linuxkpi/common/include/linux/sched.h stable/11/sys/compat/linuxkpi/common/include/linux/workqueue.h stable/11/sys/compat/linuxkpi/common/src/linux_work.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/sched.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/sched.h Thu Aug 16 08:10:11 2018 (r337896) +++ stable/11/sys/compat/linuxkpi/common/include/linux/sched.h Thu Aug 16 08:11:17 2018 (r337897) @@ -60,6 +60,7 @@ #define TASK_COMM_LEN (MAXCOMLEN + 1) +struct work_struct; struct task_struct { struct thread *task_thread; struct mm_struct *mm; @@ -78,6 +79,7 @@ struct task_struct { TAILQ_ENTRY(task_struct) rcu_entry; int rcu_recurse; int bsd_interrupt_value; + struct work_struct *work; /* current work struct, if set */ }; #define current ({ \ Modified: stable/11/sys/compat/linuxkpi/common/include/linux/workqueue.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/workqueue.h Thu Aug 16 08:10:11 2018 (r337896) +++ stable/11/sys/compat/linuxkpi/common/include/linux/workqueue.h Thu Aug 16 08:11:17 2018 (r337897) @@ -209,6 +209,9 @@ do { \ #define destroy_workqueue(wq) \ linux_destroy_workqueue(wq) +#define current_work() \ + linux_current_work() + /* prototypes */ extern struct workqueue_struct *system_wq; @@ -232,5 +235,6 @@ extern bool linux_flush_work(struct work_struct *); extern bool linux_flush_delayed_work(struct delayed_work *); extern bool linux_work_pending(struct work_struct *); extern bool linux_work_busy(struct work_struct *); +extern struct work_struct *linux_current_work(void); #endif /* _LINUX_WORKQUEUE_H_ */ Modified: stable/11/sys/compat/linuxkpi/common/src/linux_work.c ============================================================================== --- stable/11/sys/compat/linuxkpi/common/src/linux_work.c Thu Aug 16 08:10:11 2018 (r337896) +++ stable/11/sys/compat/linuxkpi/common/src/linux_work.c Thu Aug 16 08:11:17 2018 (r337897) @@ -220,8 +220,9 @@ linux_work_fn(void *context, int pending) struct work_struct *work; struct workqueue_struct *wq; struct work_exec exec; + struct task_struct *task; - linux_set_current(curthread); + task = current; /* setup local variables */ work = context; @@ -240,9 +241,15 @@ linux_work_fn(void *context, int pending) case WORK_ST_CANCEL: WQ_EXEC_UNLOCK(wq); + /* set current work structure */ + task->work = work; + /* call work function */ work->func(work); + /* set current work structure */ + task->work = NULL; + WQ_EXEC_LOCK(wq); /* check if unblocked */ if (exec.target != work) { @@ -577,6 +584,12 @@ linux_init_delayed_work(struct delayed_work *dwork, wo mtx_init(&dwork->timer.mtx, spin_lock_name("lkpi-dwork"), NULL, MTX_DEF | MTX_NOWITNESS); callout_init_mtx(&dwork->timer.callout, &dwork->timer.mtx, 0); +} + +struct work_struct * +linux_current_work(void) +{ + return (current->work); } static void From owner-svn-src-stable@freebsd.org Thu Aug 16 08:12:38 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3DC491081AA3; Thu, 16 Aug 2018 08:12:38 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E6DDF73B02; Thu, 16 Aug 2018 08:12:37 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C8C6C16BED; Thu, 16 Aug 2018 08:12:37 +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 w7G8CbTU021091; Thu, 16 Aug 2018 08:12:37 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7G8Cbvl021088; Thu, 16 Aug 2018 08:12:37 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201808160812.w7G8Cbvl021088@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 16 Aug 2018 08:12:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337898 - in stable/11/sys/compat/linuxkpi/common/include: asm linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys/compat/linuxkpi/common/include: asm linux X-SVN-Commit-Revision: 337898 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Aug 2018 08:12:38 -0000 Author: hselasky Date: Thu Aug 16 08:12:36 2018 New Revision: 337898 URL: https://svnweb.freebsd.org/changeset/base/337898 Log: MFC r337527: Use atomic_fcmpset_XXX() instead of atomic_cmpset_XXX() when possible in the LinuxKPI. Suggested by: mjg @ Sponsored by: Mellanox Technologies Modified: stable/11/sys/compat/linuxkpi/common/include/asm/atomic-long.h stable/11/sys/compat/linuxkpi/common/include/asm/atomic.h stable/11/sys/compat/linuxkpi/common/include/asm/atomic64.h stable/11/sys/compat/linuxkpi/common/include/linux/bitops.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/asm/atomic-long.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/asm/atomic-long.h Thu Aug 16 08:11:17 2018 (r337897) +++ stable/11/sys/compat/linuxkpi/common/include/asm/atomic-long.h Thu Aug 16 08:12:36 2018 (r337898) @@ -87,9 +87,8 @@ atomic_long_cmpxchg(atomic_long_t *v, long old, long n long ret = old; for (;;) { - if (atomic_cmpset_long(&v->counter, old, new)) + if (atomic_fcmpset_long(&v->counter, &ret, new)) break; - ret = READ_ONCE(v->counter); if (ret != old) break; } @@ -99,13 +98,12 @@ atomic_long_cmpxchg(atomic_long_t *v, long old, long n static inline int atomic_long_add_unless(atomic_long_t *v, long a, long u) { - long c; + long c = atomic_long_read(v); for (;;) { - c = atomic_long_read(v); if (unlikely(c == u)) break; - if (likely(atomic_cmpset_long(&v->counter, c, c + a))) + if (likely(atomic_fcmpset_long(&v->counter, &c, c + a))) break; } return (c != u); Modified: stable/11/sys/compat/linuxkpi/common/include/asm/atomic.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/asm/atomic.h Thu Aug 16 08:11:17 2018 (r337897) +++ stable/11/sys/compat/linuxkpi/common/include/asm/atomic.h Thu Aug 16 08:12:36 2018 (r337898) @@ -108,13 +108,12 @@ atomic_dec(atomic_t *v) static inline int atomic_add_unless(atomic_t *v, int a, int u) { - int c; + int c = atomic_read(v); for (;;) { - c = atomic_read(v); if (unlikely(c == u)) break; - if (likely(atomic_cmpset_int(&v->counter, c, c + a))) + if (likely(atomic_fcmpset_int(&v->counter, &c, c + a))) break; } return (c != u); @@ -134,12 +133,10 @@ atomic_xchg(atomic_t *v, int i) defined(__powerpc__) return (atomic_swap_int(&v->counter, i)); #else - int ret; - for (;;) { - ret = READ_ONCE(v->counter); - if (atomic_cmpset_int(&v->counter, ret, i)) - break; - } + int ret = atomic_read(v); + + while (!atomic_fcmpset_int(&v->counter, &ret, i)) + ; return (ret); #endif } @@ -150,9 +147,8 @@ atomic_cmpxchg(atomic_t *v, int old, int new) int ret = old; for (;;) { - if (atomic_cmpset_int(&v->counter, old, new)) + if (atomic_fcmpset_int(&v->counter, &ret, new)) break; - ret = READ_ONCE(v->counter); if (ret != old) break; } Modified: stable/11/sys/compat/linuxkpi/common/include/asm/atomic64.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/asm/atomic64.h Thu Aug 16 08:11:17 2018 (r337897) +++ stable/11/sys/compat/linuxkpi/common/include/asm/atomic64.h Thu Aug 16 08:12:36 2018 (r337898) @@ -92,13 +92,12 @@ atomic64_dec(atomic64_t *v) static inline int64_t atomic64_add_unless(atomic64_t *v, int64_t a, int64_t u) { - int64_t c; + int64_t c = atomic64_read(v); for (;;) { - c = atomic64_read(v); if (unlikely(c == u)) break; - if (likely(atomic_cmpset_64(&v->counter, c, c + a))) + if (likely(atomic_fcmpset_64(&v->counter, &c, c + a))) break; } return (c != u); @@ -112,12 +111,10 @@ atomic64_xchg(atomic64_t *v, int64_t i) defined(__powerpc64__) return (atomic_swap_64(&v->counter, i)); #else - int64_t ret; - for (;;) { - ret = READ_ONCE(v->counter); - if (atomic_cmpset_64(&v->counter, ret, i)) - break; - } + int64_t ret = atomic64_read(v); + + while (!atomic_fcmpset_64(&v->counter, &ret, i)) + ; return (ret); #endif } @@ -128,9 +125,8 @@ atomic64_cmpxchg(atomic64_t *v, int64_t old, int64_t n int64_t ret = old; for (;;) { - if (atomic_cmpset_64(&v->counter, old, new)) + if (atomic_fcmpset_64(&v->counter, &ret, new)) break; - ret = READ_ONCE(v->counter); if (ret != old) break; } Modified: stable/11/sys/compat/linuxkpi/common/include/linux/bitops.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/bitops.h Thu Aug 16 08:11:17 2018 (r337897) +++ stable/11/sys/compat/linuxkpi/common/include/linux/bitops.h Thu Aug 16 08:12:36 2018 (r337898) @@ -282,10 +282,10 @@ test_and_clear_bit(long bit, volatile unsigned long *v var += BIT_WORD(bit); bit %= BITS_PER_LONG; bit = (1UL << bit); - do { - val = *var; - } while (atomic_cmpset_long(var, val, val & ~bit) == 0); + val = *var; + while (!atomic_fcmpset_long(var, &val, val & ~bit)) + ; return !!(val & bit); } @@ -312,10 +312,10 @@ test_and_set_bit(long bit, volatile unsigned long *var var += BIT_WORD(bit); bit %= BITS_PER_LONG; bit = (1UL << bit); - do { - val = *var; - } while (atomic_cmpset_long(var, val, val | bit) == 0); + val = *var; + while (!atomic_fcmpset_long(var, &val, val | bit)) + ; return !!(val & bit); } From owner-svn-src-stable@freebsd.org Thu Aug 16 09:35:06 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4BEE01083D9B; Thu, 16 Aug 2018 09:35:06 +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 E332676D7F; Thu, 16 Aug 2018 09:35:05 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id D8DEC1A932; Thu, 16 Aug 2018 09:35:05 +0000 (UTC) Date: Thu, 16 Aug 2018 09:35:05 +0000 From: Alexey Dokuchaev To: rgrimes@freebsd.org Cc: Kyle Evans , src-committers , Ed Maste , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, svn-src-stable-11@freebsd.org, Adam Weinberger Subject: Re: svn commit: r337826 - stable/11/bin/ls Message-ID: <20180816093505.GB49543@FreeBSD.org> References: <201808160101.w7G11wZD051008@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201808160101.w7G11wZD051008@pdx.rh.CN85.dnsmgr.net> User-Agent: Mutt/1.9.5 (2018-04-13) X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Aug 2018 09:35:06 -0000 On Wed, Aug 15, 2018 at 06:01:58PM -0700, Rodney W. Grimes wrote: > ... > From some other private discussion with Warner I think it may > be wise at this time to revert the MFC until some other things > are done in 12.0 to address some of the concerns and merge a > more complete solution. +1. It was MFCed too promptly and should be backed out, reworked in -CURRENT to overall consensus and only then merged, after sufficient dust settle period (3-6 months). I also want to express appreciation to Rod for his relentless efforts to keep FreeBSD sanity despite all the negative feedback he's getting. ./danfe From owner-svn-src-stable@freebsd.org Thu Aug 16 09:42:10 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 102A01084054; Thu, 16 Aug 2018 09:42:10 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A3CF97753F; Thu, 16 Aug 2018 09:42:09 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8506817A5B; Thu, 16 Aug 2018 09:42:09 +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 w7G9g97p067308; Thu, 16 Aug 2018 09:42:09 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7G9g9QG067307; Thu, 16 Aug 2018 09:42:09 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201808160942.w7G9g9QG067307@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 16 Aug 2018 09:42:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337902 - stable/11/sys/netpfil/ipfw/pmod X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/11/sys/netpfil/ipfw/pmod X-SVN-Commit-Revision: 337902 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Aug 2018 09:42:10 -0000 Author: ae Date: Thu Aug 16 09:42:09 2018 New Revision: 337902 URL: https://svnweb.freebsd.org/changeset/base/337902 Log: MFC r337469: Use host byte order when comparing mss values. This fixes tcp-setmss action on little endian machines. PR: 225536 Submitted by: John Zielinski Modified: stable/11/sys/netpfil/ipfw/pmod/tcpmod.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netpfil/ipfw/pmod/tcpmod.c ============================================================================== --- stable/11/sys/netpfil/ipfw/pmod/tcpmod.c Thu Aug 16 09:36:59 2018 (r337901) +++ stable/11/sys/netpfil/ipfw/pmod/tcpmod.c Thu Aug 16 09:42:09 2018 (r337902) @@ -98,7 +98,7 @@ tcpmod_setmss(struct mbuf **mp, struct tcphdr *tcp, in ret = 0; /* report success */ bcopy(cp + 2, &oldmss, sizeof(oldmss)); /* Do not update lower MSS value */ - if (oldmss <= mss) + if (ntohs(oldmss) <= ntohs(mss)) break; bcopy(&mss, cp + 2, sizeof(mss)); /* Update checksum if it is not delayed. */ From owner-svn-src-stable@freebsd.org Thu Aug 16 09:29:29 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA0661083B92; Thu, 16 Aug 2018 09:29:28 +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 921947692A; Thu, 16 Aug 2018 09:29:28 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 6D9441A76B; Thu, 16 Aug 2018 09:29:28 +0000 (UTC) Date: Thu, 16 Aug 2018 09:29:28 +0000 From: Alexey Dokuchaev To: Warner Losh Cc: Ian Lepore , src-committers , Ed Maste , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, svn-src-stable-11@freebsd.org, Adam Weinberger , "Rodney W. Grimes" , Kyle Evans Subject: Re: svn commit: r337826 - stable/11/bin/ls Message-ID: <20180816092928.GA49543@FreeBSD.org> References: <201808152026.w7FKQGBN049627@pdx.rh.CN85.dnsmgr.net> <1534364937.1466.11.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.5 (2018-04-13) X-Mailman-Approved-At: Thu, 16 Aug 2018 10:30:05 +0000 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Aug 2018 09:29:29 -0000 On Wed, Aug 15, 2018 at 02:32:54PM -0600, Warner Losh wrote: > On Wed, Aug 15, 2018 at 2:28 PM, Ian Lepore wrote: > > On Wed, 2018-08-15 at 13:26 -0700, Rodney W. Grimes wrote: > > > > > > > > Will backing out the MFC and leaving this a 12.0 feature end this? > > > =( > > > > > > Sadly no, as the person responded with that reaction when > > > they installed 12.0-ALPHA :-(. > > > > So one whiner can demand of the project that any new feature be removed > > before a new release is made? > > This is a good change. It might be a good change, but it's also very controversial. Traditionally, ls(1) was colorless by default. I don't mind adding COLORTERM (albeit see no reason for this: those who wanted colors could always added -G option to their ls(1) alias or set CLICOLOR variable), but it should definitely lean to being colorless unless explicitly asked. As Rod had pointed out, colors mean you now have to stat(2) file listed which is a significant performance impact. So yeah, there are reasons why people are so fussed about it. Why fix something that ain't broken? Why break POLA? ./danfe From owner-svn-src-stable@freebsd.org Thu Aug 16 11:37:50 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00F8E1086DD2; Thu, 16 Aug 2018 11:37:50 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A12847D0E7; Thu, 16 Aug 2018 11:37:49 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 2DD271CFEB; Thu, 16 Aug 2018 11:37:49 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lf1-f53.google.com with SMTP id a134-v6so3153780lfe.6; Thu, 16 Aug 2018 04:37:49 -0700 (PDT) X-Gm-Message-State: AOUpUlGcV7jdcLJH39hhmx/fYRJe48ngRj9m/Rg3oMbdUd0u7M8KT4DG 6liFYvlcBZNN98K4HVKt3JoDl8mhw6a9fUSEmMM= X-Google-Smtp-Source: AA+uWPw4u+We9XRkfJC4RDoK9ZmHMUU/zsYqgSv0/XPONYzjo0ZYoORej9UhgM2B/yoZx8NghJZIAbAMEEjbqDX4sGo= X-Received: by 2002:a19:5154:: with SMTP id f81-v6mr1536499lfb.55.1534419467680; Thu, 16 Aug 2018 04:37:47 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:5742:0:0:0:0:0 with HTTP; Thu, 16 Aug 2018 04:37:27 -0700 (PDT) In-Reply-To: <20180816092928.GA49543@FreeBSD.org> References: <201808152026.w7FKQGBN049627@pdx.rh.CN85.dnsmgr.net> <1534364937.1466.11.camel@freebsd.org> <20180816092928.GA49543@FreeBSD.org> From: Kyle Evans Date: Thu, 16 Aug 2018 06:37:27 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r337826 - stable/11/bin/ls To: Alexey Dokuchaev Cc: Warner Losh , Ian Lepore , src-committers , Ed Maste , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, svn-src-stable-11@freebsd.org, Adam Weinberger , "Rodney W. Grimes" , Kyle Evans Content-Type: text/plain; charset="UTF-8" X-Mailman-Approved-At: Thu, 16 Aug 2018 13:36:19 +0000 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Aug 2018 11:37:50 -0000 On Thu, Aug 16, 2018 at 4:29 AM, Alexey Dokuchaev wrote: > On Wed, Aug 15, 2018 at 02:32:54PM -0600, Warner Losh wrote: >> On Wed, Aug 15, 2018 at 2:28 PM, Ian Lepore wrote: >> > On Wed, 2018-08-15 at 13:26 -0700, Rodney W. Grimes wrote: >> > > > >> > > > Will backing out the MFC and leaving this a 12.0 feature end this? >> > > =( >> > > >> > > Sadly no, as the person responded with that reaction when >> > > they installed 12.0-ALPHA :-(. >> > >> > So one whiner can demand of the project that any new feature be removed >> > before a new release is made? >> >> This is a good change. > > It might be a good change, but it's also very controversial. Traditionally, > ls(1) was colorless by default. I don't mind adding COLORTERM (albeit see > no reason for this: those who wanted colors could always added -G option to > their ls(1) alias or set CLICOLOR variable), but it should definitely lean > to being colorless unless explicitly asked. As Rod had pointed out, colors > mean you now have to stat(2) file listed which is a significant performance > impact. > > So yeah, there are reasons why people are so fussed about it. Why fix > something that ain't broken? Why break POLA? > Please read the diff before responding with stuff like this and your below e-mail. It was already long backed out by the time you responded, and it behaves exactly as you mention in your first paragraph -- COLORTERM must be set to get color, with the caveat that people apparently don't realize their terminal modifies their environment and sets COLORTERM in addition to setting TERM appropriately. Agreed on the documentation, though there's a lot of other things that also invoke the stat(2). Thanks, Kyle Evans From owner-svn-src-stable@freebsd.org Thu Aug 16 15:17:23 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15562106A59E; Thu, 16 Aug 2018 15:17:23 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AFE658707B; Thu, 16 Aug 2018 15:17:22 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9051E1B23F; Thu, 16 Aug 2018 15:17:22 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7GFHMo1039887; Thu, 16 Aug 2018 15:17:22 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7GFHMLZ039886; Thu, 16 Aug 2018 15:17:22 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201808161517.w7GFHMLZ039886@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 16 Aug 2018 15:17:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r337908 - in stable: 10/release/tools 11/release/tools X-SVN-Group: stable-10 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable: 10/release/tools 11/release/tools X-SVN-Commit-Revision: 337908 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Aug 2018 15:17:23 -0000 Author: gjb Date: Thu Aug 16 15:17:22 2018 New Revision: 337908 URL: https://svnweb.freebsd.org/changeset/base/337908 Log: MFC r337717, r337718: r337717: Add lang/python2, lang/python3, and lang/python to GCE images to help avoid hard-coding 'python.' in several scripts in the client-side scripts. [1] r337718: Add a space between a variable and escaped new line. PR: 230248 [1] Sponsored by: The FreeBSD Foundation Modified: stable/10/release/tools/gce.conf Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/release/tools/gce.conf Directory Properties: stable/11/ (props changed) Modified: stable/10/release/tools/gce.conf ============================================================================== --- stable/10/release/tools/gce.conf Thu Aug 16 14:46:49 2018 (r337907) +++ stable/10/release/tools/gce.conf Thu Aug 16 15:17:22 2018 (r337908) @@ -5,10 +5,11 @@ # Set to a list of packages to install. export VM_EXTRA_PACKAGES="firstboot-freebsd-update firstboot-pkgs \ - google-cloud-sdk panicmail sudo sysutils/py-google-compute-engine" + google-cloud-sdk panicmail sudo sysutils/py-google-compute-engine \ + lang/python lang/python2 lang/python3" # Set to a list of third-party software to enable in rc.conf(5). -export VM_RC_LIST="ntpd sshd growfs\ +export VM_RC_LIST="ntpd sshd growfs \ firstboot_pkgs firstboot_freebsd_update google_startup \ google_accounts_daemon google_clock_skew_daemon \ google_instance_setup google_network_daemon" From owner-svn-src-stable@freebsd.org Thu Aug 16 15:17:23 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6CEC3106A5A2; Thu, 16 Aug 2018 15:17:23 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 231368707C; Thu, 16 Aug 2018 15:17:23 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 044A31B240; Thu, 16 Aug 2018 15:17:23 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7GFHMAf039893; Thu, 16 Aug 2018 15:17:22 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7GFHMhv039892; Thu, 16 Aug 2018 15:17:22 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201808161517.w7GFHMhv039892@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 16 Aug 2018 15:17:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337908 - in stable: 10/release/tools 11/release/tools X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable: 10/release/tools 11/release/tools X-SVN-Commit-Revision: 337908 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Aug 2018 15:17:23 -0000 Author: gjb Date: Thu Aug 16 15:17:22 2018 New Revision: 337908 URL: https://svnweb.freebsd.org/changeset/base/337908 Log: MFC r337717, r337718: r337717: Add lang/python2, lang/python3, and lang/python to GCE images to help avoid hard-coding 'python.' in several scripts in the client-side scripts. [1] r337718: Add a space between a variable and escaped new line. PR: 230248 [1] Sponsored by: The FreeBSD Foundation Modified: stable/11/release/tools/gce.conf Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/release/tools/gce.conf Directory Properties: stable/10/ (props changed) Modified: stable/11/release/tools/gce.conf ============================================================================== --- stable/11/release/tools/gce.conf Thu Aug 16 14:46:49 2018 (r337907) +++ stable/11/release/tools/gce.conf Thu Aug 16 15:17:22 2018 (r337908) @@ -5,10 +5,11 @@ # Set to a list of packages to install. export VM_EXTRA_PACKAGES="firstboot-freebsd-update firstboot-pkgs \ - google-cloud-sdk panicmail sudo sysutils/py-google-compute-engine" + google-cloud-sdk panicmail sudo sysutils/py-google-compute-engine \ + lang/python lang/python2 lang/python3" # Set to a list of third-party software to enable in rc.conf(5). -export VM_RC_LIST="ntpd sshd growfs\ +export VM_RC_LIST="ntpd sshd growfs \ firstboot_pkgs firstboot_freebsd_update google_startup \ google_accounts_daemon google_clock_skew_daemon \ google_instance_setup google_network_daemon" From owner-svn-src-stable@freebsd.org Thu Aug 16 15:27:19 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD37B106AAD0; Thu, 16 Aug 2018 15:27:19 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9034388192; Thu, 16 Aug 2018 15:27:19 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7155F1B3FE; Thu, 16 Aug 2018 15:27:19 +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 w7GFRJJt045681; Thu, 16 Aug 2018 15:27:19 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7GFRJSw045680; Thu, 16 Aug 2018 15:27:19 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201808161527.w7GFRJSw045680@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 16 Aug 2018 15:27:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337909 - stable/11/sys/dev/sbni X-SVN-Group: stable-11 X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: stable/11/sys/dev/sbni X-SVN-Commit-Revision: 337909 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Aug 2018 15:27:20 -0000 Author: brooks Date: Thu Aug 16 15:27:19 2018 New Revision: 337909 URL: https://svnweb.freebsd.org/changeset/base/337909 Log: MFC r337727: Copy out from kernel to data, not the other way around. Sponsored by: DARPA, AFRL Modified: stable/11/sys/dev/sbni/if_sbni.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/sbni/if_sbni.c ============================================================================== --- stable/11/sys/dev/sbni/if_sbni.c Thu Aug 16 15:17:22 2018 (r337908) +++ stable/11/sys/dev/sbni/if_sbni.c Thu Aug 16 15:27:19 2018 (r337909) @@ -1153,7 +1153,7 @@ sbni_ioctl(struct ifnet *ifp, u_long command, caddr_t SBNI_LOCK(sc); bcopy(&sc->in_stats, in_stats, sizeof(struct sbni_in_stats)); SBNI_UNLOCK(sc); - error = copyout(ifr_data_get_ptr(ifr), in_stats, + error = copyout(in_stats, ifr_data_get_ptr(ifr), sizeof(struct sbni_in_stats)); free(in_stats, M_DEVBUF); break; From owner-svn-src-stable@freebsd.org Thu Aug 16 15:32:18 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1EFE8106AE0B; Thu, 16 Aug 2018 15:32:18 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C907688611; Thu, 16 Aug 2018 15:32:17 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AA53D1B586; Thu, 16 Aug 2018 15:32:17 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7GFWHaY050450; Thu, 16 Aug 2018 15:32:17 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7GFWHYl050449; Thu, 16 Aug 2018 15:32:17 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201808161532.w7GFWHYl050449@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 16 Aug 2018 15:32:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r337910 - in stable: 10/release/doc/share/xml 11/release/doc/share/xml X-SVN-Group: stable-10 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable: 10/release/doc/share/xml 11/release/doc/share/xml X-SVN-Commit-Revision: 337910 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Aug 2018 15:32:18 -0000 Author: gjb Date: Thu Aug 16 15:32:17 2018 New Revision: 337910 URL: https://svnweb.freebsd.org/changeset/base/337910 Log: Document SA-18:09 through SA-18:11. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/share/xml/security.xml Changes in other areas also in this revision: Modified: stable/11/release/doc/share/xml/security.xml Modified: stable/10/release/doc/share/xml/security.xml ============================================================================== --- stable/10/release/doc/share/xml/security.xml Thu Aug 16 15:27:19 2018 (r337909) +++ stable/10/release/doc/share/xml/security.xml Thu Aug 16 15:32:17 2018 (r337910) @@ -114,6 +114,30 @@ Resource exhaustion in TCP reassembly + + + FreeBSD-SA-18:09.l1tf + 14 August 2018 + L1 Terminal Fault (L1TF) Kernel Information + Disclosure + + + + FreeBSD-SA-18:10.ip + 14 August 2018 + Resource exhaustion in IP fragment + reassembly + + + + FreeBSD-SA-18:11.hostapd + 14 August 2018 + Unauthenticated EAPOL-Key Decryption + Vulnerability + From owner-svn-src-stable@freebsd.org Thu Aug 16 15:32:18 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F41A106AE10; Thu, 16 Aug 2018 15:32:18 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 24F7688613; Thu, 16 Aug 2018 15:32:18 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0792E1B588; Thu, 16 Aug 2018 15:32:18 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7GFWHv9050456; Thu, 16 Aug 2018 15:32:17 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7GFWHiO050455; Thu, 16 Aug 2018 15:32:17 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201808161532.w7GFWHiO050455@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 16 Aug 2018 15:32:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337910 - in stable: 10/release/doc/share/xml 11/release/doc/share/xml X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable: 10/release/doc/share/xml 11/release/doc/share/xml X-SVN-Commit-Revision: 337910 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Aug 2018 15:32:18 -0000 Author: gjb Date: Thu Aug 16 15:32:17 2018 New Revision: 337910 URL: https://svnweb.freebsd.org/changeset/base/337910 Log: Document SA-18:09 through SA-18:11. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/share/xml/security.xml Changes in other areas also in this revision: Modified: stable/10/release/doc/share/xml/security.xml Modified: stable/11/release/doc/share/xml/security.xml ============================================================================== --- stable/11/release/doc/share/xml/security.xml Thu Aug 16 15:27:19 2018 (r337909) +++ stable/11/release/doc/share/xml/security.xml Thu Aug 16 15:32:17 2018 (r337910) @@ -25,6 +25,30 @@ Resource exhaustion in TCP reassembly + + + FreeBSD-SA-18:09.l1tf + 14 August 2018 + L1 Terminal Fault (L1TF) Kernel Information + Disclosure + + + + FreeBSD-SA-18:10.ip + 14 August 2018 + Resource exhaustion in IP fragment + reassembly + + + + FreeBSD-SA-18:11.hostapd + 14 August 2018 + Unauthenticated EAPOL-Key Decryption + Vulnerability + From owner-svn-src-stable@freebsd.org Thu Aug 16 15:54:13 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F16C106BAD0; Thu, 16 Aug 2018 15:54:13 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E84AF899F5; Thu, 16 Aug 2018 15:54:12 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C95EB1B8DE; Thu, 16 Aug 2018 15:54:12 +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 w7GFsC8A061174; Thu, 16 Aug 2018 15:54:12 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7GFsCGq061173; Thu, 16 Aug 2018 15:54:12 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201808161554.w7GFsCGq061173@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 16 Aug 2018 15:54:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r337912 - stable/10/sys/dev/sbni X-SVN-Group: stable-10 X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: stable/10/sys/dev/sbni X-SVN-Commit-Revision: 337912 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Aug 2018 15:54:13 -0000 Author: brooks Date: Thu Aug 16 15:54:12 2018 New Revision: 337912 URL: https://svnweb.freebsd.org/changeset/base/337912 Log: MFC r337727 (rewritten due to unmerged API change in 11+): Copy out from kernel to data, not the other way around. Sponsored by: DARPA, AFRL Modified: stable/10/sys/dev/sbni/if_sbni.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sbni/if_sbni.c ============================================================================== --- stable/10/sys/dev/sbni/if_sbni.c Thu Aug 16 15:44:48 2018 (r337911) +++ stable/10/sys/dev/sbni/if_sbni.c Thu Aug 16 15:54:12 2018 (r337912) @@ -1153,7 +1153,7 @@ sbni_ioctl(struct ifnet *ifp, u_long command, caddr_t SBNI_LOCK(sc); bcopy(&sc->in_stats, in_stats, sizeof(struct sbni_in_stats)); SBNI_UNLOCK(sc); - error = copyout(ifr->ifr_data, in_stats, + error = copyout(in_stats, ifr->ifr_data, sizeof(struct sbni_in_stats)); free(in_stats, M_DEVBUF); break; From owner-svn-src-stable@freebsd.org Thu Aug 16 16:18:39 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8015106C9C6; Thu, 16 Aug 2018 16:18:39 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5B1498AF38; Thu, 16 Aug 2018 16:18:39 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id ED2CB1EC3D; Thu, 16 Aug 2018 16:18:38 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lj1-f178.google.com with SMTP id j19-v6so4130370ljc.7; Thu, 16 Aug 2018 09:18:38 -0700 (PDT) X-Gm-Message-State: AOUpUlHft9YcBIbly9LJBEAK5giYmPJtncW4qSZ6kY8uy5+HxUEsFaqK 4+rOR/noqNtS3K2ip2dWVM62svr1s31gfwpmeV4= X-Google-Smtp-Source: AA+uWPz+wKz7DzDgkrZIMWQDhKBHxYiOX7ENVhC1ErPklZxJCS9fjn+1hoW9RPLPS2I0ieBZJZg5yP/NIsSk1PEcU+A= X-Received: by 2002:a2e:2b0e:: with SMTP id q14-v6mr21006787lje.147.1534436317603; Thu, 16 Aug 2018 09:18:37 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:5742:0:0:0:0:0 with HTTP; Thu, 16 Aug 2018 09:18:17 -0700 (PDT) In-Reply-To: <201808160124.w7G1O1mb051118@pdx.rh.CN85.dnsmgr.net> References: <201808160118.w7G1IL90006511@repo.freebsd.org> <201808160124.w7G1O1mb051118@pdx.rh.CN85.dnsmgr.net> From: Kyle Evans Date: Thu, 16 Aug 2018 11:18:17 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r337884 - stable/11/bin/ls To: "Rodney W. Grimes" Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org, Warner Losh Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Aug 2018 16:18:39 -0000 On Wed, Aug 15, 2018 at 8:24 PM, Rodney W. Grimes wrote: >> Author: kevans >> Date: Thu Aug 16 01:18:20 2018 >> New Revision: 337884 >> URL: https://svnweb.freebsd.org/changeset/base/337884 >> >> Log: >> Revert r337826: MFC of ls(1) COLORTERM honoring >> >> It was not ready, and was much-objected-to. > > Thanks, just objected to, not much. > I think once the --color=foo and the NULL COLORTERM > fix goes in this should work as expected and not > cause the issue seen by the user, or if it does > I can tell them how to get color VIM, but not > color ls without too much magic. > I've opened a review for my --color=foo implementation here: https://reviews.freebsd.org/D16741 Please take a look when you have time. Thanks, Kyle Evans From owner-svn-src-stable@freebsd.org Fri Aug 17 00:49:36 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0016107C490; Fri, 17 Aug 2018 00:49:36 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4E05982412; Fri, 17 Aug 2018 00:49:36 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2C4DA211E3; Fri, 17 Aug 2018 00:49:36 +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 w7H0narj037959; Fri, 17 Aug 2018 00:49:36 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7H0na3c037958; Fri, 17 Aug 2018 00:49:36 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201808170049.w7H0na3c037958@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 17 Aug 2018 00:49:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337942 - stable/11/sys/amd64/amd64 X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/amd64/amd64 X-SVN-Commit-Revision: 337942 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Aug 2018 00:49:36 -0000 Author: kib Date: Fri Aug 17 00:49:35 2018 New Revision: 337942 URL: https://svnweb.freebsd.org/changeset/base/337942 Log: MFC r337770: Fix typo. Modified: stable/11/sys/amd64/amd64/pmap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/pmap.c ============================================================================== --- stable/11/sys/amd64/amd64/pmap.c Fri Aug 17 00:32:00 2018 (r337941) +++ stable/11/sys/amd64/amd64/pmap.c Fri Aug 17 00:49:35 2018 (r337942) @@ -7431,7 +7431,7 @@ pmap_activate_sw(struct thread *td) * pmap_activate_sw(), from the context switch, is * immune to this race, because interrupts are * disabled (while the thread lock is owned), and IPI - * happends after curpmap is updated. Protect other + * happens after curpmap is updated. Protect other * callers in a similar way, by disabling interrupts * around the %cr3 register reload and curpmap * assignment. From owner-svn-src-stable@freebsd.org Fri Aug 17 01:52:16 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38525107DB5F; Fri, 17 Aug 2018 01:52:16 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E2CD9844FD; Fri, 17 Aug 2018 01:52:15 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C40F921D59; Fri, 17 Aug 2018 01:52:15 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7H1qFTV073184; Fri, 17 Aug 2018 01:52:15 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7H1qFoN073183; Fri, 17 Aug 2018 01:52:15 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201808170152.w7H1qFoN073183@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 17 Aug 2018 01:52:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337946 - stable/11 X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11 X-SVN-Commit-Revision: 337946 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Aug 2018 01:52:16 -0000 Author: kevans Date: Fri Aug 17 01:52:15 2018 New Revision: 337946 URL: https://svnweb.freebsd.org/changeset/base/337946 Log: MFC r337559: Makefile.inc1: Add libl to -legacy as well libl is needed for config(8), which is a bootstrap-tool. It is possible to build a system WITHOUT_TOOLCHAIN to exclude lex and thus, libl. We still need to support building from this kind of host, though. While here, group the config(8) dependencies together and add a small explanation. These can likely both be scoped more clearly, but this will need some further investigation. Modified: stable/11/Makefile.inc1 Directory Properties: stable/11/ (props changed) Modified: stable/11/Makefile.inc1 ============================================================================== --- stable/11/Makefile.inc1 Fri Aug 17 01:08:22 2018 (r337945) +++ stable/11/Makefile.inc1 Fri Aug 17 01:52:15 2018 (r337946) @@ -1659,12 +1659,16 @@ update: .PHONY _elftoolchain_libs= lib/libelf lib/libdwarf .endif +# libnv and libl are both requirements for config(8), which is an unconditional +# bootstrap-tool. +_config_deps= lib/libnv usr.bin/lex/lib + legacy: .PHONY .if ${BOOTSTRAPPING} < ${MINIMUM_SUPPORTED_OSREL} && ${BOOTSTRAPPING} != 0 @echo "ERROR: Source upgrades from versions prior to ${MINIMUM_SUPPORTED_REL} are not supported."; \ false .endif -.for _tool in tools/build ${_elftoolchain_libs} lib/libnv +.for _tool in tools/build ${_elftoolchain_libs} ${_config_deps} ${_+_}@${ECHODIR} "===> ${_tool} (obj,includes,all,install)"; \ cd ${.CURDIR}/${_tool}; \ ${MAKE} DIRPRFX=${_tool}/ obj; \ From owner-svn-src-stable@freebsd.org Fri Aug 17 02:46:37 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2688A107F393; Fri, 17 Aug 2018 02:46:37 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C0B84880A2; Fri, 17 Aug 2018 02:46:36 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 95CB7225C2; Fri, 17 Aug 2018 02:46:36 +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 w7H2ka5t099486; Fri, 17 Aug 2018 02:46:36 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7H2kasQ099485; Fri, 17 Aug 2018 02:46:36 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201808170246.w7H2kasQ099485@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 17 Aug 2018 02:46:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337948 - in stable: 10/sys/contrib/ipfilter/netinet 11/sys/contrib/ipfilter/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 10/sys/contrib/ipfilter/netinet 11/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 337948 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Aug 2018 02:46:37 -0000 Author: cy Date: Fri Aug 17 02:46:36 2018 New Revision: 337948 URL: https://svnweb.freebsd.org/changeset/base/337948 Log: MFC r337558, r337560 r337558: Identify the return value (rval) that led to the IPv4 NAT failure in ipf_nat_checkout() and report it in the frb_natv4out and frb_natv4in dtrace probes. This is currently being used to diagnose NAT failures in PR/208566. It's rather handy so this commit makes it available for future diagnosis and debugging efforts. PR: 208566 r337560: Correct a comment. Should have been detected by ipf_nat_in() not ipf_nat_out(). Modified: stable/11/sys/contrib/ipfilter/netinet/ip_nat.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/contrib/ipfilter/netinet/ip_nat.c Directory Properties: stable/10/ (props changed) Modified: stable/11/sys/contrib/ipfilter/netinet/ip_nat.c ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/ip_nat.c Fri Aug 17 01:59:19 2018 (r337947) +++ stable/11/sys/contrib/ipfilter/netinet/ip_nat.c Fri Aug 17 02:46:36 2018 (r337948) @@ -4951,7 +4951,7 @@ retry_roundrobin: case 0 : continue; case -1 : - rval = -1; + rval = -3; goto outmatchfail; case 1 : default : @@ -4996,7 +4996,7 @@ retry_roundrobin: natfailed = 0; break; } - natfailed = -1; + natfailed = -2; } if ((np == NULL) && (nmsk < softn->ipf_nat_map_max)) { nmsk++; @@ -5021,15 +5021,23 @@ outmatchfail: switch (rval) { + case -3 : + /* ipf_nat_match() failure */ + /* FALLTHROUGH */ + case -2 : + /* retry_roundrobin loop failure */ + /* FALLTHROUGH */ case -1 : + /* proxy failure detected by ipf_nat_out() */ if (passp != NULL) { - DT1(frb_natv4out, fr_info_t *, fin); + DT2(frb_natv4out, fr_info_t *, fin, int, rval); NBUMPSIDED(1, ns_drop); *passp = FR_BLOCK; fin->fin_reason = FRB_NATV4; } fin->fin_flx |= FI_BADNAT; NBUMPSIDED(1, ns_badnat); + rval = -1; /* We only return -1 on error. */ break; case 0 : NBUMPSIDE(1, ns_ignored); @@ -5437,7 +5445,7 @@ retry_roundrobin: case 0 : continue; case -1 : - rval = -1; + rval = -3; goto inmatchfail; case 1 : default : @@ -5484,7 +5492,7 @@ retry_roundrobin: natfailed = 0; break; } - natfailed = -1; + natfailed = -2; } if ((np == NULL) && (rmsk < softn->ipf_nat_rdr_max)) { rmsk++; @@ -5509,15 +5517,23 @@ inmatchfail: switch (rval) { + case -3 : + /* ipf_nat_match() failure */ + /* FALLTHROUGH */ + case -2 : + /* retry_roundrobin loop failure */ + /* FALLTHROUGH */ case -1 : + /* proxy failure detected by ipf_nat_out() */ if (passp != NULL) { - DT1(frb_natv4in, fr_info_t *, fin); + DT2(frb_natv4in, fr_info_t *, fin, int, rval); NBUMPSIDED(0, ns_drop); *passp = FR_BLOCK; fin->fin_reason = FRB_NATV4; } fin->fin_flx |= FI_BADNAT; NBUMPSIDED(0, ns_badnat); + rval = -1; /* We only return -1 on error. */ break; case 0 : NBUMPSIDE(0, ns_ignored); From owner-svn-src-stable@freebsd.org Fri Aug 17 02:46:37 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 65FA8107F394; Fri, 17 Aug 2018 02:46:37 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 185AF880A4; Fri, 17 Aug 2018 02:46: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ED9A0225C3; Fri, 17 Aug 2018 02:46:36 +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 w7H2ka9L099492; Fri, 17 Aug 2018 02:46:36 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7H2kaOR099491; Fri, 17 Aug 2018 02:46:36 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201808170246.w7H2kaOR099491@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 17 Aug 2018 02:46:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r337948 - in stable: 10/sys/contrib/ipfilter/netinet 11/sys/contrib/ipfilter/netinet X-SVN-Group: stable-10 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 10/sys/contrib/ipfilter/netinet 11/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 337948 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Aug 2018 02:46:37 -0000 Author: cy Date: Fri Aug 17 02:46:36 2018 New Revision: 337948 URL: https://svnweb.freebsd.org/changeset/base/337948 Log: MFC r337558, r337560 r337558: Identify the return value (rval) that led to the IPv4 NAT failure in ipf_nat_checkout() and report it in the frb_natv4out and frb_natv4in dtrace probes. This is currently being used to diagnose NAT failures in PR/208566. It's rather handy so this commit makes it available for future diagnosis and debugging efforts. PR: 208566 r337560: Correct a comment. Should have been detected by ipf_nat_in() not ipf_nat_out(). Modified: stable/10/sys/contrib/ipfilter/netinet/ip_nat.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/contrib/ipfilter/netinet/ip_nat.c Directory Properties: stable/11/ (props changed) Modified: stable/10/sys/contrib/ipfilter/netinet/ip_nat.c ============================================================================== --- stable/10/sys/contrib/ipfilter/netinet/ip_nat.c Fri Aug 17 01:59:19 2018 (r337947) +++ stable/10/sys/contrib/ipfilter/netinet/ip_nat.c Fri Aug 17 02:46:36 2018 (r337948) @@ -4956,7 +4956,7 @@ retry_roundrobin: case 0 : continue; case -1 : - rval = -1; + rval = -3; goto outmatchfail; case 1 : default : @@ -5001,7 +5001,7 @@ retry_roundrobin: natfailed = 0; break; } - natfailed = -1; + natfailed = -2; } if ((np == NULL) && (nmsk < softn->ipf_nat_map_max)) { nmsk++; @@ -5026,15 +5026,23 @@ outmatchfail: switch (rval) { + case -3 : + /* ipf_nat_match() failure */ + /* FALLTHROUGH */ + case -2 : + /* retry_roundrobin loop failure */ + /* FALLTHROUGH */ case -1 : + /* proxy failure detected by ipf_nat_out() */ if (passp != NULL) { - DT1(frb_natv4out, fr_info_t *, fin); + DT2(frb_natv4out, fr_info_t *, fin, int, rval); NBUMPSIDED(1, ns_drop); *passp = FR_BLOCK; fin->fin_reason = FRB_NATV4; } fin->fin_flx |= FI_BADNAT; NBUMPSIDED(1, ns_badnat); + rval = -1; /* We only return -1 on error. */ break; case 0 : NBUMPSIDE(1, ns_ignored); @@ -5442,7 +5450,7 @@ retry_roundrobin: case 0 : continue; case -1 : - rval = -1; + rval = -3; goto inmatchfail; case 1 : default : @@ -5489,7 +5497,7 @@ retry_roundrobin: natfailed = 0; break; } - natfailed = -1; + natfailed = -2; } if ((np == NULL) && (rmsk < softn->ipf_nat_rdr_max)) { rmsk++; @@ -5514,15 +5522,23 @@ inmatchfail: switch (rval) { + case -3 : + /* ipf_nat_match() failure */ + /* FALLTHROUGH */ + case -2 : + /* retry_roundrobin loop failure */ + /* FALLTHROUGH */ case -1 : + /* proxy failure detected by ipf_nat_in() */ if (passp != NULL) { - DT1(frb_natv4in, fr_info_t *, fin); + DT2(frb_natv4in, fr_info_t *, fin, int, rval); NBUMPSIDED(0, ns_drop); *passp = FR_BLOCK; fin->fin_reason = FRB_NATV4; } fin->fin_flx |= FI_BADNAT; NBUMPSIDED(0, ns_badnat); + rval = -1; /* We only return -1 on error. */ break; case 0 : NBUMPSIDE(0, ns_ignored); From owner-svn-src-stable@freebsd.org Fri Aug 17 03:01:03 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58567107F931; Fri, 17 Aug 2018 03:01:03 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0F1CC888C1; Fri, 17 Aug 2018 03:01:03 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E2DD6227B1; Fri, 17 Aug 2018 03:01:02 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7H312QA009761; Fri, 17 Aug 2018 03:01:02 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7H312aQ009758; Fri, 17 Aug 2018 03:01:02 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201808170301.w7H312aQ009758@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 17 Aug 2018 03:01:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337949 - stable/11/sys/dev/iwn X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/sys/dev/iwn X-SVN-Commit-Revision: 337949 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Aug 2018 03:01:03 -0000 Author: kevans Date: Fri Aug 17 03:01:01 2018 New Revision: 337949 URL: https://svnweb.freebsd.org/changeset/base/337949 Log: MFC r335785, r335812 r335785 by eadler: iwn: Correct Centrino Advanced-N 6235 constants The iwn 6235 is a 2x2 device (see https://ark.intel.com/products/66890/Intel-Centrino-Advanced-N-6235-Dual-Band) r335812 by eadler: iwn: Add the missing IWN_SDID_6035_5 subdevice Modified: stable/11/sys/dev/iwn/if_iwn.c stable/11/sys/dev/iwn/if_iwn_chip_cfg.h stable/11/sys/dev/iwn/if_iwn_devid.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/iwn/if_iwn.c ============================================================================== --- stable/11/sys/dev/iwn/if_iwn.c Fri Aug 17 02:46:36 2018 (r337948) +++ stable/11/sys/dev/iwn/if_iwn.c Fri Aug 17 03:01:01 2018 (r337949) @@ -860,6 +860,7 @@ iwn_config_specific(struct iwn_softc *sc, uint16_t pid case IWN_SDID_6035_2: case IWN_SDID_6035_3: case IWN_SDID_6035_4: + case IWN_SDID_6035_5: sc->fwname = "iwn6000g2bfw"; sc->limits = &iwn6235_sensitivity_limits; sc->base_params = &iwn_6235_base_params; Modified: stable/11/sys/dev/iwn/if_iwn_chip_cfg.h ============================================================================== --- stable/11/sys/dev/iwn/if_iwn_chip_cfg.h Fri Aug 17 02:46:36 2018 (r337948) +++ stable/11/sys/dev/iwn/if_iwn_chip_cfg.h Fri Aug 17 03:01:01 2018 (r337949) @@ -382,8 +382,7 @@ static const struct iwn_base_params iwn_6235_base_para | IWN_FLG_NEED_PHY_CALIB_TEMP_OFFSET ), .support_hostap = false, .no_multi_vaps = true, - /* XXX 1x2? This NIC is 2x2, right? */ - .additional_gp_drv_bit = IWN_GP_DRIVER_6050_1X2, + .additional_gp_drv_bit = 0, .bt_mode = IWN_BT_ADVANCED, .plcp_err_threshold = IWN_PLCP_ERR_DEFAULT_THRESHOLD, }; Modified: stable/11/sys/dev/iwn/if_iwn_devid.h ============================================================================== --- stable/11/sys/dev/iwn/if_iwn_devid.h Fri Aug 17 02:46:36 2018 (r337948) +++ stable/11/sys/dev/iwn/if_iwn_devid.h Fri Aug 17 03:01:01 2018 (r337949) @@ -170,6 +170,7 @@ #define IWN_SDID_6035_2 0x4260 #define IWN_SDID_6035_3 0x4460 #define IWN_SDID_6035_4 0x4860 +#define IWN_SDID_6035_5 0x5260 /* * -------------------------------------------------------------------------- * Device ID for 1030 and 6030 Series From owner-svn-src-stable@freebsd.org Fri Aug 17 03:03:28 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F9B1107FACA; Fri, 17 Aug 2018 03:03:28 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1F85E88E1C; Fri, 17 Aug 2018 03:03:28 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D5C1022984; Fri, 17 Aug 2018 03:03:27 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7H33Rot010699; Fri, 17 Aug 2018 03:03:27 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7H33RPc010698; Fri, 17 Aug 2018 03:03:27 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201808170303.w7H33RPc010698@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 17 Aug 2018 03:03:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337950 - stable/11/sys/net80211 X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/sys/net80211 X-SVN-Commit-Revision: 337950 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Aug 2018 03:03:28 -0000 Author: kevans Date: Fri Aug 17 03:03:27 2018 New Revision: 337950 URL: https://svnweb.freebsd.org/changeset/base/337950 Log: MFC r336184: net80211: Fix ifdetach w/o ifattach, small whitespace cleanup As the comment says, ifdetach might be called during the course of driver detach if initialization failed. This shouldn't be a total failure, though, we just have nothing to do there. This has been modified slightly from Augustin's original commit to move the bail-out slightly earlier since the ic wouldn't have been added to the ic list in the first place, and a comment has been added describing when this might be an issue. Modified: stable/11/sys/net80211/ieee80211.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net80211/ieee80211.c ============================================================================== --- stable/11/sys/net80211/ieee80211.c Fri Aug 17 03:01:01 2018 (r337949) +++ stable/11/sys/net80211/ieee80211.c Fri Aug 17 03:03:27 2018 (r337950) @@ -247,14 +247,14 @@ null_update_chw(struct ieee80211com *ic) int ic_printf(struct ieee80211com *ic, const char * fmt, ...) -{ +{ va_list ap; int retval; retval = printf("%s: ", ic->ic_name); va_start(ap, fmt); retval += vprintf(fmt, ap); - va_end(ap); + va_end(ap); return (retval); } @@ -356,6 +356,15 @@ ieee80211_ifdetach(struct ieee80211com *ic) { struct ieee80211vap *vap; + /* + * We use this as an indicator that ifattach never had a chance to be + * called, e.g. early driver attach failed and ifdetach was called + * during subsequent detach. Never fear, for we have nothing to do + * here. + */ + if (ic->ic_tq == NULL) + return; + mtx_lock(&ic_list_mtx); LIST_REMOVE(ic, ic_next); mtx_unlock(&ic_list_mtx); @@ -635,7 +644,7 @@ ieee80211_vap_attach(struct ieee80211vap *vap, ifm_cha return 1; } -/* +/* * Tear down vap state and reclaim the ifnet. * The driver is assumed to have prepared for * this; e.g. by turning off interrupts for the @@ -1356,7 +1365,7 @@ addmedia(struct ifmedia *media, int caps, int addsta, #define ADD(_ic, _s, _o) \ ifmedia_add(media, \ IFM_MAKEWORD(IFM_IEEE80211, (_s), (_o), 0), 0, NULL) - static const u_int mopts[IEEE80211_MODE_MAX] = { + static const u_int mopts[IEEE80211_MODE_MAX] = { [IEEE80211_MODE_AUTO] = IFM_AUTO, [IEEE80211_MODE_11A] = IFM_IEEE80211_11A, [IEEE80211_MODE_11B] = IFM_IEEE80211_11B, @@ -1954,13 +1963,13 @@ ieee80211_rate2media(struct ieee80211com *ic, int rate case IEEE80211_MODE_11NA: case IEEE80211_MODE_TURBO_A: case IEEE80211_MODE_STURBO_A: - return findmedia(rates, nitems(rates), + return findmedia(rates, nitems(rates), rate | IFM_IEEE80211_11A); case IEEE80211_MODE_11B: - return findmedia(rates, nitems(rates), + return findmedia(rates, nitems(rates), rate | IFM_IEEE80211_11B); case IEEE80211_MODE_FH: - return findmedia(rates, nitems(rates), + return findmedia(rates, nitems(rates), rate | IFM_IEEE80211_FH); case IEEE80211_MODE_AUTO: /* NB: ic may be NULL for some drivers */ From owner-svn-src-stable@freebsd.org Fri Aug 17 03:05:11 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C300107FB73; Fri, 17 Aug 2018 03:05:11 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C569A88F9B; Fri, 17 Aug 2018 03:05:10 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A66FC22989; Fri, 17 Aug 2018 03:05:10 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7H35ASj010832; Fri, 17 Aug 2018 03:05:10 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7H35AtU010830; Fri, 17 Aug 2018 03:05:10 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201808170305.w7H35AtU010830@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 17 Aug 2018 03:05:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337951 - in stable/11/sys: dev/ath dev/bwi net80211 X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable/11/sys: dev/ath dev/bwi net80211 X-SVN-Commit-Revision: 337951 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Aug 2018 03:05:11 -0000 Author: kevans Date: Fri Aug 17 03:05:09 2018 New Revision: 337951 URL: https://svnweb.freebsd.org/changeset/base/337951 Log: MFC r337570-r337573 r337570: bwi(4): Set ic->ic_softc before bwi_getradiocaps to avoid bad deref r337571: net80211: Drain ageq before cleaning it up. The comment above ieee80211_ageq_cleanup specifically notes that the queue is assumed to be empty, and in order to make it so, ieee80211_ageq_drain must be used. r337572: ieee8021_node: fix whitespace issues r337573: ath: Minor style cleanups device_printf => DPRINTF and two whitespace adjustments Modified: stable/11/sys/dev/ath/if_ath_rx_edma.c stable/11/sys/dev/bwi/if_bwi.c stable/11/sys/net80211/ieee80211_node.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ath/if_ath_rx_edma.c ============================================================================== --- stable/11/sys/dev/ath/if_ath_rx_edma.c Fri Aug 17 03:03:27 2018 (r337950) +++ stable/11/sys/dev/ath/if_ath_rx_edma.c Fri Aug 17 03:05:09 2018 (r337951) @@ -166,7 +166,7 @@ ath_edma_stoprecv(struct ath_softc *sc, int dodelay) ath_hal_setrxfilter(ah, 0); /* - * + * */ if (ath_hal_stopdmarecv(ah) == AH_TRUE) sc->sc_rx_stopped = 1; @@ -727,7 +727,7 @@ ath_edma_rxbuf_alloc(struct ath_softc *sc) bf = TAILQ_FIRST(&sc->sc_rxbuf); /* XXX shouldn't happen upon startup? */ if (bf == NULL) { - device_printf(sc->sc_dev, "%s: nothing on rxbuf?!\n", + DPRINTF(sc, ATH_DEBUG_EDMA_RX, "%s: nothing on rxbuf?!\n", __func__); return (NULL); } @@ -808,7 +808,7 @@ ath_edma_rxfifo_alloc(struct ath_softc *sc, HAL_RX_QUE bf = ath_edma_rxbuf_alloc(sc); /* XXX should ensure the FIFO is not NULL? */ if (bf == NULL) { - device_printf(sc->sc_dev, + DPRINTF(sc, ATH_DEBUG_EDMA_RX, "%s: Q%d: alloc failed: i=%d, nbufs=%d?\n", __func__, qtype, @@ -925,7 +925,7 @@ ath_edma_rxfifo_free(struct ath_softc *sc, HAL_RX_QUEU device_printf(sc->sc_dev, "%s: called; qtype=%d\n", __func__, qtype); - + free(re->m_fifo, M_ATHDEV); return (0); Modified: stable/11/sys/dev/bwi/if_bwi.c ============================================================================== --- stable/11/sys/dev/bwi/if_bwi.c Fri Aug 17 03:03:27 2018 (r337950) +++ stable/11/sys/dev/bwi/if_bwi.c Fri Aug 17 03:05:09 2018 (r337951) @@ -488,10 +488,12 @@ bwi_attach(struct bwi_softc *sc) BWI_SPROM_CARD_INFO_LOCALE); DPRINTF(sc, BWI_DBG_ATTACH, "locale: %d\n", sc->sc_locale); /* XXX use locale */ + + ic->ic_softc = sc; + bwi_getradiocaps(ic, IEEE80211_CHAN_MAX, &ic->ic_nchans, ic->ic_channels); - ic->ic_softc = sc; ic->ic_name = device_get_nameunit(dev); ic->ic_caps = IEEE80211_C_STA | IEEE80211_C_SHSLOT | Modified: stable/11/sys/net80211/ieee80211_node.c ============================================================================== --- stable/11/sys/net80211/ieee80211_node.c Fri Aug 17 03:03:27 2018 (r337950) +++ stable/11/sys/net80211/ieee80211_node.c Fri Aug 17 03:05:09 2018 (r337951) @@ -30,13 +30,13 @@ __FBSDID("$FreeBSD$"); #include "opt_wlan.h" #include -#include -#include +#include +#include #include #include #include - + #include #include #include @@ -134,6 +134,7 @@ ieee80211_node_detach(struct ieee80211com *ic) callout_drain(&ic->ic_inact); ieee80211_node_table_cleanup(&ic->ic_sta); + ieee80211_ageq_drain(&ic->ic_stageq); ieee80211_ageq_cleanup(&ic->ic_stageq); } @@ -199,7 +200,7 @@ ieee80211_node_vdetach(struct ieee80211vap *vap) } } -/* +/* * Port authorize/unauthorize interfaces for use by an authenticator. */ @@ -370,7 +371,7 @@ ieee80211_create_ibss(struct ieee80211vap* vap, struct memcpy(ni->ni_meshid, vap->iv_mesh->ms_id, ni->ni_meshidlen); #endif } - /* + /* * Fix the channel and related attributes. */ /* clear DFS CAC state on previous channel */ @@ -550,8 +551,8 @@ check_bss_debug(struct ieee80211vap *vap, struct ieee8 printf("%s\n", fail & 0x10 ? "!" : ""); } #endif /* IEEE80211_DEBUG */ - + int ieee80211_ibss_merge_check(struct ieee80211_node *ni) { @@ -811,7 +812,7 @@ ieee80211_sta_join1(struct ieee80211_node *selbs) * Set the erp state (mostly the slot time) to deal with * the auto-select case; this should be redundant if the * mode is locked. - */ + */ ieee80211_reset_erp(ic); ieee80211_wme_initparams(vap); @@ -1517,7 +1518,7 @@ ieee80211_fakeup_adhoc_node(struct ieee80211vap *vap, /* * In adhoc demo mode there are no management * frames to use to discover neighbor capabilities, - * so blindly propagate the local configuration + * so blindly propagate the local configuration * so we can do interesting things (e.g. use * WME to disable ACK's). */ @@ -2099,7 +2100,7 @@ timeout_stations(void *arg __unused, struct ieee80211_ /* XXX before inact decrement? */ if (ni == vap->iv_bss) return; - if (ni->ni_associd != 0 || + if (ni->ni_associd != 0 || (vap->iv_opmode == IEEE80211_M_IBSS || vap->iv_opmode == IEEE80211_M_AHDEMO)) { /* From owner-svn-src-stable@freebsd.org Fri Aug 17 04:09:46 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D77101081522; Fri, 17 Aug 2018 04:09:46 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8DC3F8AE45; Fri, 17 Aug 2018 04:09:46 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5266E23391; Fri, 17 Aug 2018 04:09:46 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7H49kIH041760; Fri, 17 Aug 2018 04:09:46 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7H49kd5041759; Fri, 17 Aug 2018 04:09:46 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201808170409.w7H49kd5041759@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 17 Aug 2018 04:09:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337954 - stable/11 X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11 X-SVN-Commit-Revision: 337954 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Aug 2018 04:09:47 -0000 Author: kevans Date: Fri Aug 17 04:09:45 2018 New Revision: 337954 URL: https://svnweb.freebsd.org/changeset/base/337954 Log: MFC r337607: Destroy a couple of rogue svn:mergeinfo This is generally just an MFC in spirit- the offending svn:mergeinfo apparently disappeared in r331019. Modified: Directory Properties: stable/11/ (props changed) From owner-svn-src-stable@freebsd.org Fri Aug 17 04:11:11 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6522D10815F1; Fri, 17 Aug 2018 04:11:11 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1BEBA8B004; Fri, 17 Aug 2018 04:11:11 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F1B4F233C6; Fri, 17 Aug 2018 04:11:10 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7H4BAGK044827; Fri, 17 Aug 2018 04:11:10 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7H4BAV1044826; Fri, 17 Aug 2018 04:11:10 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201808170411.w7H4BAV1044826@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 17 Aug 2018 04:11:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337955 - stable/11 X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11 X-SVN-Commit-Revision: 337955 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Aug 2018 04:11:11 -0000 Author: kevans Date: Fri Aug 17 04:11:10 2018 New Revision: 337955 URL: https://svnweb.freebsd.org/changeset/base/337955 Log: MFC r335173, r335195 r335173: extres/regulator: Properly refcount gpio regulators regnode::enable_cnt is generally used to refcount regulator nodes. For GPIOs, the refcount was done on the gpio_entry since more than one regulator can share a GPIO. GPIO regulators were not taking part in the node refcount, since they had their own mechanism. This caused some fallout after manu started disabling everybody's unused regulators in r331989. Refcount it. r335195: Revert r335173 at request of mmel@ This was the wrong solution to the problem; regulator_shutdown invokes regnode_stop. regulator_stop is not a refcounting method, but it invokes regnode_enable, which is. mmel@ has a proposed patch/solution to instead provide regnode_fixed_stop behavior that properly takes shared GPIO pins into account. Modified: Directory Properties: stable/11/ (props changed) From owner-svn-src-stable@freebsd.org Fri Aug 17 06:31:31 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D98471084646; Fri, 17 Aug 2018 06:31:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8D9018F1B2; Fri, 17 Aug 2018 06:31:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6EAD824AC0; Fri, 17 Aug 2018 06:31:30 +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 w7H6VUoq015046; Fri, 17 Aug 2018 06:31:30 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7H6VUEb015045; Fri, 17 Aug 2018 06:31:30 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201808170631.w7H6VUEb015045@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 17 Aug 2018 06:31:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337959 - in stable: 10/sys/dev/hyperv/pcib 11/sys/dev/hyperv/pcib X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 10/sys/dev/hyperv/pcib 11/sys/dev/hyperv/pcib X-SVN-Commit-Revision: 337959 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Aug 2018 06:31:31 -0000 Author: dim Date: Fri Aug 17 06:31:30 2018 New Revision: 337959 URL: https://svnweb.freebsd.org/changeset/base/337959 Log: MFC r337322: Fix build of hyperv with base gcc on i386 Summary: Base gcc fails to compile `sys/dev/hyperv/pcib/vmbus_pcib.c` for i386, with the following -Werror warnings: cc1: warnings being treated as errors /usr/src/sys/dev/hyperv/pcib/vmbus_pcib.c: In function 'new_pcichild_device': /usr/src/sys/dev/hyperv/pcib/vmbus_pcib.c:567: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] /usr/src/sys/dev/hyperv/pcib/vmbus_pcib.c: In function 'vmbus_pcib_on_channel_callback': /usr/src/sys/dev/hyperv/pcib/vmbus_pcib.c:940: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] /usr/src/sys/dev/hyperv/pcib/vmbus_pcib.c: In function 'hv_pci_protocol_negotiation': /usr/src/sys/dev/hyperv/pcib/vmbus_pcib.c:1012: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] /usr/src/sys/dev/hyperv/pcib/vmbus_pcib.c: In function 'hv_pci_enter_d0': /usr/src/sys/dev/hyperv/pcib/vmbus_pcib.c:1073: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] /usr/src/sys/dev/hyperv/pcib/vmbus_pcib.c: In function 'hv_send_resources_allocated': /usr/src/sys/dev/hyperv/pcib/vmbus_pcib.c:1125: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] /usr/src/sys/dev/hyperv/pcib/vmbus_pcib.c: In function 'vmbus_pcib_map_msi': /usr/src/sys/dev/hyperv/pcib/vmbus_pcib.c:1730: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] This is because on i386, several casts from `uint64_t` to a pointer reduce the value from 64 bit to 32 bit. For gcc, this can be fixed by an intermediate cast to uintptr_t. Note that I am assuming the incoming values will always fit into 32 bit! Differential Revision: https://reviews.freebsd.org/D15753 Modified: stable/11/sys/dev/hyperv/pcib/vmbus_pcib.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/hyperv/pcib/vmbus_pcib.c Directory Properties: stable/10/ (props changed) Modified: stable/11/sys/dev/hyperv/pcib/vmbus_pcib.c ============================================================================== --- stable/11/sys/dev/hyperv/pcib/vmbus_pcib.c Fri Aug 17 04:40:01 2018 (r337958) +++ stable/11/sys/dev/hyperv/pcib/vmbus_pcib.c Fri Aug 17 06:31:30 2018 (r337959) @@ -564,7 +564,7 @@ new_pcichild_device(struct hv_pcibus *hbus, struct pci ret = vmbus_chan_send(hbus->sc->chan, VMBUS_CHANPKT_TYPE_INBAND, VMBUS_CHANPKT_FLAG_RC, - res_req, sizeof(*res_req), (uint64_t)&ctxt.pkt); + res_req, sizeof(*res_req), (uint64_t)(uintptr_t)&ctxt.pkt); if (ret) goto err; @@ -937,7 +937,8 @@ vmbus_pcib_on_channel_callback(struct vmbus_channel *c switch (pkt->cph_type) { case VMBUS_CHANPKT_TYPE_COMP: - comp_packet = (struct pci_packet *)pkt->cph_xactid; + comp_packet = + (struct pci_packet *)(uintptr_t)pkt->cph_xactid; response = (struct pci_response *)pkt; comp_packet->completion_func(comp_packet->compl_ctxt, response, bytes_rxed); @@ -1009,7 +1010,7 @@ hv_pci_protocol_negotiation(struct hv_pcibus *hbus) ret = vmbus_chan_send(hbus->sc->chan, VMBUS_CHANPKT_TYPE_INBAND, VMBUS_CHANPKT_FLAG_RC, version_req, sizeof(*version_req), - (uint64_t)&ctxt.pkt); + (uint64_t)(uintptr_t)&ctxt.pkt); if (ret) goto out; @@ -1070,7 +1071,7 @@ hv_pci_enter_d0(struct hv_pcibus *hbus) ret = vmbus_chan_send(hbus->sc->chan, VMBUS_CHANPKT_TYPE_INBAND, VMBUS_CHANPKT_FLAG_RC, d0_entry, sizeof(*d0_entry), - (uint64_t)&ctxt.pkt); + (uint64_t)(uintptr_t)&ctxt.pkt); if (ret) goto out; @@ -1122,7 +1123,8 @@ hv_send_resources_allocated(struct hv_pcibus *hbus) ret = vmbus_chan_send(hbus->sc->chan, VMBUS_CHANPKT_TYPE_INBAND, VMBUS_CHANPKT_FLAG_RC, - &pkt->message, sizeof(*res_assigned), (uint64_t)pkt); + &pkt->message, sizeof(*res_assigned), + (uint64_t)(uintptr_t)pkt); if (ret) { free_completion(&comp_pkt.host_event); break; @@ -1727,7 +1729,7 @@ vmbus_pcib_map_msi(device_t pcib, device_t child, int ret = vmbus_chan_send(sc->chan, VMBUS_CHANPKT_TYPE_INBAND, VMBUS_CHANPKT_FLAG_RC, int_pkt, sizeof(*int_pkt), - (uint64_t)&ctxt.pkt); + (uint64_t)(uintptr_t)&ctxt.pkt); if (ret) { free_completion(&comp.comp_pkt.host_event); return (ret); From owner-svn-src-stable@freebsd.org Fri Aug 17 06:31:31 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 351BD108464A; Fri, 17 Aug 2018 06:31:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DE8D18F1B3; Fri, 17 Aug 2018 06:31:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BC62924AC1; Fri, 17 Aug 2018 06:31:30 +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 w7H6VUfq015052; Fri, 17 Aug 2018 06:31:30 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7H6VU1j015051; Fri, 17 Aug 2018 06:31:30 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201808170631.w7H6VU1j015051@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 17 Aug 2018 06:31:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r337959 - in stable: 10/sys/dev/hyperv/pcib 11/sys/dev/hyperv/pcib X-SVN-Group: stable-10 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 10/sys/dev/hyperv/pcib 11/sys/dev/hyperv/pcib X-SVN-Commit-Revision: 337959 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Aug 2018 06:31:31 -0000 Author: dim Date: Fri Aug 17 06:31:30 2018 New Revision: 337959 URL: https://svnweb.freebsd.org/changeset/base/337959 Log: MFC r337322: Fix build of hyperv with base gcc on i386 Summary: Base gcc fails to compile `sys/dev/hyperv/pcib/vmbus_pcib.c` for i386, with the following -Werror warnings: cc1: warnings being treated as errors /usr/src/sys/dev/hyperv/pcib/vmbus_pcib.c: In function 'new_pcichild_device': /usr/src/sys/dev/hyperv/pcib/vmbus_pcib.c:567: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] /usr/src/sys/dev/hyperv/pcib/vmbus_pcib.c: In function 'vmbus_pcib_on_channel_callback': /usr/src/sys/dev/hyperv/pcib/vmbus_pcib.c:940: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] /usr/src/sys/dev/hyperv/pcib/vmbus_pcib.c: In function 'hv_pci_protocol_negotiation': /usr/src/sys/dev/hyperv/pcib/vmbus_pcib.c:1012: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] /usr/src/sys/dev/hyperv/pcib/vmbus_pcib.c: In function 'hv_pci_enter_d0': /usr/src/sys/dev/hyperv/pcib/vmbus_pcib.c:1073: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] /usr/src/sys/dev/hyperv/pcib/vmbus_pcib.c: In function 'hv_send_resources_allocated': /usr/src/sys/dev/hyperv/pcib/vmbus_pcib.c:1125: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] /usr/src/sys/dev/hyperv/pcib/vmbus_pcib.c: In function 'vmbus_pcib_map_msi': /usr/src/sys/dev/hyperv/pcib/vmbus_pcib.c:1730: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] This is because on i386, several casts from `uint64_t` to a pointer reduce the value from 64 bit to 32 bit. For gcc, this can be fixed by an intermediate cast to uintptr_t. Note that I am assuming the incoming values will always fit into 32 bit! Differential Revision: https://reviews.freebsd.org/D15753 Modified: stable/10/sys/dev/hyperv/pcib/vmbus_pcib.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/dev/hyperv/pcib/vmbus_pcib.c Directory Properties: stable/11/ (props changed) Modified: stable/10/sys/dev/hyperv/pcib/vmbus_pcib.c ============================================================================== --- stable/10/sys/dev/hyperv/pcib/vmbus_pcib.c Fri Aug 17 04:40:01 2018 (r337958) +++ stable/10/sys/dev/hyperv/pcib/vmbus_pcib.c Fri Aug 17 06:31:30 2018 (r337959) @@ -564,7 +564,7 @@ new_pcichild_device(struct hv_pcibus *hbus, struct pci ret = vmbus_chan_send(hbus->sc->chan, VMBUS_CHANPKT_TYPE_INBAND, VMBUS_CHANPKT_FLAG_RC, - res_req, sizeof(*res_req), (uint64_t)&ctxt.pkt); + res_req, sizeof(*res_req), (uint64_t)(uintptr_t)&ctxt.pkt); if (ret) goto err; @@ -937,7 +937,8 @@ vmbus_pcib_on_channel_callback(struct vmbus_channel *c switch (pkt->cph_type) { case VMBUS_CHANPKT_TYPE_COMP: - comp_packet = (struct pci_packet *)pkt->cph_xactid; + comp_packet = + (struct pci_packet *)(uintptr_t)pkt->cph_xactid; response = (struct pci_response *)pkt; comp_packet->completion_func(comp_packet->compl_ctxt, response, bytes_rxed); @@ -1009,7 +1010,7 @@ hv_pci_protocol_negotiation(struct hv_pcibus *hbus) ret = vmbus_chan_send(hbus->sc->chan, VMBUS_CHANPKT_TYPE_INBAND, VMBUS_CHANPKT_FLAG_RC, version_req, sizeof(*version_req), - (uint64_t)&ctxt.pkt); + (uint64_t)(uintptr_t)&ctxt.pkt); if (ret) goto out; @@ -1070,7 +1071,7 @@ hv_pci_enter_d0(struct hv_pcibus *hbus) ret = vmbus_chan_send(hbus->sc->chan, VMBUS_CHANPKT_TYPE_INBAND, VMBUS_CHANPKT_FLAG_RC, d0_entry, sizeof(*d0_entry), - (uint64_t)&ctxt.pkt); + (uint64_t)(uintptr_t)&ctxt.pkt); if (ret) goto out; @@ -1122,7 +1123,8 @@ hv_send_resources_allocated(struct hv_pcibus *hbus) ret = vmbus_chan_send(hbus->sc->chan, VMBUS_CHANPKT_TYPE_INBAND, VMBUS_CHANPKT_FLAG_RC, - &pkt->message, sizeof(*res_assigned), (uint64_t)pkt); + &pkt->message, sizeof(*res_assigned), + (uint64_t)(uintptr_t)pkt); if (ret) { free_completion(&comp_pkt.host_event); break; @@ -1727,7 +1729,7 @@ vmbus_pcib_map_msi(device_t pcib, device_t child, int ret = vmbus_chan_send(sc->chan, VMBUS_CHANPKT_TYPE_INBAND, VMBUS_CHANPKT_FLAG_RC, int_pkt, sizeof(*int_pkt), - (uint64_t)&ctxt.pkt); + (uint64_t)(uintptr_t)&ctxt.pkt); if (ret) { free_completion(&comp.comp_pkt.host_event); return (ret); From owner-svn-src-stable@freebsd.org Fri Aug 17 12:39:01 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0098106CA3B; Fri, 17 Aug 2018 12:39:01 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 486A77AEEF; Fri, 17 Aug 2018 12:39:01 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 269A3715; Fri, 17 Aug 2018 12:39:01 +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 w7HCd1A2001536; Fri, 17 Aug 2018 12:39:01 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7HCd16B001535; Fri, 17 Aug 2018 12:39:01 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201808171239.w7HCd16B001535@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 17 Aug 2018 12:39:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337963 - stable/11/contrib/elftoolchain/readelf X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/contrib/elftoolchain/readelf X-SVN-Commit-Revision: 337963 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Aug 2018 12:39:01 -0000 Author: emaste Date: Fri Aug 17 12:39:00 2018 New Revision: 337963 URL: https://svnweb.freebsd.org/changeset/base/337963 Log: MFC r337569: readelf: display NT_GNU_PROPERTY_TYPE_0 note name NT_GNU_PROPERTY_TYPE_0 in a .note.gnu.property section "contains a program property note which describes special handling requirements for linker and run-time loader." (from the System V Application Binary Interface - Linux Extensions") Intel CET uses two processor-specific program properties in NT_GNU_PROPERTY_TYPE_0: GNU_PROPERTY_X86_FEATURE_1_IBT to indicate that all executable sections are compatible with Indirect Branch Tracking, and GNU_PROPERTY_X86_FEATURE_1_SHSTK to indicate that sections are compatible with shadow stack. A later change should add decoding of the individual properties. Modified: stable/11/contrib/elftoolchain/readelf/readelf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- stable/11/contrib/elftoolchain/readelf/readelf.c Fri Aug 17 12:32:38 2018 (r337962) +++ stable/11/contrib/elftoolchain/readelf/readelf.c Fri Aug 17 12:39:00 2018 (r337963) @@ -1188,6 +1188,7 @@ note_type_gnu(unsigned int nt) case 2: return "NT_GNU_HWCAP (Hardware capabilities)"; case 3: return "NT_GNU_BUILD_ID (Build id set by ld(1))"; case 4: return "NT_GNU_GOLD_VERSION (GNU gold version)"; + case 5: return "NT_GNU_PROPERTY_TYPE_0"; default: return (note_type_unknown(nt)); } } From owner-svn-src-stable@freebsd.org Fri Aug 17 16:04:21 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2B411073A22; Fri, 17 Aug 2018 16:04:21 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 65F6585462; Fri, 17 Aug 2018 16:04:21 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4702E2A19; Fri, 17 Aug 2018 16:04:21 +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 w7HG4Lm9009800; Fri, 17 Aug 2018 16:04:21 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7HG4KKC009797; Fri, 17 Aug 2018 16:04:20 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201808171604.w7HG4KKC009797@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 17 Aug 2018 16:04:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337975 - in stable/11/sys: kern sys X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in stable/11/sys: kern sys X-SVN-Commit-Revision: 337975 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Aug 2018 16:04:21 -0000 Author: markj Date: Fri Aug 17 16:04:20 2018 New Revision: 337975 URL: https://svnweb.freebsd.org/changeset/base/337975 Log: MFC r337328: Don't check rcv sockbuf limits when sending on a unix stream socket. PR: 181741, 212812 Modified: stable/11/sys/kern/uipc_sockbuf.c stable/11/sys/kern/uipc_usrreq.c stable/11/sys/sys/sockbuf.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/uipc_sockbuf.c ============================================================================== --- stable/11/sys/kern/uipc_sockbuf.c Fri Aug 17 15:41:01 2018 (r337974) +++ stable/11/sys/kern/uipc_sockbuf.c Fri Aug 17 16:04:20 2018 (r337975) @@ -888,21 +888,14 @@ sbappendaddr(struct sockbuf *sb, const struct sockaddr return (retval); } -int +void sbappendcontrol_locked(struct sockbuf *sb, struct mbuf *m0, struct mbuf *control) { - struct mbuf *m, *n, *mlast; - int space; + struct mbuf *m, *mlast; - SOCKBUF_LOCK_ASSERT(sb); - - space = m_length(control, &n) + m_length(m0, NULL); - - if (space > sbspace(sb)) - return (0); m_clrprotoflags(m0); - n->m_next = m0; /* concatenate data to control */ + m_last(control)->m_next = m0; SBLASTRECORDCHK(sb); @@ -916,18 +909,15 @@ sbappendcontrol_locked(struct sockbuf *sb, struct mbuf SBLASTMBUFCHK(sb); SBLASTRECORDCHK(sb); - return (1); } -int +void sbappendcontrol(struct sockbuf *sb, struct mbuf *m0, struct mbuf *control) { - int retval; SOCKBUF_LOCK(sb); - retval = sbappendcontrol_locked(sb, m0, control); + sbappendcontrol_locked(sb, m0, control); SOCKBUF_UNLOCK(sb); - return (retval); } /* Modified: stable/11/sys/kern/uipc_usrreq.c ============================================================================== --- stable/11/sys/kern/uipc_usrreq.c Fri Aug 17 15:41:01 2018 (r337974) +++ stable/11/sys/kern/uipc_usrreq.c Fri Aug 17 16:04:20 2018 (r337975) @@ -981,16 +981,22 @@ uipc_send(struct socket *so, int flags, struct mbuf *m unp2->unp_flags &= ~UNP_WANTCRED; control = unp_addsockcred(td, control); } + /* - * Send to paired receive port, and then reduce send buffer - * hiwater marks to maintain backpressure. Wake up readers. + * Send to paired receive port and wake up readers. Don't + * check for space available in the receive buffer if we're + * attaching ancillary data; Unix domain sockets only check + * for space in the sending sockbuf, and that check is + * performed one level up the stack. At that level we cannot + * precisely account for the amount of buffer space used + * (e.g., because control messages are not yet internalized). */ switch (so->so_type) { case SOCK_STREAM: if (control != NULL) { - if (sbappendcontrol_locked(&so2->so_rcv, m, - control)) - control = NULL; + sbappendcontrol_locked(&so2->so_rcv, m, + control); + control = NULL; } else sbappend_locked(&so2->so_rcv, m, flags); break; @@ -999,14 +1005,8 @@ uipc_send(struct socket *so, int flags, struct mbuf *m const struct sockaddr *from; from = &sun_noname; - /* - * Don't check for space available in so2->so_rcv. - * Unix domain sockets only check for space in the - * sending sockbuf, and that check is performed one - * level up the stack. - */ if (sbappendaddr_nospacecheck_locked(&so2->so_rcv, - from, m, control)) + from, m, control)) control = NULL; break; } Modified: stable/11/sys/sys/sockbuf.h ============================================================================== --- stable/11/sys/sys/sockbuf.h Fri Aug 17 15:41:01 2018 (r337974) +++ stable/11/sys/sys/sockbuf.h Fri Aug 17 16:04:20 2018 (r337975) @@ -146,9 +146,9 @@ int sbappendaddr_locked(struct sockbuf *sb, const stru struct mbuf *m0, struct mbuf *control); int sbappendaddr_nospacecheck_locked(struct sockbuf *sb, const struct sockaddr *asa, struct mbuf *m0, struct mbuf *control); -int sbappendcontrol(struct sockbuf *sb, struct mbuf *m0, +void sbappendcontrol(struct sockbuf *sb, struct mbuf *m0, struct mbuf *control); -int sbappendcontrol_locked(struct sockbuf *sb, struct mbuf *m0, +void sbappendcontrol_locked(struct sockbuf *sb, struct mbuf *m0, struct mbuf *control); void sbappendrecord(struct sockbuf *sb, struct mbuf *m0); void sbappendrecord_locked(struct sockbuf *sb, struct mbuf *m0); From owner-svn-src-stable@freebsd.org Fri Aug 17 16:05:00 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 873CA1073AAA; Fri, 17 Aug 2018 16:05:00 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3C45985758; Fri, 17 Aug 2018 16:05: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1B9C62A1D; Fri, 17 Aug 2018 16:05: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 w7HG4xCV009909; Fri, 17 Aug 2018 16:04:59 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7HG4xRN009908; Fri, 17 Aug 2018 16:04:59 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201808171604.w7HG4xRN009908@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 17 Aug 2018 16:04:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337976 - stable/11/sys/x86/x86 X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/sys/x86/x86 X-SVN-Commit-Revision: 337976 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Aug 2018 16:05:00 -0000 Author: markj Date: Fri Aug 17 16:04:59 2018 New Revision: 337976 URL: https://svnweb.freebsd.org/changeset/base/337976 Log: MFC r337230: Verify that each frame pointer lies within the thread's kstack. Modified: stable/11/sys/x86/x86/stack_machdep.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/x86/x86/stack_machdep.c ============================================================================== --- stable/11/sys/x86/x86/stack_machdep.c Fri Aug 17 16:04:20 2018 (r337975) +++ stable/11/sys/x86/x86/stack_machdep.c Fri Aug 17 16:04:59 2018 (r337976) @@ -82,16 +82,16 @@ stack_capture(struct thread *td, struct stack *st, reg stack_zero(st); frame = (x86_frame_t)fp; while (1) { - if (!INKERNEL((long)frame)) + if ((vm_offset_t)frame < td->td_kstack || + (vm_offset_t)frame >= td->td_kstack + + td->td_kstack_pages * PAGE_SIZE) break; callpc = frame->f_retaddr; if (!INKERNEL(callpc)) break; if (stack_put(st, callpc) == -1) break; - if (frame->f_frame <= frame || - (vm_offset_t)frame->f_frame >= td->td_kstack + - td->td_kstack_pages * PAGE_SIZE) + if (frame->f_frame <= frame) break; frame = frame->f_frame; } @@ -106,7 +106,7 @@ stack_nmi_handler(struct trapframe *tf) if (nmi_stack == NULL || curthread != nmi_pending) return (0); - if (INKERNEL(TF_PC(tf)) && (TF_FLAGS(tf) & PSL_I) != 0) + if (!TRAPF_USERMODE(tf) && (TF_FLAGS(tf) & PSL_I) != 0) stack_capture(curthread, nmi_stack, TF_FP(tf)); else /* We were running in usermode or had interrupts disabled. */ From owner-svn-src-stable@freebsd.org Fri Aug 17 18:33:00 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 802001077EDE; Fri, 17 Aug 2018 18:32:59 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3344F8D49C; Fri, 17 Aug 2018 18:32:59 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 149564728; Fri, 17 Aug 2018 18:32:59 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7HIWx0c086604; Fri, 17 Aug 2018 18:32:59 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7HIWrSP086571; Fri, 17 Aug 2018 18:32:53 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201808171832.w7HIWrSP086571@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 17 Aug 2018 18:32:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337982 - in stable/11: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio crypto/openssl/crypto/bn crypto/openssl/crypto/bn/a... X-SVN-Group: stable-11 X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in stable/11: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio crypto/openssl/crypto/bn crypto/openssl/crypto/bn/asm crypto/openssl/crypto/... X-SVN-Commit-Revision: 337982 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Aug 2018 18:33:00 -0000 Author: jkim Date: Fri Aug 17 18:32:53 2018 New Revision: 337982 URL: https://svnweb.freebsd.org/changeset/base/337982 Log: MFC: r337791 Merge OpenSSL 1.0.2p. Added: stable/11/crypto/openssl/crypto/bn_int.h - copied unchanged from r337791, head/crypto/openssl/crypto/bn_int.h stable/11/crypto/openssl/doc/man3/ - copied from r337791, head/crypto/openssl/doc/man3/ stable/11/secure/lib/libcrypto/man/X509_cmp_time.3 - copied unchanged from r337791, head/secure/lib/libcrypto/man/X509_cmp_time.3 Modified: stable/11/crypto/openssl/CHANGES stable/11/crypto/openssl/CONTRIBUTING stable/11/crypto/openssl/Configure stable/11/crypto/openssl/Makefile stable/11/crypto/openssl/NEWS stable/11/crypto/openssl/README stable/11/crypto/openssl/apps/apps.c stable/11/crypto/openssl/apps/asn1pars.c stable/11/crypto/openssl/apps/ca.c stable/11/crypto/openssl/apps/ocsp.c stable/11/crypto/openssl/apps/passwd.c stable/11/crypto/openssl/apps/s_apps.h stable/11/crypto/openssl/apps/s_client.c stable/11/crypto/openssl/apps/s_server.c stable/11/crypto/openssl/apps/s_socket.c stable/11/crypto/openssl/apps/verify.c stable/11/crypto/openssl/crypto/Makefile stable/11/crypto/openssl/crypto/asn1/a_bool.c stable/11/crypto/openssl/crypto/asn1/a_object.c stable/11/crypto/openssl/crypto/asn1/a_strex.c stable/11/crypto/openssl/crypto/asn1/ameth_lib.c stable/11/crypto/openssl/crypto/asn1/asn1.h stable/11/crypto/openssl/crypto/asn1/asn1_err.c stable/11/crypto/openssl/crypto/asn1/tasn_enc.c stable/11/crypto/openssl/crypto/bio/bss_log.c stable/11/crypto/openssl/crypto/bio/bss_mem.c stable/11/crypto/openssl/crypto/bn/Makefile stable/11/crypto/openssl/crypto/bn/asm/armv4-mont.pl stable/11/crypto/openssl/crypto/bn/asm/ia64-mont.pl stable/11/crypto/openssl/crypto/bn/asm/mips-mont.pl stable/11/crypto/openssl/crypto/bn/asm/parisc-mont.pl stable/11/crypto/openssl/crypto/bn/asm/ppc-mont.pl stable/11/crypto/openssl/crypto/bn/asm/ppc64-mont.pl stable/11/crypto/openssl/crypto/bn/asm/rsaz-avx2.pl stable/11/crypto/openssl/crypto/bn/asm/s390x-mont.pl stable/11/crypto/openssl/crypto/bn/asm/sparct4-mont.pl stable/11/crypto/openssl/crypto/bn/asm/sparcv9-mont.pl stable/11/crypto/openssl/crypto/bn/asm/via-mont.pl stable/11/crypto/openssl/crypto/bn/asm/vis3-mont.pl stable/11/crypto/openssl/crypto/bn/asm/x86-mont.pl stable/11/crypto/openssl/crypto/bn/asm/x86_64-mont.pl stable/11/crypto/openssl/crypto/bn/asm/x86_64-mont5.pl stable/11/crypto/openssl/crypto/bn/bn.h stable/11/crypto/openssl/crypto/bn/bn_div.c stable/11/crypto/openssl/crypto/bn/bn_exp.c stable/11/crypto/openssl/crypto/bn/bn_gf2m.c stable/11/crypto/openssl/crypto/bn/bn_lcl.h stable/11/crypto/openssl/crypto/bn/bn_lib.c stable/11/crypto/openssl/crypto/bn/bn_mod.c stable/11/crypto/openssl/crypto/bn/bn_mont.c stable/11/crypto/openssl/crypto/bn/bn_sqr.c stable/11/crypto/openssl/crypto/conf/conf_api.c stable/11/crypto/openssl/crypto/dh/dh_key.c stable/11/crypto/openssl/crypto/dh/dh_pmeth.c stable/11/crypto/openssl/crypto/dsa/dsa.h stable/11/crypto/openssl/crypto/dsa/dsa_err.c stable/11/crypto/openssl/crypto/dsa/dsa_gen.c stable/11/crypto/openssl/crypto/dsa/dsa_ossl.c stable/11/crypto/openssl/crypto/dsa/dsa_pmeth.c stable/11/crypto/openssl/crypto/ec/ec_ameth.c stable/11/crypto/openssl/crypto/ec/ec_lib.c stable/11/crypto/openssl/crypto/ec/ecp_nistz256.c stable/11/crypto/openssl/crypto/ecdsa/Makefile stable/11/crypto/openssl/crypto/ecdsa/ecdsatest.c stable/11/crypto/openssl/crypto/ecdsa/ecs_ossl.c stable/11/crypto/openssl/crypto/engine/eng_lib.c stable/11/crypto/openssl/crypto/engine/tb_asnmth.c stable/11/crypto/openssl/crypto/o_time.c stable/11/crypto/openssl/crypto/opensslv.h stable/11/crypto/openssl/crypto/pem/pem.h stable/11/crypto/openssl/crypto/pem/pem_lib.c stable/11/crypto/openssl/crypto/pem/pem_pk8.c stable/11/crypto/openssl/crypto/pem/pem_pkey.c stable/11/crypto/openssl/crypto/pem/pvkfmt.c stable/11/crypto/openssl/crypto/pkcs12/p12_asn.c stable/11/crypto/openssl/crypto/rsa/Makefile stable/11/crypto/openssl/crypto/rsa/rsa_eay.c stable/11/crypto/openssl/crypto/rsa/rsa_gen.c stable/11/crypto/openssl/crypto/rsa/rsa_oaep.c stable/11/crypto/openssl/crypto/rsa/rsa_pk1.c stable/11/crypto/openssl/crypto/rsa/rsa_sign.c stable/11/crypto/openssl/crypto/rsa/rsa_ssl.c stable/11/crypto/openssl/crypto/sha/asm/sha1-586.pl stable/11/crypto/openssl/crypto/sha/asm/sha256-586.pl stable/11/crypto/openssl/crypto/ui/ui_openssl.c stable/11/crypto/openssl/crypto/x509/x509_cmp.c stable/11/crypto/openssl/crypto/x509/x509_lu.c stable/11/crypto/openssl/crypto/x509/x509_vfy.c stable/11/crypto/openssl/crypto/x509v3/v3_purp.c stable/11/crypto/openssl/doc/apps/cms.pod stable/11/crypto/openssl/doc/apps/config.pod stable/11/crypto/openssl/doc/apps/genpkey.pod stable/11/crypto/openssl/doc/apps/s_client.pod stable/11/crypto/openssl/doc/crypto/BIO_s_fd.pod stable/11/crypto/openssl/doc/crypto/BN_add.pod stable/11/crypto/openssl/doc/crypto/BN_bn2bin.pod stable/11/crypto/openssl/doc/crypto/BN_generate_prime.pod stable/11/crypto/openssl/doc/crypto/CMS_encrypt.pod stable/11/crypto/openssl/doc/crypto/CMS_get0_SignerInfos.pod stable/11/crypto/openssl/doc/crypto/CMS_get1_ReceiptRequest.pod stable/11/crypto/openssl/doc/crypto/DSA_do_sign.pod stable/11/crypto/openssl/doc/crypto/DSA_sign.pod stable/11/crypto/openssl/doc/crypto/OBJ_nid2obj.pod stable/11/crypto/openssl/doc/crypto/SMIME_read_PKCS7.pod stable/11/crypto/openssl/doc/crypto/ecdsa.pod stable/11/crypto/openssl/doc/crypto/pem.pod stable/11/crypto/openssl/doc/fingerprints.txt stable/11/crypto/openssl/doc/ssl/SSL_CTX_use_certificate.pod stable/11/crypto/openssl/doc/ssl/SSL_get_ciphers.pod stable/11/crypto/openssl/doc/ssl/SSL_get_session.pod stable/11/crypto/openssl/doc/ssl/SSL_get_version.pod stable/11/crypto/openssl/doc/ssl/ssl.pod stable/11/crypto/openssl/ssl/d1_both.c stable/11/crypto/openssl/ssl/s3_lib.c stable/11/crypto/openssl/ssl/s3_srvr.c stable/11/crypto/openssl/ssl/ssl.h stable/11/crypto/openssl/ssl/ssl_lib.c stable/11/crypto/openssl/ssl/ssl_locl.h stable/11/crypto/openssl/ssl/t1_lib.c stable/11/crypto/openssl/ssl/t1_trce.c stable/11/crypto/openssl/util/domd stable/11/secure/lib/libcrypto/Makefile.inc stable/11/secure/lib/libcrypto/Makefile.man stable/11/secure/lib/libcrypto/amd64/x86_64-mont.S stable/11/secure/lib/libcrypto/amd64/x86_64-mont5.S stable/11/secure/lib/libcrypto/arm/armv4-mont.S stable/11/secure/lib/libcrypto/i386/x86-mont.S stable/11/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 stable/11/secure/lib/libcrypto/man/ASN1_STRING_length.3 stable/11/secure/lib/libcrypto/man/ASN1_STRING_new.3 stable/11/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 stable/11/secure/lib/libcrypto/man/ASN1_TIME_set.3 stable/11/secure/lib/libcrypto/man/ASN1_generate_nconf.3 stable/11/secure/lib/libcrypto/man/BIO_ctrl.3 stable/11/secure/lib/libcrypto/man/BIO_f_base64.3 stable/11/secure/lib/libcrypto/man/BIO_f_buffer.3 stable/11/secure/lib/libcrypto/man/BIO_f_cipher.3 stable/11/secure/lib/libcrypto/man/BIO_f_md.3 stable/11/secure/lib/libcrypto/man/BIO_f_null.3 stable/11/secure/lib/libcrypto/man/BIO_f_ssl.3 stable/11/secure/lib/libcrypto/man/BIO_find_type.3 stable/11/secure/lib/libcrypto/man/BIO_new.3 stable/11/secure/lib/libcrypto/man/BIO_new_CMS.3 stable/11/secure/lib/libcrypto/man/BIO_push.3 stable/11/secure/lib/libcrypto/man/BIO_read.3 stable/11/secure/lib/libcrypto/man/BIO_s_accept.3 stable/11/secure/lib/libcrypto/man/BIO_s_bio.3 stable/11/secure/lib/libcrypto/man/BIO_s_connect.3 stable/11/secure/lib/libcrypto/man/BIO_s_fd.3 stable/11/secure/lib/libcrypto/man/BIO_s_file.3 stable/11/secure/lib/libcrypto/man/BIO_s_mem.3 stable/11/secure/lib/libcrypto/man/BIO_s_null.3 stable/11/secure/lib/libcrypto/man/BIO_s_socket.3 stable/11/secure/lib/libcrypto/man/BIO_set_callback.3 stable/11/secure/lib/libcrypto/man/BIO_should_retry.3 stable/11/secure/lib/libcrypto/man/BN_BLINDING_new.3 stable/11/secure/lib/libcrypto/man/BN_CTX_new.3 stable/11/secure/lib/libcrypto/man/BN_CTX_start.3 stable/11/secure/lib/libcrypto/man/BN_add.3 stable/11/secure/lib/libcrypto/man/BN_add_word.3 stable/11/secure/lib/libcrypto/man/BN_bn2bin.3 stable/11/secure/lib/libcrypto/man/BN_cmp.3 stable/11/secure/lib/libcrypto/man/BN_copy.3 stable/11/secure/lib/libcrypto/man/BN_generate_prime.3 stable/11/secure/lib/libcrypto/man/BN_mod_inverse.3 stable/11/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 stable/11/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 stable/11/secure/lib/libcrypto/man/BN_new.3 stable/11/secure/lib/libcrypto/man/BN_num_bytes.3 stable/11/secure/lib/libcrypto/man/BN_rand.3 stable/11/secure/lib/libcrypto/man/BN_set_bit.3 stable/11/secure/lib/libcrypto/man/BN_swap.3 stable/11/secure/lib/libcrypto/man/BN_zero.3 stable/11/secure/lib/libcrypto/man/CMS_add0_cert.3 stable/11/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 stable/11/secure/lib/libcrypto/man/CMS_add1_signer.3 stable/11/secure/lib/libcrypto/man/CMS_compress.3 stable/11/secure/lib/libcrypto/man/CMS_decrypt.3 stable/11/secure/lib/libcrypto/man/CMS_encrypt.3 stable/11/secure/lib/libcrypto/man/CMS_final.3 stable/11/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 stable/11/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 stable/11/secure/lib/libcrypto/man/CMS_get0_type.3 stable/11/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 stable/11/secure/lib/libcrypto/man/CMS_sign.3 stable/11/secure/lib/libcrypto/man/CMS_sign_receipt.3 stable/11/secure/lib/libcrypto/man/CMS_uncompress.3 stable/11/secure/lib/libcrypto/man/CMS_verify.3 stable/11/secure/lib/libcrypto/man/CMS_verify_receipt.3 stable/11/secure/lib/libcrypto/man/CONF_modules_free.3 stable/11/secure/lib/libcrypto/man/CONF_modules_load_file.3 stable/11/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 stable/11/secure/lib/libcrypto/man/DH_generate_key.3 stable/11/secure/lib/libcrypto/man/DH_generate_parameters.3 stable/11/secure/lib/libcrypto/man/DH_get_ex_new_index.3 stable/11/secure/lib/libcrypto/man/DH_new.3 stable/11/secure/lib/libcrypto/man/DH_set_method.3 stable/11/secure/lib/libcrypto/man/DH_size.3 stable/11/secure/lib/libcrypto/man/DSA_SIG_new.3 stable/11/secure/lib/libcrypto/man/DSA_do_sign.3 stable/11/secure/lib/libcrypto/man/DSA_dup_DH.3 stable/11/secure/lib/libcrypto/man/DSA_generate_key.3 stable/11/secure/lib/libcrypto/man/DSA_generate_parameters.3 stable/11/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 stable/11/secure/lib/libcrypto/man/DSA_new.3 stable/11/secure/lib/libcrypto/man/DSA_set_method.3 stable/11/secure/lib/libcrypto/man/DSA_sign.3 stable/11/secure/lib/libcrypto/man/DSA_size.3 stable/11/secure/lib/libcrypto/man/EC_GFp_simple_method.3 stable/11/secure/lib/libcrypto/man/EC_GROUP_copy.3 stable/11/secure/lib/libcrypto/man/EC_GROUP_new.3 stable/11/secure/lib/libcrypto/man/EC_KEY_new.3 stable/11/secure/lib/libcrypto/man/EC_POINT_add.3 stable/11/secure/lib/libcrypto/man/EC_POINT_new.3 stable/11/secure/lib/libcrypto/man/ERR_GET_LIB.3 stable/11/secure/lib/libcrypto/man/ERR_clear_error.3 stable/11/secure/lib/libcrypto/man/ERR_error_string.3 stable/11/secure/lib/libcrypto/man/ERR_get_error.3 stable/11/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 stable/11/secure/lib/libcrypto/man/ERR_load_strings.3 stable/11/secure/lib/libcrypto/man/ERR_print_errors.3 stable/11/secure/lib/libcrypto/man/ERR_put_error.3 stable/11/secure/lib/libcrypto/man/ERR_remove_state.3 stable/11/secure/lib/libcrypto/man/ERR_set_mark.3 stable/11/secure/lib/libcrypto/man/EVP_BytesToKey.3 stable/11/secure/lib/libcrypto/man/EVP_DigestInit.3 stable/11/secure/lib/libcrypto/man/EVP_DigestSignInit.3 stable/11/secure/lib/libcrypto/man/EVP_DigestVerifyInit.3 stable/11/secure/lib/libcrypto/man/EVP_EncodeInit.3 stable/11/secure/lib/libcrypto/man/EVP_EncryptInit.3 stable/11/secure/lib/libcrypto/man/EVP_OpenInit.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_CTX_new.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_cmp.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_decrypt.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_derive.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_encrypt.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_get_default_digest.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_keygen.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_meth_new.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_new.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_print_private.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_sign.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_verify.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_verify_recover.3 stable/11/secure/lib/libcrypto/man/EVP_SealInit.3 stable/11/secure/lib/libcrypto/man/EVP_SignInit.3 stable/11/secure/lib/libcrypto/man/EVP_VerifyInit.3 stable/11/secure/lib/libcrypto/man/OBJ_nid2obj.3 stable/11/secure/lib/libcrypto/man/OPENSSL_Applink.3 stable/11/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 stable/11/secure/lib/libcrypto/man/OPENSSL_config.3 stable/11/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 stable/11/secure/lib/libcrypto/man/OPENSSL_instrument_bus.3 stable/11/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 stable/11/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 stable/11/secure/lib/libcrypto/man/PEM_write_bio_CMS_stream.3 stable/11/secure/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3 stable/11/secure/lib/libcrypto/man/PKCS12_create.3 stable/11/secure/lib/libcrypto/man/PKCS12_parse.3 stable/11/secure/lib/libcrypto/man/PKCS7_decrypt.3 stable/11/secure/lib/libcrypto/man/PKCS7_encrypt.3 stable/11/secure/lib/libcrypto/man/PKCS7_sign.3 stable/11/secure/lib/libcrypto/man/PKCS7_sign_add_signer.3 stable/11/secure/lib/libcrypto/man/PKCS7_verify.3 stable/11/secure/lib/libcrypto/man/RAND_add.3 stable/11/secure/lib/libcrypto/man/RAND_bytes.3 stable/11/secure/lib/libcrypto/man/RAND_cleanup.3 stable/11/secure/lib/libcrypto/man/RAND_egd.3 stable/11/secure/lib/libcrypto/man/RAND_load_file.3 stable/11/secure/lib/libcrypto/man/RAND_set_rand_method.3 stable/11/secure/lib/libcrypto/man/RSA_blinding_on.3 stable/11/secure/lib/libcrypto/man/RSA_check_key.3 stable/11/secure/lib/libcrypto/man/RSA_generate_key.3 stable/11/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 stable/11/secure/lib/libcrypto/man/RSA_new.3 stable/11/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 stable/11/secure/lib/libcrypto/man/RSA_print.3 stable/11/secure/lib/libcrypto/man/RSA_private_encrypt.3 stable/11/secure/lib/libcrypto/man/RSA_public_encrypt.3 stable/11/secure/lib/libcrypto/man/RSA_set_method.3 stable/11/secure/lib/libcrypto/man/RSA_sign.3 stable/11/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 stable/11/secure/lib/libcrypto/man/RSA_size.3 stable/11/secure/lib/libcrypto/man/SMIME_read_CMS.3 stable/11/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 stable/11/secure/lib/libcrypto/man/SMIME_write_CMS.3 stable/11/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 stable/11/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 stable/11/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 stable/11/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 stable/11/secure/lib/libcrypto/man/X509_NAME_print_ex.3 stable/11/secure/lib/libcrypto/man/X509_STORE_CTX_get_error.3 stable/11/secure/lib/libcrypto/man/X509_STORE_CTX_get_ex_new_index.3 stable/11/secure/lib/libcrypto/man/X509_STORE_CTX_new.3 stable/11/secure/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 stable/11/secure/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 stable/11/secure/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 stable/11/secure/lib/libcrypto/man/X509_check_host.3 stable/11/secure/lib/libcrypto/man/X509_check_private_key.3 stable/11/secure/lib/libcrypto/man/X509_new.3 stable/11/secure/lib/libcrypto/man/X509_verify_cert.3 stable/11/secure/lib/libcrypto/man/bio.3 stable/11/secure/lib/libcrypto/man/blowfish.3 stable/11/secure/lib/libcrypto/man/bn.3 stable/11/secure/lib/libcrypto/man/bn_internal.3 stable/11/secure/lib/libcrypto/man/buffer.3 stable/11/secure/lib/libcrypto/man/crypto.3 stable/11/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 stable/11/secure/lib/libcrypto/man/d2i_CMS_ContentInfo.3 stable/11/secure/lib/libcrypto/man/d2i_DHparams.3 stable/11/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 stable/11/secure/lib/libcrypto/man/d2i_ECPKParameters.3 stable/11/secure/lib/libcrypto/man/d2i_ECPrivateKey.3 stable/11/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 stable/11/secure/lib/libcrypto/man/d2i_PrivateKey.3 stable/11/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 stable/11/secure/lib/libcrypto/man/d2i_X509.3 stable/11/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 stable/11/secure/lib/libcrypto/man/d2i_X509_CRL.3 stable/11/secure/lib/libcrypto/man/d2i_X509_NAME.3 stable/11/secure/lib/libcrypto/man/d2i_X509_REQ.3 stable/11/secure/lib/libcrypto/man/d2i_X509_SIG.3 stable/11/secure/lib/libcrypto/man/des.3 stable/11/secure/lib/libcrypto/man/dh.3 stable/11/secure/lib/libcrypto/man/dsa.3 stable/11/secure/lib/libcrypto/man/ec.3 stable/11/secure/lib/libcrypto/man/ecdsa.3 stable/11/secure/lib/libcrypto/man/engine.3 stable/11/secure/lib/libcrypto/man/err.3 stable/11/secure/lib/libcrypto/man/evp.3 stable/11/secure/lib/libcrypto/man/hmac.3 stable/11/secure/lib/libcrypto/man/i2d_CMS_bio_stream.3 stable/11/secure/lib/libcrypto/man/i2d_PKCS7_bio_stream.3 stable/11/secure/lib/libcrypto/man/lh_stats.3 stable/11/secure/lib/libcrypto/man/lhash.3 stable/11/secure/lib/libcrypto/man/md5.3 stable/11/secure/lib/libcrypto/man/mdc2.3 stable/11/secure/lib/libcrypto/man/pem.3 stable/11/secure/lib/libcrypto/man/rand.3 stable/11/secure/lib/libcrypto/man/rc4.3 stable/11/secure/lib/libcrypto/man/ripemd.3 stable/11/secure/lib/libcrypto/man/rsa.3 stable/11/secure/lib/libcrypto/man/sha.3 stable/11/secure/lib/libcrypto/man/threads.3 stable/11/secure/lib/libcrypto/man/ui.3 stable/11/secure/lib/libcrypto/man/ui_compat.3 stable/11/secure/lib/libcrypto/man/x509.3 stable/11/secure/lib/libssl/Makefile.man stable/11/secure/lib/libssl/man/SSL_CIPHER_get_name.3 stable/11/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 stable/11/secure/lib/libssl/man/SSL_CONF_CTX_new.3 stable/11/secure/lib/libssl/man/SSL_CONF_CTX_set1_prefix.3 stable/11/secure/lib/libssl/man/SSL_CONF_CTX_set_flags.3 stable/11/secure/lib/libssl/man/SSL_CONF_CTX_set_ssl_ctx.3 stable/11/secure/lib/libssl/man/SSL_CONF_cmd.3 stable/11/secure/lib/libssl/man/SSL_CONF_cmd_argv.3 stable/11/secure/lib/libssl/man/SSL_CTX_add1_chain_cert.3 stable/11/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 stable/11/secure/lib/libssl/man/SSL_CTX_add_session.3 stable/11/secure/lib/libssl/man/SSL_CTX_ctrl.3 stable/11/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 stable/11/secure/lib/libssl/man/SSL_CTX_free.3 stable/11/secure/lib/libssl/man/SSL_CTX_get0_param.3 stable/11/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 stable/11/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 stable/11/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 stable/11/secure/lib/libssl/man/SSL_CTX_new.3 stable/11/secure/lib/libssl/man/SSL_CTX_sess_number.3 stable/11/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 stable/11/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 stable/11/secure/lib/libssl/man/SSL_CTX_sessions.3 stable/11/secure/lib/libssl/man/SSL_CTX_set1_curves.3 stable/11/secure/lib/libssl/man/SSL_CTX_set1_verify_cert_store.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_alpn_select_cb.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_cert_cb.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_custom_cli_ext.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_mode.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_options.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_psk_client_callback.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_read_ahead.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_timeout.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_tlsext_servername_callback.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_tlsext_status_cb.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_verify.3 stable/11/secure/lib/libssl/man/SSL_CTX_use_certificate.3 stable/11/secure/lib/libssl/man/SSL_CTX_use_psk_identity_hint.3 stable/11/secure/lib/libssl/man/SSL_CTX_use_serverinfo.3 stable/11/secure/lib/libssl/man/SSL_SESSION_free.3 stable/11/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 stable/11/secure/lib/libssl/man/SSL_SESSION_get_time.3 stable/11/secure/lib/libssl/man/SSL_accept.3 stable/11/secure/lib/libssl/man/SSL_alert_type_string.3 stable/11/secure/lib/libssl/man/SSL_check_chain.3 stable/11/secure/lib/libssl/man/SSL_clear.3 stable/11/secure/lib/libssl/man/SSL_connect.3 stable/11/secure/lib/libssl/man/SSL_do_handshake.3 stable/11/secure/lib/libssl/man/SSL_export_keying_material.3 stable/11/secure/lib/libssl/man/SSL_free.3 stable/11/secure/lib/libssl/man/SSL_get_SSL_CTX.3 stable/11/secure/lib/libssl/man/SSL_get_ciphers.3 stable/11/secure/lib/libssl/man/SSL_get_client_CA_list.3 stable/11/secure/lib/libssl/man/SSL_get_current_cipher.3 stable/11/secure/lib/libssl/man/SSL_get_default_timeout.3 stable/11/secure/lib/libssl/man/SSL_get_error.3 stable/11/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 stable/11/secure/lib/libssl/man/SSL_get_ex_new_index.3 stable/11/secure/lib/libssl/man/SSL_get_fd.3 stable/11/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 stable/11/secure/lib/libssl/man/SSL_get_peer_certificate.3 stable/11/secure/lib/libssl/man/SSL_get_psk_identity.3 stable/11/secure/lib/libssl/man/SSL_get_rbio.3 stable/11/secure/lib/libssl/man/SSL_get_session.3 stable/11/secure/lib/libssl/man/SSL_get_verify_result.3 stable/11/secure/lib/libssl/man/SSL_get_version.3 stable/11/secure/lib/libssl/man/SSL_library_init.3 stable/11/secure/lib/libssl/man/SSL_load_client_CA_file.3 stable/11/secure/lib/libssl/man/SSL_new.3 stable/11/secure/lib/libssl/man/SSL_pending.3 stable/11/secure/lib/libssl/man/SSL_read.3 stable/11/secure/lib/libssl/man/SSL_rstate_string.3 stable/11/secure/lib/libssl/man/SSL_session_reused.3 stable/11/secure/lib/libssl/man/SSL_set_bio.3 stable/11/secure/lib/libssl/man/SSL_set_connect_state.3 stable/11/secure/lib/libssl/man/SSL_set_fd.3 stable/11/secure/lib/libssl/man/SSL_set_session.3 stable/11/secure/lib/libssl/man/SSL_set_shutdown.3 stable/11/secure/lib/libssl/man/SSL_set_verify_result.3 stable/11/secure/lib/libssl/man/SSL_shutdown.3 stable/11/secure/lib/libssl/man/SSL_state_string.3 stable/11/secure/lib/libssl/man/SSL_want.3 stable/11/secure/lib/libssl/man/SSL_write.3 stable/11/secure/lib/libssl/man/d2i_SSL_SESSION.3 stable/11/secure/lib/libssl/man/ssl.3 stable/11/secure/usr.bin/openssl/man/CA.pl.1 stable/11/secure/usr.bin/openssl/man/asn1parse.1 stable/11/secure/usr.bin/openssl/man/ca.1 stable/11/secure/usr.bin/openssl/man/ciphers.1 stable/11/secure/usr.bin/openssl/man/cms.1 stable/11/secure/usr.bin/openssl/man/crl.1 stable/11/secure/usr.bin/openssl/man/crl2pkcs7.1 stable/11/secure/usr.bin/openssl/man/dgst.1 stable/11/secure/usr.bin/openssl/man/dhparam.1 stable/11/secure/usr.bin/openssl/man/dsa.1 stable/11/secure/usr.bin/openssl/man/dsaparam.1 stable/11/secure/usr.bin/openssl/man/ec.1 stable/11/secure/usr.bin/openssl/man/ecparam.1 stable/11/secure/usr.bin/openssl/man/enc.1 stable/11/secure/usr.bin/openssl/man/errstr.1 stable/11/secure/usr.bin/openssl/man/gendsa.1 stable/11/secure/usr.bin/openssl/man/genpkey.1 stable/11/secure/usr.bin/openssl/man/genrsa.1 stable/11/secure/usr.bin/openssl/man/nseq.1 stable/11/secure/usr.bin/openssl/man/ocsp.1 stable/11/secure/usr.bin/openssl/man/openssl.1 stable/11/secure/usr.bin/openssl/man/passwd.1 stable/11/secure/usr.bin/openssl/man/pkcs12.1 stable/11/secure/usr.bin/openssl/man/pkcs7.1 stable/11/secure/usr.bin/openssl/man/pkcs8.1 stable/11/secure/usr.bin/openssl/man/pkey.1 stable/11/secure/usr.bin/openssl/man/pkeyparam.1 stable/11/secure/usr.bin/openssl/man/pkeyutl.1 stable/11/secure/usr.bin/openssl/man/rand.1 stable/11/secure/usr.bin/openssl/man/req.1 stable/11/secure/usr.bin/openssl/man/rsa.1 stable/11/secure/usr.bin/openssl/man/rsautl.1 stable/11/secure/usr.bin/openssl/man/s_client.1 stable/11/secure/usr.bin/openssl/man/s_server.1 stable/11/secure/usr.bin/openssl/man/s_time.1 stable/11/secure/usr.bin/openssl/man/sess_id.1 stable/11/secure/usr.bin/openssl/man/smime.1 stable/11/secure/usr.bin/openssl/man/speed.1 stable/11/secure/usr.bin/openssl/man/spkac.1 stable/11/secure/usr.bin/openssl/man/ts.1 stable/11/secure/usr.bin/openssl/man/tsget.1 stable/11/secure/usr.bin/openssl/man/verify.1 stable/11/secure/usr.bin/openssl/man/version.1 stable/11/secure/usr.bin/openssl/man/x509.1 stable/11/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/crypto/openssl/CHANGES ============================================================================== --- stable/11/crypto/openssl/CHANGES Fri Aug 17 18:24:11 2018 (r337981) +++ stable/11/crypto/openssl/CHANGES Fri Aug 17 18:32:53 2018 (r337982) @@ -7,6 +7,64 @@ https://github.com/openssl/openssl/commits/ and pick the appropriate release branch. + Changes between 1.0.2o and 1.0.2p [14 Aug 2018] + + *) Client DoS due to large DH parameter + + During key agreement in a TLS handshake using a DH(E) based ciphersuite a + malicious server can send a very large prime value to the client. This will + cause the client to spend an unreasonably long period of time generating a + key for this prime resulting in a hang until the client has finished. This + could be exploited in a Denial Of Service attack. + + This issue was reported to OpenSSL on 5th June 2018 by Guido Vranken + (CVE-2018-0732) + [Guido Vranken] + + *) Cache timing vulnerability in RSA Key Generation + + The OpenSSL RSA Key generation algorithm has been shown to be vulnerable to + a cache timing side channel attack. An attacker with sufficient access to + mount cache timing attacks during the RSA key generation process could + recover the private key. + + This issue was reported to OpenSSL on 4th April 2018 by Alejandro Cabrera + Aldaya, Billy Brumley, Cesar Pereida Garcia and Luis Manuel Alvarez Tapia. + (CVE-2018-0737) + [Billy Brumley] + + *) Make EVP_PKEY_asn1_new() a bit stricter about its input. A NULL pem_str + parameter is no longer accepted, as it leads to a corrupt table. NULL + pem_str is reserved for alias entries only. + [Richard Levitte] + + *) Revert blinding in ECDSA sign and instead make problematic addition + length-invariant. Switch even to fixed-length Montgomery multiplication. + [Andy Polyakov] + + *) Change generating and checking of primes so that the error rate of not + being prime depends on the intended use based on the size of the input. + For larger primes this will result in more rounds of Miller-Rabin. + The maximal error rate for primes with more than 1080 bits is lowered + to 2^-128. + [Kurt Roeckx, Annie Yousar] + + *) Increase the number of Miller-Rabin rounds for DSA key generating to 64. + [Kurt Roeckx] + + *) Add blinding to ECDSA and DSA signatures to protect against side channel + attacks discovered by Keegan Ryan (NCC Group). + [Matt Caswell] + + *) When unlocking a pass phrase protected PEM file or PKCS#8 container, we + now allow empty (zero character) pass phrases. + [Richard Levitte] + + *) Certificate time validation (X509_cmp_time) enforces stricter + compliance with RFC 5280. Fractional seconds and timezone offsets + are no longer allowed. + [Emilia Käsper] + Changes between 1.0.2n and 1.0.2o [27 Mar 2018] *) Constructed ASN.1 types with a recursive definition could exceed the stack Modified: stable/11/crypto/openssl/CONTRIBUTING ============================================================================== --- stable/11/crypto/openssl/CONTRIBUTING Fri Aug 17 18:24:11 2018 (r337981) +++ stable/11/crypto/openssl/CONTRIBUTING Fri Aug 17 18:32:53 2018 (r337982) @@ -1,27 +1,27 @@ -HOW TO CONTRIBUTE PATCHES TO OpenSSL ------------------------------------- +HOW TO CONTRIBUTE TO OpenSSL +---------------------------- (Please visit https://www.openssl.org/community/getting-started.html for other ideas about how to contribute.) -Development is coordinated on the openssl-dev mailing list (see the -above link or https://mta.openssl.org for information on subscribing). -If you are unsure as to whether a feature will be useful for the general -OpenSSL community you might want to discuss it on the openssl-dev mailing -list first. Someone may be already working on the same thing or there -may be a good reason as to why that feature isn't implemented. +Development is done on GitHub, https://github.com/openssl/openssl. -To submit a patch, make a pull request on GitHub. If you think the patch -could use feedback from the community, please start a thread on openssl-dev -to discuss it. +To request new features or report bugs, please open an issue on GitHub -Having addressed the following items before the PR will help make the -acceptance and review process faster: +To submit a patch, please open a pull request on GitHub. If you are thinking +of making a large contribution, open an issue for it before starting work, +to get comments from the community. Someone may be already working on +the same thing or there may be reasons why that feature isn't implemented. - 1. Anything other than trivial contributions will require a contributor - licensing agreement, giving us permission to use your code. See - https://www.openssl.org/policies/cla.html for details. +To make it easier to review and accept your pull request, please follow these +guidelines: + 1. Anything other than a trivial contribution requires a Contributor + License Agreement (CLA), giving us permission to use your code. See + https://www.openssl.org/policies/cla.html for details. If your + contribution is too small to require a CLA, put "CLA: trivial" on a + line by itself in your commit message body. + 2. All source files should start with the following text (with appropriate comment characters at the start of each line and the year(s) updated): @@ -34,21 +34,21 @@ acceptance and review process faster: https://www.openssl.org/source/license.html 3. Patches should be as current as possible; expect to have to rebase - often. We do not accept merge commits; You will be asked to remove - them before a patch is considered acceptable. + often. We do not accept merge commits, you will have to remove them + (usually by rebasing) before it will be acceptable. 4. Patches should follow our coding style (see - https://www.openssl.org/policies/codingstyle.html) and compile without - warnings. Where gcc or clang is availble you should use the + https://www.openssl.org/policies/codingstyle.html) and compile + without warnings. Where gcc or clang is available you should use the --strict-warnings Configure option. OpenSSL compiles on many varied - platforms: try to ensure you only use portable features. - Clean builds via Travis and AppVeyor are expected, and done whenever - a PR is created or updated. + platforms: try to ensure you only use portable features. Clean builds + via Travis and AppVeyor are required, and they are started automatically + whenever a PR is created or updated. 5. When at all possible, patches should include tests. These can either be added to an existing test, or completely new. Please see test/README for information on the test framework. 6. New features or changed functionality must include - documentation. Please look at the "pod" files in doc/apps, doc/crypto - and doc/ssl for examples of our style. + documentation. Please look at the "pod" files in doc for + examples of our style. Modified: stable/11/crypto/openssl/Configure ============================================================================== --- stable/11/crypto/openssl/Configure Fri Aug 17 18:24:11 2018 (r337981) +++ stable/11/crypto/openssl/Configure Fri Aug 17 18:32:53 2018 (r337982) @@ -1173,6 +1173,7 @@ foreach (sort (keys %disabled)) $depflags .= " -DOPENSSL_NO_$ALGO"; } } + if (/^comp$/) { $zlib = 0; } } print "\n"; @@ -1671,6 +1672,13 @@ while () { } close(PIPE); +# Xcode did not handle $cc -M before clang support +my $cc_as_makedepend = 0; +if ($predefined{__GNUC__} >= 3 && !(defined($predefined{__APPLE_CC__}) + && !defined($predefined{__clang__}))) { + $cc_as_makedepend = 1; +} + if ($strict_warnings) { my $wopt; @@ -1730,14 +1738,14 @@ while () s/^NM=\s*/NM= \$\(CROSS_COMPILE\)/; s/^RANLIB=\s*/RANLIB= \$\(CROSS_COMPILE\)/; s/^RC=\s*/RC= \$\(CROSS_COMPILE\)/; - s/^MAKEDEPPROG=.*$/MAKEDEPPROG= \$\(CROSS_COMPILE\)$cc/ if $predefined{__GNUC__} >= 3; + s/^MAKEDEPPROG=.*$/MAKEDEPPROG= \$\(CROSS_COMPILE\)$cc/ if $cc_as_makedepend; } else { s/^CC=.*$/CC= $cc/; s/^AR=\s*ar/AR= $ar/; s/^RANLIB=.*/RANLIB= $ranlib/; s/^RC=.*/RC= $windres/; - s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $predefined{__GNUC__} >= 3; + s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $cc_as_makedepend; } s/^CFLAG=.*$/CFLAG= $cflags/; s/^DEPFLAG=.*$/DEPFLAG=$depflags/; Modified: stable/11/crypto/openssl/Makefile ============================================================================== --- stable/11/crypto/openssl/Makefile Fri Aug 17 18:24:11 2018 (r337981) +++ stable/11/crypto/openssl/Makefile Fri Aug 17 18:32:53 2018 (r337982) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=1.0.2o +VERSION=1.0.2p MAJOR=1 MINOR=0.2 SHLIB_VERSION_NUMBER=1.0.0 Modified: stable/11/crypto/openssl/NEWS ============================================================================== --- stable/11/crypto/openssl/NEWS Fri Aug 17 18:24:11 2018 (r337981) +++ stable/11/crypto/openssl/NEWS Fri Aug 17 18:32:53 2018 (r337982) @@ -5,6 +5,11 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.0.2o and OpenSSL 1.0.2p [14 Aug 2018] + + o Client DoS due to large DH parameter (CVE-2018-0732) + o Cache timing vulnerability in RSA Key Generation (CVE-2018-0737) + Major changes between OpenSSL 1.0.2n and OpenSSL 1.0.2o [27 Mar 2018] o Constructed ASN.1 types with a recursive definition could exceed the Modified: stable/11/crypto/openssl/README ============================================================================== --- stable/11/crypto/openssl/README Fri Aug 17 18:24:11 2018 (r337981) +++ stable/11/crypto/openssl/README Fri Aug 17 18:32:53 2018 (r337982) @@ -1,7 +1,7 @@ - OpenSSL 1.0.2o 27 Mar 2018 + OpenSSL 1.0.2p 14 Aug 2018 - Copyright (c) 1998-2015 The OpenSSL Project + Copyright (c) 1998-2018 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson All rights reserved. Modified: stable/11/crypto/openssl/apps/apps.c ============================================================================== --- stable/11/crypto/openssl/apps/apps.c Fri Aug 17 18:24:11 2018 (r337981) +++ stable/11/crypto/openssl/apps/apps.c Fri Aug 17 18:32:53 2018 (r337982) @@ -56,7 +56,7 @@ * [including the GNU Public Licence.] */ /* ==================================================================== - * Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved. + * Copyright (c) 1998-2018 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -1359,7 +1359,8 @@ int set_name_ex(unsigned long *flags, const char *arg) }; if (set_multi_opts(flags, arg, ex_tbl) == 0) return 0; - if ((*flags & XN_FLAG_SEP_MASK) == 0) + if (*flags != XN_FLAG_COMPAT + && (*flags & XN_FLAG_SEP_MASK) == 0) *flags |= XN_FLAG_SEP_CPLUS_SPC; return 1; } Modified: stable/11/crypto/openssl/apps/asn1pars.c ============================================================================== --- stable/11/crypto/openssl/apps/asn1pars.c Fri Aug 17 18:24:11 2018 (r337981) +++ stable/11/crypto/openssl/apps/asn1pars.c Fri Aug 17 18:32:53 2018 (r337982) @@ -295,7 +295,7 @@ int MAIN(int argc, char **argv) ASN1_TYPE *atmp; int typ; j = atoi(sk_OPENSSL_STRING_value(osk, i)); - if (j == 0) { + if (j <= 0 || j >= tmplen) { BIO_printf(bio_err, "'%s' is an invalid number\n", sk_OPENSSL_STRING_value(osk, i)); continue; @@ -327,14 +327,14 @@ int MAIN(int argc, char **argv) num = tmplen; } - if (offset >= num) { - BIO_printf(bio_err, "Error: offset too large\n"); + if (offset < 0 || offset >= num) { + BIO_printf(bio_err, "Error: offset out of range\n"); goto end; } num -= offset; - if ((length == 0) || ((long)length > num)) + if (length == 0 || length > (unsigned int)num) length = (unsigned int)num; if (derout) { if (BIO_write(derout, str + offset, length) != (int)length) { Modified: stable/11/crypto/openssl/apps/ca.c ============================================================================== --- stable/11/crypto/openssl/apps/ca.c Fri Aug 17 18:24:11 2018 (r337981) +++ stable/11/crypto/openssl/apps/ca.c Fri Aug 17 18:32:53 2018 (r337982) @@ -1176,10 +1176,13 @@ int MAIN(int argc, char **argv) if (j > 0) { total_done++; BIO_printf(bio_err, "\n"); - if (!BN_add_word(serial, 1)) + if (!BN_add_word(serial, 1)) { + X509_free(x); goto err; + } if (!sk_X509_push(cert_sk, x)) { BIO_printf(bio_err, "Memory allocation failure\n"); + X509_free(x); goto err; } } Modified: stable/11/crypto/openssl/apps/ocsp.c ============================================================================== --- stable/11/crypto/openssl/apps/ocsp.c Fri Aug 17 18:24:11 2018 (r337981) +++ stable/11/crypto/openssl/apps/ocsp.c Fri Aug 17 18:32:53 2018 (r337982) @@ -4,7 +4,7 @@ * 2000. */ /* ==================================================================== - * Copyright (c) 1999 The OpenSSL Project. All rights reserved. + * Copyright (c) 1999-2018 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -787,7 +787,6 @@ int MAIN(int argc, char **argv) OCSP_response_status_str(i), i); if (ignore_err) goto redo_accept; - ret = 0; goto end; } Modified: stable/11/crypto/openssl/apps/passwd.c ============================================================================== --- stable/11/crypto/openssl/apps/passwd.c Fri Aug 17 18:24:11 2018 (r337981) +++ stable/11/crypto/openssl/apps/passwd.c Fri Aug 17 18:32:53 2018 (r337982) @@ -306,9 +306,9 @@ static char *md5crypt(const char *passwd, const char * out_buf[0] = '$'; out_buf[1] = 0; assert(strlen(magic) <= 4); /* "1" or "apr1" */ - strncat(out_buf, magic, 4); - strncat(out_buf, "$", 1); - strncat(out_buf, salt, 8); + BUF_strlcat(out_buf, magic, sizeof(out_buf)); + BUF_strlcat(out_buf, "$", sizeof(out_buf)); + BUF_strlcat(out_buf, salt, sizeof(out_buf)); assert(strlen(out_buf) <= 6 + 8); /* "$apr1$..salt.." */ salt_out = out_buf + 2 + strlen(magic); salt_len = strlen(salt_out); Modified: stable/11/crypto/openssl/apps/s_apps.h ============================================================================== --- stable/11/crypto/openssl/apps/s_apps.h Fri Aug 17 18:24:11 2018 (r337981) +++ stable/11/crypto/openssl/apps/s_apps.h Fri Aug 17 18:32:53 2018 (r337982) @@ -56,7 +56,7 @@ * [including the GNU Public Licence.] */ /* ==================================================================== - * Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved. + * Copyright (c) 1998-2018 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -152,9 +152,8 @@ typedef fd_mask fd_set; #define PROTOCOL "tcp" int do_server(int port, int type, int *ret, - int (*cb) (char *hostname, int s, int stype, - unsigned char *context), unsigned char *context, - int naccept); + int (*cb) (int s, int stype, unsigned char *context), + unsigned char *context, int naccept); #ifdef HEADER_X509_H int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx); #endif Modified: stable/11/crypto/openssl/apps/s_client.c ============================================================================== --- stable/11/crypto/openssl/apps/s_client.c Fri Aug 17 18:24:11 2018 (r337981) +++ stable/11/crypto/openssl/apps/s_client.c Fri Aug 17 18:32:53 2018 (r337982) @@ -56,7 +56,7 @@ * [including the GNU Public Licence.] */ /* ==================================================================== - * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. + * Copyright (c) 1998-2018 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -337,7 +337,7 @@ static void sc_usage(void) BIO_printf(bio_err, " -prexit - print session information even on connection failure\n"); BIO_printf(bio_err, - " -showcerts - show all certificates in the chain\n"); + " -showcerts - Show all certificates sent by the server\n"); BIO_printf(bio_err, " -debug - extra output\n"); #ifdef WATT32 BIO_printf(bio_err, " -wdebug - WATT-32 tcp debugging\n"); Modified: stable/11/crypto/openssl/apps/s_server.c ============================================================================== --- stable/11/crypto/openssl/apps/s_server.c Fri Aug 17 18:24:11 2018 (r337981) +++ stable/11/crypto/openssl/apps/s_server.c Fri Aug 17 18:32:53 2018 (r337982) @@ -56,7 +56,7 @@ * [including the GNU Public Licence.] */ /* ==================================================================== - * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. + * Copyright (c) 1998-2018 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -209,9 +209,9 @@ typedef unsigned int u_int; #ifndef OPENSSL_NO_RSA static RSA MS_CALLBACK *tmp_rsa_cb(SSL *s, int is_export, int keylength); #endif -static int sv_body(char *hostname, int s, int stype, unsigned char *context); -static int www_body(char *hostname, int s, int stype, unsigned char *context); -static int rev_body(char *hostname, int s, int stype, unsigned char *context); +static int sv_body(int s, int stype, unsigned char *context); +static int www_body(int s, int stype, unsigned char *context); +static int rev_body(int s, int stype, unsigned char *context); static void close_accept_socket(void); static void sv_usage(void); static int init_ssl_connection(SSL *s); @@ -1087,11 +1087,14 @@ int MAIN(int argc, char *argv[]) char *chCApath = NULL, *chCAfile = NULL; char *vfyCApath = NULL, *vfyCAfile = NULL; unsigned char *context = NULL; +#ifndef OPENSSL_NO_DH char *dhfile = NULL; + int no_dhe = 0; +#endif int badop = 0; int ret = 1; int build_chain = 0; - int no_tmp_rsa = 0, no_dhe = 0, no_ecdhe = 0, nocert = 0; + int no_tmp_rsa = 0, no_ecdhe = 0, nocert = 0; int state = 0; const SSL_METHOD *meth = NULL; int socket_type = SOCK_STREAM; @@ -1239,11 +1242,15 @@ int MAIN(int argc, char *argv[]) if (--argc < 1) goto bad; s_chain_file = *(++argv); - } else if (strcmp(*argv, "-dhparam") == 0) { + } +#ifndef OPENSSL_NO_DH + else if (strcmp(*argv, "-dhparam") == 0) { if (--argc < 1) goto bad; dhfile = *(++argv); - } else if (strcmp(*argv, "-dcertform") == 0) { + } +#endif + else if (strcmp(*argv, "-dcertform") == 0) { if (--argc < 1) goto bad; s_dcert_format = str2fmt(*(++argv)); @@ -1390,9 +1397,13 @@ int MAIN(int argc, char *argv[]) verify_quiet = 1; } else if (strcmp(*argv, "-no_tmp_rsa") == 0) { no_tmp_rsa = 1; - } else if (strcmp(*argv, "-no_dhe") == 0) { + } +#ifndef OPENSSL_NO_DH + else if (strcmp(*argv, "-no_dhe") == 0) { no_dhe = 1; - } else if (strcmp(*argv, "-no_ecdhe") == 0) { + } +#endif + else if (strcmp(*argv, "-no_ecdhe") == 0) { no_ecdhe = 1; } else if (strcmp(*argv, "-no_resume_ephemeral") == 0) { no_resume_ephemeral = 1; @@ -2165,7 +2176,7 @@ static void print_stats(BIO *bio, SSL_CTX *ssl_ctx) SSL_CTX_sess_get_cache_size(ssl_ctx)); } -static int sv_body(char *hostname, int s, int stype, unsigned char *context) +static int sv_body(int s, int stype, unsigned char *context) { char *buf = NULL; fd_set readfds; @@ -2780,7 +2791,7 @@ static int load_CA(SSL_CTX *ctx, char *file) } #endif -static int www_body(char *hostname, int s, int stype, unsigned char *context) +static int www_body(int s, int stype, unsigned char *context) { char *buf = NULL; int ret = 1; @@ -3183,7 +3194,7 @@ static int www_body(char *hostname, int s, int stype, return (ret); } -static int rev_body(char *hostname, int s, int stype, unsigned char *context) +static int rev_body(int s, int stype, unsigned char *context) { char *buf = NULL; int i; Modified: stable/11/crypto/openssl/apps/s_socket.c ============================================================================== --- stable/11/crypto/openssl/apps/s_socket.c Fri Aug 17 18:24:11 2018 (r337981) +++ stable/11/crypto/openssl/apps/s_socket.c Fri Aug 17 18:32:53 2018 (r337982) @@ -109,7 +109,7 @@ static int ssl_sock_init(void); static int init_client_ip(int *sock, unsigned char ip[4], int port, int type); static int init_server(int *sock, int port, int type); static int init_server_long(int *sock, int port, char *ip, int type); -static int do_accept(int acc_sock, int *sock, char **host); +static int do_accept(int acc_sock, int *sock); static int host_ip(char *str, unsigned char ip[4]); # ifdef OPENSSL_SYS_WIN16 @@ -290,12 +290,10 @@ static int init_client_ip(int *sock, unsigned char ip[ } int do_server(int port, int type, int *ret, - int (*cb) (char *hostname, int s, int stype, - unsigned char *context), unsigned char *context, - int naccept) + int (*cb) (int s, int stype, unsigned char *context), + unsigned char *context, int naccept) { int sock; - char *name = NULL; int accept_socket = 0; int i; @@ -308,15 +306,13 @@ int do_server(int port, int type, int *ret, } for (;;) { if (type == SOCK_STREAM) { - if (do_accept(accept_socket, &sock, &name) == 0) { + if (do_accept(accept_socket, &sock) == 0) { SHUTDOWN(accept_socket); return (0); } } else sock = accept_socket; - i = (*cb) (name, sock, type, context); - if (name != NULL) - OPENSSL_free(name); + i = (*cb) (sock, type, context); if (type == SOCK_STREAM) SHUTDOWN2(sock); if (naccept != -1) @@ -386,30 +382,24 @@ static int init_server(int *sock, int port, int type) return (init_server_long(sock, port, NULL, type)); } -static int do_accept(int acc_sock, int *sock, char **host) +static int do_accept(int acc_sock, int *sock) { int ret; - struct hostent *h1, *h2; - static struct sockaddr_in from; - int len; -/* struct linger ling; */ if (!ssl_sock_init()) - return (0); + return 0; # ifndef OPENSSL_SYS_WINDOWS redoit: # endif - memset((char *)&from, 0, sizeof(from)); - len = sizeof(from); /* * Note: under VMS with SOCKETSHR the fourth parameter is currently of * type (int *) whereas under other systems it is (void *) if you don't * have a cast it will choke the compiler: if you do have a cast then you * can either go for (int *) or (void *). */ - ret = accept(acc_sock, (struct sockaddr *)&from, (void *)&len); + ret = accept(acc_sock, NULL, NULL); if (ret == INVALID_SOCKET) { # if defined(OPENSSL_SYS_WINDOWS) || (defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK)) int i; @@ -425,56 +415,11 @@ static int do_accept(int acc_sock, int *sock, char **h fprintf(stderr, "errno=%d ", errno); perror("accept"); # endif - return (0); + return 0; } -/*- - ling.l_onoff=1; - ling.l_linger=0; - i=setsockopt(ret,SOL_SOCKET,SO_LINGER,(char *)&ling,sizeof(ling)); - if (i < 0) { perror("linger"); return(0); } - i=0; - i=setsockopt(ret,SOL_SOCKET,SO_KEEPALIVE,(char *)&i,sizeof(i)); - if (i < 0) { perror("keepalive"); return(0); } -*/ - - if (host == NULL) - goto end; -# ifndef BIT_FIELD_LIMITS - /* I should use WSAAsyncGetHostByName() under windows */ - h1 = gethostbyaddr((char *)&from.sin_addr.s_addr, - sizeof(from.sin_addr.s_addr), AF_INET); -# else - h1 = gethostbyaddr((char *)&from.sin_addr, - sizeof(struct in_addr), AF_INET); -# endif - if (h1 == NULL) { - BIO_printf(bio_err, "bad gethostbyaddr\n"); - *host = NULL; - /* return(0); */ - } else { - if ((*host = (char *)OPENSSL_malloc(strlen(h1->h_name) + 1)) == NULL) { - perror("OPENSSL_malloc"); - closesocket(ret); - return (0); - } - BUF_strlcpy(*host, h1->h_name, strlen(h1->h_name) + 1); - - h2 = GetHostByName(*host); - if (h2 == NULL) { - BIO_printf(bio_err, "gethostbyname failure\n"); - closesocket(ret); - return (0); - } - if (h2->h_addrtype != AF_INET) { - BIO_printf(bio_err, "gethostbyname addr is not AF_INET\n"); - closesocket(ret); - return (0); - } - } - end: *sock = ret; - return (1); + return 1; } int extract_host_port(char *str, char **host_ptr, unsigned char *ip, Modified: stable/11/crypto/openssl/apps/verify.c ============================================================================== --- stable/11/crypto/openssl/apps/verify.c Fri Aug 17 18:24:11 2018 (r337981) +++ stable/11/crypto/openssl/apps/verify.c Fri Aug 17 18:32:53 2018 (r337982) @@ -277,6 +277,7 @@ static int check(X509_STORE *ctx, char *file, X509_STORE_set_flags(ctx, vflags); if (!X509_STORE_CTX_init(csc, ctx, x, uchain)) { ERR_print_errors(bio_err); + X509_STORE_CTX_free(csc); goto end; } if (tchain) Modified: stable/11/crypto/openssl/crypto/Makefile ============================================================================== --- stable/11/crypto/openssl/crypto/Makefile Fri Aug 17 18:24:11 2018 (r337981) +++ stable/11/crypto/openssl/crypto/Makefile Fri Aug 17 18:32:53 2018 (r337982) @@ -46,7 +46,7 @@ SRC= $(LIBSRC) EXHEADER= crypto.h opensslv.h opensslconf.h ebcdic.h symhacks.h \ ossl_typ.h HEADER= cryptlib.h buildinf.h md32_common.h o_time.h o_str.h o_dir.h \ - constant_time_locl.h $(EXHEADER) + constant_time_locl.h bn_int.h $(EXHEADER) ALL= $(GENERAL) $(SRC) $(HEADER) Modified: stable/11/crypto/openssl/crypto/asn1/a_bool.c ============================================================================== --- stable/11/crypto/openssl/crypto/asn1/a_bool.c Fri Aug 17 18:24:11 2018 (r337981) +++ stable/11/crypto/openssl/crypto/asn1/a_bool.c Fri Aug 17 18:32:53 2018 (r337982) @@ -63,17 +63,31 @@ int i2d_ASN1_BOOLEAN(int a, unsigned char **pp) { int r; - unsigned char *p; + unsigned char *p, *allocated = NULL; r = ASN1_object_size(0, 1, V_ASN1_BOOLEAN); if (pp == NULL) return (r); - p = *pp; + if (*pp == NULL) { + if ((p = allocated = OPENSSL_malloc(r)) == NULL) { + ASN1err(ASN1_F_I2D_ASN1_BOOLEAN, ERR_R_MALLOC_FAILURE); + return 0; + } + } else { + p = *pp; + } + ASN1_put_object(&p, 0, 1, V_ASN1_BOOLEAN, V_ASN1_UNIVERSAL); - *(p++) = (unsigned char)a; - *pp = p; - return (r); + *p = (unsigned char)a; + + + /* + * If a new buffer was allocated, just return it back. + * If not, return the incremented buffer pointer. + */ + *pp = allocated != NULL ? allocated : p + 1; + return r; } int d2i_ASN1_BOOLEAN(int *a, const unsigned char **pp, long length) Modified: stable/11/crypto/openssl/crypto/asn1/a_object.c ============================================================================== --- stable/11/crypto/openssl/crypto/asn1/a_object.c Fri Aug 17 18:24:11 2018 (r337981) +++ stable/11/crypto/openssl/crypto/asn1/a_object.c Fri Aug 17 18:32:53 2018 (r337982) @@ -66,7 +66,7 @@ int i2d_ASN1_OBJECT(ASN1_OBJECT *a, unsigned char **pp) { - unsigned char *p; + unsigned char *p, *allocated = NULL; int objsize; if ((a == NULL) || (a->data == NULL)) @@ -76,13 +76,24 @@ int i2d_ASN1_OBJECT(ASN1_OBJECT *a, unsigned char **pp if (pp == NULL || objsize == -1) return objsize; - p = *pp; + if (*pp == NULL) { + if ((p = allocated = OPENSSL_malloc(objsize)) == NULL) { + ASN1err(ASN1_F_I2D_ASN1_OBJECT, ERR_R_MALLOC_FAILURE); + return 0; + } + } else { + p = *pp; + } + ASN1_put_object(&p, 0, a->length, V_ASN1_OBJECT, V_ASN1_UNIVERSAL); memcpy(p, a->data, a->length); - p += a->length; - *pp = p; - return (objsize); + /* + * If a new buffer was allocated, just return it back. + * If not, return the incremented buffer pointer. + */ + *pp = allocated != NULL ? allocated : p + a->length; + return objsize; } int a2d_ASN1_OBJECT(unsigned char *out, int olen, const char *buf, int num) Modified: stable/11/crypto/openssl/crypto/asn1/a_strex.c ============================================================================== --- stable/11/crypto/openssl/crypto/asn1/a_strex.c Fri Aug 17 18:24:11 2018 (r337981) +++ stable/11/crypto/openssl/crypto/asn1/a_strex.c Fri Aug 17 18:32:53 2018 (r337982) @@ -4,7 +4,7 @@ * 2000. */ /* ==================================================================== - * Copyright (c) 2000 The OpenSSL Project. All rights reserved. + * Copyright (c) 2000-2018 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -194,18 +194,38 @@ static int do_buf(unsigned char *buf, int buflen, int type, unsigned char flags, char *quotes, char_io *io_ch, void *arg) { - int i, outlen, len; + int i, outlen, len, charwidth; unsigned char orflags, *p, *q; unsigned long c; p = buf; q = buf + buflen; outlen = 0; + charwidth = type & BUF_TYPE_WIDTH_MASK; + + switch (charwidth) { + case 4: + if (buflen & 3) { + ASN1err(ASN1_F_DO_BUF, ASN1_R_INVALID_UNIVERSALSTRING_LENGTH); + return -1; + } + break; + case 2: + if (buflen & 1) { + ASN1err(ASN1_F_DO_BUF, ASN1_R_INVALID_BMPSTRING_LENGTH); + return -1; + } + break; + default: + break; + } + while (p != q) { if (p == buf && flags & ASN1_STRFLGS_ESC_2253) orflags = CHARTYPE_FIRST_ESC_2253; else orflags = 0; - switch (type & BUF_TYPE_WIDTH_MASK) { + + switch (charwidth) { case 4: c = ((unsigned long)*p++) << 24; c |= ((unsigned long)*p++) << 16; @@ -226,6 +246,7 @@ static int do_buf(unsigned char *buf, int buflen, i = UTF8_getc(p, buflen, &c); if (i < 0) return -1; /* Invalid UTF8String */ + buflen -= i; p += i; break; default: Modified: stable/11/crypto/openssl/crypto/asn1/ameth_lib.c ============================================================================== --- stable/11/crypto/openssl/crypto/asn1/ameth_lib.c Fri Aug 17 18:24:11 2018 (r337981) +++ stable/11/crypto/openssl/crypto/asn1/ameth_lib.c Fri Aug 17 18:32:53 2018 (r337982) @@ -3,7 +3,7 @@ * 2006. */ /* ==================================================================== - * Copyright (c) 2006 The OpenSSL Project. All rights reserved. + * Copyright (c) 2006-2018 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -304,6 +304,18 @@ EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_new(int id, int fl goto err; } else ameth->info = NULL; + + /* + * One of the following must be true: + * + * pem_str == NULL AND ASN1_PKEY_ALIAS is set + * pem_str != NULL AND ASN1_PKEY_ALIAS is clear + * + * Anything else is an error and may lead to a corrupt ASN1 method table + */ + if (!((pem_str == NULL && (flags & ASN1_PKEY_ALIAS) != 0) + || (pem_str != NULL && (flags & ASN1_PKEY_ALIAS) == 0))) + goto err; if (pem_str) { ameth->pem_str = BUF_strdup(pem_str); Modified: stable/11/crypto/openssl/crypto/asn1/asn1.h ============================================================================== --- stable/11/crypto/openssl/crypto/asn1/asn1.h Fri Aug 17 18:24:11 2018 (r337981) +++ stable/11/crypto/openssl/crypto/asn1/asn1.h Fri Aug 17 18:32:53 2018 (r337982) @@ -1164,6 +1164,7 @@ int SMIME_text(BIO *in, BIO *out); * The following lines are auto generated by the script mkerr.pl. Any changes * made after this point may be overwritten when the script is next run. */ + void ERR_load_ASN1_strings(void); /* Error codes for the ASN1 functions. */ @@ -1264,7 +1265,10 @@ void ERR_load_ASN1_strings(void); # define ASN1_F_D2I_X509 156 # define ASN1_F_D2I_X509_CINF 157 # define ASN1_F_D2I_X509_PKEY 159 +# define ASN1_F_DO_BUF 221 # define ASN1_F_I2D_ASN1_BIO_STREAM 211 +# define ASN1_F_I2D_ASN1_BOOLEAN 223 +# define ASN1_F_I2D_ASN1_OBJECT 222 # define ASN1_F_I2D_ASN1_SET 188 # define ASN1_F_I2D_ASN1_TIME 160 # define ASN1_F_I2D_DSA_PUBKEY 161 @@ -1414,7 +1418,7 @@ void ERR_load_ASN1_strings(void); # define ASN1_R_WRONG_TAG 168 # define ASN1_R_WRONG_TYPE 169 -#ifdef __cplusplus +# ifdef __cplusplus } -#endif +# endif #endif Modified: stable/11/crypto/openssl/crypto/asn1/asn1_err.c ============================================================================== --- stable/11/crypto/openssl/crypto/asn1/asn1_err.c Fri Aug 17 18:24:11 2018 (r337981) +++ stable/11/crypto/openssl/crypto/asn1/asn1_err.c Fri Aug 17 18:32:53 2018 (r337982) @@ -166,7 +166,10 @@ static ERR_STRING_DATA ASN1_str_functs[] = { {ERR_FUNC(ASN1_F_D2I_X509), "D2I_X509"}, {ERR_FUNC(ASN1_F_D2I_X509_CINF), "D2I_X509_CINF"}, {ERR_FUNC(ASN1_F_D2I_X509_PKEY), "d2i_X509_PKEY"}, + {ERR_FUNC(ASN1_F_DO_BUF), "DO_BUF"}, {ERR_FUNC(ASN1_F_I2D_ASN1_BIO_STREAM), "i2d_ASN1_bio_stream"}, + {ERR_FUNC(ASN1_F_I2D_ASN1_BOOLEAN), "i2d_ASN1_BOOLEAN"}, + {ERR_FUNC(ASN1_F_I2D_ASN1_OBJECT), "i2d_ASN1_OBJECT"}, {ERR_FUNC(ASN1_F_I2D_ASN1_SET), "i2d_ASN1_SET"}, {ERR_FUNC(ASN1_F_I2D_ASN1_TIME), "I2D_ASN1_TIME"}, {ERR_FUNC(ASN1_F_I2D_DSA_PUBKEY), "i2d_DSA_PUBKEY"}, Modified: stable/11/crypto/openssl/crypto/asn1/tasn_enc.c ============================================================================== --- stable/11/crypto/openssl/crypto/asn1/tasn_enc.c Fri Aug 17 18:24:11 2018 (r337981) +++ stable/11/crypto/openssl/crypto/asn1/tasn_enc.c Fri Aug 17 18:32:53 2018 (r337982) @@ -4,7 +4,7 @@ * 2000. */ /* ==================================================================== - * Copyright (c) 2000-2004 The OpenSSL Project. All rights reserved. + * Copyright (c) 2000-2018 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -588,6 +588,8 @@ int asn1_ex_i2c(ASN1_VALUE **pval, unsigned char *cout otmp = (ASN1_OBJECT *)*pval; cont = otmp->data; len = otmp->length; + if (cont == NULL || len == 0) + return -1; break; case V_ASN1_NULL: Modified: stable/11/crypto/openssl/crypto/bio/bss_log.c ============================================================================== --- stable/11/crypto/openssl/crypto/bio/bss_log.c Fri Aug 17 18:24:11 2018 (r337981) +++ stable/11/crypto/openssl/crypto/bio/bss_log.c Fri Aug 17 18:32:53 2018 (r337982) @@ -1,6 +1,6 @@ /* crypto/bio/bss_log.c */ /* ==================================================================== - * Copyright (c) 1999 The OpenSSL Project. All rights reserved. + * Copyright (c) 1999-2018 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -242,7 +242,7 @@ static int MS_CALLBACK slg_write(BIO *b, const char *i if ((buf = (char *)OPENSSL_malloc(inl + 1)) == NULL) { return (0); } - strncpy(buf, in, inl); + memcpy(buf, in, inl); buf[inl] = '\0'; i = 0; Modified: stable/11/crypto/openssl/crypto/bio/bss_mem.c ============================================================================== --- stable/11/crypto/openssl/crypto/bio/bss_mem.c Fri Aug 17 18:24:11 2018 (r337981) +++ stable/11/crypto/openssl/crypto/bio/bss_mem.c Fri Aug 17 18:32:53 2018 (r337982) @@ -188,6 +188,8 @@ static int mem_write(BIO *b, const char *in, int inl) } BIO_clear_retry_flags(b); + if (inl == 0) + return 0; blen = bm->length; if (BUF_MEM_grow_clean(bm, blen + inl) != (blen + inl)) goto end; Modified: stable/11/crypto/openssl/crypto/bn/Makefile ============================================================================== --- stable/11/crypto/openssl/crypto/bn/Makefile Fri Aug 17 18:24:11 2018 (r337981) +++ stable/11/crypto/openssl/crypto/bn/Makefile Fri Aug 17 18:32:53 2018 (r337982) @@ -197,21 +197,24 @@ bn_add.o: ../../include/openssl/e_os2.h ../../include/ bn_add.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h bn_add.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h bn_add.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h -bn_add.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_add.c bn_lcl.h +bn_add.o: ../../include/openssl/symhacks.h ../bn_int.h ../cryptlib.h bn_add.c +bn_add.o: bn_lcl.h bn_asm.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h bn_asm.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h bn_asm.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h bn_asm.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h bn_asm.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h bn_asm.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h -bn_asm.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_asm.c bn_lcl.h +bn_asm.o: ../../include/openssl/symhacks.h ../bn_int.h ../cryptlib.h bn_asm.c +bn_asm.o: bn_lcl.h bn_blind.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h bn_blind.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h bn_blind.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h bn_blind.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h bn_blind.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h bn_blind.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h -bn_blind.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_blind.c bn_lcl.h +bn_blind.o: ../../include/openssl/symhacks.h ../bn_int.h ../cryptlib.h +bn_blind.o: bn_blind.c bn_lcl.h bn_const.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h bn_const.o: ../../include/openssl/opensslconf.h bn_const.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h @@ -223,7 +226,8 @@ bn_ctx.o: ../../include/openssl/e_os2.h ../../include/ bn_ctx.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h bn_ctx.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h bn_ctx.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h -bn_ctx.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_ctx.c bn_lcl.h +bn_ctx.o: ../../include/openssl/symhacks.h ../bn_int.h ../cryptlib.h bn_ctx.c +bn_ctx.o: bn_lcl.h bn_depr.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h bn_depr.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h bn_depr.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h @@ -231,14 +235,15 @@ bn_depr.o: ../../include/openssl/lhash.h ../../include bn_depr.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h bn_depr.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h bn_depr.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h -bn_depr.o: ../cryptlib.h bn_depr.c bn_lcl.h +bn_depr.o: ../bn_int.h ../cryptlib.h bn_depr.c bn_lcl.h bn_div.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h bn_div.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h bn_div.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h bn_div.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h bn_div.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h bn_div.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h -bn_div.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_div.c bn_lcl.h +bn_div.o: ../../include/openssl/symhacks.h ../bn_int.h ../cryptlib.h bn_div.c +bn_div.o: bn_lcl.h bn_err.o: ../../include/openssl/bio.h ../../include/openssl/bn.h bn_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h bn_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h @@ -252,7 +257,7 @@ bn_exp.o: ../../include/openssl/e_os2.h ../../include/ bn_exp.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h bn_exp.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h bn_exp.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h -bn_exp.o: ../../include/openssl/symhacks.h ../constant_time_locl.h +bn_exp.o: ../../include/openssl/symhacks.h ../bn_int.h ../constant_time_locl.h bn_exp.o: ../cryptlib.h bn_exp.c bn_lcl.h rsaz_exp.h bn_exp2.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h bn_exp2.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h @@ -260,70 +265,80 @@ bn_exp2.o: ../../include/openssl/e_os2.h ../../include bn_exp2.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h bn_exp2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h bn_exp2.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h -bn_exp2.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_exp2.c bn_lcl.h +bn_exp2.o: ../../include/openssl/symhacks.h ../bn_int.h ../cryptlib.h bn_exp2.c +bn_exp2.o: bn_lcl.h bn_gcd.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h bn_gcd.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h bn_gcd.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h bn_gcd.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h bn_gcd.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h bn_gcd.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h -bn_gcd.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_gcd.c bn_lcl.h +bn_gcd.o: ../../include/openssl/symhacks.h ../bn_int.h ../cryptlib.h bn_gcd.c +bn_gcd.o: bn_lcl.h bn_gf2m.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h bn_gf2m.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h bn_gf2m.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h bn_gf2m.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h bn_gf2m.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h bn_gf2m.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h -bn_gf2m.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_gf2m.c bn_lcl.h +bn_gf2m.o: ../../include/openssl/symhacks.h ../bn_int.h ../cryptlib.h bn_gf2m.c +bn_gf2m.o: bn_lcl.h bn_kron.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h bn_kron.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h bn_kron.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h bn_kron.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h bn_kron.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h bn_kron.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h -bn_kron.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_kron.c bn_lcl.h +bn_kron.o: ../../include/openssl/symhacks.h ../bn_int.h ../cryptlib.h bn_kron.c +bn_kron.o: bn_lcl.h bn_lib.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h bn_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h bn_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h bn_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h bn_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h bn_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h -bn_lib.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h bn_lib.c +bn_lib.o: ../../include/openssl/symhacks.h ../bn_int.h ../cryptlib.h bn_lcl.h +bn_lib.o: bn_lib.c bn_mod.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h bn_mod.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Fri Aug 17 19:19:00 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C2D4107906F; Fri, 17 Aug 2018 19:19:00 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E5E048F074; Fri, 17 Aug 2018 19:18:59 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C2ACE4DC1; Fri, 17 Aug 2018 19:18:59 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7HJIxlP007682; Fri, 17 Aug 2018 19:18:59 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7HJIxx9007681; Fri, 17 Aug 2018 19:18:59 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201808171918.w7HJIxx9007681@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Fri, 17 Aug 2018 19:18:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337985 - stable/11/sys/dev/bge X-SVN-Group: stable-11 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/11/sys/dev/bge X-SVN-Commit-Revision: 337985 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Aug 2018 19:19:00 -0000 Author: eugen Date: Fri Aug 17 19:18:59 2018 New Revision: 337985 URL: https://svnweb.freebsd.org/changeset/base/337985 Log: MFC r336461: bge(4): disable MSI for BGE_ASICREV_BCM5784/BGE_CHIPREV_5784_AX found in some MacBook Pro. PR: 229727 Reported by: Stephan Neuhaus and others Tested by: Stephan Neuhaus Approved by: mav (mentor) Modified: stable/11/sys/dev/bge/if_bge.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/bge/if_bge.c ============================================================================== --- stable/11/sys/dev/bge/if_bge.c Fri Aug 17 18:37:22 2018 (r337984) +++ stable/11/sys/dev/bge/if_bge.c Fri Aug 17 19:18:59 2018 (r337985) @@ -3204,6 +3204,14 @@ bge_can_use_msi(struct bge_softc *sc) sc->bge_chiprev != BGE_CHIPREV_5750_BX) can_use_msi = 1; break; + case BGE_ASICREV_BCM5784: + /* + * Prevent infinite "watchdog timeout" errors + * in some MacBook Pro and make it work out-of-the-box. + */ + if (sc->bge_chiprev == BGE_CHIPREV_5784_AX) + break; + /* FALLTHROUGH */ default: if (BGE_IS_575X_PLUS(sc)) can_use_msi = 1; From owner-svn-src-stable@freebsd.org Sat Aug 18 10:14:03 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B449D108BD69; Sat, 18 Aug 2018 10:14:03 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 697EC8C2E0; Sat, 18 Aug 2018 10:14:03 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4B007161BB; Sat, 18 Aug 2018 10:14:03 +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 w7IAE3MY073652; Sat, 18 Aug 2018 10:14:03 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7IAE2qG073649; Sat, 18 Aug 2018 10:14:02 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201808181014.w7IAE2qG073649@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 18 Aug 2018 10:14:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r338012 - in stable/11/sys: kern sys vm X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/11/sys: kern sys vm X-SVN-Commit-Revision: 338012 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Aug 2018 10:14:04 -0000 Author: kib Date: Sat Aug 18 10:14:02 2018 New Revision: 338012 URL: https://svnweb.freebsd.org/changeset/base/338012 Log: MFC r337330: Swap in WKILLED processes. Modified: stable/11/sys/kern/kern_sig.c stable/11/sys/kern/sys_process.c stable/11/sys/sys/proc.h stable/11/sys/vm/vm_swapout.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_sig.c ============================================================================== --- stable/11/sys/kern/kern_sig.c Sat Aug 18 08:32:21 2018 (r338011) +++ stable/11/sys/kern/kern_sig.c Sat Aug 18 10:14:02 2018 (r338012) @@ -3075,6 +3075,23 @@ postsig(int sig) return (1); } +void +proc_wkilled(struct proc *p) +{ + + PROC_LOCK_ASSERT(p, MA_OWNED); + if ((p->p_flag & P_WKILLED) == 0) { + p->p_flag |= P_WKILLED; + /* + * Notify swapper that there is a process to swap in. + * The notification is racy, at worst it would take 10 + * seconds for the swapper process to notice. + */ + if ((p->p_flag & (P_INMEM | P_SWAPPINGIN)) == 0) + wakeup(&proc0); + } +} + /* * Kill the current process for stated reason. */ @@ -3087,7 +3104,7 @@ killproc(struct proc *p, char *why) p->p_comm); log(LOG_ERR, "pid %d (%s), uid %d, was killed: %s\n", p->p_pid, p->p_comm, p->p_ucred ? p->p_ucred->cr_uid : -1, why); - p->p_flag |= P_WKILLED; + proc_wkilled(p); kern_psignal(p, SIGKILL); } Modified: stable/11/sys/kern/sys_process.c ============================================================================== --- stable/11/sys/kern/sys_process.c Sat Aug 18 08:32:21 2018 (r338011) +++ stable/11/sys/kern/sys_process.c Sat Aug 18 10:14:02 2018 (r338012) @@ -1157,7 +1157,7 @@ kern_ptrace(struct thread *td, int req, pid_t pid, voi * accommodate any new signals. */ if (data == SIGKILL) - p->p_flag |= P_WKILLED; + proc_wkilled(p); if (req == PT_DETACH) { FOREACH_THREAD_IN_PROC(p, td3) Modified: stable/11/sys/sys/proc.h ============================================================================== --- stable/11/sys/sys/proc.h Sat Aug 18 08:32:21 2018 (r338011) +++ stable/11/sys/sys/proc.h Sat Aug 18 10:14:02 2018 (r338012) @@ -1037,6 +1037,7 @@ struct proc *proc_realparent(struct proc *child); void proc_reap(struct thread *td, struct proc *p, int *status, int options); void proc_reparent(struct proc *child, struct proc *newparent); void proc_set_traced(struct proc *p, bool stop); +void proc_wkilled(struct proc *p); struct pstats *pstats_alloc(void); void pstats_fork(struct pstats *src, struct pstats *dst); void pstats_free(struct pstats *ps); Modified: stable/11/sys/vm/vm_swapout.c ============================================================================== --- stable/11/sys/vm/vm_swapout.c Sat Aug 18 08:32:21 2018 (r338011) +++ stable/11/sys/vm/vm_swapout.c Sat Aug 18 10:14:02 2018 (r338012) @@ -156,13 +156,14 @@ static struct mtx vm_daemon_mtx; /* Allow for use by vm_pageout before vm_daemon is initialized. */ MTX_SYSINIT(vm_daemon, &vm_daemon_mtx, "vm daemon", MTX_DEF); +static int swapped_cnt; + static void swapclear(struct proc *); static int swapout(struct proc *); static void vm_swapout_map_deactivate_pages(vm_map_t, long); static void vm_swapout_object_deactivate_pages(pmap_t, vm_object_t, long); static void swapout_procs(int action); static void vm_req_vmdaemon(int req); -static void vm_thread_swapin(struct thread *td); static void vm_thread_swapout(struct thread *td); /* @@ -554,7 +555,7 @@ vm_thread_swapout(struct thread *td) * Bring the kernel stack for a specified thread back in. */ static void -vm_thread_swapin(struct thread *td) +vm_thread_swapin(struct thread *td, int oom_alloc) { vm_object_t ksobj; vm_page_t ma[KSTACK_MAX_PAGES]; @@ -563,7 +564,7 @@ vm_thread_swapin(struct thread *td) pages = td->td_kstack_pages; ksobj = td->td_kstack_obj; VM_OBJECT_WLOCK(ksobj); - (void)vm_page_grab_pages(ksobj, 0, VM_ALLOC_NORMAL | VM_ALLOC_WIRED, ma, + (void)vm_page_grab_pages(ksobj, 0, oom_alloc | VM_ALLOC_WIRED, ma, pages); for (i = 0; i < pages;) { vm_page_assert_xbusied(ma[i]); @@ -596,8 +597,10 @@ void faultin(struct proc *p) { struct thread *td; + int oom_alloc; PROC_LOCK_ASSERT(p, MA_OWNED); + /* * If another process is swapping in this process, * just wait until it finishes. @@ -607,7 +610,11 @@ faultin(struct proc *p) msleep(&p->p_flag, &p->p_mtx, PVM, "faultin", 0); return; } + if ((p->p_flag & P_INMEM) == 0) { + oom_alloc = (p->p_flag & P_WKILLED) != 0 ? VM_ALLOC_SYSTEM : + VM_ALLOC_NORMAL; + /* * Don't let another thread swap process p out while we are * busy swapping it in. @@ -615,6 +622,10 @@ faultin(struct proc *p) ++p->p_lock; p->p_flag |= P_SWAPPINGIN; PROC_UNLOCK(p); + sx_xlock(&allproc_lock); + MPASS(swapped_cnt > 0); + swapped_cnt--; + sx_xunlock(&allproc_lock); /* * We hold no lock here because the list of threads @@ -622,14 +633,14 @@ faultin(struct proc *p) * swapped out. */ FOREACH_THREAD_IN_PROC(p, td) - vm_thread_swapin(td); + vm_thread_swapin(td, oom_alloc); + PROC_LOCK(p); swapclear(p); p->p_swtick = ticks; - wakeup(&p->p_flag); - /* Allow other threads to swap p out now. */ + wakeup(&p->p_flag); --p->p_lock; } } @@ -639,29 +650,41 @@ faultin(struct proc *p) * is enough space for them. Of course, if a process waits for a long * time, it will be swapped in anyway. */ -void -swapper(void) + +static struct proc * +swapper_selector(void) { - struct proc *p, *pp; + struct proc *p, *res; struct thread *td; - int ppri, pri, slptime, swtime; + int min_flag, ppri, pri, slptime, swtime; -loop: - if (vm_page_count_min()) { - VM_WAIT; - goto loop; - } - - pp = NULL; + sx_assert(&allproc_lock, SA_SLOCKED); + if (swapped_cnt == 0) + return (NULL); + res = NULL; ppri = INT_MIN; - sx_slock(&allproc_lock); + min_flag = vm_page_count_min(); FOREACH_PROC_IN_SYSTEM(p) { PROC_LOCK(p); - if (p->p_state == PRS_NEW || - p->p_flag & (P_SWAPPINGOUT | P_SWAPPINGIN | P_INMEM)) { + if (p->p_state == PRS_NEW || (p->p_flag & (P_SWAPPINGOUT | + P_SWAPPINGIN | P_INMEM)) != 0) { PROC_UNLOCK(p); continue; } + if (p->p_state == PRS_NORMAL && (p->p_flag & P_WKILLED) != 0) { + /* + * A swapped-out process might have mapped a + * large portion of the system's pages as + * anonymous memory. There is no other way to + * release the memory other than to kill the + * process, for which we need to swap it in. + */ + return (p); + } + if (min_flag) { + PROC_UNLOCK(p); + continue; + } swtime = (ticks - p->p_swtick) / hz; FOREACH_THREAD_IN_PROC(p, td) { /* @@ -681,7 +704,7 @@ loop: * selection. */ if (pri > ppri) { - pp = p; + res = p; ppri = pri; } } @@ -689,33 +712,40 @@ loop: } PROC_UNLOCK(p); } - sx_sunlock(&allproc_lock); + if (res != NULL) + PROC_LOCK(res); + return (res); +} - /* - * Nothing to do, back to sleep. - */ - if ((p = pp) == NULL) { - tsleep(&proc0, PVM, "swapin", MAXSLP * hz / 2); - goto loop; - } - PROC_LOCK(p); +void +swapper(void) +{ + struct proc *p; - /* - * Another process may be bringing or may have already - * brought this process in while we traverse all threads. - * Or, this process may even be being swapped out again. - */ - if (p->p_flag & (P_INMEM | P_SWAPPINGOUT | P_SWAPPINGIN)) { - PROC_UNLOCK(p); - goto loop; - } + for (;;) { + sx_slock(&allproc_lock); + p = swapper_selector(); + sx_sunlock(&allproc_lock); - /* - * We would like to bring someone in. - */ - faultin(p); - PROC_UNLOCK(p); - goto loop; + if (p == NULL) { + tsleep(&proc0, PVM, "swapin", MAXSLP * hz / 2); + } else { + PROC_LOCK_ASSERT(p, MA_OWNED); + + /* + * Another process may be bringing or may have + * already brought this process in while we + * traverse all threads. Or, this process may + * have exited or even being swapped out + * again. + */ + if (p->p_state == PRS_NORMAL && (p->p_flag & (P_INMEM | + P_SWAPPINGOUT | P_SWAPPINGIN)) == 0) { + faultin(p); + } + PROC_UNLOCK(p); + } + } } /* @@ -794,7 +824,12 @@ swapout_procs(int action) didswap = true; PROC_UNLOCK(p); - sx_slock(&allproc_lock); + if (didswap) { + sx_xlock(&allproc_lock); + swapped_cnt++; + sx_downgrade(&allproc_lock); + } else + sx_slock(&allproc_lock); PRELE(p); } sx_sunlock(&allproc_lock); From owner-svn-src-stable@freebsd.org Sat Aug 18 16:03:16 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBB0D107047E; Sat, 18 Aug 2018 16:03:16 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7E51D96581; Sat, 18 Aug 2018 16:03: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5B0B419B37; Sat, 18 Aug 2018 16:03:16 +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 w7IG3Gps063861; Sat, 18 Aug 2018 16:03:16 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7IG3FbF063859; Sat, 18 Aug 2018 16:03:15 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201808181603.w7IG3FbF063859@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 18 Aug 2018 16:03:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r338017 - in stable/11: . share/mk X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/11: . share/mk X-SVN-Commit-Revision: 338017 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Aug 2018 16:03:17 -0000 Author: kib Date: Sat Aug 18 16:03:15 2018 New Revision: 338017 URL: https://svnweb.freebsd.org/changeset/base/338017 Log: MFC r336570: Enable OFED build (without extras) by default. For stable/11, this is only done on amd64. Relnotes: yes Sponsored by: Mellanox Technologies Modified: stable/11/UPDATING stable/11/share/mk/src.opts.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/UPDATING ============================================================================== --- stable/11/UPDATING Sat Aug 18 12:17:05 2018 (r338016) +++ stable/11/UPDATING Sat Aug 18 16:03:15 2018 (r338017) @@ -16,6 +16,12 @@ from older versions of FreeBSD, try WITHOUT_CLANG and the tip of head, and then rebuild without this option. The bootstrap process from older version of current across the gcc/clang cutover is a bit fragile. +20180818: + WITH_OFED option now only enables the build for the OFED libraries + and some fundamental client utilities. OpenSM and rest of the + debugging tools are enabled by WITH_OFED_EXTRA build switch. + WITH_OFED is turned on by default on amd64. + 20180714: Clang, llvm, lld, lldb, compiler-rt and libc++ have been upgraded to 6.0.1. Please see the 20141231 entry below for information about Modified: stable/11/share/mk/src.opts.mk ============================================================================== --- stable/11/share/mk/src.opts.mk Sat Aug 18 12:17:05 2018 (r338016) +++ stable/11/share/mk/src.opts.mk Sat Aug 18 16:03:15 2018 (r338017) @@ -196,7 +196,6 @@ __DEFAULT_NO_OPTIONS = \ LOADER_FIREWIRE \ LOADER_FORCE_LE \ NAND \ - OFED \ OFED_EXTRA \ OPENLDAP \ REPRODUCIBLE_BUILD \ @@ -314,6 +313,12 @@ __DEFAULT_YES_OPTIONS+=MLX5TOOL .else __DEFAULT_NO_OPTIONS+=CXGBETOOL __DEFAULT_NO_OPTIONS+=MLX5TOOL +.endif + +.if ${__T} == "amd64" +__DEFAULT_YES_OPTIONS+=OFED +.else +__DEFAULT_NO_OPTIONS+=OFED .endif .include From owner-svn-src-stable@freebsd.org Sat Aug 18 23:24:47 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C3FC1078DA5; Sat, 18 Aug 2018 23:24:47 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D146D7B807; Sat, 18 Aug 2018 23:24:46 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AC6EF1E36D; Sat, 18 Aug 2018 23:24:46 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7INOkFn091428; Sat, 18 Aug 2018 23:24:46 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7INOkVB091427; Sat, 18 Aug 2018 23:24:46 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201808182324.w7INOkVB091427@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Sat, 18 Aug 2018 23:24:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r338033 - stable/11/contrib/libarchive/libarchive X-SVN-Group: stable-11 X-SVN-Commit-Author: mm X-SVN-Commit-Paths: stable/11/contrib/libarchive/libarchive X-SVN-Commit-Revision: 338033 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Aug 2018 23:24:47 -0000 Author: mm Date: Sat Aug 18 23:24:46 2018 New Revision: 338033 URL: https://svnweb.freebsd.org/changeset/base/338033 Log: MFH r337745: Sync libarchive with vendor.. Vendor changes: PR #1042: validate iso9660 directory record length MFC after: 3 days Security: CVE-2017-14501 Modified: stable/11/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c Sat Aug 18 22:35:19 2018 (r338032) +++ stable/11/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c Sat Aug 18 23:24:46 2018 (r338033) @@ -409,7 +409,8 @@ static int next_entry_seek(struct archive_read *, stru struct file_info **); static struct file_info * parse_file_info(struct archive_read *a, - struct file_info *parent, const unsigned char *isodirrec); + struct file_info *parent, const unsigned char *isodirrec, + size_t reclen); static int parse_rockridge(struct archive_read *a, struct file_info *file, const unsigned char *start, const unsigned char *end); @@ -1022,7 +1023,7 @@ read_children(struct archive_read *a, struct file_info if (*(p + DR_name_len_offset) == 1 && *(p + DR_name_offset) == '\001') continue; - child = parse_file_info(a, parent, p); + child = parse_file_info(a, parent, p, b - p); if (child == NULL) { __archive_read_consume(a, skip_size); return (ARCHIVE_FATAL); @@ -1112,7 +1113,7 @@ choose_volume(struct archive_read *a, struct iso9660 * */ seenJoliet = iso9660->seenJoliet;/* Save flag. */ iso9660->seenJoliet = 0; - file = parse_file_info(a, NULL, block); + file = parse_file_info(a, NULL, block, vd->size); if (file == NULL) return (ARCHIVE_FATAL); iso9660->seenJoliet = seenJoliet; @@ -1144,7 +1145,7 @@ choose_volume(struct archive_read *a, struct iso9660 * return (ARCHIVE_FATAL); } iso9660->seenJoliet = 0; - file = parse_file_info(a, NULL, block); + file = parse_file_info(a, NULL, block, vd->size); if (file == NULL) return (ARCHIVE_FATAL); iso9660->seenJoliet = seenJoliet; @@ -1749,7 +1750,7 @@ archive_read_format_iso9660_cleanup(struct archive_rea */ static struct file_info * parse_file_info(struct archive_read *a, struct file_info *parent, - const unsigned char *isodirrec) + const unsigned char *isodirrec, size_t reclen) { struct iso9660 *iso9660; struct file_info *file, *filep; @@ -1763,16 +1764,20 @@ parse_file_info(struct archive_read *a, struct file_in iso9660 = (struct iso9660 *)(a->format->data); - dr_len = (size_t)isodirrec[DR_length_offset]; - name_len = (size_t)isodirrec[DR_name_len_offset]; - location = archive_le32dec(isodirrec + DR_extent_offset); - fsize = toi(isodirrec + DR_size_offset, DR_size_size); - /* Sanity check that dr_len needs at least 34. */ - if (dr_len < 34) { + if (reclen != 0) + dr_len = (size_t)isodirrec[DR_length_offset]; + /* + * Sanity check that reclen is not zero and dr_len is greater than + * reclen but at least 34 + */ + if (reclen == 0 || reclen < dr_len || dr_len < 34) { archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, - "Invalid length of directory record"); + "Invalid length of directory record"); return (NULL); } + name_len = (size_t)isodirrec[DR_name_len_offset]; + location = archive_le32dec(isodirrec + DR_extent_offset); + fsize = toi(isodirrec + DR_size_offset, DR_size_size); /* Sanity check that name_len doesn't exceed dr_len. */ if (dr_len - 33 < name_len || name_len == 0) { archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, From owner-svn-src-stable@freebsd.org Sat Aug 18 23:24:56 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F6B71078DD9; Sat, 18 Aug 2018 23:24:56 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9A7737B8F2; Sat, 18 Aug 2018 23:24:54 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3CA851E36E; Sat, 18 Aug 2018 23:24:54 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7INOsO1091480; Sat, 18 Aug 2018 23:24:54 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7INOsnn091479; Sat, 18 Aug 2018 23:24:54 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201808182324.w7INOsnn091479@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Sat, 18 Aug 2018 23:24:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r338034 - stable/10/contrib/libarchive/libarchive X-SVN-Group: stable-10 X-SVN-Commit-Author: mm X-SVN-Commit-Paths: stable/10/contrib/libarchive/libarchive X-SVN-Commit-Revision: 338034 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Aug 2018 23:24:56 -0000 Author: mm Date: Sat Aug 18 23:24:53 2018 New Revision: 338034 URL: https://svnweb.freebsd.org/changeset/base/338034 Log: MFH r337745: Sync libarchive with vendor.. Vendor changes: PR #1042: validate iso9660 directory record length MFC after: 3 days Security: CVE-2017-14501 Modified: stable/10/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c Sat Aug 18 23:24:46 2018 (r338033) +++ stable/10/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c Sat Aug 18 23:24:53 2018 (r338034) @@ -409,7 +409,8 @@ static int next_entry_seek(struct archive_read *, stru struct file_info **); static struct file_info * parse_file_info(struct archive_read *a, - struct file_info *parent, const unsigned char *isodirrec); + struct file_info *parent, const unsigned char *isodirrec, + size_t reclen); static int parse_rockridge(struct archive_read *a, struct file_info *file, const unsigned char *start, const unsigned char *end); @@ -1022,7 +1023,7 @@ read_children(struct archive_read *a, struct file_info if (*(p + DR_name_len_offset) == 1 && *(p + DR_name_offset) == '\001') continue; - child = parse_file_info(a, parent, p); + child = parse_file_info(a, parent, p, b - p); if (child == NULL) { __archive_read_consume(a, skip_size); return (ARCHIVE_FATAL); @@ -1112,7 +1113,7 @@ choose_volume(struct archive_read *a, struct iso9660 * */ seenJoliet = iso9660->seenJoliet;/* Save flag. */ iso9660->seenJoliet = 0; - file = parse_file_info(a, NULL, block); + file = parse_file_info(a, NULL, block, vd->size); if (file == NULL) return (ARCHIVE_FATAL); iso9660->seenJoliet = seenJoliet; @@ -1144,7 +1145,7 @@ choose_volume(struct archive_read *a, struct iso9660 * return (ARCHIVE_FATAL); } iso9660->seenJoliet = 0; - file = parse_file_info(a, NULL, block); + file = parse_file_info(a, NULL, block, vd->size); if (file == NULL) return (ARCHIVE_FATAL); iso9660->seenJoliet = seenJoliet; @@ -1749,7 +1750,7 @@ archive_read_format_iso9660_cleanup(struct archive_rea */ static struct file_info * parse_file_info(struct archive_read *a, struct file_info *parent, - const unsigned char *isodirrec) + const unsigned char *isodirrec, size_t reclen) { struct iso9660 *iso9660; struct file_info *file, *filep; @@ -1763,16 +1764,20 @@ parse_file_info(struct archive_read *a, struct file_in iso9660 = (struct iso9660 *)(a->format->data); - dr_len = (size_t)isodirrec[DR_length_offset]; - name_len = (size_t)isodirrec[DR_name_len_offset]; - location = archive_le32dec(isodirrec + DR_extent_offset); - fsize = toi(isodirrec + DR_size_offset, DR_size_size); - /* Sanity check that dr_len needs at least 34. */ - if (dr_len < 34) { + if (reclen != 0) + dr_len = (size_t)isodirrec[DR_length_offset]; + /* + * Sanity check that reclen is not zero and dr_len is greater than + * reclen but at least 34 + */ + if (reclen == 0 || reclen < dr_len || dr_len < 34) { archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, - "Invalid length of directory record"); + "Invalid length of directory record"); return (NULL); } + name_len = (size_t)isodirrec[DR_name_len_offset]; + location = archive_le32dec(isodirrec + DR_extent_offset); + fsize = toi(isodirrec + DR_size_offset, DR_size_size); /* Sanity check that name_len doesn't exceed dr_len. */ if (dr_len - 33 < name_len || name_len == 0) { archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,