From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 00:03:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C17287CE; Sun, 25 Jan 2015 00:03:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A26E2385; Sun, 25 Jan 2015 00:03:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0P03kkl084223; Sun, 25 Jan 2015 00:03:46 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0P03jea084211; Sun, 25 Jan 2015 00:03:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501250003.t0P03jea084211@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 25 Jan 2015 00:03:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277663 - in head: share/mk tools/build/mk tools/build/options usr.bin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 00:03:47 -0000 Author: ngie Date: Sun Jan 25 00:03:44 2015 New Revision: 277663 URL: https://svnweb.freebsd.org/changeset/base/277663 Log: Add MK_EE knob to control installing edit, ee, etc MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Added: head/tools/build/options/WITHOUT_EE (contents, props changed) Modified: head/share/mk/src.opts.mk head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.bin/Makefile Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Sat Jan 24 21:25:55 2015 (r277662) +++ head/share/mk/src.opts.mk Sun Jan 25 00:03:44 2015 (r277663) @@ -73,6 +73,7 @@ __DEFAULT_YES_OPTIONS = \ DMAGENT \ DYNAMICROOT \ ED_CRYPTO \ + EE \ ELFTOOLCHAIN_TOOLS \ EXAMPLES \ FDT \ Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sat Jan 24 21:25:55 2015 (r277662) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Jan 25 00:03:44 2015 (r277663) @@ -1216,6 +1216,23 @@ OLD_FILES+=usr/share/dict/words OLD_DIRS+=usr/share/dict .endif +.if ${MK_EE} == no +OLD_FILES+=usr/bin/edit +OLD_FILES+=usr/bin/ee +OLD_FILES+=usr/bin/ree +OLD_FILES+=usr/share/man/man1/edit.1.gz +OLD_FILES+=usr/share/man/man1/ee.1.gz +OLD_FILES+=usr/share/man/man1/ree.1.gz +OLD_FILES+=usr/share/nls/C/ee.cat +OLD_FILES+=usr/share/nls/de_DE.ISO8859-1/ee.cat +OLD_FILES+=usr/share/nls/fr_FR.ISO8859-1/ee.cat +OLD_FILES+=usr/share/nls/hu_HU.ISO8859-2/ee.cat +OLD_FILES+=usr/share/nls/pl_PL.ISO8859-2/ee.cat +OLD_FILES+=usr/share/nls/pt_BR.ISO8859-1/ee.cat +OLD_FILES+=usr/share/nls/ru_RU.KOI8-R/ee.cat +OLD_FILES+=usr/share/nls/uk_UA.KOI8-U/ee.cat +.endif + .if ${MK_ELFTOOLCHAIN_TOOLS} == no OLD_FILES+=usr/bin/elfcopy OLD_FILES+=usr/share/man/man1/elfcopy.1.gz Added: head/tools/build/options/WITHOUT_EE ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_EE Sun Jan 25 00:03:44 2015 (r277663) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to not build and install +.Xr edit 1 , +.Xr ee 1 , +and related programs. Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Sat Jan 24 21:25:55 2015 (r277662) +++ head/usr.bin/Makefile Sun Jan 25 00:03:44 2015 (r277663) @@ -40,7 +40,6 @@ SUBDIR= ${_addr2line} \ dirname \ dpv \ du \ - ee \ elf2aout \ ${_elfcopy} \ elfdump \ @@ -240,6 +239,10 @@ SUBDIR+= calendar _clang= clang .endif +.if ${MK_EE} != "no" +SUBDIR+= ee +.endif + .if ${MK_ELFTOOLCHAIN_TOOLS} != "no" _addr2line= addr2line _elfcopy= elfcopy From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 00:28:16 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A621C5A; Sun, 25 Jan 2015 00:28:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7633A792; Sun, 25 Jan 2015 00:28:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0P0SGtn094512; Sun, 25 Jan 2015 00:28:16 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0P0SGQo094511; Sun, 25 Jan 2015 00:28:16 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501250028.t0P0SGQo094511@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 25 Jan 2015 00:28:16 +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: r277664 - stable/10/contrib/netbsd-tests/lib/libpthread X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 00:28:16 -0000 Author: ngie Date: Sun Jan 25 00:28:15 2015 New Revision: 277664 URL: https://svnweb.freebsd.org/changeset/base/277664 Log: MFC r277278: r277278 (by ngie): Fix lib/libthr/tests/detach_test - Eliminate race with liberal use of sleep(3) [1] - Fix NetBSD-specific implementation way of testing result from pthread_cancel by testing with `td` instead of `NULL` [2] PR: 196738 [1] PR: 191906 [2] Sponsored by: EMC / Isilon Storage Division Modified: stable/10/contrib/netbsd-tests/lib/libpthread/t_detach.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libpthread/t_detach.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libpthread/t_detach.c Sun Jan 25 00:03:44 2015 (r277663) +++ stable/10/contrib/netbsd-tests/lib/libpthread/t_detach.c Sun Jan 25 00:28:15 2015 (r277664) @@ -38,11 +38,18 @@ __RCSID("$NetBSD: t_detach.c,v 1.1 2011/ #include "h_common.h" +#ifdef __FreeBSD__ +#include +#endif + static void *func(void *); static void * func(void *arg) { +#ifdef __FreeBSD__ + sleep(2); +#endif return NULL; } @@ -72,18 +79,25 @@ ATF_TC_BODY(pthread_detach, tc) */ PTHREAD_REQUIRE(pthread_detach(t)); +#ifdef __FreeBSD__ + sleep(1); +#endif rv = pthread_join(t, NULL); ATF_REQUIRE(rv == EINVAL); #ifdef __FreeBSD__ - atf_tc_expect_fail("PR # 191906: fails with EINVAL, not ESRCH"); + sleep(3); #endif /* * As usual, ESRCH should follow if * we try to detach an invalid thread. */ +#ifdef __NetBSD__ rv = pthread_cancel(NULL); +#else + rv = pthread_cancel(t); +#endif ATF_REQUIRE(rv == ESRCH); } From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 00:30:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 93B46DE6; Sun, 25 Jan 2015 00:30:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 803277B4; Sun, 25 Jan 2015 00:30:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0P0UNeo095397; Sun, 25 Jan 2015 00:30:23 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0P0UNPb095395; Sun, 25 Jan 2015 00:30:23 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501250030.t0P0UNPb095395@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 25 Jan 2015 00:30:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277665 - head/rescue/rescue X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 00:30:23 -0000 Author: ngie Date: Sun Jan 25 00:30:22 2015 New Revision: 277665 URL: https://svnweb.freebsd.org/changeset/base/277665 Log: Only build vi support into rescue if MK_VI != no Sponsored by: EMC / Isilon Storage Division Modified: head/rescue/rescue/Makefile Modified: head/rescue/rescue/Makefile ============================================================================== --- head/rescue/rescue/Makefile Sun Jan 25 00:28:15 2015 (r277664) +++ head/rescue/rescue/Makefile Sun Jan 25 00:30:22 2015 (r277665) @@ -199,8 +199,10 @@ CRUNCH_LIBS+= -lcrypto .endif CRUNCH_LIBS+= -lmd +.if ${MK_VI} != "no" CRUNCH_PROGS_usr.bin+= vi CRUNCH_ALIAS_vi= ex +.endif CRUNCH_PROGS_usr.bin+= id CRUNCH_ALIAS_id= groups whoami From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 00:32:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F227AF35; Sun, 25 Jan 2015 00:32:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF61B854; Sun, 25 Jan 2015 00:32:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0P0WHdv098737; Sun, 25 Jan 2015 00:32:17 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0P0WHrB098736; Sun, 25 Jan 2015 00:32:17 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501250032.t0P0WHrB098736@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 25 Jan 2015 00:32:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277666 - head/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 00:32:18 -0000 Author: ngie Date: Sun Jan 25 00:32:17 2015 New Revision: 277666 URL: https://svnweb.freebsd.org/changeset/base/277666 Log: Only build share/dtrace if MK_CDDL != no MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/share/Makefile Modified: head/share/Makefile ============================================================================== --- head/share/Makefile Sun Jan 25 00:30:22 2015 (r277665) +++ head/share/Makefile Sun Jan 25 00:32:17 2015 (r277666) @@ -8,7 +8,7 @@ SUBDIR= ${_colldef} \ ${_dict} \ ${_doc} \ - dtrace \ + ${_dtrace} \ ${_examples} \ ${_i18n} \ keys \ @@ -37,6 +37,10 @@ SUBDIR= ${_colldef} \ _snmp= snmp .endif +.if ${MK_CDDL} != "no" +_dtrace= dtrace +.endif + .if ${MK_DICT} != "no" _dict= dict .endif From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 00:34:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3EFD71D0; Sun, 25 Jan 2015 00:34:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 112FE862; Sun, 25 Jan 2015 00:34:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0P0YiLW099097; Sun, 25 Jan 2015 00:34:44 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0P0YiGE099093; Sun, 25 Jan 2015 00:34:44 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201501250034.t0P0YiGE099093@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 25 Jan 2015 00:34:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277667 - in head/lib/libproc: . tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 00:34:45 -0000 Author: markj Date: Sun Jan 25 00:34:43 2015 New Revision: 277667 URL: https://svnweb.freebsd.org/changeset/base/277667 Log: Ensure that we don't try to demangle a symbol name if we failed to look up the symbol. Add a test to exercise this code path. Reviewed by: adrian Modified: head/lib/libproc/proc_sym.c head/lib/libproc/tests/proc_test.c Modified: head/lib/libproc/proc_sym.c ============================================================================== --- head/lib/libproc/proc_sym.c Sun Jan 25 00:32:17 2015 (r277666) +++ head/lib/libproc/proc_sym.c Sun Jan 25 00:34:43 2015 (r277667) @@ -335,8 +335,8 @@ proc_addr2sym(struct proc_handle *p, uin goto out; error = lookup_addr(e, symtabscn, symtabstridx, off, addr, &s, symcopy); - if (error == 0) - goto out; + if (error != 0) + goto err2; out: demangle(s, name, namesz); Modified: head/lib/libproc/tests/proc_test.c ============================================================================== --- head/lib/libproc/tests/proc_test.c Sun Jan 25 00:32:17 2015 (r277666) +++ head/lib/libproc/tests/proc_test.c Sun Jan 25 00:34:43 2015 (r277667) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2014 Mark Johnston + * Copyright (c) 2014, 2015 Mark Johnston * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -295,6 +295,43 @@ ATF_TC_BODY(symbol_lookup, tc) proc_free(phdl); } +ATF_TC(symbol_lookup_fail); +ATF_TC_HEAD(symbol_lookup_fail, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify that proc_addr2sym() returns an error when given an offset " + "that it cannot resolve."); +} +ATF_TC_BODY(symbol_lookup_fail, tc) +{ + char symname[32]; + GElf_Sym sym; + struct proc_handle *phdl; + prmap_t *map; + int error; + + phdl = start_prog(tc, false); + + /* Initialize the rtld_db handle. */ + (void)proc_rdagent(phdl); + + map = proc_obj2map(phdl, target_prog_file); + ATF_REQUIRE_MSG(map != NULL, "failed to look up map for '%s'", + target_prog_file); + + /* + * We shouldn't be able to find symbols at the beginning of a mapped + * file. + */ + error = proc_addr2sym(phdl, map->pr_vaddr, symname, sizeof(symname), + &sym); + ATF_REQUIRE_MSG(error != 0, "unexpectedly found a symbol"); + + ATF_CHECK_EQ_MSG(proc_continue(phdl), 0, "failed to resume execution"); + + proc_free(phdl); +} + ATF_TC(signal_forward); ATF_TC_HEAD(signal_forward, tc) { @@ -343,6 +380,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, map_alias_name2map); ATF_TP_ADD_TC(tp, map_alias_name2sym); ATF_TP_ADD_TC(tp, symbol_lookup); + ATF_TP_ADD_TC(tp, symbol_lookup_fail); ATF_TP_ADD_TC(tp, signal_forward); return (atf_no_error()); From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 00:36:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 28C9833B; Sun, 25 Jan 2015 00:36:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1528A874; Sun, 25 Jan 2015 00:36:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0P0agZZ099447; Sun, 25 Jan 2015 00:36:42 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0P0agHD099446; Sun, 25 Jan 2015 00:36:42 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201501250036.t0P0agHD099446@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 25 Jan 2015 00:36:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277668 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 00:36:43 -0000 Author: markj Date: Sun Jan 25 00:36:42 2015 New Revision: 277668 URL: https://svnweb.freebsd.org/changeset/base/277668 Log: Document the fact that modules declared with SYSCALL_MODULE(9) have their names prefixed with "sys/". MFC after: 3 days Modified: head/share/man/man9/SYSCALL_MODULE.9 Modified: head/share/man/man9/SYSCALL_MODULE.9 ============================================================================== --- head/share/man/man9/SYSCALL_MODULE.9 Sun Jan 25 00:34:43 2015 (r277667) +++ head/share/man/man9/SYSCALL_MODULE.9 Sun Jan 25 00:36:42 2015 (r277668) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 7, 2005 +.Dd January 24, 2015 .Dt SYSCALL_MODULE 9 .Os .Sh NAME @@ -46,8 +46,8 @@ The .Fn SYSCALL_MODULE macro declares a new syscall. .Fn SYSCALL_MODULE -expands into a kernel module declaration named as -.Fa name . +expands into a kernel module declaration with name +.Ql sys/ Ns Fa name . .Pp The rest of the arguments expected by this macro are: .Bl -tag -width ".Fa new_sysent" From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 00:47:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1246B625; Sun, 25 Jan 2015 00:47:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D8980966; Sun, 25 Jan 2015 00:47:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0P0l6Ho004784; Sun, 25 Jan 2015 00:47:06 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0P0l6aH004783; Sun, 25 Jan 2015 00:47:06 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201501250047.t0P0l6aH004783@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 25 Jan 2015 00:47:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277669 - head/lib/libutil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 00:47:07 -0000 Author: markj Date: Sun Jan 25 00:47:06 2015 New Revision: 277669 URL: https://svnweb.freebsd.org/changeset/base/277669 Log: gr_equal(): Fix a crash that could occur if the first group's member list was longer than the second's. There is no need to compute and compare the member list lengths in a separate pass, since we now just return false when comparing member names if the list lengths are not equal. MFC after: 2 weeks Modified: head/lib/libutil/gr_util.c Modified: head/lib/libutil/gr_util.c ============================================================================== --- head/lib/libutil/gr_util.c Sun Jan 25 00:36:42 2015 (r277668) +++ head/lib/libutil/gr_util.c Sun Jan 25 00:47:06 2015 (r277669) @@ -351,8 +351,6 @@ gr_fini(void) int gr_equal(const struct group *gr1, const struct group *gr2) { - int gr1_ndx; - int gr2_ndx; /* Check that the non-member information is the same. */ if (gr1->gr_name == NULL || gr2->gr_name == NULL) { @@ -368,7 +366,8 @@ gr_equal(const struct group *gr1, const if (gr1->gr_gid != gr2->gr_gid) return (false); - /* Check all members in both groups. + /* + * Check all members in both groups. * getgrnam can return gr_mem with a pointer to NULL. * gr_dup and gr_add strip out this superfluous NULL, setting * gr_mem to NULL for no members. @@ -376,22 +375,18 @@ gr_equal(const struct group *gr1, const if (gr1->gr_mem != NULL && gr2->gr_mem != NULL) { int i; - for (i = 0; gr1->gr_mem[i] != NULL; i++) { + for (i = 0; + gr1->gr_mem[i] != NULL && gr2->gr_mem[i] != NULL; i++) { if (strcmp(gr1->gr_mem[i], gr2->gr_mem[i]) != 0) return (false); } - } - /* Count number of members in both structs */ - gr2_ndx = 0; - if (gr2->gr_mem != NULL) - for(; gr2->gr_mem[gr2_ndx] != NULL; gr2_ndx++) - /* empty */; - gr1_ndx = 0; - if (gr1->gr_mem != NULL) - for(; gr1->gr_mem[gr1_ndx] != NULL; gr1_ndx++) - /* empty */; - if (gr1_ndx != gr2_ndx) + if (gr1->gr_mem[i] != NULL || gr2->gr_mem[i] != NULL) + return (false); + } else if (gr1->gr_mem != NULL && gr1->gr_mem[0] != NULL) { return (false); + } else if (gr2->gr_mem != NULL && gr2->gr_mem[0] != NULL) { + return (false); + } return (true); } From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 00:52:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 216A4B7B; Sun, 25 Jan 2015 00:52:40 +0000 (UTC) Received: from mail-pd0-x235.google.com (mail-pd0-x235.google.com [IPv6:2607:f8b0:400e:c02::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E2DB2A38; Sun, 25 Jan 2015 00:52:39 +0000 (UTC) Received: by mail-pd0-f181.google.com with SMTP id g10so4997782pdj.12; Sat, 24 Jan 2015 16:52:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=/4QIm5F6vOVM10TyAu9NzTLFjoP2jZrwMIW5I1lAr3s=; b=0/PsRJqWeRkuuikSrfGTNf4NswYQhjDAZlqBVhJiReGG8JvDz1hW+uf1wbDrjeSwAx bNizWLYtWyEIoIsZH7aisNwAdgyV5RwzsV1rElfTGXOfqNS5sg21csbLmzfoh7iABTeb oFzQZr0CQTxFu7LFy6VCviP+Q8sDm4FmYYragYKrBnpUfGBcSgTpRhWxYANm7xs4/0US Z44cmwGNudAK6GyLoX4UztoTTs/ScSYROwuTf1wcAqNcsJ9z0ZONxNx+9EJtG+QbPvff rej/D22n/XOwqJ49XHWFQfMo0sw2dOPRDaIJKhhzBxYX7RyJPWoEOTBCuidU/mw9RLNx 5X4Q== X-Received: by 10.70.90.226 with SMTP id bz2mr22841163pdb.157.1422147159354; Sat, 24 Jan 2015 16:52:39 -0800 (PST) Received: from charmander.picturesperfect.net (c-67-182-131-225.hsd1.wa.comcast.net. [67.182.131.225]) by mx.google.com with ESMTPSA id ob4sm5865792pdb.48.2015.01.24.16.52.37 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 24 Jan 2015 16:52:38 -0800 (PST) Sender: Mark Johnston Date: Sat, 24 Jan 2015 16:52:33 -0800 From: Mark Johnston To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r277667 - in head/lib/libproc: . tests Message-ID: <20150125005233.GA83813@charmander.picturesperfect.net> References: <201501250034.t0P0YiGE099093@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201501250034.t0P0YiGE099093@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 00:52:40 -0000 On Sun, Jan 25, 2015 at 12:34:44AM +0000, Mark Johnston wrote: > Author: markj > Date: Sun Jan 25 00:34:43 2015 > New Revision: 277667 > URL: https://svnweb.freebsd.org/changeset/base/277667 > > Log: > Ensure that we don't try to demangle a symbol name if we failed to look > up the symbol. Add a test to exercise this code path. > > Reviewed by: adrian Sorry, I meant that to be "Reported by:". From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 03:08:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B4F62420; Sun, 25 Jan 2015 03:08:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A1DA58A3; Sun, 25 Jan 2015 03:08:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0P38MMP072950; Sun, 25 Jan 2015 03:08:22 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0P38M7I072948; Sun, 25 Jan 2015 03:08:22 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501250308.t0P38M7I072948@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 25 Jan 2015 03:08:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277674 - head/sbin/rcorder X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 03:08:22 -0000 Author: ngie Date: Sun Jan 25 03:08:21 2015 New Revision: 277674 URL: https://svnweb.freebsd.org/changeset/base/277674 Log: Fix building rcorder with -DDEBUG by using libutil.h instead of util.h from usr.bin/make MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/sbin/rcorder/Makefile head/sbin/rcorder/rcorder.c Directory Properties: head/ (props changed) head/sbin/ (props changed) Modified: head/sbin/rcorder/Makefile ============================================================================== --- head/sbin/rcorder/Makefile Sun Jan 25 03:02:29 2015 (r277673) +++ head/sbin/rcorder/Makefile Sun Jan 25 03:08:21 2015 (r277674) @@ -7,13 +7,8 @@ MAN= rcorder.8 LIBADD= util -# XXX hack for make's hash.[ch] -CFLAGS+= -DORDER -I. +CFLAGS+= -DORDER -SRCS+= util.h -CLEANFILES+= util.h - -util.h: - ln -sf ${.CURDIR}/../../lib/libutil/libutil.h ${.TARGET} +#CFLAGS+= -DDEBUG .include Modified: head/sbin/rcorder/rcorder.c ============================================================================== --- head/sbin/rcorder/rcorder.c Sun Jan 25 03:02:29 2015 (r277673) +++ head/sbin/rcorder/rcorder.c Sun Jan 25 03:08:21 2015 (r277674) @@ -42,10 +42,10 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include -#include #include "ealloc.h" #include "sprite.h" From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 04:20:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 687C9881; Sun, 25 Jan 2015 04:20:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 42E73DC8; Sun, 25 Jan 2015 04:20:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0P4KFfb006292; Sun, 25 Jan 2015 04:20:15 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0P4KCKK006060; Sun, 25 Jan 2015 04:20:12 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501250420.t0P4KCKK006060@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 25 Jan 2015 04:20:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277675 - in head: etc/rc.d sbin share/man/man4 share/mk sys/conf sys/modules tools/build/mk tools/build/options usr.bin usr.sbin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 04:20:15 -0000 Author: ngie Date: Sun Jan 25 04:20:11 2015 New Revision: 277675 URL: https://svnweb.freebsd.org/changeset/base/277675 Log: Add MK_ISCSI knob for building the iscsi initiator, iscsi daemon, kernel modules, etc MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Added: head/tools/build/options/WITHOUT_ISCSI (contents, props changed) Modified: head/etc/rc.d/Makefile head/sbin/Makefile head/share/man/man4/Makefile head/share/mk/src.opts.mk head/sys/conf/kern.opts.mk head/sys/modules/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.bin/Makefile head/usr.sbin/Makefile Modified: head/etc/rc.d/Makefile ============================================================================== --- head/etc/rc.d/Makefile Sun Jan 25 03:08:21 2015 (r277674) +++ head/etc/rc.d/Makefile Sun Jan 25 04:20:11 2015 (r277675) @@ -66,8 +66,6 @@ FILES= DAEMON \ ipropd_master \ ipropd_slave \ ipsec \ - iscsictl \ - iscsid \ jail \ ${_kadmind} \ ${_kdc} \ @@ -174,6 +172,11 @@ _ubthidhci= ubthidhci _casperd= casperd .endif +.if ${MK_ISCSI} != "no" +FILES+= iscsictl +FILES+= iscsid +.endif + .if ${MK_NS_CACHING} != "no" _nscd= nscd .endif Modified: head/sbin/Makefile ============================================================================== --- head/sbin/Makefile Sun Jan 25 03:08:21 2015 (r277674) +++ head/sbin/Makefile Sun Jan 25 04:20:11 2015 (r277675) @@ -35,7 +35,6 @@ SUBDIR=adjkerntz \ hastd \ ifconfig \ init \ - iscontrol \ kldconfig \ kldload \ kldstat \ @@ -109,6 +108,10 @@ SUBDIR+= pflogd SUBDIR+= ping6 SUBDIR+= rtsol .endif + +.if ${MK_ISCSI} != "no" +SUBDIR+= iscontrol +.endif .if ${MK_QUOTAS} != "no" SUBDIR+= quotacheck Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Sun Jan 25 03:08:21 2015 (r277674) +++ head/share/man/man4/Makefile Sun Jan 25 04:20:11 2015 (r277675) @@ -206,8 +206,6 @@ MAN= aac.4 \ ipw.4 \ ipwfw.4 \ isci.4 \ - iscsi.4 \ - iscsi_initiator.4 \ ismt.4 \ isp.4 \ ispfw.4 \ @@ -860,6 +858,12 @@ _nvram2env.4= nvram2env.4 SUBDIR= man4.${MACHINE_CPUARCH} .endif +.if ${MK_ISCSI} != "no" +MAN+= iscsi.4 +MAN+= iscsi_initiator.4 + +.endif + .if ${MK_TESTS} != "no" ATF= ${.CURDIR}/../../../contrib/atf .PATH: ${ATF}/doc Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Sun Jan 25 03:08:21 2015 (r277674) +++ head/share/mk/src.opts.mk Sun Jan 25 04:20:11 2015 (r277675) @@ -97,6 +97,7 @@ __DEFAULT_YES_OPTIONS = \ INET6 \ IPFILTER \ IPFW \ + ISCSI \ JAIL \ KDUMP \ KVM \ Modified: head/sys/conf/kern.opts.mk ============================================================================== --- head/sys/conf/kern.opts.mk Sun Jan 25 03:08:21 2015 (r277674) +++ head/sys/conf/kern.opts.mk Sun Jan 25 04:20:11 2015 (r277675) @@ -30,6 +30,7 @@ __DEFAULT_YES_OPTIONS = \ INET \ INET6 \ IPFILTER \ + ISCSI \ KERNEL_SYMBOLS \ NETGRAPH \ PF \ Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Sun Jan 25 03:08:21 2015 (r277674) +++ head/sys/modules/Makefile Sun Jan 25 04:20:11 2015 (r277675) @@ -169,8 +169,6 @@ SUBDIR= \ ${_ipw} \ ${_ipwfw} \ ${_isci} \ - iscsi \ - iscsi_initiator \ isp \ ${_ispfw} \ ${_iwi} \ @@ -413,6 +411,11 @@ _ipfw= ipfw _ipfilter= ipfilter .endif +.if ${MK_ISCSI} != "no" || defined(ALL_MODULES) +SUBDIR+= iscsi +SUBDIR+= iscsi_initiator +.endif + .if ${MK_NAND} != "no" || defined(ALL_MODULES) _nandfs= nandfs _nandsim= nandsim Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Jan 25 03:08:21 2015 (r277674) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Jan 25 04:20:11 2015 (r277675) @@ -2094,6 +2094,20 @@ OLD_FILES+=usr/share/man/man8/ipfwpcap.8 OLD_FILES+=usr/share/man/man8/natd.8.gz .endif +.if ${MK_ISCSI} == no +OLD_FILES+=etc/rc.d/iscsictl +OLD_FILES+=etc/rc.d/iscsid +OLD_FILES+=sbin/iscontrol +OLD_FILES+=usr/bin/iscsictl +OLD_FILES+=usr/sbin/iscsid +OLD_FILES+=usr/share/man/man4/iscsi.4.gz +OLD_FILES+=usr/share/man/man4/iscsi_initiator.4.gz +OLD_FILES+=usr/share/man/man5/iscsi.conf.5.gz +OLD_FILES+=usr/share/man/man8/iscontrol.8.gz +OLD_FILES+=usr/share/man/man8/iscsictl.8.gz +OLD_FILES+=usr/share/man/man8/iscsid.8.gz +.endif + .if ${MK_JAIL} == no OLD_FILES+=usr/sbin/jail OLD_FILES+=usr/sbin/jexec Added: head/tools/build/options/WITHOUT_ISCSI ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_ISCSI Sun Jan 25 04:20:11 2015 (r277675) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to not build +.Xr iscid 8 +and related utilities. Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Sun Jan 25 03:08:21 2015 (r277674) +++ head/usr.bin/Makefile Sun Jan 25 04:20:11 2015 (r277675) @@ -69,7 +69,6 @@ SUBDIR= ${_addr2line} \ id \ ipcrm \ ipcs \ - iscsictl \ join \ jot \ ${_kdump} \ @@ -273,6 +272,10 @@ _mkcsmapper= mkcsmapper _mkesdb= mkesdb .endif +.if ${MK_ISCSI} != "no" +SUBDIR+= iscsictl +.endif + .if ${MK_KDUMP} != "no" SUBDIR+= kdump SUBDIR+= truss Modified: head/usr.sbin/Makefile ============================================================================== --- head/usr.sbin/Makefile Sun Jan 25 03:08:21 2015 (r277674) +++ head/usr.sbin/Makefile Sun Jan 25 04:20:11 2015 (r277675) @@ -38,7 +38,6 @@ SUBDIR= adduser \ ifmcstat \ inetd \ iostat \ - iscsid \ kldxref \ mailwrapper \ makefs \ @@ -178,6 +177,10 @@ SUBDIR+= traceroute6 SUBDIR+= ipfwpcap .endif +.if ${MK_ISCSI} != "no" +SUBDIR+= iscsid +.endif + .if ${MK_JAIL} != "no" SUBDIR+= jail SUBDIR+= jexec From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 04:37:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 30527C46; Sun, 25 Jan 2015 04:37:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11D5FF46; Sun, 25 Jan 2015 04:37:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0P4bjvw015155; Sun, 25 Jan 2015 04:37:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0P4bidD015148; Sun, 25 Jan 2015 04:37:44 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501250437.t0P4bidD015148@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 25 Jan 2015 04:37:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277676 - in head: libexec share/mk tools/build/mk tools/build/options usr.bin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 04:37:46 -0000 Author: ngie Date: Sun Jan 25 04:37:44 2015 New Revision: 277676 URL: https://svnweb.freebsd.org/changeset/base/277676 Log: Add MK_TALK knob for building the talk and talkd MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Added: head/tools/build/options/WITHOUT_TALK (contents, props changed) Modified: head/libexec/Makefile head/share/mk/src.opts.mk head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.bin/Makefile Modified: head/libexec/Makefile ============================================================================== --- head/libexec/Makefile Sun Jan 25 04:20:11 2015 (r277675) +++ head/libexec/Makefile Sun Jan 25 04:37:44 2015 (r277676) @@ -28,7 +28,6 @@ SUBDIR= ${_atf} \ ${_rtld-elf} \ save-entropy \ ${_smrsh} \ - talkd \ tcpd \ ${_telnetd} \ ${_tests} \ @@ -81,6 +80,10 @@ _mail.local= mail.local _smrsh= smrsh .endif +.if ${MK_TALK} != "no" +SUBDIR+= talkd +.endif + .if ${MK_TELNET} != "no" _telnetd= telnetd .endif Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Sun Jan 25 04:20:11 2015 (r277675) +++ head/share/mk/src.opts.mk Sun Jan 25 04:37:44 2015 (r277676) @@ -144,6 +144,7 @@ __DEFAULT_YES_OPTIONS = \ SYSCALL_COMPAT \ SYSCONS \ SYSINSTALL \ + TALK \ TCSH \ TELNET \ TESTS \ Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Jan 25 04:20:11 2015 (r277675) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Jan 25 04:37:44 2015 (r277676) @@ -4073,6 +4073,13 @@ OLD_DIRS+=usr/share/doc/pjdfstest # to be filled in #.endif +.if ${MK_TALK} == no +OLD_FILES+=usr/bin/talk +OLD_FILES+=usr/libexec/ntalkd +OLD_FILES+=usr/share/man/man1/talk.1.gz +OLD_FILES+=usr/share/man/man8/talkd.8.gz +.endif + .if ${MK_TCSH} == no OLD_FILES+=bin/csh OLD_FILES+=bin/tcsh Added: head/tools/build/options/WITHOUT_TALK ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_TALK Sun Jan 25 04:37:44 2015 (r277676) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to not build or install +.Xr talk 1 +and +.Xr talkd 8 . Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Sun Jan 25 04:20:11 2015 (r277675) +++ head/usr.bin/Makefile Sun Jan 25 04:37:44 2015 (r277676) @@ -162,7 +162,6 @@ SUBDIR= ${_addr2line} \ systat \ tabs \ tail \ - talk \ tar \ tcopy \ tee \ @@ -348,6 +347,10 @@ SUBDIR+= rwho SUBDIR+= vacation .endif +.if ${MK_TALK} != "no" +SUBDIR+= talk +.endif + .if ${MK_TELNET} != "no" SUBDIR+= telnet .endif From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 04:43:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 050A8D9B; Sun, 25 Jan 2015 04:43:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E4EA4FE8; Sun, 25 Jan 2015 04:43:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0P4hELY019398; Sun, 25 Jan 2015 04:43:14 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0P4hDZq019393; Sun, 25 Jan 2015 04:43:13 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501250443.t0P4hDZq019393@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 25 Jan 2015 04:43:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277677 - in head: share/mk tools/build/mk tools/build/options usr.sbin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 04:43:15 -0000 Author: ngie Date: Sun Jan 25 04:43:13 2015 New Revision: 277677 URL: https://svnweb.freebsd.org/changeset/base/277677 Log: Add MK_BSDINSTALL knob for building and installing bsdinstall MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Added: head/tools/build/options/WITHOUT_BSDINSTALL (contents, props changed) Modified: head/share/mk/src.opts.mk head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.sbin/Makefile Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Sun Jan 25 04:37:44 2015 (r277676) +++ head/share/mk/src.opts.mk Sun Jan 25 04:43:13 2015 (r277677) @@ -57,6 +57,7 @@ __DEFAULT_YES_OPTIONS = \ BLUETOOTH \ BOOT \ BSD_CPIO \ + BSDINSTALL \ BSNMP \ BZIP2 \ CALENDAR \ Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Jan 25 04:37:44 2015 (r277676) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Jan 25 04:43:13 2015 (r277677) @@ -274,6 +274,39 @@ OLD_FILES+=usr/share/man/man8/sdpd.8.gz # to be filled in #.endif +.if ${MK_BSDINSTALL} == no +OLD_FILES+=usr/libexec/bsdinstall/adduser +OLD_FILES+=usr/libexec/bsdinstall/auto +OLD_FILES+=usr/libexec/bsdinstall/autopart +OLD_FILES+=usr/libexec/bsdinstall/checksum +OLD_FILES+=usr/libexec/bsdinstall/config +OLD_FILES+=usr/libexec/bsdinstall/distextract +OLD_FILES+=usr/libexec/bsdinstall/distfetch +OLD_FILES+=usr/libexec/bsdinstall/docsinstall +OLD_FILES+=usr/libexec/bsdinstall/entropy +OLD_FILES+=usr/libexec/bsdinstall/hostname +OLD_FILES+=usr/libexec/bsdinstall/jail +OLD_FILES+=usr/libexec/bsdinstall/keymap +OLD_FILES+=usr/libexec/bsdinstall/mirrorselect +OLD_FILES+=usr/libexec/bsdinstall/mount +OLD_FILES+=usr/libexec/bsdinstall/netconfig +OLD_FILES+=usr/libexec/bsdinstall/netconfig_ipv4 +OLD_FILES+=usr/libexec/bsdinstall/netconfig_ipv6 +OLD_FILES+=usr/libexec/bsdinstall/partedit +OLD_FILES+=usr/libexec/bsdinstall/rootpass +OLD_FILES+=usr/libexec/bsdinstall/script +OLD_FILES+=usr/libexec/bsdinstall/scriptedpart +OLD_FILES+=usr/libexec/bsdinstall/services +OLD_FILES+=usr/libexec/bsdinstall/time +OLD_FILES+=usr/libexec/bsdinstall/umount +OLD_FILES+=usr/libexec/bsdinstall/wlanconfig +OLD_FILES+=usr/libexec/bsdinstall/zfsboot +OLD_FILES+=usr/sbin/bsdinstall +OLD_FILES+=usr/share/man/man8/bsdinstall.8.gz +OLD_FILES+=usr/share/man/man8/sade.8.gz +OLD_DIRS+=usr/libexec/bsdinstall +.endif + .if ${MK_CALENDAR} == no OLD_FILES+=etc/periodic/daily/300.calendar OLD_FILES+=usr/bin/calendar Added: head/tools/build/options/WITHOUT_BSDINSTALL ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_BSDINSTALL Sun Jan 25 04:43:13 2015 (r277677) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to not build +.Xr bsdinstall 8 , +.Xr sade 8 , +and related programs. Modified: head/usr.sbin/Makefile ============================================================================== --- head/usr.sbin/Makefile Sun Jan 25 04:37:44 2015 (r277676) +++ head/usr.sbin/Makefile Sun Jan 25 04:43:13 2015 (r277677) @@ -9,7 +9,6 @@ SUBDIR= adduser \ binmiscctl \ bootparamd \ bsdconfig \ - bsdinstall \ cdcontrol \ chkgrp \ chown \ @@ -129,6 +128,10 @@ SUBDIR+= authpf SUBDIR+= bluetooth .endif +.if ${MK_BSDINSTALL} != "no" +SUBDIR+= bsdinstall +.endif + .if ${MK_BSNMP} != "no" SUBDIR+= bsnmpd .endif From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 04:52:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3EB4D361; Sun, 25 Jan 2015 04:52:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 29A14163; Sun, 25 Jan 2015 04:52:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0P4qpbF024352; Sun, 25 Jan 2015 04:52:51 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0P4qncu024343; Sun, 25 Jan 2015 04:52:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501250452.t0P4qncu024343@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 25 Jan 2015 04:52:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277678 - in head: etc/rc.d sbin share/man/man4 share/mk sys/conf sys/modules/geom tools/build/mk tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 04:52:51 -0000 Author: ngie Date: Sun Jan 25 04:52:48 2015 New Revision: 277678 URL: https://svnweb.freebsd.org/changeset/base/277678 Log: Add MK_CCD knob for building and installing ccd(4), ccdconfig, etc MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Added: head/tools/build/options/WITHOUT_CCD (contents, props changed) Modified: head/etc/rc.d/Makefile head/sbin/Makefile head/share/man/man4/Makefile head/share/mk/src.opts.mk head/sys/conf/kern.opts.mk head/sys/modules/geom/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/etc/rc.d/Makefile ============================================================================== --- head/etc/rc.d/Makefile Sun Jan 25 04:43:13 2015 (r277677) +++ head/etc/rc.d/Makefile Sun Jan 25 04:52:48 2015 (r277678) @@ -30,7 +30,6 @@ FILES= DAEMON \ bsnmpd \ ${_bthidd} \ ${_casperd} \ - ccd \ cleanvar \ cleartmp \ cron \ @@ -172,6 +171,10 @@ _ubthidhci= ubthidhci _casperd= casperd .endif +.if ${MK_CCD} != "no" +FILES+= ccd +.endif + .if ${MK_ISCSI} != "no" FILES+= iscsictl FILES+= iscsid Modified: head/sbin/Makefile ============================================================================== --- head/sbin/Makefile Sun Jan 25 04:43:13 2015 (r277677) +++ head/sbin/Makefile Sun Jan 25 04:52:48 2015 (r277678) @@ -8,7 +8,6 @@ SUBDIR=adjkerntz \ badsect \ camcontrol \ - ccdconfig \ clri \ comcontrol \ conscontrol \ @@ -81,6 +80,10 @@ SUBDIR+= atm SUBDIR+= casperd .endif +.if ${MK_CCD} != "no" +SUBDIR+= ccdconfig +.endif + .if ${MK_CXX} != "no" SUBDIR+= devd .endif Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Sun Jan 25 04:43:13 2015 (r277677) +++ head/share/man/man4/Makefile Sun Jan 25 04:52:48 2015 (r277678) @@ -91,7 +91,7 @@ MAN= aac.4 \ cc_htcp.4 \ cc_newreno.4 \ cc_vegas.4 \ - ccd.4 \ + ${_ccd.4} \ cd.4 \ cdce.4 \ ch.4 \ @@ -858,6 +858,10 @@ _nvram2env.4= nvram2env.4 SUBDIR= man4.${MACHINE_CPUARCH} .endif +.if ${MK_CCD} != "no" +_ccd.4= ccd.4 +.endif + .if ${MK_ISCSI} != "no" MAN+= iscsi.4 MAN+= iscsi_initiator.4 Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Sun Jan 25 04:43:13 2015 (r277677) +++ head/share/mk/src.opts.mk Sun Jan 25 04:52:48 2015 (r277678) @@ -63,6 +63,7 @@ __DEFAULT_YES_OPTIONS = \ CALENDAR \ CAPSICUM \ CASPER \ + CCD \ CDDL \ CPP \ CROSS_COMPILER \ Modified: head/sys/conf/kern.opts.mk ============================================================================== --- head/sys/conf/kern.opts.mk Sun Jan 25 04:43:13 2015 (r277677) +++ head/sys/conf/kern.opts.mk Sun Jan 25 04:52:48 2015 (r277678) @@ -24,6 +24,7 @@ __DEFAULT_YES_OPTIONS = \ BLUETOOTH \ + CCD \ CDDL \ CRYPT \ FORMAT_EXTENSIONS \ Modified: head/sys/modules/geom/Makefile ============================================================================== --- head/sys/modules/geom/Makefile Sun Jan 25 04:43:13 2015 (r277677) +++ head/sys/modules/geom/Makefile Sun Jan 25 04:52:48 2015 (r277678) @@ -1,8 +1,10 @@ # $FreeBSD$ +SYSDIR?=${.CURDIR}/../.. +.include "${SYSDIR}/conf/kern.opts.mk" + SUBDIR= geom_bde \ geom_cache \ - geom_ccd \ geom_concat \ geom_eli \ geom_gate \ @@ -25,4 +27,8 @@ SUBDIR= geom_bde \ geom_virstor \ geom_zero +.if ${MK_CCD} != "no" || defined(ALL_MODULES) +SUBDIR+= geom_ccd +.endif + .include Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Jan 25 04:43:13 2015 (r277677) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Jan 25 04:52:48 2015 (r277678) @@ -398,6 +398,13 @@ OLD_FILES+=sbin/casper OLD_FILES+=usr/lib/libcasper.a .endif +.if ${MK_CCD} == no +OLD_FILES+=etc/rc.d/ccd +OLD_FILES+=sbin/ccdconfig +OLD_FILES+=usr/share/man/man4/ccd.4.gz +OLD_FILES+=usr/share/man/man8/ccdconfig.8.gz +.endif + .if ${MK_CDDL} == no OLD_LIBS+=lib/libavl.so.2 OLD_LIBS+=lib/libctf.so.2 Added: head/tools/build/options/WITHOUT_CCD ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_CCD Sun Jan 25 04:52:48 2015 (r277678) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to not build +.Xr geom_ccd 4 +and related utilities. From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 04:56:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A1A54C7; Sun, 25 Jan 2015 04:56:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25C9C17D; Sun, 25 Jan 2015 04:56:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0P4uisR024895; Sun, 25 Jan 2015 04:56:44 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0P4uid8024894; Sun, 25 Jan 2015 04:56:44 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501250456.t0P4uid8024894@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 25 Jan 2015 04:56:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277679 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 04:56:44 -0000 Author: ngie Date: Sun Jan 25 04:56:43 2015 New Revision: 277679 URL: https://svnweb.freebsd.org/changeset/base/277679 Log: Regen src.conf(5) Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Sun Jan 25 04:52:48 2015 (r277678) +++ head/share/man/man5/src.conf.5 Sun Jan 25 04:56:43 2015 (r277679) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 255964 2013-10-01 07:22:04Z des .\" $FreeBSD$ -.Dd January 7, 2015 +.Dd January 24, 2015 .Dt SRC.CONF 5 .Os .Sh NAME @@ -142,6 +142,12 @@ Set to not build Bluetooth related kerne .It Va WITHOUT_BOOT .\" from FreeBSD: head/tools/build/options/WITHOUT_BOOT 156932 2006-03-21 07:50:50Z ru Set to not build the boot blocks and loader. +.It Va WITHOUT_BSDINSTALL +.\" from FreeBSD: head/tools/build/options/WITHOUT_BSDINSTALL 277677 2015-01-25 04:43:13Z ngie +Set to not build +.Xr bsdinstall 8 , +.Xr sade 8 , +and related programs. .It Va WITHOUT_BSD_CPIO .\" from FreeBSD: head/tools/build/options/WITHOUT_BSD_CPIO 179813 2008-06-16 05:48:15Z dougb Set to not build the BSD licensed version of cpio based on @@ -179,6 +185,11 @@ Set to not build Capsicum support into s .It Va WITHOUT_CASPER .\" from FreeBSD: head/tools/build/options/WITHOUT_CASPER 258838 2013-12-02 08:21:28Z pjd Set to not build Casper program and related libraries. +.It Va WITHOUT_CCD +.\" from FreeBSD: head/tools/build/options/WITHOUT_CCD 277678 2015-01-25 04:52:48Z ngie +Set to not build +.Xr geom_ccd 4 +and related utilities. .It Va WITHOUT_CDDL .\" from FreeBSD: head/tools/build/options/WITHOUT_CDDL 163861 2006-11-01 09:02:11Z jb Set to not build code licensed under Sun's CDDL. @@ -218,13 +229,13 @@ unless an alternative compiler is provid XCC. .Pp It is a default setting on -arm/armeb, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32 and sparc64/sparc64. +arm/armeb, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITH_CLANG_BOOTSTRAP .\" from FreeBSD: head/tools/build/options/WITH_CLANG_BOOTSTRAP 264660 2014-04-18 17:03:58Z imp Set to build the Clang C/C++ compiler during the bootstrap phase of the build. .Pp It is a default setting on -amd64/amd64, arm/arm, arm/armv6, arm/armv6hf, i386/i386, pc98/i386, powerpc/powerpc and powerpc/powerpc64. +amd64/amd64, arm/arm, arm/armv6, arm/armv6hf, i386/i386 and pc98/i386. .It Va WITH_CLANG_EXTRAS .\" from FreeBSD: head/tools/build/options/WITH_CLANG_EXTRAS 231057 2012-02-05 23:56:22Z dim Set to build additional clang and llvm tools, such as bugpoint. @@ -380,6 +391,12 @@ dynamically. Set to build .Xr ed 1 without support for encryption/decryption. +.It Va WITHOUT_EE +.\" from FreeBSD: head/tools/build/options/WITHOUT_EE 277663 2015-01-25 00:03:44Z ngie +Set to not build and install +.Xr edit 1 , +.Xr ee 1 , +and related programs. .It Va WITH_EISA .\" from FreeBSD: head/tools/build/options/WITH_EISA 264654 2014-04-18 16:53:06Z imp Set to build EISA kernel modules. @@ -593,6 +610,11 @@ Set to not build IP Filter package. .It Va WITHOUT_IPFW .\" from FreeBSD: head/tools/build/options/WITHOUT_IPFW 183242 2008-09-21 22:02:26Z sam Set to not build IPFW tools. +.It Va WITHOUT_ISCSI +.\" from FreeBSD: head/tools/build/options/WITHOUT_ISCSI 277675 2015-01-25 04:20:11Z ngie +Set to not build +.Xr iscid 8 +and related utilities. .It Va WITHOUT_JAIL .\" from FreeBSD: head/tools/build/options/WITHOUT_JAIL 249966 2013-04-27 04:09:09Z eadler Set to not build tools for the support of jails; e.g., @@ -1035,6 +1057,12 @@ support files such as keyboard maps, fon Set to not build .Xr sysinstall 8 and related programs. +.It Va WITHOUT_TALK +.\" from FreeBSD: head/tools/build/options/WITHOUT_TALK 277676 2015-01-25 04:37:44Z ngie +Set to not build or install +.Xr talk 1 +and +.Xr talkd 8 . .It Va WITHOUT_TCSH .\" from FreeBSD: head/tools/build/options/WITHOUT_TCSH 156932 2006-03-21 07:50:50Z ru Set to not build and install From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 04:58:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BD2CD612; Sun, 25 Jan 2015 04:58:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F4F418D; Sun, 25 Jan 2015 04:58:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0P4wgpZ025166; Sun, 25 Jan 2015 04:58:42 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0P4wgH3025164; Sun, 25 Jan 2015 04:58:42 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501250458.t0P4wgH3025164@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 25 Jan 2015 04:58:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277680 - in head: . share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 04:58:42 -0000 Author: imp Date: Sun Jan 25 04:58:41 2015 New Revision: 277680 URL: https://svnweb.freebsd.org/changeset/base/277680 Log: spl man page hasn't been relevant for a while, retire it. Deleted: head/share/man/man9/spl.9 Modified: head/ObsoleteFiles.inc head/share/man/man9/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Jan 25 04:56:43 2015 (r277679) +++ head/ObsoleteFiles.inc Sun Jan 25 04:58:41 2015 (r277680) @@ -38,6 +38,20 @@ # xargs -n1 | sort | uniq -d; # done +# 20150124: spl.9 and friends +OLD_FILES+=usr/share/man/man9/spl.9 +OLD_FILES+=usr/share/man/man9/spl0.9 +OLD_FILES+=usr/share/man/man9/splbio.9 +OLD_FILES+=usr/share/man/man9/splclock.9 +OLD_FILES+=usr/share/man/man9/splhigh.9 +OLD_FILES+=usr/share/man/man9/splimp.9 +OLD_FILES+=usr/share/man/man9/splnet.9 +OLD_FILES+=usr/share/man/man9/splsoftclock.9 +OLD_FILES+=usr/share/man/man9/splsofttty.9 +OLD_FILES+=usr/share/man/man9/splstatclock.9 +OLD_FILES+=usr/share/man/man9/spltty.9 +OLD_FILES+=usr/share/man/man9/splvm.9 +OLD_FILES+=usr/share/man/man9/splx.9 # 20150118: new clang import which bumps version from 3.5.0 to 3.5.1. OLD_FILES+=usr/include/clang/3.5.0/__wmmintrin_aes.h OLD_FILES+=usr/include/clang/3.5.0/__wmmintrin_pclmul.h Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Sun Jan 25 04:56:43 2015 (r277679) +++ head/share/man/man9/Makefile Sun Jan 25 04:58:41 2015 (r277680) @@ -252,7 +252,6 @@ MAN= accept_filter.9 \ sleep.9 \ sleepqueue.9 \ socket.9 \ - spl.9 \ stack.9 \ store.9 \ style.9 \ @@ -1447,18 +1446,6 @@ MLINKS+=socket.9 soabort.9 \ socket.9 soupcall_clear.9 \ socket.9 soupcall_set.9 \ socket.9 sowakeup.9 -MLINKS+=spl.9 spl0.9 \ - spl.9 splbio.9 \ - spl.9 splclock.9 \ - spl.9 splhigh.9 \ - spl.9 splimp.9 \ - spl.9 splnet.9 \ - spl.9 splsoftclock.9 \ - spl.9 splsofttty.9 \ - spl.9 splstatclock.9 \ - spl.9 spltty.9 \ - spl.9 splvm.9 \ - spl.9 splx.9 MLINKS+=stack.9 stack_copy.9 \ stack.9 stack_create.9 \ stack.9 stack_destroy.9 \ From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 05:13:16 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9BDFA7DB; Sun, 25 Jan 2015 05:13:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87EDB31C; Sun, 25 Jan 2015 05:13:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0P5DGkX033958; Sun, 25 Jan 2015 05:13:16 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0P5DGoc033955; Sun, 25 Jan 2015 05:13:16 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501250513.t0P5DGoc033955@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 25 Jan 2015 05:13:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277681 - in head/sys: conf modules X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 05:13:16 -0000 Author: ngie Date: Sun Jan 25 05:13:15 2015 New Revision: 277681 URL: https://svnweb.freebsd.org/changeset/base/277681 Log: Build cuse(4) if MK_CUSE != no MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/sys/conf/kern.opts.mk head/sys/modules/Makefile Modified: head/sys/conf/kern.opts.mk ============================================================================== --- head/sys/conf/kern.opts.mk Sun Jan 25 04:58:41 2015 (r277680) +++ head/sys/conf/kern.opts.mk Sun Jan 25 05:13:15 2015 (r277681) @@ -27,6 +27,7 @@ __DEFAULT_YES_OPTIONS = \ CCD \ CDDL \ CRYPT \ + CUSE \ FORMAT_EXTENSIONS \ INET \ INET6 \ Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Sun Jan 25 04:58:41 2015 (r277680) +++ head/sys/modules/Makefile Sun Jan 25 05:13:15 2015 (r277681) @@ -86,7 +86,6 @@ SUBDIR= \ ${_ct} \ ${_ctau} \ ctl \ - cuse \ ${_cxgb} \ ${_cxgbe} \ dc \ @@ -393,6 +392,10 @@ _random= random .endif .endif +.if ${MK_CUSE} != "no" || defined(ALL_MODULES) +SUBDIR+= cuse +.endif + .if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \ defined(ALL_MODULES) _carp= carp From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 05:15:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F2A996B; Sun, 25 Jan 2015 05:15:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BC4932D; Sun, 25 Jan 2015 05:15:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0P5F7Wn034280; Sun, 25 Jan 2015 05:15:07 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0P5F7Os034279; Sun, 25 Jan 2015 05:15:07 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501250515.t0P5F7Os034279@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 25 Jan 2015 05:15:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277682 - head/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 05:15:07 -0000 Author: ngie Date: Sun Jan 25 05:15:06 2015 New Revision: 277682 URL: https://svnweb.freebsd.org/changeset/base/277682 Log: Make install cuse headers if MK_CUSE != no MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/include/Makefile Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Sun Jan 25 05:13:15 2015 (r277681) +++ head/include/Makefile Sun Jan 25 05:15:06 2015 (r277682) @@ -45,7 +45,6 @@ LSUBDIRS= cam/ata cam/scsi \ dev/ic dev/iicbus dev/io dev/lmc dev/mfi dev/nvme \ dev/ofw dev/pbio dev/pci ${_dev_powermac_nvram} dev/ppbus dev/smbus \ dev/speaker dev/usb dev/utopia dev/vkbd dev/wi \ - fs/cuse \ fs/devfs fs/fdescfs fs/msdosfs fs/nandfs fs/nfs fs/nullfs \ fs/procfs fs/smbfs fs/udf fs/unionfs \ geom/cache geom/concat geom/eli geom/gate geom/journal geom/label \ @@ -59,6 +58,10 @@ LSUBDIRS= cam/ata cam/scsi \ LSUBSUBDIRS= dev/mpt/mpilib +.if ${MK_CUSE} != "no" +LSUBDIRS+= fs/cuse +.endif + .if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" _dev_powermac_nvram= dev/powermac_nvram .endif From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 05:15:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 30012AAB; Sun, 25 Jan 2015 05:15:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 030DE335; Sun, 25 Jan 2015 05:15:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0P5FjKW034387; Sun, 25 Jan 2015 05:15:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0P5FjrP034386; Sun, 25 Jan 2015 05:15:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501250515.t0P5FjrP034386@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 25 Jan 2015 05:15:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277683 - head/tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 05:15:46 -0000 Author: ngie Date: Sun Jan 25 05:15:45 2015 New Revision: 277683 URL: https://svnweb.freebsd.org/changeset/base/277683 Log: Fill in entries for MK_CUSE == no MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Jan 25 05:15:06 2015 (r277682) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Jan 25 05:15:45 2015 (r277683) @@ -649,6 +649,43 @@ OLD_FILES+=usr/share/man/man1/ctm_smail. OLD_FILES+=usr/share/man/man5/ctm.5.gz .endif +.if ${MK_CUSE} == no +OLD_FILES+=usr/include/fs/cuse/cuse_defs.h +OLD_FILES+=usr/include/fs/cuse/cuse_ioctl.h +OLD_FILES+=usr/include/cuse.h +OLD_FILES+=usr/lib/libcuse.a +OLD_LIBS+=usr/lib/libcuse.so.1 +OLD_FILES+=usr/lib/libcuse_p.a +OLD_FILES+=usr/share/man/man3/cuse.3.gz +OLD_FILES+=usr/share/man/man3/cuse_alloc_unit_number.3.gz +OLD_FILES+=usr/share/man/man3/cuse_alloc_unit_number_by_id.3.gz +OLD_FILES+=usr/share/man/man3/cuse_copy_in.3.gz +OLD_FILES+=usr/share/man/man3/cuse_copy_out.3.gz +OLD_FILES+=usr/share/man/man3/cuse_dev_create.3.gz +OLD_FILES+=usr/share/man/man3/cuse_dev_destroy.3.gz +OLD_FILES+=usr/share/man/man3/cuse_dev_get_current.3.gz +OLD_FILES+=usr/share/man/man3/cuse_dev_get_per_file_handle.3.gz +OLD_FILES+=usr/share/man/man3/cuse_dev_get_priv0.3.gz +OLD_FILES+=usr/share/man/man3/cuse_dev_get_priv1.3.gz +OLD_FILES+=usr/share/man/man3/cuse_dev_set_per_file_handle.3.gz +OLD_FILES+=usr/share/man/man3/cuse_dev_set_priv0.3.gz +OLD_FILES+=usr/share/man/man3/cuse_dev_set_priv1.3.gz +OLD_FILES+=usr/share/man/man3/cuse_free_unit_number.3.gz +OLD_FILES+=usr/share/man/man3/cuse_free_unit_number_by_id.3.gz +OLD_FILES+=usr/share/man/man3/cuse_get_local.3.gz +OLD_FILES+=usr/share/man/man3/cuse_got_peer_signal.3.gz +OLD_FILES+=usr/share/man/man3/cuse_init.3.gz +OLD_FILES+=usr/share/man/man3/cuse_is_vmalloc_addr.3.gz +OLD_FILES+=usr/share/man/man3/cuse_poll_wakeup.3.gz +OLD_FILES+=usr/share/man/man3/cuse_set_local.3.gz +OLD_FILES+=usr/share/man/man3/cuse_uninit.3.gz +OLD_FILES+=usr/share/man/man3/cuse_vmalloc.3.gz +OLD_FILES+=usr/share/man/man3/cuse_vmfree.3.gz +OLD_FILES+=usr/share/man/man3/cuse_vmoffset.3.gz +OLD_FILES+=usr/share/man/man3/cuse_wait_and_process.3.gz +OLD_DIRS+=usr/include/fs/cuse +.endif + # devd(8) not listed here on purpose .if ${MK_CXX} == no OLD_FILES+=usr/bin/CC From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 05:18:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A400C01; Sun, 25 Jan 2015 05:18:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5B51A348; Sun, 25 Jan 2015 05:18:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0P5I4KV034728; Sun, 25 Jan 2015 05:18:04 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0P5I490034727; Sun, 25 Jan 2015 05:18:04 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501250518.t0P5I490034727@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 25 Jan 2015 05:18: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: r277684 - stable/10/tools/regression/file/flock X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 05:18:04 -0000 Author: ngie Date: Sun Jan 25 05:18:03 2015 New Revision: 277684 URL: https://svnweb.freebsd.org/changeset/base/277684 Log: MFC r277527: r277527 (by ngie): Make this compile with WARNS=6 and clang/gcc Sponsored by: EMC / Isilon Storage Division Modified: stable/10/tools/regression/file/flock/flock.c Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/regression/file/flock/flock.c ============================================================================== --- stable/10/tools/regression/file/flock/flock.c Sun Jan 25 05:15:45 2015 (r277683) +++ stable/10/tools/regression/file/flock/flock.c Sun Jan 25 05:18:03 2015 (r277684) @@ -27,6 +27,7 @@ * $FreeBSD$ */ +#include #include #include #ifdef __FreeBSD__ @@ -52,6 +53,10 @@ #endif #include #else +#ifndef nitems +#define nitems(x) (sizeof((x)) / sizeof((x)[0])) +#endif + #ifndef __unused #ifdef __GNUC__ #define __unused __attribute__((__unused__)) @@ -61,7 +66,7 @@ #endif #endif -int verbose = 0; +static int verbose = 0; static int make_file(const char *pathname, off_t sz) @@ -1519,7 +1524,7 @@ struct test { int intr; /* non-zero if the test interrupts a lock */ }; -struct test tests[] = { +static struct test tests[] = { { test1, 1, 0 }, { test2, 2, 0 }, { test3, 3, 1 }, @@ -1537,7 +1542,6 @@ struct test tests[] = { { test15, 15, 1 }, { test16, 16, 1 }, }; -int test_count = sizeof(tests) / sizeof(tests[0]); int main(int argc, const char *argv[]) @@ -1545,7 +1549,7 @@ main(int argc, const char *argv[]) int testnum; int fd; int nointr; - int i; + unsigned i; struct sigaction sa; int test_argc; const char **test_argv; @@ -1583,7 +1587,7 @@ main(int argc, const char *argv[]) } #endif - for (i = 0; i < test_count; i++) { + for (i = 0; i < nitems(tests); i++) { if (tests[i].intr && nointr) continue; if (!testnum || tests[i].num == testnum) From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 05:23:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A3F3CD52; Sun, 25 Jan 2015 05:23:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75E383FE; Sun, 25 Jan 2015 05:23:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0P5NNgo038868; Sun, 25 Jan 2015 05:23:23 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0P5NNFF038867; Sun, 25 Jan 2015 05:23:23 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501250523.t0P5NNFF038867@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 25 Jan 2015 05:23:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277685 - head/tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 05:23:23 -0000 Author: ngie Date: Sun Jan 25 05:23:22 2015 New Revision: 277685 URL: https://svnweb.freebsd.org/changeset/base/277685 Log: Fill in some dtrace entries when MK_CDDL == no MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Jan 25 05:18:03 2015 (r277684) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Jan 25 05:23:22 2015 (r277685) @@ -428,7 +428,6 @@ OLD_FILES+=usr/lib/dtrace/signal.d OLD_FILES+=usr/lib/dtrace/tcp.d OLD_FILES+=usr/lib/dtrace/udp.d OLD_FILES+=usr/lib/dtrace/unistd.d -OLD_DIRS+=usr/lib/dtrace OLD_FILES+=usr/lib/libavl.a OLD_FILES+=usr/lib/libavl.so OLD_FILES+=usr/lib/libavl_p.a @@ -449,7 +448,6 @@ OLD_FILES+=usr/lib/libuutil.so OLD_FILES+=usr/lib/libuutil_p.a .if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" OLD_FILES+=usr/lib32/dtrace/drti.o -OLD_DIRS+=usr/lib32/dtrace OLD_FILES+=usr/lib32/libavl.a OLD_FILES+=usr/lib32/libavl.so OLD_LIBS+=usr/lib32/libavl.so.2 @@ -475,9 +473,24 @@ OLD_FILES+=usr/lib32/libuutil.so OLD_LIBS+=usr/lib32/libuutil.so.2 OLD_FILES+=usr/lib32/libuutil_p.a .endif +OLD_LIBS+=lib/libdtrace.so.2 OLD_FILES+=usr/sbin/dtrace OLD_FILES+=usr/sbin/lockstat OLD_FILES+=usr/share/man/man1/dtrace.1.gz +OLD_FILES+=usr/share/dtrace/disklatency +OLD_FILES+=usr/share/dtrace/disklatencycmd +OLD_FILES+=usr/share/dtrace/hotopen +OLD_FILES+=usr/share/dtrace/nfsclienttime +OLD_FILES+=usr/share/dtrace/toolkit/execsnoop +OLD_FILES+=usr/share/dtrace/toolkit/hotkernel +OLD_FILES+=usr/share/dtrace/toolkit/hotuser +OLD_FILES+=usr/share/dtrace/toolkit/opensnoop +OLD_FILES+=usr/share/dtrace/toolkit/procsystime +OLD_FILES+=usr/share/man/man1/dtrace.1.gz +OLD_DIRS+=usr/lib/dtrace +OLD_DIRS+=usr/lib32/dtrace +OLD_DIRS+=usr/share/dtrace/toolkit +OLD_DIRS+=usr/share/dtrace .endif .if ${MK_ZFS} == no From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 05:30:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F7D2B5; Sun, 25 Jan 2015 05:30:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8BBD4607; Sun, 25 Jan 2015 05:30:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0P5U4Q9039923; Sun, 25 Jan 2015 05:30:04 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0P5U467039918; Sun, 25 Jan 2015 05:30:04 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501250530.t0P5U467039918@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 25 Jan 2015 05:30:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277686 - head/etc/rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 05:30:04 -0000 Author: ngie Date: Sun Jan 25 05:30:03 2015 New Revision: 277686 URL: https://svnweb.freebsd.org/changeset/base/277686 Log: Install bsnmp rc.d script if MK_BSNMP != no MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/etc/rc.d/Makefile Modified: head/etc/rc.d/Makefile ============================================================================== --- head/etc/rc.d/Makefile Sun Jan 25 05:23:22 2015 (r277685) +++ head/etc/rc.d/Makefile Sun Jan 25 05:30:03 2015 (r277686) @@ -27,7 +27,6 @@ FILES= DAEMON \ ${_bluetooth} \ bootparams \ bridge \ - bsnmpd \ ${_bthidd} \ ${_casperd} \ cleanvar \ @@ -167,6 +166,10 @@ _hcsecd= hcsecd _ubthidhci= ubthidhci .endif +.if ${MK_BSNMP} != "no" +FILES+= bsnmpd +.endif + .if ${MK_CASPER} != "no" _casperd= casperd .endif From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 05:30:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0A3CB1F2; Sun, 25 Jan 2015 05:30:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E9D1169E; Sun, 25 Jan 2015 05:30:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0P5UjEv042363; Sun, 25 Jan 2015 05:30:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0P5Uj5Z042362; Sun, 25 Jan 2015 05:30:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501250530.t0P5Uj5Z042362@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 25 Jan 2015 05:30:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277687 - head/tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 05:30:46 -0000 Author: ngie Date: Sun Jan 25 05:30:45 2015 New Revision: 277687 URL: https://svnweb.freebsd.org/changeset/base/277687 Log: Fill in entries for MK_BSNMP == no MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Jan 25 05:30:03 2015 (r277686) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Jan 25 05:30:45 2015 (r277687) @@ -307,6 +307,99 @@ OLD_FILES+=usr/share/man/man8/sade.8.gz OLD_DIRS+=usr/libexec/bsdinstall .endif +.if ${MK_BSNMP} == no +OLD_FILES+=etc/snmpd.config +OLD_FILES+=etc/rc.d/bsnmpd +OLD_FILES+=usr/bin/bsnmpget +OLD_FILES+=usr/bin/bsnmpset +OLD_FILES+=usr/bin/bsnmpwalk +OLD_FILES+=usr/include/bsnmp/asn1.h +OLD_FILES+=usr/include/bsnmp/bridge_snmp.h +OLD_FILES+=usr/include/bsnmp/snmp.h +OLD_FILES+=usr/include/bsnmp/snmp_atm.h +OLD_FILES+=usr/include/bsnmp/snmp_mibII.h +OLD_FILES+=usr/include/bsnmp/snmp_netgraph.h +OLD_FILES+=usr/include/bsnmp/snmpagent.h +OLD_FILES+=usr/include/bsnmp/snmpclient.h +OLD_FILES+=usr/include/bsnmp/snmpmod.h +OLD_FILES+=usr/lib/libbsnmp.a +OLD_LIBS+=usr/lib/libbsnmp.so.6 +OLD_FILES+=usr/lib/libbsnmp_p.a +OLD_FILES+=usr/lib/libbsnmptools.a +OLD_LIBS+=usr/lib/libbsnmptools.so.0 +OLD_FILES+=usr/lib/libbsnmptools_p.a +OLD_LIBS+=usr/lib/snmp_atm.so.6 +OLD_LIBS+=usr/lib/snmp_bridge.so.6 +OLD_LIBS+=usr/lib/snmp_hast.so.6 +OLD_LIBS+=usr/lib/snmp_hostres.so.6 +OLD_LIBS+=usr/lib/snmp_lm75.so.6 +OLD_LIBS+=usr/lib/snmp_mibII.so.6 +OLD_LIBS+=usr/lib/snmp_netgraph.so.6 +OLD_LIBS+=usr/lib/snmp_pf.so.6 +OLD_LIBS+=usr/lib/snmp_target.so.6 +OLD_LIBS+=usr/lib/snmp_usm.so.6 +OLD_LIBS+=usr/lib/snmp_vacm.so.6 +OLD_LIBS+=usr/lib/snmp_wlan.so.6 +OLD_FILES+=usr/sbin/bsnmpd +OLD_FILES+=usr/sbin/gensnmptree +OLD_FILES+=usr/share/man/man1/bsnmpd.1.gz +OLD_FILES+=usr/share/man/man1/bsnmpget.1.gz +OLD_FILES+=usr/share/man/man1/bsnmpset.1.gz +OLD_FILES+=usr/share/man/man1/bsnmpwalk.1.gz +OLD_FILES+=usr/share/man/man1/gensnmptree.1.gz +OLD_FILES+=usr/share/man/man3/asn1.3.gz +OLD_FILES+=usr/share/man/man3/bsnmpagent.3.gz +OLD_FILES+=usr/share/man/man3/bsnmpclient.3.gz +OLD_FILES+=usr/share/man/man3/bsnmplib.3.gz +OLD_FILES+=usr/share/man/man3/snmp_atm.3.gz +OLD_FILES+=usr/share/man/man3/snmp_bridge.3.gz +OLD_FILES+=usr/share/man/man3/snmp_hast.3.gz +OLD_FILES+=usr/share/man/man3/snmp_hostres.3.gz +OLD_FILES+=usr/share/man/man3/snmp_lm75.3.gz +OLD_FILES+=usr/share/man/man3/snmp_mibII.3.gz +OLD_FILES+=usr/share/man/man3/snmp_netgraph.3.gz +OLD_FILES+=usr/share/man/man3/snmp_target.3.gz +OLD_FILES+=usr/share/man/man3/snmp_usm.3.gz +OLD_FILES+=usr/share/man/man3/snmp_vacm.3.gz +OLD_FILES+=usr/share/man/man3/snmp_wlan.3.gz +OLD_FILES+=usr/share/man/man3/snmpmod.3.gz +OLD_FILES+=usr/share/snmp/defs/atm_freebsd.def +OLD_FILES+=usr/share/snmp/defs/atm_tree.def +OLD_FILES+=usr/share/snmp/defs/bridge_tree.def +OLD_FILES+=usr/share/snmp/defs/hast_tree.def +OLD_FILES+=usr/share/snmp/defs/hostres_tree.def +OLD_FILES+=usr/share/snmp/defs/lm75_tree.def +OLD_FILES+=usr/share/snmp/defs/mibII_tree.def +OLD_FILES+=usr/share/snmp/defs/netgraph_tree.def +OLD_FILES+=usr/share/snmp/defs/pf_tree.def +OLD_FILES+=usr/share/snmp/defs/target_tree.def +OLD_FILES+=usr/share/snmp/defs/tree.def +OLD_FILES+=usr/share/snmp/defs/usm_tree.def +OLD_FILES+=usr/share/snmp/defs/vacm_tree.def +OLD_FILES+=usr/share/snmp/defs/wlan_tree.def +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-ATM-FREEBSD-MIB.txt +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-ATM.txt +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-BRIDGE-MIB.txt +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-HAST-MIB.txt +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-HOSTRES-MIB.txt +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-IP-MIB.txt +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-LM75-MIB.txt +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-MIB.txt +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-MIB2-MIB.txt +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-NETGRAPH.txt +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-PF-MIB.txt +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-SNMPD.txt +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-WIRELESS-MIB.txt +OLD_FILES+=usr/share/snmp/mibs/BRIDGE-MIB.txt +OLD_FILES+=usr/share/snmp/mibs/FOKUS-MIB.txt +OLD_FILES+=usr/share/snmp/mibs/FREEBSD-MIB.txt +OLD_FILES+=usr/share/snmp/mibs/RSTP-MIB.txt +OLD_DIRS+=usr/include/bsnmp +OLD_DIRS+=usr/share/snmp +OLD_DIRS+=usr/share/snmp/defs +OLD_DIRS+=usr/share/snmp/mibs +.endif + .if ${MK_CALENDAR} == no OLD_FILES+=etc/periodic/daily/300.calendar OLD_FILES+=usr/bin/calendar From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 05:37:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC76835C; Sun, 25 Jan 2015 05:37:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE5E76C2; Sun, 25 Jan 2015 05:37:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0P5b79v044266; Sun, 25 Jan 2015 05:37:07 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0P5b7xS044263; Sun, 25 Jan 2015 05:37:07 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501250537.t0P5b7xS044263@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 25 Jan 2015 05:37:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277688 - in head: lib tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 05:37:08 -0000 Author: ngie Date: Sun Jan 25 05:37:06 2015 New Revision: 277688 URL: https://svnweb.freebsd.org/changeset/base/277688 Log: Build lib/libgpio if MK_GPIO != no Fill in corresponding entries for MK_GPIO == no in OptionalObsoleteFiles.inc MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/lib/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Sun Jan 25 05:30:45 2015 (r277687) +++ head/lib/Makefile Sun Jan 25 05:37:06 2015 (r277688) @@ -53,7 +53,7 @@ SUBDIR= ${SUBDIR_ORDERED} \ libfetch \ libfigpar \ libgeom \ - libgpio \ + ${_libgpio} \ ${_libgssapi} \ ${_librpcsec_gss} \ ${_libiconv_modules} \ @@ -195,6 +195,10 @@ _cuse= libcuse _libelftc= libelftc .endif +.if ${MK_GPIO} != "no" +_libgpio= libgpio +.endif + .if ${MK_GSSAPI} != "no" _libgssapi= libgssapi _librpcsec_gss= librpcsec_gss Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Jan 25 05:30:45 2015 (r277687) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Jan 25 05:37:06 2015 (r277688) @@ -1550,7 +1550,32 @@ OLD_FILES+=usr/share/man/man1/kgdb.1.gz .endif .if ${MK_GPIO} == no +OLD_FILES+=usr/include/libgpio.h +OLD_FILES+=usr/lib/libgpio.a +OLD_LIBS+=usr/lib/libgpio.so.0 +OLD_FILES+=usr/lib/libgpio_p.a OLD_FILES+=usr/sbin/gpioctl +OLD_FILES+=usr/share/man/man3/gpio.3.gz +OLD_FILES+=usr/share/man/man3/gpio_close.3.gz +OLD_FILES+=usr/share/man/man3/gpio_open.3.gz +OLD_FILES+=usr/share/man/man3/gpio_open_device.3.gz +OLD_FILES+=usr/share/man/man3/gpio_pin_config.3.gz +OLD_FILES+=usr/share/man/man3/gpio_pin_get.3.gz +OLD_FILES+=usr/share/man/man3/gpio_pin_high.3.gz +OLD_FILES+=usr/share/man/man3/gpio_pin_input.3.gz +OLD_FILES+=usr/share/man/man3/gpio_pin_invin.3.gz +OLD_FILES+=usr/share/man/man3/gpio_pin_invout.3.gz +OLD_FILES+=usr/share/man/man3/gpio_pin_list.3.gz +OLD_FILES+=usr/share/man/man3/gpio_pin_low.3.gz +OLD_FILES+=usr/share/man/man3/gpio_pin_opendrain.3.gz +OLD_FILES+=usr/share/man/man3/gpio_pin_output.3.gz +OLD_FILES+=usr/share/man/man3/gpio_pin_pulldown.3.gz +OLD_FILES+=usr/share/man/man3/gpio_pin_pullup.3.gz +OLD_FILES+=usr/share/man/man3/gpio_pin_pulsate.3.gz +OLD_FILES+=usr/share/man/man3/gpio_pin_pushpull.3.gz +OLD_FILES+=usr/share/man/man3/gpio_pin_set.3.gz +OLD_FILES+=usr/share/man/man3/gpio_pin_set_flags.3.gz +OLD_FILES+=usr/share/man/man3/gpio_pin_tristate.3.gz OLD_FILES+=usr/share/man/man8/gpioctl.8.gz .endif From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 06:27:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 79B6B960; Sun, 25 Jan 2015 06:27:09 +0000 (UTC) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id AD1F6AB5; Sun, 25 Jan 2015 06:27:08 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 5870A421169; Sun, 25 Jan 2015 16:56:24 +1100 (AEDT) Date: Sun, 25 Jan 2015 16:56:24 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Baptiste Daroussin Subject: Re: svn commit: r277652 - in head/usr.sbin/pw: . tests In-Reply-To: <201501241913.t0OJD4xT039188@svn.freebsd.org> Message-ID: <20150125155254.V1007@besplex.bde.org> References: <201501241913.t0OJD4xT039188@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=C77Ql2/+ c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=EOTcxNXfcKjkqDqahxQA:9 a=vbQ0e8RRUhKMb0JH:21 a=i6RSqKgKGUAP7PEn:21 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 06:27:09 -0000 On Sat, 24 Jan 2015, Baptiste Daroussin wrote: > Log: > Allow negative numbers in -u and -g options This is backwards. ids and gids are non-negative integers that can be represented in the type uid_t and gid_t, respectively. All versions of POSIX require this. Old versions of POSIX allowed uid_t and gid_t to be floating point, but didn't allow negative, fractional, infinity or NaN values. Not so old versions of POSIX require uid_t and gid_t to be integer types, but still allow them to be sign. Negative and values must not be created. Unrepresentable values cannot be created of course, and should be rejected before they damage the password database. uid_t and gid_t happened to be unsigned in FreeBSD, so negative values are unrepresentable so cannot be created. pw is responsible for creating ids, so it should reject negative and other unrepresentable ids. It has garbage code for both. Negative ids have historical abuses in places like mountd. mountd still hard-codes -2 and -2 for the default uid and gid of an unprivileged user. It at least casts these values to uid_t and gid_t before using them. This gives the ids the non-random values of UINT32_MAX-1 if uid_t and gid_t are uint32_t. (If uid_t and gid_t were signed, then it would leave the values as negative, so invalid.) These magic values may work better than when ids were 16 bits, since there is less risk of them conflicting with a normal id. However, the non-conflict is probably a bug. FreeBSD uses the magic ids of 65534 for user nobody: group nobody. These would have been (id_t)-2 with 16-bit ids. They no longer match, so ls displays (id_t)-2 numerically. FreeBSD also has a group nogroup = 65553 that doesn't match the nfs usage. However2, in FreeBSD-1 wher ids were 16-bits, nobody was 32767 and nogroup was 32766. so they didn't match nfs for other reasons. The 2 non-groups now seem to be just a bug -- FreeBSD-1 didn't have group nobody. 4.4BSD-Lite2 has the same values as FreeBSD-1. > Modified: head/usr.sbin/pw/pw_group.c > ============================================================================== > --- head/usr.sbin/pw/pw_group.c Sat Jan 24 17:32:45 2015 (r277651) > +++ head/usr.sbin/pw/pw_group.c Sat Jan 24 19:13:03 2015 (r277652) > @@ -68,7 +68,11 @@ pw_group(struct userconf * cnf, int mode > }; > > if (a_gid != NULL) { > - if (strspn(a_gid->val, "0123456789") != strlen(a_gid->val)) > + const char *teststr; > + teststr = a_gid->val; > + if (*teststr == '-') > + teststr++; > + if (strspn(teststr, "0123456789") != strlen(teststr)) > errx(EX_USAGE, "-g expects a number"); > } Style bugs: - nested declaration - no blank line after declarations. Garbage in the old code includes the primitive strspn() check. It continues by misparsing a_gid->value using atoi(). Large values first overflow atoi(), giving undefined behaviour. atoi() returns negative values as negative now that they are allowed. This overflow on assignment. This gives a way of entering the magic nfs ids. You type -2, atoi() returns -2, and they value overflows to the correct one on assignment. Previously, it was impossible to enter these values on 32-bit arches, but possible by exploiting the overflow bugs on 64-bit arches. atoi() uses strtol() with blind casting on both. On 32-bit archies, LONG_MAX = INT_MAX and strtol() clamps to this, so overflow doesn't occur. Large values are just impossible to specify, and negative values were impossible to mis-specify. On 64-bit arches, large values are accepted by strtol() and the value overflows in the blind cast. Then after a few more overflows it is possible for the magic nfs value to reach storage. You had to enter it as 4294967294, since another bug from using atoi() is that it doesn't support hex numbers. Now you can exploit the overflows in different ways and enter the magic number as -2. Correct parsing using strtoul() (or to support the full complications of typedefed types that are not completely general but are known to be integer with only nonnegative values supported, using strtoumax()) would do much more than the strspn() check. However, a special check for a minus sign would still be needed, to reject it. Testing the leading character as above only works if there is no leading whitespace. > > > Modified: head/usr.sbin/pw/pw_user.c > ============================================================================== > --- head/usr.sbin/pw/pw_user.c Sat Jan 24 17:32:45 2015 (r277651) > +++ head/usr.sbin/pw/pw_user.c Sat Jan 24 19:13:03 2015 (r277652) > @@ -322,7 +322,10 @@ pw_user(struct userconf * cnf, int mode, > a_name = NULL; > } > } else { > - if (strspn(a_uid->val, "0123456789") != strlen(a_uid->val)) > + const char *teststr = a_uid->val; > + if (*teststr == '-') > + teststr++; > + if (strspn(teststr, "0123456789") != strlen(teststr)) > errx(EX_USAGE, "-u expects a number"); > } Style bugs: as above, plus initialization in declaration. pw has bad style generally, and some of the above may be to match this. > Added: head/usr.sbin/pw/tests/pw_groupshow.sh The tests are backwards too. I'm not sure if the negative numbers can reach the password files. They might cause real problems there. Programs like the old version of pw reading them from there should detect them as errors and either reject processing of users and groups with them, or just not write back the garbage. Bruce From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 08:16:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E35E0243; Sun, 25 Jan 2015 08:16:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE2C63B9; Sun, 25 Jan 2015 08:16:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0P8GqwX018001; Sun, 25 Jan 2015 08:16:52 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0P8GqsK018000; Sun, 25 Jan 2015 08:16:52 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201501250816.t0P8GqsK018000@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Sun, 25 Jan 2015 08:16:52 +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: r277692 - stable/10/sys/dev/acpica X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 08:16:53 -0000 Author: cperciva Date: Sun Jan 25 08:16:51 2015 New Revision: 277692 URL: https://svnweb.freebsd.org/changeset/base/277692 Log: MFC r277318: When disabling C3+ CPU states due to the CPU_QUIRK_NO_C3 quirk, don't accidentally enable non-existent states. This bug was triggered if ACPI advertises the presence of a C2 state which we fail to parse via acpi_PkgGas due to our lack of support for FFixedHW resources, and causes an immediate panic when an attempt is made to enter the (NULL) state. One affected platform is the EC2 c4.8xlarge VM instance type; there may be others. Modified: stable/10/sys/dev/acpica/acpi_cpu.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/acpica/acpi_cpu.c ============================================================================== --- stable/10/sys/dev/acpica/acpi_cpu.c Sun Jan 25 06:05:55 2015 (r277691) +++ stable/10/sys/dev/acpica/acpi_cpu.c Sun Jan 25 08:16:51 2015 (r277692) @@ -872,7 +872,7 @@ acpi_cpu_startup(void *arg) for (i = 0; i < cpu_ndevices; i++) { sc = device_get_softc(cpu_devices[i]); if (cpu_quirks & CPU_QUIRK_NO_C3) { - sc->cpu_cx_count = sc->cpu_non_c3 + 1; + sc->cpu_cx_count = min(sc->cpu_cx_count, sc->cpu_non_c3 + 1); } AcpiInstallNotifyHandler(sc->cpu_handle, ACPI_DEVICE_NOTIFY, acpi_cpu_notify, sc); From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 09:56:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 564BBC90; Sun, 25 Jan 2015 09:56:17 +0000 (UTC) Received: from mail-wg0-x235.google.com (mail-wg0-x235.google.com [IPv6:2a00:1450:400c:c00::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D3348F57; Sun, 25 Jan 2015 09:56:16 +0000 (UTC) Received: by mail-wg0-f53.google.com with SMTP id a1so4405502wgh.12; Sun, 25 Jan 2015 01:56:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=vyyOY9CGvvUz92blmwnH+RU/u9Jm1SE0p2stnfhtKhc=; b=oubDIRa018oJDD3MT/1SB50wjorpMecEs1VAGSkVvkEnS9Inb+5skamlUq4RmaGUzt GgjlZ5U6ESo2SkVg3k96uDMx7/qwFlJOm66ntKk5OwCtiXh0jf/ng+ky/2rwo7kiz/OR MOxCZRbmAg5mG5oKQD+bDp7bbGJws682Nvp21mg6PpChXClUdjdqXUCiMUSVfeIOJBg2 ydowqk1srt/30c54c1TnhdwKnKcN7cEDj76iO4c6MlKDqYsHhVDA4Up26aD2Wfg+667J 73Zp48ZjJ2k6j6T+OwJi4vSWx1yh2AnSrrrD9d3lYCkBtjfzSchbesgru4ySBPBFq+Sd VaYQ== X-Received: by 10.180.91.44 with SMTP id cb12mr20353815wib.0.1422179774909; Sun, 25 Jan 2015 01:56:14 -0800 (PST) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id bj3sm9141719wib.3.2015.01.25.01.56.13 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Jan 2015 01:56:13 -0800 (PST) Sender: Baptiste Daroussin Date: Sun, 25 Jan 2015 10:56:11 +0100 From: Baptiste Daroussin To: Bruce Evans Subject: Re: svn commit: r277652 - in head/usr.sbin/pw: . tests Message-ID: <20150125095611.GM81001@ivaldir.etoilebsd.net> References: <201501241913.t0OJD4xT039188@svn.freebsd.org> <20150125155254.V1007@besplex.bde.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="C01fF7hLGvN0zd9s" Content-Disposition: inline In-Reply-To: <20150125155254.V1007@besplex.bde.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, dteske@FreeBSD.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 09:56:17 -0000 --C01fF7hLGvN0zd9s Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jan 25, 2015 at 04:56:24PM +1100, Bruce Evans wrote: > On Sat, 24 Jan 2015, Baptiste Daroussin wrote: >=20 > > Log: > > Allow negative numbers in -u and -g options >=20 > This is backwards. ids and gids are non-negative integers that can be > represented in the type uid_t and gid_t, respectively. All versions of > POSIX require this. Old versions of POSIX allowed uid_t and gid_t to > be floating point, but didn't allow negative, fractional, infinity or > NaN values. Not so old versions of POSIX require uid_t and gid_t to > be integer types, but still allow them to be sign. Negative and values > must not be created. Unrepresentable values cannot be created of course, > and should be rejected before they damage the password database. uid_t > and gid_t happened to be unsigned in FreeBSD, so negative values are > unrepresentable so cannot be created. pw is responsible for creating > ids, so it should reject negative and other unrepresentable ids. It > has garbage code for both. >=20 > Negative ids have historical abuses in places like mountd. mountd still > hard-codes -2 and -2 for the default uid and gid of an unprivileged user. > It at least casts these values to uid_t and gid_t before using them. > This gives the ids the non-random values of UINT32_MAX-1 if uid_t and > gid_t are uint32_t. (If uid_t and gid_t were signed, then it would > leave the values as negative, so invalid.) These magic values may work > better than when ids were 16 bits, since there is less risk of them > conflicting with a normal id. However, the non-conflict is probably > a bug. FreeBSD uses the magic ids of 65534 for user nobody: group > nobody. These would have been (id_t)-2 with 16-bit ids. They no > longer match, so ls displays (id_t)-2 numerically. FreeBSD also has > a group nogroup =3D 65553 that doesn't match the nfs usage. However2, > in FreeBSD-1 wher ids were 16-bits, nobody was 32767 and nogroup was > 32766. so they didn't match nfs for other reasons. The 2 non-groups > now seem to be just a bug -- FreeBSD-1 didn't have group nobody. > 4.4BSD-Lite2 has the same values as FreeBSD-1. >=20 Yes I know my patch is dirty, the whole pw(8) deserves a complete rewrite... It was just a quick and dirty "fix" to try to solve what looks to me like an abuse of bugs in pw(8) but it seems some people have scripts relying on it. Which is why I was committed this given I broke the usage of this abuse. I'll be more than happy to revert this "fix". I added Devin in the CC as he maintains bsdconfig which rely on pw(8) accep= ting negative numbers. And he seems to have a strong feeling about having this behaviour in pw(8). See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D196514 Best regards, Bapt --C01fF7hLGvN0zd9s Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlTEvbsACgkQ8kTtMUmk6EwlTACfZ2gR16oRyyRUPCmZJOGKvMBe POYAoK9FGF9zfyNDaleoFjTl86FI+to2 =c+aZ -----END PGP SIGNATURE----- --C01fF7hLGvN0zd9s-- From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 11:57:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8BD92CBC; Sun, 25 Jan 2015 11:57:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5DAB7BDA; Sun, 25 Jan 2015 11:57:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0PBvJ0P025344; Sun, 25 Jan 2015 11:57:19 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0PBvIdK025342; Sun, 25 Jan 2015 11:57:18 GMT (envelope-from des@FreeBSD.org) Message-Id: <201501251157.t0PBvIdK025342@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Sun, 25 Jan 2015 11:57:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277693 - head/sys/boot/forth X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 11:57:19 -0000 Author: des Date: Sun Jan 25 11:57:18 2015 New Revision: 277693 URL: https://svnweb.freebsd.org/changeset/base/277693 Log: Fix the font in the text version. This has bothered me for a long time... MFC after: 1 week Modified: head/sys/boot/forth/beastie.4th head/sys/boot/forth/brand.4th Modified: head/sys/boot/forth/beastie.4th ============================================================================== --- head/sys/boot/forth/beastie.4th Sun Jan 25 08:16:51 2015 (r277692) +++ head/sys/boot/forth/beastie.4th Sun Jan 25 11:57:18 2015 (r277693) @@ -89,7 +89,7 @@ variable logoY 0 25 at-xy ; -: fbsdbw-logo ( x y -- ) \ "FreeBSD" logo in B/W (13 rows x 21 columns) +: fbsdbw-logo ( x y -- ) \ "FreeBSD" logo in B/W (12 rows x 21 columns) \ We used to use the beastie himself as our default... until the \ eventual complaint derided his reign of the advanced boot-menu. @@ -106,17 +106,16 @@ variable logoY 5 + swap 6 + swap 2dup at-xy ." ______" 1+ - 2dup at-xy ." | ____| __ ___ ___ " 1+ - 2dup at-xy ." | |__ | '__/ _ \/ _ \" 1+ - 2dup at-xy ." | __|| | | __/ __/" 1+ - 2dup at-xy ." | | | | | | |" 1+ + 2dup at-xy ." | ____|" 1+ + 2dup at-xy ." | |__ _ __ ___ ___ " 1+ + 2dup at-xy ." | __|| '__/ _ \/ _ \" 1+ + 2dup at-xy ." | | | | | __/ __/" 1+ 2dup at-xy ." |_| |_| \___|\___|" 1+ 2dup at-xy ." ____ _____ _____" 1+ 2dup at-xy ." | _ \ / ____| __ \" 1+ 2dup at-xy ." | |_) | (___ | | | |" 1+ 2dup at-xy ." | _ < \___ \| | | |" 1+ 2dup at-xy ." | |_) |____) | |__| |" 1+ - 2dup at-xy ." | | | |" 1+ at-xy ." |____/|_____/|_____/" \ Put the cursor back at the bottom Modified: head/sys/boot/forth/brand.4th ============================================================================== --- head/sys/boot/forth/brand.4th Sun Jan 25 08:16:51 2015 (r277692) +++ head/sys/boot/forth/brand.4th Sun Jan 25 11:57:18 2015 (r277693) @@ -33,14 +33,13 @@ variable brandY 2 brandX ! 1 brandY ! -: fbsd-logo ( x y -- ) \ "FreeBSD" [wide] logo in B/W (7 rows x 42 columns) +: fbsd-logo ( x y -- ) \ "FreeBSD" [wide] logo in B/W (6 rows x 42 columns) 2dup at-xy ." ______ ____ _____ _____ " 1+ 2dup at-xy ." | ____| | _ \ / ____| __ \ " 1+ 2dup at-xy ." | |___ _ __ ___ ___ | |_) | (___ | | | |" 1+ 2dup at-xy ." | ___| '__/ _ \/ _ \| _ < \___ \| | | |" 1+ 2dup at-xy ." | | | | | __/ __/| |_) |____) | |__| |" 1+ - 2dup at-xy ." | | | | | | || | | |" 1+ at-xy ." |_| |_| \___|\___||____/|_____/|_____/ " \ Put the cursor back at the bottom From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 12:02:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0AA8A16B; Sun, 25 Jan 2015 12:02:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB1B0CAA; Sun, 25 Jan 2015 12:02:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0PC2cxd029666; Sun, 25 Jan 2015 12:02:38 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0PC2crJ029665; Sun, 25 Jan 2015 12:02:38 GMT (envelope-from des@FreeBSD.org) Message-Id: <201501251202.t0PC2crJ029665@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Sun, 25 Jan 2015 12:02:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277694 - head/sys/amd64/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 12:02:39 -0000 Author: des Date: Sun Jan 25 12:02:38 2015 New Revision: 277694 URL: https://svnweb.freebsd.org/changeset/base/277694 Log: Remove ISA NICs. Anyone still using these on amd64 can build their own kernel. Modified: head/sys/amd64/conf/GENERIC Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Sun Jan 25 11:57:18 2015 (r277693) +++ head/sys/amd64/conf/GENERIC Sun Jan 25 12:02:38 2015 (r277694) @@ -260,16 +260,6 @@ device vr # VIA Rhine, Rhine II device wb # Winbond W89C840F device xl # 3Com 3c90x (``Boomerang'', ``Cyclone'') -# ISA Ethernet NICs. pccard NICs included. -device cs # Crystal Semiconductor CS89x0 NIC -# 'device ed' requires 'device miibus' -device ed # NE[12]000, SMC Ultra, 3c503, DS8390 cards -device ex # Intel EtherExpress Pro/10 and Pro/10+ -device ep # Etherlink III based cards -device fe # Fujitsu MB8696x based cards -device sn # SMC's 9000 series of Ethernet chips -device xe # Xircom pccard Ethernet - # Wireless NIC cards device wlan # 802.11 support options IEEE80211_DEBUG # enable debug msgs From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 12:11:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3E4E26BE; Sun, 25 Jan 2015 12:11:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 29EB4D99; Sun, 25 Jan 2015 12:11:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0PCBqO6034529; Sun, 25 Jan 2015 12:11:52 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0PCBpRQ034527; Sun, 25 Jan 2015 12:11:51 GMT (envelope-from des@FreeBSD.org) Message-Id: <201501251211.t0PCBpRQ034527@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Sun, 25 Jan 2015 12:11:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277695 - in head: libexec/rtld-elf usr.bin/kdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 12:11:52 -0000 Author: des Date: Sun Jan 25 12:11:50 2015 New Revision: 277695 URL: https://svnweb.freebsd.org/changeset/base/277695 Log: Allow tracing dlfunc() / dlsym() events. MFC after: 1 week Modified: head/libexec/rtld-elf/rtld.c head/usr.bin/kdump/kdump.c Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Sun Jan 25 12:02:38 2015 (r277694) +++ head/libexec/rtld-elf/rtld.c Sun Jan 25 12:11:50 2015 (r277695) @@ -266,6 +266,8 @@ bool ld_library_path_rpath = false; #define UTRACE_PRELOAD_FINISHED 8 #define UTRACE_INIT_CALL 9 #define UTRACE_FINI_CALL 10 +#define UTRACE_DLSYM_START 11 +#define UTRACE_DLSYM_STOP 12 struct utrace_rtld { char sig[4]; /* 'RTLD' */ @@ -3099,6 +3101,7 @@ do_dlsym(void *handle, const char *name, SymLook req; RtldLockState lockstate; tls_index ti; + void *sym; int res; def = NULL; @@ -3108,6 +3111,7 @@ do_dlsym(void *handle, const char *name, req.flags = flags | SYMLOOK_IN_PLT; req.lockstate = &lockstate; + LD_UTRACE(UTRACE_DLSYM_START, handle, NULL, 0, 0, name); rlock_acquire(rtld_bind_lock, &lockstate); if (sigsetjmp(lockstate.env, 0) != 0) lock_upgrade(rtld_bind_lock, &lockstate); @@ -3117,6 +3121,7 @@ do_dlsym(void *handle, const char *name, if ((obj = obj_from_addr(retaddr)) == NULL) { _rtld_error("Cannot determine caller's shared object"); lock_release(rtld_bind_lock, &lockstate); + LD_UTRACE(UTRACE_DLSYM_STOP, handle, NULL, 0, 0, name); return NULL; } if (handle == NULL) { /* Just the caller's shared object. */ @@ -3164,6 +3169,7 @@ do_dlsym(void *handle, const char *name, } else { if ((obj = dlcheck(handle)) == NULL) { lock_release(rtld_bind_lock, &lockstate); + LD_UTRACE(UTRACE_DLSYM_STOP, handle, NULL, 0, 0, name); return NULL; } @@ -3207,19 +3213,22 @@ do_dlsym(void *handle, const char *name, * symbol. */ if (ELF_ST_TYPE(def->st_info) == STT_FUNC) - return (make_function_pointer(def, defobj)); + sym = make_function_pointer(def, defobj); else if (ELF_ST_TYPE(def->st_info) == STT_GNU_IFUNC) - return (rtld_resolve_ifunc(defobj, def)); + sym = rtld_resolve_ifunc(defobj, def); else if (ELF_ST_TYPE(def->st_info) == STT_TLS) { ti.ti_module = defobj->tlsindex; ti.ti_offset = def->st_value; - return (__tls_get_addr(&ti)); + sym = __tls_get_addr(&ti); } else - return (defobj->relocbase + def->st_value); + sym = defobj->relocbase + def->st_value; + LD_UTRACE(UTRACE_DLSYM_STOP, handle, sym, 0, 0, name); + return (sym); } _rtld_error("Undefined symbol \"%s\"", name); lock_release(rtld_bind_lock, &lockstate); + LD_UTRACE(UTRACE_DLSYM_STOP, handle, NULL, 0, 0, name); return NULL; } Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Sun Jan 25 12:02:38 2015 (r277694) +++ head/usr.bin/kdump/kdump.c Sun Jan 25 12:11:50 2015 (r277695) @@ -1531,6 +1531,8 @@ ktrcsw(struct ktr_csw *cs) #define UTRACE_PRELOAD_FINISHED 8 #define UTRACE_INIT_CALL 9 #define UTRACE_FINI_CALL 10 +#define UTRACE_DLSYM_START 11 +#define UTRACE_DLSYM_STOP 12 struct utrace_rtld { char sig[4]; /* 'RTLD' */ @@ -1610,6 +1612,13 @@ ktruser_rtld(int len, void *p) printf("RTLD: fini %p for %p (%s)\n", ut->mapbase, ut->handle, ut->name); break; + case UTRACE_DLSYM_START: + printf("RTLD: dlsym(%p, %s)\n", ut->handle, ut->name); + break; + case UTRACE_DLSYM_STOP: + printf("RTLD: %p = dlsym(%p, %s)\n", ut->mapbase, ut->handle, + ut->name); + break; default: cp = p; cp += 4; From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 12:43:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F0766E45; Sun, 25 Jan 2015 12:43:20 +0000 (UTC) Received: from mail-we0-x230.google.com (mail-we0-x230.google.com [IPv6:2a00:1450:400c:c03::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 82CC19C; Sun, 25 Jan 2015 12:43:20 +0000 (UTC) Received: by mail-we0-f176.google.com with SMTP id w62so4816497wes.7; Sun, 25 Jan 2015 04:43:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=8XhxnPeQeWbb9+Li7WYB5MUY/LHY0EroTXwCb6cQLfA=; b=hQLGBrWfKalbcCsR2tLZ6YptwsN/mYu5/Mfd3NID7Qtv+If2rz5rIq3I0lG7cqUAXi vovS5Ga44YjUrN6mHp6WpO/YKmac1LVJH6gDuaVACAgZHlivboS0/gwm6Z50TeAxisuK 1EokXkq0W9jI9iI6s9I8DH8Kyw95SIHfu7i4OCgM308YFabeCj9wCTxMffu1YzHV5iEc Ss69i9Up4neHIljzlRfxcHQ+t5ijSm+9hOdejynGMOI+hBvyBqjMlKf0GN5P+AsSBlcZ tGc/9dXu3amEFZKDU/Re+28xetjEP4WxADotqxbV7k2fflfukHgs5m1ydSlmBC6La2qQ 3FAQ== MIME-Version: 1.0 X-Received: by 10.194.48.74 with SMTP id j10mr34163655wjn.38.1422189798927; Sun, 25 Jan 2015 04:43:18 -0800 (PST) Sender: pluknet@gmail.com Received: by 10.216.91.4 with HTTP; Sun, 25 Jan 2015 04:43:18 -0800 (PST) In-Reply-To: <201501251202.t0PC2crJ029665@svn.freebsd.org> References: <201501251202.t0PC2crJ029665@svn.freebsd.org> Date: Sun, 25 Jan 2015 16:43:18 +0400 X-Google-Sender-Auth: uOmU63IE6qXUFmZWJ0zswXxRQm0 Message-ID: Subject: Re: svn commit: r277694 - head/sys/amd64/conf From: Sergey Kandaurov To: =?ISO-8859-1?Q?Dag=2DErling_Sm=F8rgrav?= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 12:43:21 -0000 On 25 January 2015 at 15:02, Dag-Erling Sm=F8rgrav wrote: > Author: des > Date: Sun Jan 25 12:02:38 2015 > New Revision: 277694 > URL: https://svnweb.freebsd.org/changeset/base/277694 > > Log: > Remove ISA NICs. Anyone still using these on amd64 can build their > own kernel. > > Modified: > head/sys/amd64/conf/GENERIC > If so, what about i386? (I'd rather not pc98) What about device isa in DEFAULTS? > Modified: head/sys/amd64/conf/GENERIC > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/amd64/conf/GENERIC Sun Jan 25 11:57:18 2015 (r277693) > +++ head/sys/amd64/conf/GENERIC Sun Jan 25 12:02:38 2015 (r277694) > @@ -260,16 +260,6 @@ device vr # VIA Rhi= ne, Rhine II > device wb # Winbond W89C840F > device xl # 3Com 3c90x (``Boomerang'', ``Cy= clone'') > > -# ISA Ethernet NICs. pccard NICs included. > -device cs # Crystal Semiconductor CS89x0 NI= C > -# 'device ed' requires 'device miibus' > -device ed # NE[12]000, SMC Ultra, 3c503, DS= 8390 cards > -device ex # Intel EtherExpress Pro/10 and P= ro/10+ > -device ep # Etherlink III based cards > -device fe # Fujitsu MB8696x based cards > -device sn # SMC's 9000 series of Ethernet c= hips > -device xe # Xircom pccard Ethernet > - > # Wireless NIC cards > device wlan # 802.11 support > options IEEE80211_DEBUG # enable debug msgs > --=20 wbr, pluknet From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 13:09:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 05D7563D; Sun, 25 Jan 2015 13:09:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DBC0B2D2; Sun, 25 Jan 2015 13:09:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0PD9sWl059923; Sun, 25 Jan 2015 13:09:54 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0PD9sV2059920; Sun, 25 Jan 2015 13:09:54 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501251309.t0PD9sV2059920@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 25 Jan 2015 13:09: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: r277697 - in stable/10/sys: fs/fifofs kern sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 13:09:55 -0000 Author: kib Date: Sun Jan 25 13:09:53 2015 New Revision: 277697 URL: https://svnweb.freebsd.org/changeset/base/277697 Log: MFC r277321: Make SIGSTOP working for sleeps done while waiting for fifo readers or writers in open(2), when the fifo is located on an NFS mount. Modified: stable/10/sys/fs/fifofs/fifo_vnops.c stable/10/sys/kern/kern_sig.c stable/10/sys/sys/signalvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/fifofs/fifo_vnops.c ============================================================================== --- stable/10/sys/fs/fifofs/fifo_vnops.c Sun Jan 25 12:50:26 2015 (r277696) +++ stable/10/sys/fs/fifofs/fifo_vnops.c Sun Jan 25 13:09:53 2015 (r277697) @@ -137,7 +137,7 @@ fifo_open(ap) struct thread *td; struct fifoinfo *fip; struct pipe *fpipe; - int error; + int error, stops_deferred; vp = ap->a_vp; fp = ap->a_fp; @@ -188,8 +188,11 @@ fifo_open(ap) if ((ap->a_mode & O_NONBLOCK) == 0) { if ((ap->a_mode & FREAD) && fip->fi_writers == 0) { VOP_UNLOCK(vp, 0); + stops_deferred = sigallowstop(); error = msleep(&fip->fi_readers, PIPE_MTX(fpipe), PDROP | PCATCH | PSOCK, "fifoor", 0); + if (stops_deferred) + sigdeferstop(); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); if (error) { fip->fi_readers--; @@ -212,8 +215,11 @@ fifo_open(ap) } if ((ap->a_mode & FWRITE) && fip->fi_readers == 0) { VOP_UNLOCK(vp, 0); + stops_deferred = sigallowstop(); error = msleep(&fip->fi_writers, PIPE_MTX(fpipe), PDROP | PCATCH | PSOCK, "fifoow", 0); + if (stops_deferred) + sigdeferstop(); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); if (error) { fip->fi_writers--; Modified: stable/10/sys/kern/kern_sig.c ============================================================================== --- stable/10/sys/kern/kern_sig.c Sun Jan 25 12:50:26 2015 (r277696) +++ stable/10/sys/kern/kern_sig.c Sun Jan 25 13:09:53 2015 (r277697) @@ -2596,15 +2596,18 @@ sigdeferstop(void) * not immediately suspend if a stop was posted. Instead, the thread * will suspend either via ast() or a subsequent interruptible sleep. */ -void -sigallowstop() +int +sigallowstop(void) { struct thread *td; + int prev; td = curthread; thread_lock(td); + prev = (td->td_flags & TDF_SBDRY) != 0; td->td_flags &= ~TDF_SBDRY; thread_unlock(td); + return (prev); } /* Modified: stable/10/sys/sys/signalvar.h ============================================================================== --- stable/10/sys/sys/signalvar.h Sun Jan 25 12:50:26 2015 (r277696) +++ stable/10/sys/sys/signalvar.h Sun Jan 25 13:09:53 2015 (r277697) @@ -325,7 +325,7 @@ extern struct mtx sigio_lock; int cursig(struct thread *td); int sigdeferstop(void); -void sigallowstop(void); +int sigallowstop(void); void execsigs(struct proc *p); void gsignal(int pgid, int sig, ksiginfo_t *ksi); void killproc(struct proc *p, char *why); From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 13:15:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CCC30789; Sun, 25 Jan 2015 13:15:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B606D37D; Sun, 25 Jan 2015 13:15:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0PDFFag064163; Sun, 25 Jan 2015 13:15:15 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0PDFCuj064152; Sun, 25 Jan 2015 13:15:12 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501251315.t0PDFCuj064152@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 25 Jan 2015 13:15: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: r277698 - in stable/10: lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 13:15:15 -0000 Author: kib Date: Sun Jan 25 13:15:12 2015 New Revision: 277698 URL: https://svnweb.freebsd.org/changeset/base/277698 Log: MFC r277322: Add procctl(2) PROC_TRACE_CTL command to enable or disable debugger attachment to the process. Modified: stable/10/lib/libc/sys/procctl.2 stable/10/sys/compat/freebsd32/freebsd32_misc.c stable/10/sys/kern/kern_exec.c stable/10/sys/kern/kern_fork.c stable/10/sys/kern/kern_procctl.c stable/10/sys/kern/kern_prot.c stable/10/sys/kern/kern_sig.c stable/10/sys/sys/priv.h stable/10/sys/sys/proc.h stable/10/sys/sys/procctl.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/sys/procctl.2 ============================================================================== --- stable/10/lib/libc/sys/procctl.2 Sun Jan 25 13:09:53 2015 (r277697) +++ stable/10/lib/libc/sys/procctl.2 Sun Jan 25 13:15:12 2015 (r277698) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 16, 2014 +.Dd December 29, 2014 .Dt PROCCTL 2 .Os .Sh NAME @@ -275,7 +275,61 @@ delivery failed, e.g. due to the permiss If no such process exist, the .Fa rk_fpid field is set to -1. +.It Dv PROC_TRACE_CTL +Enable or disable tracing of the specified process(es), according to the +value of the integer argument. +Tracing includes attachment to the process using +.Xr ptrace 2 +and +.Xr ktrace 2 , +debugging sysctls, +.Xr hwpmc 4 , +.Xr dtrace 1 +and core dumping. +Possible values for the +.Fa data +argument are: +.Bl -tag -width "Dv PROC_TRACE_CTL_DISABLE_EXEC" +.It Dv PROC_TRACE_CTL_ENABLE +Enable tracing, after it was disabled by +.Dv PROC_TRACE_CTL_DISABLE . +Only allowed for self. +.It Dv PROC_TRACE_CTL_DISABLE +Disable tracing for the specified process. +Tracing is re-enabled when the process changes the executing +program with +.Xr execve 2 +syscall. +A child inherits the trace settings from the parent on +.Xr fork 2 . +.It Dv PROC_TRACE_CTL_DISABLE_EXEC +Same as +.Dv PROC_TRACE_CTL_DISABLE , +but the setting persist for the process even after +.Xr execve 2 . +.El +.It Dv PROC_TRACE_STATUS +Returns the current tracing status for the specified process in +the integer variable pointed to by +.Fa data . +If tracing is disabled, +.Fa data +is set to -1. +If tracing is enabled, but no debugger is attached by +.Xr ptrace 2 +syscall, +.Fa data +is set to 0. +If a debugger is attached, +.Fa data +is set to the pid of the debugger process. .El +.Sh NOTES +Disabling tracing on a process should not be considered a security +feature, as it is bypassable both by the kernel and privileged processes, +and via other system mechanisms. +As such, it should not be relied on to reliably protect cryptographic +keying material or other confidential data. .Sh RETURN VALUES If an error occurs, a value of -1 is returned and .Va errno @@ -343,11 +397,34 @@ The .Dv PROC_REAP_ACQUIRE request was issued by a process that had already acquired reaper status and has not yet released it. +.It Bq Er EBUSY +The +.Dv PROC_TRACE_CTL +request was issued for a process already being traced. +.It Bq Er EPERM +The +.Dv PROC_TRACE_CTL +request to re-enable tracing of the process ( +.Dv PROC_TRACE_CTL_ENABLE ) , +or to disable persistence of the +.Dv PROC_TRACE_CTL_DISABLE +on +.Xr execve 2 +was issued for a non-current process. +.It Bq Er EINVAL +The value of the integer +.Fa data +parameter for the +.Dv PROC_TRACE_CTL +request is invalid. .El .Sh SEE ALSO +.Xr dtrace 1 , .Xr kill 2 , +.Xr ktrace 2 , .Xr ptrace 2 , .Xr wait 2 , +.Xr hwpmc 4 , .Xr init 8 .Sh HISTORY The Modified: stable/10/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_misc.c Sun Jan 25 13:09:53 2015 (r277697) +++ stable/10/sys/compat/freebsd32/freebsd32_misc.c Sun Jan 25 13:15:12 2015 (r277698) @@ -3074,6 +3074,7 @@ freebsd32_procctl(struct thread *td, str switch (uap->com) { case PROC_SPROTECT: + case PROC_TRACE_CTL: error = copyin(PTRIN(uap->data), &flags, sizeof(flags)); if (error != 0) return (error); @@ -3102,6 +3103,9 @@ freebsd32_procctl(struct thread *td, str return (error); data = &x.rk; break; + case PROC_TRACE_STATUS: + data = &flags; + break; default: return (EINVAL); } @@ -3117,6 +3121,10 @@ freebsd32_procctl(struct thread *td, str if (error == 0) error = error1; break; + case PROC_TRACE_STATUS: + if (error == 0) + error = copyout(&flags, uap->data, sizeof(flags)); + break; } return (error); } Modified: stable/10/sys/kern/kern_exec.c ============================================================================== --- stable/10/sys/kern/kern_exec.c Sun Jan 25 13:09:53 2015 (r277697) +++ stable/10/sys/kern/kern_exec.c Sun Jan 25 13:15:12 2015 (r277698) @@ -658,6 +658,8 @@ interpret: * it that it now has its own resources back */ p->p_flag |= P_EXEC; + if ((p->p_flag2 & P2_NOTRACE_EXEC) == 0) + p->p_flag2 &= ~P2_NOTRACE; if (p->p_flag & P_PPWAIT) { p->p_flag &= ~(P_PPWAIT | P_PPTRACE); cv_broadcast(&p->p_pwait); Modified: stable/10/sys/kern/kern_fork.c ============================================================================== --- stable/10/sys/kern/kern_fork.c Sun Jan 25 13:09:53 2015 (r277697) +++ stable/10/sys/kern/kern_fork.c Sun Jan 25 13:15:12 2015 (r277698) @@ -501,7 +501,7 @@ do_fork(struct thread *td, int flags, st * Increase reference counts on shared objects. */ p2->p_flag = P_INMEM; - p2->p_flag2 = 0; + p2->p_flag2 = p1->p_flag2 & (P2_NOTRACE | P2_NOTRACE_EXEC); p2->p_swtick = ticks; if (p1->p_flag & P_PROFIL) startprofclock(p2); Modified: stable/10/sys/kern/kern_procctl.c ============================================================================== --- stable/10/sys/kern/kern_procctl.c Sun Jan 25 13:09:53 2015 (r277697) +++ stable/10/sys/kern/kern_procctl.c Sun Jan 25 13:15:12 2015 (r277698) @@ -280,6 +280,62 @@ reap_kill(struct thread *td, struct proc return (error); } +static int +trace_ctl(struct thread *td, struct proc *p, int state) +{ + + PROC_LOCK_ASSERT(p, MA_OWNED); + + /* + * Ktrace changes p_traceflag from or to zero under the + * process lock, so the test does not need to acquire ktrace + * mutex. + */ + if ((p->p_flag & P_TRACED) != 0 || p->p_traceflag != 0) + return (EBUSY); + + switch (state) { + case PROC_TRACE_CTL_ENABLE: + if (td->td_proc != p) + return (EPERM); + p->p_flag2 &= ~(P2_NOTRACE | P2_NOTRACE_EXEC); + break; + case PROC_TRACE_CTL_DISABLE_EXEC: + p->p_flag2 |= P2_NOTRACE_EXEC | P2_NOTRACE; + break; + case PROC_TRACE_CTL_DISABLE: + if ((p->p_flag2 & P2_NOTRACE_EXEC) != 0) { + KASSERT((p->p_flag2 & P2_NOTRACE) != 0, + ("dandling P2_NOTRACE_EXEC")); + if (td->td_proc != p) + return (EPERM); + p->p_flag2 &= ~P2_NOTRACE_EXEC; + } else { + p->p_flag2 |= P2_NOTRACE; + } + break; + default: + return (EINVAL); + } + return (0); +} + +static int +trace_status(struct thread *td, struct proc *p, int *data) +{ + + if ((p->p_flag2 & P2_NOTRACE) != 0) { + KASSERT((p->p_flag & P_TRACED) == 0, + ("%d traced but tracing disabled", p->p_pid)); + *data = -1; + } else if ((p->p_flag & P_TRACED) != 0) { + *data = p->p_pptr->p_pid; + } else { + *data = 0; + } + return (0); +} + #ifndef _SYS_SYSPROTO_H_ struct procctl_args { idtype_t idtype; @@ -302,6 +358,7 @@ sys_procctl(struct thread *td, struct pr switch (uap->com) { case PROC_SPROTECT: + case PROC_TRACE_CTL: error = copyin(uap->data, &flags, sizeof(flags)); if (error != 0) return (error); @@ -328,6 +385,9 @@ sys_procctl(struct thread *td, struct pr return (error); data = &x.rk; break; + case PROC_TRACE_STATUS: + data = &flags; + break; default: return (EINVAL); } @@ -342,6 +402,10 @@ sys_procctl(struct thread *td, struct pr if (error == 0) error = error1; break; + case PROC_TRACE_STATUS: + if (error == 0) + error = copyout(&flags, uap->data, sizeof(flags)); + break; } return (error); } @@ -364,6 +428,10 @@ kern_procctl_single(struct thread *td, s return (reap_getpids(td, p, data)); case PROC_REAP_KILL: return (reap_kill(td, p, data)); + case PROC_TRACE_CTL: + return (trace_ctl(td, p, *(int *)data)); + case PROC_TRACE_STATUS: + return (trace_status(td, p, data)); default: return (EINVAL); } @@ -375,6 +443,7 @@ kern_procctl(struct thread *td, idtype_t struct pgrp *pg; struct proc *p; int error, first_error, ok; + bool tree_locked; switch (com) { case PROC_REAP_ACQUIRE: @@ -382,6 +451,7 @@ kern_procctl(struct thread *td, idtype_t case PROC_REAP_STATUS: case PROC_REAP_GETPIDS: case PROC_REAP_KILL: + case PROC_TRACE_STATUS: if (idtype != P_PID) return (EINVAL); } @@ -391,11 +461,17 @@ kern_procctl(struct thread *td, idtype_t case PROC_REAP_STATUS: case PROC_REAP_GETPIDS: case PROC_REAP_KILL: + case PROC_TRACE_CTL: sx_slock(&proctree_lock); + tree_locked = true; break; case PROC_REAP_ACQUIRE: case PROC_REAP_RELEASE: sx_xlock(&proctree_lock); + tree_locked = true; + break; + case PROC_TRACE_STATUS: + tree_locked = false; break; default: return (EINVAL); @@ -456,6 +532,7 @@ kern_procctl(struct thread *td, idtype_t error = EINVAL; break; } - sx_unlock(&proctree_lock); + if (tree_locked) + sx_unlock(&proctree_lock); return (error); } Modified: stable/10/sys/kern/kern_prot.c ============================================================================== --- stable/10/sys/kern/kern_prot.c Sun Jan 25 13:09:53 2015 (r277697) +++ stable/10/sys/kern/kern_prot.c Sun Jan 25 13:15:12 2015 (r277698) @@ -1711,6 +1711,13 @@ p_candebug(struct thread *td, struct pro if ((p->p_flag & P_INEXEC) != 0) return (EBUSY); + /* Denied explicitely */ + if ((p->p_flag2 & P2_NOTRACE) != 0) { + error = priv_check(td, PRIV_DEBUG_DENIED); + if (error != 0) + return (error); + } + return (0); } Modified: stable/10/sys/kern/kern_sig.c ============================================================================== --- stable/10/sys/kern/kern_sig.c Sun Jan 25 13:09:53 2015 (r277697) +++ stable/10/sys/kern/kern_sig.c Sun Jan 25 13:15:12 2015 (r277698) @@ -3257,7 +3257,8 @@ coredump(struct thread *td) MPASS((p->p_flag & P_HADTHREADS) == 0 || p->p_singlethread == td); _STOPEVENT(p, S_CORE, 0); - if (!do_coredump || (!sugid_coredump && (p->p_flag & P_SUGID) != 0)) { + if (!do_coredump || (!sugid_coredump && (p->p_flag & P_SUGID) != 0) || + (p->p_flag2 & P2_NOTRACE) != 0) { PROC_UNLOCK(p); return (EFAULT); } Modified: stable/10/sys/sys/priv.h ============================================================================== --- stable/10/sys/sys/priv.h Sun Jan 25 13:09:53 2015 (r277697) +++ stable/10/sys/sys/priv.h Sun Jan 25 13:15:12 2015 (r277698) @@ -111,6 +111,7 @@ #define PRIV_DEBUG_DIFFCRED 80 /* Exempt debugging other users. */ #define PRIV_DEBUG_SUGID 81 /* Exempt debugging setuid proc. */ #define PRIV_DEBUG_UNPRIV 82 /* Exempt unprivileged debug limit. */ +#define PRIV_DEBUG_DENIED 83 /* Exempt P2_NOTRACE. */ /* * Dtrace privileges. Modified: stable/10/sys/sys/proc.h ============================================================================== --- stable/10/sys/sys/proc.h Sun Jan 25 13:09:53 2015 (r277697) +++ stable/10/sys/sys/proc.h Sun Jan 25 13:15:12 2015 (r277698) @@ -651,6 +651,8 @@ struct proc { /* These flags are kept in p_flag2. */ #define P2_INHERIT_PROTECTED 0x00000001 /* New children get P_PROTECTED. */ +#define P2_NOTRACE 0x00000002 /* No ptrace(2) attach or coredumps. */ +#define P2_NOTRACE_EXEC 0x00000004 /* Keep P2_NOPTRACE on exec(2). */ /* Flags protected by proctree_lock, kept in p_treeflags. */ #define P_TREE_ORPHANED 0x00000001 /* Reparented, on orphan list */ Modified: stable/10/sys/sys/procctl.h ============================================================================== --- stable/10/sys/sys/procctl.h Sun Jan 25 13:09:53 2015 (r277697) +++ stable/10/sys/sys/procctl.h Sun Jan 25 13:15:12 2015 (r277698) @@ -41,6 +41,8 @@ #define PROC_REAP_STATUS 4 /* reaping status */ #define PROC_REAP_GETPIDS 5 /* get descendants */ #define PROC_REAP_KILL 6 /* kill descendants */ +#define PROC_TRACE_CTL 7 /* en/dis ptrace and coredumps */ +#define PROC_TRACE_STATUS 8 /* query tracing status */ /* Operations for PROC_SPROTECT (passed in integer arg). */ #define PPROT_OP(x) ((x) & 0xf) @@ -96,6 +98,10 @@ struct procctl_reaper_kill { #define REAPER_KILL_CHILDREN 0x00000001 #define REAPER_KILL_SUBTREE 0x00000002 +#define PROC_TRACE_CTL_ENABLE 1 +#define PROC_TRACE_CTL_DISABLE 2 +#define PROC_TRACE_CTL_DISABLE_EXEC 3 + #ifndef _KERNEL __BEGIN_DECLS int procctl(idtype_t, id_t, int, void *); From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 14:21:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8503B12C; Sun, 25 Jan 2015 14:21:58 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B9C4B37; Sun, 25 Jan 2015 14:21:58 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YFO4S-000KHA-TY; Sun, 25 Jan 2015 17:21:48 +0300 Date: Sun, 25 Jan 2015 17:21:48 +0300 From: Slawa Olhovchenkov To: Bruce Evans Subject: Re: svn commit: r277652 - in head/usr.sbin/pw: . tests Message-ID: <20150125142148.GA76051@zxy.spb.ru> References: <201501241913.t0OJD4xT039188@svn.freebsd.org> <20150125155254.V1007@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150125155254.V1007@besplex.bde.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-head@freebsd.org, Baptiste Daroussin , src-committers@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 14:21:58 -0000 On Sun, Jan 25, 2015 at 04:56:24PM +1100, Bruce Evans wrote: > Negative ids have historical abuses in places like mountd. mountd still > hard-codes -2 and -2 for the default uid and gid of an unprivileged user. > It at least casts these values to uid_t and gid_t before using them. > This gives the ids the non-random values of UINT32_MAX-1 if uid_t and > gid_t are uint32_t. (If uid_t and gid_t were signed, then it would > leave the values as negative, so invalid.) These magic values may work > better than when ids were 16 bits, since there is less risk of them > conflicting with a normal id. However, the non-conflict is probably > a bug. FreeBSD uses the magic ids of 65534 for user nobody: group > nobody. These would have been (id_t)-2 with 16-bit ids. They no > longer match, so ls displays (id_t)-2 numerically. FreeBSD also has > a group nogroup = 65553 that doesn't match the nfs usage. However2, > in FreeBSD-1 wher ids were 16-bits, nobody was 32767 and nogroup was > 32766. so they didn't match nfs for other reasons. The 2 non-groups > now seem to be just a bug -- FreeBSD-1 didn't have group nobody. > 4.4BSD-Lite2 has the same values as FreeBSD-1. This is not full true for ZFS case. On ZFS nobody is 2^32-2. From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 14:25:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B3DE128E; Sun, 25 Jan 2015 14:25:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D6C4B5C; Sun, 25 Jan 2015 14:25:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0PEPjxt097280; Sun, 25 Jan 2015 14:25:45 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0PEPjV0097279; Sun, 25 Jan 2015 14:25:45 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201501251425.t0PEPjV0097279@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 25 Jan 2015 14:25: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: r277699 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 14:25:45 -0000 Author: mav Date: Sun Jan 25 14:25:44 2015 New Revision: 277699 URL: https://svnweb.freebsd.org/changeset/base/277699 Log: MFC r276913: Use new optimized dmu_read_uio_dbuf() for ZVOLs in device mode. This slightly reduces overhead by avoiding dnode_hold()/dnode_rele() calls. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Sun Jan 25 13:15:12 2015 (r277698) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Sun Jan 25 14:25:44 2015 (r277699) @@ -1819,7 +1819,7 @@ zvol_read(struct cdev *dev, struct uio * if (bytes > volsize - uio->uio_loffset) bytes = volsize - uio->uio_loffset; - error = dmu_read_uio(zv->zv_objset, ZVOL_OBJ, uio, bytes); + error = dmu_read_uio_dbuf(zv->zv_dbuf, uio, bytes); if (error) { /* convert checksum errors into IO errors */ if (error == ECKSUM) From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 14:29:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1DDE63D4; Sun, 25 Jan 2015 14:29:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07EDAB74; Sun, 25 Jan 2015 14:29:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0PETevS097779; Sun, 25 Jan 2015 14:29:40 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0PETec0097778; Sun, 25 Jan 2015 14:29:40 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201501251429.t0PETec0097778@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 25 Jan 2015 14:29:40 +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: r277700 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 14:29:41 -0000 Author: mav Date: Sun Jan 25 14:29:40 2015 New Revision: 277700 URL: https://svnweb.freebsd.org/changeset/base/277700 Log: MFC r276952: Add LBA as secondary sort key for synchronous I/O requests. On FreeBSD gethrtime() implemented via getnanouptime(), that has 1ms (1/hz) precision. It makes primary sort key (timestamp) collision very possible. In such situations sorting by secondary key of LBA is much more reasonable then by totally meaningless zio pointer value. With this change on multi-threaded synchronous ZVOL read I've measured 10% throughput increase and average latency reduction. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Sun Jan 25 14:25:44 2015 (r277699) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Sun Jan 25 14:29:40 2015 (r277700) @@ -313,6 +313,11 @@ vdev_queue_timestamp_compare(const void if (z1->io_timestamp > z2->io_timestamp) return (1); + if (z1->io_offset < z2->io_offset) + return (-1); + if (z1->io_offset > z2->io_offset) + return (1); + if (z1 < z2) return (-1); if (z1 > z2) From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 14:31:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 07B3850D; Sun, 25 Jan 2015 14:31:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E5994C0C; Sun, 25 Jan 2015 14:31:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0PEVi5A099111; Sun, 25 Jan 2015 14:31:44 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0PEViKJ099110; Sun, 25 Jan 2015 14:31:44 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201501251431.t0PEViKJ099110@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 25 Jan 2015 14:31: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: r277701 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 14:31:45 -0000 Author: mav Date: Sun Jan 25 14:31:44 2015 New Revision: 277701 URL: https://svnweb.freebsd.org/changeset/base/277701 Log: MFC r276983: When aggregating TRIM segments, move the new one to the end. New segment at the list head may block all TRIM requests until txg of that segment can be processed. On my random I/O tests this change reduce peak TRIM list length from 650 to 450 segments. Hopefully it should reduce TRIM burstiness when list processing is unblocked. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Sun Jan 25 14:29:40 2015 (r277700) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Sun Jan 25 14:31:44 2015 (r277701) @@ -253,17 +253,23 @@ trim_map_segment_add(trim_map_t *tm, uin ts_after->ts_start = ts_before->ts_start; ts_after->ts_txg = txg; ts_after->ts_time = time; + list_remove(&tm->tm_head, ts_after); + list_insert_tail(&tm->tm_head, ts_after); kmem_free(ts_before, sizeof (*ts_before)); } else if (merge_before) { TRIM_MAP_SINC(tm, end - ts_before->ts_end); ts_before->ts_end = end; ts_before->ts_txg = txg; ts_before->ts_time = time; + list_remove(&tm->tm_head, ts_before); + list_insert_tail(&tm->tm_head, ts_before); } else if (merge_after) { TRIM_MAP_SINC(tm, ts_after->ts_start - start); ts_after->ts_start = start; ts_after->ts_txg = txg; ts_after->ts_time = time; + list_remove(&tm->tm_head, ts_after); + list_insert_tail(&tm->tm_head, ts_after); } else { TRIM_MAP_SINC(tm, end - start); TRIM_MAP_QINC(tm); From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 14:50:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A9C4839; Sun, 25 Jan 2015 14:50:24 +0000 (UTC) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 48F3DCEE; Sun, 25 Jan 2015 14:50:23 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id D88724DEF; Sun, 25 Jan 2015 14:50:17 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id 5BF3413E90; Sun, 25 Jan 2015 15:49:27 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Sergey Kandaurov Subject: Re: svn commit: r277694 - head/sys/amd64/conf References: <201501251202.t0PC2crJ029665@svn.freebsd.org> Date: Sun, 25 Jan 2015 15:49:27 +0100 In-Reply-To: (Sergey Kandaurov's message of "Sun, 25 Jan 2015 16:43:18 +0400") Message-ID: <86lhkqq5jc.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 14:50:24 -0000 Sergey Kandaurov writes: > Dag-Erling Sm=C3=B8rgrav writes: > > Log: > > Remove ISA NICs. Anyone still using these on amd64 can build their > > own kernel. > If so, what about i386? (I'd rather not pc98) There's a greater chance of ISA devices still being in use on i386 hardware than on amd64 hardware. I've never even heard of amd64 hardware with ISA slots, but I guess there is a remote chance that someone may try to use something like an ep(4) PCCARD on a modern laptop (which is a bad example, since ep(4) is loadable, but you get the idea). > What about device isa in DEFAULTS? It's still required for atkbdc. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 14:50:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8DB5DA11; Sun, 25 Jan 2015 14:50:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 78031D8B; Sun, 25 Jan 2015 14:50:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0PEooKm008654; Sun, 25 Jan 2015 14:50:50 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0PEooEB008653; Sun, 25 Jan 2015 14:50:50 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201501251450.t0PEooEB008653@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sun, 25 Jan 2015 14:50:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r277703 - stable/9/sys/net X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 14:50:50 -0000 Author: ae Date: Sun Jan 25 14:50:49 2015 New Revision: 277703 URL: https://svnweb.freebsd.org/changeset/base/277703 Log: MFC r277295: Fix condition and really sort ports. Also add comment describing the intent of this code. Modified: stable/9/sys/net/if_lagg.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/net/ (props changed) Modified: stable/9/sys/net/if_lagg.c ============================================================================== --- stable/9/sys/net/if_lagg.c Sun Jan 25 14:32:48 2015 (r277702) +++ stable/9/sys/net/if_lagg.c Sun Jan 25 14:50:49 2015 (r277703) @@ -624,11 +624,16 @@ lagg_port_create(struct lagg_softc *sc, lagg_port_lladdr(lp, IF_LLADDR(sc->sc_ifp)); } - /* Insert into the list of ports. Keep ports sorted by if_index. */ + /* + * Insert into the list of ports. + * Keep ports sorted by if_index. It is handy, when configuration + * is predictable and `ifconfig laggN create ...` command + * will lead to the same result each time. + */ SLIST_FOREACH(tlp, &sc->sc_ports, lp_entries) { if (tlp->lp_ifp->if_index < ifp->if_index && ( SLIST_NEXT(tlp, lp_entries) == NULL || - SLIST_NEXT(tlp, lp_entries)->lp_ifp->if_index < + SLIST_NEXT(tlp, lp_entries)->lp_ifp->if_index > ifp->if_index)) break; } From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 14:54:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B9F10B5E; Sun, 25 Jan 2015 14:54:18 +0000 (UTC) Received: from mail-pa0-x232.google.com (mail-pa0-x232.google.com [IPv6:2607:f8b0:400e:c03::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 81FB9DA8; Sun, 25 Jan 2015 14:54:18 +0000 (UTC) Received: by mail-pa0-f50.google.com with SMTP id rd3so6847597pab.9; Sun, 25 Jan 2015 06:54:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:from:subject:date:to; bh=0q4PjmVSKrjmk/IrFumdVDfD4tTHfE30a6F/Mv4mu+0=; b=hb7gAJuzn1ajHLqZeUmuD48vUz+sL/GFaPRu4cYd9cSj/X+rDssbjTrMwXLmuXxhHG OSNXUdf30h9irpw3czs08TtWPOvwpXjnL4VvbagaNraS8FgoTmr0a0/eeoahk6Obi8fP vqqm8gm7QmZ3TYI1fdRhqd4CbVsMtWPJ1LQQvx1j4ta8xkMMvx+UITXdH2WNTkwlYh2I VbVtkEQw+878CwpXtG5MmWCQoOwYmjU9wY2CgZIpTdlOWzv+3adRobicHr8Y03fq6+zi 1Qa483h/s0rKULDUeKGa3AFIrBJqKv2La1HMcEbxQ52b+qDVOgBLZw4RCHfVr8Y5M2N/ 8oPQ== X-Received: by 10.70.49.16 with SMTP id q16mr26981210pdn.2.1422197657089; Sun, 25 Jan 2015 06:54:17 -0800 (PST) Received: from ?IPv6:2601:8:ab80:7d6:ad2a:4a3d:6b53:513? ([2601:8:ab80:7d6:ad2a:4a3d:6b53:513]) by mx.google.com with ESMTPSA id bi11sm7432872pdb.8.2015.01.25.06.54.16 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 25 Jan 2015 06:54:16 -0800 (PST) References: <201501251202.t0PC2crJ029665@svn.freebsd.org> Mime-Version: 1.0 (1.0) In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-Id: <6366BFE6-1A9F-433C-99F5-65B9D905AEF5@gmail.com> X-Mailer: iPhone Mail (12B440) From: Garrett Cooper Subject: Re: svn commit: r277694 - head/sys/amd64/conf Date: Sun, 25 Jan 2015 06:54:15 -0800 To: Sergey Kandaurov Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 14:54:19 -0000 > On Jan 25, 2015, at 04:43, Sergey Kandaurov wrote: >=20 >> On 25 January 2015 at 15:02, Dag-Erling Sm=C3=B8rgrav w= rote: >> Author: des >> Date: Sun Jan 25 12:02:38 2015 >> New Revision: 277694 >> URL: https://svnweb.freebsd.org/changeset/base/277694 >>=20 >> Log: >> Remove ISA NICs. Anyone still using these on amd64 can build their >> own kernel. >>=20 >> Modified: >> head/sys/amd64/conf/GENERIC >=20 > If so, what about i386? (I'd rather not pc98) > What about device isa in DEFAULTS? isa is still needed in some scenarios. I just don't remember the full detail= s offhand (something about internal buses iirc... And IPMI for starters...) >> Modified: head/sys/amd64/conf/GENERIC >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D >> --- head/sys/amd64/conf/GENERIC Sun Jan 25 11:57:18 2015 (r277693)= >> +++ head/sys/amd64/conf/GENERIC Sun Jan 25 12:02:38 2015 (r277694)= >> @@ -260,16 +260,6 @@ device vr # VIA Rhi= ne, Rhine II >> device wb # Winbond W89C840F >> device xl # 3Com 3c90x (``Boomerang'', ``Cyc= lone'') >>=20 >> -# ISA Ethernet NICs. pccard NICs included. >> -device cs # Crystal Semiconductor CS89x0 NI= C >> -# 'device ed' requires 'device miibus' >> -device ed # NE[12]000, SMC Ultra, 3c503, DS= 8390 cards >> -device ex # Intel EtherExpress Pro/10 and P= ro/10+ >> -device ep # Etherlink III based cards >> -device fe # Fujitsu MB8696x based cards >> -device sn # SMC's 9000 series of Ethernet c= hips >> -device xe # Xircom pccard Ethernet >> - >> # Wireless NIC cards >> device wlan # 802.11 support >> options IEEE80211_DEBUG # enable debug msgs >=20 > --=20 > wbr, > pluknet >=20 From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 15:31:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 861681BE; Sun, 25 Jan 2015 15:31:29 +0000 (UTC) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id 01C9E119; Sun, 25 Jan 2015 15:31:29 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id 99747783234; Mon, 26 Jan 2015 02:31:18 +1100 (AEDT) Date: Mon, 26 Jan 2015 02:31:05 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Slawa Olhovchenkov Subject: Re: svn commit: r277652 - in head/usr.sbin/pw: . tests In-Reply-To: <20150125142148.GA76051@zxy.spb.ru> Message-ID: <20150126014336.P2572@besplex.bde.org> References: <201501241913.t0OJD4xT039188@svn.freebsd.org> <20150125155254.V1007@besplex.bde.org> <20150125142148.GA76051@zxy.spb.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=C77Ql2/+ c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=CavqZjcS5qOzMhdYXGQA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, Baptiste Daroussin , src-committers@freebsd.org, svn-src-all@freebsd.org, Bruce Evans X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 15:31:29 -0000 On Sun, 25 Jan 2015, Slawa Olhovchenkov wrote: > On Sun, Jan 25, 2015 at 04:56:24PM +1100, Bruce Evans wrote: > >> Negative ids have historical abuses in places like mountd. mountd still >> hard-codes -2 and -2 for the default uid and gid of an unprivileged user. >> It at least casts these values to uid_t and gid_t before using them. >> This gives the ids the non-random values of UINT32_MAX-1 if uid_t and >> gid_t are uint32_t. (If uid_t and gid_t were signed, then it would >> leave the values as negative, so invalid.) These magic values may work >> better than when ids were 16 bits, since there is less risk of them >> conflicting with a normal id. However, the non-conflict is probably >> a bug. FreeBSD uses the magic ids of 65534 for user nobody: group >> nobody. These would have been (id_t)-2 with 16-bit ids. They no >> longer match, so ls displays (id_t)-2 numerically. FreeBSD also has >> a group nogroup = 65553 that doesn't match the nfs usage. However2, >> in FreeBSD-1 wher ids were 16-bits, nobody was 32767 and nogroup was >> 32766. so they didn't match nfs for other reasons. The 2 non-groups >> now seem to be just a bug -- FreeBSD-1 didn't have group nobody. >> 4.4BSD-Lite2 has the same values as FreeBSD-1. > > This is not full true for ZFS case. > On ZFS nobody is 2^32-2. File systems don't get to decide this. zfs actually uses 2^16-2. It claims to use the standard POSIX id for the user nobody, but there are no such thing in POSIX (except (*id_t)-1 means "no value" for some syscalls) so it must not be used otherwise). zfs actually uses the FreeBSD values UID_NOBODY and GID_NOBODY, so it is at least consistent with the default /etc/passwd and /etc/group, unlike nfs. I added the hard-coded UID_* and GID_* as quick fixes for devfs in 1996, since parsing the password database to get them in the correct way is too hard. This hack is still used today :-(. Except, I didn't add the NOBODY ids. These are not used by any file system. They are hacks for devfs alone, mislayered into a devfs (device-specific) header. The sysadmin can easily break all these hard-coded values by editing the password database, but shouldn't. Googling "POSIX uid nobody" finds no early POSIX hits, but some warnings that the magic ids are non-POSIX. Wikipedia gives the following magic ids: 0: normally the superuser. This is probably still hard-coded in many places in FreeBSD, though many places were fixed in the conversion from suser() to priv_check(). (uid_t)-1: POSIX standard for omitted arg -2: historical nobody 32767: another historical nobody, still used by OpenBSD 65534: another nobody, now used by many Linux distributions for compatibilty betwen 16-bit and 32-bit ids. Default Linux return value for the id returned by 16-bit syscalls when the value is too large. [Linux switched to 32-bit ids much later than FreeBSD, so it has to be more careful with compatibility. The Linux emulator in FreeBSD is both incompatible and insecure here -- it doesn't return 65534, but truncates using blind assignment.] 99: statically allocate 0-99 for system use and use the last value in the range for nobody. Bruce From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 15:36:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BBEE7323; Sun, 25 Jan 2015 15:36:43 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72E19154; Sun, 25 Jan 2015 15:36:43 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YFPEu-000LMB-51; Sun, 25 Jan 2015 18:36:40 +0300 Date: Sun, 25 Jan 2015 18:36:40 +0300 From: Slawa Olhovchenkov To: Bruce Evans Subject: Re: svn commit: r277652 - in head/usr.sbin/pw: . tests Message-ID: <20150125153639.GC76051@zxy.spb.ru> References: <201501241913.t0OJD4xT039188@svn.freebsd.org> <20150125155254.V1007@besplex.bde.org> <20150125142148.GA76051@zxy.spb.ru> <20150126014336.P2572@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150126014336.P2572@besplex.bde.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-head@freebsd.org, Baptiste Daroussin , src-committers@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 15:36:43 -0000 On Mon, Jan 26, 2015 at 02:31:05AM +1100, Bruce Evans wrote: > On Sun, 25 Jan 2015, Slawa Olhovchenkov wrote: > > > On Sun, Jan 25, 2015 at 04:56:24PM +1100, Bruce Evans wrote: > > > >> Negative ids have historical abuses in places like mountd. mountd still > >> hard-codes -2 and -2 for the default uid and gid of an unprivileged user. > >> It at least casts these values to uid_t and gid_t before using them. > >> This gives the ids the non-random values of UINT32_MAX-1 if uid_t and > >> gid_t are uint32_t. (If uid_t and gid_t were signed, then it would > >> leave the values as negative, so invalid.) These magic values may work > >> better than when ids were 16 bits, since there is less risk of them > >> conflicting with a normal id. However, the non-conflict is probably > >> a bug. FreeBSD uses the magic ids of 65534 for user nobody: group > >> nobody. These would have been (id_t)-2 with 16-bit ids. They no > >> longer match, so ls displays (id_t)-2 numerically. FreeBSD also has > >> a group nogroup = 65553 that doesn't match the nfs usage. However2, > >> in FreeBSD-1 wher ids were 16-bits, nobody was 32767 and nogroup was > >> 32766. so they didn't match nfs for other reasons. The 2 non-groups > >> now seem to be just a bug -- FreeBSD-1 didn't have group nobody. > >> 4.4BSD-Lite2 has the same values as FreeBSD-1. > > > > This is not full true for ZFS case. > > On ZFS nobody is 2^32-2. > > File systems don't get to decide this. zfs actually uses 2^16-2. It ls -l /usr/ports/packages32/lang total 2 lrwxr-xr-x 1 4294967294 wheel 33 Mar 17 2012 perl-threaded-5.12.4_4.tbz -> ../All/perl-threaded-5.12.4_4.tbz lrwxr-xr-x 1 4294967294 wheel 27 Mar 17 2012 python27-2.7.2_4.tbz -> ../All/python27-2.7.2_4.tbz lrwxr-xr-x 1 4294967294 wheel 21 Mar 17 2012 tcl-8.5.11.tbz -> ../All/tcl-8.5.11.tbz lrwxr-xr-x 1 4294967294 wheel 29 Mar 17 2012 tcl-modules-8.5.11.tbz -> ../All/tcl-modules-8.5.11.tbz Same in solaris, as i know. From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 15:44:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4A700710; Sun, 25 Jan 2015 15:44:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 34F8B218; Sun, 25 Jan 2015 15:44:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0PFil9j034872; Sun, 25 Jan 2015 15:44:47 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0PFil1r034871; Sun, 25 Jan 2015 15:44:47 GMT (envelope-from des@FreeBSD.org) Message-Id: <201501251544.t0PFil1r034871@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Sun, 25 Jan 2015 15:44:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277706 - head/etc/rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 15:44:47 -0000 Author: des Date: Sun Jan 25 15:44:46 2015 New Revision: 277706 URL: https://svnweb.freebsd.org/changeset/base/277706 Log: Allow the user to specify the location of control.conf. Modified: head/etc/rc.d/local_unbound Modified: head/etc/rc.d/local_unbound ============================================================================== --- head/etc/rc.d/local_unbound Sun Jan 25 15:09:52 2015 (r277705) +++ head/etc/rc.d/local_unbound Sun Jan 25 15:44:46 2015 (r277706) @@ -26,6 +26,7 @@ pidfile="/var/run/${name}.pid" : ${local_unbound_config:=${local_unbound_workdir}/unbound.conf} : ${local_unbound_flags:=-c${local_unbound_config}} : ${local_unbound_forwardconf:=${local_unbound_workdir}/forward.conf} +: ${local_unbound_controlconf:=${local_unbound_workdir}/control.conf} : ${local_unbound_anchor:=${local_unbound_workdir}/root.key} : ${local_unbound_forwarders:=} @@ -66,6 +67,7 @@ local_unbound_setup() -w ${local_unbound_workdir} \ -c ${local_unbound_config} \ -f ${local_unbound_forwardconf} \ + -o ${local_unbound_controlconf} \ -a ${local_unbound_anchor} \ ${local_unbound_forwarders} } From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 16:35:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9693DFFC; Sun, 25 Jan 2015 16:35:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 825B68C9; Sun, 25 Jan 2015 16:35:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0PGZ40P058282; Sun, 25 Jan 2015 16:35:04 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0PGZ4dK058281; Sun, 25 Jan 2015 16:35:04 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201501251635.t0PGZ4dK058281@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sun, 25 Jan 2015 16:35: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: r277707 - stable/10/sys/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 16:35:04 -0000 Author: ae Date: Sun Jan 25 16:35:03 2015 New Revision: 277707 URL: https://svnweb.freebsd.org/changeset/base/277707 Log: MFC r277295: Fix condition and really sort ports. Also add comment describing the intent of this code. Modified: stable/10/sys/net/if_lagg.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/if_lagg.c ============================================================================== --- stable/10/sys/net/if_lagg.c Sun Jan 25 15:44:46 2015 (r277706) +++ stable/10/sys/net/if_lagg.c Sun Jan 25 16:35:03 2015 (r277707) @@ -666,11 +666,16 @@ lagg_port_create(struct lagg_softc *sc, lagg_port_lladdr(lp, IF_LLADDR(sc->sc_ifp)); } - /* Insert into the list of ports. Keep ports sorted by if_index. */ + /* + * Insert into the list of ports. + * Keep ports sorted by if_index. It is handy, when configuration + * is predictable and `ifconfig laggN create ...` command + * will lead to the same result each time. + */ SLIST_FOREACH(tlp, &sc->sc_ports, lp_entries) { if (tlp->lp_ifp->if_index < ifp->if_index && ( SLIST_NEXT(tlp, lp_entries) == NULL || - SLIST_NEXT(tlp, lp_entries)->lp_ifp->if_index < + SLIST_NEXT(tlp, lp_entries)->lp_ifp->if_index > ifp->if_index)) break; } From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 17:07:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BD3D855F for ; Sun, 25 Jan 2015 17:07:09 +0000 (UTC) Received: from mail-pd0-f174.google.com (mail-pd0-f174.google.com [209.85.192.174]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8D1E0B68 for ; Sun, 25 Jan 2015 17:07:09 +0000 (UTC) Received: by mail-pd0-f174.google.com with SMTP id ft15so7567176pdb.5 for ; Sun, 25 Jan 2015 09:07:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=IepLzZydiR0lY4SEuSkbriQzNLohb7vHeB1PYRWs/Ng=; b=eCxO9mrj0M0QSVVCMY85PYd9bw0BqWBM3lSQP7IK81zFa8nQxf0tfxBOqYeFjsb6SF L6QHZdNm+7IzWRtmEIHqtPOU09L38ThKVdtxD8xSdBg/MKW9OkbjXceuDrPY2g9If02/ Oe2D7TRQjW44kYAAHf6m5T/2a/Ai5A2cB1TA3uXEhk28T2VUtJ8ZzOuL5MK3vnWEXfM+ 9baGP50K1WEzPl496wQ4xrk5s2eSo/o+mC76FWdrncHr3rqONs0VXhOKPfPeHYeqSUl9 mGzmQFm2mWKXwTL0FRD14NXJoEZWNdv9mgOn07DOHMHeQQv3bts1TR1jx0ozaQby0kQO Il3A== X-Gm-Message-State: ALoCoQkhuQBgvUYaqMO09Vcd8d8n2Y5T0+8UmA06m4VLDeCPG6g+npvozedAkWikFn4TxnGQXuiV X-Received: by 10.68.226.69 with SMTP id rq5mr28369299pbc.116.1422205623212; Sun, 25 Jan 2015 09:07:03 -0800 (PST) Received: from netflix-mac.bsdimp.com ([50.253.99.174]) by mx.google.com with ESMTPSA id u14sm7616416pbs.85.2015.01.25.09.07.02 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 25 Jan 2015 09:07:02 -0800 (PST) Sender: Warner Losh Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r277643 - in head/sys: arm/arm dev/mem i386/i386 mips/mips sparc64/sparc64 From: Warner Losh In-Reply-To: <20150124155117.GW42409@kib.kiev.ua> Date: Sun, 25 Jan 2015 10:07:00 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201501241251.t0OCpGa8053192@svn.freebsd.org> <1422111397.1038.53.camel@freebsd.org> <20150124154240.GV42409@kib.kiev.ua> <20150124155117.GW42409@kib.kiev.ua> To: Konstantin Belousov X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Ian Lepore X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 17:07:09 -0000 > On Jan 24, 2015, at 8:51 AM, Konstantin Belousov = wrote: >=20 > On Sat, Jan 24, 2015 at 05:42:40PM +0200, Konstantin Belousov wrote: >> On Sat, Jan 24, 2015 at 07:56:37AM -0700, Ian Lepore wrote: >>> On Sat, 2015-01-24 at 12:51 +0000, Konstantin Belousov wrote: >>>> Author: kib >>>> Date: Sat Jan 24 12:51:15 2015 >>>> New Revision: 277643 >>>> URL: https://svnweb.freebsd.org/changeset/base/277643 >>>>=20 >>>> Log: >>>> Remove Giant from /dev/mem and /dev/kmem. It is definitely not = needed >>>> for i386, and from the code inspection, nothing in the >>>> arm/mips/sparc64 implementations depends on it. >>>>=20 >>>=20 >>> I'm not sure I agree with that. On arm the memrw() implementation = uses >>> a single statically-allocated page of kva space into which it maps = each >>> physical page in turn in the main loop. What prevents preemption or >>> multicore access to /dev/mem from trying to use that single page for >>> multiple operations at once? >>=20 >> I see, thank you for noting this. >>=20 >> But, I do not think that Giant is a solution for the problem. = uiomove() >> call accesses userspace, which may fault and cause sleep. If the >> thread sleeps, the Giant is automatically dropped, so there is no = real >> protection. >>=20 >> I think dump exclusive sx around whole memrw() should be enough. >>=20 >> I can revert the commit for now, or I can leave it as is while >> writing the patch with sx and waiting for somebody review. What >> would you prefer ? >>=20 >> P.S. mips uses uiomove_fromphys(), avoiding transient mapping, >> and sparc allocates KVA when needed. >=20 > Like this. So why a sx lock and not a mutex? Warner > diff --git a/sys/arm/arm/mem.c b/sys/arm/arm/mem.c > index 30d4b1d..58b0d25 100644 > --- a/sys/arm/arm/mem.c > +++ b/sys/arm/arm/mem.c > @@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include >=20 > @@ -72,6 +73,9 @@ MALLOC_DEFINE(M_MEMDESC, "memdesc", "memory range = descriptors"); >=20 > struct mem_range_softc mem_range_softc; >=20 > +static struct sx tmppt_lock; > +SX_SYSINIT(tmppt, &tmppt_lock, "mem4map"); > + > /* ARGSUSED */ > int > memrw(struct cdev *dev, struct uio *uio, int flags) > @@ -107,6 +111,7 @@ memrw(struct cdev *dev, struct uio *uio, int = flags) > } > if (!address_valid) > return (EINVAL); > + sx_xlock(&tmppt_lock); > pmap_kenter((vm_offset_t)_tmppt, v); > o =3D (int)uio->uio_offset & PAGE_MASK; > c =3D (u_int)(PAGE_SIZE - ((int)iov->iov_base & = PAGE_MASK)); > @@ -114,6 +119,7 @@ memrw(struct cdev *dev, struct uio *uio, int = flags) > c =3D min(c, (u_int)iov->iov_len); > error =3D uiomove((caddr_t)&_tmppt[o], (int)c, = uio); > pmap_qremove((vm_offset_t)_tmppt, 1); > + sx_xunlock(&tmppt_lock); > continue; > } > else if (dev2unit(dev) =3D=3D CDEV_MINOR_KMEM) { >=20 From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 17:18:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9B25A894; Sun, 25 Jan 2015 17:18:59 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 0B8B4C51; Sun, 25 Jan 2015 17:18:58 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t0PHIpI3093759 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 25 Jan 2015 19:18:52 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t0PHIpI3093759 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t0PHInbv093758; Sun, 25 Jan 2015 19:18:49 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 25 Jan 2015 19:18:49 +0200 From: Konstantin Belousov To: Dag-Erling Sm??rgrav Subject: Re: svn commit: r277694 - head/sys/amd64/conf Message-ID: <20150125171849.GA42409@kib.kiev.ua> References: <201501251202.t0PC2crJ029665@svn.freebsd.org> <86lhkqq5jc.fsf@nine.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86lhkqq5jc.fsf@nine.des.no> User-Agent: Mutt/1.5.23 (2014-03-12) 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.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Sergey Kandaurov , src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 17:18:59 -0000 On Sun, Jan 25, 2015 at 03:49:27PM +0100, Dag-Erling Sm??rgrav wrote: > Sergey Kandaurov writes: > > Dag-Erling Sm??rgrav writes: > > > Log: > > > Remove ISA NICs. Anyone still using these on amd64 can build their > > > own kernel. > > If so, what about i386? (I'd rather not pc98) > > There's a greater chance of ISA devices still being in use on i386 > hardware than on amd64 hardware. I've never even heard of amd64 > hardware with ISA slots, but I guess there is a remote chance that The ISA slots where almost mandatory in the Pentium IV era chipsets, and latest Pentium IV CPUs were capable to run in long mode. For Core2 times, all CPUs were amd64, and ISA slots were on almost all m/b of that time, but not all. > someone may try to use something like an ep(4) PCCARD on a modern laptop > (which is a bad example, since ep(4) is loadable, but you get the idea). > > > What about device isa in DEFAULTS? > > It's still required for atkbdc. Device ISA is required for attachment of many unavoidable platform devices, like legacy atpic, RTC, old timers, and so on. Currently the physical lines used are provided by chipset emulation of the serial LPC bus. So even if there is no physical ISA or LPC bus, ISA as the logical construct is there. Most, if not all, monitoring chips are LPC-connected. On i386, there are even more rudiments, e.g. FPU is attached as the ISA device to still detect IRQ13-style of interrupts mis-reporting. From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 17:20:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 89B969EA; Sun, 25 Jan 2015 17:20:44 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 EB55DCE4; Sun, 25 Jan 2015 17:20:43 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t0PHKaED094515 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 25 Jan 2015 19:20:36 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t0PHKaED094515 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t0PHKat0094514; Sun, 25 Jan 2015 19:20:36 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 25 Jan 2015 19:20:36 +0200 From: Konstantin Belousov To: Warner Losh Subject: Re: svn commit: r277643 - in head/sys: arm/arm dev/mem i386/i386 mips/mips sparc64/sparc64 Message-ID: <20150125172036.GB42409@kib.kiev.ua> References: <201501241251.t0OCpGa8053192@svn.freebsd.org> <1422111397.1038.53.camel@freebsd.org> <20150124154240.GV42409@kib.kiev.ua> <20150124155117.GW42409@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) 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.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Ian Lepore X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 17:20:44 -0000 On Sun, Jan 25, 2015 at 10:07:00AM -0700, Warner Losh wrote: > > > On Jan 24, 2015, at 8:51 AM, Konstantin Belousov wrote: > > > > On Sat, Jan 24, 2015 at 05:42:40PM +0200, Konstantin Belousov wrote: > >> On Sat, Jan 24, 2015 at 07:56:37AM -0700, Ian Lepore wrote: > >>> On Sat, 2015-01-24 at 12:51 +0000, Konstantin Belousov wrote: > >>>> Author: kib > >>>> Date: Sat Jan 24 12:51:15 2015 > >>>> New Revision: 277643 > >>>> URL: https://svnweb.freebsd.org/changeset/base/277643 > >>>> > >>>> Log: > >>>> Remove Giant from /dev/mem and /dev/kmem. It is definitely not needed > >>>> for i386, and from the code inspection, nothing in the > >>>> arm/mips/sparc64 implementations depends on it. > >>>> > >>> > >>> I'm not sure I agree with that. On arm the memrw() implementation uses > >>> a single statically-allocated page of kva space into which it maps each > >>> physical page in turn in the main loop. What prevents preemption or > >>> multicore access to /dev/mem from trying to use that single page for > >>> multiple operations at once? > >> > >> I see, thank you for noting this. > >> > >> But, I do not think that Giant is a solution for the problem. uiomove() > >> call accesses userspace, which may fault and cause sleep. If the > >> thread sleeps, the Giant is automatically dropped, so there is no real > >> protection. > >> > >> I think dump exclusive sx around whole memrw() should be enough. > >> > >> I can revert the commit for now, or I can leave it as is while > >> writing the patch with sx and waiting for somebody review. What > >> would you prefer ? > >> > >> P.S. mips uses uiomove_fromphys(), avoiding transient mapping, > >> and sparc allocates KVA when needed. > > > > Like this. > > So why a sx lock and not a mutex? I explained this above. uiomove() needs to sleep on fault. From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 17:46:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 46C35E41 for ; Sun, 25 Jan 2015 17:46:56 +0000 (UTC) Received: from mail-ie0-f171.google.com (mail-ie0-f171.google.com [209.85.223.171]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 094C9ED1 for ; Sun, 25 Jan 2015 17:46:56 +0000 (UTC) Received: by mail-ie0-f171.google.com with SMTP id tr6so5195417ieb.2 for ; Sun, 25 Jan 2015 09:46:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=fEDmA2rx2AXirJTHS5rSQkRJRZ+pRpA1AkB3PBCR4tA=; b=EB0Nu72D7MfsVDGfrCqVbAi2BqT+dJJETuZ5KHAeoxUy4K/H1HGhfME18Im9vDsvmt Lt7NUKVt60L4kQY74cybodAvr8UgzSwjcflKSSZPZNHCwJswoJhvBiY1W+rn+4YPCmYE IH053QhgD7ujPXou1F7SONuMtlA6PnukxZZL+HsD40rbahqcozAc6cLFmMbVgYqSNFEu frQiUCvkzpcPolNy0wrnq/51vuyrxede3ieWQJVbpGBxkddgBRwxLU6WKNj0b4Ms+OcJ aXHH5svtcqkbS3UD0NfEwTp0OYFl7d6TZ7bP5Qb96QBNJyn1aFAy3CkGRvI0edMa0SVw b1Yw== X-Gm-Message-State: ALoCoQknMbcrx7jf+kwJpiUMjW6uckGLffdBOdOoQqMWTiaj1DNBh5vBdHsrvNF7ctrkC9uFa6rI X-Received: by 10.107.10.28 with SMTP id u28mr14266728ioi.5.1422208014926; Sun, 25 Jan 2015 09:46:54 -0800 (PST) Received: from netflix-mac.bsdimp.com ([50.253.99.174]) by mx.google.com with ESMTPSA id y200sm4592906iod.23.2015.01.25.09.46.53 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 25 Jan 2015 09:46:54 -0800 (PST) Sender: Warner Losh Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r277681 - in head/sys: conf modules From: Warner Losh In-Reply-To: <201501250513.t0P5DGoc033955@svn.freebsd.org> Date: Sun, 25 Jan 2015 10:46:53 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <0CF820AF-D73D-4CE8-BE5B-C4EBE5A9EFDA@bsdimp.com> References: <201501250513.t0P5DGoc033955@svn.freebsd.org> To: Garrett Cooper X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 17:46:56 -0000 The number of MK_foo opts that are intruding into the kernel module = builds is starting to get out of hand. :( Especially since they are duplicative of = the MODULES_OVERRIDE functionality and are very unevenly applied. Warner > On Jan 24, 2015, at 10:13 PM, Garrett Cooper wrote: >=20 > Author: ngie > Date: Sun Jan 25 05:13:15 2015 > New Revision: 277681 > URL: https://svnweb.freebsd.org/changeset/base/277681 >=20 > Log: > Build cuse(4) if MK_CUSE !=3D no >=20 > MFC after: 1 week > Sponsored by: EMC / Isilon Storage Division >=20 > Modified: > head/sys/conf/kern.opts.mk > head/sys/modules/Makefile >=20 > Modified: head/sys/conf/kern.opts.mk > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/conf/kern.opts.mk Sun Jan 25 04:58:41 2015 = (r277680) > +++ head/sys/conf/kern.opts.mk Sun Jan 25 05:13:15 2015 = (r277681) > @@ -27,6 +27,7 @@ __DEFAULT_YES_OPTIONS =3D \ > CCD \ > CDDL \ > CRYPT \ > + CUSE \ > FORMAT_EXTENSIONS \ > INET \ > INET6 \ >=20 > Modified: head/sys/modules/Makefile > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/modules/Makefile Sun Jan 25 04:58:41 2015 = (r277680) > +++ head/sys/modules/Makefile Sun Jan 25 05:13:15 2015 = (r277681) > @@ -86,7 +86,6 @@ SUBDIR=3D \ > ${_ct} \ > ${_ctau} \ > ctl \ > - cuse \ > ${_cxgb} \ > ${_cxgbe} \ > dc \ > @@ -393,6 +392,10 @@ _random=3D random > .endif > .endif >=20 > +.if ${MK_CUSE} !=3D "no" || defined(ALL_MODULES) > +SUBDIR+=3D cuse > +.endif > + > .if (${MK_INET_SUPPORT} !=3D "no" || ${MK_INET6_SUPPORT} !=3D "no") || = \ > defined(ALL_MODULES) > _carp=3D carp >=20 From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 17:55:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 09C34156 for ; Sun, 25 Jan 2015 17:55:53 +0000 (UTC) Received: from mail-ig0-f172.google.com (mail-ig0-f172.google.com [209.85.213.172]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C51B3FAB for ; Sun, 25 Jan 2015 17:55:52 +0000 (UTC) Received: by mail-ig0-f172.google.com with SMTP id l13so5005616iga.5 for ; Sun, 25 Jan 2015 09:55:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=m6vV/8NFcJwyrQg3na66zpYT2XqnfOqJQKUCfDkEm5Y=; b=T+koTvPu6kgjaqd9X0aWNNfKpjNe/Ojhz3ZEajGCCFW3Pe4I83pcYRL7xpqOswnvIZ wE6/Mbj8NneR8WtqzSgsLqi2rjOKiA6xrRDxnm4E1o1BhIDBbNDQAYUkcmFfZSV6+QUE k+v678B1Ly1KeDycqKLFA2oYGG+aoXciI1x86ZincJ3l80vuV4lyd+iv4i7UOz+aEziN whrChGjIzHBlI/82YTPZGFuS7BkcOwfay+I+AmKOydfTrJ0eYENFr0hjgYWHcqpddorH FO64t8XA1nYXbgRuHhIgnxBgMD5tfNfO3qE/wmWnP2MBVu1jyy0gUD1sHiLZbr3kk9gG SFKw== X-Gm-Message-State: ALoCoQmDjbFWqVTUD9Agtqxrg9fOsd9c4O1OdZiJeNqygm63G5dnZwOJKMRX6nHHdtX2xHqW/MyZ X-Received: by 10.42.250.82 with SMTP id mn18mr17139370icb.1.1422208552033; Sun, 25 Jan 2015 09:55:52 -0800 (PST) Received: from netflix-mac.bsdimp.com ([50.253.99.174]) by mx.google.com with ESMTPSA id kz4sm4452774igb.17.2015.01.25.09.55.51 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 25 Jan 2015 09:55:51 -0800 (PST) Sender: Warner Losh Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r277694 - head/sys/amd64/conf From: Warner Losh In-Reply-To: Date: Sun, 25 Jan 2015 10:55:50 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <9E87B3E4-2A0A-4B20-B6D0-F99A846D790F@bsdimp.com> References: <201501251202.t0PC2crJ029665@svn.freebsd.org> To: Sergey Kandaurov X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, =?windows-1252?Q?Dag-Erling_Sm=F8rgrav?= X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 17:55:53 -0000 > On Jan 25, 2015, at 5:43 AM, Sergey Kandaurov = wrote: >=20 > On 25 January 2015 at 15:02, Dag-Erling Sm=F8rgrav = wrote: >> Author: des >> Date: Sun Jan 25 12:02:38 2015 >> New Revision: 277694 >> URL: https://svnweb.freebsd.org/changeset/base/277694 >>=20 >> Log: >> Remove ISA NICs. Anyone still using these on amd64 can build their >> own kernel. This does take out PC Cards as well, but all these devices are loadable modules. I would like to request, however, that we hold off on too much more GENERIC pruning until my only add what=92s needed in MINIMAL and load the rest automatically work is declared to have failed. >> Modified: >> head/sys/amd64/conf/GENERIC >>=20 >=20 > If so, what about i386? (I'd rather not pc98) pc98 shouldn=92t be messed with: those systems have the hardware they have, and eliminating CBUS devices there would be far too disruptive. i386 we might be able to get away with it, but given the wide range of i386 hardware we still run on, this may be a bit too disruptive. > What about device isa in DEFAULTS? isa can never be removed from DEFAULTS. It is not the ISA expansion bus support, but rather the default system bus support. As such, it can never be removed without significant work that=92s mostly just rearranging the deck chairs... Warner >> Modified: head/sys/amd64/conf/GENERIC >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/amd64/conf/GENERIC Sun Jan 25 11:57:18 2015 = (r277693) >> +++ head/sys/amd64/conf/GENERIC Sun Jan 25 12:02:38 2015 = (r277694) >> @@ -260,16 +260,6 @@ device vr # VIA = Rhine, Rhine II >> device wb # Winbond W89C840F >> device xl # 3Com 3c90x (``Boomerang'', = ``Cyclone'') >>=20 >> -# ISA Ethernet NICs. pccard NICs included. >> -device cs # Crystal Semiconductor = CS89x0 NIC >> -# 'device ed' requires 'device miibus' >> -device ed # NE[12]000, SMC Ultra, = 3c503, DS8390 cards >> -device ex # Intel EtherExpress Pro/10 = and Pro/10+ >> -device ep # Etherlink III based cards >> -device fe # Fujitsu MB8696x based cards >> -device sn # SMC's 9000 series of = Ethernet chips >> -device xe # Xircom pccard Ethernet >> - >> # Wireless NIC cards >> device wlan # 802.11 support >> options IEEE80211_DEBUG # enable debug msgs >>=20 >=20 > --=20 > wbr, > pluknet >=20 From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 17:58:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B97A32FB for ; Sun, 25 Jan 2015 17:58:35 +0000 (UTC) Received: from mail-ie0-f175.google.com (mail-ie0-f175.google.com [209.85.223.175]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7D37EFCC for ; Sun, 25 Jan 2015 17:58:35 +0000 (UTC) Received: by mail-ie0-f175.google.com with SMTP id ar1so5201963iec.6 for ; Sun, 25 Jan 2015 09:58:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=DKvF05B4wdZzVP0Q9qeu+vOsboO36hxd06CN9MKUeqo=; b=j+HIXXVb6AyeHkl7OpLkIWL8twGnjSSl6thagYEFVOuYH8AGUIvDAeBCmNzCZocMac 5hwNOAkCLvFF9Ol6DjsyZebIENq0LmyxGvwSpy5oRdS+bVx+/UrcouA2v94mai8Hdku+ PDVZDzHhowz8lSw92/uQWZJEgoYg+u+IT2dCiPIFG/Vd+Yd2m9FdUJS7OOzPyGGHpQXD 7BcAQJsfmBss6CNmyBMyzfwCOSsmKw66j29MawE3A3YPbkiYyZYnGtsRv26FQUSqyO/8 uwmS7qQPOlTfENQwRjmv2CwjEAndfueqEnUH0iAKx+PV9OestGiZn4emP4rHcsGEAsJU hZPA== X-Gm-Message-State: ALoCoQm4pz833HIs9y2EUbe74rra1TaQBj1OB6trQBN5Ba2UQUHNoeKr1K2BIdPPqPxy6GyLFrU1 X-Received: by 10.50.66.131 with SMTP id f3mr12669749igt.7.1422208709165; Sun, 25 Jan 2015 09:58:29 -0800 (PST) Received: from netflix-mac.bsdimp.com ([50.253.99.174]) by mx.google.com with ESMTPSA id m10sm4602717ioi.28.2015.01.25.09.58.28 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 25 Jan 2015 09:58:28 -0800 (PST) Sender: Warner Losh Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r277694 - head/sys/amd64/conf From: Warner Losh In-Reply-To: <6366BFE6-1A9F-433C-99F5-65B9D905AEF5@gmail.com> Date: Sun, 25 Jan 2015 10:58:27 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201501251202.t0PC2crJ029665@svn.freebsd.org> <6366BFE6-1A9F-433C-99F5-65B9D905AEF5@gmail.com> To: Garrett Cooper X-Mailer: Apple Mail (2.1993) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Sergey Kandaurov , "src-committers@freebsd.org" , =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 17:58:35 -0000 > On Jan 25, 2015, at 7:54 AM, Garrett Cooper = wrote: >=20 >=20 >> On Jan 25, 2015, at 04:43, Sergey Kandaurov = wrote: >>=20 >>> On 25 January 2015 at 15:02, Dag-Erling Sm=C3=B8rgrav = wrote: >>> Author: des >>> Date: Sun Jan 25 12:02:38 2015 >>> New Revision: 277694 >>> URL: https://svnweb.freebsd.org/changeset/base/277694 >>>=20 >>> Log: >>> Remove ISA NICs. Anyone still using these on amd64 can build their >>> own kernel. >>>=20 >>> Modified: >>> head/sys/amd64/conf/GENERIC >>=20 >> If so, what about i386? (I'd rather not pc98) >> What about device isa in DEFAULTS? >=20 > isa is still needed in some scenarios. I just don't remember the full = details offhand (something about internal buses iirc... And IPMI for = starters...) "isa=E2=80=9D in this context should be read as =E2=80=9Cmainbus=E2=80=9D = not as =E2=80=9CISA slots=E2=80=9D. You can=E2=80=99t remove it without some significant work, and even then the interface = changes to long established interfaces isn=E2=80=99t worth the pain. Warner From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 19:21:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9FB48E5A; Sun, 25 Jan 2015 19:21:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8ACA6C7A; Sun, 25 Jan 2015 19:21:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0PJLcpo036626; Sun, 25 Jan 2015 19:21:38 GMT (envelope-from matthew@FreeBSD.org) Received: (from matthew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0PJLc0Q036625; Sun, 25 Jan 2015 19:21:38 GMT (envelope-from matthew@FreeBSD.org) Message-Id: <201501251921.t0PJLc0Q036625@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: matthew set sender to matthew@FreeBSD.org using -f From: Matthew Seaman Date: Sun, 25 Jan 2015 19:21:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r277708 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 19:21:38 -0000 Author: matthew (ports committer) Date: Sun Jan 25 19:21:37 2015 New Revision: 277708 URL: https://svnweb.freebsd.org/changeset/base/277708 Log: Take in mdf's commit bit for safe keeping, at his own request. Approved by: core (implicit) Modified: svnadmin/conf/access Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Sun Jan 25 16:35:03 2015 (r277707) +++ svnadmin/conf/access Sun Jan 25 19:21:37 2015 (r277708) @@ -148,7 +148,6 @@ mav maxim mckay mckusick -mdf melifaro mjg mm From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 19:21:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C181DF7C; Sun, 25 Jan 2015 19:21:44 +0000 (UTC) Received: from vps.rulingia.com (vps.rulingia.com [103.243.244.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps.rulingia.com", Issuer "CAcert Class 3 Root" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 579B4C7D; Sun, 25 Jan 2015 19:21:43 +0000 (UTC) Received: from server.rulingia.com (c220-239-242-83.belrs5.nsw.optusnet.com.au [220.239.242.83]) by vps.rulingia.com (8.14.9/8.14.9) with ESMTP id t0PJLZUq052185 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 26 Jan 2015 06:21:40 +1100 (AEDT) (envelope-from peter@rulingia.com) X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.14.9/8.14.9) with ESMTP id t0PJLTVt011303 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 26 Jan 2015 06:21:29 +1100 (AEDT) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.14.9/8.14.9/Submit) id t0PJLSxT011302; Mon, 26 Jan 2015 06:21:28 +1100 (AEDT) (envelope-from peter) Date: Mon, 26 Jan 2015 06:21:28 +1100 From: Peter Jeremy To: Slawa Olhovchenkov Subject: Re: svn commit: r277652 - in head/usr.sbin/pw: . tests Message-ID: <20150125192128.GD23253@server.rulingia.com> References: <201501241913.t0OJD4xT039188@svn.freebsd.org> <20150125155254.V1007@besplex.bde.org> <20150125142148.GA76051@zxy.spb.ru> <20150126014336.P2572@besplex.bde.org> <20150125153639.GC76051@zxy.spb.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="T7mxYSe680VjQnyC" Content-Disposition: inline In-Reply-To: <20150125153639.GC76051@zxy.spb.ru> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, Baptiste Daroussin , src-committers@freebsd.org, svn-src-all@freebsd.org, Bruce Evans X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 19:21:45 -0000 --T7mxYSe680VjQnyC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2015-Jan-25 18:36:40 +0300, Slawa Olhovchenkov wrote: >On Mon, Jan 26, 2015 at 02:31:05AM +1100, Bruce Evans wrote: > >> On Sun, 25 Jan 2015, Slawa Olhovchenkov wrote: >> > This is not full true for ZFS case. >> > On ZFS nobody is 2^32-2. Can you please provide a reference to this in the code. I can't find anything in the ZFS code to suggest either '-2' or 4294967294 is used as a special GID or UID. The only references I can find are to UID_NOBODY and GID_NOBODY - both of which are defined as 65534 in . >ls -l /usr/ports/packages32/lang >total 2 >lrwxr-xr-x 1 4294967294 wheel 33 Mar 17 2012 perl-threaded-5.12.4_4.tb= z -> ../All/perl-threaded-5.12.4_4.tbz >lrwxr-xr-x 1 4294967294 wheel 27 Mar 17 2012 python27-2.7.2_4.tbz -> .= =2E/All/python27-2.7.2_4.tbz >lrwxr-xr-x 1 4294967294 wheel 21 Mar 17 2012 tcl-8.5.11.tbz -> ../All/= tcl-8.5.11.tbz >lrwxr-xr-x 1 4294967294 wheel 29 Mar 17 2012 tcl-modules-8.5.11.tbz ->= ../All/tcl-modules-8.5.11.tbz All this means is that you have some files with that uid. It's not clear how they were created. --=20 Peter Jeremy --T7mxYSe680VjQnyC Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJUxUI4XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRFRUIyOTg2QzMwNjcxRTc0RTY1QzIyN0Ux NkE1OTdBMEU0QTIwQjM0AAoJEBall6Dkogs0EJ4QAI0W2IgOoojDP/L1qLGjZtI4 i6ZE29JBiLVPIxb++vJzc6l4ngi6ufTeWPhUJI3QKP6yTCegWNs8DnB4Ifd9KtPz 2Of0Iy3alFIfmrjDtmNL9sU6sVVg5QYBE27S5WjpM3FU0HhlCtYnrp8TCvbiZX4H 7qywXp9ZOEzVJH+/OlF3sToP0XBOIilZfU/svIbyuQBajY8YrcD3atdX7uXhULZ8 Z0hwcNSJgvRGgRzjZGUqHSVRdl6E4r4fQZcvYZZNFPwf+tjq4v6JCQT5t/Up9agr NOebpy/8/G+5tFd5ONDQtb1nFZVaMt5SSCts/nwpKNUTQHBiIe4l3Xqt7CuuRMV0 CbqU7rLazXzD7nlNU3leJPWkDUsavRt37s7M1KA9+C/UyLlCpreM88qMYRKJ3JLa FZHUBrhdi3KDtcdy8TZ50LKzuVpZWmjIBSTkFEI3612cLNICwi71htK21sxKH3Rk H71uLzZLkVzC2os3jpSxS6sayzpumd53zI8ufV9O0agzwxYDn6cS1ANDDAOIBJU+ Jrncj7wnQ7w/seUX6BMmDbi+8d0rstrhcINliinCH+zBvFFdqwjYYc4uCotaKsCr j4NFxzG8//NFkjHJyd5m7Gkdq0R28UiGyPm11ohhQyKkopcpU9Wkje+gkIF44vJ5 ruSG3YMwNIcF5dXoYJBz =IuZB -----END PGP SIGNATURE----- --T7mxYSe680VjQnyC-- From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 19:29:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7CBDB2F2; Sun, 25 Jan 2015 19:29:37 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3650DCE1; Sun, 25 Jan 2015 19:29:37 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YFSsA-000PBt-KJ; Sun, 25 Jan 2015 22:29:26 +0300 Date: Sun, 25 Jan 2015 22:29:26 +0300 From: Slawa Olhovchenkov To: Peter Jeremy Subject: Re: svn commit: r277652 - in head/usr.sbin/pw: . tests Message-ID: <20150125192926.GT3698@zxy.spb.ru> References: <201501241913.t0OJD4xT039188@svn.freebsd.org> <20150125155254.V1007@besplex.bde.org> <20150125142148.GA76051@zxy.spb.ru> <20150126014336.P2572@besplex.bde.org> <20150125153639.GC76051@zxy.spb.ru> <20150125192128.GD23253@server.rulingia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150125192128.GD23253@server.rulingia.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-head@freebsd.org, Baptiste Daroussin , src-committers@freebsd.org, svn-src-all@freebsd.org, Bruce Evans X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 19:29:37 -0000 On Mon, Jan 26, 2015 at 06:21:28AM +1100, Peter Jeremy wrote: > On 2015-Jan-25 18:36:40 +0300, Slawa Olhovchenkov wrote: > >On Mon, Jan 26, 2015 at 02:31:05AM +1100, Bruce Evans wrote: > > > >> On Sun, 25 Jan 2015, Slawa Olhovchenkov wrote: > >> > This is not full true for ZFS case. > >> > On ZFS nobody is 2^32-2. > > Can you please provide a reference to this in the code. I can't find > anything in the ZFS code to suggest either '-2' or 4294967294 is used > as a special GID or UID. The only references I can find are to > UID_NOBODY and GID_NOBODY - both of which are defined as 65534 in > . I think this is result of convert (signed short) to (signed int). > >ls -l /usr/ports/packages32/lang > >total 2 > >lrwxr-xr-x 1 4294967294 wheel 33 Mar 17 2012 perl-threaded-5.12.4_4.tbz -> ../All/perl-threaded-5.12.4_4.tbz > >lrwxr-xr-x 1 4294967294 wheel 27 Mar 17 2012 python27-2.7.2_4.tbz -> ../All/python27-2.7.2_4.tbz > >lrwxr-xr-x 1 4294967294 wheel 21 Mar 17 2012 tcl-8.5.11.tbz -> ../All/tcl-8.5.11.tbz > >lrwxr-xr-x 1 4294967294 wheel 29 Mar 17 2012 tcl-modules-8.5.11.tbz -> ../All/tcl-modules-8.5.11.tbz > > All this means is that you have some files with that uid. It's not > clear how they were created. nfs3 export ZFS dataset to VM. VM do write as 'root'. root maped to nobody. When this is created -- host 9.1, VM -- 6.x. From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 19:45:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 497D0605; Sun, 25 Jan 2015 19:45:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B61BE9E; Sun, 25 Jan 2015 19:45:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0PJjieQ046432; Sun, 25 Jan 2015 19:45:44 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0PJjikt046431; Sun, 25 Jan 2015 19:45:44 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201501251945.t0PJjikt046431@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sun, 25 Jan 2015 19:45:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277709 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 19:45:45 -0000 Author: jhb Date: Sun Jan 25 19:45:44 2015 New Revision: 277709 URL: https://svnweb.freebsd.org/changeset/base/277709 Log: Use an sbuf to generate the output of the net.inet.tcp.hostcache.list sysctl to avoid a possible buffer overflow if the cache grows while the text is being generated. PR: 172675 MFC after: 2 weeks Modified: head/sys/netinet/tcp_hostcache.c Modified: head/sys/netinet/tcp_hostcache.c ============================================================================== --- head/sys/netinet/tcp_hostcache.c Sun Jan 25 19:21:37 2015 (r277708) +++ head/sys/netinet/tcp_hostcache.c Sun Jan 25 19:45:44 2015 (r277709) @@ -73,6 +73,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -595,30 +596,27 @@ tcp_hc_update(struct in_conninfo *inc, s static int sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) { - int bufsize; int linesize = 128; - char *p, *buf; - int len, i, error; + struct sbuf sb; + int i, error; struct hc_metrics *hc_entry; #ifdef INET6 char ip6buf[INET6_ADDRSTRLEN]; #endif - bufsize = linesize * (V_tcp_hostcache.cache_count + 1); + sbuf_new(&sb, NULL, linesize * (V_tcp_hostcache.cache_count + 1), + SBUF_FIXEDLEN); - p = buf = (char *)malloc(bufsize, M_TEMP, M_WAITOK|M_ZERO); - - len = snprintf(p, linesize, - "\nIP address MTU SSTRESH RTT RTTVAR BANDWIDTH " + sbuf_printf(&sb, + "\nIP address MTU SSTRESH RTT RTTVAR BANDWIDTH " " CWND SENDPIPE RECVPIPE HITS UPD EXP\n"); - p += len; #define msec(u) (((u) + 500) / 1000) for (i = 0; i < V_tcp_hostcache.hashsize; i++) { THC_LOCK(&V_tcp_hostcache.hashbase[i].hch_mtx); TAILQ_FOREACH(hc_entry, &V_tcp_hostcache.hashbase[i].hch_bucket, rmx_q) { - len = snprintf(p, linesize, + sbuf_printf(&sb, "%-15s %5lu %8lu %6lums %6lums %9lu %8lu %8lu %8lu " "%4lu %4lu %4i\n", hc_entry->ip4.s_addr ? inet_ntoa(hc_entry->ip4) : @@ -640,13 +638,13 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) hc_entry->rmx_hits, hc_entry->rmx_updates, hc_entry->rmx_expire); - p += len; } THC_UNLOCK(&V_tcp_hostcache.hashbase[i].hch_mtx); } #undef msec - error = SYSCTL_OUT(req, buf, p - buf); - free(buf, M_TEMP); + sbuf_finish(&sb); + error = SYSCTL_OUT(req, sbuf_data(&sb), sbuf_len(&sb)); + sbuf_delete(&sb); return(error); } From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 19:53:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3E446922; Sun, 25 Jan 2015 19:53:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A91CF8A; Sun, 25 Jan 2015 19:53:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0PJrACN050970; Sun, 25 Jan 2015 19:53:10 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0PJrAOe050969; Sun, 25 Jan 2015 19:53:10 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201501251953.t0PJrAOe050969@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sun, 25 Jan 2015 19:53:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277710 - head/sys/dev/pci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 19:53:10 -0000 Author: jhb Date: Sun Jan 25 19:53:09 2015 New Revision: 277710 URL: https://svnweb.freebsd.org/changeset/base/277710 Log: Pass a valid Dx state variable to PCIB_POWER_FOR_SLEEP() in pcib_resume() instead of NULL. Submitted by: dchagin MFC after: 2 weeks Modified: head/sys/dev/pci/pci_pci.c Modified: head/sys/dev/pci/pci_pci.c ============================================================================== --- head/sys/dev/pci/pci_pci.c Sun Jan 25 19:45:44 2015 (r277709) +++ head/sys/dev/pci/pci_pci.c Sun Jan 25 19:53:09 2015 (r277710) @@ -1114,11 +1114,13 @@ int pcib_resume(device_t dev) { device_t pcib; + int dstate; if (pci_do_power_resume) { pcib = device_get_parent(device_get_parent(dev)); - if (PCIB_POWER_FOR_SLEEP(pcib, dev, NULL) == 0) - pci_set_powerstate(dev, PCI_POWERSTATE_D0); + dstate = PCI_POWERSTATE_D0; + if (PCIB_POWER_FOR_SLEEP(pcib, dev, &dstate) == 0) + pci_set_powerstate(dev, dstate); } pcib_cfg_restore(device_get_softc(dev)); return (bus_generic_resume(dev)); From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 19:56:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 68879A8C; Sun, 25 Jan 2015 19:56:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 552F6FAF; Sun, 25 Jan 2015 19:56:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0PJukCj051531; Sun, 25 Jan 2015 19:56:46 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0PJukk6051530; Sun, 25 Jan 2015 19:56:46 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201501251956.t0PJukk6051530@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sun, 25 Jan 2015 19:56:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277712 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 19:56:46 -0000 Author: jhb Date: Sun Jan 25 19:56:45 2015 New Revision: 277712 URL: https://svnweb.freebsd.org/changeset/base/277712 Log: Change the default VFS timestamp precision from seconds to microseconds. Discussed on: arch@ MFC after: 2 weeks Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sun Jan 25 19:56:43 2015 (r277711) +++ head/sys/kern/vfs_subr.c Sun Jan 25 19:56:45 2015 (r277712) @@ -632,7 +632,7 @@ vfs_getnewfsid(struct mount *mp) */ enum { TSP_SEC, TSP_HZ, TSP_USEC, TSP_NSEC }; -static int timestamp_precision = TSP_SEC; +static int timestamp_precision = TSP_USEC; SYSCTL_INT(_vfs, OID_AUTO, timestamp_precision, CTLFLAG_RW, ×tamp_precision, 0, "File timestamp precision (0: seconds, " "1: sec + ns accurate to 1/HZ, 2: sec + ns truncated to ms, " From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 20:16:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 64A21F7A; Sun, 25 Jan 2015 20:16:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 370F821F; Sun, 25 Jan 2015 20:16:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0PKGktN061123; Sun, 25 Jan 2015 20:16:46 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0PKGjgd061122; Sun, 25 Jan 2015 20:16:45 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201501252016.t0PKGjgd061122@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sun, 25 Jan 2015 20:16:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277713 - head/sys/amd64/amd64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 20:16:46 -0000 Author: jhb Date: Sun Jan 25 20:16:45 2015 New Revision: 277713 URL: https://svnweb.freebsd.org/changeset/base/277713 Log: If the boot-time memory test is enabled, output a dot ('.') for each GB of RAM tested so people watching the console can see that the machine is making progress and not hung. PR: 196650 Submitted by: Ravi Pokala Suggestions from: Eric van Gyzen MFC after: 2 weeks Modified: head/sys/amd64/amd64/machdep.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Sun Jan 25 19:56:45 2015 (r277712) +++ head/sys/amd64/amd64/machdep.c Sun Jan 25 20:16:45 2015 (r277713) @@ -1557,6 +1557,8 @@ native_parse_memmap(caddr_t kmdp, vm_pad } } +#define PAGES_PER_GB (1024 * 1024 * 1024 / PAGE_SIZE) + /* * Populate the (physmap) array with base/bound pairs describing the * available physical memory in the system, then test this memory and @@ -1575,6 +1577,7 @@ getmemsize(caddr_t kmdp, u_int64_t first u_long physmem_start, physmem_tunable, memtest; pt_entry_t *pte; quad_t dcons_addr, dcons_size; + int page_counter; bzero(physmap, sizeof(physmap)); basemem = 0; @@ -1678,6 +1681,9 @@ getmemsize(caddr_t kmdp, u_int64_t first * physmap is in bytes, so when converting to page boundaries, * round up the start address and round down the end address. */ + page_counter = 0; + if (memtest != 0) + printf("Testing system memory"); for (i = 0; i <= physmap_idx; i += 2) { vm_paddr_t end; @@ -1708,6 +1714,14 @@ getmemsize(caddr_t kmdp, u_int64_t first goto skip_memtest; /* + * Print a "." every GB to show we're making + * progress. + */ + page_counter++; + if ((page_counter % PAGES_PER_GB) == 0) + printf("."); + + /* * map page into kernel: valid, read/write,non-cacheable */ *pte = pa | PG_V | PG_RW | PG_NC_PWT | PG_NC_PCD; @@ -1794,6 +1808,8 @@ do_next: } *pte = 0; invltlb(); + if (memtest != 0) + printf("\n"); /* * XXX From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 20:37:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AC7C94EC; Sun, 25 Jan 2015 20:37:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9865D623; Sun, 25 Jan 2015 20:37:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0PKbXNp070664; Sun, 25 Jan 2015 20:37:33 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0PKbXNW070662; Sun, 25 Jan 2015 20:37:33 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201501252037.t0PKbXNW070662@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sun, 25 Jan 2015 20:37:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277714 - head/sbin/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 20:37:33 -0000 Author: jhb Date: Sun Jan 25 20:37:32 2015 New Revision: 277714 URL: https://svnweb.freebsd.org/changeset/base/277714 Log: natd(8) will work with an unconfigured interface and effectively not do anything until the interface is assigned an address. This fixes ipfw_nat to do the same by using an IP of INADDR_ANY instead of aborting the nat setup if the requested interface is not yet configured. Differential Revision: https://reviews.freebsd.org/D1539 Reviewed by: melifaro, glebius, gnn MFC after: 1 week Modified: head/sbin/ipfw/nat.c Modified: head/sbin/ipfw/nat.c ============================================================================== --- head/sbin/ipfw/nat.c Sun Jan 25 20:16:45 2015 (r277713) +++ head/sbin/ipfw/nat.c Sun Jan 25 20:37:32 2015 (r277714) @@ -163,9 +163,9 @@ set_addr_dynamic(const char *ifn, struct } } if (sin == NULL) - errx(1, "%s: cannot get interface address", ifn); - - n->ip = sin->sin_addr; + n->ip.s_addr = htonl(INADDR_ANY); + else + n->ip = sin->sin_addr; strncpy(n->if_name, ifn, IF_NAMESIZE); free(buf); From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 20:45:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 38F0C695; Sun, 25 Jan 2015 20:45:35 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1184E74E; Sun, 25 Jan 2015 20:45:35 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 1771BB9B1; Sun, 25 Jan 2015 15:45:34 -0500 (EST) From: John Baldwin To: src-committers@freebsd.org Subject: Re: svn commit: r277709 - head/sys/netinet Date: Sun, 25 Jan 2015 14:49:42 -0500 Message-ID: <4934698.3R1IGXPu9N@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <201501251945.t0PJjikt046431@svn.freebsd.org> References: <201501251945.t0PJjikt046431@svn.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Sun, 25 Jan 2015 15:45:34 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 20:45:35 -0000 On Sunday, January 25, 2015 07:45:44 PM John Baldwin wrote: > Author: jhb > Date: Sun Jan 25 19:45:44 2015 > New Revision: 277709 > URL: https://svnweb.freebsd.org/changeset/base/277709 > > Log: > Use an sbuf to generate the output of the net.inet.tcp.hostcache.list > sysctl to avoid a possible buffer overflow if the cache grows while the > text is being generated. > > PR: 172675 > MFC after: 2 weeks There is an additional bug still in that the 'cache_count' variable is not protected (it is modified while any one of a number of per-hashbucket locks are held). It should probably be changed to be updated via atomic ops, but this fix should prevent memory corruption and/or panics due to overflowing the buffer allocated for this. Of course, I really dislike sysctl nodes that output raw text. I would much rather this output a structure and rely on userland code to convert it to human-readable text. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 20:45:34 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 72796694; Sun, 25 Jan 2015 20:45:34 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4AD9F74D; Sun, 25 Jan 2015 20:45:34 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 833D7B913; Sun, 25 Jan 2015 15:45:32 -0500 (EST) From: John Baldwin To: src-committers@freebsd.org Subject: Re: svn commit: r277712 - head/sys/kern Date: Sun, 25 Jan 2015 15:45:26 -0500 Message-ID: <8702573.1O4PxxNzn4@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <201501251956.t0PJukk6051530@svn.freebsd.org> References: <201501251956.t0PJukk6051530@svn.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Sun, 25 Jan 2015 15:45:32 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 20:45:34 -0000 On Sunday, January 25, 2015 07:56:46 PM John Baldwin wrote: > Author: jhb > Date: Sun Jan 25 19:56:45 2015 > New Revision: 277712 > URL: https://svnweb.freebsd.org/changeset/base/277712 > > Log: > Change the default VFS timestamp precision from seconds to microseconds. > > Discussed on: arch@ > MFC after: 2 weeks I want to let this settle in HEAD for a week or so, but given that Jilles committed the fixes for mv/cp, I'd like to change HEAD to use nanoseconds ultimately. However, I wanted to test microseconds first so that that can be merged to stable. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 20:51:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F36C7937; Sun, 25 Jan 2015 20:51:17 +0000 (UTC) Received: from vps.rulingia.com (vps.rulingia.com [103.243.244.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps.rulingia.com", Issuer "CAcert Class 3 Root" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 877CA7F6; Sun, 25 Jan 2015 20:51:16 +0000 (UTC) Received: from server.rulingia.com (c220-239-242-83.belrs5.nsw.optusnet.com.au [220.239.242.83]) by vps.rulingia.com (8.14.9/8.14.9) with ESMTP id t0PKp6XF052458 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 26 Jan 2015 07:51:12 +1100 (AEDT) (envelope-from peter@rulingia.com) X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.14.9/8.14.9) with ESMTP id t0PKp0OK012034 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 26 Jan 2015 07:51:00 +1100 (AEDT) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.14.9/8.14.9/Submit) id t0PKoxBh012033; Mon, 26 Jan 2015 07:50:59 +1100 (AEDT) (envelope-from peter) Date: Mon, 26 Jan 2015 07:50:59 +1100 From: Peter Jeremy To: Slawa Olhovchenkov Subject: Re: svn commit: r277652 - in head/usr.sbin/pw: . tests Message-ID: <20150125205059.GE23253@server.rulingia.com> References: <201501241913.t0OJD4xT039188@svn.freebsd.org> <20150125155254.V1007@besplex.bde.org> <20150125142148.GA76051@zxy.spb.ru> <20150126014336.P2572@besplex.bde.org> <20150125153639.GC76051@zxy.spb.ru> <20150125192128.GD23253@server.rulingia.com> <20150125192926.GT3698@zxy.spb.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="CGDBiGfvSTbxKZlW" Content-Disposition: inline In-Reply-To: <20150125192926.GT3698@zxy.spb.ru> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, Baptiste Daroussin , src-committers@freebsd.org, svn-src-all@freebsd.org, Bruce Evans X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 20:51:18 -0000 --CGDBiGfvSTbxKZlW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2015-Jan-25 22:29:26 +0300, Slawa Olhovchenkov wrote: >I think this is result of convert (signed short) to (signed int). > >> >ls -l /usr/ports/packages32/lang >> >total 2 >> >lrwxr-xr-x 1 4294967294 wheel 33 Mar 17 2012 perl-threaded-5.12.4_4= =2Etbz -> ../All/perl-threaded-5.12.4_4.tbz >> >lrwxr-xr-x 1 4294967294 wheel 27 Mar 17 2012 python27-2.7.2_4.tbz -= > ../All/python27-2.7.2_4.tbz >> >lrwxr-xr-x 1 4294967294 wheel 21 Mar 17 2012 tcl-8.5.11.tbz -> ../A= ll/tcl-8.5.11.tbz >> >lrwxr-xr-x 1 4294967294 wheel 29 Mar 17 2012 tcl-modules-8.5.11.tbz= -> ../All/tcl-modules-8.5.11.tbz >>=20 >> All this means is that you have some files with that uid. It's not >> clear how they were created. > >nfs3 export ZFS dataset to VM. VM do write as 'root'. root maped to >nobody. When this is created -- host 9.1, VM -- 6.x. I can reproduce this with FreeBSD 10/r276177 client and server running NFSv3 using the "new" NFS code. It appears to be due to the (broken) initialisation of def_anon in mountd(8) with '(uid_t)-2' - as noted by bde. It's nothing to do with ZFS. --=20 Peter Jeremy --CGDBiGfvSTbxKZlW Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJUxVczXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRFRUIyOTg2QzMwNjcxRTc0RTY1QzIyN0Ux NkE1OTdBMEU0QTIwQjM0AAoJEBall6Dkogs0oSEP/3ngNWbIi3t5vTIYJK4D1eGS h6KIljrk3AEY4LlphXZdVaYEFaiPrO8Wy9SRhb2aJxNBgZKkugYykb7NH2dNZrQg FILCjm9MRThrPF7eYAV+QPEXaVMQlfaDBbX7MuWjj/lvvJOv2Hzg2BW0bIzPg/Jk SyLPHCFpOBkIVtqzfhF5JG4DJhHoTSyci024Pe/ouIyLzTH5dGdpODsJmiwepzex sTyjCrq+52U3PKNEMbKPfrM3l+4Nk0NTepNGCQpYvm8Y3Ckodv3CpBep79keNs8B PgTvpKCEJ8xqj4FYS9ms7vSlohZOsMdZZgOOgp3LdfYjfnMJQh64byq2oGyBHz7J v5wdnM6avrDvORYSTvPAx3bzw5sgZ0Rl3RZzmDIf2x0v9qwCOJR+GxmoLsSh+CRs pndL9ClY5rEApAuWbdellZIsoPAJCspXC5fR56XopF3N3HNA32/p64dtfvqcIqJ5 67m3DcK6NOk/+sap1ku6wJoodImQ2p7ylHY/P/PnqTZ3YQkKSlPj8A50s8J1ws34 Lob0YCaWD2Fv8gs12kQgt4tnV0lSxT/JpTg+EX5e3XyNDPN8BA+TsEdCO09yLPbA 7dBnGXRRnLwCxBqTCkeI/DYz+jJPuGBtjejRipGbcNbHM0DKMJbppQpRHQI1ahfM MY8iiXyw+2bwiwg0+DG4 =aQQu -----END PGP SIGNATURE----- --CGDBiGfvSTbxKZlW-- From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 21:00:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB415B27; Sun, 25 Jan 2015 21:00:31 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 95948853; Sun, 25 Jan 2015 21:00:31 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YFUI6-0000xl-RY; Mon, 26 Jan 2015 00:00:18 +0300 Date: Mon, 26 Jan 2015 00:00:18 +0300 From: Slawa Olhovchenkov To: Peter Jeremy Subject: Re: svn commit: r277652 - in head/usr.sbin/pw: . tests Message-ID: <20150125210018.GV3698@zxy.spb.ru> References: <201501241913.t0OJD4xT039188@svn.freebsd.org> <20150125155254.V1007@besplex.bde.org> <20150125142148.GA76051@zxy.spb.ru> <20150126014336.P2572@besplex.bde.org> <20150125153639.GC76051@zxy.spb.ru> <20150125192128.GD23253@server.rulingia.com> <20150125192926.GT3698@zxy.spb.ru> <20150125205059.GE23253@server.rulingia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150125205059.GE23253@server.rulingia.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-head@freebsd.org, Baptiste Daroussin , src-committers@freebsd.org, svn-src-all@freebsd.org, Bruce Evans X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 21:00:32 -0000 On Mon, Jan 26, 2015 at 07:50:59AM +1100, Peter Jeremy wrote: > On 2015-Jan-25 22:29:26 +0300, Slawa Olhovchenkov wrote: > >I think this is result of convert (signed short) to (signed int). > > > >> >ls -l /usr/ports/packages32/lang > >> >total 2 > >> >lrwxr-xr-x 1 4294967294 wheel 33 Mar 17 2012 perl-threaded-5.12.4_4.tbz -> ../All/perl-threaded-5.12.4_4.tbz > >> >lrwxr-xr-x 1 4294967294 wheel 27 Mar 17 2012 python27-2.7.2_4.tbz -> ../All/python27-2.7.2_4.tbz > >> >lrwxr-xr-x 1 4294967294 wheel 21 Mar 17 2012 tcl-8.5.11.tbz -> ../All/tcl-8.5.11.tbz > >> >lrwxr-xr-x 1 4294967294 wheel 29 Mar 17 2012 tcl-modules-8.5.11.tbz -> ../All/tcl-modules-8.5.11.tbz > >> > >> All this means is that you have some files with that uid. It's not > >> clear how they were created. > > > >nfs3 export ZFS dataset to VM. VM do write as 'root'. root maped to > >nobody. When this is created -- host 9.1, VM -- 6.x. > > I can reproduce this with FreeBSD 10/r276177 client and server running > NFSv3 using the "new" NFS code. It appears to be due to the (broken) > initialisation of def_anon in mountd(8) with '(uid_t)-2' - as noted by > bde. It's nothing to do with ZFS. I don't talk 'this is ZFS bug'. I don't talk 'this is bug'. I only talk 'nfs over ZFS produce uid 2^32-2 as nobody' as opposite to Bruce talks. Also, I am ask solaris admin to test this setup -- solaris also produce 4294967294 as nobody. I am don't know what correctly way. I am just describe actual behaviour. From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 22:08:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0EBFC3D0; Sun, 25 Jan 2015 22:08:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EDF18DFD; Sun, 25 Jan 2015 22:08:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0PM8bVk013236; Sun, 25 Jan 2015 22:08:37 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0PM8bF0013234; Sun, 25 Jan 2015 22:08:37 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201501252208.t0PM8bF0013234@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 25 Jan 2015 22:08:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277716 - head/sys/arm/ti/am335x X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 22:08:38 -0000 Author: gonzo Date: Sun Jan 25 22:08:36 2015 New Revision: 277716 URL: https://svnweb.freebsd.org/changeset/base/277716 Log: Add vt(4) support to AM335x LCDC driver Modified: head/sys/arm/ti/am335x/am335x_lcd.c head/sys/arm/ti/am335x/files.am335x Modified: head/sys/arm/ti/am335x/am335x_lcd.c ============================================================================== --- head/sys/arm/ti/am335x/am335x_lcd.c Sun Jan 25 21:16:24 2015 (r277715) +++ head/sys/arm/ti/am335x/am335x_lcd.c Sun Jan 25 22:08:36 2015 (r277716) @@ -27,6 +27,7 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_syscons.h" #include #include #include @@ -41,8 +42,6 @@ __FBSDID("$FreeBSD$"); #include #include #include - -/* syscons bits */ #include #include @@ -54,7 +53,11 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef DEV_SC #include +#else /* VT */ +#include +#endif #include #include @@ -62,6 +65,8 @@ __FBSDID("$FreeBSD$"); #include "am335x_lcd.h" #include "am335x_pwm.h" +#include "fb_if.h" + #define LCD_PID 0x00 #define LCD_CTRL 0x04 #define CTRL_DIV_MASK 0xff @@ -178,6 +183,7 @@ __FBSDID("$FreeBSD$"); struct am335x_lcd_softc { device_t sc_dev; + struct fb_info sc_fb_info; struct resource *sc_mem_res; struct resource *sc_irq_res; void *sc_intr_hl; @@ -410,7 +416,9 @@ done: static int am335x_lcd_probe(device_t dev) { +#ifdef DEV_SC int err; +#endif if (!ofw_bus_status_okay(dev)) return (ENXIO); @@ -420,10 +428,12 @@ am335x_lcd_probe(device_t dev) device_set_desc(dev, "AM335x LCD controller"); +#ifdef DEV_SC err = sc_probe_unit(device_get_unit(dev), device_get_flags(dev) | SC_AUTODETECT_KBD); if (err != 0) return (err); +#endif return (BUS_PROBE_DEFAULT); } @@ -670,6 +680,16 @@ am335x_lcd_attach(device_t dev) PWM_PERIOD, PWM_PERIOD) == 0) sc->sc_backlight = 100; + sc->sc_fb_info.fb_name = device_get_nameunit(sc->sc_dev); + sc->sc_fb_info.fb_vbase = (intptr_t)sc->sc_fb_base; + sc->sc_fb_info.fb_pbase = sc->sc_fb_phys; + sc->sc_fb_info.fb_size = sc->sc_fb_size; + sc->sc_fb_info.fb_bpp = sc->sc_fb_info.fb_depth = panel.bpp; + sc->sc_fb_info.fb_stride = panel.panel_width*panel.bpp / 8; + sc->sc_fb_info.fb_width = panel.panel_width; + sc->sc_fb_info.fb_height = panel.panel_height; + +#ifdef DEV_SC err = (sc_attach_unit(device_get_unit(dev), device_get_flags(dev) | SC_AUTODETECT_KBD)); @@ -679,6 +699,18 @@ am335x_lcd_attach(device_t dev) } am335x_lcd_syscons_setup((vm_offset_t)sc->sc_fb_base, sc->sc_fb_phys, &panel); +#else /* VT */ + device_t fbd = device_add_child(dev, "fbd", + device_get_unit(dev)); + if (fbd == NULL) { + device_printf(dev, "Failed to add fbd child\n"); + goto fail; + } + if (device_probe_and_attach(fbd) != 0) { + device_printf(dev, "Failed to attach fbd device\n"); + goto fail; + } +#endif return (0); @@ -693,16 +725,29 @@ am335x_lcd_detach(device_t dev) return (EBUSY); } +static struct fb_info * +am335x_lcd_fb_getinfo(device_t dev) +{ + struct am335x_lcd_softc *sc; + + sc = device_get_softc(dev); + + return (&sc->sc_fb_info); +} + static device_method_t am335x_lcd_methods[] = { DEVMETHOD(device_probe, am335x_lcd_probe), DEVMETHOD(device_attach, am335x_lcd_attach), DEVMETHOD(device_detach, am335x_lcd_detach), + /* Framebuffer service methods */ + DEVMETHOD(fb_getinfo, am335x_lcd_fb_getinfo), + DEVMETHOD_END }; static driver_t am335x_lcd_driver = { - "am335x_lcd", + "fb", am335x_lcd_methods, sizeof(struct am335x_lcd_softc), }; Modified: head/sys/arm/ti/am335x/files.am335x ============================================================================== --- head/sys/arm/ti/am335x/files.am335x Sun Jan 25 21:16:24 2015 (r277715) +++ head/sys/arm/ti/am335x/files.am335x Sun Jan 25 22:08:36 2015 (r277716) @@ -4,7 +4,7 @@ arm/ti/aintc.c standard arm/ti/am335x/am335x_dmtimer.c standard arm/ti/am335x/am335x_gpio.c optional gpio -arm/ti/am335x/am335x_lcd.c optional sc +arm/ti/am335x/am335x_lcd.c optional sc | vt arm/ti/am335x/am335x_lcd_syscons.c optional sc arm/ti/am335x/am335x_pmic.c optional am335x_pmic arm/ti/am335x/am335x_prcm.c standard From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 22:29:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 649D563B; Sun, 25 Jan 2015 22:29:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 36C9BF9F; Sun, 25 Jan 2015 22:29:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0PMTO2K022673; Sun, 25 Jan 2015 22:29:24 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0PMTN9i022671; Sun, 25 Jan 2015 22:29:23 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201501252229.t0PMTN9i022671@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Sun, 25 Jan 2015 22:29:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277717 - head/sys/dev/mps X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 22:29:24 -0000 Author: scottl Date: Sun Jan 25 22:29:23 2015 New Revision: 277717 URL: https://svnweb.freebsd.org/changeset/base/277717 Log: Fix the ioctl interface to properly support fetching the header of regular and extended config pages. Obtained from: Netflix, Inc. MFC after: 3 days Modified: head/sys/dev/mps/mps.c head/sys/dev/mps/mps_user.c Modified: head/sys/dev/mps/mps.c ============================================================================== --- head/sys/dev/mps/mps.c Sun Jan 25 22:08:36 2015 (r277716) +++ head/sys/dev/mps/mps.c Sun Jan 25 22:29:23 2015 (r277717) @@ -2621,9 +2621,12 @@ mps_read_config_page(struct mps_softc *s cm->cm_data = params->buffer; cm->cm_length = params->length; - cm->cm_sge = &req->PageBufferSGE; - cm->cm_sglsize = sizeof(MPI2_SGE_IO_UNION); - cm->cm_flags = MPS_CM_FLAGS_SGE_SIMPLE | MPS_CM_FLAGS_DATAIN; + if (cm->cm_data != NULL) { + cm->cm_sge = &req->PageBufferSGE; + cm->cm_sglsize = sizeof(MPI2_SGE_IO_UNION); + cm->cm_flags = MPS_CM_FLAGS_SGE_SIMPLE | MPS_CM_FLAGS_DATAIN; + } else + cm->cm_sge = NULL; cm->cm_desc.Default.RequestFlags = MPI2_REQ_DESCRIPT_FLAGS_DEFAULT_TYPE; cm->cm_complete_data = params; @@ -2680,9 +2683,12 @@ mps_config_complete(struct mps_softc *sc goto done; } params->status = reply->IOCStatus; - if (params->hdr.Ext.ExtPageType != 0) { + if (params->hdr.Struct.PageType == MPI2_CONFIG_PAGETYPE_EXTENDED) { params->hdr.Ext.ExtPageType = reply->ExtPageType; params->hdr.Ext.ExtPageLength = reply->ExtPageLength; + params->hdr.Ext.PageType = reply->Header.PageType; + params->hdr.Ext.PageNumber = reply->Header.PageNumber; + params->hdr.Ext.PageVersion = reply->Header.PageVersion; } else { params->hdr.Struct.PageType = reply->Header.PageType; params->hdr.Struct.PageNumber = reply->Header.PageNumber; Modified: head/sys/dev/mps/mps_user.c ============================================================================== --- head/sys/dev/mps/mps_user.c Sun Jan 25 22:08:36 2015 (r277716) +++ head/sys/dev/mps/mps_user.c Sun Jan 25 22:29:23 2015 (r277717) @@ -309,6 +309,10 @@ mps_user_read_extcfg_header(struct mps_s hdr->PageNumber = ext_page_req->header.PageNumber; hdr->ExtPageType = ext_page_req->header.ExtPageType; params.page_address = le32toh(ext_page_req->page_address); + params.buffer = NULL; + params.length = 0; + params.callback = NULL; + if ((error = mps_read_config_page(sc, ¶ms)) != 0) { /* * Leave the request. Without resetting the chip, it's From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 23:58:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 485D05F9; Sun, 25 Jan 2015 23:58:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 29D83A0C; Sun, 25 Jan 2015 23:58:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0PNwZo8065630; Sun, 25 Jan 2015 23:58:35 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0PNwZRk065629; Sun, 25 Jan 2015 23:58:35 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201501252358.t0PNwZRk065629@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 25 Jan 2015 23:58:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277720 - head/sys/arm/ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 23:58:35 -0000 Author: gonzo Date: Sun Jan 25 23:58:34 2015 New Revision: 277720 URL: https://svnweb.freebsd.org/changeset/base/277720 Log: - Increase default i2c bus timeout to 5 seconds from 1 second. Sometimes 1 second is not enugh for TDA19988 HDMI framer (e.g. on Beaglebone Black) - Add per-device i2c_timout sysctl (dev.iichb.X.i2c_timeout) to control I2C bus timeout manually - Pass softc instead of device_t to all sysctl handlers Modified: head/sys/arm/ti/ti_i2c.c Modified: head/sys/arm/ti/ti_i2c.c ============================================================================== --- head/sys/arm/ti/ti_i2c.c Sun Jan 25 23:43:12 2015 (r277719) +++ head/sys/arm/ti/ti_i2c.c Sun Jan 25 23:58:34 2015 (r277720) @@ -95,6 +95,7 @@ struct ti_i2c_softc int sc_buffer_pos; int sc_error; int sc_fifo_trsh; + int sc_timeout; uint16_t sc_con_reg; uint16_t sc_rev; @@ -442,7 +443,7 @@ ti_i2c_transfer(device_t dev, struct iic ti_i2c_write_2(sc, I2C_REG_CON, reg); /* Wait for an event. */ - err = mtx_sleep(sc, &sc->sc_mtx, 0, "i2ciowait", hz); + err = mtx_sleep(sc, &sc->sc_mtx, 0, "i2ciowait", sc->sc_timeout); if (err == 0) err = sc->sc_error; @@ -761,12 +762,10 @@ ti_i2c_deactivate(device_t dev) static int ti_i2c_sysctl_clk(SYSCTL_HANDLER_ARGS) { - device_t dev; int clk, psc, sclh, scll; struct ti_i2c_softc *sc; - dev = (device_t)arg1; - sc = device_get_softc(dev); + sc = arg1; TI_I2C_LOCK(sc); /* Get the system prescaler value. */ @@ -783,6 +782,34 @@ ti_i2c_sysctl_clk(SYSCTL_HANDLER_ARGS) } static int +ti_i2c_sysctl_timeout(SYSCTL_HANDLER_ARGS) +{ + struct ti_i2c_softc *sc; + unsigned int val; + int err; + + sc = arg1; + + /* + * MTX_DEF lock can't be held while doing uimove in + * sysctl_handle_int + */ + TI_I2C_LOCK(sc); + val = sc->sc_timeout; + TI_I2C_UNLOCK(sc); + + err = sysctl_handle_int(oidp, &val, 0, req); + /* Write request? */ + if ((err == 0) && (req->newptr != NULL)) { + TI_I2C_LOCK(sc); + sc->sc_timeout = val; + TI_I2C_UNLOCK(sc); + } + + return (err); +} + +static int ti_i2c_probe(device_t dev) { @@ -858,12 +885,19 @@ ti_i2c_attach(device_t dev) /* Set the FIFO threshold to 5 for now. */ sc->sc_fifo_trsh = 5; + /* Set I2C bus timeout */ + sc->sc_timeout = 5*hz; + ctx = device_get_sysctl_ctx(dev); tree = SYSCTL_CHILDREN(device_get_sysctl_tree(dev)); SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "i2c_clock", - CTLFLAG_RD | CTLTYPE_UINT | CTLFLAG_MPSAFE, dev, 0, + CTLFLAG_RD | CTLTYPE_UINT | CTLFLAG_MPSAFE, sc, 0, ti_i2c_sysctl_clk, "IU", "I2C bus clock"); + SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "i2c_timeout", + CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_MPSAFE, sc, 0, + ti_i2c_sysctl_timeout, "IU", "I2C bus timeout (in ticks)"); + /* Activate the interrupt. */ err = bus_setup_intr(dev, sc->sc_irq_res, INTR_TYPE_MISC | INTR_MPSAFE, NULL, ti_i2c_intr, sc, &sc->sc_irq_h); From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 03:26:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7B5BEC05; Mon, 26 Jan 2015 03:26:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5DD73EBF; Mon, 26 Jan 2015 03:26:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0Q3QdJ1065010; Mon, 26 Jan 2015 03:26:39 GMT (envelope-from luigi@FreeBSD.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0Q3QcAb065004; Mon, 26 Jan 2015 03:26:38 GMT (envelope-from luigi@FreeBSD.org) Message-Id: <201501260326.t0Q3QcAb065004@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: luigi set sender to luigi@FreeBSD.org using -f From: Luigi Rizzo Date: Mon, 26 Jan 2015 03:26: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: r277722 - in stable/10: contrib/libpcap lib/libpcap X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 03:26:39 -0000 Author: luigi Date: Mon Jan 26 03:26:37 2015 New Revision: 277722 URL: https://svnweb.freebsd.org/changeset/base/277722 Log: Merge 272659: Add netmap support to libpcap. Tcpdump and other native pcap clients can now run directly on netmap ports using netmap:foo or valeXX:YY as device names. Modifications to existing code are small and trivial, the netmap-specific code is all in a new file. Please be aware that in netmap mode the physical interface is disconnected from the host stack, so libpcap will steal the traffic not just make a copy. For the full version of the code (including linux and autotools support) see https://code.google.com/p/netmap-libpcap/ Added: stable/10/lib/libpcap/pcap-netmap.c - copied unchanged from r272659, head/lib/libpcap/pcap-netmap.c Modified: stable/10/contrib/libpcap/inet.c stable/10/contrib/libpcap/pcap.c stable/10/lib/libpcap/Makefile stable/10/lib/libpcap/config.h Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/libpcap/inet.c ============================================================================== --- stable/10/contrib/libpcap/inet.c Mon Jan 26 02:58:30 2015 (r277721) +++ stable/10/contrib/libpcap/inet.c Mon Jan 26 03:26:37 2015 (r277722) @@ -737,6 +737,10 @@ pcap_lookupnet(device, netp, maskp, errb #ifdef PCAP_SUPPORT_USB || strstr(device, "usbmon") != NULL #endif +#ifdef PCAP_SUPPORT_NETMAP + || !strncmp(device, "netmap:", 7) + || !strncmp(device, "vale", 4) +#endif #ifdef HAVE_SNF_API || strstr(device, "snf") != NULL #endif Modified: stable/10/contrib/libpcap/pcap.c ============================================================================== --- stable/10/contrib/libpcap/pcap.c Mon Jan 26 02:58:30 2015 (r277721) +++ stable/10/contrib/libpcap/pcap.c Mon Jan 26 03:26:37 2015 (r277722) @@ -106,6 +106,10 @@ static const char rcsid[] _U_ = #include "pcap-netfilter-linux.h" #endif +#ifdef PCAP_SUPPORT_NETMAP +pcap_t* pcap_netmap_create(const char *device, char *ebuf, int *is_ours); +#endif + int pcap_not_initialized(pcap_t *pcap) { @@ -301,6 +305,9 @@ struct capture_source_type { int (*findalldevs_op)(pcap_if_t **, char *); pcap_t *(*create_op)(const char *, char *, int *); } capture_source_types[] = { +#ifdef PCAP_SUPPORT_NETMAP + { NULL, pcap_netmap_create }, +#endif #ifdef HAVE_DAG_API { dag_findalldevs, dag_create }, #endif Modified: stable/10/lib/libpcap/Makefile ============================================================================== --- stable/10/lib/libpcap/Makefile Mon Jan 26 02:58:30 2015 (r277721) +++ stable/10/lib/libpcap/Makefile Mon Jan 26 03:26:37 2015 (r277722) @@ -7,6 +7,7 @@ SHLIBDIR?= /lib LIB= pcap SRCS= grammar.y tokdefs.h version.h pcap-bpf.c \ + pcap-netmap.c \ pcap.c pcap-common.c inet.c fad-getad.c gencode.c optimize.c nametoaddr.c \ etherent.c savefile.c bpf_filter.c bpf_image.c bpf_dump.c \ scanner.l sf-pcap.c sf-pcap-ng.c version.c Modified: stable/10/lib/libpcap/config.h ============================================================================== --- stable/10/lib/libpcap/config.h Mon Jan 26 02:58:30 2015 (r277721) +++ stable/10/lib/libpcap/config.h Mon Jan 26 03:26:37 2015 (r277722) @@ -271,6 +271,9 @@ /* target host supports USB sniffing */ /* #undef PCAP_SUPPORT_USB */ +/* target host supports netmap */ +#define PCAP_SUPPORT_NETMAP 1 + /* include ACN support */ /* #undef SITA */ Copied: stable/10/lib/libpcap/pcap-netmap.c (from r272659, head/lib/libpcap/pcap-netmap.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libpcap/pcap-netmap.c Mon Jan 26 03:26:37 2015 (r277722, copy of r272659, head/lib/libpcap/pcap-netmap.c) @@ -0,0 +1,283 @@ +/* + * Copyright (C) 2014 Luigi Rizzo. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS''AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include + +#define NETMAP_WITH_LIBS +#include + +#include "pcap-int.h" + +/* + * $FreeBSD$ + * + * This code is meant to build also on other versions of libpcap. + * + * older libpcap miss p->priv, use p->md.device instead (and allocate). + * Also opt.timeout was in md.timeout before. + * Use #define PCAP_IF_UP to discriminate + */ +#ifdef PCAP_IF_UP +#define NM_PRIV(p) ((struct pcap_netmap *)(p->priv)) +#define the_timeout opt.timeout +#else +#define HAVE_NO_PRIV +#define NM_PRIV(p) ((struct pcap_netmap *)(p->md.device)) +#define SET_PRIV(p, x) p->md.device = (void *)x +#define the_timeout md.timeout +#endif + +#if defined (linux) +/* On FreeBSD we use IFF_PPROMISC which is in ifr_flagshigh. + * remap to IFF_PROMISC on linux + */ +#define IFF_PPROMISC IFF_PROMISC +#endif /* linux */ + +struct pcap_netmap { + struct nm_desc *d; /* pointer returned by nm_open() */ + pcap_handler cb; /* callback and argument */ + u_char *cb_arg; + int must_clear_promisc; /* flag */ + uint64_t rx_pkts; /* # of pkts received before the filter */ +}; + + +static int +pcap_netmap_stats(pcap_t *p, struct pcap_stat *ps) +{ + struct pcap_netmap *pn = NM_PRIV(p); + + ps->ps_recv = pn->rx_pkts; + ps->ps_drop = 0; + ps->ps_ifdrop = 0; + return 0; +} + + +static void +pcap_netmap_filter(u_char *arg, struct pcap_pkthdr *h, const u_char *buf) +{ + pcap_t *p = (pcap_t *)arg; + struct pcap_netmap *pn = NM_PRIV(p); + const struct bpf_insn *pc = p->fcode.bf_insns; + + ++pn->rx_pkts; + if (pc == NULL || bpf_filter(pc, buf, h->len, h->caplen)) + pn->cb(pn->cb_arg, h, buf); +} + + +static int +pcap_netmap_dispatch(pcap_t *p, int cnt, pcap_handler cb, u_char *user) +{ + int ret; + struct pcap_netmap *pn = NM_PRIV(p); + struct nm_desc *d = pn->d; + struct pollfd pfd = { .fd = p->fd, .events = POLLIN, .revents = 0 }; + + pn->cb = cb; + pn->cb_arg = user; + + for (;;) { + if (p->break_loop) { + p->break_loop = 0; + return PCAP_ERROR_BREAK; + } + /* nm_dispatch won't run forever */ + + ret = nm_dispatch((void *)d, cnt, (void *)pcap_netmap_filter, (void *)p); + if (ret != 0) + break; + errno = 0; + ret = poll(&pfd, 1, p->the_timeout); + } + return ret; +} + + +/* XXX need to check the NIOCTXSYNC/poll */ +static int +pcap_netmap_inject(pcap_t *p, const void *buf, size_t size) +{ + struct nm_desc *d = NM_PRIV(p)->d; + + return nm_inject(d, buf, size); +} + + +static int +pcap_netmap_ioctl(pcap_t *p, u_long what, uint32_t *if_flags) +{ + struct pcap_netmap *pn = NM_PRIV(p); + struct nm_desc *d = pn->d; + struct ifreq ifr; + int error, fd = d->fd; + +#ifdef linux + fd = socket(AF_INET, SOCK_DGRAM, 0); + if (fd < 0) { + fprintf(stderr, "Error: cannot get device control socket.\n"); + return -1; + } +#endif /* linux */ + bzero(&ifr, sizeof(ifr)); + strncpy(ifr.ifr_name, d->req.nr_name, sizeof(ifr.ifr_name)); + switch (what) { + case SIOCSIFFLAGS: + ifr.ifr_flags = *if_flags; +#ifdef __FreeBSD__ + ifr.ifr_flagshigh = *if_flags >> 16; +#endif /* __FreeBSD__ */ + break; + } + error = ioctl(fd, what, &ifr); + if (!error) { + switch (what) { + case SIOCGIFFLAGS: + *if_flags = ifr.ifr_flags; +#ifdef __FreeBSD__ + *if_flags |= (ifr.ifr_flagshigh << 16); +#endif /* __FreeBSD__ */ + } + } +#ifdef linux + close(fd); +#endif /* linux */ + return error ? -1 : 0; +} + + +static void +pcap_netmap_close(pcap_t *p) +{ + struct pcap_netmap *pn = NM_PRIV(p); + struct nm_desc *d = pn->d; + uint32_t if_flags = 0; + + if (pn->must_clear_promisc) { + pcap_netmap_ioctl(p, SIOCGIFFLAGS, &if_flags); /* fetch flags */ + if (if_flags & IFF_PPROMISC) { + if_flags &= ~IFF_PPROMISC; + pcap_netmap_ioctl(p, SIOCSIFFLAGS, &if_flags); + } + } + nm_close(d); +#ifdef HAVE_NO_PRIV + free(pn); + SET_PRIV(p, NULL); // unnecessary +#endif + pcap_cleanup_live_common(p); +} + + +static int +pcap_netmap_activate(pcap_t *p) +{ + struct pcap_netmap *pn = NM_PRIV(p); + struct nm_desc *d = nm_open(p->opt.source, NULL, 0, NULL); + uint32_t if_flags = 0; + + if (d == NULL) { + snprintf(p->errbuf, PCAP_ERRBUF_SIZE, + "netmap open: cannot access %s: %s\n", + p->opt.source, pcap_strerror(errno)); +#ifdef HAVE_NO_PRIV + free(pn); + SET_PRIV(p, NULL); // unnecessary +#endif + pcap_cleanup_live_common(p); + return (PCAP_ERROR); + } + if (0) + fprintf(stderr, "%s device %s priv %p fd %d ports %d..%d\n", + __FUNCTION__, p->opt.source, d, d->fd, + d->first_rx_ring, d->last_rx_ring); + pn->d = d; + p->fd = d->fd; + if (p->opt.promisc && !(d->req.nr_ringid & NETMAP_SW_RING)) { + pcap_netmap_ioctl(p, SIOCGIFFLAGS, &if_flags); /* fetch flags */ + if (!(if_flags & IFF_PPROMISC)) { + pn->must_clear_promisc = 1; + if_flags |= IFF_PPROMISC; + pcap_netmap_ioctl(p, SIOCSIFFLAGS, &if_flags); + } + } + p->linktype = DLT_EN10MB; + p->selectable_fd = p->fd; + p->read_op = pcap_netmap_dispatch; + p->inject_op = pcap_netmap_inject, + p->setfilter_op = install_bpf_program; + p->setdirection_op = NULL; + p->set_datalink_op = NULL; + p->getnonblock_op = pcap_getnonblock_fd; + p->setnonblock_op = pcap_setnonblock_fd; + p->stats_op = pcap_netmap_stats; + p->cleanup_op = pcap_netmap_close; + + return (0); +} + + +pcap_t * +pcap_netmap_create(const char *device, char *ebuf, int *is_ours) +{ + pcap_t *p; + + *is_ours = (!strncmp(device, "netmap:", 7) || !strncmp(device, "vale", 4)); + if (! *is_ours) + return NULL; +#ifdef HAVE_NO_PRIV + { + void *pn = calloc(1, sizeof(struct pcap_netmap)); + if (pn == NULL) + return NULL; + p = pcap_create_common(device, ebuf); + if (p == NULL) { + free(pn); + return NULL; + } + SET_PRIV(p, pn); + } +#else + p = pcap_create_common(device, ebuf, sizeof (struct pcap_netmap)); + if (p == NULL) + return (NULL); +#endif + p->activate_op = pcap_netmap_activate; + return (p); +} From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 04:04:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 47733B5A; Mon, 26 Jan 2015 04:04:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3494D295; Mon, 26 Jan 2015 04:04:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0Q44wUs084556; Mon, 26 Jan 2015 04:04:58 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0Q44wfl084555; Mon, 26 Jan 2015 04:04:58 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501260404.t0Q44wfl084555@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 26 Jan 2015 04:04:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277723 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 04:04:58 -0000 Author: adrian Date: Mon Jan 26 04:04:57 2015 New Revision: 277723 URL: https://svnweb.freebsd.org/changeset/base/277723 Log: Call WITNESS_WARN() in callout_drain() to check whether any locks are being held before sleeping. This has bitten me (in ath(4)) once before and I'd like to see this not bite anyone else. Differential Revision: D1638 Reviewed by: jhb, hselasky MFC after: 1 week Modified: head/sys/kern/kern_timeout.c Modified: head/sys/kern/kern_timeout.c ============================================================================== --- head/sys/kern/kern_timeout.c Mon Jan 26 03:26:37 2015 (r277722) +++ head/sys/kern/kern_timeout.c Mon Jan 26 04:04:57 2015 (r277723) @@ -1096,6 +1096,10 @@ _callout_stop_safe(struct callout *c, in struct lock_class *class; int direct, sq_locked, use_lock; + if (safe) + WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, c->c_lock, + "calling %s", __func__); + /* * Some old subsystems don't hold Giant while running a callout_stop(), * so just discard this check for the moment. From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 05:58:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5EA9F471 for ; Mon, 26 Jan 2015 05:58:28 +0000 (UTC) Received: from nm25-vm7.bullet.mail.gq1.yahoo.com (nm25-vm7.bullet.mail.gq1.yahoo.com [98.136.217.118]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2ECCBDEC for ; Mon, 26 Jan 2015 05:58:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1422251553; bh=CXjj0ls905LwUsemTjAShyHVQWik8tk2XXSWgQ3f31M=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject; b=Zfb6GvoK9Gmm0sv8d3J/ulCYl0LgtvPoV15VHiWPeJu9I+NyA0YuAV8gwenFpFKuHU3FXq8X70Ub5mesVvgzOeAODJ/bUH7S8yHPinKnLYLXjroD1MN0mmWyAv9UFBKNo5tp8ESiHxgUUst4kCWOPrh9G8aQziAN4Hasebw1L40GpUZHu7UfqLi0tr7bFqdLYxvK/+C7gYnKATWUmwC0lZ1/kdnhnNSKqtKWIexD8ql5Y6Vsw3r2HyuBCE8wMDvuniDEhTy74DCld+k1S4IcTroz68Z27e9GHFR5ynHzA0OWqnxUcaM3T9rglbwi+rf6lw2Jpkb7dFTm0A7y8iwzEw== Received: from [98.137.12.189] by nm25.bullet.mail.gq1.yahoo.com with NNFMP; 26 Jan 2015 05:52:33 -0000 Received: from [98.136.164.65] by tm10.bullet.mail.gq1.yahoo.com with NNFMP; 26 Jan 2015 05:52:33 -0000 Received: from [127.0.0.1] by smtp227.mail.gq1.yahoo.com with NNFMP; 26 Jan 2015 05:52:33 -0000 X-Yahoo-Newman-Id: 548257.89716.bm@smtp227.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: zQZoDVoVM1lfe72QgEK0tD75uA8_b1mwlR.0Q6ePDYouP.8 mCA5xpMv5.13qW1HHw8LqEBFrWwRm8FfJEMgzdP4TRGUioczGX7Wjm5fZ3SS tT2XF19s9hyouDLZmTB9v7dPgoyd6KpozBvh6TzSSnV45qCqjLzvcpsSGxKS _x6SVfl3Tzfp0SuFS4k93FRlm9ZfiqIlMPdaoYODxGF7pSrZs2bR.pvfNnTX oetJkr1Bu_T2Lng8f2pDCw0GkrRwjnr1E1k5JKZKX1657j6Rkq0JRQ671.rL hR0x2dAfjpzMsDe6S4EeN_zqVSvTSsLQmi482DQkRCmmZIj803ULMp0v_HbY cgmjT3UNyv9_ceUka0braZEAEyb6LMQizDxpdZDeinL8U3caQbiNealYZtF6 sAE_UnYGB._lnXlrdA0JPPKNR7MJ9ZBMZTwzBSBLD_AKXwk3iFsNQyKcxIls iubWE9sWY3cJ1MQJ0nzq2tj9EXTivXInj6GmvOxMX88Z7TJNxHEfxozuGRdQ 2uLszmJua_PL5xgsTj8B6Xj7XWzEFHwHHuCyv X-Yahoo-SMTP: clhABp.swBB7fs.LwIJpv3jkWgo2NU8- Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r277693 - head/sys/boot/forth From: Scott Long In-Reply-To: <201501251157.t0PBvIdK025342@svn.freebsd.org> Date: Sun, 25 Jan 2015 22:52:29 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <20A5F704-10AC-40C6-84B0-E301C6D77DF8@yahoo.com> References: <201501251157.t0PBvIdK025342@svn.freebsd.org> To: Dag-Erling Sm?rgrav X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 05:58:28 -0000 This is completely arbitrary. Please revert it, or I will revert it in = 48 hours. Scott > On Jan 25, 2015, at 4:57 AM, Dag-Erling Sm?rgrav = wrote: >=20 > Author: des > Date: Sun Jan 25 11:57:18 2015 > New Revision: 277693 > URL: https://svnweb.freebsd.org/changeset/base/277693 >=20 > Log: > Fix the font in the text version. This has bothered me for a long = time... >=20 > MFC after: 1 week >=20 > Modified: > head/sys/boot/forth/beastie.4th > head/sys/boot/forth/brand.4th >=20 > Modified: head/sys/boot/forth/beastie.4th > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/boot/forth/beastie.4th Sun Jan 25 08:16:51 2015 = (r277692) > +++ head/sys/boot/forth/beastie.4th Sun Jan 25 11:57:18 2015 = (r277693) > @@ -89,7 +89,7 @@ variable logoY > 0 25 at-xy > ; >=20 > -: fbsdbw-logo ( x y -- ) \ "FreeBSD" logo in B/W (13 rows x 21 = columns) > +: fbsdbw-logo ( x y -- ) \ "FreeBSD" logo in B/W (12 rows x 21 = columns) >=20 > \ We used to use the beastie himself as our default... until the > \ eventual complaint derided his reign of the advanced = boot-menu. > @@ -106,17 +106,16 @@ variable logoY > 5 + swap 6 + swap >=20 > 2dup at-xy ." ______" 1+ > - 2dup at-xy ." | ____| __ ___ ___ " 1+ > - 2dup at-xy ." | |__ | '__/ _ \/ _ \" 1+ > - 2dup at-xy ." | __|| | | __/ __/" 1+ > - 2dup at-xy ." | | | | | | |" 1+ > + 2dup at-xy ." | ____|" 1+ > + 2dup at-xy ." | |__ _ __ ___ ___ " 1+ > + 2dup at-xy ." | __|| '__/ _ \/ _ \" 1+ > + 2dup at-xy ." | | | | | __/ __/" 1+ > 2dup at-xy ." |_| |_| \___|\___|" 1+ > 2dup at-xy ." ____ _____ _____" 1+ > 2dup at-xy ." | _ \ / ____| __ \" 1+ > 2dup at-xy ." | |_) | (___ | | | |" 1+ > 2dup at-xy ." | _ < \___ \| | | |" 1+ > 2dup at-xy ." | |_) |____) | |__| |" 1+ > - 2dup at-xy ." | | | |" 1+ > at-xy ." |____/|_____/|_____/" >=20 > \ Put the cursor back at the bottom >=20 > Modified: head/sys/boot/forth/brand.4th > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/boot/forth/brand.4th Sun Jan 25 08:16:51 2015 = (r277692) > +++ head/sys/boot/forth/brand.4th Sun Jan 25 11:57:18 2015 = (r277693) > @@ -33,14 +33,13 @@ variable brandY > 2 brandX ! > 1 brandY ! >=20 > -: fbsd-logo ( x y -- ) \ "FreeBSD" [wide] logo in B/W (7 rows x 42 = columns) > +: fbsd-logo ( x y -- ) \ "FreeBSD" [wide] logo in B/W (6 rows x 42 = columns) >=20 > 2dup at-xy ." ______ ____ _____ _____ " 1+ > 2dup at-xy ." | ____| | _ \ / ____| __ \ " 1+ > 2dup at-xy ." | |___ _ __ ___ ___ | |_) | (___ | | | |" 1+ > 2dup at-xy ." | ___| '__/ _ \/ _ \| _ < \___ \| | | |" 1+ > 2dup at-xy ." | | | | | __/ __/| |_) |____) | |__| |" 1+ > - 2dup at-xy ." | | | | | | || | | |" 1+ > at-xy ." |_| |_| \___|\___||____/|_____/|_____/ " >=20 > \ Put the cursor back at the bottom >=20 From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 06:27:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E80E4FDF; Mon, 26 Jan 2015 06:27:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D3061104; Mon, 26 Jan 2015 06:27:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0Q6R9tt050047; Mon, 26 Jan 2015 06:27:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0Q6R8vf050040; Mon, 26 Jan 2015 06:27:08 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501260627.t0Q6R8vf050040@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 26 Jan 2015 06:27:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277725 - in head: etc/rc.d sbin share/examples share/mk tools/build/mk tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 06:27:10 -0000 Author: ngie Date: Mon Jan 26 06:27:07 2015 New Revision: 277725 URL: https://svnweb.freebsd.org/changeset/base/277725 Log: Add MK_HAST knob for building and installing hastd(8), et al MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Added: head/tools/build/options/WITHOUT_HAST (contents, props changed) Modified: head/etc/rc.d/Makefile head/sbin/Makefile head/share/examples/Makefile head/share/mk/src.opts.mk head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/etc/rc.d/Makefile ============================================================================== --- head/etc/rc.d/Makefile Mon Jan 26 05:56:27 2015 (r277724) +++ head/etc/rc.d/Makefile Mon Jan 26 06:27:07 2015 (r277725) @@ -48,7 +48,6 @@ FILES= DAEMON \ gptboot \ growfs \ gssd \ - hastd \ ${_hcsecd} \ hostapd \ hostid \ @@ -178,6 +177,10 @@ _casperd= casperd FILES+= ccd .endif +.if ${MK_HAST} != "no" +FILES+= hastd +.endif + .if ${MK_ISCSI} != "no" FILES+= iscsictl FILES+= iscsid Modified: head/sbin/Makefile ============================================================================== --- head/sbin/Makefile Mon Jan 26 05:56:27 2015 (r277724) +++ head/sbin/Makefile Mon Jan 26 06:27:07 2015 (r277725) @@ -30,8 +30,6 @@ SUBDIR=adjkerntz \ ggate \ growfs \ gvinum \ - hastctl \ - hastd \ ifconfig \ init \ kldconfig \ @@ -88,6 +86,11 @@ SUBDIR+= ccdconfig SUBDIR+= devd .endif +.if ${MK_HAST} != "no" +SUBDIR+= hastctl +SUBDIR+= hastd +.endif + .if ${MK_IPFILTER} != "no" SUBDIR+= ipf .endif Modified: head/share/examples/Makefile ============================================================================== --- head/share/examples/Makefile Mon Jan 26 05:56:27 2015 (r277724) +++ head/share/examples/Makefile Mon Jan 26 06:27:07 2015 (r277725) @@ -14,7 +14,6 @@ LDIRS= BSD_daemon \ drivers \ etc \ find_interface \ - hast \ ibcs2 \ indent \ ipfw \ @@ -64,11 +63,6 @@ XFILES= BSD_daemon/FreeBSD.pfa \ find_interface/Makefile \ find_interface/README \ find_interface/find_interface.c \ - hast/ucarp.sh \ - hast/ucarp_down.sh \ - hast/ucarp_up.sh \ - hast/vip-down.sh \ - hast/vip-up.sh \ ibcs2/README \ ibcs2/hello.uu \ indent/indent.pro \ @@ -202,6 +196,15 @@ BINDIR= ${SHAREDIR}/examples NO_OBJ= +.if ${MK_HAST} != "no" +LDIRS+= hast +XFILES+= hast/ucarp.sh \ + hast/ucarp_down.sh \ + hast/ucarp_up.sh \ + hast/vip-down.sh \ + hast/vip-up.sh +.endif + # Define SHARED to indicate whether you want symbolic links to the system # source (``symlinks''), or a separate copy (``copies''); (latter useful # in environments where it's not possible to keep /sys publicly readable) Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Mon Jan 26 05:56:27 2015 (r277724) +++ head/share/mk/src.opts.mk Mon Jan 26 06:27:07 2015 (r277725) @@ -92,6 +92,7 @@ __DEFAULT_YES_OPTIONS = \ GPIO \ GPL_DTC \ GROFF \ + HAST \ HTML \ HYPERV \ ICONV \ Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Mon Jan 26 05:56:27 2015 (r277724) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Mon Jan 26 06:27:07 2015 (r277725) @@ -2144,6 +2144,20 @@ OLD_FILES+=usr/share/man/man5/qop.5.gz OLD_FILES+=usr/share/man/man8/gssd.8.gz .endif +.if ${MK_HAST} == no +OLD_FILES+=sbin/hastctl +OLD_FILES+=sbin/hastd +OLD_FILES+=usr/share/examples/hast/ucarp.sh +OLD_FILES+=usr/share/examples/hast/ucarp_down.sh +OLD_FILES+=usr/share/examples/hast/ucarp_up.sh +OLD_FILES+=usr/share/examples/hast/vip-down.sh +OLD_FILES+=usr/share/examples/hast/vip-up.sh +OLD_FILES+=usr/share/man/man5/hast.conf.5.gz +OLD_FILES+=usr/share/man/man8/hastctl.8.gz +OLD_FILES+=usr/share/man/man8/hastd.8.gz +OLD_DIRS+=usr/share/examples/hast +.endif + .if ${MK_HESIOD} == no OLD_FILES+=usr/bin/hesinfo OLD_FILES+=usr/include/hesiod.h Added: head/tools/build/options/WITHOUT_HAST ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_HAST Mon Jan 26 06:27:07 2015 (r277725) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to not build +.Xr hastd 8 +and related utilities. From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 06:29:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5825019E; Mon, 26 Jan 2015 06:29:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44CE8112; Mon, 26 Jan 2015 06:29:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0Q6T8tj050340; Mon, 26 Jan 2015 06:29:08 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0Q6T8sZ050339; Mon, 26 Jan 2015 06:29:08 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501260629.t0Q6T8sZ050339@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 26 Jan 2015 06:29:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277726 - head/sbin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 06:29:08 -0000 Author: ngie Date: Mon Jan 26 06:29:07 2015 New Revision: 277726 URL: https://svnweb.freebsd.org/changeset/base/277726 Log: Build sbin/iscontrol again if MK_ISCSI != no MFC after: 13 days X-MFC with: r277675 Pointyhat to: me Modified: head/sbin/Makefile Modified: head/sbin/Makefile ============================================================================== --- head/sbin/Makefile Mon Jan 26 06:27:07 2015 (r277725) +++ head/sbin/Makefile Mon Jan 26 06:29:07 2015 (r277726) @@ -100,6 +100,10 @@ SUBDIR+= ipfw SUBDIR+= natd .endif +.if ${MK_ISCSI} != "no" +SUBDIR+= iscontrol +.endif + .if ${MK_NAND} != "no" SUBDIR+= nandfs SUBDIR+= newfs_nandfs From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 06:44:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2EA2E495; Mon, 26 Jan 2015 06:44:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 097412E4; Mon, 26 Jan 2015 06:44:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0Q6ip6M059131; Mon, 26 Jan 2015 06:44:51 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0Q6inJC059115; Mon, 26 Jan 2015 06:44:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501260644.t0Q6inJC059115@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 26 Jan 2015 06:44:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277727 - in head: lib share/examples share/man/man4 share/mk sys/conf sys/modules tools/build/mk tools/build/options usr.sbin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 06:44:52 -0000 Author: ngie Date: Mon Jan 26 06:44:48 2015 New Revision: 277727 URL: https://svnweb.freebsd.org/changeset/base/277727 Log: Add MK_BHYVE knob for building and installing bhyve(4), et al MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Added: head/tools/build/options/WITHOUT_BHYVE (contents, props changed) Modified: head/lib/Makefile head/share/examples/Makefile head/share/man/man4/Makefile head/share/mk/src.opts.mk head/sys/conf/kern.opts.mk head/sys/modules/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.sbin/Makefile.amd64 Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Mon Jan 26 06:29:07 2015 (r277726) +++ head/lib/Makefile Mon Jan 26 06:44:48 2015 (r277727) @@ -258,8 +258,10 @@ _librtld_db= librtld_db .endif .if ${MACHINE_CPUARCH} == "amd64" +.if ${MK_BHYVE} != "no" _libvmmapi= libvmmapi .endif +.endif .if ${MACHINE_CPUARCH} == "mips" _libproc= libproc Modified: head/share/examples/Makefile ============================================================================== --- head/share/examples/Makefile Mon Jan 26 06:29:07 2015 (r277726) +++ head/share/examples/Makefile Mon Jan 26 06:44:48 2015 (r277727) @@ -7,7 +7,6 @@ LDIRS= BSD_daemon \ FreeBSD_version \ IPv6 \ - bhyve \ bootforth \ csh \ diskless \ @@ -41,7 +40,6 @@ XFILES= BSD_daemon/FreeBSD.pfa \ FreeBSD_version/Makefile \ FreeBSD_version/README \ IPv6/USAGE \ - bhyve/vmrun.sh \ bootforth/README \ bootforth/boot.4th \ bootforth/frames.4th \ @@ -205,6 +203,13 @@ XFILES+= hast/ucarp.sh \ hast/vip-up.sh .endif +.if ${MACHINE_CPUARCH} == "amd64" +.if ${MK_BHYVE} != "no" +LDIRS+= bhyve +XFILES+= bhyve/vmrun.sh +.endif +.endif + # Define SHARED to indicate whether you want symbolic links to the system # source (``symlinks''), or a separate copy (``copies''); (latter useful # in environments where it's not possible to keep /sys publicly readable) Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Mon Jan 26 06:29:07 2015 (r277726) +++ head/share/man/man4/Makefile Mon Jan 26 06:44:48 2015 (r277727) @@ -835,7 +835,6 @@ _xnb.4= xnb.4 .endif .if ${MACHINE_CPUARCH} == "amd64" -_bhyve.4= bhyve.4 _if_ntb.4= if_ntb.4 _ntb.4= ntb.4 _ntb_hw.4= ntb_hw.4 @@ -848,6 +847,10 @@ MLINKS+=qlxge.4 if_qlxge.4 MLINKS+=qlxgb.4 if_qlxgb.4 MLINKS+=qlxgbe.4 if_qlxgbe.4 MLINKS+=sfxge.4 if_sfxge.4 + +.if ${MK_BHYVE} != "no" +_bhyve.4= bhyve.4 +.endif .endif .if ${MACHINE_CPUARCH} == "mips" Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Mon Jan 26 06:29:07 2015 (r277726) +++ head/share/mk/src.opts.mk Mon Jan 26 06:44:48 2015 (r277727) @@ -52,6 +52,7 @@ __DEFAULT_YES_OPTIONS = \ ATM \ AUDIT \ AUTHPF \ + BHYVE \ BINUTILS \ BINUTILS_BOOTSTRAP \ BLUETOOTH \ Modified: head/sys/conf/kern.opts.mk ============================================================================== --- head/sys/conf/kern.opts.mk Mon Jan 26 06:29:07 2015 (r277726) +++ head/sys/conf/kern.opts.mk Mon Jan 26 06:44:48 2015 (r277727) @@ -23,6 +23,7 @@ # src tree. __DEFAULT_YES_OPTIONS = \ + BHYVE \ BLUETOOTH \ CCD \ CDDL \ Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Mon Jan 26 06:29:07 2015 (r277726) +++ head/sys/modules/Makefile Mon Jan 26 06:44:48 2015 (r277727) @@ -620,8 +620,11 @@ _qlxge= qlxge _qlxgb= qlxgb _qlxgbe= qlxgbe _sfxge= sfxge + +.if ${MK_BHYVE} != "no" || defined(ALL_MODULES) _vmm= vmm .endif +.endif .if ${MACHINE_CPUARCH} == "i386" # XXX some of these can move to the general case when de-i386'ed Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Mon Jan 26 06:29:07 2015 (r277726) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Mon Jan 26 06:44:48 2015 (r277727) @@ -144,6 +144,16 @@ OLD_FILES+=usr/share/man/man8/authpf.8.g OLD_FILES+=usr/share/man/man8/authpf-noip.8.gz .endif +.if ${MK_BHYVE} == no +OLD_FILES+=usr/sbin/bhyve +OLD_FILES+=usr/sbin/bhyvectl +OLD_FILES+=usr/sbin/bhyveload +OLD_FILES+=usr/share/examples/bhyve/vmrun.sh +OLD_FILES+=usr/share/man/man8/bhyve.8.gz +OLD_FILES+=usr/share/man/man8/bhyveload.8.gz +OLD_DIRS+=usr/share/examples/bhyve +.endif + .if ${MK_BLUETOOTH} == no OLD_FILES+=etc/bluetooth/hcsecd.conf OLD_FILES+=etc/bluetooth/hosts Added: head/tools/build/options/WITHOUT_BHYVE ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_BHYVE Mon Jan 26 06:44:48 2015 (r277727) @@ -0,0 +1,6 @@ +.\" $FreeBSD$ +Set to not build or install +.Xr bhyve 8 , +associated utilities, and examples. +.Pp +This option only affects amd64/amd64. Modified: head/usr.sbin/Makefile.amd64 ============================================================================== --- head/usr.sbin/Makefile.amd64 Mon Jan 26 06:29:07 2015 (r277726) +++ head/usr.sbin/Makefile.amd64 Mon Jan 26 06:44:48 2015 (r277727) @@ -10,9 +10,11 @@ SUBDIR+= acpi SUBDIR+= apm .endif SUBDIR+= asf +.if ${MK_BHYVE} != "no" SUBDIR+= bhyve SUBDIR+= bhyvectl SUBDIR+= bhyveload +.endif SUBDIR+= boot0cfg .if ${MK_TOOLCHAIN} != "no" SUBDIR+= btxld From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 07:15:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 482C394F; Mon, 26 Jan 2015 07:15:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 325E6791; Mon, 26 Jan 2015 07:15:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0Q7FpLo073235; Mon, 26 Jan 2015 07:15:51 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0Q7FnDB073226; Mon, 26 Jan 2015 07:15:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501260715.t0Q7FnDB073226@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 26 Jan 2015 07:15:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277728 - in head: etc etc/rc.d share/man/man5 share/mk sys/conf sys/modules tools/build/mk tools/build/options usr.sbin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 07:15:52 -0000 Author: ngie Date: Mon Jan 26 07:15:49 2015 New Revision: 277728 URL: https://svnweb.freebsd.org/changeset/base/277728 Log: Add MK_AUTOFS knob for building and installing autofs(4), et al MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Added: head/tools/build/options/WITHOUT_AUTOFS (contents, props changed) Modified: head/etc/Makefile head/etc/rc.d/Makefile head/share/man/man5/Makefile head/share/mk/src.opts.mk head/sys/conf/kern.opts.mk head/sys/modules/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.sbin/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Mon Jan 26 06:44:48 2015 (r277727) +++ head/etc/Makefile Mon Jan 26 07:15:49 2015 (r277728) @@ -14,8 +14,7 @@ SUBDIR+=sendmail SUBDIR+=tests .endif -BIN1= auto_master \ - crontab \ +BIN1= crontab \ devd.conf \ devfs.conf \ ddb.conf \ @@ -90,6 +89,10 @@ BIN1+= amd.map BIN1+= apmd.conf .endif +.if ${MK_AUTOFS} != "no" +BIN1+= auto_master +.endif + .if ${MK_BSNMP} != "no" BIN1+= snmpd.config .endif @@ -229,7 +232,9 @@ distribution: echo "./etc/spwd.db type=file mode=0600 uname=root gname=wheel"; \ ) | ${METALOG.add} .endif +.if ${MK_AUTOFS} != "no" ${_+_}cd ${.CURDIR}/autofs; ${MAKE} install +.endif .if ${MK_BLUETOOTH} != "no" ${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install .endif Modified: head/etc/rc.d/Makefile ============================================================================== --- head/etc/rc.d/Makefile Mon Jan 26 06:44:48 2015 (r277727) +++ head/etc/rc.d/Makefile Mon Jan 26 07:15:49 2015 (r277728) @@ -20,9 +20,6 @@ FILES= DAEMON \ atm3 \ auditd \ auditdistd \ - automount \ - automountd \ - autounmountd \ bgfsck \ ${_bluetooth} \ bootparams \ @@ -158,6 +155,12 @@ FILES= DAEMON \ zfs \ zvol +.if ${MK_AUTOFS} != "no" +FILES+= automount +FILES+= automountd +FILES+= autounmountd +.endif + .if ${MK_BLUETOOTH} != "no" _bluetooth= bluetooth _bthidd= bthidd Modified: head/share/man/man5/Makefile ============================================================================== --- head/share/man/man5/Makefile Mon Jan 26 06:44:48 2015 (r277727) +++ head/share/man/man5/Makefile Mon Jan 26 07:15:49 2015 (r277728) @@ -7,7 +7,6 @@ MAN= acct.5 \ ar.5 \ a.out.5 \ - autofs.5 \ bluetooth.device.conf.5 \ bluetooth.hosts.5 \ bluetooth.protocols.5 \ @@ -80,6 +79,10 @@ MLINKS+=quota.user.5 quota.group.5 MLINKS+=rc.conf.5 rc.conf.local.5 MLINKS+=resolver.5 resolv.conf.5 +.if ${MK_AUTOFS} != "no" +MAN+= autofs.5 +.endif + .if ${MK_FREEBSD_UPDATE} != "no" MAN+= freebsd-update.conf.5 .endif Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Mon Jan 26 06:44:48 2015 (r277727) +++ head/share/mk/src.opts.mk Mon Jan 26 07:15:49 2015 (r277728) @@ -52,6 +52,7 @@ __DEFAULT_YES_OPTIONS = \ ATM \ AUDIT \ AUTHPF \ + AUTOFS \ BHYVE \ BINUTILS \ BINUTILS_BOOTSTRAP \ Modified: head/sys/conf/kern.opts.mk ============================================================================== --- head/sys/conf/kern.opts.mk Mon Jan 26 06:44:48 2015 (r277727) +++ head/sys/conf/kern.opts.mk Mon Jan 26 07:15:49 2015 (r277728) @@ -23,6 +23,7 @@ # src tree. __DEFAULT_YES_OPTIONS = \ + AUTOFS \ BHYVE \ BLUETOOTH \ CCD \ Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Mon Jan 26 06:44:48 2015 (r277727) +++ head/sys/modules/Makefile Mon Jan 26 07:15:49 2015 (r277728) @@ -47,7 +47,7 @@ SUBDIR= \ ata \ ath \ ath_pci \ - autofs \ + ${_autofs} \ ${_auxio} \ ${_bce} \ bfe \ @@ -382,6 +382,10 @@ SUBDIR= \ ${_zfs} \ zlib +.if ${MK_AUTOFS} != "no" || defined(ALL_MODULES) +_autofs= autofs +.endif + .if ${MK_CRYPT} != "no" || defined(ALL_MODULES) .if exists(${.CURDIR}/../opencrypto) _crypto= crypto Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Mon Jan 26 06:44:48 2015 (r277727) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Mon Jan 26 07:15:49 2015 (r277728) @@ -144,6 +144,26 @@ OLD_FILES+=usr/share/man/man8/authpf.8.g OLD_FILES+=usr/share/man/man8/authpf-noip.8.gz .endif +.if ${MK_AUTOFS} == no +OLD_FILES+=etc/autofs/include_ldap +OLD_FILES+=etc/autofs/special_hosts +OLD_FILES+=etc/autofs/special_media +OLD_FILES+=etc/autofs/special_null +OLD_FILES+=etc/auto_master +OLD_FILES+=etc/rc.d/automount +OLD_FILES+=etc/rc.d/automountd +OLD_FILES+=etc/rc.d/autounmountd +OLD_FILES+=usr/sbin/automount +OLD_FILES+=usr/sbin/automountd +OLD_FILES+=usr/sbin/autounmountd +OLD_FILES+=usr/share/man/man5/autofs.5.gz +OLD_FILES+=usr/share/man/man5/auto_master.5.gz +OLD_FILES+=usr/share/man/man8/automount.8.gz +OLD_FILES+=usr/share/man/man8/automountd.8.gz +OLD_FILES+=usr/share/man/man8/autounmountd.8.gz +OLD_DIRS+=etc/autofs +.endif + .if ${MK_BHYVE} == no OLD_FILES+=usr/sbin/bhyve OLD_FILES+=usr/sbin/bhyvectl Added: head/tools/build/options/WITHOUT_AUTOFS ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_AUTOFS Mon Jan 26 07:15:49 2015 (r277728) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to not build +.Xr autofs 4 +related programs, libraries, and kernel modules. Modified: head/usr.sbin/Makefile ============================================================================== --- head/usr.sbin/Makefile Mon Jan 26 06:44:48 2015 (r277727) +++ head/usr.sbin/Makefile Mon Jan 26 07:15:49 2015 (r277728) @@ -5,7 +5,6 @@ SUBDIR= adduser \ arp \ - autofs \ binmiscctl \ bootparamd \ bsdconfig \ @@ -124,6 +123,10 @@ SUBDIR+= praudit SUBDIR+= authpf .endif +.if ${MK_AUTOFS} != "no" +SUBDIR+= autofs +.endif + .if ${MK_BLUETOOTH} != "no" SUBDIR+= bluetooth .endif From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 07:24:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6F5F1D77; Mon, 26 Jan 2015 07:24:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 41376874; Mon, 26 Jan 2015 07:24:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0Q7OJgJ077676; Mon, 26 Jan 2015 07:24:19 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0Q7OJdl077675; Mon, 26 Jan 2015 07:24:19 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501260724.t0Q7OJdl077675@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 26 Jan 2015 07:24:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277729 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 07:24:19 -0000 Author: ngie Date: Mon Jan 26 07:24:18 2015 New Revision: 277729 URL: https://svnweb.freebsd.org/changeset/base/277729 Log: Regen src.conf(5) Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Mon Jan 26 07:15:49 2015 (r277728) +++ head/share/man/man5/src.conf.5 Mon Jan 26 07:24:18 2015 (r277729) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 255964 2013-10-01 07:22:04Z des .\" $FreeBSD$ -.Dd January 24, 2015 +.Dd January 25, 2015 .Dt SRC.CONF 5 .Os .Sh NAME @@ -121,6 +121,18 @@ Set to not build audit support into syst .\" from FreeBSD: head/tools/build/options/WITHOUT_AUTHPF 156932 2006-03-21 07:50:50Z ru Set to not build .Xr authpf 8 . +.It Va WITHOUT_AUTOFS +.\" from FreeBSD: head/tools/build/options/WITHOUT_AUTOFS 277728 2015-01-26 07:15:49Z ngie +Set to not build +.Xr autofs 4 +related programs, libraries, and kernel modules. +.It Va WITHOUT_BHYVE +.\" from FreeBSD: head/tools/build/options/WITHOUT_BHYVE 277727 2015-01-26 06:44:48Z ngie +Set to not build or install +.Xr bhyve 8 , +associated utilities, and examples. +.Pp +This option only affects amd64/amd64. .It Va WITHOUT_BINUTILS .\" from FreeBSD: head/tools/build/options/WITHOUT_BINUTILS 266158 2014-05-15 16:51:45Z brooks Set to not build or install binutils (as, c++-filt, gconv, @@ -543,6 +555,11 @@ You should consider installing the textp .It Va WITHOUT_GSSAPI .\" from FreeBSD: head/tools/build/options/WITHOUT_GSSAPI 174548 2007-12-12 16:39:32Z ru Set to not build libgssapi. +.It Va WITHOUT_HAST +.\" from FreeBSD: head/tools/build/options/WITHOUT_HAST 277725 2015-01-26 06:27:07Z ngie +Set to not build +.Xr hastd 8 +and related utilities. .It Va WITH_HESIOD .\" from FreeBSD: head/tools/build/options/WITH_HESIOD 156932 2006-03-21 07:50:50Z ru Set to build Hesiod support. From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 08:04:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A4A78276; Mon, 26 Jan 2015 08:04:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7689DBBF; Mon, 26 Jan 2015 08:04:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0Q84dwh096159; Mon, 26 Jan 2015 08:04:39 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0Q84cBR096155; Mon, 26 Jan 2015 08:04:38 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501260804.t0Q84cBR096155@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 26 Jan 2015 08:04:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277730 - in head: etc/devd etc/rc.d tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 08:04:39 -0000 Author: ngie Date: Mon Jan 26 08:04:38 2015 New Revision: 277730 URL: https://svnweb.freebsd.org/changeset/base/277730 Log: Honor MK_ACPI in etc/devd and etc/rc.d MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/etc/devd/Makefile head/etc/rc.d/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/etc/devd/Makefile ============================================================================== --- head/etc/devd/Makefile Mon Jan 26 07:24:18 2015 (r277729) +++ head/etc/devd/Makefile Mon Jan 26 08:04:38 2015 (r277730) @@ -2,12 +2,16 @@ .include +FILES= + .if ${MACHINE} == "powerpc" FILES+= apple.conf .endif .if ${MACHINE} == "amd64" || ${MACHINE} == "i386" +.if ${MK_ACPI} != "no" FILES+= asus.conf +.endif .if ${MK_HYPERV} != "no" FILES+= hyperv.conf .endif Modified: head/etc/rc.d/Makefile ============================================================================== --- head/etc/rc.d/Makefile Mon Jan 26 07:24:18 2015 (r277729) +++ head/etc/rc.d/Makefile Mon Jan 26 08:04:38 2015 (r277730) @@ -103,7 +103,6 @@ FILES= DAEMON \ pflog \ pfsync \ powerd \ - power_profile \ ppp \ pppoed \ pwcheck \ @@ -155,6 +154,10 @@ FILES= DAEMON \ zfs \ zvol +.if ${MK_ACPI} != "no" +FILES+= power_profile +.endif + .if ${MK_AUTOFS} != "no" FILES+= automount FILES+= automountd Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Mon Jan 26 07:24:18 2015 (r277729) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Mon Jan 26 08:04:38 2015 (r277730) @@ -14,6 +14,8 @@ OLD_FILES+=usr/share/man/man8/sa.8.gz .endif .if ${MK_ACPI} == no +OLD_FILES+=etc/devd/asus.conf +OLD_FILES+=etc/rc.d/power_profile OLD_FILES+=usr/sbin/acpiconf OLD_FILES+=usr/sbin/acpidb OLD_FILES+=usr/sbin/acpidump From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 08:20:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 394DF574; Mon, 26 Jan 2015 08:20:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25C4BD4D; Mon, 26 Jan 2015 08:20:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0Q8KrBx002619; Mon, 26 Jan 2015 08:20:53 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0Q8Kqs2002617; Mon, 26 Jan 2015 08:20:52 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501260820.t0Q8Kqs2002617@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 26 Jan 2015 08:20:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277731 - in head: etc/rc.d tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 08:20:53 -0000 Author: ngie Date: Mon Jan 26 08:20:51 2015 New Revision: 277731 URL: https://svnweb.freebsd.org/changeset/base/277731 Log: Honor MK_LPR with etc/rc.d/lpd MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/etc/rc.d/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/etc/rc.d/Makefile ============================================================================== --- head/etc/rc.d/Makefile Mon Jan 26 08:04:38 2015 (r277730) +++ head/etc/rc.d/Makefile Mon Jan 26 08:20:51 2015 (r277731) @@ -192,6 +192,10 @@ FILES+= iscsictl FILES+= iscsid .endif +.if ${MK_LPR} != "no" +FILES+= lpd +.endif + .if ${MK_NS_CACHING} != "no" _nscd= nscd .endif Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Mon Jan 26 08:04:38 2015 (r277730) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Mon Jan 26 08:20:51 2015 (r277731) @@ -3512,6 +3512,7 @@ OLD_FILES+=usr/share/man/man8/updatedb.8 .if ${MK_LPR} == no OLD_FILES+=etc/hosts.lpd OLD_FILES+=etc/printcap +OLD_FILES+=etc/rc.d/lpd OLD_FILES+=usr/bin/lp OLD_FILES+=usr/bin/lpq OLD_FILES+=usr/bin/lpr From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 08:23:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AB3466CD; Mon, 26 Jan 2015 08:23:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 965CDD61; Mon, 26 Jan 2015 08:23:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0Q8NbU1005455; Mon, 26 Jan 2015 08:23:37 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0Q8NbpH005453; Mon, 26 Jan 2015 08:23:37 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501260823.t0Q8NbpH005453@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 26 Jan 2015 08:23:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277732 - in head: etc/rc.d tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 08:23:37 -0000 Author: ngie Date: Mon Jan 26 08:23:36 2015 New Revision: 277732 URL: https://svnweb.freebsd.org/changeset/base/277732 Log: Honor MK_API in etc/rc.d MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/etc/rc.d/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/etc/rc.d/Makefile ============================================================================== --- head/etc/rc.d/Makefile Mon Jan 26 08:20:51 2015 (r277731) +++ head/etc/rc.d/Makefile Mon Jan 26 08:23:36 2015 (r277732) @@ -12,8 +12,6 @@ FILES= DAEMON \ addswap \ adjkerntz \ amd \ - apm \ - apmd \ archdep \ atm1 \ atm2 \ @@ -158,6 +156,11 @@ FILES= DAEMON \ FILES+= power_profile .endif +.if ${MK_APM} != "no" +FILES+= apm +FILES+= apmd +.endif + .if ${MK_AUTOFS} != "no" FILES+= automount FILES+= automountd Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Mon Jan 26 08:20:51 2015 (r277731) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Mon Jan 26 08:23:36 2015 (r277732) @@ -50,6 +50,8 @@ OLD_FILES+=usr/share/man/man8/wire-test. .endif .if ${MK_APM} == no +OLD_FILES+=etc/rc.d/apm +OLD_FILES+=etc/rc.d/apmd OLD_FILES+=etc/apmd.conf OLD_FILES+=usr/sbin/apm OLD_FILES+=usr/share/examples/etc/apmd.conf From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 08:28:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 45DB1927; Mon, 26 Jan 2015 08:28:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 32044D95; Mon, 26 Jan 2015 08:28:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0Q8SqDw006089; Mon, 26 Jan 2015 08:28:52 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0Q8Spge006087; Mon, 26 Jan 2015 08:28:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501260828.t0Q8Spge006087@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 26 Jan 2015 08:28:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277733 - in head: etc/rc.d tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 08:28:52 -0000 Author: ngie Date: Mon Jan 26 08:28:51 2015 New Revision: 277733 URL: https://svnweb.freebsd.org/changeset/base/277733 Log: Honor MK_AMD with etc/rc.d/amd MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/etc/rc.d/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/etc/rc.d/Makefile ============================================================================== --- head/etc/rc.d/Makefile Mon Jan 26 08:23:36 2015 (r277732) +++ head/etc/rc.d/Makefile Mon Jan 26 08:28:51 2015 (r277733) @@ -11,7 +11,6 @@ FILES= DAEMON \ accounting \ addswap \ adjkerntz \ - amd \ archdep \ atm1 \ atm2 \ @@ -156,6 +155,10 @@ FILES= DAEMON \ FILES+= power_profile .endif +.if ${MK_AMD} != "no" +FILES+= amd +.endif + .if ${MK_APM} != "no" FILES+= apm FILES+= apmd Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Mon Jan 26 08:23:36 2015 (r277732) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Mon Jan 26 08:28:51 2015 (r277733) @@ -28,6 +28,7 @@ OLD_FILES+=usr/share/man/man8/iasl.8.gz .if ${MK_AMD} == no OLD_FILES+=etc/amd.map +OLD_FILES+=etc/rc.d/amd OLD_FILES+=usr/bin/pawd OLD_FILES+=usr/sbin/amd OLD_FILES+=usr/sbin/amq From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 08:30:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D033AA89; Mon, 26 Jan 2015 08:30:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC71CDA5; Mon, 26 Jan 2015 08:30:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0Q8UOvi007094; Mon, 26 Jan 2015 08:30:24 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0Q8UOAM007093; Mon, 26 Jan 2015 08:30:24 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501260830.t0Q8UOAM007093@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 26 Jan 2015 08:30:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277734 - head/etc/rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 08:30:24 -0000 Author: ngie Date: Mon Jan 26 08:30:24 2015 New Revision: 277734 URL: https://svnweb.freebsd.org/changeset/base/277734 Log: Remove explicit inclusion of lpd from FILES X-MFC with: 277731 MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/etc/rc.d/Makefile Modified: head/etc/rc.d/Makefile ============================================================================== --- head/etc/rc.d/Makefile Mon Jan 26 08:28:51 2015 (r277733) +++ head/etc/rc.d/Makefile Mon Jan 26 08:30:24 2015 (r277734) @@ -68,7 +68,6 @@ FILES= DAEMON \ local \ localpkg \ lockd \ - lpd \ mixer \ motd \ mountcritlocal \ From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 08:42:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6B8FED70; Mon, 26 Jan 2015 08:42:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 56CB2F34; Mon, 26 Jan 2015 08:42:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0Q8gmWH014667; Mon, 26 Jan 2015 08:42:48 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0Q8gmhL014666; Mon, 26 Jan 2015 08:42:48 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201501260842.t0Q8gmhL014666@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: Roger Pau Monné Date: Mon, 26 Jan 2015 08:42:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277735 - head/sys/amd64/amd64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 08:42:48 -0000 Author: royger Date: Mon Jan 26 08:42:47 2015 New Revision: 277735 URL: https://svnweb.freebsd.org/changeset/base/277735 Log: amd64: allow base memory segment to start at address different than 0 Current code requires that the first physical memory segment starts at 0, but this is not really needed. We only need to make sure the bootstrap code and page tables for APs are allocated below 4GB. This patch removes this requirement and allows booting a Dell R710 from UEFI, where the first physical memory segment starts at 0x10000. Sponsored by: Citrix Systems R&D Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D1417 Modified: head/sys/amd64/amd64/machdep.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Mon Jan 26 08:30:24 2015 (r277734) +++ head/sys/amd64/amd64/machdep.c Mon Jan 26 08:42:47 2015 (r277735) @@ -1355,8 +1355,10 @@ add_physmap_entry(uint64_t base, uint64_ /* * Find insertion point while checking for overlap. Start off by * assuming the new entry will be added to the end. + * + * NB: physmap_idx points to the next free slot. */ - insert_idx = physmap_idx + 2; + insert_idx = physmap_idx; for (i = 0; i <= physmap_idx; i += 2) { if (base < physmap[i + 1]) { if (base + length <= physmap[i]) { @@ -1394,7 +1396,7 @@ add_physmap_entry(uint64_t base, uint64_ * Move the last 'N' entries down to make room for the new * entry if needed. */ - for (i = physmap_idx; i > insert_idx; i -= 2) { + for (i = (physmap_idx - 2); i > insert_idx; i -= 2) { physmap[i] = physmap[i - 2]; physmap[i + 1] = physmap[i - 1]; } @@ -1580,23 +1582,27 @@ getmemsize(caddr_t kmdp, u_int64_t first int page_counter; bzero(physmap, sizeof(physmap)); - basemem = 0; physmap_idx = 0; init_ops.parse_memmap(kmdp, physmap, &physmap_idx); + physmap_idx -= 2; /* * Find the 'base memory' segment for SMP */ basemem = 0; for (i = 0; i <= physmap_idx; i += 2) { - if (physmap[i] == 0x00000000) { + if (physmap[i] <= 0xA0000) { basemem = physmap[i + 1] / 1024; break; } } - if (basemem == 0) - panic("BIOS smap did not include a basemem segment!"); + if (basemem == 0 || basemem > 640) { + if (bootverbose) + printf( + "Memory map doesn't contain a basemem segment, faking it"); + basemem = 640; + } /* * Make hole for "AP -> long mode" bootstrap code. The @@ -1604,8 +1610,12 @@ getmemsize(caddr_t kmdp, u_int64_t first * is configured to support APs and APs for the system start * in 32bit mode (e.g. SMP bare metal). */ - if (init_ops.mp_bootaddress) + if (init_ops.mp_bootaddress) { + if (physmap[1] >= 0x100000000) + panic( + "Basemem segment is not suitable for AP bootstrap code!"); physmap[1] = init_ops.mp_bootaddress(physmap[1] / 1024); + } /* * Maxmem isn't the "maximum memory", it's one larger than the @@ -1657,12 +1667,14 @@ getmemsize(caddr_t kmdp, u_int64_t first */ physmem_start = (vm_guest > VM_GUEST_NO ? 1 : 16) << PAGE_SHIFT; TUNABLE_ULONG_FETCH("hw.physmem.start", &physmem_start); - if (physmem_start < PAGE_SIZE) - physmap[0] = PAGE_SIZE; - else if (physmem_start >= physmap[1]) - physmap[0] = round_page(physmap[1] - PAGE_SIZE); - else - physmap[0] = round_page(physmem_start); + if (physmap[0] < physmem_start) { + if (physmem_start < PAGE_SIZE) + physmap[0] = PAGE_SIZE; + else if (physmem_start >= physmap[1]) + physmap[0] = round_page(physmap[1] - PAGE_SIZE); + else + physmap[0] = round_page(physmem_start); + } pa_indx = 0; da_indx = 1; phys_avail[pa_indx++] = physmap[0]; From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 08:46:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C83F6F31; Mon, 26 Jan 2015 08:46:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3C15F5E; Mon, 26 Jan 2015 08:46:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0Q8kR4W015179; Mon, 26 Jan 2015 08:46:27 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0Q8kRoB015174; Mon, 26 Jan 2015 08:46:27 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501260846.t0Q8kRoB015174@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 26 Jan 2015 08:46:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277736 - in head: etc/rc.d tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 08:46:27 -0000 Author: ngie Date: Mon Jan 26 08:46:26 2015 New Revision: 277736 URL: https://svnweb.freebsd.org/changeset/base/277736 Log: Honor MK_ACCT with etc/rc.d/accounting MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/etc/rc.d/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/etc/rc.d/Makefile ============================================================================== --- head/etc/rc.d/Makefile Mon Jan 26 08:42:47 2015 (r277735) +++ head/etc/rc.d/Makefile Mon Jan 26 08:46:26 2015 (r277736) @@ -150,6 +150,10 @@ FILES= DAEMON \ zfs \ zvol +.if ${MK_ACCT} != "no" +FILES+= accounting +.endif + .if ${MK_ACPI} != "no" FILES+= power_profile .endif Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Mon Jan 26 08:42:47 2015 (r277735) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Mon Jan 26 08:46:26 2015 (r277736) @@ -6,6 +6,7 @@ # .if ${MK_ACCT} == no +OLD_FILES+=etc/rc.d/accounting OLD_FILES+=etc/periodic/daily/310.accounting OLD_FILES+=usr/sbin/accton OLD_FILES+=usr/sbin/sa From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 08:50:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 01190141; Mon, 26 Jan 2015 08:50:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1342FF2; Mon, 26 Jan 2015 08:50:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0Q8oD3D015724; Mon, 26 Jan 2015 08:50:13 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0Q8oDna015719; Mon, 26 Jan 2015 08:50:13 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501260850.t0Q8oDna015719@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 26 Jan 2015 08:50:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277737 - in head: etc/pam.d tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 08:50:14 -0000 Author: ngie Date: Mon Jan 26 08:50:12 2015 New Revision: 277737 URL: https://svnweb.freebsd.org/changeset/base/277737 Log: Honor MK_ACCT with etc/pam.d/atrun MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/etc/pam.d/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/etc/pam.d/Makefile ============================================================================== --- head/etc/pam.d/Makefile Mon Jan 26 08:46:26 2015 (r277736) +++ head/etc/pam.d/Makefile Mon Jan 26 08:50:12 2015 (r277737) @@ -1,9 +1,10 @@ # $FreeBSD$ +.include + NO_OBJ= FILES= README \ - atrun \ cron \ ftpd \ imap \ @@ -15,6 +16,10 @@ FILES= README \ telnetd \ xdm +.if ${MK_AT} != "no" +FILES+= atrun +.endif + FILESDIR= /etc/pam.d FILESMODE= 644 FILESMODE_README= 444 Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Mon Jan 26 08:46:26 2015 (r277736) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Mon Jan 26 08:50:12 2015 (r277737) @@ -62,6 +62,7 @@ OLD_FILES+=usr/share/man/man8/amd64/apmc .endif .if ${MK_AT} == no +OLD_FILES+=etc/pam.d/atrun OLD_FILES+=usr/bin/at OLD_FILES+=usr/bin/atq OLD_FILES+=usr/bin/atrm From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 08:50:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 06D1B27D; Mon, 26 Jan 2015 08:50:51 +0000 (UTC) Received: from mail-pa0-x22f.google.com (mail-pa0-x22f.google.com [IPv6:2607:f8b0:400e:c03::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C28BB71; Mon, 26 Jan 2015 08:50:50 +0000 (UTC) Received: by mail-pa0-f47.google.com with SMTP id lj1so10581429pab.6; Mon, 26 Jan 2015 00:50:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=N4ycOqCjg/JbG+zdqrXBIBuQeHuin+1k9JHRdaNinUE=; b=EtzRiHB6Ne2jVll8Hj4EofHUkaV9kz3g3XDuRVuYRtmaKbaSgVXQqXjMwYK4oEJ0/l ZDAwxScHwNQ1+as2L0lhbeANuPxElo2n1/BidEtDYExORPM5fA2bU0e5/mEfbQ5RZ2ba Urr7B/p8Oe8e20gJQ61cp2Xvv90SqxhVe7hJq350JE58t86NusVy5E2JYk4etSy6bv+J AQMgmeNEYWPmCJS96wHgk/AkETSngxSufPFG9KdmJTRwQeG0R7RJL/d5GsmX3NUCwnR3 +7uxF/0oxxxIkH6C5s9bmb9CynowDAO77RKuIDL7FNeDLMNc+RboqoGQ1f5X6+VYMSD9 0ZtQ== X-Received: by 10.70.128.131 with SMTP id no3mr32359876pdb.18.1422262250295; Mon, 26 Jan 2015 00:50:50 -0800 (PST) Received: from ?IPv6:2601:8:ab80:7d6:51b0:f725:d83d:3d6? ([2601:8:ab80:7d6:51b0:f725:d83d:3d6]) by mx.google.com with ESMTPSA id l11sm9157324pdn.46.2015.01.26.00.50.49 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 26 Jan 2015 00:50:49 -0800 (PST) Content-Type: multipart/signed; boundary="Apple-Mail=_2195090C-FB59-4A20-A0F3-83E4F6A6A30C"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r277737 - in head: etc/pam.d tools/build/mk From: Garrett Cooper In-Reply-To: <201501260850.t0Q8oDna015719@svn.freebsd.org> Date: Mon, 26 Jan 2015 00:50:48 -0800 Message-Id: References: <201501260850.t0Q8oDna015719@svn.freebsd.org> To: Garrett Cooper X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 08:50:51 -0000 --Apple-Mail=_2195090C-FB59-4A20-A0F3-83E4F6A6A30C Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On Jan 26, 2015, at 0:50, Garrett Cooper wrote: > Author: ngie > Date: Mon Jan 26 08:50:12 2015 > New Revision: 277737 > URL: https://svnweb.freebsd.org/changeset/base/277737 > > Log: > Honor MK_ACCT with etc/pam.d/atrun > > MFC after: 2 weeks > Sponsored by: EMC / Isilon Storage Division I meant MK_AT --Apple-Mail=_2195090C-FB59-4A20-A0F3-83E4F6A6A30C Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJUxf/pAAoJEMZr5QU6S73eKvAH/2nVgkEjVfWbvq7Q4zqwA2kn vEyTi0D2FTJvNMeOp7XKM5Sxc6HanO30KR60vCzCynW9uZo9Bg2RrpMzFjY98h38 Hf+lcOGATlZ5Q51HHOfCiSecJyP798oPOlnZ61hYEdVEPFxbLWen+ooW5e25XWRI 4pIzbWWVGKiRA2bviwKACjVi4DV7eCdLRtg8ddM98OEpKh/oTqqOLBDnSFs3p071 py47TTvKcLQ0vlpI2YzY/f+IB403CPIPlAo9A+/BwT+F2ye3xwNMVtFo+Tdlch5/ fhqZTvTz3SQvM+AG48B20EwA31kgVkEH2ukIDd55GPI3u8p4ug4E3UhmJfVMEQI= =LBbU -----END PGP SIGNATURE----- --Apple-Mail=_2195090C-FB59-4A20-A0F3-83E4F6A6A30C-- From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 09:31:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5ADD3B62; Mon, 26 Jan 2015 09:31:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46ABA6E2; Mon, 26 Jan 2015 09:31:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0Q9Vnw6037777; Mon, 26 Jan 2015 09:31:49 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0Q9Vm9h037775; Mon, 26 Jan 2015 09:31:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501260931.t0Q9Vm9h037775@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 26 Jan 2015 09:31:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277738 - in head: etc/defaults tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 09:31:49 -0000 Author: ngie Date: Mon Jan 26 09:31:48 2015 New Revision: 277738 URL: https://svnweb.freebsd.org/changeset/base/277738 Log: Honor MK_BLUETOOTH with etc/defaults/bluetooth.device.conf MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/etc/defaults/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/etc/defaults/Makefile ============================================================================== --- head/etc/defaults/Makefile Mon Jan 26 08:50:12 2015 (r277737) +++ head/etc/defaults/Makefile Mon Jan 26 09:31:48 2015 (r277738) @@ -1,7 +1,13 @@ # $FreeBSD$ -FILES= bluetooth.device.conf devfs.rules periodic.conf rc.conf +.include + +FILES= devfs.rules periodic.conf rc.conf NO_OBJ= FILESDIR= /etc/defaults +.if ${MK_BLUETOOTH} != "no" +FILES+= bluetooth.device.conf +.endif + .include Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Mon Jan 26 08:50:12 2015 (r277737) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Mon Jan 26 09:31:48 2015 (r277738) @@ -185,6 +185,7 @@ OLD_DIRS+=usr/share/examples/bhyve OLD_FILES+=etc/bluetooth/hcsecd.conf OLD_FILES+=etc/bluetooth/hosts OLD_FILES+=etc/bluetooth/protocols +OLD_FILES+=etc/defaults/bluetooth.device.conf OLD_DIRS+=etc/bluetooth OLD_FILES+=usr/bin/bthost OLD_FILES+=usr/bin/btsockstat From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 09:37:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B933AD64; Mon, 26 Jan 2015 09:37:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A508C77D; Mon, 26 Jan 2015 09:37:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0Q9bFME038512; Mon, 26 Jan 2015 09:37:15 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0Q9bFAR038508; Mon, 26 Jan 2015 09:37:15 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501260937.t0Q9bFAR038508@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 26 Jan 2015 09:37:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277739 - in head: etc/rc.d tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 09:37:15 -0000 Author: ngie Date: Mon Jan 26 09:37:14 2015 New Revision: 277739 URL: https://svnweb.freebsd.org/changeset/base/277739 Log: Honor MK_JAIL with etc/rc.d/jail MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/etc/rc.d/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/etc/rc.d/Makefile ============================================================================== --- head/etc/rc.d/Makefile Mon Jan 26 09:31:48 2015 (r277738) +++ head/etc/rc.d/Makefile Mon Jan 26 09:37:14 2015 (r277739) @@ -57,7 +57,6 @@ FILES= DAEMON \ ipropd_master \ ipropd_slave \ ipsec \ - jail \ ${_kadmind} \ ${_kdc} \ ${_kfd} \ @@ -201,6 +200,10 @@ FILES+= iscsictl FILES+= iscsid .endif +.if ${MK_JAIL} != "no" +FILES+= jail +.endif + .if ${MK_LPR} != "no" FILES+= lpd .endif Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Mon Jan 26 09:31:48 2015 (r277738) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Mon Jan 26 09:37:14 2015 (r277739) @@ -2369,6 +2369,7 @@ OLD_FILES+=usr/share/man/man8/iscsid.8.g .endif .if ${MK_JAIL} == no +OLD_FILES+=etc/rc.d/jail OLD_FILES+=usr/sbin/jail OLD_FILES+=usr/sbin/jexec OLD_FILES+=usr/sbin/jls From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 09:43:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 76594F98; Mon, 26 Jan 2015 09:43:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 625DF853; Mon, 26 Jan 2015 09:43:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0Q9h9v1042664; Mon, 26 Jan 2015 09:43:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0Q9h8A1042662; Mon, 26 Jan 2015 09:43:08 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501260943.t0Q9h8A1042662@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 26 Jan 2015 09:43:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277740 - in head: etc/rc.d tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 09:43:09 -0000 Author: ngie Date: Mon Jan 26 09:43:08 2015 New Revision: 277740 URL: https://svnweb.freebsd.org/changeset/base/277740 Log: Honor MK_WIRELESS with etc/rc.d/hostapd and etc/rc.d/wpa_supplicant MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/etc/rc.d/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/etc/rc.d/Makefile ============================================================================== --- head/etc/rc.d/Makefile Mon Jan 26 09:37:14 2015 (r277739) +++ head/etc/rc.d/Makefile Mon Jan 26 09:43:08 2015 (r277740) @@ -247,6 +247,11 @@ _unbound= local_unbound _utx= utx .endif +.if ${MK_WIRELESS} != "no" +FILES+= hostapd +FILES+= wpa_supplicant +.endif + FILESDIR= /etc/rc.d FILESMODE= ${BINMODE} Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Mon Jan 26 09:37:14 2015 (r277739) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Mon Jan 26 09:43:08 2015 (r277740) @@ -4981,6 +4981,8 @@ OLD_FILES+=usr/share/man/man8/utx.8.gz .if ${MK_WIRELESS} == no OLD_FILES+=etc/regdomain.xml +OLD_FILES+=etc/rc.d/hostapd +OLD_FILES+=etc/rc.d/wpa_supplicant OLD_FILES+=usr/sbin/ancontrol OLD_FILES+=usr/sbin/hostapd OLD_FILES+=usr/sbin/hostapd_cli From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 09:51:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78DB347E; Mon, 26 Jan 2015 09:51:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 64DA0954; Mon, 26 Jan 2015 09:51:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0Q9pM8e046361; Mon, 26 Jan 2015 09:51:22 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0Q9pLUj046359; Mon, 26 Jan 2015 09:51:21 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501260951.t0Q9pLUj046359@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 26 Jan 2015 09:51:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277741 - in head: etc/rc.d tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 09:51:22 -0000 Author: ngie Date: Mon Jan 26 09:51:21 2015 New Revision: 277741 URL: https://svnweb.freebsd.org/changeset/base/277741 Log: Respect MK_KERBEROS with etc/rc.d/ipropd_master and etc/rc.d/ipropd_slave MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/etc/rc.d/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/etc/rc.d/Makefile ============================================================================== --- head/etc/rc.d/Makefile Mon Jan 26 09:43:08 2015 (r277740) +++ head/etc/rc.d/Makefile Mon Jan 26 09:51:21 2015 (r277741) @@ -54,8 +54,6 @@ FILES= DAEMON \ ipfw \ ipmon \ ipnat \ - ipropd_master \ - ipropd_slave \ ipsec \ ${_kadmind} \ ${_kdc} \ @@ -213,6 +211,8 @@ _nscd= nscd .endif .if ${MK_KERBEROS} != "no" +FILES+= ipropd_master +FILES+= ipropd_slave _kadmind= kadmind _kdc= kdc _kfd= kfd Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Mon Jan 26 09:43:08 2015 (r277740) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Mon Jan 26 09:51:21 2015 (r277741) @@ -2379,6 +2379,8 @@ OLD_FILES+=usr/share/man/man8/jls.8.gz .endif .if ${MK_KERBEROS} == no +OLD_FILES+=etc/rc.d/ipropd_master +OLD_FILES+=etc/rc.d/ipropd_slave OLD_FILES+=usr/bin/compile_et OLD_FILES+=usr/bin/hxtool OLD_FILES+=usr/bin/kadmin From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 10:11:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7616EBDF; Mon, 26 Jan 2015 10:11:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 62500B83; Mon, 26 Jan 2015 10:11:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0QABu1Z057282; Mon, 26 Jan 2015 10:11:56 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0QABugM057281; Mon, 26 Jan 2015 10:11:56 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501261011.t0QABugM057281@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 26 Jan 2015 10:11:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277743 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 10:11:56 -0000 Author: kib Date: Mon Jan 26 10:11:55 2015 New Revision: 277743 URL: https://svnweb.freebsd.org/changeset/base/277743 Log: Ensure that _tmppt KVA is used exclusively by providing exclusive sx lock around the mapping and uiomove(). Before r277643, it was partially protected by Giant (but potential sleeping in fault from uiomove() would still allow other thread to reuse the mapping). Noted by: ian Reviewed by: alc, ian Sponsored by: The FreeBSD Foundation MFC after: 3 weeks Modified: head/sys/arm/arm/mem.c Modified: head/sys/arm/arm/mem.c ============================================================================== --- head/sys/arm/arm/mem.c Mon Jan 26 09:53:41 2015 (r277742) +++ head/sys/arm/arm/mem.c Mon Jan 26 10:11:55 2015 (r277743) @@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -72,6 +73,9 @@ MALLOC_DEFINE(M_MEMDESC, "memdesc", "mem struct mem_range_softc mem_range_softc; +static struct sx tmppt_lock; +SX_SYSINIT(tmppt, &tmppt_lock, "mem4map"); + /* ARGSUSED */ int memrw(struct cdev *dev, struct uio *uio, int flags) @@ -107,6 +111,7 @@ memrw(struct cdev *dev, struct uio *uio, } if (!address_valid) return (EINVAL); + sx_xlock(&tmppt_lock); pmap_kenter((vm_offset_t)_tmppt, v); o = (int)uio->uio_offset & PAGE_MASK; c = (u_int)(PAGE_SIZE - ((int)iov->iov_base & PAGE_MASK)); @@ -114,6 +119,7 @@ memrw(struct cdev *dev, struct uio *uio, c = min(c, (u_int)iov->iov_len); error = uiomove((caddr_t)&_tmppt[o], (int)c, uio); pmap_qremove((vm_offset_t)_tmppt, 1); + sx_xunlock(&tmppt_lock); continue; } else if (dev2unit(dev) == CDEV_MINOR_KMEM) { From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 10:31:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1579FB4; Mon, 26 Jan 2015 10:31:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EABFAD70; Mon, 26 Jan 2015 10:31:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0QAVIWT064604; Mon, 26 Jan 2015 10:31:18 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0QAVI33064601; Mon, 26 Jan 2015 10:31:18 GMT (envelope-from br@FreeBSD.org) Message-Id: <201501261031.t0QAVI33064601@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Mon, 26 Jan 2015 10:31:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277745 - in head/sys: arm/arm boot/fdt/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 10:31:19 -0000 Author: br Date: Mon Jan 26 10:31:17 2015 New Revision: 277745 URL: https://svnweb.freebsd.org/changeset/base/277745 Log: Add a generic way for hooking PMC interrupt. Added: head/sys/arm/arm/pmu.c (contents, props changed) Modified: head/sys/boot/fdt/dts/arm/am335x.dtsi Added: head/sys/arm/arm/pmu.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/arm/pmu.c Mon Jan 26 10:31:17 2015 (r277745) @@ -0,0 +1,157 @@ +/*- + * Copyright (c) 2015 Ruslan Bukin + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * Performance Monitoring Unit + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_hwpmc_hooks.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +struct pmu_softc { + struct resource *res[1]; + device_t dev; + void *ih; +}; + +static struct ofw_compat_data compat_data[] = { + {"arm,cortex-a17-pmu", 1}, + {"arm,cortex-a15-pmu", 1}, + {"arm,cortex-a12-pmu", 1}, + {"arm,cortex-a9-pmu", 1}, + {"arm,cortex-a8-pmu", 1}, + {"arm,cortex-a7-pmu", 1}, + {"arm,cortex-a5-pmu", 1}, + {"arm,arm11mpcore-pmu", 1}, + {"arm,arm1176-pmu", 1}, + {"arm,arm1136-pmu", 1}, + {"qcom,krait-pmu", 1}, + {NULL, 0} +}; + +static struct resource_spec pmu_spec[] = { + { SYS_RES_IRQ, 0, RF_ACTIVE }, + { -1, 0 } +}; + +static int +pmu_intr(void *arg) +{ + struct trapframe *tf; + + tf = arg; + +#ifdef HWPMC_HOOKS + if (pmc_intr) + (*pmc_intr)(PCPU_GET(cpuid), tf); +#endif + + return (FILTER_HANDLED); +} + +static int +pmu_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data != 0) { + device_set_desc(dev, "Performance Monitoring Unit"); + return (BUS_PROBE_DEFAULT); + } + + return (ENXIO); +} + +static int +pmu_attach(device_t dev) +{ + struct pmu_softc *sc; + int err; + + sc = device_get_softc(dev); + sc->dev = dev; + + if (bus_alloc_resources(dev, pmu_spec, sc->res)) { + device_printf(dev, "could not allocate resources\n"); + return (ENXIO); + } + + /* Setup interrupt handler */ + err = bus_setup_intr(dev, sc->res[0], INTR_MPSAFE | INTR_TYPE_MISC, + pmu_intr, NULL, NULL, &sc->ih); + if (err) { + device_printf(dev, "Unable to setup interrupt handler.\n"); + return (ENXIO); + } + + return (0); +} + +static device_method_t pmu_methods[] = { + DEVMETHOD(device_probe, pmu_probe), + DEVMETHOD(device_attach, pmu_attach), + { 0, 0 } +}; + +static driver_t pmu_driver = { + "pmu", + pmu_methods, + sizeof(struct pmu_softc), +}; + +static devclass_t pmu_devclass; + +DRIVER_MODULE(pmu, simplebus, pmu_driver, pmu_devclass, 0, 0); Modified: head/sys/boot/fdt/dts/arm/am335x.dtsi ============================================================================== --- head/sys/boot/fdt/dts/arm/am335x.dtsi Mon Jan 26 10:25:26 2015 (r277744) +++ head/sys/boot/fdt/dts/arm/am335x.dtsi Mon Jan 26 10:31:17 2015 (r277745) @@ -47,6 +47,11 @@ reg = < 0x48200000 0x1000 >; }; + pmu { + compatible = "arm,cortex-a8-pmu"; + interrupts = <3>; + }; + scm@44e10000 { compatible = "ti,scm"; reg = < 0x44e10000 0x2000 >; From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 11:37:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1FEF67BC; Mon, 26 Jan 2015 11:37:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B8093F0; Mon, 26 Jan 2015 11:37:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0QBbH9s095932; Mon, 26 Jan 2015 11:37:17 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0QBbHtc095930; Mon, 26 Jan 2015 11:37:17 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501261137.t0QBbHtc095930@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 26 Jan 2015 11:37: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: r277746 - stable/10/sys/fs/devfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 11:37:18 -0000 Author: kib Date: Mon Jan 26 11:37:16 2015 New Revision: 277746 URL: https://svnweb.freebsd.org/changeset/base/277746 Log: MFC r277390: Ignore devfs directory entries for devices being destroyed. Modified: stable/10/sys/fs/devfs/devfs_devs.c stable/10/sys/fs/devfs/devfs_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/devfs/devfs_devs.c ============================================================================== --- stable/10/sys/fs/devfs/devfs_devs.c Mon Jan 26 10:31:17 2015 (r277745) +++ stable/10/sys/fs/devfs/devfs_devs.c Mon Jan 26 11:37:16 2015 (r277746) @@ -186,6 +186,16 @@ devfs_find(struct devfs_dirent *dd, cons continue; if (type != 0 && type != de->de_dirent->d_type) continue; + + /* + * The race with finding non-active name is not + * completely closed by the check, but it is similar + * to the devfs_allocv() in making it unlikely enough. + */ + if (de->de_dirent->d_type == DT_CHR && + (de->de_cdp->cdp_flags & CDP_ACTIVE) == 0) + continue; + if (bcmp(name, de->de_dirent->d_name, namelen) != 0) continue; break; Modified: stable/10/sys/fs/devfs/devfs_vnops.c ============================================================================== --- stable/10/sys/fs/devfs/devfs_vnops.c Mon Jan 26 10:31:17 2015 (r277745) +++ stable/10/sys/fs/devfs/devfs_vnops.c Mon Jan 26 11:37:16 2015 (r277746) @@ -1023,6 +1023,9 @@ devfs_mknod(struct vop_mknod_args *ap) TAILQ_FOREACH(de, &dd->de_dlist, de_list) { if (cnp->cn_namelen != de->de_dirent->d_namlen) continue; + if (de->de_dirent->d_type == DT_CHR && + (de->de_cdp->cdp_flags & CDP_ACTIVE) == 0) + continue; if (bcmp(cnp->cn_nameptr, de->de_dirent->d_name, de->de_dirent->d_namlen) != 0) continue; From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 11:49:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 63BFBA33; Mon, 26 Jan 2015 11:49:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F2526CB; Mon, 26 Jan 2015 11:49:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0QBn7rW001194; Mon, 26 Jan 2015 11:49:07 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0QBn6sM001192; Mon, 26 Jan 2015 11:49:06 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501261149.t0QBn6sM001192@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 26 Jan 2015 11:49: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: r277747 - in stable/10: bin/expr bin/expr/tests etc/mtree X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 11:49:07 -0000 Author: ngie Date: Mon Jan 26 11:49:06 2015 New Revision: 277747 URL: https://svnweb.freebsd.org/changeset/base/277747 Log: MFC r277358: r277358 (by ngie): Integrate contrib/netbsd-tests/bin/expr into the build/kyua as bin/expr/tests Sponsored by: EMC / Isilon Storage Division Added: stable/10/bin/expr/tests/ - copied from r277358, head/bin/expr/tests/ Modified: stable/10/bin/expr/Makefile stable/10/etc/mtree/BSD.tests.dist Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/expr/Makefile ============================================================================== --- stable/10/bin/expr/Makefile Mon Jan 26 11:37:16 2015 (r277746) +++ stable/10/bin/expr/Makefile Mon Jan 26 11:49:06 2015 (r277747) @@ -1,9 +1,15 @@ # $FreeBSD$ +.include + PROG= expr SRCS= expr.y YFLAGS= NO_WMISSING_VARIABLE_DECLARATIONS= +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Mon Jan 26 11:37:16 2015 (r277746) +++ stable/10/etc/mtree/BSD.tests.dist Mon Jan 26 11:49:06 2015 (r277747) @@ -10,6 +10,8 @@ .. date .. + expr + .. mv .. pax From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 12:24:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4CE34356; Mon, 26 Jan 2015 12:24:44 +0000 (UTC) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 0DA5FAFA; Mon, 26 Jan 2015 12:24:43 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id 0C2744525; Mon, 26 Jan 2015 12:24:43 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id C4FE01DF; Mon, 26 Jan 2015 13:23:57 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Garrett Cooper Subject: Re: svn commit: r277737 - in head: etc/pam.d tools/build/mk References: <201501260850.t0Q8oDna015719@svn.freebsd.org> Date: Mon, 26 Jan 2015 13:23:57 +0100 In-Reply-To: <201501260850.t0Q8oDna015719@svn.freebsd.org> (Garrett Cooper's message of "Mon, 26 Jan 2015 08:50:13 +0000 (UTC)") Message-ID: <86fvax91cy.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 12:24:44 -0000 Garrett Cooper writes: > Log: > Honor MK_ACCT with etc/pam.d/atrun The correct idiom would be Index: etc/pam.d/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- etc/pam.d/Makefile (revision 277747) +++ etc/pam.d/Makefile (working copy) @@ -5,6 +5,7 @@ NO_OBJ=3D =20 FILES=3D README \ + ${_atrun} \ cron \ ftpd \ imap \ @@ -17,7 +18,7 @@ xdm =20 .if ${MK_AT} !=3D "no" -FILES+=3D atrun +_atrun=3D atrun .endif =20 FILESDIR=3D /etc/pam.d DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 13:17:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 58AF4A16; Mon, 26 Jan 2015 13:17:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43DD4F96; Mon, 26 Jan 2015 13:17:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0QDHLUa043353; Mon, 26 Jan 2015 13:17:21 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0QDHLNr043352; Mon, 26 Jan 2015 13:17:21 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201501261317.t0QDHLNr043352@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 26 Jan 2015 13:17:21 +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: r277748 - stable/10/usr.sbin/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 13:17:21 -0000 Author: trasz Date: Mon Jan 26 13:17:20 2015 New Revision: 277748 URL: https://svnweb.freebsd.org/changeset/base/277748 Log: MFC r275746: Fix markup. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/autofs/autounmountd.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/autounmountd.8 ============================================================================== --- stable/10/usr.sbin/autofs/autounmountd.8 Mon Jan 26 11:49:06 2015 (r277747) +++ stable/10/usr.sbin/autofs/autounmountd.8 Mon Jan 26 13:17:20 2015 (r277748) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 20, 2014 +.Dd December 13, 2014 .Dt AUTOUNMOUNTD 8 .Os .Sh NAME @@ -36,8 +36,8 @@ .Sh SYNOPSIS .Nm .Op Fl d -.Op Fl r time -.Op Fl t time +.Op Fl r Ar time +.Op Fl t Ar time .Op Fl v .Sh DESCRIPTION The From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 13:21:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3ED78B86; Mon, 26 Jan 2015 13:21:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A2FFB8; Mon, 26 Jan 2015 13:21:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0QDLVnS047331; Mon, 26 Jan 2015 13:21:31 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0QDLVLb047330; Mon, 26 Jan 2015 13:21:31 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201501261321.t0QDLVLb047330@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 26 Jan 2015 13:21: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: r277749 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 13:21:31 -0000 Author: trasz Date: Mon Jan 26 13:21:30 2015 New Revision: 277749 URL: https://svnweb.freebsd.org/changeset/base/277749 Log: MFC r274791: Add missing error checking for kernel_port_{add,remove}(). Both can fail for reasons yet unknown; don't make it increment cumulated_error as a kind of temporary workaround. MFC r275399: Fix null pointer dereference. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/ctld/ctld.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/ctld.c ============================================================================== --- stable/10/usr.sbin/ctld/ctld.c Mon Jan 26 13:17:20 2015 (r277748) +++ stable/10/usr.sbin/ctld/ctld.c Mon Jan 26 13:21:30 2015 (r277749) @@ -1680,7 +1680,16 @@ conf_apply(struct conf *oldconf, struct cumulated_error++; } } - kernel_port_remove(oldtarg); + error = kernel_port_remove(oldtarg); + if (error != 0) { + log_warnx("failed to remove target %s", + oldtarg->t_name); + /* + * XXX: Uncomment after fixing the root cause. + * + * cumulated_error++; + */ + } continue; } @@ -1814,8 +1823,18 @@ conf_apply(struct conf *oldconf, struct cumulated_error++; } } - if (oldtarg == NULL) - kernel_port_add(newtarg); + if (oldtarg == NULL) { + error = kernel_port_add(newtarg); + if (error != 0) { + log_warnx("failed to add target %s", + newtarg->t_name); + /* + * XXX: Uncomment after fixing the root cause. + * + * cumulated_error++; + */ + } + } } /* From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 13:28:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DCA45D83; Mon, 26 Jan 2015 13:28:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6F4F102; Mon, 26 Jan 2015 13:28:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0QDSEHW048211; Mon, 26 Jan 2015 13:28:14 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0QDSEkq048207; Mon, 26 Jan 2015 13:28:14 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201501261328.t0QDSEkq048207@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 26 Jan 2015 13:28: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: r277750 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 13:28:15 -0000 Author: trasz Date: Mon Jan 26 13:28:13 2015 New Revision: 277750 URL: https://svnweb.freebsd.org/changeset/base/277750 Log: MFC r272106 by gavin@: Add basic man page for ipheth(4). Added: stable/10/share/man/man4/ipheth.4 - copied unchanged from r272106, head/share/man/man4/ipheth.4 Modified: stable/10/share/man/man4/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/Makefile ============================================================================== --- stable/10/share/man/man4/Makefile Mon Jan 26 13:21:30 2015 (r277749) +++ stable/10/share/man/man4/Makefile Mon Jan 26 13:28:13 2015 (r277750) @@ -201,6 +201,7 @@ MAN= aac.4 \ ip.4 \ ip6.4 \ ipfirewall.4 \ + ipheth.4 \ ${_ipmi.4} \ ips.4 \ ipsec.4 \ Copied: stable/10/share/man/man4/ipheth.4 (from r272106, head/share/man/man4/ipheth.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/man/man4/ipheth.4 Mon Jan 26 13:28:13 2015 (r277750, copy of r272106, head/share/man/man4/ipheth.4) @@ -0,0 +1,93 @@ +.\" Copyright (c) 2014 Gavin Atkinson +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" +.\" - Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" - Redistributions in binary form must reproduce the above +.\" copyright notice, this list of conditions and the following +.\" disclaimer in the documentation and/or other materials provided +.\" with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +.\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +.\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd September 25, 2014 +.Dt IPHETH 4 +.Os +.Sh NAME +.Nm ipheth +.Nd "USB Apple iPhone/iPad Ethernet driver" +.Sh SYNOPSIS +To load the driver as a module at boot time, place the +following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_ipheth_load="YES" +.Ed +.Pp +Alternatively, to compile this driver into the kernel, place the +following lines in your kernel configuration file: +.Bd -ragged -offset indent +.Cd "device uhci" +.Cd "device ohci" +.Cd "device usb" +.Cd "device ipheth" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for network access through Apple +iPhone and iPad devices, often referred to as USB tethering. +.Pp +.Nm +should work with any Apple iPhone or iPad device. +In most cases this must be explicitly enabled on the device first. +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Sh HARDWARE +The following devices are supported by the +.Nm +driver: +.Pp +.Bl -bullet -compact +.It +Apple iPhone (all models) +.It +Apple iPad (all models) +.El +.Sh SEE ALSO +.Xr arp 4 , +.Xr cdce 4 , +.Xr intro 4 , +.Xr netintro 4 , +.Xr urndis 4 , +.Xr usb 4 , +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 8.2 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Hans Petter Selasky Aq Mt hselasky@FreeBSD.org . From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 13:29:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CCF6EEDC; Mon, 26 Jan 2015 13:29:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B8195120; Mon, 26 Jan 2015 13:29:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0QDTiMo048435; Mon, 26 Jan 2015 13:29:44 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0QDTiYp048433; Mon, 26 Jan 2015 13:29:44 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201501261329.t0QDTiYp048433@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 26 Jan 2015 13:29: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: r277751 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 13:29:44 -0000 Author: trasz Date: Mon Jan 26 13:29:43 2015 New Revision: 277751 URL: https://svnweb.freebsd.org/changeset/base/277751 Log: MFC r272107 by gavin@: Cross reference cdce(4), ipheth(4) and urndis(4) from each other. Modified: stable/10/share/man/man4/cdce.4 stable/10/share/man/man4/urndis.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/cdce.4 ============================================================================== --- stable/10/share/man/man4/cdce.4 Mon Jan 26 13:28:13 2015 (r277750) +++ stable/10/share/man/man4/cdce.4 Mon Jan 26 13:29:43 2015 (r277751) @@ -28,7 +28,7 @@ .\" $NetBSD: cdce.4,v 1.4 2004/12/08 18:35:56 peter Exp $ .\" $FreeBSD$ .\" -.Dd September 17, 2005 +.Dd September 25, 2014 .Dt CDCE 4 .Os .Sh NAME @@ -114,9 +114,10 @@ is running low on mbufs. .Sh SEE ALSO .Xr arp 4 , .Xr intro 4 , +.Xr ipheth 4 , .Xr netintro 4 , +.Xr urndis 4 , .Xr usb 4 , -.\" .Xr hostname.if 5 , .Xr ifconfig 8 .Rs .%T "Universal Serial Bus Class Definitions for Communication Devices" Modified: stable/10/share/man/man4/urndis.4 ============================================================================== --- stable/10/share/man/man4/urndis.4 Mon Jan 26 13:28:13 2015 (r277750) +++ stable/10/share/man/man4/urndis.4 Mon Jan 26 13:29:43 2015 (r277751) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 21, 2014 +.Dd September 25, 2014 .Dt URNDIS 4 .Os .Sh NAME @@ -70,6 +70,8 @@ For more information on configuring this .Xr ifconfig 8 . .Sh SEE ALSO .Xr arp 4 , +.Xr cdce 4 , +.Xr ipheth 4 , .Xr netintro 4 , .Xr usb 4 , .Xr ifconfig 8 From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 13:32:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9E89998; Mon, 26 Jan 2015 13:32:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 821F01DE; Mon, 26 Jan 2015 13:32:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0QDW8vA052279; Mon, 26 Jan 2015 13:32:08 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0QDW8PG052278; Mon, 26 Jan 2015 13:32:08 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201501261332.t0QDW8PG052278@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 26 Jan 2015 13:32:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277752 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 13:32:08 -0000 Author: trasz Date: Mon Jan 26 13:32:07 2015 New Revision: 277752 URL: https://svnweb.freebsd.org/changeset/base/277752 Log: MFC r272165 by gavin@: Add very basic outline man page for smsc(4). Added: stable/10/share/man/man4/smsc.4 - copied unchanged from r272165, head/share/man/man4/smsc.4 Modified: stable/10/share/man/man4/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/Makefile ============================================================================== --- stable/10/share/man/man4/Makefile Mon Jan 26 13:29:43 2015 (r277751) +++ stable/10/share/man/man4/Makefile Mon Jan 26 13:32:07 2015 (r277752) @@ -440,6 +440,7 @@ MAN= aac.4 \ smb.4 \ smbus.4 \ smp.4 \ + smsc.4 \ sn.4 \ snd_ad1816.4 \ snd_als4000.4 \ Copied: stable/10/share/man/man4/smsc.4 (from r272165, head/share/man/man4/smsc.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/man/man4/smsc.4 Mon Jan 26 13:32:07 2015 (r277752, copy of r272165, head/share/man/man4/smsc.4) @@ -0,0 +1,89 @@ +.\" Copyright (c) 2014 Gavin Atkinson +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" +.\" - Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" - Redistributions in binary form must reproduce the above +.\" copyright notice, this list of conditions and the following +.\" disclaimer in the documentation and/or other materials provided +.\" with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +.\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +.\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd September 26, 2014 +.Dt SMSC 4 +.Os +.Sh NAME +.Nm smsc +.Nd "USB SMSC LAN9xxx Fast Ethernet driver" +.Sh SYNOPSIS +To load the driver as a module at boot time, place the +following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_smsc_load="YES" +.Ed +.Pp +Alternatively, to compile this driver into the kernel, place the +following lines in your kernel configuration file: +.Bd -ragged -offset indent +.Cd "device uhci" +.Cd "device ohci" +.Cd "device usb" +.Cd "device smsc" +.Ed +.Sh DESCRIPTION +The +.Nm +device driver provides support for USB Fast Ethernet adapters based +on the SMSC LAN9xxx chipsets. +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Sh HARDWARE +The following devices are supported by the +.Nm +driver: +.Pp +.Bl -bullet -compact +.It +SMSC LAN9500, LAN9500A, LAN9505 and LAN9505A based Ethernet adapters +.It +SMSC LAN89530, LAN9530 and LAN9730 based Ethernet adapters +.It +SMSC LAN951x Ethernet adapters with integrated USB hub +.El +.Sh SEE ALSO +.Xr arp 4 , +.Xr intro 4 , +.Xr netintro 4 , +.Xr usb 4 , +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 10.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Ben Gray Aq Mt bgray@FreeBSD.org . From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 13:34:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 366F026B; Mon, 26 Jan 2015 13:34:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A3BB1FA; Mon, 26 Jan 2015 13:34:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0QDYLxp052623; Mon, 26 Jan 2015 13:34:21 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0QDYLlr052622; Mon, 26 Jan 2015 13:34:21 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201501261334.t0QDYLlr052622@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 26 Jan 2015 13:34:21 +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: r277753 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 13:34:22 -0000 Author: trasz Date: Mon Jan 26 13:34:21 2015 New Revision: 277753 URL: https://svnweb.freebsd.org/changeset/base/277753 Log: MFC r272168 by gavin@: Add MLINKS for if_ipheth(4) and if_smsc(4). Modified: stable/10/share/man/man4/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/Makefile ============================================================================== --- stable/10/share/man/man4/Makefile Mon Jan 26 13:32:07 2015 (r277752) +++ stable/10/share/man/man4/Makefile Mon Jan 26 13:34:21 2015 (r277753) @@ -660,6 +660,7 @@ MLINKS+=ip.4 rawip.4 MLINKS+=ipfirewall.4 ipaccounting.4 \ ipfirewall.4 ipacct.4 \ ipfirewall.4 ipfw.4 +MLINKS+=ipheth.4 if_ipheth.4 MLINKS+=ipw.4 if_ipw.4 MLINKS+=iwi.4 if_iwi.4 MLINKS+=iwn.4 if_iwn.4 @@ -715,6 +716,7 @@ MLINKS+=sge.4 if_sge.4 MLINKS+=sis.4 if_sis.4 MLINKS+=sk.4 if_sk.4 MLINKS+=smp.4 SMP.4 +MLINKS+=smsc.4 if_smsc.4 MLINKS+=sn.4 if_sn.4 MLINKS+=snd_envy24.4 snd_ak452x.4 MLINKS+=snd_sbc.4 snd_sb16.4 \ From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 13:35:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8D5733D2; Mon, 26 Jan 2015 13:35:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7911B21F; Mon, 26 Jan 2015 13:35:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0QDZk7P052871; Mon, 26 Jan 2015 13:35:46 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0QDZktZ052869; Mon, 26 Jan 2015 13:35:46 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201501261335.t0QDZktZ052869@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 26 Jan 2015 13:35:46 +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: r277754 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 13:35:46 -0000 Author: trasz Date: Mon Jan 26 13:35:45 2015 New Revision: 277754 URL: https://svnweb.freebsd.org/changeset/base/277754 Log: MFC r272171 by pluknet@: Add smsc(4) to the list of drivers use the miibus interface. Modified: stable/10/share/man/man4/miibus.4 stable/10/share/man/man4/smsc.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/miibus.4 ============================================================================== --- stable/10/share/man/man4/miibus.4 Mon Jan 26 13:34:21 2015 (r277753) +++ stable/10/share/man/man4/miibus.4 Mon Jan 26 13:35:45 2015 (r277754) @@ -8,7 +8,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 15, 2011 +.Dd September 26, 2014 .Dt MIIBUS 4 .Os .Sh NAME @@ -105,6 +105,8 @@ Silicon Integrated Systems SiS190/191 Et Silicon Integrated Systems SiS 900/SiS 7016 .It Xr sk 4 SysKonnect SK-984x and SK-982x Gigabit Ethernet +.It Xr smsc 4 +SMSC LAN9xxx USB Fast Ethernet .It Xr ste 4 Sundance ST201 (D-Link DFE-550TX) .It Xr stge 4 @@ -169,6 +171,7 @@ but as a result are not well behaved new .Xr sge 4 , .Xr sis 4 , .Xr sk 4 , +.Xr smsc 4 , .Xr ste 4 , .Xr stge 4 , .Xr tl 4 , Modified: stable/10/share/man/man4/smsc.4 ============================================================================== --- stable/10/share/man/man4/smsc.4 Mon Jan 26 13:34:21 2015 (r277753) +++ stable/10/share/man/man4/smsc.4 Mon Jan 26 13:35:45 2015 (r277754) @@ -47,6 +47,7 @@ following lines in your kernel configura .Cd "device uhci" .Cd "device ohci" .Cd "device usb" +.Cd "device miibus" .Cd "device smsc" .Ed .Sh DESCRIPTION @@ -73,6 +74,7 @@ SMSC LAN951x Ethernet adapters with inte .Sh SEE ALSO .Xr arp 4 , .Xr intro 4 , +.Xr miibus 4 , .Xr netintro 4 , .Xr usb 4 , .Xr ifconfig 8 From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 13:37:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A60A054F; Mon, 26 Jan 2015 13:37:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7727C258; Mon, 26 Jan 2015 13:37:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0QDbJ99053127; Mon, 26 Jan 2015 13:37:19 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0QDbJRZ053126; Mon, 26 Jan 2015 13:37:19 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201501261337.t0QDbJRZ053126@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 26 Jan 2015 13:37:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277755 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 13:37:19 -0000 Author: trasz Date: Mon Jan 26 13:37:18 2015 New Revision: 277755 URL: https://svnweb.freebsd.org/changeset/base/277755 Log: MFC r272294 by gavin@: Make clear in the ipheth(4) hardware notes that this driver is for the tethering functionality only. Add a "bugs" section to give a pointer to usbconfig set_config if the device isn't automatically detected. Modified: stable/10/share/man/man4/ipheth.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/ipheth.4 ============================================================================== --- stable/10/share/man/man4/ipheth.4 Mon Jan 26 13:35:45 2015 (r277754) +++ stable/10/share/man/man4/ipheth.4 Mon Jan 26 13:37:18 2015 (r277755) @@ -27,12 +27,12 @@ .\" .\" $FreeBSD$ .\" -.Dd September 25, 2014 +.Dd September 30, 2014 .Dt IPHETH 4 .Os .Sh NAME .Nm ipheth -.Nd "USB Apple iPhone/iPad Ethernet driver" +.Nd "USB Apple iPhone/iPad tethered Ethernet driver" .Sh SYNOPSIS To load the driver as a module at boot time, place the following line in @@ -61,6 +61,7 @@ In most cases this must be explicitly en .Pp For more information on configuring this device, see .Xr ifconfig 8 . +The device does not support different media types or options. .Sh HARDWARE The following devices are supported by the .Nm @@ -68,9 +69,9 @@ driver: .Pp .Bl -bullet -compact .It -Apple iPhone (all models) +Apple iPhone tethering (all models) .It -Apple iPad (all models) +Apple iPad tethering (all models) .El .Sh SEE ALSO .Xr arp 4 , @@ -80,6 +81,7 @@ Apple iPad (all models) .Xr urndis 4 , .Xr usb 4 , .Xr ifconfig 8 +.Xr usbconfig 8 .Sh HISTORY The .Nm @@ -91,3 +93,14 @@ The .Nm driver was written by .An Hans Petter Selasky Aq Mt hselasky@FreeBSD.org . +.Sh BUGS +Some devices may need to be manually configured to use an alternative +configuration with the +.Xr usbconfig 8 +utility. +A command similar to +.Dl usbconfig -u 1 -a 2 set_config 3 +may be required if the device is not recognised automatically by +.Nm +after it is connected. + From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 13:39:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 76FA9697; Mon, 26 Jan 2015 13:39:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 625A426D; Mon, 26 Jan 2015 13:39:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0QDdaTq053482; Mon, 26 Jan 2015 13:39:36 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0QDdZ2U053480; Mon, 26 Jan 2015 13:39:35 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201501261339.t0QDdZ2U053480@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 26 Jan 2015 13:39: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: r277756 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 13:39:36 -0000 Author: trasz Date: Mon Jan 26 13:39:35 2015 New Revision: 277756 URL: https://svnweb.freebsd.org/changeset/base/277756 Log: MFC r274496: Fix mdoc warning by removing empty lines. Sponsored by: The FreeBSD Foundation Modified: stable/10/share/man/man4/ipheth.4 stable/10/share/man/man4/iscsi_initiator.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/ipheth.4 ============================================================================== --- stable/10/share/man/man4/ipheth.4 Mon Jan 26 13:37:18 2015 (r277755) +++ stable/10/share/man/man4/ipheth.4 Mon Jan 26 13:39:35 2015 (r277756) @@ -103,4 +103,3 @@ A command similar to may be required if the device is not recognised automatically by .Nm after it is connected. - Modified: stable/10/share/man/man4/iscsi_initiator.4 ============================================================================== --- stable/10/share/man/man4/iscsi_initiator.4 Mon Jan 26 13:37:18 2015 (r277755) +++ stable/10/share/man/man4/iscsi_initiator.4 Mon Jan 26 13:39:35 2015 (r277756) @@ -54,7 +54,6 @@ Users are advised to use instead. .Ef .Pp - The .Nm implements the kernel side of the Internet SCSI (iSCSI) network From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 13:59:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0DDBCD89; Mon, 26 Jan 2015 13:59:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC9A96A6; Mon, 26 Jan 2015 13:59:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0QDxdm1063113; Mon, 26 Jan 2015 13:59:39 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0QDxddU063112; Mon, 26 Jan 2015 13:59:39 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201501261359.t0QDxddU063112@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Mon, 26 Jan 2015 13:59:39 +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: r277757 - stable/10/cddl/contrib/opensolaris/cmd/zpool X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 13:59:40 -0000 Author: smh Date: Mon Jan 26 13:59:39 2015 New Revision: 277757 URL: https://svnweb.freebsd.org/changeset/base/277757 Log: MFC r276226: Enhancements to zpool upgrade processing Sponsored by: Multiplay Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Mon Jan 26 13:39:35 2015 (r277756) +++ stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Mon Jan 26 13:59:39 2015 (r277757) @@ -4509,11 +4509,12 @@ zpool_do_status(int argc, char **argv) } typedef struct upgrade_cbdata { - int cb_first; - char cb_poolname[ZPOOL_MAXNAMELEN]; - int cb_argc; - uint64_t cb_version; - char **cb_argv; + boolean_t cb_first; + boolean_t cb_unavail; + char cb_poolname[ZPOOL_MAXNAMELEN]; + int cb_argc; + uint64_t cb_version; + char **cb_argv; } upgrade_cbdata_t; #ifdef __FreeBSD__ @@ -4631,7 +4632,8 @@ upgrade_cb(zpool_handle_t *zhp, void *ar if (zpool_get_state(zhp) == POOL_STATE_UNAVAIL) { (void) fprintf(stderr, gettext("cannot upgrade '%s': pool is " - "currently unavailable\n\n"), zpool_get_name(zhp)); + "currently unavailable.\n\n"), zpool_get_name(zhp)); + cbp->cb_unavail = B_TRUE; /* Allow iteration to continue. */ return (0); } @@ -4697,12 +4699,41 @@ upgrade_cb(zpool_handle_t *zhp, void *ar } static int +upgrade_list_unavail(zpool_handle_t *zhp, void *arg) +{ + upgrade_cbdata_t *cbp = arg; + + if (zpool_get_state(zhp) == POOL_STATE_UNAVAIL) { + if (cbp->cb_first) { + (void) fprintf(stderr, gettext("The following pools " + "are unavailable and cannot be upgraded as this " + "time.\n\n")); + (void) fprintf(stderr, gettext("POOL\n")); + (void) fprintf(stderr, gettext("------------\n")); + cbp->cb_first = B_FALSE; + } + (void) printf(gettext("%s\n"), zpool_get_name(zhp)); + cbp->cb_unavail = B_TRUE; + } + return (0); +} + +static int upgrade_list_older_cb(zpool_handle_t *zhp, void *arg) { upgrade_cbdata_t *cbp = arg; nvlist_t *config; uint64_t version; + if (zpool_get_state(zhp) == POOL_STATE_UNAVAIL) { + /* + * This will have been reported by upgrade_list_unavail so + * just allow iteration to continue. + */ + cbp->cb_unavail = B_TRUE; + return (0); + } + config = zpool_get_config(zhp, NULL); verify(nvlist_lookup_uint64(config, ZPOOL_CONFIG_VERSION, &version) == 0); @@ -4737,10 +4768,11 @@ upgrade_list_disabled_cb(zpool_handle_t uint64_t version; if (zpool_get_state(zhp) == POOL_STATE_UNAVAIL) { - (void) fprintf(stderr, gettext("cannot check supported " - "features on '%s': pool is currently unavailable\n\n"), - zpool_get_name(zhp)); - /* Allow iteration to continue. */ + /* + * This will have been reported by upgrade_list_unavail so + * just allow iteration to continue. + */ + cbp->cb_unavail = B_TRUE; return (0); } @@ -4797,10 +4829,17 @@ upgrade_one(zpool_handle_t *zhp, void *d uint64_t cur_version; int ret; + if (zpool_get_state(zhp) == POOL_STATE_UNAVAIL) { + (void) fprintf(stderr, gettext("cannot upgrade '%s': pool is " + "is currently unavailable.\n\n"), zpool_get_name(zhp)); + cbp->cb_unavail = B_TRUE; + return (1); + } + if (strcmp("log", zpool_get_name(zhp)) == 0) { (void) printf(gettext("'log' is now a reserved word\n" "Pool 'log' must be renamed using export and import" - " to upgrade.\n")); + " to upgrade.\n\n")); return (1); } @@ -4844,7 +4883,7 @@ upgrade_one(zpool_handle_t *zhp, void *d #endif /* __FreeBSD __*/ } else if (cur_version == SPA_VERSION) { (void) printf(gettext("Pool '%s' already has all " - "supported features enabled.\n"), + "supported features enabled.\n\n"), zpool_get_name(zhp)); } } @@ -5001,11 +5040,13 @@ zpool_do_upgrade(int argc, char **argv) ret = zpool_iter(g_zfs, upgrade_cb, &cb); if (ret == 0 && cb.cb_first) { if (cb.cb_version == SPA_VERSION) { - (void) printf(gettext("All pools are already " - "formatted using feature flags.\n\n")); - (void) printf(gettext("Every feature flags " + (void) printf(gettext("All %spools are already " + "formatted using feature flags.\n\n"), + cb.cb_unavail ? gettext("available ") : ""); + (void) printf(gettext("Every %sfeature flags " "pool already has all supported features " - "enabled.\n")); + "enabled.\n"), + cb.cb_unavail ? gettext("available ") : ""); } else { (void) printf(gettext("All pools are already " "formatted with version %llu or higher.\n"), @@ -5014,12 +5055,21 @@ zpool_do_upgrade(int argc, char **argv) } } else if (argc == 0) { cb.cb_first = B_TRUE; + ret = zpool_iter(g_zfs, upgrade_list_unavail, &cb); + assert(ret == 0); + + if (!cb.cb_first) { + (void) fprintf(stderr, "\n"); + } + + cb.cb_first = B_TRUE; ret = zpool_iter(g_zfs, upgrade_list_older_cb, &cb); assert(ret == 0); if (cb.cb_first) { - (void) printf(gettext("All pools are formatted " - "using feature flags.\n\n")); + (void) printf(gettext("All %spools are formatted using " + "feature flags.\n\n"), cb.cb_unavail ? + gettext("available ") : ""); } else { (void) printf(gettext("\nUse 'zpool upgrade -v' " "for a list of available legacy versions.\n")); @@ -5030,13 +5080,14 @@ zpool_do_upgrade(int argc, char **argv) assert(ret == 0); if (cb.cb_first) { - (void) printf(gettext("Every feature flags pool has " - "all supported features enabled.\n")); + (void) printf(gettext("Every %sfeature flags pool has " + "all supported features enabled.\n"), + cb.cb_unavail ? gettext("available ") : ""); } else { (void) printf(gettext("\n")); } } else { - ret = for_each_pool(argc, argv, B_FALSE, NULL, + ret = for_each_pool(argc, argv, B_TRUE, NULL, upgrade_one, &cb); } From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 14:19:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id B5D8F2D3; Mon, 26 Jan 2015 14:19:08 +0000 (UTC) Date: Mon, 26 Jan 2015 14:19:08 +0000 From: Alexey Dokuchaev To: John Baldwin Subject: Re: svn commit: r277710 - head/sys/dev/pci Message-ID: <20150126141908.GA20541@FreeBSD.org> References: <201501251953.t0PJrAOe050969@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201501251953.t0PJrAOe050969@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 14:19:08 -0000 On Sun, Jan 25, 2015 at 07:53:10PM +0000, John Baldwin wrote: > New Revision: 277710 > URL: https://svnweb.freebsd.org/changeset/base/277710 > > Log: > Pass a valid Dx state variable to PCIB_POWER_FOR_SLEEP() in pcib_resume() > instead of NULL. Can this be possibly related to this message I got trying to resume a laptop running recent -current [1]: ? pcib0: failed to set ACPI power state D2 on \134_SB_.PCI0: AE_BAD_PARAMETER ./danfe [1] http://lists.freebsd.org/pipermail/freebsd-wireless/2015-January/005365.html From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 15:47:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8F6134F2; Mon, 26 Jan 2015 15:47:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61C2634D; Mon, 26 Jan 2015 15:47:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0QFl9lL014521; Mon, 26 Jan 2015 15:47:09 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0QFl94H014520; Mon, 26 Jan 2015 15:47:09 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201501261547.t0QFl94H014520@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 26 Jan 2015 15:47:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277758 - head/sys/cam/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 15:47:09 -0000 Author: mav Date: Mon Jan 26 15:47:08 2015 New Revision: 277758 URL: https://svnweb.freebsd.org/changeset/base/277758 Log: Fix several potential overflows in UNMAP code. MFC after: 1 week Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Mon Jan 26 13:59:39 2015 (r277757) +++ head/sys/cam/scsi/scsi_da.c Mon Jan 26 15:47:08 2015 (r277758) @@ -1910,18 +1910,18 @@ dadeletemaxsize(struct da_softc *softc, sectors = (off_t)ATA_DSM_RANGE_MAX * softc->trim_max_ranges; break; case DA_DELETE_WS16: - sectors = (off_t)min(softc->ws_max_blks, WS16_MAX_BLKS); + sectors = omin(softc->ws_max_blks, WS16_MAX_BLKS); break; case DA_DELETE_ZERO: case DA_DELETE_WS10: - sectors = (off_t)min(softc->ws_max_blks, WS10_MAX_BLKS); + sectors = omin(softc->ws_max_blks, WS10_MAX_BLKS); break; default: return 0; } return (off_t)softc->params.secsize * - min(sectors, (off_t)softc->params.sectors); + omin(sectors, softc->params.sectors); } static void @@ -2684,7 +2684,7 @@ da_delete_trim(struct cam_periph *periph /* Try to extend the previous range. */ if (lba == lastlba) { - c = min(count, ATA_DSM_RANGE_MAX - lastcount); + c = omin(count, ATA_DSM_RANGE_MAX - lastcount); lastcount += c; off = (ranges - 1) * 8; buf[off + 6] = lastcount & 0xff; @@ -2694,7 +2694,7 @@ da_delete_trim(struct cam_periph *periph } while (count > 0) { - c = min(count, ATA_DSM_RANGE_MAX); + c = omin(count, ATA_DSM_RANGE_MAX); off = ranges * 8; buf[off + 0] = lba & 0xff; @@ -2770,7 +2770,7 @@ da_delete_ws(struct cam_periph *periph, "%s issuing short delete %ld > %ld\n", da_delete_method_desc[softc->delete_method], count, ws_max_blks); - count = min(count, ws_max_blks); + count = omin(count, ws_max_blks); break; } bp1 = bioq_first(&softc->delete_queue); From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 16:06:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5986CADB; Mon, 26 Jan 2015 16:06:25 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 325967EA; Mon, 26 Jan 2015 16:06:25 +0000 (UTC) Received: from new-host-5.home (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 284D7B962; Mon, 26 Jan 2015 11:06:24 -0500 (EST) Message-ID: <54C66603.50100@FreeBSD.org> Date: Mon, 26 Jan 2015 11:06:27 -0500 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Alexey Dokuchaev Subject: Re: svn commit: r277710 - head/sys/dev/pci References: <201501251953.t0PJrAOe050969@svn.freebsd.org> <20150126141908.GA20541@FreeBSD.org> In-Reply-To: <20150126141908.GA20541@FreeBSD.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 26 Jan 2015 11:06:24 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 16:06:25 -0000 On 1/26/15 9:19 AM, Alexey Dokuchaev wrote: > On Sun, Jan 25, 2015 at 07:53:10PM +0000, John Baldwin wrote: >> New Revision: 277710 >> URL: https://svnweb.freebsd.org/changeset/base/277710 >> >> Log: >> Pass a valid Dx state variable to PCIB_POWER_FOR_SLEEP() in pcib_resume() >> instead of NULL. > > Can this be possibly related to this message I got trying to resume a laptop > running recent -current [1]: ? > > pcib0: failed to set ACPI power state D2 on \134_SB_.PCI0: AE_BAD_PARAMETER > > ./danfe > > [1] http://lists.freebsd.org/pipermail/freebsd-wireless/2015-January/005365.html Well, the patch came up from debugging something along those lines, but it will not fix it. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 16:26:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 37972F6B; Mon, 26 Jan 2015 16:26:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 24024A4F; Mon, 26 Jan 2015 16:26:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0QGQUID032992; Mon, 26 Jan 2015 16:26:30 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0QGQTUr032990; Mon, 26 Jan 2015 16:26:29 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201501261626.t0QGQTUr032990@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 26 Jan 2015 16:26:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277759 - in head/sys: dev/cxgbe kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 16:26:30 -0000 Author: jhb Date: Mon Jan 26 16:26:28 2015 New Revision: 277759 URL: https://svnweb.freebsd.org/changeset/base/277759 Log: Fix a couple of panics when detaching from a cxgbe/cxl interface that was never brought up: - Allow NULL to be passed to sglist_free(). - Don't try to stop an interface that was never fully initialized. Reviewed by: np Modified: head/sys/dev/cxgbe/t4_main.c head/sys/kern/subr_sglist.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Mon Jan 26 15:47:08 2015 (r277758) +++ head/sys/dev/cxgbe/t4_main.c Mon Jan 26 16:26:28 2015 (r277759) @@ -3292,6 +3292,12 @@ cxgbe_uninit_synchronized(struct port_in ASSERT_SYNCHRONIZED_OP(sc); + if (!(pi->flags & PORT_INIT_DONE)) { + KASSERT(!(ifp->if_drv_flags & IFF_DRV_RUNNING), + ("uninited port is running")); + return (0); + } + /* * Disable the VI so that all its data in either direction is discarded * by the MPS. Leave everything else (the queues, interrupts, and 1Hz Modified: head/sys/kern/subr_sglist.c ============================================================================== --- head/sys/kern/subr_sglist.c Mon Jan 26 15:47:08 2015 (r277758) +++ head/sys/kern/subr_sglist.c Mon Jan 26 16:26:28 2015 (r277759) @@ -216,6 +216,9 @@ void sglist_free(struct sglist *sg) { + if (sg == NULL) + return; + if (refcount_release(&sg->sg_refs)) free(sg, M_SGLIST); } From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 16:29:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D5A25175; Mon, 26 Jan 2015 16:29:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C0DABA80; Mon, 26 Jan 2015 16:29:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0QGT8T1033344; Mon, 26 Jan 2015 16:29:08 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0QGT8oA033343; Mon, 26 Jan 2015 16:29:08 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201501261629.t0QGT8oA033343@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 26 Jan 2015 16:29:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277760 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 16:29:09 -0000 Author: mav Date: Mon Jan 26 16:29:07 2015 New Revision: 277760 URL: https://svnweb.freebsd.org/changeset/base/277760 Log: MFC r277096: Skip extra bcopy() when scrubbing vdev without redundancy. According to profiler, this bcopy() can use about 10% of CPU time. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c Mon Jan 26 16:26:28 2015 (r277759) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c Mon Jan 26 16:29:07 2015 (r277760) @@ -441,7 +441,8 @@ vdev_mirror_io_start(zio_t *zio) mm = vdev_mirror_map_init(zio); if (zio->io_type == ZIO_TYPE_READ) { - if ((zio->io_flags & ZIO_FLAG_SCRUB) && !mm->mm_replacing) { + if ((zio->io_flags & ZIO_FLAG_SCRUB) && !mm->mm_replacing && + mm->mm_children > 1) { /* * For scrubbing reads we need to allocate a read * buffer for each child and issue reads to all From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 16:29:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 510ED29C; Mon, 26 Jan 2015 16:29:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3D623A82; Mon, 26 Jan 2015 16:29:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0QGTFc3033406; Mon, 26 Jan 2015 16:29:15 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0QGTFfA033405; Mon, 26 Jan 2015 16:29:15 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201501261629.t0QGTFfA033405@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 26 Jan 2015 16:29:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277761 - head/sys/dev/cxgbe/tom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 16:29:15 -0000 Author: jhb Date: Mon Jan 26 16:29:14 2015 New Revision: 277761 URL: https://svnweb.freebsd.org/changeset/base/277761 Log: - Update a disabled KASSERT() to use sbused() instead of accessing the no-longer existant sb_cc sockbuf member. - Use sbavail() instead of sbused() in t4_soreceive_ddp() to match the usage in soreceive_stream() on which it is based. Discussed with: glebius (2) Modified: head/sys/dev/cxgbe/tom/t4_ddp.c Modified: head/sys/dev/cxgbe/tom/t4_ddp.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_ddp.c Mon Jan 26 16:29:07 2015 (r277760) +++ head/sys/dev/cxgbe/tom/t4_ddp.c Mon Jan 26 16:29:14 2015 (r277761) @@ -852,9 +852,9 @@ handle_ddp(struct socket *so, struct uio SOCKBUF_LOCK_ASSERT(sb); #if 0 - if (sb->sb_cc + sc->tt.ddp_thres > uio->uio_resid) { + if (sbused(sb) + sc->tt.ddp_thres > uio->uio_resid) { CTR4(KTR_CXGBE, "%s: sb_cc %d, threshold %d, resid %d", - __func__, sb->sb_cc, sc->tt.ddp_thres, uio->uio_resid); + __func__, sbused(sb), sc->tt.ddp_thres, uio->uio_resid); } #endif @@ -1081,8 +1081,8 @@ restart: /* uio should be just as it was at entry */ KASSERT(oresid == uio->uio_resid, - ("%s: oresid = %d, uio_resid = %zd, sbused = %d", - __func__, oresid, uio->uio_resid, sbused(sb))); + ("%s: oresid = %d, uio_resid = %zd, sbavail = %d", + __func__, oresid, uio->uio_resid, sbavail(sb))); error = handle_ddp(so, uio, flags, 0); ddp_handled = 1; @@ -1092,7 +1092,7 @@ restart: /* Abort if socket has reported problems. */ if (so->so_error) { - if (sbused(sb)) + if (sbavail(sb)) goto deliver; if (oresid > uio->uio_resid) goto out; @@ -1104,32 +1104,32 @@ restart: /* Door is closed. Deliver what is left, if any. */ if (sb->sb_state & SBS_CANTRCVMORE) { - if (sbused(sb)) + if (sbavail(sb)) goto deliver; else goto out; } /* Socket buffer is empty and we shall not block. */ - if (sbused(sb) == 0 && + if (sbavail(sb) == 0 && ((so->so_state & SS_NBIO) || (flags & (MSG_DONTWAIT|MSG_NBIO)))) { error = EAGAIN; goto out; } /* Socket buffer got some data that we shall deliver now. */ - if (sbused(sb) && !(flags & MSG_WAITALL) && + if (sbavail(sb) > 0 && !(flags & MSG_WAITALL) && ((so->so_state & SS_NBIO) || (flags & (MSG_DONTWAIT|MSG_NBIO)) || - sbused(sb) >= sb->sb_lowat || - sbused(sb) >= uio->uio_resid || - sbused(sb) >= sb->sb_hiwat) ) { + sbavail(sb) >= sb->sb_lowat || + sbavail(sb) >= uio->uio_resid || + sbavail(sb) >= sb->sb_hiwat) ) { goto deliver; } /* On MSG_WAITALL we must wait until all data or error arrives. */ if ((flags & MSG_WAITALL) && - (sbused(sb) >= uio->uio_resid || sbused(sb) >= sb->sb_lowat)) + (sbavail(sb) >= uio->uio_resid || sbavail(sb) >= sb->sb_lowat)) goto deliver; /* @@ -1148,7 +1148,7 @@ restart: deliver: SOCKBUF_LOCK_ASSERT(&so->so_rcv); - KASSERT(sbused(sb) > 0, ("%s: sockbuf empty", __func__)); + KASSERT(sbavail(sb) > 0, ("%s: sockbuf empty", __func__)); KASSERT(sb->sb_mb != NULL, ("%s: sb_mb == NULL", __func__)); if (sb->sb_flags & SB_DDP_INDICATE && !ddp_handled) @@ -1159,7 +1159,7 @@ deliver: uio->uio_td->td_ru.ru_msgrcv++; /* Fill uio until full or current end of socket buffer is reached. */ - len = min(uio->uio_resid, sbused(sb)); + len = min(uio->uio_resid, sbavail(sb)); if (mp0 != NULL) { /* Dequeue as many mbufs as possible. */ if (!(flags & MSG_PEEK) && len >= sb->sb_mb->m_len) { From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 16:30:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 312973ED; Mon, 26 Jan 2015 16:30:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1CF0FA95; Mon, 26 Jan 2015 16:30:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0QGUHS0033689; Mon, 26 Jan 2015 16:30:17 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0QGUHMW033688; Mon, 26 Jan 2015 16:30:17 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201501261630.t0QGUHMW033688@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 26 Jan 2015 16:30: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: r277762 - stable/10/sys/cam X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 16:30:18 -0000 Author: mav Date: Mon Jan 26 16:30:17 2015 New Revision: 277762 URL: https://svnweb.freebsd.org/changeset/base/277762 Log: MFC r277385: Remove extra mtx_unlock(). Submitted by: Dmitry Luhtionov Modified: stable/10/sys/cam/cam_xpt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/cam_xpt.c ============================================================================== --- stable/10/sys/cam/cam_xpt.c Mon Jan 26 16:29:14 2015 (r277761) +++ stable/10/sys/cam/cam_xpt.c Mon Jan 26 16:30:17 2015 (r277762) @@ -897,7 +897,6 @@ xpt_init(void *dummy) if ((status = xpt_create_path(&path, NULL, CAM_XPT_PATH_ID, CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD)) != CAM_REQ_CMP) { - mtx_unlock(&xsoftc.xpt_lock); printf("xpt_init: xpt_create_path failed with status %#x," " failing attach\n", status); return (EINVAL); From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 16:32:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D02015ED; Mon, 26 Jan 2015 16:32:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC627B5C; Mon, 26 Jan 2015 16:32:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0QGWgbf037402; Mon, 26 Jan 2015 16:32:42 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0QGWg5V037401; Mon, 26 Jan 2015 16:32:42 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201501261632.t0QGWg5V037401@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 26 Jan 2015 16:32:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277763 - head/sys/dev/cxgbe/tom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 16:32:42 -0000 Author: jhb Date: Mon Jan 26 16:32:41 2015 New Revision: 277763 URL: https://svnweb.freebsd.org/changeset/base/277763 Log: Lock the socket buffer before jumping to the 'out' label if sblock() fails in t4_soreceive_ddp(). Modified: head/sys/dev/cxgbe/tom/t4_ddp.c Modified: head/sys/dev/cxgbe/tom/t4_ddp.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_ddp.c Mon Jan 26 16:30:17 2015 (r277762) +++ head/sys/dev/cxgbe/tom/t4_ddp.c Mon Jan 26 16:32:41 2015 (r277763) @@ -1057,9 +1057,9 @@ t4_soreceive_ddp(struct socket *so, stru /* Prevent other readers from entering the socket. */ error = sblock(sb, SBLOCKWAIT(flags)); + SOCKBUF_LOCK(sb); if (error) goto out; - SOCKBUF_LOCK(sb); /* Easy one, no space to copyout anything. */ if (uio->uio_resid == 0) { From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 16:50:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 10DD0957; Mon, 26 Jan 2015 16:50:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D6BF7CAE; Mon, 26 Jan 2015 16:50:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0QGohWT044146; Mon, 26 Jan 2015 16:50:43 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0QGohSI044141; Mon, 26 Jan 2015 16:50:43 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201501261650.t0QGohSI044141@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 26 Jan 2015 16:50:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277764 - in head/usr.sbin/pw: . tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 16:50:44 -0000 Author: bapt Date: Mon Jan 26 16:50:42 2015 New Revision: 277764 URL: https://svnweb.freebsd.org/changeset/base/277764 Log: Revert r277652 uid and gid are never and should never be negative. The pw(8) manpage clearly states the -u and -g arguments are for uids/gids, hence using negative values is abusing a bug in former versions of pw(8) Deleted: head/usr.sbin/pw/tests/pw_groupshow.sh head/usr.sbin/pw/tests/pw_usershow.sh Modified: head/usr.sbin/pw/pw_group.c head/usr.sbin/pw/pw_user.c head/usr.sbin/pw/tests/Makefile Modified: head/usr.sbin/pw/pw_group.c ============================================================================== --- head/usr.sbin/pw/pw_group.c Mon Jan 26 16:32:41 2015 (r277763) +++ head/usr.sbin/pw/pw_group.c Mon Jan 26 16:50:42 2015 (r277764) @@ -68,11 +68,7 @@ pw_group(struct userconf * cnf, int mode }; if (a_gid != NULL) { - const char *teststr; - teststr = a_gid->val; - if (*teststr == '-') - teststr++; - if (strspn(teststr, "0123456789") != strlen(teststr)) + if (strspn(a_gid->val, "0123456789") != strlen(a_gid->val)) errx(EX_USAGE, "-g expects a number"); } Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Mon Jan 26 16:32:41 2015 (r277763) +++ head/usr.sbin/pw/pw_user.c Mon Jan 26 16:50:42 2015 (r277764) @@ -322,10 +322,7 @@ pw_user(struct userconf * cnf, int mode, a_name = NULL; } } else { - const char *teststr = a_uid->val; - if (*teststr == '-') - teststr++; - if (strspn(teststr, "0123456789") != strlen(teststr)) + if (strspn(a_uid->val, "0123456789") != strlen(a_uid->val)) errx(EX_USAGE, "-u expects a number"); } Modified: head/usr.sbin/pw/tests/Makefile ============================================================================== --- head/usr.sbin/pw/tests/Makefile Mon Jan 26 16:32:41 2015 (r277763) +++ head/usr.sbin/pw/tests/Makefile Mon Jan 26 16:50:42 2015 (r277764) @@ -9,11 +9,9 @@ ATF_TESTS_SH= pw_etcdir \ pw_lock \ pw_groupdel \ pw_groupmod \ - pw_groupshow \ pw_useradd \ pw_userdel \ - pw_usermod \ - pw_usershow + pw_usermod .for tp in ${ATF_TESTS_SH} TEST_METADATA.${tp}+= required_user="root" From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 17:17:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2A160EAD; Mon, 26 Jan 2015 17:17:42 +0000 (UTC) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 13170F7C; Mon, 26 Jan 2015 17:17:41 +0000 (UTC) Received: from [10.0.1.100] (c-76-21-10-192.hsd1.ca.comcast.net [76.21.10.192]) by elvis.mu.org (Postfix) with ESMTPSA id 01756341F8A2; Mon, 26 Jan 2015 09:17:40 -0800 (PST) Subject: Re: svn commit: r277694 - head/sys/amd64/conf Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset=windows-1252 From: Alfred Perlstein In-Reply-To: Date: Mon, 26 Jan 2015 09:21:34 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201501251202.t0PC2crJ029665@svn.freebsd.org> <6366BFE6-1A9F-433C-99F5-65B9D905AEF5@gmail.com> To: Warner Losh X-Mailer: Apple Mail (2.1283) Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , Sergey Kandaurov , Garrett Cooper , "svn-src-head@freebsd.org" , =?iso-8859-1?Q?Dag-Erling_Sm=F8rgrav?= X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 17:17:42 -0000 Don't have a strong opinion on this because I'm not in the know lately, = but was wondering: 1) if we wanted to keep NE1000/2000 support for FreeBSD in emulators? = Probably not I assume? 2) Does Linux nuke these devices? why/why-not? On Jan 25, 2015, at 9:58 AM, Warner Losh wrote: >=20 >> On Jan 25, 2015, at 7:54 AM, Garrett Cooper = wrote: >>=20 >>=20 >>> On Jan 25, 2015, at 04:43, Sergey Kandaurov = wrote: >>>=20 >>>> On 25 January 2015 at 15:02, Dag-Erling Sm=F8rgrav = wrote: >>>> Author: des >>>> Date: Sun Jan 25 12:02:38 2015 >>>> New Revision: 277694 >>>> URL: https://svnweb.freebsd.org/changeset/base/277694 >>>>=20 >>>> Log: >>>> Remove ISA NICs. Anyone still using these on amd64 can build their >>>> own kernel. >>>>=20 >>>> Modified: >>>> head/sys/amd64/conf/GENERIC >>>=20 >>> If so, what about i386? (I'd rather not pc98) >>> What about device isa in DEFAULTS? >>=20 >> isa is still needed in some scenarios. I just don't remember the full = details offhand (something about internal buses iirc... And IPMI for = starters...) >=20 > "isa=94 in this context should be read as =93mainbus=94 not as =93ISA = slots=94. You can=92t > remove it without some significant work, and even then the interface = changes > to long established interfaces isn=92t worth the pain. >=20 > Warner >=20 >=20 From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 17:20:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CB8061000; Mon, 26 Jan 2015 17:20:02 +0000 (UTC) Received: from mail-pa0-x22b.google.com (mail-pa0-x22b.google.com [IPv6:2607:f8b0:400e:c03::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 91BF0F93; Mon, 26 Jan 2015 17:20:02 +0000 (UTC) Received: by mail-pa0-f43.google.com with SMTP id eu11so12908130pac.2; Mon, 26 Jan 2015 09:20:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:subject:mime-version:content-type:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=+qVquOWD/aUdHpUsiOh8HC8gpJUVcplkMk3ZAi5ZURo=; b=ttcR9Wl5MS7T19dATQP3NMnf7QtwUvl/YZ7GkXGafHPG0UePht/+MdErSPCi0PuqX+ tbIRyL6hPaaGI5G2IcorMqpyIJAlRmpgxkTAw2h/JToGlyjb1WG7QuqtcHiGpAdYnf7L CwLyk9roiEkwnaKMYRoTg8fBctwciM92WXkU41lR6f4UUaCEjUvZYu0chiGPUcVgcl0y zxaZFpAHu2hv1hJrHSaAHPBe4S9OcWwVc0fklPy3P+aIjaUrROtxxy70iiEyDg5K3b5W UKzi/O5tH4/iRbPw+E4fkEMP2wzmyRgQp9Bk8hS95bbd1+egHjsDMVIgRHR8Q3t6LMAK 0X5g== X-Received: by 10.68.136.228 with SMTP id qd4mr35851839pbb.122.1422292802149; Mon, 26 Jan 2015 09:20:02 -0800 (PST) Received: from [10.0.1.100] (c-76-21-10-192.hsd1.ca.comcast.net. [76.21.10.192]) by mx.google.com with ESMTPSA id zr4sm10257018pbb.18.2015.01.26.09.20.01 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 26 Jan 2015 09:20:01 -0800 (PST) From: Alfred Perlstein X-Google-Original-From: Alfred Perlstein Subject: Re: svn commit: r277694 - head/sys/amd64/conf Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset=windows-1252 In-Reply-To: Date: Mon, 26 Jan 2015 09:23:53 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <4C1D4A44-0FB8-4EFA-9C18-2F7542C4C5D2@gmail.com> References: <201501251202.t0PC2crJ029665@svn.freebsd.org> <6366BFE6-1A9F-433C-99F5-65B9D905AEF5@gmail.com> To: Warner Losh X-Mailer: Apple Mail (2.1283) Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , Sergey Kandaurov , Garrett Cooper , "svn-src-head@freebsd.org" , =?iso-8859-1?Q?Dag-Erling_Sm=F8rgrav?= X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 17:20:03 -0000 Never mind, apologies, thought this was i386+amd64. I'm going to guess = anything emulating amd64 has pci NICs in it. :) On Jan 26, 2015, at 9:21 AM, Alfred Perlstein wrote: > Don't have a strong opinion on this because I'm not in the know = lately, but was wondering: >=20 > 1) if we wanted to keep NE1000/2000 support for FreeBSD in emulators? = Probably not I assume? > 2) Does Linux nuke these devices? why/why-not? >=20 >=20 > On Jan 25, 2015, at 9:58 AM, Warner Losh wrote: >=20 >>=20 >>> On Jan 25, 2015, at 7:54 AM, Garrett Cooper = wrote: >>>=20 >>>=20 >>>> On Jan 25, 2015, at 04:43, Sergey Kandaurov = wrote: >>>>=20 >>>>> On 25 January 2015 at 15:02, Dag-Erling Sm=F8rgrav = wrote: >>>>> Author: des >>>>> Date: Sun Jan 25 12:02:38 2015 >>>>> New Revision: 277694 >>>>> URL: https://svnweb.freebsd.org/changeset/base/277694 >>>>>=20 >>>>> Log: >>>>> Remove ISA NICs. Anyone still using these on amd64 can build = their >>>>> own kernel. >>>>>=20 >>>>> Modified: >>>>> head/sys/amd64/conf/GENERIC >>>>=20 >>>> If so, what about i386? (I'd rather not pc98) >>>> What about device isa in DEFAULTS? >>>=20 >>> isa is still needed in some scenarios. I just don't remember the = full details offhand (something about internal buses iirc... And IPMI = for starters...) >>=20 >> "isa=94 in this context should be read as =93mainbus=94 not as =93ISA = slots=94. You can=92t >> remove it without some significant work, and even then the interface = changes >> to long established interfaces isn=92t worth the pain. >>=20 >> Warner >>=20 >>=20 >=20 From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 19:25:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3D97FE6E; Mon, 26 Jan 2015 19:25:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0FF79F68; Mon, 26 Jan 2015 19:25:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0QJPZNf018152; Mon, 26 Jan 2015 19:25:35 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0QJPZYZ018151; Mon, 26 Jan 2015 19:25:35 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201501261925.t0QJPZYZ018151@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Mon, 26 Jan 2015 19:25: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: r277767 - stable/10/sys/dev/acpica X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 19:25:36 -0000 Author: jkim Date: Mon Jan 26 19:25:35 2015 New Revision: 277767 URL: https://svnweb.freebsd.org/changeset/base/277767 Log: MFC: r277579 Revert r216942. This commit was premature and caused too many complaints. Modified: stable/10/sys/dev/acpica/acpi_ec.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/acpica/acpi_ec.c ============================================================================== --- stable/10/sys/dev/acpica/acpi_ec.c Mon Jan 26 19:01:06 2015 (r277766) +++ stable/10/sys/dev/acpica/acpi_ec.c Mon Jan 26 19:25:35 2015 (r277767) @@ -623,7 +623,7 @@ EcGpeQueryHandler(void *Context) struct acpi_ec_softc *sc = (struct acpi_ec_softc *)Context; UINT8 Data; ACPI_STATUS Status; - int retry, sci_enqueued; + int retry; char qxx[5]; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); @@ -644,7 +644,6 @@ EcGpeQueryHandler(void *Context) * that may arise from running the query from causing another query * to be queued, we clear the pending flag only after running it. */ - sci_enqueued = sc->ec_sci_pend; for (retry = 0; retry < 2; retry++) { Status = EcCommand(sc, EC_COMMAND_QUERY); if (ACPI_SUCCESS(Status)) @@ -684,14 +683,6 @@ EcGpeQueryHandler(void *Context) device_printf(sc->ec_dev, "evaluation of query method %s failed: %s\n", qxx, AcpiFormatException(Status)); } - - /* Reenable runtime GPE if its execution was deferred. */ - if (sci_enqueued) { - Status = AcpiFinishGpe(sc->ec_gpehandle, sc->ec_gpebit); - if (ACPI_FAILURE(Status)) - device_printf(sc->ec_dev, "reenabling runtime GPE failed: %s\n", - AcpiFormatException(Status)); - } } /* @@ -725,10 +716,9 @@ EcGpeHandler(ACPI_HANDLE GpeDevice, UINT if ((EcStatus & EC_EVENT_SCI) && !sc->ec_sci_pend) { CTR0(KTR_ACPI, "ec gpe queueing query handler"); Status = AcpiOsExecute(OSL_GPE_HANDLER, EcGpeQueryHandler, Context); - if (ACPI_SUCCESS(Status)) { + if (ACPI_SUCCESS(Status)) sc->ec_sci_pend = TRUE; - return (0); - } else + else printf("EcGpeHandler: queuing GPE query handler failed\n"); } return (ACPI_REENABLE_GPE); From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 19:27:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 85C77FA8; Mon, 26 Jan 2015 19:27:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 724DEF7C; Mon, 26 Jan 2015 19:27:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0QJRVnx018455; Mon, 26 Jan 2015 19:27:31 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0QJRVr3018454; Mon, 26 Jan 2015 19:27:31 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201501261927.t0QJRVr3018454@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Mon, 26 Jan 2015 19:27: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: r277768 - stable/10/sys/dev/acpica X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 19:27:31 -0000 Author: jkim Date: Mon Jan 26 19:27:30 2015 New Revision: 277768 URL: https://svnweb.freebsd.org/changeset/base/277768 Log: MFC: r277594 Simplify retry loops. Modified: stable/10/sys/dev/acpica/acpi_ec.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/acpica/acpi_ec.c ============================================================================== --- stable/10/sys/dev/acpica/acpi_ec.c Mon Jan 26 19:25:35 2015 (r277767) +++ stable/10/sys/dev/acpica/acpi_ec.c Mon Jan 26 19:27:30 2015 (r277768) @@ -648,10 +648,8 @@ EcGpeQueryHandler(void *Context) Status = EcCommand(sc, EC_COMMAND_QUERY); if (ACPI_SUCCESS(Status)) break; - if (ACPI_SUCCESS(EcCheckStatus(sc, "retr_check", + if (ACPI_FAILURE(EcCheckStatus(sc, "retr_check", EC_EVENT_INPUT_BUFFER_EMPTY))) - continue; - else break; } sc->ec_sci_pend = FALSE; @@ -966,15 +964,13 @@ EcRead(struct acpi_ec_softc *sc, UINT8 A gen_count = sc->ec_gencount; EC_SET_DATA(sc, Address); status = EcWaitEvent(sc, EC_EVENT_OUTPUT_BUFFER_FULL, gen_count); - if (ACPI_FAILURE(status)) { - if (ACPI_SUCCESS(EcCheckStatus(sc, "retr_check", - EC_EVENT_INPUT_BUFFER_EMPTY))) - continue; - else - break; + if (ACPI_SUCCESS(status)) { + *Data = EC_GET_DATA(sc); + return (AE_OK); } - *Data = EC_GET_DATA(sc); - return (AE_OK); + if (ACPI_FAILURE(EcCheckStatus(sc, "retr_check", + EC_EVENT_INPUT_BUFFER_EMPTY))) + break; } device_printf(sc->ec_dev, "EcRead: failed waiting to get data\n"); return (status); From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 19:31:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CC0DE1D6; Mon, 26 Jan 2015 19:31:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B88ACBF; Mon, 26 Jan 2015 19:31:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0QJVFoT020691; Mon, 26 Jan 2015 19:31:15 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0QJVF7M020671; Mon, 26 Jan 2015 19:31:15 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201501261931.t0QJVF7M020671@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 26 Jan 2015 19:31:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277769 - head/sys/modules/iscsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 19:31:15 -0000 Author: trasz Date: Mon Jan 26 19:31:14 2015 New Revision: 277769 URL: https://svnweb.freebsd.org/changeset/base/277769 Log: Remove cruft; ICL_RDMA was never actually working, and will be redone in a completely different manner. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/modules/iscsi/Makefile Modified: head/sys/modules/iscsi/Makefile ============================================================================== --- head/sys/modules/iscsi/Makefile Mon Jan 26 19:27:30 2015 (r277768) +++ head/sys/modules/iscsi/Makefile Mon Jan 26 19:31:14 2015 (r277769) @@ -4,22 +4,12 @@ KMOD= iscsi SRCS= iscsi.c -.if defined(ICL_RDMA) -SRCS+= icl_rdma.c -.else SRCS+= icl.c -.endif SRCS+= icl_proxy.c SRCS+= opt_cam.h SRCS+= bus_if.h SRCS+= device_if.h -# Those below are required for RDMA. -SRCS+= vnode_if.h -SRCS+= opt_inet.h -SRCS+= opt_inet6.h - -CFLAGS+= -I${.CURDIR}/../../ofed/include #CFLAGS+=-DICL_KERNEL_PROXY .include From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 19:33:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF932547; Mon, 26 Jan 2015 19:33:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2137F6; Mon, 26 Jan 2015 19:33:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0QJXa5i022904; Mon, 26 Jan 2015 19:33:36 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0QJXaFr022903; Mon, 26 Jan 2015 19:33:36 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201501261933.t0QJXaFr022903@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Mon, 26 Jan 2015 19:33:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r277770 - stable/9/sys/dev/acpica X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 19:33:37 -0000 Author: jkim Date: Mon Jan 26 19:33:35 2015 New Revision: 277770 URL: https://svnweb.freebsd.org/changeset/base/277770 Log: MFC: r277579 Revert r216942. This commit was premature and caused too many complaints. Modified: stable/9/sys/dev/acpica/acpi_ec.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/acpica/acpi_ec.c ============================================================================== --- stable/9/sys/dev/acpica/acpi_ec.c Mon Jan 26 19:31:14 2015 (r277769) +++ stable/9/sys/dev/acpica/acpi_ec.c Mon Jan 26 19:33:35 2015 (r277770) @@ -623,7 +623,7 @@ EcGpeQueryHandler(void *Context) struct acpi_ec_softc *sc = (struct acpi_ec_softc *)Context; UINT8 Data; ACPI_STATUS Status; - int retry, sci_enqueued; + int retry; char qxx[5]; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); @@ -644,7 +644,6 @@ EcGpeQueryHandler(void *Context) * that may arise from running the query from causing another query * to be queued, we clear the pending flag only after running it. */ - sci_enqueued = sc->ec_sci_pend; for (retry = 0; retry < 2; retry++) { Status = EcCommand(sc, EC_COMMAND_QUERY); if (ACPI_SUCCESS(Status)) @@ -684,14 +683,6 @@ EcGpeQueryHandler(void *Context) device_printf(sc->ec_dev, "evaluation of query method %s failed: %s\n", qxx, AcpiFormatException(Status)); } - - /* Reenable runtime GPE if its execution was deferred. */ - if (sci_enqueued) { - Status = AcpiFinishGpe(sc->ec_gpehandle, sc->ec_gpebit); - if (ACPI_FAILURE(Status)) - device_printf(sc->ec_dev, "reenabling runtime GPE failed: %s\n", - AcpiFormatException(Status)); - } } /* @@ -725,10 +716,9 @@ EcGpeHandler(ACPI_HANDLE GpeDevice, UINT if ((EcStatus & EC_EVENT_SCI) && !sc->ec_sci_pend) { CTR0(KTR_ACPI, "ec gpe queueing query handler"); Status = AcpiOsExecute(OSL_GPE_HANDLER, EcGpeQueryHandler, Context); - if (ACPI_SUCCESS(Status)) { + if (ACPI_SUCCESS(Status)) sc->ec_sci_pend = TRUE; - return (0); - } else + else printf("EcGpeHandler: queuing GPE query handler failed\n"); } return (ACPI_REENABLE_GPE); From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 20:35:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 94418183; Mon, 26 Jan 2015 20:35:08 +0000 (UTC) Received: from mail-wi0-x229.google.com (mail-wi0-x229.google.com [IPv6:2a00:1450:400c:c05::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 38DE2A16; Mon, 26 Jan 2015 20:35:08 +0000 (UTC) Received: by mail-wi0-f169.google.com with SMTP id h11so6736203wiw.0; Mon, 26 Jan 2015 12:35:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=e1NVB8EZIuE8bGfsi5Bx4kvo9nYaO83fQE8EYV9VUjk=; b=lQetDhvcTnx3LL/3qTiuQfMNG5DV1RutdgOSLWMh3TBookuv1a89ueC9uPrVKN9ymo y8jN2uMg0YG3wF1XxSy5w/t6HxSUbQXvQpqIg6QOmIfhd/RW2LFofr28cRfBn+SZB8Od QhvmZogn/aHOPjGMi7ccANBy/bMYA54s/kuab7FCQmmq/mIC1asuuirlGIDluBGiJmYb nn6rVLkYmoCHX2ROItCM+8JeyaekhQgqYJ5alliRDpI34rmjOqJaSmPoNngCM3eEMYg2 oKG/qEeYa4r9HPWtYdXv12QW9fI9ue1QIylIaAKeThRxQd5LfeNT43buIt/dbPtw+bkc JOoA== X-Received: by 10.180.98.228 with SMTP id el4mr9670718wib.77.1422304499565; Mon, 26 Jan 2015 12:34:59 -0800 (PST) MIME-Version: 1.0 Sender: cochard@gmail.com Received: by 10.194.61.1 with HTTP; Mon, 26 Jan 2015 12:34:39 -0800 (PST) In-Reply-To: <201501252037.t0PKbXNW070662@svn.freebsd.org> References: <201501252037.t0PKbXNW070662@svn.freebsd.org> From: =?ISO-8859-1?Q?Olivier_Cochard=2DLabb=E9?= Date: Mon, 26 Jan 2015 21:34:39 +0100 X-Google-Sender-Auth: Gtw_LEU1M_RsXOeMEx6tLVy0u_w Message-ID: Subject: Re: svn commit: r277714 - head/sbin/ipfw To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: svn-src-head , svn-src-all , src-committers X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 20:35:08 -0000 On Sun, Jan 25, 2015 at 9:37 PM, John Baldwin wrote: > Author: jhb > Date: Sun Jan 25 20:37:32 2015 > New Revision: 277714 > URL: https://svnweb.freebsd.org/changeset/base/277714 > > Log: > natd(8) will work with an unconfigured interface and effectively not do > anything until the interface is assigned an address. This fixes > ipfw_nat to do the same by using an IP of INADDR_ANY instead of > aborting the nat setup if the requested interface is not yet configured. > > Hi, I've still a problem with ipfw_nat and unconfigured interface: On my setup I'm using ipfw with NAT rules using an OpenVPN tunnel interface as source address for NATting. During the machine startup, ipfw is started before openvpn (hopefully) and its configuration mention do to NAT using tun0 IP address. Then OpenVPN start and create a tun0 and set an IP address on it. => But no unicast traffic is allowed on this tun0 interface until I restart ipfw. If I correctly understand the log of this commit: This behavior should be fixed by this commit, right ? From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 21:12:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5D939BC1; Mon, 26 Jan 2015 21:12:45 +0000 (UTC) Received: from forward20.mail.yandex.net (forward20.mail.yandex.net [IPv6:2a02:6b8:0:1402::5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Certum Level IV CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CB8A7ED3; Mon, 26 Jan 2015 21:12:44 +0000 (UTC) Received: from web26g.yandex.ru (web26g.yandex.ru [95.108.253.235]) by forward20.mail.yandex.net (Yandex) with ESMTP id 2CED51041AFC; Tue, 27 Jan 2015 00:12:30 +0300 (MSK) Received: from 127.0.0.1 (localhost [127.0.0.1]) by web26g.yandex.ru (Yandex) with ESMTP id 54ED343C0E2A; Tue, 27 Jan 2015 00:12:29 +0300 (MSK) Received: by web26g.yandex.ru with HTTP; Tue, 27 Jan 2015 00:12:28 +0300 From: Alexander V. Chernikov To: =?utf-8?B?T2xpdmllciBDb2NoYXJkLUxhYmLDqQ==?= , John Baldwin In-Reply-To: References: <201501252037.t0PKbXNW070662@svn.freebsd.org> Subject: Re: svn commit: r277714 - head/sbin/ipfw Message-Id: <8791751422306748@web26g.yandex.ru> X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Tue, 27 Jan 2015 00:12:28 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: svn-src-head , svn-src-all , src-committers X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 21:12:45 -0000   26.01.2015, 23:35, "Olivier Cochard-Labbé" : On Sun, Jan 25, 2015 at 9:37 PM, John Baldwin <[1]jhb@freebsd.org> wrote: Author: jhb Date: Sun Jan 25 20:37:32 2015 New Revision: 277714 URL: [2]https://svnweb.freebsd.org/changeset/base/277714 Log:  natd(8) will work with an unconfigured interface and effectively not do  anything until the interface is assigned an address. This fixes  ipfw_nat to do the same by using an IP of INADDR_ANY instead of  aborting the nat setup if the requested interface is not yet configured.  Hi, I've still a problem with ipfw_nat and unconfigured interface: On my setup I'm using ipfw with NAT rules using an OpenVPN tunnel interface as source address for NATting. During the machine startup, ipfw is started before openvpn (hopefully) and its configuration mention do to NAT using tun0 IP address. Then OpenVPN start and create a tun0 and set an IP address on it. => But no unicast traffic is allowed on this tun0 interface until I restart ipfw. If I correctly understand the log of this commit: This behavior should be fixed by this commit, right ? As far as I understand, nat instance is created with an unresolved ip (0.0.0.0 propagated to libalias) and "tun0" interface name. After "tun0" creation and address assignment, kernel ipfw_nat ifaddr hook should take action and update libalias address to primary? IPv4 interface address.  References 1. mailto:jhb@freebsd.org 2. https://svnweb.freebsd.org/changeset/base/277714 From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 21:17:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BD04FD82; Mon, 26 Jan 2015 21:17:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8EB62F0A; Mon, 26 Jan 2015 21:17:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0QLHFsF072353; Mon, 26 Jan 2015 21:17:15 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0QLHF14072352; Mon, 26 Jan 2015 21:17:15 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501262117.t0QLHF14072352@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 26 Jan 2015 21:17:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277774 - head/contrib/llvm/lib/Target/AArch64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 21:17:15 -0000 Author: dim Date: Mon Jan 26 21:17:14 2015 New Revision: 277774 URL: https://svnweb.freebsd.org/changeset/base/277774 Log: Pull in r226664 from upstream llvm trunk (by Tim Northover): AArch64: add backend option to reserve x18 (platform register) AAPCS64 says that it's up to the platform to specify whether x18 is reserved, and a first step on that way is to add a flag controlling it. From: Andrew Turner Requested by: andrew Modified: head/contrib/llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp Modified: head/contrib/llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp ============================================================================== --- head/contrib/llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp Mon Jan 26 19:42:39 2015 (r277773) +++ head/contrib/llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp Mon Jan 26 21:17:14 2015 (r277774) @@ -33,6 +33,10 @@ using namespace llvm; #define GET_REGINFO_TARGET_DESC #include "AArch64GenRegisterInfo.inc" +static cl::opt +ReserveX18("aarch64-reserve-x18", cl::Hidden, + cl::desc("Reserve X18, making it unavailable as GPR")); + AArch64RegisterInfo::AArch64RegisterInfo(const AArch64InstrInfo *tii, const AArch64Subtarget *sti) : AArch64GenRegisterInfo(AArch64::LR), TII(tii), STI(sti) {} @@ -90,7 +94,7 @@ AArch64RegisterInfo::getReservedRegs(con Reserved.set(AArch64::W29); } - if (STI->isTargetDarwin()) { + if (STI->isTargetDarwin() || ReserveX18) { Reserved.set(AArch64::X18); // Platform register Reserved.set(AArch64::W18); } @@ -117,7 +121,7 @@ bool AArch64RegisterInfo::isReservedReg( return true; case AArch64::X18: case AArch64::W18: - return STI->isTargetDarwin(); + return STI->isTargetDarwin() || ReserveX18; case AArch64::FP: case AArch64::W29: return TFI->hasFP(MF) || STI->isTargetDarwin(); @@ -379,7 +383,7 @@ unsigned AArch64RegisterInfo::getRegPres case AArch64::GPR64commonRegClassID: return 32 - 1 // XZR/SP - (TFI->hasFP(MF) || STI->isTargetDarwin()) // FP - - STI->isTargetDarwin() // X18 reserved as platform register + - (STI->isTargetDarwin() || ReserveX18) // X18 reserved as platform register - hasBasePointer(MF); // X19 case AArch64::FPR8RegClassID: case AArch64::FPR16RegClassID: From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 21:19:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 659B7EE1; Mon, 26 Jan 2015 21:19:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 37370F1F; Mon, 26 Jan 2015 21:19:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0QLJPQW072648; Mon, 26 Jan 2015 21:19:25 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0QLJOma072645; Mon, 26 Jan 2015 21:19:24 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501262119.t0QLJOma072645@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 26 Jan 2015 21:19:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277775 - in head/contrib/llvm/tools/clang: include/clang/Driver lib/Driver X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 21:19:25 -0000 Author: dim Date: Mon Jan 26 21:19:24 2015 New Revision: 277775 URL: https://svnweb.freebsd.org/changeset/base/277775 Log: Pull in r227062 from upstream clang trunk (by Renato Golin): Allows Clang to use LLVM's fixes-x18 option This patch allows clang to have llvm reserve the x18 platform register on AArch64. FreeBSD will use this in the kernel for per-cpu data but has no need to reserve this register in userland so will need this flag to reserve it. This uses llvm r226664 to allow this register to be reserved. Patch by Andrew Turner. Requested by: andrew Modified: head/contrib/llvm/tools/clang/include/clang/Driver/Options.td head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Modified: head/contrib/llvm/tools/clang/include/clang/Driver/Options.td ============================================================================== --- head/contrib/llvm/tools/clang/include/clang/Driver/Options.td Mon Jan 26 21:17:14 2015 (r277774) +++ head/contrib/llvm/tools/clang/include/clang/Driver/Options.td Mon Jan 26 21:19:24 2015 (r277775) @@ -1141,6 +1141,9 @@ def mno_long_calls : Flag<["-"], "mno-lo def mgeneral_regs_only : Flag<["-"], "mgeneral-regs-only">, Group, HelpText<"Generate code which only uses the general purpose registers (AArch64 only)">; +def ffixed_x18 : Flag<["-"], "ffixed-x18">, Group, + HelpText<"Reserve the x18 register (AArch64 only)">; + def mvsx : Flag<["-"], "mvsx">, Group; def mno_vsx : Flag<["-"], "mno-vsx">, Group; def mfprnd : Flag<["-"], "mfprnd">, Group; Modified: head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Mon Jan 26 21:17:14 2015 (r277774) +++ head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Mon Jan 26 21:19:24 2015 (r277775) @@ -887,6 +887,11 @@ void Clang::AddAArch64TargetArgs(const A if (A->getOption().matches(options::OPT_mno_global_merge)) CmdArgs.push_back("-mno-global-merge"); } + + if (Args.hasArg(options::OPT_ffixed_x18)) { + CmdArgs.push_back("-backend-option"); + CmdArgs.push_back("-aarch64-reserve-x18"); + } } // Get CPU and ABI names. They are not independent From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 21:20:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4BB7C25E; Mon, 26 Jan 2015 21:20:49 +0000 (UTC) Received: from shxd.cx (unknown [64.201.244.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 33247F33; Mon, 26 Jan 2015 21:20:49 +0000 (UTC) Received: from 50-196-156-133-static.hfc.comcastbusiness.net ([50.196.156.133]:54577 helo=tinkerbell.pixel8networks.com) by shxd.cx with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1YFDFc-000BtM-2J; Sat, 24 Jan 2015 18:48:36 -0800 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.0 \(1990.1\)) Subject: Re: svn commit: r277652 - in head/usr.sbin/pw: . tests From: Devin Teske In-Reply-To: <20150126014336.P2572@besplex.bde.org> Date: Mon, 26 Jan 2015 13:20:28 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <5D58B34B-8647-4B69-8D90-E7D37C98D4AD@FreeBSD.org> References: <201501241913.t0OJD4xT039188@svn.freebsd.org> <20150125155254.V1007@besplex.bde.org> <20150125142148.GA76051@zxy.spb.ru> <20150126014336.P2572@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.1990.1) Sender: devin@shxd.cx Cc: Baptiste Daroussin , src-committers@freebsd.org, svn-src-all@freebsd.org, Slawa Olhovchenkov , svn-src-head@freebsd.org, Devin Teske X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 21:20:49 -0000 > On Jan 25, 2015, at 7:31 AM, Bruce Evans wrote: >=20 > On Sun, 25 Jan 2015, Slawa Olhovchenkov wrote: >=20 >> On Sun, Jan 25, 2015 at 04:56:24PM +1100, Bruce Evans wrote: >>=20 >>> Negative ids have historical abuses in places like mountd. Which paves the way for the =E2=80=9Caccepted practice=E2=80=9D argument and backed up by =E2=80=9Cin-the-field usage=E2=80=9D statement(s). >>> mountd still >>> hard-codes -2 and -2 for the default uid and gid of an unprivileged = user. >>> It at least casts these values to uid_t and gid_t before using them. >>> This gives the ids the non-random values of UINT32_MAX-1 if uid_t = and >>> gid_t are uint32_t. (If uid_t and gid_t were signed, then it would >>> leave the values as negative, so invalid.) These magic values may = work >>> better than when ids were 16 bits, since there is less risk of them >>> conflicting with a normal id. However, the non-conflict is probably >>> a bug. FreeBSD uses the magic ids of 65534 for user nobody: group >>> nobody. These would have been (id_t)-2 with 16-bit ids. They no >>> longer match, so ls displays (id_t)-2 numerically. FreeBSD also has >>> a group nogroup =3D 65553 that doesn't match the nfs usage. = However2, >>> in FreeBSD-1 wher ids were 16-bits, nobody was 32767 and nogroup was >>> 32766. so they didn't match nfs for other reasons. The 2 non-groups >>> now seem to be just a bug -- FreeBSD-1 didn't have group nobody. >>> 4.4BSD-Lite2 has the same values as FreeBSD-1. >>=20 >> This is not full true for ZFS case. >> On ZFS nobody is 2^32-2. >=20 > File systems don't get to decide this. +1 (and thanks for the historical account, bruce =E2=80=94 sincerely) However, I still want to make the argument that: a. Because we=E2=80=99ve supported mapping negative inputs to unsigned = values in pw *for over a decade*, that=E2=80=A6 b. We should either revert or make a relnotes submission to note that = we=E2=80=99re changing the long-standing accepted practice. Changing the accepted practice broke code internally, it would have = likely broken some external code as well =E2=80=94 and people deserve to = know about said change else we should continue to support accepted = practice that is decade(s) old. =E2=80=94=20 Devin From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 21:24:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 224D34B3; Mon, 26 Jan 2015 21:24:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E05C73; Mon, 26 Jan 2015 21:24:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0QLO5I8076951; Mon, 26 Jan 2015 21:24:05 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0QLO5Du076949; Mon, 26 Jan 2015 21:24:05 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501262124.t0QLO5Du076949@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 26 Jan 2015 21:24:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277776 - head/contrib/llvm/patches X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 21:24:06 -0000 Author: dim Date: Mon Jan 26 21:24:04 2015 New Revision: 277776 URL: https://svnweb.freebsd.org/changeset/base/277776 Log: Add llvm and clang patches corresponding to r277774 and r277775. Added: head/contrib/llvm/patches/patch-29-llvm-r226664-aarch64-x18.diff head/contrib/llvm/patches/patch-30-clang-r227062-fixes-x18.diff Added: head/contrib/llvm/patches/patch-29-llvm-r226664-aarch64-x18.diff ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/patches/patch-29-llvm-r226664-aarch64-x18.diff Mon Jan 26 21:24:04 2015 (r277776) @@ -0,0 +1,83 @@ +Pull in r226664 from upstream llvm trunk (by Tim Northover): + + AArch64: add backend option to reserve x18 (platform register) + + AAPCS64 says that it's up to the platform to specify whether x18 is + reserved, and a first step on that way is to add a flag controlling + it. + + From: Andrew Turner + +Introduced here: http://svnweb.freebsd.org/changeset/base/277774 + +Index: lib/Target/AArch64/AArch64RegisterInfo.cpp +=================================================================== +--- lib/Target/AArch64/AArch64RegisterInfo.cpp ++++ lib/Target/AArch64/AArch64RegisterInfo.cpp +@@ -33,6 +33,10 @@ using namespace llvm; + #define GET_REGINFO_TARGET_DESC + #include "AArch64GenRegisterInfo.inc" + ++static cl::opt ++ReserveX18("aarch64-reserve-x18", cl::Hidden, ++ cl::desc("Reserve X18, making it unavailable as GPR")); ++ + AArch64RegisterInfo::AArch64RegisterInfo(const AArch64InstrInfo *tii, + const AArch64Subtarget *sti) + : AArch64GenRegisterInfo(AArch64::LR), TII(tii), STI(sti) {} +@@ -90,7 +94,7 @@ AArch64RegisterInfo::getReservedRegs(const Machine + Reserved.set(AArch64::W29); + } + +- if (STI->isTargetDarwin()) { ++ if (STI->isTargetDarwin() || ReserveX18) { + Reserved.set(AArch64::X18); // Platform register + Reserved.set(AArch64::W18); + } +@@ -117,7 +121,7 @@ bool AArch64RegisterInfo::isReservedReg(const Mach + return true; + case AArch64::X18: + case AArch64::W18: +- return STI->isTargetDarwin(); ++ return STI->isTargetDarwin() || ReserveX18; + case AArch64::FP: + case AArch64::W29: + return TFI->hasFP(MF) || STI->isTargetDarwin(); +@@ -379,7 +383,7 @@ unsigned AArch64RegisterInfo::getRegPressureLimit( + case AArch64::GPR64commonRegClassID: + return 32 - 1 // XZR/SP + - (TFI->hasFP(MF) || STI->isTargetDarwin()) // FP +- - STI->isTargetDarwin() // X18 reserved as platform register ++ - (STI->isTargetDarwin() || ReserveX18) // X18 reserved as platform register + - hasBasePointer(MF); // X19 + case AArch64::FPR8RegClassID: + case AArch64::FPR16RegClassID: +Index: test/CodeGen/AArch64/arm64-platform-reg.ll +=================================================================== +--- test/CodeGen/AArch64/arm64-platform-reg.ll ++++ test/CodeGen/AArch64/arm64-platform-reg.ll +@@ -1,4 +1,5 @@ +-; RUN: llc -mtriple=arm64-apple-ios -o - %s | FileCheck %s --check-prefix=CHECK-DARWIN ++; RUN: llc -mtriple=arm64-apple-ios -o - %s | FileCheck %s --check-prefix=CHECK-RESERVE-X18 ++; RUN: llc -mtriple=arm64-freebsd-gnu -aarch64-reserve-x18 -o - %s | FileCheck %s --check-prefix=CHECK-RESERVE-X18 + ; RUN: llc -mtriple=arm64-linux-gnu -o - %s | FileCheck %s + + ; x18 is reserved as a platform register on Darwin but not on other +@@ -16,11 +17,11 @@ define void @keep_live() { + ; CHECK: ldr x18 + ; CHECK: str x18 + +-; CHECK-DARWIN-NOT: ldr fp +-; CHECK-DARWIN-NOT: ldr x18 +-; CHECK-DARWIN: Spill +-; CHECK-DARWIN-NOT: ldr fp +-; CHECK-DARWIN-NOT: ldr x18 +-; CHECK-DARWIN: ret ++; CHECK-RESERVE-X18-NOT: ldr fp ++; CHECK-RESERVE-X18-NOT: ldr x18 ++; CHECK-RESERVE-X18: Spill ++; CHECK-RESERVE-X18-NOT: ldr fp ++; CHECK-RESERVE-X18-NOT: ldr x18 ++; CHECK-RESERVE-X18: ret + ret void + } Added: head/contrib/llvm/patches/patch-30-clang-r227062-fixes-x18.diff ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/patches/patch-30-clang-r227062-fixes-x18.diff Mon Jan 26 21:24:04 2015 (r277776) @@ -0,0 +1,54 @@ +Pull in r227062 from upstream clang trunk (by Renato Golin): + + Allows Clang to use LLVM's fixes-x18 option + + This patch allows clang to have llvm reserve the x18 + platform register on AArch64. FreeBSD will use this in the kernel for + per-cpu data but has no need to reserve this register in userland so + will need this flag to reserve it. + + This uses llvm r226664 to allow this register to be reserved. + + Patch by Andrew Turner. + +Introduced here: http://svnweb.freebsd.org/changeset/base/277775 + +Index: tools/clang/include/clang/Driver/Options.td +=================================================================== +--- tools/clang/include/clang/Driver/Options.td ++++ tools/clang/include/clang/Driver/Options.td +@@ -1141,6 +1141,9 @@ def mno_long_calls : Flag<["-"], "mno-long-calls"> + def mgeneral_regs_only : Flag<["-"], "mgeneral-regs-only">, Group, + HelpText<"Generate code which only uses the general purpose registers (AArch64 only)">; + ++def ffixed_x18 : Flag<["-"], "ffixed-x18">, Group, ++ HelpText<"Reserve the x18 register (AArch64 only)">; ++ + def mvsx : Flag<["-"], "mvsx">, Group; + def mno_vsx : Flag<["-"], "mno-vsx">, Group; + def mfprnd : Flag<["-"], "mfprnd">, Group; +Index: tools/clang/lib/Driver/Tools.cpp +=================================================================== +--- tools/clang/lib/Driver/Tools.cpp ++++ tools/clang/lib/Driver/Tools.cpp +@@ -887,6 +887,11 @@ void Clang::AddAArch64TargetArgs(const ArgList &Ar + if (A->getOption().matches(options::OPT_mno_global_merge)) + CmdArgs.push_back("-mno-global-merge"); + } ++ ++ if (Args.hasArg(options::OPT_ffixed_x18)) { ++ CmdArgs.push_back("-backend-option"); ++ CmdArgs.push_back("-aarch64-reserve-x18"); ++ } + } + + // Get CPU and ABI names. They are not independent +Index: tools/clang/test/Driver/aarch64-fixed-x18.c +=================================================================== +--- tools/clang/test/Driver/aarch64-fixed-x18.c ++++ tools/clang/test/Driver/aarch64-fixed-x18.c +@@ -0,0 +1,4 @@ ++// RUN: %clang -target aarch64-none-gnu -ffixed-x18 -### %s 2> %t ++// RUN: FileCheck --check-prefix=CHECK-FIXED-X18 < %t %s ++ ++// CHECK-FIXED-X18: "-backend-option" "-aarch64-reserve-x18" From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 21:24:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8847A686; Mon, 26 Jan 2015 21:24:58 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5EE4694; Mon, 26 Jan 2015 21:24:58 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B5227B93A; Mon, 26 Jan 2015 16:24:56 -0500 (EST) From: John Baldwin To: Olivier =?ISO-8859-1?Q?Cochard=2DLabb=E9?= Subject: Re: svn commit: r277714 - head/sbin/ipfw Date: Mon, 26 Jan 2015 16:24:46 -0500 Message-ID: <2669297.0BvAQ4C19U@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: References: <201501252037.t0PKbXNW070662@svn.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 26 Jan 2015 16:24:56 -0500 (EST) Cc: svn-src-head , svn-src-all , src-committers X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 21:24:58 -0000 On Monday, January 26, 2015 09:34:39 PM Olivier Cochard-Labb=E9 wrote: > On Sun, Jan 25, 2015 at 9:37 PM, John Baldwin wrote= : > > Author: jhb > > Date: Sun Jan 25 20:37:32 2015 > > New Revision: 277714 > > URL: https://svnweb.freebsd.org/changeset/base/277714 > >=20 > > Log: > > natd(8) will work with an unconfigured interface and effectively = not do > > anything until the interface is assigned an address. This fixes > > ipfw_nat to do the same by using an IP of INADDR_ANY instead of > > aborting the nat setup if the requested interface is not yet conf= igured. >=20 > Hi, >=20 > I've still a problem with ipfw_nat and unconfigured interface: > On my setup I'm using ipfw with NAT rules using an OpenVPN tunnel int= erface > as source address for NATting. >=20 > During the machine startup, ipfw is started before openvpn (hopefully= ) and > its configuration mention do to NAT using tun0 IP address. > Then OpenVPN start and create a tun0 and set an IP address on it. > =3D> But no unicast traffic is allowed on this tun0 interface until I= restart > ipfw. >=20 > If I correctly understand the log of this commit: This behavior shoul= d be > fixed by this commit, right ? It might. What happened for me is that I was using nat over wlan0 for = VM's on my laptop to reach the outside world, but wlan0 doesn't get an IP un= til later in the boot after it associates. As a result, wlan0 wasn't passi= ng any IP traffic until this fix (or if I reloaded ipfw after wlan0 was config= ured). --=20 John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 21:50:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 36439177; Mon, 26 Jan 2015 21:50:48 +0000 (UTC) Received: from valery.hibma.org (valery.hibma.org [IPv6:2a02:2308::216:3eff:fe79:3a6c]) by mx1.freebsd.org (Postfix) with ESMTP id EB6AE644; Mon, 26 Jan 2015 21:50:47 +0000 (UTC) Received: from [IPv6:2001:980:530a:1:a50a:7377:3b14:392f] (unknown [IPv6:2001:980:530a:1:a50a:7377:3b14:392f]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by valery.hibma.org (Postfix) with ESMTPSA id 8D3036B9807; Mon, 26 Jan 2015 22:50:37 +0100 (CET) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.4\)) Subject: Re: svn commit: r277714 - head/sbin/ipfw From: Nick Hibma In-Reply-To: <2669297.0BvAQ4C19U@ralph.baldwin.cx> Date: Mon, 26 Jan 2015 22:50:37 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <163C05D4-6893-47A2-B427-F482A59E8FE5@van-laarhoven.org> References: <201501252037.t0PKbXNW070662@svn.freebsd.org> <2669297.0BvAQ4C19U@ralph.baldwin.cx> To: =?windows-1252?Q?Olivier_Cochard-Labb=E9?= X-Mailer: Apple Mail (2.2070.4) Cc: svn-src-head , svn-src-all , src-committers , John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 21:50:48 -0000 > On 26 Jan 2015, at 22:24, John Baldwin wrote: >=20 > On Monday, January 26, 2015 09:34:39 PM Olivier Cochard-Labb=E9 wrote: >> On Sun, Jan 25, 2015 at 9:37 PM, John Baldwin = wrote: >>> Author: jhb >>> Date: Sun Jan 25 20:37:32 2015 >>> New Revision: 277714 >>> URL: https://svnweb.freebsd.org/changeset/base/277714 >>>=20 >>> Log: >>> natd(8) will work with an unconfigured interface and effectively = not do >>> anything until the interface is assigned an address. This fixes >>> ipfw_nat to do the same by using an IP of INADDR_ANY instead of >>> aborting the nat setup if the requested interface is not yet = configured. >>=20 >> Hi, >>=20 >> I've still a problem with ipfw_nat and unconfigured interface: >> On my setup I'm using ipfw with NAT rules using an OpenVPN tunnel = interface >> as source address for NATting. >>=20 >> During the machine startup, ipfw is started before openvpn = (hopefully) and >> its configuration mention do to NAT using tun0 IP address. >> Then OpenVPN start and create a tun0 and set an IP address on it. >> =3D> But no unicast traffic is allowed on this tun0 interface until I = restart >> ipfw. >>=20 >> If I correctly understand the log of this commit: This behavior = should be >> fixed by this commit, right ? >=20 > It might. What happened for me is that I was using nat over wlan0 for = VM's > on my laptop to reach the outside world, but wlan0 doesn't get an IP = until > later in the boot after it associates. As a result, wlan0 wasn't = passing any > IP traffic until this fix (or if I reloaded ipfw after wlan0 was = configured). I don=92t think it does. The interface is not available until openvpn is = started.You need to clone the interface during boot by adding cloned_interfaces=3D=91tun0=92 in your /etc/rc.conf. Initialisation is then done later by openvpn. Let me know if that works for you. Nick= From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 22:17:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84375A4C; Mon, 26 Jan 2015 22:17:58 +0000 (UTC) Received: from mail-wi0-x22a.google.com (mail-wi0-x22a.google.com [IPv6:2a00:1450:400c:c05::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0DA6F9B1; Mon, 26 Jan 2015 22:17:58 +0000 (UTC) Received: by mail-wi0-f170.google.com with SMTP id em10so9702725wid.1; Mon, 26 Jan 2015 14:17:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=CnV1AEeqTqd+QHOfYZPyaOEk0SepgfNnuOaqBUW0Kjg=; b=IqxwRDJ+wPFCh5HxN7BC1b2gJuw0WSMXDjsALffvPr9eTR29N0qs0VMHwb82CEQvmN fLfpadGd1vdBBS/hE28leKfzLoR6CT1VZ4k1laXRhszvytlusMqRCEuF0vfVCzALl2mp wbXkCTMxkgWiwZdQVRsFA5LVPbRV2fiP4g5ekyr7ZNkjiyX5+k7s6PcmkCLFRX4n4jmV 2bvjtKX8qSQdae09R/oBWyf/i26sdGuAkXkdIHyHU/CYDTumBP/SLBZ8pOddVl/ncvAe BPpz/0nlZuWLoEm0N5JwVpsC404WArKGXCfzMi+/3sQ9+WI6/1gZz5MKmTmmTdVAclcs CsFA== X-Received: by 10.180.76.72 with SMTP id i8mr858407wiw.22.1422310676301; Mon, 26 Jan 2015 14:17:56 -0800 (PST) MIME-Version: 1.0 Sender: cochard@gmail.com Received: by 10.194.61.1 with HTTP; Mon, 26 Jan 2015 14:17:35 -0800 (PST) In-Reply-To: <163C05D4-6893-47A2-B427-F482A59E8FE5@van-laarhoven.org> References: <201501252037.t0PKbXNW070662@svn.freebsd.org> <2669297.0BvAQ4C19U@ralph.baldwin.cx> <163C05D4-6893-47A2-B427-F482A59E8FE5@van-laarhoven.org> From: =?ISO-8859-1?Q?Olivier_Cochard=2DLabb=E9?= Date: Mon, 26 Jan 2015 23:17:35 +0100 X-Google-Sender-Auth: jBawVRTSgTuJCbo__xKRZGwQOLQ Message-ID: Subject: Re: svn commit: r277714 - head/sbin/ipfw To: Nick Hibma Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: svn-src-head , svn-src-all , src-committers , John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 22:17:58 -0000 On Mon, Jan 26, 2015 at 10:50 PM, Nick Hibma wrote: > > > On 26 Jan 2015, at 22:24, John Baldwin wrote: > > > > > > It might. What happened for me is that I was using nat over wlan0 for > VM's > > on my laptop to reach the outside world, but wlan0 doesn't get an IP > until > > later in the boot after it associates. As a result, wlan0 wasn't > passing any > > IP traffic until this fix (or if I reloaded ipfw after wlan0 was > configured). > With a FreeBSD 11-current 277728 I still have the ipfw_nat problem on unconfigured/unexistant interface. > > I don't think it does. The interface is not available until openvpn is > started.You need to clone the interface during boot by adding > > cloned_interfaces='tun0' > > in your /etc/rc.conf. Initialisation is then done later by openvpn. > > Let me know if that works for you. > > I've tried with cloned_interfaces too: but same problem. Here is the status of ipfw just after a boot (ipfw loaded before tun0 IP setup): []~> ipfw show 00100 0 0 allow ip from any to any via lo0 00200 0 0 allow ip from any to any via lo1 00300 0 0 allow ip from any to any via vtnet6 00400 0 0 allow ip from any to any via wlan0 00500 172 21355 nat 1 ip from any to any in via vtnet4 00600 62 4264 nat 2 ip from any to any in via tun0 00700 0 0 check-state 00800 0 0 allow udp from 0.0.0.0 68 to 255.255.255.255 dst-port 67 out via vtnet4 00900 0 0 allow udp from any 67 to me dst-port 68 in via vtnet4 01000 0 0 allow udp from any 67 to 255.255.255.255 dst-port 68 in via vtnet4 01100 0 0 allow icmp from me to any out via vtnet4 keep-state 01200 11 756 allow udp from me to any dst-port 53 out via vtnet4 keep-state 01300 4 304 allow udp from me to any dst-port 123 out via vtnet4 keep-state 01400 172 21725 allow udp from me to any dst-port 1195 out via vtnet4 keep-state 01500 0 0 nat 1 ip from 10.6.1.0/24,10.6.2.0/24 to any out via vtnet4 01600 0 0 nat 2 udp from me to 2.2.2.2 dst-port 1812,1813 out via tun0 01700 68 4452 allow ip from any to any via tun0 65535 0 0 deny ip from any to any => All rules are present (even the "nat 2" table) and seems ok. => No packet seems to be denied But my OSPF adjacency didn't came up on the tun0 interface: []~> tcpdump -pni tun0 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on tun0, link-type NULL (BSD loopback), capture size 262144 bytes capability mode sandbox enabled 21:25:09.555746 IP 10.0.3.2 > 224.0.0.5: OSPFv2, Hello, length 44 21:25:10.595286 IP 10.0.3.1 > 224.0.0.5: OSPFv2, Hello, length 48 ^C 2 packets captured 2 packets received by filter 0 packets dropped by kernel => tcpdump shows only some multicast traffic: It's the problem because ifpw is filtering all unicast traffic on tun0 in its current state. For solving this problem I just had to reload ipfw: []~> service ipfw restart net.inet.ip.fw.enable: 1 -> 0 net.inet6.ip6.fw.enable: 1 -> 0 Firewall rules loaded. => This fix the problem, unicast traffic are now allowed: []~> tcpdump -pni tun0 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on tun0, link-type NULL (BSD loopback), capture size 262144 bytes capability mode sandbox enabled 21:25:34.772225 IP 10.0.3.2 > 10.0.3.1: OSPFv2, Database Description, length 32 21:25:35.784449 IP 10.0.3.1 > 10.0.3.2: OSPFv2, Database Description, length 32 21:25:35.784550 IP 10.0.3.2 > 10.0.3.1: OSPFv2, Database Description, length 52 21:25:35.785904 IP 10.0.3.1 > 10.0.3.2: OSPFv2, Database Description, length 192 21:25:35.786007 IP 10.0.3.2 > 10.0.3.1: OSPFv2, Database Description, length 32 From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 22:34:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2698AF0C; Mon, 26 Jan 2015 22:34:20 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 9F43FBAA; Mon, 26 Jan 2015 22:34:18 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t0QMYGMX012054 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 27 Jan 2015 01:34:16 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t0QMYGfe012053; Tue, 27 Jan 2015 01:34:16 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 27 Jan 2015 01:34:16 +0300 From: Gleb Smirnoff To: Garrett Cooper Subject: Re: svn commit: r277678 - in head: etc/rc.d sbin share/man/man4 share/mk sys/conf sys/modules/geom tools/build/mk tools/build/options Message-ID: <20150126223416.GX15484@FreeBSD.org> References: <201501250452.t0P4qncu024343@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201501250452.t0P4qncu024343@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 22:34:20 -0000 On Sun, Jan 25, 2015 at 04:52:49AM +0000, Garrett Cooper wrote: G> Author: ngie G> Date: Sun Jan 25 04:52:48 2015 G> New Revision: 277678 G> URL: https://svnweb.freebsd.org/changeset/base/277678 G> G> Log: G> Add MK_CCD knob for building and installing ccd(4), ccdconfig, etc G> G> MFC after: 2 weeks G> Sponsored by: EMC / Isilon Storage Division Does ccd(4) has any benefits over gstripe? Looks like abandonware to be retired. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 01:09:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id E55D41D2; Tue, 27 Jan 2015 01:09:03 +0000 (UTC) Date: Tue, 27 Jan 2015 01:09:03 +0000 From: Alexey Dokuchaev To: John Baldwin Subject: Re: svn commit: r277710 - head/sys/dev/pci Message-ID: <20150127010903.GA54501@FreeBSD.org> References: <201501251953.t0PJrAOe050969@svn.freebsd.org> <20150126141908.GA20541@FreeBSD.org> <54C66603.50100@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54C66603.50100@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 01:09:04 -0000 On Mon, Jan 26, 2015 at 11:06:27AM -0500, John Baldwin wrote: > On 1/26/15 9:19 AM, Alexey Dokuchaev wrote: > > On Sun, Jan 25, 2015 at 07:53:10PM +0000, John Baldwin wrote: > >> New Revision: 277710 > >> URL: https://svnweb.freebsd.org/changeset/base/277710 > >> > >> Log: > >> Pass a valid Dx state variable to PCIB_POWER_FOR_SLEEP() in > >> pcib_resume() instead of NULL. > > > > Can this be possibly related to this message I got trying to resume a > > laptop running recent -current [...] ? > > Well, the patch came up from debugging something along those lines, but > it will not fix it. OK; still nice to hear someone is seeing these as well. Shall there by any other patches that could benefit from more testing, I'd gladly help. ./danfe From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 01:39:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 99C39B58; Tue, 27 Jan 2015 01:39:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6AA5D2EA; Tue, 27 Jan 2015 01:39:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0R1dhb0097296; Tue, 27 Jan 2015 01:39:43 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0R1dhs3097293; Tue, 27 Jan 2015 01:39:43 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501270139.t0R1dhs3097293@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 27 Jan 2015 01:39:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r277782 - vendor/tcpdump/dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 01:39:43 -0000 Author: pfg Date: Tue Jan 27 01:39:42 2015 New Revision: 277782 URL: https://svnweb.freebsd.org/changeset/base/277782 Log: Merge some cherry-picked fixes originating in OpenBSD Check whether the version field is available before looking at it. While we're at it, use ND_TCHECK(), rather than a hand-rolled check, to check whether we have the full fixed-length portion of the IPv4 header. commit c67afe913011138a2504ec4d3d423b48e73b12f3 Do more length checking. From OpenBSD. commit d7516761f9c4877bcb05bb6543be3543e165249 Modified: vendor/tcpdump/dist/print-ip.c vendor/tcpdump/dist/print-sl.c Modified: vendor/tcpdump/dist/print-ip.c ============================================================================== --- vendor/tcpdump/dist/print-ip.c Mon Jan 26 23:45:10 2015 (r277781) +++ vendor/tcpdump/dist/print-ip.c Tue Jan 27 01:39:42 2015 (r277782) @@ -529,6 +529,7 @@ ip_print(netdissect_options *ndo, struct protoent *proto; ipds->ip = (const struct ip *)bp; + ND_TCHECK(ipds->ip->ip_vhl); if (IP_V(ipds->ip) != 4) { /* print version if != 4 */ ND_PRINT((ndo, "IP%u ", IP_V(ipds->ip))); if (IP_V(ipds->ip) == 6) @@ -537,10 +538,7 @@ ip_print(netdissect_options *ndo, else if (!ndo->ndo_eflag) ND_PRINT((ndo, "IP ")); - if ((u_char *)(ipds->ip + 1) > ndo->ndo_snapend) { - ND_PRINT((ndo, "%s", tstr)); - return; - } + ND_TCHECK(*ipds->ip); if (length < sizeof (struct ip)) { ND_PRINT((ndo, "truncated-ip %u", length)); return; @@ -669,6 +667,11 @@ ip_print(netdissect_options *ndo, ND_PRINT((ndo, " ip-proto-%d", ipds->ip->ip_p)); } } + return; + +trunc: + ND_PRINT((ndo, "%s", tstr)); + return; } void Modified: vendor/tcpdump/dist/print-sl.c ============================================================================== --- vendor/tcpdump/dist/print-sl.c Mon Jan 26 23:45:10 2015 (r277781) +++ vendor/tcpdump/dist/print-sl.c Tue Jan 27 01:39:42 2015 (r277782) @@ -62,7 +62,7 @@ sl_if_print(netdissect_options *ndo, register u_int length = h->len; register const struct ip *ip; - if (caplen < SLIP_HDRLEN) { + if (caplen < SLIP_HDRLEN || length < SLIP_HDRLEN) { ND_PRINT((ndo, "%s", tstr)); return (caplen); } From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 01:45:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 07824D1E; Tue, 27 Jan 2015 01:45:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD9673E0; Tue, 27 Jan 2015 01:45:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0R1jmCM001688; Tue, 27 Jan 2015 01:45:48 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0R1jmFW001686; Tue, 27 Jan 2015 01:45:48 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501270145.t0R1jmFW001686@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 27 Jan 2015 01:45:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277783 - head/contrib/tcpdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 01:45:49 -0000 Author: pfg Date: Tue Jan 27 01:45:47 2015 New Revision: 277783 URL: https://svnweb.freebsd.org/changeset/base/277783 Log: MFV r277782: Merge some cherry-picked fixes originating in OpenBSD Check whether the version field is available before looking at it. While we're at it, use ND_TCHECK(), rather than a hand-rolled check, to check whether we have the full fixed-length portion of the IPv4 header. commit c67afe913011138a2504ec4d3d423b48e73b12f3 Do more length checking. From OpenBSD. commit d7516761f9c4877bcb05bb6543be3543e165249 Modified: head/contrib/tcpdump/print-ip.c head/contrib/tcpdump/print-sl.c Directory Properties: head/contrib/tcpdump/ (props changed) Modified: head/contrib/tcpdump/print-ip.c ============================================================================== --- head/contrib/tcpdump/print-ip.c Tue Jan 27 01:39:42 2015 (r277782) +++ head/contrib/tcpdump/print-ip.c Tue Jan 27 01:45:47 2015 (r277783) @@ -537,6 +537,7 @@ ip_print(netdissect_options *ndo, struct protoent *proto; ipds->ip = (const struct ip *)bp; + ND_TCHECK(ipds->ip->ip_vhl); if (IP_V(ipds->ip) != 4) { /* print version if != 4 */ ND_PRINT((ndo, "IP%u ", IP_V(ipds->ip))); if (IP_V(ipds->ip) == 6) @@ -545,10 +546,7 @@ ip_print(netdissect_options *ndo, else if (!ndo->ndo_eflag) ND_PRINT((ndo, "IP ")); - if ((u_char *)(ipds->ip + 1) > ndo->ndo_snapend) { - ND_PRINT((ndo, "%s", tstr)); - return; - } + ND_TCHECK(*ipds->ip); if (length < sizeof (struct ip)) { ND_PRINT((ndo, "truncated-ip %u", length)); return; @@ -677,6 +675,11 @@ ip_print(netdissect_options *ndo, ND_PRINT((ndo, " ip-proto-%d", ipds->ip->ip_p)); } } + return; + +trunc: + ND_PRINT((ndo, "%s", tstr)); + return; } void Modified: head/contrib/tcpdump/print-sl.c ============================================================================== --- head/contrib/tcpdump/print-sl.c Tue Jan 27 01:39:42 2015 (r277782) +++ head/contrib/tcpdump/print-sl.c Tue Jan 27 01:45:47 2015 (r277783) @@ -64,7 +64,7 @@ sl_if_print(netdissect_options *ndo, register u_int length = h->len; register const struct ip *ip; - if (caplen < SLIP_HDRLEN) { + if (caplen < SLIP_HDRLEN || length < SLIP_HDRLEN) { ND_PRINT((ndo, "%s", tstr)); return (caplen); } From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 02:26:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E92EA402; Tue, 27 Jan 2015 02:26:56 +0000 (UTC) Received: from mail-pa0-x22d.google.com (mail-pa0-x22d.google.com [IPv6:2607:f8b0:400e:c03::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AFAD19D2; Tue, 27 Jan 2015 02:26:56 +0000 (UTC) Received: by mail-pa0-f45.google.com with SMTP id et14so15328775pad.4; Mon, 26 Jan 2015 18:26:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=qLaFCD0CS8ukXPnx7a7tSO39xbrcxUEJFp9Nd8ZVg5M=; b=UQYl53jGZagjpAzuaEwJBqvuJrLoaDRyFlVE7FbaM5RhucfR8fee9k4cH0blCwa5On qXf/i1IW/kzXQFxU7DQ8ay1ocoq9KJuX2n3lNKPd5+yGsGxK5zd139lzMevkhacN4mED LiBfxe9LyvdXaf1PRhA8jqUM1xVMcpa6Q3cltVimGW72I3T8pMc4LLqrHk6RYRg46o66 dWaASEGTRerweJEqcBKr7q2q1TTW8sTSNSOJHdqfCPDlomZ3SP+NDLoBmK1F12dHBT/f QFSbgxgV6F06ZkH1pftAqH8OC6bnyZ5G+ldhcuNbSfsgr6Pwz/oDjMZkpo1wX2kjV28k Jjxg== X-Received: by 10.68.222.130 with SMTP id qm2mr39731236pbc.44.1422325616231; Mon, 26 Jan 2015 18:26:56 -0800 (PST) Received: from ?IPv6:2601:8:ab80:7d6:bc82:b31b:4ccc:789f? ([2601:8:ab80:7d6:bc82:b31b:4ccc:789f]) by mx.google.com with ESMTPSA id qp4sm10917331pbc.63.2015.01.26.18.26.55 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 26 Jan 2015 18:26:55 -0800 (PST) Content-Type: multipart/signed; boundary="Apple-Mail=_15D0C615-AC0B-4CBF-9F68-13BCEC35A1B2"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r277737 - in head: etc/pam.d tools/build/mk From: Garrett Cooper In-Reply-To: <86fvax91cy.fsf@nine.des.no> Date: Mon, 26 Jan 2015 18:26:54 -0800 Message-Id: References: <201501260850.t0Q8oDna015719@svn.freebsd.org> <86fvax91cy.fsf@nine.des.no> To: =?iso-8859-1?Q?Dag-Erling_Sm=F8rgrav?= X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Garrett Cooper X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 02:26:57 -0000 --Apple-Mail=_15D0C615-AC0B-4CBF-9F68-13BCEC35A1B2 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Jan 26, 2015, at 4:23, Dag-Erling Sm=F8rgrav wrote: > Garrett Cooper writes: >> Log: >> Honor MK_ACCT with etc/pam.d/atrun >=20 > The correct idiom would be I disagree for a few reasons: 1. style.Makefile(9) makes no mention of having to use an idiom over the = other. 2. The likelihood of typos creeping into Makefiles is greater with the = _foo=3D idiom. 3. It creates unnecessary local variables =97 especially when appending = is so easy to do. 4. It=92s more difficult when backporting changes to do it with the = variable method =97 especially if context around the line modified has = changed a great deal. --Apple-Mail=_15D0C615-AC0B-4CBF-9F68-13BCEC35A1B2 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJUxvduAAoJEMZr5QU6S73enfIH/1pLmfrXzfKUjFRM+FhCqZf4 3gxJ/wemz8jTiQDfwo2Lhhq7PqK2UmtIEaVfF6X6nsF/9CcXbO7cu0ESKn5KC4U/ 7C1GVtYdUzp++Fy1L2YfexPgIOy8+cOYHyI/BXPEp2mKsOFyCtSBFnwQlYaAK5P3 +2Vqb2a5mnuwE9adRwGyJPrQjW7KQVNDC8PmkzyAC/YZHXtYnU3HpvLw0khQ0kgm LhMC423IfJ/74xEu7IJeq0ZGqPY0Ix3n3WcR/qwSFMk4KeI1WRxs9F5JQ/js6iaE W0yLn7cJXhKtBOARy5Mdn58ocx0F+kUp3bnquyVilwu2phmDs9WpR3Kn7hSXDkY= =SM3W -----END PGP SIGNATURE----- --Apple-Mail=_15D0C615-AC0B-4CBF-9F68-13BCEC35A1B2-- From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 02:30:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 243FB560; Tue, 27 Jan 2015 02:30:36 +0000 (UTC) Received: from mail-pa0-x22a.google.com (mail-pa0-x22a.google.com [IPv6:2607:f8b0:400e:c03::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DE764A7D; Tue, 27 Jan 2015 02:30:35 +0000 (UTC) Received: by mail-pa0-f42.google.com with SMTP id bj1so15392614pad.1; Mon, 26 Jan 2015 18:30:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=Cd5KqS0zhPZfC8Pa8lDgh0jkgy3P48S2AzGrbDRaltA=; b=xxdeznVpoopyers5Jy6M0S/Z3IkXifsXvgcyHXBau/Abo+zwbVEHeBOGHdCINx7std kxia8IlwEwHhgP46mKyhjBYDGEWTX2sHJL25CX0fLn7L+PKRkEp7NZSJ8xBBTrGlAk0r iKP5nLDaXIOmLfWbNu+5tli2I1E9sGeUkRRoNAhsvSaVT87+QVCOxZ6lW4JGkUiA8fdE M3uUeK7jzU70VnJ01yvEstRUcG0lvkm5XCU/AzR/ZQJdmh4mZdIx+xATXxXQvnMAwySZ ubr6mFw1ErIPTBPUXxsQzpg/0BxFQxO5Q+Ace0CadYVWg2T20IF9KXvsbv1sXgQP0gIo JnzQ== X-Received: by 10.68.195.65 with SMTP id ic1mr20766481pbc.109.1422325835498; Mon, 26 Jan 2015 18:30:35 -0800 (PST) Received: from ?IPv6:2601:8:ab80:7d6:bc82:b31b:4ccc:789f? ([2601:8:ab80:7d6:bc82:b31b:4ccc:789f]) by mx.google.com with ESMTPSA id z3sm10955957pbt.13.2015.01.26.18.30.32 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 26 Jan 2015 18:30:34 -0800 (PST) Content-Type: multipart/signed; boundary="Apple-Mail=_7B88D40A-1A55-4B5B-BDF4-C6E466BD3E71"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r277681 - in head/sys: conf modules From: Garrett Cooper In-Reply-To: <0CF820AF-D73D-4CE8-BE5B-C4EBE5A9EFDA@bsdimp.com> Date: Mon, 26 Jan 2015 18:30:32 -0800 Message-Id: <5CC0EF20-0DDC-4082-BD2A-5DD64822B03D@gmail.com> References: <201501250513.t0P5DGoc033955@svn.freebsd.org> <0CF820AF-D73D-4CE8-BE5B-C4EBE5A9EFDA@bsdimp.com> To: Warner Losh X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Garrett Cooper X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 02:30:36 -0000 --Apple-Mail=_7B88D40A-1A55-4B5B-BDF4-C6E466BD3E71 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Jan 25, 2015, at 9:46, Warner Losh wrote: > The number of MK_foo opts that are intruding into the kernel module = builds is > starting to get out of hand. :( Especially since they are duplicative = of the > MODULES_OVERRIDE functionality and are very unevenly applied. I don=92t really like it either to be honest, but the problem is that = building MK_CUSE =3D=3D no (for instance) should produce a working = default set of SUBDIRs so both the kernel and userland infrastructure = are compiled with the build. Telling someone to use MODULES_OVERRIDE to = just remove cuse (for instance), is a user unfriendly system.. If there was a way to pick up a subset of src.opts.mk though and apply = it to kern.opts.mk, I would be incredibly keen on making that change. Thank you! --Apple-Mail=_7B88D40A-1A55-4B5B-BDF4-C6E466BD3E71 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJUxvhIAAoJEMZr5QU6S73eJuoH/0n7x2KdDKtnXqTHtfvDZ3DU 9CU9Yo1wdQr6ryK1KUtAWveMIM0apWm5AJeTaaPLG5x6OhyzaAFsfi9YrXOf3D2i kMpg6hiIzeeReeDrUSMyS9X4WBfA5XnKAL8kylH83OQF8iCPkhsVRLyuuccbsIYL PE4pLslNBraCHpaTG23GSXksAmG4UjLQeHmsKC01wGobaVBYimGKxbDwt+yPxFIj cuSv1Bbg2vEbzMk5E9CQohhulxPvVkSMk2lUH/zvpEUCUUNOBKb3iDpxn+5yy4MU 1q6KHueGf058JK36HgeGXt4ISDmUCEC5T90FBNpoxAlirdc9xJAOMk9jMCYMf2s= =U9Ka -----END PGP SIGNATURE----- --Apple-Mail=_7B88D40A-1A55-4B5B-BDF4-C6E466BD3E71-- From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 02:36:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 176D96D4; Tue, 27 Jan 2015 02:36:21 +0000 (UTC) Received: from mail-pd0-x233.google.com (mail-pd0-x233.google.com [IPv6:2607:f8b0:400e:c02::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DA93FAAC; Tue, 27 Jan 2015 02:36:20 +0000 (UTC) Received: by mail-pd0-f179.google.com with SMTP id v10so15851927pde.10; Mon, 26 Jan 2015 18:36:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=t2Ltt5lZX90ZQ1jFUheTPG8kBq0+U4ypXpHZ4NN6z68=; b=G0S5lmD08ZxQ8tZ2d11ZvHsZNmAPYwXtHWcR5WBK1loRt1wLDHK1KLQnSIyDvmKHhQ 6mLC/hbHBd0Ev5IszXf2PKDoELacgAV9FReqJoLBxIAIQHIUf2FVA7eh59GnNCwBHEBC /FNM79aPL2rYRJgUaG0FCP2Ok+mMhYffFKz5Ve/e61Uhr7RyCrCsHP7O2EPQKrtnBzQo JauBGy0nCEwbjzeEuCIsyavGIYJXWDMsYcLWT15tDhSCCLIfIanEcX9pzvkt4dg7eT6t EdDxez4zBaxaZB70Ku4pabUCSZhVngTnTQjoHEf2Kjno0ME6SiUxBViozy5wpMaHUJK6 phlA== X-Received: by 10.66.119.193 with SMTP id kw1mr40062542pab.64.1422326180326; Mon, 26 Jan 2015 18:36:20 -0800 (PST) Received: from ?IPv6:2601:8:ab80:7d6:bc82:b31b:4ccc:789f? ([2601:8:ab80:7d6:bc82:b31b:4ccc:789f]) by mx.google.com with ESMTPSA id 9sm10954163pdg.38.2015.01.26.18.36.18 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 26 Jan 2015 18:36:19 -0800 (PST) Content-Type: multipart/signed; boundary="Apple-Mail=_65845936-61F9-4FBF-97F3-D715BF39BA7C"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r276423 - stable/10/share/mk From: Garrett Cooper In-Reply-To: Date: Mon, 26 Jan 2015 18:36:19 -0800 Message-Id: <96750137-123C-4D51-9EC7-8269D9463AC1@gmail.com> References: <201412302046.sBUKk2B3049040@svn.freebsd.org> To: Julio Merino X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org, Garrett Cooper X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 02:36:21 -0000 --Apple-Mail=_65845936-61F9-4FBF-97F3-D715BF39BA7C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Dec 31, 2014, at 7:54, Julio Merino wrote: > On Dec 30, 2014, at 21:46, Garrett Cooper wrote: >=20 >> Author: ngie >> Date: Tue Dec 30 20:46:01 2014 >> New Revision: 276423 >> URL: https://svnweb.freebsd.org/changeset/base/276423 >>=20 >> Log: >> MFC r274077: >>=20 >> As an optimization (in simple, well used cases) only call cat = ${.ALLSRC} when >> generating files from various sources instead of calling cat = ${.ALLSRC} | sed >=20 > Is there any visible effect to this optimization? Otherwise, the = extra complexity does not seem warranted. Hi Julio! There are a few things to gain from this: 1. Errors with cat=92ing the files are caught when sed transformations = aren=92t applied to the files. 2. Less resources are used in generating the files if sed isn=92t = needed: i. Less forked processes. ii. No pipelines need to be created. I don=92t have numbers for how much faster it is (probably negligible if = done once, potentially more noticeable if done as a micro benchmark), = but I could do this if you like. Thank you! --Apple-Mail=_65845936-61F9-4FBF-97F3-D715BF39BA7C Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJUxvmjAAoJEMZr5QU6S73euhgH/3VMnKcSOdxtv81nTd78ZfQz 7v5O7dYr0h+kvmXyJoas+NUdrRKp999TK3sUI12lBu2Z2FOZuTS3BWLG11sulq7R H8i1G1GWBXAuWHArvllbgXmeeuVQF9B2gTNtfsG6WjK5KdD+I2z8jtBtJJlP+x3r Y3/FDZ2yFefpBg/6qs4nSnkcSeyPkLZcQoHzmc/X2HiedAPCFzYuhHdsk2NJQTWc 3flH7ielCZpLO+cygULnPv9ZPsZouLwIulaQKhlq7o1mk4DPXCIWkGB5uZiwZqaL CWbyiKDw0TlobYzTI3iMyYVnr8kkXbUUNSlJ/glE0ZSrDbhGNv6i881EOxuKauo= =1JLW -----END PGP SIGNATURE----- --Apple-Mail=_65845936-61F9-4FBF-97F3-D715BF39BA7C-- From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 04:06:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 125C1948; Tue, 27 Jan 2015 04:06:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F26A5673; Tue, 27 Jan 2015 04:06:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0R46mHC076744; Tue, 27 Jan 2015 04:06:48 GMT (envelope-from gshapiro@FreeBSD.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0R46mkh076742; Tue, 27 Jan 2015 04:06:48 GMT (envelope-from gshapiro@FreeBSD.org) Message-Id: <201501270406.t0R46mkh076742@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gshapiro set sender to gshapiro@FreeBSD.org using -f From: Gregory Neil Shapiro Date: Tue, 27 Jan 2015 04:06:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277787 - in head: contrib/sendmail/cf/m4 etc/sendmail X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 04:06:49 -0000 Author: gshapiro Date: Tue Jan 27 04:06:47 2015 New Revision: 277787 URL: https://svnweb.freebsd.org/changeset/base/277787 Log: Remove build specific details from sendmail.cf/submit.cf in support of https://wiki.freebsd.org/ReproducibleBuilds The contrib/sendmail change will be made in the upstream source for a future sendmail release. Reviewed by: des MFC after: 3 days Modified: head/contrib/sendmail/cf/m4/cfhead.m4 head/etc/sendmail/Makefile Modified: head/contrib/sendmail/cf/m4/cfhead.m4 ============================================================================== --- head/contrib/sendmail/cf/m4/cfhead.m4 Tue Jan 27 03:37:58 2015 (r277786) +++ head/contrib/sendmail/cf/m4/cfhead.m4 Tue Jan 27 04:06:47 2015 (r277787) @@ -20,7 +20,7 @@ ifdef(`__win32__', `dnl', `dnl ifdef(`TEMPFILE', `dnl', `define(`TEMPFILE', maketemp(/tmp/cfXXXXXX))dnl syscmd(sh _CF_DIR_`'sh/makeinfo.sh _CF_DIR_ > TEMPFILE)dnl -include(TEMPFILE)dnl +ifdef(`_NO_MAKEINFO_',, `include(TEMPFILE)')dnl syscmd(rm -f TEMPFILE)dnl')') ##### ###################################################################### Modified: head/etc/sendmail/Makefile ============================================================================== --- head/etc/sendmail/Makefile Tue Jan 27 03:37:58 2015 (r277786) +++ head/etc/sendmail/Makefile Tue Jan 27 04:06:47 2015 (r277787) @@ -17,7 +17,8 @@ M4FILES!= find ${SENDMAIL_CF_DIR} -type .mc.cf: ${M4FILES} ${RM} ${.TARGET} - ${M4} -D_CF_DIR_=${SENDMAIL_CF_DIR}/ ${SENDMAIL_M4_FLAGS} \ + ${M4} -D_CF_DIR_=${SENDMAIL_CF_DIR}/ -D_NO_MAKEINFO_ \ + ${SENDMAIL_M4_FLAGS} \ ${SENDMAIL_CF_DIR}/m4/cf.m4 ${.IMPSRC} > ${.TARGET} ${CHMOD} ${ROMODE} ${.TARGET} From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 05:34:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E6DB802; Tue, 27 Jan 2015 05:34:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 705CBEDB; Tue, 27 Jan 2015 05:34:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0R5YlAo019397; Tue, 27 Jan 2015 05:34:47 GMT (envelope-from bryanv@FreeBSD.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0R5YlkQ019396; Tue, 27 Jan 2015 05:34:47 GMT (envelope-from bryanv@FreeBSD.org) Message-Id: <201501270534.t0R5YlkQ019396@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bryanv set sender to bryanv@FreeBSD.org using -f From: Bryan Venteicher Date: Tue, 27 Jan 2015 05:34:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277788 - head/sys/dev/virtio/block X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 05:34:47 -0000 Author: bryanv Date: Tue Jan 27 05:34:46 2015 New Revision: 277788 URL: https://svnweb.freebsd.org/changeset/base/277788 Log: Rework vtblk dump handling of in flight requests Previously, the driver resets the device and abandon the requests that are caught in flight when the dump was initiated. This was problematic if the system is resumed after the dump is completed. While that is probably not the typical action, it is simple to rework the driver to very likely have the device usable after the dump without making it more likely for the dump to fail. The in flight requests are simply queued for completion once the dump is finished. Requested by: markj MFC after: 1 month Modified: head/sys/dev/virtio/block/virtio_blk.c Modified: head/sys/dev/virtio/block/virtio_blk.c ============================================================================== --- head/sys/dev/virtio/block/virtio_blk.c Tue Jan 27 04:06:47 2015 (r277787) +++ head/sys/dev/virtio/block/virtio_blk.c Tue Jan 27 05:34:46 2015 (r277788) @@ -76,9 +76,8 @@ struct vtblk_softc { #define VTBLK_FLAG_READONLY 0x0002 #define VTBLK_FLAG_DETACH 0x0004 #define VTBLK_FLAG_SUSPEND 0x0008 -#define VTBLK_FLAG_DUMPING 0x0010 -#define VTBLK_FLAG_BARRIER 0x0020 -#define VTBLK_FLAG_WC_CONFIG 0x0040 +#define VTBLK_FLAG_BARRIER 0x0010 +#define VTBLK_FLAG_WC_CONFIG 0x0020 struct virtqueue *vtblk_vq; struct sglist *vtblk_sglist; @@ -95,6 +94,7 @@ struct vtblk_softc { int vtblk_request_count; enum vtblk_cache_mode vtblk_write_cache; + struct bio_queue vtblk_dump_queue; struct vtblk_request vtblk_dump_request; }; @@ -162,7 +162,7 @@ static void vtblk_queue_completed(struct struct bio_queue *); static void vtblk_done_completed(struct vtblk_softc *, struct bio_queue *); -static void vtblk_drain_vq(struct vtblk_softc *, int); +static void vtblk_drain_vq(struct vtblk_softc *); static void vtblk_drain(struct vtblk_softc *); static void vtblk_startio(struct vtblk_softc *); @@ -177,9 +177,10 @@ static int vtblk_quiesce(struct vtblk_so static void vtblk_vq_intr(void *); static void vtblk_stop(struct vtblk_softc *); -static void vtblk_dump_prepare(struct vtblk_softc *); +static void vtblk_dump_quiesce(struct vtblk_softc *); static int vtblk_dump_write(struct vtblk_softc *, void *, off_t, size_t); static int vtblk_dump_flush(struct vtblk_softc *); +static void vtblk_dump_complete(struct vtblk_softc *); static void vtblk_set_write_cache(struct vtblk_softc *, int); static int vtblk_write_cache_enabled(struct vtblk_softc *sc, @@ -302,6 +303,7 @@ vtblk_attach(device_t dev) sc->vtblk_dev = dev; VTBLK_LOCK_INIT(sc, device_get_nameunit(dev)); bioq_init(&sc->vtblk_bioq); + TAILQ_INIT(&sc->vtblk_dump_queue); TAILQ_INIT(&sc->vtblk_req_free); TAILQ_INIT(&sc->vtblk_req_ready); @@ -506,25 +508,19 @@ vtblk_dump(void *arg, void *virtual, vm_ int error; dp = arg; + error = 0; if ((sc = dp->d_drv1) == NULL) return (ENXIO); VTBLK_LOCK(sc); - if ((sc->vtblk_flags & VTBLK_FLAG_DUMPING) == 0) { - vtblk_dump_prepare(sc); - sc->vtblk_flags |= VTBLK_FLAG_DUMPING; - } + vtblk_dump_quiesce(sc); if (length > 0) error = vtblk_dump_write(sc, virtual, offset, length); - else if (virtual == NULL && offset == 0) - error = vtblk_dump_flush(sc); - else { - error = EINVAL; - sc->vtblk_flags &= ~VTBLK_FLAG_DUMPING; - } + if (error || (virtual == NULL && offset == 0)) + vtblk_dump_complete(sc); VTBLK_UNLOCK(sc); @@ -996,7 +992,7 @@ vtblk_done_completed(struct vtblk_softc } static void -vtblk_drain_vq(struct vtblk_softc *sc, int skip_done) +vtblk_drain_vq(struct vtblk_softc *sc) { struct virtqueue *vq; struct vtblk_request *req; @@ -1006,9 +1002,7 @@ vtblk_drain_vq(struct vtblk_softc *sc, i last = 0; while ((req = virtqueue_drain(vq, &last)) != NULL) { - if (!skip_done) - vtblk_bio_done(sc, req->vbr_bp, ENXIO); - + vtblk_bio_done(sc, req->vbr_bp, ENXIO); vtblk_request_enqueue(sc, req); } @@ -1031,7 +1025,7 @@ vtblk_drain(struct vtblk_softc *sc) vtblk_queue_completed(sc, &queue); vtblk_done_completed(sc, &queue); - vtblk_drain_vq(sc, 0); + vtblk_drain_vq(sc); } while ((req = vtblk_request_next_ready(sc)) != NULL) { @@ -1256,31 +1250,16 @@ vtblk_stop(struct vtblk_softc *sc) } static void -vtblk_dump_prepare(struct vtblk_softc *sc) +vtblk_dump_quiesce(struct vtblk_softc *sc) { - device_t dev; - struct virtqueue *vq; - - dev = sc->vtblk_dev; - vq = sc->vtblk_vq; - - vtblk_stop(sc); /* - * Drain all requests caught in-flight in the virtqueue, - * skipping biodone(). When dumping, only one request is - * outstanding at a time, and we just poll the virtqueue - * for the response. + * Spin here until all the requests in-flight at the time of the + * dump are completed and queued. The queued requests will be + * biodone'd once the dump is finished. */ - vtblk_drain_vq(sc, 1); - - if (virtio_reinit(dev, sc->vtblk_features) != 0) { - panic("%s: cannot reinit VirtIO block device during dump", - device_get_nameunit(dev)); - } - - virtqueue_disable_intr(vq); - virtio_reinit_complete(dev); + while (!virtqueue_empty(sc->vtblk_vq)) + vtblk_queue_completed(sc, &sc->vtblk_dump_queue); } static int @@ -1327,6 +1306,17 @@ vtblk_dump_flush(struct vtblk_softc *sc) } static void +vtblk_dump_complete(struct vtblk_softc *sc) +{ + + vtblk_dump_flush(sc); + + VTBLK_UNLOCK(sc); + vtblk_done_completed(sc, &sc->vtblk_dump_queue); + VTBLK_LOCK(sc); +} + +static void vtblk_set_write_cache(struct vtblk_softc *sc, int wc) { From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 05:51:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ECA95BF7; Tue, 27 Jan 2015 05:51:30 +0000 (UTC) Received: from mail-pd0-x22a.google.com (mail-pd0-x22a.google.com [IPv6:2607:f8b0:400e:c02::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B9C9FFF9; Tue, 27 Jan 2015 05:51:30 +0000 (UTC) Received: by mail-pd0-f170.google.com with SMTP id p10so16809075pdj.1; Mon, 26 Jan 2015 21:51:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=r5OEYKmZdzDf5Z/4+ECvj1J1m9E4d3+JV4kKocEqfNI=; b=QMM6QCA1qTaveg1N0PC6KPcIe9gQakjS+ZbxCA/ut6YxKfw8lfDcOiivmHa2YsQ/Sp T5wKf9jz/7zSoXaecm8oSHcvHXODwrkh9pfcuYf1W4pBcbJSTf6Lvmcc3cs7cZjujy9J GQzuOqZLQidL+tPMAKYRXXns4v5YIdoAFuoiGK1LFs9P1GU41ZRt3h/5xynQNg/b7f2Z 8wyyEj5ijnIJl5VU5ev/FhI/ns7+Qx7aBH/zBpO0yekZaO3tkAwBstFVp6PQQeM487Gm MMQvqh1WG1kEh07z3upQy5xbzUM4HjoFoVJc5OOH4jgam8X2bwCVr55MOB4sOSOK+1R6 UizA== X-Received: by 10.68.234.200 with SMTP id ug8mr40227110pbc.133.1422337890316; Mon, 26 Jan 2015 21:51:30 -0800 (PST) Received: from charmander.wp.comcast.net (75-149-173-2-Washington.hfc.comcastbusiness.net. [75.149.173.2]) by mx.google.com with ESMTPSA id am14sm310522pac.35.2015.01.26.21.51.28 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Jan 2015 21:51:29 -0800 (PST) Sender: Mark Johnston Date: Mon, 26 Jan 2015 21:51:24 -0800 From: Mark Johnston To: Bryan Venteicher Subject: Re: svn commit: r277788 - head/sys/dev/virtio/block Message-ID: <20150127055124.GA3042@charmander.wp.comcast.net> References: <201501270534.t0R5YlkQ019396@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201501270534.t0R5YlkQ019396@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 05:51:31 -0000 On Tue, Jan 27, 2015 at 05:34:47AM +0000, Bryan Venteicher wrote: > Author: bryanv > Date: Tue Jan 27 05:34:46 2015 > New Revision: 277788 > URL: https://svnweb.freebsd.org/changeset/base/277788 > > Log: > Rework vtblk dump handling of in flight requests > > Previously, the driver resets the device and abandon the requests that > are caught in flight when the dump was initiated. This was problematic > if the system is resumed after the dump is completed. > > While that is probably not the typical action, it is simple to rework > the driver to very likely have the device usable after the dump without > making it more likely for the dump to fail. The in flight requests are > simply queued for completion once the dump is finished. > > Requested by: markj > MFC after: 1 month Thank you! From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 06:19:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7B37C3C9; Tue, 27 Jan 2015 06:19:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 42633348; Tue, 27 Jan 2015 06:19:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0R6JWKR039458; Tue, 27 Jan 2015 06:19:32 GMT (envelope-from bryanv@FreeBSD.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0R6JVFl039453; Tue, 27 Jan 2015 06:19:31 GMT (envelope-from bryanv@FreeBSD.org) Message-Id: <201501270619.t0R6JVFl039453@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bryanv set sender to bryanv@FreeBSD.org using -f From: Bryan Venteicher Date: Tue, 27 Jan 2015 06:19: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: r277789 - in stable/10/sys: netinet netinet6 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 06:19:32 -0000 Author: bryanv Date: Tue Jan 27 06:19:30 2015 New Revision: 277789 URL: https://svnweb.freebsd.org/changeset/base/277789 Log: MFC r272886: Add context pointer and source address to the UDP tunnel callback These are needed for the forthcoming vxlan implementation. The context pointer means we do not have to use a spare pointer field in the inpcb, and the source address is required to populate vxlan's forwarding table. Modified: stable/10/sys/netinet/sctputil.c stable/10/sys/netinet/udp_usrreq.c stable/10/sys/netinet/udp_var.h stable/10/sys/netinet6/udp6_usrreq.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctputil.c ============================================================================== --- stable/10/sys/netinet/sctputil.c Tue Jan 27 05:34:46 2015 (r277788) +++ stable/10/sys/netinet/sctputil.c Tue Jan 27 06:19:30 2015 (r277789) @@ -6832,7 +6832,8 @@ sctp_log_trace(uint32_t subsys, const ch #endif static void -sctp_recv_udp_tunneled_packet(struct mbuf *m, int off, struct inpcb *ignored) +sctp_recv_udp_tunneled_packet(struct mbuf *m, int off, struct inpcb *ignored, + const struct sockaddr *sa SCTP_UNUSED, void *ctx SCTP_UNUSED) { struct ip *iph; @@ -6968,7 +6969,7 @@ sctp_over_udp_start(void) } /* Call the special UDP hook. */ if ((ret = udp_set_kernel_tunneling(SCTP_BASE_INFO(udp4_tun_socket), - sctp_recv_udp_tunneled_packet))) { + sctp_recv_udp_tunneled_packet, NULL))) { sctp_over_udp_stop(); return (ret); } @@ -6992,7 +6993,7 @@ sctp_over_udp_start(void) } /* Call the special UDP hook. */ if ((ret = udp_set_kernel_tunneling(SCTP_BASE_INFO(udp6_tun_socket), - sctp_recv_udp_tunneled_packet))) { + sctp_recv_udp_tunneled_packet, NULL))) { sctp_over_udp_stop(); return (ret); } Modified: stable/10/sys/netinet/udp_usrreq.c ============================================================================== --- stable/10/sys/netinet/udp_usrreq.c Tue Jan 27 05:34:46 2015 (r277788) +++ stable/10/sys/netinet/udp_usrreq.c Tue Jan 27 06:19:30 2015 (r277789) @@ -303,7 +303,8 @@ udp_append(struct inpcb *inp, struct ip */ up = intoudpcb(inp); if (up->u_tun_func != NULL) { - (*up->u_tun_func)(n, off, inp); + (*up->u_tun_func)(n, off, inp, (struct sockaddr *)udp_in, + up->u_tun_ctx); return; } @@ -1624,7 +1625,7 @@ udp_attach(struct socket *so, int proto, #endif /* INET */ int -udp_set_kernel_tunneling(struct socket *so, udp_tun_func_t f) +udp_set_kernel_tunneling(struct socket *so, udp_tun_func_t f, void *ctx) { struct inpcb *inp; struct udpcb *up; @@ -1640,6 +1641,7 @@ udp_set_kernel_tunneling(struct socket * return (EBUSY); } up->u_tun_func = f; + up->u_tun_ctx = ctx; INP_WUNLOCK(inp); return (0); } Modified: stable/10/sys/netinet/udp_var.h ============================================================================== --- stable/10/sys/netinet/udp_var.h Tue Jan 27 05:34:46 2015 (r277788) +++ stable/10/sys/netinet/udp_var.h Tue Jan 27 06:19:30 2015 (r277789) @@ -55,7 +55,8 @@ struct udpiphdr { struct inpcb; struct mbuf; -typedef void(*udp_tun_func_t)(struct mbuf *, int off, struct inpcb *); +typedef void(*udp_tun_func_t)(struct mbuf *, int off, struct inpcb *, + const struct sockaddr *, void *); /* * UDP control block; one per udp. @@ -65,6 +66,7 @@ struct udpcb { u_int u_flags; /* Generic UDP flags. */ uint16_t u_rxcslen; /* Coverage for incoming datagrams. */ uint16_t u_txcslen; /* Coverage for outgoing datagrams. */ + void *u_tun_ctx; /* Tunneling callback context. */ }; #define intoudpcb(ip) ((struct udpcb *)(ip)->inp_ppcb) @@ -176,7 +178,8 @@ void udplite_input(struct mbuf *, int); struct inpcb *udp_notify(struct inpcb *inp, int errno); int udp_shutdown(struct socket *so); -int udp_set_kernel_tunneling(struct socket *so, udp_tun_func_t f); +int udp_set_kernel_tunneling(struct socket *so, udp_tun_func_t f, + void *ctx); #endif /* _KERNEL */ Modified: stable/10/sys/netinet6/udp6_usrreq.c ============================================================================== --- stable/10/sys/netinet6/udp6_usrreq.c Tue Jan 27 05:34:46 2015 (r277788) +++ stable/10/sys/netinet6/udp6_usrreq.c Tue Jan 27 06:19:30 2015 (r277789) @@ -148,7 +148,8 @@ udp6_append(struct inpcb *inp, struct mb */ up = intoudpcb(inp); if (up->u_tun_func != NULL) { - (*up->u_tun_func)(n, off, inp); + (*up->u_tun_func)(n, off, inp, (struct sockaddr *)fromsa, + up->u_tun_ctx); return; } #ifdef IPSEC From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 06:24:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D1E92699; Tue, 27 Jan 2015 06:24:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE8955F5; Tue, 27 Jan 2015 06:24:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0R6OXUF043598; Tue, 27 Jan 2015 06:24:33 GMT (envelope-from bryanv@FreeBSD.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0R6OXs6043597; Tue, 27 Jan 2015 06:24:33 GMT (envelope-from bryanv@FreeBSD.org) Message-Id: <201501270624.t0R6OXs6043597@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bryanv set sender to bryanv@FreeBSD.org using -f From: Bryan Venteicher Date: Tue, 27 Jan 2015 06:24:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277790 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 06:24:33 -0000 Author: bryanv Date: Tue Jan 27 06:24:33 2015 New Revision: 277790 URL: https://svnweb.freebsd.org/changeset/base/277790 Log: Bump __FreeBSD_version after r277789: Changes to the UDP tunneling callback Modified: stable/10/sys/sys/param.h Modified: stable/10/sys/sys/param.h ============================================================================== --- stable/10/sys/sys/param.h Tue Jan 27 06:19:30 2015 (r277789) +++ stable/10/sys/sys/param.h Tue Jan 27 06:24:33 2015 (r277790) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1001506 /* Master, propagated to newvers */ +#define __FreeBSD_version 1001507 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 07:19:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 7ED5B3CE; Tue, 27 Jan 2015 07:19:37 +0000 (UTC) Date: Tue, 27 Jan 2015 07:19:37 +0000 From: Alexey Dokuchaev To: Garrett Cooper Subject: Re: svn commit: r277737 - in head: etc/pam.d tools/build/mk Message-ID: <20150127071937.GB77865@FreeBSD.org> References: <201501260850.t0Q8oDna015719@svn.freebsd.org> <86fvax91cy.fsf@nine.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, Dag-Erling Smorgrav , svn-src-all@freebsd.org, src-committers , Garrett Cooper X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 07:19:37 -0000 On Mon, Jan 26, 2015 at 06:26:54PM -0800, Garrett Cooper wrote: > On Jan 26, 2015, at 4:23, Dag-Erling Smorgrav wrote: > > Garrett Cooper writes: > >> Log: > >> Honor MK_ACCT with etc/pam.d/atrun > > > > The correct idiom would be > > I disagree for a few reasons: [...] > 2. The likelihood of typos creeping into Makefiles is greater with the > _foo= idiom. > 3. It creates unnecessary local variables - especially when appending is > so easy to do. > 4. It's more difficult when backporting changes to do it with the variable > method - especially if context around the line modified has changed a > great deal. As someone who writes makefile daily I would agree, but there should be a reason why it was always done with _foo. One obvious one is that it shows up front all possible values, including conditional ones, which can also help not to forget something when backporting changes somewhere else. ;-) ./danfe From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 07:20:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 12C8B509; Tue, 27 Jan 2015 07:20:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F3FE7B56; Tue, 27 Jan 2015 07:20:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0R7K0L6068327; Tue, 27 Jan 2015 07:20:00 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0R7K0rr068326; Tue, 27 Jan 2015 07:20:00 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501270720.t0R7K0rr068326@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Tue, 27 Jan 2015 07:20:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277792 - head/sys/powerpc/pseries X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 07:20:01 -0000 Author: nwhitehorn Date: Tue Jan 27 07:20:00 2015 New Revision: 277792 URL: https://svnweb.freebsd.org/changeset/base/277792 Log: Fix bug in mapppings of multiple pages exposed by updates to the VSCSI support in QEMU. Each page of a many page mapping was getting mapped to the same physical address, which is not the desired behavior. MFC after: 1 week Modified: head/sys/powerpc/pseries/plpar_iommu.c Modified: head/sys/powerpc/pseries/plpar_iommu.c ============================================================================== --- head/sys/powerpc/pseries/plpar_iommu.c Tue Jan 27 06:50:01 2015 (r277791) +++ head/sys/powerpc/pseries/plpar_iommu.c Tue Jan 27 07:20:00 2015 (r277792) @@ -191,13 +191,13 @@ phyp_iommu_map(device_t dev, bus_dma_seg tce = trunc_page(segs[i].ds_addr); tce |= 0x3; /* read/write */ - if (papr_supports_stuff_tce) { - error = phyp_hcall(H_STUFF_TCE, window->map->iobn, - alloced, tce, allocsize/PAGE_SIZE); - } else { - for (j = 0; j < allocsize; j += PAGE_SIZE) - error = phyp_hcall(H_PUT_TCE, window->map->iobn, - alloced + j, tce + j); + for (j = 0; j < allocsize; j += PAGE_SIZE) { + error = phyp_hcall(H_PUT_TCE, window->map->iobn, + alloced + j, tce + j); + if (error < 0) { + panic("IOMMU mapping error: %d\n", error); + return (ENOMEM); + } } segs[i].ds_addr = alloced + (segs[i].ds_addr & PAGE_MASK); From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 09:07:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2B239ACD; Tue, 27 Jan 2015 09:07:25 +0000 (UTC) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id DD000882; Tue, 27 Jan 2015 09:07:24 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id DBEFE5F9A; Tue, 27 Jan 2015 09:07:18 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id 023844C3; Tue, 27 Jan 2015 10:07:15 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Alexey Dokuchaev Subject: Re: svn commit: r277737 - in head: etc/pam.d tools/build/mk References: <201501260850.t0Q8oDna015719@svn.freebsd.org> <86fvax91cy.fsf@nine.des.no> <20150127071937.GB77865@FreeBSD.org> Date: Tue, 27 Jan 2015 10:07:15 +0100 In-Reply-To: <20150127071937.GB77865@FreeBSD.org> (Alexey Dokuchaev's message of "Tue, 27 Jan 2015 07:19:37 +0000") Message-ID: <86iofslhh8.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Garrett Cooper , Garrett Cooper X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 09:07:25 -0000 Alexey Dokuchaev writes: > As someone who writes makefile daily I would agree, but there should be a > reason why it was always done with _foo. One obvious one is that it shows > up front all possible values, including conditional ones, which can also > help not to forget something when backporting changes somewhere else. ;-) Mainly that, yes. And this is the idiom used in ../rc.d. Garrett's version seems to be the preferred idiom when listing source files. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 09:48:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A49C3239; Tue, 27 Jan 2015 09:48:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 858D9C8B; Tue, 27 Jan 2015 09:48:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0R9m3Q9038162; Tue, 27 Jan 2015 09:48:03 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0R9m39S038161; Tue, 27 Jan 2015 09:48:03 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501270948.t0R9m39S038161@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 27 Jan 2015 09:48:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277793 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 09:48:03 -0000 Author: kib Date: Tue Jan 27 09:48:02 2015 New Revision: 277793 URL: https://svnweb.freebsd.org/changeset/base/277793 Log: Rewrite pmap_enter(9) man page. In collaboration with: alc Differential Revision: https://reviews.freebsd.org/D1531 Sponsored by: The FreeBSD Foundation and EMC / Isilon Storage Division MFC after: 1 week Modified: head/share/man/man9/pmap_enter.9 Modified: head/share/man/man9/pmap_enter.9 ============================================================================== --- head/share/man/man9/pmap_enter.9 Tue Jan 27 07:20:00 2015 (r277792) +++ head/share/man/man9/pmap_enter.9 Tue Jan 27 09:48:02 2015 (r277793) @@ -1,5 +1,6 @@ .\" .\" Copyright (c) 2003 Bruce M Simpson +.\" Copyright (c) 2014 The FreeBSD Foundation .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 21, 2003 +.Dd January 27, 2015 .Dt PMAP_ENTER 9 .Os .Sh NAME @@ -35,34 +36,129 @@ .In sys/param.h .In vm/vm.h .In vm/pmap.h -.Ft void +.Ft int .Fo pmap_enter -.Fa "pmap_t pmap" "vm_offset_t va" "vm_page_t p" "vm_prot_t prot" -.Fa "boolean_t wired" +.Fa "pmap_t pmap" "vm_offset_t va" "vm_page_t m" "vm_prot_t prot" +.Fa "u_int flags" "int8_t psind" .Fc .Sh DESCRIPTION The .Fn pmap_enter -function inserts the given physical page -.Fa p , -into the physical map -.Fa pmap , -at the virtual address -.Fa va , +function creates a mapping in the physical map +.Fa pmap +from the virtual address +.Fa va +to the physical page +.Fa m with the protection .Fa prot . -If -.Fa wired -is -.Dv TRUE , -then increment the wired count for the page as soon as the mapping -is inserted into -.Fa pmap . -.Sh IMPLEMENTATION NOTES -This routine MAY NOT lazy-evaluate the entry; it is required by -specification to make the requested entry at the time it is called. +Any previous mapping at the virtual address +.Fa va +is destroyed. +.Pp +The +.Fa flags +argument may have the following values: +.Bl -tag -width ".Dv PMAP_ENTER_NOSLEEP" +.It Dv VM_PROT_READ +A read access to the given virtual address triggered the call. +.It Dv VM_PROT_WRITE +A write access to the given virtual address triggered the call. +.It Dv VM_PROT_EXECUTE +An execute access to the given virtual address triggered the call. +.It Dv PMAP_ENTER_WIRED +The mapping should be marked as wired. +.It Dv PMAP_ENTER_NOSLEEP +This function may not sleep during creation of the mapping. +If the mapping cannot be created without sleeping, an appropriate +Mach VM error is returned. +.El +If the +.Dv PMAP_ENTER_NOSLEEP +flag is not specified, this function must create the requested mapping +before returning. +It may not fail. +In order to create the requested mapping, this function may destroy +any non-wired mapping in any pmap. +.Pp +The +.Fa psind +parameter specifies the page size that should be used by the mapping. +The supported page sizes are described by the global array +.Dv pagesizes[] . +The desired page size is specified by passing the index of the array +element that equals the desired page size. +.Pp +When the +.Fn pmap_enter +function destroys or updates a managed mapping, including an existing +mapping at virtual address +.Fa va , +it updates the +.Ft vm_page +structure corresponding to the previously mapped physical page. +If the physical page was accessed through the managed mapping, +then the +.Ft vm_page +structure's +.Dv PGA_REFERENCED +aflag is set. +If the physical page was modified through the managed mapping, then the +.Fn vm_page_dirty +function is called on the +.Ft vm_page +structure. +.Pp +The +.Dv PGA_WRITEABLE +aflag must be set for the page +.Fa m +if the new mapping is managed and writeable. +It is advised to clear +.Dv PGA_WRITEABLE +for destroyed mappings if the implementation can ensure +that no other writeable managed mappings for the previously +mapped pages exist. +.Pp +If the page +.Fa m +is managed, the page must be busied by the caller +or the owning object must be locked. +In the later case, the +.Dv PMAP_ENTER_NOSLEEP +must be specified by the caller. +.Pp +The +.Fn pmap_enter +function must handle the multiprocessor TLB consistency for the +given address. +.Sh NOTES +On amd64, arm and i386 architectures the existing implementation +of the +.Nm +function is incomplete, only value 0 for +.Fa psind +is supported. +Other supported architectures have +.Dv pagesizes[] +array of size 1. +.Sh RETURN VALUES +If successful, the +.Fn pmap_enter +function returns +.Er KERN_SUCCESS . +If the +.Dv PMAP_ENTER_NOSLEEP +flag was specified and the resources required for the mapping cannot +be acquired without sleeping, +.Dv KERN_RESOURCE_SHORTAGE +is returned. .Sh SEE ALSO .Xr pmap 9 .Sh AUTHORS -This manual page was written by -.An Bruce M Simpson Aq Mt bms@spc.org . +This manual page was first written by +.An Bruce M Simpson Aq Mt bms@spc.org +and then rewritten by +.An Alan Cox Aq Mt alc@FreeBSD.org +and +.An Konstantin Belousov Aq Mt kib@FreeBSD.org . From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 10:32:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2688EC15; Tue, 27 Jan 2015 10:32:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED6171A1; Tue, 27 Jan 2015 10:32:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0RAWofg061016; Tue, 27 Jan 2015 10:32:50 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0RAWotv061014; Tue, 27 Jan 2015 10:32:50 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501271032.t0RAWotv061014@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 27 Jan 2015 10:32:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277794 - head/sys/ufs/ufs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 10:32:51 -0000 Author: kib Date: Tue Jan 27 10:32:49 2015 New Revision: 277794 URL: https://svnweb.freebsd.org/changeset/base/277794 Log: The sys_quotactl() contract demands that the mount point is vfs_unbusy()ed when the cmd is Q_QUOTAON, regardless of other input parameters or error return. Submitted by: Conrad Meyer Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D1684 Tested by: pho MFC after: 1 week Modified: head/sys/ufs/ufs/ufs_quota.c head/sys/ufs/ufs/ufs_vfsops.c Modified: head/sys/ufs/ufs/ufs_quota.c ============================================================================== --- head/sys/ufs/ufs/ufs_quota.c Tue Jan 27 09:48:02 2015 (r277793) +++ head/sys/ufs/ufs/ufs_quota.c Tue Jan 27 10:32:49 2015 (r277794) @@ -495,11 +495,15 @@ quotaon(struct thread *td, struct mount struct nameidata nd; error = priv_check(td, PRIV_UFS_QUOTAON); - if (error) + if (error != 0) { + vfs_unbusy(mp); return (error); + } - if (mp->mnt_flag & MNT_RDONLY) + if ((mp->mnt_flag & MNT_RDONLY) != 0) { + vfs_unbusy(mp); return (EROFS); + } ump = VFSTOUFS(mp); dq = NODQUOT; Modified: head/sys/ufs/ufs/ufs_vfsops.c ============================================================================== --- head/sys/ufs/ufs/ufs_vfsops.c Tue Jan 27 09:48:02 2015 (r277793) +++ head/sys/ufs/ufs/ufs_vfsops.c Tue Jan 27 10:32:49 2015 (r277794) @@ -92,6 +92,9 @@ ufs_quotactl(mp, cmds, id, arg) void *arg; { #ifndef QUOTA + if ((cmds >> SUBCMDSHIFT) == Q_QUOTAON) + vfs_unbusy(mp); + return (EOPNOTSUPP); #else struct thread *td; @@ -112,11 +115,16 @@ ufs_quotactl(mp, cmds, id, arg) break; default: + if (cmd == Q_QUOTAON) + vfs_unbusy(mp); return (EINVAL); } } - if ((u_int)type >= MAXQUOTAS) + if ((u_int)type >= MAXQUOTAS) { + if (cmd == Q_QUOTAON) + vfs_unbusy(mp); return (EINVAL); + } switch (cmd) { case Q_QUOTAON: From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 15:28:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F8EE420; Tue, 27 Jan 2015 15:28:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B2C8AD3; Tue, 27 Jan 2015 15:28:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0RFSmaa098485; Tue, 27 Jan 2015 15:28:48 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0RFSle9098480; Tue, 27 Jan 2015 15:28:47 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201501271528.t0RFSle9098480@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 27 Jan 2015 15:28:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277795 - in head/sys/dev: fb vt vt/hw/fb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 15:28:48 -0000 Author: avg Date: Tue Jan 27 15:28:46 2015 New Revision: 277795 URL: https://svnweb.freebsd.org/changeset/base/277795 Log: vt(4): Use power_{suspend,resume} event handlers to implement suspend/resume The goal is to avoid that the vt(4) resume happens before the video display is resumed. The original patch was provided by Andriy Gapon. This new patch registers the handlers in vt_upgrade(). This is done once, thanks to the VDF_ASYNC flag. I abused this flag because it was already abused by the keyboard allocation. The event handlers then call the backend if it provides callbacks for suspend/resume. Differential Revision: https://reviews.freebsd.org/D1004 On behalf of: dumbbell MFC after: 2 weeks Modified: head/sys/dev/fb/fbd.c head/sys/dev/vt/hw/fb/vt_fb.c head/sys/dev/vt/hw/fb/vt_fb.h head/sys/dev/vt/vt.h head/sys/dev/vt/vt_core.c Modified: head/sys/dev/fb/fbd.c ============================================================================== --- head/sys/dev/fb/fbd.c Tue Jan 27 10:32:49 2015 (r277794) +++ head/sys/dev/fb/fbd.c Tue Jan 27 15:28:46 2015 (r277795) @@ -332,22 +332,6 @@ fbd_detach(device_t dev) return (err); } -static int -fbd_suspend(device_t dev) -{ - - vt_fb_suspend(); - return (bus_generic_suspend(dev)); -} - -static int -fbd_resume(device_t dev) -{ - - vt_fb_resume(); - return (bus_generic_resume(dev)); -} - static device_method_t fbd_methods[] = { /* Device interface */ DEVMETHOD(device_probe, fbd_probe), @@ -355,8 +339,6 @@ static device_method_t fbd_methods[] = { DEVMETHOD(device_detach, fbd_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, fbd_suspend), - DEVMETHOD(device_resume, fbd_resume), { 0, 0 } }; Modified: head/sys/dev/vt/hw/fb/vt_fb.c ============================================================================== --- head/sys/dev/vt/hw/fb/vt_fb.c Tue Jan 27 10:32:49 2015 (r277794) +++ head/sys/dev/vt/hw/fb/vt_fb.c Tue Jan 27 15:28:46 2015 (r277795) @@ -53,6 +53,8 @@ static struct vt_driver vt_fb_driver = { .vd_priority = VD_PRIORITY_GENERIC+10, .vd_fb_ioctl = vt_fb_ioctl, .vd_fb_mmap = vt_fb_mmap, + .vd_suspend = vt_fb_suspend, + .vd_resume = vt_fb_resume, }; VT_DRIVER_DECLARE(vt_fb, vt_fb_driver); @@ -450,15 +452,15 @@ vt_fb_attach(struct fb_info *info) } void -vt_fb_resume(void) +vt_fb_suspend(struct vt_device *vd) { - vt_resume(); + vt_suspend(vd); } void -vt_fb_suspend(void) +vt_fb_resume(struct vt_device *vd) { - vt_suspend(); + vt_resume(vd); } Modified: head/sys/dev/vt/hw/fb/vt_fb.h ============================================================================== --- head/sys/dev/vt/hw/fb/vt_fb.h Tue Jan 27 10:32:49 2015 (r277794) +++ head/sys/dev/vt/hw/fb/vt_fb.h Tue Jan 27 15:28:46 2015 (r277795) @@ -33,8 +33,8 @@ #define _DEV_VT_HW_FB_VT_FB_H_ /* Generic framebuffer interface call vt_fb_attach to init VT(9) */ int vt_fb_attach(struct fb_info *info); -void vt_fb_resume(void); -void vt_fb_suspend(void); +void vt_fb_resume(struct vt_device *vd); +void vt_fb_suspend(struct vt_device *vd); vd_init_t vt_fb_init; vd_blank_t vt_fb_blank; Modified: head/sys/dev/vt/vt.h ============================================================================== --- head/sys/dev/vt/vt.h Tue Jan 27 10:32:49 2015 (r277794) +++ head/sys/dev/vt/vt.h Tue Jan 27 15:28:46 2015 (r277795) @@ -90,8 +90,6 @@ SYSCTL_INT(_kern_vt, OID_AUTO, _name, CT struct vt_driver; void vt_allocate(struct vt_driver *, void *); -void vt_resume(void); -void vt_suspend(void); typedef unsigned int vt_axis_t; @@ -162,6 +160,9 @@ struct vt_device { #define VD_PASTEBUFSZ(vd) ((vd)->vd_pastebuf.vpb_bufsz) #define VD_PASTEBUFLEN(vd) ((vd)->vd_pastebuf.vpb_len) +void vt_resume(struct vt_device *vd); +void vt_suspend(struct vt_device *vd); + /* * Per-window terminal screen buffer. * @@ -314,6 +315,8 @@ typedef int vd_fb_mmap_t(struct vt_devic typedef void vd_drawrect_t(struct vt_device *, int, int, int, int, int, term_color_t); typedef void vd_setpixel_t(struct vt_device *, int, int, term_color_t); +typedef void vd_suspend_t(struct vt_device *); +typedef void vd_resume_t(struct vt_device *); struct vt_driver { char vd_name[16]; @@ -337,6 +340,10 @@ struct vt_driver { /* Update display setting on vt switch. */ vd_postswitch_t *vd_postswitch; + /* Suspend/resume handlers. */ + vd_suspend_t *vd_suspend; + vd_resume_t *vd_resume; + /* Priority to know which one can override */ int vd_priority; #define VD_PRIORITY_DUMB 10 Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Tue Jan 27 10:32:49 2015 (r277794) +++ head/sys/dev/vt/vt_core.c Tue Jan 27 15:28:46 2015 (r277795) @@ -167,6 +167,8 @@ static void vt_update_static(void *); #ifndef SC_NO_CUTPASTE static void vt_mouse_paste(void); #endif +static void vt_suspend_handler(void *priv); +static void vt_resume_handler(void *priv); SET_DECLARE(vt_drv_set, struct vt_driver); @@ -2552,6 +2554,12 @@ vt_upgrade(struct vt_device *vd) vd->vd_flags |= VDF_ASYNC; callout_reset(&vd->vd_timer, hz / VT_TIMERFREQ, vt_timer, vd); vd->vd_timer_armed = 1; + + /* Register suspend/resume handlers. */ + EVENTHANDLER_REGISTER(power_suspend, vt_suspend_handler, vd, + EVENTHANDLER_PRI_ANY); + EVENTHANDLER_REGISTER(power_resume, vt_resume_handler, vd, + EVENTHANDLER_PRI_ANY); } VT_UNLOCK(vd); @@ -2655,26 +2663,54 @@ vt_allocate(struct vt_driver *drv, void termcn_cnregister(vd->vd_windows[VT_CONSWINDOW]->vw_terminal); } +static void +vt_suspend_handler(void *priv) +{ + struct vt_device *vd; + + vd = priv; + if (vd->vd_driver != NULL && vd->vd_driver->vd_suspend != NULL) + vd->vd_driver->vd_suspend(vd); +} + +static void +vt_resume_handler(void *priv) +{ + struct vt_device *vd; + + vd = priv; + if (vd->vd_driver != NULL && vd->vd_driver->vd_resume != NULL) + vd->vd_driver->vd_resume(vd); +} + void -vt_suspend() +vt_suspend(struct vt_device *vd) { + int error; if (vt_suspendswitch == 0) return; /* Save current window. */ - main_vd->vd_savedwindow = main_vd->vd_curwindow; + vd->vd_savedwindow = vd->vd_curwindow; /* Ask holding process to free window and switch to console window */ - vt_proc_window_switch(main_vd->vd_windows[VT_CONSWINDOW]); + vt_proc_window_switch(vd->vd_windows[VT_CONSWINDOW]); + + /* Wait for the window switch to complete. */ + error = 0; + VT_LOCK(vd); + while (vd->vd_curwindow != vd->vd_windows[VT_CONSWINDOW] && error == 0) + error = cv_wait_sig(&vd->vd_winswitch, &vd->vd_lock); + VT_UNLOCK(vd); } void -vt_resume() +vt_resume(struct vt_device *vd) { if (vt_suspendswitch == 0) return; /* Switch back to saved window */ - if (main_vd->vd_savedwindow != NULL) - vt_proc_window_switch(main_vd->vd_savedwindow); - main_vd->vd_savedwindow = NULL; + if (vd->vd_savedwindow != NULL) + vt_proc_window_switch(vd->vd_savedwindow); + vd->vd_savedwindow = NULL; } From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 17:33:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B949919; Tue, 27 Jan 2015 17:33:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 373F5B2C; Tue, 27 Jan 2015 17:33:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0RHXK8Y058426; Tue, 27 Jan 2015 17:33:20 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0RHXJ3M058422; Tue, 27 Jan 2015 17:33:19 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201501271733.t0RHXJ3M058422@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 27 Jan 2015 17:33:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277796 - in head/sys: dev/acpica dev/syscons dev/vt sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 17:33:20 -0000 Author: avg Date: Tue Jan 27 17:33:18 2015 New Revision: 277796 URL: https://svnweb.freebsd.org/changeset/base/277796 Log: hook userland threads suspend + resume into acpi suspend code Also, split power_suspend into power_suspend and power_suspend_early. power_suspend_early is called before the userland is frozen. power_suspend is called after the userland is frozen. Currently only VT switching is hooked to power_suspend_early. This is needed because switching away from X server requires its cooperation, so obviously X server must not be frozen when that happens. Freezing userland during ACPI suspend is useful because not all drivers correctly handle suspension concurrent with other activity. This is especially applicable to drivers ported from other operating systems that suspend all software activity between placing drivers and hardware into suspended state. In particular drm2/radeon (radeonkms) depends on the described procedure. The driver does not have any internal synchronization between suspension activities and processing of userland requests. Many thanks to kib for the code that allows to freeze and thaw all userland threads. Note that ideally we also need to park / inhibit (non-special) kernel threads as well to ensure that they do not call into drivers. MFC after: 17 days Modified: head/sys/dev/acpica/acpi.c head/sys/dev/syscons/syscons.c head/sys/dev/vt/vt_core.c head/sys/sys/eventhandler.h Modified: head/sys/dev/acpica/acpi.c ============================================================================== --- head/sys/dev/acpica/acpi.c Tue Jan 27 15:28:46 2015 (r277795) +++ head/sys/dev/acpica/acpi.c Tue Jan 27 17:33:18 2015 (r277796) @@ -2749,6 +2749,8 @@ acpi_EnterSleepState(struct acpi_softc * return_ACPI_STATUS (AE_OK); } + EVENTHANDLER_INVOKE(power_suspend_early); + stop_all_proc(); EVENTHANDLER_INVOKE(power_suspend); if (smp_started) { @@ -2892,6 +2894,8 @@ backout: thread_unlock(curthread); } + resume_all_proc(); + EVENTHANDLER_INVOKE(power_resume); /* Allow another sleep request after a while. */ Modified: head/sys/dev/syscons/syscons.c ============================================================================== --- head/sys/dev/syscons/syscons.c Tue Jan 27 15:28:46 2015 (r277795) +++ head/sys/dev/syscons/syscons.c Tue Jan 27 17:33:18 2015 (r277796) @@ -549,7 +549,7 @@ sc_attach_unit(int unit, int flags) /* Register suspend/resume/shutdown callbacks for the kernel console. */ if (sc_console_unit == unit) { - EVENTHANDLER_REGISTER(power_suspend, scsuspend, NULL, + EVENTHANDLER_REGISTER(power_suspend_early, scsuspend, NULL, EVENTHANDLER_PRI_ANY); EVENTHANDLER_REGISTER(power_resume, scresume, NULL, EVENTHANDLER_PRI_ANY); Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Tue Jan 27 15:28:46 2015 (r277795) +++ head/sys/dev/vt/vt_core.c Tue Jan 27 17:33:18 2015 (r277796) @@ -2556,8 +2556,8 @@ vt_upgrade(struct vt_device *vd) vd->vd_timer_armed = 1; /* Register suspend/resume handlers. */ - EVENTHANDLER_REGISTER(power_suspend, vt_suspend_handler, vd, - EVENTHANDLER_PRI_ANY); + EVENTHANDLER_REGISTER(power_suspend_early, vt_suspend_handler, + vd, EVENTHANDLER_PRI_ANY); EVENTHANDLER_REGISTER(power_resume, vt_resume_handler, vd, EVENTHANDLER_PRI_ANY); } Modified: head/sys/sys/eventhandler.h ============================================================================== --- head/sys/sys/eventhandler.h Tue Jan 27 15:28:46 2015 (r277795) +++ head/sys/sys/eventhandler.h Tue Jan 27 17:33:18 2015 (r277796) @@ -182,6 +182,7 @@ EVENTHANDLER_DECLARE(shutdown_final, shu typedef void (*power_change_fn)(void *); EVENTHANDLER_DECLARE(power_resume, power_change_fn); EVENTHANDLER_DECLARE(power_suspend, power_change_fn); +EVENTHANDLER_DECLARE(power_suspend_early, power_change_fn); /* Low memory event */ typedef void (*vm_lowmem_handler_t)(void *, int); From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 17:46:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 68B95C0C; Tue, 27 Jan 2015 17:46:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 559E4C8A; Tue, 27 Jan 2015 17:46:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0RHku31063547; Tue, 27 Jan 2015 17:46:56 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0RHkuxT063546; Tue, 27 Jan 2015 17:46:56 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201501271746.t0RHkuxT063546@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 27 Jan 2015 17:46:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277797 - head/sys/netipsec X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 17:46:56 -0000 Author: ae Date: Tue Jan 27 17:46:55 2015 New Revision: 277797 URL: https://svnweb.freebsd.org/changeset/base/277797 Log: key_spdget uses key_setdumpsp() without SPTREE_RLOCK held (it uses referenced pointer to sp). Remove SPTREE_RLOCK_ASSERT from key_setdumpsp() to fix wrong assertion. Reported by: Emeric POUPON Obtained from: Yandex LLC Sponsored by: Yandex LLC Modified: head/sys/netipsec/key.c Modified: head/sys/netipsec/key.c ============================================================================== --- head/sys/netipsec/key.c Tue Jan 27 17:33:18 2015 (r277796) +++ head/sys/netipsec/key.c Tue Jan 27 17:46:55 2015 (r277797) @@ -2421,8 +2421,6 @@ key_setdumpsp(struct secpolicy *sp, u_in struct mbuf *result = NULL, *m; struct seclifetime lt; - SPTREE_RLOCK_ASSERT(); - m = key_setsadbmsg(type, 0, SADB_SATYPE_UNSPEC, seq, pid, sp->refcnt); if (!m) goto fail; From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 17:47:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3224FD4E; Tue, 27 Jan 2015 17:47:49 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 B0E48C95; Tue, 27 Jan 2015 17:47:48 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t0RHlhe0089801 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 27 Jan 2015 19:47:43 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t0RHlhe0089801 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t0RHlhbN089800; Tue, 27 Jan 2015 19:47:43 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 27 Jan 2015 19:47:42 +0200 From: Konstantin Belousov To: Andriy Gapon Subject: Re: svn commit: r277796 - in head/sys: dev/acpica dev/syscons dev/vt sys Message-ID: <20150127174742.GI42409@kib.kiev.ua> References: <201501271733.t0RHXJ3M058422@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201501271733.t0RHXJ3M058422@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) 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.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 17:47:49 -0000 On Tue, Jan 27, 2015 at 05:33:19PM +0000, Andriy Gapon wrote: > Author: avg > Date: Tue Jan 27 17:33:18 2015 > New Revision: 277796 > URL: https://svnweb.freebsd.org/changeset/base/277796 > > Log: > hook userland threads suspend + resume into acpi suspend code > > Also, split power_suspend into power_suspend and power_suspend_early. > > power_suspend_early is called before the userland is frozen. > power_suspend is called after the userland is frozen. > > Currently only VT switching is hooked to power_suspend_early. > This is needed because switching away from X server requires its > cooperation, so obviously X server must not be frozen when that happens. > > Freezing userland during ACPI suspend is useful because not all drivers > correctly handle suspension concurrent with other activity. This is > especially applicable to drivers ported from other operating systems > that suspend all software activity between placing drivers and hardware > into suspended state. > In particular drm2/radeon (radeonkms) depends on the described > procedure. The driver does not have any internal synchronization > between suspension activities and processing of userland requests. > > Many thanks to kib for the code that allows to freeze and thaw all > userland threads. > > Note that ideally we also need to park / inhibit (non-special) kernel > threads as well to ensure that they do not call into drivers. > > MFC after: 17 days > > Modified: > head/sys/dev/acpica/acpi.c > head/sys/dev/syscons/syscons.c > head/sys/dev/vt/vt_core.c > head/sys/sys/eventhandler.h Thank you for fixing this. > > Modified: head/sys/dev/acpica/acpi.c > ============================================================================== > --- head/sys/dev/acpica/acpi.c Tue Jan 27 15:28:46 2015 (r277795) > +++ head/sys/dev/acpica/acpi.c Tue Jan 27 17:33:18 2015 (r277796) > @@ -2749,6 +2749,8 @@ acpi_EnterSleepState(struct acpi_softc * > return_ACPI_STATUS (AE_OK); > } > > + EVENTHANDLER_INVOKE(power_suspend_early); > + stop_all_proc(); It also makes sense to call syncer_suspend() after stop_all_proc(), I suppose. It would ensure that a failed resume still ends with the consistent filesystem metadata. From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 18:04:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0B08A46F; Tue, 27 Jan 2015 18:04:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC390EB2; Tue, 27 Jan 2015 18:04:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0RI4fA3072694; Tue, 27 Jan 2015 18:04:41 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0RI4fbv072693; Tue, 27 Jan 2015 18:04:41 GMT (envelope-from se@FreeBSD.org) Message-Id: <201501271804.t0RI4fbv072693@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Tue, 27 Jan 2015 18:04:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277798 - head/bin/expr X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 18:04:42 -0000 Author: se Date: Tue Jan 27 18:04:41 2015 New Revision: 277798 URL: https://svnweb.freebsd.org/changeset/base/277798 Log: Fix overflow check for multiplication: - Add special test to detect the case of -1 * INTMAX_MIN - Protect against elimination of the test division by the optimizer Garrett Cooper noticed that the overflow checks were incomplete, and Bruce Evans suggested the use of the "volatile" qualifier to counter the effect of the undefined behaviour, when the prior multiplication caused overflow, and he also suggested improvements to the comments. Reviewed by: bde MFC after: 1 week Modified: head/bin/expr/expr.y Modified: head/bin/expr/expr.y ============================================================================== --- head/bin/expr/expr.y Tue Jan 27 17:46:55 2015 (r277797) +++ head/bin/expr/expr.y Tue Jan 27 18:04:41 2015 (r277798) @@ -444,14 +444,26 @@ op_minus(struct val *a, struct val *b) return (r); } +/* + * We depend on undefined behaviour giving a result (in r). + * To test this result, pass it as volatile. This prevents + * optimizing away of the test based on the undefined behaviour. + */ void -assert_times(intmax_t a, intmax_t b, intmax_t r) +assert_times(intmax_t a, intmax_t b, volatile intmax_t r) { /* - * if first operand is 0, no overflow is possible, - * else result of division test must match second operand + * If the first operand is 0, no overflow is possible, + * else the result of the division test must match the + * second operand. + * + * Be careful to avoid overflow in the overflow test, as + * in assert_div(). Overflow in division would kill us + * with a SIGFPE before getting the test wrong. In old + * buggy versions, optimization used to give a null test + * instead of a SIGFPE. */ - if (a != 0 && r / a != b) + if ((a == -1 && b == INTMAX_MIN) || (a != 0 && r / a != b)) errx(ERR_EXIT, "overflow"); } From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 18:27:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 018FB95F; Tue, 27 Jan 2015 18:27:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E23411BD; Tue, 27 Jan 2015 18:27:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0RIR7jf082393; Tue, 27 Jan 2015 18:27:07 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0RIR7fg082392; Tue, 27 Jan 2015 18:27:07 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201501271827.t0RIR7fg082392@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 27 Jan 2015 18:27:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277799 - head/sbin/geom/class/mountver X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 18:27:08 -0000 Author: trasz Date: Tue Jan 27 18:27:07 2015 New Revision: 277799 URL: https://svnweb.freebsd.org/changeset/base/277799 Log: Fix sysctl name. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sbin/geom/class/mountver/gmountver.8 Modified: head/sbin/geom/class/mountver/gmountver.8 ============================================================================== --- head/sbin/geom/class/mountver/gmountver.8 Tue Jan 27 18:04:41 2015 (r277798) +++ head/sbin/geom/class/mountver/gmountver.8 Tue Jan 27 18:27:07 2015 (r277799) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 14, 2010 +.Dd January 27, 2015 .Dt GMOUNTVER 8 .Os .Sh NAME @@ -110,7 +110,7 @@ GEOM class. This can be set to a number between 0 and 3 inclusive. If set to 0 minimal debug information is printed, and if set to 3 the maximum amount of debug information is printed. -.It Va kern.geom.mountver.check.check_ident : No 1 +.It Va kern.geom.mountver.check_ident : No 1 This can be set to 0 or 1. If set to 0, .Nm From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 18:56:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1157FA3; Tue, 27 Jan 2015 18:56:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD7046CF; Tue, 27 Jan 2015 18:56:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0RIuNdq096246; Tue, 27 Jan 2015 18:56:23 GMT (envelope-from rrs@FreeBSD.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0RIuNT4096245; Tue, 27 Jan 2015 18:56:23 GMT (envelope-from rrs@FreeBSD.org) Message-Id: <201501271856.t0RIuNT4096245@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rrs set sender to rrs@FreeBSD.org using -f From: Randall Stewart Date: Tue, 27 Jan 2015 18:56:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277800 - head/usr.sbin/pmcstudy X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 18:56:23 -0000 Author: rrs Date: Tue Jan 27 18:56:22 2015 New Revision: 277800 URL: https://svnweb.freebsd.org/changeset/base/277800 Log: Fix yet another coverty warning (missing io is NULL check) and in examining that warning I see yet another issue where we should be pclosing the io in the event of the error and its a command (not fclose only). Modified: head/usr.sbin/pmcstudy/pmcstudy.c Modified: head/usr.sbin/pmcstudy/pmcstudy.c ============================================================================== --- head/usr.sbin/pmcstudy/pmcstudy.c Tue Jan 27 18:27:07 2015 (r277799) +++ head/usr.sbin/pmcstudy/pmcstudy.c Tue Jan 27 18:56:22 2015 (r277800) @@ -1796,6 +1796,10 @@ process_file(char *filename) if (filename == NULL) { io = my_popen(command, "r", &pid_of_command); + if (io == NULL) { + printf("Can't popen the command %s\n", command); + return; + } } else { io = fopen(filename, "r"); if (io == NULL) { @@ -1808,8 +1812,10 @@ process_file(char *filename) if (cnts == NULL) { /* Nothing we can do */ printf("Nothing to do -- no counters built\n"); - if (io) { - fclose(io); + if (filename) { + fclose(io); + } else { + my_pclose(io, pid_of_command); } return; } From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 18:56:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 70E3D14E; Tue, 27 Jan 2015 18:56:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D2EE6D5; Tue, 27 Jan 2015 18:56:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0RIulXw096336; Tue, 27 Jan 2015 18:56:47 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0RIulvN096335; Tue, 27 Jan 2015 18:56:47 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501271856.t0RIulvN096335@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 27 Jan 2015 18:56:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277801 - head/lib/libthread_db/arch/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 18:56:47 -0000 Author: dim Date: Tue Jan 27 18:56:46 2015 New Revision: 277801 URL: https://svnweb.freebsd.org/changeset/base/277801 Log: Constify a struct savexmm pointer in pt_ucontext_to_fpreg(), to silence a -Wcast-qual warning from clang 3.6.0. Modified: head/lib/libthread_db/arch/i386/libpthread_md.c Modified: head/lib/libthread_db/arch/i386/libpthread_md.c ============================================================================== --- head/lib/libthread_db/arch/i386/libpthread_md.c Tue Jan 27 18:56:22 2015 (r277800) +++ head/lib/libthread_db/arch/i386/libpthread_md.c Tue Jan 27 18:56:46 2015 (r277801) @@ -72,7 +72,7 @@ pt_ucontext_to_fpreg(const ucontext_t *u memcpy(r, &uc->uc_mcontext.mc_fpstate, sizeof(struct save87)); else { int i; - struct savexmm *sx = (struct savexmm *)&uc->uc_mcontext.mc_fpstate; + const struct savexmm *sx = (const struct savexmm *)&uc->uc_mcontext.mc_fpstate; memcpy(&r->fpr_env, &sx->sv_env, sizeof(r->fpr_env)); for (i = 0; i < 8; ++i) memcpy(&r->fpr_acc[i], &sx->sv_fp[i].fp_acc, 10); From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 18:58:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 46E252D1; Tue, 27 Jan 2015 18:58:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F1826ED; Tue, 27 Jan 2015 18:58:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0RIwPSb096594; Tue, 27 Jan 2015 18:58:25 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0RIwO3n096590; Tue, 27 Jan 2015 18:58:24 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501271858.t0RIwO3n096590@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 27 Jan 2015 18:58:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277802 - head/usr.bin/sed X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 18:58:25 -0000 Author: pfg Date: Tue Jan 27 18:58:24 2015 New Revision: 277802 URL: https://svnweb.freebsd.org/changeset/base/277802 Log: Fix resource leak and dereference after NULL. process.c: Protect access against NULL. main.c: Prevent outfile overwrite resource leak. CID: 271181 CID: 1006930 Obtained from: NetBSD MFC after: 3 days Modified: head/usr.bin/sed/main.c head/usr.bin/sed/process.c Modified: head/usr.bin/sed/main.c ============================================================================== --- head/usr.bin/sed/main.c Tue Jan 27 18:56:46 2015 (r277801) +++ head/usr.bin/sed/main.c Tue Jan 27 18:58:24 2015 (r277802) @@ -411,6 +411,8 @@ mf_fgets(SPACE *sp, enum e_spflag spflag unlink(tmpfname); if ((outfile = fopen(tmpfname, "w")) == NULL) err(1, "%s", fname); + if (outfile != NULL && outfile != stdout) + fclose(outfile); fchown(fileno(outfile), sb.st_uid, sb.st_gid); fchmod(fileno(outfile), sb.st_mode & ALLPERMS); outfname = tmpfname; Modified: head/usr.bin/sed/process.c ============================================================================== --- head/usr.bin/sed/process.c Tue Jan 27 18:56:46 2015 (r277801) +++ head/usr.bin/sed/process.c Tue Jan 27 18:58:24 2015 (r277802) @@ -324,7 +324,7 @@ applies(struct s_command *cp) } else r = 1; } - } else if (MATCH(cp->a1)) { + } else if (cp->a1 && MATCH(cp->a1)) { /* * If the second address is a number less than or * equal to the line number first selected, only From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 19:35:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 80B81AAB; Tue, 27 Jan 2015 19:35:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5278CAF6; Tue, 27 Jan 2015 19:35:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0RJZbV0015149; Tue, 27 Jan 2015 19:35:37 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0RJZbPm015148; Tue, 27 Jan 2015 19:35:37 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501271935.t0RJZbPm015148@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 27 Jan 2015 19:35:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277804 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 19:35:37 -0000 Author: delphij Date: Tue Jan 27 19:35:36 2015 New Revision: 277804 URL: https://svnweb.freebsd.org/changeset/base/277804 Log: Fix SCTP SCTP_SS_VALUE kernel memory corruption and disclosure vulnerability. We would like to acknowledge Clement LECIGNE from Google Security Team and Francisco Falcon from Core Security Technologies who discovered the issue independently and reported to the FreeBSD Security Team. Security: FreeBSD-SA-15:02.kmem Security: CVE-2014-8612 Submitted by: tuexen Modified: head/sys/netinet/sctp_usrreq.c Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Tue Jan 27 19:25:39 2015 (r277803) +++ head/sys/netinet/sctp_usrreq.c Tue Jan 27 19:35:36 2015 (r277804) @@ -1863,8 +1863,9 @@ flags_out: SCTP_CHECK_AND_CAST(av, optval, struct sctp_stream_value, *optsize); SCTP_FIND_STCB(inp, stcb, av->assoc_id); if (stcb) { - if (stcb->asoc.ss_functions.sctp_ss_get_value(stcb, &stcb->asoc, &stcb->asoc.strmout[av->stream_id], - &av->stream_value) < 0) { + if ((av->stream_id >= stcb->asoc.streamoutcnt) || + (stcb->asoc.ss_functions.sctp_ss_get_value(stcb, &stcb->asoc, &stcb->asoc.strmout[av->stream_id], + &av->stream_value) < 0)) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); error = EINVAL; } else { @@ -4032,8 +4033,9 @@ sctp_setopt(struct socket *so, int optna SCTP_CHECK_AND_CAST(av, optval, struct sctp_stream_value, optsize); SCTP_FIND_STCB(inp, stcb, av->assoc_id); if (stcb) { - if (stcb->asoc.ss_functions.sctp_ss_set_value(stcb, &stcb->asoc, &stcb->asoc.strmout[av->stream_id], - av->stream_value) < 0) { + if ((av->stream_id >= stcb->asoc.streamoutcnt) || + (stcb->asoc.ss_functions.sctp_ss_set_value(stcb, &stcb->asoc, &stcb->asoc.strmout[av->stream_id], + av->stream_value) < 0)) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); error = EINVAL; } @@ -4043,10 +4045,12 @@ sctp_setopt(struct socket *so, int optna SCTP_INP_RLOCK(inp); LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) { SCTP_TCB_LOCK(stcb); - stcb->asoc.ss_functions.sctp_ss_set_value(stcb, - &stcb->asoc, - &stcb->asoc.strmout[av->stream_id], - av->stream_value); + if (av->stream_id < stcb->asoc.streamoutcnt) { + stcb->asoc.ss_functions.sctp_ss_set_value(stcb, + &stcb->asoc, + &stcb->asoc.strmout[av->stream_id], + av->stream_value); + } SCTP_TCB_UNLOCK(stcb); } SCTP_INP_RUNLOCK(inp); From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 19:35:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7859B7F; Tue, 27 Jan 2015 19:35:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C412FAF8; Tue, 27 Jan 2015 19:35:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0RJZdRB015203; Tue, 27 Jan 2015 19:35:39 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0RJZdTD015202; Tue, 27 Jan 2015 19:35:39 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501271935.t0RJZdTD015202@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 27 Jan 2015 19:35:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277805 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 19:35:40 -0000 Author: delphij Date: Tue Jan 27 19:35:38 2015 New Revision: 277805 URL: https://svnweb.freebsd.org/changeset/base/277805 Log: Fix SCTP stream reset vulnerability. We would like to acknowledge Gerasimos Dimitriadis who reported the issue and Michael Tuexen who analyzed and provided the fix. Security: FreeBSD-SA-15:03.sctp Security: CVE-2014-8613 Submitted by: tuexen Modified: head/sys/netinet/sctp_input.c Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Tue Jan 27 19:35:36 2015 (r277804) +++ head/sys/netinet/sctp_input.c Tue Jan 27 19:35:38 2015 (r277805) @@ -3649,6 +3649,9 @@ sctp_handle_stream_reset_response(struct /* huh ? */ return (0); } + if (ntohs(respin->ph.param_length) < sizeof(struct sctp_stream_reset_response_tsn)) { + return (0); + } if (action == SCTP_STREAM_RESET_RESULT_PERFORMED) { resp = (struct sctp_stream_reset_response_tsn *)respin; asoc->stream_reset_outstanding--; @@ -4037,7 +4040,7 @@ __attribute__((noinline)) sctp_handle_stream_reset(struct sctp_tcb *stcb, struct mbuf *m, int offset, struct sctp_chunkhdr *ch_req) { - int chk_length, param_len, ptype; + uint16_t remaining_length, param_len, ptype; struct sctp_paramhdr pstore; uint8_t cstore[SCTP_CHUNK_BUFFER_SIZE]; uint32_t seq = 0; @@ -4050,7 +4053,7 @@ __attribute__((noinline)) int num_param = 0; /* now it may be a reset or a reset-response */ - chk_length = ntohs(ch_req->chunk_length); + remaining_length = ntohs(ch_req->chunk_length) - sizeof(struct sctp_chunkhdr); /* setup for adding the response */ sctp_alloc_a_chunk(stcb, chk); @@ -4088,20 +4091,27 @@ strres_nochunk: ch->chunk_length = htons(chk->send_size); SCTP_BUF_LEN(chk->data) = SCTP_SIZE32(chk->send_size); offset += sizeof(struct sctp_chunkhdr); - while ((size_t)chk_length >= sizeof(struct sctp_stream_reset_tsn_request)) { + while (remaining_length >= sizeof(struct sctp_paramhdr)) { ph = (struct sctp_paramhdr *)sctp_m_getptr(m, offset, sizeof(pstore), (uint8_t *) & pstore); - if (ph == NULL) + if (ph == NULL) { + /* TSNH */ break; + } param_len = ntohs(ph->param_length); - if (param_len < (int)sizeof(struct sctp_stream_reset_tsn_request)) { - /* bad param */ + if ((param_len > remaining_length) || + (param_len < (sizeof(struct sctp_paramhdr) + sizeof(uint32_t)))) { + /* bad parameter length */ break; } - ph = (struct sctp_paramhdr *)sctp_m_getptr(m, offset, min(param_len, (int)sizeof(cstore)), + ph = (struct sctp_paramhdr *)sctp_m_getptr(m, offset, min(param_len, sizeof(cstore)), (uint8_t *) & cstore); + if (ph == NULL) { + /* TSNH */ + break; + } ptype = ntohs(ph->param_type); num_param++; - if (param_len > (int)sizeof(cstore)) { + if (param_len > sizeof(cstore)) { trunc = 1; } else { trunc = 0; @@ -4113,6 +4123,9 @@ strres_nochunk: if (ptype == SCTP_STR_RESET_OUT_REQUEST) { struct sctp_stream_reset_out_request *req_out; + if (param_len < sizeof(struct sctp_stream_reset_out_request)) { + break; + } req_out = (struct sctp_stream_reset_out_request *)ph; num_req++; if (stcb->asoc.stream_reset_outstanding) { @@ -4126,12 +4139,18 @@ strres_nochunk: } else if (ptype == SCTP_STR_RESET_ADD_OUT_STREAMS) { struct sctp_stream_reset_add_strm *str_add; + if (param_len < sizeof(struct sctp_stream_reset_add_strm)) { + break; + } str_add = (struct sctp_stream_reset_add_strm *)ph; num_req++; sctp_handle_str_reset_add_strm(stcb, chk, str_add); } else if (ptype == SCTP_STR_RESET_ADD_IN_STREAMS) { struct sctp_stream_reset_add_strm *str_add; + if (param_len < sizeof(struct sctp_stream_reset_add_strm)) { + break; + } str_add = (struct sctp_stream_reset_add_strm *)ph; num_req++; sctp_handle_str_reset_add_out_strm(stcb, chk, str_add); @@ -4156,6 +4175,9 @@ strres_nochunk: struct sctp_stream_reset_response *resp; uint32_t result; + if (param_len < sizeof(struct sctp_stream_reset_response)) { + break; + } resp = (struct sctp_stream_reset_response *)ph; seq = ntohl(resp->response_seq); result = ntohl(resp->result); @@ -4167,7 +4189,11 @@ strres_nochunk: break; } offset += SCTP_SIZE32(param_len); - chk_length -= SCTP_SIZE32(param_len); + if (remaining_length >= SCTP_SIZE32(param_len)) { + remaining_length -= SCTP_SIZE32(param_len); + } else { + remaining_length = 0; + } } if (num_req == 0) { /* we have no response free the stuff */ From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 19:35:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 50810CB2; Tue, 27 Jan 2015 19:35:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3CC5EAFA; Tue, 27 Jan 2015 19:35:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0RJZgJO015251; Tue, 27 Jan 2015 19:35:42 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0RJZgbo015250; Tue, 27 Jan 2015 19:35:42 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501271935.t0RJZgbo015250@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 27 Jan 2015 19:35:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277806 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 19:35:42 -0000 Author: delphij Date: Tue Jan 27 19:35:41 2015 New Revision: 277806 URL: https://svnweb.freebsd.org/changeset/base/277806 Log: Use unsigned int for index value. Without this change a local attacker could trigger a panic by tricking the kernel into accessing undefined kernel memory. We would like to acknowledge Francisco Falcon from CORE Security Technologies who discovered the issue and reported to the FreeBSD Security Team. More information can be found at CORE Security's advisory at: http://www.coresecurity.com/content/freebsd-kernel-multiple-vulnerabilities This is an errata candidate for releng/10.1 and releng/9.3. Earlier releases are not affected. Reported by: Francisco Falcon from CORE Security Technologies Security: CVE-2014-0998 Reviewed by: dumbbell MFC after: 3 days Modified: head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Tue Jan 27 19:35:38 2015 (r277805) +++ head/sys/dev/vt/vt_core.c Tue Jan 27 19:35:41 2015 (r277806) @@ -2367,20 +2367,23 @@ skip_thunk: } VT_UNLOCK(vd); return (EINVAL); - case VT_WAITACTIVE: + case VT_WAITACTIVE: { + unsigned int idx; + error = 0; - i = *(unsigned int *)data; - if (i > VT_MAXWINDOWS) + idx = *(unsigned int *)data; + if (idx > VT_MAXWINDOWS) return (EINVAL); - if (i != 0) - vw = vd->vd_windows[i - 1]; + if (idx > 0) + vw = vd->vd_windows[idx - 1]; VT_LOCK(vd); while (vd->vd_curwindow != vw && error == 0) error = cv_wait_sig(&vd->vd_winswitch, &vd->vd_lock); VT_UNLOCK(vd); return (error); + } case VT_SETMODE: { /* set screen switcher mode */ struct vt_mode *mode; struct proc *p1; From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 19:36:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35C77E57; Tue, 27 Jan 2015 19:36:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F9F7B10; Tue, 27 Jan 2015 19:36:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0RJa9gD015384; Tue, 27 Jan 2015 19:36:09 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0RJa9Il015382; Tue, 27 Jan 2015 19:36:09 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501271936.t0RJa9Il015382@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 27 Jan 2015 19:36:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r277807 - in stable: 10/sys/netinet 8/sys/netinet 9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 19:36:10 -0000 Author: delphij Date: Tue Jan 27 19:36:08 2015 New Revision: 277807 URL: https://svnweb.freebsd.org/changeset/base/277807 Log: Fix SCTP SCTP_SS_VALUE kernel memory corruption and disclosure vulnerability and SCTP stream reset vulnerability. Security: FreeBSD-SA-15:02.kmem Security: CVE-2014-8612 Security: FreeBSD-SA-15:03.sctp Security: CVE-2014-8613 Modified: stable/9/sys/netinet/sctp_input.c stable/9/sys/netinet/sctp_usrreq.c Changes in other areas also in this revision: Modified: stable/10/sys/netinet/sctp_input.c stable/10/sys/netinet/sctp_usrreq.c stable/8/sys/netinet/sctp_input.c stable/8/sys/netinet/sctp_usrreq.c Modified: stable/9/sys/netinet/sctp_input.c ============================================================================== --- stable/9/sys/netinet/sctp_input.c Tue Jan 27 19:35:41 2015 (r277806) +++ stable/9/sys/netinet/sctp_input.c Tue Jan 27 19:36:08 2015 (r277807) @@ -3662,6 +3662,9 @@ sctp_handle_stream_reset_response(struct /* huh ? */ return (0); } + if (ntohs(respin->ph.param_length) < sizeof(struct sctp_stream_reset_response_tsn)) { + return (0); + } if (action == SCTP_STREAM_RESET_RESULT_PERFORMED) { resp = (struct sctp_stream_reset_response_tsn *)respin; asoc->stream_reset_outstanding--; @@ -4050,7 +4053,7 @@ __attribute__((noinline)) sctp_handle_stream_reset(struct sctp_tcb *stcb, struct mbuf *m, int offset, struct sctp_chunkhdr *ch_req) { - int chk_length, param_len, ptype; + uint16_t remaining_length, param_len, ptype; struct sctp_paramhdr pstore; uint8_t cstore[SCTP_CHUNK_BUFFER_SIZE]; uint32_t seq = 0; @@ -4063,7 +4066,7 @@ __attribute__((noinline)) int num_param = 0; /* now it may be a reset or a reset-response */ - chk_length = ntohs(ch_req->chunk_length); + remaining_length = ntohs(ch_req->chunk_length) - sizeof(struct sctp_chunkhdr); /* setup for adding the response */ sctp_alloc_a_chunk(stcb, chk); @@ -4099,20 +4102,27 @@ strres_nochunk: ch->chunk_length = htons(chk->send_size); SCTP_BUF_LEN(chk->data) = SCTP_SIZE32(chk->send_size); offset += sizeof(struct sctp_chunkhdr); - while ((size_t)chk_length >= sizeof(struct sctp_stream_reset_tsn_request)) { + while (remaining_length >= sizeof(struct sctp_paramhdr)) { ph = (struct sctp_paramhdr *)sctp_m_getptr(m, offset, sizeof(pstore), (uint8_t *) & pstore); - if (ph == NULL) + if (ph == NULL) { + /* TSNH */ break; + } param_len = ntohs(ph->param_length); - if (param_len < (int)sizeof(struct sctp_stream_reset_tsn_request)) { - /* bad param */ + if ((param_len > remaining_length) || + (param_len < (sizeof(struct sctp_paramhdr) + sizeof(uint32_t)))) { + /* bad parameter length */ break; } - ph = (struct sctp_paramhdr *)sctp_m_getptr(m, offset, min(param_len, (int)sizeof(cstore)), + ph = (struct sctp_paramhdr *)sctp_m_getptr(m, offset, min(param_len, sizeof(cstore)), (uint8_t *) & cstore); + if (ph == NULL) { + /* TSNH */ + break; + } ptype = ntohs(ph->param_type); num_param++; - if (param_len > (int)sizeof(cstore)) { + if (param_len > sizeof(cstore)) { trunc = 1; } else { trunc = 0; @@ -4124,6 +4134,9 @@ strres_nochunk: if (ptype == SCTP_STR_RESET_OUT_REQUEST) { struct sctp_stream_reset_out_request *req_out; + if (param_len < sizeof(struct sctp_stream_reset_out_request)) { + break; + } req_out = (struct sctp_stream_reset_out_request *)ph; num_req++; if (stcb->asoc.stream_reset_outstanding) { @@ -4137,12 +4150,18 @@ strres_nochunk: } else if (ptype == SCTP_STR_RESET_ADD_OUT_STREAMS) { struct sctp_stream_reset_add_strm *str_add; + if (param_len < sizeof(struct sctp_stream_reset_add_strm)) { + break; + } str_add = (struct sctp_stream_reset_add_strm *)ph; num_req++; sctp_handle_str_reset_add_strm(stcb, chk, str_add); } else if (ptype == SCTP_STR_RESET_ADD_IN_STREAMS) { struct sctp_stream_reset_add_strm *str_add; + if (param_len < sizeof(struct sctp_stream_reset_add_strm)) { + break; + } str_add = (struct sctp_stream_reset_add_strm *)ph; num_req++; sctp_handle_str_reset_add_out_strm(stcb, chk, str_add); @@ -4167,6 +4186,9 @@ strres_nochunk: struct sctp_stream_reset_response *resp; uint32_t result; + if (param_len < sizeof(struct sctp_stream_reset_response)) { + break; + } resp = (struct sctp_stream_reset_response *)ph; seq = ntohl(resp->response_seq); result = ntohl(resp->result); @@ -4178,7 +4200,11 @@ strres_nochunk: break; } offset += SCTP_SIZE32(param_len); - chk_length -= SCTP_SIZE32(param_len); + if (remaining_length >= SCTP_SIZE32(param_len)) { + remaining_length -= SCTP_SIZE32(param_len); + } else { + remaining_length = 0; + } } if (num_req == 0) { /* we have no response free the stuff */ Modified: stable/9/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/9/sys/netinet/sctp_usrreq.c Tue Jan 27 19:35:41 2015 (r277806) +++ stable/9/sys/netinet/sctp_usrreq.c Tue Jan 27 19:36:08 2015 (r277807) @@ -1854,8 +1854,9 @@ flags_out: SCTP_CHECK_AND_CAST(av, optval, struct sctp_stream_value, *optsize); SCTP_FIND_STCB(inp, stcb, av->assoc_id); if (stcb) { - if (stcb->asoc.ss_functions.sctp_ss_get_value(stcb, &stcb->asoc, &stcb->asoc.strmout[av->stream_id], - &av->stream_value) < 0) { + if ((av->stream_id >= stcb->asoc.streamoutcnt) || + (stcb->asoc.ss_functions.sctp_ss_get_value(stcb, &stcb->asoc, &stcb->asoc.strmout[av->stream_id], + &av->stream_value) < 0)) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); error = EINVAL; } else { @@ -3660,8 +3661,9 @@ sctp_setopt(struct socket *so, int optna SCTP_CHECK_AND_CAST(av, optval, struct sctp_stream_value, optsize); SCTP_FIND_STCB(inp, stcb, av->assoc_id); if (stcb) { - if (stcb->asoc.ss_functions.sctp_ss_set_value(stcb, &stcb->asoc, &stcb->asoc.strmout[av->stream_id], - av->stream_value) < 0) { + if ((av->stream_id >= stcb->asoc.streamoutcnt) || + (stcb->asoc.ss_functions.sctp_ss_set_value(stcb, &stcb->asoc, &stcb->asoc.strmout[av->stream_id], + av->stream_value) < 0)) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); error = EINVAL; } @@ -3671,10 +3673,12 @@ sctp_setopt(struct socket *so, int optna SCTP_INP_RLOCK(inp); LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) { SCTP_TCB_LOCK(stcb); - stcb->asoc.ss_functions.sctp_ss_set_value(stcb, - &stcb->asoc, - &stcb->asoc.strmout[av->stream_id], - av->stream_value); + if (av->stream_id < stcb->asoc.streamoutcnt) { + stcb->asoc.ss_functions.sctp_ss_set_value(stcb, + &stcb->asoc, + &stcb->asoc.strmout[av->stream_id], + av->stream_value); + } SCTP_TCB_UNLOCK(stcb); } SCTP_INP_RUNLOCK(inp); From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 19:36:12 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C364EC7; Tue, 27 Jan 2015 19:36:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E7A76B13; Tue, 27 Jan 2015 19:36:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0RJaB1S015401; Tue, 27 Jan 2015 19:36:11 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0RJaBxN015398; Tue, 27 Jan 2015 19:36:11 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501271936.t0RJaBxN015398@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 27 Jan 2015 19:36: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: r277807 - in stable: 10/sys/netinet 8/sys/netinet 9/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 19:36:12 -0000 Author: delphij Date: Tue Jan 27 19:36:08 2015 New Revision: 277807 URL: https://svnweb.freebsd.org/changeset/base/277807 Log: Fix SCTP SCTP_SS_VALUE kernel memory corruption and disclosure vulnerability and SCTP stream reset vulnerability. Security: FreeBSD-SA-15:02.kmem Security: CVE-2014-8612 Security: FreeBSD-SA-15:03.sctp Security: CVE-2014-8613 Modified: stable/10/sys/netinet/sctp_input.c stable/10/sys/netinet/sctp_usrreq.c Changes in other areas also in this revision: Modified: stable/8/sys/netinet/sctp_input.c stable/8/sys/netinet/sctp_usrreq.c stable/9/sys/netinet/sctp_input.c stable/9/sys/netinet/sctp_usrreq.c Modified: stable/10/sys/netinet/sctp_input.c ============================================================================== --- stable/10/sys/netinet/sctp_input.c Tue Jan 27 19:35:41 2015 (r277806) +++ stable/10/sys/netinet/sctp_input.c Tue Jan 27 19:36:08 2015 (r277807) @@ -3664,6 +3664,9 @@ sctp_handle_stream_reset_response(struct /* huh ? */ return (0); } + if (ntohs(respin->ph.param_length) < sizeof(struct sctp_stream_reset_response_tsn)) { + return (0); + } if (action == SCTP_STREAM_RESET_RESULT_PERFORMED) { resp = (struct sctp_stream_reset_response_tsn *)respin; asoc->stream_reset_outstanding--; @@ -4052,7 +4055,7 @@ __attribute__((noinline)) sctp_handle_stream_reset(struct sctp_tcb *stcb, struct mbuf *m, int offset, struct sctp_chunkhdr *ch_req) { - int chk_length, param_len, ptype; + uint16_t remaining_length, param_len, ptype; struct sctp_paramhdr pstore; uint8_t cstore[SCTP_CHUNK_BUFFER_SIZE]; uint32_t seq = 0; @@ -4065,7 +4068,7 @@ __attribute__((noinline)) int num_param = 0; /* now it may be a reset or a reset-response */ - chk_length = ntohs(ch_req->chunk_length); + remaining_length = ntohs(ch_req->chunk_length) - sizeof(struct sctp_chunkhdr); /* setup for adding the response */ sctp_alloc_a_chunk(stcb, chk); @@ -4103,20 +4106,27 @@ strres_nochunk: ch->chunk_length = htons(chk->send_size); SCTP_BUF_LEN(chk->data) = SCTP_SIZE32(chk->send_size); offset += sizeof(struct sctp_chunkhdr); - while ((size_t)chk_length >= sizeof(struct sctp_stream_reset_tsn_request)) { + while (remaining_length >= sizeof(struct sctp_paramhdr)) { ph = (struct sctp_paramhdr *)sctp_m_getptr(m, offset, sizeof(pstore), (uint8_t *) & pstore); - if (ph == NULL) + if (ph == NULL) { + /* TSNH */ break; + } param_len = ntohs(ph->param_length); - if (param_len < (int)sizeof(struct sctp_stream_reset_tsn_request)) { - /* bad param */ + if ((param_len > remaining_length) || + (param_len < (sizeof(struct sctp_paramhdr) + sizeof(uint32_t)))) { + /* bad parameter length */ break; } - ph = (struct sctp_paramhdr *)sctp_m_getptr(m, offset, min(param_len, (int)sizeof(cstore)), + ph = (struct sctp_paramhdr *)sctp_m_getptr(m, offset, min(param_len, sizeof(cstore)), (uint8_t *) & cstore); + if (ph == NULL) { + /* TSNH */ + break; + } ptype = ntohs(ph->param_type); num_param++; - if (param_len > (int)sizeof(cstore)) { + if (param_len > sizeof(cstore)) { trunc = 1; } else { trunc = 0; @@ -4128,6 +4138,9 @@ strres_nochunk: if (ptype == SCTP_STR_RESET_OUT_REQUEST) { struct sctp_stream_reset_out_request *req_out; + if (param_len < sizeof(struct sctp_stream_reset_out_request)) { + break; + } req_out = (struct sctp_stream_reset_out_request *)ph; num_req++; if (stcb->asoc.stream_reset_outstanding) { @@ -4141,12 +4154,18 @@ strres_nochunk: } else if (ptype == SCTP_STR_RESET_ADD_OUT_STREAMS) { struct sctp_stream_reset_add_strm *str_add; + if (param_len < sizeof(struct sctp_stream_reset_add_strm)) { + break; + } str_add = (struct sctp_stream_reset_add_strm *)ph; num_req++; sctp_handle_str_reset_add_strm(stcb, chk, str_add); } else if (ptype == SCTP_STR_RESET_ADD_IN_STREAMS) { struct sctp_stream_reset_add_strm *str_add; + if (param_len < sizeof(struct sctp_stream_reset_add_strm)) { + break; + } str_add = (struct sctp_stream_reset_add_strm *)ph; num_req++; sctp_handle_str_reset_add_out_strm(stcb, chk, str_add); @@ -4171,6 +4190,9 @@ strres_nochunk: struct sctp_stream_reset_response *resp; uint32_t result; + if (param_len < sizeof(struct sctp_stream_reset_response)) { + break; + } resp = (struct sctp_stream_reset_response *)ph; seq = ntohl(resp->response_seq); result = ntohl(resp->result); @@ -4182,7 +4204,11 @@ strres_nochunk: break; } offset += SCTP_SIZE32(param_len); - chk_length -= SCTP_SIZE32(param_len); + if (remaining_length >= SCTP_SIZE32(param_len)) { + remaining_length -= SCTP_SIZE32(param_len); + } else { + remaining_length = 0; + } } if (num_req == 0) { /* we have no response free the stuff */ Modified: stable/10/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/10/sys/netinet/sctp_usrreq.c Tue Jan 27 19:35:41 2015 (r277806) +++ stable/10/sys/netinet/sctp_usrreq.c Tue Jan 27 19:36:08 2015 (r277807) @@ -1854,8 +1854,9 @@ flags_out: SCTP_CHECK_AND_CAST(av, optval, struct sctp_stream_value, *optsize); SCTP_FIND_STCB(inp, stcb, av->assoc_id); if (stcb) { - if (stcb->asoc.ss_functions.sctp_ss_get_value(stcb, &stcb->asoc, &stcb->asoc.strmout[av->stream_id], - &av->stream_value) < 0) { + if ((av->stream_id >= stcb->asoc.streamoutcnt) || + (stcb->asoc.ss_functions.sctp_ss_get_value(stcb, &stcb->asoc, &stcb->asoc.strmout[av->stream_id], + &av->stream_value) < 0)) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); error = EINVAL; } else { @@ -3915,8 +3916,9 @@ sctp_setopt(struct socket *so, int optna SCTP_CHECK_AND_CAST(av, optval, struct sctp_stream_value, optsize); SCTP_FIND_STCB(inp, stcb, av->assoc_id); if (stcb) { - if (stcb->asoc.ss_functions.sctp_ss_set_value(stcb, &stcb->asoc, &stcb->asoc.strmout[av->stream_id], - av->stream_value) < 0) { + if ((av->stream_id >= stcb->asoc.streamoutcnt) || + (stcb->asoc.ss_functions.sctp_ss_set_value(stcb, &stcb->asoc, &stcb->asoc.strmout[av->stream_id], + av->stream_value) < 0)) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); error = EINVAL; } @@ -3926,10 +3928,12 @@ sctp_setopt(struct socket *so, int optna SCTP_INP_RLOCK(inp); LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) { SCTP_TCB_LOCK(stcb); - stcb->asoc.ss_functions.sctp_ss_set_value(stcb, - &stcb->asoc, - &stcb->asoc.strmout[av->stream_id], - av->stream_value); + if (av->stream_id < stcb->asoc.streamoutcnt) { + stcb->asoc.ss_functions.sctp_ss_set_value(stcb, + &stcb->asoc, + &stcb->asoc.strmout[av->stream_id], + av->stream_value); + } SCTP_TCB_UNLOCK(stcb); } SCTP_INP_RUNLOCK(inp); From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 19:36:11 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 23BB3E5D; Tue, 27 Jan 2015 19:36:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 09744B12; Tue, 27 Jan 2015 19:36:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0RJaAMS015391; Tue, 27 Jan 2015 19:36:10 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0RJaAB6015389; Tue, 27 Jan 2015 19:36:10 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501271936.t0RJaAB6015389@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 27 Jan 2015 19:36:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r277807 - in stable: 10/sys/netinet 8/sys/netinet 9/sys/netinet X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 19:36:11 -0000 Author: delphij Date: Tue Jan 27 19:36:08 2015 New Revision: 277807 URL: https://svnweb.freebsd.org/changeset/base/277807 Log: Fix SCTP SCTP_SS_VALUE kernel memory corruption and disclosure vulnerability and SCTP stream reset vulnerability. Security: FreeBSD-SA-15:02.kmem Security: CVE-2014-8612 Security: FreeBSD-SA-15:03.sctp Security: CVE-2014-8613 Modified: stable/8/sys/netinet/sctp_input.c stable/8/sys/netinet/sctp_usrreq.c Changes in other areas also in this revision: Modified: stable/10/sys/netinet/sctp_input.c stable/10/sys/netinet/sctp_usrreq.c stable/9/sys/netinet/sctp_input.c stable/9/sys/netinet/sctp_usrreq.c Modified: stable/8/sys/netinet/sctp_input.c ============================================================================== --- stable/8/sys/netinet/sctp_input.c Tue Jan 27 19:35:41 2015 (r277806) +++ stable/8/sys/netinet/sctp_input.c Tue Jan 27 19:36:08 2015 (r277807) @@ -3690,6 +3690,9 @@ sctp_handle_stream_reset_response(struct /* huh ? */ return (0); } + if (ntohs(respin->ph.param_length) < sizeof(struct sctp_stream_reset_response_tsn)) { + return (0); + } if (action == SCTP_STREAM_RESET_RESULT_PERFORMED) { resp = (struct sctp_stream_reset_response_tsn *)respin; asoc->stream_reset_outstanding--; @@ -4078,7 +4081,7 @@ __attribute__((noinline)) sctp_handle_stream_reset(struct sctp_tcb *stcb, struct mbuf *m, int offset, struct sctp_chunkhdr *ch_req) { - int chk_length, param_len, ptype; + uint16_t remaining_length, param_len, ptype; struct sctp_paramhdr pstore; uint8_t cstore[SCTP_CHUNK_BUFFER_SIZE]; uint32_t seq = 0; @@ -4091,7 +4094,7 @@ __attribute__((noinline)) int num_param = 0; /* now it may be a reset or a reset-response */ - chk_length = ntohs(ch_req->chunk_length); + remaining_length = ntohs(ch_req->chunk_length) - sizeof(struct sctp_chunkhdr); /* setup for adding the response */ sctp_alloc_a_chunk(stcb, chk); @@ -4127,20 +4130,27 @@ strres_nochunk: ch->chunk_length = htons(chk->send_size); SCTP_BUF_LEN(chk->data) = SCTP_SIZE32(chk->send_size); offset += sizeof(struct sctp_chunkhdr); - while ((size_t)chk_length >= sizeof(struct sctp_stream_reset_tsn_request)) { + while (remaining_length >= sizeof(struct sctp_paramhdr)) { ph = (struct sctp_paramhdr *)sctp_m_getptr(m, offset, sizeof(pstore), (uint8_t *) & pstore); - if (ph == NULL) + if (ph == NULL) { + /* TSNH */ break; + } param_len = ntohs(ph->param_length); - if (param_len < (int)sizeof(struct sctp_stream_reset_tsn_request)) { - /* bad param */ + if ((param_len > remaining_length) || + (param_len < (sizeof(struct sctp_paramhdr) + sizeof(uint32_t)))) { + /* bad parameter length */ break; } - ph = (struct sctp_paramhdr *)sctp_m_getptr(m, offset, min(param_len, (int)sizeof(cstore)), + ph = (struct sctp_paramhdr *)sctp_m_getptr(m, offset, min(param_len, sizeof(cstore)), (uint8_t *) & cstore); + if (ph == NULL) { + /* TSNH */ + break; + } ptype = ntohs(ph->param_type); num_param++; - if (param_len > (int)sizeof(cstore)) { + if (param_len > sizeof(cstore)) { trunc = 1; } else { trunc = 0; @@ -4152,6 +4162,9 @@ strres_nochunk: if (ptype == SCTP_STR_RESET_OUT_REQUEST) { struct sctp_stream_reset_out_request *req_out; + if (param_len < sizeof(struct sctp_stream_reset_out_request)) { + break; + } req_out = (struct sctp_stream_reset_out_request *)ph; num_req++; if (stcb->asoc.stream_reset_outstanding) { @@ -4165,12 +4178,18 @@ strres_nochunk: } else if (ptype == SCTP_STR_RESET_ADD_OUT_STREAMS) { struct sctp_stream_reset_add_strm *str_add; + if (param_len < sizeof(struct sctp_stream_reset_add_strm)) { + break; + } str_add = (struct sctp_stream_reset_add_strm *)ph; num_req++; sctp_handle_str_reset_add_strm(stcb, chk, str_add); } else if (ptype == SCTP_STR_RESET_ADD_IN_STREAMS) { struct sctp_stream_reset_add_strm *str_add; + if (param_len < sizeof(struct sctp_stream_reset_add_strm)) { + break; + } str_add = (struct sctp_stream_reset_add_strm *)ph; num_req++; sctp_handle_str_reset_add_out_strm(stcb, chk, str_add); @@ -4195,6 +4214,9 @@ strres_nochunk: struct sctp_stream_reset_response *resp; uint32_t result; + if (param_len < sizeof(struct sctp_stream_reset_response)) { + break; + } resp = (struct sctp_stream_reset_response *)ph; seq = ntohl(resp->response_seq); result = ntohl(resp->result); @@ -4206,7 +4228,11 @@ strres_nochunk: break; } offset += SCTP_SIZE32(param_len); - chk_length -= SCTP_SIZE32(param_len); + if (remaining_length >= SCTP_SIZE32(param_len)) { + remaining_length -= SCTP_SIZE32(param_len); + } else { + remaining_length = 0; + } } if (num_req == 0) { /* we have no response free the stuff */ Modified: stable/8/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/8/sys/netinet/sctp_usrreq.c Tue Jan 27 19:35:41 2015 (r277806) +++ stable/8/sys/netinet/sctp_usrreq.c Tue Jan 27 19:36:08 2015 (r277807) @@ -1845,8 +1845,9 @@ flags_out: SCTP_CHECK_AND_CAST(av, optval, struct sctp_stream_value, *optsize); SCTP_FIND_STCB(inp, stcb, av->assoc_id); if (stcb) { - if (stcb->asoc.ss_functions.sctp_ss_get_value(stcb, &stcb->asoc, &stcb->asoc.strmout[av->stream_id], - &av->stream_value) < 0) { + if ((av->stream_id >= stcb->asoc.streamoutcnt) || + (stcb->asoc.ss_functions.sctp_ss_get_value(stcb, &stcb->asoc, &stcb->asoc.strmout[av->stream_id], + &av->stream_value) < 0)) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); error = EINVAL; } else { @@ -3640,8 +3641,9 @@ sctp_setopt(struct socket *so, int optna SCTP_CHECK_AND_CAST(av, optval, struct sctp_stream_value, optsize); SCTP_FIND_STCB(inp, stcb, av->assoc_id); if (stcb) { - if (stcb->asoc.ss_functions.sctp_ss_set_value(stcb, &stcb->asoc, &stcb->asoc.strmout[av->stream_id], - av->stream_value) < 0) { + if ((av->stream_id >= stcb->asoc.streamoutcnt) || + (stcb->asoc.ss_functions.sctp_ss_set_value(stcb, &stcb->asoc, &stcb->asoc.strmout[av->stream_id], + av->stream_value) < 0)) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); error = EINVAL; } @@ -3651,10 +3653,12 @@ sctp_setopt(struct socket *so, int optna SCTP_INP_RLOCK(inp); LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) { SCTP_TCB_LOCK(stcb); - stcb->asoc.ss_functions.sctp_ss_set_value(stcb, - &stcb->asoc, - &stcb->asoc.strmout[av->stream_id], - av->stream_value); + if (av->stream_id < stcb->asoc.streamoutcnt) { + stcb->asoc.ss_functions.sctp_ss_set_value(stcb, + &stcb->asoc, + &stcb->asoc.strmout[av->stream_id], + av->stream_value); + } SCTP_TCB_UNLOCK(stcb); } SCTP_INP_RUNLOCK(inp); From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 19:37:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 14F7237C; Tue, 27 Jan 2015 19:37:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F1AE3B3D; Tue, 27 Jan 2015 19:37:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0RJb75b015673; Tue, 27 Jan 2015 19:37:07 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0RJb3UI015565; Tue, 27 Jan 2015 19:37:03 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501271937.t0RJb3UI015565@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 27 Jan 2015 19:37:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r277808 - in releng: 10.0 10.0/sys/conf 10.0/sys/netinet 10.1 10.1/sys/conf 10.1/sys/netinet 8.4 8.4/sys/conf 8.4/sys/netinet 9.3 9.3/sys/conf 9.3/sys/netinet X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 19:37:08 -0000 Author: delphij Date: Tue Jan 27 19:37:02 2015 New Revision: 277808 URL: https://svnweb.freebsd.org/changeset/base/277808 Log: Fix SCTP SCTP_SS_VALUE kernel memory corruption and disclosure vulnerability and SCTP stream reset vulnerability. Security: FreeBSD-SA-15:02.kmem Security: CVE-2014-8612 Security: FreeBSD-SA-15:03.sctp Security: CVE-2014-8613 Approved by: so Modified: releng/10.0/UPDATING releng/10.0/sys/conf/newvers.sh releng/10.0/sys/netinet/sctp_input.c releng/10.0/sys/netinet/sctp_usrreq.c releng/10.1/UPDATING releng/10.1/sys/conf/newvers.sh releng/10.1/sys/netinet/sctp_input.c releng/10.1/sys/netinet/sctp_usrreq.c releng/8.4/UPDATING releng/8.4/sys/conf/newvers.sh releng/8.4/sys/netinet/sctp_input.c releng/8.4/sys/netinet/sctp_usrreq.c releng/9.3/UPDATING releng/9.3/sys/conf/newvers.sh releng/9.3/sys/netinet/sctp_input.c releng/9.3/sys/netinet/sctp_usrreq.c Modified: releng/10.0/UPDATING ============================================================================== --- releng/10.0/UPDATING Tue Jan 27 19:36:08 2015 (r277807) +++ releng/10.0/UPDATING Tue Jan 27 19:37:02 2015 (r277808) @@ -16,6 +16,14 @@ from older versions of FreeBSD, try WITH stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20150127: p17 FreeBSD-SA-15:02.kmem + FreeBSD-SA-15:03.sctp + + Fix SCTP SCTP_SS_VALUE kernel memory corruption and disclosure + vulnerability. [SA-15:02] + + Fix SCTP stream reset vulnerability. [SA-15:03] + 20150114: p16 FreeBSD-SA-15:01.openssl Fix multiple vulnerabilities in OpenSSL. [SA-15:01] Modified: releng/10.0/sys/conf/newvers.sh ============================================================================== --- releng/10.0/sys/conf/newvers.sh Tue Jan 27 19:36:08 2015 (r277807) +++ releng/10.0/sys/conf/newvers.sh Tue Jan 27 19:37:02 2015 (r277808) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.0" -BRANCH="RELEASE-p16" +BRANCH="RELEASE-p17" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/10.0/sys/netinet/sctp_input.c ============================================================================== --- releng/10.0/sys/netinet/sctp_input.c Tue Jan 27 19:36:08 2015 (r277807) +++ releng/10.0/sys/netinet/sctp_input.c Tue Jan 27 19:37:02 2015 (r277808) @@ -3690,6 +3690,9 @@ sctp_handle_stream_reset_response(struct /* huh ? */ return (0); } + if (ntohs(respin->ph.param_length) < sizeof(struct sctp_stream_reset_response_tsn)) { + return (0); + } if (action == SCTP_STREAM_RESET_RESULT_PERFORMED) { resp = (struct sctp_stream_reset_response_tsn *)respin; asoc->stream_reset_outstanding--; @@ -4078,7 +4081,7 @@ __attribute__((noinline)) sctp_handle_stream_reset(struct sctp_tcb *stcb, struct mbuf *m, int offset, struct sctp_chunkhdr *ch_req) { - int chk_length, param_len, ptype; + uint16_t remaining_length, param_len, ptype; struct sctp_paramhdr pstore; uint8_t cstore[SCTP_CHUNK_BUFFER_SIZE]; uint32_t seq = 0; @@ -4091,7 +4094,7 @@ __attribute__((noinline)) int num_param = 0; /* now it may be a reset or a reset-response */ - chk_length = ntohs(ch_req->chunk_length); + remaining_length = ntohs(ch_req->chunk_length) - sizeof(struct sctp_chunkhdr); /* setup for adding the response */ sctp_alloc_a_chunk(stcb, chk); @@ -4127,20 +4130,27 @@ strres_nochunk: ch->chunk_length = htons(chk->send_size); SCTP_BUF_LEN(chk->data) = SCTP_SIZE32(chk->send_size); offset += sizeof(struct sctp_chunkhdr); - while ((size_t)chk_length >= sizeof(struct sctp_stream_reset_tsn_request)) { + while (remaining_length >= sizeof(struct sctp_paramhdr)) { ph = (struct sctp_paramhdr *)sctp_m_getptr(m, offset, sizeof(pstore), (uint8_t *) & pstore); - if (ph == NULL) + if (ph == NULL) { + /* TSNH */ break; + } param_len = ntohs(ph->param_length); - if (param_len < (int)sizeof(struct sctp_stream_reset_tsn_request)) { - /* bad param */ + if ((param_len > remaining_length) || + (param_len < (sizeof(struct sctp_paramhdr) + sizeof(uint32_t)))) { + /* bad parameter length */ break; } - ph = (struct sctp_paramhdr *)sctp_m_getptr(m, offset, min(param_len, (int)sizeof(cstore)), + ph = (struct sctp_paramhdr *)sctp_m_getptr(m, offset, min(param_len, sizeof(cstore)), (uint8_t *) & cstore); + if (ph == NULL) { + /* TSNH */ + break; + } ptype = ntohs(ph->param_type); num_param++; - if (param_len > (int)sizeof(cstore)) { + if (param_len > sizeof(cstore)) { trunc = 1; } else { trunc = 0; @@ -4152,6 +4162,9 @@ strres_nochunk: if (ptype == SCTP_STR_RESET_OUT_REQUEST) { struct sctp_stream_reset_out_request *req_out; + if (param_len < sizeof(struct sctp_stream_reset_out_request)) { + break; + } req_out = (struct sctp_stream_reset_out_request *)ph; num_req++; if (stcb->asoc.stream_reset_outstanding) { @@ -4165,12 +4178,18 @@ strres_nochunk: } else if (ptype == SCTP_STR_RESET_ADD_OUT_STREAMS) { struct sctp_stream_reset_add_strm *str_add; + if (param_len < sizeof(struct sctp_stream_reset_add_strm)) { + break; + } str_add = (struct sctp_stream_reset_add_strm *)ph; num_req++; sctp_handle_str_reset_add_strm(stcb, chk, str_add); } else if (ptype == SCTP_STR_RESET_ADD_IN_STREAMS) { struct sctp_stream_reset_add_strm *str_add; + if (param_len < sizeof(struct sctp_stream_reset_add_strm)) { + break; + } str_add = (struct sctp_stream_reset_add_strm *)ph; num_req++; sctp_handle_str_reset_add_out_strm(stcb, chk, str_add); @@ -4195,6 +4214,9 @@ strres_nochunk: struct sctp_stream_reset_response *resp; uint32_t result; + if (param_len < sizeof(struct sctp_stream_reset_response)) { + break; + } resp = (struct sctp_stream_reset_response *)ph; seq = ntohl(resp->response_seq); result = ntohl(resp->result); @@ -4206,7 +4228,11 @@ strres_nochunk: break; } offset += SCTP_SIZE32(param_len); - chk_length -= SCTP_SIZE32(param_len); + if (remaining_length >= SCTP_SIZE32(param_len)) { + remaining_length -= SCTP_SIZE32(param_len); + } else { + remaining_length = 0; + } } if (num_req == 0) { /* we have no response free the stuff */ Modified: releng/10.0/sys/netinet/sctp_usrreq.c ============================================================================== --- releng/10.0/sys/netinet/sctp_usrreq.c Tue Jan 27 19:36:08 2015 (r277807) +++ releng/10.0/sys/netinet/sctp_usrreq.c Tue Jan 27 19:37:02 2015 (r277808) @@ -1869,8 +1869,9 @@ flags_out: SCTP_CHECK_AND_CAST(av, optval, struct sctp_stream_value, *optsize); SCTP_FIND_STCB(inp, stcb, av->assoc_id); if (stcb) { - if (stcb->asoc.ss_functions.sctp_ss_get_value(stcb, &stcb->asoc, &stcb->asoc.strmout[av->stream_id], - &av->stream_value) < 0) { + if ((av->stream_id >= stcb->asoc.streamoutcnt) || + (stcb->asoc.ss_functions.sctp_ss_get_value(stcb, &stcb->asoc, &stcb->asoc.strmout[av->stream_id], + &av->stream_value) < 0)) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); error = EINVAL; } else { @@ -3675,8 +3676,9 @@ sctp_setopt(struct socket *so, int optna SCTP_CHECK_AND_CAST(av, optval, struct sctp_stream_value, optsize); SCTP_FIND_STCB(inp, stcb, av->assoc_id); if (stcb) { - if (stcb->asoc.ss_functions.sctp_ss_set_value(stcb, &stcb->asoc, &stcb->asoc.strmout[av->stream_id], - av->stream_value) < 0) { + if ((av->stream_id >= stcb->asoc.streamoutcnt) || + (stcb->asoc.ss_functions.sctp_ss_set_value(stcb, &stcb->asoc, &stcb->asoc.strmout[av->stream_id], + av->stream_value) < 0)) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); error = EINVAL; } @@ -3686,10 +3688,12 @@ sctp_setopt(struct socket *so, int optna SCTP_INP_RLOCK(inp); LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) { SCTP_TCB_LOCK(stcb); - stcb->asoc.ss_functions.sctp_ss_set_value(stcb, - &stcb->asoc, - &stcb->asoc.strmout[av->stream_id], - av->stream_value); + if (av->stream_id < stcb->asoc.streamoutcnt) { + stcb->asoc.ss_functions.sctp_ss_set_value(stcb, + &stcb->asoc, + &stcb->asoc.strmout[av->stream_id], + av->stream_value); + } SCTP_TCB_UNLOCK(stcb); } SCTP_INP_RUNLOCK(inp); Modified: releng/10.1/UPDATING ============================================================================== --- releng/10.1/UPDATING Tue Jan 27 19:36:08 2015 (r277807) +++ releng/10.1/UPDATING Tue Jan 27 19:37:02 2015 (r277808) @@ -16,6 +16,14 @@ from older versions of FreeBSD, try WITH stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20150127: p5 FreeBSD-SA-15:02.kmem + FreeBSD-SA-15:03.sctp + + Fix SCTP SCTP_SS_VALUE kernel memory corruption and disclosure + vulnerability. [SA-15:02] + + Fix SCTP stream reset vulnerability. [SA-15:03] + 20150114: p4 FreeBSD-SA-15:01.openssl Fix multiple vulnerabilities in OpenSSL. [SA-15:01] Modified: releng/10.1/sys/conf/newvers.sh ============================================================================== --- releng/10.1/sys/conf/newvers.sh Tue Jan 27 19:36:08 2015 (r277807) +++ releng/10.1/sys/conf/newvers.sh Tue Jan 27 19:37:02 2015 (r277808) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.1" -BRANCH="RELEASE-p4" +BRANCH="RELEASE-p5" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/10.1/sys/netinet/sctp_input.c ============================================================================== --- releng/10.1/sys/netinet/sctp_input.c Tue Jan 27 19:36:08 2015 (r277807) +++ releng/10.1/sys/netinet/sctp_input.c Tue Jan 27 19:37:02 2015 (r277808) @@ -3664,6 +3664,9 @@ sctp_handle_stream_reset_response(struct /* huh ? */ return (0); } + if (ntohs(respin->ph.param_length) < sizeof(struct sctp_stream_reset_response_tsn)) { + return (0); + } if (action == SCTP_STREAM_RESET_RESULT_PERFORMED) { resp = (struct sctp_stream_reset_response_tsn *)respin; asoc->stream_reset_outstanding--; @@ -4052,7 +4055,7 @@ __attribute__((noinline)) sctp_handle_stream_reset(struct sctp_tcb *stcb, struct mbuf *m, int offset, struct sctp_chunkhdr *ch_req) { - int chk_length, param_len, ptype; + uint16_t remaining_length, param_len, ptype; struct sctp_paramhdr pstore; uint8_t cstore[SCTP_CHUNK_BUFFER_SIZE]; uint32_t seq = 0; @@ -4065,7 +4068,7 @@ __attribute__((noinline)) int num_param = 0; /* now it may be a reset or a reset-response */ - chk_length = ntohs(ch_req->chunk_length); + remaining_length = ntohs(ch_req->chunk_length) - sizeof(struct sctp_chunkhdr); /* setup for adding the response */ sctp_alloc_a_chunk(stcb, chk); @@ -4103,20 +4106,27 @@ strres_nochunk: ch->chunk_length = htons(chk->send_size); SCTP_BUF_LEN(chk->data) = SCTP_SIZE32(chk->send_size); offset += sizeof(struct sctp_chunkhdr); - while ((size_t)chk_length >= sizeof(struct sctp_stream_reset_tsn_request)) { + while (remaining_length >= sizeof(struct sctp_paramhdr)) { ph = (struct sctp_paramhdr *)sctp_m_getptr(m, offset, sizeof(pstore), (uint8_t *) & pstore); - if (ph == NULL) + if (ph == NULL) { + /* TSNH */ break; + } param_len = ntohs(ph->param_length); - if (param_len < (int)sizeof(struct sctp_stream_reset_tsn_request)) { - /* bad param */ + if ((param_len > remaining_length) || + (param_len < (sizeof(struct sctp_paramhdr) + sizeof(uint32_t)))) { + /* bad parameter length */ break; } - ph = (struct sctp_paramhdr *)sctp_m_getptr(m, offset, min(param_len, (int)sizeof(cstore)), + ph = (struct sctp_paramhdr *)sctp_m_getptr(m, offset, min(param_len, sizeof(cstore)), (uint8_t *) & cstore); + if (ph == NULL) { + /* TSNH */ + break; + } ptype = ntohs(ph->param_type); num_param++; - if (param_len > (int)sizeof(cstore)) { + if (param_len > sizeof(cstore)) { trunc = 1; } else { trunc = 0; @@ -4128,6 +4138,9 @@ strres_nochunk: if (ptype == SCTP_STR_RESET_OUT_REQUEST) { struct sctp_stream_reset_out_request *req_out; + if (param_len < sizeof(struct sctp_stream_reset_out_request)) { + break; + } req_out = (struct sctp_stream_reset_out_request *)ph; num_req++; if (stcb->asoc.stream_reset_outstanding) { @@ -4141,12 +4154,18 @@ strres_nochunk: } else if (ptype == SCTP_STR_RESET_ADD_OUT_STREAMS) { struct sctp_stream_reset_add_strm *str_add; + if (param_len < sizeof(struct sctp_stream_reset_add_strm)) { + break; + } str_add = (struct sctp_stream_reset_add_strm *)ph; num_req++; sctp_handle_str_reset_add_strm(stcb, chk, str_add); } else if (ptype == SCTP_STR_RESET_ADD_IN_STREAMS) { struct sctp_stream_reset_add_strm *str_add; + if (param_len < sizeof(struct sctp_stream_reset_add_strm)) { + break; + } str_add = (struct sctp_stream_reset_add_strm *)ph; num_req++; sctp_handle_str_reset_add_out_strm(stcb, chk, str_add); @@ -4171,6 +4190,9 @@ strres_nochunk: struct sctp_stream_reset_response *resp; uint32_t result; + if (param_len < sizeof(struct sctp_stream_reset_response)) { + break; + } resp = (struct sctp_stream_reset_response *)ph; seq = ntohl(resp->response_seq); result = ntohl(resp->result); @@ -4182,7 +4204,11 @@ strres_nochunk: break; } offset += SCTP_SIZE32(param_len); - chk_length -= SCTP_SIZE32(param_len); + if (remaining_length >= SCTP_SIZE32(param_len)) { + remaining_length -= SCTP_SIZE32(param_len); + } else { + remaining_length = 0; + } } if (num_req == 0) { /* we have no response free the stuff */ Modified: releng/10.1/sys/netinet/sctp_usrreq.c ============================================================================== --- releng/10.1/sys/netinet/sctp_usrreq.c Tue Jan 27 19:36:08 2015 (r277807) +++ releng/10.1/sys/netinet/sctp_usrreq.c Tue Jan 27 19:37:02 2015 (r277808) @@ -1854,8 +1854,9 @@ flags_out: SCTP_CHECK_AND_CAST(av, optval, struct sctp_stream_value, *optsize); SCTP_FIND_STCB(inp, stcb, av->assoc_id); if (stcb) { - if (stcb->asoc.ss_functions.sctp_ss_get_value(stcb, &stcb->asoc, &stcb->asoc.strmout[av->stream_id], - &av->stream_value) < 0) { + if ((av->stream_id >= stcb->asoc.streamoutcnt) || + (stcb->asoc.ss_functions.sctp_ss_get_value(stcb, &stcb->asoc, &stcb->asoc.strmout[av->stream_id], + &av->stream_value) < 0)) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); error = EINVAL; } else { @@ -3915,8 +3916,9 @@ sctp_setopt(struct socket *so, int optna SCTP_CHECK_AND_CAST(av, optval, struct sctp_stream_value, optsize); SCTP_FIND_STCB(inp, stcb, av->assoc_id); if (stcb) { - if (stcb->asoc.ss_functions.sctp_ss_set_value(stcb, &stcb->asoc, &stcb->asoc.strmout[av->stream_id], - av->stream_value) < 0) { + if ((av->stream_id >= stcb->asoc.streamoutcnt) || + (stcb->asoc.ss_functions.sctp_ss_set_value(stcb, &stcb->asoc, &stcb->asoc.strmout[av->stream_id], + av->stream_value) < 0)) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); error = EINVAL; } @@ -3926,10 +3928,12 @@ sctp_setopt(struct socket *so, int optna SCTP_INP_RLOCK(inp); LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) { SCTP_TCB_LOCK(stcb); - stcb->asoc.ss_functions.sctp_ss_set_value(stcb, - &stcb->asoc, - &stcb->asoc.strmout[av->stream_id], - av->stream_value); + if (av->stream_id < stcb->asoc.streamoutcnt) { + stcb->asoc.ss_functions.sctp_ss_set_value(stcb, + &stcb->asoc, + &stcb->asoc.strmout[av->stream_id], + av->stream_value); + } SCTP_TCB_UNLOCK(stcb); } SCTP_INP_RUNLOCK(inp); Modified: releng/8.4/UPDATING ============================================================================== --- releng/8.4/UPDATING Tue Jan 27 19:36:08 2015 (r277807) +++ releng/8.4/UPDATING Tue Jan 27 19:37:02 2015 (r277808) @@ -15,6 +15,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. debugging tools present in HEAD were left in place because sun4v support still needs work to become production ready. +20150127: p23 FreeBSD-SA-15:02.kmem + FreeBSD-SA-15:03.sctp + + Fix SCTP SCTP_SS_VALUE kernel memory corruption and disclosure + vulnerability. [SA-15:02] + + Fix SCTP stream reset vulnerability. [SA-15:03] + 20150114: p22 FreeBSD-SA-15:01.openssl Fix multiple vulnerabilities in OpenSSL. [SA-15:01] Modified: releng/8.4/sys/conf/newvers.sh ============================================================================== --- releng/8.4/sys/conf/newvers.sh Tue Jan 27 19:36:08 2015 (r277807) +++ releng/8.4/sys/conf/newvers.sh Tue Jan 27 19:37:02 2015 (r277808) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="8.4" -BRANCH="RELEASE-p22" +BRANCH="RELEASE-p23" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/8.4/sys/netinet/sctp_input.c ============================================================================== --- releng/8.4/sys/netinet/sctp_input.c Tue Jan 27 19:36:08 2015 (r277807) +++ releng/8.4/sys/netinet/sctp_input.c Tue Jan 27 19:37:02 2015 (r277808) @@ -3680,6 +3680,9 @@ sctp_handle_stream_reset_response(struct /* huh ? */ return (0); } + if (ntohs(respin->ph.param_length) < sizeof(struct sctp_stream_reset_response_tsn)) { + return (0); + } if (action == SCTP_STREAM_RESET_RESULT_PERFORMED) { resp = (struct sctp_stream_reset_response_tsn *)respin; asoc->stream_reset_outstanding--; @@ -4068,7 +4071,7 @@ __attribute__((noinline)) sctp_handle_stream_reset(struct sctp_tcb *stcb, struct mbuf *m, int offset, struct sctp_chunkhdr *ch_req) { - int chk_length, param_len, ptype; + uint16_t remaining_length, param_len, ptype; struct sctp_paramhdr pstore; uint8_t cstore[SCTP_CHUNK_BUFFER_SIZE]; uint32_t seq = 0; @@ -4081,7 +4084,7 @@ __attribute__((noinline)) int num_param = 0; /* now it may be a reset or a reset-response */ - chk_length = ntohs(ch_req->chunk_length); + remaining_length = ntohs(ch_req->chunk_length) - sizeof(struct sctp_chunkhdr); /* setup for adding the response */ sctp_alloc_a_chunk(stcb, chk); @@ -4117,20 +4120,27 @@ strres_nochunk: ch->chunk_length = htons(chk->send_size); SCTP_BUF_LEN(chk->data) = SCTP_SIZE32(chk->send_size); offset += sizeof(struct sctp_chunkhdr); - while ((size_t)chk_length >= sizeof(struct sctp_stream_reset_tsn_request)) { + while (remaining_length >= sizeof(struct sctp_paramhdr)) { ph = (struct sctp_paramhdr *)sctp_m_getptr(m, offset, sizeof(pstore), (uint8_t *) & pstore); - if (ph == NULL) + if (ph == NULL) { + /* TSNH */ break; + } param_len = ntohs(ph->param_length); - if (param_len < (int)sizeof(struct sctp_stream_reset_tsn_request)) { - /* bad param */ + if ((param_len > remaining_length) || + (param_len < (sizeof(struct sctp_paramhdr) + sizeof(uint32_t)))) { + /* bad parameter length */ break; } - ph = (struct sctp_paramhdr *)sctp_m_getptr(m, offset, min(param_len, (int)sizeof(cstore)), + ph = (struct sctp_paramhdr *)sctp_m_getptr(m, offset, min(param_len, sizeof(cstore)), (uint8_t *) & cstore); + if (ph == NULL) { + /* TSNH */ + break; + } ptype = ntohs(ph->param_type); num_param++; - if (param_len > (int)sizeof(cstore)) { + if (param_len > sizeof(cstore)) { trunc = 1; } else { trunc = 0; @@ -4142,6 +4152,9 @@ strres_nochunk: if (ptype == SCTP_STR_RESET_OUT_REQUEST) { struct sctp_stream_reset_out_request *req_out; + if (param_len < sizeof(struct sctp_stream_reset_out_request)) { + break; + } req_out = (struct sctp_stream_reset_out_request *)ph; num_req++; if (stcb->asoc.stream_reset_outstanding) { @@ -4155,12 +4168,18 @@ strres_nochunk: } else if (ptype == SCTP_STR_RESET_ADD_OUT_STREAMS) { struct sctp_stream_reset_add_strm *str_add; + if (param_len < sizeof(struct sctp_stream_reset_add_strm)) { + break; + } str_add = (struct sctp_stream_reset_add_strm *)ph; num_req++; sctp_handle_str_reset_add_strm(stcb, chk, str_add); } else if (ptype == SCTP_STR_RESET_ADD_IN_STREAMS) { struct sctp_stream_reset_add_strm *str_add; + if (param_len < sizeof(struct sctp_stream_reset_add_strm)) { + break; + } str_add = (struct sctp_stream_reset_add_strm *)ph; num_req++; sctp_handle_str_reset_add_out_strm(stcb, chk, str_add); @@ -4185,6 +4204,9 @@ strres_nochunk: struct sctp_stream_reset_response *resp; uint32_t result; + if (param_len < sizeof(struct sctp_stream_reset_response)) { + break; + } resp = (struct sctp_stream_reset_response *)ph; seq = ntohl(resp->response_seq); result = ntohl(resp->result); @@ -4196,7 +4218,11 @@ strres_nochunk: break; } offset += SCTP_SIZE32(param_len); - chk_length -= SCTP_SIZE32(param_len); + if (remaining_length >= SCTP_SIZE32(param_len)) { + remaining_length -= SCTP_SIZE32(param_len); + } else { + remaining_length = 0; + } } if (num_req == 0) { /* we have no response free the stuff */ Modified: releng/8.4/sys/netinet/sctp_usrreq.c ============================================================================== --- releng/8.4/sys/netinet/sctp_usrreq.c Tue Jan 27 19:36:08 2015 (r277807) +++ releng/8.4/sys/netinet/sctp_usrreq.c Tue Jan 27 19:37:02 2015 (r277808) @@ -1845,8 +1845,9 @@ flags_out: SCTP_CHECK_AND_CAST(av, optval, struct sctp_stream_value, *optsize); SCTP_FIND_STCB(inp, stcb, av->assoc_id); if (stcb) { - if (stcb->asoc.ss_functions.sctp_ss_get_value(stcb, &stcb->asoc, &stcb->asoc.strmout[av->stream_id], - &av->stream_value) < 0) { + if ((av->stream_id >= stcb->asoc.streamoutcnt) || + (stcb->asoc.ss_functions.sctp_ss_get_value(stcb, &stcb->asoc, &stcb->asoc.strmout[av->stream_id], + &av->stream_value) < 0)) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); error = EINVAL; } else { @@ -3640,8 +3641,9 @@ sctp_setopt(struct socket *so, int optna SCTP_CHECK_AND_CAST(av, optval, struct sctp_stream_value, optsize); SCTP_FIND_STCB(inp, stcb, av->assoc_id); if (stcb) { - if (stcb->asoc.ss_functions.sctp_ss_set_value(stcb, &stcb->asoc, &stcb->asoc.strmout[av->stream_id], - av->stream_value) < 0) { + if ((av->stream_id >= stcb->asoc.streamoutcnt) || + (stcb->asoc.ss_functions.sctp_ss_set_value(stcb, &stcb->asoc, &stcb->asoc.strmout[av->stream_id], + av->stream_value) < 0)) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); error = EINVAL; } @@ -3651,10 +3653,12 @@ sctp_setopt(struct socket *so, int optna SCTP_INP_RLOCK(inp); LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) { SCTP_TCB_LOCK(stcb); - stcb->asoc.ss_functions.sctp_ss_set_value(stcb, - &stcb->asoc, - &stcb->asoc.strmout[av->stream_id], - av->stream_value); + if (av->stream_id < stcb->asoc.streamoutcnt) { + stcb->asoc.ss_functions.sctp_ss_set_value(stcb, + &stcb->asoc, + &stcb->asoc.strmout[av->stream_id], + av->stream_value); + } SCTP_TCB_UNLOCK(stcb); } SCTP_INP_RUNLOCK(inp); Modified: releng/9.3/UPDATING ============================================================================== --- releng/9.3/UPDATING Tue Jan 27 19:36:08 2015 (r277807) +++ releng/9.3/UPDATING Tue Jan 27 19:37:02 2015 (r277808) @@ -11,6 +11,14 @@ handbook: Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before running portupgrade. +20150127: p9 FreeBSD-SA-15:02.kmem + FreeBSD-SA-15:03.sctp + + Fix SCTP SCTP_SS_VALUE kernel memory corruption and disclosure + vulnerability. [SA-15:02] + + Fix SCTP stream reset vulnerability. [SA-15:03] + 20150114: p8 FreeBSD-SA-15:01.openssl Fix multiple vulnerabilities in OpenSSL. [SA-15:01] Modified: releng/9.3/sys/conf/newvers.sh ============================================================================== --- releng/9.3/sys/conf/newvers.sh Tue Jan 27 19:36:08 2015 (r277807) +++ releng/9.3/sys/conf/newvers.sh Tue Jan 27 19:37:02 2015 (r277808) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="9.3" -BRANCH="RELEASE-p8" +BRANCH="RELEASE-p9" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/9.3/sys/netinet/sctp_input.c ============================================================================== --- releng/9.3/sys/netinet/sctp_input.c Tue Jan 27 19:36:08 2015 (r277807) +++ releng/9.3/sys/netinet/sctp_input.c Tue Jan 27 19:37:02 2015 (r277808) @@ -3662,6 +3662,9 @@ sctp_handle_stream_reset_response(struct /* huh ? */ return (0); } + if (ntohs(respin->ph.param_length) < sizeof(struct sctp_stream_reset_response_tsn)) { + return (0); + } if (action == SCTP_STREAM_RESET_RESULT_PERFORMED) { resp = (struct sctp_stream_reset_response_tsn *)respin; asoc->stream_reset_outstanding--; @@ -4050,7 +4053,7 @@ __attribute__((noinline)) sctp_handle_stream_reset(struct sctp_tcb *stcb, struct mbuf *m, int offset, struct sctp_chunkhdr *ch_req) { - int chk_length, param_len, ptype; + uint16_t remaining_length, param_len, ptype; struct sctp_paramhdr pstore; uint8_t cstore[SCTP_CHUNK_BUFFER_SIZE]; uint32_t seq = 0; @@ -4063,7 +4066,7 @@ __attribute__((noinline)) int num_param = 0; /* now it may be a reset or a reset-response */ - chk_length = ntohs(ch_req->chunk_length); + remaining_length = ntohs(ch_req->chunk_length) - sizeof(struct sctp_chunkhdr); /* setup for adding the response */ sctp_alloc_a_chunk(stcb, chk); @@ -4099,20 +4102,27 @@ strres_nochunk: ch->chunk_length = htons(chk->send_size); SCTP_BUF_LEN(chk->data) = SCTP_SIZE32(chk->send_size); offset += sizeof(struct sctp_chunkhdr); - while ((size_t)chk_length >= sizeof(struct sctp_stream_reset_tsn_request)) { + while (remaining_length >= sizeof(struct sctp_paramhdr)) { ph = (struct sctp_paramhdr *)sctp_m_getptr(m, offset, sizeof(pstore), (uint8_t *) & pstore); - if (ph == NULL) + if (ph == NULL) { + /* TSNH */ break; + } param_len = ntohs(ph->param_length); - if (param_len < (int)sizeof(struct sctp_stream_reset_tsn_request)) { - /* bad param */ + if ((param_len > remaining_length) || + (param_len < (sizeof(struct sctp_paramhdr) + sizeof(uint32_t)))) { + /* bad parameter length */ break; } - ph = (struct sctp_paramhdr *)sctp_m_getptr(m, offset, min(param_len, (int)sizeof(cstore)), + ph = (struct sctp_paramhdr *)sctp_m_getptr(m, offset, min(param_len, sizeof(cstore)), (uint8_t *) & cstore); + if (ph == NULL) { + /* TSNH */ + break; + } ptype = ntohs(ph->param_type); num_param++; - if (param_len > (int)sizeof(cstore)) { + if (param_len > sizeof(cstore)) { trunc = 1; } else { trunc = 0; @@ -4124,6 +4134,9 @@ strres_nochunk: if (ptype == SCTP_STR_RESET_OUT_REQUEST) { struct sctp_stream_reset_out_request *req_out; + if (param_len < sizeof(struct sctp_stream_reset_out_request)) { + break; + } req_out = (struct sctp_stream_reset_out_request *)ph; num_req++; if (stcb->asoc.stream_reset_outstanding) { @@ -4137,12 +4150,18 @@ strres_nochunk: } else if (ptype == SCTP_STR_RESET_ADD_OUT_STREAMS) { struct sctp_stream_reset_add_strm *str_add; + if (param_len < sizeof(struct sctp_stream_reset_add_strm)) { + break; + } str_add = (struct sctp_stream_reset_add_strm *)ph; num_req++; sctp_handle_str_reset_add_strm(stcb, chk, str_add); } else if (ptype == SCTP_STR_RESET_ADD_IN_STREAMS) { struct sctp_stream_reset_add_strm *str_add; + if (param_len < sizeof(struct sctp_stream_reset_add_strm)) { + break; + } str_add = (struct sctp_stream_reset_add_strm *)ph; num_req++; sctp_handle_str_reset_add_out_strm(stcb, chk, str_add); @@ -4167,6 +4186,9 @@ strres_nochunk: struct sctp_stream_reset_response *resp; uint32_t result; + if (param_len < sizeof(struct sctp_stream_reset_response)) { + break; + } resp = (struct sctp_stream_reset_response *)ph; seq = ntohl(resp->response_seq); result = ntohl(resp->result); @@ -4178,7 +4200,11 @@ strres_nochunk: break; } offset += SCTP_SIZE32(param_len); - chk_length -= SCTP_SIZE32(param_len); + if (remaining_length >= SCTP_SIZE32(param_len)) { + remaining_length -= SCTP_SIZE32(param_len); + } else { + remaining_length = 0; + } } if (num_req == 0) { /* we have no response free the stuff */ Modified: releng/9.3/sys/netinet/sctp_usrreq.c ============================================================================== --- releng/9.3/sys/netinet/sctp_usrreq.c Tue Jan 27 19:36:08 2015 (r277807) +++ releng/9.3/sys/netinet/sctp_usrreq.c Tue Jan 27 19:37:02 2015 (r277808) @@ -1854,8 +1854,9 @@ flags_out: SCTP_CHECK_AND_CAST(av, optval, struct sctp_stream_value, *optsize); SCTP_FIND_STCB(inp, stcb, av->assoc_id); if (stcb) { - if (stcb->asoc.ss_functions.sctp_ss_get_value(stcb, &stcb->asoc, &stcb->asoc.strmout[av->stream_id], - &av->stream_value) < 0) { + if ((av->stream_id >= stcb->asoc.streamoutcnt) || + (stcb->asoc.ss_functions.sctp_ss_get_value(stcb, &stcb->asoc, &stcb->asoc.strmout[av->stream_id], + &av->stream_value) < 0)) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); error = EINVAL; } else { @@ -3660,8 +3661,9 @@ sctp_setopt(struct socket *so, int optna SCTP_CHECK_AND_CAST(av, optval, struct sctp_stream_value, optsize); SCTP_FIND_STCB(inp, stcb, av->assoc_id); if (stcb) { - if (stcb->asoc.ss_functions.sctp_ss_set_value(stcb, &stcb->asoc, &stcb->asoc.strmout[av->stream_id], - av->stream_value) < 0) { + if ((av->stream_id >= stcb->asoc.streamoutcnt) || + (stcb->asoc.ss_functions.sctp_ss_set_value(stcb, &stcb->asoc, &stcb->asoc.strmout[av->stream_id], + av->stream_value) < 0)) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); error = EINVAL; } @@ -3671,10 +3673,12 @@ sctp_setopt(struct socket *so, int optna SCTP_INP_RLOCK(inp); LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) { SCTP_TCB_LOCK(stcb); - stcb->asoc.ss_functions.sctp_ss_set_value(stcb, - &stcb->asoc, - &stcb->asoc.strmout[av->stream_id], - av->stream_value); + if (av->stream_id < stcb->asoc.streamoutcnt) { + stcb->asoc.ss_functions.sctp_ss_set_value(stcb, + &stcb->asoc, + &stcb->asoc.strmout[av->stream_id], + av->stream_value); + } SCTP_TCB_UNLOCK(stcb); } SCTP_INP_RUNLOCK(inp); From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 19:41:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B105661F; Tue, 27 Jan 2015 19:41:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C838C04; Tue, 27 Jan 2015 19:41:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0RJfPa3017481; Tue, 27 Jan 2015 19:41:25 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0RJfPKm017480; Tue, 27 Jan 2015 19:41:25 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201501271941.t0RJfPKm017480@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 27 Jan 2015 19:41:25 +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: r277810 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 19:41:25 -0000 Author: mav Date: Tue Jan 27 19:41:24 2015 New Revision: 277810 URL: https://svnweb.freebsd.org/changeset/base/277810 Log: MFC r277647: Fix wrong LUN reference in XCOPY block-to-block operation. This could cause data corruption due to accessing wrong LUN in case of retries on write errors. Failed writes were retried to read LUN. Modified: stable/10/sys/cam/ctl/ctl_tpc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_tpc.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_tpc.c Tue Jan 27 19:40:08 2015 (r277809) +++ stable/10/sys/cam/ctl/ctl_tpc.c Tue Jan 27 19:41:24 2015 (r277810) @@ -916,7 +916,7 @@ tpc_process_b2b(struct tpc_list *list) /*control*/ 0); tiow->io->io_hdr.retries = 3; tiow->lun = dl; - tiow->io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = tior; + tiow->io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = tiow; TAILQ_INSERT_TAIL(&tior->run, tiow, rlinks); TAILQ_INSERT_TAIL(prun, tior, rlinks); From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 19:46:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7EE9B87E; Tue, 27 Jan 2015 19:46:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B1B7C30; Tue, 27 Jan 2015 19:46:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0RJkKT3020484; Tue, 27 Jan 2015 19:46:20 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0RJkKlC020483; Tue, 27 Jan 2015 19:46:20 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501271946.t0RJkKlC020483@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 27 Jan 2015 19:46:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277811 - head/usr.bin/sed X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 19:46:20 -0000 Author: pfg Date: Tue Jan 27 19:46:19 2015 New Revision: 277811 URL: https://svnweb.freebsd.org/changeset/base/277811 Log: sed: fix pasto from previous r277802. MFC after: 3 days Modified: head/usr.bin/sed/main.c Modified: head/usr.bin/sed/main.c ============================================================================== --- head/usr.bin/sed/main.c Tue Jan 27 19:41:24 2015 (r277810) +++ head/usr.bin/sed/main.c Tue Jan 27 19:46:19 2015 (r277811) @@ -409,10 +409,10 @@ mf_fgets(SPACE *sp, enum e_spflag spflag if (len >= (ssize_t)sizeof(tmpfname)) errx(1, "%s: name too long", fname); unlink(tmpfname); - if ((outfile = fopen(tmpfname, "w")) == NULL) - err(1, "%s", fname); if (outfile != NULL && outfile != stdout) fclose(outfile); + if ((outfile = fopen(tmpfname, "w")) == NULL) + err(1, "%s", fname); fchown(fileno(outfile), sb.st_uid, sb.st_gid); fchmod(fileno(outfile), sb.st_mode & ALLPERMS); outfname = tmpfname; From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 20:48:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1DC41EB9; Tue, 27 Jan 2015 20:48:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 095E988A; Tue, 27 Jan 2015 20:48:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0RKm5Lk050151; Tue, 27 Jan 2015 20:48:05 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0RKm5fn050150; Tue, 27 Jan 2015 20:48:05 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501272048.t0RKm5fn050150@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 27 Jan 2015 20:48:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277814 - head/contrib/amd/amd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 20:48:06 -0000 Author: pfg Date: Tue Jan 27 20:48:05 2015 New Revision: 277814 URL: https://svnweb.freebsd.org/changeset/base/277814 Log: amd: Add extra check for NULL before deref. CID: 274421 Obtained from: NetBSD MFC after: 5 days Modified: head/contrib/amd/amd/amfs_generic.c Modified: head/contrib/amd/amd/amfs_generic.c ============================================================================== --- head/contrib/amd/amd/amfs_generic.c Tue Jan 27 20:00:55 2015 (r277813) +++ head/contrib/amd/amd/amfs_generic.c Tue Jan 27 20:48:05 2015 (r277814) @@ -1113,7 +1113,7 @@ amfs_generic_mount_child(am_node *new_mp new_mp->am_transp = (SVCXPRT *) xmalloc(sizeof(SVCXPRT)); *(new_mp->am_transp) = *current_transp; } - if (error && (new_mp->am_mnt->mf_ops == &amfs_error_ops)) + if (error && new_mp->am_mnt && (new_mp->am_mnt->mf_ops == &amfs_error_ops)) new_mp->am_error = error; if (new_mp->am_error > 0) From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 21:30:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 52411E4C; Tue, 27 Jan 2015 21:30:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E537DB5; Tue, 27 Jan 2015 21:30:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0RLUP7V075268; Tue, 27 Jan 2015 21:30:25 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0RLUPXb075267; Tue, 27 Jan 2015 21:30:25 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201501272130.t0RLUPXb075267@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 27 Jan 2015 21:30:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277815 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 21:30:25 -0000 Author: tuexen Date: Tue Jan 27 21:30:24 2015 New Revision: 277815 URL: https://svnweb.freebsd.org/changeset/base/277815 Log: Whitespace change. Modified: head/sys/netinet/sctp_usrreq.c Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Tue Jan 27 20:48:05 2015 (r277814) +++ head/sys/netinet/sctp_usrreq.c Tue Jan 27 21:30:24 2015 (r277815) @@ -4054,7 +4054,6 @@ sctp_setopt(struct socket *so, int optna SCTP_TCB_UNLOCK(stcb); } SCTP_INP_RUNLOCK(inp); - } else { /* * Can't set stream value without From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 22:36:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 15C373CB; Tue, 27 Jan 2015 22:36:33 +0000 (UTC) Received: from frv27.fwdcdn.com (frv158.fwdcdn.com [212.42.77.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7AD76D1; Tue, 27 Jan 2015 22:36:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ukr.net; s=fsm; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date; bh=A7lkegICjNaeOnfC0WOV9BJ8t1P6fqp/fg96zpXR/U0=; b=XwbXcsPM1l9zPbsFaX4knZykCpEycKkPull/xXNNQQ/fiM8VPCS+BjOp//Qa3DrJqQ3Ps+hQU8zJBnKffoCrD9E4MQN2GXLE9ss4QBvyAf6TboS86p3aDKMMi3DkA8MKclsDMhGXdatI50dilVP0mvqkTl/SDXRDTtZrAjQxzr0=; Received: from [5.248.240.69] (helo=nonamehost.local) by frv27.fwdcdn.com with esmtpsa ID 1YGEkC-000KbG-HF ; Wed, 28 Jan 2015 00:36:24 +0200 Date: Wed, 28 Jan 2015 00:36:23 +0200 From: Ivan Klymenko To: Andriy Gapon Subject: Re: svn commit: r277796 - in head/sys: dev/acpica dev/syscons dev/vt sys Message-ID: <20150128003623.4f843a5c@nonamehost.local> In-Reply-To: <201501271733.t0RHXJ3M058422@svn.freebsd.org> References: <201501271733.t0RHXJ3M058422@svn.freebsd.org> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Authentication-Result: IP=5.248.240.69; mail.from=fidaj@ukr.net; dkim=pass; header.d=ukr.net Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 22:36:33 -0000 =D0=92 Tue, 27 Jan 2015 17:33:19 +0000 (UTC) Andriy Gapon =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > Author: avg > Date: Tue Jan 27 17:33:18 2015 > New Revision: 277796 > URL: https://svnweb.freebsd.org/changeset/base/277796 >=20 > Log: > hook userland threads suspend + resume into acpi suspend code > =20 > Also, split power_suspend into power_suspend and > power_suspend_early.=20 > power_suspend_early is called before the userland is frozen. > power_suspend is called after the userland is frozen. > =20 > Currently only VT switching is hooked to power_suspend_early. > This is needed because switching away from X server requires its > cooperation, so obviously X server must not be frozen when that > happens.=20 > Freezing userland during ACPI suspend is useful because not all > drivers correctly handle suspension concurrent with other activity. > This is especially applicable to drivers ported from other operating > systems that suspend all software activity between placing drivers > and hardware into suspended state. > In particular drm2/radeon (radeonkms) depends on the described > procedure. The driver does not have any internal synchronization > between suspension activities and processing of userland requests. > =20 > Many thanks to kib for the code that allows to freeze and thaw all > userland threads. > =20 > Note that ideally we also need to park / inhibit (non-special) > kernel threads as well to ensure that they do not call into drivers. > =20 > MFC after: 17 days >=20 Thank you for your work! acpiconf -s 3 works perfectly, but there is one problem. I use not the main timecounter kern.timecounter.hardware=3DHPET after turning on the power button does not occur laptop recovery hdac0 and it is likely that the same applies to the timer. Indirect evidence of this - it's a quick video playback, for example in flash on YouTube. dmesg_first : http://pastebin.com/a4gC5PGy dmesg_afterS3 : http://pastebin.com/vyHtrakZ my HW: pciconf -lvbce : https://bz-attachments.freebsd.org/attachment.cgi?id=3D148947 devinfo -vr : https://bz-attachments.freebsd.org/attachment.cgi?id=3D148948 Thanks. From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 22:37:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 65E9750F; Tue, 27 Jan 2015 22:37:06 +0000 (UTC) Received: from mail-ie0-x236.google.com (mail-ie0-x236.google.com [IPv6:2607:f8b0:4001:c03::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2DAD66DD; Tue, 27 Jan 2015 22:37:06 +0000 (UTC) Received: by mail-ie0-f182.google.com with SMTP id ar1so18257980iec.13; Tue, 27 Jan 2015 14:37:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Yp+K26Q+yLgVSGHMLM5+YtFet8LIQAE0/PYc0H5GQs8=; b=M/FeDIm3Hu5oPXHcjZkQ6647z3EiI+ncq7bm31xhb7eqBDRmKpNAHajDN9LAn24/Es NwpCF9KKxgr3iFdsrfXUGBj3aM0u3R1gE8dSgCWXrF8+Ybv5xGevD08/TWH2CD11HRl6 d+vD14EOFCQoaaELAS4vos3soebl9JZtafSEYRqqwtO8Bk2pp8Bc1hZGdpE++gUnMkIG COdhkKw66lni8QigmIY+YSokzhHQI2jpl0vuN+lRrT0YExae5iONQTcrZFyOutgqVM9f o7RqxImPeMyhPhn4Nl4FTPbd+EfG/hjZRZUH86sbtBwHbzcK313eiN+b76RCpToc9WSC l++A== MIME-Version: 1.0 X-Received: by 10.50.107.7 with SMTP id gy7mr208057igb.49.1422398225667; Tue, 27 Jan 2015 14:37:05 -0800 (PST) Received: by 10.50.182.233 with HTTP; Tue, 27 Jan 2015 14:37:05 -0800 (PST) In-Reply-To: <201501271804.t0RI4fbv072693@svn.freebsd.org> References: <201501271804.t0RI4fbv072693@svn.freebsd.org> Date: Tue, 27 Jan 2015 14:37:05 -0800 Message-ID: Subject: Re: svn commit: r277798 - head/bin/expr From: NGie Cooper To: Stefan Esser Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 22:37:06 -0000 On Tue, Jan 27, 2015 at 10:04 AM, Stefan Esser wrote: > Author: se > Date: Tue Jan 27 18:04:41 2015 > New Revision: 277798 > URL: https://svnweb.freebsd.org/changeset/base/277798 > > Log: > Fix overflow check for multiplication: > - Add special test to detect the case of -1 * INTMAX_MIN > - Protect against elimination of the test division by the optimizer > > Garrett Cooper noticed that the overflow checks were incomplete, and Bruce > Evans suggested the use of the "volatile" qualifier to counter the effect > of the undefined behaviour, when the prior multiplication caused overflow, > and he also suggested improvements to the comments. > > Reviewed by: bde > MFC after: 1 week Thank you bde and se for all your hard work and discussion in resolving this issue!! It was really awesome watching the discussion back and forth :). From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 23:06:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 20C9BD50 for ; Tue, 27 Jan 2015 23:06:21 +0000 (UTC) Received: from mail-pa0-f43.google.com (mail-pa0-f43.google.com [209.85.220.43]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E5EBCA40 for ; Tue, 27 Jan 2015 23:06:20 +0000 (UTC) Received: by mail-pa0-f43.google.com with SMTP id eu11so21425803pac.2 for ; Tue, 27 Jan 2015 15:06:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=SEV7yprQkNJlJ2paefNBTcLCp83iTuQS/YFGskiN9wE=; b=HAeq5k/jOvYadKtmCsMRyWsrt7vdef8tqaQeMj43vcc6oyd9d5MRcpcraYMN8SvlOw Xt5u+Wwdaz6yk1x2S8kjJ0nWxFNUVvlLpbLs3qg/ff7S/I9QrtQSr9GECdkCdiTm99Df /UixbVlPjSZRyN8C4oIgAGecxgejkdwdTKCO+SYUjrHOvaUcVEOmgbYeQAgscBZQMXnr Rzz3br4jKHxdypHt2Vx74XRyqxORwIFyN9fdV+O/p1M2Gd4ZU61sr4oMYHBvwziVwyBm NknGvP5CqYB5HVArcAIKE36Suq6R+jI7t0kOxceR/hHoJz7Pat7OJahvCtrrbb/tpxWu LdKQ== X-Gm-Message-State: ALoCoQl+BhrCU9SaqE8ub54ibcHa1C42VJ4e4KffGiaDajQJz769kMNmfYehDc0nPsJqV0Wr1OEL X-Received: by 10.68.135.37 with SMTP id pp5mr588987pbb.15.1422399974539; Tue, 27 Jan 2015 15:06:14 -0800 (PST) Received: from [10.64.24.223] ([69.53.236.236]) by mx.google.com with ESMTPSA id ni10sm2643080pbc.51.2015.01.27.15.06.13 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 27 Jan 2015 15:06:14 -0800 (PST) Sender: Warner Losh Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r277681 - in head/sys: conf modules From: Warner Losh In-Reply-To: <5CC0EF20-0DDC-4082-BD2A-5DD64822B03D@gmail.com> Date: Tue, 27 Jan 2015 16:06:11 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <1080CE66-04D2-4EB4-9A31-CC130F447FCF@bsdimp.com> References: <201501250513.t0P5DGoc033955@svn.freebsd.org> <0CF820AF-D73D-4CE8-BE5B-C4EBE5A9EFDA@bsdimp.com> <5CC0EF20-0DDC-4082-BD2A-5DD64822B03D@gmail.com> To: Garrett Cooper X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Garrett Cooper X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 23:06:21 -0000 > On Jan 26, 2015, at 7:30 PM, Garrett Cooper = wrote: >=20 > On Jan 25, 2015, at 9:46, Warner Losh wrote: >=20 >> The number of MK_foo opts that are intruding into the kernel module = builds is >> starting to get out of hand. :( Especially since they are duplicative = of the >> MODULES_OVERRIDE functionality and are very unevenly applied. >=20 > I don=92t really like it either to be honest, but the problem is that = building MK_CUSE =3D=3D no (for instance) should produce a working = default set of SUBDIRs so both the kernel and userland infrastructure = are compiled with the build. Telling someone to use MODULES_OVERRIDE to = just remove cuse (for instance), is a user unfriendly system.. >=20 > If there was a way to pick up a subset of src.opts.mk though and apply = it to kern.opts.mk, I would be incredibly keen on making that change. There isn=92t. That=92s the problem with the current setup. It isn=92t = always clear to me that if you disable the user land side you = necessarily want to disable the kernel side, but it is the best = indication we have. Warner From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 23:31:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 631BB34E; Tue, 27 Jan 2015 23:31:29 +0000 (UTC) Received: from cyrus.watson.org (cyrus.watson.org [198.74.231.69]) by mx1.freebsd.org (Postfix) with ESMTP id 3B978CFE; Tue, 27 Jan 2015 23:31:29 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [198.74.231.63]) by cyrus.watson.org (Postfix) with ESMTPS id 59CB546B8C; Tue, 27 Jan 2015 18:31:28 -0500 (EST) Date: Tue, 27 Jan 2015 23:31:28 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Bruce Evans Subject: Re: svn commit: r277652 - in head/usr.sbin/pw: . tests In-Reply-To: <20150125155254.V1007@besplex.bde.org> Message-ID: References: <201501241913.t0OJD4xT039188@svn.freebsd.org> <20150125155254.V1007@besplex.bde.org> User-Agent: Alpine 2.11 (BSF 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, Baptiste Daroussin , src-committers@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 23:31:29 -0000 On Sun, 25 Jan 2015, Bruce Evans wrote: > Negative ids have historical abuses in places like mountd. mountd still > hard-codes -2 and -2 for the default uid and gid of an unprivileged user. It > at least casts these values to uid_t and gid_t before using them. This gives > the ids the non-random values of UINT32_MAX-1 if uid_t and gid_t are > uint32_t. (If uid_t and gid_t were signed, then it would leave the values > as negative, so invalid.) These magic values may work better than when ids > were 16 bits, since there is less risk of them conflicting with a normal id. > However, the non-conflict is probably a bug. FreeBSD uses the magic ids of > 65534 for user nobody: group nobody. These would have been (id_t)-2 with > 16-bit ids. They no longer match, so ls displays (id_t)-2 numerically. > FreeBSD also has a group nogroup = 65553 that doesn't match the nfs usage. > However2, in FreeBSD-1 wher ids were 16-bits, nobody was 32767 and nogroup > was 32766. so they didn't match nfs for other reasons. The 2 non-groups now > seem to be just a bug -- FreeBSD-1 didn't have group nobody. 4.4BSD-Lite2 > has the same values as FreeBSD-1. I'm sure it goes without saying, but for those that don't know (i.e., some subset of people who are not Bruce): (-1) has a defined value both for our system-call interface (chown(2), fchown(2), etc, use (-1) to indicate that no change is requested). This is also used inside the kernel to similar end, where VNOVAL also takes on a value of (-1). This problem also used to exist in NFS, where in NFSv2, (-1) was also used to indicate which fields not to update, but this was fixed in NFSv3 by introducing discriminated unions. I personally find myself a fan of fixing (eliminating) VNOVAL, but in the end it would likely just be disruptive and confusing. Robert From owner-svn-src-all@FreeBSD.ORG Tue Jan 27 23:44:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6D10660E; Tue, 27 Jan 2015 23:44:25 +0000 (UTC) Received: from mail-wi0-x229.google.com (mail-wi0-x229.google.com [IPv6:2a00:1450:400c:c05::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 11409E0B; Tue, 27 Jan 2015 23:44:25 +0000 (UTC) Received: by mail-wi0-f169.google.com with SMTP id h11so5663446wiw.0; Tue, 27 Jan 2015 15:44:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=E31Rtm8mNfH3k8o2njjK5Tqtb6lqqtkO+KAEJbV4pyk=; b=SEWDzAwzJjGb6N3igrwyq/ATzaUtquDHwyibbAGyY96Zkgyk5rfz900MH4GTHHMm4s LeTgACH6r2dhI7ltNwM7bHPKSKfei0FSL1PvyZOjU/OPJHvqHoaOMMmFz0bkvLmk1SQ5 tmJwWF/ZxfdhOTLJuh+cugtp6Gqxr/+Z7VQmT6sC7tSLpAX1E7Gc3x7FFUR7WCpK0YJX kqlbQU01A5rHAUpv5XW90ELqzejO00k0wVDytRdEtv4xhcDwhy3Mc1gJNFvmQiDIgm8u p4oHZqov8gy8vRURdICGkaDCIu68PTr62W0RkmmvdtWaJoWTAr9K9IfCCJdrLtPyvroF 7sKA== X-Received: by 10.194.24.195 with SMTP id w3mr777020wjf.135.1422402263017; Tue, 27 Jan 2015 15:44:23 -0800 (PST) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id ud9sm497670wib.5.2015.01.27.15.44.21 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Jan 2015 15:44:22 -0800 (PST) Sender: Baptiste Daroussin Date: Wed, 28 Jan 2015 00:44:20 +0100 From: Baptiste Daroussin To: Devin Teske Subject: Re: svn commit: r277652 - in head/usr.sbin/pw: . tests Message-ID: <20150127234420.GB84622@ivaldir.etoilebsd.net> References: <201501241913.t0OJD4xT039188@svn.freebsd.org> <20150125155254.V1007@besplex.bde.org> <20150125142148.GA76051@zxy.spb.ru> <20150126014336.P2572@besplex.bde.org> <5D58B34B-8647-4B69-8D90-E7D37C98D4AD@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="f0KYrhQ4vYSV2aJu" Content-Disposition: inline In-Reply-To: <5D58B34B-8647-4B69-8D90-E7D37C98D4AD@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bruce Evans , Slawa Olhovchenkov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 23:44:25 -0000 --f0KYrhQ4vYSV2aJu Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 26, 2015 at 01:20:28PM -0800, Devin Teske wrote: >=20 > > On Jan 25, 2015, at 7:31 AM, Bruce Evans wrote: > >=20 > > On Sun, 25 Jan 2015, Slawa Olhovchenkov wrote: > >=20 > >> On Sun, Jan 25, 2015 at 04:56:24PM +1100, Bruce Evans wrote: > >>=20 > >>> Negative ids have historical abuses in places like mountd. >=20 > Which paves the way for the =E2=80=9Caccepted practice=E2=80=9D argument > and backed up by =E2=80=9Cin-the-field usage=E2=80=9D statement(s). >=20 >=20 >=20 > >>> mountd still > >>> hard-codes -2 and -2 for the default uid and gid of an unprivileged u= ser. > >>> It at least casts these values to uid_t and gid_t before using them. > >>> This gives the ids the non-random values of UINT32_MAX-1 if uid_t and > >>> gid_t are uint32_t. (If uid_t and gid_t were signed, then it would > >>> leave the values as negative, so invalid.) These magic values may wo= rk > >>> better than when ids were 16 bits, since there is less risk of them > >>> conflicting with a normal id. However, the non-conflict is probably > >>> a bug. FreeBSD uses the magic ids of 65534 for user nobody: group > >>> nobody. These would have been (id_t)-2 with 16-bit ids. They no > >>> longer match, so ls displays (id_t)-2 numerically. FreeBSD also has > >>> a group nogroup =3D 65553 that doesn't match the nfs usage. However2, > >>> in FreeBSD-1 wher ids were 16-bits, nobody was 32767 and nogroup was > >>> 32766. so they didn't match nfs for other reasons. The 2 non-groups > >>> now seem to be just a bug -- FreeBSD-1 didn't have group nobody. > >>> 4.4BSD-Lite2 has the same values as FreeBSD-1. > >>=20 > >> This is not full true for ZFS case. > >> On ZFS nobody is 2^32-2. > >=20 > > File systems don't get to decide this. >=20 > +1 (and thanks for the historical account, bruce =E2=80=94 sincerely) >=20 > However, I still want to make the argument that: >=20 > a. Because we=E2=80=99ve supported mapping negative inputs to unsigned va= lues in pw *for over a decade*, that=E2=80=A6 >=20 > b. We should either revert or make a relnotes submission to note that we= =E2=80=99re changing the long-standing accepted practice. >=20 > Changing the accepted practice broke code internally, it would have likel= y broken some external code as well =E2=80=94 and people deserve to know ab= out said change else we should continue to support accepted practice that i= s decade(s) old. It has never been accepted by pw(8) it was just not checked as a result it = was accepting *anything* and passed it unchecked directly to atoi(3) resulting = in for example pw groupdel -u plop removing wheel... or pw userdel -u something trying to delete root. (was this an accepted behaviour for a decade as well= ?) Regards, Bapt --f0KYrhQ4vYSV2aJu Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlTIItMACgkQ8kTtMUmk6ExVwwCdE5V/XAfKZ3K6u9iGm4EUBVmX nYUAoKkQoztNiDHI7ipKwqAzTYZKTV6/ =kC0r -----END PGP SIGNATURE----- --f0KYrhQ4vYSV2aJu-- From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 00:08:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A5A7AE3C; Wed, 28 Jan 2015 00:08:30 +0000 (UTC) Received: from shxd.cx (unknown [64.201.244.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 8C81E7F; Wed, 28 Jan 2015 00:08:30 +0000 (UTC) Received: from 50-196-156-133-static.hfc.comcastbusiness.net ([50.196.156.133]:58960 helo=tinkerbell.pixel8networks.com) by shxd.cx with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1YFcM6-000Pr2-Dt; Sun, 25 Jan 2015 21:36:58 -0800 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.0 \(1990.1\)) Subject: Re: svn commit: r277652 - in head/usr.sbin/pw: . tests From: Devin Teske In-Reply-To: <20150127234420.GB84622@ivaldir.etoilebsd.net> Date: Tue, 27 Jan 2015 16:08:28 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201501241913.t0OJD4xT039188@svn.freebsd.org> <20150125155254.V1007@besplex.bde.org> <20150125142148.GA76051@zxy.spb.ru> <20150126014336.P2572@besplex.bde.org> <5D58B34B-8647-4B69-8D90-E7D37C98D4AD@FreeBSD.org> <20150127234420.GB84622@ivaldir.etoilebsd.net> To: Baptiste Daroussin X-Mailer: Apple Mail (2.1990.1) Sender: devin@shxd.cx Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, Bruce Evans , Slawa Olhovchenkov , svn-src-head@freebsd.org, Devin Teske X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 00:08:30 -0000 > On Jan 27, 2015, at 3:44 PM, Baptiste Daroussin = wrote: >=20 > On Mon, Jan 26, 2015 at 01:20:28PM -0800, Devin Teske wrote: >>=20 >>> On Jan 25, 2015, at 7:31 AM, Bruce Evans = wrote: >>>=20 >>> On Sun, 25 Jan 2015, Slawa Olhovchenkov wrote: >>>=20 >>>> On Sun, Jan 25, 2015 at 04:56:24PM +1100, Bruce Evans wrote: >>>>=20 >>>>> Negative ids have historical abuses in places like mountd. >>=20 >> Which paves the way for the =E2=80=9Caccepted practice=E2=80=9D = argument >> and backed up by =E2=80=9Cin-the-field usage=E2=80=9D statement(s). >>=20 >>=20 >>=20 >>>>> mountd still >>>>> hard-codes -2 and -2 for the default uid and gid of an = unprivileged user. >>>>> It at least casts these values to uid_t and gid_t before using = them. >>>>> This gives the ids the non-random values of UINT32_MAX-1 if uid_t = and >>>>> gid_t are uint32_t. (If uid_t and gid_t were signed, then it = would >>>>> leave the values as negative, so invalid.) These magic values may = work >>>>> better than when ids were 16 bits, since there is less risk of = them >>>>> conflicting with a normal id. However, the non-conflict is = probably >>>>> a bug. FreeBSD uses the magic ids of 65534 for user nobody: group >>>>> nobody. These would have been (id_t)-2 with 16-bit ids. They no >>>>> longer match, so ls displays (id_t)-2 numerically. FreeBSD also = has >>>>> a group nogroup =3D 65553 that doesn't match the nfs usage. = However2, >>>>> in FreeBSD-1 wher ids were 16-bits, nobody was 32767 and nogroup = was >>>>> 32766. so they didn't match nfs for other reasons. The 2 = non-groups >>>>> now seem to be just a bug -- FreeBSD-1 didn't have group nobody. >>>>> 4.4BSD-Lite2 has the same values as FreeBSD-1. >>>>=20 >>>> This is not full true for ZFS case. >>>> On ZFS nobody is 2^32-2. >>>=20 >>> File systems don't get to decide this. >>=20 >> +1 (and thanks for the historical account, bruce =E2=80=94 sincerely) >>=20 >> However, I still want to make the argument that: >>=20 >> a. Because we=E2=80=99ve supported mapping negative inputs to = unsigned values in pw *for over a decade*, that=E2=80=A6 >>=20 >> b. We should either revert or make a relnotes submission to note that = we=E2=80=99re changing the long-standing accepted practice. >>=20 >> Changing the accepted practice broke code internally, it would have = likely broken some external code as well =E2=80=94 and people deserve to = know about said change else we should continue to support accepted = practice that is decade(s) old. >=20 > It has never been accepted by pw(8) it was just not checked Those are indistinguishable from each other by an end-user (someone not reading the code; and even still there is the =E2=80=9Cspirit=E2=80=9D = of the code and the =E2=80=9Cletter of the code"). > as a result it was > accepting *anything* and passed it unchecked directly to atoi(3) = resulting in > for example pw groupdel -u plop removing wheel... or pw userdel -u = something > trying to delete root. (was this an accepted behaviour for a decade as = well?) >=20 The erroneous deletion was inherently wrong. I do not want to see that = bug resurface (and I thank you very much for fixing it). However, I=E2=80=99m sure you know that said erroneous deletion was a = side-effect of lacking error-checks. Again, thank you fixing the PR itemizing the erroneous deletion of = users/groups. Please note that Bruce sent me a private e-mail with some historical = background, to which I replied and we=E2=80=99re working out some logic on the side. = There shouldn=E2=80=99t be much more to this thread =E2=80=94 I envision that we=E2=80=99ll be = approaching a solid agree- meant that should lead to some commits (can=E2=80=99t say yet what = direction it will go as I=E2=80=99m looking forward to Bruce=E2=80=99s touch-points). =E2=80=94=20 Devin= From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 00:35:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CF3D861B; Wed, 28 Jan 2015 00:35:47 +0000 (UTC) Received: from mail-wi0-x229.google.com (mail-wi0-x229.google.com [IPv6:2a00:1450:400c:c05::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5DCD5381; Wed, 28 Jan 2015 00:35:47 +0000 (UTC) Received: by mail-wi0-f169.google.com with SMTP id h11so5811549wiw.0; Tue, 27 Jan 2015 16:35:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=ZoTDrEFMtj83Ln7+NquW2141+F/B6q041RyL8BVMBxM=; b=qwu7hhLySrFscyGE4vBlwUrhGaffic/rr/hWZGPwY8vVM7A/skgQO0mIDSeduf/+CK YHCQkpP9qBVNceCorCZ1tcanC0LzZEWidJFluAvE4aLLlQI+BtjISN3ZUnoXfByAGK0+ A6d0YMH/65Lmti4VqHunnFj4CM2ZiIoDeAe8GV6Xkxh+LwLUEEFQckeaX5aG41s/+/// uOC04YUYtDm1n82QxaRvAZ/wU6smAfZJhGvlVdSruBoKAZ8kEMw3jFpqUwTI9JgbV1wI 8ubINIOqd4H92VGHueQhEWVAFP3tnlKnl569HVm+4jMK9idu1fdAA3YUoiEPLPa0Vq0Z OkEg== X-Received: by 10.181.12.112 with SMTP id ep16mr1542058wid.38.1422405345870; Tue, 27 Jan 2015 16:35:45 -0800 (PST) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id ej10sm20243066wib.1.2015.01.27.16.35.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Jan 2015 16:35:45 -0800 (PST) Sender: Baptiste Daroussin Date: Wed, 28 Jan 2015 01:35:42 +0100 From: Baptiste Daroussin To: Devin Teske Subject: Re: svn commit: r277652 - in head/usr.sbin/pw: . tests Message-ID: <20150128003542.GC84622@ivaldir.etoilebsd.net> References: <201501241913.t0OJD4xT039188@svn.freebsd.org> <20150125155254.V1007@besplex.bde.org> <20150125142148.GA76051@zxy.spb.ru> <20150126014336.P2572@besplex.bde.org> <5D58B34B-8647-4B69-8D90-E7D37C98D4AD@FreeBSD.org> <20150127234420.GB84622@ivaldir.etoilebsd.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/3yNEOqWowh/8j+e" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bruce Evans , Slawa Olhovchenkov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 00:35:48 -0000 --/3yNEOqWowh/8j+e Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jan 27, 2015 at 04:08:28PM -0800, Devin Teske wrote: >=20 > > On Jan 27, 2015, at 3:44 PM, Baptiste Daroussin wrot= e: > >=20 > > On Mon, Jan 26, 2015 at 01:20:28PM -0800, Devin Teske wrote: > >>=20 > >>> On Jan 25, 2015, at 7:31 AM, Bruce Evans wrote: > >>>=20 > >>> On Sun, 25 Jan 2015, Slawa Olhovchenkov wrote: > >>>=20 > >>>> On Sun, Jan 25, 2015 at 04:56:24PM +1100, Bruce Evans wrote: > >>>>=20 > >>>>> Negative ids have historical abuses in places like mountd. > >>=20 > >> Which paves the way for the =E2=80=9Caccepted practice=E2=80=9D argume= nt > >> and backed up by =E2=80=9Cin-the-field usage=E2=80=9D statement(s). > >>=20 > >>=20 > >>=20 > >>>>> mountd still > >>>>> hard-codes -2 and -2 for the default uid and gid of an unprivileged= user. > >>>>> It at least casts these values to uid_t and gid_t before using them. > >>>>> This gives the ids the non-random values of UINT32_MAX-1 if uid_t a= nd > >>>>> gid_t are uint32_t. (If uid_t and gid_t were signed, then it would > >>>>> leave the values as negative, so invalid.) These magic values may = work > >>>>> better than when ids were 16 bits, since there is less risk of them > >>>>> conflicting with a normal id. However, the non-conflict is probably > >>>>> a bug. FreeBSD uses the magic ids of 65534 for user nobody: group > >>>>> nobody. These would have been (id_t)-2 with 16-bit ids. They no > >>>>> longer match, so ls displays (id_t)-2 numerically. FreeBSD also has > >>>>> a group nogroup =3D 65553 that doesn't match the nfs usage. Howeve= r2, > >>>>> in FreeBSD-1 wher ids were 16-bits, nobody was 32767 and nogroup was > >>>>> 32766. so they didn't match nfs for other reasons. The 2 non-groups > >>>>> now seem to be just a bug -- FreeBSD-1 didn't have group nobody. > >>>>> 4.4BSD-Lite2 has the same values as FreeBSD-1. > >>>>=20 > >>>> This is not full true for ZFS case. > >>>> On ZFS nobody is 2^32-2. > >>>=20 > >>> File systems don't get to decide this. > >>=20 > >> +1 (and thanks for the historical account, bruce =E2=80=94 sincerely) > >>=20 > >> However, I still want to make the argument that: > >>=20 > >> a. Because we=E2=80=99ve supported mapping negative inputs to unsigned= values in pw *for over a decade*, that=E2=80=A6 > >>=20 > >> b. We should either revert or make a relnotes submission to note that = we=E2=80=99re changing the long-standing accepted practice. > >>=20 > >> Changing the accepted practice broke code internally, it would have li= kely broken some external code as well =E2=80=94 and people deserve to know= about said change else we should continue to support accepted practice tha= t is decade(s) old. > >=20 > > It has never been accepted by pw(8) it was just not checked >=20 > Those are indistinguishable from each other by an end-user (someone not > reading the code; and even still there is the =E2=80=9Cspirit=E2=80=9D of= the code and the =E2=80=9Cletter > of the code"). >=20 >=20 > > as a result it was > > accepting *anything* and passed it unchecked directly to atoi(3) result= ing in > > for example pw groupdel -u plop removing wheel... or pw userdel -u some= thing > > trying to delete root. (was this an accepted behaviour for a decade as = well?) > >=20 >=20 > The erroneous deletion was inherently wrong. I do not want to see that bug > resurface (and I thank you very much for fixing it). >=20 > However, I=E2=80=99m sure you know that said erroneous deletion was a sid= e-effect of > lacking error-checks. >=20 > Again, thank you fixing the PR itemizing the erroneous deletion of users/= groups. > Please note that Bruce sent me a private e-mail with some historical back= ground, > to which I replied and we=E2=80=99re working out some logic on the side. = There shouldn=E2=80=99t > be much more to this thread =E2=80=94 I envision that we=E2=80=99ll be ap= proaching a solid agree- > meant that should lead to some commits (can=E2=80=99t say yet what direct= ion it will go as > I=E2=80=99m looking forward to Bruce=E2=80=99s touch-points). Well you may have not noticed but I revert my fix and will let someone else handle this (feel free to revert my revert if you think it has to be done, = but still negative uid looked wrong to me hence my revert). That said I have spent too much time in pw(8) this thing should be entirely rewritten this is a terrible can of worm. Bapt --/3yNEOqWowh/8j+e Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlTILt4ACgkQ8kTtMUmk6Ew9+gCfe7mO6nCG8vPA8EKMbW7gRlXD PrQAn2rIXXeU1pXsAkKlOUrqD8NRGCzJ =ChUi -----END PGP SIGNATURE----- --/3yNEOqWowh/8j+e-- From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 01:03:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5940827A; Wed, 28 Jan 2015 01:03:05 +0000 (UTC) Received: from mail-qc0-x22e.google.com (mail-qc0-x22e.google.com [IPv6:2607:f8b0:400d:c01::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 11F078DC; Wed, 28 Jan 2015 01:03:05 +0000 (UTC) Received: by mail-qc0-f174.google.com with SMTP id s11so15018912qcv.5; Tue, 27 Jan 2015 17:03:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=RLTVvK38Ob/3lzb9WK5ASkg9556mkZ3/FqfiKEug8oU=; b=q38R/pT8XWVOHXgMpc5Nmb4Ea/OShai3CL3HKOfmRLDDrcpkis2d3w3bwIqwqMIjRZ hcLG1D8TPk+jRwgIxMS0ljrYCCMEqWSz4uI7T0ZHQcHYZ368c2/xKOujA1ZQ3FBR2dFT PuJqxyZ9OzCAbxVGJKk5u8vdRo63AgIhnNhHjClbpZAI7xafK2AreBNcW6nfmZYggdUk rGyDw73nPVJBQfGyz0VLTw4R0Lko9ITSVoUMLgD21Q0LxsR2xf4pT1O1rskhL9oJQ7n4 bal+DXnWd0g+Eoqnyz4V5XdxuKEGXrE5wN4DmXl1YvUoTSqDyFS4hcCWlkwim6ahwgu1 JU9A== X-Received: by 10.229.25.200 with SMTP id a8mr2500874qcc.22.1422406984229; Tue, 27 Jan 2015 17:03:04 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.140.39.209 with HTTP; Tue, 27 Jan 2015 17:02:43 -0800 (PST) In-Reply-To: <201501271935.t0RJZgbo015250@svn.freebsd.org> References: <201501271935.t0RJZgbo015250@svn.freebsd.org> From: Ed Maste Date: Tue, 27 Jan 2015 20:02:43 -0500 X-Google-Sender-Auth: AdT8HzbaV_NcktbgEBVoOYMJC9M Message-ID: Subject: Re: svn commit: r277806 - head/sys/dev/vt To: Xin LI Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 01:03:05 -0000 On 27 January 2015 at 14:35, Xin LI wrote: > Author: delphij > Date: Tue Jan 27 19:35:41 2015 > New Revision: 277806 > URL: https://svnweb.freebsd.org/changeset/base/277806 > ... > > More information can be found at CORE Security's advisory at: > http://www.coresecurity.com/content/freebsd-kernel-multiple-vulnerabilities That link gives me a 404; it looks like the page is now here: http://www.coresecurity.com/advisories/freebsd-kernel-multiple-vulnerabilities From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 02:25:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E1DF8F2B; Wed, 28 Jan 2015 02:25:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2A3D1D4; Wed, 28 Jan 2015 02:25:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0S2PnFT018292; Wed, 28 Jan 2015 02:25:49 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0S2PmPV018287; Wed, 28 Jan 2015 02:25:48 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501280225.t0S2PmPV018287@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 28 Jan 2015 02:25:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277816 - stable/10/contrib/gdb/gdb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 02:25:50 -0000 Author: pfg Date: Wed Jan 28 02:25:48 2015 New Revision: 277816 URL: https://svnweb.freebsd.org/changeset/base/277816 Log: MFC r277608, r277656, r277659: Small upstream fixes for GDB. GDB: Fix memset thinkos. 2005-03-25 Anthony Green * remote.c (remote_store_registers): Fix memset usage. * std-regs.c (value_of_builtin_frame_reg): Ditto. (value_of_builtin_frame_fp_reg): Ditto. (value_of_builtin_frame_reg): Ditto. Reported by: Dirk Engling gdb: Add missing break statements 2004-05-21 Jim Blandy * dwarf2expr.c (execute_stack_op): Add 'break' statements after cases for DW_OP_div and DW_OP_shr. (Thanks to Reva Cuthbertson.) GDB: Replace use of sprintf. 2005-03-17 Mark Kettenis * corelow.c (get_core_register_section): Replace usage of sprintf and strcpy with xstrprintf and xstrdup. CID: 604160, 604161, 604162, 604163 CID: 1006819 1008254 Modified: stable/10/contrib/gdb/gdb/corelow.c stable/10/contrib/gdb/gdb/dwarf2expr.c stable/10/contrib/gdb/gdb/remote.c stable/10/contrib/gdb/gdb/std-regs.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/gdb/gdb/corelow.c ============================================================================== --- stable/10/contrib/gdb/gdb/corelow.c Tue Jan 27 21:30:24 2015 (r277815) +++ stable/10/contrib/gdb/gdb/corelow.c Wed Jan 28 02:25:48 2015 (r277816) @@ -432,15 +432,16 @@ get_core_register_section (char *name, char *human_name, int required) { - char section_name[100]; + static char *section_name = NULL; struct bfd_section *section; bfd_size_type size; char *contents; + xfree (section_name); if (PIDGET (inferior_ptid)) - sprintf (section_name, "%s/%d", name, PIDGET (inferior_ptid)); + section_name = xstrprintf ("%s/%d", name, PIDGET (inferior_ptid)); else - strcpy (section_name, name); + section_name = xstrdup (name); section = bfd_get_section_by_name (core_bfd, section_name); if (! section) Modified: stable/10/contrib/gdb/gdb/dwarf2expr.c ============================================================================== --- stable/10/contrib/gdb/gdb/dwarf2expr.c Tue Jan 27 21:30:24 2015 (r277815) +++ stable/10/contrib/gdb/gdb/dwarf2expr.c Wed Jan 28 02:25:48 2015 (r277816) @@ -575,6 +575,7 @@ execute_stack_op (struct dwarf_expr_cont break; case DW_OP_div: binop = BINOP_DIV; + break; case DW_OP_minus: binop = BINOP_SUB; break; @@ -595,6 +596,7 @@ execute_stack_op (struct dwarf_expr_cont break; case DW_OP_shr: binop = BINOP_RSH; + break; case DW_OP_shra: binop = BINOP_RSH; val1 = value_from_longest (signed_address_type (), first); Modified: stable/10/contrib/gdb/gdb/remote.c ============================================================================== --- stable/10/contrib/gdb/gdb/remote.c Tue Jan 27 21:30:24 2015 (r277815) +++ stable/10/contrib/gdb/gdb/remote.c Wed Jan 28 02:25:48 2015 (r277816) @@ -3463,7 +3463,7 @@ remote_store_registers (int regnum) { int i; regs = alloca (rs->sizeof_g_packet); - memset (regs, rs->sizeof_g_packet, 0); + memset (regs, 0, rs->sizeof_g_packet); for (i = 0; i < NUM_REGS + NUM_PSEUDO_REGS; i++) { struct packet_reg *r = &rs->regs[i]; Modified: stable/10/contrib/gdb/gdb/std-regs.c ============================================================================== --- stable/10/contrib/gdb/gdb/std-regs.c Tue Jan 27 21:30:24 2015 (r277815) +++ stable/10/contrib/gdb/gdb/std-regs.c Wed Jan 28 02:25:48 2015 (r277816) @@ -61,7 +61,7 @@ value_of_builtin_frame_reg (struct frame val = allocate_value (builtin_type_frame_reg); VALUE_LVAL (val) = not_lval; buf = VALUE_CONTENTS_RAW (val); - memset (buf, TYPE_LENGTH (VALUE_TYPE (val)), 0); + memset (buf, 0, TYPE_LENGTH (VALUE_TYPE (val))); /* frame.base. */ if (frame != NULL) ADDRESS_TO_POINTER (builtin_type_void_data_ptr, buf, @@ -87,7 +87,7 @@ value_of_builtin_frame_fp_reg (struct fr struct value *val = allocate_value (builtin_type_void_data_ptr); char *buf = VALUE_CONTENTS_RAW (val); if (frame == NULL) - memset (buf, TYPE_LENGTH (VALUE_TYPE (val)), 0); + memset (buf, 0, TYPE_LENGTH (VALUE_TYPE (val))); else ADDRESS_TO_POINTER (builtin_type_void_data_ptr, buf, get_frame_base_address (frame)); @@ -105,7 +105,7 @@ value_of_builtin_frame_pc_reg (struct fr struct value *val = allocate_value (builtin_type_void_data_ptr); char *buf = VALUE_CONTENTS_RAW (val); if (frame == NULL) - memset (buf, TYPE_LENGTH (VALUE_TYPE (val)), 0); + memset (buf, 0, TYPE_LENGTH (VALUE_TYPE (val))); else ADDRESS_TO_POINTER (builtin_type_void_data_ptr, buf, get_frame_pc (frame)); From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 02:33:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 97D8E1B2; Wed, 28 Jan 2015 02:33:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 79BF62DA; Wed, 28 Jan 2015 02:33:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0S2X8JE022751; Wed, 28 Jan 2015 02:33:08 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0S2X7CK022747; Wed, 28 Jan 2015 02:33:07 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501280233.t0S2X7CK022747@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 28 Jan 2015 02:33:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r277817 - stable/9/contrib/gdb/gdb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 02:33:08 -0000 Author: pfg Date: Wed Jan 28 02:33:06 2015 New Revision: 277817 URL: https://svnweb.freebsd.org/changeset/base/277817 Log: MFC r277608, r277656, r277659: Small upstream fixes for GDB. GDB: Fix memset thinkos. 2005-03-25 Anthony Green * remote.c (remote_store_registers): Fix memset usage. * std-regs.c (value_of_builtin_frame_reg): Ditto. (value_of_builtin_frame_fp_reg): Ditto. (value_of_builtin_frame_reg): Ditto. Reported by: Dirk Engling gdb: Add missing break statements 2004-05-21 Jim Blandy * dwarf2expr.c (execute_stack_op): Add 'break' statements after cases for DW_OP_div and DW_OP_shr. (Thanks to Reva Cuthbertson.) GDB: Replace use of sprintf. 2005-03-17 Mark Kettenis * corelow.c (get_core_register_section): Replace usage of sprintf and strcpy with xstrprintf and xstrdup. CID: 604160, 604161, 604162, 604163 CID: 1006819 1008254 Modified: stable/9/contrib/gdb/gdb/corelow.c stable/9/contrib/gdb/gdb/dwarf2expr.c stable/9/contrib/gdb/gdb/remote.c stable/9/contrib/gdb/gdb/std-regs.c Directory Properties: stable/9/contrib/gdb/ (props changed) Modified: stable/9/contrib/gdb/gdb/corelow.c ============================================================================== --- stable/9/contrib/gdb/gdb/corelow.c Wed Jan 28 02:25:48 2015 (r277816) +++ stable/9/contrib/gdb/gdb/corelow.c Wed Jan 28 02:33:06 2015 (r277817) @@ -432,15 +432,16 @@ get_core_register_section (char *name, char *human_name, int required) { - char section_name[100]; + static char *section_name = NULL; struct bfd_section *section; bfd_size_type size; char *contents; + xfree (section_name); if (PIDGET (inferior_ptid)) - sprintf (section_name, "%s/%d", name, PIDGET (inferior_ptid)); + section_name = xstrprintf ("%s/%d", name, PIDGET (inferior_ptid)); else - strcpy (section_name, name); + section_name = xstrdup (name); section = bfd_get_section_by_name (core_bfd, section_name); if (! section) Modified: stable/9/contrib/gdb/gdb/dwarf2expr.c ============================================================================== --- stable/9/contrib/gdb/gdb/dwarf2expr.c Wed Jan 28 02:25:48 2015 (r277816) +++ stable/9/contrib/gdb/gdb/dwarf2expr.c Wed Jan 28 02:33:06 2015 (r277817) @@ -575,6 +575,7 @@ execute_stack_op (struct dwarf_expr_cont break; case DW_OP_div: binop = BINOP_DIV; + break; case DW_OP_minus: binop = BINOP_SUB; break; @@ -595,6 +596,7 @@ execute_stack_op (struct dwarf_expr_cont break; case DW_OP_shr: binop = BINOP_RSH; + break; case DW_OP_shra: binop = BINOP_RSH; val1 = value_from_longest (signed_address_type (), first); Modified: stable/9/contrib/gdb/gdb/remote.c ============================================================================== --- stable/9/contrib/gdb/gdb/remote.c Wed Jan 28 02:25:48 2015 (r277816) +++ stable/9/contrib/gdb/gdb/remote.c Wed Jan 28 02:33:06 2015 (r277817) @@ -3463,7 +3463,7 @@ remote_store_registers (int regnum) { int i; regs = alloca (rs->sizeof_g_packet); - memset (regs, rs->sizeof_g_packet, 0); + memset (regs, 0, rs->sizeof_g_packet); for (i = 0; i < NUM_REGS + NUM_PSEUDO_REGS; i++) { struct packet_reg *r = &rs->regs[i]; Modified: stable/9/contrib/gdb/gdb/std-regs.c ============================================================================== --- stable/9/contrib/gdb/gdb/std-regs.c Wed Jan 28 02:25:48 2015 (r277816) +++ stable/9/contrib/gdb/gdb/std-regs.c Wed Jan 28 02:33:06 2015 (r277817) @@ -61,7 +61,7 @@ value_of_builtin_frame_reg (struct frame val = allocate_value (builtin_type_frame_reg); VALUE_LVAL (val) = not_lval; buf = VALUE_CONTENTS_RAW (val); - memset (buf, TYPE_LENGTH (VALUE_TYPE (val)), 0); + memset (buf, 0, TYPE_LENGTH (VALUE_TYPE (val))); /* frame.base. */ if (frame != NULL) ADDRESS_TO_POINTER (builtin_type_void_data_ptr, buf, @@ -87,7 +87,7 @@ value_of_builtin_frame_fp_reg (struct fr struct value *val = allocate_value (builtin_type_void_data_ptr); char *buf = VALUE_CONTENTS_RAW (val); if (frame == NULL) - memset (buf, TYPE_LENGTH (VALUE_TYPE (val)), 0); + memset (buf, 0, TYPE_LENGTH (VALUE_TYPE (val))); else ADDRESS_TO_POINTER (builtin_type_void_data_ptr, buf, get_frame_base_address (frame)); @@ -105,7 +105,7 @@ value_of_builtin_frame_pc_reg (struct fr struct value *val = allocate_value (builtin_type_void_data_ptr); char *buf = VALUE_CONTENTS_RAW (val); if (frame == NULL) - memset (buf, TYPE_LENGTH (VALUE_TYPE (val)), 0); + memset (buf, 0, TYPE_LENGTH (VALUE_TYPE (val))); else ADDRESS_TO_POINTER (builtin_type_void_data_ptr, buf, get_frame_pc (frame)); From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 02:55:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B02B50F; Wed, 28 Jan 2015 02:55:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 456196B1; Wed, 28 Jan 2015 02:55:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0S2tLGt032029; Wed, 28 Jan 2015 02:55:21 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0S2tLRx032028; Wed, 28 Jan 2015 02:55:21 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201501280255.t0S2tLRx032028@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 28 Jan 2015 02:55:21 +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: r277818 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 02:55:21 -0000 Author: mav Date: Wed Jan 28 02:55:20 2015 New Revision: 277818 URL: https://svnweb.freebsd.org/changeset/base/277818 Log: MFC r277169: Reimplement TRIM throttling added in r248577. Previous throttling implementation approached problem from the wrong side. It significantly limited useful delaying of TRIM requests and aggregation potential, while not so much controlled TRIM burstiness under heavy load. With this change random 4K write benchmarks (probably the worst case for TRIM) show me IOPS increase by 20%, average latency reduction by 30%, peak TRIM bursts reduction by 3 times and same peak TRIM map size (memory usage). Also the new logic does not force map size down so heavily, really allowing to keep deleted data for 32 TXG or 30 seconds under moderate load. It was practically impossible with old throttling logic, which pushed map down to only 64 segments. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Wed Jan 28 02:33:06 2015 (r277817) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Wed Jan 28 02:55:20 2015 (r277818) @@ -40,17 +40,20 @@ #define TRIM_ZIO_END(vd, offset, size) (offset + \ P2ROUNDUP(size, 1ULL << vd->vdev_top->vdev_ashift)) -#define TRIM_MAP_SINC(tm, size) \ - atomic_add_64(&(tm)->tm_bytes, (size)) +/* Maximal segment size for ATA TRIM. */ +#define TRIM_MAP_SIZE_FACTOR (512 << 16) -#define TRIM_MAP_SDEC(tm, size) \ - atomic_add_64(&(tm)->tm_bytes, -(size)) +#define TRIM_MAP_SEGS(size) (1 + (size) / TRIM_MAP_SIZE_FACTOR) -#define TRIM_MAP_QINC(tm) \ - atomic_inc_64(&(tm)->tm_pending); \ - -#define TRIM_MAP_QDEC(tm) \ - atomic_dec_64(&(tm)->tm_pending); +#define TRIM_MAP_ADD(tm, ts) do { \ + list_insert_tail(&(tm)->tm_head, (ts)); \ + (tm)->tm_pending += TRIM_MAP_SEGS((ts)->ts_end - (ts)->ts_start); \ +} while (0) + +#define TRIM_MAP_REM(tm, ts) do { \ + list_remove(&(tm)->tm_head, (ts)); \ + (tm)->tm_pending -= TRIM_MAP_SEGS((ts)->ts_end - (ts)->ts_start); \ +} while (0) typedef struct trim_map { list_t tm_head; /* List of segments sorted by txg. */ @@ -60,7 +63,6 @@ typedef struct trim_map { list_t tm_pending_writes; /* Writes blocked on in-flight frees. */ kmutex_t tm_lock; uint64_t tm_pending; /* Count of pending TRIMs. */ - uint64_t tm_bytes; /* Total size in bytes of queued TRIMs. */ } trim_map_t; typedef struct trim_seg { @@ -74,13 +76,10 @@ typedef struct trim_seg { extern boolean_t zfs_trim_enabled; -static u_int trim_txg_delay = 32; -static u_int trim_timeout = 30; -static u_int trim_max_interval = 1; -/* Limit outstanding TRIMs to 2G (max size for a single TRIM request) */ -static uint64_t trim_vdev_max_bytes = 2147483648; -/* Limit outstanding TRIMs to 64 (max ranges for a single TRIM request) */ -static u_int trim_vdev_max_pending = 64; +static u_int trim_txg_delay = 32; /* Keep deleted data up to 32 TXG */ +static u_int trim_timeout = 30; /* Keep deleted data up to 30s */ +static u_int trim_max_interval = 1; /* 1s delays between TRIMs */ +static u_int trim_vdev_max_pending = 10000; /* Keep up to 10K segments */ SYSCTL_DECL(_vfs_zfs); SYSCTL_NODE(_vfs_zfs, OID_AUTO, trim, CTLFLAG_RD, 0, "ZFS TRIM"); @@ -99,11 +98,6 @@ SYSCTL_UINT(_vfs_zfs_trim, OID_AUTO, max "Maximum interval between TRIM queue processing (seconds)"); SYSCTL_DECL(_vfs_zfs_vdev); -TUNABLE_QUAD("vfs.zfs.vdev.trim_max_bytes", &trim_vdev_max_bytes); -SYSCTL_QUAD(_vfs_zfs_vdev, OID_AUTO, trim_max_bytes, CTLFLAG_RWTUN, - &trim_vdev_max_bytes, 0, - "Maximum pending TRIM bytes for a vdev"); - TUNABLE_INT("vfs.zfs.vdev.trim_max_pending", &trim_vdev_max_pending); SYSCTL_UINT(_vfs_zfs_vdev, OID_AUTO, trim_max_pending, CTLFLAG_RWTUN, &trim_vdev_max_pending, 0, @@ -198,10 +192,8 @@ trim_map_destroy(vdev_t *vd) mutex_enter(&tm->tm_lock); while ((ts = list_head(&tm->tm_head)) != NULL) { avl_remove(&tm->tm_queued_frees, ts); - list_remove(&tm->tm_head, ts); + TRIM_MAP_REM(tm, ts); kmem_free(ts, sizeof (*ts)); - TRIM_MAP_SDEC(tm, ts->ts_end - ts->ts_start); - TRIM_MAP_QDEC(tm); } mutex_exit(&tm->tm_lock); @@ -246,40 +238,34 @@ trim_map_segment_add(trim_map_t *tm, uin merge_after = (ts_after != NULL && ts_after->ts_start == end); if (merge_before && merge_after) { - TRIM_MAP_SINC(tm, ts_after->ts_start - ts_before->ts_end); - TRIM_MAP_QDEC(tm); avl_remove(&tm->tm_queued_frees, ts_before); - list_remove(&tm->tm_head, ts_before); + TRIM_MAP_REM(tm, ts_before); + TRIM_MAP_REM(tm, ts_after); ts_after->ts_start = ts_before->ts_start; ts_after->ts_txg = txg; ts_after->ts_time = time; - list_remove(&tm->tm_head, ts_after); - list_insert_tail(&tm->tm_head, ts_after); + TRIM_MAP_ADD(tm, ts_after); kmem_free(ts_before, sizeof (*ts_before)); } else if (merge_before) { - TRIM_MAP_SINC(tm, end - ts_before->ts_end); + TRIM_MAP_REM(tm, ts_before); ts_before->ts_end = end; ts_before->ts_txg = txg; ts_before->ts_time = time; - list_remove(&tm->tm_head, ts_before); - list_insert_tail(&tm->tm_head, ts_before); + TRIM_MAP_ADD(tm, ts_before); } else if (merge_after) { - TRIM_MAP_SINC(tm, ts_after->ts_start - start); + TRIM_MAP_REM(tm, ts_after); ts_after->ts_start = start; ts_after->ts_txg = txg; ts_after->ts_time = time; - list_remove(&tm->tm_head, ts_after); - list_insert_tail(&tm->tm_head, ts_after); + TRIM_MAP_ADD(tm, ts_after); } else { - TRIM_MAP_SINC(tm, end - start); - TRIM_MAP_QINC(tm); ts = kmem_alloc(sizeof (*ts), KM_SLEEP); ts->ts_start = start; ts->ts_end = end; ts->ts_txg = txg; ts->ts_time = time; avl_insert(&tm->tm_queued_frees, ts, where); - list_insert_tail(&tm->tm_head, ts); + TRIM_MAP_ADD(tm, ts); } } @@ -295,7 +281,7 @@ trim_map_segment_remove(trim_map_t *tm, left_over = (ts->ts_start < start); right_over = (ts->ts_end > end); - TRIM_MAP_SDEC(tm, end - start); + TRIM_MAP_REM(tm, ts); if (left_over && right_over) { nts = kmem_alloc(sizeof (*nts), KM_SLEEP); nts->ts_start = end; @@ -304,16 +290,16 @@ trim_map_segment_remove(trim_map_t *tm, nts->ts_time = ts->ts_time; ts->ts_end = start; avl_insert_here(&tm->tm_queued_frees, nts, ts, AVL_AFTER); - list_insert_after(&tm->tm_head, ts, nts); - TRIM_MAP_QINC(tm); + TRIM_MAP_ADD(tm, ts); + TRIM_MAP_ADD(tm, nts); } else if (left_over) { ts->ts_end = start; + TRIM_MAP_ADD(tm, ts); } else if (right_over) { ts->ts_start = end; + TRIM_MAP_ADD(tm, ts); } else { avl_remove(&tm->tm_queued_frees, ts); - list_remove(&tm->tm_head, ts); - TRIM_MAP_QDEC(tm); kmem_free(ts, sizeof (*ts)); } } @@ -432,7 +418,8 @@ trim_map_write_done(zio_t *zio) * the first element's time is not greater than time argument */ static trim_seg_t * -trim_map_first(trim_map_t *tm, uint64_t txg, uint64_t txgsafe, hrtime_t time) +trim_map_first(trim_map_t *tm, uint64_t txg, uint64_t txgsafe, hrtime_t time, + boolean_t force) { trim_seg_t *ts; @@ -441,9 +428,7 @@ trim_map_first(trim_map_t *tm, uint64_t ts = list_head(&tm->tm_head); if (ts != NULL && ts->ts_txg <= txgsafe && - (ts->ts_txg <= txg || ts->ts_time <= time || - tm->tm_bytes > trim_vdev_max_bytes || - tm->tm_pending > trim_vdev_max_pending)) + (ts->ts_txg <= txg || ts->ts_time <= time || force)) return (ts); return (NULL); } @@ -454,6 +439,7 @@ trim_map_vdev_commit(spa_t *spa, zio_t * trim_map_t *tm = vd->vdev_trimmap; trim_seg_t *ts; uint64_t size, offset, txgtarget, txgsafe; + int64_t hard, soft; hrtime_t timelimit; ASSERT(vd->vdev_ops->vdev_op_leaf); @@ -474,16 +460,19 @@ trim_map_vdev_commit(spa_t *spa, zio_t * } mutex_enter(&tm->tm_lock); + hard = 0; + if (tm->tm_pending > trim_vdev_max_pending) + hard = (tm->tm_pending - trim_vdev_max_pending) / 4; + soft = P2ROUNDUP(hard + tm->tm_pending / trim_timeout + 1, 64); /* Loop until we have sent all outstanding free's */ - while ((ts = trim_map_first(tm, txgtarget, txgsafe, timelimit)) + while (soft > 0 && + (ts = trim_map_first(tm, txgtarget, txgsafe, timelimit, hard > 0)) != NULL) { - list_remove(&tm->tm_head, ts); + TRIM_MAP_REM(tm, ts); avl_remove(&tm->tm_queued_frees, ts); avl_add(&tm->tm_inflight_frees, ts); size = ts->ts_end - ts->ts_start; offset = ts->ts_start; - TRIM_MAP_SDEC(tm, size); - TRIM_MAP_QDEC(tm); /* * We drop the lock while we call zio_nowait as the IO * scheduler can result in a different IO being run e.g. @@ -493,6 +482,8 @@ trim_map_vdev_commit(spa_t *spa, zio_t * zio_nowait(zio_trim(zio, spa, vd, offset, size)); + soft -= TRIM_MAP_SEGS(size); + hard -= TRIM_MAP_SEGS(size); mutex_enter(&tm->tm_lock); } mutex_exit(&tm->tm_lock); From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 02:56:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8964F663; Wed, 28 Jan 2015 02:56:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 748AF6BE; Wed, 28 Jan 2015 02:56:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0S2uJHN032207; Wed, 28 Jan 2015 02:56:19 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0S2uJtn032206; Wed, 28 Jan 2015 02:56:19 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201501280256.t0S2uJtn032206@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 28 Jan 2015 02:56:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277819 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 02:56:19 -0000 Author: mav Date: Wed Jan 28 02:56:18 2015 New Revision: 277819 URL: https://svnweb.freebsd.org/changeset/base/277819 Log: MFC r277185: Fix overflow bug from r248577, turning 30s TRIM timeout into ~4s. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Wed Jan 28 02:55:20 2015 (r277818) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Wed Jan 28 02:56:18 2015 (r277819) @@ -447,7 +447,7 @@ trim_map_vdev_commit(spa_t *spa, zio_t * if (tm == NULL) return; - timelimit = gethrtime() - trim_timeout * NANOSEC; + timelimit = gethrtime() - (hrtime_t)trim_timeout * NANOSEC; if (vd->vdev_isl2cache) { txgsafe = UINT64_MAX; txgtarget = UINT64_MAX; From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 03:29:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D91D3E6D for ; Wed, 28 Jan 2015 03:29:29 +0000 (UTC) Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A8C0FAF6 for ; Wed, 28 Jan 2015 03:29:29 +0000 (UTC) Received: by mail-pa0-f49.google.com with SMTP id fa1so22622578pad.8 for ; Tue, 27 Jan 2015 19:29:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=quBAMn75O5BySpctQP4J5GzZKW+nn1o5TdZgmHm01Ik=; b=KE9eEHU7URqVPM929s9QsmxcMdQfSYhb2RpuQx6PmuIwxXfTMKqDPMS5ZkAoAovSMZ UXQvktpDfrjDQC9sfkCN0LsJCkISDt04daFdeiWgz+JS4TlIlD4Oisu/+0eZjAwk7IY1 uOywMfz145lUAmcJr5tEvjAWw41voMhjJmKk/f1v5Mb+5ag/uSv5dd1IdYx3j0zTonJF tpyD/C/hHrXSJaTMhndW2u7uMjIA3xAuMajHkPPMfdTzIEuG8NkeBltq1VDh8MBEY7qf k3iDwBSqKVb4VhPzlgNlBvPIiZ64+blLFMpEveh8WeKLXO+O7+gtRKsITw0YxbuokEh8 e+Rg== X-Gm-Message-State: ALoCoQkoOzfI6zTbrDhfQUtisQh8ez8MnNcB38YOnDK7G1RPhi36c3dI1Pk33e7niUdty1RQuGGR X-Received: by 10.70.95.133 with SMTP id dk5mr2188403pdb.98.1422415762835; Tue, 27 Jan 2015 19:29:22 -0800 (PST) Received: from [10.64.24.223] ([69.53.236.236]) by mx.google.com with ESMTPSA id pp9sm2991596pbb.65.2015.01.27.19.29.20 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 27 Jan 2015 19:29:21 -0800 (PST) Sender: Warner Losh Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r277737 - in head: etc/pam.d tools/build/mk From: Warner Losh In-Reply-To: Date: Tue, 27 Jan 2015 20:29:18 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <35AB8592-7ACA-4352-8448-F7EFA0F861CD@bsdimp.com> References: <201501260850.t0Q8oDna015719@svn.freebsd.org> <86fvax91cy.fsf@nine.des.no> To: Garrett Cooper X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, =?windows-1252?Q?Dag-Erling_Sm=F8rgrav?= , svn-src-all@freebsd.org, src-committers , Garrett Cooper X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 03:29:29 -0000 > On Jan 26, 2015, at 7:26 PM, Garrett Cooper = wrote: >=20 > On Jan 26, 2015, at 4:23, Dag-Erling Sm=F8rgrav wrote: >=20 >> Garrett Cooper writes: >>> Log: >>> Honor MK_ACCT with etc/pam.d/atrun >>=20 >> The correct idiom would be >=20 > I disagree for a few reasons: > 1. style.Makefile(9) makes no mention of having to use an idiom over = the other. > 2. The likelihood of typos creeping into Makefiles is greater with the = _foo=3D idiom. > 3. It creates unnecessary local variables =97 especially when = appending is so easy to do. > 4. It=92s more difficult when backporting changes to do it with the = variable method =97 especially if context around the line modified has = changed a great deal. 5. I=92m working on a change that would be easier to do with Garrett=92s = change, but it is rather invasive so I need to work it through a good = chunk of the system before I offer it for review and discussion. Warner= From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 04:02:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 300FF2DE; Wed, 28 Jan 2015 04:02:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C32CE2C; Wed, 28 Jan 2015 04:02:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0S42uOx069866; Wed, 28 Jan 2015 04:02:56 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0S42uC0069865; Wed, 28 Jan 2015 04:02:56 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501280402.t0S42uC0069865@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 28 Jan 2015 04:02:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277821 - head/sys/dev/ath/ath_hal X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 04:02:57 -0000 Author: adrian Date: Wed Jan 28 04:02:56 2015 New Revision: 277821 URL: https://svnweb.freebsd.org/changeset/base/277821 Log: Add a new HAL capability - required to compile the updated AR9300 HAL i have lying about. Modified: head/sys/dev/ath/ath_hal/ah_internal.h Modified: head/sys/dev/ath/ath_hal/ah_internal.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_internal.h Wed Jan 28 03:05:37 2015 (r277820) +++ head/sys/dev/ath/ath_hal/ah_internal.h Wed Jan 28 04:02:56 2015 (r277821) @@ -282,7 +282,8 @@ typedef struct { halRadioRetentionSupport : 1, halSpectralScanSupport : 1, halRxUsingLnaMixing : 1, - halRxDoMyBeacon : 1; + halRxDoMyBeacon : 1, + halHwUapsdTrig : 1; uint32_t halWirelessModes; uint16_t halTotalQueues; From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 04:42:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AFF1DBDD; Wed, 28 Jan 2015 04:42:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C39B37C; Wed, 28 Jan 2015 04:42:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0S4gfkw088312; Wed, 28 Jan 2015 04:42:41 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0S4gfLd088311; Wed, 28 Jan 2015 04:42:41 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501280442.t0S4gfLd088311@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 28 Jan 2015 04:42:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277822 - head/sys/dev/ath/ath_rate/sample X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 04:42:41 -0000 Author: adrian Date: Wed Jan 28 04:42:40 2015 New Revision: 277822 URL: https://svnweb.freebsd.org/changeset/base/277822 Log: Print out the final_rix if there's a problem. Modified: head/sys/dev/ath/ath_rate/sample/sample.c Modified: head/sys/dev/ath/ath_rate/sample/sample.c ============================================================================== --- head/sys/dev/ath/ath_rate/sample/sample.c Wed Jan 28 04:02:56 2015 (r277821) +++ head/sys/dev/ath/ath_rate/sample/sample.c Wed Jan 28 04:42:40 2015 (r277822) @@ -891,8 +891,8 @@ ath_rate_tx_complete(struct ath_softc *s if (!mrr || ts->ts_finaltsi == 0) { if (!IS_RATE_DEFINED(sn, final_rix)) { - device_printf(sc->sc_dev, "%s: ts_rate=%d ts_finaltsi=%d\n", - __func__, ts->ts_rate, ts->ts_finaltsi); + device_printf(sc->sc_dev, "%s: ts_rate=%d ts_finaltsi=%d, final_rix=%d\n", + __func__, ts->ts_rate, ts->ts_finaltsi, final_rix); badrate(ifp, 0, ts->ts_rate, long_tries, status); return; } From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 04:44:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 72FF6D9D; Wed, 28 Jan 2015 04:44:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F96C3A1; Wed, 28 Jan 2015 04:44:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0S4ih7D088611; Wed, 28 Jan 2015 04:44:43 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0S4ihvp088610; Wed, 28 Jan 2015 04:44:43 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501280444.t0S4ihvp088610@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 28 Jan 2015 04:44:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277823 - head/sys/dev/ath/ath_rate/sample X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 04:44:43 -0000 Author: adrian Date: Wed Jan 28 04:44:42 2015 New Revision: 277823 URL: https://svnweb.freebsd.org/changeset/base/277823 Log: Cast everything to something longer than 32 bits so the sample mask doesn't get truncated to 32 bits. Without this, 3x3 NICs transmitting at an MCS rate whose rix (rate index) in the rate table is > 31 end up returning errors, as the sample rate code doesn't think the rate is set in the rate table. Tested: * AR9380, STA, speaking 3x3 to an AP Modified: head/sys/dev/ath/ath_rate/sample/sample.h Modified: head/sys/dev/ath/ath_rate/sample/sample.h ============================================================================== --- head/sys/dev/ath/ath_rate/sample/sample.h Wed Jan 28 04:42:40 2015 (r277822) +++ head/sys/dev/ath/ath_rate/sample/sample.h Wed Jan 28 04:44:42 2015 (r277823) @@ -113,7 +113,7 @@ struct sample_node { #ifdef _KERNEL #define ATH_NODE_SAMPLE(an) ((struct sample_node *)&(an)[1]) -#define IS_RATE_DEFINED(sn, rix) (((sn)->ratemask & (1<<(rix))) != 0) +#define IS_RATE_DEFINED(sn, rix) (((uint64_t) (sn)->ratemask & (1ULL<<((uint64_t) rix))) != 0) #ifndef MIN #define MIN(a,b) ((a) < (b) ? (a) : (b)) From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 04:51:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D08B8F64; Wed, 28 Jan 2015 04:51:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD0E33E6; Wed, 28 Jan 2015 04:51:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0S4pF3Z089976; Wed, 28 Jan 2015 04:51:15 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0S4pFlB089974; Wed, 28 Jan 2015 04:51:15 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201501280451.t0S4pFlB089974@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Wed, 28 Jan 2015 04:51:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r277824 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 04:51:15 -0000 Author: gnn Date: Wed Jan 28 04:51:14 2015 New Revision: 277824 URL: https://svnweb.freebsd.org/changeset/base/277824 Log: Add Eric Joyner, newly accepted committer, to the access and mentors files. Jack Vogel will co-mentor. Approved by: core Modified: svnadmin/conf/access svnadmin/conf/mentors Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Wed Jan 28 04:44:42 2015 (r277823) +++ svnadmin/conf/access Wed Jan 28 04:51:14 2015 (r277824) @@ -75,6 +75,7 @@ edwin emaste emax eri +erj erwin fabient fanf Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Wed Jan 28 04:44:42 2015 (r277823) +++ svnadmin/conf/mentors Wed Jan 28 04:51:14 2015 (r277824) @@ -17,6 +17,7 @@ benl philip Co-mentor: simon carl jimharris cherry gibbs eri gnn Co-mentor: thompsa +erj gnn Co-mentor: jfv ganbold stas jceel wkoszek Co-mentor: cognet jch jhb From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 07:19:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AEE7397E; Wed, 28 Jan 2015 07:19:39 +0000 (UTC) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 7134B683; Wed, 28 Jan 2015 07:19:39 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id 65DC34437; Wed, 28 Jan 2015 07:19:32 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id 96B7C6ED; Wed, 28 Jan 2015 08:18:44 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Garrett Cooper Subject: Re: svn commit: r277737 - in head: etc/pam.d tools/build/mk References: <201501260850.t0Q8oDna015719@svn.freebsd.org> <86fvax91cy.fsf@nine.des.no> Date: Wed, 28 Jan 2015 08:18:44 +0100 Message-ID: <86vbjrl6ej.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Garrett Cooper X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 07:19:39 -0000 Garrett Cooper writes: > I disagree for a few reasons: > 1. style.Makefile(9) makes no mention of having to use an idiom over > the other. That is only one of many things it does not mention. That doesn't mean we don't have idioms and conventions outside what is described in that document. > 2. The likelihood of typos creeping into Makefiles is greater with the > _foo=3D idiom. I don't see how it makes a difference at all. > 3. It creates unnecessary local variables =E2=80=94 especially when appen= ding > is so easy to do. Define unnecessary. What is the marginal cost of a Makefile variable? > 4. It=E2=80=99s more difficult when backporting changes to do it with the > variable method =E2=80=94 especially if context around the line modified = has > changed a great deal. I don't see how it makes a difference. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 07:38:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3F5FC132; Wed, 28 Jan 2015 07:38:28 +0000 (UTC) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id C4DBA8DB; Wed, 28 Jan 2015 07:38:27 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 3856B3C0850; Wed, 28 Jan 2015 18:38:14 +1100 (AEDT) Date: Wed, 28 Jan 2015 18:38:05 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Xin LI Subject: Re: svn commit: r277806 - head/sys/dev/vt In-Reply-To: <201501271935.t0RJZgbo015250@svn.freebsd.org> Message-ID: <20150128183748.X985@besplex.bde.org> References: <201501271935.t0RJZgbo015250@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=C77Ql2/+ c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=fugkxVe1s3-v6o3yGx4A:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 07:38:28 -0000 On Tue, 27 Jan 2015, Xin LI wrote: > Log: > Use unsigned int for index value. > > Without this change a local attacker could trigger a panic by > tricking the kernel into accessing undefined kernel memory. Why not fix the range check instead of using even more type hacks/errors? > Modified: head/sys/dev/vt/vt_core.c > ============================================================================== > --- head/sys/dev/vt/vt_core.c Tue Jan 27 19:35:38 2015 (r277805) > +++ head/sys/dev/vt/vt_core.c Tue Jan 27 19:35:41 2015 (r277806) > @@ -2367,20 +2367,23 @@ skip_thunk: > } > VT_UNLOCK(vd); > return (EINVAL); > - case VT_WAITACTIVE: > + case VT_WAITACTIVE: { > + unsigned int idx; > + No comment on lexical style bugs. > error = 0; > > - i = *(unsigned int *)data; Bogus cast. The data type is int. (This is of course undocumented. It used to be caddr_t, from the use of _IO() to define VT_WAITACTIVE, and the bogus types and casts for that were even more confusing. Now, _IOWINT() is used and it only supports int, so the type is clearly int. In rare cases, you might need a type hack to get a u_int, but the complications from unsigned types are not needed here.) This code uses a bad type pun to get a u_int, then doesn't even use the u_int but converts without a type pun back to int. > - if (i > VT_MAXWINDOWS) Missing check of lower limit in the range check. Correct fix: just add the missing part: if (i < 0 || i > VT_MAXWINDOWS) > + idx = *(unsigned int *)data; Bogus cast. It uses a bad type pun to get a u_int for using in the subsequent obfuscated range check. The type pun is broken for at least -0 on 1's complement machines (other exotic cases are harder to find and/or understand). -0 should mean the same as plain 0, but the bad type pun makes it UINT_MAX in the 1's complement case. Correct conversion: idx = *(int *)data; (For -0, the RHS is -0 and properly converting that to u_int gives 0.) > + if (idx > VT_MAXWINDOWS) Obfuscated check for the lower limit. Conversion to u_int turns negative values into large unsigned ones that are seen as out of bounds since the upper limit is <= INT_MAX. This hack was a useful manual optimization for primitive compilers in 1984. > return (EINVAL); > - if (i != 0) > - vw = vd->vd_windows[i - 1]; > + if (idx > 0) > + vw = vd->vd_windows[idx - 1]; > > VT_LOCK(vd); > while (vd->vd_curwindow != vw && error == 0) > error = cv_wait_sig(&vd->vd_winswitch, &vd->vd_lock); > VT_UNLOCK(vd); > return (error); > + } > case VT_SETMODE: { /* set screen switcher mode */ > struct vt_mode *mode; > struct proc *p1; Lots of collateral changes from renaming the variable. If you want the obfuscation but not other changes, then just cast the old i in the range check: if ((unsigned int)i > VT_MAXWINDOWS) Small problems nearby: - VT_MAXWINDOWS should have type int so that you don't have to worry about sign extension bugs in the comparison or more cases. (You could make it u_int and not explicitly cast i to deepen the obfuscation. Then the compiler might warn about i < 0 being redundant.) It defaults to 12. But it can be set to the kernel option MAXCONS, and the user can put anything in that. The type of MAXCONS is of course undocumented. - a review of the corresponding code in syscons shows only a fairly benign overflow bug: SC case VT_WAITACTIVE: /* wait for switch to occur */ SC i = (*(int *)data == 0) ? scp->index : (*(int *)data - 1); SC if ((i < sc->first_vty) || (i >= sc->first_vty + sc->vtys)) SC return EINVAL; SC if (i == sc->cur_scp->index) SC return 0; syscons gets the range check right without really trying since its lower limit is variable and not obviously 0, so the unsigned obfuscation is not available. It handles the special case i == 0 differently by mapping i before the range check. There is an overflow bug in the mapping: i = INT_MIN is invalid and for this i, i - 1 overflows before it is checked. Normally it overflows to INT_MAX and is detected as invalid later. The early mapping is otherwise better than in vt. It allows a more natural check of the upper limit in the range check. The check in vt involves 3 or 4 layers of compensating adjustments by +-1. Bruce From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 08:41:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 76885758; Wed, 28 Jan 2015 08:41:57 +0000 (UTC) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 3A850F80; Wed, 28 Jan 2015 08:41:56 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id AA6A1426B1B; Wed, 28 Jan 2015 19:41:48 +1100 (AEDT) Date: Wed, 28 Jan 2015 19:41:47 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: "Pedro F. Giffuni" Subject: Re: svn commit: r277802 - head/usr.bin/sed In-Reply-To: <201501271858.t0RIwO3n096590@svn.freebsd.org> Message-ID: <20150128190500.T1832@besplex.bde.org> References: <201501271858.t0RIwO3n096590@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=R8o6R7hX c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=rnIuNxJbw6BcAcpqypMA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 08:41:57 -0000 On Tue, 27 Jan 2015, Pedro F. Giffuni wrote: > Log: > Fix resource leak and dereference after NULL. > > process.c: > Protect access against NULL. > > main.c: > Prevent outfile overwrite resource leak. > ... > Modified: head/usr.bin/sed/main.c > ============================================================================== > --- head/usr.bin/sed/main.c Tue Jan 27 18:56:46 2015 (r277801) > +++ head/usr.bin/sed/main.c Tue Jan 27 18:58:24 2015 (r277802) > @@ -411,6 +411,8 @@ mf_fgets(SPACE *sp, enum e_spflag spflag > unlink(tmpfname); > if ((outfile = fopen(tmpfname, "w")) == NULL) > err(1, "%s", fname); > + if (outfile != NULL && outfile != stdout) > + fclose(outfile); > fchown(fileno(outfile), sb.st_uid, sb.st_gid); > fchmod(fileno(outfile), sb.st_mode & ALLPERMS); > outfname = tmpfname; This is mismerged at best. It just breaks the new outfile by closing it. The check in it makes no sense in this contents, since the freshly-opened outfile cannot be NULL (since the open succeeded) or stdout (fopen() cannot return a pointer to an already-open stream, so it can only return stdout if the stdout pointer is garbage, but then it is not really stdout). Bruce From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 08:56:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1981FE45; Wed, 28 Jan 2015 08:56:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 04D8F185; Wed, 28 Jan 2015 08:56:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0S8umU2005997; Wed, 28 Jan 2015 08:56:48 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0S8umPP005996; Wed, 28 Jan 2015 08:56:48 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501280856.t0S8umPP005996@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 28 Jan 2015 08:56:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277826 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 08:56:49 -0000 Author: delphij Date: Wed Jan 28 08:56:48 2015 New Revision: 277826 URL: https://svnweb.freebsd.org/changeset/base/277826 Log: MFV r255258: Diff reduction with upstream. The actual change was merged in r272483 already. MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Jan 28 07:29:38 2015 (r277825) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Jan 28 08:56:48 2015 (r277826) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, Joyent, Inc. All rights reserved. * Copyright (c) 2011, 2014 by Delphix. All rights reserved. * Copyright (c) 2014 by Saso Kiselkov. All rights reserved. * Copyright 2014 Nexenta Systems, Inc. All rights reserved. From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 10:23:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9AE3743E; Wed, 28 Jan 2015 10:23:42 +0000 (UTC) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id CAEC5CE3; Wed, 28 Jan 2015 10:23:41 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id E4D2D1A2540; Wed, 28 Jan 2015 20:55:58 +1100 (AEDT) Date: Wed, 28 Jan 2015 20:55:57 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Robert Watson Subject: Re: svn commit: r277652 - in head/usr.sbin/pw: . tests In-Reply-To: Message-ID: <20150128195647.E1974@besplex.bde.org> References: <201501241913.t0OJD4xT039188@svn.freebsd.org> <20150125155254.V1007@besplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=Qdxf4Krv c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=mkU-gdjLa1_SUtGgM7IA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, Baptiste Daroussin , src-committers@freebsd.org, svn-src-all@freebsd.org, Bruce Evans X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 10:23:42 -0000 On Tue, 27 Jan 2015, Robert Watson wrote: > On Sun, 25 Jan 2015, Bruce Evans wrote: > >> Negative ids have historical abuses in places like mountd. mountd still >> hard-codes -2 and -2 for the default uid and gid of an unprivileged user. >> ... > > I'm sure it goes without saying, but for those that don't know (i.e., some > subset of people who are not Bruce): > > (-1) has a defined value both for our system-call interface (chown(2), > fchown(2), etc, use (-1) to indicate that no change is requested). > > This is also used inside the kernel to similar end, where VNOVAL also takes > on a value of (-1). > > This problem also used to exist in NFS, where in NFSv2, (-1) was also used to > indicate which fields not to update, but this was fixed in NFSv3 by > introducing discriminated unions. > > I personally find myself a fan of fixing (eliminating) VNOVAL, but in the end > it would likely just be disruptive and confusing. VNOVAL is kernel-only, so it need not limit values. But then you would have to escape the value that it usurps. ffs uses VNOVAL for (quoting an old version): % if (vap->va_rdev != VNOVAL) { % if ((vap->va_type != VNON) || (vap->va_nlink != VNOVAL) || % (vap->va_fsid != VNOVAL) || (vap->va_fileid != VNOVAL) || % (vap->va_blocksize != VNOVAL) || (vap->va_rdev != VNOVAL) || % ((int)vap->va_bytes != VNOVAL) || (vap->va_gen != VNOVAL)) { Some of these are magic or kernel-only or otherwise have plenty of out of band values. va_nlink is most interesting. It is only 16 bits signed. If it were not signed, then it couldn't represent VNOVAL. {LINK_MAX} is hard-coded as LINK_MAX = 32767. The hard-coded type and value are both broken for file systems that have larger or smaller limits. Removing the definition of LINK_MAX would fix this for limits up to 32767. The limit in ext2fs is 32000 and the limit in ext2fs is 65000. 65000 is not supported in FreeBSD. It doesn't fit in nlink_t. It leaves 536 out of band vales in a 16-bit unsigned nlink_t. One of these can be VNOVAL after type puns to make VNOVAL 65535. % if (vap->va_flags != VNOVAL) { Flags have enough spare bits. va_flags is u_long, so type puns occur implicitly in this comparison. The flags type(s) have even more design botches than older types. A mixture of signed int, uint32_t and u_long is used for flags variables. % * Go through the fields and update iff not VNOVAL. % if (vap->va_uid != (uid_t)VNOVAL || vap->va_gid != (gid_t)VNOVAL) { Here the type puns are done explicitly (so they are not really puns). The types here are unsigned, so there are no unportabilities in these conversions. It is just accidental that VNOVAL = -1 matches the POSIX magic number -1 (even before the conversions). The code depends on this. % if (vap->va_size != VNOVAL) { A size of -1 is impossible, but va_size is unsigned so the usual type puns occur and the out of band value is actually 0xffffffffffffffff. That should be large enough for anyone. It is currently physically impossible, and also theoretically impossible, since file offsets are signed so they can only reach half as high. % if (vap->va_atime.tv_sec != VNOVAL || % vap->va_mtime.tv_sec != VNOVAL || % vap->va_birthtime.tv_sec != VNOVAL) { % if (vap->va_atime.tv_sec != VNOVAL) % if (vap->va_mtime.tv_sec != VNOVAL) % if (vap->va_birthtime.tv_sec != VNOVAL && % if (vap->va_atime.tv_sec != VNOVAL) { % if (vap->va_mtime.tv_sec != VNOVAL) { % if (vap->va_birthtime.tv_sec != VNOVAL && time_t is signed, so the out of band value is 1 second before the Epoch, not (via type puns) 1 second before the time_t's roll over. This magic value is also reserved for reporting errors in C (for mktime(), etc.). Error handling is especially difficult for APIs like mktime(), strtol(), and some syscalls since the error value is also a supported in-band. For strtol(), it is a very normal value. In C, the representation can be anything so the error value can be for any time. Implementations should avoid using it for a useful time, but portable applications cannot depend on this. In POSIX, the error value must be 1 second before the Epoch and that is an interesting time. % if (vap->va_mode != (mode_t)VNOVAL) { The 16-bit mode_t is not quite full (type 0170000 is free), so VNOVAL is out of band. Oops. There would be no problem even if mode_t were full, since it gets promoted and since it is unsigned it cannot promote to -1. Similarly for nlink_t if it were unsigned. Bruce From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 10:25:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4D44D5A0; Wed, 28 Jan 2015 10:25:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38D77CFC; Wed, 28 Jan 2015 10:25:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0SAPaSZ048119; Wed, 28 Jan 2015 10:25:36 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0SAPamv048118; Wed, 28 Jan 2015 10:25:36 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501281025.t0SAPamv048118@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 28 Jan 2015 10:25:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277827 - head/sys/fs/tmpfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 10:25:36 -0000 Author: kib Date: Wed Jan 28 10:25:35 2015 New Revision: 277827 URL: https://svnweb.freebsd.org/changeset/base/277827 Log: tmpfs does not use UVM on FreeBSD. Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/sys/fs/tmpfs/tmpfs_vfsops.c Modified: head/sys/fs/tmpfs/tmpfs_vfsops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vfsops.c Wed Jan 28 08:56:48 2015 (r277826) +++ head/sys/fs/tmpfs/tmpfs_vfsops.c Wed Jan 28 10:25:35 2015 (r277827) @@ -33,10 +33,10 @@ /* * Efficient memory file system. * - * tmpfs is a file system that uses NetBSD's virtual memory sub-system - * (the well-known UVM) to store file data and metadata in an efficient - * way. This means that it does not follow the structure of an on-disk - * file system because it simply does not need to. Instead, it uses + * tmpfs is a file system that uses FreeBSD's virtual memory + * sub-system to store file data and metadata in an efficient way. + * This means that it does not follow the structure of an on-disk file + * system because it simply does not need to. Instead, it uses * memory-specific data structures and algorithms to automatically * allocate and release resources. */ From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 10:37:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE3AC890; Wed, 28 Jan 2015 10:37:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BECE4E1A; Wed, 28 Jan 2015 10:37:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0SAbPAU053103; Wed, 28 Jan 2015 10:37:25 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0SAbNR3053095; Wed, 28 Jan 2015 10:37:23 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501281037.t0SAbNR3053095@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 28 Jan 2015 10:37:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277828 - in head/sys: fs/tmpfs vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 10:37:26 -0000 Author: kib Date: Wed Jan 28 10:37:23 2015 New Revision: 277828 URL: https://svnweb.freebsd.org/changeset/base/277828 Log: Update mtime for tmpfs files modified through memory mapping. Similar to UFS, perform updates during syncer scans, which in particular means that tmpfs now performs scan on sync. Also, this means that a mtime update may be delayed up to 30 seconds after the write. The vm_object' OBJ_TMPFS_DIRTY flag for tmpfs swap object is similar to the OBJ_MIGHTBEDIRTY flag for the vnode object, it indicates that object could have been dirtied. Adapt fast page fault handler and vm_object_set_writeable_dirty() to handle OBJ_TMPFS_NODE same as OBJT_VNODE. Reported by: Ronald Klop Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/fs/tmpfs/tmpfs.h head/sys/fs/tmpfs/tmpfs_subr.c head/sys/fs/tmpfs/tmpfs_vfsops.c head/sys/fs/tmpfs/tmpfs_vnops.c head/sys/vm/vm_fault.c head/sys/vm/vm_object.c head/sys/vm/vm_object.h Modified: head/sys/fs/tmpfs/tmpfs.h ============================================================================== --- head/sys/fs/tmpfs/tmpfs.h Wed Jan 28 10:25:35 2015 (r277827) +++ head/sys/fs/tmpfs/tmpfs.h Wed Jan 28 10:37:23 2015 (r277828) @@ -398,6 +398,7 @@ int tmpfs_alloc_vp(struct mount *, struc void tmpfs_free_vp(struct vnode *); int tmpfs_alloc_file(struct vnode *, struct vnode **, struct vattr *, struct componentname *, char *); +void tmpfs_check_mtime(struct vnode *); void tmpfs_dir_attach(struct vnode *, struct tmpfs_dirent *); void tmpfs_dir_detach(struct vnode *, struct tmpfs_dirent *); void tmpfs_dir_destroy(struct tmpfs_mount *, struct tmpfs_node *); Modified: head/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_subr.c Wed Jan 28 10:25:35 2015 (r277827) +++ head/sys/fs/tmpfs/tmpfs_subr.c Wed Jan 28 10:37:23 2015 (r277828) @@ -1415,6 +1415,31 @@ retry: return (0); } +void +tmpfs_check_mtime(struct vnode *vp) +{ + struct tmpfs_node *node; + struct vm_object *obj; + + ASSERT_VOP_ELOCKED(vp, "check_mtime"); + if (vp->v_type != VREG) + return; + node = VP_TO_TMPFS_NODE(vp); + obj = vp->v_object; + KASSERT((obj->flags & (OBJ_TMPFS_NODE | OBJ_TMPFS)) == + (OBJ_TMPFS_NODE | OBJ_TMPFS), ("non-tmpfs obj")); + /* unlocked read */ + if ((obj->flags & OBJ_TMPFS_DIRTY) != 0) { + VM_OBJECT_WLOCK(obj); + if ((obj->flags & OBJ_TMPFS_DIRTY) != 0) { + obj->flags &= ~OBJ_TMPFS_DIRTY; + node = VP_TO_TMPFS_NODE(vp); + node->tn_status |= TMPFS_NODE_MODIFIED; + } + VM_OBJECT_WUNLOCK(obj); + } +} + /* * Change flags of the given vnode. * Caller should execute tmpfs_update on vp after a successful execution. Modified: head/sys/fs/tmpfs/tmpfs_vfsops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vfsops.c Wed Jan 28 10:25:35 2015 (r277827) +++ head/sys/fs/tmpfs/tmpfs_vfsops.c Wed Jan 28 10:37:23 2015 (r277828) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -418,11 +419,45 @@ tmpfs_statfs(struct mount *mp, struct st static int tmpfs_sync(struct mount *mp, int waitfor) { + struct vnode *vp, *mvp; + struct vm_object *obj; if (waitfor == MNT_SUSPEND) { MNT_ILOCK(mp); mp->mnt_kern_flag |= MNTK_SUSPEND2 | MNTK_SUSPENDED; MNT_IUNLOCK(mp); + } else if (waitfor == MNT_LAZY) { + /* + * Handle lazy updates of mtime from writes to mmaped + * regions. Use MNT_VNODE_FOREACH_ALL instead of + * MNT_VNODE_FOREACH_ACTIVE, since unmap of the + * tmpfs-backed vnode does not call vinactive(), due + * to vm object type is OBJT_SWAP. + */ + MNT_VNODE_FOREACH_ALL(vp, mp, mvp) { + if (vp->v_type != VREG) { + VI_UNLOCK(vp); + continue; + } + obj = vp->v_object; + KASSERT((obj->flags & (OBJ_TMPFS_NODE | OBJ_TMPFS)) == + (OBJ_TMPFS_NODE | OBJ_TMPFS), ("non-tmpfs obj")); + + /* + * Unlocked read, avoid taking vnode lock if + * not needed. Lost update will be handled on + * the next call. + */ + if ((obj->flags & OBJ_TMPFS_DIRTY) == 0) { + VI_UNLOCK(vp); + continue; + } + if (vget(vp, LK_EXCLUSIVE | LK_RETRY | LK_INTERLOCK, + curthread) != 0) + continue; + tmpfs_check_mtime(vp); + vput(vp); + } } return (0); } Modified: head/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vnops.c Wed Jan 28 10:25:35 2015 (r277827) +++ head/sys/fs/tmpfs/tmpfs_vnops.c Wed Jan 28 10:37:23 2015 (r277828) @@ -505,6 +505,7 @@ tmpfs_fsync(struct vop_fsync_args *v) MPASS(VOP_ISLOCKED(vp)); + tmpfs_check_mtime(vp); tmpfs_update(vp); return 0; @@ -1222,16 +1223,16 @@ tmpfs_readlink(struct vop_readlink_args static int tmpfs_inactive(struct vop_inactive_args *v) { - struct vnode *vp = v->a_vp; - + struct vnode *vp; struct tmpfs_node *node; + vp = v->a_vp; node = VP_TO_TMPFS_NODE(vp); - if (node->tn_links == 0) vrecycle(vp); - - return 0; + else + tmpfs_check_mtime(vp); + return (0); } int Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Wed Jan 28 10:25:35 2015 (r277827) +++ head/sys/vm/vm_fault.c Wed Jan 28 10:37:23 2015 (r277828) @@ -358,11 +358,13 @@ RetryFault:; (fault_flags & (VM_FAULT_CHANGE_WIRING | VM_FAULT_DIRTY)) == 0 && /* avoid calling vm_object_set_writeable_dirty() */ ((prot & VM_PROT_WRITE) == 0 || - fs.first_object->type != OBJT_VNODE || + (fs.first_object->type != OBJT_VNODE && + (fs.first_object->flags & OBJ_TMPFS_NODE) == 0) || (fs.first_object->flags & OBJ_MIGHTBEDIRTY) != 0)) { VM_OBJECT_RLOCK(fs.first_object); if ((prot & VM_PROT_WRITE) != 0 && - fs.first_object->type == OBJT_VNODE && + (fs.first_object->type == OBJT_VNODE || + (fs.first_object->flags & OBJ_TMPFS_NODE) != 0) && (fs.first_object->flags & OBJ_MIGHTBEDIRTY) == 0) goto fast_failed; m = vm_page_lookup(fs.first_object, fs.first_pindex); Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Wed Jan 28 10:25:35 2015 (r277827) +++ head/sys/vm/vm_object.c Wed Jan 28 10:37:23 2015 (r277828) @@ -2199,8 +2199,13 @@ vm_object_set_writeable_dirty(vm_object_ { VM_OBJECT_ASSERT_WLOCKED(object); - if (object->type != OBJT_VNODE) + if (object->type != OBJT_VNODE) { + if ((object->flags & OBJ_TMPFS_NODE) != 0) { + KASSERT(object->type == OBJT_SWAP, ("non-swap tmpfs")); + vm_object_set_flag(object, OBJ_TMPFS_DIRTY); + } return; + } object->generation++; if ((object->flags & OBJ_MIGHTBEDIRTY) != 0) return; Modified: head/sys/vm/vm_object.h ============================================================================== --- head/sys/vm/vm_object.h Wed Jan 28 10:25:35 2015 (r277827) +++ head/sys/vm/vm_object.h Wed Jan 28 10:37:23 2015 (r277828) @@ -187,6 +187,7 @@ struct vm_object { #define OBJ_PIPWNT 0x0040 /* paging in progress wanted */ #define OBJ_MIGHTBEDIRTY 0x0100 /* object might be dirty, only for vnode */ #define OBJ_TMPFS_NODE 0x0200 /* object belongs to tmpfs VREG node */ +#define OBJ_TMPFS_DIRTY 0x0400 /* dirty tmpfs obj */ #define OBJ_COLORED 0x1000 /* pg_color is defined */ #define OBJ_ONEMAPPING 0x2000 /* One USE (a single, non-forked) mapping flag */ #define OBJ_DISCONNECTWNT 0x4000 /* disconnect from vnode wanted */ From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 10:40:16 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7252BA42; Wed, 28 Jan 2015 10:40:16 +0000 (UTC) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 0AD35E3B; Wed, 28 Jan 2015 10:40:16 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id 74523D6717B; Wed, 28 Jan 2015 21:16:58 +1100 (AEDT) Date: Wed, 28 Jan 2015 21:16:57 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Baptiste Daroussin Subject: Re: svn commit: r277764 - in head/usr.sbin/pw: . tests In-Reply-To: <201501261650.t0QGohSI044141@svn.freebsd.org> Message-ID: <20150128210631.Q2199@besplex.bde.org> References: <201501261650.t0QGohSI044141@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=C77Ql2/+ c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=TA7HtaPY_puZ0PvRsjQA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 10:40:16 -0000 On Mon, 26 Jan 2015, Baptiste Daroussin wrote: > Log: > Revert r277652 > > uid and gid are never and should never be negative. The pw(8) manpage clearly > states the -u and -g arguments are for uids/gids, hence using negative values is > abusing a bug in former versions of pw(8) Thanks. Further discussion showed that the historical misbehaviour is more common than I thought, so this doesn't resolve the problem in pw. But it seems reasonable to start disallowing creating negative ids in utilities for creating ids. Ones that used to allow it should at least allow creating all the positive ids that the negative ids were accidentally mapped to (like -2 -> huge value). Bruce From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 11:38:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ABC5589C; Wed, 28 Jan 2015 11:38:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9795C69C; Wed, 28 Jan 2015 11:38:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0SBcDhL081492; Wed, 28 Jan 2015 11:38:13 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0SBcDb0081491; Wed, 28 Jan 2015 11:38:13 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501281138.t0SBcDb0081491@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 28 Jan 2015 11:38:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277829 - head/contrib/netbsd-tests/bin/expr X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 11:38:13 -0000 Author: ngie Date: Wed Jan 28 11:38:12 2015 New Revision: 277829 URL: https://svnweb.freebsd.org/changeset/base/277829 Log: Revert r277357 as expr has been enhanced to better detect overflow conditions, and now the tests pass PR: 196867 X-MFC with: r277798 MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/netbsd-tests/bin/expr/t_expr.sh Modified: head/contrib/netbsd-tests/bin/expr/t_expr.sh ============================================================================== --- head/contrib/netbsd-tests/bin/expr/t_expr.sh Wed Jan 28 10:37:23 2015 (r277828) +++ head/contrib/netbsd-tests/bin/expr/t_expr.sh Wed Jan 28 11:38:12 2015 (r277829) @@ -54,9 +54,6 @@ overflow_head() { atf_set "descr" "Test overflow cases" } overflow_body() { - # Begin FreeBSD - atf_expect_fail "FreeBSD's expr does not check overflow to the same degree NetBSD's expr does; see bug 196867 for more details" - # End FreeBSD test_expr '4611686018427387904 + 4611686018427387903' \ '9223372036854775807' test_expr '4611686018427387904 + 4611686018427387904' \ From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 13:56:33 2015 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AB0DC523; Wed, 28 Jan 2015 13:56:33 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 8C5406EE; Wed, 28 Jan 2015 13:56:32 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id PAA27046; Wed, 28 Jan 2015 15:58:22 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1YGT6b-000CsX-11; Wed, 28 Jan 2015 15:56:29 +0200 Message-ID: <54C8EA55.2060403@FreeBSD.org> Date: Wed, 28 Jan 2015 15:55:33 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Ivan Klymenko Subject: Re: svn commit: r277796 - in head/sys: dev/acpica dev/syscons dev/vt sys References: <201501271733.t0RHXJ3M058422@svn.freebsd.org> <20150128003623.4f843a5c@nonamehost.local> In-Reply-To: <20150128003623.4f843a5c@nonamehost.local> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 13:56:33 -0000 On 28/01/2015 00:36, Ivan Klymenko wrote: > acpiconf -s 3 works perfectly, but there is one problem. > I use not the main timecounter > kern.timecounter.hardware=HPET > after turning on the power button does not occur laptop recovery hdac0 > and it is likely that the same applies to the timer. > Indirect evidence of this - it's a quick video playback, for example in > flash on YouTube. > > dmesg_first : http://pastebin.com/a4gC5PGy > dmesg_afterS3 : http://pastebin.com/vyHtrakZ > > my HW: > > pciconf -lvbce : > https://bz-attachments.freebsd.org/attachment.cgi?id=148947 > devinfo -vr : > https://bz-attachments.freebsd.org/attachment.cgi?id=148948 Is that a new problem introduced by this commit? I have a hard time connecting the described symptoms to the code affected by this commit. -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 14:00:20 2015 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D673B708; Wed, 28 Jan 2015 14:00:20 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id B73FC783; Wed, 28 Jan 2015 14:00:18 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id PAA27016; Wed, 28 Jan 2015 15:56:26 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1YGT4i-000CsF-Dx; Wed, 28 Jan 2015 15:54:32 +0200 Message-ID: <54C8E9DE.4080709@FreeBSD.org> Date: Wed, 28 Jan 2015 15:53:34 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Konstantin Belousov Subject: Re: svn commit: r277796 - in head/sys: dev/acpica dev/syscons dev/vt sys References: <201501271733.t0RHXJ3M058422@svn.freebsd.org> <20150127174742.GI42409@kib.kiev.ua> In-Reply-To: <20150127174742.GI42409@kib.kiev.ua> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 14:00:20 -0000 On 27/01/2015 19:47, Konstantin Belousov wrote: > On Tue, Jan 27, 2015 at 05:33:19PM +0000, Andriy Gapon wrote: >> >> + EVENTHANDLER_INVOKE(power_suspend_early); >> + stop_all_proc(); > It also makes sense to call syncer_suspend() after stop_all_proc(), > I suppose. It would ensure that a failed resume still ends with the > consistent filesystem metadata. Probably yes. I can make that change if you endorse it. Or you can make it if that'll be faster. Thanks! -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 14:27:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DCB39391; Wed, 28 Jan 2015 14:27:48 +0000 (UTC) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.81]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9CF1BAD0; Wed, 28 Jan 2015 14:27:48 +0000 (UTC) Received: from smtp.greenhost.nl ([213.108.104.138]) by smarthost1.greenhost.nl with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1YGTag-00077M-UG; Wed, 28 Jan 2015 15:27:40 +0100 Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes To: svn-src-all@freebsd.org, "Konstantin Belousov" Subject: Re: svn commit: r277828 - in head/sys: fs/tmpfs vm References: <201501281037.t0SAbNR3053095@svn.freebsd.org> Date: Wed, 28 Jan 2015 15:27:33 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Ronald Klop" Message-ID: In-Reply-To: <201501281037.t0SAbNR3053095@svn.freebsd.org> User-Agent: Opera Mail/12.16 (FreeBSD) X-Authenticated-As-Hash: 398f5522cb258ce43cb679602f8cfe8b62a256d1 X-Virus-Scanned: by clamav at smarthost1.samage.net X-Spam-Level: / X-Spam-Score: -0.2 X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 autolearn=disabled version=3.3.1 X-Scan-Signature: 58b71aa6e1934e3187a466617820a917 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 14:27:49 -0000 On Wed, 28 Jan 2015 11:37:23 +0100, Konstantin Belousov wrote: > Author: kib > Date: Wed Jan 28 10:37:23 2015 > New Revision: 277828 > URL: https://svnweb.freebsd.org/changeset/base/277828 > > Log: > Update mtime for tmpfs files modified through memory mapping. Similar Thanks a lot. It runs now and seems to work pretty well. FreeBSD 11.0-CURRENT #3 r277829M: Wed Jan 28 14:54:24 CET 2015 root@******:/usr/obj-arm/arm.arm/usr/src-arm/sys/SHEEVAPLUG arm Regards, Ronald. > to UFS, perform updates during syncer scans, which in particular means > that tmpfs now performs scan on sync. Also, this means that a mtime > update may be delayed up to 30 seconds after the write. > The vm_object' OBJ_TMPFS_DIRTY flag for tmpfs swap object is similar > to the OBJ_MIGHTBEDIRTY flag for the vnode object, it indicates that > object could have been dirtied. Adapt fast page fault handler and > vm_object_set_writeable_dirty() to handle OBJ_TMPFS_NODE same as > OBJT_VNODE. > Reported by: Ronald Klop > Tested by: pho > Sponsored by: The FreeBSD Foundation > MFC after: 2 weeks > > Modified: > head/sys/fs/tmpfs/tmpfs.h > head/sys/fs/tmpfs/tmpfs_subr.c > head/sys/fs/tmpfs/tmpfs_vfsops.c > head/sys/fs/tmpfs/tmpfs_vnops.c > head/sys/vm/vm_fault.c > head/sys/vm/vm_object.c > head/sys/vm/vm_object.h > > Modified: head/sys/fs/tmpfs/tmpfs.h > ============================================================================== > --- head/sys/fs/tmpfs/tmpfs.h Wed Jan 28 10:25:35 2015 (r277827) > +++ head/sys/fs/tmpfs/tmpfs.h Wed Jan 28 10:37:23 2015 (r277828) > @@ -398,6 +398,7 @@ int tmpfs_alloc_vp(struct mount *, struc > void tmpfs_free_vp(struct vnode *); > int tmpfs_alloc_file(struct vnode *, struct vnode **, struct vattr *, > struct componentname *, char *); > +void tmpfs_check_mtime(struct vnode *); > void tmpfs_dir_attach(struct vnode *, struct tmpfs_dirent *); > void tmpfs_dir_detach(struct vnode *, struct tmpfs_dirent *); > void tmpfs_dir_destroy(struct tmpfs_mount *, struct tmpfs_node *); > > Modified: head/sys/fs/tmpfs/tmpfs_subr.c > ============================================================================== > --- head/sys/fs/tmpfs/tmpfs_subr.c Wed Jan 28 10:25:35 2015 (r277827) > +++ head/sys/fs/tmpfs/tmpfs_subr.c Wed Jan 28 10:37:23 2015 (r277828) > @@ -1415,6 +1415,31 @@ retry: > return (0); > } > +void > +tmpfs_check_mtime(struct vnode *vp) > +{ > + struct tmpfs_node *node; > + struct vm_object *obj; > + > + ASSERT_VOP_ELOCKED(vp, "check_mtime"); > + if (vp->v_type != VREG) > + return; > + node = VP_TO_TMPFS_NODE(vp); > + obj = vp->v_object; > + KASSERT((obj->flags & (OBJ_TMPFS_NODE | OBJ_TMPFS)) == > + (OBJ_TMPFS_NODE | OBJ_TMPFS), ("non-tmpfs obj")); > + /* unlocked read */ > + if ((obj->flags & OBJ_TMPFS_DIRTY) != 0) { > + VM_OBJECT_WLOCK(obj); > + if ((obj->flags & OBJ_TMPFS_DIRTY) != 0) { > + obj->flags &= ~OBJ_TMPFS_DIRTY; > + node = VP_TO_TMPFS_NODE(vp); > + node->tn_status |= TMPFS_NODE_MODIFIED; > + } > + VM_OBJECT_WUNLOCK(obj); > + } > +} > + > /* > * Change flags of the given vnode. > * Caller should execute tmpfs_update on vp after a successful > execution. > > Modified: head/sys/fs/tmpfs/tmpfs_vfsops.c > ============================================================================== > --- head/sys/fs/tmpfs/tmpfs_vfsops.c Wed Jan 28 10:25:35 2015 (r277827) > +++ head/sys/fs/tmpfs/tmpfs_vfsops.c Wed Jan 28 10:37:23 2015 (r277828) > @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > #include > @@ -418,11 +419,45 @@ tmpfs_statfs(struct mount *mp, struct st > static int > tmpfs_sync(struct mount *mp, int waitfor) > { > + struct vnode *vp, *mvp; > + struct vm_object *obj; > if (waitfor == MNT_SUSPEND) { > MNT_ILOCK(mp); > mp->mnt_kern_flag |= MNTK_SUSPEND2 | MNTK_SUSPENDED; > MNT_IUNLOCK(mp); > + } else if (waitfor == MNT_LAZY) { > + /* > + * Handle lazy updates of mtime from writes to mmaped > + * regions. Use MNT_VNODE_FOREACH_ALL instead of > + * MNT_VNODE_FOREACH_ACTIVE, since unmap of the > + * tmpfs-backed vnode does not call vinactive(), due > + * to vm object type is OBJT_SWAP. > + */ > + MNT_VNODE_FOREACH_ALL(vp, mp, mvp) { > + if (vp->v_type != VREG) { > + VI_UNLOCK(vp); > + continue; > + } > + obj = vp->v_object; > + KASSERT((obj->flags & (OBJ_TMPFS_NODE | OBJ_TMPFS)) == > + (OBJ_TMPFS_NODE | OBJ_TMPFS), ("non-tmpfs obj")); > + > + /* > + * Unlocked read, avoid taking vnode lock if > + * not needed. Lost update will be handled on > + * the next call. > + */ > + if ((obj->flags & OBJ_TMPFS_DIRTY) == 0) { > + VI_UNLOCK(vp); > + continue; > + } > + if (vget(vp, LK_EXCLUSIVE | LK_RETRY | LK_INTERLOCK, > + curthread) != 0) > + continue; > + tmpfs_check_mtime(vp); > + vput(vp); > + } > } > return (0); > } > > Modified: head/sys/fs/tmpfs/tmpfs_vnops.c > ============================================================================== > --- head/sys/fs/tmpfs/tmpfs_vnops.c Wed Jan 28 10:25:35 2015 (r277827) > +++ head/sys/fs/tmpfs/tmpfs_vnops.c Wed Jan 28 10:37:23 2015 (r277828) > @@ -505,6 +505,7 @@ tmpfs_fsync(struct vop_fsync_args *v) > MPASS(VOP_ISLOCKED(vp)); > + tmpfs_check_mtime(vp); > tmpfs_update(vp); > return 0; > @@ -1222,16 +1223,16 @@ tmpfs_readlink(struct vop_readlink_args > static int > tmpfs_inactive(struct vop_inactive_args *v) > { > - struct vnode *vp = v->a_vp; > - > + struct vnode *vp; > struct tmpfs_node *node; > + vp = v->a_vp; > node = VP_TO_TMPFS_NODE(vp); > - > if (node->tn_links == 0) > vrecycle(vp); > - > - return 0; > + else > + tmpfs_check_mtime(vp); > + return (0); > } > int > > Modified: head/sys/vm/vm_fault.c > ============================================================================== > --- head/sys/vm/vm_fault.c Wed Jan 28 10:25:35 2015 (r277827) > +++ head/sys/vm/vm_fault.c Wed Jan 28 10:37:23 2015 (r277828) > @@ -358,11 +358,13 @@ RetryFault:; > (fault_flags & (VM_FAULT_CHANGE_WIRING | VM_FAULT_DIRTY)) == 0 && > /* avoid calling vm_object_set_writeable_dirty() */ > ((prot & VM_PROT_WRITE) == 0 || > - fs.first_object->type != OBJT_VNODE || > + (fs.first_object->type != OBJT_VNODE && > + (fs.first_object->flags & OBJ_TMPFS_NODE) == 0) || > (fs.first_object->flags & OBJ_MIGHTBEDIRTY) != 0)) { > VM_OBJECT_RLOCK(fs.first_object); > if ((prot & VM_PROT_WRITE) != 0 && > - fs.first_object->type == OBJT_VNODE && > + (fs.first_object->type == OBJT_VNODE || > + (fs.first_object->flags & OBJ_TMPFS_NODE) != 0) && > (fs.first_object->flags & OBJ_MIGHTBEDIRTY) == 0) > goto fast_failed; > m = vm_page_lookup(fs.first_object, fs.first_pindex); > > Modified: head/sys/vm/vm_object.c > ============================================================================== > --- head/sys/vm/vm_object.c Wed Jan 28 10:25:35 2015 (r277827) > +++ head/sys/vm/vm_object.c Wed Jan 28 10:37:23 2015 (r277828) > @@ -2199,8 +2199,13 @@ vm_object_set_writeable_dirty(vm_object_ > { > VM_OBJECT_ASSERT_WLOCKED(object); > - if (object->type != OBJT_VNODE) > + if (object->type != OBJT_VNODE) { > + if ((object->flags & OBJ_TMPFS_NODE) != 0) { > + KASSERT(object->type == OBJT_SWAP, ("non-swap tmpfs")); > + vm_object_set_flag(object, OBJ_TMPFS_DIRTY); > + } > return; > + } > object->generation++; > if ((object->flags & OBJ_MIGHTBEDIRTY) != 0) > return; > > Modified: head/sys/vm/vm_object.h > ============================================================================== > --- head/sys/vm/vm_object.h Wed Jan 28 10:25:35 2015 (r277827) > +++ head/sys/vm/vm_object.h Wed Jan 28 10:37:23 2015 (r277828) > @@ -187,6 +187,7 @@ struct vm_object { > #define OBJ_PIPWNT 0x0040 /* paging in progress wanted */ > #define OBJ_MIGHTBEDIRTY 0x0100 /* object might be dirty, only for > vnode */ > #define OBJ_TMPFS_NODE 0x0200 /* object belongs to tmpfs VREG node */ > +#define OBJ_TMPFS_DIRTY 0x0400 /* dirty tmpfs obj */ > #define OBJ_COLORED 0x1000 /* pg_color is defined */ > #define OBJ_ONEMAPPING 0x2000 /* One USE (a single, non-forked) > mapping flag */ > #define OBJ_DISCONNECTWNT 0x4000 /* disconnect from vnode wanted */ > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 15:24:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3B1DB390 for ; Wed, 28 Jan 2015 15:24:52 +0000 (UTC) Received: from nm5-vm0.bullet.mail.bf1.yahoo.com (nm5-vm0.bullet.mail.bf1.yahoo.com [98.139.213.150]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC2CE1A3 for ; Wed, 28 Jan 2015 15:24:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1422458684; bh=NLBiZgQPth+/12ieN8JufKaBENBhOnkuLLTrEfV3Ueg=; h=Date:From:To:CC:Subject:References:In-Reply-To:From:Subject; b=cssPSnE6HTo/G0CpRikmkOBncAxDoUKs7sX0XJyqpgOvF5aalwW4sDWi2XNQCE9sF6RsW2y4FaPYjCFtem/HsNBXUcyt6p5st3TvHH7bKjn8GHCm+TEIrJpYRzj3nRvd3vxZmTZkLxAWLFBPBBe/210NxW6r8frTe0vbBscpVwd1aJ9bZvv9JeDbCYONVcxpwKt1UduiWEzaGoR/467D2qim3iz+Y4iZuWYbHsTdgSsC86g+j7Ilm8VyrhAfvDJrq8VwjvQQuxsIrwz5IkOz3DP0G77yvuHVD7JQBFmGaxViIRfSkyrafotovkAXXvsfMiFNrvAVo/WhZV1OEwX/sw== Received: from [66.196.81.174] by nm5.bullet.mail.bf1.yahoo.com with NNFMP; 28 Jan 2015 15:24:44 -0000 Received: from [98.139.211.202] by tm20.bullet.mail.bf1.yahoo.com with NNFMP; 28 Jan 2015 15:24:44 -0000 Received: from [127.0.0.1] by smtp211.mail.bf1.yahoo.com with NNFMP; 28 Jan 2015 15:24:44 -0000 X-Yahoo-Newman-Id: 702451.55031.bm@smtp211.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: I1YuD.MVM1m5SfG9HPv.uPf1lB7CrplqKO1OGPLchktG4X5 SbML114SFm8UO9VUdnOQS0nvvPAXpEHZsmsN3RhrlcF4BtYlSvlU6vvayBz. X64XC.Aa53L5boiHK.kgSjIo7M0jMCARetp8z8KNQlnK8cPtsDcySlpPiM87 8R2SSnjSL_xsEMJ05oIJs8pWq1NMVFxoeB52V_f9X_nzPp56B3IzYQP2G716 mmM_SQtmndOyRexDGeJGtacUNE0nDAEFSTM_elILD1qYzlKjZlU5It1y44pN ZswafVzmW9prk0tSZYdICyMYpqulwAzo9IOSKoBonCjEkDA_jL.2rNYzCs.2 QyF1EbnQ7hoIgzNdM_s3wqQLOFVctk6tdZ06MimwIdDWlZ0rCOH4GvL_rMGs J1OcB0fUOaXfE8vv7B5hae_lImmPHUYpr5Ty3fXpnWjyZTJsXViVAPeu1upi YpLHtEoG870AfMZpmOpnr6A5ezeLC2m230O9HEFaZoWOUlhGXLxQqyMLQlae DxOb8QTg_ICLbO.yTKmPqc133IptfYryGDc6_riCrPxN10s_xsdU_W6Ups4. M6.PrBpRN1M81d37B48UAulncQDxoHheNLduRVRZAA7hT.Dv4f07vnnXz3T6 q6Dawh8UxMG9_F9w8 X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <54C8FF53.5030709@FreeBSD.org> Date: Wed, 28 Jan 2015 10:25:07 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Bruce Evans Subject: Re: svn commit: r277802 - head/usr.bin/sed References: <201501271858.t0RIwO3n096590@svn.freebsd.org> <20150128190500.T1832@besplex.bde.org> In-Reply-To: <20150128190500.T1832@besplex.bde.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 15:24:52 -0000 Hello; On 01/28/15 03:41, Bruce Evans wrote: > On Tue, 27 Jan 2015, Pedro F. Giffuni wrote: > >> Log: >> Fix resource leak and dereference after NULL. >> >> process.c: >> Protect access against NULL. >> >> main.c: >> Prevent outfile overwrite resource leak. >> ... >> Modified: head/usr.bin/sed/main.c >> ============================================================================== >> >> --- head/usr.bin/sed/main.c Tue Jan 27 18:56:46 2015 (r277801) >> +++ head/usr.bin/sed/main.c Tue Jan 27 18:58:24 2015 (r277802) >> @@ -411,6 +411,8 @@ mf_fgets(SPACE *sp, enum e_spflag spflag >> unlink(tmpfname); >> if ((outfile = fopen(tmpfname, "w")) == NULL) >> err(1, "%s", fname); >> + if (outfile != NULL && outfile != stdout) >> + fclose(outfile); >> fchown(fileno(outfile), sb.st_uid, sb.st_gid); >> fchmod(fileno(outfile), sb.st_mode & ALLPERMS); >> outfname = tmpfname; > > This is mismerged at best. It just breaks the new outfile by closing it. > The check in it makes no sense in this contents, since the freshly-opened > outfile cannot be NULL (since the open succeeded) or stdout (fopen() > cannot return a pointer to an already-open stream, so it can only return > stdout if the stdout pointer is garbage, but then it is not really > stdout). > Yes, I pasted the check after it was useful and not before like the original. I noticed right away and fixed it though: https://svnweb.freebsd.org/base?view=revision&revision=277811 But thanks for checking! Pedro. From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 15:27:16 2015 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 70430529; Wed, 28 Jan 2015 15:27:16 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 EF49D1CD; Wed, 28 Jan 2015 15:27:15 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t0SFR5WR098228 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 28 Jan 2015 17:27:05 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t0SFR5WR098228 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t0SFR5SP098226; Wed, 28 Jan 2015 17:27:05 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 28 Jan 2015 17:27:05 +0200 From: Konstantin Belousov To: Andriy Gapon Subject: Re: svn commit: r277796 - in head/sys: dev/acpica dev/syscons dev/vt sys Message-ID: <20150128152705.GM42409@kib.kiev.ua> References: <201501271733.t0RHXJ3M058422@svn.freebsd.org> <20150127174742.GI42409@kib.kiev.ua> <54C8E9DE.4080709@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54C8E9DE.4080709@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) 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.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 15:27:16 -0000 On Wed, Jan 28, 2015 at 03:53:34PM +0200, Andriy Gapon wrote: > On 27/01/2015 19:47, Konstantin Belousov wrote: > > On Tue, Jan 27, 2015 at 05:33:19PM +0000, Andriy Gapon wrote: > >> > >> + EVENTHANDLER_INVOKE(power_suspend_early); > >> + stop_all_proc(); > > It also makes sense to call syncer_suspend() after stop_all_proc(), > > I suppose. It would ensure that a failed resume still ends with the > > consistent filesystem metadata. > > Probably yes. I can make that change if you endorse it. Or you can make it if > that'll be faster. Thanks! I prefer that the change is made by somebody who uses and tests the suspension code, i.e. you. From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 15:36:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9CDA37F1; Wed, 28 Jan 2015 15:36:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6E33A2E3; Wed, 28 Jan 2015 15:36:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0SFaPxi094235; Wed, 28 Jan 2015 15:36:25 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0SFaPDL094233; Wed, 28 Jan 2015 15:36:25 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501281536.t0SFaPDL094233@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 28 Jan 2015 15:36:25 +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: r277832 - stable/10/sys/fs/ext2fs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 15:36:25 -0000 Author: pfg Date: Wed Jan 28 15:36:24 2015 New Revision: 277832 URL: https://svnweb.freebsd.org/changeset/base/277832 Log: MFC r277340, r277349: Remove dead code. After the ext2 variant of the "orlov allocator" was implemented, the case for a negative or zero dirsize disappeared. Drop the dead code and unsign dirsize given that it can't be negative anyways. ext2fs: fix for uninitialized pointer read. path.ep_bp was being used uninitialized in ext4_ext_find_extent(). CID: 1062344 CID: 1008669 Modified: stable/10/sys/fs/ext2fs/ext2_alloc.c stable/10/sys/fs/ext2fs/ext2_bmap.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/ext2fs/ext2_alloc.c ============================================================================== --- stable/10/sys/fs/ext2fs/ext2_alloc.c Wed Jan 28 14:24:13 2015 (r277831) +++ stable/10/sys/fs/ext2fs/ext2_alloc.c Wed Jan 28 15:36:24 2015 (r277832) @@ -443,11 +443,11 @@ static u_long ext2_dirpref(struct inode *pip) { struct m_ext2fs *fs; - int cg, prefcg, dirsize, cgsize; + int cg, prefcg, cgsize; u_int avgifree, avgbfree, avgndir, curdirsize; u_int minifree, minbfree, maxndir; u_int mincg, minndir; - u_int maxcontigdirs; + u_int dirsize, maxcontigdirs; mtx_assert(EXT2_MTX(pip->i_ump), MA_OWNED); fs = pip->i_e2fs; @@ -498,10 +498,7 @@ ext2_dirpref(struct inode *pip) curdirsize = avgndir ? (cgsize - avgbfree * fs->e2fs_bsize) / avgndir : 0; if (dirsize < curdirsize) dirsize = curdirsize; - if (dirsize <= 0) - maxcontigdirs = 0; /* dirsize overflowed */ - else - maxcontigdirs = min((avgbfree * fs->e2fs_bsize) / dirsize, 255); + maxcontigdirs = min((avgbfree * fs->e2fs_bsize) / dirsize, 255); maxcontigdirs = min(maxcontigdirs, fs->e2fs_ipg / AFPDIR); if (maxcontigdirs == 0) maxcontigdirs = 1; Modified: stable/10/sys/fs/ext2fs/ext2_bmap.c ============================================================================== --- stable/10/sys/fs/ext2fs/ext2_bmap.c Wed Jan 28 14:24:13 2015 (r277831) +++ stable/10/sys/fs/ext2fs/ext2_bmap.c Wed Jan 28 15:36:24 2015 (r277832) @@ -94,7 +94,7 @@ ext4_bmapext(struct vnode *vp, int32_t b struct inode *ip; struct m_ext2fs *fs; struct ext4_extent *ep; - struct ext4_extent_path path; + struct ext4_extent_path path = { .ep_bp = NULL }; daddr_t lbn; ip = VTOI(vp); From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 15:37:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CBEB394A; Wed, 28 Jan 2015 15:37:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D76F305; Wed, 28 Jan 2015 15:37:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0SFbahF094450; Wed, 28 Jan 2015 15:37:36 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0SFbaVu094448; Wed, 28 Jan 2015 15:37:36 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501281537.t0SFbaVu094448@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 28 Jan 2015 15:37:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r277833 - stable/9/sys/fs/ext2fs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 15:37:36 -0000 Author: pfg Date: Wed Jan 28 15:37:35 2015 New Revision: 277833 URL: https://svnweb.freebsd.org/changeset/base/277833 Log: MFC r277340, r277349: Remove dead code. After the ext2 variant of the "orlov allocator" was implemented, the case for a negative or zero dirsize disappeared. Drop the dead code and unsign dirsize given that it can't be negative anyways. ext2fs: fix for uninitialized pointer read. path.ep_bp was being used uninitialized in ext4_ext_find_extent(). CID: 1062344 CID: 1008669 Modified: stable/9/sys/fs/ext2fs/ext2_alloc.c stable/9/sys/fs/ext2fs/ext2_bmap.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/ext2fs/ext2_alloc.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_alloc.c Wed Jan 28 15:36:24 2015 (r277832) +++ stable/9/sys/fs/ext2fs/ext2_alloc.c Wed Jan 28 15:37:35 2015 (r277833) @@ -443,11 +443,11 @@ static u_long ext2_dirpref(struct inode *pip) { struct m_ext2fs *fs; - int cg, prefcg, dirsize, cgsize; + int cg, prefcg, cgsize; u_int avgifree, avgbfree, avgndir, curdirsize; u_int minifree, minbfree, maxndir; u_int mincg, minndir; - u_int maxcontigdirs; + u_int dirsize, maxcontigdirs; mtx_assert(EXT2_MTX(pip->i_ump), MA_OWNED); fs = pip->i_e2fs; @@ -498,10 +498,7 @@ ext2_dirpref(struct inode *pip) curdirsize = avgndir ? (cgsize - avgbfree * fs->e2fs_bsize) / avgndir : 0; if (dirsize < curdirsize) dirsize = curdirsize; - if (dirsize <= 0) - maxcontigdirs = 0; /* dirsize overflowed */ - else - maxcontigdirs = min((avgbfree * fs->e2fs_bsize) / dirsize, 255); + maxcontigdirs = min((avgbfree * fs->e2fs_bsize) / dirsize, 255); maxcontigdirs = min(maxcontigdirs, fs->e2fs_ipg / AFPDIR); if (maxcontigdirs == 0) maxcontigdirs = 1; Modified: stable/9/sys/fs/ext2fs/ext2_bmap.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_bmap.c Wed Jan 28 15:36:24 2015 (r277832) +++ stable/9/sys/fs/ext2fs/ext2_bmap.c Wed Jan 28 15:37:35 2015 (r277833) @@ -94,7 +94,7 @@ ext4_bmapext(struct vnode *vp, int32_t b struct inode *ip; struct m_ext2fs *fs; struct ext4_extent *ep; - struct ext4_extent_path path; + struct ext4_extent_path path = { .ep_bp = NULL }; daddr_t lbn; ip = VTOI(vp); From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 15:46:12 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8D493D24; Wed, 28 Jan 2015 15:46:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60F4A5E6; Wed, 28 Jan 2015 15:46:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0SFkC60099220; Wed, 28 Jan 2015 15:46:12 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0SFkCaP099219; Wed, 28 Jan 2015 15:46:12 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201501281546.t0SFkCaP099219@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 28 Jan 2015 15:46:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277834 - head/usr.sbin/autofs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 15:46:12 -0000 Author: trasz Date: Wed Jan 28 15:46:11 2015 New Revision: 277834 URL: https://svnweb.freebsd.org/changeset/base/277834 Log: When there are no automounted filesystems, autounmountd(8) should wait for filesystem event, instead of looping on a timeout. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/autofs/autounmountd.c Modified: head/usr.sbin/autofs/autounmountd.c ============================================================================== --- head/usr.sbin/autofs/autounmountd.c Wed Jan 28 15:37:35 2015 (r277833) +++ head/usr.sbin/autofs/autounmountd.c Wed Jan 28 15:46:11 2015 (r277834) @@ -182,7 +182,7 @@ expire_automounted(double expiration_tim { struct automounted_fs *af, *tmpaf; time_t now; - double mounted_for, mounted_max = 0; + double mounted_for, mounted_max = -1.0; int error; now = time(NULL); @@ -231,21 +231,28 @@ do_wait(int kq, double sleep_time) { struct timespec timeout; struct kevent unused; - int error; - - assert(sleep_time > 0); - timeout.tv_sec = sleep_time; - timeout.tv_nsec = 0; + int nevents; - log_debugx("waiting for filesystem event for %.0f seconds", sleep_time); - error = kevent(kq, NULL, 0, &unused, 1, &timeout); - if (error < 0) + if (sleep_time != -1.0) { + assert(sleep_time > 0.0); + timeout.tv_sec = sleep_time; + timeout.tv_nsec = 0; + + log_debugx("waiting for filesystem event for %.0f seconds", sleep_time); + nevents = kevent(kq, NULL, 0, &unused, 1, &timeout); + } else { + log_debugx("waiting for filesystem event"); + nevents = kevent(kq, NULL, 0, &unused, 1, NULL); + } + if (nevents < 0) log_err(1, "kevent"); - if (error == 0) + if (nevents == 0) { log_debugx("timeout reached"); - else + assert(sleep_time > 0.0); + } else { log_debugx("got filesystem event"); + } } int @@ -324,7 +331,10 @@ main_autounmountd(int argc, char **argv) for (;;) { refresh_automounted(); mounted_max = expire_automounted(expiration_time); - if (mounted_max < expiration_time) { + if (mounted_max == -1.0) { + sleep_time = mounted_max; + log_debugx("no filesystems to expire"); + } else if (mounted_max < expiration_time) { sleep_time = difftime(expiration_time, mounted_max); log_debugx("some filesystems expire in %.0f seconds", sleep_time); From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 16:08:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A3E6D3C2; Wed, 28 Jan 2015 16:08:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8DF22860; Wed, 28 Jan 2015 16:08:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0SG8ARo009267; Wed, 28 Jan 2015 16:08:10 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0SG88gs009253; Wed, 28 Jan 2015 16:08:08 GMT (envelope-from br@FreeBSD.org) Message-Id: <201501281608.t0SG88gs009253@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Wed, 28 Jan 2015 16:08:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277835 - in head: lib/libpmc sys/arm/arm sys/arm/include sys/arm/ti sys/conf sys/dev/hwpmc sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 16:08:10 -0000 Author: br Date: Wed Jan 28 16:08:07 2015 New Revision: 277835 URL: https://svnweb.freebsd.org/changeset/base/277835 Log: Add ARMv7 performance monitoring counters. Differential Revision: https://reviews.freebsd.org/D1687 Reviewed by: rpaulo Sponsored by: DARPA, AFRL Added: head/sys/dev/hwpmc/hwpmc_armv7.c (contents, props changed) head/sys/dev/hwpmc/hwpmc_armv7.h (contents, props changed) Modified: head/lib/libpmc/libpmc.c head/sys/arm/arm/intr.c head/sys/arm/include/pmc_mdep.h head/sys/arm/ti/files.ti head/sys/conf/files.arm head/sys/dev/hwpmc/hwpmc_arm.c head/sys/dev/hwpmc/pmc_events.h head/sys/sys/pmc.h Modified: head/lib/libpmc/libpmc.c ============================================================================== --- head/lib/libpmc/libpmc.c Wed Jan 28 15:46:11 2015 (r277834) +++ head/lib/libpmc/libpmc.c Wed Jan 28 16:08:07 2015 (r277835) @@ -74,10 +74,14 @@ static int p6_allocate_pmc(enum pmc_even static int tsc_allocate_pmc(enum pmc_event _pe, char *_ctrspec, struct pmc_op_pmcallocate *_pmc_config); #endif +#if defined(__arm__) #if defined(__XSCALE__) static int xscale_allocate_pmc(enum pmc_event _pe, char *_ctrspec, struct pmc_op_pmcallocate *_pmc_config); #endif +static int armv7_allocate_pmc(enum pmc_event _pe, char *_ctrspec, + struct pmc_op_pmcallocate *_pmc_config); +#endif #if defined(__mips__) static int mips_allocate_pmc(enum pmc_event _pe, char* ctrspec, struct pmc_op_pmcallocate *_pmc_config); @@ -153,6 +157,7 @@ PMC_CLASSDEP_TABLE(p4, P4); PMC_CLASSDEP_TABLE(p5, P5); PMC_CLASSDEP_TABLE(p6, P6); PMC_CLASSDEP_TABLE(xscale, XSCALE); +PMC_CLASSDEP_TABLE(armv7, ARMV7); PMC_CLASSDEP_TABLE(mips24k, MIPS24K); PMC_CLASSDEP_TABLE(octeon, OCTEON); PMC_CLASSDEP_TABLE(ucf, UCF); @@ -286,6 +291,7 @@ PMC_MDEP_TABLE(p4, P4, PMC_CLASS_SOFT, P PMC_MDEP_TABLE(p5, P5, PMC_CLASS_SOFT, PMC_CLASS_TSC); PMC_MDEP_TABLE(p6, P6, PMC_CLASS_SOFT, PMC_CLASS_TSC); PMC_MDEP_TABLE(xscale, XSCALE, PMC_CLASS_SOFT, PMC_CLASS_XSCALE); +PMC_MDEP_TABLE(armv7, ARMV7, PMC_CLASS_SOFT, PMC_CLASS_ARMV7); PMC_MDEP_TABLE(mips24k, MIPS24K, PMC_CLASS_SOFT, PMC_CLASS_MIPS24K); PMC_MDEP_TABLE(octeon, OCTEON, PMC_CLASS_SOFT, PMC_CLASS_OCTEON); PMC_MDEP_TABLE(ppc7450, PPC7450, PMC_CLASS_SOFT, PMC_CLASS_PPC7450); @@ -346,9 +352,12 @@ PMC_CLASS_TABLE_DESC(p6, P6, p6, p6); #if defined(__i386__) || defined(__amd64__) PMC_CLASS_TABLE_DESC(tsc, TSC, tsc, tsc); #endif +#if defined(__arm__) #if defined(__XSCALE__) PMC_CLASS_TABLE_DESC(xscale, XSCALE, xscale, xscale); #endif +PMC_CLASS_TABLE_DESC(armv7, ARMV7, armv7, armv7); +#endif #if defined(__mips__) PMC_CLASS_TABLE_DESC(mips24k, MIPS24K, mips24k, mips); PMC_CLASS_TABLE_DESC(octeon, OCTEON, octeon, mips); @@ -2371,6 +2380,7 @@ soft_allocate_pmc(enum pmc_event pe, cha return (0); } +#if defined(__arm__) #if defined(__XSCALE__) static struct pmc_event_alias xscale_aliases[] = { @@ -2394,6 +2404,25 @@ xscale_allocate_pmc(enum pmc_event pe, c } #endif +static struct pmc_event_alias armv7_aliases[] = { + EV_ALIAS("dc-misses", "L1_DCACHE_REFILL"), + EV_ALIAS("ic-misses", "L1_ICACHE_REFILL"), + EV_ALIAS("instructions", "INSTR_EXECUTED"), + EV_ALIAS(NULL, NULL) +}; +static int +armv7_allocate_pmc(enum pmc_event pe, char *ctrspec __unused, + struct pmc_op_pmcallocate *pmc_config __unused) +{ + switch (pe) { + default: + break; + } + + return (0); +} +#endif + #if defined(__mips__) static struct pmc_event_alias mips24k_aliases[] = { @@ -2886,6 +2915,10 @@ pmc_event_names_of_class(enum pmc_class ev = xscale_event_table; count = PMC_EVENT_TABLE_SIZE(xscale); break; + case PMC_CLASS_ARMV7: + ev = armv7_event_table; + count = PMC_EVENT_TABLE_SIZE(armv7); + break; case PMC_CLASS_MIPS24K: ev = mips24k_event_table; count = PMC_EVENT_TABLE_SIZE(mips24k); @@ -3163,12 +3196,18 @@ pmc_init(void) case PMC_CPU_GENERIC: PMC_MDEP_INIT(generic); break; +#if defined(__arm__) #if defined(__XSCALE__) case PMC_CPU_INTEL_XSCALE: PMC_MDEP_INIT(xscale); pmc_class_table[n] = &xscale_class_table_descr; break; #endif + case PMC_CPU_ARMV7: + PMC_MDEP_INIT(armv7); + pmc_class_table[n] = &armv7_class_table_descr; + break; +#endif #if defined(__mips__) case PMC_CPU_MIPS_24K: PMC_MDEP_INIT(mips24k); @@ -3369,6 +3408,9 @@ _pmc_name_of_event(enum pmc_event pe, en } else if (pe >= PMC_EV_XSCALE_FIRST && pe <= PMC_EV_XSCALE_LAST) { ev = xscale_event_table; evfence = xscale_event_table + PMC_EVENT_TABLE_SIZE(xscale); + } else if (pe >= PMC_EV_ARMV7_FIRST && pe <= PMC_EV_ARMV7_LAST) { + ev = armv7_event_table; + evfence = armv7_event_table + PMC_EVENT_TABLE_SIZE(armv7); } else if (pe >= PMC_EV_MIPS24K_FIRST && pe <= PMC_EV_MIPS24K_LAST) { ev = mips24k_event_table; evfence = mips24k_event_table + PMC_EVENT_TABLE_SIZE(mips24k); Modified: head/sys/arm/arm/intr.c ============================================================================== --- head/sys/arm/arm/intr.c Wed Jan 28 15:46:11 2015 (r277834) +++ head/sys/arm/arm/intr.c Wed Jan 28 16:08:07 2015 (r277835) @@ -37,6 +37,7 @@ */ #include "opt_platform.h" +#include "opt_hwpmc_hooks.h" #include __FBSDID("$FreeBSD$"); @@ -50,6 +51,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include @@ -190,6 +193,10 @@ arm_irq_handler(struct trapframe *frame) arm_mask_irq(i); } } +#ifdef HWPMC_HOOKS + if (pmc_hook && (PCPU_GET(curthread)->td_pflags & TDP_CALLCHAIN)) + pmc_hook(PCPU_GET(curthread), PMC_FN_USER_CALLCHAIN, frame); +#endif } /* Modified: head/sys/arm/include/pmc_mdep.h ============================================================================== --- head/sys/arm/include/pmc_mdep.h Wed Jan 28 15:46:11 2015 (r277834) +++ head/sys/arm/include/pmc_mdep.h Wed Jan 28 16:08:07 2015 (r277835) @@ -30,12 +30,15 @@ #define _MACHINE_PMC_MDEP_H_ #define PMC_MDEP_CLASS_INDEX_XSCALE 1 +#define PMC_MDEP_CLASS_INDEX_ARMV7 1 /* * On the ARM platform we support the following PMCs. * * XSCALE Intel XScale processors + * ARMV7 ARM Cortex-A processors */ #include +#include union pmc_md_op_pmcallocate { uint64_t __pad[4]; @@ -48,6 +51,7 @@ union pmc_md_op_pmcallocate { #ifdef _KERNEL union pmc_md_pmc { struct pmc_md_xscale_pmc pm_xscale; + struct pmc_md_armv7_pmc pm_armv7; }; #define PMC_IN_KERNEL_STACK(S,START,END) \ @@ -73,6 +77,8 @@ union pmc_md_pmc { */ struct pmc_mdep *pmc_xscale_initialize(void); void pmc_xscale_finalize(struct pmc_mdep *_md); +struct pmc_mdep *pmc_armv7_initialize(void); +void pmc_armv7_finalize(struct pmc_mdep *_md); #endif /* _KERNEL */ #endif /* !_MACHINE_PMC_MDEP_H_ */ Modified: head/sys/arm/ti/files.ti ============================================================================== --- head/sys/arm/ti/files.ti Wed Jan 28 15:46:11 2015 (r277834) +++ head/sys/arm/ti/files.ti Wed Jan 28 16:08:07 2015 (r277835) @@ -9,6 +9,7 @@ arm/arm/cpufunc_asm_armv5.S standard arm/arm/cpufunc_asm_arm10.S standard arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard +arm/arm/pmu.c optional hwpmc arm/ti/ti_common.c standard arm/ti/ti_cpuid.c standard Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Wed Jan 28 15:46:11 2015 (r277834) +++ head/sys/conf/files.arm Wed Jan 28 16:08:07 2015 (r277835) @@ -70,6 +70,7 @@ crypto/des/des_enc.c optional crypto | dev/fb/fb.c optional sc dev/fdt/fdt_arm_platform.c optional platform fdt dev/hwpmc/hwpmc_arm.c optional hwpmc +dev/hwpmc/hwpmc_armv7.c optional hwpmc dev/kbd/kbd.c optional sc | vt dev/syscons/scgfbrndr.c optional sc dev/syscons/scterm-teken.c optional sc Modified: head/sys/dev/hwpmc/hwpmc_arm.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_arm.c Wed Jan 28 15:46:11 2015 (r277834) +++ head/sys/dev/hwpmc/hwpmc_arm.c Wed Jan 28 16:08:07 2015 (r277835) @@ -47,9 +47,12 @@ pmc_md_initialize() #ifdef CPU_XSCALE_IXP425 if (cpu_class == CPU_CLASS_XSCALE) return pmc_xscale_initialize(); - else #endif - return NULL; +#ifdef CPU_CORTEXA + if (cpu_class == CPU_CLASS_CORTEXA) + return pmc_armv7_initialize(); +#endif + return NULL; } void @@ -62,6 +65,10 @@ pmc_md_finalize(struct pmc_mdep *md) KASSERT(0, ("[arm,%d] Unknown CPU Class 0x%x", __LINE__, cpu_class)); #endif +#ifdef CPU_CORTEXA + if (cpu_class == CPU_CLASS_CORTEXA) + pmc_armv7_finalize(md); +#endif } int Added: head/sys/dev/hwpmc/hwpmc_armv7.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/hwpmc/hwpmc_armv7.c Wed Jan 28 16:08:07 2015 (r277835) @@ -0,0 +1,652 @@ +/*- + * Copyright (c) 2015 Ruslan Bukin + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include +#include + +#define CPU_ID_CORTEX_VER_MASK 0xff +#define CPU_ID_CORTEX_VER_SHIFT 4 + +static int armv7_npmcs; + +struct armv7_event_code_map { + enum pmc_event pe_ev; + uint8_t pe_code; +}; + +const struct armv7_event_code_map armv7_event_codes[] = { + { PMC_EV_ARMV7_PMNC_SW_INCR, 0x00 }, + { PMC_EV_ARMV7_L1_ICACHE_REFILL, 0x01 }, + { PMC_EV_ARMV7_ITLB_REFILL, 0x02 }, + { PMC_EV_ARMV7_L1_DCACHE_REFILL, 0x03 }, + { PMC_EV_ARMV7_L1_DCACHE_ACCESS, 0x04 }, + { PMC_EV_ARMV7_DTLB_REFILL, 0x05 }, + { PMC_EV_ARMV7_MEM_READ, 0x06 }, + { PMC_EV_ARMV7_MEM_WRITE, 0x07 }, + { PMC_EV_ARMV7_INSTR_EXECUTED, 0x08 }, + { PMC_EV_ARMV7_EXC_TAKEN, 0x09 }, + { PMC_EV_ARMV7_EXC_EXECUTED, 0x0A }, + { PMC_EV_ARMV7_CID_WRITE, 0x0B }, + { PMC_EV_ARMV7_PC_WRITE, 0x0C }, + { PMC_EV_ARMV7_PC_IMM_BRANCH, 0x0D }, + { PMC_EV_ARMV7_PC_PROC_RETURN, 0x0E }, + { PMC_EV_ARMV7_MEM_UNALIGNED_ACCESS, 0x0F }, + { PMC_EV_ARMV7_PC_BRANCH_MIS_PRED, 0x10 }, + { PMC_EV_ARMV7_CLOCK_CYCLES, 0x11 }, + { PMC_EV_ARMV7_PC_BRANCH_PRED, 0x12 }, + { PMC_EV_ARMV7_MEM_ACCESS, 0x13 }, + { PMC_EV_ARMV7_L1_ICACHE_ACCESS, 0x14 }, + { PMC_EV_ARMV7_L1_DCACHE_WB, 0x15 }, + { PMC_EV_ARMV7_L2_CACHE_ACCESS, 0x16 }, + { PMC_EV_ARMV7_L2_CACHE_REFILL, 0x17 }, + { PMC_EV_ARMV7_L2_CACHE_WB, 0x18 }, + { PMC_EV_ARMV7_BUS_ACCESS, 0x19 }, + { PMC_EV_ARMV7_MEM_ERROR, 0x1A }, + { PMC_EV_ARMV7_INSTR_SPEC, 0x1B }, + { PMC_EV_ARMV7_TTBR_WRITE, 0x1C }, + { PMC_EV_ARMV7_BUS_CYCLES, 0x1D }, + { PMC_EV_ARMV7_CPU_CYCLES, 0xFF }, +}; + +const int armv7_event_codes_size = + sizeof(armv7_event_codes) / sizeof(armv7_event_codes[0]); + +/* + * Per-processor information. + */ +struct armv7_cpu { + struct pmc_hw *pc_armv7pmcs; + int cortex_ver; +}; + +static struct armv7_cpu **armv7_pcpu; + +/* + * Performance Monitor Control Register + */ +static __inline uint32_t +armv7_pmnc_read(void) +{ + uint32_t reg; + + __asm __volatile("mrc p15, 0, %0, c9, c12, 0" : "=r" (reg)); + + return (reg); +} + +static __inline void +armv7_pmnc_write(uint32_t reg) +{ + + __asm __volatile("mcr p15, 0, %0, c9, c12, 0" : : "r" (reg)); +} + +/* + * Clock Counter Register (PMCCNTR) + * Counts processor clock cycles. + */ +static __inline uint32_t +armv7_ccnt_read(void) +{ + uint32_t reg; + + __asm __volatile("mrc p15, 0, %0, c9, c13, 0" : "=r" (reg)); + + return (reg); +} + +static __inline void +armv7_ccnt_write(uint32_t reg) +{ + + __asm __volatile("mcr p15, 0, %0, c9, c13, 0" : : "r" (reg)); +} + +/* + * Interrupt Enable Set Register + */ +static __inline void +armv7_interrupt_enable(uint32_t pmc) +{ + uint32_t reg; + + reg = (1 << pmc); + + __asm __volatile("mcr p15, 0, %0, c9, c14, 1" : : "r" (reg)); +} + +/* + * Interrupt Clear Set Register + */ +static __inline void +armv7_interrupt_disable(uint32_t pmc) +{ + uint32_t reg; + + reg = (1 << pmc); + + __asm __volatile("mcr p15, 0, %0, c9, c14, 2" : : "r" (reg)); +} + +/* + * Overflow Flag Register + */ +static __inline uint32_t +armv7_flag_read(void) +{ + uint32_t reg; + + __asm __volatile("mrc p15, 0, %0, c9, c12, 3" : "=r" (reg)); + + return (reg); +} + +static __inline void +armv7_flag_write(uint32_t reg) +{ + + __asm __volatile("mcr p15, 0, %0, c9, c12, 3" : : "r" (reg)); +} + +/* + * Event Selection Register + */ +static __inline void +armv7_evtsel_write(uint32_t reg) +{ + + __asm __volatile("mcr p15, 0, %0, c9, c13, 1" : : "r" (reg)); +} + +/* + * PMSELR + */ +static __inline void +armv7_select_counter(unsigned int pmc) +{ + + __asm __volatile("mcr p15, 0, %0, c9, c12, 5" : : "r" (pmc)); +} + +/* + * Counter Set Enable Register + */ +static __inline void +armv7_counter_enable(unsigned int pmc) +{ + uint32_t reg; + + reg = (1 << pmc); + + __asm __volatile("mcr p15, 0, %0, c9, c12, 1" : : "r" (reg)); +} + +/* + * Counter Clear Enable Register + */ +static __inline void +armv7_counter_disable(unsigned int pmc) +{ + uint32_t reg; + + reg = (1 << pmc); + + __asm __volatile("mcr p15, 0, %0, c9, c12, 2" : : "r" (reg)); +} + +/* + * Performance Count Register N + */ +static uint32_t +armv7_pmcn_read(unsigned int pmc) +{ + uint32_t reg = 0; + + KASSERT(pmc < 4, ("[armv7,%d] illegal PMC number %d", __LINE__, pmc)); + + armv7_select_counter(pmc); + __asm __volatile("mrc p15, 0, %0, c9, c13, 2" : "=r" (reg)); + + return (reg); +} + +static uint32_t +armv7_pmcn_write(unsigned int pmc, uint32_t reg) +{ + + KASSERT(pmc < 4, ("[armv7,%d] illegal PMC number %d", __LINE__, pmc)); + + armv7_select_counter(pmc); + __asm __volatile("mcr p15, 0, %0, c9, c13, 2" : : "r" (reg)); + + return (reg); +} + +static int +armv7_allocate_pmc(int cpu, int ri, struct pmc *pm, + const struct pmc_op_pmcallocate *a) +{ + uint32_t caps, config; + struct armv7_cpu *pac; + enum pmc_event pe; + int i; + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[armv7,%d] illegal CPU value %d", __LINE__, cpu)); + KASSERT(ri >= 0 && ri < armv7_npmcs, + ("[armv7,%d] illegal row index %d", __LINE__, ri)); + + pac = armv7_pcpu[cpu]; + + caps = a->pm_caps; + if (a->pm_class != PMC_CLASS_ARMV7) + return (EINVAL); + pe = a->pm_ev; + + for (i = 0; i < armv7_event_codes_size; i++) { + if (armv7_event_codes[i].pe_ev == pe) { + config = armv7_event_codes[i].pe_code; + break; + } + } + if (i == armv7_event_codes_size) + return EINVAL; + + pm->pm_md.pm_armv7.pm_armv7_evsel = config; + + PMCDBG(MDP,ALL,2,"armv7-allocate ri=%d -> config=0x%x", ri, config); + + return 0; +} + + +static int +armv7_read_pmc(int cpu, int ri, pmc_value_t *v) +{ + pmc_value_t tmp; + struct pmc *pm; + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[armv7,%d] illegal CPU value %d", __LINE__, cpu)); + KASSERT(ri >= 0 && ri < armv7_npmcs, + ("[armv7,%d] illegal row index %d", __LINE__, ri)); + + pm = armv7_pcpu[cpu]->pc_armv7pmcs[ri].phw_pmc; + + if (pm->pm_md.pm_armv7.pm_armv7_evsel == 0xFF) + tmp = armv7_ccnt_read(); + else + tmp = armv7_pmcn_read(ri); + + PMCDBG(MDP,REA,2,"armv7-read id=%d -> %jd", ri, tmp); + if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) + *v = ARMV7_PERFCTR_VALUE_TO_RELOAD_COUNT(tmp); + else + *v = tmp; + + return 0; +} + +static int +armv7_write_pmc(int cpu, int ri, pmc_value_t v) +{ + struct pmc *pm; + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[armv7,%d] illegal CPU value %d", __LINE__, cpu)); + KASSERT(ri >= 0 && ri < armv7_npmcs, + ("[armv7,%d] illegal row-index %d", __LINE__, ri)); + + pm = armv7_pcpu[cpu]->pc_armv7pmcs[ri].phw_pmc; + + if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) + v = ARMV7_RELOAD_COUNT_TO_PERFCTR_VALUE(v); + + PMCDBG(MDP,WRI,1,"armv7-write cpu=%d ri=%d v=%jx", cpu, ri, v); + + if (pm->pm_md.pm_armv7.pm_armv7_evsel == 0xFF) + armv7_ccnt_write(v); + else + armv7_pmcn_write(ri, v); + + return 0; +} + +static int +armv7_config_pmc(int cpu, int ri, struct pmc *pm) +{ + struct pmc_hw *phw; + + PMCDBG(MDP,CFG,1, "cpu=%d ri=%d pm=%p", cpu, ri, pm); + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[armv7,%d] illegal CPU value %d", __LINE__, cpu)); + KASSERT(ri >= 0 && ri < armv7_npmcs, + ("[armv7,%d] illegal row-index %d", __LINE__, ri)); + + phw = &armv7_pcpu[cpu]->pc_armv7pmcs[ri]; + + KASSERT(pm == NULL || phw->phw_pmc == NULL, + ("[armv7,%d] pm=%p phw->pm=%p hwpmc not unconfigured", + __LINE__, pm, phw->phw_pmc)); + + phw->phw_pmc = pm; + + return 0; +} + +static int +armv7_start_pmc(int cpu, int ri) +{ + struct pmc_hw *phw; + uint32_t config; + struct pmc *pm; + + phw = &armv7_pcpu[cpu]->pc_armv7pmcs[ri]; + pm = phw->phw_pmc; + config = pm->pm_md.pm_armv7.pm_armv7_evsel; + + /* + * Configure the event selection. + */ + armv7_select_counter(ri); + armv7_evtsel_write(config); + + /* + * Enable the PMC. + */ + armv7_interrupt_enable(ri); + armv7_counter_enable(ri); + + return 0; +} + +static int +armv7_stop_pmc(int cpu, int ri) +{ + struct pmc_hw *phw; + struct pmc *pm; + + phw = &armv7_pcpu[cpu]->pc_armv7pmcs[ri]; + pm = phw->phw_pmc; + + /* + * Disable the PMCs. + */ + armv7_counter_disable(ri); + armv7_interrupt_disable(ri); + + return 0; +} + +static int +armv7_release_pmc(int cpu, int ri, struct pmc *pmc) +{ + struct pmc_hw *phw; + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[armv7,%d] illegal CPU value %d", __LINE__, cpu)); + KASSERT(ri >= 0 && ri < armv7_npmcs, + ("[armv7,%d] illegal row-index %d", __LINE__, ri)); + + phw = &armv7_pcpu[cpu]->pc_armv7pmcs[ri]; + KASSERT(phw->phw_pmc == NULL, + ("[armv7,%d] PHW pmc %p non-NULL", __LINE__, phw->phw_pmc)); + + return 0; +} + +static int +armv7_intr(int cpu, struct trapframe *tf) +{ + struct armv7_cpu *pc; + int retval, ri; + struct pmc *pm; + int error; + int reg; + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[armv7,%d] CPU %d out of range", __LINE__, cpu)); + + retval = 0; + pc = armv7_pcpu[cpu]; + + for (ri = 0; ri < armv7_npmcs; ri++) { + pm = armv7_pcpu[cpu]->pc_armv7pmcs[ri].phw_pmc; + if (pm == NULL) + continue; + if (!PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) + continue; + + /* Check if counter has overflowed */ + if (pm->pm_md.pm_armv7.pm_armv7_evsel == 0xFF) + reg = (1 << 31); + else + reg = (1 << ri); + + if ((armv7_flag_read() & reg) == 0) { + continue; + } + + /* Clear Overflow Flag */ + armv7_flag_write(reg); + + retval = 1; /* Found an interrupting PMC. */ + if (pm->pm_state != PMC_STATE_RUNNING) + continue; + + error = pmc_process_interrupt(cpu, PMC_HR, pm, tf, + TRAPF_USERMODE(tf)); + if (error) + armv7_stop_pmc(cpu, ri); + + /* Reload sampling count */ + armv7_write_pmc(cpu, ri, pm->pm_sc.pm_reloadcount); + } + + return (retval); +} + +static int +armv7_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) +{ + char armv7_name[PMC_NAME_MAX]; + struct pmc_hw *phw; + int error; + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[armv7,%d], illegal CPU %d", __LINE__, cpu)); + KASSERT(ri >= 0 && ri < armv7_npmcs, + ("[armv7,%d] row-index %d out of range", __LINE__, ri)); + + phw = &armv7_pcpu[cpu]->pc_armv7pmcs[ri]; + snprintf(armv7_name, sizeof(armv7_name), "ARMV7-%d", ri); + if ((error = copystr(armv7_name, pi->pm_name, PMC_NAME_MAX, + NULL)) != 0) + return error; + pi->pm_class = PMC_CLASS_ARMV7; + if (phw->phw_state & PMC_PHW_FLAG_IS_ENABLED) { + pi->pm_enabled = TRUE; + *ppmc = phw->phw_pmc; + } else { + pi->pm_enabled = FALSE; + *ppmc = NULL; + } + + return (0); +} + +static int +armv7_get_config(int cpu, int ri, struct pmc **ppm) +{ + + *ppm = armv7_pcpu[cpu]->pc_armv7pmcs[ri].phw_pmc; + + return 0; +} + +/* + * XXX don't know what we should do here. + */ +static int +armv7_switch_in(struct pmc_cpu *pc, struct pmc_process *pp) +{ + + return 0; +} + +static int +armv7_switch_out(struct pmc_cpu *pc, struct pmc_process *pp) +{ + + return 0; +} + +static int +armv7_pcpu_init(struct pmc_mdep *md, int cpu) +{ + struct armv7_cpu *pac; + struct pmc_hw *phw; + struct pmc_cpu *pc; + uint32_t pmnc; + int first_ri; + int cpuid; + int i; + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[armv7,%d] wrong cpu number %d", __LINE__, cpu)); + PMCDBG(MDP,INI,1,"armv7-init cpu=%d", cpu); + + armv7_pcpu[cpu] = pac = malloc(sizeof(struct armv7_cpu), M_PMC, + M_WAITOK|M_ZERO); + + cpuid = cpu_id(); + pac->cortex_ver = (cpuid >> CPU_ID_CORTEX_VER_SHIFT) & \ + CPU_ID_CORTEX_VER_MASK; + + pac->pc_armv7pmcs = malloc(sizeof(struct pmc_hw) * armv7_npmcs, + M_PMC, M_WAITOK|M_ZERO); + pc = pmc_pcpu[cpu]; + first_ri = md->pmd_classdep[PMC_MDEP_CLASS_INDEX_ARMV7].pcd_ri; + KASSERT(pc != NULL, ("[armv7,%d] NULL per-cpu pointer", __LINE__)); + + for (i = 0, phw = pac->pc_armv7pmcs; i < armv7_npmcs; i++, phw++) { + phw->phw_state = PMC_PHW_FLAG_IS_ENABLED | + PMC_PHW_CPU_TO_STATE(cpu) | PMC_PHW_INDEX_TO_STATE(i); + phw->phw_pmc = NULL; + pc->pc_hwpmcs[i + first_ri] = phw; + } + + /* Enable unit */ + pmnc = armv7_pmnc_read(); + pmnc |= ARMV7_PMNC_ENABLE; + armv7_pmnc_write(pmnc); + + return 0; +} + +static int +armv7_pcpu_fini(struct pmc_mdep *md, int cpu) +{ + uint32_t pmnc; + + pmnc = armv7_pmnc_read(); + pmnc &= ~ARMV7_PMNC_ENABLE; + armv7_pmnc_write(pmnc); + + return 0; +} + +struct pmc_mdep * +pmc_armv7_initialize() +{ + struct pmc_mdep *pmc_mdep; + struct pmc_classdep *pcd; + int reg; + + reg = armv7_pmnc_read(); + + armv7_npmcs = (reg >> ARMV7_PMNC_N_SHIFT) & \ + ARMV7_PMNC_N_MASK; + + PMCDBG(MDP,INI,1,"armv7-init npmcs=%d", armv7_npmcs); + + /* + * Allocate space for pointers to PMC HW descriptors and for + * the MDEP structure used by MI code. + */ + armv7_pcpu = malloc(sizeof(struct armv7_cpu *) * pmc_cpu_max(), + M_PMC, M_WAITOK | M_ZERO); + + /* Just one class */ + pmc_mdep = pmc_mdep_alloc(1); + pmc_mdep->pmd_cputype = PMC_CPU_ARMV7; + + pcd = &pmc_mdep->pmd_classdep[PMC_MDEP_CLASS_INDEX_ARMV7]; + pcd->pcd_caps = ARMV7_PMC_CAPS; + pcd->pcd_class = PMC_CLASS_ARMV7; + pcd->pcd_num = armv7_npmcs; + pcd->pcd_ri = pmc_mdep->pmd_npmc; + pcd->pcd_width = 32; + + pcd->pcd_allocate_pmc = armv7_allocate_pmc; + pcd->pcd_config_pmc = armv7_config_pmc; + pcd->pcd_pcpu_fini = armv7_pcpu_fini; + pcd->pcd_pcpu_init = armv7_pcpu_init; + pcd->pcd_describe = armv7_describe; + pcd->pcd_get_config = armv7_get_config; + pcd->pcd_read_pmc = armv7_read_pmc; + pcd->pcd_release_pmc = armv7_release_pmc; + pcd->pcd_start_pmc = armv7_start_pmc; + pcd->pcd_stop_pmc = armv7_stop_pmc; + pcd->pcd_write_pmc = armv7_write_pmc; + + pmc_mdep->pmd_intr = armv7_intr; + pmc_mdep->pmd_switch_in = armv7_switch_in; + pmc_mdep->pmd_switch_out = armv7_switch_out; + + pmc_mdep->pmd_npmc += armv7_npmcs; + + return (pmc_mdep); +} + +void +pmc_armv7_finalize(struct pmc_mdep *md) +{ + +} Added: head/sys/dev/hwpmc/hwpmc_armv7.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/hwpmc/hwpmc_armv7.h Wed Jan 28 16:08:07 2015 (r277835) @@ -0,0 +1,61 @@ +/*- + * Copyright (c) 2015 Ruslan Bukin + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _DEV_HWPMC_ARMV7_H_ +#define _DEV_HWPMC_ARMV7_H_ + +#define ARMV7_PMC_CAPS (PMC_CAP_INTERRUPT | PMC_CAP_USER | \ + PMC_CAP_SYSTEM | PMC_CAP_EDGE | \ + PMC_CAP_THRESHOLD | PMC_CAP_READ | \ + PMC_CAP_WRITE | PMC_CAP_INVERT | \ + PMC_CAP_QUALIFIER) + +#define ARMV7_PMNC_ENABLE (1 << 0) /* Enable all counters */ +#define ARMV7_PMNC_P (1 << 1) /* Reset all counters */ +#define ARMV7_PMNC_C (1 << 2) /* Cycle counter reset */ +#define ARMV7_PMNC_D (1 << 3) /* CCNT counts every 64th cpu cycle */ +#define ARMV7_PMNC_X (1 << 4) /* Export to ext. monitoring (ETM) */ +#define ARMV7_PMNC_DP (1 << 5) /* Disable CCNT if non-invasive debug*/ +#define ARMV7_PMNC_N_SHIFT 11 /* Number of counters implemented */ +#define ARMV7_PMNC_N_MASK 0x1f +#define ARMV7_PMNC_MASK 0x3f /* Writable bits */ + +#define ARMV7_RELOAD_COUNT_TO_PERFCTR_VALUE(R) (-(R)) +#define ARMV7_PERFCTR_VALUE_TO_RELOAD_COUNT(P) (-(P)) + +#ifdef _KERNEL +/* MD extension for 'struct pmc' */ +struct pmc_md_armv7_pmc { + uint32_t pm_armv7_evsel; +}; +#endif /* _KERNEL */ +#endif /* _DEV_HWPMC_ARMV7_H_ */ Modified: head/sys/dev/hwpmc/pmc_events.h ============================================================================== --- head/sys/dev/hwpmc/pmc_events.h Wed Jan 28 15:46:11 2015 (r277834) +++ head/sys/dev/hwpmc/pmc_events.h Wed Jan 28 16:08:07 2015 (r277835) @@ -4757,6 +4757,46 @@ __PMC_EV_ALIAS("IMPC_C0H_TRK_REQUEST.ALL #define PMC_EV_XSCALE_LAST PMC_EV_XSCALE_DATA_BUS_TRANS /* + * ARMv7 Events + */ + +#define __PMC_EV_ARMV7() \ + __PMC_EV(ARMV7, PMNC_SW_INCR) \ + __PMC_EV(ARMV7, L1_ICACHE_REFILL) \ + __PMC_EV(ARMV7, ITLB_REFILL) \ + __PMC_EV(ARMV7, L1_DCACHE_REFILL) \ + __PMC_EV(ARMV7, L1_DCACHE_ACCESS) \ + __PMC_EV(ARMV7, DTLB_REFILL) \ + __PMC_EV(ARMV7, MEM_READ) \ + __PMC_EV(ARMV7, MEM_WRITE) \ + __PMC_EV(ARMV7, INSTR_EXECUTED) \ + __PMC_EV(ARMV7, EXC_TAKEN) \ + __PMC_EV(ARMV7, EXC_EXECUTED) \ + __PMC_EV(ARMV7, CID_WRITE) \ + __PMC_EV(ARMV7, PC_WRITE) \ + __PMC_EV(ARMV7, PC_IMM_BRANCH) \ + __PMC_EV(ARMV7, PC_PROC_RETURN) \ + __PMC_EV(ARMV7, MEM_UNALIGNED_ACCESS) \ + __PMC_EV(ARMV7, PC_BRANCH_MIS_PRED) \ + __PMC_EV(ARMV7, CLOCK_CYCLES) \ + __PMC_EV(ARMV7, PC_BRANCH_PRED) \ + __PMC_EV(ARMV7, MEM_ACCESS) \ + __PMC_EV(ARMV7, L1_ICACHE_ACCESS) \ + __PMC_EV(ARMV7, L1_DCACHE_WB) \ + __PMC_EV(ARMV7, L2_CACHE_ACCESS) \ + __PMC_EV(ARMV7, L2_CACHE_REFILL) \ + __PMC_EV(ARMV7, L2_CACHE_WB) \ + __PMC_EV(ARMV7, BUS_ACCESS) \ + __PMC_EV(ARMV7, MEM_ERROR) \ + __PMC_EV(ARMV7, INSTR_SPEC) \ + __PMC_EV(ARMV7, TTBR_WRITE) \ + __PMC_EV(ARMV7, BUS_CYCLES) \ + __PMC_EV(ARMV7, CPU_CYCLES) + +#define PMC_EV_ARMV7_FIRST PMC_EV_ARMV7_PMNC_SW_INCR +#define PMC_EV_ARMV7_LAST PMC_EV_ARMV7_CPU_CYCLES + +/* * MIPS Events from "Programming the MIPS32 24K Core Family", * Document Number: MD00355 Revision 04.63 December 19, 2008 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 16:35:11 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 94185A01; Wed, 28 Jan 2015 16:35:11 +0000 (UTC) Received: from smtp4.ore.mailhop.org (smtp4.ore.mailhop.org [54.149.240.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 736C8B43; Wed, 28 Jan 2015 16:35:11 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by smtp4.ore.mailhop.org with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1YGVa4-0002ho-Ub; Wed, 28 Jan 2015 16:35:05 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t0SGZ3WS025558; Wed, 28 Jan 2015 09:35:03 -0700 (MST) (envelope-from ian@freebsd.org) X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX1/wRkuSZJsKZwQWbFbPv9q5 Message-ID: <1422462903.15718.60.camel@freebsd.org> Subject: Re: svn commit: r277835 - in head: lib/libpmc sys/arm/arm sys/arm/include sys/arm/ti sys/conf sys/dev/hwpmc sys/sys From: Ian Lepore To: Ruslan Bukin Date: Wed, 28 Jan 2015 09:35:03 -0700 In-Reply-To: <201501281608.t0SG88gs009253@svn.freebsd.org> References: <201501281608.t0SG88gs009253@svn.freebsd.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.8 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 16:35:11 -0000 On Wed, 2015-01-28 at 16:08 +0000, Ruslan Bukin wrote: > Author: br > Date: Wed Jan 28 16:08:07 2015 > New Revision: 277835 > URL: https://svnweb.freebsd.org/changeset/base/277835 > > Log: > Add ARMv7 performance monitoring counters. > > Differential Revision: https://reviews.freebsd.org/D1687 > Reviewed by: rpaulo > Sponsored by: DARPA, AFRL > > Added: > head/sys/dev/hwpmc/hwpmc_armv7.c (contents, props changed) > head/sys/dev/hwpmc/hwpmc_armv7.h (contents, props changed) > Modified: > head/lib/libpmc/libpmc.c > head/sys/arm/arm/intr.c > head/sys/arm/include/pmc_mdep.h > head/sys/arm/ti/files.ti > head/sys/conf/files.arm > head/sys/dev/hwpmc/hwpmc_arm.c > head/sys/dev/hwpmc/pmc_events.h > head/sys/sys/pmc.h This was in phabricator for review for 27 hours before it got committed, that's not enough time to allow people to actually review it. That would be not enough time for even a simple change, let alone over a thousand of lines of code. It certainly wasn't reviewed by those actively working on arm pmc stuff recently (gnn and to a lesser degree, me). Just from a quick glance at the part that wasn't truncated, I notice all the inline asm stuff is wrong -- it duplicates what's already available in cpu-v6.h. -- Ian From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 17:02:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 17FA0F74; Wed, 28 Jan 2015 17:02:36 +0000 (UTC) Received: from st11p02mm-asmtp002.mac.com (st11p02mm-asmtpout002.mac.com [17.172.220.237]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DAB19E0B; Wed, 28 Jan 2015 17:02:35 +0000 (UTC) Received: from [10.0.1.3] (unknown [73.162.13.215]) by st11p02mm-asmtp002.mac.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Dec 4 2014)) with ESMTPSA id <0NIW00JWJCNMSO20@st11p02mm-asmtp002.mac.com>; Wed, 28 Jan 2015 17:02:14 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-01-28_02:2015-01-28,2015-01-28,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412080000 definitions=main-1501280172 Content-type: text/plain; charset=us-ascii MIME-version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r277835 - in head: lib/libpmc sys/arm/arm sys/arm/include sys/arm/ti sys/conf sys/dev/hwpmc sys/sys From: Rui Paulo In-reply-to: <1422462903.15718.60.camel@freebsd.org> Date: Wed, 28 Jan 2015 09:02:10 -0800 Content-transfer-encoding: quoted-printable Message-id: <8F8272CF-DD73-41EF-8096-E8C79AD903CB@me.com> References: <201501281608.t0SG88gs009253@svn.freebsd.org> <1422462903.15718.60.camel@freebsd.org> To: Ian Lepore X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Ruslan Bukin , src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 17:02:36 -0000 On Jan 28, 2015, at 08:35, Ian Lepore wrote: >=20 > On Wed, 2015-01-28 at 16:08 +0000, Ruslan Bukin wrote: >> Author: br >> Date: Wed Jan 28 16:08:07 2015 >> New Revision: 277835 >> URL: https://svnweb.freebsd.org/changeset/base/277835 >>=20 >> Log: >> Add ARMv7 performance monitoring counters. >>=20 >> Differential Revision: https://reviews.freebsd.org/D1687 >> Reviewed by: rpaulo >> Sponsored by: DARPA, AFRL >>=20 >> Added: >> head/sys/dev/hwpmc/hwpmc_armv7.c (contents, props changed) >> head/sys/dev/hwpmc/hwpmc_armv7.h (contents, props changed) >> Modified: >> head/lib/libpmc/libpmc.c >> head/sys/arm/arm/intr.c >> head/sys/arm/include/pmc_mdep.h >> head/sys/arm/ti/files.ti >> head/sys/conf/files.arm >> head/sys/dev/hwpmc/hwpmc_arm.c >> head/sys/dev/hwpmc/pmc_events.h >> head/sys/sys/pmc.h >=20 > This was in phabricator for review for 27 hours before it got = committed, > that's not enough time to allow people to actually review it. That > would be not enough time for even a simple change, let alone over a > thousand of lines of code. It certainly wasn't reviewed by those > actively working on arm pmc stuff recently (gnn and to a lesser = degree, > me). >=20 > Just from a quick glance at the part that wasn't truncated, I notice = all > the inline asm stuff is wrong -- it duplicates what's already = available > in cpu-v6.h. I do agree that reviewers weren't given enough time and phabricator = seems to make that worse by saying the code is "ready to land" (we're = trying to change that). In my defense, I only reviewed this because I implemented the original = XScale PMC. I also didn't know who else was working on ARM PMC, so I = couldn't warn Ruslan. Andrew was the one that added the ARM group to = the review, so maybe he wasn't aware of it either. -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 17:32:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 85A857E3; Wed, 28 Jan 2015 17:32:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7160F144; Wed, 28 Jan 2015 17:32:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0SHWkv2053197; Wed, 28 Jan 2015 17:32:46 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0SHWknm053196; Wed, 28 Jan 2015 17:32:46 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501281732.t0SHWknm053196@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 28 Jan 2015 17:32:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277836 - head/release X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 17:32:46 -0000 Author: gjb Date: Wed Jan 28 17:32:45 2015 New Revision: 277836 URL: https://svnweb.freebsd.org/changeset/base/277836 Log: Rename the 'system' target to 'disc1', which is specific to the disc1.iso installer image. Replace 'system' with 'release' in CLEANFILES, and add 'disc1' to CLEANDIRS. Ensure the 'dvd' target depends on 'packagesystem'. Fix 'mini-memstick.img' prerequisite, which should be the 'bootonly' target, not 'disc1' (previously 'system'). Use .TARGET as the target installation directory for the disc1.iso and bootonly.iso images, which now expand to 'disc1' and 'bootonly' respectively, mimicking the behavior of the 'dvd' target. Remove '@true' from the 'release' target, and instead use 'touch ${.TARGET}' to prevent multiple iterations of 'make release' from clobbering previously-built installer medium. Tested with: head@r277834 MFC after: 3 weeks X-MFC-with: r277458, r277536, r277606, r277609 Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile Modified: head/release/Makefile ============================================================================== --- head/release/Makefile Wed Jan 28 16:08:07 2015 (r277835) +++ head/release/Makefile Wed Jan 28 17:32:45 2015 (r277836) @@ -109,7 +109,7 @@ IMAGES+= memstick.img IMAGES+= mini-memstick.img .endif -CLEANFILES= packagesystem *.txz MANIFEST system ${IMAGES} +CLEANFILES= packagesystem *.txz MANIFEST release ${IMAGES} .if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES) . for I in ${IMAGES} CLEANFILES+= ${I}.xz @@ -118,7 +118,7 @@ CLEANFILES+= ${I}.xz .if defined(WITH_DVD) && !empty(WITH_DVD) CLEANFILES+= pkg-stage .endif -CLEANDIRS= dist ftp release bootonly dvd +CLEANDIRS= dist ftp disc1 bootonly dvd beforeclean: chflags -R noschg . .include @@ -165,57 +165,57 @@ reldoc: .endfor cp rdoc/${RELNOTES_LANG}/readme/docbook.css reldoc -system: packagesystem +disc1: packagesystem # Install system - mkdir -p release + mkdir -p ${.TARGET} cd ${WORLDDIR} && ${IMAKE} installkernel installworld distribution \ - DESTDIR=${.OBJDIR}/release MK_RESCUE=no MK_KERNEL_SYMBOLS=no \ + DESTDIR=${.OBJDIR}/${.TARGET} MK_RESCUE=no MK_KERNEL_SYMBOLS=no \ MK_PROFILE=no MK_SENDMAIL=no MK_TESTS=no MK_LIB32=no \ MK_DEBUG_FILES=no # Copy distfiles - mkdir -p release/usr/freebsd-dist + mkdir -p ${.TARGET}/usr/freebsd-dist for dist in MANIFEST $$(ls *.txz | grep -v -- '-dbg'); \ - do cp $${dist} release/usr/freebsd-dist; \ + do cp $${dist} ${.TARGET}/usr/freebsd-dist; \ done # Copy documentation, if generated .if !defined(NODOC) - cp reldoc/* release + cp reldoc/* ${.TARGET} .endif # Set up installation environment - ln -fs /tmp/bsdinstall_etc/resolv.conf release/etc/resolv.conf - echo sendmail_enable=\"NONE\" > release/etc/rc.conf - echo hostid_enable=\"NO\" >> release/etc/rc.conf - echo debug.witness.trace=0 >> release/etc/sysctl.conf - echo vfs.mountroot.timeout=\"10\" >> release/boot/loader.conf - cp ${.CURDIR}/rc.local release/etc + ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf + echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf + echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf + echo debug.witness.trace=0 >> ${.TARGET}/etc/sysctl.conf + echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf + cp ${.CURDIR}/rc.local ${.TARGET}/etc touch ${.TARGET} bootonly: packagesystem # Install system - mkdir -p bootonly + mkdir -p ${.TARGET} cd ${WORLDDIR} && ${IMAKE} installkernel installworld distribution \ - DESTDIR=${.OBJDIR}/bootonly MK_AMD=no MK_AT=no \ + DESTDIR=${.OBJDIR}/${.TARGET} MK_AMD=no MK_AT=no \ MK_GAMES=no MK_GROFF=no \ MK_INSTALLLIB=no MK_LIB32=no MK_MAIL=no \ MK_NCP=no MK_TOOLCHAIN=no MK_PROFILE=no \ MK_INSTALLIB=no MK_RESCUE=no MK_DICT=no \ MK_KERNEL_SYMBOLS=no MK_TESTS=no MK_DEBUG_FILES=no # Copy manifest only (no distfiles) to get checksums - mkdir -p bootonly/usr/freebsd-dist - cp MANIFEST bootonly/usr/freebsd-dist + mkdir -p ${.TARGET}/usr/freebsd-dist + cp MANIFEST ${.TARGET}/usr/freebsd-dist # Copy documentation, if generated .if !defined(NODOC) - cp reldoc/* bootonly + cp reldoc/* ${.TARGET} .endif # Set up installation environment - ln -fs /tmp/bsdinstall_etc/resolv.conf bootonly/etc/resolv.conf - echo sendmail_enable=\"NONE\" > bootonly/etc/rc.conf - echo hostid_enable=\"NO\" >> bootonly/etc/rc.conf - echo debug.witness.trace=0 >> bootonly/etc/sysctl.conf - echo vfs.mountroot.timeout=\"10\" >> bootonly/boot/loader.conf - cp ${.CURDIR}/rc.local bootonly/etc + ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf + echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf + echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf + echo debug.witness.trace=0 >> ${.TARGET}/etc/sysctl.conf + echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf + cp ${.CURDIR}/rc.local ${.TARGET}/etc -dvd: +dvd: packagesystem # Install system mkdir -p ${.TARGET} cd ${WORLDDIR} && ${IMAKE} installkernel installworld distribution \ @@ -240,8 +240,8 @@ dvd: touch ${.TARGET} release.iso: disc1.iso -disc1.iso: system - sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_CD ${.TARGET} release +disc1.iso: disc1 + sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_CD ${.TARGET} disc1 dvd1.iso: dvd pkg-stage sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_DVD ${.TARGET} dvd @@ -250,11 +250,11 @@ bootonly.iso: bootonly sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_BO ${.TARGET} bootonly memstick: memstick.img -memstick.img: system - sh ${.CURDIR}/${TARGET}/make-memstick.sh release ${.TARGET} +memstick.img: disc1 + sh ${.CURDIR}/${TARGET}/make-memstick.sh disc1 ${.TARGET} mini-memstick: mini-memstick.img -mini-memstick.img: system +mini-memstick.img: bootonly sh ${.CURDIR}/${TARGET}/make-memstick.sh bootonly ${.TARGET} packagesystem: base.txz kernel.txz ${EXTRA_PACKAGES} @@ -279,7 +279,7 @@ ftp: packagesystem cp *.txz MANIFEST ftp release: real-release vm-release cloudware-release - @true + touch ${.TARGET} real-release: ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} obj From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 17:34:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E1B5F951; Wed, 28 Jan 2015 17:34:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CDEF4154; Wed, 28 Jan 2015 17:34:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0SHYSQJ053492; Wed, 28 Jan 2015 17:34:28 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0SHYSHD053491; Wed, 28 Jan 2015 17:34:28 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501281734.t0SHYSHD053491@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 28 Jan 2015 17:34:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277837 - head/release/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 17:34:29 -0000 Author: gjb Date: Wed Jan 28 17:34:27 2015 New Revision: 277837 URL: https://svnweb.freebsd.org/changeset/base/277837 Log: Provide a description for the 'tests.txz' distribution in the MANIFEST file. Turn off the test suite installation by default. Tested with: head@r277834 MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/release/scripts/make-manifest.sh Modified: head/release/scripts/make-manifest.sh ============================================================================== --- head/release/scripts/make-manifest.sh Wed Jan 28 17:32:45 2015 (r277836) +++ head/release/scripts/make-manifest.sh Wed Jan 28 17:34:27 2015 (r277837) @@ -17,7 +17,9 @@ desc_games="Games (fortune, etc.)" desc_lib32="32-bit compatibility libraries" desc_ports="Ports tree" desc_src="System source code" +desc_tests="Test suite" src_default=off +tests_default=off for i in $*; do echo "`basename $i` `sha256 -q $i` `tar tvf $i | wc -l | tr -d ' '` `basename $i .txz` \"`eval echo \\\$desc_$(basename $i .txz)`\" `eval echo \\\${$(basename $i .txz)_default:-on}`" From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 17:39:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EACE0C26; Wed, 28 Jan 2015 17:39:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D773E1B0; Wed, 28 Jan 2015 17:39:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0SHdwjX054187; Wed, 28 Jan 2015 17:39:58 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0SHdwpY054186; Wed, 28 Jan 2015 17:39:58 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501281739.t0SHdwpY054186@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 28 Jan 2015 17:39:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277838 - head/release/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 17:39:59 -0000 Author: gjb Date: Wed Jan 28 17:39:57 2015 New Revision: 277838 URL: https://svnweb.freebsd.org/changeset/base/277838 Log: Fix a typo in a comment. MFC after: 1 week X-MFC-with: r277837 Sponsored by: The FreeBSD Foundation Modified: head/release/scripts/make-manifest.sh Modified: head/release/scripts/make-manifest.sh ============================================================================== --- head/release/scripts/make-manifest.sh Wed Jan 28 17:34:27 2015 (r277837) +++ head/release/scripts/make-manifest.sh Wed Jan 28 17:39:57 2015 (r277838) @@ -5,7 +5,7 @@ # Usage: make-manifest.sh foo1.txz foo2.txz ... # # The output file looks like this (tab-delimited): -# foo1.txz SHA256-checksu Number-of-files foo1 Description Install-by-default +# foo1.txz SHA256-checksum Number-of-files foo1 Description Install-by-default # # $FreeBSD$ From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 17:41:18 2015 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6D048D69; Wed, 28 Jan 2015 17:41:18 +0000 (UTC) Received: from gw.catspoiler.org (cl-1657.chi-02.us.sixxs.net [IPv6:2001:4978:f:678::2]) (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 0646F24E; Wed, 28 Jan 2015 17:41:17 +0000 (UTC) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.3/8.13.3) with ESMTP id t0SHf6gW001232; Wed, 28 Jan 2015 09:41:10 -0800 (PST) (envelope-from truckman@FreeBSD.org) Message-Id: <201501281741.t0SHf6gW001232@gw.catspoiler.org> Date: Wed, 28 Jan 2015 09:41:06 -0800 (PST) From: Don Lewis Subject: Re: svn commit: r277828 - in head/sys: fs/tmpfs vm To: kib@FreeBSD.org In-Reply-To: <201501281037.t0SAbNR3053095@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 17:41:18 -0000 On 28 Jan, Konstantin Belousov wrote: > Author: kib > Date: Wed Jan 28 10:37:23 2015 > New Revision: 277828 > URL: https://svnweb.freebsd.org/changeset/base/277828 > > Log: > Update mtime for tmpfs files modified through memory mapping. Similar > to UFS, perform updates during syncer scans, which in particular means > that tmpfs now performs scan on sync. Also, this means that a mtime > update may be delayed up to 30 seconds after the write. Maybe disable the scan if mounted noatime? From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 17:46:13 2015 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 993C0FDE; Wed, 28 Jan 2015 17:46:13 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 2522A288; Wed, 28 Jan 2015 17:46:12 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t0SHk4TM029839 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 28 Jan 2015 19:46:04 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t0SHk4TM029839 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t0SHk4A6029838; Wed, 28 Jan 2015 19:46:04 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 28 Jan 2015 19:46:04 +0200 From: Konstantin Belousov To: Don Lewis Subject: Re: svn commit: r277828 - in head/sys: fs/tmpfs vm Message-ID: <20150128174604.GN42409@kib.kiev.ua> References: <201501281037.t0SAbNR3053095@svn.freebsd.org> <201501281741.t0SHf6gW001232@gw.catspoiler.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201501281741.t0SHf6gW001232@gw.catspoiler.org> User-Agent: Mutt/1.5.23 (2014-03-12) 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.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 17:46:13 -0000 On Wed, Jan 28, 2015 at 09:41:06AM -0800, Don Lewis wrote: > On 28 Jan, Konstantin Belousov wrote: > > Author: kib > > Date: Wed Jan 28 10:37:23 2015 > > New Revision: 277828 > > URL: https://svnweb.freebsd.org/changeset/base/277828 > > > > Log: > > Update mtime for tmpfs files modified through memory mapping. Similar > > to UFS, perform updates during syncer scans, which in particular means > > that tmpfs now performs scan on sync. Also, this means that a mtime > > update may be delayed up to 30 seconds after the write. > > Maybe disable the scan if mounted noatime? It is for mtime, not atime, updates. In fact, I thought about per-mount option to enable/disable mtime updates, but then decided that it is too exotic. I will add if if real performance complain appear, this also explains relatively long MFC timeout. From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 18:13:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F2BA734; Wed, 28 Jan 2015 18:13:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C267808; Wed, 28 Jan 2015 18:13:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0SIDHm4072410; Wed, 28 Jan 2015 18:13:17 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0SIDHD2072409; Wed, 28 Jan 2015 18:13:17 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501281813.t0SIDHD2072409@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 28 Jan 2015 18:13:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277839 - head/share/man/man7 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 18:13:17 -0000 Author: gjb Date: Wed Jan 28 18:13:16 2015 New Revision: 277839 URL: https://svnweb.freebsd.org/changeset/base/277839 Log: Update release(7) to reflect renaming the 'system' target to 'disc1'. MFC after: 3 weeks X-MFC-with: r277458, r277536, r277606, r277609, r277836 Sponsored by: The FreeBSD Foundation Modified: head/share/man/man7/release.7 Modified: head/share/man/man7/release.7 ============================================================================== --- head/share/man/man7/release.7 Wed Jan 28 17:39:57 2015 (r277838) +++ head/share/man/man7/release.7 Wed Jan 28 18:13:16 2015 (r277839) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 16, 2015 +.Dd January 28, 2015 .Dt RELEASE 7 .Os .Sh NAME @@ -546,7 +546,7 @@ Major subtargets called by targets above Generates all the distribution archives .Pq base, kernel, ports, doc applicable on this platform. -.It Cm system +.It Cm disc1 Builds a bootable installation system containing all the distribution files packaged by the .Cm packagesystem From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 18:14:49 2015 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6235C97D; Wed, 28 Jan 2015 18:14:49 +0000 (UTC) Received: from gw.catspoiler.org (cl-1657.chi-02.us.sixxs.net [IPv6:2001:4978:f:678::2]) (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 12CD6818; Wed, 28 Jan 2015 18:14:48 +0000 (UTC) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.3/8.13.3) with ESMTP id t0SIEcLJ001370; Wed, 28 Jan 2015 10:14:42 -0800 (PST) (envelope-from truckman@FreeBSD.org) Message-Id: <201501281814.t0SIEcLJ001370@gw.catspoiler.org> Date: Wed, 28 Jan 2015 10:14:38 -0800 (PST) From: Don Lewis Subject: Re: svn commit: r277828 - in head/sys: fs/tmpfs vm To: kostikbel@gmail.com In-Reply-To: <20150128174604.GN42409@kib.kiev.ua> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 18:14:49 -0000 On 28 Jan, Konstantin Belousov wrote: > On Wed, Jan 28, 2015 at 09:41:06AM -0800, Don Lewis wrote: >> On 28 Jan, Konstantin Belousov wrote: >> > Author: kib >> > Date: Wed Jan 28 10:37:23 2015 >> > New Revision: 277828 >> > URL: https://svnweb.freebsd.org/changeset/base/277828 >> > >> > Log: >> > Update mtime for tmpfs files modified through memory mapping. Similar >> > to UFS, perform updates during syncer scans, which in particular means >> > that tmpfs now performs scan on sync. Also, this means that a mtime >> > update may be delayed up to 30 seconds after the write. >> >> Maybe disable the scan if mounted noatime? > It is for mtime, not atime, updates. Yeah, I haven't had my caffeine fix yet this morning ... From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 18:19:26 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 63736B35; Wed, 28 Jan 2015 18:19:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5048484E; Wed, 28 Jan 2015 18:19:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0SIJQO3073270; Wed, 28 Jan 2015 18:19:26 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0SIJQG4073269; Wed, 28 Jan 2015 18:19:26 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501281819.t0SIJQG4073269@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 28 Jan 2015 18:19:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277841 - head/contrib/amd/hlfsd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 18:19:26 -0000 Author: dim Date: Wed Jan 28 18:19:25 2015 New Revision: 277841 URL: https://svnweb.freebsd.org/changeset/base/277841 Log: Fix the following clang 3.6.0 warning in contrib/amd/hlfsd/homedir.c: contrib/amd/hlfsd/homedir.c:497:8: error: address of array 'buf' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] if (!buf || buf[0] == '\0') ~^~~ In the affected function, 'buf' is declared as an array of char, so it can never be null. Remove the unecessary check. Modified: head/contrib/amd/hlfsd/homedir.c Modified: head/contrib/amd/hlfsd/homedir.c ============================================================================== --- head/contrib/amd/hlfsd/homedir.c Wed Jan 28 18:13:52 2015 (r277840) +++ head/contrib/amd/hlfsd/homedir.c Wed Jan 28 18:19:25 2015 (r277841) @@ -494,7 +494,7 @@ readent: buf[0] = '\0'; fgets(buf, 256, passwd_fp); passwd_line++; - if (!buf || buf[0] == '\0') + if (buf[0] == '\0') goto readent; /* read user name */ From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 18:37:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3E471A4; Wed, 28 Jan 2015 18:37:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2AF2AA25; Wed, 28 Jan 2015 18:37:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0SIbAh3082535; Wed, 28 Jan 2015 18:37:10 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0SIbAjc082534; Wed, 28 Jan 2015 18:37:10 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501281837.t0SIbAjc082534@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 28 Jan 2015 18:37:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277843 - head/contrib/elftoolchain/elfcopy X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 18:37:10 -0000 Author: emaste Date: Wed Jan 28 18:37:09 2015 New Revision: 277843 URL: https://svnweb.freebsd.org/changeset/base/277843 Log: Preserve hard & symbolic links when modifying source file Strip is often used to modify existing files, rather than creating new files. If the existing file has hard links or is a symbolic link, act as if editing the file in place and preserve the links. Reported by: luigi Reviewed by: imp, rpaulo Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D1682 Modified: head/contrib/elftoolchain/elfcopy/main.c Modified: head/contrib/elftoolchain/elfcopy/main.c ============================================================================== --- head/contrib/elftoolchain/elfcopy/main.c Wed Jan 28 18:36:33 2015 (r277842) +++ head/contrib/elftoolchain/elfcopy/main.c Wed Jan 28 18:37:09 2015 (r277843) @@ -210,7 +210,7 @@ static struct { }; static int copy_from_tempfile(const char *src, const char *dst, - int infd, int *outfd); + int infd, int *outfd, int in_place); static void create_file(struct elfcopy *ecp, const char *src, const char *dst); static void elfcopy_main(struct elfcopy *ecp, int argc, char **argv); @@ -523,33 +523,39 @@ create_tempfile(char **fn, int *fd) #undef _TEMPFILEPATH } +/* + * Copy temporary file with path src and file descriptor infd to path dst. + * If in_place is set act as if editing the file in place, avoiding rename() + * to preserve hard and symbolic links. Output file remains open, with file + * descriptor returned in outfd. + */ static int -copy_from_tempfile(const char *src, const char *dst, int infd, int *outfd) +copy_from_tempfile(const char *src, const char *dst, int infd, int *outfd, + int in_place) { int tmpfd; /* * First, check if we can use rename(). */ - if (rename(src, dst) >= 0) { - *outfd = infd; - return (0); - } else if (errno != EXDEV) - return (-1); - - /* - * If the rename() failed due to 'src' and 'dst' residing in - * two different file systems, invoke a helper function in - * libelftc to do the copy. - */ - - if (unlink(dst) < 0) - return (-1); + if (in_place == 0) { + if (rename(src, dst) >= 0) { + *outfd = infd; + return (0); + } else if (errno != EXDEV) + return (-1); + + /* + * If the rename() failed due to 'src' and 'dst' residing in + * two different file systems, invoke a helper function in + * libelftc to do the copy. + */ - if ((tmpfd = open(dst, O_CREAT | O_WRONLY, 0755)) < 0) - return (-1); + if (unlink(dst) < 0) + return (-1); + } - if (lseek(infd, 0, SEEK_SET) < 0) + if ((tmpfd = open(dst, O_CREAT | O_TRUNC | O_WRONLY, 0755)) < 0) return (-1); if (elftc_copyfile(infd, tmpfd) < 0) @@ -578,6 +584,7 @@ create_file(struct elfcopy *ecp, const c struct stat sb; char *tempfile, *elftemp; int efd, ifd, ofd, ofd0, tfd; + int in_place; tempfile = NULL; @@ -718,10 +725,15 @@ copy_done: #endif if (tempfile != NULL) { - if (dst == NULL) + in_place = 0; + if (dst == NULL) { dst = src; + if (lstat(dst, &sb) != -1 && + (sb.st_nlink > 1 || S_ISLNK(sb.st_mode))) + in_place = 1; + } - if (copy_from_tempfile(tempfile, dst, ofd, &tfd) < 0) + if (copy_from_tempfile(tempfile, dst, ofd, &tfd, in_place) < 0) err(EXIT_FAILURE, "creation of %s failed", dst); free(tempfile); From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 18:40:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A3B4C349 for ; Wed, 28 Jan 2015 18:40:37 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 86177A57 for ; Wed, 28 Jan 2015 18:40:37 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id t0SIebBv028788 for ; Wed, 28 Jan 2015 18:40:37 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id t0SIebiM028785 for svn-src-all@freebsd.org; Wed, 28 Jan 2015 18:40:37 GMT (envelope-from bdrewery) Received: (qmail 9930 invoked from network); 28 Jan 2015 12:40:33 -0600 Received: from unknown (HELO ?10.10.1.139?) (freebsd@shatow.net@10.10.1.139) by sweb.xzibition.com with ESMTPA; 28 Jan 2015 12:40:33 -0600 Message-ID: <54C92D23.3090208@FreeBSD.org> Date: Wed, 28 Jan 2015 12:40:35 -0600 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: =?UTF-8?B?RGFnLUVybGluZyBTbcO4cmdyYXY=?= , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r277693 - head/sys/boot/forth References: <201501251157.t0PBvIdK025342@svn.freebsd.org> In-Reply-To: <201501251157.t0PBvIdK025342@svn.freebsd.org> OpenPGP: id=6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xdmkNtPoNGAmGEpV93iHdsUUDodoA3cv6" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 18:40:37 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --xdmkNtPoNGAmGEpV93iHdsUUDodoA3cv6 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 1/25/2015 5:57 AM, Dag-Erling Sm=C3=B8rgrav wrote: > Author: des > Date: Sun Jan 25 11:57:18 2015 > New Revision: 277693 > URL: https://svnweb.freebsd.org/changeset/base/277693 >=20 > Log: > Fix the font in the text version. This has bothered me for a long ti= me... > =20 > MFC after: 1 week Same, thanks. --=20 Regards, Bryan Drewery --xdmkNtPoNGAmGEpV93iHdsUUDodoA3cv6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJUyS0jAAoJEDXXcbtuRpfPoxEH/2iLBN1fPrjLhhOsIuCX6oKN Hs4t9arlLvPzCe7XLoGZPuOyTYLh6pR5MIzmGXyaTPDaw7hnNqYtWkuNrkZl6dMg whgWl6FwZYva6hPo663fIwlus1t3NItTXkRmCGzv0zVGw/UTtBy3be1r7JdwKP4u jvH3PJ7IglTjhY5Oq7zy0Fjx+BIXdXsU2/3SuxTwOIR5w7zL/vrN9A+cDPd+bpXU F9Q/mcWl4OpQ8/MGhdRBCM0FqtENJH4nGnuYzMUGx3kjWH7wSOquHTag0hT8VQBE 2fdw1I9sBp9Dy6sQDH1cAAg3Dw9vxBb9IxYjTi54+qdsYevMXcWTlfWBVOX3Jy0= =/nQ9 -----END PGP SIGNATURE----- --xdmkNtPoNGAmGEpV93iHdsUUDodoA3cv6-- From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 19:05:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 95D6FC0C; Wed, 28 Jan 2015 19:05:03 +0000 (UTC) Received: from vlakno.cz (mail.vlakno.cz [91.217.96.224]) by mx1.freebsd.org (Postfix) with ESMTP id 5C66FD2D; Wed, 28 Jan 2015 19:05:02 +0000 (UTC) Received: by vlakno.cz (Postfix, from userid 1002) id D20E41DAC962; Wed, 28 Jan 2015 20:04:22 +0100 (CET) Date: Wed, 28 Jan 2015 20:04:22 +0100 From: Roman Divacky To: Dimitry Andric Subject: Re: svn commit: r277841 - head/contrib/amd/hlfsd Message-ID: <20150128190422.GA58164@vlakno.cz> References: <201501281819.t0SIJQG4073269@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201501281819.t0SIJQG4073269@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 19:05:03 -0000 Given that this is a contributed code - have you sent the fix upstream? Also, upstream seems to have newer versions of this... On Wed, Jan 28, 2015 at 06:19:26PM +0000, Dimitry Andric wrote: > Author: dim > Date: Wed Jan 28 18:19:25 2015 > New Revision: 277841 > URL: https://svnweb.freebsd.org/changeset/base/277841 > > Log: > Fix the following clang 3.6.0 warning in contrib/amd/hlfsd/homedir.c: > > contrib/amd/hlfsd/homedir.c:497:8: error: address of array 'buf' will > always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] > if (!buf || buf[0] == '\0') > ~^~~ > > In the affected function, 'buf' is declared as an array of char, so it > can never be null. Remove the unecessary check. > > Modified: > head/contrib/amd/hlfsd/homedir.c > > Modified: head/contrib/amd/hlfsd/homedir.c > ============================================================================== > --- head/contrib/amd/hlfsd/homedir.c Wed Jan 28 18:13:52 2015 (r277840) > +++ head/contrib/amd/hlfsd/homedir.c Wed Jan 28 18:19:25 2015 (r277841) > @@ -494,7 +494,7 @@ readent: > buf[0] = '\0'; > fgets(buf, 256, passwd_fp); > passwd_line++; > - if (!buf || buf[0] == '\0') > + if (buf[0] == '\0') > goto readent; > > /* read user name */ From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 19:11:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 72754D4; Wed, 28 Jan 2015 19:11:56 +0000 (UTC) Received: from bsdpad.com (xc1.bsdpad.com [195.154.136.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38BECE20; Wed, 28 Jan 2015 19:11:55 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bsdpad.com) by bsdpad.com with smtp (Exim 4.83 (FreeBSD)) (envelope-from ) id 1YGXWD-000BcS-LO; Wed, 28 Jan 2015 18:39:13 +0000 Received: by bsdpad.com (nbSMTP-1.00) for uid 1001 br@bsdpad.com; Wed, 28 Jan 2015 18:39:13 +0000 (GMT) Date: Wed, 28 Jan 2015 18:39:13 +0000 From: Ruslan Bukin To: Ian Lepore Subject: Re: svn commit: r277835 - in head: lib/libpmc sys/arm/arm sys/arm/include sys/arm/ti sys/conf sys/dev/hwpmc sys/sys Message-ID: <20150128183913.GA44243@bsdpad.com> References: <201501281608.t0SG88gs009253@svn.freebsd.org> <1422462903.15718.60.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1422462903.15718.60.camel@freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 19:11:56 -0000 On Wed, Jan 28, 2015 at 09:35:03AM -0700, Ian Lepore wrote: > On Wed, 2015-01-28 at 16:08 +0000, Ruslan Bukin wrote: > > Author: br > > Date: Wed Jan 28 16:08:07 2015 > > New Revision: 277835 > > URL: https://svnweb.freebsd.org/changeset/base/277835 > > > > Log: > > Add ARMv7 performance monitoring counters. > > > > Differential Revision: https://reviews.freebsd.org/D1687 > > Reviewed by: rpaulo > > Sponsored by: DARPA, AFRL > > > > Added: > > head/sys/dev/hwpmc/hwpmc_armv7.c (contents, props changed) > > head/sys/dev/hwpmc/hwpmc_armv7.h (contents, props changed) > > Modified: > > head/lib/libpmc/libpmc.c > > head/sys/arm/arm/intr.c > > head/sys/arm/include/pmc_mdep.h > > head/sys/arm/ti/files.ti > > head/sys/conf/files.arm > > head/sys/dev/hwpmc/hwpmc_arm.c > > head/sys/dev/hwpmc/pmc_events.h > > head/sys/sys/pmc.h > > This was in phabricator for review for 27 hours before it got committed, > that's not enough time to allow people to actually review it. That > would be not enough time for even a simple change, let alone over a > thousand of lines of code. It certainly wasn't reviewed by those > actively working on arm pmc stuff recently (gnn and to a lesser degree, > me). Ok, make sense, it actually was my first experience with PB, and I expected any activity from people who want to review this. > > Just from a quick glance at the part that wasn't truncated, I notice all > the inline asm stuff is wrong -- it duplicates what's already available > in cpu-v6.h. > I had a conversation with Andrew this morning, he pointed me out those defines in cpu-v6.h, but we agreed those are optional stuff. I.e. duplicates != wrong. I'll fix that. Thanks Ruslan From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 19:25:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF8EB6E7; Wed, 28 Jan 2015 19:25:10 +0000 (UTC) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 99112F74; Wed, 28 Jan 2015 19:25:10 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::7cc2:15cb:986d:f14e] (unknown [IPv6:2001:7b8:3a7:0:7cc2:15cb:986d:f14e]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id B17285C2E; Wed, 28 Jan 2015 20:25:06 +0100 (CET) Subject: Re: svn commit: r277841 - head/contrib/amd/hlfsd Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_A897BEAF-DD84-4D6F-BE19-BD563CE2C61B"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Pgp-Agent: GPGMail 2.5b4 (05244f0+) From: Dimitry Andric In-Reply-To: <20150128190422.GA58164@vlakno.cz> Date: Wed, 28 Jan 2015 20:25:02 +0100 Message-Id: <874F65B6-0C1A-4230-B277-119C31BA31D7@FreeBSD.org> References: <201501281819.t0SIJQG4073269@svn.freebsd.org> <20150128190422.GA58164@vlakno.cz> To: Roman Divacky X-Mailer: Apple Mail (2.2070.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 19:25:11 -0000 --Apple-Mail=_A897BEAF-DD84-4D6F-BE19-BD563CE2C61B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 28 Jan 2015, at 20:04, Roman Divacky wrote: > On Wed, Jan 28, 2015 at 06:19:26PM +0000, Dimitry Andric wrote: >> Author: dim >> Date: Wed Jan 28 18:19:25 2015 >> New Revision: 277841 >> URL: https://svnweb.freebsd.org/changeset/base/277841 >>=20 >> Log: >> Fix the following clang 3.6.0 warning in = contrib/amd/hlfsd/homedir.c: >>=20 >> contrib/amd/hlfsd/homedir.c:497:8: error: address of array 'buf' = will >> always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] >> if (!buf || buf[0] =3D=3D '\0') >> ~^~~ >>=20 >> In the affected function, 'buf' is declared as an array of char, so = it >> can never be null. Remove the unecessary check. ... > Given that this is a contributed code - have you sent the fix > upstream? Also, upstream seems to have newer versions of this... Apparently upstream fixed this about six years ago: = http://git.fsl.cs.sunysb.edu/?p=3Dam-utils-6.2.git;a=3Dcommitdiff;h=3De630= 1006ef97d31745f9ffbb17c58cb39d18c6aa#patch9 The last real import for am-utils was about 7 year ago. Maybe it's time for an update, if it is still actively used. -Dimitry --Apple-Mail=_A897BEAF-DD84-4D6F-BE19-BD563CE2C61B Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.26 iEYEARECAAYFAlTJN5IACgkQsF6jCi4glqM+RQCfTspEEJW1+ngT+rMNL/YkTf8k rncAoP5nCInKY3RPtJPIVkV6JB3mmETO =iWHd -----END PGP SIGNATURE----- --Apple-Mail=_A897BEAF-DD84-4D6F-BE19-BD563CE2C61B-- From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 19:27:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B1B6B97D; Wed, 28 Jan 2015 19:27:32 +0000 (UTC) Received: from nibbler.fubar.geek.nz (nibbler.fubar.geek.nz [199.48.134.198]) by mx1.freebsd.org (Postfix) with ESMTP id 93E7AFA4; Wed, 28 Jan 2015 19:27:32 +0000 (UTC) Received: from bender (c108.sec.cl.cam.ac.uk [128.232.18.108]) by nibbler.fubar.geek.nz (Postfix) with ESMTPSA id A8A7973000; Wed, 28 Jan 2015 19:27:24 +0000 (UTC) Date: Wed, 28 Jan 2015 19:27:19 +0000 From: Andrew Turner To: Ruslan Bukin Subject: Re: svn commit: r277835 - in head: lib/libpmc sys/arm/arm sys/arm/include sys/arm/ti sys/conf sys/dev/hwpmc sys/sys Message-ID: <20150128192719.2baf6145@bender> In-Reply-To: <20150128183913.GA44243@bsdpad.com> References: <201501281608.t0SG88gs009253@svn.freebsd.org> <1422462903.15718.60.camel@freebsd.org> <20150128183913.GA44243@bsdpad.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ian Lepore X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 19:27:32 -0000 On Wed, 28 Jan 2015 18:39:13 +0000 Ruslan Bukin wrote: > On Wed, Jan 28, 2015 at 09:35:03AM -0700, Ian Lepore wrote: > > Just from a quick glance at the part that wasn't truncated, I > > notice all the inline asm stuff is wrong -- it duplicates what's > > already available in cpu-v6.h. > > > > I had a conversation with Andrew this morning, he pointed me out > those defines in cpu-v6.h, but we agreed those are optional stuff. > I.e. duplicates != wrong. I'll fix that. Thanks It would be useful to use them, but this will need Makefile changes as some of these defines are only available when __ARM_ARCH > 6 which may not be true in userland. If we do make these changes we then need to make sure that none of the code on the file built as ARMv7 is run on an ARMv6 as the compiler may choose to use invalid instructions on v6. Andrew From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 19:41:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A3B1285; Wed, 28 Jan 2015 19:41:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 06A73194; Wed, 28 Jan 2015 19:41:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0SJfVW2013335; Wed, 28 Jan 2015 19:41:31 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0SJfVdb013334; Wed, 28 Jan 2015 19:41:31 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501281941.t0SJfVdb013334@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 28 Jan 2015 19:41: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: r277845 - stable/10/sys/dev/usb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 19:41:32 -0000 Author: hselasky Date: Wed Jan 28 19:41:31 2015 New Revision: 277845 URL: https://svnweb.freebsd.org/changeset/base/277845 Log: MFC r277417: Fix returned data for the USB_GET_DEV_PORT_PATH IOCTL in particular the value returned in the "udp_port_level" field. Modified: stable/10/sys/dev/usb/usb_generic.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/usb_generic.c ============================================================================== --- stable/10/sys/dev/usb/usb_generic.c Wed Jan 28 18:45:40 2015 (r277844) +++ stable/10/sys/dev/usb/usb_generic.c Wed Jan 28 19:41:31 2015 (r277845) @@ -1850,14 +1850,13 @@ ugen_get_port_path(struct usb_fifo *f, s if (nlevel > USB_DEVICE_PORT_PATH_MAX) goto error; + /* store total level of ports */ + dpp->udp_port_level = nlevel; + /* store port index array */ next = udev; while (next->parent_hub != NULL) { - nlevel--; - - dpp->udp_port_no[nlevel] = next->port_no; - dpp->udp_port_level = nlevel; - + dpp->udp_port_no[--nlevel] = next->port_no; next = next->parent_hub; } return (0); /* success */ From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 19:43:34 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A99393E4; Wed, 28 Jan 2015 19:43:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 957DE243; Wed, 28 Jan 2015 19:43:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0SJhYuk015952; Wed, 28 Jan 2015 19:43:34 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0SJhY64015951; Wed, 28 Jan 2015 19:43:34 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501281943.t0SJhY64015951@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 28 Jan 2015 19:43:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r277846 - stable/9/sys/dev/usb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 19:43:34 -0000 Author: hselasky Date: Wed Jan 28 19:43:33 2015 New Revision: 277846 URL: https://svnweb.freebsd.org/changeset/base/277846 Log: MFC r277417: Fix returned data for the USB_GET_DEV_PORT_PATH IOCTL in particular the value returned in the "udp_port_level" field. Modified: stable/9/sys/dev/usb/usb_generic.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/usb_generic.c ============================================================================== --- stable/9/sys/dev/usb/usb_generic.c Wed Jan 28 19:41:31 2015 (r277845) +++ stable/9/sys/dev/usb/usb_generic.c Wed Jan 28 19:43:33 2015 (r277846) @@ -1837,14 +1837,13 @@ ugen_get_port_path(struct usb_fifo *f, s if (nlevel > USB_DEVICE_PORT_PATH_MAX) goto error; + /* store total level of ports */ + dpp->udp_port_level = nlevel; + /* store port index array */ next = udev; while (next->parent_hub != NULL) { - nlevel--; - - dpp->udp_port_no[nlevel] = next->port_no; - dpp->udp_port_level = nlevel; - + dpp->udp_port_no[--nlevel] = next->port_no; next = next->parent_hub; } return (0); /* success */ From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 19:49:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 554156EF; Wed, 28 Jan 2015 19:49:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4169D295; Wed, 28 Jan 2015 19:49:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0SJnsuA016879; Wed, 28 Jan 2015 19:49:54 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0SJnrrd016877; Wed, 28 Jan 2015 19:49:53 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501281949.t0SJnrrd016877@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 28 Jan 2015 19:49: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: r277847 - stable/10/lib/libusb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 19:49:54 -0000 Author: hselasky Date: Wed Jan 28 19:49:53 2015 New Revision: 277847 URL: https://svnweb.freebsd.org/changeset/base/277847 Log: MFC r277245: Add more USB request definitions. The values are described in section 9.4.11 and 9.4.12 of the "Universal Serial Bus 3.0 Specification" Modified: stable/10/lib/libusb/libusb.h stable/10/lib/libusb/libusb20_desc.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libusb/libusb.h ============================================================================== --- stable/10/lib/libusb/libusb.h Wed Jan 28 19:43:33 2015 (r277846) +++ stable/10/lib/libusb/libusb.h Wed Jan 28 19:49:53 2015 (r277847) @@ -128,6 +128,8 @@ enum libusb_standard_request { LIBUSB_REQUEST_GET_INTERFACE = 0x0A, LIBUSB_REQUEST_SET_INTERFACE = 0x0B, LIBUSB_REQUEST_SYNCH_FRAME = 0x0C, + LIBUSB_REQUEST_SET_SEL = 0x30, + LIBUSB_REQUEST_SET_ISOCH_DELAY = 0x31, }; enum libusb_request_type { Modified: stable/10/lib/libusb/libusb20_desc.h ============================================================================== --- stable/10/lib/libusb/libusb20_desc.h Wed Jan 28 19:43:33 2015 (r277846) +++ stable/10/lib/libusb/libusb20_desc.h Wed Jan 28 19:49:53 2015 (r277847) @@ -481,6 +481,12 @@ enum libusb20_standard_request { /** Set then report an endpoint's synchronization frame */ LIBUSB20_REQUEST_SYNCH_FRAME = 0x0C, + + /** Set U1 and U2 system exit latency */ + LIBUSB20_REQUEST_SET_SEL = 0x30, + + /** Set isochronous delay */ + LIBUSB20_REQUEST_SET_ISOCH_DELAY = 0x31, }; /** \ingroup misc From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 19:53:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4CAD294D; Wed, 28 Jan 2015 19:53:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38C3536F; Wed, 28 Jan 2015 19:53:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0SJr1x9020783; Wed, 28 Jan 2015 19:53:01 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0SJr0cq020781; Wed, 28 Jan 2015 19:53:00 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501281953.t0SJr0cq020781@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 28 Jan 2015 19:53:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r277848 - stable/9/lib/libusb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 19:53:01 -0000 Author: hselasky Date: Wed Jan 28 19:53:00 2015 New Revision: 277848 URL: https://svnweb.freebsd.org/changeset/base/277848 Log: MFC r277245: Add more USB request definitions. The values are described in section 9.4.11 and 9.4.12 of the "Universal Serial Bus 3.0 Specification" Modified: stable/9/lib/libusb/libusb.h stable/9/lib/libusb/libusb20_desc.h Directory Properties: stable/9/lib/ (props changed) stable/9/lib/libusb/ (props changed) Modified: stable/9/lib/libusb/libusb.h ============================================================================== --- stable/9/lib/libusb/libusb.h Wed Jan 28 19:49:53 2015 (r277847) +++ stable/9/lib/libusb/libusb.h Wed Jan 28 19:53:00 2015 (r277848) @@ -125,6 +125,8 @@ enum libusb_standard_request { LIBUSB_REQUEST_GET_INTERFACE = 0x0A, LIBUSB_REQUEST_SET_INTERFACE = 0x0B, LIBUSB_REQUEST_SYNCH_FRAME = 0x0C, + LIBUSB_REQUEST_SET_SEL = 0x30, + LIBUSB_REQUEST_SET_ISOCH_DELAY = 0x31, }; enum libusb_request_type { Modified: stable/9/lib/libusb/libusb20_desc.h ============================================================================== --- stable/9/lib/libusb/libusb20_desc.h Wed Jan 28 19:49:53 2015 (r277847) +++ stable/9/lib/libusb/libusb20_desc.h Wed Jan 28 19:53:00 2015 (r277848) @@ -477,6 +477,12 @@ enum libusb20_standard_request { /** Set then report an endpoint's synchronization frame */ LIBUSB20_REQUEST_SYNCH_FRAME = 0x0C, + + /** Set U1 and U2 system exit latency */ + LIBUSB20_REQUEST_SET_SEL = 0x30, + + /** Set isochronous delay */ + LIBUSB20_REQUEST_SET_ISOCH_DELAY = 0x31, }; /** \ingroup misc From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 19:54:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C0628B1D; Wed, 28 Jan 2015 19:54:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC499389; Wed, 28 Jan 2015 19:54:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0SJsemc021037; Wed, 28 Jan 2015 19:54:40 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0SJse5b021034; Wed, 28 Jan 2015 19:54:40 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501281954.t0SJse5b021034@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 28 Jan 2015 19:54:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r277849 - stable/8/lib/libusb X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 19:54:40 -0000 Author: hselasky Date: Wed Jan 28 19:54:39 2015 New Revision: 277849 URL: https://svnweb.freebsd.org/changeset/base/277849 Log: MFC r277245: Add more USB request definitions. The values are described in section 9.4.11 and 9.4.12 of the "Universal Serial Bus 3.0 Specification" Modified: stable/8/lib/libusb/libusb.h stable/8/lib/libusb/libusb20_desc.h Directory Properties: stable/8/lib/ (props changed) stable/8/lib/libusb/ (props changed) Modified: stable/8/lib/libusb/libusb.h ============================================================================== --- stable/8/lib/libusb/libusb.h Wed Jan 28 19:53:00 2015 (r277848) +++ stable/8/lib/libusb/libusb.h Wed Jan 28 19:54:39 2015 (r277849) @@ -125,6 +125,8 @@ enum libusb_standard_request { LIBUSB_REQUEST_GET_INTERFACE = 0x0A, LIBUSB_REQUEST_SET_INTERFACE = 0x0B, LIBUSB_REQUEST_SYNCH_FRAME = 0x0C, + LIBUSB_REQUEST_SET_SEL = 0x30, + LIBUSB_REQUEST_SET_ISOCH_DELAY = 0x31, }; enum libusb_request_type { Modified: stable/8/lib/libusb/libusb20_desc.h ============================================================================== --- stable/8/lib/libusb/libusb20_desc.h Wed Jan 28 19:53:00 2015 (r277848) +++ stable/8/lib/libusb/libusb20_desc.h Wed Jan 28 19:54:39 2015 (r277849) @@ -477,6 +477,12 @@ enum libusb20_standard_request { /** Set then report an endpoint's synchronization frame */ LIBUSB20_REQUEST_SYNCH_FRAME = 0x0C, + + /** Set U1 and U2 system exit latency */ + LIBUSB20_REQUEST_SET_SEL = 0x30, + + /** Set isochronous delay */ + LIBUSB20_REQUEST_SET_ISOCH_DELAY = 0x31, }; /** \ingroup misc From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 19:57:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C6A9EDA4; Wed, 28 Jan 2015 19:57:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD4853C8; Wed, 28 Jan 2015 19:57:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0SJvfPw021506; Wed, 28 Jan 2015 19:57:41 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0SJvf0n021503; Wed, 28 Jan 2015 19:57:41 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501281957.t0SJvf0n021503@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 28 Jan 2015 19:57:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r277850 - in stable/8/sys/dev/usb: . serial X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 19:57:41 -0000 Author: hselasky Date: Wed Jan 28 19:57:40 2015 New Revision: 277850 URL: https://svnweb.freebsd.org/changeset/base/277850 Log: MFC r277246: Add more USB device IDs. PR: 196362 Modified: stable/8/sys/dev/usb/serial/u3g.c stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/serial/u3g.c ============================================================================== --- stable/8/sys/dev/usb/serial/u3g.c Wed Jan 28 19:54:39 2015 (r277849) +++ stable/8/sys/dev/usb/serial/u3g.c Wed Jan 28 19:57:40 2015 (r277850) @@ -243,6 +243,8 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(DELL, U740, 0), U3G_DEV(DLINK, DWR510_CD, U3GINIT_SCSIEJECT), U3G_DEV(DLINK, DWR510, 0), + U3G_DEV(DLINK, DWM157_CD, U3GINIT_SCSIEJECT), + U3G_DEV(DLINK, DWM157, 0), U3G_DEV(DLINK3, DWM652, 0), U3G_DEV(HP, EV2200, 0), U3G_DEV(HP, HS2300, 0), Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Wed Jan 28 19:54:39 2015 (r277849) +++ stable/8/sys/dev/usb/usbdevs Wed Jan 28 19:57:40 2015 (r277850) @@ -1619,6 +1619,8 @@ product DLINK DSB650 0xabc1 10/100 Ethe product DLINK DUBH7 0xf103 DUB-H7 USB 2.0 7-Port Hub product DLINK DWR510_CD 0xa805 DWR-510 CD-ROM Mode product DLINK DWR510 0x7e12 DWR-510 +product DLINK DWM157 0x7d02 DWM-157 +product DLINK DWM157_CD 0xa707 DWM-157 CD-ROM Mode product DLINK RTL8188CU 0x3308 RTL8188CU product DLINK RTL8192CU_1 0x3307 RTL8192CU product DLINK RTL8192CU_2 0x3309 RTL8192CU From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 19:59:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF4B9F0A; Wed, 28 Jan 2015 19:59:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB2403E9; Wed, 28 Jan 2015 19:59:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0SJxRKA021802; Wed, 28 Jan 2015 19:59:27 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0SJxRJH021795; Wed, 28 Jan 2015 19:59:27 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501281959.t0SJxRJH021795@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 28 Jan 2015 19:59:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r277851 - in stable/9/sys/dev/usb: . serial X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 19:59:28 -0000 Author: hselasky Date: Wed Jan 28 19:59:26 2015 New Revision: 277851 URL: https://svnweb.freebsd.org/changeset/base/277851 Log: MFC r277246: Add more USB device IDs. PR: 196362 Modified: stable/9/sys/dev/usb/serial/u3g.c stable/9/sys/dev/usb/usbdevs Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/serial/u3g.c ============================================================================== --- stable/9/sys/dev/usb/serial/u3g.c Wed Jan 28 19:57:40 2015 (r277850) +++ stable/9/sys/dev/usb/serial/u3g.c Wed Jan 28 19:59:26 2015 (r277851) @@ -239,6 +239,8 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(DELL, U740, 0), U3G_DEV(DLINK, DWR510_CD, U3GINIT_SCSIEJECT), U3G_DEV(DLINK, DWR510, 0), + U3G_DEV(DLINK, DWM157_CD, U3GINIT_SCSIEJECT), + U3G_DEV(DLINK, DWM157, 0), U3G_DEV(DLINK3, DWM652, 0), U3G_DEV(HP, EV2200, 0), U3G_DEV(HP, HS2300, 0), Modified: stable/9/sys/dev/usb/usbdevs ============================================================================== --- stable/9/sys/dev/usb/usbdevs Wed Jan 28 19:57:40 2015 (r277850) +++ stable/9/sys/dev/usb/usbdevs Wed Jan 28 19:59:26 2015 (r277851) @@ -1626,6 +1626,8 @@ product DLINK DSB650 0xabc1 10/100 Ethe product DLINK DUBH7 0xf103 DUB-H7 USB 2.0 7-Port Hub product DLINK DWR510_CD 0xa805 DWR-510 CD-ROM Mode product DLINK DWR510 0x7e12 DWR-510 +product DLINK DWM157 0x7d02 DWM-157 +product DLINK DWM157_CD 0xa707 DWM-157 CD-ROM Mode product DLINK RTL8188CU 0x3308 RTL8188CU product DLINK RTL8192CU_1 0x3307 RTL8192CU product DLINK RTL8192CU_2 0x3309 RTL8192CU From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 20:01:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ADDC6F4; Wed, 28 Jan 2015 20:01:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 99DC05F3; Wed, 28 Jan 2015 20:01:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0SK1Md1025767; Wed, 28 Jan 2015 20:01:22 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0SK1MWT025761; Wed, 28 Jan 2015 20:01:22 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501282001.t0SK1MWT025761@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 28 Jan 2015 20:01: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: r277852 - in stable/10/sys/dev/usb: . serial X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 20:01:22 -0000 Author: hselasky Date: Wed Jan 28 20:01:21 2015 New Revision: 277852 URL: https://svnweb.freebsd.org/changeset/base/277852 Log: MFC r277246: Add more USB device IDs. PR: 196362 Modified: stable/10/sys/dev/usb/serial/u3g.c stable/10/sys/dev/usb/usbdevs Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/serial/u3g.c ============================================================================== --- stable/10/sys/dev/usb/serial/u3g.c Wed Jan 28 19:59:26 2015 (r277851) +++ stable/10/sys/dev/usb/serial/u3g.c Wed Jan 28 20:01:21 2015 (r277852) @@ -239,6 +239,8 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(DELL, U740, 0), U3G_DEV(DLINK, DWR510_CD, U3GINIT_SCSIEJECT), U3G_DEV(DLINK, DWR510, 0), + U3G_DEV(DLINK, DWM157_CD, U3GINIT_SCSIEJECT), + U3G_DEV(DLINK, DWM157, 0), U3G_DEV(DLINK3, DWM652, 0), U3G_DEV(HP, EV2200, 0), U3G_DEV(HP, HS2300, 0), Modified: stable/10/sys/dev/usb/usbdevs ============================================================================== --- stable/10/sys/dev/usb/usbdevs Wed Jan 28 19:59:26 2015 (r277851) +++ stable/10/sys/dev/usb/usbdevs Wed Jan 28 20:01:21 2015 (r277852) @@ -1626,6 +1626,8 @@ product DLINK DSB650 0xabc1 10/100 Ethe product DLINK DUBH7 0xf103 DUB-H7 USB 2.0 7-Port Hub product DLINK DWR510_CD 0xa805 DWR-510 CD-ROM Mode product DLINK DWR510 0x7e12 DWR-510 +product DLINK DWM157 0x7d02 DWM-157 +product DLINK DWM157_CD 0xa707 DWM-157 CD-ROM Mode product DLINK RTL8188CU 0x3308 RTL8188CU product DLINK RTL8192CU_1 0x3307 RTL8192CU product DLINK RTL8192CU_2 0x3309 RTL8192CU From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 20:11:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7372F3F9 for ; Wed, 28 Jan 2015 20:11:30 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC6C1812 for ; Wed, 28 Jan 2015 20:11:29 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id t0SKBTVn062069 for ; Wed, 28 Jan 2015 20:11:29 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id t0SKBTGS062067 for svn-src-all@freebsd.org; Wed, 28 Jan 2015 20:11:29 GMT (envelope-from bdrewery) Received: (qmail 20321 invoked from network); 28 Jan 2015 14:11:26 -0600 Received: from unknown (HELO ?10.10.1.139?) (freebsd@shatow.net@10.10.1.139) by sweb.xzibition.com with ESMTPA; 28 Jan 2015 14:11:26 -0600 Message-ID: <54C9426F.9090807@FreeBSD.org> Date: Wed, 28 Jan 2015 14:11:27 -0600 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Baptiste Daroussin , Devin Teske Subject: Re: svn commit: r277652 - in head/usr.sbin/pw: . tests References: <201501241913.t0OJD4xT039188@svn.freebsd.org> <20150125155254.V1007@besplex.bde.org> <20150125142148.GA76051@zxy.spb.ru> <20150126014336.P2572@besplex.bde.org> <5D58B34B-8647-4B69-8D90-E7D37C98D4AD@FreeBSD.org> <20150127234420.GB84622@ivaldir.etoilebsd.net> In-Reply-To: <20150127234420.GB84622@ivaldir.etoilebsd.net> OpenPGP: id=6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="JU5it33ND87dNRF5vUdKTFcnLsKjciTRW" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bruce Evans , Slawa Olhovchenkov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 20:11:30 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --JU5it33ND87dNRF5vUdKTFcnLsKjciTRW Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 1/27/2015 5:44 PM, Baptiste Daroussin wrote: > pw groupdel -u plop removing wheel... or pw userdel -u something > trying to delete root.=20 I just realized this has bitten me many times. I added a ton of voodoo in my scripts to avoid removing root/wheel. This is surely it though. --=20 Regards, Bryan Drewery --JU5it33ND87dNRF5vUdKTFcnLsKjciTRW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJUyUJvAAoJEDXXcbtuRpfPujYH/3P+vM4MPmqcjIt1ZhbqEneW 6oL1Qlu54KzewVELGYVmwi3kOgNp2dqhI2+u3/w2bDjoY54ndhClkOYcRNg5kv+r mLx6sD7aGaMfxdu4MVuSjxnIuIX+hbMYNQ/7qQ7uF9V0133qePj1VkCd52UzwpFS mwurM7hiMuzGHJWgy3TsU3Y2xgZIwPpswXzW8v2DnOYomPaXgSHjx4O2iP99YcR2 GtAMELnWPpjH+r9iFx5AweF+gshK/rvC1pFM3eVUFJm+iOQQceRSf2kVpEefVKZB 91GnmU+rYTiVNlOHOi+895Bm+UZ7fOH128P0uDiOgpw0DYaBlrdeyURFF8RH84k= =MqZu -----END PGP SIGNATURE----- --JU5it33ND87dNRF5vUdKTFcnLsKjciTRW-- From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 20:22:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2254A7D8; Wed, 28 Jan 2015 20:22:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F2C195F; Wed, 28 Jan 2015 20:22:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0SKMmS2035503; Wed, 28 Jan 2015 20:22:48 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0SKMm0C035502; Wed, 28 Jan 2015 20:22:48 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201501282022.t0SKMm0C035502@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Wed, 28 Jan 2015 20:22:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277853 - head/usr.sbin/binmiscctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 20:22:49 -0000 Author: sbruno Date: Wed Jan 28 20:22:48 2015 New Revision: 277853 URL: https://svnweb.freebsd.org/changeset/base/277853 Log: Check for invalid length or more than max length for the interpreter, instead of the validity of the string pointer holding the interpreter. Submitted by: sson Reviewed by: dim MFC after: 3 days Modified: head/usr.sbin/binmiscctl/binmiscctl.c Modified: head/usr.sbin/binmiscctl/binmiscctl.c ============================================================================== --- head/usr.sbin/binmiscctl/binmiscctl.c Wed Jan 28 20:01:21 2015 (r277852) +++ head/usr.sbin/binmiscctl/binmiscctl.c Wed Jan 28 20:22:48 2015 (r277853) @@ -363,7 +363,7 @@ add_cmd(__unused int argc, char *argv[], usage("Error: Missing magic argument"); } - if (!xbe->xbe_interpreter) { + if (!strnlen(xbe->xbe_interpreter, IBE_INTERP_LEN_MAX)) { usage("Error: Missing 'interpreter' argument"); } From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 21:01:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 927D132B; Wed, 28 Jan 2015 21:01:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F216E35; Wed, 28 Jan 2015 21:01:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0SL1uPw054834; Wed, 28 Jan 2015 21:01:56 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0SL1ukn054833; Wed, 28 Jan 2015 21:01:56 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201501282101.t0SL1ukn054833@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 28 Jan 2015 21:01:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277854 - head/etc/rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 21:01:56 -0000 Author: cy Date: Wed Jan 28 21:01:55 2015 New Revision: 277854 URL: https://svnweb.freebsd.org/changeset/base/277854 Log: ipfilter 5.1.2 (vs 4.1.28 in previous releases of FreeBSD) stores IPv4 and IPv6 rules in a single table. ipf -6 -Fa will flush the whole table, including IPv4 rules. This patch removes the redundant ipf -I -6 -Fa statement. PR: 188318 MFC after: 2 weeks Modified: head/etc/rc.d/ipfilter Modified: head/etc/rc.d/ipfilter ============================================================================== --- head/etc/rc.d/ipfilter Wed Jan 28 20:22:48 2015 (r277853) +++ head/etc/rc.d/ipfilter Wed Jan 28 21:01:55 2015 (r277854) @@ -65,7 +65,6 @@ ipfilter_reload() err 1 'Load of rules into alternate set failed; aborting reload' fi fi - ${ipfilter_program:-/sbin/ipf} -I -6 -Fa if [ -r "${ipv6_ipfilter_rules}" ]; then ${ipfilter_program:-/sbin/ipf} -I -6 \ -f "${ipv6_ipfilter_rules}" ${ipfilter_flags} From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 21:08:11 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35310837; Wed, 28 Jan 2015 21:08:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 169C9EB4; Wed, 28 Jan 2015 21:08:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0SL8AHY055934; Wed, 28 Jan 2015 21:08:10 GMT (envelope-from jamie@FreeBSD.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0SL8Arq055928; Wed, 28 Jan 2015 21:08:10 GMT (envelope-from jamie@FreeBSD.org) Message-Id: <201501282108.t0SL8Arq055928@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jamie set sender to jamie@FreeBSD.org using -f From: Jamie Gritton Date: Wed, 28 Jan 2015 21:08:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277855 - in head: sys/fs/fdescfs sys/kern sys/sys usr.sbin/jail X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 21:08:11 -0000 Author: jamie Date: Wed Jan 28 21:08:09 2015 New Revision: 277855 URL: https://svnweb.freebsd.org/changeset/base/277855 Log: Add allow.mount.fdescfs jail flag. PR: 192951 Submitted by: ruben@verweg.com MFC after: 3 days Modified: head/sys/fs/fdescfs/fdesc_vfsops.c head/sys/kern/kern_jail.c head/sys/sys/jail.h head/usr.sbin/jail/jail.8 Modified: head/sys/fs/fdescfs/fdesc_vfsops.c ============================================================================== --- head/sys/fs/fdescfs/fdesc_vfsops.c Wed Jan 28 21:01:55 2015 (r277854) +++ head/sys/fs/fdescfs/fdesc_vfsops.c Wed Jan 28 21:08:09 2015 (r277855) @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -78,8 +79,12 @@ fdesc_mount(struct mount *mp) { int error = 0; struct fdescmount *fmp; + struct thread *td = curthread; struct vnode *rvp; + if (!prison_allow(td->td_ucred, PR_ALLOW_MOUNT_FDESCFS)) + return (EPERM); + /* * Update is a no-op */ @@ -237,4 +242,4 @@ static struct vfsops fdesc_vfsops = { .vfs_unmount = fdesc_unmount, }; -VFS_SET(fdesc_vfsops, fdescfs, VFCF_SYNTHETIC); +VFS_SET(fdesc_vfsops, fdescfs, VFCF_SYNTHETIC | VFCF_JAIL); Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Wed Jan 28 21:01:55 2015 (r277854) +++ head/sys/kern/kern_jail.c Wed Jan 28 21:08:09 2015 (r277855) @@ -208,6 +208,7 @@ static char *pr_allow_names[] = { "allow.mount.zfs", "allow.mount.procfs", "allow.mount.tmpfs", + "allow.mount.fdescfs", }; const size_t pr_allow_names_size = sizeof(pr_allow_names); @@ -224,6 +225,7 @@ static char *pr_allow_nonames[] = { "allow.mount.nozfs", "allow.mount.noprocfs", "allow.mount.notmpfs", + "allow.mount.nofdescfs", }; const size_t pr_allow_nonames_size = sizeof(pr_allow_nonames); @@ -4213,6 +4215,10 @@ SYSCTL_PROC(_security_jail, OID_AUTO, mo CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, PR_ALLOW_MOUNT_DEVFS, sysctl_jail_default_allow, "I", "Processes in jail can mount the devfs file system"); +SYSCTL_PROC(_security_jail, OID_AUTO, mount_fdescfs_allowed, + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, + NULL, PR_ALLOW_MOUNT_FDESCFS, sysctl_jail_default_allow, "I", + "Processes in jail can mount the fdescfs file system"); SYSCTL_PROC(_security_jail, OID_AUTO, mount_nullfs_allowed, CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, PR_ALLOW_MOUNT_NULLFS, sysctl_jail_default_allow, "I", @@ -4373,6 +4379,8 @@ SYSCTL_JAIL_PARAM(_allow_mount, , CTLTYP "B", "Jail may mount/unmount jail-friendly file systems in general"); SYSCTL_JAIL_PARAM(_allow_mount, devfs, CTLTYPE_INT | CTLFLAG_RW, "B", "Jail may mount the devfs file system"); +SYSCTL_JAIL_PARAM(_allow_mount, fdescfs, CTLTYPE_INT | CTLFLAG_RW, + "B", "Jail may mount the fdescfs file system"); SYSCTL_JAIL_PARAM(_allow_mount, nullfs, CTLTYPE_INT | CTLFLAG_RW, "B", "Jail may mount the nullfs file system"); SYSCTL_JAIL_PARAM(_allow_mount, procfs, CTLTYPE_INT | CTLFLAG_RW, Modified: head/sys/sys/jail.h ============================================================================== --- head/sys/sys/jail.h Wed Jan 28 21:01:55 2015 (r277854) +++ head/sys/sys/jail.h Wed Jan 28 21:08:09 2015 (r277855) @@ -226,7 +226,8 @@ struct prison_racct { #define PR_ALLOW_MOUNT_ZFS 0x0200 #define PR_ALLOW_MOUNT_PROCFS 0x0400 #define PR_ALLOW_MOUNT_TMPFS 0x0800 -#define PR_ALLOW_ALL 0x0fff +#define PR_ALLOW_MOUNT_FDESCFS 0x1000 +#define PR_ALLOW_ALL 0x1fff /* * OSD methods Modified: head/usr.sbin/jail/jail.8 ============================================================================== --- head/usr.sbin/jail/jail.8 Wed Jan 28 21:01:55 2015 (r277854) +++ head/usr.sbin/jail/jail.8 Wed Jan 28 21:08:09 2015 (r277855) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 4, 2014 +.Dd January 28, 2015 .Dt JAIL 8 .Os .Sh NAME @@ -362,7 +362,7 @@ A set of IPv6 options for the jail, the and .Va ip4 above. -.It vnet +.It Va vnet Create the jail with its own virtual network stack, with its own network interfaces, addresses, routing table, etc. The kernel must have been compiled with the @@ -531,6 +531,14 @@ is set to a value lower than 2. The devfs ruleset should be restricted from the default by using the .Va devfs_ruleset option. +.It Va allow.mount.fdescfs +privileged users inside the jail will be able to mount and unmount the +fdescfs file system. +This permission is effective only together with +.Va allow.mount +and only when +.Va enforce_statfs +is set to a value lower than 2. .It Va allow.mount.nullfs privileged users inside the jail will be able to mount and unmount the nullfs file system. From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 21:09:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9261C9C8; Wed, 28 Jan 2015 21:09:00 +0000 (UTC) Received: from smtp-out-05.shaw.ca (smtp-out-05.shaw.ca [64.59.134.13]) by mx1.freebsd.org (Postfix) with ESMTP id 41405ECF; Wed, 28 Jan 2015 21:08:59 +0000 (UTC) X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=dwjLhcNAn+N65iW9oApC92yF2BXVJAhWBlCn9pRWT9g= c=1 sm=1 a=BLceEmwcHowA:10 a=ICAaq7hcmGcA:10 a=kj9zAlcOel0A:10 a=h/TgSZk7G/tNIXpx92NbsA==:17 a=6I5d2MoRAAAA:8 a=BWvPGDcYAAAA:8 a=YxBL1-UpAAAA:8 a=kSyTvZI6cDitG5HNCukA:9 a=CjuIK1q_8ugA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Received: from unknown (HELO slippy.cwsent.com) ([24.69.109.95]) by smtp-out-05.shaw.ca with ESMTP; 28 Jan 2015 14:07:47 -0700 Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.14.9/8.14.9) with ESMTP id t0SL7l7T050199; Wed, 28 Jan 2015 13:07:47 -0800 (PST) (envelope-from Cy.Schubert@komquats.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.14.9/8.14.8/Submit) with ESMTP id t0SL7l7Y050196; Wed, 28 Jan 2015 13:07:47 -0800 (PST) (envelope-from Cy.Schubert@komquats.com) Message-Id: <201501282107.t0SL7l7Y050196@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.komquats.com/ To: Cy Schubert Subject: Re: svn commit: r277854 - head/etc/rc.d In-Reply-To: Message from Cy Schubert of "Wed, 28 Jan 2015 21:01:56 +0000." <201501282101.t0SL1ukn054833@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 28 Jan 2015 13:07:47 -0800 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 21:09:00 -0000 In message <201501282101.t0SL1ukn054833@svn.freebsd.org>, Cy Schubert writes: > Author: cy > Date: Wed Jan 28 21:01:55 2015 > New Revision: 277854 > URL: https://svnweb.freebsd.org/changeset/base/277854 > > Log: > ipfilter 5.1.2 (vs 4.1.28 in previous releases of FreeBSD) stores IPv4 > and IPv6 rules in a single table. ipf -6 -Fa will flush the whole table, > including IPv4 rules. This patch removes the redundant ipf -I -6 -Fa > statement. > > PR: 188318 > MFC after: 2 weeks > > Modified: > head/etc/rc.d/ipfilter > > Modified: head/etc/rc.d/ipfilter > ============================================================================= > = > --- head/etc/rc.d/ipfilter Wed Jan 28 20:22:48 2015 (r277853) > +++ head/etc/rc.d/ipfilter Wed Jan 28 21:01:55 2015 (r277854) > @@ -65,7 +65,6 @@ ipfilter_reload() > err 1 'Load of rules into alternate set failed; abortin > g reload' > fi > fi > - ${ipfilter_program:-/sbin/ipf} -I -6 -Fa > if [ -r "${ipv6_ipfilter_rules}" ]; then > ${ipfilter_program:-/sbin/ipf} -I -6 \ > -f "${ipv6_ipfilter_rules}" ${ipfilter_flags} > A subsequent commit to this one will address the redundant ipf rules file issue. As the next commit to this will affect POLA, it will not MFC to stable/10. This commit is safe to MFC. I will hold off committing the next change to this file for a while to allow ample time for this commit to mature. -- Cheers, Cy Schubert or FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 21:21:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0E7B1FD9; Wed, 28 Jan 2015 21:21:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EEE2E166; Wed, 28 Jan 2015 21:21:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0SLLZjR062883; Wed, 28 Jan 2015 21:21:35 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0SLLZUo062859; Wed, 28 Jan 2015 21:21:35 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501282121.t0SLLZUo062859@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 28 Jan 2015 21:21:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277856 - head/usr.sbin/pciconf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 21:21:36 -0000 Author: dim Date: Wed Jan 28 21:21:35 2015 New Revision: 277856 URL: https://svnweb.freebsd.org/changeset/base/277856 Log: Fix the following clang 3.6.0 warnings in pciconf: usr.sbin/pciconf/pciconf.c:237:12: error: address of array 'p->pd_name' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] (p->pd_name && *p->pd_name) ? p->pd_name : ~~~^~~~~~~ ~~ usr.sbin/pciconf/pciconf.c:239:12: error: address of array 'p->pd_name' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] (p->pd_name && *p->pd_name) ? (int)p->pd_unit : ~~~^~~~~~~ ~~ The pd_name field of struct pci_conf is an array, so it can never be null. Remove the unnecessary check. Modified: head/usr.sbin/pciconf/pciconf.c Modified: head/usr.sbin/pciconf/pciconf.c ============================================================================== --- head/usr.sbin/pciconf/pciconf.c Wed Jan 28 21:08:09 2015 (r277855) +++ head/usr.sbin/pciconf/pciconf.c Wed Jan 28 21:21:35 2015 (r277856) @@ -234,9 +234,9 @@ list_devs(const char *name, int verbose, for (p = conf; p < &conf[pc.num_matches]; p++) { printf("%s%d@pci%d:%d:%d:%d:\tclass=0x%06x card=0x%08x " "chip=0x%08x rev=0x%02x hdr=0x%02x\n", - (p->pd_name && *p->pd_name) ? p->pd_name : + *p->pd_name ? p->pd_name : "none", - (p->pd_name && *p->pd_name) ? (int)p->pd_unit : + *p->pd_name ? (int)p->pd_unit : none_count++, p->pc_sel.pc_domain, p->pc_sel.pc_bus, p->pc_sel.pc_dev, p->pc_sel.pc_func, (p->pc_class << 16) | From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 21:33:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 404B7598; Wed, 28 Jan 2015 21:33:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 20B72331; Wed, 28 Jan 2015 21:33:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0SLXorg069954; Wed, 28 Jan 2015 21:33:50 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0SLXnJu069948; Wed, 28 Jan 2015 21:33:49 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501282133.t0SLXnJu069948@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 28 Jan 2015 21:33:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277857 - head/usr.sbin/ppp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 21:33:51 -0000 Author: dim Date: Wed Jan 28 21:33:49 2015 New Revision: 277857 URL: https://svnweb.freebsd.org/changeset/base/277857 Log: Fix multiple instances of the following clang 3.6.0 warning in ppp: usr.sbin/ppp/command.c:2054:74: error: address of array 'arg->bundle->radius.cfg.file' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] if (arg->bundle->radius.alive.interval && !arg->bundle->radius.cfg.file) { ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ In all cases, the file field of struct radius is a char array, but the intent was to check whether the string is empty, so add an indirection to achieve that. Use a similar approach for the sockname field of struct server. Modified: head/usr.sbin/ppp/command.c head/usr.sbin/ppp/ipcp.c head/usr.sbin/ppp/ipv6cp.c head/usr.sbin/ppp/radius.c head/usr.sbin/ppp/server.c Modified: head/usr.sbin/ppp/command.c ============================================================================== --- head/usr.sbin/ppp/command.c Wed Jan 28 21:21:35 2015 (r277856) +++ head/usr.sbin/ppp/command.c Wed Jan 28 21:33:49 2015 (r277857) @@ -2051,7 +2051,7 @@ SetVariable(struct cmdargs const *arg) res = 1; } else { arg->bundle->radius.alive.interval = atoi(argp); - if (arg->bundle->radius.alive.interval && !arg->bundle->radius.cfg.file) { + if (arg->bundle->radius.alive.interval && !*arg->bundle->radius.cfg.file) { log_Printf(LogWARN, "rad_alive requires radius to be configured\n"); res = 1; } else if (arg->bundle->ncp.ipcp.fsm.state == ST_OPENED) { @@ -2335,7 +2335,7 @@ SetVariable(struct cmdargs const *arg) res = 1; } - if (arg->bundle->radius.port_id_type && !arg->bundle->radius.cfg.file) { + if (arg->bundle->radius.port_id_type && !*arg->bundle->radius.cfg.file) { log_Printf(LogWARN, "rad_port_id requires radius to be configured\n"); res = 1; } Modified: head/usr.sbin/ppp/ipcp.c ============================================================================== --- head/usr.sbin/ppp/ipcp.c Wed Jan 28 21:21:35 2015 (r277856) +++ head/usr.sbin/ppp/ipcp.c Wed Jan 28 21:33:49 2015 (r277857) @@ -880,7 +880,7 @@ IpcpLayerDown(struct fsm *fp) radius_Account(&fp->bundle->radius, &fp->bundle->radacct, fp->bundle->links, RAD_STOP, &ipcp->throughput); - if (fp->bundle->radius.cfg.file && fp->bundle->radius.filterid) + if (*fp->bundle->radius.cfg.file && fp->bundle->radius.filterid) system_Select(fp->bundle, fp->bundle->radius.filterid, LINKDOWNFILE, NULL, NULL); radius_StopTimer(&fp->bundle->radius); @@ -949,7 +949,7 @@ IpcpLayerUp(struct fsm *fp) radius_Account(&fp->bundle->radius, &fp->bundle->radacct, fp->bundle->links, RAD_START, &ipcp->throughput); - if (fp->bundle->radius.cfg.file && fp->bundle->radius.filterid) + if (*fp->bundle->radius.cfg.file && fp->bundle->radius.filterid) system_Select(fp->bundle, fp->bundle->radius.filterid, LINKUPFILE, NULL, NULL); radius_StartTimer(fp->bundle); Modified: head/usr.sbin/ppp/ipv6cp.c ============================================================================== --- head/usr.sbin/ppp/ipv6cp.c Wed Jan 28 21:21:35 2015 (r277856) +++ head/usr.sbin/ppp/ipv6cp.c Wed Jan 28 21:33:49 2015 (r277857) @@ -486,7 +486,7 @@ ipv6cp_LayerUp(struct fsm *fp) * evaluated. */ if (!Enabled(fp->bundle, OPT_IPCP)) { - if (fp->bundle->radius.cfg.file && fp->bundle->radius.filterid) + if (*fp->bundle->radius.cfg.file && fp->bundle->radius.filterid) system_Select(fp->bundle, fp->bundle->radius.filterid, LINKUPFILE, NULL, NULL); } @@ -539,7 +539,7 @@ ipv6cp_LayerDown(struct fsm *fp) * evaluated. */ if (!Enabled(fp->bundle, OPT_IPCP)) { - if (fp->bundle->radius.cfg.file && fp->bundle->radius.filterid) + if (*fp->bundle->radius.cfg.file && fp->bundle->radius.filterid) system_Select(fp->bundle, fp->bundle->radius.filterid, LINKDOWNFILE, NULL, NULL); } Modified: head/usr.sbin/ppp/radius.c ============================================================================== --- head/usr.sbin/ppp/radius.c Wed Jan 28 21:21:35 2015 (r277856) +++ head/usr.sbin/ppp/radius.c Wed Jan 28 21:33:49 2015 (r277857) @@ -1345,7 +1345,7 @@ radius_alive(void *v) void radius_StartTimer(struct bundle *bundle) { - if (bundle->radius.cfg.file && bundle->radius.alive.interval) { + if (*bundle->radius.cfg.file && bundle->radius.alive.interval) { bundle->radius.alive.timer.func = radius_alive; bundle->radius.alive.timer.name = "radius alive"; bundle->radius.alive.timer.load = bundle->radius.alive.interval * SECTICKS; Modified: head/usr.sbin/ppp/server.c ============================================================================== --- head/usr.sbin/ppp/server.c Wed Jan 28 21:21:35 2015 (r277856) +++ head/usr.sbin/ppp/server.c Wed Jan 28 21:33:49 2015 (r277857) @@ -248,7 +248,7 @@ server_LocalOpen(struct bundle *bundle, oldmask = (mode_t)-1; /* Silence compiler */ - if (server.cfg.sockname && !strcmp(server.cfg.sockname, name)) + if (server.cfg.sockname[0] != '\0' && !strcmp(server.cfg.sockname, name)) server_Close(bundle); memset(&ifsun, '\0', sizeof ifsun); From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 21:51:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 467912B7; Wed, 28 Jan 2015 21:51:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3188E84F; Wed, 28 Jan 2015 21:51:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0SLpaXW078180; Wed, 28 Jan 2015 21:51:36 GMT (envelope-from rstone@FreeBSD.org) Received: (from rstone@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0SLpZCx078177; Wed, 28 Jan 2015 21:51:35 GMT (envelope-from rstone@FreeBSD.org) Message-Id: <201501282151.t0SLpZCx078177@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rstone set sender to rstone@FreeBSD.org using -f From: Ryan Stone Date: Wed, 28 Jan 2015 21:51: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: r277859 - in stable/10/usr.sbin: mountd rpc.lockd rpc.statd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 21:51:36 -0000 Author: rstone Date: Wed Jan 28 21:51:34 2015 New Revision: 277859 URL: https://svnweb.freebsd.org/changeset/base/277859 Log: MFC r277352: When mountd is creating sockets, it iterates over all addresses specified in the "hosts" array and eventually looks up the network address with getaddrinfo(). At one point it checks for a numeric address and if it sees one, it sets a hint parameter to force getaddrinfo to interpret the host as a numeric address. However that hint is not cleared for subsequent iterations of the loop and if any hosts seen after this point are host names, getaddrinfo will fail on the name. The result of this bug is that you cannot pass a host name to the -h flag. Unfortunately, the first iteration will either process ::1 or 127.0.0.1, so the flag is set on the first iteration and all host names will fail to be processed. The same bug applies to rpc.lockd and rpc.statd, so fix them too. Differential Revision: https://reviews.freebsd.org/D1507 Reported by: Dylan Martin MFC after: 1 week Sponsored by: Sandvine Inc. Modified: stable/10/usr.sbin/mountd/mountd.c stable/10/usr.sbin/rpc.lockd/lockd.c stable/10/usr.sbin/rpc.statd/statd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/mountd/mountd.c ============================================================================== --- stable/10/usr.sbin/mountd/mountd.c Wed Jan 28 21:40:22 2015 (r277858) +++ stable/10/usr.sbin/mountd/mountd.c Wed Jan 28 21:51:34 2015 (r277859) @@ -627,7 +627,6 @@ create_service(struct netconfig *nconf) /* Get mountd's address on this transport */ memset(&hints, 0, sizeof hints); - hints.ai_flags = AI_PASSIVE; hints.ai_family = si.si_af; hints.ai_socktype = si.si_socktype; hints.ai_protocol = si.si_proto; @@ -644,6 +643,8 @@ create_service(struct netconfig *nconf) sock_fd[sock_fdcnt++] = -1; /* Set invalid for now. */ mallocd_res = 0; + hints.ai_flags = AI_PASSIVE; + /* * XXX - using RPC library internal functions. */ Modified: stable/10/usr.sbin/rpc.lockd/lockd.c ============================================================================== --- stable/10/usr.sbin/rpc.lockd/lockd.c Wed Jan 28 21:40:22 2015 (r277858) +++ stable/10/usr.sbin/rpc.lockd/lockd.c Wed Jan 28 21:51:34 2015 (r277859) @@ -522,7 +522,6 @@ create_service(struct netconfig *nconf) /* Get rpc.statd's address on this transport */ memset(&hints, 0, sizeof hints); - hints.ai_flags = AI_PASSIVE; hints.ai_family = si.si_af; hints.ai_socktype = si.si_socktype; hints.ai_protocol = si.si_proto; @@ -538,6 +537,7 @@ create_service(struct netconfig *nconf) out_of_mem(); sock_fd[sock_fdcnt++] = -1; /* Set invalid for now. */ mallocd_res = 0; + hints.ai_flags = AI_PASSIVE; /* * XXX - using RPC library internal functions. Modified: stable/10/usr.sbin/rpc.statd/statd.c ============================================================================== --- stable/10/usr.sbin/rpc.statd/statd.c Wed Jan 28 21:40:22 2015 (r277858) +++ stable/10/usr.sbin/rpc.statd/statd.c Wed Jan 28 21:51:34 2015 (r277859) @@ -343,7 +343,6 @@ create_service(struct netconfig *nconf) /* Get rpc.statd's address on this transport */ memset(&hints, 0, sizeof hints); - hints.ai_flags = AI_PASSIVE; hints.ai_family = si.si_af; hints.ai_socktype = si.si_socktype; hints.ai_protocol = si.si_proto; @@ -359,6 +358,7 @@ create_service(struct netconfig *nconf) out_of_mem(); sock_fd[sock_fdcnt++] = -1; /* Set invalid for now. */ mallocd_res = 0; + hints.ai_flags = AI_PASSIVE; /* * XXX - using RPC library internal functions. From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 22:22:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 41DBDC45; Wed, 28 Jan 2015 22:22:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2DDECBD6; Wed, 28 Jan 2015 22:22:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0SMMo82095512; Wed, 28 Jan 2015 22:22:50 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0SMMoHU095511; Wed, 28 Jan 2015 22:22:50 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501282222.t0SMMoHU095511@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 28 Jan 2015 22:22:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277860 - head/usr.sbin/sa X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 22:22:50 -0000 Author: dim Date: Wed Jan 28 22:22:49 2015 New Revision: 277860 URL: https://svnweb.freebsd.org/changeset/base/277860 Log: Fix the following -Wcast-qual warnings in usr.sbin/sa/db.c: usr.sbin/sa/db.c:82:20: error: cast from 'char const (*)[9]' to 'void *' drops const qualifier [-Werror,-Wcast-qual] key.data = (void*)&VERSION_KEY; ^ usr.sbin/sa/db.c:178:20: error: cast from 'char const (*)[9]' to 'void *' drops const qualifier [-Werror,-Wcast-qual] key.data = (void*)&VERSION_KEY; ^ Replace the VERSION_KEY define with a writable char array, so no const qualifier needs to be dropped anymore. Submitted by: rdivacky Modified: head/usr.sbin/sa/db.c Modified: head/usr.sbin/sa/db.c ============================================================================== --- head/usr.sbin/sa/db.c Wed Jan 28 21:51:34 2015 (r277859) +++ head/usr.sbin/sa/db.c Wed Jan 28 22:22:49 2015 (r277860) @@ -44,7 +44,7 @@ __FBSDID("$FreeBSD$"); #include "extern.h" /* Key used to store the version of the database data elements. */ -#define VERSION_KEY "\0VERSION" +static char VERSION_KEY[] = "\0VERSION"; /* * Create the in-memory database, *mdb. From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 22:42:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 81736132; Wed, 28 Jan 2015 22:42:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6CA3EDD2; Wed, 28 Jan 2015 22:42:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0SMgvcw005480; Wed, 28 Jan 2015 22:42:57 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0SMgvl3005478; Wed, 28 Jan 2015 22:42:57 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201501282242.t0SMgvl3005478@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Wed, 28 Jan 2015 22:42:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277862 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 22:42:57 -0000 Author: jilles Date: Wed Jan 28 22:42:56 2015 New Revision: 277862 URL: https://svnweb.freebsd.org/changeset/base/277862 Log: sem_post(): Fix and document semaphore value overflow error. The error code is per Austin Group issue #315. I provided different wording for the manual page change. Submitted by: pluknet MFC after: 1 week Modified: head/lib/libc/gen/sem_new.c head/lib/libc/gen/sem_post.3 Modified: head/lib/libc/gen/sem_new.c ============================================================================== --- head/lib/libc/gen/sem_new.c Wed Jan 28 22:32:03 2015 (r277861) +++ head/lib/libc/gen/sem_new.c Wed Jan 28 22:42:56 2015 (r277862) @@ -439,8 +439,10 @@ _sem_post(sem_t *sem) do { count = sem->_kern._count; - if (USEM_COUNT(count) + 1 > SEM_VALUE_MAX) - return (EOVERFLOW); + if (USEM_COUNT(count) + 1 > SEM_VALUE_MAX) { + errno = EOVERFLOW; + return (-1); + } } while (!atomic_cmpset_rel_int(&sem->_kern._count, count, count + 1)); if (count & USEM_HAS_WAITERS) usem_wake(&sem->_kern); Modified: head/lib/libc/gen/sem_post.3 ============================================================================== --- head/lib/libc/gen/sem_post.3 Wed Jan 28 22:32:03 2015 (r277861) +++ head/lib/libc/gen/sem_post.3 Wed Jan 28 22:42:56 2015 (r277862) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 15, 2000 +.Dd January 28, 2015 .Dt SEM_POST 3 .Os .Sh NAME @@ -65,6 +65,9 @@ The .Fa sem argument points to an invalid semaphore. +.It Bq Er EOVERFLOW +The semaphore value would exceed +.Dv SEM_VALUE_MAX . .El .Sh SEE ALSO .Xr sem_getvalue 3 , From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 22:51:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 521905C3; Wed, 28 Jan 2015 22:51:32 +0000 (UTC) Received: from mail.made4.biz (mail.made4.biz [IPv6:2001:41d0:2:c018::1:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 141AEECA; Wed, 28 Jan 2015 22:51:32 +0000 (UTC) Received: from 2a02-8428-011b-e000-0290-f5ff-fe9d-b78c.rev.sfr.net ([2a02:8428:11b:e000:290:f5ff:fe9d:b78c] helo=magellan.dumbbell.fr) by mail.made4.biz with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YGbSL-000ALF-Vp; Wed, 28 Jan 2015 23:51:30 +0100 Message-ID: <54C967EC.5080605@FreeBSD.org> Date: Wed, 28 Jan 2015 23:51:24 +0100 From: =?UTF-8?B?SmVhbi1Tw6liYXN0aWVuIFDDqWRyb24=?= User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Andriy Gapon , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r277795 - in head/sys/dev: fb vt vt/hw/fb References: <201501271528.t0RFSle9098480@svn.freebsd.org> In-Reply-To: <201501271528.t0RFSle9098480@svn.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ipUWmSH1hPs09TFHlhJiqVllJr8tWLDHF" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 22:51:32 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ipUWmSH1hPs09TFHlhJiqVllJr8tWLDHF Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 27.01.2015 16:28, Andriy Gapon wrote: > Author: avg > Date: Tue Jan 27 15:28:46 2015 > New Revision: 277795 > URL: https://svnweb.freebsd.org/changeset/base/277795 >=20 > Log: > vt(4): Use power_{suspend,resume} event handlers to implement > suspend/resume Thank you very much for committing this! I couldn't find the time to do it... --=20 Jean-S=C3=A9bastien P=C3=A9dron --ipUWmSH1hPs09TFHlhJiqVllJr8tWLDHF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJUyWfsXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NzA4N0ZEMUFFQUUwRTEyREJDNkE2RjAz OUU5OTc2MUE1RkQ5NENDAAoJEDnpl2Gl/ZTMmbwP/0pkrrZ8teA03hka+t6TGaXh nkFgr4S7nONmQ0hiVgFixIqIG7/OioA79Qg9q5rAs4r3QTswyjC6jnTVHzqFs0jO 1g6dN4ISfiuvw1jMzZpEFSY1y+i+4yKStAbV6+MkFCQ6p4GR4KINQxrhk5+/lBZR eN2mW98e1U2Kw2kdcCaMgawF9iFwrqZA/P9VxJsxyw7ZMtb0MS4ngVyFEuahmScY FcFYSQkp9gi852IZcR0ISFQYbHde1gLls1OjA53cZ/Y2MXeBFJunlt1IuCLaTS4t NaOqdjWHt2EDi6NdxWbR64HsBX4fIfUbuQo8NFbUe9hqJZxzds8RMMXzU0AYIX4a 2onhrr2S2Z7zrHo/Hwm/fAeXnAelH8on/WnsxhFek8lYDzzTYbMDCLrwXa/zv55z XBM16EqDsq4O4qOrwYFXZyOZvXyhxvBHQA8nclO/39ii9wCgO9icSXl2H30n/Plp uEv1572u4wnTddw1Jevj3uj9sCwL0aWm9taptNYM/Ktbzwia2zfJ0cRaOeNF/PCC avVnBhQBjK6PP9McEWfkvNavh986OLgIV5lP+D/oR9VrJOXxYC4Hw1f32uiUF+/g pUfbJAclm/Yk2w/G4o5y494YelhGTAEogr8lPwycjw+f1iBzF/LN8JfUd3iYpBb5 CobEKxV1RI6CcN4lG97r =7wce -----END PGP SIGNATURE----- --ipUWmSH1hPs09TFHlhJiqVllJr8tWLDHF-- From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 22:55:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 62834737; Wed, 28 Jan 2015 22:55:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48384EF0; Wed, 28 Jan 2015 22:55:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0SMt8Nh010949; Wed, 28 Jan 2015 22:55:08 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0SMt7gd010940; Wed, 28 Jan 2015 22:55:07 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501282255.t0SMt7gd010940@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 28 Jan 2015 22:55:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r277863 - in vendor/amd/dist: . amd amq conf contrib doc fixmount fsinfo hlfsd include libamu mk-amd-map scripts wire-test X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 22:55:08 -0000 Author: pfg Date: Wed Jan 28 22:55:06 2015 New Revision: 277863 URL: https://svnweb.freebsd.org/changeset/base/277863 Log: amd: flatten the tree Added: vendor/amd/dist/AUTHORS - copied unchanged from r277862, vendor/amd/dist/contrib/amd/AUTHORS vendor/amd/dist/BUGS - copied unchanged from r277862, vendor/amd/dist/contrib/amd/BUGS vendor/amd/dist/COPYING - copied unchanged from r277862, vendor/amd/dist/contrib/amd/COPYING vendor/amd/dist/ChangeLog - copied unchanged from r277862, vendor/amd/dist/contrib/amd/ChangeLog vendor/amd/dist/FAQ - copied unchanged from r277862, vendor/amd/dist/contrib/amd/FAQ vendor/amd/dist/INSTALL - copied unchanged from r277862, vendor/amd/dist/contrib/amd/INSTALL vendor/amd/dist/MIRRORS.html - copied unchanged from r277862, vendor/amd/dist/contrib/amd/MIRRORS.html vendor/amd/dist/MIRRORS.txt - copied unchanged from r277862, vendor/amd/dist/contrib/amd/MIRRORS.txt vendor/amd/dist/NEWS - copied unchanged from r277862, vendor/amd/dist/contrib/amd/NEWS vendor/amd/dist/README - copied unchanged from r277862, vendor/amd/dist/contrib/amd/README vendor/amd/dist/README.attrcache - copied unchanged from r277862, vendor/amd/dist/contrib/amd/README.attrcache vendor/amd/dist/README.ldap - copied unchanged from r277862, vendor/amd/dist/contrib/amd/README.ldap vendor/amd/dist/README.y2k - copied unchanged from r277862, vendor/amd/dist/contrib/amd/README.y2k vendor/amd/dist/TODO - copied unchanged from r277862, vendor/amd/dist/contrib/amd/TODO vendor/amd/dist/amd/ - copied from r277862, vendor/amd/dist/contrib/amd/amd/ vendor/amd/dist/amq/ - copied from r277862, vendor/amd/dist/contrib/amd/amq/ vendor/amd/dist/aux_conf.h.in - copied unchanged from r277862, vendor/amd/dist/contrib/amd/aux_conf.h.in vendor/amd/dist/bootstrap - copied unchanged from r277862, vendor/amd/dist/contrib/amd/bootstrap vendor/amd/dist/conf/ - copied from r277862, vendor/amd/dist/contrib/amd/conf/ vendor/amd/dist/cvs-server.txt - copied unchanged from r277862, vendor/amd/dist/contrib/amd/cvs-server.txt vendor/amd/dist/doc/ - copied from r277862, vendor/amd/dist/contrib/amd/doc/ vendor/amd/dist/fixmount/ - copied from r277862, vendor/amd/dist/contrib/amd/fixmount/ vendor/amd/dist/fsinfo/ - copied from r277862, vendor/amd/dist/contrib/amd/fsinfo/ vendor/amd/dist/hlfsd/ - copied from r277862, vendor/amd/dist/contrib/amd/hlfsd/ vendor/amd/dist/include/ - copied from r277862, vendor/amd/dist/contrib/amd/include/ vendor/amd/dist/ldap-id.ms - copied unchanged from r277862, vendor/amd/dist/contrib/amd/ldap-id.ms vendor/amd/dist/ldap-id.txt - copied unchanged from r277862, vendor/amd/dist/contrib/amd/ldap-id.txt vendor/amd/dist/ldap.schema - copied unchanged from r277862, vendor/amd/dist/contrib/amd/ldap.schema vendor/amd/dist/libamu/ - copied from r277862, vendor/amd/dist/contrib/amd/libamu/ vendor/amd/dist/mk-amd-map/ - copied from r277862, vendor/amd/dist/contrib/amd/mk-amd-map/ vendor/amd/dist/scripts/ - copied from r277862, vendor/amd/dist/contrib/amd/scripts/ vendor/amd/dist/tasks - copied unchanged from r277862, vendor/amd/dist/contrib/amd/tasks vendor/amd/dist/vers.m4 - copied unchanged from r277862, vendor/amd/dist/contrib/amd/vers.m4 vendor/amd/dist/wire-test/ - copied from r277862, vendor/amd/dist/contrib/amd/wire-test/ Deleted: vendor/amd/dist/contrib/ Copied: vendor/amd/dist/AUTHORS (from r277862, vendor/amd/dist/contrib/amd/AUTHORS) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/amd/dist/AUTHORS Wed Jan 28 22:55:06 2015 (r277863, copy of r277862, vendor/amd/dist/contrib/amd/AUTHORS) @@ -0,0 +1,430 @@ +PRIMARY AUTHORS AND MAJOR CONTRIBUTORS TO AM_UTILS: +Original authors of amd were the Berkeley team and especially Jan-Simon +Pendry. Since then many people have contributed patches. + +This file lists the ones who contributed major code changes, in no +particular order, and I thank them all. This is of course not to diminish +the smaller contributes of the many others. Thank you all. + +* Erez Zadok + +The most significant changes were made by Erez Zadok in terms of bug fixes, +ports, and new features added. Erez Zadok is the current maintainer of +am-utils, as of January 1997. + +* Ion Badulescu + +Co-maintainer of am-utils since late 1999: Linux and Solaris autofs support, +Linux NFSv3 support, major code reorganization, etc... + +* Randall S. Winchester + +May 7, 1997: contributed a special version of upl102 that included NFS V.3 +support. Some of the code was contributed by Christos Zoulas +. I (Erez) ported these changes to am-utils. + +September 12, 1997: lots of small prototype cleanups and fixes to numerous +files. + +January 27, 1998: support pid files in the amd.conf file. Provide base name +for hesiod zone files. Always use /etc/amd.conf if exists. + +August 8, 1998: add detection support for NFS V.3 for NetBSD 1.3F. + +February 1, 1998: fixes for NetBSD to better detect its features. + +September 4, 1999: assorted fixes for NetBSD 1.4+. + +* Hannes Reinecke + +Back in 1995, contributed code for linux. A new parser for file system +specific options that only exist under linux. + +* Leif Johansson + +June 22, 1997: minor patch to ensure that systems without an RE library work. + +June 23, 1997: mount options should be properly comma limited. + +July 10, 1997: info_ldap.c and prototype changes to all map _init and _mtime +functions. Contributed scripts/amd2ldif.pl. + +August 4, 1997: info_ldap.c fixes and adding two new amd.conf ldap +variables: ldap_cache_seconds and ldap_cache_maxmem. + +* Andreas Stolcke + +June 22, 1997: patches to ensure that proto= and vers= options work +properly in mount tables and can be overridden. Later on, more code +contribued to optimize the best combination of proto/vers. + +July 4, 1997: patches to get NFS V.3 working under irix5. + +September 9, 1997: initialize all fields of mntent_t structures to 0. + +October 2, 1997: don't log an RPC timeout as an error but only as an info +message. + +December 19, 1997: detected an FMR (Free Memory Read) in amd/mntfs.c, +uninit_mntfs(). + +* Danny Braniss + +July, 6 1997: contributed patches to hesiod on bsdi3. + +* Tom Schmidt + +July 10, 1997: Recommdation to include libgdbm if libc has no dbm_open. +Patches for netgrp(host) command. Mods to aux/config.guess to recognize +sun3. + +January 19, 1998: print correct -l option depending if system supports +syslog and/or syslog facilities. + +January 29, 1998: fix for 0.0.0.0 loopback on SunOS 3.X which defines +IFF_ROUTE instead of IFF_LOOPBACK. + +May 30, 2000: correct logging types for addopts/mergeopts messages. + +* Daniel S. Riley + +July 11, 1997: fixes to DU-4.0 to support string POSIX.1 signals, and struct +sockaddr with sa_len field. + +July 13, 1997: Move amd.conf parsing to before switch_option() on log/debug +options. Minor type wrt "ro" option in libamu/mount_fs.c. Added more +fillers of mnttab options, for acdirmax, acdirmin, acregmax, acregmin, noac, +grpid, nosuid, and actimo. + +August 15, 1998: fix memory leak in processing of /defaults, and avoid +accessing uninitialized memory in osf1. + +* Roman Hodek + +July 23, 1997: Got lots of patches from the Debian Linux folks, who fixed +several generic bugs, and one serious one for Linux. The latter involved +using connected sockets for NFS mounts on kernels 1.3.10 and older. Roman's +work is baed on amd-upl102, and work from Ian Murdock +and Dominik Kubla . + +* Rainer Orth + +August 6, 1997: assorted fixes to support hesiod-1.3, solaris 2.4 (which I +already fixed but did not release yet), and support for $LDFLAGS at +configure/compile time. + +February 24, 1998: lots of patches for ultrix 4.3 port. + +February 28, 1998: lots of documentation fixes! + +January 8, 1999: texi fixes, and more Ultrix 4.3 fixes, among others. + +January 11, 1999: hesiod_isup function. Fix format errors in dlog/plog. +Remove obsolete or unnecessary files/macros. Don't report disabled file +systems. More misc fixes. + +February 3, 1998: don't start autofs listener unless autofs maps were in +use. + +December 10, 1999: assorted fixed and lots of fixes to support in-kernel +mount tables in Solaris 8. + +February 9, 2000: new debug options hrtime (hi-res timer) and xdrtrace. bug +fixes. + +* Jason Thorpe + +August 25, 1997: make amd work when talking to NIS+ servers in NIS +compatibility mode. Fix originally came from Matthieu Herrb +. + +* Chris Metcalf + +August 29, 1997: patch to make amd use FQHN for NFS/RPC authentication, +useful esp. for cross-domain NFS mounts. +September 2, 1997: if plock() succeeded, don't display errno string. + +* Enami Tsugutomo + +September 4, 1997: don't ping remote servers with NFS V.3 always, but V.2, +regardless of client's NFS version. (conf/transp/transp_sockets.c) + +* Dan Riley + +September 19, 1997: make sure that amd works with more secure portmappers +that do not allow forwarding of RPC messages to other services. + +* Wolfgang Rupprecht + +August 10, 1997: netbsd and other bsd systems have a mask flag for +pcfs_args (msdos mount). + +* Christos Zoulas + +September 25, 1997: fix to initialize uid/gid fields of pcfs_args_t on +netbsd. + +October 10, 1997: compile time cleanups of printf()s in hlfsd code. If nfs +server is down or does not support a portmapper call, then mark it down as +version 2, and try again later. + +November 29, 2002: compile fixes for NetBSD, a couple of bug fixes (one +already fixed by maintainers) + +April 12, 2003: support new "unmount" option, useful to timeout removable +local media mounts. + +October 12, 2004: patch to support two new amd.conf options, domain_strip +and auto_attrcache. Patch to cleanup NFS attribute-cache flag computation. +Patch to fix an inconsistency in timeouts in the RPC code between socket and +TLI implementations. Patch to print version string (amd -v) after all +options had been initialized, so we can print domain, host, and hostd. +Linux patch to use umount2(2) if umount(2) fails. + +* Bill Paul + +November 5, 1997: NFS v.3 support for AIX 4.2.1, which does *not* include +headers for this. Bill had to guess at the right structures, field names, +sizes, alignment, etc. + +January 15, 1999: small ldap bug fixes. + +* Stefan Vogel + +November 14, 1997: typo in the subscription instructions to amd-dev. + +* Guntram Wolski + +November 15, 1997: pointed out mismatching documentation for the -o option. + +* Michael Hucka + +January 11, 1997: pointed out reversed definition of NFS mount options vers +and proto. + +* Albert Chin + +January 12, 1998: minor bug in output of amd -H. + +June 23, 2005: assortment of small compile bugs on aix4, and solaris 5/6/7. + +* Thomas Richter + +January 13, 1998: use case insensitive comparisons for variables that need +it (such as all hostname related ones, and more). + +July 20, 1998: don't leak memory in the private version of yp_all (when +vendor yp_all is bad). + +* Fred Korz + +January 30, 1998: minor typo fixed to tftp example in am-utils.texi. + +* Donald Buczek + +March 6, 1998: correctly inherit existing NFS V.3 mounts upon restart. + +March 17, 1998: compare log file name and syslog string with correct length. + +March 20, 1998: do not close stdout in case it gets reused elsewhere and to +allow startup script to redirect it. Set a temporary secure umask(0022) +before writing log file and restore it afterwards. + +* Matthew Crosby + +April 20, 1998: allow arbitrary number of interfaces in wire listing. + +* David O'Brien + +September 4, 1998: bug fix to avoid overrunning hostname buffer, and minor +amd.conf man page typo correction. + +September 22, 1999: use more secure vsnprintf in real_plog(). + +* Danny Rathjens + +October 29, 1998: swap arguments to kill(2) in amd.c. + +* Mike Mitchell + +November 3, 1998: amd/nfs_subr.c (nfsproc_lookup_2_svc): try to avoid a race +condition between unmounting and re-mounting an entry, by increasing the ttl +of a looked up entry before unmounting it. + +* Douglas K. Rand" + +December 3, 1998: case insensitive host name match for nfsl. + +* David Wolfskill +January 28, 1999: don't turn on/off noconn option if it was already in that +state. + +* Jeffrey C Honig +March 14, 1999: clean up more autogenerated files upon "make distclean". + +March 15, 1999: avoid overly verbose NIS warning even on systems that don't +run NIS. On BSD systems, wire.c uses getifaddrs(), sysctl(), IRS routines, +and more fixes. Numerous IP packet security fixes. + +March 16, 1999: documentation typos. new cdfs options. ufs structure +detection for bsdi4. + +September 17, 1999: fixes to expn. + +* Paul Balyoz +March 26, 1999: ensure lostaltmail displays Y2K compliant dates. + +* Jon Peatfield +March 30, 1999: turn off incomplete NFS V.3 support in HPUX 10.20. + +September 22, 1999: safe reloading of maps without first clearing old +copies, and using cached copies if map failed to reload. + +* Peter Breitenlohner +July 24, 1999: patch for linux 2.2.x to work with older libc5 systems, and +nis_isup mis-logic fixes. +December 13, 2001: report typos in scripts/amd.conf.5. + +* Dale Talcott +July 26, 1999: added NFS3 support for AIX mounting. + +* Christophe Kalt +July 14, 1999: add netgrpd() syntax function which uses FQHN. + +* Andrew J. Korty +September 5, 1999: pawd works for type:=nfsl. + +* Nick Williams +September 1, 1999: bug fix for incorrect symlinks when two locations are +requested simultaneously. + +November 1, 1999: fixes to sync maps even if they are set to mapcache:=sync. + +January 19, 2000: fix (and reduce the incidence of) stale file handles when +doing rapid mounts and umounts in succession. + +June 5, 2000: better handling of potential race-conditions during rapid +u/mounts. Correctly update d_drops stats for amq -s. + +* Johann Pfefferl +November 16, 1999: fix to ldap code so repeated calls to string2he don't +corrupt the string passed. + +* Amitha Perera +December 9, 1999: detect all wire() interfaces correctly. + +* Steven Danz +January 25, 2000: allow browsable auto maps. + +* Wolfram Klaus . +November 21, 2000: recognize proplist mnttab flag. + +* Thomas Klausner +November 21, 2000: lots of NetBSD fixes (many of which are generic). + +April 18, 2003: patch to reference am-utils info pages in man page. + +November 28, 2004: small fixes to typos in amd.conf(5) man page. + +* Olaf Kirch +February 1, 2001: important Linux NFS error number mapping fixed + +* Ahmon Dancy +February 9, 2001: Apple Rhapsody/Darwin/OS X port + +* Sebastien Bahloul +July 3, 2001: LDAP fixes and updates to support new APIs + +March 27, 2002: LDAP bug and port to HPUX-11. + +* Philippe Troin +July 12, 2001: Proper handling of GNU getopt, support for optionally +disabling LDAP/Hesiod, fixes for the dev/nodev option on Linux. Texi +documentation fix. + +November 28, 2001: Bug fix. Support "nolock" as an NFS option, not a +generic mount option. + +July 17, 2003: pref:=null core dump fix. libgdbm portability. tcpd/librap +support. And a few other things for the 6.0 branch. + +* Trond Myklebust +January 10, 2002: Proper initialization of the timeo parameter on Linux, TCP +_must_ have a timeout 2 orders of magnitude larger than UDP + +* George Ross +April 29, 2002: Rework of old code, support for wildcards in LDAP queries, +and an FD leak fix. Amd -A support. + +October 21, 2002: ldap_unbind fix for SIGPIPE, and support for LDAPv3 +protocol version parameter (with Tim Colles ). + +* Matthias Scheler +June 14, 2002: patch to use "xlatecookie" NFS mount option. + +* Jun-ichiro itojun Hagino . +June 11, 2002: minor fixes to support NetBSD 1.6A. + +* Sean Fagan +March 14, 2003: detect and use the MNT2_GEN_OPT_AUTOMNTFS mount flag +on OS X / Darwin. + +* Hendrik Scholz +June 9, 2003: mk-amd-map should open temp db file using O_EXCL. + +* Mark Davies +July 14, 2003: define "xlatecookie" mnttab option if not defined (for +NetBSD). Support null hesiod entries if they start with a ".". + +* Eric S. Raymond +December 9, 2003: fix unbalanced [] typo in fsinfo man page. + +* Martin Blapp +July 6, 2004: recognize fields in pcfs_args_t in FreeBSD 5. + +* Dan Nelson +August 2, 2004: pawd to recognize "host" type mounts. + +* Hauke Fath +August 3, 2004: pawd to recognize "linkx" type mounts. + +* Michael van Elst +September 1, 2004: bug fix to avoid race condition in calls to mntctl on +AIX. + +* Jonathan Chen +October 22, 2004: patch/fix to move mlock/mlockall/plock code after the +fork(). +June 29, 2005: core dump going off end of exported_ap[] array. +September 29, 2005: patch/fix for pawd not to go into an infinite loop. +October 25, 2005: patch/fix for pawd to repeatedly resolve path. + +* David Rage +January 17, 2005: prevent Amd from logging 'Read-only filesystem' errors +when the mount point has an ancestor (i.e. '/') that is mounted read-only. + +* Kevin Layer +January 28, 2005: basic instructions how to setup Amd on Mac OS-X. + +* Dan Ottavio +March 2, 2005: new global amd.conf option debug_mtab_file, to set the debug +mtab file when using debug_options=mtab. Default has changed from "./mtab" +to "/tmp/mtab" to avoid security problem. Bug fixed to ensure that Amd +terminates properly even mtab file doesn't exist. + +* Erik Kline +January 3, 2005: implementation of executable maps for Amd. + +* Jim Zajkowski +March 14, 2005: small patch to amd2ldif. + +* Adam Morley +January 27, 2005: synchronize what amd2ldif does vs. what the ldap.schema +expects. + +* Graeme Wilford +July 4, 2005: buffer overflow in pawd. + +* Steve Plite +September 22, 2005: repair reversed meaning of D_AMQ, so amq will unregister +on exit. Copied: vendor/amd/dist/BUGS (from r277862, vendor/amd/dist/contrib/amd/BUGS) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/amd/dist/BUGS Wed Jan 28 22:55:06 2015 (r277863, copy of r277862, vendor/amd/dist/contrib/amd/BUGS) @@ -0,0 +1,303 @@ + LIST OF KNOWN BUGS IN AM-UTILS OR OPERATING SYSTEMS + +Note: report am-utils bugs via Bugzilla to https://bugzilla.am-utils.org/ or +by email to the am-utils@am-utils.org mailing list. + + +(1) mips-sgi-irix* + +[1A] known to have flaky NFS V.3 and TCP. Amd tends to hang or spin +infinitely after a few hours or days of use. Users must install recommended +patches from vendor. Patches help, but not all the time. Otherwise avoid +using NFS V.3 and TCP on these systems, by setting + + /defaults opts:=vers=2,proto=udp + +[1B] yp_all() leaks a file descriptor. Eventually amd runs out of file +descriptors and hangs. Am-utils circumvents this by using its own version +of yp_all which uses udp and iterates over NIS maps. The latter isn't as +reliable as yp_all() which uses TCP, but it is better than hanging. + +(I have some reports that older version of hpux-9, with older libc, also +leak file descriptors.) + +[1C] SGI's MIPSpro C compiler on IRIX 6 has the unfortunate habit of +creating code specificially for the machine it runs on. The ABI and ISA +used depend very much on the OS version and compiler release used. This +means that the resulting amd binary won't run on machines different from +the build host, particularly older ones. Older versions of am-utils +enforced the O32 ABI when compiling with cc to work around this, but this +ABI is deprecated in favor of the N32 ABI now, so we use -n32 -mips3 to +ensure that the binaries run on every host capable of running IRIX 6 at +all. If this is not appropriate for you, configure with something like +CC='cc -64' instead to get the desired ABI and ISA. + +(2) alpha-unknown-linux-gnu (RedHat Linux 4.2) + +hasmntopt(mnt, opt) can go into an infinite loop if opt is any substring +of mnt->mnt_opts. Redhat 5.0 does not have this libc bug. Here is an +example program: + +#include +#include +main() +{ + struct mntent mnt; + char *cp; + mnt.mnt_opts = "intr,rw,port=1023,timeo=8,foo=br,retrans=110,indirect,map=/usr/local/AMD/etc/amd.proj,boo"; + cp = hasmntopt(&mnt, "ro"); + printf("cp = %s\n", cp); + exit(0); +} + +It is possible that sufficiently newer version of libc for RH4.2 fix this +problem. + + +(3) mips-dec-ultrix4.3 + +Rainer Orth reports + +[3A] One needs the Kernel Config Files (UDTBIN430) subset installed to +compile am-utils, otherwise essential header files (net/if.h, net/route.h, +rpcsvc/mount.h, rpcsvc/yp_prot.h, rpcsvc/ypclnt.h, sys/proc.h) are +missing. + +[3B] It's probably impossible to build am-utils with DEC C on Ultrix V4.3. +This compiler is pseudo-ANSI only. Maybe the new ANSI C compiler in V4.3A +and beyond will do. I successfully used gcc 2.8.1. + +[3C] You need to build against a recent libhesiod (I used 3.0.2) and +libresolv/lib44bsd (I used BIND 4.9.5-P1). The resolver routines in +libc seem to cause random memory corruption. It is necessary to specify +LIBS=-l44bsd. lib44bsd is a helper library of libresolv used to supply +functions like strdup which are missing on the host system. This isn't +currently autoconfiscated. + +[3D] You need to configure with CONFIG_SHELL=/bin/sh5 /bin/sh5 buildall; +/bin/sh cannot handle the shell functions used in buildall and is both +buggy and slow. + +[3E] At least the gcc 2.7.0 fixincludes-mangled needs a +forward declaration of struct utsname to avoid lots of gcc warnings: + +RCS file: RCS/utsname.h,v +retrieving revision 1.1 +diff -u -r1.1 utsname.h +--- utsname.h 1995/06/19 13:07:01 1.1 ++++ utsname.h 1998/01/27 12:34:26 +@@ -59,6 +59,7 @@ + #ifdef KERNEL + #include "../h/limits.h" + #else /* user mode */ ++struct utsname; + extern int uname _PARAMS((struct utsname *)); + #endif + #define __SYS_NMLN 32 + + +(4) powerpc-ibm-aix4.2.1.0 + +[4A] "Randall S. Winchester" reports that for amd to +start, you need to kill and restart rpc.mountd and possibly also make sure +that nfsd is running. Normally these are not required. + +[4B] "Stefan Vogel" reports that if your amq +executable dump core unexpectedly, then it may be a bug in gcc 2.7.x. +Upgrade to gcc 2.8.x or use IBM's xlC compiler. + +[C] Do not link amd with libnsl. It is buggy and causes amd to core dump +in strlen inside strdup inside svc_register(). + + +(5) *-linux-rh51 (RedHat Linux 5.1) + +There's a UDP file descriptor leak in libnsl in RedHat Linux 5.1. This +library part of glibc2. Am-utils currently declares redhat 5.1 systems as +having a "broken yp_all" and using an internal, slower, leak-free version. +The leak is known to the glibc maintainers and a fix from them is due soon, +but it is not yet in the glibc-2.0.7-19 RPM. + + +(6) rs6000-ibm-aix4.1.x + +A bug in libc results in an amq binary that doesn't work; amq -v dumps core +in xdr_string. There is no known fix (source code or vendor patch) at this +time. (Please let am-utils@am-utils.org know if you know of a fix.) + + +(7) *-aix4.3.2.0 + +The plock() function will pre-reserve all of the memory up to the maximum +listed in the ulimit. If the ulimit is infinite, plock() will try to take +all of the system's memory, and fail with ENOMEM (Not Enough Space). +Normally ulimit may be set to a few gigs of max memory usage, but even that +is too much; Amd doesn't need more than a few megs of resident memory size +(depending on the particular usage, number of maps, etc.) Solution: lower +your ulimit before starting amd. This can be done inside the ctl-amd +script, but be careful not to limit it too low. Alternatively, don't use +plock on aix-4.3: set it to plock=no in amd.conf (which is the default if +you do nothing). + + +(8) *-linux (systems using glibc 2.1, such as RedHat-6.x) + +There's a UDP file descriptor leak in the NIS routines in glibc, especially +those that do yp_bind. Until this is bug fixed, do not set nis_domain in +amd.conf, but let the system pick up the default domain name as set by your +system. That would avoid using the buggy yp_bind routines in libc. + + +(9) *-linux (SuSE systems using unfsd) + +The user-level nfsd (2.2beta44) on older SuSE Linux systems (and possibly +others) dies with a SEGV when amd tries to contact it for access to a volume +that does not exist, or one for which there is no permission to mount. + + +(10) *-*-hpux11 + +If you're using NFSv3, you must install HP patches PHNE_20344 and +PHNE_20371. If you don't, and you try to use amd with NFSv3 over TCP, your +kernel will panic. + + +(11) *-linux* (any system using a 2.2.18+ kernel) + +The Linux kernels don't support Amd's direct mounts very well, leading to +erratic behavior: shares that don't get remounted after the first timeout, +inability to restart Amd because its mount points cannot be unmounted, etc. +There are some kernel patches on the am-utils Web site, which solve these +problems. See http://www.am-utils.org/patches/. + +Later 2.4.x kernels completely disallow the hack amd was using for direct +mounts, so another solution will have to be found. + +Note: the above is for the old-style amd mount_type = nfs. The autofs mounts +don't support direct mounts at all (due to lack of kernel support). + +(12) *-aix5.1.0.0 and *-hpux9* + +/bin/sh is broken and fails to run the configure script properly. You need +to use /bin/ksh instead. The buildall script will do it for you; if for some +reason you need to run configure directly, run it using 'ksh configure' +instead of just 'configure'. + +[12A] *-aix5.2.* + +Apparently there is an NFS client side bug in vmount() which causes amd to +hang when it starts (and tries to NFS-mount itself). According to IBM +engineers, this has to do with partial support code for IPv6: the NFS kernel +code doesn't appear to recognize the sin_family of the amd vmount(), +although amd does the right thing. The bug doesn't appear to be in 5.1 or +4.3.3. A fix from IBM is available, APAR number IY41417. + +A binary built on 4.3.3 will not work on 5.2, because the kernel ABIs have +changed. + +[12C] *-aix* + +It is important that you install bos.net.nfs.adt before configuring and +building am-utils. If you don't, you will get compile-time or +configure-time errors, especially when configure tries to find AIX's +definition of struct nfs_args. + +(13) *-linux and *-darwin6.0 + +Certain linux kernels (2.4.18+ are fine, 2.4.10- are probably bad, those in +between have not been tested) have a bug which causes them to reconnect +broken NFS/TCP connections using unprivileged ports (greater than 1024), +unlike the initial connections which do originate from privileged +ports. This can upset quite a few NFS servers and causes accesses to the +mounted shares to fail with "Operation not permitted" (EPERM). + +The darwin (MacOS X) kernel defaults to using unprivileged ports, but that +can be changed by setting the resvport mount flag (which amd sets by +default). Nonetheless, if a TCP connection breaks, under certain unclear +circumstances the kernel might "forget" about that flag and start using +unprivileged ports, causing the same EPERM error above. + +(14) Solaris + +The line "%option" in *.l files may cause Solaris /usr/ccs/bin/lex to abort +with the error "missing translation value." This is a bug in Solaris lex. + +Moreover, both Solaris yacc and lex produce code that does not pass strict +compilation such as "gcc -Wall -Werror". + +Use GNU Flex and Bison instead. You can download ready-made binaries from +www.sunfreeware.com. Note, however, that sometimes the binaries on +sunfreeware.com don't seem to work, often because they are built against an +older revision of Solaris or build tools. In that case, build a fresh +version of GNU flex and/or bison from the latest stable sources. See +http://www.gnu.org/software/flex/ and http://www.gnu.org/software/bison/. + +(15) Solaris 8 + patch 10899[34]-xx (18 <= xx < 25) or patch 11260[56]-xx + +With this patch, Sun updated the autofs kernel module and automountd +userspace daemon from version 3 to version 4. They also updated the +/usr/include/rpcsvc/autofs_prot.x file, but forgot to regenerate the +autofs_prot.h file. Thus, when amd is compiled, it uses the old header and +thinks it should use autofs version 3, when in fact the kernel now supports +(and expects) only version 4. + +The workaround is to run 'rpcgen -C -h /usr/include/rpcsvc/autofs_prot.x > +/usr/include/rpcsvc/autofs_prot.h' and completely reconfigure and rebuild +am-utils (removing config.cache before running configure). + +The problem is fixed in patch revisions 10899[34]-25 and up. + + +(16) Linux kernel 2.4+ and lofs mounts + +Lofs mounts are not supported by the linux kernel, at all, but since 2.4.0 +the kernel supports a similar type of mount called a bind mount. Its +semantics are closer to those of a hardlink than to those of lofs, and one +of the results is that bind mounts ignore any mount options paseed to them. + +Amd uses bind mounts internally to emulate lofs mounts, which means that +lofs mounts on linux will effectively ignore their mount parameters and +inherit whatever options the original filesystem mounted upon had. + + +(17) autoconf 2.57 + +If you see configure warnings of the following kind: + +configure: WARNING: sys/proc.h: present but cannot be compiled +configure: WARNING: sys/proc.h: check for missing prerequisite headers? +configure: WARNING: sys/proc.h: proceeding with the preprocessor's result +configure: WARNING: ## ------------------------------------ ## +configure: WARNING: ## Report this to bug-autoconf@gnu.org. ## +configure: WARNING: ## ------------------------------------ ## + +please ignore them. They are not real errors, and neither +bug-autoconf@gnu.org nor the am-utils maintainers are interested in hearing +about them. Autoconf simply tries to do more than we need and attempts to +compile each header in isolation, which fails for many system headers. +That's ok, because we only need to know if a header file exists -- we know +how to use it properly ourselves. + +While autoconf does offer a way to specify other files to be included with +the tested header, in order to avoid these warnings, using it would enlarge +the resulting configure script by an order of magnitude, and for no real +gain. Configure is big enough as it is, we don't need any more useless +baggage in it. + +(18) NetBSD 2.0.2, FreeBSD 5.4, OpenBSD 3.7, and quite possibly most other + BSDs and other OSs (as of September 2005) + +Some BSD kernels don't have a way to turn off the NFS attribute cache. They +don't have a 'noac' mount flag, and setting various cache timeout fields in +struct nfs_args doesn't turn off the attribute cache; instead, it sets the +attribute cache timeout to some internal hard-coded default (usually +anywhere from 5-30 seconds). If Amd cannot turn off the NFS attribute +cache, under heavy Amd usage, users could get ESTALE errors from automounted +symlinks, or find that those symlinks point to the wrong place. One +workaround which would minimize this effect is to set auto_attrcache=1 in +your amd.conf, but it doesn't eliminate the problem! The best solutions are +(1) to use Amd in Autofs mode, if it's supported in your OS, and (2) talk to +your OS vendor to support a true "noac" flag. See README.attrcache for more +details. + +Erez & the am-utils team. Copied: vendor/amd/dist/COPYING (from r277862, vendor/amd/dist/contrib/amd/COPYING) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/amd/dist/COPYING Wed Jan 28 22:55:06 2015 (r277863, copy of r277862, vendor/amd/dist/contrib/amd/COPYING) @@ -0,0 +1,37 @@ +Copyright (c) 1997-2006 Erez Zadok +Copyright (c) 1989 Jan-Simon Pendry +Copyright (c) 1989 Imperial College of Science, Technology & Medicine +Copyright (c) 1989 The Regents of the University of California. +All rights reserved. + +This code is derived from software contributed to Berkeley by +Jan-Simon Pendry at Imperial College, London. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. All advertising materials mentioning features or use of this software + must display the following acknowledgment: + This product includes software developed by the University of + California, Berkeley and its contributors, as well as the Trustees of + Columbia University. +4. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. Copied: vendor/amd/dist/ChangeLog (from r277862, vendor/amd/dist/contrib/amd/ChangeLog) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/amd/dist/ChangeLog Wed Jan 28 22:55:06 2015 (r277863, copy of r277862, vendor/amd/dist/contrib/amd/ChangeLog) @@ -0,0 +1,12025 @@ +2006-05-11 Erez Zadok + + ******************************************************************* + *** Released am-utils-6.1.5 *** + ******************************************************************* + +2006-05-10 Erez Zadok + + * Minor new ports: i386-unknown-freebsd6.1 (RELEASE) + powerpc-apple-darwin8.6.0, and i386-unknown-openbsd3.9. + + * libamu/mount_fs.c (compute_nfs_attrcache_flags): fix signedness + problems on IRIX-6.5. + + * conf/autofs/autofs_solaris_v1.c (xdr_umntrequest): fix + signedness problems on IRIX-6.5. + +2006-05-01 Erez Zadok + + * configure.in: check if libc already includes dbm functionality + (as in FreeBSD 6), then don't bother to check specific libraries + such as libdbm, gdbm, etc. + +2006-04-21 Erez Zadok + + * configure.in: detect G/DBM support via gdbm_compat library + (Debian 3.1). + + * minor new port: powerpc-apple-darwin8.5.0 + +2006-04-20 Erez Zadok + + * scripts/amd.conf-sample, scripts/amd.conf.5, doc/am-utils.texi, + NEWS: document new nfs_allow_any_interface parameter. + + * include/am_compat.h (INADDR_LOOPBACK): define INADDR_LOOPBACK if + not defined, since some systems don't have it. + +2006-04-20 Nick Williams + + * libamu/wire.c (is_interface_local): new boolena function to + determine if address represents any of the local interfaces. + (getwire): more properly check if address equals INADDR_LOOPBACK, + not if IFF_LOOPBACK is not (the latter isn't as correct). + + * include/am_utils.h: extern for new is_interface_local() function. + + * conf/transp/transp_{sockets,tli}.c: don't define INADDR_LOOPBACK + here but in am_compat.h + + * amd/nfs_prot_svc.c (nfs_program_2): if + nfs_allow_any_interface=yes, then allow NFS packets from any local + interface (not just 127.0.0.1). + + * amd/conf.c (gopt_nfs_allow_any_interface): implement the new + amd.conf parameter nfs_allow_any_interface. + + * amd/amd.h (CFM_NFS_ANY_INTERFACE): define new global flag when + al interfaces are acceptable for local NFS packets. + +2006-04-18 Christos Zoulas + + * amd/opts.c: Add support for optionally specifying the hostname + to match against the netgroup in the netgrp and netgrpd selectors. + +2006-04-16 Erez Zadok + + * libamu/mtab.c (hasmntval): fix inverted meaning of error from + hasmntvalerr(). + +2006-04-14 Erez Zadok + + * libamu/mount_fs.c (compute_nfs_attrcache_flags): use new + hasmntvalerr() function to set attribute cache values only if they + were set (regardless whether they were set to zero or a non-zero + value). Before, we were unable to distinguish between an error to + parse an option, and a user who actually wanted to set an + attribute-cache value to 0. This now fixes an important + performance bug that Amd was turning off the attribute caches even + for regular (non-automounter) NFS mounts. + + * libamu/mtab.c (hasmntvalerr): new function to set the value of + an option into an integer, but ONLY if that options was set and + parsed correctly. This function returns 1 on error, 0 on success + (instead of always setting the option value to 0). + (hasmntval): wrapper function around hasmntvalerr, which maintains + backwards compatibility (always sets option value to 0, even on + error to parse the option). + + * amd/nfs_subr.c (fh_to_mp3): use long int printf format for + fhh_pid. + +2006-04-05 Christos Zoulas + + * amd/amfs_generic.c (amfs_lookup_mntfs): fix use-after-free bug + (Coverity). + +2006-03-27 Erez Zadok + + * doc/am-utils.texi, scripts/{amd.conf.5,amd.conf-sample}: + document new nfs_retransmit_counter_toplvl and + nfs_retry_interval_toplvl global amd.conf parameters. + + * amd/conf.c (gopt_nfs_retransmit_counter_toplvl, + (gopt_nfs_retry_interval_toplvl): parse amd.conf + nfs_retransmit_counter_toplvl and nfs_retry_interval_toplvl global + parameters. + + * amd/amfs_toplvl.c (amfs_toplvl_mount): support setting toplvl + timeo/retrans parameters for Amd's toplvl mounts, separately from + all other UDP or NFS mounts. + + * amd/amd.h: define a new timeo/retrans parameter for toplvl + mounts. + +2006-03-22 Erez Zadok + + * minor new port: i386-pc-linux-suse10.1 (beta 8). + +2006-03-21 Christos Zoulas + + * amd/am_ops.c (merge_opts): Remove useless check found by + Coverity; xmalloc never returns NULL. + +2006-03-21 Erez Zadok + + * minor new ports: i386-pc-linux-fc5. + + * amd/info_ldap.c: as of Linux Fedora Core 5 (which comes with + openldap-2.3.9), the ldap.h headers deprecate several functions + used in this file, such as ldap_unbind. You get compile errors + about missing extern definitions. Those externs are still in + , but surrounded by an ifdef LDAP_DEPRECATED. I am + turning on that ifdef at the top of info_ldap.c, under the + assumption that the functions may be deprecated, but they still + work for this (older?) version of the LDAP API. It gets am-utils + to compile, but it is not clear if it will work perfectly. + + * libamu/xdr_func.c (xdr_am_mountres3_ok), amq/amq_xdr.c + (xdr_amq_mount_tree, xdr_amq_mount_tree_p, + xdr_amq_mount_info_list, xdr_amq_mount_tree_list), amq/amq.c + (show_mti), amd/amq_subr.c (xdr_amq_setopt, xdr_amq_mount_subtree, + xdr_amq_mount_tree, xdr_amq_mount_tree_list, xdr_amq_mount_tree), + libamu/xdr_func.c (xdr_am_mountres3_ok): use casing magic to stop + GCC-4.1 from complaining about "dereferencing type-punned pointer + will break strict-aliasing rules" here (but not elsewhere). + +2006-03-20 Christos Zoulas + + * libamu/wire.c: avoid potential dereferencing of a NULL pointer + (Coverity). + + * hlfsd/homedir.c (delay): remove unnecessary check for NULL + pointer (Coverity). + + * fsinfo/fsi_analyze.c (analyze_dkmounts, analyze_mounts, + analyze_mounts): avoid potential dereferencing of a NULL pointer + (Coverity). + + * conf/transp/transp_sockets.c (create_amq_service): avoid + potential dereferencing of a NULL pointer (Coverity). + + * amd/sched.c (sigchld): properly check for the end of the waiting + process list (Coverity). + + * amd/mapc.c (mapc_create): initialize 'modify' to zero (Coverity). + + * amd/autil.c (amfs_mkcacheref, am_unmounted): avoid potential + dereferencing of a NULL pointer (Coverity). + + * amd/amfs_generic.c (amfs_lookup_mntfs): free def_opts before + reusing it (memory leak bug detected by Coverity). + (amfs_bgmount): avoid potential dereferencing of a NULL pointer + (Coverity). + + * amd/am_ops.c (merge_opts): no need to check if newstr is NULL + (bug detected by Coverity). + +2006-03-08 Ion Badulescu + + * amd/nfs_subr.c (mp_to_fh): fixed old-style filehandles--the pid + comparison was failing. + +2006-03-08 Erez Zadok + + * configure.in: properly test for either or + (unfortunately, Autoconf will map both names to the + same $ac_cv_* variable name). Some systems support one header or + another. Patch inspired by work Debian did. + +2006-02-10 Erez Zadok + + ******************************************************************* + *** Released am-utils-6.1.4 *** + ******************************************************************* + +2006-01-04 Erez Zadok + + * doc/am-utils.texi (auto_attrcache Parameter): revise discussion + to mention pros and cons of turning on/off this parameter, + including impact on Amd's performance, and ways to improve + performance while minimizing the window of vulnerability in which + kernel may return the wrong (cached) attributes. + +2006-01-02 Erez Zadok + + * updated copyright year to 2006 on all files. + +2005-12-20 Erez Zadok + + * include/am_utils.h, conf/transp/transp_tli.c (amu_svc_register, + register_autofs_service): use a consistent prototype for the + dispatch function of the autofs service de/registration functions. + +2005-12-03 Erez Zadok + + * minor new ports: i386-unknown-netbsdelf2.1, + i386-unknown-netbsdelf3.0 (RELEASE), and i386-unknown-openbsd3.8. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 23:22:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 54B941EF; Wed, 28 Jan 2015 23:22:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4047F27B; Wed, 28 Jan 2015 23:22:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0SNMhpj025446; Wed, 28 Jan 2015 23:22:43 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0SNMhDU025445; Wed, 28 Jan 2015 23:22:43 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501282322.t0SNMhDU025445@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 28 Jan 2015 23:22:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r277866 - vendor/amd/dist/amd X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 23:22:43 -0000 Author: pfg Date: Wed Jan 28 23:22:42 2015 New Revision: 277866 URL: https://svnweb.freebsd.org/changeset/base/277866 Log: avoid possible null pointer deref (coverity) author Christos Zoulas Wed, 17 Sep 2008 15:07:20 -0500 (20:07 +0000) committer Christos Zoulas Wed, 17 Sep 2008 15:07:20 -0500 (20:07 +0000) commit d414de481f6efe52455c19f64e911d0db34d185a Modified: vendor/amd/dist/amd/amfs_generic.c Modified: vendor/amd/dist/amd/amfs_generic.c ============================================================================== --- vendor/amd/dist/amd/amfs_generic.c Wed Jan 28 23:13:12 2015 (r277865) +++ vendor/amd/dist/amd/amfs_generic.c Wed Jan 28 23:22:42 2015 (r277866) @@ -1113,7 +1113,7 @@ amfs_generic_mount_child(am_node *new_mp new_mp->am_transp = (SVCXPRT *) xmalloc(sizeof(SVCXPRT)); *(new_mp->am_transp) = *current_transp; } - if (error && (new_mp->am_mnt->mf_ops == &amfs_error_ops)) + if (error && new_mp->am_mnt && (new_mp->am_mnt->mf_ops == &amfs_error_ops)) new_mp->am_error = error; if (new_mp->am_error > 0) From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 00:39:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C72B19A7 for ; Thu, 29 Jan 2015 00:39:06 +0000 (UTC) Received: from nm50.bullet.mail.bf1.yahoo.com (nm50.bullet.mail.bf1.yahoo.com [216.109.114.67]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B85BBEC for ; Thu, 29 Jan 2015 00:39:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1422491937; bh=R5KSG9xDLnJrE33rzFBhUsI8nTXdCedJlZm++w0LEnU=; h=Date:From:To:CC:Subject:References:In-Reply-To:From:Subject; b=SjwBr12hHDN1uzUWK4+edYLmQrdC8zb4gyL+Sqz7iD2RMabtUkQvplxX1vBHwG9ONjoVarzkLmkiNM2aq7aH00OeI7LUYuU9SIeFbAzjgo3N9vYu451owGi8dgh1yThf0sDDmCZXEpx+9/48I2nLOMWgFGzLbDaxhd+IsNSinfTW1D+5yrpL2rGBKh80cCK1unmjotIpo/zNoWg5DnVZVH8Etq5IejfVhWsar7/xOxFCZEqQIIAWtMZtU5sbwA9wFHDeRA3CoPLPMPoVAuoE9TXS7kgaLKHw9a1B38DsBGucSzw1bRkoUp9SMzGM1hbv7mL3DQTIrKNiBH1np6zWeA== Received: from [98.139.215.141] by nm50.bullet.mail.bf1.yahoo.com with NNFMP; 29 Jan 2015 00:38:57 -0000 Received: from [98.139.213.10] by tm12.bullet.mail.bf1.yahoo.com with NNFMP; 29 Jan 2015 00:38:57 -0000 Received: from [127.0.0.1] by smtp110.mail.bf1.yahoo.com with NNFMP; 29 Jan 2015 00:38:57 -0000 X-Yahoo-Newman-Id: 858615.55222.bm@smtp110.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: RwjJ_WMVM1m2dC.d2B_AO6xz5PKMrzeB5D7M3GphpwZFi3s 8DAdFSJcep.BGwQJttj1AqaibTmuEjJxShujf.ullRcL3GqdTx9mjHEEa_i7 CvQifym3.PiLgNY.tXWgmA.Thx.WqzwCB8wEgSkrwN55pv.fCocST4aiFubH yrNfeNsI8WbbUy03OqzP548D.W8XDV8CvOyOgpZ_kkVDDGSOlZ0MSd2DMYiH ono_Bnr1SS7RQACv1M8xjCqnUDFdAlOh8PCoboitzPoVAf5KSEk7EmXWDzW. oFTIHRCRQ2NYzDNNiUkbeWqmTOa7IhVwL1GDIR2VbNLva6gjJcLnXDfzwm0p fKnZm01y3zndy8gFLRZmKwf6pm251.NE2WwqUmDMeTgFK2UbmslAHEEH067W 14XJtX3FoDHjM4xM7rsOG1l4tE9sWIltXmkihAHtP4mqKoYIKoRKKH2Oby2f rfzro_XUdD62Dk8iD8ydBAah6fPFaEAlH2guyrQUrih.8SYY4o8Tubt23k7H ePTYYOVh0h.Pzl9Z3_GntfI6c9Gi.lMHW6w8SPi3H_wrd8EtkPG4tArHk.Ry QWEefHkl3RHiz2Nhm5_WFq_qWzAlPsib2Z5xiK9po6dBeJWk6hvIAGwkIZrt HbNmvzJGqLvzaz1EcP4MxXQujNUMYE7BjbWUR7qoUBD6kX_FvBuOUio1b1__ H4cDuMm7rEuxE5klk2w-- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <54C98137.60507@FreeBSD.org> Date: Wed, 28 Jan 2015 19:39:19 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Dimitry Andric , Roman Divacky Subject: Re: svn commit: r277841 - head/contrib/amd/hlfsd References: <201501281819.t0SIJQG4073269@svn.freebsd.org> <20150128190422.GA58164@vlakno.cz> <874F65B6-0C1A-4230-B277-119C31BA31D7@FreeBSD.org> In-Reply-To: <874F65B6-0C1A-4230-B277-119C31BA31D7@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 00:39:07 -0000 On 01/28/15 14:25, Dimitry Andric wrote: > On 28 Jan 2015, at 20:04, Roman Divacky wrote: >> On Wed, Jan 28, 2015 at 06:19:26PM +0000, Dimitry Andric wrote: >>> Author: dim >>> Date: Wed Jan 28 18:19:25 2015 >>> New Revision: 277841 >>> URL: https://svnweb.freebsd.org/changeset/base/277841 >>> >>> Log: >>> Fix the following clang 3.6.0 warning in contrib/amd/hlfsd/homedir.c: >>> >>> contrib/amd/hlfsd/homedir.c:497:8: error: address of array 'buf' will >>> always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] >>> if (!buf || buf[0] == '\0') >>> ~^~~ >>> >>> In the affected function, 'buf' is declared as an array of char, so it >>> can never be null. Remove the unecessary check. > ... >> Given that this is a contributed code - have you sent the fix >> upstream? Also, upstream seems to have newer versions of this... > Apparently upstream fixed this about six years ago: > > http://git.fsl.cs.sunysb.edu/?p=am-utils-6.2.git;a=commitdiff;h=e6301006ef97d31745f9ffbb17c58cb39d18c6aa#patch9 > > The last real import for am-utils was about 7 year ago. Maybe it's time > for an update, if it is still actively used. > > -Dimitry > I have no idea if this should be updated (it's probably meant to be replaced by autofs nowadays) but the patches should be merged through the vendor area so I flattened the distdir and brought I change I had done there. Regards, Pedro. From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 01:26:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5E6399F8; Thu, 29 Jan 2015 01:26:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4A933168; Thu, 29 Jan 2015 01:26:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0T1QOKb084753; Thu, 29 Jan 2015 01:26:24 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0T1QOwN084752; Thu, 29 Jan 2015 01:26:24 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501290126.t0T1QOwN084752@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 29 Jan 2015 01:26:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277868 - head/contrib/amd/amd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 01:26:24 -0000 Author: pfg Date: Thu Jan 29 01:26:23 2015 New Revision: 277868 URL: https://svnweb.freebsd.org/changeset/base/277868 Log: Revert r277814: It will be re-merged through the vendor area. Modified: head/contrib/amd/amd/amfs_generic.c Modified: head/contrib/amd/amd/amfs_generic.c ============================================================================== --- head/contrib/amd/amd/amfs_generic.c Thu Jan 29 00:34:58 2015 (r277867) +++ head/contrib/amd/amd/amfs_generic.c Thu Jan 29 01:26:23 2015 (r277868) @@ -1113,7 +1113,7 @@ amfs_generic_mount_child(am_node *new_mp new_mp->am_transp = (SVCXPRT *) xmalloc(sizeof(SVCXPRT)); *(new_mp->am_transp) = *current_transp; } - if (error && new_mp->am_mnt && (new_mp->am_mnt->mf_ops == &amfs_error_ops)) + if (error && (new_mp->am_mnt->mf_ops == &amfs_error_ops)) new_mp->am_error = error; if (new_mp->am_error > 0) From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 01:28:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC1DFBFF; Thu, 29 Jan 2015 01:28:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7D32196; Thu, 29 Jan 2015 01:28:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0T1Sdq3085096; Thu, 29 Jan 2015 01:28:39 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0T1SdGL085095; Thu, 29 Jan 2015 01:28:39 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501290128.t0T1SdGL085095@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 29 Jan 2015 01:28:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277869 - head/contrib/amd/amd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 01:28:40 -0000 Author: pfg Date: Thu Jan 29 01:28:39 2015 New Revision: 277869 URL: https://svnweb.freebsd.org/changeset/base/277869 Log: MFV r277866 amd: Add extra check for NULL before deref. CID: 274421 Obtained from: NetBSD MFC after: 4 days Modified: head/contrib/amd/amd/amfs_generic.c Directory Properties: head/contrib/amd/ (props changed) Modified: head/contrib/amd/amd/amfs_generic.c ============================================================================== --- head/contrib/amd/amd/amfs_generic.c Thu Jan 29 01:26:23 2015 (r277868) +++ head/contrib/amd/amd/amfs_generic.c Thu Jan 29 01:28:39 2015 (r277869) @@ -1113,7 +1113,7 @@ amfs_generic_mount_child(am_node *new_mp new_mp->am_transp = (SVCXPRT *) xmalloc(sizeof(SVCXPRT)); *(new_mp->am_transp) = *current_transp; } - if (error && (new_mp->am_mnt->mf_ops == &amfs_error_ops)) + if (error && new_mp->am_mnt && (new_mp->am_mnt->mf_ops == &amfs_error_ops)) new_mp->am_error = error; if (new_mp->am_error > 0) From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 01:55:26 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8B728FD; Thu, 29 Jan 2015 01:55:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 765DB6E5; Thu, 29 Jan 2015 01:55:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0T1tQuv098870; Thu, 29 Jan 2015 01:55:26 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0T1tPin098866; Thu, 29 Jan 2015 01:55:25 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501290155.t0T1tPin098866@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 29 Jan 2015 01:55:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r277870 - in vendor/amd/dist: amd hlfsd X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 01:55:26 -0000 Author: pfg Date: Thu Jan 29 01:55:24 2015 New Revision: 277870 URL: https://svnweb.freebsd.org/changeset/base/277870 Log: Fix compile warnings for gcc-4.4.x author Christos Zoulas Mon, 26 Oct 2009 12:27:43 -0500 (13:27 -0400) committer Christos Zoulas Mon, 26 Oct 2009 12:27:43 -0500 (13:27 -0400) commit e6301006ef97d31745f9ffbb17c58cb39d18c6aa (partial) Modified: vendor/amd/dist/amd/amfs_program.c vendor/amd/dist/amd/readdir.c vendor/amd/dist/hlfsd/homedir.c vendor/amd/dist/hlfsd/stubs.c Modified: vendor/amd/dist/amd/amfs_program.c ============================================================================== --- vendor/amd/dist/amd/amfs_program.c Thu Jan 29 01:28:39 2015 (r277869) +++ vendor/amd/dist/amd/amfs_program.c Thu Jan 29 01:55:24 2015 (r277870) @@ -147,10 +147,12 @@ amfs_program_exec(char *info) (void) fclose(stdout); if (!logfp) logfp = stderr; /* initialize before possible first use */ - (void) dup(fileno(logfp)); + if (dup(fileno(logfp)) == -1) + return errno; if (fileno(logfp) != fileno(stderr)) { (void) fclose(stderr); - (void) dup(fileno(logfp)); + if (dup(fileno(logfp)) == -1) + return errno; } /* Modified: vendor/amd/dist/amd/readdir.c ============================================================================== --- vendor/amd/dist/amd/readdir.c Thu Jan 29 01:28:39 2015 (r277869) +++ vendor/amd/dist/amd/readdir.c Thu Jan 29 01:55:24 2015 (r277870) @@ -63,6 +63,7 @@ static int key_already_in_chain(char *ke static nfsentry *make_entry_chain(am_node *mp, const nfsentry *current_chain, int fully_browsable); static int amfs_readdir_browsable(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep, u_int count, int fully_browsable); +static const u_int dotdotcookie = DOT_DOT_COOKIE; /**************************************************************************** *** FUNCTIONS *** @@ -178,8 +179,9 @@ make_entry_chain(am_node *mp, const nfse /* we have space. put entry in next cell */ ++last_cookie; - chain[num_entries].ne_fileid = (u_int) last_cookie; - *(u_int *) chain[num_entries].ne_cookie = (u_int) last_cookie; + chain[num_entries].ne_fileid = last_cookie; + (void)memcpy(chain[num_entries].ne_cookie, &last_cookie, + sizeof(last_cookie)); chain[num_entries].ne_name = key; if (num_entries < max_entries - 1) { /* link to next one */ chain[num_entries].ne_nextentry = &chain[num_entries + 1]; @@ -253,7 +255,7 @@ amfs_readdir_browsable(am_node *mp, nfsc ep[0].ne_fileid = mp->am_gen; ep[0].ne_name = "."; ep[0].ne_nextentry = &ep[1]; - *(u_int *) ep[0].ne_cookie = 0; + (void)memset(ep[0].ne_cookie, 0, sizeof(u_int)); /* construct ".." */ if (mp->am_parent) @@ -300,9 +302,12 @@ amfs_readdir_browsable(am_node *mp, nfsc nfsentry *ne; for (j = 0, ne = te; ne; ne = ne->ne_nextentry) plog(XLOG_DEBUG, "gen2 key %4d \"%s\"", j++, ne->ne_name); - for (j = 0, ne = ep; ne; ne = ne->ne_nextentry) + for (j = 0, ne = ep; ne; ne = ne->ne_nextentry) { + u_int cookie; + (void)memcpy(&cookie, ne->ne_cookie, sizeof(cookie)); plog(XLOG_DEBUG, "gen2+ key %4d \"%s\" fi=%d ck=%d", - j++, ne->ne_name, ne->ne_fileid, *(u_int *)ne->ne_cookie); + j++, ne->ne_name, ne->ne_fileid, cookie); + } plog(XLOG_DEBUG, "EOF is %d", dp->dl_eof); } return 0; @@ -412,7 +417,7 @@ amfs_generic_readdir(am_node *mp, nfscoo ep[0].ne_fileid = mp->am_gen; ep[0].ne_name = "."; ep[0].ne_nextentry = &ep[1]; - *(u_int *) ep[0].ne_cookie = 0; + (void)memset(ep[0].ne_cookie, 0, sizeof(u_int)); /* construct ".." */ if (mp->am_parent) @@ -429,9 +434,12 @@ amfs_generic_readdir(am_node *mp, nfscoo if (amuDebug(D_READDIR)) { nfsentry *ne; int j; - for (j = 0, ne = ep; ne; ne = ne->ne_nextentry) + for (j = 0, ne = ep; ne; ne = ne->ne_nextentry) { + u_int cookie; + (void)memcpy(&cookie, ne->ne_cookie, sizeof(cookie)); plog(XLOG_DEBUG, "gen1 key %4d \"%s\" fi=%d ck=%d", - j++, ne->ne_name, ne->ne_fileid, *(u_int *)ne->ne_cookie); + j++, ne->ne_name, ne->ne_fileid, cookie); + } } return 0; } @@ -460,9 +468,9 @@ amfs_generic_readdir(am_node *mp, nfscoo am_node *xp_next = next_nonerror_node(xp->am_osib); if (xp_next) { - *(u_int *) ep->ne_cookie = xp_next->am_gen; + (void)memcpy(ep->ne_cookie, &xp_next->am_gen, sizeof(xp_next->am_gen)); } else { - *(u_int *) ep->ne_cookie = DOT_DOT_COOKIE; + (void)memcpy(ep->ne_cookie, &dotdotcookie, sizeof(dotdotcookie)); dp->dl_eof = TRUE; } @@ -488,9 +496,12 @@ amfs_generic_readdir(am_node *mp, nfscoo if (amuDebug(D_READDIR)) { nfsentry *ne; int j; - for (j=0,ne=ep; ne; ne=ne->ne_nextentry) + for (j=0,ne=ep; ne; ne=ne->ne_nextentry) { + u_int cookie; + (void)memcpy(&cookie, ne->ne_cookie, sizeof(cookie)); plog(XLOG_DEBUG, "gen2 key %4d \"%s\" fi=%d ck=%d", - j++, ne->ne_name, ne->ne_fileid, *(u_int *)ne->ne_cookie); + j++, ne->ne_name, ne->ne_fileid, cookie); + } } return 0; } Modified: vendor/amd/dist/hlfsd/homedir.c ============================================================================== --- vendor/amd/dist/hlfsd/homedir.c Thu Jan 29 01:28:39 2015 (r277869) +++ vendor/amd/dist/hlfsd/homedir.c Thu Jan 29 01:55:24 2015 (r277870) @@ -492,9 +492,10 @@ readent: /* read records */ buf[0] = '\0'; - fgets(buf, 256, passwd_fp); + if (fgets(buf, 256, passwd_fp) == NULL) + return NULL; passwd_line++; - if (!buf || buf[0] == '\0') + if (buf[0] == '\0') goto readent; /* read user name */ Modified: vendor/amd/dist/hlfsd/stubs.c ============================================================================== --- vendor/amd/dist/hlfsd/stubs.c Thu Jan 29 01:28:39 2015 (r277869) +++ vendor/amd/dist/hlfsd/stubs.c Thu Jan 29 01:55:24 2015 (r277870) @@ -164,8 +164,7 @@ nfsproc_getattr_2_svc(am_nfs_fh *argp, s if (gid != hlfs_gid) { res.ns_status = NFSERR_STALE; } else { - memset((char *) &uid, 0, sizeof(int)); - uid = *(u_int *) argp->fh_data; + (void)memcpy(&uid, argp->fh_data, sizeof(uid)); if (plt_search(uid) != (uid2home_t *) NULL) { res.ns_status = NFS_OK; un_fattr.na_fileid = uid; @@ -282,8 +281,8 @@ nfsproc_lookup_2_svc(nfsdiropargs *argp, } else { /* entry found and gid is permitted */ un_fattr.na_fileid = untab[idx].uid; res.dr_u.dr_drok_u.drok_attributes = un_fattr; - memset((char *) &un_fhandle, 0, sizeof(am_nfs_fh)); - *(u_int *) un_fhandle.fh_data = (u_int) untab[idx].uid; + memset(&un_fhandle, 0, sizeof(un_fhandle)); + memcpy(un_fhandle.fh_data, &untab[idx].uid, sizeof(untab[idx].uid)); xstrlcpy((char *) &un_fhandle.fh_data[sizeof(int)], untab[idx].username, sizeof(am_nfs_fh) - sizeof(int)); @@ -338,8 +337,7 @@ nfsproc_readlink_2_svc(am_nfs_fh *argp, } if (groupid == hlfs_gid) { - memset((char *) &userid, 0, sizeof(int)); - userid = *(u_int *) argp->fh_data; + memcpy(&userid, argp->fh_data, sizeof(userid)); username = (char *) &argp->fh_data[sizeof(int)]; if (!(res.rlr_u.rlr_data_u = mailbox(userid, username))) return (nfsreadlinkres *) NULL; From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 01:59:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E337F281; Thu, 29 Jan 2015 01:59:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CEFA1777; Thu, 29 Jan 2015 01:59:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0T1xhFm099353; Thu, 29 Jan 2015 01:59:43 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0T1xhWj099352; Thu, 29 Jan 2015 01:59:43 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201501290159.t0T1xhWj099352@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Thu, 29 Jan 2015 01:59:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277871 - head/sys/arm/ti/am335x X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 01:59:44 -0000 Author: gonzo Date: Thu Jan 29 01:59:42 2015 New Revision: 277871 URL: https://svnweb.freebsd.org/changeset/base/277871 Log: Set LCDC clock frequency to 2*148500 KHz Minimum LCDC is 2 so clock freq shouild be 2*max_pixel_clock. Maximum pixel clock for HDMI is 148500 (1920x1080). But AM335x can not run in this mode due to bandwidth and clock limitations Modified: head/sys/arm/ti/am335x/am335x_prcm.c Modified: head/sys/arm/ti/am335x/am335x_prcm.c ============================================================================== --- head/sys/arm/ti/am335x/am335x_prcm.c Thu Jan 29 01:55:24 2015 (r277870) +++ head/sys/arm/ti/am335x/am335x_prcm.c Thu Jan 29 01:59:42 2015 (r277871) @@ -729,10 +729,10 @@ am335x_clk_lcdc_activate(struct ti_clock DELAY(10); /* - * For now set frequency to 5xSYSFREQ - * More flexible control might be required + * For now set frequency to 99*SYSFREQ/8 which is twice as + * HDMI 1080p pixel clock (minimum LCDC freq divisor is 2) */ - prcm_write_4(CM_WKUP_CM_CLKSEL_DPLL_DISP, (5 << 8) | 0); + prcm_write_4(CM_WKUP_CM_CLKSEL_DPLL_DISP, (99 << 8) | 8); /* Locked mode */ prcm_write_4(CM_WKUP_CM_CLKMODE_DPLL_DISP, 0x7); From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 08:23:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A2D8740; Thu, 29 Jan 2015 08:23:53 +0000 (UTC) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 1103727B; Thu, 29 Jan 2015 08:23:52 +0000 (UTC) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t0T8Nk2Q071066 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 29 Jan 2015 00:23:46 -0800 (PST) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.14.5/8.14.5/Submit) id t0T8Nka4071065; Thu, 29 Jan 2015 00:23:46 -0800 (PST) (envelope-from jmg) Date: Thu, 29 Jan 2015 00:23:46 -0800 From: John-Mark Gurney To: Dimitry Andric Subject: Re: svn commit: r277860 - head/usr.sbin/sa Message-ID: <20150129082346.GC27103@funkthat.com> References: <201501282222.t0SMMoHU095511@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201501282222.t0SMMoHU095511@svn.freebsd.org> X-Operating-System: FreeBSD 9.1-PRERELEASE amd64 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (gold.funkthat.com [127.0.0.1]); Thu, 29 Jan 2015 00:23:46 -0800 (PST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 08:23:53 -0000 Dimitry Andric wrote this message on Wed, Jan 28, 2015 at 22:22 +0000: > Replace the VERSION_KEY define with a writable char array, so no const > qualifier needs to be dropped anymore. You do realize that you should juse use __DECONST for this instead? This moves the data from .rodata into .data making it writable, and also means that bad programs could end up stop working, instead of faulting when someone tries to change the version string... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 09:03:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D0756FDC; Thu, 29 Jan 2015 09:03:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC58C92D; Thu, 29 Jan 2015 09:03:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0T93wwB098434; Thu, 29 Jan 2015 09:03:58 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0T93wRB098433; Thu, 29 Jan 2015 09:03:58 GMT (envelope-from des@FreeBSD.org) Message-Id: <201501290903.t0T93wRB098433@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Thu, 29 Jan 2015 09:03: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: r277873 - stable/10/lib/libpam/modules/pam_radius X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 09:03:59 -0000 Author: des Date: Thu Jan 29 09:03:57 2015 New Revision: 277873 URL: https://svnweb.freebsd.org/changeset/base/277873 Log: MFH (r277237): pass PAM_RHOST to RADIUS server as Calling-Station-ID Modified: stable/10/lib/libpam/modules/pam_radius/pam_radius.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libpam/modules/pam_radius/pam_radius.c ============================================================================== --- stable/10/lib/libpam/modules/pam_radius/pam_radius.c Thu Jan 29 08:41:34 2015 (r277872) +++ stable/10/lib/libpam/modules/pam_radius/pam_radius.c Thu Jan 29 09:03:57 2015 (r277873) @@ -62,11 +62,11 @@ __FBSDID("$FreeBSD$"); #define PASSWORD_PROMPT "RADIUS Password:" static int build_access_request(struct rad_handle *, const char *, - const char *, const char *, const char *, const void *, - size_t); + const char *, const char *, const char *, const char *, + const void *, size_t); static int do_accept(pam_handle_t *, struct rad_handle *); static int do_challenge(pam_handle_t *, struct rad_handle *, - const char *, const char *, const char *); + const char *, const char *, const char *, const char *); /* * Construct an access request, but don't send it. Returns 0 on success, @@ -75,7 +75,7 @@ static int do_challenge(pam_handle_t *, static int build_access_request(struct rad_handle *radh, const char *user, const char *pass, const char *nas_id, const char *nas_ipaddr, - const void *state, size_t state_len) + const char *rhost, const void *state, size_t state_len) { int error; char host[MAXHOSTNAMELEN]; @@ -121,8 +121,13 @@ build_access_request(struct rad_handle * } } } - if (state != NULL && rad_put_attr(radh, RAD_STATE, state, - state_len) == -1) { + if (rhost != NULL && + rad_put_string(radh, RAD_CALLING_STATION_ID, rhost) == -1) { + syslog(LOG_CRIT, "rad_put_string: %s", rad_strerror(radh)); + return (-1); + } + if (state != NULL && + rad_put_attr(radh, RAD_STATE, state, state_len) == -1) { syslog(LOG_CRIT, "rad_put_attr: %s", rad_strerror(radh)); return (-1); } @@ -162,7 +167,7 @@ do_accept(pam_handle_t *pamh, struct rad static int do_challenge(pam_handle_t *pamh, struct rad_handle *radh, const char *user, - const char *nas_id, const char *nas_ipaddr) + const char *nas_id, const char *nas_ipaddr, const char *rhost) { int retval; int attrtype; @@ -230,7 +235,7 @@ do_challenge(pam_handle_t *pamh, struct conv->appdata_ptr)) != PAM_SUCCESS) return (retval); if (build_access_request(radh, user, resp[num_msgs-1].resp, nas_id, - nas_ipaddr, state, statelen) == -1) + nas_ipaddr, rhost, state, statelen) == -1) return (PAM_SERVICE_ERR); memset(resp[num_msgs-1].resp, 0, strlen(resp[num_msgs-1].resp)); free(resp[num_msgs-1].resp); @@ -246,7 +251,7 @@ pam_sm_authenticate(pam_handle_t *pamh, { struct rad_handle *radh; const char *user, *pass; - const void *tmpuser; + const void *rhost, *tmpuser; const char *conf_file, *template_user, *nas_id, *nas_ipaddr; int retval; int e; @@ -255,6 +260,7 @@ pam_sm_authenticate(pam_handle_t *pamh, template_user = openpam_get_option(pamh, PAM_OPT_TEMPLATE_USER); nas_id = openpam_get_option(pamh, PAM_OPT_NAS_ID); nas_ipaddr = openpam_get_option(pamh, PAM_OPT_NAS_IPADDR); + pam_get_item(pamh, PAM_RHOST, &rhost); retval = pam_get_user(pamh, &user, NULL); if (retval != PAM_SUCCESS) @@ -284,8 +290,8 @@ pam_sm_authenticate(pam_handle_t *pamh, PAM_LOG("Radius config file read"); - if (build_access_request(radh, user, pass, nas_id, nas_ipaddr, NULL, - 0) == -1) { + if (build_access_request(radh, user, pass, nas_id, nas_ipaddr, rhost, + NULL, 0) == -1) { rad_close(radh); return (PAM_SERVICE_ERR); } @@ -330,7 +336,7 @@ pam_sm_authenticate(pam_handle_t *pamh, case RAD_ACCESS_CHALLENGE: retval = do_challenge(pamh, radh, user, nas_id, - nas_ipaddr); + nas_ipaddr, rhost); if (retval != PAM_SUCCESS) { rad_close(radh); return (retval); From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 09:06:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 264AA1E6; Thu, 29 Jan 2015 09:06:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 113ED964; Thu, 29 Jan 2015 09:06:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0T96LVn098840; Thu, 29 Jan 2015 09:06:21 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0T96Las098839; Thu, 29 Jan 2015 09:06:21 GMT (envelope-from des@FreeBSD.org) Message-Id: <201501290906.t0T96Las098839@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Thu, 29 Jan 2015 09:06:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r277874 - stable/9/lib/libpam/modules/pam_radius X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 09:06:22 -0000 Author: des Date: Thu Jan 29 09:06:21 2015 New Revision: 277874 URL: https://svnweb.freebsd.org/changeset/base/277874 Log: MFH (r277237): pass PAM_RHOST to RADIUS server as Calling-Station-ID Modified: stable/9/lib/libpam/modules/pam_radius/pam_radius.c Directory Properties: stable/9/lib/libpam/ (props changed) Modified: stable/9/lib/libpam/modules/pam_radius/pam_radius.c ============================================================================== --- stable/9/lib/libpam/modules/pam_radius/pam_radius.c Thu Jan 29 09:03:57 2015 (r277873) +++ stable/9/lib/libpam/modules/pam_radius/pam_radius.c Thu Jan 29 09:06:21 2015 (r277874) @@ -62,11 +62,11 @@ __FBSDID("$FreeBSD$"); #define PASSWORD_PROMPT "RADIUS Password:" static int build_access_request(struct rad_handle *, const char *, - const char *, const char *, const char *, const void *, - size_t); + const char *, const char *, const char *, const char *, + const void *, size_t); static int do_accept(pam_handle_t *, struct rad_handle *); static int do_challenge(pam_handle_t *, struct rad_handle *, - const char *, const char *, const char *); + const char *, const char *, const char *, const char *); /* * Construct an access request, but don't send it. Returns 0 on success, @@ -75,7 +75,7 @@ static int do_challenge(pam_handle_t *, static int build_access_request(struct rad_handle *radh, const char *user, const char *pass, const char *nas_id, const char *nas_ipaddr, - const void *state, size_t state_len) + const char *rhost, const void *state, size_t state_len) { int error; char host[MAXHOSTNAMELEN]; @@ -121,8 +121,13 @@ build_access_request(struct rad_handle * } } } - if (state != NULL && rad_put_attr(radh, RAD_STATE, state, - state_len) == -1) { + if (rhost != NULL && + rad_put_string(radh, RAD_CALLING_STATION_ID, rhost) == -1) { + syslog(LOG_CRIT, "rad_put_string: %s", rad_strerror(radh)); + return (-1); + } + if (state != NULL && + rad_put_attr(radh, RAD_STATE, state, state_len) == -1) { syslog(LOG_CRIT, "rad_put_attr: %s", rad_strerror(radh)); return (-1); } @@ -162,7 +167,7 @@ do_accept(pam_handle_t *pamh, struct rad static int do_challenge(pam_handle_t *pamh, struct rad_handle *radh, const char *user, - const char *nas_id, const char *nas_ipaddr) + const char *nas_id, const char *nas_ipaddr, const char *rhost) { int retval; int attrtype; @@ -230,7 +235,7 @@ do_challenge(pam_handle_t *pamh, struct conv->appdata_ptr)) != PAM_SUCCESS) return (retval); if (build_access_request(radh, user, resp[num_msgs-1].resp, nas_id, - nas_ipaddr, state, statelen) == -1) + nas_ipaddr, rhost, state, statelen) == -1) return (PAM_SERVICE_ERR); memset(resp[num_msgs-1].resp, 0, strlen(resp[num_msgs-1].resp)); free(resp[num_msgs-1].resp); @@ -246,7 +251,7 @@ pam_sm_authenticate(pam_handle_t *pamh, { struct rad_handle *radh; const char *user, *pass; - const void *tmpuser; + const void *rhost, *tmpuser; const char *conf_file, *template_user, *nas_id, *nas_ipaddr; int retval; int e; @@ -255,6 +260,7 @@ pam_sm_authenticate(pam_handle_t *pamh, template_user = openpam_get_option(pamh, PAM_OPT_TEMPLATE_USER); nas_id = openpam_get_option(pamh, PAM_OPT_NAS_ID); nas_ipaddr = openpam_get_option(pamh, PAM_OPT_NAS_IPADDR); + pam_get_item(pamh, PAM_RHOST, &rhost); retval = pam_get_user(pamh, &user, NULL); if (retval != PAM_SUCCESS) @@ -284,8 +290,8 @@ pam_sm_authenticate(pam_handle_t *pamh, PAM_LOG("Radius config file read"); - if (build_access_request(radh, user, pass, nas_id, nas_ipaddr, NULL, - 0) == -1) { + if (build_access_request(radh, user, pass, nas_id, nas_ipaddr, rhost, + NULL, 0) == -1) { rad_close(radh); return (PAM_SERVICE_ERR); } @@ -330,7 +336,7 @@ pam_sm_authenticate(pam_handle_t *pamh, case RAD_ACCESS_CHALLENGE: retval = do_challenge(pamh, radh, user, nas_id, - nas_ipaddr); + nas_ipaddr, rhost); if (retval != PAM_SUCCESS) { rad_close(radh); return (retval); From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 10:37:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A68CC6CD; Thu, 29 Jan 2015 10:37:20 +0000 (UTC) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6007C3CA; Thu, 29 Jan 2015 10:37:20 +0000 (UTC) Received: from coleburn.avinity.tv (unknown [77.243.161.229]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 06F6F5C2E; Thu, 29 Jan 2015 11:37:14 +0100 (CET) Subject: Re: svn commit: r277860 - head/usr.sbin/sa Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_D586DE3B-B393-4D5A-BE7B-54D8E718D59A"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Pgp-Agent: GPGMail 2.5b4 (05244f0+) From: Dimitry Andric In-Reply-To: <20150129082346.GC27103@funkthat.com> Date: Thu, 29 Jan 2015 11:37:10 +0100 Message-Id: <83A87E21-5D5D-4731-BF49-9310614FB238@FreeBSD.org> References: <201501282222.t0SMMoHU095511@svn.freebsd.org> <20150129082346.GC27103@funkthat.com> To: John-Mark Gurney X-Mailer: Apple Mail (2.2070.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 10:37:20 -0000 --Apple-Mail=_D586DE3B-B393-4D5A-BE7B-54D8E718D59A Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 29 Jan 2015, at 09:23, John-Mark Gurney wrote: > > Dimitry Andric wrote this message on Wed, Jan 28, 2015 at 22:22 +0000: >> Replace the VERSION_KEY define with a writable char array, so no const >> qualifier needs to be dropped anymore. > > You do realize that you should juse use __DECONST for this instead? > > This moves the data from .rodata into .data making it writable, and > also means that bad programs could end up stop working, instead of > faulting when someone tries to change the version string... I don't see the risk here, the db api does not actually modify the incoming key (the API is just badly designed). But if you think it is nicer to use __DECONST, feel free to change it. -Dimitry --Apple-Mail=_D586DE3B-B393-4D5A-BE7B-54D8E718D59A Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.26 iEYEARECAAYFAlTKDVoACgkQsF6jCi4glqMcoACfXHpsvTNYnQvm9oQApkywkEHC W5sAoKdeQ6NiskFl7vBa51ooRplMo088 =j+6C -----END PGP SIGNATURE----- --Apple-Mail=_D586DE3B-B393-4D5A-BE7B-54D8E718D59A-- From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 15:30:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE686413; Thu, 29 Jan 2015 15:30:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C9533A8F; Thu, 29 Jan 2015 15:30:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0TFU5xa077742; Thu, 29 Jan 2015 15:30:05 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0TFU5Qb077741; Thu, 29 Jan 2015 15:30:05 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501291530.t0TFU5Qb077741@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 29 Jan 2015 15:30:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277877 - head/lib/libc/mips/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 15:30:06 -0000 Author: emaste Date: Thu Jan 29 15:30:04 2015 New Revision: 277877 URL: https://svnweb.freebsd.org/changeset/base/277877 Log: Use zero register instead of immediate 0x0 in MIPS assembly It seems GAS makes the substitution automatically, but Clang's integrated assembler does not (yet). It fails with "invalid operand for instruction." Reported by: sbruno Modified: head/lib/libc/mips/gen/sigsetjmp.S Modified: head/lib/libc/mips/gen/sigsetjmp.S ============================================================================== --- head/lib/libc/mips/gen/sigsetjmp.S Thu Jan 29 14:23:31 2015 (r277876) +++ head/lib/libc/mips/gen/sigsetjmp.S Thu Jan 29 15:30:04 2015 (r277877) @@ -61,7 +61,7 @@ __FBSDID("$FreeBSD$"); LEAF(sigsetjmp) PIC_PROLOGUE(sigsetjmp) - bne a1, 0x0, 1f # do saving of signal mask? + bne a1, zero, 1f # do saving of signal mask? PIC_TAILCALL(_setjmp) 1: PIC_TAILCALL(setjmp) From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 15:33:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 421925BA; Thu, 29 Jan 2015 15:33:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2EA2CB40; Thu, 29 Jan 2015 15:33:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0TFX6bM081563; Thu, 29 Jan 2015 15:33:06 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0TFX6Gp081562; Thu, 29 Jan 2015 15:33:06 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501291533.t0TFX6Gp081562@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 29 Jan 2015 15:33:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277878 - head/contrib/amd/hlfsd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 15:33:06 -0000 Author: pfg Date: Thu Jan 29 15:33:05 2015 New Revision: 277878 URL: https://svnweb.freebsd.org/changeset/base/277878 Log: Revert r277841: It will be re-merged through the vendor area. Modified: head/contrib/amd/hlfsd/homedir.c Modified: head/contrib/amd/hlfsd/homedir.c ============================================================================== --- head/contrib/amd/hlfsd/homedir.c Thu Jan 29 15:30:04 2015 (r277877) +++ head/contrib/amd/hlfsd/homedir.c Thu Jan 29 15:33:05 2015 (r277878) @@ -494,7 +494,7 @@ readent: buf[0] = '\0'; fgets(buf, 256, passwd_fp); passwd_line++; - if (buf[0] == '\0') + if (!buf || buf[0] == '\0') goto readent; /* read user name */ From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 15:35:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F81B801; Thu, 29 Jan 2015 15:35:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6ADC4B6C; Thu, 29 Jan 2015 15:35:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0TFZv7O082133; Thu, 29 Jan 2015 15:35:57 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0TFZuiS082126; Thu, 29 Jan 2015 15:35:56 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501291535.t0TFZuiS082126@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 29 Jan 2015 15:35:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277879 - in head/contrib/amd: amd hlfsd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 15:35:57 -0000 Author: pfg Date: Thu Jan 29 15:35:55 2015 New Revision: 277879 URL: https://svnweb.freebsd.org/changeset/base/277879 Log: MFV r277870 Fix compile warnings for gcc-4.4.x This also fixes at least a warning with clang 3.6.0 including the fix for r277841. MFC after: 1 week Modified: head/contrib/amd/amd/amfs_program.c head/contrib/amd/amd/readdir.c head/contrib/amd/hlfsd/homedir.c head/contrib/amd/hlfsd/stubs.c Directory Properties: head/contrib/amd/ (props changed) Modified: head/contrib/amd/amd/amfs_program.c ============================================================================== --- head/contrib/amd/amd/amfs_program.c Thu Jan 29 15:33:05 2015 (r277878) +++ head/contrib/amd/amd/amfs_program.c Thu Jan 29 15:35:55 2015 (r277879) @@ -147,10 +147,12 @@ amfs_program_exec(char *info) (void) fclose(stdout); if (!logfp) logfp = stderr; /* initialize before possible first use */ - (void) dup(fileno(logfp)); + if (dup(fileno(logfp)) == -1) + return errno; if (fileno(logfp) != fileno(stderr)) { (void) fclose(stderr); - (void) dup(fileno(logfp)); + if (dup(fileno(logfp)) == -1) + return errno; } /* Modified: head/contrib/amd/amd/readdir.c ============================================================================== --- head/contrib/amd/amd/readdir.c Thu Jan 29 15:33:05 2015 (r277878) +++ head/contrib/amd/amd/readdir.c Thu Jan 29 15:35:55 2015 (r277879) @@ -63,6 +63,7 @@ static int key_already_in_chain(char *ke static nfsentry *make_entry_chain(am_node *mp, const nfsentry *current_chain, int fully_browsable); static int amfs_readdir_browsable(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep, u_int count, int fully_browsable); +static const u_int dotdotcookie = DOT_DOT_COOKIE; /**************************************************************************** *** FUNCTIONS *** @@ -178,8 +179,9 @@ make_entry_chain(am_node *mp, const nfse /* we have space. put entry in next cell */ ++last_cookie; - chain[num_entries].ne_fileid = (u_int) last_cookie; - *(u_int *) chain[num_entries].ne_cookie = (u_int) last_cookie; + chain[num_entries].ne_fileid = last_cookie; + (void)memcpy(chain[num_entries].ne_cookie, &last_cookie, + sizeof(last_cookie)); chain[num_entries].ne_name = key; if (num_entries < max_entries - 1) { /* link to next one */ chain[num_entries].ne_nextentry = &chain[num_entries + 1]; @@ -253,7 +255,7 @@ amfs_readdir_browsable(am_node *mp, nfsc ep[0].ne_fileid = mp->am_gen; ep[0].ne_name = "."; ep[0].ne_nextentry = &ep[1]; - *(u_int *) ep[0].ne_cookie = 0; + (void)memset(ep[0].ne_cookie, 0, sizeof(u_int)); /* construct ".." */ if (mp->am_parent) @@ -300,9 +302,12 @@ amfs_readdir_browsable(am_node *mp, nfsc nfsentry *ne; for (j = 0, ne = te; ne; ne = ne->ne_nextentry) plog(XLOG_DEBUG, "gen2 key %4d \"%s\"", j++, ne->ne_name); - for (j = 0, ne = ep; ne; ne = ne->ne_nextentry) + for (j = 0, ne = ep; ne; ne = ne->ne_nextentry) { + u_int cookie; + (void)memcpy(&cookie, ne->ne_cookie, sizeof(cookie)); plog(XLOG_DEBUG, "gen2+ key %4d \"%s\" fi=%d ck=%d", - j++, ne->ne_name, ne->ne_fileid, *(u_int *)ne->ne_cookie); + j++, ne->ne_name, ne->ne_fileid, cookie); + } plog(XLOG_DEBUG, "EOF is %d", dp->dl_eof); } return 0; @@ -412,7 +417,7 @@ amfs_generic_readdir(am_node *mp, nfscoo ep[0].ne_fileid = mp->am_gen; ep[0].ne_name = "."; ep[0].ne_nextentry = &ep[1]; - *(u_int *) ep[0].ne_cookie = 0; + (void)memset(ep[0].ne_cookie, 0, sizeof(u_int)); /* construct ".." */ if (mp->am_parent) @@ -429,9 +434,12 @@ amfs_generic_readdir(am_node *mp, nfscoo if (amuDebug(D_READDIR)) { nfsentry *ne; int j; - for (j = 0, ne = ep; ne; ne = ne->ne_nextentry) + for (j = 0, ne = ep; ne; ne = ne->ne_nextentry) { + u_int cookie; + (void)memcpy(&cookie, ne->ne_cookie, sizeof(cookie)); plog(XLOG_DEBUG, "gen1 key %4d \"%s\" fi=%d ck=%d", - j++, ne->ne_name, ne->ne_fileid, *(u_int *)ne->ne_cookie); + j++, ne->ne_name, ne->ne_fileid, cookie); + } } return 0; } @@ -460,9 +468,9 @@ amfs_generic_readdir(am_node *mp, nfscoo am_node *xp_next = next_nonerror_node(xp->am_osib); if (xp_next) { - *(u_int *) ep->ne_cookie = xp_next->am_gen; + (void)memcpy(ep->ne_cookie, &xp_next->am_gen, sizeof(xp_next->am_gen)); } else { - *(u_int *) ep->ne_cookie = DOT_DOT_COOKIE; + (void)memcpy(ep->ne_cookie, &dotdotcookie, sizeof(dotdotcookie)); dp->dl_eof = TRUE; } @@ -488,9 +496,12 @@ amfs_generic_readdir(am_node *mp, nfscoo if (amuDebug(D_READDIR)) { nfsentry *ne; int j; - for (j=0,ne=ep; ne; ne=ne->ne_nextentry) + for (j=0,ne=ep; ne; ne=ne->ne_nextentry) { + u_int cookie; + (void)memcpy(&cookie, ne->ne_cookie, sizeof(cookie)); plog(XLOG_DEBUG, "gen2 key %4d \"%s\" fi=%d ck=%d", - j++, ne->ne_name, ne->ne_fileid, *(u_int *)ne->ne_cookie); + j++, ne->ne_name, ne->ne_fileid, cookie); + } } return 0; } Modified: head/contrib/amd/hlfsd/homedir.c ============================================================================== --- head/contrib/amd/hlfsd/homedir.c Thu Jan 29 15:33:05 2015 (r277878) +++ head/contrib/amd/hlfsd/homedir.c Thu Jan 29 15:35:55 2015 (r277879) @@ -492,9 +492,10 @@ readent: /* read records */ buf[0] = '\0'; - fgets(buf, 256, passwd_fp); + if (fgets(buf, 256, passwd_fp) == NULL) + return NULL; passwd_line++; - if (!buf || buf[0] == '\0') + if (buf[0] == '\0') goto readent; /* read user name */ Modified: head/contrib/amd/hlfsd/stubs.c ============================================================================== --- head/contrib/amd/hlfsd/stubs.c Thu Jan 29 15:33:05 2015 (r277878) +++ head/contrib/amd/hlfsd/stubs.c Thu Jan 29 15:35:55 2015 (r277879) @@ -164,8 +164,7 @@ nfsproc_getattr_2_svc(am_nfs_fh *argp, s if (gid != hlfs_gid) { res.ns_status = NFSERR_STALE; } else { - memset((char *) &uid, 0, sizeof(int)); - uid = *(u_int *) argp->fh_data; + (void)memcpy(&uid, argp->fh_data, sizeof(uid)); if (plt_search(uid) != (uid2home_t *) NULL) { res.ns_status = NFS_OK; un_fattr.na_fileid = uid; @@ -282,8 +281,8 @@ nfsproc_lookup_2_svc(nfsdiropargs *argp, } else { /* entry found and gid is permitted */ un_fattr.na_fileid = untab[idx].uid; res.dr_u.dr_drok_u.drok_attributes = un_fattr; - memset((char *) &un_fhandle, 0, sizeof(am_nfs_fh)); - *(u_int *) un_fhandle.fh_data = (u_int) untab[idx].uid; + memset(&un_fhandle, 0, sizeof(un_fhandle)); + memcpy(un_fhandle.fh_data, &untab[idx].uid, sizeof(untab[idx].uid)); xstrlcpy((char *) &un_fhandle.fh_data[sizeof(int)], untab[idx].username, sizeof(am_nfs_fh) - sizeof(int)); @@ -338,8 +337,7 @@ nfsproc_readlink_2_svc(am_nfs_fh *argp, } if (groupid == hlfs_gid) { - memset((char *) &userid, 0, sizeof(int)); - userid = *(u_int *) argp->fh_data; + memcpy(&userid, argp->fh_data, sizeof(userid)); username = (char *) &argp->fh_data[sizeof(int)]; if (!(res.rlr_u.rlr_data_u = mailbox(userid, username))) return (nfsreadlinkres *) NULL; From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 15:43:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1590AC81; Thu, 29 Jan 2015 15:43:56 +0000 (UTC) Received: from mail-qg0-x229.google.com (mail-qg0-x229.google.com [IPv6:2607:f8b0:400d:c04::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C1E44C81; Thu, 29 Jan 2015 15:43:55 +0000 (UTC) Received: by mail-qg0-f41.google.com with SMTP id q108so29770401qgd.0; Thu, 29 Jan 2015 07:43:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=8FHtEdITFtts/2OA37JUrjXUPg22K75thaghoLDX0Bs=; b=OqWpCxZc/ANEIObvzaj1iNf3ZwZt8AxXcW3owuzjYVkFEtE0tZGcapZm9gl6Pv/hOq 1UTyNP5BamgMsG6Kqfo92Ikk+PI7CO+d9XRlg0LC2wr8Vjyd9L49OsjRXVHFD/qGubHG Nw8gcagFAd3gtPJRWaB1IF5uEpLmEi+gyAjLGytchqHP5EylmcLmEDEL7TInWERbqfO+ HwDknLqLDXtGpmRqXBO4SNY05IH967dReTznqWAorkB3KOveuA1ZS+mXbG0azMxu9vHN Q83LHWm2LNbXdnHQKlUegrHUUrBsRuY04w7XLvhkv2iEkZxj+jBVA2jAOKFw8kPufSRf YGlw== X-Received: by 10.140.81.208 with SMTP id f74mr2202099qgd.94.1422546234835; Thu, 29 Jan 2015 07:43:54 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.140.39.209 with HTTP; Thu, 29 Jan 2015 07:43:34 -0800 (PST) In-Reply-To: <201501291533.t0TFX6Gp081562@svn.freebsd.org> References: <201501291533.t0TFX6Gp081562@svn.freebsd.org> From: Ed Maste Date: Thu, 29 Jan 2015 10:43:34 -0500 X-Google-Sender-Auth: YjXQg8yyJo5gILb34-5IPt1xVMk Message-ID: Subject: Re: svn commit: r277878 - head/contrib/amd/hlfsd To: "Pedro F. Giffuni" Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 15:43:56 -0000 On 29 January 2015 at 10:33, Pedro F. Giffuni wrote: > Author: pfg > Date: Thu Jan 29 15:33:05 2015 > New Revision: 277878 > URL: https://svnweb.freebsd.org/changeset/base/277878 > > Log: > Revert r277841: It will be re-merged through the vendor area. Reverting this sort of change shouldn't be necessary, where the change is trivial and identical to the one on the vendor branch. The net result would be the same after the merge from the vendor branch is done. From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 15:59:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 201077C0 for ; Thu, 29 Jan 2015 15:59:38 +0000 (UTC) Received: from nm8-vm0.bullet.mail.bf1.yahoo.com (nm8-vm0.bullet.mail.bf1.yahoo.com [98.139.213.95]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C83B3E80 for ; Thu, 29 Jan 2015 15:59:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1422547170; bh=zVlozunhUUabrf4I9++9ChfP5hMFGdqSILFjFA1uIuM=; h=Date:From:To:CC:Subject:References:In-Reply-To:From:Subject; b=MYwE6nCpH3KkijnuRqO5f/H2v3ZKsTb2DpqgQ2Kh9PDLXw0M0pF8nV6Ny1+MDKMZP+WMGe8sy1Zfkwy/Bu7rCxJqhnRCYh7A8RBrvm4EvNAzUwhmC4IPOFIyiVLKi+4Xyfw+Qm0AJ5WfLG5ZA8K8xtbk9lY16vTjpcH5Tfm7E0u/AAyL1Z7R1EZzR/mBtGgNS2rVqlWwqf8VqRFxrqy1+JomZLEzBuEY0sflCNKj6UL2aaTlVDnsLnn2pciUFuvTYcfcec+cRsnvtyV6r61ZW6cxaVYfaSkmRhQwnITQ30MMYUNnhFmGQb7wi+3bYl3E6bHjx2fXe1LbNtowpR0T7w== Received: from [66.196.81.174] by nm8.bullet.mail.bf1.yahoo.com with NNFMP; 29 Jan 2015 15:59:30 -0000 Received: from [98.139.211.195] by tm20.bullet.mail.bf1.yahoo.com with NNFMP; 29 Jan 2015 15:58:30 -0000 Received: from [127.0.0.1] by smtp204.mail.bf1.yahoo.com with NNFMP; 29 Jan 2015 15:58:30 -0000 X-Yahoo-Newman-Id: 513167.58240.bm@smtp204.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: 3dt5.WAVM1kPV7zYuCaN3650Yttb3aaFEcIRkW_heTB6dHu .PGotpONmi5BW1JfkWtyZX4HjRAQad02JneTJdk3fMPILxgjid9y604grW6k N5wOHzxglQ9qsdGRWb_X30E5rnlVu2UFz7OlpQSw8a2Tq2u2ZlB8EY4.GgU4 2AT4cyJ8J5dfoqbP7SuougNnuuaTTMM3dFFeVcz3UTALfIGeYzOY6ksw9qQo K7WyU66FCASF19JvfdnfgQS1vQ5sIoCk345YLMqQrNuWfymInJjO35sh4nSQ DPT61JlNrIbgbzCkcbaXsJVplcoZK4o7kGqB9cVco7QNeNLYr99BVGvMRqgw UB0VVI17QOMlq6h9tml1ZSfLtH2TiPORRqulbBzvOeVMbrtMnhLHEraRiyE. JHKt66Zx2ZEtjJ7RZKFuD6.rjm8RvgRyM40TnVdNRGU7LF4RLfMJdUTGY4BZ gk3c9j9kpZHuzLF6hM5MBvJhuIYHpbZ9yVVRRlyy5IuML58dvvJpfijuuyO2 xLHlg95yfJcn_e6NAF0VVSxNsAfgrpe1Q X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <54CA58BD.4090701@FreeBSD.org> Date: Thu, 29 Jan 2015 10:58:53 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Ed Maste Subject: Re: svn commit: r277878 - head/contrib/amd/hlfsd References: <201501291533.t0TFX6Gp081562@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 15:59:38 -0000 On 01/29/15 10:43, Ed Maste wrote: > On 29 January 2015 at 10:33, Pedro F. Giffuni wrote: >> Author: pfg >> Date: Thu Jan 29 15:33:05 2015 >> New Revision: 277878 >> URL: https://svnweb.freebsd.org/changeset/base/277878 >> >> Log: >> Revert r277841: It will be re-merged through the vendor area. > Reverting this sort of change shouldn't be necessary, where the change > is trivial and identical to the one on the vendor branch. The net > result would be the same after the merge from the vendor branch is > done. The upstream version**** touches a couple more files and I will also want to merge it to stable to fix the warnings with modern gcc. Pedro. From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 16:16:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 065BCF44; Thu, 29 Jan 2015 16:16:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD4EC117; Thu, 29 Jan 2015 16:16:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0TGGKd4001522; Thu, 29 Jan 2015 16:16:20 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0TGGK8m001521; Thu, 29 Jan 2015 16:16:20 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201501291616.t0TGGK8m001521@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 29 Jan 2015 16:16:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r277880 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 16:16:21 -0000 Author: mav Date: Thu Jan 29 16:16:20 2015 New Revision: 277880 URL: https://svnweb.freebsd.org/changeset/base/277880 Log: MFC r276983: When aggregating TRIM segments, move the new one to the end. New segment at the list head may block all TRIM requests until txg of that segment can be processed. On my random I/O tests this change reduce peak TRIM list length from 650 to 450 segments. Hopefully it should reduce TRIM burstiness when list processing is unblocked. Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Thu Jan 29 15:35:55 2015 (r277879) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Thu Jan 29 16:16:20 2015 (r277880) @@ -255,17 +255,23 @@ trim_map_segment_add(trim_map_t *tm, uin ts_after->ts_start = ts_before->ts_start; ts_after->ts_txg = txg; ts_after->ts_time = time; + list_remove(&tm->tm_head, ts_after); + list_insert_tail(&tm->tm_head, ts_after); kmem_free(ts_before, sizeof (*ts_before)); } else if (merge_before) { TRIM_MAP_SINC(tm, end - ts_before->ts_end); ts_before->ts_end = end; ts_before->ts_txg = txg; ts_before->ts_time = time; + list_remove(&tm->tm_head, ts_before); + list_insert_tail(&tm->tm_head, ts_before); } else if (merge_after) { TRIM_MAP_SINC(tm, ts_after->ts_start - start); ts_after->ts_start = start; ts_after->ts_txg = txg; ts_after->ts_time = time; + list_remove(&tm->tm_head, ts_after); + list_insert_tail(&tm->tm_head, ts_after); } else { TRIM_MAP_SINC(tm, end - start); TRIM_MAP_QINC(tm); From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 16:19:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 743F5143; Thu, 29 Jan 2015 16:19:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F566160; Thu, 29 Jan 2015 16:19:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0TGJ6bN001950; Thu, 29 Jan 2015 16:19:06 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0TGJ6gd001949; Thu, 29 Jan 2015 16:19:06 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201501291619.t0TGJ6gd001949@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 29 Jan 2015 16:19:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r277881 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 16:19:06 -0000 Author: mav Date: Thu Jan 29 16:19:05 2015 New Revision: 277881 URL: https://svnweb.freebsd.org/changeset/base/277881 Log: MFC r277185: Fix overflow bug from r248577, turning 30s TRIM timeout into ~4s. Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Thu Jan 29 16:16:20 2015 (r277880) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Thu Jan 29 16:19:05 2015 (r277881) @@ -463,7 +463,7 @@ trim_map_vdev_commit(spa_t *spa, zio_t * if (tm == NULL) return; - timelimit = gethrtime() - trim_timeout * NANOSEC; + timelimit = gethrtime() - (hrtime_t)trim_timeout * NANOSEC; if (vd->vdev_isl2cache) { txgsafe = UINT64_MAX; txgtarget = UINT64_MAX; From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 16:35:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BEFFA7D9; Thu, 29 Jan 2015 16:35:14 +0000 (UTC) Received: from mail-qg0-x22b.google.com (mail-qg0-x22b.google.com [IPv6:2607:f8b0:400d:c04::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 740E6384; Thu, 29 Jan 2015 16:35:14 +0000 (UTC) Received: by mail-qg0-f43.google.com with SMTP id e89so30544035qgf.2; Thu, 29 Jan 2015 08:35:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=amZ11IUqxmucBIapIgqLqc454FrioQC0C7gNsSaLgUc=; b=Dpq08i+onD2DdSH/6W66ud/2oar7nrsCEd6U6WxpOKjvAAk8baYfyHv4xGcEiCgAFO vyE5rC1ObgXriAheTkk/b7lippdmeUZNPZm0LOxzPGZb6shaHH8kvifOaum0AVb3O6Nr s6cUcQyae5bHCC932frKweRLFjLD2DusGNm0UThzEa1z4RVaYras81cIhAKzXwQ5d1BH xHhWShdXSDNA+jH/6PHS4IrptcU7hSJss1ObeILhJUZ+/JwnNq1XzupSydDM8DR3CYbu Y1DqbA1fo9FiJYttU6biipcWdbk5ouSgWfSz8WWlNHMkiR+Dp+LsQrNe+IqNS/43/6jM hXMw== X-Received: by 10.140.83.163 with SMTP id j32mr2692629qgd.52.1422549313458; Thu, 29 Jan 2015 08:35:13 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.140.39.209 with HTTP; Thu, 29 Jan 2015 08:34:53 -0800 (PST) In-Reply-To: <54CA58BD.4090701@FreeBSD.org> References: <201501291533.t0TFX6Gp081562@svn.freebsd.org> <54CA58BD.4090701@FreeBSD.org> From: Ed Maste Date: Thu, 29 Jan 2015 11:34:53 -0500 X-Google-Sender-Auth: ul8sDkxRznJ2Pxsx_8w9WIRfHaA Message-ID: Subject: Re: svn commit: r277878 - head/contrib/amd/hlfsd To: Pedro Giffuni Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 16:35:14 -0000 On 29 January 2015 at 10:58, Pedro Giffuni wrote: > >> Reverting this sort of change shouldn't be necessary, where the change >> is trivial and identical to the one on the vendor branch. The net >> result would be the same after the merge from the vendor branch is >> done. > > The upstream version touches a couple more files and I will also > want to merge it to stable to fix the warnings with modern gcc. Ok. Everything would still work fine either way (although you'd have to specify both the original r277841 and the vendor merge for the MFC). I'm not really concerned with the revert + merge from vendor, it's just that avoiding it makes for slightly cleaner history. Also, if someone tries a search for eligible MFC revisions I think r277841+r277878 will show up. From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 17:37:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D3BC779F; Thu, 29 Jan 2015 17:37:01 +0000 (UTC) Received: from mail-lb0-x229.google.com (mail-lb0-x229.google.com [IPv6:2a00:1450:4010:c04::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5E506C59; Thu, 29 Jan 2015 17:37:01 +0000 (UTC) Received: by mail-lb0-f169.google.com with SMTP id f15so30729830lbj.0; Thu, 29 Jan 2015 09:36:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=d5/+dQr2L49FT53pHN5sETTh0lnfanX+DEJe0RuH3TA=; b=uVlhS1cvfdHx6bNCue+oOsrXDKywp/KZdozgMLL8J2lPrfCfy3Q9WcogGo8e5EyT7i CNxbLNN6n0+G+bQtENlMjkadI+lXtBQEn0jIGAt2pXMXO95dgQpayNdtS/rvNT7Y4eYq OleYfZthrb51QXHDYxtP+SYH7jtxKz9NVMeKmSRWNIwkK6+Tl7a5EP9XXvpETpe2WljU JSD5rtE3N6LNDGPPWY7mZFNF7q+epqGWejC3tNff7bhY4k0XAn0pZ+02fJljIcTqoMZT Teu0Pt1mvNAJwUqXvtOZvmD9Uk651FF14Kmafx60cXJCfdtvhqBSVekq15VACN3rBLvb ZwNw== MIME-Version: 1.0 X-Received: by 10.112.61.228 with SMTP id t4mr2409287lbr.0.1422553018658; Thu, 29 Jan 2015 09:36:58 -0800 (PST) Sender: davide.italiano@gmail.com Received: by 10.25.155.4 with HTTP; Thu, 29 Jan 2015 09:36:58 -0800 (PST) In-Reply-To: <201501291530.t0TFU5Qb077741@svn.freebsd.org> References: <201501291530.t0TFU5Qb077741@svn.freebsd.org> Date: Thu, 29 Jan 2015 09:36:58 -0800 X-Google-Sender-Auth: vl6w9igQ3ATjLfMqNIMXwnzlI_s Message-ID: Subject: Re: svn commit: r277877 - head/lib/libc/mips/gen From: Davide Italiano To: Ed Maste Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 17:37:01 -0000 On Thu, Jan 29, 2015 at 7:30 AM, Ed Maste wrote: > Author: emaste > Date: Thu Jan 29 15:30:04 2015 > New Revision: 277877 > URL: https://svnweb.freebsd.org/changeset/base/277877 > > Log: > Use zero register instead of immediate 0x0 in MIPS assembly > > It seems GAS makes the substitution automatically, but Clang's > integrated assembler does not (yet). It fails with "invalid operand for > instruction." > > Reported by: sbruno > > Modified: > head/lib/libc/mips/gen/sigsetjmp.S > > Modified: head/lib/libc/mips/gen/sigsetjmp.S > ============================================================================== > --- head/lib/libc/mips/gen/sigsetjmp.S Thu Jan 29 14:23:31 2015 (r277876) > +++ head/lib/libc/mips/gen/sigsetjmp.S Thu Jan 29 15:30:04 2015 (r277877) > @@ -61,7 +61,7 @@ __FBSDID("$FreeBSD$"); > LEAF(sigsetjmp) > PIC_PROLOGUE(sigsetjmp) > > - bne a1, 0x0, 1f # do saving of signal mask? > + bne a1, zero, 1f # do saving of signal mask? > PIC_TAILCALL(_setjmp) > > 1: PIC_TAILCALL(setjmp) > Ed, did you open a bug for this on LLVM bugzilla? If yes, can you please link it here, for the records? -- Davide "There are no solved problems; there are only problems that are more or less solved" -- Henri Poincare From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 18:08:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E8B47FC5; Thu, 29 Jan 2015 18:08:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB292F5C; Thu, 29 Jan 2015 18:08:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0TI8p1D053588; Thu, 29 Jan 2015 18:08:51 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0TI8pNX053584; Thu, 29 Jan 2015 18:08:51 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201501291808.t0TI8pNX053584@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Thu, 29 Jan 2015 18:08:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277882 - in head/sys/arm: xilinx xscale/ixp425 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 18:08:52 -0000 Author: loos Date: Thu Jan 29 18:08:50 2015 New Revision: 277882 URL: https://svnweb.freebsd.org/changeset/base/277882 Log: Rename the avila, cambria and zynq GPIO driver names to match the expected string. With this change it is not necessary redeclare the driver relations with gpiobus and gpioc. This also prevents redundant declarations when gpiobusvar.h is included (which is going to happen soon). Modified: head/sys/arm/xilinx/zy7_gpio.c head/sys/arm/xscale/ixp425/avila_gpio.c head/sys/arm/xscale/ixp425/cambria_gpio.c Modified: head/sys/arm/xilinx/zy7_gpio.c ============================================================================== --- head/sys/arm/xilinx/zy7_gpio.c Thu Jan 29 16:19:05 2015 (r277881) +++ head/sys/arm/xilinx/zy7_gpio.c Thu Jan 29 18:08:50 2015 (r277882) @@ -373,16 +373,11 @@ static device_method_t zy7_gpio_methods[ }; static driver_t zy7_gpio_driver = { - "zy7_gpio", + "gpio", zy7_gpio_methods, sizeof(struct zy7_gpio_softc), }; static devclass_t zy7_gpio_devclass; -extern devclass_t gpiobus_devclass, gpioc_devclass; -extern driver_t gpiobus_driver, gpioc_driver; - DRIVER_MODULE(zy7_gpio, simplebus, zy7_gpio_driver, zy7_gpio_devclass, \ NULL, NULL); -DRIVER_MODULE(gpiobus, zy7_gpio, gpiobus_driver, gpiobus_devclass, 0, 0); -DRIVER_MODULE(gpioc, zy7_gpio, gpioc_driver, gpioc_devclass, 0, 0); Modified: head/sys/arm/xscale/ixp425/avila_gpio.c ============================================================================== --- head/sys/arm/xscale/ixp425/avila_gpio.c Thu Jan 29 16:19:05 2015 (r277881) +++ head/sys/arm/xscale/ixp425/avila_gpio.c Thu Jan 29 18:08:50 2015 (r277882) @@ -344,15 +344,11 @@ static device_method_t gpio_avila_method }; static driver_t gpio_avila_driver = { - "gpio_avila", + "gpio", gpio_avila_methods, sizeof(struct avila_gpio_softc), }; static devclass_t gpio_avila_devclass; -extern devclass_t gpiobus_devclass, gpioc_devclass; -extern driver_t gpiobus_driver, gpioc_driver; DRIVER_MODULE(gpio_avila, ixp, gpio_avila_driver, gpio_avila_devclass, 0, 0); -DRIVER_MODULE(gpiobus, gpio_avila, gpiobus_driver, gpiobus_devclass, 0, 0); -DRIVER_MODULE(gpioc, gpio_avila, gpioc_driver, gpioc_devclass, 0, 0); MODULE_VERSION(gpio_avila, 1); Modified: head/sys/arm/xscale/ixp425/cambria_gpio.c ============================================================================== --- head/sys/arm/xscale/ixp425/cambria_gpio.c Thu Jan 29 16:19:05 2015 (r277881) +++ head/sys/arm/xscale/ixp425/cambria_gpio.c Thu Jan 29 18:08:50 2015 (r277882) @@ -476,16 +476,12 @@ static device_method_t cambria_gpio_meth }; static driver_t cambria_gpio_driver = { - "gpio_cambria", + "gpio", cambria_gpio_methods, sizeof(struct cambria_gpio_softc), }; static devclass_t cambria_gpio_devclass; -extern devclass_t gpiobus_devclass, gpioc_devclass; -extern driver_t gpiobus_driver, gpioc_driver; DRIVER_MODULE(gpio_cambria, iicbus, cambria_gpio_driver, cambria_gpio_devclass, 0, 0); -DRIVER_MODULE(gpiobus, gpio_cambria, gpiobus_driver, gpiobus_devclass, 0, 0); -DRIVER_MODULE(gpioc, gpio_cambria, gpioc_driver, gpioc_devclass, 0, 0); MODULE_VERSION(gpio_cambria, 1); MODULE_DEPEND(gpio_cambria, iicbus, 1, 1, 1); From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 18:44:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 37B93A7F; Thu, 29 Jan 2015 18:44:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 249F560B; Thu, 29 Jan 2015 18:44:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0TIiMv0071981; Thu, 29 Jan 2015 18:44:22 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0TIiMkK071980; Thu, 29 Jan 2015 18:44:22 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501291844.t0TIiMkK071980@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 29 Jan 2015 18:44:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277883 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 18:44:22 -0000 Author: dim Date: Thu Jan 29 18:44:21 2015 New Revision: 277883 URL: https://svnweb.freebsd.org/changeset/base/277883 Log: Ensure that lint does not pick up C11 keywords (e.g. _Noreturn), even if C11 mode is used. It does not support any C11 constructs. MFC after: 3 days Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Thu Jan 29 18:08:50 2015 (r277882) +++ head/sys/sys/cdefs.h Thu Jan 29 18:44:21 2015 (r277883) @@ -252,7 +252,7 @@ * Keywords added in C11. */ -#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L +#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L || defined(lint) #if !__has_extension(c_alignas) #if (defined(__cplusplus) && __cplusplus >= 201103L) || \ From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 18:50:26 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A0C8DD40; Thu, 29 Jan 2015 18:50:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74754668; Thu, 29 Jan 2015 18:50:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0TIoQtj073652; Thu, 29 Jan 2015 18:50:26 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0TIoPda073432; Thu, 29 Jan 2015 18:50:25 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201501291850.t0TIoPda073432@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 29 Jan 2015 18:50:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277884 - head/sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 18:50:26 -0000 Author: arybchik Date: Thu Jan 29 18:50:25 2015 New Revision: 277884 URL: https://svnweb.freebsd.org/changeset/base/277884 Log: sfxge: Change sfxge_ev_qpoll() proto to avoid EVQ pointers array access It was the only place on data path where sc->evq array is accessed. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: head/sys/dev/sfxge/sfxge.h head/sys/dev/sfxge/sfxge_ev.c head/sys/dev/sfxge/sfxge_intr.c Modified: head/sys/dev/sfxge/sfxge.h ============================================================================== --- head/sys/dev/sfxge/sfxge.h Thu Jan 29 18:44:21 2015 (r277883) +++ head/sys/dev/sfxge/sfxge.h Thu Jan 29 18:50:25 2015 (r277884) @@ -281,7 +281,7 @@ extern int sfxge_ev_init(struct sfxge_so extern void sfxge_ev_fini(struct sfxge_softc *sc); extern int sfxge_ev_start(struct sfxge_softc *sc); extern void sfxge_ev_stop(struct sfxge_softc *sc); -extern int sfxge_ev_qpoll(struct sfxge_softc *sc, unsigned int index); +extern int sfxge_ev_qpoll(struct sfxge_evq *evq); /* * From sfxge_intr.c. Modified: head/sys/dev/sfxge/sfxge_ev.c ============================================================================== --- head/sys/dev/sfxge/sfxge_ev.c Thu Jan 29 18:44:21 2015 (r277883) +++ head/sys/dev/sfxge/sfxge_ev.c Thu Jan 29 18:50:25 2015 (r277884) @@ -569,13 +569,10 @@ static const efx_ev_callbacks_t sfxge_ev int -sfxge_ev_qpoll(struct sfxge_softc *sc, unsigned int index) +sfxge_ev_qpoll(struct sfxge_evq *evq) { - struct sfxge_evq *evq; int rc; - evq = sc->evq[index]; - mtx_lock(&evq->lock); if (evq->init_state != SFXGE_EVQ_STARTING && Modified: head/sys/dev/sfxge/sfxge_intr.c ============================================================================== --- head/sys/dev/sfxge/sfxge_intr.c Thu Jan 29 18:44:21 2015 (r277883) +++ head/sys/dev/sfxge/sfxge_intr.c Thu Jan 29 18:50:25 2015 (r277884) @@ -110,9 +110,8 @@ static void sfxge_intr_line(void *arg) { struct sfxge_evq *evq = arg; - struct sfxge_softc *sc = evq->sc; - (void)sfxge_ev_qpoll(sc, 0); + (void)sfxge_ev_qpoll(evq); } static void @@ -146,7 +145,7 @@ sfxge_intr_message(void *arg) return; } - (void)sfxge_ev_qpoll(sc, index); + (void)sfxge_ev_qpoll(evq); } static int From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 18:52:34 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C9D0EAD; Thu, 29 Jan 2015 18:52:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38ED7773; Thu, 29 Jan 2015 18:52:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0TIqYsh076650; Thu, 29 Jan 2015 18:52:34 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0TIqYTO076649; Thu, 29 Jan 2015 18:52:34 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201501291852.t0TIqYTO076649@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 29 Jan 2015 18:52:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277885 - head/sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 18:52:34 -0000 Author: arybchik Date: Thu Jan 29 18:52:33 2015 New Revision: 277885 URL: https://svnweb.freebsd.org/changeset/base/277885 Log: sfxge: Move txq->next pointer to part writable on completion path In fact the pointer is used only if more than one TXQ is processed in one interrupt. It is used (read-write) on completion path only. Also it makes the first part of the structure smaller and it fits now into one 128byte cache line. So, TXQ structure becomes 128 bytes smaller. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: head/sys/dev/sfxge/sfxge_tx.h Modified: head/sys/dev/sfxge/sfxge_tx.h ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.h Thu Jan 29 18:50:25 2015 (r277884) +++ head/sys/dev/sfxge/sfxge_tx.h Thu Jan 29 18:52:33 2015 (r277885) @@ -139,7 +139,6 @@ struct sfxge_txq { bus_dma_tag_t packet_dma_tag; efx_buffer_t *pend_desc; efx_txq_t *common; - struct sfxge_txq *next; efsys_mem_t *tsoh_buffer; @@ -173,6 +172,7 @@ struct sfxge_txq { */ unsigned int pending __aligned(CACHE_LINE_SIZE); unsigned int completed; + struct sfxge_txq *next; }; extern int sfxge_tx_packet_add(struct sfxge_txq *, struct mbuf *); From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 18:54:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 23A0D17D; Thu, 29 Jan 2015 18:54:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0FC84798; Thu, 29 Jan 2015 18:54:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0TIsiCu076932; Thu, 29 Jan 2015 18:54:44 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0TIsinA076928; Thu, 29 Jan 2015 18:54:44 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201501291854.t0TIsinA076928@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 29 Jan 2015 18:54:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277886 - in head/sys/dev/sfxge: . common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 18:54:45 -0000 Author: arybchik Date: Thu Jan 29 18:54:43 2015 New Revision: 277886 URL: https://svnweb.freebsd.org/changeset/base/277886 Log: sfxge: Make it possible to build without EVQ statistics Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: head/sys/dev/sfxge/common/efx_ev.c head/sys/dev/sfxge/common/efx_tx.c head/sys/dev/sfxge/sfxge.h head/sys/dev/sfxge/sfxge_ev.c Modified: head/sys/dev/sfxge/common/efx_ev.c ============================================================================== --- head/sys/dev/sfxge/common/efx_ev.c Thu Jan 29 18:52:33 2015 (r277885) +++ head/sys/dev/sfxge/common/efx_ev.c Thu Jan 29 18:54:43 2015 (r277886) @@ -995,6 +995,7 @@ fail1: return (rc); } +#if EFSYS_OPT_QSTATS #if EFSYS_OPT_NAMES /* START MKCONFIG GENERATED EfxEventQueueStatNamesBlock 67e9bdcd920059bd */ static const char __cs * __cs __efx_ev_qstat_name[] = { @@ -1052,6 +1053,7 @@ efx_ev_qstat_name( return (__efx_ev_qstat_name[id]); } #endif /* EFSYS_OPT_NAMES */ +#endif /* EFSYS_OPT_QSTATS */ #if EFSYS_OPT_QSTATS void Modified: head/sys/dev/sfxge/common/efx_tx.c ============================================================================== --- head/sys/dev/sfxge/common/efx_tx.c Thu Jan 29 18:52:33 2015 (r277885) +++ head/sys/dev/sfxge/common/efx_tx.c Thu Jan 29 18:54:43 2015 (r277886) @@ -358,6 +358,7 @@ fail1: return (rc); } +#if EFSYS_OPT_QSTATS #if EFSYS_OPT_NAMES /* START MKCONFIG GENERATED EfxTransmitQueueStatNamesBlock 78ca9ab00287fffb */ static const char __cs * __cs __efx_tx_qstat_name[] = { @@ -378,6 +379,7 @@ efx_tx_qstat_name( return (__efx_tx_qstat_name[id]); } #endif /* EFSYS_OPT_NAMES */ +#endif /* EFSYS_OPT_QSTATS */ #if EFSYS_OPT_QSTATS void Modified: head/sys/dev/sfxge/sfxge.h ============================================================================== --- head/sys/dev/sfxge/sfxge.h Thu Jan 29 18:52:33 2015 (r277885) +++ head/sys/dev/sfxge/sfxge.h Thu Jan 29 18:54:43 2015 (r277886) @@ -225,8 +225,10 @@ struct sfxge_softc { struct sfxge_evq *evq[SFXGE_RX_SCALE_MAX]; unsigned int ev_moderation; +#if EFSYS_OPT_QSTATS clock_t ev_stats_update_time; uint64_t ev_stats[EV_NQSTATS]; +#endif uma_zone_t rxq_cache; struct sfxge_rxq *rxq[SFXGE_RX_SCALE_MAX]; Modified: head/sys/dev/sfxge/sfxge_ev.c ============================================================================== --- head/sys/dev/sfxge/sfxge_ev.c Thu Jan 29 18:52:33 2015 (r277885) +++ head/sys/dev/sfxge/sfxge_ev.c Thu Jan 29 18:54:43 2015 (r277886) @@ -406,6 +406,8 @@ sfxge_ev_wake_up(void *arg, uint32_t ind return (B_FALSE); } +#if EFSYS_OPT_QSTATS + static void sfxge_ev_stat_update(struct sfxge_softc *sc) { @@ -467,6 +469,8 @@ sfxge_ev_stat_init(struct sfxge_softc *s } } +#endif /* EFSYS_OPT_QSTATS */ + static void sfxge_ev_qmoderate(struct sfxge_softc *sc, unsigned int idx, unsigned int us) { @@ -627,8 +631,10 @@ sfxge_ev_qstop(struct sfxge_softc *sc, u evq->read_ptr = 0; evq->exception = B_FALSE; +#if EFSYS_OPT_QSTATS /* Add event counts before discarding the common evq state */ efx_ev_qstats_update(evq->common, sc->ev_stats); +#endif efx_ev_qdestroy(evq->common); efx_sram_buf_tbl_clear(sc->enp, evq->buf_base_id, @@ -883,7 +889,9 @@ sfxge_ev_init(struct sfxge_softc *sc) goto fail; } +#if EFSYS_OPT_QSTATS sfxge_ev_stat_init(sc); +#endif return (0); From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 18:57:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 411A6378; Thu, 29 Jan 2015 18:57:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 137257D5; Thu, 29 Jan 2015 18:57:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0TIvRlJ077350; Thu, 29 Jan 2015 18:57:27 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0TIvRtl077349; Thu, 29 Jan 2015 18:57:27 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201501291857.t0TIvRtl077349@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 29 Jan 2015 18:57:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277887 - head/sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 18:57:28 -0000 Author: arybchik Date: Thu Jan 29 18:57:27 2015 New Revision: 277887 URL: https://svnweb.freebsd.org/changeset/base/277887 Log: sfxge: Remove extra cache-line alignment and reorder sfxge_evq_t Remove the first member alignment to cacheline since it is nop. Use __aligned() for the whole structure to make sure that the structure size is cacheline aligned. Remove lock alignment to make the structure smaller and fit all members used on event queue processing into one cacheline (128 bytes) on x86-64. The lock is obtained as well from different context when event queue statistics are retrived from sysctl context, but it is infrequent. Reorder members to avoid padding and go in usage order on event processing. As the result all structure members used on event queue processing fit into exactly one cacheline (128 byte) now. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: head/sys/dev/sfxge/sfxge.h Modified: head/sys/dev/sfxge/sfxge.h ============================================================================== --- head/sys/dev/sfxge/sfxge.h Thu Jan 29 18:54:43 2015 (r277886) +++ head/sys/dev/sfxge/sfxge.h Thu Jan 29 18:57:27 2015 (r277887) @@ -103,26 +103,26 @@ enum sfxge_evq_state { #define SFXGE_EV_BATCH 16384 struct sfxge_evq { - struct sfxge_softc *sc __aligned(CACHE_LINE_SIZE); - struct mtx lock __aligned(CACHE_LINE_SIZE); - - enum sfxge_evq_state init_state; + /* Structure members below are sorted by usage order */ + struct sfxge_softc *sc; + struct mtx lock; unsigned int index; - unsigned int entries; + enum sfxge_evq_state init_state; efsys_mem_t mem; - unsigned int buf_base_id; - - boolean_t exception; - efx_evq_t *common; unsigned int read_ptr; + boolean_t exception; unsigned int rx_done; unsigned int tx_done; /* Linked list of TX queues with completions to process */ struct sfxge_txq *txq; struct sfxge_txq **txqs; -}; + + /* Structure members not used on event processing path */ + unsigned int buf_base_id; + unsigned int entries; +} __aligned(CACHE_LINE_SIZE); #define SFXGE_NDESCS 1024 #define SFXGE_MODERATION 30 From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 18:59:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 89D8B5B8; Thu, 29 Jan 2015 18:59:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D1D4807; Thu, 29 Jan 2015 18:59:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0TIxNjA077625; Thu, 29 Jan 2015 18:59:23 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0TIxNTi077624; Thu, 29 Jan 2015 18:59:23 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201501291859.t0TIxNTi077624@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 29 Jan 2015 18:59:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277888 - head/sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 18:59:23 -0000 Author: arybchik Date: Thu Jan 29 18:59:22 2015 New Revision: 277888 URL: https://svnweb.freebsd.org/changeset/base/277888 Log: sfxge: fixed TSO code to cope with VLAN headers Submitted by: Artem V. Andreev Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: head/sys/dev/sfxge/sfxge_tx.c Modified: head/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.c Thu Jan 29 18:57:27 2015 (r277887) +++ head/sys/dev/sfxge/sfxge_tx.c Thu Jan 29 18:59:22 2015 (r277888) @@ -855,9 +855,7 @@ static void tso_start(struct sfxge_tso_s tso->tcph_off = tso->nh_off + sizeof(struct ip6_hdr); } - /* We assume all headers are linear in the head mbuf */ tso->header_len = tso->tcph_off + 4 * tso_tcph(tso)->th_off; - KASSERT(tso->header_len <= mbuf->m_len, ("packet headers fragmented")); tso->full_packet_size = tso->header_len + mbuf->m_pkthdr.tso_segsz; tso->seqnum = ntohl(tso_tcph(tso)->th_seq); @@ -972,7 +970,7 @@ static int tso_start_new_packet(struct s tsoh_th = (struct tcphdr *)(header + tso->tcph_off); /* Copy and update the headers. */ - memcpy(header, tso->mbuf->m_data, tso->header_len); + m_copydata(tso->mbuf, 0, tso->header_len, header); tsoh_th->th_seq = htonl(tso->seqnum); tso->seqnum += tso->mbuf->m_pkthdr.tso_segsz; @@ -1018,20 +1016,18 @@ sfxge_tx_queue_tso(struct sfxge_txq *txq { struct sfxge_tso_state tso; unsigned int id, next_id; + unsigned skipped = 0; tso_start(&tso, mbuf); - /* Grab the first payload fragment. */ - if (dma_seg->ds_len == tso.header_len) { + while (dma_seg->ds_len + skipped <= tso.header_len) { + skipped += dma_seg->ds_len; --n_dma_seg; KASSERT(n_dma_seg, ("no payload found in TSO packet")); ++dma_seg; - tso.in_len = dma_seg->ds_len; - tso.dma_addr = dma_seg->ds_addr; - } else { - tso.in_len = dma_seg->ds_len - tso.header_len; - tso.dma_addr = dma_seg->ds_addr + tso.header_len; } + tso.in_len = dma_seg->ds_len + (tso.header_len - skipped); + tso.dma_addr = dma_seg->ds_addr + (tso.header_len - skipped); id = txq->added & txq->ptr_mask; if (__predict_false(tso_start_new_packet(txq, &tso, id))) From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 19:01:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BFDC2726; Thu, 29 Jan 2015 19:01:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A0CBA82B; Thu, 29 Jan 2015 19:01:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0TJ1AUV080398; Thu, 29 Jan 2015 19:01:10 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0TJ19h4080395; Thu, 29 Jan 2015 19:01:09 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201501291901.t0TJ19h4080395@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 29 Jan 2015 19:01:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277889 - head/sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 19:01:11 -0000 Author: arybchik Date: Thu Jan 29 19:01:09 2015 New Revision: 277889 URL: https://svnweb.freebsd.org/changeset/base/277889 Log: sfxge: Add evq argument to sfxge_tx_qcomplete() It removes necessity to get evq pointer by its index in soft context. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: head/sys/dev/sfxge/sfxge_ev.c head/sys/dev/sfxge/sfxge_tx.c head/sys/dev/sfxge/sfxge_tx.h Modified: head/sys/dev/sfxge/sfxge_ev.c ============================================================================== --- head/sys/dev/sfxge/sfxge_ev.c Thu Jan 29 18:59:22 2015 (r277888) +++ head/sys/dev/sfxge/sfxge_ev.c Thu Jan 29 19:01:09 2015 (r277889) @@ -68,7 +68,7 @@ sfxge_ev_qcomplete(struct sfxge_evq *evq ("txq->evq_index != index")); if (txq->pending != txq->completed) - sfxge_tx_qcomplete(txq); + sfxge_tx_qcomplete(txq, evq); txq = next; } while (txq != NULL); @@ -262,7 +262,7 @@ sfxge_ev_tx(void *arg, uint32_t label, u } if (txq->pending - txq->completed >= SFXGE_TX_BATCH) - sfxge_tx_qcomplete(txq); + sfxge_tx_qcomplete(txq, evq); done: return (evq->tx_done >= SFXGE_EV_BATCH); Modified: head/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.c Thu Jan 29 18:59:22 2015 (r277888) +++ head/sys/dev/sfxge/sfxge_tx.c Thu Jan 29 19:01:09 2015 (r277889) @@ -105,15 +105,10 @@ static int sfxge_tx_queue_tso(struct sfx const bus_dma_segment_t *dma_seg, int n_dma_seg); void -sfxge_tx_qcomplete(struct sfxge_txq *txq) +sfxge_tx_qcomplete(struct sfxge_txq *txq, struct sfxge_evq *evq) { - struct sfxge_softc *sc; - struct sfxge_evq *evq; unsigned int completed; - sc = txq->sc; - evq = sc->evq[txq->evq_index]; - mtx_assert(&evq->lock, MA_OWNED); completed = txq->completed; @@ -1147,7 +1142,7 @@ sfxge_tx_qstop(struct sfxge_softc *sc, u txq->blocked = 0; txq->pending = txq->added; - sfxge_tx_qcomplete(txq); + sfxge_tx_qcomplete(txq, evq); KASSERT(txq->completed == txq->added, ("txq->completed != txq->added")); Modified: head/sys/dev/sfxge/sfxge_tx.h ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.h Thu Jan 29 18:59:22 2015 (r277888) +++ head/sys/dev/sfxge/sfxge_tx.h Thu Jan 29 19:01:09 2015 (r277889) @@ -175,13 +175,15 @@ struct sfxge_txq { struct sfxge_txq *next; }; +struct sfxge_evq; + extern int sfxge_tx_packet_add(struct sfxge_txq *, struct mbuf *); extern int sfxge_tx_init(struct sfxge_softc *sc); extern void sfxge_tx_fini(struct sfxge_softc *sc); extern int sfxge_tx_start(struct sfxge_softc *sc); extern void sfxge_tx_stop(struct sfxge_softc *sc); -extern void sfxge_tx_qcomplete(struct sfxge_txq *txq); +extern void sfxge_tx_qcomplete(struct sfxge_txq *txq, struct sfxge_evq *evq); extern void sfxge_tx_qflush_done(struct sfxge_txq *txq); #ifdef SFXGE_HAVE_MQ extern void sfxge_if_qflush(struct ifnet *ifp); From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 19:02:26 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 60821870; Thu, 29 Jan 2015 19:02:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CCEF8C5; Thu, 29 Jan 2015 19:02:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0TJ2QgS081664; Thu, 29 Jan 2015 19:02:26 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0TJ2Q8l081663; Thu, 29 Jan 2015 19:02:26 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201501291902.t0TJ2Q8l081663@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 29 Jan 2015 19:02:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277890 - head/sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 19:02:26 -0000 Author: arybchik Date: Thu Jan 29 19:02:25 2015 New Revision: 277890 URL: https://svnweb.freebsd.org/changeset/base/277890 Log: sfxge: Do not bzero() DMA allocated memory once again sfxge_dma_alloc() calls bus_dmamem_alloc() with BUS_DMA_ZERO flag, so allocated memory is already filled in by zeros Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: head/sys/dev/sfxge/sfxge_port.c Modified: head/sys/dev/sfxge/sfxge_port.c ============================================================================== --- head/sys/dev/sfxge/sfxge_port.c Thu Jan 29 19:01:09 2015 (r277889) +++ head/sys/dev/sfxge/sfxge_port.c Thu Jan 29 19:02:25 2015 (r277890) @@ -583,7 +583,6 @@ sfxge_port_init(struct sfxge_softc *sc) M_SFXGE, M_WAITOK | M_ZERO); if ((rc = sfxge_dma_alloc(sc, EFX_PHY_STATS_SIZE, phy_stats_buf)) != 0) goto fail; - bzero(phy_stats_buf->esm_base, phy_stats_buf->esm_size); sfxge_phy_stat_init(sc); sysctl_ctx = device_get_sysctl_ctx(sc->dev); @@ -605,7 +604,6 @@ sfxge_port_init(struct sfxge_softc *sc) M_SFXGE, M_WAITOK | M_ZERO); if ((rc = sfxge_dma_alloc(sc, EFX_MAC_STATS_SIZE, mac_stats_buf)) != 0) goto fail2; - bzero(mac_stats_buf->esm_base, mac_stats_buf->esm_size); sfxge_mac_stat_init(sc); port->init_state = SFXGE_PORT_INITIALIZED; From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 19:03:34 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6858E9E1; Thu, 29 Jan 2015 19:03:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5459B8D6; Thu, 29 Jan 2015 19:03:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0TJ3Ya1081839; Thu, 29 Jan 2015 19:03:34 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0TJ3Y19081838; Thu, 29 Jan 2015 19:03:34 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201501291903.t0TJ3Y19081838@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 29 Jan 2015 19:03:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277891 - head/sys/dev/sfxge/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 19:03:34 -0000 Author: arybchik Date: Thu Jan 29 19:03:33 2015 New Revision: 277891 URL: https://svnweb.freebsd.org/changeset/base/277891 Log: sfxge: Remove unused esm_size member of the efsys_mem_t structure esm_size is not even initialized properly when memory is allocated. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: head/sys/dev/sfxge/common/efsys.h Modified: head/sys/dev/sfxge/common/efsys.h ============================================================================== --- head/sys/dev/sfxge/common/efsys.h Thu Jan 29 19:02:25 2015 (r277890) +++ head/sys/dev/sfxge/common/efsys.h Thu Jan 29 19:03:33 2015 (r277891) @@ -370,7 +370,6 @@ typedef struct efsys_mem_s { bus_dmamap_t esm_map; caddr_t esm_base; efsys_dma_addr_t esm_addr; - size_t esm_size; } efsys_mem_t; From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 19:04:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2B067B2A; Thu, 29 Jan 2015 19:04:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1715B8E0; Thu, 29 Jan 2015 19:04:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0TJ4gjE082022; Thu, 29 Jan 2015 19:04:42 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0TJ4gla082021; Thu, 29 Jan 2015 19:04:42 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201501291904.t0TJ4gla082021@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 29 Jan 2015 19:04:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277892 - head/sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 19:04:43 -0000 Author: arybchik Date: Thu Jan 29 19:04:42 2015 New Revision: 277892 URL: https://svnweb.freebsd.org/changeset/base/277892 Log: sfxge: Pass correct address to free allocated memory in the case of load error Most likely is was just memory leak on the error handling path since typically efsys_mem_t is filled in by zeros on allocation. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: head/sys/dev/sfxge/sfxge_dma.c Modified: head/sys/dev/sfxge/sfxge_dma.c ============================================================================== --- head/sys/dev/sfxge/sfxge_dma.c Thu Jan 29 19:03:33 2015 (r277891) +++ head/sys/dev/sfxge/sfxge_dma.c Thu Jan 29 19:04:42 2015 (r277892) @@ -157,7 +157,7 @@ sfxge_dma_alloc(struct sfxge_softc *sc, if (bus_dmamap_load(esmp->esm_tag, esmp->esm_map, vaddr, len, sfxge_dma_cb, &esmp->esm_addr, 0) != 0) { device_printf(sc->dev, "Couldn't load DMA mapping\n"); - bus_dmamem_free(esmp->esm_tag, esmp->esm_base, esmp->esm_map); + bus_dmamem_free(esmp->esm_tag, vaddr, esmp->esm_map); bus_dma_tag_destroy(esmp->esm_tag); return (ENOMEM); } From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 19:06:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 24F18C83; Thu, 29 Jan 2015 19:06:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 112F28F7; Thu, 29 Jan 2015 19:06:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0TJ6EwM082303; Thu, 29 Jan 2015 19:06:14 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0TJ6E1h082302; Thu, 29 Jan 2015 19:06:14 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201501291906.t0TJ6E1h082302@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 29 Jan 2015 19:06:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277893 - head/sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 19:06:15 -0000 Author: arybchik Date: Thu Jan 29 19:06:14 2015 New Revision: 277893 URL: https://svnweb.freebsd.org/changeset/base/277893 Log: sfxge: Use SFXGE_MODERATION to initialize event moderation Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: head/sys/dev/sfxge/sfxge_ev.c Modified: head/sys/dev/sfxge/sfxge_ev.c ============================================================================== --- head/sys/dev/sfxge/sfxge_ev.c Thu Jan 29 19:04:42 2015 (r277892) +++ head/sys/dev/sfxge/sfxge_ev.c Thu Jan 29 19:06:14 2015 (r277893) @@ -875,7 +875,7 @@ sfxge_ev_init(struct sfxge_softc *sc) /* Set default interrupt moderation; add a sysctl to * read and change it. */ - sc->ev_moderation = 30; + sc->ev_moderation = SFXGE_MODERATION; SYSCTL_ADD_PROC(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, "int_mod", CTLTYPE_UINT|CTLFLAG_RW, sc, 0, sfxge_int_mod_handler, "IU", From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 19:09:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D678ADE6; Thu, 29 Jan 2015 19:09:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B7EF6913; Thu, 29 Jan 2015 19:09:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0TJ9FZ6082681; Thu, 29 Jan 2015 19:09:15 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0TJ9EOJ082675; Thu, 29 Jan 2015 19:09:14 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201501291909.t0TJ9EOJ082675@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 29 Jan 2015 19:09:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277894 - in head: share/man/man4 sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 19:09:16 -0000 Author: arybchik Date: Thu Jan 29 19:09:14 2015 New Revision: 277894 URL: https://svnweb.freebsd.org/changeset/base/277894 Log: sfxge: implemented parameter to restrict RSS channels Submitted by: Artem V. Andreev Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: head/share/man/man4/sfxge.4 head/sys/dev/sfxge/sfxge.c head/sys/dev/sfxge/sfxge.h head/sys/dev/sfxge/sfxge_intr.c Modified: head/share/man/man4/sfxge.4 ============================================================================== --- head/share/man/man4/sfxge.4 Thu Jan 29 19:06:14 2015 (r277893) +++ head/share/man/man4/sfxge.4 Thu Jan 29 19:09:14 2015 (r277894) @@ -108,6 +108,10 @@ If a packet is dropped, the .Va tx_early_drops counter is incremented and the local sender receives ENOBUFS. The value must be greater than or equal to 0. +.It Va hw.sfxge.N.max_rss_channels +The maximum number of allocated RSS channels for the Nth adapter. +If set to 0 or unset, the number of channels is determined by the number +of CPU cores. .El .Sh SUPPORT For general information and support, Modified: head/sys/dev/sfxge/sfxge.c ============================================================================== --- head/sys/dev/sfxge/sfxge.c Thu Jan 29 19:06:14 2015 (r277893) +++ head/sys/dev/sfxge/sfxge.c Thu Jan 29 19:09:14 2015 (r277894) @@ -397,11 +397,18 @@ sfxge_create(struct sfxge_softc *sc) device_t dev; efx_nic_t *enp; int error; + char rss_param_name[sizeof(SFXGE_PARAM(%d.max_rss_channels))]; dev = sc->dev; sx_init(&sc->softc_lock, "sfxge_softc"); + sc->max_rss_channels = 0; + snprintf(rss_param_name, sizeof(rss_param_name), + SFXGE_PARAM(%d.max_rss_channels), + (int)device_get_unit(dev)); + TUNABLE_INT_FETCH(rss_param_name, &sc->max_rss_channels); + sc->stats_node = SYSCTL_ADD_NODE( device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), Modified: head/sys/dev/sfxge/sfxge.h ============================================================================== --- head/sys/dev/sfxge/sfxge.h Thu Jan 29 19:06:14 2015 (r277893) +++ head/sys/dev/sfxge/sfxge.h Thu Jan 29 19:09:14 2015 (r277894) @@ -230,6 +230,7 @@ struct sfxge_softc { uint64_t ev_stats[EV_NQSTATS]; #endif + unsigned int max_rss_channels; uma_zone_t rxq_cache; struct sfxge_rxq *rxq[SFXGE_RX_SCALE_MAX]; unsigned int rx_indir_table[SFXGE_RX_SCALE_MAX]; Modified: head/sys/dev/sfxge/sfxge_intr.c ============================================================================== --- head/sys/dev/sfxge/sfxge_intr.c Thu Jan 29 19:06:14 2015 (r277893) +++ head/sys/dev/sfxge/sfxge_intr.c Thu Jan 29 19:09:14 2015 (r277894) @@ -302,6 +302,9 @@ sfxge_intr_setup_msix(struct sfxge_softc if (count > EFX_MAXRSS) count = EFX_MAXRSS; + if (sc->max_rss_channels > 0 && count > sc->max_rss_channels) + count = sc->max_rss_channels; + rid = PCIR_BAR(4); resp = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (resp == NULL) From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 19:11:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CA609F4D; Thu, 29 Jan 2015 19:11:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC9D49BB; Thu, 29 Jan 2015 19:11:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0TJBc2Q086492; Thu, 29 Jan 2015 19:11:38 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0TJBcgT086486; Thu, 29 Jan 2015 19:11:38 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201501291911.t0TJBcgT086486@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 29 Jan 2015 19:11:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277895 - in head: share/man/man4 sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 19:11:39 -0000 Author: arybchik Date: Thu Jan 29 19:11:37 2015 New Revision: 277895 URL: https://svnweb.freebsd.org/changeset/base/277895 Log: sfxge: Separate software Tx queue limit for non-TCP traffic Add separate software Tx queue limit for non-TCP traffic to make total limit higher and avoid local drops of TCP packets because of no backpressure. There is no point to make non-TCP limit high since without backpressure UDP stream easily overflows any sensible limit. Split early drops statistics since it is better to have separate counter for each drop reason to make it unabmiguous. Add software Tx queue high watermark. The information is very useful to understand how big queues grow under traffic load. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: head/share/man/man4/sfxge.4 head/sys/dev/sfxge/sfxge_tx.c head/sys/dev/sfxge/sfxge_tx.h Modified: head/share/man/man4/sfxge.4 ============================================================================== --- head/share/man/man4/sfxge.4 Thu Jan 29 19:09:14 2015 (r277894) +++ head/share/man/man4/sfxge.4 Thu Jan 29 19:11:37 2015 (r277895) @@ -93,10 +93,18 @@ Supported values are: 512, 1024, 2048 an .It Va hw.sfxge.tx_dpl_get_max The maximum length of the deferred packet .Dq get-list -for queued transmit -packets, used only if the transmit queue lock can be acquired. +for queued transmit packets (TCP and non-TCP), used only if the transmit +queue lock can be acquired. If a packet is dropped, the -.Va tx_early_drops +.Va tx_get_overflow +counter is incremented and the local sender receives ENOBUFS. +The value must be greater than 0. +.It Va hw.sfxge.tx_dpl_get_non_tcp_max +The maximum number of non-TCP packets in the deferred packet +.Dq get-list +, used only if the transmit queue lock can be acquired. +If packet is dropped, the +.Va tx_get_non_tcp_overflow counter is incremented and the local sender receives ENOBUFS. The value must be greater than 0. .It Va hw.sfxge.tx_dpl_put_max @@ -105,7 +113,7 @@ The maximum length of the deferred packe for queued transmit packets, used if the transmit queue lock cannot be acquired. If a packet is dropped, the -.Va tx_early_drops +.Va tx_put_overflow counter is incremented and the local sender receives ENOBUFS. The value must be greater than or equal to 0. .It Va hw.sfxge.N.max_rss_channels Modified: head/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.c Thu Jan 29 19:09:14 2015 (r277894) +++ head/sys/dev/sfxge/sfxge_tx.c Thu Jan 29 19:11:37 2015 (r277895) @@ -85,14 +85,23 @@ static int sfxge_tx_dpl_get_max = SFXGE_ TUNABLE_INT(SFXGE_PARAM_TX_DPL_GET_MAX, &sfxge_tx_dpl_get_max); SYSCTL_INT(_hw_sfxge, OID_AUTO, tx_dpl_get_max, CTLFLAG_RDTUN, &sfxge_tx_dpl_get_max, 0, - "Maximum number of packets in deferred packet get-list"); + "Maximum number of any packets in deferred packet get-list"); + +#define SFXGE_PARAM_TX_DPL_GET_NON_TCP_MAX \ + SFXGE_PARAM(tx_dpl_get_non_tcp_max) +static int sfxge_tx_dpl_get_non_tcp_max = + SFXGE_TX_DPL_GET_NON_TCP_PKT_LIMIT_DEFAULT; +TUNABLE_INT(SFXGE_PARAM_TX_DPL_GET_NON_TCP_MAX, &sfxge_tx_dpl_get_non_tcp_max); +SYSCTL_INT(_hw_sfxge, OID_AUTO, tx_dpl_get_non_tcp_max, CTLFLAG_RDTUN, + &sfxge_tx_dpl_get_non_tcp_max, 0, + "Maximum number of non-TCP packets in deferred packet get-list"); #define SFXGE_PARAM_TX_DPL_PUT_MAX SFXGE_PARAM(tx_dpl_put_max) static int sfxge_tx_dpl_put_max = SFXGE_TX_DPL_PUT_PKT_LIMIT_DEFAULT; TUNABLE_INT(SFXGE_PARAM_TX_DPL_PUT_MAX, &sfxge_tx_dpl_put_max); SYSCTL_INT(_hw_sfxge, OID_AUTO, tx_dpl_put_max, CTLFLAG_RDTUN, &sfxge_tx_dpl_put_max, 0, - "Maximum number of packets in deferred packet put-list"); + "Maximum number of any packets in deferred packet put-list"); #endif @@ -147,6 +156,15 @@ sfxge_tx_qcomplete(struct sfxge_txq *txq #ifdef SFXGE_HAVE_MQ +static inline unsigned int +sfxge_is_mbuf_non_tcp(struct mbuf *mbuf) +{ + /* Absense of TCP checksum flags does not mean that it is non-TCP + * but it should be true if user wants to achieve high throughput. + */ + return (!(mbuf->m_pkthdr.csum_flags & (CSUM_IP_TCP | CSUM_IP6_TCP))); +} + /* * Reorder the put list and append it to the get list. */ @@ -158,6 +176,7 @@ sfxge_tx_qdpl_swizzle(struct sfxge_txq * volatile uintptr_t *putp; uintptr_t put; unsigned int count; + unsigned int non_tcp_count; mtx_assert(&txq->lock, MA_OWNED); @@ -176,9 +195,11 @@ sfxge_tx_qdpl_swizzle(struct sfxge_txq * get_next = NULL; count = 0; + non_tcp_count = 0; do { struct mbuf *put_next; + non_tcp_count += sfxge_is_mbuf_non_tcp(mbuf); put_next = mbuf->m_nextpkt; mbuf->m_nextpkt = get_next; get_next = mbuf; @@ -192,6 +213,7 @@ sfxge_tx_qdpl_swizzle(struct sfxge_txq * *stdp->std_getp = get_next; stdp->std_getp = get_tailp; stdp->std_get_count += count; + stdp->std_get_non_tcp_count += non_tcp_count; } #endif /* SFXGE_HAVE_MQ */ @@ -382,6 +404,7 @@ sfxge_tx_qdpl_drain(struct sfxge_txq *tx struct sfxge_tx_dpl *stdp; struct mbuf *mbuf, *next; unsigned int count; + unsigned int non_tcp_count; unsigned int pushed; int rc; @@ -396,6 +419,10 @@ sfxge_tx_qdpl_drain(struct sfxge_txq *tx mbuf = stdp->std_get; count = stdp->std_get_count; + non_tcp_count = stdp->std_get_non_tcp_count; + + if (count > stdp->std_get_hiwat) + stdp->std_get_hiwat = count; while (count != 0) { KASSERT(mbuf != NULL, ("mbuf == NULL")); @@ -410,6 +437,7 @@ sfxge_tx_qdpl_drain(struct sfxge_txq *tx rc = sfxge_tx_queue_mbuf(txq, mbuf); --count; + non_tcp_count -= sfxge_is_mbuf_non_tcp(mbuf); mbuf = next; if (rc != 0) continue; @@ -426,12 +454,16 @@ sfxge_tx_qdpl_drain(struct sfxge_txq *tx if (count == 0) { KASSERT(mbuf == NULL, ("mbuf != NULL")); + KASSERT(non_tcp_count == 0, + ("inconsistent TCP/non-TCP detection")); stdp->std_get = NULL; stdp->std_get_count = 0; + stdp->std_get_non_tcp_count = 0; stdp->std_getp = &stdp->std_get; } else { stdp->std_get = mbuf; stdp->std_get_count = count; + stdp->std_get_non_tcp_count = non_tcp_count; } if (txq->added != pushed) @@ -491,8 +523,18 @@ sfxge_tx_qdpl_put(struct sfxge_txq *txq, sfxge_tx_qdpl_swizzle(txq); - if (stdp->std_get_count >= stdp->std_get_max) + if (stdp->std_get_count >= stdp->std_get_max) { + txq->get_overflow++; return (ENOBUFS); + } + if (sfxge_is_mbuf_non_tcp(mbuf)) { + if (stdp->std_get_non_tcp_count >= + stdp->std_get_non_tcp_max) { + txq->get_non_tcp_overflow++; + return (ENOBUFS); + } + stdp->std_get_non_tcp_count++; + } *(stdp->std_getp) = mbuf; stdp->std_getp = &mbuf->m_nextpkt; @@ -513,8 +555,10 @@ sfxge_tx_qdpl_put(struct sfxge_txq *txq, old_len = mp->m_pkthdr.csum_data; } else old_len = 0; - if (old_len >= stdp->std_put_max) + if (old_len >= stdp->std_put_max) { + atomic_add_long(&txq->put_overflow, 1); return (ENOBUFS); + } mbuf->m_pkthdr.csum_data = old_len + 1; mbuf->m_nextpkt = (void *)old; } while (atomic_cmpset_ptr(putp, old, new) == 0); @@ -535,6 +579,7 @@ sfxge_tx_packet_add(struct sfxge_txq *tx if (!SFXGE_LINK_UP(txq->sc)) { rc = ENETDOWN; + atomic_add_long(&txq->netdown_drops, 1); goto fail; } @@ -572,7 +617,6 @@ sfxge_tx_packet_add(struct sfxge_txq *tx fail: m_freem(m); - atomic_add_long(&txq->early_drops, 1); return (rc); } @@ -591,6 +635,7 @@ sfxge_tx_qdpl_flush(struct sfxge_txq *tx } stdp->std_get = NULL; stdp->std_get_count = 0; + stdp->std_get_non_tcp_count = 0; stdp->std_getp = &stdp->std_get; mtx_unlock(&txq->lock); @@ -1402,6 +1447,13 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u rc = EINVAL; goto fail_tx_dpl_get_max; } + if (sfxge_tx_dpl_get_non_tcp_max <= 0) { + log(LOG_ERR, "%s=%d must be greater than 0", + SFXGE_PARAM_TX_DPL_GET_NON_TCP_MAX, + sfxge_tx_dpl_get_non_tcp_max); + rc = EINVAL; + goto fail_tx_dpl_get_max; + } if (sfxge_tx_dpl_put_max < 0) { log(LOG_ERR, "%s=%d must be greater or equal to 0", SFXGE_PARAM_TX_DPL_PUT_MAX, sfxge_tx_dpl_put_max); @@ -1413,6 +1465,7 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u stdp = &txq->dpl; stdp->std_put_max = sfxge_tx_dpl_put_max; stdp->std_get_max = sfxge_tx_dpl_get_max; + stdp->std_get_non_tcp_max = sfxge_tx_dpl_get_non_tcp_max; stdp->std_getp = &stdp->std_get; mtx_init(&txq->lock, "txq", NULL, MTX_DEF); @@ -1421,6 +1474,14 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u SYSCTL_CHILDREN(txq_node), OID_AUTO, "dpl_get_count", CTLFLAG_RD | CTLFLAG_STATS, &stdp->std_get_count, 0, ""); + SYSCTL_ADD_UINT(device_get_sysctl_ctx(sc->dev), + SYSCTL_CHILDREN(txq_node), OID_AUTO, + "dpl_get_non_tcp_count", CTLFLAG_RD | CTLFLAG_STATS, + &stdp->std_get_non_tcp_count, 0, ""); + SYSCTL_ADD_UINT(device_get_sysctl_ctx(sc->dev), + SYSCTL_CHILDREN(txq_node), OID_AUTO, + "dpl_get_hiwat", CTLFLAG_RD | CTLFLAG_STATS, + &stdp->std_get_hiwat, 0, ""); #endif txq->type = type; @@ -1458,7 +1519,10 @@ static const struct { SFXGE_TX_STAT(tso_long_headers, tso_long_headers), SFXGE_TX_STAT(tx_collapses, collapses), SFXGE_TX_STAT(tx_drops, drops), - SFXGE_TX_STAT(tx_early_drops, early_drops), + SFXGE_TX_STAT(tx_get_overflow, get_overflow), + SFXGE_TX_STAT(tx_get_non_tcp_overflow, get_non_tcp_overflow), + SFXGE_TX_STAT(tx_put_overflow, put_overflow), + SFXGE_TX_STAT(tx_netdown_drops, netdown_drops), }; static int Modified: head/sys/dev/sfxge/sfxge_tx.h ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.h Thu Jan 29 19:09:14 2015 (r277894) +++ head/sys/dev/sfxge/sfxge_tx.h Thu Jan 29 19:11:37 2015 (r277895) @@ -75,21 +75,29 @@ struct sfxge_tx_mapping { enum sfxge_tx_buf_flags flags; }; -#define SFXGE_TX_DPL_GET_PKT_LIMIT_DEFAULT 1024 -#define SFXGE_TX_DPL_PUT_PKT_LIMIT_DEFAULT 64 +#define SFXGE_TX_DPL_GET_PKT_LIMIT_DEFAULT (64 * 1024) +#define SFXGE_TX_DPL_GET_NON_TCP_PKT_LIMIT_DEFAULT 1024 +#define SFXGE_TX_DPL_PUT_PKT_LIMIT_DEFAULT 64 /* * Deferred packet list. */ struct sfxge_tx_dpl { - unsigned int std_get_max; /* Maximum number of packets + unsigned int std_get_max; /* Maximum number of packets * in get list */ - unsigned int std_put_max; /* Maximum number of packets + unsigned int std_get_non_tcp_max; /* Maximum number + * of non-TCP packets + * in get list */ + unsigned int std_put_max; /* Maximum number of packets * in put list */ - uintptr_t std_put; /* Head of put list. */ - struct mbuf *std_get; /* Head of get list. */ - struct mbuf **std_getp; /* Tail of get list. */ - unsigned int std_get_count; /* Packets in get list. */ + uintptr_t std_put; /* Head of put list. */ + struct mbuf *std_get; /* Head of get list. */ + struct mbuf **std_getp; /* Tail of get list. */ + unsigned int std_get_count; /* Packets in get list. */ + unsigned int std_get_non_tcp_count; /* Non-TCP packets + * in get list */ + unsigned int std_get_hiwat; /* Packets in get list + * high watermark */ }; @@ -165,7 +173,10 @@ struct sfxge_txq { unsigned long tso_long_headers; unsigned long collapses; unsigned long drops; - unsigned long early_drops; + unsigned long get_overflow; + unsigned long get_non_tcp_overflow; + unsigned long put_overflow; + unsigned long netdown_drops; /* The following fields change more often, and are used mostly * on the completion path From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 19:21:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 62B276A6; Thu, 29 Jan 2015 19:21:04 +0000 (UTC) Received: from mail-qg0-x22a.google.com (mail-qg0-x22a.google.com [IPv6:2607:f8b0:400d:c04::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 185CBAE0; Thu, 29 Jan 2015 19:21:04 +0000 (UTC) Received: by mail-qg0-f42.google.com with SMTP id q107so32874472qgd.1; Thu, 29 Jan 2015 11:21:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=eJ5IZINp+RgGjA61LBj1YWEIUtskFv0HuQxnWTpUQ08=; b=Z0VMV6wpAZ+nm/OkwY+WQhXE8xcZv8IYEDTRCJ8PVOqDNaI50UduLxzHlZazXOoMp1 z2hbsPmV7dtm3Wa8NmXGZnxqndSCGJ6bv0KfeZRWbO4EeDgQGvoCPZn3Th00+y7DsXEv ATWC1y/Jd/D7LxwkbaHur5MW6oIDzp+phmvRzZBKCdX1qF18hEnzEAdee4VRbHMC+q+j PWz9sjTjGKEBA594hyyXUsnExKXbnCHcZAegggR0EnopCuBZ8nl3hK13Tlx8dDbQiadF QFUvvXpMw1wRQXDLq9z2uOv9Y2DLncvl4CfA2VuBi/k8KGlW8lu39w5KyF9MVnTe/hP3 mW2w== X-Received: by 10.140.100.226 with SMTP id s89mr4154202qge.96.1422559263308; Thu, 29 Jan 2015 11:21:03 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.140.39.209 with HTTP; Thu, 29 Jan 2015 11:20:43 -0800 (PST) In-Reply-To: References: <201501291530.t0TFU5Qb077741@svn.freebsd.org> From: Ed Maste Date: Thu, 29 Jan 2015 14:20:43 -0500 X-Google-Sender-Auth: 9z_ghNmgWI33gbKjPAgFe7TkT6Q Message-ID: Subject: Re: svn commit: r277877 - head/lib/libc/mips/gen To: Davide Italiano Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 19:21:04 -0000 On 29 January 2015 at 12:36, Davide Italiano wrote: >> >> Log: >> Use zero register instead of immediate 0x0 in MIPS assembly >> > Ed, > did you open a bug for this on LLVM bugzilla? If yes, can you please > link it here, for the records? I've just submitted http://llvm.org/bugs/show_bug.cgi?id=22389 Clang's integrated assembler ought to accept 0 for gas compatibility, but we'd want the change in our source anyway. Sean also ran into some missing pseudo-instructions, listed in http://llvm.org/bugs/show_bug.cgi?id=21474 From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 19:55:34 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3B0042E7; Thu, 29 Jan 2015 19:55:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D29DFAD; Thu, 29 Jan 2015 19:55:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0TJtXxV005954; Thu, 29 Jan 2015 19:55:33 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0TJtX7c005952; Thu, 29 Jan 2015 19:55:33 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201501291955.t0TJtX7c005952@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 29 Jan 2015 19:55:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277897 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 19:55:34 -0000 Author: jhb Date: Thu Jan 29 19:55:33 2015 New Revision: 277897 URL: https://svnweb.freebsd.org/changeset/base/277897 Log: Remove the d_thread_t compatibility shim provided in 5.0 to handle the struct thread (<= 4.x) vs struct proc (>= 5.0) argument to cdevsw routines. It is long past its expiration date. PR: 196544 (exp-run) Modified: head/sys/sys/conf.h head/sys/sys/param.h Modified: head/sys/sys/conf.h ============================================================================== --- head/sys/sys/conf.h Thu Jan 29 19:21:21 2015 (r277896) +++ head/sys/sys/conf.h Thu Jan 29 19:55:33 2015 (r277897) @@ -106,24 +106,6 @@ struct clonedevs; struct vm_object; struct vnode; -/* - * Note: d_thread_t is provided as a transition aid for those drivers - * that treat struct proc/struct thread as an opaque data type and - * exist in substantially the same form in both 4.x and 5.x. Writers - * of drivers that dips into the d_thread_t structure should use - * struct thread or struct proc as appropriate for the version of the - * OS they are using. It is provided in lieu of each device driver - * inventing its own way of doing this. While it does violate style(9) - * in a number of ways, this violation is deemed to be less - * important than the benefits that a uniform API between releases - * gives. - * - * Users of struct thread/struct proc that aren't device drivers should - * not use d_thread_t. - */ - -typedef struct thread d_thread_t; - typedef int d_open_t(struct cdev *dev, int oflags, int devtype, struct thread *td); typedef int d_fdopen_t(struct cdev *dev, int oflags, struct thread *td, struct file *fp); typedef int d_close_t(struct cdev *dev, int fflag, int devtype, struct thread *td); Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Thu Jan 29 19:21:21 2015 (r277896) +++ head/sys/sys/param.h Thu Jan 29 19:55:33 2015 (r277897) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1100056 /* Master, propagated to newvers */ +#define __FreeBSD_version 1100057 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 20:30:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D00D3A33; Thu, 29 Jan 2015 20:30:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A261E3BB; Thu, 29 Jan 2015 20:30:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0TKUEix021273; Thu, 29 Jan 2015 20:30:14 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0TKUEG7021272; Thu, 29 Jan 2015 20:30:14 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501292030.t0TKUEG7021272@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 29 Jan 2015 20:30:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277898 - head/sys/fs/msdosfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 20:30:14 -0000 Author: dim Date: Thu Jan 29 20:30:13 2015 New Revision: 277898 URL: https://svnweb.freebsd.org/changeset/base/277898 Log: Fix a bunch of -Wcast-qual warnings in msdosfs_conv.c, by using __DECONST. No functional change. MFC after: 3 days Modified: head/sys/fs/msdosfs/msdosfs_conv.c Modified: head/sys/fs/msdosfs/msdosfs_conv.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_conv.c Thu Jan 29 19:55:33 2015 (r277897) +++ head/sys/fs/msdosfs/msdosfs_conv.c Thu Jan 29 20:30:13 2015 (r277898) @@ -253,7 +253,7 @@ dos2unixfn(u_char dn[11], u_char *un, in * Copy the name portion into the unix filename string. */ for (i = 8; i > 0 && *dn != ' ';) { - c = dos2unixchr(tmpbuf, (const u_char **)&dn, &i, + c = dos2unixchr(tmpbuf, __DECONST(const u_char **, &dn), &i, lower & LCASE_BASE, pmp); while (*c != '\0') { *un++ = *c++; @@ -270,8 +270,8 @@ dos2unixfn(u_char dn[11], u_char *un, in *un++ = '.'; thislong++; for (i = 3; i > 0 && *dn != ' ';) { - c = dos2unixchr(tmpbuf, (const u_char **)&dn, &i, - lower & LCASE_EXT, pmp); + c = dos2unixchr(tmpbuf, __DECONST(const u_char **, &dn), + &i, lower & LCASE_EXT, pmp); while (*c != '\0') { *un++ = *c++; thislong++; @@ -612,7 +612,8 @@ winChkName(struct mbnambuf *nbp, const u * to look up or create files in case sensitive even when * it's a long file name. */ - c1 = unix2winchr((const u_char **)&np, &len, LCASE_BASE, pmp); + c1 = unix2winchr(__DECONST(const u_char **, &np), &len, + LCASE_BASE, pmp); c2 = unix2winchr(&un, &unlen, LCASE_BASE, pmp); if (c1 != c2) return -2; @@ -922,8 +923,8 @@ win2unixchr(u_char *outbuf, u_int16_t wc ilen = 2; olen = len = 4; inp = inbuf; - msdosfs_iconv->convchr(pmp->pm_w2u, (const char **)&inp, &ilen, - (char **)&outp, &olen); + msdosfs_iconv->convchr(pmp->pm_w2u, __DECONST(const char **, + &inp), &ilen, (char **)&outp, &olen); len -= olen; /* From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 20:40:26 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 985F0D0C; Thu, 29 Jan 2015 20:40:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 84C2C696; Thu, 29 Jan 2015 20:40:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0TKeQKw026085; Thu, 29 Jan 2015 20:40:26 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0TKeQrc026065; Thu, 29 Jan 2015 20:40:26 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501292040.t0TKeQrc026065@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 29 Jan 2015 20:40:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277899 - head/sys/fs/cd9660 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 20:40:26 -0000 Author: dim Date: Thu Jan 29 20:40:25 2015 New Revision: 277899 URL: https://svnweb.freebsd.org/changeset/base/277899 Log: Fix a bunch of -Wcast-qual warnings in cd9660_util.c, by using __DECONST. No functional change. MFC after: 3 days Modified: head/sys/fs/cd9660/cd9660_util.c Modified: head/sys/fs/cd9660/cd9660_util.c ============================================================================== --- head/sys/fs/cd9660/cd9660_util.c Thu Jan 29 20:30:13 2015 (r277898) +++ head/sys/fs/cd9660/cd9660_util.c Thu Jan 29 20:40:25 2015 (r277899) @@ -80,7 +80,8 @@ isochar(isofn, isoend, joliet_level, c, inbuf[2]='\0'; inp = inbuf; outp = outbuf; - cd9660_iconv->convchr(handle, (const char **)&inp, &i, &outp, &j); + cd9660_iconv->convchr(handle, __DECONST(const char **, &inp), &i, + &outp, &j); len -= j; if (clen) *clen = len; *c = '\0'; @@ -121,7 +122,8 @@ isofncmp(fn, fnlen, isofn, isolen, jolie u_char *fnend = fn + fnlen, *isoend = isofn + isolen; for (; fn < fnend; ) { - d = sgetrune(fn, fnend - fn, (char const **)&fn, flags, lhandle); + d = sgetrune(fn, fnend - fn, __DECONST(const char **, &fn), + flags, lhandle); if (isofn == isoend) return d; isofn += isochar(isofn, isoend, joliet_level, &c, NULL, flags, handle); From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 20:41:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9951DE54; Thu, 29 Jan 2015 20:41:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8581E6A5; Thu, 29 Jan 2015 20:41:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0TKfhqO029430; Thu, 29 Jan 2015 20:41:43 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0TKfhAJ029429; Thu, 29 Jan 2015 20:41:43 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201501292041.t0TKfhAJ029429@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 29 Jan 2015 20:41:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277900 - head/sys/x86/x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 20:41:43 -0000 Author: jhb Date: Thu Jan 29 20:41:42 2015 New Revision: 277900 URL: https://svnweb.freebsd.org/changeset/base/277900 Log: Opt for performance over power-saving on Intel CPUs that have a P-state but not C-state invariant TSC by changing the default behavior to leaving the TSC enabled as the timecounter and disabling C2+ instead of disabling the TSC by default. Discussed with: jkim Tested by: Jan Kokemuller Modified: head/sys/x86/x86/tsc.c Modified: head/sys/x86/x86/tsc.c ============================================================================== --- head/sys/x86/x86/tsc.c Thu Jan 29 20:40:25 2015 (r277899) +++ head/sys/x86/x86/tsc.c Thu Jan 29 20:41:42 2015 (r277900) @@ -522,17 +522,22 @@ init_TSC_tc(void) } /* - * We cannot use the TSC if it stops incrementing while idle. * Intel CPUs without a C-state invariant TSC can stop the TSC - * in either C2 or C3. + * in either C2 or C3. Disable use of C2 and C3 while using + * the TSC as the timecounter. The timecounter can be changed + * to enable C2 and C3. + * + * Note that the TSC is used as the cputicker for computing + * thread runtime regardless of the timecounter setting, so + * using an alternate timecounter and enabling C2 or C3 can + * result incorrect runtimes for kernel idle threads (but not + * for any non-idle threads). */ if (cpu_deepest_sleep >= 2 && cpu_vendor_id == CPU_VENDOR_INTEL && (amd_pminfo & AMDPM_TSC_INVARIANT) == 0) { - tsc_timecounter.tc_quality = -1000; tsc_timecounter.tc_flags |= TC_FLAGS_C2STOP; if (bootverbose) - printf("TSC timecounter disabled: C2/C3 may halt it.\n"); - goto init; + printf("TSC timecounter disables C2 and C3.\n"); } /* From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 21:04:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A8AFF510; Thu, 29 Jan 2015 21:04:22 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 81CC39C6; Thu, 29 Jan 2015 21:04:22 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id F3568B95B; Thu, 29 Jan 2015 16:04:20 -0500 (EST) From: John Baldwin To: src-committers@freebsd.org Subject: Re: svn commit: r277900 - head/sys/x86/x86 Date: Thu, 29 Jan 2015 15:45:12 -0500 Message-ID: <8728880.CZu0UL854D@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <201501292041.t0TKfhAJ029429@svn.freebsd.org> References: <201501292041.t0TKfhAJ029429@svn.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 29 Jan 2015 16:04:21 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 21:04:22 -0000 On Thursday, January 29, 2015 08:41:43 PM John Baldwin wrote: > Author: jhb > Date: Thu Jan 29 20:41:42 2015 > New Revision: 277900 > URL: https://svnweb.freebsd.org/changeset/base/277900 > > Log: > Opt for performance over power-saving on Intel CPUs that have a > P-state but not C-state invariant TSC by changing the default behavior > to leaving the TSC enabled as the timecounter and disabling C2+ instead > of disabling the TSC by default. > > Discussed with: jkim > Tested by: Jan Kokemuller Note that C1E remains enabled and in my experience that often gives the largest gain in power saving (that is, the delta between C1E and C2 is much smaller than the gain of plain C1 to C1E). Also, note that we always use the TSC as the cpu ticker, even if it is not the timecounter. Thus, if C2+ is enabled on the systems, the kernel idle threads will have an artificially low runtime since their idle time is not properly accounted for. This does not affect any other threads as only the idle threads "run" while the CPU is in C2+ with the TSC effectively paused. The new default means that the idle threads will now have the proper runtime, however. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 21:16:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CBEAE97A; Thu, 29 Jan 2015 21:16:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B86D9ACF; Thu, 29 Jan 2015 21:16:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0TLGkT5044330; Thu, 29 Jan 2015 21:16:46 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0TLGkm7044329; Thu, 29 Jan 2015 21:16:46 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501292116.t0TLGkm7044329@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 29 Jan 2015 21:16:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277901 - head/sys/libkern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 21:16:46 -0000 Author: dim Date: Thu Jan 29 21:16:45 2015 New Revision: 277901 URL: https://svnweb.freebsd.org/changeset/base/277901 Log: Fix a -Wcast-qual warning in libkern's strtol(), by using __DECONST. No functional change. MFC after: 3 days Modified: head/sys/libkern/strtol.c Modified: head/sys/libkern/strtol.c ============================================================================== --- head/sys/libkern/strtol.c Thu Jan 29 20:41:42 2015 (r277900) +++ head/sys/libkern/strtol.c Thu Jan 29 21:16:45 2015 (r277901) @@ -124,6 +124,6 @@ strtol(nptr, endptr, base) } else if (neg) acc = -acc; if (endptr != 0) - *((const char **)endptr) = any ? s - 1 : nptr; + *endptr = __DECONST(char *, any ? s - 1 : nptr); return (acc); } From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 21:38:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6653EE6C; Thu, 29 Jan 2015 21:38:57 +0000 (UTC) Received: from vps.hungerhost.com (vps.hungerhost.com [216.38.53.176]) (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 3AFB7CBA; Thu, 29 Jan 2015 21:38:56 +0000 (UTC) Received: from [69.38.252.84] (port=35350 helo=[172.16.19.1]) by vps.hungerhost.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.82) (envelope-from ) id 1YGwne-0002D1-81; Thu, 29 Jan 2015 16:38:55 -0500 From: "George Neville-Neil" To: "Andrew Turner" Subject: Re: svn commit: r277835 - in head: lib/libpmc sys/arm/arm sys/arm/include sys/arm/ti sys/conf sys/dev/hwpmc sys/sys Date: Thu, 29 Jan 2015 16:38:43 -0500 Message-ID: In-Reply-To: <20150128192719.2baf6145@bender> References: <201501281608.t0SG88gs009253@svn.freebsd.org> <1422462903.15718.60.camel@freebsd.org> <20150128183913.GA44243@bsdpad.com> <20150128192719.2baf6145@bender> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Mailer: MailMate (1.8r5035) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vps.hungerhost.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - neville-neil.com X-Get-Message-Sender-Via: vps.hungerhost.com: authenticated_id: gnn@neville-neil.com Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Ruslan Bukin , src-committers@freebsd.org, Ian Lepore X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 21:38:57 -0000 On 28 Jan 2015, at 14:27, Andrew Turner wrote: > On Wed, 28 Jan 2015 18:39:13 +0000 > Ruslan Bukin wrote: >> On Wed, Jan 28, 2015 at 09:35:03AM -0700, Ian Lepore wrote: >>> Just from a quick glance at the part that wasn't truncated, I >>> notice all the inline asm stuff is wrong -- it duplicates what's >>> already available in cpu-v6.h. >>> >> >> I had a conversation with Andrew this morning, he pointed me out >> those defines in cpu-v6.h, but we agreed those are optional stuff. >> I.e. duplicates != wrong. I'll fix that. Thanks > > It would be useful to use them, but this will need Makefile changes as > some of these defines are only available when __ARM_ARCH > 6 which may > not be true in userland. If we do make these changes we then need to > make sure that none of the code on the file built as ARMv7 is run on > an > ARMv6 as the compiler may choose to use invalid instructions on v6. I gather what is referred to here as defines are the macros that Ian (I think) added for access to the pmc and other fancy registers? I see that the hwpmc code has asm directly in it. Best, George From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 21:54:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D3C833E5; Thu, 29 Jan 2015 21:54:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C05A2E79; Thu, 29 Jan 2015 21:54:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0TLs2sY062954; Thu, 29 Jan 2015 21:54:02 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0TLs2Nw062949; Thu, 29 Jan 2015 21:54:02 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501292154.t0TLs2Nw062949@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 29 Jan 2015 21:54:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277903 - head/sys/libkern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 21:54:02 -0000 Author: dim Date: Thu Jan 29 21:54:01 2015 New Revision: 277903 URL: https://svnweb.freebsd.org/changeset/base/277903 Log: Similar to r277901, fix more -Wcast-qual warnings in libkern's strtoq(), strtoul() and strtouq(), by using __DECONST. No functional change. MFC after: 3 days Modified: head/sys/libkern/strtoq.c head/sys/libkern/strtoul.c head/sys/libkern/strtouq.c Modified: head/sys/libkern/strtoq.c ============================================================================== --- head/sys/libkern/strtoq.c Thu Jan 29 21:31:29 2015 (r277902) +++ head/sys/libkern/strtoq.c Thu Jan 29 21:54:01 2015 (r277903) @@ -125,6 +125,6 @@ strtoq(const char *nptr, char **endptr, } else if (neg) acc = -acc; if (endptr != 0) - *((const char **)endptr) = any ? s - 1 : nptr; + *endptr = __DECONST(char *, any ? s - 1 : nptr); return (acc); } Modified: head/sys/libkern/strtoul.c ============================================================================== --- head/sys/libkern/strtoul.c Thu Jan 29 21:31:29 2015 (r277902) +++ head/sys/libkern/strtoul.c Thu Jan 29 21:54:01 2015 (r277903) @@ -103,6 +103,6 @@ strtoul(nptr, endptr, base) } else if (neg) acc = -acc; if (endptr != 0) - *((const char **)endptr) = any ? s - 1 : nptr; + *endptr = __DECONST(char *, any ? s - 1 : nptr); return (acc); } Modified: head/sys/libkern/strtouq.c ============================================================================== --- head/sys/libkern/strtouq.c Thu Jan 29 21:31:29 2015 (r277902) +++ head/sys/libkern/strtouq.c Thu Jan 29 21:54:01 2015 (r277903) @@ -102,6 +102,6 @@ strtouq(const char *nptr, char **endptr, } else if (neg) acc = -acc; if (endptr != 0) - *((const char **)endptr) = any ? s - 1 : nptr; + *endptr = __DECONST(char *, any ? s - 1 : nptr); return (acc); } From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 22:49:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 88511E6C; Thu, 29 Jan 2015 22:49:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68CA463C; Thu, 29 Jan 2015 22:49:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0TMnVb5087047; Thu, 29 Jan 2015 22:49:31 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0TMnUhi087043; Thu, 29 Jan 2015 22:49:30 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201501292249.t0TMnUhi087043@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Thu, 29 Jan 2015 22:49:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277904 - head/usr.sbin/config X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 22:49:31 -0000 Author: rodrigc Date: Thu Jan 29 22:49:30 2015 New Revision: 277904 URL: https://svnweb.freebsd.org/changeset/base/277904 Log: Add -s option to config. This option allows for specifying the directory to use as the location for kernel source files. This option was ported from NetBSD. GitHub Pull Request: https://github.com/freebsd/freebsd/pull/18 Submitted by: Steve Kiernan , Simon Gerraty Obtained from: Juniper Networks, Inc. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D1722 Relnotes: yes Modified: head/usr.sbin/config/config.8 head/usr.sbin/config/main.c Modified: head/usr.sbin/config/config.8 ============================================================================== --- head/usr.sbin/config/config.8 Thu Jan 29 21:54:01 2015 (r277903) +++ head/usr.sbin/config/config.8 Thu Jan 29 22:49:30 2015 (r277904) @@ -39,6 +39,7 @@ .Op Fl CVgp .Op Fl I Ar path .Op Fl d Ar destdir +.Op Fl s Ar srcdir .Ar SYSTEM_NAME .Nm .Op Fl x Ar kernel @@ -85,6 +86,10 @@ Note that does not append .Ar SYSTEM_NAME to the directory given. +.It Fl s Ar srcdir +Use +.Ar srcdir +as the source directory, instead of the default one. .It Fl m Print the MACHINE and MACHINE_ARCH values for this kernel and exit. @@ -143,6 +148,14 @@ header files, definitions of the number of various devices that will be compiled into the system. .Pp +The +.Nm +utility looks for kernel sources in the directory +.Pa ../.. +or the one given with the +.Fl s +option. +.Pp After running .Nm , it is necessary to run Modified: head/usr.sbin/config/main.c ============================================================================== --- head/usr.sbin/config/main.c Thu Jan 29 21:54:01 2015 (r277903) +++ head/usr.sbin/config/main.c Thu Jan 29 22:49:30 2015 (r277904) @@ -116,7 +116,7 @@ main(int argc, char **argv) printmachine = 0; kernfile = NULL; SLIST_INIT(&includepath); - while ((ch = getopt(argc, argv, "CI:d:gmpVx:")) != -1) + while ((ch = getopt(argc, argv, "CI:d:gmpsVx:")) != -1) switch (ch) { case 'C': filebased = 1; @@ -144,6 +144,12 @@ main(int argc, char **argv) case 'p': profiling++; break; + case 's': + if (*srcdir == '\0') + strlcpy(srcdir, optarg, sizeof(srcdir)); + else + errx(EXIT_FAILURE, "src directory already set"); + break; case 'V': printf("%d\n", CONFIGVERS); exit(0); @@ -180,7 +186,8 @@ main(int argc, char **argv) len = strlen(destdir); while (len > 1 && destdir[len - 1] == '/') destdir[--len] = '\0'; - get_srcdir(); + if (*srcdir == '\0') + get_srcdir(); } else { strlcpy(destdir, CDIR, sizeof(destdir)); strlcat(destdir, PREFIX, sizeof(destdir)); @@ -275,7 +282,8 @@ static void usage(void) { - fprintf(stderr, "usage: config [-CgmpV] [-d destdir] sysname\n"); + fprintf(stderr, + "usage: config [-CgmpV] [-d destdir] [-s srcdir] sysname\n"); fprintf(stderr, " config -x kernel\n"); exit(EX_USAGE); } From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 01:04:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BF025632; Fri, 30 Jan 2015 01:04:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A999564E; Fri, 30 Jan 2015 01:04:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0U14IIr054286; Fri, 30 Jan 2015 01:04:18 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0U14I0n054285; Fri, 30 Jan 2015 01:04:18 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201501300104.t0U14I0n054285@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Fri, 30 Jan 2015 01:04:18 +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: r277905 - stable/10/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 01:04:18 -0000 Author: smh Date: Fri Jan 30 01:04:17 2015 New Revision: 277905 URL: https://svnweb.freebsd.org/changeset/base/277905 Log: MFC r276446: Use the correct state name for unavailable pools in zpool list Sponsored by: Multiplay Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Thu Jan 29 22:49:30 2015 (r277904) +++ stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Fri Jan 30 01:04:17 2015 (r277905) @@ -256,7 +256,8 @@ zpool_get_prop(zpool_handle_t *zhp, zpoo break; case ZPOOL_PROP_HEALTH: - (void) strlcpy(buf, "FAULTED", len); + (void) strlcpy(buf, + zpool_pool_state_to_name(POOL_STATE_UNAVAIL), len); break; case ZPOOL_PROP_GUID: From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 01:05:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE62E770; Fri, 30 Jan 2015 01:05:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C94A865C; Fri, 30 Jan 2015 01:05:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0U15pSC054709; Fri, 30 Jan 2015 01:05:51 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0U15pLS054708; Fri, 30 Jan 2015 01:05:51 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201501300105.t0U15pLS054708@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Fri, 30 Jan 2015 01:05:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277906 - stable/10/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 01:05:52 -0000 Author: smh Date: Fri Jan 30 01:05:50 2015 New Revision: 277906 URL: https://svnweb.freebsd.org/changeset/base/277906 Log: MFC r277239: Eliminate illumos whole disk special case when searching for a ZFS vdev Sponsored by: Multiplay Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Fri Jan 30 01:04:17 2015 (r277905) +++ stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Fri Jan 30 01:05:50 2015 (r277906) @@ -1916,6 +1916,7 @@ zpool_scan(zpool_handle_t *zhp, pool_sca } } +#ifdef illumos /* * This provides a very minimal check whether a given string is likely a * c#t#d# style string. Users of this are expected to do their own @@ -1947,6 +1948,7 @@ ctd_check_path(char *str) { } return (CTD_CHECK(str)); } +#endif /* * Find a vdev that matches the search criteria specified. We use the @@ -2002,6 +2004,7 @@ vdev_to_nvlist_iter(nvlist_t *nv, nvlist * * Otherwise, all other searches are simple string compares. */ +#ifdef illumos if (strcmp(srchkey, ZPOOL_CONFIG_PATH) == 0 && ctd_check_path(val)) { uint64_t wholedisk = 0; @@ -2041,6 +2044,9 @@ vdev_to_nvlist_iter(nvlist_t *nv, nvlist break; } } else if (strcmp(srchkey, ZPOOL_CONFIG_TYPE) == 0 && val) { +#else + if (strcmp(srchkey, ZPOOL_CONFIG_TYPE) == 0 && val) { +#endif char *type, *idx, *end, *p; uint64_t id, vdev_id; From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 01:13:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 94C14929; Fri, 30 Jan 2015 01:13:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8046D789; Fri, 30 Jan 2015 01:13:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0U1D8pS059484; Fri, 30 Jan 2015 01:13:08 GMT (envelope-from yongari@FreeBSD.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0U1D84o059483; Fri, 30 Jan 2015 01:13:08 GMT (envelope-from yongari@FreeBSD.org) Message-Id: <201501300113.t0U1D84o059483@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: yongari set sender to yongari@FreeBSD.org using -f From: Pyun YongHyeon Date: Fri, 30 Jan 2015 01:13:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277907 - head/sys/dev/alc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 01:13:08 -0000 Author: yongari Date: Fri Jan 30 01:13:07 2015 New Revision: 277907 URL: https://svnweb.freebsd.org/changeset/base/277907 Log: Correct device description message. Modified: head/sys/dev/alc/if_alc.c Modified: head/sys/dev/alc/if_alc.c ============================================================================== --- head/sys/dev/alc/if_alc.c Fri Jan 30 01:05:50 2015 (r277906) +++ head/sys/dev/alc/if_alc.c Fri Jan 30 01:13:07 2015 (r277907) @@ -114,11 +114,11 @@ static struct alc_ident alc_ident_table[ { VENDORID_ATHEROS, DEVICEID_ATHEROS_AR8161, 9 * 1024, "Atheros AR8161 PCIe Gigabit Ethernet" }, { VENDORID_ATHEROS, DEVICEID_ATHEROS_AR8162, 9 * 1024, - "Atheros AR8161 PCIe Fast Ethernet" }, + "Atheros AR8162 PCIe Fast Ethernet" }, { VENDORID_ATHEROS, DEVICEID_ATHEROS_AR8171, 9 * 1024, - "Atheros AR8161 PCIe Gigabit Ethernet" }, + "Atheros AR8171 PCIe Gigabit Ethernet" }, { VENDORID_ATHEROS, DEVICEID_ATHEROS_AR8172, 9 * 1024, - "Atheros AR8161 PCIe Fast Ethernet" }, + "Atheros AR8172 PCIe Fast Ethernet" }, { VENDORID_ATHEROS, DEVICEID_ATHEROS_E2200, 9 * 1024, "Killer E2200 Gigabit Ethernet" }, { 0, 0, 0, NULL} From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 03:17:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3984C983; Fri, 30 Jan 2015 03:17:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 255853B4; Fri, 30 Jan 2015 03:17:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0U3H8Jm020408; Fri, 30 Jan 2015 03:17:08 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0U3H8nL020407; Fri, 30 Jan 2015 03:17:08 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501300317.t0U3H8nL020407@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 30 Jan 2015 03:17:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277908 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 03:17:08 -0000 Author: emaste Date: Fri Jan 30 03:17:07 2015 New Revision: 277908 URL: https://svnweb.freebsd.org/changeset/base/277908 Log: Add note that contigfree(9) does not accept NULL Differential Revision: https://reviews.freebsd.org/D1721 Modified: head/share/man/man9/contigmalloc.9 Modified: head/share/man/man9/contigmalloc.9 ============================================================================== --- head/share/man/man9/contigmalloc.9 Fri Jan 30 01:13:07 2015 (r277907) +++ head/share/man/man9/contigmalloc.9 Fri Jan 30 03:17:07 2015 (r277908) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 19, 2007 +.Dd January 29, 2015 .Dt CONTIGMALLOC 9 .Os .Sh NAME @@ -100,6 +100,13 @@ However, unless .Dv M_NOWAIT is specified, it may select a page for reclamation that must first be written to backing storage, causing it to sleep. +.Pp +The +.Fn contigfree +function does not accept +.Dv NULL +as an address input, unlike +.Xr free 9 . .Sh RETURN VALUES The .Fn contigmalloc From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 03:34:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4968EB55; Fri, 30 Jan 2015 03:34:47 +0000 (UTC) Received: from mail-wi0-x22b.google.com (mail-wi0-x22b.google.com [IPv6:2a00:1450:400c:c05::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D65BA765; Fri, 30 Jan 2015 03:34:46 +0000 (UTC) Received: by mail-wi0-f171.google.com with SMTP id l15so274313wiw.4; Thu, 29 Jan 2015 19:34:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=9bdWMTUdYlpYDmO15NqN4omsSLY726/FQ5ItSRcum6Q=; b=sY2MpDE86+4TWi+vO8+g+lTzaGUas9fV50X/VLfWrhfMLtwRTFC8uDNHF+111cRLAG /mvtl534wGasarLaRyjuE6HEP7npQEMxUYJ6RAfVbF13eI0jwnGfqAUbaNJqmP2+cHBm ZchEIuYM3lPWcDCl0GVZtFW2fIqyhlBBKOEj0T+tXWJOjX/m8HuYRDiPrfv/aJji1NNy qJjnNwIQbGD8b+eCVW5gJyolrCJTEQE7SD77Ahv/XZPAgIS9Ig/rIqBMgBZm89RGTP+c U3tBGKnnuMpG5o6S5ciwTBbYCeLuWWT/n+iQrG1v4KstcXBk/pC0flh3o0OEFYgpy02t lhtQ== MIME-Version: 1.0 X-Received: by 10.180.205.163 with SMTP id lh3mr533264wic.63.1422588885249; Thu, 29 Jan 2015 19:34:45 -0800 (PST) Received: by 10.27.77.141 with HTTP; Thu, 29 Jan 2015 19:34:45 -0800 (PST) In-Reply-To: <201501300317.t0U3H8nL020407@svn.freebsd.org> References: <201501300317.t0U3H8nL020407@svn.freebsd.org> Date: Thu, 29 Jan 2015 22:34:45 -0500 Message-ID: Subject: Re: svn commit: r277908 - head/share/man/man9 From: Benjamin Kaduk To: Ed Maste Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 03:34:47 -0000 On Thu, Jan 29, 2015 at 10:17 PM, Ed Maste wrote: > Author: emaste > Date: Fri Jan 30 03:17:07 2015 > New Revision: 277908 > URL: https://svnweb.freebsd.org/changeset/base/277908 > > Log: > Add note that contigfree(9) does not accept NULL > Wouldn't it be like a two-line patch to change contigfree(9) to permit NULL as an argument? Would it be better to do that? -Ben From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 03:51:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 36D5FF36; Fri, 30 Jan 2015 03:51:25 +0000 (UTC) Received: from mail-lb0-x22f.google.com (mail-lb0-x22f.google.com [IPv6:2a00:1450:4010:c04::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C858F8FE; Fri, 30 Jan 2015 03:51:24 +0000 (UTC) Received: by mail-lb0-f175.google.com with SMTP id 10so34440697lbg.6; Thu, 29 Jan 2015 19:51:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=DYl3Ueqc8i7yMHoCCi8Qv9BCu8vMM2ip3/kUxSW7kug=; b=XBOfuZaYWyXaTWNo2HdxkuOASLpcEBKuLApYtFhvQUU9dTrZ718EFBRomPm+wHDqUi Y96Hkxy694GgtXv7Q4rizgIeQY7yEM27egSgBU6OMJ2rt5OyNgyallnGv/PHCPFJYmXp Bl7RYpT2AhL/+O9frWCyb82gV1Hu9VtVyxcX+8sY8Pp9ifHJZZKyxfnswPv2H7t9dFl4 wcBVUM5abEm41g9Z8465+Ezgax9zZAC9mTLUnRyYEPKMMmCXSbOPApsK2Q+YhWkOPwMn 2YcOuCSL78KHV6yb9udNpA0qD89sb1EOr5TiZ/vwgBoc9sEVE16MIp2cgDVVdn52AxFv kqew== MIME-Version: 1.0 X-Received: by 10.112.220.36 with SMTP id pt4mr4346656lbc.15.1422589882882; Thu, 29 Jan 2015 19:51:22 -0800 (PST) Received: by 10.114.78.131 with HTTP; Thu, 29 Jan 2015 19:51:22 -0800 (PST) In-Reply-To: <8728880.CZu0UL854D@ralph.baldwin.cx> References: <201501292041.t0TKfhAJ029429@svn.freebsd.org> <8728880.CZu0UL854D@ralph.baldwin.cx> Date: Thu, 29 Jan 2015 22:51:22 -0500 Message-ID: Subject: Re: svn commit: r277900 - head/sys/x86/x86 From: Ryan Stone To: John Baldwin Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 03:51:25 -0000 On Thu, Jan 29, 2015 at 3:45 PM, John Baldwin wrote: > Also, note that we always use the TSC as the cpu ticker, even if it is not the > timecounter. Thus, if C2+ is enabled on the systems, the kernel idle threads > will have an artificially low runtime since their idle time is not properly > accounted for. This does not affect any other threads as only the idle > threads "run" while the CPU is in C2+ with the TSC effectively paused. The > new default means that the idle threads will now have the proper runtime, > however. However in a VM environment this means that runtimes for all threads can be very wrong (regardless of whether we enter C2 or lower or not). I have a coworker looking at using kvmclock in preference to TSC for the cpu ticker when the kvmclock is available. From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 04:11:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AA5B126E; Fri, 30 Jan 2015 04:11:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 95961AB8; Fri, 30 Jan 2015 04:11:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0U4BVIA047422; Fri, 30 Jan 2015 04:11:31 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0U4BVoE047421; Fri, 30 Jan 2015 04:11:31 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201501300411.t0U4BVoE047421@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 30 Jan 2015 04:11:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277909 - head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 04:11:31 -0000 Author: markj Date: Fri Jan 30 04:11:30 2015 New Revision: 277909 URL: https://svnweb.freebsd.org/changeset/base/277909 Log: When searching for an accompanying test program, look in the directory containing the test script rather than the current directory. This is needed in order to run the DTrace tests under Kyua. MFC after: 1 week Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl Fri Jan 30 03:17:07 2015 (r277908) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl Fri Jan 30 04:11:30 2015 (r277909) @@ -273,7 +273,7 @@ sub run_tests { } $fullname = "$dir/$name"; - $exe = "./$base.exe"; + $exe = "$dir/$base.exe"; $exe_pid = -1; if ($opt_a && ($status != 0 || $tag != 0 || $droptag != 0 || From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 04:14:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 09B523D7; Fri, 30 Jan 2015 04:14:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0719ACF; Fri, 30 Jan 2015 04:14:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0U4EK12050910; Fri, 30 Jan 2015 04:14:20 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0U4EJb3050904; Fri, 30 Jan 2015 04:14:19 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201501300414.t0U4EJb3050904@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 30 Jan 2015 04:14:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277910 - in head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common: pid proc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 04:14:21 -0000 Author: markj Date: Fri Jan 30 04:14:19 2015 New Revision: 277910 URL: https://svnweb.freebsd.org/changeset/base/277910 Log: Use the correct field when reading the PID out of a struct proc. MFC after: 1 week Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.fork.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.vfork.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.discard.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.signal.ksh Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.fork.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.fork.d Fri Jan 30 04:11:30 2015 (r277909) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.fork.d Fri Jan 30 04:14:19 2015 (r277910) @@ -44,7 +44,7 @@ pid$1:a.out:waiting:entry proc:::create /pid == $1/ { - child = args[0]->pr_pid; + child = args[0]->p_pid; trace(pid); } Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.vfork.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.vfork.d Fri Jan 30 04:11:30 2015 (r277909) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.vfork.d Fri Jan 30 04:14:19 2015 (r277910) @@ -44,7 +44,7 @@ pid$1:a.out:waiting:entry proc:::create /pid == $1/ { - child = args[0]->pr_pid; + child = args[0]->p_pid; } pid$1:a.out:go: Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.discard.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.discard.ksh Fri Jan 30 04:11:30 2015 (r277909) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.discard.ksh Fri Jan 30 04:14:19 2015 (r277910) @@ -36,7 +36,7 @@ script() { $dtrace -s /dev/stdin <pr_pid == $child && + /args[1]->p_pid == $child && args[1]->pr_psargs == "$longsleep" && args[2] == SIGHUP/ { exit(0); Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.signal.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.signal.ksh Fri Jan 30 04:11:30 2015 (r277909) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.signal.ksh Fri Jan 30 04:14:19 2015 (r277910) @@ -42,7 +42,7 @@ script() /* * This is guaranteed to not race with signal-handle. */ - target = args[1]->pr_pid; + target = args[1]->p_pid; } proc:::signal-handle From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 04:30:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1BC58718; Fri, 30 Jan 2015 04:30:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05138BEA; Fri, 30 Jan 2015 04:30:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0U4UMNp058763; Fri, 30 Jan 2015 04:30:22 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0U4UJGT057185; Fri, 30 Jan 2015 04:30:19 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201501300430.t0U4UJGT057185@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 30 Jan 2015 04:30:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277911 - in head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common: inline misc offsetof print probes profile-n scalars X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 04:30:23 -0000 Author: markj Date: Fri Jan 30 04:30:18 2015 New Revision: 277911 URL: https://svnweb.freebsd.org/changeset/base/277911 Log: Replace Solaris identifiers and types with their FreeBSD equivalents. MFC after: 1 week Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/inline/err.D_OP_INCOMPAT.baddef1.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/inline/err.D_OP_INCOMPAT.badxlate.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.roch.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/offsetof/err.D_UNKNOWN.badmemb.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_VOID.bad.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d.out head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/probes/tst.probestar.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.func.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.mod.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.sym.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scalars/tst.selfarray2.d Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/inline/err.D_OP_INCOMPAT.baddef1.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/inline/err.D_OP_INCOMPAT.baddef1.d Fri Jan 30 04:14:19 2015 (r277910) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/inline/err.D_OP_INCOMPAT.baddef1.d Fri Jan 30 04:30:18 2015 (r277911) @@ -38,4 +38,4 @@ * */ -inline cyc_func_t i = "i am a cyclic function"; +inline dtrace_trap_func_t i = "i am a dtrace trap function"; Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/inline/err.D_OP_INCOMPAT.badxlate.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/inline/err.D_OP_INCOMPAT.badxlate.d Fri Jan 30 04:14:19 2015 (r277910) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/inline/err.D_OP_INCOMPAT.badxlate.d Fri Jan 30 04:30:18 2015 (r277911) @@ -38,4 +38,4 @@ * */ -inline vfs_t *invalid = xlate(curthread->t_procp); +inline struct vnode *invalid = xlate(curthread->td_proc); Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.roch.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.roch.d Fri Jan 30 04:14:19 2015 (r277910) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.roch.d Fri Jan 30 04:30:18 2015 (r277911) @@ -74,13 +74,13 @@ fbt:::return (long long)curthread, pid, tid, (int)arg1, (int)arg0); } -mutex_enter:adaptive-acquire +mtx_lock:adaptive-acquire { printf(" %u 0x%llX %d %d lock:0x%llX", timestamp, (long long)curthread, pid, tid, arg0); } -mutex_exit:adaptive-release +mtx_unlock:adaptive-release { printf(" %u 0x%llX %d %d lock:0x%llX", timestamp, (long long) curthread, pid, tid, arg0); Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/offsetof/err.D_UNKNOWN.badmemb.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/offsetof/err.D_UNKNOWN.badmemb.d Fri Jan 30 04:14:19 2015 (r277910) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/offsetof/err.D_UNKNOWN.badmemb.d Fri Jan 30 04:30:18 2015 (r277911) @@ -40,5 +40,5 @@ BEGIN { - trace(offsetof(vnode_t, v_no_such_member)); + trace(offsetof(struct vnode, v_no_such_member)); } Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_VOID.bad.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_VOID.bad.d Fri Jan 30 04:14:19 2015 (r277910) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_VOID.bad.d Fri Jan 30 04:30:18 2015 (r277911) @@ -25,7 +25,7 @@ BEGIN { - print((void)`p0); + print((void)`proc0); } BEGIN Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d Fri Jan 30 04:14:19 2015 (r277910) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d Fri Jan 30 04:30:18 2015 (r277911) @@ -22,13 +22,13 @@ typedef struct pancakes { int i; string s; - timespec_t t; + struct timespec t; } pancakes_t; translator pancakes_t < void *V > { i = 2 * 10; s = strjoin("I like ", "pancakes"); - t = *(timespec_t *)`dtrace_zero; + t = *(struct timespec *)`dtrace_zero; }; BEGIN Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d.out ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d.out Fri Jan 30 04:14:19 2015 (r277910) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d.out Fri Jan 30 04:30:18 2015 (r277911) @@ -1,7 +1,7 @@ pancakes_t { int i = 0x14 string s = [ "I like pancakes" ] - timespec_t t = { + struct timespec t = { time_t tv_sec = 0 long tv_nsec = 0 } Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/probes/tst.probestar.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/probes/tst.probestar.d Fri Jan 30 04:14:19 2015 (r277910) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/probes/tst.probestar.d Fri Jan 30 04:30:18 2015 (r277911) @@ -44,7 +44,7 @@ BEGIN i = 0; } -syscall::*lwp*:entry +syscall::*wait*:entry { exit(0); } Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.func.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.func.ksh Fri Jan 30 04:14:19 2015 (r277910) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.func.ksh Fri Jan 30 04:30:18 2015 (r277911) @@ -60,14 +60,14 @@ spinny & child=$! # -# This is gutsy -- we're assuming that mutex_enter(9F) will show up in the +# This is gutsy -- we're assuming that mtx_lock(9) will show up in the # output. This is most likely _not_ to show up in the output if the # platform does not support arbitrary resolution interval timers -- but # the above script was stress-tested down to 100 hertz and still ran # successfully on all platforms, so one is hopeful that this test will pass # even in that case. # -script | tee /dev/fd/2 | grep mutex_enter > /dev/null +script | tee /dev/fd/2 | grep mtx_lock > /dev/null status=$? kill $child Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.mod.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.mod.ksh Fri Jan 30 04:14:19 2015 (r277910) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.mod.ksh Fri Jan 30 04:30:18 2015 (r277911) @@ -63,7 +63,7 @@ child=$! # The only thing we can be sure of is that some module named "unix" (or # "genunix") did some work -- so that's all we'll check. # -script | tee /dev/fd/2 | grep unix > /dev/null +script | tee /dev/fd/2 | grep kernel > /dev/null status=$? kill $child Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.sym.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.sym.ksh Fri Jan 30 04:14:19 2015 (r277910) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.sym.ksh Fri Jan 30 04:30:18 2015 (r277911) @@ -63,7 +63,7 @@ child=$! # This is the same gutsy test as that found in the func() test; see that # test for the rationale. # -script | tee /dev/fd/2 | grep mutex_enter > /dev/null +script | tee /dev/fd/2 | grep mtx_lock > /dev/null status=$? kill $child Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scalars/tst.selfarray2.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scalars/tst.selfarray2.d Fri Jan 30 04:14:19 2015 (r277910) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scalars/tst.selfarray2.d Fri Jan 30 04:30:18 2015 (r277911) @@ -31,8 +31,8 @@ #pragma D option dynvarsize=1m struct bar { - int pid; - kthread_t *curthread; + pid_t pid; + struct thread *curthread; }; self struct bar foo[int]; From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 04:38:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 02B038E4; Fri, 30 Jan 2015 04:38:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E0ECACB0; Fri, 30 Jan 2015 04:38:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0U4c0cZ061854; Fri, 30 Jan 2015 04:38:00 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0U4bwUo061831; Fri, 30 Jan 2015 04:37:58 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201501300437.t0U4bwUo061831@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 30 Jan 2015 04:37:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277912 - in head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common: json nfs pid syscall usdt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 04:38:01 -0000 Author: markj Date: Fri Jan 30 04:37:57 2015 New Revision: 277912 URL: https://svnweb.freebsd.org/changeset/base/277912 Log: Include required headers in DTrace test programs. MFC after: 1 week Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/tst.usdt.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/nfs/tst.call3.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.args1.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.gcc.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret1.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret2.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak1.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak2.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.forker.c Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/tst.usdt.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/tst.usdt.c Fri Jan 30 04:30:18 2015 (r277911) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/tst.usdt.c Fri Jan 30 04:37:57 2015 (r277912) @@ -14,6 +14,8 @@ */ #include +#include +#include #include "usdt.h" #define FMT "{" \ Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/nfs/tst.call3.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/nfs/tst.call3.c Fri Jan 30 04:30:18 2015 (r277911) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/nfs/tst.call3.c Fri Jan 30 04:37:57 2015 (r277912) @@ -28,6 +28,7 @@ #include #include +#include #include #include #include Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.args1.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.args1.c Fri Jan 30 04:30:18 2015 (r277911) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.args1.c Fri Jan 30 04:37:57 2015 (r277912) @@ -27,6 +27,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" #include +#include #include int Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.gcc.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.gcc.c Fri Jan 30 04:30:18 2015 (r277911) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.gcc.c Fri Jan 30 04:37:57 2015 (r277912) @@ -26,6 +26,8 @@ #pragma ident "%Z%%M% %I% %E% SMI" +#include +#include #include #include #include Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret1.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret1.c Fri Jan 30 04:30:18 2015 (r277911) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret1.c Fri Jan 30 04:37:57 2015 (r277912) @@ -27,6 +27,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" #include +#include #include /* Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret2.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret2.c Fri Jan 30 04:30:18 2015 (r277911) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret2.c Fri Jan 30 04:37:57 2015 (r277912) @@ -27,6 +27,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" #include +#include #include /* Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak1.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak1.c Fri Jan 30 04:30:18 2015 (r277911) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak1.c Fri Jan 30 04:37:57 2015 (r277912) @@ -27,6 +27,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" #include +#include #include /* Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak2.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak2.c Fri Jan 30 04:30:18 2015 (r277911) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak2.c Fri Jan 30 04:37:57 2015 (r277912) @@ -27,6 +27,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" #include +#include #include /* Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c Fri Jan 30 04:30:18 2015 (r277911) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c Fri Jan 30 04:37:57 2015 (r277912) @@ -28,6 +28,7 @@ #include #include +#include /*ARGSUSED*/ int Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.forker.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.forker.c Fri Jan 30 04:30:18 2015 (r277911) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.forker.c Fri Jan 30 04:37:57 2015 (r277912) @@ -26,6 +26,10 @@ #pragma ident "%Z%%M% %I% %E% SMI" +#include +#include + +#include #include #include "forker.h" From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 04:41:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CFFC8A7B; Fri, 30 Jan 2015 04:41:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2C5FCC9; Fri, 30 Jan 2015 04:41:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0U4fomU065457; Fri, 30 Jan 2015 04:41:50 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0U4fnxL065452; Fri, 30 Jan 2015 04:41:49 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201501300441.t0U4fnxL065452@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 30 Jan 2015 04:41:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277913 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/lexer X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 04:41:50 -0000 Author: markj Date: Fri Jan 30 04:41:49 2015 New Revision: 277913 URL: https://svnweb.freebsd.org/changeset/base/277913 Log: The DTrace harness (dtest.pl) executes DTrace scripts with the -C flag, which causes dtrace(1) to run the C preprocessor on input scripts before executing them. Suppress some warnings emitted by the preprocessor which are confusing the DTrace lexer tests. MFC after: 1 week Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/lexer/err.D_CHR_NL.char.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/lexer/err.D_CHR_NULL.char.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/lexer/err.D_STR_NL.string.d Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/lexer/err.D_CHR_NL.char.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/lexer/err.D_CHR_NL.char.d Fri Jan 30 04:37:57 2015 (r277912) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/lexer/err.D_CHR_NL.char.d Fri Jan 30 04:41:49 2015 (r277913) @@ -36,8 +36,10 @@ BEGIN { - +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Winvalid-pp-token" h = ' '; +#pragma clang diagnostic pop exit(0); } Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/lexer/err.D_CHR_NULL.char.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/lexer/err.D_CHR_NULL.char.d Fri Jan 30 04:37:57 2015 (r277912) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/lexer/err.D_CHR_NULL.char.d Fri Jan 30 04:41:49 2015 (r277913) @@ -36,7 +36,9 @@ BEGIN { - +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Winvalid-pp-token" h = ''; exit(0); +#pragma clang diagnostic pop } Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/lexer/err.D_STR_NL.string.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/lexer/err.D_STR_NL.string.d Fri Jan 30 04:37:57 2015 (r277912) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/lexer/err.D_STR_NL.string.d Fri Jan 30 04:41:49 2015 (r277913) @@ -36,9 +36,11 @@ BEGIN { - +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Winvalid-pp-token" h = "hello there"; exit(0); +#pragma clang diagnostic pop } From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 04:51:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CE538C29; Fri, 30 Jan 2015 04:51:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA252E26; Fri, 30 Jan 2015 04:51:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0U4pxVA070995; Fri, 30 Jan 2015 04:51:59 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0U4pxbj070994; Fri, 30 Jan 2015 04:51:59 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201501300451.t0U4pxbj070994@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 30 Jan 2015 04:51:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277914 - head/sys/cddl/contrib/opensolaris/uts/common/dtrace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 04:51:59 -0000 Author: markj Date: Fri Jan 30 04:51:59 2015 New Revision: 277914 URL: https://svnweb.freebsd.org/changeset/base/277914 Log: In fasttrap_sigtrap(), use tdsendsignal() rather than tdksignal() to send SIGTRAP. The latter requires that its thread argument be non-NULL, but fasttrap_sigtrap() does not. PR: 193593 MFC after: 1 week Reported by: danilo Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Fri Jan 30 04:41:49 2015 (r277913) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Fri Jan 30 04:51:59 2015 (r277914) @@ -295,7 +295,7 @@ fasttrap_sigtrap(proc_t *p, kthread_t *t ksi->ksi_code = TRAP_DTRACE; ksi->ksi_addr = (caddr_t)pc; PROC_LOCK(p); - (void) tdksignal(t, SIGTRAP, ksi); + (void) tdsendsignal(p, t, SIGTRAP, ksi); PROC_UNLOCK(p); #endif } From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 05:03:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 43FFDE10; Fri, 30 Jan 2015 05:03:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2FCCCF11; Fri, 30 Jan 2015 05:03:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0U53Oes076514; Fri, 30 Jan 2015 05:03:24 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0U53OUI076513; Fri, 30 Jan 2015 05:03:24 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201501300503.t0U53OUI076513@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 30 Jan 2015 05:03:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277915 - head/sys/cddl/contrib/opensolaris/uts/common/dtrace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 05:03:24 -0000 Author: markj Date: Fri Jan 30 05:03:23 2015 New Revision: 277915 URL: https://svnweb.freebsd.org/changeset/base/277915 Log: Don't attempt to disable enabled fasttrap probes in an exiting process. There's no need to do so, and we can't hold an exiting process, so this race can result in panics. MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Fri Jan 30 04:51:59 2015 (r277914) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Fri Jan 30 05:03:23 2015 (r277915) @@ -1296,8 +1296,13 @@ fasttrap_pid_disable(void *arg, dtrace_i */ if ((p = pfind(probe->ftp_pid)) != NULL) { #ifdef __FreeBSD__ - _PHOLD(p); - PROC_UNLOCK(p); + if (p->p_flag & P_WEXIT) { + PROC_UNLOCK(p); + p = NULL; + } else { + _PHOLD(p); + PROC_UNLOCK(p); + } #endif } From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 05:14:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0490522F; Fri, 30 Jan 2015 05:14:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E44FB85; Fri, 30 Jan 2015 05:14:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0U5E1uX081962; Fri, 30 Jan 2015 05:14:01 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0U5E1CK081961; Fri, 30 Jan 2015 05:14:01 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201501300514.t0U5E1CK081961@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 30 Jan 2015 05:14:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277916 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 05:14:02 -0000 Author: markj Date: Fri Jan 30 05:14:01 2015 New Revision: 277916 URL: https://svnweb.freebsd.org/changeset/base/277916 Log: pause() isn't a system call on FreeBSD; use sigsuspend(2) instead. MFC after: 1 week Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.dlclose1.ksh Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.dlclose1.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.dlclose1.ksh Fri Jan 30 05:03:23 2015 (r277915) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.dlclose1.ksh Fri Jan 30 05:14:01 2015 (r277916) @@ -106,11 +106,13 @@ cat > main.c < #include #include +#include int main(int argc, char **argv) { void *live; + sigset_t mask; if ((live = dlopen("./livelib.so", RTLD_LAZY | RTLD_LOCAL)) == NULL) { printf("dlopen of livelib.so failed: %s\n", dlerror()); @@ -119,7 +121,8 @@ main(int argc, char **argv) (void) dlclose(live); - pause(); + (void) sigemptyset(&mask); + (void) sigsuspend(&mask); return (0); } @@ -133,7 +136,7 @@ fi script() { $dtrace -w -x bufsize=1k -c ./main -qs /dev/stdin < Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1F2A53DC; Fri, 30 Jan 2015 05:23:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F3F6317D; Fri, 30 Jan 2015 05:23:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0U5Nej5087236; Fri, 30 Jan 2015 05:23:40 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0U5NeA6087234; Fri, 30 Jan 2015 05:23:40 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201501300523.t0U5NeA6087234@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Fri, 30 Jan 2015 05:23:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277917 - in head/sys/cam: ctl scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 05:23:41 -0000 Author: ken Date: Fri Jan 30 05:23:39 2015 New Revision: 277917 URL: https://svnweb.freebsd.org/changeset/base/277917 Log: Improve SCSI Extended Inquiry VPD page (0x86) support. sys/cam/scsi/scsi_all.h: In struct scsi_extended_inquiry_data: - Increase the length field to 2 bytes, as it is 2 bytes in SPC-4. - Add bit definitions for the various Activiate Microcode actions. - Add the Sequential Access Logical Block Protection support bit, since we need that in the sa(4) driver. (For modifications that will come later.) - Add definitions for the various Multi I_T Nexus Microcode Download modes. sys/cam/ctl/ctl.c: As of SPC-4, a single report of "REPORTED LUNS DATA HAS CHANGED" is to be given per I_T nexus. Once it is reported, the unit attention condition should be cleared for all LUNS attached to an I_T nexus. Previously that only happened when a REPORT LUNS command was processed. This behavior may be different (according to SAM-5) when the UA_INTLCK_CTRL bits are non-zero in the control mode page but CTL does not currently support that. So, in view of the spec, whenever we report a LUN inventory change unit attention, clear it on all LUNs for that particular I_T nexus. Add a new function, ctl_clear_ua() that will clear a unit attention on all LUNs for the given I_T nexus. One field in the extended inquiry data that we could potentially report at some point is the maximum supported sense data length. To do that, we would the SIM to report (via path inquiry perhaps) how much sense data it is able to send. Add comments to explain some of the bits that are set in the Extended Inquiry VPD page. Add a few comments to make it more clear which functions handle various VPD pages. Sponsored by: Spectra Logic MFC after: 1 week Modified: head/sys/cam/ctl/ctl.c head/sys/cam/scsi/scsi_all.h Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Fri Jan 30 05:14:01 2015 (r277916) +++ head/sys/cam/ctl/ctl.c Fri Jan 30 05:23:39 2015 (r277917) @@ -31,7 +31,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl.c#8 $ + * $Id$ */ /* * CAM Target Layer, a SCSI device emulation subsystem. @@ -446,6 +446,8 @@ static int ctl_scsiio_lun_check(struct c struct ctl_scsiio *ctsio); //static int ctl_check_rtr(union ctl_io *pending_io, struct ctl_softc *softc); static void ctl_failover(void); +static void ctl_clear_ua(struct ctl_softc *ctl_softc, uint32_t initidx, + ctl_ua_type ua_type); static int ctl_scsiio_precheck(struct ctl_softc *ctl_softc, struct ctl_scsiio *ctsio); static int ctl_scsiio(struct ctl_scsiio *ctsio); @@ -9433,6 +9435,7 @@ ctl_request_sense(struct ctl_scsiio *cts { struct scsi_request_sense *cdb; struct scsi_sense_data *sense_ptr; + struct ctl_softc *ctl_softc; struct ctl_lun *lun; uint32_t initidx; int have_error; @@ -9441,6 +9444,7 @@ ctl_request_sense(struct ctl_scsiio *cts cdb = (struct scsi_request_sense *)ctsio->cdb; + ctl_softc = control_softc; lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; CTL_DEBUG_PRINT(("ctl_request_sense\n")); @@ -9526,6 +9530,14 @@ ctl_request_sense(struct ctl_scsiio *cts ua_type = ctl_build_ua(lun, initidx, sense_ptr, sense_format); if (ua_type != CTL_UA_NONE) have_error = 1; + if (ua_type == CTL_UA_LUN_CHANGE) { + mtx_unlock(&lun->lun_lock); + mtx_lock(&ctl_softc->ctl_lock); + ctl_clear_ua(ctl_softc, initidx, ua_type); + mtx_unlock(&ctl_softc->ctl_lock); + mtx_lock(&lun->lun_lock); + } + } mtx_unlock(&lun->lun_lock); @@ -9593,6 +9605,9 @@ ctl_cmddt_inquiry(struct ctl_scsiio *cts } #endif +/* + * SCSI VPD page 0x00, the Supported VPD Pages page. + */ static int ctl_inquiry_evpd_supported(struct ctl_scsiio *ctsio, int alloc_len) { @@ -9665,6 +9680,9 @@ ctl_inquiry_evpd_supported(struct ctl_sc return (CTL_RETVAL_COMPLETE); } +/* + * SCSI VPD page 0x80, the Unit Serial Number page. + */ static int ctl_inquiry_evpd_serial(struct ctl_scsiio *ctsio, int alloc_len) { @@ -9721,6 +9739,9 @@ ctl_inquiry_evpd_serial(struct ctl_scsii } +/* + * SCSI VPD page 0x86, the Extended INQUIRY Data page. + */ static int ctl_inquiry_evpd_eid(struct ctl_scsiio *ctsio, int alloc_len) { @@ -9758,10 +9779,33 @@ ctl_inquiry_evpd_eid(struct ctl_scsiio * else eid_ptr->device = (SID_QUAL_LU_OFFLINE << 5) | T_DIRECT; eid_ptr->page_code = SVPD_EXTENDED_INQUIRY_DATA; - eid_ptr->page_length = data_len - 4; + scsi_ulto2b(data_len - 4, eid_ptr->page_length); + /* + * We support head of queue, ordered and simple tags. + */ eid_ptr->flags2 = SVPD_EID_HEADSUP | SVPD_EID_ORDSUP | SVPD_EID_SIMPSUP; + /* + * Volatile cache supported. + */ eid_ptr->flags3 = SVPD_EID_V_SUP; + /* + * This means that we clear the REPORTED LUNS DATA HAS CHANGED unit + * attention for a particular IT nexus on all LUNs once we report + * it to that nexus once. This bit is required as of SPC-4. + */ + eid_ptr->flags4 = SVPD_EID_LUICLT; + + /* + * XXX KDM in order to correctly answer this, we would need + * information from the SIM to determine how much sense data it + * can send. So this would really be a path inquiry field, most + * likely. This can be set to a maximum of 252 according to SPC-4, + * but the hardware may or may not be able to support that much. + * 0 just means that the maximum sense data length is not reported. + */ + eid_ptr->max_sense_length = 0; + ctl_set_success(ctsio); ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; ctsio->be_move_done = ctl_config_move_done; @@ -9820,6 +9864,9 @@ ctl_inquiry_evpd_mpp(struct ctl_scsiio * return (CTL_RETVAL_COMPLETE); } +/* + * SCSI VPD page 0x83, the Device Identification page. + */ static int ctl_inquiry_evpd_devid(struct ctl_scsiio *ctsio, int alloc_len) { @@ -10235,6 +10282,9 @@ ctl_inquiry_evpd_lbp(struct ctl_scsiio * return (CTL_RETVAL_COMPLETE); } +/* + * INQUIRY with the EVPD bit set. + */ static int ctl_inquiry_evpd(struct ctl_scsiio *ctsio) { @@ -10299,6 +10349,9 @@ err: return (retval); } +/* + * Standard INQUIRY data. + */ static int ctl_inquiry_std(struct ctl_scsiio *ctsio) { @@ -11468,6 +11521,23 @@ ctl_failover(void) mtx_unlock(&softc->ctl_lock); } +static void +ctl_clear_ua(struct ctl_softc *ctl_softc, uint32_t initidx, + ctl_ua_type ua_type) +{ + struct ctl_lun *lun; + ctl_ua_type *pu; + + mtx_assert(&ctl_softc->ctl_lock, MA_OWNED); + + STAILQ_FOREACH(lun, &ctl_softc->lun_list, links) { + mtx_lock(&lun->lun_lock); + pu = lun->pending_ua[initidx / CTL_MAX_INIT_PER_PORT]; + pu[initidx % CTL_MAX_INIT_PER_PORT] &= ~ua_type; + mtx_unlock(&lun->lun_lock); + } +} + static int ctl_scsiio_precheck(struct ctl_softc *softc, struct ctl_scsiio *ctsio) { Modified: head/sys/cam/scsi/scsi_all.h ============================================================================== --- head/sys/cam/scsi/scsi_all.h Fri Jan 30 05:14:01 2015 (r277916) +++ head/sys/cam/scsi/scsi_all.h Fri Jan 30 05:23:39 2015 (r277917) @@ -2112,10 +2112,15 @@ struct scsi_vpd_extended_inquiry_data uint8_t device; uint8_t page_code; #define SVPD_EXTENDED_INQUIRY_DATA 0x86 - uint8_t reserved; - uint8_t page_length; + uint8_t page_length[2]; uint8_t flags1; -#define SVPD_EID_AM 0xC0 + + /* These values are for direct access devices */ +#define SVPD_EID_AM_MASK 0xC0 +#define SVPD_EID_AM_DEFER 0x80 +#define SVPD_EID_AM_IMMED 0x40 +#define SVPD_EID_AM_UNDEFINED 0x00 +#define SVPD_EID_AM_RESERVED 0xc0 #define SVPD_EID_SPT 0x38 #define SVPD_EID_SPT_1 0x00 #define SVPD_EID_SPT_12 0x08 @@ -2124,9 +2129,14 @@ struct scsi_vpd_extended_inquiry_data #define SVPD_EID_SPT_3 0x20 #define SVPD_EID_SPT_23 0x28 #define SVPD_EID_SPT_123 0x38 + + /* These values are for sequential access devices */ +#define SVPD_EID_SA_SPT_LBP 0x08 + #define SVPD_EID_GRD_CHK 0x04 #define SVPD_EID_APP_CHK 0x02 #define SVPD_EID_REF_CHK 0x01 + uint8_t flags2; #define SVPD_EID_UASK_SUP 0x20 #define SVPD_EID_GROUP_SUP 0x10 @@ -2147,6 +2157,10 @@ struct scsi_vpd_extended_inquiry_data #define SVPD_EID_CBCS 0x01 uint8_t flags6; #define SVPD_EID_MULTI_I_T_FW 0x0F +#define SVPD_EID_MC_VENDOR_SPEC 0x00 +#define SVPD_EID_MC_MODE_1 0x01 +#define SVPD_EID_MC_MODE_2 0x02 +#define SVPD_EID_MC_MODE_3 0x03 uint8_t est[2]; uint8_t flags7; #define SVPD_EID_POA_SUP 0x80 From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 05:47:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CBC5372F; Fri, 30 Jan 2015 05:47:46 +0000 (UTC) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id 7807F365; Fri, 30 Jan 2015 05:47:46 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id D4D30786C4C; Fri, 30 Jan 2015 16:47:31 +1100 (AEDT) Date: Fri, 30 Jan 2015 16:47:26 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Dimitry Andric Subject: Re: svn commit: r277898 - head/sys/fs/msdosfs In-Reply-To: <201501292030.t0TKUEG7021272@svn.freebsd.org> Message-ID: <20150130143552.M1034@besplex.bde.org> References: <201501292030.t0TKUEG7021272@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=baJSDo/B c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=WqrAmHMBs3C9wVo5yAoA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 05:47:46 -0000 On Thu, 29 Jan 2015, Dimitry Andric wrote: > Log: > Fix a bunch of -Wcast-qual warnings in msdosfs_conv.c, by using > __DECONST. No functional change. My flamethrower was not warm enough when __DECONST() was committed. I only removed (never merged) it in my version, and backed out a few early uses of it. > Modified: head/sys/fs/msdosfs/msdosfs_conv.c > ============================================================================== > --- head/sys/fs/msdosfs/msdosfs_conv.c Thu Jan 29 19:55:33 2015 (r277897) > +++ head/sys/fs/msdosfs/msdosfs_conv.c Thu Jan 29 20:30:13 2015 (r277898) > @@ -253,7 +253,7 @@ dos2unixfn(u_char dn[11], u_char *un, in > * Copy the name portion into the unix filename string. > */ > for (i = 8; i > 0 && *dn != ' ';) { > - c = dos2unixchr(tmpbuf, (const u_char **)&dn, &i, > + c = dos2unixchr(tmpbuf, __DECONST(const u_char **, &dn), &i, > lower & LCASE_BASE, pmp); > while (*c != '\0') { > *un++ = *c++; Fixing the API seems to be difficult, except removing its half-baked constification may be considered a fix. The problem is similar to the one for the execv() family but not the one for the strtol() family: the pointer is doubly indirect and has some constness, but neither 1 nor 2 const qualifiers on it works right. 2 const qualifiers for the exec() family would break automatic conversion from non-const data in all cases: int execv_2c(const char *path, char const * const *argv); ... char *myargs[16]; /* non-const ptrs to non-const data */ ... execv_2c(path, &myargs[0]); /* error (can't auto-add inner (first) const) */ Not being allowed to auto-add the inner const is a bug in C's type system. Allowing it would give even larger bugs. 1 (outer) const works for the naive uses of execv(): int execv(const char *path, char *const argv[]); /* actual decl */ ... char *myargs[16]; ... execv_2c(path, &myargs[0]); /* OK */ but this is almost useless. The prototype says that each pointer argv[i] is not modified but the string that it points to may be modified. So you can also have const pointers in myargs (char * const myargs[16]), but not const strings with either const or non-const pointers (char const * [const] myargs[16]). Zero consts also work for the naive use, but not when myargs has any consts. 1 (inner) breaks the naive use much like 2 inner consts: int execv_1inner(const char *path, char const **argv); ... char *myargs[16] ... execv_1inner(path, &myargs[0]); /* error (same as above) */ clang prints a bogus diagnostic about this: X z.c:15:7: warning: passing 'char **' to parameter of type 'const char **' discards qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers] X execv_1inner(&myargs); X ^~~~~~~~~~ The bogusness is that it says that qualifiers are discarded, but they are actually added. This is related to the bug in the type system that would turn adding of qualifiers into discarding them if this addition were allowed. So the diagnostic may be technically correct, but it is confusing. execv_1inner() allows myargs to have const strings (char const *myargs[16]) without any bogus casts being needed. myargs still can't have const pointers. There are additional complications if &myargs[0] is spelled sloppily as &myargs. The consts prevent the latter being auto-converted to the former. dos2unixchr() is like execv_1inner(). Unlike execv(), it has the API that gives more type-safety but is harder to use on non-const strings. Like execv() but with less excuse, it doesn't use 2 consts, so the type safety is not complete. strtol() is quite different. It needs to modify the pointer, so it needs the _1inner variant to give maximum type safety. However, this would be too painful, so both consts are intentionally left out. Re-quoting: > - c = dos2unixchr(tmpbuf, (const u_char **)&dn, &i, > + c = dos2unixchr(tmpbuf, __DECONST(const u_char **, &dn), &i, The 1 const API tells callers that the string is not modified, but it is even more important that the pointer (dn here) is not modified. Correct fix (without changing the API): const char *cdn; ... cdn = dn; c = dos2unixchr(tmpbuf, &cdn), &i, This is painful, but is actually a couple of characters shorter (not counting whitespace). It doesn't matter if the pointer gets clobbered provided we re-initialize it before every call. > @@ -270,8 +270,8 @@ dos2unixfn(u_char dn[11], u_char *un, in > *un++ = '.'; > thislong++; > for (i = 3; i > 0 && *dn != ' ';) { > - c = dos2unixchr(tmpbuf, (const u_char **)&dn, &i, > - lower & LCASE_EXT, pmp); > + c = dos2unixchr(tmpbuf, __DECONST(const u_char **, &dn), > + &i, lower & LCASE_EXT, pmp); > while (*c != '\0') { > *un++ = *c++; > thislong++; msdosfs_conv.c also does many bogus conversions from char to u_char. It has many more bogus (const u_char **) casts than the ones changed to use __DECONST() in this commit, since the pointer is sometimes already const but not already for plain chars. By default, gcc[3.3 through 4.8] doesn't warn about sign mismatches in pointers for assignment or parameter passing, but clang does. So my fix needs more changes to preserve or fix the sign conversions. The API might be easier to fix here. Pathnames should be converted from chars to u_chars in only one place, possibly by copying them instead of using type puns. They really consist of u_chars (bytes) but consist of chars at the syscall level. Bruce From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 06:53:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3C4C5F43; Fri, 30 Jan 2015 06:53:47 +0000 (UTC) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id C2DF0B5B; Fri, 30 Jan 2015 06:53:46 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id 3C061D41FAE; Fri, 30 Jan 2015 17:53:35 +1100 (AEDT) Date: Fri, 30 Jan 2015 17:53:26 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Dimitry Andric Subject: Re: svn commit: r277903 - head/sys/libkern In-Reply-To: <201501292154.t0TLs2Nw062949@svn.freebsd.org> Message-ID: <20150130165756.I1034@besplex.bde.org> References: <201501292154.t0TLs2Nw062949@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=Za4kaKlA c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=QgPQRPWGL5W6mNP6musA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 06:53:47 -0000 On Thu, 29 Jan 2015, Dimitry Andric wrote: > Log: > Similar to r277901, fix more -Wcast-qual warnings in libkern's strtoq(), > strtoul() and strtouq(), by using __DECONST. No functional change. Here the fix is no worse than the original code. > Modified: head/sys/libkern/strtoq.c > ============================================================================== > --- head/sys/libkern/strtoq.c Thu Jan 29 21:31:29 2015 (r277902) > +++ head/sys/libkern/strtoq.c Thu Jan 29 21:54:01 2015 (r277903) > @@ -125,6 +125,6 @@ strtoq(const char *nptr, char **endptr, > } else if (neg) > acc = -acc; > if (endptr != 0) > - *((const char **)endptr) = any ? s - 1 : nptr; > + *endptr = __DECONST(char *, any ? s - 1 : nptr); > return (acc); > } libc does use either the previous bogus cast or __DECONST(). It just writes the conversion in C: endptr = (char *)(any ? s - 1 : nptr); This reminds me that __DECONST() is never needed for clang, since -Wcast-qual is broken for clang. -Wcast-qual works for gcc, so together with -Werror it gives a non-C compiler that can't compile the libc version. However, -Wcast-qual has never been used for compiling libc, and the above C code hasn't been mutilated in it. -Wcast-qual is turned on at WARNS > 4 in userland, and seems to have led to more breakages of the warning than API fixes. -Wcast-qual has been on in the kernel since 1999 although it was intentionally left out originally. So libkern/strtol.c needed some hack to compile with gcc. It no longer needs this hack to compile with clang. For variations of the following function: void foo(const char *cp, char endp) { *endp = p; } these errors are detected: - with no cast of p: C requires a diagnostic. gcc always prints one. clangs warning says that this is under -Wfoo, where foo is too long to type - with p cast to char *: C requires this to work as well as possible, with no diagnostic. gcc and clang work right by default. - with p cast to char *, and -Wcast-qual: the option behaviour not defined by standard. For gcc, it is documented to restore the warning that is killed by the cast. The documentation in the man page is quite complete. It even gives an example of how adding const qualifiers using bogus casts has the same effect as removing them. For clang, -Wcast-qual is undocumented in any man or info page and has no effect. The bogus cast previously used in libkern/strtol.c is precisely the one used in gcc's example. Its bogusness is even more complicated than I first thought or mentioned above: - it was a bug in gcc that -Wcast-qual didn't detected its bogusness. It worked to break the warning up to at least gcc-4.2. But this is fixed in gcc-4.8. The example using it is new in gcc-4.8 too. - you apparently "fixed" this to work with ports versions of gcc, or to work with a non-broken undocumented unsupported by *mk clang option that gives the same results as the gcc -Wcast-qual. Note that if -Wcast-qual was complete, it would also warn for the type hacks in __DECONST(). Casting to uintptr_t subverts type checking even more completely than casting to another pointer type. The only advantage of __DECONST() is to make type hacks more blatant. I casts so rarely that almost all uses of casts are type hacks. Bruce From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 09:04:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0305CAC; Fri, 30 Jan 2015 09:04:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E32B1A2C; Fri, 30 Jan 2015 09:04:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0U94KIa099984; Fri, 30 Jan 2015 09:04:20 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0U94K3X099983; Fri, 30 Jan 2015 09:04:20 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201501300904.t0U94K3X099983@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 30 Jan 2015 09:04:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277918 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 09:04:21 -0000 Author: mav Date: Fri Jan 30 09:04:20 2015 New Revision: 277918 URL: https://svnweb.freebsd.org/changeset/base/277918 Log: MFC r277529: Don't count requests with status sent as overlapping. While those requests are still in target OOA queue, for initiator they are already completed, so tags can be reused. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Fri Jan 30 05:23:39 2015 (r277917) +++ stable/10/sys/cam/ctl/ctl.c Fri Jan 30 09:04:20 2015 (r277918) @@ -10828,7 +10828,8 @@ ctl_check_for_blockage(struct ctl_lun *l ooa_io->io_hdr.nexus.targ_port) && (pending_io->io_hdr.nexus.initid.id == ooa_io->io_hdr.nexus.initid.id)) - && ((ooa_io->io_hdr.flags & CTL_FLAG_ABORT) == 0)) + && ((ooa_io->io_hdr.flags & (CTL_FLAG_ABORT | + CTL_FLAG_STATUS_SENT)) == 0)) return (CTL_ACTION_OVERLAP); /* @@ -10849,7 +10850,8 @@ ctl_check_for_blockage(struct ctl_lun *l ooa_io->io_hdr.nexus.targ_port) && (pending_io->io_hdr.nexus.initid.id == ooa_io->io_hdr.nexus.initid.id)) - && ((ooa_io->io_hdr.flags & CTL_FLAG_ABORT) == 0)) + && ((ooa_io->io_hdr.flags & (CTL_FLAG_ABORT | + CTL_FLAG_STATUS_SENT)) == 0)) return (CTL_ACTION_OVERLAP_TAG); /* From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 09:05:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2FA07298; Fri, 30 Jan 2015 09:05:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1BF7CA3D; Fri, 30 Jan 2015 09:05:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0U95hOI000408; Fri, 30 Jan 2015 09:05:43 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0U95hSP000407; Fri, 30 Jan 2015 09:05:43 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201501300905.t0U95hSP000407@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 30 Jan 2015 09:05:43 +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: r277919 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 09:05:44 -0000 Author: mav Date: Fri Jan 30 09:05:43 2015 New Revision: 277919 URL: https://svnweb.freebsd.org/changeset/base/277919 Log: MFC r277247: Don't count status as sent until CTIO completes successfully. If we aggregated status sending with data move and got error, allow status to be updated and resent again separately. Without this command may stuck without status sent at all. Modified: stable/10/sys/cam/ctl/scsi_ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/scsi_ctl.c ============================================================================== --- stable/10/sys/cam/ctl/scsi_ctl.c Fri Jan 30 09:04:20 2015 (r277918) +++ stable/10/sys/cam/ctl/scsi_ctl.c Fri Jan 30 09:05:43 2015 (r277919) @@ -891,7 +891,6 @@ ctlfestart(struct cam_periph *periph, un (cmd_info->flags & CTLFE_CMD_PIECEWISE) == 0 && ((io->io_hdr.flags & CTL_FLAG_DMA_QUEUED) == 0 || io->io_hdr.status == CTL_SUCCESS)) { - io->io_hdr.flags |= CTL_FLAG_STATUS_SENT; flags |= CAM_SEND_STATUS; scsi_status = io->scsiio.scsi_status; csio->sense_len = io->scsiio.sense_len; @@ -1265,6 +1264,10 @@ ctlfedone(struct cam_periph *periph, uni break; } + if ((done_ccb->ccb_h.flags & CAM_SEND_STATUS) && + (done_ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) + io->io_hdr.flags |= CTL_FLAG_STATUS_SENT; + /* * If we were sending status back to the initiator, free up * resources. If we were doing a datamove, call the From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 09:44:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AFBDDE8B; Fri, 30 Jan 2015 09:44:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 839DBE33; Fri, 30 Jan 2015 09:44:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0U9iUcL021200; Fri, 30 Jan 2015 09:44:30 GMT (envelope-from pjd@FreeBSD.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0U9iUPC021199; Fri, 30 Jan 2015 09:44:30 GMT (envelope-from pjd@FreeBSD.org) Message-Id: <201501300944.t0U9iUPC021199@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pjd set sender to pjd@FreeBSD.org using -f From: Pawel Jakub Dawidek Date: Fri, 30 Jan 2015 09:44:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277920 - head/lib/libnv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 09:44:30 -0000 Author: pjd Date: Fri Jan 30 09:44:29 2015 New Revision: 277920 URL: https://svnweb.freebsd.org/changeset/base/277920 Log: If moving descriptor or binary data to an nvlist fails, we need to close the descriptor or free the memory before returning. Submitted by: Mariusz Zaborski While here, protect errno, so it won't be overwritted by close(2) or free(3). Modified: head/lib/libnv/nvpair.c Modified: head/lib/libnv/nvpair.c ============================================================================== --- head/lib/libnv/nvpair.c Fri Jan 30 09:05:43 2015 (r277919) +++ head/lib/libnv/nvpair.c Fri Jan 30 09:44:29 2015 (r277920) @@ -1100,6 +1100,7 @@ nvpair_t * nvpair_movev_string(char *value, const char *namefmt, va_list nameap) { nvpair_t *nvp; + int serrno; if (value == NULL) { errno = EINVAL; @@ -1108,8 +1109,11 @@ nvpair_movev_string(char *value, const c nvp = nvpair_allocv(NV_TYPE_STRING, (uint64_t)(uintptr_t)value, strlen(value) + 1, namefmt, nameap); - if (nvp == NULL) + if (nvp == NULL) { + serrno = errno; free(value); + errno = serrno; + } return (nvp); } @@ -1137,28 +1141,46 @@ nvpair_movev_nvlist(nvlist_t *value, con nvpair_t * nvpair_movev_descriptor(int value, const char *namefmt, va_list nameap) { + nvpair_t *nvp; + int serrno; if (value < 0 || !fd_is_valid(value)) { errno = EBADF; return (NULL); } - return (nvpair_allocv(NV_TYPE_DESCRIPTOR, (uint64_t)value, - sizeof(int64_t), namefmt, nameap)); + nvp = nvpair_allocv(NV_TYPE_DESCRIPTOR, (uint64_t)value, + sizeof(int64_t), namefmt, nameap); + if (nvp == NULL) { + serrno = errno; + close(value); + errno = serrno; + } + + return (nvp); } nvpair_t * nvpair_movev_binary(void *value, size_t size, const char *namefmt, va_list nameap) { + nvpair_t *nvp; + int serrno; if (value == NULL || size == 0) { errno = EINVAL; return (NULL); } - return (nvpair_allocv(NV_TYPE_BINARY, (uint64_t)(uintptr_t)value, size, - namefmt, nameap)); + nvp = nvpair_allocv(NV_TYPE_BINARY, (uint64_t)(uintptr_t)value, size, + namefmt, nameap); + if (nvp == NULL) { + serrno = errno; + free(value); + errno = serrno; + } + + return (nvp); } bool From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 10:08:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4F30D4EA; Fri, 30 Jan 2015 10:08:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B11AD2; Fri, 30 Jan 2015 10:08:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0UA8epC032922; Fri, 30 Jan 2015 10:08:40 GMT (envelope-from pjd@FreeBSD.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0UA8dCu032918; Fri, 30 Jan 2015 10:08:39 GMT (envelope-from pjd@FreeBSD.org) Message-Id: <201501301008.t0UA8dCu032918@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pjd set sender to pjd@FreeBSD.org using -f From: Pawel Jakub Dawidek Date: Fri, 30 Jan 2015 10:08:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277921 - head/lib/libnv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 10:08:40 -0000 Author: pjd Date: Fri Jan 30 10:08:38 2015 New Revision: 277921 URL: https://svnweb.freebsd.org/changeset/base/277921 Log: Modify nvlist_get_parent() API to take additional cookie argument. This allow for non-recursive iteration over nested nvlists, as in documented example. Submitted by: Mariusz Zaborski Modified: head/lib/libnv/nv.3 head/lib/libnv/nv.h head/lib/libnv/nvlist.c Modified: head/lib/libnv/nv.3 ============================================================================== --- head/lib/libnv/nv.3 Fri Jan 30 09:44:29 2015 (r277920) +++ head/lib/libnv/nv.3 Fri Jan 30 10:08:38 2015 (r277921) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 25, 2014 +.Dd January 30, 2015 .Dt NV 3 .Os .Sh NAME @@ -151,7 +151,7 @@ .Ft "const void *" .Fn nvlist_get_binary "const nvlist_t *nvl" "const char *name" "size_t *sizep" .Ft "const nvlist_t *" -.Fn nvlist_get_parent "const nvlist_t *nvl" +.Fn nvlist_get_parent "const nvlist_t *nvl" "void **cookiep" .\" .Ft bool .Fn nvlist_take_bool "nvlist_t *nvl" "const char *name" @@ -588,6 +588,28 @@ while ((name = nvlist_next(nvl, &type, & printf("\\n"); } .Ed +.Pp +Iterating over every nested nvlist: +.Bd -literal +nvlist_t *nvl; +const char *name; +void *cookie; +int type; + +nvl = nvlist_recv(sock); +if (nvl == NULL) + err(1, "nvlist_recv() failed"); + +cookie = NULL; +do { + while ((name = nvlist_next(nvl, &type, &cookie)) != NULL) { + if (type == NV_TYPE_NVLIST) { + nvl = nvlist_get_nvlist(nvl, name); + cookie = NULL; + } + } +} while ((nvl = nvlist_get_parent(nvl, &cookie)) != NULL); +.Ed .Sh SEE ALSO .Xr close 2 , .Xr dup 2 , Modified: head/lib/libnv/nv.h ============================================================================== --- head/lib/libnv/nv.h Fri Jan 30 09:44:29 2015 (r277920) +++ head/lib/libnv/nv.h Fri Jan 30 10:08:38 2015 (r277921) @@ -83,7 +83,7 @@ nvlist_t *nvlist_xfer(int sock, nvlist_t const char *nvlist_next(const nvlist_t *nvl, int *typep, void **cookiep); -const nvlist_t *nvlist_get_parent(const nvlist_t *nvl); +const nvlist_t *nvlist_get_parent(const nvlist_t *nvl, void **cookiep); /* * The nvlist_exists functions check if the given name (optionally of the given Modified: head/lib/libnv/nvlist.c ============================================================================== --- head/lib/libnv/nvlist.c Fri Jan 30 09:44:29 2015 (r277920) +++ head/lib/libnv/nvlist.c Fri Jan 30 10:08:38 2015 (r277921) @@ -159,15 +159,19 @@ nvlist_get_nvpair_parent(const nvlist_t } const nvlist_t * -nvlist_get_parent(const nvlist_t *nvl) +nvlist_get_parent(const nvlist_t *nvl, void **cookiep) { + nvpair_t *nvp; NVLIST_ASSERT(nvl); - if (nvl->nvl_parent == NULL) + nvp = nvl->nvl_parent; + if (cookiep != NULL) + *cookiep = nvp; + if (nvp == NULL) return (NULL); - return (nvpair_nvlist(nvl->nvl_parent)); + return (nvpair_nvlist(nvp)); } void @@ -384,11 +388,10 @@ nvlist_dump(const nvlist_t *nvl, int fd) dprintf(fd, "\n"); nvl = nvpair_get_nvlist(nvp); if (nvlist_dump_error_check(nvl, fd, level + 1)) { - nvl = nvlist_get_parent(nvl); + nvl = nvlist_get_parent(nvl, (void **)&nvp); break; } - level += 1; - nvp = nvlist_first_nvpair(nvl); + level++; continue; case NV_TYPE_DESCRIPTOR: dprintf(fd, " %d\n", nvpair_get_descriptor(nvp)); @@ -411,11 +414,10 @@ nvlist_dump(const nvlist_t *nvl, int fd) } while ((nvp = nvlist_next_nvpair(nvl, nvp)) == NULL) { - nvp = nvlist_get_nvpair_parent(nvl); - if (nvp == NULL) + nvl = nvlist_get_parent(nvl, (void **)&nvp); + if (nvl == NULL) return; - nvl = nvlist_get_parent(nvl); - level --; + level--; } } } @@ -457,10 +459,9 @@ nvlist_size(const nvlist_t *nvl) } while ((nvp = nvlist_next_nvpair(nvl, nvp)) == NULL) { - nvp = nvlist_get_nvpair_parent(nvl); - if (nvp == NULL) + nvl = nvlist_get_parent(nvl, (void **)&nvp); + if (nvl == NULL) goto out; - nvl = nvlist_get_parent(nvl); } } @@ -635,13 +636,12 @@ nvlist_xpack(const nvlist_t *nvl, int64_ return (NULL); } while ((nvp = nvlist_next_nvpair(nvl, nvp)) == NULL) { - nvp = nvlist_get_nvpair_parent(nvl); - if (nvp == NULL) + nvl = nvlist_get_parent(nvl, (void **)&nvp); + if (nvl == NULL) goto out; ptr = nvpair_pack_nvlist_up(ptr, &left); if (ptr == NULL) goto out; - nvl = nvlist_get_parent(nvl); } } From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 11:41:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 140A7458; Fri, 30 Jan 2015 11:41:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 003BECCE; Fri, 30 Jan 2015 11:41:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0UBflsZ081919; Fri, 30 Jan 2015 11:41:47 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0UBflPJ081916; Fri, 30 Jan 2015 11:41:47 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501301141.t0UBflPJ081916@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 30 Jan 2015 11:41:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277922 - head/sys/ufs/ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 11:41:48 -0000 Author: kib Date: Fri Jan 30 11:41:46 2015 New Revision: 277922 URL: https://svnweb.freebsd.org/changeset/base/277922 Log: When mounting SU-enabled mount point, wait until the softdep_flush() thread started and incremented the stat_flush_threads [1]. Unconditionally wakeup softdep_flush threads when needed, do not try to check wchan, which is racy and breaks abstraction. Reported by and discussed with: glebius, neel Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/ufs/ffs/ffs_softdep.c head/sys/ufs/ffs/softdep.h Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Fri Jan 30 10:08:38 2015 (r277921) +++ head/sys/ufs/ffs/ffs_softdep.c Fri Jan 30 11:41:46 2015 (r277922) @@ -1377,6 +1377,10 @@ softdep_flush(addr) mp = (struct mount *)addr; ump = VFSTOUFS(mp); atomic_add_int(&stat_flush_threads, 1); + ACQUIRE_LOCK(ump); + ump->softdep_flags &= ~FLUSH_STARTING; + wakeup(&ump->softdep_flushtd); + FREE_LOCK(ump); if (print_threads) { if (stat_flush_threads == 1) printf("Running %s at pid %d\n", bufdaemonproc->p_comm, @@ -1389,7 +1393,7 @@ softdep_flush(addr) VFSTOUFS(mp)->softdep_jblocks->jb_suspended)) kthread_suspend_check(); ACQUIRE_LOCK(ump); - if ((ump->softdep_flags & FLUSH_CLEANUP) == 0) + while ((ump->softdep_flags & (FLUSH_CLEANUP | FLUSH_EXIT)) == 0) msleep(&ump->softdep_flushtd, LOCK_PTR(ump), PVM, "sdflush", hz / 2); ump->softdep_flags &= ~FLUSH_CLEANUP; @@ -1421,8 +1425,7 @@ worklist_speedup(mp) LOCK_OWNED(ump); if ((ump->softdep_flags & (FLUSH_CLEANUP | FLUSH_EXIT)) == 0) { ump->softdep_flags |= FLUSH_CLEANUP; - if (ump->softdep_flushtd->td_wchan == &ump->softdep_flushtd) - wakeup(&ump->softdep_flushtd); + wakeup(&ump->softdep_flushtd); } } @@ -1471,10 +1474,7 @@ softdep_speedup(ump) (FLUSH_CLEANUP | FLUSH_EXIT)) == 0) { altump->softdep_flags |= FLUSH_CLEANUP; altump->um_softdep->sd_cleanups++; - if (altump->softdep_flushtd->td_wchan == - &altump->softdep_flushtd) { - wakeup(&altump->softdep_flushtd); - } + wakeup(&altump->softdep_flushtd); } FREE_LOCK(altump); } @@ -2491,9 +2491,18 @@ softdep_mount(devvp, mp, fs, cred) /* * Start our flushing thread in the bufdaemon process. */ + ACQUIRE_LOCK(ump); + ump->softdep_flags |= FLUSH_STARTING; + FREE_LOCK(ump); kproc_kthread_add(&softdep_flush, mp, &bufdaemonproc, &ump->softdep_flushtd, 0, 0, "softdepflush", "%s worker", mp->mnt_stat.f_mntonname); + ACQUIRE_LOCK(ump); + while ((ump->softdep_flags & FLUSH_STARTING) != 0) { + msleep(&ump->softdep_flushtd, LOCK_PTR(ump), PVM, "sdstart", + hz / 2); + } + FREE_LOCK(ump); /* * When doing soft updates, the counters in the * superblock may have gotten out of sync. Recomputation Modified: head/sys/ufs/ffs/softdep.h ============================================================================== --- head/sys/ufs/ffs/softdep.h Fri Jan 30 10:08:38 2015 (r277921) +++ head/sys/ufs/ffs/softdep.h Fri Jan 30 11:41:46 2015 (r277922) @@ -1063,6 +1063,8 @@ struct mount_softdeps { */ #define FLUSH_EXIT 0x0001 /* time to exit */ #define FLUSH_CLEANUP 0x0002 /* need to clear out softdep structures */ +#define FLUSH_STARTING 0x0004 /* flush thread not yet started */ + /* * Keep the old names from when these were in the ufsmount structure. */ From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 12:31:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F8E4F4B; Fri, 30 Jan 2015 12:31:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6218522A; Fri, 30 Jan 2015 12:31:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0UCVUh5006808; Fri, 30 Jan 2015 12:31:30 GMT (envelope-from pjd@FreeBSD.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0UCVUIu006807; Fri, 30 Jan 2015 12:31:30 GMT (envelope-from pjd@FreeBSD.org) Message-Id: <201501301231.t0UCVUIu006807@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pjd set sender to pjd@FreeBSD.org using -f From: Pawel Jakub Dawidek Date: Fri, 30 Jan 2015 12:31:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277925 - head/lib/libnv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 12:31:30 -0000 Author: pjd Date: Fri Jan 30 12:31:29 2015 New Revision: 277925 URL: https://svnweb.freebsd.org/changeset/base/277925 Log: Handle empty nvlists correctly. Submitted by: Mariusz Zaborski Modified: head/lib/libnv/nvlist.c Modified: head/lib/libnv/nvlist.c ============================================================================== --- head/lib/libnv/nvlist.c Fri Jan 30 12:07:43 2015 (r277924) +++ head/lib/libnv/nvlist.c Fri Jan 30 12:31:29 2015 (r277925) @@ -356,7 +356,8 @@ nvlist_dump_error_check(const nvlist_t * void nvlist_dump(const nvlist_t *nvl, int fd) { - nvpair_t *nvp; + const nvlist_t *tmpnvl; + nvpair_t *nvp, *tmpnvp; int level; level = 0; @@ -386,13 +387,17 @@ nvlist_dump(const nvlist_t *nvl, int fd) break; case NV_TYPE_NVLIST: dprintf(fd, "\n"); - nvl = nvpair_get_nvlist(nvp); - if (nvlist_dump_error_check(nvl, fd, level + 1)) { - nvl = nvlist_get_parent(nvl, (void **)&nvp); + tmpnvl = nvpair_get_nvlist(nvp); + if (nvlist_dump_error_check(tmpnvl, fd, level + 1)) break; + tmpnvp = nvlist_first_nvpair(tmpnvl); + if (tmpnvp != NULL) { + nvl = tmpnvl; + nvp = tmpnvp; + level++; + continue; } - level++; - continue; + break; case NV_TYPE_DESCRIPTOR: dprintf(fd, " %d\n", nvpair_get_descriptor(nvp)); break; @@ -436,7 +441,8 @@ nvlist_fdump(const nvlist_t *nvl, FILE * size_t nvlist_size(const nvlist_t *nvl) { - const nvpair_t *nvp; + const nvlist_t *tmpnvl; + const nvpair_t *nvp, *tmpnvp; size_t size; NVLIST_ASSERT(nvl); @@ -450,10 +456,14 @@ nvlist_size(const nvlist_t *nvl) if (nvpair_type(nvp) == NV_TYPE_NVLIST) { size += sizeof(struct nvlist_header); size += nvpair_header_size() + 1; - nvl = nvpair_get_nvlist(nvp); - PJDLOG_ASSERT(nvl->nvl_error == 0); - nvp = nvlist_first_nvpair(nvl); - continue; + tmpnvl = nvpair_get_nvlist(nvp); + PJDLOG_ASSERT(tmpnvl->nvl_error == 0); + tmpnvp = nvlist_first_nvpair(tmpnvl); + if (tmpnvp != NULL) { + nvl = tmpnvl; + nvp = tmpnvp; + continue; + } } else { size += nvpair_size(nvp); } @@ -575,7 +585,8 @@ nvlist_xpack(const nvlist_t *nvl, int64_ { unsigned char *buf, *ptr; size_t left, size; - nvpair_t *nvp; + const nvlist_t *tmpnvl; + nvpair_t *nvp, *tmpnvp; NVLIST_ASSERT(nvl); @@ -618,10 +629,18 @@ nvlist_xpack(const nvlist_t *nvl, int64_ ptr = nvpair_pack_string(nvp, ptr, &left); break; case NV_TYPE_NVLIST: - nvl = nvpair_get_nvlist(nvp); - nvp = nvlist_first_nvpair(nvl); - ptr = nvlist_pack_header(nvl, ptr, &left); - continue; + tmpnvl = nvpair_get_nvlist(nvp); + ptr = nvlist_pack_header(tmpnvl, ptr, &left); + if (ptr == NULL) + goto out; + tmpnvp = nvlist_first_nvpair(tmpnvl); + if (tmpnvp != NULL) { + nvl = tmpnvl; + nvp = tmpnvp; + continue; + } + ptr = nvpair_pack_nvlist_up(ptr, &left); + break; case NV_TYPE_DESCRIPTOR: ptr = nvpair_pack_descriptor(nvp, ptr, fdidxp, &left); break; From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 12:57:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4A096416; Fri, 30 Jan 2015 12:57:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 368CA655; Fri, 30 Jan 2015 12:57:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0UCvacs017414; Fri, 30 Jan 2015 12:57:36 GMT (envelope-from pjd@FreeBSD.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0UCva53017413; Fri, 30 Jan 2015 12:57:36 GMT (envelope-from pjd@FreeBSD.org) Message-Id: <201501301257.t0UCva53017413@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pjd set sender to pjd@FreeBSD.org using -f From: Pawel Jakub Dawidek Date: Fri, 30 Jan 2015 12:57:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277926 - head/lib/libnv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 12:57:36 -0000 Author: pjd Date: Fri Jan 30 12:57:35 2015 New Revision: 277926 URL: https://svnweb.freebsd.org/changeset/base/277926 Log: Add missing nvlist_get_parent(3) link. Submitted by: Mariusz Zaborski Modified: head/lib/libnv/Makefile Modified: head/lib/libnv/Makefile ============================================================================== --- head/lib/libnv/Makefile Fri Jan 30 12:31:29 2015 (r277925) +++ head/lib/libnv/Makefile Fri Jan 30 12:57:35 2015 (r277926) @@ -61,6 +61,7 @@ MLINKS+=nv.3 nvlist_create.3 \ nv.3 nvlist_get_nvlist.3 \ nv.3 nvlist_get_descriptor.3 \ nv.3 nvlist_get_binary.3 \ + nv.3 nvlist_get_parent.3 \ nv.3 nvlist_take_bool.3 \ nv.3 nvlist_take_number.3 \ nv.3 nvlist_take_string.3 \ From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 13:03:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8DFA265C; Fri, 30 Jan 2015 13:03:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60B8D775; Fri, 30 Jan 2015 13:03:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0UD3b9p021786; Fri, 30 Jan 2015 13:03:37 GMT (envelope-from pjd@FreeBSD.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0UD3b9k021785; Fri, 30 Jan 2015 13:03:37 GMT (envelope-from pjd@FreeBSD.org) Message-Id: <201501301303.t0UD3b9k021785@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pjd set sender to pjd@FreeBSD.org using -f From: Pawel Jakub Dawidek Date: Fri, 30 Jan 2015 13:03:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277927 - head/lib/libnv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 13:03:37 -0000 Author: pjd Date: Fri Jan 30 13:03:36 2015 New Revision: 277927 URL: https://svnweb.freebsd.org/changeset/base/277927 Log: Make gcc happy. Reported by: bz Modified: head/lib/libnv/nvlist.c Modified: head/lib/libnv/nvlist.c ============================================================================== --- head/lib/libnv/nvlist.c Fri Jan 30 12:57:35 2015 (r277926) +++ head/lib/libnv/nvlist.c Fri Jan 30 13:03:36 2015 (r277927) @@ -358,6 +358,7 @@ nvlist_dump(const nvlist_t *nvl, int fd) { const nvlist_t *tmpnvl; nvpair_t *nvp, *tmpnvp; + void *cookie; int level; level = 0; @@ -419,9 +420,11 @@ nvlist_dump(const nvlist_t *nvl, int fd) } while ((nvp = nvlist_next_nvpair(nvl, nvp)) == NULL) { - nvl = nvlist_get_parent(nvl, (void **)&nvp); + cookie = NULL; + nvl = nvlist_get_parent(nvl, &cookie); if (nvl == NULL) return; + nvp = cookie; level--; } } @@ -443,6 +446,7 @@ nvlist_size(const nvlist_t *nvl) { const nvlist_t *tmpnvl; const nvpair_t *nvp, *tmpnvp; + void *cookie; size_t size; NVLIST_ASSERT(nvl); @@ -469,9 +473,11 @@ nvlist_size(const nvlist_t *nvl) } while ((nvp = nvlist_next_nvpair(nvl, nvp)) == NULL) { - nvl = nvlist_get_parent(nvl, (void **)&nvp); + cookie = NULL; + nvl = nvlist_get_parent(nvl, &cookie); if (nvl == NULL) goto out; + nvp = cookie; } } @@ -587,6 +593,7 @@ nvlist_xpack(const nvlist_t *nvl, int64_ size_t left, size; const nvlist_t *tmpnvl; nvpair_t *nvp, *tmpnvp; + void *cookie; NVLIST_ASSERT(nvl); @@ -655,9 +662,11 @@ nvlist_xpack(const nvlist_t *nvl, int64_ return (NULL); } while ((nvp = nvlist_next_nvpair(nvl, nvp)) == NULL) { - nvl = nvlist_get_parent(nvl, (void **)&nvp); + cookie = NULL; + nvl = nvlist_get_parent(nvl, &cookie); if (nvl == NULL) goto out; + nvp = cookie; ptr = nvpair_pack_nvlist_up(ptr, &left); if (ptr == NULL) goto out; From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 14:09:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5437643F; Fri, 30 Jan 2015 14:09:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 40B69DC0; Fri, 30 Jan 2015 14:09:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0UE98M1052887; Fri, 30 Jan 2015 14:09:08 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0UE98SI052886; Fri, 30 Jan 2015 14:09:08 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201501301409.t0UE98SI052886@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Fri, 30 Jan 2015 14:09:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277928 - head/sys/dev/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 14:09:08 -0000 Author: loos Date: Fri Jan 30 14:09:07 2015 New Revision: 277928 URL: https://svnweb.freebsd.org/changeset/base/277928 Log: Do not leak the OFW memory when the result does not satisfy our alignment requirement. While here, fix style(9) issues. Modified: head/sys/dev/ofw/openfirm.c Modified: head/sys/dev/ofw/openfirm.c ============================================================================== --- head/sys/dev/ofw/openfirm.c Fri Jan 30 13:03:36 2015 (r277927) +++ head/sys/dev/ofw/openfirm.c Fri Jan 30 14:09:07 2015 (r277928) @@ -459,11 +459,16 @@ OF_getencprop_alloc(phandle_t package, c int i; retval = OF_getprop_alloc(package, name, elsz, buf); - if (retval == -1 || retval*elsz % 4 != 0) + if (retval == -1) return (-1); + if (retval * elsz % 4 != 0) { + free(*buf, M_OFWPROP); + *buf = NULL; + return (-1); + } cell = *buf; - for (i = 0; i < retval*elsz/4; i++) + for (i = 0; i < retval * elsz / 4; i++) cell[i] = be32toh(cell[i]); return (retval); From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 14:22:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C7A00BED; Fri, 30 Jan 2015 14:22:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A807EFD; Fri, 30 Jan 2015 14:22:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0UEMHgB061758; Fri, 30 Jan 2015 14:22:17 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0UEMGro061752; Fri, 30 Jan 2015 14:22:16 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501301422.t0UEMGro061752@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 30 Jan 2015 14:22:16 +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: r277931 - stable/10/lib/libedit X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 14:22:17 -0000 Author: emaste Date: Fri Jan 30 14:22:15 2015 New Revision: 277931 URL: https://svnweb.freebsd.org/changeset/base/277931 Log: Merge libedit fixes from NetBSD Add trailing NULL's to the varargs functions as required. (John Spencer) readline.c r1.106 Bounds search for reallocated index, from OpenBSD via Andreas Fett map.c 1.34 map.h 1.10 parse.c 1.27 read.c 1.71 This is a direct commit to stable/10 as these changes are included in a broader sync with NetBSD committed by bapt@ in r276881. Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D1728 Modified: stable/10/lib/libedit/map.c stable/10/lib/libedit/map.h stable/10/lib/libedit/parse.c stable/10/lib/libedit/read.c stable/10/lib/libedit/readline.c Modified: stable/10/lib/libedit/map.c ============================================================================== --- stable/10/lib/libedit/map.c Fri Jan 30 14:13:29 2015 (r277930) +++ stable/10/lib/libedit/map.c Fri Jan 30 14:22:15 2015 (r277931) @@ -1395,7 +1395,7 @@ protected int map_addfunc(EditLine *el, const char *name, const char *help, el_func_t func) { void *p; - int nf = el->el_map.nfunc + 1; + size_t nf = el->el_map.nfunc + 1; if (name == NULL || help == NULL || func == NULL) return (-1); Modified: stable/10/lib/libedit/map.h ============================================================================== --- stable/10/lib/libedit/map.h Fri Jan 30 14:13:29 2015 (r277930) +++ stable/10/lib/libedit/map.h Fri Jan 30 14:22:15 2015 (r277931) @@ -57,7 +57,7 @@ typedef struct el_map_t { int type; /* Emacs or vi */ el_bindings_t *help; /* The help for the editor functions */ el_func_t *func; /* List of available functions */ - int nfunc; /* The number of functions/help items */ + size_t nfunc; /* The number of functions/help items */ } el_map_t; #define MAP_EMACS 0 Modified: stable/10/lib/libedit/parse.c ============================================================================== --- stable/10/lib/libedit/parse.c Fri Jan 30 14:13:29 2015 (r277930) +++ stable/10/lib/libedit/parse.c Fri Jan 30 14:22:15 2015 (r277931) @@ -252,10 +252,11 @@ parse__string(char *out, const char *in) protected int parse_cmd(EditLine *el, const char *cmd) { - el_bindings_t *b; + el_bindings_t *b = el->el_map.help; + size_t i; - for (b = el->el_map.help; b->name != NULL; b++) - if (strcmp(b->name, cmd) == 0) - return (b->func); + for (i = 0; i < el->el_map.nfunc; i++) + if (strcmp(b[i].name, cmd) == 0) + return (b[i].func); return (-1); } Modified: stable/10/lib/libedit/read.c ============================================================================== --- stable/10/lib/libedit/read.c Fri Jan 30 14:13:29 2015 (r277930) +++ stable/10/lib/libedit/read.c Fri Jan 30 14:22:15 2015 (r277931) @@ -517,7 +517,7 @@ el_gets(EditLine *el, int *nread) #endif /* DEBUG_READ */ break; } - if ((unsigned int)cmdnum >= (unsigned int)el->el_map.nfunc) { /* BUG CHECK command */ + if ((size_t)cmdnum >= el->el_map.nfunc) { /* BUG CHECK command */ #ifdef DEBUG_EDIT (void) fprintf(el->el_errfile, "ERROR: illegal command from key 0%o\r\n", ch); Modified: stable/10/lib/libedit/readline.c ============================================================================== --- stable/10/lib/libedit/readline.c Fri Jan 30 14:13:29 2015 (r277930) +++ stable/10/lib/libedit/readline.c Fri Jan 30 14:22:15 2015 (r277931) @@ -1906,7 +1906,7 @@ rl_add_defun(const char *name, Function map[(unsigned char)c] = fun; el_set(e, EL_ADDFN, name, name, rl_bind_wrapper); vis(dest, c, VIS_WHITE|VIS_NOSLASH, 0); - el_set(e, EL_BIND, dest, name); + el_set(e, EL_BIND, dest, name, NULL); return 0; } @@ -2014,7 +2014,7 @@ rl_variable_bind(const char *var, const * The proper return value is undocument, but this is what the * readline source seems to do. */ - return ((el_set(e, EL_BIND, "", var, value) == -1) ? 1 : 0); + return ((el_set(e, EL_BIND, "", var, value, NULL) == -1) ? 1 : 0); } void @@ -2083,9 +2083,9 @@ void rl_get_screen_size(int *rows, int *cols) { if (rows) - el_get(e, EL_GETTC, "li", rows); + el_get(e, EL_GETTC, "li", rows, NULL); if (cols) - el_get(e, EL_GETTC, "co", cols); + el_get(e, EL_GETTC, "co", cols, NULL); } void @@ -2093,9 +2093,9 @@ rl_set_screen_size(int rows, int cols) { char buf[64]; (void)snprintf(buf, sizeof(buf), "%d", rows); - el_set(e, EL_SETTC, "li", buf); + el_set(e, EL_SETTC, "li", buf, NULL); (void)snprintf(buf, sizeof(buf), "%d", cols); - el_set(e, EL_SETTC, "co", buf); + el_set(e, EL_SETTC, "co", buf, NULL); } char ** From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 14:35:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 02B77F34; Fri, 30 Jan 2015 14:35:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D7393235; Fri, 30 Jan 2015 14:35:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0UEZ5tR067103; Fri, 30 Jan 2015 14:35:05 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0UEZ5Dc067102; Fri, 30 Jan 2015 14:35:05 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201501301435.t0UEZ5Dc067102@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Fri, 30 Jan 2015 14:35:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277932 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 14:35:06 -0000 Author: loos Date: Fri Jan 30 14:35:04 2015 New Revision: 277932 URL: https://svnweb.freebsd.org/changeset/base/277932 Log: Allow the retrieving of the reserved pins state. With this change, it is now possible to verify the pin function and level of reserved pins (but not set them). The use of reserved pins on Raspberry pi can lead to short circuits and real damage to the SoC. While here, remove duplicated code, make use of OF_getencprop_alloc() instead of using fixed sized variables and reduce the dmesg spam by printing reserved pin ranges (when possible) instead of printing each pin in the range. Modified: head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Fri Jan 30 14:22:15 2015 (r277931) +++ head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Fri Jan 30 14:35:04 2015 (r277932) @@ -494,39 +494,6 @@ bcm_gpio_pin_toggle(device_t dev, uint32 } static int -bcm_gpio_get_ro_pins(struct bcm_gpio_softc *sc) -{ - int i, len; - pcell_t pins[BCM_GPIO_PINS]; - phandle_t gpio; - - /* Find the gpio node to start. */ - gpio = ofw_bus_get_node(sc->sc_dev); - - len = OF_getproplen(gpio, "broadcom,read-only"); - if (len < 0 || len > sizeof(pins)) - return (-1); - - if (OF_getprop(gpio, "broadcom,read-only", &pins, len) < 0) - return (-1); - - sc->sc_ro_npins = len / sizeof(pcell_t); - - device_printf(sc->sc_dev, "read-only pins: "); - for (i = 0; i < sc->sc_ro_npins; i++) { - sc->sc_ro_pins[i] = fdt32_to_cpu(pins[i]); - if (i > 0) - printf(","); - printf("%d", sc->sc_ro_pins[i]); - } - if (i > 0) - printf("."); - printf("\n"); - - return (0); -} - -static int bcm_gpio_func_proc(SYSCTL_HANDLER_ARGS) { char buf[16]; @@ -545,7 +512,9 @@ bcm_gpio_func_proc(SYSCTL_HANDLER_ARGS) error = sysctl_handle_string(oidp, buf, sizeof(buf), req); if (error != 0 || req->newptr == NULL) return (error); - + /* Ignore changes on read-only pins. */ + if (bcm_gpio_pin_is_ro(sc, sc_sysctl->pin)) + return (0); /* Parse the user supplied string and check for a valid pin function. */ if (bcm_gpio_str_func(buf, &nfunc) != 0) return (EINVAL); @@ -595,63 +564,82 @@ bcm_gpio_sysctl_init(struct bcm_gpio_sof } static int +bcm_gpio_get_ro_pins(struct bcm_gpio_softc *sc, phandle_t node, + const char *propname, const char *label) +{ + int i, need_comma, npins, range_start, range_stop; + pcell_t *pins; + + /* Get the property data. */ + npins = OF_getencprop_alloc(node, propname, sizeof(*pins), + (void **)&pins); + if (npins < 0) + return (-1); + if (npins == 0) { + free(pins, M_OFWPROP); + return (0); + } + for (i = 0; i < npins; i++) + sc->sc_ro_pins[i + sc->sc_ro_npins] = pins[i]; + sc->sc_ro_npins += npins; + need_comma = 0; + device_printf(sc->sc_dev, "%s pins: ", label); + range_start = range_stop = pins[0]; + for (i = 1; i < npins; i++) { + if (pins[i] != range_stop + 1) { + if (need_comma) + printf(","); + if (range_start != range_stop) + printf("%d-%d", range_start, range_stop); + else + printf("%d", range_start); + range_start = range_stop = pins[i]; + need_comma = 1; + } else + range_stop++; + } + if (need_comma) + printf(","); + if (range_start != range_stop) + printf("%d-%d.\n", range_start, range_stop); + else + printf("%d.\n", range_start); + free(pins, M_OFWPROP); + + return (0); +} + +static int bcm_gpio_get_reserved_pins(struct bcm_gpio_softc *sc) { - int i, j, len, npins; - pcell_t pins[BCM_GPIO_PINS]; + char *name; phandle_t gpio, node, reserved; - char name[32]; + ssize_t len; /* Get read-only pins. */ - if (bcm_gpio_get_ro_pins(sc) != 0) - return (-1); - - /* Find the gpio/reserved pins node to start. */ gpio = ofw_bus_get_node(sc->sc_dev); - node = OF_child(gpio); - - /* - * Find reserved node - */ + if (bcm_gpio_get_ro_pins(sc, gpio, "broadcom,read-only", + "read-only") != 0) + return (-1); + /* Traverse the GPIO subnodes to find the reserved pins node. */ reserved = 0; + node = OF_child(gpio); while ((node != 0) && (reserved == 0)) { - len = OF_getprop(node, "name", name, - sizeof(name) - 1); - name[len] = 0; + len = OF_getprop_alloc(node, "name", 1, (void **)&name); + if (len == -1) + return (-1); if (strcmp(name, "reserved") == 0) reserved = node; + free(name, M_OFWPROP); node = OF_peer(node); } - if (reserved == 0) return (-1); - /* Get the reserved pins. */ - len = OF_getproplen(reserved, "broadcom,pins"); - if (len < 0 || len > sizeof(pins)) + if (bcm_gpio_get_ro_pins(sc, reserved, "broadcom,pins", + "reserved") != 0) return (-1); - if (OF_getprop(reserved, "broadcom,pins", &pins, len) < 0) - return (-1); - - npins = len / sizeof(pcell_t); - - j = 0; - device_printf(sc->sc_dev, "reserved pins: "); - for (i = 0; i < npins; i++) { - if (i > 0) - printf(","); - printf("%d", fdt32_to_cpu(pins[i])); - /* Some pins maybe already on the list of read-only pins. */ - if (bcm_gpio_pin_is_ro(sc, fdt32_to_cpu(pins[i]))) - continue; - sc->sc_ro_pins[j++ + sc->sc_ro_npins] = fdt32_to_cpu(pins[i]); - } - sc->sc_ro_npins += j; - if (i > 0) - printf("."); - printf("\n"); - return (0); } @@ -717,8 +705,6 @@ bcm_gpio_attach(device_t dev) /* Initialize the software controlled pins. */ for (i = 0, j = 0; j < BCM_GPIO_PINS; j++) { - if (bcm_gpio_pin_is_ro(sc, j)) - continue; snprintf(sc->sc_gpio_pins[i].gp_name, GPIOMAXNAME, "pin %d", j); func = bcm_gpio_get_function(sc, j); From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 14:36:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9885CFA; Fri, 30 Jan 2015 14:36:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 84784250; Fri, 30 Jan 2015 14:36:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0UEa3B3067282; Fri, 30 Jan 2015 14:36:03 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0UEa3it067280; Fri, 30 Jan 2015 14:36:03 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501301436.t0UEa3it067280@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 30 Jan 2015 14:36: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: r277933 - stable/10/usr.bin/sed X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 14:36:03 -0000 Author: pfg Date: Fri Jan 30 14:36:02 2015 New Revision: 277933 URL: https://svnweb.freebsd.org/changeset/base/277933 Log: MFC r277802, r277811: sed: Fix resource leak and dereference after NULL. process.c: Protect access against NULL. main.c: Prevent outfile overwrite resource leak. CID: 271181 CID: 1006930 Obtained from: NetBSD Modified: stable/10/usr.bin/sed/main.c stable/10/usr.bin/sed/process.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/sed/main.c ============================================================================== --- stable/10/usr.bin/sed/main.c Fri Jan 30 14:35:04 2015 (r277932) +++ stable/10/usr.bin/sed/main.c Fri Jan 30 14:36:02 2015 (r277933) @@ -409,6 +409,8 @@ mf_fgets(SPACE *sp, enum e_spflag spflag if (len >= sizeof(tmpfname)) errx(1, "%s: name too long", fname); unlink(tmpfname); + if (outfile != NULL && outfile != stdout) + fclose(outfile); if ((outfile = fopen(tmpfname, "w")) == NULL) err(1, "%s", fname); fchown(fileno(outfile), sb.st_uid, sb.st_gid); Modified: stable/10/usr.bin/sed/process.c ============================================================================== --- stable/10/usr.bin/sed/process.c Fri Jan 30 14:35:04 2015 (r277932) +++ stable/10/usr.bin/sed/process.c Fri Jan 30 14:36:02 2015 (r277933) @@ -314,7 +314,7 @@ applies(struct s_command *cp) } else r = 1; } - } else if (MATCH(cp->a1)) { + } else if (cp->a1 && MATCH(cp->a1)) { /* * If the second address is a number less than or * equal to the line number first selected, only From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 14:38:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 69C76263; Fri, 30 Jan 2015 14:38:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 55E1E278; Fri, 30 Jan 2015 14:38:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0UEc06T067580; Fri, 30 Jan 2015 14:38:00 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0UEbxdQ067569; Fri, 30 Jan 2015 14:37:59 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501301437.t0UEbxdQ067569@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 30 Jan 2015 14:37:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r277934 - stable/9/usr.bin/sed X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 14:38:00 -0000 Author: pfg Date: Fri Jan 30 14:37:59 2015 New Revision: 277934 URL: https://svnweb.freebsd.org/changeset/base/277934 Log: MFC r277802, r277811: sed: Fix resource leak and dereference after NULL. process.c: Protect access against NULL. main.c: Prevent outfile overwrite resource leak. CID: 271181 CID: 1006930 Obtained from: NetBSD Modified: stable/9/usr.bin/sed/main.c stable/9/usr.bin/sed/process.c Directory Properties: stable/9/usr.bin/sed/ (props changed) Modified: stable/9/usr.bin/sed/main.c ============================================================================== --- stable/9/usr.bin/sed/main.c Fri Jan 30 14:36:02 2015 (r277933) +++ stable/9/usr.bin/sed/main.c Fri Jan 30 14:37:59 2015 (r277934) @@ -404,6 +404,8 @@ mf_fgets(SPACE *sp, enum e_spflag spflag if (len >= sizeof(tmpfname)) errx(1, "%s: name too long", fname); unlink(tmpfname); + if (outfile != NULL && outfile != stdout) + fclose(outfile); if ((outfile = fopen(tmpfname, "w")) == NULL) err(1, "%s", fname); fchown(fileno(outfile), sb.st_uid, sb.st_gid); Modified: stable/9/usr.bin/sed/process.c ============================================================================== --- stable/9/usr.bin/sed/process.c Fri Jan 30 14:36:02 2015 (r277933) +++ stable/9/usr.bin/sed/process.c Fri Jan 30 14:37:59 2015 (r277934) @@ -314,7 +314,7 @@ applies(struct s_command *cp) } else r = 1; } - } else if (MATCH(cp->a1)) { + } else if (cp->a1 && MATCH(cp->a1)) { /* * If the second address is a number less than or * equal to the line number first selected, only From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 14:58:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04522885; Fri, 30 Jan 2015 14:58:32 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE0196CC; Fri, 30 Jan 2015 14:58:31 +0000 (UTC) Received: from new-host-3.home (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id C7804B9B8; Fri, 30 Jan 2015 09:58:30 -0500 (EST) Message-ID: <54CB9C1A.5060602@FreeBSD.org> Date: Fri, 30 Jan 2015 09:58:34 -0500 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Ryan Stone Subject: Re: svn commit: r277900 - head/sys/x86/x86 References: <201501292041.t0TKfhAJ029429@svn.freebsd.org> <8728880.CZu0UL854D@ralph.baldwin.cx> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 30 Jan 2015 09:58:30 -0500 (EST) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 14:58:32 -0000 On 1/29/15 10:51 PM, Ryan Stone wrote: > On Thu, Jan 29, 2015 at 3:45 PM, John Baldwin wrote: >> Also, note that we always use the TSC as the cpu ticker, even if it is not the >> timecounter. Thus, if C2+ is enabled on the systems, the kernel idle threads >> will have an artificially low runtime since their idle time is not properly >> accounted for. This does not affect any other threads as only the idle >> threads "run" while the CPU is in C2+ with the TSC effectively paused. The >> new default means that the idle threads will now have the proper runtime, >> however. > > However in a VM environment this means that runtimes for all threads > can be very wrong (regardless of whether we enter C2 or lower or not). > I have a coworker looking at using kvmclock in preference to TSC for > the cpu ticker when the kvmclock is available. I think that is orthogonal to older Core 2 CPUs which the above mail was about. :) However, yes, that sounds sensible. You might want to talk to bryanv@. He has a branch in projects (projects/paravirt I think?) that provides a framework for hypervisor "drivers" that would be a good place to plug this into. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 15:32:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 170EB80A; Fri, 30 Jan 2015 15:32:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0173FB6A; Fri, 30 Jan 2015 15:32:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0UFWZCO096695; Fri, 30 Jan 2015 15:32:35 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0UFWZG1096694; Fri, 30 Jan 2015 15:32:35 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501301532.t0UFWZG1096694@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 30 Jan 2015 15:32:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277936 - head/libexec/rtld-elf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 15:32:36 -0000 Author: kib Date: Fri Jan 30 15:32:35 2015 New Revision: 277936 URL: https://svnweb.freebsd.org/changeset/base/277936 Log: Use powerof2(). Remove single-use variable. Submitted by: Conrad Meyer Differential Revision: https://reviews.freebsd.org/D1724 MFC after: 1 week Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Fri Jan 30 15:02:16 2015 (r277935) +++ head/libexec/rtld-elf/rtld.c Fri Jan 30 15:32:35 2015 (r277936) @@ -876,7 +876,6 @@ digest_dynamic1(Obj_Entry *obj, int earl const Elf32_Word *hashval; Elf32_Word bkt, nmaskwords; int bloom_size32; - bool nmw_power2; int plttype = DT_REL; *dyn_rpath = NULL; @@ -986,16 +985,15 @@ digest_dynamic1(Obj_Entry *obj, int earl obj->symndx_gnu = hashtab[1]; nmaskwords = hashtab[2]; bloom_size32 = (__ELF_WORD_SIZE / 32) * nmaskwords; - /* Number of bitmask words is required to be power of 2 */ - nmw_power2 = ((nmaskwords & (nmaskwords - 1)) == 0); obj->maskwords_bm_gnu = nmaskwords - 1; obj->shift2_gnu = hashtab[3]; obj->bloom_gnu = (Elf_Addr *) (hashtab + 4); obj->buckets_gnu = hashtab + 4 + bloom_size32; obj->chain_zero_gnu = obj->buckets_gnu + obj->nbuckets_gnu - obj->symndx_gnu; - obj->valid_hash_gnu = nmw_power2 && obj->nbuckets_gnu > 0 && - obj->buckets_gnu != NULL; + /* Number of bitmask words is required to be power of 2 */ + obj->valid_hash_gnu = powerof2(nmaskwords) && + obj->nbuckets_gnu > 0 && obj->buckets_gnu != NULL; } break; From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 15:42:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9449EBD4; Fri, 30 Jan 2015 15:42:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75AA4C7B; Fri, 30 Jan 2015 15:42:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0UFgr9B001846; Fri, 30 Jan 2015 15:42:53 GMT (envelope-from mr@FreeBSD.org) Received: (from mr@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0UFgrdr001844; Fri, 30 Jan 2015 15:42:53 GMT (envelope-from mr@FreeBSD.org) Message-Id: <201501301542.t0UFgrdr001844@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mr set sender to mr@FreeBSD.org using -f From: Michael Reifenberger Date: Fri, 30 Jan 2015 15:42:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277937 - head/tools/tools/nanobsd/rescue X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 15:42:53 -0000 Author: mr Date: Fri Jan 30 15:42:52 2015 New Revision: 277937 URL: https://svnweb.freebsd.org/changeset/base/277937 Log: Keep original images, dont compile tests, makefs for iso images translates labes to uppercase, so adopt fstab for this case. Modified: head/tools/tools/nanobsd/rescue/build.sh head/tools/tools/nanobsd/rescue/common Modified: head/tools/tools/nanobsd/rescue/build.sh ============================================================================== --- head/tools/tools/nanobsd/rescue/build.sh Fri Jan 30 15:32:35 2015 (r277936) +++ head/tools/tools/nanobsd/rescue/build.sh Fri Jan 30 15:42:52 2015 (r277937) @@ -23,20 +23,23 @@ fi sh ../nanobsd.sh $* -c ${CFG} +if [ \! -d /usr/obj/Rescue ]; then + mkdir -p /usr/obj/Rescue +fi F32="/usr/obj/Rescue/rescue_${today}_x32" D32="/usr/obj/nanobsd.rescue_i386" if [ -f "${D32}/_.disk.full" ]; then - mv "${D32}/_.disk.full" "${F32}.img" + cp "${D32}/_.disk.full" "${F32}.img" fi if [ -f "${D32}/_.disk.iso" ]; then - mv "${D32}/_.disk.iso" "${F32}.iso" + cp "${D32}/_.disk.iso" "${F32}.iso" fi F64="/usr/obj/Rescue/rescue_${today}_x64" D64="/usr/obj/nanobsd.rescue_amd64" if [ -f "${D64}/_.disk.full" ]; then - mv "${D64}/_.disk.full" "${F64}.img" + cp "${D64}/_.disk.full" "${F64}.img" fi if [ -f "${D64}/_.disk.iso" ]; then - mv "${D64}/_.disk.iso" "${F64}.iso" + cp "${D64}/_.disk.iso" "${F64}.iso" fi Modified: head/tools/tools/nanobsd/rescue/common ============================================================================== --- head/tools/tools/nanobsd/rescue/common Fri Jan 30 15:32:35 2015 (r277936) +++ head/tools/tools/nanobsd/rescue/common Fri Jan 30 15:42:52 2015 (r277937) @@ -31,9 +31,19 @@ CONF_INSTALL=' CONF_WORLD=' #TARGET_ARCH=i386 CFLAGS=-O -pipe +WITHOUT_TESTS=YES ALL_MODULES=YES ' +# Functions +toLower() { + echo $1 | tr "[:upper:]" "[:lower:]" +} + +toUpper() { + echo $1 | tr "[:lower:]" "[:upper:]" +} + #customize_cmd cust_comconsole customize_cmd cust_allow_ssh_root customize_cmd cust_install_files @@ -93,16 +103,22 @@ last_orders () ( pprint 2 "last orders" ( cd ${NANO_WORLDDIR} - echo "/dev/iso9660/${NANO_LABEL} / cd9660 ro,noatime 0 0" > etc/fstab + #makefs converts labels to uppercase anyways + BIGLABEL=`toUpper "${NANO_LABEL}"` + echo "/dev/iso9660/${BIGLABEL} / cd9660 ro,noatime 0 0" > etc/fstab echo "tmpfs /boot/zfs tmpfs rw,size=1048576,mode=777 0 0" >> etc/fstab echo "ports:/usr/ports /usr/ports nfs rw,noauto,noatime,bg,soft,intr,nfsv3 0 0" >> etc/fstab # echo "/dev/ad1s1a /scratch ufs rw,noauto,noatime 0 0" >> etc/fstab rm -f conf/default/etc/remount touch conf/default/etc/.keepme touch conf/default/var/.keepme + mkdir bootpool + mkdir mnt/a + mkdir mnt/b + mkdir mnt/c cd .. makefs -t cd9660 -o rockridge \ - -o label="${NANO_LABEL}" -o publisher="RMX" \ + -o label="${BIGLABEL}" -o publisher="RMX" \ -o bootimage="i386;_.w/boot/cdboot" -o no-emul-boot _.disk.iso _.w/ ) ) From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 17:29:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E804A288; Fri, 30 Jan 2015 17:29:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D43F8CC0; Fri, 30 Jan 2015 17:29:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0UHT8pB057522; Fri, 30 Jan 2015 17:29:08 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0UHT8S7057521; Fri, 30 Jan 2015 17:29:08 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201501301729.t0UHT8S7057521@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Fri, 30 Jan 2015 17:29:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277938 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 17:29:09 -0000 Author: hiren Date: Fri Jan 30 17:29:07 2015 New Revision: 277938 URL: https://svnweb.freebsd.org/changeset/base/277938 Log: Make syncookie_mac() use 'tcp_seq irs' in computing hash. This fixes what seems like a simple oversight when the function was added in r253210. Reported by: Daniel Borkmann Florian Westphal Differential Revision: https://reviews.freebsd.org/D1628 Reviewed by: gnn MFC after: 1 month Sponsored by: Limelight Networks Modified: head/sys/netinet/tcp_syncache.c Modified: head/sys/netinet/tcp_syncache.c ============================================================================== --- head/sys/netinet/tcp_syncache.c Fri Jan 30 15:42:52 2015 (r277937) +++ head/sys/netinet/tcp_syncache.c Fri Jan 30 17:29:07 2015 (r277938) @@ -1742,6 +1742,7 @@ syncookie_mac(struct in_conninfo *inc, t } SipHash_Update(&ctx, &inc->inc_fport, sizeof(inc->inc_fport)); SipHash_Update(&ctx, &inc->inc_lport, sizeof(inc->inc_lport)); + SipHash_Update(&ctx, &irs, sizeof(irs)); SipHash_Update(&ctx, &flags, sizeof(flags)); SipHash_Update(&ctx, &secmod, sizeof(secmod)); SipHash_Final((u_int8_t *)&siphash, &ctx); From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 18:07:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0D572DE6; Fri, 30 Jan 2015 18:07:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EDDF8159; Fri, 30 Jan 2015 18:07:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0UI7kxP078356; Fri, 30 Jan 2015 18:07:46 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0UI7kPD078355; Fri, 30 Jan 2015 18:07:46 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501301807.t0UI7kPD078355@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 30 Jan 2015 18:07:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277939 - head/usr.bin/grep X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 18:07:47 -0000 Author: ngie Date: Fri Jan 30 18:07:46 2015 New Revision: 277939 URL: https://svnweb.freebsd.org/changeset/base/277939 Log: Create MANLINKS for lzgrep, etc when MK_LZMA_SUPPORT != no MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Modified: head/usr.bin/grep/Makefile Modified: head/usr.bin/grep/Makefile ============================================================================== --- head/usr.bin/grep/Makefile Fri Jan 30 17:29:07 2015 (r277938) +++ head/usr.bin/grep/Makefile Fri Jan 30 18:07:46 2015 (r277939) @@ -31,13 +31,7 @@ MLINKS= grep.1 egrep.1 \ grep.1 fgrep.1 \ grep.1 zgrep.1 \ grep.1 zegrep.1 \ - grep.1 zfgrep.1 \ - grep.1 xzgrep.1 \ - grep.1 xzegrep.1 \ - grep.1 xzfgrep.1 \ - grep.1 lzgrep.1 \ - grep.1 lzegrep.1 \ - grep.1 lzfgrep.1 + grep.1 zfgrep.1 .endif LIBADD= z @@ -51,6 +45,13 @@ LINKS+= ${BINDIR}/${PROG} ${BINDIR}/xzgr ${BINDIR}/${PROG} ${BINDIR}/lzgrep \ ${BINDIR}/${PROG} ${BINDIR}/lzegrep \ ${BINDIR}/${PROG} ${BINDIR}/lzfgrep + +MLINKS+= grep.1 xzgrep.1 \ + grep.1 xzegrep.1 \ + grep.1 xzfgrep.1 \ + grep.1 lzgrep.1 \ + grep.1 lzegrep.1 \ + grep.1 lzfgrep.1 .else CFLAGS+= -DWITHOUT_LZMA .endif From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 18:17:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B8153332; Fri, 30 Jan 2015 18:17:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B181274; Fri, 30 Jan 2015 18:17:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0UIHILF083891; Fri, 30 Jan 2015 18:17:18 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0UIHHp6083888; Fri, 30 Jan 2015 18:17:17 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501301817.t0UIHHp6083888@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 30 Jan 2015 18:17:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277940 - in head/sys: conf modules/aesni X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 18:17:18 -0000 Author: dim Date: Fri Jan 30 18:17:17 2015 New Revision: 277940 URL: https://svnweb.freebsd.org/changeset/base/277940 Log: For clang, disable -Wcast-qual warnings for specific aesni files, since clang 3.6.0 will emit a number of such warnings for those files, and they are partially contributed code. Modified: head/sys/conf/files.amd64 head/sys/conf/kern.mk head/sys/modules/aesni/Makefile Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Fri Jan 30 18:07:46 2015 (r277939) +++ head/sys/conf/files.amd64 Fri Jan 30 18:17:17 2015 (r277940) @@ -131,12 +131,12 @@ crypto/aesni/aeskeys_amd64.S optional ae crypto/aesni/aesni.c optional aesni aesni_ghash.o optional aesni \ dependency "$S/crypto/aesni/aesni_ghash.c" \ - compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${PROF} -mmmx -msse -msse4 -maes -mpclmul ${.IMPSRC}" \ + compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${NO_WCAST_QUAL} ${PROF} -mmmx -msse -msse4 -maes -mpclmul ${.IMPSRC}" \ no-implicit-rule \ clean "aesni_ghash.o" aesni_wrap.o optional aesni \ dependency "$S/crypto/aesni/aesni_wrap.c" \ - compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${PROF} -mmmx -msse -msse4 -maes ${.IMPSRC}" \ + compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${NO_WCAST_QUAL} ${PROF} -mmmx -msse -msse4 -maes ${.IMPSRC}" \ no-implicit-rule \ clean "aesni_wrap.o" crypto/blowfish/bf_enc.c optional crypto | ipsec Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Fri Jan 30 18:07:46 2015 (r277939) +++ head/sys/conf/kern.mk Fri Jan 30 18:17:17 2015 (r277940) @@ -23,6 +23,7 @@ NO_WSHIFT_COUNT_OVERFLOW= -Wno-shift-cou NO_WSELF_ASSIGN= -Wno-self-assign NO_WUNNEEDED_INTERNAL_DECL= -Wno-unneeded-internal-declaration NO_WSOMETIMES_UNINITIALIZED= -Wno-error-sometimes-uninitialized +NO_WCAST_QUAL= -Wno-cast-qual # Several other warnings which might be useful in some cases, but not severe # enough to error out the whole kernel build. Display them anyway, so there is # some incentive to fix them eventually. Modified: head/sys/modules/aesni/Makefile ============================================================================== --- head/sys/modules/aesni/Makefile Fri Jan 30 18:07:46 2015 (r277939) +++ head/sys/modules/aesni/Makefile Fri Jan 30 18:17:17 2015 (r277940) @@ -22,3 +22,6 @@ aesni_wrap.o: aesni_wrap.c ${CTFCONVERT_CMD} .include + +CWARNFLAGS.aesni_ghash.c= ${NO_WCAST_QUAL} +CWARNFLAGS.aesni_wrap.c= ${NO_WCAST_QUAL} From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 18:18:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3C4D5576; Fri, 30 Jan 2015 18:18:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A8A728B; Fri, 30 Jan 2015 18:18:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0UII95m084106; Fri, 30 Jan 2015 18:18:09 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0UII9lF084105; Fri, 30 Jan 2015 18:18:09 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201501301818.t0UII9lF084105@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Fri, 30 Jan 2015 18:18:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277941 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 18:18:10 -0000 Author: loos Date: Fri Jan 30 18:18:09 2015 New Revision: 277941 URL: https://svnweb.freebsd.org/changeset/base/277941 Log: The BCM2835 GPIO controller uses has interrupt lines and not only one. Allocate all four, we will use them soon. Simplificate the allocation of memory and interrupt resources with a single bus_alloc_resources() call instead of doing them separately. Destroy the mutex in case of errors. Modified: head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Fri Jan 30 18:17:17 2015 (r277940) +++ head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Fri Jan 30 18:18:09 2015 (r277941) @@ -62,10 +62,20 @@ __FBSDID("$FreeBSD$"); #define dprintf(fmt, args...) #endif +#define BCM_GPIO_IRQS 4 #define BCM_GPIO_PINS 54 #define BCM_GPIO_DEFAULT_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | \ GPIO_PIN_PULLUP | GPIO_PIN_PULLDOWN) +static struct resource_spec bcm_gpio_res_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { SYS_RES_IRQ, 0, RF_ACTIVE }, + { SYS_RES_IRQ, 1, RF_ACTIVE }, + { SYS_RES_IRQ, 2, RF_ACTIVE }, + { SYS_RES_IRQ, 3, RF_ACTIVE }, + { -1, 0, 0 } +}; + struct bcm_gpio_sysctl { struct bcm_gpio_softc *sc; uint32_t pin; @@ -74,8 +84,7 @@ struct bcm_gpio_sysctl { struct bcm_gpio_softc { device_t sc_dev; struct mtx sc_mtx; - struct resource * sc_mem_res; - struct resource * sc_irq_res; + struct resource * sc_res[BCM_GPIO_IRQS + 1]; bus_space_tag_t sc_bst; bus_space_handle_t sc_bsh; void * sc_intrhand; @@ -660,34 +669,20 @@ bcm_gpio_probe(device_t dev) static int bcm_gpio_attach(device_t dev) { - struct bcm_gpio_softc *sc = device_get_softc(dev); - uint32_t func; - int i, j, rid; + int i, j; phandle_t gpio; + struct bcm_gpio_softc *sc; + uint32_t func; + sc = device_get_softc(dev); sc->sc_dev = dev; - mtx_init(&sc->sc_mtx, "bcm gpio", "gpio", MTX_DEF); - - rid = 0; - sc->sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, - RF_ACTIVE); - if (!sc->sc_mem_res) { - device_printf(dev, "cannot allocate memory window\n"); - return (ENXIO); - } - - sc->sc_bst = rman_get_bustag(sc->sc_mem_res); - sc->sc_bsh = rman_get_bushandle(sc->sc_mem_res); - - rid = 0; - sc->sc_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, - RF_ACTIVE); - if (!sc->sc_irq_res) { - bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->sc_mem_res); - device_printf(dev, "cannot allocate interrupt\n"); - return (ENXIO); + if (bus_alloc_resources(dev, bcm_gpio_res_spec, sc->sc_res) != 0) { + device_printf(dev, "cannot allocate resources\n"); + goto fail; } + sc->sc_bst = rman_get_bustag(sc->sc_res[0]); + sc->sc_bsh = rman_get_bushandle(sc->sc_res[0]); /* Find our node. */ gpio = ofw_bus_get_node(sc->sc_dev); @@ -723,10 +718,9 @@ bcm_gpio_attach(device_t dev) return (bus_generic_attach(dev)); fail: - if (sc->sc_irq_res) - bus_release_resource(dev, SYS_RES_IRQ, 0, sc->sc_irq_res); - if (sc->sc_mem_res) - bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->sc_mem_res); + bus_release_resources(dev, bcm_gpio_res_spec, sc->sc_res); + mtx_destroy(&sc->sc_mtx); + return (ENXIO); } From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 18:19:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 74E5B6E9; Fri, 30 Jan 2015 18:19:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 612D42A6; Fri, 30 Jan 2015 18:19:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0UIJNmR084366; Fri, 30 Jan 2015 18:19:23 GMT (envelope-from erj@FreeBSD.org) Received: (from erj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0UIJNaO084365; Fri, 30 Jan 2015 18:19:23 GMT (envelope-from erj@FreeBSD.org) Message-Id: <201501301819.t0UIJNaO084365@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: erj set sender to erj@FreeBSD.org using -f From: Eric Joyner Date: Fri, 30 Jan 2015 18:19:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277942 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 18:19:23 -0000 Author: erj Date: Fri Jan 30 18:19:22 2015 New Revision: 277942 URL: https://svnweb.freebsd.org/changeset/base/277942 Log: Add myself (erj) to committers-src.dot. Approved by: gnn (mentor), jfv (mentor) Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Fri Jan 30 18:18:09 2015 (r277941) +++ head/share/misc/committers-src.dot Fri Jan 30 18:19:22 2015 (r277942) @@ -153,6 +153,7 @@ eivind [label="Eivind Eklund\neivind@Fre emaste [label="Ed Maste\nemaste@FreeBSD.org\n2005/10/04"] emax [label="Maksim Yevmenkin\nemax@FreeBSD.org\n2003/10/12"] eri [label="Ermal Luci\neri@FreeBSD.org\n2008/06/11"] +erj [label="Eric Joyner\nerj@FreeBSD.org\n2014/12/14"] fabient [label="Fabien Thomas\nfabient@FreeBSD.org\n2009/03/16"] fanf [label="Tony Finch\nfanf@FreeBSD.org\n2002/05/05"] fjoe [label="Max Khon\nfjoe@FreeBSD.org\n2001/08/06"] @@ -440,6 +441,7 @@ gnn -> lstewart gnn -> np gnn -> davide gnn -> arybchik +gnn -> erj grehan -> bryanv @@ -485,6 +487,8 @@ jb -> sson jdp -> fjoe +jfv -> erj + jhb -> arr jhb -> avg jhb -> jch From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 18:22:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A2A108FC; Fri, 30 Jan 2015 18:22:52 +0000 (UTC) Received: from mail-qc0-x234.google.com (mail-qc0-x234.google.com [IPv6:2607:f8b0:400d:c01::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5A3B3378; Fri, 30 Jan 2015 18:22:52 +0000 (UTC) Received: by mail-qc0-f180.google.com with SMTP id r5so21713773qcx.11; Fri, 30 Jan 2015 10:22:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=nTHjCJKvDdas6ZTjfXauqTJpss43lupex0qlctNMRTw=; b=HZMmhFG0VgiY16Sq6QdR+Qqy/1Abow0w8YSaNAXLZIzVzziuHSPDzVRTOrUyj7CbsV z/rs16SIsDrBJfNxBRlxQAbk0WUGL1kOQQsdRCQ41JSNrWgDyr59LvMj2KBBS/FnSYvB oDznyLGWCy+BmWCljG1M0a1cp4vK6z0x39nPAvxgxoHMrWzQ1N6nl3T3XIKrwEE14L7c oN8PW2Ilr3CqMg4094a/wvxBI3g02iBy2vcEaIN+DscUbxUWDDP/2vLsYnWX8CUej1gy lGrOcXhH2xB4jzUiHTsdK7Wae3CM3Foitdvmdb7WIOB9G0Xpk075XhgjSKQ/jPYsh/XU F0tw== X-Received: by 10.140.81.208 with SMTP id f74mr14412429qgd.94.1422642171106; Fri, 30 Jan 2015 10:22:51 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.140.39.209 with HTTP; Fri, 30 Jan 2015 10:22:30 -0800 (PST) In-Reply-To: References: <201501300317.t0U3H8nL020407@svn.freebsd.org> From: Ed Maste Date: Fri, 30 Jan 2015 13:22:30 -0500 X-Google-Sender-Auth: CJ-jEzk3pCXlEKKAc5czq53eNo0 Message-ID: Subject: Re: svn commit: r277908 - head/share/man/man9 To: Benjamin Kaduk Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 18:22:52 -0000 On 29 January 2015 at 22:34, Benjamin Kaduk wrote: > > Wouldn't it be like a two-line patch to change contigfree(9) to permit NULL > as an argument? It would. > Would it be better to do that? Perhaps, although contigmalloc / contigfree have a smallish set of distinct use cases and existing code does not expect it can pass NULL. I didn't want to add the test just for consistency with free(). From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 18:25:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8F366B67; Fri, 30 Jan 2015 18:25:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B68D3A6; Fri, 30 Jan 2015 18:25:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0UIPsV5089221; Fri, 30 Jan 2015 18:25:54 GMT (envelope-from ambrisko@FreeBSD.org) Received: (from ambrisko@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0UIPsf0089220; Fri, 30 Jan 2015 18:25:54 GMT (envelope-from ambrisko@FreeBSD.org) Message-Id: <201501301825.t0UIPsf0089220@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ambrisko set sender to ambrisko@FreeBSD.org using -f From: Doug Ambrisko Date: Fri, 30 Jan 2015 18:25:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277943 - head/sys/boot/efi/libefi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 18:25:54 -0000 Author: ambrisko Date: Fri Jan 30 18:25:53 2015 New Revision: 277943 URL: https://svnweb.freebsd.org/changeset/base/277943 Log: Fix UEFI PXE boot on a NIC that isn't the first NIC. In UEFI it appears all available NICS are present to pass network traffic. This gives the capability to load the loader.efi from disk then set currdev="net3:" and then all I/O will over over the 2nd NIC. On this machine is appears the first handle is the first NIC in IPv4 mode and then the 2nd handle is the first NIC in IPv6 mode. The 3rd handle is the 2nd NIC in IPv4 mode. The fix is to index into the handle based on the unit cached from boot device passed into the loader. Some testing info from a test boot via kenv: currdev="net3:" loaddev="net3:" boot.netif.name="igb1" Modified: head/sys/boot/efi/libefi/efinet.c Modified: head/sys/boot/efi/libefi/efinet.c ============================================================================== --- head/sys/boot/efi/libefi/efinet.c Fri Jan 30 18:19:22 2015 (r277942) +++ head/sys/boot/efi/libefi/efinet.c Fri Jan 30 18:25:53 2015 (r277943) @@ -99,8 +99,11 @@ dump_mode(EFI_SIMPLE_NETWORK_MODE *mode) static int efinet_match(struct netif *nif, void *machdep_hint) { + struct devdesc *dev = machdep_hint; - return (1); + if (dev->d_unit - 1 == nif->nif_unit) + return (1); + return(0); } static int From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 18:26:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 57A1ACB3; Fri, 30 Jan 2015 18:26:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 428F33C6; Fri, 30 Jan 2015 18:26:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0UIQdGb089431; Fri, 30 Jan 2015 18:26:39 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0UIQdi1089430; Fri, 30 Jan 2015 18:26:39 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501301826.t0UIQdi1089430@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 30 Jan 2015 18:26:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277944 - head/contrib/libcxxrt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 18:26:39 -0000 Author: dim Date: Fri Jan 30 18:26:38 2015 New Revision: 277944 URL: https://svnweb.freebsd.org/changeset/base/277944 Log: Partially revert r273382, to reduce diffs against upstream. This was a temporary fix to solve a conflict with an older version of libc++, and it is no longer relevant. MFC after: 3 days Modified: head/contrib/libcxxrt/stdexcept.cc Modified: head/contrib/libcxxrt/stdexcept.cc ============================================================================== --- head/contrib/libcxxrt/stdexcept.cc Fri Jan 30 18:25:53 2015 (r277943) +++ head/contrib/libcxxrt/stdexcept.cc Fri Jan 30 18:26:38 2015 (r277944) @@ -82,19 +82,14 @@ const char* bad_typeid::what() const thr return "std::bad_typeid"; } -__attribute__((weak)) bad_array_new_length::bad_array_new_length() throw() {} -__attribute__((weak)) bad_array_new_length::~bad_array_new_length() {} -__attribute__((weak)) bad_array_new_length::bad_array_new_length(const bad_array_new_length&) throw() {} -__attribute__((weak)) bad_array_new_length& bad_array_new_length::operator=(const bad_array_new_length&) throw() { return *this; } -__attribute__((weak)) const char* bad_array_new_length::what() const throw() { return "std::bad_array_new_length"; From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 18:55:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C425B50B; Fri, 30 Jan 2015 18:55:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 960A4948; Fri, 30 Jan 2015 18:55:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0UIt60M005465; Fri, 30 Jan 2015 18:55:06 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0UIt6ma005463; Fri, 30 Jan 2015 18:55:06 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201501301855.t0UIt6ma005463@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 30 Jan 2015 18:55: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: r277946 - in stable/10/sys/boot: i386/loader pc98/loader X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 18:55:06 -0000 Author: jhb Date: Fri Jan 30 18:55:05 2015 New Revision: 277946 URL: https://svnweb.freebsd.org/changeset/base/277946 Log: MFC 274398,274537: Move NFS and TFTP filesystems before the synthetic filesystems (bzip, gzip, and split). Modified: stable/10/sys/boot/i386/loader/conf.c stable/10/sys/boot/pc98/loader/conf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/i386/loader/conf.c ============================================================================== --- stable/10/sys/boot/i386/loader/conf.c Fri Jan 30 18:34:56 2015 (r277945) +++ stable/10/sys/boot/i386/loader/conf.c Fri Jan 30 18:55:05 2015 (r277946) @@ -80,8 +80,11 @@ struct fs_ops *file_system[] = { #if defined(LOADER_NANDFS_SUPPORT) &nandfs_fsops, #endif -#ifdef LOADER_SPLIT_SUPPORT - &splitfs_fsops, +#ifdef LOADER_NFS_SUPPORT + &nfs_fsops, +#endif +#ifdef LOADER_TFTP_SUPPORT + &tftp_fsops, #endif #ifdef LOADER_GZIP_SUPPORT &gzipfs_fsops, @@ -89,11 +92,8 @@ struct fs_ops *file_system[] = { #ifdef LOADER_BZIP2_SUPPORT &bzipfs_fsops, #endif -#ifdef LOADER_NFS_SUPPORT - &nfs_fsops, -#endif -#ifdef LOADER_TFTP_SUPPORT - &tftp_fsops, +#ifdef LOADER_SPLIT_SUPPORT + &splitfs_fsops, #endif NULL }; Modified: stable/10/sys/boot/pc98/loader/conf.c ============================================================================== --- stable/10/sys/boot/pc98/loader/conf.c Fri Jan 30 18:34:56 2015 (r277945) +++ stable/10/sys/boot/pc98/loader/conf.c Fri Jan 30 18:55:05 2015 (r277946) @@ -61,19 +61,19 @@ struct fs_ops *file_system[] = { &ext2fs_fsops, &dosfs_fsops, &cd9660_fsops, - &splitfs_fsops, -#ifdef LOADER_GZIP_SUPPORT - &gzipfs_fsops, -#endif -#ifdef LOADER_BZIP2_SUPPORT - &bzipfs_fsops, -#endif #ifdef LOADER_NFS_SUPPORT &nfs_fsops, #endif #ifdef LOADER_TFTP_SUPPORT &tftp_fsops, #endif +#ifdef LOADER_GZIP_SUPPORT + &gzipfs_fsops, +#endif +#ifdef LOADER_BZIP2_SUPPORT + &bzipfs_fsops, +#endif + &splitfs_fsops, NULL }; From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 18:55:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 117E1635; Fri, 30 Jan 2015 18:55:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D4D0494B; Fri, 30 Jan 2015 18:55:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0UItHlT005545; Fri, 30 Jan 2015 18:55:17 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0UItHtQ005543; Fri, 30 Jan 2015 18:55:17 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201501301855.t0UItHtQ005543@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 30 Jan 2015 18:55:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r277947 - in stable/9/sys/boot: i386/loader pc98/loader X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 18:55:18 -0000 Author: jhb Date: Fri Jan 30 18:55:16 2015 New Revision: 277947 URL: https://svnweb.freebsd.org/changeset/base/277947 Log: MFC 274398,274537: Move NFS and TFTP filesystems before the synthetic filesystems (bzip, gzip, and split). Modified: stable/9/sys/boot/i386/loader/conf.c stable/9/sys/boot/pc98/loader/conf.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) Modified: stable/9/sys/boot/i386/loader/conf.c ============================================================================== --- stable/9/sys/boot/i386/loader/conf.c Fri Jan 30 18:55:05 2015 (r277946) +++ stable/9/sys/boot/i386/loader/conf.c Fri Jan 30 18:55:16 2015 (r277947) @@ -77,8 +77,11 @@ struct fs_ops *file_system[] = { &ext2fs_fsops, &dosfs_fsops, &cd9660_fsops, -#ifdef LOADER_SPLIT_SUPPORT - &splitfs_fsops, +#ifdef LOADER_NFS_SUPPORT + &nfs_fsops, +#endif +#ifdef LOADER_TFTP_SUPPORT + &tftp_fsops, #endif #ifdef LOADER_GZIP_SUPPORT &gzipfs_fsops, @@ -86,11 +89,8 @@ struct fs_ops *file_system[] = { #ifdef LOADER_BZIP2_SUPPORT &bzipfs_fsops, #endif -#ifdef LOADER_NFS_SUPPORT - &nfs_fsops, -#endif -#ifdef LOADER_TFTP_SUPPORT - &tftp_fsops, +#ifdef LOADER_SPLIT_SUPPORT + &splitfs_fsops, #endif NULL }; Modified: stable/9/sys/boot/pc98/loader/conf.c ============================================================================== --- stable/9/sys/boot/pc98/loader/conf.c Fri Jan 30 18:55:05 2015 (r277946) +++ stable/9/sys/boot/pc98/loader/conf.c Fri Jan 30 18:55:16 2015 (r277947) @@ -61,19 +61,19 @@ struct fs_ops *file_system[] = { &ext2fs_fsops, &dosfs_fsops, &cd9660_fsops, - &splitfs_fsops, -#ifdef LOADER_GZIP_SUPPORT - &gzipfs_fsops, -#endif -#ifdef LOADER_BZIP2_SUPPORT - &bzipfs_fsops, -#endif #ifdef LOADER_NFS_SUPPORT &nfs_fsops, #endif #ifdef LOADER_TFTP_SUPPORT &tftp_fsops, #endif +#ifdef LOADER_GZIP_SUPPORT + &gzipfs_fsops, +#endif +#ifdef LOADER_BZIP2_SUPPORT + &bzipfs_fsops, +#endif + &splitfs_fsops, NULL }; From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 19:19:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DFEE49B9; Fri, 30 Jan 2015 19:19:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC3C8B66; Fri, 30 Jan 2015 19:19:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0UJJ4Um016648; Fri, 30 Jan 2015 19:19:04 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0UJJ4CY016647; Fri, 30 Jan 2015 19:19:04 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501301919.t0UJJ4CY016647@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 30 Jan 2015 19:19:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277948 - head/lib/msun/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 19:19:05 -0000 Author: pfg Date: Fri Jan 30 19:19:03 2015 New Revision: 277948 URL: https://svnweb.freebsd.org/changeset/base/277948 Log: msun: use previously ignored value. This fixes evaluation of exceptional values in scalblnl(). While here, simplify the code as suggested by Bruce Evans. Reported by: clang static analyzer MFC after: 1 week Modified: head/lib/msun/src/s_scalbln.c Modified: head/lib/msun/src/s_scalbln.c ============================================================================== --- head/lib/msun/src/s_scalbln.c Fri Jan 30 18:55:16 2015 (r277947) +++ head/lib/msun/src/s_scalbln.c Fri Jan 30 19:19:03 2015 (r277948) @@ -35,13 +35,7 @@ scalbln (double x, long n) { int in; - in = (int)n; - if (in != n) { - if (n > 0) - in = INT_MAX; - else - in = INT_MIN; - } + in = (n > INT_MAX) ? INT_MAX : (n < INT_MIN) ? INT_MIN : n; return (scalbn(x, in)); } @@ -50,13 +44,7 @@ scalblnf (float x, long n) { int in; - in = (int)n; - if (in != n) { - if (n > 0) - in = INT_MAX; - else - in = INT_MIN; - } + in = (n > INT_MAX) ? INT_MAX : (n < INT_MIN) ? INT_MIN : n; return (scalbnf(x, in)); } @@ -65,12 +53,6 @@ scalblnl (long double x, long n) { int in; - in = (int)n; - if (in != n) { - if (n > 0) - in = INT_MAX; - else - in = INT_MIN; - } - return (scalbnl(x, (int)n)); + in = (n > INT_MAX) ? INT_MAX : (n < INT_MIN) ? INT_MIN : n; + return (scalbnl(x, in)); } From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 19:40:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6173ED5F for ; Fri, 30 Jan 2015 19:40:35 +0000 (UTC) Received: from cyrus.watson.org (cyrus.watson.org [198.74.231.69]) by mx1.freebsd.org (Postfix) with ESMTP id 39AE3D68 for ; Fri, 30 Jan 2015 19:40:35 +0000 (UTC) Received: from c0152.aw.cl.cam.ac.uk (c0152.aw.cl.cam.ac.uk [128.232.100.152]) by cyrus.watson.org (Postfix) with ESMTPSA id 2823046B2C; Fri, 30 Jan 2015 14:40:34 -0500 (EST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r277203 - in head/sys: kern sys From: "Robert N. M. Watson" In-Reply-To: <20150115123557.GC7669@britannica.bec.de> Date: Fri, 30 Jan 2015 19:40:33 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201501142344.t0ENi0tI088747@svn.freebsd.org> <20150115123557.GC7669@britannica.bec.de> To: Joerg Sonnenberger X-Mailer: Apple Mail (2.1993) Cc: svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 19:40:35 -0000 > On 15 Jan 2015, at 12:35, Joerg Sonnenberger = wrote: >=20 > On Wed, Jan 14, 2015 at 11:44:00PM +0000, Robert Watson wrote: >> - As we anticipate embedding mbufs headers within variable-size = regions of >> memory in the future, change the definitions of byte arrays = embedded in >> mbufs to be of size [0] rather than [MLEN] and [MHLEN]. >=20 > This is not valid C. You may be able to use flexible array members = ([]) > instead. Life is not that simple -- see the Phabricator review discussion which = considers this point in detail. The short version is: using [] for the = last entry in a union within a structure is explicitly disallowed in the = C spec, actually works fine with [0] in gcc + extensions, which are a = feature used in the kernel already. If in doubt, try replacing [0] with = [] and recompiling, it's an instructive and morally improving process. = We will want to feed this back to the C standardisation folk at some = point. Robert= From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 19:47:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 28046DF1; Fri, 30 Jan 2015 19:47:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 12CA0E1E; Fri, 30 Jan 2015 19:47:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0UJlQGO032127; Fri, 30 Jan 2015 19:47:26 GMT (envelope-from grembo@FreeBSD.org) Received: (from grembo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0UJlQbb032125; Fri, 30 Jan 2015 19:47:26 GMT (envelope-from grembo@FreeBSD.org) Message-Id: <201501301947.t0UJlQbb032125@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: grembo set sender to grembo@FreeBSD.org using -f From: Michael Gmelin Date: Fri, 30 Jan 2015 19:47:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277949 - head/sys/boot/i386/libi386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 19:47:27 -0000 Author: grembo (ports committer) Date: Fri Jan 30 19:47:25 2015 New Revision: 277949 URL: https://svnweb.freebsd.org/changeset/base/277949 Log: New function smbios_match to detect BIOS versions during boot Motivation is to introduce BIOS specific quirks early in the boot process. smbios_match can be called before malloc is avaible, that's why parts of smbios_detect have been moved into a separate function smbios_probe that will be called by smbios_detect as well as smbios_match. Reviewed by: jhb Approved by: jhb Differential Revision: https://reviews.freebsd.org/D1679 Modified: head/sys/boot/i386/libi386/libi386.h head/sys/boot/i386/libi386/smbios.c Modified: head/sys/boot/i386/libi386/libi386.h ============================================================================== --- head/sys/boot/i386/libi386/libi386.h Fri Jan 30 19:19:03 2015 (r277948) +++ head/sys/boot/i386/libi386/libi386.h Fri Jan 30 19:47:25 2015 (r277949) @@ -114,6 +114,8 @@ uint32_t biospci_locator(int8_t bus, uin void biosacpi_detect(void); void smbios_detect(void); +int smbios_match(const char* bios_vendor, const char* maker, + const char* product); int i386_autoload(void); Modified: head/sys/boot/i386/libi386/smbios.c ============================================================================== --- head/sys/boot/i386/libi386/smbios.c Fri Jan 30 19:19:03 2015 (r277948) +++ head/sys/boot/i386/libi386/smbios.c Fri Jan 30 19:47:25 2015 (r277949) @@ -64,10 +64,24 @@ __FBSDID("$FreeBSD$"); #define SMBIOS_GETLEN(base) SMBIOS_GET8(base, 0x01) #define SMBIOS_GETSTR(base) ((base) + SMBIOS_GETLEN(base)) -static uint32_t smbios_enabled_memory = 0; -static uint32_t smbios_old_enabled_memory = 0; -static uint8_t smbios_enabled_sockets = 0; -static uint8_t smbios_populated_sockets = 0; +struct smbios_attr { + int probed; + caddr_t addr; + size_t length; + size_t count; + int major; + int minor; + int ver; + const char* bios_vendor; + const char* maker; + const char* product; + uint32_t enabled_memory; + uint32_t old_enabled_memory; + uint8_t enabled_sockets; + uint8_t populated_sockets; +}; + +static struct smbios_attr smbios; static uint8_t smbios_checksum(const caddr_t addr, const uint8_t len) @@ -95,8 +109,8 @@ smbios_sigsearch(const caddr_t addr, con return (NULL); } -static void -smbios_setenv(const char *name, caddr_t addr, const int offset) +static const char* +smbios_getstring(caddr_t addr, const int offset) { caddr_t cp; int i, idx; @@ -106,8 +120,19 @@ smbios_setenv(const char *name, caddr_t cp = SMBIOS_GETSTR(addr); for (i = 1; i < idx; i++) cp += strlen(cp) + 1; - setenv(name, cp, 1); + return cp; } + return (NULL); +} + +static void +smbios_setenv(const char *name, caddr_t addr, const int offset) +{ + const char* val; + + val = smbios_getstring(addr, offset); + if (val != NULL) + setenv(name, val, 1); } #ifdef SMBIOS_SERIAL_NUMBERS @@ -187,7 +212,7 @@ smbios_setuuid(const char *name, const c #endif static caddr_t -smbios_parse_table(const caddr_t addr, const int ver) +smbios_parse_table(const caddr_t addr) { caddr_t cp; int proc, size, osize, type; @@ -206,7 +231,7 @@ smbios_parse_table(const caddr_t addr, c smbios_setenv("smbios.system.version", addr, 0x06); #ifdef SMBIOS_SERIAL_NUMBERS smbios_setenv("smbios.system.serial", addr, 0x07); - smbios_setuuid("smbios.system.uuid", addr + 0x08, ver); + smbios_setuuid("smbios.system.uuid", addr + 0x08, smbios.ver); #endif break; @@ -248,9 +273,9 @@ smbios_parse_table(const caddr_t addr, c */ proc = SMBIOS_GET8(addr, 0x18); if ((proc & 0x07) == 1) - smbios_enabled_sockets++; + smbios.enabled_sockets++; if ((proc & 0x40) != 0) - smbios_populated_sockets++; + smbios.populated_sockets++; break; case 6: /* 3.3.7 Memory Module Information (Type 6, Obsolete) */ @@ -268,7 +293,7 @@ smbios_parse_table(const caddr_t addr, c */ osize = SMBIOS_GET8(addr, 0x0a) & 0x7f; if (osize > 0 && osize < 22) - smbios_old_enabled_memory += 1 << (osize + 10); + smbios.old_enabled_memory += 1 << (osize + 10); break; case 17: /* 3.3.18 Memory Device (Type 17) */ @@ -282,7 +307,7 @@ smbios_parse_table(const caddr_t addr, c */ size = SMBIOS_GET16(addr, 0x0c); if (size != 0 && size != 0xffff) - smbios_enabled_memory += (size & 0x8000) != 0 ? + smbios.enabled_memory += (size & 0x8000) != 0 ? (size & 0x7fff) : (size << 10); break; @@ -298,54 +323,118 @@ smbios_parse_table(const caddr_t addr, c return (cp + 2); } +static void +smbios_probe(void) +{ + caddr_t saddr, info; + u_int32_t paddr; + + if (smbios.probed) + return; + smbios.probed = 1; + + /* Search signatures and validate checksums. */ + saddr = smbios_sigsearch(PTOV(SMBIOS_START), SMBIOS_LENGTH); + if (saddr == NULL) + return; + + smbios.length = SMBIOS_GET16(saddr, 0x16); /* Structure Table Length */ + paddr = SMBIOS_GET32(saddr, 0x18); /* Structure Table Address */ + smbios.count = SMBIOS_GET16(saddr, 0x1c); /* No of SMBIOS Structures */ + smbios.ver = SMBIOS_GET8(saddr, 0x1e); /* SMBIOS BCD Revision */ + + if (smbios.ver != 0) { + smbios.major = smbios.ver >> 4; + smbios.minor = smbios.ver & 0x0f; + if (smbios.major > 9 || smbios.minor > 9) + smbios.ver = 0; + } + if (smbios.ver == 0) { + smbios.major = SMBIOS_GET8(saddr, 0x06);/* SMBIOS Major Version */ + smbios.minor = SMBIOS_GET8(saddr, 0x07);/* SMBIOS Minor Version */ + } + smbios.ver = (smbios.major << 8) | smbios.minor; + smbios.addr = PTOV(paddr); + + /* Get system information from SMBIOS */ + info = smbios_find_struct(0x00); + if (info != NULL) { + smbios.bios_vendor = smbios_getstring(info, 0x04); + } + info = smbios_find_struct(0x01); + if (info != NULL) { + smbios.maker = smbios_getstring(info, 0x04); + smbios.product = smbios_getstring(info, 0x05); + } +} + +static caddr_t +smbios_find_struct(int type) +{ + caddr_t dmi; + int i; + + if (smbios.addr == NULL) + return (NULL); + + for (dmi = smbios.addr, i = 0; + dmi < smbios.addr + smbios.length && i < smbios.count; i++) { + if (SMBIOS_GET8(dmi, 0) == type) + return dmi; + /* Find structure terminator. */ + dmi = SMBIOS_GETSTR(dmi); + while (SMBIOS_GET16(dmi, 0) != 0) + dmi++; + dmi += 2; + } + + return (NULL); +} + void smbios_detect(void) { char buf[16]; - caddr_t addr, dmi, smbios; - size_t count, length; - uint32_t paddr; - int i, major, minor, ver; + caddr_t dmi; + int i; - /* Search signatures and validate checksums. */ - smbios = smbios_sigsearch(PTOV(SMBIOS_START), SMBIOS_LENGTH); - if (smbios == NULL) + smbios_probe(); + if (smbios.addr == NULL) return; - length = SMBIOS_GET16(smbios, 0x16); /* Structure Table Length */ - paddr = SMBIOS_GET32(smbios, 0x18); /* Structure Table Address */ - count = SMBIOS_GET16(smbios, 0x1c); /* No of SMBIOS Structures */ - ver = SMBIOS_GET8(smbios, 0x1e); /* SMBIOS BCD Revision */ - - if (ver != 0) { - major = ver >> 4; - minor = ver & 0x0f; - if (major > 9 || minor > 9) - ver = 0; - } - if (ver == 0) { - major = SMBIOS_GET8(smbios, 0x06); /* SMBIOS Major Version */ - minor = SMBIOS_GET8(smbios, 0x07); /* SMBIOS Minor Version */ - } - ver = (major << 8) | minor; - - addr = PTOV(paddr); - for (dmi = addr, i = 0; dmi < addr + length && i < count; i++) - dmi = smbios_parse_table(dmi, ver); + for (dmi = smbios.addr, i = 0; + dmi < smbios.addr + smbios.length && i < smbios.count; i++) + dmi = smbios_parse_table(dmi); - sprintf(buf, "%d.%d", major, minor); + sprintf(buf, "%d.%d", smbios.major, smbios.minor); setenv("smbios.version", buf, 1); - if (smbios_enabled_memory > 0 || smbios_old_enabled_memory > 0) { - sprintf(buf, "%u", smbios_enabled_memory > 0 ? - smbios_enabled_memory : smbios_old_enabled_memory); + if (smbios.enabled_memory > 0 || smbios.old_enabled_memory > 0) { + sprintf(buf, "%u", smbios.enabled_memory > 0 ? + smbios.enabled_memory : smbios.old_enabled_memory); setenv("smbios.memory.enabled", buf, 1); } - if (smbios_enabled_sockets > 0) { - sprintf(buf, "%u", smbios_enabled_sockets); + if (smbios.enabled_sockets > 0) { + sprintf(buf, "%u", smbios.enabled_sockets); setenv("smbios.socket.enabled", buf, 1); } - if (smbios_populated_sockets > 0) { - sprintf(buf, "%u", smbios_populated_sockets); + if (smbios.populated_sockets > 0) { + sprintf(buf, "%u", smbios.populated_sockets); setenv("smbios.socket.populated", buf, 1); } } + +static int +smbios_match_str(const char* s1, const char* s2) +{ + return (s1 == NULL || (s2 != NULL && !strcmp(s1, s2))); +} + +int +smbios_match(const char* bios_vendor, const char* maker, + const char* product) +{ + smbios_probe(); + return (smbios_match_str(bios_vendor, smbios.bios_vendor) && + smbios_match_str(maker, smbios.maker) && + smbios_match_str(product, smbios.product)); +} From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 21:22:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 71C2FD4C; Fri, 30 Jan 2015 21:22:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D2DEA59; Fri, 30 Jan 2015 21:22:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0ULMJTt082754; Fri, 30 Jan 2015 21:22:19 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0ULMJUe082753; Fri, 30 Jan 2015 21:22:19 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501302122.t0ULMJUe082753@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Fri, 30 Jan 2015 21:22:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277950 - head/usr.sbin/bsdinstall/partedit X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 21:22:19 -0000 Author: nwhitehorn Date: Fri Jan 30 21:22:18 2015 New Revision: 277950 URL: https://svnweb.freebsd.org/changeset/base/277950 Log: Use MBR by default on BIOS systems. An increasing number of motherboards assume that GPT means UEFI boot, resulting in the installation of uninstallable systems. This needs a little more work before MFC, in particular based on disk size (> 2 TB + BIOS + MBR is not workable). That will come soon. Modified: head/usr.sbin/bsdinstall/partedit/partedit_x86.c Modified: head/usr.sbin/bsdinstall/partedit/partedit_x86.c ============================================================================== --- head/usr.sbin/bsdinstall/partedit/partedit_x86.c Fri Jan 30 19:47:25 2015 (r277949) +++ head/usr.sbin/bsdinstall/partedit/partedit_x86.c Fri Jan 30 21:22:18 2015 (r277950) @@ -51,7 +51,10 @@ x86_bootmethod(void) const char * default_scheme(void) { - return ("GPT"); + if (strcmp(x86_bootmethod(), "UEFI") == 0) + return ("GPT"); + else + return ("MBR"); } int From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 21:59:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 44F4A1E7; Fri, 30 Jan 2015 21:59:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 30FC1D24; Fri, 30 Jan 2015 21:59:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0ULxsUf098975; Fri, 30 Jan 2015 21:59:54 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0ULxsJZ098974; Fri, 30 Jan 2015 21:59:54 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501302159.t0ULxsJZ098974@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 30 Jan 2015 21:59:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277951 - head/sys/netgraph X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 21:59:54 -0000 Author: dim Date: Fri Jan 30 21:59:53 2015 New Revision: 277951 URL: https://svnweb.freebsd.org/changeset/base/277951 Log: Fix a bunch of -Wcast-qual warnings in netgraph's ng_parse.c, by using __DECONST. No functional change. MFC after: 3 days Modified: head/sys/netgraph/ng_parse.c Modified: head/sys/netgraph/ng_parse.c ============================================================================== --- head/sys/netgraph/ng_parse.c Fri Jan 30 21:22:18 2015 (r277950) +++ head/sys/netgraph/ng_parse.c Fri Jan 30 21:59:53 2015 (r277951) @@ -1122,7 +1122,7 @@ ng_bytearray_parse(const struct ng_parse struct ng_parse_type subtype; subtype = ng_parse_bytearray_subtype; - *(const void **)&subtype.private = type->info; + subtype.private = __DECONST(void *, type->info); return ng_array_parse(&subtype, s, off, start, buf, buflen); } } @@ -1134,7 +1134,7 @@ ng_bytearray_unparse(const struct ng_par struct ng_parse_type subtype; subtype = ng_parse_bytearray_subtype; - *(const void **)&subtype.private = type->info; + subtype.private = __DECONST(void *, type->info); return ng_array_unparse(&subtype, data, off, cbuf, cbuflen); } @@ -1145,7 +1145,7 @@ ng_bytearray_getDefault(const struct ng_ struct ng_parse_type subtype; subtype = ng_parse_bytearray_subtype; - *(const void **)&subtype.private = type->info; + subtype.private = __DECONST(void *, type->info); return ng_array_getDefault(&subtype, start, buf, buflen); } From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 22:01:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 61C8835B; Fri, 30 Jan 2015 22:01:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DE62D47; Fri, 30 Jan 2015 22:01:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0UM1kjC003047; Fri, 30 Jan 2015 22:01:46 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0UM1k36003046; Fri, 30 Jan 2015 22:01:46 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501302201.t0UM1k36003046@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 30 Jan 2015 22:01:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277952 - head/sys/fs/udf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 22:01:46 -0000 Author: dim Date: Fri Jan 30 22:01:45 2015 New Revision: 277952 URL: https://svnweb.freebsd.org/changeset/base/277952 Log: Fix a -Wcast-qual warning in udf_vnops.c, by using __DECONST. No functional change. MFC after: 3 days Modified: head/sys/fs/udf/udf_vnops.c Modified: head/sys/fs/udf/udf_vnops.c ============================================================================== --- head/sys/fs/udf/udf_vnops.c Fri Jan 30 21:59:53 2015 (r277951) +++ head/sys/fs/udf/udf_vnops.c Fri Jan 30 22:01:45 2015 (r277952) @@ -526,8 +526,9 @@ udf_transname(char *cs0string, char *des } while (unilen > 0 && destleft > 0) { - udf_iconv->conv(udfmp->im_d2l, (const char **)&unibuf, - (size_t *)&unilen, (char **)&destname, &destleft); + udf_iconv->conv(udfmp->im_d2l, __DECONST(const char **, + &unibuf), (size_t *)&unilen, (char **)&destname, + &destleft); /* Unconverted character found */ if (unilen > 0 && destleft > 0) { *destname++ = '?'; From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 22:02:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1163549F; Fri, 30 Jan 2015 22:02:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F18EFDE1; Fri, 30 Jan 2015 22:02:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0UM2WW7003217; Fri, 30 Jan 2015 22:02:32 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0UM2WbD003216; Fri, 30 Jan 2015 22:02:32 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501302202.t0UM2WbD003216@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 30 Jan 2015 22:02:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277953 - head/sys/fs/smbfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 22:02:33 -0000 Author: dim Date: Fri Jan 30 22:02:32 2015 New Revision: 277953 URL: https://svnweb.freebsd.org/changeset/base/277953 Log: Fix a -Wcast-qual warning in smbfs_subr.c, by using __DECONST. No functional change. MFC after: 3 days Modified: head/sys/fs/smbfs/smbfs_subr.c Modified: head/sys/fs/smbfs/smbfs_subr.c ============================================================================== --- head/sys/fs/smbfs/smbfs_subr.c Fri Jan 30 22:01:45 2015 (r277952) +++ head/sys/fs/smbfs/smbfs_subr.c Fri Jan 30 22:02:32 2015 (r277953) @@ -170,8 +170,8 @@ smbfs_fname_tolocal(struct smb_vc *vcp, if (error) return error; */ - error = iconv_conv_case - (vcp->vc_tolocal, (const char **)&ibuf, &ilen, &obuf, &olen, copt); + error = iconv_conv_case(vcp->vc_tolocal, + __DECONST(const char **, &ibuf), &ilen, &obuf, &olen, copt); if (error && SMB_UNICODE_STRINGS(vcp)) { /* * If using unicode, leaving a file name as it was when From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 23:26:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0BF8E617; Fri, 30 Jan 2015 23:26:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E4B51811; Fri, 30 Jan 2015 23:26:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0UNQ31W043579; Fri, 30 Jan 2015 23:26:03 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0UNQ35g043578; Fri, 30 Jan 2015 23:26:03 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201501302326.t0UNQ35g043578@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Fri, 30 Jan 2015 23:26:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277954 - head/games/fortune/fortune X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 23:26:04 -0000 Author: cperciva Date: Fri Jan 30 23:26:03 2015 New Revision: 277954 URL: https://svnweb.freebsd.org/changeset/base/277954 Log: Fix 7-year-old typo: The default directory searched for fortunes is /usr/share/games/fortune, not /usr/games/fortune (which is the path to the fortune binary itself). Modified: head/games/fortune/fortune/fortune.6 Modified: head/games/fortune/fortune/fortune.6 ============================================================================== --- head/games/fortune/fortune/fortune.6 Fri Jan 30 22:02:32 2015 (r277953) +++ head/games/fortune/fortune/fortune.6 Fri Jan 30 23:26:03 2015 (r277954) @@ -168,7 +168,7 @@ It is a colon-separated list of director .Nm looks for data files. If not set it will default to -.Pa /usr/games/fortune . +.Pa /usr/share/games/fortune . If none of the directories specified exist, it will print a warning and exit. .It Ev FORTUNE_SAVESTATE If set, fortune will save some state about what fortune From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 00:06:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C6CFC29F; Sat, 31 Jan 2015 00:06:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B211DBDD; Sat, 31 Jan 2015 00:06:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0V066Ot064775; Sat, 31 Jan 2015 00:06:06 GMT (envelope-from grembo@FreeBSD.org) Received: (from grembo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0V066NX064774; Sat, 31 Jan 2015 00:06:06 GMT (envelope-from grembo@FreeBSD.org) Message-Id: <201501310006.t0V066NX064774@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: grembo set sender to grembo@FreeBSD.org using -f From: Michael Gmelin Date: Sat, 31 Jan 2015 00:06:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277957 - head/sys/boot/i386/libi386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 00:06:06 -0000 Author: grembo (ports committer) Date: Sat Jan 31 00:06:05 2015 New Revision: 277957 URL: https://svnweb.freebsd.org/changeset/base/277957 Log: Fix order of functions in smbios.c (corrects r277949), since this corrects a build error I committed this directly, sorry. Modified: head/sys/boot/i386/libi386/smbios.c Modified: head/sys/boot/i386/libi386/smbios.c ============================================================================== --- head/sys/boot/i386/libi386/smbios.c Fri Jan 30 23:57:39 2015 (r277956) +++ head/sys/boot/i386/libi386/smbios.c Sat Jan 31 00:06:05 2015 (r277957) @@ -323,6 +323,29 @@ smbios_parse_table(const caddr_t addr) return (cp + 2); } +static caddr_t +smbios_find_struct(int type) +{ + caddr_t dmi; + int i; + + if (smbios.addr == NULL) + return (NULL); + + for (dmi = smbios.addr, i = 0; + dmi < smbios.addr + smbios.length && i < smbios.count; i++) { + if (SMBIOS_GET8(dmi, 0) == type) + return dmi; + /* Find structure terminator. */ + dmi = SMBIOS_GETSTR(dmi); + while (SMBIOS_GET16(dmi, 0) != 0) + dmi++; + dmi += 2; + } + + return (NULL); +} + static void smbios_probe(void) { @@ -368,29 +391,6 @@ smbios_probe(void) } } -static caddr_t -smbios_find_struct(int type) -{ - caddr_t dmi; - int i; - - if (smbios.addr == NULL) - return (NULL); - - for (dmi = smbios.addr, i = 0; - dmi < smbios.addr + smbios.length && i < smbios.count; i++) { - if (SMBIOS_GET8(dmi, 0) == type) - return dmi; - /* Find structure terminator. */ - dmi = SMBIOS_GETSTR(dmi); - while (SMBIOS_GET16(dmi, 0) != 0) - dmi++; - dmi += 2; - } - - return (NULL); -} - void smbios_detect(void) { From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 02:12:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 215004ED; Sat, 31 Jan 2015 02:12:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E2499A0; Sat, 31 Jan 2015 02:12:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0V2Cv4L029067; Sat, 31 Jan 2015 02:12:57 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0V2Cv3X029066; Sat, 31 Jan 2015 02:12:57 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201501310212.t0V2Cv3X029066@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Sat, 31 Jan 2015 02:12:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277958 - head/sys/arm/ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 02:12:58 -0000 Author: rpaulo Date: Sat Jan 31 02:12:57 2015 New Revision: 277958 URL: https://svnweb.freebsd.org/changeset/base/277958 Log: ti_pruss: make sure the mmap'ed memory region is uncacheable. MFC after: 1 week Modified: head/sys/arm/ti/ti_pruss.c Modified: head/sys/arm/ti/ti_pruss.c ============================================================================== --- head/sys/arm/ti/ti_pruss.c Sat Jan 31 00:06:05 2015 (r277957) +++ head/sys/arm/ti/ti_pruss.c Sat Jan 31 02:12:57 2015 (r277958) @@ -258,6 +258,7 @@ ti_pruss_mmap(struct cdev *cdev, vm_ooff if (offset > rman_get_size(sc->sc_mem_res)) return (-1); *paddr = rman_get_start(sc->sc_mem_res) + offset; + *memattr = VM_MEMATTR_UNCACHEABLE; return (0); } From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 02:13:26 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5D98C626; Sat, 31 Jan 2015 02:13:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49F909A4; Sat, 31 Jan 2015 02:13:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0V2DQ0L029199; Sat, 31 Jan 2015 02:13:26 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0V2DQ8c029198; Sat, 31 Jan 2015 02:13:26 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501310213.t0V2DQ8c029198@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 31 Jan 2015 02:13:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277959 - head/sys/dev/drm2/i915 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 02:13:26 -0000 Author: adrian Date: Sat Jan 31 02:13:25 2015 New Revision: 277959 URL: https://svnweb.freebsd.org/changeset/base/277959 Log: Fix backlight for ivybridge based laptops (and whatever else comes through this codepath.) (1<<30) is documented as BLM_PCH_OVERRIDE_ENABLE, which the current i915 driver in Linux only sets for broadwell chips. This fixes the backlight control on the Lenovo X230. Approved by: kib Obtained from: Linux 7aa1e7f06d6ea1bce3b27630d50769d13da28b1a Modified: head/sys/dev/drm2/i915/intel_display.c Modified: head/sys/dev/drm2/i915/intel_display.c ============================================================================== --- head/sys/dev/drm2/i915/intel_display.c Sat Jan 31 02:12:57 2015 (r277958) +++ head/sys/dev/drm2/i915/intel_display.c Sat Jan 31 02:13:25 2015 (r277959) @@ -6995,7 +6995,7 @@ static void ivb_pch_pwm_override(struct */ I915_WRITE(BLC_PWM_CPU_CTL2, PWM_ENABLE); I915_WRITE(BLC_PWM_CPU_CTL, 0); - I915_WRITE(BLC_PWM_PCH_CTL1, PWM_ENABLE | (1<<30)); + I915_WRITE(BLC_PWM_PCH_CTL1, PWM_ENABLE); } void intel_modeset_init_hw(struct drm_device *dev) From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 02:15:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 43DA27C0; Sat, 31 Jan 2015 02:15:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 309CC9D4; Sat, 31 Jan 2015 02:15:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0V2FHUh029567; Sat, 31 Jan 2015 02:15:17 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0V2FH61029566; Sat, 31 Jan 2015 02:15:17 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201501310215.t0V2FH61029566@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 31 Jan 2015 02:15:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277960 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 02:15:17 -0000 Author: jhb Date: Sat Jan 31 02:15:16 2015 New Revision: 277960 URL: https://svnweb.freebsd.org/changeset/base/277960 Log: Add a WITNESS_WARN check to STOPEVENT() to match the one in _STOPEVENT(). Modified: head/sys/sys/proc.h Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Sat Jan 31 02:13:25 2015 (r277959) +++ head/sys/sys/proc.h Sat Jan 31 02:15:16 2015 (r277960) @@ -752,6 +752,8 @@ extern pid_t pid_max; #define STOPEVENT(p, e, v) do { \ + WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, \ + "checking stopevent %d", (e)); \ if ((p)->p_stops & (e)) { \ PROC_LOCK(p); \ stopevent((p), (e), (v)); \ From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 03:22:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A9A521AF; Sat, 31 Jan 2015 03:22:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 93A298C; Sat, 31 Jan 2015 03:22:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0V3M1Q1064815; Sat, 31 Jan 2015 03:22:01 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0V3M1eg064814; Sat, 31 Jan 2015 03:22:01 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201501310322.t0V3M1eg064814@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 31 Jan 2015 03:22:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277961 - head/lib/libproc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 03:22:01 -0000 Author: markj Date: Sat Jan 31 03:22:00 2015 New Revision: 277961 URL: https://svnweb.freebsd.org/changeset/base/277961 Log: Stop iterating and return if the caller-supplied callback function returns a non-zero value. MFC after: 1 week Modified: head/lib/libproc/proc_sym.c Modified: head/lib/libproc/proc_sym.c ============================================================================== --- head/lib/libproc/proc_sym.c Sat Jan 31 02:15:16 2015 (r277960) +++ head/lib/libproc/proc_sym.c Sat Jan 31 03:22:00 2015 (r277961) @@ -153,9 +153,12 @@ proc_iter_objs(struct proc_handle *p, pr prmap_t map; char path[MAXPATHLEN]; char last[MAXPATHLEN]; + int error; if (p->nobjs == 0) return (-1); + + error = 0; memset(last, 0, sizeof(last)); for (i = 0; i < p->nobjs; i++) { rdl = &p->rdobjs[i]; @@ -169,11 +172,11 @@ proc_iter_objs(struct proc_handle *p, pr */ if (strcmp(path, last) == 0) continue; - (*func)(cd, &map, path); + if ((error = (*func)(cd, &map, path)) != 0) + break; strlcpy(last, path, sizeof(last)); } - - return (0); + return (error); } prmap_t * @@ -599,7 +602,8 @@ proc_iter_symbyaddr(struct proc_handle * s = elf_strptr(e, stridx, sym.st_name); if (ehdr.e_type != ET_EXEC) sym.st_value += map->pr_vaddr; - (*func)(cd, &sym, s); + if ((error = (*func)(cd, &sym, s)) != 0) + goto err2; } error = 0; err2: From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 07:22:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A80C4DCF; Sat, 31 Jan 2015 07:22:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C5E68DC; Sat, 31 Jan 2015 07:22:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0V7MUKh087419; Sat, 31 Jan 2015 07:22:30 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0V7MUob087418; Sat, 31 Jan 2015 07:22:30 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501310722.t0V7MUob087418@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Sat, 31 Jan 2015 07:22:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277962 - head/sys/boot/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 07:22:30 -0000 Author: nwhitehorn Date: Sat Jan 31 07:22:29 2015 New Revision: 277962 URL: https://svnweb.freebsd.org/changeset/base/277962 Log: Add support for booting relocatable kernels on PowerPC. Modified: head/sys/boot/common/load_elf.c Modified: head/sys/boot/common/load_elf.c ============================================================================== --- head/sys/boot/common/load_elf.c Sat Jan 31 03:22:00 2015 (r277961) +++ head/sys/boot/common/load_elf.c Sat Jan 31 07:22:29 2015 (r277962) @@ -175,7 +175,33 @@ __elfN(loadfile_raw)(char *filename, u_i * Check to see what sort of module we are. */ kfp = file_findfile(NULL, __elfN(kerneltype)); - if (ehdr->e_type == ET_DYN) { +#ifdef __powerpc__ + /* + * Kernels can be ET_DYN, so just assume the first loaded object is the + * kernel. This assumption will be checked later. + */ + if (kfp == NULL) + ef.kernel = 1; +#endif + if (ef.kernel || ehdr->e_type == ET_EXEC) { + /* Looks like a kernel */ + if (kfp != NULL) { + printf("elf" __XSTRING(__ELF_WORD_SIZE) "_loadfile: kernel already loaded\n"); + err = EPERM; + goto oerr; + } + /* + * Calculate destination address based on kernel entrypoint + */ + dest = (ehdr->e_entry & ~PAGE_MASK); + if (dest == 0) { + printf("elf" __XSTRING(__ELF_WORD_SIZE) "_loadfile: not a kernel (maybe static binary?)\n"); + err = EPERM; + goto oerr; + } + ef.kernel = 1; + + } else if (ehdr->e_type == ET_DYN) { /* Looks like a kld module */ if (multiboot != 0) { printf("elf" __XSTRING(__ELF_WORD_SIZE) "_loadfile: can't load module as multiboot\n"); @@ -195,24 +221,6 @@ __elfN(loadfile_raw)(char *filename, u_i /* Looks OK, got ahead */ ef.kernel = 0; - } else if (ehdr->e_type == ET_EXEC) { - /* Looks like a kernel */ - if (kfp != NULL) { - printf("elf" __XSTRING(__ELF_WORD_SIZE) "_loadfile: kernel already loaded\n"); - err = EPERM; - goto oerr; - } - /* - * Calculate destination address based on kernel entrypoint - */ - dest = (ehdr->e_entry & ~PAGE_MASK); - if (dest == 0) { - printf("elf" __XSTRING(__ELF_WORD_SIZE) "_loadfile: not a kernel (maybe static binary?)\n"); - err = EPERM; - goto oerr; - } - ef.kernel = 1; - } else { err = EFTYPE; goto oerr; From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 07:49:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E2DAD44F; Sat, 31 Jan 2015 07:49:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD0E0AA4; Sat, 31 Jan 2015 07:49:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0V7nqVU098820; Sat, 31 Jan 2015 07:49:52 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0V7noWu098808; Sat, 31 Jan 2015 07:49:50 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201501310749.t0V7noWu098808@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 31 Jan 2015 07:49:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277963 - in head/sys: cam/ctl conf dev/iscsi modules/ctl modules/iscsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 07:49:53 -0000 Author: trasz Date: Sat Jan 31 07:49:50 2015 New Revision: 277963 URL: https://svnweb.freebsd.org/changeset/base/277963 Log: Add kobj interface between ICL and the rest of the iSCSI stack. Review note - icl.c was moved to icl_soft.c. MFC after: 1 month Sponsored by: The FreeBSD Foundation Added: head/sys/dev/iscsi/icl_soft.c - copied, changed from r277931, head/sys/dev/iscsi/icl.c Replaced: head/sys/dev/iscsi/icl.c (contents, props changed) Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c head/sys/conf/files head/sys/dev/iscsi/icl.h head/sys/dev/iscsi/iscsi.c head/sys/modules/ctl/Makefile head/sys/modules/iscsi/Makefile Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_iscsi.c Sat Jan 31 07:22:29 2015 (r277962) +++ head/sys/cam/ctl/ctl_frontend_iscsi.c Sat Jan 31 07:49:50 2015 (r277963) @@ -68,6 +68,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -1241,7 +1242,7 @@ cfiscsi_session_new(struct cfiscsi_softc cv_init(&cs->cs_login_cv, "cfiscsi_login"); #endif - cs->cs_conn = icl_conn_new("cfiscsi", &cs->cs_lock); + cs->cs_conn = icl_new_conn(NULL, "cfiscsi", &cs->cs_lock); cs->cs_conn->ic_receive = cfiscsi_receive_callback; cs->cs_conn->ic_error = cfiscsi_error_callback; cs->cs_conn->ic_prv0 = cs; @@ -2013,6 +2014,7 @@ cfiscsi_ioctl_port_create(struct ctl_req return; } port = &ct->ct_port; + // WAT if (ct->ct_state == CFISCSI_TARGET_STATE_DYING) goto done; Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sat Jan 31 07:22:29 2015 (r277962) +++ head/sys/conf/files Sat Jan 31 07:49:50 2015 (r277963) @@ -1521,6 +1521,7 @@ ipw_monitor.fw optional ipwmonitorfw | clean "ipw_monitor.fw" dev/iscsi/icl.c optional iscsi | ctl dev/iscsi/icl_proxy.c optional iscsi | ctl +dev/iscsi/icl_soft.c optional iscsi | ctl dev/iscsi/iscsi.c optional iscsi scbus dev/iscsi_initiator/iscsi.c optional iscsi_initiator scbus dev/iscsi_initiator/iscsi_subr.c optional iscsi_initiator scbus Added: head/sys/dev/iscsi/icl.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/iscsi/icl.c Sat Jan 31 07:49:50 2015 (r277963) @@ -0,0 +1,247 @@ +/*- + * Copyright (c) 2012 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Edward Tomasz Napierala under sponsorship + * from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +/* + * iSCSI Common Layer. It's used by both the initiator and target to send + * and receive iSCSI PDUs. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +struct icl_module { + TAILQ_ENTRY(icl_module) im_next; + char *im_name; + int im_priority; + int (*im_limits)(size_t *limitp); + struct icl_conn *(*im_new_conn)(const char *name, + struct mtx *lock); +}; + +struct icl_softc { + struct sx sc_lock; + TAILQ_HEAD(, icl_module) sc_modules; +}; + +SYSCTL_NODE(_kern, OID_AUTO, icl, CTLFLAG_RD, 0, "iSCSI Common Layer"); +int icl_debug = 1; +SYSCTL_INT(_kern_icl, OID_AUTO, debug, CTLFLAG_RWTUN, + &icl_debug, 0, "Enable debug messages"); + +static MALLOC_DEFINE(M_ICL, "icl", "iSCSI Common Layer"); +static struct icl_softc *sc; + +static struct icl_module * +icl_find(const char *name) +{ + struct icl_module *im, *im_max; + + sx_assert(&sc->sc_lock, SA_LOCKED); + + /* + * If the name was not specified, pick a module with highest + * priority. + */ + if (name == NULL || name[0] == '\0') { + im_max = TAILQ_FIRST(&sc->sc_modules); + TAILQ_FOREACH(im, &sc->sc_modules, im_next) { + if (im->im_priority > im_max->im_priority) + im_max = im; + } + + return (im_max); + } + + TAILQ_FOREACH(im, &sc->sc_modules, im_next) { + if (strcmp(im->im_name, name) == 0) + return (im); + } + + return (NULL); +} + +struct icl_conn * +icl_new_conn(const char *offload, const char *name, struct mtx *lock) +{ + struct icl_module *im; + struct icl_conn *ic; + + sx_slock(&sc->sc_lock); + im = icl_find(offload); + + if (im == NULL) { + ICL_WARN("offload \"%s\" not found", offload); + sx_sunlock(&sc->sc_lock); + return (NULL); + } + + ic = im->im_new_conn(name, lock); + sx_sunlock(&sc->sc_lock); + + return (ic); +} + +int +icl_limits(const char *offload, size_t *limitp) +{ + struct icl_module *im; + int error; + + sx_slock(&sc->sc_lock); + im = icl_find(offload); + + if (im == NULL) { + ICL_WARN("offload \"%s\" not found", offload); + sx_sunlock(&sc->sc_lock); + return (ENXIO); + } + + error = im->im_limits(limitp); + sx_sunlock(&sc->sc_lock); + + return (error); +} + + +int +icl_register(const char *offload, int priority, int (*limits)(size_t *), + struct icl_conn *(*new_conn)(const char *, struct mtx *)) +{ + struct icl_module *im; + + sx_xlock(&sc->sc_lock); + im = icl_find(offload); + + if (im != NULL) { + ICL_WARN("offload \"%s\" already registered", offload); + sx_xunlock(&sc->sc_lock); + return (EBUSY); + } + + im = malloc(sizeof(*im), M_ICL, M_ZERO | M_WAITOK); + im->im_name = strdup(offload, M_ICL); + im->im_priority = priority; + im->im_limits = limits; + im->im_new_conn = new_conn; + + TAILQ_INSERT_HEAD(&sc->sc_modules, im, im_next); + sx_xunlock(&sc->sc_lock); + + ICL_DEBUG("offload \"%s\" registered", offload); + return (0); +} + +int +icl_unregister(const char *offload) +{ + struct icl_module *im; + + sx_xlock(&sc->sc_lock); + im = icl_find(offload); + + if (im == NULL) { + ICL_WARN("offload \"%s\" not registered", offload); + sx_xunlock(&sc->sc_lock); + return (ENXIO); + } + + TAILQ_REMOVE(&sc->sc_modules, im, im_next); + sx_xunlock(&sc->sc_lock); + + free(im->im_name, M_ICL); + free(im, M_ICL); + + ICL_DEBUG("offload \"%s\" unregistered", offload); + return (0); +} + +static int +icl_load(void) +{ + + sc = malloc(sizeof(*sc), M_ICL, M_ZERO | M_WAITOK); + sx_init(&sc->sc_lock, "icl"); + TAILQ_INIT(&sc->sc_modules); + + return (0); +} + +static int +icl_unload(void) +{ + + sx_slock(&sc->sc_lock); + KASSERT(TAILQ_EMPTY(&sc->sc_modules), ("still have modules")); + sx_sunlock(&sc->sc_lock); + + sx_destroy(&sc->sc_lock); + free(sc, M_ICL); + + return (0); +} + +static int +icl_modevent(module_t mod, int what, void *arg) +{ + + switch (what) { + case MOD_LOAD: + return (icl_load()); + case MOD_UNLOAD: + return (icl_unload()); + default: + return (EINVAL); + } +} + +moduledata_t icl_data = { + "icl", + icl_modevent, + 0 +}; + +DECLARE_MODULE(icl, icl_data, SI_SUB_DRIVERS, SI_ORDER_FIRST); +MODULE_VERSION(icl, 1); Modified: head/sys/dev/iscsi/icl.h ============================================================================== --- head/sys/dev/iscsi/icl.h Sat Jan 31 07:22:29 2015 (r277962) +++ head/sys/dev/iscsi/icl.h Sat Jan 31 07:49:50 2015 (r277963) @@ -37,7 +37,32 @@ * and receive iSCSI PDUs. */ +#include +#include +#include +#include + +SYSCTL_DECL(_kern_icl); + +extern int icl_debug; + +#define ICL_DEBUG(X, ...) \ + do { \ + if (icl_debug > 1) \ + printf("%s: " X "\n", __func__, ## __VA_ARGS__);\ + } while (0) + +#define ICL_WARN(X, ...) \ + do { \ + if (icl_debug > 0) { \ + printf("WARNING: %s: " X "\n", \ + __func__, ## __VA_ARGS__); \ + } \ + } while (0) + struct icl_conn; +struct ccb_scsiio; +union ctl_io; struct icl_pdu { STAILQ_ENTRY(icl_pdu) ip_next; @@ -57,13 +82,6 @@ struct icl_pdu { uint32_t ip_prv2; }; -struct icl_pdu *icl_pdu_new(struct icl_conn *ic, int flags); -size_t icl_pdu_data_segment_length(const struct icl_pdu *ip); -int icl_pdu_append_data(struct icl_pdu *ip, const void *addr, size_t len, int flags); -void icl_pdu_get_data(struct icl_pdu *ip, size_t off, void *addr, size_t len); -void icl_pdu_queue(struct icl_pdu *ip); -void icl_pdu_free(struct icl_pdu *ip); - #define ICL_CONN_STATE_INVALID 0 #define ICL_CONN_STATE_BHS 1 #define ICL_CONN_STATE_AHS 2 @@ -74,6 +92,7 @@ void icl_pdu_free(struct icl_pdu *ip); #define ICL_MAX_DATA_SEGMENT_LENGTH (128 * 1024) struct icl_conn { + KOBJ_FIELDS; struct mtx *ic_lock; struct socket *ic_socket; #ifdef DIAGNOSTIC @@ -104,11 +123,14 @@ struct icl_conn { void *ic_prv0; }; -struct icl_conn *icl_conn_new(const char *name, struct mtx *lock); -void icl_conn_free(struct icl_conn *ic); -int icl_conn_handoff(struct icl_conn *ic, int fd); -void icl_conn_close(struct icl_conn *ic); -bool icl_conn_connected(struct icl_conn *ic); +struct icl_conn *icl_new_conn(const char *offload, const char *name, + struct mtx *lock); +int icl_limits(const char *offload, size_t *limitp); + +int icl_register(const char *offload, int priority, + int (*limits)(size_t *), + struct icl_conn *(*new_conn)(const char *, struct mtx *)); +int icl_unregister(const char *offload); #ifdef ICL_KERNEL_PROXY Copied and modified: head/sys/dev/iscsi/icl_soft.c (from r277931, head/sys/dev/iscsi/icl.c) ============================================================================== --- head/sys/dev/iscsi/icl.c Fri Jan 30 14:22:15 2015 (r277931, copy source) +++ head/sys/dev/iscsi/icl_soft.c Sat Jan 31 07:49:50 2015 (r277963) @@ -60,11 +60,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include -SYSCTL_NODE(_kern, OID_AUTO, icl, CTLFLAG_RD, 0, "iSCSI Common Layer"); -static int debug = 1; -SYSCTL_INT(_kern_icl, OID_AUTO, debug, CTLFLAG_RWTUN, - &debug, 0, "Enable debug messages"); static int coalesce = 1; SYSCTL_INT(_kern_icl, OID_AUTO, coalesce, CTLFLAG_RWTUN, &coalesce, 0, "Try to coalesce PDUs before sending"); @@ -79,25 +76,11 @@ static int recvspace = 1048576; SYSCTL_INT(_kern_icl, OID_AUTO, recvspace, CTLFLAG_RWTUN, &recvspace, 0, "Default receive socket buffer size"); -static uma_zone_t icl_conn_zone; +static MALLOC_DEFINE(M_ICL_SOFT, "icl_soft", "iSCSI software backend"); static uma_zone_t icl_pdu_zone; static volatile u_int icl_ncons; -#define ICL_DEBUG(X, ...) \ - do { \ - if (debug > 1) \ - printf("%s: " X "\n", __func__, ## __VA_ARGS__);\ - } while (0) - -#define ICL_WARN(X, ...) \ - do { \ - if (debug > 0) { \ - printf("WARNING: %s: " X "\n", \ - __func__, ## __VA_ARGS__); \ - } \ - } while (0) - #define ICL_CONN_LOCK(X) mtx_lock(X->ic_lock) #define ICL_CONN_UNLOCK(X) mtx_unlock(X->ic_lock) #define ICL_CONN_LOCK_ASSERT(X) mtx_assert(X->ic_lock, MA_OWNED) @@ -105,6 +88,37 @@ static volatile u_int icl_ncons; STAILQ_HEAD(icl_pdu_stailq, icl_pdu); +static icl_conn_new_pdu_t icl_soft_conn_new_pdu; +static icl_conn_pdu_free_t icl_soft_conn_pdu_free; +static icl_conn_pdu_data_segment_length_t + icl_soft_conn_pdu_data_segment_length; +static icl_conn_pdu_append_data_t icl_soft_conn_pdu_append_data; +static icl_conn_pdu_get_data_t icl_soft_conn_pdu_get_data; +static icl_conn_pdu_queue_t icl_soft_conn_pdu_queue; +static icl_conn_handoff_t icl_soft_conn_handoff; +static icl_conn_free_t icl_soft_conn_free; +static icl_conn_close_t icl_soft_conn_close; +static icl_conn_connected_t icl_soft_conn_connected; + +static kobj_method_t icl_soft_methods[] = { + KOBJMETHOD(icl_conn_new_pdu, icl_soft_conn_new_pdu), + KOBJMETHOD(icl_conn_pdu_free, icl_soft_conn_pdu_free), + KOBJMETHOD(icl_conn_pdu_data_segment_length, + icl_soft_conn_pdu_data_segment_length), + KOBJMETHOD(icl_conn_pdu_append_data, icl_soft_conn_pdu_append_data), + KOBJMETHOD(icl_conn_pdu_get_data, icl_soft_conn_pdu_get_data), + KOBJMETHOD(icl_conn_pdu_queue, icl_soft_conn_pdu_queue), + KOBJMETHOD(icl_conn_handoff, icl_soft_conn_handoff), + KOBJMETHOD(icl_conn_free, icl_soft_conn_free), + KOBJMETHOD(icl_conn_close, icl_soft_conn_close), + KOBJMETHOD(icl_conn_connected, icl_soft_conn_connected), + { 0, 0 } +}; + +DEFINE_CLASS(icl_soft, icl_soft_methods, sizeof(struct icl_conn)); + +static void icl_conn_close(struct icl_conn *ic); + static void icl_conn_fail(struct icl_conn *ic) { @@ -168,7 +182,7 @@ icl_pdu_new_empty(struct icl_conn *ic, i return (ip); } -void +static void icl_pdu_free(struct icl_pdu *ip) { struct icl_conn *ic; @@ -184,11 +198,17 @@ icl_pdu_free(struct icl_pdu *ip) #endif } +void +icl_soft_conn_pdu_free(struct icl_conn *ic, struct icl_pdu *ip) +{ + icl_pdu_free(ip); +} + /* * Allocate icl_pdu with empty BHS to fill up by the caller. */ struct icl_pdu * -icl_pdu_new(struct icl_conn *ic, int flags) +icl_soft_conn_new_pdu(struct icl_conn *ic, int flags) { struct icl_pdu *ip; @@ -217,7 +237,7 @@ icl_pdu_ahs_length(const struct icl_pdu return (request->ip_bhs->bhs_total_ahs_len * 4); } -size_t +static size_t icl_pdu_data_segment_length(const struct icl_pdu *request) { uint32_t len = 0; @@ -231,6 +251,14 @@ icl_pdu_data_segment_length(const struct return (len); } +size_t +icl_soft_conn_pdu_data_segment_length(struct icl_conn *ic, + const struct icl_pdu *request) +{ + + return (icl_pdu_data_segment_length(request)); +} + static void icl_pdu_set_data_segment_length(struct icl_pdu *response, uint32_t len) { @@ -1046,7 +1074,7 @@ icl_soupcall_send(struct socket *so, voi return (SU_OK); } -int +static int icl_pdu_append_data(struct icl_pdu *request, const void *addr, size_t len, int flags) { @@ -1080,7 +1108,15 @@ icl_pdu_append_data(struct icl_pdu *requ return (0); } -void +int +icl_soft_conn_pdu_append_data(struct icl_conn *ic, struct icl_pdu *request, + const void *addr, size_t len, int flags) +{ + + return (icl_pdu_append_data(request, addr, len, flags)); +} + +static void icl_pdu_get_data(struct icl_pdu *ip, size_t off, void *addr, size_t len) { @@ -1088,6 +1124,14 @@ icl_pdu_get_data(struct icl_pdu *ip, siz } void +icl_soft_conn_pdu_get_data(struct icl_conn *ic, struct icl_pdu *ip, + size_t off, void *addr, size_t len) +{ + + return (icl_pdu_get_data(ip, off, addr, len)); +} + +static void icl_pdu_queue(struct icl_pdu *ip) { struct icl_conn *ic; @@ -1116,14 +1160,21 @@ icl_pdu_queue(struct icl_pdu *ip) cv_signal(&ic->ic_send_cv); } -struct icl_conn * -icl_conn_new(const char *name, struct mtx *lock) +void +icl_soft_conn_pdu_queue(struct icl_conn *ic, struct icl_pdu *ip) +{ + + icl_pdu_queue(ip); +} + +static struct icl_conn * +icl_soft_new_conn(const char *name, struct mtx *lock) { struct icl_conn *ic; refcount_acquire(&icl_ncons); - ic = uma_zalloc(icl_conn_zone, M_WAITOK | M_ZERO); + ic = (struct icl_conn *)kobj_create(&icl_soft_class, M_ICL_SOFT, M_WAITOK | M_ZERO); STAILQ_INIT(&ic->ic_to_send); ic->ic_lock = lock; @@ -1139,12 +1190,12 @@ icl_conn_new(const char *name, struct mt } void -icl_conn_free(struct icl_conn *ic) +icl_soft_conn_free(struct icl_conn *ic) { cv_destroy(&ic->ic_send_cv); cv_destroy(&ic->ic_receive_cv); - uma_zfree(icl_conn_zone, ic); + kobj_delete((struct kobj *)ic, M_ICL_SOFT); refcount_release(&icl_ncons); } @@ -1252,7 +1303,7 @@ icl_conn_start(struct icl_conn *ic) } int -icl_conn_handoff(struct icl_conn *ic, int fd) +icl_soft_conn_handoff(struct icl_conn *ic, int fd) { struct file *fp; struct socket *so; @@ -1367,8 +1418,15 @@ icl_conn_close(struct icl_conn *ic) ICL_CONN_UNLOCK(ic); } +void +icl_soft_conn_close(struct icl_conn *ic) +{ + + icl_conn_close(ic); +} + bool -icl_conn_connected(struct icl_conn *ic) +icl_soft_conn_connected(struct icl_conn *ic) { ICL_CONN_LOCK_ASSERT_NOT(ic); @@ -1385,6 +1443,15 @@ icl_conn_connected(struct icl_conn *ic) return (true); } +static int +icl_soft_limits(size_t *limitp) +{ + + *limitp = 128 * 1024; + + return (0); +} + #ifdef ICL_KERNEL_PROXY int icl_conn_handoff_sock(struct icl_conn *ic, struct socket *so) @@ -1411,52 +1478,60 @@ icl_conn_handoff_sock(struct icl_conn *i #endif /* ICL_KERNEL_PROXY */ static int -icl_unload(void) +icl_soft_load(void) { + int error; - if (icl_ncons != 0) - return (EBUSY); + icl_pdu_zone = uma_zcreate("icl_pdu", + sizeof(struct icl_pdu), NULL, NULL, NULL, NULL, + UMA_ALIGN_PTR, 0); + refcount_init(&icl_ncons, 0); - uma_zdestroy(icl_conn_zone); - uma_zdestroy(icl_pdu_zone); + /* + * The reason we call this "none" is that to the user, + * it's known as "offload driver"; "offload driver: soft" + * doesn't make much sense. + */ + error = icl_register("none", 0, icl_soft_limits, icl_soft_new_conn); + KASSERT(error == 0, ("failed to register")); - return (0); + return (error); } -static void -icl_load(void) +static int +icl_soft_unload(void) { - icl_conn_zone = uma_zcreate("icl_conn", - sizeof(struct icl_conn), NULL, NULL, NULL, NULL, - UMA_ALIGN_PTR, 0); - icl_pdu_zone = uma_zcreate("icl_pdu", - sizeof(struct icl_pdu), NULL, NULL, NULL, NULL, - UMA_ALIGN_PTR, 0); + if (icl_ncons != 0) + return (EBUSY); - refcount_init(&icl_ncons, 0); + icl_unregister("none"); + + uma_zdestroy(icl_pdu_zone); + + return (0); } static int -icl_modevent(module_t mod, int what, void *arg) +icl_soft_modevent(module_t mod, int what, void *arg) { switch (what) { case MOD_LOAD: - icl_load(); - return (0); + return (icl_soft_load()); case MOD_UNLOAD: - return (icl_unload()); + return (icl_soft_unload()); default: return (EINVAL); } } -moduledata_t icl_data = { - "icl", - icl_modevent, +moduledata_t icl_soft_data = { + "icl_soft", + icl_soft_modevent, 0 }; -DECLARE_MODULE(icl, icl_data, SI_SUB_DRIVERS, SI_ORDER_FIRST); +DECLARE_MODULE(icl_soft, icl_soft_data, SI_SUB_DRIVERS, SI_ORDER_MIDDLE); +MODULE_DEPEND(icl_soft, icl, 1, 1, 1); MODULE_VERSION(icl, 1); Modified: head/sys/dev/iscsi/iscsi.c ============================================================================== --- head/sys/dev/iscsi/iscsi.c Sat Jan 31 07:22:29 2015 (r277962) +++ head/sys/dev/iscsi/iscsi.c Sat Jan 31 07:49:50 2015 (r277963) @@ -60,6 +60,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -1730,7 +1731,7 @@ iscsi_ioctl_session_add(struct iscsi_sof return (EBUSY); } - is->is_conn = icl_conn_new("iscsi", &is->is_lock); + is->is_conn = icl_new_conn(NULL, "iscsi", &is->is_lock); is->is_conn->ic_receive = iscsi_receive_callback; is->is_conn->ic_error = iscsi_error_callback; is->is_conn->ic_prv0 = is; Modified: head/sys/modules/ctl/Makefile ============================================================================== --- head/sys/modules/ctl/Makefile Sat Jan 31 07:22:29 2015 (r277962) +++ head/sys/modules/ctl/Makefile Sat Jan 31 07:49:50 2015 (r277963) @@ -22,8 +22,11 @@ SRCS+= scsi_ctl.c SRCS+= bus_if.h SRCS+= device_if.h SRCS+= vnode_if.h +SRCS+= icl_conn_if.h SRCS+= opt_cam.h #CFLAGS+=-DICL_KERNEL_PROXY +MFILES= kern/bus_if.m kern/device_if.m dev/iscsi/icl_conn_if.m + .include Modified: head/sys/modules/iscsi/Makefile ============================================================================== --- head/sys/modules/iscsi/Makefile Sat Jan 31 07:22:29 2015 (r277962) +++ head/sys/modules/iscsi/Makefile Sat Jan 31 07:49:50 2015 (r277963) @@ -6,10 +6,15 @@ KMOD= iscsi SRCS= iscsi.c SRCS+= icl.c SRCS+= icl_proxy.c +SRCS+= icl_soft.c SRCS+= opt_cam.h SRCS+= bus_if.h SRCS+= device_if.h +SRCS+= icl_conn_if.c +SRCS+= icl_conn_if.h #CFLAGS+=-DICL_KERNEL_PROXY +MFILES= kern/bus_if.m kern/device_if.m dev/iscsi/icl_conn_if.m + .include From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 08:03:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D55228E5; Sat, 31 Jan 2015 08:03:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C0C47C29; Sat, 31 Jan 2015 08:03:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0V83v8J008638; Sat, 31 Jan 2015 08:03:57 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0V83vfg008636; Sat, 31 Jan 2015 08:03:57 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201501310803.t0V83vfg008636@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 31 Jan 2015 08:03:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277964 - head/sys/dev/iscsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 08:03:57 -0000 Author: trasz Date: Sat Jan 31 08:03:56 2015 New Revision: 277964 URL: https://svnweb.freebsd.org/changeset/base/277964 Log: Add two files missed in r277963. Sponsored by: The FreeBSD Foundation Added: head/sys/dev/iscsi/icl_conn_if.m (contents, props changed) head/sys/dev/iscsi/icl_wrappers.h (contents, props changed) Added: head/sys/dev/iscsi/icl_conn_if.m ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/iscsi/icl_conn_if.m Sat Jan 31 08:03:56 2015 (r277964) @@ -0,0 +1,87 @@ +#- +# Copyright (c) 2014 The FreeBSD Foundation +# All rights reserved. +# +# This software was developed by Edward Tomasz Napierala under sponsorship +# from the FreeBSD Foundation. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +#include + +INTERFACE icl_conn; + +METHOD size_t pdu_data_segment_length { + struct icl_conn *_ic; + const struct icl_pdu *_ip; +}; + +METHOD int pdu_append_data { + struct icl_conn *_ic; + struct icl_pdu *_ip; + const void *_addr; + size_t _len; + int _flags; +}; + +METHOD void pdu_get_data { + struct icl_conn *_ic; + struct icl_pdu *_ip; + size_t _off; + void *_addr; + size_t _len; +}; + +METHOD void pdu_queue { + struct icl_conn *_ic; + struct icl_pdu *_ip; +}; + +METHOD void pdu_free { + struct icl_conn *_ic; + struct icl_pdu *_ip; +}; + +METHOD struct icl_pdu * new_pdu { + struct icl_conn *_ic; + int _flags; +}; + +METHOD void free { + struct icl_conn *_ic; +}; + +METHOD int handoff { + struct icl_conn *_ic; + int _fd; +}; + +METHOD void close { + struct icl_conn *_ic; +}; + +METHOD bool connected { + struct icl_conn *_ic; +}; Added: head/sys/dev/iscsi/icl_wrappers.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/iscsi/icl_wrappers.h Sat Jan 31 08:03:56 2015 (r277964) @@ -0,0 +1,116 @@ +/*- + * Copyright (c) 2014 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Edward Tomasz Napierala under sponsorship + * from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/* + * This file is used to provide the initiator and target with a prettier + * interface. It must not be included by ICL modules, such as icl_soft.c. + */ + +#ifndef ICL_WRAPPERS_H +#define ICL_WRAPPERS_H + +#include +#include + +#include +#include + +static inline struct icl_pdu * +icl_pdu_new(struct icl_conn *ic, int flags) +{ + + return (ICL_CONN_NEW_PDU(ic, flags)); +} + +static inline size_t +icl_pdu_data_segment_length(const struct icl_pdu *ip) +{ + + return (ICL_CONN_PDU_DATA_SEGMENT_LENGTH(ip->ip_conn, ip)); +} + +static inline int +icl_pdu_append_data(struct icl_pdu *ip, const void *addr, size_t len, int flags) +{ + + return (ICL_CONN_PDU_APPEND_DATA(ip->ip_conn, ip, addr, len, flags)); +} + +static inline void +icl_pdu_get_data(struct icl_pdu *ip, size_t off, void *addr, size_t len) +{ + + ICL_CONN_PDU_GET_DATA(ip->ip_conn, ip, off, addr, len); +} + +static inline void +icl_pdu_queue(struct icl_pdu *ip) +{ + + ICL_CONN_PDU_QUEUE(ip->ip_conn, ip); +} + +static inline void +icl_pdu_free(struct icl_pdu *ip) +{ + + ICL_CONN_PDU_FREE(ip->ip_conn, ip); +} + +static inline void +icl_conn_free(struct icl_conn *ic) +{ + + ICL_CONN_FREE(ic); +} + +static inline int +icl_conn_handoff(struct icl_conn *ic, int fd) +{ + + return (ICL_CONN_HANDOFF(ic, fd)); +} + +static inline void +icl_conn_close(struct icl_conn *ic) +{ + + ICL_CONN_CLOSE(ic); +} + +static inline bool +icl_conn_connected(struct icl_conn *ic) +{ + + return (ICL_CONN_CONNECTED(ic)); +} + +#endif /* !ICL_WRAPPERS_H */ From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 11:02:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78D2C3E8; Sat, 31 Jan 2015 11:02:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BDA1D52; Sat, 31 Jan 2015 11:02:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VB2LpR093925; Sat, 31 Jan 2015 11:02:21 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VB2LDe093924; Sat, 31 Jan 2015 11:02:21 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501311102.t0VB2LDe093924@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 31 Jan 2015 11:02:21 +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: r277965 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 11:02:21 -0000 Author: kib Date: Sat Jan 31 11:02:20 2015 New Revision: 277965 URL: https://svnweb.freebsd.org/changeset/base/277965 Log: MFC r277646: Avoid calling vmspace_free() while owning the process lock. Modified: stable/10/sys/vm/vm_pageout.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_pageout.c ============================================================================== --- stable/10/sys/vm/vm_pageout.c Sat Jan 31 08:03:56 2015 (r277964) +++ stable/10/sys/vm/vm_pageout.c Sat Jan 31 11:02:20 2015 (r277965) @@ -1526,15 +1526,15 @@ vm_pageout_oom(int shortage) FOREACH_PROC_IN_SYSTEM(p) { int breakout; - if (PROC_TRYLOCK(p) == 0) - continue; + PROC_LOCK(p); + /* * If this is a system, protected or killed process, skip it. */ - if (p->p_state != PRS_NORMAL || - (p->p_flag & (P_INEXEC | P_PROTECTED | P_SYSTEM)) || - (p->p_pid == 1) || P_KILLED(p) || - ((p->p_pid < 48) && (swap_pager_avail != 0))) { + if (p->p_state != PRS_NORMAL || (p->p_flag & (P_INEXEC | + P_PROTECTED | P_SYSTEM | P_WEXIT)) != 0 || + p->p_pid == 1 || P_KILLED(p) || + (p->p_pid < 48 && swap_pager_avail != 0)) { PROC_UNLOCK(p); continue; } @@ -1567,11 +1567,14 @@ vm_pageout_oom(int shortage) PROC_UNLOCK(p); continue; } + _PHOLD(p); if (!vm_map_trylock_read(&vm->vm_map)) { - vmspace_free(vm); + _PRELE(p); PROC_UNLOCK(p); + vmspace_free(vm); continue; } + PROC_UNLOCK(p); size = vmspace_swap_count(vm); vm_map_unlock_read(&vm->vm_map); if (shortage == VM_OOM_MEM) @@ -1583,16 +1586,19 @@ vm_pageout_oom(int shortage) */ if (size > bigsize) { if (bigproc != NULL) - PROC_UNLOCK(bigproc); + PRELE(bigproc); bigproc = p; bigsize = size; - } else - PROC_UNLOCK(p); + } else { + PRELE(p); + } } sx_sunlock(&allproc_lock); if (bigproc != NULL) { + PROC_LOCK(bigproc); killproc(bigproc, "out of swap space"); sched_nice(bigproc, PRIO_MIN); + _PRELE(bigproc); PROC_UNLOCK(bigproc); wakeup(&cnt.v_free_count); } From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 11:04:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 675D0538; Sat, 31 Jan 2015 11:04:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 52D98D63; Sat, 31 Jan 2015 11:04:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VB4glr094282; Sat, 31 Jan 2015 11:04:42 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VB4gtr094281; Sat, 31 Jan 2015 11:04:42 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501311104.t0VB4gtr094281@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 31 Jan 2015 11:04: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: r277966 - stable/10/sys/fs/tmpfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 11:04:42 -0000 Author: kib Date: Sat Jan 31 11:04:41 2015 New Revision: 277966 URL: https://svnweb.freebsd.org/changeset/base/277966 Log: MFC r277827: tmpfs does not use UVM on FreeBSD. Modified: stable/10/sys/fs/tmpfs/tmpfs_vfsops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/tmpfs/tmpfs_vfsops.c ============================================================================== --- stable/10/sys/fs/tmpfs/tmpfs_vfsops.c Sat Jan 31 11:02:20 2015 (r277965) +++ stable/10/sys/fs/tmpfs/tmpfs_vfsops.c Sat Jan 31 11:04:41 2015 (r277966) @@ -33,10 +33,10 @@ /* * Efficient memory file system. * - * tmpfs is a file system that uses NetBSD's virtual memory sub-system - * (the well-known UVM) to store file data and metadata in an efficient - * way. This means that it does not follow the structure of an on-disk - * file system because it simply does not need to. Instead, it uses + * tmpfs is a file system that uses FreeBSD's virtual memory + * sub-system to store file data and metadata in an efficient way. + * This means that it does not follow the structure of an on-disk file + * system because it simply does not need to. Instead, it uses * memory-specific data structures and algorithms to automatically * allocate and release resources. */ From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 11:56:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3CED4CB5; Sat, 31 Jan 2015 11:56:05 +0000 (UTC) Received: from mail-wg0-x234.google.com (mail-wg0-x234.google.com [IPv6:2a00:1450:400c:c00::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C20251F4; Sat, 31 Jan 2015 11:56:04 +0000 (UTC) Received: by mail-wg0-f52.google.com with SMTP id y19so31057741wgg.11; Sat, 31 Jan 2015 03:56:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=6Wk2UJhWnH881aJVBBlTyKgNBEoVh8c3uPirJqvOJHU=; b=ALGv1AbPXZ3YB5FITw2aVw9V2z8o24OGVGFvjxK4wrLue7CPvYQvOaHQxtNZHPXpLB Kt5Mhf2OpBoJlTNqb9/UzkbLsnNPg5owim6/60FS2nzhsngNZg5wIlkDBHphmNIPjFRr ej2ta7BWGIExzUIDQwRilMn6/bHRHqpP0oJbSlrdqoPBfxT7WCCtP419q1pezrLd8NVz VAXgKXaVuvmoe0yx0X09F0KesHtM/4SSMkXH9z3qJ2IrfhKZKPQu73lhtC++m0YA8AQF IoEVbdwdqfwyZzHNdw1I2j21Sc46O+MnVfUvRwc2j9+VdHKfeATEV/6qjngkiBep0plG yCew== X-Received: by 10.180.211.34 with SMTP id mz2mr4098153wic.18.1422705362517; Sat, 31 Jan 2015 03:56:02 -0800 (PST) Received: from mavbook.mavhome.dp.ua ([134.249.139.101]) by mx.google.com with ESMTPSA id q10sm18952948wjr.41.2015.01.31.03.56.00 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 31 Jan 2015 03:56:01 -0800 (PST) Sender: Alexander Motin Message-ID: <54CCC2CF.3030400@FreeBSD.org> Date: Sat, 31 Jan 2015 13:55:59 +0200 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r277959 - head/sys/dev/drm2/i915 References: <201501310213.t0V2DQ8c029198@svn.freebsd.org> In-Reply-To: <201501310213.t0V2DQ8c029198@svn.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 11:56:05 -0000 On 31.01.2015 04:13, Adrian Chadd wrote: > Author: adrian > Date: Sat Jan 31 02:13:25 2015 > New Revision: 277959 > URL: https://svnweb.freebsd.org/changeset/base/277959 > > Log: > Fix backlight for ivybridge based laptops (and whatever else comes through > this codepath.) > > (1<<30) is documented as BLM_PCH_OVERRIDE_ENABLE, which the current > i915 driver in Linux only sets for broadwell chips. > > This fixes the backlight control on the Lenovo X230. I've just updated my IvyBridge Asus UX31A after last few months and brightness control is now working! Yay! Thanks to everybody related! The odd effect though is that backlight is getting disabled as soon as xorg starts. First press of hardware brightness keys fixes the issue, but first time I was quite confused. Any idea what may set such default? -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 12:17:11 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E70A713A; Sat, 31 Jan 2015 12:17:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF9633DF; Sat, 31 Jan 2015 12:17:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VCHAY6028104; Sat, 31 Jan 2015 12:17:10 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VCH8ig028091; Sat, 31 Jan 2015 12:17:08 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201501311217.t0VCH8ig028091@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 31 Jan 2015 12:17:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277968 - in head/sys: arm/allwinner arm/altera/socfpga arm/freescale/imx arm/freescale/vybrid arm/rockchip arm/samsung/exynos arm/ti mips/atheros mips/cavium mips/rt305x X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 12:17:11 -0000 Author: loos Date: Sat Jan 31 12:17:07 2015 New Revision: 277968 URL: https://svnweb.freebsd.org/changeset/base/277968 Log: Clean up and fix the device detach routine and the failure path on GPIO drivers. This paves the way for upcoming work. Modified: head/sys/arm/allwinner/a10_gpio.c head/sys/arm/altera/socfpga/socfpga_gpio.c head/sys/arm/freescale/imx/imx_gpio.c head/sys/arm/freescale/vybrid/vf_gpio.c head/sys/arm/rockchip/rk30xx_gpio.c head/sys/arm/samsung/exynos/exynos5_pad.c head/sys/arm/ti/ti_gpio.c head/sys/mips/atheros/ar71xx_gpio.c head/sys/mips/cavium/octeon_gpio.c head/sys/mips/rt305x/rt305x_gpio.c Modified: head/sys/arm/allwinner/a10_gpio.c ============================================================================== --- head/sys/arm/allwinner/a10_gpio.c Sat Jan 31 11:24:26 2015 (r277967) +++ head/sys/arm/allwinner/a10_gpio.c Sat Jan 31 12:17:07 2015 (r277968) @@ -427,7 +427,7 @@ a10_gpio_attach(device_t dev) RF_ACTIVE); if (!sc->sc_mem_res) { device_printf(dev, "cannot allocate memory window\n"); - return (ENXIO); + goto fail; } sc->sc_bst = rman_get_bustag(sc->sc_mem_res); @@ -437,9 +437,8 @@ a10_gpio_attach(device_t dev) sc->sc_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE); if (!sc->sc_irq_res) { - bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->sc_mem_res); device_printf(dev, "cannot allocate interrupt\n"); - return (ENXIO); + goto fail; } /* Find our node. */ @@ -472,6 +471,8 @@ fail: bus_release_resource(dev, SYS_RES_IRQ, 0, sc->sc_irq_res); if (sc->sc_mem_res) bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->sc_mem_res); + mtx_destroy(&sc->sc_mtx); + return (ENXIO); } Modified: head/sys/arm/altera/socfpga/socfpga_gpio.c ============================================================================== --- head/sys/arm/altera/socfpga/socfpga_gpio.c Sat Jan 31 11:24:26 2015 (r277967) +++ head/sys/arm/altera/socfpga/socfpga_gpio.c Sat Jan 31 12:17:07 2015 (r277968) @@ -163,6 +163,7 @@ socfpga_gpio_attach(device_t dev) if (bus_alloc_resources(dev, socfpga_gpio_spec, sc->res)) { device_printf(dev, "could not allocate resources\n"); + mtx_destroy(&sc->sc_mtx); return (ENXIO); } Modified: head/sys/arm/freescale/imx/imx_gpio.c ============================================================================== --- head/sys/arm/freescale/imx/imx_gpio.c Sat Jan 31 11:24:26 2015 (r277967) +++ head/sys/arm/freescale/imx/imx_gpio.c Sat Jan 31 12:17:07 2015 (r277968) @@ -389,6 +389,8 @@ imx51_gpio_attach(device_t dev) if (bus_alloc_resources(dev, imx_gpio_spec, sc->sc_res)) { device_printf(dev, "could not allocate resources\n"); + bus_release_resources(dev, imx_gpio_spec, sc->sc_res); + mtx_destroy(&sc->sc_mtx); return (ENXIO); } @@ -411,6 +413,7 @@ imx51_gpio_attach(device_t dev) imx51_gpio_intr, NULL, sc, &sc->gpio_ih[irq]))) { device_printf(dev, "WARNING: unable to register interrupt handler\n"); + imx51_gpio_detach(dev); return (ENXIO); } } @@ -434,6 +437,7 @@ imx51_gpio_attach(device_t dev) static int imx51_gpio_detach(device_t dev) { + int irq; struct imx51_gpio_softc *sc; sc = device_get_softc(dev); @@ -441,13 +445,12 @@ imx51_gpio_detach(device_t dev) KASSERT(mtx_initialized(&sc->sc_mtx), ("gpio mutex not initialized")); bus_generic_detach(dev); - - if (sc->sc_res[3]) - bus_release_resources(dev, imx_gpio0irq_spec, &sc->sc_res[3]); - - if (sc->sc_res[0]) - bus_release_resources(dev, imx_gpio_spec, sc->sc_res); - + for (irq = 1; irq <= sc->sc_l_irq; irq ++) { + if (sc->gpio_ih[irq]) + bus_teardown_intr(dev, sc->sc_res[irq], sc->gpio_ih[irq]); + } + bus_release_resources(dev, imx_gpio0irq_spec, &sc->sc_res[3]); + bus_release_resources(dev, imx_gpio_spec, sc->sc_res); mtx_destroy(&sc->sc_mtx); return(0); Modified: head/sys/arm/freescale/vybrid/vf_gpio.c ============================================================================== --- head/sys/arm/freescale/vybrid/vf_gpio.c Sat Jan 31 11:24:26 2015 (r277967) +++ head/sys/arm/freescale/vybrid/vf_gpio.c Sat Jan 31 12:17:07 2015 (r277968) @@ -125,6 +125,7 @@ vf_gpio_attach(device_t dev) if (bus_alloc_resources(dev, vf_gpio_spec, sc->res)) { device_printf(dev, "could not allocate resources\n"); + mtx_destroy(&sc->sc_mtx); return (ENXIO); } Modified: head/sys/arm/rockchip/rk30xx_gpio.c ============================================================================== --- head/sys/arm/rockchip/rk30xx_gpio.c Sat Jan 31 11:24:26 2015 (r277967) +++ head/sys/arm/rockchip/rk30xx_gpio.c Sat Jan 31 12:17:07 2015 (r277968) @@ -399,13 +399,14 @@ rk30_gpio_attach(device_t dev) if (rk30_gpio_sc) return (ENXIO); sc->sc_dev = dev; + mtx_init(&sc->sc_mtx, "rk30 gpio", "gpio", MTX_DEF); rid = 0; sc->sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (!sc->sc_mem_res) { device_printf(dev, "cannot allocate memory window\n"); - return (ENXIO); + goto fail; } sc->sc_bst = rman_get_bustag(sc->sc_mem_res); sc->sc_bsh = rman_get_bushandle(sc->sc_mem_res); @@ -421,17 +422,15 @@ rk30_gpio_attach(device_t dev) if (sc->sc_bank == -1) { device_printf(dev, "unsupported device unit (only GPIO0..3 are supported)\n"); - bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->sc_mem_res); - return (ENXIO); + goto fail; } rid = 0; sc->sc_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE); if (!sc->sc_irq_res) { - bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->sc_mem_res); device_printf(dev, "cannot allocate interrupt\n"); - return (ENXIO); + goto fail; } /* Find our node. */ @@ -441,8 +440,6 @@ rk30_gpio_attach(device_t dev) /* Node is not a GPIO controller. */ goto fail; - mtx_init(&sc->sc_mtx, "rk30 gpio", "gpio", MTX_DEF); - /* Initialize the software controlled pins. */ for (i = 0; i < RK30_GPIO_PINS; i++) { snprintf(sc->sc_gpio_pins[i].gp_name, GPIOMAXNAME, @@ -467,6 +464,8 @@ fail: bus_release_resource(dev, SYS_RES_IRQ, 0, sc->sc_irq_res); if (sc->sc_mem_res) bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->sc_mem_res); + mtx_destroy(&sc->sc_mtx); + return (ENXIO); } Modified: head/sys/arm/samsung/exynos/exynos5_pad.c ============================================================================== --- head/sys/arm/samsung/exynos/exynos5_pad.c Sat Jan 31 11:24:26 2015 (r277967) +++ head/sys/arm/samsung/exynos/exynos5_pad.c Sat Jan 31 12:17:07 2015 (r277968) @@ -509,12 +509,12 @@ pad_attach(device_t dev) sc->nports = 5; break; default: - return (-1); + goto fail; }; if (bus_alloc_resources(dev, sc->pad_spec, sc->res)) { device_printf(dev, "could not allocate resources\n"); - return (ENXIO); + goto fail; } /* Memory interface */ @@ -534,9 +534,9 @@ pad_attach(device_t dev) NULL, sc, &sc->gpio_ih[i]))) { device_printf(dev, "ERROR: Unable to register interrupt handler\n"); - return (ENXIO); + goto fail; } - }; + } for (i = 0; i < sc->gpio_npins; i++) { sc->gpio_pins[i].gp_pin = i; @@ -563,6 +563,17 @@ pad_attach(device_t dev) device_add_child(dev, "gpiobus", -1); return (bus_generic_attach(dev)); + +fail: + for (i = 0; i < sc->nports; i++) { + if (sc->gpio_ih[i]) + bus_teardown_intr(dev, sc->res[sc->nports + i], + sc->gpio_ih[i]); + } + bus_release_resources(dev, sc->pad_spec, sc->res); + mtx_destroy(&sc->sc_mtx); + + return (ENXIO); } static int Modified: head/sys/arm/ti/ti_gpio.c ============================================================================== --- head/sys/arm/ti/ti_gpio.c Sat Jan 31 11:24:26 2015 (r277967) +++ head/sys/arm/ti/ti_gpio.c Sat Jan 31 12:17:07 2015 (r277968) @@ -113,6 +113,7 @@ __FBSDID("$FreeBSD$"); #define TI_GPIO_MASK(p) (1U << ((p) % PINS_PER_BANK)) static struct ti_gpio_softc *ti_gpio_sc = NULL; +static int ti_gpio_detach(device_t); static u_int ti_max_gpio_banks(void) @@ -763,21 +764,21 @@ ti_gpio_attach(device_t dev) */ if (bus_alloc_resources(dev, ti_gpio_mem_spec, sc->sc_mem_res) != 0) { device_printf(dev, "Error: could not allocate mem resources\n"); + ti_gpio_detach(dev); return (ENXIO); } /* Request the IRQ resources */ if (bus_alloc_resources(dev, ti_gpio_irq_spec, sc->sc_irq_res) != 0) { - bus_release_resources(dev, ti_gpio_mem_spec, sc->sc_mem_res); device_printf(dev, "Error: could not allocate irq resources\n"); + ti_gpio_detach(dev); return (ENXIO); } /* Setup the IRQ resources */ if (ti_gpio_attach_intr(dev) != 0) { - ti_gpio_detach_intr(dev); - bus_release_resources(dev, ti_gpio_irq_spec, sc->sc_irq_res); - bus_release_resources(dev, ti_gpio_mem_spec, sc->sc_mem_res); + device_printf(dev, "Error: could not setup irq handlers\n"); + ti_gpio_detach(dev); return (ENXIO); } @@ -809,11 +810,7 @@ ti_gpio_attach(device_t dev) /* Initialize the GPIO module. */ err = ti_gpio_bank_init(dev, i); if (err != 0) { - ti_gpio_detach_intr(dev); - bus_release_resources(dev, ti_gpio_irq_spec, - sc->sc_irq_res); - bus_release_resources(dev, ti_gpio_mem_spec, - sc->sc_mem_res); + ti_gpio_detach(dev); return (err); } } @@ -852,18 +849,17 @@ ti_gpio_detach(device_t dev) if (sc->sc_mem_res[i] != NULL) ti_gpio_intr_clr(sc, i, 0xffffffff); } - bus_generic_detach(dev); - - free(sc->sc_events, M_DEVBUF); - free(sc->sc_irq_polarity, M_DEVBUF); - free(sc->sc_irq_trigger, M_DEVBUF); - + if (sc->sc_events) + free(sc->sc_events, M_DEVBUF); + if (sc->sc_irq_polarity) + free(sc->sc_irq_polarity, M_DEVBUF); + if (sc->sc_irq_trigger) + free(sc->sc_irq_trigger, M_DEVBUF); /* Release the memory and IRQ resources. */ ti_gpio_detach_intr(dev); bus_release_resources(dev, ti_gpio_irq_spec, sc->sc_irq_res); bus_release_resources(dev, ti_gpio_mem_spec, sc->sc_mem_res); - TI_GPIO_LOCK_DESTROY(sc); return (0); Modified: head/sys/mips/atheros/ar71xx_gpio.c ============================================================================== --- head/sys/mips/atheros/ar71xx_gpio.c Sat Jan 31 11:24:26 2015 (r277967) +++ head/sys/mips/atheros/ar71xx_gpio.c Sat Jan 31 12:17:07 2015 (r277968) @@ -341,7 +341,6 @@ static int ar71xx_gpio_attach(device_t dev) { struct ar71xx_gpio_softc *sc = device_get_softc(dev); - int error = 0; int i, j, maxpin; int mask, pinon; uint32_t oe; @@ -358,14 +357,14 @@ ar71xx_gpio_attach(device_t dev) if (sc->gpio_mem_res == NULL) { device_printf(dev, "couldn't map memory\n"); - error = ENXIO; ar71xx_gpio_detach(dev); - return(error); + return (ENXIO); } if ((sc->gpio_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->gpio_irq_rid, RF_SHAREABLE | RF_ACTIVE)) == NULL) { device_printf(dev, "unable to allocate IRQ resource\n"); + ar71xx_gpio_detach(dev); return (ENXIO); } @@ -373,6 +372,7 @@ ar71xx_gpio_attach(device_t dev) ar71xx_gpio_filter, ar71xx_gpio_intr, sc, &sc->gpio_ih))) { device_printf(dev, "WARNING: unable to register interrupt handler\n"); + ar71xx_gpio_detach(dev); return (ENXIO); } @@ -447,12 +447,16 @@ ar71xx_gpio_detach(device_t dev) KASSERT(mtx_initialized(&sc->gpio_mtx), ("gpio mutex not initialized")); bus_generic_detach(dev); - + if (sc->gpio_ih) + bus_teardown_intr(dev, sc->gpio_irq_res, sc->gpio_ih); + if (sc->gpio_irq_res) + bus_release_resource(dev, SYS_RES_IRQ, sc->gpio_irq_rid, + sc->gpio_irq_res); if (sc->gpio_mem_res) bus_release_resource(dev, SYS_RES_MEMORY, sc->gpio_mem_rid, sc->gpio_mem_res); - - free(sc->gpio_pins, M_DEVBUF); + if (sc->gpio_pins) + free(sc->gpio_pins, M_DEVBUF); mtx_destroy(&sc->gpio_mtx); return(0); Modified: head/sys/mips/cavium/octeon_gpio.c ============================================================================== --- head/sys/mips/cavium/octeon_gpio.c Sat Jan 31 11:24:26 2015 (r277967) +++ head/sys/mips/cavium/octeon_gpio.c Sat Jan 31 12:17:07 2015 (r277968) @@ -383,6 +383,7 @@ octeon_gpio_attach(device_t dev) OCTEON_IRQ_GPIO0 + i, OCTEON_IRQ_GPIO0 + i, 1, RF_SHAREABLE | RF_ACTIVE)) == NULL) { device_printf(dev, "unable to allocate IRQ resource\n"); + octeon_gpio_detach(dev); return (ENXIO); } @@ -392,6 +393,7 @@ octeon_gpio_attach(device_t dev) &(sc->gpio_intr_cookies[i]), &sc->gpio_ih[i]))) { device_printf(dev, "WARNING: unable to register interrupt handler\n"); + octeon_gpio_detach(dev); return (ENXIO); } } @@ -448,11 +450,14 @@ octeon_gpio_detach(device_t dev) KASSERT(mtx_initialized(&sc->gpio_mtx), ("gpio mutex not initialized")); for ( i = 0; i < OCTEON_GPIO_IRQS; i++) { - bus_release_resource(dev, SYS_RES_IRQ, - sc->gpio_irq_rid[i], sc->gpio_irq_res[i]); + if (sc->gpio_ih[i]) + bus_teardown_intr(dev, sc->gpio_irq_res[i], + sc->gpio_ih[i]); + if (sc->gpio_irq_res[i]) + bus_release_resource(dev, SYS_RES_IRQ, + sc->gpio_irq_rid[i], sc->gpio_irq_res[i]); } bus_generic_detach(dev); - mtx_destroy(&sc->gpio_mtx); return(0); Modified: head/sys/mips/rt305x/rt305x_gpio.c ============================================================================== --- head/sys/mips/rt305x/rt305x_gpio.c Sat Jan 31 11:24:26 2015 (r277967) +++ head/sys/mips/rt305x/rt305x_gpio.c Sat Jan 31 12:17:07 2015 (r277968) @@ -430,7 +430,7 @@ static int rt305x_gpio_attach(device_t dev) { struct rt305x_gpio_softc *sc = device_get_softc(dev); - int error = 0, i; + int i; uint64_t avlpins = 0; sc->reset_gpio = DAP1350_RESET_GPIO; @@ -446,14 +446,14 @@ rt305x_gpio_attach(device_t dev) if (sc->gpio_mem_res == NULL) { device_printf(dev, "couldn't map memory\n"); - error = ENXIO; rt305x_gpio_detach(dev); - return(error); + return (ENXIO); } if ((sc->gpio_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->gpio_irq_rid, RF_SHAREABLE | RF_ACTIVE)) == NULL) { device_printf(dev, "unable to allocate IRQ resource\n"); + rt305x_gpio_detach(dev); return (ENXIO); } @@ -462,6 +462,7 @@ rt305x_gpio_attach(device_t dev) rt305x_gpio_intr, NULL, sc, &sc->gpio_ih))) { device_printf(dev, "WARNING: unable to register interrupt handler\n"); + rt305x_gpio_detach(dev); return (ENXIO); } @@ -515,11 +516,14 @@ rt305x_gpio_detach(device_t dev) KASSERT(mtx_initialized(&sc->gpio_mtx), ("gpio mutex not initialized")); bus_generic_detach(dev); - + if (sc->gpio_ih) + bus_teardown_intr(dev, sc->gpio_irq_res, sc->gpio_ih); + if (sc->gpio_irq_res) + bus_release_resource(dev, SYS_RES_IRQ, sc->gpio_irq_rid, + sc->gpio_irq_res); if (sc->gpio_mem_res) bus_release_resource(dev, SYS_RES_MEMORY, sc->gpio_mem_rid, sc->gpio_mem_res); - mtx_destroy(&sc->gpio_mtx); return(0); From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 12:27:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3C88A35E; Sat, 31 Jan 2015 12:27:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27F126A1; Sat, 31 Jan 2015 12:27:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VCRK4h032864; Sat, 31 Jan 2015 12:27:20 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VCRJQb032862; Sat, 31 Jan 2015 12:27:19 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501311227.t0VCRJQb032862@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 31 Jan 2015 12:27:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277969 - head/sys/fs/tmpfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 12:27:20 -0000 Author: kib Date: Sat Jan 31 12:27:18 2015 New Revision: 277969 URL: https://svnweb.freebsd.org/changeset/base/277969 Log: POSIX states that write(2) "shall mark for update the last data modification and last file status change timestamps of the file". Currently, tmpfs only modifies ctime when file was extended. Since r277828 followed tmpfs_write(), mmaped writes also do not modify ctime. Fix this, by updating both ctime and mtime for writes to tmpfs files. Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/fs/tmpfs/tmpfs_subr.c head/sys/fs/tmpfs/tmpfs_vnops.c Modified: head/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_subr.c Sat Jan 31 12:17:07 2015 (r277968) +++ head/sys/fs/tmpfs/tmpfs_subr.c Sat Jan 31 12:27:18 2015 (r277969) @@ -1434,7 +1434,8 @@ tmpfs_check_mtime(struct vnode *vp) if ((obj->flags & OBJ_TMPFS_DIRTY) != 0) { obj->flags &= ~OBJ_TMPFS_DIRTY; node = VP_TO_TMPFS_NODE(vp); - node->tn_status |= TMPFS_NODE_MODIFIED; + node->tn_status |= TMPFS_NODE_MODIFIED | + TMPFS_NODE_CHANGED; } VM_OBJECT_WUNLOCK(obj); } Modified: head/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vnops.c Sat Jan 31 12:17:07 2015 (r277968) +++ head/sys/fs/tmpfs/tmpfs_vnops.c Sat Jan 31 12:27:18 2015 (r277969) @@ -483,7 +483,7 @@ tmpfs_write(struct vop_write_args *v) error = uiomove_object(node->tn_reg.tn_aobj, node->tn_size, uio); node->tn_status |= TMPFS_NODE_ACCESSED | TMPFS_NODE_MODIFIED | - (extended ? TMPFS_NODE_CHANGED : 0); + TMPFS_NODE_CHANGED; if (node->tn_mode & (S_ISUID | S_ISGID)) { if (priv_check_cred(v->a_cred, PRIV_VFS_RETAINSUGID, 0)) node->tn_mode &= ~(S_ISUID | S_ISGID); From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 12:27:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4E312494; Sat, 31 Jan 2015 12:27:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 205726A5; Sat, 31 Jan 2015 12:27:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VCRfYT032948; Sat, 31 Jan 2015 12:27:41 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VCReEb032947; Sat, 31 Jan 2015 12:27:40 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501311227.t0VCReEb032947@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 31 Jan 2015 12:27:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277970 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 12:27:41 -0000 Author: kib Date: Sat Jan 31 12:27:40 2015 New Revision: 277970 URL: https://svnweb.freebsd.org/changeset/base/277970 Log: The dependency chain for priority-inheritance mutexes could be subverted by userspace into cycle. Both umtx_propagate_priority() and umtx_repropagate_priority() would then loop infinitely, owning the spinlock. Check for the cycle using standard Floyd' algorithm before doing the pass in the affected functions. Add simple check for condition of tricking the thread into a wait for itself, which could be easily simulated by usermode without race. Found by: Eric van Gyzen In collaboration with: Eric van Gyzen Tested by: pho MFC after: 1 week Modified: head/sys/kern/kern_umtx.c Modified: head/sys/kern/kern_umtx.c ============================================================================== --- head/sys/kern/kern_umtx.c Sat Jan 31 12:27:18 2015 (r277969) +++ head/sys/kern/kern_umtx.c Sat Jan 31 12:27:40 2015 (r277970) @@ -1302,6 +1302,47 @@ umtx_pi_adjust_thread(struct umtx_pi *pi return (1); } +static struct umtx_pi * +umtx_pi_next(struct umtx_pi *pi) +{ + struct umtx_q *uq_owner; + + if (pi->pi_owner == NULL) + return (NULL); + uq_owner = pi->pi_owner->td_umtxq; + if (uq_owner == NULL) + return (NULL); + return (uq_owner->uq_pi_blocked); +} + +/* + * Floyd's Cycle-Finding Algorithm. + */ +static bool +umtx_pi_check_loop(struct umtx_pi *pi) +{ + struct umtx_pi *pi1; /* fast iterator */ + + mtx_assert(&umtx_lock, MA_OWNED); + if (pi == NULL) + return (false); + pi1 = pi; + for (;;) { + pi = umtx_pi_next(pi); + if (pi == NULL) + break; + pi1 = umtx_pi_next(pi1); + if (pi1 == NULL) + break; + pi1 = umtx_pi_next(pi1); + if (pi1 == NULL) + break; + if (pi == pi1) + return (true); + } + return (false); +} + /* * Propagate priority when a thread is blocked on POSIX * PI mutex. @@ -1319,6 +1360,8 @@ umtx_propagate_priority(struct thread *t pi = uq->uq_pi_blocked; if (pi == NULL) return; + if (umtx_pi_check_loop(pi)) + return; for (;;) { td = pi->pi_owner; @@ -1362,6 +1405,8 @@ umtx_repropagate_priority(struct umtx_pi mtx_assert(&umtx_lock, MA_OWNED); + if (umtx_pi_check_loop(pi)) + return; while (pi != NULL && pi->pi_owner != NULL) { pri = PRI_MAX; uq_owner = pi->pi_owner->td_umtxq; @@ -1694,6 +1739,11 @@ do_lock_pi(struct thread *td, struct umu continue; } + if ((owner & ~UMUTEX_CONTESTED) == id) { + error = EDEADLK; + break; + } + if (try != 0) { error = EBUSY; break; From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 12:43:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C3178741; Sat, 31 Jan 2015 12:43:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 95C6C88F; Sat, 31 Jan 2015 12:43:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VChVab041741; Sat, 31 Jan 2015 12:43:31 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VChUgU041733; Sat, 31 Jan 2015 12:43:30 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201501311243.t0VChUgU041733@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 31 Jan 2015 12:43:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277971 - in head/sys/mips: atheros cavium rt305x X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 12:43:31 -0000 Author: loos Date: Sat Jan 31 12:43:30 2015 New Revision: 277971 URL: https://svnweb.freebsd.org/changeset/base/277971 Log: Replace spaces with tabs, this will easier future changes on softc structure. No functional changes. Modified: head/sys/mips/atheros/ar71xx_gpiovar.h head/sys/mips/cavium/octeon_gpiovar.h head/sys/mips/rt305x/rt305x_gpiovar.h Modified: head/sys/mips/atheros/ar71xx_gpiovar.h ============================================================================== --- head/sys/mips/atheros/ar71xx_gpiovar.h Sat Jan 31 12:27:40 2015 (r277970) +++ head/sys/mips/atheros/ar71xx_gpiovar.h Sat Jan 31 12:43:30 2015 (r277971) @@ -57,12 +57,12 @@ struct ar71xx_gpio_softc { device_t dev; - struct mtx gpio_mtx; - struct resource *gpio_mem_res; - int gpio_mem_rid; - struct resource *gpio_irq_res; - int gpio_irq_rid; - void *gpio_ih; + struct mtx gpio_mtx; + struct resource *gpio_mem_res; + int gpio_mem_rid; + struct resource *gpio_irq_res; + int gpio_irq_rid; + void *gpio_ih; int gpio_npins; struct gpio_pin *gpio_pins; }; Modified: head/sys/mips/cavium/octeon_gpiovar.h ============================================================================== --- head/sys/mips/cavium/octeon_gpiovar.h Sat Jan 31 12:27:40 2015 (r277970) +++ head/sys/mips/cavium/octeon_gpiovar.h Sat Jan 31 12:43:30 2015 (r277971) @@ -43,11 +43,11 @@ struct octeon_gpio_softc { device_t dev; - struct mtx gpio_mtx; - struct resource *gpio_irq_res[OCTEON_GPIO_IRQS]; - int gpio_irq_rid[OCTEON_GPIO_IRQS]; - void *gpio_ih[OCTEON_GPIO_IRQS]; - void *gpio_intr_cookies[OCTEON_GPIO_IRQS]; + struct mtx gpio_mtx; + struct resource *gpio_irq_res[OCTEON_GPIO_IRQS]; + int gpio_irq_rid[OCTEON_GPIO_IRQS]; + void *gpio_ih[OCTEON_GPIO_IRQS]; + void *gpio_intr_cookies[OCTEON_GPIO_IRQS]; int gpio_npins; struct gpio_pin gpio_pins[OCTEON_GPIO_PINS]; }; Modified: head/sys/mips/rt305x/rt305x_gpiovar.h ============================================================================== --- head/sys/mips/rt305x/rt305x_gpiovar.h Sat Jan 31 12:27:40 2015 (r277970) +++ head/sys/mips/rt305x/rt305x_gpiovar.h Sat Jan 31 12:43:30 2015 (r277971) @@ -30,12 +30,12 @@ struct rt305x_gpio_softc { device_t dev; - struct mtx gpio_mtx; - struct resource *gpio_mem_res; - int gpio_mem_rid; - struct resource *gpio_irq_res; - int gpio_irq_rid; - void *gpio_ih; + struct mtx gpio_mtx; + struct resource *gpio_mem_res; + int gpio_mem_rid; + struct resource *gpio_irq_res; + int gpio_irq_rid; + void *gpio_ih; int gpio_npins; struct gpio_pin gpio_pins[NGPIO]; int reset_gpio; From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 12:58:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A6825BFF; Sat, 31 Jan 2015 12:58:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 91EE2986; Sat, 31 Jan 2015 12:58:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VCw5uP048721; Sat, 31 Jan 2015 12:58:05 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VCw595048720; Sat, 31 Jan 2015 12:58:05 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501311258.t0VCw595048720@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 31 Jan 2015 12:58:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277972 - head/sys/fs/tmpfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 12:58:05 -0000 Author: kib Date: Sat Jan 31 12:58:04 2015 New Revision: 277972 URL: https://svnweb.freebsd.org/changeset/base/277972 Log: Remove single-use boolean. Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/fs/tmpfs/tmpfs_vnops.c Modified: head/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vnops.c Sat Jan 31 12:43:30 2015 (r277971) +++ head/sys/fs/tmpfs/tmpfs_vnops.c Sat Jan 31 12:58:04 2015 (r277972) @@ -453,7 +453,6 @@ tmpfs_write(struct vop_write_args *v) struct tmpfs_node *node; off_t oldsize; int error, ioflag; - boolean_t extended; vp = v->a_vp; uio = v->a_uio; @@ -473,8 +472,7 @@ tmpfs_write(struct vop_write_args *v) return (EFBIG); if (vn_rlimit_fsize(vp, uio, uio->uio_td)) return (EFBIG); - extended = uio->uio_offset + uio->uio_resid > node->tn_size; - if (extended) { + if (uio->uio_offset + uio->uio_resid > node->tn_size) { error = tmpfs_reg_resize(vp, uio->uio_offset + uio->uio_resid, FALSE); if (error != 0) From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 13:53:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4979C2D4; Sat, 31 Jan 2015 13:53:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B4B1E10; Sat, 31 Jan 2015 13:53:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VDrU21076227; Sat, 31 Jan 2015 13:53:30 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VDrUiu076225; Sat, 31 Jan 2015 13:53:30 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201501311353.t0VDrUiu076225@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sat, 31 Jan 2015 13:53:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277973 - head/bin/sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 13:53:31 -0000 Author: jilles Date: Sat Jan 31 13:53:29 2015 New Revision: 277973 URL: https://svnweb.freebsd.org/changeset/base/277973 Log: sh: Abort a wait builtin on any trapped signal. This is required by POSIX. PR: 197210 Reported by: ache MFC after: 2 weeks Modified: head/bin/sh/jobs.c head/bin/sh/trap.c Modified: head/bin/sh/jobs.c ============================================================================== --- head/bin/sh/jobs.c Sat Jan 31 12:58:04 2015 (r277972) +++ head/bin/sh/jobs.c Sat Jan 31 13:53:29 2015 (r277973) @@ -87,8 +87,8 @@ static int ttyfd = -1; /* mode flags for dowait */ #define DOWAIT_BLOCK 0x1 /* wait until a child exits */ -#define DOWAIT_SIG 0x2 /* if DOWAIT_BLOCK, abort on SIGINT/SIGQUIT */ -#define DOWAIT_SIG_ANY 0x4 /* if DOWAIT_SIG, abort on any signal */ +#define DOWAIT_SIG 0x2 /* if DOWAIT_BLOCK, abort on signal */ +#define DOWAIT_SIG_TRAP 0x4 /* if DOWAIT_SIG, abort on trapped signal only */ #if JOBS static void restartjob(struct job *); @@ -1028,7 +1028,7 @@ waitforjob(struct job *jp, int *origstat TRACE(("waitforjob(%%%td) called\n", jp - jobtab + 1)); while (jp->state == 0) if (dowait(DOWAIT_BLOCK | (Tflag ? DOWAIT_SIG | - DOWAIT_SIG_ANY : 0), jp) == -1) + DOWAIT_SIG_TRAP : 0), jp) == -1) dotrap(); #if JOBS if (jp->jobctl) { @@ -1120,7 +1120,7 @@ dowait(int mode, struct job *job) TRACE(("wait returns %d, status=%d\n", (int)pid, status)); if (pid == 0 && (mode & DOWAIT_SIG) != 0) { pid = -1; - if (((mode & DOWAIT_SIG_ANY) != 0 ? + if (((mode & DOWAIT_SIG_TRAP) != 0 ? pendingsig : pendingsig_waitcmd) != 0) { errno = EINTR; break; Modified: head/bin/sh/trap.c ============================================================================== --- head/bin/sh/trap.c Sat Jan 31 12:58:04 2015 (r277972) +++ head/bin/sh/trap.c Sat Jan 31 13:53:29 2015 (r277973) @@ -74,7 +74,7 @@ __FBSDID("$FreeBSD$"); static char sigmode[NSIG]; /* current value of signal */ volatile sig_atomic_t pendingsig; /* indicates some signal received */ -volatile sig_atomic_t pendingsig_waitcmd; /* indicates SIGINT/SIGQUIT received */ +volatile sig_atomic_t pendingsig_waitcmd; /* indicates wait builtin should be interrupted */ static int in_dotrap; /* do we execute in a trap handler? */ static char *volatile trap[NSIG]; /* trap handler commands */ static volatile sig_atomic_t gotsig[NSIG]; @@ -400,6 +400,7 @@ onsig(int signo) (signo != SIGCHLD || !ignore_sigchld)) { gotsig[signo] = 1; pendingsig = signo; + pendingsig_waitcmd = signo; } } From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 14:18:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C29427A9; Sat, 31 Jan 2015 14:18:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ADF78FD5; Sat, 31 Jan 2015 14:18:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VEIlx6088703; Sat, 31 Jan 2015 14:18:47 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VEIlAY088702; Sat, 31 Jan 2015 14:18:47 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501311418.t0VEIlAY088702@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 31 Jan 2015 14:18:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277974 - head/sys/dev/usb/input X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 14:18:47 -0000 Author: dim Date: Sat Jan 31 14:18:46 2015 New Revision: 277974 URL: https://svnweb.freebsd.org/changeset/base/277974 Log: Fix a bunch of -Wcast-qual warnings in sys/dev/usb/input/uhid.c, by using __DECONST. No functional change. Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D1743 Modified: head/sys/dev/usb/input/uhid.c Modified: head/sys/dev/usb/input/uhid.c ============================================================================== --- head/sys/dev/usb/input/uhid.c Sat Jan 31 13:53:29 2015 (r277973) +++ head/sys/dev/usb/input/uhid.c Sat Jan 31 14:18:46 2015 (r277974) @@ -734,7 +734,7 @@ uhid_attach(device_t dev) if (uaa->info.idProduct == USB_PRODUCT_WACOM_GRAPHIRE) { sc->sc_repdesc_size = sizeof(uhid_graphire_report_descr); - sc->sc_repdesc_ptr = (void *)&uhid_graphire_report_descr; + sc->sc_repdesc_ptr = __DECONST(void *, &uhid_graphire_report_descr); sc->sc_flags |= UHID_FLAG_STATIC_DESC; } else if (uaa->info.idProduct == USB_PRODUCT_WACOM_GRAPHIRE3_4X5) { @@ -755,7 +755,7 @@ uhid_attach(device_t dev) usbd_errstr(error)); } sc->sc_repdesc_size = sizeof(uhid_graphire3_4x5_report_descr); - sc->sc_repdesc_ptr = (void *)&uhid_graphire3_4x5_report_descr; + sc->sc_repdesc_ptr = __DECONST(void *, &uhid_graphire3_4x5_report_descr); sc->sc_flags |= UHID_FLAG_STATIC_DESC; } } else if ((uaa->info.bInterfaceClass == UICLASS_VENDOR) && @@ -775,7 +775,7 @@ uhid_attach(device_t dev) } /* the Xbox 360 gamepad has no report descriptor */ sc->sc_repdesc_size = sizeof(uhid_xb360gp_report_descr); - sc->sc_repdesc_ptr = (void *)&uhid_xb360gp_report_descr; + sc->sc_repdesc_ptr = __DECONST(void *, &uhid_xb360gp_report_descr); sc->sc_flags |= UHID_FLAG_STATIC_DESC; } if (sc->sc_repdesc_ptr == NULL) { From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 15:20:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 22D9A729; Sat, 31 Jan 2015 15:20:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E806834; Sat, 31 Jan 2015 15:20:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VFKwEx025807; Sat, 31 Jan 2015 15:20:58 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VFKwId025806; Sat, 31 Jan 2015 15:20:58 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201501311520.t0VFKwId025806@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 31 Jan 2015 15:20:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277976 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 15:20:59 -0000 Author: trasz Date: Sat Jan 31 15:20:58 2015 New Revision: 277976 URL: https://svnweb.freebsd.org/changeset/base/277976 Log: Fix build with "device iscsi" in kernel config. Sponsored by: The FreeBSD Foundation Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sat Jan 31 14:31:12 2015 (r277975) +++ head/sys/conf/files Sat Jan 31 15:20:58 2015 (r277976) @@ -1520,6 +1520,7 @@ ipw_monitor.fw optional ipwmonitorfw | no-obj no-implicit-rule \ clean "ipw_monitor.fw" dev/iscsi/icl.c optional iscsi | ctl +dev/iscsi/icl_conn_if.m optional iscsi | ctl dev/iscsi/icl_proxy.c optional iscsi | ctl dev/iscsi/icl_soft.c optional iscsi | ctl dev/iscsi/iscsi.c optional iscsi scbus From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 15:21:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3AAC5877; Sat, 31 Jan 2015 15:21:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 269B38CB; Sat, 31 Jan 2015 15:21:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VFLt9x026970; Sat, 31 Jan 2015 15:21:55 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VFLtWV026969; Sat, 31 Jan 2015 15:21:55 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201501311521.t0VFLtWV026969@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 31 Jan 2015 15:21:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277977 - head/sys/dev/iscsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 15:21:55 -0000 Author: trasz Date: Sat Jan 31 15:21:54 2015 New Revision: 277977 URL: https://svnweb.freebsd.org/changeset/base/277977 Log: Drop unneeded include. Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/iscsi/icl_wrappers.h Modified: head/sys/dev/iscsi/icl_wrappers.h ============================================================================== --- head/sys/dev/iscsi/icl_wrappers.h Sat Jan 31 15:20:58 2015 (r277976) +++ head/sys/dev/iscsi/icl_wrappers.h Sat Jan 31 15:21:54 2015 (r277977) @@ -38,7 +38,6 @@ #define ICL_WRAPPERS_H #include -#include #include #include From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 15:22:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A926F9D4; Sat, 31 Jan 2015 15:22:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 94E7D8D9; Sat, 31 Jan 2015 15:22:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VFMkkV027238; Sat, 31 Jan 2015 15:22:46 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VFMk3u027237; Sat, 31 Jan 2015 15:22:46 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201501311522.t0VFMk3u027237@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 31 Jan 2015 15:22:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277978 - head/sys/dev/iscsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 15:22:46 -0000 Author: trasz Date: Sat Jan 31 15:22:45 2015 New Revision: 277978 URL: https://svnweb.freebsd.org/changeset/base/277978 Log: Use proper module name in MODULE_VERSION(). Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/iscsi/icl_soft.c Modified: head/sys/dev/iscsi/icl_soft.c ============================================================================== --- head/sys/dev/iscsi/icl_soft.c Sat Jan 31 15:21:54 2015 (r277977) +++ head/sys/dev/iscsi/icl_soft.c Sat Jan 31 15:22:45 2015 (r277978) @@ -1534,4 +1534,4 @@ moduledata_t icl_soft_data = { DECLARE_MODULE(icl_soft, icl_soft_data, SI_SUB_DRIVERS, SI_ORDER_MIDDLE); MODULE_DEPEND(icl_soft, icl, 1, 1, 1); -MODULE_VERSION(icl, 1); +MODULE_VERSION(icl_soft, 1); From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 15:41:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 61CCDF23; Sat, 31 Jan 2015 15:41:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DD9DA37; Sat, 31 Jan 2015 15:41:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VFf2LJ037745; Sat, 31 Jan 2015 15:41:02 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VFf2S3037744; Sat, 31 Jan 2015 15:41:02 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501311541.t0VFf2S3037744@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 31 Jan 2015 15:41:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277979 - head/bin/ps X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 15:41:02 -0000 Author: pfg Date: Sat Jan 31 15:41:01 2015 New Revision: 277979 URL: https://svnweb.freebsd.org/changeset/base/277979 Log: Prevent access to an uninitialized variable The "-h" option may access an uninitialized value. Prevent it by properly initializing the value. CID: 1006559 Modified: head/bin/ps/ps.c Modified: head/bin/ps/ps.c ============================================================================== --- head/bin/ps/ps.c Sat Jan 31 15:22:45 2015 (r277978) +++ head/bin/ps/ps.c Sat Jan 31 15:41:01 2015 (r277979) @@ -178,7 +178,7 @@ main(int argc, char *argv[]) KINFO *kinfo = NULL, *next_KINFO; KINFO_STR *ks; struct varent *vent; - struct winsize ws; + struct winsize ws = { .ws_row = 0 }; const char *nlistf, *memf, *fmtstr, *str; char *cols; int all, ch, elem, flag, _fmt, i, lineno, linelen, left; From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 15:50:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F37C71FD; Sat, 31 Jan 2015 15:50:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF555B0D; Sat, 31 Jan 2015 15:50:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VFoJ5V041178; Sat, 31 Jan 2015 15:50:19 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VFoJMb041177; Sat, 31 Jan 2015 15:50:19 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201501311550.t0VFoJMb041177@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 31 Jan 2015 15:50:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277980 - head/sys/dev/gpio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 15:50:20 -0000 Author: loos Date: Sat Jan 31 15:50:19 2015 New Revision: 277980 URL: https://svnweb.freebsd.org/changeset/base/277980 Log: Implement a new method to retrieve the gpiobus reference from a GPIO controller. The gpiobus is responsible to keep track of the used pins and serialize the access to pins. Some of these features are important to devices that do not descend directly from gpiobus and as such cannot make use of its features (one classic example is gpioc that is attached to the GPIO controller and could not, until now, make use of the gpiobus locking). Modified: head/sys/dev/gpio/gpio_if.m Modified: head/sys/dev/gpio/gpio_if.m ============================================================================== --- head/sys/dev/gpio/gpio_if.m Sat Jan 31 15:41:01 2015 (r277979) +++ head/sys/dev/gpio/gpio_if.m Sat Jan 31 15:50:19 2015 (r277980) @@ -32,6 +32,13 @@ INTERFACE gpio; CODE { + static device_t + gpio_default_get_bus(void) + { + + return (NULL); + } + static int gpio_default_map_gpios(device_t bus, phandle_t dev, phandle_t gparent, int gcells, pcell_t *gpios, uint32_t *pin, @@ -56,6 +63,13 @@ HEADER { }; # +# Return the gpiobus device reference +# +METHOD device_t get_bus { + device_t dev; +} DEFAULT gpio_default_get_bus; + +# # Get maximum pin number # METHOD int pin_max { From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 16:26:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 715A5860; Sat, 31 Jan 2015 16:26:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D4E8E4A; Sat, 31 Jan 2015 16:26:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VGQMgc062418; Sat, 31 Jan 2015 16:26:22 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VGQLqs062416; Sat, 31 Jan 2015 16:26:21 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501311626.t0VGQLqs062416@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 31 Jan 2015 16:26:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r277981 - vendor/tcpdump/dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 16:26:22 -0000 Author: pfg Date: Sat Jan 31 16:26:21 2015 New Revision: 277981 URL: https://svnweb.freebsd.org/changeset/base/277981 Log: Upstream fixes for issues found with afl (Issue #417). - Fix length checking. Check both the captured length and the on-the-wire length (the latter *should* be greater than or equal to the former, but that's not guaranteed). Add some additional length checks, so neither caplen nor length underflow. If we stop dissecting because the packet is too short, return 1, not 0, as we've "dissected" what we can; 0 means "this is LLC+SNAP with an OUI of 0 and an unknown Ethertype". commit: 743bcecdc92f88b118ec7aac4f68b606601205cc - Clean up length checks. Check only the amount of length that matters at any given point; yes, this means we do multiple checks, but so it goes. We don't need to check for LLC+SNAP - llc_print() does that for us. We do, however, need to check to make sure we can safely skip the Fore header. commit: 5c65e7532fa16308e01299988852b0dc5b027559 Modified: vendor/tcpdump/dist/print-atm.c vendor/tcpdump/dist/print-llc.c Modified: vendor/tcpdump/dist/print-atm.c ============================================================================== --- vendor/tcpdump/dist/print-atm.c Sat Jan 31 15:50:19 2015 (r277980) +++ vendor/tcpdump/dist/print-atm.c Sat Jan 31 16:26:21 2015 (r277981) @@ -165,7 +165,7 @@ atm_if_print(netdissect_options *ndo, uint32_t llchdr; u_int hdrlen = 0; - if (caplen < 8) { + if (caplen < 1 || length < 1) { ND_PRINT((ndo, "%s", tstr)); return (caplen); } @@ -179,6 +179,15 @@ atm_if_print(netdissect_options *ndo, } /* + * Must have at least a DSAP, an SSAP, and the first byte of the + * control field. + */ + if (caplen < 3 || length < 3) { + ND_PRINT((ndo, "%s", tstr)); + return (caplen); + } + + /* * Extract the presumed LLC header into a variable, for quick * testing. * Then check for a header that's neither a header for a SNAP @@ -205,6 +214,10 @@ atm_if_print(netdissect_options *ndo, * packets? If so, could it be changed to use a * new DLT_IEEE802_6 value if we added it? */ + if (caplen < 20 || length < 20) { + ND_PRINT((ndo, "%s", tstr)); + return (caplen); + } if (ndo->ndo_eflag) ND_PRINT((ndo, "%08x%08x %08x%08x ", EXTRACT_32BITS(p), Modified: vendor/tcpdump/dist/print-llc.c ============================================================================== --- vendor/tcpdump/dist/print-llc.c Sat Jan 31 15:50:19 2015 (r277980) +++ vendor/tcpdump/dist/print-llc.c Sat Jan 31 16:26:21 2015 (r277981) @@ -151,10 +151,10 @@ llc_print(netdissect_options *ndo, const *extracted_ethertype = 0; - if (caplen < 3) { + if (caplen < 3 || length < 3) { ND_PRINT((ndo, "[|llc]")); ND_DEFAULTPRINT((u_char *)p, caplen); - return(0); + return (1); } dsap_field = *p; @@ -177,10 +177,10 @@ llc_print(netdissect_options *ndo, const * The control field in I and S frames is * 2 bytes... */ - if (caplen < 4) { + if (caplen < 4 || length < 4) { ND_PRINT((ndo, "[|llc]")); ND_DEFAULTPRINT((u_char *)p, caplen); - return(0); + return (1); } /* @@ -240,6 +240,11 @@ llc_print(netdissect_options *ndo, const if (ssap == LLCSAP_IP && dsap == LLCSAP_IP && control == LLC_UI) { + if (caplen < 4 || length < 4) { + ND_PRINT((ndo, "[|llc]")); + ND_DEFAULTPRINT((u_char *)p, caplen); + return (1); + } ip_print(ndo, p+4, length-4); return (1); } @@ -368,6 +373,8 @@ snap_print(netdissect_options *ndo, cons register int ret; ND_TCHECK2(*p, 5); + if (caplen < 5 || length < 5) + goto trunc; orgcode = EXTRACT_24BITS(p); et = EXTRACT_16BITS(p + 3); From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 16:34:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 71D25AAB; Sat, 31 Jan 2015 16:34:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5DA50F30; Sat, 31 Jan 2015 16:34:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VGYeA7067288; Sat, 31 Jan 2015 16:34:40 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VGYdLc067286; Sat, 31 Jan 2015 16:34:39 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501311634.t0VGYdLc067286@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 31 Jan 2015 16:34:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277982 - head/contrib/tcpdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 16:34:40 -0000 Author: pfg Date: Sat Jan 31 16:34:39 2015 New Revision: 277982 URL: https://svnweb.freebsd.org/changeset/base/277982 Log: MFV r277981: Upstream fixes for issues found with afl (Issue #417). - Fix length checking. Check both the captured length and the on-the-wire length (the latter *should* be greater than or equal to the former, but that's not guaranteed). Add some additional length checks, so neither caplen nor length underflow. If we stop dissecting because the packet is too short, return 1, not 0, as we've "dissected" what we can; 0 means "this is LLC+SNAP with an OUI of 0 and an unknown Ethertype". commit: 743bcecdc92f88b118ec7aac4f68b606601205cc - Clean up length checks. Check only the amount of length that matters at any given point; yes, this means we do multiple checks, but so it goes. We don't need to check for LLC+SNAP - llc_print() does that for us. We do, however, need to check to make sure we can safely skip the Fore header. commit: 5c65e7532fa16308e01299988852b0dc5b027559 Modified: head/contrib/tcpdump/print-atm.c head/contrib/tcpdump/print-llc.c Directory Properties: head/contrib/tcpdump/ (props changed) Modified: head/contrib/tcpdump/print-atm.c ============================================================================== --- head/contrib/tcpdump/print-atm.c Sat Jan 31 16:26:21 2015 (r277981) +++ head/contrib/tcpdump/print-atm.c Sat Jan 31 16:34:39 2015 (r277982) @@ -167,7 +167,7 @@ atm_if_print(netdissect_options *ndo, uint32_t llchdr; u_int hdrlen = 0; - if (caplen < 8) { + if (caplen < 1 || length < 1) { ND_PRINT((ndo, "%s", tstr)); return (caplen); } @@ -181,6 +181,15 @@ atm_if_print(netdissect_options *ndo, } /* + * Must have at least a DSAP, an SSAP, and the first byte of the + * control field. + */ + if (caplen < 3 || length < 3) { + ND_PRINT((ndo, "%s", tstr)); + return (caplen); + } + + /* * Extract the presumed LLC header into a variable, for quick * testing. * Then check for a header that's neither a header for a SNAP @@ -207,6 +216,10 @@ atm_if_print(netdissect_options *ndo, * packets? If so, could it be changed to use a * new DLT_IEEE802_6 value if we added it? */ + if (caplen < 20 || length < 20) { + ND_PRINT((ndo, "%s", tstr)); + return (caplen); + } if (ndo->ndo_eflag) ND_PRINT((ndo, "%08x%08x %08x%08x ", EXTRACT_32BITS(p), Modified: head/contrib/tcpdump/print-llc.c ============================================================================== --- head/contrib/tcpdump/print-llc.c Sat Jan 31 16:26:21 2015 (r277981) +++ head/contrib/tcpdump/print-llc.c Sat Jan 31 16:34:39 2015 (r277982) @@ -153,10 +153,10 @@ llc_print(netdissect_options *ndo, const *extracted_ethertype = 0; - if (caplen < 3) { + if (caplen < 3 || length < 3) { ND_PRINT((ndo, "[|llc]")); ND_DEFAULTPRINT((u_char *)p, caplen); - return(0); + return (1); } dsap_field = *p; @@ -179,10 +179,10 @@ llc_print(netdissect_options *ndo, const * The control field in I and S frames is * 2 bytes... */ - if (caplen < 4) { + if (caplen < 4 || length < 4) { ND_PRINT((ndo, "[|llc]")); ND_DEFAULTPRINT((u_char *)p, caplen); - return(0); + return (1); } /* @@ -242,6 +242,11 @@ llc_print(netdissect_options *ndo, const if (ssap == LLCSAP_IP && dsap == LLCSAP_IP && control == LLC_UI) { + if (caplen < 4 || length < 4) { + ND_PRINT((ndo, "[|llc]")); + ND_DEFAULTPRINT((u_char *)p, caplen); + return (1); + } ip_print(ndo, p+4, length-4); return (1); } @@ -370,6 +375,8 @@ snap_print(netdissect_options *ndo, cons register int ret; ND_TCHECK2(*p, 5); + if (caplen < 5 || length < 5) + goto trunc; orgcode = EXTRACT_24BITS(p); et = EXTRACT_16BITS(p + 3); From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 16:39:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 48CE7C06; Sat, 31 Jan 2015 16:39:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 35241F4C; Sat, 31 Jan 2015 16:39:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VGdRnr067936; Sat, 31 Jan 2015 16:39:27 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VGdR1Q067935; Sat, 31 Jan 2015 16:39:27 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201501311639.t0VGdR1Q067935@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sat, 31 Jan 2015 16:39:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277983 - head/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 16:39:27 -0000 Author: jilles Date: Sat Jan 31 16:39:26 2015 New Revision: 277983 URL: https://svnweb.freebsd.org/changeset/base/277983 Log: Ensure #include is sufficient for using SEM_VALUE_MAX. Discussed with: pluknet Modified: head/include/semaphore.h Modified: head/include/semaphore.h ============================================================================== --- head/include/semaphore.h Sat Jan 31 16:34:39 2015 (r277982) +++ head/include/semaphore.h Sat Jan 31 16:39:26 2015 (r277983) @@ -36,6 +36,8 @@ #include #include +#include + struct _sem { __uint32_t _magic; struct _usem2 _kern; From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 17:35:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 277B07C2; Sat, 31 Jan 2015 17:35:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 08960771; Sat, 31 Jan 2015 17:35:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VHZsZn096177; Sat, 31 Jan 2015 17:35:54 GMT (envelope-from jamie@FreeBSD.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VHZsXb096173; Sat, 31 Jan 2015 17:35:54 GMT (envelope-from jamie@FreeBSD.org) Message-Id: <201501311735.t0VHZsXb096173@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jamie set sender to jamie@FreeBSD.org using -f From: Jamie Gritton Date: Sat, 31 Jan 2015 17:35: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: r277985 - in stable/10: sys/fs/fdescfs sys/kern sys/sys usr.sbin/jail X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 17:35:55 -0000 Author: jamie Date: Sat Jan 31 17:35:53 2015 New Revision: 277985 URL: https://svnweb.freebsd.org/changeset/base/277985 Log: MFC r277855: Add allow.mount.fdescfs jail flag. PR: 192951 Submitted by: ruben@verweg.com Modified: stable/10/sys/fs/fdescfs/fdesc_vfsops.c stable/10/sys/kern/kern_jail.c stable/10/sys/sys/jail.h stable/10/usr.sbin/jail/jail.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/fdescfs/fdesc_vfsops.c ============================================================================== --- stable/10/sys/fs/fdescfs/fdesc_vfsops.c Sat Jan 31 17:08:02 2015 (r277984) +++ stable/10/sys/fs/fdescfs/fdesc_vfsops.c Sat Jan 31 17:35:53 2015 (r277985) @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -78,8 +79,12 @@ fdesc_mount(struct mount *mp) { int error = 0; struct fdescmount *fmp; + struct thread *td = curthread; struct vnode *rvp; + if (!prison_allow(td->td_ucred, PR_ALLOW_MOUNT_FDESCFS)) + return (EPERM); + /* * Update is a no-op */ @@ -237,4 +242,4 @@ static struct vfsops fdesc_vfsops = { .vfs_unmount = fdesc_unmount, }; -VFS_SET(fdesc_vfsops, fdescfs, VFCF_SYNTHETIC); +VFS_SET(fdesc_vfsops, fdescfs, VFCF_SYNTHETIC | VFCF_JAIL); Modified: stable/10/sys/kern/kern_jail.c ============================================================================== --- stable/10/sys/kern/kern_jail.c Sat Jan 31 17:08:02 2015 (r277984) +++ stable/10/sys/kern/kern_jail.c Sat Jan 31 17:35:53 2015 (r277985) @@ -207,6 +207,7 @@ static char *pr_allow_names[] = { "allow.mount.zfs", "allow.mount.procfs", "allow.mount.tmpfs", + "allow.mount.fdescfs", }; const size_t pr_allow_names_size = sizeof(pr_allow_names); @@ -223,6 +224,7 @@ static char *pr_allow_nonames[] = { "allow.mount.nozfs", "allow.mount.noprocfs", "allow.mount.notmpfs", + "allow.mount.nofdescfs", }; const size_t pr_allow_nonames_size = sizeof(pr_allow_nonames); @@ -4231,6 +4233,10 @@ SYSCTL_PROC(_security_jail, OID_AUTO, mo CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, PR_ALLOW_MOUNT_DEVFS, sysctl_jail_default_allow, "I", "Processes in jail can mount the devfs file system"); +SYSCTL_PROC(_security_jail, OID_AUTO, mount_fdescfs_allowed, + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, + NULL, PR_ALLOW_MOUNT_FDESCFS, sysctl_jail_default_allow, "I", + "Processes in jail can mount the fdescfs file system"); SYSCTL_PROC(_security_jail, OID_AUTO, mount_nullfs_allowed, CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, PR_ALLOW_MOUNT_NULLFS, sysctl_jail_default_allow, "I", @@ -4391,6 +4397,8 @@ SYSCTL_JAIL_PARAM(_allow_mount, , CTLTYP "B", "Jail may mount/unmount jail-friendly file systems in general"); SYSCTL_JAIL_PARAM(_allow_mount, devfs, CTLTYPE_INT | CTLFLAG_RW, "B", "Jail may mount the devfs file system"); +SYSCTL_JAIL_PARAM(_allow_mount, fdescfs, CTLTYPE_INT | CTLFLAG_RW, + "B", "Jail may mount the fdescfs file system"); SYSCTL_JAIL_PARAM(_allow_mount, nullfs, CTLTYPE_INT | CTLFLAG_RW, "B", "Jail may mount the nullfs file system"); SYSCTL_JAIL_PARAM(_allow_mount, procfs, CTLTYPE_INT | CTLFLAG_RW, Modified: stable/10/sys/sys/jail.h ============================================================================== --- stable/10/sys/sys/jail.h Sat Jan 31 17:08:02 2015 (r277984) +++ stable/10/sys/sys/jail.h Sat Jan 31 17:35:53 2015 (r277985) @@ -228,7 +228,8 @@ struct prison_racct { #define PR_ALLOW_MOUNT_ZFS 0x0200 #define PR_ALLOW_MOUNT_PROCFS 0x0400 #define PR_ALLOW_MOUNT_TMPFS 0x0800 -#define PR_ALLOW_ALL 0x0fff +#define PR_ALLOW_MOUNT_FDESCFS 0x1000 +#define PR_ALLOW_ALL 0x1fff /* * OSD methods Modified: stable/10/usr.sbin/jail/jail.8 ============================================================================== --- stable/10/usr.sbin/jail/jail.8 Sat Jan 31 17:08:02 2015 (r277984) +++ stable/10/usr.sbin/jail/jail.8 Sat Jan 31 17:35:53 2015 (r277985) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 4, 2014 +.Dd January 28, 2015 .Dt JAIL 8 .Os .Sh NAME @@ -362,7 +362,7 @@ A set of IPv6 options for the jail, the and .Va ip4 above. -.It vnet +.It Va vnet Create the jail with its own virtual network stack, with its own network interfaces, addresses, routing table, etc. The kernel must have been compiled with the @@ -531,6 +531,14 @@ is set to a value lower than 2. The devfs ruleset should be restricted from the default by using the .Va devfs_ruleset option. +.It Va allow.mount.fdescfs +privileged users inside the jail will be able to mount and unmount the +fdescfs file system. +This permission is effective only together with +.Va allow.mount +and only when +.Va enforce_statfs +is set to a value lower than 2. .It Va allow.mount.nullfs privileged users inside the jail will be able to mount and unmount the nullfs file system. From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 18:39:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1CE5BF55; Sat, 31 Jan 2015 18:39:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 08BB6C66; Sat, 31 Jan 2015 18:39:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VIdWkW024831; Sat, 31 Jan 2015 18:39:32 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VIdW9G024830; Sat, 31 Jan 2015 18:39:32 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501311839.t0VIdW9G024830@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Sat, 31 Jan 2015 18:39:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277987 - head/sys/powerpc/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 18:39:33 -0000 Author: nwhitehorn Date: Sat Jan 31 18:39:32 2015 New Revision: 277987 URL: https://svnweb.freebsd.org/changeset/base/277987 Log: Correctness improvements for removing FDT excluded memory areas. Modified: head/sys/powerpc/ofw/ofw_machdep.c Modified: head/sys/powerpc/ofw/ofw_machdep.c ============================================================================== --- head/sys/powerpc/ofw/ofw_machdep.c Sat Jan 31 17:45:48 2015 (r277986) +++ head/sys/powerpc/ofw/ofw_machdep.c Sat Jan 31 18:39:32 2015 (r277987) @@ -259,16 +259,14 @@ excise_fdt_reserved(struct mem_region *a if (fdtmap[j].address + fdtmap[j].size < avail[i].mr_start + avail[i].mr_size) { avail[asz].mr_start = - roundup2(fdtmap[j].address + - fdtmap[j].size, PAGE_SIZE); + fdtmap[j].address + fdtmap[j].size; avail[asz].mr_size = avail[i].mr_start + avail[i].mr_size - avail[asz].mr_start; asz++; } - avail[i].mr_size = - rounddown2(fdtmap[j].address, PAGE_MASK) - + avail[i].mr_size = fdtmap[j].address - avail[i].mr_start; } @@ -282,8 +280,10 @@ excise_fdt_reserved(struct mem_region *a avail[i].mr_start && fdtmap[j].address + fdtmap[j].size < avail[i].mr_start + avail[i].mr_size) { + avail[i].mr_size += avail[i].mr_start; avail[i].mr_start = - roundup2(fdtmap[j].address + fdtmap[j].size, PAGE_MASK); + fdtmap[j].address + fdtmap[j].size; + avail[i].mr_size -= avail[i].mr_start; } } } From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 18:42:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 313C9114; Sat, 31 Jan 2015 18:42:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 01A04D03; Sat, 31 Jan 2015 18:42:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VIgpxn028766; Sat, 31 Jan 2015 18:42:51 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VIgp1Q028765; Sat, 31 Jan 2015 18:42:51 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501311842.t0VIgp1Q028765@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Sat, 31 Jan 2015 18:42:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277988 - head/sys/boot/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 18:42:52 -0000 Author: nwhitehorn Date: Sat Jan 31 18:42:51 2015 New Revision: 277988 URL: https://svnweb.freebsd.org/changeset/base/277988 Log: Add code to support loading relocatable kernels at offsets that are not zero. Modified: head/sys/boot/common/load_elf.c Modified: head/sys/boot/common/load_elf.c ============================================================================== --- head/sys/boot/common/load_elf.c Sat Jan 31 18:39:32 2015 (r277987) +++ head/sys/boot/common/load_elf.c Sat Jan 31 18:42:51 2015 (r277988) @@ -193,8 +193,9 @@ __elfN(loadfile_raw)(char *filename, u_i /* * Calculate destination address based on kernel entrypoint */ - dest = (ehdr->e_entry & ~PAGE_MASK); - if (dest == 0) { + if (ehdr->e_type == ET_EXEC) + dest = (ehdr->e_entry & ~PAGE_MASK); + if ((ehdr->e_entry & ~PAGE_MASK) == 0) { printf("elf" __XSTRING(__ELF_WORD_SIZE) "_loadfile: not a kernel (maybe static binary?)\n"); err = EPERM; goto oerr; @@ -315,7 +316,7 @@ __elfN(loadimage)(struct preloaded_file ret = 0; firstaddr = lastaddr = 0; ehdr = ef->ehdr; - if (ef->kernel) { + if (ehdr->e_type == ET_EXEC) { #if defined(__i386__) || defined(__amd64__) #if __ELF_WORD_SIZE == 64 off = - (off & 0xffffffffff000000ull);/* x86_64 relocates after locore */ @@ -369,10 +370,12 @@ __elfN(loadimage)(struct preloaded_file #else off = 0; /* other archs use direct mapped kernels */ #endif - __elfN(relocation_offset) = off; } ef->off = off; + if (ef->kernel) + __elfN(relocation_offset) = off; + if ((ehdr->e_phoff + ehdr->e_phnum * sizeof(*phdr)) > ef->firstlen) { printf("elf" __XSTRING(__ELF_WORD_SIZE) "_loadimage: program header not within first page\n"); goto out; @@ -729,7 +732,7 @@ __elfN(load_modmetadata)(struct preloade if (err != 0) goto out; - if (ef.ehdr->e_type == ET_EXEC) { + if (ef.kernel == 1 || ef.ehdr->e_type == ET_EXEC) { ef.kernel = 1; } else if (ef.ehdr->e_type != ET_DYN) { err = EFTYPE; From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 18:57:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 23CFF490; Sat, 31 Jan 2015 18:57:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0FF54DE7; Sat, 31 Jan 2015 18:57:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VIvjn2034188; Sat, 31 Jan 2015 18:57:45 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VIvjbX034187; Sat, 31 Jan 2015 18:57:45 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501311857.t0VIvjbX034187@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 31 Jan 2015 18:57:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277989 - head/sys/dev/fdt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 18:57:46 -0000 Author: ian Date: Sat Jan 31 18:57:45 2015 New Revision: 277989 URL: https://svnweb.freebsd.org/changeset/base/277989 Log: Fix whitespace glitch from prior comit. Modified: head/sys/dev/fdt/fdt_clock.c Modified: head/sys/dev/fdt/fdt_clock.c ============================================================================== --- head/sys/dev/fdt/fdt_clock.c Sat Jan 31 18:42:51 2015 (r277988) +++ head/sys/dev/fdt/fdt_clock.c Sat Jan 31 18:57:45 2015 (r277989) @@ -150,7 +150,7 @@ fdt_clock_register_provider(device_t pro { OF_device_register_xref( - OF_xref_from_node(ofw_bus_get_node(provider)), provider); + OF_xref_from_node(ofw_bus_get_node(provider)), provider); } void From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 19:16:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C3AEB6D2; Sat, 31 Jan 2015 19:16:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AFAB0F72; Sat, 31 Jan 2015 19:16:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VJGqEm043490; Sat, 31 Jan 2015 19:16:52 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VJGqki043484; Sat, 31 Jan 2015 19:16:52 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501311916.t0VJGqki043484@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Sat, 31 Jan 2015 19:16:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277990 - in head: . sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 19:16:52 -0000 Author: nwhitehorn Date: Sat Jan 31 19:16:51 2015 New Revision: 277990 URL: https://svnweb.freebsd.org/changeset/base/277990 Log: Build the powerpc64 kernel as a position-independent executable. At startup, it processes its own ELF relocations and can be loaded and run in place at any physical/virtual address. NB: This requires an updated loader to boot! Relnotes: yes Modified: head/UPDATING head/sys/conf/Makefile.powerpc Modified: head/UPDATING ============================================================================== --- head/UPDATING Sat Jan 31 18:57:45 2015 (r277989) +++ head/UPDATING Sat Jan 31 19:16:51 2015 (r277990) @@ -31,6 +31,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20150131: + The powerpc64 kernel has been changed to a position-independent + executable. This can only be booted with a new version of loader(8), + so make sure to update both world and kernel before rebooting. + 20150118: Clang and llvm have been upgraded to 3.5.1 release. This is a bugfix only release, no new features have been added. Please see the 20141231 Modified: head/sys/conf/Makefile.powerpc ============================================================================== --- head/sys/conf/Makefile.powerpc Sat Jan 31 18:57:45 2015 (r277989) +++ head/sys/conf/Makefile.powerpc Sat Jan 31 19:16:51 2015 (r277990) @@ -37,6 +37,11 @@ INCLUDES+= -I$S/contrib/libfdt CFLAGS+= -msoft-float -Wa,-many +.if ${MACHINE_ARCH} == "powerpc64" +CFLAGS+= -fPIC +LDFLAGS+= -pie +.endif + .if !empty(DDB_ENABLED) CFLAGS+= -fno-omit-frame-pointer .endif From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 19:18:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5E0D0824; Sat, 31 Jan 2015 19:18:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4A759F80; Sat, 31 Jan 2015 19:18:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VJIAq7043708; Sat, 31 Jan 2015 19:18:10 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VJIAOa043706; Sat, 31 Jan 2015 19:18:10 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501311918.t0VJIAOa043706@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Sat, 31 Jan 2015 19:18:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277991 - head/sys/boot/powerpc/kboot X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 19:18:10 -0000 Author: nwhitehorn Date: Sat Jan 31 19:18:09 2015 New Revision: 277991 URL: https://svnweb.freebsd.org/changeset/base/277991 Log: Add FDT reservations for memory areas used by OPAL or RTAS runtime firmware. This allows a kexec'ed kernel to boot multiuser under PHYP. Modified: head/sys/boot/powerpc/kboot/kbootfdt.c Modified: head/sys/boot/powerpc/kboot/kbootfdt.c ============================================================================== --- head/sys/boot/powerpc/kboot/kbootfdt.c Sat Jan 31 19:16:51 2015 (r277990) +++ head/sys/boot/powerpc/kboot/kbootfdt.c Sat Jan 31 19:18:09 2015 (r277991) @@ -110,12 +110,32 @@ fdt_linux_fixups(void *fdtp) */ offset = fdt_path_offset(fdtp, "/memory@0"); - if (offset > 0) { + if (offset > 0) fdt_delprop(fdtp, offset, "available"); - /* - * XXX: add real available properties to reflect RTAS, etc. - * reservations? - */ + + /* + * Add reservations for OPAL and RTAS state if present + */ + + offset = fdt_path_offset(fdtp, "/ibm,opal"); + if (offset > 0) { + uint64_t *base, *size; + base = fdt_getprop(fdtp, offset, "opal-base-address", + &len); + size = fdt_getprop(fdtp, offset, "opal-runtime-size", + &len); + if (base != NULL && size != NULL) + fdt_add_mem_rsv(fdtp, fdt64_to_cpu(*base), + fdt64_to_cpu(*size)); + } + offset = fdt_path_offset(fdtp, "/rtas"); + if (offset > 0) { + uint32_t *base, *size; + base = fdt_getprop(fdtp, offset, "linux,rtas-base", &len); + size = fdt_getprop(fdtp, offset, "rtas-size", &len); + if (base != NULL && size != NULL) + fdt_add_mem_rsv(fdtp, fdt32_to_cpu(*base), + fdt32_to_cpu(*size)); } /* From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 19:27:34 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B24129CF; Sat, 31 Jan 2015 19:27:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 99CC2B4; Sat, 31 Jan 2015 19:27:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VJRYLQ048321; Sat, 31 Jan 2015 19:27:34 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VJRTt5048292; Sat, 31 Jan 2015 19:27:29 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501311927.t0VJRTt5048292@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 31 Jan 2015 19:27:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r277992 - in vendor/llvm/dist: docs include/llvm/IR include/llvm/MC include/llvm/Transforms/Utils lib/Analysis lib/CodeGen lib/CodeGen/AsmPrinter lib/IR lib/MC lib/Support lib/Target/AA... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 19:27:34 -0000 Author: dim Date: Sat Jan 31 19:27:28 2015 New Revision: 277992 URL: https://svnweb.freebsd.org/changeset/base/277992 Log: Vendor import of llvm RELEASE_360/rc2 tag r227651 (effectively, 3.6.0 RC2): https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_360/rc2@227651 Added: vendor/llvm/dist/test/Analysis/ScalarEvolution/nw-sub-is-not-nw-add.ll vendor/llvm/dist/test/Bindings/llvm-c/add_named_metadata_operand.ll vendor/llvm/dist/test/Bindings/llvm-c/set_metadata.ll vendor/llvm/dist/test/CodeGen/AArch64/ghc-cc.ll vendor/llvm/dist/test/CodeGen/ARM/2015-01-21-thumbv4t-ldstr-opt.ll vendor/llvm/dist/test/CodeGen/R600/misaligned-load.ll vendor/llvm/dist/test/CodeGen/R600/scratch-buffer.ll vendor/llvm/dist/test/DebugInfo/Mips/fn-call-line.ll vendor/llvm/dist/test/MC/ARM/pr22395.s (contents, props changed) vendor/llvm/dist/test/Transforms/IndVarSimplify/pr22222.ll vendor/llvm/dist/tools/llvm-c-test/metadata.c (contents, props changed) Deleted: vendor/llvm/dist/test/MC/MachO/AArch64/mergeable.s vendor/llvm/dist/test/MC/MachO/x86_64-mergeable.s Modified: vendor/llvm/dist/docs/ReleaseNotes.rst vendor/llvm/dist/include/llvm/IR/LegacyPassManagers.h vendor/llvm/dist/include/llvm/MC/MCAsmBackend.h vendor/llvm/dist/include/llvm/MC/MCAssembler.h vendor/llvm/dist/include/llvm/MC/MCMachObjectWriter.h vendor/llvm/dist/include/llvm/MC/MCObjectWriter.h vendor/llvm/dist/include/llvm/Transforms/Utils/SimplifyLibCalls.h vendor/llvm/dist/lib/Analysis/ScalarEvolution.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfUnit.cpp vendor/llvm/dist/lib/CodeGen/MachineFunctionPass.cpp vendor/llvm/dist/lib/IR/Core.cpp vendor/llvm/dist/lib/IR/LegacyPassManager.cpp vendor/llvm/dist/lib/MC/ELFObjectWriter.cpp vendor/llvm/dist/lib/MC/MCAsmInfoDarwin.cpp vendor/llvm/dist/lib/MC/MCAssembler.cpp vendor/llvm/dist/lib/MC/MachObjectWriter.cpp vendor/llvm/dist/lib/MC/WinCOFFObjectWriter.cpp vendor/llvm/dist/lib/Support/Triple.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64CallingConvention.td vendor/llvm/dist/lib/Target/AArch64/AArch64FastISel.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64FrameLowering.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64RegisterInfo.cpp vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp vendor/llvm/dist/lib/Target/ARM/ARMLoadStoreOptimizer.cpp vendor/llvm/dist/lib/Target/ARM/AsmParser/ARMAsmParser.cpp vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonRemoveSZExtArgs.cpp vendor/llvm/dist/lib/Target/Mips/Mips16ISelLowering.cpp vendor/llvm/dist/lib/Target/Mips/Mips32r6InstrInfo.td vendor/llvm/dist/lib/Target/Mips/MipsISelLowering.cpp vendor/llvm/dist/lib/Target/Mips/MipsISelLowering.h vendor/llvm/dist/lib/Target/NVPTX/NVPTXAllocaHoisting.h vendor/llvm/dist/lib/Target/NVPTX/NVPTXLowerAggrCopies.h vendor/llvm/dist/lib/Target/PowerPC/MCTargetDesc/PPCMachObjectWriter.cpp vendor/llvm/dist/lib/Target/R600/AMDGPU.h vendor/llvm/dist/lib/Target/R600/AMDGPU.td vendor/llvm/dist/lib/Target/R600/AMDGPUAsmPrinter.cpp vendor/llvm/dist/lib/Target/R600/AMDGPUISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/R600/AMDGPUISelLowering.cpp vendor/llvm/dist/lib/Target/R600/AMDGPUInstrInfo.cpp vendor/llvm/dist/lib/Target/R600/AMDGPUInstrInfo.h vendor/llvm/dist/lib/Target/R600/AMDGPUMCInstLower.cpp vendor/llvm/dist/lib/Target/R600/AMDGPUMCInstLower.h vendor/llvm/dist/lib/Target/R600/AMDGPUSubtarget.cpp vendor/llvm/dist/lib/Target/R600/AMDGPUSubtarget.h vendor/llvm/dist/lib/Target/R600/MCTargetDesc/AMDGPUAsmBackend.cpp vendor/llvm/dist/lib/Target/R600/SIDefines.h vendor/llvm/dist/lib/Target/R600/SIISelLowering.cpp vendor/llvm/dist/lib/Target/R600/SIInstrFormats.td vendor/llvm/dist/lib/Target/R600/SIInstrInfo.cpp vendor/llvm/dist/lib/Target/R600/SIInstrInfo.h vendor/llvm/dist/lib/Target/R600/SIInstrInfo.td vendor/llvm/dist/lib/Target/R600/SIInstructions.td vendor/llvm/dist/lib/Target/R600/SIMachineFunctionInfo.h vendor/llvm/dist/lib/Target/R600/SIPrepareScratchRegs.cpp vendor/llvm/dist/lib/Target/R600/SIRegisterInfo.cpp vendor/llvm/dist/lib/Target/R600/SIRegisterInfo.h vendor/llvm/dist/lib/Target/R600/SIShrinkInstructions.cpp vendor/llvm/dist/lib/Target/R600/VIInstructions.td vendor/llvm/dist/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.cpp vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCalls.cpp vendor/llvm/dist/lib/Transforms/Scalar/GVN.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopInstSimplify.cpp vendor/llvm/dist/lib/Transforms/Utils/LowerSwitch.cpp vendor/llvm/dist/lib/Transforms/Utils/SimplifyIndVar.cpp vendor/llvm/dist/lib/Transforms/Utils/SimplifyLibCalls.cpp vendor/llvm/dist/lib/Transforms/Utils/SymbolRewriter.cpp vendor/llvm/dist/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp vendor/llvm/dist/test/CodeGen/AArch64/arm64-platform-reg.ll vendor/llvm/dist/test/CodeGen/Mips/fcmp.ll vendor/llvm/dist/test/CodeGen/R600/basic-loop.ll vendor/llvm/dist/test/CodeGen/R600/ctpop.ll vendor/llvm/dist/test/CodeGen/R600/ctpop64.ll vendor/llvm/dist/test/CodeGen/R600/ds_read2st64.ll vendor/llvm/dist/test/CodeGen/R600/fp_to_sint.ll vendor/llvm/dist/test/CodeGen/R600/hsa.ll vendor/llvm/dist/test/CodeGen/R600/si-triv-disjoint-mem-access.ll vendor/llvm/dist/test/CodeGen/SPARC/2008-10-10-InlineAsmMemoryOperand.ll vendor/llvm/dist/test/CodeGen/SPARC/inlineasm.ll vendor/llvm/dist/test/CodeGen/SPARC/mult-alt-generic-sparc.ll vendor/llvm/dist/test/DebugInfo/X86/decl-derived-member.ll vendor/llvm/dist/test/MC/ELF/relocation-386.s vendor/llvm/dist/test/MC/MachO/x86_64-symbols.s vendor/llvm/dist/test/SymbolRewriter/rewrite.ll vendor/llvm/dist/test/SymbolRewriter/rewrite.map vendor/llvm/dist/test/Transforms/GVN/edge.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/strengthen-overflow.ll vendor/llvm/dist/test/Transforms/InstCombine/call-cast-target.ll vendor/llvm/dist/test/Transforms/InstCombine/memcpy_chk-1.ll vendor/llvm/dist/test/Transforms/InstCombine/memmove_chk-1.ll vendor/llvm/dist/test/Transforms/InstCombine/memset_chk-1.ll vendor/llvm/dist/test/Transforms/InstCombine/stpcpy_chk-1.ll vendor/llvm/dist/test/Transforms/InstCombine/strcpy_chk-1.ll vendor/llvm/dist/test/Transforms/InstCombine/strncpy_chk-1.ll vendor/llvm/dist/test/tools/gold/emit-llvm.ll vendor/llvm/dist/tools/gold/gold-plugin.cpp vendor/llvm/dist/tools/llvm-c-test/CMakeLists.txt vendor/llvm/dist/tools/llvm-c-test/llvm-c-test.h vendor/llvm/dist/tools/llvm-c-test/main.c vendor/llvm/dist/unittests/ADT/TripleTest.cpp vendor/llvm/dist/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp Modified: vendor/llvm/dist/docs/ReleaseNotes.rst ============================================================================== --- vendor/llvm/dist/docs/ReleaseNotes.rst Sat Jan 31 19:18:09 2015 (r277991) +++ vendor/llvm/dist/docs/ReleaseNotes.rst Sat Jan 31 19:27:28 2015 (r277992) @@ -102,6 +102,282 @@ enable handling of case (3). .. _discussions: http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-May/073235.html +Metadata is not a Value +----------------------- + +Metadata nodes (``!{...}``) and strings (``!"..."``) are no longer values. +They have no use-lists, no type, cannot RAUW, and cannot be function-local. + +Bridges between Value and Metadata +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +LLVM intrinsics can reference metadata using the ``metadata`` type, and +metadata nodes can reference constant values. + +Function-local metadata is limited to direct arguments to LLVM intrinsics. + +Metadata is typeless +^^^^^^^^^^^^^^^^^^^^ + +The following old IR: + +.. code-block:: llvm + + @g = global i32 0 + + define void @foo(i32 %v) { + entry: + call void @llvm.md(metadata !{i32 %v}) + call void @llvm.md(metadata !{i32* @global}) + call void @llvm.md(metadata !0) + call void @llvm.md(metadata !{metadata !"string"}) + call void @llvm.md(metadata !{metadata !{metadata !1, metadata !"string"}}) + ret void, !bar !1, !baz !2 + } + + declare void @llvm.md(metadata) + + !0 = metadata !{metadata !1, metadata !2, metadata !3, metadata !"some string"} + !1 = metadata !{metadata !2, null, metadata !"other", i32* @global, i32 7} + !2 = metadata !{} + +should now be written as: + +.. code-block:: llvm + + @g = global i32 0 + + define void @foo(i32 %v) { + entry: + call void @llvm.md(metadata i32 %v) ; The only legal place for function-local + ; metadata. + call void @llvm.md(metadata i32* @global) + call void @llvm.md(metadata !0) + call void @llvm.md(metadata !{!"string"}) + call void @llvm.md(metadata !{!{!1, !"string"}}) + ret void, !bar !1, !baz !2 + } + + declare void @llvm.md(metadata) + + !0 = !{!1, !2, !3, !"some string"} + !1 = !{!2, null, !"other", i32* @global, i32 7} + !2 = !{} + +Distinct metadata nodes +^^^^^^^^^^^^^^^^^^^^^^^ + +Metadata nodes can opt-out of uniquing, using the keyword ``distinct``. +Distinct nodes are still owned by the context, but are stored in a side table, +and not uniqued. + +In LLVM 3.5, metadata nodes would drop uniquing if an operand changed to +``null`` during optimizations. This is no longer true. However, if an operand +change causes a uniquing collision, they become ``distinct``. Unlike LLVM 3.5, +where serializing to assembly or bitcode would re-unique the nodes, they now +remain ``distinct``. + +The following IR: + +.. code-block:: llvm + + !named = !{!0, !1, !2, !3, !4, !5, !6, !7, !8} + + !0 = !{} + !1 = !{} + !2 = distinct !{} + !3 = distinct !{} + !4 = !{!0} + !5 = distinct !{!0} + !6 = !{!4, !{}, !5} + !7 = !{!{!0}, !0, !5} + !8 = distinct !{!{!0}, !0, !5} + +is equivalent to the following: + +.. code-block:: llvm + + !named = !{!0, !0, !1, !2, !3, !4, !5, !5, !6} + + !0 = !{} + !1 = distinct !{} + !2 = distinct !{} + !3 = !{!0} + !4 = distinct !{!0} + !5 = !{!3, !0, !4} + !6 = distinct !{!3, !0, !4} + +Constructing cyclic graphs +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +During graph construction, if a metadata node transitively references a forward +declaration, the node itself is considered "unresolved" until the forward +declaration resolves. An unresolved node can RAUW itself to support uniquing. +Nodes automatically resolve once all their operands have resolved. + +However, cyclic graphs prevent the nodes from resolving. An API client that +constructs a cyclic graph must call ``resolveCycles()`` to resolve nodes in the +cycle. + +To save self-references from that burden, self-referencing nodes are implicitly +``distinct``. So the following IR: + +.. code-block:: llvm + + !named = !{!0, !1, !2, !3, !4} + + !0 = !{!0} + !1 = !{!1} + !2 = !{!2, !1} + !3 = !{!2, !1} + !4 = !{!2, !1} + +is equivalent to: + +.. code-block:: llvm + + !named = !{!0, !1, !2, !3, !3} + + !0 = distinct !{!0} + !1 = distinct !{!1} + !2 = distinct !{!2, !1} + !3 = !{!2, !1} + +MDLocation (aka DebugLoc aka DILocation) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +There's a new first-class metadata construct called ``MDLocation`` (to be +followed in subsequent releases by others). It's used for the locations +referenced by ``!dbg`` metadata attachments. + +For example, if an old ``!dbg`` attachment looked like this: + +.. code-block:: llvm + + define i32 @foo(i32 %a, i32 %b) { + entry: + %add = add i32 %a, %b, !dbg !0 + ret %add, !dbg !1 + } + + !0 = metadata !{i32 10, i32 3, metadata !2, metadata !1) + !1 = metadata !{i32 20, i32 7, metadata !3) + !2 = metadata !{...} + !3 = metadata !{...} + +the new attachment looks like this: + +.. code-block:: llvm + + define i32 @foo(i32 %a, i32 %b) { + entry: + %add = add i32 %a, %b, !dbg !0 + ret %add, !dbg !1 + } + + !0 = !MDLocation(line: 10, column: 3, scope: !2, inlinedAt: !1) + !1 = !MDLocation(line: 20, column: 7, scope: !3) + !2 = !{...} + !3 = !{...} + +The fields are named, can be reordered, and have sane defaults if left out +(although ``scope:`` is required). + + +Alias syntax change +----------------------- + +The syntax for aliases is now closer to what is used for global variables + +.. code-block:: llvm + + @a = weak global ... + @b = weak alias ... + +The order of the ``alias`` keyword and the linkage was swapped before. + +The old JIT has been removed +---------------------------- + +All users should transition to MCJIT. + + +object::Binary doesn't owns the file buffer +------------------------------------------- + +It is now just a wrapper, which simplifies using object::Binary with other +users of the underlying file. + +IR in object files is now supported +----------------------------------- + +Regular object files can contain IR in a section named ``.llvmbc``. + + +The gold plugin has been rewritten +---------------------------------- + +It is now implemented directly on top of lib/Linker instead of ``lib/LTO``. +The API of ``lib/LTO`` is sufficiently different from gold's view of the +linking process that some cases could not be conveniently implemented. + +The new implementation is also lazier and has a ``save-temps`` option. + + +Change in the representation of lazy loaded funcs +------------------------------------------------- + +Lazy loaded functions are now represented is a way that ``isDeclaration`` +returns the correct answer even before reading the body. + + +The opt option -std-compile-opts was removed +-------------------------------------------- + +It was effectively an alias of -O3. + + +Python 2.7 is now required +-------------------------- + +This was done to simplify compatibility with python 3. + +The leak detector has been removed +---------------------------------- + +In practice tools like asan and valgrind were finding way more bugs than +the old leak detector, so it was removed. + + +New comdat syntax +----------------- + +The syntax of comdats was changed to + +.. code-block:: llvm + + $c = comdat any + @g = global i32 0, comdat($c) + @c = global i32 0, comdat + +The version without the parentheses is a syntatic sugar for a comdat with +the same name as the global. + + +Diagnotic infrastructure used by lib/Linker and lib/Bitcode +----------------------------------------------------------- + +These libraries now use the diagnostic handler to print errors and warnings. +This provides better error messages and simpler error handling. + + +The PreserveSource linker mode was removed +------------------------------------------ + +It was fairly broken and was removed. + + + Changes to the ARM Backend -------------------------- @@ -237,8 +513,35 @@ An exciting aspect of LLVM is that it is a lot of other language and tools projects. This section lists some of the projects that have already been updated to work with LLVM 3.6. -* A project +Portable Computing Language (pocl) +---------------------------------- +In addition to producing an easily portable open source OpenCL +implementation, another major goal of `pocl `_ +is improving performance portability of OpenCL programs with +compiler optimizations, reducing the need for target-dependent manual +optimizations. An important part of pocl is a set of LLVM passes used to +statically parallelize multiple work-items with the kernel compiler, even in +the presence of work-group barriers. This enables static parallelization of +the fine-grained static concurrency in the work groups in multiple ways. + +TTA-based Co-design Environment (TCE) +------------------------------------- + +`TCE `_ is a toolset for designing customized +exposed datapath processors based on the Transport triggered +architecture (TTA). + +The toolset provides a complete co-design flow from C/C++ +programs down to synthesizable VHDL/Verilog and parallel program binaries. +Processor customization points include the register files, function units, +supported operations, and the interconnection network. + +TCE uses Clang and LLVM for C/C++/OpenCL C language support, target independent +optimizations and also for parts of code generation. It generates +new LLVM-based code generators "on the fly" for the designed processors and +loads them in to the compiler backend as runtime libraries to avoid +per-target recompilation of larger parts of the compiler chain. Additional Information ====================== Modified: vendor/llvm/dist/include/llvm/IR/LegacyPassManagers.h ============================================================================== --- vendor/llvm/dist/include/llvm/IR/LegacyPassManagers.h Sat Jan 31 19:18:09 2015 (r277991) +++ vendor/llvm/dist/include/llvm/IR/LegacyPassManagers.h Sat Jan 31 19:27:28 2015 (r277992) @@ -195,6 +195,9 @@ public: /// then return NULL. Pass *findAnalysisPass(AnalysisID AID); + /// Retrieve the PassInfo for an analysis. + const PassInfo *findAnalysisPassInfo(AnalysisID AID) const; + /// Find analysis usage information for the pass P. AnalysisUsage *findAnalysisUsage(Pass *P); @@ -251,6 +254,12 @@ private: SmallVector ImmutablePasses; DenseMap AnUsageMap; + + /// Collection of PassInfo objects found via analysis IDs and in this top + /// level manager. This is used to memoize queries to the pass registry. + /// FIXME: This is an egregious hack because querying the pass registry is + /// either slow or racy. + mutable DenseMap AnalysisPassInfos; }; Modified: vendor/llvm/dist/include/llvm/MC/MCAsmBackend.h ============================================================================== --- vendor/llvm/dist/include/llvm/MC/MCAsmBackend.h Sat Jan 31 19:18:09 2015 (r277991) +++ vendor/llvm/dist/include/llvm/MC/MCAsmBackend.h Sat Jan 31 19:27:28 2015 (r277992) @@ -61,6 +61,12 @@ public: /// markers. If not, data region directives will be ignored. bool hasDataInCodeSupport() const { return HasDataInCodeSupport; } + /// doesSectionRequireSymbols - Check whether the given section requires that + /// all symbols (even temporaries) have symbol table entries. + virtual bool doesSectionRequireSymbols(const MCSection &Section) const { + return false; + } + /// @name Target Fixup Interfaces /// @{ Modified: vendor/llvm/dist/include/llvm/MC/MCAssembler.h ============================================================================== --- vendor/llvm/dist/include/llvm/MC/MCAssembler.h Sat Jan 31 19:18:09 2015 (r277991) +++ vendor/llvm/dist/include/llvm/MC/MCAssembler.h Sat Jan 31 19:27:28 2015 (r277992) @@ -11,7 +11,6 @@ #define LLVM_MC_MCASSEMBLER_H #include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/DenseSet.h" #include "llvm/ADT/PointerIntPair.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallString.h" @@ -882,8 +881,6 @@ private: iplist Symbols; - DenseSet LocalsUsedInReloc; - /// The map of sections to their associated assembler backend data. // // FIXME: Avoid this indirection? @@ -983,9 +980,6 @@ private: MCFragment &F, const MCFixup &Fixup); public: - void addLocalUsedInReloc(const MCSymbol &Sym); - bool isLocalUsedInReloc(const MCSymbol &Sym) const; - /// Compute the effective fragment size assuming it is laid out at the given /// \p SectionAddress and \p FragmentOffset. uint64_t computeFragmentSize(const MCAsmLayout &Layout, Modified: vendor/llvm/dist/include/llvm/MC/MCMachObjectWriter.h ============================================================================== --- vendor/llvm/dist/include/llvm/MC/MCMachObjectWriter.h Sat Jan 31 19:18:09 2015 (r277991) +++ vendor/llvm/dist/include/llvm/MC/MCMachObjectWriter.h Sat Jan 31 19:27:28 2015 (r277992) @@ -68,10 +68,12 @@ public: /// @name API /// @{ - virtual void RecordRelocation(MachObjectWriter *Writer, MCAssembler &Asm, + virtual void RecordRelocation(MachObjectWriter *Writer, + const MCAssembler &Asm, const MCAsmLayout &Layout, const MCFragment *Fragment, - const MCFixup &Fixup, MCValue Target, + const MCFixup &Fixup, + MCValue Target, uint64_t &FixedValue) = 0; /// @} @@ -95,14 +97,8 @@ class MachObjectWriter : public MCObject /// @name Relocation Data /// @{ - struct RelAndSymbol { - const MCSymbolData *Sym; - MachO::any_relocation_info MRE; - RelAndSymbol(const MCSymbolData *Sym, const MachO::any_relocation_info &MRE) - : Sym(Sym), MRE(MRE) {} - }; - - llvm::DenseMap> Relocations; + llvm::DenseMap > Relocations; llvm::DenseMap IndirectSymBase; /// @} @@ -217,15 +213,9 @@ public: // - Input errors, where something cannot be correctly encoded. 'as' allows // these through in many cases. - // Add a relocation to be output in the object file. At the time this is - // called, the symbol indexes are not know, so if the relocation refers - // to a symbol it should be passed as \p RelSymbol so that it can be updated - // afterwards. If the relocation doesn't refer to a symbol, nullptr should be - // used. - void addRelocation(const MCSymbolData *RelSymbol, const MCSectionData *SD, + void addRelocation(const MCSectionData *SD, MachO::any_relocation_info &MRE) { - RelAndSymbol P(RelSymbol, MRE); - Relocations[SD].push_back(P); + Relocations[SD].push_back(MRE); } void RecordScatteredRelocation(const MCAssembler &Asm, @@ -241,7 +231,7 @@ public: const MCFixup &Fixup, MCValue Target, uint64_t &FixedValue); - void RecordRelocation(MCAssembler &Asm, const MCAsmLayout &Layout, + void RecordRelocation(const MCAssembler &Asm, const MCAsmLayout &Layout, const MCFragment *Fragment, const MCFixup &Fixup, MCValue Target, bool &IsPCRel, uint64_t &FixedValue) override; Modified: vendor/llvm/dist/include/llvm/MC/MCObjectWriter.h ============================================================================== --- vendor/llvm/dist/include/llvm/MC/MCObjectWriter.h Sat Jan 31 19:18:09 2015 (r277991) +++ vendor/llvm/dist/include/llvm/MC/MCObjectWriter.h Sat Jan 31 19:27:28 2015 (r277992) @@ -76,10 +76,12 @@ public: /// post layout binding. The implementation is responsible for storing /// information about the relocation so that it can be emitted during /// WriteObject(). - virtual void RecordRelocation(MCAssembler &Asm, const MCAsmLayout &Layout, + virtual void RecordRelocation(const MCAssembler &Asm, + const MCAsmLayout &Layout, const MCFragment *Fragment, const MCFixup &Fixup, MCValue Target, - bool &IsPCRel, uint64_t &FixedValue) = 0; + bool &IsPCRel, + uint64_t &FixedValue) = 0; /// \brief Check whether the difference (A - B) between two symbol /// references is fully resolved. Modified: vendor/llvm/dist/include/llvm/Transforms/Utils/SimplifyLibCalls.h ============================================================================== --- vendor/llvm/dist/include/llvm/Transforms/Utils/SimplifyLibCalls.h Sat Jan 31 19:18:09 2015 (r277991) +++ vendor/llvm/dist/include/llvm/Transforms/Utils/SimplifyLibCalls.h Sat Jan 31 19:27:28 2015 (r277992) @@ -17,6 +17,7 @@ #include "llvm/ADT/StringRef.h" #include "llvm/IR/IRBuilder.h" +#include "llvm/Target/TargetLibraryInfo.h" namespace llvm { class Value; @@ -53,8 +54,10 @@ private: Value *optimizeMemCpyChk(CallInst *CI, IRBuilder<> &B); Value *optimizeMemMoveChk(CallInst *CI, IRBuilder<> &B); Value *optimizeMemSetChk(CallInst *CI, IRBuilder<> &B); - Value *optimizeStrCpyChk(CallInst *CI, IRBuilder<> &B); - Value *optimizeStrNCpyChk(CallInst *CI, IRBuilder<> &B); + + // Str/Stp cpy are similar enough to be handled in the same functions. + Value *optimizeStrpCpyChk(CallInst *CI, IRBuilder<> &B, LibFunc::Func Func); + Value *optimizeStrpNCpyChk(CallInst *CI, IRBuilder<> &B, LibFunc::Func Func); /// \brief Checks whether the call \p CI to a fortified libcall is foldable /// to the non-fortified version. Modified: vendor/llvm/dist/lib/Analysis/ScalarEvolution.cpp ============================================================================== --- vendor/llvm/dist/lib/Analysis/ScalarEvolution.cpp Sat Jan 31 19:18:09 2015 (r277991) +++ vendor/llvm/dist/lib/Analysis/ScalarEvolution.cpp Sat Jan 31 19:27:28 2015 (r277992) @@ -3154,8 +3154,9 @@ const SCEV *ScalarEvolution::getMinusSCE if (LHS == RHS) return getConstant(LHS->getType(), 0); - // X - Y --> X + -Y - return getAddExpr(LHS, getNegativeSCEV(RHS), Flags); + // X - Y --> X + -Y. + // X -(nsw || nuw) Y --> X + -Y. + return getAddExpr(LHS, getNegativeSCEV(RHS)); } /// getTruncateOrZeroExtend - Return a SCEV corresponding to a conversion of the @@ -3461,12 +3462,10 @@ const SCEV *ScalarEvolution::createNodeF if (isKnownPositive(getMinusSCEV(getSCEV(GEP), Ptr))) Flags = setFlags(Flags, SCEV::FlagNUW); } - } else if (const SubOperator *OBO = - dyn_cast(BEValueV)) { - if (OBO->hasNoUnsignedWrap()) - Flags = setFlags(Flags, SCEV::FlagNUW); - if (OBO->hasNoSignedWrap()) - Flags = setFlags(Flags, SCEV::FlagNSW); + + // We cannot transfer nuw and nsw flags from subtraction + // operations -- sub nuw X, Y is not the same as add nuw X, -Y + // for instance. } const SCEV *StartVal = getSCEV(StartValueV); Modified: vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfUnit.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfUnit.cpp Sat Jan 31 19:18:09 2015 (r277991) +++ vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfUnit.cpp Sat Jan 31 19:27:28 2015 (r277992) @@ -626,10 +626,7 @@ static uint64_t getBaseTypeSize(DwarfDeb DIType BaseType = DD->resolve(Ty.getTypeDerivedFrom()); - // If this type is not derived from any type or the type is a declaration then - // take conservative approach. - if (!BaseType.isValid() || BaseType.isForwardDecl()) - return Ty.getSizeInBits(); + assert(BaseType.isValid()); // If this is a derived type, go ahead and get the base type, unless it's a // reference then it's just the size of the field. Pointer types have no need @@ -1473,7 +1470,7 @@ void DwarfUnit::constructMemberDIE(DIE & uint64_t FieldSize = getBaseTypeSize(DD, DT); uint64_t OffsetInBytes; - if (Size != FieldSize) { + if (FieldSize && Size != FieldSize) { // Handle bitfield, assume bytes are 8 bits. addUInt(MemberDie, dwarf::DW_AT_byte_size, None, FieldSize/8); addUInt(MemberDie, dwarf::DW_AT_bit_size, None, Size); Modified: vendor/llvm/dist/lib/CodeGen/MachineFunctionPass.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/MachineFunctionPass.cpp Sat Jan 31 19:18:09 2015 (r277991) +++ vendor/llvm/dist/lib/CodeGen/MachineFunctionPass.cpp Sat Jan 31 19:27:28 2015 (r277992) @@ -11,11 +11,19 @@ // //===----------------------------------------------------------------------===// -#include "llvm/IR/Function.h" +#include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/Analysis/AliasAnalysis.h" +#include "llvm/Analysis/DominanceFrontier.h" +#include "llvm/Analysis/IVUsers.h" +#include "llvm/Analysis/LoopInfo.h" +#include "llvm/Analysis/LoopInfo.h" +#include "llvm/Analysis/MemoryDependenceAnalysis.h" +#include "llvm/Analysis/ScalarEvolution.h" #include "llvm/CodeGen/MachineFunctionAnalysis.h" -#include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/Passes.h" +#include "llvm/CodeGen/StackProtector.h" +#include "llvm/IR/Dominators.h" +#include "llvm/IR/Function.h" using namespace llvm; Pass *MachineFunctionPass::createPrinterPass(raw_ostream &O, @@ -43,15 +51,13 @@ void MachineFunctionPass::getAnalysisUsa // because CodeGen overloads that to mean preserving the MachineBasicBlock // CFG in addition to the LLVM IR CFG. AU.addPreserved(); - AU.addPreserved("scalar-evolution"); - AU.addPreserved("iv-users"); - AU.addPreserved("memdep"); - AU.addPreserved("live-values"); - AU.addPreserved("domtree"); - AU.addPreserved("domfrontier"); - AU.addPreserved("loops"); - AU.addPreserved("lda"); - AU.addPreserved("stack-protector"); + AU.addPreserved(); + AU.addPreserved(); + AU.addPreserved(); + AU.addPreserved(); + AU.addPreserved(); + AU.addPreserved(); + AU.addPreserved(); FunctionPass::getAnalysisUsage(AU); } Modified: vendor/llvm/dist/lib/IR/Core.cpp ============================================================================== --- vendor/llvm/dist/lib/IR/Core.cpp Sat Jan 31 19:18:09 2015 (r277991) +++ vendor/llvm/dist/lib/IR/Core.cpp Sat Jan 31 19:27:28 2015 (r277992) @@ -563,9 +563,23 @@ LLVMValueRef LLVMGetMetadata(LLVMValueRe return nullptr; } -void LLVMSetMetadata(LLVMValueRef Inst, unsigned KindID, LLVMValueRef MD) { - MDNode *N = - MD ? cast(unwrap(MD)->getMetadata()) : nullptr; +// MetadataAsValue uses a canonical format which strips the actual MDNode for +// MDNode with just a single constant value, storing just a ConstantAsMetadata +// This undoes this canonicalization, reconstructing the MDNode. +static MDNode *extractMDNode(MetadataAsValue *MAV) { + Metadata *MD = MAV->getMetadata(); + assert((isa(MD) || isa(MD)) && + "Expected a metadata node or a canonicalized constant"); + + if (MDNode *N = dyn_cast(MD)) + return N; + + return MDNode::get(MAV->getContext(), MD); +} + +void LLVMSetMetadata(LLVMValueRef Inst, unsigned KindID, LLVMValueRef Val) { + MDNode *N = Val ? extractMDNode(unwrap(Val)) : nullptr; + unwrap(Inst)->setMetadata(KindID, N); } @@ -795,7 +809,7 @@ void LLVMAddNamedMetadataOperand(LLVMMod return; if (!Val) return; - N->addOperand(cast(unwrap(Val)->getMetadata())); + N->addOperand(extractMDNode(unwrap(Val))); } /*--.. Operations on scalar constants ......................................--*/ Modified: vendor/llvm/dist/lib/IR/LegacyPassManager.cpp ============================================================================== --- vendor/llvm/dist/lib/IR/LegacyPassManager.cpp Sat Jan 31 19:18:09 2015 (r277991) +++ vendor/llvm/dist/lib/IR/LegacyPassManager.cpp Sat Jan 31 19:27:28 2015 (r277992) @@ -600,8 +600,7 @@ void PMTopLevelManager::schedulePass(Pas // If P is an analysis pass and it is available then do not // generate the analysis again. Stale analysis info should not be // available at this point. - const PassInfo *PI = - PassRegistry::getPassRegistry()->getPassInfo(P->getPassID()); + const PassInfo *PI = findAnalysisPassInfo(P->getPassID()); if (PI && PI->isAnalysis() && findAnalysisPass(P->getPassID())) { delete P; return; @@ -619,7 +618,7 @@ void PMTopLevelManager::schedulePass(Pas Pass *AnalysisPass = findAnalysisPass(*I); if (!AnalysisPass) { - const PassInfo *PI = PassRegistry::getPassRegistry()->getPassInfo(*I); + const PassInfo *PI = findAnalysisPassInfo(*I); if (!PI) { // Pass P is not in the global PassRegistry @@ -716,8 +715,7 @@ Pass *PMTopLevelManager::findAnalysisPas return *I; // If Pass not found then check the interfaces implemented by Immutable Pass - const PassInfo *PassInf = - PassRegistry::getPassRegistry()->getPassInfo(PI); + const PassInfo *PassInf = findAnalysisPassInfo(PI); assert(PassInf && "Expected all immutable passes to be initialized"); const std::vector &ImmPI = PassInf->getInterfacesImplemented(); @@ -731,6 +729,17 @@ Pass *PMTopLevelManager::findAnalysisPas return nullptr; } +const PassInfo *PMTopLevelManager::findAnalysisPassInfo(AnalysisID AID) const { + const PassInfo *&PI = AnalysisPassInfos[AID]; + if (!PI) + PI = PassRegistry::getPassRegistry()->getPassInfo(AID); + else + assert(PI == PassRegistry::getPassRegistry()->getPassInfo(AID) && + "The pass info pointer changed for an analysis ID!"); + + return PI; +} + // Print passes managed by this top level manager. void PMTopLevelManager::dumpPasses() const { @@ -759,8 +768,7 @@ void PMTopLevelManager::dumpArguments() dbgs() << "Pass Arguments: "; for (SmallVectorImpl::const_iterator I = ImmutablePasses.begin(), E = ImmutablePasses.end(); I != E; ++I) - if (const PassInfo *PI = - PassRegistry::getPassRegistry()->getPassInfo((*I)->getPassID())) { + if (const PassInfo *PI = findAnalysisPassInfo((*I)->getPassID())) { assert(PI && "Expected all immutable passes to be initialized"); if (!PI->isAnalysisGroup()) dbgs() << " -" << PI->getPassArgument(); @@ -824,7 +832,7 @@ void PMDataManager::recordAvailableAnaly // This pass is the current implementation of all of the interfaces it // implements as well. - const PassInfo *PInf = PassRegistry::getPassRegistry()->getPassInfo(PI); + const PassInfo *PInf = TPM->findAnalysisPassInfo(PI); if (!PInf) return; const std::vector &II = PInf->getInterfacesImplemented(); for (unsigned i = 0, e = II.size(); i != e; ++i) @@ -957,7 +965,7 @@ void PMDataManager::freePass(Pass *P, St } AnalysisID PI = P->getPassID(); - if (const PassInfo *PInf = PassRegistry::getPassRegistry()->getPassInfo(PI)) { + if (const PassInfo *PInf = TPM->findAnalysisPassInfo(PI)) { // Remove the pass itself (if it is not already removed). AvailableAnalysis.erase(PI); @@ -1037,7 +1045,7 @@ void PMDataManager::add(Pass *P, bool Pr for (SmallVectorImpl::iterator I = ReqAnalysisNotAvailable.begin(), E = ReqAnalysisNotAvailable.end() ;I != E; ++I) { - const PassInfo *PI = PassRegistry::getPassRegistry()->getPassInfo(*I); + const PassInfo *PI = TPM->findAnalysisPassInfo(*I); Pass *AnalysisPass = PI->createPass(); this->addLowerLevelRequiredPass(P, AnalysisPass); } @@ -1142,7 +1150,7 @@ void PMDataManager::dumpPassArguments() PMD->dumpPassArguments(); else if (const PassInfo *PI = - PassRegistry::getPassRegistry()->getPassInfo((*I)->getPassID())) + TPM->findAnalysisPassInfo((*I)->getPassID())) if (!PI->isAnalysisGroup()) dbgs() << " -" << PI->getPassArgument(); } @@ -1218,7 +1226,7 @@ void PMDataManager::dumpAnalysisUsage(St dbgs() << (const void*)P << std::string(getDepth()*2+3, ' ') << Msg << " Analyses:"; for (unsigned i = 0; i != Set.size(); ++i) { if (i) dbgs() << ','; - const PassInfo *PInf = PassRegistry::getPassRegistry()->getPassInfo(Set[i]); + const PassInfo *PInf = TPM->findAnalysisPassInfo(Set[i]); if (!PInf) { // Some preserved passes, such as AliasAnalysis, may not be initialized by // all drivers. @@ -1658,8 +1666,8 @@ void MPPassManager::addLowerLevelRequire OnTheFlyManagers[P] = FPP; } - const PassInfo * RequiredPassPI = - PassRegistry::getPassRegistry()->getPassInfo(RequiredPass->getPassID()); + const PassInfo *RequiredPassPI = + TPM->findAnalysisPassInfo(RequiredPass->getPassID()); Pass *FoundPass = nullptr; if (RequiredPassPI && RequiredPassPI->isAnalysis()) { Modified: vendor/llvm/dist/lib/MC/ELFObjectWriter.cpp ============================================================================== --- vendor/llvm/dist/lib/MC/ELFObjectWriter.cpp Sat Jan 31 19:18:09 2015 (r277991) +++ vendor/llvm/dist/lib/MC/ELFObjectWriter.cpp Sat Jan 31 19:27:28 2015 (r277992) @@ -219,7 +219,7 @@ class ELFObjectWriter : public MCObjectW const MCSymbolData *SD, uint64_t C, unsigned Type) const; - void RecordRelocation(MCAssembler &Asm, const MCAsmLayout &Layout, + void RecordRelocation(const MCAssembler &Asm, const MCAsmLayout &Layout, const MCFragment *Fragment, const MCFixup &Fixup, MCValue Target, bool &IsPCRel, uint64_t &FixedValue) override; @@ -789,11 +789,13 @@ static const MCSymbol *getWeakRef(const return nullptr; } -void ELFObjectWriter::RecordRelocation(MCAssembler &Asm, +void ELFObjectWriter::RecordRelocation(const MCAssembler &Asm, const MCAsmLayout &Layout, const MCFragment *Fragment, - const MCFixup &Fixup, MCValue Target, - bool &IsPCRel, uint64_t &FixedValue) { + const MCFixup &Fixup, + MCValue Target, + bool &IsPCRel, + uint64_t &FixedValue) { const MCSectionData *FixupSection = Fragment->getParent(); uint64_t C = Target.getConstant(); uint64_t FixupOffset = Layout.getFragmentOffset(Fragment) + Fixup.getOffset(); Modified: vendor/llvm/dist/lib/MC/MCAsmInfoDarwin.cpp ============================================================================== --- vendor/llvm/dist/lib/MC/MCAsmInfoDarwin.cpp Sat Jan 31 19:18:09 2015 (r277991) +++ vendor/llvm/dist/lib/MC/MCAsmInfoDarwin.cpp Sat Jan 31 19:27:28 2015 (r277992) @@ -27,7 +27,22 @@ bool MCAsmInfoDarwin::isSectionAtomizabl // contain. // Sections holding 2 byte strings require symbols in order to be atomized. // There is no dedicated section for 4 byte strings. - if (SMO.getType() == MachO::S_CSTRING_LITERALS) + if (SMO.getKind().isMergeable1ByteCString()) + return false; + + if (SMO.getSegmentName() == "__TEXT" && + SMO.getSectionName() == "__objc_classname" && + SMO.getType() == MachO::S_CSTRING_LITERALS) + return false; + + if (SMO.getSegmentName() == "__TEXT" && + SMO.getSectionName() == "__objc_methname" && + SMO.getType() == MachO::S_CSTRING_LITERALS) + return false; + + if (SMO.getSegmentName() == "__TEXT" && + SMO.getSectionName() == "__objc_methtype" && + SMO.getType() == MachO::S_CSTRING_LITERALS) return false; if (SMO.getSegmentName() == "__DATA" && SMO.getSectionName() == "__cfstring") Modified: vendor/llvm/dist/lib/MC/MCAssembler.cpp ============================================================================== --- vendor/llvm/dist/lib/MC/MCAssembler.cpp Sat Jan 31 19:18:09 2015 (r277991) +++ vendor/llvm/dist/lib/MC/MCAssembler.cpp Sat Jan 31 19:27:28 2015 (r277992) @@ -425,16 +425,6 @@ bool MCAssembler::isThumbFunc(const MCSy return true; } -void MCAssembler::addLocalUsedInReloc(const MCSymbol &Sym) { - assert(Sym.isTemporary()); - LocalsUsedInReloc.insert(&Sym); -} - -bool MCAssembler::isLocalUsedInReloc(const MCSymbol &Sym) const { - assert(Sym.isTemporary()); - return LocalsUsedInReloc.count(&Sym); -} - bool MCAssembler::isSymbolLinkerVisible(const MCSymbol &Symbol) const { // Non-temporary labels should always be visible to the linker. if (!Symbol.isTemporary()) @@ -444,10 +434,8 @@ bool MCAssembler::isSymbolLinkerVisible( if (!Symbol.isInSection()) return false; - if (isLocalUsedInReloc(Symbol)) - return true; - - return false; + // Otherwise, check if the section requires symbols even for temporary labels. + return getBackend().doesSectionRequireSymbols(Symbol.getSection()); } const MCSymbolData *MCAssembler::getAtom(const MCSymbolData *SD) const { Modified: vendor/llvm/dist/lib/MC/MachObjectWriter.cpp ============================================================================== --- vendor/llvm/dist/lib/MC/MachObjectWriter.cpp Sat Jan 31 19:18:09 2015 (r277991) +++ vendor/llvm/dist/lib/MC/MachObjectWriter.cpp Sat Jan 31 19:27:28 2015 (r277992) @@ -448,11 +448,14 @@ void MachObjectWriter::WriteLinkerOption assert(OS.tell() - Start == Size); } -void MachObjectWriter::RecordRelocation(MCAssembler &Asm, + +void MachObjectWriter::RecordRelocation(const MCAssembler &Asm, const MCAsmLayout &Layout, const MCFragment *Fragment, - const MCFixup &Fixup, MCValue Target, - bool &IsPCRel, uint64_t &FixedValue) { + const MCFixup &Fixup, + MCValue Target, + bool &IsPCRel, + uint64_t &FixedValue) { TargetObjectWriter->RecordRelocation(this, Asm, Layout, Fragment, Fixup, Target, FixedValue); } @@ -613,22 +616,6 @@ void MachObjectWriter::ComputeSymbolTabl ExternalSymbolData[i].SymbolData->setIndex(Index++); for (unsigned i = 0, e = UndefinedSymbolData.size(); i != e; ++i) UndefinedSymbolData[i].SymbolData->setIndex(Index++); - - for (const MCSectionData &SD : Asm) { - std::vector &Relocs = Relocations[&SD]; - for (RelAndSymbol &Rel : Relocs) { - if (!Rel.Sym) - continue; - - // Set the Index and the IsExtern bit. - unsigned Index = Rel.Sym->getIndex(); - assert(isInt<24>(Index)); - if (IsLittleEndian) - Rel.MRE.r_word1 = (Rel.MRE.r_word1 & (-1 << 24)) | Index | (1 << 27); - else - Rel.MRE.r_word1 = (Rel.MRE.r_word1 & 0xff) | Index << 8 | (1 << 4); - } - } } void MachObjectWriter::computeSectionAddresses(const MCAssembler &Asm, @@ -675,6 +662,10 @@ void MachObjectWriter::ExecutePostLayout // Mark symbol difference expressions in variables (from .set or = directives) // as absolute. markAbsoluteVariableSymbols(Asm, Layout); + + // Compute symbol table information and bind symbol indices. + ComputeSymbolTable(Asm, LocalSymbolData, ExternalSymbolData, + UndefinedSymbolData); } bool MachObjectWriter:: @@ -758,10 +749,6 @@ IsSymbolRefDifferenceFullyResolvedImpl(c void MachObjectWriter::WriteObject(MCAssembler &Asm, const MCAsmLayout &Layout) { - // Compute symbol table information and bind symbol indices. - ComputeSymbolTable(Asm, LocalSymbolData, ExternalSymbolData, - UndefinedSymbolData); - unsigned NumSections = Asm.size(); const MCAssembler::VersionMinInfoType &VersionInfo = Layout.getAssembler().getVersionMinInfo(); @@ -852,7 +839,7 @@ void MachObjectWriter::WriteObject(MCAss uint64_t RelocTableEnd = SectionDataStart + SectionDataFileSize; for (MCAssembler::const_iterator it = Asm.begin(), ie = Asm.end(); it != ie; ++it) { - std::vector &Relocs = Relocations[it]; + std::vector &Relocs = Relocations[it]; unsigned NumRelocs = Relocs.size(); uint64_t SectionStart = SectionDataStart + getSectionAddress(it); WriteSection(Asm, Layout, *it, SectionStart, RelocTableEnd, NumRelocs); @@ -946,10 +933,10 @@ void MachObjectWriter::WriteObject(MCAss ie = Asm.end(); it != ie; ++it) { // Write the section relocation entries, in reverse order to match 'as' // (approximately, the exact algorithm is more complicated than this). - std::vector &Relocs = Relocations[it]; + std::vector &Relocs = Relocations[it]; for (unsigned i = 0, e = Relocs.size(); i != e; ++i) { - Write32(Relocs[e - i - 1].MRE.r_word0); - Write32(Relocs[e - i - 1].MRE.r_word1); + Write32(Relocs[e - i - 1].r_word0); + Write32(Relocs[e - i - 1].r_word1); } } Modified: vendor/llvm/dist/lib/MC/WinCOFFObjectWriter.cpp ============================================================================== --- vendor/llvm/dist/lib/MC/WinCOFFObjectWriter.cpp Sat Jan 31 19:18:09 2015 (r277991) +++ vendor/llvm/dist/lib/MC/WinCOFFObjectWriter.cpp Sat Jan 31 19:27:28 2015 (r277992) @@ -175,7 +175,7 @@ public: const MCFragment &FB, bool InSet, bool IsPCRel) const override; - void RecordRelocation(MCAssembler &Asm, const MCAsmLayout &Layout, + void RecordRelocation(const MCAssembler &Asm, const MCAsmLayout &Layout, const MCFragment *Fragment, const MCFixup &Fixup, MCValue Target, bool &IsPCRel, uint64_t &FixedValue) override; @@ -661,9 +661,13 @@ bool WinCOFFObjectWriter::IsSymbolRefDif InSet, IsPCRel); } -void WinCOFFObjectWriter::RecordRelocation( - MCAssembler &Asm, const MCAsmLayout &Layout, const MCFragment *Fragment, - const MCFixup &Fixup, MCValue Target, bool &IsPCRel, uint64_t &FixedValue) { +void WinCOFFObjectWriter::RecordRelocation(const MCAssembler &Asm, + const MCAsmLayout &Layout, + const MCFragment *Fragment, + const MCFixup &Fixup, + MCValue Target, + bool &IsPCRel, + uint64_t &FixedValue) { assert(Target.getSymA() && "Relocation must reference a symbol!"); const MCSymbol &Symbol = Target.getSymA()->getSymbol(); Modified: vendor/llvm/dist/lib/Support/Triple.cpp ============================================================================== --- vendor/llvm/dist/lib/Support/Triple.cpp Sat Jan 31 19:18:09 2015 (r277991) +++ vendor/llvm/dist/lib/Support/Triple.cpp Sat Jan 31 19:27:28 2015 (r277992) @@ -246,13 +246,21 @@ static Triple::ArchType parseARMArch(Str if (ArchName.startswith("armv")) { offset = 3; - arch = Triple::arm; + if (ArchName.endswith("eb")) { + arch = Triple::armeb; + ArchName = ArchName.substr(0, ArchName.size() - 2); + } else + arch = Triple::arm; } else if (ArchName.startswith("armebv")) { offset = 5; arch = Triple::armeb; } else if (ArchName.startswith("thumbv")) { offset = 5; - arch = Triple::thumb; + if (ArchName.endswith("eb")) { + arch = Triple::thumbeb; + ArchName = ArchName.substr(0, ArchName.size() - 2); + } else + arch = Triple::thumb; } else if (ArchName.startswith("thumbebv")) { offset = 7; arch = Triple::thumbeb; @@ -271,6 +279,8 @@ static Triple::ArchType parseARMArch(Str } static Triple::ArchType parseArch(StringRef ArchName) { + Triple::ArchType ARMArch(parseARMArch(ArchName)); + return StringSwitch(ArchName) .Cases("i386", "i486", "i586", "i686", Triple::x86) // FIXME: Do we need to support these? @@ -280,9 +290,10 @@ static Triple::ArchType parseArch(String .Cases("powerpc64", "ppu", Triple::ppc64) .Case("powerpc64le", Triple::ppc64le) .Case("xscale", Triple::arm) - .StartsWith("arm", parseARMArch(ArchName)) - .StartsWith("thumb", parseARMArch(ArchName)) - .StartsWith("aarch64", parseARMArch(ArchName)) + .Case("xscaleeb", Triple::armeb) + .StartsWith("arm", ARMArch) + .StartsWith("thumb", ARMArch) + .StartsWith("aarch64", ARMArch) .Case("msp430", Triple::msp430) .Cases("mips", "mipseb", "mipsallegrex", Triple::mips) .Cases("mipsel", "mipsallegrexel", Triple::mipsel) @@ -379,6 +390,9 @@ static Triple::ObjectFormatType parseFor } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 19:28:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 482ECAFB; Sat, 31 Jan 2015 19:28:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1AA08BC; Sat, 31 Jan 2015 19:28:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VJSfOR048537; Sat, 31 Jan 2015 19:28:41 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VJSfSq048536; Sat, 31 Jan 2015 19:28:41 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501311928.t0VJSfSq048536@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 31 Jan 2015 19:28:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r277993 - vendor/llvm/llvm-release_360-r227651 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 19:28:42 -0000 Author: dim Date: Sat Jan 31 19:28:41 2015 New Revision: 277993 URL: https://svnweb.freebsd.org/changeset/base/277993 Log: Tag llvm tags/RELEASE_360/rc2 r227651 (effectively, 3.6.0 RC2). Added: vendor/llvm/llvm-release_360-r227651/ - copied from r277992, vendor/llvm/dist/ From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 19:29:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9346CC1B; Sat, 31 Jan 2015 19:29:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7AFF4C0; Sat, 31 Jan 2015 19:29:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VJT7dQ048668; Sat, 31 Jan 2015 19:29:07 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VJT0dO048628; Sat, 31 Jan 2015 19:29:00 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501311929.t0VJT0dO048628@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 31 Jan 2015 19:29:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r277994 - in vendor/clang/dist: docs include/clang/Basic include/clang/Driver include/clang/Sema lib/Basic lib/CodeGen lib/Driver lib/Sema lib/Tooling test/CodeGen test/CodeGenCXX test/... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 19:29:07 -0000 Author: dim Date: Sat Jan 31 19:28:59 2015 New Revision: 277994 URL: https://svnweb.freebsd.org/changeset/base/277994 Log: Vendor import of clang RELEASE_360/rc2 tag r227651 (effectively, 3.6.0 RC2): https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_360/rc2@227651 Added: vendor/clang/dist/test/Driver/aarch64-fixed-x18.c (contents, props changed) vendor/clang/dist/test/Modules/Inputs/System/usr/include/malloc.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/System/usr/include/stdlib.h (contents, props changed) Deleted: vendor/clang/dist/test/Sema/attr-flag-enum.c vendor/clang/dist/test/SemaCXX/attr-flag-enum-reject.cpp Modified: vendor/clang/dist/docs/ReleaseNotes.rst vendor/clang/dist/include/clang/Basic/Attr.td vendor/clang/dist/include/clang/Basic/AttrDocs.td vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/Driver/Options.td vendor/clang/dist/include/clang/Sema/AttributeList.h vendor/clang/dist/include/clang/Sema/Sema.h vendor/clang/dist/include/clang/Sema/SemaInternal.h vendor/clang/dist/lib/Basic/Targets.cpp vendor/clang/dist/lib/CodeGen/CGDecl.cpp vendor/clang/dist/lib/CodeGen/CGDeclCXX.cpp vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp vendor/clang/dist/lib/CodeGen/ItaniumCXXABI.cpp vendor/clang/dist/lib/CodeGen/MicrosoftCXXABI.cpp vendor/clang/dist/lib/Driver/Tools.cpp vendor/clang/dist/lib/Driver/Tools.h vendor/clang/dist/lib/Sema/SemaChecking.cpp vendor/clang/dist/lib/Sema/SemaDecl.cpp vendor/clang/dist/lib/Sema/SemaDeclAttr.cpp vendor/clang/dist/lib/Sema/SemaExpr.cpp vendor/clang/dist/lib/Sema/SemaExprCXX.cpp vendor/clang/dist/lib/Sema/SemaLookup.cpp vendor/clang/dist/lib/Sema/SemaStmt.cpp vendor/clang/dist/lib/Sema/SemaStmtAsm.cpp vendor/clang/dist/lib/Tooling/ArgumentsAdjusters.cpp vendor/clang/dist/test/CodeGen/ms-declspecs.c vendor/clang/dist/test/CodeGenCXX/cxx11-exception-spec.cpp vendor/clang/dist/test/CodeGenCXX/dllexport-members.cpp vendor/clang/dist/test/CodeGenCXX/dllexport.cpp vendor/clang/dist/test/CodeGenCXX/dllimport.cpp vendor/clang/dist/test/CodeGenCXX/microsoft-abi-virtual-member-pointers.cpp vendor/clang/dist/test/CodeGenCXX/ms-integer-static-data-members-exported.cpp vendor/clang/dist/test/CodeGenCXX/ms-integer-static-data-members.cpp vendor/clang/dist/test/CodeGenCXX/split-stacks.cpp vendor/clang/dist/test/CodeGenCXX/static-init.cpp vendor/clang/dist/test/Driver/linux-ld.c vendor/clang/dist/test/Driver/netbsd.c vendor/clang/dist/test/FixIt/typo-location-bugs.cpp vendor/clang/dist/test/Modules/compiler_builtins.m vendor/clang/dist/test/Preprocessor/init.c vendor/clang/dist/test/Preprocessor/stdint.c vendor/clang/dist/test/Sema/atomic-ops.c vendor/clang/dist/test/Sema/inline-asm-validate-x86.c vendor/clang/dist/test/Sema/typo-correction.c vendor/clang/dist/test/SemaCXX/typo-correction-delayed.cpp vendor/clang/dist/utils/TableGen/ClangAttrEmitter.cpp Modified: vendor/clang/dist/docs/ReleaseNotes.rst ============================================================================== --- vendor/clang/dist/docs/ReleaseNotes.rst Sat Jan 31 19:28:41 2015 (r277993) +++ vendor/clang/dist/docs/ReleaseNotes.rst Sat Jan 31 19:28:59 2015 (r277994) @@ -12,7 +12,7 @@ Written by the `LLVM Team `_. + `_. Introduction ============ @@ -53,9 +53,11 @@ Major New Features __has_declspec_attribute, this allows for more precise coverage of attribute syntax querying. +- clang-format now supports formatting Java code. + Improvements to Clang's diagnostics -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +----------------------------------- Clang's diagnostics are constantly being improved to catch more issues, explain them more clearly, and provide more accurate source information @@ -68,6 +70,21 @@ New Compiler Flags The option .... +The __EXCEPTIONS macro +---------------------- +``__EXCEPTIONS`` is now defined when landing pads are emitted, not when c++ exceptions are enabled. The two can be different in Objective-C files: If C++ exceptions are disabled but Objective-C exceptions are enabled, landing pads will be emitted. Clang 3.6 is switching the behavior of ``__EXCEPTIONS``. Clang 3.5 confusingly changed the behavior of ``has_feature(cxx_exceptions)``, which used to be set if landing pads were emitted, but is now set if C++ exceptions are enabled. So there are 3 cases: + +Clang before 3.5: + ``__EXCEPTIONS`` is set if C++ exceptions are enabled, ``cxx_exceptions`` enabled if C++ or ObjC exceptions are enabled + +Clang 3.5: + ``__EXCEPTIONS`` is set if C++ exceptions are enabled, ``cxx_exceptions`` enabled if C++ exceptions are enabled + +Clang 3.6: + ``__EXCEPTIONS`` is set if C++ or ObjC exceptions are enabled, ``cxx_exceptions`` enabled if C++ exceptions are enabled + +To reliably test if C++ exceptions are enabled, use ``__EXCEPTIONS && __has_feature(cxx_exceptions)``, else things won't work in all versions of clang in Objective-C++ files. + New Pragmas in Clang ----------------------- @@ -77,7 +94,9 @@ Clang now supports the ... Windows Support --------------- -Clang's support for building native Windows programs ... +- Many, many bug fixes + +- Basic support for DWARF debug information in COFF files C Language Changes in Clang @@ -93,7 +112,11 @@ C11 Feature Support C++ Language Changes in Clang ----------------------------- -- ... +- Clang now supports putting identical constructors and destructors in + the C5/D5 comdat, reducing code duplication. + +- Clang will put individual ``.init_array/.ctors`` sections in + comdats, reducing code duplication and speeding up startup. C++11 Feature Support ^^^^^^^^^^^^^^^^^^^^^ Modified: vendor/clang/dist/include/clang/Basic/Attr.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/Attr.td Sat Jan 31 19:28:41 2015 (r277993) +++ vendor/clang/dist/include/clang/Basic/Attr.td Sat Jan 31 19:28:59 2015 (r277994) @@ -224,14 +224,12 @@ class SubjectList subj string CustomDiag = customDiag; } -class LangOpt { +class LangOpt { string Name = name; - bit Negated = negated; } def MicrosoftExt : LangOpt<"MicrosoftExt">; def Borland : LangOpt<"Borland">; def CUDA : LangOpt<"CUDA">; -def COnly : LangOpt<"CPlusPlus", 1>; // Defines targets for target-specific attributes. The list of strings should // specify architectures for which the target applies, based off the ArchType @@ -709,25 +707,6 @@ def MinSize : InheritableAttr { let Documentation = [Undocumented]; } -def FlagEnum : InheritableAttr { - let Spellings = [GNU<"flag_enum">]; - let Subjects = SubjectList<[Enum]>; - let Documentation = [FlagEnumDocs]; - let LangOpts = [COnly]; - let AdditionalMembers = [{ -private: - llvm::APInt FlagBits; -public: - llvm::APInt &getFlagBits() { - return FlagBits; - } - - const llvm::APInt &getFlagBits() const { - return FlagBits; - } -}]; -} - def Flatten : InheritableAttr { let Spellings = [GCC<"flatten">]; let Subjects = SubjectList<[Function], ErrorDiag>; Modified: vendor/clang/dist/include/clang/Basic/AttrDocs.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/AttrDocs.td Sat Jan 31 19:28:41 2015 (r277993) +++ vendor/clang/dist/include/clang/Basic/AttrDocs.td Sat Jan 31 19:28:59 2015 (r277994) @@ -1196,16 +1196,6 @@ behavior of the program is undefined. }]; } -def FlagEnumDocs : Documentation { - let Category = DocCatType; - let Content = [{ -This attribute can be added to an enumerator to signal to the compiler that it -is intended to be used as a flag type. This will cause the compiler to assume -that the range of the type includes all of the values that you can get by -manipulating bits of the enumerator when issuing warnings. - }]; -} - def MSInheritanceDocs : Documentation { let Category = DocCatType; let Heading = "__single_inhertiance, __multiple_inheritance, __virtual_inheritance"; Modified: vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td Sat Jan 31 19:28:41 2015 (r277993) +++ vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td Sat Jan 31 19:28:59 2015 (r277994) @@ -190,7 +190,6 @@ def OverloadedShiftOpParentheses: DiagGr def DanglingElse: DiagGroup<"dangling-else">; def DanglingField : DiagGroup<"dangling-field">; def DistributedObjectModifiers : DiagGroup<"distributed-object-modifiers">; -def FlagEnum : DiagGroup<"flag-enum">; def InfiniteRecursion : DiagGroup<"infinite-recursion">; def GNUImaginaryConstant : DiagGroup<"gnu-imaginary-constant">; def IgnoredQualifiers : DiagGroup<"ignored-qualifiers">; Modified: vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Sat Jan 31 19:28:41 2015 (r277993) +++ vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Sat Jan 31 19:28:59 2015 (r277994) @@ -2236,7 +2236,7 @@ def warn_attribute_wrong_decl_type : War "%0 attribute only applies to %select{functions|unions|" "variables and functions|functions and methods|parameters|" "functions, methods and blocks|functions, methods, and classes|" - "functions, methods, and parameters|classes|enums|variables|methods|" + "functions, methods, and parameters|classes|variables|methods|" "variables, functions and labels|fields and global variables|structs|" "variables and typedefs|thread-local variables|" "variables and fields|variables, data members and tag types|" @@ -4059,9 +4059,6 @@ def ext_enum_too_large : ExtWarn< def ext_enumerator_increment_too_large : ExtWarn< "incremented enumerator value %0 is not representable in the " "largest integer type">, InGroup; -def warn_flag_enum_constant_out_of_range : Warning< - "enumeration value %0 is out of range of flags in enumeration type %1">, - InGroup; def warn_illegal_constant_array_size : Extension< "size of static array must be an integer constant expression">; @@ -6162,6 +6159,8 @@ let CategoryName = "Inline Assembly Issu "invalid lvalue in asm input for constraint '%0'">; def err_asm_invalid_input_constraint : Error< "invalid input constraint '%0' in asm">; + def err_asm_immediate_expected : Error<"constraint '%0' expects " + "an integer constant expression">; def err_asm_invalid_type_in_input : Error< "invalid type %0 in asm input for constraint '%1'">; def err_asm_tying_incompatible_types : Error< Modified: vendor/clang/dist/include/clang/Driver/Options.td ============================================================================== --- vendor/clang/dist/include/clang/Driver/Options.td Sat Jan 31 19:28:41 2015 (r277993) +++ vendor/clang/dist/include/clang/Driver/Options.td Sat Jan 31 19:28:59 2015 (r277994) @@ -1209,6 +1209,8 @@ def mfix_cortex_a53_835769 : Flag<["-"], def mno_fix_cortex_a53_835769 : Flag<["-"], "mno-fix-cortex-a53-835769">, Group, HelpText<"Don't workaround Cortex-A53 erratum 835769 (AArch64 only)">; +def ffixed_x18 : Flag<["-"], "ffixed-x18">, Group, + HelpText<"Reserve the x18 register (AArch64 only)">; def mvsx : Flag<["-"], "mvsx">, Group; def mno_vsx : Flag<["-"], "mno-vsx">, Group; Modified: vendor/clang/dist/include/clang/Sema/AttributeList.h ============================================================================== --- vendor/clang/dist/include/clang/Sema/AttributeList.h Sat Jan 31 19:28:41 2015 (r277993) +++ vendor/clang/dist/include/clang/Sema/AttributeList.h Sat Jan 31 19:28:59 2015 (r277994) @@ -822,7 +822,6 @@ enum AttributeDeclKind { ExpectedFunctionMethodOrClass, ExpectedFunctionMethodOrParameter, ExpectedClass, - ExpectedEnum, ExpectedVariable, ExpectedMethod, ExpectedVariableFunctionOrLabel, Modified: vendor/clang/dist/include/clang/Sema/Sema.h ============================================================================== --- vendor/clang/dist/include/clang/Sema/Sema.h Sat Jan 31 19:28:41 2015 (r277993) +++ vendor/clang/dist/include/clang/Sema/Sema.h Sat Jan 31 19:28:59 2015 (r277994) @@ -7971,12 +7971,6 @@ public: Expr *SrcExpr, AssignmentAction Action, bool *Complained = nullptr); - /// IsValueInFlagEnum - Determine if a value is allowed as part of a flag - /// enum. If AllowMask is true, then we also allow the complement of a valid - /// value, to be used as a mask. - bool IsValueInFlagEnum(const EnumDecl *ED, const llvm::APInt &Val, - bool AllowMask) const; - /// DiagnoseAssignmentEnum - Warn if assignment to enum is a constant /// integer not in the range of enum values. void DiagnoseAssignmentEnum(QualType DstType, QualType SrcType, Modified: vendor/clang/dist/include/clang/Sema/SemaInternal.h ============================================================================== --- vendor/clang/dist/include/clang/Sema/SemaInternal.h Sat Jan 31 19:28:41 2015 (r277993) +++ vendor/clang/dist/include/clang/Sema/SemaInternal.h Sat Jan 31 19:28:59 2015 (r277994) @@ -101,7 +101,7 @@ public: DeclContext *MemberContext, bool EnteringContext) : Typo(TypoName.getName().getAsIdentifierInfo()), CurrentTCIndex(0), - SemaRef(SemaRef), S(S), + SavedTCIndex(0), SemaRef(SemaRef), S(S), SS(SS ? llvm::make_unique(*SS) : nullptr), CorrectionValidator(std::move(CCC)), MemberContext(MemberContext), Result(SemaRef, TypoName, LookupKind), @@ -187,6 +187,17 @@ public: CurrentTCIndex >= ValidatedCorrections.size(); } + /// \brief Save the current position in the correction stream (overwriting any + /// previously saved position). + void saveCurrentPosition() { + SavedTCIndex = CurrentTCIndex; + } + + /// \brief Restore the saved position in the correction stream. + void restoreSavedPosition() { + CurrentTCIndex = SavedTCIndex; + } + ASTContext &getContext() const { return SemaRef.Context; } const LookupResult &getLookupResult() const { return Result; } @@ -267,6 +278,7 @@ private: SmallVector ValidatedCorrections; size_t CurrentTCIndex; + size_t SavedTCIndex; Sema &SemaRef; Scope *S; Modified: vendor/clang/dist/lib/Basic/Targets.cpp ============================================================================== --- vendor/clang/dist/lib/Basic/Targets.cpp Sat Jan 31 19:28:41 2015 (r277993) +++ vendor/clang/dist/lib/Basic/Targets.cpp Sat Jan 31 19:28:59 2015 (r277994) @@ -5901,6 +5901,8 @@ public: : MipsTargetInfoBase(Triple, "o32", "mips32r2") { SizeType = UnsignedInt; PtrDiffType = SignedInt; + Int64Type = SignedLongLong; + IntMaxType = Int64Type; MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 32; } bool setABI(const std::string &Name) override { @@ -5922,6 +5924,8 @@ public: Builder.defineMacro("__mips_isa_rev", "1"); else if (CPUStr == "mips32r2") Builder.defineMacro("__mips_isa_rev", "2"); + else if (CPUStr == "mips32r6") + Builder.defineMacro("__mips_isa_rev", "6"); if (ABI == "o32") { Builder.defineMacro("__mips_o32"); @@ -6028,6 +6032,8 @@ public: PointerWidth = PointerAlign = 64; SizeType = UnsignedLong; PtrDiffType = SignedLong; + Int64Type = SignedLong; + IntMaxType = Int64Type; } void setN32ABITypes() { @@ -6035,6 +6041,8 @@ public: PointerWidth = PointerAlign = 32; SizeType = UnsignedInt; PtrDiffType = SignedInt; + Int64Type = SignedLongLong; + IntMaxType = Int64Type; } bool setABI(const std::string &Name) override { @@ -6065,6 +6073,8 @@ public: Builder.defineMacro("__mips_isa_rev", "1"); else if (CPUStr == "mips64r2") Builder.defineMacro("__mips_isa_rev", "2"); + else if (CPUStr == "mips64r6") + Builder.defineMacro("__mips_isa_rev", "6"); if (ABI == "n32") { Builder.defineMacro("__mips_n32"); Modified: vendor/clang/dist/lib/CodeGen/CGDecl.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGDecl.cpp Sat Jan 31 19:28:41 2015 (r277993) +++ vendor/clang/dist/lib/CodeGen/CGDecl.cpp Sat Jan 31 19:28:59 2015 (r277994) @@ -206,9 +206,6 @@ llvm::Constant *CodeGenModule::getOrCrea GV->setAlignment(getContext().getDeclAlign(&D).getQuantity()); setGlobalVisibility(GV, &D); - if (supportsCOMDAT() && GV->isWeakForLinker()) - GV->setComdat(TheModule.getOrInsertComdat(GV->getName())); - if (D.getTLSKind()) setTLSMode(GV, D); Modified: vendor/clang/dist/lib/CodeGen/CGDeclCXX.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGDeclCXX.cpp Sat Jan 31 19:28:41 2015 (r277993) +++ vendor/clang/dist/lib/CodeGen/CGDeclCXX.cpp Sat Jan 31 19:28:59 2015 (r277994) @@ -267,7 +267,15 @@ void CodeGenModule::EmitPointerToInitFun addUsedGlobal(PtrArray); // If the GV is already in a comdat group, then we have to join it. - if (llvm::Comdat *C = GV->getComdat()) + llvm::Comdat *C = GV->getComdat(); + + // LinkOnce and Weak linkage are lowered down to a single-member comdat group. + // Make an explicit group so we can join it. + if (!C && (GV->hasWeakLinkage() || GV->hasLinkOnceLinkage())) { + C = TheModule.getOrInsertComdat(GV->getName()); + GV->setComdat(C); + } + if (C) PtrArray->setComdat(C); } Modified: vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp Sat Jan 31 19:28:41 2015 (r277993) +++ vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp Sat Jan 31 19:28:59 2015 (r277994) @@ -1928,31 +1928,6 @@ void CodeGenModule::MaybeHandleStaticInE R.first->second = nullptr; } -static bool shouldBeInCOMDAT(CodeGenModule &CGM, const Decl &D) { - if (!CGM.supportsCOMDAT()) - return false; - - if (D.hasAttr()) - return true; - - GVALinkage Linkage; - if (auto *VD = dyn_cast(&D)) - Linkage = CGM.getContext().GetGVALinkageForVariable(VD); - else - Linkage = CGM.getContext().GetGVALinkageForFunction(cast(&D)); - - switch (Linkage) { - case GVA_Internal: - case GVA_AvailableExternally: - case GVA_StrongExternal: - return false; - case GVA_DiscardableODR: - case GVA_StrongODR: - return true; - } - llvm_unreachable("No such linkage"); -} - void CodeGenModule::EmitGlobalVarDefinition(const VarDecl *D) { llvm::Constant *Init = nullptr; QualType ASTTy = D->getType(); @@ -2096,9 +2071,6 @@ void CodeGenModule::EmitGlobalVarDefinit setTLSMode(GV, *D); } - if (shouldBeInCOMDAT(*this, *D)) - GV->setComdat(TheModule.getOrInsertComdat(GV->getName())); - // Emit the initializer function if necessary. if (NeedsGlobalCtor || NeedsGlobalDtor) EmitCXXGlobalVarDeclInitFunc(D, GV, NeedsGlobalCtor); @@ -2433,9 +2405,6 @@ void CodeGenModule::EmitGlobalFunctionDe MaybeHandleStaticInExternC(D, Fn); - if (shouldBeInCOMDAT(*this, *D)) - Fn->setComdat(TheModule.getOrInsertComdat(Fn->getName())); - CodeGenFunction(*this).GenerateCode(D, Fn, FI); setFunctionDefinitionAttributes(D, Fn); Modified: vendor/clang/dist/lib/CodeGen/ItaniumCXXABI.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/ItaniumCXXABI.cpp Sat Jan 31 19:28:41 2015 (r277993) +++ vendor/clang/dist/lib/CodeGen/ItaniumCXXABI.cpp Sat Jan 31 19:28:59 2015 (r277994) @@ -1711,12 +1711,11 @@ void ItaniumCXXABI::EmitGuardedInit(Code // The ABI says: It is suggested that it be emitted in the same COMDAT group // as the associated data object - llvm::Comdat *C = var->getComdat(); - if (!D.isLocalVarDecl() && C) { + if (!D.isLocalVarDecl() && var->isWeakForLinker() && CGM.supportsCOMDAT()) { + llvm::Comdat *C = CGM.getModule().getOrInsertComdat(var->getName()); guard->setComdat(C); + var->setComdat(C); CGF.CurFn->setComdat(C); - } else if (CGM.supportsCOMDAT() && guard->isWeakForLinker()) { - guard->setComdat(CGM.getModule().getOrInsertComdat(guard->getName())); } CGM.setStaticLocalDeclGuardAddress(&D, guard); Modified: vendor/clang/dist/lib/CodeGen/MicrosoftCXXABI.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/MicrosoftCXXABI.cpp Sat Jan 31 19:28:41 2015 (r277993) +++ vendor/clang/dist/lib/CodeGen/MicrosoftCXXABI.cpp Sat Jan 31 19:28:59 2015 (r277994) @@ -1534,6 +1534,12 @@ llvm::Function *MicrosoftCXXABI::EmitVir CGM.SetLLVMFunctionAttributes(MD, FnInfo, ThunkFn); CGM.SetLLVMFunctionAttributesForDefinition(MD, ThunkFn); + // Add the "thunk" attribute so that LLVM knows that the return type is + // meaningless. These thunks can be used to call functions with differing + // return types, and the caller is required to cast the prototype + // appropriately to extract the correct value. + ThunkFn->addFnAttr("thunk"); + // These thunks can be compared, so they are not unnamed. ThunkFn->setUnnamedAddr(false); @@ -1829,10 +1835,18 @@ void MicrosoftCXXABI::EmitThreadLocalIni llvm::Function *F = CXXThreadLocalInits[I]; // If the GV is already in a comdat group, then we have to join it. - if (llvm::Comdat *C = GV->getComdat()) + llvm::Comdat *C = GV->getComdat(); + + // LinkOnce and Weak linkage are lowered down to a single-member comdat + // group. + // Make an explicit group so we can join it. + if (!C && (GV->hasWeakLinkage() || GV->hasLinkOnceLinkage())) { + C = CGM.getModule().getOrInsertComdat(GV->getName()); + GV->setComdat(C); AddToXDU(F)->setComdat(C); - else + } else { NonComdatInits.push_back(F); + } } if (!NonComdatInits.empty()) { Modified: vendor/clang/dist/lib/Driver/Tools.cpp ============================================================================== --- vendor/clang/dist/lib/Driver/Tools.cpp Sat Jan 31 19:28:41 2015 (r277993) +++ vendor/clang/dist/lib/Driver/Tools.cpp Sat Jan 31 19:28:59 2015 (r277994) @@ -958,6 +958,11 @@ void Clang::AddAArch64TargetArgs(const A if (A->getOption().matches(options::OPT_mno_global_merge)) CmdArgs.push_back("-mno-global-merge"); } + + if (Args.hasArg(options::OPT_ffixed_x18)) { + CmdArgs.push_back("-backend-option"); + CmdArgs.push_back("-aarch64-reserve-x18"); + } } // Get CPU and ABI names. They are not independent @@ -5418,6 +5423,20 @@ const char *arm::getLLVMArchSuffixForARM .Default(""); } +void arm::appendEBLinkFlags(const ArgList &Args, ArgStringList &CmdArgs, const llvm::Triple &Triple) { + if (Args.hasArg(options::OPT_r)) + return; + + StringRef Suffix = getLLVMArchSuffixForARM(getARMCPUForMArch(Args, Triple)); + const char *LinkFlag = llvm::StringSwitch(Suffix) + .Cases("v4", "v4t", "v5", "v5e", nullptr) + .Cases("v6", "v6t2", nullptr) + .Default("--be8"); + + if (LinkFlag) + CmdArgs.push_back(LinkFlag); +} + bool mips::hasMipsAbiArg(const ArgList &Args, const char *Value) { Arg *A = Args.getLastArg(options::OPT_mabi_EQ); return A && (A->getValue() == StringRef(Value)); @@ -6881,6 +6900,7 @@ void netbsd::Link::ConstructJob(Compilat break; case llvm::Triple::armeb: case llvm::Triple::thumbeb: + arm::appendEBLinkFlags(Args, CmdArgs, getToolChain().getTriple()); CmdArgs.push_back("-m"); switch (getToolChain().getTriple().getEnvironment()) { case llvm::Triple::EABI: @@ -7431,6 +7451,10 @@ void gnutools::Link::ConstructJob(Compil if (Args.hasArg(options::OPT_s)) CmdArgs.push_back("-s"); + if (ToolChain.getArch() == llvm::Triple::armeb || + ToolChain.getArch() == llvm::Triple::thumbeb) + arm::appendEBLinkFlags(Args, CmdArgs, getToolChain().getTriple()); + for (const auto &Opt : ToolChain.ExtraOpts) CmdArgs.push_back(Opt.c_str()); Modified: vendor/clang/dist/lib/Driver/Tools.h ============================================================================== --- vendor/clang/dist/lib/Driver/Tools.h Sat Jan 31 19:28:41 2015 (r277993) +++ vendor/clang/dist/lib/Driver/Tools.h Sat Jan 31 19:28:59 2015 (r277994) @@ -228,6 +228,8 @@ namespace arm { const char* getARMCPUForMArch(const llvm::opt::ArgList &Args, const llvm::Triple &Triple); const char* getLLVMArchSuffixForARM(StringRef CPU); + + void appendEBLinkFlags(const llvm::opt::ArgList &Args, ArgStringList &CmdArgs, const llvm::Triple &Triple); } namespace mips { Modified: vendor/clang/dist/lib/Sema/SemaChecking.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaChecking.cpp Sat Jan 31 19:28:41 2015 (r277993) +++ vendor/clang/dist/lib/Sema/SemaChecking.cpp Sat Jan 31 19:28:59 2015 (r277994) @@ -1340,6 +1340,11 @@ ExprResult Sema::SemaAtomicOpsOverloaded << IsC11 << Ptr->getType() << Ptr->getSourceRange(); return ExprError(); } + if (IsC11 && ValType->isPointerType() && + RequireCompleteType(Ptr->getLocStart(), ValType->getPointeeType(), + diag::err_incomplete_type)) { + return ExprError(); + } } else if (IsN && !ValType->isIntegerType() && !ValType->isPointerType()) { // For __atomic_*_n operations, the value type must be a scalar integral or // pointer type which is 1, 2, 4, 8 or 16 bytes in length. Modified: vendor/clang/dist/lib/Sema/SemaDecl.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaDecl.cpp Sat Jan 31 19:28:41 2015 (r277993) +++ vendor/clang/dist/lib/Sema/SemaDecl.cpp Sat Jan 31 19:28:59 2015 (r277994) @@ -8828,11 +8828,12 @@ void Sema::AddInitializerToDecl(Decl *Re }); if (Res.isInvalid()) { VDecl->setInvalidDecl(); - return; - } - if (Res.get() != Args[Idx]) + } else if (Res.get() != Args[Idx]) { Args[Idx] = Res.get(); + } } + if (VDecl->isInvalidDecl()) + return; InitializationSequence InitSeq(*this, Entity, Kind, Args); ExprResult Result = InitSeq.Perform(*this, Entity, Kind, Args, &DclT); @@ -13519,49 +13520,6 @@ static void CheckForDuplicateEnumValues( } } -bool -Sema::IsValueInFlagEnum(const EnumDecl *ED, const llvm::APInt &Val, - bool AllowMask) const { - FlagEnumAttr *FEAttr = ED->getAttr(); - assert(FEAttr && "looking for value in non-flag enum"); - - llvm::APInt FlagMask = ~FEAttr->getFlagBits(); - unsigned Width = FlagMask.getBitWidth(); - - // We will try a zero-extended value for the regular check first. - llvm::APInt ExtVal = Val.zextOrSelf(Width); - - // A value is in a flag enum if either its bits are a subset of the enum's - // flag bits (the first condition) or we are allowing masks and the same is - // true of its complement (the second condition). When masks are allowed, we - // allow the common idiom of ~(enum1 | enum2) to be a valid enum value. - // - // While it's true that any value could be used as a mask, the assumption is - // that a mask will have all of the insignificant bits set. Anything else is - // likely a logic error. - if (!(FlagMask & ExtVal)) - return true; - - if (AllowMask) { - // Try a one-extended value instead. This can happen if the enum is wider - // than the constant used, in C with extensions to allow for wider enums. - // The mask will still have the correct behaviour, so we give the user the - // benefit of the doubt. - // - // FIXME: This heuristic can cause weird results if the enum was extended - // to a larger type and is signed, because then bit-masks of smaller types - // that get extended will fall out of range (e.g. ~0x1u). We currently don't - // detect that case and will get a false positive for it. In most cases, - // though, it can be fixed by making it a signed type (e.g. ~0x1), so it may - // be fine just to accept this as a warning. - ExtVal |= llvm::APInt::getHighBitsSet(Width, Width - Val.getBitWidth()); - if (!(FlagMask & ~ExtVal)) - return true; - } - - return false; -} - void Sema::ActOnEnumBody(SourceLocation EnumLoc, SourceLocation LBraceLoc, SourceLocation RBraceLoc, Decl *EnumDeclX, ArrayRef Elements, @@ -13647,8 +13605,10 @@ void Sema::ActOnEnumBody(SourceLocation BestPromotionType = Context.getPromotedIntegerType(BestType); else BestPromotionType = BestType; - - BestWidth = Context.getIntWidth(BestType); + // We don't need to set BestWidth, because BestType is going to be the type + // of the enumerators, but we do anyway because otherwise some compilers + // warn that it might be used uninitialized. + BestWidth = CharWidth; } else if (NumNegativeBits) { // If there is a negative value, figure out the smallest integer type (of @@ -13713,15 +13673,10 @@ void Sema::ActOnEnumBody(SourceLocation } } - FlagEnumAttr *FEAttr = Enum->getAttr(); - if (FEAttr) - FEAttr->getFlagBits() = llvm::APInt(BestWidth, 0); - // Loop over all of the enumerator constants, changing their types to match - // the type of the enum if needed. If we have a flag type, we also prepare the - // FlagBits cache. - for (auto *D : Elements) { - auto *ECD = cast_or_null(D); + // the type of the enum if needed. + for (unsigned i = 0, e = Elements.size(); i != e; ++i) { + EnumConstantDecl *ECD = cast_or_null(Elements[i]); if (!ECD) continue; // Already issued a diagnostic. // Standard C says the enumerators have int type, but we allow, as an @@ -13751,7 +13706,7 @@ void Sema::ActOnEnumBody(SourceLocation // enum-specifier, each enumerator has the type of its // enumeration. ECD->setType(EnumType); - goto flagbits; + continue; } else { NewTy = BestType; NewWidth = BestWidth; @@ -13778,32 +13733,8 @@ void Sema::ActOnEnumBody(SourceLocation ECD->setType(EnumType); else ECD->setType(NewTy); - -flagbits: - // Check to see if we have a constant with exactly one bit set. Note that x - // & (x - 1) will be nonzero if and only if x has more than one bit set. - if (FEAttr) { - llvm::APInt ExtVal = InitVal.zextOrSelf(BestWidth); - if (ExtVal != 0 && !(ExtVal & (ExtVal - 1))) { - FEAttr->getFlagBits() |= ExtVal; - } - } - } - - if (FEAttr) { - for (Decl *D : Elements) { - EnumConstantDecl *ECD = cast_or_null(D); - if (!ECD) continue; // Already issued a diagnostic. - - llvm::APSInt InitVal = ECD->getInitVal(); - if (InitVal != 0 && !IsValueInFlagEnum(Enum, InitVal, true)) - Diag(ECD->getLocation(), diag::warn_flag_enum_constant_out_of_range) - << ECD << Enum; - } } - - Enum->completeDefinition(BestType, BestPromotionType, NumPositiveBits, NumNegativeBits); Modified: vendor/clang/dist/lib/Sema/SemaDeclAttr.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaDeclAttr.cpp Sat Jan 31 19:28:41 2015 (r277993) +++ vendor/clang/dist/lib/Sema/SemaDeclAttr.cpp Sat Jan 31 19:28:59 2015 (r277994) @@ -4395,9 +4395,6 @@ static void ProcessDeclAttribute(Sema &S case AttributeList::AT_OptimizeNone: handleOptimizeNoneAttr(S, D, Attr); break; - case AttributeList::AT_FlagEnum: - handleSimpleAttribute(S, D, Attr); - break; case AttributeList::AT_Flatten: handleSimpleAttribute(S, D, Attr); break; Modified: vendor/clang/dist/lib/Sema/SemaExpr.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaExpr.cpp Sat Jan 31 19:28:41 2015 (r277993) +++ vendor/clang/dist/lib/Sema/SemaExpr.cpp Sat Jan 31 19:28:59 2015 (r277994) @@ -4762,12 +4762,8 @@ Sema::BuildResolvedCallExpr(Expr *Fn, Na VK_RValue, RParenLoc); // Bail out early if calling a builtin with custom typechecking. - if (BuiltinID && Context.BuiltinInfo.hasCustomTypechecking(BuiltinID)) { - ExprResult Res = CorrectDelayedTyposInExpr(TheCall); - if (!Res.isUsable() || !isa(Res.get())) - return Res; - return CheckBuiltinFunctionCall(FDecl, BuiltinID, cast(Res.get())); - } + if (BuiltinID && Context.BuiltinInfo.hasCustomTypechecking(BuiltinID)) + return CheckBuiltinFunctionCall(FDecl, BuiltinID, TheCall); retry: const FunctionType *FuncT; @@ -5785,15 +5781,6 @@ QualType Sema::CheckConditionalOperands( ExprObjectKind &OK, SourceLocation QuestionLoc) { - if (!getLangOpts().CPlusPlus) { - // C cannot handle TypoExpr nodes on either side of a binop because it - // doesn't handle dependent types properly, so make sure any TypoExprs have - // been dealt with before checking the operands. - ExprResult CondResult = CorrectDelayedTyposInExpr(Cond); - if (!CondResult.isUsable()) return QualType(); - Cond = CondResult; - } - ExprResult LHSResult = CheckPlaceholderExpr(LHS.get()); if (!LHSResult.isUsable()) return QualType(); LHS = LHSResult; @@ -6173,6 +6160,15 @@ ExprResult Sema::ActOnConditionalOp(Sour SourceLocation ColonLoc, Expr *CondExpr, Expr *LHSExpr, Expr *RHSExpr) { + if (!getLangOpts().CPlusPlus) { + // C cannot handle TypoExpr nodes in the condition because it + // doesn't handle dependent types properly, so make sure any TypoExprs have + // been dealt with before checking the operands. + ExprResult CondResult = CorrectDelayedTyposInExpr(CondExpr); + if (!CondResult.isUsable()) return ExprError(); + CondExpr = CondResult.get(); + } + // If this is the gnu "x ?: y" extension, analyze the types as though the LHS // was the condition. OpaqueValueExpr *opaqueValue = nullptr; @@ -9457,6 +9453,18 @@ static void checkObjCPointerIntrospectio } } +static NamedDecl *getDeclFromExpr(Expr *E) { + if (!E) + return nullptr; + if (auto *DRE = dyn_cast(E)) + return DRE->getDecl(); + if (auto *ME = dyn_cast(E)) + return ME->getMemberDecl(); + if (auto *IRE = dyn_cast(E)) + return IRE->getDecl(); + return nullptr; +} + /// CreateBuiltinBinOp - Creates a new built-in binary operation with /// operator @p Opc at location @c TokLoc. This routine only supports /// built-in operations; ActOnBinOp handles overloaded operators. @@ -9494,7 +9502,13 @@ ExprResult Sema::CreateBuiltinBinOp(Sour // doesn't handle dependent types properly, so make sure any TypoExprs have // been dealt with before checking the operands. LHS = CorrectDelayedTyposInExpr(LHSExpr); - RHS = CorrectDelayedTyposInExpr(RHSExpr); + RHS = CorrectDelayedTyposInExpr(RHSExpr, [Opc, LHS](Expr *E) { + if (Opc != BO_Assign) + return ExprResult(E); + // Avoid correcting the RHS to the same Expr as the LHS. + Decl *D = getDeclFromExpr(E); + return (D && D == getDeclFromExpr(LHS.get())) ? ExprError() : E; + }); if (!LHS.isUsable() || !RHS.isUsable()) return ExprError(); } Modified: vendor/clang/dist/lib/Sema/SemaExprCXX.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaExprCXX.cpp Sat Jan 31 19:28:41 2015 (r277993) +++ vendor/clang/dist/lib/Sema/SemaExprCXX.cpp Sat Jan 31 19:28:59 2015 (r277994) @@ -6143,12 +6143,6 @@ public: ExprResult TransformLambdaExpr(LambdaExpr *E) { return Owned(E); } - ExprResult TransformOpaqueValueExpr(OpaqueValueExpr *E) { - if (Expr *SE = E->getSourceExpr()) - return TransformExpr(SE); - return BaseTransform::TransformOpaqueValueExpr(E); - } - ExprResult Transform(Expr *E) { ExprResult Res; while (true) { @@ -6168,15 +6162,18 @@ public: while (!AmbiguousTypoExprs.empty()) { auto TE = AmbiguousTypoExprs.back(); auto Cached = TransformCache[TE]; - AmbiguousTypoExprs.pop_back(); + auto &State = SemaRef.getTypoExprState(TE); + State.Consumer->saveCurrentPosition(); TransformCache.erase(TE); if (!TryTransform(E).isInvalid()) { - SemaRef.getTypoExprState(TE).Consumer->resetCorrectionStream(); + State.Consumer->resetCorrectionStream(); TransformCache.erase(TE); Res = ExprError(); break; - } else - TransformCache[TE] = Cached; + } + AmbiguousTypoExprs.remove(TE); + State.Consumer->restoreSavedPosition(); + TransformCache[TE] = Cached; } // Ensure that all of the TypoExprs within the current Expr have been found. @@ -6235,8 +6232,12 @@ ExprResult Sema::CorrectDelayedTyposInEx if (E && !ExprEvalContexts.empty() && ExprEvalContexts.back().NumTypos && (E->isTypeDependent() || E->isValueDependent() || E->isInstantiationDependent())) { + auto TyposInContext = ExprEvalContexts.back().NumTypos; + assert(TyposInContext < ~0U && "Recursive call of CorrectDelayedTyposInExpr"); + ExprEvalContexts.back().NumTypos = ~0U; auto TyposResolved = DelayedTypos.size(); auto Result = TransformTypos(*this, Filter).Transform(E); + ExprEvalContexts.back().NumTypos = TyposInContext; TyposResolved -= DelayedTypos.size(); if (Result.isInvalid() || Result.get() != E) { ExprEvalContexts.back().NumTypos -= TyposResolved; Modified: vendor/clang/dist/lib/Sema/SemaLookup.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaLookup.cpp Sat Jan 31 19:28:41 2015 (r277993) +++ vendor/clang/dist/lib/Sema/SemaLookup.cpp Sat Jan 31 19:28:59 2015 (r277994) @@ -3587,7 +3587,7 @@ retry_lookup: QualifiedResults.push_back(Candidate); break; } - Candidate.setCorrectionRange(TempSS, Result.getLookupNameInfo()); + Candidate.setCorrectionRange(SS.get(), Result.getLookupNameInfo()); return true; } return false; Modified: vendor/clang/dist/lib/Sema/SemaStmt.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaStmt.cpp Sat Jan 31 19:28:41 2015 (r277993) +++ vendor/clang/dist/lib/Sema/SemaStmt.cpp Sat Jan 31 19:28:59 2015 (r277994) @@ -687,39 +687,26 @@ static void checkCaseValue(Sema &S, Sour } } -typedef SmallVector, 64> EnumValsTy; - /// Returns true if we should emit a diagnostic about this case expression not /// being a part of the enum used in the switch controlling expression. -static bool ShouldDiagnoseSwitchCaseNotInEnum(const Sema &S, +static bool ShouldDiagnoseSwitchCaseNotInEnum(const ASTContext &Ctx, const EnumDecl *ED, - const Expr *CaseExpr, - EnumValsTy::iterator &EI, - EnumValsTy::iterator &EIEnd, - const llvm::APSInt &Val) { - bool FlagType = ED->hasAttr(); - - if (const DeclRefExpr *DRE = - dyn_cast(CaseExpr->IgnoreParenImpCasts())) { + const Expr *CaseExpr) { + // Don't warn if the 'case' expression refers to a static const variable of + // the enum type. + CaseExpr = CaseExpr->IgnoreParenImpCasts(); + if (const DeclRefExpr *DRE = dyn_cast(CaseExpr)) { if (const VarDecl *VD = dyn_cast(DRE->getDecl())) { + if (!VD->hasGlobalStorage()) + return true; QualType VarType = VD->getType(); - QualType EnumType = S.Context.getTypeDeclType(ED); - if (VD->hasGlobalStorage() && VarType.isConstQualified() && - S.Context.hasSameUnqualifiedType(EnumType, VarType)) + if (!VarType.isConstQualified()) + return true; + QualType EnumType = Ctx.getTypeDeclType(ED); + if (Ctx.hasSameUnqualifiedType(EnumType, VarType)) return false; } } - - if (FlagType) { - return !S.IsValueInFlagEnum(ED, Val, false); - } else { - while (EI != EIEnd && EI->first < Val) - EI++; - - if (EI != EIEnd && EI->first == Val) - return false; - } - return true; } @@ -1059,6 +1046,8 @@ Sema::ActOnFinishSwitchStmt(SourceLocati // If switch has default case, then ignore it. if (!CaseListIsErroneous && !HasConstantCond && ET) { const EnumDecl *ED = ET->getDecl(); + typedef SmallVector, 64> + EnumValsTy; EnumValsTy EnumVals; // Gather all enum values, set their type and sort them, @@ -1069,48 +1058,57 @@ Sema::ActOnFinishSwitchStmt(SourceLocati EnumVals.push_back(std::make_pair(Val, EDI)); } std::stable_sort(EnumVals.begin(), EnumVals.end(), CmpEnumVals); - auto EI = EnumVals.begin(), EIEnd = + EnumValsTy::iterator EIend = std::unique(EnumVals.begin(), EnumVals.end(), EqEnumVals); // See which case values aren't in enum. + EnumValsTy::const_iterator EI = EnumVals.begin(); for (CaseValsTy::const_iterator CI = CaseVals.begin(); - CI != CaseVals.end(); CI++) { - Expr *CaseExpr = CI->second->getLHS(); - if (ShouldDiagnoseSwitchCaseNotInEnum(*this, ED, CaseExpr, EI, EIEnd, - CI->first)) - Diag(CaseExpr->getExprLoc(), diag::warn_not_in_enum) - << CondTypeBeforePromotion; + CI != CaseVals.end(); CI++) { + while (EI != EIend && EI->first < CI->first) + EI++; + if (EI == EIend || EI->first > CI->first) { + Expr *CaseExpr = CI->second->getLHS(); + if (ShouldDiagnoseSwitchCaseNotInEnum(Context, ED, CaseExpr)) + Diag(CaseExpr->getExprLoc(), diag::warn_not_in_enum) + << CondTypeBeforePromotion; + } } - // See which of case ranges aren't in enum EI = EnumVals.begin(); for (CaseRangesTy::const_iterator RI = CaseRanges.begin(); - RI != CaseRanges.end(); RI++) { - Expr *CaseExpr = RI->second->getLHS(); - if (ShouldDiagnoseSwitchCaseNotInEnum(*this, ED, CaseExpr, EI, EIEnd, - RI->first)) - Diag(CaseExpr->getExprLoc(), diag::warn_not_in_enum) - << CondTypeBeforePromotion; + RI != CaseRanges.end() && EI != EIend; RI++) { + while (EI != EIend && EI->first < RI->first) + EI++; + + if (EI == EIend || EI->first != RI->first) { + Expr *CaseExpr = RI->second->getLHS(); + if (ShouldDiagnoseSwitchCaseNotInEnum(Context, ED, CaseExpr)) + Diag(CaseExpr->getExprLoc(), diag::warn_not_in_enum) + << CondTypeBeforePromotion; + } llvm::APSInt Hi = RI->second->getRHS()->EvaluateKnownConstInt(Context); AdjustAPSInt(Hi, CondWidth, CondIsSigned); - - CaseExpr = RI->second->getRHS(); - if (ShouldDiagnoseSwitchCaseNotInEnum(*this, ED, CaseExpr, EI, EIEnd, - Hi)) - Diag(CaseExpr->getExprLoc(), diag::warn_not_in_enum) - << CondTypeBeforePromotion; + while (EI != EIend && EI->first < Hi) + EI++; + if (EI == EIend || EI->first != Hi) { + Expr *CaseExpr = RI->second->getRHS(); + if (ShouldDiagnoseSwitchCaseNotInEnum(Context, ED, CaseExpr)) + Diag(CaseExpr->getExprLoc(), diag::warn_not_in_enum) + << CondTypeBeforePromotion; + } } // Check which enum vals aren't in switch - auto CI = CaseVals.begin(); - auto RI = CaseRanges.begin(); + CaseValsTy::const_iterator CI = CaseVals.begin(); + CaseRangesTy::const_iterator RI = CaseRanges.begin(); bool hasCasesNotInSwitch = false; SmallVector UnhandledNames; - for (EI = EnumVals.begin(); EI != EIEnd; EI++){ + for (EI = EnumVals.begin(); EI != EIend; EI++){ // Drop unneeded case values while (CI != CaseVals.end() && CI->first < EI->first) CI++; @@ -1197,37 +1195,30 @@ Sema::DiagnoseAssignmentEnum(QualType Ds llvm::APSInt RhsVal = SrcExpr->EvaluateKnownConstInt(Context); AdjustAPSInt(RhsVal, DstWidth, DstIsSigned); const EnumDecl *ED = ET->getDecl(); - - if (ED->hasAttr()) { - if (!IsValueInFlagEnum(ED, RhsVal, true)) - Diag(SrcExpr->getExprLoc(), diag::warn_not_in_enum_assignment) + typedef SmallVector, 64> + EnumValsTy; + EnumValsTy EnumVals; + + // Gather all enum values, set their type and sort them, + // allowing easier comparison with rhs constant. + for (auto *EDI : ED->enumerators()) { + llvm::APSInt Val = EDI->getInitVal(); + AdjustAPSInt(Val, DstWidth, DstIsSigned); + EnumVals.push_back(std::make_pair(Val, EDI)); + } + if (EnumVals.empty()) + return; + std::stable_sort(EnumVals.begin(), EnumVals.end(), CmpEnumVals); + EnumValsTy::iterator EIend = + std::unique(EnumVals.begin(), EnumVals.end(), EqEnumVals); + + // See which values aren't in the enum. + EnumValsTy::const_iterator EI = EnumVals.begin(); + while (EI != EIend && EI->first < RhsVal) + EI++; + if (EI == EIend || EI->first != RhsVal) { + Diag(SrcExpr->getExprLoc(), diag::warn_not_in_enum_assignment) << DstType.getUnqualifiedType(); - } else { - typedef SmallVector, 64> - EnumValsTy; - EnumValsTy EnumVals; - - // Gather all enum values, set their type and sort them, - // allowing easier comparison with rhs constant. - for (auto *EDI : ED->enumerators()) { - llvm::APSInt Val = EDI->getInitVal(); - AdjustAPSInt(Val, DstWidth, DstIsSigned); - EnumVals.push_back(std::make_pair(Val, EDI)); - } - if (EnumVals.empty()) - return; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 19:29:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 41C91D3B; Sat, 31 Jan 2015 19:29:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 146BCC5; Sat, 31 Jan 2015 19:29:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VJTSjH048780; Sat, 31 Jan 2015 19:29:28 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VJTSjb048779; Sat, 31 Jan 2015 19:29:28 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501311929.t0VJTSjb048779@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 31 Jan 2015 19:29:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r277995 - vendor/clang/clang-release_360-r227651 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 19:29:29 -0000 Author: dim Date: Sat Jan 31 19:29:28 2015 New Revision: 277995 URL: https://svnweb.freebsd.org/changeset/base/277995 Log: Tag clang tags/RELEASE_360/rc2 r227651 (effectively, 3.6.0 RC2). Added: vendor/clang/clang-release_360-r227651/ - copied from r277994, vendor/clang/dist/ From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 19:32:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0A57CE85; Sat, 31 Jan 2015 19:32:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E69E9189; Sat, 31 Jan 2015 19:32:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VJWJ7o052685; Sat, 31 Jan 2015 19:32:19 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VJWFN7052659; Sat, 31 Jan 2015 19:32:15 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201501311932.t0VJWFN7052659@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 31 Jan 2015 19:32:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277996 - in head/sys: arm/allwinner arm/altera/socfpga arm/broadcom/bcm2835 arm/freescale/imx arm/freescale/vybrid arm/lpc arm/rockchip arm/samsung/exynos arm/ti arm/xilinx arm/xscale/... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 19:32:20 -0000 Author: loos Date: Sat Jan 31 19:32:14 2015 New Revision: 277996 URL: https://svnweb.freebsd.org/changeset/base/277996 Log: Implement GPIO_GET_BUS() method for all GPIO drivers. Add helper routines to deal with attach and detach of gpiobus and gpioc devices that are common to all drivers. Modified: head/sys/arm/allwinner/a10_gpio.c head/sys/arm/altera/socfpga/socfpga_gpio.c head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c head/sys/arm/freescale/imx/imx_gpio.c head/sys/arm/freescale/vybrid/vf_gpio.c head/sys/arm/lpc/lpc_gpio.c head/sys/arm/rockchip/rk30xx_gpio.c head/sys/arm/samsung/exynos/exynos5_pad.c head/sys/arm/ti/ti_gpio.c head/sys/arm/ti/ti_gpio.h head/sys/arm/xilinx/zy7_gpio.c head/sys/arm/xscale/ixp425/avila_gpio.c head/sys/arm/xscale/ixp425/cambria_gpio.c head/sys/dev/gpio/gpiobus.c head/sys/dev/gpio/gpiobusvar.h head/sys/mips/atheros/ar71xx_gpio.c head/sys/mips/atheros/ar71xx_gpiovar.h head/sys/mips/cavium/octeon_gpio.c head/sys/mips/cavium/octeon_gpiovar.h head/sys/mips/rt305x/rt305x_gpio.c head/sys/mips/rt305x/rt305x_gpiovar.h Modified: head/sys/arm/allwinner/a10_gpio.c ============================================================================== --- head/sys/arm/allwinner/a10_gpio.c Sat Jan 31 19:29:28 2015 (r277995) +++ head/sys/arm/allwinner/a10_gpio.c Sat Jan 31 19:32:14 2015 (r277996) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -75,6 +76,7 @@ __FBSDID("$FreeBSD$"); struct a10_gpio_softc { device_t sc_dev; + device_t sc_busdev; struct mtx sc_mtx; struct resource * sc_mem_res; struct resource * sc_irq_res; @@ -217,6 +219,16 @@ a10_gpio_pin_configure(struct a10_gpio_s A10_GPIO_UNLOCK(sc); } +static device_t +a10_gpio_get_bus(device_t dev) +{ + struct a10_gpio_softc *sc; + + sc = device_get_softc(dev); + + return (sc->sc_busdev); +} + static int a10_gpio_pin_max(device_t dev, int *maxpin) { @@ -458,13 +470,12 @@ a10_gpio_attach(device_t dev) sc->sc_gpio_pins[i].gp_flags = a10_gpio_func_flag(func); } sc->sc_gpio_npins = i; - - device_add_child(dev, "gpioc", -1); - device_add_child(dev, "gpiobus", -1); - a10_gpio_sc = sc; + sc->sc_busdev = gpiobus_attach_bus(dev); + if (sc->sc_busdev == NULL) + goto fail; - return (bus_generic_attach(dev)); + return (0); fail: if (sc->sc_irq_res) @@ -490,6 +501,7 @@ static device_method_t a10_gpio_methods[ DEVMETHOD(device_detach, a10_gpio_detach), /* GPIO protocol */ + DEVMETHOD(gpio_get_bus, a10_gpio_get_bus), DEVMETHOD(gpio_pin_max, a10_gpio_pin_max), DEVMETHOD(gpio_pin_getname, a10_gpio_pin_getname), DEVMETHOD(gpio_pin_getflags, a10_gpio_pin_getflags), Modified: head/sys/arm/altera/socfpga/socfpga_gpio.c ============================================================================== --- head/sys/arm/altera/socfpga/socfpga_gpio.c Sat Jan 31 19:29:28 2015 (r277995) +++ head/sys/arm/altera/socfpga/socfpga_gpio.c Sat Jan 31 19:32:14 2015 (r277996) @@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -107,6 +108,7 @@ enum port_no { /* * GPIO interface */ +static device_t socfpga_gpio_get_bus(device_t); static int socfpga_gpio_pin_max(device_t, int *); static int socfpga_gpio_pin_getcaps(device_t, uint32_t, uint32_t *); static int socfpga_gpio_pin_getname(device_t, uint32_t, char *); @@ -122,6 +124,7 @@ struct socfpga_gpio_softc { bus_space_handle_t bsh; device_t dev; + device_t busdev; struct mtx sc_mtx; int gpio_npins; struct gpio_pin gpio_pins[NR_GPIO_MAX]; @@ -196,11 +199,24 @@ socfpga_gpio_attach(device_t dev) snprintf(sc->gpio_pins[i].gp_name, GPIOMAXNAME, "socfpga_gpio%d.%d", device_get_unit(dev), i); } + sc->busdev = gpiobus_attach_bus(dev); + if (sc->busdev == NULL) { + bus_release_resources(dev, socfpga_gpio_spec, sc->res); + mtx_destroy(&sc->sc_mtx); + return (ENXIO); + } + + return (0); +} - device_add_child(dev, "gpioc", -1); - device_add_child(dev, "gpiobus", -1); +static device_t +socfpga_gpio_get_bus(device_t dev) +{ + struct socfpga_gpio_softc *sc; + + sc = device_get_softc(dev); - return (bus_generic_attach(dev)); + return (sc->busdev); } static int @@ -415,6 +431,7 @@ static device_method_t socfpga_gpio_meth DEVMETHOD(device_attach, socfpga_gpio_attach), /* GPIO protocol */ + DEVMETHOD(gpio_get_bus, socfpga_gpio_get_bus), DEVMETHOD(gpio_pin_max, socfpga_gpio_pin_max), DEVMETHOD(gpio_pin_getname, socfpga_gpio_pin_getname), DEVMETHOD(gpio_pin_getcaps, socfpga_gpio_pin_getcaps), Modified: head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Sat Jan 31 19:29:28 2015 (r277995) +++ head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Sat Jan 31 19:32:14 2015 (r277996) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -83,6 +84,7 @@ struct bcm_gpio_sysctl { struct bcm_gpio_softc { device_t sc_dev; + device_t sc_busdev; struct mtx sc_mtx; struct resource * sc_res[BCM_GPIO_IRQS + 1]; bus_space_tag_t sc_bst; @@ -317,6 +319,16 @@ bcm_gpio_pin_configure(struct bcm_gpio_s BCM_GPIO_UNLOCK(sc); } +static device_t +bcm_gpio_get_bus(device_t dev) +{ + struct bcm_gpio_softc *sc; + + sc = device_get_softc(dev); + + return (sc->sc_busdev); +} + static int bcm_gpio_pin_max(device_t dev, int *maxpin) { @@ -709,13 +721,12 @@ bcm_gpio_attach(device_t dev) i++; } sc->sc_gpio_npins = i; - bcm_gpio_sysctl_init(sc); + sc->sc_busdev = gpiobus_attach_bus(dev); + if (sc->sc_busdev == NULL) + goto fail; - device_add_child(dev, "gpioc", -1); - device_add_child(dev, "gpiobus", -1); - - return (bus_generic_attach(dev)); + return (0); fail: bus_release_resources(dev, bcm_gpio_res_spec, sc->sc_res); @@ -746,6 +757,7 @@ static device_method_t bcm_gpio_methods[ DEVMETHOD(device_detach, bcm_gpio_detach), /* GPIO protocol */ + DEVMETHOD(gpio_get_bus, bcm_gpio_get_bus), DEVMETHOD(gpio_pin_max, bcm_gpio_pin_max), DEVMETHOD(gpio_pin_getname, bcm_gpio_pin_getname), DEVMETHOD(gpio_pin_getflags, bcm_gpio_pin_getflags), Modified: head/sys/arm/freescale/imx/imx_gpio.c ============================================================================== --- head/sys/arm/freescale/imx/imx_gpio.c Sat Jan 31 19:29:28 2015 (r277995) +++ head/sys/arm/freescale/imx/imx_gpio.c Sat Jan 31 19:32:14 2015 (r277996) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -92,6 +93,7 @@ __FBSDID("$FreeBSD$"); struct imx51_gpio_softc { device_t dev; + device_t sc_busdev; struct mtx sc_mtx; struct resource *sc_res[11]; /* 1 x mem, 2 x IRQ, 8 x IRQ */ void *gpio_ih[11]; /* 1 ptr is not a big waste */ @@ -145,6 +147,7 @@ static int imx51_gpio_intr(void *); /* * GPIO interface */ +static device_t imx51_gpio_get_bus(device_t); static int imx51_gpio_pin_max(device_t, int *); static int imx51_gpio_pin_getcaps(device_t, uint32_t, uint32_t *); static int imx51_gpio_pin_getflags(device_t, uint32_t, uint32_t *); @@ -179,6 +182,16 @@ imx51_gpio_pin_configure(struct imx51_gp GPIO_UNLOCK(sc); } +static device_t +imx51_gpio_get_bus(device_t dev) +{ + struct imx51_gpio_softc *sc; + + sc = device_get_softc(dev); + + return (sc->sc_busdev); +} + static int imx51_gpio_pin_max(device_t dev, int *maxpin) { @@ -427,11 +440,13 @@ imx51_gpio_attach(device_t dev) snprintf(sc->gpio_pins[i].gp_name, GPIOMAXNAME, "imx_gpio%d.%d", device_get_unit(dev), i); } + sc->sc_busdev = gpiobus_attach_bus(dev); + if (sc->sc_busdev == NULL) { + imx51_gpio_detach(dev); + return (ENXIO); + } - device_add_child(dev, "gpioc", -1); - device_add_child(dev, "gpiobus", -1); - - return (bus_generic_attach(dev)); + return (0); } static int @@ -444,7 +459,7 @@ imx51_gpio_detach(device_t dev) KASSERT(mtx_initialized(&sc->sc_mtx), ("gpio mutex not initialized")); - bus_generic_detach(dev); + gpiobus_detach_bus(dev); for (irq = 1; irq <= sc->sc_l_irq; irq ++) { if (sc->gpio_ih[irq]) bus_teardown_intr(dev, sc->sc_res[irq], sc->gpio_ih[irq]); @@ -462,6 +477,7 @@ static device_method_t imx51_gpio_method DEVMETHOD(device_detach, imx51_gpio_detach), /* GPIO protocol */ + DEVMETHOD(gpio_get_bus, imx51_gpio_get_bus), DEVMETHOD(gpio_pin_max, imx51_gpio_pin_max), DEVMETHOD(gpio_pin_getname, imx51_gpio_pin_getname), DEVMETHOD(gpio_pin_getflags, imx51_gpio_pin_getflags), Modified: head/sys/arm/freescale/vybrid/vf_gpio.c ============================================================================== --- head/sys/arm/freescale/vybrid/vf_gpio.c Sat Jan 31 19:29:28 2015 (r277995) +++ head/sys/arm/freescale/vybrid/vf_gpio.c Sat Jan 31 19:32:14 2015 (r277996) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -74,6 +75,7 @@ __FBSDID("$FreeBSD$"); /* * GPIO interface */ +static device_t vf_gpio_get_bus(device_t); static int vf_gpio_pin_max(device_t, int *); static int vf_gpio_pin_getcaps(device_t, uint32_t, uint32_t *); static int vf_gpio_pin_getname(device_t, uint32_t, char *); @@ -88,6 +90,7 @@ struct vf_gpio_softc { bus_space_tag_t bst; bus_space_handle_t bsh; + device_t sc_busdev; struct mtx sc_mtx; int gpio_npins; struct gpio_pin gpio_pins[NGPIO]; @@ -147,10 +150,24 @@ vf_gpio_attach(device_t dev) "vf_gpio%d.%d", device_get_unit(dev), i); } - device_add_child(dev, "gpioc", -1); - device_add_child(dev, "gpiobus", -1); + sc->sc_busdev = gpiobus_attach_bus(dev); + if (sc->sc_busdev == NULL) { + bus_release_resources(dev, vf_gpio_spec, sc->res); + mtx_destroy(&sc->sc_mtx); + return (ENXIO); + } + + return (0); +} + +static device_t +vf_gpio_get_bus(device_t dev) +{ + struct vf_gpio_softc *sc; + + sc = device_get_softc(dev); - return (bus_generic_attach(dev)); + return (sc->sc_busdev); } static int @@ -348,6 +365,7 @@ static device_method_t vf_gpio_methods[] DEVMETHOD(device_attach, vf_gpio_attach), /* GPIO protocol */ + DEVMETHOD(gpio_get_bus, vf_gpio_get_bus), DEVMETHOD(gpio_pin_max, vf_gpio_pin_max), DEVMETHOD(gpio_pin_getname, vf_gpio_pin_getname), DEVMETHOD(gpio_pin_getcaps, vf_gpio_pin_getcaps), Modified: head/sys/arm/lpc/lpc_gpio.c ============================================================================== --- head/sys/arm/lpc/lpc_gpio.c Sat Jan 31 19:29:28 2015 (r277995) +++ head/sys/arm/lpc/lpc_gpio.c Sat Jan 31 19:32:14 2015 (r277996) @@ -79,6 +79,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -90,6 +91,7 @@ __FBSDID("$FreeBSD$"); struct lpc_gpio_softc { device_t lg_dev; + device_t lg_busdev; struct resource * lg_res; bus_space_tag_t lg_bst; bus_space_handle_t lg_bsh; @@ -135,6 +137,7 @@ static int lpc_gpio_probe(device_t); static int lpc_gpio_attach(device_t); static int lpc_gpio_detach(device_t); +static device_t lpc_gpio_get_bus(device_t); static int lpc_gpio_pin_max(device_t, int *); static int lpc_gpio_pin_getcaps(device_t, uint32_t, uint32_t *); static int lpc_gpio_pin_getflags(device_t, uint32_t, uint32_t *); @@ -192,10 +195,13 @@ lpc_gpio_attach(device_t dev) lpc_gpio_sc = sc; - device_add_child(dev, "gpioc", -1); - device_add_child(dev, "gpiobus", -1); + sc->lg_busdev = gpiobus_attach_bus(dev); + if (sc->lg_busdev == NULL) { + bus_release_resource(dev, SYS_RES_MEMORY, rid, sc->lg_res); + return (ENXIO); + } - return (bus_generic_attach(dev)); + return (0); } static int @@ -204,6 +210,16 @@ lpc_gpio_detach(device_t dev) return (EBUSY); } +static device_t +lpc_gpio_get_bus(device_t dev) +{ + struct lpc_gpio_softc *sc; + + sc = device_get_softc(dev); + + return (sc->lg_busdev); +} + static int lpc_gpio_pin_max(device_t dev, int *npins) { @@ -527,6 +543,7 @@ static device_method_t lpc_gpio_methods[ DEVMETHOD(device_detach, lpc_gpio_detach), /* GPIO interface */ + DEVMETHOD(gpio_get_bus, lpc_gpio_get_bus), DEVMETHOD(gpio_pin_max, lpc_gpio_pin_max), DEVMETHOD(gpio_pin_getcaps, lpc_gpio_pin_getcaps), DEVMETHOD(gpio_pin_getflags, lpc_gpio_pin_getflags), Modified: head/sys/arm/rockchip/rk30xx_gpio.c ============================================================================== --- head/sys/arm/rockchip/rk30xx_gpio.c Sat Jan 31 19:29:28 2015 (r277995) +++ head/sys/arm/rockchip/rk30xx_gpio.c Sat Jan 31 19:32:14 2015 (r277996) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -73,6 +74,7 @@ __FBSDID("$FreeBSD$"); struct rk30_gpio_softc { device_t sc_dev; + device_t sc_busdev; struct mtx sc_mtx; struct resource * sc_mem_res; struct resource * sc_irq_res; @@ -210,6 +212,16 @@ rk30_gpio_pin_configure(struct rk30_gpio RK30_GPIO_UNLOCK(sc); } +static device_t +rk30_gpio_get_bus(device_t dev) +{ + struct rk30_gpio_softc *sc; + + sc = device_get_softc(dev); + + return (sc->sc_busdev); +} + static int rk30_gpio_pin_max(device_t dev, int *maxpin) { @@ -449,15 +461,13 @@ rk30_gpio_attach(device_t dev) sc->sc_gpio_pins[i].gp_flags = rk30_gpio_get_function(sc, i); } sc->sc_gpio_npins = i; - - device_add_child(dev, "gpioc", -1); - device_add_child(dev, "gpiobus", -1); - rk30_gpio_sc = sc; - rk30_gpio_init(); - - return (bus_generic_attach(dev)); + sc->sc_busdev = gpiobus_attach_bus(dev); + if (sc->sc_busdev == NULL) + goto fail; + + return (0); fail: if (sc->sc_irq_res) @@ -483,6 +493,7 @@ static device_method_t rk30_gpio_methods DEVMETHOD(device_detach, rk30_gpio_detach), /* GPIO protocol */ + DEVMETHOD(gpio_get_bus, rk30_gpio_get_bus), DEVMETHOD(gpio_pin_max, rk30_gpio_pin_max), DEVMETHOD(gpio_pin_getname, rk30_gpio_pin_getname), DEVMETHOD(gpio_pin_getflags, rk30_gpio_pin_getflags), Modified: head/sys/arm/samsung/exynos/exynos5_pad.c ============================================================================== --- head/sys/arm/samsung/exynos/exynos5_pad.c Sat Jan 31 19:29:28 2015 (r277995) +++ head/sys/arm/samsung/exynos/exynos5_pad.c Sat Jan 31 19:32:14 2015 (r277996) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -82,6 +83,7 @@ __FBSDID("$FreeBSD$"); /* * GPIO interface */ +static device_t pad_get_bus(device_t); static int pad_pin_max(device_t, int *); static int pad_pin_getcaps(device_t, uint32_t, uint32_t *); static int pad_pin_getname(device_t, uint32_t, char *); @@ -111,6 +113,7 @@ struct pad_softc { struct gpio_pin gpio_pins[MAX_NGPIO]; void *gpio_ih[MAX_PORTS]; device_t dev; + device_t busdev; int model; struct resource_spec *pad_spec; struct gpio_bank *gpio_map; @@ -558,11 +561,11 @@ pad_attach(device_t dev) snprintf(sc->gpio_pins[i].gp_name, GPIOMAXNAME, "pad%d.%d", device_get_unit(dev), i); } + sc->busdev = gpiobus_attach_bus(dev); + if (sc->busdev == NULL) + goto fail; - device_add_child(dev, "gpioc", -1); - device_add_child(dev, "gpiobus", -1); - - return (bus_generic_attach(dev)); + return (0); fail: for (i = 0; i < sc->nports; i++) { @@ -576,6 +579,16 @@ fail: return (ENXIO); } +static device_t +pad_get_bus(device_t dev) +{ + struct pad_softc *sc; + + sc = device_get_softc(dev); + + return (sc->busdev); +} + static int pad_pin_max(device_t dev, int *maxpin) { @@ -817,6 +830,7 @@ static device_method_t pad_methods[] = { DEVMETHOD(device_attach, pad_attach), /* GPIO protocol */ + DEVMETHOD(gpio_get_bus, pad_get_bus), DEVMETHOD(gpio_pin_max, pad_pin_max), DEVMETHOD(gpio_pin_getname, pad_pin_getname), DEVMETHOD(gpio_pin_getcaps, pad_pin_getcaps), Modified: head/sys/arm/ti/ti_gpio.c ============================================================================== --- head/sys/arm/ti/ti_gpio.c Sat Jan 31 19:29:28 2015 (r277995) +++ head/sys/arm/ti/ti_gpio.c Sat Jan 31 19:32:14 2015 (r277996) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -309,6 +310,16 @@ ti_gpio_intr_status(struct ti_gpio_softc return (reg); } +static device_t +ti_gpio_get_bus(device_t dev) +{ + struct ti_gpio_softc *sc; + + sc = device_get_softc(dev); + + return (sc->sc_busdev); +} + /** * ti_gpio_pin_max - Returns the maximum number of GPIO pins * @dev: gpio device handle @@ -815,12 +826,13 @@ ti_gpio_attach(device_t dev) } } } + sc->sc_busdev = gpiobus_attach_bus(dev); + if (sc->sc_busdev == NULL) { + ti_gpio_detach(dev); + return (ENXIO); + } - /* Finish of the probe call */ - device_add_child(dev, "gpioc", -1); - device_add_child(dev, "gpiobus", -1); - - return (bus_generic_attach(dev)); + return (0); } /** @@ -849,7 +861,7 @@ ti_gpio_detach(device_t dev) if (sc->sc_mem_res[i] != NULL) ti_gpio_intr_clr(sc, i, 0xffffffff); } - bus_generic_detach(dev); + gpiobus_detach_bus(dev); if (sc->sc_events) free(sc->sc_events, M_DEVBUF); if (sc->sc_irq_polarity) @@ -1065,6 +1077,7 @@ static device_method_t ti_gpio_methods[] DEVMETHOD(device_detach, ti_gpio_detach), /* GPIO protocol */ + DEVMETHOD(gpio_get_bus, ti_gpio_get_bus), DEVMETHOD(gpio_pin_max, ti_gpio_pin_max), DEVMETHOD(gpio_pin_getname, ti_gpio_pin_getname), DEVMETHOD(gpio_pin_getflags, ti_gpio_pin_getflags), Modified: head/sys/arm/ti/ti_gpio.h ============================================================================== --- head/sys/arm/ti/ti_gpio.h Sat Jan 31 19:29:28 2015 (r277995) +++ head/sys/arm/ti/ti_gpio.h Sat Jan 31 19:32:14 2015 (r277996) @@ -46,6 +46,7 @@ */ struct ti_gpio_softc { device_t sc_dev; + device_t sc_busdev; /* Interrupt trigger type and level. */ enum intr_trigger *sc_irq_trigger; Modified: head/sys/arm/xilinx/zy7_gpio.c ============================================================================== --- head/sys/arm/xilinx/zy7_gpio.c Sat Jan 31 19:29:28 2015 (r277995) +++ head/sys/arm/xilinx/zy7_gpio.c Sat Jan 31 19:32:14 2015 (r277996) @@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -88,6 +89,7 @@ __FBSDID("$FreeBSD$"); struct zy7_gpio_softc { device_t dev; + device_t busdev; struct mtx sc_mtx; struct resource *mem_res; /* Memory resource */ }; @@ -113,6 +115,15 @@ struct zy7_gpio_softc { #define ZY7_GPIO_INT_POLARITY(b) (0x0220+0x40*(b)) /* int polarity */ #define ZY7_GPIO_INT_ANY(b) (0x0224+0x40*(b)) /* any edge */ +static device_t +zy7_gpio_get_bus(device_t dev) +{ + struct zy7_gpio_softc *sc; + + sc = device_get_softc(dev); + + return (sc->busdev); +} static int zy7_gpio_pin_max(device_t dev, int *maxpin) @@ -329,10 +340,13 @@ zy7_gpio_attach(device_t dev) /* Completely reset. */ zy7_gpio_hw_reset(sc); - device_add_child(dev, "gpioc", -1); - device_add_child(dev, "gpiobus", -1); + sc->busdev = gpiobus_attach_bus(dev); + if (sc->busdev == NULL) { + zy7_gpio_detach(dev); + return (ENOMEM); + } - return (bus_generic_attach(dev)); + return (0); } static int @@ -340,7 +354,7 @@ zy7_gpio_detach(device_t dev) { struct zy7_gpio_softc *sc = device_get_softc(dev); - bus_generic_detach(dev); + gpiobus_detach_bus(dev); if (sc->mem_res != NULL) { /* Release memory resource. */ @@ -360,6 +374,7 @@ static device_method_t zy7_gpio_methods[ DEVMETHOD(device_detach, zy7_gpio_detach), /* GPIO protocol */ + DEVMETHOD(gpio_get_bus, zy7_gpio_get_bus), DEVMETHOD(gpio_pin_max, zy7_gpio_pin_max), DEVMETHOD(gpio_pin_getname, zy7_gpio_pin_getname), DEVMETHOD(gpio_pin_getflags, zy7_gpio_pin_getflags), Modified: head/sys/arm/xscale/ixp425/avila_gpio.c ============================================================================== --- head/sys/arm/xscale/ixp425/avila_gpio.c Sat Jan 31 19:29:28 2015 (r277995) +++ head/sys/arm/xscale/ixp425/avila_gpio.c Sat Jan 31 19:32:14 2015 (r277996) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "gpio_if.h" @@ -60,6 +61,7 @@ __FBSDID("$FreeBSD$"); struct avila_gpio_softc { device_t sc_dev; + device_t sc_busdev; bus_space_tag_t sc_iot; bus_space_handle_t sc_gpio_ioh; uint32_t sc_valid; @@ -116,6 +118,7 @@ static int avila_gpio_detach(device_t de /* * GPIO interface */ +static device_t avila_gpio_get_bus(device_t); static int avila_gpio_pin_max(device_t dev, int *maxpin); static int avila_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps); static int avila_gpio_pin_getflags(device_t dev, uint32_t pin, uint32_t @@ -162,6 +165,16 @@ avila_gpio_pin_configure(struct avila_gp } } +static device_t +avila_gpio_get_bus(device_t dev) +{ + struct avila_gpio_softc *sc; + + sc = device_get_softc(dev); + + return (sc->sc_busdev); +} + static int avila_gpio_pin_max(device_t dev, int *maxpin) { @@ -310,10 +323,11 @@ avila_gpio_attach(device_t dev) sc->sc_valid |= 1 << p->pin; } - device_add_child(dev, "gpioc", -1); - device_add_child(dev, "gpiobus", -1); + sc->sc_busdev = gpiobus_attach_bus(dev); + if (sc->sc_busdev == NULL) + return (ENXIO); - return (bus_generic_attach(dev)); + return (0); #undef N } @@ -321,7 +335,7 @@ static int avila_gpio_detach(device_t dev) { - bus_generic_detach(dev); + gpiobus_detach_bus(dev); return(0); } @@ -332,6 +346,7 @@ static device_method_t gpio_avila_method DEVMETHOD(device_detach, avila_gpio_detach), /* GPIO protocol */ + DEVMETHOD(gpio_get_bus, avila_gpio_get_bus), DEVMETHOD(gpio_pin_max, avila_gpio_pin_max), DEVMETHOD(gpio_pin_getname, avila_gpio_pin_getname), DEVMETHOD(gpio_pin_getflags, avila_gpio_pin_getflags), Modified: head/sys/arm/xscale/ixp425/cambria_gpio.c ============================================================================== --- head/sys/arm/xscale/ixp425/cambria_gpio.c Sat Jan 31 19:29:28 2015 (r277995) +++ head/sys/arm/xscale/ixp425/cambria_gpio.c Sat Jan 31 19:32:14 2015 (r277996) @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -79,6 +80,7 @@ __FBSDID("$FreeBSD$"); #define GPIO_PINS 5 struct cambria_gpio_softc { device_t sc_dev; + device_t sc_busdev; bus_space_tag_t sc_iot; bus_space_handle_t sc_gpio_ioh; struct mtx sc_mtx; @@ -119,6 +121,7 @@ static int cambria_gpio_detach(device_t /* * GPIO interface */ +static device_t cambria_gpio_get_bus(device_t); static int cambria_gpio_pin_max(device_t dev, int *maxpin); static int cambria_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps); static int cambria_gpio_pin_getflags(device_t dev, uint32_t pin, uint32_t @@ -261,6 +264,16 @@ cambria_gpio_write(struct cambria_gpio_s return (0); } +static device_t +cambria_gpio_get_bus(device_t dev) +{ + struct cambria_gpio_softc *sc; + + sc = device_get_softc(dev); + + return (sc->sc_busdev); +} + static int cambria_gpio_pin_max(device_t dev, int *maxpin) { @@ -438,10 +451,13 @@ cambria_gpio_attach(device_t dev) cambria_gpio_pin_setflags(dev, pin, p->flags); } - device_add_child(dev, "gpioc", -1); - device_add_child(dev, "gpiobus", -1); + sc->sc_busdev = gpiobus_attach_bus(dev); + if (sc->sc_busdev == NULL) { + mtx_destroy(&sc->sc_mtx); + return (ENXIO); + } - return (bus_generic_attach(dev)); + return (0); } static int @@ -451,8 +467,7 @@ cambria_gpio_detach(device_t dev) KASSERT(mtx_initialized(&sc->sc_mtx), ("gpio mutex not initialized")); - bus_generic_detach(dev); - + gpiobus_detach_bus(dev); mtx_destroy(&sc->sc_mtx); return(0); @@ -464,6 +479,7 @@ static device_method_t cambria_gpio_meth DEVMETHOD(device_detach, cambria_gpio_detach), /* GPIO protocol */ + DEVMETHOD(gpio_get_bus, cambria_gpio_get_bus), DEVMETHOD(gpio_pin_max, cambria_gpio_pin_max), DEVMETHOD(gpio_pin_getname, cambria_gpio_pin_getname), DEVMETHOD(gpio_pin_getflags, cambria_gpio_pin_getflags), Modified: head/sys/dev/gpio/gpiobus.c ============================================================================== --- head/sys/dev/gpio/gpiobus.c Sat Jan 31 19:29:28 2015 (r277995) +++ head/sys/dev/gpio/gpiobus.c Sat Jan 31 19:32:14 2015 (r277996) @@ -131,6 +131,30 @@ gpiobus_print_pins(struct gpiobus_ivar * strlcat(buf, tmp, buflen); } +device_t +gpiobus_attach_bus(device_t dev) +{ + device_t busdev; + + busdev = device_add_child(dev, "gpiobus", -1); + if (busdev == NULL) + return (NULL); + if (device_add_child(dev, "gpioc", -1) == NULL) { + device_delete_child(dev, busdev); + return (NULL); + } + bus_generic_attach(dev); + + return (busdev); +} + +int +gpiobus_detach_bus(device_t dev) +{ + + return (bus_generic_detach(dev)); +} + int gpiobus_init_softc(device_t dev) { Modified: head/sys/dev/gpio/gpiobusvar.h ============================================================================== --- head/sys/dev/gpio/gpiobusvar.h Sat Jan 31 19:29:28 2015 (r277995) +++ head/sys/dev/gpio/gpiobusvar.h Sat Jan 31 19:32:14 2015 (r277996) @@ -95,6 +95,8 @@ gpio_map_gpios(device_t bus, phandle_t d device_t ofw_gpiobus_add_fdt_child(device_t, phandle_t); #endif int gpio_check_flags(uint32_t, uint32_t); +device_t gpiobus_attach_bus(device_t); +int gpiobus_detach_bus(device_t); int gpiobus_init_softc(device_t); extern driver_t gpiobus_driver; Modified: head/sys/mips/atheros/ar71xx_gpio.c ============================================================================== --- head/sys/mips/atheros/ar71xx_gpio.c Sat Jan 31 19:29:28 2015 (r277995) +++ head/sys/mips/atheros/ar71xx_gpio.c Sat Jan 31 19:32:14 2015 (r277996) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "gpio_if.h" @@ -79,6 +80,7 @@ static void ar71xx_gpio_intr(void *arg); /* * GPIO interface */ +static device_t ar71xx_gpio_get_bus(device_t); static int ar71xx_gpio_pin_max(device_t dev, int *maxpin); static int ar71xx_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps); static int ar71xx_gpio_pin_getflags(device_t dev, uint32_t pin, uint32_t @@ -135,6 +137,16 @@ ar71xx_gpio_pin_configure(struct ar71xx_ } } +static device_t +ar71xx_gpio_get_bus(device_t dev) +{ + struct ar71xx_gpio_softc *sc; + + sc = device_get_softc(dev); + + return (sc->busdev); +} + static int ar71xx_gpio_pin_max(device_t dev, int *maxpin) { @@ -433,10 +445,13 @@ ar71xx_gpio_attach(device_t dev) ar71xx_gpio_pin_set(dev, j, 1); } } - device_add_child(dev, "gpioc", -1); - device_add_child(dev, "gpiobus", -1); + sc->busdev = gpiobus_attach_bus(dev); + if (sc->busdev == NULL) { + ar71xx_gpio_detach(dev); + return (ENXIO); + } - return (bus_generic_attach(dev)); + return (0); } static int @@ -446,7 +461,7 @@ ar71xx_gpio_detach(device_t dev) KASSERT(mtx_initialized(&sc->gpio_mtx), ("gpio mutex not initialized")); - bus_generic_detach(dev); + gpiobus_detach_bus(dev); if (sc->gpio_ih) bus_teardown_intr(dev, sc->gpio_irq_res, sc->gpio_ih); if (sc->gpio_irq_res) @@ -468,6 +483,7 @@ static device_method_t ar71xx_gpio_metho DEVMETHOD(device_detach, ar71xx_gpio_detach), /* GPIO protocol */ + DEVMETHOD(gpio_get_bus, ar71xx_gpio_get_bus), DEVMETHOD(gpio_pin_max, ar71xx_gpio_pin_max), DEVMETHOD(gpio_pin_getname, ar71xx_gpio_pin_getname), DEVMETHOD(gpio_pin_getflags, ar71xx_gpio_pin_getflags), Modified: head/sys/mips/atheros/ar71xx_gpiovar.h ============================================================================== --- head/sys/mips/atheros/ar71xx_gpiovar.h Sat Jan 31 19:29:28 2015 (r277995) +++ head/sys/mips/atheros/ar71xx_gpiovar.h Sat Jan 31 19:32:14 2015 (r277996) @@ -57,6 +57,7 @@ struct ar71xx_gpio_softc { device_t dev; + device_t busdev; struct mtx gpio_mtx; struct resource *gpio_mem_res; int gpio_mem_rid; Modified: head/sys/mips/cavium/octeon_gpio.c ============================================================================== --- head/sys/mips/cavium/octeon_gpio.c Sat Jan 31 19:29:28 2015 (r277995) +++ head/sys/mips/cavium/octeon_gpio.c Sat Jan 31 19:32:14 2015 (r277996) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include "gpio_if.h" @@ -90,6 +91,7 @@ static void octeon_gpio_intr(void *arg); /* * GPIO interface */ +static device_t octeon_gpio_get_bus(device_t); static int octeon_gpio_pin_max(device_t dev, int *maxpin); static int octeon_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps); static int octeon_gpio_pin_getflags(device_t dev, uint32_t pin, uint32_t @@ -134,6 +136,16 @@ octeon_gpio_pin_configure(struct octeon_ GPIO_UNLOCK(sc); } +static device_t +octeon_gpio_get_bus(device_t dev) +{ + struct octeon_gpio_softc *sc; + + sc = device_get_softc(dev); + + return (sc->busdev); +} + static int octeon_gpio_pin_max(device_t dev, int *maxpin) { @@ -434,11 +446,13 @@ octeon_gpio_attach(device_t dev) gpio_cfgx.s.int_en, gpio_cfgx.s.int_type ? "rising edge" : "level"); } } + sc->busdev = gpiobus_attach_bus(dev); + if (sc->busdev == NULL) { + octeon_gpio_detach(dev); + return (ENXIO); + } - device_add_child(dev, "gpioc", -1); - device_add_child(dev, "gpiobus", -1); - - return (bus_generic_attach(dev)); + return (0); } static int @@ -457,7 +471,7 @@ octeon_gpio_detach(device_t dev) bus_release_resource(dev, SYS_RES_IRQ, sc->gpio_irq_rid[i], sc->gpio_irq_res[i]); } - bus_generic_detach(dev); + gpiobus_detach_bus(dev); mtx_destroy(&sc->gpio_mtx); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 19:42:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3E2B9B3; Sat, 31 Jan 2015 19:42:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 20204253; Sat, 31 Jan 2015 19:42:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VJg90j057351; Sat, 31 Jan 2015 19:42:09 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VJg9iV057342; Sat, 31 Jan 2015 19:42:09 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501311942.t0VJg9iV057342@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Sat, 31 Jan 2015 19:42:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277997 - head/sys/boot/powerpc/kboot X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 19:42:10 -0000 Author: nwhitehorn Date: Sat Jan 31 19:42:08 2015 New Revision: 277997 URL: https://svnweb.freebsd.org/changeset/base/277997 Log: Relocate kernel to high address space (a static + 64 MB for now) to avoid conflicts with the Linux host kernel. This lets you kexec an unmodified GENERIC64. Modified: head/sys/boot/powerpc/kboot/conf.c head/sys/boot/powerpc/kboot/kerneltramp.S head/sys/boot/powerpc/kboot/main.c head/sys/boot/powerpc/kboot/ppc64_elf_freebsd.c Modified: head/sys/boot/powerpc/kboot/conf.c ============================================================================== --- head/sys/boot/powerpc/kboot/conf.c Sat Jan 31 19:32:14 2015 (r277996) +++ head/sys/boot/powerpc/kboot/conf.c Sat Jan 31 19:42:08 2015 (r277997) @@ -115,7 +115,3 @@ struct console *consoles[] = { NULL }; -/* - * reloc - our load address - */ -vm_offset_t reloc = RELOC; Modified: head/sys/boot/powerpc/kboot/kerneltramp.S ============================================================================== --- head/sys/boot/powerpc/kboot/kerneltramp.S Sat Jan 31 19:32:14 2015 (r277996) +++ head/sys/boot/powerpc/kboot/kerneltramp.S Sat Jan 31 19:42:08 2015 (r277997) @@ -9,6 +9,7 @@ * to the absolute address 0x60. Here we implement a loop waiting on the release * of a lock by the kernel at 0x40. * + * $FreeBSD$ */ #include @@ -39,7 +40,6 @@ CNAME(kerneltramp): mflr %r8 mtlr %r9 lwz %r3,0(%r8) - ld %r3,0(%r3) /* Resolve function descriptor */ mtctr %r3 lwz %r3,4(%r8) lwz %r4,8(%r8) Modified: head/sys/boot/powerpc/kboot/main.c ============================================================================== --- head/sys/boot/powerpc/kboot/main.c Sat Jan 31 19:32:14 2015 (r277996) +++ head/sys/boot/powerpc/kboot/main.c Sat Jan 31 19:42:08 2015 (r277997) @@ -48,6 +48,7 @@ ssize_t kboot_copyin(const void *src, vm ssize_t kboot_copyout(vm_offset_t src, void *dest, const size_t len); ssize_t kboot_readin(const int fd, vm_offset_t dest, const size_t len); int kboot_autoload(void); +uint64_t kboot_loadaddr(u_int type, void *data, uint64_t addr); int kboot_setcurrdev(struct env_var *ev, int flags, const void *value); extern int command_fdt_internal(int argc, char *argv[]); @@ -116,6 +117,7 @@ main(int argc, const char **argv) archsw.arch_copyout = kboot_copyout; archsw.arch_readin = kboot_readin; archsw.arch_autoload = kboot_autoload; + archsw.arch_loadaddr = kboot_loadaddr; printf("\n"); printf("%s, Revision %s\n", bootprog_name, bootprog_rev); @@ -282,6 +284,22 @@ kboot_autoload(void) return (0); } +uint64_t +kboot_loadaddr(u_int type, void *data, uint64_t addr) +{ + /* + * Need to stay out of the way of Linux. /chosen/linux,kernel-end does + * a better job here, but use a fixed offset for now. + */ + + if (type == LOAD_ELF) + addr = roundup(addr, PAGE_SIZE); + else + addr += 64*1024*1024; /* Stay out of the way of Linux */ + + return (addr); +} + void _start(int argc, const char **argv, char **env) { Modified: head/sys/boot/powerpc/kboot/ppc64_elf_freebsd.c ============================================================================== --- head/sys/boot/powerpc/kboot/ppc64_elf_freebsd.c Sat Jan 31 19:32:14 2015 (r277996) +++ head/sys/boot/powerpc/kboot/ppc64_elf_freebsd.c Sat Jan 31 19:42:08 2015 (r277997) @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include "host_syscall.h" extern char end[]; -extern vm_offset_t reloc; /* From /conf.c */ extern void *kerneltramp; extern size_t szkerneltramp; extern int nkexec_segments; @@ -68,17 +67,22 @@ ppc64_elf_exec(struct preloaded_file *fp Elf_Ehdr *e; int error; uint32_t *trampoline; - vm_offset_t trampolinebase = 96*1024*1024; /* XXX */ + uint64_t entry; + vm_offset_t trampolinebase; if ((fmp = file_findmetadata(fp, MODINFOMD_ELFHDR)) == NULL) { return(EFTYPE); } e = (Elf_Ehdr *)&fmp->md_data; + + /* Figure out where to put it */ + trampolinebase = archsw.arch_loadaddr(LOAD_RAW, NULL, 0); - /* Handle function descriptor */ + /* Set up interesting values in function descriptor */ trampoline = malloc(szkerneltramp); memcpy(trampoline, &kerneltramp, szkerneltramp); - trampoline[2] = e->e_entry; + archsw.arch_copyout(e->e_entry + elf64_relocation_offset, &entry, 8); + trampoline[2] = entry + elf64_relocation_offset; trampoline[4] = 0; /* Phys. mem offset */ trampoline[5] = 0; /* OF entry point */ @@ -88,7 +92,8 @@ ppc64_elf_exec(struct preloaded_file *fp trampoline[3] = dtb; trampoline[6] = mdp; trampoline[7] = sizeof(mdp); - printf("Kernel entry at %#jx ...\n", e->e_entry); + printf("Kernel entry at %#jx (%#x) ...\n", e->e_entry, trampoline[2]); + printf("DTB at %#x, mdp at %#x\n", dtb, mdp); dev_cleanup(); From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 19:55:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8D2582C9; Sat, 31 Jan 2015 19:55:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 790DE364; Sat, 31 Jan 2015 19:55:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VJtDae062362; Sat, 31 Jan 2015 19:55:13 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VJtDVk062361; Sat, 31 Jan 2015 19:55:13 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201501311955.t0VJtDVk062361@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 31 Jan 2015 19:55:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277998 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 19:55:13 -0000 Author: andrew Date: Sat Jan 31 19:55:12 2015 New Revision: 277998 URL: https://svnweb.freebsd.org/changeset/base/277998 Log: Stop using load-multiple with lr and pc. This has been deprecated in ARMv7 and clang 3.6 warns about it. As this is used in libc and we build it with -Werror this warning becomes an error stopping the build. Modified: head/sys/arm/include/profile.h Modified: head/sys/arm/include/profile.h ============================================================================== --- head/sys/arm/include/profile.h Sat Jan 31 19:42:08 2015 (r277997) +++ head/sys/arm/include/profile.h Sat Jan 31 19:55:12 2015 (r277998) @@ -86,7 +86,12 @@ typedef u_long fptrdiff_t; /* \ * Restore registers that were trashed during mcount \ */ \ - __asm__("ldmfd sp!, {r0-r3, lr, pc}"); + __asm__("ldmfd sp!, {r0-r3, lr}"); \ + /* \ + * Return to the caller. Loading lr and pc in one instruction \ + * is deprecated on ARMv7 so we need this on it's own. \ + */ \ + __asm__("ldmfd sp!, {pc}"); void bintr(void); void btrap(void); void eintr(void); From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 21:31:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CE442BF9; Sat, 31 Jan 2015 21:31:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA2D0D8C; Sat, 31 Jan 2015 21:31:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VLVsCe014854; Sat, 31 Jan 2015 21:31:54 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VLVsbX014852; Sat, 31 Jan 2015 21:31:54 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501312131.t0VLVsbX014852@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 31 Jan 2015 21:31:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278000 - head/sys/fs/tmpfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 21:31:54 -0000 Author: kib Date: Sat Jan 31 21:31:53 2015 New Revision: 278000 URL: https://svnweb.freebsd.org/changeset/base/278000 Log: Update directory times immediately after an entry is created or removed. Postponing it until tmpfs_getattr() is called causes discordant values reported for file times vs. directory times. Reported and tested by: madpilot Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/fs/tmpfs/tmpfs_subr.c Modified: head/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_subr.c Sat Jan 31 20:49:30 2015 (r277999) +++ head/sys/fs/tmpfs/tmpfs_subr.c Sat Jan 31 21:31:53 2015 (r278000) @@ -991,6 +991,7 @@ tmpfs_dir_attach(struct vnode *vp, struc dnode->tn_size += sizeof(struct tmpfs_dirent); dnode->tn_status |= TMPFS_NODE_ACCESSED | TMPFS_NODE_CHANGED | \ TMPFS_NODE_MODIFIED; + tmpfs_update(vp); } /* @@ -1036,6 +1037,7 @@ tmpfs_dir_detach(struct vnode *vp, struc dnode->tn_size -= sizeof(struct tmpfs_dirent); dnode->tn_status |= TMPFS_NODE_ACCESSED | TMPFS_NODE_CHANGED | \ TMPFS_NODE_MODIFIED; + tmpfs_update(vp); } void From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 21:43:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA008E30; Sat, 31 Jan 2015 21:43:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA603E6A; Sat, 31 Jan 2015 21:43:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VLhnf4020794; Sat, 31 Jan 2015 21:43:49 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VLhlSq020782; Sat, 31 Jan 2015 21:43:47 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501312143.t0VLhlSq020782@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 31 Jan 2015 21:43:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278001 - in head/sys: amd64/amd64 amd64/ia32 arm/arm i386/i386 mips/mips powerpc/powerpc sparc64/sparc64 sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 21:43:50 -0000 Author: kib Date: Sat Jan 31 21:43:46 2015 New Revision: 278001 URL: https://svnweb.freebsd.org/changeset/base/278001 Log: Do not qualify the mcontext_t *mcp argument for set_mcontext(9) as const. On x86, even after the machine context is supposedly read into the struct ucontext, lazy FPU state save code might only mark the FPU data as hardware-owned. Later, set_fpcontext() needs to fetch the state from hardware, modifying the *mcp. The set_mcontext(9) is called from sigreturn(2) and setcontext(2) implementations and old create_thread(2) interface, which throw the *mcp out after the set_mcontext() call. Reported by: dim Discussed with: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/amd64/amd64/machdep.c head/sys/amd64/ia32/ia32_signal.c head/sys/arm/arm/machdep.c head/sys/i386/i386/machdep.c head/sys/mips/mips/freebsd32_machdep.c head/sys/mips/mips/pm_machdep.c head/sys/powerpc/powerpc/exec_machdep.c head/sys/sparc64/sparc64/machdep.c head/sys/sys/ucontext.h Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Sat Jan 31 21:31:53 2015 (r278000) +++ head/sys/amd64/amd64/machdep.c Sat Jan 31 21:43:46 2015 (r278001) @@ -157,7 +157,7 @@ extern u_int64_t hammer_time(u_int64_t, static void cpu_startup(void *); static void get_fpcontext(struct thread *td, mcontext_t *mcp, char *xfpusave, size_t xfpusave_len); -static int set_fpcontext(struct thread *td, const mcontext_t *mcp, +static int set_fpcontext(struct thread *td, mcontext_t *mcp, char *xfpustate, size_t xfpustate_len); SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL); @@ -2480,7 +2480,7 @@ get_mcontext(struct thread *td, mcontext * touch the cs selector. */ int -set_mcontext(struct thread *td, const mcontext_t *mcp) +set_mcontext(struct thread *td, mcontext_t *mcp) { struct pcb *pcb; struct trapframe *tp; @@ -2567,7 +2567,7 @@ get_fpcontext(struct thread *td, mcontex } static int -set_fpcontext(struct thread *td, const mcontext_t *mcp, char *xfpustate, +set_fpcontext(struct thread *td, mcontext_t *mcp, char *xfpustate, size_t xfpustate_len) { struct savefpu *fpstate; Modified: head/sys/amd64/ia32/ia32_signal.c ============================================================================== --- head/sys/amd64/ia32/ia32_signal.c Sat Jan 31 21:31:53 2015 (r278000) +++ head/sys/amd64/ia32/ia32_signal.c Sat Jan 31 21:43:46 2015 (r278001) @@ -118,7 +118,7 @@ ia32_get_fpcontext(struct thread *td, st } static int -ia32_set_fpcontext(struct thread *td, const struct ia32_mcontext *mcp, +ia32_set_fpcontext(struct thread *td, struct ia32_mcontext *mcp, char *xfpustate, size_t xfpustate_len) { int error; @@ -197,7 +197,7 @@ ia32_get_mcontext(struct thread *td, str * touch the cs selector. */ static int -ia32_set_mcontext(struct thread *td, const struct ia32_mcontext *mcp) +ia32_set_mcontext(struct thread *td, struct ia32_mcontext *mcp) { struct trapframe *tp; char *xfpustate; Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Sat Jan 31 21:31:53 2015 (r278000) +++ head/sys/arm/arm/machdep.c Sat Jan 31 21:43:46 2015 (r278001) @@ -700,7 +700,7 @@ get_mcontext(struct thread *td, mcontext * touch the cs selector. */ int -set_mcontext(struct thread *td, const mcontext_t *mcp) +set_mcontext(struct thread *td, mcontext_t *mcp) { struct trapframe *tf = td->td_frame; const __greg_t *gr = mcp->__gregs; Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Sat Jan 31 21:31:53 2015 (r278000) +++ head/sys/i386/i386/machdep.c Sat Jan 31 21:43:46 2015 (r278001) @@ -195,7 +195,7 @@ static void cpu_startup(void *); static void fpstate_drop(struct thread *td); static void get_fpcontext(struct thread *td, mcontext_t *mcp, char *xfpusave, size_t xfpusave_len); -static int set_fpcontext(struct thread *td, const mcontext_t *mcp, +static int set_fpcontext(struct thread *td, mcontext_t *mcp, char *xfpustate, size_t xfpustate_len); #ifdef CPU_ENABLE_SSE static void set_fpregs_xmm(struct save87 *, struct savexmm *); @@ -3856,7 +3856,7 @@ get_mcontext(struct thread *td, mcontext * touch the cs selector. */ int -set_mcontext(struct thread *td, const mcontext_t *mcp) +set_mcontext(struct thread *td, mcontext_t *mcp) { struct trapframe *tp; char *xfpustate; @@ -3934,7 +3934,7 @@ get_fpcontext(struct thread *td, mcontex } static int -set_fpcontext(struct thread *td, const mcontext_t *mcp, char *xfpustate, +set_fpcontext(struct thread *td, mcontext_t *mcp, char *xfpustate, size_t xfpustate_len) { union savefpu *fpstate; Modified: head/sys/mips/mips/freebsd32_machdep.c ============================================================================== --- head/sys/mips/mips/freebsd32_machdep.c Sat Jan 31 21:31:53 2015 (r278000) +++ head/sys/mips/mips/freebsd32_machdep.c Sat Jan 31 21:43:46 2015 (r278001) @@ -68,7 +68,7 @@ static void freebsd32_exec_setregs(struct thread *, struct image_params *, u_long); static int get_mcontext32(struct thread *, mcontext32_t *, int); -static int set_mcontext32(struct thread *, const mcontext32_t *); +static int set_mcontext32(struct thread *, mcontext32_t *); static void freebsd32_sendsig(sig_t, ksiginfo_t *, sigset_t *); extern const char *freebsd32_syscallnames[]; @@ -227,7 +227,7 @@ get_mcontext32(struct thread *td, mconte } static int -set_mcontext32(struct thread *td, const mcontext32_t *mcp) +set_mcontext32(struct thread *td, mcontext32_t *mcp) { mcontext_t mcp64; unsigned i; Modified: head/sys/mips/mips/pm_machdep.c ============================================================================== --- head/sys/mips/mips/pm_machdep.c Sat Jan 31 21:31:53 2015 (r278000) +++ head/sys/mips/mips/pm_machdep.c Sat Jan 31 21:43:46 2015 (r278001) @@ -375,7 +375,7 @@ get_mcontext(struct thread *td, mcontext } int -set_mcontext(struct thread *td, const mcontext_t *mcp) +set_mcontext(struct thread *td, mcontext_t *mcp) { struct trapframe *tp; Modified: head/sys/powerpc/powerpc/exec_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/exec_machdep.c Sat Jan 31 21:31:53 2015 (r278000) +++ head/sys/powerpc/powerpc/exec_machdep.c Sat Jan 31 21:43:46 2015 (r278001) @@ -442,7 +442,7 @@ get_mcontext(struct thread *td, mcontext } int -set_mcontext(struct thread *td, const mcontext_t *mcp) +set_mcontext(struct thread *td, mcontext_t *mcp) { struct pcb *pcb; struct trapframe *tf; @@ -739,7 +739,7 @@ get_mcontext32(struct thread *td, mconte } static int -set_mcontext32(struct thread *td, const mcontext32_t *mcp) +set_mcontext32(struct thread *td, mcontext32_t *mcp) { mcontext_t mcp64; int i, error; Modified: head/sys/sparc64/sparc64/machdep.c ============================================================================== --- head/sys/sparc64/sparc64/machdep.c Sat Jan 31 21:31:53 2015 (r278000) +++ head/sys/sparc64/sparc64/machdep.c Sat Jan 31 21:43:46 2015 (r278001) @@ -811,7 +811,7 @@ get_mcontext(struct thread *td, mcontext } int -set_mcontext(struct thread *td, const mcontext_t *mc) +set_mcontext(struct thread *td, mcontext_t *mc) { struct trapframe *tf; struct pcb *pcb; Modified: head/sys/sys/ucontext.h ============================================================================== --- head/sys/sys/ucontext.h Sat Jan 31 21:31:53 2015 (r278000) +++ head/sys/sys/ucontext.h Sat Jan 31 21:43:46 2015 (r278001) @@ -99,7 +99,7 @@ struct thread; /* Machine-dependent functions: */ int get_mcontext(struct thread *, mcontext_t *, int); -int set_mcontext(struct thread *, const mcontext_t *); +int set_mcontext(struct thread *, mcontext_t *); #endif /* !_KERNEL */ From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 22:18:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CF74F383; Sat, 31 Jan 2015 22:18:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B088815E; Sat, 31 Jan 2015 22:18:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VMIr3c035697; Sat, 31 Jan 2015 22:18:53 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VMIr7m035695; Sat, 31 Jan 2015 22:18:53 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501312218.t0VMIr7m035695@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 31 Jan 2015 22:18:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278004 - head/sys/dev/drm2/radeon X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 22:18:54 -0000 Author: dim Date: Sat Jan 31 22:18:52 2015 New Revision: 278004 URL: https://svnweb.freebsd.org/changeset/base/278004 Log: Constify a number of accesses in drm2's radeon drivers to avoid -Wcast-qual warnings. No functional change. Reviewed by: dumbbell MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D1727 Modified: head/sys/dev/drm2/radeon/ni.c head/sys/dev/drm2/radeon/si.c Modified: head/sys/dev/drm2/radeon/ni.c ============================================================================== --- head/sys/dev/drm2/radeon/ni.c Sat Jan 31 22:07:38 2015 (r278003) +++ head/sys/dev/drm2/radeon/ni.c Sat Jan 31 22:18:52 2015 (r278004) @@ -182,7 +182,7 @@ int ni_mc_load_microcode(struct radeon_d { const __be32 *fw_data; u32 mem_type, running, blackout = 0; - u32 *io_mc_regs; + const u32 *io_mc_regs; int i, ucode_size, regs_size; if (!rdev->mc_fw) @@ -190,23 +190,23 @@ int ni_mc_load_microcode(struct radeon_d switch (rdev->family) { case CHIP_BARTS: - io_mc_regs = (u32 *)&barts_io_mc_regs; + io_mc_regs = (const u32 *)&barts_io_mc_regs; ucode_size = BTC_MC_UCODE_SIZE; regs_size = BTC_IO_MC_REGS_SIZE; break; case CHIP_TURKS: - io_mc_regs = (u32 *)&turks_io_mc_regs; + io_mc_regs = (const u32 *)&turks_io_mc_regs; ucode_size = BTC_MC_UCODE_SIZE; regs_size = BTC_IO_MC_REGS_SIZE; break; case CHIP_CAICOS: default: - io_mc_regs = (u32 *)&caicos_io_mc_regs; + io_mc_regs = (const u32 *)&caicos_io_mc_regs; ucode_size = BTC_MC_UCODE_SIZE; regs_size = BTC_IO_MC_REGS_SIZE; break; case CHIP_CAYMAN: - io_mc_regs = (u32 *)&cayman_io_mc_regs; + io_mc_regs = (const u32 *)&cayman_io_mc_regs; ucode_size = CAYMAN_MC_UCODE_SIZE; regs_size = BTC_IO_MC_REGS_SIZE; break; Modified: head/sys/dev/drm2/radeon/si.c ============================================================================== --- head/sys/dev/drm2/radeon/si.c Sat Jan 31 22:07:38 2015 (r278003) +++ head/sys/dev/drm2/radeon/si.c Sat Jan 31 22:18:52 2015 (r278004) @@ -182,7 +182,7 @@ static int si_mc_load_microcode(struct r { const __be32 *fw_data; u32 running, blackout = 0; - u32 *io_mc_regs; + const u32 *io_mc_regs; int i, ucode_size, regs_size; if (!rdev->mc_fw) @@ -190,18 +190,18 @@ static int si_mc_load_microcode(struct r switch (rdev->family) { case CHIP_TAHITI: - io_mc_regs = (u32 *)&tahiti_io_mc_regs; + io_mc_regs = (const u32 *)&tahiti_io_mc_regs; ucode_size = SI_MC_UCODE_SIZE; regs_size = TAHITI_IO_MC_REGS_SIZE; break; case CHIP_PITCAIRN: - io_mc_regs = (u32 *)&pitcairn_io_mc_regs; + io_mc_regs = (const u32 *)&pitcairn_io_mc_regs; ucode_size = SI_MC_UCODE_SIZE; regs_size = TAHITI_IO_MC_REGS_SIZE; break; case CHIP_VERDE: default: - io_mc_regs = (u32 *)&verde_io_mc_regs; + io_mc_regs = (const u32 *)&verde_io_mc_regs; ucode_size = SI_MC_UCODE_SIZE; regs_size = TAHITI_IO_MC_REGS_SIZE; break; From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 22:38:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E88B275C; Sat, 31 Jan 2015 22:38:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D3810335; Sat, 31 Jan 2015 22:38:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VMciXY045055; Sat, 31 Jan 2015 22:38:44 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VMcifW045052; Sat, 31 Jan 2015 22:38:44 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201501312238.t0VMcifW045052@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 31 Jan 2015 22:38:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278006 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 22:38:45 -0000 Author: markj Date: Sat Jan 31 22:38:43 2015 New Revision: 278006 URL: https://svnweb.freebsd.org/changeset/base/278006 Log: Fix some proc provider tests: * Avoid hard-coding program paths, except when it's necessary in order to override the use of a shell builtin. * Translate struct proc through psinfo_t so that we can access process arguments via the pr_psargs field of psinfo_t. * Replace uses of pstop and prun with kill(1). MFC after: 1 week Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.discard.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitkilled.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.signal.ksh Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.discard.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.discard.ksh Sat Jan 31 22:26:39 2015 (r278005) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.discard.ksh Sat Jan 31 22:38:43 2015 (r278006) @@ -37,7 +37,8 @@ script() $dtrace -s /dev/stdin <p_pid == $child && - args[1]->pr_psargs == "$longsleep" && args[2] == SIGHUP/ + xlate(args[1])->pr_psargs == "$longsleep" && + args[2] == SIGHUP/ { exit(0); } @@ -48,7 +49,7 @@ killer() { while true; do sleep 1 - /usr/bin/kill -HUP $child + kill -HUP $child done } @@ -58,7 +59,7 @@ if [ $# != 1 ]; then fi dtrace=$1 -longsleep="/usr/bin/sleep 10000" +longsleep="/bin/sleep 10000" /usr/bin/nohup $longsleep & child=$! Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitkilled.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitkilled.ksh Sat Jan 31 22:26:39 2015 (r278005) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitkilled.ksh Sat Jan 31 22:38:43 2015 (r278006) @@ -48,7 +48,7 @@ sleeper() { while true; do $longsleep & - /usr/bin/sleep 1 + sleep 1 kill -9 $! done } @@ -59,7 +59,7 @@ if [ $# != 1 ]; then fi dtrace=$1 -longsleep="/usr/bin/sleep 10000" +longsleep="/bin/sleep 10000" sleeper & child=$! @@ -67,9 +67,9 @@ child=$! script status=$? -pstop $child +kill -STOP $child pkill -P $child kill $child -prun $child +kill -CONT $child exit $status Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.signal.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.signal.ksh Sat Jan 31 22:26:39 2015 (r278005) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.signal.ksh Sat Jan 31 22:38:43 2015 (r278006) @@ -37,7 +37,8 @@ script() $dtrace -s /dev/stdin <pr_ppid == $child && - args[1]->pr_psargs == "$longsleep" && args[2] == SIGUSR1/ + xlate(args[1])->pr_psargs == "$longsleep" && + args[2] == SIGUSR1/ { /* * This is guaranteed to not race with signal-handle. @@ -58,7 +59,7 @@ sleeper() while true; do $longsleep & sleep 1 - /usr/bin/kill -USR1 $! + kill -USR1 $! done } @@ -68,7 +69,7 @@ if [ $# != 1 ]; then fi dtrace=$1 -longsleep="/usr/bin/sleep 10000" +longsleep="/bin/sleep 10000" sleeper & child=$! @@ -76,9 +77,9 @@ child=$! script status=$? -pstop $child +kill -STOP $child pkill -P $child kill $child -prun $child +kill -CONT $child exit $status From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 22:53:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 02BE6956; Sat, 31 Jan 2015 22:53:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D6F4A69B; Sat, 31 Jan 2015 22:53:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VMrLbP053661; Sat, 31 Jan 2015 22:53:21 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VMrIoP053646; Sat, 31 Jan 2015 22:53:18 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201501312253.t0VMrIoP053646@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 31 Jan 2015 22:53:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278007 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 22:53:22 -0000 Author: markj Date: Sat Jan 31 22:53:18 2015 New Revision: 278007 URL: https://svnweb.freebsd.org/changeset/base/278007 Log: Fix a number of DTrace scripting tests: * Avoid hard-coding program paths. * Use -x when searching for oneself in ps(1) output. * Use the correct keyword (egid instead of pgid) in tst.egid.ksh. MFC after: 1 week Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.D_MACRO_UNUSED.overflow.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.arguments.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.egid.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.euid.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.gid.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.ppid.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.projid.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.sid.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.stringmacro.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.taskid.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.uid.ksh Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.D_MACRO_UNUSED.overflow.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.D_MACRO_UNUSED.overflow.ksh Sat Jan 31 22:38:43 2015 (r278006) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.D_MACRO_UNUSED.overflow.ksh Sat Jan 31 22:53:18 2015 (r278007) @@ -41,7 +41,7 @@ if [ $# != 1 ]; then fi dtrace=$1 -bname=`/bin/basename $0` +bname=`basename $0` dfilename=/var/tmp/$bname.$$.d ## Create .d file Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.arguments.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.arguments.ksh Sat Jan 31 22:38:43 2015 (r278006) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.arguments.ksh Sat Jan 31 22:53:18 2015 (r278007) @@ -42,7 +42,7 @@ fi dtrace=$1 -bname=`/usr/bin/basename $0` +bname=`basename $0` dfilename=/var/tmp/$bname.$$ Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.egid.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.egid.ksh Sat Jan 31 22:38:43 2015 (r278006) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.egid.ksh Sat Jan 31 22:53:18 2015 (r278007) @@ -43,7 +43,7 @@ if [ $# != 1 ]; then fi dtrace=$1 -bname=`/usr/bin/basename $0` +bname=`basename $0` dfilename=/var/tmp/$bname.$$.d ## Create .d file @@ -77,7 +77,7 @@ fi #Get the groupid of the calling process using ps -groupid=`ps -o pid,pgid | grep "$$ " | awk '{print $2}' 2>/dev/null` +groupid=`ps -x -o pid,egid | grep "$$ " | awk '{print $2}' 2>/dev/null` if [ $? -ne 0 ]; then print -u2 "unable to get uid of the current process with pid = $$" exit 1 @@ -93,5 +93,5 @@ fi #Cleanup leftovers -/bin/rm -f $dfilename +rm -f $dfilename exit 0 Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.euid.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.euid.ksh Sat Jan 31 22:38:43 2015 (r278006) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.euid.ksh Sat Jan 31 22:53:18 2015 (r278007) @@ -41,7 +41,7 @@ if [ $# != 1 ]; then fi dtrace=$1 -bname=`/bin/basename $0` +bname=`basename $0` dfilename=/var/tmp/$bname.$$ ## Create .d file @@ -69,7 +69,7 @@ EOF chmod 555 $dfilename -userid=`ps -o pid,uid | grep "$$ " | awk '{print $2}' 2>/dev/null` +userid=`ps -x -o pid,uid | grep "$$ " | awk '{print $2}' 2>/dev/null` if [ $? -ne 0 ]; then print -u2 "unable to get uid of the current process with pid = $$" exit 1 @@ -82,5 +82,5 @@ if [ $? -ne 0 ]; then exit 1 fi -#/bin/rm -f $dfilename +rm -f $dfilename exit 0 Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.gid.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.gid.ksh Sat Jan 31 22:38:43 2015 (r278006) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.gid.ksh Sat Jan 31 22:53:18 2015 (r278007) @@ -41,7 +41,7 @@ if [ $# != 1 ]; then fi dtrace=$1 -bname=`/bin/basename $0` +bname=`basename $0` dfilename=/var/tmp/$bname.$$ ## Create .d file @@ -69,7 +69,7 @@ EOF chmod 555 $dfilename -groupid=`ps -o pid,gid | grep "$$ " | awk '{print $2}' 2>/dev/null` +groupid=`ps -x -o pid,gid | grep "$$ " | awk '{print $2}' 2>/dev/null` if [ $? -ne 0 ]; then print -u2 "unable to get uid of the current process with pid = $$" exit 1 @@ -82,5 +82,5 @@ if [ $? -ne 0 ]; then exit 1 fi -#/bin/rm -f $dfilename +rm -f $dfilename exit 0 Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.ppid.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.ppid.ksh Sat Jan 31 22:38:43 2015 (r278006) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.ppid.ksh Sat Jan 31 22:53:18 2015 (r278007) @@ -41,7 +41,7 @@ if [ $# != 1 ]; then fi dtrace=$1 -bname=`/bin/basename $0` +bname=`basename $0` dfilename=/var/tmp/$bname.$$.d ## Create .d file @@ -75,12 +75,12 @@ fi #Pass current pid (I mean parent pid for .d script). -$dfilename $$ >/dev/null 2>&1 +$dfilename $$ #>/dev/null 2>&1 if [ $? -ne 0 ]; then print -u2 "Error in executing $dfilename" exit 1 fi -#/bin/rm -f $dfilename +rm -f $dfilename exit 0 Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.projid.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.projid.ksh Sat Jan 31 22:38:43 2015 (r278006) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.projid.ksh Sat Jan 31 22:53:18 2015 (r278007) @@ -41,7 +41,7 @@ if [ $# != 1 ]; then fi dtrace=$1 -bname=`/bin/basename $0` +bname=`basename $0` dfilename=/var/tmp/$bname.$$ ## Create .d file @@ -69,7 +69,7 @@ EOF chmod 555 $dfilename -projectid=`ps -o pid,projid | grep "$$ " | awk '{print $2}' 2>/dev/null` +projectid=`ps -x -o pid,projid | grep "$$ " | awk '{print $2}' 2>/dev/null` if [ $? -ne 0 ]; then print -u2 "unable to get uid of the current process with pid = $$" exit 1 @@ -82,5 +82,5 @@ if [ $? -ne 0 ]; then exit 1 fi -#/bin/rm -f $dfilename +rm -f $dfilename exit 0 Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.sid.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.sid.ksh Sat Jan 31 22:38:43 2015 (r278006) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.sid.ksh Sat Jan 31 22:53:18 2015 (r278007) @@ -41,7 +41,7 @@ if [ $# != 1 ]; then fi dtrace=$1 -bname=`/bin/basename $0` +bname=`basename $0` dfilename=/var/tmp/$bname.$$ ## Create .d file @@ -69,7 +69,7 @@ EOF chmod 555 $dfilename -sessionid=`ps -o pid,sid | grep "$$ " | awk '{print $2}' 2>/dev/null` +sessionid=`ps -x -o pid,sid | grep "$$ " | awk '{print $2}' 2>/dev/null` if [ $? -ne 0 ]; then print -u2 "unable to get sid of the current process with pid = $$" exit 1 @@ -82,5 +82,5 @@ if [ $? -ne 0 ]; then exit 1 fi -#/bin/rm -f $dfilename +rm -f $dfilename exit 0 Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.stringmacro.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.stringmacro.ksh Sat Jan 31 22:38:43 2015 (r278006) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.stringmacro.ksh Sat Jan 31 22:53:18 2015 (r278007) @@ -41,7 +41,7 @@ if [ $# != 1 ]; then fi dtrace=$1 -bname=`/bin/basename $0` +bname=`basename $0` dfilename=/var/tmp/$bname.$$.d ## Create .d file Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.taskid.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.taskid.ksh Sat Jan 31 22:38:43 2015 (r278006) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.taskid.ksh Sat Jan 31 22:53:18 2015 (r278007) @@ -41,7 +41,7 @@ if [ $# != 1 ]; then fi dtrace=$1 -bname=`/bin/basename $0` +bname=`basename $0` dfilename=/var/tmp/$bname.$$ ## Create .d file @@ -69,7 +69,7 @@ EOF chmod 555 $dfilename -taskidval=`ps -o pid,taskid | grep "$$ " | awk '{print $2}' 2>/dev/null` +taskidval=`ps -x -o pid,taskid | grep "$$ " | awk '{print $2}' 2>/dev/null` if [ $? -ne 0 ]; then print -u2 "unable to get uid of the current process with pid = $$" exit 1 @@ -82,5 +82,5 @@ if [ $? -ne 0 ]; then exit 1 fi -#/bin/rm -f $dfilename +rm -f $dfilename exit 0 Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.uid.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.uid.ksh Sat Jan 31 22:38:43 2015 (r278006) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.uid.ksh Sat Jan 31 22:53:18 2015 (r278007) @@ -41,7 +41,7 @@ if [ $# != 1 ]; then fi dtrace=$1 -bname=`/bin/basename $0` +bname=`basename $0` dfilename=/var/tmp/$bname.$$ ## Create .d file @@ -69,7 +69,7 @@ EOF chmod 555 $dfilename -userid=`ps -o pid,uid | grep "$$ " | awk '{print $2}' 2>/dev/null` +userid=`ps -x -o pid,uid | grep "$$ " | awk '{print $2}' 2>/dev/null` if [ $? -ne 0 ]; then print -u2 "unable to get uid of the current process with pid = $$" exit 1 @@ -82,5 +82,5 @@ if [ $? -ne 0 ]; then exit 1 fi -#/bin/rm -f $dfilename +rm -f $dfilename exit 0 From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 22:56:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B65FBAA6; Sat, 31 Jan 2015 22:56:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 875946AE; Sat, 31 Jan 2015 22:56:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VMudqT054168; Sat, 31 Jan 2015 22:56:39 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VMudKP054167; Sat, 31 Jan 2015 22:56:39 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201501312256.t0VMudKP054167@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 31 Jan 2015 22:56:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278008 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 22:56:39 -0000 Author: markj Date: Sat Jan 31 22:56:38 2015 New Revision: 278008 URL: https://svnweb.freebsd.org/changeset/base/278008 Log: Remove a makefile that isn't present upstream. MFC after: 1 week Deleted: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/Makefile From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 23:02:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 42E55C07; Sat, 31 Jan 2015 23:02:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D6BD7B1; Sat, 31 Jan 2015 23:02:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VN2T9N058446; Sat, 31 Jan 2015 23:02:29 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VN2S2i058440; Sat, 31 Jan 2015 23:02:28 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201501312302.t0VN2S2i058440@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 31 Jan 2015 23:02:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278009 - in head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common: misc usdt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 23:02:29 -0000 Author: markj Date: Sat Jan 31 23:02:27 2015 New Revision: 278009 URL: https://svnweb.freebsd.org/changeset/base/278009 Log: Remove hard-coded invocations of gcc; use cc(1) instead. MFC after: 1 week Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.include.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.noreap.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.noreapring.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.reap.ksh Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.include.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.include.ksh Sat Jan 31 22:56:38 2015 (r278008) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.include.ksh Sat Jan 31 23:02:27 2015 (r278009) @@ -31,7 +31,6 @@ if [ $# != 1 ]; then fi dtrace=$1 -CC=/usr/bin/gcc CFLAGS= doit() @@ -47,7 +46,7 @@ void main() {} EOF - if $CC $CFLAGS -o $cofile $cfile >/dev/null 2>&1; then + if cc $CFLAGS -o $cofile $cfile >/dev/null 2>&1; then $dtrace -xerrtags -C -s /dev/stdin \ >/dev/null 2>$errfile < @@ -67,11 +66,6 @@ EOF rm -f $cofile $cfile 2>/dev/null } -if [ ! -x $CC ]; then - echo "$0: bad compiler: $CC" >& 2 - exit 1 -fi - concurrency=`psrinfo | wc -l` let concurrency=concurrency*4 let i=0 Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.noreap.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.noreap.ksh Sat Jan 31 22:56:38 2015 (r278008) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.noreap.ksh Sat Jan 31 23:02:27 2015 (r278009) @@ -51,7 +51,7 @@ provider test_prov { }; EOF -gcc -c test.c +cc -c test.c if [ $? -ne 0 ]; then print -u2 "failed to compile test.c" exit 1 @@ -61,7 +61,7 @@ if [ $? -ne 0 ]; then print -u2 "failed to create DOF" exit 1 fi -gcc -o test test.o prov.o +cc -o test test.o prov.o if [ $? -ne 0 ]; then print -u2 "failed to link final executable" exit 1 Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.noreapring.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.noreapring.ksh Sat Jan 31 22:56:38 2015 (r278008) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.noreapring.ksh Sat Jan 31 23:02:27 2015 (r278009) @@ -51,7 +51,7 @@ provider test_prov { }; EOF -gcc -c test.c +cc -c test.c if [ $? -ne 0 ]; then print -u2 "failed to compile test.c" exit 1 @@ -61,7 +61,7 @@ if [ $? -ne 0 ]; then print -u2 "failed to create DOF" exit 1 fi -gcc -o test test.o prov.o +cc -o test test.o prov.o if [ $? -ne 0 ]; then print -u2 "failed to link final executable" exit 1 Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.reap.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.reap.ksh Sat Jan 31 22:56:38 2015 (r278008) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.reap.ksh Sat Jan 31 23:02:27 2015 (r278009) @@ -51,7 +51,7 @@ provider test_prov { }; EOF -gcc -c test.c +cc -c test.c if [ $? -ne 0 ]; then print -u2 "failed to compile test.c" exit 1 @@ -61,7 +61,7 @@ if [ $? -ne 0 ]; then print -u2 "failed to create DOF" exit 1 fi -gcc -o test test.o prov.o +cc -o test test.o prov.o if [ $? -ne 0 ]; then print -u2 "failed to link final executable" exit 1 From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 23:08:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B4D40D89; Sat, 31 Jan 2015 23:08:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A05897E0; Sat, 31 Jan 2015 23:08:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VN8Uru059193; Sat, 31 Jan 2015 23:08:30 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VN8UgD059192; Sat, 31 Jan 2015 23:08:30 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501312308.t0VN8UgD059192@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 31 Jan 2015 23:08:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278010 - head/contrib/libcxxrt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 23:08:30 -0000 Author: dim Date: Sat Jan 31 23:08:29 2015 New Revision: 278010 URL: https://svnweb.freebsd.org/changeset/base/278010 Log: Revert r256642, not only to reduce diffs against upstream libcxxrt, but also because it is the wrong approach: comparing typeinfo names deeply causes trouble if two loaded DSOs use independent types of the same name. In addition, this particular change was never merged to FreeBSD 10.x and 9.x, so let's get rid of it before it ends up in an 11.x release. Discussed with: theraven, joerg@netbsd Modified: head/contrib/libcxxrt/typeinfo.cc Modified: head/contrib/libcxxrt/typeinfo.cc ============================================================================== --- head/contrib/libcxxrt/typeinfo.cc Sat Jan 31 23:02:27 2015 (r278009) +++ head/contrib/libcxxrt/typeinfo.cc Sat Jan 31 23:08:29 2015 (r278010) @@ -35,23 +35,15 @@ type_info::~type_info() {} bool type_info::operator==(const type_info &other) const { -#ifdef LIBCXXRT_MERGED_TYPEINFO return __type_name == other.__type_name; -#else - return __type_name == other.__type_name || strcmp(__type_name, other.__type_name) == 0; -#endif } bool type_info::operator!=(const type_info &other) const { - return !operator==(other); + return __type_name != other.__type_name; } bool type_info::before(const type_info &other) const { -#ifdef LIBCXXRT_MERGED_TYPEINFO return __type_name < other.__type_name; -#else - return strcmp(__type_name, other.__type_name) < 0; -#endif } const char* type_info::name() const { From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 23:11:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1884EE0; Sat, 31 Jan 2015 23:11:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC658885; Sat, 31 Jan 2015 23:11:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VNBwUR063096; Sat, 31 Jan 2015 23:11:58 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VNBw1J063095; Sat, 31 Jan 2015 23:11:58 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201501312311.t0VNBw1J063095@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 31 Jan 2015 23:11:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278011 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 23:11:58 -0000 Author: markj Date: Sat Jan 31 23:11:57 2015 New Revision: 278011 URL: https://svnweb.freebsd.org/changeset/base/278011 Log: Use syscall::exit instead of the nonexistent syscall::rexit. MFC after: 1 week Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.vfork.d Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.vfork.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.vfork.d Sat Jan 31 23:08:29 2015 (r278010) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.vfork.d Sat Jan 31 23:11:57 2015 (r278011) @@ -54,7 +54,7 @@ pid$1:a.out:go: exit(1); } -syscall::rexit:entry +syscall::exit:entry /pid == $1/ { exit(0); From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 23:12:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5C2967B; Sat, 31 Jan 2015 23:12:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4738288A; Sat, 31 Jan 2015 23:12:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VNCUlM063224; Sat, 31 Jan 2015 23:12:30 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VNCUGe063222; Sat, 31 Jan 2015 23:12:30 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201501312312.t0VNCUGe063222@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 31 Jan 2015 23:12:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278012 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 23:12:30 -0000 Author: markj Date: Sat Jan 31 23:12:29 2015 New Revision: 278012 URL: https://svnweb.freebsd.org/changeset/base/278012 Log: Fix mktemp(1) usage. MFC after: 1 week Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.corruptenv.ksh Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.corruptenv.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.corruptenv.ksh Sat Jan 31 23:11:57 2015 (r278011) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.corruptenv.ksh Sat Jan 31 23:12:29 2015 (r278012) @@ -48,7 +48,7 @@ fi dtrace="$1" startdir="$PWD" -dir=$(mktemp -td drtiXXXXXX) +dir=$(mktemp -d -t drtiXXXXXX) if (( $? != 0 )); then print -u2 'Could not create safe temporary directory' exit 2 From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 23:14:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E59B81DD; Sat, 31 Jan 2015 23:14:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D13E1897; Sat, 31 Jan 2015 23:14:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VNEPeS063487; Sat, 31 Jan 2015 23:14:25 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VNEP7B063486; Sat, 31 Jan 2015 23:14:25 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501312314.t0VNEP7B063486@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 31 Jan 2015 23:14:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r278013 - vendor/libcxxrt/dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 23:14:26 -0000 Author: dim Date: Sat Jan 31 23:14:24 2015 New Revision: 278013 URL: https://svnweb.freebsd.org/changeset/base/278013 Log: Import libcxxrt master 1cb607e89f6135bbc10f3d3b6fba1f983e258dcc. Interesting fixes: 1cb607e Correct gcc version check for __cxa_begin_catch() declaration with or without throw() Modified: vendor/libcxxrt/dist/exception.cc Modified: vendor/libcxxrt/dist/exception.cc ============================================================================== --- vendor/libcxxrt/dist/exception.cc Sat Jan 31 23:12:29 2015 (r278012) +++ vendor/libcxxrt/dist/exception.cc Sat Jan 31 23:14:24 2015 (r278013) @@ -673,7 +673,7 @@ static _Unwind_Reason_Code trace(struct * If the failure happened by falling off the end of the stack without finding * a handler, prints a back trace before aborting. */ -#if __GNUC__ > 3 && __GNUC_MINOR__ > 2 +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) extern "C" void *__cxa_begin_catch(void *e) throw(); #else extern "C" void *__cxa_begin_catch(void *e); @@ -1189,7 +1189,7 @@ BEGIN_PERSONALITY_FUNCTION(__gxx_persona * pointer to the caught exception, which is either the adjusted pointer (for * C++ exceptions) of the unadjusted pointer (for foreign exceptions). */ -#if __GNUC__ > 3 && __GNUC_MINOR__ > 2 +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) extern "C" void *__cxa_begin_catch(void *e) throw() #else extern "C" void *__cxa_begin_catch(void *e) From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 23:16:12 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 79142318; Sat, 31 Jan 2015 23:16:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4A6898AC; Sat, 31 Jan 2015 23:16:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VNGCUG063781; Sat, 31 Jan 2015 23:16:12 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VNGCr1063780; Sat, 31 Jan 2015 23:16:12 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501312316.t0VNGCr1063780@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 31 Jan 2015 23:16:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r278014 - vendor/libcxxrt/2014-12-31-1cb607e89f6135bbc10f3d3b6fba1f983e258dcc X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 23:16:12 -0000 Author: dim Date: Sat Jan 31 23:16:11 2015 New Revision: 278014 URL: https://svnweb.freebsd.org/changeset/base/278014 Log: Tag libcxxrt master 1cb607e89f6135bbc10f3d3b6fba1f983e258dcc. Added: vendor/libcxxrt/2014-12-31-1cb607e89f6135bbc10f3d3b6fba1f983e258dcc/ - copied from r278013, vendor/libcxxrt/dist/ From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 23:31:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ADF6D5B9; Sat, 31 Jan 2015 23:31:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 99E09A17; Sat, 31 Jan 2015 23:31:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VNVkTV072749; Sat, 31 Jan 2015 23:31:46 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VNVk3p072748; Sat, 31 Jan 2015 23:31:46 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501312331.t0VNVk3p072748@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 31 Jan 2015 23:31:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278016 - head/contrib/libcxxrt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 23:31:46 -0000 Author: dim Date: Sat Jan 31 23:31:45 2015 New Revision: 278016 URL: https://svnweb.freebsd.org/changeset/base/278016 Log: Import libcxxrt master 1cb607e89f6135bbc10f3d3b6fba1f983e258dcc. Interesting fixes: 1cb607e Correct gcc version check for __cxa_begin_catch() declaration with or without throw() MFC after: 3 days Modified: head/contrib/libcxxrt/exception.cc Directory Properties: head/contrib/libcxxrt/ (props changed) Modified: head/contrib/libcxxrt/exception.cc ============================================================================== --- head/contrib/libcxxrt/exception.cc Sat Jan 31 23:24:25 2015 (r278015) +++ head/contrib/libcxxrt/exception.cc Sat Jan 31 23:31:45 2015 (r278016) @@ -673,7 +673,7 @@ static _Unwind_Reason_Code trace(struct * If the failure happened by falling off the end of the stack without finding * a handler, prints a back trace before aborting. */ -#if __GNUC__ > 3 && __GNUC_MINOR__ > 2 +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) extern "C" void *__cxa_begin_catch(void *e) throw(); #else extern "C" void *__cxa_begin_catch(void *e); @@ -1191,7 +1191,7 @@ BEGIN_PERSONALITY_FUNCTION(__gxx_persona * pointer to the caught exception, which is either the adjusted pointer (for * C++ exceptions) of the unadjusted pointer (for foreign exceptions). */ -#if __GNUC__ > 3 && __GNUC_MINOR__ > 2 +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) extern "C" void *__cxa_begin_catch(void *e) throw() #else extern "C" void *__cxa_begin_catch(void *e) From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 23:49:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 68F4A939; Sat, 31 Jan 2015 23:49:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 523A8B0C; Sat, 31 Jan 2015 23:49:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VNn3an078610; Sat, 31 Jan 2015 23:49:03 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VNmxZX078437; Sat, 31 Jan 2015 23:48:59 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501312348.t0VNmxZX078437@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 31 Jan 2015 23:48:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278017 - in stable: 10/contrib/libcxxrt 10/lib/libcxxrt 9/contrib/libcxxrt 9/lib/libcxxrt X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 23:49:03 -0000 Author: dim Date: Sat Jan 31 23:48:59 2015 New Revision: 278017 URL: https://svnweb.freebsd.org/changeset/base/278017 Log: MFC r273381 (by bapt): Add support for __cxa_throw_bad_array_new_length in libcxxrt It is required for use with newer g++49 Differential Revision: https://reviews.freebsd.org/D982 Reviewed by: theraven Approved by: theraven MFC r276417: Import libcxxrt master 00bc29eb6513624824a6d7db2ebc768a4216a604. Interesting fixes: 76584a0 Reorganize code to use only 32bit atomic ops for 32bit platforms 30d2ae5 Implement __cxa_throw_bad_array_new_length Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D1390 Modified: stable/9/contrib/libcxxrt/atomic.h stable/9/contrib/libcxxrt/auxhelper.cc stable/9/contrib/libcxxrt/cxxabi.h stable/9/contrib/libcxxrt/dwarf_eh.h stable/9/contrib/libcxxrt/dynamic_cast.cc stable/9/contrib/libcxxrt/exception.cc stable/9/contrib/libcxxrt/guard.cc stable/9/contrib/libcxxrt/stdexcept.cc stable/9/contrib/libcxxrt/stdexcept.h stable/9/contrib/libcxxrt/typeinfo.cc stable/9/contrib/libcxxrt/unwind-arm.h stable/9/contrib/libcxxrt/unwind.h stable/9/lib/libcxxrt/Version.map Directory Properties: stable/9/ (props changed) stable/9/contrib/ (props changed) stable/9/contrib/libcxxrt/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libcxxrt/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/libcxxrt/atomic.h stable/10/contrib/libcxxrt/auxhelper.cc stable/10/contrib/libcxxrt/cxxabi.h stable/10/contrib/libcxxrt/dwarf_eh.h stable/10/contrib/libcxxrt/dynamic_cast.cc stable/10/contrib/libcxxrt/exception.cc stable/10/contrib/libcxxrt/guard.cc stable/10/contrib/libcxxrt/stdexcept.cc stable/10/contrib/libcxxrt/stdexcept.h stable/10/contrib/libcxxrt/typeinfo.cc stable/10/contrib/libcxxrt/unwind-arm.h stable/10/contrib/libcxxrt/unwind.h stable/10/lib/libcxxrt/Version.map Directory Properties: stable/10/ (props changed) Modified: stable/9/contrib/libcxxrt/atomic.h ============================================================================== --- stable/9/contrib/libcxxrt/atomic.h Sat Jan 31 23:31:45 2015 (r278016) +++ stable/9/contrib/libcxxrt/atomic.h Sat Jan 31 23:48:59 2015 (r278017) @@ -11,7 +11,7 @@ */ #if __has_builtin(__c11_atomic_exchange) #define ATOMIC_SWAP(addr, val)\ - __c11_atomic_exchange((_Atomic(__typeof__(val))*)addr, val, __ATOMIC_ACQ_REL) + __c11_atomic_exchange(reinterpret_cast<_Atomic(__typeof__(val))*>(addr), val, __ATOMIC_ACQ_REL) #elif __has_builtin(__sync_swap) #define ATOMIC_SWAP(addr, val)\ __sync_swap(addr, val) @@ -22,7 +22,7 @@ #if __has_builtin(__c11_atomic_load) #define ATOMIC_LOAD(addr)\ - __c11_atomic_load((_Atomic(__typeof__(*addr))*)addr, __ATOMIC_ACQUIRE) + __c11_atomic_load(reinterpret_cast<_Atomic(__typeof__(*addr))*>(addr), __ATOMIC_ACQUIRE) #else #define ATOMIC_LOAD(addr)\ (__sync_synchronize(), *addr) Modified: stable/9/contrib/libcxxrt/auxhelper.cc ============================================================================== --- stable/9/contrib/libcxxrt/auxhelper.cc Sat Jan 31 23:31:45 2015 (r278016) +++ stable/9/contrib/libcxxrt/auxhelper.cc Sat Jan 31 23:48:59 2015 (r278017) @@ -75,3 +75,8 @@ extern "C" void __cxa_deleted_virtual() { abort(); } + +extern "C" void __cxa_throw_bad_array_new_length() +{ + throw std::bad_array_new_length(); +} Modified: stable/9/contrib/libcxxrt/cxxabi.h ============================================================================== --- stable/9/contrib/libcxxrt/cxxabi.h Sat Jan 31 23:31:45 2015 (r278016) +++ stable/9/contrib/libcxxrt/cxxabi.h Sat Jan 31 23:48:59 2015 (r278017) @@ -110,7 +110,7 @@ struct __cxa_exception * handler count reaches 0 (which it doesn't with the top bit set). */ int handlerCount; -#ifdef __arm__ +#if defined(__arm__) && !defined(__ARM_DWARF_EH__) /** * The ARM EH ABI requires the unwind library to keep track of exceptions * during cleanups. These support nesting, so we need to keep a list of Modified: stable/9/contrib/libcxxrt/dwarf_eh.h ============================================================================== --- stable/9/contrib/libcxxrt/dwarf_eh.h Sat Jan 31 23:31:45 2015 (r278016) +++ stable/9/contrib/libcxxrt/dwarf_eh.h Sat Jan 31 23:48:59 2015 (r278017) @@ -83,7 +83,7 @@ enum dwarf_data_encoding */ static inline enum dwarf_data_encoding get_encoding(unsigned char x) { - return (enum dwarf_data_encoding)(x & 0xf); + return static_cast(x & 0xf); } /** @@ -115,7 +115,7 @@ enum dwarf_data_relative */ static inline enum dwarf_data_relative get_base(unsigned char x) { - return (enum dwarf_data_relative)(x & 0x70); + return static_cast(x & 0x70); } /** * Returns whether an encoding represents an indirect address. @@ -206,9 +206,9 @@ static int64_t read_sleb128(dw_eh_ptr_t if ((uleb >> (bits-1)) == 1) { // Sign extend by setting all bits in front of it to 1 - uleb |= ((int64_t)-1) << bits; + uleb |= static_cast(-1) << bits; } - return (int64_t)uleb; + return static_cast(uleb); } /** * Reads a value using the specified encoding from the address pointed to by @@ -224,7 +224,7 @@ static uint64_t read_value(char encoding // Read fixed-length types #define READ(dwarf, type) \ case dwarf:\ - v = (uint64_t)(*(type*)(*data));\ + v = static_cast(*reinterpret_cast(*data));\ *data += sizeof(type);\ break; READ(DW_EH_PE_udata2, uint16_t) @@ -263,16 +263,16 @@ static uint64_t resolve_indirect_value(_ switch (get_base(encoding)) { case DW_EH_PE_pcrel: - v += (uint64_t)start; + v += reinterpret_cast(start); break; case DW_EH_PE_textrel: - v += (uint64_t)_Unwind_GetTextRelBase(c); + v += static_cast(static_cast(_Unwind_GetTextRelBase(c))); break; case DW_EH_PE_datarel: - v += (uint64_t)_Unwind_GetDataRelBase(c); + v += static_cast(static_cast(_Unwind_GetDataRelBase(c))); break; case DW_EH_PE_funcrel: - v += (uint64_t)_Unwind_GetRegionStart(c); + v += static_cast(static_cast(_Unwind_GetRegionStart(c))); default: break; } @@ -282,7 +282,7 @@ static uint64_t resolve_indirect_value(_ // be a GCC extensions, so not properly documented... if (is_indirect(encoding)) { - v = (uint64_t)(uintptr_t)*(void**)v; + v = static_cast(reinterpret_cast(*reinterpret_cast(v))); } return v; } @@ -342,14 +342,14 @@ static inline struct dwarf_eh_lsda parse { struct dwarf_eh_lsda lsda; - lsda.region_start = (dw_eh_ptr_t)(uintptr_t)_Unwind_GetRegionStart(context); + lsda.region_start = reinterpret_cast(_Unwind_GetRegionStart(context)); // If the landing pads are relative to anything other than the start of // this region, find out where. This is @LPStart in the spec, although the // encoding that GCC uses does not quite match the spec. - uint64_t v = (uint64_t)(uintptr_t)lsda.region_start; + uint64_t v = static_cast(reinterpret_cast(lsda.region_start)); read_value_with_encoding(context, &data, &v); - lsda.landing_pads = (dw_eh_ptr_t)(uintptr_t)v; + lsda.landing_pads = reinterpret_cast(static_cast(v)); // If there is a type table, find out where it is. This is @TTBase in the // spec. Note: we find whether there is a type table pointer by checking @@ -365,18 +365,18 @@ static inline struct dwarf_eh_lsda parse lsda.type_table = type_table; //lsda.type_table = (uintptr_t*)(data + v); } -#if __arm__ +#if defined(__arm__) && !defined(__ARM_DWARF_EH__) lsda.type_table_encoding = (DW_EH_PE_pcrel | DW_EH_PE_indirect); #endif - lsda.callsite_encoding = (enum dwarf_data_encoding)(*(data++)); + lsda.callsite_encoding = static_cast(*(data++)); // Action table is immediately after the call site table lsda.action_table = data; - uintptr_t callsite_size = (uintptr_t)read_uleb128(&data); + uintptr_t callsite_size = static_cast(read_uleb128(&data)); lsda.action_table = data + callsite_size; // Call site table is immediately after the header - lsda.call_site_table = (dw_eh_ptr_t)data; + lsda.call_site_table = static_cast(data); return lsda; @@ -413,7 +413,7 @@ static bool dwarf_eh_find_callsite(struc result->landing_pad = 0; // The current instruction pointer offset within the region uint64_t ip = _Unwind_GetIP(context) - _Unwind_GetRegionStart(context); - unsigned char *callsite_table = (unsigned char*)lsda->call_site_table; + unsigned char *callsite_table = static_cast(lsda->call_site_table); while (callsite_table <= lsda->action_table) { @@ -463,17 +463,17 @@ static bool dwarf_eh_find_callsite(struc /// Defines an exception class from 8 bytes (endian independent) #define EXCEPTION_CLASS(a,b,c,d,e,f,g,h) \ - (((uint64_t)a << 56) +\ - ((uint64_t)b << 48) +\ - ((uint64_t)c << 40) +\ - ((uint64_t)d << 32) +\ - ((uint64_t)e << 24) +\ - ((uint64_t)f << 16) +\ - ((uint64_t)g << 8) +\ - ((uint64_t)h)) + ((static_cast(a) << 56) +\ + (static_cast(b) << 48) +\ + (static_cast(c) << 40) +\ + (static_cast(d) << 32) +\ + (static_cast(e) << 24) +\ + (static_cast(f) << 16) +\ + (static_cast(g) << 8) +\ + (static_cast(h))) #define GENERIC_EXCEPTION_CLASS(e,f,g,h) \ - ((uint32_t)e << 24) +\ - ((uint32_t)f << 16) +\ - ((uint32_t)g << 8) +\ - ((uint32_t)h) + (static_cast(e) << 24) +\ + (static_cast(f) << 16) +\ + (static_cast(g) << 8) +\ + (static_cast(h)) Modified: stable/9/contrib/libcxxrt/dynamic_cast.cc ============================================================================== --- stable/9/contrib/libcxxrt/dynamic_cast.cc Sat Jan 31 23:31:45 2015 (r278016) +++ stable/9/contrib/libcxxrt/dynamic_cast.cc Sat Jan 31 23:48:59 2015 (r278017) @@ -44,7 +44,7 @@ struct vtable_header * Simple macro that does pointer arithmetic in bytes but returns a value of * the same type as the original. */ -#define ADD_TO_PTR(x, off) (__typeof__(x))(((char*)x) + off) +#define ADD_TO_PTR(x, off) reinterpret_cast<__typeof__(x)>(reinterpret_cast(x) + off) bool std::type_info::__do_catch(std::type_info const *ex_type, void **exception_object, @@ -166,7 +166,7 @@ bool __vmi_class_type_info::__do_upcast( if (info->isVirtual()) { // Object's vtable - ptrdiff_t *off = *(ptrdiff_t**)obj; + ptrdiff_t *off = *static_cast(obj); // Offset location in vtable off = ADD_TO_PTR(off, offset); offset = *off; @@ -202,9 +202,9 @@ extern "C" void* __dynamic_cast(const vo const __class_type_info *dst, ptrdiff_t src2dst_offset) { - char *vtable_location = *(char**)sub; + const char *vtable_location = *static_cast(sub); const vtable_header *header = - (const vtable_header*)(vtable_location - sizeof(vtable_header)); - void *leaf = ADD_TO_PTR((void*)sub, header->leaf_offset); + reinterpret_cast(vtable_location - sizeof(vtable_header)); + void *leaf = ADD_TO_PTR(const_cast(sub), header->leaf_offset); return header->type->cast_to(leaf, dst); } Modified: stable/9/contrib/libcxxrt/exception.cc ============================================================================== --- stable/9/contrib/libcxxrt/exception.cc Sat Jan 31 23:31:45 2015 (r278016) +++ stable/9/contrib/libcxxrt/exception.cc Sat Jan 31 23:48:59 2015 (r278017) @@ -71,11 +71,11 @@ static void saveLandingPad(struct _Unwin int selector, dw_eh_ptr_t landingPad) { -#ifdef __arm__ +#if defined(__arm__) && !defined(__ARM_DWARF_EH__) // On ARM, we store the saved exception in the generic part of the structure ucb->barrier_cache.sp = _Unwind_GetGR(context, 13); - ucb->barrier_cache.bitpattern[1] = (uint32_t)selector; - ucb->barrier_cache.bitpattern[3] = (uint32_t)landingPad; + ucb->barrier_cache.bitpattern[1] = static_cast(selector); + ucb->barrier_cache.bitpattern[3] = reinterpret_cast(landingPad); #endif // Cache the results for the phase 2 unwind, if we found a handler // and this is not a foreign exception. @@ -95,15 +95,15 @@ static int loadLandingPad(struct _Unwind unsigned long *selector, dw_eh_ptr_t *landingPad) { -#ifdef __arm__ +#if defined(__arm__) && !defined(__ARM_DWARF_EH__) *selector = ucb->barrier_cache.bitpattern[1]; - *landingPad = (dw_eh_ptr_t)ucb->barrier_cache.bitpattern[3]; + *landingPad = reinterpret_cast(ucb->barrier_cache.bitpattern[3]); return 1; #else if (ex) { *selector = ex->handlerSwitchValue; - *landingPad = (dw_eh_ptr_t)ex->catchTemp; + *landingPad = reinterpret_cast(ex->catchTemp); return 0; } return 0; @@ -113,7 +113,7 @@ static int loadLandingPad(struct _Unwind static inline _Unwind_Reason_Code continueUnwinding(struct _Unwind_Exception *ex, struct _Unwind_Context *context) { -#ifdef __arm__ +#if defined(__arm__) && !defined(__ARM_DWARF_EH__) if (__gnu_unwind_frame(ex, context) != _URC_OK) { return _URC_FAILURE; } #endif return _URC_CONTINUE_UNWIND; @@ -204,7 +204,7 @@ struct __cxa_dependent_exception terminate_handler terminateHandler; __cxa_exception *nextException; int handlerCount; -#ifdef __arm__ +#if defined(__arm__) && !defined(__ARM_DWARF_EH__) _Unwind_Exception *nextCleanup; int cleanupCount; #endif @@ -267,13 +267,13 @@ static bool isDependentException(uint64_ static __cxa_exception *exceptionFromPointer(void *ex) { - return (__cxa_exception*)((char*)ex - + return reinterpret_cast<__cxa_exception*>(static_cast(ex) - offsetof(struct __cxa_exception, unwindHeader)); } static __cxa_exception *realExceptionFromException(__cxa_exception *ex) { if (!isDependentException(ex->unwindHeader.exception_class)) { return ex; } - return ((__cxa_exception*)(((__cxa_dependent_exception*)ex)->primaryException))-1; + return reinterpret_cast<__cxa_exception*>((reinterpret_cast<__cxa_dependent_exception*>(ex))->primaryException)-1; } @@ -304,13 +304,13 @@ static pthread_key_t eh_key; static void exception_cleanup(_Unwind_Reason_Code reason, struct _Unwind_Exception *ex) { - __cxa_free_exception((void*)ex); + __cxa_free_exception(static_cast(ex)); } static void dependent_exception_cleanup(_Unwind_Reason_Code reason, struct _Unwind_Exception *ex) { - __cxa_free_dependent_exception((void*)ex); + __cxa_free_dependent_exception(static_cast(ex)); } /** @@ -333,13 +333,13 @@ static void free_exception_list(__cxa_ex */ static void thread_cleanup(void* thread_info) { - __cxa_thread_info *info = (__cxa_thread_info*)thread_info; + __cxa_thread_info *info = static_cast<__cxa_thread_info*>(thread_info); if (info->globals.caughtExceptions) { // If this is a foreign exception, ask it to clean itself up. if (info->foreign_exception_state != __cxa_thread_info::none) { - _Unwind_Exception *e = (_Unwind_Exception*)info->globals.caughtExceptions; + _Unwind_Exception *e = reinterpret_cast<_Unwind_Exception*>(info->globals.caughtExceptions); e->exception_cleanup(_URC_FOREIGN_EXCEPTION_CAUGHT, e); } else @@ -379,8 +379,8 @@ static void init_key(void) return; } pthread_key_create(&eh_key, thread_cleanup); - pthread_setspecific(eh_key, (void*)0x42); - fakeTLS = (pthread_getspecific(eh_key) != (void*)0x42); + pthread_setspecific(eh_key, reinterpret_cast(0x42)); + fakeTLS = (pthread_getspecific(eh_key) != reinterpret_cast(0x42)); pthread_setspecific(eh_key, 0); } @@ -394,10 +394,10 @@ static __cxa_thread_info *thread_info() fakeTLS = true; } if (fakeTLS) { return &singleThreadInfo; } - __cxa_thread_info *info = (__cxa_thread_info*)pthread_getspecific(eh_key); + __cxa_thread_info *info = static_cast<__cxa_thread_info*>(pthread_getspecific(eh_key)); if (0 == info) { - info = (__cxa_thread_info*)calloc(1, sizeof(__cxa_thread_info)); + info = static_cast<__cxa_thread_info*>(calloc(1, sizeof(__cxa_thread_info))); pthread_setspecific(eh_key, info); } return info; @@ -409,7 +409,7 @@ static __cxa_thread_info *thread_info() static __cxa_thread_info *thread_info_fast() { if (fakeTLS) { return &singleThreadInfo; } - return (__cxa_thread_info*)pthread_getspecific(eh_key); + return static_cast<__cxa_thread_info*>(pthread_getspecific(eh_key)); } /** * ABI function returning the __cxa_eh_globals structure. @@ -472,7 +472,7 @@ static char *emergency_malloc(size_t siz if (0 != m) { pthread_mutex_unlock(&emergency_malloc_lock); - return (char*)m; + return static_cast(m); } for (int i=0 ; i<16 ; i++) { @@ -510,7 +510,7 @@ static void emergency_malloc_free(char * // Find the buffer corresponding to this pointer. for (int i=0 ; i<16 ; i++) { - if (ptr == (void*)(emergency_buffer + (1024 * i))) + if (ptr == static_cast(emergency_buffer + (1024 * i))) { buffer = i; break; @@ -521,7 +521,7 @@ static void emergency_malloc_free(char * // emergency_malloc() is expected to return 0-initialized data. We don't // zero the buffer when allocating it, because the static buffers will // begin life containing 0 values. - memset((void*)ptr, 0, 1024); + memset(ptr, 0, 1024); // Signal the condition variable to wake up any threads that are blocking // waiting for some space in the emergency buffer pthread_mutex_lock(&emergency_malloc_lock); @@ -535,7 +535,7 @@ static void emergency_malloc_free(char * static char *alloc_or_die(size_t size) { - char *buffer = (char*)calloc(1, size); + char *buffer = static_cast(calloc(1, size)); // If calloc() doesn't want to give us any memory, try using an emergency // buffer. @@ -597,7 +597,7 @@ extern "C" void *__cxa_allocate_dependen */ extern "C" void __cxa_free_exception(void *thrown_exception) { - __cxa_exception *ex = ((__cxa_exception*)thrown_exception) - 1; + __cxa_exception *ex = reinterpret_cast<__cxa_exception*>(thrown_exception) - 1; // Free the object that was thrown, calling its destructor if (0 != ex->exceptionDestructor) { @@ -612,7 +612,7 @@ extern "C" void __cxa_free_exception(voi } } - free_exception((char*)ex); + free_exception(reinterpret_cast(ex)); } static void releaseException(__cxa_exception *exception) @@ -633,13 +633,13 @@ static void releaseException(__cxa_excep void __cxa_free_dependent_exception(void *thrown_exception) { - __cxa_dependent_exception *ex = ((__cxa_dependent_exception*)thrown_exception) - 1; + __cxa_dependent_exception *ex = reinterpret_cast<__cxa_dependent_exception*>(thrown_exception) - 1; assert(isDependentException(ex->unwindHeader.exception_class)); if (ex->primaryException) { - releaseException(realExceptionFromException((__cxa_exception*)ex)); + releaseException(realExceptionFromException(reinterpret_cast<__cxa_exception*>(ex))); } - free_exception((char*)ex); + free_exception(reinterpret_cast(ex)); } /** @@ -654,8 +654,8 @@ static _Unwind_Reason_Code trace(struct { Dl_info myinfo; int mylookup = - dladdr((void*)(uintptr_t)__cxa_current_exception_type, &myinfo); - void *ip = (void*)_Unwind_GetIP(context); + dladdr(reinterpret_cast(__cxa_current_exception_type), &myinfo); + void *ip = reinterpret_cast(_Unwind_GetIP(context)); Dl_info info; if (dladdr(ip, &info) != 0) { @@ -673,6 +673,11 @@ static _Unwind_Reason_Code trace(struct * If the failure happened by falling off the end of the stack without finding * a handler, prints a back trace before aborting. */ +#if __GNUC__ > 3 && __GNUC_MINOR__ > 2 +extern "C" void *__cxa_begin_catch(void *e) throw(); +#else +extern "C" void *__cxa_begin_catch(void *e); +#endif static void report_failure(_Unwind_Reason_Code err, __cxa_exception *thrown_exception) { switch (err) @@ -681,14 +686,16 @@ static void report_failure(_Unwind_Reaso case _URC_FATAL_PHASE1_ERROR: fprintf(stderr, "Fatal error during phase 1 unwinding\n"); break; -#ifndef __arm__ +#if !defined(__arm__) || defined(__ARM_DWARF_EH__) case _URC_FATAL_PHASE2_ERROR: fprintf(stderr, "Fatal error during phase 2 unwinding\n"); break; #endif case _URC_END_OF_STACK: + __cxa_begin_catch (&(thrown_exception->unwindHeader)); + std::terminate(); fprintf(stderr, "Terminating due to uncaught exception %p", - (void*)thrown_exception); + static_cast(thrown_exception)); thrown_exception = realExceptionFromException(thrown_exception); static const __class_type_info *e_ti = static_cast(&typeid(std::exception)); @@ -697,8 +704,8 @@ static void report_failure(_Unwind_Reaso if (throw_ti) { std::exception *e = - (std::exception*)e_ti->cast_to((void*)(thrown_exception+1), - throw_ti); + static_cast(e_ti->cast_to(static_cast(thrown_exception+1), + throw_ti)); if (e) { fprintf(stderr, " '%s'", e->what()); @@ -706,18 +713,21 @@ static void report_failure(_Unwind_Reaso } size_t bufferSize = 128; - char *demangled = (char*)malloc(bufferSize); + char *demangled = static_cast(malloc(bufferSize)); const char *mangled = thrown_exception->exceptionType->name(); int status; demangled = __cxa_demangle(mangled, demangled, &bufferSize, &status); fprintf(stderr, " of type %s\n", - status == 0 ? (const char*)demangled : mangled); + status == 0 ? demangled : mangled); if (status == 0) { free(demangled); } // Print a back trace if no handler is found. // TODO: Make this optional #ifndef __arm__ _Unwind_Backtrace(trace, 0); #endif + + // Just abort. No need to call std::terminate for the second time + abort(); break; } std::terminate(); @@ -755,7 +765,7 @@ extern "C" void __cxa_throw(void *thrown std::type_info *tinfo, void(*dest)(void*)) { - __cxa_exception *ex = ((__cxa_exception*)thrown_exception) - 1; + __cxa_exception *ex = reinterpret_cast<__cxa_exception*>(thrown_exception) - 1; ex->referenceCount = 1; ex->exceptionType = tinfo; @@ -773,7 +783,7 @@ extern "C" void __cxa_rethrow_primary_ex if (NULL == thrown_exception) { return; } __cxa_exception *original = exceptionFromPointer(thrown_exception); - __cxa_dependent_exception *ex = ((__cxa_dependent_exception*)__cxa_allocate_dependent_exception())-1; + __cxa_dependent_exception *ex = reinterpret_cast<__cxa_dependent_exception*>(__cxa_allocate_dependent_exception())-1; ex->primaryException = thrown_exception; __cxa_increment_exception_refcount(thrown_exception); @@ -782,7 +792,7 @@ extern "C" void __cxa_rethrow_primary_ex ex->unwindHeader.exception_class = dependent_exception_class; ex->unwindHeader.exception_cleanup = dependent_exception_cleanup; - throw_exception((__cxa_exception*)ex); + throw_exception(reinterpret_cast<__cxa_exception*>(ex)); } extern "C" void *__cxa_current_primary_exception(void) @@ -799,14 +809,14 @@ extern "C" void *__cxa_current_primary_e extern "C" void __cxa_increment_exception_refcount(void* thrown_exception) { if (NULL == thrown_exception) { return; } - __cxa_exception *ex = ((__cxa_exception*)thrown_exception) - 1; + __cxa_exception *ex = static_cast<__cxa_exception*>(thrown_exception) - 1; if (isDependentException(ex->unwindHeader.exception_class)) { return; } __sync_fetch_and_add(&ex->referenceCount, 1); } extern "C" void __cxa_decrement_exception_refcount(void* thrown_exception) { if (NULL == thrown_exception) { return; } - __cxa_exception *ex = ((__cxa_exception*)thrown_exception) - 1; + __cxa_exception *ex = static_cast<__cxa_exception*>(thrown_exception) - 1; releaseException(ex); } @@ -838,7 +848,7 @@ extern "C" void __cxa_rethrow() if (ti->foreign_exception_state != __cxa_thread_info::none) { ti->foreign_exception_state = __cxa_thread_info::rethrown; - _Unwind_Exception *e = (_Unwind_Exception*)ex; + _Unwind_Exception *e = reinterpret_cast<_Unwind_Exception*>(ex); _Unwind_Reason_Code err = _Unwind_Resume_or_Rethrow(e); report_failure(err, ex); return; @@ -881,8 +891,8 @@ static std::type_info *get_type_info_ent if (offset == 0) { return 0; } // ...so we need to resolve it - return (std::type_info*)resolve_indirect_value(context, - lsda->type_table_encoding, offset, start); + return reinterpret_cast(resolve_indirect_value(context, + lsda->type_table_encoding, offset, start)); } @@ -896,13 +906,13 @@ static bool check_type_signature(__cxa_e const std::type_info *type, void *&adjustedPtr) { - void *exception_ptr = (void*)(ex+1); + void *exception_ptr = static_cast(ex+1); const std::type_info *ex_type = ex ? ex->exceptionType : 0; bool is_ptr = ex ? ex_type->__is_pointer_p() : false; if (is_ptr) { - exception_ptr = *(void**)exception_ptr; + exception_ptr = *static_cast(exception_ptr); } // Always match a catchall, even with a foreign exception // @@ -974,7 +984,7 @@ static handler_type check_action_record( { bool matched = false; *selector = filter; -#ifdef __arm__ +#if defined(__arm__) && !defined(__ARM_DWARF_EH__) filter++; std::type_info *handler_type = get_type_info_entry(context, lsda, filter--); while (handler_type) @@ -987,7 +997,7 @@ static handler_type check_action_record( handler_type = get_type_info_entry(context, lsda, filter--); } #else - unsigned char *type_index = ((unsigned char*)lsda->type_table - filter - 1); + unsigned char *type_index = reinterpret_cast(lsda->type_table) - filter - 1; while (*type_index) { std::type_info *handler_type = get_type_info_entry(context, lsda, *(type_index++)); @@ -1019,7 +1029,7 @@ static handler_type check_action_record( static void pushCleanupException(_Unwind_Exception *exceptionObject, __cxa_exception *ex) { -#ifdef __arm__ +#if defined(__arm__) && !defined(__ARM_DWARF_EH__) __cxa_thread_info *info = thread_info_fast(); if (ex) { @@ -1064,8 +1074,13 @@ BEGIN_PERSONALITY_FUNCTION(__gxx_persona realEx = realExceptionFromException(ex); } +#if defined(__arm__) && !defined(__ARM_DWARF_EH__) + unsigned char *lsda_addr = + static_cast(_Unwind_GetLanguageSpecificData(context)); +#else unsigned char *lsda_addr = - (unsigned char*)_Unwind_GetLanguageSpecificData(context); + reinterpret_cast(static_cast(_Unwind_GetLanguageSpecificData(context))); +#endif // No LSDA implies no landing pads - try the next frame if (0 == lsda_addr) { return continueUnwinding(exceptionObject, context); } @@ -1114,8 +1129,8 @@ BEGIN_PERSONALITY_FUNCTION(__gxx_persona if (ex) { saveLandingPad(context, exceptionObject, ex, selector, action.landing_pad); - ex->languageSpecificData = (const char*)lsda_addr; - ex->actionRecord = (const char*)action.action_record; + ex->languageSpecificData = reinterpret_cast(lsda_addr); + ex->actionRecord = reinterpret_cast(action.action_record); // ex->adjustedPtr is set when finding the action record. } return _URC_HANDLER_FOUND; @@ -1161,9 +1176,9 @@ BEGIN_PERSONALITY_FUNCTION(__gxx_persona } - _Unwind_SetIP(context, (unsigned long)action.landing_pad); + _Unwind_SetIP(context, reinterpret_cast(action.landing_pad)); _Unwind_SetGR(context, __builtin_eh_return_data_regno(0), - (unsigned long)exceptionObject); + reinterpret_cast(exceptionObject)); _Unwind_SetGR(context, __builtin_eh_return_data_regno(1), selector); return _URC_INSTALL_CONTEXT; @@ -1187,7 +1202,7 @@ extern "C" void *__cxa_begin_catch(void __cxa_thread_info *ti = thread_info(); __cxa_eh_globals *globals = &ti->globals; globals->uncaughtExceptions--; - _Unwind_Exception *exceptionObject = (_Unwind_Exception*)e; + _Unwind_Exception *exceptionObject = static_cast<_Unwind_Exception*>(e); if (isCXXException(exceptionObject->exception_class)) { @@ -1241,12 +1256,12 @@ extern "C" void *__cxa_begin_catch(void { std::terminate(); } - globals->caughtExceptions = (__cxa_exception*)exceptionObject; + globals->caughtExceptions = reinterpret_cast<__cxa_exception*>(exceptionObject); ti->foreign_exception_state = __cxa_thread_info::caught; } // exceptionObject is the pointer to the _Unwind_Exception within the // __cxa_exception. The throw object is after this - return ((char*)exceptionObject + sizeof(_Unwind_Exception)); + return (reinterpret_cast(exceptionObject) + sizeof(_Unwind_Exception)); } @@ -1270,7 +1285,7 @@ extern "C" void __cxa_end_catch() globals->caughtExceptions = 0; if (ti->foreign_exception_state != __cxa_thread_info::rethrown) { - _Unwind_Exception *e = (_Unwind_Exception*)ti->globals.caughtExceptions; + _Unwind_Exception *e = reinterpret_cast<_Unwind_Exception*>(ti->globals.caughtExceptions); e->exception_cleanup(_URC_FOREIGN_EXCEPTION_CAUGHT, e); } ti->foreign_exception_state = __cxa_thread_info::none; @@ -1332,7 +1347,7 @@ extern "C" std::type_info *__cxa_current */ extern "C" void __cxa_call_unexpected(void*exception) { - _Unwind_Exception *exceptionObject = (_Unwind_Exception*)exception; + _Unwind_Exception *exceptionObject = static_cast<_Unwind_Exception*>(exception); if (exceptionObject->exception_class == exception_class) { __cxa_exception *ex = exceptionFromPointer(exceptionObject); @@ -1483,7 +1498,7 @@ namespace std return ATOMIC_LOAD(&terminateHandler); } } -#ifdef __arm__ +#if defined(__arm__) && !defined(__ARM_DWARF_EH__) extern "C" _Unwind_Exception *__cxa_get_cleanup(void) { __cxa_thread_info *info = thread_info_fast(); Modified: stable/9/contrib/libcxxrt/guard.cc ============================================================================== --- stable/9/contrib/libcxxrt/guard.cc Sat Jan 31 23:31:45 2015 (r278016) +++ stable/9/contrib/libcxxrt/guard.cc Sat Jan 31 23:48:59 2015 (r278017) @@ -70,18 +70,45 @@ #ifdef __arm__ // ARM ABI - 32-bit guards. typedef uint32_t guard_t; -static const uint32_t LOCKED = ((guard_t)1) << 31; +typedef uint32_t guard_lock_t; +static const uint32_t LOCKED = static_cast(1) << 31; static const uint32_t INITIALISED = 1; -#else +#define LOCK_PART(guard) (guard) +#define INIT_PART(guard) (guard) +#elif defined(_LP64) typedef uint64_t guard_t; +typedef uint64_t guard_lock_t; # if defined(__LITTLE_ENDIAN__) -static const guard_t LOCKED = ((guard_t)1) << 63; +static const guard_t LOCKED = static_cast(1) << 63; static const guard_t INITIALISED = 1; # else static const guard_t LOCKED = 1; -static const guard_t INITIALISED = ((guard_t)1) << 56; +static const guard_t INITIALISED = static_cast(1) << 56; +# endif +#define LOCK_PART(guard) (guard) +#define INIT_PART(guard) (guard) +#else +typedef uint32_t guard_lock_t; +# if defined(__LITTLE_ENDIAN__) +typedef struct { + uint32_t init_half; + uint32_t lock_half; +} guard_t; +static const uint32_t LOCKED = static_cast(1) << 31; +static const uint32_t INITIALISED = 1; +# else +typedef struct { + uint32_t init_half; + uint32_t lock_half; +} guard_t; +_Static_assert(sizeof(guard_t) == sizeof(uint64_t), ""); +static const uint32_t LOCKED = 1; +static const uint32_t INITIALISED = static_cast(1) << 24; # endif +#define LOCK_PART(guard) (&(guard)->lock_half) +#define INIT_PART(guard) (&(guard)->init_half) #endif +static const guard_lock_t INITIAL = 0; /** * Acquires a lock on a guard, returning 0 if the object has already been @@ -90,42 +117,49 @@ static const guard_t INITIALISED = ((gua */ extern "C" int __cxa_guard_acquire(volatile guard_t *guard_object) { + guard_lock_t old; // Not an atomic read, doesn't establish a happens-before relationship, but // if one is already established and we end up seeing an initialised state // then it's a fast path, otherwise we'll do something more expensive than // this test anyway... - if ((INITIALISED == *guard_object)) { return 0; } + if (INITIALISED == *INIT_PART(guard_object)) + return 0; // Spin trying to do the initialisation - while (1) + for (;;) { // Loop trying to move the value of the guard from 0 (not // locked, not initialised) to the locked-uninitialised // position. - switch (__sync_val_compare_and_swap(guard_object, 0, LOCKED)) - { - // If the old value was 0, we succeeded, so continue - // initialising - case 0: + old = __sync_val_compare_and_swap(LOCK_PART(guard_object), + INITIAL, LOCKED); + if (old == INITIAL) { + // Lock obtained. If lock and init bit are + // in separate words, check for init race. + if (INIT_PART(guard_object) == LOCK_PART(guard_object)) return 1; - // If this was already initialised, return and let the caller skip - // initialising it again. - case INITIALISED: - return 0; - // If it is locked by another thread, relinquish the CPU and try - // again later. - case LOCKED: - case LOCKED | INITIALISED: - sched_yield(); - break; - // If it is some other value, then something has gone badly wrong. - // Give up. - default: - fprintf(stderr, "Invalid state detected attempting to lock static initialiser.\n"); - abort(); + if (INITIALISED != *INIT_PART(guard_object)) + return 1; + + // No need for a memory barrier here, + // see first comment. + *LOCK_PART(guard_object) = INITIAL; + return 0; } + // If lock and init bit are in the same word, check again + // if we are done. + if (INIT_PART(guard_object) == LOCK_PART(guard_object) && + old == INITIALISED) + return 0; + + assert(old == LOCKED); + // Another thread holds the lock. + // If lock and init bit are in different words, check + // if we are done before yielding and looping. + if (INIT_PART(guard_object) != LOCK_PART(guard_object) && + INITIALISED == *INIT_PART(guard_object)) + return 0; + sched_yield(); } - //__builtin_unreachable(); - return 0; } /** @@ -135,7 +169,8 @@ extern "C" int __cxa_guard_acquire(volat extern "C" void __cxa_guard_abort(volatile guard_t *guard_object) { __attribute__((unused)) - bool reset = __sync_bool_compare_and_swap(guard_object, LOCKED, 0); + bool reset = __sync_bool_compare_and_swap(LOCK_PART(guard_object), + LOCKED, INITIAL); assert(reset); } /** @@ -144,9 +179,15 @@ extern "C" void __cxa_guard_abort(volati */ extern "C" void __cxa_guard_release(volatile guard_t *guard_object) { + guard_lock_t old; + if (INIT_PART(guard_object) == LOCK_PART(guard_object)) + old = LOCKED; + else + old = INITIAL; __attribute__((unused)) - bool reset = __sync_bool_compare_and_swap(guard_object, LOCKED, INITIALISED); + bool reset = __sync_bool_compare_and_swap(INIT_PART(guard_object), + old, INITIALISED); assert(reset); + if (INIT_PART(guard_object) != LOCK_PART(guard_object)) + *LOCK_PART(guard_object) = INITIAL; } - - Modified: stable/9/contrib/libcxxrt/stdexcept.cc ============================================================================== --- stable/9/contrib/libcxxrt/stdexcept.cc Sat Jan 31 23:31:45 2015 (r278016) +++ stable/9/contrib/libcxxrt/stdexcept.cc Sat Jan 31 23:48:59 2015 (r278017) @@ -82,5 +82,18 @@ const char* bad_typeid::what() const thr return "std::bad_typeid"; } +bad_array_new_length::bad_array_new_length() throw() {} +bad_array_new_length::~bad_array_new_length() {} +bad_array_new_length::bad_array_new_length(const bad_array_new_length&) throw() {} +bad_array_new_length& bad_array_new_length::operator=(const bad_array_new_length&) throw() +{ + return *this; +} + +const char* bad_array_new_length::what() const throw() +{ + return "std::bad_array_new_length"; +} + } // namespace std Modified: stable/9/contrib/libcxxrt/stdexcept.h ============================================================================== --- stable/9/contrib/libcxxrt/stdexcept.h Sat Jan 31 23:31:45 2015 (r278016) +++ stable/9/contrib/libcxxrt/stdexcept.h Sat Jan 31 23:48:59 2015 (r278017) @@ -81,6 +81,15 @@ namespace std virtual const char* what() const throw(); }; + class bad_array_new_length: public bad_alloc + { + public: + bad_array_new_length() throw(); + bad_array_new_length(const bad_array_new_length&) throw(); + bad_array_new_length& operator=(const bad_array_new_length&) throw(); + virtual ~bad_array_new_length(); + virtual const char *what() const throw(); + }; } // namespace std Modified: stable/9/contrib/libcxxrt/typeinfo.cc ============================================================================== --- stable/9/contrib/libcxxrt/typeinfo.cc Sat Jan 31 23:31:45 2015 (r278016) +++ stable/9/contrib/libcxxrt/typeinfo.cc Sat Jan 31 23:48:59 2015 (r278017) @@ -96,7 +96,7 @@ extern "C" char* __cxa_demangle(const ch } if (*n < len+1) { - buf = (char*)realloc(buf, len+1); + buf = static_cast(realloc(buf, len+1)); } if (0 != buf) { Modified: stable/9/contrib/libcxxrt/unwind-arm.h ============================================================================== --- stable/9/contrib/libcxxrt/unwind-arm.h Sat Jan 31 23:31:45 2015 (r278016) +++ stable/9/contrib/libcxxrt/unwind-arm.h Sat Jan 31 23:48:59 2015 (r278017) @@ -218,6 +218,6 @@ _Unwind_Reason_Code name(_Unwind_State s break;\ }\ }\ - _Unwind_SetGR (context, 12, (unsigned long)exceptionObject);\ + _Unwind_SetGR (context, 12, reinterpret_cast(exceptionObject));\ #define CALL_PERSONALITY_FUNCTION(name) name(state,exceptionObject,context) Modified: stable/9/contrib/libcxxrt/unwind.h ============================================================================== --- stable/9/contrib/libcxxrt/unwind.h Sat Jan 31 23:31:45 2015 (r278016) +++ stable/9/contrib/libcxxrt/unwind.h Sat Jan 31 23:48:59 2015 (r278017) @@ -27,7 +27,7 @@ extern "C" { #endif -#ifdef __arm__ +#if defined(__arm__) && !defined(__ARM_DWARF_EH__) #include "unwind-arm.h" #else #include "unwind-itanium.h" Modified: stable/9/lib/libcxxrt/Version.map ============================================================================== --- stable/9/lib/libcxxrt/Version.map Sat Jan 31 23:31:45 2015 (r278016) +++ stable/9/lib/libcxxrt/Version.map Sat Jan 31 23:48:59 2015 (r278017) @@ -26,6 +26,7 @@ CXXABI_1.3 { __cxa_pure_virtual; __cxa_rethrow; __cxa_throw; + __cxa_throw_bad_array_new_length; __cxa_type_match; __cxa_vec_cctor; __cxa_vec_cleanup; @@ -273,6 +274,9 @@ CXXRT_1.0 { "std::bad_alloc::bad_alloc(std::bad_alloc const&)"; "std::bad_alloc::bad_alloc()"; "std::bad_alloc::operator=(std::bad_alloc const&)"; + "std::bad_array_new_length::bad_array_new_length(std::bad_array_new_length const&)"; + "std::bad_array_new_length::bad_array_new_length()"; + "std::bad_array_new_length::operator=(std::bad_array_new_length const&)"; }; __cxa_allocate_dependent_exception; @@ -307,6 +311,7 @@ GLIBCXX_3.4 { "std::bad_typeid::~bad_typeid()"; "std::exception::~exception()"; "std::bad_alloc::~bad_alloc()"; + "std::bad_array_new_length::~bad_array_new_length()"; "std::exception::what() const"; @@ -320,17 +325,20 @@ GLIBCXX_3.4 { "vtable for std::bad_typeid"; "vtable for std::exception"; "vtable for std::type_info"; + "vtable for std::bad_array_new_length"; "typeinfo for std::bad_alloc"; "typeinfo for std::bad_typeid"; "typeinfo for std::bad_cast"; "typeinfo for std::exception"; "typeinfo for std::type_info"; + "typeinfo for std::bad_array_new_length"; "typeinfo name for std::bad_alloc"; "typeinfo name for std::bad_typeid"; "typeinfo name for std::bad_cast"; "typeinfo name for std::exception"; "typeinfo name for std::type_info"; + "typeinfo name for std::bad_array_new_length"; }; }; @@ -340,6 +348,7 @@ GLIBCXX_3.4.9 { "std::bad_typeid::what() const"; "std::bad_cast::what() const"; "std::bad_alloc::what() const"; + "std::bad_array_new_length::what() const"; }; } GLIBCXX_3.4; From owner-svn-src-all@FreeBSD.ORG Sat Jan 31 23:49:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 266E393A; Sat, 31 Jan 2015 23:49:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F50BB0D; Sat, 31 Jan 2015 23:49:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0VNn7tO078639; Sat, 31 Jan 2015 23:49:07 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0VNn3UV078616; Sat, 31 Jan 2015 23:49:03 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501312349.t0VNn3UV078616@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 31 Jan 2015 23:49: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: r278017 - in stable: 10/contrib/libcxxrt 10/lib/libcxxrt 9/contrib/libcxxrt 9/lib/libcxxrt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2015 23:49:07 -0000 Author: dim Date: Sat Jan 31 23:48:59 2015 New Revision: 278017 URL: https://svnweb.freebsd.org/changeset/base/278017 Log: MFC r273381 (by bapt): Add support for __cxa_throw_bad_array_new_length in libcxxrt It is required for use with newer g++49 Differential Revision: https://reviews.freebsd.org/D982 Reviewed by: theraven Approved by: theraven MFC r276417: Import libcxxrt master 00bc29eb6513624824a6d7db2ebc768a4216a604. Interesting fixes: 76584a0 Reorganize code to use only 32bit atomic ops for 32bit platforms 30d2ae5 Implement __cxa_throw_bad_array_new_length Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D1390 Modified: stable/10/contrib/libcxxrt/atomic.h stable/10/contrib/libcxxrt/auxhelper.cc stable/10/contrib/libcxxrt/cxxabi.h stable/10/contrib/libcxxrt/dwarf_eh.h stable/10/contrib/libcxxrt/dynamic_cast.cc stable/10/contrib/libcxxrt/exception.cc stable/10/contrib/libcxxrt/guard.cc stable/10/contrib/libcxxrt/stdexcept.cc stable/10/contrib/libcxxrt/stdexcept.h stable/10/contrib/libcxxrt/typeinfo.cc stable/10/contrib/libcxxrt/unwind-arm.h stable/10/contrib/libcxxrt/unwind.h stable/10/lib/libcxxrt/Version.map Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/contrib/libcxxrt/atomic.h stable/9/contrib/libcxxrt/auxhelper.cc stable/9/contrib/libcxxrt/cxxabi.h stable/9/contrib/libcxxrt/dwarf_eh.h stable/9/contrib/libcxxrt/dynamic_cast.cc stable/9/contrib/libcxxrt/exception.cc stable/9/contrib/libcxxrt/guard.cc stable/9/contrib/libcxxrt/stdexcept.cc stable/9/contrib/libcxxrt/stdexcept.h stable/9/contrib/libcxxrt/typeinfo.cc stable/9/contrib/libcxxrt/unwind-arm.h stable/9/contrib/libcxxrt/unwind.h stable/9/lib/libcxxrt/Version.map Directory Properties: stable/9/ (props changed) stable/9/contrib/ (props changed) stable/9/contrib/libcxxrt/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libcxxrt/ (props changed) Modified: stable/10/contrib/libcxxrt/atomic.h ============================================================================== --- stable/10/contrib/libcxxrt/atomic.h Sat Jan 31 23:31:45 2015 (r278016) +++ stable/10/contrib/libcxxrt/atomic.h Sat Jan 31 23:48:59 2015 (r278017) @@ -11,7 +11,7 @@ */ #if __has_builtin(__c11_atomic_exchange) #define ATOMIC_SWAP(addr, val)\ - __c11_atomic_exchange((_Atomic(__typeof__(val))*)addr, val, __ATOMIC_ACQ_REL) + __c11_atomic_exchange(reinterpret_cast<_Atomic(__typeof__(val))*>(addr), val, __ATOMIC_ACQ_REL) #elif __has_builtin(__sync_swap) #define ATOMIC_SWAP(addr, val)\ __sync_swap(addr, val) @@ -22,7 +22,7 @@ #if __has_builtin(__c11_atomic_load) #define ATOMIC_LOAD(addr)\ - __c11_atomic_load((_Atomic(__typeof__(*addr))*)addr, __ATOMIC_ACQUIRE) + __c11_atomic_load(reinterpret_cast<_Atomic(__typeof__(*addr))*>(addr), __ATOMIC_ACQUIRE) #else #define ATOMIC_LOAD(addr)\ (__sync_synchronize(), *addr) Modified: stable/10/contrib/libcxxrt/auxhelper.cc ============================================================================== --- stable/10/contrib/libcxxrt/auxhelper.cc Sat Jan 31 23:31:45 2015 (r278016) +++ stable/10/contrib/libcxxrt/auxhelper.cc Sat Jan 31 23:48:59 2015 (r278017) @@ -75,3 +75,8 @@ extern "C" void __cxa_deleted_virtual() { abort(); } + +extern "C" void __cxa_throw_bad_array_new_length() +{ + throw std::bad_array_new_length(); +} Modified: stable/10/contrib/libcxxrt/cxxabi.h ============================================================================== --- stable/10/contrib/libcxxrt/cxxabi.h Sat Jan 31 23:31:45 2015 (r278016) +++ stable/10/contrib/libcxxrt/cxxabi.h Sat Jan 31 23:48:59 2015 (r278017) @@ -110,7 +110,7 @@ struct __cxa_exception * handler count reaches 0 (which it doesn't with the top bit set). */ int handlerCount; -#ifdef __arm__ +#if defined(__arm__) && !defined(__ARM_DWARF_EH__) /** * The ARM EH ABI requires the unwind library to keep track of exceptions * during cleanups. These support nesting, so we need to keep a list of Modified: stable/10/contrib/libcxxrt/dwarf_eh.h ============================================================================== --- stable/10/contrib/libcxxrt/dwarf_eh.h Sat Jan 31 23:31:45 2015 (r278016) +++ stable/10/contrib/libcxxrt/dwarf_eh.h Sat Jan 31 23:48:59 2015 (r278017) @@ -83,7 +83,7 @@ enum dwarf_data_encoding */ static inline enum dwarf_data_encoding get_encoding(unsigned char x) { - return (enum dwarf_data_encoding)(x & 0xf); + return static_cast(x & 0xf); } /** @@ -115,7 +115,7 @@ enum dwarf_data_relative */ static inline enum dwarf_data_relative get_base(unsigned char x) { - return (enum dwarf_data_relative)(x & 0x70); + return static_cast(x & 0x70); } /** * Returns whether an encoding represents an indirect address. @@ -206,9 +206,9 @@ static int64_t read_sleb128(dw_eh_ptr_t if ((uleb >> (bits-1)) == 1) { // Sign extend by setting all bits in front of it to 1 - uleb |= ((int64_t)-1) << bits; + uleb |= static_cast(-1) << bits; } - return (int64_t)uleb; + return static_cast(uleb); } /** * Reads a value using the specified encoding from the address pointed to by @@ -224,7 +224,7 @@ static uint64_t read_value(char encoding // Read fixed-length types #define READ(dwarf, type) \ case dwarf:\ - v = (uint64_t)(*(type*)(*data));\ + v = static_cast(*reinterpret_cast(*data));\ *data += sizeof(type);\ break; READ(DW_EH_PE_udata2, uint16_t) @@ -263,16 +263,16 @@ static uint64_t resolve_indirect_value(_ switch (get_base(encoding)) { case DW_EH_PE_pcrel: - v += (uint64_t)start; + v += reinterpret_cast(start); break; case DW_EH_PE_textrel: - v += (uint64_t)_Unwind_GetTextRelBase(c); + v += static_cast(static_cast(_Unwind_GetTextRelBase(c))); break; case DW_EH_PE_datarel: - v += (uint64_t)_Unwind_GetDataRelBase(c); + v += static_cast(static_cast(_Unwind_GetDataRelBase(c))); break; case DW_EH_PE_funcrel: - v += (uint64_t)_Unwind_GetRegionStart(c); + v += static_cast(static_cast(_Unwind_GetRegionStart(c))); default: break; } @@ -282,7 +282,7 @@ static uint64_t resolve_indirect_value(_ // be a GCC extensions, so not properly documented... if (is_indirect(encoding)) { - v = (uint64_t)(uintptr_t)*(void**)v; + v = static_cast(reinterpret_cast(*reinterpret_cast(v))); } return v; } @@ -342,14 +342,14 @@ static inline struct dwarf_eh_lsda parse { struct dwarf_eh_lsda lsda; - lsda.region_start = (dw_eh_ptr_t)(uintptr_t)_Unwind_GetRegionStart(context); + lsda.region_start = reinterpret_cast(_Unwind_GetRegionStart(context)); // If the landing pads are relative to anything other than the start of // this region, find out where. This is @LPStart in the spec, although the // encoding that GCC uses does not quite match the spec. - uint64_t v = (uint64_t)(uintptr_t)lsda.region_start; + uint64_t v = static_cast(reinterpret_cast(lsda.region_start)); read_value_with_encoding(context, &data, &v); - lsda.landing_pads = (dw_eh_ptr_t)(uintptr_t)v; + lsda.landing_pads = reinterpret_cast(static_cast(v)); // If there is a type table, find out where it is. This is @TTBase in the // spec. Note: we find whether there is a type table pointer by checking @@ -365,18 +365,18 @@ static inline struct dwarf_eh_lsda parse lsda.type_table = type_table; //lsda.type_table = (uintptr_t*)(data + v); } -#if __arm__ +#if defined(__arm__) && !defined(__ARM_DWARF_EH__) lsda.type_table_encoding = (DW_EH_PE_pcrel | DW_EH_PE_indirect); #endif - lsda.callsite_encoding = (enum dwarf_data_encoding)(*(data++)); + lsda.callsite_encoding = static_cast(*(data++)); // Action table is immediately after the call site table lsda.action_table = data; - uintptr_t callsite_size = (uintptr_t)read_uleb128(&data); + uintptr_t callsite_size = static_cast(read_uleb128(&data)); lsda.action_table = data + callsite_size; // Call site table is immediately after the header - lsda.call_site_table = (dw_eh_ptr_t)data; + lsda.call_site_table = static_cast(data); return lsda; @@ -413,7 +413,7 @@ static bool dwarf_eh_find_callsite(struc result->landing_pad = 0; // The current instruction pointer offset within the region uint64_t ip = _Unwind_GetIP(context) - _Unwind_GetRegionStart(context); - unsigned char *callsite_table = (unsigned char*)lsda->call_site_table; + unsigned char *callsite_table = static_cast(lsda->call_site_table); while (callsite_table <= lsda->action_table) { @@ -463,17 +463,17 @@ static bool dwarf_eh_find_callsite(struc /// Defines an exception class from 8 bytes (endian independent) #define EXCEPTION_CLASS(a,b,c,d,e,f,g,h) \ - (((uint64_t)a << 56) +\ - ((uint64_t)b << 48) +\ - ((uint64_t)c << 40) +\ - ((uint64_t)d << 32) +\ - ((uint64_t)e << 24) +\ - ((uint64_t)f << 16) +\ - ((uint64_t)g << 8) +\ - ((uint64_t)h)) + ((static_cast(a) << 56) +\ + (static_cast(b) << 48) +\ + (static_cast(c) << 40) +\ + (static_cast(d) << 32) +\ + (static_cast(e) << 24) +\ + (static_cast(f) << 16) +\ + (static_cast(g) << 8) +\ + (static_cast(h))) #define GENERIC_EXCEPTION_CLASS(e,f,g,h) \ - ((uint32_t)e << 24) +\ - ((uint32_t)f << 16) +\ - ((uint32_t)g << 8) +\ - ((uint32_t)h) + (static_cast(e) << 24) +\ + (static_cast(f) << 16) +\ + (static_cast(g) << 8) +\ + (static_cast(h)) Modified: stable/10/contrib/libcxxrt/dynamic_cast.cc ============================================================================== --- stable/10/contrib/libcxxrt/dynamic_cast.cc Sat Jan 31 23:31:45 2015 (r278016) +++ stable/10/contrib/libcxxrt/dynamic_cast.cc Sat Jan 31 23:48:59 2015 (r278017) @@ -44,7 +44,7 @@ struct vtable_header * Simple macro that does pointer arithmetic in bytes but returns a value of * the same type as the original. */ -#define ADD_TO_PTR(x, off) (__typeof__(x))(((char*)x) + off) +#define ADD_TO_PTR(x, off) reinterpret_cast<__typeof__(x)>(reinterpret_cast(x) + off) bool std::type_info::__do_catch(std::type_info const *ex_type, void **exception_object, @@ -166,7 +166,7 @@ bool __vmi_class_type_info::__do_upcast( if (info->isVirtual()) { // Object's vtable - ptrdiff_t *off = *(ptrdiff_t**)obj; + ptrdiff_t *off = *static_cast(obj); // Offset location in vtable off = ADD_TO_PTR(off, offset); offset = *off; @@ -202,9 +202,9 @@ extern "C" void* __dynamic_cast(const vo const __class_type_info *dst, ptrdiff_t src2dst_offset) { - char *vtable_location = *(char**)sub; + const char *vtable_location = *static_cast(sub); const vtable_header *header = - (const vtable_header*)(vtable_location - sizeof(vtable_header)); - void *leaf = ADD_TO_PTR((void*)sub, header->leaf_offset); + reinterpret_cast(vtable_location - sizeof(vtable_header)); + void *leaf = ADD_TO_PTR(const_cast(sub), header->leaf_offset); return header->type->cast_to(leaf, dst); } Modified: stable/10/contrib/libcxxrt/exception.cc ============================================================================== --- stable/10/contrib/libcxxrt/exception.cc Sat Jan 31 23:31:45 2015 (r278016) +++ stable/10/contrib/libcxxrt/exception.cc Sat Jan 31 23:48:59 2015 (r278017) @@ -71,11 +71,11 @@ static void saveLandingPad(struct _Unwin int selector, dw_eh_ptr_t landingPad) { -#ifdef __arm__ +#if defined(__arm__) && !defined(__ARM_DWARF_EH__) // On ARM, we store the saved exception in the generic part of the structure ucb->barrier_cache.sp = _Unwind_GetGR(context, 13); - ucb->barrier_cache.bitpattern[1] = (uint32_t)selector; - ucb->barrier_cache.bitpattern[3] = (uint32_t)landingPad; + ucb->barrier_cache.bitpattern[1] = static_cast(selector); + ucb->barrier_cache.bitpattern[3] = reinterpret_cast(landingPad); #endif // Cache the results for the phase 2 unwind, if we found a handler // and this is not a foreign exception. @@ -95,15 +95,15 @@ static int loadLandingPad(struct _Unwind unsigned long *selector, dw_eh_ptr_t *landingPad) { -#ifdef __arm__ +#if defined(__arm__) && !defined(__ARM_DWARF_EH__) *selector = ucb->barrier_cache.bitpattern[1]; - *landingPad = (dw_eh_ptr_t)ucb->barrier_cache.bitpattern[3]; + *landingPad = reinterpret_cast(ucb->barrier_cache.bitpattern[3]); return 1; #else if (ex) { *selector = ex->handlerSwitchValue; - *landingPad = (dw_eh_ptr_t)ex->catchTemp; + *landingPad = reinterpret_cast(ex->catchTemp); return 0; } return 0; @@ -113,7 +113,7 @@ static int loadLandingPad(struct _Unwind static inline _Unwind_Reason_Code continueUnwinding(struct _Unwind_Exception *ex, struct _Unwind_Context *context) { -#ifdef __arm__ +#if defined(__arm__) && !defined(__ARM_DWARF_EH__) if (__gnu_unwind_frame(ex, context) != _URC_OK) { return _URC_FAILURE; } #endif return _URC_CONTINUE_UNWIND; @@ -204,7 +204,7 @@ struct __cxa_dependent_exception terminate_handler terminateHandler; __cxa_exception *nextException; int handlerCount; -#ifdef __arm__ +#if defined(__arm__) && !defined(__ARM_DWARF_EH__) _Unwind_Exception *nextCleanup; int cleanupCount; #endif @@ -267,13 +267,13 @@ static bool isDependentException(uint64_ static __cxa_exception *exceptionFromPointer(void *ex) { - return (__cxa_exception*)((char*)ex - + return reinterpret_cast<__cxa_exception*>(static_cast(ex) - offsetof(struct __cxa_exception, unwindHeader)); } static __cxa_exception *realExceptionFromException(__cxa_exception *ex) { if (!isDependentException(ex->unwindHeader.exception_class)) { return ex; } - return ((__cxa_exception*)(((__cxa_dependent_exception*)ex)->primaryException))-1; + return reinterpret_cast<__cxa_exception*>((reinterpret_cast<__cxa_dependent_exception*>(ex))->primaryException)-1; } @@ -304,13 +304,13 @@ static pthread_key_t eh_key; static void exception_cleanup(_Unwind_Reason_Code reason, struct _Unwind_Exception *ex) { - __cxa_free_exception((void*)ex); + __cxa_free_exception(static_cast(ex)); } static void dependent_exception_cleanup(_Unwind_Reason_Code reason, struct _Unwind_Exception *ex) { - __cxa_free_dependent_exception((void*)ex); + __cxa_free_dependent_exception(static_cast(ex)); } /** @@ -333,13 +333,13 @@ static void free_exception_list(__cxa_ex */ static void thread_cleanup(void* thread_info) { - __cxa_thread_info *info = (__cxa_thread_info*)thread_info; + __cxa_thread_info *info = static_cast<__cxa_thread_info*>(thread_info); if (info->globals.caughtExceptions) { // If this is a foreign exception, ask it to clean itself up. if (info->foreign_exception_state != __cxa_thread_info::none) { - _Unwind_Exception *e = (_Unwind_Exception*)info->globals.caughtExceptions; + _Unwind_Exception *e = reinterpret_cast<_Unwind_Exception*>(info->globals.caughtExceptions); e->exception_cleanup(_URC_FOREIGN_EXCEPTION_CAUGHT, e); } else @@ -379,8 +379,8 @@ static void init_key(void) return; } pthread_key_create(&eh_key, thread_cleanup); - pthread_setspecific(eh_key, (void*)0x42); - fakeTLS = (pthread_getspecific(eh_key) != (void*)0x42); + pthread_setspecific(eh_key, reinterpret_cast(0x42)); + fakeTLS = (pthread_getspecific(eh_key) != reinterpret_cast(0x42)); pthread_setspecific(eh_key, 0); } @@ -394,10 +394,10 @@ static __cxa_thread_info *thread_info() fakeTLS = true; } if (fakeTLS) { return &singleThreadInfo; } - __cxa_thread_info *info = (__cxa_thread_info*)pthread_getspecific(eh_key); + __cxa_thread_info *info = static_cast<__cxa_thread_info*>(pthread_getspecific(eh_key)); if (0 == info) { - info = (__cxa_thread_info*)calloc(1, sizeof(__cxa_thread_info)); + info = static_cast<__cxa_thread_info*>(calloc(1, sizeof(__cxa_thread_info))); pthread_setspecific(eh_key, info); } return info; @@ -409,7 +409,7 @@ static __cxa_thread_info *thread_info() static __cxa_thread_info *thread_info_fast() { if (fakeTLS) { return &singleThreadInfo; } - return (__cxa_thread_info*)pthread_getspecific(eh_key); + return static_cast<__cxa_thread_info*>(pthread_getspecific(eh_key)); } /** * ABI function returning the __cxa_eh_globals structure. @@ -472,7 +472,7 @@ static char *emergency_malloc(size_t siz if (0 != m) { pthread_mutex_unlock(&emergency_malloc_lock); - return (char*)m; + return static_cast(m); } for (int i=0 ; i<16 ; i++) { @@ -510,7 +510,7 @@ static void emergency_malloc_free(char * // Find the buffer corresponding to this pointer. for (int i=0 ; i<16 ; i++) { - if (ptr == (void*)(emergency_buffer + (1024 * i))) + if (ptr == static_cast(emergency_buffer + (1024 * i))) { buffer = i; break; @@ -521,7 +521,7 @@ static void emergency_malloc_free(char * // emergency_malloc() is expected to return 0-initialized data. We don't // zero the buffer when allocating it, because the static buffers will // begin life containing 0 values. - memset((void*)ptr, 0, 1024); + memset(ptr, 0, 1024); // Signal the condition variable to wake up any threads that are blocking // waiting for some space in the emergency buffer pthread_mutex_lock(&emergency_malloc_lock); @@ -535,7 +535,7 @@ static void emergency_malloc_free(char * static char *alloc_or_die(size_t size) { - char *buffer = (char*)calloc(1, size); + char *buffer = static_cast(calloc(1, size)); // If calloc() doesn't want to give us any memory, try using an emergency // buffer. @@ -597,7 +597,7 @@ extern "C" void *__cxa_allocate_dependen */ extern "C" void __cxa_free_exception(void *thrown_exception) { - __cxa_exception *ex = ((__cxa_exception*)thrown_exception) - 1; + __cxa_exception *ex = reinterpret_cast<__cxa_exception*>(thrown_exception) - 1; // Free the object that was thrown, calling its destructor if (0 != ex->exceptionDestructor) { @@ -612,7 +612,7 @@ extern "C" void __cxa_free_exception(voi } } - free_exception((char*)ex); + free_exception(reinterpret_cast(ex)); } static void releaseException(__cxa_exception *exception) @@ -633,13 +633,13 @@ static void releaseException(__cxa_excep void __cxa_free_dependent_exception(void *thrown_exception) { - __cxa_dependent_exception *ex = ((__cxa_dependent_exception*)thrown_exception) - 1; + __cxa_dependent_exception *ex = reinterpret_cast<__cxa_dependent_exception*>(thrown_exception) - 1; assert(isDependentException(ex->unwindHeader.exception_class)); if (ex->primaryException) { - releaseException(realExceptionFromException((__cxa_exception*)ex)); + releaseException(realExceptionFromException(reinterpret_cast<__cxa_exception*>(ex))); } - free_exception((char*)ex); + free_exception(reinterpret_cast(ex)); } /** @@ -654,8 +654,8 @@ static _Unwind_Reason_Code trace(struct { Dl_info myinfo; int mylookup = - dladdr((void*)(uintptr_t)__cxa_current_exception_type, &myinfo); - void *ip = (void*)_Unwind_GetIP(context); + dladdr(reinterpret_cast(__cxa_current_exception_type), &myinfo); + void *ip = reinterpret_cast(_Unwind_GetIP(context)); Dl_info info; if (dladdr(ip, &info) != 0) { @@ -673,6 +673,11 @@ static _Unwind_Reason_Code trace(struct * If the failure happened by falling off the end of the stack without finding * a handler, prints a back trace before aborting. */ +#if __GNUC__ > 3 && __GNUC_MINOR__ > 2 +extern "C" void *__cxa_begin_catch(void *e) throw(); +#else +extern "C" void *__cxa_begin_catch(void *e); +#endif static void report_failure(_Unwind_Reason_Code err, __cxa_exception *thrown_exception) { switch (err) @@ -681,14 +686,16 @@ static void report_failure(_Unwind_Reaso case _URC_FATAL_PHASE1_ERROR: fprintf(stderr, "Fatal error during phase 1 unwinding\n"); break; -#ifndef __arm__ +#if !defined(__arm__) || defined(__ARM_DWARF_EH__) case _URC_FATAL_PHASE2_ERROR: fprintf(stderr, "Fatal error during phase 2 unwinding\n"); break; #endif case _URC_END_OF_STACK: + __cxa_begin_catch (&(thrown_exception->unwindHeader)); + std::terminate(); fprintf(stderr, "Terminating due to uncaught exception %p", - (void*)thrown_exception); + static_cast(thrown_exception)); thrown_exception = realExceptionFromException(thrown_exception); static const __class_type_info *e_ti = static_cast(&typeid(std::exception)); @@ -697,8 +704,8 @@ static void report_failure(_Unwind_Reaso if (throw_ti) { std::exception *e = - (std::exception*)e_ti->cast_to((void*)(thrown_exception+1), - throw_ti); + static_cast(e_ti->cast_to(static_cast(thrown_exception+1), + throw_ti)); if (e) { fprintf(stderr, " '%s'", e->what()); @@ -706,18 +713,21 @@ static void report_failure(_Unwind_Reaso } size_t bufferSize = 128; - char *demangled = (char*)malloc(bufferSize); + char *demangled = static_cast(malloc(bufferSize)); const char *mangled = thrown_exception->exceptionType->name(); int status; demangled = __cxa_demangle(mangled, demangled, &bufferSize, &status); fprintf(stderr, " of type %s\n", - status == 0 ? (const char*)demangled : mangled); + status == 0 ? demangled : mangled); if (status == 0) { free(demangled); } // Print a back trace if no handler is found. // TODO: Make this optional #ifndef __arm__ _Unwind_Backtrace(trace, 0); #endif + + // Just abort. No need to call std::terminate for the second time + abort(); break; } std::terminate(); @@ -755,7 +765,7 @@ extern "C" void __cxa_throw(void *thrown std::type_info *tinfo, void(*dest)(void*)) { - __cxa_exception *ex = ((__cxa_exception*)thrown_exception) - 1; + __cxa_exception *ex = reinterpret_cast<__cxa_exception*>(thrown_exception) - 1; ex->referenceCount = 1; ex->exceptionType = tinfo; @@ -773,7 +783,7 @@ extern "C" void __cxa_rethrow_primary_ex if (NULL == thrown_exception) { return; } __cxa_exception *original = exceptionFromPointer(thrown_exception); - __cxa_dependent_exception *ex = ((__cxa_dependent_exception*)__cxa_allocate_dependent_exception())-1; + __cxa_dependent_exception *ex = reinterpret_cast<__cxa_dependent_exception*>(__cxa_allocate_dependent_exception())-1; ex->primaryException = thrown_exception; __cxa_increment_exception_refcount(thrown_exception); @@ -782,7 +792,7 @@ extern "C" void __cxa_rethrow_primary_ex ex->unwindHeader.exception_class = dependent_exception_class; ex->unwindHeader.exception_cleanup = dependent_exception_cleanup; - throw_exception((__cxa_exception*)ex); + throw_exception(reinterpret_cast<__cxa_exception*>(ex)); } extern "C" void *__cxa_current_primary_exception(void) @@ -799,14 +809,14 @@ extern "C" void *__cxa_current_primary_e extern "C" void __cxa_increment_exception_refcount(void* thrown_exception) { if (NULL == thrown_exception) { return; } - __cxa_exception *ex = ((__cxa_exception*)thrown_exception) - 1; + __cxa_exception *ex = static_cast<__cxa_exception*>(thrown_exception) - 1; if (isDependentException(ex->unwindHeader.exception_class)) { return; } __sync_fetch_and_add(&ex->referenceCount, 1); } extern "C" void __cxa_decrement_exception_refcount(void* thrown_exception) { if (NULL == thrown_exception) { return; } - __cxa_exception *ex = ((__cxa_exception*)thrown_exception) - 1; + __cxa_exception *ex = static_cast<__cxa_exception*>(thrown_exception) - 1; releaseException(ex); } @@ -838,7 +848,7 @@ extern "C" void __cxa_rethrow() if (ti->foreign_exception_state != __cxa_thread_info::none) { ti->foreign_exception_state = __cxa_thread_info::rethrown; - _Unwind_Exception *e = (_Unwind_Exception*)ex; + _Unwind_Exception *e = reinterpret_cast<_Unwind_Exception*>(ex); _Unwind_Reason_Code err = _Unwind_Resume_or_Rethrow(e); report_failure(err, ex); return; @@ -881,8 +891,8 @@ static std::type_info *get_type_info_ent if (offset == 0) { return 0; } // ...so we need to resolve it - return (std::type_info*)resolve_indirect_value(context, - lsda->type_table_encoding, offset, start); + return reinterpret_cast(resolve_indirect_value(context, + lsda->type_table_encoding, offset, start)); } @@ -896,13 +906,13 @@ static bool check_type_signature(__cxa_e const std::type_info *type, void *&adjustedPtr) { - void *exception_ptr = (void*)(ex+1); + void *exception_ptr = static_cast(ex+1); const std::type_info *ex_type = ex ? ex->exceptionType : 0; bool is_ptr = ex ? ex_type->__is_pointer_p() : false; if (is_ptr) { - exception_ptr = *(void**)exception_ptr; + exception_ptr = *static_cast(exception_ptr); } // Always match a catchall, even with a foreign exception // @@ -974,7 +984,7 @@ static handler_type check_action_record( { bool matched = false; *selector = filter; -#ifdef __arm__ +#if defined(__arm__) && !defined(__ARM_DWARF_EH__) filter++; std::type_info *handler_type = get_type_info_entry(context, lsda, filter--); while (handler_type) @@ -987,7 +997,7 @@ static handler_type check_action_record( handler_type = get_type_info_entry(context, lsda, filter--); } #else - unsigned char *type_index = ((unsigned char*)lsda->type_table - filter - 1); + unsigned char *type_index = reinterpret_cast(lsda->type_table) - filter - 1; while (*type_index) { std::type_info *handler_type = get_type_info_entry(context, lsda, *(type_index++)); @@ -1019,7 +1029,7 @@ static handler_type check_action_record( static void pushCleanupException(_Unwind_Exception *exceptionObject, __cxa_exception *ex) { -#ifdef __arm__ +#if defined(__arm__) && !defined(__ARM_DWARF_EH__) __cxa_thread_info *info = thread_info_fast(); if (ex) { @@ -1064,8 +1074,13 @@ BEGIN_PERSONALITY_FUNCTION(__gxx_persona realEx = realExceptionFromException(ex); } +#if defined(__arm__) && !defined(__ARM_DWARF_EH__) + unsigned char *lsda_addr = + static_cast(_Unwind_GetLanguageSpecificData(context)); +#else unsigned char *lsda_addr = - (unsigned char*)_Unwind_GetLanguageSpecificData(context); + reinterpret_cast(static_cast(_Unwind_GetLanguageSpecificData(context))); +#endif // No LSDA implies no landing pads - try the next frame if (0 == lsda_addr) { return continueUnwinding(exceptionObject, context); } @@ -1114,8 +1129,8 @@ BEGIN_PERSONALITY_FUNCTION(__gxx_persona if (ex) { saveLandingPad(context, exceptionObject, ex, selector, action.landing_pad); - ex->languageSpecificData = (const char*)lsda_addr; - ex->actionRecord = (const char*)action.action_record; + ex->languageSpecificData = reinterpret_cast(lsda_addr); + ex->actionRecord = reinterpret_cast(action.action_record); // ex->adjustedPtr is set when finding the action record. } return _URC_HANDLER_FOUND; @@ -1161,9 +1176,9 @@ BEGIN_PERSONALITY_FUNCTION(__gxx_persona } - _Unwind_SetIP(context, (unsigned long)action.landing_pad); + _Unwind_SetIP(context, reinterpret_cast(action.landing_pad)); _Unwind_SetGR(context, __builtin_eh_return_data_regno(0), - (unsigned long)exceptionObject); + reinterpret_cast(exceptionObject)); _Unwind_SetGR(context, __builtin_eh_return_data_regno(1), selector); return _URC_INSTALL_CONTEXT; @@ -1187,7 +1202,7 @@ extern "C" void *__cxa_begin_catch(void __cxa_thread_info *ti = thread_info(); __cxa_eh_globals *globals = &ti->globals; globals->uncaughtExceptions--; - _Unwind_Exception *exceptionObject = (_Unwind_Exception*)e; + _Unwind_Exception *exceptionObject = static_cast<_Unwind_Exception*>(e); if (isCXXException(exceptionObject->exception_class)) { @@ -1241,12 +1256,12 @@ extern "C" void *__cxa_begin_catch(void { std::terminate(); } - globals->caughtExceptions = (__cxa_exception*)exceptionObject; + globals->caughtExceptions = reinterpret_cast<__cxa_exception*>(exceptionObject); ti->foreign_exception_state = __cxa_thread_info::caught; } // exceptionObject is the pointer to the _Unwind_Exception within the // __cxa_exception. The throw object is after this - return ((char*)exceptionObject + sizeof(_Unwind_Exception)); + return (reinterpret_cast(exceptionObject) + sizeof(_Unwind_Exception)); } @@ -1270,7 +1285,7 @@ extern "C" void __cxa_end_catch() globals->caughtExceptions = 0; if (ti->foreign_exception_state != __cxa_thread_info::rethrown) { - _Unwind_Exception *e = (_Unwind_Exception*)ti->globals.caughtExceptions; + _Unwind_Exception *e = reinterpret_cast<_Unwind_Exception*>(ti->globals.caughtExceptions); e->exception_cleanup(_URC_FOREIGN_EXCEPTION_CAUGHT, e); } ti->foreign_exception_state = __cxa_thread_info::none; @@ -1332,7 +1347,7 @@ extern "C" std::type_info *__cxa_current */ extern "C" void __cxa_call_unexpected(void*exception) { - _Unwind_Exception *exceptionObject = (_Unwind_Exception*)exception; + _Unwind_Exception *exceptionObject = static_cast<_Unwind_Exception*>(exception); if (exceptionObject->exception_class == exception_class) { __cxa_exception *ex = exceptionFromPointer(exceptionObject); @@ -1483,7 +1498,7 @@ namespace std return ATOMIC_LOAD(&terminateHandler); } } -#ifdef __arm__ +#if defined(__arm__) && !defined(__ARM_DWARF_EH__) extern "C" _Unwind_Exception *__cxa_get_cleanup(void) { __cxa_thread_info *info = thread_info_fast(); Modified: stable/10/contrib/libcxxrt/guard.cc ============================================================================== --- stable/10/contrib/libcxxrt/guard.cc Sat Jan 31 23:31:45 2015 (r278016) +++ stable/10/contrib/libcxxrt/guard.cc Sat Jan 31 23:48:59 2015 (r278017) @@ -70,18 +70,45 @@ #ifdef __arm__ // ARM ABI - 32-bit guards. typedef uint32_t guard_t; -static const uint32_t LOCKED = ((guard_t)1) << 31; +typedef uint32_t guard_lock_t; +static const uint32_t LOCKED = static_cast(1) << 31; static const uint32_t INITIALISED = 1; -#else +#define LOCK_PART(guard) (guard) +#define INIT_PART(guard) (guard) +#elif defined(_LP64) typedef uint64_t guard_t; +typedef uint64_t guard_lock_t; # if defined(__LITTLE_ENDIAN__) -static const guard_t LOCKED = ((guard_t)1) << 63; +static const guard_t LOCKED = static_cast(1) << 63; static const guard_t INITIALISED = 1; # else static const guard_t LOCKED = 1; -static const guard_t INITIALISED = ((guard_t)1) << 56; +static const guard_t INITIALISED = static_cast(1) << 56; +# endif +#define LOCK_PART(guard) (guard) +#define INIT_PART(guard) (guard) +#else +typedef uint32_t guard_lock_t; +# if defined(__LITTLE_ENDIAN__) +typedef struct { + uint32_t init_half; + uint32_t lock_half; +} guard_t; +static const uint32_t LOCKED = static_cast(1) << 31; +static const uint32_t INITIALISED = 1; +# else +typedef struct { + uint32_t init_half; + uint32_t lock_half; +} guard_t; +_Static_assert(sizeof(guard_t) == sizeof(uint64_t), ""); +static const uint32_t LOCKED = 1; +static const uint32_t INITIALISED = static_cast(1) << 24; # endif +#define LOCK_PART(guard) (&(guard)->lock_half) +#define INIT_PART(guard) (&(guard)->init_half) #endif +static const guard_lock_t INITIAL = 0; /** * Acquires a lock on a guard, returning 0 if the object has already been @@ -90,42 +117,49 @@ static const guard_t INITIALISED = ((gua */ extern "C" int __cxa_guard_acquire(volatile guard_t *guard_object) { + guard_lock_t old; // Not an atomic read, doesn't establish a happens-before relationship, but // if one is already established and we end up seeing an initialised state // then it's a fast path, otherwise we'll do something more expensive than // this test anyway... - if ((INITIALISED == *guard_object)) { return 0; } + if (INITIALISED == *INIT_PART(guard_object)) + return 0; // Spin trying to do the initialisation - while (1) + for (;;) { // Loop trying to move the value of the guard from 0 (not // locked, not initialised) to the locked-uninitialised // position. - switch (__sync_val_compare_and_swap(guard_object, 0, LOCKED)) - { - // If the old value was 0, we succeeded, so continue - // initialising - case 0: + old = __sync_val_compare_and_swap(LOCK_PART(guard_object), + INITIAL, LOCKED); + if (old == INITIAL) { + // Lock obtained. If lock and init bit are + // in separate words, check for init race. + if (INIT_PART(guard_object) == LOCK_PART(guard_object)) return 1; - // If this was already initialised, return and let the caller skip - // initialising it again. - case INITIALISED: - return 0; - // If it is locked by another thread, relinquish the CPU and try - // again later. - case LOCKED: - case LOCKED | INITIALISED: - sched_yield(); - break; - // If it is some other value, then something has gone badly wrong. - // Give up. - default: - fprintf(stderr, "Invalid state detected attempting to lock static initialiser.\n"); - abort(); + if (INITIALISED != *INIT_PART(guard_object)) + return 1; + + // No need for a memory barrier here, + // see first comment. + *LOCK_PART(guard_object) = INITIAL; + return 0; } + // If lock and init bit are in the same word, check again + // if we are done. + if (INIT_PART(guard_object) == LOCK_PART(guard_object) && + old == INITIALISED) + return 0; + + assert(old == LOCKED); + // Another thread holds the lock. + // If lock and init bit are in different words, check + // if we are done before yielding and looping. + if (INIT_PART(guard_object) != LOCK_PART(guard_object) && + INITIALISED == *INIT_PART(guard_object)) + return 0; + sched_yield(); } - //__builtin_unreachable(); - return 0; } /** @@ -135,7 +169,8 @@ extern "C" int __cxa_guard_acquire(volat extern "C" void __cxa_guard_abort(volatile guard_t *guard_object) { __attribute__((unused)) - bool reset = __sync_bool_compare_and_swap(guard_object, LOCKED, 0); + bool reset = __sync_bool_compare_and_swap(LOCK_PART(guard_object), + LOCKED, INITIAL); assert(reset); } /** @@ -144,9 +179,15 @@ extern "C" void __cxa_guard_abort(volati */ extern "C" void __cxa_guard_release(volatile guard_t *guard_object) { + guard_lock_t old; + if (INIT_PART(guard_object) == LOCK_PART(guard_object)) + old = LOCKED; + else + old = INITIAL; __attribute__((unused)) - bool reset = __sync_bool_compare_and_swap(guard_object, LOCKED, INITIALISED); + bool reset = __sync_bool_compare_and_swap(INIT_PART(guard_object), + old, INITIALISED); assert(reset); + if (INIT_PART(guard_object) != LOCK_PART(guard_object)) + *LOCK_PART(guard_object) = INITIAL; } - - Modified: stable/10/contrib/libcxxrt/stdexcept.cc ============================================================================== --- stable/10/contrib/libcxxrt/stdexcept.cc Sat Jan 31 23:31:45 2015 (r278016) +++ stable/10/contrib/libcxxrt/stdexcept.cc Sat Jan 31 23:48:59 2015 (r278017) @@ -82,5 +82,18 @@ const char* bad_typeid::what() const thr return "std::bad_typeid"; } +bad_array_new_length::bad_array_new_length() throw() {} +bad_array_new_length::~bad_array_new_length() {} +bad_array_new_length::bad_array_new_length(const bad_array_new_length&) throw() {} +bad_array_new_length& bad_array_new_length::operator=(const bad_array_new_length&) throw() +{ + return *this; +} + +const char* bad_array_new_length::what() const throw() +{ + return "std::bad_array_new_length"; +} + } // namespace std Modified: stable/10/contrib/libcxxrt/stdexcept.h ============================================================================== --- stable/10/contrib/libcxxrt/stdexcept.h Sat Jan 31 23:31:45 2015 (r278016) +++ stable/10/contrib/libcxxrt/stdexcept.h Sat Jan 31 23:48:59 2015 (r278017) @@ -81,6 +81,15 @@ namespace std virtual const char* what() const throw(); }; + class bad_array_new_length: public bad_alloc + { + public: + bad_array_new_length() throw(); + bad_array_new_length(const bad_array_new_length&) throw(); + bad_array_new_length& operator=(const bad_array_new_length&) throw(); + virtual ~bad_array_new_length(); + virtual const char *what() const throw(); + }; } // namespace std Modified: stable/10/contrib/libcxxrt/typeinfo.cc ============================================================================== --- stable/10/contrib/libcxxrt/typeinfo.cc Sat Jan 31 23:31:45 2015 (r278016) +++ stable/10/contrib/libcxxrt/typeinfo.cc Sat Jan 31 23:48:59 2015 (r278017) @@ -96,7 +96,7 @@ extern "C" char* __cxa_demangle(const ch } if (*n < len+1) { - buf = (char*)realloc(buf, len+1); + buf = static_cast(realloc(buf, len+1)); } if (0 != buf) { Modified: stable/10/contrib/libcxxrt/unwind-arm.h ============================================================================== --- stable/10/contrib/libcxxrt/unwind-arm.h Sat Jan 31 23:31:45 2015 (r278016) +++ stable/10/contrib/libcxxrt/unwind-arm.h Sat Jan 31 23:48:59 2015 (r278017) @@ -218,6 +218,6 @@ _Unwind_Reason_Code name(_Unwind_State s break;\ }\ }\ - _Unwind_SetGR (context, 12, (unsigned long)exceptionObject);\ + _Unwind_SetGR (context, 12, reinterpret_cast(exceptionObject));\ #define CALL_PERSONALITY_FUNCTION(name) name(state,exceptionObject,context) Modified: stable/10/contrib/libcxxrt/unwind.h ============================================================================== --- stable/10/contrib/libcxxrt/unwind.h Sat Jan 31 23:31:45 2015 (r278016) +++ stable/10/contrib/libcxxrt/unwind.h Sat Jan 31 23:48:59 2015 (r278017) @@ -27,7 +27,7 @@ extern "C" { #endif -#ifdef __arm__ +#if defined(__arm__) && !defined(__ARM_DWARF_EH__) #include "unwind-arm.h" #else #include "unwind-itanium.h" Modified: stable/10/lib/libcxxrt/Version.map ============================================================================== --- stable/10/lib/libcxxrt/Version.map Sat Jan 31 23:31:45 2015 (r278016) +++ stable/10/lib/libcxxrt/Version.map Sat Jan 31 23:48:59 2015 (r278017) @@ -26,6 +26,7 @@ CXXABI_1.3 { __cxa_pure_virtual; __cxa_rethrow; __cxa_throw; + __cxa_throw_bad_array_new_length; __cxa_type_match; __cxa_vec_cctor; __cxa_vec_cleanup; @@ -273,6 +274,9 @@ CXXRT_1.0 { "std::bad_alloc::bad_alloc(std::bad_alloc const&)"; "std::bad_alloc::bad_alloc()"; "std::bad_alloc::operator=(std::bad_alloc const&)"; + "std::bad_array_new_length::bad_array_new_length(std::bad_array_new_length const&)"; + "std::bad_array_new_length::bad_array_new_length()"; + "std::bad_array_new_length::operator=(std::bad_array_new_length const&)"; }; __cxa_allocate_dependent_exception; @@ -307,6 +311,7 @@ GLIBCXX_3.4 { "std::bad_typeid::~bad_typeid()"; "std::exception::~exception()"; "std::bad_alloc::~bad_alloc()"; + "std::bad_array_new_length::~bad_array_new_length()"; "std::exception::what() const"; @@ -320,17 +325,20 @@ GLIBCXX_3.4 { "vtable for std::bad_typeid"; "vtable for std::exception"; "vtable for std::type_info"; + "vtable for std::bad_array_new_length"; "typeinfo for std::bad_alloc"; "typeinfo for std::bad_typeid"; "typeinfo for std::bad_cast"; "typeinfo for std::exception"; "typeinfo for std::type_info"; + "typeinfo for std::bad_array_new_length"; "typeinfo name for std::bad_alloc"; "typeinfo name for std::bad_typeid"; "typeinfo name for std::bad_cast"; "typeinfo name for std::exception"; "typeinfo name for std::type_info"; + "typeinfo name for std::bad_array_new_length"; }; }; @@ -340,6 +348,7 @@ GLIBCXX_3.4.9 { "std::bad_typeid::what() const"; "std::bad_cast::what() const"; "std::bad_alloc::what() const"; + "std::bad_array_new_length::what() const"; }; } GLIBCXX_3.4;