From owner-svn-src-user@FreeBSD.ORG Sun Feb 10 01:13:07 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id E6875D47; Sun, 10 Feb 2013 01:13:07 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id BD88D18F; Sun, 10 Feb 2013 01:13:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1A1D7Q2052937; Sun, 10 Feb 2013 01:13:07 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1A1D4Vf052908; Sun, 10 Feb 2013 01:13:04 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201302100113.r1A1D4Vf052908@svn.freebsd.org> From: Attilio Rao Date: Sun, 10 Feb 2013 01:13:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r246604 - in user/attilio/vmcontention: . cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd/zpool lib/libc/stdio lib/libc/sys sys/arm/arm sys/cddl/boot/zfs sys/cddl/compat/o... X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Feb 2013 01:13:08 -0000 Author: attilio Date: Sun Feb 10 01:13:03 2013 New Revision: 246604 URL: http://svnweb.freebsd.org/changeset/base/246604 Log: MFC Added: user/attilio/vmcontention/sys/cddl/boot/zfs/lz4.c - copied unchanged from r246603, head/sys/cddl/boot/zfs/lz4.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4 - copied unchanged from r246603, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4 user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4.descrip - copied unchanged from r246603, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4.descrip user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c - copied unchanged from r246603, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c Modified: user/attilio/vmcontention/Makefile.inc1 user/attilio/vmcontention/ObsoleteFiles.inc user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zfs/zfs.8 user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 user/attilio/vmcontention/lib/libc/stdio/fopen.3 user/attilio/vmcontention/lib/libc/sys/chflags.2 user/attilio/vmcontention/sys/arm/arm/vm_machdep.c user/attilio/vmcontention/sys/cddl/boot/zfs/README user/attilio/vmcontention/sys/cddl/boot/zfs/zfsimpl.h user/attilio/vmcontention/sys/cddl/boot/zfs/zfssubr.c user/attilio/vmcontention/sys/cddl/compat/opensolaris/sys/byteorder.h user/attilio/vmcontention/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h user/attilio/vmcontention/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/Makefile.files user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_compress.h user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_compress.c user/attilio/vmcontention/sys/conf/files user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c user/attilio/vmcontention/sys/dev/cxgbe/t4_main.c user/attilio/vmcontention/sys/fs/tmpfs/tmpfs_vnops.c user/attilio/vmcontention/sys/modules/usb/smsc/Makefile user/attilio/vmcontention/sys/netinet/sctp.h user/attilio/vmcontention/sys/netinet/sctp_asconf.c user/attilio/vmcontention/sys/netinet/sctp_indata.c user/attilio/vmcontention/sys/netinet/sctp_input.c user/attilio/vmcontention/sys/netinet/sctp_output.c user/attilio/vmcontention/sys/netinet/sctp_output.h user/attilio/vmcontention/sys/netinet/sctp_pcb.c user/attilio/vmcontention/sys/netinet/sctp_structs.h user/attilio/vmcontention/sys/netinet/sctp_sysctl.c user/attilio/vmcontention/sys/netinet/sctp_timer.c user/attilio/vmcontention/sys/netinet/sctp_usrreq.c user/attilio/vmcontention/sys/netinet/sctputil.c user/attilio/vmcontention/sys/ofed/drivers/net/mlx4/en_tx.c user/attilio/vmcontention/usr.bin/Makefile user/attilio/vmcontention/usr.bin/csup/csup.1 user/attilio/vmcontention/usr.bin/ee/Makefile Directory Properties: user/attilio/vmcontention/ (props changed) user/attilio/vmcontention/cddl/contrib/opensolaris/ (props changed) user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zfs/ (props changed) user/attilio/vmcontention/lib/libc/ (props changed) user/attilio/vmcontention/sys/ (props changed) user/attilio/vmcontention/sys/cddl/contrib/opensolaris/ (props changed) user/attilio/vmcontention/sys/conf/ (props changed) user/attilio/vmcontention/usr.bin/csup/ (props changed) Modified: user/attilio/vmcontention/Makefile.inc1 ============================================================================== --- user/attilio/vmcontention/Makefile.inc1 Sun Feb 10 01:04:10 2013 (r246603) +++ user/attilio/vmcontention/Makefile.inc1 Sun Feb 10 01:13:03 2013 (r246604) @@ -673,6 +673,10 @@ _install-info= install-info _zoneinfo= zic tzsetup .endif +.if exists(/usr/sbin/nmtree) +_nmtree_itools= nmtree +.endif + ITOOLS= [ awk cap_mkdb cat chflags chmod chown \ date echo egrep find grep id install ${_install-info} \ ln lockf make mkdir mtree ${_nmtree_itools} mv pwd_mkdb \ @@ -1134,8 +1138,6 @@ _yacc= usr.bin/yacc .if ${BOOTSTRAPPING} < 1000026 _nmtree= lib/libnetbsd \ usr.sbin/nmtree -.else -_nmtree_itools= nmtree .endif .if ${BOOTSTRAPPING} < 1000027 Modified: user/attilio/vmcontention/ObsoleteFiles.inc ============================================================================== --- user/attilio/vmcontention/ObsoleteFiles.inc Sun Feb 10 01:04:10 2013 (r246603) +++ user/attilio/vmcontention/ObsoleteFiles.inc Sun Feb 10 01:13:03 2013 (r246604) @@ -45,6 +45,10 @@ OLD_DIRS+=usr/share/man/man1aout OLD_DIRS+=usr/share/man/cat1aout OLD_DIRS+=usr/share/man/en.ISO8859-1/cat1aout OLD_DIRS+=usr/share/man/en.UTF-8/cat1aout +# 20130110: bsd.compat.mk removed +OLD_FILES+=usr/share/mk/bsd.compat.mk +# 20130103: gnats-supfile removed +OLD_FILES+=usr/share/examples/cvsup/gnats-supfile # 20121230: libdisk removed OLD_FILES+=usr/share/man/man3/libdisk.3.gz usr/include/libdisk.h OLD_FILES+=usr/lib/libdisk.a usr/lib32/libdisk.a Modified: user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Sun Feb 10 01:04:10 2013 (r246603) +++ user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Sun Feb 10 01:13:03 2013 (r246604) @@ -24,10 +24,11 @@ .\" Copyright (c) 2011, Pawel Jakub Dawidek .\" Copyright (c) 2012, Glen Barber .\" Copyright (c) 2012, Bryan Drewery +.\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved. .\" .\" $FreeBSD$ .\" -.Dd November 26, 2012 +.Dd February 8, 2012 .Dt ZFS 8 .Os .Sh NAME @@ -866,7 +867,7 @@ but this may change in future releases). disables integrity checking on user data. Disabling checksums is .Em NOT a recommended practice. -.It Sy compression Ns = Ns Cm on | off | lzjb | gzip | gzip- Ns Ar N | Cm zle +.It Sy compression Ns = Ns Cm on | off | lzjb | gzip | gzip- Ns Ar N | zle | Cm lz4 Controls the compression algorithm used for this dataset. The .Cm lzjb compression algorithm is optimized for performance while providing decent data @@ -894,6 +895,26 @@ The .Cm zle compression algorithm compresses runs of zeros. .Pp +The +.Sy lz4 +compression algorithm is a high-performance replacement +for the +.Sy lzjb +algorithm. It features significantly faster +compression and decompression, as well as a moderately higher +compression ratio than +.Sy lzjb , +but can only be used on pools with +the +.Sy lz4_compress +feature set to +.Sy enabled . +See +.Xr zpool-features 7 +for details on ZFS feature flags and the +.Sy lz4_compress +feature. +.Pp This property can also be referred to by its shortened column name .Cm compress . Changing this property affects only newly-written data. Modified: user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 ============================================================================== --- user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Sun Feb 10 01:04:10 2013 (r246603) +++ user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Sun Feb 10 01:13:03 2013 (r246604) @@ -18,10 +18,11 @@ .\" information: Portions Copyright [yyyy] [name of copyright owner] .\" .\" Copyright (c) 2012 by Delphix. All rights reserved. +.\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved. .\" .\" $FreeBSD$ .\" -.Dd Aug 28, 2012 +.Dd February 8, 2012 .Dt ZPOOL-FEATURES 7 .Os .Sh NAME @@ -185,6 +186,49 @@ This feature is .Sy active while there are any filesystems, volumes, or snapshots which were created after enabling this feature. +.It Sy lz4_compress +.Bl -column "READ\-ONLY COMPATIBLE" "org.illumos:lz4_compress" +.It GUID Ta org.illumos:lz4_compress +.It READ\-ONLY COMPATIBLE Ta no +.It DEPENDENCIES Ta none +.El +.Pp +.Sy lz4 +is a high-performance real-time compression algorithm that +features significantly faster compression and decompression as well as a +higher compression ratio than the older +.Sy lzjb +compression. +Typically, +.Sy lz4 +compression is approximately 50% faster on +compressible data and 200% faster on incompressible data than +.Sy lzjb . +It is also approximately 80% faster on decompression, while +giving approximately 10% better compression ratio. +.Pp +When the +.Sy lz4_compress +feature is set to +.Sy enabled , +the +administrator can turn on +.Sy lz4 +compression on any dataset on the +pool using the +.Xr zfs 8 +command. Please note that doing so will +immediately activate the +.Sy lz4_compress +feature on the underlying +pool (even before any data is written). Since this feature is not +read-only compatible, this operation will render the pool unimportable +on systems without support for the +.Sy lz4_compress +feature. At the +moment, this operation cannot be reversed. Booting off of +.Sy lz4 +-compressed root pools is supported. .El .Sh SEE ALSO .Xr zpool 8 Modified: user/attilio/vmcontention/lib/libc/stdio/fopen.3 ============================================================================== --- user/attilio/vmcontention/lib/libc/stdio/fopen.3 Sun Feb 10 01:04:10 2013 (r246603) +++ user/attilio/vmcontention/lib/libc/stdio/fopen.3 Sun Feb 10 01:13:03 2013 (r246604) @@ -332,7 +332,7 @@ but is also supported by glibc. The .Fn fmemopen function -conforms to +conforms to .St -p1003.1-2008 . The ``b'' mode does not conform to any standard but is also supported by glibc. Modified: user/attilio/vmcontention/lib/libc/sys/chflags.2 ============================================================================== --- user/attilio/vmcontention/lib/libc/sys/chflags.2 Sun Feb 10 01:04:10 2013 (r246603) +++ user/attilio/vmcontention/lib/libc/sys/chflags.2 Sun Feb 10 01:13:03 2013 (r246604) @@ -98,7 +98,7 @@ If one of or .Dv SF_NOUNLINK is set a non-super-user cannot change any flags and even the super-user -can change flags only if securelevel is greater than 0. +can change flags only if securelevel is 0. (See .Xr init 8 for details.) Modified: user/attilio/vmcontention/sys/arm/arm/vm_machdep.c ============================================================================== --- user/attilio/vmcontention/sys/arm/arm/vm_machdep.c Sun Feb 10 01:04:10 2013 (r246603) +++ user/attilio/vmcontention/sys/arm/arm/vm_machdep.c Sun Feb 10 01:13:03 2013 (r246604) @@ -402,7 +402,8 @@ cpu_thread_alloc(struct thread *td) * the ARM EABI. */ td->td_frame = (struct trapframe *)STACKALIGN((u_int)td->td_kstack + - USPACE_SVC_STACK_TOP - sizeof(struct pcb) - 1); + USPACE_SVC_STACK_TOP - sizeof(struct pcb) - + sizeof(struct trapframe)); #ifdef __XSCALE__ #ifndef CPU_XSCALE_CORE3 pmap_use_minicache(td->td_kstack, td->td_kstack_pages * PAGE_SIZE); Modified: user/attilio/vmcontention/sys/cddl/boot/zfs/README ============================================================================== --- user/attilio/vmcontention/sys/cddl/boot/zfs/README Sun Feb 10 01:04:10 2013 (r246603) +++ user/attilio/vmcontention/sys/cddl/boot/zfs/README Sun Feb 10 01:13:03 2013 (r246604) @@ -5,6 +5,7 @@ are used by the ZFS bootstrap: fletcher.c checksum support sha256.c checksum support + lz4.c compression support lzjb.c compression support zfssubr.c checksum, compression and raidz support zfsimpl.h mostly describing the physical layout Copied: user/attilio/vmcontention/sys/cddl/boot/zfs/lz4.c (from r246603, head/sys/cddl/boot/zfs/lz4.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/attilio/vmcontention/sys/cddl/boot/zfs/lz4.c Sun Feb 10 01:13:03 2013 (r246604, copy of r246603, head/sys/cddl/boot/zfs/lz4.c) @@ -0,0 +1,308 @@ +/* + * LZ4 - Fast LZ compression algorithm + * Header File + * Copyright (C) 2011-2013, Yann Collet. + * BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) + * + * 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 + * OWNER 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. + * + * You can contact the author at : + * - LZ4 homepage : http://fastcompression.blogspot.com/p/lz4.html + * - LZ4 source repository : http://code.google.com/p/lz4/ + * + * $FreeBSD$ + */ + +static int LZ4_uncompress_unknownOutputSize(const char *source, char *dest, + int isize, int maxOutputSize); + +/* ARGSUSED */ +static int +lz4_decompress(void *s_start, void *d_start, size_t s_len, size_t d_len, int dummy __unused) +{ + const uint8_t *src = s_start; + uint32_t bufsiz = htonl(*(uint32_t *)src); + + /* invalid compressed buffer size encoded at start */ + if (bufsiz + 4 > s_len) + return (1); + + /* + * Returns 0 on success (decompression function returned non-negative) + * and non-zero on failure (decompression function returned negative). + */ + return (LZ4_uncompress_unknownOutputSize(s_start + 4, d_start, bufsiz, + d_len) < 0); +} + +/* + * CPU Feature Detection + */ + +/* 32 or 64 bits ? */ +#if (defined(__x86_64__) || defined(__x86_64) || defined(__amd64__) || \ + defined(__amd64) || defined(__ppc64__) || defined(_WIN64) || \ + defined(__LP64__) || defined(_LP64)) +#define LZ4_ARCH64 1 +#else +#define LZ4_ARCH64 0 +#endif + +/* + * Little Endian or Big Endian? + * Note: overwrite the below #define if you know your architecture endianess. + */ +#if BYTE_ORDER == BIG_ENDIAN +#define LZ4_BIG_ENDIAN 1 +#else + /* + * Little Endian assumed. PDP Endian and other very rare endian format + * are unsupported. + */ +#endif + +/* + * Compiler Options + */ +#if __STDC_VERSION__ >= 199901L /* C99 */ +/* "restrict" is a known keyword */ +#else +/* Disable restrict */ +#define restrict +#endif + +#define GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) + +#define lz4_bswap16(x) ((unsigned short int) ((((x) >> 8) & 0xffu) \ + | (((x) & 0xffu) << 8))) + +#if (GCC_VERSION >= 302) || (__INTEL_COMPILER >= 800) || defined(__clang__) +#define expect(expr, value) (__builtin_expect((expr), (value))) +#else +#define expect(expr, value) (expr) +#endif + +#define likely(expr) expect((expr) != 0, 1) +#define unlikely(expr) expect((expr) != 0, 0) + +/* Basic types */ +#define BYTE uint8_t +#define U16 uint16_t +#define U32 uint32_t +#define S32 int32_t +#define U64 uint64_t + +typedef struct _U16_S { + U16 v; +} U16_S; +typedef struct _U32_S { + U32 v; +} U32_S; +typedef struct _U64_S { + U64 v; +} U64_S; + +#define A64(x) (((U64_S *)(x))->v) +#define A32(x) (((U32_S *)(x))->v) +#define A16(x) (((U16_S *)(x))->v) + +/* + * Constants + */ +#define MINMATCH 4 + +#define COPYLENGTH 8 +#define LASTLITERALS 5 + +#define ML_BITS 4 +#define ML_MASK ((1U<> ML_BITS)) == RUN_MASK) { + int s = 255; + while ((ip < iend) && (s == 255)) { + s = *ip++; + length += s; + } + } + /* copy literals */ + cpy = op + length; + if ((cpy > oend - COPYLENGTH) || + (ip + length > iend - COPYLENGTH)) { + if (cpy > oend) + /* + * Error: request to write beyond destination + * buffer. + */ + goto _output_error; + if (ip + length > iend) + /* + * Error : request to read beyond source + * buffer. + */ + goto _output_error; + memcpy(op, ip, length); + op += length; + ip += length; + if (ip < iend) + /* Error : LZ4 format violation */ + goto _output_error; + /* Necessarily EOF, due to parsing restrictions. */ + break; + } + LZ4_WILDCOPY(ip, op, cpy); + ip -= (op - cpy); + op = cpy; + + /* get offset */ + LZ4_READ_LITTLEENDIAN_16(ref, cpy, ip); + ip += 2; + if (ref < (BYTE * const) dest) + /* + * Error: offset creates reference outside of + * destination buffer. + */ + goto _output_error; + + /* get matchlength */ + if ((length = (token & ML_MASK)) == ML_MASK) { + while (ip < iend) { + int s = *ip++; + length += s; + if (s == 255) + continue; + break; + } + } + /* copy repeated sequence */ + if unlikely(op - ref < STEPSIZE) { +#if LZ4_ARCH64 + size_t dec2table[] = { 0, 0, 0, -1, 0, 1, 2, 3 }; + size_t dec2 = dec2table[op - ref]; +#else + const int dec2 = 0; +#endif + *op++ = *ref++; + *op++ = *ref++; + *op++ = *ref++; + *op++ = *ref++; + ref -= dec[op - ref]; + A32(op) = A32(ref); + op += STEPSIZE - 4; + ref -= dec2; + } else { + LZ4_COPYSTEP(ref, op); + } + cpy = op + length - (STEPSIZE - 4); + if (cpy > oend - COPYLENGTH) { + if (cpy > oend) + /* + * Error: request to write outside of + * destination buffer. + */ + goto _output_error; + LZ4_SECURECOPY(ref, op, (oend - COPYLENGTH)); + while (op < cpy) + *op++ = *ref++; + op = cpy; + if (op == oend) + /* + * Check EOF (should never happen, since last + * 5 bytes are supposed to be literals). + */ + break; + continue; + } + LZ4_SECURECOPY(ref, op, cpy); + op = cpy; /* correction */ + } + + /* end of decoding */ + return (int)(((char *)op) - dest); + + /* write overflow error detected */ + _output_error: + return (int)(-(((char *)ip) - source)); +} Modified: user/attilio/vmcontention/sys/cddl/boot/zfs/zfsimpl.h ============================================================================== --- user/attilio/vmcontention/sys/cddl/boot/zfs/zfsimpl.h Sun Feb 10 01:04:10 2013 (r246603) +++ user/attilio/vmcontention/sys/cddl/boot/zfs/zfsimpl.h Sun Feb 10 01:13:03 2013 (r246604) @@ -52,6 +52,9 @@ * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* + * Copyright 2013 by Saso Kiselkov. All rights reserved. + */ #define MAXNAMELEN 256 @@ -439,6 +442,7 @@ enum zio_compress { ZIO_COMPRESS_GZIP_8, ZIO_COMPRESS_GZIP_9, ZIO_COMPRESS_ZLE, + ZIO_COMPRESS_LZ4, ZIO_COMPRESS_FUNCTIONS }; Modified: user/attilio/vmcontention/sys/cddl/boot/zfs/zfssubr.c ============================================================================== --- user/attilio/vmcontention/sys/cddl/boot/zfs/zfssubr.c Sun Feb 10 01:04:10 2013 (r246603) +++ user/attilio/vmcontention/sys/cddl/boot/zfs/zfssubr.c Sun Feb 10 01:13:03 2013 (r246604) @@ -119,6 +119,7 @@ typedef struct zio_compress_info { #include "lzjb.c" #include "zle.c" +#include "lz4.c" /* * Compression vectors. @@ -139,6 +140,7 @@ static zio_compress_info_t zio_compress_ {NULL, NULL, 8, "gzip-8"}, {NULL, NULL, 9, "gzip-9"}, {NULL, zle_decompress, 64, "zle"}, + {NULL, lz4_decompress, 0, "lz4"}, }; static void Modified: user/attilio/vmcontention/sys/cddl/compat/opensolaris/sys/byteorder.h ============================================================================== --- user/attilio/vmcontention/sys/cddl/compat/opensolaris/sys/byteorder.h Sun Feb 10 01:04:10 2013 (r246603) +++ user/attilio/vmcontention/sys/cddl/compat/opensolaris/sys/byteorder.h Sun Feb 10 01:13:03 2013 (r246604) @@ -42,6 +42,11 @@ #ifndef _OPENSOLARIS_SYS_BYTEORDER_H_ #define _OPENSOLARIS_SYS_BYTEORDER_H_ +/* for htonl() */ +#ifndef _KERNEL +#include +#endif + /* * Macros to reverse byte order */ @@ -86,4 +91,6 @@ #define ntohll(x) BSWAP_64(x) #endif +#define BE_IN32(xa) htonl(*((uint32_t *)(void *)(xa))) + #endif /* _OPENSOLARIS_SYS_BYTEORDER_H_ */ Modified: user/attilio/vmcontention/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c ============================================================================== --- user/attilio/vmcontention/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c Sun Feb 10 01:04:10 2013 (r246603) +++ user/attilio/vmcontention/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c Sun Feb 10 01:13:03 2013 (r246604) @@ -21,6 +21,7 @@ /* * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. */ #ifdef _KERNEL @@ -155,4 +156,7 @@ zpool_feature_init(void) zfeature_register(SPA_FEATURE_EMPTY_BPOBJ, "com.delphix:empty_bpobj", "empty_bpobj", "Snapshots use less space.", B_TRUE, B_FALSE, NULL); + zfeature_register(SPA_FEATURE_LZ4_COMPRESS, + "org.illumos:lz4_compress", "lz4_compress", + "LZ4 compression algorithm support.", B_FALSE, B_FALSE, NULL); } Modified: user/attilio/vmcontention/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h ============================================================================== --- user/attilio/vmcontention/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h Sun Feb 10 01:04:10 2013 (r246603) +++ user/attilio/vmcontention/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h Sun Feb 10 01:13:03 2013 (r246604) @@ -21,6 +21,7 @@ /* * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. */ #ifndef _ZFEATURE_COMMON_H @@ -51,6 +52,7 @@ typedef int (zfeature_func_t)(zfeature_i static enum spa_feature { SPA_FEATURE_ASYNC_DESTROY, SPA_FEATURE_EMPTY_BPOBJ, + SPA_FEATURE_LZ4_COMPRESS, SPA_FEATURES } spa_feature_t; Modified: user/attilio/vmcontention/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c ============================================================================== --- user/attilio/vmcontention/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c Sun Feb 10 01:04:10 2013 (r246603) +++ user/attilio/vmcontention/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c Sun Feb 10 01:13:03 2013 (r246604) @@ -21,6 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011 by Delphix. All rights reserved. + * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. */ /* Portions Copyright 2010 Robert Milkowski */ @@ -96,6 +97,7 @@ zfs_prop_init(void) { "gzip-8", ZIO_COMPRESS_GZIP_8 }, { "gzip-9", ZIO_COMPRESS_GZIP_9 }, { "zle", ZIO_COMPRESS_ZLE }, + { "lz4", ZIO_COMPRESS_LZ4 }, { NULL } }; @@ -211,8 +213,8 @@ zfs_prop_init(void) zprop_register_index(ZFS_PROP_COMPRESSION, "compression", ZIO_COMPRESS_DEFAULT, PROP_INHERIT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, - "on | off | lzjb | gzip | gzip-[1-9] | zle", "COMPRESS", - compress_table); + "on | off | lzjb | gzip | gzip-[1-9] | zle | lz4", + "COMPRESS", compress_table); zprop_register_index(ZFS_PROP_SNAPDIR, "snapdir", ZFS_SNAPDIR_HIDDEN, PROP_INHERIT, ZFS_TYPE_FILESYSTEM, "hidden | visible", "SNAPDIR", snapdir_table); Modified: user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/Makefile.files ============================================================================== --- user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/Makefile.files Sun Feb 10 01:04:10 2013 (r246603) +++ user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/Makefile.files Sun Feb 10 01:13:03 2013 (r246604) @@ -22,6 +22,7 @@ # # Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2012 by Delphix. All rights reserved. +# Copyright (c) 2013 by Saso Kiselkov. All rights reserved. # # # This Makefile defines all file modules for the directory uts/common @@ -56,6 +57,7 @@ ZFS_COMMON_OBJS += \ dsl_scan.o \ zfeature.o \ gzip.o \ + lz4.o \ lzjb.o \ metaslab.o \ refcount.o \ Copied: user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4 (from r246603, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4 Sun Feb 10 01:13:03 2013 (r246604, copy of r246603, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4) @@ -0,0 +1,30 @@ +LZ4 - Fast LZ compression algorithm +Copyright (C) 2011-2013, Yann Collet. +BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) + +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 OWNER +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. + +You can contact the author at : +- LZ4 homepage : http://fastcompression.blogspot.com/p/lz4.html +- LZ4 source repository : http://code.google.com/p/lz4/ Copied: user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4.descrip (from r246603, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4.descrip) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4.descrip Sun Feb 10 01:13:03 2013 (r246604, copy of r246603, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4.descrip) @@ -0,0 +1 @@ +LZ4 COMPRESSION FUNCTIONALITY IN ZFS Copied: user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c (from r246603, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c Sun Feb 10 01:13:03 2013 (r246604, copy of r246603, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c) @@ -0,0 +1,1064 @@ +/* + * LZ4 - Fast LZ compression algorithm + * Header File + * Copyright (C) 2011-2013, Yann Collet. + * BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) + * + * 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 + * OWNER 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. + * + * You can contact the author at : + * - LZ4 homepage : http://fastcompression.blogspot.com/p/lz4.html + * - LZ4 source repository : http://code.google.com/p/lz4/ + */ + +#include + +static int real_LZ4_compress(const char *source, char *dest, int isize, + int osize); +static int real_LZ4_uncompress(const char *source, char *dest, int osize); +static int LZ4_compressBound(int isize); +static int LZ4_uncompress_unknownOutputSize(const char *source, char *dest, + int isize, int maxOutputSize); +static int LZ4_compressCtx(void *ctx, const char *source, char *dest, + int isize, int osize); +static int LZ4_compress64kCtx(void *ctx, const char *source, char *dest, + int isize, int osize); + +/*ARGSUSED*/ +size_t +lz4_compress(void *s_start, void *d_start, size_t s_len, size_t d_len, int n) +{ + uint32_t bufsiz; + char *dest = d_start; + + ASSERT(d_len >= sizeof (bufsiz)); + + bufsiz = real_LZ4_compress(s_start, &dest[sizeof (bufsiz)], s_len, + d_len - sizeof (bufsiz)); + + /* Signal an error if the compression routine returned zero. */ + if (bufsiz == 0) + return (s_len); + + /* + * Encode the compresed buffer size at the start. We'll need this in + * decompression to counter the effects of padding which might be + * added to the compressed buffer and which, if unhandled, would + * confuse the hell out of our decompression function. + */ + *(uint32_t *)dest = BE_32(bufsiz); + + return (bufsiz + sizeof (bufsiz)); +} + +/*ARGSUSED*/ +int +lz4_decompress(void *s_start, void *d_start, size_t s_len, size_t d_len, int n) +{ + const char *src = s_start; + uint32_t bufsiz = BE_IN32(src); + + /* invalid compressed buffer size encoded at start */ + if (bufsiz + sizeof (bufsiz) > s_len) + return (1); + + /* + * Returns 0 on success (decompression function returned non-negative) + * and non-zero on failure (decompression function returned negative. + */ + return (LZ4_uncompress_unknownOutputSize(&src[sizeof (bufsiz)], + d_start, bufsiz, d_len) < 0); +} + +/* + * LZ4 API Description: + * + * Simple Functions: + * real_LZ4_compress() : + * isize : is the input size. Max supported value is ~1.9GB + * return : the number of bytes written in buffer dest + * or 0 if the compression fails (if LZ4_COMPRESSMIN is set). + * note : destination buffer must be already allocated. + * destination buffer must be sized to handle worst cases + * situations (input data not compressible) worst case size + * evaluation is provided by function LZ4_compressBound(). + * + * real_LZ4_uncompress() : + * osize : is the output size, therefore the original size + * return : the number of bytes read in the source buffer. + * If the source stream is malformed, the function will stop + * decoding and return a negative result, indicating the byte + * position of the faulty instruction. This function never + * writes beyond dest + osize, and is therefore protected + * against malicious data packets. + * note : destination buffer must be already allocated + * + * Advanced Functions + * + * LZ4_compressBound() : + * Provides the maximum size that LZ4 may output in a "worst case" + * scenario (input data not compressible) primarily useful for memory + * allocation of output buffer. + * + * isize : is the input size. Max supported value is ~1.9GB + * return : maximum output size in a "worst case" scenario + * note : this function is limited by "int" range (2^31-1) + * + * LZ4_uncompress_unknownOutputSize() : + * isize : is the input size, therefore the compressed size + * maxOutputSize : is the size of the destination buffer (which must be + * already allocated) + * return : the number of bytes decoded in the destination buffer + * (necessarily <= maxOutputSize). If the source stream is + * malformed, the function will stop decoding and return a + * negative result, indicating the byte position of the faulty + * instruction. This function never writes beyond dest + + * maxOutputSize, and is therefore protected against malicious + * data packets. + * note : Destination buffer must be already allocated. + * This version is slightly slower than real_LZ4_uncompress() + * + * LZ4_compressCtx() : + * This function explicitly handles the CTX memory structure. + * + * ILLUMOS CHANGES: the CTX memory structure must be explicitly allocated + * by the caller (either on the stack or using kmem_zalloc). Passing NULL + * isn't valid. + * + * LZ4_compress64kCtx() : + * Same as LZ4_compressCtx(), but specific to small inputs (<64KB). + * isize *Must* be <64KB, otherwise the output will be corrupted. + * + * ILLUMOS CHANGES: the CTX memory structure must be explicitly allocated + * by the caller (either on the stack or using kmem_zalloc). Passing NULL + * isn't valid. + */ + +/* + * Tuning parameters + */ + +/* + * COMPRESSIONLEVEL: Increasing this value improves compression ratio + * Lowering this value reduces memory usage. Reduced memory usage + * typically improves speed, due to cache effect (ex: L1 32KB for Intel, + * L1 64KB for AMD). Memory usage formula : N->2^(N+2) Bytes + * (examples : 12 -> 16KB ; 17 -> 512KB) + */ +#define COMPRESSIONLEVEL 12 + +/* + * NOTCOMPRESSIBLE_CONFIRMATION: Decreasing this value will make the + * algorithm skip faster data segments considered "incompressible". + * This may decrease compression ratio dramatically, but will be + * faster on incompressible data. Increasing this value will make + * the algorithm search more before declaring a segment "incompressible". + * This could improve compression a bit, but will be slower on + * incompressible data. The default value (6) is recommended. + */ +#define NOTCOMPRESSIBLE_CONFIRMATION 6 + +/* + * BIG_ENDIAN_NATIVE_BUT_INCOMPATIBLE: This will provide a boost to + * performance for big endian cpu, but the resulting compressed stream + * will be incompatible with little-endian CPU. You can set this option + * to 1 in situations where data will stay within closed environment. + * This option is useless on Little_Endian CPU (such as x86). + */ +/* #define BIG_ENDIAN_NATIVE_BUT_INCOMPATIBLE 1 */ + +/* + * CPU Feature Detection + */ + +/* 32 or 64 bits ? */ +#if (defined(__x86_64__) || defined(__x86_64) || defined(__amd64__) || \ + defined(__amd64) || defined(__ppc64__) || defined(_WIN64) || \ + defined(__LP64__) || defined(_LP64)) +#define LZ4_ARCH64 1 +/* + * Illumos: On amd64 we have 20k of stack and 24k on sun4u and sun4v, so we + * can spend 16k on the algorithm + */ +/* FreeBSD: Use heap for all platforms for now */ +#define STACKLIMIT 0 +#else +#define LZ4_ARCH64 0 +/* + * Illumos: On i386 we only have 12k of stack, so in order to maintain the + * same COMPRESSIONLEVEL we have to use heap allocation. Performance will + * suck, but alas, it's ZFS on 32-bit we're talking about, so... + */ +#define STACKLIMIT 0 +#endif + +/* + * Little Endian or Big Endian? + * Note: overwrite the below #define if you know your architecture endianess. + */ +#if BYTE_ORDER == BIG_ENDIAN +#define LZ4_BIG_ENDIAN 1 +#else +/* + * Little Endian assumed. PDP Endian and other very rare endian format + * are unsupported. + */ +#endif + +/* + * Unaligned memory access is automatically enabled for "common" CPU, + * such as x86. For others CPU, the compiler will be more cautious, and + * insert extra code to ensure aligned access is respected. If you know + * your target CPU supports unaligned memory access, you may want to + * force this option manually to improve performance + */ +#if defined(__ARM_FEATURE_UNALIGNED) +#define LZ4_FORCE_UNALIGNED_ACCESS 1 +#endif + +/* + * Compiler Options + */ +#if __STDC_VERSION__ >= 199901L /* C99 */ +/* "restrict" is a known keyword */ +#else +/* Disable restrict */ +#define restrict +#endif + +#define lz4_bswap16(x) ((unsigned short int) ((((x) >> 8) & 0xffu) | \ + (((x) & 0xffu) << 8))) + +#define expect(expr, value) (__builtin_expect((expr), (value))) + +#if defined(likely) +#undef likely +#endif +#if defined(unlikely) +#undef unlikely +#endif + +#define likely(expr) expect((expr) != 0, 1) +#define unlikely(expr) expect((expr) != 0, 0) + +/* Basic types */ +#define BYTE uint8_t +#define U16 uint16_t +#define U32 uint32_t +#define S32 int32_t +#define U64 uint64_t + +#ifndef LZ4_FORCE_UNALIGNED_ACCESS +#pragma pack(1) +#endif + +typedef struct _U16_S { + U16 v; +} U16_S; +typedef struct _U32_S { + U32 v; +} U32_S; +typedef struct _U64_S { + U64 v; +} U64_S; + +#ifndef LZ4_FORCE_UNALIGNED_ACCESS +#pragma pack() +#endif + +#define A64(x) (((U64_S *)(x))->v) +#define A32(x) (((U32_S *)(x))->v) +#define A16(x) (((U16_S *)(x))->v) + +/* + * Constants + */ +#define MINMATCH 4 + +#define HASH_LOG COMPRESSIONLEVEL +#define HASHTABLESIZE (1 << HASH_LOG) +#define HASH_MASK (HASHTABLESIZE - 1) + +#define SKIPSTRENGTH (NOTCOMPRESSIBLE_CONFIRMATION > 2 ? \ + NOTCOMPRESSIBLE_CONFIRMATION : 2) + +/* + * Defines if memory is allocated into the stack (local variable), + * or into the heap (kmem_alloc()). + */ +#define HEAPMODE (HASH_LOG > STACKLIMIT) +#define COPYLENGTH 8 +#define LASTLITERALS 5 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Sun Feb 10 01:18:31 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 0A7BFE9A; Sun, 10 Feb 2013 01:18:31 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D130E1AE; Sun, 10 Feb 2013 01:18:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1A1IUpv053682; Sun, 10 Feb 2013 01:18:30 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1A1IRKZ053657; Sun, 10 Feb 2013 01:18:27 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201302100118.r1A1IRKZ053657@svn.freebsd.org> From: Attilio Rao Date: Sun, 10 Feb 2013 01:18:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r246605 - in user/attilio/vmc-playground: . cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd/zpool lib/libc/stdio lib/libc/sys sys/arm/arm sys/cddl/boot/zfs sys/cddl/compat... X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Feb 2013 01:18:31 -0000 Author: attilio Date: Sun Feb 10 01:18:26 2013 New Revision: 246605 URL: http://svnweb.freebsd.org/changeset/base/246605 Log: Merge from vmcontention Added: user/attilio/vmc-playground/sys/cddl/boot/zfs/lz4.c - copied unchanged from r246604, user/attilio/vmcontention/sys/cddl/boot/zfs/lz4.c user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4 - copied unchanged from r246604, user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4 user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4.descrip - copied unchanged from r246604, user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4.descrip user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c - copied unchanged from r246604, user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c Modified: user/attilio/vmc-playground/Makefile.inc1 user/attilio/vmc-playground/ObsoleteFiles.inc user/attilio/vmc-playground/cddl/contrib/opensolaris/cmd/zfs/zfs.8 user/attilio/vmc-playground/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 user/attilio/vmc-playground/lib/libc/stdio/fopen.3 user/attilio/vmc-playground/lib/libc/sys/chflags.2 user/attilio/vmc-playground/sys/arm/arm/vm_machdep.c user/attilio/vmc-playground/sys/cddl/boot/zfs/README user/attilio/vmc-playground/sys/cddl/boot/zfs/zfsimpl.h user/attilio/vmc-playground/sys/cddl/boot/zfs/zfssubr.c user/attilio/vmc-playground/sys/cddl/compat/opensolaris/sys/byteorder.h user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/Makefile.files user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_compress.h user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_compress.c user/attilio/vmc-playground/sys/conf/files user/attilio/vmc-playground/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c user/attilio/vmc-playground/sys/dev/cxgbe/t4_main.c user/attilio/vmc-playground/sys/fs/tmpfs/tmpfs_vnops.c user/attilio/vmc-playground/sys/modules/usb/smsc/Makefile user/attilio/vmc-playground/sys/netinet/sctp.h user/attilio/vmc-playground/sys/netinet/sctp_asconf.c user/attilio/vmc-playground/sys/netinet/sctp_indata.c user/attilio/vmc-playground/sys/netinet/sctp_input.c user/attilio/vmc-playground/sys/netinet/sctp_output.c user/attilio/vmc-playground/sys/netinet/sctp_output.h user/attilio/vmc-playground/sys/netinet/sctp_pcb.c user/attilio/vmc-playground/sys/netinet/sctp_structs.h user/attilio/vmc-playground/sys/netinet/sctp_sysctl.c user/attilio/vmc-playground/sys/netinet/sctp_timer.c user/attilio/vmc-playground/sys/netinet/sctp_usrreq.c user/attilio/vmc-playground/sys/netinet/sctputil.c user/attilio/vmc-playground/sys/ofed/drivers/net/mlx4/en_tx.c user/attilio/vmc-playground/usr.bin/Makefile user/attilio/vmc-playground/usr.bin/csup/csup.1 user/attilio/vmc-playground/usr.bin/ee/Makefile Directory Properties: user/attilio/vmc-playground/ (props changed) user/attilio/vmc-playground/cddl/contrib/opensolaris/ (props changed) user/attilio/vmc-playground/cddl/contrib/opensolaris/cmd/zfs/ (props changed) user/attilio/vmc-playground/lib/libc/ (props changed) user/attilio/vmc-playground/sys/ (props changed) user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/ (props changed) user/attilio/vmc-playground/sys/conf/ (props changed) user/attilio/vmc-playground/usr.bin/csup/ (props changed) Modified: user/attilio/vmc-playground/Makefile.inc1 ============================================================================== --- user/attilio/vmc-playground/Makefile.inc1 Sun Feb 10 01:13:03 2013 (r246604) +++ user/attilio/vmc-playground/Makefile.inc1 Sun Feb 10 01:18:26 2013 (r246605) @@ -673,6 +673,10 @@ _install-info= install-info _zoneinfo= zic tzsetup .endif +.if exists(/usr/sbin/nmtree) +_nmtree_itools= nmtree +.endif + ITOOLS= [ awk cap_mkdb cat chflags chmod chown \ date echo egrep find grep id install ${_install-info} \ ln lockf make mkdir mtree ${_nmtree_itools} mv pwd_mkdb \ @@ -1134,8 +1138,6 @@ _yacc= usr.bin/yacc .if ${BOOTSTRAPPING} < 1000026 _nmtree= lib/libnetbsd \ usr.sbin/nmtree -.else -_nmtree_itools= nmtree .endif .if ${BOOTSTRAPPING} < 1000027 Modified: user/attilio/vmc-playground/ObsoleteFiles.inc ============================================================================== --- user/attilio/vmc-playground/ObsoleteFiles.inc Sun Feb 10 01:13:03 2013 (r246604) +++ user/attilio/vmc-playground/ObsoleteFiles.inc Sun Feb 10 01:18:26 2013 (r246605) @@ -45,6 +45,10 @@ OLD_DIRS+=usr/share/man/man1aout OLD_DIRS+=usr/share/man/cat1aout OLD_DIRS+=usr/share/man/en.ISO8859-1/cat1aout OLD_DIRS+=usr/share/man/en.UTF-8/cat1aout +# 20130110: bsd.compat.mk removed +OLD_FILES+=usr/share/mk/bsd.compat.mk +# 20130103: gnats-supfile removed +OLD_FILES+=usr/share/examples/cvsup/gnats-supfile # 20121230: libdisk removed OLD_FILES+=usr/share/man/man3/libdisk.3.gz usr/include/libdisk.h OLD_FILES+=usr/lib/libdisk.a usr/lib32/libdisk.a Modified: user/attilio/vmc-playground/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- user/attilio/vmc-playground/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Sun Feb 10 01:13:03 2013 (r246604) +++ user/attilio/vmc-playground/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Sun Feb 10 01:18:26 2013 (r246605) @@ -24,10 +24,11 @@ .\" Copyright (c) 2011, Pawel Jakub Dawidek .\" Copyright (c) 2012, Glen Barber .\" Copyright (c) 2012, Bryan Drewery +.\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved. .\" .\" $FreeBSD$ .\" -.Dd November 26, 2012 +.Dd February 8, 2012 .Dt ZFS 8 .Os .Sh NAME @@ -866,7 +867,7 @@ but this may change in future releases). disables integrity checking on user data. Disabling checksums is .Em NOT a recommended practice. -.It Sy compression Ns = Ns Cm on | off | lzjb | gzip | gzip- Ns Ar N | Cm zle +.It Sy compression Ns = Ns Cm on | off | lzjb | gzip | gzip- Ns Ar N | zle | Cm lz4 Controls the compression algorithm used for this dataset. The .Cm lzjb compression algorithm is optimized for performance while providing decent data @@ -894,6 +895,26 @@ The .Cm zle compression algorithm compresses runs of zeros. .Pp +The +.Sy lz4 +compression algorithm is a high-performance replacement +for the +.Sy lzjb +algorithm. It features significantly faster +compression and decompression, as well as a moderately higher +compression ratio than +.Sy lzjb , +but can only be used on pools with +the +.Sy lz4_compress +feature set to +.Sy enabled . +See +.Xr zpool-features 7 +for details on ZFS feature flags and the +.Sy lz4_compress +feature. +.Pp This property can also be referred to by its shortened column name .Cm compress . Changing this property affects only newly-written data. Modified: user/attilio/vmc-playground/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 ============================================================================== --- user/attilio/vmc-playground/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Sun Feb 10 01:13:03 2013 (r246604) +++ user/attilio/vmc-playground/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Sun Feb 10 01:18:26 2013 (r246605) @@ -18,10 +18,11 @@ .\" information: Portions Copyright [yyyy] [name of copyright owner] .\" .\" Copyright (c) 2012 by Delphix. All rights reserved. +.\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved. .\" .\" $FreeBSD$ .\" -.Dd Aug 28, 2012 +.Dd February 8, 2012 .Dt ZPOOL-FEATURES 7 .Os .Sh NAME @@ -185,6 +186,49 @@ This feature is .Sy active while there are any filesystems, volumes, or snapshots which were created after enabling this feature. +.It Sy lz4_compress +.Bl -column "READ\-ONLY COMPATIBLE" "org.illumos:lz4_compress" +.It GUID Ta org.illumos:lz4_compress +.It READ\-ONLY COMPATIBLE Ta no +.It DEPENDENCIES Ta none +.El +.Pp +.Sy lz4 +is a high-performance real-time compression algorithm that +features significantly faster compression and decompression as well as a +higher compression ratio than the older +.Sy lzjb +compression. +Typically, +.Sy lz4 +compression is approximately 50% faster on +compressible data and 200% faster on incompressible data than +.Sy lzjb . +It is also approximately 80% faster on decompression, while +giving approximately 10% better compression ratio. +.Pp +When the +.Sy lz4_compress +feature is set to +.Sy enabled , +the +administrator can turn on +.Sy lz4 +compression on any dataset on the +pool using the +.Xr zfs 8 +command. Please note that doing so will +immediately activate the +.Sy lz4_compress +feature on the underlying +pool (even before any data is written). Since this feature is not +read-only compatible, this operation will render the pool unimportable +on systems without support for the +.Sy lz4_compress +feature. At the +moment, this operation cannot be reversed. Booting off of +.Sy lz4 +-compressed root pools is supported. .El .Sh SEE ALSO .Xr zpool 8 Modified: user/attilio/vmc-playground/lib/libc/stdio/fopen.3 ============================================================================== --- user/attilio/vmc-playground/lib/libc/stdio/fopen.3 Sun Feb 10 01:13:03 2013 (r246604) +++ user/attilio/vmc-playground/lib/libc/stdio/fopen.3 Sun Feb 10 01:18:26 2013 (r246605) @@ -332,7 +332,7 @@ but is also supported by glibc. The .Fn fmemopen function -conforms to +conforms to .St -p1003.1-2008 . The ``b'' mode does not conform to any standard but is also supported by glibc. Modified: user/attilio/vmc-playground/lib/libc/sys/chflags.2 ============================================================================== --- user/attilio/vmc-playground/lib/libc/sys/chflags.2 Sun Feb 10 01:13:03 2013 (r246604) +++ user/attilio/vmc-playground/lib/libc/sys/chflags.2 Sun Feb 10 01:18:26 2013 (r246605) @@ -98,7 +98,7 @@ If one of or .Dv SF_NOUNLINK is set a non-super-user cannot change any flags and even the super-user -can change flags only if securelevel is greater than 0. +can change flags only if securelevel is 0. (See .Xr init 8 for details.) Modified: user/attilio/vmc-playground/sys/arm/arm/vm_machdep.c ============================================================================== --- user/attilio/vmc-playground/sys/arm/arm/vm_machdep.c Sun Feb 10 01:13:03 2013 (r246604) +++ user/attilio/vmc-playground/sys/arm/arm/vm_machdep.c Sun Feb 10 01:18:26 2013 (r246605) @@ -402,7 +402,8 @@ cpu_thread_alloc(struct thread *td) * the ARM EABI. */ td->td_frame = (struct trapframe *)STACKALIGN((u_int)td->td_kstack + - USPACE_SVC_STACK_TOP - sizeof(struct pcb) - 1); + USPACE_SVC_STACK_TOP - sizeof(struct pcb) - + sizeof(struct trapframe)); #ifdef __XSCALE__ #ifndef CPU_XSCALE_CORE3 pmap_use_minicache(td->td_kstack, td->td_kstack_pages * PAGE_SIZE); Modified: user/attilio/vmc-playground/sys/cddl/boot/zfs/README ============================================================================== --- user/attilio/vmc-playground/sys/cddl/boot/zfs/README Sun Feb 10 01:13:03 2013 (r246604) +++ user/attilio/vmc-playground/sys/cddl/boot/zfs/README Sun Feb 10 01:18:26 2013 (r246605) @@ -5,6 +5,7 @@ are used by the ZFS bootstrap: fletcher.c checksum support sha256.c checksum support + lz4.c compression support lzjb.c compression support zfssubr.c checksum, compression and raidz support zfsimpl.h mostly describing the physical layout Copied: user/attilio/vmc-playground/sys/cddl/boot/zfs/lz4.c (from r246604, user/attilio/vmcontention/sys/cddl/boot/zfs/lz4.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/attilio/vmc-playground/sys/cddl/boot/zfs/lz4.c Sun Feb 10 01:18:26 2013 (r246605, copy of r246604, user/attilio/vmcontention/sys/cddl/boot/zfs/lz4.c) @@ -0,0 +1,308 @@ +/* + * LZ4 - Fast LZ compression algorithm + * Header File + * Copyright (C) 2011-2013, Yann Collet. + * BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) + * + * 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 + * OWNER 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. + * + * You can contact the author at : + * - LZ4 homepage : http://fastcompression.blogspot.com/p/lz4.html + * - LZ4 source repository : http://code.google.com/p/lz4/ + * + * $FreeBSD$ + */ + +static int LZ4_uncompress_unknownOutputSize(const char *source, char *dest, + int isize, int maxOutputSize); + +/* ARGSUSED */ +static int +lz4_decompress(void *s_start, void *d_start, size_t s_len, size_t d_len, int dummy __unused) +{ + const uint8_t *src = s_start; + uint32_t bufsiz = htonl(*(uint32_t *)src); + + /* invalid compressed buffer size encoded at start */ + if (bufsiz + 4 > s_len) + return (1); + + /* + * Returns 0 on success (decompression function returned non-negative) + * and non-zero on failure (decompression function returned negative). + */ + return (LZ4_uncompress_unknownOutputSize(s_start + 4, d_start, bufsiz, + d_len) < 0); +} + +/* + * CPU Feature Detection + */ + +/* 32 or 64 bits ? */ +#if (defined(__x86_64__) || defined(__x86_64) || defined(__amd64__) || \ + defined(__amd64) || defined(__ppc64__) || defined(_WIN64) || \ + defined(__LP64__) || defined(_LP64)) +#define LZ4_ARCH64 1 +#else +#define LZ4_ARCH64 0 +#endif + +/* + * Little Endian or Big Endian? + * Note: overwrite the below #define if you know your architecture endianess. + */ +#if BYTE_ORDER == BIG_ENDIAN +#define LZ4_BIG_ENDIAN 1 +#else + /* + * Little Endian assumed. PDP Endian and other very rare endian format + * are unsupported. + */ +#endif + +/* + * Compiler Options + */ +#if __STDC_VERSION__ >= 199901L /* C99 */ +/* "restrict" is a known keyword */ +#else +/* Disable restrict */ +#define restrict +#endif + +#define GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) + +#define lz4_bswap16(x) ((unsigned short int) ((((x) >> 8) & 0xffu) \ + | (((x) & 0xffu) << 8))) + +#if (GCC_VERSION >= 302) || (__INTEL_COMPILER >= 800) || defined(__clang__) +#define expect(expr, value) (__builtin_expect((expr), (value))) +#else +#define expect(expr, value) (expr) +#endif + +#define likely(expr) expect((expr) != 0, 1) +#define unlikely(expr) expect((expr) != 0, 0) + +/* Basic types */ +#define BYTE uint8_t +#define U16 uint16_t +#define U32 uint32_t +#define S32 int32_t +#define U64 uint64_t + +typedef struct _U16_S { + U16 v; +} U16_S; +typedef struct _U32_S { + U32 v; +} U32_S; +typedef struct _U64_S { + U64 v; +} U64_S; + +#define A64(x) (((U64_S *)(x))->v) +#define A32(x) (((U32_S *)(x))->v) +#define A16(x) (((U16_S *)(x))->v) + +/* + * Constants + */ +#define MINMATCH 4 + +#define COPYLENGTH 8 +#define LASTLITERALS 5 + +#define ML_BITS 4 +#define ML_MASK ((1U<> ML_BITS)) == RUN_MASK) { + int s = 255; + while ((ip < iend) && (s == 255)) { + s = *ip++; + length += s; + } + } + /* copy literals */ + cpy = op + length; + if ((cpy > oend - COPYLENGTH) || + (ip + length > iend - COPYLENGTH)) { + if (cpy > oend) + /* + * Error: request to write beyond destination + * buffer. + */ + goto _output_error; + if (ip + length > iend) + /* + * Error : request to read beyond source + * buffer. + */ + goto _output_error; + memcpy(op, ip, length); + op += length; + ip += length; + if (ip < iend) + /* Error : LZ4 format violation */ + goto _output_error; + /* Necessarily EOF, due to parsing restrictions. */ + break; + } + LZ4_WILDCOPY(ip, op, cpy); + ip -= (op - cpy); + op = cpy; + + /* get offset */ + LZ4_READ_LITTLEENDIAN_16(ref, cpy, ip); + ip += 2; + if (ref < (BYTE * const) dest) + /* + * Error: offset creates reference outside of + * destination buffer. + */ + goto _output_error; + + /* get matchlength */ + if ((length = (token & ML_MASK)) == ML_MASK) { + while (ip < iend) { + int s = *ip++; + length += s; + if (s == 255) + continue; + break; + } + } + /* copy repeated sequence */ + if unlikely(op - ref < STEPSIZE) { +#if LZ4_ARCH64 + size_t dec2table[] = { 0, 0, 0, -1, 0, 1, 2, 3 }; + size_t dec2 = dec2table[op - ref]; +#else + const int dec2 = 0; +#endif + *op++ = *ref++; + *op++ = *ref++; + *op++ = *ref++; + *op++ = *ref++; + ref -= dec[op - ref]; + A32(op) = A32(ref); + op += STEPSIZE - 4; + ref -= dec2; + } else { + LZ4_COPYSTEP(ref, op); + } + cpy = op + length - (STEPSIZE - 4); + if (cpy > oend - COPYLENGTH) { + if (cpy > oend) + /* + * Error: request to write outside of + * destination buffer. + */ + goto _output_error; + LZ4_SECURECOPY(ref, op, (oend - COPYLENGTH)); + while (op < cpy) + *op++ = *ref++; + op = cpy; + if (op == oend) + /* + * Check EOF (should never happen, since last + * 5 bytes are supposed to be literals). + */ + break; + continue; + } + LZ4_SECURECOPY(ref, op, cpy); + op = cpy; /* correction */ + } + + /* end of decoding */ + return (int)(((char *)op) - dest); + + /* write overflow error detected */ + _output_error: + return (int)(-(((char *)ip) - source)); +} Modified: user/attilio/vmc-playground/sys/cddl/boot/zfs/zfsimpl.h ============================================================================== --- user/attilio/vmc-playground/sys/cddl/boot/zfs/zfsimpl.h Sun Feb 10 01:13:03 2013 (r246604) +++ user/attilio/vmc-playground/sys/cddl/boot/zfs/zfsimpl.h Sun Feb 10 01:18:26 2013 (r246605) @@ -52,6 +52,9 @@ * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* + * Copyright 2013 by Saso Kiselkov. All rights reserved. + */ #define MAXNAMELEN 256 @@ -439,6 +442,7 @@ enum zio_compress { ZIO_COMPRESS_GZIP_8, ZIO_COMPRESS_GZIP_9, ZIO_COMPRESS_ZLE, + ZIO_COMPRESS_LZ4, ZIO_COMPRESS_FUNCTIONS }; Modified: user/attilio/vmc-playground/sys/cddl/boot/zfs/zfssubr.c ============================================================================== --- user/attilio/vmc-playground/sys/cddl/boot/zfs/zfssubr.c Sun Feb 10 01:13:03 2013 (r246604) +++ user/attilio/vmc-playground/sys/cddl/boot/zfs/zfssubr.c Sun Feb 10 01:18:26 2013 (r246605) @@ -119,6 +119,7 @@ typedef struct zio_compress_info { #include "lzjb.c" #include "zle.c" +#include "lz4.c" /* * Compression vectors. @@ -139,6 +140,7 @@ static zio_compress_info_t zio_compress_ {NULL, NULL, 8, "gzip-8"}, {NULL, NULL, 9, "gzip-9"}, {NULL, zle_decompress, 64, "zle"}, + {NULL, lz4_decompress, 0, "lz4"}, }; static void Modified: user/attilio/vmc-playground/sys/cddl/compat/opensolaris/sys/byteorder.h ============================================================================== --- user/attilio/vmc-playground/sys/cddl/compat/opensolaris/sys/byteorder.h Sun Feb 10 01:13:03 2013 (r246604) +++ user/attilio/vmc-playground/sys/cddl/compat/opensolaris/sys/byteorder.h Sun Feb 10 01:18:26 2013 (r246605) @@ -42,6 +42,11 @@ #ifndef _OPENSOLARIS_SYS_BYTEORDER_H_ #define _OPENSOLARIS_SYS_BYTEORDER_H_ +/* for htonl() */ +#ifndef _KERNEL +#include +#endif + /* * Macros to reverse byte order */ @@ -86,4 +91,6 @@ #define ntohll(x) BSWAP_64(x) #endif +#define BE_IN32(xa) htonl(*((uint32_t *)(void *)(xa))) + #endif /* _OPENSOLARIS_SYS_BYTEORDER_H_ */ Modified: user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c ============================================================================== --- user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c Sun Feb 10 01:13:03 2013 (r246604) +++ user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c Sun Feb 10 01:18:26 2013 (r246605) @@ -21,6 +21,7 @@ /* * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. */ #ifdef _KERNEL @@ -155,4 +156,7 @@ zpool_feature_init(void) zfeature_register(SPA_FEATURE_EMPTY_BPOBJ, "com.delphix:empty_bpobj", "empty_bpobj", "Snapshots use less space.", B_TRUE, B_FALSE, NULL); + zfeature_register(SPA_FEATURE_LZ4_COMPRESS, + "org.illumos:lz4_compress", "lz4_compress", + "LZ4 compression algorithm support.", B_FALSE, B_FALSE, NULL); } Modified: user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h ============================================================================== --- user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h Sun Feb 10 01:13:03 2013 (r246604) +++ user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h Sun Feb 10 01:18:26 2013 (r246605) @@ -21,6 +21,7 @@ /* * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. */ #ifndef _ZFEATURE_COMMON_H @@ -51,6 +52,7 @@ typedef int (zfeature_func_t)(zfeature_i static enum spa_feature { SPA_FEATURE_ASYNC_DESTROY, SPA_FEATURE_EMPTY_BPOBJ, + SPA_FEATURE_LZ4_COMPRESS, SPA_FEATURES } spa_feature_t; Modified: user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c ============================================================================== --- user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c Sun Feb 10 01:13:03 2013 (r246604) +++ user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c Sun Feb 10 01:18:26 2013 (r246605) @@ -21,6 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011 by Delphix. All rights reserved. + * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. */ /* Portions Copyright 2010 Robert Milkowski */ @@ -96,6 +97,7 @@ zfs_prop_init(void) { "gzip-8", ZIO_COMPRESS_GZIP_8 }, { "gzip-9", ZIO_COMPRESS_GZIP_9 }, { "zle", ZIO_COMPRESS_ZLE }, + { "lz4", ZIO_COMPRESS_LZ4 }, { NULL } }; @@ -211,8 +213,8 @@ zfs_prop_init(void) zprop_register_index(ZFS_PROP_COMPRESSION, "compression", ZIO_COMPRESS_DEFAULT, PROP_INHERIT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, - "on | off | lzjb | gzip | gzip-[1-9] | zle", "COMPRESS", - compress_table); + "on | off | lzjb | gzip | gzip-[1-9] | zle | lz4", + "COMPRESS", compress_table); zprop_register_index(ZFS_PROP_SNAPDIR, "snapdir", ZFS_SNAPDIR_HIDDEN, PROP_INHERIT, ZFS_TYPE_FILESYSTEM, "hidden | visible", "SNAPDIR", snapdir_table); Modified: user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/Makefile.files ============================================================================== --- user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/Makefile.files Sun Feb 10 01:13:03 2013 (r246604) +++ user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/Makefile.files Sun Feb 10 01:18:26 2013 (r246605) @@ -22,6 +22,7 @@ # # Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2012 by Delphix. All rights reserved. +# Copyright (c) 2013 by Saso Kiselkov. All rights reserved. # # # This Makefile defines all file modules for the directory uts/common @@ -56,6 +57,7 @@ ZFS_COMMON_OBJS += \ dsl_scan.o \ zfeature.o \ gzip.o \ + lz4.o \ lzjb.o \ metaslab.o \ refcount.o \ Copied: user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4 (from r246604, user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4 Sun Feb 10 01:18:26 2013 (r246605, copy of r246604, user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4) @@ -0,0 +1,30 @@ +LZ4 - Fast LZ compression algorithm +Copyright (C) 2011-2013, Yann Collet. +BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) + +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 OWNER +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. + +You can contact the author at : +- LZ4 homepage : http://fastcompression.blogspot.com/p/lz4.html +- LZ4 source repository : http://code.google.com/p/lz4/ Copied: user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4.descrip (from r246604, user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4.descrip) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4.descrip Sun Feb 10 01:18:26 2013 (r246605, copy of r246604, user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4.descrip) @@ -0,0 +1 @@ +LZ4 COMPRESSION FUNCTIONALITY IN ZFS Copied: user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c (from r246604, user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c Sun Feb 10 01:18:26 2013 (r246605, copy of r246604, user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c) @@ -0,0 +1,1064 @@ +/* + * LZ4 - Fast LZ compression algorithm + * Header File + * Copyright (C) 2011-2013, Yann Collet. + * BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) + * + * 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 + * OWNER 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. + * + * You can contact the author at : + * - LZ4 homepage : http://fastcompression.blogspot.com/p/lz4.html + * - LZ4 source repository : http://code.google.com/p/lz4/ + */ + +#include + +static int real_LZ4_compress(const char *source, char *dest, int isize, + int osize); +static int real_LZ4_uncompress(const char *source, char *dest, int osize); +static int LZ4_compressBound(int isize); +static int LZ4_uncompress_unknownOutputSize(const char *source, char *dest, + int isize, int maxOutputSize); +static int LZ4_compressCtx(void *ctx, const char *source, char *dest, + int isize, int osize); +static int LZ4_compress64kCtx(void *ctx, const char *source, char *dest, + int isize, int osize); + +/*ARGSUSED*/ +size_t +lz4_compress(void *s_start, void *d_start, size_t s_len, size_t d_len, int n) +{ + uint32_t bufsiz; + char *dest = d_start; + + ASSERT(d_len >= sizeof (bufsiz)); + + bufsiz = real_LZ4_compress(s_start, &dest[sizeof (bufsiz)], s_len, + d_len - sizeof (bufsiz)); + + /* Signal an error if the compression routine returned zero. */ + if (bufsiz == 0) + return (s_len); + + /* + * Encode the compresed buffer size at the start. We'll need this in + * decompression to counter the effects of padding which might be + * added to the compressed buffer and which, if unhandled, would + * confuse the hell out of our decompression function. + */ + *(uint32_t *)dest = BE_32(bufsiz); + + return (bufsiz + sizeof (bufsiz)); +} + +/*ARGSUSED*/ +int +lz4_decompress(void *s_start, void *d_start, size_t s_len, size_t d_len, int n) +{ + const char *src = s_start; + uint32_t bufsiz = BE_IN32(src); + + /* invalid compressed buffer size encoded at start */ + if (bufsiz + sizeof (bufsiz) > s_len) + return (1); + + /* + * Returns 0 on success (decompression function returned non-negative) + * and non-zero on failure (decompression function returned negative. + */ + return (LZ4_uncompress_unknownOutputSize(&src[sizeof (bufsiz)], + d_start, bufsiz, d_len) < 0); +} + +/* + * LZ4 API Description: + * + * Simple Functions: + * real_LZ4_compress() : + * isize : is the input size. Max supported value is ~1.9GB + * return : the number of bytes written in buffer dest + * or 0 if the compression fails (if LZ4_COMPRESSMIN is set). + * note : destination buffer must be already allocated. + * destination buffer must be sized to handle worst cases + * situations (input data not compressible) worst case size + * evaluation is provided by function LZ4_compressBound(). + * + * real_LZ4_uncompress() : + * osize : is the output size, therefore the original size + * return : the number of bytes read in the source buffer. + * If the source stream is malformed, the function will stop + * decoding and return a negative result, indicating the byte + * position of the faulty instruction. This function never + * writes beyond dest + osize, and is therefore protected + * against malicious data packets. + * note : destination buffer must be already allocated + * + * Advanced Functions + * + * LZ4_compressBound() : + * Provides the maximum size that LZ4 may output in a "worst case" + * scenario (input data not compressible) primarily useful for memory + * allocation of output buffer. + * + * isize : is the input size. Max supported value is ~1.9GB + * return : maximum output size in a "worst case" scenario + * note : this function is limited by "int" range (2^31-1) + * + * LZ4_uncompress_unknownOutputSize() : + * isize : is the input size, therefore the compressed size + * maxOutputSize : is the size of the destination buffer (which must be + * already allocated) + * return : the number of bytes decoded in the destination buffer + * (necessarily <= maxOutputSize). If the source stream is + * malformed, the function will stop decoding and return a + * negative result, indicating the byte position of the faulty + * instruction. This function never writes beyond dest + + * maxOutputSize, and is therefore protected against malicious + * data packets. + * note : Destination buffer must be already allocated. + * This version is slightly slower than real_LZ4_uncompress() + * + * LZ4_compressCtx() : + * This function explicitly handles the CTX memory structure. + * + * ILLUMOS CHANGES: the CTX memory structure must be explicitly allocated + * by the caller (either on the stack or using kmem_zalloc). Passing NULL + * isn't valid. + * + * LZ4_compress64kCtx() : + * Same as LZ4_compressCtx(), but specific to small inputs (<64KB). + * isize *Must* be <64KB, otherwise the output will be corrupted. + * + * ILLUMOS CHANGES: the CTX memory structure must be explicitly allocated + * by the caller (either on the stack or using kmem_zalloc). Passing NULL + * isn't valid. + */ + +/* + * Tuning parameters + */ + +/* + * COMPRESSIONLEVEL: Increasing this value improves compression ratio + * Lowering this value reduces memory usage. Reduced memory usage + * typically improves speed, due to cache effect (ex: L1 32KB for Intel, + * L1 64KB for AMD). Memory usage formula : N->2^(N+2) Bytes + * (examples : 12 -> 16KB ; 17 -> 512KB) + */ +#define COMPRESSIONLEVEL 12 + +/* + * NOTCOMPRESSIBLE_CONFIRMATION: Decreasing this value will make the + * algorithm skip faster data segments considered "incompressible". + * This may decrease compression ratio dramatically, but will be + * faster on incompressible data. Increasing this value will make + * the algorithm search more before declaring a segment "incompressible". + * This could improve compression a bit, but will be slower on + * incompressible data. The default value (6) is recommended. + */ +#define NOTCOMPRESSIBLE_CONFIRMATION 6 + +/* + * BIG_ENDIAN_NATIVE_BUT_INCOMPATIBLE: This will provide a boost to + * performance for big endian cpu, but the resulting compressed stream + * will be incompatible with little-endian CPU. You can set this option + * to 1 in situations where data will stay within closed environment. + * This option is useless on Little_Endian CPU (such as x86). + */ +/* #define BIG_ENDIAN_NATIVE_BUT_INCOMPATIBLE 1 */ + +/* + * CPU Feature Detection + */ + +/* 32 or 64 bits ? */ +#if (defined(__x86_64__) || defined(__x86_64) || defined(__amd64__) || \ + defined(__amd64) || defined(__ppc64__) || defined(_WIN64) || \ + defined(__LP64__) || defined(_LP64)) +#define LZ4_ARCH64 1 +/* + * Illumos: On amd64 we have 20k of stack and 24k on sun4u and sun4v, so we + * can spend 16k on the algorithm + */ +/* FreeBSD: Use heap for all platforms for now */ +#define STACKLIMIT 0 +#else +#define LZ4_ARCH64 0 +/* + * Illumos: On i386 we only have 12k of stack, so in order to maintain the + * same COMPRESSIONLEVEL we have to use heap allocation. Performance will + * suck, but alas, it's ZFS on 32-bit we're talking about, so... + */ +#define STACKLIMIT 0 +#endif + +/* + * Little Endian or Big Endian? + * Note: overwrite the below #define if you know your architecture endianess. + */ +#if BYTE_ORDER == BIG_ENDIAN +#define LZ4_BIG_ENDIAN 1 +#else +/* + * Little Endian assumed. PDP Endian and other very rare endian format + * are unsupported. + */ +#endif + +/* + * Unaligned memory access is automatically enabled for "common" CPU, + * such as x86. For others CPU, the compiler will be more cautious, and + * insert extra code to ensure aligned access is respected. If you know + * your target CPU supports unaligned memory access, you may want to + * force this option manually to improve performance + */ +#if defined(__ARM_FEATURE_UNALIGNED) +#define LZ4_FORCE_UNALIGNED_ACCESS 1 +#endif + +/* + * Compiler Options + */ +#if __STDC_VERSION__ >= 199901L /* C99 */ +/* "restrict" is a known keyword */ +#else +/* Disable restrict */ +#define restrict +#endif + +#define lz4_bswap16(x) ((unsigned short int) ((((x) >> 8) & 0xffu) | \ + (((x) & 0xffu) << 8))) + +#define expect(expr, value) (__builtin_expect((expr), (value))) + +#if defined(likely) +#undef likely +#endif +#if defined(unlikely) +#undef unlikely +#endif + +#define likely(expr) expect((expr) != 0, 1) +#define unlikely(expr) expect((expr) != 0, 0) + +/* Basic types */ +#define BYTE uint8_t +#define U16 uint16_t +#define U32 uint32_t +#define S32 int32_t +#define U64 uint64_t + +#ifndef LZ4_FORCE_UNALIGNED_ACCESS +#pragma pack(1) +#endif + +typedef struct _U16_S { + U16 v; +} U16_S; +typedef struct _U32_S { + U32 v; +} U32_S; +typedef struct _U64_S { + U64 v; +} U64_S; + +#ifndef LZ4_FORCE_UNALIGNED_ACCESS +#pragma pack() +#endif + +#define A64(x) (((U64_S *)(x))->v) +#define A32(x) (((U32_S *)(x))->v) +#define A16(x) (((U16_S *)(x))->v) + +/* + * Constants + */ +#define MINMATCH 4 + +#define HASH_LOG COMPRESSIONLEVEL +#define HASHTABLESIZE (1 << HASH_LOG) +#define HASH_MASK (HASHTABLESIZE - 1) + +#define SKIPSTRENGTH (NOTCOMPRESSIBLE_CONFIRMATION > 2 ? \ + NOTCOMPRESSIBLE_CONFIRMATION : 2) + +/* + * Defines if memory is allocated into the stack (local variable), + * or into the heap (kmem_alloc()). + */ +#define HEAPMODE (HASH_LOG > STACKLIMIT) +#define COPYLENGTH 8 +#define LASTLITERALS 5 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Sun Feb 10 01:30:14 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 3E3FA2D0; Sun, 10 Feb 2013 01:30:14 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2BD9B211; Sun, 10 Feb 2013 01:30:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1A1UEwA056805; Sun, 10 Feb 2013 01:30:14 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1A1UDFw056804; Sun, 10 Feb 2013 01:30:13 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201302100130.r1A1UDFw056804@svn.freebsd.org> From: Attilio Rao Date: Sun, 10 Feb 2013 01:30:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r246606 - user/attilio/vmc-playground/sys/vm X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Feb 2013 01:30:14 -0000 Author: attilio Date: Sun Feb 10 01:30:13 2013 New Revision: 246606 URL: http://svnweb.freebsd.org/changeset/base/246606 Log: Fix wrong object reference. Sponsored by: EMC / Isilon Storage Division Modified: user/attilio/vmc-playground/sys/vm/vm_object.c Modified: user/attilio/vmc-playground/sys/vm/vm_object.c ============================================================================== --- user/attilio/vmc-playground/sys/vm/vm_object.c Sun Feb 10 01:18:26 2013 (r246605) +++ user/attilio/vmc-playground/sys/vm/vm_object.c Sun Feb 10 01:30:13 2013 (r246606) @@ -1729,7 +1729,7 @@ vm_object_collapse(vm_object_t object) /* * Free any cached pages from backing_object. */ - if (!vm_object_cache_is_empty(object)) + if (!vm_object_cache_is_empty(backing_object)) vm_page_cache_free(backing_object, 0, 0); } /* From owner-svn-src-user@FreeBSD.ORG Sun Feb 10 16:00:14 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id AABAD54D; Sun, 10 Feb 2013 16:00:14 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9E3733F4; Sun, 10 Feb 2013 16:00:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1AG0ECD018676; Sun, 10 Feb 2013 16:00:14 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1AG0EQd018675; Sun, 10 Feb 2013 16:00:14 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201302101600.r1AG0EQd018675@svn.freebsd.org> From: Attilio Rao Date: Sun, 10 Feb 2013 16:00:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r246623 - user/attilio/vmc-playground/sys/vm X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Feb 2013 16:00:14 -0000 Author: attilio Date: Sun Feb 10 16:00:14 2013 New Revision: 246623 URL: http://svnweb.freebsd.org/changeset/base/246623 Log: Fix style. Modified: user/attilio/vmc-playground/sys/vm/vm_page.c Modified: user/attilio/vmc-playground/sys/vm/vm_page.c ============================================================================== --- user/attilio/vmc-playground/sys/vm/vm_page.c Sun Feb 10 15:56:47 2013 (r246622) +++ user/attilio/vmc-playground/sys/vm/vm_page.c Sun Feb 10 16:00:14 2013 (r246623) @@ -927,7 +927,7 @@ vm_page_find_least(vm_object_t object, v { VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); - if (object->resident_page_count) + if (object->resident_page_count != 0) return (vm_radix_lookup_ge(&object->rtree, pindex)); return (NULL); } From owner-svn-src-user@FreeBSD.ORG Sun Feb 10 21:56:12 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 193AFE6F; Sun, 10 Feb 2013 21:56:12 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id EF45366B; Sun, 10 Feb 2013 21:56:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1ALuBNO025569; Sun, 10 Feb 2013 21:56:11 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1ALu9mP025555; Sun, 10 Feb 2013 21:56:09 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201302102156.r1ALu9mP025555@svn.freebsd.org> From: Attilio Rao Date: Sun, 10 Feb 2013 21:56:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r246639 - in user/attilio/vmcontention: cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/lib/libzfs/common lib/libc/net lib/libc/sys sbin/geom/class/eli sys/boot/common sys/boo... X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Feb 2013 21:56:12 -0000 Author: attilio Date: Sun Feb 10 21:56:09 2013 New Revision: 246639 URL: http://svnweb.freebsd.org/changeset/base/246639 Log: MFC Modified: user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zfs/zfs.8 user/attilio/vmcontention/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c user/attilio/vmcontention/lib/libc/net/sctp_sys_calls.c user/attilio/vmcontention/lib/libc/sys/sigqueue.2 user/attilio/vmcontention/sbin/geom/class/eli/geom_eli.c user/attilio/vmcontention/sys/boot/common/part.c user/attilio/vmcontention/sys/boot/usb/bsd_global.h user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c user/attilio/vmcontention/sys/dev/usb/net/if_smsc.c user/attilio/vmcontention/sys/dev/usb/template/usb_template.c user/attilio/vmcontention/sys/dev/usb/usb_bus.h user/attilio/vmcontention/sys/dev/usb/usb_controller.h user/attilio/vmcontention/sys/dev/usb/usb_device.c user/attilio/vmcontention/sys/dev/usb/usb_device.h user/attilio/vmcontention/sys/dev/usb/usb_generic.c user/attilio/vmcontention/sys/dev/usb/usb_handle_request.c user/attilio/vmcontention/sys/dev/usb/usb_msctest.c user/attilio/vmcontention/sys/dev/usb/usb_transfer.c user/attilio/vmcontention/sys/dev/usb/usb_util.c user/attilio/vmcontention/sys/dev/usb/wlan/if_rum.c user/attilio/vmcontention/sys/dev/usb/wlan/if_rumvar.h user/attilio/vmcontention/sys/dev/usb/wlan/if_run.c user/attilio/vmcontention/sys/dev/usb/wlan/if_runvar.h user/attilio/vmcontention/sys/dev/usb/wlan/if_uath.c user/attilio/vmcontention/sys/dev/usb/wlan/if_upgt.c user/attilio/vmcontention/sys/dev/usb/wlan/if_upgtvar.h user/attilio/vmcontention/sys/dev/usb/wlan/if_ural.c user/attilio/vmcontention/sys/dev/usb/wlan/if_uralvar.h user/attilio/vmcontention/sys/dev/usb/wlan/if_urtw.c user/attilio/vmcontention/sys/dev/usb/wlan/if_urtwvar.h user/attilio/vmcontention/sys/dev/usb/wlan/if_zyd.c user/attilio/vmcontention/sys/dev/usb/wlan/if_zydreg.h user/attilio/vmcontention/sys/fs/ext2fs/ext2_alloc.c user/attilio/vmcontention/sys/fs/ext2fs/ext2_balloc.c user/attilio/vmcontention/sys/fs/ext2fs/ext2_bmap.c user/attilio/vmcontention/sys/fs/ext2fs/ext2_inode.c user/attilio/vmcontention/sys/fs/ext2fs/ext2_inode_cnv.c user/attilio/vmcontention/sys/fs/ext2fs/ext2_lookup.c user/attilio/vmcontention/sys/fs/ext2fs/ext2_subr.c user/attilio/vmcontention/sys/fs/ext2fs/ext2_vnops.c user/attilio/vmcontention/sys/kern/imgact_elf.c user/attilio/vmcontention/sys/netinet/sctp_pcb.c user/attilio/vmcontention/sys/sys/diskmbr.h user/attilio/vmcontention/sys/ufs/ffs/ffs_alloc.c user/attilio/vmcontention/usr.bin/find/function.c user/attilio/vmcontention/usr.bin/find/main.c user/attilio/vmcontention/usr.sbin/named/Makefile user/attilio/vmcontention/usr.sbin/pciconf/pciconf.c Directory Properties: user/attilio/vmcontention/ (props changed) user/attilio/vmcontention/cddl/contrib/opensolaris/ (props changed) user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zfs/ (props changed) user/attilio/vmcontention/cddl/contrib/opensolaris/lib/libzfs/ (props changed) user/attilio/vmcontention/lib/libc/ (props changed) user/attilio/vmcontention/sbin/ (props changed) user/attilio/vmcontention/sys/ (props changed) user/attilio/vmcontention/sys/boot/ (props changed) user/attilio/vmcontention/sys/cddl/contrib/opensolaris/ (props changed) Modified: user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Sun Feb 10 21:29:59 2013 (r246638) +++ user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Sun Feb 10 21:56:09 2013 (r246639) @@ -1,5 +1,5 @@ '\" te -.\" Copyright (c) 2012, Martin Matuska . +.\" Copyright (c) 2013, Martin Matuska . .\" All Rights Reserved. .\" .\" The contents of this file are subject to the terms of the @@ -19,16 +19,16 @@ .\" .\" Copyright (c) 2010, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2012 by Delphix. All rights reserved. -.\" Copyright (c) 2012 Nexenta Systems, Inc. All Rights Reserved. .\" Copyright (c) 2012, Joyent, Inc. All rights reserved. .\" Copyright (c) 2011, Pawel Jakub Dawidek .\" Copyright (c) 2012, Glen Barber .\" Copyright (c) 2012, Bryan Drewery .\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved. +.\" Copyright (c) 2013 Nexenta Systems, Inc. All Rights Reserved. .\" .\" $FreeBSD$ .\" -.Dd February 8, 2012 +.Dd February 10, 2012 .Dt ZFS 8 .Os .Sh NAME @@ -40,14 +40,12 @@ .Nm .Cm create .Op Fl pu -.Op Fl o Ar property Ns = Ns Ar value -.Ar ... filesystem +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... Ar filesystem .Nm .Cm create .Op Fl ps .Op Fl b Ar blocksize -.Op Fl o Ar property Ns = Ns Ar value -.Ar ... +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... .Fl V .Ar size volume .Nm @@ -60,13 +58,13 @@ .Sm off .Ar snapshot .Op % Ns Ar snapname -.Op , Ns Ar ... +.Op , Ns ... .Sm on .Nm .Cm snapshot .Op Fl r -.Op Fl o Ar property Ns = Ns Ar value -.Ar ... filesystem@snapname Ns | Ns Ar volume@snapname +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... +.Ar filesystem@snapname Ns | Ns Ar volume@snapname .Nm .Cm rollback .Op Fl rRf @@ -74,8 +72,8 @@ .Nm .Cm clone .Op Fl p -.Op Fl o Ar property Ns = Ns Ar value -.Ar ... snapshot filesystem Ns | Ns Ar volume +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... +.Ar snapshot filesystem Ns | Ns Ar volume .Nm .Cm promote .Ar clone-filesystem @@ -103,31 +101,29 @@ .Cm list .Op Fl r Ns | Ns Fl d Ar depth .Op Fl H -.Op Fl o Ar property Ns Op , Ns Ar ... -.Op Fl t Ar type Ns Op , Ns Ar ... -.Op Fl s Ar property -.Ar ... -.Op Fl S Ar property -.Ar ... +.Op Fl o Ar property Ns Oo , Ns property Ns Oc Ns ... +.Op Fl t Ar type Ns Oo , Ns type Ns Oc Ns ... +.Oo Fl s Ar property Oc Ns ... +.Oo Fl S Ar property Oc Ns ... .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot .Nm .Cm set .Ar property Ns = Ns Ar value -.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot +.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... .Nm .Cm get .Op Fl r Ns | Ns Fl d Ar depth .Op Fl Hp -.Op Fl o Ar all | field Ns Op , Ns Ar ... -.Op Fl t Ar type Ns Op , Ns Ar ... -.Op Fl s Ar source Ns Op , Ns Ar ... -.Ar all | property Ns Op , Ns Ar ... -.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot +.Op Fl o Ar all | field Ns Oo , Ns Ar field Oc Ns ... +.Op Fl t Ar type Ns Oo Ns , Ar type Oc Ns ... +.Op Fl s Ar source Ns Oo Ns , Ns Ar source Oc Ns ... +.Ar all | property Ns Oo Ns , Ns Ar property Oc Ns ... +.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... .Nm .Cm inherit .Op Fl rS .Ar property -.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot +.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... .Nm .Cm upgrade .Op Fl v @@ -139,29 +135,25 @@ .Nm .Cm userspace .Op Fl Hinp -.Op Fl o Ar field Ns Op , Ns Ar ... -.Op Fl s Ar field -.Ar ... -.Op Fl S Ar field -.Ar ... -.Op Fl t Ar type Ns Op , Ns Ar ... +.Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... +.Oo Fl s Ar field Oc Ns ... +.Oo Fl S Ar field Oc Ns ... +.Op Fl t Ar type Ns Oo Ns , Ns Ar type Oc Ns ... .Ar filesystem Ns | Ns Ar snapshot .Nm .Cm groupspace .Op Fl Hinp -.Op Fl o Ar field Ns Op , Ns Ar ... -.Op Fl s Ar field -.Ar ... -.Op Fl S Ar field -.Ar ... -.Op Fl t Ar type Ns Op , Ns Ar ... +.Op Fl o Ar field Ns Oo , Ns field Oc Ns ... +.Oo Fl s Ar field Oc Ns ... +.Oo Fl S Ar field Oc Ns ... +.Op Fl t Ar type Ns Oo Ns , Ns Ar type Oc Ns ... .Ar filesystem Ns | Ns Ar snapshot .Nm .Cm mount .Nm .Cm mount .Op Fl vO -.Op Fl o Ar property Ns Op , Ns Ar ... +.Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... .Fl a | Ar filesystem .Nm .Cm unmount @@ -193,63 +185,71 @@ .Nm .Cm allow .Op Fl ldug -.Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ... -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ... +.Ar perm Ns | Ns Ar @setname Ns +.Oo Ns , Ns Ar perm Ns | Ns Ar @setname Oc Ns ... .Ar filesystem Ns | Ns Ar volume .Nm .Cm allow .Op Fl ld -.Fl e -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Fl e Ns | Ns Cm everyone +.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... .Ar filesystem Ns | Ns Ar volume .Nm .Cm allow .Fl c -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... .Ar filesystem Ns | Ns Ar volume .Nm .Cm allow .Fl s .Ar @setname -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... .Ar filesystem Ns | Ns Ar volume .Nm .Cm unallow .Op Fl rldug -.Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ... -.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ... +.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... Oc .Ar filesystem Ns | Ns Ar volume .Nm .Cm unallow .Op Fl rld -.Fl e -.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Fl e Ns | Ns Cm everyone +.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... Oc .Ar filesystem Ns | Ns Ar volume .Nm .Cm unallow .Op Fl r .Fl c -.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... Oc .Ar filesystem Ns | Ns Ar volume .Nm .Cm unallow .Op Fl r .Fl s .Ar @setname -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... Oc .Ar filesystem Ns | Ns Ar volume .Nm .Cm hold .Op Fl r -.Ar tag snapshot ... +.Ar tag snapshot Ns ... .Nm .Cm holds .Op Fl r -.Ar snapshot ... +.Ar snapshot Ns ... .Nm .Cm release .Op Fl r -.Ar tag snapshot ... +.Ar tag snapshot Ns ... .Nm .Cm diff .Op Fl FHt @@ -1165,7 +1165,7 @@ When the .Sy sharenfs property is changed for a dataset, the .Xr mountd 8 -dameon is reloaded. +daemon is reloaded. .It Sy logbias Ns = Ns Cm latency | throughput Provide a hint to .Tn ZFS @@ -1411,8 +1411,8 @@ Displays a help message. .Nm .Cm create .Op Fl pu -.Op Fl o Ar property Ns = Ns Ar value -.Ar ... filesystem +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... +.Ar filesystem .Xc .Pp Creates a new @@ -1449,8 +1449,7 @@ options. .Cm create .Op Fl ps .Op Fl b Ar blocksize -.Op Fl o Ar property Ns = Ns Ar value -.Ar ... +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... .Fl V .Ar size volume .Xc @@ -1550,7 +1549,7 @@ behavior for mounted file systems in use .Sm off .Ar snapshot .Op % Ns Ar snapname -.Op , Ns Ar ... +.Op , Ns ... .Sm on .Xc .Pp @@ -1611,8 +1610,7 @@ behavior for mounted file systems in use .Nm .Cm snapshot .Op Fl r -.Op Fl o Ar property Ns = Ns Ar value -.Ar ... +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... .Ar filesystem@snapname Ns | Ns volume@snapname .Xc .Pp @@ -1659,8 +1657,8 @@ option to force an unmount of any clone .Nm .Cm clone .Op Fl p -.Op Fl o Ar property Ns = Ns Ar value -.Ar ... snapshot filesystem Ns | Ns Ar volume +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... +.Ar snapshot filesystem Ns | Ns Ar volume .Xc .Pp Creates a clone of the given snapshot. See the @@ -1763,13 +1761,11 @@ only dataset that can be renamed recursi .Cm list .Op Fl r Ns | Ns Fl d Ar depth .Op Fl H -.Op Fl o Ar property Ns Op , Ns Ar ... -.Op Fl t Ar type Ns Op , Ns Ar ... -.Op Fl s Ar property -.Ar ... -.Op Fl S Ar property -.Ar ... -.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot +.Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... +.Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... +.Oo Fl s Ar property Oc Ns ... +.Oo Fl S Ar property Oc Ns ... +.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... .Xc .Pp Lists the property information for the given datasets in tabular form. If @@ -1795,7 +1791,7 @@ will display only the dataset and its di .It Fl H Used for scripting mode. Do not print headers and separate fields by a single tab instead of arbitrary white space. -.It Fl o Ar property Ns Op , Ns Ar ... +.It Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... A comma-separated list of properties to display. The property must be: .Bl -bullet -offset 2n .It @@ -1819,7 +1815,7 @@ shortcut for specifying .Sy filesystem,volume syntax. .El -.It Fl t Ar type Ns Op , Ns Ar ... +.It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... A comma-separated list of types to display, where .Ar type is one of @@ -1882,11 +1878,11 @@ section. .Cm get .Op Fl r Ns | Ns Fl d Ar depth .Op Fl Hp -.Op Fl o Ar all | field Ns Op , Ns Ar ... -.Op Fl t Ar type Ns Op , Ns Ar ... -.Op Fl s Ar source Ns Op , Ns Ar ... -.Ar all | property Ns Op , Ns Ar ... -.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot +.Op Fl o Ar all | field Ns Oo , Ns Ar field Oc Ns ... +.Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... +.Op Fl s Ar source Ns Oo , Ns Ar source Oc Ns ... +.Ar all | property Ns Oo , Ns Ar property Oc Ns ... +.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... .Xc .Pp Displays properties for the given datasets. If no datasets are specified, then @@ -1936,7 +1932,7 @@ omitted, and fields are explicitly separ arbitrary amount of space. .It Fl p Display numbers in parseable (exact) values. -.It Fl o Cm all | Ar field Ns Op , Ns Ar ... +.It Fl o Cm all | Ar field Ns Oo , Ns Ar field Oc Ns ... A comma-separated list of columns to display. Supported values are .Sy name,property,value,received,source . Default values are @@ -1944,7 +1940,7 @@ Default values are The keyword .Cm all specifies all columns. -.It Fl t Ar type Ns Op , Ns Ar ... +.It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... A comma-separated list of types to display, where .Ar type is one of @@ -1952,7 +1948,7 @@ is one of For example, specifying .Fl t Cm snapshot displays only snapshots. -.It Fl s Ar source Ns Op , Ns Ar ... +.It Fl s Ar source Ns Oo , Ns Ar source Oc Ns ... A comma-separated list of sources to display. Those properties coming from a source other than those in this list are ignored. Each source must be one of the following: @@ -1964,7 +1960,7 @@ The default value is all sources. .Cm inherit .Op Fl rS .Ar property -.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot +.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... .Xc .Pp Clears the specified property, causing it to be inherited from an ancestor. If @@ -2039,12 +2035,10 @@ Upgrade the specified file system. .Nm .Cm userspace .Op Fl Hinp -.Op Fl o Ar field Ns Op , Ns Ar ... -.Op Fl s Ar field -.Ar ... -.Op Fl S Ar field -.Ar ... -.Op Fl t Ar type Ns Op , Ns Ar ... +.Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... +.Oo Fl s Ar field Oc Ns ... +.Oo Fl S Ar field Oc Ns ... +.Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... .Ar filesystem Ns | Ns Ar snapshot .Xc .Pp @@ -2061,7 +2055,7 @@ Print numeric ID instead of user/group n Do not print headers, use tab-delimited output. .It Fl p Use exact (parsable) numeric output. -.It Fl o Ar field Ns Op , Ns Ar ... +.It Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Display only the specified fields from the following set: .Sy type,name,used,quota . The default is to display all fields. @@ -2076,7 +2070,7 @@ another. The default is .It Fl S Ar field Sort by this field in reverse order. See .Fl s . -.It Fl t Ar type Ns Op , Ns Ar ... +.It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Print only the specified types from the following set: .Sy all,posixuser,smbuser,posixgroup,smbgroup . .Pp @@ -2092,12 +2086,10 @@ Translate SID to POSIX ID. This flag cur .Nm .Cm groupspace .Op Fl Hinp -.Op Fl o Ar field Ns Op , Ns Ar ... -.Op Fl s Ar field -.Ar ... -.Op Fl S Ar field -.Ar ... -.Op Fl t Ar type Ns Op , Ns Ar ... +.Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... +.Oo Fl s Ar field Oc Ns ... +.Oo Fl S Ar field Oc Ns ... +.Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... .Ar filesystem Ns | Ns Ar snapshot .Xc .Pp @@ -2121,7 +2113,7 @@ file systems currently mounted. .Nm .Cm mount .Op Fl vO -.Op Fl o Ar property Ns Op , Ns Ar ... +.Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... .Fl a | Ar filesystem .Xc .Pp @@ -2134,7 +2126,7 @@ Report mount progress. .It Fl O Perform an overlay mount. Overlay mounts are not supported on .Fx . -.It Fl o Ar property Ns Op , Ns Ar ... +.It Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... An optional, comma-separated list of mount options to use temporarily for the duration of the mount. See the .Qq Sx Temporary Mount Point Properties @@ -2453,16 +2445,18 @@ for more information. .Nm .Cm allow .Op Fl ldug -.Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ... -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ... +.Ar perm Ns | Ns Ar @setname Ns +.Oo Ns , Ns Ar perm Ns | Ns Ar @setname Oc Ns ... .Ar filesystem Ns | Ns Ar volume .Xc .It Xo .Nm .Cm allow .Op Fl ld -.Fl e -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Fl e Ns | Ns Cm everyone +.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... .Ar filesystem Ns | Ns Ar volume .Xc .Pp @@ -2472,26 +2466,31 @@ administration permission for the file s .Bl -tag -width indent .It Xo .Op Fl ug -.Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ... +.Ar user Ns | Ns Ar group Ns Oo , Ar user Ns | Ns Ar group Oc Ns ... .Xc Specifies to whom the permissions are delegated. Multiple entities can be specified as a comma-separated list. If neither of the .Fl ug options are specified, then the argument is interpreted preferentially as the -keyword "everyone", then as a user name, and lastly as a group name. To specify -a user or group named "everyone", use the +keyword +.Cm everyone , +then as a user name, and lastly as a group name. To specify +a user or group named +.Qq everyone , +use the .Fl u or .Fl g options. To specify a group with the same name as a user, use the .Fl g option. +.It Op Fl e Ns | Ns Cm everyone +Specifies that the permissions be delegated to +.Qq everyone . .It Xo -.Op Fl e -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar perm Ns | Ns Ar @setname Ns Oo , Ns Ar perm Ns | Ns Ar @setname Oc Ns ... .Xc -Specifies that the permissions be delegated to "everyone". -Multiple permissions +The permissions to delegate. Multiple permissions may be specified as a comma-separated list. Permission names are the same as .Tn ZFS subcommand and property names. See the property list below. Property set names, @@ -2598,7 +2597,8 @@ protocol .Nm .Cm allow .Fl c -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... .Ar filesystem Ns | Ns Ar volume .Xc .Pp @@ -2609,7 +2609,8 @@ creator of any newly-created descendent .Cm allow .Fl s .Ar @setname -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... .Ar filesystem Ns | Ns Ar volume .Xc .Pp @@ -2625,16 +2626,18 @@ and can be no more than 64 characters lo .Nm .Cm unallow .Op Fl rldug -.Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ... -.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ... +.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... Oc .Ar filesystem Ns | Ns Ar volume .Xc .It Xo .Nm .Cm unallow .Op Fl rld -.Fl e -.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Fl e Ns | Ns Cm everyone +.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... Oc .Ar filesystem Ns | Ns Ar volume .Xc .It Xo @@ -2642,7 +2645,8 @@ and can be no more than 64 characters lo .Cm unallow .Op Fl r .Fl c -.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... Oc .Ar filesystem Ns | Ns Ar volume .Xc .Pp @@ -2651,10 +2655,12 @@ Removes permissions that were granted wi command. No permissions are explicitly denied, so other permissions granted are still in effect. For example, if the permission is granted by an ancestor. If no permissions are specified, then all permissions for the specified -.Ar user , group , No or Ar everyone -are removed. Specifying "everyone" (or using the -.Fl e -option) only removes the permissions that were granted to "everyone", +.Ar user , group , No or everyone +are removed. Specifying +.Cm everyone +.Po or using the Fl e +option +.Pc only removes the permissions that were granted to everyone , not all permissions for every user and group. See the .Qq Nm Cm allow command for a description of the @@ -2670,7 +2676,8 @@ Recursively remove the permissions from .Op Fl r .Fl s .Ar @setname -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... Oc .Ar filesystem Ns | Ns Ar volume .Xc .Pp @@ -2680,7 +2687,7 @@ then all permissions are removed, thus r .Nm .Cm hold .Op Fl r -.Ar tag snapshot ... +.Ar tag snapshot Ns ... .Xc .Pp Adds a single reference, named with the @@ -2701,7 +2708,7 @@ snapshots of all descendent file systems .Nm .Cm holds .Op Fl r -.Ar snapshot ... +.Ar snapshot Ns ... .Xc .Pp Lists all existing user references for the given snapshot or snapshots. @@ -2714,7 +2721,7 @@ listing the holds on the named snapshot. .Nm .Cm release .Op Fl r -.Ar tag snapshot ... +.Ar tag snapshot Ns ... .Xc .Pp Removes a single reference, named with the Modified: user/attilio/vmcontention/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c ============================================================================== --- user/attilio/vmcontention/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Sun Feb 10 21:29:59 2013 (r246638) +++ user/attilio/vmcontention/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Sun Feb 10 21:56:09 2013 (r246639) @@ -526,13 +526,12 @@ get_configs(libzfs_handle_t *hdl, pool_l * version * pool guid * name - * pool txg (if available) * comment (if available) * pool state * hostid (if available) * hostname (if available) */ - uint64_t state, version, pool_txg; + uint64_t state, version; char *comment = NULL; version = fnvlist_lookup_uint64(tmp, @@ -548,11 +547,6 @@ get_configs(libzfs_handle_t *hdl, pool_l fnvlist_add_string(config, ZPOOL_CONFIG_POOL_NAME, name); - if (nvlist_lookup_uint64(tmp, - ZPOOL_CONFIG_POOL_TXG, &pool_txg) == 0) - fnvlist_add_uint64(config, - ZPOOL_CONFIG_POOL_TXG, pool_txg); - if (nvlist_lookup_string(tmp, ZPOOL_CONFIG_COMMENT, &comment) == 0) fnvlist_add_string(config, Modified: user/attilio/vmcontention/lib/libc/net/sctp_sys_calls.c ============================================================================== --- user/attilio/vmcontention/lib/libc/net/sctp_sys_calls.c Sun Feb 10 21:29:59 2013 (r246638) +++ user/attilio/vmcontention/lib/libc/net/sctp_sys_calls.c Sun Feb 10 21:56:09 2013 (r246639) @@ -583,36 +583,36 @@ sctp_sendmsg(int s, if ((tolen > 0) && ((to == NULL) || (tolen < sizeof(struct sockaddr)))) { errno = EINVAL; - return -1; + return (-1); } if (to && (tolen > 0)) { if (to->sa_family == AF_INET) { if (tolen != sizeof(struct sockaddr_in)) { errno = EINVAL; - return -1; + return (-1); } if ((to->sa_len > 0) && (to->sa_len != sizeof(struct sockaddr_in))) { errno = EINVAL; - return -1; + return (-1); } memcpy(&addr, to, sizeof(struct sockaddr_in)); addr.in.sin_len = sizeof(struct sockaddr_in); } else if (to->sa_family == AF_INET6) { if (tolen != sizeof(struct sockaddr_in6)) { errno = EINVAL; - return -1; + return (-1); } if ((to->sa_len > 0) && (to->sa_len != sizeof(struct sockaddr_in6))) { errno = EINVAL; - return -1; + return (-1); } memcpy(&addr, to, sizeof(struct sockaddr_in6)); addr.in6.sin6_len = sizeof(struct sockaddr_in6); } else { errno = EAFNOSUPPORT; - return -1; + return (-1); } who = (struct sockaddr *)&addr; } @@ -836,7 +836,7 @@ sctp_sendmsgx(int sd, sinfo.sinfo_ssn = stream_no; sinfo.sinfo_timetolive = timetolive; sinfo.sinfo_context = context; - return sctp_sendx(sd, msg, len, addrs, addrcnt, &sinfo, 0); + return (sctp_sendx(sd, msg, len, addrs, addrcnt, &sinfo, 0)); } ssize_t Modified: user/attilio/vmcontention/lib/libc/sys/sigqueue.2 ============================================================================== --- user/attilio/vmcontention/lib/libc/sys/sigqueue.2 Sun Feb 10 21:29:59 2013 (r246638) +++ user/attilio/vmcontention/lib/libc/sys/sigqueue.2 Sun Feb 10 21:56:09 2013 (r246639) @@ -117,7 +117,7 @@ or a system-wide resource limit has been The value of the .Fa signo argument is an invalid or unsupported signal number. -.It Bq Er EEPERM +.It Bq Er EPERM The process does not have the appropriate privilege to send the signal to the receiving process. .It Bq Er ESRCH Modified: user/attilio/vmcontention/sbin/geom/class/eli/geom_eli.c ============================================================================== --- user/attilio/vmcontention/sbin/geom/class/eli/geom_eli.c Sun Feb 10 21:29:59 2013 (r246638) +++ user/attilio/vmcontention/sbin/geom/class/eli/geom_eli.c Sun Feb 10 21:56:09 2013 (r246639) @@ -326,22 +326,6 @@ eli_main(struct gctl_req *req, unsigned gctl_error(req, "Unknown command: %s.", name); } -static void -arc4rand(unsigned char *buf, size_t size) -{ - uint32_t *buf4; - size_t size4; - unsigned int i; - - buf4 = (uint32_t *)buf; - size4 = size / 4; - - for (i = 0; i < size4; i++) - buf4[i] = arc4random(); - for (i *= 4; i < size; i++) - buf[i] = arc4random() % 0xff; -} - static bool eli_is_attached(const char *prov) { @@ -396,6 +380,8 @@ eli_genkey_files(struct gctl_req *req, b while ((done = read(fd, buf, sizeof(buf))) > 0) g_eli_crypto_hmac_update(ctxp, buf, done); } else /* if (strcmp(type, "passfile") == 0) */ { + assert(strcmp(type, "passfile") == 0); + while ((done = read(fd, buf, sizeof(buf) - 1)) > 0) { buf[done] = '\0'; p = strchr(buf, '\n'); @@ -813,8 +799,8 @@ eli_init(struct gctl_req *req) } md.md_keys = 0x01; - arc4rand(md.md_salt, sizeof(md.md_salt)); - arc4rand(md.md_mkeys, sizeof(md.md_mkeys)); + arc4random_buf(md.md_salt, sizeof(md.md_salt)); + arc4random_buf(md.md_mkeys, sizeof(md.md_mkeys)); /* Generate user key. */ if (eli_genkey(req, &md, key, true) == NULL) { @@ -1146,7 +1132,7 @@ eli_delkey_detached(struct gctl_req *req all = gctl_get_int(req, "all"); if (all) - arc4rand(md.md_mkeys, sizeof(md.md_mkeys)); + arc4random_buf(md.md_mkeys, sizeof(md.md_mkeys)); else { force = gctl_get_int(req, "force"); val = gctl_get_intmax(req, "keyno"); @@ -1170,7 +1156,7 @@ eli_delkey_detached(struct gctl_req *req return; } mkeydst = md.md_mkeys + nkey * G_ELI_MKEYLEN; - arc4rand(mkeydst, G_ELI_MKEYLEN); + arc4random_buf(mkeydst, G_ELI_MKEYLEN); } eli_metadata_store(req, prov, &md); @@ -1262,13 +1248,14 @@ eli_trash_metadata(struct gctl_req *req, error = 0; do { - arc4rand(sector, size); + arc4random_buf(sector, size); if (pwrite(fd, sector, size, offset) != size) { if (error == 0) error = errno; } (void)g_flush(fd); } while (--overwrites > 0); + free(sector); if (error != 0) { gctl_error(req, "Cannot trash metadata on provider %s: %s.", prov, strerror(error)); Modified: user/attilio/vmcontention/sys/boot/common/part.c ============================================================================== --- user/attilio/vmcontention/sys/boot/common/part.c Sun Feb 10 21:29:59 2013 (r246638) +++ user/attilio/vmcontention/sys/boot/common/part.c Sun Feb 10 21:56:09 2013 (r246639) @@ -645,9 +645,13 @@ ptable_open(void *dev, off_t sectors, ui /* Do we have some invalid values? */ if (i != NDOSPART || (table->type == PTABLE_GPT && count > 1)) { - table->type = PTABLE_NONE; - DEBUG("invalid values detected, ignore partition table"); - goto out; + if (dp[1].dp_typ != DOSPTYP_HFS) { + table->type = PTABLE_NONE; + DEBUG("invalid values detected, ignore " + "partition table"); + goto out; + } + DEBUG("Bootcamp detected"); } #ifdef LOADER_GPT_SUPPORT if (table->type == PTABLE_GPT) { Modified: user/attilio/vmcontention/sys/boot/usb/bsd_global.h ============================================================================== --- user/attilio/vmcontention/sys/boot/usb/bsd_global.h Sun Feb 10 21:29:59 2013 (r246638) +++ user/attilio/vmcontention/sys/boot/usb/bsd_global.h Sun Feb 10 21:56:09 2013 (r246639) @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -52,7 +53,6 @@ #include #include #include -#include #include #include #include Modified: user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c ============================================================================== --- user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Sun Feb 10 21:29:59 2013 (r246638) +++ user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Sun Feb 10 21:56:09 2013 (r246639) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. */ #include @@ -284,6 +284,7 @@ dmu_tx_count_write(dmu_tx_hold_t *txh, u delta = P2NPHASE(off, dn->dn_datablksz); } + min_ibs = max_ibs = dn->dn_indblkshift; if (dn->dn_maxblkid > 0) { /* * The blocksize can't change, @@ -291,13 +292,6 @@ dmu_tx_count_write(dmu_tx_hold_t *txh, u */ ASSERT(dn->dn_datablkshift != 0); min_bs = max_bs = dn->dn_datablkshift; - min_ibs = max_ibs = dn->dn_indblkshift; - } else if (dn->dn_indblkshift > max_ibs) { - /* - * This ensures that if we reduce DN_MAX_INDBLKSHIFT, - * the code will still work correctly on older pools. - */ - min_ibs = max_ibs = dn->dn_indblkshift; } /* Modified: user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c ============================================================================== --- user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Sun Feb 10 21:29:59 2013 (r246638) +++ user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Sun Feb 10 21:56:09 2013 (r246639) @@ -1334,7 +1334,8 @@ vdev_validate(vdev_t *vd, boolean_t stri if (vd->vdev_ops->vdev_op_leaf && vdev_readable(vd)) { uint64_t aux_guid = 0; nvlist_t *nvl; - uint64_t txg = strict ? spa->spa_config_txg : -1ULL; + uint64_t txg = spa_last_synced_txg(spa) != 0 ? + spa_last_synced_txg(spa) : -1ULL; if ((label = vdev_label_read_config(vd, txg)) == NULL) { vdev_set_state(vd, B_TRUE, VDEV_STATE_CANT_OPEN, @@ -1521,7 +1522,7 @@ vdev_reopen(vdev_t *vd) !l2arc_vdev_present(vd)) l2arc_add_vdev(spa, vd); } else { - (void) vdev_validate(vd, spa_last_synced_txg(spa)); + (void) vdev_validate(vd, B_TRUE); } /* Modified: user/attilio/vmcontention/sys/dev/usb/net/if_smsc.c ============================================================================== --- user/attilio/vmcontention/sys/dev/usb/net/if_smsc.c Sun Feb 10 21:29:59 2013 (r246638) +++ user/attilio/vmcontention/sys/dev/usb/net/if_smsc.c Sun Feb 10 21:56:09 2013 (r246639) @@ -99,9 +99,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include -#include "if_smscreg.h" + +#include #ifdef USB_DEBUG static int smsc_debug = 0; Modified: user/attilio/vmcontention/sys/dev/usb/template/usb_template.c ============================================================================== --- user/attilio/vmcontention/sys/dev/usb/template/usb_template.c Sun Feb 10 21:29:59 2013 (r246638) +++ user/attilio/vmcontention/sys/dev/usb/template/usb_template.c Sun Feb 10 21:56:09 2013 (r246639) @@ -849,20 +849,20 @@ usb_hw_ep_resolve(struct usb_device *ude struct usb_device_descriptor *dd; uint16_t mps; - if (desc == NULL) { + if (desc == NULL) return (USB_ERR_INVAL); - } + /* get bus methods */ methods = udev->bus->methods; - if (methods->get_hw_ep_profile == NULL) { + if (methods->get_hw_ep_profile == NULL) return (USB_ERR_INVAL); - } + if (desc->bDescriptorType == UDESC_DEVICE) { - if (desc->bLength < sizeof(*dd)) { + if (desc->bLength < sizeof(*dd)) return (USB_ERR_INVAL); - } + dd = (void *)desc; /* get HW control endpoint 0 profile */ @@ -909,13 +909,12 @@ usb_hw_ep_resolve(struct usb_device *ude } return (0); /* success */ } - if (desc->bDescriptorType != UDESC_CONFIG) { + if (desc->bDescriptorType != UDESC_CONFIG) return (USB_ERR_INVAL); - } - if (desc->bLength < sizeof(*(ues->cd))) { + if (desc->bLength < sizeof(*(ues->cd))) return (USB_ERR_INVAL); - } - ues = udev->bus->scratch[0].hw_ep_scratch; + + ues = udev->scratch.hw_ep_scratch; memset(ues, 0, sizeof(*ues)); @@ -1236,13 +1235,18 @@ usb_temp_setup(struct usb_device *udev, { struct usb_temp_setup *uts; void *buf; + usb_error_t error; uint8_t n; + uint8_t do_unlock; - if (tdd == NULL) { - /* be NULL safe */ + /* be NULL safe */ + if (tdd == NULL) return (0); - } - uts = udev->bus->scratch[0].temp_setup; + + /* Protect scratch area */ + do_unlock = usbd_enum_lock(udev); + + uts = udev->scratch.temp_setup; memset(uts, 0, sizeof(*uts)); @@ -1255,17 +1259,24 @@ usb_temp_setup(struct usb_device *udev, if (uts->err) { /* some error happened */ - return (uts->err); + goto done; } /* sanity check */ if (uts->size == 0) { - return (USB_ERR_INVAL); + uts->err = USB_ERR_INVAL; + goto done; } /* allocate zeroed memory */ uts->buf = malloc(uts->size, M_USB, M_WAITOK | M_ZERO); + /* + * Allow malloc() to return NULL regardless of M_WAITOK flag. + * This helps when porting the software to non-FreeBSD + * systems. + */ if (uts->buf == NULL) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Sun Feb 10 22:06:08 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D9E23FC0; Sun, 10 Feb 2013 22:06:08 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id AA0866B8; Sun, 10 Feb 2013 22:06:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1AM68ju028799; Sun, 10 Feb 2013 22:06:08 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1AM66Fs028784; Sun, 10 Feb 2013 22:06:06 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201302102206.r1AM66Fs028784@svn.freebsd.org> From: Attilio Rao Date: Sun, 10 Feb 2013 22:06:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r246640 - in user/attilio/vmc-playground: cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/lib/libzfs/common lib/libc/net lib/libc/sys sbin/geom/class/eli sys/boot/common sys/b... X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Feb 2013 22:06:08 -0000 Author: attilio Date: Sun Feb 10 22:06:06 2013 New Revision: 246640 URL: http://svnweb.freebsd.org/changeset/base/246640 Log: merge from vmcontention Modified: user/attilio/vmc-playground/cddl/contrib/opensolaris/cmd/zfs/zfs.8 user/attilio/vmc-playground/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c user/attilio/vmc-playground/lib/libc/net/sctp_sys_calls.c user/attilio/vmc-playground/lib/libc/sys/sigqueue.2 user/attilio/vmc-playground/sbin/geom/class/eli/geom_eli.c user/attilio/vmc-playground/sys/boot/common/part.c user/attilio/vmc-playground/sys/boot/usb/bsd_global.h user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c user/attilio/vmc-playground/sys/dev/usb/net/if_smsc.c user/attilio/vmc-playground/sys/dev/usb/template/usb_template.c user/attilio/vmc-playground/sys/dev/usb/usb_bus.h user/attilio/vmc-playground/sys/dev/usb/usb_controller.h user/attilio/vmc-playground/sys/dev/usb/usb_device.c user/attilio/vmc-playground/sys/dev/usb/usb_device.h user/attilio/vmc-playground/sys/dev/usb/usb_generic.c user/attilio/vmc-playground/sys/dev/usb/usb_handle_request.c user/attilio/vmc-playground/sys/dev/usb/usb_msctest.c user/attilio/vmc-playground/sys/dev/usb/usb_transfer.c user/attilio/vmc-playground/sys/dev/usb/usb_util.c user/attilio/vmc-playground/sys/dev/usb/wlan/if_rum.c user/attilio/vmc-playground/sys/dev/usb/wlan/if_rumvar.h user/attilio/vmc-playground/sys/dev/usb/wlan/if_run.c user/attilio/vmc-playground/sys/dev/usb/wlan/if_runvar.h user/attilio/vmc-playground/sys/dev/usb/wlan/if_uath.c user/attilio/vmc-playground/sys/dev/usb/wlan/if_upgt.c user/attilio/vmc-playground/sys/dev/usb/wlan/if_upgtvar.h user/attilio/vmc-playground/sys/dev/usb/wlan/if_ural.c user/attilio/vmc-playground/sys/dev/usb/wlan/if_uralvar.h user/attilio/vmc-playground/sys/dev/usb/wlan/if_urtw.c user/attilio/vmc-playground/sys/dev/usb/wlan/if_urtwvar.h user/attilio/vmc-playground/sys/dev/usb/wlan/if_zyd.c user/attilio/vmc-playground/sys/dev/usb/wlan/if_zydreg.h user/attilio/vmc-playground/sys/fs/ext2fs/ext2_alloc.c user/attilio/vmc-playground/sys/fs/ext2fs/ext2_balloc.c user/attilio/vmc-playground/sys/fs/ext2fs/ext2_bmap.c user/attilio/vmc-playground/sys/fs/ext2fs/ext2_inode.c user/attilio/vmc-playground/sys/fs/ext2fs/ext2_inode_cnv.c user/attilio/vmc-playground/sys/fs/ext2fs/ext2_lookup.c user/attilio/vmc-playground/sys/fs/ext2fs/ext2_subr.c user/attilio/vmc-playground/sys/fs/ext2fs/ext2_vnops.c user/attilio/vmc-playground/sys/kern/imgact_elf.c user/attilio/vmc-playground/sys/netinet/sctp_pcb.c user/attilio/vmc-playground/sys/sys/diskmbr.h user/attilio/vmc-playground/sys/ufs/ffs/ffs_alloc.c user/attilio/vmc-playground/usr.bin/find/function.c user/attilio/vmc-playground/usr.bin/find/main.c user/attilio/vmc-playground/usr.sbin/named/Makefile user/attilio/vmc-playground/usr.sbin/pciconf/pciconf.c Directory Properties: user/attilio/vmc-playground/ (props changed) user/attilio/vmc-playground/cddl/contrib/opensolaris/ (props changed) user/attilio/vmc-playground/cddl/contrib/opensolaris/cmd/zfs/ (props changed) user/attilio/vmc-playground/cddl/contrib/opensolaris/lib/libzfs/ (props changed) user/attilio/vmc-playground/lib/libc/ (props changed) user/attilio/vmc-playground/sbin/ (props changed) user/attilio/vmc-playground/sys/ (props changed) user/attilio/vmc-playground/sys/boot/ (props changed) user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/ (props changed) Modified: user/attilio/vmc-playground/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- user/attilio/vmc-playground/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Sun Feb 10 21:56:09 2013 (r246639) +++ user/attilio/vmc-playground/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Sun Feb 10 22:06:06 2013 (r246640) @@ -1,5 +1,5 @@ '\" te -.\" Copyright (c) 2012, Martin Matuska . +.\" Copyright (c) 2013, Martin Matuska . .\" All Rights Reserved. .\" .\" The contents of this file are subject to the terms of the @@ -19,16 +19,16 @@ .\" .\" Copyright (c) 2010, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2012 by Delphix. All rights reserved. -.\" Copyright (c) 2012 Nexenta Systems, Inc. All Rights Reserved. .\" Copyright (c) 2012, Joyent, Inc. All rights reserved. .\" Copyright (c) 2011, Pawel Jakub Dawidek .\" Copyright (c) 2012, Glen Barber .\" Copyright (c) 2012, Bryan Drewery .\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved. +.\" Copyright (c) 2013 Nexenta Systems, Inc. All Rights Reserved. .\" .\" $FreeBSD$ .\" -.Dd February 8, 2012 +.Dd February 10, 2012 .Dt ZFS 8 .Os .Sh NAME @@ -40,14 +40,12 @@ .Nm .Cm create .Op Fl pu -.Op Fl o Ar property Ns = Ns Ar value -.Ar ... filesystem +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... Ar filesystem .Nm .Cm create .Op Fl ps .Op Fl b Ar blocksize -.Op Fl o Ar property Ns = Ns Ar value -.Ar ... +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... .Fl V .Ar size volume .Nm @@ -60,13 +58,13 @@ .Sm off .Ar snapshot .Op % Ns Ar snapname -.Op , Ns Ar ... +.Op , Ns ... .Sm on .Nm .Cm snapshot .Op Fl r -.Op Fl o Ar property Ns = Ns Ar value -.Ar ... filesystem@snapname Ns | Ns Ar volume@snapname +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... +.Ar filesystem@snapname Ns | Ns Ar volume@snapname .Nm .Cm rollback .Op Fl rRf @@ -74,8 +72,8 @@ .Nm .Cm clone .Op Fl p -.Op Fl o Ar property Ns = Ns Ar value -.Ar ... snapshot filesystem Ns | Ns Ar volume +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... +.Ar snapshot filesystem Ns | Ns Ar volume .Nm .Cm promote .Ar clone-filesystem @@ -103,31 +101,29 @@ .Cm list .Op Fl r Ns | Ns Fl d Ar depth .Op Fl H -.Op Fl o Ar property Ns Op , Ns Ar ... -.Op Fl t Ar type Ns Op , Ns Ar ... -.Op Fl s Ar property -.Ar ... -.Op Fl S Ar property -.Ar ... +.Op Fl o Ar property Ns Oo , Ns property Ns Oc Ns ... +.Op Fl t Ar type Ns Oo , Ns type Ns Oc Ns ... +.Oo Fl s Ar property Oc Ns ... +.Oo Fl S Ar property Oc Ns ... .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot .Nm .Cm set .Ar property Ns = Ns Ar value -.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot +.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... .Nm .Cm get .Op Fl r Ns | Ns Fl d Ar depth .Op Fl Hp -.Op Fl o Ar all | field Ns Op , Ns Ar ... -.Op Fl t Ar type Ns Op , Ns Ar ... -.Op Fl s Ar source Ns Op , Ns Ar ... -.Ar all | property Ns Op , Ns Ar ... -.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot +.Op Fl o Ar all | field Ns Oo , Ns Ar field Oc Ns ... +.Op Fl t Ar type Ns Oo Ns , Ar type Oc Ns ... +.Op Fl s Ar source Ns Oo Ns , Ns Ar source Oc Ns ... +.Ar all | property Ns Oo Ns , Ns Ar property Oc Ns ... +.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... .Nm .Cm inherit .Op Fl rS .Ar property -.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot +.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... .Nm .Cm upgrade .Op Fl v @@ -139,29 +135,25 @@ .Nm .Cm userspace .Op Fl Hinp -.Op Fl o Ar field Ns Op , Ns Ar ... -.Op Fl s Ar field -.Ar ... -.Op Fl S Ar field -.Ar ... -.Op Fl t Ar type Ns Op , Ns Ar ... +.Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... +.Oo Fl s Ar field Oc Ns ... +.Oo Fl S Ar field Oc Ns ... +.Op Fl t Ar type Ns Oo Ns , Ns Ar type Oc Ns ... .Ar filesystem Ns | Ns Ar snapshot .Nm .Cm groupspace .Op Fl Hinp -.Op Fl o Ar field Ns Op , Ns Ar ... -.Op Fl s Ar field -.Ar ... -.Op Fl S Ar field -.Ar ... -.Op Fl t Ar type Ns Op , Ns Ar ... +.Op Fl o Ar field Ns Oo , Ns field Oc Ns ... +.Oo Fl s Ar field Oc Ns ... +.Oo Fl S Ar field Oc Ns ... +.Op Fl t Ar type Ns Oo Ns , Ns Ar type Oc Ns ... .Ar filesystem Ns | Ns Ar snapshot .Nm .Cm mount .Nm .Cm mount .Op Fl vO -.Op Fl o Ar property Ns Op , Ns Ar ... +.Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... .Fl a | Ar filesystem .Nm .Cm unmount @@ -193,63 +185,71 @@ .Nm .Cm allow .Op Fl ldug -.Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ... -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ... +.Ar perm Ns | Ns Ar @setname Ns +.Oo Ns , Ns Ar perm Ns | Ns Ar @setname Oc Ns ... .Ar filesystem Ns | Ns Ar volume .Nm .Cm allow .Op Fl ld -.Fl e -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Fl e Ns | Ns Cm everyone +.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... .Ar filesystem Ns | Ns Ar volume .Nm .Cm allow .Fl c -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... .Ar filesystem Ns | Ns Ar volume .Nm .Cm allow .Fl s .Ar @setname -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... .Ar filesystem Ns | Ns Ar volume .Nm .Cm unallow .Op Fl rldug -.Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ... -.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ... +.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... Oc .Ar filesystem Ns | Ns Ar volume .Nm .Cm unallow .Op Fl rld -.Fl e -.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Fl e Ns | Ns Cm everyone +.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... Oc .Ar filesystem Ns | Ns Ar volume .Nm .Cm unallow .Op Fl r .Fl c -.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... Oc .Ar filesystem Ns | Ns Ar volume .Nm .Cm unallow .Op Fl r .Fl s .Ar @setname -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... Oc .Ar filesystem Ns | Ns Ar volume .Nm .Cm hold .Op Fl r -.Ar tag snapshot ... +.Ar tag snapshot Ns ... .Nm .Cm holds .Op Fl r -.Ar snapshot ... +.Ar snapshot Ns ... .Nm .Cm release .Op Fl r -.Ar tag snapshot ... +.Ar tag snapshot Ns ... .Nm .Cm diff .Op Fl FHt @@ -1165,7 +1165,7 @@ When the .Sy sharenfs property is changed for a dataset, the .Xr mountd 8 -dameon is reloaded. +daemon is reloaded. .It Sy logbias Ns = Ns Cm latency | throughput Provide a hint to .Tn ZFS @@ -1411,8 +1411,8 @@ Displays a help message. .Nm .Cm create .Op Fl pu -.Op Fl o Ar property Ns = Ns Ar value -.Ar ... filesystem +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... +.Ar filesystem .Xc .Pp Creates a new @@ -1449,8 +1449,7 @@ options. .Cm create .Op Fl ps .Op Fl b Ar blocksize -.Op Fl o Ar property Ns = Ns Ar value -.Ar ... +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... .Fl V .Ar size volume .Xc @@ -1550,7 +1549,7 @@ behavior for mounted file systems in use .Sm off .Ar snapshot .Op % Ns Ar snapname -.Op , Ns Ar ... +.Op , Ns ... .Sm on .Xc .Pp @@ -1611,8 +1610,7 @@ behavior for mounted file systems in use .Nm .Cm snapshot .Op Fl r -.Op Fl o Ar property Ns = Ns Ar value -.Ar ... +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... .Ar filesystem@snapname Ns | Ns volume@snapname .Xc .Pp @@ -1659,8 +1657,8 @@ option to force an unmount of any clone .Nm .Cm clone .Op Fl p -.Op Fl o Ar property Ns = Ns Ar value -.Ar ... snapshot filesystem Ns | Ns Ar volume +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... +.Ar snapshot filesystem Ns | Ns Ar volume .Xc .Pp Creates a clone of the given snapshot. See the @@ -1763,13 +1761,11 @@ only dataset that can be renamed recursi .Cm list .Op Fl r Ns | Ns Fl d Ar depth .Op Fl H -.Op Fl o Ar property Ns Op , Ns Ar ... -.Op Fl t Ar type Ns Op , Ns Ar ... -.Op Fl s Ar property -.Ar ... -.Op Fl S Ar property -.Ar ... -.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot +.Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... +.Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... +.Oo Fl s Ar property Oc Ns ... +.Oo Fl S Ar property Oc Ns ... +.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... .Xc .Pp Lists the property information for the given datasets in tabular form. If @@ -1795,7 +1791,7 @@ will display only the dataset and its di .It Fl H Used for scripting mode. Do not print headers and separate fields by a single tab instead of arbitrary white space. -.It Fl o Ar property Ns Op , Ns Ar ... +.It Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... A comma-separated list of properties to display. The property must be: .Bl -bullet -offset 2n .It @@ -1819,7 +1815,7 @@ shortcut for specifying .Sy filesystem,volume syntax. .El -.It Fl t Ar type Ns Op , Ns Ar ... +.It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... A comma-separated list of types to display, where .Ar type is one of @@ -1882,11 +1878,11 @@ section. .Cm get .Op Fl r Ns | Ns Fl d Ar depth .Op Fl Hp -.Op Fl o Ar all | field Ns Op , Ns Ar ... -.Op Fl t Ar type Ns Op , Ns Ar ... -.Op Fl s Ar source Ns Op , Ns Ar ... -.Ar all | property Ns Op , Ns Ar ... -.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot +.Op Fl o Ar all | field Ns Oo , Ns Ar field Oc Ns ... +.Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... +.Op Fl s Ar source Ns Oo , Ns Ar source Oc Ns ... +.Ar all | property Ns Oo , Ns Ar property Oc Ns ... +.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... .Xc .Pp Displays properties for the given datasets. If no datasets are specified, then @@ -1936,7 +1932,7 @@ omitted, and fields are explicitly separ arbitrary amount of space. .It Fl p Display numbers in parseable (exact) values. -.It Fl o Cm all | Ar field Ns Op , Ns Ar ... +.It Fl o Cm all | Ar field Ns Oo , Ns Ar field Oc Ns ... A comma-separated list of columns to display. Supported values are .Sy name,property,value,received,source . Default values are @@ -1944,7 +1940,7 @@ Default values are The keyword .Cm all specifies all columns. -.It Fl t Ar type Ns Op , Ns Ar ... +.It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... A comma-separated list of types to display, where .Ar type is one of @@ -1952,7 +1948,7 @@ is one of For example, specifying .Fl t Cm snapshot displays only snapshots. -.It Fl s Ar source Ns Op , Ns Ar ... +.It Fl s Ar source Ns Oo , Ns Ar source Oc Ns ... A comma-separated list of sources to display. Those properties coming from a source other than those in this list are ignored. Each source must be one of the following: @@ -1964,7 +1960,7 @@ The default value is all sources. .Cm inherit .Op Fl rS .Ar property -.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot +.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... .Xc .Pp Clears the specified property, causing it to be inherited from an ancestor. If @@ -2039,12 +2035,10 @@ Upgrade the specified file system. .Nm .Cm userspace .Op Fl Hinp -.Op Fl o Ar field Ns Op , Ns Ar ... -.Op Fl s Ar field -.Ar ... -.Op Fl S Ar field -.Ar ... -.Op Fl t Ar type Ns Op , Ns Ar ... +.Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... +.Oo Fl s Ar field Oc Ns ... +.Oo Fl S Ar field Oc Ns ... +.Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... .Ar filesystem Ns | Ns Ar snapshot .Xc .Pp @@ -2061,7 +2055,7 @@ Print numeric ID instead of user/group n Do not print headers, use tab-delimited output. .It Fl p Use exact (parsable) numeric output. -.It Fl o Ar field Ns Op , Ns Ar ... +.It Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Display only the specified fields from the following set: .Sy type,name,used,quota . The default is to display all fields. @@ -2076,7 +2070,7 @@ another. The default is .It Fl S Ar field Sort by this field in reverse order. See .Fl s . -.It Fl t Ar type Ns Op , Ns Ar ... +.It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Print only the specified types from the following set: .Sy all,posixuser,smbuser,posixgroup,smbgroup . .Pp @@ -2092,12 +2086,10 @@ Translate SID to POSIX ID. This flag cur .Nm .Cm groupspace .Op Fl Hinp -.Op Fl o Ar field Ns Op , Ns Ar ... -.Op Fl s Ar field -.Ar ... -.Op Fl S Ar field -.Ar ... -.Op Fl t Ar type Ns Op , Ns Ar ... +.Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... +.Oo Fl s Ar field Oc Ns ... +.Oo Fl S Ar field Oc Ns ... +.Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... .Ar filesystem Ns | Ns Ar snapshot .Xc .Pp @@ -2121,7 +2113,7 @@ file systems currently mounted. .Nm .Cm mount .Op Fl vO -.Op Fl o Ar property Ns Op , Ns Ar ... +.Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... .Fl a | Ar filesystem .Xc .Pp @@ -2134,7 +2126,7 @@ Report mount progress. .It Fl O Perform an overlay mount. Overlay mounts are not supported on .Fx . -.It Fl o Ar property Ns Op , Ns Ar ... +.It Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... An optional, comma-separated list of mount options to use temporarily for the duration of the mount. See the .Qq Sx Temporary Mount Point Properties @@ -2453,16 +2445,18 @@ for more information. .Nm .Cm allow .Op Fl ldug -.Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ... -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ... +.Ar perm Ns | Ns Ar @setname Ns +.Oo Ns , Ns Ar perm Ns | Ns Ar @setname Oc Ns ... .Ar filesystem Ns | Ns Ar volume .Xc .It Xo .Nm .Cm allow .Op Fl ld -.Fl e -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Fl e Ns | Ns Cm everyone +.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... .Ar filesystem Ns | Ns Ar volume .Xc .Pp @@ -2472,26 +2466,31 @@ administration permission for the file s .Bl -tag -width indent .It Xo .Op Fl ug -.Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ... +.Ar user Ns | Ns Ar group Ns Oo , Ar user Ns | Ns Ar group Oc Ns ... .Xc Specifies to whom the permissions are delegated. Multiple entities can be specified as a comma-separated list. If neither of the .Fl ug options are specified, then the argument is interpreted preferentially as the -keyword "everyone", then as a user name, and lastly as a group name. To specify -a user or group named "everyone", use the +keyword +.Cm everyone , +then as a user name, and lastly as a group name. To specify +a user or group named +.Qq everyone , +use the .Fl u or .Fl g options. To specify a group with the same name as a user, use the .Fl g option. +.It Op Fl e Ns | Ns Cm everyone +Specifies that the permissions be delegated to +.Qq everyone . .It Xo -.Op Fl e -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar perm Ns | Ns Ar @setname Ns Oo , Ns Ar perm Ns | Ns Ar @setname Oc Ns ... .Xc -Specifies that the permissions be delegated to "everyone". -Multiple permissions +The permissions to delegate. Multiple permissions may be specified as a comma-separated list. Permission names are the same as .Tn ZFS subcommand and property names. See the property list below. Property set names, @@ -2598,7 +2597,8 @@ protocol .Nm .Cm allow .Fl c -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... .Ar filesystem Ns | Ns Ar volume .Xc .Pp @@ -2609,7 +2609,8 @@ creator of any newly-created descendent .Cm allow .Fl s .Ar @setname -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... .Ar filesystem Ns | Ns Ar volume .Xc .Pp @@ -2625,16 +2626,18 @@ and can be no more than 64 characters lo .Nm .Cm unallow .Op Fl rldug -.Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ... -.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ... +.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... Oc .Ar filesystem Ns | Ns Ar volume .Xc .It Xo .Nm .Cm unallow .Op Fl rld -.Fl e -.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Fl e Ns | Ns Cm everyone +.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... Oc .Ar filesystem Ns | Ns Ar volume .Xc .It Xo @@ -2642,7 +2645,8 @@ and can be no more than 64 characters lo .Cm unallow .Op Fl r .Fl c -.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... Oc .Ar filesystem Ns | Ns Ar volume .Xc .Pp @@ -2651,10 +2655,12 @@ Removes permissions that were granted wi command. No permissions are explicitly denied, so other permissions granted are still in effect. For example, if the permission is granted by an ancestor. If no permissions are specified, then all permissions for the specified -.Ar user , group , No or Ar everyone -are removed. Specifying "everyone" (or using the -.Fl e -option) only removes the permissions that were granted to "everyone", +.Ar user , group , No or everyone +are removed. Specifying +.Cm everyone +.Po or using the Fl e +option +.Pc only removes the permissions that were granted to everyone , not all permissions for every user and group. See the .Qq Nm Cm allow command for a description of the @@ -2670,7 +2676,8 @@ Recursively remove the permissions from .Op Fl r .Fl s .Ar @setname -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... Oc .Ar filesystem Ns | Ns Ar volume .Xc .Pp @@ -2680,7 +2687,7 @@ then all permissions are removed, thus r .Nm .Cm hold .Op Fl r -.Ar tag snapshot ... +.Ar tag snapshot Ns ... .Xc .Pp Adds a single reference, named with the @@ -2701,7 +2708,7 @@ snapshots of all descendent file systems .Nm .Cm holds .Op Fl r -.Ar snapshot ... +.Ar snapshot Ns ... .Xc .Pp Lists all existing user references for the given snapshot or snapshots. @@ -2714,7 +2721,7 @@ listing the holds on the named snapshot. .Nm .Cm release .Op Fl r -.Ar tag snapshot ... +.Ar tag snapshot Ns ... .Xc .Pp Removes a single reference, named with the Modified: user/attilio/vmc-playground/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c ============================================================================== --- user/attilio/vmc-playground/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Sun Feb 10 21:56:09 2013 (r246639) +++ user/attilio/vmc-playground/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Sun Feb 10 22:06:06 2013 (r246640) @@ -526,13 +526,12 @@ get_configs(libzfs_handle_t *hdl, pool_l * version * pool guid * name - * pool txg (if available) * comment (if available) * pool state * hostid (if available) * hostname (if available) */ - uint64_t state, version, pool_txg; + uint64_t state, version; char *comment = NULL; version = fnvlist_lookup_uint64(tmp, @@ -548,11 +547,6 @@ get_configs(libzfs_handle_t *hdl, pool_l fnvlist_add_string(config, ZPOOL_CONFIG_POOL_NAME, name); - if (nvlist_lookup_uint64(tmp, - ZPOOL_CONFIG_POOL_TXG, &pool_txg) == 0) - fnvlist_add_uint64(config, - ZPOOL_CONFIG_POOL_TXG, pool_txg); - if (nvlist_lookup_string(tmp, ZPOOL_CONFIG_COMMENT, &comment) == 0) fnvlist_add_string(config, Modified: user/attilio/vmc-playground/lib/libc/net/sctp_sys_calls.c ============================================================================== --- user/attilio/vmc-playground/lib/libc/net/sctp_sys_calls.c Sun Feb 10 21:56:09 2013 (r246639) +++ user/attilio/vmc-playground/lib/libc/net/sctp_sys_calls.c Sun Feb 10 22:06:06 2013 (r246640) @@ -583,36 +583,36 @@ sctp_sendmsg(int s, if ((tolen > 0) && ((to == NULL) || (tolen < sizeof(struct sockaddr)))) { errno = EINVAL; - return -1; + return (-1); } if (to && (tolen > 0)) { if (to->sa_family == AF_INET) { if (tolen != sizeof(struct sockaddr_in)) { errno = EINVAL; - return -1; + return (-1); } if ((to->sa_len > 0) && (to->sa_len != sizeof(struct sockaddr_in))) { errno = EINVAL; - return -1; + return (-1); } memcpy(&addr, to, sizeof(struct sockaddr_in)); addr.in.sin_len = sizeof(struct sockaddr_in); } else if (to->sa_family == AF_INET6) { if (tolen != sizeof(struct sockaddr_in6)) { errno = EINVAL; - return -1; + return (-1); } if ((to->sa_len > 0) && (to->sa_len != sizeof(struct sockaddr_in6))) { errno = EINVAL; - return -1; + return (-1); } memcpy(&addr, to, sizeof(struct sockaddr_in6)); addr.in6.sin6_len = sizeof(struct sockaddr_in6); } else { errno = EAFNOSUPPORT; - return -1; + return (-1); } who = (struct sockaddr *)&addr; } @@ -836,7 +836,7 @@ sctp_sendmsgx(int sd, sinfo.sinfo_ssn = stream_no; sinfo.sinfo_timetolive = timetolive; sinfo.sinfo_context = context; - return sctp_sendx(sd, msg, len, addrs, addrcnt, &sinfo, 0); + return (sctp_sendx(sd, msg, len, addrs, addrcnt, &sinfo, 0)); } ssize_t Modified: user/attilio/vmc-playground/lib/libc/sys/sigqueue.2 ============================================================================== --- user/attilio/vmc-playground/lib/libc/sys/sigqueue.2 Sun Feb 10 21:56:09 2013 (r246639) +++ user/attilio/vmc-playground/lib/libc/sys/sigqueue.2 Sun Feb 10 22:06:06 2013 (r246640) @@ -117,7 +117,7 @@ or a system-wide resource limit has been The value of the .Fa signo argument is an invalid or unsupported signal number. -.It Bq Er EEPERM +.It Bq Er EPERM The process does not have the appropriate privilege to send the signal to the receiving process. .It Bq Er ESRCH Modified: user/attilio/vmc-playground/sbin/geom/class/eli/geom_eli.c ============================================================================== --- user/attilio/vmc-playground/sbin/geom/class/eli/geom_eli.c Sun Feb 10 21:56:09 2013 (r246639) +++ user/attilio/vmc-playground/sbin/geom/class/eli/geom_eli.c Sun Feb 10 22:06:06 2013 (r246640) @@ -326,22 +326,6 @@ eli_main(struct gctl_req *req, unsigned gctl_error(req, "Unknown command: %s.", name); } -static void -arc4rand(unsigned char *buf, size_t size) -{ - uint32_t *buf4; - size_t size4; - unsigned int i; - - buf4 = (uint32_t *)buf; - size4 = size / 4; - - for (i = 0; i < size4; i++) - buf4[i] = arc4random(); - for (i *= 4; i < size; i++) - buf[i] = arc4random() % 0xff; -} - static bool eli_is_attached(const char *prov) { @@ -396,6 +380,8 @@ eli_genkey_files(struct gctl_req *req, b while ((done = read(fd, buf, sizeof(buf))) > 0) g_eli_crypto_hmac_update(ctxp, buf, done); } else /* if (strcmp(type, "passfile") == 0) */ { + assert(strcmp(type, "passfile") == 0); + while ((done = read(fd, buf, sizeof(buf) - 1)) > 0) { buf[done] = '\0'; p = strchr(buf, '\n'); @@ -813,8 +799,8 @@ eli_init(struct gctl_req *req) } md.md_keys = 0x01; - arc4rand(md.md_salt, sizeof(md.md_salt)); - arc4rand(md.md_mkeys, sizeof(md.md_mkeys)); + arc4random_buf(md.md_salt, sizeof(md.md_salt)); + arc4random_buf(md.md_mkeys, sizeof(md.md_mkeys)); /* Generate user key. */ if (eli_genkey(req, &md, key, true) == NULL) { @@ -1146,7 +1132,7 @@ eli_delkey_detached(struct gctl_req *req all = gctl_get_int(req, "all"); if (all) - arc4rand(md.md_mkeys, sizeof(md.md_mkeys)); + arc4random_buf(md.md_mkeys, sizeof(md.md_mkeys)); else { force = gctl_get_int(req, "force"); val = gctl_get_intmax(req, "keyno"); @@ -1170,7 +1156,7 @@ eli_delkey_detached(struct gctl_req *req return; } mkeydst = md.md_mkeys + nkey * G_ELI_MKEYLEN; - arc4rand(mkeydst, G_ELI_MKEYLEN); + arc4random_buf(mkeydst, G_ELI_MKEYLEN); } eli_metadata_store(req, prov, &md); @@ -1262,13 +1248,14 @@ eli_trash_metadata(struct gctl_req *req, error = 0; do { - arc4rand(sector, size); + arc4random_buf(sector, size); if (pwrite(fd, sector, size, offset) != size) { if (error == 0) error = errno; } (void)g_flush(fd); } while (--overwrites > 0); + free(sector); if (error != 0) { gctl_error(req, "Cannot trash metadata on provider %s: %s.", prov, strerror(error)); Modified: user/attilio/vmc-playground/sys/boot/common/part.c ============================================================================== --- user/attilio/vmc-playground/sys/boot/common/part.c Sun Feb 10 21:56:09 2013 (r246639) +++ user/attilio/vmc-playground/sys/boot/common/part.c Sun Feb 10 22:06:06 2013 (r246640) @@ -645,9 +645,13 @@ ptable_open(void *dev, off_t sectors, ui /* Do we have some invalid values? */ if (i != NDOSPART || (table->type == PTABLE_GPT && count > 1)) { - table->type = PTABLE_NONE; - DEBUG("invalid values detected, ignore partition table"); - goto out; + if (dp[1].dp_typ != DOSPTYP_HFS) { + table->type = PTABLE_NONE; + DEBUG("invalid values detected, ignore " + "partition table"); + goto out; + } + DEBUG("Bootcamp detected"); } #ifdef LOADER_GPT_SUPPORT if (table->type == PTABLE_GPT) { Modified: user/attilio/vmc-playground/sys/boot/usb/bsd_global.h ============================================================================== --- user/attilio/vmc-playground/sys/boot/usb/bsd_global.h Sun Feb 10 21:56:09 2013 (r246639) +++ user/attilio/vmc-playground/sys/boot/usb/bsd_global.h Sun Feb 10 22:06:06 2013 (r246640) @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -52,7 +53,6 @@ #include #include #include -#include #include #include #include Modified: user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c ============================================================================== --- user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Sun Feb 10 21:56:09 2013 (r246639) +++ user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Sun Feb 10 22:06:06 2013 (r246640) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. */ #include @@ -284,6 +284,7 @@ dmu_tx_count_write(dmu_tx_hold_t *txh, u delta = P2NPHASE(off, dn->dn_datablksz); } + min_ibs = max_ibs = dn->dn_indblkshift; if (dn->dn_maxblkid > 0) { /* * The blocksize can't change, @@ -291,13 +292,6 @@ dmu_tx_count_write(dmu_tx_hold_t *txh, u */ ASSERT(dn->dn_datablkshift != 0); min_bs = max_bs = dn->dn_datablkshift; - min_ibs = max_ibs = dn->dn_indblkshift; - } else if (dn->dn_indblkshift > max_ibs) { - /* - * This ensures that if we reduce DN_MAX_INDBLKSHIFT, - * the code will still work correctly on older pools. - */ - min_ibs = max_ibs = dn->dn_indblkshift; } /* Modified: user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c ============================================================================== --- user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Sun Feb 10 21:56:09 2013 (r246639) +++ user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Sun Feb 10 22:06:06 2013 (r246640) @@ -1334,7 +1334,8 @@ vdev_validate(vdev_t *vd, boolean_t stri if (vd->vdev_ops->vdev_op_leaf && vdev_readable(vd)) { uint64_t aux_guid = 0; nvlist_t *nvl; - uint64_t txg = strict ? spa->spa_config_txg : -1ULL; + uint64_t txg = spa_last_synced_txg(spa) != 0 ? + spa_last_synced_txg(spa) : -1ULL; if ((label = vdev_label_read_config(vd, txg)) == NULL) { vdev_set_state(vd, B_TRUE, VDEV_STATE_CANT_OPEN, @@ -1521,7 +1522,7 @@ vdev_reopen(vdev_t *vd) !l2arc_vdev_present(vd)) l2arc_add_vdev(spa, vd); } else { - (void) vdev_validate(vd, spa_last_synced_txg(spa)); + (void) vdev_validate(vd, B_TRUE); } /* Modified: user/attilio/vmc-playground/sys/dev/usb/net/if_smsc.c ============================================================================== --- user/attilio/vmc-playground/sys/dev/usb/net/if_smsc.c Sun Feb 10 21:56:09 2013 (r246639) +++ user/attilio/vmc-playground/sys/dev/usb/net/if_smsc.c Sun Feb 10 22:06:06 2013 (r246640) @@ -99,9 +99,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include -#include "if_smscreg.h" + +#include #ifdef USB_DEBUG static int smsc_debug = 0; Modified: user/attilio/vmc-playground/sys/dev/usb/template/usb_template.c ============================================================================== --- user/attilio/vmc-playground/sys/dev/usb/template/usb_template.c Sun Feb 10 21:56:09 2013 (r246639) +++ user/attilio/vmc-playground/sys/dev/usb/template/usb_template.c Sun Feb 10 22:06:06 2013 (r246640) @@ -849,20 +849,20 @@ usb_hw_ep_resolve(struct usb_device *ude struct usb_device_descriptor *dd; uint16_t mps; - if (desc == NULL) { + if (desc == NULL) return (USB_ERR_INVAL); - } + /* get bus methods */ methods = udev->bus->methods; - if (methods->get_hw_ep_profile == NULL) { + if (methods->get_hw_ep_profile == NULL) return (USB_ERR_INVAL); - } + if (desc->bDescriptorType == UDESC_DEVICE) { - if (desc->bLength < sizeof(*dd)) { + if (desc->bLength < sizeof(*dd)) return (USB_ERR_INVAL); - } + dd = (void *)desc; /* get HW control endpoint 0 profile */ @@ -909,13 +909,12 @@ usb_hw_ep_resolve(struct usb_device *ude } return (0); /* success */ } - if (desc->bDescriptorType != UDESC_CONFIG) { + if (desc->bDescriptorType != UDESC_CONFIG) return (USB_ERR_INVAL); - } - if (desc->bLength < sizeof(*(ues->cd))) { + if (desc->bLength < sizeof(*(ues->cd))) return (USB_ERR_INVAL); - } - ues = udev->bus->scratch[0].hw_ep_scratch; + + ues = udev->scratch.hw_ep_scratch; memset(ues, 0, sizeof(*ues)); @@ -1236,13 +1235,18 @@ usb_temp_setup(struct usb_device *udev, { struct usb_temp_setup *uts; void *buf; + usb_error_t error; uint8_t n; + uint8_t do_unlock; - if (tdd == NULL) { - /* be NULL safe */ + /* be NULL safe */ + if (tdd == NULL) return (0); - } - uts = udev->bus->scratch[0].temp_setup; + + /* Protect scratch area */ + do_unlock = usbd_enum_lock(udev); + + uts = udev->scratch.temp_setup; memset(uts, 0, sizeof(*uts)); @@ -1255,17 +1259,24 @@ usb_temp_setup(struct usb_device *udev, if (uts->err) { /* some error happened */ - return (uts->err); + goto done; } /* sanity check */ if (uts->size == 0) { - return (USB_ERR_INVAL); + uts->err = USB_ERR_INVAL; + goto done; } /* allocate zeroed memory */ uts->buf = malloc(uts->size, M_USB, M_WAITOK | M_ZERO); + /* + * Allow malloc() to return NULL regardless of M_WAITOK flag. + * This helps when porting the software to non-FreeBSD + * systems. + */ if (uts->buf == NULL) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Tue Feb 12 01:37:34 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B6925B31; Tue, 12 Feb 2013 01:37:34 +0000 (UTC) (envelope-from alfred@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9A0D6B3A; Tue, 12 Feb 2013 01:37:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1C1bYiF027636; Tue, 12 Feb 2013 01:37:34 GMT (envelope-from alfred@svn.freebsd.org) Received: (from alfred@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1C1bYbC027634; Tue, 12 Feb 2013 01:37:34 GMT (envelope-from alfred@svn.freebsd.org) Message-Id: <201302120137.r1C1bYbC027634@svn.freebsd.org> From: Alfred Perlstein Date: Tue, 12 Feb 2013 01:37:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r246701 - in user/alfred/ewatchdog/sys: dev/watchdog sys X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Feb 2013 01:37:34 -0000 Author: alfred Date: Tue Feb 12 01:37:33 2013 New Revision: 246701 URL: http://svnweb.freebsd.org/changeset/base/246701 Log: Support for software pre-watchdog timeout. This allows a software setting for the kernel to panic, enter debugger or log some time before the watchdog fires. Modified: user/alfred/ewatchdog/sys/dev/watchdog/watchdog.c user/alfred/ewatchdog/sys/sys/watchdog.h Modified: user/alfred/ewatchdog/sys/dev/watchdog/watchdog.c ============================================================================== --- user/alfred/ewatchdog/sys/dev/watchdog/watchdog.c Mon Feb 11 23:33:50 2013 (r246700) +++ user/alfred/ewatchdog/sys/dev/watchdog/watchdog.c Tue Feb 12 01:37:33 2013 (r246701) @@ -1,5 +1,8 @@ /*- * Copyright (c) 2004 Poul-Henning Kamp + * Copyright (c) 2013 iXsystems.com, + * author: Alfred Perlstein + * * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,18 +32,26 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include #include #include #include +#include #include #include #include #include /* kern_clock_gettime() */ +static int wd_set_pretimeout(int newtimeout, int disableiftoolong); + +static struct callout wd_pretimeo_handle; +static int wd_pretimeout; +static int wd_pretimeout_act; + static struct cdev *wd_dev; static volatile u_int wd_last_u; /* last timeout value set by kern_do_pat */ @@ -80,6 +91,7 @@ kern_do_pat(u_int utim) error = EOPNOTSUPP; } EVENTHANDLER_INVOKE(watchdog_list, utim, &error); + wd_set_pretimeout(wd_pretimeout, true); /* * If we were able to arm/strobe the watchdog, then * update the last time it was strobed for WDIOC_GETTIMELEFT @@ -132,6 +144,67 @@ wd_get_time_left(struct thread *td, time return (0); } +static void +wd_pretimeout_cb(void *arg __unused) +{ + + switch (wd_pretimeout_act) { + case WD_PRE_PANIC: + panic("watchdog pre-timeout, WD_PRE_PANIC set"); + break; +#ifdef DDB + case WD_PRE_DDB: + debugger(); + break; +#endif + case WD_PRE_LOG: + log(LOG_EMERG, "watchdog pre-timeout, WD_PRE_LOG"); + break; + default: + panic("watchdog: unexpected wd_pretimeout_act %d", + wd_pretimeout_act); + } +} + +/* + * Called to manage timeouts. + * newtimeout needs to be in the range of 0 to actual watchdog timeout. + * if 0, we disable the pre-timeout. + * otherwise we set the pre-timeout provided it's not greater than the + * current actual watchdog timeout. + */ +static int +wd_set_pretimeout(int newtimeout, int disableiftoolong) +{ + u_int utime; + + utime = wdog_kern_last_timeout(); + /* do not permit a pre-timeout >= than the timeout. */ + if (newtimeout >= utime) { + /* + * If 'disableiftoolong' then just fall through + * so as to disable the pre-watchdog + */ + if (disableiftoolong) + newtimeout = 0; + else + return EINVAL; + } + + /* disable the pre-timeout */ + if (newtimeout == 0) { + wd_pretimeout = 0; + callout_stop(&wd_pretimeo_handle); + return 0; + } + + /* We determined the value is sane, so reset the callout */ + (void) callout_reset(&wd_pretimeo_handle, hz*(utime - newtimeout), + wd_pretimeout_cb, NULL); + wd_pretimeout = newtimeout; + return 0; +} + static int wd_ioctl(struct cdev *dev __unused, u_long cmd, caddr_t data, int flags __unused, struct thread *td) @@ -143,6 +216,27 @@ wd_ioctl(struct cdev *dev __unused, u_lo error = 0; switch (cmd) { + case WDIOC_SETPRETIMEOUTACT: + u = *(int *)data; + switch (u) { + case WD_PRE_PANIC: +#ifdef DDB + case WD_PRE_DDB: +#endif + case WD_PRE_LOG: + wd_pretimeout_act = u; + break; + default: + error = EINVAL; + break; + } + break; + case WDIOC_GETPRETIMEOUT: + *(int *)data = (int)wd_pretimeout; + break; + case WDIOC_SETPRETIMEOUT: + error = wd_set_pretimeout(*(int *)data, false); + break; case WDIOC_GETTIMELEFT: error = wd_get_time_left(td, &timeleft); if (error) @@ -166,7 +260,6 @@ wd_ioctl(struct cdev *dev __unused, u_lo } return (error); } - u_int wdog_kern_last_timeout(void) @@ -196,10 +289,12 @@ watchdog_modevent(module_t mod __unused, { switch(type) { case MOD_LOAD: + callout_init(&wd_pretimeo_handle, true); wd_dev = make_dev(&wd_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, _PATH_WATCHDOG); return 0; case MOD_UNLOAD: + callout_drain(&wd_pretimeo_handle); destroy_dev(wd_dev); return 0; case MOD_SHUTDOWN: Modified: user/alfred/ewatchdog/sys/sys/watchdog.h ============================================================================== --- user/alfred/ewatchdog/sys/sys/watchdog.h Mon Feb 11 23:33:50 2013 (r246700) +++ user/alfred/ewatchdog/sys/sys/watchdog.h Tue Feb 12 01:37:33 2013 (r246701) @@ -36,6 +36,9 @@ #define WDIOC_SETTIMEOUT _IOW('W', 43, int) #define WDIOC_GETTIMEOUT _IOR('W', 44, int) #define WDIOC_GETTIMELEFT _IOR('W', 45, int) +#define WDIOC_GETPRETIMEOUT _IOR('W', 46, int) +#define WDIOC_SETPRETIMEOUT _IOW('W', 47, int) +#define WDIOC_SETPRETIMEOUTACT _IOW('W', 48, int) #define WD_ACTIVE 0x8000000 /* @@ -80,6 +83,11 @@ #define WD_TO_16SEC 34 #define WD_TO_32SEC 35 +/* action on pre-timeout trigger */ +#define WD_PRE_PANIC 1 /* panic */ +#define WD_PRE_DDB 2 /* enter debugger */ +#define WD_PRE_LOG 3 /* log(9) */ + #ifdef _KERNEL #include From owner-svn-src-user@FreeBSD.ORG Tue Feb 12 04:22:01 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A9C0B254; Tue, 12 Feb 2013 04:22:01 +0000 (UTC) (envelope-from alfred@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9C45B197; Tue, 12 Feb 2013 04:22:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1C4M1qu078783; Tue, 12 Feb 2013 04:22:01 GMT (envelope-from alfred@svn.freebsd.org) Received: (from alfred@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1C4M1Ok078780; Tue, 12 Feb 2013 04:22:01 GMT (envelope-from alfred@svn.freebsd.org) Message-Id: <201302120422.r1C4M1Ok078780@svn.freebsd.org> From: Alfred Perlstein Date: Tue, 12 Feb 2013 04:22:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r246704 - in user/alfred/ewatchdog/sys: dev/watchdog sys X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Feb 2013 04:22:01 -0000 Author: alfred Date: Tue Feb 12 04:22:00 2013 New Revision: 246704 URL: http://svnweb.freebsd.org/changeset/base/246704 Log: Add a new software watchdog that has a configurable action. While here refactor the "action" code. Modified: user/alfred/ewatchdog/sys/dev/watchdog/watchdog.c user/alfred/ewatchdog/sys/sys/watchdog.h Modified: user/alfred/ewatchdog/sys/dev/watchdog/watchdog.c ============================================================================== --- user/alfred/ewatchdog/sys/dev/watchdog/watchdog.c Tue Feb 12 03:19:39 2013 (r246703) +++ user/alfred/ewatchdog/sys/dev/watchdog/watchdog.c Tue Feb 12 04:22:00 2013 (r246704) @@ -47,11 +47,17 @@ __FBSDID("$FreeBSD$"); #include /* kern_clock_gettime() */ static int wd_set_pretimeout(int newtimeout, int disableiftoolong); +static void wd_timeout_cb(void *arg); static struct callout wd_pretimeo_handle; static int wd_pretimeout; static int wd_pretimeout_act; +static struct callout wd_softtimeo_handle; +static int wd_softtimer; /* true = use softtimer instead of hardware + watchdog */ +static int wd_softtimeout_act; /* action for the software timeout */ + static struct cdev *wd_dev; static volatile u_int wd_last_u; /* last timeout value set by kern_do_pat */ @@ -90,7 +96,16 @@ kern_do_pat(u_int utim) /* Assume no watchdog available; watchdog flags success */ error = EOPNOTSUPP; } - EVENTHANDLER_INVOKE(watchdog_list, utim, &error); + if (wd_softtimer) { + if (utim == 0) { + callout_stop(&wd_softtimeo_handle); + } else { + (void) callout_reset(&wd_softtimeo_handle, + hz*utim, wd_timeout_cb, "soft"); + } + } else { + EVENTHANDLER_INVOKE(watchdog_list, utim, &error); + } wd_set_pretimeout(wd_pretimeout, true); /* * If we were able to arm/strobe the watchdog, then @@ -110,6 +125,21 @@ kern_do_pat(u_int utim) } static int +wd_valid_act(int act) +{ + + switch (act) { + case WD_SOFT_PANIC: +#ifdef DDB + case WD_SOFT_DDB: +#endif + case WD_SOFT_LOG: + return true; + } + return false; +} + +static int wd_ioctl_patpat(caddr_t data) { u_int u; @@ -145,20 +175,26 @@ wd_get_time_left(struct thread *td, time } static void -wd_pretimeout_cb(void *arg __unused) +wd_timeout_cb(void *arg) { + const char *type = arg; +#ifdef DDB + char kdb_why[80]; +#endif switch (wd_pretimeout_act) { - case WD_PRE_PANIC: - panic("watchdog pre-timeout, WD_PRE_PANIC set"); + case WD_SOFT_PANIC: + panic("watchdog %s-timeout, WD_SOFT_PANIC set", type); break; #ifdef DDB - case WD_PRE_DDB: - debugger(); + case WD_SOFT_DDB: + snprintf(kdb_why, sizeof(buf), "watchdog %s timeout", type); + kdb_backtrace(); + kdb_enter(KDB_WHY_WATCHDOG, kdb_why); break; #endif - case WD_PRE_LOG: - log(LOG_EMERG, "watchdog pre-timeout, WD_PRE_LOG"); + case WD_SOFT_LOG: + log(LOG_EMERG, "watchdog %s-timeout, WD_SOFT_LOG", type); break; default: panic("watchdog: unexpected wd_pretimeout_act %d", @@ -200,7 +236,7 @@ wd_set_pretimeout(int newtimeout, int di /* We determined the value is sane, so reset the callout */ (void) callout_reset(&wd_pretimeo_handle, hz*(utime - newtimeout), - wd_pretimeout_cb, NULL); + wd_timeout_cb, "pre-timeout"); wd_pretimeout = newtimeout; return 0; } @@ -216,20 +252,33 @@ wd_ioctl(struct cdev *dev __unused, u_lo error = 0; switch (cmd) { - case WDIOC_SETPRETIMEOUTACT: + case WDIOC_SETSOFT: u = *(int *)data; - switch (u) { - case WD_PRE_PANIC: -#ifdef DDB - case WD_PRE_DDB: -#endif - case WD_PRE_LOG: - wd_pretimeout_act = u; + /* do nothing? */ + if (u == wd_softtimer) break; - default: + /* If there is a pending timeout disallow this ioctl */ + if (wd_last_u != 0) { error = EINVAL; break; } + wd_softtimer = u; + break; + case WDIOC_SETSOFTTIMEOUTACT: + u = *(int *)data; + if (wd_valid_act(u)) { + wd_softtimeout_act = u; + } else { + error = EINVAL; + } + break; + case WDIOC_SETPRETIMEOUTACT: + u = *(int *)data; + if (wd_valid_act(u)) { + wd_pretimeout_act = u; + } else { + error = EINVAL; + } break; case WDIOC_GETPRETIMEOUT: *(int *)data = (int)wd_pretimeout; @@ -290,11 +339,15 @@ watchdog_modevent(module_t mod __unused, switch(type) { case MOD_LOAD: callout_init(&wd_pretimeo_handle, true); + callout_init(&wd_softtimeo_handle, true); wd_dev = make_dev(&wd_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, _PATH_WATCHDOG); return 0; case MOD_UNLOAD: + callout_stop(&wd_pretimeo_handle); + callout_stop(&wd_softtimeo_handle); callout_drain(&wd_pretimeo_handle); + callout_drain(&wd_softtimeo_handle); destroy_dev(wd_dev); return 0; case MOD_SHUTDOWN: Modified: user/alfred/ewatchdog/sys/sys/watchdog.h ============================================================================== --- user/alfred/ewatchdog/sys/sys/watchdog.h Tue Feb 12 03:19:39 2013 (r246703) +++ user/alfred/ewatchdog/sys/sys/watchdog.h Tue Feb 12 04:22:00 2013 (r246704) @@ -32,14 +32,19 @@ #define _PATH_WATCHDOG "fido" -#define WDIOCPATPAT _IOW('W', 42, u_int) -#define WDIOC_SETTIMEOUT _IOW('W', 43, int) -#define WDIOC_GETTIMEOUT _IOR('W', 44, int) -#define WDIOC_GETTIMELEFT _IOR('W', 45, int) -#define WDIOC_GETPRETIMEOUT _IOR('W', 46, int) -#define WDIOC_SETPRETIMEOUT _IOW('W', 47, int) +#define WDIOCPATPAT _IOW('W', 42, u_int) /* pat the watchdog */ +#define WDIOC_SETTIMEOUT _IOW('W', 43, int) /* set/reset the timer */ +#define WDIOC_GETTIMEOUT _IOR('W', 44, int) /* get total timeout */ +#define WDIOC_GETTIMELEFT _IOR('W', 45, int) /* get time left */ +#define WDIOC_GETPRETIMEOUT _IOR('W', 46, int) /* get the pre-timeout */ +#define WDIOC_SETPRETIMEOUT _IOW('W', 47, int) /* set the pre-timeout */ +/* set the action when a pre-timeout occurs see: WD_SOFT_* */ #define WDIOC_SETPRETIMEOUTACT _IOW('W', 48, int) +/* use software watchdog instead of hardware */ +#define WDIOC_SETSOFT _IOW('W', 49, int) +#define WDIOC_SETSOFTTIMEOUTACT _IOW('W', 50, int) + #define WD_ACTIVE 0x8000000 /* * Watchdog reset, timeout set to value in WD_INTERVAL field. @@ -84,9 +89,9 @@ #define WD_TO_32SEC 35 /* action on pre-timeout trigger */ -#define WD_PRE_PANIC 1 /* panic */ -#define WD_PRE_DDB 2 /* enter debugger */ -#define WD_PRE_LOG 3 /* log(9) */ +#define WD_SOFT_PANIC 1 /* panic */ +#define WD_SOFT_DDB 2 /* enter debugger */ +#define WD_SOFT_LOG 3 /* log(9) */ #ifdef _KERNEL From owner-svn-src-user@FreeBSD.ORG Tue Feb 12 22:35:15 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id EA64D8E7; Tue, 12 Feb 2013 22:35:15 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C1EC8825; Tue, 12 Feb 2013 22:35:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1CMZFG3010888; Tue, 12 Feb 2013 22:35:15 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1CMZEXq010878; Tue, 12 Feb 2013 22:35:14 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201302122235.r1CMZEXq010878@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Tue, 12 Feb 2013 22:35:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r246722 - user/des/ndr X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Feb 2013 22:35:16 -0000 Author: des Date: Tue Feb 12 22:35:14 2013 New Revision: 246722 URL: http://svnweb.freebsd.org/changeset/base/246722 Log: Old code from projcvs I'd completely forgotten about. Added: user/des/ndr/Makefile (contents, props changed) user/des/ndr/ndr.1 (contents, props changed) user/des/ndr/ndr.h (contents, props changed) user/des/ndr/ndr_client.c (contents, props changed) user/des/ndr/ndr_main.c (contents, props changed) user/des/ndr/ndr_protocol.c (contents, props changed) user/des/ndr/ndr_server.c (contents, props changed) Directory Properties: user/des/ndr/ (props changed) Added: user/des/ndr/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/des/ndr/Makefile Tue Feb 12 22:35:14 2013 (r246722) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +PROG = ndr +SRCS = ndr_main.c ndr_protocol.c ndr_client.c ndr_server.c +CSTD = c99 +WARNS ?= 6 +WFORMAT ?= 1 + +DPADD = ${LIBMD} +LDADD = -lmd + +.include Added: user/des/ndr/ndr.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/des/ndr/ndr.1 Tue Feb 12 22:35:14 2013 (r246722) @@ -0,0 +1,134 @@ +.\"- +.\" Copyright (c) 2007 Dag-Erling Smørgrav +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" 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$ +.\" +.Dd March 20, 2007 +.Dt NDR 1 +.Os +.Sh NAME +.Nm ndr +.Nd network-assisted disk recovery +.Sh SYNOPSIS +.Nm +.Op Fl v +.Op Fl a Ar addr +.Op Fl d Ar dir +.Op Fl p Ar port +.Fl s +.Nm +.Op Fl v +.Op Fl a Ar addr +.Op Fl p Ar port +.Fl c +.Ar device +.Ar host +.Op Ar port +.Sh DESCRIPTION +The +.Nm +utility attempts to recover the contents of a damaged disk over the +network. +One instance of +.Nm +runs in client mode on the machine to which the damaged disk is +attached. +Another instance runs in server mode on a separate machine. +.Pp +When the client contacts the server and announces the device which is +to be recovered, the server creates a file of the appropriate size and +starts requesting blocks of data from the client. +As recovery progresses, the server keeps track of recovered and failed +blocks in a separate file. +Thus, both the server and the client can be interrupted and restarted +without losing progress. +This is particularly useful when a disk is so badly damaged that the +client machine crashes during recovery. +.Pp +The following options are available: +.Bl -tag -width Fl +.It Fl a Ar addr +Bind to the specified address. +.It Fl c +Work in client mode. +The name of the device to recover, the name or address of the server, +and (optionally) the server's port number must be specified on the +command line after all other options. +.It Fl d Ar dir +In server mode, work from the specified directory. +For each client that connects to the server, a subdirectory named +after the IP address of the client is created within the working +directory. +The data and map files for each device are stored in directories named +after the device within each client directory. +.It Fl p Ar port +Bind to the specified port. +.It Fl s +Work in server mode. +.It Fl v +Increase the verbosity level. +Specifying this option more than once may result in overwhelming +amounts of debugging output. +.El +.Sh EXAMPLES +Start a server which will listen on port 6543 at the address +corresponding to +.Pa ndr.example.com , +store the data it receives in +.Pa /var/ndr , +and show a moderate amount of debugging information: +.Bd -literal -offset indent +ndr -s -a ndr.example.com -p 6543 -d /var/ndr -v +.Ed +.Pp +Start a client which will transfer the contents of +.Pa /dev/ad4 +to the server running on port 6543 on +.Pa ndr.example.com : +.Bd -literal -offset indent +ndr -c /dev/ad4 ndr.example.com 6543 +.Ed +.Pp +The following +.Xr hexdump 1 +command line displays the contents of a map file: +.Bd -literal -offset indent +hexdump -v -e '"%07.7_ax " 64/1 "%_c" "\\n"' map +.Ed +.Pp +Each output line starts with a hexadecimal offset followed by 64 ASCII +characters, each representing one block of the device. +Successfully recovered blocks are marked with a hash sign. +Blocks which have failed but will be retried are marked with a digit +reflecting the number of attempts that have been made. +Blocks which +.Nm +has given up on are marked with an asterisk. +.Sh AUTHORS +.An -nosplit +The +.Nm +utility and this manual page were written by +.An Dag-Erling Sm\(/orgrav Aq des@FreeBSD.org . Added: user/des/ndr/ndr.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/des/ndr/ndr.h Tue Feb 12 22:35:14 2013 (r246722) @@ -0,0 +1,51 @@ +/*- + * Copyright (c) 2007 Dag-Erling Smørgrav + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer + * in this position and unchanged. + * 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 ``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 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 NDR_H_INCLUDED +#define NDR_H_INCLUDED + +void verbose(int level, const char *fmt, ...); +void status(const char *fmt, ...); + +void client(const char *device, const char *saddr, const char *sport, + const char *daddr, const char *dport); +void server(const char *laddr, const char *lport); + +int client_socket(const char *saddr, const char *sport, + const char *daddr, const char *dport); +int server_socket(const char *laddr, const char *lport); +int accept_socket(int sd, char **saddr, char **sport); + +void sendstr(int sd, const char *str, size_t len); +void sendstrf(int sd, const char *fmt, ...); +void senddata(int sd, const void *buf, size_t len); +void read_full(int sd, void *buf, size_t len); +char *recvstr(int sd, char **str, size_t *len); +void *recvdata(int sd, void **buf, size_t *len, size_t *datalen); + +#endif Added: user/des/ndr/ndr_client.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/des/ndr/ndr_client.c Tue Feb 12 22:35:14 2013 (r246722) @@ -0,0 +1,145 @@ +/*- + * Copyright (c) 2007 Dag-Erling Smørgrav + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer + * in this position and unchanged. + * 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 ``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 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 +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "ndr.h" + +void +client(const char *device, const char *saddr, const char *sport, + const char *daddr, const char *dport) +{ + uintmax_t size, bsize; + struct stat st; + int dd, sd; + + /* open device */ + if ((dd = open(device, O_RDONLY)) < 0) + err(1, "%s", device); + if (fstat(dd, &st) == -1) + err(1, "fstat()"); + if (S_ISCHR(st.st_mode)) { + off_t ot; + unsigned int ui; + + if (ioctl(dd, DIOCGMEDIASIZE, &ot) == -1) + err(1, "ioctl(DIOCGMEDIASIZE)"); + size = ot; + if (ioctl(dd, DIOCGSECTORSIZE, &ui) == -1) + err(1, "ioctl(DIOCGSECTORSIZE)"); + bsize = ui; + } else if (S_ISREG(st.st_mode)) { + size = st.st_size; + bsize = st.st_blksize; + } else { + errx(1, "invalid device type"); + } + + /* connect to server */ + sd = client_socket(saddr, sport, daddr, dport); + + /* send device information */ + sendstrf(sd, "device %s", device); + sendstrf(sd, "size %016jx %08jx", size, bsize); + sendstrf(sd, "ready"); + + /* process server requests */ + void *buf = NULL; + size_t buflen = 0; + char *str = NULL; + size_t len = 0; + for (;;) { + uintmax_t rstart, rstop; + int verify; + + recvstr(sd, &str, &len); + if (strcmp(str, "done") == 0) { + break; + } else if (sscanf(str, "verify %jx %jx", &rstart, &rstop) == 2) { + verify = 1; + } else if (sscanf(str, "read %jx %jx", &rstart, &rstop) == 2) { + verify = 0; + } else { + errx(1, "protocol error"); + } + + if (rstop < rstart) + errx(1, "protocol error"); + + off_t off = rstart * bsize; + size_t rlen = (rstop - rstart + 1) * bsize; + if ((uintmax_t)(off + rlen) > size || + lseek(dd, off, SEEK_SET) != off) { + sendstrf(sd, "failed"); + continue; + } + if (buflen < rlen) + if ((buf = reallocf(buf, rlen)) == NULL) + err(1, "realloc()"); + status("%s blocks %ju - %ju from %s", + verify ? "verifying" : "reading", + rstart, rstop, device); + ssize_t ret = read(dd, buf, rlen); + if (ret < 0) { + warn("read()"); + sendstrf(sd, "failed"); + continue; + } + uintmax_t dlen = ret; + uintmax_t dstart = rstart; + uintmax_t dstop = rstop; + if (dlen < rlen) { + warnx("read(): short read"); + dstop = dstart + dlen / bsize - 1; + } + if (verify) { + char md5[33]; + MD5Data(buf, dlen, md5); + sendstrf(sd, "md5 %016jx %016jx", dstart, dstop); + sendstrf(sd, "%s", md5); + } else { + sendstrf(sd, "data %016jx %016jx", dstart, dstop); + senddata(sd, buf, (dstop - dstart + 1) * bsize); + } + } + status("done"); + status(""); + exit(0); +} Added: user/des/ndr/ndr_main.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/des/ndr/ndr_main.c Tue Feb 12 22:35:14 2013 (r246722) @@ -0,0 +1,159 @@ +/*- + * Copyright (c) 2007 Dag-Erling Smørgrav + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer + * in this position and unchanged. + * 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 ``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 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 +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "ndr.h" + +static const char *a_arg; +static int c_flag; +static const char *d_arg; +static const char *p_arg; +static int s_flag; +static int v_count; + +static void +usage(void) +{ + + fprintf(stderr, + "usage: ndr [-v] [-d dir] [-a addr] [-p port] -s\n" + " ndr [-v] -c []\n"); + exit(1); +} + +void +verbose(int level, const char *fmt, ...) +{ + va_list ap; + + if (v_count >= level) { + va_start(ap, fmt); + vfprintf(stderr, fmt, ap); + va_end(ap); + } +} + +void +status(const char *fmt, ...) +{ + static struct timeval prev; + struct timeval now; + static int olen = 0; + va_list ap; + int len; + + if (!isatty(STDERR_FILENO) || v_count > 1) + return; + + if (fmt[0] == '\0') { + /* cleanup requested */ + fputc('\n', stderr); + return; + } + + gettimeofday(&now, NULL); + if (now.tv_sec == prev.tv_sec) + return; + + prev = now; + fputc('\r', stderr); + va_start(ap, fmt); + len = vfprintf(stderr, fmt, ap); + va_end(ap); + + for (int i = len; i < olen; ++i) + fputc(' ', stderr); + olen = len; +} + +int +main(int argc, char *argv[]) +{ + int opt; + + while ((opt = getopt(argc, argv, "a:cd:p:sv")) != -1) + switch (opt) { + case 'a': + a_arg = optarg; + break; + case 'c': + c_flag = 1; + break; + case 'd': + d_arg = optarg; + break; + case 'p': + p_arg = optarg; + break; + case 's': + s_flag = 1; + break; + case 'v': + v_count++; + break; + default: + usage(); + } + + argc -= optind; + argv += optind; + + if (!(c_flag ^ s_flag)) + usage(); + + if (c_flag) { + if (d_arg || argc < 2 || argc > 3) + usage(); + client(argv[0], a_arg, p_arg, argv[1], argv[2]); + } else if (s_flag) { + if (argc > 0) + usage(); + if (d_arg && chdir(d_arg) != 0) + err(1, "chdir(%s)", d_arg); + server(a_arg, p_arg); + } else { + usage(); + } + errx(1, "not reached"); +} Added: user/des/ndr/ndr_protocol.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/des/ndr/ndr_protocol.c Tue Feb 12 22:35:14 2013 (r246722) @@ -0,0 +1,336 @@ +/*- + * Copyright (c) 2007 Dag-Erling Smørgrav + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer + * in this position and unchanged. + * 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 ``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 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 + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "ndr.h" + +static const char *ndr_default_port = "9110"; +static const char *ndr_client_sig = "ndr client\n"; +static const char *ndr_server_sig = "ndr server\n"; + +static int +handshake(int sd, const char *mine, const char *theirs) +{ + ssize_t mlen = strlen(mine); + ssize_t tlen = strlen(theirs); + char buf[tlen]; + + if (write(sd, mine, mlen) != mlen || + read(sd, buf, tlen) != tlen || + strncmp(buf, theirs, tlen) != 0) + return (-1); + return (0); +} + +int +client_socket(const char *saddr, const char *sport, + const char *daddr, const char *dport) +{ + struct addrinfo hints, *sres, *dres; + int one, ret, sd; + + /* resolve server address */ + memset(&hints, 0, sizeof hints); + hints.ai_flags = 0; + hints.ai_family = PF_UNSPEC; + hints.ai_socktype = SOCK_STREAM; + dres = NULL; + if (dport == NULL) + dport = ndr_default_port; + if ((ret = getaddrinfo(daddr, dport, &hints, &dres)) != 0) + errx(1, "getaddrinfo(): %s", gai_strerror(ret)); + + /* open socket */ + if ((sd = socket(dres->ai_family, dres->ai_socktype, dres->ai_protocol)) < 0) + err(1, "socket()"); + + /* resolve source address if given */ + if (saddr != NULL || sport != NULL) { + memset(&hints, 0, sizeof hints); + hints.ai_flags = AI_PASSIVE; + hints.ai_family = dres->ai_family; + hints.ai_socktype = dres->ai_socktype; + hints.ai_protocol = dres->ai_protocol; + sres = NULL; + if ((ret = getaddrinfo(saddr, sport, &hints, &sres)) != 0) + errx(1, "getaddrinfo(): %s", gai_strerror(ret)); + one = 1; + if (setsockopt(sd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof one) != 0) + err(1, "setsockopt(SO_REUSEADDR)"); + if (bind(sd, sres->ai_addr, sres->ai_addrlen) != 0) + err(1, "connect()"); + freeaddrinfo(sres); + } + + /* connect to server */ + if (connect(sd, dres->ai_addr, dres->ai_addrlen) != 0) + err(1, "connect()"); + freeaddrinfo(dres); + + verbose(1, "connected to server %s:%s\n", daddr, dport); + + /* handshake */ + if (handshake(sd, ndr_client_sig, ndr_server_sig) != 0) + errx(1, "handshake failed"); + + return (sd); +} + +int +server_socket(const char *laddr, const char *lport) +{ + struct addrinfo hints, *lres; + int one, ret, sd; + + /* resolve listening address */ + memset(&hints, 0, sizeof hints); + hints.ai_flags = AI_PASSIVE; + hints.ai_family = PF_UNSPEC; + hints.ai_socktype = SOCK_STREAM; + lres = NULL; + if (lport == NULL) + lport = ndr_default_port; + if ((ret = getaddrinfo(laddr, lport, &hints, &lres)) != 0) + errx(1, "getaddrinfo(): %s", gai_strerror(ret)); + + /* open listening socket */ + if ((sd = socket(lres->ai_family, lres->ai_socktype, lres->ai_protocol)) < 0) + err(1, "socket()"); + one = 1; + if (setsockopt(sd, SOL_SOCKET, SO_REUSEPORT, &one, sizeof one) != 0) + err(1, "setsockopt(SO_REUSEPORT)"); + if (bind(sd, lres->ai_addr, lres->ai_addrlen) != 0) + err(1, "bind()"); + if (listen(sd, 16) != 0) + err(1, "listen()"); + freeaddrinfo(lres); + + verbose(1, "server listening on %s:%s\n", laddr ? laddr : "*", lport); + + return (sd); +} + +int +accept_socket(int sd, char **saddr, char **sport) +{ + struct sockaddr_storage addr; + socklen_t addrlen; + int ad, ret; + + memset(&addr, 0, addrlen = sizeof addr); + if ((ad = accept(sd, (struct sockaddr *)&addr, &addrlen)) < 0) + return (-1); + + if ((*saddr = malloc(NI_MAXHOST)) == NULL || + (*sport = malloc(NI_MAXSERV)) == NULL) + err(1, "malloc()"); + + /* resolve client address */ + if ((ret = getnameinfo((struct sockaddr *)&addr, addrlen, + *saddr, NI_MAXHOST, *sport, NI_MAXSERV, + NI_NUMERICHOST | NI_NUMERICSERV)) != 0) + /* shouldn't happen */ + err(1, "getnameinfo(): %s", gai_strerror(ret)); + + verbose(1, "accepted connection from %s:%s\n", *saddr, *sport); + + if (handshake(ad, ndr_server_sig, ndr_client_sig) != 0) { + verbose(1, "handshake failed"); + close(ad); + return (-1); + } + + return (ad); +} + +void +sendstr(int sd, const char *str, size_t len) +{ + struct iovec iov[3]; + uint32_t count; + char s = 's'; + ssize_t res, ret; + + if (len == 0) + len = strlen(str); + count = len; + verbose(2, ">>> s %08x %s\n", count, str); + count = htonl(count); + res = 0; + iov[0].iov_base = &s; + res += (iov[0].iov_len = 1); + iov[1].iov_base = &count; + res += (iov[1].iov_len = sizeof count); + iov[2].iov_base = (void *)(uintptr_t)str; + res += (iov[2].iov_len = len); + if ((ret = writev(sd, iov, 3)) != res) { + if (ret == -1) + err(1, "writev()"); + errx(1, "writev(): short write (%zd / %zd)", ret, res); + } +} + +void +sendstrf(int sd, const char *fmt, ...) +{ + va_list ap; + char *str; + int len; + + str = NULL; + va_start(ap, fmt); + if ((len = vasprintf(&str, fmt, ap)) == -1) + err(1, "malloc()"); + va_end(ap); + + sendstr(sd, str, len); + free(str); +} + +void +senddata(int sd, const void *buf, size_t len) +{ + struct iovec iov[3]; + uint32_t count; + char d = 'd'; + ssize_t res, ret; + + if (len == 0) + len = strlen(buf); + count = len; + verbose(3, ">>> d %08x \n", count); + count = htonl(count); + res = 0; + iov[0].iov_base = &d; + res += (iov[0].iov_len = 1); + iov[1].iov_base = &count; + res += (iov[1].iov_len = sizeof count); + iov[2].iov_base = (void *)(uintptr_t)buf; + res += (iov[2].iov_len = len); + if ((ret = writev(sd, iov, 3)) != res) { + if (ret == -1) + err(1, "writev()"); + errx(1, "writev(): short write (%zd / %zd)", ret, res); + } +} + +void +read_full(int sd, void *buf, size_t len) +{ + ssize_t res, ret; + int retry; + + for (retry = 0, res = len; res > 0; res -= ret) { + while ((ret = read(sd, buf, res)) < 0) + if (errno != EAGAIN && errno != EINTR) + err(1, "read()"); + if (ret == 0) { + if (++retry < 5) + continue; + errx(1, "read(): short read (%zd / %zu)", + len - res, len); + } + retry = 0; + buf = (char *)buf + ret; + } +} + +char * +recvstr(int sd, char **str, size_t *len) +{ + uint32_t count; + char s; + + /* read marker */ + read_full(sd, &s, sizeof s); + if (s != 's') + errx(1, "protocol error"); + + /* read count */ + read_full(sd, &count, sizeof count); + count = ntohl(count); + + /* make sure the buffer is sufficiently large */ + if (*len < count + 1) + if ((*str = reallocf(*str, count + 1)) == NULL) + err(1, "realloc()"); + + /* read string */ + read_full(sd, *str, count); + (*str)[count] = '\0'; + + /* check for early termination */ + for (unsigned int i = 0; i < count; ++i) + if ((*str)[i] == '\0') + err(1, "protocol error"); + + verbose(2, "<<< s %08x %s\n", count, *str); + return (*str); +} + +void * +recvdata(int sd, void **buf, size_t *len, size_t *datalen) +{ + uint32_t count; + char d; + + /* read marker */ + read_full(sd, &d, sizeof d); + if (d != 'd') + errx(1, "protocol error"); + + /* read count */ + read_full(sd, &count, sizeof count); + count = ntohl(count); + + /* make sure the buffer is sufficiently large */ + if (*len < count) + if ((*buf = reallocf(*buf, count)) == NULL) + err(1, "realloc()"); + + /* read data */ + read_full(sd, *buf, count); + + verbose(3, "<<< d %08x \n", count); + *datalen = count; + return (*buf); +} Added: user/des/ndr/ndr_server.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/des/ndr/ndr_server.c Tue Feb 12 22:35:14 2013 (r246722) @@ -0,0 +1,436 @@ +/*- + * Copyright (c) 2007 Dag-Erling Smørgrav + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer + * in this position and unchanged. + * 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 ``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 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 +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "ndr.h" + +struct client { + pid_t pid; /* handler's PID */ + + int sd; /* socket descriptor */ + char *host; /* host name */ + char *port; /* port number */ + char *device; /* device name */ + + char *wpath; /* working directory */ + char *dpath; /* data file */ + int dd; /* data file descriptor */ + char *mpath; /* map file */ + int md; /* map file descriptor */ + char *map; /* map file pointer */ + + uintmax_t size; /* device size */ + uintmax_t bsize; /* device block size */ + uintmax_t blocks; /* # blocks total (size / bsize) */ + uintmax_t failed; /* # blocks failed */ + uintmax_t received; /* # blocks successfully recovered */ + uintmax_t retry; /* # blocks needing retry */ + + void *buf; /* buffer for receiving data */ + size_t bufsz; /* current size of buffer */ + size_t buflen; /* current length of buffer contents */ + + char *str; /* buffer for receiving strings */ + size_t strsz; /* current size of string buffer */ +}; + +static volatile sig_atomic_t interrupted; + +static void +interrupt(int sig) +{ + + (void)sig; + interrupted = 1; +} + +static void +reaper(int sig) +{ + int ret; + + (void)sig; + if (waitpid(0, &ret, WNOHANG) > 0 && WIFSIGNALED(ret)) + raise(WTERMSIG(ret)); +} + +static void +init_paths(struct client *cp) +{ + char path[PATH_MAX], rpath[PATH_MAX]; + char *p, *q, t; + + /* XXX overflow */ + snprintf(path, sizeof path, "%s/%s", cp->host, cp->device); + + /* create directory if necessary */ + for (p = q = path; *p != '\0'; p = q) { + if ((q = strchr(p, '/')) == NULL) + q = strchr(p, '\0'); + if ((t = *q) != '\0') + *q = '\0'; + if (mkdir(path, 0755) != 0 && errno != EEXIST) + err(1, "mkdir(%s)", path); + if (t == '\0') + break; + *q++ = t; + } + + /* resolve paths */ + realpath(path, rpath); + if ((cp->wpath = strdup(rpath)) == NULL) + err(1, "strdup()"); + if ((asprintf(&cp->dpath, "%s/data", cp->wpath)) < 0 || + (asprintf(&cp->mpath, "%s/map", cp->wpath)) < 0) + err(1, "asprintf()"); +} + +static void +init_files(struct client *cp) +{ + struct stat st; + int new = 0; + + /* initialize data and map */ + if ((cp->dd = open(cp->dpath, O_RDWR|O_CREAT, 0600)) < 0) + err(1, "%s", cp->dpath); + if (fstat(cp->dd, &st) != 0) + err(1, "fstat(%s)", cp->dpath); + if (st.st_size != (off_t)cp->size) + new = 1; + if ((cp->md = open(cp->mpath, O_RDWR|O_CREAT, 0600)) < 0) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Wed Feb 13 01:19:32 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D690B321; Wed, 13 Feb 2013 01:19:32 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B333DB4; Wed, 13 Feb 2013 01:19:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1D1JWc7059800; Wed, 13 Feb 2013 01:19:32 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1D1JV0D059791; Wed, 13 Feb 2013 01:19:31 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201302130119.r1D1JV0D059791@svn.freebsd.org> From: Attilio Rao Date: Wed, 13 Feb 2013 01:19:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r246726 - in user/attilio/vmc-playground: . sys/vm X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Feb 2013 01:19:32 -0000 Author: attilio Date: Wed Feb 13 01:19:31 2013 New Revision: 246726 URL: http://svnweb.freebsd.org/changeset/base/246726 Log: Implement a new algorithm for managing the radix trie which also includes path-compression. This greatly helps with sparsely populated tries, where an uncompressed trie may end up by having a lot of intermediate nodes for very little leaves. The new algorithm introduces 2 main concepts: the node level and the node owner. Every node represents a branch point where the leaves share the key up to the level specified in the node-level (current level excluded, of course). Such key partly shared is the one contained in the owner. Of course, the root branch is exempted to keep a valid owner, because theoretically all the keys are contained in the space designed by the root branch node. The search algorithm seems very intuitive and that is where one should start reading to understand the full approach. In the end, the algorithm ends up by demanding only one node per insert and this is not necessary in all the cases. To stay safe, we basically preallocate as many nodes as the number of physical pages are in the system, using uma_preallocate(). However, this raises 2 concerns: * As pmap_init() needs to kmem_alloc(), the nodes must be pre-allocated when vm_radix_init() is currently called, which is much before UMA is fully initialized. This means that uma_prealloc() will dig into the UMA_BOOT_PAGES pool of pages, which is often not enough to keep track of such large allocations. In order to fix this, change a bit the concept of UMA_BOOT_PAGES and vm.boot_pages. More specifically make the UMA_BOOT_PAGES an initial "value" as long as vm.boot_pages and extend the boot_pages physical area by as many bytes as needed with the information returned by vm_radix_allocphys_size(). * A small amount of pages will be held in per-cpu buckets and won't be accessible from curcpu, so the vm_radix_node_get() could really panic when the pre-allocation pool is close to be exhausted. In theory we could pre-allocate more pages than the number of physical frames to satisfy such request, but as many insert would happen without a node allocation anyway, I think it is safe to assume that the over-allocation is already compensating for such problem. On the field testing can stand me correct, of course. This could be further helped by the case where we allow a single-page insert to not require a complete root node. The use of pre-allocation gets rid all the non-direct mapping trickery and introduced lock recursion allowance for vm_page_free_queue. The nodes children are reduced in number from 32 -> 16 and from 16 -> 8 (for respectively 64 bits and 32 bits architectures). This would make the children to fit into cacheline for amd64 case, for example, and in general spawn less cacheline, which may be helpful in lookup_ge() case. Also, path-compression cames to help in cases where there are many levels, making the fallouts of such change less hurting. Sponsored by: EMC / Isilon storage division Reviewed by: jeff (partially) Tested by: flo Modified: user/attilio/vmc-playground/UPDATING user/attilio/vmc-playground/sys/vm/uma_core.c user/attilio/vmc-playground/sys/vm/uma_int.h user/attilio/vmc-playground/sys/vm/vm_page.c user/attilio/vmc-playground/sys/vm/vm_radix.c user/attilio/vmc-playground/sys/vm/vm_radix.h Modified: user/attilio/vmc-playground/UPDATING ============================================================================== --- user/attilio/vmc-playground/UPDATING Wed Feb 13 00:47:47 2013 (r246725) +++ user/attilio/vmc-playground/UPDATING Wed Feb 13 01:19:31 2013 (r246726) @@ -26,6 +26,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20130211: + The vm.boot_pages tunable and sysctl are removed and new + vm.initial_boot_pages tunable and sysctl are introduced. The new + adds represent the number of pages that are initially reserved to the + system for startup. The number of pages can however be extended if + necessary by the system during the boot stage. + 20130129: A BSD-licensed patch(1) variant has been added and is installed as bsdpatch, being the GNU version the default patch. Modified: user/attilio/vmc-playground/sys/vm/uma_core.c ============================================================================== --- user/attilio/vmc-playground/sys/vm/uma_core.c Wed Feb 13 00:47:47 2013 (r246725) +++ user/attilio/vmc-playground/sys/vm/uma_core.c Wed Feb 13 01:19:31 2013 (r246726) @@ -329,7 +329,7 @@ bucket_alloc(int entries, int bflags) /* * This is to stop us from allocating per cpu buckets while we're - * running out of vm.boot_pages. Otherwise, we would exhaust the + * running out of boot_pages. Otherwise, we would exhaust the * boot pages. This also prevents us from allocating buckets in * low memory situations. */ @@ -984,7 +984,7 @@ startup_alloc(uma_zone_t zone, int bytes } mtx_unlock(&uma_boot_pages_mtx); if (booted < UMA_STARTUP2) - panic("UMA: Increase vm.boot_pages"); + panic("UMA: Increase vm.initial_boot_pages"); /* * Now that we've booted reset these users to their real allocator. */ Modified: user/attilio/vmc-playground/sys/vm/uma_int.h ============================================================================== --- user/attilio/vmc-playground/sys/vm/uma_int.h Wed Feb 13 00:47:47 2013 (r246725) +++ user/attilio/vmc-playground/sys/vm/uma_int.h Wed Feb 13 01:19:31 2013 (r246726) @@ -118,7 +118,8 @@ #define UMA_SLAB_MASK (PAGE_SIZE - 1) /* Mask to get back to the page */ #define UMA_SLAB_SHIFT PAGE_SHIFT /* Number of bits PAGE_MASK */ -#define UMA_BOOT_PAGES 64 /* Pages allocated for startup */ +/* Initial pages allocated for startup */ +#define UMA_INIT_BOOT_PAGES 64 /* Max waste before going to off page slab management */ #define UMA_MAX_WASTE (UMA_SLAB_SIZE / 10) Modified: user/attilio/vmc-playground/sys/vm/vm_page.c ============================================================================== --- user/attilio/vmc-playground/sys/vm/vm_page.c Wed Feb 13 00:47:47 2013 (r246725) +++ user/attilio/vmc-playground/sys/vm/vm_page.c Wed Feb 13 01:19:31 2013 (r246726) @@ -145,10 +145,10 @@ long vm_page_array_size; long first_page; int vm_page_zero_count; -static int boot_pages = UMA_BOOT_PAGES; -TUNABLE_INT("vm.boot_pages", &boot_pages); -SYSCTL_INT(_vm, OID_AUTO, boot_pages, CTLFLAG_RD, &boot_pages, 0, - "number of pages allocated for bootstrapping the VM system"); +static int boot_pages = UMA_INIT_BOOT_PAGES; +TUNABLE_INT("vm.initial_boot_pages", &boot_pages); +SYSCTL_INT(_vm, OID_AUTO, initial_boot_pages, CTLFLAG_RD, &boot_pages, 0, + "Initial number of pages allocated for bootstrapping the VM system"); static int pa_tryrelock_restart; SYSCTL_INT(_vm, OID_AUTO, tryrelock_restart, CTLFLAG_RD, @@ -307,29 +307,17 @@ vm_page_startup(vm_offset_t vaddr) low_water = 0; #endif - end = phys_avail[biggestone+1]; + new_end = phys_avail[biggestone+1]; /* * Initialize the page and queue locks. */ - mtx_init(&vm_page_queue_free_mtx, "vm page free queue", NULL, MTX_DEF | - MTX_RECURSE); + mtx_init(&vm_page_queue_free_mtx, "vm page free queue", NULL, MTX_DEF); for (i = 0; i < PA_LOCK_COUNT; i++) mtx_init(&pa_lock[i], "vm page", NULL, MTX_DEF); for (i = 0; i < PQ_COUNT; i++) vm_pagequeue_init_lock(&vm_pagequeues[i]); - /* - * Allocate memory for use when boot strapping the kernel memory - * allocator. - */ - new_end = end - (boot_pages * UMA_SLAB_SIZE); - new_end = trunc_page(new_end); - mapped = pmap_map(&vaddr, new_end, end, - VM_PROT_READ | VM_PROT_WRITE); - bzero((void *)mapped, end - new_end); - uma_startup((void *)mapped, boot_pages); - #if defined(__amd64__) || defined(__i386__) || defined(__arm__) || \ defined(__mips__) /* @@ -385,6 +373,20 @@ vm_page_startup(vm_offset_t vaddr) end = new_end; /* + * Allocate memory for use when boot strapping the kernel memory + * allocator. + */ + boot_pages += howmany(vm_radix_allocphys_size(page_range), + UMA_SLAB_SIZE - UMA_MAX_WASTE); + new_end = end - (boot_pages * UMA_SLAB_SIZE); + new_end = trunc_page(new_end); + mapped = pmap_map(&vaddr, new_end, end, + VM_PROT_READ | VM_PROT_WRITE); + bzero((void *)mapped, end - new_end); + uma_startup((void *)mapped, boot_pages); + end = new_end; + + /* * Reserve an unmapped guard page to trap access to vm_page_array[-1]. */ vaddr += PAGE_SIZE; Modified: user/attilio/vmc-playground/sys/vm/vm_radix.c ============================================================================== --- user/attilio/vmc-playground/sys/vm/vm_radix.c Wed Feb 13 00:47:47 2013 (r246725) +++ user/attilio/vmc-playground/sys/vm/vm_radix.c Wed Feb 13 01:19:31 2013 (r246726) @@ -1,4 +1,5 @@ /* + * Copyright (c) 2013 EMC Corp. * Copyright (c) 2011 Jeffrey Roberson * Copyright (c) 2008 Mayur Shardul * All rights reserved. @@ -26,414 +27,433 @@ * */ - /* - * Radix tree implementation. + * Path-compressed radix trie implementation. + * The following code is not generalized into a general purpose library + * because there are way too many parameters embedded that should really + * be decided by the library consumers. At the same time, consumers + * of this code must achieve highest possible performance. + * + * The implementation takes into account the following rationale: + * - Size of the nodes might be as small as possible. + * - There is no bias toward lookup operations over inserts or removes, + * and vice-versa. + * - In average there are not many complete levels, than level + * compression may just complicate things. */ #include +#include "opt_ddb.h" + #include #include #include #include #include #include -#include #include #include -#include + #include #include #include #include #include #include -#ifndef UMA_MD_SMALL_ALLOC -#include -#endif #include -#include -#include - -#ifndef UMA_MD_SMALL_ALLOC -#define VM_RADIX_RNODE_MAP_SCALE (1024 * 1024 / 2) -#define VM_RADIX_WIDTH 4 +#ifdef DDB +#include +#endif /* - * Bits of height in root. - * The mask of smaller power of 2 containing VM_RADIX_LIMIT. + * Such sizes should permit to keep node children contained into a single + * cache-line, or to at least not span many of those. + * In particular, sparse tries should however be compressed properly and + * then make some extra-levels not a big deal. */ -#define VM_RADIX_HEIGHT 0x1f +#ifdef __LP64__ +#define VM_RADIX_WIDTH 4 #else -#define VM_RADIX_WIDTH 5 - -/* See the comment above. */ -#define VM_RADIX_HEIGHT 0xf +#define VM_RADIX_WIDTH 3 #endif #define VM_RADIX_COUNT (1 << VM_RADIX_WIDTH) #define VM_RADIX_MASK (VM_RADIX_COUNT - 1) -#define VM_RADIX_MAXVAL ((vm_pindex_t)-1) -#define VM_RADIX_LIMIT howmany((sizeof(vm_pindex_t) * NBBY), VM_RADIX_WIDTH) +#define VM_RADIX_LIMIT \ + (howmany((sizeof(vm_pindex_t) * NBBY), VM_RADIX_WIDTH) - 1) /* Flag bits stored in node pointers. */ -#define VM_RADIX_FLAGS 0x3 - -/* Calculates maximum value for a tree of height h. */ -#define VM_RADIX_MAX(h) \ - ((h) == VM_RADIX_LIMIT ? VM_RADIX_MAXVAL : \ - (((vm_pindex_t)1 << ((h) * VM_RADIX_WIDTH)) - 1)) - -/* - * On 32-bits architectures KTR cannot handle 64-bits values. - * Add macros for splitting in 32-bits quantity and provide format strings. - * Note that braces are not used because they would break compilation. - * Also, note that arguments are cast to u_long in order to follow KTR - * convention. - */ -#ifdef KTR -#define KFRMT64(x) __STRING(x)"l 0x%08lx, "__STRING(x)"h 0x%08lx" -#define KSPLT64L(x) ((u_long)((x) & 0xFFFFFFFF)) -#define KSPLT64H(x) ((u_long)(((x) >> 32) & 0xFFFFFFFF)) -#endif - -CTASSERT(VM_RADIX_HEIGHT >= VM_RADIX_LIMIT); +#define VM_RADIX_ISLEAF 0x1 +#define VM_RADIX_FLAGS 0x1 +#define VM_RADIX_PAD VM_RADIX_FLAGS + +/* Returns one unit associated with specified level. */ +#define VM_RADIX_UNITLEVEL(lev) \ + ((vm_pindex_t)1 << ((VM_RADIX_LIMIT - (lev)) * VM_RADIX_WIDTH)) struct vm_radix_node { void *rn_child[VM_RADIX_COUNT]; /* Child nodes. */ - volatile uint32_t rn_count; /* Valid children. */ + vm_pindex_t rn_owner; /* Owner of record. */ + uint16_t rn_count; /* Valid children. */ + uint16_t rn_clev; /* Current level. */ }; -CTASSERT(sizeof(struct vm_radix_node) < PAGE_SIZE); - static uma_zone_t vm_radix_node_zone; -#ifndef UMA_MD_SMALL_ALLOC -static vm_map_t rnode_map; -static u_long rnode_map_scale; - -static void * -vm_radix_node_zone_allocf(uma_zone_t zone, int size, uint8_t *flags, int wait) +#ifdef INVARIANTS +/* + * Radix node zone destructor. + */ +static void +vm_radix_node_zone_dtor(void *mem, int size __unused, void *arg __unused) { - vm_offset_t addr; - vm_page_t m; - int pflags; + struct vm_radix_node *rnode; - /* Inform UMA that this allocator uses rnode_map. */ - *flags = UMA_SLAB_KERNEL; + rnode = mem; + KASSERT(rnode->rn_count == 0, + ("vm_radix_node_put: Freeing node %p with %d children\n", mem, + rnode->rn_count)); +} +#endif - pflags = VM_ALLOC_WIRED | VM_ALLOC_NOOBJ; +/* + * Allocate a radix node. Pre-allocation ensures that the request will be + * always successfully satisfied. + */ +static __inline struct vm_radix_node * +vm_radix_node_get(vm_pindex_t owner, uint16_t count, uint16_t clevel) +{ + struct vm_radix_node *rnode; + + rnode = uma_zalloc(vm_radix_node_zone, M_NOWAIT | M_ZERO); /* - * As kmem_alloc_nofault() can however fail, let just assume that - * M_NOWAIT is on and act accordingly. + * The required number of nodes might be already correctly + * pre-allocated in vm_radix_init(). However, UMA can reserve few + * nodes on per-cpu specific buckets, which will not be accessible + * from the curcpu. The allocation could then return NULL when the + * pre-allocation pool is close to be exhausted. + * Anyway, in practice this should never be a problem because a new + * node is not always required for insert, thus the pre-allocation + * pool should already have some extra-pages that indirectly deal with + * this situation. */ - pflags |= ((wait & M_USE_RESERVE) != 0) ? VM_ALLOC_INTERRUPT : - VM_ALLOC_SYSTEM; - if ((wait & M_ZERO) != 0) - pflags |= VM_ALLOC_ZERO; - addr = kmem_alloc_nofault(rnode_map, size); - if (addr == 0) - return (NULL); - - /* Just one page allocation is assumed here. */ - m = vm_page_alloc(NULL, OFF_TO_IDX(addr - VM_MIN_KERNEL_ADDRESS), - pflags); - if (m == NULL) { - kmem_free(rnode_map, addr, size); - return (NULL); - } - if ((wait & M_ZERO) != 0 && (m->flags & PG_ZERO) == 0) - pmap_zero_page(m); - pmap_qenter(addr, &m, 1); - return ((void *)addr); + if (rnode == NULL) + panic("%s: uma_zalloc() returned NULL for a new node", + __func__); + rnode->rn_owner = owner; + rnode->rn_count = count; + rnode->rn_clev = clevel; + return (rnode); } -static void -vm_radix_node_zone_freef(void *item, int size, uint8_t flags) +/* + * Free radix node. + */ +static __inline void +vm_radix_node_put(struct vm_radix_node *rnode) { - vm_page_t m; - vm_offset_t voitem; - MPASS((flags & UMA_SLAB_KERNEL) != 0); + uma_zfree(vm_radix_node_zone, rnode); +} + +/* + * Return the position in the array for a given level. + */ +static __inline int +vm_radix_slot(vm_pindex_t index, uint16_t level) +{ - /* Just one page allocation is assumed here. */ - voitem = (vm_offset_t)item; - m = PHYS_TO_VM_PAGE(pmap_kextract(voitem)); - pmap_qremove(voitem, 1); - vm_page_lock(m); - vm_page_unwire(m, 0); - vm_page_free(m); - vm_page_unlock(m); - kmem_free(rnode_map, voitem, size); + return ((index >> ((VM_RADIX_LIMIT - level) * VM_RADIX_WIDTH)) & + VM_RADIX_MASK); } -static void -init_vm_radix_alloc(void *dummy __unused) +/* Trims the key after the specified level. */ +static __inline vm_pindex_t +vm_radix_trimkey(vm_pindex_t index, uint16_t level) { + vm_pindex_t ret; - uma_zone_set_max(vm_radix_node_zone, rnode_map_scale); - uma_zone_set_allocf(vm_radix_node_zone, vm_radix_node_zone_allocf); - uma_zone_set_freef(vm_radix_node_zone, vm_radix_node_zone_freef); + ret = index; + if (level < VM_RADIX_LIMIT) { + ret >>= (VM_RADIX_LIMIT - level) * VM_RADIX_WIDTH; + ret <<= (VM_RADIX_LIMIT - level) * VM_RADIX_WIDTH; + } + return (ret); } -SYSINIT(vm_radix, SI_SUB_KMEM, SI_ORDER_SECOND, init_vm_radix_alloc, NULL); -#endif /* - * Radix node zone destructor. + * Get the root node for a radix tree. */ -#ifdef INVARIANTS -static void -vm_radix_node_zone_dtor(void *mem, int size, void *arg) +static __inline struct vm_radix_node * +vm_radix_getroot(struct vm_radix *rtree) { - struct vm_radix_node *rnode; - rnode = mem; - KASSERT(rnode->rn_count == 0, - ("vm_radix_node_put: Freeing a node with %d children\n", - rnode->rn_count)); + return ((struct vm_radix_node *)(rtree->rt_root & ~VM_RADIX_FLAGS)); } -#endif /* - * Allocate a radix node. Initializes all elements to 0. + * Set the root node for a radix tree. */ -static __inline struct vm_radix_node * -vm_radix_node_get(void) +static __inline void +vm_radix_setroot(struct vm_radix *rtree, struct vm_radix_node *rnode) { - return (uma_zalloc(vm_radix_node_zone, M_NOWAIT | M_ZERO)); + rtree->rt_root = (uintptr_t)rnode; } /* - * Free radix node. + * Returns the associated page extracted from rnode if available, + * NULL otherwise. */ -static __inline void -vm_radix_node_put(struct vm_radix_node *rnode) +static __inline vm_page_t +vm_radix_node_page(struct vm_radix_node *rnode) { - uma_zfree(vm_radix_node_zone, rnode); + return ((((uintptr_t)rnode & VM_RADIX_ISLEAF) != 0) ? + (vm_page_t)((uintptr_t)rnode & ~VM_RADIX_FLAGS) : NULL); } /* - * Return the position in the array for a given level. + * Adds the page as a child of provided node. */ -static __inline int -vm_radix_slot(vm_pindex_t index, int level) +static __inline void +vm_radix_addpage(struct vm_radix_node *rnode, vm_pindex_t index, uint16_t clev, + vm_page_t page) { + int slot; - return ((index >> (level * VM_RADIX_WIDTH)) & VM_RADIX_MASK); + slot = vm_radix_slot(index, clev); + rnode->rn_child[slot] = (void *)((uintptr_t)page | VM_RADIX_ISLEAF); } /* - * Initialize the radix node submap (for architectures not supporting - * direct-mapping) and the radix node zone. - * - * WITNESS reports a lock order reversal, for architectures not - * supporting direct-mapping, between the "system map" lock - * and the "vm object" lock. This is because the well established ordering - * "system map" -> "vm object" is not honoured in this case as allocating - * from the radix node submap ends up adding a mapping entry to it, meaning - * it is necessary to lock the submap. However, the radix node submap is - * a leaf and self-contained, thus a deadlock cannot happen here and - * adding MTX_NOWITNESS to all map locks would be largerly sub-optimal. + * Returns the slot where two keys differ. + * It cannot accept 2 equal keys. */ -void -vm_radix_init(void) +static __inline uint16_t +vm_radix_keydiff(vm_pindex_t index1, vm_pindex_t index2) { -#ifndef UMA_MD_SMALL_ALLOC - vm_offset_t maxaddr, minaddr; + uint16_t clev; - rnode_map_scale = VM_RADIX_RNODE_MAP_SCALE; - TUNABLE_ULONG_FETCH("hw.rnode_map_scale", &rnode_map_scale); - rnode_map = kmem_suballoc(kernel_map, &minaddr, &maxaddr, - rnode_map_scale * sizeof(struct vm_radix_node), FALSE); - rnode_map->system_map = 1; -#endif + KASSERT(index1 != index2, ("%s: passing the same key value %jx", + __func__, (uintmax_t)index1)); - vm_radix_node_zone = uma_zcreate("RADIX NODE", - sizeof(struct vm_radix_node), NULL, -#ifdef INVARIANTS - vm_radix_node_zone_dtor, -#else - NULL, -#endif - NULL, NULL, VM_RADIX_HEIGHT, UMA_ZONE_VM); + index1 ^= index2; + for (clev = 0; clev <= VM_RADIX_LIMIT ; clev++) + if (vm_radix_slot(index1, clev)) + return (clev); + panic("%s: it might have not reached this point", __func__); + return (0); } /* - * Extract the root node and height from a radix tree with a single load. + * Returns TRUE if it can be determined that key does not belong to the + * specified rnode. FALSE otherwise. */ -static __inline int -vm_radix_height(struct vm_radix *rtree, struct vm_radix_node **rnode) +static __inline boolean_t +vm_radix_keybarr(struct vm_radix_node *rnode, vm_pindex_t idx) { - uintptr_t root; - int height; - root = rtree->rt_root; - height = root & VM_RADIX_HEIGHT; - *rnode = (struct vm_radix_node *)(root - height); - return (height); + if (rnode->rn_clev > 0) { + idx = vm_radix_trimkey(idx, rnode->rn_clev - 1); + idx -= rnode->rn_owner; + if (idx != 0) + return (TRUE); + } + return (FALSE); } - /* - * Set the root node and height for a radix tree. + * Adjusts the idx key to the first upper level available, based on a valid + * initial level and map of available levels. + * Returns a value bigger than 0 to signal that there are not valid levels + * available. */ -static inline void -vm_radix_setroot(struct vm_radix *rtree, struct vm_radix_node *rnode, - int height) +static __inline int +vm_radix_addlev(vm_pindex_t *idx, boolean_t *levels, uint16_t ilev) { - uintptr_t root; + vm_pindex_t wrapidx; - root = (uintptr_t)rnode | height; - rtree->rt_root = root; + for (; levels[ilev] == FALSE || + vm_radix_slot(*idx, ilev) == (VM_RADIX_COUNT - 1); ilev--) + if (ilev == 0) + break; + KASSERT(ilev > 0 || levels[0] == TRUE, + ("%s: levels back-scanning problem", __func__)); + if (ilev == 0 && vm_radix_slot(*idx, ilev) == (VM_RADIX_COUNT - 1)) + return (1); + wrapidx = *idx; + *idx = vm_radix_trimkey(*idx, ilev); + *idx += VM_RADIX_UNITLEVEL(ilev); + if (*idx < wrapidx) + return (1); + return (0); } -static inline vm_page_t -vm_radix_match(void *child) +/* + * Adjusts the idx key to the first lower level available, based on a valid + * initial level and map of available levels. + * Returns a value bigger than 0 to signal that there are not valid levels + * available. + */ +static __inline int +vm_radix_declev(vm_pindex_t *idx, boolean_t *levels, uint16_t ilev) { - uintptr_t c; - - c = (uintptr_t)child; + vm_pindex_t wrapidx; - return ((vm_page_t)(c & ~VM_RADIX_FLAGS)); + for (; levels[ilev] == FALSE || + vm_radix_slot(*idx, ilev) == 0; ilev--) + if (ilev == 0) + break; + KASSERT(ilev > 0 || levels[0] == TRUE, + ("%s: levels back-scanning problem", __func__)); + if (ilev == 0 && vm_radix_slot(*idx, ilev) == 0) + return (1); + wrapidx = *idx; + *idx = vm_radix_trimkey(*idx, ilev); + *idx |= VM_RADIX_UNITLEVEL(ilev) - 1; + *idx -= VM_RADIX_UNITLEVEL(ilev); + if (*idx < wrapidx) + return (1); + return (0); } +/* + * Internal handwork for vm_radix_reclaim_allonodes() primitive. + * This function is recrusive. + */ static void -vm_radix_reclaim_allnodes_internal(struct vm_radix_node *rnode, int level) +vm_radix_reclaim_allnodes_int(struct vm_radix_node *rnode) { int slot; - MPASS(rnode != NULL && level >= 0); - - /* - * Level 0 just contains pages as children, thus make it a special - * case, free the node and return. - */ - if (level == 0) { - CTR2(KTR_VM, "reclaiming: node %p, level %d", rnode, level); - rnode->rn_count = 0; - vm_radix_node_put(rnode); - return; - } for (slot = 0; slot < VM_RADIX_COUNT && rnode->rn_count != 0; slot++) { if (rnode->rn_child[slot] == NULL) continue; - CTR3(KTR_VM, - "reclaiming: node %p, level %d recursing in slot %d", - rnode, level, slot); - vm_radix_reclaim_allnodes_internal(rnode->rn_child[slot], - level - 1); + if (vm_radix_node_page(rnode->rn_child[slot]) == NULL) + vm_radix_reclaim_allnodes_int(rnode->rn_child[slot]); rnode->rn_count--; } - MPASS(rnode->rn_count == 0); - CTR2(KTR_VM, "reclaiming: node %p, level %d", rnode, level); vm_radix_node_put(rnode); } /* - * Inserts the key-value pair in to the radix tree. Returns errno. + * Returns the amount of requested memory to satisfy nodes pre-allocation. + */ +size_t +vm_radix_allocphys_size(size_t nitems) +{ + + return (nitems * sizeof(struct vm_radix_node)); +} + +/* + * Pre-allocate intermediate nodes from the UMA slab zone. + */ +void +vm_radix_init(void) +{ + + vm_radix_node_zone = uma_zcreate("RADIX NODE", + sizeof(struct vm_radix_node), NULL, +#ifdef INVARIANTS + vm_radix_node_zone_dtor, +#else + NULL, +#endif + NULL, NULL, VM_RADIX_PAD, UMA_ZONE_VM | UMA_ZONE_NOFREE); + uma_prealloc(vm_radix_node_zone, vm_page_array_size); +} + +/* + * Inserts the key-value pair in to the trie. * Panics if the key already exists. */ void vm_radix_insert(struct vm_radix *rtree, vm_pindex_t index, vm_page_t page) { - struct vm_radix_node *rnode; - struct vm_radix_node *root; - int level; + vm_pindex_t newind; + struct vm_radix_node *rnode, *tmp, *tmp2; + vm_page_t m; int slot; + uint16_t clev; - CTR4(KTR_VM, - "insert: tree %p, " KFRMT64(index) ", page %p", rtree, - KSPLT64L(index), KSPLT64H(index), page); - if (index == -1) - panic("vm_radix_insert: -1 is not a valid index.\n"); - level = vm_radix_height(rtree, &root); /* - * Increase the height by adding nodes at the root until - * there is sufficient space. + * The owner of record for root is not really important because it + * will never be used. */ - while (level == 0 || index > VM_RADIX_MAX(level)) { - CTR5(KTR_VM, - "insert: expanding " KFRMT64(index) ">" KFRMT64(mxl) ", height %d", - KSPLT64L(index), KSPLT64H(index), - KSPLT64L(VM_RADIX_MAX(level)), - KSPLT64H(VM_RADIX_MAX(level)), level); - level++; - KASSERT(level <= VM_RADIX_LIMIT, - ("vm_radix_insert: Tree %p height %d too tall", - rtree, level)); - /* - * Only allocate tree nodes if they are needed. - */ - if (root == NULL || root->rn_count != 0) { - rnode = vm_radix_node_get(); - if (rnode == NULL) { - CTR5(KTR_VM, - "insert: tree %p, root %p, " KFRMT64(index) ", level %d ENOMEM", - rtree, root, KSPLT64L(index), - KSPLT64H(index), level); - panic("vm_radix_insert: failed allocation"); - } - /* - * Store the new pointer with a memory barrier so - * that it is visible before the new root. - */ - if (root) { - atomic_store_rel_ptr((volatile uintptr_t *) - &rnode->rn_child[0], (uintptr_t)root); - rnode->rn_count = 1; - } - root = rnode; - } - vm_radix_setroot(rtree, root, level); + rnode = vm_radix_getroot(rtree); + if (rnode == NULL) { + rnode = vm_radix_node_get(0, 1, 0); + vm_radix_setroot(rtree, rnode); + vm_radix_addpage(rnode, index, 0, page); + return; } - - /* Now that the tree is tall enough, fill in the path to the index. */ - rnode = root; - for (level = level - 1; level > 0; level--) { - slot = vm_radix_slot(index, level); - /* Add the required intermidiate nodes. */ + while (rnode) { + if (vm_radix_keybarr(rnode, index) == TRUE) + break; + slot = vm_radix_slot(index, rnode->rn_clev); + m = vm_radix_node_page(rnode->rn_child[slot]); + if (m != NULL) { + if (m->pindex == index) + panic("%s: key %jx is already present", + __func__, (uintmax_t)index); + clev = vm_radix_keydiff(m->pindex, index); + tmp = vm_radix_node_get(vm_radix_trimkey(index, + clev - 1), 2, clev); + rnode->rn_child[slot] = tmp; + vm_radix_addpage(tmp, index, clev, page); + vm_radix_addpage(tmp, m->pindex, clev, m); + return; + } if (rnode->rn_child[slot] == NULL) { - rnode->rn_child[slot] = vm_radix_node_get(); - if (rnode->rn_child[slot] == NULL) { - CTR6(KTR_VM, - "insert: tree %p, " KFRMT64(index) ", level %d, slot %d, rnode %p ENOMEM", - rtree, KSPLT64L(index), KSPLT64H(index), - level, slot, rnode); - CTR4(KTR_VM, - "insert: tree %p, rnode %p, child %p, count %u ENOMEM", - rtree, rnode, rnode->rn_child[slot], - rnode->rn_count); - panic("vm_radix_insert: failed allocation"); - } rnode->rn_count++; - } - CTR6(KTR_VM, - "insert: tree %p, " KFRMT64(index) ", level %d, slot %d, rnode %p", - rtree, KSPLT64L(index), KSPLT64H(index), level, slot, - rnode); - CTR4(KTR_VM, - "insert: tree %p, rnode %p, child %p, count %u", - rtree, rnode, rnode->rn_child[slot], rnode->rn_count); + vm_radix_addpage(rnode, index, rnode->rn_clev, page); + return; + } rnode = rnode->rn_child[slot]; } + if (rnode == NULL) + panic("%s: path traversal ended unexpectedly", __func__); + + /* + * Scan the trie from the top and find the parent to insert + * the new object. + */ + newind = rnode->rn_owner; + clev = vm_radix_keydiff(newind, index); + slot = VM_RADIX_COUNT; + for (rnode = vm_radix_getroot(rtree); ; rnode = tmp) { + KASSERT(rnode != NULL, ("%s: edge cannot be NULL in the scan", + __func__)); + KASSERT(clev >= rnode->rn_clev, + ("%s: unexpected trie depth: clev: %d, rnode->rn_clev: %d", + __func__, clev, rnode->rn_clev)); + slot = vm_radix_slot(index, rnode->rn_clev); + tmp = rnode->rn_child[slot]; + KASSERT(tmp != NULL && vm_radix_node_page(tmp) == NULL, + ("%s: unexpected lookup interruption", __func__)); + if (tmp->rn_clev > clev) + break; + } + KASSERT(rnode != NULL && tmp != NULL && slot < VM_RADIX_COUNT, + ("%s: invalid scan parameters rnode: %p, tmp: %p, slot: %d", + __func__, (void *)rnode, (void *)tmp, slot)); - slot = vm_radix_slot(index, 0); - MPASS(rnode != NULL); - KASSERT(rnode->rn_child[slot] == NULL, - ("vm_radix_insert: Duplicate value %p at index: %lu\n", - rnode->rn_child[slot], (u_long)index)); - rnode->rn_child[slot] = page; - rnode->rn_count++; - CTR5(KTR_VM, - "insert: tree %p, " KFRMT64(index) ", level %d, slot %d", - rtree, KSPLT64L(index), KSPLT64H(index), level, slot); - CTR3(KTR_VM, "insert: slot %d, rnode %p, count %u", slot, rnode, - rnode->rn_count); + /* + * A new node is needed because the right insertion level is reached. + * Setup the new intermediate node and add the 2 children: the + * new object and the older edge. + */ + tmp2 = vm_radix_node_get(vm_radix_trimkey(page->pindex, clev - 1), 2, + clev); + rnode->rn_child[slot] = tmp2; + vm_radix_addpage(tmp2, index, clev, page); + slot = vm_radix_slot(newind, clev); + tmp2->rn_child[slot] = tmp; } /* @@ -444,150 +464,111 @@ vm_page_t vm_radix_lookup(struct vm_radix *rtree, vm_pindex_t index) { struct vm_radix_node *rnode; + vm_page_t m; int slot; - int level; - level = vm_radix_height(rtree, &rnode); - if (index > VM_RADIX_MAX(level)) - return NULL; - level--; + rnode = vm_radix_getroot(rtree); while (rnode) { - slot = vm_radix_slot(index, level); - CTR6(KTR_VM, - "lookup: tree %p, " KFRMT64(index) ", level %d, slot %d, rnode %p", - rtree, KSPLT64L(index), KSPLT64H(index), level, slot, - rnode); - CTR2(KTR_VM, "lookup: rnode %p, child %p", rnode, - rnode->rn_child[slot]); - if (level == 0) - return vm_radix_match(rnode->rn_child[slot]); + if (vm_radix_keybarr(rnode, index) == TRUE) + return (NULL); + slot = vm_radix_slot(index, rnode->rn_clev); rnode = rnode->rn_child[slot]; - level--; + m = vm_radix_node_page(rnode); + if (m != NULL) { + if (m->pindex == index) + return (m); + else + return (NULL); + } } - CTR3(KTR_VM, "lookup: tree %p, " KFRMT64(index) " failed", rtree, - KSPLT64L(index), KSPLT64H(index)); - - return NULL; + return (NULL); } /* - * Find the first leaf with a valid node between *startp and end. Return - * the index of the first valid item in the leaf in *startp. + * Look up any entry at a position bigger than or equal to index. */ -static struct vm_radix_node * -vm_radix_leaf(struct vm_radix *rtree, vm_pindex_t *startp) +vm_page_t +vm_radix_lookup_ge(struct vm_radix *rtree, vm_pindex_t index) { - struct vm_radix_node *rnode; - vm_pindex_t start; vm_pindex_t inc; + vm_page_t m; + struct vm_radix_node *rnode; int slot; - int level; + uint16_t difflev; + boolean_t maplevels[VM_RADIX_LIMIT + 1]; +#ifdef INVARIANTS + int loops = 0; +#endif - start = *startp; restart: - level = vm_radix_height(rtree, &rnode); - if (start > VM_RADIX_MAX(level)) { - rnode = NULL; - goto out; - } - /* - * Search the tree from the top for any leaf node holding an index - * between start and maxval. - */ - for (level--; level; level--) { - slot = vm_radix_slot(start, level); - CTR6(KTR_VM, - "leaf: tree %p, " KFRMT64(start) ", level %d, slot %d, rnode %p", - rtree, KSPLT64L(start), KSPLT64H(start), level, slot, - rnode); - CTR2(KTR_VM, "leaf: rnode %p, child %p", rnode, - rnode->rn_child[slot]); - if (rnode->rn_child[slot] != NULL) { + KASSERT(++loops < 1000, ("%s: too many loops", __func__)); + for (difflev = 0; difflev < (VM_RADIX_LIMIT + 1); difflev++) + maplevels[difflev] = FALSE; + rnode = vm_radix_getroot(rtree); + while (rnode) { + maplevels[rnode->rn_clev] = TRUE; + + /* + * If the keys differ before the current bisection node + * the search key might rollback to the earlierst + * available bisection node, or to the smaller value + * in the current domain (if the owner is bigger than the + * search key). + * The search for a valid bisection node is helped through + * the use of maplevels array which should bring immediately + * a lower useful level, skipping holes. + */ + if (vm_radix_keybarr(rnode, index) == TRUE) { + difflev = vm_radix_keydiff(index, rnode->rn_owner); + if (index > rnode->rn_owner) { + if (vm_radix_addlev(&index, maplevels, + difflev) > 0) + break; + } else + index = vm_radix_trimkey(rnode->rn_owner, + difflev); + goto restart; + } + slot = vm_radix_slot(index, rnode->rn_clev); + m = vm_radix_node_page(rnode->rn_child[slot]); + if (m != NULL && m->pindex >= index) + return (m); + if (rnode->rn_child[slot] != NULL && m == NULL) { rnode = rnode->rn_child[slot]; continue; } + /* - * Calculate how much to increment our index by - * based on the tree level. We must truncate the - * lower bits to start from the begnning of the - * next leaf. - */ - inc = 1LL << (level * VM_RADIX_WIDTH); - start &= ~VM_RADIX_MAX(level); - - /* Avoid start address wrapping up. */ - if ((VM_RADIX_MAXVAL - start) < inc) { - rnode = NULL; - goto out; - } - start += inc; - slot++; - CTR4(KTR_VM, - "leaf: " KFRMT64(start) ", " KFRMT64(inc), - KSPLT64L(start), KSPLT64H(start), KSPLT64L(inc), - KSPLT64H(inc)); - CTR2(KTR_VM, "leaf: level %d, slot %d", level, slot); - for (; slot < VM_RADIX_COUNT; slot++, start += inc) { - if (rnode->rn_child[slot]) { - rnode = rnode->rn_child[slot]; - break; - } - if ((VM_RADIX_MAXVAL - start) < inc) { - rnode = NULL; - goto out; + * Look for an available edge or page within the current + * bisection node. + */ + if (slot < (VM_RADIX_COUNT - 1)) { + inc = VM_RADIX_UNITLEVEL(rnode->rn_clev); + index = vm_radix_trimkey(index, rnode->rn_clev); + index += inc; + slot++; + for (;; index += inc, slot++) { + m = vm_radix_node_page(rnode->rn_child[slot]); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Wed Feb 13 01:25:22 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 51EA070D; Wed, 13 Feb 2013 01:25:22 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 26CABEC; Wed, 13 Feb 2013 01:25:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1D1PMNC062214; Wed, 13 Feb 2013 01:25:22 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1D1PIIN062189; Wed, 13 Feb 2013 01:25:18 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201302130125.r1D1PIIN062189@svn.freebsd.org> From: Attilio Rao Date: Wed, 13 Feb 2013 01:25:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r246727 - in user/attilio/vmcontention: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd/zpool kerberos5/libexec/digest-service lib/clang l... X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Feb 2013 01:25:22 -0000 Author: attilio Date: Wed Feb 13 01:25:17 2013 New Revision: 246727 URL: http://svnweb.freebsd.org/changeset/base/246727 Log: MFC Added: user/attilio/vmcontention/sys/arm/allwinner/a10_wdog.c - copied unchanged from r246726, head/sys/arm/allwinner/a10_wdog.c user/attilio/vmcontention/sys/arm/allwinner/a10_wdog.h - copied unchanged from r246726, head/sys/arm/allwinner/a10_wdog.h user/attilio/vmcontention/sys/boot/fdt/help.fdt - copied unchanged from r246726, head/sys/boot/fdt/help.fdt user/attilio/vmcontention/sys/kern/subr_bus_dma.c - copied unchanged from r246726, head/sys/kern/subr_bus_dma.c user/attilio/vmcontention/sys/sys/memdesc.h - copied unchanged from r246726, head/sys/sys/memdesc.h Modified: user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zdb/zdb.c user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zfs/zfs.8 user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 user/attilio/vmcontention/kerberos5/libexec/digest-service/Makefile user/attilio/vmcontention/lib/clang/clang.build.mk user/attilio/vmcontention/lib/libc/arm/aeabi/Makefile.inc user/attilio/vmcontention/lib/libc/gen/fts.c user/attilio/vmcontention/lib/libvmmapi/vmmapi.c user/attilio/vmcontention/lib/libvmmapi/vmmapi.h user/attilio/vmcontention/share/man/man9/vfs_busy.9 user/attilio/vmcontention/sys/amd64/include/vmm.h (contents, props changed) user/attilio/vmcontention/sys/amd64/include/vmm_dev.h (contents, props changed) user/attilio/vmcontention/sys/amd64/vmm/io/ppt.c user/attilio/vmcontention/sys/amd64/vmm/vmm.c user/attilio/vmcontention/sys/amd64/vmm/vmm_dev.c user/attilio/vmcontention/sys/arm/allwinner/a10_machdep.c user/attilio/vmcontention/sys/arm/allwinner/files.a10 user/attilio/vmcontention/sys/arm/arm/busdma_machdep-v6.c user/attilio/vmcontention/sys/arm/arm/busdma_machdep.c user/attilio/vmcontention/sys/boot/arm/uboot/Makefile user/attilio/vmcontention/sys/boot/fdt/dts/cubieboard.dts user/attilio/vmcontention/sys/boot/powerpc/ps3/Makefile user/attilio/vmcontention/sys/boot/powerpc/uboot/Makefile user/attilio/vmcontention/sys/bsm/audit_kevents.h user/attilio/vmcontention/sys/cam/cam_ccb.h user/attilio/vmcontention/sys/cam/cam_xpt.c user/attilio/vmcontention/sys/cam/ctl/ctl_frontend_cam_sim.c user/attilio/vmcontention/sys/cam/ctl/scsi_ctl.c user/attilio/vmcontention/sys/cam/scsi/scsi_pass.c user/attilio/vmcontention/sys/cam/scsi/scsi_target.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_diff.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_traverse.h user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/refcount.h user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c user/attilio/vmcontention/sys/conf/files user/attilio/vmcontention/sys/dev/aac/aac_cam.c user/attilio/vmcontention/sys/dev/advansys/advansys.c user/attilio/vmcontention/sys/dev/advansys/adwcam.c user/attilio/vmcontention/sys/dev/aha/aha.c user/attilio/vmcontention/sys/dev/ahb/ahb.c user/attilio/vmcontention/sys/dev/ahci/ahci.c user/attilio/vmcontention/sys/dev/aic/aic.c user/attilio/vmcontention/sys/dev/aic7xxx/aic79xx_osm.c user/attilio/vmcontention/sys/dev/aic7xxx/aic7xxx_osm.c user/attilio/vmcontention/sys/dev/amr/amr_cam.c user/attilio/vmcontention/sys/dev/arcmsr/arcmsr.c user/attilio/vmcontention/sys/dev/ata/ata-dma.c user/attilio/vmcontention/sys/dev/ata/atapi-cam.c user/attilio/vmcontention/sys/dev/ath/if_ath.c user/attilio/vmcontention/sys/dev/ath/if_ath_alq.c user/attilio/vmcontention/sys/dev/ath/if_ath_alq.h user/attilio/vmcontention/sys/dev/ath/if_ath_misc.h user/attilio/vmcontention/sys/dev/buslogic/bt.c user/attilio/vmcontention/sys/dev/ciss/ciss.c user/attilio/vmcontention/sys/dev/ciss/cissvar.h user/attilio/vmcontention/sys/dev/dpt/dpt_scsi.c user/attilio/vmcontention/sys/dev/firewire/sbp.c user/attilio/vmcontention/sys/dev/hpt27xx/osm_bsd.c user/attilio/vmcontention/sys/dev/hptiop/hptiop.c user/attilio/vmcontention/sys/dev/hptmv/entry.c user/attilio/vmcontention/sys/dev/hptrr/hptrr_osm_bsd.c user/attilio/vmcontention/sys/dev/iir/iir.c user/attilio/vmcontention/sys/dev/isci/isci_io_request.c user/attilio/vmcontention/sys/dev/isp/isp_pci.c user/attilio/vmcontention/sys/dev/isp/isp_sbus.c user/attilio/vmcontention/sys/dev/mfi/mfi.c user/attilio/vmcontention/sys/dev/mfi/mfi_cam.c user/attilio/vmcontention/sys/dev/mfi/mfivar.h user/attilio/vmcontention/sys/dev/mly/mly.c user/attilio/vmcontention/sys/dev/mly/mlyvar.h user/attilio/vmcontention/sys/dev/mps/mps.c user/attilio/vmcontention/sys/dev/mps/mps_sas.c user/attilio/vmcontention/sys/dev/mps/mpsvar.h user/attilio/vmcontention/sys/dev/mpt/mpt_cam.c user/attilio/vmcontention/sys/dev/mvs/mvs.c user/attilio/vmcontention/sys/dev/siis/siis.c user/attilio/vmcontention/sys/dev/sym/sym_hipd.c user/attilio/vmcontention/sys/dev/trm/trm.c user/attilio/vmcontention/sys/dev/twa/tw_osl.h user/attilio/vmcontention/sys/dev/twa/tw_osl_cam.c user/attilio/vmcontention/sys/dev/twa/tw_osl_freebsd.c user/attilio/vmcontention/sys/dev/tws/tws.h user/attilio/vmcontention/sys/dev/tws/tws_cam.c user/attilio/vmcontention/sys/dev/virtio/scsi/virtio_scsi.c user/attilio/vmcontention/sys/dev/wds/wd7000.c user/attilio/vmcontention/sys/ia64/ia64/busdma_machdep.c user/attilio/vmcontention/sys/ia64/ia64/dump_machdep.c user/attilio/vmcontention/sys/ia64/ia64/genassym.c user/attilio/vmcontention/sys/ia64/ia64/machdep.c user/attilio/vmcontention/sys/ia64/ia64/support.S user/attilio/vmcontention/sys/ia64/include/proc.h user/attilio/vmcontention/sys/kern/kern_sysctl.c user/attilio/vmcontention/sys/kern/subr_uio.c user/attilio/vmcontention/sys/mips/mips/busdma_machdep.c user/attilio/vmcontention/sys/net/if.c user/attilio/vmcontention/sys/net/if_var.h user/attilio/vmcontention/sys/net80211/ieee80211_freebsd.c user/attilio/vmcontention/sys/net80211/ieee80211_input.c user/attilio/vmcontention/sys/net80211/ieee80211_mesh.c user/attilio/vmcontention/sys/netinet/ip_carp.c user/attilio/vmcontention/sys/netinet/ip_carp.h user/attilio/vmcontention/sys/netinet/sctp_indata.c user/attilio/vmcontention/sys/netinet/sctp_output.c user/attilio/vmcontention/sys/netinet/sctp_pcb.c user/attilio/vmcontention/sys/netinet/sctp_pcb.h user/attilio/vmcontention/sys/netinet/sctp_usrreq.c user/attilio/vmcontention/sys/powerpc/powerpc/busdma_machdep.c user/attilio/vmcontention/sys/powerpc/ps3/ps3cdrom.c user/attilio/vmcontention/sys/powerpc/wii/wii_gpio.c user/attilio/vmcontention/sys/powerpc/wii/wii_ipc.c user/attilio/vmcontention/sys/powerpc/wii/wii_pic.c user/attilio/vmcontention/sys/security/audit/audit_private.h user/attilio/vmcontention/sys/sparc64/include/bus_dma.h user/attilio/vmcontention/sys/sparc64/sparc64/bus_machdep.c user/attilio/vmcontention/sys/sparc64/sparc64/iommu.c user/attilio/vmcontention/sys/sys/bus_dma.h user/attilio/vmcontention/sys/sys/uio.h user/attilio/vmcontention/sys/x86/x86/busdma_machdep.c user/attilio/vmcontention/tools/regression/sockets/unix_cmsg/README user/attilio/vmcontention/tools/regression/sockets/unix_cmsg/unix_cmsg.c user/attilio/vmcontention/tools/regression/sockets/unix_cmsg/unix_cmsg.t user/attilio/vmcontention/tools/tools/ath/athalq/ar5210_ds.c user/attilio/vmcontention/tools/tools/ath/athalq/ar5211_ds.c user/attilio/vmcontention/tools/tools/ath/athalq/ar5212_ds.c user/attilio/vmcontention/tools/tools/ath/athalq/ar5416_ds.c user/attilio/vmcontention/tools/tools/ath/athalq/main.c user/attilio/vmcontention/usr.bin/clang/bugpoint/Makefile user/attilio/vmcontention/usr.bin/clang/clang-tblgen/Makefile user/attilio/vmcontention/usr.bin/clang/llc/Makefile user/attilio/vmcontention/usr.bin/clang/lli/Makefile user/attilio/vmcontention/usr.bin/clang/llvm-ar/Makefile user/attilio/vmcontention/usr.bin/clang/llvm-as/Makefile user/attilio/vmcontention/usr.bin/clang/llvm-bcanalyzer/Makefile user/attilio/vmcontention/usr.bin/clang/llvm-diff/Makefile user/attilio/vmcontention/usr.bin/clang/llvm-dis/Makefile user/attilio/vmcontention/usr.bin/clang/llvm-extract/Makefile user/attilio/vmcontention/usr.bin/clang/llvm-link/Makefile user/attilio/vmcontention/usr.bin/clang/llvm-mc/Makefile user/attilio/vmcontention/usr.bin/clang/llvm-nm/Makefile user/attilio/vmcontention/usr.bin/clang/llvm-objdump/Makefile user/attilio/vmcontention/usr.bin/clang/llvm-prof/Makefile user/attilio/vmcontention/usr.bin/clang/llvm-ranlib/Makefile user/attilio/vmcontention/usr.bin/clang/llvm-rtdyld/Makefile user/attilio/vmcontention/usr.bin/clang/macho-dump/Makefile user/attilio/vmcontention/usr.bin/clang/opt/Makefile user/attilio/vmcontention/usr.bin/clang/tblgen/Makefile user/attilio/vmcontention/usr.bin/kdump/kdump.c user/attilio/vmcontention/usr.bin/kdump/mksubr user/attilio/vmcontention/usr.bin/procstat/procstat_files.c user/attilio/vmcontention/usr.sbin/bhyve/bhyverun.c user/attilio/vmcontention/usr.sbin/bhyvectl/bhyvectl.c Directory Properties: user/attilio/vmcontention/ (props changed) user/attilio/vmcontention/cddl/contrib/opensolaris/ (props changed) user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zfs/ (props changed) user/attilio/vmcontention/lib/libc/ (props changed) user/attilio/vmcontention/lib/libvmmapi/ (props changed) user/attilio/vmcontention/sys/ (props changed) user/attilio/vmcontention/sys/amd64/vmm/ (props changed) user/attilio/vmcontention/sys/boot/ (props changed) user/attilio/vmcontention/sys/cddl/contrib/opensolaris/ (props changed) user/attilio/vmcontention/sys/conf/ (props changed) user/attilio/vmcontention/usr.bin/procstat/ (props changed) user/attilio/vmcontention/usr.sbin/bhyve/ (props changed) user/attilio/vmcontention/usr.sbin/bhyvectl/ (props changed) Modified: user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zdb/zdb.c Wed Feb 13 01:19:31 2013 (r246726) +++ user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zdb/zdb.c Wed Feb 13 01:25:17 2013 (r246727) @@ -983,7 +983,7 @@ visit_indirect(spa_t *spa, const dnode_p arc_buf_t *buf; uint64_t fill = 0; - err = arc_read_nolock(NULL, spa, bp, arc_getbuf_func, &buf, + err = arc_read(NULL, spa, bp, arc_getbuf_func, &buf, ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, &flags, zb); if (err) return (err); @@ -2001,9 +2001,8 @@ zdb_count_block(zdb_cb_t *zcb, zilog_t * bp, NULL, NULL, ZIO_FLAG_CANFAIL)), ==, 0); } -/* ARGSUSED */ static int -zdb_blkptr_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, arc_buf_t *pbuf, +zdb_blkptr_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) { zdb_cb_t *zcb = arg; @@ -2410,7 +2409,7 @@ typedef struct zdb_ddt_entry { /* ARGSUSED */ static int zdb_ddt_add_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, - arc_buf_t *pbuf, const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) + const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) { avl_tree_t *t = arg; avl_index_t where; Modified: user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Wed Feb 13 01:19:31 2013 (r246726) +++ user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Wed Feb 13 01:25:17 2013 (r246727) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 10, 2012 +.Dd February 10, 2013 .Dt ZFS 8 .Os .Sh NAME Modified: user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 ============================================================================== --- user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Wed Feb 13 01:19:31 2013 (r246726) +++ user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Wed Feb 13 01:25:17 2013 (r246727) @@ -22,7 +22,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 8, 2012 +.Dd February 8, 2013 .Dt ZPOOL-FEATURES 7 .Os .Sh NAME Modified: user/attilio/vmcontention/kerberos5/libexec/digest-service/Makefile ============================================================================== --- user/attilio/vmcontention/kerberos5/libexec/digest-service/Makefile Wed Feb 13 01:19:31 2013 (r246726) +++ user/attilio/vmcontention/kerberos5/libexec/digest-service/Makefile Wed Feb 13 01:25:17 2013 (r246727) @@ -11,7 +11,7 @@ CFLAGS+= -I${KRB5DIR}/kdc \ DPADD= ${LIBHDB} ${LIBKDC} ${LIBHEIMIPCS} ${LIBKRB5} ${LIBROKEN} ${LIBASN1} ${LIBCRYPTO} \ ${LIBCRYPT} ${LIBVERS} LDADD= -lhdb -lkdc ${LIBHEIMIPCS} -lkrb5 -lroken -lasn1 -lcrypto -lcrypt \ - ${LIBVERS} + ${LIBVERS} -lheimntlm .include Modified: user/attilio/vmcontention/lib/clang/clang.build.mk ============================================================================== --- user/attilio/vmcontention/lib/clang/clang.build.mk Wed Feb 13 01:19:31 2013 (r246726) +++ user/attilio/vmcontention/lib/clang/clang.build.mk Wed Feb 13 01:25:17 2013 (r246727) @@ -19,7 +19,15 @@ CFLAGS+= -fno-strict-aliasing TARGET_ARCH?= ${MACHINE_ARCH} BUILD_ARCH?= ${MACHINE_ARCH} -TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-unknown-freebsd10.0 + +.if (${TARGET_ARCH} == "arm" || ${TARGET_ARCH} == "armv6") && \ + ${MK_ARM_EABI} != "no" +TARGET_ABI= gnueabi +.else +TARGET_ABI= unknown +.endif + +TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd10.0 BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/}-unknown-freebsd10.0 CFLAGS+= -DLLVM_DEFAULT_TARGET_TRIPLE=\"${TARGET_TRIPLE}\" \ -DLLVM_HOSTTRIPLE=\"${BUILD_TRIPLE}\" \ Modified: user/attilio/vmcontention/lib/libc/arm/aeabi/Makefile.inc ============================================================================== --- user/attilio/vmcontention/lib/libc/arm/aeabi/Makefile.inc Wed Feb 13 01:19:31 2013 (r246726) +++ user/attilio/vmcontention/lib/libc/arm/aeabi/Makefile.inc Wed Feb 13 01:25:17 2013 (r246727) @@ -7,5 +7,24 @@ SRCS+= aeabi_atexit.c \ aeabi_float.c \ aeabi_unwind_cpp.c +# Add the aeabi_mem* functions. While they live in compiler-rt they call into +# libc. This causes issues when other parts of libc call these functions. +# We work around this by including these functions in libc but mark them as +# hidden so users of libc will not pick up these versions. +.PATH: ${.CURDIR}/../../contrib/compiler-rt/lib/arm + +SRCS+= aeabi_memcmp.S \ + aeabi_memcpy.S \ + aeabi_memmove.S \ + aeabi_memset.S + +# Mark the functions as hidden so they are not available outside of libc. +CFLAGS.aeabi_memcmp.S= -DVISIBILITY_HIDDEN +CFLAGS.aeabi_memcpy.S= -DVISIBILITY_HIDDEN +CFLAGS.aeabi_memmove.S= -DVISIBILITY_HIDDEN +CFLAGS.aeabi_memset.S= -DVISIBILITY_HIDDEN +CFLAGS+= ${CFLAGS.${.IMPSRC:T}} + + SYM_MAPS+=${.CURDIR}/arm/aeabi/Symbol.map Modified: user/attilio/vmcontention/lib/libc/gen/fts.c ============================================================================== --- user/attilio/vmcontention/lib/libc/gen/fts.c Wed Feb 13 01:19:31 2013 (r246726) +++ user/attilio/vmcontention/lib/libc/gen/fts.c Wed Feb 13 01:25:17 2013 (r246727) @@ -1119,7 +1119,8 @@ fts_safe_changedir(FTS *sp, FTSENT *p, i newfd = fd; if (ISSET(FTS_NOCHDIR)) return (0); - if (fd < 0 && (newfd = _open(path, O_RDONLY | O_CLOEXEC, 0)) < 0) + if (fd < 0 && (newfd = _open(path, O_RDONLY | O_DIRECTORY | + O_CLOEXEC, 0)) < 0) return (-1); if (_fstat(newfd, &sb)) { ret = -1; Modified: user/attilio/vmcontention/lib/libvmmapi/vmmapi.c ============================================================================== --- user/attilio/vmcontention/lib/libvmmapi/vmmapi.c Wed Feb 13 01:19:31 2013 (r246726) +++ user/attilio/vmcontention/lib/libvmmapi/vmmapi.c Wed Feb 13 01:25:17 2013 (r246727) @@ -250,34 +250,6 @@ vm_get_register(struct vmctx *ctx, int v } int -vm_get_pinning(struct vmctx *ctx, int vcpu, int *host_cpuid) -{ - int error; - struct vm_pin vmpin; - - bzero(&vmpin, sizeof(vmpin)); - vmpin.vm_cpuid = vcpu; - - error = ioctl(ctx->fd, VM_GET_PINNING, &vmpin); - *host_cpuid = vmpin.host_cpuid; - return (error); -} - -int -vm_set_pinning(struct vmctx *ctx, int vcpu, int host_cpuid) -{ - int error; - struct vm_pin vmpin; - - bzero(&vmpin, sizeof(vmpin)); - vmpin.vm_cpuid = vcpu; - vmpin.host_cpuid = host_cpuid; - - error = ioctl(ctx->fd, VM_SET_PINNING, &vmpin); - return (error); -} - -int vm_run(struct vmctx *ctx, int vcpu, uint64_t rip, struct vm_exit *vmexit) { int error; Modified: user/attilio/vmcontention/lib/libvmmapi/vmmapi.h ============================================================================== --- user/attilio/vmcontention/lib/libvmmapi/vmmapi.h Wed Feb 13 01:19:31 2013 (r246726) +++ user/attilio/vmcontention/lib/libvmmapi/vmmapi.h Wed Feb 13 01:25:17 2013 (r246727) @@ -56,8 +56,6 @@ int vm_get_desc(struct vmctx *ctx, int v uint64_t *base, uint32_t *limit, uint32_t *access); int vm_set_register(struct vmctx *ctx, int vcpu, int reg, uint64_t val); int vm_get_register(struct vmctx *ctx, int vcpu, int reg, uint64_t *retval); -int vm_get_pinning(struct vmctx *ctx, int vcpu, int *host_cpuid); -int vm_set_pinning(struct vmctx *ctx, int vcpu, int host_cpuid); int vm_run(struct vmctx *ctx, int vcpu, uint64_t rip, struct vm_exit *ret_vmexit); int vm_apicid2vcpu(struct vmctx *ctx, int apicid); Modified: user/attilio/vmcontention/share/man/man9/vfs_busy.9 ============================================================================== --- user/attilio/vmcontention/share/man/man9/vfs_busy.9 Wed Feb 13 01:19:31 2013 (r246726) +++ user/attilio/vmcontention/share/man/man9/vfs_busy.9 Wed Feb 13 01:25:17 2013 (r246727) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 14, 2010 +.Dd February 11, 2013 .Dt VFS_BUSY 9 .Os .Sh NAME @@ -84,6 +84,8 @@ The mount point is being unmounted .Dv ( MNTK_UNMOUNT is set). .El +.Sh SEE ALSO +.Xr vfs_unbusy 9 .Sh AUTHORS This manual page was written by .An Chad David Aq davidc@acns.ab.ca . Modified: user/attilio/vmcontention/sys/amd64/include/vmm.h ============================================================================== --- user/attilio/vmcontention/sys/amd64/include/vmm.h Wed Feb 13 01:19:31 2013 (r246726) +++ user/attilio/vmcontention/sys/amd64/include/vmm.h Wed Feb 13 01:25:17 2013 (r246727) @@ -102,8 +102,6 @@ int vm_get_seg_desc(struct vm *vm, int v struct seg_desc *ret_desc); int vm_set_seg_desc(struct vm *vm, int vcpu, int reg, struct seg_desc *desc); -int vm_get_pinning(struct vm *vm, int vcpu, int *cpuid); -int vm_set_pinning(struct vm *vm, int vcpu, int cpuid); int vm_run(struct vm *vm, struct vm_run *vmrun); int vm_inject_event(struct vm *vm, int vcpu, int type, int vector, uint32_t error_code, int error_code_valid); Modified: user/attilio/vmcontention/sys/amd64/include/vmm_dev.h ============================================================================== --- user/attilio/vmcontention/sys/amd64/include/vmm_dev.h Wed Feb 13 01:19:31 2013 (r246726) +++ user/attilio/vmcontention/sys/amd64/include/vmm_dev.h Wed Feb 13 01:25:17 2013 (r246727) @@ -51,11 +51,6 @@ struct vm_seg_desc { /* data or code s struct seg_desc desc; }; -struct vm_pin { - int vm_cpuid; - int host_cpuid; /* -1 to unpin */ -}; - struct vm_run { int cpuid; uint64_t rip; /* start running here */ @@ -142,8 +137,6 @@ struct vm_x2apic { enum { IOCNUM_RUN, - IOCNUM_SET_PINNING, - IOCNUM_GET_PINNING, IOCNUM_MAP_MEMORY, IOCNUM_GET_MEMORY_SEG, IOCNUM_SET_REGISTER, @@ -168,10 +161,6 @@ enum { #define VM_RUN \ _IOWR('v', IOCNUM_RUN, struct vm_run) -#define VM_SET_PINNING \ - _IOW('v', IOCNUM_SET_PINNING, struct vm_pin) -#define VM_GET_PINNING \ - _IOWR('v', IOCNUM_GET_PINNING, struct vm_pin) #define VM_MAP_MEMORY \ _IOWR('v', IOCNUM_MAP_MEMORY, struct vm_memory_segment) #define VM_GET_MEMORY_SEG \ Modified: user/attilio/vmcontention/sys/amd64/vmm/io/ppt.c ============================================================================== --- user/attilio/vmcontention/sys/amd64/vmm/io/ppt.c Wed Feb 13 01:19:31 2013 (r246726) +++ user/attilio/vmcontention/sys/amd64/vmm/io/ppt.c Wed Feb 13 01:25:17 2013 (r246727) @@ -402,31 +402,6 @@ pptintr(void *arg) return (FILTER_HANDLED); } -/* - * XXX - * When we try to free the MSI resource the kernel will bind the thread to - * the host cpu was originally handling the MSI. The function freeing the - * MSI vector (apic_free_vector()) will panic the kernel if the thread - * is already bound to a cpu. - * - * So, we temporarily unbind the vcpu thread before freeing the MSI resource. - */ -static void -PPT_TEARDOWN_MSI(struct vm *vm, int vcpu, struct pptdev *ppt) -{ - int pincpu = -1; - - vm_get_pinning(vm, vcpu, &pincpu); - - if (pincpu >= 0) - vm_set_pinning(vm, vcpu, -1); - - ppt_teardown_msi(ppt); - - if (pincpu >= 0) - vm_set_pinning(vm, vcpu, pincpu); -} - int ppt_setup_msi(struct vm *vm, int vcpu, int bus, int slot, int func, int destcpu, int vector, int numvec) @@ -447,7 +422,7 @@ ppt_setup_msi(struct vm *vm, int vcpu, i return (EBUSY); /* Free any allocated resources */ - PPT_TEARDOWN_MSI(vm, vcpu, ppt); + ppt_teardown_msi(ppt); if (numvec == 0) /* nothing more to do */ return (0); @@ -513,7 +488,7 @@ ppt_setup_msi(struct vm *vm, int vcpu, i } if (i < numvec) { - PPT_TEARDOWN_MSI(vm, vcpu, ppt); + ppt_teardown_msi(ppt); return (ENXIO); } Modified: user/attilio/vmcontention/sys/amd64/vmm/vmm.c ============================================================================== --- user/attilio/vmcontention/sys/amd64/vmm/vmm.c Wed Feb 13 01:19:31 2013 (r246726) +++ user/attilio/vmcontention/sys/amd64/vmm/vmm.c Wed Feb 13 01:25:17 2013 (r246727) @@ -70,7 +70,6 @@ struct vcpu { int flags; enum vcpu_state state; struct mtx mtx; - int pincpu; /* host cpuid this vcpu is bound to */ int hostcpu; /* host cpuid this vcpu last ran on */ uint64_t guest_msrs[VMM_MSR_NUM]; struct vlapic *vlapic; @@ -81,18 +80,6 @@ struct vcpu { enum x2apic_state x2apic_state; int nmi_pending; }; -#define VCPU_F_PINNED 0x0001 - -#define VCPU_PINCPU(vm, vcpuid) \ - ((vm->vcpu[vcpuid].flags & VCPU_F_PINNED) ? vm->vcpu[vcpuid].pincpu : -1) - -#define VCPU_UNPIN(vm, vcpuid) (vm->vcpu[vcpuid].flags &= ~VCPU_F_PINNED) - -#define VCPU_PIN(vm, vcpuid, host_cpuid) \ -do { \ - vm->vcpu[vcpuid].flags |= VCPU_F_PINNED; \ - vm->vcpu[vcpuid].pincpu = host_cpuid; \ -} while(0) #define vcpu_lock_init(v) mtx_init(&((v)->mtx), "vcpu lock", 0, MTX_SPIN) #define vcpu_lock(v) mtx_lock_spin(&((v)->mtx)) @@ -594,52 +581,6 @@ vm_set_seg_desc(struct vm *vm, int vcpu, return (VMSETDESC(vm->cookie, vcpu, reg, desc)); } -int -vm_get_pinning(struct vm *vm, int vcpuid, int *cpuid) -{ - - if (vcpuid < 0 || vcpuid >= VM_MAXCPU) - return (EINVAL); - - *cpuid = VCPU_PINCPU(vm, vcpuid); - - return (0); -} - -int -vm_set_pinning(struct vm *vm, int vcpuid, int host_cpuid) -{ - struct thread *td; - - if (vcpuid < 0 || vcpuid >= VM_MAXCPU) - return (EINVAL); - - td = curthread; /* XXXSMP only safe when muxing vcpus */ - - /* unpin */ - if (host_cpuid < 0) { - VCPU_UNPIN(vm, vcpuid); - thread_lock(td); - sched_unbind(td); - thread_unlock(td); - return (0); - } - - if (CPU_ABSENT(host_cpuid)) - return (EINVAL); - - /* - * XXX we should check that 'host_cpuid' has not already been pinned - * by another vm. - */ - thread_lock(td); - sched_bind(td, host_cpuid); - thread_unlock(td); - VCPU_PIN(vm, vcpuid, host_cpuid); - - return (0); -} - static void restore_guest_fpustate(struct vcpu *vcpu) { Modified: user/attilio/vmcontention/sys/amd64/vmm/vmm_dev.c ============================================================================== --- user/attilio/vmcontention/sys/amd64/vmm/vmm_dev.c Wed Feb 13 01:19:31 2013 (r246726) +++ user/attilio/vmcontention/sys/amd64/vmm/vmm_dev.c Wed Feb 13 01:25:17 2013 (r246727) @@ -144,7 +144,6 @@ vmmdev_ioctl(struct cdev *cdev, u_long c struct vm_memory_segment *seg; struct vm_register *vmreg; struct vm_seg_desc* vmsegdesc; - struct vm_pin *vmpin; struct vm_run *vmrun; struct vm_event *vmevent; struct vm_lapic_irq *vmirq; @@ -170,7 +169,6 @@ vmmdev_ioctl(struct cdev *cdev, u_long c */ switch (cmd) { case VM_RUN: - case VM_SET_PINNING: case VM_GET_REGISTER: case VM_SET_REGISTER: case VM_GET_SEGMENT_DESCRIPTOR: @@ -301,16 +299,6 @@ vmmdev_ioctl(struct cdev *cdev, u_long c vmirq = (struct vm_lapic_irq *)data; error = lapic_set_intr(sc->vm, vmirq->cpuid, vmirq->vector); break; - case VM_SET_PINNING: - vmpin = (struct vm_pin *)data; - error = vm_set_pinning(sc->vm, vmpin->vm_cpuid, - vmpin->host_cpuid); - break; - case VM_GET_PINNING: - vmpin = (struct vm_pin *)data; - error = vm_get_pinning(sc->vm, vmpin->vm_cpuid, - &vmpin->host_cpuid); - break; case VM_MAP_MEMORY: seg = (struct vm_memory_segment *)data; error = vm_malloc(sc->vm, seg->gpa, seg->len); Modified: user/attilio/vmcontention/sys/arm/allwinner/a10_machdep.c ============================================================================== --- user/attilio/vmcontention/sys/arm/allwinner/a10_machdep.c Wed Feb 13 01:19:31 2013 (r246726) +++ user/attilio/vmcontention/sys/arm/allwinner/a10_machdep.c Wed Feb 13 01:25:17 2013 (r246727) @@ -49,16 +49,16 @@ __FBSDID("$FreeBSD$"); #include +#include + /* Start of address space used for bootstrap map */ #define DEVMAP_BOOTSTRAP_MAP_START 0xE0000000 -void (*a10_cpu_reset)(void); vm_offset_t initarm_lastaddr(void) { - a10_cpu_reset = NULL; return (DEVMAP_BOOTSTRAP_MAP_START - ARM_NOCACHE_KVA_SIZE); } @@ -113,10 +113,7 @@ bus_dma_get_range_nb(void) void cpu_reset() { - if (a10_cpu_reset) - (*a10_cpu_reset)(); - else - printf("no cpu_reset implementation\n"); + a10wd_watchdog_reset(); printf("Reset failed!\n"); while (1); } Copied: user/attilio/vmcontention/sys/arm/allwinner/a10_wdog.c (from r246726, head/sys/arm/allwinner/a10_wdog.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/attilio/vmcontention/sys/arm/allwinner/a10_wdog.c Wed Feb 13 01:25:17 2013 (r246727, copy of r246726, head/sys/arm/allwinner/a10_wdog.c) @@ -0,0 +1,193 @@ +/*- + * Copyright (c) 2013 Oleksandr Tymoshenko + * 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. + */ +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +#define READ(_sc, _r) bus_read_4((_sc)->res, (_r)) +#define WRITE(_sc, _r, _v) bus_write_4((_sc)->res, (_r), (_v)) + +#define WDOG_CTRL 0x00 +#define WDOG_CTRL_RESTART (1 << 0) +#define WDOG_MODE 0x04 +#define WDOG_MODE_INTVL_SHIFT 3 +#define WDOG_MODE_RST_EN (1 << 1) +#define WDOG_MODE_EN (1 << 0) + +struct a10wd_interval { + uint64_t milliseconds; + unsigned int value; +}; + +struct a10wd_interval wd_intervals[] = { + { 500, 0 }, + { 1000, 1 }, + { 2000, 2 }, + { 3000, 3 }, + { 4000, 4 }, + { 5000, 5 }, + { 6000, 6 }, + { 8000, 7 }, + { 10000, 8 }, + { 12000, 9 }, + { 14000, 10 }, + { 16000, 11 }, + { 0, 0 } /* sentinel */ +}; + +static struct a10wd_softc *a10wd_sc = NULL; + +struct a10wd_softc { + device_t dev; + struct resource * res; + struct mtx mtx; +}; + +static void a10wd_watchdog_fn(void *private, u_int cmd, int *error); + +static int +a10wd_probe(device_t dev) +{ + + if (ofw_bus_is_compatible(dev, "allwinner,sun4i-wdt")) { + device_set_desc(dev, "Allwinner A10 Watchdog"); + return (BUS_PROBE_DEFAULT); + } + + return (ENXIO); +} + +static int +a10wd_attach(device_t dev) +{ + struct a10wd_softc *sc; + int rid; + + if (a10wd_sc != NULL) + return (ENXIO); + + sc = device_get_softc(dev); + sc->dev = dev; + + rid = 0; + sc->res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); + if (sc->res == NULL) { + device_printf(dev, "could not allocate memory resource\n"); + return (ENXIO); + } + + a10wd_sc = sc; + mtx_init(&sc->mtx, "A10 Watchdog", "a10wd", MTX_DEF); + EVENTHANDLER_REGISTER(watchdog_list, a10wd_watchdog_fn, sc, 0); + + return (0); +} + +static void +a10wd_watchdog_fn(void *private, u_int cmd, int *error) +{ + struct a10wd_softc *sc; + uint64_t ms; + int i; + + sc = private; + mtx_lock(&sc->mtx); + + cmd &= WD_INTERVAL; + + if (cmd > 0) { + ms = ((uint64_t)1 << (cmd & WD_INTERVAL)) / 1000000; + i = 0; + while (wd_intervals[i].milliseconds && + (ms > wd_intervals[i].milliseconds)) + i++; + if (wd_intervals[i].milliseconds) { + WRITE(sc, WDOG_MODE, + (wd_intervals[i].value << WDOG_MODE_INTVL_SHIFT) | + WDOG_MODE_EN | WDOG_MODE_RST_EN); + WRITE(sc, WDOG_CTRL, WDOG_CTRL_RESTART); + } + } + else + WRITE(sc, WDOG_MODE, 0); + + mtx_unlock(&sc->mtx); +} + +void +a10wd_watchdog_reset() +{ + + if (a10wd_sc == NULL) { + printf("Reset: watchdog device has not been initialized\n"); + return; + } + + WRITE(a10wd_sc, WDOG_MODE, + (wd_intervals[0].value << WDOG_MODE_INTVL_SHIFT) | + WDOG_MODE_EN | WDOG_MODE_RST_EN); + + while(1) + ; + +} + +static device_method_t a10wd_methods[] = { + DEVMETHOD(device_probe, a10wd_probe), + DEVMETHOD(device_attach, a10wd_attach), + + DEVMETHOD_END +}; + +static driver_t a10wd_driver = { + "a10wd", + a10wd_methods, + sizeof(struct a10wd_softc), +}; +static devclass_t a10wd_devclass; + +DRIVER_MODULE(a10wd, simplebus, a10wd_driver, a10wd_devclass, 0, 0); Copied: user/attilio/vmcontention/sys/arm/allwinner/a10_wdog.h (from r246726, head/sys/arm/allwinner/a10_wdog.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/attilio/vmcontention/sys/arm/allwinner/a10_wdog.h Wed Feb 13 01:25:17 2013 (r246727, copy of r246726, head/sys/arm/allwinner/a10_wdog.h) @@ -0,0 +1,35 @@ +/*- + * Copyright (c) 2013 Oleksandr Tymoshenko + * 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. + * + * $FreeBSD$ + * + */ +#ifndef __A10_WDOG_H__ +#define __A10_WDOG_H__ + +void a10wd_watchdog_reset(void); + +#endif /*__A10_WDOG_H__*/ + Modified: user/attilio/vmcontention/sys/arm/allwinner/files.a10 ============================================================================== --- user/attilio/vmcontention/sys/arm/allwinner/files.a10 Wed Feb 13 01:19:31 2013 (r246726) +++ user/attilio/vmcontention/sys/arm/allwinner/files.a10 Wed Feb 13 01:25:17 2013 (r246727) @@ -12,6 +12,7 @@ arm/arm/irq_dispatch.S standard arm/allwinner/a10_clk.c standard arm/allwinner/a10_gpio.c optional gpio arm/allwinner/a10_ehci.c optional ehci +arm/allwinner/a10_wdog.c standard arm/allwinner/timer.c standard arm/allwinner/aintc.c standard arm/allwinner/bus_space.c standard Modified: user/attilio/vmcontention/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- user/attilio/vmcontention/sys/arm/arm/busdma_machdep-v6.c Wed Feb 13 01:19:31 2013 (r246726) +++ user/attilio/vmcontention/sys/arm/arm/busdma_machdep-v6.c Wed Feb 13 01:25:17 2013 (r246727) @@ -46,11 +46,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include -#include -#include #include +#include #include #include @@ -111,6 +111,7 @@ struct bounce_page { vm_offset_t vaddr; /* kva of bounce buffer */ bus_addr_t busaddr; /* Physical address */ vm_offset_t datavaddr; /* kva of client data */ + bus_addr_t dataaddr; /* client physical address */ bus_size_t datacount; /* client data count */ STAILQ_ENTRY(bounce_page) links; }; @@ -119,7 +120,6 @@ struct sync_list { vm_offset_t vaddr; /* kva of bounce buffer */ bus_addr_t busaddr; /* Physical address */ bus_size_t datacount; /* client data count */ - STAILQ_ENTRY(sync_list) slinks; }; int busdma_swi_pending; @@ -156,15 +156,15 @@ struct bus_dmamap { int pagesneeded; int pagesreserved; bus_dma_tag_t dmat; - void *buf; /* unmapped buffer pointer */ - bus_size_t buflen; /* unmapped buffer length */ + struct memdesc mem; pmap_t pmap; bus_dmamap_callback_t *callback; void *callback_arg; int flags; #define DMAMAP_COHERENT (1 << 0) STAILQ_ENTRY(bus_dmamap) links; - STAILQ_HEAD(,sync_list) slist; + int sync_count; + struct sync_list slist[]; }; static STAILQ_HEAD(, bus_dmamap) bounce_map_waitinglist; @@ -176,11 +176,16 @@ static int alloc_bounce_pages(bus_dma_ta static int reserve_bounce_pages(bus_dma_tag_t dmat, bus_dmamap_t map, int commit); static bus_addr_t add_bounce_page(bus_dma_tag_t dmat, bus_dmamap_t map, - vm_offset_t vaddr, bus_size_t size); + vm_offset_t vaddr, bus_addr_t addr, + bus_size_t size); static void free_bounce_page(bus_dma_tag_t dmat, struct bounce_page *bpage); int run_filter(bus_dma_tag_t dmat, bus_addr_t paddr); -static int _bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap_t map, +static void _bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf, bus_size_t buflen, int flags); +static void _bus_dmamap_count_phys(bus_dma_tag_t dmat, bus_dmamap_t map, + vm_paddr_t buf, bus_size_t buflen, int flags); +static int _bus_dmamap_reserve_pages(bus_dma_tag_t dmat, bus_dmamap_t map, + int flags); static busdma_bufalloc_t coherent_allocator; /* Cache of coherent buffers */ static busdma_bufalloc_t standard_allocator; /* Cache of standard buffers */ @@ -493,17 +498,18 @@ out: int bus_dmamap_create(bus_dma_tag_t dmat, int flags, bus_dmamap_t *mapp) { + int mapsize; int error; error = 0; - *mapp = (bus_dmamap_t)malloc(sizeof(**mapp), M_DEVBUF, - M_NOWAIT | M_ZERO); + mapsize = sizeof(**mapp) + (sizeof(struct sync_list) * dmat->nsegments); + *mapp = (bus_dmamap_t)malloc(mapsize, M_DEVBUF, M_NOWAIT | M_ZERO); if (*mapp == NULL) { CTR3(KTR_BUSDMA, "%s: tag %p error %d", __func__, dmat, ENOMEM); return (ENOMEM); } - STAILQ_INIT(&((*mapp)->slist)); + (*mapp)->sync_count = 0; if (dmat->segments == NULL) { dmat->segments = (bus_dma_segment_t *)malloc( @@ -578,8 +584,7 @@ bus_dmamap_create(bus_dma_tag_t dmat, in int bus_dmamap_destroy(bus_dma_tag_t dmat, bus_dmamap_t map) { - if (STAILQ_FIRST(&map->bpages) != NULL || - STAILQ_FIRST(&map->slist) != NULL) { + if (STAILQ_FIRST(&map->bpages) != NULL || map->sync_count != 0) { CTR3(KTR_BUSDMA, "%s: tag %p error %d", __func__, dmat, EBUSY); return (EBUSY); @@ -606,6 +611,7 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi struct busdma_bufzone *bufzone; vm_memattr_t memattr; int mflags; + int mapsize; if (flags & BUS_DMA_NOWAIT) mflags = M_NOWAIT; @@ -614,15 +620,15 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi /* ARM non-snooping caches need a map for the VA cache sync structure */ - *mapp = (bus_dmamap_t)malloc(sizeof(**mapp), M_DEVBUF, - M_NOWAIT | M_ZERO); + mapsize = sizeof(**mapp) + (sizeof(struct sync_list) * dmat->nsegments); + *mapp = (bus_dmamap_t)malloc(mapsize, M_DEVBUF, M_NOWAIT | M_ZERO); if (*mapp == NULL) { CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d", __func__, dmat, dmat->flags, ENOMEM); return (ENOMEM); } - STAILQ_INIT(&((*mapp)->slist)); + (*mapp)->sync_count = 0; if (dmat->segments == NULL) { dmat->segments = (bus_dma_segment_t *)malloc( @@ -733,7 +739,37 @@ bus_dmamem_free(bus_dma_tag_t dmat, void CTR3(KTR_BUSDMA, "%s: tag %p flags 0x%x", __func__, dmat, dmat->flags); } -static int +static void +_bus_dmamap_count_phys(bus_dma_tag_t dmat, bus_dmamap_t map, vm_paddr_t buf, + bus_size_t buflen, int flags) +{ + bus_addr_t curaddr; + bus_size_t sgsize; + + if (map->pagesneeded == 0) { + CTR5(KTR_BUSDMA, "lowaddr= %d, boundary= %d, alignment= %d" + " map= %p, pagesneeded= %d", + dmat->lowaddr, dmat->boundary, dmat->alignment, + map, map->pagesneeded); + /* + * Count the number of bounce pages + * needed in order to complete this transfer + */ + curaddr = buf; + while (buflen != 0) { + sgsize = MIN(buflen, dmat->maxsegsz); + if (run_filter(dmat, curaddr) != 0) { + sgsize = MIN(sgsize, PAGE_SIZE); + map->pagesneeded++; + } + curaddr += sgsize; + buflen -= sgsize; + } + CTR1(KTR_BUSDMA, "pagesneeded= %d", map->pagesneeded); + } +} + +static void _bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf, bus_size_t buflen, int flags) { @@ -754,12 +790,11 @@ _bus_dmamap_count_pages(bus_dma_tag_t dm vendaddr = (vm_offset_t)buf + buflen; while (vaddr < vendaddr) { - if (__predict_true(map->pmap == pmap_kernel())) + if (__predict_true(map->pmap == kernel_pmap)) paddr = pmap_kextract(vaddr); else paddr = pmap_extract(map->pmap, vaddr); - if (((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0) && - run_filter(dmat, paddr) != 0) { + if (run_filter(dmat, paddr) != 0) { map->pagesneeded++; } vaddr += (PAGE_SIZE - ((vm_offset_t)vaddr & PAGE_MASK)); @@ -767,72 +802,190 @@ _bus_dmamap_count_pages(bus_dma_tag_t dm } CTR1(KTR_BUSDMA, "pagesneeded= %d", map->pagesneeded); } +} + +static int +_bus_dmamap_reserve_pages(bus_dma_tag_t dmat, bus_dmamap_t map, int flags) +{ /* Reserve Necessary Bounce Pages */ - if (map->pagesneeded != 0) { - mtx_lock(&bounce_lock); - if (flags & BUS_DMA_NOWAIT) { - if (reserve_bounce_pages(dmat, map, 0) != 0) { - map->pagesneeded = 0; - mtx_unlock(&bounce_lock); - return (ENOMEM); - } - } else { - if (reserve_bounce_pages(dmat, map, 1) != 0) { - /* Queue us for resources */ - map->dmat = dmat; - map->buf = buf; - map->buflen = buflen; - STAILQ_INSERT_TAIL(&bounce_map_waitinglist, - map, links); - mtx_unlock(&bounce_lock); - return (EINPROGRESS); - } + mtx_lock(&bounce_lock); + if (flags & BUS_DMA_NOWAIT) { + if (reserve_bounce_pages(dmat, map, 0) != 0) { + map->pagesneeded = 0; + mtx_unlock(&bounce_lock); + return (ENOMEM); + } + } else { + if (reserve_bounce_pages(dmat, map, 1) != 0) { + /* Queue us for resources */ + STAILQ_INSERT_TAIL(&bounce_map_waitinglist, map, links); + mtx_unlock(&bounce_lock); + return (EINPROGRESS); } - mtx_unlock(&bounce_lock); } + mtx_unlock(&bounce_lock); return (0); } /* - * Utility function to load a linear buffer. lastaddrp holds state - * between invocations (for multiple-buffer loads). segp contains + * Add a single contiguous physical range to the segment list. + */ +static int +_bus_dmamap_addseg(bus_dma_tag_t dmat, bus_dmamap_t map, bus_addr_t curaddr, + bus_size_t sgsize, bus_dma_segment_t *segs, int *segp) +{ + bus_addr_t baddr, bmask; + int seg; + + /* + * Make sure we don't cross any boundaries. + */ + bmask = ~(dmat->boundary - 1); + if (dmat->boundary > 0) { + baddr = (curaddr + dmat->boundary) & bmask; + if (sgsize > (baddr - curaddr)) + sgsize = (baddr - curaddr); + } + + if (dmat->ranges) { + struct arm32_dma_range *dr; + + dr = _bus_dma_inrange(dmat->ranges, dmat->_nranges, + curaddr); + if (dr == NULL) { + _bus_dmamap_unload(dmat, map); + return (EINVAL); + } + /* + * In a valid DMA range. Translate the physical + * memory address to an address in the DMA window. + */ + curaddr = (curaddr - dr->dr_sysbase) + dr->dr_busbase; + } + + /* + * Insert chunk into a segment, coalescing with + * previous segment if possible. + */ + seg = *segp; + if (seg == -1) { + seg = 0; + segs[seg].ds_addr = curaddr; + segs[seg].ds_len = sgsize; + } else { + if (curaddr == segs[seg].ds_addr + segs[seg].ds_len && + (segs[seg].ds_len + sgsize) <= dmat->maxsegsz && + (dmat->boundary == 0 || + (segs[seg].ds_addr & bmask) == (curaddr & bmask))) + segs[seg].ds_len += sgsize; + else { + if (++seg >= dmat->nsegments) + return (0); + segs[seg].ds_addr = curaddr; + segs[seg].ds_len = sgsize; + } + } + *segp = seg; + return (sgsize); +} + +/* + * Utility function to load a physical buffer. segp contains * the starting segment on entrace, and the ending segment on exit. - * first indicates if this is the first invocation of this function. */ -static __inline int +int +_bus_dmamap_load_phys(bus_dma_tag_t dmat, + bus_dmamap_t map, + vm_paddr_t buf, bus_size_t buflen, + int flags, + bus_dma_segment_t *segs, + int *segp) +{ + bus_addr_t curaddr; + bus_size_t sgsize; + int error; + + if (segs == NULL) + segs = dmat->segments; + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Wed Feb 13 01:30:39 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id EE9CA888; Wed, 13 Feb 2013 01:30:39 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D216A11C; Wed, 13 Feb 2013 01:30:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1D1Udiv064384; Wed, 13 Feb 2013 01:30:39 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1D1UZxJ064354; Wed, 13 Feb 2013 01:30:35 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201302130130.r1D1UZxJ064354@svn.freebsd.org> From: Attilio Rao Date: Wed, 13 Feb 2013 01:30:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r246728 - in user/attilio/vmc-playground: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd/zpool kerberos5/libexec/digest-service lib/clang... X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Feb 2013 01:30:40 -0000 Author: attilio Date: Wed Feb 13 01:30:35 2013 New Revision: 246728 URL: http://svnweb.freebsd.org/changeset/base/246728 Log: Merge from vmcontention Added: user/attilio/vmc-playground/sys/arm/allwinner/a10_wdog.c - copied unchanged from r246727, user/attilio/vmcontention/sys/arm/allwinner/a10_wdog.c user/attilio/vmc-playground/sys/arm/allwinner/a10_wdog.h - copied unchanged from r246727, user/attilio/vmcontention/sys/arm/allwinner/a10_wdog.h user/attilio/vmc-playground/sys/boot/fdt/help.fdt - copied unchanged from r246727, user/attilio/vmcontention/sys/boot/fdt/help.fdt user/attilio/vmc-playground/sys/kern/subr_bus_dma.c - copied unchanged from r246727, user/attilio/vmcontention/sys/kern/subr_bus_dma.c user/attilio/vmc-playground/sys/sys/memdesc.h - copied unchanged from r246727, user/attilio/vmcontention/sys/sys/memdesc.h Modified: user/attilio/vmc-playground/cddl/contrib/opensolaris/cmd/zdb/zdb.c user/attilio/vmc-playground/cddl/contrib/opensolaris/cmd/zfs/zfs.8 user/attilio/vmc-playground/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 user/attilio/vmc-playground/kerberos5/libexec/digest-service/Makefile user/attilio/vmc-playground/lib/clang/clang.build.mk user/attilio/vmc-playground/lib/libc/arm/aeabi/Makefile.inc user/attilio/vmc-playground/lib/libc/gen/fts.c user/attilio/vmc-playground/lib/libvmmapi/vmmapi.c user/attilio/vmc-playground/lib/libvmmapi/vmmapi.h user/attilio/vmc-playground/share/man/man9/vfs_busy.9 user/attilio/vmc-playground/sys/amd64/include/vmm.h (contents, props changed) user/attilio/vmc-playground/sys/amd64/include/vmm_dev.h (contents, props changed) user/attilio/vmc-playground/sys/amd64/vmm/io/ppt.c user/attilio/vmc-playground/sys/amd64/vmm/vmm.c user/attilio/vmc-playground/sys/amd64/vmm/vmm_dev.c user/attilio/vmc-playground/sys/arm/allwinner/a10_machdep.c user/attilio/vmc-playground/sys/arm/allwinner/files.a10 user/attilio/vmc-playground/sys/arm/arm/busdma_machdep-v6.c user/attilio/vmc-playground/sys/arm/arm/busdma_machdep.c user/attilio/vmc-playground/sys/boot/arm/uboot/Makefile user/attilio/vmc-playground/sys/boot/fdt/dts/cubieboard.dts user/attilio/vmc-playground/sys/boot/powerpc/ps3/Makefile user/attilio/vmc-playground/sys/boot/powerpc/uboot/Makefile user/attilio/vmc-playground/sys/bsm/audit_kevents.h user/attilio/vmc-playground/sys/cam/cam_ccb.h user/attilio/vmc-playground/sys/cam/cam_xpt.c user/attilio/vmc-playground/sys/cam/ctl/ctl_frontend_cam_sim.c user/attilio/vmc-playground/sys/cam/ctl/scsi_ctl.c user/attilio/vmc-playground/sys/cam/scsi/scsi_pass.c user/attilio/vmc-playground/sys/cam/scsi/scsi_target.c user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_diff.c user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_traverse.h user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/refcount.h user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c user/attilio/vmc-playground/sys/conf/files user/attilio/vmc-playground/sys/dev/aac/aac_cam.c user/attilio/vmc-playground/sys/dev/advansys/advansys.c user/attilio/vmc-playground/sys/dev/advansys/adwcam.c user/attilio/vmc-playground/sys/dev/aha/aha.c user/attilio/vmc-playground/sys/dev/ahb/ahb.c user/attilio/vmc-playground/sys/dev/ahci/ahci.c user/attilio/vmc-playground/sys/dev/aic/aic.c user/attilio/vmc-playground/sys/dev/aic7xxx/aic79xx_osm.c user/attilio/vmc-playground/sys/dev/aic7xxx/aic7xxx_osm.c user/attilio/vmc-playground/sys/dev/amr/amr_cam.c user/attilio/vmc-playground/sys/dev/arcmsr/arcmsr.c user/attilio/vmc-playground/sys/dev/ata/ata-dma.c user/attilio/vmc-playground/sys/dev/ata/atapi-cam.c user/attilio/vmc-playground/sys/dev/ath/if_ath.c user/attilio/vmc-playground/sys/dev/ath/if_ath_alq.c user/attilio/vmc-playground/sys/dev/ath/if_ath_alq.h user/attilio/vmc-playground/sys/dev/ath/if_ath_misc.h user/attilio/vmc-playground/sys/dev/buslogic/bt.c user/attilio/vmc-playground/sys/dev/ciss/ciss.c user/attilio/vmc-playground/sys/dev/ciss/cissvar.h user/attilio/vmc-playground/sys/dev/dpt/dpt_scsi.c user/attilio/vmc-playground/sys/dev/firewire/sbp.c user/attilio/vmc-playground/sys/dev/hpt27xx/osm_bsd.c user/attilio/vmc-playground/sys/dev/hptiop/hptiop.c user/attilio/vmc-playground/sys/dev/hptmv/entry.c user/attilio/vmc-playground/sys/dev/hptrr/hptrr_osm_bsd.c user/attilio/vmc-playground/sys/dev/iir/iir.c user/attilio/vmc-playground/sys/dev/isci/isci_io_request.c user/attilio/vmc-playground/sys/dev/isp/isp_pci.c user/attilio/vmc-playground/sys/dev/isp/isp_sbus.c user/attilio/vmc-playground/sys/dev/mfi/mfi.c user/attilio/vmc-playground/sys/dev/mfi/mfi_cam.c user/attilio/vmc-playground/sys/dev/mfi/mfivar.h user/attilio/vmc-playground/sys/dev/mly/mly.c user/attilio/vmc-playground/sys/dev/mly/mlyvar.h user/attilio/vmc-playground/sys/dev/mps/mps.c user/attilio/vmc-playground/sys/dev/mps/mps_sas.c user/attilio/vmc-playground/sys/dev/mps/mpsvar.h user/attilio/vmc-playground/sys/dev/mpt/mpt_cam.c user/attilio/vmc-playground/sys/dev/mvs/mvs.c user/attilio/vmc-playground/sys/dev/siis/siis.c user/attilio/vmc-playground/sys/dev/sym/sym_hipd.c user/attilio/vmc-playground/sys/dev/trm/trm.c user/attilio/vmc-playground/sys/dev/twa/tw_osl.h user/attilio/vmc-playground/sys/dev/twa/tw_osl_cam.c user/attilio/vmc-playground/sys/dev/twa/tw_osl_freebsd.c user/attilio/vmc-playground/sys/dev/tws/tws.h user/attilio/vmc-playground/sys/dev/tws/tws_cam.c user/attilio/vmc-playground/sys/dev/virtio/scsi/virtio_scsi.c user/attilio/vmc-playground/sys/dev/wds/wd7000.c user/attilio/vmc-playground/sys/ia64/ia64/busdma_machdep.c user/attilio/vmc-playground/sys/ia64/ia64/dump_machdep.c user/attilio/vmc-playground/sys/ia64/ia64/genassym.c user/attilio/vmc-playground/sys/ia64/ia64/machdep.c user/attilio/vmc-playground/sys/ia64/ia64/support.S user/attilio/vmc-playground/sys/ia64/include/proc.h user/attilio/vmc-playground/sys/kern/kern_sysctl.c user/attilio/vmc-playground/sys/kern/subr_uio.c user/attilio/vmc-playground/sys/mips/mips/busdma_machdep.c user/attilio/vmc-playground/sys/net/if.c user/attilio/vmc-playground/sys/net/if_var.h user/attilio/vmc-playground/sys/net80211/ieee80211_freebsd.c user/attilio/vmc-playground/sys/net80211/ieee80211_input.c user/attilio/vmc-playground/sys/net80211/ieee80211_mesh.c user/attilio/vmc-playground/sys/netinet/ip_carp.c user/attilio/vmc-playground/sys/netinet/ip_carp.h user/attilio/vmc-playground/sys/netinet/sctp_indata.c user/attilio/vmc-playground/sys/netinet/sctp_output.c user/attilio/vmc-playground/sys/netinet/sctp_pcb.c user/attilio/vmc-playground/sys/netinet/sctp_pcb.h user/attilio/vmc-playground/sys/netinet/sctp_usrreq.c user/attilio/vmc-playground/sys/powerpc/powerpc/busdma_machdep.c user/attilio/vmc-playground/sys/powerpc/ps3/ps3cdrom.c user/attilio/vmc-playground/sys/powerpc/wii/wii_gpio.c user/attilio/vmc-playground/sys/powerpc/wii/wii_ipc.c user/attilio/vmc-playground/sys/powerpc/wii/wii_pic.c user/attilio/vmc-playground/sys/security/audit/audit_private.h user/attilio/vmc-playground/sys/sparc64/include/bus_dma.h user/attilio/vmc-playground/sys/sparc64/sparc64/bus_machdep.c user/attilio/vmc-playground/sys/sparc64/sparc64/iommu.c user/attilio/vmc-playground/sys/sys/bus_dma.h user/attilio/vmc-playground/sys/sys/uio.h user/attilio/vmc-playground/sys/x86/x86/busdma_machdep.c user/attilio/vmc-playground/tools/regression/sockets/unix_cmsg/README user/attilio/vmc-playground/tools/regression/sockets/unix_cmsg/unix_cmsg.c user/attilio/vmc-playground/tools/regression/sockets/unix_cmsg/unix_cmsg.t user/attilio/vmc-playground/tools/tools/ath/athalq/ar5210_ds.c user/attilio/vmc-playground/tools/tools/ath/athalq/ar5211_ds.c user/attilio/vmc-playground/tools/tools/ath/athalq/ar5212_ds.c user/attilio/vmc-playground/tools/tools/ath/athalq/ar5416_ds.c user/attilio/vmc-playground/tools/tools/ath/athalq/main.c user/attilio/vmc-playground/usr.bin/clang/bugpoint/Makefile user/attilio/vmc-playground/usr.bin/clang/clang-tblgen/Makefile user/attilio/vmc-playground/usr.bin/clang/llc/Makefile user/attilio/vmc-playground/usr.bin/clang/lli/Makefile user/attilio/vmc-playground/usr.bin/clang/llvm-ar/Makefile user/attilio/vmc-playground/usr.bin/clang/llvm-as/Makefile user/attilio/vmc-playground/usr.bin/clang/llvm-bcanalyzer/Makefile user/attilio/vmc-playground/usr.bin/clang/llvm-diff/Makefile user/attilio/vmc-playground/usr.bin/clang/llvm-dis/Makefile user/attilio/vmc-playground/usr.bin/clang/llvm-extract/Makefile user/attilio/vmc-playground/usr.bin/clang/llvm-link/Makefile user/attilio/vmc-playground/usr.bin/clang/llvm-mc/Makefile user/attilio/vmc-playground/usr.bin/clang/llvm-nm/Makefile user/attilio/vmc-playground/usr.bin/clang/llvm-objdump/Makefile user/attilio/vmc-playground/usr.bin/clang/llvm-prof/Makefile user/attilio/vmc-playground/usr.bin/clang/llvm-ranlib/Makefile user/attilio/vmc-playground/usr.bin/clang/llvm-rtdyld/Makefile user/attilio/vmc-playground/usr.bin/clang/macho-dump/Makefile user/attilio/vmc-playground/usr.bin/clang/opt/Makefile user/attilio/vmc-playground/usr.bin/clang/tblgen/Makefile user/attilio/vmc-playground/usr.bin/kdump/kdump.c user/attilio/vmc-playground/usr.bin/kdump/mksubr user/attilio/vmc-playground/usr.bin/procstat/procstat_files.c user/attilio/vmc-playground/usr.sbin/bhyve/bhyverun.c user/attilio/vmc-playground/usr.sbin/bhyvectl/bhyvectl.c Directory Properties: user/attilio/vmc-playground/ (props changed) user/attilio/vmc-playground/cddl/contrib/opensolaris/ (props changed) user/attilio/vmc-playground/cddl/contrib/opensolaris/cmd/zfs/ (props changed) user/attilio/vmc-playground/lib/libc/ (props changed) user/attilio/vmc-playground/lib/libvmmapi/ (props changed) user/attilio/vmc-playground/sys/ (props changed) user/attilio/vmc-playground/sys/amd64/vmm/ (props changed) user/attilio/vmc-playground/sys/boot/ (props changed) user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/ (props changed) user/attilio/vmc-playground/sys/conf/ (props changed) user/attilio/vmc-playground/usr.bin/procstat/ (props changed) user/attilio/vmc-playground/usr.sbin/bhyve/ (props changed) user/attilio/vmc-playground/usr.sbin/bhyvectl/ (props changed) Modified: user/attilio/vmc-playground/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- user/attilio/vmc-playground/cddl/contrib/opensolaris/cmd/zdb/zdb.c Wed Feb 13 01:25:17 2013 (r246727) +++ user/attilio/vmc-playground/cddl/contrib/opensolaris/cmd/zdb/zdb.c Wed Feb 13 01:30:35 2013 (r246728) @@ -983,7 +983,7 @@ visit_indirect(spa_t *spa, const dnode_p arc_buf_t *buf; uint64_t fill = 0; - err = arc_read_nolock(NULL, spa, bp, arc_getbuf_func, &buf, + err = arc_read(NULL, spa, bp, arc_getbuf_func, &buf, ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, &flags, zb); if (err) return (err); @@ -2001,9 +2001,8 @@ zdb_count_block(zdb_cb_t *zcb, zilog_t * bp, NULL, NULL, ZIO_FLAG_CANFAIL)), ==, 0); } -/* ARGSUSED */ static int -zdb_blkptr_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, arc_buf_t *pbuf, +zdb_blkptr_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) { zdb_cb_t *zcb = arg; @@ -2410,7 +2409,7 @@ typedef struct zdb_ddt_entry { /* ARGSUSED */ static int zdb_ddt_add_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, - arc_buf_t *pbuf, const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) + const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) { avl_tree_t *t = arg; avl_index_t where; Modified: user/attilio/vmc-playground/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- user/attilio/vmc-playground/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Wed Feb 13 01:25:17 2013 (r246727) +++ user/attilio/vmc-playground/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Wed Feb 13 01:30:35 2013 (r246728) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 10, 2012 +.Dd February 10, 2013 .Dt ZFS 8 .Os .Sh NAME Modified: user/attilio/vmc-playground/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 ============================================================================== --- user/attilio/vmc-playground/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Wed Feb 13 01:25:17 2013 (r246727) +++ user/attilio/vmc-playground/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Wed Feb 13 01:30:35 2013 (r246728) @@ -22,7 +22,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 8, 2012 +.Dd February 8, 2013 .Dt ZPOOL-FEATURES 7 .Os .Sh NAME Modified: user/attilio/vmc-playground/kerberos5/libexec/digest-service/Makefile ============================================================================== --- user/attilio/vmc-playground/kerberos5/libexec/digest-service/Makefile Wed Feb 13 01:25:17 2013 (r246727) +++ user/attilio/vmc-playground/kerberos5/libexec/digest-service/Makefile Wed Feb 13 01:30:35 2013 (r246728) @@ -11,7 +11,7 @@ CFLAGS+= -I${KRB5DIR}/kdc \ DPADD= ${LIBHDB} ${LIBKDC} ${LIBHEIMIPCS} ${LIBKRB5} ${LIBROKEN} ${LIBASN1} ${LIBCRYPTO} \ ${LIBCRYPT} ${LIBVERS} LDADD= -lhdb -lkdc ${LIBHEIMIPCS} -lkrb5 -lroken -lasn1 -lcrypto -lcrypt \ - ${LIBVERS} + ${LIBVERS} -lheimntlm .include Modified: user/attilio/vmc-playground/lib/clang/clang.build.mk ============================================================================== --- user/attilio/vmc-playground/lib/clang/clang.build.mk Wed Feb 13 01:25:17 2013 (r246727) +++ user/attilio/vmc-playground/lib/clang/clang.build.mk Wed Feb 13 01:30:35 2013 (r246728) @@ -19,7 +19,15 @@ CFLAGS+= -fno-strict-aliasing TARGET_ARCH?= ${MACHINE_ARCH} BUILD_ARCH?= ${MACHINE_ARCH} -TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-unknown-freebsd10.0 + +.if (${TARGET_ARCH} == "arm" || ${TARGET_ARCH} == "armv6") && \ + ${MK_ARM_EABI} != "no" +TARGET_ABI= gnueabi +.else +TARGET_ABI= unknown +.endif + +TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd10.0 BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/}-unknown-freebsd10.0 CFLAGS+= -DLLVM_DEFAULT_TARGET_TRIPLE=\"${TARGET_TRIPLE}\" \ -DLLVM_HOSTTRIPLE=\"${BUILD_TRIPLE}\" \ Modified: user/attilio/vmc-playground/lib/libc/arm/aeabi/Makefile.inc ============================================================================== --- user/attilio/vmc-playground/lib/libc/arm/aeabi/Makefile.inc Wed Feb 13 01:25:17 2013 (r246727) +++ user/attilio/vmc-playground/lib/libc/arm/aeabi/Makefile.inc Wed Feb 13 01:30:35 2013 (r246728) @@ -7,5 +7,24 @@ SRCS+= aeabi_atexit.c \ aeabi_float.c \ aeabi_unwind_cpp.c +# Add the aeabi_mem* functions. While they live in compiler-rt they call into +# libc. This causes issues when other parts of libc call these functions. +# We work around this by including these functions in libc but mark them as +# hidden so users of libc will not pick up these versions. +.PATH: ${.CURDIR}/../../contrib/compiler-rt/lib/arm + +SRCS+= aeabi_memcmp.S \ + aeabi_memcpy.S \ + aeabi_memmove.S \ + aeabi_memset.S + +# Mark the functions as hidden so they are not available outside of libc. +CFLAGS.aeabi_memcmp.S= -DVISIBILITY_HIDDEN +CFLAGS.aeabi_memcpy.S= -DVISIBILITY_HIDDEN +CFLAGS.aeabi_memmove.S= -DVISIBILITY_HIDDEN +CFLAGS.aeabi_memset.S= -DVISIBILITY_HIDDEN +CFLAGS+= ${CFLAGS.${.IMPSRC:T}} + + SYM_MAPS+=${.CURDIR}/arm/aeabi/Symbol.map Modified: user/attilio/vmc-playground/lib/libc/gen/fts.c ============================================================================== --- user/attilio/vmc-playground/lib/libc/gen/fts.c Wed Feb 13 01:25:17 2013 (r246727) +++ user/attilio/vmc-playground/lib/libc/gen/fts.c Wed Feb 13 01:30:35 2013 (r246728) @@ -1119,7 +1119,8 @@ fts_safe_changedir(FTS *sp, FTSENT *p, i newfd = fd; if (ISSET(FTS_NOCHDIR)) return (0); - if (fd < 0 && (newfd = _open(path, O_RDONLY | O_CLOEXEC, 0)) < 0) + if (fd < 0 && (newfd = _open(path, O_RDONLY | O_DIRECTORY | + O_CLOEXEC, 0)) < 0) return (-1); if (_fstat(newfd, &sb)) { ret = -1; Modified: user/attilio/vmc-playground/lib/libvmmapi/vmmapi.c ============================================================================== --- user/attilio/vmc-playground/lib/libvmmapi/vmmapi.c Wed Feb 13 01:25:17 2013 (r246727) +++ user/attilio/vmc-playground/lib/libvmmapi/vmmapi.c Wed Feb 13 01:30:35 2013 (r246728) @@ -250,34 +250,6 @@ vm_get_register(struct vmctx *ctx, int v } int -vm_get_pinning(struct vmctx *ctx, int vcpu, int *host_cpuid) -{ - int error; - struct vm_pin vmpin; - - bzero(&vmpin, sizeof(vmpin)); - vmpin.vm_cpuid = vcpu; - - error = ioctl(ctx->fd, VM_GET_PINNING, &vmpin); - *host_cpuid = vmpin.host_cpuid; - return (error); -} - -int -vm_set_pinning(struct vmctx *ctx, int vcpu, int host_cpuid) -{ - int error; - struct vm_pin vmpin; - - bzero(&vmpin, sizeof(vmpin)); - vmpin.vm_cpuid = vcpu; - vmpin.host_cpuid = host_cpuid; - - error = ioctl(ctx->fd, VM_SET_PINNING, &vmpin); - return (error); -} - -int vm_run(struct vmctx *ctx, int vcpu, uint64_t rip, struct vm_exit *vmexit) { int error; Modified: user/attilio/vmc-playground/lib/libvmmapi/vmmapi.h ============================================================================== --- user/attilio/vmc-playground/lib/libvmmapi/vmmapi.h Wed Feb 13 01:25:17 2013 (r246727) +++ user/attilio/vmc-playground/lib/libvmmapi/vmmapi.h Wed Feb 13 01:30:35 2013 (r246728) @@ -56,8 +56,6 @@ int vm_get_desc(struct vmctx *ctx, int v uint64_t *base, uint32_t *limit, uint32_t *access); int vm_set_register(struct vmctx *ctx, int vcpu, int reg, uint64_t val); int vm_get_register(struct vmctx *ctx, int vcpu, int reg, uint64_t *retval); -int vm_get_pinning(struct vmctx *ctx, int vcpu, int *host_cpuid); -int vm_set_pinning(struct vmctx *ctx, int vcpu, int host_cpuid); int vm_run(struct vmctx *ctx, int vcpu, uint64_t rip, struct vm_exit *ret_vmexit); int vm_apicid2vcpu(struct vmctx *ctx, int apicid); Modified: user/attilio/vmc-playground/share/man/man9/vfs_busy.9 ============================================================================== --- user/attilio/vmc-playground/share/man/man9/vfs_busy.9 Wed Feb 13 01:25:17 2013 (r246727) +++ user/attilio/vmc-playground/share/man/man9/vfs_busy.9 Wed Feb 13 01:30:35 2013 (r246728) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 14, 2010 +.Dd February 11, 2013 .Dt VFS_BUSY 9 .Os .Sh NAME @@ -84,6 +84,8 @@ The mount point is being unmounted .Dv ( MNTK_UNMOUNT is set). .El +.Sh SEE ALSO +.Xr vfs_unbusy 9 .Sh AUTHORS This manual page was written by .An Chad David Aq davidc@acns.ab.ca . Modified: user/attilio/vmc-playground/sys/amd64/include/vmm.h ============================================================================== --- user/attilio/vmc-playground/sys/amd64/include/vmm.h Wed Feb 13 01:25:17 2013 (r246727) +++ user/attilio/vmc-playground/sys/amd64/include/vmm.h Wed Feb 13 01:30:35 2013 (r246728) @@ -102,8 +102,6 @@ int vm_get_seg_desc(struct vm *vm, int v struct seg_desc *ret_desc); int vm_set_seg_desc(struct vm *vm, int vcpu, int reg, struct seg_desc *desc); -int vm_get_pinning(struct vm *vm, int vcpu, int *cpuid); -int vm_set_pinning(struct vm *vm, int vcpu, int cpuid); int vm_run(struct vm *vm, struct vm_run *vmrun); int vm_inject_event(struct vm *vm, int vcpu, int type, int vector, uint32_t error_code, int error_code_valid); Modified: user/attilio/vmc-playground/sys/amd64/include/vmm_dev.h ============================================================================== --- user/attilio/vmc-playground/sys/amd64/include/vmm_dev.h Wed Feb 13 01:25:17 2013 (r246727) +++ user/attilio/vmc-playground/sys/amd64/include/vmm_dev.h Wed Feb 13 01:30:35 2013 (r246728) @@ -51,11 +51,6 @@ struct vm_seg_desc { /* data or code s struct seg_desc desc; }; -struct vm_pin { - int vm_cpuid; - int host_cpuid; /* -1 to unpin */ -}; - struct vm_run { int cpuid; uint64_t rip; /* start running here */ @@ -142,8 +137,6 @@ struct vm_x2apic { enum { IOCNUM_RUN, - IOCNUM_SET_PINNING, - IOCNUM_GET_PINNING, IOCNUM_MAP_MEMORY, IOCNUM_GET_MEMORY_SEG, IOCNUM_SET_REGISTER, @@ -168,10 +161,6 @@ enum { #define VM_RUN \ _IOWR('v', IOCNUM_RUN, struct vm_run) -#define VM_SET_PINNING \ - _IOW('v', IOCNUM_SET_PINNING, struct vm_pin) -#define VM_GET_PINNING \ - _IOWR('v', IOCNUM_GET_PINNING, struct vm_pin) #define VM_MAP_MEMORY \ _IOWR('v', IOCNUM_MAP_MEMORY, struct vm_memory_segment) #define VM_GET_MEMORY_SEG \ Modified: user/attilio/vmc-playground/sys/amd64/vmm/io/ppt.c ============================================================================== --- user/attilio/vmc-playground/sys/amd64/vmm/io/ppt.c Wed Feb 13 01:25:17 2013 (r246727) +++ user/attilio/vmc-playground/sys/amd64/vmm/io/ppt.c Wed Feb 13 01:30:35 2013 (r246728) @@ -402,31 +402,6 @@ pptintr(void *arg) return (FILTER_HANDLED); } -/* - * XXX - * When we try to free the MSI resource the kernel will bind the thread to - * the host cpu was originally handling the MSI. The function freeing the - * MSI vector (apic_free_vector()) will panic the kernel if the thread - * is already bound to a cpu. - * - * So, we temporarily unbind the vcpu thread before freeing the MSI resource. - */ -static void -PPT_TEARDOWN_MSI(struct vm *vm, int vcpu, struct pptdev *ppt) -{ - int pincpu = -1; - - vm_get_pinning(vm, vcpu, &pincpu); - - if (pincpu >= 0) - vm_set_pinning(vm, vcpu, -1); - - ppt_teardown_msi(ppt); - - if (pincpu >= 0) - vm_set_pinning(vm, vcpu, pincpu); -} - int ppt_setup_msi(struct vm *vm, int vcpu, int bus, int slot, int func, int destcpu, int vector, int numvec) @@ -447,7 +422,7 @@ ppt_setup_msi(struct vm *vm, int vcpu, i return (EBUSY); /* Free any allocated resources */ - PPT_TEARDOWN_MSI(vm, vcpu, ppt); + ppt_teardown_msi(ppt); if (numvec == 0) /* nothing more to do */ return (0); @@ -513,7 +488,7 @@ ppt_setup_msi(struct vm *vm, int vcpu, i } if (i < numvec) { - PPT_TEARDOWN_MSI(vm, vcpu, ppt); + ppt_teardown_msi(ppt); return (ENXIO); } Modified: user/attilio/vmc-playground/sys/amd64/vmm/vmm.c ============================================================================== --- user/attilio/vmc-playground/sys/amd64/vmm/vmm.c Wed Feb 13 01:25:17 2013 (r246727) +++ user/attilio/vmc-playground/sys/amd64/vmm/vmm.c Wed Feb 13 01:30:35 2013 (r246728) @@ -70,7 +70,6 @@ struct vcpu { int flags; enum vcpu_state state; struct mtx mtx; - int pincpu; /* host cpuid this vcpu is bound to */ int hostcpu; /* host cpuid this vcpu last ran on */ uint64_t guest_msrs[VMM_MSR_NUM]; struct vlapic *vlapic; @@ -81,18 +80,6 @@ struct vcpu { enum x2apic_state x2apic_state; int nmi_pending; }; -#define VCPU_F_PINNED 0x0001 - -#define VCPU_PINCPU(vm, vcpuid) \ - ((vm->vcpu[vcpuid].flags & VCPU_F_PINNED) ? vm->vcpu[vcpuid].pincpu : -1) - -#define VCPU_UNPIN(vm, vcpuid) (vm->vcpu[vcpuid].flags &= ~VCPU_F_PINNED) - -#define VCPU_PIN(vm, vcpuid, host_cpuid) \ -do { \ - vm->vcpu[vcpuid].flags |= VCPU_F_PINNED; \ - vm->vcpu[vcpuid].pincpu = host_cpuid; \ -} while(0) #define vcpu_lock_init(v) mtx_init(&((v)->mtx), "vcpu lock", 0, MTX_SPIN) #define vcpu_lock(v) mtx_lock_spin(&((v)->mtx)) @@ -594,52 +581,6 @@ vm_set_seg_desc(struct vm *vm, int vcpu, return (VMSETDESC(vm->cookie, vcpu, reg, desc)); } -int -vm_get_pinning(struct vm *vm, int vcpuid, int *cpuid) -{ - - if (vcpuid < 0 || vcpuid >= VM_MAXCPU) - return (EINVAL); - - *cpuid = VCPU_PINCPU(vm, vcpuid); - - return (0); -} - -int -vm_set_pinning(struct vm *vm, int vcpuid, int host_cpuid) -{ - struct thread *td; - - if (vcpuid < 0 || vcpuid >= VM_MAXCPU) - return (EINVAL); - - td = curthread; /* XXXSMP only safe when muxing vcpus */ - - /* unpin */ - if (host_cpuid < 0) { - VCPU_UNPIN(vm, vcpuid); - thread_lock(td); - sched_unbind(td); - thread_unlock(td); - return (0); - } - - if (CPU_ABSENT(host_cpuid)) - return (EINVAL); - - /* - * XXX we should check that 'host_cpuid' has not already been pinned - * by another vm. - */ - thread_lock(td); - sched_bind(td, host_cpuid); - thread_unlock(td); - VCPU_PIN(vm, vcpuid, host_cpuid); - - return (0); -} - static void restore_guest_fpustate(struct vcpu *vcpu) { Modified: user/attilio/vmc-playground/sys/amd64/vmm/vmm_dev.c ============================================================================== --- user/attilio/vmc-playground/sys/amd64/vmm/vmm_dev.c Wed Feb 13 01:25:17 2013 (r246727) +++ user/attilio/vmc-playground/sys/amd64/vmm/vmm_dev.c Wed Feb 13 01:30:35 2013 (r246728) @@ -144,7 +144,6 @@ vmmdev_ioctl(struct cdev *cdev, u_long c struct vm_memory_segment *seg; struct vm_register *vmreg; struct vm_seg_desc* vmsegdesc; - struct vm_pin *vmpin; struct vm_run *vmrun; struct vm_event *vmevent; struct vm_lapic_irq *vmirq; @@ -170,7 +169,6 @@ vmmdev_ioctl(struct cdev *cdev, u_long c */ switch (cmd) { case VM_RUN: - case VM_SET_PINNING: case VM_GET_REGISTER: case VM_SET_REGISTER: case VM_GET_SEGMENT_DESCRIPTOR: @@ -301,16 +299,6 @@ vmmdev_ioctl(struct cdev *cdev, u_long c vmirq = (struct vm_lapic_irq *)data; error = lapic_set_intr(sc->vm, vmirq->cpuid, vmirq->vector); break; - case VM_SET_PINNING: - vmpin = (struct vm_pin *)data; - error = vm_set_pinning(sc->vm, vmpin->vm_cpuid, - vmpin->host_cpuid); - break; - case VM_GET_PINNING: - vmpin = (struct vm_pin *)data; - error = vm_get_pinning(sc->vm, vmpin->vm_cpuid, - &vmpin->host_cpuid); - break; case VM_MAP_MEMORY: seg = (struct vm_memory_segment *)data; error = vm_malloc(sc->vm, seg->gpa, seg->len); Modified: user/attilio/vmc-playground/sys/arm/allwinner/a10_machdep.c ============================================================================== --- user/attilio/vmc-playground/sys/arm/allwinner/a10_machdep.c Wed Feb 13 01:25:17 2013 (r246727) +++ user/attilio/vmc-playground/sys/arm/allwinner/a10_machdep.c Wed Feb 13 01:30:35 2013 (r246728) @@ -49,16 +49,16 @@ __FBSDID("$FreeBSD$"); #include +#include + /* Start of address space used for bootstrap map */ #define DEVMAP_BOOTSTRAP_MAP_START 0xE0000000 -void (*a10_cpu_reset)(void); vm_offset_t initarm_lastaddr(void) { - a10_cpu_reset = NULL; return (DEVMAP_BOOTSTRAP_MAP_START - ARM_NOCACHE_KVA_SIZE); } @@ -113,10 +113,7 @@ bus_dma_get_range_nb(void) void cpu_reset() { - if (a10_cpu_reset) - (*a10_cpu_reset)(); - else - printf("no cpu_reset implementation\n"); + a10wd_watchdog_reset(); printf("Reset failed!\n"); while (1); } Copied: user/attilio/vmc-playground/sys/arm/allwinner/a10_wdog.c (from r246727, user/attilio/vmcontention/sys/arm/allwinner/a10_wdog.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/attilio/vmc-playground/sys/arm/allwinner/a10_wdog.c Wed Feb 13 01:30:35 2013 (r246728, copy of r246727, user/attilio/vmcontention/sys/arm/allwinner/a10_wdog.c) @@ -0,0 +1,193 @@ +/*- + * Copyright (c) 2013 Oleksandr Tymoshenko + * 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. + */ +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +#define READ(_sc, _r) bus_read_4((_sc)->res, (_r)) +#define WRITE(_sc, _r, _v) bus_write_4((_sc)->res, (_r), (_v)) + +#define WDOG_CTRL 0x00 +#define WDOG_CTRL_RESTART (1 << 0) +#define WDOG_MODE 0x04 +#define WDOG_MODE_INTVL_SHIFT 3 +#define WDOG_MODE_RST_EN (1 << 1) +#define WDOG_MODE_EN (1 << 0) + +struct a10wd_interval { + uint64_t milliseconds; + unsigned int value; +}; + +struct a10wd_interval wd_intervals[] = { + { 500, 0 }, + { 1000, 1 }, + { 2000, 2 }, + { 3000, 3 }, + { 4000, 4 }, + { 5000, 5 }, + { 6000, 6 }, + { 8000, 7 }, + { 10000, 8 }, + { 12000, 9 }, + { 14000, 10 }, + { 16000, 11 }, + { 0, 0 } /* sentinel */ +}; + +static struct a10wd_softc *a10wd_sc = NULL; + +struct a10wd_softc { + device_t dev; + struct resource * res; + struct mtx mtx; +}; + +static void a10wd_watchdog_fn(void *private, u_int cmd, int *error); + +static int +a10wd_probe(device_t dev) +{ + + if (ofw_bus_is_compatible(dev, "allwinner,sun4i-wdt")) { + device_set_desc(dev, "Allwinner A10 Watchdog"); + return (BUS_PROBE_DEFAULT); + } + + return (ENXIO); +} + +static int +a10wd_attach(device_t dev) +{ + struct a10wd_softc *sc; + int rid; + + if (a10wd_sc != NULL) + return (ENXIO); + + sc = device_get_softc(dev); + sc->dev = dev; + + rid = 0; + sc->res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); + if (sc->res == NULL) { + device_printf(dev, "could not allocate memory resource\n"); + return (ENXIO); + } + + a10wd_sc = sc; + mtx_init(&sc->mtx, "A10 Watchdog", "a10wd", MTX_DEF); + EVENTHANDLER_REGISTER(watchdog_list, a10wd_watchdog_fn, sc, 0); + + return (0); +} + +static void +a10wd_watchdog_fn(void *private, u_int cmd, int *error) +{ + struct a10wd_softc *sc; + uint64_t ms; + int i; + + sc = private; + mtx_lock(&sc->mtx); + + cmd &= WD_INTERVAL; + + if (cmd > 0) { + ms = ((uint64_t)1 << (cmd & WD_INTERVAL)) / 1000000; + i = 0; + while (wd_intervals[i].milliseconds && + (ms > wd_intervals[i].milliseconds)) + i++; + if (wd_intervals[i].milliseconds) { + WRITE(sc, WDOG_MODE, + (wd_intervals[i].value << WDOG_MODE_INTVL_SHIFT) | + WDOG_MODE_EN | WDOG_MODE_RST_EN); + WRITE(sc, WDOG_CTRL, WDOG_CTRL_RESTART); + } + } + else + WRITE(sc, WDOG_MODE, 0); + + mtx_unlock(&sc->mtx); +} + +void +a10wd_watchdog_reset() +{ + + if (a10wd_sc == NULL) { + printf("Reset: watchdog device has not been initialized\n"); + return; + } + + WRITE(a10wd_sc, WDOG_MODE, + (wd_intervals[0].value << WDOG_MODE_INTVL_SHIFT) | + WDOG_MODE_EN | WDOG_MODE_RST_EN); + + while(1) + ; + +} + +static device_method_t a10wd_methods[] = { + DEVMETHOD(device_probe, a10wd_probe), + DEVMETHOD(device_attach, a10wd_attach), + + DEVMETHOD_END +}; + +static driver_t a10wd_driver = { + "a10wd", + a10wd_methods, + sizeof(struct a10wd_softc), +}; +static devclass_t a10wd_devclass; + +DRIVER_MODULE(a10wd, simplebus, a10wd_driver, a10wd_devclass, 0, 0); Copied: user/attilio/vmc-playground/sys/arm/allwinner/a10_wdog.h (from r246727, user/attilio/vmcontention/sys/arm/allwinner/a10_wdog.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/attilio/vmc-playground/sys/arm/allwinner/a10_wdog.h Wed Feb 13 01:30:35 2013 (r246728, copy of r246727, user/attilio/vmcontention/sys/arm/allwinner/a10_wdog.h) @@ -0,0 +1,35 @@ +/*- + * Copyright (c) 2013 Oleksandr Tymoshenko + * 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. + * + * $FreeBSD$ + * + */ +#ifndef __A10_WDOG_H__ +#define __A10_WDOG_H__ + +void a10wd_watchdog_reset(void); + +#endif /*__A10_WDOG_H__*/ + Modified: user/attilio/vmc-playground/sys/arm/allwinner/files.a10 ============================================================================== --- user/attilio/vmc-playground/sys/arm/allwinner/files.a10 Wed Feb 13 01:25:17 2013 (r246727) +++ user/attilio/vmc-playground/sys/arm/allwinner/files.a10 Wed Feb 13 01:30:35 2013 (r246728) @@ -12,6 +12,7 @@ arm/arm/irq_dispatch.S standard arm/allwinner/a10_clk.c standard arm/allwinner/a10_gpio.c optional gpio arm/allwinner/a10_ehci.c optional ehci +arm/allwinner/a10_wdog.c standard arm/allwinner/timer.c standard arm/allwinner/aintc.c standard arm/allwinner/bus_space.c standard Modified: user/attilio/vmc-playground/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- user/attilio/vmc-playground/sys/arm/arm/busdma_machdep-v6.c Wed Feb 13 01:25:17 2013 (r246727) +++ user/attilio/vmc-playground/sys/arm/arm/busdma_machdep-v6.c Wed Feb 13 01:30:35 2013 (r246728) @@ -46,11 +46,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include -#include -#include #include +#include #include #include @@ -111,6 +111,7 @@ struct bounce_page { vm_offset_t vaddr; /* kva of bounce buffer */ bus_addr_t busaddr; /* Physical address */ vm_offset_t datavaddr; /* kva of client data */ + bus_addr_t dataaddr; /* client physical address */ bus_size_t datacount; /* client data count */ STAILQ_ENTRY(bounce_page) links; }; @@ -119,7 +120,6 @@ struct sync_list { vm_offset_t vaddr; /* kva of bounce buffer */ bus_addr_t busaddr; /* Physical address */ bus_size_t datacount; /* client data count */ - STAILQ_ENTRY(sync_list) slinks; }; int busdma_swi_pending; @@ -156,15 +156,15 @@ struct bus_dmamap { int pagesneeded; int pagesreserved; bus_dma_tag_t dmat; - void *buf; /* unmapped buffer pointer */ - bus_size_t buflen; /* unmapped buffer length */ + struct memdesc mem; pmap_t pmap; bus_dmamap_callback_t *callback; void *callback_arg; int flags; #define DMAMAP_COHERENT (1 << 0) STAILQ_ENTRY(bus_dmamap) links; - STAILQ_HEAD(,sync_list) slist; + int sync_count; + struct sync_list slist[]; }; static STAILQ_HEAD(, bus_dmamap) bounce_map_waitinglist; @@ -176,11 +176,16 @@ static int alloc_bounce_pages(bus_dma_ta static int reserve_bounce_pages(bus_dma_tag_t dmat, bus_dmamap_t map, int commit); static bus_addr_t add_bounce_page(bus_dma_tag_t dmat, bus_dmamap_t map, - vm_offset_t vaddr, bus_size_t size); + vm_offset_t vaddr, bus_addr_t addr, + bus_size_t size); static void free_bounce_page(bus_dma_tag_t dmat, struct bounce_page *bpage); int run_filter(bus_dma_tag_t dmat, bus_addr_t paddr); -static int _bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap_t map, +static void _bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf, bus_size_t buflen, int flags); +static void _bus_dmamap_count_phys(bus_dma_tag_t dmat, bus_dmamap_t map, + vm_paddr_t buf, bus_size_t buflen, int flags); +static int _bus_dmamap_reserve_pages(bus_dma_tag_t dmat, bus_dmamap_t map, + int flags); static busdma_bufalloc_t coherent_allocator; /* Cache of coherent buffers */ static busdma_bufalloc_t standard_allocator; /* Cache of standard buffers */ @@ -493,17 +498,18 @@ out: int bus_dmamap_create(bus_dma_tag_t dmat, int flags, bus_dmamap_t *mapp) { + int mapsize; int error; error = 0; - *mapp = (bus_dmamap_t)malloc(sizeof(**mapp), M_DEVBUF, - M_NOWAIT | M_ZERO); + mapsize = sizeof(**mapp) + (sizeof(struct sync_list) * dmat->nsegments); + *mapp = (bus_dmamap_t)malloc(mapsize, M_DEVBUF, M_NOWAIT | M_ZERO); if (*mapp == NULL) { CTR3(KTR_BUSDMA, "%s: tag %p error %d", __func__, dmat, ENOMEM); return (ENOMEM); } - STAILQ_INIT(&((*mapp)->slist)); + (*mapp)->sync_count = 0; if (dmat->segments == NULL) { dmat->segments = (bus_dma_segment_t *)malloc( @@ -578,8 +584,7 @@ bus_dmamap_create(bus_dma_tag_t dmat, in int bus_dmamap_destroy(bus_dma_tag_t dmat, bus_dmamap_t map) { - if (STAILQ_FIRST(&map->bpages) != NULL || - STAILQ_FIRST(&map->slist) != NULL) { + if (STAILQ_FIRST(&map->bpages) != NULL || map->sync_count != 0) { CTR3(KTR_BUSDMA, "%s: tag %p error %d", __func__, dmat, EBUSY); return (EBUSY); @@ -606,6 +611,7 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi struct busdma_bufzone *bufzone; vm_memattr_t memattr; int mflags; + int mapsize; if (flags & BUS_DMA_NOWAIT) mflags = M_NOWAIT; @@ -614,15 +620,15 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi /* ARM non-snooping caches need a map for the VA cache sync structure */ - *mapp = (bus_dmamap_t)malloc(sizeof(**mapp), M_DEVBUF, - M_NOWAIT | M_ZERO); + mapsize = sizeof(**mapp) + (sizeof(struct sync_list) * dmat->nsegments); + *mapp = (bus_dmamap_t)malloc(mapsize, M_DEVBUF, M_NOWAIT | M_ZERO); if (*mapp == NULL) { CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d", __func__, dmat, dmat->flags, ENOMEM); return (ENOMEM); } - STAILQ_INIT(&((*mapp)->slist)); + (*mapp)->sync_count = 0; if (dmat->segments == NULL) { dmat->segments = (bus_dma_segment_t *)malloc( @@ -733,7 +739,37 @@ bus_dmamem_free(bus_dma_tag_t dmat, void CTR3(KTR_BUSDMA, "%s: tag %p flags 0x%x", __func__, dmat, dmat->flags); } -static int +static void +_bus_dmamap_count_phys(bus_dma_tag_t dmat, bus_dmamap_t map, vm_paddr_t buf, + bus_size_t buflen, int flags) +{ + bus_addr_t curaddr; + bus_size_t sgsize; + + if (map->pagesneeded == 0) { + CTR5(KTR_BUSDMA, "lowaddr= %d, boundary= %d, alignment= %d" + " map= %p, pagesneeded= %d", + dmat->lowaddr, dmat->boundary, dmat->alignment, + map, map->pagesneeded); + /* + * Count the number of bounce pages + * needed in order to complete this transfer + */ + curaddr = buf; + while (buflen != 0) { + sgsize = MIN(buflen, dmat->maxsegsz); + if (run_filter(dmat, curaddr) != 0) { + sgsize = MIN(sgsize, PAGE_SIZE); + map->pagesneeded++; + } + curaddr += sgsize; + buflen -= sgsize; + } + CTR1(KTR_BUSDMA, "pagesneeded= %d", map->pagesneeded); + } +} + +static void _bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf, bus_size_t buflen, int flags) { @@ -754,12 +790,11 @@ _bus_dmamap_count_pages(bus_dma_tag_t dm vendaddr = (vm_offset_t)buf + buflen; while (vaddr < vendaddr) { - if (__predict_true(map->pmap == pmap_kernel())) + if (__predict_true(map->pmap == kernel_pmap)) paddr = pmap_kextract(vaddr); else paddr = pmap_extract(map->pmap, vaddr); - if (((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0) && - run_filter(dmat, paddr) != 0) { + if (run_filter(dmat, paddr) != 0) { map->pagesneeded++; } vaddr += (PAGE_SIZE - ((vm_offset_t)vaddr & PAGE_MASK)); @@ -767,72 +802,190 @@ _bus_dmamap_count_pages(bus_dma_tag_t dm } CTR1(KTR_BUSDMA, "pagesneeded= %d", map->pagesneeded); } +} + +static int +_bus_dmamap_reserve_pages(bus_dma_tag_t dmat, bus_dmamap_t map, int flags) +{ /* Reserve Necessary Bounce Pages */ - if (map->pagesneeded != 0) { - mtx_lock(&bounce_lock); - if (flags & BUS_DMA_NOWAIT) { - if (reserve_bounce_pages(dmat, map, 0) != 0) { - map->pagesneeded = 0; - mtx_unlock(&bounce_lock); - return (ENOMEM); - } - } else { - if (reserve_bounce_pages(dmat, map, 1) != 0) { - /* Queue us for resources */ - map->dmat = dmat; - map->buf = buf; - map->buflen = buflen; - STAILQ_INSERT_TAIL(&bounce_map_waitinglist, - map, links); - mtx_unlock(&bounce_lock); - return (EINPROGRESS); - } + mtx_lock(&bounce_lock); + if (flags & BUS_DMA_NOWAIT) { + if (reserve_bounce_pages(dmat, map, 0) != 0) { + map->pagesneeded = 0; + mtx_unlock(&bounce_lock); + return (ENOMEM); + } + } else { + if (reserve_bounce_pages(dmat, map, 1) != 0) { + /* Queue us for resources */ + STAILQ_INSERT_TAIL(&bounce_map_waitinglist, map, links); + mtx_unlock(&bounce_lock); + return (EINPROGRESS); } - mtx_unlock(&bounce_lock); } + mtx_unlock(&bounce_lock); return (0); } /* - * Utility function to load a linear buffer. lastaddrp holds state - * between invocations (for multiple-buffer loads). segp contains + * Add a single contiguous physical range to the segment list. + */ +static int +_bus_dmamap_addseg(bus_dma_tag_t dmat, bus_dmamap_t map, bus_addr_t curaddr, + bus_size_t sgsize, bus_dma_segment_t *segs, int *segp) +{ + bus_addr_t baddr, bmask; + int seg; + + /* + * Make sure we don't cross any boundaries. + */ + bmask = ~(dmat->boundary - 1); + if (dmat->boundary > 0) { + baddr = (curaddr + dmat->boundary) & bmask; + if (sgsize > (baddr - curaddr)) + sgsize = (baddr - curaddr); + } + + if (dmat->ranges) { + struct arm32_dma_range *dr; + + dr = _bus_dma_inrange(dmat->ranges, dmat->_nranges, + curaddr); + if (dr == NULL) { + _bus_dmamap_unload(dmat, map); + return (EINVAL); + } + /* + * In a valid DMA range. Translate the physical + * memory address to an address in the DMA window. + */ + curaddr = (curaddr - dr->dr_sysbase) + dr->dr_busbase; + } + + /* + * Insert chunk into a segment, coalescing with + * previous segment if possible. + */ + seg = *segp; + if (seg == -1) { + seg = 0; + segs[seg].ds_addr = curaddr; + segs[seg].ds_len = sgsize; + } else { + if (curaddr == segs[seg].ds_addr + segs[seg].ds_len && + (segs[seg].ds_len + sgsize) <= dmat->maxsegsz && + (dmat->boundary == 0 || + (segs[seg].ds_addr & bmask) == (curaddr & bmask))) + segs[seg].ds_len += sgsize; + else { + if (++seg >= dmat->nsegments) + return (0); + segs[seg].ds_addr = curaddr; + segs[seg].ds_len = sgsize; + } + } + *segp = seg; + return (sgsize); +} + +/* + * Utility function to load a physical buffer. segp contains * the starting segment on entrace, and the ending segment on exit. - * first indicates if this is the first invocation of this function. */ -static __inline int +int +_bus_dmamap_load_phys(bus_dma_tag_t dmat, + bus_dmamap_t map, + vm_paddr_t buf, bus_size_t buflen, + int flags, + bus_dma_segment_t *segs, + int *segp) +{ + bus_addr_t curaddr; + bus_size_t sgsize; + int error; + + if (segs == NULL) + segs = dmat->segments; + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Wed Feb 13 02:04:49 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D31BC199; Wed, 13 Feb 2013 02:04:49 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C176723E; Wed, 13 Feb 2013 02:04:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1D24nuJ074044; Wed, 13 Feb 2013 02:04:49 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1D24nC7074043; Wed, 13 Feb 2013 02:04:49 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201302130204.r1D24nC7074043@svn.freebsd.org> From: Attilio Rao Date: Wed, 13 Feb 2013 02:04:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r246730 - user/attilio/vmc-playground/sys/vm X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Feb 2013 02:04:49 -0000 Author: attilio Date: Wed Feb 13 02:04:49 2013 New Revision: 246730 URL: http://svnweb.freebsd.org/changeset/base/246730 Log: Grammar. Sponsored by: EMC / Isilon storage division Modified: user/attilio/vmc-playground/sys/vm/vm_radix.c Modified: user/attilio/vmc-playground/sys/vm/vm_radix.c ============================================================================== --- user/attilio/vmc-playground/sys/vm/vm_radix.c Wed Feb 13 01:54:06 2013 (r246729) +++ user/attilio/vmc-playground/sys/vm/vm_radix.c Wed Feb 13 02:04:49 2013 (r246730) @@ -648,7 +648,7 @@ restart: } /* - * If a valid page or edge, smaller then the search slot, is + * If a valid page or edge, smaller than the search slot, is * found in the traversal, skip to the next higher-level key. */ if (slot == 0 && (rnode->rn_child[slot] == NULL || m != NULL)) { From owner-svn-src-user@FreeBSD.ORG Wed Feb 13 09:07:38 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A6154FFB; Wed, 13 Feb 2013 09:07:38 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 827D83E5; Wed, 13 Feb 2013 09:07:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1D97cNd002229; Wed, 13 Feb 2013 09:07:38 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1D97c0F002228; Wed, 13 Feb 2013 09:07:38 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201302130907.r1D97c0F002228@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Wed, 13 Feb 2013 09:07:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r246754 - user/ae/inet6/sys/netinet6 X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Feb 2013 09:07:38 -0000 Author: ae Date: Wed Feb 13 09:07:37 2013 New Revision: 246754 URL: http://svnweb.freebsd.org/changeset/base/246754 Log: Use in6ifa_ifwithaddr function instead of ip6_getdstifaddr. Now they are equal. Use mbuf's rcvif to determine the zone id of destination address. Modified: user/ae/inet6/sys/netinet6/icmp6.c Modified: user/ae/inet6/sys/netinet6/icmp6.c ============================================================================== --- user/ae/inet6/sys/netinet6/icmp6.c Wed Feb 13 08:28:27 2013 (r246753) +++ user/ae/inet6/sys/netinet6/icmp6.c Wed Feb 13 09:07:37 2013 (r246754) @@ -1279,6 +1279,7 @@ ni6_input(struct mbuf *m, int off) int oldfqdn = 0; /* if 1, return pascal string (03 draft) */ char *subj = NULL; struct in6_ifaddr *ia6 = NULL; + uint32_t zoneid; ip6 = mtod(m, struct ip6_hdr *); #ifndef PULLDOWN_TEST @@ -1322,8 +1323,11 @@ ni6_input(struct mbuf *m, int off) goto bad; /* else it's a link-local multicast, fine */ } else { /* unicast or anycast */ - if ((ia6 = ip6_getdstifaddr(m)) == NULL) - goto bad; /* XXX impossible */ + zoneid = in6_getscopezone(m->m_hdr.rcvif, + in6_addrscope(&ip6->ip6_dst)); + ia6 = in6ifa_ifwithaddr(&ip6->ip6_dst, zoneid); + if (ia6 == NULL) + goto bad; if ((ia6->ia6_flags & IN6_IFF_TEMPORARY) && !(V_icmp6_nodeinfo & ICMP6_NODEINFO_TMPADDROK)) { @@ -2157,7 +2161,8 @@ icmp6_reflect(struct mbuf *m, size_t off int plen; int type, code; struct ifnet *outif = NULL; - struct in6_addr origdst, src, *srcp = NULL; + struct in6_addr src, *srcp = NULL; + uint32_t zoneid; /* too short to reflect */ if (off < sizeof(struct ip6_hdr)) { @@ -2204,43 +2209,20 @@ icmp6_reflect(struct mbuf *m, size_t off type = icmp6->icmp6_type; /* keep type for statistics */ code = icmp6->icmp6_code; /* ditto. */ - origdst = ip6->ip6_dst; - /* - * ip6_input() drops a packet if its src is multicast. - * So, the src is never multicast. - */ - ip6->ip6_dst = ip6->ip6_src; - /* * If the incoming packet was addressed directly to us (i.e. unicast), * use dst as the src for the reply. * The IN6_IFF_NOTREADY case should be VERY rare, but is possible * (for example) when we encounter an error while forwarding procedure * destined to a duplicated address of ours. - * Note that ip6_getdstifaddr() may fail if we are in an error handling - * procedure of an outgoing packet of our own, in which case we need - * to search in the ifaddr list. */ - if (!IN6_IS_ADDR_MULTICAST(&origdst)) { - if ((ia = ip6_getdstifaddr(m))) { - if (!(ia->ia6_flags & - (IN6_IFF_ANYCAST|IN6_IFF_NOTREADY))) - srcp = &ia->ia_addr.sin6_addr; - } else { - struct sockaddr_in6 d; - - bzero(&d, sizeof(d)); - d.sin6_family = AF_INET6; - d.sin6_len = sizeof(d); - d.sin6_addr = origdst; - ia = (struct in6_ifaddr *) - ifa_ifwithaddr((struct sockaddr *)&d); - if (ia && - !(ia->ia6_flags & - (IN6_IFF_ANYCAST|IN6_IFF_NOTREADY))) { - srcp = &ia->ia_addr.sin6_addr; - } - } + zoneid = in6_getscopezone(m->m_hdr.rcvif, + in6_addrscope(&ip6->ip6_dst)); + if (!IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { + ia = in6ifa_ifwithaddr(&ip6->ip6_dst, zoneid); + if (ia != NULL && !(ia->ia6_flags & + (IN6_IFF_ANYCAST | IN6_IFF_NOTREADY))) + srcp = &ia->ia_addr.sin6_addr; } if (srcp == NULL) { @@ -2256,7 +2238,8 @@ icmp6_reflect(struct mbuf *m, size_t off bzero(&sin6, sizeof(sin6)); sin6.sin6_family = AF_INET6; sin6.sin6_len = sizeof(sin6); - sin6.sin6_addr = ip6->ip6_dst; /* zone ID should be embedded */ + sin6.sin6_addr = ip6->ip6_dst; + sin6.sin6_scope_id = zoneid; bzero(&ro, sizeof(ro)); e = in6_selectsrc(&sin6, NULL, NULL, &ro, NULL, &outif, &src); @@ -2273,6 +2256,11 @@ icmp6_reflect(struct mbuf *m, size_t off srcp = &src; } + /* + * ip6_input() drops a packet if its src is multicast. + * So, the src is never multicast. + */ + ip6->ip6_dst = ip6->ip6_src; ip6->ip6_src = *srcp; ip6->ip6_flow = 0; ip6->ip6_vfc &= ~IPV6_VERSION_MASK; From owner-svn-src-user@FreeBSD.ORG Wed Feb 13 09:20:56 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D41AF367; Wed, 13 Feb 2013 09:20:56 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C749C663; Wed, 13 Feb 2013 09:20:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1D9KuSJ007430; Wed, 13 Feb 2013 09:20:56 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1D9KurK007429; Wed, 13 Feb 2013 09:20:56 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201302130920.r1D9KurK007429@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Wed, 13 Feb 2013 09:20:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r246756 - user/ae/inet6/sys/netinet6 X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Feb 2013 09:20:56 -0000 Author: ae Date: Wed Feb 13 09:20:55 2013 New Revision: 246756 URL: http://svnweb.freebsd.org/changeset/base/246756 Log: Remove in6_setscope and in6_clearscope from the NI code. Note, this code should be updated according to the RFC 4620. Modified: user/ae/inet6/sys/netinet6/icmp6.c Modified: user/ae/inet6/sys/netinet6/icmp6.c ============================================================================== --- user/ae/inet6/sys/netinet6/icmp6.c Wed Feb 13 09:10:33 2013 (r246755) +++ user/ae/inet6/sys/netinet6/icmp6.c Wed Feb 13 09:20:55 2013 (r246756) @@ -1254,6 +1254,7 @@ icmp6_mtudisc_update(struct ip6ctlparam /* * Process a Node Information Query packet, based on * draft-ietf-ipngwg-icmp-name-lookups-07. + * XXX: RFC 4620 * * Spec incompatibilities: * - IPv6 Subject address handling @@ -1392,8 +1393,6 @@ ni6_input(struct mbuf *m, int off) /* m_pulldown instead of copy? */ m_copydata(m, off + sizeof(struct icmp6_nodeinfo), subjlen, (caddr_t)&in6_subj); - if (in6_setscope(&in6_subj, m->m_pkthdr.rcvif, NULL)) - goto bad; subj = (char *)&in6_subj; if (IN6_ARE_ADDR_EQUAL(&ip6->ip6_dst, &in6_subj)) @@ -1966,7 +1965,6 @@ ni6_store_addrs(struct icmp6_nodeinfo *n /* copy the address itself */ bcopy(&ifa6->ia_addr.sin6_addr, cp, sizeof(struct in6_addr)); - in6_clearscope((struct in6_addr *)cp); /* XXX */ cp += sizeof(struct in6_addr); resid -= (sizeof(struct in6_addr) + sizeof(u_int32_t)); From owner-svn-src-user@FreeBSD.ORG Thu Feb 14 00:43:37 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3A2F3FF9; Thu, 14 Feb 2013 00:43:37 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1332CA87; Thu, 14 Feb 2013 00:43:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1E0havL087080; Thu, 14 Feb 2013 00:43:36 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1E0hamx087078; Thu, 14 Feb 2013 00:43:36 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201302140043.r1E0hamx087078@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Thu, 14 Feb 2013 00:43:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r246776 - user/ae/inet6/sys/netinet6 X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Feb 2013 00:43:37 -0000 Author: ae Date: Thu Feb 14 00:43:36 2013 New Revision: 246776 URL: http://svnweb.freebsd.org/changeset/base/246776 Log: Fix typo s/m_hdr/m_pkthdr/. Don't reset rcvif pointer in the icmp6_error(), it is used to get proper zone information in the icmp6_reflect(). Remove in6_setscope() calls from the icmp6_error2(), set the needed rcvif instead. Modified: user/ae/inet6/sys/netinet6/icmp6.c Modified: user/ae/inet6/sys/netinet6/icmp6.c ============================================================================== --- user/ae/inet6/sys/netinet6/icmp6.c Wed Feb 13 23:25:11 2013 (r246775) +++ user/ae/inet6/sys/netinet6/icmp6.c Thu Feb 14 00:43:36 2013 (r246776) @@ -222,28 +222,11 @@ void icmp6_error2(struct mbuf *m, int type, int code, int param, struct ifnet *ifp) { - struct ip6_hdr *ip6; if (ifp == NULL) return; -#ifndef PULLDOWN_TEST - IP6_EXTHDR_CHECK(m, 0, sizeof(struct ip6_hdr), ); -#else - if (m->m_len < sizeof(struct ip6_hdr)) { - m = m_pullup(m, sizeof(struct ip6_hdr)); - if (m == NULL) - return; - } -#endif - - ip6 = mtod(m, struct ip6_hdr *); - - if (in6_setscope(&ip6->ip6_src, ifp, NULL) != 0) - return; - if (in6_setscope(&ip6->ip6_dst, ifp, NULL) != 0) - return; - + m->m_pkthdr.rcvif = ifp; icmp6_error(m, type, code, param); } @@ -372,23 +355,11 @@ icmp6_error(struct mbuf *m, int type, in nip6->ip6_src = oip6->ip6_src; nip6->ip6_dst = oip6->ip6_dst; - in6_clearscope(&oip6->ip6_src); - in6_clearscope(&oip6->ip6_dst); - icmp6 = (struct icmp6_hdr *)(nip6 + 1); icmp6->icmp6_type = type; icmp6->icmp6_code = code; icmp6->icmp6_pptr = htonl((u_int32_t)param); - /* - * icmp6_reflect() is designed to be in the input path. - * icmp6_error() can be called from both input and output path, - * and if we are in output path rcvif could contain bogus value. - * clear m->m_pkthdr.rcvif for safety, we should have enough scope - * information in ip header (nip6). - */ - m->m_pkthdr.rcvif = NULL; - ICMP6STAT_INC(icp6s_outhist[type]); icmp6_reflect(m, sizeof(struct ip6_hdr)); /* header order: IPv6 - ICMPv6 */ @@ -2214,7 +2185,7 @@ icmp6_reflect(struct mbuf *m, size_t off * (for example) when we encounter an error while forwarding procedure * destined to a duplicated address of ours. */ - zoneid = in6_getscopezone(m->m_hdr.rcvif, + zoneid = in6_getscopezone(m->m_pkthdr.rcvif, in6_addrscope(&ip6->ip6_dst)); if (!IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { ia = in6ifa_ifwithaddr(&ip6->ip6_dst, zoneid); From owner-svn-src-user@FreeBSD.ORG Thu Feb 14 00:56:40 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 8FC2421F; Thu, 14 Feb 2013 00:56:40 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6CC06AD5; Thu, 14 Feb 2013 00:56:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1E0udOu090394; Thu, 14 Feb 2013 00:56:39 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1E0udQ6090393; Thu, 14 Feb 2013 00:56:39 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201302140056.r1E0udQ6090393@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Thu, 14 Feb 2013 00:56:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r246777 - user/ae/inet6/sys/netinet6 X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Feb 2013 00:56:40 -0000 Author: ae Date: Thu Feb 14 00:56:39 2013 New Revision: 246777 URL: http://svnweb.freebsd.org/changeset/base/246777 Log: Use in6ifa_ifwithaddr() instead of ip6_getdstifaddr. Modified: user/ae/inet6/sys/netinet6/frag6.c Modified: user/ae/inet6/sys/netinet6/frag6.c ============================================================================== --- user/ae/inet6/sys/netinet6/frag6.c Thu Feb 14 00:43:36 2013 (r246776) +++ user/ae/inet6/sys/netinet6/frag6.c Thu Feb 14 00:56:39 2013 (r246777) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include /* for ECN definitions */ #include /* for ECN definitions */ @@ -184,7 +185,9 @@ frag6_input(struct mbuf **mp, int *offp, dstifp = NULL; #ifdef IN6_IFSTAT_STRICT /* find the destination interface of the packet. */ - if ((ia = ip6_getdstifaddr(m)) != NULL) { + ia = in6ifa_ifwithaddr(&ip6->ip6_dst, in6_getscopezone( + m->m_pkthdr.rcvif, in6_addrscope(&ip6->ip6_dst))); + if (ia != NULL) { dstifp = ia->ia_ifp; ifa_free(&ia->ia_ifa); } From owner-svn-src-user@FreeBSD.ORG Thu Feb 14 01:20:27 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 320DE67B; Thu, 14 Feb 2013 01:20:27 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 24AD0BEC; Thu, 14 Feb 2013 01:20:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1E1KRVg097633; Thu, 14 Feb 2013 01:20:27 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1E1KR7c097632; Thu, 14 Feb 2013 01:20:27 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201302140120.r1E1KR7c097632@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Thu, 14 Feb 2013 01:20:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r246779 - user/ae/inet6/sys/netinet6 X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Feb 2013 01:20:27 -0000 Author: ae Date: Thu Feb 14 01:20:26 2013 New Revision: 246779 URL: http://svnweb.freebsd.org/changeset/base/246779 Log: Remove all functions to work with auxiliary data. They are not needed anymore (we can resurrect them if they will be needed again). Disable the part of code that does route lookup when destination address hasn't been found. Modified: user/ae/inet6/sys/netinet6/ip6_input.c Modified: user/ae/inet6/sys/netinet6/ip6_input.c ============================================================================== --- user/ae/inet6/sys/netinet6/ip6_input.c Thu Feb 14 01:01:53 2013 (r246778) +++ user/ae/inet6/sys/netinet6/ip6_input.c Thu Feb 14 01:20:26 2013 (r246779) @@ -147,10 +147,6 @@ struct rwlock in6_ifaddr_lock; RW_SYSINIT(in6_ifaddr_lock, &in6_ifaddr_lock, "in6_ifaddr_lock"); static void ip6_init2(void *); -static struct ip6aux *ip6_savedstinfo(struct mbuf *, struct in6_addr *, uint32_t); -static struct ip6aux *ip6_addaux(struct mbuf *); -static struct ip6aux *ip6_findaux(struct mbuf *m); -static void ip6_delaux (struct mbuf *); static int ip6_hopopts_input(u_int32_t *, u_int32_t *, struct mbuf **, int *); #ifdef PULLDOWN_TEST static struct mbuf *ip6_pullexthdr(struct mbuf *, size_t, int); @@ -421,14 +417,12 @@ ip6_input(struct mbuf *m) u_int32_t plen; u_int32_t rtalert = ~0; int nxt, ours = 0; - struct ifnet *deliverifp = NULL, *ifp = NULL; struct in6_addr odst; struct route_in6 rin6; struct in6_ifaddr *ia; int srcrt = 0; struct llentry *lle = NULL; struct sockaddr_in6 dst6, *dst; - struct ip6aux *aux; int srcscope, dstscope; bzero(&rin6, sizeof(struct route_in6)); @@ -444,19 +438,12 @@ ip6_input(struct mbuf *m) #endif /* IPSEC */ - /* - * make sure we don't have onion peering information into m_tag. - */ - aux = NULL; - ip6_delaux(m); - if (m->m_flags & M_FASTFWD_OURS) { /* * Firewall changed destination to local. */ m->m_flags &= ~M_FASTFWD_OURS; ours = 1; - deliverifp = m->m_pkthdr.rcvif; ip6 = mtod(m, struct ip6_hdr *); goto hbhcheck; } @@ -640,7 +627,6 @@ ip6_input(struct mbuf *m) if (m->m_flags & M_FASTFWD_OURS) { m->m_flags &= ~M_FASTFWD_OURS; ours = 1; - deliverifp = m->m_pkthdr.rcvif; goto hbhcheck; } if ((m->m_flags & M_IP6_NEXTHOP) && @@ -674,7 +660,6 @@ passin: if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { ours = 1; in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_mcast); - deliverifp = m->m_pkthdr.rcvif; goto hbhcheck; } /* @@ -710,13 +695,17 @@ passin: ia->ia_ifa.if_ipackets++; ia->ia_ifa.if_ibytes += m->m_pkthdr.len; ifa_free(&ia->ia_ifa); - deliverifp = m->m_pkthdr.rcvif; - /* record address information into m_tag. */ - aux = ip6_savedstinfo(m, &ip6->ip6_dst, - in6_getscopezone(deliverifp, dstscope)); ours = 1; goto hbhcheck; } +#if 0 + /* + * XXX: Disable this code for now. + * It seems we already able to determine our addresses via + * in6ifa_ifwithaddr() when we have enough zone information. + * Handling faith(4) probably should be done in the forwarding + * path. + */ dst = &rin6.ro_dst; dst->sin6_len = sizeof(struct sockaddr_in6); @@ -824,6 +813,7 @@ passin: goto hbhcheck; } } +#endif /* * Now there is no reason to process the packet if it's not our own @@ -837,29 +827,6 @@ passin: hbhcheck: /* - * record address information into m_tag, if we don't have one yet. - * note that we are unable to record it, if the address is not listed - * as our interface address (e.g. multicast addresses, addresses - * within FAITH prefixes and such). - */ - if (deliverifp != NULL && aux == NULL) { - ia = in6_ifawithifp(deliverifp, &ip6->ip6_dst); - if (ia != NULL) { - dstscope = in6_addrscope(&ip6->ip6_dst); - aux = ip6_savedstinfo(m, &ip6->ip6_dst, - in6_getscopezone(deliverifp, dstscope)); - if (aux == NULL) { - /* - * XXX maybe we should drop the packet here, - * as we could not provide enough information - * to the upper layers. - */ - } - ifa_free(&ia->ia_ifa); - } - } - - /* * Process Hop-by-Hop options header if it's contained. * m may be modified in ip6_hopopts_input(). * If a JumboPayload option is included, plen will also be modified. @@ -942,7 +909,7 @@ passin: * Tell launch routine the next header */ V_ip6stat.ip6s_delivered++; - in6_ifstat_inc(deliverifp, ifs6_in_deliver); + in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_deliver); nest = 0; while (nxt != IPPROTO_DONE) { @@ -989,40 +956,6 @@ out: } /* - * set/grab in6_ifaddr correspond to IPv6 destination address. - * XXX backward compatibility wrapper - * - * XXXRW: We should bump the refcount on ia6 before sticking it in the m_tag, - * and then bump it when the tag is copied, and release it when the tag is - * freed. Unfortunately, m_tags don't support deep copies (yet), so instead - * we just bump the ia refcount when we receive it. This should be fixed. - */ -static struct ip6aux * -ip6_savedstinfo(struct mbuf *m, struct in6_addr *addr, uint32_t zoneid) -{ - struct ip6aux *ip6a; - - ip6a = ip6_addaux(m); - if (ip6a != NULL) { - ip6a->ip6a_dst = *addr; - ip6a->ip6a_dstzone = zoneid; - } - return (ip6a); /* NULL if failed to set */ -} - -struct in6_ifaddr * -ip6_getdstifaddr(struct mbuf *m) -{ - struct ip6aux *ip6a; - - ip6a = ip6_findaux(m); - if (ip6a != NULL) - return (in6ifa_ifwithaddr(&ip6a->ip6a_dst, - ip6a->ip6a_dstzone)); - return (NULL); -} - -/* * Hop-by-Hop options header processing. If a valid jumbo payload option is * included, the real payload length will be stored in plenp. * @@ -1789,42 +1722,6 @@ ip6_lasthdr(struct mbuf *m, int off, int } } -static struct ip6aux * -ip6_addaux(struct mbuf *m) -{ - struct m_tag *mtag; - - mtag = m_tag_find(m, PACKET_TAG_IPV6_INPUT, NULL); - if (!mtag) { - mtag = m_tag_get(PACKET_TAG_IPV6_INPUT, sizeof(struct ip6aux), - M_NOWAIT); - if (mtag) { - m_tag_prepend(m, mtag); - bzero(mtag + 1, sizeof(struct ip6aux)); - } - } - return mtag ? (struct ip6aux *)(mtag + 1) : NULL; -} - -static struct ip6aux * -ip6_findaux(struct mbuf *m) -{ - struct m_tag *mtag; - - mtag = m_tag_find(m, PACKET_TAG_IPV6_INPUT, NULL); - return mtag ? (struct ip6aux *)(mtag + 1) : NULL; -} - -static void -ip6_delaux(struct mbuf *m) -{ - struct m_tag *mtag; - - mtag = m_tag_find(m, PACKET_TAG_IPV6_INPUT, NULL); - if (mtag) - m_tag_delete(m, mtag); -} - /* * System control for IP6 */ From owner-svn-src-user@FreeBSD.ORG Thu Feb 14 15:23:02 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B999EFBE; Thu, 14 Feb 2013 15:23:02 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 936A9A9C; Thu, 14 Feb 2013 15:23:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1EFN2dK057865; Thu, 14 Feb 2013 15:23:02 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1EFN1ER057854; Thu, 14 Feb 2013 15:23:01 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201302141523.r1EFN1ER057854@svn.freebsd.org> From: Attilio Rao Date: Thu, 14 Feb 2013 15:23:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r246794 - in user/attilio/vmc-playground: . sys/vm X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Feb 2013 15:23:02 -0000 Author: attilio Date: Thu Feb 14 15:23:00 2013 New Revision: 246794 URL: http://svnweb.freebsd.org/changeset/base/246794 Log: The radix preallocation pages can overfow the biggestone segment, so use a different scheme for preallocation: reserve few KB of nodes to be used to cater page allocations before the memory can be efficiently pre-allocated by UMA. This at all effects remove boot_pages further carving and along with this modifies to the boot_pages allocation system and necessity to initialize the UMA zone before pmap_init(). Reported by: pho, jhb Modified: user/attilio/vmc-playground/UPDATING user/attilio/vmc-playground/sys/vm/uma_core.c user/attilio/vmc-playground/sys/vm/uma_int.h user/attilio/vmc-playground/sys/vm/vm_init.c user/attilio/vmc-playground/sys/vm/vm_page.c user/attilio/vmc-playground/sys/vm/vm_radix.c user/attilio/vmc-playground/sys/vm/vm_radix.h Modified: user/attilio/vmc-playground/UPDATING ============================================================================== --- user/attilio/vmc-playground/UPDATING Thu Feb 14 15:17:53 2013 (r246793) +++ user/attilio/vmc-playground/UPDATING Thu Feb 14 15:23:00 2013 (r246794) @@ -26,13 +26,6 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) -20130211: - The vm.boot_pages tunable and sysctl are removed and new - vm.initial_boot_pages tunable and sysctl are introduced. The new - adds represent the number of pages that are initially reserved to the - system for startup. The number of pages can however be extended if - necessary by the system during the boot stage. - 20130129: A BSD-licensed patch(1) variant has been added and is installed as bsdpatch, being the GNU version the default patch. Modified: user/attilio/vmc-playground/sys/vm/uma_core.c ============================================================================== --- user/attilio/vmc-playground/sys/vm/uma_core.c Thu Feb 14 15:17:53 2013 (r246793) +++ user/attilio/vmc-playground/sys/vm/uma_core.c Thu Feb 14 15:23:00 2013 (r246794) @@ -329,7 +329,7 @@ bucket_alloc(int entries, int bflags) /* * This is to stop us from allocating per cpu buckets while we're - * running out of boot_pages. Otherwise, we would exhaust the + * running out of vm.boot_pages. Otherwise, we would exhaust the * boot pages. This also prevents us from allocating buckets in * low memory situations. */ @@ -984,7 +984,7 @@ startup_alloc(uma_zone_t zone, int bytes } mtx_unlock(&uma_boot_pages_mtx); if (booted < UMA_STARTUP2) - panic("UMA: Increase vm.initial_boot_pages"); + panic("UMA: Increase vm.boot_pages"); /* * Now that we've booted reset these users to their real allocator. */ Modified: user/attilio/vmc-playground/sys/vm/uma_int.h ============================================================================== --- user/attilio/vmc-playground/sys/vm/uma_int.h Thu Feb 14 15:17:53 2013 (r246793) +++ user/attilio/vmc-playground/sys/vm/uma_int.h Thu Feb 14 15:23:00 2013 (r246794) @@ -118,8 +118,7 @@ #define UMA_SLAB_MASK (PAGE_SIZE - 1) /* Mask to get back to the page */ #define UMA_SLAB_SHIFT PAGE_SHIFT /* Number of bits PAGE_MASK */ -/* Initial pages allocated for startup */ -#define UMA_INIT_BOOT_PAGES 64 +#define UMA_BOOT_PAGES 64 /* Pages allocated for startup */ /* Max waste before going to off page slab management */ #define UMA_MAX_WASTE (UMA_SLAB_SIZE / 10) Modified: user/attilio/vmc-playground/sys/vm/vm_init.c ============================================================================== --- user/attilio/vmc-playground/sys/vm/vm_init.c Thu Feb 14 15:17:53 2013 (r246793) +++ user/attilio/vmc-playground/sys/vm/vm_init.c Thu Feb 14 15:23:00 2013 (r246794) @@ -82,7 +82,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -124,7 +123,6 @@ vm_mem_init(dummy) vm_object_init(); vm_map_startup(); kmem_init(virtual_avail, virtual_end); - vm_radix_init(); pmap_init(); vm_pager_init(); } Modified: user/attilio/vmc-playground/sys/vm/vm_page.c ============================================================================== --- user/attilio/vmc-playground/sys/vm/vm_page.c Thu Feb 14 15:17:53 2013 (r246793) +++ user/attilio/vmc-playground/sys/vm/vm_page.c Thu Feb 14 15:23:00 2013 (r246794) @@ -145,10 +145,10 @@ long vm_page_array_size; long first_page; int vm_page_zero_count; -static int boot_pages = UMA_INIT_BOOT_PAGES; -TUNABLE_INT("vm.initial_boot_pages", &boot_pages); -SYSCTL_INT(_vm, OID_AUTO, initial_boot_pages, CTLFLAG_RD, &boot_pages, 0, - "Initial number of pages allocated for bootstrapping the VM system"); +static int boot_pages = UMA_BOOT_PAGES; +TUNABLE_INT("vm.boot_pages", &boot_pages); +SYSCTL_INT(_vm, OID_AUTO, boot_pages, CTLFLAG_RD, &boot_pages, 0, + "number of pages allocated for bootstrapping the VM system"); static int pa_tryrelock_restart; SYSCTL_INT(_vm, OID_AUTO, tryrelock_restart, CTLFLAG_RD, @@ -307,7 +307,7 @@ vm_page_startup(vm_offset_t vaddr) low_water = 0; #endif - new_end = phys_avail[biggestone+1]; + end = phys_avail[biggestone+1]; /* * Initialize the page and queue locks. @@ -318,6 +318,17 @@ vm_page_startup(vm_offset_t vaddr) for (i = 0; i < PQ_COUNT; i++) vm_pagequeue_init_lock(&vm_pagequeues[i]); + /* + * Allocate memory for use when boot strapping the kernel memory + * allocator. + */ + new_end = end - (boot_pages * UMA_SLAB_SIZE); + new_end = trunc_page(new_end); + mapped = pmap_map(&vaddr, new_end, end, + VM_PROT_READ | VM_PROT_WRITE); + bzero((void *)mapped, end - new_end); + uma_startup((void *)mapped, boot_pages); + #if defined(__amd64__) || defined(__i386__) || defined(__arm__) || \ defined(__mips__) /* @@ -373,20 +384,6 @@ vm_page_startup(vm_offset_t vaddr) end = new_end; /* - * Allocate memory for use when boot strapping the kernel memory - * allocator. - */ - boot_pages += howmany(vm_radix_allocphys_size(page_range), - UMA_SLAB_SIZE - UMA_MAX_WASTE); - new_end = end - (boot_pages * UMA_SLAB_SIZE); - new_end = trunc_page(new_end); - mapped = pmap_map(&vaddr, new_end, end, - VM_PROT_READ | VM_PROT_WRITE); - bzero((void *)mapped, end - new_end); - uma_startup((void *)mapped, boot_pages); - end = new_end; - - /* * Reserve an unmapped guard page to trap access to vm_page_array[-1]. */ vaddr += PAGE_SIZE; Modified: user/attilio/vmc-playground/sys/vm/vm_radix.c ============================================================================== --- user/attilio/vmc-playground/sys/vm/vm_radix.c Thu Feb 14 15:17:53 2013 (r246793) +++ user/attilio/vmc-playground/sys/vm/vm_radix.c Thu Feb 14 15:23:00 2013 (r246794) @@ -67,6 +67,8 @@ #include #endif +#define VM_RADIX_BOOT_CACHE 1500 + /* * Such sizes should permit to keep node children contained into a single * cache-line, or to at least not span many of those. @@ -102,6 +104,14 @@ struct vm_radix_node { static uma_zone_t vm_radix_node_zone; +/* + * Boot-time cache of struct vm_radix_node objects. + * This cache is used to cater page allocations before the UMA zone is + * actually setup and pre-allocated (ie. pmap_init()). + */ +static u_int boot_cache_cnt; +static struct vm_radix_node boot_cache[VM_RADIX_BOOT_CACHE]; + #ifdef INVARIANTS /* * Radix node zone destructor. @@ -127,22 +137,29 @@ vm_radix_node_get(vm_pindex_t owner, uin { struct vm_radix_node *rnode; - rnode = uma_zalloc(vm_radix_node_zone, M_NOWAIT | M_ZERO); + if (boot_cache_cnt <= VM_RADIX_BOOT_CACHE) { + if (boot_cache_cnt == VM_RADIX_BOOT_CACHE) + panic("%s: Increase VM_RADIX_BOOT_CACHE", __func__); + rnode = &boot_cache[boot_cache_cnt]; + boot_cache_cnt++; + } else { + rnode = uma_zalloc(vm_radix_node_zone, M_NOWAIT | M_ZERO); - /* - * The required number of nodes might be already correctly - * pre-allocated in vm_radix_init(). However, UMA can reserve few - * nodes on per-cpu specific buckets, which will not be accessible - * from the curcpu. The allocation could then return NULL when the - * pre-allocation pool is close to be exhausted. - * Anyway, in practice this should never be a problem because a new - * node is not always required for insert, thus the pre-allocation - * pool should already have some extra-pages that indirectly deal with - * this situation. - */ - if (rnode == NULL) - panic("%s: uma_zalloc() returned NULL for a new node", - __func__); + /* + * The required number of nodes might be already correctly + * pre-allocated in vm_radix_init(). However, UMA can reserve + * few nodes on per-cpu specific buckets, which will not be + * accessible from the curcpu. The allocation could then + * return NULL when the pre-allocation pool is close to be + * exhausted. Anyway, in practice this should never be a + * problem because a new node is not always required for + * insert, thus the pre-allocation pool should already have + * some extra-pages that indirectly deal with this situation. + */ + if (rnode == NULL) + panic("%s: uma_zalloc() returned NULL for a new node", + __func__); + } rnode->rn_owner = owner; rnode->rn_count = count; rnode->rn_clev = clevel; @@ -156,6 +173,8 @@ static __inline void vm_radix_node_put(struct vm_radix_node *rnode) { + if (rnode > boot_cache && rnode <= &boot_cache[VM_RADIX_BOOT_CACHE]) + return; uma_zfree(vm_radix_node_zone, rnode); } @@ -341,21 +360,12 @@ vm_radix_reclaim_allnodes_int(struct vm_ } /* - * Returns the amount of requested memory to satisfy nodes pre-allocation. - */ -size_t -vm_radix_allocphys_size(size_t nitems) -{ - - return (nitems * sizeof(struct vm_radix_node)); -} - -/* * Pre-allocate intermediate nodes from the UMA slab zone. */ -void -vm_radix_init(void) +static void +vm_radix_init(void *arg __unused) { + int nitems; vm_radix_node_zone = uma_zcreate("RADIX NODE", sizeof(struct vm_radix_node), NULL, @@ -365,8 +375,11 @@ vm_radix_init(void) NULL, #endif NULL, NULL, VM_RADIX_PAD, UMA_ZONE_VM | UMA_ZONE_NOFREE); - uma_prealloc(vm_radix_node_zone, vm_page_array_size); + nitems = uma_zone_set_max(vm_radix_node_zone, vm_page_array_size); + uma_prealloc(vm_radix_node_zone, nitems); + boot_cache_cnt = VM_RADIX_BOOT_CACHE + 1; } +SYSINIT(vm_radix_init, SI_SUB_KMEM, SI_ORDER_SECOND, vm_radix_init, NULL); /* * Inserts the key-value pair in to the trie. Modified: user/attilio/vmc-playground/sys/vm/vm_radix.h ============================================================================== --- user/attilio/vmc-playground/sys/vm/vm_radix.h Thu Feb 14 15:17:53 2013 (r246793) +++ user/attilio/vmc-playground/sys/vm/vm_radix.h Thu Feb 14 15:23:00 2013 (r246794) @@ -34,8 +34,6 @@ #ifdef _KERNEL -size_t vm_radix_allocphys_size(size_t nitems); -void vm_radix_init(void); void vm_radix_insert(struct vm_radix *rtree, vm_pindex_t index, vm_page_t page); vm_page_t vm_radix_lookup(struct vm_radix *rtree, vm_pindex_t index); From owner-svn-src-user@FreeBSD.ORG Thu Feb 14 15:24:14 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 56F102E8; Thu, 14 Feb 2013 15:24:14 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 47F3CAAA; Thu, 14 Feb 2013 15:24:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1EFOEvh058062; Thu, 14 Feb 2013 15:24:14 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1EFOEUT058061; Thu, 14 Feb 2013 15:24:14 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201302141524.r1EFOEUT058061@svn.freebsd.org> From: Attilio Rao Date: Thu, 14 Feb 2013 15:24:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r246795 - user/attilio/vmc-playground/sys/vm X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Feb 2013 15:24:14 -0000 Author: attilio Date: Thu Feb 14 15:24:13 2013 New Revision: 246795 URL: http://svnweb.freebsd.org/changeset/base/246795 Log: Fix style. Modified: user/attilio/vmc-playground/sys/vm/vm_radix.c Modified: user/attilio/vmc-playground/sys/vm/vm_radix.c ============================================================================== --- user/attilio/vmc-playground/sys/vm/vm_radix.c Thu Feb 14 15:23:00 2013 (r246794) +++ user/attilio/vmc-playground/sys/vm/vm_radix.c Thu Feb 14 15:24:13 2013 (r246795) @@ -405,7 +405,7 @@ vm_radix_insert(struct vm_radix *rtree, vm_radix_addpage(rnode, index, 0, page); return; } - while (rnode) { + while (rnode != NULL) { if (vm_radix_keybarr(rnode, index) == TRUE) break; slot = vm_radix_slot(index, rnode->rn_clev); @@ -481,7 +481,7 @@ vm_radix_lookup(struct vm_radix *rtree, int slot; rnode = vm_radix_getroot(rtree); - while (rnode) { + while (rnode != NULL) { if (vm_radix_keybarr(rnode, index) == TRUE) return (NULL); slot = vm_radix_slot(index, rnode->rn_clev); @@ -518,7 +518,7 @@ restart: for (difflev = 0; difflev < (VM_RADIX_LIMIT + 1); difflev++) maplevels[difflev] = FALSE; rnode = vm_radix_getroot(rtree); - while (rnode) { + while (rnode != NULL) { maplevels[rnode->rn_clev] = TRUE; /* @@ -607,7 +607,7 @@ restart: for (difflev = 0; difflev < (VM_RADIX_LIMIT + 1); difflev++) maplevels[difflev] = FALSE; rnode = vm_radix_getroot(rtree); - while (rnode) { + while (rnode != NULL) { maplevels[rnode->rn_clev] = TRUE; /* From owner-svn-src-user@FreeBSD.ORG Thu Feb 14 15:25:32 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 3FA9F409; Thu, 14 Feb 2013 15:25:32 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1C515AB6; Thu, 14 Feb 2013 15:25:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1EFPVg5058263; Thu, 14 Feb 2013 15:25:32 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1EFPVb9058262; Thu, 14 Feb 2013 15:25:31 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201302141525.r1EFPVb9058262@svn.freebsd.org> From: Attilio Rao Date: Thu, 14 Feb 2013 15:25:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r246796 - user/attilio/vmc-playground/sys/vm X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Feb 2013 15:25:32 -0000 Author: attilio Date: Thu Feb 14 15:25:31 2013 New Revision: 246796 URL: http://svnweb.freebsd.org/changeset/base/246796 Log: Remove an unuseful check on resident_page_count. vm_radix_lookup_ge() of an empty trie is as fast as checking a NULL pointer. Modified: user/attilio/vmc-playground/sys/vm/vm_page.c Modified: user/attilio/vmc-playground/sys/vm/vm_page.c ============================================================================== --- user/attilio/vmc-playground/sys/vm/vm_page.c Thu Feb 14 15:24:13 2013 (r246795) +++ user/attilio/vmc-playground/sys/vm/vm_page.c Thu Feb 14 15:25:31 2013 (r246796) @@ -926,9 +926,7 @@ vm_page_find_least(vm_object_t object, v { VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); - if (object->resident_page_count != 0) - return (vm_radix_lookup_ge(&object->rtree, pindex)); - return (NULL); + return (vm_radix_lookup_ge(&object->rtree, pindex)); } /* From owner-svn-src-user@FreeBSD.ORG Thu Feb 14 15:36:05 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 643295CD; Thu, 14 Feb 2013 15:36:05 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 525D3B0F; Thu, 14 Feb 2013 15:36:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1EFa4XT061325; Thu, 14 Feb 2013 15:36:04 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1EFZxF9061280; Thu, 14 Feb 2013 15:35:59 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201302141535.r1EFZxF9061280@svn.freebsd.org> From: Attilio Rao Date: Thu, 14 Feb 2013 15:35:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r246797 - in user/attilio/vmcontention: . crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/aes/asm crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio cry... X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Feb 2013 15:36:05 -0000 Author: attilio Date: Thu Feb 14 15:35:58 2013 New Revision: 246797 URL: http://svnweb.freebsd.org/changeset/base/246797 Log: MFC Added: user/attilio/vmcontention/crypto/openssl/crypto/evp/evp_cnf.c - copied unchanged from r246796, head/crypto/openssl/crypto/evp/evp_cnf.c user/attilio/vmcontention/crypto/openssl/doc/crypto/EVP_PKEY_verify_recover.pod - copied unchanged from r246796, head/crypto/openssl/doc/crypto/EVP_PKEY_verify_recover.pod user/attilio/vmcontention/crypto/openssl/ssl/s3_cbc.c - copied unchanged from r246796, head/crypto/openssl/ssl/s3_cbc.c user/attilio/vmcontention/lib/libc/string/strchrnul.c - copied unchanged from r246796, head/lib/libc/string/strchrnul.c user/attilio/vmcontention/secure/lib/libcrypto/man/EVP_PKEY_verify_recover.3 - copied unchanged from r246796, head/secure/lib/libcrypto/man/EVP_PKEY_verify_recover.3 Deleted: user/attilio/vmcontention/crypto/openssl/doc/crypto/EVP_PKEY_verifyrecover.pod user/attilio/vmcontention/secure/lib/libcrypto/man/EVP_PKEY_verifyrecover.3 Modified: user/attilio/vmcontention/Makefile.inc1 user/attilio/vmcontention/crypto/openssl/CHANGES user/attilio/vmcontention/crypto/openssl/Configure user/attilio/vmcontention/crypto/openssl/FAQ user/attilio/vmcontention/crypto/openssl/Makefile user/attilio/vmcontention/crypto/openssl/Makefile.org user/attilio/vmcontention/crypto/openssl/NEWS user/attilio/vmcontention/crypto/openssl/PROBLEMS user/attilio/vmcontention/crypto/openssl/README user/attilio/vmcontention/crypto/openssl/apps/apps.c user/attilio/vmcontention/crypto/openssl/apps/ca.c user/attilio/vmcontention/crypto/openssl/apps/cms.c user/attilio/vmcontention/crypto/openssl/apps/dgst.c user/attilio/vmcontention/crypto/openssl/apps/dhparam.c user/attilio/vmcontention/crypto/openssl/apps/dsaparam.c user/attilio/vmcontention/crypto/openssl/apps/genrsa.c user/attilio/vmcontention/crypto/openssl/apps/ocsp.c user/attilio/vmcontention/crypto/openssl/apps/s_cb.c user/attilio/vmcontention/crypto/openssl/apps/s_client.c user/attilio/vmcontention/crypto/openssl/apps/s_server.c user/attilio/vmcontention/crypto/openssl/apps/speed.c user/attilio/vmcontention/crypto/openssl/apps/srp.c user/attilio/vmcontention/crypto/openssl/apps/verify.c user/attilio/vmcontention/crypto/openssl/apps/x509.c user/attilio/vmcontention/crypto/openssl/crypto/aes/asm/aes-mips.pl user/attilio/vmcontention/crypto/openssl/crypto/aes/asm/aes-s390x.pl user/attilio/vmcontention/crypto/openssl/crypto/aes/asm/aes-x86_64.pl user/attilio/vmcontention/crypto/openssl/crypto/aes/asm/aesni-sha1-x86_64.pl user/attilio/vmcontention/crypto/openssl/crypto/aes/asm/aesni-x86_64.pl user/attilio/vmcontention/crypto/openssl/crypto/aes/asm/bsaes-x86_64.pl user/attilio/vmcontention/crypto/openssl/crypto/aes/asm/vpaes-x86_64.pl user/attilio/vmcontention/crypto/openssl/crypto/asn1/a_strex.c user/attilio/vmcontention/crypto/openssl/crypto/asn1/a_verify.c user/attilio/vmcontention/crypto/openssl/crypto/asn1/x_pubkey.c user/attilio/vmcontention/crypto/openssl/crypto/bio/bss_dgram.c user/attilio/vmcontention/crypto/openssl/crypto/bn/asm/mips.pl user/attilio/vmcontention/crypto/openssl/crypto/bn/asm/modexp512-x86_64.pl user/attilio/vmcontention/crypto/openssl/crypto/bn/asm/x86_64-gf2m.pl user/attilio/vmcontention/crypto/openssl/crypto/bn/asm/x86_64-mont.pl user/attilio/vmcontention/crypto/openssl/crypto/bn/asm/x86_64-mont5.pl user/attilio/vmcontention/crypto/openssl/crypto/bn/bn_div.c user/attilio/vmcontention/crypto/openssl/crypto/bn/bn_gcd.c user/attilio/vmcontention/crypto/openssl/crypto/bn/bn_lcl.h user/attilio/vmcontention/crypto/openssl/crypto/camellia/asm/cmll-x86_64.pl user/attilio/vmcontention/crypto/openssl/crypto/cms/cms_cd.c user/attilio/vmcontention/crypto/openssl/crypto/cms/cms_enc.c user/attilio/vmcontention/crypto/openssl/crypto/cms/cms_lib.c user/attilio/vmcontention/crypto/openssl/crypto/conf/conf_mall.c user/attilio/vmcontention/crypto/openssl/crypto/cryptlib.c user/attilio/vmcontention/crypto/openssl/crypto/cryptlib.h user/attilio/vmcontention/crypto/openssl/crypto/crypto.h user/attilio/vmcontention/crypto/openssl/crypto/des/set_key.c user/attilio/vmcontention/crypto/openssl/crypto/des/str2key.c user/attilio/vmcontention/crypto/openssl/crypto/ec/ec.h user/attilio/vmcontention/crypto/openssl/crypto/ec/ec_key.c user/attilio/vmcontention/crypto/openssl/crypto/ec/ec_pmeth.c user/attilio/vmcontention/crypto/openssl/crypto/ec/ecp_mont.c user/attilio/vmcontention/crypto/openssl/crypto/ec/ectest.c user/attilio/vmcontention/crypto/openssl/crypto/ecdh/Makefile user/attilio/vmcontention/crypto/openssl/crypto/ecdh/ech_key.c user/attilio/vmcontention/crypto/openssl/crypto/ecdh/ech_lib.c user/attilio/vmcontention/crypto/openssl/crypto/ecdsa/ecs_lib.c user/attilio/vmcontention/crypto/openssl/crypto/err/err_all.c user/attilio/vmcontention/crypto/openssl/crypto/evp/Makefile user/attilio/vmcontention/crypto/openssl/crypto/evp/digest.c user/attilio/vmcontention/crypto/openssl/crypto/evp/e_aes.c user/attilio/vmcontention/crypto/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c user/attilio/vmcontention/crypto/openssl/crypto/evp/evp.h user/attilio/vmcontention/crypto/openssl/crypto/evp/evp_err.c user/attilio/vmcontention/crypto/openssl/crypto/evp/m_dss.c user/attilio/vmcontention/crypto/openssl/crypto/evp/m_dss1.c user/attilio/vmcontention/crypto/openssl/crypto/evp/m_sha1.c user/attilio/vmcontention/crypto/openssl/crypto/evp/p_sign.c user/attilio/vmcontention/crypto/openssl/crypto/evp/p_verify.c user/attilio/vmcontention/crypto/openssl/crypto/md4/md4_dgst.c user/attilio/vmcontention/crypto/openssl/crypto/md4/md4_locl.h user/attilio/vmcontention/crypto/openssl/crypto/md5/asm/md5-x86_64.pl user/attilio/vmcontention/crypto/openssl/crypto/md5/md5_locl.h user/attilio/vmcontention/crypto/openssl/crypto/mdc2/mdc2dgst.c user/attilio/vmcontention/crypto/openssl/crypto/mem.c user/attilio/vmcontention/crypto/openssl/crypto/modes/asm/ghash-x86.pl user/attilio/vmcontention/crypto/openssl/crypto/modes/asm/ghash-x86_64.pl user/attilio/vmcontention/crypto/openssl/crypto/modes/gcm128.c user/attilio/vmcontention/crypto/openssl/crypto/objects/o_names.c user/attilio/vmcontention/crypto/openssl/crypto/ocsp/ocsp_vfy.c user/attilio/vmcontention/crypto/openssl/crypto/opensslv.h user/attilio/vmcontention/crypto/openssl/crypto/pem/pem_all.c user/attilio/vmcontention/crypto/openssl/crypto/pem/pem_lib.c user/attilio/vmcontention/crypto/openssl/crypto/pem/pem_seal.c user/attilio/vmcontention/crypto/openssl/crypto/perlasm/cbc.pl user/attilio/vmcontention/crypto/openssl/crypto/perlasm/x86masm.pl user/attilio/vmcontention/crypto/openssl/crypto/pkcs12/p12_key.c user/attilio/vmcontention/crypto/openssl/crypto/pkcs7/bio_pk7.c user/attilio/vmcontention/crypto/openssl/crypto/ppccap.c user/attilio/vmcontention/crypto/openssl/crypto/rand/md_rand.c user/attilio/vmcontention/crypto/openssl/crypto/rand/rand_lib.c user/attilio/vmcontention/crypto/openssl/crypto/rand/randfile.c user/attilio/vmcontention/crypto/openssl/crypto/rc4/asm/rc4-md5-x86_64.pl user/attilio/vmcontention/crypto/openssl/crypto/rc4/asm/rc4-x86_64.pl user/attilio/vmcontention/crypto/openssl/crypto/ripemd/rmd_dgst.c user/attilio/vmcontention/crypto/openssl/crypto/ripemd/rmd_locl.h user/attilio/vmcontention/crypto/openssl/crypto/rsa/rsa.h user/attilio/vmcontention/crypto/openssl/crypto/rsa/rsa_eay.c user/attilio/vmcontention/crypto/openssl/crypto/rsa/rsa_oaep.c user/attilio/vmcontention/crypto/openssl/crypto/sha/asm/sha1-armv4-large.pl user/attilio/vmcontention/crypto/openssl/crypto/sha/asm/sha1-ia64.pl user/attilio/vmcontention/crypto/openssl/crypto/sha/asm/sha1-sparcv9a.pl user/attilio/vmcontention/crypto/openssl/crypto/sha/asm/sha1-x86_64.pl user/attilio/vmcontention/crypto/openssl/crypto/sha/asm/sha512-586.pl user/attilio/vmcontention/crypto/openssl/crypto/sha/asm/sha512-x86_64.pl user/attilio/vmcontention/crypto/openssl/crypto/sha/sha1_one.c user/attilio/vmcontention/crypto/openssl/crypto/sha/sha1dgst.c user/attilio/vmcontention/crypto/openssl/crypto/sha/sha256.c user/attilio/vmcontention/crypto/openssl/crypto/sha/sha_dgst.c user/attilio/vmcontention/crypto/openssl/crypto/sha/sha_locl.h user/attilio/vmcontention/crypto/openssl/crypto/sparccpuid.S user/attilio/vmcontention/crypto/openssl/crypto/srp/srp_vfy.c user/attilio/vmcontention/crypto/openssl/crypto/symhacks.h user/attilio/vmcontention/crypto/openssl/crypto/ui/ui_openssl.c user/attilio/vmcontention/crypto/openssl/crypto/whrlpool/asm/wp-mmx.pl user/attilio/vmcontention/crypto/openssl/crypto/whrlpool/asm/wp-x86_64.pl user/attilio/vmcontention/crypto/openssl/crypto/x509/x509_cmp.c user/attilio/vmcontention/crypto/openssl/crypto/x509/x509_vfy.c user/attilio/vmcontention/crypto/openssl/crypto/x509v3/v3_purp.c user/attilio/vmcontention/crypto/openssl/crypto/x86_64cpuid.pl user/attilio/vmcontention/crypto/openssl/crypto/x86cpuid.pl user/attilio/vmcontention/crypto/openssl/doc/apps/CA.pl.pod user/attilio/vmcontention/crypto/openssl/doc/apps/dgst.pod user/attilio/vmcontention/crypto/openssl/doc/apps/verify.pod user/attilio/vmcontention/crypto/openssl/doc/apps/x509.pod user/attilio/vmcontention/crypto/openssl/doc/crypto/EVP_PKEY_CTX_ctrl.pod user/attilio/vmcontention/crypto/openssl/doc/crypto/EVP_PKEY_decrypt.pod user/attilio/vmcontention/crypto/openssl/doc/crypto/EVP_PKEY_derive.pod user/attilio/vmcontention/crypto/openssl/doc/crypto/EVP_PKEY_encrypt.pod user/attilio/vmcontention/crypto/openssl/doc/crypto/EVP_PKEY_get_default_digest.pod user/attilio/vmcontention/crypto/openssl/doc/crypto/EVP_PKEY_keygen.pod user/attilio/vmcontention/crypto/openssl/doc/crypto/EVP_PKEY_sign.pod user/attilio/vmcontention/crypto/openssl/doc/crypto/EVP_PKEY_verify.pod user/attilio/vmcontention/crypto/openssl/engines/ccgost/gost89.c user/attilio/vmcontention/crypto/openssl/engines/ccgost/gost_crypt.c user/attilio/vmcontention/crypto/openssl/engines/ccgost/gost_eng.c user/attilio/vmcontention/crypto/openssl/engines/ccgost/gost_lcl.h user/attilio/vmcontention/crypto/openssl/engines/ccgost/gosthash.c user/attilio/vmcontention/crypto/openssl/engines/e_capi.c user/attilio/vmcontention/crypto/openssl/ssl/Makefile user/attilio/vmcontention/crypto/openssl/ssl/d1_enc.c user/attilio/vmcontention/crypto/openssl/ssl/d1_pkt.c user/attilio/vmcontention/crypto/openssl/ssl/d1_srtp.c user/attilio/vmcontention/crypto/openssl/ssl/dtls1.h user/attilio/vmcontention/crypto/openssl/ssl/s2_clnt.c user/attilio/vmcontention/crypto/openssl/ssl/s2_pkt.c user/attilio/vmcontention/crypto/openssl/ssl/s2_srvr.c user/attilio/vmcontention/crypto/openssl/ssl/s3_both.c user/attilio/vmcontention/crypto/openssl/ssl/s3_clnt.c user/attilio/vmcontention/crypto/openssl/ssl/s3_enc.c user/attilio/vmcontention/crypto/openssl/ssl/s3_lib.c user/attilio/vmcontention/crypto/openssl/ssl/s3_pkt.c user/attilio/vmcontention/crypto/openssl/ssl/s3_srvr.c user/attilio/vmcontention/crypto/openssl/ssl/ssl.h user/attilio/vmcontention/crypto/openssl/ssl/ssl3.h user/attilio/vmcontention/crypto/openssl/ssl/ssl_algs.c user/attilio/vmcontention/crypto/openssl/ssl/ssl_cert.c user/attilio/vmcontention/crypto/openssl/ssl/ssl_ciph.c user/attilio/vmcontention/crypto/openssl/ssl/ssl_err.c user/attilio/vmcontention/crypto/openssl/ssl/ssl_lib.c user/attilio/vmcontention/crypto/openssl/ssl/ssl_locl.h user/attilio/vmcontention/crypto/openssl/ssl/ssl_rsa.c user/attilio/vmcontention/crypto/openssl/ssl/ssltest.c user/attilio/vmcontention/crypto/openssl/ssl/t1_enc.c user/attilio/vmcontention/crypto/openssl/ssl/t1_lib.c user/attilio/vmcontention/crypto/openssl/ssl/tls_srp.c user/attilio/vmcontention/crypto/openssl/util/libeay.num user/attilio/vmcontention/crypto/openssl/util/pl/VC-32.pl user/attilio/vmcontention/include/string.h user/attilio/vmcontention/lib/libc/string/Makefile.inc user/attilio/vmcontention/lib/libc/string/Symbol.map user/attilio/vmcontention/lib/libc/string/strchr.3 user/attilio/vmcontention/lib/libc/sys/fcntl.2 user/attilio/vmcontention/lib/libusb/Makefile user/attilio/vmcontention/lib/libusb/libusb20.3 user/attilio/vmcontention/lib/libusb/libusb20.c user/attilio/vmcontention/lib/libusb/libusb20.h user/attilio/vmcontention/lib/libusb/libusb20_int.h user/attilio/vmcontention/lib/libusb/libusb20_ugen20.c user/attilio/vmcontention/secure/lib/libcrypto/Makefile user/attilio/vmcontention/secure/lib/libcrypto/Makefile.inc user/attilio/vmcontention/secure/lib/libcrypto/Makefile.man user/attilio/vmcontention/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 user/attilio/vmcontention/secure/lib/libcrypto/man/ASN1_STRING_length.3 user/attilio/vmcontention/secure/lib/libcrypto/man/ASN1_STRING_new.3 user/attilio/vmcontention/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 user/attilio/vmcontention/secure/lib/libcrypto/man/ASN1_generate_nconf.3 user/attilio/vmcontention/secure/lib/libcrypto/man/BIO_ctrl.3 user/attilio/vmcontention/secure/lib/libcrypto/man/BIO_f_base64.3 user/attilio/vmcontention/secure/lib/libcrypto/man/BIO_f_buffer.3 user/attilio/vmcontention/secure/lib/libcrypto/man/BIO_f_cipher.3 user/attilio/vmcontention/secure/lib/libcrypto/man/BIO_f_md.3 user/attilio/vmcontention/secure/lib/libcrypto/man/BIO_f_null.3 user/attilio/vmcontention/secure/lib/libcrypto/man/BIO_f_ssl.3 user/attilio/vmcontention/secure/lib/libcrypto/man/BIO_find_type.3 user/attilio/vmcontention/secure/lib/libcrypto/man/BIO_new.3 user/attilio/vmcontention/secure/lib/libcrypto/man/BIO_new_CMS.3 user/attilio/vmcontention/secure/lib/libcrypto/man/BIO_push.3 user/attilio/vmcontention/secure/lib/libcrypto/man/BIO_read.3 user/attilio/vmcontention/secure/lib/libcrypto/man/BIO_s_accept.3 user/attilio/vmcontention/secure/lib/libcrypto/man/BIO_s_bio.3 user/attilio/vmcontention/secure/lib/libcrypto/man/BIO_s_connect.3 user/attilio/vmcontention/secure/lib/libcrypto/man/BIO_s_fd.3 user/attilio/vmcontention/secure/lib/libcrypto/man/BIO_s_file.3 user/attilio/vmcontention/secure/lib/libcrypto/man/BIO_s_mem.3 user/attilio/vmcontention/secure/lib/libcrypto/man/BIO_s_null.3 user/attilio/vmcontention/secure/lib/libcrypto/man/BIO_s_socket.3 user/attilio/vmcontention/secure/lib/libcrypto/man/BIO_set_callback.3 user/attilio/vmcontention/secure/lib/libcrypto/man/BIO_should_retry.3 user/attilio/vmcontention/secure/lib/libcrypto/man/BN_BLINDING_new.3 user/attilio/vmcontention/secure/lib/libcrypto/man/BN_CTX_new.3 user/attilio/vmcontention/secure/lib/libcrypto/man/BN_CTX_start.3 user/attilio/vmcontention/secure/lib/libcrypto/man/BN_add.3 user/attilio/vmcontention/secure/lib/libcrypto/man/BN_add_word.3 user/attilio/vmcontention/secure/lib/libcrypto/man/BN_bn2bin.3 user/attilio/vmcontention/secure/lib/libcrypto/man/BN_cmp.3 user/attilio/vmcontention/secure/lib/libcrypto/man/BN_copy.3 user/attilio/vmcontention/secure/lib/libcrypto/man/BN_generate_prime.3 user/attilio/vmcontention/secure/lib/libcrypto/man/BN_mod_inverse.3 user/attilio/vmcontention/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 user/attilio/vmcontention/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 user/attilio/vmcontention/secure/lib/libcrypto/man/BN_new.3 user/attilio/vmcontention/secure/lib/libcrypto/man/BN_num_bytes.3 user/attilio/vmcontention/secure/lib/libcrypto/man/BN_rand.3 user/attilio/vmcontention/secure/lib/libcrypto/man/BN_set_bit.3 user/attilio/vmcontention/secure/lib/libcrypto/man/BN_swap.3 user/attilio/vmcontention/secure/lib/libcrypto/man/BN_zero.3 user/attilio/vmcontention/secure/lib/libcrypto/man/CMS_add0_cert.3 user/attilio/vmcontention/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 user/attilio/vmcontention/secure/lib/libcrypto/man/CMS_compress.3 user/attilio/vmcontention/secure/lib/libcrypto/man/CMS_decrypt.3 user/attilio/vmcontention/secure/lib/libcrypto/man/CMS_encrypt.3 user/attilio/vmcontention/secure/lib/libcrypto/man/CMS_final.3 user/attilio/vmcontention/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 user/attilio/vmcontention/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 user/attilio/vmcontention/secure/lib/libcrypto/man/CMS_get0_type.3 user/attilio/vmcontention/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 user/attilio/vmcontention/secure/lib/libcrypto/man/CMS_sign.3 user/attilio/vmcontention/secure/lib/libcrypto/man/CMS_sign_add1_signer.3 user/attilio/vmcontention/secure/lib/libcrypto/man/CMS_sign_receipt.3 user/attilio/vmcontention/secure/lib/libcrypto/man/CMS_uncompress.3 user/attilio/vmcontention/secure/lib/libcrypto/man/CMS_verify.3 user/attilio/vmcontention/secure/lib/libcrypto/man/CMS_verify_receipt.3 user/attilio/vmcontention/secure/lib/libcrypto/man/CONF_modules_free.3 user/attilio/vmcontention/secure/lib/libcrypto/man/CONF_modules_load_file.3 user/attilio/vmcontention/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 user/attilio/vmcontention/secure/lib/libcrypto/man/DH_generate_key.3 user/attilio/vmcontention/secure/lib/libcrypto/man/DH_generate_parameters.3 user/attilio/vmcontention/secure/lib/libcrypto/man/DH_get_ex_new_index.3 user/attilio/vmcontention/secure/lib/libcrypto/man/DH_new.3 user/attilio/vmcontention/secure/lib/libcrypto/man/DH_set_method.3 user/attilio/vmcontention/secure/lib/libcrypto/man/DH_size.3 user/attilio/vmcontention/secure/lib/libcrypto/man/DSA_SIG_new.3 user/attilio/vmcontention/secure/lib/libcrypto/man/DSA_do_sign.3 user/attilio/vmcontention/secure/lib/libcrypto/man/DSA_dup_DH.3 user/attilio/vmcontention/secure/lib/libcrypto/man/DSA_generate_key.3 user/attilio/vmcontention/secure/lib/libcrypto/man/DSA_generate_parameters.3 user/attilio/vmcontention/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 user/attilio/vmcontention/secure/lib/libcrypto/man/DSA_new.3 user/attilio/vmcontention/secure/lib/libcrypto/man/DSA_set_method.3 user/attilio/vmcontention/secure/lib/libcrypto/man/DSA_sign.3 user/attilio/vmcontention/secure/lib/libcrypto/man/DSA_size.3 user/attilio/vmcontention/secure/lib/libcrypto/man/ERR_GET_LIB.3 user/attilio/vmcontention/secure/lib/libcrypto/man/ERR_clear_error.3 user/attilio/vmcontention/secure/lib/libcrypto/man/ERR_error_string.3 user/attilio/vmcontention/secure/lib/libcrypto/man/ERR_get_error.3 user/attilio/vmcontention/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 user/attilio/vmcontention/secure/lib/libcrypto/man/ERR_load_strings.3 user/attilio/vmcontention/secure/lib/libcrypto/man/ERR_print_errors.3 user/attilio/vmcontention/secure/lib/libcrypto/man/ERR_put_error.3 user/attilio/vmcontention/secure/lib/libcrypto/man/ERR_remove_state.3 user/attilio/vmcontention/secure/lib/libcrypto/man/ERR_set_mark.3 user/attilio/vmcontention/secure/lib/libcrypto/man/EVP_BytesToKey.3 user/attilio/vmcontention/secure/lib/libcrypto/man/EVP_DigestInit.3 user/attilio/vmcontention/secure/lib/libcrypto/man/EVP_DigestSignInit.3 user/attilio/vmcontention/secure/lib/libcrypto/man/EVP_DigestVerifyInit.3 user/attilio/vmcontention/secure/lib/libcrypto/man/EVP_EncryptInit.3 user/attilio/vmcontention/secure/lib/libcrypto/man/EVP_OpenInit.3 user/attilio/vmcontention/secure/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 user/attilio/vmcontention/secure/lib/libcrypto/man/EVP_PKEY_CTX_new.3 user/attilio/vmcontention/secure/lib/libcrypto/man/EVP_PKEY_cmp.3 user/attilio/vmcontention/secure/lib/libcrypto/man/EVP_PKEY_decrypt.3 user/attilio/vmcontention/secure/lib/libcrypto/man/EVP_PKEY_derive.3 user/attilio/vmcontention/secure/lib/libcrypto/man/EVP_PKEY_encrypt.3 user/attilio/vmcontention/secure/lib/libcrypto/man/EVP_PKEY_get_default_digest.3 user/attilio/vmcontention/secure/lib/libcrypto/man/EVP_PKEY_keygen.3 user/attilio/vmcontention/secure/lib/libcrypto/man/EVP_PKEY_new.3 user/attilio/vmcontention/secure/lib/libcrypto/man/EVP_PKEY_print_private.3 user/attilio/vmcontention/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 user/attilio/vmcontention/secure/lib/libcrypto/man/EVP_PKEY_sign.3 user/attilio/vmcontention/secure/lib/libcrypto/man/EVP_PKEY_verify.3 user/attilio/vmcontention/secure/lib/libcrypto/man/EVP_SealInit.3 user/attilio/vmcontention/secure/lib/libcrypto/man/EVP_SignInit.3 user/attilio/vmcontention/secure/lib/libcrypto/man/EVP_VerifyInit.3 user/attilio/vmcontention/secure/lib/libcrypto/man/OBJ_nid2obj.3 user/attilio/vmcontention/secure/lib/libcrypto/man/OPENSSL_Applink.3 user/attilio/vmcontention/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 user/attilio/vmcontention/secure/lib/libcrypto/man/OPENSSL_config.3 user/attilio/vmcontention/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 user/attilio/vmcontention/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 user/attilio/vmcontention/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 user/attilio/vmcontention/secure/lib/libcrypto/man/PEM_write_bio_CMS_stream.3 user/attilio/vmcontention/secure/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3 user/attilio/vmcontention/secure/lib/libcrypto/man/PKCS12_create.3 user/attilio/vmcontention/secure/lib/libcrypto/man/PKCS12_parse.3 user/attilio/vmcontention/secure/lib/libcrypto/man/PKCS7_decrypt.3 user/attilio/vmcontention/secure/lib/libcrypto/man/PKCS7_encrypt.3 user/attilio/vmcontention/secure/lib/libcrypto/man/PKCS7_sign.3 user/attilio/vmcontention/secure/lib/libcrypto/man/PKCS7_sign_add_signer.3 user/attilio/vmcontention/secure/lib/libcrypto/man/PKCS7_verify.3 user/attilio/vmcontention/secure/lib/libcrypto/man/RAND_add.3 user/attilio/vmcontention/secure/lib/libcrypto/man/RAND_bytes.3 user/attilio/vmcontention/secure/lib/libcrypto/man/RAND_cleanup.3 user/attilio/vmcontention/secure/lib/libcrypto/man/RAND_egd.3 user/attilio/vmcontention/secure/lib/libcrypto/man/RAND_load_file.3 user/attilio/vmcontention/secure/lib/libcrypto/man/RAND_set_rand_method.3 user/attilio/vmcontention/secure/lib/libcrypto/man/RSA_blinding_on.3 user/attilio/vmcontention/secure/lib/libcrypto/man/RSA_check_key.3 user/attilio/vmcontention/secure/lib/libcrypto/man/RSA_generate_key.3 user/attilio/vmcontention/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 user/attilio/vmcontention/secure/lib/libcrypto/man/RSA_new.3 user/attilio/vmcontention/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 user/attilio/vmcontention/secure/lib/libcrypto/man/RSA_print.3 user/attilio/vmcontention/secure/lib/libcrypto/man/RSA_private_encrypt.3 user/attilio/vmcontention/secure/lib/libcrypto/man/RSA_public_encrypt.3 user/attilio/vmcontention/secure/lib/libcrypto/man/RSA_set_method.3 user/attilio/vmcontention/secure/lib/libcrypto/man/RSA_sign.3 user/attilio/vmcontention/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 user/attilio/vmcontention/secure/lib/libcrypto/man/RSA_size.3 user/attilio/vmcontention/secure/lib/libcrypto/man/SMIME_read_CMS.3 user/attilio/vmcontention/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 user/attilio/vmcontention/secure/lib/libcrypto/man/SMIME_write_CMS.3 user/attilio/vmcontention/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 user/attilio/vmcontention/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 user/attilio/vmcontention/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 user/attilio/vmcontention/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 user/attilio/vmcontention/secure/lib/libcrypto/man/X509_NAME_print_ex.3 user/attilio/vmcontention/secure/lib/libcrypto/man/X509_STORE_CTX_get_error.3 user/attilio/vmcontention/secure/lib/libcrypto/man/X509_STORE_CTX_get_ex_new_index.3 user/attilio/vmcontention/secure/lib/libcrypto/man/X509_STORE_CTX_new.3 user/attilio/vmcontention/secure/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 user/attilio/vmcontention/secure/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 user/attilio/vmcontention/secure/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 user/attilio/vmcontention/secure/lib/libcrypto/man/X509_new.3 user/attilio/vmcontention/secure/lib/libcrypto/man/X509_verify_cert.3 user/attilio/vmcontention/secure/lib/libcrypto/man/bio.3 user/attilio/vmcontention/secure/lib/libcrypto/man/blowfish.3 user/attilio/vmcontention/secure/lib/libcrypto/man/bn.3 user/attilio/vmcontention/secure/lib/libcrypto/man/bn_internal.3 user/attilio/vmcontention/secure/lib/libcrypto/man/buffer.3 user/attilio/vmcontention/secure/lib/libcrypto/man/crypto.3 user/attilio/vmcontention/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 user/attilio/vmcontention/secure/lib/libcrypto/man/d2i_DHparams.3 user/attilio/vmcontention/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 user/attilio/vmcontention/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 user/attilio/vmcontention/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 user/attilio/vmcontention/secure/lib/libcrypto/man/d2i_X509.3 user/attilio/vmcontention/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 user/attilio/vmcontention/secure/lib/libcrypto/man/d2i_X509_CRL.3 user/attilio/vmcontention/secure/lib/libcrypto/man/d2i_X509_NAME.3 user/attilio/vmcontention/secure/lib/libcrypto/man/d2i_X509_REQ.3 user/attilio/vmcontention/secure/lib/libcrypto/man/d2i_X509_SIG.3 user/attilio/vmcontention/secure/lib/libcrypto/man/des.3 user/attilio/vmcontention/secure/lib/libcrypto/man/dh.3 user/attilio/vmcontention/secure/lib/libcrypto/man/dsa.3 user/attilio/vmcontention/secure/lib/libcrypto/man/ecdsa.3 user/attilio/vmcontention/secure/lib/libcrypto/man/engine.3 user/attilio/vmcontention/secure/lib/libcrypto/man/err.3 user/attilio/vmcontention/secure/lib/libcrypto/man/evp.3 user/attilio/vmcontention/secure/lib/libcrypto/man/hmac.3 user/attilio/vmcontention/secure/lib/libcrypto/man/i2d_CMS_bio_stream.3 user/attilio/vmcontention/secure/lib/libcrypto/man/i2d_PKCS7_bio_stream.3 user/attilio/vmcontention/secure/lib/libcrypto/man/lh_stats.3 user/attilio/vmcontention/secure/lib/libcrypto/man/lhash.3 user/attilio/vmcontention/secure/lib/libcrypto/man/md5.3 user/attilio/vmcontention/secure/lib/libcrypto/man/mdc2.3 user/attilio/vmcontention/secure/lib/libcrypto/man/pem.3 user/attilio/vmcontention/secure/lib/libcrypto/man/rand.3 user/attilio/vmcontention/secure/lib/libcrypto/man/rc4.3 user/attilio/vmcontention/secure/lib/libcrypto/man/ripemd.3 user/attilio/vmcontention/secure/lib/libcrypto/man/rsa.3 user/attilio/vmcontention/secure/lib/libcrypto/man/sha.3 user/attilio/vmcontention/secure/lib/libcrypto/man/threads.3 user/attilio/vmcontention/secure/lib/libcrypto/man/ui.3 user/attilio/vmcontention/secure/lib/libcrypto/man/ui_compat.3 user/attilio/vmcontention/secure/lib/libcrypto/man/x509.3 user/attilio/vmcontention/secure/lib/libssl/Makefile user/attilio/vmcontention/secure/lib/libssl/man/SSL_CIPHER_get_name.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_CTX_add_session.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_CTX_ctrl.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_CTX_free.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_CTX_new.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_CTX_sess_number.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_CTX_sessions.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_CTX_set_mode.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_CTX_set_options.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_CTX_set_psk_client_callback.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_CTX_set_timeout.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_CTX_set_verify.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_CTX_use_certificate.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_CTX_use_psk_identity_hint.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_SESSION_free.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_SESSION_get_time.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_accept.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_alert_type_string.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_clear.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_connect.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_do_handshake.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_free.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_get_SSL_CTX.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_get_ciphers.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_get_client_CA_list.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_get_current_cipher.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_get_default_timeout.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_get_error.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_get_ex_new_index.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_get_fd.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_get_peer_certificate.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_get_psk_identity.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_get_rbio.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_get_session.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_get_verify_result.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_get_version.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_library_init.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_load_client_CA_file.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_new.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_pending.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_read.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_rstate_string.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_session_reused.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_set_bio.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_set_connect_state.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_set_fd.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_set_session.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_set_shutdown.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_set_verify_result.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_shutdown.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_state_string.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_want.3 user/attilio/vmcontention/secure/lib/libssl/man/SSL_write.3 user/attilio/vmcontention/secure/lib/libssl/man/d2i_SSL_SESSION.3 user/attilio/vmcontention/secure/lib/libssl/man/ssl.3 user/attilio/vmcontention/secure/usr.bin/openssl/man/CA.pl.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/asn1parse.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/ca.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/ciphers.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/cms.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/crl.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/crl2pkcs7.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/dgst.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/dhparam.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/dsa.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/dsaparam.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/ec.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/ecparam.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/enc.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/errstr.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/gendsa.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/genpkey.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/genrsa.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/nseq.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/ocsp.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/openssl.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/passwd.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/pkcs12.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/pkcs7.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/pkcs8.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/pkey.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/pkeyparam.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/pkeyutl.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/rand.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/req.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/rsa.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/rsautl.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/s_client.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/s_server.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/s_time.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/sess_id.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/smime.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/speed.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/spkac.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/ts.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/tsget.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/verify.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/version.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/x509.1 user/attilio/vmcontention/secure/usr.bin/openssl/man/x509v3_config.1 user/attilio/vmcontention/share/man/man4/run.4 user/attilio/vmcontention/share/man/man9/mbuf_tags.9 user/attilio/vmcontention/share/misc/committers-ports.dot user/attilio/vmcontention/sys/amd64/vmm/x86.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c user/attilio/vmcontention/sys/conf/files user/attilio/vmcontention/sys/dev/ath/if_ath.c user/attilio/vmcontention/sys/dev/ath/if_ath_misc.h user/attilio/vmcontention/sys/dev/ath/if_ath_tx.c user/attilio/vmcontention/sys/dev/ath/if_athvar.h user/attilio/vmcontention/sys/dev/usb/controller/usb_controller.c user/attilio/vmcontention/sys/dev/usb/serial/uftdi.c user/attilio/vmcontention/sys/dev/usb/usb_dev.c user/attilio/vmcontention/sys/dev/usb/usb_dev.h user/attilio/vmcontention/sys/dev/usb/usb_device.c user/attilio/vmcontention/sys/dev/usb/usb_device.h user/attilio/vmcontention/sys/dev/usb/usb_generic.c user/attilio/vmcontention/sys/dev/usb/usb_handle_request.c user/attilio/vmcontention/sys/dev/usb/usb_hub.c user/attilio/vmcontention/sys/dev/usb/usb_ioctl.h user/attilio/vmcontention/sys/dev/usb/usb_request.c user/attilio/vmcontention/sys/dev/usb/usbdevs user/attilio/vmcontention/sys/dev/usb/wlan/if_upgt.c user/attilio/vmcontention/sys/dev/usb/wlan/if_upgtvar.h user/attilio/vmcontention/sys/kern/kern_descrip.c user/attilio/vmcontention/sys/powerpc/booke/platform_bare.c user/attilio/vmcontention/sys/powerpc/include/platformvar.h user/attilio/vmcontention/sys/powerpc/powermac/platform_powermac.c user/attilio/vmcontention/sys/powerpc/ps3/platform_ps3.c user/attilio/vmcontention/sys/powerpc/wii/platform_wii.c user/attilio/vmcontention/sys/sys/param.h user/attilio/vmcontention/usr.bin/gprof/aout.c user/attilio/vmcontention/usr.bin/gprof/arcs.c user/attilio/vmcontention/usr.bin/gprof/dfn.c user/attilio/vmcontention/usr.bin/gprof/gprof.c user/attilio/vmcontention/usr.bin/gprof/gprof.h user/attilio/vmcontention/usr.bin/gprof/hertz.c user/attilio/vmcontention/usr.bin/gprof/kernel.c user/attilio/vmcontention/usr.bin/gprof/lookup.c user/attilio/vmcontention/usr.bin/gprof/printgprof.c user/attilio/vmcontention/usr.bin/gprof/printlist.c user/attilio/vmcontention/usr.bin/xinstall/Makefile user/attilio/vmcontention/usr.sbin/kgmon/kgmon.c user/attilio/vmcontention/usr.sbin/nfsd/nfsd.c user/attilio/vmcontention/usr.sbin/pkg/pkg.c user/attilio/vmcontention/usr.sbin/usbconfig/dump.c Directory Properties: user/attilio/vmcontention/ (props changed) user/attilio/vmcontention/crypto/openssl/ (props changed) user/attilio/vmcontention/lib/libc/ (props changed) user/attilio/vmcontention/share/man/man4/ (props changed) user/attilio/vmcontention/sys/ (props changed) user/attilio/vmcontention/sys/amd64/vmm/ (props changed) user/attilio/vmcontention/sys/cddl/contrib/opensolaris/ (props changed) user/attilio/vmcontention/sys/conf/ (props changed) Modified: user/attilio/vmcontention/Makefile.inc1 ============================================================================== --- user/attilio/vmcontention/Makefile.inc1 Thu Feb 14 15:25:31 2013 (r246796) +++ user/attilio/vmcontention/Makefile.inc1 Thu Feb 14 15:35:58 2013 (r246797) @@ -1207,6 +1207,7 @@ bootstrap-tools: ${_sed} \ ${_yacc} \ ${_lex} \ + lib/libmd \ usr.bin/xinstall \ ${_gensnmptree} \ usr.sbin/config \ Modified: user/attilio/vmcontention/crypto/openssl/CHANGES ============================================================================== --- user/attilio/vmcontention/crypto/openssl/CHANGES Thu Feb 14 15:25:31 2013 (r246796) +++ user/attilio/vmcontention/crypto/openssl/CHANGES Thu Feb 14 15:35:58 2013 (r246797) @@ -2,6 +2,53 @@ OpenSSL CHANGES _______________ + Changes between 1.0.1d and 1.0.1e [11 Feb 2013] + + *) + + Changes between 1.0.1c and 1.0.1d [5 Feb 2013] + + *) Make the decoding of SSLv3, TLS and DTLS CBC records constant time. + + This addresses the flaw in CBC record processing discovered by + Nadhem Alfardan and Kenny Paterson. Details of this attack can be found + at: http://www.isg.rhul.ac.uk/tls/ + + Thanks go to Nadhem Alfardan and Kenny Paterson of the Information + Security Group at Royal Holloway, University of London + (www.isg.rhul.ac.uk) for discovering this flaw and Adam Langley and + Emilia Käsper for the initial patch. + (CVE-2013-0169) + [Emilia Käsper, Adam Langley, Ben Laurie, Andy Polyakov, Steve Henson] + + *) Fix flaw in AESNI handling of TLS 1.2 and 1.1 records for CBC mode + ciphersuites which can be exploited in a denial of service attack. + Thanks go to and to Adam Langley for discovering + and detecting this bug and to Wolfgang Ettlinger + for independently discovering this issue. + (CVE-2012-2686) + [Adam Langley] + + *) Return an error when checking OCSP signatures when key is NULL. + This fixes a DoS attack. (CVE-2013-0166) + [Steve Henson] + + *) Make openssl verify return errors. + [Chris Palmer and Ben Laurie] + + *) Call OCSP Stapling callback after ciphersuite has been chosen, so + the right response is stapled. Also change SSL_get_certificate() + so it returns the certificate actually sent. + See http://rt.openssl.org/Ticket/Display.html?id=2836. + [Rob Stradling ] + + *) Fix possible deadlock when decoding public keys. + [Steve Henson] + + *) Don't use TLS 1.0 record version number in initial client hello + if renegotiating. + [Steve Henson] + Changes between 1.0.1b and 1.0.1c [10 May 2012] *) Sanity check record length before skipping explicit IV in TLS Modified: user/attilio/vmcontention/crypto/openssl/Configure ============================================================================== --- user/attilio/vmcontention/crypto/openssl/Configure Thu Feb 14 15:25:31 2013 (r246796) +++ user/attilio/vmcontention/crypto/openssl/Configure Thu Feb 14 15:35:58 2013 (r246797) @@ -171,20 +171,22 @@ my %table=( "debug-ben-openbsd","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::", "debug-ben-openbsd-debug","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -g3 -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::", "debug-ben-debug", "gcc44:$gcc_devteam_warn -DBN_DEBUG -DCONF_DEBUG -DDEBUG_SAFESTACK -DDEBUG_UNUSED -g3 -O2 -pipe::(unknown)::::::", +"debug-ben-debug-64", "gcc:$gcc_devteam_warn -Wno-error=overlength-strings -DBN_DEBUG -DCONF_DEBUG -DDEBUG_SAFESTACK -DDEBUG_UNUSED -g3 -O3 -pipe::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-ben-macos", "cc:$gcc_devteam_warn -arch i386 -DBN_DEBUG -DCONF_DEBUG -DDEBUG_SAFESTACK -DDEBUG_UNUSED -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -O3 -DL_ENDIAN -g3 -pipe::(unknown)::-Wl,-search_paths_first::::", "debug-ben-macos-gcc46", "gcc-mp-4.6:$gcc_devteam_warn -Wconversion -DBN_DEBUG -DCONF_DEBUG -DDEBUG_SAFESTACK -DDEBUG_UNUSED -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -O3 -DL_ENDIAN -g3 -pipe::(unknown)::::::", +"debug-ben-darwin64","cc:$gcc_devteam_warn -Wno-language-extension-token -Wno-extended-offsetof -arch x86_64 -O3 -DL_ENDIAN -Wall::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:".eval{my $asm=$x86_64_asm;$asm=~s/rc4\-[^:]+//;$asm}.":macosx:dlfcn:darwin-shared:-fPIC -fno-common:-arch x86_64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", "debug-ben-no-opt", "gcc: -Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG -Werror -DL_ENDIAN -DTERMIOS -Wall -g3::(unknown)::::::", "debug-ben-strict", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DCONST_STRICT -O2 -Wall -Wshadow -Werror -Wpointer-arith -Wcast-qual -Wwrite-strings -pipe::(unknown)::::::", "debug-rse","cc:-DTERMIOS -DL_ENDIAN -pipe -O -g -ggdb3 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}", "debug-bodo", "gcc:$gcc_devteam_warn -DBN_DEBUG -DBN_DEBUG_RAND -DCONF_DEBUG -DBIO_PAIR_DEBUG -m64 -DL_ENDIAN -DTERMIO -g -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", "debug-ulf", "gcc:-DTERMIOS -DL_ENDIAN -march=i486 -Wall -DBN_DEBUG -DBN_DEBUG_RAND -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -g -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations:::CYGWIN32:::${no_asm}:win32:cygwin-shared:::.dll", -"debug-steve64", "gcc:$gcc_devteam_warn -m64 -DL_ENDIAN -DTERMIO -DCONF_DEBUG -DDEBUG_SAFESTACK -g::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"debug-steve64", "gcc:$gcc_devteam_warn -m64 -DL_ENDIAN -DTERMIO -DCONF_DEBUG -DDEBUG_SAFESTACK -Wno-overlength-strings -g::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-steve32", "gcc:$gcc_devteam_warn -m32 -DL_ENDIAN -DCONF_DEBUG -DDEBUG_SAFESTACK -g -pipe::-D_REENTRANT::-rdynamic -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC:-m32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-steve-opt", "gcc:$gcc_devteam_warn -m64 -O3 -DL_ENDIAN -DTERMIO -DCONF_DEBUG -DDEBUG_SAFESTACK -g::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-levitte-linux-elf","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-levitte-linux-noasm","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-levitte-linux-elf-extreme","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-levitte-linux-noasm-extreme","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"debug-levitte-linux-elf","gcc:-DLEVITTE_DEBUG -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -ggdb -g3 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"debug-levitte-linux-noasm","gcc:-DLEVITTE_DEBUG -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -ggdb -g3 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"debug-levitte-linux-elf-extreme","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DL_ENDIAN -DTERMIO -DPEDANTIC -ggdb -g3 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"debug-levitte-linux-noasm-extreme","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DTERMIO -DPEDANTIC -ggdb -g3 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-geoff32","gcc:-DBN_DEBUG -DBN_DEBUG_RAND -DBN_STRICT -DPURIFY -DOPENSSL_NO_DEPRECATED -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -DL_ENDIAN -DTERMIO -DPEDANTIC -O1 -ggdb2 -Wall -Werror -Wundef -pedantic -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare -Wmissing-prototypes -Wmissing-declarations -Wno-long-long::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-geoff64","gcc:-DBN_DEBUG -DBN_DEBUG_RAND -DBN_STRICT -DPURIFY -DOPENSSL_NO_DEPRECATED -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -DL_ENDIAN -DTERMIO -DPEDANTIC -O1 -ggdb2 -Wall -Werror -Wundef -pedantic -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare -Wmissing-prototypes -Wmissing-declarations -Wno-long-long::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-linux-pentium","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -mcpu=pentium -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn", @@ -243,7 +245,7 @@ my %table=( "solaris-sparcv7-cc","cc:-xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${no_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "solaris-sparcv8-cc","cc:-xarch=v8 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv8_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "solaris-sparcv9-cc","cc:-xtarget=ultra -xarch=v8plus -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"solaris64-sparcv9-cc","cc:-xtarget=ultra -xarch=v9 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:solaris-shared:-KPIC:-xarch=v9 -G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):/usr/ccs/bin/ar rs::/64", +"solaris64-sparcv9-cc","cc:-xtarget=ultra -xarch=v9 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:solaris-shared:-KPIC:-xarch=v9 -G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::/64", #### "debug-solaris-sparcv8-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -xarch=v8 -g -O -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv8_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-solaris-sparcv9-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -xtarget=ultra -xarch=v8plus -g -O -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", @@ -464,8 +466,8 @@ my %table=( "aix64-gcc","gcc:-maix64 -O -DB_ENDIAN::-pthread:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR:${ppc64_asm}:aix64:dlfcn:aix-shared::-maix64 -shared -Wl,-G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X64", # Below targets assume AIX 5. Idea is to effectively disregard $OBJECT_MODE # at build time. $OBJECT_MODE is respected at ./config stage! -"aix-cc", "cc:-q32 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst::-qthreaded:AIX::BN_LLONG RC4_CHAR:${ppc32_asm}:aix32:dlfcn:aix-shared::-q32 -G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 32", -"aix64-cc", "cc:-q64 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst::-qthreaded:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR:${ppc64_asm}:aix64:dlfcn:aix-shared::-q64 -G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 64", +"aix-cc", "cc:-q32 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst::-qthreaded -D_THREAD_SAFE:AIX::BN_LLONG RC4_CHAR:${ppc32_asm}:aix32:dlfcn:aix-shared::-q32 -G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 32", +"aix64-cc", "cc:-q64 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst::-qthreaded -D_THREAD_SAFE:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR:${ppc64_asm}:aix64:dlfcn:aix-shared::-q64 -G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 64", # # Cray T90 and similar (SDSC) Modified: user/attilio/vmcontention/crypto/openssl/FAQ ============================================================================== --- user/attilio/vmcontention/crypto/openssl/FAQ Thu Feb 14 15:25:31 2013 (r246796) +++ user/attilio/vmcontention/crypto/openssl/FAQ Thu Feb 14 15:35:58 2013 (r246797) @@ -83,11 +83,11 @@ OpenSSL - Frequently Asked Questions * Which is the current version of OpenSSL? The current version is available from . -OpenSSL 1.0.1c was released on May 10th, 2012. +OpenSSL 1.0.1e was released on Feb 11th, 2013. In addition to the current stable release, you can also access daily snapshots of the OpenSSL development version at , or get it by anonymous CVS access. +ftp://ftp.openssl.org/snapshot/>, or get it by anonymous Git access. * Where is the documentation? Modified: user/attilio/vmcontention/crypto/openssl/Makefile ============================================================================== --- user/attilio/vmcontention/crypto/openssl/Makefile Thu Feb 14 15:25:31 2013 (r246796) +++ user/attilio/vmcontention/crypto/openssl/Makefile Thu Feb 14 15:35:58 2013 (r246797) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=1.0.1c +VERSION=1.0.1e MAJOR=1 MINOR=0.1 SHLIB_VERSION_NUMBER=1.0.0 @@ -71,7 +71,7 @@ RANLIB= /usr/bin/ranlib NM= nm PERL= /usr/bin/perl TAR= tar -TARFLAGS= --no-recursion +TARFLAGS= --no-recursion --record-size=10240 MAKEDEPPROG=makedepend LIBDIR=lib @@ -446,7 +446,7 @@ rehash.time: certs apps [ -x "apps/openssl.exe" ] && OPENSSL="apps/openssl.exe" || :; \ OPENSSL_DEBUG_MEMORY=on; \ export OPENSSL OPENSSL_DEBUG_MEMORY; \ - $(PERL) tools/c_rehash certs) && \ + $(PERL) tools/c_rehash certs/demo) && \ touch rehash.time; \ else :; fi Modified: user/attilio/vmcontention/crypto/openssl/Makefile.org ============================================================================== --- user/attilio/vmcontention/crypto/openssl/Makefile.org Thu Feb 14 15:25:31 2013 (r246796) +++ user/attilio/vmcontention/crypto/openssl/Makefile.org Thu Feb 14 15:35:58 2013 (r246797) @@ -69,7 +69,7 @@ RANLIB= ranlib NM= nm PERL= perl TAR= tar -TARFLAGS= --no-recursion +TARFLAGS= --no-recursion --record-size=10240 MAKEDEPPROG=makedepend LIBDIR=lib @@ -444,7 +444,7 @@ rehash.time: certs apps [ -x "apps/openssl.exe" ] && OPENSSL="apps/openssl.exe" || :; \ OPENSSL_DEBUG_MEMORY=on; \ export OPENSSL OPENSSL_DEBUG_MEMORY; \ - $(PERL) tools/c_rehash certs) && \ + $(PERL) tools/c_rehash certs/demo) && \ touch rehash.time; \ else :; fi Modified: user/attilio/vmcontention/crypto/openssl/NEWS ============================================================================== --- user/attilio/vmcontention/crypto/openssl/NEWS Thu Feb 14 15:25:31 2013 (r246796) +++ user/attilio/vmcontention/crypto/openssl/NEWS Thu Feb 14 15:35:58 2013 (r246797) @@ -5,6 +5,18 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.0.1d and OpenSSL 1.0.1e: + + o Corrected fix for CVE-2013-0169 + + Major changes between OpenSSL 1.0.1c and OpenSSL 1.0.1d: + + o Fix renegotiation in TLS 1.1, 1.2 by using the correct TLS version. + o Include the fips configuration module. + o Fix OCSP bad key DoS attack CVE-2013-0166 + o Fix for SSL/TLS/DTLS CBC plaintext recovery attack CVE-2013-0169 + o Fix for TLS AESNI record handling flaw CVE-2012-2686 + Major changes between OpenSSL 1.0.1b and OpenSSL 1.0.1c: o Fix TLS/DTLS record length checking bug CVE-2012-2333 Modified: user/attilio/vmcontention/crypto/openssl/PROBLEMS ============================================================================== --- user/attilio/vmcontention/crypto/openssl/PROBLEMS Thu Feb 14 15:25:31 2013 (r246796) +++ user/attilio/vmcontention/crypto/openssl/PROBLEMS Thu Feb 14 15:35:58 2013 (r246797) @@ -197,3 +197,17 @@ reconfigure with additional no-sse2 [or We don't have framework to associate -ldl with no-dso, therefore the only way is to edit Makefile right after ./config no-dso and remove -ldl from EX_LIBS line. + +* hpux-parisc2-cc no-asm build fails with SEGV in ECDSA/DH. + +Compiler bug, presumably at particular patch level. Remaining +hpux*-parisc*-cc configurations can be affected too. Drop optimization +level to +O2 when compiling bn_nist.o. + +* solaris64-sparcv9-cc link failure + +Solaris 8 ar can fail to maintain symbol table in .a, which results in +link failures. Apply 109147-09 or later or modify Makefile generated +by ./Configure solaris64-sparcv9-cc and replace RANLIB assignment with + + RANLIB= /usr/ccs/bin/ar rs Modified: user/attilio/vmcontention/crypto/openssl/README ============================================================================== --- user/attilio/vmcontention/crypto/openssl/README Thu Feb 14 15:25:31 2013 (r246796) +++ user/attilio/vmcontention/crypto/openssl/README Thu Feb 14 15:35:58 2013 (r246797) @@ -1,5 +1,5 @@ - OpenSSL 1.0.1c 10 May 2012 + OpenSSL 1.0.1e 11 Feb 2013 Copyright (c) 1998-2011 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson @@ -190,7 +190,7 @@ reason as to why that feature isn't implemented. Patches should be as up to date as possible, preferably relative to the - current CVS or the last snapshot. They should follow the coding style of + current Git or the last snapshot. They should follow the coding style of OpenSSL and compile without warnings. Some of the core team developer targets can be used for testing purposes, (debug-steve64, debug-geoff etc). OpenSSL compiles on many varied platforms: try to ensure you only use portable Modified: user/attilio/vmcontention/crypto/openssl/apps/apps.c ============================================================================== --- user/attilio/vmcontention/crypto/openssl/apps/apps.c Thu Feb 14 15:25:31 2013 (r246796) +++ user/attilio/vmcontention/crypto/openssl/apps/apps.c Thu Feb 14 15:35:58 2013 (r246797) @@ -2132,7 +2132,7 @@ X509_NAME *parse_name(char *subject, lon X509_NAME *n = NULL; int nid; - if (!buf || !ne_types || !ne_values) + if (!buf || !ne_types || !ne_values || !mval) { BIO_printf(bio_err, "malloc error\n"); goto error; @@ -2236,6 +2236,7 @@ X509_NAME *parse_name(char *subject, lon OPENSSL_free(ne_values); OPENSSL_free(ne_types); OPENSSL_free(buf); + OPENSSL_free(mval); return n; error: @@ -2244,6 +2245,8 @@ error: OPENSSL_free(ne_values); if (ne_types) OPENSSL_free(ne_types); + if (mval) + OPENSSL_free(mval); if (buf) OPENSSL_free(buf); return NULL; Modified: user/attilio/vmcontention/crypto/openssl/apps/ca.c ============================================================================== --- user/attilio/vmcontention/crypto/openssl/apps/ca.c Thu Feb 14 15:25:31 2013 (r246796) +++ user/attilio/vmcontention/crypto/openssl/apps/ca.c Thu Feb 14 15:35:58 2013 (r246797) @@ -1408,6 +1408,7 @@ bad: if (!NCONF_get_number(conf,section, ENV_DEFAULT_CRL_HOURS, &crlhours)) crlhours = 0; + ERR_clear_error(); } if ((crldays == 0) && (crlhours == 0) && (crlsec == 0)) { Modified: user/attilio/vmcontention/crypto/openssl/apps/cms.c ============================================================================== --- user/attilio/vmcontention/crypto/openssl/apps/cms.c Thu Feb 14 15:25:31 2013 (r246796) +++ user/attilio/vmcontention/crypto/openssl/apps/cms.c Thu Feb 14 15:35:58 2013 (r246797) @@ -233,6 +233,8 @@ int MAIN(int argc, char **argv) else if (!strcmp(*args,"-camellia256")) cipher = EVP_camellia_256_cbc(); #endif + else if (!strcmp (*args, "-debug_decrypt")) + flags |= CMS_DEBUG_DECRYPT; else if (!strcmp (*args, "-text")) flags |= CMS_TEXT; else if (!strcmp (*args, "-nointern")) @@ -1039,6 +1041,8 @@ int MAIN(int argc, char **argv) ret = 4; if (operation == SMIME_DECRYPT) { + if (flags & CMS_DEBUG_DECRYPT) + CMS_decrypt(cms, NULL, NULL, NULL, NULL, flags); if (secret_key) { Modified: user/attilio/vmcontention/crypto/openssl/apps/dgst.c ============================================================================== --- user/attilio/vmcontention/crypto/openssl/apps/dgst.c Thu Feb 14 15:25:31 2013 (r246796) +++ user/attilio/vmcontention/crypto/openssl/apps/dgst.c Thu Feb 14 15:35:58 2013 (r246797) @@ -216,10 +216,10 @@ int MAIN(int argc, char **argv) out_bin = 1; else if (strcmp(*argv,"-d") == 0) debug=1; - else if (strcmp(*argv,"-non-fips-allow") == 0) - non_fips_allow=1; else if (!strcmp(*argv,"-fips-fingerprint")) hmac_key = "etaonrishdlcupfm"; + else if (strcmp(*argv,"-non-fips-allow") == 0) + non_fips_allow=1; else if (!strcmp(*argv,"-hmac")) { if (--argc < 1) Modified: user/attilio/vmcontention/crypto/openssl/apps/dhparam.c ============================================================================== --- user/attilio/vmcontention/crypto/openssl/apps/dhparam.c Thu Feb 14 15:25:31 2013 (r246796) +++ user/attilio/vmcontention/crypto/openssl/apps/dhparam.c Thu Feb 14 15:35:58 2013 (r246797) @@ -332,7 +332,6 @@ bad: BIO_printf(bio_err,"This is going to take a long time\n"); if(!dh || !DH_generate_parameters_ex(dh, num, g, &cb)) { - if(dh) DH_free(dh); ERR_print_errors(bio_err); goto end; } Modified: user/attilio/vmcontention/crypto/openssl/apps/dsaparam.c ============================================================================== --- user/attilio/vmcontention/crypto/openssl/apps/dsaparam.c Thu Feb 14 15:25:31 2013 (r246796) +++ user/attilio/vmcontention/crypto/openssl/apps/dsaparam.c Thu Feb 14 15:35:58 2013 (r246797) @@ -326,6 +326,7 @@ bad: goto end; } #endif + ERR_print_errors(bio_err); BIO_printf(bio_err,"Error, DSA key generation failed\n"); goto end; } @@ -429,13 +430,19 @@ bad: assert(need_rand); if ((dsakey=DSAparams_dup(dsa)) == NULL) goto end; - if (!DSA_generate_key(dsakey)) goto end; + if (!DSA_generate_key(dsakey)) + { + ERR_print_errors(bio_err); + DSA_free(dsakey); + goto end; + } if (outformat == FORMAT_ASN1) i=i2d_DSAPrivateKey_bio(out,dsakey); else if (outformat == FORMAT_PEM) i=PEM_write_bio_DSAPrivateKey(out,dsakey,NULL,NULL,0,NULL,NULL); else { BIO_printf(bio_err,"bad output format specified for outfile\n"); + DSA_free(dsakey); goto end; } DSA_free(dsakey); Modified: user/attilio/vmcontention/crypto/openssl/apps/genrsa.c ============================================================================== --- user/attilio/vmcontention/crypto/openssl/apps/genrsa.c Thu Feb 14 15:25:31 2013 (r246796) +++ user/attilio/vmcontention/crypto/openssl/apps/genrsa.c Thu Feb 14 15:35:58 2013 (r246797) @@ -78,7 +78,7 @@ #include #include -#define DEFBITS 512 +#define DEFBITS 1024 #undef PROG #define PROG genrsa_main Modified: user/attilio/vmcontention/crypto/openssl/apps/ocsp.c ============================================================================== --- user/attilio/vmcontention/crypto/openssl/apps/ocsp.c Thu Feb 14 15:25:31 2013 (r246796) +++ user/attilio/vmcontention/crypto/openssl/apps/ocsp.c Thu Feb 14 15:35:58 2013 (r246797) @@ -617,7 +617,7 @@ int MAIN(int argc, char **argv) BIO_printf (bio_err, "-ndays n number of days before next update\n"); BIO_printf (bio_err, "-resp_key_id identify reponse by signing certificate key ID\n"); BIO_printf (bio_err, "-nrequest n number of requests to accept (default unlimited)\n"); - BIO_printf (bio_err, "- use specified digest in the request"); + BIO_printf (bio_err, "- use specified digest in the request\n"); goto end; } Modified: user/attilio/vmcontention/crypto/openssl/apps/s_cb.c ============================================================================== --- user/attilio/vmcontention/crypto/openssl/apps/s_cb.c Thu Feb 14 15:25:31 2013 (r246796) +++ user/attilio/vmcontention/crypto/openssl/apps/s_cb.c Thu Feb 14 15:35:58 2013 (r246797) @@ -237,8 +237,8 @@ int set_cert_stuff(SSL_CTX *ctx, char *c /* If we are using DSA, we can copy the parameters from * the private key */ - - + + /* Now we know that a key and cert have been set against * the SSL context */ if (!SSL_CTX_check_private_key(ctx)) @@ -436,6 +436,8 @@ void MS_CALLBACK msg_cb(int write_p, int if (version == SSL3_VERSION || version == TLS1_VERSION || + version == TLS1_1_VERSION || + version == TLS1_2_VERSION || version == DTLS1_VERSION || version == DTLS1_BAD_VER) { Modified: user/attilio/vmcontention/crypto/openssl/apps/s_client.c ============================================================================== --- user/attilio/vmcontention/crypto/openssl/apps/s_client.c Thu Feb 14 15:25:31 2013 (r246796) +++ user/attilio/vmcontention/crypto/openssl/apps/s_client.c Thu Feb 14 15:35:58 2013 (r246797) @@ -357,12 +357,14 @@ static void sc_usage(void) BIO_printf(bio_err," -tlsextdebug - hex dump of all TLS extensions received\n"); BIO_printf(bio_err," -status - request certificate status from server\n"); BIO_printf(bio_err," -no_ticket - disable use of RFC4507bis session tickets\n"); -# if !defined(OPENSSL_NO_NEXTPROTONEG) +# ifndef OPENSSL_NO_NEXTPROTONEG BIO_printf(bio_err," -nextprotoneg arg - enable NPN extension, considering named protocols supported (comma-separated list)\n"); # endif #endif BIO_printf(bio_err," -legacy_renegotiation - enable use of legacy renegotiation (dangerous)\n"); +#ifndef OPENSSL_NO_SRTP BIO_printf(bio_err," -use_srtp profiles - Offer SRTP key management with a colon-separated profile list\n"); +#endif BIO_printf(bio_err," -keymatexport label - Export keying material using label\n"); BIO_printf(bio_err," -keymatexportlen len - Export len bytes of keying material (default 20)\n"); } @@ -502,7 +504,9 @@ static char * MS_CALLBACK ssl_give_srp_c } #endif +#ifndef OPENSSL_NO_SRTP char *srtp_profiles = NULL; +#endif # ifndef OPENSSL_NO_NEXTPROTONEG /* This the context that we pass to next_proto_cb */ @@ -536,7 +540,7 @@ static int next_proto_cb(SSL *s, unsigne ctx->status = SSL_select_next_proto(out, outlen, in, inlen, ctx->data, ctx->len); return SSL_TLSEXT_ERR_OK; } -# endif +# endif /* ndef OPENSSL_NO_NEXTPROTONEG */ #endif enum @@ -945,11 +949,13 @@ int MAIN(int argc, char **argv) jpake_secret = *++argv; } #endif +#ifndef OPENSSL_NO_SRTP else if (strcmp(*argv,"-use_srtp") == 0) { if (--argc < 1) goto bad; srtp_profiles = *(++argv); } +#endif else if (strcmp(*argv,"-keymatexport") == 0) { if (--argc < 1) goto bad; @@ -1130,6 +1136,8 @@ bad: BIO_printf(bio_c_out, "PSK key given or JPAKE in use, setting client callback\n"); SSL_CTX_set_psk_client_callback(ctx, psk_client_cb); } +#endif +#ifndef OPENSSL_NO_SRTP if (srtp_profiles != NULL) SSL_CTX_set_tlsext_use_srtp(ctx, srtp_profiles); #endif @@ -1890,6 +1898,10 @@ end: print_stuff(bio_c_out,con,1); SSL_free(con); } +#if !defined(OPENSSL_NO_TLSEXT) && !defined(OPENSSL_NO_NEXTPROTONEG) + if (next_proto.data) + OPENSSL_free(next_proto.data); +#endif if (ctx != NULL) SSL_CTX_free(ctx); if (cert) X509_free(cert); @@ -1897,6 +1909,8 @@ end: EVP_PKEY_free(key); if (pass) OPENSSL_free(pass); + if (vpm) + X509_VERIFY_PARAM_free(vpm); if (cbuf != NULL) { OPENSSL_cleanse(cbuf,BUFSIZZ); OPENSSL_free(cbuf); } if (sbuf != NULL) { OPENSSL_cleanse(sbuf,BUFSIZZ); OPENSSL_free(sbuf); } if (mbuf != NULL) { OPENSSL_cleanse(mbuf,BUFSIZZ); OPENSSL_free(mbuf); } @@ -2061,6 +2075,7 @@ static void print_stuff(BIO *bio, SSL *s } #endif +#ifndef OPENSSL_NO_SRTP { SRTP_PROTECTION_PROFILE *srtp_profile=SSL_get_selected_srtp_profile(s); @@ -2068,6 +2083,7 @@ static void print_stuff(BIO *bio, SSL *s BIO_printf(bio,"SRTP Extension negotiated, profile=%s\n", srtp_profile->name); } +#endif SSL_SESSION_print(bio,SSL_get_session(s)); if (keymatexportlabel != NULL) Modified: user/attilio/vmcontention/crypto/openssl/apps/s_server.c ============================================================================== --- user/attilio/vmcontention/crypto/openssl/apps/s_server.c Thu Feb 14 15:25:31 2013 (r246796) +++ user/attilio/vmcontention/crypto/openssl/apps/s_server.c Thu Feb 14 15:35:58 2013 (r246797) @@ -556,7 +556,9 @@ static void sv_usage(void) # ifndef OPENSSL_NO_NEXTPROTONEG BIO_printf(bio_err," -nextprotoneg arg - set the advertised protocols for the NPN extension (comma-separated list)\n"); # endif +# ifndef OPENSSL_NO_SRTP BIO_printf(bio_err," -use_srtp profiles - Offer SRTP key management with a colon-separated profile list\n"); +# endif #endif BIO_printf(bio_err," -keymatexport label - Export keying material using label\n"); BIO_printf(bio_err," -keymatexportlen len - Export len bytes of keying material (default 20)\n"); @@ -923,7 +925,9 @@ static char *jpake_secret = NULL; #ifndef OPENSSL_NO_SRP static srpsrvparm srp_callback_parm; #endif +#ifndef OPENSSL_NO_SRTP static char *srtp_profiles = NULL; +#endif int MAIN(int argc, char *argv[]) { @@ -1206,13 +1210,13 @@ int MAIN(int argc, char *argv[]) { if (--argc < 1) goto bad; srp_verifier_file = *(++argv); - meth=TLSv1_server_method(); + meth = TLSv1_server_method(); } else if (strcmp(*argv, "-srpuserseed") == 0) { if (--argc < 1) goto bad; srpuserseed = *(++argv); - meth=TLSv1_server_method(); + meth = TLSv1_server_method(); } #endif else if (strcmp(*argv,"-www") == 0) @@ -1319,11 +1323,13 @@ int MAIN(int argc, char *argv[]) jpake_secret = *(++argv); } #endif +#ifndef OPENSSL_NO_SRTP else if (strcmp(*argv,"-use_srtp") == 0) { if (--argc < 1) goto bad; srtp_profiles = *(++argv); } +#endif else if (strcmp(*argv,"-keymatexport") == 0) { if (--argc < 1) goto bad; @@ -1431,25 +1437,24 @@ bad: goto end; } } - -# ifndef OPENSSL_NO_NEXTPROTONEG - if (next_proto_neg_in) - { - unsigned short len; - next_proto.data = next_protos_parse(&len, - next_proto_neg_in); - if (next_proto.data == NULL) - goto end; - next_proto.len = len; - } - else - { - next_proto.data = NULL; - } -# endif #endif } +#if !defined(OPENSSL_NO_TLSEXT) && !defined(OPENSSL_NO_NEXTPROTONEG) + if (next_proto_neg_in) + { + unsigned short len; + next_proto.data = next_protos_parse(&len, next_proto_neg_in); + if (next_proto.data == NULL) + goto end; + next_proto.len = len; + } + else + { + next_proto.data = NULL; + } +#endif + if (s_dcert_file) { @@ -1550,8 +1555,10 @@ bad: else SSL_CTX_sess_set_cache_size(ctx,128); +#ifndef OPENSSL_NO_SRTP if (srtp_profiles != NULL) SSL_CTX_set_tlsext_use_srtp(ctx, srtp_profiles); +#endif #if 0 if (cipher == NULL) cipher=getenv("SSL_CIPHER"); @@ -1730,7 +1737,7 @@ bad: } #endif - if (!set_cert_key_stuff(ctx,s_cert,s_key)) + if (!set_cert_key_stuff(ctx, s_cert, s_key)) goto end; #ifndef OPENSSL_NO_TLSEXT if (ctx2 && !set_cert_key_stuff(ctx2,s_cert2,s_key2)) @@ -1738,7 +1745,7 @@ bad: #endif if (s_dcert != NULL) { - if (!set_cert_key_stuff(ctx,s_dcert,s_dkey)) + if (!set_cert_key_stuff(ctx, s_dcert, s_dkey)) goto end; } @@ -1893,7 +1900,15 @@ end: OPENSSL_free(pass); if (dpass) OPENSSL_free(dpass); + if (vpm) + X509_VERIFY_PARAM_free(vpm); #ifndef OPENSSL_NO_TLSEXT + if (tlscstatp.host) + OPENSSL_free(tlscstatp.host); + if (tlscstatp.port) + OPENSSL_free(tlscstatp.port); + if (tlscstatp.path) + OPENSSL_free(tlscstatp.path); if (ctx2 != NULL) SSL_CTX_free(ctx2); if (s_cert2) X509_free(s_cert2); @@ -2433,6 +2448,7 @@ static int init_ssl_connection(SSL *con) BIO_printf(bio_s_out,"Shared ciphers:%s\n",buf); str=SSL_CIPHER_get_name(SSL_get_current_cipher(con)); BIO_printf(bio_s_out,"CIPHER is %s\n",(str != NULL)?str:"(NONE)"); + #if !defined(OPENSSL_NO_TLSEXT) && !defined(OPENSSL_NO_NEXTPROTONEG) SSL_get0_next_proto_negotiated(con, &next_proto_neg, &next_proto_neg_len); if (next_proto_neg) @@ -2442,6 +2458,7 @@ static int init_ssl_connection(SSL *con) BIO_printf(bio_s_out, "\n"); } #endif +#ifndef OPENSSL_NO_SRTP { SRTP_PROTECTION_PROFILE *srtp_profile = SSL_get_selected_srtp_profile(con); @@ -2450,6 +2467,7 @@ static int init_ssl_connection(SSL *con) BIO_printf(bio_s_out,"SRTP Extension negotiated, profile=%s\n", srtp_profile->name); } +#endif if (SSL_cache_hit(con)) BIO_printf(bio_s_out,"Reused session-id\n"); if (SSL_ctrl(con,SSL_CTRL_GET_FLAGS,0,NULL) & TLS1_FLAGS_TLS_PADDING_BUG) @@ -2701,6 +2719,11 @@ static int www_body(char *hostname, int } BIO_puts(io,"\n"); + BIO_printf(io, + "Secure Renegotiation IS%s supported\n", + SSL_get_secure_renegotiation_support(con) ? + "" : " NOT"); + /* The following is evil and should not really * be done */ BIO_printf(io,"Ciphers supported in s_server binary\n"); Modified: user/attilio/vmcontention/crypto/openssl/apps/speed.c ============================================================================== --- user/attilio/vmcontention/crypto/openssl/apps/speed.c Thu Feb 14 15:25:31 2013 (r246796) +++ user/attilio/vmcontention/crypto/openssl/apps/speed.c Thu Feb 14 15:35:58 2013 (r246797) @@ -254,7 +254,7 @@ static const char *names[ALGOR_NUM]={ "aes-128 cbc","aes-192 cbc","aes-256 cbc", "camellia-128 cbc","camellia-192 cbc","camellia-256 cbc", "evp","sha256","sha512","whirlpool", - "aes-128 ige","aes-192 ige","aes-256 ige","ghash"}; + "aes-128 ige","aes-192 ige","aes-256 ige","ghash" }; static double results[ALGOR_NUM][SIZE_NUM]; static int lengths[SIZE_NUM]={16,64,256,1024,8*1024}; #ifndef OPENSSL_NO_RSA @@ -299,7 +299,7 @@ static SIGRETTYPE sig_done(int sig) #if defined(_WIN32) #if !defined(SIGALRM) -#define SIGALRM +# define SIGALRM #endif static unsigned int lapse,schlock; static void alarm_win32(unsigned int secs) { lapse = secs*1000; } Modified: user/attilio/vmcontention/crypto/openssl/apps/srp.c ============================================================================== --- user/attilio/vmcontention/crypto/openssl/apps/srp.c Thu Feb 14 15:25:31 2013 (r246796) +++ user/attilio/vmcontention/crypto/openssl/apps/srp.c Thu Feb 14 15:35:58 2013 (r246797) @@ -125,13 +125,13 @@ static int get_index(CA_DB *db, char* id if (type == DB_SRP_INDEX) for (i = 0; i < sk_OPENSSL_PSTRING_num(db->db->data); i++) { - pp = (char **)sk_OPENSSL_PSTRING_value(db->db->data, i); - if (pp[DB_srptype][0] == DB_SRP_INDEX && !strcmp(id, pp[DB_srpid])) + pp = sk_OPENSSL_PSTRING_value(db->db->data,i); + if (pp[DB_srptype][0] == DB_SRP_INDEX && !strcmp(id,pp[DB_srpid])) return i; } else for (i = 0; i < sk_OPENSSL_PSTRING_num(db->db->data); i++) { - pp = (char **)sk_OPENSSL_PSTRING_value(db->db->data, i); + pp = sk_OPENSSL_PSTRING_value(db->db->data,i); if (pp[DB_srptype][0] != DB_SRP_INDEX && !strcmp(id,pp[DB_srpid])) return i; @@ -145,7 +145,7 @@ static void print_entry(CA_DB *db, BIO * if (indx >= 0 && verbose) { int j; - char **pp = (char **)sk_OPENSSL_PSTRING_value(db->db->data, indx); + char **pp = sk_OPENSSL_PSTRING_value(db->db->data, indx); BIO_printf(bio, "%s \"%s\"\n", s, pp[DB_srpid]); for (j = 0; j < DB_NUMBER; j++) { @@ -163,7 +163,7 @@ static void print_user(CA_DB *db, BIO *b { if (verbose > 0) { - char **pp = (char **)sk_OPENSSL_PSTRING_value(db->db->data, userindex); + char **pp = sk_OPENSSL_PSTRING_value(db->db->data,userindex); if (pp[DB_srptype][0] != 'I') { @@ -517,7 +517,7 @@ bad: /* Lets check some fields */ for (i = 0; i < sk_OPENSSL_PSTRING_num(db->db->data); i++) { - pp = (char **)sk_OPENSSL_PSTRING_value(db->db->data, i); + pp = sk_OPENSSL_PSTRING_value(db->db->data, i); if (pp[DB_srptype][0] == DB_SRP_INDEX) { @@ -533,8 +533,8 @@ bad: if (gNindex >= 0) { - gNrow = (char **)sk_OPENSSL_PSTRING_value(db->db->data, gNindex); - print_entry(db, bio_err, gNindex, verbose > 1, "Default g and N") ; + gNrow = sk_OPENSSL_PSTRING_value(db->db->data,gNindex); + print_entry(db, bio_err, gNindex, verbose > 1, "Default g and N"); } else if (maxgN > 0 && !SRP_get_default_gN(gN)) { @@ -587,7 +587,7 @@ bad: if (userindex >= 0) { /* reactivation of a new user */ - char **row = (char **)sk_OPENSSL_PSTRING_value(db->db->data, userindex); + char **row = sk_OPENSSL_PSTRING_value(db->db->data, userindex); BIO_printf(bio_err, "user \"%s\" reactivated.\n", user); row[DB_srptype][0] = 'V'; @@ -634,7 +634,7 @@ bad: else { - char **row = (char **)sk_OPENSSL_PSTRING_value(db->db->data, userindex); + char **row = sk_OPENSSL_PSTRING_value(db->db->data, userindex); char type = row[DB_srptype][0]; if (type == 'v') { @@ -664,9 +664,9 @@ bad: if (!(gNid=srp_create_user(user,&(row[DB_srpverifier]), &(row[DB_srpsalt]),gNrow?gNrow[DB_srpsalt]:NULL, gNrow?gNrow[DB_srpverifier]:NULL, passout, bio_err,verbose))) { - BIO_printf(bio_err, "Cannot create srp verifier for user \"%s\", operation abandoned.\n", user); - errors++; - goto err; + BIO_printf(bio_err, "Cannot create srp verifier for user \"%s\", operation abandoned.\n", user); + errors++; + goto err; } row[DB_srptype][0] = 'v'; @@ -689,7 +689,7 @@ bad: } else { - char **xpp = (char **)sk_OPENSSL_PSTRING_value(db->db->data, userindex); + char **xpp = sk_OPENSSL_PSTRING_value(db->db->data,userindex); BIO_printf(bio_err, "user \"%s\" revoked. t\n", user); xpp[DB_srptype][0] = 'R'; @@ -714,7 +714,7 @@ bad: /* Lets check some fields */ for (i = 0; i < sk_OPENSSL_PSTRING_num(db->db->data); i++) { - pp = (char **)sk_OPENSSL_PSTRING_value(db->db->data, i); + pp = sk_OPENSSL_PSTRING_value(db->db->data,i); if (pp[DB_srptype][0] == 'v') { Modified: user/attilio/vmcontention/crypto/openssl/apps/verify.c ============================================================================== --- user/attilio/vmcontention/crypto/openssl/apps/verify.c Thu Feb 14 15:25:31 2013 (r246796) +++ user/attilio/vmcontention/crypto/openssl/apps/verify.c Thu Feb 14 15:35:58 2013 (r246797) @@ -222,11 +222,19 @@ int MAIN(int argc, char **argv) goto end; } - if (argc < 1) check(cert_ctx, NULL, untrusted, trusted, crls, e); + ret = 0; + if (argc < 1) + { + if (1 != check(cert_ctx, NULL, untrusted, trusted, crls, e)) + ret = -1; + } else + { for (i=0; i Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 901F17E4; Thu, 14 Feb 2013 15:43:43 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 754D4B66; Thu, 14 Feb 2013 15:43:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1EFhhZ2063966; Thu, 14 Feb 2013 15:43:43 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1EFhchF063931; Thu, 14 Feb 2013 15:43:38 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201302141543.r1EFhchF063931@svn.freebsd.org> From: Attilio Rao Date: Thu, 14 Feb 2013 15:43:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r246798 - in user/attilio/vmc-playground: . crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/aes/asm crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio c... X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Feb 2013 15:43:43 -0000 Author: attilio Date: Thu Feb 14 15:43:37 2013 New Revision: 246798 URL: http://svnweb.freebsd.org/changeset/base/246798 Log: Merge from vmcontention. Added: user/attilio/vmc-playground/crypto/openssl/crypto/evp/evp_cnf.c - copied unchanged from r246797, user/attilio/vmcontention/crypto/openssl/crypto/evp/evp_cnf.c user/attilio/vmc-playground/crypto/openssl/doc/crypto/EVP_PKEY_verify_recover.pod - copied unchanged from r246797, user/attilio/vmcontention/crypto/openssl/doc/crypto/EVP_PKEY_verify_recover.pod user/attilio/vmc-playground/crypto/openssl/ssl/s3_cbc.c - copied unchanged from r246797, user/attilio/vmcontention/crypto/openssl/ssl/s3_cbc.c user/attilio/vmc-playground/lib/libc/string/strchrnul.c - copied unchanged from r246797, user/attilio/vmcontention/lib/libc/string/strchrnul.c user/attilio/vmc-playground/secure/lib/libcrypto/man/EVP_PKEY_verify_recover.3 - copied unchanged from r246797, user/attilio/vmcontention/secure/lib/libcrypto/man/EVP_PKEY_verify_recover.3 Deleted: user/attilio/vmc-playground/crypto/openssl/doc/crypto/EVP_PKEY_verifyrecover.pod user/attilio/vmc-playground/secure/lib/libcrypto/man/EVP_PKEY_verifyrecover.3 Modified: user/attilio/vmc-playground/Makefile.inc1 user/attilio/vmc-playground/crypto/openssl/CHANGES user/attilio/vmc-playground/crypto/openssl/Configure user/attilio/vmc-playground/crypto/openssl/FAQ user/attilio/vmc-playground/crypto/openssl/Makefile user/attilio/vmc-playground/crypto/openssl/Makefile.org user/attilio/vmc-playground/crypto/openssl/NEWS user/attilio/vmc-playground/crypto/openssl/PROBLEMS user/attilio/vmc-playground/crypto/openssl/README user/attilio/vmc-playground/crypto/openssl/apps/apps.c user/attilio/vmc-playground/crypto/openssl/apps/ca.c user/attilio/vmc-playground/crypto/openssl/apps/cms.c user/attilio/vmc-playground/crypto/openssl/apps/dgst.c user/attilio/vmc-playground/crypto/openssl/apps/dhparam.c user/attilio/vmc-playground/crypto/openssl/apps/dsaparam.c user/attilio/vmc-playground/crypto/openssl/apps/genrsa.c user/attilio/vmc-playground/crypto/openssl/apps/ocsp.c user/attilio/vmc-playground/crypto/openssl/apps/s_cb.c user/attilio/vmc-playground/crypto/openssl/apps/s_client.c user/attilio/vmc-playground/crypto/openssl/apps/s_server.c user/attilio/vmc-playground/crypto/openssl/apps/speed.c user/attilio/vmc-playground/crypto/openssl/apps/srp.c user/attilio/vmc-playground/crypto/openssl/apps/verify.c user/attilio/vmc-playground/crypto/openssl/apps/x509.c user/attilio/vmc-playground/crypto/openssl/crypto/aes/asm/aes-mips.pl user/attilio/vmc-playground/crypto/openssl/crypto/aes/asm/aes-s390x.pl user/attilio/vmc-playground/crypto/openssl/crypto/aes/asm/aes-x86_64.pl user/attilio/vmc-playground/crypto/openssl/crypto/aes/asm/aesni-sha1-x86_64.pl user/attilio/vmc-playground/crypto/openssl/crypto/aes/asm/aesni-x86_64.pl user/attilio/vmc-playground/crypto/openssl/crypto/aes/asm/bsaes-x86_64.pl user/attilio/vmc-playground/crypto/openssl/crypto/aes/asm/vpaes-x86_64.pl user/attilio/vmc-playground/crypto/openssl/crypto/asn1/a_strex.c user/attilio/vmc-playground/crypto/openssl/crypto/asn1/a_verify.c user/attilio/vmc-playground/crypto/openssl/crypto/asn1/x_pubkey.c user/attilio/vmc-playground/crypto/openssl/crypto/bio/bss_dgram.c user/attilio/vmc-playground/crypto/openssl/crypto/bn/asm/mips.pl user/attilio/vmc-playground/crypto/openssl/crypto/bn/asm/modexp512-x86_64.pl user/attilio/vmc-playground/crypto/openssl/crypto/bn/asm/x86_64-gf2m.pl user/attilio/vmc-playground/crypto/openssl/crypto/bn/asm/x86_64-mont.pl user/attilio/vmc-playground/crypto/openssl/crypto/bn/asm/x86_64-mont5.pl user/attilio/vmc-playground/crypto/openssl/crypto/bn/bn_div.c user/attilio/vmc-playground/crypto/openssl/crypto/bn/bn_gcd.c user/attilio/vmc-playground/crypto/openssl/crypto/bn/bn_lcl.h user/attilio/vmc-playground/crypto/openssl/crypto/camellia/asm/cmll-x86_64.pl user/attilio/vmc-playground/crypto/openssl/crypto/cms/cms_cd.c user/attilio/vmc-playground/crypto/openssl/crypto/cms/cms_enc.c user/attilio/vmc-playground/crypto/openssl/crypto/cms/cms_lib.c user/attilio/vmc-playground/crypto/openssl/crypto/conf/conf_mall.c user/attilio/vmc-playground/crypto/openssl/crypto/cryptlib.c user/attilio/vmc-playground/crypto/openssl/crypto/cryptlib.h user/attilio/vmc-playground/crypto/openssl/crypto/crypto.h user/attilio/vmc-playground/crypto/openssl/crypto/des/set_key.c user/attilio/vmc-playground/crypto/openssl/crypto/des/str2key.c user/attilio/vmc-playground/crypto/openssl/crypto/ec/ec.h user/attilio/vmc-playground/crypto/openssl/crypto/ec/ec_key.c user/attilio/vmc-playground/crypto/openssl/crypto/ec/ec_pmeth.c user/attilio/vmc-playground/crypto/openssl/crypto/ec/ecp_mont.c user/attilio/vmc-playground/crypto/openssl/crypto/ec/ectest.c user/attilio/vmc-playground/crypto/openssl/crypto/ecdh/Makefile user/attilio/vmc-playground/crypto/openssl/crypto/ecdh/ech_key.c user/attilio/vmc-playground/crypto/openssl/crypto/ecdh/ech_lib.c user/attilio/vmc-playground/crypto/openssl/crypto/ecdsa/ecs_lib.c user/attilio/vmc-playground/crypto/openssl/crypto/err/err_all.c user/attilio/vmc-playground/crypto/openssl/crypto/evp/Makefile user/attilio/vmc-playground/crypto/openssl/crypto/evp/digest.c user/attilio/vmc-playground/crypto/openssl/crypto/evp/e_aes.c user/attilio/vmc-playground/crypto/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c user/attilio/vmc-playground/crypto/openssl/crypto/evp/evp.h user/attilio/vmc-playground/crypto/openssl/crypto/evp/evp_err.c user/attilio/vmc-playground/crypto/openssl/crypto/evp/m_dss.c user/attilio/vmc-playground/crypto/openssl/crypto/evp/m_dss1.c user/attilio/vmc-playground/crypto/openssl/crypto/evp/m_sha1.c user/attilio/vmc-playground/crypto/openssl/crypto/evp/p_sign.c user/attilio/vmc-playground/crypto/openssl/crypto/evp/p_verify.c user/attilio/vmc-playground/crypto/openssl/crypto/md4/md4_dgst.c user/attilio/vmc-playground/crypto/openssl/crypto/md4/md4_locl.h user/attilio/vmc-playground/crypto/openssl/crypto/md5/asm/md5-x86_64.pl user/attilio/vmc-playground/crypto/openssl/crypto/md5/md5_locl.h user/attilio/vmc-playground/crypto/openssl/crypto/mdc2/mdc2dgst.c user/attilio/vmc-playground/crypto/openssl/crypto/mem.c user/attilio/vmc-playground/crypto/openssl/crypto/modes/asm/ghash-x86.pl user/attilio/vmc-playground/crypto/openssl/crypto/modes/asm/ghash-x86_64.pl user/attilio/vmc-playground/crypto/openssl/crypto/modes/gcm128.c user/attilio/vmc-playground/crypto/openssl/crypto/objects/o_names.c user/attilio/vmc-playground/crypto/openssl/crypto/ocsp/ocsp_vfy.c user/attilio/vmc-playground/crypto/openssl/crypto/opensslv.h user/attilio/vmc-playground/crypto/openssl/crypto/pem/pem_all.c user/attilio/vmc-playground/crypto/openssl/crypto/pem/pem_lib.c user/attilio/vmc-playground/crypto/openssl/crypto/pem/pem_seal.c user/attilio/vmc-playground/crypto/openssl/crypto/perlasm/cbc.pl user/attilio/vmc-playground/crypto/openssl/crypto/perlasm/x86masm.pl user/attilio/vmc-playground/crypto/openssl/crypto/pkcs12/p12_key.c user/attilio/vmc-playground/crypto/openssl/crypto/pkcs7/bio_pk7.c user/attilio/vmc-playground/crypto/openssl/crypto/ppccap.c user/attilio/vmc-playground/crypto/openssl/crypto/rand/md_rand.c user/attilio/vmc-playground/crypto/openssl/crypto/rand/rand_lib.c user/attilio/vmc-playground/crypto/openssl/crypto/rand/randfile.c user/attilio/vmc-playground/crypto/openssl/crypto/rc4/asm/rc4-md5-x86_64.pl user/attilio/vmc-playground/crypto/openssl/crypto/rc4/asm/rc4-x86_64.pl user/attilio/vmc-playground/crypto/openssl/crypto/ripemd/rmd_dgst.c user/attilio/vmc-playground/crypto/openssl/crypto/ripemd/rmd_locl.h user/attilio/vmc-playground/crypto/openssl/crypto/rsa/rsa.h user/attilio/vmc-playground/crypto/openssl/crypto/rsa/rsa_eay.c user/attilio/vmc-playground/crypto/openssl/crypto/rsa/rsa_oaep.c user/attilio/vmc-playground/crypto/openssl/crypto/sha/asm/sha1-armv4-large.pl user/attilio/vmc-playground/crypto/openssl/crypto/sha/asm/sha1-ia64.pl user/attilio/vmc-playground/crypto/openssl/crypto/sha/asm/sha1-sparcv9a.pl user/attilio/vmc-playground/crypto/openssl/crypto/sha/asm/sha1-x86_64.pl user/attilio/vmc-playground/crypto/openssl/crypto/sha/asm/sha512-586.pl user/attilio/vmc-playground/crypto/openssl/crypto/sha/asm/sha512-x86_64.pl user/attilio/vmc-playground/crypto/openssl/crypto/sha/sha1_one.c user/attilio/vmc-playground/crypto/openssl/crypto/sha/sha1dgst.c user/attilio/vmc-playground/crypto/openssl/crypto/sha/sha256.c user/attilio/vmc-playground/crypto/openssl/crypto/sha/sha_dgst.c user/attilio/vmc-playground/crypto/openssl/crypto/sha/sha_locl.h user/attilio/vmc-playground/crypto/openssl/crypto/sparccpuid.S user/attilio/vmc-playground/crypto/openssl/crypto/srp/srp_vfy.c user/attilio/vmc-playground/crypto/openssl/crypto/symhacks.h user/attilio/vmc-playground/crypto/openssl/crypto/ui/ui_openssl.c user/attilio/vmc-playground/crypto/openssl/crypto/whrlpool/asm/wp-mmx.pl user/attilio/vmc-playground/crypto/openssl/crypto/whrlpool/asm/wp-x86_64.pl user/attilio/vmc-playground/crypto/openssl/crypto/x509/x509_cmp.c user/attilio/vmc-playground/crypto/openssl/crypto/x509/x509_vfy.c user/attilio/vmc-playground/crypto/openssl/crypto/x509v3/v3_purp.c user/attilio/vmc-playground/crypto/openssl/crypto/x86_64cpuid.pl user/attilio/vmc-playground/crypto/openssl/crypto/x86cpuid.pl user/attilio/vmc-playground/crypto/openssl/doc/apps/CA.pl.pod user/attilio/vmc-playground/crypto/openssl/doc/apps/dgst.pod user/attilio/vmc-playground/crypto/openssl/doc/apps/verify.pod user/attilio/vmc-playground/crypto/openssl/doc/apps/x509.pod user/attilio/vmc-playground/crypto/openssl/doc/crypto/EVP_PKEY_CTX_ctrl.pod user/attilio/vmc-playground/crypto/openssl/doc/crypto/EVP_PKEY_decrypt.pod user/attilio/vmc-playground/crypto/openssl/doc/crypto/EVP_PKEY_derive.pod user/attilio/vmc-playground/crypto/openssl/doc/crypto/EVP_PKEY_encrypt.pod user/attilio/vmc-playground/crypto/openssl/doc/crypto/EVP_PKEY_get_default_digest.pod user/attilio/vmc-playground/crypto/openssl/doc/crypto/EVP_PKEY_keygen.pod user/attilio/vmc-playground/crypto/openssl/doc/crypto/EVP_PKEY_sign.pod user/attilio/vmc-playground/crypto/openssl/doc/crypto/EVP_PKEY_verify.pod user/attilio/vmc-playground/crypto/openssl/engines/ccgost/gost89.c user/attilio/vmc-playground/crypto/openssl/engines/ccgost/gost_crypt.c user/attilio/vmc-playground/crypto/openssl/engines/ccgost/gost_eng.c user/attilio/vmc-playground/crypto/openssl/engines/ccgost/gost_lcl.h user/attilio/vmc-playground/crypto/openssl/engines/ccgost/gosthash.c user/attilio/vmc-playground/crypto/openssl/engines/e_capi.c user/attilio/vmc-playground/crypto/openssl/ssl/Makefile user/attilio/vmc-playground/crypto/openssl/ssl/d1_enc.c user/attilio/vmc-playground/crypto/openssl/ssl/d1_pkt.c user/attilio/vmc-playground/crypto/openssl/ssl/d1_srtp.c user/attilio/vmc-playground/crypto/openssl/ssl/dtls1.h user/attilio/vmc-playground/crypto/openssl/ssl/s2_clnt.c user/attilio/vmc-playground/crypto/openssl/ssl/s2_pkt.c user/attilio/vmc-playground/crypto/openssl/ssl/s2_srvr.c user/attilio/vmc-playground/crypto/openssl/ssl/s3_both.c user/attilio/vmc-playground/crypto/openssl/ssl/s3_clnt.c user/attilio/vmc-playground/crypto/openssl/ssl/s3_enc.c user/attilio/vmc-playground/crypto/openssl/ssl/s3_lib.c user/attilio/vmc-playground/crypto/openssl/ssl/s3_pkt.c user/attilio/vmc-playground/crypto/openssl/ssl/s3_srvr.c user/attilio/vmc-playground/crypto/openssl/ssl/ssl.h user/attilio/vmc-playground/crypto/openssl/ssl/ssl3.h user/attilio/vmc-playground/crypto/openssl/ssl/ssl_algs.c user/attilio/vmc-playground/crypto/openssl/ssl/ssl_cert.c user/attilio/vmc-playground/crypto/openssl/ssl/ssl_ciph.c user/attilio/vmc-playground/crypto/openssl/ssl/ssl_err.c user/attilio/vmc-playground/crypto/openssl/ssl/ssl_lib.c user/attilio/vmc-playground/crypto/openssl/ssl/ssl_locl.h user/attilio/vmc-playground/crypto/openssl/ssl/ssl_rsa.c user/attilio/vmc-playground/crypto/openssl/ssl/ssltest.c user/attilio/vmc-playground/crypto/openssl/ssl/t1_enc.c user/attilio/vmc-playground/crypto/openssl/ssl/t1_lib.c user/attilio/vmc-playground/crypto/openssl/ssl/tls_srp.c user/attilio/vmc-playground/crypto/openssl/util/libeay.num user/attilio/vmc-playground/crypto/openssl/util/pl/VC-32.pl user/attilio/vmc-playground/include/string.h user/attilio/vmc-playground/lib/libc/string/Makefile.inc user/attilio/vmc-playground/lib/libc/string/Symbol.map user/attilio/vmc-playground/lib/libc/string/strchr.3 user/attilio/vmc-playground/lib/libc/sys/fcntl.2 user/attilio/vmc-playground/lib/libusb/Makefile user/attilio/vmc-playground/lib/libusb/libusb20.3 user/attilio/vmc-playground/lib/libusb/libusb20.c user/attilio/vmc-playground/lib/libusb/libusb20.h user/attilio/vmc-playground/lib/libusb/libusb20_int.h user/attilio/vmc-playground/lib/libusb/libusb20_ugen20.c user/attilio/vmc-playground/secure/lib/libcrypto/Makefile user/attilio/vmc-playground/secure/lib/libcrypto/Makefile.inc user/attilio/vmc-playground/secure/lib/libcrypto/Makefile.man user/attilio/vmc-playground/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/ASN1_STRING_length.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/ASN1_STRING_new.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/ASN1_generate_nconf.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/BIO_ctrl.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/BIO_f_base64.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/BIO_f_buffer.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/BIO_f_cipher.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/BIO_f_md.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/BIO_f_null.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/BIO_f_ssl.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/BIO_find_type.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/BIO_new.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/BIO_new_CMS.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/BIO_push.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/BIO_read.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/BIO_s_accept.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/BIO_s_bio.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/BIO_s_connect.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/BIO_s_fd.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/BIO_s_file.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/BIO_s_mem.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/BIO_s_null.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/BIO_s_socket.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/BIO_set_callback.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/BIO_should_retry.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/BN_BLINDING_new.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/BN_CTX_new.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/BN_CTX_start.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/BN_add.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/BN_add_word.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/BN_bn2bin.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/BN_cmp.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/BN_copy.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/BN_generate_prime.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/BN_mod_inverse.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/BN_new.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/BN_num_bytes.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/BN_rand.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/BN_set_bit.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/BN_swap.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/BN_zero.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/CMS_add0_cert.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/CMS_compress.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/CMS_decrypt.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/CMS_encrypt.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/CMS_final.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/CMS_get0_type.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/CMS_sign.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/CMS_sign_add1_signer.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/CMS_sign_receipt.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/CMS_uncompress.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/CMS_verify.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/CMS_verify_receipt.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/CONF_modules_free.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/CONF_modules_load_file.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/DH_generate_key.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/DH_generate_parameters.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/DH_get_ex_new_index.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/DH_new.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/DH_set_method.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/DH_size.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/DSA_SIG_new.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/DSA_do_sign.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/DSA_dup_DH.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/DSA_generate_key.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/DSA_generate_parameters.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/DSA_new.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/DSA_set_method.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/DSA_sign.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/DSA_size.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/ERR_GET_LIB.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/ERR_clear_error.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/ERR_error_string.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/ERR_get_error.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/ERR_load_strings.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/ERR_print_errors.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/ERR_put_error.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/ERR_remove_state.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/ERR_set_mark.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/EVP_BytesToKey.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/EVP_DigestInit.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/EVP_DigestSignInit.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/EVP_DigestVerifyInit.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/EVP_EncryptInit.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/EVP_OpenInit.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/EVP_PKEY_CTX_new.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/EVP_PKEY_cmp.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/EVP_PKEY_decrypt.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/EVP_PKEY_derive.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/EVP_PKEY_encrypt.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/EVP_PKEY_get_default_digest.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/EVP_PKEY_keygen.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/EVP_PKEY_new.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/EVP_PKEY_print_private.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/EVP_PKEY_sign.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/EVP_PKEY_verify.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/EVP_SealInit.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/EVP_SignInit.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/EVP_VerifyInit.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/OBJ_nid2obj.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/OPENSSL_Applink.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/OPENSSL_config.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/PEM_write_bio_CMS_stream.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/PKCS12_create.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/PKCS12_parse.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/PKCS7_decrypt.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/PKCS7_encrypt.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/PKCS7_sign.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/PKCS7_sign_add_signer.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/PKCS7_verify.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/RAND_add.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/RAND_bytes.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/RAND_cleanup.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/RAND_egd.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/RAND_load_file.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/RAND_set_rand_method.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/RSA_blinding_on.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/RSA_check_key.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/RSA_generate_key.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/RSA_new.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/RSA_print.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/RSA_private_encrypt.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/RSA_public_encrypt.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/RSA_set_method.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/RSA_sign.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/RSA_size.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/SMIME_read_CMS.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/SMIME_write_CMS.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/X509_NAME_print_ex.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/X509_STORE_CTX_get_error.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/X509_STORE_CTX_get_ex_new_index.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/X509_STORE_CTX_new.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/X509_new.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/X509_verify_cert.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/bio.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/blowfish.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/bn.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/bn_internal.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/buffer.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/crypto.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/d2i_DHparams.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/d2i_X509.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/d2i_X509_CRL.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/d2i_X509_NAME.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/d2i_X509_REQ.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/d2i_X509_SIG.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/des.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/dh.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/dsa.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/ecdsa.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/engine.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/err.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/evp.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/hmac.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/i2d_CMS_bio_stream.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/i2d_PKCS7_bio_stream.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/lh_stats.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/lhash.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/md5.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/mdc2.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/pem.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/rand.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/rc4.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/ripemd.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/rsa.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/sha.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/threads.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/ui.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/ui_compat.3 user/attilio/vmc-playground/secure/lib/libcrypto/man/x509.3 user/attilio/vmc-playground/secure/lib/libssl/Makefile user/attilio/vmc-playground/secure/lib/libssl/man/SSL_CIPHER_get_name.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_CTX_add_session.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_CTX_ctrl.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_CTX_free.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_CTX_new.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_CTX_sess_number.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_CTX_sessions.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_CTX_set_mode.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_CTX_set_options.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_CTX_set_psk_client_callback.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_CTX_set_timeout.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_CTX_set_verify.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_CTX_use_certificate.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_CTX_use_psk_identity_hint.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_SESSION_free.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_SESSION_get_time.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_accept.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_alert_type_string.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_clear.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_connect.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_do_handshake.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_free.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_get_SSL_CTX.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_get_ciphers.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_get_client_CA_list.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_get_current_cipher.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_get_default_timeout.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_get_error.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_get_ex_new_index.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_get_fd.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_get_peer_certificate.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_get_psk_identity.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_get_rbio.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_get_session.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_get_verify_result.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_get_version.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_library_init.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_load_client_CA_file.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_new.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_pending.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_read.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_rstate_string.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_session_reused.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_set_bio.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_set_connect_state.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_set_fd.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_set_session.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_set_shutdown.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_set_verify_result.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_shutdown.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_state_string.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_want.3 user/attilio/vmc-playground/secure/lib/libssl/man/SSL_write.3 user/attilio/vmc-playground/secure/lib/libssl/man/d2i_SSL_SESSION.3 user/attilio/vmc-playground/secure/lib/libssl/man/ssl.3 user/attilio/vmc-playground/secure/usr.bin/openssl/man/CA.pl.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/asn1parse.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/ca.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/ciphers.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/cms.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/crl.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/crl2pkcs7.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/dgst.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/dhparam.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/dsa.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/dsaparam.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/ec.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/ecparam.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/enc.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/errstr.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/gendsa.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/genpkey.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/genrsa.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/nseq.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/ocsp.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/openssl.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/passwd.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/pkcs12.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/pkcs7.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/pkcs8.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/pkey.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/pkeyparam.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/pkeyutl.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/rand.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/req.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/rsa.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/rsautl.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/s_client.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/s_server.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/s_time.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/sess_id.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/smime.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/speed.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/spkac.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/ts.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/tsget.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/verify.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/version.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/x509.1 user/attilio/vmc-playground/secure/usr.bin/openssl/man/x509v3_config.1 user/attilio/vmc-playground/share/man/man4/run.4 user/attilio/vmc-playground/share/man/man9/mbuf_tags.9 user/attilio/vmc-playground/share/misc/committers-ports.dot user/attilio/vmc-playground/sys/amd64/vmm/x86.c user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c user/attilio/vmc-playground/sys/conf/files user/attilio/vmc-playground/sys/dev/ath/if_ath.c user/attilio/vmc-playground/sys/dev/ath/if_ath_misc.h user/attilio/vmc-playground/sys/dev/ath/if_ath_tx.c user/attilio/vmc-playground/sys/dev/ath/if_athvar.h user/attilio/vmc-playground/sys/dev/usb/controller/usb_controller.c user/attilio/vmc-playground/sys/dev/usb/serial/uftdi.c user/attilio/vmc-playground/sys/dev/usb/usb_dev.c user/attilio/vmc-playground/sys/dev/usb/usb_dev.h user/attilio/vmc-playground/sys/dev/usb/usb_device.c user/attilio/vmc-playground/sys/dev/usb/usb_device.h user/attilio/vmc-playground/sys/dev/usb/usb_generic.c user/attilio/vmc-playground/sys/dev/usb/usb_handle_request.c user/attilio/vmc-playground/sys/dev/usb/usb_hub.c user/attilio/vmc-playground/sys/dev/usb/usb_ioctl.h user/attilio/vmc-playground/sys/dev/usb/usb_request.c user/attilio/vmc-playground/sys/dev/usb/usbdevs user/attilio/vmc-playground/sys/dev/usb/wlan/if_upgt.c user/attilio/vmc-playground/sys/dev/usb/wlan/if_upgtvar.h user/attilio/vmc-playground/sys/kern/kern_descrip.c user/attilio/vmc-playground/sys/powerpc/booke/platform_bare.c user/attilio/vmc-playground/sys/powerpc/include/platformvar.h user/attilio/vmc-playground/sys/powerpc/powermac/platform_powermac.c user/attilio/vmc-playground/sys/powerpc/ps3/platform_ps3.c user/attilio/vmc-playground/sys/powerpc/wii/platform_wii.c user/attilio/vmc-playground/sys/sys/param.h user/attilio/vmc-playground/usr.bin/gprof/aout.c user/attilio/vmc-playground/usr.bin/gprof/arcs.c user/attilio/vmc-playground/usr.bin/gprof/dfn.c user/attilio/vmc-playground/usr.bin/gprof/gprof.c user/attilio/vmc-playground/usr.bin/gprof/gprof.h user/attilio/vmc-playground/usr.bin/gprof/hertz.c user/attilio/vmc-playground/usr.bin/gprof/kernel.c user/attilio/vmc-playground/usr.bin/gprof/lookup.c user/attilio/vmc-playground/usr.bin/gprof/printgprof.c user/attilio/vmc-playground/usr.bin/gprof/printlist.c user/attilio/vmc-playground/usr.bin/xinstall/Makefile user/attilio/vmc-playground/usr.sbin/kgmon/kgmon.c user/attilio/vmc-playground/usr.sbin/nfsd/nfsd.c user/attilio/vmc-playground/usr.sbin/pkg/pkg.c user/attilio/vmc-playground/usr.sbin/usbconfig/dump.c Directory Properties: user/attilio/vmc-playground/ (props changed) user/attilio/vmc-playground/crypto/openssl/ (props changed) user/attilio/vmc-playground/lib/libc/ (props changed) user/attilio/vmc-playground/share/man/man4/ (props changed) user/attilio/vmc-playground/sys/ (props changed) user/attilio/vmc-playground/sys/amd64/vmm/ (props changed) user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/ (props changed) user/attilio/vmc-playground/sys/conf/ (props changed) Modified: user/attilio/vmc-playground/Makefile.inc1 ============================================================================== --- user/attilio/vmc-playground/Makefile.inc1 Thu Feb 14 15:35:58 2013 (r246797) +++ user/attilio/vmc-playground/Makefile.inc1 Thu Feb 14 15:43:37 2013 (r246798) @@ -1207,6 +1207,7 @@ bootstrap-tools: ${_sed} \ ${_yacc} \ ${_lex} \ + lib/libmd \ usr.bin/xinstall \ ${_gensnmptree} \ usr.sbin/config \ Modified: user/attilio/vmc-playground/crypto/openssl/CHANGES ============================================================================== --- user/attilio/vmc-playground/crypto/openssl/CHANGES Thu Feb 14 15:35:58 2013 (r246797) +++ user/attilio/vmc-playground/crypto/openssl/CHANGES Thu Feb 14 15:43:37 2013 (r246798) @@ -2,6 +2,53 @@ OpenSSL CHANGES _______________ + Changes between 1.0.1d and 1.0.1e [11 Feb 2013] + + *) + + Changes between 1.0.1c and 1.0.1d [5 Feb 2013] + + *) Make the decoding of SSLv3, TLS and DTLS CBC records constant time. + + This addresses the flaw in CBC record processing discovered by + Nadhem Alfardan and Kenny Paterson. Details of this attack can be found + at: http://www.isg.rhul.ac.uk/tls/ + + Thanks go to Nadhem Alfardan and Kenny Paterson of the Information + Security Group at Royal Holloway, University of London + (www.isg.rhul.ac.uk) for discovering this flaw and Adam Langley and + Emilia Käsper for the initial patch. + (CVE-2013-0169) + [Emilia Käsper, Adam Langley, Ben Laurie, Andy Polyakov, Steve Henson] + + *) Fix flaw in AESNI handling of TLS 1.2 and 1.1 records for CBC mode + ciphersuites which can be exploited in a denial of service attack. + Thanks go to and to Adam Langley for discovering + and detecting this bug and to Wolfgang Ettlinger + for independently discovering this issue. + (CVE-2012-2686) + [Adam Langley] + + *) Return an error when checking OCSP signatures when key is NULL. + This fixes a DoS attack. (CVE-2013-0166) + [Steve Henson] + + *) Make openssl verify return errors. + [Chris Palmer and Ben Laurie] + + *) Call OCSP Stapling callback after ciphersuite has been chosen, so + the right response is stapled. Also change SSL_get_certificate() + so it returns the certificate actually sent. + See http://rt.openssl.org/Ticket/Display.html?id=2836. + [Rob Stradling ] + + *) Fix possible deadlock when decoding public keys. + [Steve Henson] + + *) Don't use TLS 1.0 record version number in initial client hello + if renegotiating. + [Steve Henson] + Changes between 1.0.1b and 1.0.1c [10 May 2012] *) Sanity check record length before skipping explicit IV in TLS Modified: user/attilio/vmc-playground/crypto/openssl/Configure ============================================================================== --- user/attilio/vmc-playground/crypto/openssl/Configure Thu Feb 14 15:35:58 2013 (r246797) +++ user/attilio/vmc-playground/crypto/openssl/Configure Thu Feb 14 15:43:37 2013 (r246798) @@ -171,20 +171,22 @@ my %table=( "debug-ben-openbsd","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::", "debug-ben-openbsd-debug","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -g3 -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::", "debug-ben-debug", "gcc44:$gcc_devteam_warn -DBN_DEBUG -DCONF_DEBUG -DDEBUG_SAFESTACK -DDEBUG_UNUSED -g3 -O2 -pipe::(unknown)::::::", +"debug-ben-debug-64", "gcc:$gcc_devteam_warn -Wno-error=overlength-strings -DBN_DEBUG -DCONF_DEBUG -DDEBUG_SAFESTACK -DDEBUG_UNUSED -g3 -O3 -pipe::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-ben-macos", "cc:$gcc_devteam_warn -arch i386 -DBN_DEBUG -DCONF_DEBUG -DDEBUG_SAFESTACK -DDEBUG_UNUSED -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -O3 -DL_ENDIAN -g3 -pipe::(unknown)::-Wl,-search_paths_first::::", "debug-ben-macos-gcc46", "gcc-mp-4.6:$gcc_devteam_warn -Wconversion -DBN_DEBUG -DCONF_DEBUG -DDEBUG_SAFESTACK -DDEBUG_UNUSED -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -O3 -DL_ENDIAN -g3 -pipe::(unknown)::::::", +"debug-ben-darwin64","cc:$gcc_devteam_warn -Wno-language-extension-token -Wno-extended-offsetof -arch x86_64 -O3 -DL_ENDIAN -Wall::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:".eval{my $asm=$x86_64_asm;$asm=~s/rc4\-[^:]+//;$asm}.":macosx:dlfcn:darwin-shared:-fPIC -fno-common:-arch x86_64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", "debug-ben-no-opt", "gcc: -Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG -Werror -DL_ENDIAN -DTERMIOS -Wall -g3::(unknown)::::::", "debug-ben-strict", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DCONST_STRICT -O2 -Wall -Wshadow -Werror -Wpointer-arith -Wcast-qual -Wwrite-strings -pipe::(unknown)::::::", "debug-rse","cc:-DTERMIOS -DL_ENDIAN -pipe -O -g -ggdb3 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}", "debug-bodo", "gcc:$gcc_devteam_warn -DBN_DEBUG -DBN_DEBUG_RAND -DCONF_DEBUG -DBIO_PAIR_DEBUG -m64 -DL_ENDIAN -DTERMIO -g -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", "debug-ulf", "gcc:-DTERMIOS -DL_ENDIAN -march=i486 -Wall -DBN_DEBUG -DBN_DEBUG_RAND -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -g -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations:::CYGWIN32:::${no_asm}:win32:cygwin-shared:::.dll", -"debug-steve64", "gcc:$gcc_devteam_warn -m64 -DL_ENDIAN -DTERMIO -DCONF_DEBUG -DDEBUG_SAFESTACK -g::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"debug-steve64", "gcc:$gcc_devteam_warn -m64 -DL_ENDIAN -DTERMIO -DCONF_DEBUG -DDEBUG_SAFESTACK -Wno-overlength-strings -g::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-steve32", "gcc:$gcc_devteam_warn -m32 -DL_ENDIAN -DCONF_DEBUG -DDEBUG_SAFESTACK -g -pipe::-D_REENTRANT::-rdynamic -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC:-m32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-steve-opt", "gcc:$gcc_devteam_warn -m64 -O3 -DL_ENDIAN -DTERMIO -DCONF_DEBUG -DDEBUG_SAFESTACK -g::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-levitte-linux-elf","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-levitte-linux-noasm","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-levitte-linux-elf-extreme","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-levitte-linux-noasm-extreme","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"debug-levitte-linux-elf","gcc:-DLEVITTE_DEBUG -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -ggdb -g3 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"debug-levitte-linux-noasm","gcc:-DLEVITTE_DEBUG -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -ggdb -g3 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"debug-levitte-linux-elf-extreme","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DL_ENDIAN -DTERMIO -DPEDANTIC -ggdb -g3 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"debug-levitte-linux-noasm-extreme","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DTERMIO -DPEDANTIC -ggdb -g3 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-geoff32","gcc:-DBN_DEBUG -DBN_DEBUG_RAND -DBN_STRICT -DPURIFY -DOPENSSL_NO_DEPRECATED -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -DL_ENDIAN -DTERMIO -DPEDANTIC -O1 -ggdb2 -Wall -Werror -Wundef -pedantic -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare -Wmissing-prototypes -Wmissing-declarations -Wno-long-long::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-geoff64","gcc:-DBN_DEBUG -DBN_DEBUG_RAND -DBN_STRICT -DPURIFY -DOPENSSL_NO_DEPRECATED -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -DL_ENDIAN -DTERMIO -DPEDANTIC -O1 -ggdb2 -Wall -Werror -Wundef -pedantic -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare -Wmissing-prototypes -Wmissing-declarations -Wno-long-long::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-linux-pentium","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -mcpu=pentium -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn", @@ -243,7 +245,7 @@ my %table=( "solaris-sparcv7-cc","cc:-xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${no_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "solaris-sparcv8-cc","cc:-xarch=v8 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv8_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "solaris-sparcv9-cc","cc:-xtarget=ultra -xarch=v8plus -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"solaris64-sparcv9-cc","cc:-xtarget=ultra -xarch=v9 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:solaris-shared:-KPIC:-xarch=v9 -G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):/usr/ccs/bin/ar rs::/64", +"solaris64-sparcv9-cc","cc:-xtarget=ultra -xarch=v9 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:solaris-shared:-KPIC:-xarch=v9 -G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::/64", #### "debug-solaris-sparcv8-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -xarch=v8 -g -O -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv8_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-solaris-sparcv9-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -xtarget=ultra -xarch=v8plus -g -O -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", @@ -464,8 +466,8 @@ my %table=( "aix64-gcc","gcc:-maix64 -O -DB_ENDIAN::-pthread:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR:${ppc64_asm}:aix64:dlfcn:aix-shared::-maix64 -shared -Wl,-G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X64", # Below targets assume AIX 5. Idea is to effectively disregard $OBJECT_MODE # at build time. $OBJECT_MODE is respected at ./config stage! -"aix-cc", "cc:-q32 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst::-qthreaded:AIX::BN_LLONG RC4_CHAR:${ppc32_asm}:aix32:dlfcn:aix-shared::-q32 -G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 32", -"aix64-cc", "cc:-q64 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst::-qthreaded:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR:${ppc64_asm}:aix64:dlfcn:aix-shared::-q64 -G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 64", +"aix-cc", "cc:-q32 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst::-qthreaded -D_THREAD_SAFE:AIX::BN_LLONG RC4_CHAR:${ppc32_asm}:aix32:dlfcn:aix-shared::-q32 -G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 32", +"aix64-cc", "cc:-q64 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst::-qthreaded -D_THREAD_SAFE:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR:${ppc64_asm}:aix64:dlfcn:aix-shared::-q64 -G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 64", # # Cray T90 and similar (SDSC) Modified: user/attilio/vmc-playground/crypto/openssl/FAQ ============================================================================== --- user/attilio/vmc-playground/crypto/openssl/FAQ Thu Feb 14 15:35:58 2013 (r246797) +++ user/attilio/vmc-playground/crypto/openssl/FAQ Thu Feb 14 15:43:37 2013 (r246798) @@ -83,11 +83,11 @@ OpenSSL - Frequently Asked Questions * Which is the current version of OpenSSL? The current version is available from . -OpenSSL 1.0.1c was released on May 10th, 2012. +OpenSSL 1.0.1e was released on Feb 11th, 2013. In addition to the current stable release, you can also access daily snapshots of the OpenSSL development version at , or get it by anonymous CVS access. +ftp://ftp.openssl.org/snapshot/>, or get it by anonymous Git access. * Where is the documentation? Modified: user/attilio/vmc-playground/crypto/openssl/Makefile ============================================================================== --- user/attilio/vmc-playground/crypto/openssl/Makefile Thu Feb 14 15:35:58 2013 (r246797) +++ user/attilio/vmc-playground/crypto/openssl/Makefile Thu Feb 14 15:43:37 2013 (r246798) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=1.0.1c +VERSION=1.0.1e MAJOR=1 MINOR=0.1 SHLIB_VERSION_NUMBER=1.0.0 @@ -71,7 +71,7 @@ RANLIB= /usr/bin/ranlib NM= nm PERL= /usr/bin/perl TAR= tar -TARFLAGS= --no-recursion +TARFLAGS= --no-recursion --record-size=10240 MAKEDEPPROG=makedepend LIBDIR=lib @@ -446,7 +446,7 @@ rehash.time: certs apps [ -x "apps/openssl.exe" ] && OPENSSL="apps/openssl.exe" || :; \ OPENSSL_DEBUG_MEMORY=on; \ export OPENSSL OPENSSL_DEBUG_MEMORY; \ - $(PERL) tools/c_rehash certs) && \ + $(PERL) tools/c_rehash certs/demo) && \ touch rehash.time; \ else :; fi Modified: user/attilio/vmc-playground/crypto/openssl/Makefile.org ============================================================================== --- user/attilio/vmc-playground/crypto/openssl/Makefile.org Thu Feb 14 15:35:58 2013 (r246797) +++ user/attilio/vmc-playground/crypto/openssl/Makefile.org Thu Feb 14 15:43:37 2013 (r246798) @@ -69,7 +69,7 @@ RANLIB= ranlib NM= nm PERL= perl TAR= tar -TARFLAGS= --no-recursion +TARFLAGS= --no-recursion --record-size=10240 MAKEDEPPROG=makedepend LIBDIR=lib @@ -444,7 +444,7 @@ rehash.time: certs apps [ -x "apps/openssl.exe" ] && OPENSSL="apps/openssl.exe" || :; \ OPENSSL_DEBUG_MEMORY=on; \ export OPENSSL OPENSSL_DEBUG_MEMORY; \ - $(PERL) tools/c_rehash certs) && \ + $(PERL) tools/c_rehash certs/demo) && \ touch rehash.time; \ else :; fi Modified: user/attilio/vmc-playground/crypto/openssl/NEWS ============================================================================== --- user/attilio/vmc-playground/crypto/openssl/NEWS Thu Feb 14 15:35:58 2013 (r246797) +++ user/attilio/vmc-playground/crypto/openssl/NEWS Thu Feb 14 15:43:37 2013 (r246798) @@ -5,6 +5,18 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.0.1d and OpenSSL 1.0.1e: + + o Corrected fix for CVE-2013-0169 + + Major changes between OpenSSL 1.0.1c and OpenSSL 1.0.1d: + + o Fix renegotiation in TLS 1.1, 1.2 by using the correct TLS version. + o Include the fips configuration module. + o Fix OCSP bad key DoS attack CVE-2013-0166 + o Fix for SSL/TLS/DTLS CBC plaintext recovery attack CVE-2013-0169 + o Fix for TLS AESNI record handling flaw CVE-2012-2686 + Major changes between OpenSSL 1.0.1b and OpenSSL 1.0.1c: o Fix TLS/DTLS record length checking bug CVE-2012-2333 Modified: user/attilio/vmc-playground/crypto/openssl/PROBLEMS ============================================================================== --- user/attilio/vmc-playground/crypto/openssl/PROBLEMS Thu Feb 14 15:35:58 2013 (r246797) +++ user/attilio/vmc-playground/crypto/openssl/PROBLEMS Thu Feb 14 15:43:37 2013 (r246798) @@ -197,3 +197,17 @@ reconfigure with additional no-sse2 [or We don't have framework to associate -ldl with no-dso, therefore the only way is to edit Makefile right after ./config no-dso and remove -ldl from EX_LIBS line. + +* hpux-parisc2-cc no-asm build fails with SEGV in ECDSA/DH. + +Compiler bug, presumably at particular patch level. Remaining +hpux*-parisc*-cc configurations can be affected too. Drop optimization +level to +O2 when compiling bn_nist.o. + +* solaris64-sparcv9-cc link failure + +Solaris 8 ar can fail to maintain symbol table in .a, which results in +link failures. Apply 109147-09 or later or modify Makefile generated +by ./Configure solaris64-sparcv9-cc and replace RANLIB assignment with + + RANLIB= /usr/ccs/bin/ar rs Modified: user/attilio/vmc-playground/crypto/openssl/README ============================================================================== --- user/attilio/vmc-playground/crypto/openssl/README Thu Feb 14 15:35:58 2013 (r246797) +++ user/attilio/vmc-playground/crypto/openssl/README Thu Feb 14 15:43:37 2013 (r246798) @@ -1,5 +1,5 @@ - OpenSSL 1.0.1c 10 May 2012 + OpenSSL 1.0.1e 11 Feb 2013 Copyright (c) 1998-2011 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson @@ -190,7 +190,7 @@ reason as to why that feature isn't implemented. Patches should be as up to date as possible, preferably relative to the - current CVS or the last snapshot. They should follow the coding style of + current Git or the last snapshot. They should follow the coding style of OpenSSL and compile without warnings. Some of the core team developer targets can be used for testing purposes, (debug-steve64, debug-geoff etc). OpenSSL compiles on many varied platforms: try to ensure you only use portable Modified: user/attilio/vmc-playground/crypto/openssl/apps/apps.c ============================================================================== --- user/attilio/vmc-playground/crypto/openssl/apps/apps.c Thu Feb 14 15:35:58 2013 (r246797) +++ user/attilio/vmc-playground/crypto/openssl/apps/apps.c Thu Feb 14 15:43:37 2013 (r246798) @@ -2132,7 +2132,7 @@ X509_NAME *parse_name(char *subject, lon X509_NAME *n = NULL; int nid; - if (!buf || !ne_types || !ne_values) + if (!buf || !ne_types || !ne_values || !mval) { BIO_printf(bio_err, "malloc error\n"); goto error; @@ -2236,6 +2236,7 @@ X509_NAME *parse_name(char *subject, lon OPENSSL_free(ne_values); OPENSSL_free(ne_types); OPENSSL_free(buf); + OPENSSL_free(mval); return n; error: @@ -2244,6 +2245,8 @@ error: OPENSSL_free(ne_values); if (ne_types) OPENSSL_free(ne_types); + if (mval) + OPENSSL_free(mval); if (buf) OPENSSL_free(buf); return NULL; Modified: user/attilio/vmc-playground/crypto/openssl/apps/ca.c ============================================================================== --- user/attilio/vmc-playground/crypto/openssl/apps/ca.c Thu Feb 14 15:35:58 2013 (r246797) +++ user/attilio/vmc-playground/crypto/openssl/apps/ca.c Thu Feb 14 15:43:37 2013 (r246798) @@ -1408,6 +1408,7 @@ bad: if (!NCONF_get_number(conf,section, ENV_DEFAULT_CRL_HOURS, &crlhours)) crlhours = 0; + ERR_clear_error(); } if ((crldays == 0) && (crlhours == 0) && (crlsec == 0)) { Modified: user/attilio/vmc-playground/crypto/openssl/apps/cms.c ============================================================================== --- user/attilio/vmc-playground/crypto/openssl/apps/cms.c Thu Feb 14 15:35:58 2013 (r246797) +++ user/attilio/vmc-playground/crypto/openssl/apps/cms.c Thu Feb 14 15:43:37 2013 (r246798) @@ -233,6 +233,8 @@ int MAIN(int argc, char **argv) else if (!strcmp(*args,"-camellia256")) cipher = EVP_camellia_256_cbc(); #endif + else if (!strcmp (*args, "-debug_decrypt")) + flags |= CMS_DEBUG_DECRYPT; else if (!strcmp (*args, "-text")) flags |= CMS_TEXT; else if (!strcmp (*args, "-nointern")) @@ -1039,6 +1041,8 @@ int MAIN(int argc, char **argv) ret = 4; if (operation == SMIME_DECRYPT) { + if (flags & CMS_DEBUG_DECRYPT) + CMS_decrypt(cms, NULL, NULL, NULL, NULL, flags); if (secret_key) { Modified: user/attilio/vmc-playground/crypto/openssl/apps/dgst.c ============================================================================== --- user/attilio/vmc-playground/crypto/openssl/apps/dgst.c Thu Feb 14 15:35:58 2013 (r246797) +++ user/attilio/vmc-playground/crypto/openssl/apps/dgst.c Thu Feb 14 15:43:37 2013 (r246798) @@ -216,10 +216,10 @@ int MAIN(int argc, char **argv) out_bin = 1; else if (strcmp(*argv,"-d") == 0) debug=1; - else if (strcmp(*argv,"-non-fips-allow") == 0) - non_fips_allow=1; else if (!strcmp(*argv,"-fips-fingerprint")) hmac_key = "etaonrishdlcupfm"; + else if (strcmp(*argv,"-non-fips-allow") == 0) + non_fips_allow=1; else if (!strcmp(*argv,"-hmac")) { if (--argc < 1) Modified: user/attilio/vmc-playground/crypto/openssl/apps/dhparam.c ============================================================================== --- user/attilio/vmc-playground/crypto/openssl/apps/dhparam.c Thu Feb 14 15:35:58 2013 (r246797) +++ user/attilio/vmc-playground/crypto/openssl/apps/dhparam.c Thu Feb 14 15:43:37 2013 (r246798) @@ -332,7 +332,6 @@ bad: BIO_printf(bio_err,"This is going to take a long time\n"); if(!dh || !DH_generate_parameters_ex(dh, num, g, &cb)) { - if(dh) DH_free(dh); ERR_print_errors(bio_err); goto end; } Modified: user/attilio/vmc-playground/crypto/openssl/apps/dsaparam.c ============================================================================== --- user/attilio/vmc-playground/crypto/openssl/apps/dsaparam.c Thu Feb 14 15:35:58 2013 (r246797) +++ user/attilio/vmc-playground/crypto/openssl/apps/dsaparam.c Thu Feb 14 15:43:37 2013 (r246798) @@ -326,6 +326,7 @@ bad: goto end; } #endif + ERR_print_errors(bio_err); BIO_printf(bio_err,"Error, DSA key generation failed\n"); goto end; } @@ -429,13 +430,19 @@ bad: assert(need_rand); if ((dsakey=DSAparams_dup(dsa)) == NULL) goto end; - if (!DSA_generate_key(dsakey)) goto end; + if (!DSA_generate_key(dsakey)) + { + ERR_print_errors(bio_err); + DSA_free(dsakey); + goto end; + } if (outformat == FORMAT_ASN1) i=i2d_DSAPrivateKey_bio(out,dsakey); else if (outformat == FORMAT_PEM) i=PEM_write_bio_DSAPrivateKey(out,dsakey,NULL,NULL,0,NULL,NULL); else { BIO_printf(bio_err,"bad output format specified for outfile\n"); + DSA_free(dsakey); goto end; } DSA_free(dsakey); Modified: user/attilio/vmc-playground/crypto/openssl/apps/genrsa.c ============================================================================== --- user/attilio/vmc-playground/crypto/openssl/apps/genrsa.c Thu Feb 14 15:35:58 2013 (r246797) +++ user/attilio/vmc-playground/crypto/openssl/apps/genrsa.c Thu Feb 14 15:43:37 2013 (r246798) @@ -78,7 +78,7 @@ #include #include -#define DEFBITS 512 +#define DEFBITS 1024 #undef PROG #define PROG genrsa_main Modified: user/attilio/vmc-playground/crypto/openssl/apps/ocsp.c ============================================================================== --- user/attilio/vmc-playground/crypto/openssl/apps/ocsp.c Thu Feb 14 15:35:58 2013 (r246797) +++ user/attilio/vmc-playground/crypto/openssl/apps/ocsp.c Thu Feb 14 15:43:37 2013 (r246798) @@ -617,7 +617,7 @@ int MAIN(int argc, char **argv) BIO_printf (bio_err, "-ndays n number of days before next update\n"); BIO_printf (bio_err, "-resp_key_id identify reponse by signing certificate key ID\n"); BIO_printf (bio_err, "-nrequest n number of requests to accept (default unlimited)\n"); - BIO_printf (bio_err, "- use specified digest in the request"); + BIO_printf (bio_err, "- use specified digest in the request\n"); goto end; } Modified: user/attilio/vmc-playground/crypto/openssl/apps/s_cb.c ============================================================================== --- user/attilio/vmc-playground/crypto/openssl/apps/s_cb.c Thu Feb 14 15:35:58 2013 (r246797) +++ user/attilio/vmc-playground/crypto/openssl/apps/s_cb.c Thu Feb 14 15:43:37 2013 (r246798) @@ -237,8 +237,8 @@ int set_cert_stuff(SSL_CTX *ctx, char *c /* If we are using DSA, we can copy the parameters from * the private key */ - - + + /* Now we know that a key and cert have been set against * the SSL context */ if (!SSL_CTX_check_private_key(ctx)) @@ -436,6 +436,8 @@ void MS_CALLBACK msg_cb(int write_p, int if (version == SSL3_VERSION || version == TLS1_VERSION || + version == TLS1_1_VERSION || + version == TLS1_2_VERSION || version == DTLS1_VERSION || version == DTLS1_BAD_VER) { Modified: user/attilio/vmc-playground/crypto/openssl/apps/s_client.c ============================================================================== --- user/attilio/vmc-playground/crypto/openssl/apps/s_client.c Thu Feb 14 15:35:58 2013 (r246797) +++ user/attilio/vmc-playground/crypto/openssl/apps/s_client.c Thu Feb 14 15:43:37 2013 (r246798) @@ -357,12 +357,14 @@ static void sc_usage(void) BIO_printf(bio_err," -tlsextdebug - hex dump of all TLS extensions received\n"); BIO_printf(bio_err," -status - request certificate status from server\n"); BIO_printf(bio_err," -no_ticket - disable use of RFC4507bis session tickets\n"); -# if !defined(OPENSSL_NO_NEXTPROTONEG) +# ifndef OPENSSL_NO_NEXTPROTONEG BIO_printf(bio_err," -nextprotoneg arg - enable NPN extension, considering named protocols supported (comma-separated list)\n"); # endif #endif BIO_printf(bio_err," -legacy_renegotiation - enable use of legacy renegotiation (dangerous)\n"); +#ifndef OPENSSL_NO_SRTP BIO_printf(bio_err," -use_srtp profiles - Offer SRTP key management with a colon-separated profile list\n"); +#endif BIO_printf(bio_err," -keymatexport label - Export keying material using label\n"); BIO_printf(bio_err," -keymatexportlen len - Export len bytes of keying material (default 20)\n"); } @@ -502,7 +504,9 @@ static char * MS_CALLBACK ssl_give_srp_c } #endif +#ifndef OPENSSL_NO_SRTP char *srtp_profiles = NULL; +#endif # ifndef OPENSSL_NO_NEXTPROTONEG /* This the context that we pass to next_proto_cb */ @@ -536,7 +540,7 @@ static int next_proto_cb(SSL *s, unsigne ctx->status = SSL_select_next_proto(out, outlen, in, inlen, ctx->data, ctx->len); return SSL_TLSEXT_ERR_OK; } -# endif +# endif /* ndef OPENSSL_NO_NEXTPROTONEG */ #endif enum @@ -945,11 +949,13 @@ int MAIN(int argc, char **argv) jpake_secret = *++argv; } #endif +#ifndef OPENSSL_NO_SRTP else if (strcmp(*argv,"-use_srtp") == 0) { if (--argc < 1) goto bad; srtp_profiles = *(++argv); } +#endif else if (strcmp(*argv,"-keymatexport") == 0) { if (--argc < 1) goto bad; @@ -1130,6 +1136,8 @@ bad: BIO_printf(bio_c_out, "PSK key given or JPAKE in use, setting client callback\n"); SSL_CTX_set_psk_client_callback(ctx, psk_client_cb); } +#endif +#ifndef OPENSSL_NO_SRTP if (srtp_profiles != NULL) SSL_CTX_set_tlsext_use_srtp(ctx, srtp_profiles); #endif @@ -1890,6 +1898,10 @@ end: print_stuff(bio_c_out,con,1); SSL_free(con); } +#if !defined(OPENSSL_NO_TLSEXT) && !defined(OPENSSL_NO_NEXTPROTONEG) + if (next_proto.data) + OPENSSL_free(next_proto.data); +#endif if (ctx != NULL) SSL_CTX_free(ctx); if (cert) X509_free(cert); @@ -1897,6 +1909,8 @@ end: EVP_PKEY_free(key); if (pass) OPENSSL_free(pass); + if (vpm) + X509_VERIFY_PARAM_free(vpm); if (cbuf != NULL) { OPENSSL_cleanse(cbuf,BUFSIZZ); OPENSSL_free(cbuf); } if (sbuf != NULL) { OPENSSL_cleanse(sbuf,BUFSIZZ); OPENSSL_free(sbuf); } if (mbuf != NULL) { OPENSSL_cleanse(mbuf,BUFSIZZ); OPENSSL_free(mbuf); } @@ -2061,6 +2075,7 @@ static void print_stuff(BIO *bio, SSL *s } #endif +#ifndef OPENSSL_NO_SRTP { SRTP_PROTECTION_PROFILE *srtp_profile=SSL_get_selected_srtp_profile(s); @@ -2068,6 +2083,7 @@ static void print_stuff(BIO *bio, SSL *s BIO_printf(bio,"SRTP Extension negotiated, profile=%s\n", srtp_profile->name); } +#endif SSL_SESSION_print(bio,SSL_get_session(s)); if (keymatexportlabel != NULL) Modified: user/attilio/vmc-playground/crypto/openssl/apps/s_server.c ============================================================================== --- user/attilio/vmc-playground/crypto/openssl/apps/s_server.c Thu Feb 14 15:35:58 2013 (r246797) +++ user/attilio/vmc-playground/crypto/openssl/apps/s_server.c Thu Feb 14 15:43:37 2013 (r246798) @@ -556,7 +556,9 @@ static void sv_usage(void) # ifndef OPENSSL_NO_NEXTPROTONEG BIO_printf(bio_err," -nextprotoneg arg - set the advertised protocols for the NPN extension (comma-separated list)\n"); # endif +# ifndef OPENSSL_NO_SRTP BIO_printf(bio_err," -use_srtp profiles - Offer SRTP key management with a colon-separated profile list\n"); +# endif #endif BIO_printf(bio_err," -keymatexport label - Export keying material using label\n"); BIO_printf(bio_err," -keymatexportlen len - Export len bytes of keying material (default 20)\n"); @@ -923,7 +925,9 @@ static char *jpake_secret = NULL; #ifndef OPENSSL_NO_SRP static srpsrvparm srp_callback_parm; #endif +#ifndef OPENSSL_NO_SRTP static char *srtp_profiles = NULL; +#endif int MAIN(int argc, char *argv[]) { @@ -1206,13 +1210,13 @@ int MAIN(int argc, char *argv[]) { if (--argc < 1) goto bad; srp_verifier_file = *(++argv); - meth=TLSv1_server_method(); + meth = TLSv1_server_method(); } else if (strcmp(*argv, "-srpuserseed") == 0) { if (--argc < 1) goto bad; srpuserseed = *(++argv); - meth=TLSv1_server_method(); + meth = TLSv1_server_method(); } #endif else if (strcmp(*argv,"-www") == 0) @@ -1319,11 +1323,13 @@ int MAIN(int argc, char *argv[]) jpake_secret = *(++argv); } #endif +#ifndef OPENSSL_NO_SRTP else if (strcmp(*argv,"-use_srtp") == 0) { if (--argc < 1) goto bad; srtp_profiles = *(++argv); } +#endif else if (strcmp(*argv,"-keymatexport") == 0) { if (--argc < 1) goto bad; @@ -1431,25 +1437,24 @@ bad: goto end; } } - -# ifndef OPENSSL_NO_NEXTPROTONEG - if (next_proto_neg_in) - { - unsigned short len; - next_proto.data = next_protos_parse(&len, - next_proto_neg_in); - if (next_proto.data == NULL) - goto end; - next_proto.len = len; - } - else - { - next_proto.data = NULL; - } -# endif #endif } +#if !defined(OPENSSL_NO_TLSEXT) && !defined(OPENSSL_NO_NEXTPROTONEG) + if (next_proto_neg_in) + { + unsigned short len; + next_proto.data = next_protos_parse(&len, next_proto_neg_in); + if (next_proto.data == NULL) + goto end; + next_proto.len = len; + } + else + { + next_proto.data = NULL; + } +#endif + if (s_dcert_file) { @@ -1550,8 +1555,10 @@ bad: else SSL_CTX_sess_set_cache_size(ctx,128); +#ifndef OPENSSL_NO_SRTP if (srtp_profiles != NULL) SSL_CTX_set_tlsext_use_srtp(ctx, srtp_profiles); +#endif #if 0 if (cipher == NULL) cipher=getenv("SSL_CIPHER"); @@ -1730,7 +1737,7 @@ bad: } #endif - if (!set_cert_key_stuff(ctx,s_cert,s_key)) + if (!set_cert_key_stuff(ctx, s_cert, s_key)) goto end; #ifndef OPENSSL_NO_TLSEXT if (ctx2 && !set_cert_key_stuff(ctx2,s_cert2,s_key2)) @@ -1738,7 +1745,7 @@ bad: #endif if (s_dcert != NULL) { - if (!set_cert_key_stuff(ctx,s_dcert,s_dkey)) + if (!set_cert_key_stuff(ctx, s_dcert, s_dkey)) goto end; } @@ -1893,7 +1900,15 @@ end: OPENSSL_free(pass); if (dpass) OPENSSL_free(dpass); + if (vpm) + X509_VERIFY_PARAM_free(vpm); #ifndef OPENSSL_NO_TLSEXT + if (tlscstatp.host) + OPENSSL_free(tlscstatp.host); + if (tlscstatp.port) + OPENSSL_free(tlscstatp.port); + if (tlscstatp.path) + OPENSSL_free(tlscstatp.path); if (ctx2 != NULL) SSL_CTX_free(ctx2); if (s_cert2) X509_free(s_cert2); @@ -2433,6 +2448,7 @@ static int init_ssl_connection(SSL *con) BIO_printf(bio_s_out,"Shared ciphers:%s\n",buf); str=SSL_CIPHER_get_name(SSL_get_current_cipher(con)); BIO_printf(bio_s_out,"CIPHER is %s\n",(str != NULL)?str:"(NONE)"); + #if !defined(OPENSSL_NO_TLSEXT) && !defined(OPENSSL_NO_NEXTPROTONEG) SSL_get0_next_proto_negotiated(con, &next_proto_neg, &next_proto_neg_len); if (next_proto_neg) @@ -2442,6 +2458,7 @@ static int init_ssl_connection(SSL *con) BIO_printf(bio_s_out, "\n"); } #endif +#ifndef OPENSSL_NO_SRTP { SRTP_PROTECTION_PROFILE *srtp_profile = SSL_get_selected_srtp_profile(con); @@ -2450,6 +2467,7 @@ static int init_ssl_connection(SSL *con) BIO_printf(bio_s_out,"SRTP Extension negotiated, profile=%s\n", srtp_profile->name); } +#endif if (SSL_cache_hit(con)) BIO_printf(bio_s_out,"Reused session-id\n"); if (SSL_ctrl(con,SSL_CTRL_GET_FLAGS,0,NULL) & TLS1_FLAGS_TLS_PADDING_BUG) @@ -2701,6 +2719,11 @@ static int www_body(char *hostname, int } BIO_puts(io,"\n"); + BIO_printf(io, + "Secure Renegotiation IS%s supported\n", + SSL_get_secure_renegotiation_support(con) ? + "" : " NOT"); + /* The following is evil and should not really * be done */ BIO_printf(io,"Ciphers supported in s_server binary\n"); Modified: user/attilio/vmc-playground/crypto/openssl/apps/speed.c ============================================================================== --- user/attilio/vmc-playground/crypto/openssl/apps/speed.c Thu Feb 14 15:35:58 2013 (r246797) +++ user/attilio/vmc-playground/crypto/openssl/apps/speed.c Thu Feb 14 15:43:37 2013 (r246798) @@ -254,7 +254,7 @@ static const char *names[ALGOR_NUM]={ "aes-128 cbc","aes-192 cbc","aes-256 cbc", "camellia-128 cbc","camellia-192 cbc","camellia-256 cbc", "evp","sha256","sha512","whirlpool", - "aes-128 ige","aes-192 ige","aes-256 ige","ghash"}; + "aes-128 ige","aes-192 ige","aes-256 ige","ghash" }; static double results[ALGOR_NUM][SIZE_NUM]; static int lengths[SIZE_NUM]={16,64,256,1024,8*1024}; #ifndef OPENSSL_NO_RSA @@ -299,7 +299,7 @@ static SIGRETTYPE sig_done(int sig) #if defined(_WIN32) #if !defined(SIGALRM) -#define SIGALRM +# define SIGALRM #endif static unsigned int lapse,schlock; static void alarm_win32(unsigned int secs) { lapse = secs*1000; } Modified: user/attilio/vmc-playground/crypto/openssl/apps/srp.c ============================================================================== --- user/attilio/vmc-playground/crypto/openssl/apps/srp.c Thu Feb 14 15:35:58 2013 (r246797) +++ user/attilio/vmc-playground/crypto/openssl/apps/srp.c Thu Feb 14 15:43:37 2013 (r246798) @@ -125,13 +125,13 @@ static int get_index(CA_DB *db, char* id if (type == DB_SRP_INDEX) for (i = 0; i < sk_OPENSSL_PSTRING_num(db->db->data); i++) { - pp = (char **)sk_OPENSSL_PSTRING_value(db->db->data, i); - if (pp[DB_srptype][0] == DB_SRP_INDEX && !strcmp(id, pp[DB_srpid])) + pp = sk_OPENSSL_PSTRING_value(db->db->data,i); + if (pp[DB_srptype][0] == DB_SRP_INDEX && !strcmp(id,pp[DB_srpid])) return i; } else for (i = 0; i < sk_OPENSSL_PSTRING_num(db->db->data); i++) { - pp = (char **)sk_OPENSSL_PSTRING_value(db->db->data, i); + pp = sk_OPENSSL_PSTRING_value(db->db->data,i); if (pp[DB_srptype][0] != DB_SRP_INDEX && !strcmp(id,pp[DB_srpid])) return i; @@ -145,7 +145,7 @@ static void print_entry(CA_DB *db, BIO * if (indx >= 0 && verbose) { int j; - char **pp = (char **)sk_OPENSSL_PSTRING_value(db->db->data, indx); + char **pp = sk_OPENSSL_PSTRING_value(db->db->data, indx); BIO_printf(bio, "%s \"%s\"\n", s, pp[DB_srpid]); for (j = 0; j < DB_NUMBER; j++) { @@ -163,7 +163,7 @@ static void print_user(CA_DB *db, BIO *b { if (verbose > 0) { - char **pp = (char **)sk_OPENSSL_PSTRING_value(db->db->data, userindex); + char **pp = sk_OPENSSL_PSTRING_value(db->db->data,userindex); if (pp[DB_srptype][0] != 'I') { @@ -517,7 +517,7 @@ bad: /* Lets check some fields */ for (i = 0; i < sk_OPENSSL_PSTRING_num(db->db->data); i++) { - pp = (char **)sk_OPENSSL_PSTRING_value(db->db->data, i); + pp = sk_OPENSSL_PSTRING_value(db->db->data, i); if (pp[DB_srptype][0] == DB_SRP_INDEX) { @@ -533,8 +533,8 @@ bad: if (gNindex >= 0) { - gNrow = (char **)sk_OPENSSL_PSTRING_value(db->db->data, gNindex); - print_entry(db, bio_err, gNindex, verbose > 1, "Default g and N") ; + gNrow = sk_OPENSSL_PSTRING_value(db->db->data,gNindex); + print_entry(db, bio_err, gNindex, verbose > 1, "Default g and N"); } else if (maxgN > 0 && !SRP_get_default_gN(gN)) { @@ -587,7 +587,7 @@ bad: if (userindex >= 0) { /* reactivation of a new user */ - char **row = (char **)sk_OPENSSL_PSTRING_value(db->db->data, userindex); + char **row = sk_OPENSSL_PSTRING_value(db->db->data, userindex); BIO_printf(bio_err, "user \"%s\" reactivated.\n", user); row[DB_srptype][0] = 'V'; @@ -634,7 +634,7 @@ bad: else { - char **row = (char **)sk_OPENSSL_PSTRING_value(db->db->data, userindex); + char **row = sk_OPENSSL_PSTRING_value(db->db->data, userindex); char type = row[DB_srptype][0]; if (type == 'v') { @@ -664,9 +664,9 @@ bad: if (!(gNid=srp_create_user(user,&(row[DB_srpverifier]), &(row[DB_srpsalt]),gNrow?gNrow[DB_srpsalt]:NULL, gNrow?gNrow[DB_srpverifier]:NULL, passout, bio_err,verbose))) { - BIO_printf(bio_err, "Cannot create srp verifier for user \"%s\", operation abandoned.\n", user); - errors++; - goto err; + BIO_printf(bio_err, "Cannot create srp verifier for user \"%s\", operation abandoned.\n", user); + errors++; + goto err; } row[DB_srptype][0] = 'v'; @@ -689,7 +689,7 @@ bad: } else { - char **xpp = (char **)sk_OPENSSL_PSTRING_value(db->db->data, userindex); + char **xpp = sk_OPENSSL_PSTRING_value(db->db->data,userindex); BIO_printf(bio_err, "user \"%s\" revoked. t\n", user); xpp[DB_srptype][0] = 'R'; @@ -714,7 +714,7 @@ bad: /* Lets check some fields */ for (i = 0; i < sk_OPENSSL_PSTRING_num(db->db->data); i++) { - pp = (char **)sk_OPENSSL_PSTRING_value(db->db->data, i); + pp = sk_OPENSSL_PSTRING_value(db->db->data,i); if (pp[DB_srptype][0] == 'v') { Modified: user/attilio/vmc-playground/crypto/openssl/apps/verify.c ============================================================================== --- user/attilio/vmc-playground/crypto/openssl/apps/verify.c Thu Feb 14 15:35:58 2013 (r246797) +++ user/attilio/vmc-playground/crypto/openssl/apps/verify.c Thu Feb 14 15:43:37 2013 (r246798) @@ -222,11 +222,19 @@ int MAIN(int argc, char **argv) goto end; } - if (argc < 1) check(cert_ctx, NULL, untrusted, trusted, crls, e); + ret = 0; + if (argc < 1) + { + if (1 != check(cert_ctx, NULL, untrusted, trusted, crls, e)) + ret = -1; + } else + { for (i=0; i Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B8765466; Fri, 15 Feb 2013 12:35:17 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 7C60B8FD; Fri, 15 Feb 2013 12:35:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1FCZHkR043345; Fri, 15 Feb 2013 12:35:17 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1FCZH5l043343; Fri, 15 Feb 2013 12:35:17 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201302151235.r1FCZH5l043343@svn.freebsd.org> From: Attilio Rao Date: Fri, 15 Feb 2013 12:35:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r246825 - user/attilio/vmc-playground/sys/vm X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Feb 2013 12:35:17 -0000 Author: attilio Date: Fri Feb 15 12:35:16 2013 New Revision: 246825 URL: http://svnweb.freebsd.org/changeset/base/246825 Log: - Fix style in vm_page_lookup(): there is no whiteline between assertions and other code in this file. - Reinsert some comments that were lost during the work but which are actual yet, reducing differences with HEAD. Sponsoed by: EMC / Isilon storage division Modified: user/attilio/vmc-playground/sys/vm/vm_page.c Modified: user/attilio/vmc-playground/sys/vm/vm_page.c ============================================================================== --- user/attilio/vmc-playground/sys/vm/vm_page.c Fri Feb 15 10:44:07 2013 (r246824) +++ user/attilio/vmc-playground/sys/vm/vm_page.c Fri Feb 15 12:35:16 2013 (r246825) @@ -820,6 +820,9 @@ vm_page_insert(vm_page_t m, vm_object_t m->object = object; m->pindex = pindex; + /* + * Now link into the object's ordered list of backed pages. + */ if (object->resident_page_count == 0) { TAILQ_INSERT_TAIL(&object->memq, m, listq); } else { @@ -879,6 +882,9 @@ vm_page_remove(vm_page_t m) vm_page_flash(m); } + /* + * Now remove from the object's list of backed pages. + */ vm_radix_remove(&object->rtree, m->pindex); TAILQ_REMOVE(&object->memq, m, listq); @@ -909,7 +915,6 @@ vm_page_lookup(vm_object_t object, vm_pi { VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); - return (vm_radix_lookup(&object->rtree, pindex)); } @@ -1101,10 +1106,16 @@ vm_page_cache_transfer(vm_object_t orig_ mtx_lock(&vm_page_queue_free_mtx); while ((m = vm_radix_lookup_ge(&orig_object->cache, offidxstart)) != NULL) { + /* + * Transfer all of the pages with offset greater than or + * equal to 'offidxstart' from the original object's + * cache to the new object's cache. + */ if ((m->pindex - offidxstart) >= new_object->size) break; vm_radix_remove(&orig_object->cache, m->pindex); vm_radix_insert(&new_object->cache, m->pindex - offidxstart, m); + /* Update the page's object and offset. */ m->object = new_object; m->pindex -= offidxstart; } @@ -2157,6 +2168,10 @@ vm_page_cache(vm_page_t m) */ vm_page_remque(m); + /* + * Remove the page from the object's collection of resident + * pages. + */ vm_radix_remove(&object->rtree, m->pindex); TAILQ_REMOVE(&object->memq, m, listq); object->resident_page_count--; From owner-svn-src-user@FreeBSD.ORG Fri Feb 15 14:48:07 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2749D856; Fri, 15 Feb 2013 14:48:07 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 01806111; Fri, 15 Feb 2013 14:48:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1FEm6N1083096; Fri, 15 Feb 2013 14:48:06 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1FEm6oW083095; Fri, 15 Feb 2013 14:48:06 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201302151448.r1FEm6oW083095@svn.freebsd.org> From: Attilio Rao Date: Fri, 15 Feb 2013 14:48:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r246834 - user/attilio/vmc-playground/sys/vm X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Feb 2013 14:48:07 -0000 Author: attilio Date: Fri Feb 15 14:48:06 2013 New Revision: 246834 URL: http://svnweb.freebsd.org/changeset/base/246834 Log: Improve dynamic branch prediction and i-cache utilization: - Use predict_false() to tag boot-time cache decisions - Compact boot-time cache allocation into a separate, non-inline, function that won't be called most of the times. Sponsored by: EMC / Isilon storage division Modified: user/attilio/vmc-playground/sys/vm/vm_radix.c Modified: user/attilio/vmc-playground/sys/vm/vm_radix.c ============================================================================== --- user/attilio/vmc-playground/sys/vm/vm_radix.c Fri Feb 15 14:22:23 2013 (r246833) +++ user/attilio/vmc-playground/sys/vm/vm_radix.c Fri Feb 15 14:48:06 2013 (r246834) @@ -128,6 +128,18 @@ vm_radix_node_zone_dtor(void *mem, int s } #endif +static struct vm_radix_node * +vm_radix_carve_bootcache(void) +{ + struct vm_radix_node *rnode; + + if (boot_cache_cnt == VM_RADIX_BOOT_CACHE) + panic("%s: Increase VM_RADIX_BOOT_CACHE", __func__); + rnode = &boot_cache[boot_cache_cnt]; + boot_cache_cnt++; + return (rnode); +} + /* * Allocate a radix node. Pre-allocation ensures that the request will be * always successfully satisfied. @@ -137,12 +149,9 @@ vm_radix_node_get(vm_pindex_t owner, uin { struct vm_radix_node *rnode; - if (boot_cache_cnt <= VM_RADIX_BOOT_CACHE) { - if (boot_cache_cnt == VM_RADIX_BOOT_CACHE) - panic("%s: Increase VM_RADIX_BOOT_CACHE", __func__); - rnode = &boot_cache[boot_cache_cnt]; - boot_cache_cnt++; - } else { + if (__predict_false(boot_cache_cnt <= VM_RADIX_BOOT_CACHE)) + rnode = vm_radix_carve_bootcache(); + else { rnode = uma_zalloc(vm_radix_node_zone, M_NOWAIT | M_ZERO); /* @@ -173,7 +182,8 @@ static __inline void vm_radix_node_put(struct vm_radix_node *rnode) { - if (rnode > boot_cache && rnode <= &boot_cache[VM_RADIX_BOOT_CACHE]) + if (__predict_false(rnode > boot_cache && + rnode <= &boot_cache[VM_RADIX_BOOT_CACHE])) return; uma_zfree(vm_radix_node_zone, rnode); } From owner-svn-src-user@FreeBSD.ORG Fri Feb 15 14:50:37 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B72BDA1B; Fri, 15 Feb 2013 14:50:37 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A252F12E; Fri, 15 Feb 2013 14:50:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1FEobhe084921; Fri, 15 Feb 2013 14:50:37 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1FEobO8084919; Fri, 15 Feb 2013 14:50:37 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201302151450.r1FEobO8084919@svn.freebsd.org> From: Attilio Rao Date: Fri, 15 Feb 2013 14:50:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r246835 - in user/attilio/vmc-playground/sys: conf vm X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Feb 2013 14:50:37 -0000 Author: attilio Date: Fri Feb 15 14:50:36 2013 New Revision: 246835 URL: http://svnweb.freebsd.org/changeset/base/246835 Log: - When panicing for "too small boot cache" reason, print the actual cache size value - Add a way to specify the size of the boot cache at compile time Sponsored by: EMC / Isilon storage division Modified: user/attilio/vmc-playground/sys/conf/options user/attilio/vmc-playground/sys/vm/vm_radix.c Modified: user/attilio/vmc-playground/sys/conf/options ============================================================================== --- user/attilio/vmc-playground/sys/conf/options Fri Feb 15 14:48:06 2013 (r246834) +++ user/attilio/vmc-playground/sys/conf/options Fri Feb 15 14:50:36 2013 (r246835) @@ -590,6 +590,7 @@ VM_KMEM_SIZE_SCALE opt_vm.h VM_KMEM_SIZE_MAX opt_vm.h VM_NRESERVLEVEL opt_vm.h VM_LEVEL_0_ORDER opt_vm.h +VM_RADIX_BOOT_CACHE opt_vm.h NO_SWAPPING opt_vm.h MALLOC_MAKE_FAILURES opt_vm.h MALLOC_PROFILE opt_vm.h Modified: user/attilio/vmc-playground/sys/vm/vm_radix.c ============================================================================== --- user/attilio/vmc-playground/sys/vm/vm_radix.c Fri Feb 15 14:48:06 2013 (r246834) +++ user/attilio/vmc-playground/sys/vm/vm_radix.c Fri Feb 15 14:50:36 2013 (r246835) @@ -45,6 +45,7 @@ #include #include "opt_ddb.h" +#include "opt_vm.h" #include #include @@ -67,7 +68,9 @@ #include #endif +#ifndef VM_RADIX_BOOT_CACHE #define VM_RADIX_BOOT_CACHE 1500 +#endif /* * Such sizes should permit to keep node children contained into a single @@ -134,7 +137,8 @@ vm_radix_carve_bootcache(void) struct vm_radix_node *rnode; if (boot_cache_cnt == VM_RADIX_BOOT_CACHE) - panic("%s: Increase VM_RADIX_BOOT_CACHE", __func__); + panic("%s: Increase VM_RADIX_BOOT_CACHE (%u)", __func__, + VM_RADIX_BOOT_CACHE); rnode = &boot_cache[boot_cache_cnt]; boot_cache_cnt++; return (rnode); From owner-svn-src-user@FreeBSD.ORG Fri Feb 15 14:53:42 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id CE072B5C; Fri, 15 Feb 2013 14:53:42 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B6CE6147; Fri, 15 Feb 2013 14:53:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1FErgT2085553; Fri, 15 Feb 2013 14:53:42 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1FErgri085552; Fri, 15 Feb 2013 14:53:42 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201302151453.r1FErgri085552@svn.freebsd.org> From: Attilio Rao Date: Fri, 15 Feb 2013 14:53:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r246836 - user/attilio/vmc-playground/sys/vm X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Feb 2013 14:53:42 -0000 Author: attilio Date: Fri Feb 15 14:53:42 2013 New Revision: 246836 URL: http://svnweb.freebsd.org/changeset/base/246836 Log: Move the radix node zone destructor definition closer to vm_radix_init() definition. Sponsored by: EMC / Isilon storage division Modified: user/attilio/vmc-playground/sys/vm/vm_radix.c Modified: user/attilio/vmc-playground/sys/vm/vm_radix.c ============================================================================== --- user/attilio/vmc-playground/sys/vm/vm_radix.c Fri Feb 15 14:50:36 2013 (r246835) +++ user/attilio/vmc-playground/sys/vm/vm_radix.c Fri Feb 15 14:53:42 2013 (r246836) @@ -115,22 +115,6 @@ static uma_zone_t vm_radix_node_zone; static u_int boot_cache_cnt; static struct vm_radix_node boot_cache[VM_RADIX_BOOT_CACHE]; -#ifdef INVARIANTS -/* - * Radix node zone destructor. - */ -static void -vm_radix_node_zone_dtor(void *mem, int size __unused, void *arg __unused) -{ - struct vm_radix_node *rnode; - - rnode = mem; - KASSERT(rnode->rn_count == 0, - ("vm_radix_node_put: Freeing node %p with %d children\n", mem, - rnode->rn_count)); -} -#endif - static struct vm_radix_node * vm_radix_carve_bootcache(void) { @@ -373,6 +357,22 @@ vm_radix_reclaim_allnodes_int(struct vm_ vm_radix_node_put(rnode); } +#ifdef INVARIANTS +/* + * Radix node zone destructor. + */ +static void +vm_radix_node_zone_dtor(void *mem, int size __unused, void *arg __unused) +{ + struct vm_radix_node *rnode; + + rnode = mem; + KASSERT(rnode->rn_count == 0, + ("vm_radix_node_put: Freeing node %p with %d children\n", mem, + rnode->rn_count)); +} +#endif + /* * Pre-allocate intermediate nodes from the UMA slab zone. */ From owner-svn-src-user@FreeBSD.ORG Fri Feb 15 14:54:10 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 44DE0CD0; Fri, 15 Feb 2013 14:54:10 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2DA5F14E; Fri, 15 Feb 2013 14:54:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1FEsAsJ085659; Fri, 15 Feb 2013 14:54:10 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1FEsA3G085658; Fri, 15 Feb 2013 14:54:10 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201302151454.r1FEsA3G085658@svn.freebsd.org> From: Attilio Rao Date: Fri, 15 Feb 2013 14:54:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r246837 - user/attilio/vmc-playground/sys/vm X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Feb 2013 14:54:10 -0000 Author: attilio Date: Fri Feb 15 14:54:09 2013 New Revision: 246837 URL: http://svnweb.freebsd.org/changeset/base/246837 Log: Fix comment. Modified: user/attilio/vmc-playground/sys/vm/vm_radix.c Modified: user/attilio/vmc-playground/sys/vm/vm_radix.c ============================================================================== --- user/attilio/vmc-playground/sys/vm/vm_radix.c Fri Feb 15 14:53:42 2013 (r246836) +++ user/attilio/vmc-playground/sys/vm/vm_radix.c Fri Feb 15 14:54:09 2013 (r246837) @@ -759,7 +759,7 @@ vm_radix_reclaim_allnodes(struct vm_radi #ifdef DDB /* - * Show details about the given vnode. + * Show details about the given radix node. */ DB_SHOW_COMMAND(radixnode, db_show_radixnode) { From owner-svn-src-user@FreeBSD.ORG Fri Feb 15 15:34:20 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 2E6D09ED; Fri, 15 Feb 2013 15:34:20 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 09DA72DA; Fri, 15 Feb 2013 15:34:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1FFYJRL098523; Fri, 15 Feb 2013 15:34:19 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1FFYJ8q098522; Fri, 15 Feb 2013 15:34:19 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201302151534.r1FFYJ8q098522@svn.freebsd.org> From: Attilio Rao Date: Fri, 15 Feb 2013 15:34:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r246839 - user/attilio/vmc-playground/sys/vm X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Feb 2013 15:34:20 -0000 Author: attilio Date: Fri Feb 15 15:34:19 2013 New Revision: 246839 URL: http://svnweb.freebsd.org/changeset/base/246839 Log: Remove unused headers. Modified: user/attilio/vmc-playground/sys/vm/vm_radix.c Modified: user/attilio/vmc-playground/sys/vm/vm_radix.c ============================================================================== --- user/attilio/vmc-playground/sys/vm/vm_radix.c Fri Feb 15 15:09:24 2013 (r246838) +++ user/attilio/vmc-playground/sys/vm/vm_radix.c Fri Feb 15 15:34:19 2013 (r246839) @@ -48,19 +48,13 @@ #include "opt_vm.h" #include -#include #include #include -#include -#include -#include -#include #include #include #include #include -#include #include #include From owner-svn-src-user@FreeBSD.ORG Fri Feb 15 16:05:19 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 00E9A9ED; Fri, 15 Feb 2013 16:05:18 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id CFDAB6BB; Fri, 15 Feb 2013 16:05:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1FG5Ilf007766; Fri, 15 Feb 2013 16:05:18 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1FG5Igd007765; Fri, 15 Feb 2013 16:05:18 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201302151605.r1FG5Igd007765@svn.freebsd.org> From: Attilio Rao Date: Fri, 15 Feb 2013 16:05:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r246840 - user/attilio/vmc-playground/sys/vm X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Feb 2013 16:05:19 -0000 Author: attilio Date: Fri Feb 15 16:05:18 2013 New Revision: 246840 URL: http://svnweb.freebsd.org/changeset/base/246840 Log: On arches with VM_PHYSSEG_DENSE the vm_page_array is larger than the actual number of vm_page_t that will be derived, so v_page_count should be used appropriately. Besides that, add a panic condition in case UMA fails to properly restrict the area in a way to keep all the desired objects. Sponsored by: EMC / Isilon storage division Reported by: alc Modified: user/attilio/vmc-playground/sys/vm/vm_radix.c Modified: user/attilio/vmc-playground/sys/vm/vm_radix.c ============================================================================== --- user/attilio/vmc-playground/sys/vm/vm_radix.c Fri Feb 15 15:34:19 2013 (r246839) +++ user/attilio/vmc-playground/sys/vm/vm_radix.c Fri Feb 15 16:05:18 2013 (r246840) @@ -50,11 +50,11 @@ #include #include #include +#include #include #include #include -#include #include #include @@ -383,7 +383,9 @@ vm_radix_init(void *arg __unused) NULL, #endif NULL, NULL, VM_RADIX_PAD, UMA_ZONE_VM | UMA_ZONE_NOFREE); - nitems = uma_zone_set_max(vm_radix_node_zone, vm_page_array_size); + nitems = uma_zone_set_max(vm_radix_node_zone, cnt.v_page_count); + if (nitems < cnt.v_page_count) + panic("%s: unexpected requested number of items", __func__); uma_prealloc(vm_radix_node_zone, nitems); boot_cache_cnt = VM_RADIX_BOOT_CACHE + 1; } From owner-svn-src-user@FreeBSD.ORG Fri Feb 15 16:08:15 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 0640DB3E; Fri, 15 Feb 2013 16:08:15 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E96176DA; Fri, 15 Feb 2013 16:08:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1FG8ExV008346; Fri, 15 Feb 2013 16:08:14 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1FG89YR008304; Fri, 15 Feb 2013 16:08:09 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201302151608.r1FG89YR008304@svn.freebsd.org> From: Attilio Rao Date: Fri, 15 Feb 2013 16:08:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r246841 - in user/attilio/vmcontention: include lib lib/libc/net lib/libc/stdio lib/libldns sbin/fsck_ffs sbin/fsdb share/man/man5 share/mk sys/amd64/amd64 sys/cddl/contrib/opensolaris/... X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Feb 2013 16:08:15 -0000 Author: attilio Date: Fri Feb 15 16:08:08 2013 New Revision: 246841 URL: http://svnweb.freebsd.org/changeset/base/246841 Log: MFC Added: - copied from r246840, head/contrib/ldns/ user/attilio/vmcontention/lib/libldns/ - copied from r246840, head/lib/libldns/ user/attilio/vmcontention/tools/build/options/WITHOUT_LDNS - copied unchanged from r246840, head/tools/build/options/WITHOUT_LDNS user/attilio/vmcontention/tools/build/options/WITH_LDNS_UTILS - copied unchanged from r246840, head/tools/build/options/WITH_LDNS_UTILS Directory Properties: user/attilio/vmcontention/contrib/ldns/ (props changed) Modified: user/attilio/vmcontention/include/string.h user/attilio/vmcontention/lib/Makefile user/attilio/vmcontention/lib/libc/net/getaddrinfo.3 user/attilio/vmcontention/lib/libc/net/getnameinfo.3 user/attilio/vmcontention/lib/libc/stdio/setbuf.3 user/attilio/vmcontention/sbin/fsck_ffs/fsck.h user/attilio/vmcontention/sbin/fsck_ffs/fsutil.c user/attilio/vmcontention/sbin/fsdb/fsdbutil.c user/attilio/vmcontention/share/man/man5/src.conf.5 user/attilio/vmcontention/share/mk/bsd.libnames.mk user/attilio/vmcontention/share/mk/bsd.own.mk user/attilio/vmcontention/sys/amd64/amd64/pmap.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c user/attilio/vmcontention/sys/conf/options user/attilio/vmcontention/sys/dev/oce/oce_if.c user/attilio/vmcontention/sys/dev/oce/oce_if.h user/attilio/vmcontention/sys/kern/uipc_usrreq.c user/attilio/vmcontention/sys/kern/vfs_vnops.c user/attilio/vmcontention/sys/net/if_pfsync.h user/attilio/vmcontention/sys/net80211/ieee80211.h user/attilio/vmcontention/sys/netgraph/ng_parse.c user/attilio/vmcontention/sys/netpfil/pf/if_pfsync.c user/attilio/vmcontention/sys/vm/vm_phys.c user/attilio/vmcontention/sys/x86/acpica/srat.c user/attilio/vmcontention/usr.bin/csup/csup.1 user/attilio/vmcontention/usr.sbin/bhyvectl/bhyvectl.c user/attilio/vmcontention/usr.sbin/jail/command.c Directory Properties: user/attilio/vmcontention/ (props changed) user/attilio/vmcontention/lib/libc/ (props changed) user/attilio/vmcontention/sbin/ (props changed) user/attilio/vmcontention/sys/ (props changed) user/attilio/vmcontention/sys/cddl/contrib/opensolaris/ (props changed) user/attilio/vmcontention/sys/conf/ (props changed) user/attilio/vmcontention/usr.bin/csup/ (props changed) user/attilio/vmcontention/usr.sbin/bhyvectl/ (props changed) user/attilio/vmcontention/usr.sbin/jail/ (props changed) Modified: user/attilio/vmcontention/include/string.h ============================================================================== --- user/attilio/vmcontention/include/string.h Fri Feb 15 16:05:18 2013 (r246840) +++ user/attilio/vmcontention/include/string.h Fri Feb 15 16:08:08 2013 (r246841) @@ -74,7 +74,7 @@ char *strcasestr(const char *, const cha #endif char *strcat(char * __restrict, const char * __restrict); char *strchr(const char *, int) __pure; -#if defined(_GNU_SOURCE) +#if __BSD_VISIBLE char *strchrnul(const char*, int) __pure; #endif int strcmp(const char *, const char *) __pure; Modified: user/attilio/vmcontention/lib/Makefile ============================================================================== --- user/attilio/vmcontention/lib/Makefile Fri Feb 15 16:05:18 2013 (r246840) +++ user/attilio/vmcontention/lib/Makefile Fri Feb 15 16:08:08 2013 (r246841) @@ -82,6 +82,7 @@ SUBDIR= ${SUBDIR_ORDERED} \ ${_libipx} \ libjail \ libkiconv \ + ${_libldns} \ liblzma \ libmagic \ libmandoc \ @@ -177,6 +178,10 @@ _libiconv_modules= libiconv_modules _libipx= libipx .endif +.if ${MK_LDNS} != "no" +_libldns= libldns +.endif + .if ${MK_LIBCPLUSPLUS} != "no" _libcxxrt= libcxxrt _libcplusplus= libc++ Modified: user/attilio/vmcontention/lib/libc/net/getaddrinfo.3 ============================================================================== --- user/attilio/vmcontention/lib/libc/net/getaddrinfo.3 Fri Feb 15 16:05:18 2013 (r246840) +++ user/attilio/vmcontention/lib/libc/net/getaddrinfo.3 Fri Feb 15 16:08:08 2013 (r246841) @@ -18,7 +18,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 6, 2009 +.Dd February 14, 2013 .Dt GETADDRINFO 3 .Os .Sh NAME @@ -339,7 +339,7 @@ hints.ai_socktype = SOCK_STREAM; error = getaddrinfo("www.kame.net", "http", &hints, &res0); if (error) { errx(1, "%s", gai_strerror(error)); - /*NOTREACHED*/ + /* NOTREACHED */ } s = -1; for (res = res0; res; res = res->ai_next) { @@ -361,7 +361,7 @@ for (res = res0; res; res = res->ai_next } if (s < 0) { err(1, "%s", cause); - /*NOTREACHED*/ + /* NOTREACHED */ } freeaddrinfo(res0); .Ed @@ -383,7 +383,7 @@ hints.ai_flags = AI_PASSIVE; error = getaddrinfo(NULL, "http", &hints, &res0); if (error) { errx(1, "%s", gai_strerror(error)); - /*NOTREACHED*/ + /* NOTREACHED */ } nsock = 0; for (res = res0; res && nsock < MAXSOCK; res = res->ai_next) { @@ -405,7 +405,7 @@ for (res = res0; res && nsock < MAXSOCK; } if (nsock == 0) { err(1, "%s", cause); - /*NOTREACHED*/ + /* NOTREACHED */ } freeaddrinfo(res0); .Ed Modified: user/attilio/vmcontention/lib/libc/net/getnameinfo.3 ============================================================================== --- user/attilio/vmcontention/lib/libc/net/getnameinfo.3 Fri Feb 15 16:05:18 2013 (r246840) +++ user/attilio/vmcontention/lib/libc/net/getnameinfo.3 Fri Feb 15 16:08:08 2013 (r246841) @@ -18,7 +18,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 28, 2007 +.Dd February 14, 2013 .Dt GETNAMEINFO 3 .Os .Sh NAME @@ -157,7 +157,7 @@ char hbuf[NI_MAXHOST], sbuf[NI_MAXSERV]; if (getnameinfo(sa, sa->sa_len, hbuf, sizeof(hbuf), sbuf, sizeof(sbuf), NI_NUMERICHOST | NI_NUMERICSERV)) { errx(1, "could not get numeric hostname"); - /*NOTREACHED*/ + /* NOTREACHED */ } printf("host=%s, serv=%s\en", hbuf, sbuf); .Ed @@ -170,7 +170,7 @@ char hbuf[NI_MAXHOST]; if (getnameinfo(sa, sa->sa_len, hbuf, sizeof(hbuf), NULL, 0, NI_NAMEREQD)) { errx(1, "could not resolve hostname"); - /*NOTREACHED*/ + /* NOTREACHED */ } printf("host=%s\en", hbuf); .Ed Modified: user/attilio/vmcontention/lib/libc/stdio/setbuf.3 ============================================================================== --- user/attilio/vmcontention/lib/libc/stdio/setbuf.3 Fri Feb 15 16:05:18 2013 (r246840) +++ user/attilio/vmcontention/lib/libc/stdio/setbuf.3 Fri Feb 15 16:08:08 2013 (r246841) @@ -32,7 +32,7 @@ .\" @(#)setbuf.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd February 15, 2013 .Dt SETBUF 3 .Os .Sh NAME @@ -195,19 +195,3 @@ and functions conform to .St -isoC . -.Sh BUGS -The -.Fn setbuffer -and -.Fn setlinebuf -functions are not portable to versions of -.Bx -before -.Bx 4.2 . -On -.Bx 4.2 -and -.Bx 4.3 -systems, -.Fn setbuf -always uses a suboptimal buffer size and should be avoided. Modified: user/attilio/vmcontention/sbin/fsck_ffs/fsck.h ============================================================================== --- user/attilio/vmcontention/sbin/fsck_ffs/fsck.h Fri Feb 15 16:05:18 2013 (r246840) +++ user/attilio/vmcontention/sbin/fsck_ffs/fsck.h Fri Feb 15 16:08:08 2013 (r246841) @@ -67,10 +67,13 @@ #include #include +#include + #define MAXDUP 10 /* limit on dup blks (per inode) */ #define MAXBAD 10 /* limit on bad blks (per inode) */ -#define MAXBUFSPACE 40*1024 /* maximum space to allocate to buffers */ -#define INOBUFSIZE 56*1024 /* size of buffer to read inodes in pass1 */ +#define MINBUFS 10 /* minimum number of buffers required */ +#define MAXBUFS 40 /* maximum space to allocate to buffers */ +#define INOBUFSIZE 64*1024 /* size of buffer to read inodes in pass1 */ union dinode { struct ufs1_dinode dp1; @@ -130,8 +133,7 @@ struct inostatlist { * buffer cache structure. */ struct bufarea { - struct bufarea *b_next; /* free list queue */ - struct bufarea *b_prev; /* free list queue */ + TAILQ_ENTRY(bufarea) b_list; /* buffer list */ ufs2_daddr_t b_bno; int b_size; int b_errs; @@ -159,10 +161,11 @@ struct bufarea { (bp)->b_un.b_indir2[i] = (val); \ } while (0) -#define B_INUSE 1 +/* + * Buffer flags + */ +#define B_INUSE 0x00000001 /* Buffer is in use */ -#define MINBUFS 5 /* minimum number of buffers required */ -struct bufarea bufhead; /* head of list of other blks in filesys */ struct bufarea sblk; /* file system superblock */ struct bufarea cgblk; /* cylinder group blocks */ struct bufarea *pdirbp; /* current directory contents */ Modified: user/attilio/vmcontention/sbin/fsck_ffs/fsutil.c ============================================================================== --- user/attilio/vmcontention/sbin/fsck_ffs/fsutil.c Fri Feb 15 16:05:18 2013 (r246840) +++ user/attilio/vmcontention/sbin/fsck_ffs/fsutil.c Fri Feb 15 16:08:08 2013 (r246841) @@ -67,6 +67,8 @@ long diskreads, totalreads; /* Disk cach struct timeval slowio_starttime; int slowio_delay_usec = 10000; /* Initial IO delay for background fsck */ int slowio_pollcnt; +static TAILQ_HEAD(buflist, bufarea) bufhead; /* head of buffer cache list */ +static int numbufs; /* size of buffer cache */ int ftypeok(union dinode *dp) @@ -162,8 +164,8 @@ bufinit(void) errx(EEXIT, "cannot allocate buffer pool"); cgblk.b_un.b_buf = bufp; initbarea(&cgblk); - bufhead.b_next = bufhead.b_prev = &bufhead; - bufcnt = MAXBUFSPACE / sblock.fs_bsize; + TAILQ_INIT(&bufhead); + bufcnt = MAXBUFS; if (bufcnt < MINBUFS) bufcnt = MINBUFS; for (i = 0; i < bufcnt; i++) { @@ -175,13 +177,10 @@ bufinit(void) errx(EEXIT, "cannot allocate buffer pool"); } bp->b_un.b_buf = bufp; - bp->b_prev = &bufhead; - bp->b_next = bufhead.b_next; - bufhead.b_next->b_prev = bp; - bufhead.b_next = bp; + TAILQ_INSERT_HEAD(&bufhead, bp, b_list); initbarea(bp); } - bufhead.b_size = i; /* save number of buffers */ + numbufs = i; /* save number of buffers */ } /* @@ -192,23 +191,19 @@ getdatablk(ufs2_daddr_t blkno, long size { struct bufarea *bp; - for (bp = bufhead.b_next; bp != &bufhead; bp = bp->b_next) + TAILQ_FOREACH(bp, &bufhead, b_list) if (bp->b_bno == fsbtodb(&sblock, blkno)) goto foundit; - for (bp = bufhead.b_prev; bp != &bufhead; bp = bp->b_prev) + TAILQ_FOREACH_REVERSE(bp, &bufhead, buflist, b_list) if ((bp->b_flags & B_INUSE) == 0) break; - if (bp == &bufhead) + if (bp == NULL) errx(EEXIT, "deadlocked buffer pool"); getblk(bp, blkno, size); /* fall through */ foundit: - bp->b_prev->b_next = bp->b_next; - bp->b_next->b_prev = bp->b_prev; - bp->b_prev = &bufhead; - bp->b_next = bufhead.b_next; - bufhead.b_next->b_prev = bp; - bufhead.b_next = bp; + TAILQ_REMOVE(&bufhead, bp, b_list); + TAILQ_INSERT_HEAD(&bufhead, bp, b_list); bp->b_flags |= B_INUSE; return (bp); } @@ -274,7 +269,7 @@ void ckfini(int markclean) { struct bufarea *bp, *nbp; - int ofsmodified, cnt = 0; + int ofsmodified, cnt; if (bkgrdflag) { unlink(snapname); @@ -295,6 +290,10 @@ ckfini(int markclean) rerun = 1; } } + if (debug && totalreads > 0) + printf("cache with %d buffers missed %ld of %ld (%d%%)\n", + numbufs, diskreads, totalreads, + (int)(diskreads * 100 / totalreads)); if (fswritefd < 0) { (void)close(fsreadfd); return; @@ -309,15 +308,16 @@ ckfini(int markclean) } flush(fswritefd, &cgblk); free(cgblk.b_un.b_buf); - for (bp = bufhead.b_prev; bp && bp != &bufhead; bp = nbp) { + cnt = 0; + TAILQ_FOREACH_REVERSE_SAFE(bp, &bufhead, buflist, b_list, nbp) { + TAILQ_REMOVE(&bufhead, bp, b_list); cnt++; flush(fswritefd, bp); - nbp = bp->b_prev; free(bp->b_un.b_buf); free((char *)bp); } - if (bufhead.b_size != cnt) - errx(EEXIT, "panic: lost %d buffers", bufhead.b_size - cnt); + if (numbufs != cnt) + errx(EEXIT, "panic: lost %d buffers", numbufs - cnt); pbp = pdirbp = (struct bufarea *)0; if (cursnapshot == 0 && sblock.fs_clean != markclean) { if ((sblock.fs_clean = markclean) != 0) { @@ -343,9 +343,6 @@ ckfini(int markclean) rerun = 1; } } - if (debug && totalreads > 0) - printf("cache missed %ld of %ld (%d%%)\n", diskreads, - totalreads, (int)(diskreads * 100 / totalreads)); (void)close(fsreadfd); (void)close(fswritefd); } Modified: user/attilio/vmcontention/sbin/fsdb/fsdbutil.c ============================================================================== --- user/attilio/vmcontention/sbin/fsdb/fsdbutil.c Fri Feb 15 16:05:18 2013 (r246840) +++ user/attilio/vmcontention/sbin/fsdb/fsdbutil.c Fri Feb 15 16:08:08 2013 (r246841) @@ -239,7 +239,6 @@ printindir(ufs2_daddr_t blk, int level, /* for the final indirect level, don't use the cache */ bp = &buf; bp->b_un.b_buf = bufp; - bp->b_prev = bp->b_next = bp; initbarea(bp); getblk(bp, blk, sblock.fs_bsize); Modified: user/attilio/vmcontention/share/man/man5/src.conf.5 ============================================================================== --- user/attilio/vmcontention/share/man/man5/src.conf.5 Fri Feb 15 16:05:18 2013 (r246840) +++ user/attilio/vmcontention/share/man/man5/src.conf.5 Fri Feb 15 16:08:08 2013 (r246841) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 236279 2012-05-30 02:37:20Z gjb .\" $FreeBSD$ -.Dd February 2, 2013 +.Dd February 15, 2013 .Dt SRC.CONF 5 .Os .Sh NAME @@ -291,7 +291,7 @@ When set, it also enforces the following Set to not build the Clang C/C++ compiler. .Pp It is a default setting on -arm/arm, arm/armeb, arm/armv6, arm/armv6eb, ia64/ia64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32 and sparc64/sparc64. +arm/armeb, arm/armv6eb, ia64/ia64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32 and sparc64/sparc64. When set, it also enforces the following options: .Pp .Bl -item -compact @@ -302,12 +302,6 @@ When set, it also enforces the following .It .Va WITHOUT_CLANG_IS_CC .El -.It Va WITH_CLANG -.\" from FreeBSD: head/tools/build/options/WITH_CLANG 221730 2011-05-10 11:14:40Z ru -Set to build the Clang C/C++ compiler. -.Pp -It is a default setting on -amd64/amd64, i386/i386, pc98/i386, powerpc/powerpc and powerpc/powerpc64. .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. @@ -435,13 +429,6 @@ This includes the device tree compiler ( .Pp It is a default setting on amd64/amd64, i386/i386, ia64/ia64, pc98/i386 and sparc64/sparc64. -.It Va WITH_FDT -.\" from FreeBSD: head/tools/build/options/WITH_FDT 221730 2011-05-10 11:14:40Z ru -Set to build Flattened Device Tree support as part of the base system. -This includes the device tree compiler (dtc) and libfdt support library. -.Pp -It is a default setting on -arm/arm, arm/armeb, arm/armv6, arm/armv6eb, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc and powerpc/powerpc64. .It Va WITHOUT_FLOPPY .\" from FreeBSD: head/tools/build/options/WITHOUT_FLOPPY 221540 2011-05-06 19:13:03Z ru Set to not build or install programs @@ -659,6 +646,26 @@ When set, it also enforces the following Set to build some programs without optional .Nm libkvm support. +.It Va WITHOUT_LDNS +.\" from FreeBSD: head/tools/build/options/WITHOUT_LDNS 246827 2013-02-15 13:44:18Z des +Setting this variable will prevent LDNS from being built. +When set, it also enforces the following options: +.Pp +.Bl -item -compact +.It +.Va WITHOUT_LDNS_UTILS +.El +.It Va WITH_LDNS_UTILS +.\" from FreeBSD: head/tools/build/options/WITH_LDNS_UTILS 246830 2013-02-15 13:57:51Z des +Setting this variable will enable the LDNS-based versions of +.Xr dig 1 +and +.Xr host 1 . +When set, the following options are also in effect: +.Pp +.Bl -inset -compact +.It Va WITHOUT_BIND_UTILS +.El .It Va WITHOUT_LEGACY_CONSOLE .\" from FreeBSD: head/tools/build/options/WITHOUT_LEGACY_CONSOLE 183242 2008-09-21 22:02:26Z sam Set to not build programs that support a legacy PC console; e.g. Modified: user/attilio/vmcontention/share/mk/bsd.libnames.mk ============================================================================== --- user/attilio/vmcontention/share/mk/bsd.libnames.mk Fri Feb 15 16:05:18 2013 (r246840) +++ user/attilio/vmcontention/share/mk/bsd.libnames.mk Fri Feb 15 16:08:08 2013 (r246841) @@ -85,6 +85,9 @@ LIBKICONV?= ${DESTDIR}${LIBDIR}/libkicon LIBKRB5?= ${DESTDIR}${LIBDIR}/libkrb5.a LIBKVM?= ${DESTDIR}${LIBDIR}/libkvm.a LIBL?= ${DESTDIR}${LIBDIR}/libl.a +.if ${MK_LDNS} != "no" +LIBLDNS?= ${DESTDIR}${LIBDIR}/lib_ldns.a +.endif LIBLN?= "don't use LIBLN, use LIBL" .if ${MK_BIND} != "no" LIBLWRES?= ${DESTDIR}${LIBDIR}/liblwres.a Modified: user/attilio/vmcontention/share/mk/bsd.own.mk ============================================================================== --- user/attilio/vmcontention/share/mk/bsd.own.mk Fri Feb 15 16:05:18 2013 (r246840) +++ user/attilio/vmcontention/share/mk/bsd.own.mk Fri Feb 15 16:08:08 2013 (r246841) @@ -295,6 +295,7 @@ __DEFAULT_YES_OPTIONS = \ KERBEROS \ KERNEL_SYMBOLS \ KVM \ + LDNS \ LEGACY_CONSOLE \ LIB32 \ LIBPTHREAD \ @@ -370,6 +371,7 @@ __DEFAULT_NO_OPTIONS = \ ICONV \ IDEA \ INSTALL_AS_USER \ + LDNS_UTILS \ NMTREE \ NAND \ OFED \ @@ -471,6 +473,14 @@ MK_BIND_NAMED:= no MK_BIND_UTILS:= no .endif +.if ${MK_LDNS} == "no" +MK_LDNS_UTILS:= no +.endif + +.if ${MK_LDNS_UTILS} != "no" +MK_BIND_UTILS:= no +.endif + .if ${MK_BIND_MTREE} == "no" MK_BIND_ETC:= no .endif Modified: user/attilio/vmcontention/sys/amd64/amd64/pmap.c ============================================================================== --- user/attilio/vmcontention/sys/amd64/amd64/pmap.c Fri Feb 15 16:05:18 2013 (r246840) +++ user/attilio/vmcontention/sys/amd64/amd64/pmap.c Fri Feb 15 16:08:08 2013 (r246841) @@ -1482,6 +1482,7 @@ pmap_qremove(vm_offset_t sva, int count) va = sva; while (count-- > 0) { + KASSERT(va >= VM_MIN_KERNEL_ADDRESS, ("usermode va %lx", va)); pmap_kremove(va); va += PAGE_SIZE; } @@ -4508,8 +4509,10 @@ pmap_remove_pages(pmap_t pmap) pte = &pte[pmap_pte_index(pv->pv_va)]; tpte = *pte & ~PG_PTE_PAT; } - if ((tpte & PG_V) == 0) - panic("bad pte"); + if ((tpte & PG_V) == 0) { + panic("bad pte va %lx pte %lx", + pv->pv_va, tpte); + } /* * We cannot remove wired pages from a process' mapping at this time Modified: user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c ============================================================================== --- user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c Fri Feb 15 16:05:18 2013 (r246840) +++ user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c Fri Feb 15 16:08:08 2013 (r246841) @@ -36,7 +36,6 @@ static int real_LZ4_compress(const char *source, char *dest, int isize, int osize); -static int real_LZ4_uncompress(const char *source, char *dest, int osize); static int LZ4_compressBound(int isize); static int LZ4_uncompress_unknownOutputSize(const char *source, char *dest, int isize, int maxOutputSize); @@ -104,16 +103,6 @@ lz4_decompress(void *s_start, void *d_st * situations (input data not compressible) worst case size * evaluation is provided by function LZ4_compressBound(). * - * real_LZ4_uncompress() : - * osize : is the output size, therefore the original size - * return : the number of bytes read in the source buffer. - * If the source stream is malformed, the function will stop - * decoding and return a negative result, indicating the byte - * position of the faulty instruction. This function never - * writes beyond dest + osize, and is therefore protected - * against malicious data packets. - * note : destination buffer must be already allocated - * * Advanced Functions * * LZ4_compressBound() : @@ -137,7 +126,6 @@ lz4_decompress(void *s_start, void *d_st * maxOutputSize, and is therefore protected against malicious * data packets. * note : Destination buffer must be already allocated. - * This version is slightly slower than real_LZ4_uncompress() * * LZ4_compressCtx() : * This function explicitly handles the CTX memory structure. @@ -879,128 +867,16 @@ real_LZ4_compress(const char *source, ch /* Decompression functions */ /* - * Note: The decoding functions real_LZ4_uncompress() and - * LZ4_uncompress_unknownOutputSize() are safe against "buffer overflow" - * attack type. They will never write nor read outside of the provided - * output buffers. LZ4_uncompress_unknownOutputSize() also insures that - * it will never read outside of the input buffer. A corrupted input - * will produce an error result, a negative int, indicating the position - * of the error within input stream. + * Note: The decoding functionLZ4_uncompress_unknownOutputSize() is safe + * against "buffer overflow" attack type. They will never write nor + * read outside of the provided output buffers. + * LZ4_uncompress_unknownOutputSize() also insures that it will never + * read outside of the input buffer. A corrupted input will produce + * an error result, a negative int, indicating the position of the + * error within input stream. */ static int -real_LZ4_uncompress(const char *source, char *dest, int osize) -{ - /* Local Variables */ - const BYTE *restrict ip = (const BYTE *) source; - const BYTE *ref; - - BYTE *op = (BYTE *) dest; - BYTE *const oend = op + osize; - BYTE *cpy; - - unsigned token; - - size_t length; - size_t dec32table[] = {0, 3, 2, 3, 0, 0, 0, 0}; -#if LZ4_ARCH64 - size_t dec64table[] = {0, 0, 0, (size_t)-1, 0, 1, 2, 3}; -#endif - - /* Main Loop */ - for (;;) { - /* get runlength */ - token = *ip++; - if ((length = (token >> ML_BITS)) == RUN_MASK) { - size_t len; - for (; (len = *ip++) == 255; length += 255) { - } - length += len; - } - /* copy literals */ - cpy = op + length; - if unlikely(cpy > oend - COPYLENGTH) { - if (cpy != oend) - /* Error: we must necessarily stand at EOF */ - goto _output_error; - (void) memcpy(op, ip, length); - ip += length; - break; /* EOF */ - } - LZ4_WILDCOPY(ip, op, cpy); - ip -= (op - cpy); - op = cpy; - - /* get offset */ - LZ4_READ_LITTLEENDIAN_16(ref, cpy, ip); - ip += 2; - if unlikely(ref < (BYTE * const) dest) - /* - * Error: offset create reference outside destination - * buffer - */ - goto _output_error; - - /* get matchlength */ - if ((length = (token & ML_MASK)) == ML_MASK) { - for (; *ip == 255; length += 255) { - ip++; - } - length += *ip++; - } - /* copy repeated sequence */ - if unlikely(op - ref < STEPSIZE) { -#if LZ4_ARCH64 - size_t dec64 = dec64table[op-ref]; -#else - const int dec64 = 0; -#endif - op[0] = ref[0]; - op[1] = ref[1]; - op[2] = ref[2]; - op[3] = ref[3]; - op += 4; - ref += 4; - ref -= dec32table[op-ref]; - A32(op) = A32(ref); - op += STEPSIZE - 4; - ref -= dec64; - } else { - LZ4_COPYSTEP(ref, op); - } - cpy = op + length - (STEPSIZE - 4); - if (cpy > oend - COPYLENGTH) { - if (cpy > oend) - /* - * Error: request to write beyond destination - * buffer - */ - goto _output_error; - LZ4_SECURECOPY(ref, op, (oend - COPYLENGTH)); - while (op < cpy) - *op++ = *ref++; - op = cpy; - if (op == oend) - /* - * Check EOF (should never happen, since last - * 5 bytes are supposed to be literals) - */ - goto _output_error; - continue; - } - LZ4_SECURECOPY(ref, op, cpy); - op = cpy; /* correction */ - } - - /* end of decoding */ - return (int)(((char *)ip) - source); - - /* write overflow error detected */ - _output_error: - return (int)(-(((char *)ip) - source)); -} - -static int LZ4_uncompress_unknownOutputSize(const char *source, char *dest, int isize, int maxOutputSize) { Modified: user/attilio/vmcontention/sys/conf/options ============================================================================== --- user/attilio/vmcontention/sys/conf/options Fri Feb 15 16:05:18 2013 (r246840) +++ user/attilio/vmcontention/sys/conf/options Fri Feb 15 16:08:08 2013 (r246841) @@ -588,6 +588,7 @@ VFS_BIO_DEBUG opt_global.h VM_KMEM_SIZE opt_vm.h VM_KMEM_SIZE_SCALE opt_vm.h VM_KMEM_SIZE_MAX opt_vm.h +VM_NDOMAIN opt_vm.h VM_NRESERVLEVEL opt_vm.h VM_LEVEL_0_ORDER opt_vm.h NO_SWAPPING opt_vm.h Modified: user/attilio/vmcontention/sys/dev/oce/oce_if.c ============================================================================== --- user/attilio/vmcontention/sys/dev/oce/oce_if.c Fri Feb 15 16:05:18 2013 (r246840) +++ user/attilio/vmcontention/sys/dev/oce/oce_if.c Fri Feb 15 16:08:08 2013 (r246841) @@ -1817,6 +1817,9 @@ oce_local_timer(void *arg) } +/* NOTE : This should only be called holding + * DEVICE_LOCK. +*/ static void oce_if_deactivate(POCE_SOFTC sc) { @@ -1846,11 +1849,17 @@ oce_if_deactivate(POCE_SOFTC sc) /* Stop intrs and finish any bottom halves pending */ oce_hw_intr_disable(sc); + /* Since taskqueue_drain takes a Giant Lock, We should not acquire + any other lock. So unlock device lock and require after + completing taskqueue_drain. + */ + UNLOCK(&sc->dev_lock); for (i = 0; i < sc->intr_count; i++) { if (sc->intrs[i].tq != NULL) { taskqueue_drain(sc->intrs[i].tq, &sc->intrs[i].task); } } + LOCK(&sc->dev_lock); /* Delete RX queue in card with flush param */ oce_stop_rx(sc); Modified: user/attilio/vmcontention/sys/dev/oce/oce_if.h ============================================================================== --- user/attilio/vmcontention/sys/dev/oce/oce_if.h Fri Feb 15 16:05:18 2013 (r246840) +++ user/attilio/vmcontention/sys/dev/oce/oce_if.h Fri Feb 15 16:08:08 2013 (r246841) @@ -493,7 +493,7 @@ struct oce_lock { #define LOCK_CREATE(lock, desc) { \ strncpy((lock)->name, (desc), MAX_LOCK_DESC_LEN); \ (lock)->name[MAX_LOCK_DESC_LEN] = '\0'; \ - mtx_init(&(lock)->mutex, (lock)->name, MTX_NETWORK_LOCK, MTX_DEF); \ + mtx_init(&(lock)->mutex, (lock)->name, NULL, MTX_DEF); \ } #define LOCK_DESTROY(lock) \ if (mtx_initialized(&(lock)->mutex))\ Modified: user/attilio/vmcontention/sys/kern/uipc_usrreq.c ============================================================================== --- user/attilio/vmcontention/sys/kern/uipc_usrreq.c Fri Feb 15 16:05:18 2013 (r246840) +++ user/attilio/vmcontention/sys/kern/uipc_usrreq.c Fri Feb 15 16:08:08 2013 (r246841) @@ -1798,6 +1798,7 @@ unp_internalize(struct mbuf **controlp, struct mbuf *control = *controlp; struct proc *p = td->td_proc; struct filedesc *fdescp = p->p_fd; + struct bintime *bt; struct cmsghdr *cm = mtod(control, struct cmsghdr *); struct cmsgcred *cmcred; struct file **rp; @@ -1906,6 +1907,18 @@ unp_internalize(struct mbuf **controlp, microtime(tv); break; + case SCM_BINTIME: + *controlp = sbcreatecontrol(NULL, sizeof(*bt), + SCM_BINTIME, SOL_SOCKET); + if (*controlp == NULL) { + error = ENOBUFS; + goto out; + } + bt = (struct bintime *) + CMSG_DATA(mtod(*controlp, struct cmsghdr *)); + bintime(bt); + break; + default: error = EINVAL; goto out; Modified: user/attilio/vmcontention/sys/kern/vfs_vnops.c ============================================================================== --- user/attilio/vmcontention/sys/kern/vfs_vnops.c Fri Feb 15 16:05:18 2013 (r246840) +++ user/attilio/vmcontention/sys/kern/vfs_vnops.c Fri Feb 15 16:08:08 2013 (r246841) @@ -872,8 +872,8 @@ static const int io_hold_cnt = 16; static int vn_io_fault_enable = 1; SYSCTL_INT(_debug, OID_AUTO, vn_io_fault_enable, CTLFLAG_RW, &vn_io_fault_enable, 0, "Enable vn_io_fault lock avoidance"); -static unsigned long vn_io_faults_cnt; -SYSCTL_LONG(_debug, OID_AUTO, vn_io_faults, CTLFLAG_RD, +static u_long vn_io_faults_cnt; +SYSCTL_ULONG(_debug, OID_AUTO, vn_io_faults, CTLFLAG_RD, &vn_io_faults_cnt, 0, "Count of vn_io_fault lock avoidance triggers"); /* Modified: user/attilio/vmcontention/sys/net/if_pfsync.h ============================================================================== --- user/attilio/vmcontention/sys/net/if_pfsync.h Fri Feb 15 16:05:18 2013 (r246840) +++ user/attilio/vmcontention/sys/net/if_pfsync.h Fri Feb 15 16:08:08 2013 (r246841) @@ -67,8 +67,6 @@ #define PFSYNC_ACT_EOF 12 /* end of frame */ #define PFSYNC_ACT_MAX 13 -#define PFSYNC_HMAC_LEN 20 - /* * A pfsync frame is built from a header followed by several sections which * are all prefixed with their own subheaders. Frames must be terminated with @@ -205,18 +203,8 @@ struct pfsync_tdb { u_int8_t _pad[2]; } __packed; -/* - * EOF - */ - -struct pfsync_eof { - u_int8_t hmac[PFSYNC_HMAC_LEN]; -} __packed; - #define PFSYNC_HDRLEN sizeof(struct pfsync_header) - - /* * Names for PFSYNC sysctl objects */ Modified: user/attilio/vmcontention/sys/net80211/ieee80211.h ============================================================================== --- user/attilio/vmcontention/sys/net80211/ieee80211.h Fri Feb 15 16:05:18 2013 (r246840) +++ user/attilio/vmcontention/sys/net80211/ieee80211.h Fri Feb 15 16:08:08 2013 (r246841) @@ -200,11 +200,11 @@ struct ieee80211_qosframe_addr4 { #define IEEE80211_QOS_EOSP_S 4 #define IEEE80211_QOS_TID 0x0f /* qos[1] byte used for all frames sent by mesh STAs in a mesh BSS */ -#define IEEE80211_QOS_MC 0x10 /* Mesh control */ +#define IEEE80211_QOS_MC 0x01 /* Mesh control */ /* Mesh power save level*/ -#define IEEE80211_QOS_MESH_PSL 0x20 +#define IEEE80211_QOS_MESH_PSL 0x02 /* Mesh Receiver Service Period Initiated */ -#define IEEE80211_QOS_RSPI 0x40 +#define IEEE80211_QOS_RSPI 0x04 /* bits 11 to 15 reserved */ /* does frame have QoS sequence control data */ Modified: user/attilio/vmcontention/sys/netgraph/ng_parse.c ============================================================================== --- user/attilio/vmcontention/sys/netgraph/ng_parse.c Fri Feb 15 16:05:18 2013 (r246840) +++ user/attilio/vmcontention/sys/netgraph/ng_parse.c Fri Feb 15 16:08:08 2013 (r246841) @@ -1236,6 +1236,7 @@ ng_parse_composite(const struct ng_parse distinguish name from values by seeing if the next token is an equals sign */ if (ctype != CT_STRUCT) { + u_long ul; int len2, off2; char *eptr; @@ -1259,11 +1260,12 @@ ng_parse_composite(const struct ng_parse } /* Index was specified explicitly; parse it */ - index = (u_int)strtoul(s + *off, &eptr, 0); - if (index < 0 || eptr - (s + *off) != len) { + ul = strtoul(s + *off, &eptr, 0); + if (ul == ULONG_MAX || eptr - (s + *off) != len) { error = EINVAL; goto done; } + index = (u_int)ul; nextIndex = index + 1; *off += len + len2; } else { /* a structure field */ Modified: user/attilio/vmcontention/sys/netpfil/pf/if_pfsync.c ============================================================================== --- user/attilio/vmcontention/sys/netpfil/pf/if_pfsync.c Fri Feb 15 16:05:18 2013 (r246840) +++ user/attilio/vmcontention/sys/netpfil/pf/if_pfsync.c Fri Feb 15 16:08:08 2013 (r246841) @@ -99,8 +99,7 @@ __FBSDID("$FreeBSD$"); #define PFSYNC_MINPKT ( \ sizeof(struct ip) + \ sizeof(struct pfsync_header) + \ - sizeof(struct pfsync_subheader) + \ - sizeof(struct pfsync_eof)) + sizeof(struct pfsync_subheader) ) struct pfsync_pkt { struct ip *ip; Modified: user/attilio/vmcontention/sys/vm/vm_phys.c ============================================================================== --- user/attilio/vmcontention/sys/vm/vm_phys.c Fri Feb 15 16:05:18 2013 (r246840) +++ user/attilio/vmcontention/sys/vm/vm_phys.c Fri Feb 15 16:08:08 2013 (r246841) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include "opt_ddb.h" +#include "opt_vm.h" #include #include Modified: user/attilio/vmcontention/sys/x86/acpica/srat.c ============================================================================== --- user/attilio/vmcontention/sys/x86/acpica/srat.c Fri Feb 15 16:05:18 2013 (r246840) +++ user/attilio/vmcontention/sys/x86/acpica/srat.c Fri Feb 15 16:08:08 2013 (r246841) @@ -28,6 +28,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_vm.h" + #include #include #include Copied: user/attilio/vmcontention/tools/build/options/WITHOUT_LDNS (from r246840, head/tools/build/options/WITHOUT_LDNS) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/attilio/vmcontention/tools/build/options/WITHOUT_LDNS Fri Feb 15 16:08:08 2013 (r246841, copy of r246840, head/tools/build/options/WITHOUT_LDNS) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Setting this variable will prevent LDNS from being built. Copied: user/attilio/vmcontention/tools/build/options/WITH_LDNS_UTILS (from r246840, head/tools/build/options/WITH_LDNS_UTILS) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/attilio/vmcontention/tools/build/options/WITH_LDNS_UTILS Fri Feb 15 16:08:08 2013 (r246841, copy of r246840, head/tools/build/options/WITH_LDNS_UTILS) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Setting this variable will enable the LDNS-based versions of +.Xr dig 1 +and +.Xr host 1 . Modified: user/attilio/vmcontention/usr.bin/csup/csup.1 ============================================================================== --- user/attilio/vmcontention/usr.bin/csup/csup.1 Fri Feb 15 16:05:18 2013 (r246840) +++ user/attilio/vmcontention/usr.bin/csup/csup.1 Fri Feb 15 16:08:08 2013 (r246841) @@ -24,7 +24,7 @@ .\" $Id: cvsup.1,v 1.70 2003/03/04 18:23:46 jdp Exp $ .\" $FreeBSD$ .\" -.Dd Feburary 8, 2013 +.Dd February 8, 2013 .Dt CSUP 1 .Os FreeBSD .Sh NAME Modified: user/attilio/vmcontention/usr.sbin/bhyvectl/bhyvectl.c ============================================================================== --- user/attilio/vmcontention/usr.sbin/bhyvectl/bhyvectl.c Fri Feb 15 16:05:18 2013 (r246840) +++ user/attilio/vmcontention/usr.sbin/bhyvectl/bhyvectl.c Fri Feb 15 16:08:08 2013 (r246841) @@ -185,6 +185,7 @@ usage(void) " [--get-vmcs-interruptibility]\n" " [--set-x2apic-state=]\n" " [--get-x2apic-state]\n" + " [--unassign-pptdev=]\n" " [--set-lowmem=]\n" " [--get-lowmem]\n" " [--set-highmem=]\n" @@ -218,6 +219,7 @@ static int set_cs, set_ds, set_es, set_f static int get_cs, get_ds, get_es, get_fs, get_gs, get_ss, get_tr, get_ldtr; static int set_x2apic_state, get_x2apic_state; enum x2apic_state x2apic_state; +static int unassign_pptdev, bus, slot, func; static int run; /* @@ -376,6 +378,7 @@ enum { SET_VMCS_ENTRY_INTERRUPTION_INFO, SET_CAP, CAPNAME, + UNASSIGN_PPTDEV, }; int @@ -425,6 +428,7 @@ main(int argc, char *argv[]) { "set-vmcs-entry-interruption-info", REQ_ARG, 0, SET_VMCS_ENTRY_INTERRUPTION_INFO }, { "capname", REQ_ARG, 0, CAPNAME }, + { "unassign-pptdev", REQ_ARG, 0, UNASSIGN_PPTDEV }, { "setcap", REQ_ARG, 0, SET_CAP }, { "getcap", NO_ARG, &getcap, 1 }, { "get-stats", NO_ARG, &get_stats, 1 }, @@ -672,6 +676,11 @@ main(int argc, char *argv[]) case CAPNAME: capname = optarg; break; + case UNASSIGN_PPTDEV: + unassign_pptdev = 1; + if (sscanf(optarg, "%d/%d/%d", &bus, &slot, &func) != 3) + usage(); + break; default: usage(); } @@ -805,6 +814,9 @@ main(int argc, char *argv[]) if (!error && set_x2apic_state) error = vm_set_x2apic_state(ctx, vcpu, x2apic_state); + if (!error && unassign_pptdev) + error = vm_unassign_pptdev(ctx, bus, slot, func); + if (!error && set_exception_bitmap) { error = vm_set_vmcs_field(ctx, vcpu, VMCS_EXCEPTION_BITMAP, exception_bitmap); Modified: user/attilio/vmcontention/usr.sbin/jail/command.c ============================================================================== --- user/attilio/vmcontention/usr.sbin/jail/command.c Fri Feb 15 16:05:18 2013 (r246840) +++ user/attilio/vmcontention/usr.sbin/jail/command.c Fri Feb 15 16:08:08 2013 (r246841) @@ -66,7 +66,7 @@ int paralimit = -1; extern char **environ; static int run_command(struct cfjail *j); -static void add_proc(struct cfjail *j, pid_t pid); +static int add_proc(struct cfjail *j, pid_t pid); static void clear_procs(struct cfjail *j); static struct cfjail *find_proc(pid_t pid); static int term_procs(struct cfjail *j); @@ -542,13 +542,12 @@ run_command(struct cfjail *j) if (pid < 0) err(1, "fork"); if (pid > 0) { - if (bg) { + if (bg || !add_proc(j, pid)) { free(j->comline); j->comline = NULL; return 0; } else { paralimit--; - add_proc(j, pid); return 1; } } @@ -622,7 +621,7 @@ run_command(struct cfjail *j) /* * Add a process to the hash, tied to a jail. */ -static void +static int add_proc(struct cfjail *j, pid_t pid) { struct kevent ke; @@ -632,8 +631,11 @@ add_proc(struct cfjail *j, pid_t pid) if (!kq && (kq = kqueue()) < 0) err(1, "kqueue"); EV_SET(&ke, pid, EVFILT_PROC, EV_ADD, NOTE_EXIT, 0, NULL); - if (kevent(kq, &ke, 1, NULL, 0, NULL) < 0) + if (kevent(kq, &ke, 1, NULL, 0, NULL) < 0) { + if (errno == ESRCH) + return 0; err(1, "kevent"); + } ph = emalloc(sizeof(struct phash)); ph->j = j; ph->pid = pid; @@ -658,6 +660,7 @@ add_proc(struct cfjail *j, pid_t pid) TAILQ_INSERT_TAIL(&sleeping, j, tq); j->queue = &sleeping; } + return 1; } /* @@ -730,7 +733,7 @@ term_procs(struct cfjail *j) for (i = 0; i < pcnt; i++) if (ki[i].ki_jid == j->jid && kill(ki[i].ki_pid, SIGTERM) == 0) { - add_proc(j, ki[i].ki_pid); + (void)add_proc(j, ki[i].ki_pid); if (verbose > 0) { if (!noted) { noted = 1; From owner-svn-src-user@FreeBSD.ORG Fri Feb 15 16:11:36 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A18E6D88; Fri, 15 Feb 2013 16:11:36 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 857726FE; Fri, 15 Feb 2013 16:11:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1FGBaOI010759; Fri, 15 Feb 2013 16:11:36 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1FGBUo1010716; Fri, 15 Feb 2013 16:11:30 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201302151611.r1FGBUo1010716@svn.freebsd.org> From: Attilio Rao Date: Fri, 15 Feb 2013 16:11:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r246842 - in user/attilio/vmc-playground: include lib lib/libc/net lib/libc/stdio lib/libldns sbin/fsck_ffs sbin/fsdb share/man/man5 share/mk sys/amd64/amd64 sys/cddl/contrib/opensolari... X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Feb 2013 16:11:36 -0000 Author: attilio Date: Fri Feb 15 16:11:30 2013 New Revision: 246842 URL: http://svnweb.freebsd.org/changeset/base/246842 Log: Merge from vmcontention Added: - copied from r246841, user/attilio/vmcontention/contrib/ldns/ user/attilio/vmc-playground/lib/libldns/ - copied from r246841, user/attilio/vmcontention/lib/libldns/ user/attilio/vmc-playground/tools/build/options/WITHOUT_LDNS - copied unchanged from r246841, user/attilio/vmcontention/tools/build/options/WITHOUT_LDNS user/attilio/vmc-playground/tools/build/options/WITH_LDNS_UTILS - copied unchanged from r246841, user/attilio/vmcontention/tools/build/options/WITH_LDNS_UTILS Directory Properties: user/attilio/vmc-playground/contrib/ldns/ (props changed) Modified: user/attilio/vmc-playground/include/string.h user/attilio/vmc-playground/lib/Makefile user/attilio/vmc-playground/lib/libc/net/getaddrinfo.3 user/attilio/vmc-playground/lib/libc/net/getnameinfo.3 user/attilio/vmc-playground/lib/libc/stdio/setbuf.3 user/attilio/vmc-playground/sbin/fsck_ffs/fsck.h user/attilio/vmc-playground/sbin/fsck_ffs/fsutil.c user/attilio/vmc-playground/sbin/fsdb/fsdbutil.c user/attilio/vmc-playground/share/man/man5/src.conf.5 user/attilio/vmc-playground/share/mk/bsd.libnames.mk user/attilio/vmc-playground/share/mk/bsd.own.mk user/attilio/vmc-playground/sys/amd64/amd64/pmap.c user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c user/attilio/vmc-playground/sys/conf/options user/attilio/vmc-playground/sys/dev/oce/oce_if.c user/attilio/vmc-playground/sys/dev/oce/oce_if.h user/attilio/vmc-playground/sys/kern/uipc_usrreq.c user/attilio/vmc-playground/sys/kern/vfs_vnops.c user/attilio/vmc-playground/sys/net/if_pfsync.h user/attilio/vmc-playground/sys/net80211/ieee80211.h user/attilio/vmc-playground/sys/netgraph/ng_parse.c user/attilio/vmc-playground/sys/netpfil/pf/if_pfsync.c user/attilio/vmc-playground/sys/vm/vm_phys.c user/attilio/vmc-playground/sys/x86/acpica/srat.c user/attilio/vmc-playground/usr.bin/csup/csup.1 user/attilio/vmc-playground/usr.sbin/bhyvectl/bhyvectl.c user/attilio/vmc-playground/usr.sbin/jail/command.c Directory Properties: user/attilio/vmc-playground/ (props changed) user/attilio/vmc-playground/lib/libc/ (props changed) user/attilio/vmc-playground/sbin/ (props changed) user/attilio/vmc-playground/sys/ (props changed) user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/ (props changed) user/attilio/vmc-playground/sys/conf/ (props changed) user/attilio/vmc-playground/usr.bin/csup/ (props changed) user/attilio/vmc-playground/usr.sbin/bhyvectl/ (props changed) user/attilio/vmc-playground/usr.sbin/jail/ (props changed) Modified: user/attilio/vmc-playground/include/string.h ============================================================================== --- user/attilio/vmc-playground/include/string.h Fri Feb 15 16:08:08 2013 (r246841) +++ user/attilio/vmc-playground/include/string.h Fri Feb 15 16:11:30 2013 (r246842) @@ -74,7 +74,7 @@ char *strcasestr(const char *, const cha #endif char *strcat(char * __restrict, const char * __restrict); char *strchr(const char *, int) __pure; -#if defined(_GNU_SOURCE) +#if __BSD_VISIBLE char *strchrnul(const char*, int) __pure; #endif int strcmp(const char *, const char *) __pure; Modified: user/attilio/vmc-playground/lib/Makefile ============================================================================== --- user/attilio/vmc-playground/lib/Makefile Fri Feb 15 16:08:08 2013 (r246841) +++ user/attilio/vmc-playground/lib/Makefile Fri Feb 15 16:11:30 2013 (r246842) @@ -82,6 +82,7 @@ SUBDIR= ${SUBDIR_ORDERED} \ ${_libipx} \ libjail \ libkiconv \ + ${_libldns} \ liblzma \ libmagic \ libmandoc \ @@ -177,6 +178,10 @@ _libiconv_modules= libiconv_modules _libipx= libipx .endif +.if ${MK_LDNS} != "no" +_libldns= libldns +.endif + .if ${MK_LIBCPLUSPLUS} != "no" _libcxxrt= libcxxrt _libcplusplus= libc++ Modified: user/attilio/vmc-playground/lib/libc/net/getaddrinfo.3 ============================================================================== --- user/attilio/vmc-playground/lib/libc/net/getaddrinfo.3 Fri Feb 15 16:08:08 2013 (r246841) +++ user/attilio/vmc-playground/lib/libc/net/getaddrinfo.3 Fri Feb 15 16:11:30 2013 (r246842) @@ -18,7 +18,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 6, 2009 +.Dd February 14, 2013 .Dt GETADDRINFO 3 .Os .Sh NAME @@ -339,7 +339,7 @@ hints.ai_socktype = SOCK_STREAM; error = getaddrinfo("www.kame.net", "http", &hints, &res0); if (error) { errx(1, "%s", gai_strerror(error)); - /*NOTREACHED*/ + /* NOTREACHED */ } s = -1; for (res = res0; res; res = res->ai_next) { @@ -361,7 +361,7 @@ for (res = res0; res; res = res->ai_next } if (s < 0) { err(1, "%s", cause); - /*NOTREACHED*/ + /* NOTREACHED */ } freeaddrinfo(res0); .Ed @@ -383,7 +383,7 @@ hints.ai_flags = AI_PASSIVE; error = getaddrinfo(NULL, "http", &hints, &res0); if (error) { errx(1, "%s", gai_strerror(error)); - /*NOTREACHED*/ + /* NOTREACHED */ } nsock = 0; for (res = res0; res && nsock < MAXSOCK; res = res->ai_next) { @@ -405,7 +405,7 @@ for (res = res0; res && nsock < MAXSOCK; } if (nsock == 0) { err(1, "%s", cause); - /*NOTREACHED*/ + /* NOTREACHED */ } freeaddrinfo(res0); .Ed Modified: user/attilio/vmc-playground/lib/libc/net/getnameinfo.3 ============================================================================== --- user/attilio/vmc-playground/lib/libc/net/getnameinfo.3 Fri Feb 15 16:08:08 2013 (r246841) +++ user/attilio/vmc-playground/lib/libc/net/getnameinfo.3 Fri Feb 15 16:11:30 2013 (r246842) @@ -18,7 +18,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 28, 2007 +.Dd February 14, 2013 .Dt GETNAMEINFO 3 .Os .Sh NAME @@ -157,7 +157,7 @@ char hbuf[NI_MAXHOST], sbuf[NI_MAXSERV]; if (getnameinfo(sa, sa->sa_len, hbuf, sizeof(hbuf), sbuf, sizeof(sbuf), NI_NUMERICHOST | NI_NUMERICSERV)) { errx(1, "could not get numeric hostname"); - /*NOTREACHED*/ + /* NOTREACHED */ } printf("host=%s, serv=%s\en", hbuf, sbuf); .Ed @@ -170,7 +170,7 @@ char hbuf[NI_MAXHOST]; if (getnameinfo(sa, sa->sa_len, hbuf, sizeof(hbuf), NULL, 0, NI_NAMEREQD)) { errx(1, "could not resolve hostname"); - /*NOTREACHED*/ + /* NOTREACHED */ } printf("host=%s\en", hbuf); .Ed Modified: user/attilio/vmc-playground/lib/libc/stdio/setbuf.3 ============================================================================== --- user/attilio/vmc-playground/lib/libc/stdio/setbuf.3 Fri Feb 15 16:08:08 2013 (r246841) +++ user/attilio/vmc-playground/lib/libc/stdio/setbuf.3 Fri Feb 15 16:11:30 2013 (r246842) @@ -32,7 +32,7 @@ .\" @(#)setbuf.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd February 15, 2013 .Dt SETBUF 3 .Os .Sh NAME @@ -195,19 +195,3 @@ and functions conform to .St -isoC . -.Sh BUGS -The -.Fn setbuffer -and -.Fn setlinebuf -functions are not portable to versions of -.Bx -before -.Bx 4.2 . -On -.Bx 4.2 -and -.Bx 4.3 -systems, -.Fn setbuf -always uses a suboptimal buffer size and should be avoided. Modified: user/attilio/vmc-playground/sbin/fsck_ffs/fsck.h ============================================================================== --- user/attilio/vmc-playground/sbin/fsck_ffs/fsck.h Fri Feb 15 16:08:08 2013 (r246841) +++ user/attilio/vmc-playground/sbin/fsck_ffs/fsck.h Fri Feb 15 16:11:30 2013 (r246842) @@ -67,10 +67,13 @@ #include #include +#include + #define MAXDUP 10 /* limit on dup blks (per inode) */ #define MAXBAD 10 /* limit on bad blks (per inode) */ -#define MAXBUFSPACE 40*1024 /* maximum space to allocate to buffers */ -#define INOBUFSIZE 56*1024 /* size of buffer to read inodes in pass1 */ +#define MINBUFS 10 /* minimum number of buffers required */ +#define MAXBUFS 40 /* maximum space to allocate to buffers */ +#define INOBUFSIZE 64*1024 /* size of buffer to read inodes in pass1 */ union dinode { struct ufs1_dinode dp1; @@ -130,8 +133,7 @@ struct inostatlist { * buffer cache structure. */ struct bufarea { - struct bufarea *b_next; /* free list queue */ - struct bufarea *b_prev; /* free list queue */ + TAILQ_ENTRY(bufarea) b_list; /* buffer list */ ufs2_daddr_t b_bno; int b_size; int b_errs; @@ -159,10 +161,11 @@ struct bufarea { (bp)->b_un.b_indir2[i] = (val); \ } while (0) -#define B_INUSE 1 +/* + * Buffer flags + */ +#define B_INUSE 0x00000001 /* Buffer is in use */ -#define MINBUFS 5 /* minimum number of buffers required */ -struct bufarea bufhead; /* head of list of other blks in filesys */ struct bufarea sblk; /* file system superblock */ struct bufarea cgblk; /* cylinder group blocks */ struct bufarea *pdirbp; /* current directory contents */ Modified: user/attilio/vmc-playground/sbin/fsck_ffs/fsutil.c ============================================================================== --- user/attilio/vmc-playground/sbin/fsck_ffs/fsutil.c Fri Feb 15 16:08:08 2013 (r246841) +++ user/attilio/vmc-playground/sbin/fsck_ffs/fsutil.c Fri Feb 15 16:11:30 2013 (r246842) @@ -67,6 +67,8 @@ long diskreads, totalreads; /* Disk cach struct timeval slowio_starttime; int slowio_delay_usec = 10000; /* Initial IO delay for background fsck */ int slowio_pollcnt; +static TAILQ_HEAD(buflist, bufarea) bufhead; /* head of buffer cache list */ +static int numbufs; /* size of buffer cache */ int ftypeok(union dinode *dp) @@ -162,8 +164,8 @@ bufinit(void) errx(EEXIT, "cannot allocate buffer pool"); cgblk.b_un.b_buf = bufp; initbarea(&cgblk); - bufhead.b_next = bufhead.b_prev = &bufhead; - bufcnt = MAXBUFSPACE / sblock.fs_bsize; + TAILQ_INIT(&bufhead); + bufcnt = MAXBUFS; if (bufcnt < MINBUFS) bufcnt = MINBUFS; for (i = 0; i < bufcnt; i++) { @@ -175,13 +177,10 @@ bufinit(void) errx(EEXIT, "cannot allocate buffer pool"); } bp->b_un.b_buf = bufp; - bp->b_prev = &bufhead; - bp->b_next = bufhead.b_next; - bufhead.b_next->b_prev = bp; - bufhead.b_next = bp; + TAILQ_INSERT_HEAD(&bufhead, bp, b_list); initbarea(bp); } - bufhead.b_size = i; /* save number of buffers */ + numbufs = i; /* save number of buffers */ } /* @@ -192,23 +191,19 @@ getdatablk(ufs2_daddr_t blkno, long size { struct bufarea *bp; - for (bp = bufhead.b_next; bp != &bufhead; bp = bp->b_next) + TAILQ_FOREACH(bp, &bufhead, b_list) if (bp->b_bno == fsbtodb(&sblock, blkno)) goto foundit; - for (bp = bufhead.b_prev; bp != &bufhead; bp = bp->b_prev) + TAILQ_FOREACH_REVERSE(bp, &bufhead, buflist, b_list) if ((bp->b_flags & B_INUSE) == 0) break; - if (bp == &bufhead) + if (bp == NULL) errx(EEXIT, "deadlocked buffer pool"); getblk(bp, blkno, size); /* fall through */ foundit: - bp->b_prev->b_next = bp->b_next; - bp->b_next->b_prev = bp->b_prev; - bp->b_prev = &bufhead; - bp->b_next = bufhead.b_next; - bufhead.b_next->b_prev = bp; - bufhead.b_next = bp; + TAILQ_REMOVE(&bufhead, bp, b_list); + TAILQ_INSERT_HEAD(&bufhead, bp, b_list); bp->b_flags |= B_INUSE; return (bp); } @@ -274,7 +269,7 @@ void ckfini(int markclean) { struct bufarea *bp, *nbp; - int ofsmodified, cnt = 0; + int ofsmodified, cnt; if (bkgrdflag) { unlink(snapname); @@ -295,6 +290,10 @@ ckfini(int markclean) rerun = 1; } } + if (debug && totalreads > 0) + printf("cache with %d buffers missed %ld of %ld (%d%%)\n", + numbufs, diskreads, totalreads, + (int)(diskreads * 100 / totalreads)); if (fswritefd < 0) { (void)close(fsreadfd); return; @@ -309,15 +308,16 @@ ckfini(int markclean) } flush(fswritefd, &cgblk); free(cgblk.b_un.b_buf); - for (bp = bufhead.b_prev; bp && bp != &bufhead; bp = nbp) { + cnt = 0; + TAILQ_FOREACH_REVERSE_SAFE(bp, &bufhead, buflist, b_list, nbp) { + TAILQ_REMOVE(&bufhead, bp, b_list); cnt++; flush(fswritefd, bp); - nbp = bp->b_prev; free(bp->b_un.b_buf); free((char *)bp); } - if (bufhead.b_size != cnt) - errx(EEXIT, "panic: lost %d buffers", bufhead.b_size - cnt); + if (numbufs != cnt) + errx(EEXIT, "panic: lost %d buffers", numbufs - cnt); pbp = pdirbp = (struct bufarea *)0; if (cursnapshot == 0 && sblock.fs_clean != markclean) { if ((sblock.fs_clean = markclean) != 0) { @@ -343,9 +343,6 @@ ckfini(int markclean) rerun = 1; } } - if (debug && totalreads > 0) - printf("cache missed %ld of %ld (%d%%)\n", diskreads, - totalreads, (int)(diskreads * 100 / totalreads)); (void)close(fsreadfd); (void)close(fswritefd); } Modified: user/attilio/vmc-playground/sbin/fsdb/fsdbutil.c ============================================================================== --- user/attilio/vmc-playground/sbin/fsdb/fsdbutil.c Fri Feb 15 16:08:08 2013 (r246841) +++ user/attilio/vmc-playground/sbin/fsdb/fsdbutil.c Fri Feb 15 16:11:30 2013 (r246842) @@ -239,7 +239,6 @@ printindir(ufs2_daddr_t blk, int level, /* for the final indirect level, don't use the cache */ bp = &buf; bp->b_un.b_buf = bufp; - bp->b_prev = bp->b_next = bp; initbarea(bp); getblk(bp, blk, sblock.fs_bsize); Modified: user/attilio/vmc-playground/share/man/man5/src.conf.5 ============================================================================== --- user/attilio/vmc-playground/share/man/man5/src.conf.5 Fri Feb 15 16:08:08 2013 (r246841) +++ user/attilio/vmc-playground/share/man/man5/src.conf.5 Fri Feb 15 16:11:30 2013 (r246842) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 236279 2012-05-30 02:37:20Z gjb .\" $FreeBSD$ -.Dd February 2, 2013 +.Dd February 15, 2013 .Dt SRC.CONF 5 .Os .Sh NAME @@ -291,7 +291,7 @@ When set, it also enforces the following Set to not build the Clang C/C++ compiler. .Pp It is a default setting on -arm/arm, arm/armeb, arm/armv6, arm/armv6eb, ia64/ia64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32 and sparc64/sparc64. +arm/armeb, arm/armv6eb, ia64/ia64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32 and sparc64/sparc64. When set, it also enforces the following options: .Pp .Bl -item -compact @@ -302,12 +302,6 @@ When set, it also enforces the following .It .Va WITHOUT_CLANG_IS_CC .El -.It Va WITH_CLANG -.\" from FreeBSD: head/tools/build/options/WITH_CLANG 221730 2011-05-10 11:14:40Z ru -Set to build the Clang C/C++ compiler. -.Pp -It is a default setting on -amd64/amd64, i386/i386, pc98/i386, powerpc/powerpc and powerpc/powerpc64. .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. @@ -435,13 +429,6 @@ This includes the device tree compiler ( .Pp It is a default setting on amd64/amd64, i386/i386, ia64/ia64, pc98/i386 and sparc64/sparc64. -.It Va WITH_FDT -.\" from FreeBSD: head/tools/build/options/WITH_FDT 221730 2011-05-10 11:14:40Z ru -Set to build Flattened Device Tree support as part of the base system. -This includes the device tree compiler (dtc) and libfdt support library. -.Pp -It is a default setting on -arm/arm, arm/armeb, arm/armv6, arm/armv6eb, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc and powerpc/powerpc64. .It Va WITHOUT_FLOPPY .\" from FreeBSD: head/tools/build/options/WITHOUT_FLOPPY 221540 2011-05-06 19:13:03Z ru Set to not build or install programs @@ -659,6 +646,26 @@ When set, it also enforces the following Set to build some programs without optional .Nm libkvm support. +.It Va WITHOUT_LDNS +.\" from FreeBSD: head/tools/build/options/WITHOUT_LDNS 246827 2013-02-15 13:44:18Z des +Setting this variable will prevent LDNS from being built. +When set, it also enforces the following options: +.Pp +.Bl -item -compact +.It +.Va WITHOUT_LDNS_UTILS +.El +.It Va WITH_LDNS_UTILS +.\" from FreeBSD: head/tools/build/options/WITH_LDNS_UTILS 246830 2013-02-15 13:57:51Z des +Setting this variable will enable the LDNS-based versions of +.Xr dig 1 +and +.Xr host 1 . +When set, the following options are also in effect: +.Pp +.Bl -inset -compact +.It Va WITHOUT_BIND_UTILS +.El .It Va WITHOUT_LEGACY_CONSOLE .\" from FreeBSD: head/tools/build/options/WITHOUT_LEGACY_CONSOLE 183242 2008-09-21 22:02:26Z sam Set to not build programs that support a legacy PC console; e.g. Modified: user/attilio/vmc-playground/share/mk/bsd.libnames.mk ============================================================================== --- user/attilio/vmc-playground/share/mk/bsd.libnames.mk Fri Feb 15 16:08:08 2013 (r246841) +++ user/attilio/vmc-playground/share/mk/bsd.libnames.mk Fri Feb 15 16:11:30 2013 (r246842) @@ -85,6 +85,9 @@ LIBKICONV?= ${DESTDIR}${LIBDIR}/libkicon LIBKRB5?= ${DESTDIR}${LIBDIR}/libkrb5.a LIBKVM?= ${DESTDIR}${LIBDIR}/libkvm.a LIBL?= ${DESTDIR}${LIBDIR}/libl.a +.if ${MK_LDNS} != "no" +LIBLDNS?= ${DESTDIR}${LIBDIR}/lib_ldns.a +.endif LIBLN?= "don't use LIBLN, use LIBL" .if ${MK_BIND} != "no" LIBLWRES?= ${DESTDIR}${LIBDIR}/liblwres.a Modified: user/attilio/vmc-playground/share/mk/bsd.own.mk ============================================================================== --- user/attilio/vmc-playground/share/mk/bsd.own.mk Fri Feb 15 16:08:08 2013 (r246841) +++ user/attilio/vmc-playground/share/mk/bsd.own.mk Fri Feb 15 16:11:30 2013 (r246842) @@ -295,6 +295,7 @@ __DEFAULT_YES_OPTIONS = \ KERBEROS \ KERNEL_SYMBOLS \ KVM \ + LDNS \ LEGACY_CONSOLE \ LIB32 \ LIBPTHREAD \ @@ -370,6 +371,7 @@ __DEFAULT_NO_OPTIONS = \ ICONV \ IDEA \ INSTALL_AS_USER \ + LDNS_UTILS \ NMTREE \ NAND \ OFED \ @@ -471,6 +473,14 @@ MK_BIND_NAMED:= no MK_BIND_UTILS:= no .endif +.if ${MK_LDNS} == "no" +MK_LDNS_UTILS:= no +.endif + +.if ${MK_LDNS_UTILS} != "no" +MK_BIND_UTILS:= no +.endif + .if ${MK_BIND_MTREE} == "no" MK_BIND_ETC:= no .endif Modified: user/attilio/vmc-playground/sys/amd64/amd64/pmap.c ============================================================================== --- user/attilio/vmc-playground/sys/amd64/amd64/pmap.c Fri Feb 15 16:08:08 2013 (r246841) +++ user/attilio/vmc-playground/sys/amd64/amd64/pmap.c Fri Feb 15 16:11:30 2013 (r246842) @@ -1482,6 +1482,7 @@ pmap_qremove(vm_offset_t sva, int count) va = sva; while (count-- > 0) { + KASSERT(va >= VM_MIN_KERNEL_ADDRESS, ("usermode va %lx", va)); pmap_kremove(va); va += PAGE_SIZE; } @@ -4508,8 +4509,10 @@ pmap_remove_pages(pmap_t pmap) pte = &pte[pmap_pte_index(pv->pv_va)]; tpte = *pte & ~PG_PTE_PAT; } - if ((tpte & PG_V) == 0) - panic("bad pte"); + if ((tpte & PG_V) == 0) { + panic("bad pte va %lx pte %lx", + pv->pv_va, tpte); + } /* * We cannot remove wired pages from a process' mapping at this time Modified: user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c ============================================================================== --- user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c Fri Feb 15 16:08:08 2013 (r246841) +++ user/attilio/vmc-playground/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c Fri Feb 15 16:11:30 2013 (r246842) @@ -36,7 +36,6 @@ static int real_LZ4_compress(const char *source, char *dest, int isize, int osize); -static int real_LZ4_uncompress(const char *source, char *dest, int osize); static int LZ4_compressBound(int isize); static int LZ4_uncompress_unknownOutputSize(const char *source, char *dest, int isize, int maxOutputSize); @@ -104,16 +103,6 @@ lz4_decompress(void *s_start, void *d_st * situations (input data not compressible) worst case size * evaluation is provided by function LZ4_compressBound(). * - * real_LZ4_uncompress() : - * osize : is the output size, therefore the original size - * return : the number of bytes read in the source buffer. - * If the source stream is malformed, the function will stop - * decoding and return a negative result, indicating the byte - * position of the faulty instruction. This function never - * writes beyond dest + osize, and is therefore protected - * against malicious data packets. - * note : destination buffer must be already allocated - * * Advanced Functions * * LZ4_compressBound() : @@ -137,7 +126,6 @@ lz4_decompress(void *s_start, void *d_st * maxOutputSize, and is therefore protected against malicious * data packets. * note : Destination buffer must be already allocated. - * This version is slightly slower than real_LZ4_uncompress() * * LZ4_compressCtx() : * This function explicitly handles the CTX memory structure. @@ -879,128 +867,16 @@ real_LZ4_compress(const char *source, ch /* Decompression functions */ /* - * Note: The decoding functions real_LZ4_uncompress() and - * LZ4_uncompress_unknownOutputSize() are safe against "buffer overflow" - * attack type. They will never write nor read outside of the provided - * output buffers. LZ4_uncompress_unknownOutputSize() also insures that - * it will never read outside of the input buffer. A corrupted input - * will produce an error result, a negative int, indicating the position - * of the error within input stream. + * Note: The decoding functionLZ4_uncompress_unknownOutputSize() is safe + * against "buffer overflow" attack type. They will never write nor + * read outside of the provided output buffers. + * LZ4_uncompress_unknownOutputSize() also insures that it will never + * read outside of the input buffer. A corrupted input will produce + * an error result, a negative int, indicating the position of the + * error within input stream. */ static int -real_LZ4_uncompress(const char *source, char *dest, int osize) -{ - /* Local Variables */ - const BYTE *restrict ip = (const BYTE *) source; - const BYTE *ref; - - BYTE *op = (BYTE *) dest; - BYTE *const oend = op + osize; - BYTE *cpy; - - unsigned token; - - size_t length; - size_t dec32table[] = {0, 3, 2, 3, 0, 0, 0, 0}; -#if LZ4_ARCH64 - size_t dec64table[] = {0, 0, 0, (size_t)-1, 0, 1, 2, 3}; -#endif - - /* Main Loop */ - for (;;) { - /* get runlength */ - token = *ip++; - if ((length = (token >> ML_BITS)) == RUN_MASK) { - size_t len; - for (; (len = *ip++) == 255; length += 255) { - } - length += len; - } - /* copy literals */ - cpy = op + length; - if unlikely(cpy > oend - COPYLENGTH) { - if (cpy != oend) - /* Error: we must necessarily stand at EOF */ - goto _output_error; - (void) memcpy(op, ip, length); - ip += length; - break; /* EOF */ - } - LZ4_WILDCOPY(ip, op, cpy); - ip -= (op - cpy); - op = cpy; - - /* get offset */ - LZ4_READ_LITTLEENDIAN_16(ref, cpy, ip); - ip += 2; - if unlikely(ref < (BYTE * const) dest) - /* - * Error: offset create reference outside destination - * buffer - */ - goto _output_error; - - /* get matchlength */ - if ((length = (token & ML_MASK)) == ML_MASK) { - for (; *ip == 255; length += 255) { - ip++; - } - length += *ip++; - } - /* copy repeated sequence */ - if unlikely(op - ref < STEPSIZE) { -#if LZ4_ARCH64 - size_t dec64 = dec64table[op-ref]; -#else - const int dec64 = 0; -#endif - op[0] = ref[0]; - op[1] = ref[1]; - op[2] = ref[2]; - op[3] = ref[3]; - op += 4; - ref += 4; - ref -= dec32table[op-ref]; - A32(op) = A32(ref); - op += STEPSIZE - 4; - ref -= dec64; - } else { - LZ4_COPYSTEP(ref, op); - } - cpy = op + length - (STEPSIZE - 4); - if (cpy > oend - COPYLENGTH) { - if (cpy > oend) - /* - * Error: request to write beyond destination - * buffer - */ - goto _output_error; - LZ4_SECURECOPY(ref, op, (oend - COPYLENGTH)); - while (op < cpy) - *op++ = *ref++; - op = cpy; - if (op == oend) - /* - * Check EOF (should never happen, since last - * 5 bytes are supposed to be literals) - */ - goto _output_error; - continue; - } - LZ4_SECURECOPY(ref, op, cpy); - op = cpy; /* correction */ - } - - /* end of decoding */ - return (int)(((char *)ip) - source); - - /* write overflow error detected */ - _output_error: - return (int)(-(((char *)ip) - source)); -} - -static int LZ4_uncompress_unknownOutputSize(const char *source, char *dest, int isize, int maxOutputSize) { Modified: user/attilio/vmc-playground/sys/conf/options ============================================================================== --- user/attilio/vmc-playground/sys/conf/options Fri Feb 15 16:08:08 2013 (r246841) +++ user/attilio/vmc-playground/sys/conf/options Fri Feb 15 16:11:30 2013 (r246842) @@ -588,6 +588,7 @@ VFS_BIO_DEBUG opt_global.h VM_KMEM_SIZE opt_vm.h VM_KMEM_SIZE_SCALE opt_vm.h VM_KMEM_SIZE_MAX opt_vm.h +VM_NDOMAIN opt_vm.h VM_NRESERVLEVEL opt_vm.h VM_LEVEL_0_ORDER opt_vm.h VM_RADIX_BOOT_CACHE opt_vm.h Modified: user/attilio/vmc-playground/sys/dev/oce/oce_if.c ============================================================================== --- user/attilio/vmc-playground/sys/dev/oce/oce_if.c Fri Feb 15 16:08:08 2013 (r246841) +++ user/attilio/vmc-playground/sys/dev/oce/oce_if.c Fri Feb 15 16:11:30 2013 (r246842) @@ -1817,6 +1817,9 @@ oce_local_timer(void *arg) } +/* NOTE : This should only be called holding + * DEVICE_LOCK. +*/ static void oce_if_deactivate(POCE_SOFTC sc) { @@ -1846,11 +1849,17 @@ oce_if_deactivate(POCE_SOFTC sc) /* Stop intrs and finish any bottom halves pending */ oce_hw_intr_disable(sc); + /* Since taskqueue_drain takes a Giant Lock, We should not acquire + any other lock. So unlock device lock and require after + completing taskqueue_drain. + */ + UNLOCK(&sc->dev_lock); for (i = 0; i < sc->intr_count; i++) { if (sc->intrs[i].tq != NULL) { taskqueue_drain(sc->intrs[i].tq, &sc->intrs[i].task); } } + LOCK(&sc->dev_lock); /* Delete RX queue in card with flush param */ oce_stop_rx(sc); Modified: user/attilio/vmc-playground/sys/dev/oce/oce_if.h ============================================================================== --- user/attilio/vmc-playground/sys/dev/oce/oce_if.h Fri Feb 15 16:08:08 2013 (r246841) +++ user/attilio/vmc-playground/sys/dev/oce/oce_if.h Fri Feb 15 16:11:30 2013 (r246842) @@ -493,7 +493,7 @@ struct oce_lock { #define LOCK_CREATE(lock, desc) { \ strncpy((lock)->name, (desc), MAX_LOCK_DESC_LEN); \ (lock)->name[MAX_LOCK_DESC_LEN] = '\0'; \ - mtx_init(&(lock)->mutex, (lock)->name, MTX_NETWORK_LOCK, MTX_DEF); \ + mtx_init(&(lock)->mutex, (lock)->name, NULL, MTX_DEF); \ } #define LOCK_DESTROY(lock) \ if (mtx_initialized(&(lock)->mutex))\ Modified: user/attilio/vmc-playground/sys/kern/uipc_usrreq.c ============================================================================== --- user/attilio/vmc-playground/sys/kern/uipc_usrreq.c Fri Feb 15 16:08:08 2013 (r246841) +++ user/attilio/vmc-playground/sys/kern/uipc_usrreq.c Fri Feb 15 16:11:30 2013 (r246842) @@ -1798,6 +1798,7 @@ unp_internalize(struct mbuf **controlp, struct mbuf *control = *controlp; struct proc *p = td->td_proc; struct filedesc *fdescp = p->p_fd; + struct bintime *bt; struct cmsghdr *cm = mtod(control, struct cmsghdr *); struct cmsgcred *cmcred; struct file **rp; @@ -1906,6 +1907,18 @@ unp_internalize(struct mbuf **controlp, microtime(tv); break; + case SCM_BINTIME: + *controlp = sbcreatecontrol(NULL, sizeof(*bt), + SCM_BINTIME, SOL_SOCKET); + if (*controlp == NULL) { + error = ENOBUFS; + goto out; + } + bt = (struct bintime *) + CMSG_DATA(mtod(*controlp, struct cmsghdr *)); + bintime(bt); + break; + default: error = EINVAL; goto out; Modified: user/attilio/vmc-playground/sys/kern/vfs_vnops.c ============================================================================== --- user/attilio/vmc-playground/sys/kern/vfs_vnops.c Fri Feb 15 16:08:08 2013 (r246841) +++ user/attilio/vmc-playground/sys/kern/vfs_vnops.c Fri Feb 15 16:11:30 2013 (r246842) @@ -872,8 +872,8 @@ static const int io_hold_cnt = 16; static int vn_io_fault_enable = 1; SYSCTL_INT(_debug, OID_AUTO, vn_io_fault_enable, CTLFLAG_RW, &vn_io_fault_enable, 0, "Enable vn_io_fault lock avoidance"); -static unsigned long vn_io_faults_cnt; -SYSCTL_LONG(_debug, OID_AUTO, vn_io_faults, CTLFLAG_RD, +static u_long vn_io_faults_cnt; +SYSCTL_ULONG(_debug, OID_AUTO, vn_io_faults, CTLFLAG_RD, &vn_io_faults_cnt, 0, "Count of vn_io_fault lock avoidance triggers"); /* Modified: user/attilio/vmc-playground/sys/net/if_pfsync.h ============================================================================== --- user/attilio/vmc-playground/sys/net/if_pfsync.h Fri Feb 15 16:08:08 2013 (r246841) +++ user/attilio/vmc-playground/sys/net/if_pfsync.h Fri Feb 15 16:11:30 2013 (r246842) @@ -67,8 +67,6 @@ #define PFSYNC_ACT_EOF 12 /* end of frame */ #define PFSYNC_ACT_MAX 13 -#define PFSYNC_HMAC_LEN 20 - /* * A pfsync frame is built from a header followed by several sections which * are all prefixed with their own subheaders. Frames must be terminated with @@ -205,18 +203,8 @@ struct pfsync_tdb { u_int8_t _pad[2]; } __packed; -/* - * EOF - */ - -struct pfsync_eof { - u_int8_t hmac[PFSYNC_HMAC_LEN]; -} __packed; - #define PFSYNC_HDRLEN sizeof(struct pfsync_header) - - /* * Names for PFSYNC sysctl objects */ Modified: user/attilio/vmc-playground/sys/net80211/ieee80211.h ============================================================================== --- user/attilio/vmc-playground/sys/net80211/ieee80211.h Fri Feb 15 16:08:08 2013 (r246841) +++ user/attilio/vmc-playground/sys/net80211/ieee80211.h Fri Feb 15 16:11:30 2013 (r246842) @@ -200,11 +200,11 @@ struct ieee80211_qosframe_addr4 { #define IEEE80211_QOS_EOSP_S 4 #define IEEE80211_QOS_TID 0x0f /* qos[1] byte used for all frames sent by mesh STAs in a mesh BSS */ -#define IEEE80211_QOS_MC 0x10 /* Mesh control */ +#define IEEE80211_QOS_MC 0x01 /* Mesh control */ /* Mesh power save level*/ -#define IEEE80211_QOS_MESH_PSL 0x20 +#define IEEE80211_QOS_MESH_PSL 0x02 /* Mesh Receiver Service Period Initiated */ -#define IEEE80211_QOS_RSPI 0x40 +#define IEEE80211_QOS_RSPI 0x04 /* bits 11 to 15 reserved */ /* does frame have QoS sequence control data */ Modified: user/attilio/vmc-playground/sys/netgraph/ng_parse.c ============================================================================== --- user/attilio/vmc-playground/sys/netgraph/ng_parse.c Fri Feb 15 16:08:08 2013 (r246841) +++ user/attilio/vmc-playground/sys/netgraph/ng_parse.c Fri Feb 15 16:11:30 2013 (r246842) @@ -1236,6 +1236,7 @@ ng_parse_composite(const struct ng_parse distinguish name from values by seeing if the next token is an equals sign */ if (ctype != CT_STRUCT) { + u_long ul; int len2, off2; char *eptr; @@ -1259,11 +1260,12 @@ ng_parse_composite(const struct ng_parse } /* Index was specified explicitly; parse it */ - index = (u_int)strtoul(s + *off, &eptr, 0); - if (index < 0 || eptr - (s + *off) != len) { + ul = strtoul(s + *off, &eptr, 0); + if (ul == ULONG_MAX || eptr - (s + *off) != len) { error = EINVAL; goto done; } + index = (u_int)ul; nextIndex = index + 1; *off += len + len2; } else { /* a structure field */ Modified: user/attilio/vmc-playground/sys/netpfil/pf/if_pfsync.c ============================================================================== --- user/attilio/vmc-playground/sys/netpfil/pf/if_pfsync.c Fri Feb 15 16:08:08 2013 (r246841) +++ user/attilio/vmc-playground/sys/netpfil/pf/if_pfsync.c Fri Feb 15 16:11:30 2013 (r246842) @@ -99,8 +99,7 @@ __FBSDID("$FreeBSD$"); #define PFSYNC_MINPKT ( \ sizeof(struct ip) + \ sizeof(struct pfsync_header) + \ - sizeof(struct pfsync_subheader) + \ - sizeof(struct pfsync_eof)) + sizeof(struct pfsync_subheader) ) struct pfsync_pkt { struct ip *ip; Modified: user/attilio/vmc-playground/sys/vm/vm_phys.c ============================================================================== --- user/attilio/vmc-playground/sys/vm/vm_phys.c Fri Feb 15 16:08:08 2013 (r246841) +++ user/attilio/vmc-playground/sys/vm/vm_phys.c Fri Feb 15 16:11:30 2013 (r246842) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include "opt_ddb.h" +#include "opt_vm.h" #include #include Modified: user/attilio/vmc-playground/sys/x86/acpica/srat.c ============================================================================== --- user/attilio/vmc-playground/sys/x86/acpica/srat.c Fri Feb 15 16:08:08 2013 (r246841) +++ user/attilio/vmc-playground/sys/x86/acpica/srat.c Fri Feb 15 16:11:30 2013 (r246842) @@ -28,6 +28,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_vm.h" + #include #include #include Copied: user/attilio/vmc-playground/tools/build/options/WITHOUT_LDNS (from r246841, user/attilio/vmcontention/tools/build/options/WITHOUT_LDNS) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/attilio/vmc-playground/tools/build/options/WITHOUT_LDNS Fri Feb 15 16:11:30 2013 (r246842, copy of r246841, user/attilio/vmcontention/tools/build/options/WITHOUT_LDNS) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Setting this variable will prevent LDNS from being built. Copied: user/attilio/vmc-playground/tools/build/options/WITH_LDNS_UTILS (from r246841, user/attilio/vmcontention/tools/build/options/WITH_LDNS_UTILS) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/attilio/vmc-playground/tools/build/options/WITH_LDNS_UTILS Fri Feb 15 16:11:30 2013 (r246842, copy of r246841, user/attilio/vmcontention/tools/build/options/WITH_LDNS_UTILS) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Setting this variable will enable the LDNS-based versions of +.Xr dig 1 +and +.Xr host 1 . Modified: user/attilio/vmc-playground/usr.bin/csup/csup.1 ============================================================================== --- user/attilio/vmc-playground/usr.bin/csup/csup.1 Fri Feb 15 16:08:08 2013 (r246841) +++ user/attilio/vmc-playground/usr.bin/csup/csup.1 Fri Feb 15 16:11:30 2013 (r246842) @@ -24,7 +24,7 @@ .\" $Id: cvsup.1,v 1.70 2003/03/04 18:23:46 jdp Exp $ .\" $FreeBSD$ .\" -.Dd Feburary 8, 2013 +.Dd February 8, 2013 .Dt CSUP 1 .Os FreeBSD .Sh NAME Modified: user/attilio/vmc-playground/usr.sbin/bhyvectl/bhyvectl.c ============================================================================== --- user/attilio/vmc-playground/usr.sbin/bhyvectl/bhyvectl.c Fri Feb 15 16:08:08 2013 (r246841) +++ user/attilio/vmc-playground/usr.sbin/bhyvectl/bhyvectl.c Fri Feb 15 16:11:30 2013 (r246842) @@ -185,6 +185,7 @@ usage(void) " [--get-vmcs-interruptibility]\n" " [--set-x2apic-state=]\n" " [--get-x2apic-state]\n" + " [--unassign-pptdev=]\n" " [--set-lowmem=]\n" " [--get-lowmem]\n" " [--set-highmem=]\n" @@ -218,6 +219,7 @@ static int set_cs, set_ds, set_es, set_f static int get_cs, get_ds, get_es, get_fs, get_gs, get_ss, get_tr, get_ldtr; static int set_x2apic_state, get_x2apic_state; enum x2apic_state x2apic_state; +static int unassign_pptdev, bus, slot, func; static int run; /* @@ -376,6 +378,7 @@ enum { SET_VMCS_ENTRY_INTERRUPTION_INFO, SET_CAP, CAPNAME, + UNASSIGN_PPTDEV, }; int @@ -425,6 +428,7 @@ main(int argc, char *argv[]) { "set-vmcs-entry-interruption-info", REQ_ARG, 0, SET_VMCS_ENTRY_INTERRUPTION_INFO }, { "capname", REQ_ARG, 0, CAPNAME }, + { "unassign-pptdev", REQ_ARG, 0, UNASSIGN_PPTDEV }, { "setcap", REQ_ARG, 0, SET_CAP }, { "getcap", NO_ARG, &getcap, 1 }, { "get-stats", NO_ARG, &get_stats, 1 }, @@ -672,6 +676,11 @@ main(int argc, char *argv[]) case CAPNAME: capname = optarg; break; + case UNASSIGN_PPTDEV: + unassign_pptdev = 1; + if (sscanf(optarg, "%d/%d/%d", &bus, &slot, &func) != 3) + usage(); + break; default: usage(); } @@ -805,6 +814,9 @@ main(int argc, char *argv[]) if (!error && set_x2apic_state) error = vm_set_x2apic_state(ctx, vcpu, x2apic_state); + if (!error && unassign_pptdev) + error = vm_unassign_pptdev(ctx, bus, slot, func); + if (!error && set_exception_bitmap) { error = vm_set_vmcs_field(ctx, vcpu, VMCS_EXCEPTION_BITMAP, exception_bitmap); Modified: user/attilio/vmc-playground/usr.sbin/jail/command.c ============================================================================== --- user/attilio/vmc-playground/usr.sbin/jail/command.c Fri Feb 15 16:08:08 2013 (r246841) +++ user/attilio/vmc-playground/usr.sbin/jail/command.c Fri Feb 15 16:11:30 2013 (r246842) @@ -66,7 +66,7 @@ int paralimit = -1; extern char **environ; static int run_command(struct cfjail *j); -static void add_proc(struct cfjail *j, pid_t pid); +static int add_proc(struct cfjail *j, pid_t pid); static void clear_procs(struct cfjail *j); static struct cfjail *find_proc(pid_t pid); static int term_procs(struct cfjail *j); @@ -542,13 +542,12 @@ run_command(struct cfjail *j) if (pid < 0) err(1, "fork"); if (pid > 0) { - if (bg) { + if (bg || !add_proc(j, pid)) { free(j->comline); j->comline = NULL; return 0; } else { paralimit--; - add_proc(j, pid); return 1; } } @@ -622,7 +621,7 @@ run_command(struct cfjail *j) /* * Add a process to the hash, tied to a jail. */ -static void +static int add_proc(struct cfjail *j, pid_t pid) { struct kevent ke; @@ -632,8 +631,11 @@ add_proc(struct cfjail *j, pid_t pid) if (!kq && (kq = kqueue()) < 0) err(1, "kqueue"); EV_SET(&ke, pid, EVFILT_PROC, EV_ADD, NOTE_EXIT, 0, NULL); - if (kevent(kq, &ke, 1, NULL, 0, NULL) < 0) + if (kevent(kq, &ke, 1, NULL, 0, NULL) < 0) { + if (errno == ESRCH) + return 0; err(1, "kevent"); + } ph = emalloc(sizeof(struct phash)); ph->j = j; ph->pid = pid; @@ -658,6 +660,7 @@ add_proc(struct cfjail *j, pid_t pid) TAILQ_INSERT_TAIL(&sleeping, j, tq); j->queue = &sleeping; } + return 1; } /* @@ -730,7 +733,7 @@ term_procs(struct cfjail *j) for (i = 0; i < pcnt; i++) if (ki[i].ki_jid == j->jid && kill(ki[i].ki_pid, SIGTERM) == 0) { - add_proc(j, ki[i].ki_pid); + (void)add_proc(j, ki[i].ki_pid); if (verbose > 0) { if (!noted) { noted = 1; From owner-svn-src-user@FreeBSD.ORG Fri Feb 15 17:21:42 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 149D2397; Fri, 15 Feb 2013 17:21:42 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id F1A5A9FF; Fri, 15 Feb 2013 17:21:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1FHLf14032144; Fri, 15 Feb 2013 17:21:41 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1FHLfnJ032143; Fri, 15 Feb 2013 17:21:41 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201302151721.r1FHLfnJ032143@svn.freebsd.org> From: Attilio Rao Date: Fri, 15 Feb 2013 17:21:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r246843 - user/attilio/vmc-playground/sys/vm X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Feb 2013 17:21:42 -0000 Author: attilio Date: Fri Feb 15 17:21:41 2013 New Revision: 246843 URL: http://svnweb.freebsd.org/changeset/base/246843 Log: Remove whitespace. Modified: user/attilio/vmc-playground/sys/vm/vm_page.c Modified: user/attilio/vmc-playground/sys/vm/vm_page.c ============================================================================== --- user/attilio/vmc-playground/sys/vm/vm_page.c Fri Feb 15 16:11:30 2013 (r246842) +++ user/attilio/vmc-playground/sys/vm/vm_page.c Fri Feb 15 17:21:41 2013 (r246843) @@ -825,7 +825,7 @@ vm_page_insert(vm_page_t m, vm_object_t */ if (object->resident_page_count == 0) { TAILQ_INSERT_TAIL(&object->memq, m, listq); - } else { + } else { neighbor = vm_radix_lookup_ge(&object->rtree, pindex); if (neighbor != NULL) { KASSERT(pindex < neighbor->pindex, From owner-svn-src-user@FreeBSD.ORG Fri Feb 15 17:22:58 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 537F84C7; Fri, 15 Feb 2013 17:22:58 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 45571A11; Fri, 15 Feb 2013 17:22:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1FHMwpl032371; Fri, 15 Feb 2013 17:22:58 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1FHMwUf032370; Fri, 15 Feb 2013 17:22:58 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201302151722.r1FHMwUf032370@svn.freebsd.org> From: Attilio Rao Date: Fri, 15 Feb 2013 17:22:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r246844 - user/attilio/vmc-playground/sys/vm X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Feb 2013 17:22:58 -0000 Author: attilio Date: Fri Feb 15 17:22:57 2013 New Revision: 246844 URL: http://svnweb.freebsd.org/changeset/base/246844 Log: Remove an unuseful check as looking up into an empty trie should be as fast as checking a NULL ptr. Sponsored by: EMC / Isilon storage division Modified: user/attilio/vmc-playground/sys/vm/vm_page.c Modified: user/attilio/vmc-playground/sys/vm/vm_page.c ============================================================================== --- user/attilio/vmc-playground/sys/vm/vm_page.c Fri Feb 15 17:21:41 2013 (r246843) +++ user/attilio/vmc-playground/sys/vm/vm_page.c Fri Feb 15 17:22:57 2013 (r246844) @@ -1053,9 +1053,7 @@ vm_page_cache_lookup(vm_object_t object, VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); mtx_assert(&vm_page_queue_free_mtx, MA_OWNED); - if (!vm_object_cache_is_empty(object)) - return (vm_radix_lookup(&object->cache, pindex)); - return (NULL); + return (vm_radix_lookup(&object->cache, pindex)); } /* From owner-svn-src-user@FreeBSD.ORG Sat Feb 16 17:47:48 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2F715906; Sat, 16 Feb 2013 17:47:48 +0000 (UTC) (envelope-from crees@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0CA646CF; Sat, 16 Feb 2013 17:47:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1GHllUH076809; Sat, 16 Feb 2013 17:47:47 GMT (envelope-from crees@svn.freebsd.org) Received: (from crees@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1GHll7b076807; Sat, 16 Feb 2013 17:47:47 GMT (envelope-from crees@svn.freebsd.org) Message-Id: <201302161747.r1GHll7b076807@svn.freebsd.org> From: Chris Rees Date: Sat, 16 Feb 2013 17:47:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r246878 - user/crees/rclint X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Feb 2013 17:47:48 -0000 Author: crees (ports committer) Date: Sat Feb 16 17:47:47 2013 New Revision: 246878 URL: http://svnweb.freebsd.org/changeset/base/246878 Log: Check properly for quoted variables when deciding on pointlessness Submitted by: bdrewery Modified: user/crees/rclint/Makefile user/crees/rclint/rclint.py Modified: user/crees/rclint/Makefile ============================================================================== --- user/crees/rclint/Makefile Sat Feb 16 15:11:40 2013 (r246877) +++ user/crees/rclint/Makefile Sat Feb 16 17:47:47 2013 (r246878) @@ -21,6 +21,9 @@ FILES= ${SCRIPT} errors.en problems.en .PHONY: majorbump minorbump microbump release +all: + @${ECHO} majorbump, minorbump, microbump and tarball are valid targets + majorbump: M=$$(expr ${VERSION_MAJOR} + 1); \ ${SED} -i '' -e "s,^\(MAJOR = \).*,\1$$M," ${SCRIPT} Modified: user/crees/rclint/rclint.py ============================================================================== --- user/crees/rclint/rclint.py Sat Feb 16 15:11:40 2013 (r246877) +++ user/crees/rclint/rclint.py Sat Feb 16 17:47:47 2013 (r246878) @@ -28,7 +28,7 @@ __version__ = '$FreeBSD$' MAJOR = 0 MINOR = 0 -MICRO = 3 +MICRO = 4 DATADIR = '.' @@ -108,10 +108,11 @@ class Statement: return False def pointless_quoted(self): - if self.quoted(): - for char in self.value: - if char in ' \t|&;<>()$`\\\"\'': - return False + if not self.quoted(): + return False + for char in self.value: + if char in ' \t|&;<>()$`\\\"\'': + return False return True def get_value(self):