From owner-svn-src-stable-10@freebsd.org Sun Mar 18 11:26:08 2018 Return-Path: Delivered-To: svn-src-stable-10@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 3AD03F4A5F8; Sun, 18 Mar 2018 11:26:08 +0000 (UTC) (envelope-from kp@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 DF11F6BB59; Sun, 18 Mar 2018 11:26:07 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DA0841FE5A; Sun, 18 Mar 2018 11:26:07 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2IBQ7wb006069; Sun, 18 Mar 2018 11:26:07 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2IBQ70S006067; Sun, 18 Mar 2018 11:26:07 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201803181126.w2IBQ70S006067@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sun, 18 Mar 2018 11:26:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r331117 - in stable/10/sys: net netpfil/pf X-SVN-Group: stable-10 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: in stable/10/sys: net netpfil/pf X-SVN-Commit-Revision: 331117 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-10@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Mar 2018 11:26:08 -0000 Author: kp Date: Sun Mar 18 11:26:07 2018 New Revision: 331117 URL: https://svnweb.freebsd.org/changeset/base/331117 Log: MFC r329950: pf: Cope with overly large net.pf.states_hashsize If the user configures a states_hashsize or source_nodes_hashsize value we may not have enough memory to allocate this. This used to lock up pf, because these allocations used M_WAITOK. Cope with this by attempting the allocation with M_NOWAIT and falling back to the default sizes (with M_WAITOK) if these fail. PR: 209475 Submitted by: Fehmi Noyan Isi Modified: stable/10/sys/net/pfvar.h stable/10/sys/netpfil/pf/pf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/pfvar.h ============================================================================== --- stable/10/sys/net/pfvar.h Sun Mar 18 11:25:39 2018 (r331116) +++ stable/10/sys/net/pfvar.h Sun Mar 18 11:26:07 2018 (r331117) @@ -1458,6 +1458,7 @@ struct pf_idhash { extern u_long pf_hashmask; extern u_long pf_srchashmask; #define PF_HASHSIZ (32768) +#define PF_SRCHASHSIZ (PF_HASHSIZ/4) VNET_DECLARE(struct pf_keyhash *, pf_keyhash); VNET_DECLARE(struct pf_idhash *, pf_idhash); #define V_pf_keyhash VNET(pf_keyhash) Modified: stable/10/sys/netpfil/pf/pf.c ============================================================================== --- stable/10/sys/netpfil/pf/pf.c Sun Mar 18 11:25:39 2018 (r331116) +++ stable/10/sys/netpfil/pf/pf.c Sun Mar 18 11:26:07 2018 (r331117) @@ -781,7 +781,7 @@ pf_initialize() pf_hashsize = PF_HASHSIZ; TUNABLE_ULONG_FETCH("net.pf.source_nodes_hashsize", &pf_srchashsize); if (pf_srchashsize == 0 || !powerof2(pf_srchashsize)) - pf_srchashsize = PF_HASHSIZ / 4; + pf_srchashsize = PF_SRCHASHSIZ; V_pf_hashseed = arc4random(); @@ -795,10 +795,25 @@ pf_initialize() V_pf_state_key_z = uma_zcreate("pf state keys", sizeof(struct pf_state_key), pf_state_key_ctor, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); - V_pf_keyhash = malloc(pf_hashsize * sizeof(struct pf_keyhash), - M_PFHASH, M_WAITOK | M_ZERO); - V_pf_idhash = malloc(pf_hashsize * sizeof(struct pf_idhash), - M_PFHASH, M_WAITOK | M_ZERO); + + V_pf_keyhash = mallocarray(pf_hashsize, sizeof(struct pf_keyhash), + M_PFHASH, M_NOWAIT | M_ZERO); + V_pf_idhash = mallocarray(pf_hashsize, sizeof(struct pf_idhash), + M_PFHASH, M_NOWAIT | M_ZERO); + if (V_pf_keyhash == NULL || V_pf_idhash == NULL) { + printf("pf: Unable to allocate memory for " + "state_hashsize %lu.\n", pf_hashsize); + + free(V_pf_keyhash, M_PFHASH); + free(V_pf_idhash, M_PFHASH); + + pf_hashsize = PF_HASHSIZ; + V_pf_keyhash = mallocarray(pf_hashsize, + sizeof(struct pf_keyhash), M_PFHASH, M_WAITOK | M_ZERO); + V_pf_idhash = mallocarray(pf_hashsize, + sizeof(struct pf_idhash), M_PFHASH, M_WAITOK | M_ZERO); + } + pf_hashmask = pf_hashsize - 1; for (i = 0, kh = V_pf_keyhash, ih = V_pf_idhash; i <= pf_hashmask; i++, kh++, ih++) { @@ -813,8 +828,18 @@ pf_initialize() V_pf_limits[PF_LIMIT_SRC_NODES].zone = V_pf_sources_z; uma_zone_set_max(V_pf_sources_z, PFSNODE_HIWAT); uma_zone_set_warning(V_pf_sources_z, "PF source nodes limit reached"); - V_pf_srchash = malloc(pf_srchashsize * sizeof(struct pf_srchash), - M_PFHASH, M_WAITOK|M_ZERO); + + V_pf_srchash = mallocarray(pf_srchashsize, + sizeof(struct pf_srchash), M_PFHASH, M_NOWAIT | M_ZERO); + if (V_pf_srchash == NULL) { + printf("pf: Unable to allocate memory for " + "source_hashsize %lu.\n", pf_srchashsize); + + pf_srchashsize = PF_SRCHASHSIZ; + V_pf_srchash = mallocarray(pf_srchashsize, + sizeof(struct pf_srchash), M_PFHASH, M_WAITOK | M_ZERO); + } + pf_srchashmask = pf_srchashsize - 1; for (i = 0, sh = V_pf_srchash; i <= pf_srchashmask; i++, sh++) mtx_init(&sh->lock, "pf_srchash", NULL, MTX_DEF); From owner-svn-src-stable-10@freebsd.org Mon Mar 19 09:54:17 2018 Return-Path: Delivered-To: svn-src-stable-10@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 A4457F61096; Mon, 19 Mar 2018 09:54:17 +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 558C986D0B; Mon, 19 Mar 2018 09:54:17 +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 50566535A; Mon, 19 Mar 2018 09:54:17 +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 w2J9sHEb092768; Mon, 19 Mar 2018 09:54:17 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2J9sHOJ092766; Mon, 19 Mar 2018 09:54:17 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201803190954.w2J9sHOJ092766@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 19 Mar 2018 09:54: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: r331202 - in stable/10: sbin/ipfw sys/netpfil/ipfw X-SVN-Group: stable-10 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: in stable/10: sbin/ipfw sys/netpfil/ipfw X-SVN-Commit-Revision: 331202 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-10@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Mar 2018 09:54:17 -0000 Author: ae Date: Mon Mar 19 09:54:16 2018 New Revision: 331202 URL: https://svnweb.freebsd.org/changeset/base/331202 Log: MFC r330792: Do not try to reassemble IPv6 fragments in "reass" rule. ip_reass() expects IPv4 packet and will just corrupt any IPv6 packets that it gets. Until proper IPv6 fragments handling function will be implemented, pass IPv6 packets to next rule. PR: 170604 Modified: stable/10/sbin/ipfw/ipfw.8 stable/10/sys/netpfil/ipfw/ip_fw2.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ipfw/ipfw.8 ============================================================================== --- stable/10/sbin/ipfw/ipfw.8 Mon Mar 19 09:52:16 2018 (r331201) +++ stable/10/sbin/ipfw/ipfw.8 Mon Mar 19 09:54:16 2018 (r331202) @@ -1,7 +1,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 26, 2016 +.Dd March 12, 2018 .Dt IPFW 8 .Os .Sh NAME @@ -1016,7 +1016,7 @@ keyword with setdscp. If the tablearg value is not within the 0..64 range, lower 6 bits of supplied value are used. .It Cm reass -Queue and reassemble IP fragments. +Queue and reassemble IPv4 fragments. If the packet is not fragmented, counters are updated and processing continues with the next rule. If the packet is the last logical fragment, the packet is reassembled and, if Modified: stable/10/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- stable/10/sys/netpfil/ipfw/ip_fw2.c Mon Mar 19 09:52:16 2018 (r331201) +++ stable/10/sys/netpfil/ipfw/ip_fw2.c Mon Mar 19 09:54:16 2018 (r331202) @@ -2461,8 +2461,10 @@ do { \ case O_REASS: { int ip_off; - IPFW_INC_RULE_COUNTER(f, pktlen); l = 0; /* in any case exit inner loop */ + if (is_ipv6) /* IPv6 is not supported yet */ + break; + IPFW_INC_RULE_COUNTER(f, pktlen); ip_off = ntohs(ip->ip_off); /* if not fragmented, go to next rule */ From owner-svn-src-stable-10@freebsd.org Mon Mar 19 14:29:00 2018 Return-Path: Delivered-To: svn-src-stable-10@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 55FC1F50C0B; Mon, 19 Mar 2018 14:29:00 +0000 (UTC) (envelope-from marius@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 060D571CE0; Mon, 19 Mar 2018 14:29:00 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 00F927C16; Mon, 19 Mar 2018 14:29:00 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2JESxO1027619; Mon, 19 Mar 2018 14:28:59 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2JESwYm027606; Mon, 19 Mar 2018 14:28:58 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201803191428.w2JESwYm027606@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Mon, 19 Mar 2018 14:28:58 +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: r331206 - in stable/10: lib/libc/sparc64/sys libexec/rtld-elf libexec/rtld-elf/amd64 libexec/rtld-elf/arm libexec/rtld-elf/i386 libexec/rtld-elf/ia64 libexec/rtld-elf/mips libexec/rtld-... X-SVN-Group: stable-10 X-SVN-Commit-Author: marius X-SVN-Commit-Paths: in stable/10: lib/libc/sparc64/sys libexec/rtld-elf libexec/rtld-elf/amd64 libexec/rtld-elf/arm libexec/rtld-elf/i386 libexec/rtld-elf/ia64 libexec/rtld-elf/mips libexec/rtld-elf/powerpc libexec/rtld-... X-SVN-Commit-Revision: 331206 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-10@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Mar 2018 14:29:00 -0000 Author: marius Date: Mon Mar 19 14:28:58 2018 New Revision: 331206 URL: https://svnweb.freebsd.org/changeset/base/331206 Log: MFC: r328834 o Let rtld(1) set up psABI user trap handlers prior to executing the objects' init functions instead of doing the setup via a constructor in libc as the init functions may already depend on these handlers to be in place. This gets us rid of: - the undefined order in which libc constructors as __guard_setup() and jemalloc_constructor() are executed WRT __sparc_utrap_setup(), - the requirement to link libc last so __sparc_utrap_setup() gets called prior to constructors in other libraries (see r122883). For static binaries, crt1.o still sets up the user trap handlers. o Move misplaced prototypes for MD functions in to the MD prototype section of rtld.h. o Sprinkle nitems(). Modified: stable/10/lib/libc/sparc64/sys/__sparc_utrap_setup.c stable/10/libexec/rtld-elf/amd64/reloc.c stable/10/libexec/rtld-elf/arm/reloc.c stable/10/libexec/rtld-elf/i386/reloc.c stable/10/libexec/rtld-elf/ia64/reloc.c stable/10/libexec/rtld-elf/mips/reloc.c stable/10/libexec/rtld-elf/powerpc/reloc.c stable/10/libexec/rtld-elf/powerpc64/reloc.c stable/10/libexec/rtld-elf/rtld.c stable/10/libexec/rtld-elf/rtld.h stable/10/libexec/rtld-elf/sparc64/reloc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/sparc64/sys/__sparc_utrap_setup.c ============================================================================== --- stable/10/lib/libc/sparc64/sys/__sparc_utrap_setup.c Mon Mar 19 14:28:20 2018 (r331205) +++ stable/10/lib/libc/sparc64/sys/__sparc_utrap_setup.c Mon Mar 19 14:28:58 2018 (r331206) @@ -27,13 +27,11 @@ #include __FBSDID("$FreeBSD$"); -#include +#include #include #include -#include - #include "__sparc_utrap_private.h" static const struct sparc_utrap_args ua[] = { @@ -45,10 +43,10 @@ static const struct sparc_utrap_args ua[] = { }; static const struct sparc_utrap_install_args uia[] = { - { sizeof (ua) / sizeof (*ua), ua } + { nitems(ua), ua } }; -void __sparc_utrap_setup(void) __attribute__((constructor)); +void __sparc_utrap_setup(void); void __sparc_utrap_setup(void) Modified: stable/10/libexec/rtld-elf/amd64/reloc.c ============================================================================== --- stable/10/libexec/rtld-elf/amd64/reloc.c Mon Mar 19 14:28:20 2018 (r331205) +++ stable/10/libexec/rtld-elf/amd64/reloc.c Mon Mar 19 14:28:58 2018 (r331206) @@ -471,6 +471,12 @@ ifunc_init(Elf_Auxinfo aux_info[__min_size(AT_COUNT)] } void +pre_init(void) +{ + +} + +void allocate_initial_tls(Obj_Entry *objs) { /* Modified: stable/10/libexec/rtld-elf/arm/reloc.c ============================================================================== --- stable/10/libexec/rtld-elf/arm/reloc.c Mon Mar 19 14:28:20 2018 (r331205) +++ stable/10/libexec/rtld-elf/arm/reloc.c Mon Mar 19 14:28:58 2018 (r331206) @@ -437,6 +437,13 @@ reloc_jmpslot(Elf_Addr *where, Elf_Addr target, const void ifunc_init(Elf_Auxinfo aux_info[__min_size(AT_COUNT)] __unused) { + +} + +void +pre_init(void) +{ + } void Modified: stable/10/libexec/rtld-elf/i386/reloc.c ============================================================================== --- stable/10/libexec/rtld-elf/i386/reloc.c Mon Mar 19 14:28:20 2018 (r331205) +++ stable/10/libexec/rtld-elf/i386/reloc.c Mon Mar 19 14:28:58 2018 (r331206) @@ -457,6 +457,12 @@ ifunc_init(Elf_Auxinfo aux_info[__min_size(AT_COUNT)] } void +pre_init(void) +{ + +} + +void allocate_initial_tls(Obj_Entry *objs) { void* tls; Modified: stable/10/libexec/rtld-elf/ia64/reloc.c ============================================================================== --- stable/10/libexec/rtld-elf/ia64/reloc.c Mon Mar 19 14:28:20 2018 (r331205) +++ stable/10/libexec/rtld-elf/ia64/reloc.c Mon Mar 19 14:28:58 2018 (r331206) @@ -606,6 +606,13 @@ call_init_pointer(const Obj_Entry *obj, Elf_Addr targe void ifunc_init(Elf_Auxinfo aux_info[__min_size(AT_COUNT)] __unused) { + +} + +void +pre_init(void) +{ + } /* Initialize the special PLT entries. */ Modified: stable/10/libexec/rtld-elf/mips/reloc.c ============================================================================== --- stable/10/libexec/rtld-elf/mips/reloc.c Mon Mar 19 14:28:20 2018 (r331205) +++ stable/10/libexec/rtld-elf/mips/reloc.c Mon Mar 19 14:28:58 2018 (r331206) @@ -620,6 +620,13 @@ reloc_jmpslot(Elf_Addr *where, Elf_Addr target, const void ifunc_init(Elf_Auxinfo aux_info[__min_size(AT_COUNT)] __unused) { + +} + +void +pre_init(void) +{ + } void Modified: stable/10/libexec/rtld-elf/powerpc/reloc.c ============================================================================== --- stable/10/libexec/rtld-elf/powerpc/reloc.c Mon Mar 19 14:28:20 2018 (r331205) +++ stable/10/libexec/rtld-elf/powerpc/reloc.c Mon Mar 19 14:28:58 2018 (r331206) @@ -622,6 +622,13 @@ init_pltgot(Obj_Entry *obj) void ifunc_init(Elf_Auxinfo aux_info[__min_size(AT_COUNT)] __unused) { + +} + +void +pre_init(void) +{ + } void Modified: stable/10/libexec/rtld-elf/powerpc64/reloc.c ============================================================================== --- stable/10/libexec/rtld-elf/powerpc64/reloc.c Mon Mar 19 14:28:20 2018 (r331205) +++ stable/10/libexec/rtld-elf/powerpc64/reloc.c Mon Mar 19 14:28:58 2018 (r331206) @@ -490,6 +490,13 @@ init_pltgot(Obj_Entry *obj) void ifunc_init(Elf_Auxinfo aux_info[__min_size(AT_COUNT)] __unused) { + +} + +void +pre_init(void) +{ + } void Modified: stable/10/libexec/rtld-elf/rtld.c ============================================================================== --- stable/10/libexec/rtld-elf/rtld.c Mon Mar 19 14:28:20 2018 (r331205) +++ stable/10/libexec/rtld-elf/rtld.c Mon Mar 19 14:28:58 2018 (r331206) @@ -659,6 +659,12 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entr obj_main->fini_array = (Elf_Addr)NULL; } + /* + * Execute MD initializers required before we call the objects' + * init functions. + */ + pre_init(); + wlock_acquire(rtld_bind_lock, &lockstate); if (obj_main->crt_no_init) preinit_main(); Modified: stable/10/libexec/rtld-elf/rtld.h ============================================================================== --- stable/10/libexec/rtld-elf/rtld.h Mon Mar 19 14:28:20 2018 (r331205) +++ stable/10/libexec/rtld-elf/rtld.h Mon Mar 19 14:28:58 2018 (r331206) @@ -380,8 +380,6 @@ void dump_Elf_Rela(Obj_Entry *, const Elf_Rela *, u_lo unsigned long elf_hash(const char *); const Elf_Sym *find_symdef(unsigned long, const Obj_Entry *, const Obj_Entry **, int, SymCache *, struct Struct_RtldLockState *); -void ifunc_init(Elf_Auxinfo *); -void init_pltgot(Obj_Entry *); void lockdflt_init(void); void digest_notes(Obj_Entry *, Elf_Addr, Elf_Addr); Obj_Entry *globallist_curr(const Obj_Entry *obj); @@ -411,6 +409,9 @@ int reloc_plt(Obj_Entry *); int reloc_jmpslots(Obj_Entry *, int flags, struct Struct_RtldLockState *); int reloc_iresolve(Obj_Entry *, struct Struct_RtldLockState *); int reloc_gnu_ifunc(Obj_Entry *, int flags, struct Struct_RtldLockState *); +void ifunc_init(Elf_Auxinfo *); +void pre_init(void); +void init_pltgot(Obj_Entry *); void allocate_initial_tls(Obj_Entry *); #endif /* } */ Modified: stable/10/libexec/rtld-elf/sparc64/reloc.c ============================================================================== --- stable/10/libexec/rtld-elf/sparc64/reloc.c Mon Mar 19 14:28:20 2018 (r331205) +++ stable/10/libexec/rtld-elf/sparc64/reloc.c Mon Mar 19 14:28:58 2018 (r331206) @@ -365,8 +365,7 @@ reloc_nonplt_object(Obj_Entry *obj, const Elf_Rela *re * Note: R_SPARC_TLS_TPOFF64 must be the numerically largest * relocation type. */ - if (type >= sizeof(reloc_target_bitmask) / - sizeof(*reloc_target_bitmask)) { + if (type >= nitems(reloc_target_bitmask)) { _rtld_error("%s: Unsupported relocation type %d in non-PLT " "object\n", obj->path, type); return (-1); @@ -789,8 +788,18 @@ reloc_jmpslot(Elf_Addr *wherep, Elf_Addr target, const void ifunc_init(Elf_Auxinfo aux_info[__min_size(AT_COUNT)] __unused) { + } +extern void __sparc_utrap_setup(void); + +void +pre_init(void) +{ + + __sparc_utrap_setup(); +} + /* * Install rtld function call into this PLT slot. */ @@ -819,6 +828,7 @@ init_pltgot(Obj_Entry *obj) static void install_plt(Elf_Word *pltgot, Elf_Addr proc) { + pltgot[0] = SAVE; flush(pltgot, 0); pltgot[1] = SETHI_l0 | HIVAL(proc, 42); From owner-svn-src-stable-10@freebsd.org Mon Mar 19 17:38:36 2018 Return-Path: Delivered-To: svn-src-stable-10@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 4AB63F5E739; Mon, 19 Mar 2018 17:38:36 +0000 (UTC) (envelope-from dab@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 E75677B78B; Mon, 19 Mar 2018 17:38:35 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 E203011976; Mon, 19 Mar 2018 17:38:35 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2JHcZN8023700; Mon, 19 Mar 2018 17:38:35 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2JHcZMp023699; Mon, 19 Mar 2018 17:38:35 GMT (envelope-from dab@FreeBSD.org) Message-Id: <201803191738.w2JHcZMp023699@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Mon, 19 Mar 2018 17:38:35 +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: r331217 - stable/10/etc/rc.d X-SVN-Group: stable-10 X-SVN-Commit-Author: dab X-SVN-Commit-Paths: stable/10/etc/rc.d X-SVN-Commit-Revision: 331217 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-10@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Mar 2018 17:38:36 -0000 Author: dab Date: Mon Mar 19 17:38:35 2018 New Revision: 331217 URL: https://svnweb.freebsd.org/changeset/base/331217 Log: MFC r331015: Modify rc.d/fsck to handle new status from fsck/fsck_ffs r328013 introduced a new error code from fsck_ffs that indicates that it could not completely fix the file system; this happens when it prints the message PLEASE RERUN FSCK. However, this status can happen when fsck is run in "preen" mode and the rc.d/fsck script does not handle that error code. Modify rc.d/fsck so that if "fsck -p" ("preen") returns the new status code (16) it will run "fsck -y", as it currently does for a status code of 8 (the "standard error exit"). Reported by: markj Sponsored by: Dell EMC Modified: stable/10/etc/rc.d/fsck Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/fsck ============================================================================== --- stable/10/etc/rc.d/fsck Mon Mar 19 17:37:51 2018 (r331216) +++ stable/10/etc/rc.d/fsck Mon Mar 19 17:38:35 2018 (r331217) @@ -42,7 +42,7 @@ fsck_start() echo "Reboot failed; help!" stop_boot ;; - 8) + 8|16) if checkyesno fsck_y_enable; then echo "File system preen failed, trying fsck -y ${fsck_y_flags}" fsck -y ${fsck_y_flags} From owner-svn-src-stable-10@freebsd.org Tue Mar 20 22:57:15 2018 Return-Path: Delivered-To: svn-src-stable-10@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 F200DF53325; Tue, 20 Mar 2018 22:57:14 +0000 (UTC) (envelope-from ian@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 9D4136E734; Tue, 20 Mar 2018 22:57:14 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 97B4722ED4; Tue, 20 Mar 2018 22:57:14 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2KMvEWo014834; Tue, 20 Mar 2018 22:57:14 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2KMvEG7014833; Tue, 20 Mar 2018 22:57:14 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201803202257.w2KMvEG7014833@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 20 Mar 2018 22:57: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: r331276 - stable/10/sys/kern X-SVN-Group: stable-10 X-SVN-Commit-Author: ian X-SVN-Commit-Paths: stable/10/sys/kern X-SVN-Commit-Revision: 331276 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-10@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Mar 2018 22:57:15 -0000 Author: ian Date: Tue Mar 20 22:57:14 2018 New Revision: 331276 URL: https://svnweb.freebsd.org/changeset/base/331276 Log: MFC r330745: Make root mount timeout logic work for filesystems other than ufs. The vfs.mountroot.timeout tunable and .timeout directive in a mount.conf(5) file allow specifying a wait timeout for the device(s) hosting the root filesystem to become usable. The current mechanism for waiting for devices and detecting their availability can't be used for zfs-hosted filesystems. See the comment #20 in the PR for some expanded detail on these points. This change adds retry logic to the actual root filesystem mount. That is, insted of relying on device availability using device name lookups, it uses the kernel_mount() call itself to detect whether the filesystem can be mounted, and loops until it succeeds or the configured timeout is exceeded. These changes are based on the patch attached to the PR, but it's rewritten enough that all mistakes belong to me. PR: 208882 Modified: stable/10/sys/kern/vfs_mountroot.c Modified: stable/10/sys/kern/vfs_mountroot.c ============================================================================== --- stable/10/sys/kern/vfs_mountroot.c Tue Mar 20 22:57:06 2018 (r331275) +++ stable/10/sys/kern/vfs_mountroot.c Tue Mar 20 22:57:14 2018 (r331276) @@ -741,15 +741,31 @@ parse_mount(char **conf) } } - ma = NULL; - ma = mount_arg(ma, "fstype", fs, -1); - ma = mount_arg(ma, "fspath", "/", -1); - ma = mount_arg(ma, "from", dev, -1); - ma = mount_arg(ma, "errmsg", errmsg, ERRMSGL); - ma = mount_arg(ma, "ro", NULL, 0); - ma = parse_mountroot_options(ma, opts); - error = kernel_mount(ma, MNT_ROOTFS); + delay = hz / 10; + timeout = root_mount_timeout * hz; + for (;;) { + ma = NULL; + ma = mount_arg(ma, "fstype", fs, -1); + ma = mount_arg(ma, "fspath", "/", -1); + ma = mount_arg(ma, "from", dev, -1); + ma = mount_arg(ma, "errmsg", errmsg, ERRMSGL); + ma = mount_arg(ma, "ro", NULL, 0); + ma = parse_mountroot_options(ma, opts); + + error = kernel_mount(ma, MNT_ROOTFS); + if (error == 0 || timeout <= 0) + break; + + if (root_mount_timeout * hz == timeout || + (bootverbose && timeout % hz == 0)) { + printf("Mounting from %s:%s failed with error %d; " + "retrying for %d more second%s\n", fs, dev, error, + timeout / hz, (timeout / hz > 1) ? "s" : ""); + } + pause("rmretry", delay); + timeout -= delay; + } out: if (error) { printf("Mounting from %s:%s failed with error %d", From owner-svn-src-stable-10@freebsd.org Wed Mar 21 09:55:50 2018 Return-Path: Delivered-To: svn-src-stable-10@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 6D473F58CD5; Wed, 21 Mar 2018 09:55:50 +0000 (UTC) (envelope-from kp@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 21C76868F6; Wed, 21 Mar 2018 09:55:50 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1A73A292E3; Wed, 21 Mar 2018 09:55:50 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2L9tnZf046631; Wed, 21 Mar 2018 09:55:49 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2L9tnLO046630; Wed, 21 Mar 2018 09:55:49 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201803210955.w2L9tnLO046630@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Wed, 21 Mar 2018 09:55:49 +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: r331287 - stable/10/etc/rc.d X-SVN-Group: stable-10 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: stable/10/etc/rc.d X-SVN-Commit-Revision: 331287 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-10@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Mar 2018 09:55:50 -0000 Author: kp Date: Wed Mar 21 09:55:49 2018 New Revision: 331287 URL: https://svnweb.freebsd.org/changeset/base/331287 Log: MFC r330108: pf: Apply $pf_flags when verifying the pf.conf file When checking the validity of the pf.conf file also include the user supplied pf_flags. These flags might overrule macros or specify anchors, which we will apply when actually applying the pf.conf file, so we must also take them into account when verifying the validity. Submitted by: Andreas Longwitz Modified: stable/10/etc/rc.d/pf Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/pf ============================================================================== --- stable/10/etc/rc.d/pf Wed Mar 21 09:55:19 2018 (r331286) +++ stable/10/etc/rc.d/pf Wed Mar 21 09:55:49 2018 (r331287) @@ -46,13 +46,13 @@ pf_stop() pf_check() { echo "Checking pf rules." - $pf_program -n -f "$pf_rules" + $pf_program -n -f "$pf_rules" $pf_flags } pf_reload() { echo "Reloading pf rules." - $pf_program -n -f "$pf_rules" || return 1 + $pf_program -n -f "$pf_rules" $pf_flags || return 1 # Flush everything but existing state entries that way when # rules are read in, it doesn't break established connections. $pf_program -Fnat -Fqueue -Frules -FSources -Finfo -FTables -Fosfp > /dev/null 2>&1 From owner-svn-src-stable-10@freebsd.org Wed Mar 21 09:57:30 2018 Return-Path: Delivered-To: svn-src-stable-10@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 83D3BF58E76; Wed, 21 Mar 2018 09:57:30 +0000 (UTC) (envelope-from kp@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 34C1D86B86; Wed, 21 Mar 2018 09:57:30 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2FCA4292E6; Wed, 21 Mar 2018 09:57:30 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2L9vUMc046808; Wed, 21 Mar 2018 09:57:30 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2L9vUin046807; Wed, 21 Mar 2018 09:57:30 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201803210957.w2L9vUin046807@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Wed, 21 Mar 2018 09:57: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: r331289 - stable/10/etc/rc.d X-SVN-Group: stable-10 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: stable/10/etc/rc.d X-SVN-Commit-Revision: 331289 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-10@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Mar 2018 09:57:30 -0000 Author: kp Date: Wed Mar 21 09:57:29 2018 New Revision: 331289 URL: https://svnweb.freebsd.org/changeset/base/331289 Log: MFC 330105: pf: Do not flush on reload pfctl only takes the last '-F' argument into account, so this never did what was intended. Moreover, there is no reason to flush rules before reloading, because pf keeps track of the rule which created a given state. That means that existing connections will keep being processed according to the rule which originally created them. Simply reloading the (new) rules suffices. The new rules will apply to new connections. PR: 127814 Submitted by: Andreas Longwitz Modified: stable/10/etc/rc.d/pf Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/pf ============================================================================== --- stable/10/etc/rc.d/pf Wed Mar 21 09:57:05 2018 (r331288) +++ stable/10/etc/rc.d/pf Wed Mar 21 09:57:29 2018 (r331289) @@ -53,9 +53,6 @@ pf_reload() { echo "Reloading pf rules." $pf_program -n -f "$pf_rules" $pf_flags || return 1 - # Flush everything but existing state entries that way when - # rules are read in, it doesn't break established connections. - $pf_program -Fnat -Fqueue -Frules -FSources -Finfo -FTables -Fosfp > /dev/null 2>&1 $pf_program -f "$pf_rules" $pf_flags } From owner-svn-src-stable-10@freebsd.org Wed Mar 21 15:05:46 2018 Return-Path: Delivered-To: svn-src-stable-10@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 432E8F4B3CC; Wed, 21 Mar 2018 15:05:46 +0000 (UTC) (envelope-from avg@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 ED36974202; Wed, 21 Mar 2018 15:05:45 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E79AC2C39D; Wed, 21 Mar 2018 15:05:45 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2LF5jrx002339; Wed, 21 Mar 2018 15:05:45 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2LF5jx4002338; Wed, 21 Mar 2018 15:05:45 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201803211505.w2LF5jx4002338@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 21 Mar 2018 15:05:45 +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: r331301 - stable/10/sys/ddb X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/10/sys/ddb X-SVN-Commit-Revision: 331301 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-10@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Mar 2018 15:05:46 -0000 Author: avg Date: Wed Mar 21 15:05:45 2018 New Revision: 331301 URL: https://svnweb.freebsd.org/changeset/base/331301 Log: MFC r330374: db_script_exec: use a saved script name when reporting commands executed Modified: stable/10/sys/ddb/db_script.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ddb/db_script.c ============================================================================== --- stable/10/sys/ddb/db_script.c Wed Mar 21 15:05:08 2018 (r331300) +++ stable/10/sys/ddb/db_script.c Wed Mar 21 15:05:45 2018 (r331301) @@ -294,7 +294,7 @@ db_script_exec(const char *scriptname, int warnifnotfo buffer = drd->drd_buffer; strcpy(buffer, dsp->ds_script); while ((command = strsep(&buffer, ";")) != NULL) { - db_printf("db:%d:%s> %s\n", db_recursion, scriptname, + db_printf("db:%d:%s> %s\n", db_recursion, dsp->ds_scriptname, command); db_command_trim(&command); prev_jb = kdb_jmpbuf(jb); From owner-svn-src-stable-10@freebsd.org Wed Mar 21 15:13:48 2018 Return-Path: Delivered-To: svn-src-stable-10@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 65B0EF4C0FB; Wed, 21 Mar 2018 15:13:48 +0000 (UTC) (envelope-from avg@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 1930874D68; Wed, 21 Mar 2018 15:13:48 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 13F062C541; Wed, 21 Mar 2018 15:13:48 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2LFDlfa007495; Wed, 21 Mar 2018 15:13:47 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2LFDlPs007494; Wed, 21 Mar 2018 15:13:47 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201803211513.w2LFDlPs007494@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 21 Mar 2018 15:13:47 +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: r331305 - stable/10/sys/x86/x86 X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/10/sys/x86/x86 X-SVN-Commit-Revision: 331305 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-10@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Mar 2018 15:13:48 -0000 Author: avg Date: Wed Mar 21 15:13:47 2018 New Revision: 331305 URL: https://svnweb.freebsd.org/changeset/base/331305 Log: MFC r330793: fix r297857, do not modify CPU extension bits under virtual machines PR: 213155 Modified: stable/10/sys/x86/x86/identcpu.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/x86/identcpu.c ============================================================================== --- stable/10/sys/x86/x86/identcpu.c Wed Mar 21 15:09:47 2018 (r331304) +++ stable/10/sys/x86/x86/identcpu.c Wed Mar 21 15:13:47 2018 (r331305) @@ -1335,7 +1335,8 @@ fix_cpuid(void) * See BIOS and Kernel Developer’s Guide (BKDG) for AMD Family 15h * Models 60h-6Fh Processors, Publication # 50742. */ - if (cpu_vendor_id == CPU_VENDOR_AMD && CPUID_TO_FAMILY(cpu_id) == 0x15) { + if (vm_guest == VM_GUEST_NO && cpu_vendor_id == CPU_VENDOR_AMD && + CPUID_TO_FAMILY(cpu_id) == 0x15) { msr = rdmsr(MSR_EXTFEATURES); if ((msr & ((uint64_t)1 << 54)) == 0) { msr |= (uint64_t)1 << 54; From owner-svn-src-stable-10@freebsd.org Wed Mar 21 20:13:25 2018 Return-Path: Delivered-To: svn-src-stable-10@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 006C8F63227; Wed, 21 Mar 2018 20:13:25 +0000 (UTC) (envelope-from np@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 A75288571E; Wed, 21 Mar 2018 20:13:24 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A22642F48A; Wed, 21 Mar 2018 20:13:24 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2LKDOCx064106; Wed, 21 Mar 2018 20:13:24 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2LKDOVU064104; Wed, 21 Mar 2018 20:13:24 GMT (envelope-from np@FreeBSD.org) Message-Id: <201803212013.w2LKDOVU064104@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 21 Mar 2018 20:13:24 +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: r331320 - stable/10/sys/dev/cxgb X-SVN-Group: stable-10 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/10/sys/dev/cxgb X-SVN-Commit-Revision: 331320 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-10@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Mar 2018 20:13:25 -0000 Author: np Date: Wed Mar 21 20:13:24 2018 New Revision: 331320 URL: https://svnweb.freebsd.org/changeset/base/331320 Log: MFC r328315: cxgb(4): Validate offset/len in the GET_EEPROM ioctl. Sponsored by: Chelsio Communications. Modified: stable/10/sys/dev/cxgb/cxgb_main.c Modified: stable/10/sys/dev/cxgb/cxgb_main.c ============================================================================== --- stable/10/sys/dev/cxgb/cxgb_main.c Wed Mar 21 19:33:00 2018 (r331319) +++ stable/10/sys/dev/cxgb/cxgb_main.c Wed Mar 21 20:13:24 2018 (r331320) @@ -2914,8 +2914,14 @@ cxgb_extension_ioctl(struct cdev *dev, unsigned long c case CHELSIO_GET_EEPROM: { int i; struct ch_eeprom *e = (struct ch_eeprom *)data; - uint8_t *buf = malloc(EEPROMSIZE, M_DEVBUF, M_NOWAIT); + uint8_t *buf; + if (e->offset & 3 || e->offset >= EEPROMSIZE || + e->len > EEPROMSIZE || e->offset + e->len > EEPROMSIZE) { + return (EINVAL); + } + + buf = malloc(EEPROMSIZE, M_DEVBUF, M_NOWAIT); if (buf == NULL) { return (ENOMEM); } From owner-svn-src-stable-10@freebsd.org Thu Mar 22 00:52:53 2018 Return-Path: Delivered-To: svn-src-stable-10@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 B6D30F54527; Thu, 22 Mar 2018 00:52:53 +0000 (UTC) (envelope-from np@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 6C14E7286D; Thu, 22 Mar 2018 00:52:53 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4D9E11FB9; Thu, 22 Mar 2018 00:52:53 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2M0qr9H006024; Thu, 22 Mar 2018 00:52:53 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2M0qrMX006023; Thu, 22 Mar 2018 00:52:53 GMT (envelope-from np@FreeBSD.org) Message-Id: <201803220052.w2M0qrMX006023@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 22 Mar 2018 00:52:53 +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: r331336 - stable/10 X-SVN-Group: stable-10 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/10 X-SVN-Commit-Revision: 331336 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-10@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Mar 2018 00:52:53 -0000 Author: np Date: Thu Mar 22 00:52:53 2018 New Revision: 331336 URL: https://svnweb.freebsd.org/changeset/base/331336 Log: Add mergeinfo. This should have been part of r331320. Modified: Directory Properties: stable/10/ (props changed) From owner-svn-src-stable-10@freebsd.org Thu Mar 22 00:55:36 2018 Return-Path: Delivered-To: svn-src-stable-10@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 C9DC1F54812; Thu, 22 Mar 2018 00:55:36 +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 7EC2D72B54; Thu, 22 Mar 2018 00:55:36 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7989C1FBD; Thu, 22 Mar 2018 00:55:36 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2M0ta3A006272; Thu, 22 Mar 2018 00:55:36 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2M0taCo006271; Thu, 22 Mar 2018 00:55:36 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201803220055.w2M0taCo006271@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 22 Mar 2018 00:55: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: r331338 - stable/10/sys/dev/bktr X-SVN-Group: stable-10 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/10/sys/dev/bktr X-SVN-Commit-Revision: 331338 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-10@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Mar 2018 00:55:37 -0000 Author: emaste Date: Thu Mar 22 00:55:36 2018 New Revision: 331338 URL: https://svnweb.freebsd.org/changeset/base/331338 Log: MFC r330668: bktr: correct Japan IF frequency PR: 36451 Submitted by: Hijiri Umemoto Modified: stable/10/sys/dev/bktr/bktr_tuner.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/bktr/bktr_tuner.c ============================================================================== --- stable/10/sys/dev/bktr/bktr_tuner.c Thu Mar 22 00:54:13 2018 (r331337) +++ stable/10/sys/dev/bktr/bktr_tuner.c Thu Mar 22 00:55:36 2018 (r331338) @@ -564,12 +564,10 @@ static int weurope[] = { * 8: 193.25MHz - 12: 217.25MHz (VHF) * 13: 471.25MHz - 62: 765.25MHz (UHF) * - * IF freq: 45.75 mHz - * OR * IF freq: 58.75 mHz */ #define OFFSET 6.00 -#define IF_FREQ 45.75 +#define IF_FREQ 58.75 static int jpnbcst[] = { 62, (int)(IF_FREQ * FREQFACTOR), 0, 13, (int)(471.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), @@ -591,10 +589,10 @@ static int jpnbcst[] = { * 22: 165.25MHz * 23: 223.25MHz - 63: 463.25MHz * - * IF freq: 45.75 mHz + * IF freq: 58.75 mHz */ #define OFFSET 6.00 -#define IF_FREQ 45.75 +#define IF_FREQ 58.75 static int jpncable[] = { 63, (int)(IF_FREQ * FREQFACTOR), 0, 23, (int)(223.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), From owner-svn-src-stable-10@freebsd.org Thu Mar 22 17:46:39 2018 Return-Path: Delivered-To: svn-src-stable-10@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 14792F5AE74; Thu, 22 Mar 2018 17:46:39 +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 BDBCC81998; Thu, 22 Mar 2018 17:46:38 +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 B4595147A5; Thu, 22 Mar 2018 17:46:38 +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 w2MHkcqv012610; Thu, 22 Mar 2018 17:46:38 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2MHkcaf012609; Thu, 22 Mar 2018 17:46:38 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201803221746.w2MHkcaf012609@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 22 Mar 2018 17:46:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r331363 - 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: 331363 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-10@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Mar 2018 17:46:39 -0000 Author: gjb Date: Thu Mar 22 17:46:38 2018 New Revision: 331363 URL: https://svnweb.freebsd.org/changeset/base/331363 Log: MFC r322794: Use py-google-compute-engine instead for releasing Google Compute Engine (GCE) images with an updated version of Google's tools. PR: 221714 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 Mar 22 15:34:37 2018 (r331362) +++ stable/10/release/tools/gce.conf Thu Mar 22 17:46:38 2018 (r331363) @@ -5,12 +5,15 @@ # Set to a list of packages to install. export VM_EXTRA_PACKAGES="firstboot-freebsd-update firstboot-pkgs \ - google-cloud-sdk google-daemon panicmail sudo firstboot-growfs \ - google-startup-scripts" + google-cloud-sdk panicmail sudo firstboot-growfs \ + sysutils/py-google-compute-engine" # Set to a list of third-party software to enable in rc.conf(5). export VM_RC_LIST="google_accounts_manager ntpd sshd firstboot_growfs \ - firstboot_pkgs firstboot_freebsd_update google_startup" + firstboot_pkgs firstboot_freebsd_update google_startup \ + google_accounts_daemon google_clock_skew_daemon + google_instance_setup google_ip_forwarding_daemon + google_network_setup" vm_extra_install_base() { echo 'search google.internal' > ${DESTDIR}/etc/resolv.conf From owner-svn-src-stable-10@freebsd.org Fri Mar 23 02:34:46 2018 Return-Path: Delivered-To: svn-src-stable-10@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 12724F61F49; Fri, 23 Mar 2018 02:34:46 +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 BAAD47AAEF; Fri, 23 Mar 2018 02:34:45 +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 B577E19E69; Fri, 23 Mar 2018 02:34:45 +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 w2N2Yj7U080797; Fri, 23 Mar 2018 02:34:45 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2N2Yj8T080796; Fri, 23 Mar 2018 02:34:45 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201803230234.w2N2Yj8T080796@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 23 Mar 2018 02:34:45 +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: r331410 - stable/10/sys/dev/drm X-SVN-Group: stable-10 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/10/sys/dev/drm X-SVN-Commit-Revision: 331410 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-10@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Mar 2018 02:34:46 -0000 Author: emaste Date: Fri Mar 23 02:34:45 2018 New Revision: 331410 URL: https://svnweb.freebsd.org/changeset/base/331410 Log: MFC r331339: Correct signedness bug in drm_modeset_ctl drm_modeset_ctl() takes a signed in from userland, does a boundscheck, and then uses it to index into a structure and write to it. The boundscheck only checks upper bound, and never checks for nagative values. If the int coming from userland is negative [after conversion] it will bypass the boundscheck, perform a negative index into an array and write to it, causing memory corruption. Note that this is in the "old" drm driver; this issue does not exist in drm2. Reported by: Ilja Van Sprundel Reviewed by: cem Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/drm/drm_irq.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/drm/drm_irq.c ============================================================================== --- stable/10/sys/dev/drm/drm_irq.c Fri Mar 23 02:33:30 2018 (r331409) +++ stable/10/sys/dev/drm/drm_irq.c Fri Mar 23 02:34:45 2018 (r331410) @@ -357,7 +357,7 @@ int drm_modeset_ctl(struct drm_device *dev, void *data goto out; crtc = modeset->crtc; - if (crtc >= dev->num_crtcs) { + if (crtc < 0 || crtc >= dev->num_crtcs) { ret = EINVAL; goto out; } From owner-svn-src-stable-10@freebsd.org Fri Mar 23 02:38:32 2018 Return-Path: Delivered-To: svn-src-stable-10@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 6D100F62618; Fri, 23 Mar 2018 02:38:32 +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 1EEDB7B12E; Fri, 23 Mar 2018 02:38:32 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 19A9919E6B; Fri, 23 Mar 2018 02:38:32 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2N2cVxV081042; Fri, 23 Mar 2018 02:38:31 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2N2cV8e081041; Fri, 23 Mar 2018 02:38:31 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201803230238.w2N2cV8e081041@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 23 Mar 2018 02:38:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r331412 - stable/10/sys/dev/drm X-SVN-Group: stable-10 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/10/sys/dev/drm X-SVN-Commit-Revision: 331412 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-10@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Mar 2018 02:38:32 -0000 Author: emaste Date: Fri Mar 23 02:38:31 2018 New Revision: 331412 URL: https://svnweb.freebsd.org/changeset/base/331412 Log: MFC r331333: Fix kernel memory disclosure in drm_infobufs drm_infobufs() has a structure on the stack, fills it out and copies it to userland. There are 2 elements in the struct that are not filled out and left uninitialized. This will leak uninitialized kernel stack data to userland. Submitted by: Domagoj Stolfa Reported by: Ilja Van Sprundel Security: Kernel memory disclosure (798) Modified: stable/10/sys/dev/drm/drm_bufs.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/drm/drm_bufs.c ============================================================================== --- stable/10/sys/dev/drm/drm_bufs.c Fri Mar 23 02:37:08 2018 (r331411) +++ stable/10/sys/dev/drm/drm_bufs.c Fri Mar 23 02:38:31 2018 (r331412) @@ -935,6 +935,7 @@ int drm_infobufs(struct drm_device *dev, void *data, s if (dma->bufs[i].buf_count) { struct drm_buf_desc from; + memset(&from, 0, sizeof(from)); from.count = dma->bufs[i].buf_count; from.size = dma->bufs[i].buf_size; from.low_mark = dma->bufs[i].freelist.low_mark; From owner-svn-src-stable-10@freebsd.org Sat Mar 24 00:26:43 2018 Return-Path: Delivered-To: svn-src-stable-10@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 385AEF5A7B4; Sat, 24 Mar 2018 00:26:43 +0000 (UTC) (envelope-from jhb@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 E02906D7B6; Sat, 24 Mar 2018 00:26:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DAFF4272E2; Sat, 24 Mar 2018 00:26:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2O0QgRp044071; Sat, 24 Mar 2018 00:26:42 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2O0Qgun044067; Sat, 24 Mar 2018 00:26:42 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201803240026.w2O0Qgun044067@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 24 Mar 2018 00:26:42 +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: r331471 - in stable: 10/bin/ps 11/bin/ps X-SVN-Group: stable-10 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable: 10/bin/ps 11/bin/ps X-SVN-Commit-Revision: 331471 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-10@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Mar 2018 00:26:43 -0000 Author: jhb Date: Sat Mar 24 00:26:42 2018 New Revision: 331471 URL: https://svnweb.freebsd.org/changeset/base/331471 Log: MFC 330872: Add a "jail" keyword to list the name of a jail rather than its ID. Modified: stable/10/bin/ps/extern.h stable/10/bin/ps/keyword.c stable/10/bin/ps/print.c stable/10/bin/ps/ps.1 Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/bin/ps/extern.h stable/11/bin/ps/keyword.c stable/11/bin/ps/print.c stable/11/bin/ps/ps.1 Directory Properties: stable/11/ (props changed) Modified: stable/10/bin/ps/extern.h ============================================================================== --- stable/10/bin/ps/extern.h Fri Mar 23 23:46:59 2018 (r331470) +++ stable/10/bin/ps/extern.h Sat Mar 24 00:26:42 2018 (r331471) @@ -53,6 +53,7 @@ char *emulname(KINFO *, VARENT *); VARENT *find_varentry(VAR *); const char *fmt_argv(char **, char *, char *, size_t); double getpcpu(const KINFO *); +char *jailname(KINFO *, VARENT *); char *kvar(KINFO *, VARENT *); char *label(KINFO *, VARENT *); char *loginclass(KINFO *, VARENT *); Modified: stable/10/bin/ps/keyword.c ============================================================================== --- stable/10/bin/ps/keyword.c Fri Mar 23 23:46:59 2018 (r331470) +++ stable/10/bin/ps/keyword.c Sat Mar 24 00:26:42 2018 (r331471) @@ -96,6 +96,7 @@ static VAR var[] = { {"ignored", "", "sigignore", 0, NULL, 0, CHAR, NULL, 0}, {"inblk", "INBLK", NULL, USER, rvar, ROFF(ru_inblock), LONG, "ld", 0}, {"inblock", "", "inblk", 0, NULL, 0, CHAR, NULL, 0}, + {"jail", "JAIL", NULL, LJUST, jailname, 0, CHAR, NULL, 0}, {"jid", "JID", NULL, 0, kvar, KOFF(ki_jid), INT, "d", 0}, {"jobc", "JOBC", NULL, 0, kvar, KOFF(ki_jobc), SHORT, "d", 0}, {"ktrace", "KTRACE", NULL, 0, kvar, KOFF(ki_traceflag), INT, "x", 0}, Modified: stable/10/bin/ps/print.c ============================================================================== --- stable/10/bin/ps/print.c Fri Mar 23 23:46:59 2018 (r331470) +++ stable/10/bin/ps/print.c Sat Mar 24 00:26:42 2018 (r331471) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -839,4 +840,17 @@ loginclass(KINFO *k, VARENT *ve __unused) return (strdup("-")); } return (strdup(k->ki_p->ki_loginclass)); +} + +char * +jailname(KINFO *k, VARENT *ve __unused) +{ + char *name; + + if (k->ki_p->ki_jid == 0) + return (strdup("-")); + name = jail_getname(k->ki_p->ki_jid); + if (name == NULL) + return (strdup("-")); + return (name); } Modified: stable/10/bin/ps/ps.1 ============================================================================== --- stable/10/bin/ps/ps.1 Fri Mar 23 23:46:59 2018 (r331470) +++ stable/10/bin/ps/ps.1 Sat Mar 24 00:26:42 2018 (r331471) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd August 12, 2016 +.Dd March 13, 2018 .Dt PS 1 .Os .Sh NAME @@ -554,6 +554,8 @@ group name (from egid) (alias .It Cm inblk total blocks read (alias .Cm inblock ) +.It Cm jail +jail name .It Cm jid jail ID .It Cm jobc