From owner-svn-src-user@freebsd.org Sat Jan 30 17:43:45 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB7A3A73E1F for ; Sat, 30 Jan 2016 17:43:44 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 79B651E3B; Sat, 30 Jan 2016 17:43:44 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0UHhhH3006313; Sat, 30 Jan 2016 17:43:43 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0UHhfjN006290; Sat, 30 Jan 2016 17:43:41 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201601301743.u0UHhfjN006290@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 30 Jan 2016 17:43:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r295078 - in user/ngie/make_check: . cddl/contrib/opensolaris/lib/libzfs/common lib/libc/gen lib/libc/include lib/libc/sys lib/libc/tests/gen lib/libsysdecode libexec/rtld-elf sys/arm/a... 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.20 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, 30 Jan 2016 17:43:45 -0000 Author: ngie Date: Sat Jan 30 17:43:41 2016 New Revision: 295078 URL: https://svnweb.freebsd.org/changeset/base/295078 Log: MFhead @ r295077 Added: user/ngie/make_check/lib/libc/gen/recvmmsg.c - copied unchanged from r295077, head/lib/libc/gen/recvmmsg.c user/ngie/make_check/lib/libc/gen/sendmmsg.c - copied unchanged from r295077, head/lib/libc/gen/sendmmsg.c user/ngie/make_check/lib/libc/tests/gen/dlopen_empty_test.c - copied unchanged from r295077, head/lib/libc/tests/gen/dlopen_empty_test.c user/ngie/make_check/sys/arm/arm/swtch-v4.S - copied unchanged from r295077, head/sys/arm/arm/swtch-v4.S user/ngie/make_check/sys/arm/arm/swtch-v6.S - copied unchanged from r295077, head/sys/arm/arm/swtch-v6.S user/ngie/make_check/sys/arm64/arm64/disassem.c - copied unchanged from r295077, head/sys/arm64/arm64/disassem.c user/ngie/make_check/sys/arm64/include/disassem.h - copied unchanged from r295077, head/sys/arm64/include/disassem.h user/ngie/make_check/sys/boot/fdt/dts/riscv/ - copied from r295077, head/sys/boot/fdt/dts/riscv/ user/ngie/make_check/sys/boot/ficl/riscv/ - copied from r295077, head/sys/boot/ficl/riscv/ user/ngie/make_check/sys/conf/Makefile.riscv - copied unchanged from r295077, head/sys/conf/Makefile.riscv user/ngie/make_check/sys/conf/files.riscv - copied unchanged from r295077, head/sys/conf/files.riscv user/ngie/make_check/sys/conf/ldscript.riscv - copied unchanged from r295077, head/sys/conf/ldscript.riscv user/ngie/make_check/sys/conf/options.riscv - copied unchanged from r295077, head/sys/conf/options.riscv user/ngie/make_check/sys/dev/hwpmc/hwpmc_riscv.h - copied unchanged from r295077, head/sys/dev/hwpmc/hwpmc_riscv.h user/ngie/make_check/sys/riscv/conf/ - copied from r295077, head/sys/riscv/conf/ user/ngie/make_check/sys/riscv/htif/ - copied from r295077, head/sys/riscv/htif/ user/ngie/make_check/sys/riscv/riscv/ - copied from r295077, head/sys/riscv/riscv/ user/ngie/make_check/tools/tools/nanobsd/embedded/qemu-amd64-uefi-bios.cfg - copied unchanged from r295077, head/tools/tools/nanobsd/embedded/qemu-amd64-uefi-bios.cfg user/ngie/make_check/tools/tools/nanobsd/embedded/qemu-amd64-uefi.cfg - copied unchanged from r295077, head/tools/tools/nanobsd/embedded/qemu-amd64-uefi.cfg Replaced: user/ngie/make_check/sys/arm/arm/pmap-v6.c - copied unchanged from r295077, head/sys/arm/arm/pmap-v6.c Deleted: user/ngie/make_check/sys/arm/arm/pmap-v6-new.c Modified: user/ngie/make_check/UPDATING user/ngie/make_check/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_config.c user/ngie/make_check/lib/libc/gen/Makefile.inc user/ngie/make_check/lib/libc/include/namespace.h user/ngie/make_check/lib/libc/include/un-namespace.h user/ngie/make_check/lib/libc/sys/Symbol.map user/ngie/make_check/lib/libc/sys/recv.2 user/ngie/make_check/lib/libc/sys/send.2 user/ngie/make_check/lib/libc/tests/gen/Makefile user/ngie/make_check/lib/libsysdecode/syscallnames.c user/ngie/make_check/lib/libsysdecode/sysdecode.3 user/ngie/make_check/lib/libsysdecode/sysdecode.h user/ngie/make_check/libexec/rtld-elf/map_object.c user/ngie/make_check/sys/arm/arm/cpufunc.c user/ngie/make_check/sys/arm/arm/db_interface.c user/ngie/make_check/sys/arm/arm/genassym.c user/ngie/make_check/sys/arm/arm/locore-v6.S user/ngie/make_check/sys/arm/arm/machdep.c user/ngie/make_check/sys/arm/arm/mem.c user/ngie/make_check/sys/arm/arm/mp_machdep.c user/ngie/make_check/sys/arm/arm/pmap.c user/ngie/make_check/sys/arm/arm/swtch.S user/ngie/make_check/sys/arm/arm/trap-v6.c user/ngie/make_check/sys/arm/conf/std.armv6 user/ngie/make_check/sys/arm/include/cpufunc.h user/ngie/make_check/sys/arm/include/machdep.h user/ngie/make_check/sys/arm/include/param.h user/ngie/make_check/sys/arm/include/pmap-v6.h user/ngie/make_check/sys/arm/include/pmap.h user/ngie/make_check/sys/arm/include/pte.h user/ngie/make_check/sys/arm/include/sf_buf.h user/ngie/make_check/sys/arm/include/smp.h user/ngie/make_check/sys/arm/include/vm.h user/ngie/make_check/sys/arm64/arm64/db_disasm.c user/ngie/make_check/sys/arm64/arm64/intr_machdep.c user/ngie/make_check/sys/arm64/include/armreg.h user/ngie/make_check/sys/cddl/compat/opensolaris/sys/atomic.h user/ngie/make_check/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c user/ngie/make_check/sys/cddl/contrib/opensolaris/uts/common/sys/isa_defs.h user/ngie/make_check/sys/conf/files.arm user/ngie/make_check/sys/conf/files.arm64 user/ngie/make_check/sys/conf/kern.mk user/ngie/make_check/sys/conf/kern.pre.mk user/ngie/make_check/sys/conf/options.arm user/ngie/make_check/sys/dev/ixl/if_ixl.c user/ngie/make_check/sys/dev/usb/controller/ehcireg.h user/ngie/make_check/sys/netinet/sctp_input.c user/ngie/make_check/sys/netinet/sctp_output.c user/ngie/make_check/sys/netinet/sctp_output.h user/ngie/make_check/sys/netinet/sctp_var.h user/ngie/make_check/sys/sys/cdefs.h user/ngie/make_check/sys/sys/kerneldump.h user/ngie/make_check/sys/sys/socket.h user/ngie/make_check/tools/tools/nanobsd/defaults.sh user/ngie/make_check/tools/tools/nanobsd/embedded/README user/ngie/make_check/tools/tools/nanobsd/embedded/common user/ngie/make_check/usr.bin/kdump/kdump.c user/ngie/make_check/usr.bin/truss/aarch64-cloudabi64.c user/ngie/make_check/usr.bin/truss/aarch64-freebsd.c user/ngie/make_check/usr.bin/truss/amd64-cloudabi64.c user/ngie/make_check/usr.bin/truss/amd64-freebsd.c user/ngie/make_check/usr.bin/truss/amd64-freebsd32.c user/ngie/make_check/usr.bin/truss/amd64-linux32.c user/ngie/make_check/usr.bin/truss/arm-freebsd.c user/ngie/make_check/usr.bin/truss/i386-freebsd.c user/ngie/make_check/usr.bin/truss/i386-linux.c user/ngie/make_check/usr.bin/truss/mips-freebsd.c user/ngie/make_check/usr.bin/truss/powerpc-freebsd.c user/ngie/make_check/usr.bin/truss/powerpc64-freebsd.c user/ngie/make_check/usr.bin/truss/powerpc64-freebsd32.c user/ngie/make_check/usr.bin/truss/sparc64-freebsd.c user/ngie/make_check/usr.sbin/bsdinstall/scripts/zfsboot Directory Properties: user/ngie/make_check/ (props changed) user/ngie/make_check/cddl/ (props changed) user/ngie/make_check/cddl/contrib/opensolaris/ (props changed) user/ngie/make_check/cddl/contrib/opensolaris/lib/libzfs/ (props changed) user/ngie/make_check/lib/libc/ (props changed) user/ngie/make_check/sys/ (props changed) user/ngie/make_check/sys/boot/ (props changed) user/ngie/make_check/sys/cddl/contrib/opensolaris/ (props changed) user/ngie/make_check/sys/conf/ (props changed) Modified: user/ngie/make_check/UPDATING ============================================================================== --- user/ngie/make_check/UPDATING Sat Jan 30 17:32:46 2016 (r295077) +++ user/ngie/make_check/UPDATING Sat Jan 30 17:43:41 2016 (r295078) @@ -31,6 +31,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20160129: + Building ZFS pools on top of zvols is prohibited by default. That + feature has never worked safely; it's always been prone to deadlocks. + Using a zvol as the backing store for a VM guest's virtual disk will + still work, even if the guest is using ZFS. Legacy behavior can be + restored by setting vfs.zfs.vol.recursive=1. + 20160119: The NONE and HPN patches has been removed from OpenSSH. They are still available in the security/openssh-portable port. Modified: user/ngie/make_check/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_config.c ============================================================================== --- user/ngie/make_check/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_config.c Sat Jan 30 17:32:46 2016 (r295077) +++ user/ngie/make_check/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_config.c Sat Jan 30 17:43:41 2016 (r295078) @@ -26,6 +26,7 @@ /* * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2015 by Syneto S.R.L. All rights reserved. */ /* @@ -246,8 +247,9 @@ zpool_get_features(zpool_handle_t *zhp) config = zpool_get_config(zhp, NULL); } - verify(nvlist_lookup_nvlist(config, ZPOOL_CONFIG_FEATURE_STATS, - &features) == 0); + if (nvlist_lookup_nvlist(config, ZPOOL_CONFIG_FEATURE_STATS, + &features) != 0) + return (NULL); return (features); } Modified: user/ngie/make_check/lib/libc/gen/Makefile.inc ============================================================================== --- user/ngie/make_check/lib/libc/gen/Makefile.inc Sat Jan 30 17:32:46 2016 (r295077) +++ user/ngie/make_check/lib/libc/gen/Makefile.inc Sat Jan 30 17:43:41 2016 (r295078) @@ -99,11 +99,13 @@ SRCS+= __getosreldate.c \ raise.c \ readdir.c \ readpassphrase.c \ + recvmmsg.c \ rewinddir.c \ scandir.c \ seed48.c \ seekdir.c \ semctl.c \ + sendmmsg.c \ setdomainname.c \ sethostname.c \ setjmperr.c \ @@ -451,10 +453,12 @@ MLINKS+=rand48.3 _rand48.3 \ rand48.3 nrand48.3 \ rand48.3 seed48.3 \ rand48.3 srand48.3 +MLINKS+=recv.2 recvmmsg.2 MLINKS+=scandir.3 alphasort.3 MLINKS+=sem_open.3 sem_close.3 \ sem_open.3 sem_unlink.3 MLINKS+=sem_wait.3 sem_trywait.3 +MLINKS+=send.2 sendmmsg.2 MLINKS+=setjmp.3 _longjmp.3 \ setjmp.3 _setjmp.3 \ setjmp.3 longjmp.3 \ Copied: user/ngie/make_check/lib/libc/gen/recvmmsg.c (from r295077, head/lib/libc/gen/recvmmsg.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/ngie/make_check/lib/libc/gen/recvmmsg.c Sat Jan 30 17:43:41 2016 (r295078, copy of r295077, head/lib/libc/gen/recvmmsg.c) @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2016 Boris Astardzhiev, Smartcom-Bulgaria AD + * 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(s), this list of conditions and the following disclaimer as + * the first lines of this file unmodified other than the possible + * addition of one or more copyright notices. + * 2. Redistributions in binary form must reproduce the above copyright + * notice(s), 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 HOLDER(S) ``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 HOLDER(S) 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 "libc_private.h" + +ssize_t +recvmmsg(int s, struct mmsghdr *__restrict msgvec, size_t vlen, int flags, + const struct timespec *__restrict timeout) +{ + struct pollfd pfd[1]; + size_t i, rcvd; + ssize_t ret; + int res; + short ev; + + if (timeout != NULL) { + pfd[0].fd = s; + pfd[0].revents = 0; + pfd[0].events = ev = POLLIN | POLLRDNORM | POLLRDBAND | + POLLPRI; + res = ppoll(&pfd[0], 1, timeout, NULL); + if (res == -1 || res == 0) + return (res); + if (pfd[0].revents & POLLNVAL) { + errno = EBADF; + return (-1); + } + if ((pfd[0].revents & ev) == 0) { + errno = ETIMEDOUT; + return (-1); + } + } + + ret = __sys_recvmsg(s, &msgvec[0].msg_hdr, flags); + if (ret == -1) + return (ret); + + /* + * Do non-blocking receive for second and later messages if + * WAITFORONE is set. + */ + if (flags & MSG_WAITFORONE) + flags |= MSG_DONTWAIT; + + rcvd = 1; + for (i = rcvd; i < vlen; i++, rcvd++) { + ret = __sys_recvmsg(s, &msgvec[i].msg_hdr, flags); + if (ret == -1) { + /* We have received messages. Let caller know + * about the data received, socket + * error is returned on next + * invocation. + */ + return (rcvd); + } + + /* Save received bytes. */ + msgvec[i].msg_len = ret; + } + + return (rcvd); +} Copied: user/ngie/make_check/lib/libc/gen/sendmmsg.c (from r295077, head/lib/libc/gen/sendmmsg.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/ngie/make_check/lib/libc/gen/sendmmsg.c Sat Jan 30 17:43:41 2016 (r295078, copy of r295077, head/lib/libc/gen/sendmmsg.c) @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2016 Boris Astardzhiev, Smartcom-Bulgaria AD + * 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(s), this list of conditions and the following disclaimer as + * the first lines of this file unmodified other than the possible + * addition of one or more copyright notices. + * 2. Redistributions in binary form must reproduce the above copyright + * notice(s), 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 HOLDER(S) ``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 HOLDER(S) 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 "libc_private.h" + +ssize_t +sendmmsg(int s, struct mmsghdr *__restrict msgvec, size_t vlen, int flags) +{ + size_t i, sent; + ssize_t ret; + + sent = 0; + for (i = 0; i < vlen; i++, sent++) { + ret = __sys_sendmsg(s, &msgvec[i].msg_hdr, flags); + if (ret == -1) { + if (sent != 0) { + /* + * We have sent messages. Let caller + * know about the data sent, socket + * error is returned on next + * invocation. + */ + return (sent); + } + return (ret); + } + + /* Save sent bytes. */ + msgvec[i].msg_len = ret; + } + + return (sent); +} Modified: user/ngie/make_check/lib/libc/include/namespace.h ============================================================================== --- user/ngie/make_check/lib/libc/include/namespace.h Sat Jan 30 17:32:46 2016 (r295077) +++ user/ngie/make_check/lib/libc/include/namespace.h Sat Jan 30 17:43:41 2016 (r295078) @@ -208,6 +208,7 @@ #define readv _readv #define recvfrom _recvfrom #define recvmsg _recvmsg +#define recvmmsg _recvmmsg #define select _select #define sem_close _sem_close #define sem_destroy _sem_destroy @@ -220,6 +221,7 @@ #define sem_unlink _sem_unlink #define sem_wait _sem_wait #define sendmsg _sendmsg +#define sendmmsg _sendmmsg #define sendto _sendto #define setsockopt _setsockopt /*#define sigaction _sigaction*/ Modified: user/ngie/make_check/lib/libc/include/un-namespace.h ============================================================================== --- user/ngie/make_check/lib/libc/include/un-namespace.h Sat Jan 30 17:32:46 2016 (r295077) +++ user/ngie/make_check/lib/libc/include/un-namespace.h Sat Jan 30 17:43:41 2016 (r295078) @@ -189,6 +189,7 @@ #undef readv #undef recvfrom #undef recvmsg +#undef recvmmsg #undef select #undef sem_close #undef sem_destroy @@ -201,6 +202,7 @@ #undef sem_unlink #undef sem_wait #undef sendmsg +#undef sendmmsg #undef sendto #undef setsockopt #undef sigaction Modified: user/ngie/make_check/lib/libc/sys/Symbol.map ============================================================================== --- user/ngie/make_check/lib/libc/sys/Symbol.map Sat Jan 30 17:32:46 2016 (r295077) +++ user/ngie/make_check/lib/libc/sys/Symbol.map Sat Jan 30 17:43:41 2016 (r295078) @@ -399,6 +399,8 @@ FBSD_1.4 { utimensat; numa_setaffinity; numa_getaffinity; + sendmmsg; + recvmmsg; }; FBSDprivate_1.0 { Modified: user/ngie/make_check/lib/libc/sys/recv.2 ============================================================================== --- user/ngie/make_check/lib/libc/sys/recv.2 Sat Jan 30 17:32:46 2016 (r295077) +++ user/ngie/make_check/lib/libc/sys/recv.2 Sat Jan 30 17:43:41 2016 (r295078) @@ -28,14 +28,15 @@ .\" @(#)recv.2 8.3 (Berkeley) 2/21/94 .\" $FreeBSD$ .\" -.Dd October 15, 2014 +.Dd January 29, 2016 .Dt RECV 2 .Os .Sh NAME .Nm recv , .Nm recvfrom , -.Nm recvmsg -.Nd receive a message from a socket +.Nm recvmsg , +.Nm recvmmsg +.Nd receive message(s) from a socket .Sh LIBRARY .Lb libc .Sh SYNOPSIS @@ -47,11 +48,14 @@ .Fn recvfrom "int s" "void *buf" "size_t len" "int flags" "struct sockaddr * restrict from" "socklen_t * restrict fromlen" .Ft ssize_t .Fn recvmsg "int s" "struct msghdr *msg" "int flags" +.Ft ssize_t +.Fn recvmmsg "int s" "struct mmsghdr * restrict msgvec" "size_t vlen" "int flags" "const struct timespec * restrict timeout" .Sh DESCRIPTION The -.Fn recvfrom +.Fn recvfrom , +.Fn recvmsg , and -.Fn recvmsg +.Fn recvmmsg system calls are used to receive messages from a socket, and may be used to receive data on a socket whether or not @@ -84,8 +88,39 @@ null pointer passed as its .Fa from argument. .Pp -All three routines return the length of the message on successful -completion. +The +.Fn recvmmsg +function is used to receive multiple +messages at a call. +Their number is supplied by +.Fa vlen . +The messages are placed in the buffers described by +.Fa msgvec +vector, after reception. +The size of each received message is placed in the +.Fa msg_len +field of each element of the vector. +If +.Fa timeout +is NULL the call blocks until the data is available for each +supplied message buffer. +Otherwise it waits for data for the specified amount of time. +If the timeout expired and there is no data received, +a value 0 is returned. +The +.Xr ppoll 2 +system call is used to implement the timeout mechanism, +before first receive is performed. +.Pp +The +.Fn recv , +.Fn recvfrom +and +.Fn recvmsg +return the length of the message on successful +completion, whereas +.Fn recvmmsg +returns the number of received messages. If a message is too long to fit in the supplied buffer, excess bytes may be discarded depending on the type of socket the message is received from (see @@ -100,7 +135,9 @@ in which case the value .Va errno is set to .Er EAGAIN . -The receive calls normally return any data available, +The receive calls except +.Fn recvmmsg +normally return any data available, up to the requested amount, rather than waiting for receipt of the full amount requested; this behavior is affected by the socket-level options @@ -109,6 +146,9 @@ and .Dv SO_RCVTIMEO described in .Xr getsockopt 2 . +The +.Fn recvmmsg +function implements this behaviour for each message in the vector. .Pp The .Xr select 2 @@ -127,6 +167,10 @@ one or more of the values: .It Dv MSG_WAITALL Ta wait for full request or error .It Dv MSG_DONTWAIT Ta do not block .It Dv MSG_CMSG_CLOEXEC Ta set received fds close-on-exec +.It Dv MSG_WAITFORONE Ta do not block after receiving the first message +(only for +.Fn recvmmsg +) .El .Pp The @@ -158,6 +202,11 @@ is set to This flag is not available in strict .Tn ANSI or C99 compilation mode. +The +.Dv MSG_WAITFORONE +flag sets MSG_DONTWAIT after the first message has been received. +This flag is only relevant for +.Fn recvmmsg . .Pp The .Fn recvmsg @@ -290,9 +339,31 @@ control data were discarded due to lack for ancillary data. .Dv MSG_OOB is returned to indicate that expedited or out-of-band data were received. +.Pp +The +.Fn recvmmsg +system call uses the +.Fa mmsghdr +structure, defined as follows in the +.In sys/socket.h +header : +.Bd -literal +struct mmsghdr { + struct msghdr msg_hdr; /* message header */ + ssize_t msg_len; /* message length */ +}; +.Ed +.Pp +On data reception the +.Fa msg_len +field is updated to the length of the received message. .Sh RETURN VALUES -These calls return the number of bytes received, or -1 -if an error occurred. +These calls except +.Fn recvmmsg +return the number of bytes received. +.Fn recvmmsg +returns the number of messages received. +A value of -1 is returned if an error occurred. .Sh ERRORS The calls fail if: .Bl -tag -width Er @@ -347,3 +418,7 @@ The .Fn recv function appeared in .Bx 4.2 . +The +.Fn recvmmsg +function appeared in +.Fx 11.0 . Modified: user/ngie/make_check/lib/libc/sys/send.2 ============================================================================== --- user/ngie/make_check/lib/libc/sys/send.2 Sat Jan 30 17:32:46 2016 (r295077) +++ user/ngie/make_check/lib/libc/sys/send.2 Sat Jan 30 17:43:41 2016 (r295078) @@ -28,14 +28,15 @@ .\" From: @(#)send.2 8.2 (Berkeley) 2/21/94 .\" $FreeBSD$ .\" -.Dd February 5, 2009 +.Dd January 29, 2016 .Dt SEND 2 .Os .Sh NAME .Nm send , .Nm sendto , -.Nm sendmsg -.Nd send a message from a socket +.Nm sendmsg , +.Nm sendmmsg +.Nd send message(s) from a socket .Sh LIBRARY .Lb libc .Sh SYNOPSIS @@ -47,25 +48,33 @@ .Fn sendto "int s" "const void *msg" "size_t len" "int flags" "const struct sockaddr *to" "socklen_t tolen" .Ft ssize_t .Fn sendmsg "int s" "const struct msghdr *msg" "int flags" +.Ft ssize_t +.Fn sendmmsg "int s" "struct mmsghdr * restrict msgvec" "size_t vlen" "int flags" .Sh DESCRIPTION The .Fn send -function, +and +.Fn sendmmsg +functions, and .Fn sendto and .Fn sendmsg system calls -are used to transmit a message to another socket. +are used to transmit one or more messages (with the +.Fn sendmmsg +call) to +another socket. The .Fn send function may be used only when the socket is in a .Em connected state, while -.Fn sendto -and +.Fn sendto , .Fn sendmsg +and +.Fn sendmmsg may be used at any time. .Pp The address of the target is given by @@ -81,6 +90,18 @@ underlying protocol, the error is returned, and the message is not transmitted. .Pp +The +.Fn sendmmsg +function sends multiple messages at a call. +They are given by the +.Fa msgvec +vector along with +.Fa vlen +specifying the vector size. +The number of octets sent per each message is placed in the +.Fa msg_len +field of each processed element of the vector after transmission. +.Pp No indication of failure to deliver is implicit in a .Fn send . Locally detected errors are indicated by a return value of -1. @@ -138,14 +159,27 @@ See .Xr recv 2 for a description of the .Fa msghdr +structure and the +.Fa mmsghdr structure. .Sh RETURN VALUES -The call returns the number of characters sent, or -1 -if an error occurred. +The +.Fn send , +.Fn sendto +and +.Fn sendmsg +calls +return the number of octets sent. +The +.Fn sendmmsg +call returns the number of messages sent. +If an error occurred a value of -1 is returned. .Sh ERRORS The .Fn send -function and +and +.Fn sendmmsg +functions and .Fn sendto and .Fn sendmsg @@ -215,6 +249,10 @@ The .Fn send function appeared in .Bx 4.2 . +The +.Fn sendmmsg +function appeared in +.Fx 11.0 . .Sh BUGS Because .Fn sendmsg Modified: user/ngie/make_check/lib/libc/tests/gen/Makefile ============================================================================== --- user/ngie/make_check/lib/libc/tests/gen/Makefile Sat Jan 30 17:32:46 2016 (r295077) +++ user/ngie/make_check/lib/libc/tests/gen/Makefile Sat Jan 30 17:43:41 2016 (r295078) @@ -11,6 +11,7 @@ ATF_TESTS_C+= ftw_test ATF_TESTS_C+= popen_test ATF_TESTS_C+= posix_spawn_test ATF_TESTS_C+= wordexp_test +ATF_TESTS_C+= dlopen_empty_test # TODO: t_closefrom, t_cpuset, t_fmtcheck, t_randomid, t_sleep # TODO: t_siginfo (fixes require further inspection) Copied: user/ngie/make_check/lib/libc/tests/gen/dlopen_empty_test.c (from r295077, head/lib/libc/tests/gen/dlopen_empty_test.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/ngie/make_check/lib/libc/tests/gen/dlopen_empty_test.c Sat Jan 30 17:43:41 2016 (r295078, copy of r295077, head/lib/libc/tests/gen/dlopen_empty_test.c) @@ -0,0 +1,97 @@ +/*- + * Copyright (c) 2016 Maksym Sobolyev + * 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 + +static const char *funname; +static char *soname; + +static void +sigsegv_handler(int sig __unused) +{ + unlink(soname); + free(soname); + atf_tc_fail("got SIGSEGV in the %s(3)", funname); +} + +ATF_TC(dlopen_empty_test); +ATF_TC_HEAD(dlopen_empty_test, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the dlopen() of an empty file " + "returns an error"); +} +ATF_TC_BODY(dlopen_empty_test, tc) +{ + char tempname[] = "/tmp/temp.XXXXXX"; + char *fname; + int fd; + void *dlh; + struct sigaction act, oact; + + fname = mktemp(tempname); + ATF_REQUIRE_MSG(fname != NULL, "mktemp failed; errno=%d", errno); + asprintf(&soname, "%s.so", fname); + ATF_REQUIRE_MSG(soname != NULL, "asprintf failed; errno=%d", ENOMEM); + fd = open(soname, O_WRONLY | O_CREAT | O_TRUNC, DEFFILEMODE); + ATF_REQUIRE_MSG(fd != -1, "open(\"%s\") failed; errno=%d", soname, errno); + close(fd); + + act.sa_handler = sigsegv_handler; + act.sa_flags = 0; + sigemptyset(&act.sa_mask); + ATF_CHECK_MSG(sigaction(SIGSEGV, &act, &oact) != -1, + "sigaction() failed"); + + funname = "dlopen"; + dlh = dlopen(soname, RTLD_LAZY); + if (dlh != NULL) { + funname = "dlclose"; + dlclose(dlh); + } + ATF_REQUIRE_MSG(dlh == NULL, "dlopen(\"%s\") did not fail", soname); + unlink(soname); + free(soname); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, dlopen_empty_test); + + return (atf_no_error()); +} Modified: user/ngie/make_check/lib/libsysdecode/syscallnames.c ============================================================================== --- user/ngie/make_check/lib/libsysdecode/syscallnames.c Sat Jan 30 17:32:46 2016 (r295077) +++ user/ngie/make_check/lib/libsysdecode/syscallnames.c Sat Jan 30 17:43:41 2016 (r295078) @@ -70,30 +70,30 @@ sysdecode_syscallname(enum sysdecode_abi { switch (abi) { - case FREEBSD: + case SYSDECODE_ABI_FREEBSD: if (code < nitems(syscallnames)) return (syscallnames[code]); break; #if defined(__amd64__) || defined(__powerpc64__) - case FREEBSD32: + case SYSDECODE_ABI_FREEBSD32: if (code < nitems(freebsd32_syscallnames)) return (freebsd32_syscallnames[code]); break; #endif #if defined(__amd64__) || defined(__i386__) - case LINUX: + case SYSDECODE_ABI_LINUX: if (code < nitems(linux_syscallnames)) return (linux_syscallnames[code]); break; #endif #ifdef __amd64__ - case LINUX32: + case SYSDECODE_ABI_LINUX32: if (code < nitems(linux32_syscallnames)) return (linux32_syscallnames[code]); break; #endif #if defined(__amd64__) || defined(__aarch64__) - case CLOUDABI64: + case SYSDECODE_ABI_CLOUDABI64: if (code < nitems(cloudabi64_syscallnames)) return (cloudabi64_syscallnames[code]); break; Modified: user/ngie/make_check/lib/libsysdecode/sysdecode.3 ============================================================================== --- user/ngie/make_check/lib/libsysdecode/sysdecode.3 Sat Jan 30 17:32:46 2016 (r295077) +++ user/ngie/make_check/lib/libsysdecode/sysdecode.3 Sat Jan 30 17:43:41 2016 (r295078) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 24, 2016 +.Dd January 29, 2016 .Dt SYSDECODE 3 .Os .Sh NAME @@ -44,23 +44,23 @@ The supported ABIs are named by the .Vt enum sysdecode_abi enumeration. .Pp -.Bl -tag -width "Li UNKNOWN_ABI" -compact -.It Li FREEBSD +.Bl -tag -width "Li SYSDECODE_ABI_CLOUDABI64" -compact +.It Li SYSDECODE_ABI_FREEBSD Native FreeBSD binaries. Supported on all platforms. -.It Li FREEBSD32 +.It Li SYSDECODE_ABI_FREEBSD32 32-bit FreeBSD binaries. Supported on amd64 and powerpc64. -.It Li LINUX +.It Li SYSDECODE_ABI_LINUX Linux binaries of the same platform. Supported on amd64 and i386. -.It Li LINUX32 +.It Li SYSDECODE_ABI_LINUX32 32-bit Linux binaries. Supported on amd64. -.It Li CLOUDABI64 +.It Li SYSDECODE_ABI_CLOUDABI64 64-bit CloudABI binaries. Supported on aarch64 and amd64. -.It Li UNKNOWN_ABI +.It Li SYSDECODE_ABI_UNKNOWN A placeholder for use when the ABI is not known. .El .Sh SEE ALSO Modified: user/ngie/make_check/lib/libsysdecode/sysdecode.h ============================================================================== --- user/ngie/make_check/lib/libsysdecode/sysdecode.h Sat Jan 30 17:32:46 2016 (r295077) +++ user/ngie/make_check/lib/libsysdecode/sysdecode.h Sat Jan 30 17:43:41 2016 (r295078) @@ -30,12 +30,12 @@ #define __SYSDECODE_H__ enum sysdecode_abi { - UNKNOWN_ABI = 0, - FREEBSD, - FREEBSD32, - LINUX, - LINUX32, - CLOUDABI64 + SYSDECODE_ABI_UNKNOWN = 0, + SYSDECODE_ABI_FREEBSD, + SYSDECODE_ABI_FREEBSD32, + SYSDECODE_ABI_LINUX, + SYSDECODE_ABI_LINUX32, + SYSDECODE_ABI_CLOUDABI64 }; const char *sysdecode_ioctlname(unsigned long _val); Modified: user/ngie/make_check/libexec/rtld-elf/map_object.c ============================================================================== --- user/ngie/make_check/libexec/rtld-elf/map_object.c Sat Jan 30 17:32:46 2016 (r295077) +++ user/ngie/make_check/libexec/rtld-elf/map_object.c Sat Jan 30 17:43:41 2016 (r295078) @@ -38,7 +38,7 @@ #include "debug.h" #include "rtld.h" -static Elf_Ehdr *get_elf_header(int, const char *); +static Elf_Ehdr *get_elf_header(int, const char *, const struct stat *); static int convert_prot(int); /* Elf flags -> mmap protection */ static int convert_flags(int); /* Elf flags -> mmap flags */ @@ -91,7 +91,7 @@ map_object(int fd, const char *path, con char *note_map; size_t note_map_len; - hdr = get_elf_header(fd, path); + hdr = get_elf_header(fd, path, sb); if (hdr == NULL) return (NULL); @@ -324,10 +324,16 @@ error: } static Elf_Ehdr * -get_elf_header(int fd, const char *path) +get_elf_header(int fd, const char *path, const struct stat *sbp) { Elf_Ehdr *hdr; + /* Make sure file has enough data for the ELF header */ + if (sbp != NULL && sbp->st_size < sizeof(Elf_Ehdr)) { + _rtld_error("%s: invalid file format", path); + return (NULL); + } + hdr = mmap(NULL, PAGE_SIZE, PROT_READ, MAP_PRIVATE | MAP_PREFAULT_READ, fd, 0); if (hdr == (Elf_Ehdr *)MAP_FAILED) { Modified: user/ngie/make_check/sys/arm/arm/cpufunc.c ============================================================================== --- user/ngie/make_check/sys/arm/arm/cpufunc.c Sat Jan 30 17:32:46 2016 (r295077) +++ user/ngie/make_check/sys/arm/arm/cpufunc.c Sat Jan 30 17:43:41 2016 (r295078) @@ -889,9 +889,6 @@ set_cpufuncs() cpufuncs = arm1176_cpufuncs; cpu_reset_needs_v4_MMU_disable = 1; /* V4 or higher */ get_cachetype_cp15(); - - pmap_pte_init_mmu_v6(); - goto out; } #endif /* CPU_ARM1176 */ @@ -915,8 +912,6 @@ set_cpufuncs() cpufuncs = cortexa_cpufuncs; cpu_reset_needs_v4_MMU_disable = 1; /* V4 or higher */ get_cachetype_cp15(); - - pmap_pte_init_mmu_v6(); goto out; } #endif /* CPU_CORTEXA */ @@ -927,7 +922,6 @@ set_cpufuncs() cputype == CPU_ID_ARM_88SV581X_V7) { cpufuncs = pj4bv7_cpufuncs; get_cachetype_cp15(); - pmap_pte_init_mmu_v6(); goto out; } #endif /* CPU_MV_PJ4B */ Modified: user/ngie/make_check/sys/arm/arm/db_interface.c ============================================================================== --- user/ngie/make_check/sys/arm/arm/db_interface.c Sat Jan 30 17:32:46 2016 (r295077) +++ user/ngie/make_check/sys/arm/arm/db_interface.c Sat Jan 30 17:43:41 2016 (r295078) @@ -170,7 +170,7 @@ db_validate_address(vm_offset_t addr) addr >= VM_MIN_KERNEL_ADDRESS #endif ) - pmap = pmap_kernel(); + pmap = kernel_pmap; else pmap = p->p_vmspace->vm_map.pmap; Modified: user/ngie/make_check/sys/arm/arm/genassym.c ============================================================================== --- user/ngie/make_check/sys/arm/arm/genassym.c Sat Jan 30 17:32:46 2016 (r295077) +++ user/ngie/make_check/sys/arm/arm/genassym.c Sat Jan 30 17:43:41 2016 (r295078) @@ -61,16 +61,16 @@ __FBSDID("$FreeBSD$"); ASSYM(KERNBASE, KERNBASE); ASSYM(PCB_NOALIGNFLT, PCB_NOALIGNFLT); -#ifdef ARM_NEW_PMAP +#if __ARM_ARCH >= 6 ASSYM(CPU_ASID_KERNEL,CPU_ASID_KERNEL); #endif ASSYM(PCB_ONFAULT, offsetof(struct pcb, pcb_onfault)); -#ifndef ARM_NEW_PMAP +#if __ARM_ARCH < 6 ASSYM(PCB_DACR, offsetof(struct pcb, pcb_dacr)); #endif ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags)); ASSYM(PCB_PAGEDIR, offsetof(struct pcb, pcb_pagedir)); -#ifndef ARM_NEW_PMAP +#if __ARM_ARCH < 6 ASSYM(PCB_L1VEC, offsetof(struct pcb, pcb_l1vec)); ASSYM(PCB_PL1VEC, offsetof(struct pcb, pcb_pl1vec)); #endif Modified: user/ngie/make_check/sys/arm/arm/locore-v6.S ============================================================================== --- user/ngie/make_check/sys/arm/arm/locore-v6.S Sat Jan 30 17:32:46 2016 (r295077) +++ user/ngie/make_check/sys/arm/arm/locore-v6.S Sat Jan 30 17:43:41 2016 (r295078) @@ -30,6 +30,7 @@ #include "assym.s" #include +#include #include #include #include @@ -39,11 +40,6 @@ __FBSDID("$FreeBSD$"); -#ifndef ARM_NEW_PMAP -#define PTE1_OFFSET L1_S_OFFSET -#define PTE1_SHIFT L1_S_SHIFT -#define PTE1_SIZE L1_S_SIZE -#endif #if __ARM_ARCH >= 7 #if defined(__ARM_ARCH_7VE__) || defined(__clang__) @@ -287,7 +283,6 @@ ASENTRY_NP(init_mmu) mov r0, #((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT) mcr CP15_DACR(r0) -#ifdef ARM_NEW_PMAP /* * Set TEX remap registers * - All is set to uncacheable memory @@ -296,7 +291,6 @@ ASENTRY_NP(init_mmu) mcr CP15_PRRR(r0) mov r0, #0 mcr CP15_NMRR(r0) -#endif mcr CP15_TLBIALL /* Flush TLB */ DSB ISB @@ -305,9 +299,7 @@ ASENTRY_NP(init_mmu) mrc CP15_SCTLR(r0) orr r0, r0, #CPU_CONTROL_MMU_ENABLE orr r0, r0, #CPU_CONTROL_V6_EXTPAGE -#ifdef ARM_NEW_PMAP orr r0, r0, #CPU_CONTROL_TR_ENABLE -#endif orr r0, r0, #CPU_CONTROL_AF_ENABLE mcr CP15_SCTLR(r0) DSB @@ -398,23 +390,11 @@ END(reinit_mmu) * Addresses must be 1MiB aligned */ build_device_pagetables: -#if defined(ARM_NEW_PMAP) ldr r4, =PTE1_V|PTE1_A|PTE1_AP_KRW|TEX1_CLASS_0 -#elif defined(SMP) - ldr r4, =(L1_TYPE_S|L1_S_AP(AP_KRW)|L1_SHARED) -#else - ldr r4, =(L1_TYPE_S|L1_S_AP(AP_KRW)) -#endif b 1f build_pagetables: /* Set the required page attributed */ -#if defined(ARM_NEW_PMAP) ldr r4, =PTE1_V|PTE1_A|PTE1_AP_KRW|TEX1_CLASS_0 -#elif defined(SMP) - ldr r4, =(L1_TYPE_S|L1_S_C|L1_S_AP(AP_KRW)|L1_SHARED) -#else - ldr r4, =(L1_TYPE_S|L1_S_C|L1_S_AP(AP_KRW)) -#endif 1: orr r1, r4 Modified: user/ngie/make_check/sys/arm/arm/machdep.c ============================================================================== --- user/ngie/make_check/sys/arm/arm/machdep.c Sat Jan 30 17:32:46 2016 (r295077) +++ user/ngie/make_check/sys/arm/arm/machdep.c Sat Jan 30 17:43:41 2016 (r295078) @@ -199,7 +199,7 @@ static char *loader_envp; vm_paddr_t pmap_pa; -#ifdef ARM_NEW_PMAP +#if __ARM_ARCH >= 6 vm_offset_t systempage; vm_offset_t irqstack; vm_offset_t undstack; @@ -427,11 +427,9 @@ cpu_startup(void *dummy) { struct pcb *pcb = thread0.td_pcb; const unsigned int mbyte = 1024 * 1024; -#ifdef ARM_TP_ADDRESS -#ifndef ARM_CACHE_LOCK_ENABLE +#if __ARM_ARCH < 6 && !defined(ARM_CACHE_LOCK_ENABLE) vm_page_t m; #endif -#endif identify_arm_cpu(); @@ -455,12 +453,10 @@ cpu_startup(void *dummy) vm_pager_bufferinit(); pcb->pcb_regs.sf_sp = (u_int)thread0.td_kstack + USPACE_SVC_STACK_TOP; - pmap_set_pcb_pagedir(pmap_kernel(), pcb); -#ifndef ARM_NEW_PMAP + pmap_set_pcb_pagedir(kernel_pmap, pcb); +#if __ARM_ARCH < 6 vector_page_setprot(VM_PROT_READ); pmap_postinit(); -#endif -#ifdef ARM_TP_ADDRESS #ifdef ARM_CACHE_LOCK_ENABLE pmap_kenter_user(ARM_TP_ADDRESS, ARM_TP_ADDRESS); arm_lock_cache_line(ARM_TP_ADDRESS); @@ -1283,7 +1279,7 @@ arm_predict_branch(void *cookie, u_int i } } -#ifdef ARM_NEW_PMAP +#if __ARM_ARCH >= 6 void set_stackptrs(int cpu) { @@ -1447,7 +1443,7 @@ print_kenv(void) debugf(" %x %s\n", (uint32_t)cp, cp); } *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***