From owner-svn-src-projects@FreeBSD.ORG Thu Oct 9 18:03:15 2014 Return-Path: Delivered-To: svn-src-projects@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 74DD5E0A; Thu, 9 Oct 2014 18:03: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 55F16345; Thu, 9 Oct 2014 18:03: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 s99I3FO9022684; Thu, 9 Oct 2014 18:03:15 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s99I3DGw022675; Thu, 9 Oct 2014 18:03:13 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201410091803.s99I3DGw022675@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Thu, 9 Oct 2014 18:03:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r272835 - in projects/ipfw: . cddl/contrib/opensolaris/cmd/lockstat lib/libcrypt sys/conf sys/sys sys/ufs/ufs usr.sbin/pw X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Oct 2014 18:03:15 -0000 Author: melifaro Date: Thu Oct 9 18:03:12 2014 New Revision: 272835 URL: https://svnweb.freebsd.org/changeset/base/272835 Log: Merge HEAD@r272834 Modified: projects/ipfw/Makefile.inc1 projects/ipfw/cddl/contrib/opensolaris/cmd/lockstat/lockstat.1 projects/ipfw/lib/libcrypt/crypt.c projects/ipfw/sys/conf/kern.mk projects/ipfw/sys/sys/bus.h projects/ipfw/sys/ufs/ufs/dir.h projects/ipfw/usr.sbin/pw/pw_user.c Directory Properties: projects/ipfw/ (props changed) projects/ipfw/cddl/ (props changed) projects/ipfw/cddl/contrib/opensolaris/ (props changed) projects/ipfw/sys/ (props changed) projects/ipfw/sys/conf/ (props changed) Modified: projects/ipfw/Makefile.inc1 ============================================================================== --- projects/ipfw/Makefile.inc1 Thu Oct 9 17:45:58 2014 (r272834) +++ projects/ipfw/Makefile.inc1 Thu Oct 9 18:03:12 2014 (r272835) @@ -315,7 +315,7 @@ X${COMPILER}?= ${CROSS_COMPILER_PREFIX}$ X${COMPILER}?= ${${COMPILER}} .endif .endfor -XBINUTILS= AS AR LD NM OBJCOPY OBJDUMP RANLIB STRINGS +XBINUTILS= AS AR LD NM OBJCOPY OBJDUMP RANLIB SIZE STRINGS .for BINUTIL in ${XBINUTILS} .if defined(CROSS_BINUTILS_PREFIX) X${BINUTIL}?= ${CROSS_BINUTILS_PREFIX}${${BINUTIL}} @@ -327,7 +327,8 @@ WMAKEENV+= CC="${XCC} ${XFLAGS}" CXX="${ CPP="${XCPP} ${XFLAGS}" \ AS="${XAS}" AR="${XAR}" LD="${XLD}" NM=${XNM} \ OBJDUMP=${XOBJDUMP} OBJCOPY="${XOBJCOPY}" \ - RANLIB=${XRANLIB} STRINGS=${XSTRINGS} + RANLIB=${XRANLIB} STRINGS=${XSTRINGS} \ + SIZE="${XSIZE}" .if ${XCC:M/*} XFLAGS= --sysroot=${WORLDTMP} Modified: projects/ipfw/cddl/contrib/opensolaris/cmd/lockstat/lockstat.1 ============================================================================== --- projects/ipfw/cddl/contrib/opensolaris/cmd/lockstat/lockstat.1 Thu Oct 9 17:45:58 2014 (r272834) +++ projects/ipfw/cddl/contrib/opensolaris/cmd/lockstat/lockstat.1 Thu Oct 9 18:03:12 2014 (r272835) @@ -21,7 +21,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 24, 2013 +.Dd October 8, 2014 .Dt LOCKSTAT 1 .Os .Sh NAME @@ -238,10 +238,11 @@ Average duration of the events in nanose For the profiling event, duration means interrupt latency. .It Lock Address of the lock; displayed symbolically if possible. -.It CPU+PIL -CPU plus processor interrupt level (PIL). -For example, if CPU 4 is interrupted while at PIL 6, this will be reported as -cpu[4]+6. +.It CPU+Pri_Class +CPU plus the priority class of the interrupted thread. +For example, if CPU 4 is interrupted while running a timeshare thread, this +will be reported as +.Ql cpu[4]+TShar . .It Caller Address of the caller; displayed symbolically if possible. .El Modified: projects/ipfw/lib/libcrypt/crypt.c ============================================================================== --- projects/ipfw/lib/libcrypt/crypt.c Thu Oct 9 17:45:58 2014 (r272834) +++ projects/ipfw/lib/libcrypt/crypt.c Thu Oct 9 18:03:12 2014 (r272835) @@ -37,24 +37,26 @@ __FBSDID("$FreeBSD$"); #include "crypt.h" /* - * List of supported crypt(3) formats. The first element in the list will - * be the default. + * List of supported crypt(3) formats. + * + * The default algorithm is the last entry in the list (second-to-last + * array element since the last is a sentinel). The reason for placing + * the default last rather than first is that DES needs to be at the + * bottom for the algorithm guessing logic in crypt(3) to work correctly, + * and it needs to be the default for backward compatibility. */ static const struct crypt_format { const char *const name; char *(*const func)(const char *, const char *); const char *const magic; } crypt_formats[] = { - /* default format */ - { "sha512", crypt_sha512, "$6$" }, - - /* other supported formats */ { "md5", crypt_md5, "$1$" }, #ifdef HAS_BLOWFISH { "blf", crypt_blowfish, "$2" }, #endif { "nth", crypt_nthash, "$3$" }, { "sha256", crypt_sha256, "$5$" }, + { "sha512", crypt_sha512, "$6$" }, #ifdef HAS_DES { "des", crypt_des, "_" }, #endif @@ -63,7 +65,8 @@ static const struct crypt_format { { NULL, NULL, NULL } }; -static const struct crypt_format *crypt_format = &crypt_formats[0]; +static const struct crypt_format *crypt_format = + &crypt_formats[(sizeof crypt_formats / sizeof *crypt_formats) - 2]; #define DES_SALT_ALPHABET \ "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" Modified: projects/ipfw/sys/conf/kern.mk ============================================================================== --- projects/ipfw/sys/conf/kern.mk Thu Oct 9 17:45:58 2014 (r272834) +++ projects/ipfw/sys/conf/kern.mk Thu Oct 9 18:03:12 2014 (r272835) @@ -33,7 +33,13 @@ CWARNEXTRA?= -Wno-error-tautological-com .endif .if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 40300 -CWARNEXTRA?= -Wno-inline +# Catch-all for all the things that are in our tree, but for which we're +# not yet ready for this compiler. Note: we likely only really "support" +# building with gcc 4.8 and newer. Nothing older has been tested. +CWARNEXTRA?= -Wno-error=inline -Wno-error=enum-compare -Wno-error=unused-but-set-variable \ + -Wno-error=aggressive-loop-optimizations -Wno-error=maybe-uninitialized \ + -Wno-error=unused-local-typedefs -Wno-error=array-bounds -Wno-error=address \ + -Wno-error=cast-qual -Wno-error=sequence-point -Wno-error=attributes .endif # External compilers may not support our format extensions. Allow them Modified: projects/ipfw/sys/sys/bus.h ============================================================================== --- projects/ipfw/sys/sys/bus.h Thu Oct 9 17:45:58 2014 (r272834) +++ projects/ipfw/sys/sys/bus.h Thu Oct 9 18:03:12 2014 (r272835) @@ -327,6 +327,7 @@ int bus_generic_detach(device_t dev); void bus_generic_driver_added(device_t dev, driver_t *driver); bus_dma_tag_t bus_generic_get_dma_tag(device_t dev, device_t child); +int bus_generic_get_domain(device_t dev, device_t child, int *domain); struct resource_list * bus_generic_get_resource_list (device_t, device_t); void bus_generic_new_pass(device_t dev); @@ -365,8 +366,6 @@ int bus_generic_teardown_intr(device_t d int bus_generic_write_ivar(device_t dev, device_t child, int which, uintptr_t value); -int bus_generic_get_domain(device_t dev, device_t child, int *domain); - /* * Wrapper functions for the BUS_*_RESOURCE methods to make client code * a little simpler. Modified: projects/ipfw/sys/ufs/ufs/dir.h ============================================================================== --- projects/ipfw/sys/ufs/ufs/dir.h Thu Oct 9 17:45:58 2014 (r272834) +++ projects/ipfw/sys/ufs/ufs/dir.h Thu Oct 9 18:03:12 2014 (r272835) @@ -110,7 +110,7 @@ struct direct { * */ #define DIRECTSIZ(namlen) \ - ((offsetof(struct direct, d_name) + \ + (((uintptr_t)&((struct direct *)0)->d_name + \ ((namlen)+1)*sizeof(((struct direct *)0)->d_name[0]) + 3) & ~3) #if (BYTE_ORDER == LITTLE_ENDIAN) #define DIRSIZ(oldfmt, dp) \ Modified: projects/ipfw/usr.sbin/pw/pw_user.c ============================================================================== --- projects/ipfw/usr.sbin/pw/pw_user.c Thu Oct 9 17:45:58 2014 (r272834) +++ projects/ipfw/usr.sbin/pw/pw_user.c Thu Oct 9 18:03:12 2014 (r272835) @@ -615,7 +615,7 @@ pw_user(struct userconf * cnf, int mode, pwd->pw_dir = pw_homepolicy(cnf, args, pwd->pw_name); pwd->pw_shell = pw_shellpolicy(cnf, args, NULL); lc = login_getpwclass(pwd); - if (lc == NULL || login_setcryptfmt(lc, "md5", NULL) == NULL) + if (lc == NULL || login_setcryptfmt(lc, "sha512", NULL) == NULL) warn("setting crypt(3) format"); login_close(lc); pwd->pw_passwd = pw_password(cnf, args, pwd->pw_name); @@ -690,7 +690,7 @@ pw_user(struct userconf * cnf, int mode, } else { lc = login_getpwclass(pwd); if (lc == NULL || - login_setcryptfmt(lc, "md5", NULL) == NULL) + login_setcryptfmt(lc, "sha512", NULL) == NULL) warn("setting crypt(3) format"); login_close(lc); pwd->pw_passwd = pw_pwcrypt(line);