From owner-svn-src-all@FreeBSD.ORG Sun Sep 15 00:05:17 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1F760E89; Sun, 15 Sep 2013 00:05:17 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 07D2E2356; Sun, 15 Sep 2013 00:05:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8F05Grr071585; Sun, 15 Sep 2013 00:05:16 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8F05GoO071583; Sun, 15 Sep 2013 00:05:16 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309150005.r8F05GoO071583@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sun, 15 Sep 2013 00:05:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255577 - head/contrib/unbound X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Sep 2013 00:05:17 -0000 Author: des Date: Sun Sep 15 00:05:16 2013 New Revision: 255577 URL: http://svnweb.freebsd.org/changeset/base/255577 Log: Two helper scripts for porting Unbound: - freebsd-configure.sh runs ./configure with the correct parameters and regenerates the lex and yacc code. - freebsd-sources.pl untangles the upstream Makefile and generates source lists for our Makefiles. Approved by: re (blanket) Added: head/contrib/unbound/freebsd-configure.sh (contents, props changed) head/contrib/unbound/freebsd-sources.pl (contents, props changed) Added: head/contrib/unbound/freebsd-configure.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/unbound/freebsd-configure.sh Sun Sep 15 00:05:16 2013 (r255577) @@ -0,0 +1,38 @@ +#!/bin/sh + +set -e + +error() { + echo "$@" >&2 + exit 1 +} + +unbound=$(dirname $(realpath $0)) +cd $unbound + +ldnssrc=$(realpath $unbound/../ldns) +[ -f $ldnssrc/ldns/ldns.h ] || error "can't find LDNS sources" +export CFLAGS="-I$ldnssrc" + +ldnsbld=$(realpath $unbound/../../lib/libldns) +[ -f $ldnsbld/Makefile ] || error "can't find LDNS build directory" + +ldnsobj=$(realpath $(make -C$ldnsbld -V.OBJDIR)) +[ -f $ldnsobj/libldns.a ] || error "can't find LDNS object directory" +export LDFLAGS="-L$ldnsobj" + +./configure \ + --with-conf-file=/etc/unbound/unbound.conf \ + --with-run-dir=/var/unbound \ + --with-username=unbound + +# Regenerate the configuration parser +{ +cat <util/configlexer.c + +/usr/bin/yacc -o util/configparser.c util/configparser.y Added: head/contrib/unbound/freebsd-sources.pl ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/unbound/freebsd-sources.pl Sun Sep 15 00:05:16 2013 (r255577) @@ -0,0 +1,72 @@ +#!/usr/bin/perl -w +#- +# Copyright (c) 2013 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. +# +# $Id$ +# + +use strict; +use warnings; +use Text::Wrap; + +our @targets = qw(LIBUNBOUND DAEMON UBANCHOR CHECKCONF); + +our %target_names = ( + LIBUNBOUND => "libunbound", + DAEMON => "unbound", + UBANCHOR => "unbound-anchor", + CHECKCONF => "unbound-checkconf", +); + +sub get_sources($) { + my ($target) = @_; + local $/; + + open(MAKE, "-|", "make", "-V${target}_OBJ_LINK") + or die("failed to exec make: $!\n"); + my $objs = ; + close(MAKE); + chomp($objs); + $objs =~ s/\.l?o\b/.c/g; + return (split(/\s+/, $objs)); +} + +MAIN:{ + my %sources; + foreach my $target (@targets) { + $sources{$target} = { + map({ $_ => 1 } + grep({ !exists($sources{LIBUNBOUND}->{$_}) } + get_sources($target))) + }; + print("# $target_names{$target}\n"); + my $SRCS = fill("SRCS=\t", "\t", sort keys %{$sources{$target}}); + $SRCS =~ s/\n/ \\\n/gm; + print("$SRCS\n"); + } +} + +1; + From owner-svn-src-all@FreeBSD.ORG Sun Sep 15 00:07:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9B4971C3; Sun, 15 Sep 2013 00:07:52 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 88AF32372; Sun, 15 Sep 2013 00:07:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8F07qGX072163; Sun, 15 Sep 2013 00:07:52 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8F07q4B072161; Sun, 15 Sep 2013 00:07:52 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309150007.r8F07q4B072161@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sun, 15 Sep 2013 00:07:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255578 - head/contrib/unbound/util X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Sep 2013 00:07:52 -0000 Author: des Date: Sun Sep 15 00:07:51 2013 New Revision: 255578 URL: http://svnweb.freebsd.org/changeset/base/255578 Log: Move prototypes into header. Approved by: re (blanket) Modified: head/contrib/unbound/util/config_file.c head/contrib/unbound/util/config_file.h Modified: head/contrib/unbound/util/config_file.c ============================================================================== --- head/contrib/unbound/util/config_file.c Sun Sep 15 00:05:16 2013 (r255577) +++ head/contrib/unbound/util/config_file.c Sun Sep 15 00:07:51 2013 (r255578) @@ -59,16 +59,6 @@ /** global config during parsing */ struct config_parser_state* cfg_parser = 0; -/** lex in file */ -extern FILE* ub_c_in; -/** lex out file */ -extern FILE* ub_c_out; -/** the yacc lex generated parse function */ -int ub_c_parse(void); -/** the lexer function */ -int ub_c_lex(void); -/** wrap function */ -int ub_c_wrap(void); /** init ports possible for use */ static void init_outgoing_availports(int* array, int num); Modified: head/contrib/unbound/util/config_file.h ============================================================================== --- head/contrib/unbound/util/config_file.h Sun Sep 15 00:05:16 2013 (r255577) +++ head/contrib/unbound/util/config_file.h Sun Sep 15 00:07:51 2013 (r255578) @@ -632,6 +632,16 @@ struct config_parser_state { /** global config parser object used during config parsing */ extern struct config_parser_state* cfg_parser; +/** lex in file */ +extern FILE* ub_c_in; +/** lex out file */ +extern FILE* ub_c_out; +/** the yacc lex generated parse function */ +int ub_c_parse(void); +/** the lexer function */ +int ub_c_lex(void); +/** wrap function */ +int ub_c_wrap(void); /** parsing helpers: print error with file and line numbers */ void ub_c_error(const char* msg); /** parsing helpers: print error with file and line numbers */ From owner-svn-src-all@FreeBSD.ORG Sun Sep 15 00:36:20 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A57054F8; Sun, 15 Sep 2013 00:36:20 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 839F6248A; Sun, 15 Sep 2013 00:36:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8F0aK27087194; Sun, 15 Sep 2013 00:36:20 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8F0aIja087178; Sun, 15 Sep 2013 00:36:18 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309150036.r8F0aIja087178@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sun, 15 Sep 2013 00:36:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255579 - in head/contrib/unbound: daemon libunbound X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Sep 2013 00:36:20 -0000 Author: des Date: Sun Sep 15 00:36:18 2013 New Revision: 255579 URL: http://svnweb.freebsd.org/changeset/base/255579 Log: Numerous fixes to make Unbound compile cleanly: - cast through void * to silence alignment warnings (presumably false positives resulting from poor API design) - constify a few function arguments - move prototypes for callbacks into a common header - now that the prototypes are in scope, fix instances of function definitions that don't match the prototype or what the caller actually passes - hide a conditionally unused global variable behind the same #ifdef that controls its use Approved by: re (blanket) Added: head/contrib/unbound/libunbound/worker.h Modified: head/contrib/unbound/daemon/cachedump.c head/contrib/unbound/daemon/remote.c head/contrib/unbound/daemon/remote.h head/contrib/unbound/daemon/unbound.c head/contrib/unbound/daemon/worker.c head/contrib/unbound/daemon/worker.h head/contrib/unbound/libunbound/libworker.c head/contrib/unbound/libunbound/libworker.h Modified: head/contrib/unbound/daemon/cachedump.c ============================================================================== --- head/contrib/unbound/daemon/cachedump.c Sun Sep 15 00:07:51 2013 (r255578) +++ head/contrib/unbound/daemon/cachedump.c Sun Sep 15 00:36:18 2013 (r255579) @@ -299,7 +299,7 @@ copy_msg(struct regional* region, struct sizeof(struct ub_packed_rrset_key*) * rep->rrset_count); if(!*d) return 0; - (*d)->rrsets = (struct ub_packed_rrset_key**)( + (*d)->rrsets = (struct ub_packed_rrset_key**)(void *)( (uint8_t*)(&((*d)->ref[0])) + sizeof(struct rrset_ref) * rep->rrset_count); *k = (struct query_info*)regional_alloc_init(region, Modified: head/contrib/unbound/daemon/remote.c ============================================================================== --- head/contrib/unbound/daemon/remote.c Sun Sep 15 00:07:51 2013 (r255578) +++ head/contrib/unbound/daemon/remote.c Sun Sep 15 00:36:18 2013 (r255579) @@ -648,7 +648,7 @@ print_thread_stats(SSL* ssl, int i, stru /** print long number */ static int -print_longnum(SSL* ssl, char* desc, size_t x) +print_longnum(SSL* ssl, const char* desc, size_t x) { if(x > 1024*1024*1024) { /* more than a Gb */ @@ -1380,7 +1380,7 @@ do_flush_name(SSL* ssl, struct worker* w /** printout a delegation point info */ static int -ssl_print_name_dp(SSL* ssl, char* str, uint8_t* nm, uint16_t dclass, +ssl_print_name_dp(SSL* ssl, const char* str, uint8_t* nm, uint16_t dclass, struct delegpt* dp) { char buf[257]; Modified: head/contrib/unbound/daemon/remote.h ============================================================================== --- head/contrib/unbound/daemon/remote.h Sun Sep 15 00:07:51 2013 (r255578) +++ head/contrib/unbound/daemon/remote.h Sun Sep 15 00:36:18 2013 (r255579) @@ -157,12 +157,6 @@ void daemon_remote_start_accept(struct d */ void daemon_remote_exec(struct worker* worker); -/** handle remote control accept callbacks */ -int remote_accept_callback(struct comm_point*, void*, int, struct comm_reply*); - -/** handle remote control data callbacks */ -int remote_control_callback(struct comm_point*, void*, int, struct comm_reply*); - #ifdef HAVE_SSL /** * Print fixed line of text over ssl connection in blocking mode @@ -192,7 +186,4 @@ int ssl_printf(SSL* ssl, const char* for int ssl_read_line(SSL* ssl, char* buf, size_t max); #endif /* HAVE_SSL */ -/** routine to printout option values over SSL */ -void remote_get_opt_ssl(char* line, void* arg); - #endif /* DAEMON_REMOTE_H */ Modified: head/contrib/unbound/daemon/unbound.c ============================================================================== --- head/contrib/unbound/daemon/unbound.c Sun Sep 15 00:07:51 2013 (r255578) +++ head/contrib/unbound/daemon/unbound.c Sun Sep 15 00:36:18 2013 (r255579) @@ -53,6 +53,7 @@ #include "services/listen_dnsport.h" #include "services/cache/rrset.h" #include "services/cache/infra.h" +#include "util/fptr_wlist.h" #include "util/data/msgreply.h" #include "util/module.h" #include "util/net_help.h" @@ -92,8 +93,10 @@ # include "nss.h" #endif +#ifdef HAVE_SBRK /** global debug value to keep track of heap memory allocation */ void* unbound_start_brk = 0; +#endif #if !defined(HAVE_EVENT_BASE_GET_METHOD) && (defined(HAVE_EV_LOOP) || defined(HAVE_EV_DEFAULT_LOOP)) static const char* ev_backend2str(int b) Modified: head/contrib/unbound/daemon/worker.c ============================================================================== --- head/contrib/unbound/daemon/worker.c Sun Sep 15 00:07:51 2013 (r255578) +++ head/contrib/unbound/daemon/worker.c Sun Sep 15 00:36:18 2013 (r255579) @@ -70,6 +70,8 @@ #include "iterator/iter_hints.h" #include "validator/autotrust.h" #include "validator/val_anchor.h" +#include "libunbound/context.h" +#include "libunbound/libworker.h" #ifdef HAVE_SYS_TYPES_H # include @@ -819,7 +821,7 @@ worker_handle_request(struct comm_point* verbose(VERB_ALGO, "query with bad edns version."); log_addr(VERB_CLIENT,"from",&repinfo->addr, repinfo->addrlen); error_encode(c->buffer, EDNS_RCODE_BADVERS&0xf, &qinfo, - *(uint16_t*)ldns_buffer_begin(c->buffer), + *(uint16_t*)(void *)ldns_buffer_begin(c->buffer), ldns_buffer_read_u16_at(c->buffer, 2), NULL); attach_edns_record(c->buffer, &edns); return 1; @@ -883,7 +885,7 @@ worker_handle_request(struct comm_point* /* answer from cache - we have acquired a readlock on it */ if(answer_from_cache(worker, &qinfo, (struct reply_info*)e->data, - *(uint16_t*)ldns_buffer_begin(c->buffer), + *(uint16_t*)(void *)ldns_buffer_begin(c->buffer), ldns_buffer_read_u16_at(c->buffer, 2), repinfo, &edns)) { /* prefetch it if the prefetch TTL expired */ @@ -905,7 +907,7 @@ worker_handle_request(struct comm_point* } if(!LDNS_RD_WIRE(ldns_buffer_begin(c->buffer))) { if(answer_norec_from_cache(worker, &qinfo, - *(uint16_t*)ldns_buffer_begin(c->buffer), + *(uint16_t*)(void *)ldns_buffer_begin(c->buffer), ldns_buffer_read_u16_at(c->buffer, 2), repinfo, &edns)) { return 1; @@ -926,8 +928,8 @@ worker_handle_request(struct comm_point* /* grab a work request structure for this new request */ mesh_new_client(worker->env.mesh, &qinfo, - ldns_buffer_read_u16_at(c->buffer, 2), - &edns, repinfo, *(uint16_t*)ldns_buffer_begin(c->buffer)); + ldns_buffer_read_u16_at(c->buffer, 2), &edns, repinfo, + *(uint16_t*)(void *)ldns_buffer_begin(c->buffer)); worker_mem_report(worker, NULL); return 0; } @@ -1303,7 +1305,8 @@ struct outbound_entry* libworker_send_qu uint16_t ATTR_UNUSED(qclass), uint16_t ATTR_UNUSED(flags), int ATTR_UNUSED(dnssec), int ATTR_UNUSED(want_dnssec), struct sockaddr_storage* ATTR_UNUSED(addr), - socklen_t ATTR_UNUSED(addrlen), struct module_qstate* ATTR_UNUSED(q)) + socklen_t ATTR_UNUSED(addrlen), uint8_t* ATTR_UNUSED(zone), + size_t ATTR_UNUSED(zonelen), struct module_qstate* ATTR_UNUSED(q)) { log_assert(0); return 0; Modified: head/contrib/unbound/daemon/worker.h ============================================================================== --- head/contrib/unbound/daemon/worker.h Sun Sep 15 00:07:51 2013 (r255578) +++ head/contrib/unbound/daemon/worker.h Sun Sep 15 00:36:18 2013 (r255579) @@ -158,77 +158,9 @@ void worker_delete(struct worker* worker void worker_send_cmd(struct worker* worker, enum worker_commands cmd); /** - * Worker signal handler function. User argument is the worker itself. - * @param sig: signal number. - * @param arg: the worker (main worker) that handles signals. - */ -void worker_sighandler(int sig, void* arg); - -/** - * Worker service routine to send serviced queries to authoritative servers. - * @param qname: query name. (host order) - * @param qnamelen: length in bytes of qname, including trailing 0. - * @param qtype: query type. (host order) - * @param qclass: query class. (host order) - * @param flags: host order flags word, with opcode and CD bit. - * @param dnssec: if set, EDNS record will have DO bit set. - * @param want_dnssec: signatures needed. - * @param addr: where to. - * @param addrlen: length of addr. - * @param zone: wireformat dname of the zone. - * @param zonelen: length of zone name. - * @param q: wich query state to reactivate upon return. - * @return: false on failure (memory or socket related). no query was - * sent. - */ -struct outbound_entry* worker_send_query(uint8_t* qname, size_t qnamelen, - uint16_t qtype, uint16_t qclass, uint16_t flags, int dnssec, - int want_dnssec, struct sockaddr_storage* addr, socklen_t addrlen, - uint8_t* zone, size_t zonelen, struct module_qstate* q); - -/** - * process control messages from the main thread. Frees the control - * command message. - * @param tube: tube control message came on. - * @param msg: message contents. Is freed. - * @param len: length of message. - * @param error: if error (NETEVENT_*) happened. - * @param arg: user argument - */ -void worker_handle_control_cmd(struct tube* tube, uint8_t* msg, size_t len, - int error, void* arg); - -/** handles callbacks from listening event interface */ -int worker_handle_request(struct comm_point* c, void* arg, int error, - struct comm_reply* repinfo); - -/** process incoming replies from the network */ -int worker_handle_reply(struct comm_point* c, void* arg, int error, - struct comm_reply* reply_info); - -/** process incoming serviced query replies from the network */ -int worker_handle_service_reply(struct comm_point* c, void* arg, int error, - struct comm_reply* reply_info); - -/** cleanup the cache to remove all rrset IDs from it, arg is worker */ -void worker_alloc_cleanup(void* arg); - -/** * Init worker stats - includes server_stats_init, outside network and mesh. * @param worker: the worker to init */ void worker_stats_clear(struct worker* worker); -/** statistics timer callback handler */ -void worker_stat_timer_cb(void* arg); - -/** probe timer callback handler */ -void worker_probe_timer_cb(void* arg); - -/** start accept callback handler */ -void worker_start_accept(void* arg); - -/** stop accept callback handler */ -void worker_stop_accept(void* arg); - #endif /* DAEMON_WORKER_H */ Modified: head/contrib/unbound/libunbound/libworker.c ============================================================================== --- head/contrib/unbound/libunbound/libworker.c Sun Sep 15 00:07:51 2013 (r255578) +++ head/contrib/unbound/libunbound/libworker.c Sun Sep 15 00:36:18 2013 (r255579) @@ -50,11 +50,13 @@ #include "libunbound/libworker.h" #include "libunbound/context.h" #include "libunbound/unbound.h" +#include "libunbound/worker.h" #include "services/outside_network.h" #include "services/mesh.h" #include "services/localzone.h" #include "services/cache/rrset.h" #include "services/outbound_list.h" +#include "util/fptr_wlist.h" #include "util/module.h" #include "util/regional.h" #include "util/random.h" @@ -862,7 +864,8 @@ struct outbound_entry* worker_send_query uint16_t ATTR_UNUSED(qclass), uint16_t ATTR_UNUSED(flags), int ATTR_UNUSED(dnssec), int ATTR_UNUSED(want_dnssec), struct sockaddr_storage* ATTR_UNUSED(addr), - socklen_t ATTR_UNUSED(addrlen), struct module_qstate* ATTR_UNUSED(q)) + socklen_t ATTR_UNUSED(addrlen), uint8_t* ATTR_UNUSED(zone), + size_t ATTR_UNUSED(zonelen), struct module_qstate* ATTR_UNUSED(q)) { log_assert(0); return 0; Modified: head/contrib/unbound/libunbound/libworker.h ============================================================================== --- head/contrib/unbound/libunbound/libworker.h Sun Sep 15 00:07:51 2013 (r255578) +++ head/contrib/unbound/libunbound/libworker.h Sun Sep 15 00:36:18 2013 (r255579) @@ -41,8 +41,8 @@ * and if in the background continues until exit, if in the foreground * returns from the procedure when done. */ -#ifndef LIBUNBOUND_WORKER_H -#define LIBUNBOUND_WORKER_H +#ifndef LIBUNBOUND_LIBWORKER_H +#define LIBUNBOUND_LIBWORKER_H #include "util/data/packed_rrset.h" struct ub_ctx; struct ub_result; @@ -167,4 +167,4 @@ void libworker_bg_done_cb(void* arg, int void libworker_enter_result(struct ub_result* res, ldns_buffer* buf, struct regional* temp, enum sec_status msg_security); -#endif /* LIBUNBOUND_WORKER_H */ +#endif /* LIBUNBOUND_LIBWORKER_H */ Added: head/contrib/unbound/libunbound/worker.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/unbound/libunbound/worker.h Sun Sep 15 00:36:18 2013 (r255579) @@ -0,0 +1,122 @@ +/* + * libunbound/worker.h - prototypes for worker methods. + * + * Copyright (c) 2007, NLnet Labs. All rights reserved. + * + * This software is open source. + * + * 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. + * + * Neither the name of the NLNET LABS nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE 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 REGENTS OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * \file + * + * This file declares the methods any worker has to implement. + */ + +#ifndef LIBUNBOUND_WORKER_H +#define LIBUNBOUND_WORKER_H + +/** + * Worker signal handler function. User argument is the worker itself. + * @param sig: signal number. + * @param arg: the worker (main worker) that handles signals. + */ +void worker_sighandler(int sig, void* arg); + +/** + * Worker service routine to send serviced queries to authoritative servers. + * @param qname: query name. (host order) + * @param qnamelen: length in bytes of qname, including trailing 0. + * @param qtype: query type. (host order) + * @param qclass: query class. (host order) + * @param flags: host order flags word, with opcode and CD bit. + * @param dnssec: if set, EDNS record will have DO bit set. + * @param want_dnssec: signatures needed. + * @param addr: where to. + * @param addrlen: length of addr. + * @param zone: wireformat dname of the zone. + * @param zonelen: length of zone name. + * @param q: wich query state to reactivate upon return. + * @return: false on failure (memory or socket related). no query was + * sent. + */ +struct outbound_entry* worker_send_query(uint8_t* qname, size_t qnamelen, + uint16_t qtype, uint16_t qclass, uint16_t flags, int dnssec, + int want_dnssec, struct sockaddr_storage* addr, socklen_t addrlen, + uint8_t* zone, size_t zonelen, struct module_qstate* q); + +/** + * process control messages from the main thread. Frees the control + * command message. + * @param tube: tube control message came on. + * @param msg: message contents. Is freed. + * @param len: length of message. + * @param error: if error (NETEVENT_*) happened. + * @param arg: user argument + */ +void worker_handle_control_cmd(struct tube* tube, uint8_t* msg, size_t len, + int error, void* arg); + +/** handles callbacks from listening event interface */ +int worker_handle_request(struct comm_point* c, void* arg, int error, + struct comm_reply* repinfo); + +/** process incoming replies from the network */ +int worker_handle_reply(struct comm_point* c, void* arg, int error, + struct comm_reply* reply_info); + +/** process incoming serviced query replies from the network */ +int worker_handle_service_reply(struct comm_point* c, void* arg, int error, + struct comm_reply* reply_info); + +/** cleanup the cache to remove all rrset IDs from it, arg is worker */ +void worker_alloc_cleanup(void* arg); + +/** statistics timer callback handler */ +void worker_stat_timer_cb(void* arg); + +/** probe timer callback handler */ +void worker_probe_timer_cb(void* arg); + +/** start accept callback handler */ +void worker_start_accept(void* arg); + +/** stop accept callback handler */ +void worker_stop_accept(void* arg); + +/** handle remote control accept callbacks */ +int remote_accept_callback(struct comm_point*, void*, int, struct comm_reply*); + +/** handle remote control data callbacks */ +int remote_control_callback(struct comm_point*, void*, int, struct comm_reply*); + +/** routine to printout option values over SSL */ +void remote_get_opt_ssl(char* line, void* arg); + +#endif /* LIBUNBOUND_WORKER_H */ From owner-svn-src-all@FreeBSD.ORG Sun Sep 15 00:37:31 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2F31263C; Sun, 15 Sep 2013 00:37:31 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1BB652493; Sun, 15 Sep 2013 00:37:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8F0bUD5087571; Sun, 15 Sep 2013 00:37:30 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8F0bUpk087570; Sun, 15 Sep 2013 00:37:30 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309150037.r8F0bUpk087570@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sun, 15 Sep 2013 00:37:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255580 - head/contrib/unbound/util X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Sep 2013 00:37:31 -0000 Author: des Date: Sun Sep 15 00:37:30 2013 New Revision: 255580 URL: http://svnweb.freebsd.org/changeset/base/255580 Log: Forgotten in r255579: #include fixes. Approved by: re (blanket) Modified: head/contrib/unbound/util/fptr_wlist.c Modified: head/contrib/unbound/util/fptr_wlist.c ============================================================================== --- head/contrib/unbound/util/fptr_wlist.c Sun Sep 15 00:36:18 2013 (r255579) +++ head/contrib/unbound/util/fptr_wlist.c Sun Sep 15 00:37:30 2013 (r255580) @@ -46,8 +46,6 @@ #include "config.h" #include "util/fptr_wlist.h" #include "util/mini_event.h" -#include "daemon/worker.h" -#include "daemon/remote.h" #include "services/outside_network.h" #include "services/mesh.h" #include "services/localzone.h" @@ -69,6 +67,7 @@ #include "util/locks.h" #include "libunbound/libworker.h" #include "libunbound/context.h" +#include "libunbound/worker.h" #include "util/tube.h" #include "util/config_file.h" #ifdef UB_ON_WINDOWS From owner-svn-src-all@FreeBSD.ORG Sun Sep 15 00:40:22 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9F9A1798; Sun, 15 Sep 2013 00:40:22 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7DE2424AF; Sun, 15 Sep 2013 00:40:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8F0eMm5089192; Sun, 15 Sep 2013 00:40:22 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8F0eMq7089188; Sun, 15 Sep 2013 00:40:22 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309150040.r8F0eMq7089188@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sun, 15 Sep 2013 00:40:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255581 - in head/contrib/unbound: . doc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Sep 2013 00:40:22 -0000 Author: des Date: Sun Sep 15 00:40:21 2013 New Revision: 255581 URL: http://svnweb.freebsd.org/changeset/base/255581 Log: Generated configuration and documentation Approved by: re (blanket) Added: head/contrib/unbound/config.h head/contrib/unbound/doc/libunbound.3 head/contrib/unbound/doc/unbound-anchor.8 head/contrib/unbound/doc/unbound-checkconf.8 head/contrib/unbound/doc/unbound-control.8 head/contrib/unbound/doc/unbound.8 head/contrib/unbound/doc/unbound.conf.5 Added: head/contrib/unbound/config.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/unbound/config.h Sun Sep 15 00:40:21 2013 (r255581) @@ -0,0 +1,911 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Directory to chroot to */ +#define CHROOT_DIR "/var/unbound" + +/* Pathname to the Unbound configuration file */ +#define CONFIGFILE "/etc/unbound/unbound.conf" + +/* configure flags */ +#define CONFIGURE_BUILD_WITH " '--with-conf-file=/etc/unbound/unbound.conf' '--with-run-dir=/var/unbound' '--with-username=unbound'" + +/* configure date */ +#define CONFIGURE_DATE "Sun Sep 15 02:01:38 CEST 2013" + +/* configure target system */ +#define CONFIGURE_TARGET "x86_64-unknown-freebsd10.0" + +/* Define this if on macOSX10.4-darwin8 and setreuid and setregid do not work + */ +/* #undef DARWIN_BROKEN_SETREUID */ + +/* Whether daemon is deprecated */ +/* #undef DEPRECATED_DAEMON */ + +/* Define if you want to use debug lock checking (slow). */ +/* #undef ENABLE_LOCK_CHECKS */ + +/* Define this if you enabled-allsymbols from libunbound to link binaries to + it for smaller install size, but the libunbound export table is polluted by + internal symbols */ +/* #undef EXPORT_ALL_SYMBOLS */ + +/* Define to 1 if you have the header file. */ +#define HAVE_ARPA_INET_H 1 + +/* Whether the C compiler accepts the "format" attribute */ +#define HAVE_ATTR_FORMAT 1 + +/* Whether the C compiler accepts the "unused" attribute */ +#define HAVE_ATTR_UNUSED 1 + +/* Define to 1 if your system has a working `chown' function. */ +#define HAVE_CHOWN 1 + +/* Define to 1 if you have the `chroot' function. */ +#define HAVE_CHROOT 1 + +/* Define to 1 if you have the `ctime_r' function. */ +#define HAVE_CTIME_R 1 + +/* Define to 1 if you have the `daemon' function. */ +#define HAVE_DAEMON 1 + +/* Define to 1 if you have the declaration of `NID_secp384r1', and to 0 if you + don't. */ +#define HAVE_DECL_NID_SECP384R1 1 + +/* Define to 1 if you have the declaration of `NID_X9_62_prime256v1', and to 0 + if you don't. */ +#define HAVE_DECL_NID_X9_62_PRIME256V1 1 + +/* Define to 1 if you have the declaration of `sk_SSL_COMP_pop_free', and to 0 + if you don't. */ +#define HAVE_DECL_SK_SSL_COMP_POP_FREE 1 + +/* Define to 1 if you have the declaration of + `SSL_COMP_get_compression_methods', and to 0 if you don't. */ +#define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the `event_base_free' function. */ +/* #undef HAVE_EVENT_BASE_FREE */ + +/* Define to 1 if you have the `event_base_get_method' function. */ +/* #undef HAVE_EVENT_BASE_GET_METHOD */ + +/* Define to 1 if you have the `event_base_new' function. */ +/* #undef HAVE_EVENT_BASE_NEW */ + +/* Define to 1 if you have the `event_base_once' function. */ +/* #undef HAVE_EVENT_BASE_ONCE */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_EVENT_H */ + +/* Define to 1 if you have the `EVP_sha1' function. */ +#define HAVE_EVP_SHA1 1 + +/* Define to 1 if you have the `EVP_sha256' function. */ +#define HAVE_EVP_SHA256 1 + +/* Define to 1 if you have the `EVP_sha512' function. */ +#define HAVE_EVP_SHA512 1 + +/* Define to 1 if you have the `ev_default_loop' function. */ +/* #undef HAVE_EV_DEFAULT_LOOP */ + +/* Define to 1 if you have the `ev_loop' function. */ +/* #undef HAVE_EV_LOOP */ + +/* Define to 1 if you have the header file. */ +#define HAVE_EXPAT_H 1 + +/* Define to 1 if you have the `fcntl' function. */ +#define HAVE_FCNTL 1 + +/* Define to 1 if you have the `FIPS_mode' function. */ +#define HAVE_FIPS_MODE 1 + +/* Define to 1 if you have the `fork' function. */ +#define HAVE_FORK 1 + +/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ +#define HAVE_FSEEKO 1 + +/* Whether getaddrinfo is available */ +#define HAVE_GETADDRINFO 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_GETOPT_H 1 + +/* Define to 1 if you have the `getpwnam' function. */ +#define HAVE_GETPWNAM 1 + +/* Define to 1 if you have the `getrlimit' function. */ +#define HAVE_GETRLIMIT 1 + +/* Define to 1 if you have the `glob' function. */ +#define HAVE_GLOB 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_GLOB_H 1 + +/* Define to 1 if you have the `gmtime_r' function. */ +#define HAVE_GMTIME_R 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_GRP_H 1 + +/* If you have HMAC_CTX_init */ +#define HAVE_HMAC_CTX_INIT 1 + +/* Define to 1 if you have the `inet_aton' function. */ +#define HAVE_INET_ATON 1 + +/* Define to 1 if you have the `inet_ntop' function. */ +#define HAVE_INET_NTOP 1 + +/* Define to 1 if you have the `inet_pton' function. */ +#define HAVE_INET_PTON 1 + +/* Define to 1 if you have the `initgroups' function. */ +#define HAVE_INITGROUPS 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* if the function 'ioctlsocket' is available */ +/* #undef HAVE_IOCTLSOCKET */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_IPHLPAPI_H */ + +/* Define to 1 if you have the `kill' function. */ +#define HAVE_KILL 1 + +/* Define to 1 if you have the `ldns_key_EVP_unload_gost' function. */ +/* #undef HAVE_LDNS_KEY_EVP_UNLOAD_GOST */ + +/* Define to 1 if you have the header file. */ +#define HAVE_LDNS_LDNS_H 1 + +/* Define to 1 if you have the `ldns' library (-lldns). */ +#define HAVE_LIBLDNS 1 + +/* Define to 1 if you have the `localtime_r' function. */ +#define HAVE_LOCALTIME_R 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LOGIN_CAP_H 1 + +/* If have GNU libc compatible malloc */ +#define HAVE_MALLOC 1 + +/* Define to 1 if you have the `memmove' function. */ +#define HAVE_MEMMOVE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETDB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_IN_H 1 + +/* Use libnss for crypto */ +/* #undef HAVE_NSS */ + +/* Define to 1 if you have the `OPENSSL_config' function. */ +#define HAVE_OPENSSL_CONFIG 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_OPENSSL_CONF_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_OPENSSL_ENGINE_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_OPENSSL_ERR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_OPENSSL_RAND_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_OPENSSL_SSL_H 1 + +/* Define if you have POSIX threads libraries and header files. */ +#define HAVE_PTHREAD 1 + +/* Define to 1 if the system has the type `pthread_rwlock_t'. */ +#define HAVE_PTHREAD_RWLOCK_T 1 + +/* Define to 1 if the system has the type `pthread_spinlock_t'. */ +#define HAVE_PTHREAD_SPINLOCK_T 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_PWD_H 1 + +/* Define if you have Python libraries and header files. */ +/* #undef HAVE_PYTHON */ + +/* Define to 1 if you have the `random' function. */ +#define HAVE_RANDOM 1 + +/* Define to 1 if you have the `recvmsg' function. */ +#define HAVE_RECVMSG 1 + +/* Define to 1 if you have the `sbrk' function. */ +/* #undef HAVE_SBRK */ + +/* Define to 1 if you have the `sendmsg' function. */ +#define HAVE_SENDMSG 1 + +/* Define to 1 if you have the `setregid' function. */ +/* #undef HAVE_SETREGID */ + +/* Define to 1 if you have the `setresgid' function. */ +#define HAVE_SETRESGID 1 + +/* Define to 1 if you have the `setresuid' function. */ +#define HAVE_SETRESUID 1 + +/* Define to 1 if you have the `setreuid' function. */ +/* #undef HAVE_SETREUID */ + +/* Define to 1 if you have the `setrlimit' function. */ +#define HAVE_SETRLIMIT 1 + +/* Define to 1 if you have the `setsid' function. */ +#define HAVE_SETSID 1 + +/* Define to 1 if you have the `setusercontext' function. */ +#define HAVE_SETUSERCONTEXT 1 + +/* Define to 1 if you have the `sigprocmask' function. */ +#define HAVE_SIGPROCMASK 1 + +/* Define to 1 if you have the `sleep' function. */ +#define HAVE_SLEEP 1 + +/* Define to 1 if you have the `snprintf' function. */ +#define HAVE_SNPRINTF 1 + +/* Define to 1 if you have the `socketpair' function. */ +#define HAVE_SOCKETPAIR 1 + +/* Using Solaris threads */ +/* #undef HAVE_SOLARIS_THREADS */ + +/* Define to 1 if you have the `srandom' function. */ +#define HAVE_SRANDOM 1 + +/* Define if you have the SSL libraries installed. */ +#define HAVE_SSL /**/ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDARG_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDBOOL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `strftime' function. */ +#define HAVE_STRFTIME 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strlcpy' function. */ +#define HAVE_STRLCPY 1 + +/* Define to 1 if you have the `strptime' function. */ +#define HAVE_STRPTIME 1 + +/* Define to 1 if `ipi_spec_dst' is a member of `struct in_pktinfo'. */ +/* #undef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST */ + +/* Define if you have Swig libraries and header files. */ +/* #undef HAVE_SWIG */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYSLOG_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_UIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_WAIT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_TIME_H 1 + +/* Define to 1 if you have the `tzset' function. */ +#define HAVE_TZSET 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the `usleep' function. */ +#define HAVE_USLEEP 1 + +/* Define to 1 if you have the `vfork' function. */ +#define HAVE_VFORK 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_VFORK_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + +/* Using Windows threads */ +/* #undef HAVE_WINDOWS_THREADS */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINSOCK2_H */ + +/* Define to 1 if `fork' works. */ +#define HAVE_WORKING_FORK 1 + +/* Define to 1 if `vfork' works. */ +#define HAVE_WORKING_VFORK 1 + +/* Define to 1 if you have the `writev' function. */ +#define HAVE_WRITEV 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WS2TCPIP_H */ + +/* Define to 1 if you have the `_beginthreadex' function. */ +/* #undef HAVE__BEGINTHREADEX */ + +/* if lex has yylex_destroy */ +#define LEX_HAS_YYLEX_DESTROY 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Define to the maximum message length to pass to syslog. */ +#define MAXSYSLOGMSGLEN 10240 + +/* Define if memcmp() does not compare unsigned bytes */ +/* #undef MEMCMP_IS_BROKEN */ + +/* Define if mkdir has one argument. */ +/* #undef MKDIR_HAS_ONE_ARG */ + +/* Define if the network stack does not fully support nonblocking io (causes + lower performance). */ +/* #undef NONBLOCKING_IS_BROKEN */ + +/* Put -D_ALL_SOURCE define in config.h */ +/* #undef OMITTED__D_ALL_SOURCE */ + +/* Put -D_BSD_SOURCE define in config.h */ +/* #undef OMITTED__D_BSD_SOURCE */ + +/* Put -D_GNU_SOURCE define in config.h */ +/* #undef OMITTED__D_GNU_SOURCE */ + +/* Put -D_LARGEFILE_SOURCE=1 define in config.h */ +/* #undef OMITTED__D_LARGEFILE_SOURCE_1 */ + +/* Put -D_POSIX_C_SOURCE=200112 define in config.h */ +/* #undef OMITTED__D_POSIX_C_SOURCE_200112 */ + +/* Put -D_XOPEN_SOURCE=600 define in config.h */ +/* #undef OMITTED__D_XOPEN_SOURCE_600 */ + +/* Put -D_XOPEN_SOURCE_EXTENDED=1 define in config.h */ +/* #undef OMITTED__D_XOPEN_SOURCE_EXTENDED_1 */ + +/* Put -D__EXTENSIONS__ define in config.h */ +/* #undef OMITTED__D__EXTENSIONS__ */ + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "unbound-bugs@nlnetlabs.nl" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "unbound" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "unbound 1.4.20" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "unbound" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.4.20" + +/* default pidfile location */ +#define PIDFILE "/var/unbound/unbound.pid" + +/* Define to necessary symbol if this constant uses a non-standard name on + your system. */ +/* #undef PTHREAD_CREATE_JOINABLE */ + +/* Define as the return type of signal handlers (`int' or `void'). */ +#define RETSIGTYPE void + +/* default rootkey location */ +#define ROOT_ANCHOR_FILE "/var/unbound/root.key" + +/* default rootcert location */ +#define ROOT_CERT_FILE "/var/unbound/icannbundle.pem" + +/* version number for resource files */ +#define RSRC_PACKAGE_VERSION 1,4,2,0 + +/* Directory to chdir to */ +#define RUN_DIR "/var/unbound" + +/* Shared data */ +#define SHARE_DIR "/var/unbound" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* use default strptime. */ +#define STRPTIME_WORKS 1 + +/* Use win32 resources and API */ +/* #undef UB_ON_WINDOWS */ + +/* default username */ +#define UB_USERNAME "unbound" + +/* use to enable lightweight alloc assertions, for debug use */ +/* #undef UNBOUND_ALLOC_LITE */ + +/* use malloc not regions, for debug use */ +/* #undef UNBOUND_ALLOC_NONREGIONAL */ + +/* use statistics for allocs and frees, for debug use */ +/* #undef UNBOUND_ALLOC_STATS */ + +/* define this to enable debug checks. */ +/* #undef UNBOUND_DEBUG */ + +/* Define this to enable ECDSA support. */ +#define USE_ECDSA 1 + +/* Define this to enable an EVP workaround for older openssl */ +/* #undef USE_ECDSA_EVP_WORKAROUND */ + +/* Define this to enable GOST support. */ +/* #undef USE_GOST */ + +/* Define if you want to use internal select based events */ +#define USE_MINI_EVENT 1 + +/* Define this to enable SHA256 and SHA512 support. */ +#define USE_SHA2 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Whether the windows socket API is used */ +/* #undef USE_WINSOCK */ + +/* the version of the windows API enabled */ +#define WINVER 0x0502 + +/* Define if you want Python module. */ +/* #undef WITH_PYTHONMODULE */ + +/* Define if you want PyUnbound. */ +/* #undef WITH_PYUNBOUND */ + +/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a + `char[]'. */ +#define YYTEXT_POINTER 1 + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ +/* #undef _LARGEFILE_SOURCE */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define to `int' if doesn't define. */ +/* #undef gid_t */ + +/* in_addr_t */ +/* #undef in_addr_t */ + +/* in_port_t */ +/* #undef in_port_t */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Define to `short' if does not define. */ +/* #undef int16_t */ + +/* Define to `int' if does not define. */ +/* #undef int32_t */ + +/* Define to `long long' if does not define. */ +/* #undef int64_t */ + +/* Define to `signed char' if does not define. */ +/* #undef int8_t */ + +/* Define if replacement function should be used. */ +/* #undef malloc */ + +/* Define to `long int' if does not define. */ +/* #undef off_t */ + +/* Define to `int' if does not define. */ +/* #undef pid_t */ + +/* Define to 'int' if not defined */ +/* #undef rlim_t */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ + +/* Define to 'int' if not defined */ +/* #undef socklen_t */ + +/* Define to `int' if does not define. */ +/* #undef ssize_t */ + +/* Define to 'unsigned char if not defined */ +/* #undef u_char */ + +/* Define to `int' if doesn't define. */ +/* #undef uid_t */ + +/* Define to `unsigned short' if does not define. */ +/* #undef uint16_t */ + +/* Define to `unsigned int' if does not define. */ +/* #undef uint32_t */ + +/* Define to `unsigned long long' if does not define. */ +/* #undef uint64_t */ + +/* Define to `unsigned char' if does not define. */ +/* #undef uint8_t */ + +/* Define as `fork' if `vfork' does not work. */ +/* #undef vfork */ + +#if defined(OMITTED__D_GNU_SOURCE) && !defined(_GNU_SOURCE) +#define _GNU_SOURCE 1 +#endif + +#if defined(OMITTED__D_BSD_SOURCE) && !defined(_BSD_SOURCE) +#define _BSD_SOURCE 1 +#endif + +#if defined(OMITTED__D__EXTENSIONS__) && !defined(__EXTENSIONS__) +#define __EXTENSIONS__ 1 +#endif + +#if defined(OMITTED__D_POSIX_C_SOURCE_200112) && !defined(_POSIX_C_SOURCE) +#define _POSIX_C_SOURCE 200112 +#endif + +#if defined(OMITTED__D_XOPEN_SOURCE_600) && !defined(_XOPEN_SOURCE) +#define _XOPEN_SOURCE 600 +#endif + +#if defined(OMITTED__D_XOPEN_SOURCE_EXTENDED_1) && !defined(_XOPEN_SOURCE_EXTENDED) +#define _XOPEN_SOURCE_EXTENDED 1 +#endif + +#if defined(OMITTED__D_ALL_SOURCE) && !defined(_ALL_SOURCE) +#define _ALL_SOURCE 1 +#endif + +#if defined(OMITTED__D_LARGEFILE_SOURCE_1) && !defined(_LARGEFILE_SOURCE) +#define _LARGEFILE_SOURCE 1 +#endif + + + + +#ifndef UNBOUND_DEBUG +# define NDEBUG +#endif + +#include +#include +#include +#include + +#if STDC_HEADERS +#include +#include +#endif + +#ifdef HAVE_STDINT_H +#include +#endif + +#include + +#if HAVE_SYS_PARAM_H +#include +#endif + +#ifdef HAVE_SYS_SOCKET_H +#include +#endif + +#ifdef HAVE_SYS_UIO_H +#include +#endif + +#ifdef HAVE_NETINET_IN_H +#include +#endif + +#ifdef HAVE_ARPA_INET_H +#include +#endif + +#ifdef HAVE_WINSOCK2_H +#include +#endif + +#ifdef HAVE_WS2TCPIP_H +#include +#endif + + + +#ifdef HAVE_ATTR_FORMAT +# define ATTR_FORMAT(archetype, string_index, first_to_check) \ + __attribute__ ((format (archetype, string_index, first_to_check))) +#else /* !HAVE_ATTR_FORMAT */ +# define ATTR_FORMAT(archetype, string_index, first_to_check) /* empty */ +#endif /* !HAVE_ATTR_FORMAT */ + + +#if defined(DOXYGEN) +# define ATTR_UNUSED(x) x +#elif defined(__cplusplus) +# define ATTR_UNUSED(x) +#elif defined(HAVE_ATTR_UNUSED) +# define ATTR_UNUSED(x) x __attribute__((unused)) +#else /* !HAVE_ATTR_UNUSED */ +# define ATTR_UNUSED(x) x +#endif /* !HAVE_ATTR_UNUSED */ + + +#ifndef HAVE_FSEEKO +#define fseeko fseek +#define ftello ftell +#endif /* HAVE_FSEEKO */ + + +#ifndef MAXHOSTNAMELEN +#define MAXHOSTNAMELEN 256 +#endif + + +#ifndef HAVE_SNPRINTF +#define snprintf snprintf_unbound +#define vsnprintf vsnprintf_unbound +#include +int snprintf (char *str, size_t count, const char *fmt, ...); +int vsnprintf (char *str, size_t count, const char *fmt, va_list arg); +#endif /* HAVE_SNPRINTF */ + + +#ifndef HAVE_INET_PTON +#define inet_pton inet_pton_unbound +int inet_pton(int af, const char* src, void* dst); +#endif /* HAVE_INET_PTON */ + + +#ifndef HAVE_INET_NTOP +#define inet_ntop inet_ntop_unbound +const char *inet_ntop(int af, const void *src, char *dst, size_t size); +#endif + + +#ifndef HAVE_INET_ATON +#define inet_aton inet_aton_unbound +int inet_aton(const char *cp, struct in_addr *addr); +#endif + + +#ifndef HAVE_MEMMOVE +#define memmove memmove_unbound +void *memmove(void *dest, const void *src, size_t n); +#endif + + +#ifndef HAVE_STRLCPY +#define strlcpy strlcpy_unbound +size_t strlcpy(char *dst, const char *src, size_t siz); +#endif + + +#ifndef HAVE_GMTIME_R +#define gmtime_r gmtime_r_unbound +struct tm *gmtime_r(const time_t *timep, struct tm *result); +#endif + + +#ifndef HAVE_SLEEP +#define sleep(x) Sleep((x)*1000) /* on win32 */ +#endif /* HAVE_SLEEP */ + + +#ifndef HAVE_USLEEP +#define usleep(x) Sleep((x)/1000 + 1) /* on win32 */ +#endif /* HAVE_USLEEP */ + + +#ifndef HAVE_RANDOM +#define random rand /* on win32, for tests only (bad random) */ +#endif /* HAVE_RANDOM */ + + +#ifndef HAVE_SRANDOM +#define srandom(x) srand(x) /* on win32, for tests only (bad random) */ +#endif /* HAVE_SRANDOM */ + + +/* detect if we need to cast to unsigned int for FD_SET to avoid warnings */ +#ifdef HAVE_WINSOCK2_H +#define FD_SET_T (u_int) +#else +#define FD_SET_T +#endif + + +#ifndef IPV6_MIN_MTU +#define IPV6_MIN_MTU 1280 +#endif /* IPV6_MIN_MTU */ + + +#ifdef MEMCMP_IS_BROKEN +#include "compat/memcmp.h" +#define memcmp memcmp_unbound +int memcmp(const void *x, const void *y, size_t n); +#endif + + + +#ifndef HAVE_CTIME_R +#define ctime_r unbound_ctime_r +char *ctime_r(const time_t *timep, char *buf); +#endif + +#if !defined(HAVE_STRPTIME) || !defined(STRPTIME_WORKS) +#define strptime unbound_strptime +struct tm; +char *strptime(const char *s, const char *format, struct tm *tm); +#endif + +#if defined(HAVE_EVENT_H) && !defined(HAVE_EVENT_BASE_ONCE) && !(defined(HAVE_EV_LOOP) || defined(HAVE_EV_DEFAULT_LOOP)) && (defined(HAVE_PTHREAD) || defined(HAVE_SOLARIS_THREADS)) + /* using version of libevent that is not threadsafe. */ +# define LIBEVENT_SIGNAL_PROBLEM 1 +#endif + +#ifndef CHECKED_INET6 +# define CHECKED_INET6 +# ifdef AF_INET6 +# define INET6 +# else +# define AF_INET6 28 +# endif +#endif /* CHECKED_INET6 */ + +/* maximum nesting of included files */ +#define MAXINCLUDES 10 +#ifndef HAVE_GETADDRINFO +struct sockaddr_storage; +#include "compat/fake-rfc2553.h" +#endif + +#ifdef UNBOUND_ALLOC_STATS +# define malloc(s) unbound_stat_malloc_log(s, __FILE__, __LINE__, __func__) +# define calloc(n,s) unbound_stat_calloc_log(n, s, __FILE__, __LINE__, __func__) +# define free(p) unbound_stat_free_log(p, __FILE__, __LINE__, __func__) +# define realloc(p,s) unbound_stat_realloc_log(p, s, __FILE__, __LINE__, __func__) +void *unbound_stat_malloc(size_t size); +void *unbound_stat_calloc(size_t nmemb, size_t size); +void unbound_stat_free(void *ptr); +void *unbound_stat_realloc(void *ptr, size_t size); +void *unbound_stat_malloc_log(size_t size, const char* file, int line, + const char* func); +void *unbound_stat_calloc_log(size_t nmemb, size_t size, const char* file, + int line, const char* func); +void unbound_stat_free_log(void *ptr, const char* file, int line, + const char* func); +void *unbound_stat_realloc_log(void *ptr, size_t size, const char* file, + int line, const char* func); +#elif defined(UNBOUND_ALLOC_LITE) +# include "util/alloc.h" +#endif /* UNBOUND_ALLOC_LITE and UNBOUND_ALLOC_STATS */ + +/** default port for DNS traffic. */ +#define UNBOUND_DNS_PORT 53 +/** default port for unbound control traffic, registered port with IANA, + ub-dns-control 8953/tcp unbound dns nameserver control */ +#define UNBOUND_CONTROL_PORT 8953 +/** the version of unbound-control that this software implements */ +#define UNBOUND_CONTROL_VERSION 1 + + Added: head/contrib/unbound/doc/libunbound.3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/unbound/doc/libunbound.3 Sun Sep 15 00:40:21 2013 (r255581) @@ -0,0 +1,386 @@ +.TH "libunbound" "3" "Mar 21, 2013" "NLnet Labs" "unbound 1.4.20" +.\" +.\" libunbound.3 -- unbound library functions manual +.\" +.\" Copyright (c) 2007, NLnet Labs. All rights reserved. +.\" +.\" See LICENSE for the license. +.\" +.\" +.SH "NAME" +.LP +.B libunbound, +.B unbound.h, +.B ub_ctx, +.B ub_result, +.B ub_callback_t, +.B ub_ctx_create, +.B ub_ctx_delete, +.B ub_ctx_set_option, +.B ub_ctx_get_option, +.B ub_ctx_config, +.B ub_ctx_set_fwd, +.B ub_ctx_resolvconf, +.B ub_ctx_hosts, +.B ub_ctx_add_ta, +.B ub_ctx_add_ta_file, +.B ub_ctx_trustedkeys, +.B ub_ctx_debugout, +.B ub_ctx_debuglevel, +.B ub_ctx_async, +.B ub_poll, +.B ub_wait, +.B ub_fd, +.B ub_process, +.B ub_resolve, +.B ub_resolve_async, +.B ub_cancel, +.B ub_resolve_free, +.B ub_strerror, +.B ub_ctx_print_local_zones, +.B ub_ctx_zone_add, +.B ub_ctx_zone_remove, +.B ub_ctx_data_add, +.B ub_ctx_data_remove +\- Unbound DNS validating resolver 1.4.20 functions. +.SH "SYNOPSIS" +.LP +.B #include +.LP +\fIstruct ub_ctx *\fR +\fBub_ctx_create\fR(\fIvoid\fR); +.LP +\fIvoid\fR +\fBub_ctx_delete\fR(\fIstruct ub_ctx*\fR ctx); +.LP +\fIint\fR +\fBub_ctx_set_option\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR opt, \fIchar*\fR val); +.LP +\fIint\fR +\fBub_ctx_get_option\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR opt, \fIchar**\fR val); +.LP +\fIint\fR +\fBub_ctx_config\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR fname); +.LP +\fIint\fR +\fBub_ctx_set_fwd\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR addr); +.LP +\fIint\fR +\fBub_ctx_resolvconf\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR fname); +.LP +\fIint\fR +\fBub_ctx_hosts\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR fname); +.LP +\fIint\fR +\fBub_ctx_add_ta\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR ta); +.LP +\fIint\fR +\fBub_ctx_add_ta_file\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR fname); +.LP +\fIint\fR +\fBub_ctx_trustedkeys\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR fname); +.LP +\fIint\fR *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Sep 15 00:40:46 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B35738E2; Sun, 15 Sep 2013 00:40:46 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9F36B24B1; Sun, 15 Sep 2013 00:40:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8F0ekei091164; Sun, 15 Sep 2013 00:40:46 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8F0ekEo091162; Sun, 15 Sep 2013 00:40:46 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309150040.r8F0ekEo091162@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sun, 15 Sep 2013 00:40:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255582 - head/contrib/unbound/util X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Sep 2013 00:40:46 -0000 Author: des Date: Sun Sep 15 00:40:46 2013 New Revision: 255582 URL: http://svnweb.freebsd.org/changeset/base/255582 Log: Regenerated lexer and parser Approved by: re (blanket) Modified: head/contrib/unbound/util/configlexer.c head/contrib/unbound/util/configparser.c Modified: head/contrib/unbound/util/configlexer.c ============================================================================== --- head/contrib/unbound/util/configlexer.c Sun Sep 15 00:40:21 2013 (r255581) +++ head/contrib/unbound/util/configlexer.c Sun Sep 15 00:40:46 2013 (r255582) @@ -10,13 +10,23 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 36 +#define YY_FLEX_SUBMINOR_VERSION 37 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif /* First, we deal with platform-specific or compiler-specific issues. */ +#if defined(__FreeBSD__) +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS +#endif +#include +#include +#else +#define __dead2 +#endif + /* begin standard C headers. */ #include #include @@ -32,7 +42,8 @@ /* C99 systems have . Non-C99 systems may or may not. */ -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined(__FreeBSD__) || \ + (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. @@ -265,6 +276,7 @@ static YY_BUFFER_STATE * yy_buffer_stack #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ : NULL) +#define yy_current_buffer YY_CURRENT_BUFFER /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. @@ -350,7 +362,7 @@ extern char *yytext; static yy_state_type yy_get_previous_state (void ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); static int yy_get_next_buffer (void ); -static void yy_fatal_error (yyconst char msg[] ); +static void yy_fatal_error (yyconst char msg[] ) __dead2; /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. @@ -375,12 +387,12 @@ struct yy_trans_info static yyconst flex_int16_t yy_accept[1343] = { 0, 1, 1, 124, 124, 128, 128, 132, 132, 136, 136, - 1, 1, 143, 140, 1, 122, 122, 141, 2, 140, + 1, 1, 143, 140, 1, 122, 122, 141, 2, 141, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, - 140, 140, 140, 140, 140, 140, 140, 140, 141, 124, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 124, 125, 125, 126, 141, 128, 129, 129, 130, 141, 135, 132, 133, 133, 134, 141, 136, 137, 137, 138, 141, - 139, 123, 2, 127, 139, 141, 140, 0, 1, 2, + 139, 123, 2, 127, 141, 139, 140, 0, 1, 2, 2, 2, 2, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, @@ -532,14 +544,14 @@ static yyconst flex_int32_t yy_ec[256] = 1, 2, 1, 5, 6, 1, 1, 1, 7, 1, 1, 1, 1, 1, 8, 1, 1, 1, 1, 1, 9, 10, 1, 11, 1, 1, 1, 12, 1, 1, - 1, 1, 1, 1, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 1, 39, 1, 1, 1, 1, 40, 41, 42, 43, - - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 13, 1, 1, 1, 1, 14, 15, 16, 17, + + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -556,168 +568,165 @@ static yyconst flex_int32_t yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst flex_int32_t yy_meta[66] = +static yyconst flex_int32_t yy_meta[40] = { 0, 1, 2, 3, 4, 5, 1, 6, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 + 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; static yyconst flex_int16_t yy_base[1357] = { 0, - 0, 0, 63, 66, 69, 71, 77, 83, 88, 91, - 129, 135, 483, 443, 95, 3880, 3880, 3880, 107, 110, - 142, 140, 108, 50, 159, 147, 121, 148, 158, 174, - 191, 176, 190, 216, 225, 235, 214, 246, 116, 436, - 3880, 3880, 3880, 94, 402, 3880, 3880, 3880, 96, 335, - 329, 3880, 3880, 3880, 214, 282, 3880, 3880, 3880, 102, - 250, 3880, 289, 3880, 184, 293, 239, 297, 111, 0, - 301, 0, 0, 219, 223, 248, 273, 280, 285, 290, - 286, 283, 310, 294, 291, 297, 309, 316, 232, 319, - 338, 303, 334, 345, 326, 347, 349, 342, 350, 360, - - 343, 376, 370, 384, 371, 368, 187, 375, 374, 137, - 387, 403, 378, 390, 401, 386, 405, 400, 407, 229, - 154, 186, 199, 163, 448, 176, 115, 277, 90, 452, - 463, 0, 432, 441, 318, 433, 442, 439, 437, 465, - 462, 469, 493, 471, 455, 473, 453, 479, 490, 477, - 494, 496, 498, 510, 492, 517, 530, 526, 549, 522, - 525, 532, 542, 534, 536, 541, 544, 545, 556, 529, - 558, 552, 560, 559, 568, 578, 574, 561, 582, 591, - 603, 583, 599, 610, 607, 612, 608, 594, 611, 616, - 617, 618, 624, 640, 629, 635, 649, 637, 639, 658, - - 664, 643, 669, 657, 672, 677, 676, 663, 660, 665, - 680, 688, 679, 690, 698, 705, 699, 701, 703, 706, - 710, 738, 674, 720, 734, 716, 733, 736, 739, 752, - 747, 737, 756, 750, 767, 773, 761, 766, 777, 763, - 790, 771, 781, 791, 804, 797, 849, 800, 812, 789, - 814, 820, 809, 830, 826, 828, 839, 847, 831, 866, - 884, 857, 853, 859, 873, 883, 893, 881, 889, 896, - 892, 902, 909, 906, 910, 911, 916, 912, 926, 935, - 920, 937, 938, 948, 951, 934, 957, 3880, 959, 942, - 962, 965, 954, 3880, 952, 968, 953, 986, 990, 975, - - 978, 981, 1000, 992, 1001, 993, 995, 1041, 1012, 994, - 1033, 1023, 1025, 1019, 1034, 1036, 1046, 1039, 1029, 1050, - 1059, 1070, 1061, 1068, 1078, 1028, 1075, 1071, 1077, 1092, - 1081, 1084, 1085, 1098, 1102, 1103, 1113, 1122, 1121, 1124, - 1126, 1110, 1127, 1129, 1130, 1134, 1136, 1119, 1140, 1142, - 1148, 1168, 1151, 1154, 1146, 1161, 1166, 1167, 1173, 1178, - 1175, 1181, 1179, 1193, 1198, 1199, 1191, 1197, 1210, 1213, - 1212, 1233, 1194, 1218, 1229, 1234, 1239, 1244, 1230, 1231, - 1236, 1242, 1260, 1243, 1238, 1254, 1263, 1271, 1258, 1282, - 1280, 1281, 1276, 1269, 1287, 1290, 1289, 1295, 1296, 1307, - - 1308, 1311, 1316, 1279, 1327, 1328, 1329, 1309, 1339, 3880, - 1341, 1338, 1343, 1336, 1335, 3880, 3880, 1347, 3880, 3880, - 1363, 1367, 1374, 1353, 1404, 1371, 1365, 1357, 1390, 1385, - 1380, 1401, 1398, 1414, 1394, 1399, 1417, 1410, 1426, 1424, - 1429, 1425, 1432, 1438, 1445, 1449, 1450, 1452, 1443, 1457, - 1464, 1467, 1465, 1468, 1459, 3880, 1466, 1476, 1479, 1482, - 1499, 3880, 1487, 1491, 1484, 1493, 1496, 1492, 1509, 1503, - 1506, 1518, 1520, 1526, 1524, 1535, 1472, 1537, 1519, 1543, - 1545, 1536, 1559, 1562, 1553, 1548, 1554, 1573, 1558, 1574, - 1579, 1575, 1584, 1572, 1568, 1582, 1621, 1594, 1583, 1589, - - 1593, 1601, 1600, 1606, 1617, 1639, 1631, 1615, 1634, 1642, - 1649, 1644, 1641, 1656, 1650, 1658, 3880, 1664, 1677, 1659, - 1671, 1682, 1679, 1674, 1685, 1676, 1681, 1691, 1698, 3880, - 1692, 1701, 1694, 1708, 1719, 1720, 1730, 1734, 3880, 1736, - 1737, 1739, 1718, 1728, 1746, 1723, 1747, 1754, 1756, 1761, - 1753, 1763, 1760, 1774, 1764, 1765, 1773, 1783, 1780, 1790, - 1779, 1799, 1787, 1743, 1807, 1800, 1808, 1794, 1804, 1816, - 337, 1812, 1810, 1814, 1811, 3880, 76, 1834, 1817, 1827, - 1853, 1854, 1846, 1838, 1842, 1857, 1843, 1849, 1866, 1850, - 1863, 1877, 1867, 1883, 1873, 1893, 1878, 1881, 1891, 1889, - - 1884, 1900, 1880, 1911, 1907, 1909, 1923, 3880, 1875, 1912, - 1927, 1920, 1936, 1946, 1918, 1928, 1916, 1950, 1947, 1955, - 1956, 1961, 1958, 1953, 1965, 1969, 1970, 1977, 1991, 1979, - 3880, 1985, 1986, 1976, 1996, 1992, 1987, 2006, 1997, 2004, - 2025, 2026, 3880, 2027, 2034, 2016, 2040, 2021, 2044, 2045, - 2046, 2031, 2054, 2047, 2058, 2042, 2043, 2057, 3880, 2069, - 2079, 2075, 2083, 2084, 2070, 2077, 2092, 2074, 2072, 2087, - 2078, 2097, 2082, 2102, 2106, 2107, 2110, 2085, 3880, 2140, - 2112, 2123, 2137, 2125, 2127, 2144, 2131, 2153, 2104, 2136, - 2154, 2152, 2155, 2156, 2159, 2176, 2175, 2160, 2170, 2187, - - 2198, 2199, 2195, 3880, 2200, 2193, 2182, 2210, 2208, 2194, - 2197, 2211, 2209, 2202, 2212, 2214, 2225, 2226, 2232, 2227, - 2234, 2250, 2242, 2252, 2253, 2254, 2235, 2264, 2260, 2280, - 2268, 2271, 3880, 3880, 2281, 2269, 2272, 3880, 2285, 3880, - 2289, 3880, 2291, 2299, 2287, 2276, 2304, 2290, 2306, 2303, - 2318, 2298, 2311, 2330, 2316, 2332, 3880, 2321, 2326, 2341, - 2324, 2336, 2338, 2350, 2349, 2314, 2353, 2360, 2364, 3880, - 2367, 2357, 2375, 2328, 2385, 2371, 2369, 2383, 2387, 2381, - 2390, 2393, 2401, 2400, 2405, 2409, 2397, 2414, 2394, 2427, - 2415, 2417, 2419, 2424, 2436, 2438, 2432, 3880, 3880, 2449, - - 2452, 2441, 2451, 2442, 2471, 2463, 2462, 2473, 2465, 2468, - 2475, 2477, 2469, 2479, 2500, 2487, 2495, 3880, 2490, 2498, - 2509, 2505, 2519, 2510, 2526, 3880, 3880, 2525, 2518, 2521, - 2515, 2528, 2536, 3880, 2537, 2543, 2546, 2560, 2562, 2532, - 2549, 2564, 2569, 2561, 2568, 2570, 2581, 2571, 2585, 2584, - 2586, 2593, 2591, 2601, 2589, 2594, 2595, 2599, 2604, 2605, - 2623, 2624, 2609, 2626, 3880, 2637, 2616, 2639, 2613, 2644, - 2646, 2641, 2643, 2640, 2649, 2652, 2627, 2658, 2651, 2679, - 2661, 3880, 2674, 2671, 2684, 2685, 2666, 2689, 2676, 2693, - 3880, 2695, 2699, 2703, 2698, 2697, 2710, 2719, 2711, 2718, - - 2716, 2724, 2734, 2732, 2736, 2744, 2727, 2742, 2738, 2749, - 2757, 2768, 2758, 2776, 2761, 2774, 2765, 2755, 2785, 2764, - 2791, 2781, 3880, 2787, 2789, 2794, 2792, 2797, 2800, 2801, - 3880, 3880, 2784, 3880, 2814, 2804, 2821, 2823, 3880, 2809, - 3880, 3880, 2820, 2839, 2827, 2837, 2841, 2840, 3880, 2845, - 2831, 2854, 2835, 2848, 2857, 2861, 2859, 2865, 3880, 2871, - 2875, 2862, 2881, 2879, 2891, 2868, 2892, 2903, 2904, 2906, - 2895, 2896, 2914, 2910, 3880, 2907, 2921, 2925, 2917, 2937, - 2943, 2930, 2938, 2942, 2953, 3880, 2941, 2940, 2955, 3880, - 2957, 3880, 2969, 2934, 2970, 2928, 2974, 2951, 2972, 2984, - - 2987, 2976, 2993, 2986, 3880, 3880, 2995, 3000, 3006, 2996, - 3012, 3001, 3009, 3020, 3003, 3018, 3880, 3014, 3021, 3022, - 3030, 3032, 3880, 3046, 3047, 3041, 3045, 3059, 3055, 3061, - 3049, 3063, 3066, 3052, 3075, 3078, 3064, 3880, 3079, 3092, - 3076, 3094, 3081, 3090, 3097, 3112, 3104, 3088, 3109, 3880, - 3114, 3103, 3115, 3111, 3106, 3127, 3110, 3131, 3125, 3143, - 3134, 3141, 3142, 2999, 3153, 3880, 3140, 3880, 3154, 3164, - 3168, 3173, 3880, 3170, 3167, 3880, 3169, 3161, 3183, 3194, - 3186, 3202, 3199, 3187, 3201, 3188, 3206, 3190, 3197, 3880, - 3220, 3213, 3214, 3217, 3880, 3880, 3226, 3880, 3880, 3223, - - 3880, 3880, 3232, 3239, 3880, 3242, 3880, 3224, 3247, 3240, - 3230, 3238, 3880, 3255, 3880, 3880, 3253, 3259, 3246, 3257, - 3268, 3271, 3272, 3264, 3263, 3265, 3266, 3282, 3280, 3296, - 3288, 3275, 3286, 3298, 3290, 3302, 3292, 3307, 3313, 3320, - 3880, 3304, 3325, 3880, 3330, 3323, 3321, 3317, 3324, 3338, - 3337, 3346, 3359, 3343, 3341, 3347, 3880, 3352, 3880, 3880, - 3355, 3363, 3361, 3357, 3362, 3880, 3376, 3373, 3377, 3378, - 3880, 3880, 3880, 3390, 3374, 3386, 3401, 3403, 3389, 3880, - 3394, 3405, 3407, 3399, 3411, 3415, 3424, 3425, 3427, 3880, - 3426, 3417, 3880, 3437, 3430, 3436, 3438, 3448, 3441, 3880, - - 3442, 3452, 3446, 3451, 3455, 3454, 3475, 3880, 3457, 3470, - 3880, 3459, 3880, 3880, 3465, 3489, 3488, 3494, 3495, 3478, - 3486, 3503, 3501, 3502, 3880, 3880, 3498, 3880, 3880, 3492, - 3512, 3505, 3507, 3510, 3509, 3522, 3517, 3531, 3525, 3880, - 3547, 3880, 3528, 3548, 3552, 3551, 3880, 3553, 3549, 3532, - 3880, 3880, 3558, 3564, 3559, 3880, 3566, 3572, 3575, 3582, - 3596, 3591, 3585, 3584, 3598, 3599, 3587, 3588, 3605, 3611, - 3880, 3610, 3602, 3614, 3617, 3619, 3620, 3623, 3625, 3642, - 3641, 3648, 3632, 3880, 3640, 3650, 3656, 3657, 3658, 3659, - 3660, 3880, 3669, 3880, 3661, 3666, 3880, 3880, 3665, 3674, - - 3684, 3880, 3685, 3880, 3675, 3676, 3700, 3880, 3880, 3880, - 3679, 3880, 3701, 3880, 3694, 3692, 3880, 3681, 3709, 3710, - 3880, 3713, 3880, 3714, 3880, 3703, 3717, 3880, 3880, 3880, - 3880, 3716, 3719, 3723, 3724, 3880, 3734, 3711, 3729, 3735, - 3880, 3880, 3788, 3795, 3802, 3809, 3816, 82, 3823, 3830, - 3837, 3844, 3851, 3858, 3865, 3872 + 0, 0, 37, 40, 44, 51, 63, 75, 56, 68, + 87, 108, 2577, 2563, 50, 2683, 2683, 2683, 129, 94, + 70, 104, 122, 90, 92, 115, 126, 95, 84, 132, + 135, 138, 50, 142, 148, 156, 169, 164, 179, 2493, + 2683, 2683, 2683, 70, 2371, 2683, 2683, 2683, 42, 2326, + 1987, 2683, 2683, 2683, 197, 1681, 2683, 2683, 2683, 154, + 1191, 2683, 201, 2683, 205, 111, 1082, 211, 120, 0, + 222, 0, 0, 103, 158, 165, 149, 155, 168, 206, + 207, 198, 217, 209, 204, 208, 215, 177, 136, 227, + 228, 219, 232, 236, 235, 240, 245, 229, 246, 247, + + 250, 251, 254, 256, 258, 262, 259, 263, 266, 269, + 267, 276, 268, 271, 273, 49, 280, 281, 283, 853, + 297, 751, 301, 603, 311, 572, 360, 299, 298, 315, + 319, 0, 296, 312, 320, 314, 316, 318, 321, 327, + 323, 330, 342, 331, 326, 334, 335, 336, 338, 347, + 337, 353, 348, 344, 350, 355, 359, 372, 369, 367, + 357, 379, 377, 385, 386, 383, 387, 384, 388, 389, + 391, 392, 395, 396, 397, 398, 405, 402, 406, 403, + 414, 412, 420, 418, 428, 424, 425, 427, 430, 434, + 435, 432, 433, 441, 439, 444, 452, 448, 450, 454, + + 455, 458, 461, 460, 462, 466, 473, 469, 470, 472, + 477, 475, 478, 479, 485, 481, 482, 483, 486, 492, + 487, 504, 498, 508, 501, 502, 510, 513, 509, 515, + 520, 522, 528, 524, 525, 526, 527, 531, 534, 537, + 533, 536, 539, 540, 545, 546, 565, 551, 549, 553, + 556, 555, 562, 576, 563, 572, 573, 569, 578, 585, + 596, 586, 591, 595, 598, 597, 600, 601, 602, 605, + 608, 610, 609, 620, 623, 622, 621, 624, 630, 638, + 625, 632, 635, 639, 643, 634, 644, 2683, 649, 636, + 651, 652, 642, 2683, 653, 656, 658, 660, 662, 668, + + 664, 666, 667, 669, 674, 675, 677, 697, 680, 678, + 690, 681, 686, 683, 692, 689, 699, 702, 706, 707, + 709, 710, 712, 715, 716, 726, 722, 718, 724, 728, + 732, 733, 735, 738, 739, 743, 747, 753, 755, 757, + 763, 740, 759, 762, 765, 767, 768, 749, 775, 772, + 774, 778, 779, 787, 776, 789, 791, 793, 783, 794, + 797, 805, 801, 803, 808, 810, 784, 804, 814, 813, + 820, 827, 828, 812, 829, 835, 831, 836, 824, 837, + 839, 840, 841, 843, 844, 846, 848, 854, 850, 856, + 861, 862, 866, 851, 868, 871, 872, 873, 874, 883, + + 875, 884, 876, 886, 887, 894, 895, 889, 902, 2683, + 901, 904, 898, 905, 906, 2683, 2683, 890, 2683, 2683, + 909, 914, 915, 917, 922, 923, 925, 927, 930, 932, + 935, 936, 938, 944, 946, 939, 947, 948, 950, 954, + 955, 957, 961, 963, 964, 965, 968, 970, 972, 974, + 975, 981, 977, 988, 984, 2683, 986, 987, 991, 993, + 994, 2683, 995, 996, 998, 999, 1000, 1002, 1006, 1004, + 1007, 1014, 1013, 1009, 1012, 1019, 1029, 1030, 1025, 1028, + 1031, 1035, 1037, 1046, 1039, 1043, 1045, 1052, 1048, 1050, + 1054, 1051, 1055, 1057, 1060, 1063, 1085, 1065, 1062, 1064, + + 1067, 1070, 1072, 1074, 1078, 1092, 1097, 1075, 1071, 1103, + 1105, 1099, 1095, 1106, 1112, 1113, 2683, 1119, 1120, 1108, + 1115, 1116, 1122, 1124, 1129, 1126, 1130, 1132, 1138, 2683, + 1135, 1136, 1137, 1140, 1147, 1139, 1149, 1159, 2683, 1161, + 1162, 1155, 1157, 1164, 1165, 1167, 1169, 1170, 1171, 1173, + 1181, 1176, 1178, 1183, 1182, 1187, 1189, 1190, 1192, 1193, + 1194, 1199, 1204, 1210, 1213, 1201, 1218, 1195, 1207, 1211, + 1224, 1219, 1222, 1225, 1226, 2683, 174, 1227, 1228, 1229, + 1235, 1238, 1234, 1232, 1236, 1240, 1242, 1247, 1253, 1248, + 1254, 1255, 1256, 1259, 1258, 1261, 1267, 1268, 1269, 1270, + + 1271, 1272, 1273, 1274, 1279, 1278, 1286, 2683, 1292, 1285, + 1281, 1288, 1296, 1305, 1297, 1302, 1312, 1313, 1315, 1316, + 1317, 1319, 1309, 1322, 1330, 1331, 1327, 1329, 1328, 1334, + 2683, 1335, 1336, 1338, 1341, 1343, 1349, 1347, 1348, 1350, + 1353, 1359, 2683, 1303, 1360, 1354, 1364, 1367, 1369, 1371, + 1378, 1370, 1374, 1372, 1381, 1382, 1383, 1384, 2683, 1393, + 1397, 1394, 1401, 1395, 1398, 1402, 1406, 1403, 1385, 1412, + 1409, 1410, 1414, 1415, 1411, 1418, 1419, 1421, 2683, 1425, + 1422, 1427, 1428, 1434, 1426, 1435, 1436, 1438, 1441, 1447, + 1440, 1451, 1442, 1453, 1450, 1460, 1461, 1464, 1463, 1466, + + 1472, 1478, 1474, 2683, 1477, 1465, 1480, 1486, 1488, 1483, + 1489, 1490, 1491, 1498, 1492, 1494, 1495, 1496, 1503, 1500, + 1501, 1504, 1507, 1506, 1518, 1519, 1520, 1523, 1524, 1526, + 1525, 1532, 2683, 2683, 1533, 1534, 1541, 2683, 1543, 2683, + 1547, 2683, 1548, 1549, 1537, 1539, 1553, 1544, 1555, 1556, + 1560, 1557, 1562, 1563, 1565, 1566, 2683, 1568, 1569, 1574, + 1570, 1572, 1577, 1578, 1582, 1593, 1581, 1585, 1589, 2683, + 1591, 1594, 1600, 1607, 1604, 1598, 1606, 1608, 1609, 1610, + 1612, 1621, 1613, 1611, 1615, 1622, 1623, 1624, 1626, 1632, + 1630, 1631, 1634, 1638, 1640, 1645, 1643, 2683, 2683, 1649, + + 1641, 1646, 1652, 1656, 1658, 1660, 1668, 1665, 1666, 1671, + 1672, 1673, 1674, 1676, 1677, 1679, 1680, 2683, 1688, 1682, + 1696, 1697, 1706, 1689, 1704, 2683, 2683, 1685, 1692, 1708, + 1709, 1711, 1712, 2683, 1714, 1715, 1716, 1717, 1718, 1720, + 1710, 1724, 1732, 1735, 1725, 1736, 1743, 1740, 1741, 1744, + 1746, 1754, 1742, 1756, 1762, 1747, 1758, 1760, 1764, 1761, + 1766, 1770, 1772, 1771, 2683, 1778, 1775, 1784, 1776, 1783, + 1785, 1792, 1788, 1789, 1790, 1791, 1794, 1796, 1797, 1798, + 1804, 2683, 1803, 1805, 1806, 1808, 1814, 1818, 1816, 1821, + 2683, 1822, 1830, 1826, 1828, 1832, 1829, 1836, 1833, 1839, + + 1838, 1841, 1843, 1850, 1844, 1848, 1851, 1852, 1863, 1862, + 1869, 1870, 1867, 1876, 1873, 1874, 1875, 1877, 1886, 1882, + 1888, 1880, 2683, 1890, 1895, 1897, 1899, 1884, 1900, 1898, + 2683, 2683, 1891, 2683, 1908, 1901, 1912, 1913, 2683, 1911, + 2683, 2683, 1914, 1923, 1915, 1916, 1924, 1930, 2683, 1927, + 1925, 1935, 1931, 1937, 1938, 1939, 1933, 1940, 2683, 1941, + 1942, 1943, 1947, 1953, 1955, 1957, 1958, 1962, 1965, 1966, + 1959, 1968, 1974, 1973, 2683, 1972, 1975, 1980, 1981, 1985, + 1982, 1986, 1987, 1996, 1998, 2683, 1992, 1990, 2000, 2683, + 2002, 2683, 2006, 2004, 2009, 2014, 2011, 2022, 2007, 2015, + + 2023, 2017, 2025, 2027, 2683, 2683, 2031, 2033, 2036, 2034, + 2038, 2041, 2039, 2042, 2044, 2048, 2683, 2049, 2050, 2051, + 2052, 2053, 2683, 2056, 2057, 2058, 2062, 2065, 2077, 2079, + 2068, 2083, 2085, 2061, 2087, 2089, 2090, 2683, 2091, 2093, + 2094, 2098, 2099, 2095, 2100, 2104, 2107, 2102, 2111, 2683, + 2115, 2108, 2118, 2116, 2112, 2122, 2123, 2126, 2128, 2130, + 2129, 2131, 2132, 2138, 2059, 2683, 2136, 2683, 2137, 2142, + 2150, 2151, 2683, 2147, 2153, 2683, 2154, 2158, 2167, 2155, + 2161, 2169, 2170, 2171, 2172, 2173, 2174, 2182, 2178, 2683, + 2180, 2181, 2187, 2183, 2683, 2683, 2188, 2683, 2683, 2198, + + 2683, 2683, 2194, 2201, 2683, 2203, 2683, 2209, 2205, 2192, + 2190, 2210, 2683, 2214, 2683, 2683, 2211, 2217, 2207, 2218, + 2225, 2227, 2229, 2220, 2222, 2230, 2231, 2233, 2234, 2236, + 2237, 2238, 2239, 2244, 2241, 2247, 2248, 2250, 2251, 2253, + 2683, 2249, 2262, 2683, 2269, 2270, 2258, 2260, 2271, 2272, + 2274, 2276, 2282, 2280, 2281, 2283, 2683, 2285, 2683, 2683, + 2286, 2284, 2291, 2292, 2294, 2683, 2297, 2298, 2302, 2309, + 2683, 2683, 2683, 2310, 2299, 2305, 2313, 2315, 2316, 2683, + 2319, 2322, 2323, 2325, 2330, 2332, 2338, 2336, 2342, 2683, + 2339, 2337, 2683, 2343, 2345, 2347, 2348, 2350, 2352, 2683, + + 2353, 2354, 2360, 2355, 2363, 2366, 2365, 2683, 2367, 2368, + 2683, 2378, 2683, 2683, 2369, 2379, 2382, 2384, 2387, 2375, + 2388, 2395, 2392, 2394, 2683, 2683, 2397, 2683, 2683, 2396, + 2399, 2400, 2404, 2401, 2406, 2408, 2409, 2412, 2410, 2683, + 2413, 2683, 2414, 2423, 2420, 2418, 2683, 2425, 2426, 2429, + 2683, 2683, 2431, 2439, 2433, 2683, 2441, 2443, 2437, 2444, + 2448, 2449, 2445, 2450, 2455, 2457, 2451, 2453, 2465, 2466, + 2683, 2468, 2460, 2470, 2474, 2476, 2478, 2479, 2481, 2483, + 2484, 2486, 2487, 2683, 2488, 2489, 2499, 2504, 2508, 2490, + 2510, 2683, 2511, 2683, 2514, 2500, 2683, 2683, 2515, 2517, + + 2519, 2683, 2520, 2683, 2518, 2522, 2526, 2683, 2683, 2683, + 2528, 2683, 2529, 2683, 2532, 2534, 2683, 2535, 2537, 2540, + 2683, 2542, 2683, 2544, 2683, 2545, 2546, 2683, 2683, 2683, + 2683, 2548, 2550, 2555, 2551, 2683, 2556, 2558, 2559, 2562, + 2683, 2683, 2591, 2598, 2605, 2612, 2619, 94, 2626, 2633, + 2640, 2647, 2654, 2661, 2668, 2675 } ; static yyconst flex_int16_t yy_def[1357] = @@ -873,880 +882,612 @@ static yyconst flex_int16_t yy_def[1357] 1342, 1342, 1342, 1342, 1342, 1342 } ; -static yyconst flex_int16_t yy_nxt[3946] = +static yyconst flex_int16_t yy_nxt[2723] = { 0, 14, 15, 16, 17, 18, 19, 18, 14, 14, 14, - 14, 18, 20, 14, 21, 22, 23, 24, 14, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 14, 34, - 35, 36, 37, 38, 14, 14, 14, 14, 39, 20, - 14, 21, 22, 23, 24, 14, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 14, 34, 35, 36, 37, - 38, 14, 14, 14, 14, 41, 42, 43, 41, 42, - 43, 46, 47, 46, 47, 48, 86, 48, 51, 52, - 53, 54, 67, 18, 51, 52, 53, 54, 68, 18, - 57, 58, 59, 57, 58, 59, 69, 120, 120, 122, - - 70, 44, 122, 86, 44, 127, 127, 49, 72, 49, - 72, 72, 69, 72, 130, 55, 70, 67, 72, 67, - 67, 55, 67, 84, 74, 75, 60, 67, 130, 60, - 15, 16, 17, 62, 63, 64, 15, 16, 17, 62, - 63, 64, 76, 85, 176, 73, 68, 92, 68, 65, - 84, 74, 75, 128, 77, 65, 80, 120, 120, 68, - 81, 78, 89, 82, 93, 90, 83, 66, 79, 76, - 85, 87, 91, 66, 92, 68, 65, 126, 68, 88, - 68, 77, 65, 80, 94, 68, 68, 81, 78, 89, - 82, 93, 90, 83, 95, 79, 68, 68, 87, 91, - - 96, 125, 122, 98, 97, 122, 88, 99, 101, 133, - 102, 94, 68, 173, 68, 124, 103, 124, 124, 104, - 124, 95, 130, 100, 123, 68, 105, 96, 68, 68, - 98, 97, 106, 134, 99, 101, 133, 102, 135, 116, - 173, 109, 107, 103, 117, 108, 104, 113, 150, 114, - 100, 110, 68, 105, 68, 111, 112, 68, 118, 106, - 134, 68, 119, 68, 115, 135, 116, 121, 109, 107, - 68, 117, 108, 68, 113, 150, 114, 68, 110, 136, - 127, 127, 111, 112, 68, 118, 68, 137, 130, 119, - 72, 115, 72, 72, 129, 72, 129, 129, 67, 129, - - 67, 67, 72, 67, 72, 72, 136, 72, 67, 138, - 139, 68, 72, 140, 137, 141, 142, 143, 68, 145, - 128, 68, 146, 68, 68, 189, 147, 132, 68, 68, - 126, 149, 68, 155, 144, 68, 138, 139, 148, 73, - 140, 68, 141, 142, 151, 663, 145, 68, 68, 146, - 156, 160, 152, 147, 68, 153, 68, 68, 149, 158, - 155, 144, 161, 159, 68, 148, 163, 162, 164, 154, - 157, 151, 68, 125, 166, 68, 68, 156, 160, 152, - 68, 68, 153, 68, 165, 68, 158, 68, 68, 161, - 159, 167, 172, 163, 162, 164, 154, 157, 68, 168, - - 169, 166, 171, 175, 170, 174, 68, 180, 68, 68, - 177, 165, 68, 68, 68, 178, 68, 181, 167, 172, - 183, 184, 68, 185, 68, 68, 168, 169, 68, 171, - 175, 170, 174, 182, 180, 179, 186, 177, 68, 68, - 123, 68, 178, 68, 181, 68, 187, 183, 184, 124, - 185, 124, 124, 129, 124, 129, 129, 188, 129, 190, - 182, 191, 179, 186, 72, 192, 72, 72, 193, 72, - 130, 68, 194, 187, 121, 68, 196, 68, 195, 68, - 68, 68, 1342, 202, 188, 203, 190, 205, 191, 204, - 1342, 68, 192, 68, 206, 193, 1342, 1342, 1342, 1342, - - 68, 132, 208, 68, 1342, 195, 207, 68, 197, 68, - 202, 68, 203, 198, 205, 68, 204, 68, 199, 210, - 209, 206, 211, 214, 200, 201, 213, 212, 68, 208, - 68, 68, 68, 207, 68, 197, 68, 216, 217, 222, - 198, 224, 220, 225, 215, 199, 210, 209, 68, 211, - 214, 200, 201, 213, 212, 68, 218, 221, 223, 226, - 68, 227, 230, 68, 68, 217, 219, 68, 68, 220, - 68, 215, 68, 229, 68, 234, 228, 231, 232, 68, - 68, 238, 68, 68, 221, 223, 226, 68, 227, 230, - 68, 233, 239, 219, 68, 240, 68, 68, 68, 68, - - 229, 235, 234, 228, 231, 232, 68, 236, 237, 241, - 242, 244, 68, 243, 247, 1342, 68, 245, 233, 239, - 68, 68, 240, 253, 251, 248, 1342, 1342, 235, 68, - 252, 250, 68, 254, 236, 237, 241, 68, 244, 246, - 243, 68, 249, 258, 255, 68, 130, 259, 68, 68, - 68, 251, 248, 256, 68, 68, 68, 252, 250, 257, - 254, 260, 68, 265, 261, 262, 246, 68, 1342, 249, - 258, 255, 263, 68, 259, 68, 266, 68, 68, 264, - 256, 68, 267, 270, 268, 288, 257, 68, 260, 272, - 265, 261, 262, 269, 271, 68, 68, 273, 68, 263, - - 275, 68, 68, 68, 274, 278, 264, 68, 276, 267, - 68, 268, 68, 277, 68, 68, 272, 68, 68, 279, - 269, 271, 280, 283, 273, 1342, 68, 275, 68, 281, - 284, 274, 282, 285, 289, 276, 68, 68, 1342, 68, - 277, 68, 292, 68, 68, 1342, 279, 294, 68, 280, - 283, 286, 287, 293, 68, 295, 281, 284, 68, 282, - 285, 289, 290, 299, 296, 291, 1342, 1342, 298, 292, - 308, 68, 68, 297, 68, 68, 68, 68, 286, 287, - 293, 300, 295, 301, 1342, 68, 303, 302, 68, 290, - 68, 296, 291, 304, 68, 298, 305, 307, 306, 68, - - 297, 68, 1342, 310, 68, 68, 309, 1342, 300, 68, - 301, 68, 311, 303, 302, 68, 312, 1342, 313, 68, - 304, 325, 315, 305, 307, 306, 323, 130, 68, 68, - 310, 1342, 324, 309, 314, 68, 1342, 329, 68, 311, - 328, 1342, 68, 312, 326, 313, 327, 68, 325, 315, - 68, 1342, 68, 323, 331, 1342, 334, 330, 68, 324, - 1342, 314, 316, 317, 68, 332, 68, 328, 68, 68, - 1342, 326, 318, 327, 319, 320, 321, 68, 333, 322, - 339, 331, 335, 334, 330, 68, 340, 68, 338, 316, - 317, 68, 332, 336, 337, 68, 342, 68, 341, 318, - - 1342, 319, 320, 321, 68, 333, 322, 339, 343, 335, - 344, 68, 348, 340, 345, 338, 346, 352, 349, 68, - 1342, 68, 68, 342, 350, 341, 351, 68, 353, 347, - 68, 68, 354, 1342, 68, 343, 355, 344, 356, 348, - 68, 345, 357, 346, 68, 349, 1342, 68, 68, 68, - 68, 350, 358, 351, 68, 353, 347, 359, 68, 354, - 361, 360, 1342, 355, 68, 356, 363, 362, 1342, 364, - 1342, 365, 68, 68, 366, 68, 68, 369, 372, 358, - 68, 367, 375, 370, 359, 368, 68, 361, 360, 68, - 68, 68, 68, 363, 362, 68, 364, 68, 365, 371, - - 68, 366, 373, 68, 369, 372, 68, 376, 367, 374, - 370, 1342, 368, 68, 377, 378, 68, 380, 379, 68, - 381, 389, 1342, 1342, 68, 382, 371, 1342, 68, 373, - 68, 68, 68, 68, 376, 406, 374, 393, 68, 68, - 390, 377, 378, 388, 380, 379, 395, 381, 389, 391, - 68, 1342, 382, 383, 392, 394, 1342, 68, 384, 399, - 385, 68, 396, 68, 393, 398, 68, 68, 386, 397, - 388, 68, 68, 395, 68, 401, 391, 68, 387, 68, - 383, 392, 394, 400, 68, 384, 399, 385, 68, 396, - 402, 403, 398, 405, 404, 386, 397, 68, 407, 68, - - 408, 409, 401, 410, 411, 387, 68, 412, 68, 68, - 400, 413, 414, 68, 416, 68, 130, 402, 403, 68, - 405, 404, 68, 68, 417, 407, 415, 408, 409, 418, - 68, 411, 419, 421, 412, 420, 68, 425, 413, 414, - 68, 68, 422, 423, 424, 1342, 1342, 429, 68, 426, - 428, 68, 427, 415, 1342, 1342, 1342, 68, 430, 68, - 68, 436, 68, 435, 68, 68, 437, 68, 68, 422, - 423, 424, 68, 431, 68, 438, 426, 428, 68, 427, - 68, 439, 432, 441, 68, 430, 68, 433, 445, 68, - 435, 434, 68, 437, 443, 1342, 446, 442, 444, 68, - - 431, 457, 438, 440, 68, 68, 68, 447, 439, 432, - 441, 68, 448, 68, 433, 449, 68, 68, 434, 68, - 450, 443, 451, 446, 442, 444, 452, 453, 454, 68, - 440, 68, 68, 1342, 447, 68, 68, 68, 458, 448, - 455, 461, 449, 459, 456, 462, 1342, 450, 68, 451, - 68, 68, 463, 452, 453, 454, 68, 464, 460, 465, - 466, 1342, 1342, 470, 471, 458, 467, 68, 68, 68, - 459, 68, 68, 468, 68, 469, 68, 68, 474, 463, - 68, 68, 68, 472, 464, 460, 465, 466, 475, 473, - 470, 471, 68, 467, 476, 477, 68, 478, 68, 480, - - 468, 68, 469, 479, 490, 483, 1342, 68, 482, 68, - 472, 481, 485, 484, 68, 475, 473, 68, 68, 68, - 68, 476, 477, 486, 478, 68, 480, 68, 68, 488, - 479, 490, 483, 68, 68, 482, 489, 487, 481, 485, - 484, 494, 492, 491, 493, 68, 68, 68, 497, 68, - 486, 495, 1342, 498, 68, 500, 488, 1342, 1342, 496, - 506, 501, 1342, 489, 487, 130, 68, 68, 494, 492, - 491, 493, 499, 68, 68, 502, 68, 68, 495, 68, - 498, 68, 500, 503, 504, 68, 496, 513, 501, 505, - 1342, 68, 1342, 515, 514, 68, 517, 1342, 518, 499, - - 1342, 68, 502, 68, 516, 68, 1342, 1342, 522, 68, - 503, 504, 68, 519, 513, 1342, 505, 507, 68, 508, - 515, 514, 509, 68, 520, 518, 521, 510, 68, 525, - 523, 516, 68, 511, 512, 522, 68, 68, 526, 68, - 519, 529, 68, 530, 507, 531, 508, 524, 68, 509, - 527, 520, 68, 521, 510, 68, 525, 523, 528, 532, - 511, 512, 68, 68, 68, 526, 533, 68, 529, 534, - 68, 535, 536, 537, 524, 541, 68, 527, 539, 563, - 543, 68, 538, 68, 540, 528, 532, 68, 68, 542, - 68, 545, 1342, 533, 1342, 68, 534, 68, 535, 536, - - 537, 544, 68, 68, 68, 68, 68, 543, 546, 538, - 68, 540, 554, 547, 68, 551, 542, 68, 545, 549, - 68, 548, 68, 550, 555, 68, 552, 553, 544, 68, - 68, 68, 556, 1342, 68, 546, 557, 68, 558, 554, - 547, 68, 551, 560, 68, 559, 549, 68, 548, 565, - 550, 555, 564, 552, 553, 561, 68, 68, 68, 556, - 562, 567, 68, 557, 68, 558, 566, 571, 568, 570, - 560, 569, 559, 68, 68, 68, 565, 572, 573, 564, - 574, 68, 561, 68, 1342, 576, 68, 562, 567, 575, - 577, 68, 68, 566, 571, 568, 68, 68, 569, 579, - - 68, 578, 580, 581, 572, 573, 68, 582, 1342, 588, - 68, 68, 68, 68, 1342, 590, 575, 130, 591, 589, - 68, 68, 68, 594, 595, 593, 579, 68, 578, 580, - 581, 68, 68, 592, 582, 583, 588, 584, 68, 68, - 601, 585, 590, 586, 68, 591, 589, 600, 587, 1342, - 594, 596, 593, 68, 603, 68, 597, 602, 598, 68, - 592, 608, 583, 605, 584, 604, 606, 601, 585, 68, - 586, 610, 68, 609, 600, 587, 599, 68, 596, 68, - 68, 603, 68, 597, 602, 598, 607, 68, 68, 612, - 605, 611, 604, 606, 68, 613, 68, 68, 614, 615, - - 609, 617, 68, 599, 616, 621, 619, 618, 1342, 68, - 624, 620, 68, 607, 68, 68, 612, 68, 611, 68, - 68, 622, 613, 68, 625, 614, 615, 623, 617, 68, - 68, 616, 68, 619, 618, 626, 68, 624, 620, 68, - 627, 629, 628, 630, 635, 1342, 68, 631, 622, 632, - 656, 625, 633, 634, 623, 638, 68, 68, 68, 636, - 637, 68, 626, 639, 643, 1342, 68, 627, 68, 628, - 640, 635, 68, 641, 68, 68, 632, 68, 642, 633, - 634, 68, 638, 644, 68, 68, 636, 637, 646, 645, - 639, 68, 68, 647, 68, 648, 651, 640, 68, 68, - - 641, 68, 68, 68, 649, 642, 652, 650, 653, 655, - 644, 68, 68, 654, 657, 646, 645, 68, 68, 659, - 647, 68, 648, 651, 660, 68, 658, 1342, 68, 661, - 665, 649, 68, 652, 650, 653, 655, 68, 68, 662, - 654, 664, 68, 669, 666, 68, 68, 667, 68, 68, - 68, 660, 68, 658, 68, 68, 661, 665, 670, 668, - 671, 672, 673, 674, 1342, 68, 662, 675, 664, 677, - 669, 666, 68, 676, 667, 678, 68, 679, 1342, 680, - 68, 68, 698, 681, 68, 670, 668, 68, 68, 673, - 674, 68, 68, 682, 675, 68, 677, 683, 687, 684, - - 676, 68, 678, 685, 68, 68, 680, 688, 686, 693, - 681, 68, 690, 68, 691, 68, 68, 689, 68, 68, - 682, 68, 68, 707, 683, 687, 684, 68, 694, 68, - 685, 68, 692, 695, 688, 686, 693, 699, 68, 690, - 696, 691, 705, 697, 689, 68, 700, 68, 706, 68, - 68, 701, 702, 703, 68, 694, 68, 704, 68, 692, - 695, 68, 708, 709, 699, 68, 68, 696, 711, 705, - 697, 710, 715, 700, 68, 706, 716, 712, 701, 702, - 1342, 1342, 714, 713, 68, 68, 717, 1342, 68, 708, - 709, 68, 718, 68, 68, 711, 68, 1342, 710, 68, - - 724, 723, 1342, 68, 712, 726, 729, 68, 68, 714, - 713, 719, 725, 717, 68, 68, 720, 68, 721, 718, - 722, 727, 728, 68, 68, 68, 731, 724, 723, 68, - 68, 730, 726, 729, 68, 68, 733, 734, 719, 725, - 732, 735, 68, 720, 68, 721, 737, 722, 727, 728, - 736, 738, 739, 731, 68, 740, 1342, 742, 730, 68, - 748, 741, 743, 68, 68, 68, 745, 732, 735, 68, - 744, 747, 68, 737, 746, 749, 750, 736, 68, 739, - 68, 68, 68, 68, 68, 68, 751, 748, 741, 743, - 753, 752, 68, 745, 760, 68, 68, 744, 747, 756, - - 755, 746, 749, 757, 754, 758, 759, 68, 68, 761, - 68, 763, 68, 68, 764, 68, 68, 68, 752, 768, - 68, 68, 68, 68, 1342, 68, 756, 755, 762, 779, - 68, 754, 758, 759, 1342, 68, 761, 765, 763, 767, - 68, 764, 68, 766, 68, 68, 768, 769, 68, 771, - 68, 770, 772, 773, 774, 762, 779, 1342, 775, 776, - 777, 68, 780, 68, 765, 68, 767, 1342, 782, 68, - 766, 1342, 784, 783, 68, 68, 771, 788, 68, 772, - 773, 774, 68, 778, 781, 775, 776, 777, 785, 780, - 68, 68, 68, 68, 68, 782, 786, 68, 68, 784, - - 783, 787, 789, 790, 788, 791, 792, 793, 68, 804, - 778, 781, 796, 68, 68, 785, 794, 797, 795, 799, - 68, 798, 1342, 786, 800, 68, 803, 801, 787, 789, - 790, 68, 68, 68, 793, 68, 68, 68, 68, 796, - 68, 802, 805, 794, 806, 795, 68, 68, 68, 68, - 68, 800, 68, 803, 801, 807, 808, 809, 813, 810, - 811, 1342, 812, 68, 68, 68, 817, 814, 802, 805, - 68, 806, 68, 68, 816, 818, 819, 815, 822, 825, - 68, 824, 807, 808, 809, 813, 810, 811, 68, 812, - 68, 68, 68, 817, 814, 820, 826, 823, 68, 821, - - 827, 816, 68, 819, 815, 828, 68, 68, 824, 68, - 68, 829, 831, 830, 68, 1342, 833, 834, 68, 68, - 832, 850, 820, 68, 823, 68, 821, 68, 68, 68, - 836, 837, 828, 838, 835, 857, 68, 68, 829, 831, - 830, 68, 68, 833, 68, 839, 840, 832, 841, 68, - 842, 843, 68, 844, 68, 845, 68, 836, 837, 68, - 838, 835, 68, 848, 68, 849, 68, 846, 68, 847, - 68, 1342, 839, 840, 68, 841, 68, 842, 843, 68, - 844, 853, 845, 854, 851, 852, 1342, 68, 68, 856, - 848, 68, 849, 855, 846, 68, 847, 858, 68, 860, - - 859, 1342, 68, 862, 865, 68, 864, 68, 853, 68, - 854, 851, 852, 68, 861, 863, 856, 866, 872, 68, - 855, 68, 870, 68, 858, 68, 860, 859, 68, 867, - 862, 68, 68, 864, 873, 68, 868, 871, 68, 68, - 869, 861, 863, 68, 866, 872, 874, 68, 875, 870, - 877, 876, 68, 68, 878, 68, 867, 68, 879, 881, - 882, 880, 68, 868, 871, 68, 883, 869, 884, 890, - 68, 885, 886, 874, 68, 875, 68, 877, 876, 68, - 68, 878, 1342, 889, 891, 879, 881, 68, 880, 68, - 68, 887, 893, 883, 888, 884, 892, 901, 885, 886, - - 68, 68, 895, 68, 894, 896, 68, 68, 897, 68, - 889, 68, 898, 68, 899, 68, 903, 68, 887, 893, - 1342, 888, 904, 892, 900, 68, 905, 902, 68, 895, - 1342, 894, 896, 68, 906, 897, 68, 1342, 68, 898, - 907, 899, 910, 68, 909, 912, 908, 68, 68, 904, - 911, 900, 920, 68, 902, 913, 68, 68, 916, 68, - 1342, 906, 917, 68, 68, 914, 68, 907, 915, 910, - 68, 909, 912, 908, 68, 68, 918, 911, 919, 920, - 923, 68, 913, 921, 68, 916, 924, 68, 927, 917, - 922, 925, 914, 926, 928, 915, 935, 931, 68, 68, - - 68, 930, 68, 918, 932, 919, 68, 68, 68, 68, - 921, 933, 934, 924, 929, 939, 943, 922, 925, 68, - 926, 928, 68, 68, 68, 937, 936, 68, 930, 68, - 938, 68, 68, 68, 941, 942, 940, 68, 933, 68, - 944, 929, 68, 68, 945, 946, 947, 68, 951, 948, - 1342, 68, 937, 936, 68, 949, 1342, 938, 950, 958, - 1342, 68, 68, 940, 68, 68, 952, 944, 953, 959, - 1342, 955, 946, 954, 1342, 68, 948, 68, 68, 68, - 956, 68, 68, 957, 68, 950, 958, 68, 960, 68, - 68, 961, 962, 952, 963, 953, 68, 964, 955, 68, - - 954, 968, 965, 967, 68, 966, 972, 956, 975, 68, - 957, 971, 68, 969, 68, 960, 974, 68, 961, 962, - 970, 963, 68, 68, 964, 1342, 976, 68, 968, 965, - 967, 68, 966, 68, 973, 68, 68, 68, 971, 977, - 969, 68, 978, 974, 979, 989, 980, 970, 68, 68, - 981, 982, 983, 976, 68, 986, 68, 68, 984, 987, - 990, 973, 68, 985, 991, 68, 977, 988, 992, 978, - 68, 979, 68, 980, 68, 993, 68, 981, 982, 983, - 68, 994, 68, 995, 996, 984, 987, 68, 998, 997, - 985, 999, 1000, 68, 988, 68, 68, 1001, 1002, 68, - - 1005, 1004, 68, 68, 1003, 1006, 68, 1011, 994, 1007, - 1342, 996, 68, 1008, 68, 998, 997, 1009, 999, 68, - 1017, 1010, 68, 68, 1001, 68, 1012, 68, 1004, 68, - 68, 1003, 68, 1014, 1011, 68, 1007, 1013, 68, 68, - 1008, 1015, 68, 1016, 1009, 1018, 1019, 68, 1010, 1021, - 1342, 1023, 68, 1012, 1022, 1020, 1342, 1342, 68, 68, - 1014, 68, 1025, 1024, 1013, 68, 1026, 1027, 1015, 68, - 1016, 1028, 1018, 68, 1342, 68, 1021, 68, 68, 68, - 1029, 1022, 1020, 68, 1030, 1031, 68, 1033, 1034, 1025, - 1024, 1035, 68, 1026, 1027, 68, 1032, 68, 1028, 68, - - 68, 1036, 1038, 68, 1037, 1039, 68, 1029, 1040, 68, - 1342, 1030, 1031, 68, 1033, 1034, 1041, 68, 1035, 68, - 1042, 1046, 1043, 1032, 1044, 1342, 1047, 1045, 1036, 68, - 68, 1037, 1039, 68, 68, 1040, 1050, 1048, 1342, 1066, - 1051, 68, 68, 1041, 68, 68, 1049, 1042, 68, 1043, - 1055, 1044, 68, 1047, 1045, 68, 1054, 1052, 1057, 68, - 1053, 1056, 1068, 68, 1048, 1059, 68, 1051, 68, 1058, - 1064, 1060, 68, 1049, 1062, 68, 68, 1055, 68, 68, - 68, 68, 1061, 1054, 1052, 1057, 1063, 1053, 1056, 68, - 1065, 68, 1059, 68, 1067, 68, 1058, 1064, 1060, 1070, - - 1072, 1062, 1069, 1071, 1073, 1074, 1129, 68, 68, 1061, - 68, 1076, 68, 1063, 68, 1075, 1080, 1065, 1077, 1078, - 1342, 1067, 68, 1342, 68, 68, 1070, 1072, 1079, 1069, - 1071, 68, 1074, 68, 68, 1081, 1082, 68, 68, 68, - 1083, 68, 1075, 1080, 68, 1077, 1078, 68, 1084, 1085, - 68, 1086, 68, 1088, 1087, 1079, 68, 1090, 68, 68, - 68, 1091, 1081, 1082, 1089, 1092, 1095, 1083, 68, 1093, - 68, 1094, 1096, 1097, 1098, 1084, 1085, 1099, 1086, 68, - 1088, 1087, 1100, 68, 68, 68, 1101, 68, 1091, 1102, - 68, 1089, 1092, 68, 1103, 1104, 1093, 68, 1094, 68, - - 1097, 68, 68, 1105, 68, 1107, 1106, 1109, 1342, 1100, - 1108, 1110, 1342, 68, 68, 1113, 68, 68, 1114, 68, - 1115, 1103, 1104, 1342, 1111, 1116, 68, 1118, 68, 1120, - 68, 1119, 68, 1106, 1109, 68, 1342, 1108, 1110, 1112, - 1117, 68, 68, 1121, 68, 1114, 1122, 68, 68, 68, - 68, 1111, 68, 68, 1118, 1123, 1120, 1124, 1119, 1125, - 1126, 1127, 1128, 68, 1342, 68, 1112, 1117, 1130, 68, - 1121, 1131, 68, 1122, 1132, 1134, 1133, 1140, 68, 68, - 68, 68, 1123, 1139, 1124, 1135, 1125, 1126, 1127, 1128, - 1138, 68, 68, 1136, 1141, 1130, 1137, 1150, 1131, 68, - - 1143, 1132, 68, 1133, 1140, 68, 68, 68, 68, 1142, - 1139, 68, 1135, 1144, 1151, 1145, 1147, 1138, 1146, 1148, - 1136, 68, 1149, 1137, 68, 68, 68, 1143, 68, 1153, - 1155, 1161, 68, 1154, 1157, 68, 1142, 68, 1156, 68, - 68, 1151, 1145, 1147, 68, 1146, 1148, 1152, 1158, 1149, - 1159, 68, 68, 1160, 1165, 68, 1153, 1155, 68, 1162, - 1154, 68, 68, 1164, 68, 1156, 1166, 1163, 68, 1167, - 68, 1169, 1168, 1170, 1152, 1158, 68, 68, 68, 1171, - 68, 1165, 1172, 1173, 68, 68, 1162, 1174, 1176, 1177, - 1164, 68, 1175, 68, 1163, 68, 1167, 68, 1169, 1168, - - 1170, 68, 68, 68, 68, 1178, 68, 1180, 1181, 68, - 68, 1179, 1182, 68, 1174, 1176, 1177, 1183, 68, 1175, - 68, 1187, 1184, 1188, 68, 1185, 68, 1186, 68, 1189, - 68, 1190, 1178, 1191, 68, 1181, 68, 1192, 1179, 1182, - 68, 1193, 68, 1194, 1183, 68, 1196, 1195, 1187, 1184, - 1188, 68, 1185, 1197, 1186, 68, 1189, 1200, 68, 68, - 1191, 68, 68, 68, 1192, 1198, 1201, 1199, 68, 1202, - 1194, 1203, 1208, 1196, 1195, 68, 68, 1207, 1204, 68, - 1197, 68, 1205, 1209, 68, 68, 1206, 1211, 1213, 1214, - 68, 1210, 1198, 68, 1199, 68, 1202, 68, 1203, 68, - - 68, 68, 1215, 1212, 1207, 1204, 1217, 1216, 1220, 1205, - 1209, 68, 68, 1206, 68, 68, 68, 1218, 1210, 1219, - 1221, 1222, 1225, 1223, 68, 1224, 1226, 68, 68, 1215, - 1212, 1227, 68, 1217, 1216, 1220, 1228, 68, 1229, 68, - 1231, 68, 1230, 68, 1218, 68, 1219, 1221, 1222, 68, - 1223, 1232, 1224, 68, 1233, 68, 1234, 1240, 1235, 1342, - 1236, 1237, 68, 68, 68, 68, 1242, 1231, 68, 1230, - 1247, 1241, 1238, 1243, 68, 68, 68, 1245, 1232, 68, - 68, 1233, 1239, 1234, 68, 1235, 68, 1236, 1237, 68, - 68, 1244, 68, 68, 1246, 68, 1248, 68, 1241, 1238, - - 1243, 1249, 1250, 68, 1245, 1251, 1252, 1253, 68, 1239, - 1255, 1254, 1256, 68, 1342, 1258, 68, 1257, 1244, 1262, - 1342, 1246, 1259, 1248, 68, 1264, 68, 68, 1249, 1250, - 68, 1260, 68, 68, 1253, 1261, 68, 1263, 1254, 68, - 68, 68, 1258, 68, 1257, 68, 1262, 68, 68, 1259, - 68, 1267, 1264, 1265, 1266, 68, 1268, 1270, 1260, 1271, - 68, 1269, 1261, 68, 1263, 1342, 68, 1272, 1276, 68, - 68, 1273, 1275, 1274, 1277, 1342, 1278, 1342, 1267, 1279, - 1265, 1266, 1280, 1268, 1270, 68, 68, 68, 1269, 68, - 68, 68, 1281, 1342, 1272, 1276, 68, 68, 1273, 1275, - - 1274, 1277, 68, 1278, 68, 1282, 1279, 1284, 1283, 1280, - 68, 1285, 1286, 68, 1287, 1289, 1292, 1288, 1291, 1281, - 68, 1294, 68, 68, 1290, 68, 68, 1293, 1297, 68, - 1298, 1342, 1282, 1295, 68, 1283, 68, 68, 1285, 1286, - 68, 1287, 1289, 68, 1288, 1291, 1300, 1296, 68, 68, - 1299, 1290, 68, 1302, 1293, 68, 1301, 68, 68, 1304, - 1295, 68, 1305, 68, 1303, 1306, 1307, 1308, 1309, 1310, - 68, 1312, 1314, 1300, 1296, 1311, 1342, 1299, 68, 68, - 68, 1313, 1315, 1301, 1316, 1317, 68, 1321, 68, 1305, - 1323, 1303, 1306, 1307, 68, 68, 68, 68, 68, 68, - - 1318, 1319, 1311, 68, 68, 1325, 1320, 68, 1313, 1315, - 1327, 1316, 68, 68, 68, 1322, 1324, 68, 1326, 68, - 1328, 1329, 68, 68, 1330, 1331, 1332, 1318, 1319, 1333, - 68, 1334, 68, 1320, 1336, 1342, 1339, 1327, 68, 68, - 1342, 68, 1322, 1324, 1337, 1326, 1341, 68, 68, 68, - 1335, 68, 68, 1332, 68, 68, 1333, 68, 1334, 1340, - 1338, 68, 68, 1339, 1342, 1342, 1342, 68, 1342, 1342, - 1342, 1337, 68, 68, 1342, 1342, 1342, 1335, 1342, 1342, - 1342, 1342, 1342, 1342, 1342, 1342, 1340, 1338, 40, 40, - 40, 40, 40, 40, 40, 45, 45, 45, 45, 45, - - 45, 45, 50, 50, 50, 50, 50, 50, 50, 56, - 56, 56, 56, 56, 56, 56, 61, 61, 61, 61, - 61, 61, 61, 71, 71, 1342, 71, 71, 71, 71, - 120, 120, 1342, 1342, 1342, 120, 120, 122, 122, 1342, - 1342, 122, 1342, 122, 124, 1342, 1342, 1342, 1342, 1342, - 124, 127, 127, 1342, 1342, 1342, 127, 127, 129, 1342, - 1342, 1342, 1342, 1342, 129, 131, 131, 1342, 131, 131, - 131, 131, 72, 72, 1342, 72, 72, 72, 72, 13, - 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, + 14, 18, 20, 21, 14, 22, 23, 24, 25, 14, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 14, + 35, 36, 37, 38, 39, 14, 14, 14, 14, 41, + 42, 43, 41, 42, 43, 122, 46, 47, 122, 44, + 48, 69, 44, 46, 47, 70, 49, 48, 57, 58, + 59, 68, 68, 49, 51, 52, 53, 54, 60, 18, + 57, 58, 59, 120, 120, 55, 51, 52, 53, 54, + 60, 18, 68, 101, 183, 74, 75, 55, 15, 16, + 17, 62, 63, 64, 67, 67, 68, 67, 67, 65, + + 67, 93, 68, 76, 68, 67, 84, 68, 66, 15, + 16, 17, 62, 63, 64, 68, 68, 77, 134, 86, + 65, 69, 92, 130, 78, 70, 85, 68, 87, 66, + 72, 79, 72, 72, 68, 72, 88, 133, 68, 80, + 72, 73, 89, 81, 68, 90, 82, 68, 68, 83, + 68, 98, 91, 150, 68, 99, 95, 127, 127, 94, + 68, 68, 96, 102, 137, 106, 97, 68, 68, 103, + 68, 100, 104, 109, 135, 107, 68, 68, 108, 105, + 68, 68, 113, 110, 114, 138, 130, 111, 112, 68, + 116, 68, 118, 149, 139, 117, 119, 136, 124, 115, + + 124, 124, 72, 124, 72, 72, 129, 72, 129, 129, + 68, 129, 67, 132, 67, 67, 68, 67, 68, 68, + 68, 68, 67, 72, 143, 72, 72, 68, 72, 68, + 140, 68, 142, 72, 73, 145, 146, 141, 147, 68, + 68, 68, 144, 152, 68, 148, 153, 68, 68, 156, + 155, 158, 68, 151, 163, 159, 161, 68, 68, 68, + 154, 160, 68, 68, 162, 164, 68, 167, 68, 157, + 68, 68, 165, 169, 68, 68, 176, 170, 68, 68, + 68, 68, 166, 68, 168, 68, 173, 172, 68, 178, + 171, 177, 68, 68, 174, 68, 175, 184, 180, 181, + + 120, 120, 127, 127, 122, 185, 182, 122, 130, 179, + 130, 187, 124, 186, 124, 124, 129, 124, 129, 129, + 72, 129, 72, 72, 68, 72, 68, 189, 68, 188, + 68, 132, 68, 68, 194, 68, 191, 196, 68, 68, + 195, 190, 68, 68, 202, 192, 68, 68, 68, 68, + 68, 204, 206, 193, 68, 207, 68, 203, 197, 68, + 68, 213, 68, 198, 209, 68, 216, 68, 199, 68, + 205, 68, 128, 208, 200, 201, 218, 210, 212, 68, + 211, 68, 214, 215, 68, 217, 222, 219, 220, 68, + 221, 68, 224, 225, 223, 68, 68, 68, 68, 68, + + 68, 68, 226, 68, 68, 227, 229, 68, 68, 68, + 68, 231, 238, 234, 68, 68, 228, 68, 68, 232, + 240, 242, 241, 230, 68, 245, 68, 233, 236, 237, + 68, 235, 68, 244, 239, 247, 68, 130, 248, 68, + 68, 253, 68, 243, 68, 68, 68, 68, 246, 250, + 252, 68, 254, 68, 258, 249, 68, 259, 251, 255, + 68, 257, 68, 256, 68, 260, 68, 68, 266, 263, + 68, 264, 68, 68, 68, 268, 261, 262, 68, 265, + 270, 68, 68, 269, 68, 68, 267, 68, 275, 68, + 68, 68, 278, 68, 68, 68, 279, 68, 68, 68, + + 272, 271, 274, 277, 68, 273, 280, 283, 276, 288, + 68, 285, 281, 68, 68, 282, 68, 284, 286, 287, + 68, 68, 68, 289, 294, 68, 295, 68, 296, 292, + 290, 293, 68, 291, 68, 299, 68, 68, 68, 68, + 68, 302, 301, 68, 308, 68, 68, 297, 68, 68, + 309, 68, 68, 303, 298, 307, 300, 68, 68, 304, + 313, 68, 305, 68, 306, 130, 312, 68, 68, 310, + 324, 311, 315, 126, 68, 68, 314, 68, 323, 316, + 317, 68, 327, 329, 68, 68, 325, 326, 68, 318, + 68, 319, 320, 321, 328, 330, 322, 68, 68, 331, + + 332, 333, 335, 68, 334, 336, 337, 68, 68, 68, + 68, 342, 68, 68, 68, 125, 343, 68, 338, 339, + 68, 68, 68, 340, 341, 350, 346, 349, 345, 348, + 352, 344, 68, 68, 68, 68, 68, 68, 354, 347, + 353, 351, 68, 356, 68, 357, 68, 68, 68, 355, + 68, 68, 361, 359, 68, 68, 68, 364, 358, 360, + 362, 68, 365, 68, 68, 68, 369, 363, 68, 366, + 68, 367, 68, 368, 68, 375, 68, 373, 68, 68, + 68, 68, 374, 378, 372, 370, 68, 68, 371, 68, + 68, 380, 68, 68, 376, 68, 379, 390, 68, 393, + + 377, 68, 68, 381, 68, 395, 389, 391, 382, 68, + 383, 68, 388, 392, 68, 384, 396, 385, 68, 68, + 394, 68, 68, 397, 68, 386, 401, 68, 130, 398, + 68, 402, 405, 406, 68, 387, 68, 399, 68, 410, + 68, 400, 404, 403, 68, 68, 407, 68, 408, 409, + 68, 68, 68, 414, 416, 68, 411, 412, 417, 68, + 418, 68, 413, 123, 415, 68, 419, 68, 420, 68, + 421, 68, 425, 422, 68, 68, 423, 68, 424, 68, + 68, 428, 429, 426, 68, 427, 68, 68, 68, 430, + 68, 68, 435, 432, 436, 68, 68, 437, 433, 68, + + 431, 68, 434, 68, 438, 68, 68, 439, 442, 68, + 441, 443, 445, 68, 450, 68, 68, 68, 447, 446, + 68, 444, 68, 448, 68, 68, 68, 449, 453, 440, + 451, 452, 68, 458, 455, 457, 68, 454, 456, 68, + 68, 68, 461, 68, 459, 463, 462, 68, 68, 68, + 464, 68, 68, 68, 465, 68, 68, 469, 68, 460, + 68, 474, 68, 68, 470, 121, 68, 466, 68, 476, + 467, 471, 468, 68, 68, 473, 472, 477, 68, 478, + 68, 475, 480, 68, 68, 68, 68, 68, 68, 483, + 482, 485, 484, 481, 479, 68, 68, 489, 68, 130, + + 486, 68, 68, 488, 491, 487, 68, 68, 497, 492, + 68, 493, 490, 68, 68, 495, 68, 68, 68, 502, + 498, 68, 494, 496, 506, 500, 68, 68, 499, 68, + 503, 505, 504, 501, 68, 68, 507, 68, 508, 68, + 513, 509, 68, 517, 68, 516, 510, 68, 68, 519, + 68, 68, 511, 512, 518, 514, 68, 521, 68, 68, + 68, 522, 68, 526, 515, 520, 68, 68, 525, 68, + 531, 523, 530, 68, 529, 68, 68, 68, 524, 532, + 68, 527, 68, 533, 68, 528, 68, 68, 534, 68, + 535, 537, 539, 68, 538, 541, 68, 540, 68, 68, + + 68, 543, 536, 68, 545, 68, 68, 68, 68, 547, + 68, 68, 68, 544, 68, 542, 68, 548, 68, 68, + 546, 68, 555, 554, 68, 68, 68, 560, 549, 550, + 551, 68, 553, 552, 556, 558, 563, 68, 557, 559, + 68, 68, 68, 68, 561, 562, 564, 68, 567, 68, + 569, 68, 566, 570, 571, 68, 565, 68, 68, 574, + 68, 576, 68, 68, 68, 577, 130, 68, 568, 68, + 573, 579, 68, 572, 68, 68, 68, 68, 578, 68, + 575, 588, 68, 68, 68, 595, 68, 68, 580, 582, + 68, 590, 594, 591, 68, 602, 581, 68, 593, 589, + + 583, 601, 584, 592, 68, 596, 585, 68, 586, 68, + 597, 68, 598, 587, 600, 68, 603, 68, 68, 605, + 68, 606, 604, 608, 68, 68, 610, 68, 68, 609, + 599, 68, 68, 614, 68, 611, 68, 607, 68, 612, + 613, 68, 68, 615, 68, 621, 617, 68, 68, 68, + 68, 68, 68, 620, 624, 616, 619, 625, 618, 68, + 627, 68, 628, 623, 626, 622, 629, 68, 630, 68, + 634, 68, 631, 68, 68, 632, 68, 68, 633, 68, + 637, 68, 68, 68, 635, 68, 639, 640, 68, 641, + 68, 642, 643, 68, 68, 68, 636, 644, 646, 68, + + 638, 68, 68, 130, 68, 68, 68, 68, 645, 651, + 652, 68, 647, 68, 654, 650, 68, 656, 648, 68, + 657, 649, 68, 68, 653, 68, 660, 655, 658, 659, + 68, 68, 663, 661, 68, 662, 68, 68, 68, 68, + 68, 68, 671, 665, 68, 672, 68, 68, 68, 664, + 68, 673, 68, 668, 68, 669, 666, 676, 674, 68, + 68, 670, 675, 667, 679, 68, 68, 68, 68, 677, + 68, 68, 682, 68, 678, 681, 684, 686, 680, 68, + 68, 68, 68, 68, 68, 68, 68, 683, 687, 685, + 68, 68, 694, 68, 690, 688, 689, 68, 68, 698, + + 68, 700, 691, 693, 68, 692, 695, 697, 68, 68, + 696, 699, 703, 702, 68, 68, 704, 68, 735, 707, + 701, 68, 705, 706, 68, 68, 708, 68, 68, 68, + 711, 68, 709, 710, 68, 713, 712, 715, 716, 68, + 68, 68, 68, 68, 717, 718, 68, 68, 68, 719, + 68, 724, 714, 68, 720, 68, 721, 723, 722, 68, + 68, 68, 68, 725, 733, 68, 68, 727, 726, 729, + 734, 68, 68, 730, 728, 738, 68, 736, 731, 68, + 740, 68, 68, 68, 68, 737, 68, 732, 741, 742, + 68, 744, 745, 68, 68, 68, 68, 68, 746, 739, + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Sep 15 01:29:00 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D750FC46; Sun, 15 Sep 2013 01:29:00 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B5843265E; Sun, 15 Sep 2013 01:29:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8F1T0gq014390; Sun, 15 Sep 2013 01:29:00 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8F1T0f6014382; Sun, 15 Sep 2013 01:29:00 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309150129.r8F1T0f6014382@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sun, 15 Sep 2013 01:29:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255583 - head/contrib/unbound/libunbound X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Sep 2013 01:29:00 -0000 Author: des Date: Sun Sep 15 01:29:00 2013 New Revision: 255583 URL: http://svnweb.freebsd.org/changeset/base/255583 Log: Move more prototypes around, and remove one that wasn't used. Approved by: re (blanket) Modified: head/contrib/unbound/libunbound/libworker.h head/contrib/unbound/libunbound/worker.h Modified: head/contrib/unbound/libunbound/libworker.h ============================================================================== --- head/contrib/unbound/libunbound/libworker.h Sun Sep 15 00:40:46 2013 (r255582) +++ head/contrib/unbound/libunbound/libworker.h Sun Sep 15 01:29:00 2013 (r255583) @@ -109,52 +109,6 @@ int libworker_fg(struct ub_ctx* ctx, str /** cleanup the cache to remove all rrset IDs from it, arg is libworker */ void libworker_alloc_cleanup(void* arg); -/** - * Worker service routine to send serviced queries to authoritative servers. - * @param qname: query name. (host order) - * @param qnamelen: length in bytes of qname, including trailing 0. - * @param qtype: query type. (host order) - * @param qclass: query class. (host order) - * @param flags: host order flags word, with opcode and CD bit. - * @param dnssec: if set, EDNS record will have DO bit set. - * @param want_dnssec: signatures needed. - * @param addr: where to. - * @param addrlen: length of addr. - * @param zone: delegation point name. - * @param zonelen: length of zone name wireformat dname. - * @param q: wich query state to reactivate upon return. - * @return: false on failure (memory or socket related). no query was - * sent. - */ -struct outbound_entry* libworker_send_query(uint8_t* qname, size_t qnamelen, - uint16_t qtype, uint16_t qclass, uint16_t flags, int dnssec, - int want_dnssec, struct sockaddr_storage* addr, socklen_t addrlen, - uint8_t* zone, size_t zonelen, struct module_qstate* q); - -/** process incoming replies from the network */ -int libworker_handle_reply(struct comm_point* c, void* arg, int error, - struct comm_reply* reply_info); - -/** process incoming serviced query replies from the network */ -int libworker_handle_service_reply(struct comm_point* c, void* arg, int error, - struct comm_reply* reply_info); - -/** handle control command coming into server */ -void libworker_handle_control_cmd(struct tube* tube, uint8_t* msg, size_t len, - int err, void* arg); - -/** handle opportunity to write result back */ -void libworker_handle_result_write(struct tube* tube, uint8_t* msg, size_t len, - int err, void* arg); - -/** mesh callback with fg results */ -void libworker_fg_done_cb(void* arg, int rcode, ldns_buffer* buf, - enum sec_status s, char* why_bogus); - -/** mesh callback with bg results */ -void libworker_bg_done_cb(void* arg, int rcode, ldns_buffer* buf, - enum sec_status s, char* why_bogus); - /** * fill result from parsed message, on error fills servfail * @param res: is clear at start, filled in at end. Modified: head/contrib/unbound/libunbound/worker.h ============================================================================== --- head/contrib/unbound/libunbound/worker.h Sun Sep 15 00:40:46 2013 (r255582) +++ head/contrib/unbound/libunbound/worker.h Sun Sep 15 01:29:00 2013 (r255583) @@ -42,6 +42,53 @@ #ifndef LIBUNBOUND_WORKER_H #define LIBUNBOUND_WORKER_H +struct comm_reply; +struct comm_point; +struct module_qstate; +struct tube; + +/** + * Worker service routine to send serviced queries to authoritative servers. + * @param qname: query name. (host order) + * @param qnamelen: length in bytes of qname, including trailing 0. + * @param qtype: query type. (host order) + * @param qclass: query class. (host order) + * @param flags: host order flags word, with opcode and CD bit. + * @param dnssec: if set, EDNS record will have DO bit set. + * @param want_dnssec: signatures needed. + * @param addr: where to. + * @param addrlen: length of addr. + * @param zone: delegation point name. + * @param zonelen: length of zone name wireformat dname. + * @param q: wich query state to reactivate upon return. + * @return: false on failure (memory or socket related). no query was + * sent. + */ +struct outbound_entry* libworker_send_query(uint8_t* qname, size_t qnamelen, + uint16_t qtype, uint16_t qclass, uint16_t flags, int dnssec, + int want_dnssec, struct sockaddr_storage* addr, socklen_t addrlen, + uint8_t* zone, size_t zonelen, struct module_qstate* q); + +/** process incoming replies from the network */ +int libworker_handle_reply(struct comm_point* c, void* arg, int error, + struct comm_reply* reply_info); + +/** process incoming serviced query replies from the network */ +int libworker_handle_service_reply(struct comm_point* c, void* arg, int error, + struct comm_reply* reply_info); + +/** handle control command coming into server */ +void libworker_handle_control_cmd(struct tube* tube, uint8_t* msg, size_t len, + int err, void* arg); + +/** mesh callback with fg results */ +void libworker_fg_done_cb(void* arg, int rcode, ldns_buffer* buf, + enum sec_status s, char* why_bogus); + +/** mesh callback with bg results */ +void libworker_bg_done_cb(void* arg, int rcode, ldns_buffer* buf, + enum sec_status s, char* why_bogus); + /** * Worker signal handler function. User argument is the worker itself. * @param sig: signal number. From owner-svn-src-all@FreeBSD.ORG Sun Sep 15 01:31:56 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A3528DAB; Sun, 15 Sep 2013 01:31:56 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 828E7269F; Sun, 15 Sep 2013 01:31:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8F1VuSr017582; Sun, 15 Sep 2013 01:31:56 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8F1Vtj3017571; Sun, 15 Sep 2013 01:31:55 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309150131.r8F1Vtj3017571@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sun, 15 Sep 2013 01:31:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255584 - head/contrib/unbound/libunbound X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Sep 2013 01:31:56 -0000 Author: des Date: Sun Sep 15 01:31:55 2013 New Revision: 255584 URL: http://svnweb.freebsd.org/changeset/base/255584 Log: Wholesale constification. Approved by: re (blanket) Modified: head/contrib/unbound/libunbound/context.c head/contrib/unbound/libunbound/context.h head/contrib/unbound/libunbound/libunbound.c head/contrib/unbound/libunbound/unbound.h Modified: head/contrib/unbound/libunbound/context.c ============================================================================== --- head/contrib/unbound/libunbound/context.c Sun Sep 15 01:29:00 2013 (r255583) +++ head/contrib/unbound/libunbound/context.c Sun Sep 15 01:31:55 2013 (r255584) @@ -124,7 +124,7 @@ find_id(struct ub_ctx* ctx, int* id) } struct ctx_query* -context_new(struct ub_ctx* ctx, char* name, int rrtype, int rrclass, +context_new(struct ub_ctx* ctx, const char* name, int rrtype, int rrclass, ub_callback_t cb, void* cbarg) { struct ctx_query* q = (struct ctx_query*)calloc(1, sizeof(*q)); Modified: head/contrib/unbound/libunbound/context.h ============================================================================== --- head/contrib/unbound/libunbound/context.h Sun Sep 15 01:29:00 2013 (r255583) +++ head/contrib/unbound/libunbound/context.h Sun Sep 15 01:31:55 2013 (r255584) @@ -234,8 +234,8 @@ void context_query_delete(struct ctx_que * @param cbarg: user arg for async queries. * @return new ctx_query or NULL for malloc failure. */ -struct ctx_query* context_new(struct ub_ctx* ctx, char* name, int rrtype, - int rrclass, ub_callback_t cb, void* cbarg); +struct ctx_query* context_new(struct ub_ctx* ctx, const char* name, + int rrtype, int rrclass, ub_callback_t cb, void* cbarg); /** * Get a new alloc. Creates a new one or uses a cached one. Modified: head/contrib/unbound/libunbound/libunbound.c ============================================================================== --- head/contrib/unbound/libunbound/libunbound.c Sun Sep 15 01:29:00 2013 (r255583) +++ head/contrib/unbound/libunbound/libunbound.c Sun Sep 15 01:31:55 2013 (r255584) @@ -229,7 +229,7 @@ ub_ctx_delete(struct ub_ctx* ctx) } int -ub_ctx_set_option(struct ub_ctx* ctx, char* opt, char* val) +ub_ctx_set_option(struct ub_ctx* ctx, const char* opt, const char* val) { lock_basic_lock(&ctx->cfglock); if(ctx->finalized) { @@ -245,7 +245,7 @@ ub_ctx_set_option(struct ub_ctx* ctx, ch } int -ub_ctx_get_option(struct ub_ctx* ctx, char* opt, char** str) +ub_ctx_get_option(struct ub_ctx* ctx, const char* opt, char** str) { int r; lock_basic_lock(&ctx->cfglock); @@ -258,7 +258,7 @@ ub_ctx_get_option(struct ub_ctx* ctx, ch } int -ub_ctx_config(struct ub_ctx* ctx, char* fname) +ub_ctx_config(struct ub_ctx* ctx, const char* fname) { lock_basic_lock(&ctx->cfglock); if(ctx->finalized) { @@ -274,7 +274,7 @@ ub_ctx_config(struct ub_ctx* ctx, char* } int -ub_ctx_add_ta(struct ub_ctx* ctx, char* ta) +ub_ctx_add_ta(struct ub_ctx* ctx, const char* ta) { char* dup = strdup(ta); if(!dup) return UB_NOMEM; @@ -294,7 +294,7 @@ ub_ctx_add_ta(struct ub_ctx* ctx, char* } int -ub_ctx_add_ta_file(struct ub_ctx* ctx, char* fname) +ub_ctx_add_ta_file(struct ub_ctx* ctx, const char* fname) { char* dup = strdup(fname); if(!dup) return UB_NOMEM; @@ -314,7 +314,7 @@ ub_ctx_add_ta_file(struct ub_ctx* ctx, c } int -ub_ctx_trustedkeys(struct ub_ctx* ctx, char* fname) +ub_ctx_trustedkeys(struct ub_ctx* ctx, const char* fname) { char* dup = strdup(fname); if(!dup) return UB_NOMEM; @@ -547,7 +547,7 @@ ub_wait(struct ub_ctx* ctx) } int -ub_resolve(struct ub_ctx* ctx, char* name, int rrtype, +ub_resolve(struct ub_ctx* ctx, const char* name, int rrtype, int rrclass, struct ub_result** result) { struct ctx_query* q; @@ -591,7 +591,7 @@ ub_resolve(struct ub_ctx* ctx, char* nam } int -ub_resolve_async(struct ub_ctx* ctx, char* name, int rrtype, +ub_resolve_async(struct ub_ctx* ctx, const char* name, int rrtype, int rrclass, void* mydata, ub_callback_t callback, int* async_id) { struct ctx_query* q; @@ -732,7 +732,7 @@ ub_strerror(int err) } int -ub_ctx_set_fwd(struct ub_ctx* ctx, char* addr) +ub_ctx_set_fwd(struct ub_ctx* ctx, const char* addr) { struct sockaddr_storage storage; socklen_t stlen; @@ -804,7 +804,7 @@ ub_ctx_set_fwd(struct ub_ctx* ctx, char* } int -ub_ctx_resolvconf(struct ub_ctx* ctx, char* fname) +ub_ctx_resolvconf(struct ub_ctx* ctx, const char* fname) { FILE* in; int numserv = 0; @@ -890,7 +890,7 @@ ub_ctx_resolvconf(struct ub_ctx* ctx, ch } int -ub_ctx_hosts(struct ub_ctx* ctx, char* fname) +ub_ctx_hosts(struct ub_ctx* ctx, const char* fname) { FILE* in; char buf[1024], ldata[1024]; Modified: head/contrib/unbound/libunbound/unbound.h ============================================================================== --- head/contrib/unbound/libunbound/unbound.h Sun Sep 15 01:29:00 2013 (r255583) +++ head/contrib/unbound/libunbound/unbound.h Sun Sep 15 01:31:55 2013 (r255584) @@ -245,7 +245,7 @@ void ub_ctx_delete(struct ub_ctx* ctx); * @param val: value of the option. * @return: 0 if OK, else error. */ -int ub_ctx_set_option(struct ub_ctx* ctx, char* opt, char* val); +int ub_ctx_set_option(struct ub_ctx* ctx, const char* opt, const char* val); /** * Get an option from the context. @@ -261,7 +261,7 @@ int ub_ctx_set_option(struct ub_ctx* ctx * returned in the string. * @return 0 if OK else an error code (malloc failure, syntax error). */ -int ub_ctx_get_option(struct ub_ctx* ctx, char* opt, char** str); +int ub_ctx_get_option(struct ub_ctx* ctx, const char* opt, char** str); /** * setup configuration for the given context. @@ -273,7 +273,7 @@ int ub_ctx_get_option(struct ub_ctx* ctx * routines exist. * @return: 0 if OK, else error. */ -int ub_ctx_config(struct ub_ctx* ctx, char* fname); +int ub_ctx_config(struct ub_ctx* ctx, const char* fname); /** * Set machine to forward DNS queries to, the caching resolver to use. @@ -292,7 +292,7 @@ int ub_ctx_config(struct ub_ctx* ctx, ch * If the addr is NULL, forwarding is disabled. * @return 0 if OK, else error. */ -int ub_ctx_set_fwd(struct ub_ctx* ctx, char* addr); +int ub_ctx_set_fwd(struct ub_ctx* ctx, const char* addr); /** * Read list of nameservers to use from the filename given. @@ -308,7 +308,7 @@ int ub_ctx_set_fwd(struct ub_ctx* ctx, c * @param fname: file name string. If NULL "/etc/resolv.conf" is used. * @return 0 if OK, else error. */ -int ub_ctx_resolvconf(struct ub_ctx* ctx, char* fname); +int ub_ctx_resolvconf(struct ub_ctx* ctx, const char* fname); /** * Read list of hosts from the filename given. @@ -321,7 +321,7 @@ int ub_ctx_resolvconf(struct ub_ctx* ctx * @param fname: file name string. If NULL "/etc/hosts" is used. * @return 0 if OK, else error. */ -int ub_ctx_hosts(struct ub_ctx* ctx, char* fname); +int ub_ctx_hosts(struct ub_ctx* ctx, const char* fname); /** * Add a trust anchor to the given context. @@ -334,7 +334,7 @@ int ub_ctx_hosts(struct ub_ctx* ctx, cha * [domainname] [TTL optional] [type] [class optional] [rdata contents] * @return 0 if OK, else error. */ -int ub_ctx_add_ta(struct ub_ctx* ctx, char* ta); +int ub_ctx_add_ta(struct ub_ctx* ctx, const char* ta); /** * Add trust anchors to the given context. @@ -345,7 +345,7 @@ int ub_ctx_add_ta(struct ub_ctx* ctx, ch * @param fname: filename of file with keyfile with trust anchors. * @return 0 if OK, else error. */ -int ub_ctx_add_ta_file(struct ub_ctx* ctx, char* fname); +int ub_ctx_add_ta_file(struct ub_ctx* ctx, const char* fname); /** * Add trust anchors to the given context. @@ -357,7 +357,7 @@ int ub_ctx_add_ta_file(struct ub_ctx* ct * anchors. * @return 0 if OK, else error. */ -int ub_ctx_trustedkeys(struct ub_ctx* ctx, char* fname); +int ub_ctx_trustedkeys(struct ub_ctx* ctx, const char* fname); /** * Set debug output (and error output) to the specified stream. @@ -442,7 +442,7 @@ int ub_process(struct ub_ctx* ctx); * in that case (out of memory). * @return 0 if OK, else error. */ -int ub_resolve(struct ub_ctx* ctx, char* name, int rrtype, +int ub_resolve(struct ub_ctx* ctx, const char* name, int rrtype, int rrclass, struct ub_result** result); /** @@ -473,7 +473,7 @@ int ub_resolve(struct ub_ctx* ctx, char* * cancel the query. * @return 0 if OK, else error. */ -int ub_resolve_async(struct ub_ctx* ctx, char* name, int rrtype, +int ub_resolve_async(struct ub_ctx* ctx, const char* name, int rrtype, int rrclass, void* mydata, ub_callback_t callback, int* async_id); /** From owner-svn-src-all@FreeBSD.ORG Sun Sep 15 01:32:33 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 42ABBEE4; Sun, 15 Sep 2013 01:32:33 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1538226A5; Sun, 15 Sep 2013 01:32:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8F1WWdp017892; Sun, 15 Sep 2013 01:32:32 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8F1WWxA017891; Sun, 15 Sep 2013 01:32:32 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309150132.r8F1WWxA017891@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sun, 15 Sep 2013 01:32:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255585 - head/contrib/unbound/smallapp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Sep 2013 01:32:33 -0000 Author: des Date: Sun Sep 15 01:32:32 2013 New Revision: 255585 URL: http://svnweb.freebsd.org/changeset/base/255585 Log: Add missing #includes and fix some incorrect definitions. Approved by: re (blanket) Modified: head/contrib/unbound/smallapp/worker_cb.c Modified: head/contrib/unbound/smallapp/worker_cb.c ============================================================================== --- head/contrib/unbound/smallapp/worker_cb.c Sun Sep 15 01:31:55 2013 (r255584) +++ head/contrib/unbound/smallapp/worker_cb.c Sun Sep 15 01:32:32 2013 (r255585) @@ -41,12 +41,11 @@ * linked into the resulting program. */ #include "config.h" +#include "libunbound/context.h" +#include "libunbound/worker.h" +#include "util/fptr_wlist.h" #include "util/log.h" #include "services/mesh.h" -struct comm_reply; -struct comm_point; -struct module_qstate; -struct tube; void worker_handle_control_cmd(struct tube* ATTR_UNUSED(tube), uint8_t* ATTR_UNUSED(buffer), size_t ATTR_UNUSED(len), @@ -103,9 +102,10 @@ void worker_sighandler(int ATTR_UNUSED(s struct outbound_entry* worker_send_query(uint8_t* ATTR_UNUSED(qname), size_t ATTR_UNUSED(qnamelen), uint16_t ATTR_UNUSED(qtype), uint16_t ATTR_UNUSED(qclass), uint16_t ATTR_UNUSED(flags), - int ATTR_UNUSED(dnssec), int ATTR_UNUSED(want_dnssec), + int ATTR_UNUSED(dnssec), int ATTR_UNUSED(want_dnssec), struct sockaddr_storage* ATTR_UNUSED(addr), - socklen_t ATTR_UNUSED(addrlen), struct module_qstate* ATTR_UNUSED(q)) + socklen_t ATTR_UNUSED(addrlen), uint8_t* ATTR_UNUSED(zone), + size_t ATTR_UNUSED(zonelen), struct module_qstate* ATTR_UNUSED(q)) { log_assert(0); return 0; @@ -136,7 +136,8 @@ struct outbound_entry* libworker_send_qu uint16_t ATTR_UNUSED(qclass), uint16_t ATTR_UNUSED(flags), int ATTR_UNUSED(dnssec), int ATTR_UNUSED(want_dnssec), struct sockaddr_storage* ATTR_UNUSED(addr), - socklen_t ATTR_UNUSED(addrlen), struct module_qstate* ATTR_UNUSED(q)) + socklen_t ATTR_UNUSED(addrlen), uint8_t* ATTR_UNUSED(zone), + size_t ATTR_UNUSED(zonelen), struct module_qstate* ATTR_UNUSED(q)) { log_assert(0); return 0; From owner-svn-src-all@FreeBSD.ORG Sun Sep 15 01:44:08 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4124111A; Sun, 15 Sep 2013 01:44:08 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2ECE626FB; Sun, 15 Sep 2013 01:44:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8F1i8QM023262; Sun, 15 Sep 2013 01:44:08 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8F1i88g023261; Sun, 15 Sep 2013 01:44:08 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309150144.r8F1i88g023261@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sun, 15 Sep 2013 01:44:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255586 - head/contrib/unbound/smallapp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Sep 2013 01:44:08 -0000 Author: des Date: Sun Sep 15 01:44:07 2013 New Revision: 255586 URL: http://svnweb.freebsd.org/changeset/base/255586 Log: Massive constification + solve an alignment issue by using a union. Approved by: re (blanket) Modified: head/contrib/unbound/smallapp/unbound-anchor.c Modified: head/contrib/unbound/smallapp/unbound-anchor.c ============================================================================== --- head/contrib/unbound/smallapp/unbound-anchor.c Sun Sep 15 01:32:32 2013 (r255585) +++ head/contrib/unbound/smallapp/unbound-anchor.c Sun Sep 15 01:44:07 2013 (r255586) @@ -244,7 +244,7 @@ get_builtin_ds(void) /** print hex data */ static void -print_data(char* msg, char* data, int len) +print_data(const char* msg, const char* data, int len) { int i; printf("%s: ", msg); @@ -268,8 +268,8 @@ ub_ctx_error_exit(struct ub_ctx* ctx, co * Create a new unbound context with the commandline settings applied */ static struct ub_ctx* -create_unbound_context(char* res_conf, char* root_hints, char* debugconf, - int ip4only, int ip6only) +create_unbound_context(const char* res_conf, const char* root_hints, + const char* debugconf, int ip4only, int ip6only) { int r; struct ub_ctx* ctx = ub_ctx_create(); @@ -306,7 +306,7 @@ create_unbound_context(char* res_conf, c /** printout certificate in detail */ static void -verb_cert(char* msg, X509* x) +verb_cert(const char* msg, X509* x) { if(verb == 0 || verb == 1) return; if(verb == 2) { @@ -322,7 +322,7 @@ verb_cert(char* msg, X509* x) /** printout certificates in detail */ static void -verb_certs(char* msg, STACK_OF(X509)* sk) +verb_certs(const char* msg, STACK_OF(X509)* sk) { int i, num = sk_X509_num(sk); if(verb == 0 || verb == 1) return; @@ -360,7 +360,7 @@ read_cert_bio(BIO* bio) /* read the certificate file */ static STACK_OF(X509)* -read_cert_file(char* file) +read_cert_file(const char* file) { STACK_OF(X509)* sk; FILE* in; @@ -435,7 +435,7 @@ read_builtin_cert(void) /** read update cert file or use builtin */ static STACK_OF(X509)* -read_cert_or_builtin(char* file) +read_cert_or_builtin(const char* file) { STACK_OF(X509) *sk = read_cert_file(file); if(!sk) { @@ -459,7 +459,7 @@ do_list_builtin(void) /** printout IP address with message */ static void -verb_addr(char* msg, struct ip_list* ip) +verb_addr(const char* msg, struct ip_list* ip) { if(verb) { char out[100]; @@ -526,7 +526,7 @@ RR_to_ip(int tp, char* data, int len, in /** Resolve name, type, class and add addresses to iplist */ static void -resolve_host_ip(struct ub_ctx* ctx, char* host, int port, int tp, int cl, +resolve_host_ip(struct ub_ctx* ctx, const char* host, int port, int tp, int cl, struct ip_list** head) { struct ub_result* res = NULL; @@ -561,29 +561,27 @@ resolve_host_ip(struct ub_ctx* ctx, char /** parse a text IP address into a sockaddr */ static struct ip_list* -parse_ip_addr(char* str, int port) +parse_ip_addr(const char* str, int port) { socklen_t len = 0; - struct sockaddr_storage* addr = NULL; - struct sockaddr_in6 a6; - struct sockaddr_in a; + union { + struct sockaddr_in6 a6; + struct sockaddr_in a; + } addr; struct ip_list* ip; uint16_t p = (uint16_t)port; - memset(&a6, 0, sizeof(a6)); - memset(&a, 0, sizeof(a)); + memset(&addr, 0, sizeof(addr)); - if(inet_pton(AF_INET6, str, &a6.sin6_addr) > 0) { + if(inet_pton(AF_INET6, str, &addr.a6.sin6_addr) > 0) { /* it is an IPv6 */ - a6.sin6_family = AF_INET6; - a6.sin6_port = (in_port_t)htons(p); - addr = (struct sockaddr_storage*)&a6; - len = (socklen_t)sizeof(struct sockaddr_in6); + addr.a6.sin6_family = AF_INET6; + addr.a6.sin6_port = (in_port_t)htons(p); + len = (socklen_t)sizeof(addr.a6); } - if(inet_pton(AF_INET, str, &a.sin_addr) > 0) { + if(inet_pton(AF_INET, str, &addr.a.sin_addr) > 0) { /* it is an IPv4 */ - a.sin_family = AF_INET; - a.sin_port = (in_port_t)htons(p); - addr = (struct sockaddr_storage*)&a; + addr.a.sin_family = AF_INET; + addr.a.sin_port = (in_port_t)htons(p); len = (socklen_t)sizeof(struct sockaddr_in); } if(!len) return NULL; @@ -593,7 +591,7 @@ parse_ip_addr(char* str, int port) exit(0); } ip->len = len; - memmove(&ip->addr, addr, len); + memmove(&ip->addr, &addr, len); if(verb) printf("server address is %s\n", str); return ip; } @@ -613,8 +611,8 @@ parse_ip_addr(char* str, int port) * @return list of IP addresses. */ static struct ip_list* -resolve_name(char* host, int port, char* res_conf, char* root_hints, - char* debugconf, int ip4only, int ip6only) +resolve_name(const char* host, int port, const char* res_conf, + const char* root_hints, const char* debugconf, int ip4only, int ip6only) { struct ub_ctx* ctx; struct ip_list* list = NULL; @@ -801,7 +799,7 @@ TLS_shutdown(int fd, SSL* ssl, SSL_CTX* /** write a line over SSL */ static int -write_ssl_line(SSL* ssl, char* str, char* sec) +write_ssl_line(SSL* ssl, const char* str, const char* sec) { char buf[1024]; size_t l; @@ -1020,7 +1018,7 @@ do_chunked_read(SSL* ssl) /** start HTTP1.1 transaction on SSL */ static int -write_http_get(SSL* ssl, char* pathname, char* urlname) +write_http_get(SSL* ssl, const char* pathname, const char* urlname) { if(write_ssl_line(ssl, "GET /%s HTTP/1.1", pathname) && write_ssl_line(ssl, "Host: %s", urlname) && @@ -1091,7 +1089,7 @@ read_http_result(SSL* ssl) /** https to an IP addr, return BIO with pathname or NULL */ static BIO* -https_to_ip(struct ip_list* ip, char* pathname, char* urlname) +https_to_ip(struct ip_list* ip, const char* pathname, const char* urlname) { int fd; SSL* ssl; @@ -1131,7 +1129,7 @@ https_to_ip(struct ip_list* ip, char* pa * @return a memory BIO with the file in it. */ static BIO* -https(struct ip_list* ip_list, char* pathname, char* urlname) +https(struct ip_list* ip_list, const char* pathname, const char* urlname) { struct ip_list* ip; BIO* bio = NULL; @@ -1213,7 +1211,7 @@ xml_selectbio(struct xml_data* data, con * NOT zero terminated. * @param len: length of this part of the data. */ -void +static void xml_charhandle(void *userData, const XML_Char *s, int len) { struct xml_data* data = (struct xml_data*)userData; @@ -1256,7 +1254,7 @@ xml_charhandle(void *userData, const XML * @return the value or NULL. (ptr into atts). */ static const XML_Char* -find_att(const XML_Char **atts, XML_Char* name) +find_att(const XML_Char **atts, const XML_Char* name) { int i; for(i=0; atts[i]; i+=2) { @@ -1370,7 +1368,7 @@ handle_keydigest(struct xml_data* data, /** See if XML element equals the zone name */ static int -xml_is_zone_name(BIO* zone, char* name) +xml_is_zone_name(BIO* zone, const char* name) { char buf[1024]; char* z = NULL; @@ -1602,8 +1600,6 @@ xml_parse(BIO* xml, time_t now) XML_ParserFree(parser); if(verb >= 4) { - char* pp = NULL; - int len; (void)BIO_seek(data.ds, 0); len = BIO_get_mem_data(data.ds, &pp); printf("got DS bio %d: '", len); @@ -1646,7 +1642,7 @@ get_usage_of_ex(X509* cert) /** get valid signers from the list of signers in the signature */ static STACK_OF(X509)* -get_valid_signers(PKCS7* p7, char* p7signer) +get_valid_signers(PKCS7* p7, const char* p7signer) { int i; STACK_OF(X509)* validsigners = sk_X509_new_null(); @@ -1729,7 +1725,7 @@ get_valid_signers(PKCS7* p7, char* p7sig /** verify a PKCS7 signature, false on failure */ static int -verify_p7sig(BIO* data, BIO* p7s, STACK_OF(X509)* trust, char* p7signer) +verify_p7sig(BIO* data, BIO* p7s, STACK_OF(X509)* trust, const char* p7signer) { PKCS7* p7; X509_STORE *store = X509_STORE_new(); @@ -1807,7 +1803,7 @@ verify_p7sig(BIO* data, BIO* p7s, STACK_ /** write unsigned root anchor file, a 5011 revoked tp */ static void -write_unsigned_root(char* root_anchor_file) +write_unsigned_root(const char* root_anchor_file) { FILE* out; time_t now = time(NULL); @@ -1833,7 +1829,7 @@ write_unsigned_root(char* root_anchor_fi /** write root anchor file */ static void -write_root_anchor(char* root_anchor_file, BIO* ds) +write_root_anchor(const char* root_anchor_file, BIO* ds) { char* pp = NULL; int len; @@ -1859,8 +1855,8 @@ write_root_anchor(char* root_anchor_file /** Perform the verification and update of the trustanchor file */ static void -verify_and_update_anchor(char* root_anchor_file, BIO* xml, BIO* p7s, - STACK_OF(X509)* cert, char* p7signer) +verify_and_update_anchor(const char* root_anchor_file, BIO* xml, BIO* p7s, + STACK_OF(X509)* cert, const char* p7signer) { BIO* ds; @@ -1888,10 +1884,11 @@ static void do_wsa_cleanup(void) { WSACl /** perform actual certupdate work */ static int -do_certupdate(char* root_anchor_file, char* root_cert_file, - char* urlname, char* xmlname, char* p7sname, char* p7signer, - char* res_conf, char* root_hints, char* debugconf, - int ip4only, int ip6only, int port, struct ub_result* dnskey) +do_certupdate(const char* root_anchor_file, const char* root_cert_file, + const char* urlname, const char* xmlname, const char* p7sname, + const char* p7signer, const char* res_conf, const char* root_hints, + const char* debugconf, int ip4only, int ip6only, int port, + struct ub_result* dnskey) { STACK_OF(X509)* cert; BIO *xml, *p7s; @@ -1945,7 +1942,7 @@ do_certupdate(char* root_anchor_file, ch * 2 if it is OK. */ static int -try_read_anchor(char* file) +try_read_anchor(const char* file) { int empty = 1; char line[10240]; @@ -1989,7 +1986,7 @@ try_read_anchor(char* file) /** Write the builtin root anchor to a file */ static void -write_builtin_anchor(char* file) +write_builtin_anchor(const char* file) { const char* builtin_root_anchor = get_builtin_ds(); FILE* out = fopen(file, "w"); @@ -2015,7 +2012,7 @@ write_builtin_anchor(char* file) * @return 0 if trustpoint is insecure, 1 on success. Exit on failure. */ static int -provide_builtin(char* root_anchor_file, int* used_builtin) +provide_builtin(const char* root_anchor_file, int* used_builtin) { /* try to read it */ switch(try_read_anchor(root_anchor_file)) @@ -2037,7 +2034,7 @@ provide_builtin(char* root_anchor_file, * add an autotrust anchor for the root to the context */ static void -add_5011_probe_root(struct ub_ctx* ctx, char* root_anchor_file) +add_5011_probe_root(struct ub_ctx* ctx, const char* root_anchor_file) { int r; r = ub_ctx_set_option(ctx, "auto-trust-anchor-file:", root_anchor_file); @@ -2074,7 +2071,7 @@ prime_root_key(struct ub_ctx* ctx) /** see if ADDPEND keys exist in autotrust file (if possible) */ static int -read_if_pending_keys(char* file) +read_if_pending_keys(const char* file) { FILE* in = fopen(file, "r"); char line[8192]; @@ -2096,7 +2093,7 @@ read_if_pending_keys(char* file) /** read last successful probe time from autotrust file (if possible) */ static int32_t -read_last_success_time(char* file) +read_last_success_time(const char* file) { FILE* in = fopen(file, "r"); char line[1024]; @@ -2133,7 +2130,7 @@ read_last_success_time(char* file) * @return true if certupdate is ok. */ static int -probe_date_allows_certupdate(char* root_anchor_file) +probe_date_allows_certupdate(const char* root_anchor_file) { int has_pending_keys = read_if_pending_keys(root_anchor_file); int32_t last_success = read_last_success_time(root_anchor_file); @@ -2171,10 +2168,10 @@ probe_date_allows_certupdate(char* root_ /** perform the unbound-anchor work */ static int -do_root_update_work(char* root_anchor_file, char* root_cert_file, - char* urlname, char* xmlname, char* p7sname, char* p7signer, - char* res_conf, char* root_hints, char* debugconf, - int ip4only, int ip6only, int force, int port) +do_root_update_work(const char* root_anchor_file, const char* root_cert_file, + const char* urlname, const char* xmlname, const char* p7sname, + const char* p7signer, const char* res_conf, const char* root_hints, + const char* debugconf, int ip4only, int ip6only, int force, int port) { struct ub_ctx* ctx; struct ub_result* dnskey; @@ -2224,15 +2221,15 @@ extern char* optarg; int main(int argc, char* argv[]) { int c; - char* root_anchor_file = ROOT_ANCHOR_FILE; - char* root_cert_file = ROOT_CERT_FILE; - char* urlname = URLNAME; - char* xmlname = XMLNAME; - char* p7sname = P7SNAME; - char* p7signer = P7SIGNER; - char* res_conf = NULL; - char* root_hints = NULL; - char* debugconf = NULL; + const char* root_anchor_file = ROOT_ANCHOR_FILE; + const char* root_cert_file = ROOT_CERT_FILE; + const char* urlname = URLNAME; + const char* xmlname = XMLNAME; + const char* p7sname = P7SNAME; + const char* p7signer = P7SIGNER; + const char* res_conf = NULL; + const char* root_hints = NULL; + const char* debugconf = NULL; int dolist=0, ip4only=0, ip6only=0, force=0, port = HTTPS_PORT; /* parse the options */ while( (c=getopt(argc, argv, "46C:FP:a:c:f:hln:r:s:u:vx:")) != -1) { From owner-svn-src-all@FreeBSD.ORG Sun Sep 15 07:48:43 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 43B18433; Sun, 15 Sep 2013 07:48:43 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2EEEF23F7; Sun, 15 Sep 2013 07:48:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8F7mhKC019068; Sun, 15 Sep 2013 07:48:43 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8F7mg6H019063; Sun, 15 Sep 2013 07:48:42 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201309150748.r8F7mg6H019063@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 15 Sep 2013 07:48:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255587 - head/sys/dev/drm2/radeon X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Sep 2013 07:48:43 -0000 Author: dumbbell Date: Sun Sep 15 07:48:42 2013 New Revision: 255587 URL: http://svnweb.freebsd.org/changeset/base/255587 Log: drm/radeon: Add missing "return false" after unmapping invalid BIOS Without that, we would try to copy the unmapped BIOS. Submitted by: Christoph Mallon Approved by: re (blanket) Modified: head/sys/dev/drm2/radeon/radeon_bios.c Modified: head/sys/dev/drm2/radeon/radeon_bios.c ============================================================================== --- head/sys/dev/drm2/radeon/radeon_bios.c Sun Sep 15 01:44:07 2013 (r255586) +++ head/sys/dev/drm2/radeon/radeon_bios.c Sun Sep 15 07:48:42 2013 (r255587) @@ -123,6 +123,7 @@ static bool radeon_read_bios(struct rade __func__, bios[0], bios[1]); } vga_pci_unmap_bios(vga_dev, bios); + return false; } rdev->bios = malloc(size, DRM_MEM_DRIVER, M_WAITOK); memcpy(rdev->bios, bios, size); From owner-svn-src-all@FreeBSD.ORG Sun Sep 15 11:58:08 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 073ECDB6; Sun, 15 Sep 2013 11:58:08 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E7BC62D3D; Sun, 15 Sep 2013 11:58:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8FBw7tc059778; Sun, 15 Sep 2013 11:58:07 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8FBw7GJ059776; Sun, 15 Sep 2013 11:58:07 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309151158.r8FBw7GJ059776@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sun, 15 Sep 2013 11:58:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255588 - in head/contrib/unbound: daemon libunbound X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Sep 2013 11:58:08 -0000 Author: des Date: Sun Sep 15 11:58:07 2013 New Revision: 255588 URL: http://svnweb.freebsd.org/changeset/base/255588 Log: Final #include tweak. Approved by: re (blanket) Modified: head/contrib/unbound/daemon/worker.h head/contrib/unbound/libunbound/worker.h Modified: head/contrib/unbound/daemon/worker.h ============================================================================== --- head/contrib/unbound/daemon/worker.h Sun Sep 15 07:48:42 2013 (r255587) +++ head/contrib/unbound/daemon/worker.h Sun Sep 15 11:58:07 2013 (r255588) @@ -43,6 +43,7 @@ #ifndef DAEMON_WORKER_H #define DAEMON_WORKER_H +#include "libunbound/worker.h" #include "util/netevent.h" #include "util/locks.h" #include "util/alloc.h" Modified: head/contrib/unbound/libunbound/worker.h ============================================================================== --- head/contrib/unbound/libunbound/worker.h Sun Sep 15 07:48:42 2013 (r255587) +++ head/contrib/unbound/libunbound/worker.h Sun Sep 15 11:58:07 2013 (r255588) @@ -42,6 +42,7 @@ #ifndef LIBUNBOUND_WORKER_H #define LIBUNBOUND_WORKER_H +#include "util/data/packed_rrset.h" /* for enum sec_status */ struct comm_reply; struct comm_point; struct module_qstate; From owner-svn-src-all@FreeBSD.ORG Sun Sep 15 12:41:06 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1C03C2AD; Sun, 15 Sep 2013 12:41:06 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0999D2F98; Sun, 15 Sep 2013 12:41:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8FCf52n084045; Sun, 15 Sep 2013 12:41:05 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8FCf5Do084044; Sun, 15 Sep 2013 12:41:05 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309151241.r8FCf5Do084044@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sun, 15 Sep 2013 12:41:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255589 - head/contrib/unbound X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Sep 2013 12:41:06 -0000 Author: des Date: Sun Sep 15 12:41:05 2013 New Revision: 255589 URL: http://svnweb.freebsd.org/changeset/base/255589 Log: Add unbound-control. Approved by: re (blanket) Modified: head/contrib/unbound/freebsd-sources.pl Modified: head/contrib/unbound/freebsd-sources.pl ============================================================================== --- head/contrib/unbound/freebsd-sources.pl Sun Sep 15 11:58:07 2013 (r255588) +++ head/contrib/unbound/freebsd-sources.pl Sun Sep 15 12:41:05 2013 (r255589) @@ -31,13 +31,14 @@ use strict; use warnings; use Text::Wrap; -our @targets = qw(LIBUNBOUND DAEMON UBANCHOR CHECKCONF); +our @targets = qw(LIBUNBOUND DAEMON UBANCHOR CHECKCONF CONTROL); our %target_names = ( LIBUNBOUND => "libunbound", DAEMON => "unbound", UBANCHOR => "unbound-anchor", CHECKCONF => "unbound-checkconf", + CONTROL => "unbound-control", ); sub get_sources($) { From owner-svn-src-all@FreeBSD.ORG Sun Sep 15 13:07:31 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3396D802; Sun, 15 Sep 2013 13:07:31 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 072E120C6; Sun, 15 Sep 2013 13:07:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8FD7UsZ096571; Sun, 15 Sep 2013 13:07:30 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8FD7UYg096570; Sun, 15 Sep 2013 13:07:30 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309151307.r8FD7UYg096570@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sun, 15 Sep 2013 13:07:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255590 - head/tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Sep 2013 13:07:31 -0000 Author: des Date: Sun Sep 15 13:07:30 2013 New Revision: 255590 URL: http://svnweb.freebsd.org/changeset/base/255590 Log: Complete the OPENSSH and LDNS sections. Approved by: re (blanket) Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Sep 15 12:41:05 2013 (r255589) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Sep 15 13:07:30 2013 (r255590) @@ -3389,6 +3389,19 @@ OLD_FILES+=usr/share/man/man8/verify_krb OLD_FILES+=usr/share/man/man8/verify_krb5_conf.8.gz .endif +.if ${MK_LDNS} == no +OLD_FILES+=usr/lib/private/libldns.a +OLD_FILES+=usr/lib/private/libldns.so +OLD_LIBS+=usr/lib/private/libldns.so.5 +OLD_FILES+=usr/lib/private/libldns_p.a +.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" +OLD_FILES+=usr/lib32/private/libldns.a +OLD_FILES+=usr/lib32/private/libldns.so +OLD_LIBS+=usr/lib32/private/libldns.so.5 +OLD_FILES+=usr/lib32/private/libldns_p.a +.endif +.endif + #.if ${MK_LIB32} == no # to be filled in #.endif @@ -3715,7 +3728,27 @@ OLD_FILES+=usr/share/man/man8/ntptime.8. #.endif .if ${MK_OPENSSH} == no -OLD_FILES+=usr.bin/ssh-copy-id +OLD_FILES+=usr/bin/sftp +OLD_FILES+=usr/bin/ssh +OLD_FILES+=usr/bin/ssh-add +OLD_FILES+=usr/bin/ssh-agent +OLD_FILES+=usr/bin/ssh-copy-id +OLD_FILES+=usr/bin/ssh-keygen +OLD_FILES+=usr/bin/ssh-keyscan +OLD_FILES+=usr/lib/private/libssh.a +OLD_FILES+=usr/lib/private/libssh.so +OLD_LIBS+=usr/lib/private/libssh.so.5 +OLD_FILES+=usr/lib/private/libssh_p.a +.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" +OLD_FILES+=usr/lib32/private/libssh.a +OLD_FILES+=usr/lib32/private/libssh.so +OLD_LIBS+=usr/lib32/private/libssh.so.5 +OLD_FILES+=usr/lib32/private/libssh_p.a +.endif +OLD_FILES+=usr/libexec/sftp-server +OLD_FILES+=usr/libexec/ssh-keysign +OLD_FILES+=usr/libexec/ssh-pkcs11-helper +OLD_FILES+=usr/sbin/sshd .endif #.if ${MK_OPENSSL} == no @@ -3972,7 +4005,6 @@ OLD_FILES+=usr/lib/librt_p.a OLD_FILES+=usr/lib/libsbuf_p.a OLD_FILES+=usr/lib/libsdp_p.a OLD_FILES+=usr/lib/libsmb_p.a -OLD_FILES+=usr/lib/libssh_p.a OLD_FILES+=usr/lib/libssl_p.a OLD_FILES+=usr/lib/libstdc++_p.a OLD_FILES+=usr/lib/libsupc++_p.a @@ -3995,6 +4027,8 @@ OLD_FILES+=usr/lib/libwrap_p.a OLD_FILES+=usr/lib/liby_p.a OLD_FILES+=usr/lib/libypclnt_p.a OLD_FILES+=usr/lib/libz_p.a +OLD_FILES+=usr/lib/private/libldns_p.a +OLD_FILES+=usr/lib/private/libssh_p.a .endif .if ${MK_RCMDS} == no From owner-svn-src-all@FreeBSD.ORG Sun Sep 15 13:11:14 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3F85E95C; Sun, 15 Sep 2013 13:11:14 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2D3BD2100; Sun, 15 Sep 2013 13:11:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8FDBE61099762; Sun, 15 Sep 2013 13:11:14 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8FDBEnd099761; Sun, 15 Sep 2013 13:11:14 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309151311.r8FDBEnd099761@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sun, 15 Sep 2013 13:11:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255591 - head/tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Sep 2013 13:11:14 -0000 Author: des Date: Sun Sep 15 13:11:13 2013 New Revision: 255591 URL: http://svnweb.freebsd.org/changeset/base/255591 Log: Tweak wording. Approved by: re (blanket) Modified: head/tools/build/options/WITHOUT_LDNS Modified: head/tools/build/options/WITHOUT_LDNS ============================================================================== --- head/tools/build/options/WITHOUT_LDNS Sun Sep 15 13:07:30 2013 (r255590) +++ head/tools/build/options/WITHOUT_LDNS Sun Sep 15 13:11:13 2013 (r255591) @@ -1,2 +1,2 @@ .\" $FreeBSD$ -Setting this variable will prevent LDNS from being built. +Setting this variable will prevent the LDNS library from being built. From owner-svn-src-all@FreeBSD.ORG Sun Sep 15 13:48:09 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BEEB710B; Sun, 15 Sep 2013 13:48:09 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AA16C227A; Sun, 15 Sep 2013 13:48:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8FDm94w017886; Sun, 15 Sep 2013 13:48:09 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8FDm9gc017878; Sun, 15 Sep 2013 13:48:09 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309151348.r8FDm9gc017878@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sun, 15 Sep 2013 13:48:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255592 - in head/contrib/unbound: . smallapp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Sep 2013 13:48:09 -0000 Author: des Date: Sun Sep 15 13:48:08 2013 New Revision: 255592 URL: http://svnweb.freebsd.org/changeset/base/255592 Log: The unbound-control-setup script needs to be generated so it knows where to place the keys. Also, the correct umask is 027, not 026, although it's not likely to make any difference. Approved by: re (blanket) Added: head/contrib/unbound/smallapp/unbound-control-setup.sh.in (contents, props changed) Modified: head/contrib/unbound/configure.ac Modified: head/contrib/unbound/configure.ac ============================================================================== --- head/contrib/unbound/configure.ac Sun Sep 15 13:11:13 2013 (r255591) +++ head/contrib/unbound/configure.ac Sun Sep 15 13:48:08 2013 (r255592) @@ -1244,6 +1244,6 @@ void *unbound_stat_realloc_log(void *ptr ]) -AC_CONFIG_FILES([Makefile doc/example.conf doc/libunbound.3 doc/unbound.8 doc/unbound-anchor.8 doc/unbound-checkconf.8 doc/unbound.conf.5 doc/unbound-control.8]) +AC_CONFIG_FILES([Makefile doc/example.conf doc/libunbound.3 doc/unbound.8 doc/unbound-anchor.8 doc/unbound-checkconf.8 doc/unbound.conf.5 doc/unbound-control.8 smallapp/unbound-control-setup.sh]) AC_CONFIG_HEADER([config.h]) AC_OUTPUT Added: head/contrib/unbound/smallapp/unbound-control-setup.sh.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/unbound/smallapp/unbound-control-setup.sh.in Sun Sep 15 13:48:08 2013 (r255592) @@ -0,0 +1,163 @@ +#!/bin/sh +# +# unbound-control-setup.sh - set up SSL certificates for unbound-control +# +# Copyright (c) 2008, NLnet Labs. All rights reserved. +# +# This software is open source. +# +# 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. +# +# Neither the name of the NLNET LABS nor the names of its contributors may +# be used to endorse or promote products derived from this software without +# specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE 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 REGENTS OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +# settings: + +# directory for files +prefix=@prefix@ +DESTDIR=@sysconfdir@/unbound + +# issuer and subject name for certificates +SERVERNAME=unbound +CLIENTNAME=unbound-control + +# validity period for certificates +DAYS=7200 + +# size of keys in bits +BITS=1536 + +# hash algorithm +HASH=sha256 + +# base name for unbound server keys +SVR_BASE=unbound_server + +# base name for unbound-control keys +CTL_BASE=unbound_control + +# we want -rw-r--- access (say you run this as root: grp=yes (server), all=no). +umask 0026 + +# end of options + +# functions: +error ( ) { + echo "$0 fatal error: $1" + exit 1 +} + +# check arguments: +while test $# -ne 0; do + case $1 in + -d) + if test $# -eq 1; then error "need argument for -d"; fi + DESTDIR="$2" + shift + ;; + *) + echo "unbound-control-setup.sh - setup SSL keys for unbound-control" + echo " -d dir use directory to store keys and certificates." + echo " default: $DESTDIR" + echo "please run this command using the same user id that the " + echo "unbound daemon uses, it needs read privileges." + exit 1 + ;; + esac + shift +done + +# go!: +echo "setup in directory $DESTDIR" +cd "$DESTDIR" || error "could not cd to $DESTDIR" + +# create certificate keys; do not recreate if they already exist. +if test -f $SVR_BASE.key; then + echo "$SVR_BASE.key exists" +else + echo "generating $SVR_BASE.key" + openssl genrsa -out $SVR_BASE.key $BITS || error "could not genrsa" +fi +if test -f $CTL_BASE.key; then + echo "$CTL_BASE.key exists" +else + echo "generating $CTL_BASE.key" + openssl genrsa -out $CTL_BASE.key $BITS || error "could not genrsa" +fi + +# create self-signed cert for server +cat >request.cfg <request.cfg < Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 02148252; Sun, 15 Sep 2013 13:49:25 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E34772288; Sun, 15 Sep 2013 13:49:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8FDnOJ9018286; Sun, 15 Sep 2013 13:49:24 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8FDnO6q018283; Sun, 15 Sep 2013 13:49:24 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309151349.r8FDnO6q018283@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sun, 15 Sep 2013 13:49:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255593 - in head/contrib/unbound: . smallapp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Sep 2013 13:49:25 -0000 Author: des Date: Sun Sep 15 13:49:23 2013 New Revision: 255593 URL: http://svnweb.freebsd.org/changeset/base/255593 Log: Regenerate. Approved by: re (blanket) Modified: head/contrib/unbound/config.h head/contrib/unbound/configure head/contrib/unbound/smallapp/unbound-control-setup.sh Modified: head/contrib/unbound/config.h ============================================================================== --- head/contrib/unbound/config.h Sun Sep 15 13:48:08 2013 (r255592) +++ head/contrib/unbound/config.h Sun Sep 15 13:49:23 2013 (r255593) @@ -8,10 +8,10 @@ #define CONFIGFILE "/etc/unbound/unbound.conf" /* configure flags */ -#define CONFIGURE_BUILD_WITH " '--with-conf-file=/etc/unbound/unbound.conf' '--with-run-dir=/var/unbound' '--with-username=unbound'" +#define CONFIGURE_BUILD_WITH " '--prefix=' '--exec-prefix=/usr' '--with-conf-file=/etc/unbound/unbound.conf' '--with-run-dir=/var/unbound' '--with-username=unbound'" /* configure date */ -#define CONFIGURE_DATE "Sun Sep 15 02:01:38 CEST 2013" +#define CONFIGURE_DATE "Sun Sep 15 15:38:41 CEST 2013" /* configure target system */ #define CONFIGURE_TARGET "x86_64-unknown-freebsd10.0" Modified: head/contrib/unbound/configure ============================================================================== --- head/contrib/unbound/configure Sun Sep 15 13:48:08 2013 (r255592) +++ head/contrib/unbound/configure Sun Sep 15 13:49:23 2013 (r255593) @@ -12552,14 +12552,10 @@ fi # before this can be enabled. hardcode_into_libs=yes - # Add ABI-specific directories to the system library path. - sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" - # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" - + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -18180,7 +18176,7 @@ _ACEOF -ac_config_files="$ac_config_files Makefile doc/example.conf doc/libunbound.3 doc/unbound.8 doc/unbound-anchor.8 doc/unbound-checkconf.8 doc/unbound.conf.5 doc/unbound-control.8" +ac_config_files="$ac_config_files Makefile doc/example.conf doc/libunbound.3 doc/unbound.8 doc/unbound-anchor.8 doc/unbound-checkconf.8 doc/unbound.conf.5 doc/unbound-control.8 smallapp/unbound-control-setup.sh" ac_config_headers="$ac_config_headers config.h" @@ -19169,6 +19165,7 @@ do "doc/unbound-checkconf.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-checkconf.8" ;; "doc/unbound.conf.5") CONFIG_FILES="$CONFIG_FILES doc/unbound.conf.5" ;; "doc/unbound-control.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-control.8" ;; + "smallapp/unbound-control-setup.sh") CONFIG_FILES="$CONFIG_FILES smallapp/unbound-control-setup.sh" ;; "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; Modified: head/contrib/unbound/smallapp/unbound-control-setup.sh ============================================================================== --- head/contrib/unbound/smallapp/unbound-control-setup.sh Sun Sep 15 13:48:08 2013 (r255592) +++ head/contrib/unbound/smallapp/unbound-control-setup.sh Sun Sep 15 13:49:23 2013 (r255593) @@ -36,7 +36,8 @@ # settings: # directory for files -DESTDIR=/usr/local/etc/unbound +prefix= +DESTDIR=${prefix}/etc/unbound # issuer and subject name for certificates SERVERNAME=unbound From owner-svn-src-all@FreeBSD.ORG Sun Sep 15 13:49:44 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3E38F395; Sun, 15 Sep 2013 13:49:44 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2C108228F; Sun, 15 Sep 2013 13:49:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8FDniNJ018390; Sun, 15 Sep 2013 13:49:44 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8FDniTK018389; Sun, 15 Sep 2013 13:49:44 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309151349.r8FDniTK018389@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sun, 15 Sep 2013 13:49:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255594 - head/contrib/unbound X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Sep 2013 13:49:44 -0000 Author: des Date: Sun Sep 15 13:49:43 2013 New Revision: 255594 URL: http://svnweb.freebsd.org/changeset/base/255594 Log: Set the correct prefix and exec-prefix. Approved by: re (blanket) Modified: head/contrib/unbound/freebsd-configure.sh Modified: head/contrib/unbound/freebsd-configure.sh ============================================================================== --- head/contrib/unbound/freebsd-configure.sh Sun Sep 15 13:49:23 2013 (r255593) +++ head/contrib/unbound/freebsd-configure.sh Sun Sep 15 13:49:43 2013 (r255594) @@ -22,6 +22,7 @@ ldnsobj=$(realpath $(make -C$ldnsbld -V. export LDFLAGS="-L$ldnsobj" ./configure \ + --prefix= --exec-prefix=/usr \ --with-conf-file=/etc/unbound/unbound.conf \ --with-run-dir=/var/unbound \ --with-username=unbound From owner-svn-src-all@FreeBSD.ORG Sun Sep 15 13:50:57 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4E5F04E2; Sun, 15 Sep 2013 13:50:57 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3C27622D9; Sun, 15 Sep 2013 13:50:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8FDovXg020853; Sun, 15 Sep 2013 13:50:57 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8FDoud8020851; Sun, 15 Sep 2013 13:50:56 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309151350.r8FDoud8020851@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sun, 15 Sep 2013 13:50:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255595 - head/contrib/unbound/smallapp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Sep 2013 13:50:57 -0000 Author: des Date: Sun Sep 15 13:50:56 2013 New Revision: 255595 URL: http://svnweb.freebsd.org/changeset/base/255595 Log: Previous commit accidentally left out the umask change. Approved by: re (blanket) Modified: head/contrib/unbound/smallapp/unbound-control-setup.sh head/contrib/unbound/smallapp/unbound-control-setup.sh.in Modified: head/contrib/unbound/smallapp/unbound-control-setup.sh ============================================================================== --- head/contrib/unbound/smallapp/unbound-control-setup.sh Sun Sep 15 13:49:43 2013 (r255594) +++ head/contrib/unbound/smallapp/unbound-control-setup.sh Sun Sep 15 13:50:56 2013 (r255595) @@ -58,8 +58,8 @@ SVR_BASE=unbound_server # base name for unbound-control keys CTL_BASE=unbound_control -# we want -rw-r--- access (say you run this as root: grp=yes (server), all=no). -umask 0026 +# we want -rw-r----- access (say you run this as root: grp=yes (server), all=no). +umask 0027 # end of options Modified: head/contrib/unbound/smallapp/unbound-control-setup.sh.in ============================================================================== --- head/contrib/unbound/smallapp/unbound-control-setup.sh.in Sun Sep 15 13:49:43 2013 (r255594) +++ head/contrib/unbound/smallapp/unbound-control-setup.sh.in Sun Sep 15 13:50:56 2013 (r255595) @@ -58,8 +58,8 @@ SVR_BASE=unbound_server # base name for unbound-control keys CTL_BASE=unbound_control -# we want -rw-r--- access (say you run this as root: grp=yes (server), all=no). -umask 0026 +# we want -rw-r----- access (say you run this as root: grp=yes (server), all=no). +umask 0027 # end of options From owner-svn-src-all@FreeBSD.ORG Sun Sep 15 14:19:18 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8B78C975; Sun, 15 Sep 2013 14:19:18 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 785F12401; Sun, 15 Sep 2013 14:19:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8FEJIXs034323; Sun, 15 Sep 2013 14:19:18 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8FEJHH1034316; Sun, 15 Sep 2013 14:19:17 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201309151419.r8FEJHH1034316@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 15 Sep 2013 14:19:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255596 - in head/sys: dev/ofw powerpc/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Sep 2013 14:19:18 -0000 Author: nwhitehorn Date: Sun Sep 15 14:19:17 2013 New Revision: 255596 URL: http://svnweb.freebsd.org/changeset/base/255596 Log: Add a kernel interface (OF_xref_phandle()) for systems where phandles used as cross-references in the device tree and phandles as used by the Open Firmware client interface are in different namespaces. This include IBM pSeries hardware as well as FDT systems. FDT certainly abuses ihandles for this purpose and should be modified to use this API eventually. This changes no behavior on systems where FreeBSD already worked. Reviewed by: marius Approved by: re (kib) MFC after: 2 weeks Modified: head/sys/dev/ofw/ofw_bus_subr.c head/sys/dev/ofw/openfirm.c head/sys/dev/ofw/openfirm.h head/sys/powerpc/ofw/ofw_pcibus.c Modified: head/sys/dev/ofw/ofw_bus_subr.c ============================================================================== --- head/sys/dev/ofw/ofw_bus_subr.c Sun Sep 15 13:50:56 2013 (r255595) +++ head/sys/dev/ofw/ofw_bus_subr.c Sun Sep 15 14:19:17 2013 (r255596) @@ -300,7 +300,7 @@ ofw_bus_search_intrmap(void *intr, int i i = imapsz; while (i > 0) { bcopy(mptr + physsz + intrsz, &parent, sizeof(parent)); - if (OF_searchprop(parent, "#interrupt-cells", + if (OF_searchprop(OF_xref_phandle(parent), "#interrupt-cells", &pintrsz, sizeof(pintrsz)) == -1) pintrsz = 1; /* default */ pintrsz *= sizeof(pcell_t); Modified: head/sys/dev/ofw/openfirm.c ============================================================================== --- head/sys/dev/ofw/openfirm.c Sun Sep 15 13:50:56 2013 (r255595) +++ head/sys/dev/ofw/openfirm.c Sun Sep 15 14:19:17 2013 (r255596) @@ -386,6 +386,48 @@ OF_package_to_path(phandle_t package, ch return (OFW_PACKAGE_TO_PATH(ofw_obj, package, buf, len)); } +/* Look up effective phandle (see FDT/PAPR spec) */ +static phandle_t +OF_child_xref_phandle(phandle_t parent, phandle_t xref) +{ + phandle_t child, rxref; + + /* + * Recursively descend from parent, looking for a node with a property + * named either "phandle", "ibm,phandle", or "linux,phandle" that + * matches the xref we are looking for. + */ + + for (child = OF_child(parent); child != 0; child = OF_peer(child)) { + rxref = OF_child_xref_phandle(child, xref); + if (rxref != -1) + return (rxref); + + if (OF_getprop(child, "phandle", &rxref, sizeof(rxref)) == -1 && + OF_getprop(child, "ibm,phandle", &rxref, + sizeof(rxref)) == -1 && OF_getprop(child, + "linux,phandle", &rxref, sizeof(rxref)) == -1) + continue; + + if (rxref == xref) + return (child); + } + + return (-1); +} + +phandle_t +OF_xref_phandle(phandle_t xref) +{ + phandle_t node; + + node = OF_child_xref_phandle(OF_peer(0), xref); + if (node == -1) + return (xref); + + return (node); +} + /* Call the method in the scope of a given instance. */ int OF_call_method(const char *method, ihandle_t instance, int nargs, int nreturns, Modified: head/sys/dev/ofw/openfirm.h ============================================================================== --- head/sys/dev/ofw/openfirm.h Sun Sep 15 13:50:56 2013 (r255595) +++ head/sys/dev/ofw/openfirm.h Sun Sep 15 14:19:17 2013 (r255596) @@ -118,6 +118,14 @@ ssize_t OF_canon(const char *path, char phandle_t OF_finddevice(const char *path); ssize_t OF_package_to_path(phandle_t node, char *buf, size_t len); +/* + * Some OF implementations (IBM, FDT) have a concept of effective phandles + * used for device-tree cross-references. Given one of these, returns the + * real phandle. If one can't be found (or running on OF implementations + * without this property), returns its input. + */ +phandle_t OF_xref_phandle(phandle_t xref); + /* Device I/O functions */ ihandle_t OF_open(const char *path); void OF_close(ihandle_t instance); Modified: head/sys/powerpc/ofw/ofw_pcibus.c ============================================================================== --- head/sys/powerpc/ofw/ofw_pcibus.c Sun Sep 15 13:50:56 2013 (r255595) +++ head/sys/powerpc/ofw/ofw_pcibus.c Sun Sep 15 14:19:17 2013 (r255596) @@ -210,11 +210,12 @@ ofw_pcibus_enum_devtree(device_t dev, u_ icells = 1; OF_getprop(child, "interrupt-parent", &iparent, sizeof(iparent)); - OF_getprop(iparent, "#interrupt-cells", &icells, - sizeof(icells)); - - if (iparent != 0) + if (iparent != 0) { + OF_getprop(OF_xref_phandle(iparent), + "#interrupt-cells", &icells, + sizeof(icells)); intr[0] = MAP_IRQ(iparent, intr[0]); + } if (iparent != 0 && icells > 1) { powerpc_config_intr(intr[0], From owner-svn-src-all@FreeBSD.ORG Sun Sep 15 14:51:27 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 91CC3DD7; Sun, 15 Sep 2013 14:51:27 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7CD4C2555; Sun, 15 Sep 2013 14:51:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8FEpRju052535; Sun, 15 Sep 2013 14:51:27 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8FEpNwg052510; Sun, 15 Sep 2013 14:51:23 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309151451.r8FEpNwg052510@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sun, 15 Sep 2013 14:51:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255597 - in head: etc etc/mtree lib lib/libunbound share/mk tools/build/mk tools/build/options usr.sbin usr.sbin/unbound usr.sbin/unbound/anchor usr.sbin/unbound/checkconf usr.sbin/unb... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Sep 2013 14:51:27 -0000 Author: des Date: Sun Sep 15 14:51:23 2013 New Revision: 255597 URL: http://svnweb.freebsd.org/changeset/base/255597 Log: Build and install the Unbound caching DNS resolver daemon. Approved by: re (blanket) Added: head/lib/libunbound/ head/lib/libunbound/Makefile (contents, props changed) head/tools/build/options/WITHOUT_UNBOUND (contents, props changed) head/usr.sbin/unbound/ head/usr.sbin/unbound/Makefile (contents, props changed) head/usr.sbin/unbound/Makefile.inc (contents, props changed) head/usr.sbin/unbound/anchor/ head/usr.sbin/unbound/anchor/Makefile (contents, props changed) head/usr.sbin/unbound/checkconf/ head/usr.sbin/unbound/checkconf/Makefile (contents, props changed) head/usr.sbin/unbound/control/ head/usr.sbin/unbound/control/Makefile (contents, props changed) head/usr.sbin/unbound/daemon/ head/usr.sbin/unbound/daemon/Makefile (contents, props changed) Modified: head/etc/group head/etc/master.passwd head/etc/mtree/BSD.root.dist head/etc/mtree/BSD.var.dist head/lib/Makefile head/share/mk/bsd.libnames.mk head/share/mk/bsd.own.mk head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.sbin/Makefile Modified: head/etc/group ============================================================================== --- head/etc/group Sun Sep 15 14:19:17 2013 (r255596) +++ head/etc/group Sun Sep 15 14:51:23 2013 (r255597) @@ -19,6 +19,7 @@ mailnull:*:26: _atf:*:27: guest:*:31: bind:*:53: +unbound:*:59: proxy:*:62: authpf:*:63: _pflogd:*:64: Modified: head/etc/master.passwd ============================================================================== --- head/etc/master.passwd Sun Sep 15 14:19:17 2013 (r255596) +++ head/etc/master.passwd Sun Sep 15 14:51:23 2013 (r255597) @@ -15,6 +15,7 @@ smmsp:*:25:25::0:0:Sendmail Submission U mailnull:*:26:26::0:0:Sendmail Default User:/var/spool/mqueue:/usr/sbin/nologin _atf:*:27:27::0:0:& pseudo-user:/nonexistent:/usr/sbin/nologin bind:*:53:53::0:0:Bind Sandbox:/:/usr/sbin/nologin +unbound:*:59:59::0:0:Unbound DNS Resolver:/var/unbound:/usr/sbin/nologin proxy:*:62:62::0:0:Packet Filter pseudo-user:/nonexistent:/usr/sbin/nologin _pflogd:*:64:64::0:0:pflogd privsep user:/var/empty:/usr/sbin/nologin _dhcp:*:65:65::0:0:dhcp programs:/var/empty:/usr/sbin/nologin Modified: head/etc/mtree/BSD.root.dist ============================================================================== --- head/etc/mtree/BSD.root.dist Sun Sep 15 14:19:17 2013 (r255596) +++ head/etc/mtree/BSD.root.dist Sun Sep 15 14:51:23 2013 (r255597) @@ -66,6 +66,8 @@ .. ssl .. + unbound + .. zfs .. .. Modified: head/etc/mtree/BSD.var.dist ============================================================================== --- head/etc/mtree/BSD.var.dist Sun Sep 15 14:19:17 2013 (r255596) +++ head/etc/mtree/BSD.var.dist Sun Sep 15 14:51:23 2013 (r255597) @@ -97,6 +97,8 @@ vi.recover mode=01777 .. .. + unbound uname=unbound gname=unbound mode=0750 + .. yp .. .. Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Sun Sep 15 14:19:17 2013 (r255596) +++ head/lib/Makefile Sun Sep 15 14:51:23 2013 (r255597) @@ -12,6 +12,7 @@ # libcom_err must be built before libpam. # libcrypt must be built before libpam. # libkvm must be built before libdevstat. +# libldns must be built before libunbound. # msun must be built before libg++ and libstdc++. # libmd must be built before libatm, libopie, libradius, and libtacplus. # ncurses must be built before libdialog, libedit and libreadline. @@ -116,6 +117,7 @@ SUBDIR= ${SUBDIR_ORDERED} \ libufs \ libugidfw \ libulog \ + ${_libunbound} \ ${_libusbhid} \ ${_libusb} \ ${_libvgl} \ @@ -261,6 +263,10 @@ _libsmutil= libsmutil _libtelnet= libtelnet .endif +.if ${MK_UNBOUND} != "no" +_libunbound= libunbound +.endif + .if ${MK_USB} != "no" _libusbhid= libusbhid _libusb= libusb Added: head/lib/libunbound/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libunbound/Makefile Sun Sep 15 14:51:23 2013 (r255597) @@ -0,0 +1,33 @@ +# $FreeBSD$ + +# Vendor sources and generated files +LDNSDIR= ${.CURDIR}/../../contrib/ldns +UNBOUNDDIR= ${.CURDIR}/../../contrib/unbound + +# Hold my beer and watch this +.PATH: ${UNBOUNDDIR} ${UNBOUNDDIR}/iterator ${UNBOUNDDIR}/libunbound ${UNBOUNDDIR}/services ${UNBOUNDDIR}/services/cache ${UNBOUNDDIR}/util ${UNBOUNDDIR}/util/data ${UNBOUNDDIR}/util/storage ${UNBOUNDDIR}/validator + +LIB= unbound +PRIVATELIB= + +CFLAGS= -I${LDNSDIR} -I${UNBOUNDDIR} + +SRCS= alloc.c autotrust.c config_file.c configlexer.c configparser.c \ + context.c dname.c dns.c dnstree.c fptr_wlist.c infra.c \ + iter_delegpt.c iter_donotq.c iter_fwd.c iter_hints.c iter_priv.c \ + iter_resptype.c iter_scrub.c iter_utils.c iterator.c libunbound.c \ + libworker.c listen_dnsport.c localzone.c locks.c log.c lookup3.c \ + lruhash.c mesh.c mini_event.c modstack.c module.c msgencode.c \ + msgparse.c msgreply.c net_help.c netevent.c outbound_list.c \ + outside_network.c packed_rrset.c random.c rbtree.c regional.c \ + rrset.c rtt.c slabhash.c timehist.c tube.c val_anchor.c \ + val_kcache.c val_kentry.c val_neg.c val_nsec.c val_nsec3.c \ + val_secalgo.c val_sigcrypt.c val_utils.c validator.c \ + winsock_event.c + +WARNS?= 3 + +DPADD+= ${LIBSSL} ${LIBCRYPTO} ${LIBPTHREAD} +LDADD+= -lssl -lcrypto -lpthread + +.include Modified: head/share/mk/bsd.libnames.mk ============================================================================== --- head/share/mk/bsd.libnames.mk Sun Sep 15 14:19:17 2013 (r255596) +++ head/share/mk/bsd.libnames.mk Sun Sep 15 14:51:23 2013 (r255597) @@ -164,6 +164,9 @@ LIBTINFO?= "don't use LIBTINFO, use LIBN LIBUFS?= ${DESTDIR}${LIBDIR}/libufs.a LIBUGIDFW?= ${DESTDIR}${LIBDIR}/libugidfw.a LIBUMEM?= ${DESTDIR}${LIBDIR}/libumem.a +.if ${MK_UNBOUND} != "no" +LIBUNBOUND?= ${DESTDIR}${LIBDIR}/libunbound.a +.endif LIBUSBHID?= ${DESTDIR}${LIBDIR}/libusbhid.a LIBUSB?= ${DESTDIR}${LIBDIR}/libusb.a LIBULOG?= ${DESTDIR}${LIBDIR}/libulog.a Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Sun Sep 15 14:19:17 2013 (r255596) +++ head/share/mk/bsd.own.mk Sun Sep 15 14:51:23 2013 (r255597) @@ -358,6 +358,7 @@ __DEFAULT_YES_OPTIONS = \ TELNET \ TEXTPROC \ TOOLCHAIN \ + UNBOUND \ USB \ UTMPX \ WIRELESS \ @@ -521,6 +522,7 @@ MK_LIBICONV_COMPAT:= no .if ${MK_LDNS} == "no" MK_LDNS_UTILS:= no +MK_UNBOUND:= no .endif .if ${MK_LDNS_UTILS} != "no" Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Sep 15 14:19:17 2013 (r255596) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Sep 15 14:51:23 2013 (r255597) @@ -4367,6 +4367,24 @@ OLD_FILES+=usr/share/man/man8/telnetd.8. # to be filled in #.endif +.if ${MK_UNBOUND} == no +OLD_FILES+=usr/lib/private/libunbound.a +OLD_FILES+=usr/lib/private/libunbound.so +OLD_LIBS+=usr/lib/private/libunbound.so.5 +OLD_FILES+=usr/lib/private/libunbound_p.a +.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" +OLD_FILES+=usr/lib32/private/libunbound.a +OLD_FILES+=usr/lib32/private/libunbound.so +OLD_LIBS+=usr/lib32/private/libunbound.so.5 +OLD_FILES+=usr/lib32/private/libunbound_p.a +.endif +OLD_FILES+=usr/sbin/unbound +OLD_FILES+=usr/sbin/unbound-anchor +OLD_FILES+=usr/sbin/unbound-checkconf +OLD_FILES+=usr/sbin/unbound-control +OLD_FILES+=usr/sbin/unbound-control-setup +.endif + #.if ${MK_USB} == no # to be filled in #.endif Added: head/tools/build/options/WITHOUT_UNBOUND ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_UNBOUND Sun Sep 15 14:51:23 2013 (r255597) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to not build +.Xr unbound 8 +and related programs. Modified: head/usr.sbin/Makefile ============================================================================== --- head/usr.sbin/Makefile Sun Sep 15 14:19:17 2013 (r255596) +++ head/usr.sbin/Makefile Sun Sep 15 14:51:23 2013 (r255597) @@ -317,6 +317,10 @@ SUBDIR+= config SUBDIR+= crunch .endif +.if ${MK_UNBOUND} != "no" +SUBDIR+= unbound +.endif + .if ${MK_USB} != "no" SUBDIR+= uathload SUBDIR+= uhsoctl Added: head/usr.sbin/unbound/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/unbound/Makefile Sun Sep 15 14:51:23 2013 (r255597) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +SUBDIR= daemon anchor checkconf control + +.include Added: head/usr.sbin/unbound/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/unbound/Makefile.inc Sun Sep 15 14:51:23 2013 (r255597) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +.include "../Makefile.inc" Added: head/usr.sbin/unbound/anchor/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/unbound/anchor/Makefile Sun Sep 15 14:51:23 2013 (r255597) @@ -0,0 +1,18 @@ +# $FreeBSD$ + +# Vendor sources and generated files +LDNSDIR= ${.CURDIR}/../../../contrib/ldns +UNBOUNDDIR= ${.CURDIR}/../../../contrib/unbound +EXPATDIR= ${.CURDIR}/../../../contrib/expat + +.PATH: ${UNBOUNDDIR} ${UNBOUNDDIR}/smallapp ${UNBOUNDDIR}/doc + +PROG= unbound-anchor +SRCS= unbound-anchor.c +CFLAGS= -I${UNBOUNDDIR} -I${LDNSDIR} -I${EXPATDIR}/lib +DPADD= ${LIBUNBOUND} ${LIBLDNS} ${LIBUTIL} ${LIBBSDXML} ${LIBSSL} ${LIBCRYPTO} ${LIBPTHREAD} +LDADD= -lunbound -lldns -lutil -lbsdxml -lssl -lcrypto -lpthread +USEPRIVATELIB= ldns +MAN= unbound-anchor.8 + +.include Added: head/usr.sbin/unbound/checkconf/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/unbound/checkconf/Makefile Sun Sep 15 14:51:23 2013 (r255597) @@ -0,0 +1,17 @@ +# $FreeBSD$ + +# Vendor sources and generated files +LDNSDIR= ${.CURDIR}/../../../contrib/ldns +UNBOUNDDIR= ${.CURDIR}/../../../contrib/unbound + +.PATH: ${UNBOUNDDIR} ${UNBOUNDDIR}/smallapp ${UNBOUNDDIR}/doc + +PROG= unbound-checkconf +SRCS= unbound-checkconf.c worker_cb.c +CFLAGS= -I${UNBOUNDDIR} -I${LDNSDIR} +DPADD= ${LIBUNBOUND} ${LIBLDNS} ${LIBUTIL} ${LIBSSL} ${LIBCRYPTO} ${LIBPTHREAD} +LDADD= -lunbound -lldns -lutil -lssl -lcrypto -lpthread +USEPRIVATELIB= ldns +MAN= unbound-checkconf.8 + +.include Added: head/usr.sbin/unbound/control/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/unbound/control/Makefile Sun Sep 15 14:51:23 2013 (r255597) @@ -0,0 +1,18 @@ +# $FreeBSD$ + +# Vendor sources and generated files +LDNSDIR= ${.CURDIR}/../../../contrib/ldns +UNBOUNDDIR= ${.CURDIR}/../../../contrib/unbound + +.PATH: ${UNBOUNDDIR} ${UNBOUNDDIR}/smallapp ${UNBOUNDDIR}/doc + +PROG= unbound-control +SCRIPTS= unbound-control-setup.sh +SRCS= unbound-control.c worker_cb.c +CFLAGS= -I${UNBOUNDDIR} -I${LDNSDIR} +DPADD= ${LIBUNBOUND} ${LIBLDNS} ${LIBUTIL} ${LIBSSL} ${LIBCRYPTO} ${LIBPTHREAD} +LDADD= -lunbound -lldns -lutil -lssl -lcrypto -lpthread +USEPRIVATELIB= ldns +MAN= unbound-control.8 + +.include Added: head/usr.sbin/unbound/daemon/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/unbound/daemon/Makefile Sun Sep 15 14:51:23 2013 (r255597) @@ -0,0 +1,17 @@ +# $FreeBSD$ + +# Vendor sources and generated files +LDNSDIR= ${.CURDIR}/../../../contrib/ldns +UNBOUNDDIR= ${.CURDIR}/../../../contrib/unbound + +.PATH: ${UNBOUNDDIR} ${UNBOUNDDIR}/daemon ${UNBOUNDDIR}/doc + +PROG= unbound +SRCS= acl_list.c cachedump.c daemon.c remote.c stats.c unbound.c worker.c +CFLAGS= -I${UNBOUNDDIR} -I${LDNSDIR} +DPADD= ${LIBUNBOUND} ${LIBLDNS} ${LIBUTIL} ${LIBSSL} ${LIBCRYPTO} ${LIBPTHREAD} +LDADD= -lunbound -lldns -lutil -lssl -lcrypto -lpthread +USEPRIVATELIB= ldns +MAN= unbound.8 unbound.conf.5 + +.include From owner-svn-src-all@FreeBSD.ORG Sun Sep 15 15:23:51 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 20D93808; Sun, 15 Sep 2013 15:23:51 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0DC0B2703; Sun, 15 Sep 2013 15:23:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8FFNoI0069221; Sun, 15 Sep 2013 15:23:50 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8FFNoBK069219; Sun, 15 Sep 2013 15:23:50 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309151523.r8FFNoBK069219@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sun, 15 Sep 2013 15:23:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255598 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Sep 2013 15:23:51 -0000 Author: des Date: Sun Sep 15 15:23:50 2013 New Revision: 255598 URL: http://svnweb.freebsd.org/changeset/base/255598 Log: Regnerate. Approved by: re (blanket) Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Sun Sep 15 14:51:23 2013 (r255597) +++ head/share/man/man5/src.conf.5 Sun Sep 15 15:23:50 2013 (r255598) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 253304 2013-07-12 23:08:44Z bapt .\" $FreeBSD$ -.Dd September 6, 2013 +.Dd September 15, 2013 .Dt SRC.CONF 5 .Os .Sh NAME @@ -686,13 +686,15 @@ Set to build some programs without optio .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. +.\" from FreeBSD: head/tools/build/options/WITHOUT_LDNS 255591 2013-09-15 13:11:13Z des +Setting this variable will prevent the LDNS library from being built. When set, it also enforces the following options: .Pp .Bl -item -compact .It .Va WITHOUT_LDNS_UTILS +.It +.Va WITHOUT_UNBOUND .El .It Va WITH_LDNS_UTILS .\" from FreeBSD: head/tools/build/options/WITH_LDNS_UTILS 246830 2013-02-15 13:57:51Z des @@ -1148,6 +1150,11 @@ When set, it also enforces the following .It .Va WITHOUT_GDB .El +.It Va WITHOUT_UNBOUND +.\" from FreeBSD: head/tools/build/options/WITHOUT_UNBOUND 255597 2013-09-15 14:51:23Z des +Set to not build +.Xr unbound 8 +and related programs. .It Va WITHOUT_USB .\" from FreeBSD: head/tools/build/options/WITHOUT_USB 156932 2006-03-21 07:50:50Z ru Set to not build USB-related programs and libraries. From owner-svn-src-all@FreeBSD.ORG Sun Sep 15 15:49:18 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 06125BD6; Sun, 15 Sep 2013 15:49:18 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E7C9B27FF; Sun, 15 Sep 2013 15:49:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8FFnH2v081103; Sun, 15 Sep 2013 15:49:17 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8FFnHBc081102; Sun, 15 Sep 2013 15:49:17 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309151549.r8FFnHBc081102@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sun, 15 Sep 2013 15:49:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255599 - head/contrib/ldns/ldns X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Sep 2013 15:49:18 -0000 Author: des Date: Sun Sep 15 15:49:17 2013 New Revision: 255599 URL: http://svnweb.freebsd.org/changeset/base/255599 Log: The Unbound developers have never met a pointer game they didn't like. Fix needless deconsting. Approved by: re (blanket) Modified: head/contrib/ldns/ldns/util.h Modified: head/contrib/ldns/ldns/util.h ============================================================================== --- head/contrib/ldns/ldns/util.h Sun Sep 15 15:23:50 2013 (r255598) +++ head/contrib/ldns/ldns/util.h Sun Sep 15 15:49:17 2013 (r255599) @@ -72,7 +72,7 @@ ldns_read_uint16(const void *src) #ifdef ALLOW_UNALIGNED_ACCESSES return ntohs(*(uint16_t *) src); #else - uint8_t *p = (uint8_t *) src; + const uint8_t *p = (const uint8_t *) src; return ((uint16_t) p[0] << 8) | (uint16_t) p[1]; #endif } @@ -83,7 +83,7 @@ ldns_read_uint32(const void *src) #ifdef ALLOW_UNALIGNED_ACCESSES return ntohl(*(uint32_t *) src); #else - uint8_t *p = (uint8_t *) src; + const uint8_t *p = (const uint8_t *) src; return ( ((uint32_t) p[0] << 24) | ((uint32_t) p[1] << 16) | ((uint32_t) p[2] << 8) From owner-svn-src-all@FreeBSD.ORG Sun Sep 15 15:52:08 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7E8CAD62; Sun, 15 Sep 2013 15:52:08 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6C8112838; Sun, 15 Sep 2013 15:52:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8FFq8pH084417; Sun, 15 Sep 2013 15:52:08 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8FFq8wX084416; Sun, 15 Sep 2013 15:52:08 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309151552.r8FFq8wX084416@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sun, 15 Sep 2013 15:52:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255600 - head/contrib/ldns/ldns X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Sep 2013 15:52:08 -0000 Author: des Date: Sun Sep 15 15:52:07 2013 New Revision: 255600 URL: http://svnweb.freebsd.org/changeset/base/255600 Log: Remove duplicate function declaration. Approved by: re (blanket) Modified: head/contrib/ldns/ldns/dnssec_verify.h Modified: head/contrib/ldns/ldns/dnssec_verify.h ============================================================================== --- head/contrib/ldns/ldns/dnssec_verify.h Sun Sep 15 15:49:17 2013 (r255599) +++ head/contrib/ldns/ldns/dnssec_verify.h Sun Sep 15 15:52:07 2013 (r255600) @@ -294,23 +294,6 @@ void ldns_dnssec_derive_trust_tree_dnske ldns_rr *cur_rr, ldns_rr *cur_sig_rr, time_t check_time); - -/** - * Sub function for derive_trust_tree that is used for DNSKEY rrsets - * - * \param[in] new_tree The trust tree that we are building - * \param[in] data_chain The data chain containing the data for the trust tree - * \param[in] cur_rr The currently relevant DNSKEY RR - * \param[in] cur_sig_rr The currently relevant signature - * \param[in] check_time the time for which the validation is performed - */ -void ldns_dnssec_derive_trust_tree_dnskey_rrset_time( - ldns_dnssec_trust_tree *new_tree, - ldns_dnssec_data_chain *data_chain, - ldns_rr *cur_rr, ldns_rr *cur_sig_rr, - time_t check_time); - - /** * Sub function for derive_trust_tree that is used for DS rrsets * From owner-svn-src-all@FreeBSD.ORG Sun Sep 15 15:55:22 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1473DFDB; Sun, 15 Sep 2013 15:55:22 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 02236285A; Sun, 15 Sep 2013 15:55:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8FFtLDV085627; Sun, 15 Sep 2013 15:55:21 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8FFtLCA085626; Sun, 15 Sep 2013 15:55:21 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309151555.r8FFtLCA085626@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sun, 15 Sep 2013 15:55:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255601 - head/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Sep 2013 15:55:22 -0000 Author: des Date: Sun Sep 15 15:55:21 2013 New Revision: 255601 URL: http://svnweb.freebsd.org/changeset/base/255601 Log: Move libldns to the correct (ordered) library list. Approved by: re (blanket) Modified: head/lib/Makefile Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Sun Sep 15 15:52:07 2013 (r255600) +++ head/lib/Makefile Sun Sep 15 15:55:21 2013 (r255601) @@ -39,6 +39,7 @@ SUBDIR_ORDERED= ${_csu} \ libelf \ ${_libiconv_modules} \ libkvm \ + ${_libldns} \ msun \ libmd \ ncurses \ @@ -85,7 +86,6 @@ SUBDIR= ${SUBDIR_ORDERED} \ ${_libipx} \ libjail \ libkiconv \ - ${_libldns} \ liblzma \ libmagic \ libmandoc \ From owner-svn-src-all@FreeBSD.ORG Sun Sep 15 16:27:25 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D1DB98BE; Sun, 15 Sep 2013 16:27:25 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BFBBE29BC; Sun, 15 Sep 2013 16:27:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8FGRPOT001645; Sun, 15 Sep 2013 16:27:25 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8FGRPE8001644; Sun, 15 Sep 2013 16:27:25 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309151627.r8FGRPE8001644@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sun, 15 Sep 2013 16:27:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255602 - head/usr.sbin/unbound X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Sep 2013 16:27:25 -0000 Author: des Date: Sun Sep 15 16:27:25 2013 New Revision: 255602 URL: http://svnweb.freebsd.org/changeset/base/255602 Log: Set NO_WERROR for unbound until I can figure out how to unbreak the non-clang build. Approved by: re (blanket) Modified: head/usr.sbin/unbound/Makefile.inc Modified: head/usr.sbin/unbound/Makefile.inc ============================================================================== --- head/usr.sbin/unbound/Makefile.inc Sun Sep 15 15:55:21 2013 (r255601) +++ head/usr.sbin/unbound/Makefile.inc Sun Sep 15 16:27:25 2013 (r255602) @@ -1,3 +1,5 @@ # $FreeBSD$ +NO_WERROR= true + .include "../Makefile.inc" From owner-svn-src-all@FreeBSD.ORG Sun Sep 15 19:54:00 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A7132ABE for ; Sun, 15 Sep 2013 19:54:00 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 83C81227D for ; Sun, 15 Sep 2013 19:54:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r8FJs02Q082911 for ; Sun, 15 Sep 2013 19:54:00 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r8FJs0oj082906 for svn-src-all@freebsd.org; Sun, 15 Sep 2013 19:54:00 GMT (envelope-from bdrewery) Received: (qmail 16566 invoked from network); 15 Sep 2013 14:53:58 -0500 Received: from unknown (HELO ?10.10.0.24?) (freebsd@shatow.net@10.10.0.24) by sweb.xzibition.com with ESMTPA; 15 Sep 2013 14:53:58 -0500 Message-ID: <5236104F.2040706@FreeBSD.org> Date: Sun, 15 Sep 2013 14:53:51 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 Subject: Re: svn commit: r255597 - in head: etc etc/mtree lib lib/libunbound share/mk tools/build/mk tools/build/options usr.sbin usr.sbin/unbound usr.sbin/unbound/anchor usr.sbin/unbound/checkconf usr.sbin/unb... References: <201309151451.r8FEpNwg052510@svn.freebsd.org> In-Reply-To: <201309151451.r8FEpNwg052510@svn.freebsd.org> X-Enigmail-Version: 1.5.2 OpenPGP: id=3C9B0CF9; url=http://www.shatow.net/bryan/bryan.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="eIg258oN0ASJCdlS8q1V4FJXCK08JPQad" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Sep 2013 19:54:00 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --eIg258oN0ASJCdlS8q1V4FJXCK08JPQad Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 9/15/2013 9:51 AM, Dag-Erling Sm=F8rgrav wrote: > Author: des > Date: Sun Sep 15 14:51:23 2013 > New Revision: 255597 > URL: http://svnweb.freebsd.org/changeset/base/255597 >=20 > Log: > Build and install the Unbound caching DNS resolver daemon. > =20 > Approved by: re (blanket) >=20 > Added: > head/lib/libunbound/ > head/lib/libunbound/Makefile (contents, props changed) > head/tools/build/options/WITHOUT_UNBOUND (contents, props changed) > head/usr.sbin/unbound/ > head/usr.sbin/unbound/Makefile (contents, props changed) > head/usr.sbin/unbound/Makefile.inc (contents, props changed) > head/usr.sbin/unbound/anchor/ > head/usr.sbin/unbound/anchor/Makefile (contents, props changed) > head/usr.sbin/unbound/checkconf/ > head/usr.sbin/unbound/checkconf/Makefile (contents, props changed) > head/usr.sbin/unbound/control/ > head/usr.sbin/unbound/control/Makefile (contents, props changed) > head/usr.sbin/unbound/daemon/ > head/usr.sbin/unbound/daemon/Makefile (contents, props changed) > Modified: > head/etc/group > head/etc/master.passwd > head/etc/mtree/BSD.root.dist > head/etc/mtree/BSD.var.dist > head/lib/Makefile > head/share/mk/bsd.libnames.mk > head/share/mk/bsd.own.mk > head/tools/build/mk/OptionalObsoleteFiles.inc > head/usr.sbin/Makefile >=20 > Modified: head/etc/group > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/etc/group Sun Sep 15 14:19:17 2013 (r255596) > +++ head/etc/group Sun Sep 15 14:51:23 2013 (r255597) > @@ -19,6 +19,7 @@ mailnull:*:26: > _atf:*:27: > guest:*:31: > bind:*:53: > +unbound:*:59: > proxy:*:62: > authpf:*:63: > _pflogd:*:64: >=20 > Modified: head/etc/master.passwd > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/etc/master.passwd Sun Sep 15 14:19:17 2013 (r255596) > +++ head/etc/master.passwd Sun Sep 15 14:51:23 2013 (r255597) > @@ -15,6 +15,7 @@ smmsp:*:25:25::0:0:Sendmail Submission U > mailnull:*:26:26::0:0:Sendmail Default User:/var/spool/mqueue:/usr/sbi= n/nologin > _atf:*:27:27::0:0:& pseudo-user:/nonexistent:/usr/sbin/nologin > bind:*:53:53::0:0:Bind Sandbox:/:/usr/sbin/nologin > +unbound:*:59:59::0:0:Unbound DNS Resolver:/var/unbound:/usr/sbin/nolog= in > proxy:*:62:62::0:0:Packet Filter pseudo-user:/nonexistent:/usr/sbin/no= login > _pflogd:*:64:64::0:0:pflogd privsep user:/var/empty:/usr/sbin/nologin > _dhcp:*:65:65::0:0:dhcp programs:/var/empty:/usr/sbin/nologin >=20 [...] > Modified: head/etc/mtree/BSD.var.dist > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/etc/mtree/BSD.var.dist Sun Sep 15 14:19:17 2013 (r255596) > +++ head/etc/mtree/BSD.var.dist Sun Sep 15 14:51:23 2013 (r255597) > @@ -97,6 +97,8 @@ > vi.recover mode=3D01777 > .. > .. > + unbound uname=3Dunbound gname=3Dunbound mode=3D0750 > + .. > yp > .. > .. FYI poudriere users will run into a problem with this due to a bug in poudriere. It was not using DB_FROM_SRC properly with 'distrib-dirs'. mtree: line 100: unknown user unbound I've committed a fix to poudriere trunk and ports-mgmt/poudriere-devel to fix the issue. --=20 Regards, Bryan Drewery --eIg258oN0ASJCdlS8q1V4FJXCK08JPQad Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJSNhBUAAoJEG54KsA8mwz5/O8P/0WzWMK/EaDT6OPb3+qjTa4Q kQRAlKDmawi53tBEfIz3YOFfgb2JZZZ2giSI1gQByXSwJpxSIT5AXdtdpU0NJscA bHnSx28DzDDcaJ/AVLkQ8qONDf3z/FfKVaCxSUIFS8oSbGBOp40UFLGKmfnr8IZq ypbNITIgN8lAehy3BGROyiz6hZaQWPHHZjxbtZT4BOAc0CMX0s05Ia9h27TMkZkQ 7xnuG88ntPHbnwZuIq82JFL86mbVdIg5rTm+RgrvzpE83b3N3cOyOm3y0LmVU0lC NM74rfTZlPHb5K/zsVN14t8TSFRkPPpLPEmSkZBYJ65fj8PoeyWFMJ1Y7qRh4kAG fNw/41xnP/iRQBKs7hh8ngChC7IkBAAFSLgH5q7T0R3DnD0fhRgzDW2ZTFFr4ZDH ZNG9JRt0PhSza0gs0wt8gdt9/G0wGgBRMzw4erlAxE0NXwzJOOyrbCIkVkb64Zem ScbnmOFz8RIr4xtWKWiwJNMCPNdU8lR5V44QcWfKwJQ/7ltTlrfrFpNjktyXr1Og InQJraoHl2Yo5kw1Bk/WTzJfrtcXtDi8gMndGLf/GnRq3mUWonNpycAhM4vuGUeB bvGLCzD2c+WfyHPiZ4P8o+avegU2mm5bGlFWK07WXDeQlRnLHIZl9fI3UJPXz+Jg bgCkdA98UKzD/T//aUag =PEK2 -----END PGP SIGNATURE----- --eIg258oN0ASJCdlS8q1V4FJXCK08JPQad-- From owner-svn-src-all@FreeBSD.ORG Sun Sep 15 20:16:41 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AA94BF60; Sun, 15 Sep 2013 20:16:41 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (unknown [IPv6:2001:610:1108:5012::107]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 67F682396; Sun, 15 Sep 2013 20:16:41 +0000 (UTC) Received: from turtle.stack.nl (turtle.stack.nl [IPv6:2001:610:1108:5010::132]) by mx1.stack.nl (Postfix) with ESMTP id 0961D1203C2; Sun, 15 Sep 2013 22:16:24 +0200 (CEST) Received: by turtle.stack.nl (Postfix, from userid 1677) id 00743CB4E; Sun, 15 Sep 2013 22:16:23 +0200 (CEST) Date: Sun, 15 Sep 2013 22:16:23 +0200 From: Jilles Tjoelker To: Joel Dahl Subject: Re: svn commit: r254273 - in head: . include lib lib/libc/iconv lib/libiconv_compat lib/libkiconv share/mk sys/sys tools/build/mk Message-ID: <20130915201623.GA28602@stack.nl> References: <201308130715.r7D7F1nu076335@svn.freebsd.org> <20130822155835.GA52789@devbox.vnode.local> <20130903195241.GA93218@devbox.vnode.local> <201309051013.35286.jhb@freebsd.org> <20130905201540.GA23637@devbox.vnode.local> <20130912221927.GA473@stack.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130912221927.GA473@stack.nl> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: src-committers@freebsd.org, John Baldwin , Peter Wemm , svn-src-all@freebsd.org, Dimitry Andric , gabor@freebsd.org, svn-src-head@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Sep 2013 20:16:41 -0000 On Fri, Sep 13, 2013 at 12:19:27AM +0200, Jilles Tjoelker wrote: > On Thu, Sep 05, 2013 at 10:15:40PM +0200, Joel Dahl wrote: > > Installworld is still broken on systems with readonly /usr/obj. > I use this. It makes the mapper.dir and similar files depend on their > actual sources instead of phony targets, and therefore only rebuilt when > needed. The previous patch had some problems (two makes in parallel in the same directory, no rebuild when the sources of the $i/foo.$i files changed in -DNOCLEAN mode). This patch should work better. It avoids changing the targets and instead leaves the destination file untouched if the content remains the same. Index: share/i18n/csmapper/Makefile =================================================================== --- share/i18n/csmapper/Makefile (revision 255570) +++ share/i18n/csmapper/Makefile (working copy) @@ -7,10 +7,11 @@ KAZAKH KOI KS MISC TCVN mapper.dir: ${SUBDIR} - > ${.TARGET} -.for i in ${SUBDIR} - cat ${i}/mapper.dir.${i} >> ${.TARGET} -.endfor + newfile=$$(for i in ${SUBDIR}; do \ + cat $$i/mapper.dir.$$i; \ + done); \ + [ "$$newfile" = "$$(cat ${.TARGET} 2>/dev/null)" ] || \ + printf '%s\n' "$$newfile" >${.TARGET} mapper.dir.db: mapper.dir ${MKCSMAPPER} -m -o ${.TARGET} ${.ALLSRC} @@ -18,10 +19,11 @@ CLEANFILES+= mapper.dir mapper.dir.db charset.pivot: ${SUBDIR} - > ${.TARGET} -.for i in ${SUBDIR} - cat ${i}/charset.pivot.${i} >> ${.TARGET} -.endfor + newfile=$$(for i in ${SUBDIR}; do \ + cat $$i/charset.pivot.$$i; \ + done); \ + [ "$$newfile" = "$$(cat ${.TARGET} 2>/dev/null)" ] || \ + printf '%s\n' "$$newfile" >${.TARGET} charset.pivot.pvdb: charset.pivot ${MKCSMAPPER} -p -o ${.TARGET} ${.ALLSRC} Index: share/i18n/esdb/Makefile =================================================================== --- share/i18n/esdb/Makefile (revision 255570) +++ share/i18n/esdb/Makefile (working copy) @@ -10,18 +10,20 @@ CLEANFILES= ${FILES} esdb.dir: ${SUBDIR} - > $@ -.for i in ${SUBDIR} - cat ${i}/esdb.dir.${i} >>${.TARGET} -.endfor + newfile=$$(for i in ${SUBDIR}; do \ + cat $$i/esdb.dir.$$i; \ + done); \ + [ "$$newfile" = "$$(cat ${.TARGET} 2>/dev/null)" ] || \ + printf '%s\n' "$$newfile" >${.TARGET} esdb.dir.db: esdb.dir ${MKESDB} -m -o ${.TARGET} ${.ALLSRC} esdb.alias: ${SUBDIR} - > $@ -.for i in ${SUBDIR} - cat ${i}/esdb.alias.${i} >>${.TARGET} -.endfor + newfile=$$(for i in ${SUBDIR}; do \ + cat $$i/esdb.alias.$$i; \ + done); \ + [ "$$newfile" = "$$(cat ${.TARGET} 2>/dev/null)" ] || \ + printf '%s\n' "$$newfile" >${.TARGET} esdb.alias.db: esdb.alias ${MKESDB} -m -o ${.TARGET} ${.ALLSRC} -- Jilles Tjoelker From owner-svn-src-all@FreeBSD.ORG Sun Sep 15 21:38:47 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5DCE7F80; Sun, 15 Sep 2013 21:38:47 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4B26F2742; Sun, 15 Sep 2013 21:38:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8FLclEu066018; Sun, 15 Sep 2013 21:38:47 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8FLcliA066017; Sun, 15 Sep 2013 21:38:47 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201309152138.r8FLcliA066017@svn.freebsd.org> From: Mark Johnston Date: Sun, 15 Sep 2013 21:38:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255604 - head/cddl/lib/libdtrace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Sep 2013 21:38:47 -0000 Author: markj Date: Sun Sep 15 21:38:46 2013 New Revision: 255604 URL: http://svnweb.freebsd.org/changeset/base/255604 Log: Use the address of the inpcb rather than the tcpcb to identify TCP connections. This keeps the tcp provider consistent with the other network providers. Approved by: re (delphij) Modified: head/cddl/lib/libdtrace/tcp.d Modified: head/cddl/lib/libdtrace/tcp.d ============================================================================== --- head/cddl/lib/libdtrace/tcp.d Sun Sep 15 21:18:50 2013 (r255603) +++ head/cddl/lib/libdtrace/tcp.d Sun Sep 15 21:38:46 2013 (r255604) @@ -144,7 +144,7 @@ typedef struct tcpinfo { #pragma D binding "1.0" translator translator csinfo_t < struct tcpcb *p > { cs_addr = NULL; - cs_cid = (uint64_t)p; + cs_cid = (uint64_t)(p == NULL ? 0 : p->t_inpcb); cs_pid = 0; cs_zoneid = 0; }; From owner-svn-src-all@FreeBSD.ORG Mon Sep 16 02:01:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 83BA06CE; Mon, 16 Sep 2013 02:01:37 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6FD692336; Mon, 16 Sep 2013 02:01:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8G21bY3005605; Mon, 16 Sep 2013 02:01:37 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8G21bul005604; Mon, 16 Sep 2013 02:01:37 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201309160201.r8G21bul005604@svn.freebsd.org> From: Glen Barber Date: Mon, 16 Sep 2013 02:01:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255606 - stable/9/share/man/man5 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Sep 2013 02:01:37 -0000 Author: gjb Date: Mon Sep 16 02:01:36 2013 New Revision: 255606 URL: http://svnweb.freebsd.org/changeset/base/255606 Log: MFC r255505: Do not install freebsd-update.conf.5 manual if WITHOUT_FREEBSD_UPDATE is set. Sponsored by: The FreeBSD Foundation Modified: stable/9/share/man/man5/Makefile Directory Properties: stable/9/share/man/man5/ (props changed) Modified: stable/9/share/man/man5/Makefile ============================================================================== --- stable/9/share/man/man5/Makefile Mon Sep 16 00:06:54 2013 (r255605) +++ stable/9/share/man/man5/Makefile Mon Sep 16 02:01:36 2013 (r255606) @@ -25,7 +25,6 @@ MAN= acct.5 \ fbtab.5 \ fdescfs.5 \ forward.5 \ - freebsd-update.conf.5 \ fs.5 \ fstab.5 \ group.5 \ @@ -80,6 +79,10 @@ MLINKS+=quota.user.5 quota.group.5 MLINKS+=rc.conf.5 rc.conf.local.5 MLINKS+=resolver.5 resolv.conf.5 +.if ${MK_FREEBSD_UPDATE} != "no" +MAN+= freebsd-update.conf.5 +.endif + .if ${MK_HESIOD} != "no" MAN+= hesiod.conf.5 .endif From owner-svn-src-all@FreeBSD.ORG Mon Sep 16 06:15:16 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 22FEB233; Mon, 16 Sep 2013 06:15:16 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0EBE72F19; Mon, 16 Sep 2013 06:15:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8G6FF8k039080; Mon, 16 Sep 2013 06:15:15 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8G6FFqh039079; Mon, 16 Sep 2013 06:15:15 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201309160615.r8G6FFqh039079@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 16 Sep 2013 06:15:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255607 - head/sys/amd64/amd64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Sep 2013 06:15:16 -0000 Author: kib Date: Mon Sep 16 06:15:15 2013 New Revision: 255607 URL: http://svnweb.freebsd.org/changeset/base/255607 Log: In pmap_copy(), when the copied region is mapped with superpage but does not cover entire superpage, avoid copying. Doing partial copy would require demotion, which is incompatible with the already held locks. Reported by: cperciva Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week Approved by: re (delphij) Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Mon Sep 16 02:01:36 2013 (r255606) +++ head/sys/amd64/amd64/pmap.c Mon Sep 16 06:15:15 2013 (r255607) @@ -4356,6 +4356,8 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm continue; if (srcptepaddr & PG_PS) { + if ((addr & PDRMASK) != 0 || addr + NBPDR > end_addr) + continue; dstmpde = pmap_allocpde(dst_pmap, addr, NULL); if (dstmpde == NULL) break; From owner-svn-src-all@FreeBSD.ORG Mon Sep 16 06:25:57 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8B861430; Mon, 16 Sep 2013 06:25:57 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6969C2F7E; Mon, 16 Sep 2013 06:25:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8G6Pvok044901; Mon, 16 Sep 2013 06:25:57 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8G6PtZs044888; Mon, 16 Sep 2013 06:25:55 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201309160625.r8G6PtZs044888@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 16 Sep 2013 06:25:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255608 - in head/sys: conf kern modules/cxgb/cxgb modules/sfxge modules/ti sys vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Sep 2013 06:25:57 -0000 Author: kib Date: Mon Sep 16 06:25:54 2013 New Revision: 255608 URL: http://svnweb.freebsd.org/changeset/base/255608 Log: Remove zero-copy sockets code. It only worked for anonymous memory, and the equivalent functionality is now provided by sendfile(2) over posix shared memory filedescriptor. Remove the cow member of struct vm_page, and rearrange the remaining members. While there, make hold_count unsigned. Requested and reviewed by: alc Tested by: pho Sponsored by: The FreeBSD Foundation Approved by: re (delphij) Modified: head/sys/conf/NOTES head/sys/conf/options head/sys/kern/subr_uio.c head/sys/kern/uipc_socket.c head/sys/modules/cxgb/cxgb/Makefile head/sys/modules/sfxge/Makefile head/sys/modules/ti/Makefile head/sys/sys/socketvar.h head/sys/sys/uio.h head/sys/vm/vm_fault.c head/sys/vm/vm_page.c head/sys/vm/vm_page.h Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Mon Sep 16 06:15:15 2013 (r255607) +++ head/sys/conf/NOTES Mon Sep 16 06:25:54 2013 (r255608) @@ -996,21 +996,6 @@ options TCP_SIGNATURE #include support # a smooth scheduling of the traffic. options DUMMYNET -# "Zero copy" sockets support is split into the send and receive path -# which operate very differently. -# For the send path the VM page with the data is wired into the kernel -# and marked as COW (copy-on-write). If the application touches the -# data while it is still in the send socket buffer the page is copied -# and divorced from its kernel wiring (no longer zero copy). -# The receive side requires explicit NIC driver support to create -# disposable pages which are flipped from kernel to user-space VM. -# See zero_copy(9) for more details. -# XXX: The COW based send mechanism is not safe and may result in -# kernel crashes. -# XXX: None of the current NIC drivers support disposable pages. -options SOCKET_SEND_COW -options SOCKET_RECV_PFLIP - ##################################################################### # FILESYSTEM OPTIONS Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Mon Sep 16 06:15:15 2013 (r255607) +++ head/sys/conf/options Mon Sep 16 06:25:54 2013 (r255608) @@ -528,8 +528,6 @@ NGATM_CCATM opt_netgraph.h # DRM options DRM_DEBUG opt_drm.h -SOCKET_SEND_COW opt_zero.h -SOCKET_RECV_PFLIP opt_zero.h TI_SF_BUF_JUMBO opt_ti.h TI_JUMBO_HDRSPLIT opt_ti.h Modified: head/sys/kern/subr_uio.c ============================================================================== --- head/sys/kern/subr_uio.c Mon Sep 16 06:15:15 2013 (r255607) +++ head/sys/kern/subr_uio.c Mon Sep 16 06:25:54 2013 (r255608) @@ -37,8 +37,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_zero.h" - #include #include #include @@ -58,84 +56,12 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef SOCKET_SEND_COW -#include -#endif SYSCTL_INT(_kern, KERN_IOV_MAX, iov_max, CTLFLAG_RD, NULL, UIO_MAXIOV, "Maximum number of elements in an I/O vector; sysconf(_SC_IOV_MAX)"); static int uiomove_faultflag(void *cp, int n, struct uio *uio, int nofault); -#ifdef SOCKET_SEND_COW -/* Declared in uipc_socket.c */ -extern int so_zero_copy_receive; - -/* - * Identify the physical page mapped at the given kernel virtual - * address. Insert this physical page into the given address space at - * the given virtual address, replacing the physical page, if any, - * that already exists there. - */ -static int -vm_pgmoveco(vm_map_t mapa, vm_offset_t kaddr, vm_offset_t uaddr) -{ - vm_map_t map = mapa; - vm_page_t kern_pg, user_pg; - vm_object_t uobject; - vm_map_entry_t entry; - vm_pindex_t upindex; - vm_prot_t prot; - boolean_t wired; - - KASSERT((uaddr & PAGE_MASK) == 0, - ("vm_pgmoveco: uaddr is not page aligned")); - - /* - * Herein the physical page is validated and dirtied. It is - * unwired in sf_buf_mext(). - */ - kern_pg = PHYS_TO_VM_PAGE(vtophys(kaddr)); - kern_pg->valid = VM_PAGE_BITS_ALL; - KASSERT(kern_pg->queue == PQ_NONE && kern_pg->wire_count == 1, - ("vm_pgmoveco: kern_pg is not correctly wired")); - - if ((vm_map_lookup(&map, uaddr, - VM_PROT_WRITE, &entry, &uobject, - &upindex, &prot, &wired)) != KERN_SUCCESS) { - return(EFAULT); - } - VM_OBJECT_WLOCK(uobject); -retry: - if ((user_pg = vm_page_lookup(uobject, upindex)) != NULL) { - if (vm_page_sleep_if_busy(user_pg, "vm_pgmoveco")) - goto retry; - vm_page_lock(user_pg); - pmap_remove_all(user_pg); - vm_page_free(user_pg); - vm_page_unlock(user_pg); - } else { - /* - * Even if a physical page does not exist in the - * object chain's first object, a physical page from a - * backing object may be mapped read only. - */ - if (uobject->backing_object != NULL) - pmap_remove(map->pmap, uaddr, uaddr + PAGE_SIZE); - } - if (vm_page_insert(kern_pg, uobject, upindex)) { - VM_OBJECT_WUNLOCK(uobject); - VM_WAIT; - VM_OBJECT_WLOCK(uobject); - goto retry; - } - vm_page_dirty(kern_pg); - VM_OBJECT_WUNLOCK(uobject); - vm_map_lookup_done(map, entry); - return(KERN_SUCCESS); -} -#endif /* SOCKET_SEND_COW */ - int copyin_nofault(const void *udaddr, void *kaddr, size_t len) { @@ -313,103 +239,6 @@ uiomove_frombuf(void *buf, int buflen, s return (uiomove((char *)buf + offset, n, uio)); } -#ifdef SOCKET_RECV_PFLIP -/* - * Experimental support for zero-copy I/O - */ -static int -userspaceco(void *cp, u_int cnt, struct uio *uio, int disposable) -{ - struct iovec *iov; - int error; - - iov = uio->uio_iov; - if (uio->uio_rw == UIO_READ) { - if ((so_zero_copy_receive != 0) - && ((cnt & PAGE_MASK) == 0) - && ((((intptr_t) iov->iov_base) & PAGE_MASK) == 0) - && ((uio->uio_offset & PAGE_MASK) == 0) - && ((((intptr_t) cp) & PAGE_MASK) == 0) - && (disposable != 0)) { - /* SOCKET: use page-trading */ - /* - * We only want to call vm_pgmoveco() on - * disposeable pages, since it gives the - * kernel page to the userland process. - */ - error = vm_pgmoveco(&curproc->p_vmspace->vm_map, - (vm_offset_t)cp, (vm_offset_t)iov->iov_base); - - /* - * If we get an error back, attempt - * to use copyout() instead. The - * disposable page should be freed - * automatically if we weren't able to move - * it into userland. - */ - if (error != 0) - error = copyout(cp, iov->iov_base, cnt); - } else { - error = copyout(cp, iov->iov_base, cnt); - } - } else { - error = copyin(iov->iov_base, cp, cnt); - } - return (error); -} - -int -uiomoveco(void *cp, int n, struct uio *uio, int disposable) -{ - struct iovec *iov; - u_int cnt; - int error; - - KASSERT(uio->uio_rw == UIO_READ || uio->uio_rw == UIO_WRITE, - ("uiomoveco: mode")); - KASSERT(uio->uio_segflg != UIO_USERSPACE || uio->uio_td == curthread, - ("uiomoveco proc")); - - while (n > 0 && uio->uio_resid) { - iov = uio->uio_iov; - cnt = iov->iov_len; - if (cnt == 0) { - uio->uio_iov++; - uio->uio_iovcnt--; - continue; - } - if (cnt > n) - cnt = n; - - switch (uio->uio_segflg) { - - case UIO_USERSPACE: - maybe_yield(); - error = userspaceco(cp, cnt, uio, disposable); - if (error) - return (error); - break; - - case UIO_SYSSPACE: - if (uio->uio_rw == UIO_READ) - bcopy(cp, iov->iov_base, cnt); - else - bcopy(iov->iov_base, cp, cnt); - break; - case UIO_NOCOPY: - break; - } - iov->iov_base = (char *)iov->iov_base + cnt; - iov->iov_len -= cnt; - uio->uio_resid -= cnt; - uio->uio_offset += cnt; - cp = (char *)cp + cnt; - n -= cnt; - } - return (0); -} -#endif /* SOCKET_RECV_PFLIP */ - /* * Give next character to user as result of read. */ Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Mon Sep 16 06:15:15 2013 (r255607) +++ head/sys/kern/uipc_socket.c Mon Sep 16 06:25:54 2013 (r255608) @@ -105,7 +105,6 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" #include "opt_inet6.h" -#include "opt_zero.h" #include "opt_compat.h" #include @@ -221,21 +220,6 @@ static int numopensockets; SYSCTL_INT(_kern_ipc, OID_AUTO, numopensockets, CTLFLAG_RD, &numopensockets, 0, "Number of open sockets"); -#if defined(SOCKET_SEND_COW) || defined(SOCKET_RECV_PFLIP) -SYSCTL_NODE(_kern_ipc, OID_AUTO, zero_copy, CTLFLAG_RD, 0, - "Zero copy controls"); -#ifdef SOCKET_RECV_PFLIP -int so_zero_copy_receive = 1; -SYSCTL_INT(_kern_ipc_zero_copy, OID_AUTO, receive, CTLFLAG_RW, - &so_zero_copy_receive, 0, "Enable zero copy receive"); -#endif -#ifdef SOCKET_SEND_COW -int so_zero_copy_send = 1; -SYSCTL_INT(_kern_ipc_zero_copy, OID_AUTO, send, CTLFLAG_RW, - &so_zero_copy_send, 0, "Enable zero copy send"); -#endif /* SOCKET_SEND_COW */ -#endif /* SOCKET_SEND_COW || SOCKET_RECV_PFLIP */ - /* * accept_mtx locks down per-socket fields relating to accept queues. See * socketvar.h for an annotation of the protected fields of struct socket. @@ -978,113 +962,6 @@ sodisconnect(struct socket *so) return (error); } -#ifdef SOCKET_SEND_COW -struct so_zerocopy_stats{ - int size_ok; - int align_ok; - int found_ifp; -}; -struct so_zerocopy_stats so_zerocp_stats = {0,0,0}; - -/* - * sosend_copyin() is only used if zero copy sockets are enabled. Otherwise - * sosend_dgram() and sosend_generic() use m_uiotombuf(). - * - * sosend_copyin() accepts a uio and prepares an mbuf chain holding part or - * all of the data referenced by the uio. If desired, it uses zero-copy. - * *space will be updated to reflect data copied in. - * - * NB: If atomic I/O is requested, the caller must already have checked that - * space can hold resid bytes. - * - * NB: In the event of an error, the caller may need to free the partial - * chain pointed to by *mpp. The contents of both *uio and *space may be - * modified even in the case of an error. - */ -static int -sosend_copyin(struct uio *uio, struct mbuf **retmp, int atomic, long *space, - int flags) -{ - struct mbuf *m, **mp, *top; - long len; - ssize_t resid; - int error; - int cow_send; - - *retmp = top = NULL; - mp = ⊤ - len = 0; - resid = uio->uio_resid; - error = 0; - do { - cow_send = 0; - if (resid >= MINCLSIZE) { - if (top == NULL) { - m = m_gethdr(M_WAITOK, MT_DATA); - m->m_pkthdr.len = 0; - m->m_pkthdr.rcvif = NULL; - } else - m = m_get(M_WAITOK, MT_DATA); - if (so_zero_copy_send && - resid >= PAGE_SIZE && - *space >= PAGE_SIZE && - uio->uio_iov->iov_len >= PAGE_SIZE) { - so_zerocp_stats.size_ok++; - so_zerocp_stats.align_ok++; - cow_send = socow_setup(m, uio); - len = cow_send; - } - if (!cow_send) { - m_clget(m, M_WAITOK); - len = min(min(MCLBYTES, resid), *space); - } - } else { - if (top == NULL) { - m = m_gethdr(M_WAITOK, MT_DATA); - m->m_pkthdr.len = 0; - m->m_pkthdr.rcvif = NULL; - - len = min(min(MHLEN, resid), *space); - /* - * For datagram protocols, leave room - * for protocol headers in first mbuf. - */ - if (atomic && m && len < MHLEN) - MH_ALIGN(m, len); - } else { - m = m_get(M_WAITOK, MT_DATA); - len = min(min(MLEN, resid), *space); - } - } - if (m == NULL) { - error = ENOBUFS; - goto out; - } - - *space -= len; - if (cow_send) - error = 0; - else - error = uiomove(mtod(m, void *), (int)len, uio); - resid = uio->uio_resid; - m->m_len = len; - *mp = m; - top->m_pkthdr.len += len; - if (error) - goto out; - mp = &m->m_next; - if (resid <= 0) { - if (flags & MSG_EOR) - top->m_flags |= M_EOR; - break; - } - } while (*space > 0 && atomic); -out: - *retmp = top; - return (error); -} -#endif /* SOCKET_SEND_COW */ - #define SBLOCKWAIT(f) (((f) & MSG_DONTWAIT) ? 0 : SBL_WAIT) int @@ -1094,9 +971,6 @@ sosend_dgram(struct socket *so, struct s long space; ssize_t resid; int clen = 0, error, dontroute; -#ifdef SOCKET_SEND_COW - int atomic = sosendallatonce(so) || top; -#endif KASSERT(so->so_type == SOCK_DGRAM, ("sosend_dgram: !SOCK_DGRAM")); KASSERT(so->so_proto->pr_flags & PR_ATOMIC, @@ -1179,11 +1053,6 @@ sosend_dgram(struct socket *so, struct s if (flags & MSG_EOR) top->m_flags |= M_EOR; } else { -#ifdef SOCKET_SEND_COW - error = sosend_copyin(uio, &top, atomic, &space, flags); - if (error) - goto out; -#else /* * Copy the data from userland into a mbuf chain. * If no data is to be copied in, a single empty mbuf @@ -1196,7 +1065,6 @@ sosend_dgram(struct socket *so, struct s goto out; } space -= resid - uio->uio_resid; -#endif /* SOCKET_SEND_COW */ resid = uio->uio_resid; } KASSERT(resid == 0, ("sosend_dgram: resid != 0")); @@ -1368,12 +1236,6 @@ restart: if (flags & MSG_EOR) top->m_flags |= M_EOR; } else { -#ifdef SOCKET_SEND_COW - error = sosend_copyin(uio, &top, atomic, - &space, flags); - if (error != 0) - goto release; -#else /* * Copy the data from userland into a mbuf * chain. If no data is to be copied in, @@ -1388,7 +1250,6 @@ restart: goto release; } space -= resid - uio->uio_resid; -#endif /* SOCKET_SEND_COW */ resid = uio->uio_resid; } if (dontroute) { @@ -1480,20 +1341,6 @@ soreceive_rcvoob(struct socket *so, stru if (error) goto bad; do { -#ifdef SOCKET_RECV_PFLIP - if (so_zero_copy_receive) { - int disposable; - - if ((m->m_flags & M_EXT) - && (m->m_ext.ext_type == EXT_DISPOSABLE)) - disposable = 1; - else - disposable = 0; - - error = uiomoveco(mtod(m, void *), - min(uio->uio_resid, m->m_len), uio, disposable); - } else -#endif /* SOCKET_RECV_PFLIP */ error = uiomove(mtod(m, void *), (int) min(uio->uio_resid, m->m_len), uio); m = m_free(m); @@ -1816,20 +1663,6 @@ dontblock: SBLASTRECORDCHK(&so->so_rcv); SBLASTMBUFCHK(&so->so_rcv); SOCKBUF_UNLOCK(&so->so_rcv); -#ifdef SOCKET_RECV_PFLIP - if (so_zero_copy_receive) { - int disposable; - - if ((m->m_flags & M_EXT) - && (m->m_ext.ext_type == EXT_DISPOSABLE)) - disposable = 1; - else - disposable = 0; - - error = uiomoveco(mtod(m, char *) + moff, - (int)len, uio, disposable); - } else -#endif /* SOCKET_RECV_PFLIP */ error = uiomove(mtod(m, char *) + moff, (int)len, uio); SOCKBUF_LOCK(&so->so_rcv); if (error) { Modified: head/sys/modules/cxgb/cxgb/Makefile ============================================================================== --- head/sys/modules/cxgb/cxgb/Makefile Mon Sep 16 06:15:15 2013 (r255607) +++ head/sys/modules/cxgb/cxgb/Makefile Mon Sep 16 06:25:54 2013 (r255608) @@ -10,7 +10,7 @@ SRCS= cxgb_mc5.c cxgb_vsc8211.c cxgb_ael SRCS+= cxgb_xgmac.c cxgb_vsc7323.c cxgb_t3_hw.c cxgb_main.c cxgb_aq100x.c SRCS+= cxgb_sge.c cxgb_tn1010.c SRCS+= device_if.h bus_if.h pci_if.h -SRCS+= opt_inet.h opt_inet6.h opt_zero.h opt_sched.h +SRCS+= opt_inet.h opt_inet6.h opt_sched.h SRCS+= uipc_mvec.c CFLAGS+= -g -DDEFAULT_JUMBO -I${CXGB} Modified: head/sys/modules/sfxge/Makefile ============================================================================== --- head/sys/modules/sfxge/Makefile Mon Sep 16 06:15:15 2013 (r255607) +++ head/sys/modules/sfxge/Makefile Mon Sep 16 06:25:54 2013 (r255608) @@ -5,7 +5,7 @@ KMOD= sfxge SFXGE= ${.CURDIR}/../../dev/sfxge SRCS= device_if.h bus_if.h pci_if.h -SRCS+= opt_inet.h opt_zero.h opt_sched.h +SRCS+= opt_inet.h opt_sched.h .PATH: ${.CURDIR}/../../dev/sfxge SRCS+= sfxge.c sfxge_dma.c sfxge_ev.c Modified: head/sys/modules/ti/Makefile ============================================================================== --- head/sys/modules/ti/Makefile Mon Sep 16 06:15:15 2013 (r255607) +++ head/sys/modules/ti/Makefile Mon Sep 16 06:25:54 2013 (r255608) @@ -3,6 +3,6 @@ .PATH: ${.CURDIR}/../../dev/ti KMOD= if_ti -SRCS= if_ti.c device_if.h bus_if.h pci_if.h opt_ti.h opt_zero.h +SRCS= if_ti.c device_if.h bus_if.h pci_if.h opt_ti.h .include Modified: head/sys/sys/socketvar.h ============================================================================== --- head/sys/sys/socketvar.h Mon Sep 16 06:15:15 2013 (r255607) +++ head/sys/sys/socketvar.h Mon Sep 16 06:25:54 2013 (r255608) @@ -325,7 +325,6 @@ int soconnect(struct socket *so, struct int soconnectat(int fd, struct socket *so, struct sockaddr *nam, struct thread *td); int soconnect2(struct socket *so1, struct socket *so2); -int socow_setup(struct mbuf *m0, struct uio *uio); int socreate(int dom, struct socket **aso, int type, int proto, struct ucred *cred, struct thread *td); int sodisconnect(struct socket *so); Modified: head/sys/sys/uio.h ============================================================================== --- head/sys/sys/uio.h Mon Sep 16 06:15:15 2013 (r255607) +++ head/sys/sys/uio.h Mon Sep 16 06:25:54 2013 (r255608) @@ -104,7 +104,6 @@ int uiomove_fromphys(struct vm_page *ma[ struct uio *uio); int uiomove_nofault(void *cp, int n, struct uio *uio); int uiomove_object(struct vm_object *obj, off_t obj_size, struct uio *uio); -int uiomoveco(void *cp, int n, struct uio *uio, int disposable); #else /* !_KERNEL */ Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Mon Sep 16 06:15:15 2013 (r255607) +++ head/sys/vm/vm_fault.c Mon Sep 16 06:25:54 2013 (r255608) @@ -333,24 +333,6 @@ RetryFault:; */ fs.m = vm_page_lookup(fs.object, fs.pindex); if (fs.m != NULL) { - /* - * check for page-based copy on write. - * We check fs.object == fs.first_object so - * as to ensure the legacy COW mechanism is - * used when the page in question is part of - * a shadow object. Otherwise, vm_page_cowfault() - * removes the page from the backing object, - * which is not what we want. - */ - vm_page_lock(fs.m); - if ((fs.m->cow) && - (fault_type & VM_PROT_WRITE) && - (fs.object == fs.first_object)) { - vm_page_cowfault(fs.m); - unlock_and_deallocate(&fs); - goto RetryFault; - } - /* * Wait/Retry if the page is busy. We have to do this * if the page is either exclusive or shared busy @@ -374,7 +356,6 @@ RetryFault:; * likely to reclaim it. */ vm_page_aflag_set(fs.m, PGA_REFERENCED); - vm_page_unlock(fs.m); if (fs.object != fs.first_object) { if (!VM_OBJECT_TRYWLOCK( fs.first_object)) { @@ -400,6 +381,7 @@ RetryFault:; vm_object_deallocate(fs.first_object); goto RetryFault; } + vm_page_lock(fs.m); vm_page_remque(fs.m); vm_page_unlock(fs.m); Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Mon Sep 16 06:15:15 2013 (r255607) +++ head/sys/vm/vm_page.c Mon Sep 16 06:25:54 2013 (r255608) @@ -674,8 +674,8 @@ vm_page_unhold(vm_page_t mem) { vm_page_lock_assert(mem, MA_OWNED); + KASSERT(mem->hold_count >= 1, ("vm_page_unhold: hold count < 0!!!")); --mem->hold_count; - KASSERT(mem->hold_count >= 0, ("vm_page_unhold: hold count < 0!!!")); if (mem->hold_count == 0 && (mem->flags & PG_UNHOLDFREE) != 0) vm_page_free_toq(mem); } @@ -3108,108 +3108,6 @@ vm_page_lock_assert_KBI(vm_page_t m, int } #endif -int so_zerocp_fullpage = 0; - -/* - * Replace the given page with a copy. The copied page assumes - * the portion of the given page's "wire_count" that is not the - * responsibility of this copy-on-write mechanism. - * - * The object containing the given page must have a non-zero - * paging-in-progress count and be locked. - */ -void -vm_page_cowfault(vm_page_t m) -{ - vm_page_t mnew; - vm_object_t object; - vm_pindex_t pindex; - - vm_page_lock_assert(m, MA_OWNED); - object = m->object; - VM_OBJECT_ASSERT_WLOCKED(object); - KASSERT(object->paging_in_progress != 0, - ("vm_page_cowfault: object %p's paging-in-progress count is zero.", - object)); - pindex = m->pindex; - - retry_alloc: - mnew = vm_page_alloc(NULL, pindex, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ); - if (mnew == NULL) { - vm_page_unlock(m); - VM_OBJECT_WUNLOCK(object); - VM_WAIT; - VM_OBJECT_WLOCK(object); - if (m == vm_page_lookup(object, pindex)) { - vm_page_lock(m); - goto retry_alloc; - } else { - /* - * Page disappeared during the wait. - */ - return; - } - } - - if (m->cow == 0) { - /* - * check to see if we raced with an xmit complete when - * waiting to allocate a page. If so, put things back - * the way they were - */ - vm_page_unlock(m); - vm_page_lock(mnew); - vm_page_free(mnew); - vm_page_unlock(mnew); - } else { /* clear COW & copy page */ - pmap_remove_all(m); - mnew->object = object; - if (object->memattr != VM_MEMATTR_DEFAULT && - (object->flags & OBJ_FICTITIOUS) == 0) - pmap_page_set_memattr(mnew, object->memattr); - if (vm_page_replace(mnew, object, pindex) != m) - panic("vm_page_cowfault: invalid page replacement"); - if (!so_zerocp_fullpage) - pmap_copy_page(m, mnew); - mnew->valid = VM_PAGE_BITS_ALL; - vm_page_dirty(mnew); - mnew->wire_count = m->wire_count - m->cow; - m->wire_count = m->cow; - vm_page_unlock(m); - } -} - -void -vm_page_cowclear(vm_page_t m) -{ - - vm_page_lock_assert(m, MA_OWNED); - if (m->cow) { - m->cow--; - /* - * let vm_fault add back write permission lazily - */ - } - /* - * sf_buf_free() will free the page, so we needn't do it here - */ -} - -int -vm_page_cowsetup(vm_page_t m) -{ - - vm_page_lock_assert(m, MA_OWNED); - if ((m->flags & PG_FICTITIOUS) != 0 || - (m->oflags & VPO_UNMANAGED) != 0 || - m->cow == USHRT_MAX - 1 || !VM_OBJECT_TRYWLOCK(m->object)) - return (EBUSY); - m->cow++; - pmap_remove_write(m); - VM_OBJECT_WUNLOCK(m->object); - return (0); -} - #ifdef INVARIANTS void vm_page_object_lock_assert(vm_page_t m) Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Mon Sep 16 06:15:15 2013 (r255607) +++ head/sys/vm/vm_page.h Mon Sep 16 06:25:54 2013 (r255608) @@ -142,23 +142,21 @@ struct vm_page { vm_pindex_t pindex; /* offset into object (O,P) */ vm_paddr_t phys_addr; /* physical address of page */ struct md_page md; /* machine dependant stuff */ + u_int wire_count; /* wired down maps refs (P) */ + volatile u_int busy_lock; /* busy owners lock */ + uint16_t hold_count; /* page hold count (P) */ + uint16_t flags; /* page PG_* flags (P) */ + uint8_t aflags; /* access is atomic */ + uint8_t oflags; /* page VPO_* flags (O) */ uint8_t queue; /* page queue index (P,Q) */ int8_t segind; - short hold_count; /* page hold count (P) */ uint8_t order; /* index of the buddy queue */ uint8_t pool; - u_short cow; /* page cow mapping count (P) */ - u_int wire_count; /* wired down maps refs (P) */ - uint8_t aflags; /* access is atomic */ - uint8_t oflags; /* page VPO_* flags (O) */ - uint16_t flags; /* page PG_* flags (P) */ u_char act_count; /* page usage count (P) */ - u_char __pad0; /* unused padding */ /* NOTE that these must support one bit per DEV_BSIZE in a page */ /* so, on normal X86 kernels, they must be at least 8 bits wide */ vm_page_bits_t valid; /* map of valid DEV_BSIZE chunks (O) */ vm_page_bits_t dirty; /* map of dirty DEV_BSIZE chunks (M) */ - volatile u_int busy_lock; /* busy owners lock */ }; /* @@ -482,9 +480,6 @@ vm_page_bits_t vm_page_bits(int base, in void vm_page_zero_invalid(vm_page_t m, boolean_t setvalid); void vm_page_free_toq(vm_page_t m); void vm_page_zero_idle_wakeup(void); -void vm_page_cowfault (vm_page_t); -int vm_page_cowsetup(vm_page_t); -void vm_page_cowclear (vm_page_t); void vm_page_dirty_KBI(vm_page_t m); void vm_page_lock_KBI(vm_page_t m, const char *file, int line); From owner-svn-src-all@FreeBSD.ORG Mon Sep 16 10:04:20 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 885B6603; Mon, 16 Sep 2013 10:04:20 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 751032C4C; Mon, 16 Sep 2013 10:04:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8GA4KE0061767; Mon, 16 Sep 2013 10:04:20 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8GA4KWC061765; Mon, 16 Sep 2013 10:04:20 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201309161004.r8GA4KWC061765@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 16 Sep 2013 10:04:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255609 - stable/9/sys/dev/usb/controller X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Sep 2013 10:04:20 -0000 Author: hselasky Date: Mon Sep 16 10:04:19 2013 New Revision: 255609 URL: http://svnweb.freebsd.org/changeset/base/255609 Log: MFC r255356: Revert parts of r245132 and r245175. We don't need to write to the IMAN register to clear the pending interrupt status bits. This patch tries to solve problems seen on the MacBook Air, as reported by Johannes Lundberg Modified: stable/9/sys/dev/usb/controller/xhci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/9/sys/dev/usb/controller/xhci.c Mon Sep 16 06:25:54 2013 (r255608) +++ stable/9/sys/dev/usb/controller/xhci.c Mon Sep 16 10:04:19 2013 (r255609) @@ -1446,7 +1446,6 @@ void xhci_interrupt(struct xhci_softc *sc) { uint32_t status; - uint32_t iman; USB_BUS_LOCK(&sc->sc_bus); @@ -1461,15 +1460,6 @@ xhci_interrupt(struct xhci_softc *sc) DPRINTFN(16, "real interrupt (status=0x%08x)\n", status); if (status & XHCI_STS_EINT) { - - /* acknowledge pending event */ - iman = XREAD4(sc, runt, XHCI_IMAN(0)); - - /* reset interrupt */ - XWRITE4(sc, runt, XHCI_IMAN(0), iman); - - DPRINTFN(16, "real interrupt (iman=0x%08x)\n", iman); - /* check for event(s) */ xhci_interrupt_poll(sc); } From owner-svn-src-all@FreeBSD.ORG Mon Sep 16 10:06:41 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2D86B771; Mon, 16 Sep 2013 10:06:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1A5CC2C6E; Mon, 16 Sep 2013 10:06:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8GA6eBR063002; Mon, 16 Sep 2013 10:06:40 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8GA6ek2063000; Mon, 16 Sep 2013 10:06:40 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201309161006.r8GA6ek2063000@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 16 Sep 2013 10:06:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r255610 - stable/8/sys/dev/usb/controller X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Sep 2013 10:06:41 -0000 Author: hselasky Date: Mon Sep 16 10:06:40 2013 New Revision: 255610 URL: http://svnweb.freebsd.org/changeset/base/255610 Log: MFC r255356: Revert parts of r245132 and r245175. We don't need to write to the IMAN register to clear the pending interrupt status bits. This patch tries to solve problems seen on the MacBook Air, as reported by Johannes Lundberg Modified: stable/8/sys/dev/usb/controller/xhci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/8/sys/dev/usb/controller/xhci.c Mon Sep 16 10:04:19 2013 (r255609) +++ stable/8/sys/dev/usb/controller/xhci.c Mon Sep 16 10:06:40 2013 (r255610) @@ -1446,7 +1446,6 @@ void xhci_interrupt(struct xhci_softc *sc) { uint32_t status; - uint32_t iman; USB_BUS_LOCK(&sc->sc_bus); @@ -1461,15 +1460,6 @@ xhci_interrupt(struct xhci_softc *sc) DPRINTFN(16, "real interrupt (status=0x%08x)\n", status); if (status & XHCI_STS_EINT) { - - /* acknowledge pending event */ - iman = XREAD4(sc, runt, XHCI_IMAN(0)); - - /* reset interrupt */ - XWRITE4(sc, runt, XHCI_IMAN(0), iman); - - DPRINTFN(16, "real interrupt (iman=0x%08x)\n", iman); - /* check for event(s) */ xhci_interrupt_poll(sc); } From owner-svn-src-all@FreeBSD.ORG Mon Sep 16 10:34:44 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C61ACC87; Mon, 16 Sep 2013 10:34:44 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B33E22E40; Mon, 16 Sep 2013 10:34:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8GAYiN2078473; Mon, 16 Sep 2013 10:34:44 GMT (envelope-from zbb@svn.freebsd.org) Received: (from zbb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8GAYiuY078472; Mon, 16 Sep 2013 10:34:44 GMT (envelope-from zbb@svn.freebsd.org) Message-Id: <201309161034.r8GAYiuY078472@svn.freebsd.org> From: Zbigniew Bodek Date: Mon, 16 Sep 2013 10:34:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255611 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Sep 2013 10:34:44 -0000 Author: zbb Date: Mon Sep 16 10:34:44 2013 New Revision: 255611 URL: http://svnweb.freebsd.org/changeset/base/255611 Log: Write protect base page after superpage demotion so that it may repromote When clearing the modification status of the superpage, one of the base pages produced during demotion should be marked as write disabled. The intention is that subsequent write access may repromote. In the current implementation this was done wrong as write permission was granted instead of forbidden. Approved by: cognet (mentor) Approved by: re Modified: head/sys/arm/arm/pmap-v6.c Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Mon Sep 16 10:06:40 2013 (r255610) +++ head/sys/arm/arm/pmap-v6.c Mon Sep 16 10:34:44 2013 (r255611) @@ -987,7 +987,7 @@ pmap_clearbit(struct vm_page *m, u_int m ("pmap_clearbit: no PV " "entry for managed mapping")); pve->pv_flags &= ~PVF_WRITE; - *ptep &= ~L2_APX; + *ptep |= L2_APX; PTE_SYNC(ptep); } } From owner-svn-src-all@FreeBSD.ORG Mon Sep 16 10:39:36 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0FEEF1000; Mon, 16 Sep 2013 10:39:36 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F0FB72EE3; Mon, 16 Sep 2013 10:39:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8GAdZZ1079546; Mon, 16 Sep 2013 10:39:35 GMT (envelope-from zbb@svn.freebsd.org) Received: (from zbb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8GAdZEn079545; Mon, 16 Sep 2013 10:39:35 GMT (envelope-from zbb@svn.freebsd.org) Message-Id: <201309161039.r8GAdZEn079545@svn.freebsd.org> From: Zbigniew Bodek Date: Mon, 16 Sep 2013 10:39:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255612 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Sep 2013 10:39:36 -0000 Author: zbb Date: Mon Sep 16 10:39:35 2013 New Revision: 255612 URL: http://svnweb.freebsd.org/changeset/base/255612 Log: Implement pmap_advise() for ARMv6/v7 pmap module Apply the given advice to the specified range of addresses within the given pmap. Depending on the advice, clear the referenced and/or modified flags in each mapping. Superpage within the given range will be demoted or destroyed. Reviewed by: alc Approved by: cognet (mentor) Approved by: re Modified: head/sys/arm/arm/pmap-v6.c Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Mon Sep 16 10:34:44 2013 (r255611) +++ head/sys/arm/arm/pmap-v6.c Mon Sep 16 10:39:35 2013 (r255612) @@ -4767,11 +4767,116 @@ pmap_is_modified(vm_page_t m) } /* - * This function is advisory. + * Apply the given advice to the specified range of addresses within the + * given pmap. Depending on the advice, clear the referenced and/or + * modified flags in each mapping. */ void pmap_advise(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, int advice) { + struct l2_bucket *l2b; + struct pv_entry *pve; + pd_entry_t *pl1pd, l1pd; + pt_entry_t *ptep, opte, pte; + vm_offset_t next_bucket; + vm_page_t m; + + if (advice != MADV_DONTNEED && advice != MADV_FREE) + return; + rw_wlock(&pvh_global_lock); + PMAP_LOCK(pmap); + for (; sva < eva; sva = next_bucket) { + next_bucket = L2_NEXT_BUCKET(sva); + if (next_bucket < sva) + next_bucket = eva; + pl1pd = &pmap->pm_l1->l1_kva[L1_IDX(sva)]; + l1pd = *pl1pd; + if ((l1pd & L1_TYPE_MASK) == L1_S_PROTO) { + if (pmap == pmap_kernel()) + continue; + if (!pmap_demote_section(pmap, sva)) { + /* + * The large page mapping was destroyed. + */ + continue; + } + /* + * Unless the page mappings are wired, remove the + * mapping to a single page so that a subsequent + * access may repromote. Since the underlying + * l2_bucket is fully populated, this removal + * never frees an entire l2_bucket. + */ + l2b = pmap_get_l2_bucket(pmap, sva); + KASSERT(l2b != NULL, + ("pmap_advise: no l2 bucket for " + "va 0x%#x, pmap 0x%p", sva, pmap)); + ptep = &l2b->l2b_kva[l2pte_index(sva)]; + opte = *ptep; + m = PHYS_TO_VM_PAGE(l2pte_pa(*ptep)); + KASSERT(m != NULL, + ("pmap_advise: no vm_page for demoted superpage")); + pve = pmap_find_pv(&m->md, pmap, sva); + KASSERT(pve != NULL, + ("pmap_advise: no PV entry for managed mapping")); + if ((pve->pv_flags & PVF_WIRED) == 0) { + pmap_free_l2_bucket(pmap, l2b, 1); + pve = pmap_remove_pv(m, pmap, sva); + pmap_free_pv_entry(pmap, pve); + *ptep = 0; + PTE_SYNC(ptep); + if (pmap_is_current(pmap)) { + if (PTE_BEEN_EXECD(opte)) + cpu_tlb_flushID_SE(sva); + else if (PTE_BEEN_REFD(opte)) + cpu_tlb_flushD_SE(sva); + } + } + } + if (next_bucket > eva) + next_bucket = eva; + l2b = pmap_get_l2_bucket(pmap, sva); + if (l2b == NULL) + continue; + for (ptep = &l2b->l2b_kva[l2pte_index(sva)]; + sva != next_bucket; ptep++, sva += PAGE_SIZE) { + opte = pte = *ptep; + if ((opte & L2_S_PROTO) == 0) + continue; + m = PHYS_TO_VM_PAGE(l2pte_pa(opte)); + if (m == NULL || (m->oflags & VPO_UNMANAGED) != 0) + continue; + else if (L2_S_WRITABLE(opte)) { + if (advice == MADV_DONTNEED) { + /* + * Don't need to mark the page + * dirty as it was already marked as + * such in pmap_fault_fixup() or + * pmap_enter_locked(). + * Just clear the state. + */ + } else + pte |= L2_APX; + + pte &= ~L2_S_REF; + *ptep = pte; + PTE_SYNC(ptep); + } else if (L2_S_REFERENCED(opte)) { + pte &= ~L2_S_REF; + *ptep = pte; + PTE_SYNC(ptep); + } else + continue; + if (pmap_is_current(pmap)) { + if (PTE_BEEN_EXECD(opte)) + cpu_tlb_flushID_SE(sva); + else if (PTE_BEEN_REFD(opte)) + cpu_tlb_flushD_SE(sva); + } + } + } + rw_wunlock(&pvh_global_lock); + PMAP_UNLOCK(pmap); } /* From owner-svn-src-all@FreeBSD.ORG Mon Sep 16 10:46:59 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 651004A8; Mon, 16 Sep 2013 10:46:59 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4C5992F73; Mon, 16 Sep 2013 10:46:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8GAkxnQ084657; Mon, 16 Sep 2013 10:46:59 GMT (envelope-from zbb@svn.freebsd.org) Received: (from zbb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8GAkxEM084656; Mon, 16 Sep 2013 10:46:59 GMT (envelope-from zbb@svn.freebsd.org) Message-Id: <201309161046.r8GAkxEM084656@svn.freebsd.org> From: Zbigniew Bodek Date: Mon, 16 Sep 2013 10:46:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255613 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Sep 2013 10:46:59 -0000 Author: zbb Date: Mon Sep 16 10:46:58 2013 New Revision: 255613 URL: http://svnweb.freebsd.org/changeset/base/255613 Log: Fix GCC build error when building for ARMv6 Apply theravens's idea to move __strong_reference macros into the proper ifdef section. Approved by: cognet (mentor) Approved by: re Modified: head/sys/arm/arm/stdatomic.c Modified: head/sys/arm/arm/stdatomic.c ============================================================================== --- head/sys/arm/arm/stdatomic.c Mon Sep 16 10:39:35 2013 (r255612) +++ head/sys/arm/arm/stdatomic.c Mon Sep 16 10:46:58 2013 (r255613) @@ -834,6 +834,10 @@ EMIT_ALL_OPS_N(1, uint8_t, "ldrb", "strb EMIT_ALL_OPS_N(2, uint16_t, "ldrh", "strh", "streqh") EMIT_ALL_OPS_N(4, uint32_t, "ldr", "str", "streq") +#endif /* _KERNEL */ + +#endif + #ifndef __clang__ __strong_reference(__sync_lock_test_and_set_1_c, __sync_lock_test_and_set_1); __strong_reference(__sync_lock_test_and_set_2_c, __sync_lock_test_and_set_2); @@ -858,8 +862,4 @@ __strong_reference(__sync_fetch_and_xor_ __strong_reference(__sync_fetch_and_xor_4_c, __sync_fetch_and_xor_4); #endif -#endif /* _KERNEL */ - -#endif - #endif /* __SYNC_ATOMICS */ From owner-svn-src-all@FreeBSD.ORG Mon Sep 16 11:27:21 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 99A3FEE9 for ; Mon, 16 Sep 2013 11:27:21 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0C94F24CB for ; Mon, 16 Sep 2013 11:27:20 +0000 (UTC) Received: (qmail 8715 invoked from network); 16 Sep 2013 12:05:37 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 16 Sep 2013 12:05:37 -0000 Message-ID: <5236EB0D.4050303@freebsd.org> Date: Mon, 16 Sep 2013 13:27:09 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: Konstantin Belousov Subject: Re: svn commit: r255608 - in head/sys: conf kern modules/cxgb/cxgb modules/sfxge modules/ti sys vm References: <201309160625.r8G6PtZs044888@svn.freebsd.org> In-Reply-To: <201309160625.r8G6PtZs044888@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Sep 2013 11:27:21 -0000 On 16.09.2013 08:25, Konstantin Belousov wrote: > Author: kib > Date: Mon Sep 16 06:25:54 2013 > New Revision: 255608 > URL: http://svnweb.freebsd.org/changeset/base/255608 > > Log: > Remove zero-copy sockets code. It only worked for anonymous memory, > and the equivalent functionality is now provided by sendfile(2) over > posix shared memory filedescriptor. > > Remove the cow member of struct vm_page, and rearrange the remaining > members. While there, make hold_count unsigned. Thanks, it's good to see it gone. :) -- Andre From owner-svn-src-all@FreeBSD.ORG Mon Sep 16 12:21:01 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CF93C157; Mon, 16 Sep 2013 12:21:01 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-vc0-x22a.google.com (mail-vc0-x22a.google.com [IPv6:2607:f8b0:400c:c03::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 46B842909; Mon, 16 Sep 2013 12:21:01 +0000 (UTC) Received: by mail-vc0-f170.google.com with SMTP id kw10so2875048vcb.29 for ; Mon, 16 Sep 2013 05:21:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=QeFWoC/SpNYQK+98O1Q94Y86ns4aAjJP2d21UVAgUBg=; b=0w6QICdzbWQ4YrrlJj3VuGT42ooIjzFISsbNrzCKczpAz+0ep15r4FXjYpRGDOY7Ds fn4hx1V8IRPBYIc0agKH5qR6SGWnN+mIqmiOEoZTM+kDJSKKLv9xPDPuB4lKpOHnfDCd 8c0YBz//lcaB4rf3hsNnXmpwzbXm9sLP4EEACZH8Wh7aU3eiQsiM7aw+TjgfBNKWAZ7K npt//abJ9ojU662K+8lL7XJGTAO1z7n6gEgd+OvAF7BUfuIJ+mskRQpvqL0RRw/9H4Kn elnSRCo8W1DWJz0Qin4INi6ro4Ym5pvP8LRu4eeffzqpq9Jd0bwa5JfrLaz/ehLueX7g xG3g== X-Received: by 10.221.27.73 with SMTP id rp9mr89077vcb.29.1379334060356; Mon, 16 Sep 2013 05:21:00 -0700 (PDT) MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.58.229.167 with HTTP; Mon, 16 Sep 2013 05:20:20 -0700 (PDT) In-Reply-To: <201309141012.r8EACTW9032484@svn.freebsd.org> References: <201309141012.r8EACTW9032484@svn.freebsd.org> From: Ivan Voras Date: Mon, 16 Sep 2013 14:20:20 +0200 X-Google-Sender-Auth: -y21_rtjgQzQ_FrNZlbQMtxW_rw Message-ID: Subject: Re: svn commit: r255567 - stable/9/sys/geom/zero To: Alexander Motin Content-Type: text/plain; charset=UTF-8 Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Sep 2013 12:21:01 -0000 On 14 September 2013 12:12, Alexander Motin wrote: > Add unmapped BIO support to GEOM ZERO if kern.geom.zero.clear is cleared. > + if (g_zero_clear && (bp->bio_flags & BIO_UNMAPPED) == 0) > memset(bp->bio_data, g_zero_byte, bp->bio_length); Umm, I might be wrong, but won't this basically export random kernel memory to anyone reading from /dev/gzero? From owner-svn-src-all@FreeBSD.ORG Mon Sep 16 12:42:20 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 45379791; Mon, 16 Sep 2013 12:42:20 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bk0-x235.google.com (mail-bk0-x235.google.com [IPv6:2a00:1450:4008:c01::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2C9132A7C; Mon, 16 Sep 2013 12:42:19 +0000 (UTC) Received: by mail-bk0-f53.google.com with SMTP id d7so1466355bkh.26 for ; Mon, 16 Sep 2013 05:42:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=IK9gujTyD/CEzs5FG0gpjZhq63qEta1WhhBQI7b2QUA=; b=ZTEMbU1eHUqi8lrqNjrGy29Q+QXN44VnyEWcVUhIr1v6tgWhZ5MeX+CCEzw1s0Nvz0 ayIr+Hjq2e/WlOuBMMP2y9neEX3XueInsUpk3Bbwqk4iMB0kNddOkcyFIPv8OVo1c3Mr JZRWBUzw0AEn0d5Rep3ly3Q5TQvgHa5KILGnnPMYAlMPzPnnqZPoIuW3y1FT2b/2qfnu u5r0s7tld6kpw5w3DiD7pgIB+tgNBqsaxjZ0Z6KU62QJ913AyWnG6XiUT3oc+PYpvHo4 uLfHJev1ML89cb+xVqbyLNH3MtG325uMjLXupXiXnY+9NIujBajD0rHHZDMZjRqOQ9R/ cWpA== X-Received: by 10.204.123.199 with SMTP id q7mr24693336bkr.10.1379335337405; Mon, 16 Sep 2013 05:42:17 -0700 (PDT) Received: from mavbook.mavhome.dp.ua ([5.248.115.71]) by mx.google.com with ESMTPSA id b6sm7562305bko.16.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 16 Sep 2013 05:42:16 -0700 (PDT) Sender: Alexander Motin Message-ID: <5236FCA6.6070106@FreeBSD.org> Date: Mon, 16 Sep 2013 15:42:14 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130616 Thunderbird/17.0.6 MIME-Version: 1.0 To: Ivan Voras Subject: Re: svn commit: r255567 - stable/9/sys/geom/zero References: <201309141012.r8EACTW9032484@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Sep 2013 12:42:20 -0000 On 16.09.2013 15:20, Ivan Voras wrote: > On 14 September 2013 12:12, Alexander Motin wrote: > >> Add unmapped BIO support to GEOM ZERO if kern.geom.zero.clear is cleared. > >> + if (g_zero_clear && (bp->bio_flags & BIO_UNMAPPED) == 0) >> memset(bp->bio_data, g_zero_byte, bp->bio_length); > > > Umm, I might be wrong, but won't this basically export random kernel > memory to anyone reading from /dev/gzero? I may be wrong, but I think it won't. Buffer for reading is provided by the caller, mapped to KVA and then unmapped back without modifications. If there was some garbage in the buffer, it will remain there, but that is a caller's garbage. There may be exceptions in case of of gstripe and graid3 that allocate own buffers I am not sure they clean before use, but do you know many people using graid3 on top of gzero? -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Mon Sep 16 14:32:57 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 27E684B4; Mon, 16 Sep 2013 14:32:57 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1485B2203; Mon, 16 Sep 2013 14:32:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8GEWugx006276; Mon, 16 Sep 2013 14:32:56 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8GEWuBx006275; Mon, 16 Sep 2013 14:32:56 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201309161432.r8GEWuBx006275@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 16 Sep 2013 14:32:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255614 - head/sys/powerpc/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Sep 2013 14:32:57 -0000 Author: nwhitehorn Date: Mon Sep 16 14:32:56 2013 New Revision: 255614 URL: http://svnweb.freebsd.org/changeset/base/255614 Log: Fix bug in busdma: if segs is a preexisting buffer, we memcpy it into the DMA map. The length of the buffer had not yet been initialized, however, so this would copy gibberish unless it happened to be right by chance. This bug mostly only affected systems with IOMMUs. Approved by: re (gjb) MFC after: 3 days Modified: head/sys/powerpc/powerpc/busdma_machdep.c Modified: head/sys/powerpc/powerpc/busdma_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/busdma_machdep.c Mon Sep 16 10:46:58 2013 (r255613) +++ head/sys/powerpc/powerpc/busdma_machdep.c Mon Sep 16 14:32:56 2013 (r255614) @@ -844,11 +844,11 @@ _bus_dmamap_complete(bus_dma_tag_t dmat, bus_dma_segment_t *segs, int nsegs, int error) { + map->nsegs = nsegs; if (segs != NULL) memcpy(map->segments, segs, map->nsegs*sizeof(segs[0])); else segs = map->segments; - map->nsegs = nsegs; if (dmat->iommu != NULL) IOMMU_MAP(dmat->iommu, map->segments, &map->nsegs, dmat->lowaddr, dmat->highaddr, dmat->alignment, From owner-svn-src-all@FreeBSD.ORG Mon Sep 16 15:10:12 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3C475E56; Mon, 16 Sep 2013 15:10:12 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 29A95249B; Mon, 16 Sep 2013 15:10:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8GFABDK024781; Mon, 16 Sep 2013 15:10:12 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8GFABav024780; Mon, 16 Sep 2013 15:10:11 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201309161510.r8GFABav024780@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 16 Sep 2013 15:10:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255615 - head/sys/powerpc/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Sep 2013 15:10:12 -0000 Author: nwhitehorn Date: Mon Sep 16 15:10:11 2013 New Revision: 255615 URL: http://svnweb.freebsd.org/changeset/base/255615 Log: Add a loader tunable to use only device tree-provided PCI devices. This is needed on some more fragile systems to avoid machine checks when blindly probing the PCI bus. Also reduce ofw_pcibus's priority slightly so that it can be overridden. Approved by: re (gjb) Modified: head/sys/powerpc/ofw/ofw_pcibus.c Modified: head/sys/powerpc/ofw/ofw_pcibus.c ============================================================================== --- head/sys/powerpc/ofw/ofw_pcibus.c Mon Sep 16 14:32:56 2013 (r255614) +++ head/sys/powerpc/ofw/ofw_pcibus.c Mon Sep 16 15:10:11 2013 (r255615) @@ -101,6 +101,9 @@ DRIVER_MODULE(ofw_pcibus, pcib, ofw_pcib MODULE_VERSION(ofw_pcibus, 1); MODULE_DEPEND(ofw_pcibus, pci, 1, 1, 1); +static int ofw_devices_only = 0; +TUNABLE_INT("hw.pci.ofw_devices_only", &ofw_devices_only); + static int ofw_pcibus_probe(device_t dev) { @@ -109,7 +112,7 @@ ofw_pcibus_probe(device_t dev) return (ENXIO); device_set_desc(dev, "OFW PCI bus"); - return (0); + return (BUS_PROBE_DEFAULT); } static int @@ -137,7 +140,8 @@ ofw_pcibus_attach(device_t dev) * functions on multi-function cards. */ - ofw_pcibus_enum_bus(dev, domain, busno); + if (!ofw_devices_only) + ofw_pcibus_enum_bus(dev, domain, busno); return (bus_generic_attach(dev)); } From owner-svn-src-all@FreeBSD.ORG Mon Sep 16 16:43:58 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2AF8FB27; Mon, 16 Sep 2013 16:43:58 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 13D8C2B2D; Mon, 16 Sep 2013 16:43:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8GGhvvp076004; Mon, 16 Sep 2013 16:43:57 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8GGhv97076003; Mon, 16 Sep 2013 16:43:57 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201309161643.r8GGhv97076003@svn.freebsd.org> From: Xin LI Date: Mon, 16 Sep 2013 16:43:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255616 - stable/9/usr.sbin/mtree X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Sep 2013 16:43:58 -0000 Author: delphij Date: Mon Sep 16 16:43:57 2013 New Revision: 255616 URL: http://svnweb.freebsd.org/changeset/base/255616 Log: MFC r255483: Do not emit size for non-regular files. There is nothing that mtree(1) can do in this situation and would cause confusion. Modified: stable/9/usr.sbin/mtree/create.c Directory Properties: stable/9/usr.sbin/mtree/ (props changed) Modified: stable/9/usr.sbin/mtree/create.c ============================================================================== --- stable/9/usr.sbin/mtree/create.c Mon Sep 16 15:10:11 2013 (r255615) +++ stable/9/usr.sbin/mtree/create.c Mon Sep 16 16:43:57 2013 (r255616) @@ -208,7 +208,7 @@ statf(int indent, FTSENT *p) output(indent, &offset, "mode=%#o", p->fts_statp->st_mode & MBITS); if (keys & F_NLINK && p->fts_statp->st_nlink != 1) output(indent, &offset, "nlink=%u", p->fts_statp->st_nlink); - if (keys & F_SIZE) + if (keys & F_SIZE && S_ISREG(p->fts_statp->st_mode)) output(indent, &offset, "size=%jd", (intmax_t)p->fts_statp->st_size); if (keys & F_TIME) From owner-svn-src-all@FreeBSD.ORG Mon Sep 16 16:44:19 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 32A39C5F; Mon, 16 Sep 2013 16:44:19 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1FB0F2B38; Mon, 16 Sep 2013 16:44:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8GGiIYh076216; Mon, 16 Sep 2013 16:44:18 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8GGiIS9076215; Mon, 16 Sep 2013 16:44:18 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201309161644.r8GGiIS9076215@svn.freebsd.org> From: Xin LI Date: Mon, 16 Sep 2013 16:44:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r255617 - stable/8/usr.sbin/mtree X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Sep 2013 16:44:19 -0000 Author: delphij Date: Mon Sep 16 16:44:18 2013 New Revision: 255617 URL: http://svnweb.freebsd.org/changeset/base/255617 Log: MFC r255483: Do not emit size for non-regular files. There is nothing that mtree(1) can do in this situation and would cause confusion. Modified: stable/8/usr.sbin/mtree/create.c Directory Properties: stable/8/usr.sbin/mtree/ (props changed) Modified: stable/8/usr.sbin/mtree/create.c ============================================================================== --- stable/8/usr.sbin/mtree/create.c Mon Sep 16 16:43:57 2013 (r255616) +++ stable/8/usr.sbin/mtree/create.c Mon Sep 16 16:44:18 2013 (r255617) @@ -208,7 +208,7 @@ statf(int indent, FTSENT *p) output(indent, &offset, "mode=%#o", p->fts_statp->st_mode & MBITS); if (keys & F_NLINK && p->fts_statp->st_nlink != 1) output(indent, &offset, "nlink=%u", p->fts_statp->st_nlink); - if (keys & F_SIZE) + if (keys & F_SIZE && S_ISREG(p->fts_statp->st_mode)) output(indent, &offset, "size=%jd", (intmax_t)p->fts_statp->st_size); if (keys & F_TIME) From owner-svn-src-all@FreeBSD.ORG Mon Sep 16 19:29:19 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 77A33CDE; Mon, 16 Sep 2013 19:29:19 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 65ED02755; Mon, 16 Sep 2013 19:29:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8GJTJm7065631; Mon, 16 Sep 2013 19:29:19 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8GJTJXh065630; Mon, 16 Sep 2013 19:29:19 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201309161929.r8GJTJXh065630@svn.freebsd.org> From: Glen Barber Date: Mon, 16 Sep 2013 19:29:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255619 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Sep 2013 19:29:19 -0000 Author: gjb Date: Mon Sep 16 19:29:18 2013 New Revision: 255619 URL: http://svnweb.freebsd.org/changeset/base/255619 Log: Update head/ to -ALPHA2 status. Approved by: re (implicit) Modified: head/sys/conf/newvers.sh Modified: head/sys/conf/newvers.sh ============================================================================== --- head/sys/conf/newvers.sh Mon Sep 16 17:32:02 2013 (r255618) +++ head/sys/conf/newvers.sh Mon Sep 16 19:29:18 2013 (r255619) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.0" -BRANCH="ALPHA1" +BRANCH="ALPHA2" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@FreeBSD.ORG Mon Sep 16 19:37:49 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8E982ECC; Mon, 16 Sep 2013 19:37:49 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6817427DA; Mon, 16 Sep 2013 19:37:49 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 69618B9B3; Mon, 16 Sep 2013 15:37:48 -0400 (EDT) From: John Baldwin To: "Jean-Sebastien Pedron" Subject: Re: svn commit: r255573 - head/sys/dev/drm2/radeon Date: Mon, 16 Sep 2013 12:28:46 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <201309141724.r8EHOgj8060898@svn.freebsd.org> In-Reply-To: <201309141724.r8EHOgj8060898@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201309161228.46123.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 16 Sep 2013 15:37:48 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Sep 2013 19:37:49 -0000 On Saturday, September 14, 2013 1:24:42 pm Jean-Sebastien Pedron wrote: > Author: dumbbell > Date: Sat Sep 14 17:24:41 2013 > New Revision: 255573 > URL: http://svnweb.freebsd.org/changeset/base/255573 > > Log: > drm/radeon: Fix usage of pci_save_state() and pci_restore_state() > > Calling those functions with the drmn device as argument causes a panic, > because it's not a direct child of pci$N. They must be called with the > vgapci device instead. > > This fix is not enough to make suspend/resume work reliably. > > Approved by: re (blanket) Note that the PCI bus layer already does pci_save_state() during suspend and pci_restore_state() during resume, so it is redundant for a driver to do so. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Sep 16 19:58:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B082D6DE; Mon, 16 Sep 2013 19:58:37 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9E3182932; Mon, 16 Sep 2013 19:58:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8GJwbcB080941; Mon, 16 Sep 2013 19:58:37 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8GJwbcg080940; Mon, 16 Sep 2013 19:58:37 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201309161958.r8GJwbcg080940@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 16 Sep 2013 19:58:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255620 - head/sys/i386/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Sep 2013 19:58:37 -0000 Author: kib Date: Mon Sep 16 19:58:37 2013 New Revision: 255620 URL: http://svnweb.freebsd.org/changeset/base/255620 Log: Merge the change r255607 from amd64 to i386. Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week Approved by: re (gjb) Modified: head/sys/i386/i386/pmap.c Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Mon Sep 16 19:29:18 2013 (r255619) +++ head/sys/i386/i386/pmap.c Mon Sep 16 19:58:37 2013 (r255620) @@ -4062,6 +4062,8 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm continue; if (srcptepaddr & PG_PS) { + if ((addr & PDRMASK) != 0 || addr + NBPDR > end_addr) + continue; if (dst_pmap->pm_pdir[ptepindex] == 0 && ((srcptepaddr & PG_MANAGED) == 0 || pmap_pv_insert_pde(dst_pmap, addr, srcptepaddr & From owner-svn-src-all@FreeBSD.ORG Mon Sep 16 20:14:16 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 05355AD2; Mon, 16 Sep 2013 20:14:16 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from mail.made4.biz (unknown [IPv6:2001:41d0:1:7018::1:3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BC6982A4C; Mon, 16 Sep 2013 20:14:15 +0000 (UTC) Received: from 141.7.19.93.rev.sfr.net ([93.19.7.141] helo=magellan.dumbbell.fr) by mail.made4.biz with esmtpsa (TLSv1:DHE-RSA-CAMELLIA256-SHA:256) (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1VLfBU-0004bS-Cu; Mon, 16 Sep 2013 22:14:12 +0200 Message-ID: <5237668D.4060108@FreeBSD.org> Date: Mon, 16 Sep 2013 22:14:05 +0200 From: =?UTF-8?B?SmVhbi1Tw6liYXN0aWVuIFDDqWRyb24=?= User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130913 Thunderbird/17.0.8 MIME-Version: 1.0 To: John Baldwin Subject: Re: svn commit: r255573 - head/sys/dev/drm2/radeon References: <201309141724.r8EHOgj8060898@svn.freebsd.org> <201309161228.46123.jhb@freebsd.org> In-Reply-To: <201309161228.46123.jhb@freebsd.org> X-Enigmail-Version: 1.5.1 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2WLNVRNTIROTDLKALPJPG" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Sep 2013 20:14:16 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2WLNVRNTIROTDLKALPJPG Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 16.09.2013 18:28, John Baldwin wrote: > Note that the PCI bus layer already does pci_save_state() during suspen= d > and pci_restore_state() during resume, so it is redundant for a driver = to > do so. Yes. I mostly wanted to fix the calls for now because it triggers a panic. They'll probably go away, but I'm working on fixing suspend/resume and I was curious if the card state could change between pci_save_state() in pci.c and the same call later in the driver itself. --=20 Jean-S=C3=A9bastien P=C3=A9dron ------enig2WLNVRNTIROTDLKALPJPG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlI3ZpMACgkQa+xGJsFYOlMDOQCfaKZ2F9b4uhJSC+ow947wOU4M E4kAnjnPdftbqCJijB+Gn9Jsm4Xviprx =j76f -----END PGP SIGNATURE----- ------enig2WLNVRNTIROTDLKALPJPG-- From owner-svn-src-all@FreeBSD.ORG Mon Sep 16 20:44:41 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D99001B5; Mon, 16 Sep 2013 20:44:41 +0000 (UTC) (envelope-from edschouten@gmail.com) Received: from mail-vc0-x236.google.com (mail-vc0-x236.google.com [IPv6:2607:f8b0:400c:c03::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 623232C0B; Mon, 16 Sep 2013 20:44:41 +0000 (UTC) Received: by mail-vc0-f182.google.com with SMTP id hf12so3411396vcb.13 for ; Mon, 16 Sep 2013 13:44:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=EXXJJpZR9Xgi+ijWH2BhY/+Ul7aSp6QU8vwAOaQv2Ko=; b=yt6qh3Oi/IAulvyh8Ey8RB/jxTFNnfBilEzzeReJ99ZvGbc4RLG2WLpHKLMNWPeSB7 01CHpZhJeNQf/7Xq8dvwpaSH/tjYB++0vUgXRDxwScLoBsR9I0Y6Q55M6bPJ0yXf26Tc g0RkXwHSUicDmlggAmpqPOOfIiWW2kZGNV/ZXKhR1ndZ1TE0qWDFQa48wRFIGR7sVgQK DkOCTodjtT5LLPZPXZ91wn5rn9m2zwdf9a+f0ONGLsChgAQuDh15i0APPb4pc4nwBXqm 3KYeadIj0ox9y9vQzRCctv0jfMDh+RJZjgjfpwFT28lm6k6nV8jovi1sOBGyCxjhP5MJ mLaA== MIME-Version: 1.0 X-Received: by 10.52.116.74 with SMTP id ju10mr24003908vdb.20.1379364280485; Mon, 16 Sep 2013 13:44:40 -0700 (PDT) Sender: edschouten@gmail.com Received: by 10.220.115.206 with HTTP; Mon, 16 Sep 2013 13:44:40 -0700 (PDT) In-Reply-To: <201309161046.r8GAkxEM084656@svn.freebsd.org> References: <201309161046.r8GAkxEM084656@svn.freebsd.org> Date: Mon, 16 Sep 2013 22:44:40 +0200 X-Google-Sender-Auth: QCDYdoITH8cUBnH2vP6AWxfmooo Message-ID: Subject: Re: svn commit: r255613 - head/sys/arm/arm From: Ed Schouten To: Zbigniew Bodek Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Sep 2013 20:44:41 -0000 2013/9/16 Zbigniew Bodek : > Log: > Fix GCC build error when building for ARMv6 > > Apply theravens's idea to move __strong_reference > macros into the proper ifdef section. > > Approved by: cognet (mentor) > Approved by: re > > Modified: > head/sys/arm/arm/stdatomic.c For some reason, this still breaks the build of the AVILA kernel: /usr/edje/projects/freebsd-head-4/sys/arm/arm/stdatomic.c:842: error: '__sync_lock_test_and_set_1_c' undeclared here (not in a function) /usr/edje/projects/freebsd-head-4/sys/arm/arm/stdatomic.c:842: warning: type defaults to 'int' in declaration of '__sync_lock_test_and_set_1' /usr/edje/projects/freebsd-head-4/sys/arm/arm/stdatomic.c:842: error: '__sync_lock_test_and_set_1' redeclared as different kind of symbol /usr/edje/projects/freebsd-head-4/sys/arm/arm/stdatomic.c:843: error: '__sync_lock_test_and_set_2_c' undeclared here (not in a function) /usr/edje/projects/freebsd-head-4/sys/arm/arm/stdatomic.c:843: warning: type defaults to 'int' in declaration of '__sync_lock_test_and_set_2' /usr/edje/projects/freebsd-head-4/sys/arm/arm/stdatomic.c:843: error: '__sync_lock_test_and_set_2' redeclared as different kind of symbol /usr/edje/projects/freebsd-head-4/sys/arm/arm/stdatomic.c:844: error: '__sync_lock_test_and_set_4_c' undeclared here (not in a function) /usr/edje/projects/freebsd-head-4/sys/arm/arm/stdatomic.c:844: warning: type defaults to 'int' in declaration of '__sync_lock_test_and_set_4' /usr/edje/projects/freebsd-head-4/sys/arm/arm/stdatomic.c:844: error: '__sync_lock_test_and_set_4' redeclared as different kind of symbol /usr/edje/projects/freebsd-head-4/sys/arm/arm/stdatomic.c:845: error: '__sync_val_compare_and_swap_1_c' undeclared here (not in a function) /usr/edje/projects/freebsd-head-4/sys/arm/arm/stdatomic.c:845: warning: type defaults to 'int' in declaration of '__sync_val_compare_and_swap_1' /usr/edje/projects/freebsd-head-4/sys/arm/arm/stdatomic.c:845: error: '__sync_val_compare_and_swap_1' redeclared as different kind of symbol /usr/edje/projects/freebsd-head-4/sys/arm/arm/stdatomic.c:846: error: '__sync_val_compare_and_swap_2_c' undeclared here (not in a function) /usr/edje/projects/freebsd-head-4/sys/arm/arm/stdatomic.c:846: warning: type defaults to 'int' in declaration of '__sync_val_compare_and_swap_2' /usr/edje/projects/freebsd-head-4/sys/arm/arm/stdatomic.c:846: error: '__sync_val_compare_and_swap_2' redeclared as different kind of symbol /usr/edje/projects/freebsd-head-4/sys/arm/arm/stdatomic.c:847: error: '__sync_val_compare_and_swap_4_c' undeclared here (not in a function) /usr/edje/projects/freebsd-head-4/sys/arm/arm/stdatomic.c:847: warning: type defaults to 'int' in declaration of '__sync_val_compare_and_swap_4' /usr/edje/projects/freebsd-head-4/sys/arm/arm/stdatomic.c:847: error: '__sync_val_compare_and_swap_4' redeclared as different kind of symbol /usr/edje/projects/freebsd-head-4/sys/arm/arm/stdatomic.c:848: error: '__sync_fetch_and_add_1_c' undeclared here (not in a function) /usr/edje/projects/freebsd-head-4/sys/arm/arm/stdatomic.c:848: warning: type defaults to 'int' in declaration of '__sync_fetch_and_add_1' /usr/edje/projects/freebsd-head-4/sys/arm/arm/stdatomic.c:848: error: '__sync_fetch_and_add_1' redeclared as different kind of symbol /usr/edje/projects/freebsd-head-4/sys/arm/arm/stdatomic.c:849: error: '__sync_fetch_and_add_2_c' undeclared here (not in a function) /usr/edje/projects/freebsd-head-4/sys/arm/arm/stdatomic.c:849: warning: type defaults to 'int' in declaration of '__sync_fetch_and_add_2' /usr/edje/projects/freebsd-head-4/sys/arm/arm/stdatomic.c:849: error: '__sync_fetch_and_add_2' redeclared as different kind of symbol /usr/edje/projects/freebsd-head-4/sys/arm/arm/stdatomic.c:850: error: '__sync_fetch_and_add_4_c' undeclared here (not in a function) /usr/edje/projects/freebsd-head-4/sys/arm/arm/stdatomic.c:850: warning: type defaults to 'int' in declaration of '__sync_fetch_and_add_4' /usr/edje/projects/freebsd-head-4/sys/arm/arm/stdatomic.c:850: error: '__sync_fetch_and_add_4' redeclared as different kind of symbol /usr/edje/projects/freebsd-head-4/sys/arm/arm/stdatomic.c:851: error: '__sync_fetch_and_and_1_c' undeclared here (not in a function) /usr/edje/projects/freebsd-head-4/sys/arm/arm/stdatomic.c:851: warning: type defaults to 'int' in declaration of '__sync_fetch_and_and_1' /usr/edje/projects/freebsd-head-4/sys/arm/arm/stdatomic.c:851: error: '__sync_fetch_and_and_1' redeclared as different kind of symbol /usr/edje/projects/freebsd-head-4/sys/arm/arm/stdatomic.c:852: error: '__sync_fetch_and_and_2_c' undeclared here (not in a function) /usr/edje/projects/freebsd-head-4/sys/arm/arm/stdatomic.c:852: warning: type defaults to 'int' in declaration of '__sync_fetch_and_and_2' /usr/edje/projects/freebsd-head-4/sys/arm/arm/stdatomic.c:852: error: '__sync_fetch_and_and_2' redeclared as different kind of symbol /usr/edje/projects/freebsd-head-4/sys/arm/arm/stdatomic.c:853: error: '__sync_fetch_and_and_4_c' undeclared here (not in a function) /usr/edje/projects/freebsd-head-4/sys/arm/arm/stdatomic.c:853: warning: type defaults to 'int' in declaration of '__sync_fetch_and_and_4' /usr/edje/projects/freebsd-head-4/sys/arm/arm/stdatomic.c:853: error: '__sync_fetch_and_and_4' redeclared as different kind of symbol /usr/edje/projects/freebsd-head-4/sys/arm/arm/stdatomic.c:854: error: '__sync_fetch_and_sub_1_c' undeclared here (not in a function) /usr/edje/projects/freebsd-head-4/sys/arm/arm/stdatomic.c:854: warning: type defaults to 'int' in declaration of '__sync_fetch_and_sub_1' /usr/edje/projects/freebsd-head-4/sys/arm/arm/stdatomic.c:854: error: '__sync_fetch_and_sub_1' redeclared as different kind of symbol /usr/edje/projects/freebsd-head-4/sys/arm/arm/stdatomic.c:855: error: '__sync_fetch_and_sub_2_c' undeclared here (not in a function) etc. -- Ed Schouten From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 00:13:42 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CD40A92C; Tue, 17 Sep 2013 00:13:42 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BA6492ACF; Tue, 17 Sep 2013 00:13:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8H0DgNl020552; Tue, 17 Sep 2013 00:13:42 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8H0DgTC020551; Tue, 17 Sep 2013 00:13:42 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201309170013.r8H0DgTC020551@svn.freebsd.org> From: Glen Barber Date: Tue, 17 Sep 2013 00:13:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255622 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 00:13:42 -0000 Author: gjb Date: Tue Sep 17 00:13:42 2013 New Revision: 255622 URL: http://svnweb.freebsd.org/changeset/base/255622 Log: Document that the 'unbound' user is required for installworld since the import of ldns/unbound. Approved by: re (delphij) Sponsored by: The FreeBSD Foundation Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Mon Sep 16 23:09:20 2013 (r255621) +++ head/UPDATING Tue Sep 17 00:13:42 2013 (r255622) @@ -31,6 +31,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20130916: + With the addition of unbound(8), a new unbound user is now + required during installworld. "mergemaster -p" can be used to + add the user prior to installworld, as documented in the handbook. + 20130911: OpenSSH is now built with DNSSEC support, and will by default silently trust signed SSHFP records. This can be controlled with From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 01:54:14 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0BE1115F; Tue, 17 Sep 2013 01:54:14 +0000 (UTC) (envelope-from bryanv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EE44D20F1; Tue, 17 Sep 2013 01:54:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8H1sD1X073946; Tue, 17 Sep 2013 01:54:13 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8H1sDho073944; Tue, 17 Sep 2013 01:54:13 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201309170154.r8H1sDho073944@svn.freebsd.org> From: Bryan Venteicher Date: Tue, 17 Sep 2013 01:54:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255623 - in head/sys: amd64/conf i386/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 01:54:14 -0000 Author: bryanv Date: Tue Sep 17 01:54:13 2013 New Revision: 255623 URL: http://svnweb.freebsd.org/changeset/base/255623 Log: Add vmx(4) to i386 and amd64 GENERIC Approved by: re (gjb) Modified: head/sys/amd64/conf/GENERIC head/sys/i386/conf/GENERIC Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Tue Sep 17 00:13:42 2013 (r255622) +++ head/sys/amd64/conf/GENERIC Tue Sep 17 01:54:13 2013 (r255623) @@ -341,3 +341,5 @@ device virtio_blk # VirtIO Block device device virtio_scsi # VirtIO SCSI device device virtio_balloon # VirtIO Memory Balloon device +# VMware support +device vmx # VMware VMXNET3 Ethernet Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Tue Sep 17 00:13:42 2013 (r255622) +++ head/sys/i386/conf/GENERIC Tue Sep 17 01:54:13 2013 (r255623) @@ -354,3 +354,6 @@ device vtnet # VirtIO Ethernet device device virtio_blk # VirtIO Block device device virtio_scsi # VirtIO SCSI device device virtio_balloon # VirtIO Memory Balloon device + +# VMware support +device vmx # VMware VMXNET3 Ethernet From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 04:24:35 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2CCA8690; Tue, 17 Sep 2013 04:24:35 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1A88A28AD; Tue, 17 Sep 2013 04:24:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8H4OYo5054584; Tue, 17 Sep 2013 04:24:34 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8H4OYDQ054583; Tue, 17 Sep 2013 04:24:34 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201309170424.r8H4OYDQ054583@svn.freebsd.org> From: Glen Barber Date: Tue, 17 Sep 2013 04:24:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255624 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 04:24:35 -0000 Author: gjb Date: Tue Sep 17 04:24:34 2013 New Revision: 255624 URL: http://svnweb.freebsd.org/changeset/base/255624 Log: - Reword the 20121201 entry. - Clean up minor whitespace nit. Approved by: re (hrs) Sponsored by: The FreeBSD Foundation Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue Sep 17 01:54:13 2013 (r255623) +++ head/UPDATING Tue Sep 17 04:24:34 2013 (r255624) @@ -63,9 +63,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 kdump, procstat, rwho, rwhod, uniq. 20130903: - AES-NI intrinsic support has been added to gcc. The AES-NI module - has been updated to use this support. A new gcc is required to build - the aesni module on both i386 and amd64. + AES-NI intrinsic support has been added to gcc. The AES-NI module + has been updated to use this support. A new gcc is required to build + the aesni module on both i386 and amd64. 20130827: Thomas Dickey (vendor author thereof) reports that dialog(1) since @@ -307,8 +307,8 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 20121201: With the addition of auditdistd(8), a new auditdistd user is now - depended on during installworld. "mergemaster -p" can be used to add - the user prior to installworld, as documented in the handbook. + required during installworld. "mergemaster -p" can be used to + add the user prior to installworld, as documented in the handbook. 20121117: The sin6_scope_id member variable in struct sockaddr_in6 is now From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 06:37:22 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5187AD08; Tue, 17 Sep 2013 06:37:22 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3EE6C2E26; Tue, 17 Sep 2013 06:37:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8H6bMML024420; Tue, 17 Sep 2013 06:37:22 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8H6bMUV024417; Tue, 17 Sep 2013 06:37:22 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201309170637.r8H6bMUV024417@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 17 Sep 2013 06:37:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255625 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 06:37:22 -0000 Author: glebius Date: Tue Sep 17 06:37:21 2013 New Revision: 255625 URL: http://svnweb.freebsd.org/changeset/base/255625 Log: Fix assertion in sendfile_readpage() to assert only the validity of requested amount of data in a page. Move assertion down below object unlock. Approved by: re (kib) Sponsored by: Nginx, Inc. Sponsored by: Netflix Modified: head/sys/kern/uipc_syscalls.c Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Tue Sep 17 04:24:34 2013 (r255624) +++ head/sys/kern/uipc_syscalls.c Tue Sep 17 06:37:21 2013 (r255625) @@ -2076,10 +2076,10 @@ free_page: vm_page_free(m); vm_page_unlock(m); } - VM_OBJECT_WUNLOCK(obj); - KASSERT(error != 0 || (m->wire_count > 0 && m->valid == - VM_PAGE_BITS_ALL), + KASSERT(error != 0 || (m->wire_count > 0 && + vm_page_is_valid(m, off & PAGE_MASK, xfsize)), ("wrong page state m %p", m)); + VM_OBJECT_WUNLOCK(obj); return (error); } From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 07:35:28 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3E692932; Tue, 17 Sep 2013 07:35:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2B8122112; Tue, 17 Sep 2013 07:35:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8H7ZRag056972; Tue, 17 Sep 2013 07:35:27 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8H7ZRDD056968; Tue, 17 Sep 2013 07:35:27 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201309170735.r8H7ZRDD056968@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 17 Sep 2013 07:35:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255626 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 07:35:28 -0000 Author: kib Date: Tue Sep 17 07:35:26 2013 New Revision: 255626 URL: http://svnweb.freebsd.org/changeset/base/255626 Log: PG_SLAB no longer serves a useful purpose, since m->object is no longer abused to store pointer to slab. Remove it. Reviewed by: alc Sponsored by: The FreeBSD Foundation Approved by: re (hrs) Modified: head/sys/vm/uma_int.h head/sys/vm/vm_page.c head/sys/vm/vm_page.h head/sys/vm/vm_reserv.c Modified: head/sys/vm/uma_int.h ============================================================================== --- head/sys/vm/uma_int.h Tue Sep 17 06:37:21 2013 (r255625) +++ head/sys/vm/uma_int.h Tue Sep 17 07:35:26 2013 (r255626) @@ -404,15 +404,9 @@ static __inline uma_slab_t vtoslab(vm_offset_t va) { vm_page_t p; - uma_slab_t slab; p = PHYS_TO_VM_PAGE(pmap_kextract(va)); - slab = (uma_slab_t )p->plinks.s.pv; - - if (p->flags & PG_SLAB) - return (slab); - else - return (NULL); + return ((uma_slab_t)p->plinks.s.pv); } static __inline void @@ -422,7 +416,6 @@ vsetslab(vm_offset_t va, uma_slab_t slab p = PHYS_TO_VM_PAGE(pmap_kextract(va)); p->plinks.s.pv = slab; - p->flags |= PG_SLAB; } /* Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Tue Sep 17 06:37:21 2013 (r255625) +++ head/sys/vm/vm_page.c Tue Sep 17 07:35:26 2013 (r255626) @@ -968,8 +968,7 @@ vm_page_insert_after(vm_page_t m, vm_obj KASSERT(m->object == NULL, ("vm_page_insert_after: page already inserted")); if (mpred != NULL) { - KASSERT(mpred->object == object || - (mpred->flags & PG_SLAB) != 0, + KASSERT(mpred->object == object, ("vm_page_insert_after: object doesn't contain mpred")); KASSERT(mpred->pindex < pindex, ("vm_page_insert_after: mpred doesn't precede pindex")); @@ -1019,8 +1018,7 @@ vm_page_insert_radixdone(vm_page_t m, vm KASSERT(object != NULL && m->object == object, ("vm_page_insert_radixdone: page %p has inconsistent object", m)); if (mpred != NULL) { - KASSERT(mpred->object == object || - (mpred->flags & PG_SLAB) != 0, + KASSERT(mpred->object == object, ("vm_page_insert_after: object doesn't contain mpred")); KASSERT(mpred->pindex < m->pindex, ("vm_page_insert_after: mpred doesn't precede pindex")); Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Tue Sep 17 06:37:21 2013 (r255625) +++ head/sys/vm/vm_page.h Tue Sep 17 07:35:26 2013 (r255626) @@ -325,7 +325,6 @@ extern struct mtx_padalign pa_lock[]; #define PG_FICTITIOUS 0x0004 /* physical page doesn't exist */ #define PG_ZERO 0x0008 /* page is zeroed */ #define PG_MARKER 0x0010 /* special queue marker page */ -#define PG_SLAB 0x0020 /* object pointer is actually a slab */ #define PG_WINATCFLS 0x0040 /* flush dirty page on inactive q */ #define PG_NODUMP 0x0080 /* don't include this page in a dump */ #define PG_UNHOLDFREE 0x0100 /* delayed free of a held page */ Modified: head/sys/vm/vm_reserv.c ============================================================================== --- head/sys/vm/vm_reserv.c Tue Sep 17 06:37:21 2013 (r255625) +++ head/sys/vm/vm_reserv.c Tue Sep 17 07:35:26 2013 (r255626) @@ -502,8 +502,7 @@ vm_reserv_alloc_page(vm_object_t object, * Look for an existing reservation. */ if (mpred != NULL) { - KASSERT(mpred->object == object || - (mpred->flags & PG_SLAB) != 0, + KASSERT(mpred->object == object, ("vm_reserv_alloc_page: object doesn't contain mpred")); KASSERT(mpred->pindex < pindex, ("vm_reserv_alloc_page: mpred doesn't precede pindex")); From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 07:41:09 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 43E69BE8; Tue, 17 Sep 2013 07:41:09 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 321C02185; Tue, 17 Sep 2013 07:41:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8H7f9pw060237; Tue, 17 Sep 2013 07:41:09 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8H7f9r7060236; Tue, 17 Sep 2013 07:41:09 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309170741.r8H7f9r7060236@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Tue, 17 Sep 2013 07:41:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255627 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 07:41:09 -0000 Author: des Date: Tue Sep 17 07:41:08 2013 New Revision: 255627 URL: http://svnweb.freebsd.org/changeset/base/255627 Log: Set the correct path for LIBUNBOUND. Approved by: re (blanket) Modified: head/share/mk/bsd.libnames.mk Modified: head/share/mk/bsd.libnames.mk ============================================================================== --- head/share/mk/bsd.libnames.mk Tue Sep 17 07:35:26 2013 (r255626) +++ head/share/mk/bsd.libnames.mk Tue Sep 17 07:41:08 2013 (r255627) @@ -165,7 +165,7 @@ LIBUFS?= ${DESTDIR}${LIBDIR}/libufs.a LIBUGIDFW?= ${DESTDIR}${LIBDIR}/libugidfw.a LIBUMEM?= ${DESTDIR}${LIBDIR}/libumem.a .if ${MK_UNBOUND} != "no" -LIBUNBOUND?= ${DESTDIR}${LIBDIR}/libunbound.a +LIBUNBOUND?= ${DESTDIR}${LIBPRIVATEDIR}/libunbound.a .endif LIBUSBHID?= ${DESTDIR}${LIBDIR}/libusbhid.a LIBUSB?= ${DESTDIR}${LIBDIR}/libusb.a From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 08:43:13 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2C063E48; Tue, 17 Sep 2013 08:43:13 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1AFD92577; Tue, 17 Sep 2013 08:43:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8H8hCUL092909; Tue, 17 Sep 2013 08:43:12 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8H8hCaE092908; Tue, 17 Sep 2013 08:43:12 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201309170843.r8H8hCaE092908@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 17 Sep 2013 08:43:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r255628 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 08:43:13 -0000 Author: trasz Date: Tue Sep 17 08:43:12 2013 New Revision: 255628 URL: http://svnweb.freebsd.org/changeset/base/255628 Log: Explicitly require Security Officer's approval for kernel PRNG bits. Note that there is ongoing discussion about approval requirement for userland PRNG bits. Reviewed by: so (des) Approved by: core (jhb) Modified: svnadmin/conf/approvers Modified: svnadmin/conf/approvers ============================================================================== --- svnadmin/conf/approvers Tue Sep 17 07:41:08 2013 (r255627) +++ svnadmin/conf/approvers Tue Sep 17 08:43:12 2013 (r255628) @@ -32,3 +32,7 @@ ^svnadmin/conf/approvers (core|re) ^svnadmin/conf/access core ^head/LOCKS core +^head/sys/dev/random (security-officer|so|secteam|core) +^head/sys/libkern/arc4random.c (security-officer|so|secteam|core) +^stable/[7-9]/sys/dev/random (security-officer|so|secteam|core) +^stable/[7-9]/sys/libkern/arc4random.c (security-officer|so|secteam|core) From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 09:29:27 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AF3E647B; Tue, 17 Sep 2013 09:29:27 +0000 (UTC) (envelope-from zbodek@gmail.com) Received: from mail-wi0-x22f.google.com (mail-wi0-x22f.google.com [IPv6:2a00:1450:400c:c05::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 02BB32899; Tue, 17 Sep 2013 09:29:26 +0000 (UTC) Received: by mail-wi0-f175.google.com with SMTP id ez12so4639974wid.14 for ; Tue, 17 Sep 2013 02:29:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=dQLSJzS/iKbdrm3vQwqcDLwFbHcassUOMXov+Ho7CsM=; b=M//QOdN2e65fdJp2uBk8z4C/EbvLmrn5T+8VBV0pCE4P57nD65AWMn76HMZiAbAF+p Ynw4D3sgopcczThiOIeNsFokUYuciHmJPdbWeaAaKttHT6K4vivVKXt3Er+Ez7Fp6b3t vt1FlJvbSGEn4uKHduZPycLNwqZpEnWYaqpsndl64W4U1c99/sKu2+q0t+mYlbVjkTpG nekQe8Il0McZkX6+gPq83ztow0xlZmO0iybafkVArY6e9aLRbTS6spfKCaol0iV40izE QdQA/wUIPkLcx1xM7eCwduHxbAlC37n3xjQCf/d4ApeHtMOvghhDacQaPsxuNCfCh8qc K5qQ== MIME-Version: 1.0 X-Received: by 10.194.22.97 with SMTP id c1mr1010778wjf.43.1379410165415; Tue, 17 Sep 2013 02:29:25 -0700 (PDT) Sender: zbodek@gmail.com Received: by 10.217.38.69 with HTTP; Tue, 17 Sep 2013 02:29:25 -0700 (PDT) In-Reply-To: References: <201309161046.r8GAkxEM084656@svn.freebsd.org> Date: Tue, 17 Sep 2013 11:29:25 +0200 X-Google-Sender-Auth: KtFwg32P6g7Kjvi5xDHj-CK8s_8 Message-ID: Subject: Re: svn commit: r255613 - head/sys/arm/arm From: Zbigniew Bodek To: Ed Schouten Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 09:29:27 -0000 2013/9/16 Ed Schouten > 2013/9/16 Zbigniew Bodek : > > Log: > > Fix GCC build error when building for ARMv6 > > > > Apply theravens's idea to move __strong_reference > > macros into the proper ifdef section. > > > > Approved by: cognet (mentor) > > Approved by: re > > > > Modified: > > head/sys/arm/arm/stdatomic.c > > For some reason, this still breaks the build of the AVILA kernel: > > Hello Ed, You mean that this doesn't help for AVILA? To be precise the patch is for ARMv6/v7 issues and AVILA is ARMv5te? Nevertheless if the problem occurs for ARMs < v6 then another patch for that needs to be done. Best regards Zbyszek From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 10:36:25 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 20B1A63D; Tue, 17 Sep 2013 10:36:25 +0000 (UTC) (envelope-from zbodek@gmail.com) Received: from mail-wi0-x229.google.com (mail-wi0-x229.google.com [IPv6:2a00:1450:400c:c05::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 647182C4D; Tue, 17 Sep 2013 10:36:24 +0000 (UTC) Received: by mail-wi0-f169.google.com with SMTP id hj3so4778056wib.4 for ; Tue, 17 Sep 2013 03:36:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=Boi4WjCyd5B9RiPH5Z1vfYjNsjyuOx3OrVy3+hyggHA=; b=JUXSNIifoskPnXAlBcz+pQObHYVXiVorAbkbi3gdustzXdqGLiU0Yu6dUXu7WiK1xV 6QZmdvsouWBhAhPruVe9csfEy8wNbbaYvBqgs4z8Cw564siXXqlSMkzwHYZx6MSzQSET REv0ySTQBcY6yLQzLqyHrfDF6ObAgnRv8/57pjMkmt91ljBZ4+AYLKjSKMuI7HFLXWda 4nJfrU3rbZXddBHFA3/JI/OFRlnWjpkhLe7og7RUCA6s9NPcaySW5UMEB2B1KgUkLOT8 kkDtCV6bqoOnYZbbKJcjp8HGpC7JLzAQknngGJQVWhxr68+RCMurvdetDmREdozhAiM6 mK9Q== MIME-Version: 1.0 X-Received: by 10.180.82.36 with SMTP id f4mr1802032wiy.63.1379414182570; Tue, 17 Sep 2013 03:36:22 -0700 (PDT) Sender: zbodek@gmail.com Received: by 10.217.38.69 with HTTP; Tue, 17 Sep 2013 03:36:22 -0700 (PDT) In-Reply-To: References: <201309161046.r8GAkxEM084656@svn.freebsd.org> Date: Tue, 17 Sep 2013 12:36:22 +0200 X-Google-Sender-Auth: 9Ak3ACekrYm4FHc4-e1twVmI-J4 Message-ID: Subject: Re: svn commit: r255613 - head/sys/arm/arm From: Zbigniew Bodek To: Ed Schouten Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 10:36:25 -0000 2013/9/17 Zbigniew Bodek > 2013/9/16 Ed Schouten > >> 2013/9/16 Zbigniew Bodek : >> > Log: >> > Fix GCC build error when building for ARMv6 >> > >> > Apply theravens's idea to move __strong_reference >> > macros into the proper ifdef section. >> > >> > Approved by: cognet (mentor) >> > Approved by: re >> > >> > Modified: >> > head/sys/arm/arm/stdatomic.c >> >> For some reason, this still breaks the build of the AVILA kernel: >> >> Hello Ed, > > You mean that this doesn't help for AVILA? > To be precise the patch is for ARMv6/v7 issues and AVILA is ARMv5te? > > Nevertheless if the problem occurs for ARMs < v6 then another patch for > that needs to be done. > > Best regards > Zbyszek > > Hello again Ed, Can you test this one: http://people.freebsd.org/~zbb/arm/other/stdatomic_fix_vol2.diff Best regards Zbyszek From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 11:30:40 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BABB2C00; Tue, 17 Sep 2013 11:30:40 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8EE5E2ED6; Tue, 17 Sep 2013 11:30:36 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.7/8.14.7) with ESMTP id r8HBUNcn084372; Tue, 17 Sep 2013 15:30:23 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.7/8.14.7/Submit) id r8HBUNwq084371; Tue, 17 Sep 2013 15:30:23 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 17 Sep 2013 15:30:23 +0400 From: Gleb Smirnoff To: Edward Tomasz Napierala Subject: Re: svn commit: r255628 - svnadmin/conf Message-ID: <20130917113023.GM4574@FreeBSD.org> References: <201309170843.r8H8hCaE092908@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201309170843.r8H8hCaE092908@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-svnadmin@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 11:30:40 -0000 Edward, On Tue, Sep 17, 2013 at 08:43:12AM +0000, Edward Tomasz Napierala wrote: E> Modified: svnadmin/conf/approvers E> ============================================================================== E> --- svnadmin/conf/approvers Tue Sep 17 07:41:08 2013 (r255627) E> +++ svnadmin/conf/approvers Tue Sep 17 08:43:12 2013 (r255628) E> @@ -32,3 +32,7 @@ E> ^svnadmin/conf/approvers (core|re) E> ^svnadmin/conf/access core E> ^head/LOCKS core E> +^head/sys/dev/random (security-officer|so|secteam|core) E> +^head/sys/libkern/arc4random.c (security-officer|so|secteam|core) E> +^stable/[7-9]/sys/dev/random (security-officer|so|secteam|core) E> +^stable/[7-9]/sys/libkern/arc4random.c (security-officer|so|secteam|core) stable/10 won't match. I'd suggest ^stable/[0-9]+/sys -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 11:48:48 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5DB6AF1C; Tue, 17 Sep 2013 11:48:48 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3CB662F92; Tue, 17 Sep 2013 11:48:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8HBmmpD091601; Tue, 17 Sep 2013 11:48:48 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8HBmlbB091598; Tue, 17 Sep 2013 11:48:47 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201309171148.r8HBmlbB091598@svn.freebsd.org> From: Sean Bruno Date: Tue, 17 Sep 2013 11:48:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255629 - in head: include usr.sbin/gpioctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 11:48:48 -0000 Author: sbruno Date: Tue Sep 17 11:48:47 2013 New Revision: 255629 URL: http://svnweb.freebsd.org/changeset/base/255629 Log: Assume that the -f argument is /dev/gpioc0 if it is not passed. hrs@ provided this verison of the patch and showed me where all the needed changes were to be made outside of gpioctl.c Approved by: re (hrs) MFC after: 2 weeks Modified: head/include/paths.h head/usr.sbin/gpioctl/gpioctl.8 head/usr.sbin/gpioctl/gpioctl.c Modified: head/include/paths.h ============================================================================== --- head/include/paths.h Tue Sep 17 08:43:12 2013 (r255628) +++ head/include/paths.h Tue Sep 17 11:48:47 2013 (r255629) @@ -50,6 +50,7 @@ #define _PATH_CSHELL "/bin/csh" #define _PATH_CSMAPPER "/usr/share/i18n/csmapper" #define _PATH_DEFTAPE "/dev/sa0" +#define _PATH_DEVGPIOC "/dev/gpioc" #define _PATH_DEVNULL "/dev/null" #define _PATH_DEVZERO "/dev/zero" #define _PATH_DRUM "/dev/drum" Modified: head/usr.sbin/gpioctl/gpioctl.8 ============================================================================== --- head/usr.sbin/gpioctl/gpioctl.8 Tue Sep 17 08:43:12 2013 (r255628) +++ head/usr.sbin/gpioctl/gpioctl.8 Tue Sep 17 11:48:47 2013 (r255629) @@ -36,20 +36,20 @@ .Sh SYNOPSIS .Nm .Cm -l -.Fl f Ar ctldev +.Op Fl f Ar ctldev .Op Fl v .Nm .Cm -t -.Fl f Ar ctldev +.Op Fl f Ar ctldev .Ar pin .Nm .Cm -c -.Fl f Ar ctldev +.Op Fl f Ar ctldev .Ar pin .Ar flag .Op flag ... .Nm -.Cm -f Ar ctldev +.Op Cm -f Ar ctldev .Ar pin .Ar [0|1] .Sh DESCRIPTION @@ -83,6 +83,8 @@ Inverted output pin .El .It Fl f Ar ctldev GPIO controller device to use +If not specified, defaults to +.Pa /dev/gpioc0 .It Fl l list available pins .It Fl t Ar pin Modified: head/usr.sbin/gpioctl/gpioctl.c ============================================================================== --- head/usr.sbin/gpioctl/gpioctl.c Tue Sep 17 08:43:12 2013 (r255628) +++ head/usr.sbin/gpioctl/gpioctl.c Tue Sep 17 11:48:47 2013 (r255629) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -63,10 +64,10 @@ static void usage(void) { fprintf(stderr, "Usage:\n"); - fprintf(stderr, "\tgpioctl -f ctldev -l [-v]\n"); - fprintf(stderr, "\tgpioctl -f ctldev -t pin\n"); - fprintf(stderr, "\tgpioctl -f ctldev -c pin flag ...\n"); - fprintf(stderr, "\tgpioctl -f ctldev pin [0|1]\n"); + fprintf(stderr, "\tgpioctl [-f ctldev] -l [-v]\n"); + fprintf(stderr, "\tgpioctl [-f ctldev] -t pin\n"); + fprintf(stderr, "\tgpioctl [-f ctldev] -c pin flag ...\n"); + fprintf(stderr, "\tgpioctl [-f ctldev] pin [0|1]\n"); exit(1); } @@ -185,6 +186,7 @@ main(int argc, char **argv) int i; struct gpio_pin pin; struct gpio_req req; + char defctlfile[] = _PATH_DEVGPIOC "0"; char *ctlfile = NULL; int pinn, pinv, fd, ch; int flags, flag, ok; @@ -226,7 +228,7 @@ main(int argc, char **argv) printf("%d/%s\n", i, argv[i]); if (ctlfile == NULL) - fail("No gpioctl device provided\n"); + ctlfile = defctlfile; fd = open(ctlfile, O_RDONLY); if (fd < 0) { From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 12:50:58 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 50817207; Tue, 17 Sep 2013 12:50:58 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3E2F5237C; Tue, 17 Sep 2013 12:50:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8HCowKI029093; Tue, 17 Sep 2013 12:50:58 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8HCovlT029090; Tue, 17 Sep 2013 12:50:57 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201309171250.r8HCovlT029090@svn.freebsd.org> From: Hans Petter Selasky Date: Tue, 17 Sep 2013 12:50:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255630 - stable/9/sys/dev/usb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 12:50:58 -0000 Author: hselasky Date: Tue Sep 17 12:50:57 2013 New Revision: 255630 URL: http://svnweb.freebsd.org/changeset/base/255630 Log: MFC r248246: - Make quirk for reading device descriptor from broken USB devices. Else they won't enumerate at all: hw.usb.full_ddesc=1 - Reduce the USB descriptor read timeout from 1000ms to 500ms. Typical value for LOW speed devices is 50-100ms. - Enumerate USB device a maximum of 3 times when a port connection change event is detected, before giving up. Modified: stable/9/sys/dev/usb/usb_device.c stable/9/sys/dev/usb/usb_request.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/usb_device.c ============================================================================== --- stable/9/sys/dev/usb/usb_device.c Tue Sep 17 11:48:47 2013 (r255629) +++ stable/9/sys/dev/usb/usb_device.c Tue Sep 17 12:50:57 2013 (r255630) @@ -1673,10 +1673,14 @@ usb_alloc_device(device_t parent_dev, st err = usbd_setup_device_desc(udev, NULL); if (err != 0) { - /* XXX try to re-enumerate the device */ + /* try to enumerate two more times */ err = usbd_req_re_enumerate(udev, NULL); - if (err) - goto done; + if (err != 0) { + err = usbd_req_re_enumerate(udev, NULL); + if (err != 0) { + goto done; + } + } } /* Modified: stable/9/sys/dev/usb/usb_request.c ============================================================================== --- stable/9/sys/dev/usb/usb_request.c Tue Sep 17 11:48:47 2013 (r255629) +++ stable/9/sys/dev/usb/usb_request.c Tue Sep 17 12:50:57 2013 (r255630) @@ -71,6 +71,11 @@ static int usb_no_cs_fail; SYSCTL_INT(_hw_usb, OID_AUTO, no_cs_fail, CTLFLAG_RW, &usb_no_cs_fail, 0, "USB clear stall failures are ignored, if set"); +static int usb_full_ddesc; + +SYSCTL_INT(_hw_usb, OID_AUTO, full_ddesc, CTLFLAG_RW, + &usb_full_ddesc, 0, "USB always read complete device descriptor, if set"); + #ifdef USB_DEBUG #ifdef USB_REQ_DEBUG /* The following structures are used in connection to fault injection. */ @@ -996,7 +1001,7 @@ usbd_req_get_desc(struct usb_device *ude USETW(req.wLength, min_len); err = usbd_do_request_flags(udev, mtx, &req, - desc, 0, NULL, 1000); + desc, 0, NULL, 500 /* ms */); if (err) { if (!retries) { @@ -1881,32 +1886,41 @@ usbd_setup_device_desc(struct usb_device */ switch (udev->speed) { case USB_SPEED_FULL: - case USB_SPEED_LOW: + if (usb_full_ddesc != 0) { + /* get full device descriptor */ + err = usbd_req_get_device_desc(udev, mtx, &udev->ddesc); + if (err == 0) + break; + } + + /* get partial device descriptor, some devices crash on this */ err = usbd_req_get_desc(udev, mtx, NULL, &udev->ddesc, USB_MAX_IPACKET, USB_MAX_IPACKET, 0, UDESC_DEVICE, 0, 0); - if (err != 0) { - DPRINTFN(0, "getting device descriptor " - "at addr %d failed, %s\n", udev->address, - usbd_errstr(err)); - return (err); - } + if (err != 0) + break; + + /* get the full device descriptor */ + err = usbd_req_get_device_desc(udev, mtx, &udev->ddesc); break; + default: DPRINTF("Minimum MaxPacketSize is large enough " - "to hold the complete device descriptor\n"); - break; - } + "to hold the complete device descriptor or " + "only once MaxPacketSize choice\n"); - /* get the full device descriptor */ - err = usbd_req_get_device_desc(udev, mtx, &udev->ddesc); - - /* try one more time, if error */ - if (err) + /* get the full device descriptor */ err = usbd_req_get_device_desc(udev, mtx, &udev->ddesc); - if (err) { - DPRINTF("addr=%d, getting full desc failed\n", - udev->address); + /* try one more time, if error */ + if (err != 0) + err = usbd_req_get_device_desc(udev, mtx, &udev->ddesc); + break; + } + + if (err != 0) { + DPRINTFN(0, "getting device descriptor " + "at addr %d failed, %s\n", udev->address, + usbd_errstr(err)); return (err); } From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 12:53:09 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E66E3480; Tue, 17 Sep 2013 12:53:09 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D19FA23A3; Tue, 17 Sep 2013 12:53:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8HCr9qU029863; Tue, 17 Sep 2013 12:53:09 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8HCr909029862; Tue, 17 Sep 2013 12:53:09 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201309171253.r8HCr909029862@svn.freebsd.org> From: Hans Petter Selasky Date: Tue, 17 Sep 2013 12:53:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255631 - stable/9/sys/dev/usb/input X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 12:53:10 -0000 Author: hselasky Date: Tue Sep 17 12:53:09 2013 New Revision: 255631 URL: http://svnweb.freebsd.org/changeset/base/255631 Log: MFC r254572: Force keyboards which don't have the required HID fields to use the USB BOOT protocol for now. PR: usb/181425 Modified: stable/9/sys/dev/usb/input/ukbd.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/input/ukbd.c ============================================================================== --- stable/9/sys/dev/usb/input/ukbd.c Tue Sep 17 12:50:57 2013 (r255630) +++ stable/9/sys/dev/usb/input/ukbd.c Tue Sep 17 12:53:09 2013 (r255631) @@ -1126,8 +1126,12 @@ ukbd_parse_hid(struct ukbd_softc *sc, co HID_USAGE2(HUP_KEYBOARD, 0x00), hid_input, 0, &sc->sc_loc_events, &flags, &sc->sc_id_events)) { - sc->sc_flags |= UKBD_FLAG_EVENTS; - DPRINTFN(1, "Found keyboard events\n"); + if (flags & HIO_VARIABLE) { + DPRINTFN(1, "Ignoring keyboard event control\n"); + } else { + sc->sc_flags |= UKBD_FLAG_EVENTS; + DPRINTFN(1, "Found keyboard event array\n"); + } } /* figure out leds on keyboard */ From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 12:56:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D32976E0; Tue, 17 Sep 2013 12:56:37 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BF53823D2; Tue, 17 Sep 2013 12:56:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8HCubSW031287; Tue, 17 Sep 2013 12:56:37 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8HCubbn031283; Tue, 17 Sep 2013 12:56:37 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201309171256.r8HCubbn031283@svn.freebsd.org> From: Hans Petter Selasky Date: Tue, 17 Sep 2013 12:56:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r255632 - stable/8/sys/dev/usb X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 12:56:38 -0000 Author: hselasky Date: Tue Sep 17 12:56:37 2013 New Revision: 255632 URL: http://svnweb.freebsd.org/changeset/base/255632 Log: MFC r248246: - Make quirk for reading device descriptor from broken USB devices. Else they won't enumerate at all: hw.usb.full_ddesc=1 - Reduce the USB descriptor read timeout from 1000ms to 500ms. Typical value for LOW speed devices is 50-100ms. - Enumerate USB device a maximum of 3 times when a port connection change event is detected, before giving up. Modified: stable/8/sys/dev/usb/usb_device.c stable/8/sys/dev/usb/usb_request.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/usb_device.c ============================================================================== --- stable/8/sys/dev/usb/usb_device.c Tue Sep 17 12:53:09 2013 (r255631) +++ stable/8/sys/dev/usb/usb_device.c Tue Sep 17 12:56:37 2013 (r255632) @@ -1673,10 +1673,14 @@ usb_alloc_device(device_t parent_dev, st err = usbd_setup_device_desc(udev, NULL); if (err != 0) { - /* XXX try to re-enumerate the device */ + /* try to enumerate two more times */ err = usbd_req_re_enumerate(udev, NULL); - if (err) - goto done; + if (err != 0) { + err = usbd_req_re_enumerate(udev, NULL); + if (err != 0) { + goto done; + } + } } /* Modified: stable/8/sys/dev/usb/usb_request.c ============================================================================== --- stable/8/sys/dev/usb/usb_request.c Tue Sep 17 12:53:09 2013 (r255631) +++ stable/8/sys/dev/usb/usb_request.c Tue Sep 17 12:56:37 2013 (r255632) @@ -71,6 +71,11 @@ static int usb_no_cs_fail; SYSCTL_INT(_hw_usb, OID_AUTO, no_cs_fail, CTLFLAG_RW, &usb_no_cs_fail, 0, "USB clear stall failures are ignored, if set"); +static int usb_full_ddesc; + +SYSCTL_INT(_hw_usb, OID_AUTO, full_ddesc, CTLFLAG_RW, + &usb_full_ddesc, 0, "USB always read complete device descriptor, if set"); + #ifdef USB_DEBUG #ifdef USB_REQ_DEBUG /* The following structures are used in connection to fault injection. */ @@ -996,7 +1001,7 @@ usbd_req_get_desc(struct usb_device *ude USETW(req.wLength, min_len); err = usbd_do_request_flags(udev, mtx, &req, - desc, 0, NULL, 1000); + desc, 0, NULL, 500 /* ms */); if (err) { if (!retries) { @@ -1881,32 +1886,41 @@ usbd_setup_device_desc(struct usb_device */ switch (udev->speed) { case USB_SPEED_FULL: - case USB_SPEED_LOW: + if (usb_full_ddesc != 0) { + /* get full device descriptor */ + err = usbd_req_get_device_desc(udev, mtx, &udev->ddesc); + if (err == 0) + break; + } + + /* get partial device descriptor, some devices crash on this */ err = usbd_req_get_desc(udev, mtx, NULL, &udev->ddesc, USB_MAX_IPACKET, USB_MAX_IPACKET, 0, UDESC_DEVICE, 0, 0); - if (err != 0) { - DPRINTFN(0, "getting device descriptor " - "at addr %d failed, %s\n", udev->address, - usbd_errstr(err)); - return (err); - } + if (err != 0) + break; + + /* get the full device descriptor */ + err = usbd_req_get_device_desc(udev, mtx, &udev->ddesc); break; + default: DPRINTF("Minimum MaxPacketSize is large enough " - "to hold the complete device descriptor\n"); - break; - } + "to hold the complete device descriptor or " + "only once MaxPacketSize choice\n"); - /* get the full device descriptor */ - err = usbd_req_get_device_desc(udev, mtx, &udev->ddesc); - - /* try one more time, if error */ - if (err) + /* get the full device descriptor */ err = usbd_req_get_device_desc(udev, mtx, &udev->ddesc); - if (err) { - DPRINTF("addr=%d, getting full desc failed\n", - udev->address); + /* try one more time, if error */ + if (err != 0) + err = usbd_req_get_device_desc(udev, mtx, &udev->ddesc); + break; + } + + if (err != 0) { + DPRINTFN(0, "getting device descriptor " + "at addr %d failed, %s\n", udev->address, + usbd_errstr(err)); return (err); } From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 12:58:17 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E9CDD929; Tue, 17 Sep 2013 12:58:17 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D6BEE23ED; Tue, 17 Sep 2013 12:58:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8HCwH7G032014; Tue, 17 Sep 2013 12:58:17 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8HCwHpP032013; Tue, 17 Sep 2013 12:58:17 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201309171258.r8HCwHpP032013@svn.freebsd.org> From: Hans Petter Selasky Date: Tue, 17 Sep 2013 12:58:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r255633 - stable/8/sys/dev/usb/input X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 12:58:18 -0000 Author: hselasky Date: Tue Sep 17 12:58:17 2013 New Revision: 255633 URL: http://svnweb.freebsd.org/changeset/base/255633 Log: MFC r254572: Force keyboards which don't have the required HID fields to use the USB BOOT protocol for now. PR: usb/181425 Modified: stable/8/sys/dev/usb/input/ukbd.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/input/ukbd.c ============================================================================== --- stable/8/sys/dev/usb/input/ukbd.c Tue Sep 17 12:56:37 2013 (r255632) +++ stable/8/sys/dev/usb/input/ukbd.c Tue Sep 17 12:58:17 2013 (r255633) @@ -1118,8 +1118,12 @@ ukbd_parse_hid(struct ukbd_softc *sc, co HID_USAGE2(HUP_KEYBOARD, 0x00), hid_input, 0, &sc->sc_loc_events, &flags, &sc->sc_id_events)) { - sc->sc_flags |= UKBD_FLAG_EVENTS; - DPRINTFN(1, "Found keyboard events\n"); + if (flags & HIO_VARIABLE) { + DPRINTFN(1, "Ignoring keyboard event control\n"); + } else { + sc->sc_flags |= UKBD_FLAG_EVENTS; + DPRINTFN(1, "Found keyboard event array\n"); + } } /* figure out leds on keyboard */ From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 12:59:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CD267A69; Tue, 17 Sep 2013 12:59:37 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BB25323F9; Tue, 17 Sep 2013 12:59:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8HCxbdp032698; Tue, 17 Sep 2013 12:59:37 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8HCxb3o032697; Tue, 17 Sep 2013 12:59:37 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309171259.r8HCxb3o032697@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Tue, 17 Sep 2013 12:59:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255634 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 12:59:37 -0000 Author: des Date: Tue Sep 17 12:59:37 2013 New Revision: 255634 URL: http://svnweb.freebsd.org/changeset/base/255634 Log: Add unbound to the list of UIDs / GIDs to check fore before installing. Approved by: re (blanket) Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Sep 17 12:58:17 2013 (r255633) +++ head/Makefile.inc1 Tue Sep 17 12:59:37 2013 (r255634) @@ -709,6 +709,10 @@ CHECK_GIDS+= smmsp CHECK_UIDS+= proxy CHECK_GIDS+= proxy authpf .endif +.if ${MK_UNBOUND} != "no" +CHECK_UIDS+= unbound +CHECK_GIDS+= unbound +.endif installcheck_UGID: .for uid in ${CHECK_UIDS} @if ! `id -u ${uid} >/dev/null 2>&1`; then \ From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 13:09:40 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6507FF95 for ; Tue, 17 Sep 2013 13:09:40 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 45E3D24C8 for ; Tue, 17 Sep 2013 13:09:40 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r8HD9eLe085570 for ; Tue, 17 Sep 2013 13:09:40 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r8HD9eHb085566 for svn-src-all@freebsd.org; Tue, 17 Sep 2013 13:09:40 GMT (envelope-from bdrewery) Received: (qmail 93195 invoked from network); 17 Sep 2013 08:09:38 -0500 Received: from unknown (HELO ?10.10.0.24?) (freebsd@shatow.net@10.10.0.24) by sweb.xzibition.com with ESMTPA; 17 Sep 2013 08:09:38 -0500 Message-ID: <5238548D.9080503@FreeBSD.org> Date: Tue, 17 Sep 2013 08:09:33 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: =?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?= Subject: Re: svn commit: r255634 - head References: <201309171259.r8HCxb3o032697@svn.freebsd.org> In-Reply-To: <201309171259.r8HCxb3o032697@svn.freebsd.org> X-Enigmail-Version: 1.5.2 OpenPGP: id=3C9B0CF9; url=http://www.shatow.net/bryan/bryan.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OGHSt9MGpH1SLtuTijPWQxigeKMQLQIxH" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 13:09:40 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --OGHSt9MGpH1SLtuTijPWQxigeKMQLQIxH Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 9/17/2013 7:59 AM, Dag-Erling Sm=F8rgrav wrote: > Author: des > Date: Tue Sep 17 12:59:37 2013 > New Revision: 255634 > URL: http://svnweb.freebsd.org/changeset/base/255634 >=20 > Log: > Add unbound to the list of UIDs / GIDs to check fore before installin= g. > =20 > Approved by: re (blanket) >=20 > Modified: > head/Makefile.inc1 >=20 > Modified: head/Makefile.inc1 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/Makefile.inc1 Tue Sep 17 12:58:17 2013 (r255633) > +++ head/Makefile.inc1 Tue Sep 17 12:59:37 2013 (r255634) > @@ -709,6 +709,10 @@ CHECK_GIDS+=3D smmsp > CHECK_UIDS+=3D proxy > CHECK_GIDS+=3D proxy authpf > .endif > +.if ${MK_UNBOUND} !=3D "no" Hm, I know you noticed this, but by making this conditional, it will not check if building WITHOUT_UNBOUND, but the passwd and mtree files are still using it and will blow up. All of these conditions should probably be removed until a better mechanism for passwd/mtree can be thought up. > +CHECK_UIDS+=3D unbound > +CHECK_GIDS+=3D unbound > +.endif > installcheck_UGID: > .for uid in ${CHECK_UIDS} > @if ! `id -u ${uid} >/dev/null 2>&1`; then \ > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" >=20 --=20 Regards, Bryan Drewery --OGHSt9MGpH1SLtuTijPWQxigeKMQLQIxH Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJSOFSNAAoJEG54KsA8mwz5b5YQAJPUh0u+6HjSZ39EmF3OlEt5 GFnLNWfuItj8Vg/wNiyU0F3pg0XIXCh4gkYYS+pAsehz9ioiNvYdDSP6zyhKoO7+ rWxYKA5Of0nDcT8URvsVKoO3YNnk69wd7jmU3Q5g4Rm89HBY0M+9rh39V3jGCnfV +BLg9dreAm2msJWvcEPrX0HrVVF6LQBgp9rKyqoAQytAZFyTHWDko4luTaMZGp8W 41IjB0xUHjkiWo/6SQ7OpfJU1vx3jCMA9sN6gS7LauV5Ih5PRRrNWx3K9i/MUt0o p4Z1Yn/o4JmFtyyOik2OtcOLR1kb/UBeWna+kVStKp9ac4RqoJlnRqfXOwOFEu+c RYg0m7NUzggl1K8rSIsp8NyRFJfJsAD6pT8WUUOfRBHscry+R2y3kgZfJHPdwaOs XJYPuFTdodUM1bDWEUJDn6ydynZ3K3ii9PiNoJglTnGX3D3yXUaXmQTKW4GgGmZN 1lDYixdSvMv8QlqOYliYSLPZGvdlqunf50hO0oXDeh0yUVtDkrLQy0YdT6zIa9Y/ CScEVG3wXYqfJ4dM0/nRKVwhbR6MiIUuaYq2gaBd0NgWPiWwsbBF7TBRIKZy37Ll vZ1+mxxFMMiE5pbi4BspKmRLB11qHnGgpUJkAVDyuAqpIYdoVPsiPfH5KhwhfgOa hRftxpDp8bfNY9liPran =jUhK -----END PGP SIGNATURE----- --OGHSt9MGpH1SLtuTijPWQxigeKMQLQIxH-- From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 13:37:31 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 29C6066E for ; Tue, 17 Sep 2013 13:37:31 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 07913263C for ; Tue, 17 Sep 2013 13:37:31 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r8HDbUbR091743 for ; Tue, 17 Sep 2013 13:37:30 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r8HDbUNh091737 for svn-src-all@freebsd.org; Tue, 17 Sep 2013 13:37:30 GMT (envelope-from bdrewery) Received: (qmail 76059 invoked from network); 17 Sep 2013 08:37:27 -0500 Received: from unknown (HELO ?10.10.0.24?) (freebsd@shatow.net@10.10.0.24) by sweb.xzibition.com with ESMTPA; 17 Sep 2013 08:37:27 -0500 Message-ID: <52385B12.9030402@FreeBSD.org> Date: Tue, 17 Sep 2013 08:37:22 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: Bruce Evans , Hiroki Sato Subject: Re: svn commit: r255486 - in head/lib/libc: gen sys References: <201309120053.r8C0rc7H082015@svn.freebsd.org> <20130912.203612.1272738297998644471.hrs@allbsd.org> <5231A85E.5050802@FreeBSD.org> <20130912222312.K1155@besplex.bde.org> In-Reply-To: <20130912222312.K1155@besplex.bde.org> X-Enigmail-Version: 1.5.2 OpenPGP: id=3C9B0CF9; url=http://www.shatow.net/bryan/bryan.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xABcW2KhB6G2WN7Oi0uxLsW7QMKiWm4Ie" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 13:37:31 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --xABcW2KhB6G2WN7Oi0uxLsW7QMKiWm4Ie Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 9/12/2013 8:15 AM, Bruce Evans wrote: > On Thu, 12 Sep 2013, Bryan Drewery wrote: >=20 >> On 9/12/2013 6:36 AM, Hiroki Sato wrote: >>> Bryan Drewery wrote >>> in <201309120053.r8C0rc7H082015@svn.freebsd.org>: >>> >>> bd> Author: bdrewery (ports committer) >>> bd> Date: Thu Sep 12 00:53:38 2013 >>> bd> New Revision: 255486 >>> bd> URL: http://svnweb.freebsd.org/changeset/base/255486 >>> bd> >>> bd> Log: >>> bd> Consistently reference file descriptors as "fd". 55 other manpa= ges >=20 > Inconsistently... >=20 >>> bd> used "fd", while these used "d" and "filedes". >=20 > ... About 57 man pages (counting links multiply) in /usr/share/man[23] > still use the POSIX spelling "fildes". Yes I see I did miss a few. >=20 > POSIX never uses the spelling "filedes", at least in the old 2001 > draft7.txt. But it is inconsistent between "fildes" and "fd". In the > old draft, it uses "int fildes" on 67 lines (including for most of the > functions changed in this commit). It uses "int fd" on 40 lines. But > most of the latter are not for prototypes. The only exceptions are > for posix_fadvise() and posix_fallocate(). >=20 > Anyway, this change mainly improves "d" to "fd". "filedes" -> "fd" is = not > so clearly an improvement, but "filedes" was only used in a couple of > files and thus rarely changed. >=20 > I think chroot.2 still has the grammar error "filedescriptors" in > descriptions. Normal English grammar "file descriptors" is used in > about 872 man pages (counting links multiply) in /usr/share/man[23]. I am mostly interested at the moment in updating the variable names, and not the descriptions. >=20 >>> bd> >>> bd> MFC after: 1 week >>> bd> Approved by: gjb >>> bd> Approved by: re (delphij) >>> >>> I think this kind of changes need a consensus because several POSIX >>> functions use "filedes" in the specification document. r254484 by >>> pjd was a similar change (s/type/af/ in gethostbyaddr()). >>> >>> In SUSv4, fdopen() uses "filedes" and openat() uses "fd", for >>> example. Consistency throughout our manual pages is generally good.= >>> However, I also see the benefit of using the same expression as the >>> specification even if it is inconsistent. What do you think? >=20 > Does it really use "filedes"? POSIX still never uses this in the 2007 > draft (austin-d2r.pdf). It uses "fildes" for fdopen(), but "fd" for > fdopendir() and openat(). It still uses "fd" for posix_fadvise() and > posix_fallocate(). I now think that the "fd"s in POSIX are just > style bugs. The normal "fildes" had only rotted to "fd" in 2 places > in 2001, but rotted much further in 2007. >=20 > If we ever copied the POSIX spec to improve FreeBSD man pages, then > it would be painful to make any changes to the text (other than > deshallify, and I wouldn't trust that either). FreeBSD now copies the > POSIX inconsistencies for "fildes" vs "fd" for at least fdopen() and > fdopendir(), although it doesn't copy whole sections of POSIX for these= > functions (or any at all?). >=20 >> I did notice that 'filedes' was referenced in some specs, but it's ver= y >> weird to open multiple manpages and expect 'fd' and find 'd' and rewor= k >> my brain to understand that 'd' or 'filedes' is just a 'fd'. Takes a >> second of thinking. >> >> It was "surprising" to me when I noticed it, especially given how many= >> used 'fd'. >=20 > "fd" is a good abbreviation, but "fildes" is more formal. I actually > prefer "fd" throughout. "fildes" is not such a good abbreviation, sinc= e > it is half-way. Using both is just a style bug that is not quite as > confusing as using "d" and "fd". Using "d", "fd", "fildes" and "filede= s" > was a larger style bug. >=20 > Bruce Should I revert until we can have more discussion on this and what impact it has on maintaining the manpages? --=20 Regards, Bryan Drewery --xABcW2KhB6G2WN7Oi0uxLsW7QMKiWm4Ie Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJSOFsSAAoJEG54KsA8mwz5owsQAIN6hsWNG0m/SKYDaRz/9X/D Byu4GrEf4pb1wQp/Y0WWrPc49uKgsnegGk4cUhOKvMDcl2cG0BFMoGylBfQMKnG1 vanXwkRdwYyA5UJyZhOOWoFUaG17oevdqpRBgZfub2OOMkqvK5f4hoHbLzSMeKDH okQPgT8BitbZfT8O7WA2LnXs6DO9UJIQbvkY1JKVKpoUacl81zY34mF3JhspJTqb yV0zHBzpQZpPc1Cgfrmi0ydqdmjzxgX7RRVrdAFf5t5f/h43QUqbPxiHTm4uDzqe yp09zjGl+WfT616Ctrkx96m/bHVi4apqKyLMCuEVkrTPChJ/GL0T4SOreDLJWT4J fmDVl5rwmnUMNObPF7ls4LvcoQ9vD045JJkzs0J/UqgjuNQXni+bu4Otoyq96gkG APHMfIEqdAIVkeiqBFt4930xWq39eJOeFaIkyx3uopT86RfiIF8ejyRjw1hx50+u +PHsF+Zhp3uUrx+wF0k7KM3vr7ZJV0L34hYYUdiV5GWYZaW3YqKLqj6XVOmEGET+ HIx32naDyh9hOeYSMkKcF4ZcvYfKfkrgTiTl/feob/alN2SLhNGnLZbhEzRxEy4+ klYl7llPRVz2BEGnBqUy6lQ2mBJDE070cflINxbLOEXZ7Dx7+bteoAEXBBsHj+Gm 3gfh6dgyWmbE7pZQUcSL =E3mG -----END PGP SIGNATURE----- --xABcW2KhB6G2WN7Oi0uxLsW7QMKiWm4Ie-- From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 14:19:05 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B5CF1B43; Tue, 17 Sep 2013 14:19:05 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A3BA8284F; Tue, 17 Sep 2013 14:19:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8HEJ5eV075281; Tue, 17 Sep 2013 14:19:05 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8HEJ546075280; Tue, 17 Sep 2013 14:19:05 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201309171419.r8HEJ546075280@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 17 Sep 2013 14:19:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255635 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 14:19:05 -0000 Author: trasz Date: Tue Sep 17 14:19:05 2013 New Revision: 255635 URL: http://svnweb.freebsd.org/changeset/base/255635 Log: Explicitly require Security Officer's approval for kernel PRNG bits. Note that there is ongoing discussion about approval requirement for userland PRNG bits. Reviewed by: so (des) Approved by: core (jhb) Approved by: re (gjb) Modified: head/LOCKS Modified: head/LOCKS ============================================================================== --- head/LOCKS Tue Sep 17 12:59:37 2013 (r255634) +++ head/LOCKS Tue Sep 17 14:19:05 2013 (r255635) @@ -12,3 +12,7 @@ releng/5.* Requires Security Officer app releng/6.* Requires Security Officer approval. releng/7.* Requires Security Officer approval. releng/8.* Requires Security Officer approval. +head/sys/dev/random Requires Security Officer approval. +head/sys/libkern/arc4random.c Requires Security Officer approval. +stable/*/sys/dev/random Requires Security Officer approval. +stable/*/sys/libkern/arc4random.c Requires Security Officer approval. From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 14:23:16 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3B500DBA; Tue, 17 Sep 2013 14:23:16 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 278F928A2; Tue, 17 Sep 2013 14:23:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8HENGvU078303; Tue, 17 Sep 2013 14:23:16 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8HENGNp078302; Tue, 17 Sep 2013 14:23:16 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201309171423.r8HENGNp078302@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 17 Sep 2013 14:23:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255636 - head/usr.sbin/iscsid X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 14:23:16 -0000 Author: trasz Date: Tue Sep 17 14:23:15 2013 New Revision: 255636 URL: http://svnweb.freebsd.org/changeset/base/255636 Log: Improve iSCSI address resolution, fixing "InitiatorAddress" handling, and error reporting. Approved by: re (kib) Modified: head/usr.sbin/iscsid/iscsid.c Modified: head/usr.sbin/iscsid/iscsid.c ============================================================================== --- head/usr.sbin/iscsid/iscsid.c Tue Sep 17 14:19:05 2013 (r255635) +++ head/usr.sbin/iscsid/iscsid.c Tue Sep 17 14:23:15 2013 (r255636) @@ -76,8 +76,9 @@ checked_strdup(const char *s) return (c); } -static int -resolve_addr(const char *address, struct addrinfo **ai) +static void +resolve_addr(const struct connection *conn, const char *address, + struct addrinfo **ai, bool initiator_side) { struct addrinfo hints; char *arg, *addr, *ch; @@ -87,8 +88,8 @@ resolve_addr(const char *address, struct arg = checked_strdup(address); if (arg[0] == '\0') { - log_warnx("empty address"); - return (1); + fail(conn, "empty address"); + log_errx(1, "empty address"); } if (arg[0] == '[') { /* @@ -97,16 +98,16 @@ resolve_addr(const char *address, struct arg++; addr = strsep(&arg, "]"); if (arg == NULL) { - log_warnx("invalid address %s", address); - return (1); + fail(conn, "malformed address"); + log_errx(1, "malformed address %s", address); } if (arg[0] == '\0') { - port = "3260"; + port = NULL; } else if (arg[0] == ':') { port = arg + 1; } else { - log_warnx("invalid address %s", address); - return (1); + fail(conn, "malformed address"); + log_errx(1, "malformed address %s", address); } } else { /* @@ -119,29 +120,32 @@ resolve_addr(const char *address, struct } if (colons > 1) { addr = arg; - port = "3260"; + port = NULL; } else { addr = strsep(&arg, ":"); if (arg == NULL) - port = "3260"; + port = NULL; else port = arg; } } + if (port == NULL && !initiator_side) + port = "3260"; + memset(&hints, 0, sizeof(hints)); hints.ai_family = PF_UNSPEC; hints.ai_socktype = SOCK_STREAM; - hints.ai_flags = AI_PASSIVE; + hints.ai_flags = AI_ADDRCONFIG | AI_NUMERICSERV; + if (initiator_side) + hints.ai_flags |= AI_PASSIVE; error = getaddrinfo(addr, port, &hints, ai); if (error != 0) { - log_warnx("getaddrinfo for %s failed: %s", + fail(conn, gai_strerror(error)); + log_errx(1, "getaddrinfo for %s failed: %s", address, gai_strerror(error)); - return (1); } - - return (0); } static struct connection * @@ -172,6 +176,8 @@ connection_new(unsigned int session_id, conn->conn_first_burst_length = 65536; conn->conn_session_id = session_id; + conn->conn_iscsi_fd = iscsi_fd; + /* * XXX: Should we sanitize this somehow? */ @@ -180,20 +186,12 @@ connection_new(unsigned int session_id, from_addr = conn->conn_conf.isc_initiator_addr; to_addr = conn->conn_conf.isc_target_addr; - if (from_addr[0] != '\0') { - error = resolve_addr(from_addr, &from_ai); - if (error != 0) - log_errx(1, "failed to resolve initiator address %s", - from_addr); - } else { + if (from_addr[0] != '\0') + resolve_addr(conn, from_addr, &from_ai, true); + else from_ai = NULL; - } - error = resolve_addr(to_addr, &to_ai); - if (error != 0) - log_errx(1, "failed to resolve target address %s", to_addr); - - conn->conn_iscsi_fd = iscsi_fd; + resolve_addr(conn, to_addr, &to_ai, false); #ifdef ICL_KERNEL_PROXY @@ -224,19 +222,25 @@ connection_new(unsigned int session_id, #else /* !ICL_KERNEL_PROXY */ - if (conn->conn_conf.isc_iser) + if (conn->conn_conf.isc_iser) { + fail(conn, "iSER not supported"); log_errx(1, "iscsid(8) compiled without ICL_KERNEL_PROXY " "does not support iSER"); + } conn->conn_socket = socket(to_ai->ai_family, to_ai->ai_socktype, to_ai->ai_protocol); - if (conn->conn_socket < 0) + if (conn->conn_socket < 0) { + fail(conn, strerror(errno)); log_err(1, "failed to create socket for %s", from_addr); + } if (from_ai != NULL) { error = bind(conn->conn_socket, from_ai->ai_addr, from_ai->ai_addrlen); - if (error != 0) + if (error != 0) { + fail(conn, strerror(errno)); log_err(1, "failed to bind to %s", from_addr); + } } log_debugx("connecting to %s", to_addr); error = connect(conn->conn_socket, to_ai->ai_addr, to_ai->ai_addrlen); From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 15:19:27 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8CB9CC03; Tue, 17 Sep 2013 15:19:27 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7A3D12BE7; Tue, 17 Sep 2013 15:19:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8HFJR5r006691; Tue, 17 Sep 2013 15:19:27 GMT (envelope-from phk@svn.freebsd.org) Received: (from phk@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8HFJRIO006690; Tue, 17 Sep 2013 15:19:27 GMT (envelope-from phk@svn.freebsd.org) Message-Id: <201309171519.r8HFJRIO006690@svn.freebsd.org> From: Poul-Henning Kamp Date: Tue, 17 Sep 2013 15:19:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255637 - head/tools/tools/sysbuild X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 15:19:27 -0000 Author: phk Date: Tue Sep 17 15:19:26 2013 New Revision: 255637 URL: http://svnweb.freebsd.org/changeset/base/255637 Log: Don't attempt to build ports with missing dependencies. Approved by: re (gjb) Modified: head/tools/tools/sysbuild/sysbuild.sh Modified: head/tools/tools/sysbuild/sysbuild.sh ============================================================================== --- head/tools/tools/sysbuild/sysbuild.sh Tue Sep 17 14:23:15 2013 (r255636) +++ head/tools/tools/sysbuild/sysbuild.sh Tue Sep 17 15:19:26 2013 (r255637) @@ -254,6 +254,13 @@ ports_build() ( fi fi + miss=`(cd $p ; make missing ${PORTS_OPTS}) || true` + + if [ "x${miss}" != "x" ] ; then + log_it "MISSING for $p:" $miss + continue + fi + log_it "build $pn ($p)" ( set +e From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 15:27:32 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5D988DDB; Tue, 17 Sep 2013 15:27:32 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from felyko.com (felyko.com [IPv6:2607:f2f8:a528::3:1337:ca7]) by mx1.freebsd.org (Postfix) with ESMTP id 451FA2C56; Tue, 17 Sep 2013 15:27:32 +0000 (UTC) Received: from [IPv6:2601:9:4d00:119:9a6:7484:4790:4b32] (unknown [IPv6:2601:9:4d00:119:9a6:7484:4790:4b32]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by felyko.com (Postfix) with ESMTPSA id 7E5BA39821; Tue, 17 Sep 2013 08:27:31 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Subject: Re: svn commit: r255628 - svnadmin/conf From: Rui Paulo In-Reply-To: <201309170843.r8H8hCaE092908@svn.freebsd.org> Date: Tue, 17 Sep 2013 08:27:30 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <242B42FD-BD20-4B7E-97B6-0F8EBAAE834A@FreeBSD.org> References: <201309170843.r8H8hCaE092908@svn.freebsd.org> To: Edward Tomasz Napierala X-Mailer: Apple Mail (2.1510) Cc: svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-svnadmin@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 15:27:32 -0000 On 17 Sep 2013, at 01:43, Edward Tomasz Napierala = wrote: > Author: trasz > Date: Tue Sep 17 08:43:12 2013 > New Revision: 255628 > URL: http://svnweb.freebsd.org/changeset/base/255628 >=20 > Log: > Explicitly require Security Officer's approval for kernel PRNG bits. >=20 > Note that there is ongoing discussion about approval requirement > for userland PRNG bits. >=20 > Reviewed by: so (des) > Approved by: core (jhb) >=20 > Modified: > svnadmin/conf/approvers >=20 > Modified: svnadmin/conf/approvers > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- svnadmin/conf/approvers Tue Sep 17 07:41:08 2013 = (r255627) > +++ svnadmin/conf/approvers Tue Sep 17 08:43:12 2013 = (r255628) > @@ -32,3 +32,7 @@ > ^svnadmin/conf/approvers (core|re) > ^svnadmin/conf/access core > ^head/LOCKS core > +^head/sys/dev/random (security-officer|so|secteam|core) > +^head/sys/libkern/arc4random.c = (security-officer|so|secteam|core) > +^stable/[7-9]/sys/dev/random (security-officer|so|secteam|core) > +^stable/[7-9]/sys/libkern/arc4random.c = (security-officer|so|secteam|core) This means that every time we branch a stable release, you have to = change this regular expression... Why not stable/* ? -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 16:06:07 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 97FD6C1E; Tue, 17 Sep 2013 16:06:07 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 845602F04; Tue, 17 Sep 2013 16:06:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8HG67VI032545; Tue, 17 Sep 2013 16:06:07 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8HG67Ot032544; Tue, 17 Sep 2013 16:06:07 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201309171606.r8HG67Ot032544@svn.freebsd.org> From: Neel Natu Date: Tue, 17 Sep 2013 16:06:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255638 - head/sys/amd64/vmm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 16:06:07 -0000 Author: neel Date: Tue Sep 17 16:06:07 2013 New Revision: 255638 URL: http://svnweb.freebsd.org/changeset/base/255638 Log: Fix a bug in decoding an instruction that has an SIB byte as well as an immediate operand. The presence of an SIB byte in decoding the ModR/M field would cause 'imm_bytes' to not be set to the correct value. Fix this by initializing 'imm_bytes' independent of the ModR/M decoding. Reported by: grehan@ Approved by: re@ Modified: head/sys/amd64/vmm/vmm_instruction_emul.c Modified: head/sys/amd64/vmm/vmm_instruction_emul.c ============================================================================== --- head/sys/amd64/vmm/vmm_instruction_emul.c Tue Sep 17 15:19:26 2013 (r255637) +++ head/sys/amd64/vmm/vmm_instruction_emul.c Tue Sep 17 16:06:07 2013 (r255638) @@ -701,12 +701,6 @@ decode_modrm(struct vie *vie) break; } - /* Figure out immediate operand size (if any) */ - if (vie->op.op_flags & VIE_OP_F_IMM) - vie->imm_bytes = 4; - else if (vie->op.op_flags & VIE_OP_F_IMM8) - vie->imm_bytes = 1; - done: vie_advance(vie); @@ -822,6 +816,12 @@ decode_immediate(struct vie *vie) int32_t signed32; } u; + /* Figure out immediate operand size (if any) */ + if (vie->op.op_flags & VIE_OP_F_IMM) + vie->imm_bytes = 4; + else if (vie->op.op_flags & VIE_OP_F_IMM8) + vie->imm_bytes = 1; + if ((n = vie->imm_bytes) == 0) return (0); From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 17:29:07 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E9FF2D99; Tue, 17 Sep 2013 17:29:07 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D5EFA2538; Tue, 17 Sep 2013 17:29:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8HHT7GA076414; Tue, 17 Sep 2013 17:29:07 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8HHT79t076413; Tue, 17 Sep 2013 17:29:07 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201309171729.r8HHT79t076413@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 17 Sep 2013 17:29:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255639 - head/sys/powerpc/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 17:29:08 -0000 Author: nwhitehorn Date: Tue Sep 17 17:29:07 2013 New Revision: 255639 URL: http://svnweb.freebsd.org/changeset/base/255639 Log: Make sure to copy segments back to the segs array if non-NULL. This is relied upon by bus_dmamap_load_mbuf_sg() (i.e. all network drivers). Approved by: re (kib) MFC after: 2 weeks Modified: head/sys/powerpc/powerpc/busdma_machdep.c Modified: head/sys/powerpc/powerpc/busdma_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/busdma_machdep.c Tue Sep 17 16:06:07 2013 (r255638) +++ head/sys/powerpc/powerpc/busdma_machdep.c Tue Sep 17 17:29:07 2013 (r255639) @@ -847,13 +847,16 @@ _bus_dmamap_complete(bus_dma_tag_t dmat, map->nsegs = nsegs; if (segs != NULL) memcpy(map->segments, segs, map->nsegs*sizeof(segs[0])); - else - segs = map->segments; if (dmat->iommu != NULL) IOMMU_MAP(dmat->iommu, map->segments, &map->nsegs, dmat->lowaddr, dmat->highaddr, dmat->alignment, dmat->boundary, dmat->iommu_cookie); + if (segs != NULL) + memcpy(segs, map->segments, map->nsegs*sizeof(segs[0])); + else + segs = map->segments; + return (segs); } From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 17:29:57 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 054C4EE5; Tue, 17 Sep 2013 17:29:57 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E489F2548; Tue, 17 Sep 2013 17:29:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8HHTuja076564; Tue, 17 Sep 2013 17:29:56 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8HHTutR076562; Tue, 17 Sep 2013 17:29:56 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201309171729.r8HHTutR076562@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 17 Sep 2013 17:29:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255640 - in head/sys/powerpc: include powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 17:29:57 -0000 Author: nwhitehorn Date: Tue Sep 17 17:29:56 2013 New Revision: 255640 URL: http://svnweb.freebsd.org/changeset/base/255640 Log: Add POWER7+ and POWER8 to the CPU ID table. Approved by: re (kib) Modified: head/sys/powerpc/include/spr.h head/sys/powerpc/powerpc/cpu.c Modified: head/sys/powerpc/include/spr.h ============================================================================== --- head/sys/powerpc/include/spr.h Tue Sep 17 17:29:07 2013 (r255639) +++ head/sys/powerpc/include/spr.h Tue Sep 17 17:29:56 2013 (r255640) @@ -168,6 +168,8 @@ #define IBMPOWER3PLUS 0x0041 #define IBM970MP 0x0044 #define IBM970GX 0x0045 +#define IBMPOWER7PLUS 0x004a +#define IBMPOWER8 0x004b #define MPC860 0x0050 #define IBMCELLBE 0x0070 #define MPC8240 0x0081 Modified: head/sys/powerpc/powerpc/cpu.c ============================================================================== --- head/sys/powerpc/powerpc/cpu.c Tue Sep 17 17:29:07 2013 (r255639) +++ head/sys/powerpc/powerpc/cpu.c Tue Sep 17 17:29:56 2013 (r255640) @@ -141,6 +141,12 @@ static const struct cputab models[] = { { "IBM POWER7", IBMPOWER7, REVFMT_MAJMIN, PPC_FEATURE_64 | PPC_FEATURE_HAS_ALTIVEC | PPC_FEATURE_HAS_FPU, NULL }, + { "IBM POWER7+", IBMPOWER7PLUS, REVFMT_MAJMIN, + PPC_FEATURE_64 | PPC_FEATURE_HAS_ALTIVEC | PPC_FEATURE_HAS_FPU, + NULL }, + { "IBM POWER8", IBMPOWER8, REVFMT_MAJMIN, + PPC_FEATURE_64 | PPC_FEATURE_HAS_ALTIVEC | PPC_FEATURE_HAS_FPU, + NULL }, { "Motorola PowerPC 7400", MPC7400, REVFMT_MAJMIN, PPC_FEATURE_HAS_ALTIVEC | PPC_FEATURE_HAS_FPU, cpu_6xx_setup }, { "Motorola PowerPC 7410", MPC7410, REVFMT_MAJMIN, From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 17:30:49 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BF4AECB; Tue, 17 Sep 2013 17:30:49 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id ACEF82560; Tue, 17 Sep 2013 17:30:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8HHUnJ4078787; Tue, 17 Sep 2013 17:30:49 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8HHUnrh078785; Tue, 17 Sep 2013 17:30:49 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201309171730.r8HHUnrh078785@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 17 Sep 2013 17:30:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255641 - head/release/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 17:30:49 -0000 Author: nwhitehorn Date: Tue Sep 17 17:30:49 2013 New Revision: 255641 URL: http://svnweb.freebsd.org/changeset/base/255641 Log: CDs are not partitioned, so this is not correct syntax for loading from ISO 9660. Omit the partition ID. Approved by: re (kib) MFC after: 2 weeks Modified: head/release/powerpc/mkisoimages.sh Modified: head/release/powerpc/mkisoimages.sh ============================================================================== --- head/release/powerpc/mkisoimages.sh Tue Sep 17 17:29:56 2013 (r255640) +++ head/release/powerpc/mkisoimages.sh Tue Sep 17 17:30:49 2013 (r255641) @@ -40,7 +40,7 @@ if [ "x$1" = "x-b" ]; then FreeBSD Install FreeBSD -boot &device;:&partition;,\ppc\chrp\loader +boot &device;:,\ppc\chrp\loader EOF bootable="$bootable -o chrp-boot" From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 17:31:53 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 966D6230; Tue, 17 Sep 2013 17:31:53 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 82BDA259E; Tue, 17 Sep 2013 17:31:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8HHVr8f078997; Tue, 17 Sep 2013 17:31:53 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8HHVrRW078996; Tue, 17 Sep 2013 17:31:53 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201309171731.r8HHVrRW078996@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 17 Sep 2013 17:31:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255642 - head/sys/powerpc/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 17:31:53 -0000 Author: nwhitehorn Date: Tue Sep 17 17:31:53 2013 New Revision: 255642 URL: http://svnweb.freebsd.org/changeset/base/255642 Log: Only attach if properties we need (address, in particular) are present. This is the correct version of r255420. Approved by: re (kib) Modified: head/sys/powerpc/ofw/ofw_syscons.c Modified: head/sys/powerpc/ofw/ofw_syscons.c ============================================================================== --- head/sys/powerpc/ofw/ofw_syscons.c Tue Sep 17 17:30:49 2013 (r255641) +++ head/sys/powerpc/ofw/ofw_syscons.c Tue Sep 17 17:31:53 2013 (r255642) @@ -264,6 +264,10 @@ ofwfb_configure(int flags) } else return (0); + if (OF_getproplen(node, "height") != sizeof(sc->sc_height) || + OF_getproplen(node, "width") != sizeof(sc->sc_width)) + return (0); + sc->sc_depth = depth; sc->sc_node = node; sc->sc_console = 1; @@ -278,6 +282,8 @@ ofwfb_configure(int flags) * * XXX We assume #address-cells is 1 at this point. */ + if (OF_getproplen(node, "address") != sizeof(fb_phys)) + return (0); OF_getprop(node, "address", &fb_phys, sizeof(fb_phys)); bus_space_map(&bs_be_tag, fb_phys, sc->sc_height * sc->sc_stride, From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 17:37:06 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 37A3F52B; Tue, 17 Sep 2013 17:37:06 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2355225FE; Tue, 17 Sep 2013 17:37:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8HHb6Pq080551; Tue, 17 Sep 2013 17:37:06 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8HHb4mX080538; Tue, 17 Sep 2013 17:37:04 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201309171737.r8HHb4mX080538@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 17 Sep 2013 17:37:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255643 - in head/sys: conf powerpc/conf powerpc/pseries X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 17:37:06 -0000 Author: nwhitehorn Date: Tue Sep 17 17:37:04 2013 New Revision: 255643 URL: http://svnweb.freebsd.org/changeset/base/255643 Log: Merge in support for PAPR-compliant (Power Architecture Platform Requirements) systems from the projects/pseries branch. This in principle includes all IBM POWER hardware released in the last 15 years with the exception of POWER3-based systems when run in 64-bit mode. The main development target, however, has been the PAPR logical partition support that is the default target in KVM on POWER and QEMU -- mileage may vary on actual hardware at present. Much of the heavy lifting here was done by Andreas Tobler. Approved by: re (kib) Added: head/sys/powerpc/pseries/ head/sys/powerpc/pseries/mmu_phyp.c (contents, props changed) head/sys/powerpc/pseries/phyp-hvcall.S (contents, props changed) head/sys/powerpc/pseries/phyp-hvcall.h (contents, props changed) head/sys/powerpc/pseries/phyp_console.c (contents, props changed) head/sys/powerpc/pseries/platform_chrp.c (contents, props changed) head/sys/powerpc/pseries/plpar_iommu.c (contents, props changed) head/sys/powerpc/pseries/plpar_iommu.h (contents, props changed) head/sys/powerpc/pseries/rtas_dev.c (contents, props changed) head/sys/powerpc/pseries/rtas_pci.c (contents, props changed) head/sys/powerpc/pseries/vdevice.c (contents, props changed) head/sys/powerpc/pseries/xics.c (contents, props changed) Modified: head/sys/conf/files.powerpc head/sys/conf/options.powerpc head/sys/powerpc/conf/DEFAULTS head/sys/powerpc/conf/GENERIC head/sys/powerpc/conf/GENERIC64 Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Tue Sep 17 17:31:53 2013 (r255642) +++ head/sys/conf/files.powerpc Tue Sep 17 17:37:04 2013 (r255643) @@ -225,6 +225,15 @@ powerpc/ps3/ps3disk.c optional ps3 powerpc/ps3/ps3pic.c optional ps3 powerpc/ps3/ps3_syscons.c optional ps3 sc powerpc/ps3/ps3-hvcall.S optional ps3 sc +powerpc/pseries/phyp-hvcall.S optional pseries powerpc64 +powerpc/pseries/mmu_phyp.c optional pseries powerpc64 +powerpc/pseries/phyp_console.c optional pseries powerpc64 +powerpc/pseries/platform_chrp.c optional pseries +powerpc/pseries/plpar_iommu.c optional pseries powerpc64 +powerpc/pseries/rtas_dev.c optional pseries +powerpc/pseries/rtas_pci.c optional pseries pci +powerpc/pseries/vdevice.c optional pseries powerpc64 +powerpc/pseries/xics.c optional pseries powerpc64 powerpc/psim/iobus.c optional psim powerpc/psim/ata_iobus.c optional ata psim powerpc/psim/openpic_iobus.c optional psim Modified: head/sys/conf/options.powerpc ============================================================================== --- head/sys/conf/options.powerpc Tue Sep 17 17:31:53 2013 (r255642) +++ head/sys/conf/options.powerpc Tue Sep 17 17:37:04 2013 (r255643) @@ -22,6 +22,7 @@ MPC85XX opt_platform.h POWERMAC opt_platform.h PS3 opt_platform.h MAMBO +PSERIES PSIM WII opt_platform.h Modified: head/sys/powerpc/conf/DEFAULTS ============================================================================== --- head/sys/powerpc/conf/DEFAULTS Tue Sep 17 17:31:53 2013 (r255642) +++ head/sys/powerpc/conf/DEFAULTS Tue Sep 17 17:37:04 2013 (r255643) @@ -9,6 +9,7 @@ device mem # Memory and kernel memory # UART chips on this platform device uart_ns8250 +options GEOM_PART_BSD options GEOM_PART_MBR options NEW_PCIB Modified: head/sys/powerpc/conf/GENERIC ============================================================================== --- head/sys/powerpc/conf/GENERIC Tue Sep 17 17:31:53 2013 (r255642) +++ head/sys/powerpc/conf/GENERIC Tue Sep 17 17:37:04 2013 (r255643) @@ -30,6 +30,7 @@ makeoptions WITH_CTF=1 options POWERMAC #NewWorld Apple PowerMacs options PSIM #GDB PSIM ppc simulator options MAMBO #IBM Mambo Full System Simulator +options PSERIES #PAPR-compliant systems options SCHED_ULE #ULE scheduler options PREEMPTION #Enable kernel thread preemption Modified: head/sys/powerpc/conf/GENERIC64 ============================================================================== --- head/sys/powerpc/conf/GENERIC64 Tue Sep 17 17:31:53 2013 (r255642) +++ head/sys/powerpc/conf/GENERIC64 Tue Sep 17 17:37:04 2013 (r255643) @@ -30,6 +30,7 @@ makeoptions WITH_CTF=1 options POWERMAC #NewWorld Apple PowerMacs options PS3 #Sony Playstation 3 options MAMBO #IBM Mambo Full System Simulator +options PSERIES #PAPR-compliant systems (e.g. IBM p) options SCHED_ULE #ULE scheduler options PREEMPTION #Enable kernel thread preemption @@ -131,6 +132,9 @@ device uart device uart_z8530 # Ethernet hardware +device em # Intel PRO/1000 Gigabit Ethernet Family +device igb # Intel PRO/1000 PCIE Server Gigabit Family +device ixgbe # Intel PRO/10GbE PCIE Ethernet Family device glc # Sony Playstation 3 Ethernet # PCI Ethernet NICs that use the common MII bus controller code. @@ -139,6 +143,8 @@ device bge # Broadcom BCM570xx Gigabit device gem # Sun GEM/Sun ERI/Apple GMAC device dc # DEC/Intel 21143 and various workalikes device fxp # Intel EtherExpress PRO/100B (82557, 82558) +device re # RealTek 8139C+/8169/8169S/8110S +device rl # RealTek 8129/8139 # Pseudo devices. device loop # Network loopback Added: head/sys/powerpc/pseries/mmu_phyp.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/pseries/mmu_phyp.c Tue Sep 17 17:37:04 2013 (r255643) @@ -0,0 +1,420 @@ +/* + * Copyright (C) 2010 Andreas Tobler + * 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 ``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 TOOLS GMBH 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 +#include +#include +#include + +#include + +#include "mmu_if.h" +#include "moea64_if.h" + +#include "phyp-hvcall.h" + +extern int n_slbs; + +/* + * Kernel MMU interface + */ + +static void mphyp_bootstrap(mmu_t mmup, vm_offset_t kernelstart, + vm_offset_t kernelend); +static void mphyp_cpu_bootstrap(mmu_t mmup, int ap); +static void mphyp_pte_synch(mmu_t, uintptr_t pt, struct lpte *pvo_pt); +static void mphyp_pte_clear(mmu_t, uintptr_t pt, struct lpte *pvo_pt, + uint64_t vpn, u_int64_t ptebit); +static void mphyp_pte_unset(mmu_t, uintptr_t pt, struct lpte *pvo_pt, + uint64_t vpn); +static void mphyp_pte_change(mmu_t, uintptr_t pt, struct lpte *pvo_pt, + uint64_t vpn); +static int mphyp_pte_insert(mmu_t, u_int ptegidx, struct lpte *pvo_pt); +static uintptr_t mphyp_pvo_to_pte(mmu_t, const struct pvo_entry *pvo); + +#define VSID_HASH_MASK 0x0000007fffffffffULL + + +static mmu_method_t mphyp_methods[] = { + MMUMETHOD(mmu_bootstrap, mphyp_bootstrap), + MMUMETHOD(mmu_cpu_bootstrap, mphyp_cpu_bootstrap), + + MMUMETHOD(moea64_pte_synch, mphyp_pte_synch), + MMUMETHOD(moea64_pte_clear, mphyp_pte_clear), + MMUMETHOD(moea64_pte_unset, mphyp_pte_unset), + MMUMETHOD(moea64_pte_change, mphyp_pte_change), + MMUMETHOD(moea64_pte_insert, mphyp_pte_insert), + MMUMETHOD(moea64_pvo_to_pte, mphyp_pvo_to_pte), + + { 0, 0 } +}; + +MMU_DEF_INHERIT(pseries_mmu, "mmu_phyp", mphyp_methods, 0, oea64_mmu); + +static void +mphyp_bootstrap(mmu_t mmup, vm_offset_t kernelstart, vm_offset_t kernelend) +{ + uint64_t final_pteg_count = 0; + char buf[8]; + uint32_t prop[2]; + uint32_t nptlp, shift = 0, slb_encoding = 0; + phandle_t dev, node, root; + int idx, len, res; + + moea64_early_bootstrap(mmup, kernelstart, kernelend); + + root = OF_peer(0); + + dev = OF_child(root); + while (dev != 0) { + res = OF_getprop(dev, "name", buf, sizeof(buf)); + if (res > 0 && strcmp(buf, "cpus") == 0) + break; + dev = OF_peer(dev); + } + + node = OF_child(dev); + + while (node != 0) { + res = OF_getprop(node, "device_type", buf, sizeof(buf)); + if (res > 0 && strcmp(buf, "cpu") == 0) + break; + node = OF_peer(node); + } + + res = OF_getprop(node, "ibm,pft-size", prop, sizeof(prop)); + if (res <= 0) + panic("mmu_phyp: unknown PFT size"); + final_pteg_count = 1 << prop[1]; + res = OF_getprop(node, "ibm,slb-size", prop, sizeof(prop[0])); + if (res > 0) + n_slbs = prop[0]; + + moea64_pteg_count = final_pteg_count / sizeof(struct lpteg); + + /* + * Scan the large page size property for PAPR compatible machines. + * See PAPR D.5 Changes to Section 5.1.4, 'CPU Node Properties' + * for the encoding of the property. + */ + + len = OF_getproplen(node, "ibm,segment-page-sizes"); + if (len > 0) { + /* + * We have to use a variable length array on the stack + * since we have very limited stack space. + */ + cell_t arr[len/sizeof(cell_t)]; + res = OF_getprop(node, "ibm,segment-page-sizes", &arr, + sizeof(arr)); + len /= 4; + idx = 0; + while (len > 0) { + shift = arr[idx]; + slb_encoding = arr[idx + 1]; + nptlp = arr[idx + 2]; + idx += 3; + len -= 3; + while (len > 0 && nptlp) { + idx += 2; + len -= 2; + nptlp--; + } + } + moea64_large_page_shift = shift; + moea64_large_page_size = 1 << shift; + } + + moea64_mid_bootstrap(mmup, kernelstart, kernelend); + moea64_late_bootstrap(mmup, kernelstart, kernelend); +} + +static void +mphyp_cpu_bootstrap(mmu_t mmup, int ap) +{ + struct slb *slb = PCPU_GET(slb); + register_t seg0; + int i; + + /* + * Install kernel SLB entries + */ + + __asm __volatile ("slbia"); + __asm __volatile ("slbmfee %0,%1; slbie %0;" : "=r"(seg0) : "r"(0)); + for (i = 0; i < 64; i++) { + if (!(slb[i].slbe & SLBE_VALID)) + continue; + + __asm __volatile ("slbmte %0, %1" :: + "r"(slb[i].slbv), "r"(slb[i].slbe)); + } +} + +static void +mphyp_pte_synch(mmu_t mmu, uintptr_t slot, struct lpte *pvo_pt) +{ + struct lpte pte; + uint64_t junk; + + phyp_pft_hcall(H_READ, 0, slot, 0, 0, &pte.pte_hi, &pte.pte_lo, + &junk); + + pvo_pt->pte_lo |= pte.pte_lo & (LPTE_CHG | LPTE_REF); +} + +static void +mphyp_pte_clear(mmu_t mmu, uintptr_t slot, struct lpte *pvo_pt, uint64_t vpn, + u_int64_t ptebit) +{ + + if (ptebit & LPTE_CHG) + phyp_hcall(H_CLEAR_MOD, 0, slot); + if (ptebit & LPTE_REF) + phyp_hcall(H_CLEAR_REF, 0, slot); +} + +static void +mphyp_pte_unset(mmu_t mmu, uintptr_t slot, struct lpte *pvo_pt, uint64_t vpn) +{ + + /* XXX: last argument can check the VPN -- set flag to enable */ + phyp_hcall(H_REMOVE, 0, slot, vpn); +} + +static void +mphyp_pte_change(mmu_t mmu, uintptr_t slot, struct lpte *pvo_pt, uint64_t vpn) +{ + struct lpte evicted; + uint64_t index, junk; + int64_t result; + + /* + * NB: this is protected by the global table lock, so this two-step + * is safe, except for the scratch-page case. No CPUs on which we run + * this code should be using scratch pages. + */ + KASSERT(!(pvo_pt->pte_hi & LPTE_LOCKED), + ("Locked pages not supported on PHYP")); + + /* XXX: optimization using H_PROTECT for common case? */ + result = phyp_hcall(H_REMOVE, 0, slot, vpn); + if (result != H_SUCCESS) + panic("mphyp_pte_change() invalidation failure: %ld\n", result); + result = phyp_pft_hcall(H_ENTER, H_EXACT, slot, pvo_pt->pte_hi, + pvo_pt->pte_lo, &index, &evicted.pte_lo, &junk); + if (result != H_SUCCESS) + panic("mphyp_pte_change() insertion failure: %ld\n", result); +} + +static __inline int +mphyp_pte_spillable_ident(u_int ptegidx, struct lpte *to_evict) +{ + uint64_t slot, junk, k; + struct lpte pt; + int i, j; + + /* Start at a random slot */ + i = mftb() % 8; + k = -1; + for (j = 0; j < 8; j++) { + slot = (ptegidx << 3) + (i + j) % 8; + phyp_pft_hcall(H_READ, 0, slot, 0, 0, &pt.pte_hi, &pt.pte_lo, + &junk); + + if (pt.pte_hi & LPTE_SWBITS) + continue; + + /* This is a candidate, so remember it */ + k = slot; + + /* Try to get a page that has not been used lately */ + if (!(pt.pte_lo & LPTE_REF)) { + memcpy(to_evict, &pt, sizeof(struct lpte)); + return (k); + } + } + + phyp_pft_hcall(H_READ, 0, slot, 0, 0, &to_evict->pte_hi, + &to_evict->pte_lo, &junk); + return (k); +} + +static int +mphyp_pte_insert(mmu_t mmu, u_int ptegidx, struct lpte *pvo_pt) +{ + int64_t result; + struct lpte evicted; + struct pvo_entry *pvo; + uint64_t index, junk; + u_int pteg_bktidx; + + /* Check for locked pages, which we can't support on this system */ + KASSERT(!(pvo_pt->pte_hi & LPTE_LOCKED), + ("Locked pages not supported on PHYP")); + + /* Initialize PTE */ + pvo_pt->pte_hi |= LPTE_VALID; + pvo_pt->pte_hi &= ~LPTE_HID; + evicted.pte_hi = 0; + + /* + * First try primary hash. + */ + pteg_bktidx = ptegidx; + result = phyp_pft_hcall(H_ENTER, 0, pteg_bktidx << 3, pvo_pt->pte_hi, + pvo_pt->pte_lo, &index, &evicted.pte_lo, &junk); + if (result == H_SUCCESS) + return (index & 0x07); + KASSERT(result == H_PTEG_FULL, ("Page insertion error: %ld " + "(ptegidx: %#x/%#x, PTE %#lx/%#lx", result, ptegidx, + moea64_pteg_count, pvo_pt->pte_hi, pvo_pt->pte_lo)); + + /* + * Next try secondary hash. + */ + pteg_bktidx ^= moea64_pteg_mask; + pvo_pt->pte_hi |= LPTE_HID; + result = phyp_pft_hcall(H_ENTER, 0, pteg_bktidx << 3, + pvo_pt->pte_hi, pvo_pt->pte_lo, &index, &evicted.pte_lo, &junk); + if (result == H_SUCCESS) + return (index & 0x07); + KASSERT(result == H_PTEG_FULL, ("Secondary page insertion error: %ld", + result)); + + /* + * Out of luck. Find a PTE to sacrifice. + */ + pteg_bktidx = ptegidx; + index = mphyp_pte_spillable_ident(pteg_bktidx, &evicted); + if (index == -1L) { + pteg_bktidx ^= moea64_pteg_mask; + index = mphyp_pte_spillable_ident(pteg_bktidx, &evicted); + } + + if (index == -1L) { + /* No freeable slots in either PTEG? We're hosed. */ + panic("mphyp_pte_insert: overflow"); + return (-1); + } + + if (pteg_bktidx == ptegidx) + pvo_pt->pte_hi &= ~LPTE_HID; + else + pvo_pt->pte_hi |= LPTE_HID; + + /* + * Synchronize the sacrifice PTE with its PVO, then mark both + * invalid. The PVO will be reused when/if the VM system comes + * here after a fault. + */ + + if (evicted.pte_hi & LPTE_HID) + pteg_bktidx ^= moea64_pteg_mask; /* PTEs indexed by primary */ + + LIST_FOREACH(pvo, &moea64_pvo_table[pteg_bktidx], pvo_olink) { + if (pvo->pvo_pte.lpte.pte_hi == evicted.pte_hi) { + KASSERT(pvo->pvo_pte.lpte.pte_hi & LPTE_VALID, + ("Invalid PVO for valid PTE!")); + phyp_hcall(H_REMOVE, 0, index, 0); + PVO_PTEGIDX_CLR(pvo); + moea64_pte_overflow++; + break; + } + } + + KASSERT(pvo->pvo_pte.lpte.pte_hi == evicted.pte_hi, + ("Unable to find PVO for spilled PTE")); + + /* + * Set the new PTE. + */ + result = phyp_pft_hcall(H_ENTER, H_EXACT, index, pvo_pt->pte_hi, + pvo_pt->pte_lo, &index, &evicted.pte_lo, &junk); + if (result == H_SUCCESS) + return (index & 0x07); + + panic("Page replacement error: %ld", result); + return (-1); +} + +static __inline u_int +va_to_pteg(uint64_t vsid, vm_offset_t addr, int large) +{ + uint64_t hash; + int shift; + + shift = large ? moea64_large_page_shift : ADDR_PIDX_SHFT; + hash = (vsid & VSID_HASH_MASK) ^ (((uint64_t)addr & ADDR_PIDX) >> + shift); + return (hash & moea64_pteg_mask); +} + +static uintptr_t +mphyp_pvo_to_pte(mmu_t mmu, const struct pvo_entry *pvo) +{ + uint64_t vsid; + u_int ptegidx; + + /* If the PTEG index is not set, then there is no page table entry */ + if (!PVO_PTEGIDX_ISSET(pvo)) + return (-1); + + vsid = PVO_VSID(pvo); + ptegidx = va_to_pteg(vsid, PVO_VADDR(pvo), pvo->pvo_vaddr & PVO_LARGE); + + /* + * We can find the actual pte entry without searching by grabbing + * the PTEG index from 3 unused bits in pvo_vaddr and by + * noticing the HID bit. + */ + if (pvo->pvo_pte.lpte.pte_hi & LPTE_HID) + ptegidx ^= moea64_pteg_mask; + + return ((ptegidx << 3) | PVO_PTEGIDX_GET(pvo)); +} + Added: head/sys/powerpc/pseries/phyp-hvcall.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/pseries/phyp-hvcall.S Tue Sep 17 17:37:04 2013 (r255643) @@ -0,0 +1,68 @@ +/*- + * Copyright (C) 2010 Andreas Tobler + * 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 ``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 TOOLS GMBH 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 + +/* Hypervisor entry call. */ +#define hc .long 0x44000022 + +/* + * Simple HV calls take the same arguments, with the same ABI, as this + * C function + */ +ASENTRY(phyp_hcall) + mflr %r0 + std %r0,16(%r1) + hc /* invoke the hypervisor */ + ld %r0,16(%r1) + mtlr %r0 + blr /* return r3 = status */ + +/* + * PFT HV calls take a special ABI (see PAPR 14.5.4.1) + * + * r3-r7 arguments passed unchanged, r8-r10 are addresses of return values + * HV takes the same r3-r7, but returns values in r3, r4-r6 + */ +ASENTRY(phyp_pft_hcall) + mflr %r0 + std %r0,16(%r1) + stdu %r1,-80(%r1) + std %r8,48(%r1) /* save arguments */ + std %r9,56(%r1) + std %r10,64(%r1) + hc /* invoke the hypervisor */ + ld %r11,48(%r1) /* store results */ + std %r4,0(%r11) + ld %r11,56(%r1) + std %r5,0(%r11) + ld %r11,64(%r1) + std %r6,0(%r11) + ld %r1,0(%r1) /* exit */ + ld %r0,16(%r1) + mtlr %r0 + blr /* return r3 = status */ + Added: head/sys/powerpc/pseries/phyp-hvcall.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/pseries/phyp-hvcall.h Tue Sep 17 17:37:04 2013 (r255643) @@ -0,0 +1,305 @@ +/*- + * Copyright (C) 2010 Andreas Tobler + * 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 ``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 TOOLS GMBH 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 _PSERIES_PHYP_HVCALL_H_ +#define _PSERIES_PHYP_HVCALL_H_ + +/* Information taken from: Power.org PAPR, Version 2.4 (December 7, 2009). */ + +#include + +/* Return codes. */ + +#define H_SUCCESS 0 +#define H_BUSY 1 /* Hardware Busy -- Retry Later. */ +#define H_CLOSED 2 /* Virtual I/O connection is closed. */ +#define H_NOT_AVAILABLE 3 +#define H_CONSTRAINED 4 /* The request called for resources in excess of + the maximum allowed. The resultant allocation + was constrained to maximum allowed. */ +#define H_PARTIAL 5 /* The request completed only partially successful. + Parameters were valid but some specific hcall + function condition prevented fully completing the + architected function, see the specific hcall + definition for possible reasons. */ +#define H_IN_PROGRESS 14 +#define H_PAGE_REGISTERED 15 +#define H_PARTIAL_STORE 16 +#define H_PENDING 17 +#define H_CONTINUE 18 + +#define H_LONG_BUSY_ORDER_1_MS 9900 /* This return code is identical to + H_BUSY, but with the added bonus of a + hint to the partition OS. If the + partition OS can delay for 1 + millisecond, the hcall will likely + succeed on a new hcall with no further + busy return codes. If the partition OS + cannot handle a delay, they are + certainly free to immediately turn + around and try again. */ +#define H_LONG_BUSY_ORDER_10_MS 9901 /* Similar to H_LONG_BUSY_ORDER_1_MS, but + the hint is 10mSec wait this time. */ + +#define H_LONG_BUSY_ORDER_100_MS 9902 /* Similar to H_LONG_BUSY_ORDER_1_MS, but + the hint is 100mSec wait this time. */ + +#define H_LONG_BUSY_ORDER_1_S 9903 /* Similar to H_LONG_BUSY_ORDER_1_MS, but + the hint is 1Sec wait this time. */ +#define H_LONG_BUSY_ORDER_10_S 9904 /* Similar to H_LONG_BUSY_ORDER_1_MS, but + the hint is 10Sec wait this time. */ +#define H_LONG_BUSY_ORDER_100_S 9905 /* Similar to H_LONG_BUSY_ORDER_1_MS, but + the hint is 100Sec wait this time. */ + +#define H_HARDWARE -1 /* Error. */ +#define H_FUNCTION -2 /* Not supported. */ +#define H_PRIVILEGE -3 /* Caller not in privileged mode. */ +#define H_PARAMETER -4 /* Outside valid range for partition or conflicting. */ +#define H_BAD_MODE -5 /* Illegal MSR value. */ +#define H_PTEG_FULL -6 /* The requested pteg was full. */ +#define H_NOT_FOUND -7 /* The requested entitiy was not found. */ +#define H_RESERVED_DABR -8 /* The requested address is reserved by the + hypervisor on this processor. */ +#define H_NOMEM -9 +#define H_AUTHORITY -10 /* The caller did not have authority to perform the + function. */ +#define H_PERMISSION -11 /* The mapping specified by the request does not + allow for the requested transfer. */ +#define H_DROPPED -12 /* One or more packets could not be delivered to + their requested destinations. */ +#define H_S_PARM -13 /* The source parameter is illegal. */ +#define H_D_PARM -14 /* The destination parameter is illegal. */ +#define H_R_PARM -15 /* The remote TCE mapping is illegal. */ +#define H_RESOURCE -16 /* One or more required resources are in use. */ +#define H_ADAPTER_PARM -17 /* Invalid adapter. */ +#define H_RH_PARM -18 /* Resource not valid or logical partition + conflicting. */ +#define H_RCQ_PARM -19 /* RCQ not valid or logical partition conflicting. */ +#define H_SCQ_PARM -20 /* SCQ not valid or logical partition conflicting. */ +#define H_EQ_PARM -21 /* EQ not valid or logical partition conflicting. */ +#define H_RT_PARM -22 /* Invalid resource type. */ +#define H_ST_PARM -23 /* Invalid service type. */ +#define H_SIGT_PARM -24 /* Invalid signalling type. */ +#define H_TOKEN_PARM -25 /* Invalid token. */ +#define H_MLENGTH_PARM -27 /* Invalid memory length. */ +#define H_MEM_PARM -28 /* Invalid memory I/O virtual address. */ +#define H_MEM_ACCESS_PARM -29 /* Invalid memory access control. */ +#define H_ATTR_PARM -30 /* Invalid attribute value. */ +#define H_PORT_PARM -31 /* Invalid port number. */ +#define H_MCG_PARM -32 /* Invalid multicast group. */ +#define H_VL_PARM -33 /* Invalid virtual lane. */ +#define H_TSIZE_PARM -34 /* Invalid trace size. */ +#define H_TRACE_PARM -35 /* Invalid trace buffer. */ +#define H_MASK_PARM -37 /* Invalid mask value. */ +#define H_MCG_FULL -38 /* Multicast attachments exceeded. */ +#define H_ALIAS_EXIST -39 /* Alias QP already defined. */ +#define H_P_COUNTER -40 /* Invalid counter specification. */ +#define H_TABLE_FULL -41 /* Resource page table full. */ +#define H_ALT_TABLE -42 /* Alternate table already exists / alternate page + table not available. */ +#define H_MR_CONDITION -43 /* Invalid memory region condition. */ +#define H_NOT_ENOUGH_RESOURCES -44 /* Insufficient resources. */ +#define H_R_STATE -45 /* Invalid resource state condition or sequencing + error. */ +#define H_RESCINDED -46 +#define H_ABORTED -54 +#define H_P2 -55 +#define H_P3 -56 +#define H_P4 -57 +#define H_P5 -58 +#define H_P6 -59 +#define H_P7 -60 +#define H_P8 -61 +#define H_P9 -62 +#define H_NOOP -63 +#define H_TOO_BIG -64 + +#define H_UNSUPPORTED -67 /* Parameter value outside of the range supported + by this implementation. */ + +/* Flags. */ +/* Table 168. Page Frame Table Access flags field definition. */ +#define H_EXACT (1UL<<(63-24)) +#define H_R_XLATE (1UL<<(63-25)) +#define H_READ_4 (1UL<<(63-26)) + +/* Table 178. CMO Page Usage State flags Definition. */ +#define H_PAGE_STATE_CHANGE (1UL<<(63-28)) +#define H_PAGE_UNUSED ((1UL<<(63-29)) | (1UL<<(63-30))) +#define H_PAGE_SET_UNUSED (H_PAGE_STATE_CHANGE | H_PAGE_UNUSED) +#define H_PAGE_SET_LOANED (H_PAGE_SET_UNUSED | (1UL<<(63-31))) +#define H_PAGE_SET_ACTIVE H_PAGE_STATE_CHANGE + +/* Table 168. Page Frame Table Access flags field definition. */ +#define H_AVPN (1UL<<(63-32)) +#define H_ANDCOND (1UL<<(63-33)) + +#define H_ICACHE_INVALIDATE (1UL<<(63-40)) +#define H_ICACHE_SYNCHRONIZE (1UL<<(63-41)) + +#define H_ZERO_PAGE (1UL<<(63-48)) +#define H_COPY_PAGE (1UL<<(63-49)) + +#define H_N (1UL<<(63-61)) +#define H_PP1 (1UL<<(63-62)) +#define H_PP2 (1UL<<(63-63)) + +/* pSeries hypervisor opcodes. */ +#define H_REMOVE 0x04 +#define H_ENTER 0x08 +#define H_READ 0x0c +#define H_CLEAR_MOD 0x10 +#define H_CLEAR_REF 0x14 +#define H_PROTECT 0x18 +#define H_GET_TCE 0x1c +#define H_PUT_TCE 0x20 +#define H_SET_SPRG0 0x24 +#define H_SET_DABR 0x28 +#define H_PAGE_INIT 0x2c +#define H_SET_ASR 0x30 +#define H_ASR_ON 0x34 +#define H_ASR_OFF 0x38 +#define H_LOGICAL_CI_LOAD 0x3c +#define H_LOGICAL_CI_STORE 0x40 +#define H_LOGICAL_CACHE_LOAD 0x44 +#define H_LOGICAL_CACHE_STORE 0x48 +#define H_LOGICAL_ICBI 0x4c +#define H_LOGICAL_DCBF 0x50 +#define H_GET_TERM_CHAR 0x54 +#define H_PUT_TERM_CHAR 0x58 +#define H_REAL_TO_LOGICAL 0x5c +#define H_HYPERVISOR_DATA 0x60 +#define H_EOI 0x64 +#define H_CPPR 0x68 +#define H_IPI 0x6c +#define H_IPOLL 0x70 +#define H_XIRR 0x74 +#define H_MIGRATE_DMA 0x78 +#define H_PERFMON 0x7c +#define H_REGISTER_VPA 0xdc +#define H_CEDE 0xe0 +#define H_CONFER 0xe4 +#define H_PROD 0xe8 +#define H_GET_PPP 0xec +#define H_SET_PPP 0xf0 +#define H_PURR 0xf4 +#define H_PIC 0xf8 +#define H_REG_CRQ 0xfc +#define H_FREE_CRQ 0x100 +#define H_VIO_SIGNAL 0x104 +#define H_SEND_CRQ 0x108 +#define H_PUT_RTCE 0x10c +#define H_COPY_RDMA 0x110 +#define H_REGISTER_LOGICAL_LAN 0x114 +#define H_FREE_LOGICAL_LAN 0x118 +#define H_ADD_LOGICAL_LAN_BUFFER 0x11c +#define H_SEND_LOGICAL_LAN 0x120 +#define H_BULK_REMOVE 0x124 +#define H_WRITE_RDMA 0x128 +#define H_READ_RDMA 0x12c +#define H_MULTICAST_CTRL 0x130 +#define H_SET_XDABR 0x134 +#define H_STUFF_TCE 0x138 +#define H_PUT_TCE_INDIRECT 0x13c +#define H_PUT_RTCE_INDIRECT 0x140 +#define H_CHANGE_LOGICAL_LAN_MAC 0x14c +#define H_VTERM_PARTNER_INFO 0x150 +#define H_REGISTER_VTERM 0x154 +#define H_FREE_VTERM 0x158 +/* Reserved .... +#define H_RESET_EVENTS 0x15c +#define H_ALLOC_RESOURCE 0x160 +#define H_FREE_RESOURCE 0x164 +#define H_MODIFY_QP 0x168 +#define H_QUERY_QP 0x16c +#define H_REREGISTER_PMR 0x170 +#define H_REGISTER_SMR 0x174 +#define H_QUERY_MR 0x178 +#define H_QUERY_MW 0x17c +#define H_QUERY_HCA 0x180 +#define H_QUERY_PORT 0x184 +#define H_MODIFY_PORT 0x188 +#define H_DEFINE_AQP1 0x18c +#define H_GET_TRACE_BUFFER 0x190 +#define H_DEFINE_AQP0 0x194 +#define H_RESIZE_MR 0x198 +#define H_ATTACH_MCQP 0x19c +#define H_DETACH_MCQP 0x1a0 +#define H_CREATE_RPT 0x1a4 +#define H_REMOVE_RPT 0x1a8 +#define H_REGISTER_RPAGES 0x1ac +#define H_DISABLE_AND_GETC 0x1b0 +#define H_ERROR_DATA 0x1b4 +#define H_GET_HCA_INFO 0x1b8 +#define H_GET_PERF_COUNT 0x1bc +#define H_MANAGE_TRACE 0x1c0 +.... */ +#define H_FREE_LOGICAL_LAN_BUFFER 0x1d4 +#define H_POLL_PENDING 0x1d8 +/* Reserved .... +#define H_QUERY_INT_STATE 0x1e4 +.... */ +#define H_LIOBN_ATTRIBUTES 0x240 +#define H_ILLAN_ATTRIBUTES 0x244 +#define H_REMOVE_RTCE 0x24c +/* Reserved ... +#define H_MODIFY_HEA_QP 0x250 +#define H_QUERY_HEA_QP 0x254 +#define H_QUERY_HEA 0x258 +#define H_QUERY_HEA_PORT 0x25c +#define H_MODIFY_HEA_PORT 0x260 +#define H_REG_BCMC 0x264 +#define H_DEREG_BCMC 0x268 +#define H_REGISTER_HEA_RPAGES 0x26c +#define H_DISABLE_AND_GET_HEA 0x270 +#define H_GET_HEA_INFO 0x274 +#define H_ALLOC_HEA_RESOURCE 0x278 +#define H_ADD_CONN 0x284 +#define H_DEL_CONN 0x288 +... */ +#define H_JOIN 0x298 +#define H_DONOR_OPERATION 0x29c +#define H_VASI_SIGNAL 0x2a0 +#define H_VASI_STATE 0x2a4 +#define H_VIOCTL 0x2a8 +#define H_VRMASD 0x2ac +#define H_ENABLE_CRQ 0x2b0 +/* Reserved ... +#define H_GET_EM_PARMS 0x2b8 +... */ +#define H_VPM_STAT 0x2bc +#define H_SET_MPP 0x2d0 +#define H_GET_MPP 0x2d4 +#define MAX_HCALL_OPCODE H_GET_MPP + +int64_t phyp_hcall(uint64_t opcode, ...); +int64_t phyp_pft_hcall(uint64_t opcode, uint64_t flags, uint64_t pteidx, + uint64_t pte_hi, uint64_t pte_lo, uint64_t *pteidx_out, uint64_t *ptelo_out, + uint64_t *r6); + +#endif /* _PSERIES_PHYP_HVCALL_H_ */ + Added: head/sys/powerpc/pseries/phyp_console.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/pseries/phyp_console.c Tue Sep 17 17:37:04 2013 (r255643) @@ -0,0 +1,420 @@ +/*- + * Copyright (C) 2011 by Nathan Whitehorn. 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 ``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 TOOLS GMBH 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 "phyp-hvcall.h" +#include "uart_if.h" + +struct uart_phyp_softc { + device_t dev; + phandle_t node; + int vtermid; + + struct tty *tp; + struct resource *irqres; + int irqrid; + struct callout callout; + void *sc_icookie; + int polltime; + + struct mtx sc_mtx; + int protocol; + + union { + uint64_t u64[2]; + char str[16]; + } phyp_inbuf; + uint64_t inbuflen; + uint8_t outseqno; +}; + +static struct uart_phyp_softc *console_sc = NULL; +#if defined(KDB) +static int alt_break_state; +#endif + +enum { + HVTERM1, HVTERMPROT +}; + +#define VS_DATA_PACKET_HEADER 0xff +#define VS_CONTROL_PACKET_HEADER 0xfe +#define VSV_SET_MODEM_CTL 0x01 +#define VSV_MODEM_CTL_UPDATE 0x02 +#define VSV_RENEGOTIATE_CONNECTION 0x03 +#define VS_QUERY_PACKET_HEADER 0xfd +#define VSV_SEND_VERSION_NUMBER 0x01 +#define VSV_SEND_MODEM_CTL_STATUS 0x02 +#define VS_QUERY_RESPONSE_PACKET_HEADER 0xfc + +static int uart_phyp_probe(device_t dev); +static int uart_phyp_attach(device_t dev); +static void uart_phyp_intr(void *v); + +static device_method_t uart_phyp_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, uart_phyp_probe), + DEVMETHOD(device_attach, uart_phyp_attach), + + DEVMETHOD_END +}; + +static driver_t uart_phyp_driver = { + "uart", + uart_phyp_methods, + sizeof(struct uart_phyp_softc), +}; + +DRIVER_MODULE(uart_phyp, vdevice, uart_phyp_driver, uart_devclass, 0, 0); + +static cn_probe_t uart_phyp_cnprobe; +static cn_init_t uart_phyp_cninit; +static cn_term_t uart_phyp_cnterm; +static cn_getc_t uart_phyp_cngetc; +static cn_putc_t uart_phyp_cnputc; +static cn_grab_t uart_phyp_cngrab; +static cn_ungrab_t uart_phyp_cnungrab; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 17:56:54 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2A3D5E95; Tue, 17 Sep 2013 17:56:54 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 17B8B270A; Tue, 17 Sep 2013 17:56:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8HHurVe091521; Tue, 17 Sep 2013 17:56:53 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8HHurVA091520; Tue, 17 Sep 2013 17:56:53 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201309171756.r8HHurVA091520@svn.freebsd.org> From: Peter Grehan Date: Tue, 17 Sep 2013 17:56:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255645 - head/sys/amd64/vmm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 17:56:54 -0000 Author: grehan Date: Tue Sep 17 17:56:53 2013 New Revision: 255645 URL: http://svnweb.freebsd.org/changeset/base/255645 Log: Hide TSC-deadline APIC timer support from guests. This mode isn't yet implemented in bhyve's APIC emulation. Reviewed by: neel Approved by: re@ (blanket) Modified: head/sys/amd64/vmm/x86.c Modified: head/sys/amd64/vmm/x86.c ============================================================================== --- head/sys/amd64/vmm/x86.c Tue Sep 17 17:39:40 2013 (r255644) +++ head/sys/amd64/vmm/x86.c Tue Sep 17 17:56:53 2013 (r255645) @@ -163,7 +163,12 @@ x86_emulate_cpuid(struct vm *vm, int vcp * Hide the performance and debug features. */ regs[2] &= ~CPUID2_PDCM; - + + /* + * No TSC deadline support in the APIC yet + */ + regs[2] &= ~CPUID2_TSCDLT; + /* * Hide thermal monitoring */ From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 18:41:32 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AD53EBA7; Tue, 17 Sep 2013 18:41:32 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9B22329A5; Tue, 17 Sep 2013 18:41:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8HIfWKt016181; Tue, 17 Sep 2013 18:41:32 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8HIfWPA016180; Tue, 17 Sep 2013 18:41:32 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201309171841.r8HIfWPA016180@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Tue, 17 Sep 2013 18:41:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255646 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 18:41:32 -0000 Author: dumbbell Date: Tue Sep 17 18:41:32 2013 New Revision: 255646 URL: http://svnweb.freebsd.org/changeset/base/255646 Log: psm: Update "struct synapticshw" in psm(4) man page This structure was updated in r255153 and r255154. PR: kern/170834 Approved by: re (hrs) Modified: head/share/man/man4/psm.4 Modified: head/share/man/man4/psm.4 ============================================================================== --- head/share/man/man4/psm.4 Tue Sep 17 17:56:53 2013 (r255645) +++ head/share/man/man4/psm.4 Tue Sep 17 18:41:32 2013 (r255646) @@ -460,7 +460,7 @@ typedef struct synapticshw { int infoHardware; /* hardware model */ int infoNewAbs; /* supports the newabs format */ int capPen; /* can detect a pen */ - int infoSimpleC; /* supports simple commands */ + int infoSimplC; /* supports simple commands */ int infoGeometry; /* touchpad dimensions */ int capExtended; /* supports extended packets */ int capSleep; /* can be suspended/resumed */ @@ -468,6 +468,9 @@ typedef struct synapticshw { int capMultiFinger; /* can detect multiple fingers */ int capPalmDetect; /* can detect a palm */ int capPassthrough; /* can passthrough guest packets */ + int capMiddle; /* has a physical middle button */ + int nExtendedButtons; /* has N additionnal buttons */ + int nExtendedQueries; /* supports N extended queries */ } synapticshw_t; .Ed .Pp From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 18:42:13 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E944BCE4; Tue, 17 Sep 2013 18:42:13 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D6BDE29AD; Tue, 17 Sep 2013 18:42:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8HIgDi7016455; Tue, 17 Sep 2013 18:42:13 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8HIgDIk016454; Tue, 17 Sep 2013 18:42:13 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201309171842.r8HIgDIk016454@svn.freebsd.org> From: Peter Grehan Date: Tue, 17 Sep 2013 18:42:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255647 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 18:42:14 -0000 Author: grehan Date: Tue Sep 17 18:42:13 2013 New Revision: 255647 URL: http://svnweb.freebsd.org/changeset/base/255647 Log: Pass the number of supported vectors to pci_emul_add_msicap() and not the actual PCI BAR number. Reviewed by: neel Approved by: re@ (blanket) Modified: head/usr.sbin/bhyve/virtio.c Modified: head/usr.sbin/bhyve/virtio.c ============================================================================== --- head/usr.sbin/bhyve/virtio.c Tue Sep 17 18:41:32 2013 (r255646) +++ head/usr.sbin/bhyve/virtio.c Tue Sep 17 18:42:13 2013 (r255647) @@ -139,7 +139,8 @@ vi_intr_init(struct virtio_softc *vs, in return (1); } else { vs->vs_flags &= ~VIRTIO_USE_MSIX; - pci_emul_add_msicap(vs->vs_pi, barnum); + /* Only 1 MSI vector for bhyve */ + pci_emul_add_msicap(vs->vs_pi, 1); } return (0); } From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 18:46:10 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B4E13E5F; Tue, 17 Sep 2013 18:46:10 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A260629DA; Tue, 17 Sep 2013 18:46:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8HIkAkr018016; Tue, 17 Sep 2013 18:46:10 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8HIkA3a018015; Tue, 17 Sep 2013 18:46:10 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201309171846.r8HIkA3a018015@svn.freebsd.org> From: Xin LI Date: Tue, 17 Sep 2013 18:46:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255648 - head/sys/dev/nfe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 18:46:10 -0000 Author: delphij Date: Tue Sep 17 18:46:10 2013 New Revision: 255648 URL: http://svnweb.freebsd.org/changeset/base/255648 Log: Fix a typo when accounting for tx_broadcast statistics. Submitted by: Paul A. Patience MFC after: 2 weeks Approved by: re (hrs) Modified: head/sys/dev/nfe/if_nfe.c Modified: head/sys/dev/nfe/if_nfe.c ============================================================================== --- head/sys/dev/nfe/if_nfe.c Tue Sep 17 18:42:13 2013 (r255647) +++ head/sys/dev/nfe/if_nfe.c Tue Sep 17 18:46:10 2013 (r255648) @@ -3260,7 +3260,7 @@ nfe_stats_update(struct nfe_softc *sc) if ((sc->nfe_flags & NFE_MIB_V3) != 0) { stats->tx_unicast += NFE_READ(sc, NFE_TX_UNICAST); stats->tx_multicast += NFE_READ(sc, NFE_TX_MULTICAST); - stats->rx_broadcast += NFE_READ(sc, NFE_TX_BROADCAST); + stats->tx_broadcast += NFE_READ(sc, NFE_TX_BROADCAST); } } From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 18:47:31 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AD6BCFA4; Tue, 17 Sep 2013 18:47:31 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 99B2729E8; Tue, 17 Sep 2013 18:47:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8HIlVc5018716; Tue, 17 Sep 2013 18:47:31 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8HIlV5r018714; Tue, 17 Sep 2013 18:47:31 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201309171847.r8HIlV5r018714@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 17 Sep 2013 18:47:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255649 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 18:47:31 -0000 Author: ae Date: Tue Sep 17 18:47:31 2013 New Revision: 255649 URL: http://svnweb.freebsd.org/changeset/base/255649 Log: MFC r255235: Remove unused code and sort variables declarations. PR: kern/181822 Modified: stable/9/sys/netinet/ip_mroute.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/ip_mroute.c ============================================================================== --- stable/9/sys/netinet/ip_mroute.c Tue Sep 17 18:46:10 2013 (r255648) +++ stable/9/sys/netinet/ip_mroute.c Tue Sep 17 18:47:31 2013 (r255649) @@ -703,10 +703,9 @@ ip_mrouter_init(struct socket *so, int v static int X_ip_mrouter_done(void) { - vifi_t vifi; - int i; struct ifnet *ifp; - struct ifreq ifr; + int i; + vifi_t vifi; MROUTER_LOCK(); @@ -731,11 +730,6 @@ X_ip_mrouter_done(void) for (vifi = 0; vifi < V_numvifs; vifi++) { if (!in_nullhost(V_viftable[vifi].v_lcl_addr) && !(V_viftable[vifi].v_flags & (VIFF_TUNNEL | VIFF_REGISTER))) { - struct sockaddr_in *so = (struct sockaddr_in *)&(ifr.ifr_addr); - - so->sin_len = sizeof(struct sockaddr_in); - so->sin_family = AF_INET; - so->sin_addr.s_addr = INADDR_ANY; ifp = V_viftable[vifi].v_ifp; if_allmulti(ifp, 0); } From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 18:51:36 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8130328B; Tue, 17 Sep 2013 18:51:36 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6DFA52A65; Tue, 17 Sep 2013 18:51:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8HIpaS7021894; Tue, 17 Sep 2013 18:51:36 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8HIpaxH021893; Tue, 17 Sep 2013 18:51:36 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201309171851.r8HIpaxH021893@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 17 Sep 2013 18:51:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r255650 - stable/8/sys/netinet X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 18:51:36 -0000 Author: ae Date: Tue Sep 17 18:51:35 2013 New Revision: 255650 URL: http://svnweb.freebsd.org/changeset/base/255650 Log: MFC r255235: Remove unused code and sort variables declarations. PR: kern/181822 Modified: stable/8/sys/netinet/ip_mroute.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/netinet/ip_mroute.c ============================================================================== --- stable/8/sys/netinet/ip_mroute.c Tue Sep 17 18:47:31 2013 (r255649) +++ stable/8/sys/netinet/ip_mroute.c Tue Sep 17 18:51:35 2013 (r255650) @@ -705,10 +705,9 @@ ip_mrouter_init(struct socket *so, int v static int X_ip_mrouter_done(void) { - vifi_t vifi; - int i; struct ifnet *ifp; - struct ifreq ifr; + int i; + vifi_t vifi; MROUTER_LOCK(); @@ -733,11 +732,6 @@ X_ip_mrouter_done(void) for (vifi = 0; vifi < V_numvifs; vifi++) { if (!in_nullhost(V_viftable[vifi].v_lcl_addr) && !(V_viftable[vifi].v_flags & (VIFF_TUNNEL | VIFF_REGISTER))) { - struct sockaddr_in *so = (struct sockaddr_in *)&(ifr.ifr_addr); - - so->sin_len = sizeof(struct sockaddr_in); - so->sin_family = AF_INET; - so->sin_addr.s_addr = INADDR_ANY; ifp = V_viftable[vifi].v_ifp; if_allmulti(ifp, 0); } From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 18:56:04 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EF6B7521; Tue, 17 Sep 2013 18:56:04 +0000 (UTC) (envelope-from edschouten@gmail.com) Received: from mail-vc0-x235.google.com (mail-vc0-x235.google.com [IPv6:2607:f8b0:400c:c03::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 76E8B2AA6; Tue, 17 Sep 2013 18:56:04 +0000 (UTC) Received: by mail-vc0-f181.google.com with SMTP id hz10so4329446vcb.40 for ; Tue, 17 Sep 2013 11:56:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=9W137cjJGfLH3bzCvA21apnatHb7+Gt/jLtISjEVT4k=; b=j4Hlhl281HO7Wmw1V7l0dCS1sqREWzrGm9jwXBBfBjTPgWV2mVMFwaHOPQ5PDNtziT FeuDsYGUua/SrcSWqrjWMO8cfmRb4tXLHyRWYzCkmNm1nDbcMdZxdRLXIVM/lasMW/nB rU7ScddRaKNajgio3OQsGm7/ZjM0kHLt6S12goq2jSHYe295YlKvz1nQObJCBmqEVeGf V+sTiZD4uwz4OXPfDwhSgZfaFQZNyOiUFue8s8FpvEGuXeOPxZq23ZH63Tj0AZcjJaji Z4V3Bi9I/oF+8KGAD59/nGwAB6mmo7JePoHmNu0PzFZH+rNvJMrLECRmlS/wNK09KEYq /UlA== MIME-Version: 1.0 X-Received: by 10.58.211.227 with SMTP id nf3mr12320795vec.20.1379444163677; Tue, 17 Sep 2013 11:56:03 -0700 (PDT) Sender: edschouten@gmail.com Received: by 10.220.115.206 with HTTP; Tue, 17 Sep 2013 11:56:03 -0700 (PDT) In-Reply-To: References: <201309161046.r8GAkxEM084656@svn.freebsd.org> Date: Tue, 17 Sep 2013 20:56:03 +0200 X-Google-Sender-Auth: arZjfsbnhZWYiSAAMhasfy17UlA Message-ID: Subject: Re: svn commit: r255613 - head/sys/arm/arm From: Ed Schouten To: Zbigniew Bodek Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 18:56:05 -0000 2013/9/17 Zbigniew Bodek : > Can you test this one: > http://people.freebsd.org/~zbb/arm/other/stdatomic_fix_vol2.diff Works. Thanks! -- Ed Schouten From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 19:26:16 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 76D2A1AD; Tue, 17 Sep 2013 19:26:16 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C27C22CDA; Tue, 17 Sep 2013 19:26:15 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id BBDF825D3815; Tue, 17 Sep 2013 19:26:07 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id A6013BF8D05; Tue, 17 Sep 2013 19:26:06 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id gjL_Bo47hBsY; Tue, 17 Sep 2013 19:26:04 +0000 (UTC) Received: from nv.sbone.de (nv.sbone.de [IPv6:fde9:577b:c1a9:31::2013:138]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 57FDBBF8D02; Tue, 17 Sep 2013 19:26:03 +0000 (UTC) Date: Tue, 17 Sep 2013 19:26:02 +0000 (UTC) From: "Bjoern A. Zeeb" To: John-Mark Gurney Subject: Re: svn commit: r255187 - in head/sys: conf crypto/aesni modules/aesni In-Reply-To: <201309031831.r83IVNkh026523@svn.freebsd.org> Message-ID: References: <201309031831.r83IVNkh026523@svn.freebsd.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 19:26:16 -0000 On Tue, 3 Sep 2013, John-Mark Gurney wrote: > Author: jmg > Date: Tue Sep 3 18:31:23 2013 > New Revision: 255187 > URL: http://svnweb.freebsd.org/changeset/base/255187 > > Log: > Use the fact that the AES-NI instructions can be pipelined to improve > performance... Use SSE2 instructions for calculating the XTS tweek > factor... Let the compiler do more work and handle register allocation > by using intrinsics, now only the key schedule is in assembly... > > Replace .byte hard coded instructions w/ the proper instructions now > that both clang and gcc support them... > > On my machine, pulling the code to userland I saw performance go from > ~150MB/sec to 2GB/sec in XTS mode. GELI on GNOP saw a more modest > increase of about 3x due to other system overhead (geom and > opencrypto)... > > These changes allow almost full disk io rate w/ geli... > > Reviewed by: -current, -security > Thanks to: Mike Hamburg for the XTS tweek algorithm > > Added: > head/sys/crypto/aesni/aesencdec.h (contents, props changed) > Deleted: > head/sys/crypto/aesni/aesencdec_amd64.S > head/sys/crypto/aesni/aesencdec_i386.S > Modified: > head/sys/conf/files.amd64 > head/sys/conf/files.i386 > head/sys/crypto/aesni/aeskeys_amd64.S > head/sys/crypto/aesni/aesni.c > head/sys/crypto/aesni/aesni.h > head/sys/crypto/aesni/aesni_wrap.c > head/sys/modules/aesni/Makefile > ... > Added: head/sys/crypto/aesni/aesencdec.h > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/crypto/aesni/aesencdec.h Tue Sep 3 18:31:23 2013 (r255187) > @@ -0,0 +1,136 @@ > +/*- > + * Copyright 2013 John-Mark Gurney > + * 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$ > + * > + */ > + > +#include > + This pulls in a header from user space, in fact from clang, and if cross-building without building clang this header file is not available and a buildkernel is failing. (paths shortend) In file included from /sys/modules/aesni/../../crypto/aesni/aesni_wrap.c:40: /sys/modules/aesni/../../crypto/aesni/aesencdec.h:30:10: fatal error: 'wmmintrin.h' file not found #include ^ 1 error generated. --- aesni_wrap.o --- -- Bjoern A. Zeeb ????????? ??? ??????? ??????: '??? ??? ???? ?????? ??????? ?? ?? ??????? ??????? ??? ????? ????? ???? ?????? ?? ????? ????', ????????? ?????????, "??? ????? ?? ?????", ?.??? From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 20:09:26 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C8D9AA6B; Tue, 17 Sep 2013 20:09:26 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9C3592F64; Tue, 17 Sep 2013 20:09:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8HK9QFj061193; Tue, 17 Sep 2013 20:09:26 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8HK9QvW061191; Tue, 17 Sep 2013 20:09:26 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201309172009.r8HK9QvW061191@svn.freebsd.org> From: Jilles Tjoelker Date: Tue, 17 Sep 2013 20:09:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255651 - in head/share/i18n: csmapper esdb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 20:09:26 -0000 Author: jilles Date: Tue Sep 17 20:09:25 2013 New Revision: 255651 URL: http://svnweb.freebsd.org/changeset/base/255651 Log: share/i18n: Fix installworld with read-only obj. Since iconv was enabled (r254273, August 13), it has been impossible to installworld using a read-only obj tree. This is common with NFS. Parts of share/i18n unconditionally rebuild files like mapper.dir during installation. This patch ensures the files like mapper.dir are not rewritten with the same contents. Tested by: joel Approved by: re (hrs) Modified: head/share/i18n/csmapper/Makefile head/share/i18n/esdb/Makefile Modified: head/share/i18n/csmapper/Makefile ============================================================================== --- head/share/i18n/csmapper/Makefile Tue Sep 17 18:51:35 2013 (r255650) +++ head/share/i18n/csmapper/Makefile Tue Sep 17 20:09:25 2013 (r255651) @@ -7,10 +7,11 @@ SUBDIR= APPLE AST BIG5 CNS CP EBCDIC GB KAZAKH KOI KS MISC TCVN mapper.dir: ${SUBDIR} - > ${.TARGET} -.for i in ${SUBDIR} - cat ${i}/mapper.dir.${i} >> ${.TARGET} -.endfor + newfile=$$(for i in ${SUBDIR}; do \ + cat $$i/mapper.dir.$$i; \ + done); \ + [ "$$newfile" = "$$(cat ${.TARGET} 2>/dev/null)" ] || \ + printf '%s\n' "$$newfile" >${.TARGET} mapper.dir.db: mapper.dir ${MKCSMAPPER} -m -o ${.TARGET} ${.ALLSRC} @@ -18,10 +19,11 @@ FILES+= mapper.dir mapper.dir.db CLEANFILES+= mapper.dir mapper.dir.db charset.pivot: ${SUBDIR} - > ${.TARGET} -.for i in ${SUBDIR} - cat ${i}/charset.pivot.${i} >> ${.TARGET} -.endfor + newfile=$$(for i in ${SUBDIR}; do \ + cat $$i/charset.pivot.$$i; \ + done); \ + [ "$$newfile" = "$$(cat ${.TARGET} 2>/dev/null)" ] || \ + printf '%s\n' "$$newfile" >${.TARGET} charset.pivot.pvdb: charset.pivot ${MKCSMAPPER} -p -o ${.TARGET} ${.ALLSRC} Modified: head/share/i18n/esdb/Makefile ============================================================================== --- head/share/i18n/esdb/Makefile Tue Sep 17 18:51:35 2013 (r255650) +++ head/share/i18n/esdb/Makefile Tue Sep 17 20:09:25 2013 (r255651) @@ -10,18 +10,20 @@ FILES+= esdb.dir esdb.dir.db esdb.alias CLEANFILES= ${FILES} esdb.dir: ${SUBDIR} - > $@ -.for i in ${SUBDIR} - cat ${i}/esdb.dir.${i} >>${.TARGET} -.endfor + newfile=$$(for i in ${SUBDIR}; do \ + cat $$i/esdb.dir.$$i; \ + done); \ + [ "$$newfile" = "$$(cat ${.TARGET} 2>/dev/null)" ] || \ + printf '%s\n' "$$newfile" >${.TARGET} esdb.dir.db: esdb.dir ${MKESDB} -m -o ${.TARGET} ${.ALLSRC} esdb.alias: ${SUBDIR} - > $@ -.for i in ${SUBDIR} - cat ${i}/esdb.alias.${i} >>${.TARGET} -.endfor + newfile=$$(for i in ${SUBDIR}; do \ + cat $$i/esdb.alias.$$i; \ + done); \ + [ "$$newfile" = "$$(cat ${.TARGET} 2>/dev/null)" ] || \ + printf '%s\n' "$$newfile" >${.TARGET} esdb.alias.db: esdb.alias ${MKESDB} -m -o ${.TARGET} ${.ALLSRC} From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 20:20:05 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0EA65E39; Tue, 17 Sep 2013 20:20:05 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F086D2059; Tue, 17 Sep 2013 20:20:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8HKK4Hq068140; Tue, 17 Sep 2013 20:20:04 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8HKK4K8068139; Tue, 17 Sep 2013 20:20:04 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201309172020.r8HKK4K8068139@svn.freebsd.org> From: Hiroki Sato Date: Tue, 17 Sep 2013 20:20:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255652 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 20:20:05 -0000 Author: hrs Date: Tue Sep 17 20:20:04 2013 New Revision: 255652 URL: http://svnweb.freebsd.org/changeset/base/255652 Log: Remove description "ifconfig_IF_aliasN is deprecated". While this sentence was added in 2005, many users still need it. Approved by: re (gjb) PR: docs/162354 Modified: head/share/man/man5/rc.conf.5 Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Tue Sep 17 20:09:25 2013 (r255651) +++ head/share/man/man5/rc.conf.5 Tue Sep 17 20:20:04 2013 (r255652) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 22, 2013 +.Dd September 10, 2013 .Dt RC.CONF 5 .Os .Sh NAME @@ -1192,10 +1192,8 @@ be added since the search would stop with the missing .Dq Li alias3 entry. -Due to this difficult to manage behavior, the -.Va ifconfig_ Ns Ao Ar interface Ac Ns Va _alias Ns Aq Ar n -form is deprecated. -There is +Because of this difficult to manage behavior, +there is .Va ifconfig_ Ns Ao Ar interface Ac Ns Va _aliases variable, which has the same functionality as .Va ifconfig_ Ns Ao Ar interface Ac Ns Va _alias Ns Aq Ar n From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 20:22:25 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 735BE93; Tue, 17 Sep 2013 20:22:25 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6102120C1; Tue, 17 Sep 2013 20:22:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8HKMPK1069384; Tue, 17 Sep 2013 20:22:25 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8HKMPd0069382; Tue, 17 Sep 2013 20:22:25 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201309172022.r8HKMPd0069382@svn.freebsd.org> From: Hiroki Sato Date: Tue, 17 Sep 2013 20:22:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255653 - head/etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 20:22:25 -0000 Author: hrs Date: Tue Sep 17 20:22:24 2013 New Revision: 255653 URL: http://svnweb.freebsd.org/changeset/base/255653 Log: Fix parsing lines of ifconfig output which include \t in the case of inet and inet6. Approved by: re (delphij) Modified: head/etc/network.subr Modified: head/etc/network.subr ============================================================================== --- head/etc/network.subr Tue Sep 17 20:20:04 2013 (r255652) +++ head/etc/network.subr Tue Sep 17 20:22:24 2013 (r255653) @@ -654,18 +654,16 @@ ipv4_down() ifalias ${_if} inet -alias && _ret=0 - inetList="`${IFCONFIG_CMD} ${_if} | grep 'inet ' | tr "\n" "$_ifs"`" + inetList="`${IFCONFIG_CMD} ${_if} | grep 'inet ' | tr "\n\t" "$_ifs"`" oldifs="$IFS" IFS="$_ifs" for _inet in $inetList ; do # get rid of extraneous line case $_inet in - "") break ;; - \ inet\ *|inet\ *) ;; - *) continue ;; + inet\ *) ;; + *) continue ;; esac - [ -z "$_inet" ] && break _inet=`expr "$_inet" : '.*\(inet \([0-9]\{1,3\}\.\)\{3\}[0-9]\{1,3\}\).*'` @@ -696,13 +694,16 @@ ipv6_down() ipv6_prefix_hostid_addr_common ${_if} -alias && _ret=0 ifalias ${_if} inet6 -alias && _ret=0 - inetList="`${IFCONFIG_CMD} ${_if} | grep 'inet6 ' | tr "\n" "$_ifs"`" + inetList="`${IFCONFIG_CMD} ${_if} | grep 'inet6 ' | tr "\n\t" "$_ifs"`" oldifs="$IFS" IFS="$_ifs" for _inet6 in $inetList ; do # get rid of extraneous line - [ -z "$_inet6" ] && break + case $_inet in + inet6\ *) ;; + *) continue ;; + esac _inet6=`expr "$_inet6" : '.*\(inet6 \([0-9a-f:]*\)\).*'` From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 20:24:03 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CC7E6200; Tue, 17 Sep 2013 20:24:03 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BA7F120D2; Tue, 17 Sep 2013 20:24:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8HKO3Et070169; Tue, 17 Sep 2013 20:24:03 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8HKO3qU070168; Tue, 17 Sep 2013 20:24:03 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201309172024.r8HKO3qU070168@svn.freebsd.org> From: Hiroki Sato Date: Tue, 17 Sep 2013 20:24:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255654 - head/etc/rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 20:24:03 -0000 Author: hrs Date: Tue Sep 17 20:24:03 2013 New Revision: 255654 URL: http://svnweb.freebsd.org/changeset/base/255654 Log: - Fix pidfile handling in sendmail_msp_queue. The pidfile was ignored and multiple instances were invoked by start/stop cycles. - Remove redundant start_cmd rewrite. Approved by: re (gjb) Tested by: jmg Modified: head/etc/rc.d/sendmail Modified: head/etc/rc.d/sendmail ============================================================================== --- head/etc/rc.d/sendmail Tue Sep 17 20:22:24 2013 (r255653) +++ head/etc/rc.d/sendmail Tue Sep 17 20:24:03 2013 (r255654) @@ -80,20 +80,17 @@ required_files= if checkyesno sendmail_submit_enable; then name="sendmail_submit" rcvar="sendmail_submit_enable" - start_cmd="${command} ${sendmail_submit_flags}" run_rc_command "$1" fi if checkyesno sendmail_outbound_enable; then name="sendmail_outbound" rcvar="sendmail_outbound_enable" - start_cmd="${command} ${sendmail_outbound_flags}" run_rc_command "$1" fi -name="sendmail_clientmqueue" +name="sendmail_msp_queue" rcvar="sendmail_msp_queue_enable" -start_cmd="${command} ${sendmail_msp_queue_flags}" -pidfile="${sendmail_mspq_pidfile:-/var/spool/clientmqueue/sm-client.pid}" +pidfile="${sendmail_msp_queue_pidfile:-/var/spool/clientmqueue/sm-client.pid}" required_files="/etc/mail/submit.cf" run_rc_command "$1" From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 20:25:30 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 62019347; Tue, 17 Sep 2013 20:25:30 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4EC1220E1; Tue, 17 Sep 2013 20:25:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8HKPUkk070896; Tue, 17 Sep 2013 20:25:30 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8HKPUZq070895; Tue, 17 Sep 2013 20:25:30 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201309172025.r8HKPUZq070895@svn.freebsd.org> From: Hiroki Sato Date: Tue, 17 Sep 2013 20:25:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255655 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 20:25:30 -0000 Author: hrs Date: Tue Sep 17 20:25:29 2013 New Revision: 255655 URL: http://svnweb.freebsd.org/changeset/base/255655 Log: Add EXAMPLES section to explain the format of fstab(5). Approved by: re (marius) Reviewed by: wblock Modified: head/share/man/man5/fstab.5 Modified: head/share/man/man5/fstab.5 ============================================================================== --- head/share/man/man5/fstab.5 Tue Sep 17 20:24:03 2013 (r255654) +++ head/share/man/man5/fstab.5 Tue Sep 17 20:25:29 2013 (r255655) @@ -32,7 +32,7 @@ .\" @(#)fstab.5 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd July 15, 2013 +.Dd September 10, 2013 .Dt FSTAB 5 .Os .Sh NAME @@ -378,6 +378,41 @@ The file resides in .Pa /etc . .El +.Sh EXAMPLES +.Bd -literal +# Device Mountpoint FStype Options Dump Pass# +# +# UFS file system. +/dev/da0p2 / ufs rw 1 1 +# +# Swap space on a block device. +/dev/da0p1 none swap sw 0 0 +# +# Swap space using a block device with GBDE/GELI encyption. +# aalgo, ealgo, keylen, sectorsize options are available +# for .eli devices. +/dev/da1p1.bde none swap sw 0 0 +/dev/da1p2.eli none swap sw 0 0 +# +# tmpfs. +tmpfs /tmp tmpfs rw,size=1g,mode=1777 0 0 +# +# UFS file system on a swap-backed md(4). /dev/md10 is +# automatically created. If it is "md", a unit number +# will be automatically selected. +md10 /scratch mfs rw,-s1g 0 0 +# +# Swap space on a vnode-backed md(4). +md11 none swap sw,file=/swapfile 0 0 +# +# CDROM. "noauto" option is typically used because the +# media is removable. +/dev/cd0 /cdrom cd9660 ro,noauto 0 0 +# +# NFS-exported file system. "serv" is an NFS server name +# or IP address. +serv:/export /nfs nfs rw,noinet6 0 0 +.Ed .Sh SEE ALSO .Xr getfsent 3 , .Xr getvfsbyname 3 , From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 20:33:15 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1DC7E6A4; Tue, 17 Sep 2013 20:33:15 +0000 (UTC) (envelope-from jmg@h2.funkthat.com) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D59642166; Tue, 17 Sep 2013 20:33:14 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id r8HKX7XP099334 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 17 Sep 2013 13:33:07 -0700 (PDT) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id r8HKX7Af099333; Tue, 17 Sep 2013 13:33:07 -0700 (PDT) (envelope-from jmg) Date: Tue, 17 Sep 2013 13:33:07 -0700 From: John-Mark Gurney To: "Bjoern A. Zeeb" Subject: Re: svn commit: r255187 - in head/sys: conf crypto/aesni modules/aesni Message-ID: <20130917203307.GP68682@funkthat.com> References: <201309031831.r83IVNkh026523@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Tue, 17 Sep 2013 13:33:08 -0700 (PDT) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 20:33:15 -0000 Bjoern A. Zeeb wrote this message on Tue, Sep 17, 2013 at 19:26 +0000: > On Tue, 3 Sep 2013, John-Mark Gurney wrote: > > >Author: jmg > >Date: Tue Sep 3 18:31:23 2013 > >New Revision: 255187 > >URL: http://svnweb.freebsd.org/changeset/base/255187 > > > >Log: > > Use the fact that the AES-NI instructions can be pipelined to improve > > performance... Use SSE2 instructions for calculating the XTS tweek > > factor... Let the compiler do more work and handle register allocation > > by using intrinsics, now only the key schedule is in assembly... > > > > Replace .byte hard coded instructions w/ the proper instructions now > > that both clang and gcc support them... > > > > On my machine, pulling the code to userland I saw performance go from > > ~150MB/sec to 2GB/sec in XTS mode. GELI on GNOP saw a more modest > > increase of about 3x due to other system overhead (geom and > > opencrypto)... > > > > These changes allow almost full disk io rate w/ geli... > > > > Reviewed by: -current, -security > > Thanks to: Mike Hamburg for the XTS tweek algorithm > > > >Added: > > head/sys/crypto/aesni/aesencdec.h (contents, props changed) > >Deleted: > > head/sys/crypto/aesni/aesencdec_amd64.S > > head/sys/crypto/aesni/aesencdec_i386.S > >Modified: > > head/sys/conf/files.amd64 > > head/sys/conf/files.i386 > > head/sys/crypto/aesni/aeskeys_amd64.S > > head/sys/crypto/aesni/aesni.c > > head/sys/crypto/aesni/aesni.h > > head/sys/crypto/aesni/aesni_wrap.c > > head/sys/modules/aesni/Makefile > > > ... > >Added: head/sys/crypto/aesni/aesencdec.h > >============================================================================== > >--- /dev/null 00:00:00 1970 (empty, because file is newly added) > >+++ head/sys/crypto/aesni/aesencdec.h Tue Sep 3 18:31:23 2013 (r255187) > >@@ -0,0 +1,136 @@ > >+/*- > >+ * Copyright 2013 John-Mark Gurney > >+ * 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$ > >+ * > >+ */ > >+ > >+#include > >+ > > > This pulls in a header from user space, in fact from clang, and if > cross-building without building clang this header file is not > available and a buildkernel is failing. > > (paths shortend) > In file included from /sys/modules/aesni/../../crypto/aesni/aesni_wrap.c:40: > /sys/modules/aesni/../../crypto/aesni/aesencdec.h:30:10: fatal error: > 'wmmintrin.h' file not found > #include ^ > 1 error generated. > --- aesni_wrap.o --- More details please... cross building on what to what? I will admit I haven't tried to build from arm or other non-x86 platform to an x86.. but I am pretty sure I tested cross building i386 on an amd64 machine... Are you building w/ gcc? it isn't clear from your message... If you are, is your toolchain more recent than the 3rd? Also, all I did was turn off -nostdinc, I didn't add any other paths, which sounds like that the cross build environment isn't built properly if it can't access userland headers... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 20:33:43 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6760C83D; Tue, 17 Sep 2013 20:33:43 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 54DAE2192; Tue, 17 Sep 2013 20:33:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8HKXh3t074965; Tue, 17 Sep 2013 20:33:43 GMT (envelope-from hiren@svn.freebsd.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8HKXhuu074964; Tue, 17 Sep 2013 20:33:43 GMT (envelope-from hiren@svn.freebsd.org) Message-Id: <201309172033.r8HKXhuu074964@svn.freebsd.org> From: Hiren Panchasara Date: Tue, 17 Sep 2013 20:33:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255656 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 20:33:43 -0000 Author: hiren Date: Tue Sep 17 20:33:42 2013 New Revision: 255656 URL: http://svnweb.freebsd.org/changeset/base/255656 Log: We have grown a bit too big lately. Shrinking the kernel for TP-Link TL-WR1043ND. Submitted by: loos (initial version) Reviewed by: adrian Approved by: sbruno (mentor, implicit) Approved by: re (delphij) Tested by: hiren Modified: head/sys/mips/conf/TP-WN1043ND Modified: head/sys/mips/conf/TP-WN1043ND ============================================================================== --- head/sys/mips/conf/TP-WN1043ND Tue Sep 17 20:25:29 2013 (r255655) +++ head/sys/mips/conf/TP-WN1043ND Tue Sep 17 20:33:42 2013 (r255656) @@ -34,12 +34,26 @@ options MSDOSFS # redboot stuff. options AR71XX_ENV_UBOOT -# uzip - to boot natively from flash -device geom_uzip -options GEOM_UZIP +# uncompress - to boot natively from flash +device geom_uncompress +options GEOM_UNCOMPRESS # Used for the static uboot partition map device geom_map # Boot off of the rootfs, as defined in the geom_map setup. -options ROOTDEVNAME=\"ufs:map/rootfs.uzip\" +options ROOTDEVNAME=\"ufs:map/rootfs.uncompress\" + +# We bite the performance overhead for now; the kernel won't +# fit if the mutexes are inlined. +options MUTEX_NOINLINE +options RWLOCK_NOINLINE +options SX_NOINLINE + +# Remove everything we don't need. We need a _really_ small kernel! +nooptions INVARIANTS +nooptions INVARIANT_SUPPORT +nooptions WITNESS +nooptions WITNESS_SKIPSPIN +nooptions DEBUG_REDZONE +nooptions DEBUG_MEMGUARD From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 20:45:06 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D80F2B3C; Tue, 17 Sep 2013 20:45:06 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5C1CA2228; Tue, 17 Sep 2013 20:45:06 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id CF5D825D3A6D; Tue, 17 Sep 2013 20:45:03 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id F3B10BF8D05; Tue, 17 Sep 2013 20:45:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id RPpDqnH9TNEp; Tue, 17 Sep 2013 20:45:01 +0000 (UTC) Received: from nv.sbone.de (nv.sbone.de [IPv6:fde9:577b:c1a9:31::2013:138]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 39484BF8B4B; Tue, 17 Sep 2013 20:45:00 +0000 (UTC) Date: Tue, 17 Sep 2013 20:45:00 +0000 (UTC) From: "Bjoern A. Zeeb" To: John-Mark Gurney Subject: Re: svn commit: r255187 - in head/sys: conf crypto/aesni modules/aesni In-Reply-To: <20130917203307.GP68682@funkthat.com> Message-ID: References: <201309031831.r83IVNkh026523@svn.freebsd.org> <20130917203307.GP68682@funkthat.com> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 20:45:07 -0000 On Tue, 17 Sep 2013, John-Mark Gurney wrote: > Bjoern A. Zeeb wrote this message on Tue, Sep 17, 2013 at 19:26 +0000: >> On Tue, 3 Sep 2013, John-Mark Gurney wrote: >>> + * >>> + */ >>> + >>> +#include >>> + >> >> >> This pulls in a header from user space, in fact from clang, and if >> cross-building without building clang this header file is not >> available and a buildkernel is failing. >> >> (paths shortend) >> In file included from /sys/modules/aesni/../../crypto/aesni/aesni_wrap.c:40: >> /sys/modules/aesni/../../crypto/aesni/aesencdec.h:30:10: fatal error: >> 'wmmintrin.h' file not found >> #include ^ >> 1 error generated. >> --- aesni_wrap.o --- > > More details please... cross building on what to what? I will admit > I haven't tried to build from arm or other non-x86 platform to an > x86.. but I am pretty sure I tested cross building i386 on an amd64 > machine... > > Are you building w/ gcc? it isn't clear from your message... If you > are, is your toolchain more recent than the 3rd? > > Also, all I did was turn off -nostdinc, I didn't add any other paths, > which sounds like that the cross build environment isn't built > properly if it can't access userland headers... It should not access the base system headers, it needs the ones in obj/ but these are not there when building WITHOUT_CLANG= as that header file in my head checkout only exists in the clang source (contrib/llvm/tools/clang/lib/Headers/wmmintrin.h). The SVN revision is about r255569 or the following commit from Saturday. And yes I am also building without buildtools using XCC= XCPP= XCXX= using clang from the installed base system, which means the pollution from that early stage doesn't happen either -- more pieces seem to rely on this:( And this is building i386 on i386 just reducing the compile time by 7 orders of magnitude not building clang twice but zero times as I don't need it for the output install and the one installed in base is exactly the same I'd build again for bootstrap so avoiding this. I assume on an entirely clang-free system building with just gcc and never seen clang the results would be the same as the header file will never be available anywhere. -- Bjoern A. Zeeb ????????? ??? ??????? ??????: '??? ??? ???? ?????? ??????? ?? ?? ??????? ??????? ??? ????? ????? ???? ?????? ?? ????? ????', ????????? ?????????, "??? ????? ?? ?????", ?.??? From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 20:48:20 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 96A00C8D; Tue, 17 Sep 2013 20:48:20 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 75CF2223A; Tue, 17 Sep 2013 20:48:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8HKmKEb081545; Tue, 17 Sep 2013 20:48:20 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8HKmKSe081542; Tue, 17 Sep 2013 20:48:20 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201309172048.r8HKmKSe081542@svn.freebsd.org> From: Jilles Tjoelker Date: Tue, 17 Sep 2013 20:48:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255657 - head/sys/compat/freebsd32 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 20:48:20 -0000 Author: jilles Date: Tue Sep 17 20:48:19 2013 New Revision: 255657 URL: http://svnweb.freebsd.org/changeset/base/255657 Log: Disallow cap_enter() in freebsd32 compatibility mode. The freebsd32 compatibility mode (for running 32-bit binaries on 64-bit kernels) does not currently allow any system calls in capability mode, but still permits cap_enter(). As a result, 32-bit binaries on 64-bit kernels that use capability mode do not work (they crash after being disallowed to call sys_exit()). Affected binaries include dhclient and uniq. The latter's crashes cause obscure build failures. This commit makes freebsd32 cap_enter() fail with [ENOSYS], as if capability mode was not compiled in. Applications deal with this by doing their work without capability mode. This commit does not fix the uncommon situation where a 64-bit process enters capability mode and then executes a 32-bit binary using fexecve(). This commit should be reverted when allowing the necessary freebsd32 system calls in capability mode. Reviewed by: pjd Approved by: re (hrs) Modified: head/sys/compat/freebsd32/freebsd32_capability.c head/sys/compat/freebsd32/syscalls.master Modified: head/sys/compat/freebsd32/freebsd32_capability.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_capability.c Tue Sep 17 20:33:42 2013 (r255656) +++ head/sys/compat/freebsd32/freebsd32_capability.c Tue Sep 17 20:48:19 2013 (r255657) @@ -49,6 +49,18 @@ __FBSDID("$FreeBSD$"); MALLOC_DECLARE(M_FILECAPS); int +freebsd32_cap_enter(struct thread *td, + struct freebsd32_cap_enter_args *uap) +{ + + /* + * We do not have an equivalent of capabilities.conf for freebsd32 + * compatibility, so do not allow capability mode for now. + */ + return (ENOSYS); +} + +int freebsd32_cap_ioctls_limit(struct thread *td, struct freebsd32_cap_ioctls_limit_args *uap) { @@ -136,6 +148,14 @@ out: #else /* !CAPABILITIES */ int +freebsd32_cap_enter(struct thread *td, + struct freebsd32_cap_enter_args *uap) +{ + + return (ENOSYS); +} + +int freebsd32_cap_ioctls_limit(struct thread *td, struct freebsd32_cap_ioctls_limit_args *uap) { Modified: head/sys/compat/freebsd32/syscalls.master ============================================================================== --- head/sys/compat/freebsd32/syscalls.master Tue Sep 17 20:33:42 2013 (r255656) +++ head/sys/compat/freebsd32/syscalls.master Tue Sep 17 20:48:19 2013 (r255657) @@ -973,7 +973,7 @@ 514 AUE_NULL OBSOL cap_new 515 AUE_CAP_RIGHTS_GET NOPROTO { int __cap_rights_get(int version, \ int fd, cap_rights_t *rightsp); } -516 AUE_CAP_ENTER NOPROTO { int cap_enter(void); } +516 AUE_CAP_ENTER STD { int freebsd32_cap_enter(void); } 517 AUE_CAP_GETMODE NOPROTO { int cap_getmode(u_int *modep); } 518 AUE_PDFORK NOPROTO { int pdfork(int *fdp, int flags); } 519 AUE_PDKILL NOPROTO { int pdkill(int fd, int signum); } From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 20:49:06 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A8E2CDD3; Tue, 17 Sep 2013 20:49:06 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 951682248; Tue, 17 Sep 2013 20:49:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8HKn66s081866; Tue, 17 Sep 2013 20:49:06 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8HKn5QQ081861; Tue, 17 Sep 2013 20:49:05 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201309172049.r8HKn5QQ081861@svn.freebsd.org> From: Jilles Tjoelker Date: Tue, 17 Sep 2013 20:49:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255658 - head/sys/compat/freebsd32 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 20:49:06 -0000 Author: jilles Date: Tue Sep 17 20:49:05 2013 New Revision: 255658 URL: http://svnweb.freebsd.org/changeset/base/255658 Log: Regenerate for freebsd32_cap_enter(). Approved by: re (hrs) Modified: head/sys/compat/freebsd32/freebsd32_proto.h head/sys/compat/freebsd32/freebsd32_syscall.h head/sys/compat/freebsd32/freebsd32_syscalls.c head/sys/compat/freebsd32/freebsd32_sysent.c head/sys/compat/freebsd32/freebsd32_systrace_args.c Modified: head/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_proto.h Tue Sep 17 20:48:19 2013 (r255657) +++ head/sys/compat/freebsd32/freebsd32_proto.h Tue Sep 17 20:49:05 2013 (r255658) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 255219 2013-09-05 00:09:56Z pjd + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 255657 2013-09-17 20:48:19Z jilles */ #ifndef _FREEBSD32_SYSPROTO_H_ @@ -15,6 +15,7 @@ #include #include #include +#include #include @@ -591,6 +592,9 @@ struct freebsd32_shmctl_args { char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; char buf_l_[PADL_(struct shmid_ds32 *)]; struct shmid_ds32 * buf; char buf_r_[PADR_(struct shmid_ds32 *)]; }; +struct freebsd32_cap_enter_args { + register_t dummy; +}; struct freebsd32_pselect_args { char nd_l_[PADL_(int)]; int nd; char nd_r_[PADR_(int)]; char in_l_[PADL_(fd_set *)]; fd_set * in; char in_r_[PADR_(fd_set *)]; @@ -779,6 +783,7 @@ int freebsd32_jail_set(struct thread *, int freebsd32_semctl(struct thread *, struct freebsd32_semctl_args *); int freebsd32_msgctl(struct thread *, struct freebsd32_msgctl_args *); int freebsd32_shmctl(struct thread *, struct freebsd32_shmctl_args *); +int freebsd32_cap_enter(struct thread *, struct freebsd32_cap_enter_args *); int freebsd32_pselect(struct thread *, struct freebsd32_pselect_args *); #ifdef PAD64_REQUIRED int freebsd32_posix_fallocate(struct thread *, struct freebsd32_posix_fallocate_args *); @@ -1182,6 +1187,7 @@ int freebsd7_freebsd32_shmctl(struct thr #define FREEBSD32_SYS_AUE_freebsd32_semctl AUE_SEMCTL #define FREEBSD32_SYS_AUE_freebsd32_msgctl AUE_MSGCTL #define FREEBSD32_SYS_AUE_freebsd32_shmctl AUE_SHMCTL +#define FREEBSD32_SYS_AUE_freebsd32_cap_enter AUE_CAP_ENTER #define FREEBSD32_SYS_AUE_freebsd32_pselect AUE_SELECT #define FREEBSD32_SYS_AUE_freebsd32_posix_fallocate AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_posix_fadvise AUE_NULL Modified: head/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscall.h Tue Sep 17 20:48:19 2013 (r255657) +++ head/sys/compat/freebsd32/freebsd32_syscall.h Tue Sep 17 20:49:05 2013 (r255658) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 255219 2013-09-05 00:09:56Z pjd + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 255657 2013-09-17 20:48:19Z jilles */ #define FREEBSD32_SYS_syscall 0 @@ -422,7 +422,7 @@ #define FREEBSD32_SYS_lpathconf 513 /* 514 is obsolete cap_new */ #define FREEBSD32_SYS___cap_rights_get 515 -#define FREEBSD32_SYS_cap_enter 516 +#define FREEBSD32_SYS_freebsd32_cap_enter 516 #define FREEBSD32_SYS_cap_getmode 517 #define FREEBSD32_SYS_pdfork 518 #define FREEBSD32_SYS_pdkill 519 Modified: head/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscalls.c Tue Sep 17 20:48:19 2013 (r255657) +++ head/sys/compat/freebsd32/freebsd32_syscalls.c Tue Sep 17 20:49:05 2013 (r255658) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 255219 2013-09-05 00:09:56Z pjd + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 255657 2013-09-17 20:48:19Z jilles */ const char *freebsd32_syscallnames[] = { @@ -539,7 +539,7 @@ const char *freebsd32_syscallnames[] = { "lpathconf", /* 513 = lpathconf */ "obs_cap_new", /* 514 = obsolete cap_new */ "__cap_rights_get", /* 515 = __cap_rights_get */ - "cap_enter", /* 516 = cap_enter */ + "freebsd32_cap_enter", /* 516 = freebsd32_cap_enter */ "cap_getmode", /* 517 = cap_getmode */ "pdfork", /* 518 = pdfork */ "pdkill", /* 519 = pdkill */ Modified: head/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_sysent.c Tue Sep 17 20:48:19 2013 (r255657) +++ head/sys/compat/freebsd32/freebsd32_sysent.c Tue Sep 17 20:49:05 2013 (r255658) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 255219 2013-09-05 00:09:56Z pjd + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 255657 2013-09-17 20:48:19Z jilles */ #include "opt_compat.h" @@ -576,7 +576,7 @@ struct sysent freebsd32_sysent[] = { { AS(lpathconf_args), (sy_call_t *)sys_lpathconf, AUE_LPATHCONF, NULL, 0, 0, 0, SY_THR_STATIC }, /* 513 = lpathconf */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 514 = obsolete cap_new */ { AS(__cap_rights_get_args), (sy_call_t *)sys___cap_rights_get, AUE_CAP_RIGHTS_GET, NULL, 0, 0, 0, SY_THR_STATIC }, /* 515 = __cap_rights_get */ - { 0, (sy_call_t *)sys_cap_enter, AUE_CAP_ENTER, NULL, 0, 0, 0, SY_THR_STATIC }, /* 516 = cap_enter */ + { 0, (sy_call_t *)freebsd32_cap_enter, AUE_CAP_ENTER, NULL, 0, 0, 0, SY_THR_STATIC }, /* 516 = freebsd32_cap_enter */ { AS(cap_getmode_args), (sy_call_t *)sys_cap_getmode, AUE_CAP_GETMODE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 517 = cap_getmode */ { AS(pdfork_args), (sy_call_t *)sys_pdfork, AUE_PDFORK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 518 = pdfork */ { AS(pdkill_args), (sy_call_t *)sys_pdkill, AUE_PDKILL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 519 = pdkill */ Modified: head/sys/compat/freebsd32/freebsd32_systrace_args.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_systrace_args.c Tue Sep 17 20:48:19 2013 (r255657) +++ head/sys/compat/freebsd32/freebsd32_systrace_args.c Tue Sep 17 20:49:05 2013 (r255658) @@ -2999,7 +2999,7 @@ systrace_args(int sysnum, void *params, *n_args = 3; break; } - /* cap_enter */ + /* freebsd32_cap_enter */ case 516: { *n_args = 0; break; @@ -8275,7 +8275,7 @@ systrace_entry_setargdesc(int sysnum, in break; }; break; - /* cap_enter */ + /* freebsd32_cap_enter */ case 516: break; /* cap_getmode */ @@ -10522,7 +10522,7 @@ systrace_return_setargdesc(int sysnum, i if (ndx == 0 || ndx == 1) p = "int"; break; - /* cap_enter */ + /* freebsd32_cap_enter */ case 516: /* cap_getmode */ case 517: From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 22:26:07 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EDE4946C; Tue, 17 Sep 2013 22:26:07 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CB1CF296E; Tue, 17 Sep 2013 22:26:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8HMQ7dM033584; Tue, 17 Sep 2013 22:26:07 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8HMQ7Qd033582; Tue, 17 Sep 2013 22:26:07 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201309172226.r8HMQ7Qd033582@svn.freebsd.org> From: Sean Bruno Date: Tue, 17 Sep 2013 22:26:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255659 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 22:26:08 -0000 Author: sbruno Date: Tue Sep 17 22:26:07 2013 New Revision: 255659 URL: http://svnweb.freebsd.org/changeset/base/255659 Log: Bring in configuration for Buffalo Airstation WZR-300HP, Atheros based wireless home router. Notable things: 2x 16 MB flash devices Atheros Wireless Atheros Switching Many thanks to adrian@ for his guidance on this and keeping the drivers in the base system up to date Approved by: re (delphij) Added: head/sys/mips/conf/WZR-300HP (contents, props changed) head/sys/mips/conf/WZR-300HP.hints (contents, props changed) Added: head/sys/mips/conf/WZR-300HP ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/WZR-300HP Tue Sep 17 22:26:07 2013 (r255659) @@ -0,0 +1,57 @@ +# +# Specific board setup for the Buffalo Airstation WZR-300HP +# +# The WZR-300HP has the following hardware: +# +# + AR7242 CPU SoC +# + AR9280 5GHz 11n +# + AR8136 Gigabit switch +# + 2 m25ll128 based 16MB flash +# + 64MB RAM +# + uboot environment + +# $FreeBSD$ + +include "AR724X_BASE" +ident "WZR-300HP" +hints "WZR-300HP.hints" + +options AR71XX_REALMEM=64*1024*1024 + +options AR71XX_ENV_UBOOT + +options BOOTVERBOSE +# Don't include the SCSI/CAM strings in the default build +options SCSI_NO_SENSE_STRINGS +options SCSI_NO_OP_STRINGS + +# .. And no sysctl strings +options NO_SYSCTL_DESCR + +# GEOM modules +device geom_map # to get access to the SPI flash partitions +device geom_uncompress # compressed in-memory filesystem hackery! + +options ROOTDEVNAME=\"ufs:/dev/map/rootfs.uncompress\" + +# options MD_ROOT +# options MD_ROOT_SIZE="6144" + +options AR71XX_ATH_EEPROM # Fetch EEPROM/PCI config from flash +options ATH_EEPROM_FIRMWARE # Use EEPROM from flash +device firmware # Used by the above + +# Options required for miiproxy and mdiobus +options ARGE_MDIO # Export an MDIO bus separate from arge +device miiproxy # MDIO bus <-> MII PHY rendezvous + +device etherswitch +device arswitch + +# Enable GPIO +device gpio +device gpioled + +# hwpmc +device hwpmc_mips24k +device hwpmc Added: head/sys/mips/conf/WZR-300HP.hints ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/WZR-300HP.hints Tue Sep 17 22:26:07 2013 (r255659) @@ -0,0 +1,187 @@ +# $FreeBSD$ + +# arge0 is connected to the LAN side of the switch PHY. +# arge1 is connected to the single port WAN side of the switch PHY. + +# arge1 MDIO bus +hint.argemdio.0.at="nexus0" +hint.argemdio.0.maddr=0x1a000000 +hint.argemdio.0.msize=0x1000 +hint.argemdio.0.order=0 + +hint.arge.0.phymask=0x0 +hint.arge.0.media=1000 +hint.arge.0.fduplex=1 +hint.arge.0.eeprommac=0x1f05120c +hint.arge.0.mdio=mdioproxy1 # .. off of the switch mdiobus + + +# arge1: nail to 1000/full, RMII - connected to the switch +hint.arge.1.media=1000 # Map to 1000/full +hint.arge.1.fduplex=1 # +hint.arge.1.phymask=0x0 # no directly mapped PHYs + +# +# AR7240 switch config +# +hint.arswitch.0.at="mdio0" +hint.arswitch.0.is_7240=1 # We need to be explicitly told this +hint.arswitch.0.numphys=4 # 4 active switch PHYs (PHY 0 -> 3) +hint.arswitch.0.phy4cpu=1 # Yes, PHY 4 == dedicated PHY +hint.arswitch.0.is_rgmii=0 # No, not RGMII +hint.arswitch.0.is_gmii=0 # No, not GMII + +# ath0 - slot 0 +hint.pcib.0.bus.0.0.0.ath_fixup_addr=0x1f051000 +hint.pcib.0.bus.0.0.0.ath_fixup_size=4096 + +# .. and now, telling each ath(4) NIC where to find the firmware +# image. +hint.ath.0.eeprom_firmware="pcib.0.bus.0.0.0.eeprom_firmware" + +# Inherited from AR724X_BASE.hints +#hint.mx25l.0.at="spibus0" +#hint.mx25l.0.cs=0 +# This board has two 16 MB flash devices on difference Chip Select pins +hint.mx25l.1.at="spibus0" +hint.mx25l.1.cs=1 + + +# Geom MAP + +# The WRZ-300HP has 2 16MB flash part - HOWEVER, the 64k caldata isn't +# at the end of the flash. It's ~ 328KB into the flash image. + +# mtdparts=ar7240-nor0: +# 256k(u-boot) +# 64k(u-boot-env) +# 64k@320k(ART) +# 1152k@384k(uImage) +# 6592k@1536k(rootfs) +# 64k@8128k(properties) + +# Uboot lies like a lying liar. OpenWRT does this: +# [ 0.570000] Concatenating MTD devices: +# [ 0.570000] (0): "spi0.0" +# [ 0.570000] (1): "spi0.1" +# [ 0.580000] into device "flash" +# [ 0.580000] Creating 7 MTD partitions on "flash": +# [ 0.590000] 0x000000000000-0x000000040000 : "u-boot" +# [ 0.600000] 0x000000040000-0x000000050000 : "u-boot-env" +# [ 0.600000] 0x000000050000-0x000000060000 : "art" +# [ 0.610000] 0x000000060000-0x000000160000 : "kernel" +# [ 0.620000] 0x000000160000-0x000001ff0000 : "rootfs" +# [ 0.620000] mtd: partition "rootfs" set to be root filesystem +# [ 0.630000] mtd: partition "rootfs_data" created automatically, ofs=330000, len=1CC0000 +# [ 0.640000] 0x000000330000-0x000001ff0000 : "rootfs_data" +# [ 0.650000] 0x000001ff0000-0x000002000000 : "user_property" +# [ 0.650000] 0x000000060000-0x000001ff0000 : "firmware" + +hint.map.0.at="flash/spi0" +hint.map.0.start=0x00000000 +hint.map.0.end= 0x00040000 +hint.map.0.name="uboot" +hint.map.0.readonly=1 + +hint.map.1.at="flash/spi0" +hint.map.1.start=0x00040000 +hint.map.1.end= 0x00050000 # 64k u-boot-env +hint.map.1.name="u-boot-env" +hint.map.1.readonly=1 + +hint.map.2.at="flash/spi0" +hint.map.2.start=0x00050000 +hint.map.2.end= 0x00060000 # 64k ART +hint.map.2.name="ART" +hint.map.2.readonly=1 + +hint.map.3.at="flash/spi0" +hint.map.3.start=0x00060000 +hint.map.3.end= 0x00160000 +hint.map.3.name="kernel" +hint.map.3.readonly=1 + +hint.map.4.at="flash/spi0" +hint.map.4.start=0x00160000 +hint.map.4.end= 0x00FF0000 +hint.map.4.name="rootfs" +hint.map.4.readonly=1 + +#hint.map.5.at="flash/spi1" +hint.map.5.at="flash/spi0" +hint.map.5.start=0x00FF0000 +hint.map.5.end= 0x01000000 +hint.map.5.name="cfg" +hint.map.5.readonly=0 + +# GPIO specific configuration block + +#define GPIO_PIN_INPUT 0x0001 /* input direction */ +#define GPIO_PIN_OUTPUT 0x0002 /* output direction */ +#define GPIO_PIN_OPENDRAIN 0x0004 /* open-drain output */ +#define GPIO_PIN_PUSHPULL 0x0008 /* push-pull output */ +#define GPIO_PIN_TRISTATE 0x0010 /* output disabled */ +#define GPIO_PIN_PULLUP 0x0020 /* internal pull-up enabled */ +#define GPIO_PIN_PULLDOWN 0x0040 /* internal pull-down enabled */ +#define GPIO_PIN_INVIN 0x0080 /* invert input */ +#define GPIO_PIN_INVOUT 0x0100 /* invert output */ +#define GPIO_PIN_PULSATE 0x0200 /* pulsate in hardware */ + +# Pin 1 - SCK +# Pin 2 - SDA +# Pin 3 - test 2 +# Pin 4 - test 3 +# Pin 5 - USB (LED Blue) +# Pin 6 - test a +# Pin 7 - Security (LED Orange) +# Pin 8 - Router (LED Green) +# Pin 9 - Movie Engine On (LED Blue) +# Pin 10 - Movie Engine Off (LED Blue) +# Pin 11 - test a +# Pin 12 - test a +# Pin 13 - test a +# Pin 14 - USB Power (turn on by default) +# Pin 15 - test a +# Pin 16 - test a +# Pin 17 - diag (LED red) + +# Don't flip on anything that isn't already enabled. +# Force on USB power pin 14 +#hint.gpio.0.function_set=0x00000000 +#hint.gpio.0.function_clear=0x00000000 + +# These are the GPIO LEDs and buttons which can be software controlled. +hint.gpio.0.pinmask=0x000103D0 + +hint.gpio.0.pinon=0x00000000 + +hint.gpioiic.0.at="gpiobus0" +hint.gpioiic.0.pins=0x0003 +hint.gpioiic.0.sda=0 +hint.gpioiic.0.scl=1 + +# LEDs are configured separately and driven by the LED device +# usb tested good +hint.gpioled.0.at="gpiobus0" +hint.gpioled.0.name="blue-usb" +hint.gpioled.0.pins=0x00000010 + +hint.gpioled.1.at="gpiobus0" +hint.gpioled.1.name="orange-security" +hint.gpioled.1.pins=0x00000040 + +hint.gpioled.2.at="gpiobus0" +hint.gpioled.2.name="green-router" +hint.gpioled.2.pins=0x00000080 + +hint.gpioled.3.at="gpiobus0" +hint.gpioled.3.name="blue-movie-engine-on" +hint.gpioled.3.pins=0x00000100 + +hint.gpioled.4.at="gpiobus0" +hint.gpioled.4.name="blue-movie-engine-off" +hint.gpioled.4.pins=0x00000200 + +hint.gpioled.5.at="gpiobus0" +hint.gpioled.5.name="red-diag" +hint.gpioled.5.pins=0x00010000 From owner-svn-src-all@FreeBSD.ORG Wed Sep 18 00:33:25 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C4E67B23; Wed, 18 Sep 2013 00:33:25 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 98E28207B; Wed, 18 Sep 2013 00:33:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8I0XPXt001565; Wed, 18 Sep 2013 00:33:25 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8I0XPcx001564; Wed, 18 Sep 2013 00:33:25 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201309180033.r8I0XPcx001564@svn.freebsd.org> From: Bryan Drewery Date: Wed, 18 Sep 2013 00:33:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255660 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Sep 2013 00:33:25 -0000 Author: bdrewery (ports committer) Date: Wed Sep 18 00:33:24 2013 New Revision: 255660 URL: http://svnweb.freebsd.org/changeset/base/255660 Log: Fix 'make installcheck' to check for missing UID/GID as well, broken since r249893, by adding a separate _installcheck_world and _installcheck_kernel so the destination targets can be more explicit on which they are needed for. installcheck will call both, while installworld only calls _installcheck_world and installkernel only calls _installcheck_kernel While here, mark the internal targets as starting with _. Reported by: des Reviewed by: des Pointyhat to: bdrewery Approved by: re (delphij) Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Sep 17 22:26:07 2013 (r255659) +++ head/Makefile.inc1 Wed Sep 18 00:33:24 2013 (r255660) @@ -676,8 +676,9 @@ kernel-toolchain: ${TOOLCHAIN_TGTS:N_inc # # Checks to be sure system is ready for installworld/installkernel. # -installcheck: -installcheck_UGID: +installcheck: _installcheck_world _installcheck_kernel +_installcheck_world: +_installcheck_kernel: # # Require DESTDIR to be set if installing for a different architecture or @@ -686,8 +687,9 @@ installcheck_UGID: .if ${TARGET_ARCH} != ${MACHINE_ARCH} || ${TARGET} != ${MACHINE} || \ defined(DB_FROM_SRC) .if !make(distributeworld) -installcheck: installcheck_DESTDIR -installcheck_DESTDIR: +_installcheck_world: __installcheck_DESTDIR +_installcheck_kernel: __installcheck_DESTDIR +__installcheck_DESTDIR: .if !defined(DESTDIR) || empty(DESTDIR) @echo "ERROR: Please set DESTDIR!"; \ false @@ -713,7 +715,8 @@ CHECK_GIDS+= proxy authpf CHECK_UIDS+= unbound CHECK_GIDS+= unbound .endif -installcheck_UGID: +_installcheck_world: __installcheck_UGID +__installcheck_UGID: .for uid in ${CHECK_UIDS} @if ! `id -u ${uid} >/dev/null 2>&1`; then \ echo "ERROR: Required ${uid} user is missing, see /usr/src/UPDATING."; \ @@ -768,7 +771,7 @@ EXTRA_DISTRIBUTIONS+= lib32 MTREE_MAGIC?= mtree 2.0 -distributeworld installworld: installcheck installcheck_UGID +distributeworld installworld: _installcheck_world mkdir -p ${INSTALLTMP} progs=$$(for prog in ${ITOOLS}; do \ if progpath=`which $$prog`; then \ @@ -1046,7 +1049,7 @@ buildkernel: # Install the kernel defined by INSTALLKERNEL # installkernel installkernel.debug \ -reinstallkernel reinstallkernel.debug: installcheck +reinstallkernel reinstallkernel.debug: _installcheck_kernel .if empty(INSTALLKERNEL) @echo "ERROR: No kernel \"${KERNCONF}\" to install."; \ false From owner-svn-src-all@FreeBSD.ORG Wed Sep 18 04:44:54 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E6ABFF1B; Wed, 18 Sep 2013 04:44:54 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D4AA62B8B; Wed, 18 Sep 2013 04:44:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8I4isdA033841; Wed, 18 Sep 2013 04:44:54 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8I4iswU033840; Wed, 18 Sep 2013 04:44:54 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201309180444.r8I4iswU033840@svn.freebsd.org> From: Joel Dahl Date: Wed, 18 Sep 2013 04:44:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255662 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Sep 2013 04:44:55 -0000 Author: joel (doc committer) Date: Wed Sep 18 04:44:54 2013 New Revision: 255662 URL: http://svnweb.freebsd.org/changeset/base/255662 Log: mdoc: sort SEE ALSO. Approved by: re (blanket) Modified: head/share/man/man5/fstab.5 Modified: head/share/man/man5/fstab.5 ============================================================================== --- head/share/man/man5/fstab.5 Wed Sep 18 03:51:49 2013 (r255661) +++ head/share/man/man5/fstab.5 Wed Sep 18 04:44:54 2013 (r255662) @@ -416,6 +416,7 @@ serv:/export /nfs nfs rw,noinet6 0 0 .Sh SEE ALSO .Xr getfsent 3 , .Xr getvfsbyname 3 , +.Xr strunvis 3 , .Xr ccd 4 , .Xr dump 8 , .Xr fsck 8 , @@ -423,7 +424,6 @@ serv:/export /nfs nfs rw,noinet6 0 0 .Xr mount 8 , .Xr quotacheck 8 , .Xr quotaon 8 , -.Xr strunvis 3 , .Xr swapon 8 , .Xr umount 8 .Sh HISTORY From owner-svn-src-all@FreeBSD.ORG Wed Sep 18 06:38:41 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 89036F07; Wed, 18 Sep 2013 06:38:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7464A20F6; Wed, 18 Sep 2013 06:38:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8I6cfr2094056; Wed, 18 Sep 2013 06:38:41 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8I6cfe9094055; Wed, 18 Sep 2013 06:38:41 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201309180638.r8I6cfe9094055@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 18 Sep 2013 06:38:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255663 - stable/9/sys/dev/usb/storage X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Sep 2013 06:38:41 -0000 Author: hselasky Date: Wed Sep 18 06:38:40 2013 New Revision: 255663 URL: http://svnweb.freebsd.org/changeset/base/255663 Log: MFC r255472: Clear correct data structure. Modified: stable/9/sys/dev/usb/storage/umass.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/storage/umass.c ============================================================================== --- stable/9/sys/dev/usb/storage/umass.c Wed Sep 18 04:44:54 2013 (r255662) +++ stable/9/sys/dev/usb/storage/umass.c Wed Sep 18 06:38:40 2013 (r255663) @@ -1320,10 +1320,12 @@ umass_t_bbb_command_callback(struct usb_ } sc->cbw.bCDBLength = sc->sc_transfer.cmd_len; + /* copy SCSI command data */ memcpy(sc->cbw.CBWCDB, sc->sc_transfer.cmd_data, sc->sc_transfer.cmd_len); - memset(sc->sc_transfer.cmd_data + + /* clear remaining command area */ + memset(sc->cbw.CBWCDB + sc->sc_transfer.cmd_len, 0, sizeof(sc->cbw.CBWCDB) - sc->sc_transfer.cmd_len); From owner-svn-src-all@FreeBSD.ORG Wed Sep 18 06:40:48 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3E7FE105; Wed, 18 Sep 2013 06:40:48 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2BF9F2130; Wed, 18 Sep 2013 06:40:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8I6emCT095308; Wed, 18 Sep 2013 06:40:48 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8I6emvk095307; Wed, 18 Sep 2013 06:40:48 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201309180640.r8I6emvk095307@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 18 Sep 2013 06:40:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r255664 - stable/8/sys/dev/usb/storage X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Sep 2013 06:40:48 -0000 Author: hselasky Date: Wed Sep 18 06:40:47 2013 New Revision: 255664 URL: http://svnweb.freebsd.org/changeset/base/255664 Log: MFC r255472: Clear correct data structure. Modified: stable/8/sys/dev/usb/storage/umass.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/storage/umass.c ============================================================================== --- stable/8/sys/dev/usb/storage/umass.c Wed Sep 18 06:38:40 2013 (r255663) +++ stable/8/sys/dev/usb/storage/umass.c Wed Sep 18 06:40:47 2013 (r255664) @@ -1304,10 +1304,12 @@ umass_t_bbb_command_callback(struct usb_ } sc->cbw.bCDBLength = sc->sc_transfer.cmd_len; + /* copy SCSI command data */ memcpy(sc->cbw.CBWCDB, sc->sc_transfer.cmd_data, sc->sc_transfer.cmd_len); - memset(sc->sc_transfer.cmd_data + + /* clear remaining command area */ + memset(sc->cbw.CBWCDB + sc->sc_transfer.cmd_len, 0, sizeof(sc->cbw.CBWCDB) - sc->sc_transfer.cmd_len); From owner-svn-src-all@FreeBSD.ORG Wed Sep 18 08:37:15 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BC568A4B; Wed, 18 Sep 2013 08:37:15 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8F8FF28D2; Wed, 18 Sep 2013 08:37:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8I8bFPg057532; Wed, 18 Sep 2013 08:37:15 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8I8bE1W057529; Wed, 18 Sep 2013 08:37:14 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201309180837.r8I8bE1W057529@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 18 Sep 2013 08:37:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255665 - in head: usr.bin/iscsictl usr.sbin/ctld usr.sbin/iscsid X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Sep 2013 08:37:15 -0000 Author: trasz Date: Wed Sep 18 08:37:14 2013 New Revision: 255665 URL: http://svnweb.freebsd.org/changeset/base/255665 Log: Make iscsictl(8) automatically try to load the iscsi module. While here, improve module loading in iscsid(8) and ctld(8). Approved by: re (delphij) Modified: head/usr.bin/iscsictl/iscsictl.c head/usr.sbin/ctld/kernel.c head/usr.sbin/iscsid/iscsid.c Modified: head/usr.bin/iscsictl/iscsictl.c ============================================================================== --- head/usr.bin/iscsictl/iscsictl.c Wed Sep 18 06:40:47 2013 (r255664) +++ head/usr.bin/iscsictl/iscsictl.c Wed Sep 18 08:37:14 2013 (r255665) @@ -30,6 +30,8 @@ */ #include +#include +#include #include #include #include @@ -512,7 +514,7 @@ main(int argc, char **argv) const char *conf_path = DEFAULT_CONFIG_PATH; char *nickname = NULL, *discovery_host = NULL, *host = NULL, *target = NULL, *user = NULL, *secret = NULL; - int ch, error, iscsi_fd; + int ch, error, iscsi_fd, retval, saved_errno; int failed = 0; struct conf *conf; struct target *targ; @@ -672,6 +674,14 @@ main(int argc, char **argv) } iscsi_fd = open(ISCSI_PATH, O_RDWR); + if (iscsi_fd < 0 && errno == ENOENT) { + saved_errno = errno; + retval = kldload("iscsi"); + if (retval != -1) + iscsi_fd = open(ISCSI_PATH, O_RDWR); + else + errno = saved_errno; + } if (iscsi_fd < 0) err(1, "failed to open %s", ISCSI_PATH); Modified: head/usr.sbin/ctld/kernel.c ============================================================================== --- head/usr.sbin/ctld/kernel.c Wed Sep 18 06:40:47 2013 (r255664) +++ head/usr.sbin/ctld/kernel.c Wed Sep 18 08:37:14 2013 (r255665) @@ -79,7 +79,7 @@ kernel_init(void) int retval, saved_errno; ctl_fd = open(CTL_DEFAULT_DEV, O_RDWR); - if (ctl_fd < 0) { + if (ctl_fd < 0 && errno == ENOENT) { saved_errno = errno; retval = kldload("ctl"); if (retval != -1) Modified: head/usr.sbin/iscsid/iscsid.c ============================================================================== --- head/usr.sbin/iscsid/iscsid.c Wed Sep 18 06:40:47 2013 (r255664) +++ head/usr.sbin/iscsid/iscsid.c Wed Sep 18 08:37:14 2013 (r255665) @@ -509,7 +509,7 @@ main(int argc, char **argv) } iscsi_fd = open(ISCSI_PATH, O_RDWR); - if (iscsi_fd < 0) { + if (iscsi_fd < 0 && errno == ENOENT) { saved_errno = errno; retval = kldload("iscsi"); if (retval != -1) From owner-svn-src-all@FreeBSD.ORG Wed Sep 18 10:48:53 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5BD2B50A; Wed, 18 Sep 2013 10:48:53 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 1CD8620D3; Wed, 18 Sep 2013 10:48:52 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id DC3266E5B; Wed, 18 Sep 2013 10:48:45 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id 562DFD2; Wed, 18 Sep 2013 12:48:35 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Bryan Drewery Subject: Re: svn commit: r255634 - head References: <201309171259.r8HCxb3o032697@svn.freebsd.org> <5238548D.9080503@FreeBSD.org> Date: Wed, 18 Sep 2013 12:48:34 +0200 In-Reply-To: <5238548D.9080503@FreeBSD.org> (Bryan Drewery's message of "Tue, 17 Sep 2013 08:09:33 -0500") Message-ID: <86a9jabe2l.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Sep 2013 10:48:53 -0000 Bryan Drewery writes: > Hm, I know you noticed this, but by making this conditional, it will not > check if building WITHOUT_UNBOUND, but the passwd and mtree files are > still using it and will blow up. Partly true: - 'make installworld' will succeed (except, I think, in the NO_ROOT case), because it doesn't run mtree. - 'make distributeworld' will fail, but that's a bug: it should use DB_FROM_SRC. - mergemaster will also fail, but in an exceedingly strange manner. The fact that neither 'make installworld' nor mergemaster create missing directories is probably a bug. We should, at the very least, document the need to run 'make hierarchy' before 'make installworld'. > All of these conditions should probably be removed until a better > mechanism for passwd/mtree can be thought up. Yep, but for now I decided to follow precedent. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Wed Sep 18 10:53:32 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 89B41699; Wed, 18 Sep 2013 10:53:32 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 4B0AF2129; Wed, 18 Sep 2013 10:53:31 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id ADE836E60; Wed, 18 Sep 2013 10:53:30 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id 2AF4CDB; Wed, 18 Sep 2013 12:52:50 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Bryan Drewery Subject: Re: svn commit: r255634 - head References: <201309171259.r8HCxb3o032697@svn.freebsd.org> <5238548D.9080503@FreeBSD.org> <86a9jabe2l.fsf@nine.des.no> Date: Wed, 18 Sep 2013 12:52:50 +0200 In-Reply-To: <86a9jabe2l.fsf@nine.des.no> ("Dag-Erling =?utf-8?Q?Sm=C3=B8r?= =?utf-8?Q?grav=22's?= message of "Wed, 18 Sep 2013 12:48:34 +0200") Message-ID: <8661tybdvh.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Sep 2013 10:53:32 -0000 Dag-Erling Sm=C3=B8rgrav writes: > - 'make installworld' will succeed (except, I think, in the NO_ROOT > case), because it doesn't run mtree. > [...] > The fact that neither 'make installworld' nor mergemaster create missing > directories is probably a bug. We should, at the very least, document > the need to run 'make hierarchy' before 'make installworld'. I spoke too soon: 'make installworld' does indeed run mtree. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Wed Sep 18 11:07:33 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 397C19D0; Wed, 18 Sep 2013 11:07:33 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 26B5521CC; Wed, 18 Sep 2013 11:07:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8IB7XxE037436; Wed, 18 Sep 2013 11:07:33 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8IB7X7Q037435; Wed, 18 Sep 2013 11:07:33 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201309181107.r8IB7X7Q037435@svn.freebsd.org> From: Sergey Kandaurov Date: Wed, 18 Sep 2013 11:07:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255666 - stable/9/usr.bin/netstat X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Sep 2013 11:07:33 -0000 Author: pluknet Date: Wed Sep 18 11:07:32 2013 New Revision: 255666 URL: http://svnweb.freebsd.org/changeset/base/255666 Log: MFC r248114 (by melifaro): Add forgotten .El Modified: stable/9/usr.bin/netstat/netstat.1 Directory Properties: stable/9/usr.bin/netstat/ (props changed) Modified: stable/9/usr.bin/netstat/netstat.1 ============================================================================== --- stable/9/usr.bin/netstat/netstat.1 Wed Sep 18 08:37:14 2013 (r255665) +++ stable/9/usr.bin/netstat/netstat.1 Wed Sep 18 11:07:32 2013 (r255666) @@ -307,6 +307,7 @@ The flags field shows available ISR hand .It Li D Ta Dv NETISR_SNP_FLAGS_DRAINEDCPU Ta "Has queue drain handler" .It Li F Ta Dv NETISR_SNP_FLAGS_M2FLOW Ta "Able to map mbuf to flow id" .El +.El .Pp Some options have the general meaning: .Bl -tag -width flag From owner-svn-src-all@FreeBSD.ORG Wed Sep 18 15:06:35 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D7A62434; Wed, 18 Sep 2013 15:06:34 +0000 (UTC) (envelope-from davide.italiano@gmail.com) Received: from mail-vc0-x22b.google.com (mail-vc0-x22b.google.com [IPv6:2607:f8b0:400c:c03::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5FB332026; Wed, 18 Sep 2013 15:06:34 +0000 (UTC) Received: by mail-vc0-f171.google.com with SMTP id ij15so5393113vcb.16 for ; Wed, 18 Sep 2013 08:06:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=jKGMUFwgkpndrc0PkWIPgQoOH5VuaECZVUDA4ETW4mA=; b=oDjRkreeJVkezMHFEYgbg93TgXNPIm+RKl7iTZ+IKDk9hdqscTbIkY5VFOc2NBlb/A 3VJ+nATZIEwLotcwm7w2TPoxTvxPtFlAo/FpnOWKxlWSIKthhUh1sx+VlF0wdeCKCcTv TrcIgzXxfc8snU3tykPboouv1+U119OeO12TFitGX7LdHtPVs8CiqcOlURykkvGsTkkR tTYUu6aJFmu/gksaXqb0E5ldwks3FQorQSHGXvC3Kub/P7tZqXZ+qHUIEWLOl6HM3WQw zwL2aTqxn9vrGveorDEQOszOoRBFrBgQDD6VeFa5VfxB3TJyWddTb6BbAxoiRoZB+d9F 5JNA== MIME-Version: 1.0 X-Received: by 10.58.44.37 with SMTP id b5mr38565817vem.4.1379516793497; Wed, 18 Sep 2013 08:06:33 -0700 (PDT) Sender: davide.italiano@gmail.com Received: by 10.220.65.132 with HTTP; Wed, 18 Sep 2013 08:06:33 -0700 (PDT) In-Reply-To: <201309121008.01115.jhb@freebsd.org> References: <201308231412.r7NECdG7081565@svn.freebsd.org> <201308261502.13277.jhb@freebsd.org> <201309121008.01115.jhb@freebsd.org> Date: Wed, 18 Sep 2013 17:06:33 +0200 X-Google-Sender-Auth: ENEqLqRVawH1oFBiH5N_CmSCgNI Message-ID: Subject: Re: svn commit: r254703 - in head: share/man/man9 sys/sys From: Davide Italiano To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Sep 2013 15:06:35 -0000 On Thu, Sep 12, 2013 at 4:08 PM, John Baldwin wrote: > Hmm, I think I had envisioned something a bit simpler. Namely, I would > change lc_lock/lc_unlock to return a uintptr_t instead of an int, and > I would then change lc_unlock for an rm lock to return a pointer to the > current thread's tracker as the 'how' and 0 for a write lock. Note > that you have to use the existing tracker to make this work correctly > for the sleep case where you unlock/lock. > Well, your solution is indeed a lot simpler :) Here's a patch that implements it: http://people.freebsd.org/~davide/review/rmshared.diff Some (more or less relevant) observations: -> I realized that before this change lc_unlock() for rmlocks, i.e. unlock_rm(), returned 1 for exclusive lock and panic'ed otherwise, while all the other primitives returned 0 for exclusive lock. Not sure if this was intentional or just an oversight, but I changed it to return what other primitive did mostly (0 for excl, (uintptr_t)rm_tracker for shared). -> In order to get the rm_priotracker structure for curthread (which I think is unique as long as we assert curthread is not recursively acquiring this lock) I just traversed the pc->pc_rm_queue. Maybe it's not the most efficient solution here, but I think is correct. -> I think that only lc_unlock() return type need to be changed from 'int' to 'uintptr_t'. lc_lock() type can stay void as it is right now. But I think you were talking about "how" argument of lc_lock() and not return type, probably. > However, if you make my suggested change to make the 'how' a uintptr_t > that passes the tracker you can actually do this in the callout case: > > struct rm_priotracker tracker; > uintptr_t how; > > how = 0; > if (flags & CALLOUT_SHAREDLOCK) > how = 1; > else if (flags & CALLOUT_SHAREDRM) > how = (uintptr_t)&tracker; > ... > > class->lc_lock(lock, how); > > Now, it would be even nicer to make prevent footshooting perhaps by > checking the lock class directly: > > how = 0; > if (flags & CALLOUT_SHAREDLOCK) { > if (class == &lock_class_rm || class == &lock_class_rm_sleepable) > how = (uintptr_t)&tracker; > else > how = 1; > } > > -- > John Baldwin This other patch just puts your code into kern_timeout.c I also removed the check for lock_class_rm_sleepable as callout_init() should catch this earlier. http://people.freebsd.org/~davide/review/callout_sharedrm.diff Thanks for the guidance on this. I probably commit this in the next days if you don't have objections. -- Davide "There are no solved problems; there are only problems that are more or less solved" -- Henri Poincare From owner-svn-src-all@FreeBSD.ORG Wed Sep 18 16:32:43 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AF1471C3; Wed, 18 Sep 2013 16:32:43 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9B60525E5; Wed, 18 Sep 2013 16:32:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8IGWhrG009742; Wed, 18 Sep 2013 16:32:43 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8IGWhM1009741; Wed, 18 Sep 2013 16:32:43 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201309181632.r8IGWhM1009741@svn.freebsd.org> From: Ed Maste Date: Wed, 18 Sep 2013 16:32:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r255667 - vendor/lldb/dist/docs X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Sep 2013 16:32:43 -0000 Author: emaste Date: Wed Sep 18 16:32:43 2013 New Revision: 255667 URL: http://svnweb.freebsd.org/changeset/base/255667 Log: Import lldb.1 man page as of SVN r188801 Added: vendor/lldb/dist/docs/ vendor/lldb/dist/docs/lldb.1 Added: vendor/lldb/dist/docs/lldb.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/docs/lldb.1 Wed Sep 18 16:32:43 2013 (r255667) @@ -0,0 +1,119 @@ +.Dd 7 June, 2012 \" DATE +.Dt LLDB 1 \" Program name and manual section number +.Os Darwin \" Operating System +.Sh NAME \" Section Header - required - don't modify +.Nm lldb +.Nd The debugger +.Sh SYNOPSIS \" Section Header - required - don't modify +.Nm lldb +.Op Fl hvdexw +.Op Fl a Ar arch +.Op Fl l Ar script-language +.Op Fl s Ar lldb-commands +.Op Fl n Ar process-name +.Op Fl p Ar pid +.Ar [[--] ...] +.Sh DESCRIPTION \" Section Header - required - don't modify +.Nm +is the command line interface for the LLDB debugger library. +.Nm +can debug C, C++, Objective-C, and Objective-C++ programs. +.Pp +The following options are available: +.Bl -tag -width indent +.It Fl h, -help +Prints out the usage information for the +.Nm +debugger. The \fB\-\-help\fR text may be more up-to-date and +authoritative than the command line options described in this man +page. +.It Fl v, -version +Prints out the version number of the +.Nm +debugger. +.It Fl a, -arch Ar arch +Specifies which architecture +.Nm +will use when launching the specified program (assuming the provided +executable is built for multiple architectures.) +.It Fl f, -file Ar filename +Specifies the executable file that +.nm +will be launching / attaching to. +.It Fl n, -attach-name Ar process-name +Specifies the name of a currently-running process to attach to. +(or the name of a process to wait for if \fB\-w\fR is used.) +.It Fl w, -wait-for +When used in concert with \&\fB\-n process-name\-E\fR, indicates that +.Nm +should wait for a new process of that name to be started -- and attach +to it as early in the process-launch as possible. +.It Fl p, -attach-pid Ar pid +Specifies a currently running process that +.Nm +should attach to. +.It Fl l, -script-language Ar language +Tells the debugger to use the specified scripting language for +user-defined scripts, rather than the default. Valid scripting +languages that can be specified include Python, Perl, Ruby and Tcl. +Currently only the Python extensions have been implemented. +.It Fl d, -debug +Tells the debugger to print out extra information for debugging itself. +.It Fl s, -source Ar filename +Tells +.Nm +to read in and execute the file "\fBfilename\fR", which +should contain +.Nm +commands. +.It Fl e, -editor +Instructs +.Nm +to open source files using the host's "external editor" mechanism. +.It Fl x, -no-lldbinit +Do not automatically parse any '.lldbinit' files. +.Pp +(If you don't provide -f then the first argument will be the file to be debugged +so 'lldb -- [ []]' also works. +Remember to end the options with "--" if any of your arguments have a "-" in them.) +.El +.Sh USING LLDB +In +.Nm +there is a \fBhelp\fR command which can be used to find descriptions and examples of +all +.Nm +commands. To get help on "\fBbreakpoint set\fR" you would type "\fBhelp breakpoint set\fR". +.Pp +There is also an \fBapropos\fR command which will search the help text of all commands +for a given term -- this is useful for locating a command by topic. For instance, "\fBapropos breakpoint\fR" +will list any command that has the word \fBbreakpoint\fR in its help text. +.Sh FILES +.Nm +will read settings/aliases/commands from three files at startup, if they exist. +.Pp +First, it will read a \fB~/.lldbinit-\fIdebugger\fR command file. If you are using the +.Nm +command line interface, this is \fB~/.lldbinit-lldb\fR. If you are using +.Nm +inside a GUI debugger like +.Nm Xcode +this will be \fB~/.lldbinit-Xcode\fR. This is a useful place to put settings that you +want to apply only when a given +.Nm +command interpreter is used. +.Pp +Second, \fB~/.lldbinit\fR is read. +.Pp +Third, an \fR.lldbinit\fR file in the current working directory (where +.Nm +is started) will be read. +.Sh SEE ALSO +The LLDB project page http://lldb.llvm.org/ has many different resources for +.Nm +users -- the gdb/lldb command equivalence page http://lldb.llvm.org/lldb-gdb.html can +be especially helpful for users coming from gdb. +.Sh BUGS +To report bugs, please visit http://llvm.org/bugs/ +.Sh AUTHOR +Maintained by the LLDB Team, http://lldb.llvm.org/ From owner-svn-src-all@FreeBSD.ORG Wed Sep 18 16:39:02 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 260563B9; Wed, 18 Sep 2013 16:39:02 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EC5162623; Wed, 18 Sep 2013 16:39:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8IGd1rQ011826; Wed, 18 Sep 2013 16:39:01 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8IGd19l011825; Wed, 18 Sep 2013 16:39:01 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201309181639.r8IGd19l011825@svn.freebsd.org> From: Ed Maste Date: Wed, 18 Sep 2013 16:39:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r255668 - vendor/lldb/lldb-r188801/docs X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Sep 2013 16:39:02 -0000 Author: emaste Date: Wed Sep 18 16:39:01 2013 New Revision: 255668 URL: http://svnweb.freebsd.org/changeset/base/255668 Log: Tag lldb man page from r188801 Added: vendor/lldb/lldb-r188801/docs/ - copied from r255667, vendor/lldb/dist/docs/ From owner-svn-src-all@FreeBSD.ORG Wed Sep 18 17:27:40 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9E08C469; Wed, 18 Sep 2013 17:27:40 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 85D34290E; Wed, 18 Sep 2013 17:27:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8IHReCQ037782; Wed, 18 Sep 2013 17:27:40 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8IHRcMM037765; Wed, 18 Sep 2013 17:27:38 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309181727.r8IHRcMM037765@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Wed, 18 Sep 2013 17:27:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r255670 - in vendor-crypto/openssh/dist: . contrib contrib/caldera contrib/cygwin contrib/redhat contrib/suse openbsd-compat regress X-SVN-Group: vendor-crypto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Sep 2013 17:27:40 -0000 Author: des Date: Wed Sep 18 17:27:38 2013 New Revision: 255670 URL: http://svnweb.freebsd.org/changeset/base/255670 Log: Vendor import of OpenSSH 6.3p1 Added: vendor-crypto/openssh/dist/fixalgorithms (contents, props changed) vendor-crypto/openssh/dist/openbsd-compat/getopt.h (contents, props changed) vendor-crypto/openssh/dist/openbsd-compat/getopt_long.c (contents, props changed) vendor-crypto/openssh/dist/regress/sftp-chroot.sh (contents, props changed) Deleted: vendor-crypto/openssh/dist/openbsd-compat/getopt.c vendor-crypto/openssh/dist/regress/bsd.regress.mk vendor-crypto/openssh/dist/regress/runtests.sh Modified: vendor-crypto/openssh/dist/ChangeLog vendor-crypto/openssh/dist/Makefile.in vendor-crypto/openssh/dist/README vendor-crypto/openssh/dist/aclocal.m4 vendor-crypto/openssh/dist/addrmatch.c vendor-crypto/openssh/dist/auth-chall.c vendor-crypto/openssh/dist/auth-krb5.c vendor-crypto/openssh/dist/auth-options.c vendor-crypto/openssh/dist/auth-pam.c vendor-crypto/openssh/dist/auth-rsa.c vendor-crypto/openssh/dist/auth.c vendor-crypto/openssh/dist/auth.h vendor-crypto/openssh/dist/auth1.c vendor-crypto/openssh/dist/auth2-chall.c vendor-crypto/openssh/dist/auth2-gss.c vendor-crypto/openssh/dist/auth2-hostbased.c vendor-crypto/openssh/dist/auth2-jpake.c vendor-crypto/openssh/dist/auth2-kbdint.c vendor-crypto/openssh/dist/auth2-passwd.c vendor-crypto/openssh/dist/auth2-pubkey.c vendor-crypto/openssh/dist/auth2.c vendor-crypto/openssh/dist/authfd.c vendor-crypto/openssh/dist/authfile.c vendor-crypto/openssh/dist/bufaux.c vendor-crypto/openssh/dist/bufbn.c vendor-crypto/openssh/dist/bufec.c vendor-crypto/openssh/dist/buffer.c vendor-crypto/openssh/dist/buffer.h vendor-crypto/openssh/dist/canohost.c vendor-crypto/openssh/dist/channels.c vendor-crypto/openssh/dist/channels.h vendor-crypto/openssh/dist/cipher-3des1.c vendor-crypto/openssh/dist/cipher-aes.c vendor-crypto/openssh/dist/cipher-ctr.c vendor-crypto/openssh/dist/cipher.c vendor-crypto/openssh/dist/cipher.h vendor-crypto/openssh/dist/clientloop.c vendor-crypto/openssh/dist/clientloop.h vendor-crypto/openssh/dist/compat.c vendor-crypto/openssh/dist/config.guess vendor-crypto/openssh/dist/config.h.in vendor-crypto/openssh/dist/config.sub vendor-crypto/openssh/dist/configure vendor-crypto/openssh/dist/configure.ac vendor-crypto/openssh/dist/contrib/caldera/openssh.spec vendor-crypto/openssh/dist/contrib/cygwin/README vendor-crypto/openssh/dist/contrib/cygwin/ssh-host-config vendor-crypto/openssh/dist/contrib/cygwin/ssh-user-config vendor-crypto/openssh/dist/contrib/redhat/openssh.spec vendor-crypto/openssh/dist/contrib/ssh-copy-id vendor-crypto/openssh/dist/contrib/suse/openssh.spec vendor-crypto/openssh/dist/defines.h vendor-crypto/openssh/dist/dh.c vendor-crypto/openssh/dist/dns.c vendor-crypto/openssh/dist/groupaccess.c vendor-crypto/openssh/dist/gss-genr.c vendor-crypto/openssh/dist/gss-serv-krb5.c vendor-crypto/openssh/dist/gss-serv.c vendor-crypto/openssh/dist/hostfile.c vendor-crypto/openssh/dist/hostfile.h vendor-crypto/openssh/dist/includes.h vendor-crypto/openssh/dist/jpake.c vendor-crypto/openssh/dist/kex.c vendor-crypto/openssh/dist/kex.h vendor-crypto/openssh/dist/kexdhc.c vendor-crypto/openssh/dist/kexdhs.c vendor-crypto/openssh/dist/kexecdh.c vendor-crypto/openssh/dist/kexecdhc.c vendor-crypto/openssh/dist/kexecdhs.c vendor-crypto/openssh/dist/kexgexc.c vendor-crypto/openssh/dist/kexgexs.c vendor-crypto/openssh/dist/key.c vendor-crypto/openssh/dist/key.h vendor-crypto/openssh/dist/krl.c vendor-crypto/openssh/dist/log.c vendor-crypto/openssh/dist/log.h vendor-crypto/openssh/dist/loginrec.c vendor-crypto/openssh/dist/mac.c vendor-crypto/openssh/dist/mac.h vendor-crypto/openssh/dist/match.c vendor-crypto/openssh/dist/misc.c vendor-crypto/openssh/dist/misc.h vendor-crypto/openssh/dist/moduli.0 vendor-crypto/openssh/dist/moduli.c vendor-crypto/openssh/dist/monitor.c vendor-crypto/openssh/dist/monitor_mm.c vendor-crypto/openssh/dist/monitor_wrap.c vendor-crypto/openssh/dist/mux.c vendor-crypto/openssh/dist/myproposal.h vendor-crypto/openssh/dist/openbsd-compat/Makefile.in vendor-crypto/openssh/dist/openbsd-compat/bsd-cygwin_util.c vendor-crypto/openssh/dist/openbsd-compat/bsd-cygwin_util.h vendor-crypto/openssh/dist/openbsd-compat/bsd-misc.h vendor-crypto/openssh/dist/openbsd-compat/getrrsetbyname-ldns.c vendor-crypto/openssh/dist/openbsd-compat/openbsd-compat.h vendor-crypto/openssh/dist/openbsd-compat/port-aix.c vendor-crypto/openssh/dist/openbsd-compat/port-linux.c vendor-crypto/openssh/dist/openbsd-compat/xcrypt.c vendor-crypto/openssh/dist/packet.c vendor-crypto/openssh/dist/packet.h vendor-crypto/openssh/dist/pathnames.h vendor-crypto/openssh/dist/progressmeter.c vendor-crypto/openssh/dist/readconf.c vendor-crypto/openssh/dist/readconf.h vendor-crypto/openssh/dist/readpass.c vendor-crypto/openssh/dist/regress/Makefile vendor-crypto/openssh/dist/regress/agent-getpeereid.sh vendor-crypto/openssh/dist/regress/agent-timeout.sh vendor-crypto/openssh/dist/regress/agent.sh vendor-crypto/openssh/dist/regress/cert-hostkey.sh vendor-crypto/openssh/dist/regress/cert-userkey.sh vendor-crypto/openssh/dist/regress/cfgmatch.sh vendor-crypto/openssh/dist/regress/cipher-speed.sh vendor-crypto/openssh/dist/regress/conch-ciphers.sh vendor-crypto/openssh/dist/regress/dynamic-forward.sh vendor-crypto/openssh/dist/regress/forcecommand.sh vendor-crypto/openssh/dist/regress/forwarding.sh vendor-crypto/openssh/dist/regress/integrity.sh vendor-crypto/openssh/dist/regress/keytype.sh vendor-crypto/openssh/dist/regress/krl.sh vendor-crypto/openssh/dist/regress/localcommand.sh vendor-crypto/openssh/dist/regress/login-timeout.sh vendor-crypto/openssh/dist/regress/modpipe.c vendor-crypto/openssh/dist/regress/multiplex.sh vendor-crypto/openssh/dist/regress/portnum.sh vendor-crypto/openssh/dist/regress/proto-version.sh vendor-crypto/openssh/dist/regress/proxy-connect.sh vendor-crypto/openssh/dist/regress/putty-ciphers.sh vendor-crypto/openssh/dist/regress/putty-kex.sh vendor-crypto/openssh/dist/regress/putty-transfer.sh vendor-crypto/openssh/dist/regress/reexec.sh vendor-crypto/openssh/dist/regress/rekey.sh vendor-crypto/openssh/dist/regress/scp.sh vendor-crypto/openssh/dist/regress/sftp-badcmds.sh vendor-crypto/openssh/dist/regress/sftp-batch.sh vendor-crypto/openssh/dist/regress/sftp-cmds.sh vendor-crypto/openssh/dist/regress/sftp.sh vendor-crypto/openssh/dist/regress/ssh-com-client.sh vendor-crypto/openssh/dist/regress/ssh-com-sftp.sh vendor-crypto/openssh/dist/regress/ssh-com.sh vendor-crypto/openssh/dist/regress/sshd-log-wrapper.sh vendor-crypto/openssh/dist/regress/stderr-after-eof.sh vendor-crypto/openssh/dist/regress/stderr-data.sh vendor-crypto/openssh/dist/regress/test-exec.sh vendor-crypto/openssh/dist/regress/transfer.sh vendor-crypto/openssh/dist/regress/try-ciphers.sh vendor-crypto/openssh/dist/roaming_client.c vendor-crypto/openssh/dist/roaming_common.c vendor-crypto/openssh/dist/rsa.c vendor-crypto/openssh/dist/sandbox-seccomp-filter.c vendor-crypto/openssh/dist/sandbox-systrace.c vendor-crypto/openssh/dist/schnorr.c vendor-crypto/openssh/dist/scp.0 vendor-crypto/openssh/dist/scp.1 vendor-crypto/openssh/dist/scp.c vendor-crypto/openssh/dist/servconf.c vendor-crypto/openssh/dist/servconf.h vendor-crypto/openssh/dist/serverloop.c vendor-crypto/openssh/dist/session.c vendor-crypto/openssh/dist/sftp-client.c vendor-crypto/openssh/dist/sftp-client.h vendor-crypto/openssh/dist/sftp-common.c vendor-crypto/openssh/dist/sftp-glob.c vendor-crypto/openssh/dist/sftp-server.0 vendor-crypto/openssh/dist/sftp-server.8 vendor-crypto/openssh/dist/sftp-server.c vendor-crypto/openssh/dist/sftp.0 vendor-crypto/openssh/dist/sftp.1 vendor-crypto/openssh/dist/sftp.c vendor-crypto/openssh/dist/ssh-add.0 vendor-crypto/openssh/dist/ssh-add.c vendor-crypto/openssh/dist/ssh-agent.0 vendor-crypto/openssh/dist/ssh-agent.c vendor-crypto/openssh/dist/ssh-dss.c vendor-crypto/openssh/dist/ssh-ecdsa.c vendor-crypto/openssh/dist/ssh-keygen.0 vendor-crypto/openssh/dist/ssh-keygen.1 vendor-crypto/openssh/dist/ssh-keygen.c vendor-crypto/openssh/dist/ssh-keyscan.0 vendor-crypto/openssh/dist/ssh-keyscan.1 vendor-crypto/openssh/dist/ssh-keyscan.c vendor-crypto/openssh/dist/ssh-keysign.0 vendor-crypto/openssh/dist/ssh-keysign.8 vendor-crypto/openssh/dist/ssh-keysign.c vendor-crypto/openssh/dist/ssh-pkcs11-client.c vendor-crypto/openssh/dist/ssh-pkcs11-helper.0 vendor-crypto/openssh/dist/ssh-pkcs11-helper.8 vendor-crypto/openssh/dist/ssh-pkcs11-helper.c vendor-crypto/openssh/dist/ssh-pkcs11.c vendor-crypto/openssh/dist/ssh-rsa.c vendor-crypto/openssh/dist/ssh.0 vendor-crypto/openssh/dist/ssh.1 vendor-crypto/openssh/dist/ssh.c vendor-crypto/openssh/dist/ssh_config vendor-crypto/openssh/dist/ssh_config.0 vendor-crypto/openssh/dist/ssh_config.5 vendor-crypto/openssh/dist/sshconnect.c vendor-crypto/openssh/dist/sshconnect1.c vendor-crypto/openssh/dist/sshconnect2.c vendor-crypto/openssh/dist/sshd.0 vendor-crypto/openssh/dist/sshd.8 vendor-crypto/openssh/dist/sshd.c vendor-crypto/openssh/dist/sshd_config vendor-crypto/openssh/dist/sshd_config.0 vendor-crypto/openssh/dist/sshd_config.5 vendor-crypto/openssh/dist/sshlogin.c vendor-crypto/openssh/dist/sshlogin.h vendor-crypto/openssh/dist/uidswap.c vendor-crypto/openssh/dist/umac.c vendor-crypto/openssh/dist/umac.h vendor-crypto/openssh/dist/uuencode.c vendor-crypto/openssh/dist/version.h vendor-crypto/openssh/dist/xmalloc.c vendor-crypto/openssh/dist/xmalloc.h Modified: vendor-crypto/openssh/dist/ChangeLog ============================================================================== --- vendor-crypto/openssh/dist/ChangeLog Wed Sep 18 17:18:19 2013 (r255669) +++ vendor-crypto/openssh/dist/ChangeLog Wed Sep 18 17:27:38 2013 (r255670) @@ -1,17 +1,628 @@ +20130913 + - (djm) [channels.c] Fix unaligned access on sparc machines in SOCKS5 code; + ok dtucker@ + - (djm) [channels.c] sigh, typo s/buffet_/buffer_/ + - (djm) Release 6.3p1 + +20130808 + - (dtucker) [regress/Makefile regress/test-exec.sh] Don't try to use test -nt + since some platforms (eg really old FreeBSD) don't have it. Instead, + run "make clean" before a complete regress run. ok djm. + - (dtucker) [misc.c] Fall back to time(2) at runtime if clock_gettime( + CLOCK_MONOTONIC...) fails. Some older versions of RHEL have the + CLOCK_MONOTONIC define but don't actually support it. Found and tested + by Kevin Brott, ok djm. + - (dtucker) [misc.c] Remove define added for fallback testing that was + mistakenly included in the previous commit. + - (dtucker) [regress/Makefile regress/test-exec.sh] Roll back the -nt + removal. The "make clean" removes modpipe which is built by the top-level + directory before running the tests. Spotted by tim@ + +20130804 + - (dtucker) [auth-krb5.c configure.ac openbsd-compat/bsd-misc.h] Add support + for building with older Heimdal versions. ok djm. + +20130801 + - (djm) [channels.c channels.h] bz#2135: On Solaris, isatty() on a non- + blocking connecting socket will clear any stored errno that might + otherwise have been retrievable via getsockopt(). A hack to limit writes + to TTYs on AIX was triggering this. Since only AIX needs the hack, wrap + it in an #ifdef. Diagnosis and patch from Ivo Raisr. + - (djm) [sshlogin.h] Fix prototype merge botch from 2006; bz#2134 + +20130725 + - (djm) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2013/07/20 22:20:42 + [krl.c] + fix verification error in (as-yet usused) KRL signature checking path + - djm@cvs.openbsd.org 2013/07/22 05:00:17 + [umac.c] + make MAC key, data to be hashed and nonce for final hash const; + checked with -Wcast-qual + - djm@cvs.openbsd.org 2013/07/22 12:20:02 + [umac.h] + oops, forgot to commit corresponding header change; + spotted by jsg and jasper + - djm@cvs.openbsd.org 2013/07/25 00:29:10 + [ssh.c] + daemonise backgrounded (ControlPersist'ed) multiplexing master to ensure + it is fully detached from its controlling terminal. based on debugging + - djm@cvs.openbsd.org 2013/07/25 00:56:52 + [sftp-client.c sftp-client.h sftp.1 sftp.c] + sftp support for resuming partial downloads; patch mostly by Loganaden + Velvindron/AfriNIC with some tweaks by me; feedback and ok dtucker@ + "Just be careful" deraadt@ + - djm@cvs.openbsd.org 2013/07/25 00:57:37 + [version.h] + openssh-6.3 for release + - dtucker@cvs.openbsd.org 2013/05/30 20:12:32 + [regress/test-exec.sh] + use ssh and sshd as testdata since it needs to be >256k for the rekey test + - dtucker@cvs.openbsd.org 2013/06/10 21:56:43 + [regress/forwarding.sh] + Add test for forward config parsing + - djm@cvs.openbsd.org 2013/06/21 02:26:26 + [regress/sftp-cmds.sh regress/test-exec.sh] + unbreak sftp-cmds for renamed test data (s/ls/data/) + - (tim) [sftp-client.c] Use of a gcc extension trips up native compilers on + Solaris and UnixWare. Feedback and OK djm@ + - (tim) [regress/forwarding.sh] Fix for building outside source tree. + +20130720 + - (djm) OpenBSD CVS Sync + - markus@cvs.openbsd.org 2013/07/19 07:37:48 + [auth.h kex.h kexdhs.c kexecdhs.c kexgexs.c monitor.c servconf.c] + [servconf.h session.c sshd.c sshd_config.5] + add ssh-agent(1) support to sshd(8); allows encrypted hostkeys, + or hostkeys on smartcards; most of the work by Zev Weiss; bz #1974 + ok djm@ + - djm@cvs.openbsd.org 2013/07/20 01:43:46 + [umac.c] + use a union to ensure correct alignment; ok deraadt + - djm@cvs.openbsd.org 2013/07/20 01:44:37 + [ssh-keygen.c ssh.c] + More useful error message on missing current user in /etc/passwd + - djm@cvs.openbsd.org 2013/07/20 01:50:20 + [ssh-agent.c] + call cleanup_handler on SIGINT when in debug mode to ensure sockets + are cleaned up on manual exit; bz#2120 + - djm@cvs.openbsd.org 2013/07/20 01:55:13 + [auth-krb5.c gss-serv-krb5.c gss-serv.c] + fix kerberos/GSSAPI deprecation warnings and linking; "looks okay" millert@ + +20130718 + - (djm) OpenBSD CVS Sync + - dtucker@cvs.openbsd.org 2013/06/10 19:19:44 + [readconf.c] + revert 1.203 while we investigate crashes reported by okan@ + - guenther@cvs.openbsd.org 2013/06/17 04:48:42 + [scp.c] + Handle time_t values as long long's when formatting them and when + parsing them from remote servers. + Improve error checking in parsing of 'T' lines. + ok dtucker@ deraadt@ + - markus@cvs.openbsd.org 2013/06/20 19:15:06 + [krl.c] + don't leak the rdata blob on errors; ok djm@ + - djm@cvs.openbsd.org 2013/06/21 00:34:49 + [auth-rsa.c auth.h auth2-hostbased.c auth2-pubkey.c monitor.c] + for hostbased authentication, print the client host and user on + the auth success/failure line; bz#2064, ok dtucker@ + - djm@cvs.openbsd.org 2013/06/21 00:37:49 + [ssh_config.5] + explicitly mention that IdentitiesOnly can be used with IdentityFile + to control which keys are offered from an agent. + - djm@cvs.openbsd.org 2013/06/21 05:42:32 + [dh.c] + sprinkle in some error() to explain moduli(5) parse failures + - djm@cvs.openbsd.org 2013/06/21 05:43:10 + [scp.c] + make this -Wsign-compare clean after time_t conversion + - djm@cvs.openbsd.org 2013/06/22 06:31:57 + [scp.c] + improved time_t overflow check suggested by guenther@ + - jmc@cvs.openbsd.org 2013/06/27 14:05:37 + [ssh-keygen.1 ssh.1 ssh_config.5 sshd.8 sshd_config.5] + do not use Sx for sections outwith the man page - ingo informs me that + stuff like html will render with broken links; + issue reported by Eric S. Raymond, via djm + - markus@cvs.openbsd.org 2013/07/02 12:31:43 + [dh.c] + remove extra whitespace + - djm@cvs.openbsd.org 2013/07/12 00:19:59 + [auth-options.c auth-rsa.c bufaux.c buffer.h channels.c hostfile.c] + [hostfile.h mux.c packet.c packet.h roaming_common.c serverloop.c] + fix pointer-signedness warnings from clang/llvm-3.3; "seems nice" deraadt@ + - djm@cvs.openbsd.org 2013/07/12 00:20:00 + [sftp.c ssh-keygen.c ssh-pkcs11.c] + fix pointer-signedness warnings from clang/llvm-3.3; "seems nice" deraadt@ + - djm@cvs.openbsd.org 2013/07/12 00:43:50 + [misc.c] + in ssh_gai_strerror() don't fallback to strerror for EAI_SYSTEM when + errno == 0. Avoids confusing error message in some broken resolver + cases. bz#2122 patch from plautrba AT redhat.com; ok dtucker + - djm@cvs.openbsd.org 2013/07/12 05:42:03 + [ssh-keygen.c] + do_print_resource_record() can never be called with a NULL filename, so + don't attempt (and bungle) asking for one if it has not been specified + bz#2127 ok dtucker@ + - djm@cvs.openbsd.org 2013/07/12 05:48:55 + [ssh.c] + set TCP nodelay for connections started with -N; bz#2124 ok dtucker@ + - schwarze@cvs.openbsd.org 2013/07/16 00:07:52 + [scp.1 sftp-server.8 ssh-keyscan.1 ssh-keysign.8 ssh-pkcs11-helper.8] + use .Mt for email addresses; from Jan Stary ; ok jmc@ + - djm@cvs.openbsd.org 2013/07/18 01:12:26 + [ssh.1] + be more exact wrt perms for ~/.ssh/config; bz#2078 + +20130702 + - (dtucker) [contrib/cygwin/README contrib/cygwin/ssh-host-config + contrib/cygwin/ssh-user-config] Modernizes and improve readability of + the Cygwin README file (which hasn't been updated for ages), drop + unsupported OSes from the ssh-host-config help text, and drop an + unneeded option from ssh-user-config. Patch from vinschen at redhat com. + +20130610 + - (djm) OpenBSD CVS Sync + - dtucker@cvs.openbsd.org 2013/06/07 15:37:52 + [channels.c channels.h clientloop.c] + Add an "ABANDONED" channel state and use for mux sessions that are + disconnected via the ~. escape sequence. Channels in this state will + be able to close if the server responds, but do not count as active channels. + This means that if you ~. all of the mux clients when using ControlPersist + on a broken network, the backgrounded mux master will exit when the + Control Persist time expires rather than hanging around indefinitely. + bz#1917, also reported and tested by tedu@. ok djm@ markus@. + - (dtucker) [Makefile.in configure.ac fixalgorithms] Remove unsupported + algorithms (Ciphers, MACs and HostKeyAlgorithms) from man pages. + - (dtucker) [myproposal.h] Do not advertise AES GSM ciphers if we don't have + the required OpenSSL support. Patch from naddy at freebsd. + - (dtucker) [myproposal.h] Make the conditional algorithm support consistent + and add some comments so it's clear what goes where. + +20130605 + - (dtucker) [myproposal.h] Enable sha256 kex methods based on the presence of + the necessary functions, not from the openssl version. + - (dtucker) [contrib/ssh-copy-id] bz#2117: Use portable operator in test. + Patch from cjwatson at debian. + - (dtucker) [regress/forwarding.sh] For (as yet unknown) reason, the + forwarding test is extremely slow copying data on some machines so switch + back to copying the much smaller ls binary until we can figure out why + this is. + - (dtucker) [Makefile.in] append $CFLAGS to compiler options when building + modpipe in case there's anything in there we need. + - (dtucker) OpenBSD CVS Sync + - dtucker@cvs.openbsd.org 2013/06/02 21:01:51 + [channels.h] + typo in comment + - dtucker@cvs.openbsd.org 2013/06/02 23:36:29 + [clientloop.h clientloop.c mux.c] + No need for the mux cleanup callback to be visible so restore it to static + and call it through the detach_user function pointer. ok djm@ + - dtucker@cvs.openbsd.org 2013/06/03 00:03:18 + [mac.c] + force the MAC output to be 64-bit aligned so umac won't see unaligned + accesses on strict-alignment architectures. bz#2101, patch from + tomas.kuthan at oracle.com, ok djm@ + - dtucker@cvs.openbsd.org 2013/06/04 19:12:23 + [scp.c] + use MAXPATHLEN for buffer size instead of fixed value. ok markus + - dtucker@cvs.openbsd.org 2013/06/04 20:42:36 + [sftp.c] + Make sftp's libedit interface marginally multibyte aware by building up + the quoted string by character instead of by byte. Prevents failures + when linked against a libedit built with wide character support (bz#1990). + "looks ok" djm + - dtucker@cvs.openbsd.org 2013/06/05 02:07:29 + [mux.c] + fix leaks in mux error paths, from Zhenbo Xu, found by Melton. bz#1967, + ok djm + - dtucker@cvs.openbsd.org 2013/06/05 02:27:50 + [sshd.c] + When running sshd -D, close stderr unless we have explicitly requesting + logging to stderr. From james.hunt at ubuntu.com via bz#1976, djm's patch + so, err, ok dtucker. + - dtucker@cvs.openbsd.org 2013/06/05 12:52:38 + [sshconnect2.c] + Fix memory leaks found by Zhenbo Xu and the Melton tool. bz#1967, ok djm + - dtucker@cvs.openbsd.org 2013/06/05 22:00:28 + [readconf.c] + plug another memleak. bz#1967, from Zhenbo Xu, detected by Melton, ok djm + - (dtucker) [configure.ac sftp.c openbsd-compat/openbsd-compat.h] Cater for + platforms that don't have multibyte character support (specifically, + mblen). + +20130602 + - (tim) [Makefile.in] Make Solaris, UnixWare, & OpenServer linkers happy + linking regress/modpipe. + - (dtucker) OpenBSD CVS Sync + - dtucker@cvs.openbsd.org 2013/06/02 13:33:05 + [progressmeter.c] + Add misc.h for monotime prototype. (ID sync only). + - dtucker@cvs.openbsd.org 2013/06/02 13:35:58 + [ssh-agent.c] + Make parent_alive_interval time_t to avoid signed/unsigned comparison + - (dtucker) [configure.ac] sys/un.h needs sys/socket.h on some platforms + to prevent noise from configure. Patch from Nathan Osman. (bz#2114). + - (dtucker) [configure.ac] bz#2111: don't try to use lastlog on Android. + Patch from Nathan Osman. + - (tim) [configure.ac regress/Makefile] With rev 1.47 of test-exec.sh we + need a shell that can handle "[ file1 -nt file2 ]". Rather than keep + dealing with shell portability issues in regression tests, we let + configure find us a capable shell on those platforms with an old /bin/sh. + - (tim) [aclocal.m4] Enhance OSSH_CHECK_CFLAG_COMPILE to check stderr. + feedback and ok dtucker + - (tim) [regress/sftp-chroot.sh] skip if no sudo. ok dtucker + - (dtucker) [configure.ac] Some platforms need sys/types.h before sys/un.h. + - (dtucker) [configure.ac] Some other platforms need sys/types.h before + sys/socket.h. + +20130601 + - (dtucker) [configure.ac openbsd-compat/xcrypt.c] bz#2112: fall back to + using openssl's DES_crypt function on platorms that don't have a native + one, eg Android. Based on a patch from Nathan Osman. + - (dtucker) [configure.ac defines.h] Test for fd_mask, howmany and NFDBITS + rather than trying to enumerate the plaforms that don't have them. + Based on a patch from Nathan Osman, with help from tim@. + - (dtucker) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2013/05/17 00:13:13 + [xmalloc.h cipher.c sftp-glob.c ssh-keyscan.c ssh.c sftp-common.c + ssh-ecdsa.c auth2-chall.c compat.c readconf.c kexgexs.c monitor.c + gss-genr.c cipher-3des1.c kex.c monitor_wrap.c ssh-pkcs11-client.c + auth-options.c rsa.c auth2-pubkey.c sftp.c hostfile.c auth2.c + servconf.c auth.c authfile.c xmalloc.c uuencode.c sftp-client.c + auth2-gss.c sftp-server.c bufaux.c mac.c session.c jpake.c kexgexc.c + sshconnect.c auth-chall.c auth2-passwd.c sshconnect1.c buffer.c + kexecdhs.c kexdhs.c ssh-rsa.c auth1.c ssh-pkcs11.c auth2-kbdint.c + kexdhc.c sshd.c umac.c ssh-dss.c auth2-jpake.c bufbn.c clientloop.c + monitor_mm.c scp.c roaming_client.c serverloop.c key.c auth-rsa.c + ssh-pkcs11-helper.c ssh-keysign.c ssh-keygen.c match.c channels.c + sshconnect2.c addrmatch.c mux.c canohost.c kexecdhc.c schnorr.c + ssh-add.c misc.c auth2-hostbased.c ssh-agent.c bufec.c groupaccess.c + dns.c packet.c readpass.c authfd.c moduli.c] + bye, bye xfree(); ok markus@ + - djm@cvs.openbsd.org 2013/05/19 02:38:28 + [auth2-pubkey.c] + fix failure to recognise cert-authority keys if a key of a different type + appeared in authorized_keys before it; ok markus@ + - djm@cvs.openbsd.org 2013/05/19 02:42:42 + [auth.h auth.c key.c monitor.c auth-rsa.c auth2.c auth1.c key.h] + Standardise logging of supplemental information during userauth. Keys + and ruser is now logged in the auth success/failure message alongside + the local username, remote host/port and protocol in use. Certificates + contents and CA are logged too. + Pushing all logging onto a single line simplifies log analysis as it is + no longer necessary to relate information scattered across multiple log + entries. "I like it" markus@ + - dtucker@cvs.openbsd.org 2013/05/31 12:28:10 + [ssh-agent.c] + Use time_t where appropriate. ok djm + - dtucker@cvs.openbsd.org 2013/06/01 13:15:52 + [ssh-agent.c clientloop.c misc.h packet.c progressmeter.c misc.c + channels.c sandbox-systrace.c] + Use clock_gettime(CLOCK_MONOTONIC ...) for ssh timers so that things like + keepalives and rekeying will work properly over clock steps. Suggested by + markus@, "looks good" djm@. + - dtucker@cvs.openbsd.org 2013/06/01 20:59:25 + [scp.c sftp-client.c] + Replace S_IWRITE, which isn't standardized, with S_IWUSR, which is. Patch + from Nathan Osman via bz#2085. ok deraadt. + - dtucker@cvs.openbsd.org 2013/06/01 22:34:50 + [sftp-client.c] + Update progressmeter when data is acked, not when it's sent. bz#2108, from + Debian via Colin Watson, ok djm@ + - (dtucker) [M auth-chall.c auth-krb5.c auth-pam.c cipher-aes.c cipher-ctr.c + groupaccess.c loginrec.c monitor.c monitor_wrap.c session.c sshd.c + sshlogin.c uidswap.c openbsd-compat/bsd-cygwin_util.c + openbsd-compat/getrrsetbyname-ldns.c openbsd-compat/port-aix.c + openbsd-compat/port-linux.c] Replace portable-specific instances of xfree + with the equivalent calls to free. + - (dtucker) [configure.ac misc.c] Look for clock_gettime in librt and fall + back to time(NULL) if we can't find it anywhere. + - (dtucker) [sandbox-seccomp-filter.c] Allow clock_gettimeofday. + +20130529 + - (dtucker) [configure.ac openbsd-compat/bsd-misc.h] bz#2087: Add a null + implementation of endgrent for platforms that don't have it (eg Android). + Loosely based on a patch from Nathan Osman, ok djm + + 20130517 + - (dtucker) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2013/03/07 00:20:34 + [regress/proxy-connect.sh] + repeat test with a style appended to the username + - dtucker@cvs.openbsd.org 2013/03/23 11:09:43 + [regress/test-exec.sh] + Only regenerate host keys if they don't exist or if ssh-keygen has changed + since they were. Reduces test runtime by 5-30% depending on machine + speed. + - dtucker@cvs.openbsd.org 2013/04/06 06:00:22 + [regress/rekey.sh regress/test-exec.sh regress/integrity.sh + regress/multiplex.sh Makefile regress/cfgmatch.sh] + Split the regress log into 3 parts: the debug output from ssh, the debug + log from sshd and the output from the client command (ssh, scp or sftp). + Somewhat functional now, will become more useful when ssh/sshd -E is added. + - dtucker@cvs.openbsd.org 2013/04/07 02:16:03 + [regress/Makefile regress/rekey.sh regress/integrity.sh + regress/sshd-log-wrapper.sh regress/forwarding.sh regress/test-exec.sh] + use -E option for ssh and sshd to write debuging logs to ssh{,d}.log and + save the output from any failing tests. If a test fails the debug output + from ssh and sshd for the failing tests (and only the failing tests) should + be available in failed-ssh{,d}.log. + - djm@cvs.openbsd.org 2013/04/18 02:46:12 + [regress/Makefile regress/sftp-chroot.sh] + test sshd ChrootDirectory+internal-sftp; feedback & ok dtucker@ + - dtucker@cvs.openbsd.org 2013/04/22 07:23:08 + [regress/multiplex.sh] + Write mux master logs to regress.log instead of ssh.log to keep separate + - djm@cvs.openbsd.org 2013/05/10 03:46:14 + [regress/modpipe.c] + sync some portability changes from portable OpenSSH (id sync only) + - dtucker@cvs.openbsd.org 2013/05/16 02:10:35 + [regress/rekey.sh] + Add test for time-based rekeying + - dtucker@cvs.openbsd.org 2013/05/16 03:33:30 + [regress/rekey.sh] + test rekeying when there's no data being transferred + - dtucker@cvs.openbsd.org 2013/05/16 04:26:10 + [regress/rekey.sh] + add server-side rekey test + - dtucker@cvs.openbsd.org 2013/05/16 05:48:31 + [regress/rekey.sh] + add tests for RekeyLimit parsing + - dtucker@cvs.openbsd.org 2013/05/17 00:37:40 + [regress/agent.sh regress/keytype.sh regress/cfgmatch.sh + regress/forcecommand.sh regress/proto-version.sh regress/test-exec.sh + regress/cipher-speed.sh regress/cert-hostkey.sh regress/cert-userkey.sh + regress/ssh-com.sh] + replace 'echo -n' with 'printf' since it's more portable + also remove "echon" hack. + - dtucker@cvs.openbsd.org 2013/05/17 01:16:09 + [regress/agent-timeout.sh] + Pull back some portability changes from -portable: + - TIMEOUT is a read-only variable in some shells + - not all greps have -q so redirect to /dev/null instead. + (ID sync only) + - dtucker@cvs.openbsd.org 2013/05/17 01:32:11 + [regress/integrity.sh] + don't print output from ssh before getting it (it's available in ssh.log) + - dtucker@cvs.openbsd.org 2013/05/17 04:29:14 + [regress/sftp.sh regress/putty-ciphers.sh regress/cipher-speed.sh + regress/test-exec.sh regress/sftp-batch.sh regress/dynamic-forward.sh + regress/putty-transfer.sh regress/conch-ciphers.sh regress/sftp-cmds.sh + regress/scp.sh regress/ssh-com-sftp.sh regress/rekey.sh + regress/putty-kex.sh regress/stderr-data.sh regress/stderr-after-eof.sh + regress/sftp-badcmds.sh regress/reexec.sh regress/ssh-com-client.sh + regress/sftp-chroot.sh regress/forwarding.sh regress/transfer.sh + regress/multiplex.sh] + Move the setting of DATA and COPY into test-exec.sh + - dtucker@cvs.openbsd.org 2013/05/17 10:16:26 + [regress/try-ciphers.sh] + use expr for math to keep diffs vs portable down + (id sync only) + - dtucker@cvs.openbsd.org 2013/05/17 10:23:52 + [regress/login-timeout.sh regress/reexec.sh regress/test-exec.sh] + Use SUDO when cat'ing pid files and running the sshd log wrapper so that + it works with a restrictive umask and the pid files are not world readable. + Changes from -portable. (id sync only) + - dtucker@cvs.openbsd.org 2013/05/17 10:24:48 + [regress/localcommand.sh] + use backticks for portability. (id sync only) + - dtucker@cvs.openbsd.org 2013/05/17 10:26:26 + [regress/sftp-badcmds.sh] + remove unused BATCH variable. (id sync only) + - dtucker@cvs.openbsd.org 2013/05/17 10:28:11 + [regress/sftp.sh] + only compare copied data if sftp succeeds. from portable (id sync only) + - dtucker@cvs.openbsd.org 2013/05/17 10:30:07 + [regress/test-exec.sh] + wait a bit longer for startup and use case for absolute path. + from portable (id sync only) + - dtucker@cvs.openbsd.org 2013/05/17 10:33:09 + [regress/agent-getpeereid.sh] + don't redirect stdout from sudo. from portable (id sync only) + - dtucker@cvs.openbsd.org 2013/05/17 10:34:30 + [regress/portnum.sh] + use a more portable negated if structure. from portable (id sync only) + - dtucker@cvs.openbsd.org 2013/05/17 10:35:43 + [regress/scp.sh] + use a file extention that's not special on some platforms. from portable + (id sync only) + - (dtucker) [regress/bsd.regress.mk] Remove unused file. We've never used it + in portable and it's long gone in openbsd. + - (dtucker) [regress/integrity.sh]. Force fixed Diffie-Hellman key exchange + methods. When the openssl version doesn't support ECDH then next one on + the list is DH group exchange, but that causes a bit more traffic which can + mean that the tests flip bits in the initial exchange rather than the MACed + traffic and we get different errors to what the tests look for. + - (dtucker) [openbsd-compat/getopt.h] Remove unneeded bits. + - (dtucker) [regress/cfgmatch.sh] Resync config file setup with openbsd. + - (dtucker) [regress/agent-getpeereid.sh] Resync spaces with openbsd. + - (dtucker) [regress/integrity.sh regress/krl.sh regress/test-exec.sh] + Move the jot helper function to portable-specific part of test-exec.sh. + - (dtucker) [regress/test-exec.sh] Move the portable-specific functions + together and add a couple of missing lines from openbsd. + - (dtucker) [regress/stderr-after-eof.sh regress/test-exec.sh] Move the md5 + helper function to the portable part of test-exec.sh. + - (dtucker) [regress/runtests.sh] Remove obsolete test driver script. + - (dtucker) [regress/cfgmatch.sh] Remove unneeded sleep renderd obsolete by + rev 1.6 which calls wait. + 20130516 - - (djm) [contrib/ssh-copy-id] Fix bug that could cause "rm *" to be - executed if mktemp failed; bz#2105 ok dtucker@ - - (djm) Release 6.2p2 + - (djm) [contrib/ssh-copy-id] Fix bug that could cause "rm *" to be + executed if mktemp failed; bz#2105 ok dtucker@ + - (dtucker) OpenBSD CVS Sync + - tedu@cvs.openbsd.org 2013/04/23 17:49:45 + [misc.c] + use xasprintf instead of a series of strlcats and strdup. ok djm + - tedu@cvs.openbsd.org 2013/04/24 16:01:46 + [misc.c] + remove extra parens noticed by nicm + - dtucker@cvs.openbsd.org 2013/05/06 07:35:12 + [sftp-server.8] + Reference the version of the sftp draft we actually implement. ok djm@ + - djm@cvs.openbsd.org 2013/05/10 03:40:07 + [sshconnect2.c] + fix bzero(ptr_to_struct, sizeof(ptr_to_struct)); bz#2100 from + Colin Watson + - djm@cvs.openbsd.org 2013/05/10 04:08:01 + [key.c] + memleak in cert_free(), wasn't actually freeing the struct; + bz#2096 from shm AT digitalsun.pl + - dtucker@cvs.openbsd.org 2013/05/10 10:13:50 + [ssh-pkcs11-helper.c] + remove unused extern optarg. ok markus@ + - dtucker@cvs.openbsd.org 2013/05/16 02:00:34 + [ssh_config sshconnect2.c packet.c readconf.h readconf.c clientloop.c + ssh_config.5 packet.h] + Add an optional second argument to RekeyLimit in the client to allow + rekeying based on elapsed time in addition to amount of traffic. + with djm@ jmc@, ok djm + - dtucker@cvs.openbsd.org 2013/05/16 04:09:14 + [sshd_config.5 servconf.c servconf.h packet.c serverloop.c monitor.c sshd_config + sshd.c] Add RekeyLimit to sshd with the same syntax as the client allowing + rekeying based on traffic volume or time. ok djm@, help & ok jmc@ for the man + page. + - djm@cvs.openbsd.org 2013/05/16 04:27:50 + [ssh_config.5 readconf.h readconf.c] + add the ability to ignore specific unrecognised ssh_config options; + bz#866; ok markus@ + - jmc@cvs.openbsd.org 2013/05/16 06:28:45 + [ssh_config.5] + put IgnoreUnknown in the right place; + - jmc@cvs.openbsd.org 2013/05/16 06:30:06 + [sshd_config.5] + oops! avoid Xr to self; + - dtucker@cvs.openbsd.org 2013/05/16 09:08:41 + [log.c scp.c sshd.c serverloop.c schnorr.c sftp.c] + Fix some "unused result" warnings found via clang and -portable. + ok markus@ + - dtucker@cvs.openbsd.org 2013/05/16 09:12:31 + [readconf.c servconf.c] + switch RekeyLimit traffic volume parsing to scan_scaled. ok djm@ + - dtucker@cvs.openbsd.org 2013/05/16 10:43:34 + [servconf.c readconf.c] + remove now-unused variables + - dtucker@cvs.openbsd.org 2013/05/16 10:44:06 + [servconf.c] + remove another now-unused variable + - (dtucker) [configure.ac readconf.c servconf.c + openbsd-compat/openbsd-compat.h] Add compat bits for scan_scaled. 20130510 - - (djm) OpenBSD CVS Cherrypick + - (dtucker) [configure.ac] Enable -Wsizeof-pointer-memaccess if the compiler + supports it. Mentioned by Colin Watson in bz#2100, ok djm. + - (dtucker) [openbsd-compat/getopt.c] Factor out portibility changes to + getopt.c. Preprocessed source is identical other than line numbers. + - (dtucker) [openbsd-compat/getopt_long.c] Import from OpenBSD. No + portability changes yet. + - (dtucker) [openbsd-compat/Makefile.in openbsd-compat/getopt.c + openbsd-compat/getopt_long.c regress/modpipe.c] Remove getopt.c, add + portability code to getopt_long.c and switch over Makefile and the ugly + hack in modpipe.c. Fixes bz#1448. + - (dtucker) [openbsd-compat/getopt.h openbsd-compat/getopt_long.c + openbsd-compat/openbsd-compat.h] pull in getopt.h from openbsd and plumb + in to use it when we're using our own getopt. + - (dtucker) [kex.c] Only include sha256 and ECC key exchange methods when the + underlying libraries support them. + - (dtucker) [configure.ac] Add -Werror to the -Qunused-arguments test so + we don't get a warning on compilers that *don't* support it. Add + -Wno-unknown-warning-option. Move both to the start of the list for + maximum noise suppression. Tested with gcc 4.6.3, gcc 2.95.4 and clang 2.9. + +20130423 + - (djm) [auth.c configure.ac misc.c monitor.c monitor_wrap.c] Support + platforms, such as Android, that lack struct passwd.pw_gecos. Report + and initial patch from Nathan Osman bz#2086; feedback tim@ ok dtucker@ + - (djm) OpenBSD CVS Sync + - markus@cvs.openbsd.org 2013/03/05 20:16:09 + [sshconnect2.c] + reset pubkey order on partial success; ok djm@ + - djm@cvs.openbsd.org 2013/03/06 23:35:23 + [session.c] + fatal() when ChrootDirectory specified by running without root privileges; + ok markus@ + - djm@cvs.openbsd.org 2013/03/06 23:36:53 + [readconf.c] + g/c unused variable (-Wunused) + - djm@cvs.openbsd.org 2013/03/07 00:19:59 + [auth2-pubkey.c monitor.c] + reconstruct the original username that was sent by the client, which may + have included a style (e.g. "root:skey") when checking public key + signatures. Fixes public key and hostbased auth when the client specified + a style; ok markus@ + - markus@cvs.openbsd.org 2013/03/07 19:27:25 + [auth.h auth2-chall.c auth2.c monitor.c sshd_config.5] + add submethod support to AuthenticationMethods; ok and freedback djm@ + - djm@cvs.openbsd.org 2013/03/08 06:32:58 + [ssh.c] + allow "ssh -f none ..." ok markus@ + - djm@cvs.openbsd.org 2013/04/05 00:14:00 + [auth2-gss.c krl.c sshconnect2.c] + hush some {unused, printf type} warnings + - djm@cvs.openbsd.org 2013/04/05 00:31:49 + [pathnames.h] + use the existing _PATH_SSH_USER_RC define to construct the other + pathnames; bz#2077, ok dtucker@ (no binary change) + - djm@cvs.openbsd.org 2013/04/05 00:58:51 + [mux.c] + cleanup mux-created channels that are in SSH_CHANNEL_OPENING state too + (in addition to ones already in OPEN); bz#2079, ok dtucker@ + - markus@cvs.openbsd.org 2013/04/06 16:07:00 + [channels.c sshd.c] + handle ECONNABORTED for accept(); ok deraadt some time ago... + - dtucker@cvs.openbsd.org 2013/04/07 02:10:33 + [log.c log.h ssh.1 ssh.c sshd.8 sshd.c] + Add -E option to ssh and sshd to append debugging logs to a specified file + instead of stderr or syslog. ok markus@, man page help jmc@ + - dtucker@cvs.openbsd.org 2013/04/07 09:40:27 + [sshd.8] + clarify -e text. suggested by & ok jmc@ - djm@cvs.openbsd.org 2013/04/11 02:27:50 [packet.c] quiet disconnect notifications on the server from error() back to logit() if it is a normal client closure; bz#2057 ok+feedback dtucker@ - - (djm) [version.h contrib/caldera/openssh.spec contrib/redhat/openssh.spec] - [contrib/suse/openssh.spec] Crank version numbers for release. - - (djm) [README] Update release notes URL + - dtucker@cvs.openbsd.org 2013/04/17 09:04:09 + [session.c] + revert rev 1.262; it fails because uid is already set here. ok djm@ + - djm@cvs.openbsd.org 2013/04/18 02:16:07 + [sftp.c] + make "sftp -q" do what it says on the sticker: hush everything but errors; + ok dtucker@ + - djm@cvs.openbsd.org 2013/04/19 01:00:10 + [sshd_config.5] + document the requirment that the AuthorizedKeysCommand be owned by root; + ok dtucker@ markus@ + - djm@cvs.openbsd.org 2013/04/19 01:01:00 + [ssh-keygen.c] + fix some memory leaks; bz#2088 ok dtucker@ + - djm@cvs.openbsd.org 2013/04/19 01:03:01 + [session.c] + reintroduce 1.262 without the connection-killing bug: + fatal() when ChrootDirectory specified by running without root privileges; + ok markus@ + - djm@cvs.openbsd.org 2013/04/19 01:06:50 + [authfile.c cipher.c cipher.h kex.c kex.h kexecdh.c kexecdhc.c kexecdhs.c] + [key.c key.h mac.c mac.h packet.c ssh.1 ssh.c] + add the ability to query supported ciphers, MACs, key type and KEX + algorithms to ssh. Includes some refactoring of KEX and key type handling + to be table-driven; ok markus@ + - djm@cvs.openbsd.org 2013/04/19 11:10:18 + [ssh.c] + add -Q to usage; reminded by jmc@ + - djm@cvs.openbsd.org 2013/04/19 12:07:08 + [kex.c] + remove duplicated list entry pointed out by naddy@ + - dtucker@cvs.openbsd.org 2013/04/22 01:17:18 + [mux.c] + typo in debug output: evitval->exitval + +20130418 + - (djm) [config.guess config.sub] Update to last versions before they switch + to GPL3. ok dtucker@ + - (dtucker) [configure.ac] Use -Qunused-arguments to suppress warnings from + unused argument warnings (in particular, -fno-builtin-memset) from clang. 20130404 - (dtucker) OpenBSD CVS Sync @@ -40,10 +651,16 @@ to avoid conflicting definitions of __int64, adding the required bits. Patch from Corinna Vinschen. +20120323 + - (tim) [Makefile.in] remove some duplication introduced in 20130220 commit. + 20120322 - (djm) [contrib/ssh-copy-id contrib/ssh-copy-id.1] Updated to Phil Hands' greatly revised version. - (djm) Release 6.2p1 + - (dtucker) [configure.ac] Add stdlib.h to zlib check for exit() prototype. + - (dtucker) [includes.h] Check if _GNU_SOURCE is already defined before + defining it again. Prevents warnings if someone, eg, sets it in CFLAGS. 20120318 - (djm) [configure.ac log.c scp.c sshconnect2.c openbsd-compat/vis.c] Modified: vendor-crypto/openssh/dist/Makefile.in ============================================================================== --- vendor-crypto/openssh/dist/Makefile.in Wed Sep 18 17:18:19 2013 (r255669) +++ vendor-crypto/openssh/dist/Makefile.in Wed Sep 18 17:27:38 2013 (r255670) @@ -1,4 +1,4 @@ -# $Id: Makefile.in,v 1.336 2013/03/07 15:37:13 tim Exp $ +# $Id: Makefile.in,v 1.340 2013/06/11 01:26:10 dtucker Exp $ # uncomment if you run a non bourne compatable shell. Ie. csh #SHELL = @SH@ @@ -121,6 +121,8 @@ PATHSUBS = \ -e 's|/usr/bin:/bin:/usr/sbin:/sbin|@user_path@|g' FIXPATHSCMD = $(SED) $(PATHSUBS) +FIXALGORITHMSCMD= $(SHELL) $(srcdir)/fixalgorithms $(SED) \ + @UNSUPPORTED_ALGORITHMS@ all: $(CONFIGFILES) $(MANPAGES) $(TARGETS) @@ -184,9 +186,10 @@ $(MANPAGES): $(MANPAGES_IN) manpage=$(srcdir)/`echo $@ | sed 's/\.out$$//'`; \ fi; \ if test "$(MANTYPE)" = "man"; then \ - $(FIXPATHSCMD) $${manpage} | $(AWK) -f $(srcdir)/mdoc2man.awk > $@; \ + $(FIXPATHSCMD) $${manpage} | $(FIXALGORITHMSCMD) | \ + $(AWK) -f $(srcdir)/mdoc2man.awk > $@; \ else \ - $(FIXPATHSCMD) $${manpage} > $@; \ + $(FIXPATHSCMD) $${manpage} | $(FIXALGORITHMSCMD) > $@; \ fi $(CONFIGFILES): $(CONFIGFILES_IN) @@ -382,15 +385,14 @@ uninstall: -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1 regress/modpipe$(EXEEXT): $(srcdir)/regress/modpipe.c - [ -d `pwd`/regress ] || mkdir -p `pwd`/regress; \ - $(CC) $(CPPFLAGS) -o $@ $? \ - $(LDFLAGS) -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS) + [ -d `pwd`/regress ] || mkdir -p `pwd`/regress + [ -f `pwd`/regress/Makefile ] || \ + ln -s `cd $(srcdir) && pwd`/regress/Makefile `pwd`/regress/Makefile + $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $? \ + $(LDFLAGS) -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS) tests interop-tests: $(TARGETS) regress/modpipe$(EXEEXT) BUILDDIR=`pwd`; \ - [ -d `pwd`/regress ] || mkdir -p `pwd`/regress; \ - [ -f `pwd`/regress/Makefile ] || \ - ln -s `cd $(srcdir) && pwd`/regress/Makefile `pwd`/regress/Makefile ; \ TEST_SHELL="@TEST_SHELL@"; \ TEST_SSH_SSH="$${BUILDDIR}/ssh"; \ TEST_SSH_SSHD="$${BUILDDIR}/sshd"; \ Modified: vendor-crypto/openssh/dist/README ============================================================================== --- vendor-crypto/openssh/dist/README Wed Sep 18 17:18:19 2013 (r255669) +++ vendor-crypto/openssh/dist/README Wed Sep 18 17:27:38 2013 (r255670) @@ -1,4 +1,4 @@ -See http://www.openssh.com/txt/release-6.2p2 for the release notes. +See http://www.openssh.com/txt/release-6.3 for the release notes. - A Japanese translation of this document and of the OpenSSH FAQ is - available at http://www.unixuser.org/~haruyama/security/openssh/index.html @@ -62,4 +62,4 @@ References - [6] http://www.openbsd.org/cgi-bin/man.cgi?query=style&sektion=9 [7] http://www.openssh.com/faq.html -$Id: README,v 1.82.2.1 2013/05/10 06:12:54 djm Exp $ +$Id: README,v 1.83 2013/07/25 02:34:00 djm Exp $ Modified: vendor-crypto/openssh/dist/aclocal.m4 ============================================================================== --- vendor-crypto/openssh/dist/aclocal.m4 Wed Sep 18 17:18:19 2013 (r255669) +++ vendor-crypto/openssh/dist/aclocal.m4 Wed Sep 18 17:27:38 2013 (r255670) @@ -1,4 +1,4 @@ -dnl $Id: aclocal.m4,v 1.8 2011/05/20 01:45:25 djm Exp $ +dnl $Id: aclocal.m4,v 1.9 2013/06/02 21:31:27 tim Exp $ dnl dnl OpenSSH-specific autoconf macros dnl @@ -14,8 +14,15 @@ AC_DEFUN([OSSH_CHECK_CFLAG_COMPILE], [{ _define_flag="$2" test "x$_define_flag" = "x" && _define_flag="$1" AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int main(void) { return 0; }]])], - [ AC_MSG_RESULT([yes]) - CFLAGS="$saved_CFLAGS $_define_flag"], + [ +if `grep -i "unrecognized option" conftest.err >/dev/null` +then + AC_MSG_RESULT([no]) + CFLAGS="$saved_CFLAGS" +else + AC_MSG_RESULT([yes]) + CFLAGS="$saved_CFLAGS $_define_flag" +fi], [ AC_MSG_RESULT([no]) CFLAGS="$saved_CFLAGS" ] ) Modified: vendor-crypto/openssh/dist/addrmatch.c ============================================================================== --- vendor-crypto/openssh/dist/addrmatch.c Wed Sep 18 17:18:19 2013 (r255669) +++ vendor-crypto/openssh/dist/addrmatch.c Wed Sep 18 17:27:38 2013 (r255670) @@ -1,4 +1,4 @@ -/* $OpenBSD: addrmatch.c,v 1.6 2012/06/21 00:16:07 dtucker Exp $ */ +/* $OpenBSD: addrmatch.c,v 1.7 2013/05/17 00:13:13 djm Exp $ */ /* * Copyright (c) 2004-2008 Damien Miller @@ -420,7 +420,7 @@ addr_match_list(const char *addr, const goto foundit; } } - xfree(o); + free(o); return ret; } @@ -494,7 +494,7 @@ addr_match_cidr_list(const char *addr, c continue; } } - xfree(o); + free(o); return ret; } Modified: vendor-crypto/openssh/dist/auth-chall.c ============================================================================== --- vendor-crypto/openssh/dist/auth-chall.c Wed Sep 18 17:18:19 2013 (r255669) +++ vendor-crypto/openssh/dist/auth-chall.c Wed Sep 18 17:27:38 2013 (r255670) @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-chall.c,v 1.12 2006/08/03 03:34:41 deraadt Exp $ */ +/* $OpenBSD: auth-chall.c,v 1.13 2013/05/17 00:13:13 djm Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -69,11 +69,11 @@ get_challenge(Authctxt *authctxt) fatal("get_challenge: numprompts < 1"); challenge = xstrdup(prompts[0]); for (i = 0; i < numprompts; i++) - xfree(prompts[i]); - xfree(prompts); - xfree(name); - xfree(echo_on); - xfree(info); + free(prompts[i]); + free(prompts); + free(name); + free(echo_on); + free(info); return (challenge); } @@ -102,11 +102,11 @@ verify_response(Authctxt *authctxt, cons authenticated = 1; for (i = 0; i < numprompts; i++) - xfree(prompts[i]); - xfree(prompts); - xfree(name); - xfree(echo_on); - xfree(info); + free(prompts[i]); + free(prompts); + free(name); + free(echo_on); + free(info); break; } device->free_ctx(authctxt->kbdintctxt); Modified: vendor-crypto/openssh/dist/auth-krb5.c ============================================================================== --- vendor-crypto/openssh/dist/auth-krb5.c Wed Sep 18 17:18:19 2013 (r255669) +++ vendor-crypto/openssh/dist/auth-krb5.c Wed Sep 18 17:27:38 2013 (r255670) @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-krb5.c,v 1.19 2006/08/03 03:34:41 deraadt Exp $ */ +/* $OpenBSD: auth-krb5.c,v 1.20 2013/07/20 01:55:13 djm Exp $ */ /* * Kerberos v5 authentication and ticket-passing routines. * @@ -79,6 +79,7 @@ auth_krb5_password(Authctxt *authctxt, c krb5_ccache ccache = NULL; int len; char *client, *platform_client; + const char *errmsg; /* get platform-specific kerberos client principal name (if it exists) */ platform_client = platform_krb5_get_principal_name(authctxt->pw->pw_name); @@ -96,7 +97,12 @@ auth_krb5_password(Authctxt *authctxt, c goto out; #ifdef HEIMDAL +# ifdef HAVE_KRB5_CC_NEW_UNIQUE + problem = krb5_cc_new_unique(authctxt->krb5_ctx, + krb5_mcc_ops.prefix, NULL, &ccache); +# else problem = krb5_cc_gen_new(authctxt->krb5_ctx, &krb5_mcc_ops, &ccache); +# endif if (problem) goto out; @@ -115,8 +121,13 @@ auth_krb5_password(Authctxt *authctxt, c if (problem) goto out; +# ifdef HAVE_KRB5_CC_NEW_UNIQUE + problem = krb5_cc_new_unique(authctxt->krb5_ctx, + krb5_fcc_ops.prefix, NULL, &authctxt->krb5_fwd_ccache); +# else problem = krb5_cc_gen_new(authctxt->krb5_ctx, &krb5_fcc_ops, &authctxt->krb5_fwd_ccache); +# endif if (problem) goto out; @@ -181,17 +192,19 @@ auth_krb5_password(Authctxt *authctxt, c out: restore_uid(); - if (platform_client != NULL) - xfree(platform_client); + free(platform_client); if (problem) { if (ccache) krb5_cc_destroy(authctxt->krb5_ctx, ccache); - if (authctxt->krb5_ctx != NULL && problem!=-1) - debug("Kerberos password authentication failed: %s", - krb5_get_err_text(authctxt->krb5_ctx, problem)); - else + if (authctxt->krb5_ctx != NULL && problem!=-1) { + errmsg = krb5_get_error_message(authctxt->krb5_ctx, + problem); + debug("Kerberos password authentication failed: %s", + errmsg); + krb5_free_error_message(authctxt->krb5_ctx, errmsg); + } else debug("Kerberos password authentication failed: %d", problem); Modified: vendor-crypto/openssh/dist/auth-options.c ============================================================================== --- vendor-crypto/openssh/dist/auth-options.c Wed Sep 18 17:18:19 2013 (r255669) +++ vendor-crypto/openssh/dist/auth-options.c Wed Sep 18 17:27:38 2013 (r255670) @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-options.c,v 1.57 2012/12/02 20:46:11 djm Exp $ */ +/* $OpenBSD: auth-options.c,v 1.59 2013/07/12 00:19:58 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -72,15 +72,15 @@ auth_clear_options(void) while (custom_environment) { struct envstring *ce = custom_environment; custom_environment = ce->next; - xfree(ce->s); - xfree(ce); + free(ce->s); + free(ce); } if (forced_command) { - xfree(forced_command); + free(forced_command); forced_command = NULL; } if (authorized_principals) { - xfree(authorized_principals); + free(authorized_principals); authorized_principals = NULL; } forced_tun_device = -1; @@ -149,7 +149,7 @@ auth_parse_options(struct passwd *pw, ch if (strncasecmp(opts, cp, strlen(cp)) == 0) { opts += strlen(cp); if (forced_command != NULL) - xfree(forced_command); + free(forced_command); forced_command = xmalloc(strlen(opts) + 1); i = 0; while (*opts) { @@ -167,7 +167,7 @@ auth_parse_options(struct passwd *pw, ch file, linenum); auth_debug_add("%.100s, line %lu: missing end quote", file, linenum); - xfree(forced_command); + free(forced_command); forced_command = NULL; goto bad_option; } @@ -180,7 +180,7 @@ auth_parse_options(struct passwd *pw, ch if (strncasecmp(opts, cp, strlen(cp)) == 0) { opts += strlen(cp); if (authorized_principals != NULL) - xfree(authorized_principals); + free(authorized_principals); authorized_principals = xmalloc(strlen(opts) + 1); i = 0; while (*opts) { @@ -198,7 +198,7 @@ auth_parse_options(struct passwd *pw, ch file, linenum); auth_debug_add("%.100s, line %lu: missing end quote", file, linenum); - xfree(authorized_principals); + free(authorized_principals); authorized_principals = NULL; goto bad_option; } @@ -232,7 +232,7 @@ auth_parse_options(struct passwd *pw, ch file, linenum); auth_debug_add("%.100s, line %lu: missing end quote", file, linenum); - xfree(s); + free(s); goto bad_option; } s[i] = '\0'; @@ -269,7 +269,7 @@ auth_parse_options(struct passwd *pw, ch file, linenum); auth_debug_add("%.100s, line %lu: missing end quote", file, linenum); - xfree(patterns); + free(patterns); goto bad_option; } patterns[i] = '\0'; @@ -277,7 +277,7 @@ auth_parse_options(struct passwd *pw, ch switch (match_host_and_ip(remote_host, remote_ip, patterns)) { case 1: - xfree(patterns); + free(patterns); /* Host name matches. */ goto next_option; case -1: @@ -287,7 +287,7 @@ auth_parse_options(struct passwd *pw, ch "invalid criteria", file, linenum); /* FALLTHROUGH */ case 0: - xfree(patterns); + free(patterns); logit("Authentication tried for %.100s with " "correct key but not from a permitted " "host (host=%.200s, ip=%.200s).", @@ -323,7 +323,7 @@ auth_parse_options(struct passwd *pw, ch file, linenum); auth_debug_add("%.100s, line %lu: missing " "end quote", file, linenum); - xfree(patterns); + free(patterns); goto bad_option; } patterns[i] = '\0'; @@ -337,7 +337,7 @@ auth_parse_options(struct passwd *pw, ch auth_debug_add("%.100s, line %lu: " "Bad permitopen specification", file, linenum); - xfree(patterns); + free(patterns); goto bad_option; } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Sep 18 17:28:20 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id F37D5597; Wed, 18 Sep 2013 17:28:19 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C6C3D2915; Wed, 18 Sep 2013 17:28:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8IHSJF3037926; Wed, 18 Sep 2013 17:28:19 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8IHSJkN037925; Wed, 18 Sep 2013 17:28:19 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309181728.r8IHSJkN037925@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Wed, 18 Sep 2013 17:28:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r255671 - vendor-crypto/openssh/6.3p1 X-SVN-Group: vendor-crypto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Sep 2013 17:28:20 -0000 Author: des Date: Wed Sep 18 17:28:19 2013 New Revision: 255671 URL: http://svnweb.freebsd.org/changeset/base/255671 Log: Tag OpenSSH 6.3p1 Added: vendor-crypto/openssh/6.3p1/ - copied from r255670, vendor-crypto/openssh/dist/ From owner-svn-src-all@FreeBSD.ORG Wed Sep 18 17:56:07 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 09AD0C03; Wed, 18 Sep 2013 17:56:07 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E983E2ABA; Wed, 18 Sep 2013 17:56:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8IHu6AM052896; Wed, 18 Sep 2013 17:56:06 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8IHu4qV052882; Wed, 18 Sep 2013 17:56:04 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <201309181756.r8IHu4qV052882@svn.freebsd.org> From: Roman Divacky Date: Wed, 18 Sep 2013 17:56:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255672 - in head/sys: amd64/linux32 compat/linux conf i386/linux kern modules/linux sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Sep 2013 17:56:07 -0000 Author: rdivacky Date: Wed Sep 18 17:56:04 2013 New Revision: 255672 URL: http://svnweb.freebsd.org/changeset/base/255672 Log: Implement epoll support in Linuxulator. This is a tiny wrapper around kqueue to implement epoll subset of functionality. The kqueue user data are 32bit on i386 which is not enough for epoll user data so this patch overrides kqueue fileops to maintain enough space in struct file. Initial patch developed by me in 2007 and then extended and finished by Yuri Victorovich. Approved by: re (delphij) Sponsored by: Google Summer of Code Submitted by: Yuri Victorovich Tested by: Yuri Victorovich Added: head/sys/compat/linux/linux_epoll.c (contents, props changed) head/sys/compat/linux/linux_epoll.h (contents, props changed) Modified: head/sys/amd64/linux32/linux32_dummy.c head/sys/amd64/linux32/syscalls.master head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/conf/files.pc98 head/sys/i386/linux/linux_dummy.c head/sys/i386/linux/syscalls.master head/sys/kern/kern_event.c head/sys/modules/linux/Makefile head/sys/sys/event.h head/sys/sys/file.h head/sys/sys/syscallsubr.h Modified: head/sys/amd64/linux32/linux32_dummy.c ============================================================================== --- head/sys/amd64/linux32/linux32_dummy.c Wed Sep 18 17:28:19 2013 (r255671) +++ head/sys/amd64/linux32/linux32_dummy.c Wed Sep 18 17:56:04 2013 (r255672) @@ -70,9 +70,6 @@ DUMMY(pivot_root); DUMMY(mincore); DUMMY(ptrace); DUMMY(lookup_dcookie); -DUMMY(epoll_create); -DUMMY(epoll_ctl); -DUMMY(epoll_wait); DUMMY(remap_file_pages); DUMMY(timer_create); DUMMY(timer_settime); @@ -129,7 +126,6 @@ DUMMY(timerfd_gettime); /* linux 2.6.27: */ DUMMY(signalfd4); DUMMY(eventfd2); -DUMMY(epoll_create1); DUMMY(dup3); DUMMY(inotify_init1); /* linux 2.6.30: */ Modified: head/sys/amd64/linux32/syscalls.master ============================================================================== --- head/sys/amd64/linux32/syscalls.master Wed Sep 18 17:28:19 2013 (r255671) +++ head/sys/amd64/linux32/syscalls.master Wed Sep 18 17:56:04 2013 (r255672) @@ -430,9 +430,11 @@ 251 AUE_NULL UNIMPL 252 AUE_EXIT STD { int linux_exit_group(int error_code); } 253 AUE_NULL STD { int linux_lookup_dcookie(void); } -254 AUE_NULL STD { int linux_epoll_create(void); } -255 AUE_NULL STD { int linux_epoll_ctl(void); } -256 AUE_NULL STD { int linux_epoll_wait(void); } +254 AUE_NULL STD { int linux_epoll_create(l_int size); } +255 AUE_NULL STD { int linux_epoll_ctl(l_int epfd, l_int op, l_int fd, \ + struct linux_epoll_event *event); } +256 AUE_NULL STD { int linux_epoll_wait(l_int epfd, struct linux_epoll_event *events, \ + l_int maxevents, l_int timeout); } 257 AUE_NULL STD { int linux_remap_file_pages(void); } 258 AUE_NULL STD { int linux_set_tid_address(int *tidptr); } 259 AUE_NULL STD { int linux_timer_create(void); } @@ -534,7 +536,7 @@ ; linux 2.6.27: 327 AUE_NULL STD { int linux_signalfd4(void); } 328 AUE_NULL STD { int linux_eventfd2(void); } -329 AUE_NULL STD { int linux_epoll_create1(void); } +329 AUE_NULL STD { int linux_epoll_create1(l_int flags); } 330 AUE_NULL STD { int linux_dup3(void); } 331 AUE_NULL STD { int linux_pipe2(l_int *pipefds, l_int flags); } 332 AUE_NULL STD { int linux_inotify_init1(void); } Added: head/sys/compat/linux/linux_epoll.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/linux/linux_epoll.c Wed Sep 18 17:56:04 2013 (r255672) @@ -0,0 +1,554 @@ +/*- + * Copyright (c) 2007 Roman Divacky + * 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 "opt_compat.h" +#include "opt_ktrace.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef KTRACE +#include +#endif + +#ifdef COMPAT_LINUX32 +#include +#include +#else +#include +#include +#endif + +#define ktrepoll_events(evt, count) \ + ktrstruct("linux_epoll_event", (evt), count * sizeof(*evt)) + +/* + * epoll defines 'struct epoll_event' with the field 'data' as 64 bits + * on all architectures. But on 32 bit architectures BSD 'struct kevent' only + * has 32 bit opaque pointer as 'udata' field. So we can't pass epoll supplied + * data verbatuim. Therefore on 32 bit architectures we allocate 64-bit memory + * block to pass user supplied data for every file descriptor. + */ +typedef uint64_t epoll_udata_t; +#if defined(__i386__) +#define EPOLL_WIDE_USER_DATA 1 +#else +#define EPOLL_WIDE_USER_DATA 0 +#endif + +#if EPOLL_WIDE_USER_DATA + +/* + * Approach similar to epoll_user_data could also be used to + * keep track of event bits per file descriptor for all architectures. + * However, it isn't obvious that such tracking would be beneficial + * in practice. + */ + +struct epoll_user_data { + unsigned sz; + epoll_udata_t data[1]; +}; +static MALLOC_DEFINE(M_LINUX_EPOLL, "epoll", "memory for epoll system"); +#define EPOLL_USER_DATA_SIZE(ndata) \ + (sizeof(struct epoll_user_data)+((ndata)-1)*sizeof(epoll_udata_t)) +#define EPOLL_USER_DATA_MARGIN 16 + +static void epoll_init_user_data(struct thread *td, struct file *epfp); +static void epoll_set_user_data(struct thread *td, struct file *epfp, int fd, epoll_udata_t user_data); +static epoll_udata_t epoll_get_user_data(struct thread *td, struct file *epfp, int fd); +static fo_close_t epoll_close; + +/* overload kqueue fileops */ +static struct fileops epollops = { + .fo_read = kqueue_read, + .fo_write = kqueue_write, + .fo_truncate = kqueue_truncate, + .fo_ioctl = kqueue_ioctl, + .fo_poll = kqueue_poll, + .fo_kqfilter = kqueue_kqfilter, + .fo_stat = kqueue_stat, + .fo_close = epoll_close, + .fo_chmod = invfo_chmod, + .fo_chown = invfo_chown, + .fo_sendfile = invfo_sendfile, +}; +#endif + +static struct file* epoll_fget(struct thread *td, int epfd); + +struct epoll_copyin_args { + struct kevent *changelist; +}; + +struct epoll_copyout_args { + struct linux_epoll_event *leventlist; + int count; + int error; +#if KTRACE || EPOLL_WIDE_USER_DATA + struct thread *td; +#endif +#if EPOLL_WIDE_USER_DATA + struct file *epfp; +#endif +}; + + +/* Create a new epoll file descriptor. */ + +static int +linux_epoll_create_common(struct thread *td) +{ + struct file *fp; + int error; + + error = kern_kqueue_locked(td, &fp); +#if EPOLL_WIDE_USER_DATA + if (error == 0) { + epoll_init_user_data(td, fp); + fdrop(fp, td); + } +#endif + return (error); +} + +int +linux_epoll_create(struct thread *td, struct linux_epoll_create_args *args) +{ + if (args->size <= 0) + return (EINVAL); + /* args->size is unused. Linux just tests it + * and then forgets it as well. */ + + return (linux_epoll_create_common(td)); +} + +int +linux_epoll_create1(struct thread *td, struct linux_epoll_create1_args *args) +{ + int error; + + error = linux_epoll_create_common(td); + + if (!error) { + if (args->flags & LINUX_EPOLL_CLOEXEC) + td->td_proc->p_fd->fd_ofiles[td->td_retval[0]].fde_flags |= UF_EXCLOSE; + if (args->flags & LINUX_EPOLL_NONBLOCK) + linux_msg(td, "epoll_create1 doesn't yet support EPOLL_NONBLOCK flag\n"); + } + + return (error); +} + +/* Structure converting function from epoll to kevent. */ +static int +linux_epoll_to_kevent(struct thread *td, +#if EPOLL_WIDE_USER_DATA + struct file *epfp, +#endif + int fd, struct linux_epoll_event *l_event, int kev_flags, struct kevent *kevent, int *nkevents) +{ + /* flags related to how event is registered */ + if (l_event->events & LINUX_EPOLLONESHOT) + kev_flags |= EV_ONESHOT; + if (l_event->events & LINUX_EPOLLET) { + kev_flags |= EV_CLEAR; + } + + /* flags related to what event is registered */ + if (l_event->events & LINUX_EPOLLIN || + l_event->events & LINUX_EPOLLRDNORM || + l_event->events & LINUX_EPOLLPRI || + l_event->events & LINUX_EPOLLRDHUP) { + EV_SET(kevent++, fd, EVFILT_READ, kev_flags, 0, 0, + (void*)(EPOLL_WIDE_USER_DATA ? 0 : l_event->data)); + ++*nkevents; + } + if (l_event->events & LINUX_EPOLLOUT || + l_event->events & LINUX_EPOLLWRNORM) { + EV_SET(kevent++, fd, EVFILT_WRITE, kev_flags, 0, 0, + (void*)(EPOLL_WIDE_USER_DATA ? 0 : l_event->data)); + ++*nkevents; + } + if (l_event->events & LINUX_EPOLLRDBAND || + l_event->events & LINUX_EPOLLWRBAND || + l_event->events & LINUX_EPOLLHUP || + l_event->events & LINUX_EPOLLMSG || + l_event->events & LINUX_EPOLLWAKEUP || + l_event->events & LINUX_EPOLLERR) { + linux_msg(td, "epoll_ctl doesn't yet support some event flags supplied: 0x%x\n", + l_event->events); + return (EINVAL); + } + +#if EPOLL_WIDE_USER_DATA + epoll_set_user_data(td, epfp, fd, l_event->data); +#endif + return (0); +} + +/* + * Structure converting function from kevent to epoll. In a case + * this is called on error in registration we store the error in + * event->data and pick it up later in linux_epoll_ctl(). + */ +static void +linux_kevent_to_epoll( +#if EPOLL_WIDE_USER_DATA + struct thread *td, struct file *epfp, +#endif + struct kevent *kevent, struct linux_epoll_event *l_event) +{ + if ((kevent->flags & EV_ERROR) == 0) + switch (kevent->filter) { + case EVFILT_READ: + l_event->events = LINUX_EPOLLIN|LINUX_EPOLLRDNORM|LINUX_EPOLLPRI; + break; + case EVFILT_WRITE: + l_event->events = LINUX_EPOLLOUT|LINUX_EPOLLWRNORM; + break; + } +#if EPOLL_WIDE_USER_DATA + l_event->data = epoll_get_user_data(td, epfp, kevent->ident); +#else + l_event->data = (epoll_udata_t)kevent->udata; +#endif +} + +/* + * Copyout callback used by kevent. This converts kevent + * events to epoll events and copies them back to the + * userspace. This is also called on error on registering + * of the filter. + */ +static int +epoll_kev_copyout(void *arg, struct kevent *kevp, int count) +{ + struct epoll_copyout_args *args; + struct linux_epoll_event *eep; + int error, i; + + args = (struct epoll_copyout_args*) arg; + eep = malloc(sizeof(*eep) * count, M_TEMP, M_WAITOK | M_ZERO); + + for (i = 0; i < count; i++) + linux_kevent_to_epoll( +#if EPOLL_WIDE_USER_DATA + args->td, args->epfp, +#endif + &kevp[i], &eep[i]); + + error = copyout(eep, args->leventlist, count * sizeof(*eep)); + if (!error) { + args->leventlist += count; + args->count += count; + } else if (!args->error) + args->error = error; + +#ifdef KTRACE + if (KTRPOINT(args->td, KTR_STRUCT)) + ktrepoll_events(eep, count); +#endif + + free(eep, M_TEMP); + return (error); +} + +/* + * Copyin callback used by kevent. This copies already + * converted filters from kernel memory to the kevent + * internal kernel memory. Hence the memcpy instead of + * copyin. + */ +static int +epoll_kev_copyin(void *arg, struct kevent *kevp, int count) +{ + struct epoll_copyin_args *args; + + args = (struct epoll_copyin_args*) arg; + + memcpy(kevp, args->changelist, count * sizeof(*kevp)); + args->changelist += count; + + return (0); +} + +static int +ignore_enoent(int error) { + if (error == ENOENT) + error = 0; + return (error); +} + +static int +delete_event(struct thread *td, struct file *epfp, int fd, int filter) +{ + struct epoll_copyin_args ciargs; + struct kevent kev; + struct kevent_copyops k_ops = { &ciargs, + NULL, + epoll_kev_copyin}; + ciargs.changelist = &kev; + + EV_SET(&kev, fd, filter, EV_DELETE | EV_DISABLE, 0, 0, 0); + return (kern_kevent_locked(td, epfp, 1, 0, &k_ops, NULL)); +} + +static int +delete_all_events(struct thread *td, struct file *epfp, int fd) +{ + /* here we ignore ENONT, because we don't keep track of events here */ + int error1, error2; + + error1 = ignore_enoent(delete_event(td, epfp, fd, EVFILT_READ)); + error2 = ignore_enoent(delete_event(td, epfp, fd, EVFILT_WRITE)); + + /* report any errors we got */ + if (error1) + return (error1); + if (error2) + return (error2); + return (0); +} + +/* + * Load epoll filter, convert it to kevent filter + * and load it into kevent subsystem. + */ +int +linux_epoll_ctl(struct thread *td, struct linux_epoll_ctl_args *args) +{ + struct file *epfp; + struct epoll_copyin_args ciargs; + struct kevent kev[2]; + struct kevent_copyops k_ops = { &ciargs, + NULL, + epoll_kev_copyin}; + struct linux_epoll_event le; + int kev_flags; + int nchanges = 0; + int error; + + if (args->epfd == args->fd) + return (EINVAL); + + if (args->op != LINUX_EPOLL_CTL_DEL) { + error = copyin(args->event, &le, sizeof(le)); + if (error) + return (error); + } +#ifdef DEBUG + if (ldebug(epoll_ctl)) + printf(ARGS(epoll_ctl,"%i, %i, %i, %u"), args->epfd, args->op, + args->fd, le.events); +#endif +#ifdef KTRACE + if (KTRPOINT(td, KTR_STRUCT) && args->op != LINUX_EPOLL_CTL_DEL) + ktrepoll_events(&le, 1); +#endif + epfp = epoll_fget(td, args->epfd); + + ciargs.changelist = kev; + + switch (args->op) { + case LINUX_EPOLL_CTL_MOD: + /* we don't memorize which events were set for this FD + on this level, so just delete all we could have set: + EVFILT_READ and EVFILT_WRITE, ignoring any errors + */ + error = delete_all_events(td, epfp, args->fd); + if (error) + goto leave; + /* FALLTHROUGH */ + case LINUX_EPOLL_CTL_ADD: + kev_flags = EV_ADD | EV_ENABLE; + break; + case LINUX_EPOLL_CTL_DEL: + /* CTL_DEL means unregister this fd with this epoll */ + error = delete_all_events(td, epfp, args->fd); + goto leave; + default: + error = EINVAL; + goto leave; + } + + error = linux_epoll_to_kevent(td, +#if EPOLL_WIDE_USER_DATA + epfp, +#endif + args->fd, &le, kev_flags, kev, &nchanges); + if (error) + goto leave; + + error = kern_kevent_locked(td, epfp, nchanges, 0, &k_ops, NULL); +leave: + fdrop(epfp, td); + return (error); +} + +/* + * Wait for a filter to be triggered on the epoll file descriptor. */ +int +linux_epoll_wait(struct thread *td, struct linux_epoll_wait_args *args) +{ + struct file *epfp; + struct timespec ts, *tsp; + struct epoll_copyout_args coargs; + struct kevent_copyops k_ops = { &coargs, + epoll_kev_copyout, + NULL}; + int error; + + if (args->maxevents <= 0 || args->maxevents > LINUX_MAX_EVENTS) + return (EINVAL); + + epfp = epoll_fget(td, args->epfd); + + coargs.leventlist = args->events; + coargs.count = 0; + coargs.error = 0; +#if defined(KTRACE) || EPOLL_WIDE_USER_DATA + coargs.td = td; +#endif +#if EPOLL_WIDE_USER_DATA + coargs.epfp = epfp; +#endif + + if (args->timeout != -1) { + if (args->timeout < 0) { + error = EINVAL; + goto leave; + } + /* Convert from milliseconds to timespec. */ + ts.tv_sec = args->timeout / 1000; + ts.tv_nsec = (args->timeout % 1000) * 1000000; + tsp = &ts; + } else { + tsp = NULL; + } + + error = kern_kevent_locked(td, epfp, 0, args->maxevents, &k_ops, tsp); + if (!error && coargs.error) + error = coargs.error; + + /* + * kern_keven might return ENOMEM which is not expected from epoll_wait. + * Maybe we should translate that but I don't think it matters at all. + */ + + if (!error) + td->td_retval[0] = coargs.count; +leave: + fdrop(epfp, td); + return (error); +} + +#if EPOLL_WIDE_USER_DATA +/* + * we store user_data vector in an unused for kqueue descriptor + * field fvn_epollpriv in struct file. + */ +#define EPOLL_USER_DATA_GET(epfp) \ + ((struct epoll_user_data*)(epfp)->f_vnun.fvn_epollpriv) +#define EPOLL_USER_DATA_SET(epfp, udv) \ + (epfp)->f_vnun.fvn_epollpriv = (udv) + +static void +epoll_init_user_data(struct thread *td, struct file *epfp) +{ + struct epoll_user_data *udv; + + /* override file ops to have our close operation */ + atomic_store_rel_ptr((volatile uintptr_t *)&epfp->f_ops, (uintptr_t)&epollops); + + /* allocate epoll_user_data initially for up to 16 file descriptor values */ + udv = malloc(EPOLL_USER_DATA_SIZE(EPOLL_USER_DATA_MARGIN), M_LINUX_EPOLL, M_WAITOK); + udv->sz = EPOLL_USER_DATA_MARGIN; + EPOLL_USER_DATA_SET(epfp, udv); +} + +static void +epoll_set_user_data(struct thread *td, struct file *epfp, int fd, epoll_udata_t user_data) +{ + struct epoll_user_data *udv = EPOLL_USER_DATA_GET(epfp); + + if (fd >= udv->sz) { + udv = realloc(udv, EPOLL_USER_DATA_SIZE(fd + EPOLL_USER_DATA_MARGIN), M_LINUX_EPOLL, M_WAITOK); + udv->sz = fd + EPOLL_USER_DATA_MARGIN; + EPOLL_USER_DATA_SET(epfp, udv); + } + udv->data[fd] = user_data; +} + +static epoll_udata_t +epoll_get_user_data(struct thread *td, struct file *epfp, int fd) +{ + struct epoll_user_data *udv = EPOLL_USER_DATA_GET(epfp); + if (fd >= udv->sz) + panic("epoll: user data vector is too small"); + + return (udv->data[fd]); +} + +/*ARGSUSED*/ +static int +epoll_close(struct file *epfp, struct thread *td) +{ + /* free user data vector */ + free(EPOLL_USER_DATA_GET(epfp), M_LINUX_EPOLL); + /* over to kqueue parent */ + return (kqueue_close(epfp, td)); +} +#endif + +static struct file* +epoll_fget(struct thread *td, int epfd) +{ + struct file *fp; + cap_rights_t rights; + + if (fget(td, epfd, cap_rights_init(&rights, CAP_POLL_EVENT), &fp) != 0) + panic("epoll: no file object found for kqueue descriptor"); + + return (fp); +} + Added: head/sys/compat/linux/linux_epoll.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/linux/linux_epoll.h Wed Sep 18 17:56:04 2013 (r255672) @@ -0,0 +1,68 @@ +/*- + * Copyright (c) 2007 Roman Divacky + * 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 _LINUX_EPOLL_H_ +#define _LINUX_EPOLL_H_ + +#ifdef __amd64__ +#define EPOLL_PACKED __packed +#else +#define EPOLL_PACKED +#endif + +struct linux_epoll_event { + uint32_t events; + uint64_t data; +} EPOLL_PACKED; + +#define LINUX_EPOLLIN 0x001 +#define LINUX_EPOLLPRI 0x002 +#define LINUX_EPOLLOUT 0x004 +#define LINUX_EPOLLRDNORM 0x040 +#define LINUX_EPOLLRDBAND 0x080 +#define LINUX_EPOLLWRNORM 0x100 +#define LINUX_EPOLLWRBAND 0x200 +#define LINUX_EPOLLMSG 0x400 +#define LINUX_EPOLLERR 0x008 +#define LINUX_EPOLLHUP 0x010 +#define LINUX_EPOLLRDHUP 0x2000 +#define LINUX_EPOLLWAKEUP 1u<<29 +#define LINUX_EPOLLONESHOT 1u<<30 +#define LINUX_EPOLLET 1u<<31 + +#define LINUX_EPOLL_CTL_ADD 1 +#define LINUX_EPOLL_CTL_DEL 2 +#define LINUX_EPOLL_CTL_MOD 3 + +#define LINUX_EPOLL_CLOEXEC 02000000 +#define LINUX_EPOLL_NONBLOCK 00004000 + +#define LINUX_MAX_EVENTS (INT_MAX / sizeof(struct linux_epoll_event)) + +#endif /* !_LINUX_EPOLL_H_ */ + Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Wed Sep 18 17:28:19 2013 (r255671) +++ head/sys/conf/files.amd64 Wed Sep 18 17:56:04 2013 (r255672) @@ -467,6 +467,7 @@ amd64/linux32/linux32_support.s optional dependency "linux32_assym.h" amd64/linux32/linux32_sysent.c optional compat_linux32 amd64/linux32/linux32_sysvec.c optional compat_linux32 +compat/linux/linux_epoll.c optional compat_linux32 compat/linux/linux_emul.c optional compat_linux32 compat/linux/linux_file.c optional compat_linux32 compat/linux/linux_fork.c optional compat_linux32 Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Wed Sep 18 17:28:19 2013 (r255671) +++ head/sys/conf/files.i386 Wed Sep 18 17:56:04 2013 (r255672) @@ -80,6 +80,7 @@ hptrr_lib.o optional hptrr \ cddl/contrib/opensolaris/common/atomic/i386/opensolaris_atomic.S optional zfs compile-with "${ZFS_S}" compat/linprocfs/linprocfs.c optional linprocfs compat/linsysfs/linsysfs.c optional linsysfs +compat/linux/linux_epoll.c optional compat_linux compat/linux/linux_emul.c optional compat_linux compat/linux/linux_file.c optional compat_linux compat/linux/linux_fork.c optional compat_linux Modified: head/sys/conf/files.pc98 ============================================================================== --- head/sys/conf/files.pc98 Wed Sep 18 17:28:19 2013 (r255671) +++ head/sys/conf/files.pc98 Wed Sep 18 17:56:04 2013 (r255672) @@ -41,6 +41,7 @@ ukbdmap.h optional ukbd_dflt_keymap \ cddl/contrib/opensolaris/common/atomic/i386/opensolaris_atomic.S optional zfs compile-with "${ZFS_S}" compat/linprocfs/linprocfs.c optional linprocfs compat/linsysfs/linsysfs.c optional linsysfs +compat/linux/linux_epoll.c optional compat_linux compat/linux/linux_emul.c optional compat_linux compat/linux/linux_file.c optional compat_linux compat/linux/linux_fork.c optional compat_linux Modified: head/sys/i386/linux/linux_dummy.c ============================================================================== --- head/sys/i386/linux/linux_dummy.c Wed Sep 18 17:28:19 2013 (r255671) +++ head/sys/i386/linux/linux_dummy.c Wed Sep 18 17:56:04 2013 (r255672) @@ -72,9 +72,6 @@ DUMMY(setfsgid); DUMMY(pivot_root); DUMMY(mincore); DUMMY(lookup_dcookie); -DUMMY(epoll_create); -DUMMY(epoll_ctl); -DUMMY(epoll_wait); DUMMY(remap_file_pages); DUMMY(fstatfs64); DUMMY(mbind); @@ -120,7 +117,6 @@ DUMMY(timerfd_gettime); /* linux 2.6.27: */ DUMMY(signalfd4); DUMMY(eventfd2); -DUMMY(epoll_create1); DUMMY(dup3); DUMMY(inotify_init1); /* linux 2.6.30: */ Modified: head/sys/i386/linux/syscalls.master ============================================================================== --- head/sys/i386/linux/syscalls.master Wed Sep 18 17:28:19 2013 (r255671) +++ head/sys/i386/linux/syscalls.master Wed Sep 18 17:56:04 2013 (r255672) @@ -432,9 +432,11 @@ 251 AUE_NULL UNIMPL 252 AUE_EXIT STD { int linux_exit_group(int error_code); } 253 AUE_NULL STD { int linux_lookup_dcookie(void); } -254 AUE_NULL STD { int linux_epoll_create(void); } -255 AUE_NULL STD { int linux_epoll_ctl(void); } -256 AUE_NULL STD { int linux_epoll_wait(void); } +254 AUE_NULL STD { int linux_epoll_create(l_int size); } +255 AUE_NULL STD { int linux_epoll_ctl(l_int epfd, l_int op, l_int fd, \ + struct linux_epoll_event *event); } +256 AUE_NULL STD { int linux_epoll_wait(l_int epfd, struct linux_epoll_event *events, \ + l_int maxevents, l_int timeout); } 257 AUE_NULL STD { int linux_remap_file_pages(void); } 258 AUE_NULL STD { int linux_set_tid_address(int *tidptr); } 259 AUE_NULL STD { int linux_timer_create(clockid_t clock_id, \ @@ -544,7 +546,7 @@ ; linux 2.6.27: 327 AUE_NULL STD { int linux_signalfd4(void); } 328 AUE_NULL STD { int linux_eventfd2(void); } -329 AUE_NULL STD { int linux_epoll_create1(void); } +329 AUE_NULL STD { int linux_epoll_create1(l_int flags); } 330 AUE_NULL STD { int linux_dup3(void); } 331 AUE_NULL STD { int linux_pipe2(l_int *pipefds, l_int flags); } 332 AUE_NULL STD { int linux_inotify_init1(void); } Modified: head/sys/kern/kern_event.c ============================================================================== --- head/sys/kern/kern_event.c Wed Sep 18 17:28:19 2013 (r255671) +++ head/sys/kern/kern_event.c Wed Sep 18 17:56:04 2013 (r255672) @@ -107,16 +107,7 @@ static void kqueue_wakeup(struct kqueue static struct filterops *kqueue_fo_find(int filt); static void kqueue_fo_release(int filt); -static fo_rdwr_t kqueue_read; -static fo_rdwr_t kqueue_write; -static fo_truncate_t kqueue_truncate; -static fo_ioctl_t kqueue_ioctl; -static fo_poll_t kqueue_poll; -static fo_kqfilter_t kqueue_kqfilter; -static fo_stat_t kqueue_stat; -static fo_close_t kqueue_close; - -static struct fileops kqueueops = { +struct fileops kqueueops = { .fo_read = kqueue_read, .fo_write = kqueue_write, .fo_truncate = kqueue_truncate, @@ -303,7 +294,7 @@ filt_fileattach(struct knote *kn) } /*ARGSUSED*/ -static int +int kqueue_kqfilter(struct file *fp, struct knote *kn) { struct kqueue *kq = kn->kn_fp->f_data; @@ -688,34 +679,7 @@ filt_usertouch(struct knote *kn, struct int sys_kqueue(struct thread *td, struct kqueue_args *uap) { - struct filedesc *fdp; - struct kqueue *kq; - struct file *fp; - int fd, error; - - fdp = td->td_proc->p_fd; - error = falloc(td, &fp, &fd, 0); - if (error) - goto done2; - - /* An extra reference on `fp' has been held for us by falloc(). */ - kq = malloc(sizeof *kq, M_KQUEUE, M_WAITOK | M_ZERO); - mtx_init(&kq->kq_lock, "kqueue", NULL, MTX_DEF|MTX_DUPOK); - TAILQ_INIT(&kq->kq_head); - kq->kq_fdp = fdp; - knlist_init_mtx(&kq->kq_sel.si_note, &kq->kq_lock); - TASK_INIT(&kq->kq_task, 0, kqueue_task, kq); - - FILEDESC_XLOCK(fdp); - TAILQ_INSERT_HEAD(&fdp->fd_kqlist, kq, kq_list); - FILEDESC_XUNLOCK(fdp); - - finit(fp, FREAD | FWRITE, DTYPE_KQUEUE, kq, &kqueueops); - fdrop(fp, td); - - td->td_retval[0] = fd; -done2: - return (error); + return (kern_kqueue(td)); } #ifndef _SYS_SYSPROTO_H_ @@ -817,19 +781,75 @@ kevent_copyin(void *arg, struct kevent * } int +kern_kqueue(struct thread *td) +{ + struct file *fp; + int error; + + error = kern_kqueue_locked(td, &fp); + + fdrop(fp, td); + return (error); +} + +int +kern_kqueue_locked(struct thread *td, struct file **fpp) +{ + struct filedesc *fdp; + struct kqueue *kq; + struct file *fp; + int fd, error; + + fdp = td->td_proc->p_fd; + error = falloc(td, &fp, &fd, 0); + if (error) + return (error); + + /* An extra reference on `fp' has been held for us by falloc(). */ + kq = malloc(sizeof *kq, M_KQUEUE, M_WAITOK | M_ZERO); + mtx_init(&kq->kq_lock, "kqueue", NULL, MTX_DEF|MTX_DUPOK); + TAILQ_INIT(&kq->kq_head); + kq->kq_fdp = fdp; + knlist_init_mtx(&kq->kq_sel.si_note, &kq->kq_lock); + TASK_INIT(&kq->kq_task, 0, kqueue_task, kq); + + FILEDESC_XLOCK(fdp); + TAILQ_INSERT_HEAD(&fdp->fd_kqlist, kq, kq_list); + FILEDESC_XUNLOCK(fdp); + + finit(fp, FREAD | FWRITE, DTYPE_KQUEUE, kq, &kqueueops); + + td->td_retval[0] = fd; + *fpp = fp; + return (0); +} + +int kern_kevent(struct thread *td, int fd, int nchanges, int nevents, struct kevent_copyops *k_ops, const struct timespec *timeout) { + struct file *fp; + cap_rights_t rights; + int error; + + if ((error = fget(td, fd, cap_rights_init(&rights, CAP_POST_EVENT), &fp)) != 0) + return (error); + + error = kern_kevent_locked(td, fp, nchanges, nevents, k_ops, timeout); + + fdrop(fp, td); + return (error); +} + +int +kern_kevent_locked(struct thread *td, struct file *fp, int nchanges, int nevents, + struct kevent_copyops *k_ops, const struct timespec *timeout) +{ struct kevent keva[KQ_NEVENTS]; struct kevent *kevp, *changes; struct kqueue *kq; - struct file *fp; - cap_rights_t rights; int i, n, nerrors, error; - error = fget(td, fd, cap_rights_init(&rights, CAP_POST_EVENT), &fp); - if (error != 0) - return (error); if ((error = kqueue_acquire(fp, &kq)) != 0) goto done_norel; @@ -872,7 +892,6 @@ kern_kevent(struct thread *td, int fd, i done: kqueue_release(kq, 0); done_norel: - fdrop(fp, td); return (error); } @@ -1526,7 +1545,7 @@ done_nl: * This could be expanded to call kqueue_scan, if desired. */ /*ARGSUSED*/ -static int +int kqueue_read(struct file *fp, struct uio *uio, struct ucred *active_cred, int flags, struct thread *td) { @@ -1534,7 +1553,7 @@ kqueue_read(struct file *fp, struct uio } /*ARGSUSED*/ -static int +int kqueue_write(struct file *fp, struct uio *uio, struct ucred *active_cred, int flags, struct thread *td) { @@ -1542,7 +1561,7 @@ kqueue_write(struct file *fp, struct uio } /*ARGSUSED*/ -static int +int kqueue_truncate(struct file *fp, off_t length, struct ucred *active_cred, struct thread *td) { @@ -1551,7 +1570,7 @@ kqueue_truncate(struct file *fp, off_t l } /*ARGSUSED*/ -static int +int kqueue_ioctl(struct file *fp, u_long cmd, void *data, struct ucred *active_cred, struct thread *td) { @@ -1599,7 +1618,7 @@ kqueue_ioctl(struct file *fp, u_long cmd } /*ARGSUSED*/ -static int +int kqueue_poll(struct file *fp, int events, struct ucred *active_cred, struct thread *td) { @@ -1626,7 +1645,7 @@ kqueue_poll(struct file *fp, int events, } /*ARGSUSED*/ -static int +int kqueue_stat(struct file *fp, struct stat *st, struct ucred *active_cred, struct thread *td) { @@ -1644,7 +1663,7 @@ kqueue_stat(struct file *fp, struct stat } /*ARGSUSED*/ -static int +int kqueue_close(struct file *fp, struct thread *td) { struct kqueue *kq = fp->f_data; Modified: head/sys/modules/linux/Makefile ============================================================================== --- head/sys/modules/linux/Makefile Wed Sep 18 17:28:19 2013 (r255671) +++ head/sys/modules/linux/Makefile Wed Sep 18 17:56:04 2013 (r255672) @@ -9,7 +9,7 @@ CFLAGS+=-DCOMPAT_FREEBSD32 -DCOMPAT_LINU KMOD= linux SRCS= linux_fork.c linux${SFX}_dummy.c linux_emul.c linux_file.c \ - linux_futex.c linux_getcwd.c linux_ioctl.c linux_ipc.c \ + linux_futex.c linux_getcwd.c linux_ioctl.c linux_ipc.c linux_epoll.c \ linux${SFX}_machdep.c linux_mib.c linux_misc.c linux_signal.c \ linux_socket.c linux_stats.c linux_sysctl.c linux${SFX}_sysent.c \ linux${SFX}_sysvec.c linux_uid16.c linux_util.c linux_time.c \ Modified: head/sys/sys/event.h ============================================================================== --- head/sys/sys/event.h Wed Sep 18 17:28:19 2013 (r255671) +++ head/sys/sys/event.h Wed Sep 18 17:56:04 2013 (r255672) @@ -236,6 +236,9 @@ struct proc; struct knlist; struct mtx; struct rwlock; +struct uio; +struct stat; +struct ucred; extern void knote(struct knlist *list, long hint, int lockflags); extern void knote_fork(struct knlist *list, int pid); @@ -261,6 +264,21 @@ extern int kqfd_register(int fd, struct extern int kqueue_add_filteropts(int filt, struct filterops *filtops); extern int kqueue_del_filteropts(int filt); +int kqueue_read(struct file *fp, struct uio *uio, struct ucred *active_cred, + int flags, struct thread *td); +int kqueue_write(struct file *fp, struct uio *uio, struct ucred *active_cred, + int flags, struct thread *td); +int kqueue_truncate(struct file *fp, off_t length, struct ucred *active_cred, + struct thread *td); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Sep 18 17:58:05 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 75FA59A; Wed, 18 Sep 2013 17:58:05 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 615712B11; Wed, 18 Sep 2013 17:58:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8IHw5US053376; Wed, 18 Sep 2013 17:58:05 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8IHw3FP053365; Wed, 18 Sep 2013 17:58:03 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <201309181758.r8IHw3FP053365@svn.freebsd.org> From: Roman Divacky Date: Wed, 18 Sep 2013 17:58:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255673 - in head/sys: amd64/linux32 i386/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Sep 2013 17:58:05 -0000 Author: rdivacky Date: Wed Sep 18 17:58:03 2013 New Revision: 255673 URL: http://svnweb.freebsd.org/changeset/base/255673 Log: Regen. Approved by: re (delphij) Modified: head/sys/amd64/linux32/linux32_proto.h head/sys/amd64/linux32/linux32_syscall.h head/sys/amd64/linux32/linux32_syscalls.c head/sys/amd64/linux32/linux32_sysent.c head/sys/amd64/linux32/linux32_systrace_args.c head/sys/i386/linux/linux_proto.h head/sys/i386/linux/linux_syscall.h head/sys/i386/linux/linux_syscalls.c head/sys/i386/linux/linux_sysent.c head/sys/i386/linux/linux_systrace_args.c Modified: head/sys/amd64/linux32/linux32_proto.h ============================================================================== --- head/sys/amd64/linux32/linux32_proto.h Wed Sep 18 17:56:04 2013 (r255672) +++ head/sys/amd64/linux32/linux32_proto.h Wed Sep 18 17:58:03 2013 (r255673) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 236026 2012-05-25 21:50:48Z ed + * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 255672 2013-09-18 17:56:04Z rdivacky */ #ifndef _LINUX_SYSPROTO_H_ @@ -15,6 +15,7 @@ #include #include #include +#include #include @@ -765,13 +766,19 @@ struct linux_lookup_dcookie_args { register_t dummy; }; struct linux_epoll_create_args { - register_t dummy; + char size_l_[PADL_(l_int)]; l_int size; char size_r_[PADR_(l_int)]; }; struct linux_epoll_ctl_args { - register_t dummy; + char epfd_l_[PADL_(l_int)]; l_int epfd; char epfd_r_[PADR_(l_int)]; + char op_l_[PADL_(l_int)]; l_int op; char op_r_[PADR_(l_int)]; + char fd_l_[PADL_(l_int)]; l_int fd; char fd_r_[PADR_(l_int)]; + char event_l_[PADL_(struct linux_epoll_event *)]; struct linux_epoll_event * event; char event_r_[PADR_(struct linux_epoll_event *)]; }; struct linux_epoll_wait_args { - register_t dummy; + char epfd_l_[PADL_(l_int)]; l_int epfd; char epfd_r_[PADR_(l_int)]; + char events_l_[PADL_(struct linux_epoll_event *)]; struct linux_epoll_event * events; char events_r_[PADR_(struct linux_epoll_event *)]; + char maxevents_l_[PADL_(l_int)]; l_int maxevents; char maxevents_r_[PADR_(l_int)]; + char timeout_l_[PADL_(l_int)]; l_int timeout; char timeout_r_[PADR_(l_int)]; }; struct linux_remap_file_pages_args { register_t dummy; @@ -1037,7 +1044,7 @@ struct linux_eventfd2_args { register_t dummy; }; struct linux_epoll_create1_args { - register_t dummy; + char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; }; struct linux_dup3_args { register_t dummy; Modified: head/sys/amd64/linux32/linux32_syscall.h ============================================================================== --- head/sys/amd64/linux32/linux32_syscall.h Wed Sep 18 17:56:04 2013 (r255672) +++ head/sys/amd64/linux32/linux32_syscall.h Wed Sep 18 17:58:03 2013 (r255673) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 236026 2012-05-25 21:50:48Z ed + * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 255672 2013-09-18 17:56:04Z rdivacky */ #define LINUX_SYS_exit 1 Modified: head/sys/amd64/linux32/linux32_syscalls.c ============================================================================== --- head/sys/amd64/linux32/linux32_syscalls.c Wed Sep 18 17:56:04 2013 (r255672) +++ head/sys/amd64/linux32/linux32_syscalls.c Wed Sep 18 17:58:03 2013 (r255673) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 236026 2012-05-25 21:50:48Z ed + * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 255672 2013-09-18 17:56:04Z rdivacky */ const char *linux_syscallnames[] = { Modified: head/sys/amd64/linux32/linux32_sysent.c ============================================================================== --- head/sys/amd64/linux32/linux32_sysent.c Wed Sep 18 17:56:04 2013 (r255672) +++ head/sys/amd64/linux32/linux32_sysent.c Wed Sep 18 17:58:03 2013 (r255673) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 236026 2012-05-25 21:50:48Z ed + * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 255672 2013-09-18 17:56:04Z rdivacky */ #include "opt_compat.h" @@ -273,9 +273,9 @@ struct sysent linux_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 251 = */ { AS(linux_exit_group_args), (sy_call_t *)linux_exit_group, AUE_EXIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 252 = linux_exit_group */ { 0, (sy_call_t *)linux_lookup_dcookie, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 253 = linux_lookup_dcookie */ - { 0, (sy_call_t *)linux_epoll_create, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 254 = linux_epoll_create */ - { 0, (sy_call_t *)linux_epoll_ctl, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 255 = linux_epoll_ctl */ - { 0, (sy_call_t *)linux_epoll_wait, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 256 = linux_epoll_wait */ + { AS(linux_epoll_create_args), (sy_call_t *)linux_epoll_create, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 254 = linux_epoll_create */ + { AS(linux_epoll_ctl_args), (sy_call_t *)linux_epoll_ctl, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 255 = linux_epoll_ctl */ + { AS(linux_epoll_wait_args), (sy_call_t *)linux_epoll_wait, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 256 = linux_epoll_wait */ { 0, (sy_call_t *)linux_remap_file_pages, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 257 = linux_remap_file_pages */ { AS(linux_set_tid_address_args), (sy_call_t *)linux_set_tid_address, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 258 = linux_set_tid_address */ { 0, (sy_call_t *)linux_timer_create, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 259 = linux_timer_create */ @@ -348,7 +348,7 @@ struct sysent linux_sysent[] = { { 0, (sy_call_t *)linux_timerfd_gettime, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 326 = linux_timerfd_gettime */ { 0, (sy_call_t *)linux_signalfd4, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 327 = linux_signalfd4 */ { 0, (sy_call_t *)linux_eventfd2, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 328 = linux_eventfd2 */ - { 0, (sy_call_t *)linux_epoll_create1, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 329 = linux_epoll_create1 */ + { AS(linux_epoll_create1_args), (sy_call_t *)linux_epoll_create1, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 329 = linux_epoll_create1 */ { 0, (sy_call_t *)linux_dup3, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 330 = linux_dup3 */ { AS(linux_pipe2_args), (sy_call_t *)linux_pipe2, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 331 = linux_pipe2 */ { 0, (sy_call_t *)linux_inotify_init1, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 332 = linux_inotify_init1 */ Modified: head/sys/amd64/linux32/linux32_systrace_args.c ============================================================================== --- head/sys/amd64/linux32/linux32_systrace_args.c Wed Sep 18 17:56:04 2013 (r255672) +++ head/sys/amd64/linux32/linux32_systrace_args.c Wed Sep 18 17:58:03 2013 (r255673) @@ -1693,17 +1693,29 @@ systrace_args(int sysnum, void *params, } /* linux_epoll_create */ case 254: { - *n_args = 0; + struct linux_epoll_create_args *p = params; + iarg[0] = p->size; /* l_int */ + *n_args = 1; break; } /* linux_epoll_ctl */ case 255: { - *n_args = 0; + struct linux_epoll_ctl_args *p = params; + iarg[0] = p->epfd; /* l_int */ + iarg[1] = p->op; /* l_int */ + iarg[2] = p->fd; /* l_int */ + uarg[3] = (intptr_t) p->event; /* struct linux_epoll_event * */ + *n_args = 4; break; } /* linux_epoll_wait */ case 256: { - *n_args = 0; + struct linux_epoll_wait_args *p = params; + iarg[0] = p->epfd; /* l_int */ + uarg[1] = (intptr_t) p->events; /* struct linux_epoll_event * */ + iarg[2] = p->maxevents; /* l_int */ + iarg[3] = p->timeout; /* l_int */ + *n_args = 4; break; } /* linux_remap_file_pages */ @@ -2159,7 +2171,9 @@ systrace_args(int sysnum, void *params, } /* linux_epoll_create1 */ case 329: { - *n_args = 0; + struct linux_epoll_create1_args *p = params; + iarg[0] = p->flags; /* l_int */ + *n_args = 1; break; } /* linux_dup3 */ @@ -4807,12 +4821,51 @@ systrace_entry_setargdesc(int sysnum, in break; /* linux_epoll_create */ case 254: + switch(ndx) { + case 0: + p = "l_int"; + break; + default: + break; + }; break; /* linux_epoll_ctl */ case 255: + switch(ndx) { + case 0: + p = "l_int"; + break; + case 1: + p = "l_int"; + break; + case 2: + p = "l_int"; + break; + case 3: + p = "struct linux_epoll_event *"; + break; + default: + break; + }; break; /* linux_epoll_wait */ case 256: + switch(ndx) { + case 0: + p = "l_int"; + break; + case 1: + p = "struct linux_epoll_event *"; + break; + case 2: + p = "l_int"; + break; + case 3: + p = "l_int"; + break; + default: + break; + }; break; /* linux_remap_file_pages */ case 257: @@ -5353,6 +5406,13 @@ systrace_entry_setargdesc(int sysnum, in break; /* linux_epoll_create1 */ case 329: + switch(ndx) { + case 0: + p = "l_int"; + break; + default: + break; + }; break; /* linux_dup3 */ case 330: @@ -6400,10 +6460,19 @@ systrace_return_setargdesc(int sysnum, i case 253: /* linux_epoll_create */ case 254: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_epoll_ctl */ case 255: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_epoll_wait */ case 256: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_remap_file_pages */ case 257: /* linux_set_tid_address */ @@ -6618,6 +6687,9 @@ systrace_return_setargdesc(int sysnum, i case 328: /* linux_epoll_create1 */ case 329: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_dup3 */ case 330: /* linux_pipe2 */ Modified: head/sys/i386/linux/linux_proto.h ============================================================================== --- head/sys/i386/linux/linux_proto.h Wed Sep 18 17:56:04 2013 (r255672) +++ head/sys/i386/linux/linux_proto.h Wed Sep 18 17:58:03 2013 (r255673) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/linux/syscalls.master 238917 2012-07-30 20:44:45Z jhb + * created from FreeBSD: head/sys/i386/linux/syscalls.master 255672 2013-09-18 17:56:04Z rdivacky */ #ifndef _LINUX_SYSPROTO_H_ @@ -15,6 +15,7 @@ #include #include #include +#include #include @@ -765,13 +766,19 @@ struct linux_lookup_dcookie_args { register_t dummy; }; struct linux_epoll_create_args { - register_t dummy; + char size_l_[PADL_(l_int)]; l_int size; char size_r_[PADR_(l_int)]; }; struct linux_epoll_ctl_args { - register_t dummy; + char epfd_l_[PADL_(l_int)]; l_int epfd; char epfd_r_[PADR_(l_int)]; + char op_l_[PADL_(l_int)]; l_int op; char op_r_[PADR_(l_int)]; + char fd_l_[PADL_(l_int)]; l_int fd; char fd_r_[PADR_(l_int)]; + char event_l_[PADL_(struct linux_epoll_event *)]; struct linux_epoll_event * event; char event_r_[PADR_(struct linux_epoll_event *)]; }; struct linux_epoll_wait_args { - register_t dummy; + char epfd_l_[PADL_(l_int)]; l_int epfd; char epfd_r_[PADR_(l_int)]; + char events_l_[PADL_(struct linux_epoll_event *)]; struct linux_epoll_event * events; char events_r_[PADR_(struct linux_epoll_event *)]; + char maxevents_l_[PADL_(l_int)]; l_int maxevents; char maxevents_r_[PADR_(l_int)]; + char timeout_l_[PADL_(l_int)]; l_int timeout; char timeout_r_[PADR_(l_int)]; }; struct linux_remap_file_pages_args { register_t dummy; @@ -1056,7 +1063,7 @@ struct linux_eventfd2_args { register_t dummy; }; struct linux_epoll_create1_args { - register_t dummy; + char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; }; struct linux_dup3_args { register_t dummy; Modified: head/sys/i386/linux/linux_syscall.h ============================================================================== --- head/sys/i386/linux/linux_syscall.h Wed Sep 18 17:56:04 2013 (r255672) +++ head/sys/i386/linux/linux_syscall.h Wed Sep 18 17:58:03 2013 (r255673) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/linux/syscalls.master 238917 2012-07-30 20:44:45Z jhb + * created from FreeBSD: head/sys/i386/linux/syscalls.master 255672 2013-09-18 17:56:04Z rdivacky */ #define LINUX_SYS_exit 1 Modified: head/sys/i386/linux/linux_syscalls.c ============================================================================== --- head/sys/i386/linux/linux_syscalls.c Wed Sep 18 17:56:04 2013 (r255672) +++ head/sys/i386/linux/linux_syscalls.c Wed Sep 18 17:58:03 2013 (r255673) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/linux/syscalls.master 238917 2012-07-30 20:44:45Z jhb + * created from FreeBSD: head/sys/i386/linux/syscalls.master 255672 2013-09-18 17:56:04Z rdivacky */ const char *linux_syscallnames[] = { Modified: head/sys/i386/linux/linux_sysent.c ============================================================================== --- head/sys/i386/linux/linux_sysent.c Wed Sep 18 17:56:04 2013 (r255672) +++ head/sys/i386/linux/linux_sysent.c Wed Sep 18 17:58:03 2013 (r255673) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/linux/syscalls.master 238917 2012-07-30 20:44:45Z jhb + * created from FreeBSD: head/sys/i386/linux/syscalls.master 255672 2013-09-18 17:56:04Z rdivacky */ #include @@ -272,9 +272,9 @@ struct sysent linux_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 251 = */ { AS(linux_exit_group_args), (sy_call_t *)linux_exit_group, AUE_EXIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 252 = linux_exit_group */ { 0, (sy_call_t *)linux_lookup_dcookie, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 253 = linux_lookup_dcookie */ - { 0, (sy_call_t *)linux_epoll_create, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 254 = linux_epoll_create */ - { 0, (sy_call_t *)linux_epoll_ctl, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 255 = linux_epoll_ctl */ - { 0, (sy_call_t *)linux_epoll_wait, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 256 = linux_epoll_wait */ + { AS(linux_epoll_create_args), (sy_call_t *)linux_epoll_create, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 254 = linux_epoll_create */ + { AS(linux_epoll_ctl_args), (sy_call_t *)linux_epoll_ctl, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 255 = linux_epoll_ctl */ + { AS(linux_epoll_wait_args), (sy_call_t *)linux_epoll_wait, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 256 = linux_epoll_wait */ { 0, (sy_call_t *)linux_remap_file_pages, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 257 = linux_remap_file_pages */ { AS(linux_set_tid_address_args), (sy_call_t *)linux_set_tid_address, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 258 = linux_set_tid_address */ { AS(linux_timer_create_args), (sy_call_t *)linux_timer_create, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 259 = linux_timer_create */ @@ -347,7 +347,7 @@ struct sysent linux_sysent[] = { { 0, (sy_call_t *)linux_timerfd_gettime, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 326 = linux_timerfd_gettime */ { 0, (sy_call_t *)linux_signalfd4, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 327 = linux_signalfd4 */ { 0, (sy_call_t *)linux_eventfd2, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 328 = linux_eventfd2 */ - { 0, (sy_call_t *)linux_epoll_create1, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 329 = linux_epoll_create1 */ + { AS(linux_epoll_create1_args), (sy_call_t *)linux_epoll_create1, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 329 = linux_epoll_create1 */ { 0, (sy_call_t *)linux_dup3, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 330 = linux_dup3 */ { AS(linux_pipe2_args), (sy_call_t *)linux_pipe2, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 331 = linux_pipe2 */ { 0, (sy_call_t *)linux_inotify_init1, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 332 = linux_inotify_init1 */ Modified: head/sys/i386/linux/linux_systrace_args.c ============================================================================== --- head/sys/i386/linux/linux_systrace_args.c Wed Sep 18 17:56:04 2013 (r255672) +++ head/sys/i386/linux/linux_systrace_args.c Wed Sep 18 17:58:03 2013 (r255673) @@ -1743,17 +1743,29 @@ systrace_args(int sysnum, void *params, } /* linux_epoll_create */ case 254: { - *n_args = 0; + struct linux_epoll_create_args *p = params; + iarg[0] = p->size; /* l_int */ + *n_args = 1; break; } /* linux_epoll_ctl */ case 255: { - *n_args = 0; + struct linux_epoll_ctl_args *p = params; + iarg[0] = p->epfd; /* l_int */ + iarg[1] = p->op; /* l_int */ + iarg[2] = p->fd; /* l_int */ + uarg[3] = (intptr_t) p->event; /* struct linux_epoll_event * */ + *n_args = 4; break; } /* linux_epoll_wait */ case 256: { - *n_args = 0; + struct linux_epoll_wait_args *p = params; + iarg[0] = p->epfd; /* l_int */ + uarg[1] = (intptr_t) p->events; /* struct linux_epoll_event * */ + iarg[2] = p->maxevents; /* l_int */ + iarg[3] = p->timeout; /* l_int */ + *n_args = 4; break; } /* linux_remap_file_pages */ @@ -2250,7 +2262,9 @@ systrace_args(int sysnum, void *params, } /* linux_epoll_create1 */ case 329: { - *n_args = 0; + struct linux_epoll_create1_args *p = params; + iarg[0] = p->flags; /* l_int */ + *n_args = 1; break; } /* linux_dup3 */ @@ -4969,12 +4983,51 @@ systrace_entry_setargdesc(int sysnum, in break; /* linux_epoll_create */ case 254: + switch(ndx) { + case 0: + p = "l_int"; + break; + default: + break; + }; break; /* linux_epoll_ctl */ case 255: + switch(ndx) { + case 0: + p = "l_int"; + break; + case 1: + p = "l_int"; + break; + case 2: + p = "l_int"; + break; + case 3: + p = "struct linux_epoll_event *"; + break; + default: + break; + }; break; /* linux_epoll_wait */ case 256: + switch(ndx) { + case 0: + p = "l_int"; + break; + case 1: + p = "struct linux_epoll_event *"; + break; + case 2: + p = "l_int"; + break; + case 3: + p = "l_int"; + break; + default: + break; + }; break; /* linux_remap_file_pages */ case 257: @@ -5649,6 +5702,13 @@ systrace_entry_setargdesc(int sysnum, in break; /* linux_epoll_create1 */ case 329: + switch(ndx) { + case 0: + p = "l_int"; + break; + default: + break; + }; break; /* linux_dup3 */ case 330: @@ -6725,10 +6785,19 @@ systrace_return_setargdesc(int sysnum, i case 253: /* linux_epoll_create */ case 254: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_epoll_ctl */ case 255: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_epoll_wait */ case 256: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_remap_file_pages */ case 257: /* linux_set_tid_address */ @@ -6976,6 +7045,9 @@ systrace_return_setargdesc(int sysnum, i case 328: /* linux_epoll_create1 */ case 329: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_dup3 */ case 330: /* linux_pipe2 */ From owner-svn-src-all@FreeBSD.ORG Wed Sep 18 18:46:56 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 954E61C8; Wed, 18 Sep 2013 18:46:56 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wg0-x236.google.com (mail-wg0-x236.google.com [IPv6:2a00:1450:400c:c00::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B7C382E17; Wed, 18 Sep 2013 18:46:55 +0000 (UTC) Received: by mail-wg0-f54.google.com with SMTP id m15so7102678wgh.9 for ; Wed, 18 Sep 2013 11:46:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=g4525PR1YmpQ83tSykadVTKmP5Lt1uaXnQmp+2DZqvA=; b=eX4+G539bKr74vBUUHhosQyC1W3HHFh82zlLd7YyvhiL06lPBOte55isiZjniInRa2 VIfudH1aan9qWRArNIiSBdsSWbCGOXcMXr0IF2g+sACWlQ+9z2DiDHymkdgApjTJq6jQ j7u5GNFkD/C78zR8gnQYn268lBMqmUFRTeQ/yxpJaB3Sgsttoibj3zkL0U4HFab7hzvn Fvf9HYjS6kfzMvwmNlavhXyU/pPQ6f0XT/xehkOZz/FQMvxFKj6jnomYAkP/Dk8bd+c/ aOTW5d9ZMDvfgXRj4EfU22eYryLvPr4Ozlna5K1+wcVVX8uU1rYUuXTfMgAzmr4RpCOO 6MOg== X-Received: by 10.194.222.2 with SMTP id qi2mr33668560wjc.14.1379530014087; Wed, 18 Sep 2013 11:46:54 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id dx7sm4346979wib.8.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 18 Sep 2013 11:46:53 -0700 (PDT) Date: Wed, 18 Sep 2013 20:46:48 +0200 From: Mateusz Guzik To: Roman Divacky Subject: Re: svn commit: r255672 - in head/sys: amd64/linux32 compat/linux conf i386/linux kern modules/linux sys Message-ID: <20130918184648.GA31748@dft-labs.eu> References: <201309181756.r8IHu4qV052882@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201309181756.r8IHu4qV052882@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, yuri@rawbw.com, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Sep 2013 18:46:56 -0000 On Wed, Sep 18, 2013 at 05:56:04PM +0000, Roman Divacky wrote: > Author: rdivacky > Date: Wed Sep 18 17:56:04 2013 > New Revision: 255672 > URL: http://svnweb.freebsd.org/changeset/base/255672 > > Log: > Implement epoll support in Linuxulator. This is a tiny wrapper around kqueue > to implement epoll subset of functionality. The kqueue user data are 32bit > on i386 which is not enough for epoll user data so this patch overrides > kqueue fileops to maintain enough space in struct file. > > Initial patch developed by me in 2007 and then extended and finished > by Yuri Victorovich. > First of all thank you both for doing this work. I have some important though (I didn't spend too much on this, so maybe I missed some stuff or what I write here is incorrect). In general some lines are longer than 80 characters and simple stile violations are present ("if (!error)"). > +/* Create a new epoll file descriptor. */ > + > +static int > +linux_epoll_create_common(struct thread *td) > +{ > + struct file *fp; > + int error; > + > + error = kern_kqueue_locked(td, &fp); > +#if EPOLL_WIDE_USER_DATA > + if (error == 0) { > + epoll_init_user_data(td, fp); > + fdrop(fp, td); > + } > +#endif > + return (error); > +} This leaks fd reference if EPOLL_WIDE_USER_DATA is not defined. > +int > +linux_epoll_create1(struct thread *td, struct linux_epoll_create1_args *args) > +{ > + int error; > + > + error = linux_epoll_create_common(td); > + > + if (!error) { > + if (args->flags & LINUX_EPOLL_CLOEXEC) > + td->td_proc->p_fd->fd_ofiles[td->td_retval[0]].fde_flags |= UF_EXCLOSE; This is very racy for no good reason. This should be passed down to kqueue and be set on fd creation. > + if (args->flags & LINUX_EPOLL_NONBLOCK) > + linux_msg(td, "epoll_create1 doesn't yet support EPOLL_NONBLOCK flag\n"); > + } > + > + return (error); > +} > + > + > +static void > +epoll_init_user_data(struct thread *td, struct file *epfp) > +{ > + struct epoll_user_data *udv; > + > + /* override file ops to have our close operation */ > + atomic_store_rel_ptr((volatile uintptr_t *)&epfp->f_ops, (uintptr_t)&epollops); > + > + /* allocate epoll_user_data initially for up to 16 file descriptor values */ > + udv = malloc(EPOLL_USER_DATA_SIZE(EPOLL_USER_DATA_MARGIN), M_LINUX_EPOLL, M_WAITOK); > + udv->sz = EPOLL_USER_DATA_MARGIN; > + EPOLL_USER_DATA_SET(epfp, udv); > +} Is not this racy? There is a window when fd is installed with epoll ops, yet no userdata is allocated. > +/*ARGSUSED*/ > +static int > +epoll_close(struct file *epfp, struct thread *td) > +{ > + /* free user data vector */ > + free(EPOLL_USER_DATA_GET(epfp), M_LINUX_EPOLL); > + /* over to kqueue parent */ > + return (kqueue_close(epfp, td)); > +} > +#endif Unnecessary comments. > + > +static struct file* > +epoll_fget(struct thread *td, int epfd) > +{ > + struct file *fp; > + cap_rights_t rights; > + > + if (fget(td, epfd, cap_rights_init(&rights, CAP_POLL_EVENT), &fp) != 0) > + panic("epoll: no file object found for kqueue descriptor"); > + > + return (fp); > +} > + Callers pass arbitrary fd here (provided by the user), yet this panics if fd is bad. > int > +kern_kqueue(struct thread *td) > +{ > + struct file *fp; > + int error; > + > + error = kern_kqueue_locked(td, &fp); > + Why is this _locked? Typically such naming is used when some locks are held around the call. > + fdrop(fp, td); If there was an error, fdrop is called even though there is nothing to fdrop. > + return (error); > +} -- Mateusz Guzik From owner-svn-src-all@FreeBSD.ORG Wed Sep 18 18:48:36 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0E740310; Wed, 18 Sep 2013 18:48:36 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id ECCBB2E24; Wed, 18 Sep 2013 18:48:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8IImZri081624; Wed, 18 Sep 2013 18:48:35 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8IImXfi081608; Wed, 18 Sep 2013 18:48:33 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <201309181848.r8IImXfi081608@svn.freebsd.org> From: Roman Divacky Date: Wed, 18 Sep 2013 18:48:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255675 - in head/sys: amd64/linux32 compat/linux conf i386/linux kern modules/linux sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Sep 2013 18:48:36 -0000 Author: rdivacky Date: Wed Sep 18 18:48:33 2013 New Revision: 255675 URL: http://svnweb.freebsd.org/changeset/base/255675 Log: Revert r255672, it has some serious flaws, leaking file references etc. Approved by: re (delphij) Deleted: head/sys/compat/linux/linux_epoll.c head/sys/compat/linux/linux_epoll.h Modified: head/sys/amd64/linux32/linux32_dummy.c head/sys/amd64/linux32/syscalls.master head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/conf/files.pc98 head/sys/i386/linux/linux_dummy.c head/sys/i386/linux/syscalls.master head/sys/kern/kern_event.c head/sys/modules/linux/Makefile head/sys/sys/event.h head/sys/sys/file.h head/sys/sys/syscallsubr.h Modified: head/sys/amd64/linux32/linux32_dummy.c ============================================================================== --- head/sys/amd64/linux32/linux32_dummy.c Wed Sep 18 18:02:01 2013 (r255674) +++ head/sys/amd64/linux32/linux32_dummy.c Wed Sep 18 18:48:33 2013 (r255675) @@ -70,6 +70,9 @@ DUMMY(pivot_root); DUMMY(mincore); DUMMY(ptrace); DUMMY(lookup_dcookie); +DUMMY(epoll_create); +DUMMY(epoll_ctl); +DUMMY(epoll_wait); DUMMY(remap_file_pages); DUMMY(timer_create); DUMMY(timer_settime); @@ -126,6 +129,7 @@ DUMMY(timerfd_gettime); /* linux 2.6.27: */ DUMMY(signalfd4); DUMMY(eventfd2); +DUMMY(epoll_create1); DUMMY(dup3); DUMMY(inotify_init1); /* linux 2.6.30: */ Modified: head/sys/amd64/linux32/syscalls.master ============================================================================== --- head/sys/amd64/linux32/syscalls.master Wed Sep 18 18:02:01 2013 (r255674) +++ head/sys/amd64/linux32/syscalls.master Wed Sep 18 18:48:33 2013 (r255675) @@ -430,11 +430,9 @@ 251 AUE_NULL UNIMPL 252 AUE_EXIT STD { int linux_exit_group(int error_code); } 253 AUE_NULL STD { int linux_lookup_dcookie(void); } -254 AUE_NULL STD { int linux_epoll_create(l_int size); } -255 AUE_NULL STD { int linux_epoll_ctl(l_int epfd, l_int op, l_int fd, \ - struct linux_epoll_event *event); } -256 AUE_NULL STD { int linux_epoll_wait(l_int epfd, struct linux_epoll_event *events, \ - l_int maxevents, l_int timeout); } +254 AUE_NULL STD { int linux_epoll_create(void); } +255 AUE_NULL STD { int linux_epoll_ctl(void); } +256 AUE_NULL STD { int linux_epoll_wait(void); } 257 AUE_NULL STD { int linux_remap_file_pages(void); } 258 AUE_NULL STD { int linux_set_tid_address(int *tidptr); } 259 AUE_NULL STD { int linux_timer_create(void); } @@ -536,7 +534,7 @@ ; linux 2.6.27: 327 AUE_NULL STD { int linux_signalfd4(void); } 328 AUE_NULL STD { int linux_eventfd2(void); } -329 AUE_NULL STD { int linux_epoll_create1(l_int flags); } +329 AUE_NULL STD { int linux_epoll_create1(void); } 330 AUE_NULL STD { int linux_dup3(void); } 331 AUE_NULL STD { int linux_pipe2(l_int *pipefds, l_int flags); } 332 AUE_NULL STD { int linux_inotify_init1(void); } Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Wed Sep 18 18:02:01 2013 (r255674) +++ head/sys/conf/files.amd64 Wed Sep 18 18:48:33 2013 (r255675) @@ -467,7 +467,6 @@ amd64/linux32/linux32_support.s optional dependency "linux32_assym.h" amd64/linux32/linux32_sysent.c optional compat_linux32 amd64/linux32/linux32_sysvec.c optional compat_linux32 -compat/linux/linux_epoll.c optional compat_linux32 compat/linux/linux_emul.c optional compat_linux32 compat/linux/linux_file.c optional compat_linux32 compat/linux/linux_fork.c optional compat_linux32 Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Wed Sep 18 18:02:01 2013 (r255674) +++ head/sys/conf/files.i386 Wed Sep 18 18:48:33 2013 (r255675) @@ -80,7 +80,6 @@ hptrr_lib.o optional hptrr \ cddl/contrib/opensolaris/common/atomic/i386/opensolaris_atomic.S optional zfs compile-with "${ZFS_S}" compat/linprocfs/linprocfs.c optional linprocfs compat/linsysfs/linsysfs.c optional linsysfs -compat/linux/linux_epoll.c optional compat_linux compat/linux/linux_emul.c optional compat_linux compat/linux/linux_file.c optional compat_linux compat/linux/linux_fork.c optional compat_linux Modified: head/sys/conf/files.pc98 ============================================================================== --- head/sys/conf/files.pc98 Wed Sep 18 18:02:01 2013 (r255674) +++ head/sys/conf/files.pc98 Wed Sep 18 18:48:33 2013 (r255675) @@ -41,7 +41,6 @@ ukbdmap.h optional ukbd_dflt_keymap \ cddl/contrib/opensolaris/common/atomic/i386/opensolaris_atomic.S optional zfs compile-with "${ZFS_S}" compat/linprocfs/linprocfs.c optional linprocfs compat/linsysfs/linsysfs.c optional linsysfs -compat/linux/linux_epoll.c optional compat_linux compat/linux/linux_emul.c optional compat_linux compat/linux/linux_file.c optional compat_linux compat/linux/linux_fork.c optional compat_linux Modified: head/sys/i386/linux/linux_dummy.c ============================================================================== --- head/sys/i386/linux/linux_dummy.c Wed Sep 18 18:02:01 2013 (r255674) +++ head/sys/i386/linux/linux_dummy.c Wed Sep 18 18:48:33 2013 (r255675) @@ -72,6 +72,9 @@ DUMMY(setfsgid); DUMMY(pivot_root); DUMMY(mincore); DUMMY(lookup_dcookie); +DUMMY(epoll_create); +DUMMY(epoll_ctl); +DUMMY(epoll_wait); DUMMY(remap_file_pages); DUMMY(fstatfs64); DUMMY(mbind); @@ -117,6 +120,7 @@ DUMMY(timerfd_gettime); /* linux 2.6.27: */ DUMMY(signalfd4); DUMMY(eventfd2); +DUMMY(epoll_create1); DUMMY(dup3); DUMMY(inotify_init1); /* linux 2.6.30: */ Modified: head/sys/i386/linux/syscalls.master ============================================================================== --- head/sys/i386/linux/syscalls.master Wed Sep 18 18:02:01 2013 (r255674) +++ head/sys/i386/linux/syscalls.master Wed Sep 18 18:48:33 2013 (r255675) @@ -432,11 +432,9 @@ 251 AUE_NULL UNIMPL 252 AUE_EXIT STD { int linux_exit_group(int error_code); } 253 AUE_NULL STD { int linux_lookup_dcookie(void); } -254 AUE_NULL STD { int linux_epoll_create(l_int size); } -255 AUE_NULL STD { int linux_epoll_ctl(l_int epfd, l_int op, l_int fd, \ - struct linux_epoll_event *event); } -256 AUE_NULL STD { int linux_epoll_wait(l_int epfd, struct linux_epoll_event *events, \ - l_int maxevents, l_int timeout); } +254 AUE_NULL STD { int linux_epoll_create(void); } +255 AUE_NULL STD { int linux_epoll_ctl(void); } +256 AUE_NULL STD { int linux_epoll_wait(void); } 257 AUE_NULL STD { int linux_remap_file_pages(void); } 258 AUE_NULL STD { int linux_set_tid_address(int *tidptr); } 259 AUE_NULL STD { int linux_timer_create(clockid_t clock_id, \ @@ -546,7 +544,7 @@ ; linux 2.6.27: 327 AUE_NULL STD { int linux_signalfd4(void); } 328 AUE_NULL STD { int linux_eventfd2(void); } -329 AUE_NULL STD { int linux_epoll_create1(l_int flags); } +329 AUE_NULL STD { int linux_epoll_create1(void); } 330 AUE_NULL STD { int linux_dup3(void); } 331 AUE_NULL STD { int linux_pipe2(l_int *pipefds, l_int flags); } 332 AUE_NULL STD { int linux_inotify_init1(void); } Modified: head/sys/kern/kern_event.c ============================================================================== --- head/sys/kern/kern_event.c Wed Sep 18 18:02:01 2013 (r255674) +++ head/sys/kern/kern_event.c Wed Sep 18 18:48:33 2013 (r255675) @@ -107,7 +107,16 @@ static void kqueue_wakeup(struct kqueue static struct filterops *kqueue_fo_find(int filt); static void kqueue_fo_release(int filt); -struct fileops kqueueops = { +static fo_rdwr_t kqueue_read; +static fo_rdwr_t kqueue_write; +static fo_truncate_t kqueue_truncate; +static fo_ioctl_t kqueue_ioctl; +static fo_poll_t kqueue_poll; +static fo_kqfilter_t kqueue_kqfilter; +static fo_stat_t kqueue_stat; +static fo_close_t kqueue_close; + +static struct fileops kqueueops = { .fo_read = kqueue_read, .fo_write = kqueue_write, .fo_truncate = kqueue_truncate, @@ -294,7 +303,7 @@ filt_fileattach(struct knote *kn) } /*ARGSUSED*/ -int +static int kqueue_kqfilter(struct file *fp, struct knote *kn) { struct kqueue *kq = kn->kn_fp->f_data; @@ -679,7 +688,34 @@ filt_usertouch(struct knote *kn, struct int sys_kqueue(struct thread *td, struct kqueue_args *uap) { - return (kern_kqueue(td)); + struct filedesc *fdp; + struct kqueue *kq; + struct file *fp; + int fd, error; + + fdp = td->td_proc->p_fd; + error = falloc(td, &fp, &fd, 0); + if (error) + goto done2; + + /* An extra reference on `fp' has been held for us by falloc(). */ + kq = malloc(sizeof *kq, M_KQUEUE, M_WAITOK | M_ZERO); + mtx_init(&kq->kq_lock, "kqueue", NULL, MTX_DEF|MTX_DUPOK); + TAILQ_INIT(&kq->kq_head); + kq->kq_fdp = fdp; + knlist_init_mtx(&kq->kq_sel.si_note, &kq->kq_lock); + TASK_INIT(&kq->kq_task, 0, kqueue_task, kq); + + FILEDESC_XLOCK(fdp); + TAILQ_INSERT_HEAD(&fdp->fd_kqlist, kq, kq_list); + FILEDESC_XUNLOCK(fdp); + + finit(fp, FREAD | FWRITE, DTYPE_KQUEUE, kq, &kqueueops); + fdrop(fp, td); + + td->td_retval[0] = fd; +done2: + return (error); } #ifndef _SYS_SYSPROTO_H_ @@ -781,75 +817,19 @@ kevent_copyin(void *arg, struct kevent * } int -kern_kqueue(struct thread *td) -{ - struct file *fp; - int error; - - error = kern_kqueue_locked(td, &fp); - - fdrop(fp, td); - return (error); -} - -int -kern_kqueue_locked(struct thread *td, struct file **fpp) -{ - struct filedesc *fdp; - struct kqueue *kq; - struct file *fp; - int fd, error; - - fdp = td->td_proc->p_fd; - error = falloc(td, &fp, &fd, 0); - if (error) - return (error); - - /* An extra reference on `fp' has been held for us by falloc(). */ - kq = malloc(sizeof *kq, M_KQUEUE, M_WAITOK | M_ZERO); - mtx_init(&kq->kq_lock, "kqueue", NULL, MTX_DEF|MTX_DUPOK); - TAILQ_INIT(&kq->kq_head); - kq->kq_fdp = fdp; - knlist_init_mtx(&kq->kq_sel.si_note, &kq->kq_lock); - TASK_INIT(&kq->kq_task, 0, kqueue_task, kq); - - FILEDESC_XLOCK(fdp); - TAILQ_INSERT_HEAD(&fdp->fd_kqlist, kq, kq_list); - FILEDESC_XUNLOCK(fdp); - - finit(fp, FREAD | FWRITE, DTYPE_KQUEUE, kq, &kqueueops); - - td->td_retval[0] = fd; - *fpp = fp; - return (0); -} - -int kern_kevent(struct thread *td, int fd, int nchanges, int nevents, struct kevent_copyops *k_ops, const struct timespec *timeout) { - struct file *fp; - cap_rights_t rights; - int error; - - if ((error = fget(td, fd, cap_rights_init(&rights, CAP_POST_EVENT), &fp)) != 0) - return (error); - - error = kern_kevent_locked(td, fp, nchanges, nevents, k_ops, timeout); - - fdrop(fp, td); - return (error); -} - -int -kern_kevent_locked(struct thread *td, struct file *fp, int nchanges, int nevents, - struct kevent_copyops *k_ops, const struct timespec *timeout) -{ struct kevent keva[KQ_NEVENTS]; struct kevent *kevp, *changes; struct kqueue *kq; + struct file *fp; + cap_rights_t rights; int i, n, nerrors, error; + error = fget(td, fd, cap_rights_init(&rights, CAP_POST_EVENT), &fp); + if (error != 0) + return (error); if ((error = kqueue_acquire(fp, &kq)) != 0) goto done_norel; @@ -892,6 +872,7 @@ kern_kevent_locked(struct thread *td, st done: kqueue_release(kq, 0); done_norel: + fdrop(fp, td); return (error); } @@ -1545,7 +1526,7 @@ done_nl: * This could be expanded to call kqueue_scan, if desired. */ /*ARGSUSED*/ -int +static int kqueue_read(struct file *fp, struct uio *uio, struct ucred *active_cred, int flags, struct thread *td) { @@ -1553,7 +1534,7 @@ kqueue_read(struct file *fp, struct uio } /*ARGSUSED*/ -int +static int kqueue_write(struct file *fp, struct uio *uio, struct ucred *active_cred, int flags, struct thread *td) { @@ -1561,7 +1542,7 @@ kqueue_write(struct file *fp, struct uio } /*ARGSUSED*/ -int +static int kqueue_truncate(struct file *fp, off_t length, struct ucred *active_cred, struct thread *td) { @@ -1570,7 +1551,7 @@ kqueue_truncate(struct file *fp, off_t l } /*ARGSUSED*/ -int +static int kqueue_ioctl(struct file *fp, u_long cmd, void *data, struct ucred *active_cred, struct thread *td) { @@ -1618,7 +1599,7 @@ kqueue_ioctl(struct file *fp, u_long cmd } /*ARGSUSED*/ -int +static int kqueue_poll(struct file *fp, int events, struct ucred *active_cred, struct thread *td) { @@ -1645,7 +1626,7 @@ kqueue_poll(struct file *fp, int events, } /*ARGSUSED*/ -int +static int kqueue_stat(struct file *fp, struct stat *st, struct ucred *active_cred, struct thread *td) { @@ -1663,7 +1644,7 @@ kqueue_stat(struct file *fp, struct stat } /*ARGSUSED*/ -int +static int kqueue_close(struct file *fp, struct thread *td) { struct kqueue *kq = fp->f_data; Modified: head/sys/modules/linux/Makefile ============================================================================== --- head/sys/modules/linux/Makefile Wed Sep 18 18:02:01 2013 (r255674) +++ head/sys/modules/linux/Makefile Wed Sep 18 18:48:33 2013 (r255675) @@ -9,7 +9,7 @@ CFLAGS+=-DCOMPAT_FREEBSD32 -DCOMPAT_LINU KMOD= linux SRCS= linux_fork.c linux${SFX}_dummy.c linux_emul.c linux_file.c \ - linux_futex.c linux_getcwd.c linux_ioctl.c linux_ipc.c linux_epoll.c \ + linux_futex.c linux_getcwd.c linux_ioctl.c linux_ipc.c \ linux${SFX}_machdep.c linux_mib.c linux_misc.c linux_signal.c \ linux_socket.c linux_stats.c linux_sysctl.c linux${SFX}_sysent.c \ linux${SFX}_sysvec.c linux_uid16.c linux_util.c linux_time.c \ Modified: head/sys/sys/event.h ============================================================================== --- head/sys/sys/event.h Wed Sep 18 18:02:01 2013 (r255674) +++ head/sys/sys/event.h Wed Sep 18 18:48:33 2013 (r255675) @@ -236,9 +236,6 @@ struct proc; struct knlist; struct mtx; struct rwlock; -struct uio; -struct stat; -struct ucred; extern void knote(struct knlist *list, long hint, int lockflags); extern void knote_fork(struct knlist *list, int pid); @@ -264,21 +261,6 @@ extern int kqfd_register(int fd, struct extern int kqueue_add_filteropts(int filt, struct filterops *filtops); extern int kqueue_del_filteropts(int filt); -int kqueue_read(struct file *fp, struct uio *uio, struct ucred *active_cred, - int flags, struct thread *td); -int kqueue_write(struct file *fp, struct uio *uio, struct ucred *active_cred, - int flags, struct thread *td); -int kqueue_truncate(struct file *fp, off_t length, struct ucred *active_cred, - struct thread *td); -int kqueue_ioctl(struct file *fp, u_long cmd, void *data, - struct ucred *active_cred, struct thread *td); -int kqueue_poll(struct file *fp, int events, struct ucred *active_cred, - struct thread *td); -int kqueue_kqfilter(struct file *fp, struct knote *kn); -int kqueue_stat(struct file *fp, struct stat *st, struct ucred *active_cred, - struct thread *td); -int kqueue_close(struct file *fp, struct thread *td); - #else /* !_KERNEL */ #include Modified: head/sys/sys/file.h ============================================================================== --- head/sys/sys/file.h Wed Sep 18 18:02:01 2013 (r255674) +++ head/sys/sys/file.h Wed Sep 18 18:48:33 2013 (r255675) @@ -169,8 +169,6 @@ struct file { union { struct cdev_privdata *fvn_cdevpriv; /* (d) Private data for the cdev. */ - void *fvn_epollpriv; - /* (d) Private data for the epoll. */ struct fadvise_info *fvn_advice; } f_vnun; /* Modified: head/sys/sys/syscallsubr.h ============================================================================== --- head/sys/sys/syscallsubr.h Wed Sep 18 18:02:01 2013 (r255674) +++ head/sys/sys/syscallsubr.h Wed Sep 18 18:48:33 2013 (r255675) @@ -121,13 +121,8 @@ int kern_ioctl(struct thread *td, int fd int kern_jail(struct thread *td, struct jail *j); int kern_jail_get(struct thread *td, struct uio *options, int flags); int kern_jail_set(struct thread *td, struct uio *options, int flags); -int kern_kqueue(struct thread *td); -int kern_kqueue_locked(struct thread *td, struct file **fpp); int kern_kevent(struct thread *td, int fd, int nchanges, int nevents, struct kevent_copyops *k_ops, const struct timespec *timeout); -int kern_kevent_locked(struct thread *td, struct file *fp, int nchanges, - int nevents, - struct kevent_copyops *k_ops, const struct timespec *timeout); int kern_kldload(struct thread *td, const char *file, int *fileid); int kern_kldstat(struct thread *td, int fileid, struct kld_file_stat *stat); int kern_kldunload(struct thread *td, int fileid, int flags); @@ -253,8 +248,6 @@ int kern_utimes(struct thread *td, char struct timeval *tptr, enum uio_seg tptrseg); int kern_utimesat(struct thread *td, int fd, char *path, enum uio_seg pathseg, struct timeval *tptr, enum uio_seg tptrseg); -int kern_utimensat(struct thread *td, int fd, char *path, - enum uio_seg pathseg, struct timespec *tptr, enum uio_seg tptrseg); int kern_wait(struct thread *td, pid_t pid, int *status, int options, struct rusage *rup); int kern_wait6(struct thread *td, enum idtype idtype, id_t id, int *status, From owner-svn-src-all@FreeBSD.ORG Wed Sep 18 18:49:29 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 16EAA452; Wed, 18 Sep 2013 18:49:29 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 02CBD2E2D; Wed, 18 Sep 2013 18:49:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8IInSBY081890; Wed, 18 Sep 2013 18:49:28 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8IInRBo081877; Wed, 18 Sep 2013 18:49:27 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <201309181849.r8IInRBo081877@svn.freebsd.org> From: Roman Divacky Date: Wed, 18 Sep 2013 18:49:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255676 - in head/sys: amd64/linux32 i386/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Sep 2013 18:49:29 -0000 Author: rdivacky Date: Wed Sep 18 18:49:26 2013 New Revision: 255676 URL: http://svnweb.freebsd.org/changeset/base/255676 Log: Regen. Approved by: re (delphij) Modified: head/sys/amd64/linux32/linux32_proto.h head/sys/amd64/linux32/linux32_syscall.h head/sys/amd64/linux32/linux32_syscalls.c head/sys/amd64/linux32/linux32_sysent.c head/sys/amd64/linux32/linux32_systrace_args.c head/sys/i386/linux/linux_proto.h head/sys/i386/linux/linux_syscall.h head/sys/i386/linux/linux_syscalls.c head/sys/i386/linux/linux_sysent.c head/sys/i386/linux/linux_systrace_args.c Modified: head/sys/amd64/linux32/linux32_proto.h ============================================================================== --- head/sys/amd64/linux32/linux32_proto.h Wed Sep 18 18:48:33 2013 (r255675) +++ head/sys/amd64/linux32/linux32_proto.h Wed Sep 18 18:49:26 2013 (r255676) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 255672 2013-09-18 17:56:04Z rdivacky + * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 255675 2013-09-18 18:48:33Z rdivacky */ #ifndef _LINUX_SYSPROTO_H_ @@ -766,19 +766,13 @@ struct linux_lookup_dcookie_args { register_t dummy; }; struct linux_epoll_create_args { - char size_l_[PADL_(l_int)]; l_int size; char size_r_[PADR_(l_int)]; + register_t dummy; }; struct linux_epoll_ctl_args { - char epfd_l_[PADL_(l_int)]; l_int epfd; char epfd_r_[PADR_(l_int)]; - char op_l_[PADL_(l_int)]; l_int op; char op_r_[PADR_(l_int)]; - char fd_l_[PADL_(l_int)]; l_int fd; char fd_r_[PADR_(l_int)]; - char event_l_[PADL_(struct linux_epoll_event *)]; struct linux_epoll_event * event; char event_r_[PADR_(struct linux_epoll_event *)]; + register_t dummy; }; struct linux_epoll_wait_args { - char epfd_l_[PADL_(l_int)]; l_int epfd; char epfd_r_[PADR_(l_int)]; - char events_l_[PADL_(struct linux_epoll_event *)]; struct linux_epoll_event * events; char events_r_[PADR_(struct linux_epoll_event *)]; - char maxevents_l_[PADL_(l_int)]; l_int maxevents; char maxevents_r_[PADR_(l_int)]; - char timeout_l_[PADL_(l_int)]; l_int timeout; char timeout_r_[PADR_(l_int)]; + register_t dummy; }; struct linux_remap_file_pages_args { register_t dummy; @@ -1044,7 +1038,7 @@ struct linux_eventfd2_args { register_t dummy; }; struct linux_epoll_create1_args { - char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; + register_t dummy; }; struct linux_dup3_args { register_t dummy; Modified: head/sys/amd64/linux32/linux32_syscall.h ============================================================================== --- head/sys/amd64/linux32/linux32_syscall.h Wed Sep 18 18:48:33 2013 (r255675) +++ head/sys/amd64/linux32/linux32_syscall.h Wed Sep 18 18:49:26 2013 (r255676) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 255672 2013-09-18 17:56:04Z rdivacky + * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 255675 2013-09-18 18:48:33Z rdivacky */ #define LINUX_SYS_exit 1 Modified: head/sys/amd64/linux32/linux32_syscalls.c ============================================================================== --- head/sys/amd64/linux32/linux32_syscalls.c Wed Sep 18 18:48:33 2013 (r255675) +++ head/sys/amd64/linux32/linux32_syscalls.c Wed Sep 18 18:49:26 2013 (r255676) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 255672 2013-09-18 17:56:04Z rdivacky + * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 255675 2013-09-18 18:48:33Z rdivacky */ const char *linux_syscallnames[] = { Modified: head/sys/amd64/linux32/linux32_sysent.c ============================================================================== --- head/sys/amd64/linux32/linux32_sysent.c Wed Sep 18 18:48:33 2013 (r255675) +++ head/sys/amd64/linux32/linux32_sysent.c Wed Sep 18 18:49:26 2013 (r255676) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 255672 2013-09-18 17:56:04Z rdivacky + * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 255675 2013-09-18 18:48:33Z rdivacky */ #include "opt_compat.h" @@ -273,9 +273,9 @@ struct sysent linux_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 251 = */ { AS(linux_exit_group_args), (sy_call_t *)linux_exit_group, AUE_EXIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 252 = linux_exit_group */ { 0, (sy_call_t *)linux_lookup_dcookie, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 253 = linux_lookup_dcookie */ - { AS(linux_epoll_create_args), (sy_call_t *)linux_epoll_create, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 254 = linux_epoll_create */ - { AS(linux_epoll_ctl_args), (sy_call_t *)linux_epoll_ctl, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 255 = linux_epoll_ctl */ - { AS(linux_epoll_wait_args), (sy_call_t *)linux_epoll_wait, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 256 = linux_epoll_wait */ + { 0, (sy_call_t *)linux_epoll_create, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 254 = linux_epoll_create */ + { 0, (sy_call_t *)linux_epoll_ctl, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 255 = linux_epoll_ctl */ + { 0, (sy_call_t *)linux_epoll_wait, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 256 = linux_epoll_wait */ { 0, (sy_call_t *)linux_remap_file_pages, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 257 = linux_remap_file_pages */ { AS(linux_set_tid_address_args), (sy_call_t *)linux_set_tid_address, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 258 = linux_set_tid_address */ { 0, (sy_call_t *)linux_timer_create, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 259 = linux_timer_create */ @@ -348,7 +348,7 @@ struct sysent linux_sysent[] = { { 0, (sy_call_t *)linux_timerfd_gettime, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 326 = linux_timerfd_gettime */ { 0, (sy_call_t *)linux_signalfd4, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 327 = linux_signalfd4 */ { 0, (sy_call_t *)linux_eventfd2, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 328 = linux_eventfd2 */ - { AS(linux_epoll_create1_args), (sy_call_t *)linux_epoll_create1, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 329 = linux_epoll_create1 */ + { 0, (sy_call_t *)linux_epoll_create1, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 329 = linux_epoll_create1 */ { 0, (sy_call_t *)linux_dup3, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 330 = linux_dup3 */ { AS(linux_pipe2_args), (sy_call_t *)linux_pipe2, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 331 = linux_pipe2 */ { 0, (sy_call_t *)linux_inotify_init1, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 332 = linux_inotify_init1 */ Modified: head/sys/amd64/linux32/linux32_systrace_args.c ============================================================================== --- head/sys/amd64/linux32/linux32_systrace_args.c Wed Sep 18 18:48:33 2013 (r255675) +++ head/sys/amd64/linux32/linux32_systrace_args.c Wed Sep 18 18:49:26 2013 (r255676) @@ -1693,29 +1693,17 @@ systrace_args(int sysnum, void *params, } /* linux_epoll_create */ case 254: { - struct linux_epoll_create_args *p = params; - iarg[0] = p->size; /* l_int */ - *n_args = 1; + *n_args = 0; break; } /* linux_epoll_ctl */ case 255: { - struct linux_epoll_ctl_args *p = params; - iarg[0] = p->epfd; /* l_int */ - iarg[1] = p->op; /* l_int */ - iarg[2] = p->fd; /* l_int */ - uarg[3] = (intptr_t) p->event; /* struct linux_epoll_event * */ - *n_args = 4; + *n_args = 0; break; } /* linux_epoll_wait */ case 256: { - struct linux_epoll_wait_args *p = params; - iarg[0] = p->epfd; /* l_int */ - uarg[1] = (intptr_t) p->events; /* struct linux_epoll_event * */ - iarg[2] = p->maxevents; /* l_int */ - iarg[3] = p->timeout; /* l_int */ - *n_args = 4; + *n_args = 0; break; } /* linux_remap_file_pages */ @@ -2171,9 +2159,7 @@ systrace_args(int sysnum, void *params, } /* linux_epoll_create1 */ case 329: { - struct linux_epoll_create1_args *p = params; - iarg[0] = p->flags; /* l_int */ - *n_args = 1; + *n_args = 0; break; } /* linux_dup3 */ @@ -4821,51 +4807,12 @@ systrace_entry_setargdesc(int sysnum, in break; /* linux_epoll_create */ case 254: - switch(ndx) { - case 0: - p = "l_int"; - break; - default: - break; - }; break; /* linux_epoll_ctl */ case 255: - switch(ndx) { - case 0: - p = "l_int"; - break; - case 1: - p = "l_int"; - break; - case 2: - p = "l_int"; - break; - case 3: - p = "struct linux_epoll_event *"; - break; - default: - break; - }; break; /* linux_epoll_wait */ case 256: - switch(ndx) { - case 0: - p = "l_int"; - break; - case 1: - p = "struct linux_epoll_event *"; - break; - case 2: - p = "l_int"; - break; - case 3: - p = "l_int"; - break; - default: - break; - }; break; /* linux_remap_file_pages */ case 257: @@ -5406,13 +5353,6 @@ systrace_entry_setargdesc(int sysnum, in break; /* linux_epoll_create1 */ case 329: - switch(ndx) { - case 0: - p = "l_int"; - break; - default: - break; - }; break; /* linux_dup3 */ case 330: @@ -6460,19 +6400,10 @@ systrace_return_setargdesc(int sysnum, i case 253: /* linux_epoll_create */ case 254: - if (ndx == 0 || ndx == 1) - p = "int"; - break; /* linux_epoll_ctl */ case 255: - if (ndx == 0 || ndx == 1) - p = "int"; - break; /* linux_epoll_wait */ case 256: - if (ndx == 0 || ndx == 1) - p = "int"; - break; /* linux_remap_file_pages */ case 257: /* linux_set_tid_address */ @@ -6687,9 +6618,6 @@ systrace_return_setargdesc(int sysnum, i case 328: /* linux_epoll_create1 */ case 329: - if (ndx == 0 || ndx == 1) - p = "int"; - break; /* linux_dup3 */ case 330: /* linux_pipe2 */ Modified: head/sys/i386/linux/linux_proto.h ============================================================================== --- head/sys/i386/linux/linux_proto.h Wed Sep 18 18:48:33 2013 (r255675) +++ head/sys/i386/linux/linux_proto.h Wed Sep 18 18:49:26 2013 (r255676) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/linux/syscalls.master 255672 2013-09-18 17:56:04Z rdivacky + * created from FreeBSD: head/sys/i386/linux/syscalls.master 255675 2013-09-18 18:48:33Z rdivacky */ #ifndef _LINUX_SYSPROTO_H_ @@ -766,19 +766,13 @@ struct linux_lookup_dcookie_args { register_t dummy; }; struct linux_epoll_create_args { - char size_l_[PADL_(l_int)]; l_int size; char size_r_[PADR_(l_int)]; + register_t dummy; }; struct linux_epoll_ctl_args { - char epfd_l_[PADL_(l_int)]; l_int epfd; char epfd_r_[PADR_(l_int)]; - char op_l_[PADL_(l_int)]; l_int op; char op_r_[PADR_(l_int)]; - char fd_l_[PADL_(l_int)]; l_int fd; char fd_r_[PADR_(l_int)]; - char event_l_[PADL_(struct linux_epoll_event *)]; struct linux_epoll_event * event; char event_r_[PADR_(struct linux_epoll_event *)]; + register_t dummy; }; struct linux_epoll_wait_args { - char epfd_l_[PADL_(l_int)]; l_int epfd; char epfd_r_[PADR_(l_int)]; - char events_l_[PADL_(struct linux_epoll_event *)]; struct linux_epoll_event * events; char events_r_[PADR_(struct linux_epoll_event *)]; - char maxevents_l_[PADL_(l_int)]; l_int maxevents; char maxevents_r_[PADR_(l_int)]; - char timeout_l_[PADL_(l_int)]; l_int timeout; char timeout_r_[PADR_(l_int)]; + register_t dummy; }; struct linux_remap_file_pages_args { register_t dummy; @@ -1063,7 +1057,7 @@ struct linux_eventfd2_args { register_t dummy; }; struct linux_epoll_create1_args { - char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; + register_t dummy; }; struct linux_dup3_args { register_t dummy; Modified: head/sys/i386/linux/linux_syscall.h ============================================================================== --- head/sys/i386/linux/linux_syscall.h Wed Sep 18 18:48:33 2013 (r255675) +++ head/sys/i386/linux/linux_syscall.h Wed Sep 18 18:49:26 2013 (r255676) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/linux/syscalls.master 255672 2013-09-18 17:56:04Z rdivacky + * created from FreeBSD: head/sys/i386/linux/syscalls.master 255675 2013-09-18 18:48:33Z rdivacky */ #define LINUX_SYS_exit 1 Modified: head/sys/i386/linux/linux_syscalls.c ============================================================================== --- head/sys/i386/linux/linux_syscalls.c Wed Sep 18 18:48:33 2013 (r255675) +++ head/sys/i386/linux/linux_syscalls.c Wed Sep 18 18:49:26 2013 (r255676) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/linux/syscalls.master 255672 2013-09-18 17:56:04Z rdivacky + * created from FreeBSD: head/sys/i386/linux/syscalls.master 255675 2013-09-18 18:48:33Z rdivacky */ const char *linux_syscallnames[] = { Modified: head/sys/i386/linux/linux_sysent.c ============================================================================== --- head/sys/i386/linux/linux_sysent.c Wed Sep 18 18:48:33 2013 (r255675) +++ head/sys/i386/linux/linux_sysent.c Wed Sep 18 18:49:26 2013 (r255676) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/linux/syscalls.master 255672 2013-09-18 17:56:04Z rdivacky + * created from FreeBSD: head/sys/i386/linux/syscalls.master 255675 2013-09-18 18:48:33Z rdivacky */ #include @@ -272,9 +272,9 @@ struct sysent linux_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 251 = */ { AS(linux_exit_group_args), (sy_call_t *)linux_exit_group, AUE_EXIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 252 = linux_exit_group */ { 0, (sy_call_t *)linux_lookup_dcookie, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 253 = linux_lookup_dcookie */ - { AS(linux_epoll_create_args), (sy_call_t *)linux_epoll_create, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 254 = linux_epoll_create */ - { AS(linux_epoll_ctl_args), (sy_call_t *)linux_epoll_ctl, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 255 = linux_epoll_ctl */ - { AS(linux_epoll_wait_args), (sy_call_t *)linux_epoll_wait, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 256 = linux_epoll_wait */ + { 0, (sy_call_t *)linux_epoll_create, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 254 = linux_epoll_create */ + { 0, (sy_call_t *)linux_epoll_ctl, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 255 = linux_epoll_ctl */ + { 0, (sy_call_t *)linux_epoll_wait, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 256 = linux_epoll_wait */ { 0, (sy_call_t *)linux_remap_file_pages, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 257 = linux_remap_file_pages */ { AS(linux_set_tid_address_args), (sy_call_t *)linux_set_tid_address, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 258 = linux_set_tid_address */ { AS(linux_timer_create_args), (sy_call_t *)linux_timer_create, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 259 = linux_timer_create */ @@ -347,7 +347,7 @@ struct sysent linux_sysent[] = { { 0, (sy_call_t *)linux_timerfd_gettime, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 326 = linux_timerfd_gettime */ { 0, (sy_call_t *)linux_signalfd4, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 327 = linux_signalfd4 */ { 0, (sy_call_t *)linux_eventfd2, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 328 = linux_eventfd2 */ - { AS(linux_epoll_create1_args), (sy_call_t *)linux_epoll_create1, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 329 = linux_epoll_create1 */ + { 0, (sy_call_t *)linux_epoll_create1, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 329 = linux_epoll_create1 */ { 0, (sy_call_t *)linux_dup3, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 330 = linux_dup3 */ { AS(linux_pipe2_args), (sy_call_t *)linux_pipe2, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 331 = linux_pipe2 */ { 0, (sy_call_t *)linux_inotify_init1, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 332 = linux_inotify_init1 */ Modified: head/sys/i386/linux/linux_systrace_args.c ============================================================================== --- head/sys/i386/linux/linux_systrace_args.c Wed Sep 18 18:48:33 2013 (r255675) +++ head/sys/i386/linux/linux_systrace_args.c Wed Sep 18 18:49:26 2013 (r255676) @@ -1743,29 +1743,17 @@ systrace_args(int sysnum, void *params, } /* linux_epoll_create */ case 254: { - struct linux_epoll_create_args *p = params; - iarg[0] = p->size; /* l_int */ - *n_args = 1; + *n_args = 0; break; } /* linux_epoll_ctl */ case 255: { - struct linux_epoll_ctl_args *p = params; - iarg[0] = p->epfd; /* l_int */ - iarg[1] = p->op; /* l_int */ - iarg[2] = p->fd; /* l_int */ - uarg[3] = (intptr_t) p->event; /* struct linux_epoll_event * */ - *n_args = 4; + *n_args = 0; break; } /* linux_epoll_wait */ case 256: { - struct linux_epoll_wait_args *p = params; - iarg[0] = p->epfd; /* l_int */ - uarg[1] = (intptr_t) p->events; /* struct linux_epoll_event * */ - iarg[2] = p->maxevents; /* l_int */ - iarg[3] = p->timeout; /* l_int */ - *n_args = 4; + *n_args = 0; break; } /* linux_remap_file_pages */ @@ -2262,9 +2250,7 @@ systrace_args(int sysnum, void *params, } /* linux_epoll_create1 */ case 329: { - struct linux_epoll_create1_args *p = params; - iarg[0] = p->flags; /* l_int */ - *n_args = 1; + *n_args = 0; break; } /* linux_dup3 */ @@ -4983,51 +4969,12 @@ systrace_entry_setargdesc(int sysnum, in break; /* linux_epoll_create */ case 254: - switch(ndx) { - case 0: - p = "l_int"; - break; - default: - break; - }; break; /* linux_epoll_ctl */ case 255: - switch(ndx) { - case 0: - p = "l_int"; - break; - case 1: - p = "l_int"; - break; - case 2: - p = "l_int"; - break; - case 3: - p = "struct linux_epoll_event *"; - break; - default: - break; - }; break; /* linux_epoll_wait */ case 256: - switch(ndx) { - case 0: - p = "l_int"; - break; - case 1: - p = "struct linux_epoll_event *"; - break; - case 2: - p = "l_int"; - break; - case 3: - p = "l_int"; - break; - default: - break; - }; break; /* linux_remap_file_pages */ case 257: @@ -5702,13 +5649,6 @@ systrace_entry_setargdesc(int sysnum, in break; /* linux_epoll_create1 */ case 329: - switch(ndx) { - case 0: - p = "l_int"; - break; - default: - break; - }; break; /* linux_dup3 */ case 330: @@ -6785,19 +6725,10 @@ systrace_return_setargdesc(int sysnum, i case 253: /* linux_epoll_create */ case 254: - if (ndx == 0 || ndx == 1) - p = "int"; - break; /* linux_epoll_ctl */ case 255: - if (ndx == 0 || ndx == 1) - p = "int"; - break; /* linux_epoll_wait */ case 256: - if (ndx == 0 || ndx == 1) - p = "int"; - break; /* linux_remap_file_pages */ case 257: /* linux_set_tid_address */ @@ -7045,9 +6976,6 @@ systrace_return_setargdesc(int sysnum, i case 328: /* linux_epoll_create1 */ case 329: - if (ndx == 0 || ndx == 1) - p = "int"; - break; /* linux_dup3 */ case 330: /* linux_pipe2 */ From owner-svn-src-all@FreeBSD.ORG Wed Sep 18 19:26:10 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8A1CEE68; Wed, 18 Sep 2013 19:26:10 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 76BBA20E1; Wed, 18 Sep 2013 19:26:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8IJQAZR001955; Wed, 18 Sep 2013 19:26:10 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8IJQ97A001946; Wed, 18 Sep 2013 19:26:09 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201309181926.r8IJQ97A001946@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 18 Sep 2013 19:26:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255677 - in head/sys: amd64/amd64 arm/arm i386/i386 kern sparc64/sparc64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Sep 2013 19:26:10 -0000 Author: pjd Date: Wed Sep 18 19:26:08 2013 New Revision: 255677 URL: http://svnweb.freebsd.org/changeset/base/255677 Log: Fix panic in ktrcapfail() when no capability rights are passed. While here, correct all consumers to pass NULL instead of 0 as we pass capability rights as pointers now, not uint64_t. Reported by: Daniel Peyrolon Tested by: Daniel Peyrolon Approved by: re (marius) Modified: head/sys/amd64/amd64/sys_machdep.c head/sys/arm/arm/sys_machdep.c head/sys/i386/i386/sys_machdep.c head/sys/kern/kern_ktrace.c head/sys/kern/vfs_lookup.c head/sys/sparc64/sparc64/sys_machdep.c Modified: head/sys/amd64/amd64/sys_machdep.c ============================================================================== --- head/sys/amd64/amd64/sys_machdep.c Wed Sep 18 18:49:26 2013 (r255676) +++ head/sys/amd64/amd64/sys_machdep.c Wed Sep 18 19:26:08 2013 (r255677) @@ -209,7 +209,7 @@ sysarch(td, uap) default: #ifdef KTRACE if (KTRPOINT(td, KTR_CAPFAIL)) - ktrcapfail(CAPFAIL_SYSCALL, 0, 0); + ktrcapfail(CAPFAIL_SYSCALL, NULL, NULL); #endif return (ECAPMODE); } Modified: head/sys/arm/arm/sys_machdep.c ============================================================================== --- head/sys/arm/arm/sys_machdep.c Wed Sep 18 18:49:26 2013 (r255676) +++ head/sys/arm/arm/sys_machdep.c Wed Sep 18 19:26:08 2013 (r255677) @@ -138,7 +138,7 @@ sysarch(td, uap) default: #ifdef KTRACE if (KTRPOINT(td, KTR_CAPFAIL)) - ktrcapfail(CAPFAIL_SYSCALL, 0, 0); + ktrcapfail(CAPFAIL_SYSCALL, NULL, NULL); #endif return (ECAPMODE); } Modified: head/sys/i386/i386/sys_machdep.c ============================================================================== --- head/sys/i386/i386/sys_machdep.c Wed Sep 18 18:49:26 2013 (r255676) +++ head/sys/i386/i386/sys_machdep.c Wed Sep 18 19:26:08 2013 (r255677) @@ -132,7 +132,7 @@ sysarch(td, uap) default: #ifdef KTRACE if (KTRPOINT(td, KTR_CAPFAIL)) - ktrcapfail(CAPFAIL_SYSCALL, 0, 0); + ktrcapfail(CAPFAIL_SYSCALL, NULL, NULL); #endif return (ECAPMODE); } Modified: head/sys/kern/kern_ktrace.c ============================================================================== --- head/sys/kern/kern_ktrace.c Wed Sep 18 18:49:26 2013 (r255676) +++ head/sys/kern/kern_ktrace.c Wed Sep 18 19:26:08 2013 (r255677) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include "opt_ktrace.h" #include +#include #include #include #include @@ -791,8 +792,14 @@ ktrcapfail(type, needed, held) return; kcf = &req->ktr_data.ktr_cap_fail; kcf->cap_type = type; - kcf->cap_needed = *needed; - kcf->cap_held = *held; + if (needed != NULL) + kcf->cap_needed = *needed; + else + cap_rights_init(&kcf->cap_needed); + if (held != NULL) + kcf->cap_held = *held; + else + cap_rights_init(&kcf->cap_held); ktr_enqueuerequest(td, req); ktrace_exit(td); } Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Wed Sep 18 18:49:26 2013 (r255676) +++ head/sys/kern/vfs_lookup.c Wed Sep 18 19:26:08 2013 (r255677) @@ -178,7 +178,7 @@ namei(struct nameidata *ndp) if (ndp->ni_dirfd == AT_FDCWD) { #ifdef KTRACE if (KTRPOINT(td, KTR_CAPFAIL)) - ktrcapfail(CAPFAIL_LOOKUP, 0, 0); + ktrcapfail(CAPFAIL_LOOKUP, NULL, NULL); #endif error = ECAPMODE; } @@ -284,7 +284,7 @@ namei(struct nameidata *ndp) if (ndp->ni_strictrelative != 0) { #ifdef KTRACE if (KTRPOINT(curthread, KTR_CAPFAIL)) - ktrcapfail(CAPFAIL_LOOKUP, 0, 0); + ktrcapfail(CAPFAIL_LOOKUP, NULL, NULL); #endif return (ENOTCAPABLE); } @@ -640,7 +640,7 @@ dirloop: if (ndp->ni_strictrelative != 0) { #ifdef KTRACE if (KTRPOINT(curthread, KTR_CAPFAIL)) - ktrcapfail(CAPFAIL_LOOKUP, 0, 0); + ktrcapfail(CAPFAIL_LOOKUP, NULL, NULL); #endif error = ENOTCAPABLE; goto bad; Modified: head/sys/sparc64/sparc64/sys_machdep.c ============================================================================== --- head/sys/sparc64/sparc64/sys_machdep.c Wed Sep 18 18:49:26 2013 (r255676) +++ head/sys/sparc64/sparc64/sys_machdep.c Wed Sep 18 19:26:08 2013 (r255677) @@ -71,7 +71,7 @@ sysarch(struct thread *td, struct sysarc default: #ifdef KTRACE if (KTRPOINT(td, KTR_CAPFAIL)) - ktrcapfail(CAPFAIL_SYSCALL, 0, 0); + ktrcapfail(CAPFAIL_SYSCALL, NULL, NULL); #endif return (ECAPMODE); } From owner-svn-src-all@FreeBSD.ORG Wed Sep 18 21:15:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 78A348FC; Wed, 18 Sep 2013 21:15:23 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6451526B3; Wed, 18 Sep 2013 21:15:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8ILFNNn059982; Wed, 18 Sep 2013 21:15:23 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8ILFMrL059976; Wed, 18 Sep 2013 21:15:22 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201309182115.r8ILFMrL059976@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 18 Sep 2013 21:15:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255678 - in head: sys/dev/iscsi usr.sbin/ctld usr.sbin/iscsid X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Sep 2013 21:15:23 -0000 Author: trasz Date: Wed Sep 18 21:15:21 2013 New Revision: 255678 URL: http://svnweb.freebsd.org/changeset/base/255678 Log: Fix several problems in the new iSCSI stack; this includes interoperability fix for LIO (Linux target), removing possibility for the target to avoid mutual CHAP by choosing to skip authentication altogether, and fixing truncated error messages in iscsictl(8) output. This also fixes several of the problems found with Coverity. Note that this change requires world rebuild. Coverity CID: 1088038, 1087998, 1087990, 1088004, 1088044, 1088041, 1088040 Approved by: re (blanket) Sponsored by: FreeBSD Foundation Modified: head/sys/dev/iscsi/iscsi.c head/sys/dev/iscsi/iscsi_ioctl.h head/usr.sbin/ctld/ctld.c head/usr.sbin/ctld/kernel.c head/usr.sbin/iscsid/iscsid.c head/usr.sbin/iscsid/login.c Modified: head/sys/dev/iscsi/iscsi.c ============================================================================== --- head/sys/dev/iscsi/iscsi.c Wed Sep 18 19:26:08 2013 (r255677) +++ head/sys/dev/iscsi/iscsi.c Wed Sep 18 21:15:21 2013 (r255678) @@ -1513,8 +1513,13 @@ iscsi_ioctl_session_add(struct iscsi_sof memcpy(&is->is_conf, &isa->isa_conf, sizeof(is->is_conf)); if (is->is_conf.isc_initiator[0] == '\0' || - is->is_conf.isc_target == '\0' || - is->is_conf.isc_target_addr == '\0') { + is->is_conf.isc_target_addr[0] == '\0') { + free(is, M_ISCSI); + return (EINVAL); + } + + if ((is->is_conf.isc_discovery != 0 && is->is_conf.isc_target[0] != 0) || + (is->is_conf.isc_discovery == 0 && is->is_conf.isc_target[0] == 0)) { free(is, M_ISCSI); return (EINVAL); } @@ -1525,11 +1530,22 @@ iscsi_ioctl_session_add(struct iscsi_sof * Prevent duplicates. */ TAILQ_FOREACH(is2, &sc->sc_sessions, is_next) { - if (strcmp(is2->is_conf.isc_target, - is->is_conf.isc_target) == 0) { - sx_xunlock(&sc->sc_lock); - return (EBUSY); - } + if (!!is->is_conf.isc_discovery != + !!is2->is_conf.isc_discovery) + continue; + + if (strcmp(is->is_conf.isc_target_addr, + is2->is_conf.isc_target_addr) != 0) + continue; + + if (is->is_conf.isc_discovery == 0 && + strcmp(is->is_conf.isc_target, + is2->is_conf.isc_target) != 0) + continue; + + sx_xunlock(&sc->sc_lock); + free(is, M_ISCSI); + return (EBUSY); } is->is_conn = icl_conn_new(); @@ -1936,9 +1952,9 @@ iscsi_action(struct cam_sim *sim, union cpi->max_lun = 255; //cpi->initiator_id = 0; /* XXX */ cpi->initiator_id = 64; /* XXX */ - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "iSCSI", HBA_IDLEN); - strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strlcpy(cpi->hba_vid, "iSCSI", HBA_IDLEN); + strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); cpi->bus_id = cam_sim_bus(sim); cpi->base_transfer_speed = 150000; /* XXX */ Modified: head/sys/dev/iscsi/iscsi_ioctl.h ============================================================================== --- head/sys/dev/iscsi/iscsi_ioctl.h Wed Sep 18 19:26:08 2013 (r255677) +++ head/sys/dev/iscsi/iscsi_ioctl.h Wed Sep 18 21:15:21 2013 (r255678) @@ -43,7 +43,7 @@ #define ISCSI_ADDR_LEN 47 /* INET6_ADDRSTRLEN + '\0' */ #define ISCSI_ALIAS_LEN 256 /* XXX: Where did it come from? */ #define ISCSI_SECRET_LEN 17 /* 16 + '\0' */ -#define ISCSI_REASON_LEN 32 +#define ISCSI_REASON_LEN 64 #define ISCSI_DIGEST_NONE 0 #define ISCSI_DIGEST_CRC32C 1 Modified: head/usr.sbin/ctld/ctld.c ============================================================================== --- head/usr.sbin/ctld/ctld.c Wed Sep 18 19:26:08 2013 (r255677) +++ head/usr.sbin/ctld/ctld.c Wed Sep 18 21:15:21 2013 (r255678) @@ -348,12 +348,10 @@ portal_group_new(struct conf *conf, cons { struct portal_group *pg; - if (name != NULL) { - pg = portal_group_find(conf, name); - if (pg != NULL) { - log_warnx("duplicated portal-group \"%s\"", name); - return (NULL); - } + pg = portal_group_find(conf, name); + if (pg != NULL) { + log_warnx("duplicated portal-group \"%s\"", name); + return (NULL); } pg = calloc(1, sizeof(*pg)); Modified: head/usr.sbin/ctld/kernel.c ============================================================================== --- head/usr.sbin/ctld/kernel.c Wed Sep 18 19:26:08 2013 (r255677) +++ head/usr.sbin/ctld/kernel.c Wed Sep 18 21:15:21 2013 (r255678) @@ -628,7 +628,7 @@ kernel_port_on(void) struct ctl_port_entry entry; int error; - bzero(&entry, sizeof(&entry)); + bzero(&entry, sizeof(entry)); entry.port_type = CTL_PORT_ISCSI; entry.targ_port = -1; @@ -648,7 +648,7 @@ kernel_port_off(void) struct ctl_port_entry entry; int error; - bzero(&entry, sizeof(&entry)); + bzero(&entry, sizeof(entry)); entry.port_type = CTL_PORT_ISCSI; entry.targ_port = -1; Modified: head/usr.sbin/iscsid/iscsid.c ============================================================================== --- head/usr.sbin/iscsid/iscsid.c Wed Sep 18 19:26:08 2013 (r255677) +++ head/usr.sbin/iscsid/iscsid.c Wed Sep 18 21:15:21 2013 (r255678) @@ -156,7 +156,7 @@ connection_new(unsigned int session_id, struct addrinfo *from_ai, *to_ai; const char *from_addr, *to_addr; #ifdef ICL_KERNEL_PROXY - struct iscsi_daemon_connect *idc; + struct iscsi_daemon_connect idc; #endif int error; @@ -195,25 +195,22 @@ connection_new(unsigned int session_id, #ifdef ICL_KERNEL_PROXY - idc = calloc(1, sizeof(*idc)); - if (idc == NULL) - log_err(1, "calloc"); - - idc->idc_session_id = conn->conn_session_id; + memset(&idc, 0, sizeof(idc)); + idc.idc_session_id = conn->conn_session_id; if (conn->conn_conf.isc_iser) - idc->idc_iser = 1; - idc->idc_domain = to_ai->ai_family; - idc->idc_socktype = to_ai->ai_socktype; - idc->idc_protocol = to_ai->ai_protocol; + idc.idc_iser = 1; + idc.idc_domain = to_ai->ai_family; + idc.idc_socktype = to_ai->ai_socktype; + idc.idc_protocol = to_ai->ai_protocol; if (from_ai != NULL) { - idc->idc_from_addr = from_ai->ai_addr; - idc->idc_from_addrlen = from_ai->ai_addrlen; + idc.idc_from_addr = from_ai->ai_addr; + idc.idc_from_addrlen = from_ai->ai_addrlen; } - idc->idc_to_addr = to_ai->ai_addr; - idc->idc_to_addrlen = to_ai->ai_addrlen; + idc.idc_to_addr = to_ai->ai_addr; + idc.idc_to_addrlen = to_ai->ai_addrlen; log_debugx("connecting to %s using ICL kernel proxy", to_addr); - error = ioctl(iscsi_fd, ISCSIDCONNECT, idc); + error = ioctl(iscsi_fd, ISCSIDCONNECT, &idc); if (error != 0) { fail(conn, strerror(errno)); log_err(1, "failed to connect to %s using ICL kernel proxy", @@ -257,31 +254,29 @@ connection_new(unsigned int session_id, static void handoff(struct connection *conn) { - struct iscsi_daemon_handoff *idh; + struct iscsi_daemon_handoff idh; int error; log_debugx("handing off connection to the kernel"); - idh = calloc(1, sizeof(*idh)); - if (idh == NULL) - log_err(1, "calloc"); - idh->idh_session_id = conn->conn_session_id; + memset(&idh, 0, sizeof(idh)); + idh.idh_session_id = conn->conn_session_id; #ifndef ICL_KERNEL_PROXY - idh->idh_socket = conn->conn_socket; + idh.idh_socket = conn->conn_socket; #endif - strlcpy(idh->idh_target_alias, conn->conn_target_alias, - sizeof(idh->idh_target_alias)); - memcpy(idh->idh_isid, conn->conn_isid, sizeof(idh->idh_isid)); - idh->idh_statsn = conn->conn_statsn; - idh->idh_header_digest = conn->conn_header_digest; - idh->idh_data_digest = conn->conn_data_digest; - idh->idh_initial_r2t = conn->conn_initial_r2t; - idh->idh_immediate_data = conn->conn_immediate_data; - idh->idh_max_data_segment_length = conn->conn_max_data_segment_length; - idh->idh_max_burst_length = conn->conn_max_burst_length; - idh->idh_first_burst_length = conn->conn_first_burst_length; + strlcpy(idh.idh_target_alias, conn->conn_target_alias, + sizeof(idh.idh_target_alias)); + memcpy(idh.idh_isid, conn->conn_isid, sizeof(idh.idh_isid)); + idh.idh_statsn = conn->conn_statsn; + idh.idh_header_digest = conn->conn_header_digest; + idh.idh_data_digest = conn->conn_data_digest; + idh.idh_initial_r2t = conn->conn_initial_r2t; + idh.idh_immediate_data = conn->conn_immediate_data; + idh.idh_max_data_segment_length = conn->conn_max_data_segment_length; + idh.idh_max_burst_length = conn->conn_max_burst_length; + idh.idh_first_burst_length = conn->conn_first_burst_length; - error = ioctl(conn->conn_iscsi_fd, ISCSIDHANDOFF, idh); + error = ioctl(conn->conn_iscsi_fd, ISCSIDHANDOFF, &idh); if (error != 0) log_err(1, "ISCSIDHANDOFF"); } @@ -289,17 +284,14 @@ handoff(struct connection *conn) void fail(const struct connection *conn, const char *reason) { - struct iscsi_daemon_fail *idf; + struct iscsi_daemon_fail idf; int error; - idf = calloc(1, sizeof(*idf)); - if (idf == NULL) - log_err(1, "calloc"); - - idf->idf_session_id = conn->conn_session_id; - strlcpy(idf->idf_reason, reason, sizeof(idf->idf_reason)); + memset(&idf, 0, sizeof(idf)); + idf.idf_session_id = conn->conn_session_id; + strlcpy(idf.idf_reason, reason, sizeof(idf.idf_reason)); - error = ioctl(conn->conn_iscsi_fd, ISCSIDFAIL, idf); + error = ioctl(conn->conn_iscsi_fd, ISCSIDFAIL, &idf); if (error != 0) log_err(1, "ISCSIDFAIL"); } @@ -402,7 +394,7 @@ set_timeout(int timeout) } static void -handle_request(int iscsi_fd, struct iscsi_daemon_request *request, int timeout) +handle_request(int iscsi_fd, const struct iscsi_daemon_request *request, int timeout) { struct connection *conn; @@ -468,7 +460,7 @@ main(int argc, char **argv) struct pidfh *pidfh; pid_t pid, otherpid; const char *pidfile_path = DEFAULT_PIDFILE; - struct iscsi_daemon_request *request; + struct iscsi_daemon_request request; while ((ch = getopt(argc, argv, "P:dl:m:t:")) != -1) { switch (ch) { @@ -533,11 +525,8 @@ main(int argc, char **argv) for (;;) { log_debugx("waiting for request from the kernel"); - request = calloc(1, sizeof(*request)); - if (request == NULL) - log_err(1, "calloc"); - - error = ioctl(iscsi_fd, ISCSIDWAIT, request); + memset(&request, 0, sizeof(request)); + error = ioctl(iscsi_fd, ISCSIDWAIT, &request); if (error != 0) { if (errno == EINTR) { nchildren -= wait_for_children(false); @@ -573,7 +562,7 @@ main(int argc, char **argv) } pidfile_close(pidfh); - handle_request(iscsi_fd, request, timeout); + handle_request(iscsi_fd, &request, timeout); } return (0); Modified: head/usr.sbin/iscsid/login.c ============================================================================== --- head/usr.sbin/iscsid/login.c Wed Sep 18 19:26:08 2013 (r255677) +++ head/usr.sbin/iscsid/login.c Wed Sep 18 21:15:21 2013 (r255678) @@ -504,23 +504,37 @@ login_negotiate(struct connection *conn) login_set_csg(request, BHSLR_STAGE_OPERATIONAL_NEGOTIATION); login_set_nsg(request, BHSLR_STAGE_FULL_FEATURE_PHASE); request_keys = keys_new(); + + /* + * The following keys are irrelevant for discovery sessions. + */ if (conn->conn_conf.isc_discovery == 0) { if (conn->conn_conf.isc_header_digest != 0) keys_add(request_keys, "HeaderDigest", "CRC32C"); + else + keys_add(request_keys, "HeaderDigest", "None"); if (conn->conn_conf.isc_data_digest != 0) keys_add(request_keys, "DataDigest", "CRC32C"); + else + keys_add(request_keys, "DataDigest", "None"); keys_add(request_keys, "ImmediateData", "Yes"); keys_add_int(request_keys, "MaxBurstLength", ISCSI_MAX_DATA_SEGMENT_LENGTH); keys_add_int(request_keys, "FirstBurstLength", ISCSI_MAX_DATA_SEGMENT_LENGTH); + keys_add(request_keys, "InitialR2T", "Yes"); + } else { + keys_add(request_keys, "HeaderDigest", "None"); + keys_add(request_keys, "DataDigest", "None"); } - keys_add(request_keys, "InitialR2T", "Yes"); + keys_add_int(request_keys, "MaxRecvDataSegmentLength", ISCSI_MAX_DATA_SEGMENT_LENGTH); keys_add(request_keys, "DefaultTime2Wait", "0"); keys_add(request_keys, "DefaultTime2Retain", "0"); + keys_add(request_keys, "ErrorRecoveryLevel", "0"); + keys_add(request_keys, "MaxOutstandingR2T", "1"); keys_save(request_keys, request); keys_delete(request_keys); request_keys = NULL; @@ -776,10 +790,26 @@ login(struct connection *conn) bhslr->bhslr_flags |= BHSLR_FLAGS_TRANSIT; request_keys = keys_new(); - if (conn->conn_conf.isc_user[0] == '\0') + if (conn->conn_conf.isc_mutual_user[0] != '\0') { + keys_add(request_keys, "AuthMethod", "CHAP"); + } else if (conn->conn_conf.isc_user[0] != '\0') { + /* + * Give target a chance to skip authentication if it + * doesn't feel like it. + * + * None is first, CHAP second; this is to work around + * what seems to be LIO (Linux target) bug: otherwise, + * if target is configured with no authentication, + * and we are configured to authenticate, the target + * will erroneously respond with AuthMethod=CHAP + * instead of AuthMethod=None, and will subsequently + * fail the connection. This usually happens with + * Discovery sessions, which default to no authentication. + */ + keys_add(request_keys, "AuthMethod", "None,CHAP"); + } else { keys_add(request_keys, "AuthMethod", "None"); - else - keys_add(request_keys, "AuthMethod", "CHAP,None"); + } keys_add(request_keys, "InitiatorName", conn->conn_conf.isc_initiator); if (conn->conn_conf.isc_initiator_alias[0] != '\0') { @@ -825,9 +855,14 @@ login(struct connection *conn) bhslr2 = (struct iscsi_bhs_login_response *)response->pdu_bhs; if ((bhslr2->bhslr_flags & BHSLR_FLAGS_TRANSIT) != 0 && login_nsg(response) == BHSLR_STAGE_OPERATIONAL_NEGOTIATION) { + if (conn->conn_conf.isc_mutual_user[0] != '\0') { + log_errx(1, "target requested transition " + "to operational negotiation, but we require " + "mutual CHAP"); + } + log_debugx("target requested transition " "to operational negotiation"); - keys_delete(response_keys); pdu_delete(response); login_negotiate(conn); @@ -838,6 +873,11 @@ login(struct connection *conn) if (auth_method == NULL) log_errx(1, "received response without AuthMethod"); if (strcmp(auth_method, "None") == 0) { + if (conn->conn_conf.isc_mutual_user[0] != '\0') { + log_errx(1, "target does not require authantication, " + "but we require mutual CHAP"); + } + log_debugx("target does not require authentication"); keys_delete(response_keys); pdu_delete(response); From owner-svn-src-all@FreeBSD.ORG Thu Sep 19 00:18:26 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 43CC5ACE; Thu, 19 Sep 2013 00:18:26 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 310E82ECE; Thu, 19 Sep 2013 00:18:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8J0IQw3059094; Thu, 19 Sep 2013 00:18:26 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8J0IQeR059092; Thu, 19 Sep 2013 00:18:26 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201309190018.r8J0IQeR059092@svn.freebsd.org> From: Kirk McKusick Date: Thu, 19 Sep 2013 00:18:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r255681 - stable/8/sys/ufs/ufs X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Sep 2013 00:18:26 -0000 Author: mckusick Date: Thu Sep 19 00:18:25 2013 New Revision: 255681 URL: http://svnweb.freebsd.org/changeset/base/255681 Log: MFC of 253998: This bug fix is in a code path in rename taken when there is a collision between a rename and an open system call for the same target file. Here, rename releases its vnode references, waits for the open to finish, and then restarts by reacquiring its needed vnode locks. In this case, rename was unlocking but failing to release its reference to one of its held vnodes. The effect was that even after all the actual references to the vnode had gone, the vnode still showed active references. For files that had been removed, their space was not reclaimed until the filesystem was forcibly unmounted. This bug manifested itself in the Postgres server which would leak/lose hundreds of files per day amounting to many gigabytes of disk space. This bug required shutting down Postgres, forcibly unmounting its filesystem, remounting its filesystem and restarting Postgres every few days to recover the lost space. Reported by: Dan Thomas and Palle Girgensohn Bug-fix by: kib Tested by: Dan Thomas and Palle Girgensohn Modified: stable/8/sys/ufs/ufs/ufs_vnops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/ufs/ (props changed) Modified: stable/8/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- stable/8/sys/ufs/ufs/ufs_vnops.c Wed Sep 18 23:02:38 2013 (r255680) +++ stable/8/sys/ufs/ufs/ufs_vnops.c Thu Sep 19 00:18:25 2013 (r255681) @@ -1242,7 +1242,7 @@ relock: error = VFS_VGET(mp, ino, LK_EXCLUSIVE, &nvp); if (error != 0) goto releout; - VOP_UNLOCK(nvp, 0); + vput(nvp); atomic_add_int(&rename_restarts, 1); goto relock; } From owner-svn-src-all@FreeBSD.ORG Thu Sep 19 00:32:08 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 41A66FC6; Thu, 19 Sep 2013 00:32:08 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 14FF82FA9; Thu, 19 Sep 2013 00:32:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8J0W7Ux068463; Thu, 19 Sep 2013 00:32:07 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8J0W73N068462; Thu, 19 Sep 2013 00:32:07 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201309190032.r8J0W73N068462@svn.freebsd.org> From: Ed Maste Date: Thu, 19 Sep 2013 00:32:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255682 - head/contrib/llvm/tools/lldb/docs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Sep 2013 00:32:08 -0000 Author: emaste Date: Thu Sep 19 00:32:07 2013 New Revision: 255682 URL: http://svnweb.freebsd.org/changeset/base/255682 Log: Merge lldb man page from r188801 to contrib/llvm/tools/lldb/docs/ Approved by: re (gjb) Added: head/contrib/llvm/tools/lldb/docs/ - copied from r255671, vendor/lldb/dist/docs/ From owner-svn-src-all@FreeBSD.ORG Thu Sep 19 02:02:16 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4A9142FE; Thu, 19 Sep 2013 02:02:16 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1E26427AF; Thu, 19 Sep 2013 02:02:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8J22FlY016591; Thu, 19 Sep 2013 02:02:15 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8J22FwQ016590; Thu, 19 Sep 2013 02:02:15 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201309190202.r8J22FwQ016590@svn.freebsd.org> From: Peter Grehan Date: Thu, 19 Sep 2013 02:02:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255685 - head/sys/dev/hyperv/stordisengage X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Sep 2013 02:02:16 -0000 Author: grehan Date: Thu Sep 19 02:02:15 2013 New Revision: 255685 URL: http://svnweb.freebsd.org/changeset/base/255685 Log: Fix missing SVN properties. Approved by: re@ (hrs) Modified: Directory Properties: head/sys/dev/hyperv/stordisengage/hv_ata_pci_disengage.c (props changed) From owner-svn-src-all@FreeBSD.ORG Thu Sep 19 02:34:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9985E74F; Thu, 19 Sep 2013 02:34:52 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 86680299A; Thu, 19 Sep 2013 02:34:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8J2YqKU032960; Thu, 19 Sep 2013 02:34:52 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8J2YqNv032959; Thu, 19 Sep 2013 02:34:52 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201309190234.r8J2YqNv032959@svn.freebsd.org> From: Peter Grehan Date: Thu, 19 Sep 2013 02:34:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255686 - head/sys/dev/hyperv/stordisengage X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Sep 2013 02:34:52 -0000 Author: grehan Date: Thu Sep 19 02:34:52 2013 New Revision: 255686 URL: http://svnweb.freebsd.org/changeset/base/255686 Log: Reorder the hypervisor presence test to avoid claiming ATA disks on non hyperv systems. Reviewed by: neel, abgupta at microsoft dot com Approved by: re@ (hrs) Modified: head/sys/dev/hyperv/stordisengage/hv_ata_pci_disengage.c Modified: head/sys/dev/hyperv/stordisengage/hv_ata_pci_disengage.c ============================================================================== --- head/sys/dev/hyperv/stordisengage/hv_ata_pci_disengage.c Thu Sep 19 02:02:15 2013 (r255685) +++ head/sys/dev/hyperv/stordisengage/hv_ata_pci_disengage.c Thu Sep 19 02:34:52 2013 (r255686) @@ -92,8 +92,17 @@ static int hv_check_for_hyper_v(void); static int hv_ata_pci_probe(device_t dev) { - int ata_disk_enable = 0; - if(bootverbose) + int ata_disk_enable; + + ata_disk_enable = 0; + + /* + * Don't probe if not running in a Hyper-V environment + */ + if (!hv_check_for_hyper_v()) + return (ENXIO); + + if (bootverbose) device_printf(dev, "hv_ata_pci_probe dev_class/subslcass = %d, %d\n", pci_get_class(dev), pci_get_subclass(dev)); @@ -116,18 +125,15 @@ hv_ata_pci_probe(device_t dev) * ATA driver, the environment variable * hw_ata.disk_enable must be explicitly set to 1. */ - if (hv_check_for_hyper_v()) { - if (getenv_int("hw.ata.disk_enable", &ata_disk_enable)) { - if(bootverbose) - device_printf(dev, - "hw.ata.disk_enable flag is disabling Hyper-V" - " ATA driver support\n"); + if (getenv_int("hw.ata.disk_enable", &ata_disk_enable)) { + if(bootverbose) + device_printf(dev, + "hw.ata.disk_enable flag is disabling Hyper-V" + " ATA driver support\n"); return (ENXIO); - } - } - if(bootverbose) + if (bootverbose) device_printf(dev, "Hyper-V ATA storage driver enabled.\n"); return (BUS_PROBE_VENDOR); @@ -136,13 +142,15 @@ hv_ata_pci_probe(device_t dev) static int hv_ata_pci_attach(device_t dev) { - return 0; + + return (0); } static int hv_ata_pci_detach(device_t dev) { - return 0; + + return (0); } /** @@ -153,42 +161,44 @@ static int hv_check_for_hyper_v(void) { u_int regs[4]; - int hyper_v_detected = 0; + int hyper_v_detected; + + hyper_v_detected = 0; do_cpuid(1, regs); if (regs[2] & 0x80000000) { - /* if(a hypervisor is detected) */ - /* make sure this really is Hyper-V */ - /* we look at the CPUID info */ + /* + * if(a hypervisor is detected) + * make sure this really is Hyper-V + */ do_cpuid(HV_X64_MSR_GUEST_OS_ID, regs); hyper_v_detected = regs[0] >= HV_X64_CPUID_MIN && regs[0] <= HV_X64_CPUID_MAX && !memcmp("Microsoft Hv", ®s[1], 12); } + return (hyper_v_detected); } static device_method_t hv_ata_pci_methods[] = { - /* device interface */ - DEVMETHOD(device_probe, hv_ata_pci_probe), - DEVMETHOD(device_attach, hv_ata_pci_attach), - DEVMETHOD(device_detach, hv_ata_pci_detach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), + /* device interface */ + DEVMETHOD(device_probe, hv_ata_pci_probe), + DEVMETHOD(device_attach, hv_ata_pci_attach), + DEVMETHOD(device_detach, hv_ata_pci_detach), + DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD_END + DEVMETHOD_END }; devclass_t hv_ata_pci_devclass; static driver_t hv_ata_pci_disengage_driver = { - "pciata-disable", - hv_ata_pci_methods, - sizeof(struct ata_pci_controller), + "pciata-disable", + hv_ata_pci_methods, + sizeof(struct ata_pci_controller), }; DRIVER_MODULE(atapci_dis, pci, hv_ata_pci_disengage_driver, hv_ata_pci_devclass, NULL, NULL); MODULE_VERSION(atapci_dis, 1); MODULE_DEPEND(atapci_dis, ata, 1, 1, 1); - - From owner-svn-src-all@FreeBSD.ORG Thu Sep 19 04:20:19 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 56BC8A70; Thu, 19 Sep 2013 04:20:19 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 457BD2E7F; Thu, 19 Sep 2013 04:20:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8J4KJiO088548; Thu, 19 Sep 2013 04:20:19 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8J4KJOO088547; Thu, 19 Sep 2013 04:20:19 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201309190420.r8J4KJOO088547@svn.freebsd.org> From: Peter Grehan Date: Thu, 19 Sep 2013 04:20:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255688 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Sep 2013 04:20:19 -0000 Author: grehan Date: Thu Sep 19 04:20:18 2013 New Revision: 255688 URL: http://svnweb.freebsd.org/changeset/base/255688 Log: Use correct offset for the high byte of high memory written to RTC NVRAM. Submitted by: Bela Lubkin bela dot lubkin at tidalscale dot com Approved by: re@ (blanket) Modified: head/usr.sbin/bhyve/rtc.c Modified: head/usr.sbin/bhyve/rtc.c ============================================================================== --- head/usr.sbin/bhyve/rtc.c Thu Sep 19 02:41:00 2013 (r255687) +++ head/usr.sbin/bhyve/rtc.c Thu Sep 19 04:20:18 2013 (r255688) @@ -322,7 +322,7 @@ rtc_init(struct vmctx *ctx) himem /= m_64KB; rtc_nvram[nvoff(RTC_HMEM_LSB)] = himem; rtc_nvram[nvoff(RTC_HMEM_SB)] = himem >> 8; - rtc_nvram[nvoff(RTC_NVRAM_START)] = himem >> 16; + rtc_nvram[nvoff(RTC_HMEM_MSB)] = himem >> 16; } } From owner-svn-src-all@FreeBSD.ORG Thu Sep 19 04:29:04 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 534A0C3F; Thu, 19 Sep 2013 04:29:04 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 27B9E2EE7; Thu, 19 Sep 2013 04:29:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8J4T45x092866; Thu, 19 Sep 2013 04:29:04 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8J4T4nZ092865; Thu, 19 Sep 2013 04:29:04 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201309190429.r8J4T4nZ092865@svn.freebsd.org> From: Peter Grehan Date: Thu, 19 Sep 2013 04:29:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255689 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Sep 2013 04:29:04 -0000 Author: grehan Date: Thu Sep 19 04:29:03 2013 New Revision: 255689 URL: http://svnweb.freebsd.org/changeset/base/255689 Log: Allow the alarm hours/mins/seconds registers to be read/written, though without any action. This avoids a hypervisor exit when o/s's access these regs (Linux). Reviewed by: neel Approved by: re@ (blanket) Modified: head/usr.sbin/bhyve/rtc.c Modified: head/usr.sbin/bhyve/rtc.c ============================================================================== --- head/usr.sbin/bhyve/rtc.c Thu Sep 19 04:20:18 2013 (r255688) +++ head/usr.sbin/bhyve/rtc.c Thu Sep 19 04:29:03 2013 (r255689) @@ -46,8 +46,11 @@ __FBSDID("$FreeBSD$"); #define IO_RTC 0x70 #define RTC_SEC 0x00 /* seconds */ +#define RTC_SEC_ALARM 0x01 #define RTC_MIN 0x02 +#define RTC_MIN_ALARM 0x03 #define RTC_HRS 0x04 +#define RTC_HRS_ALARM 0x05 #define RTC_WDAY 0x06 #define RTC_DAY 0x07 #define RTC_MONTH 0x08 @@ -94,6 +97,12 @@ static uint8_t rtc_nvram[RTC_NVRAM_SZ]; /* XXX initialize these to default values as they would be from BIOS */ static uint8_t status_a, status_b; +static struct { + uint8_t hours; + uint8_t mins; + uint8_t secs; +} rtc_alarm; + static u_char const bin2bcd_data[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, @@ -148,8 +157,11 @@ rtc_addr_handler(struct vmctx *ctx, int switch (*eax & 0x7f) { case RTC_SEC: + case RTC_SEC_ALARM: case RTC_MIN: + case RTC_MIN_ALARM: case RTC_HRS: + case RTC_HRS_ALARM: case RTC_WDAY: case RTC_DAY: case RTC_MONTH: @@ -199,6 +211,15 @@ rtc_data_handler(struct vmctx *ctx, int if (in) { switch (addr) { + case RTC_SEC_ALARM: + *eax = rtc_alarm.secs; + break; + case RTC_MIN_ALARM: + *eax = rtc_alarm.mins; + break; + case RTC_HRS_ALARM: + *eax = rtc_alarm.hours; + break; case RTC_SEC: *eax = rtcout(tm.tm_sec); return (0); @@ -266,6 +287,15 @@ rtc_data_handler(struct vmctx *ctx, int case RTC_STATUSD: /* ignore write */ break; + case RTC_SEC_ALARM: + rtc_alarm.secs = *eax; + break; + case RTC_MIN_ALARM: + rtc_alarm.mins = *eax; + break; + case RTC_HRS_ALARM: + rtc_alarm.hours = *eax; + break; case RTC_SEC: case RTC_MIN: case RTC_HRS: From owner-svn-src-all@FreeBSD.ORG Thu Sep 19 04:48:27 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5E11F148; Thu, 19 Sep 2013 04:48:27 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4B7942FE2; Thu, 19 Sep 2013 04:48:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8J4mRIV003421; Thu, 19 Sep 2013 04:48:27 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8J4mQP8003412; Thu, 19 Sep 2013 04:48:26 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201309190448.r8J4mQP8003412@svn.freebsd.org> From: Peter Grehan Date: Thu, 19 Sep 2013 04:48:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255690 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Sep 2013 04:48:27 -0000 Author: grehan Date: Thu Sep 19 04:48:26 2013 New Revision: 255690 URL: http://svnweb.freebsd.org/changeset/base/255690 Log: Add simplistic periodic timer support to mevent using kqueue's timer support. This should be enough for the emulation of h/w periodic timers (and no more) e.g. some of the 8254's more esoteric modes that happen to be used by non-FreeBSD o/s's. Approved by: re@ (blanket) Modified: head/usr.sbin/bhyve/mevent.c head/usr.sbin/bhyve/mevent.h head/usr.sbin/bhyve/mevent_test.c Modified: head/usr.sbin/bhyve/mevent.c ============================================================================== --- head/usr.sbin/bhyve/mevent.c Thu Sep 19 04:29:03 2013 (r255689) +++ head/usr.sbin/bhyve/mevent.c Thu Sep 19 04:48:26 2013 (r255690) @@ -59,12 +59,15 @@ __FBSDID("$FreeBSD$"); extern char *vmname; static pthread_t mevent_tid; +static int mevent_timid = 43; static int mevent_pipefd[2]; static pthread_mutex_t mevent_lmutex = PTHREAD_MUTEX_INITIALIZER; struct mevent { void (*me_func)(int, enum ev_type, void *); +#define me_msecs me_fd int me_fd; + int me_timid; enum ev_type me_type; void *me_param; int me_cq; @@ -129,6 +132,9 @@ mevent_kq_filter(struct mevent *mevp) if (mevp->me_type == EVF_WRITE) retval = EVFILT_WRITE; + if (mevp->me_type == EVF_TIMER) + retval = EVFILT_TIMER; + return (retval); } @@ -140,6 +146,8 @@ mevent_kq_flags(struct mevent *mevp) switch (mevp->me_state) { case MEV_ENABLE: ret = EV_ADD; + if (mevp->me_type == EVF_TIMER) + ret |= EV_ENABLE; break; case MEV_DISABLE: ret = EV_DISABLE; @@ -177,11 +185,16 @@ mevent_build(int mfd, struct kevent *kev */ close(mevp->me_fd); } else { - kev[i].ident = mevp->me_fd; + if (mevp->me_type == EVF_TIMER) { + kev[i].ident = mevp->me_timid; + kev[i].data = mevp->me_msecs; + } else { + kev[i].ident = mevp->me_fd; + kev[i].data = 0; + } kev[i].filter = mevent_kq_filter(mevp); kev[i].flags = mevent_kq_flags(mevp); kev[i].fflags = mevent_kq_fflags(mevp); - kev[i].data = 0; kev[i].udata = mevp; i++; } @@ -219,12 +232,12 @@ mevent_handle(struct kevent *kev, int nu } struct mevent * -mevent_add(int fd, enum ev_type type, +mevent_add(int tfd, enum ev_type type, void (*func)(int, enum ev_type, void *), void *param) { struct mevent *lp, *mevp; - if (fd < 0 || func == NULL) { + if (tfd < 0 || func == NULL) { return (NULL); } @@ -236,13 +249,15 @@ mevent_add(int fd, enum ev_type type, * Verify that the fd/type tuple is not present in any list */ LIST_FOREACH(lp, &global_head, me_list) { - if (lp->me_fd == fd && lp->me_type == type) { + if (type != EVF_TIMER && lp->me_fd == tfd && + lp->me_type == type) { goto exit; } } LIST_FOREACH(lp, &change_head, me_list) { - if (lp->me_fd == fd && lp->me_type == type) { + if (type != EVF_TIMER && lp->me_fd == tfd && + lp->me_type == type) { goto exit; } } @@ -256,7 +271,11 @@ mevent_add(int fd, enum ev_type type, } memset(mevp, 0, sizeof(struct mevent)); - mevp->me_fd = fd; + if (type == EVF_TIMER) { + mevp->me_msecs = tfd; + mevp->me_timid = mevent_timid++; + } else + mevp->me_fd = tfd; mevp->me_type = type; mevp->me_func = func; mevp->me_param = param; Modified: head/usr.sbin/bhyve/mevent.h ============================================================================== --- head/usr.sbin/bhyve/mevent.h Thu Sep 19 04:29:03 2013 (r255689) +++ head/usr.sbin/bhyve/mevent.h Thu Sep 19 04:48:26 2013 (r255690) @@ -31,7 +31,8 @@ enum ev_type { EVF_READ, - EVF_WRITE + EVF_WRITE, + EVF_TIMER }; struct mevent; Modified: head/usr.sbin/bhyve/mevent_test.c ============================================================================== --- head/usr.sbin/bhyve/mevent_test.c Thu Sep 19 04:29:03 2013 (r255689) +++ head/usr.sbin/bhyve/mevent_test.c Thu Sep 19 04:48:26 2013 (r255690) @@ -34,12 +34,16 @@ */ #include +#include +#include #include #include +#include #include #include #include +#include #include "mevent.h" @@ -48,8 +52,62 @@ static pthread_mutex_t accept_mutex = PTHREAD_MUTEX_INITIALIZER; static pthread_cond_t accept_condvar = PTHREAD_COND_INITIALIZER; +static struct mevent *tevp; + +char *vmname = "test vm"; + + #define MEVENT_ECHO +/* Number of timer events to capture */ +#define TEVSZ 4096 +uint64_t tevbuf[TEVSZ]; + +static void +timer_print(void) +{ + uint64_t min, max, diff, sum, tsc_freq; + size_t len; + int j; + + min = UINT64_MAX; + max = 0; + sum = 0; + + len = sizeof(tsc_freq); + sysctlbyname("machdep.tsc_freq", &tsc_freq, &len, NULL, 0); + + for (j = 1; j < TEVSZ; j++) { + /* Convert a tsc diff into microseconds */ + diff = (tevbuf[j] - tevbuf[j-1]) * 1000000 / tsc_freq; + sum += diff; + if (min > diff) + min = diff; + if (max < diff) + max = diff; + } + + printf("timers done: usecs, min %ld, max %ld, mean %ld\n", min, max, + sum/(TEVSZ - 1)); +} + +static void +timer_callback(int fd, enum ev_type type, void *param) +{ + static int i; + + if (i >= TEVSZ) + abort(); + + tevbuf[i++] = rdtsc(); + + if (i == TEVSZ) { + mevent_delete(tevp); + timer_print(); + } +} + + #ifdef MEVENT_ECHO struct esync { pthread_mutex_t e_mt; @@ -101,6 +159,8 @@ echoer(void *param) pthread_mutex_unlock(&sync.e_mt); pthread_mutex_destroy(&sync.e_mt); pthread_cond_destroy(&sync.e_cond); + + return (NULL); } #else @@ -115,6 +175,8 @@ echoer(void *param) while ((len = read(fd, buf, sizeof(buf))) > 0) { write(1, buf, len); } + + return (NULL); } #endif /* MEVENT_ECHO */ @@ -133,6 +195,7 @@ acceptor(void *param) pthread_t tid; int news; int s; + static int first; if ((s = socket(AF_INET, SOCK_STREAM, 0)) < 0) { perror("socket"); @@ -163,11 +226,24 @@ acceptor(void *param) if (news < 0) { perror("accept error"); } else { + static int first = 1; + + if (first) { + /* + * Start a timer + */ + first = 0; + tevp = mevent_add(1, EVF_TIMER, timer_callback, + NULL); + } + printf("incoming connection, spawning thread\n"); pthread_create(&tid, NULL, echoer, (void *)(uintptr_t)news); } } + + return (NULL); } main() From owner-svn-src-all@FreeBSD.ORG Thu Sep 19 04:59:44 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BB6633AE; Thu, 19 Sep 2013 04:59:44 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A93E72098; Thu, 19 Sep 2013 04:59:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8J4xi5L008529; Thu, 19 Sep 2013 04:59:44 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8J4xiJN008528; Thu, 19 Sep 2013 04:59:44 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201309190459.r8J4xiJN008528@svn.freebsd.org> From: Peter Grehan Date: Thu, 19 Sep 2013 04:59:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255691 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Sep 2013 04:59:44 -0000 Author: grehan Date: Thu Sep 19 04:59:44 2013 New Revision: 255691 URL: http://svnweb.freebsd.org/changeset/base/255691 Log: Implement support for the interrupt-on-terminal-count and s/w-strobe timer modes. These are commonly used by non-FreeBSD o/s's. Approved by: re@ (blanket) Modified: head/usr.sbin/bhyve/pit_8254.c Modified: head/usr.sbin/bhyve/pit_8254.c ============================================================================== --- head/usr.sbin/bhyve/pit_8254.c Thu Sep 19 04:48:26 2013 (r255690) +++ head/usr.sbin/bhyve/pit_8254.c Thu Sep 19 04:59:44 2013 (r255691) @@ -29,15 +29,23 @@ #include __FBSDID("$FreeBSD$"); +#include #include +#include #include -#include #include +#include +#include +#include + +#include #include "bhyverun.h" #include "inout.h" +#include "ioapic.h" +#include "mevent.h" #include "pit_8254.h" #define TIMER_SEL_MASK 0xc0 @@ -51,14 +59,19 @@ __FBSDID("$FreeBSD$"); static const int nsecs_per_tick = 1000000000 / PIT_8254_FREQ; struct counter { + struct vmctx *ctx; + struct mevent *tevp; struct timeval tv; /* uptime when counter was loaded */ + int mode; uint16_t initial; /* initial counter value */ uint8_t cr[2]; uint8_t ol[2]; int crbyte; int olbyte; + int frbyte; }; + static void timevalfix(struct timeval *t1) { @@ -82,16 +95,55 @@ timevalsub(struct timeval *t1, const str timevalfix(t1); } +static uint64_t pit_mev_count; + static void -latch(struct counter *c) +pit_mevent_cb(int fd, enum ev_type type, void *param) +{ + struct counter *c; + + c = param; + + pit_mev_count++; + + ioapic_assert_pin(c->ctx, 0); + ioapic_deassert_pin(c->ctx, 0); + + /* + * Delete the timer for one-shots + */ + if (c->mode != TIMER_RATEGEN) { + mevent_delete(c->tevp); + c->tevp = NULL; + } +} + +static void +pit_timer_start(struct vmctx *ctx, struct counter *c) +{ + int msecs; + + if (c->initial != 0) { + msecs = c->initial * nsecs_per_tick / 1000000; + if (msecs == 0) + msecs = 1; + + if (c->tevp == NULL) + c->tevp = mevent_add(msecs, EVF_TIMER, pit_mevent_cb, + c); + } +} + +static uint16_t +pit_update_counter(struct counter *c, int latch) { struct timeval tv2; uint16_t lval; uint64_t delta_nsecs, delta_ticks; /* cannot latch a new value until the old one has been consumed */ - if (c->olbyte != 0) - return; + if (latch && c->olbyte != 0) + return (0); if (c->initial == 0 || c->initial == 1) { /* @@ -114,9 +166,14 @@ latch(struct counter *c) delta_ticks = delta_nsecs / nsecs_per_tick; lval = c->initial - delta_ticks % c->initial; - c->olbyte = 2; - c->ol[1] = lval; /* LSB */ - c->ol[0] = lval >> 8; /* MSB */ + + if (latch) { + c->olbyte = 2; + c->ol[1] = lval; /* LSB */ + c->ol[0] = lval >> 8; /* MSB */ + } + + return (lval); } static int @@ -150,13 +207,18 @@ pit_8254_handler(struct vmctx *ctx, int * Counter mode is not affected when issuing a * latch command. */ - if (mode != TIMER_RATEGEN && mode != TIMER_SQWAVE) + if (mode != TIMER_INTTC && + mode != TIMER_RATEGEN && + mode != TIMER_SQWAVE && + mode != TIMER_SWSTROBE) return (-1); } c = &counter[sel >> 6]; + c->ctx = ctx; + c->mode = mode; if (rw == TIMER_LATCH) - latch(c); + pit_update_counter(c, 1); else c->olbyte = 0; /* reset latch after reprogramming */ @@ -169,20 +231,32 @@ pit_8254_handler(struct vmctx *ctx, int if (in) { /* - * XXX * The spec says that once the output latch is completely - * read it should revert to "following" the counter. We don't - * do this because it is hard and any reasonable OS should - * always latch the counter before trying to read it. + * read it should revert to "following" the counter. Use + * the free running counter for this case (i.e. Linux + * TSC calibration). Assuming the access mode is 16-bit, + * toggle the MSB/LSB bit on each read. */ - if (c->olbyte == 0) - c->olbyte = 2; - *eax = c->ol[--c->olbyte]; + if (c->olbyte == 0) { + uint16_t tmp; + + tmp = pit_update_counter(c, 0); + if (c->frbyte) + tmp >>= 8; + tmp &= 0xff; + *eax = tmp; + c->frbyte ^= 1; + } else + *eax = c->ol[--c->olbyte]; } else { c->cr[c->crbyte++] = *eax; if (c->crbyte == 2) { + c->frbyte = 0; c->crbyte = 0; c->initial = c->cr[0] | (uint16_t)c->cr[1] << 8; + /* Start an interval timer for counter 0 */ + if (port == 0x40) + pit_timer_start(ctx, c); if (c->initial == 0) c->initial = 0xffff; gettimeofday(&c->tv, NULL); From owner-svn-src-all@FreeBSD.ORG Thu Sep 19 05:07:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 05CAC7A7; Thu, 19 Sep 2013 05:07:52 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E862B2139; Thu, 19 Sep 2013 05:07:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8J57pql013788; Thu, 19 Sep 2013 05:07:51 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8J57pJe013787; Thu, 19 Sep 2013 05:07:51 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201309190507.r8J57pJe013787@svn.freebsd.org> From: Peter Grehan Date: Thu, 19 Sep 2013 05:07:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255692 - head/sys/amd64/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Sep 2013 05:07:52 -0000 Author: grehan Date: Thu Sep 19 05:07:51 2013 New Revision: 255692 URL: http://svnweb.freebsd.org/changeset/base/255692 Log: Reconnect the hyperv drivers back into GENERIC now that the disengage driver issue has been resolved. Approved by: re@ (gjb) Modified: head/sys/amd64/conf/GENERIC Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Thu Sep 19 04:59:44 2013 (r255691) +++ head/sys/amd64/conf/GENERIC Thu Sep 19 05:07:51 2013 (r255692) @@ -341,5 +341,8 @@ device virtio_blk # VirtIO Block device device virtio_scsi # VirtIO SCSI device device virtio_balloon # VirtIO Memory Balloon device +# HyperV drivers +device hyperv # HyperV drivers + # VMware support device vmx # VMware VMXNET3 Ethernet From owner-svn-src-all@FreeBSD.ORG Thu Sep 19 05:40:50 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8089A6E2; Thu, 19 Sep 2013 05:40:50 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6E6762335; Thu, 19 Sep 2013 05:40:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8J5eoOL032497; Thu, 19 Sep 2013 05:40:50 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8J5eogY032496; Thu, 19 Sep 2013 05:40:50 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201309190540.r8J5eogY032496@svn.freebsd.org> From: Hans Petter Selasky Date: Thu, 19 Sep 2013 05:40:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255693 - stable/9/sys/dev/usb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Sep 2013 05:40:50 -0000 Author: hselasky Date: Thu Sep 19 05:40:49 2013 New Revision: 255693 URL: http://svnweb.freebsd.org/changeset/base/255693 Log: MFC r255488: Don't issue USB resume signalling in USB device mode, if the USB power mode is ON and suspend is detected. This confuses iPads running in USB host mode at least. Modified: stable/9/sys/dev/usb/usb_hub.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/usb_hub.c ============================================================================== --- stable/9/sys/dev/usb/usb_hub.c Thu Sep 19 05:07:51 2013 (r255692) +++ stable/9/sys/dev/usb/usb_hub.c Thu Sep 19 05:40:49 2013 (r255693) @@ -2067,7 +2067,8 @@ usbd_transfer_power_ref(struct usb_xfer static uint8_t usb_peer_should_wakeup(struct usb_device *udev) { - return ((udev->power_mode == USB_POWER_MODE_ON) || + return (((udev->power_mode == USB_POWER_MODE_ON) && + (udev->flags.usb_mode == USB_MODE_HOST)) || (udev->driver_added_refcount != udev->bus->driver_added_refcount) || (udev->re_enumerate_wait != 0) || (udev->pwr_save.type_refs[UE_ISOCHRONOUS] != 0) || From owner-svn-src-all@FreeBSD.ORG Thu Sep 19 05:43:24 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3CAFA8D1; Thu, 19 Sep 2013 05:43:24 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2B0C92351; Thu, 19 Sep 2013 05:43:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8J5hOxp033536; Thu, 19 Sep 2013 05:43:24 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8J5hOmo033535; Thu, 19 Sep 2013 05:43:24 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201309190543.r8J5hOmo033535@svn.freebsd.org> From: Hans Petter Selasky Date: Thu, 19 Sep 2013 05:43:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r255694 - stable/8/sys/dev/usb X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Sep 2013 05:43:24 -0000 Author: hselasky Date: Thu Sep 19 05:43:23 2013 New Revision: 255694 URL: http://svnweb.freebsd.org/changeset/base/255694 Log: MFC r255488: Don't issue USB resume signalling in USB device mode, if the USB power mode is ON and suspend is detected. This confuses iPads running in USB host mode at least. Modified: stable/8/sys/dev/usb/usb_hub.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/usb_hub.c ============================================================================== --- stable/8/sys/dev/usb/usb_hub.c Thu Sep 19 05:40:49 2013 (r255693) +++ stable/8/sys/dev/usb/usb_hub.c Thu Sep 19 05:43:23 2013 (r255694) @@ -2067,7 +2067,8 @@ usbd_transfer_power_ref(struct usb_xfer static uint8_t usb_peer_should_wakeup(struct usb_device *udev) { - return ((udev->power_mode == USB_POWER_MODE_ON) || + return (((udev->power_mode == USB_POWER_MODE_ON) && + (udev->flags.usb_mode == USB_MODE_HOST)) || (udev->driver_added_refcount != udev->bus->driver_added_refcount) || (udev->re_enumerate_wait != 0) || (udev->pwr_save.type_refs[UE_ISOCHRONOUS] != 0) || From owner-svn-src-all@FreeBSD.ORG Thu Sep 19 06:19:25 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 88BD67E6; Thu, 19 Sep 2013 06:19:25 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 771232531; Thu, 19 Sep 2013 06:19:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8J6JPI9051549; Thu, 19 Sep 2013 06:19:25 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8J6JPa5051548; Thu, 19 Sep 2013 06:19:25 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201309190619.r8J6JPa5051548@svn.freebsd.org> From: Michael Tuexen Date: Thu, 19 Sep 2013 06:19:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255695 - head/lib/libc/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Sep 2013 06:19:25 -0000 Author: tuexen Date: Thu Sep 19 06:19:24 2013 New Revision: 255695 URL: http://svnweb.freebsd.org/changeset/base/255695 Log: Remove an unused variable and fix a memory leak in sctp_connectx(). Approved by: re (gjb) MFC after: 3 days Modified: head/lib/libc/net/sctp_sys_calls.c Modified: head/lib/libc/net/sctp_sys_calls.c ============================================================================== --- head/lib/libc/net/sctp_sys_calls.c Thu Sep 19 05:43:23 2013 (r255694) +++ head/lib/libc/net/sctp_sys_calls.c Thu Sep 19 06:19:24 2013 (r255695) @@ -101,10 +101,10 @@ sctp_connectx(int sd, const struct socka sctp_assoc_t * id) { char *buf; - int i, ret, cnt, *aa; + int i, ret, *aa; char *cpto; const struct sockaddr *at; - size_t len = sizeof(int); + size_t len; /* validate the address count and list */ if ((addrs == NULL) || (addrcnt <= 0)) { @@ -115,8 +115,8 @@ sctp_connectx(int sd, const struct socka errno = E2BIG; return (-1); } + len = sizeof(int); at = addrs; - cnt = 0; cpto = buf + sizeof(int); /* validate all the addresses and get the size */ for (i = 0; i < addrcnt; i++) { @@ -161,6 +161,7 @@ sctp_connectx(int sd, const struct socka if ((ret == 0) && (id != NULL)) { *id = *(sctp_assoc_t *) buf; } + free(buf); return (ret); } From owner-svn-src-all@FreeBSD.ORG Thu Sep 19 06:31:03 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AC2D7D19; Thu, 19 Sep 2013 06:31:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9A91D25EE; Thu, 19 Sep 2013 06:31:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8J6V3pv059415; Thu, 19 Sep 2013 06:31:03 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8J6V3RI059414; Thu, 19 Sep 2013 06:31:03 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201309190631.r8J6V3RI059414@svn.freebsd.org> From: Dimitry Andric Date: Thu, 19 Sep 2013 06:31:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255696 - head/usr.bin/svn/lib/libapr X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Sep 2013 06:31:03 -0000 Author: dim Date: Thu Sep 19 06:31:03 2013 New Revision: 255696 URL: http://svnweb.freebsd.org/changeset/base/255696 Log: Make svnlite (actually libapr) work correctly on big-endian arches. Otherwise, you would get errors similar to: $ svn co svn://svn.freebsd.org/base/head test A test/lib A test/lib/libutil svn: E200014: Checksum mismatch for '/home/dim/test/lib/libutil/kinfo_getproc.3': expected: 0882097a545210d88edff8f63b328602 actual: b378eb08a0f4d4c97c513c4b17207f59 Approved by: re (gjb, marius) Modified: head/usr.bin/svn/lib/libapr/apr.h Modified: head/usr.bin/svn/lib/libapr/apr.h ============================================================================== --- head/usr.bin/svn/lib/libapr/apr.h Thu Sep 19 06:19:24 2013 (r255695) +++ head/usr.bin/svn/lib/libapr/apr.h Thu Sep 19 06:31:03 2013 (r255696) @@ -373,7 +373,13 @@ typedef apr_uint32_t apr_uin #endif /* Are we big endian? */ +#if _BYTE_ORDER == _LITTLE_ENDIAN #define APR_IS_BIGENDIAN 0 +#elif _BYTE_ORDER == _BIG_ENDIAN +#define APR_IS_BIGENDIAN 1 +#else +#error Unknown byte order. +#endif /* Mechanisms to properly type numeric literals */ #define APR_INT64_C(val) INT64_C(val) From owner-svn-src-all@FreeBSD.ORG Thu Sep 19 10:56:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9CBBD91; Thu, 19 Sep 2013 10:56:37 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6F837254A; Thu, 19 Sep 2013 10:56:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8JAubWs099131; Thu, 19 Sep 2013 10:56:37 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8JAubVV099129; Thu, 19 Sep 2013 10:56:37 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201309191056.r8JAubVV099129@svn.freebsd.org> From: Bryan Drewery Date: Thu, 19 Sep 2013 10:56:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255699 - in head: share/man/man4 usr.bin/procstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Sep 2013 10:56:37 -0000 Author: bdrewery (ports committer) Date: Thu Sep 19 10:56:36 2013 New Revision: 255699 URL: http://svnweb.freebsd.org/changeset/base/255699 Log: cap_new(2) and cap_getrights2) were replaced with cap_rights_limit(2) and cap_rights_get(2) in r247602 Reviewed by: pjd Approved by: gjb Approved by: re (rodrigc) Modified: head/share/man/man4/capsicum.4 head/usr.bin/procstat/procstat.1 Modified: head/share/man/man4/capsicum.4 ============================================================================== --- head/share/man/man4/capsicum.4 Thu Sep 19 08:04:50 2013 (r255698) +++ head/share/man/man4/capsicum.4 Thu Sep 19 10:56:36 2013 (r255699) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 21, 2013 +.Dd September 17, 2013 .Dt CAPSICUM 4 .Os .Sh NAME @@ -62,7 +62,7 @@ File descriptors that wrap other file de be called on them; for example, a file descriptor returned by .Xr open 2 may be refined using -.Xr cap_new 2 +.Xr cap_rights_limit 2 so that only .Xr read 2 and @@ -89,8 +89,8 @@ associated with file descriptors; descri .Sh SEE ALSO .Xr cap_enter 2 , .Xr cap_getmode 2 , -.Xr cap_getrights 2 , -.Xr cap_new 2 , +.Xr cap_rights_get 2 , +.Xr cap_rights_limit 2 , .Xr fchmod 2 , .Xr open 2 , .Xr pdfork 2 , Modified: head/usr.bin/procstat/procstat.1 ============================================================================== --- head/usr.bin/procstat/procstat.1 Thu Sep 19 08:04:50 2013 (r255698) +++ head/usr.bin/procstat/procstat.1 Thu Sep 19 10:56:36 2013 (r255699) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 20, 2013 +.Dd September 17, 2013 .Dt PROCSTAT 1 .Os .Sh NAME @@ -234,7 +234,7 @@ If the flag is specified, the vnode type, reference count, and offset fields will be omitted, and a new capabilities field will be included listing capabilities, as described in -.Xr cap_new 2 , +.Xr cap_rights_limit 2 , present for each capability descriptor. .Ss Signal Disposition Information Display signal pending and disposition for a process: @@ -449,7 +449,7 @@ grows up (bottom-up stack) .Xr ps 1 , .Xr sockstat 1 , .Xr cap_enter 2 , -.Xr cap_new 2 , +.Xr cap_rights_limit 2 , .Xr ddb 4 , .Xr stack 9 .Sh AUTHORS From owner-svn-src-all@FreeBSD.ORG Thu Sep 19 14:41:11 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7A019BEC; Thu, 19 Sep 2013 14:41:11 +0000 (UTC) (envelope-from gibbs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 679B8226B; Thu, 19 Sep 2013 14:41:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8JEfBJl022711; Thu, 19 Sep 2013 14:41:11 GMT (envelope-from gibbs@svn.freebsd.org) Received: (from gibbs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8JEfBWC022710; Thu, 19 Sep 2013 14:41:11 GMT (envelope-from gibbs@svn.freebsd.org) Message-Id: <201309191441.r8JEfBWC022710@svn.freebsd.org> From: "Justin T. Gibbs" Date: Thu, 19 Sep 2013 14:41:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255705 - head/sys/i386/xen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Sep 2013 14:41:11 -0000 Author: gibbs Date: Thu Sep 19 14:41:10 2013 New Revision: 255705 URL: http://svnweb.freebsd.org/changeset/base/255705 Log: sys/i386/xen_mp_machdep.c: Set a 'fake' acpi_id for the i386 PV port, it is needed in order to use VIRQs or IPI event channels. Submitted by: Roger Pau Monné Sponsored by: Citrix Systems R&D Reviewed by: gibbs Approved by: re (blanket Xen) MFC after: 2 weeks Modified: head/sys/i386/xen/mp_machdep.c Modified: head/sys/i386/xen/mp_machdep.c ============================================================================== --- head/sys/i386/xen/mp_machdep.c Thu Sep 19 13:49:55 2013 (r255704) +++ head/sys/i386/xen/mp_machdep.c Thu Sep 19 14:41:10 2013 (r255705) @@ -251,6 +251,9 @@ cpu_add(u_int apic_id, char boot_cpu) if (bootverbose) printf("SMP: Added CPU %d (%s)\n", apic_id, boot_cpu ? "BSP" : "AP"); + + /* Set the ACPI id (it is needed by VCPU operations) */ + pcpu_find(apic_id)->pc_acpi_id = apic_id; } void From owner-svn-src-all@FreeBSD.ORG Thu Sep 19 18:00:06 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3732B56C; Thu, 19 Sep 2013 18:00:06 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 24AB32DF9; Thu, 19 Sep 2013 18:00:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8JI056p026572; Thu, 19 Sep 2013 18:00:05 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8JI05Wt026571; Thu, 19 Sep 2013 18:00:05 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201309191800.r8JI05Wt026571@svn.freebsd.org> From: Mikolaj Golub Date: Thu, 19 Sep 2013 18:00:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255707 - head/usr.sbin/daemon X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Sep 2013 18:00:06 -0000 Author: trociny Date: Thu Sep 19 18:00:05 2013 New Revision: 255707 URL: http://svnweb.freebsd.org/changeset/base/255707 Log: 1. Properly clean pid files in the case of the error. 2. Write the supervisor pid before the restart loop, so we don't uselessly rewrite it after every child restart. 3. Remove duplicate ppfh and pfh initialization. Approved by: re (glebius) MFC after: 2 weeks Modified: head/usr.sbin/daemon/daemon.c Modified: head/usr.sbin/daemon/daemon.c ============================================================================== --- head/usr.sbin/daemon/daemon.c Thu Sep 19 16:22:05 2013 (r255706) +++ head/usr.sbin/daemon/daemon.c Thu Sep 19 18:00:05 2013 (r255707) @@ -55,13 +55,12 @@ main(int argc, char *argv[]) { struct pidfh *ppfh, *pfh; sigset_t mask, oldmask; - int ch, nochdir, noclose, restart; + int ch, nochdir, noclose, restart, serrno; const char *pidfile, *ppidfile, *user; pid_t otherpid, pid; nochdir = noclose = 1; restart = 0; - ppfh = pfh = NULL; ppidfile = pidfile = user = NULL; while ((ch = getopt(argc, argv, "cfp:P:ru:")) != -1) { switch (ch) { @@ -108,11 +107,13 @@ main(int argc, char *argv[]) err(2, "pidfile ``%s''", pidfile); } } - - /* do same for actual daemon process */ + /* Do the same for actual daemon process. */ if (ppidfile != NULL) { ppfh = pidfile_open(ppidfile, 0600, &otherpid); if (ppfh == NULL) { + serrno = errno; + pidfile_remove(pfh); + errno = serrno; if (errno == EEXIST) { errx(3, "process already running, pid: %d", otherpid); @@ -121,8 +122,12 @@ main(int argc, char *argv[]) } } - if (daemon(nochdir, noclose) == -1) - err(1, NULL); + if (daemon(nochdir, noclose) == -1) { + warn("daemon"); + goto exit; + } + /* Write out parent pidfile if needed. */ + pidfile_write(ppfh); /* * If the pidfile or restart option is specified the daemon @@ -139,22 +144,28 @@ main(int argc, char *argv[]) * Restore default action for SIGTERM in case the * parent process decided to ignore it. */ - if (signal(SIGTERM, SIG_DFL) == SIG_ERR) - err(1, "signal"); + if (signal(SIGTERM, SIG_DFL) == SIG_ERR) { + warn("signal"); + goto exit; + } /* * Because SIGCHLD is ignored by default, setup dummy handler * for it, so we can mask it. */ - if (signal(SIGCHLD, dummy_sighandler) == SIG_ERR) - err(1, "signal"); + if (signal(SIGCHLD, dummy_sighandler) == SIG_ERR) { + warn("signal"); + goto exit; + } /* * Block interesting signals. */ sigemptyset(&mask); sigaddset(&mask, SIGTERM); sigaddset(&mask, SIGCHLD); - if (sigprocmask(SIG_SETMASK, &mask, &oldmask) == -1) - err(1, "sigprocmask"); + if (sigprocmask(SIG_SETMASK, &mask, &oldmask) == -1) { + warn("sigprocmask"); + goto exit; + } /* * Try to protect against pageout kill. Ignore the * error, madvise(2) will fail only if a process does @@ -168,8 +179,8 @@ restart: */ pid = fork(); if (pid == -1) { - pidfile_remove(pfh); - err(1, "fork"); + warn("fork"); + goto exit; } } if (pid <= 0) { @@ -192,18 +203,16 @@ restart: */ err(1, "%s", argv[0]); } - /* write out parent pidfile if needed */ - if (ppidfile != NULL) - pidfile_write(ppfh); setproctitle("%s[%d]", argv[0], pid); if (wait_child(pid, &mask) == 0 && restart) { sleep(1); goto restart; } +exit: pidfile_remove(pfh); pidfile_remove(ppfh); - exit(0); /* Exit status does not matter. */ + exit(1); /* If daemon(3) succeeded exit status does not matter. */ } static void From owner-svn-src-all@FreeBSD.ORG Thu Sep 19 18:17:07 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C2CA3B23; Thu, 19 Sep 2013 18:17:07 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 970852F1D; Thu, 19 Sep 2013 18:17:07 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 9BF57B98A; Thu, 19 Sep 2013 14:17:06 -0400 (EDT) From: John Baldwin To: Davide Italiano Subject: Re: svn commit: r254703 - in head: share/man/man9 sys/sys Date: Thu, 19 Sep 2013 13:49:55 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <201308231412.r7NECdG7081565@svn.freebsd.org> <201309121008.01115.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201309191349.55574.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 19 Sep 2013 14:17:06 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Sep 2013 18:17:07 -0000 On Wednesday, September 18, 2013 11:06:33 am Davide Italiano wrote: > On Thu, Sep 12, 2013 at 4:08 PM, John Baldwin wrote: > > Hmm, I think I had envisioned something a bit simpler. Namely, I would > > change lc_lock/lc_unlock to return a uintptr_t instead of an int, and > > I would then change lc_unlock for an rm lock to return a pointer to the > > current thread's tracker as the 'how' and 0 for a write lock. Note > > that you have to use the existing tracker to make this work correctly > > for the sleep case where you unlock/lock. > > > > Well, your solution is indeed a lot simpler :) > Here's a patch that implements it: > http://people.freebsd.org/~davide/review/rmshared.diff > > Some (more or less relevant) observations: > -> I realized that before this change lc_unlock() for rmlocks, i.e. > unlock_rm(), returned 1 for exclusive lock and panic'ed otherwise, > while all the other primitives returned 0 for exclusive lock. Not sure > if this was intentional or just an oversight, but I changed it to > return what other primitive did mostly (0 for excl, > (uintptr_t)rm_tracker for shared). That's fine. > -> In order to get the rm_priotracker structure for curthread (which I > think is unique as long as we assert curthread is not recursively > acquiring this lock) I just traversed the pc->pc_rm_queue. Maybe it's > not the most efficient solution here, but I think is correct. Yes, it should be similar to rm_trackers_present(). > -> I think that only lc_unlock() return type need to be changed from > 'int' to 'uintptr_t'. lc_lock() type can stay void as it is right now. > But I think you were talking about "how" argument of lc_lock() and not > return type, probably. Yes, I meant the 'how' arg to lc_lock(). The patch looks good, just one minor nit: - 'rval' in _cv_wait_sig() in kern_condvar.c should stay an 'int' > > However, if you make my suggested change to make the 'how' a uintptr_t > > that passes the tracker you can actually do this in the callout case: > > > > struct rm_priotracker tracker; > > uintptr_t how; > > > > how = 0; > > if (flags & CALLOUT_SHAREDLOCK) > > how = 1; > > else if (flags & CALLOUT_SHAREDRM) > > how = (uintptr_t)&tracker; > > ... > > > > class->lc_lock(lock, how); > > > > Now, it would be even nicer to make prevent footshooting perhaps by > > checking the lock class directly: > > > > how = 0; > > if (flags & CALLOUT_SHAREDLOCK) { > > if (class == &lock_class_rm || class == &lock_class_rm_sleepable) > > how = (uintptr_t)&tracker; > > else > > how = 1; > > } > > > > -- > > John Baldwin > > This other patch just puts your code into kern_timeout.c > I also removed the check for lock_class_rm_sleepable as callout_init() > should catch this earlier. > http://people.freebsd.org/~davide/review/callout_sharedrm.diff This looks good. My only suggestion would be to rename 'sharedlock' to 'how' or maybe 'lock_state'. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Sep 19 18:17:07 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 44F4EB1E; Thu, 19 Sep 2013 18:17:07 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1E9E82F1A; Thu, 19 Sep 2013 18:17:07 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id BE47EB987; Thu, 19 Sep 2013 14:17:05 -0400 (EDT) From: John Baldwin To: Edward Tomasz Napierala Subject: Re: svn commit: r255628 - svnadmin/conf Date: Thu, 19 Sep 2013 11:22:37 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <201309170843.r8H8hCaE092908@svn.freebsd.org> In-Reply-To: <201309170843.r8H8hCaE092908@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201309191122.37616.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 19 Sep 2013 14:17:05 -0400 (EDT) Cc: svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-svnadmin@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Sep 2013 18:17:07 -0000 On Tuesday, September 17, 2013 4:43:12 am Edward Tomasz Napierala wrote: > Author: trasz > Date: Tue Sep 17 08:43:12 2013 > New Revision: 255628 > URL: http://svnweb.freebsd.org/changeset/base/255628 > > Log: > Explicitly require Security Officer's approval for kernel PRNG bits. > > Note that there is ongoing discussion about approval requirement > for userland PRNG bits. Rather, so's approval definitely is required for userland PRNG bits. It is currently not easy to express this in the approvers file without individually listing various files. If at some point the files are rearranged to make the approvers entry simple to add, then so will add one. However, all PRNG commits must be approved by so whether in userland or the kernel. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Sep 19 18:53:47 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CAAE42DF; Thu, 19 Sep 2013 18:53:47 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B513D218A; Thu, 19 Sep 2013 18:53:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8JIrl4p056137; Thu, 19 Sep 2013 18:53:47 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8JIrg00056100; Thu, 19 Sep 2013 18:53:42 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201309191853.r8JIrg00056100@svn.freebsd.org> From: John Baldwin Date: Thu, 19 Sep 2013 18:53:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255708 - in head: lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys sys/vm usr.bin usr.bin/kdump usr.bin/protect usr.bin/truss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Sep 2013 18:53:47 -0000 Author: jhb Date: Thu Sep 19 18:53:42 2013 New Revision: 255708 URL: http://svnweb.freebsd.org/changeset/base/255708 Log: Extend the support for exempting processes from being killed when swap is exhausted. - Add a new protect(1) command that can be used to set or revoke protection from arbitrary processes. Similar to ktrace it can apply a change to all existing descendants of a process as well as future descendants. - Add a new procctl(2) system call that provides a generic interface for control operations on processes (as opposed to the debugger-specific operations provided by ptrace(2)). procctl(2) uses a combination of idtype_t and an id to identify the set of processes on which to operate similar to wait6(). - Add a PROC_SPROTECT control operation to manage the protection status of a set of processes. MADV_PROTECT still works for backwards compatability. - Add a p_flag2 to struct proc (and a corresponding ki_flag2 to kinfo_proc) the first bit of which is used to track if P_PROTECT should be inherited by new child processes. Reviewed by: kib, jilles (earlier version) Approved by: re (delphij) MFC after: 1 month Added: head/lib/libc/sys/procctl.2 (contents, props changed) head/sys/sys/procctl.h (contents, props changed) head/usr.bin/protect/ head/usr.bin/protect/Makefile (contents, props changed) head/usr.bin/protect/protect.1 (contents, props changed) head/usr.bin/protect/protect.c (contents, props changed) Modified: head/lib/libc/sys/Makefile.inc head/lib/libc/sys/Symbol.map head/sys/compat/freebsd32/freebsd32.h head/sys/compat/freebsd32/freebsd32_misc.c head/sys/compat/freebsd32/syscalls.master head/sys/kern/init_main.c head/sys/kern/kern_fork.c head/sys/kern/kern_proc.c head/sys/kern/sys_process.c head/sys/kern/syscalls.master head/sys/sys/proc.h head/sys/sys/syscallsubr.h head/sys/sys/user.h head/sys/vm/vm_mmap.c head/usr.bin/Makefile head/usr.bin/kdump/kdump.c head/usr.bin/kdump/mksubr head/usr.bin/truss/syscall.h head/usr.bin/truss/syscalls.c Modified: head/lib/libc/sys/Makefile.inc ============================================================================== --- head/lib/libc/sys/Makefile.inc Thu Sep 19 18:00:05 2013 (r255707) +++ head/lib/libc/sys/Makefile.inc Thu Sep 19 18:53:42 2013 (r255708) @@ -197,6 +197,7 @@ MAN+= abort2.2 \ posix_fadvise.2 \ posix_fallocate.2 \ posix_openpt.2 \ + procctl.2 \ profil.2 \ pselect.2 \ ptrace.2 \ Modified: head/lib/libc/sys/Symbol.map ============================================================================== --- head/lib/libc/sys/Symbol.map Thu Sep 19 18:00:05 2013 (r255707) +++ head/lib/libc/sys/Symbol.map Thu Sep 19 18:53:42 2013 (r255708) @@ -395,6 +395,7 @@ FBSD_1.3 { ffclock_setestimate; pipe2; posix_fadvise; + procctl; wait6; }; @@ -822,6 +823,8 @@ FBSDprivate_1.0 { __sys_poll; _preadv; __sys_preadv; + _procctl; + __sys_procctl; _profil; __sys_profil; _pselect; Added: head/lib/libc/sys/procctl.2 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/sys/procctl.2 Thu Sep 19 18:53:42 2013 (r255708) @@ -0,0 +1,142 @@ +.\" Copyright (c) 2013 Advanced Computing Technologies LLC +.\" Written by: John H. Baldwin +.\" 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 September 19, 2013 +.Dt PROCCTL 2 +.Os +.Sh NAME +.Nm procctl +.Nd control processes +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In sys/procctl.h +.Ft int +.Fn procctl "idtype_t idtype" "id_t id" "int cmd" "void *arg" +.Sh DESCRIPTION +The +.Fn procctl +system call provides for control over processes. +The +.Fa idtype +and +.Fa id +arguments specify the set of processes to control. +If multiple processes match the identifier, +.Nm +will make a +.Dq best effort +to control as many of the selected possibles as possible. +An error is only returned if no selected processes successfully complete +the request. +The following identifier types are supported: +.Bl -tag -width Dv P_PGID +.It Dv P_PID +Control the process with the process ID +.Fa id . +.It Dv P_PGID +Control processes belonging to the process group with the ID +.Fa id . +.El +.Pp +The control request to perform is specified by the +.Fa cmd +argument. +The following commands are supported: +.Bl -tag -width Dv PROC_SPROTECT +.It Dv PROC_SPROTECT +Set process protection state. +This is used to mark a process as protected from being killed if the system +exhausts available memory and swap. +The +.Fa arg +parameter must point to an integer containing an operation and zero or more +optional flags. +The following operations are supported: +.Bl -tag -width Dv PPROT_CLEAR +.It Dv PPROT_SET +Mark the selected processes as protected. +.It Dv PPROT_CLEAR +Clear the protected state of selected processes. +.El +.Pp +The following optional flags are supported: +.Bl -tag -width Dv PPROT_DESCEND +.It Dv PPROT_DESCEND +Apply the requested operation to all child processes of each selected process +in addition to each selected process. +.It Dv PPROT_INHERIT +When used with +.Dv PPROT_SET , +mark all future child processes of each selected process as protected. +Future child processes will also mark all of their future child processes. +.El +.El +.Sh RETURN VALUES +If an error occurs, a value of -1 is returned and +.Va errno +is set to indicate the error. +.Sh ERRORS +The +.Fn procctl +system call +will fail if: +.Bl -tag -width Er +.It Bq Er EFAULT +The +.Fa arg +points outside the process's allocated address space. +.It Bq Er EINVAL +The +.Fa cmd +argument specifies an unsupported command. +.Pp +The +.Fa idtype +argument specifies an unsupported identifier type. +.It Bq Er EPERM +The calling process does not have permission to perform the requested +operation on any of the selected processes. +.It Bq Er ESRCH +No processes matched the requested +.Fa idtype +and +.Fa id . +.It Bq Er EINVAL +An invalid operation or flag was passed in +.Fa arg +for a +.Dv PROC_SPROTECT +command. +.El +.Sh SEE ALSO +.Xr ptrace 2 +.Sh HISTORY +The +.Fn procctl +function appeared in +.Fx 10 . Modified: head/sys/compat/freebsd32/freebsd32.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32.h Thu Sep 19 18:00:05 2013 (r255707) +++ head/sys/compat/freebsd32/freebsd32.h Thu Sep 19 18:53:42 2013 (r255708) @@ -342,6 +342,7 @@ struct kinfo_proc32 { char ki_loginclass[LOGINCLASSLEN+1]; char ki_sparestrings[50]; int ki_spareints[KI_NSPARE_INT]; + int ki_flag2; int ki_fibnum; u_int ki_cr_flags; int ki_jid; Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Thu Sep 19 18:00:05 2013 (r255707) +++ head/sys/compat/freebsd32/freebsd32_misc.c Thu Sep 19 18:53:42 2013 (r255708) @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -3000,3 +3001,23 @@ convert_sigevent32(struct sigevent32 *si } return (0); } + +int +freebsd32_procctl(struct thread *td, struct freebsd32_procctl_args *uap) +{ + void *data; + int error, flags; + + switch (uap->com) { + case PROC_SPROTECT: + error = copyin(PTRIN(uap->data), &flags, sizeof(flags)); + if (error) + return (error); + data = &flags; + break; + default: + return (EINVAL); + } + return (kern_procctl(td, uap->idtype, PAIR32TO64(id_t, uap->id), + uap->com, data)); +} Modified: head/sys/compat/freebsd32/syscalls.master ============================================================================== --- head/sys/compat/freebsd32/syscalls.master Thu Sep 19 18:00:05 2013 (r255707) +++ head/sys/compat/freebsd32/syscalls.master Thu Sep 19 18:53:42 2013 (r255708) @@ -1056,3 +1056,12 @@ 542 AUE_PIPE NOPROTO { int pipe2(int *fildes, int flags); } 543 AUE_NULL NOSTD { int freebsd32_aio_mlock( \ struct aiocb32 *aiocbp); } +#ifdef PAD64_REQUIRED +544 AUE_NULL STD { int freebsd32_procctl(int idtype, int pad, \ + uint32_t id1, uint32_t id2, int com, \ + void *data); } +#else +544 AUE_NULL STD { int freebsd32_procctl(int idtype, \ + uint32_t id1, uint32_t id2, int com, \ + void *data); } +#endif Modified: head/sys/kern/init_main.c ============================================================================== --- head/sys/kern/init_main.c Thu Sep 19 18:00:05 2013 (r255707) +++ head/sys/kern/init_main.c Thu Sep 19 18:53:42 2013 (r255708) @@ -474,6 +474,7 @@ proc0_init(void *dummy __unused) p->p_sysent = &null_sysvec; p->p_flag = P_SYSTEM | P_INMEM; + p->p_flag2 = 0; p->p_state = PRS_NORMAL; knlist_init_mtx(&p->p_klist, &p->p_mtx); STAILQ_INIT(&p->p_ktr); Modified: head/sys/kern/kern_fork.c ============================================================================== --- head/sys/kern/kern_fork.c Thu Sep 19 18:00:05 2013 (r255707) +++ head/sys/kern/kern_fork.c Thu Sep 19 18:53:42 2013 (r255708) @@ -489,6 +489,7 @@ do_fork(struct thread *td, int flags, st * Increase reference counts on shared objects. */ p2->p_flag = P_INMEM; + p2->p_flag2 = 0; p2->p_swtick = ticks; if (p1->p_flag & P_PROFIL) startprofclock(p2); @@ -512,6 +513,11 @@ do_fork(struct thread *td, int flags, st p2->p_fd = fd; p2->p_fdtol = fdtol; + if (p1->p_flag2 & P2_INHERIT_PROTECTED) { + p2->p_flag |= P_PROTECTED; + p2->p_flag2 |= P2_INHERIT_PROTECTED; + } + /* * p_limit is copy-on-write. Bump its refcount. */ Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Thu Sep 19 18:00:05 2013 (r255707) +++ head/sys/kern/kern_proc.c Thu Sep 19 18:53:42 2013 (r255708) @@ -802,6 +802,7 @@ fill_kinfo_proc_only(struct proc *p, str kp->ki_fd = p->p_fd; kp->ki_vmspace = p->p_vmspace; kp->ki_flag = p->p_flag; + kp->ki_flag2 = p->p_flag2; cred = p->p_ucred; if (cred) { kp->ki_uid = cred->cr_uid; @@ -1161,6 +1162,7 @@ freebsd32_kinfo_proc_out(const struct ki bcopy(ki->ki_comm, ki32->ki_comm, COMMLEN + 1); bcopy(ki->ki_emul, ki32->ki_emul, KI_EMULNAMELEN + 1); bcopy(ki->ki_loginclass, ki32->ki_loginclass, LOGINCLASSLEN + 1); + CP(*ki, *ki32, ki_flag2); CP(*ki, *ki32, ki_fibnum); CP(*ki, *ki32, ki_cr_flags); CP(*ki, *ki32, ki_jid); Modified: head/sys/kern/sys_process.c ============================================================================== --- head/sys/kern/sys_process.c Thu Sep 19 18:00:05 2013 (r255707) +++ head/sys/kern/sys_process.c Thu Sep 19 18:53:42 2013 (r255708) @@ -41,7 +41,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include #include @@ -1240,3 +1242,196 @@ stopevent(struct proc *p, unsigned int e msleep(&p->p_step, &p->p_mtx, PWAIT, "stopevent", 0); } while (p->p_step); } + +static int +protect_setchild(struct thread *td, struct proc *p, int flags) +{ + + PROC_LOCK_ASSERT(p, MA_OWNED); + if (p->p_flag & P_SYSTEM || p_cansee(td, p) != 0) + return (0); + if (flags & PPROT_SET) { + p->p_flag |= P_PROTECTED; + if (flags & PPROT_INHERIT) + p->p_flag2 |= P2_INHERIT_PROTECTED; + } else { + p->p_flag &= ~P_PROTECTED; + p->p_flag2 &= ~P2_INHERIT_PROTECTED; + } + return (1); +} + +static int +protect_setchildren(struct thread *td, struct proc *top, int flags) +{ + struct proc *p; + int ret; + + p = top; + ret = 0; + sx_assert(&proctree_lock, SX_LOCKED); + for (;;) { + ret |= protect_setchild(td, p, flags); + PROC_UNLOCK(p); + /* + * If this process has children, descend to them next, + * otherwise do any siblings, and if done with this level, + * follow back up the tree (but not past top). + */ + if (!LIST_EMPTY(&p->p_children)) + p = LIST_FIRST(&p->p_children); + else for (;;) { + if (p == top) { + PROC_LOCK(p); + return (ret); + } + if (LIST_NEXT(p, p_sibling)) { + p = LIST_NEXT(p, p_sibling); + break; + } + p = p->p_pptr; + } + PROC_LOCK(p); + } +} + +static int +protect_set(struct thread *td, struct proc *p, int flags) +{ + int error, ret; + + switch (PPROT_OP(flags)) { + case PPROT_SET: + case PPROT_CLEAR: + break; + default: + return (EINVAL); + } + + if ((PPROT_FLAGS(flags) & ~(PPROT_DESCEND | PPROT_INHERIT)) != 0) + return (EINVAL); + + error = priv_check(td, PRIV_VM_MADV_PROTECT); + if (error) + return (error); + + if (flags & PPROT_DESCEND) + ret = protect_setchildren(td, p, flags); + else + ret = protect_setchild(td, p, flags); + if (ret == 0) + return (EPERM); + return (0); +} + +#ifndef _SYS_SYSPROTO_H_ +struct procctl_args { + idtype_t idtype; + id_t id; + int com; + void *data; +}; +#endif +/* ARGSUSED */ +int +sys_procctl(struct thread *td, struct procctl_args *uap) +{ + int error, flags; + void *data; + + switch (uap->com) { + case PROC_SPROTECT: + error = copyin(uap->data, &flags, sizeof(flags)); + if (error) + return (error); + data = &flags; + break; + default: + return (EINVAL); + } + + return (kern_procctl(td, uap->idtype, uap->id, uap->com, data)); +} + +static int +kern_procctl_single(struct thread *td, struct proc *p, int com, void *data) +{ + + PROC_LOCK_ASSERT(p, MA_OWNED); + switch (com) { + case PROC_SPROTECT: + return (protect_set(td, p, *(int *)data)); + default: + return (EINVAL); + } +} + +int +kern_procctl(struct thread *td, idtype_t idtype, id_t id, int com, void *data) +{ + struct pgrp *pg; + struct proc *p; + int error, first_error, ok; + + sx_slock(&proctree_lock); + switch (idtype) { + case P_PID: + p = pfind(id); + if (p == NULL) { + error = ESRCH; + break; + } + if (p->p_state == PRS_NEW) + error = ESRCH; + else + error = p_cansee(td, p); + if (error == 0) + error = kern_procctl_single(td, p, com, data); + PROC_UNLOCK(p); + break; + case P_PGID: + /* + * Attempt to apply the operation to all members of the + * group. Ignore processes in the group that can't be + * seen. Ignore errors so long as at least one process is + * able to complete the request successfully. + */ + pg = pgfind(id); + if (pg == NULL) { + error = ESRCH; + break; + } + PGRP_UNLOCK(pg); + ok = 0; + first_error = 0; + LIST_FOREACH(p, &pg->pg_members, p_pglist) { + PROC_LOCK(p); + if (p->p_state == PRS_NEW || p_cansee(td, p) != 0) { + PROC_UNLOCK(p); + continue; + } + error = kern_procctl_single(td, p, com, data); + PROC_UNLOCK(p); + if (error == 0) + ok = 1; + else if (first_error == 0) + first_error = error; + } + if (ok) + error = 0; + else if (first_error != 0) + error = first_error; + else + /* + * Was not able to see any processes in the + * process group. + */ + error = ESRCH; + break; + default: + error = EINVAL; + break; + } + sx_sunlock(&proctree_lock); + return (error); +} Modified: head/sys/kern/syscalls.master ============================================================================== --- head/sys/kern/syscalls.master Thu Sep 19 18:00:05 2013 (r255707) +++ head/sys/kern/syscalls.master Thu Sep 19 18:53:42 2013 (r255708) @@ -978,5 +978,7 @@ int flags); } 542 AUE_PIPE STD { int pipe2(int *fildes, int flags); } 543 AUE_NULL NOSTD { int aio_mlock(struct aiocb *aiocbp); } +544 AUE_NULL STD { int procctl(idtype_t idtype, id_t id, \ + int com, void *data); } ; Please copy any additions and changes to the following compatability tables: ; sys/compat/freebsd32/syscalls.master Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Thu Sep 19 18:00:05 2013 (r255707) +++ head/sys/sys/proc.h Thu Sep 19 18:53:42 2013 (r255708) @@ -492,11 +492,8 @@ struct proc { struct callout p_limco; /* (c) Limit callout handle */ struct sigacts *p_sigacts; /* (x) Signal actions, state (CPU). */ - /* - * The following don't make too much sense. - * See the td_ or ke_ versions of the same flags. - */ int p_flag; /* (c) P_* flags. */ + int p_flag2; /* (c) P2_* flags. */ enum { PRS_NEW = 0, /* In creation */ PRS_NORMAL, /* threads can be run. */ @@ -641,6 +638,9 @@ struct proc { #define P_SHOULDSTOP(p) ((p)->p_flag & P_STOPPED) #define P_KILLED(p) ((p)->p_flag & P_WKILLED) +/* These flags are kept in p_flag2. */ +#define P2_INHERIT_PROTECTED 0x00000001 /* New children get P_PROTECTED. */ + /* * These were process status values (p_stat), now they are only used in * legacy conversion code. Added: head/sys/sys/procctl.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/sys/procctl.h Thu Sep 19 18:53:42 2013 (r255708) @@ -0,0 +1,55 @@ +/*- + * Copyright (c) 2013 Advanced Computing Technologies LLC + * Written by: John H. Baldwin + * 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 _SYS_PROCCTL_H_ +#define _SYS_PROCCTL_H_ + +#define PROC_SPROTECT 1 /* set protected state */ + +/* Operations for PROC_SPROTECT (passed in integer arg). */ +#define PPROT_OP(x) ((x) & 0xf) +#define PPROT_SET 1 +#define PPROT_CLEAR 2 + +/* Flags for PROC_SPROTECT (ORed in with operation). */ +#define PPROT_FLAGS(x) ((x) & ~0xf) +#define PPROT_DESCEND 0x10 +#define PPROT_INHERIT 0x20 + +#ifndef _KERNEL +#include +#include + +__BEGIN_DECLS +int procctl(idtype_t, id_t, int, void *); +__END_DECLS + +#endif + +#endif /* !_SYS_PROCCTL_H_ */ Modified: head/sys/sys/syscallsubr.h ============================================================================== --- head/sys/sys/syscallsubr.h Thu Sep 19 18:00:05 2013 (r255707) +++ head/sys/sys/syscallsubr.h Thu Sep 19 18:53:42 2013 (r255708) @@ -167,6 +167,8 @@ int kern_posix_fadvise(struct thread *td int advice); int kern_posix_fallocate(struct thread *td, int fd, off_t offset, off_t len); +int kern_procctl(struct thread *td, enum idtype idtype, id_t id, int com, + void *data); int kern_preadv(struct thread *td, int fd, struct uio *auio, off_t offset); int kern_pselect(struct thread *td, int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tvp, sigset_t *uset, int abi_nfdbits); Modified: head/sys/sys/user.h ============================================================================== --- head/sys/sys/user.h Thu Sep 19 18:00:05 2013 (r255707) +++ head/sys/sys/user.h Thu Sep 19 18:53:42 2013 (r255708) @@ -84,7 +84,7 @@ * it in two places: function fill_kinfo_proc in sys/kern/kern_proc.c and * function kvm_proclist in lib/libkvm/kvm_proc.c . */ -#define KI_NSPARE_INT 8 +#define KI_NSPARE_INT 7 #define KI_NSPARE_LONG 12 #define KI_NSPARE_PTR 6 @@ -187,6 +187,7 @@ struct kinfo_proc { */ char ki_sparestrings[50]; /* spare string space */ int ki_spareints[KI_NSPARE_INT]; /* spare room for growth */ + int ki_flag2; /* P2_* flags */ int ki_fibnum; /* Default FIB number */ u_int ki_cr_flags; /* Credential flags */ int ki_jid; /* Process jail ID */ Modified: head/sys/vm/vm_mmap.c ============================================================================== --- head/sys/vm/vm_mmap.c Thu Sep 19 18:00:05 2013 (r255707) +++ head/sys/vm/vm_mmap.c Thu Sep 19 18:53:42 2013 (r255708) @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -68,6 +69,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -739,23 +741,18 @@ sys_madvise(td, uap) { vm_offset_t start, end; vm_map_t map; - struct proc *p; - int error; + int flags; /* * Check for our special case, advising the swap pager we are * "immortal." */ if (uap->behav == MADV_PROTECT) { - error = priv_check(td, PRIV_VM_MADV_PROTECT); - if (error == 0) { - p = td->td_proc; - PROC_LOCK(p); - p->p_flag |= P_PROTECTED; - PROC_UNLOCK(p); - } - return (error); + flags = PPROT_SET; + return (kern_procctl(td, P_PID, td->td_proc->p_pid, + PROC_SPROTECT, &flags)); } + /* * Check for illegal behavior */ Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Thu Sep 19 18:00:05 2013 (r255707) +++ head/usr.bin/Makefile Thu Sep 19 18:53:42 2013 (r255708) @@ -132,6 +132,7 @@ SUBDIR= alias \ printenv \ printf \ procstat \ + protect \ rctl \ renice \ rev \ Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Thu Sep 19 18:00:05 2013 (r255707) +++ head/usr.bin/kdump/kdump.c Thu Sep 19 18:53:42 2013 (r255708) @@ -1161,6 +1161,18 @@ ktrsyscall(struct ktr_syscall *ktr, u_in ip++; narg--; break; + case SYS_procctl: + putchar('('); + idtypename(*ip, decimal); + c = ','; + ip++; + narg--; + print_number(ip, narg, c); + putchar(','); + procctlcmdname(*ip); + ip++; + narg--; + break; } } while (narg > 0) { Modified: head/usr.bin/kdump/mksubr ============================================================================== --- head/usr.bin/kdump/mksubr Thu Sep 19 18:00:05 2013 (r255707) +++ head/usr.bin/kdump/mksubr Thu Sep 19 18:53:42 2013 (r255708) @@ -169,6 +169,7 @@ cat <<_EOF_ #include #include #include +#include #include #include #include @@ -465,6 +466,7 @@ auto_or_type "mountflagsname" " auto_switch_type "msyncflagsname" "MS_[A-Z]+[[:space:]]+0x[0-9]+" "sys/mman.h" auto_or_type "nfssvcname" "NFSSVC_[A-Z0-9]+[[:space:]]+0x[0-9]+" "nfs/nfssvc.h" auto_switch_type "prioname" "PRIO_[A-Z]+[[:space:]]+[0-9]" "sys/resource.h" +auto_switch_type "procctlcmdname" "PROC_[A-Z]+[[:space:]]+[0-9]" "sys/procctl.h" auto_switch_type "ptraceopname" "PT_[[:alnum:]_]+[[:space:]]+[0-9]+" "sys/ptrace.h" auto_switch_type "quotactlname" "Q_[A-Z]+[[:space:]]+0x[0-9]+" "ufs/ufs/quota.h" auto_or_type "rebootoptname" "RB_[A-Z]+[[:space:]]+0x[0-9]+" "sys/reboot.h" Added: head/usr.bin/protect/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/protect/Makefile Thu Sep 19 18:53:42 2013 (r255708) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +PROG= protect +WARNS?= 6 + +.include Added: head/usr.bin/protect/protect.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/protect/protect.1 Thu Sep 19 18:53:42 2013 (r255708) @@ -0,0 +1,89 @@ +.\" Copyright (c) 2013 Advanced Computing Technologies LLC +.\" Written by: John H. Baldwin +.\" 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 September 19, 2013 +.Dt PROTECT 1 +.Os +.Sh NAME +.Nm protect +.Nd "protect processes from being killed when swap space is exhausted" +.Sh SYNOPSIS +.Nm +.Op Fl i +.Ar command +.Nm +.Op Fl cdi +.Fl g Ar pgrp | Fl p Ar pid +.Sh DESCRIPTION +The +.Nm +command is used to mark processes as protected. +The kernel does not kill protected processes when swap space is exhausted. +Note that this protected state is not inherited by child processes by default. +.Pp +The options are: +.Bl -tag -width indent +.It Fl c +Remove protection from the specified processes. +.It Fl d +Apply the operation to all current children of the specified processes. +.It Fl i +Apply the operation to all future children of the specified processes. +.It Fl g Ar pgrp +Apply the operation to all processes in the specified process group. +.It Fl p Ar pid +Apply the operation to the specified process. +.It Ar command +Execute +.Ar command +as a protected process. +.El +.Pp +Note that only one of the +.Fl p +or +.Fl g +flags may be specified when adjusting the state of existing processes. +.Sh EXIT STATUS +.Ex -std +.Sh EXAMPLES +Mark the Xorg server as protected: +.Pp +.Dl "pgrep Xorg | xargs protect -p" +Protect all ssh sessions and their child processes: +.Pp +.Dl "pgrep sshd | xargs protect -dip" +Remove protection from all current and future processes: +.Pp +.Dl "protect -cdi -p 1" +.Sh SEE ALSO +.Xr pprotect 2 +.Sh BUGS +If you protect a runaway process that allocates all memory the system will +deadlock. +.Pp +Inheritance of the protected state is not yet implemented. Added: head/usr.bin/protect/protect.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/protect/protect.c Thu Sep 19 18:53:42 2013 (r255708) @@ -0,0 +1,122 @@ +/*- + * Copyright (c) 2013 Advanced Computing Technologies LLC + * Written by: John H. Baldwin + * 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 void +usage(void) +{ + + fprintf(stderr, "usage: protect [-i] command\n"); + fprintf(stderr, " protect [-cdi] -g pgrp | -p pid\n"); + exit(1); +} + +static id_t +parse_id(char *id) +{ + static bool first = true; + long value; + char *ch; + + if (!first) { + warnx("only one -g or -p flag is permitted"); + usage(); + } + value = strtol(id, &ch, 0); + if (*ch != '\0') { + warnx("invalid process id"); + usage(); + } + return (value); +} + +int +main(int argc, char *argv[]) +{ + idtype_t idtype; + id_t id; + int ch, flags; + bool descend, inherit, idset; + + idtype = P_PID; + id = getpid(); + flags = PPROT_SET; + descend = inherit = idset = false; + while ((ch = getopt(argc, argv, "cdig:p:")) != -1) + switch (ch) { + case 'c': + flags = PPROT_CLEAR; + break; + case 'd': + descend = true; + break; + case 'i': + inherit = true; + break; + case 'g': + idtype = P_PGID; + id = parse_id(optarg); + idset = true; + break; + case 'p': + idtype = P_PID; + id = parse_id(optarg); + idset = true; + break; + } + argc -= optind; + argv += optind; + + if ((idset && argc != 0) || (!idset && (argc == 0 || descend))) + usage(); + + if (descend) + flags |= PPROT_DESCEND; + if (inherit) + flags |= PPROT_INHERIT; + if (procctl(idtype, id, PROC_SPROTECT, &flags) == -1) + err(1, "procctl"); + + if (argc != 0) { + errno = 0; + execvp(*argv, argv); + err(errno == ENOENT ? 127 : 126, "%s", *argv); + } + return (0); +} Modified: head/usr.bin/truss/syscall.h ============================================================================== --- head/usr.bin/truss/syscall.h Thu Sep 19 18:00:05 2013 (r255707) +++ head/usr.bin/truss/syscall.h Thu Sep 19 18:53:42 2013 (r255708) @@ -40,7 +40,7 @@ enum Argtype { None = 1, Hex, Octal, Int Fd_set, Sigaction, Fcntl, Mprot, Mmapflags, Whence, Readlinkres, Umtx, Sigset, Sigprocmask, Kevent, Sockdomain, Socktype, Open, Fcntlflag, Rusage, BinString, Shutdown, Resource, Rlimit, Timeval2, - Pathconf, Rforkflags, ExitStatus, Waitoptions, Idtype }; + Pathconf, Rforkflags, ExitStatus, Waitoptions, Idtype, Procctl }; #define ARG_MASK 0xff #define OUT 0x100 Modified: head/usr.bin/truss/syscalls.c ============================================================================== --- head/usr.bin/truss/syscalls.c Thu Sep 19 18:00:05 2013 (r255707) +++ head/usr.bin/truss/syscalls.c Thu Sep 19 18:53:42 2013 (r255708) @@ -41,6 +41,7 @@ static const char rcsid[] = #include #include +#include #include #include #include @@ -270,6 +271,8 @@ static struct syscall syscalls[] = { { .name = "wait6", .ret_type = 1, .nargs = 6, .args = { { Idtype, 0 }, { Int, 1 }, { ExitStatus | OUT, 2 }, { Waitoptions, 3 }, { Rusage | OUT, 4 }, { Ptr, 5 } } }, + { .name = "procctl", .ret_type = 1, .nargs = 4, + .args = { { Idtype, 0 }, { Int, 1 }, { Procctl, 2 }, { Ptr, 3 } } }, { .name = 0 }, }; @@ -399,6 +402,10 @@ static struct xlat idtype_arg[] = { X(P_CTID) X(P_CPUID) X(P_PSETID) XEND }; +static struct xlat procctl_arg[] = { + X(PROC_SPROTECT) XEND +}; + #undef X #undef XEND @@ -1198,6 +1205,9 @@ print_arg(struct syscall_args *sc, unsig case Idtype: tmp = strdup(xlookup(idtype_arg, args[sc->offset])); break; + case Procctl: + tmp = strdup(xlookup(procctl_arg, args[sc->offset])); + break; default: errx(1, "Invalid argument type %d\n", sc->type & ARG_MASK); } From owner-svn-src-all@FreeBSD.ORG Thu Sep 19 18:56:03 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 12405428; Thu, 19 Sep 2013 18:56:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F2225219B; Thu, 19 Sep 2013 18:56:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8JIu2AB056829; Thu, 19 Sep 2013 18:56:02 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8JIu0H1056805; Thu, 19 Sep 2013 18:56:00 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201309191856.r8JIu0H1056805@svn.freebsd.org> From: John Baldwin Date: Thu, 19 Sep 2013 18:56:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255709 - in head/sys: compat/freebsd32 kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Sep 2013 18:56:03 -0000 Author: jhb Date: Thu Sep 19 18:56:00 2013 New Revision: 255709 URL: http://svnweb.freebsd.org/changeset/base/255709 Log: Regen. Approved by: re (delphij) Modified: head/sys/compat/freebsd32/freebsd32_proto.h head/sys/compat/freebsd32/freebsd32_syscall.h head/sys/compat/freebsd32/freebsd32_syscalls.c head/sys/compat/freebsd32/freebsd32_sysent.c head/sys/compat/freebsd32/freebsd32_systrace_args.c head/sys/kern/init_sysent.c head/sys/kern/syscalls.c head/sys/kern/systrace_args.c head/sys/sys/syscall.h head/sys/sys/syscall.mk head/sys/sys/sysproto.h Modified: head/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_proto.h Thu Sep 19 18:53:42 2013 (r255708) +++ head/sys/compat/freebsd32/freebsd32_proto.h Thu Sep 19 18:56:00 2013 (r255709) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 255657 2013-09-17 20:48:19Z jilles + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 255708 2013-09-19 18:53:42Z jhb */ #ifndef _FREEBSD32_SYSPROTO_H_ @@ -670,6 +670,24 @@ struct freebsd32_cap_ioctls_get_args { struct freebsd32_aio_mlock_args { char aiocbp_l_[PADL_(struct aiocb32 *)]; struct aiocb32 * aiocbp; char aiocbp_r_[PADR_(struct aiocb32 *)]; }; +#ifdef PAD64_REQUIRED +struct freebsd32_procctl_args { + char idtype_l_[PADL_(int)]; int idtype; char idtype_r_[PADR_(int)]; + char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; + char id1_l_[PADL_(uint32_t)]; uint32_t id1; char id1_r_[PADR_(uint32_t)]; + char id2_l_[PADL_(uint32_t)]; uint32_t id2; char id2_r_[PADR_(uint32_t)]; + char com_l_[PADL_(int)]; int com; char com_r_[PADR_(int)]; + char data_l_[PADL_(void *)]; void * data; char data_r_[PADR_(void *)]; +}; +#else +struct freebsd32_procctl_args { + char idtype_l_[PADL_(int)]; int idtype; char idtype_r_[PADR_(int)]; + char id1_l_[PADL_(uint32_t)]; uint32_t id1; char id1_r_[PADR_(uint32_t)]; + char id2_l_[PADL_(uint32_t)]; uint32_t id2; char id2_r_[PADR_(uint32_t)]; + char com_l_[PADL_(int)]; int com; char com_r_[PADR_(int)]; + char data_l_[PADL_(void *)]; void * data; char data_r_[PADR_(void *)]; +}; +#endif #if !defined(PAD64_REQUIRED) && (defined(__powerpc__) || defined(__mips__)) #define PAD64_REQUIRED #endif @@ -797,6 +815,11 @@ int freebsd32_wait6(struct thread *, str int freebsd32_cap_ioctls_limit(struct thread *, struct freebsd32_cap_ioctls_limit_args *); int freebsd32_cap_ioctls_get(struct thread *, struct freebsd32_cap_ioctls_get_args *); int freebsd32_aio_mlock(struct thread *, struct freebsd32_aio_mlock_args *); +#ifdef PAD64_REQUIRED +int freebsd32_procctl(struct thread *, struct freebsd32_procctl_args *); +#else +int freebsd32_procctl(struct thread *, struct freebsd32_procctl_args *); +#endif #ifdef COMPAT_43 @@ -868,6 +891,9 @@ struct ofreebsd32_getdirentries_args { #ifdef PAD64_REQUIRED #else #endif +#ifdef PAD64_REQUIRED +#else +#endif int ofreebsd32_lseek(struct thread *, struct ofreebsd32_lseek_args *); int ofreebsd32_stat(struct thread *, struct ofreebsd32_stat_args *); int ofreebsd32_lstat(struct thread *, struct ofreebsd32_lstat_args *); @@ -936,6 +962,9 @@ struct freebsd4_freebsd32_sigreturn_args #ifdef PAD64_REQUIRED #else #endif +#ifdef PAD64_REQUIRED +#else +#endif int freebsd4_freebsd32_getfsstat(struct thread *, struct freebsd4_freebsd32_getfsstat_args *); int freebsd4_freebsd32_statfs(struct thread *, struct freebsd4_freebsd32_statfs_args *); int freebsd4_freebsd32_fstatfs(struct thread *, struct freebsd4_freebsd32_fstatfs_args *); @@ -1006,6 +1035,9 @@ struct freebsd6_freebsd32_ftruncate_args #ifdef PAD64_REQUIRED #else #endif +#ifdef PAD64_REQUIRED +#else +#endif int freebsd6_freebsd32_pread(struct thread *, struct freebsd6_freebsd32_pread_args *); int freebsd6_freebsd32_pwrite(struct thread *, struct freebsd6_freebsd32_pwrite_args *); int freebsd6_freebsd32_mmap(struct thread *, struct freebsd6_freebsd32_mmap_args *); @@ -1046,6 +1078,9 @@ struct freebsd7_freebsd32_shmctl_args { #ifdef PAD64_REQUIRED #else #endif +#ifdef PAD64_REQUIRED +#else +#endif int freebsd7_freebsd32_semctl(struct thread *, struct freebsd7_freebsd32_semctl_args *); int freebsd7_freebsd32_msgctl(struct thread *, struct freebsd7_freebsd32_msgctl_args *); int freebsd7_freebsd32_shmctl(struct thread *, struct freebsd7_freebsd32_shmctl_args *); @@ -1198,6 +1233,8 @@ int freebsd7_freebsd32_shmctl(struct thr #define FREEBSD32_SYS_AUE_freebsd32_cap_ioctls_limit AUE_CAP_IOCTLS_LIMIT #define FREEBSD32_SYS_AUE_freebsd32_cap_ioctls_get AUE_CAP_IOCTLS_GET #define FREEBSD32_SYS_AUE_freebsd32_aio_mlock AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_procctl AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_procctl AUE_NULL #undef PAD_ #undef PADL_ Modified: head/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscall.h Thu Sep 19 18:53:42 2013 (r255708) +++ head/sys/compat/freebsd32/freebsd32_syscall.h Thu Sep 19 18:56:00 2013 (r255709) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 255657 2013-09-17 20:48:19Z jilles + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 255708 2013-09-19 18:53:42Z jhb */ #define FREEBSD32_SYS_syscall 0 @@ -452,4 +452,6 @@ #define FREEBSD32_SYS_accept4 541 #define FREEBSD32_SYS_pipe2 542 #define FREEBSD32_SYS_freebsd32_aio_mlock 543 -#define FREEBSD32_SYS_MAXSYSCALL 544 +#define FREEBSD32_SYS_freebsd32_procctl 544 +#define FREEBSD32_SYS_freebsd32_procctl 544 +#define FREEBSD32_SYS_MAXSYSCALL 545 Modified: head/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscalls.c Thu Sep 19 18:53:42 2013 (r255708) +++ head/sys/compat/freebsd32/freebsd32_syscalls.c Thu Sep 19 18:56:00 2013 (r255709) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 255657 2013-09-17 20:48:19Z jilles + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 255708 2013-09-19 18:53:42Z jhb */ const char *freebsd32_syscallnames[] = { @@ -573,4 +573,9 @@ const char *freebsd32_syscallnames[] = { "accept4", /* 541 = accept4 */ "pipe2", /* 542 = pipe2 */ "freebsd32_aio_mlock", /* 543 = freebsd32_aio_mlock */ +#ifdef PAD64_REQUIRED + "freebsd32_procctl", /* 544 = freebsd32_procctl */ +#else + "freebsd32_procctl", /* 544 = freebsd32_procctl */ +#endif }; Modified: head/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_sysent.c Thu Sep 19 18:53:42 2013 (r255708) +++ head/sys/compat/freebsd32/freebsd32_sysent.c Thu Sep 19 18:56:00 2013 (r255709) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 255657 2013-09-17 20:48:19Z jilles + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 255708 2013-09-19 18:53:42Z jhb */ #include "opt_compat.h" @@ -610,4 +610,9 @@ struct sysent freebsd32_sysent[] = { { AS(accept4_args), (sy_call_t *)sys_accept4, AUE_ACCEPT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 541 = accept4 */ { AS(pipe2_args), (sy_call_t *)sys_pipe2, AUE_PIPE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 542 = pipe2 */ { AS(freebsd32_aio_mlock_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 543 = freebsd32_aio_mlock */ +#ifdef PAD64_REQUIRED + { AS(freebsd32_procctl_args), (sy_call_t *)freebsd32_procctl, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 544 = freebsd32_procctl */ +#else + { AS(freebsd32_procctl_args), (sy_call_t *)freebsd32_procctl, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 544 = freebsd32_procctl */ +#endif }; Modified: head/sys/compat/freebsd32/freebsd32_systrace_args.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_systrace_args.c Thu Sep 19 18:53:42 2013 (r255708) +++ head/sys/compat/freebsd32/freebsd32_systrace_args.c Thu Sep 19 18:56:00 2013 (r255709) @@ -3287,6 +3287,32 @@ systrace_args(int sysnum, void *params, *n_args = 1; break; } +#ifdef PAD64_REQUIRED + /* freebsd32_procctl */ + case 544: { + struct freebsd32_procctl_args *p = params; + iarg[0] = p->idtype; /* int */ + iarg[1] = p->pad; /* int */ + uarg[2] = p->id1; /* uint32_t */ + uarg[3] = p->id2; /* uint32_t */ + iarg[4] = p->com; /* int */ + uarg[5] = (intptr_t) p->data; /* void * */ + *n_args = 6; + break; + } +#else + /* freebsd32_procctl */ + case 544: { + struct freebsd32_procctl_args *p = params; + iarg[0] = p->idtype; /* int */ + uarg[1] = p->id1; /* uint32_t */ + uarg[2] = p->id2; /* uint32_t */ + iarg[3] = p->com; /* int */ + uarg[4] = (intptr_t) p->data; /* void * */ + *n_args = 5; + break; + } +#endif default: *n_args = 0; break; @@ -8802,6 +8828,56 @@ systrace_entry_setargdesc(int sysnum, in break; }; break; +#ifdef PAD64_REQUIRED + /* freebsd32_procctl */ + case 544: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + case 2: + p = "uint32_t"; + break; + case 3: + p = "uint32_t"; + break; + case 4: + p = "int"; + break; + case 5: + p = "void *"; + break; + default: + break; + }; + break; +#else + /* freebsd32_procctl */ + case 544: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "uint32_t"; + break; + case 2: + p = "uint32_t"; + break; + case 3: + p = "int"; + break; + case 4: + p = "void *"; + break; + default: + break; + }; + break; +#endif default: break; }; @@ -10672,6 +10748,19 @@ systrace_return_setargdesc(int sysnum, i if (ndx == 0 || ndx == 1) p = "int"; break; +#ifdef PAD64_REQUIRED + /* freebsd32_procctl */ + case 544: + if (ndx == 0 || ndx == 1) + p = "int"; + break; +#else + /* freebsd32_procctl */ + case 544: + if (ndx == 0 || ndx == 1) + p = "int"; + break; +#endif default: break; }; Modified: head/sys/kern/init_sysent.c ============================================================================== --- head/sys/kern/init_sysent.c Thu Sep 19 18:53:42 2013 (r255708) +++ head/sys/kern/init_sysent.c Thu Sep 19 18:56:00 2013 (r255709) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 255490 2013-09-12 17:52:18Z jhb + * created from FreeBSD: head/sys/kern/syscalls.master 255708 2013-09-19 18:53:42Z jhb */ #include "opt_compat.h" @@ -578,4 +578,5 @@ struct sysent sysent[] = { { AS(accept4_args), (sy_call_t *)sys_accept4, AUE_ACCEPT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 541 = accept4 */ { AS(pipe2_args), (sy_call_t *)sys_pipe2, AUE_PIPE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 542 = pipe2 */ { AS(aio_mlock_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 543 = aio_mlock */ + { AS(procctl_args), (sy_call_t *)sys_procctl, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 544 = procctl */ }; Modified: head/sys/kern/syscalls.c ============================================================================== --- head/sys/kern/syscalls.c Thu Sep 19 18:53:42 2013 (r255708) +++ head/sys/kern/syscalls.c Thu Sep 19 18:56:00 2013 (r255709) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 255490 2013-09-12 17:52:18Z jhb + * created from FreeBSD: head/sys/kern/syscalls.master 255708 2013-09-19 18:53:42Z jhb */ const char *syscallnames[] = { @@ -551,4 +551,5 @@ const char *syscallnames[] = { "accept4", /* 541 = accept4 */ "pipe2", /* 542 = pipe2 */ "aio_mlock", /* 543 = aio_mlock */ + "procctl", /* 544 = procctl */ }; Modified: head/sys/kern/systrace_args.c ============================================================================== --- head/sys/kern/systrace_args.c Thu Sep 19 18:53:42 2013 (r255708) +++ head/sys/kern/systrace_args.c Thu Sep 19 18:56:00 2013 (r255709) @@ -3376,6 +3376,16 @@ systrace_args(int sysnum, void *params, *n_args = 1; break; } + /* procctl */ + case 544: { + struct procctl_args *p = params; + iarg[0] = p->idtype; /* idtype_t */ + iarg[1] = p->id; /* id_t */ + iarg[2] = p->com; /* int */ + uarg[3] = (intptr_t) p->data; /* void * */ + *n_args = 4; + break; + } default: *n_args = 0; break; @@ -8995,6 +9005,25 @@ systrace_entry_setargdesc(int sysnum, in break; }; break; + /* procctl */ + case 544: + switch(ndx) { + case 0: + p = "idtype_t"; + break; + case 1: + p = "id_t"; + break; + case 2: + p = "int"; + break; + case 3: + p = "void *"; + break; + default: + break; + }; + break; default: break; }; @@ -10938,6 +10967,11 @@ systrace_return_setargdesc(int sysnum, i if (ndx == 0 || ndx == 1) p = "int"; break; + /* procctl */ + case 544: + if (ndx == 0 || ndx == 1) + p = "int"; + break; default: break; }; Modified: head/sys/sys/syscall.h ============================================================================== --- head/sys/sys/syscall.h Thu Sep 19 18:53:42 2013 (r255708) +++ head/sys/sys/syscall.h Thu Sep 19 18:56:00 2013 (r255709) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 255490 2013-09-12 17:52:18Z jhb + * created from FreeBSD: head/sys/kern/syscalls.master 255708 2013-09-19 18:53:42Z jhb */ #define SYS_syscall 0 @@ -463,4 +463,5 @@ #define SYS_accept4 541 #define SYS_pipe2 542 #define SYS_aio_mlock 543 -#define SYS_MAXSYSCALL 544 +#define SYS_procctl 544 +#define SYS_MAXSYSCALL 545 Modified: head/sys/sys/syscall.mk ============================================================================== --- head/sys/sys/syscall.mk Thu Sep 19 18:53:42 2013 (r255708) +++ head/sys/sys/syscall.mk Thu Sep 19 18:56:00 2013 (r255709) @@ -1,7 +1,7 @@ # FreeBSD system call names. # DO NOT EDIT-- this file is automatically generated. # $FreeBSD$ -# created from FreeBSD: head/sys/kern/syscalls.master 255490 2013-09-12 17:52:18Z jhb +# created from FreeBSD: head/sys/kern/syscalls.master 255708 2013-09-19 18:53:42Z jhb MIASM = \ syscall.o \ exit.o \ @@ -410,4 +410,5 @@ MIASM = \ chflagsat.o \ accept4.o \ pipe2.o \ - aio_mlock.o + aio_mlock.o \ + procctl.o Modified: head/sys/sys/sysproto.h ============================================================================== --- head/sys/sys/sysproto.h Thu Sep 19 18:53:42 2013 (r255708) +++ head/sys/sys/sysproto.h Thu Sep 19 18:56:00 2013 (r255709) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 255490 2013-09-12 17:52:18Z jhb + * created from FreeBSD: head/sys/kern/syscalls.master 255708 2013-09-19 18:53:42Z jhb */ #ifndef _SYS_SYSPROTO_H_ @@ -1813,6 +1813,12 @@ struct pipe2_args { struct aio_mlock_args { char aiocbp_l_[PADL_(struct aiocb *)]; struct aiocb * aiocbp; char aiocbp_r_[PADR_(struct aiocb *)]; }; +struct procctl_args { + char idtype_l_[PADL_(idtype_t)]; idtype_t idtype; char idtype_r_[PADR_(idtype_t)]; + char id_l_[PADL_(id_t)]; id_t id; char id_r_[PADR_(id_t)]; + char com_l_[PADL_(int)]; int com; char com_r_[PADR_(int)]; + char data_l_[PADL_(void *)]; void * data; char data_r_[PADR_(void *)]; +}; int nosys(struct thread *, struct nosys_args *); void sys_sys_exit(struct thread *, struct sys_exit_args *); int sys_fork(struct thread *, struct fork_args *); @@ -2205,6 +2211,7 @@ int sys_chflagsat(struct thread *, struc int sys_accept4(struct thread *, struct accept4_args *); int sys_pipe2(struct thread *, struct pipe2_args *); int sys_aio_mlock(struct thread *, struct aio_mlock_args *); +int sys_procctl(struct thread *, struct procctl_args *); #ifdef COMPAT_43 @@ -2911,6 +2918,7 @@ int freebsd7_shmctl(struct thread *, str #define SYS_AUE_accept4 AUE_ACCEPT #define SYS_AUE_pipe2 AUE_PIPE #define SYS_AUE_aio_mlock AUE_NULL +#define SYS_AUE_procctl AUE_NULL #undef PAD_ #undef PADL_ From owner-svn-src-all@FreeBSD.ORG Thu Sep 19 19:43:29 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9D734FF0; Thu, 19 Sep 2013 19:43:29 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8A58E2519; Thu, 19 Sep 2013 19:43:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8JJhTSO083081; Thu, 19 Sep 2013 19:43:29 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8JJhTNG083080; Thu, 19 Sep 2013 19:43:29 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201309191943.r8JJhTNG083080@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 19 Sep 2013 19:43:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255710 - stable/9/sys/net X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Sep 2013 19:43:29 -0000 Author: glebius Date: Thu Sep 19 19:43:29 2013 New Revision: 255710 URL: http://svnweb.freebsd.org/changeset/base/255710 Log: Merge from r245741 from head: If lagg(4) can't forward a packet due to underlying port problems, return much more meaningful ENETDOWN to the stack, instead of EBUSY. Modified: stable/9/sys/net/if_lagg.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/net/ (props changed) Modified: stable/9/sys/net/if_lagg.c ============================================================================== --- stable/9/sys/net/if_lagg.c Thu Sep 19 18:56:00 2013 (r255709) +++ stable/9/sys/net/if_lagg.c Thu Sep 19 19:43:29 2013 (r255710) @@ -820,7 +820,7 @@ lagg_port_output(struct ifnet *ifp, stru /* drop any other frames */ m_freem(m); - return (EBUSY); + return (ENETDOWN); } static void @@ -1893,7 +1893,7 @@ lagg_lacp_start(struct lagg_softc *sc, s lp = lacp_select_tx_port(sc, m); if (lp == NULL) { m_freem(m); - return (EBUSY); + return (ENETDOWN); } /* Send mbuf */ From owner-svn-src-all@FreeBSD.ORG Thu Sep 19 19:43:39 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8C6BA196; Thu, 19 Sep 2013 19:43:39 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5F7D9251B; Thu, 19 Sep 2013 19:43:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8JJhdRP083157; Thu, 19 Sep 2013 19:43:39 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8JJhdO4083154; Thu, 19 Sep 2013 19:43:39 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201309191943.r8JJhdO4083154@svn.freebsd.org> From: Joel Dahl Date: Thu, 19 Sep 2013 19:43:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255711 - in head: lib/libc/sys usr.bin/protect X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Sep 2013 19:43:39 -0000 Author: joel (doc committer) Date: Thu Sep 19 19:43:38 2013 New Revision: 255711 URL: http://svnweb.freebsd.org/changeset/base/255711 Log: Minor mdoc improvements. Approved by: re (blanket) Modified: head/lib/libc/sys/procctl.2 head/usr.bin/protect/protect.1 Modified: head/lib/libc/sys/procctl.2 ============================================================================== --- head/lib/libc/sys/procctl.2 Thu Sep 19 19:43:29 2013 (r255710) +++ head/lib/libc/sys/procctl.2 Thu Sep 19 19:43:38 2013 (r255711) @@ -54,7 +54,7 @@ to control as many of the selected possi An error is only returned if no selected processes successfully complete the request. The following identifier types are supported: -.Bl -tag -width Dv P_PGID +.Bl -tag -width "Dv P_PGID" .It Dv P_PID Control the process with the process ID .Fa id . @@ -67,7 +67,7 @@ The control request to perform is specif .Fa cmd argument. The following commands are supported: -.Bl -tag -width Dv PROC_SPROTECT +.Bl -tag -width "Dv PROC_SPROTECT" .It Dv PROC_SPROTECT Set process protection state. This is used to mark a process as protected from being killed if the system @@ -77,7 +77,7 @@ The parameter must point to an integer containing an operation and zero or more optional flags. The following operations are supported: -.Bl -tag -width Dv PPROT_CLEAR +.Bl -tag -width "Dv PPROT_CLEAR" .It Dv PPROT_SET Mark the selected processes as protected. .It Dv PPROT_CLEAR @@ -85,7 +85,7 @@ Clear the protected state of selected pr .El .Pp The following optional flags are supported: -.Bl -tag -width Dv PPROT_DESCEND +.Bl -tag -width "Dv PPROT_DESCE" .It Dv PPROT_DESCEND Apply the requested operation to all child processes of each selected process in addition to each selected process. Modified: head/usr.bin/protect/protect.1 ============================================================================== --- head/usr.bin/protect/protect.1 Thu Sep 19 19:43:29 2013 (r255710) +++ head/usr.bin/protect/protect.1 Thu Sep 19 19:43:38 2013 (r255711) @@ -46,7 +46,7 @@ The kernel does not kill protected proce Note that this protected state is not inherited by child processes by default. .Pp The options are: -.Bl -tag -width indent +.Bl -tag -width XXXXXXXXXX .It Fl c Remove protection from the specified processes. .It Fl d @@ -74,9 +74,11 @@ flags may be specified when adjusting th Mark the Xorg server as protected: .Pp .Dl "pgrep Xorg | xargs protect -p" +.Pp Protect all ssh sessions and their child processes: .Pp .Dl "pgrep sshd | xargs protect -dip" +.Pp Remove protection from all current and future processes: .Pp .Dl "protect -cdi -p 1" From owner-svn-src-all@FreeBSD.ORG Thu Sep 19 19:49:32 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 103C6339; Thu, 19 Sep 2013 19:49:32 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F1119254E; Thu, 19 Sep 2013 19:49:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8JJnVgh084967; Thu, 19 Sep 2013 19:49:31 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8JJnVKG084966; Thu, 19 Sep 2013 19:49:31 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201309191949.r8JJnVKG084966@svn.freebsd.org> From: Glen Barber Date: Thu, 19 Sep 2013 19:49:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255712 - head/release X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Sep 2013 19:49:32 -0000 Author: gjb Date: Thu Sep 19 19:49:31 2013 New Revision: 255712 URL: http://svnweb.freebsd.org/changeset/base/255712 Log: Remove extra 'MAKE_FLAGS' line. Submitted by: jhb Approved by: re (marius) Sponsored by: The FreeBSD Foundation Modified: head/release/release.sh Modified: head/release/release.sh ============================================================================== --- head/release/release.sh Thu Sep 19 19:43:38 2013 (r255711) +++ head/release/release.sh Thu Sep 19 19:49:31 2013 (r255712) @@ -71,7 +71,6 @@ KERNEL="GENERIC" # ports/ checkout also forces NODOC to be set. NODOC= NOPORTS= -MAKE_FLAGS="${MAKE_FLAGS}" usage() { echo "Usage: $0 [-c release.conf]" From owner-svn-src-all@FreeBSD.ORG Thu Sep 19 20:09:56 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C92F99ED; Thu, 19 Sep 2013 20:09:56 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B64CB268F; Thu, 19 Sep 2013 20:09:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8JK9u98096009; Thu, 19 Sep 2013 20:09:56 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8JK9u96096008; Thu, 19 Sep 2013 20:09:56 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201309192009.r8JK9u96096008@svn.freebsd.org> From: Ed Maste Date: Thu, 19 Sep 2013 20:09:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255713 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Sep 2013 20:09:56 -0000 Author: emaste Date: Thu Sep 19 20:09:56 2013 New Revision: 255713 URL: http://svnweb.freebsd.org/changeset/base/255713 Log: Further refinement to bmake bootstrapping Include PROGNAME and DESTDIR in ${MMAKE} so that it doesn't need to be passed to each make invocation. Suggested by: hrs Reviewed by: hrs Approved by: re (gjb) Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Thu Sep 19 19:49:31 2013 (r255712) +++ head/Makefile Thu Sep 19 20:09:56 2013 (r255713) @@ -341,7 +341,7 @@ MMAKEENV= MAKEOBJDIRPREFIX=${MYMAKE:H} \ MMAKE= ${MMAKEENV} ${MAKE} \ -D_UPGRADING \ -DNOMAN -DNO_MAN -DNOSHARED -DNO_SHARED \ - -DNO_CPU_CFLAGS -DNO_WERROR + -DNO_CPU_CFLAGS -DNO_WERROR DESTDIR= PROGNAME=${MYMAKE:T} make bmake: .PHONY @echo @@ -349,10 +349,10 @@ make bmake: .PHONY @echo ">>> Building an up-to-date make(1)" @echo "--------------------------------------------------------------" ${_+_}@cd ${.CURDIR}/usr.bin/${.TARGET}; \ - ${MMAKE} obj DESTDIR= && \ - ${MMAKE} depend DESTDIR= && \ - ${MMAKE} all DESTDIR= PROGNAME=${MYMAKE:T} && \ - ${MMAKE} install DESTDIR=${MYMAKE:H} BINDIR= PROGNAME=${MYMAKE:T} + ${MMAKE} obj && \ + ${MMAKE} depend && \ + ${MMAKE} all && \ + ${MMAKE} install DESTDIR=${MYMAKE:H} BINDIR= tinderbox toolchains kernel-toolchains: upgrade_checks From owner-svn-src-all@FreeBSD.ORG Thu Sep 19 20:15:25 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B5B5EC09; Thu, 19 Sep 2013 20:15:25 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 89EF126EE; Thu, 19 Sep 2013 20:15:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8JKFPmM000600; Thu, 19 Sep 2013 20:15:25 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8JKFPPp000598; Thu, 19 Sep 2013 20:15:25 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201309192015.r8JKFPPp000598@svn.freebsd.org> From: Mikolaj Golub Date: Thu, 19 Sep 2013 20:15:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255714 - head/sbin/hastd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Sep 2013 20:15:25 -0000 Author: trociny Date: Thu Sep 19 20:15:24 2013 New Revision: 255714 URL: http://svnweb.freebsd.org/changeset/base/255714 Log: Use cv_broadcast() instead of cv_signal() when waking up threads waiting on an empty queue as the queue may have several consumers. Before the fix the following scenario was possible: 2 threads are waiting on empty queue, 2 threads are inserting simultaneously. The first inserting thread detects that the queue is empty and is going to send the signal, but before it sends the second thread inserts too. When the first sends the signal only one of the waiting threads receive it while the other one may wait forever. The scenario above is is believed to be the cause of the observed cases, when ggate_recv_thread() was getting stuck on taking free request, while the free queue was not empty. Reviewed by: pjd Tested by: Yamagi Burmeister yamagi.org Approved by: re (marius) MFC after: 2 weeks Modified: head/sbin/hastd/primary.c head/sbin/hastd/secondary.c Modified: head/sbin/hastd/primary.c ============================================================================== --- head/sbin/hastd/primary.c Thu Sep 19 20:09:56 2013 (r255713) +++ head/sbin/hastd/primary.c Thu Sep 19 20:15:24 2013 (r255714) @@ -172,7 +172,7 @@ static pthread_mutex_t metadata_lock; hio_next[(ncomp)]); \ mtx_unlock(&hio_##name##_list_lock[ncomp]); \ if (_wakeup) \ - cv_signal(&hio_##name##_list_cond[(ncomp)]); \ + cv_broadcast(&hio_##name##_list_cond[(ncomp)]); \ } while (0) #define QUEUE_INSERT2(hio, name) do { \ bool _wakeup; \ @@ -182,7 +182,7 @@ static pthread_mutex_t metadata_lock; TAILQ_INSERT_TAIL(&hio_##name##_list, (hio), hio_##name##_next);\ mtx_unlock(&hio_##name##_list_lock); \ if (_wakeup) \ - cv_signal(&hio_##name##_list_cond); \ + cv_broadcast(&hio_##name##_list_cond); \ } while (0) #define QUEUE_TAKE1(hio, name, ncomp, timeout) do { \ bool _last; \ Modified: head/sbin/hastd/secondary.c ============================================================================== --- head/sbin/hastd/secondary.c Thu Sep 19 20:09:56 2013 (r255713) +++ head/sbin/hastd/secondary.c Thu Sep 19 20:15:24 2013 (r255714) @@ -115,7 +115,7 @@ static void *send_thread(void *arg); TAILQ_INSERT_TAIL(&hio_##name##_list, (hio), hio_next); \ mtx_unlock(&hio_##name##_list_lock); \ if (_wakeup) \ - cv_signal(&hio_##name##_list_cond); \ + cv_broadcast(&hio_##name##_list_cond); \ } while (0) #define QUEUE_TAKE(name, hio) do { \ mtx_lock(&hio_##name##_list_lock); \ From owner-svn-src-all@FreeBSD.ORG Thu Sep 19 20:17:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0A3B1D6D; Thu, 19 Sep 2013 20:17:52 +0000 (UTC) (envelope-from db@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E962B2706; Thu, 19 Sep 2013 20:17:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8JKHpuH000983; Thu, 19 Sep 2013 20:17:51 GMT (envelope-from db@svn.freebsd.org) Received: (from db@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8JKHoMj000974; Thu, 19 Sep 2013 20:17:50 GMT (envelope-from db@svn.freebsd.org) Message-Id: <201309192017.r8JKHoMj000974@svn.freebsd.org> From: Diane Bruce Date: Thu, 19 Sep 2013 20:17:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255715 - head/usr.bin/calendar X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Sep 2013 20:17:52 -0000 Author: db (ports committer) Date: Thu Sep 19 20:17:50 2013 New Revision: 255715 URL: http://svnweb.freebsd.org/changeset/base/255715 Log: - calendar uses cpp internally, this diff removes this usage and substitutes a limited subset cpp processor internally. PR: src/178463 Approved by: re (gjb) Added: head/usr.bin/calendar/calcpp.c (contents, props changed) Modified: head/usr.bin/calendar/Makefile (contents, props changed) head/usr.bin/calendar/calendar.1 (contents, props changed) head/usr.bin/calendar/calendar.h (contents, props changed) head/usr.bin/calendar/io.c (contents, props changed) head/usr.bin/calendar/pathnames.h (contents, props changed) Modified: head/usr.bin/calendar/Makefile ============================================================================== --- head/usr.bin/calendar/Makefile Thu Sep 19 20:15:24 2013 (r255714) +++ head/usr.bin/calendar/Makefile Thu Sep 19 20:17:50 2013 (r255715) @@ -3,7 +3,7 @@ PROG= calendar SRCS= calendar.c locale.c events.c dates.c parsedata.c io.c day.c \ - ostern.c paskha.c pom.c sunpos.c + ostern.c paskha.c pom.c sunpos.c calcpp.c DPADD= ${LIBM} LDADD= -lm INTER= de_AT.ISO_8859-15 de_DE.ISO8859-1 fr_FR.ISO8859-1 \ Added: head/usr.bin/calendar/calcpp.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/calendar/calcpp.c Thu Sep 19 20:17:50 2013 (r255715) @@ -0,0 +1,229 @@ +/*- + * Copyright (c) 2013 Diane Bruce + * 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$ + */ + +/* calendar fake cpp does a very limited cpp version */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "pathnames.h" +#include "calendar.h" + +#define MAXFPSTACK 50 +static FILE *fpstack[MAXFPSTACK]; +static int curfpi; +static void pushfp(FILE *fp); +static FILE *popfp(void); +static int tokenscpp(char *buf, char *string); + +#define T_INVALID -1 +#define T_INCLUDE 0 +#define T_DEFINE 1 +#define T_IFNDEF 2 +#define T_ENDIF 3 + +#define MAXSYMS 100 +static char *symtable[MAXSYMS]; +static void addsym(const char *name); +static int findsym(const char *name); + +FILE * +fincludegets(char *buf, int size, FILE *fp) +{ + char name[MAXPATHLEN]; + FILE *nfp=NULL; + char *p; + int ch; + + if (fp == NULL) + return(NULL); + + if (fgets(buf, size, fp) == NULL) { + *buf = '\0'; + fclose(fp); + fp = popfp(); + return (fp); + } + if ((p = strchr(buf, '\n')) != NULL) + *p = '\0'; + else { + /* Flush this line */ + while ((ch = fgetc(fp)) != '\n' && ch != EOF); + if (ch == EOF) { + *buf = '\0'; + fclose(fp); + fp = popfp(); + return(fp); + } + } + switch (tokenscpp(buf, name)) { + case T_INCLUDE: + *buf = '\0'; + if ((nfp = fopen(name, "r")) != NULL) { + pushfp(fp); + fp = nfp; + } + break; + case T_DEFINE: + addsym(name); + break; + case T_IFNDEF: + if (findsym(name)) { + fclose(fp); + fp = popfp(); + *buf = '\0'; + } + break; + case T_ENDIF: + *buf = '\0'; + break; + default: + break; + } + return (fp); +} + +static int +tokenscpp(char *buf, char *string) +{ + char *p; + char *s; + + if ((p = strstr(buf, "#define")) != NULL) { + p += 8; + while (isspace((unsigned char)*p)) + p++; + s = p; + while(!isspace((unsigned char)*p)) + p++; + strncpy(string, s, MAXPATHLEN); + return(T_DEFINE); + } else if ((p = strstr(buf, "#ifndef")) != NULL) { + p += 8; + while (isspace((unsigned char)*p)) + p++; + s = p; + while(!isspace((unsigned char)*p)) + p++; + *p = '\0'; + strncpy(string, s, MAXPATHLEN); + return(T_IFNDEF); + } else if ((p = strstr(buf, "#endif")) != NULL) { + return(T_ENDIF); + } if ((p = strstr(buf, "#include")) != NULL) { + p += 8; + while (isspace((unsigned char)*p)) + p++; + if (*p == '<') { + s = p+1; + if ((p = strchr(s, '>')) != NULL) + *p = '\0'; + snprintf (string, MAXPATHLEN, "%s/%s", + _PATH_INCLUDE, s); + } else if (*p == '(') { + s = p+1; + if ((p = strchr(p, '>')) != NULL) + *p = '\0'; + snprintf (string, MAXPATHLEN, "%s", s); + } + return(T_INCLUDE); + } + return(T_INVALID); +} + +static void +pushfp(FILE *fp) +{ + curfpi++; + if (curfpi == MAXFPSTACK) + errx(1, "Max #include reached"); + fpstack[curfpi] = fp; +} + +static +FILE *popfp(void) +{ + FILE *tmp; + + assert(curfpi >= 0); + tmp = fpstack[curfpi]; + curfpi--; + return(tmp); +} + +void +initcpp(void) +{ + int i; + + for (i=0; i < MAXSYMS; i++) + symtable[i] = NULL; + fpstack[0] = NULL; + curfpi = 0; +} + + +static void +addsym(const char *name) +{ + int i; + + if (!findsym(name)) + for (i=0; i < MAXSYMS; i++) { + if (symtable[i] == NULL) { + symtable[i] = strdup(name); + if (symtable[i] == NULL) + errx(1, "malloc error in addsym"); + return; + } + } + errx(1, "symbol table full\n"); +} + +static int +findsym(const char *name) +{ + int i; + + for (i=0; i < MAXSYMS; i++) + if (symtable[i] != NULL && strcmp(symtable[i],name) == 0) + return (1); + return (0); +} Modified: head/usr.bin/calendar/calendar.1 ============================================================================== --- head/usr.bin/calendar/calendar.1 Thu Sep 19 20:15:24 2013 (r255714) +++ head/usr.bin/calendar/calendar.1 Thu Sep 19 20:17:50 2013 (r255715) @@ -177,12 +177,15 @@ if the line does not contain a cha If the first character in the line is a character, it is treated as a continuation of the previous line. .Pp -The ``calendar'' file is preprocessed by -.Xr cpp 1 , -allowing the inclusion of shared files such as lists of company holidays or -meetings. +The +.Nm +file is preprocessed by a limited subset of +.Xr cpp 1 +internally, allowing the inclusion of shared files such as +lists of company holidays or meetings. +This limited subset consists of \fB#include #ifndef #endif\fR and \fB#define\fR. If the shared file is not referenced by a full pathname, -.Xr cpp 1 +.Xr calendar 1 searches in the current (or home) directory first, and then in the directory .Pa /usr/share/calendar . @@ -321,7 +324,11 @@ double-check the start and end time of s .Sh BUGS The .Nm -utility does not handle Jewish holidays. +internal cpp does not correctly do #ifndef and will discard the rest +of the file if a #ifndef is triggered. +It also has a maximum of 50 include file and/or 100 #defines +and only recognises #include, #define and +#ifndef. .Pp There is no possibility to properly specify the local position needed for solar and lunar calculations. Modified: head/usr.bin/calendar/calendar.h ============================================================================== --- head/usr.bin/calendar/calendar.h Thu Sep 19 20:15:24 2013 (r255714) +++ head/usr.bin/calendar/calendar.h Thu Sep 19 20:17:50 2013 (r255715) @@ -165,7 +165,12 @@ void dodebug(char *type); /* io.c */ void cal(void); void closecal(FILE *); -FILE *opencal(void); +FILE *opencalin(void); +FILE *opencalout(void); + +/* calcpp.c */ +void initcpp(void); +FILE *fincludegets(char *buf, int size, FILE *fp); /* ostern.c / paskha.c */ int paskha(int); Modified: head/usr.bin/calendar/io.c ============================================================================== --- head/usr.bin/calendar/io.c Thu Sep 19 20:15:24 2013 (r255714) +++ head/usr.bin/calendar/io.c Thu Sep 19 20:17:50 2013 (r255715) @@ -81,8 +81,9 @@ void cal(void) { char *pp, p; - FILE *fp; - int ch, l; + FILE *fpin; + FILE *fpout; + int l; int count, i; int month[MAXCOUNT]; int day[MAXCOUNT]; @@ -95,6 +96,7 @@ cal(void) struct tm tm; char dbuf[80]; + initcpp(); extradata = (char **)calloc(MAXCOUNT, sizeof(char *)); for (i = 0; i < MAXCOUNT; i++) { extradata[i] = (char *)calloc(1, 20); @@ -107,16 +109,18 @@ cal(void) tm.tm_wday = 0; count = 0; - if ((fp = opencal()) == NULL) { + if ((fpin = opencalin()) == NULL) { free(extradata); return; } - while (fgets(buf, sizeof(buf), stdin) != NULL) { - if ((pp = strchr(buf, '\n')) != NULL) - *pp = '\0'; - else - /* Flush this line */ - while ((ch = getchar()) != '\n' && ch != EOF); + if ((fpout = opencalout()) == NULL) { + fclose(fpin); + free(extradata); + return; + } + while ((fpin = fincludegets(buf, sizeof(buf), fpin)) != NULL) { + if (*buf == '\0') + continue; for (l = strlen(buf); l > 0 && isspace((unsigned char)buf[l - 1]); l--) @@ -204,27 +208,27 @@ cal(void) } } - event_print_all(fp); - closecal(fp); + event_print_all(fpout); + closecal(fpout); free(extradata); } FILE * -opencal(void) +opencalin(void) { - uid_t uid; size_t i; - int fd, found, pdes[2]; + int found; struct stat sbuf; + FILE *fpin; - /* open up calendar file as stdin */ - if (!freopen(calendarFile, "r", stdin)) { + /* open up calendar file */ + if ((fpin = fopen(calendarFile, "r")) == NULL) { if (doall) { if (chdir(calendarHomes[0]) != 0) return (NULL); if (stat(calendarNoMail, &sbuf) == 0) return (NULL); - if (!freopen(calendarFile, "r", stdin)) + if ((fpin = fopen(calendarFile, "r")) == NULL) return (NULL); } else { char *home = getenv("HOME"); @@ -235,7 +239,7 @@ opencal(void) for (found = i = 0; i < sizeof(calendarHomes) / sizeof(calendarHomes[0]); i++) if (chdir(calendarHomes[i]) == 0 && - freopen(calendarFile, "r", stdin)) { + (fpin = fopen(calendarFile, "r")) != NULL) { found = 1; break; } @@ -245,50 +249,20 @@ opencal(void) calendarFile, strerror(errno), errno); } } - if (pipe(pdes) < 0) - return (NULL); - switch (fork()) { - case -1: /* error */ - (void)close(pdes[0]); - (void)close(pdes[1]); - return (NULL); - case 0: - /* child -- stdin already setup, set stdout to pipe input */ - if (pdes[1] != STDOUT_FILENO) { - (void)dup2(pdes[1], STDOUT_FILENO); - (void)close(pdes[1]); - } - (void)close(pdes[0]); - uid = geteuid(); - if (setuid(getuid()) < 0) { - warnx("first setuid failed"); - _exit(1); - }; - if (setgid(getegid()) < 0) { - warnx("setgid failed"); - _exit(1); - } - if (setuid(uid) < 0) { - warnx("setuid failed"); - _exit(1); - } - execl(_PATH_CPP, "cpp", "-P", - "-traditional-cpp", "-nostdinc", /* GCC specific opts */ - "-I.", "-I", _PATH_INCLUDE, (char *)NULL); - warn(_PATH_CPP); - _exit(1); - } - /* parent -- set stdin to pipe output */ - (void)dup2(pdes[0], STDIN_FILENO); - (void)close(pdes[0]); - (void)close(pdes[1]); + return (fpin); +} + +FILE * +opencalout(void) +{ + int fd; /* not reading all calendar files, just set output to stdout */ if (!doall) return (stdout); /* set output to a temporary file, so if no output don't send mail */ - (void)snprintf(path, sizeof(path), "%s/_calXXXXXX", _PATH_TMP); + snprintf(path, sizeof(path), "%s/_calXXXXXX", _PATH_TMP); if ((fd = mkstemp(path)) < 0) return (NULL); return (fdopen(fd, "w+")); Modified: head/usr.bin/calendar/pathnames.h ============================================================================== --- head/usr.bin/calendar/pathnames.h Thu Sep 19 20:15:24 2013 (r255714) +++ head/usr.bin/calendar/pathnames.h Thu Sep 19 20:17:50 2013 (r255715) @@ -32,5 +32,4 @@ #include -#define _PATH_CPP "/usr/bin/gcpp" #define _PATH_INCLUDE "/usr/share/calendar" From owner-svn-src-all@FreeBSD.ORG Thu Sep 19 20:19:09 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CEC27EC1; Thu, 19 Sep 2013 20:19:09 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id ADC482716; Thu, 19 Sep 2013 20:19:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8JKJ9Vh001366; Thu, 19 Sep 2013 20:19:09 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8JKJ9Sw001364; Thu, 19 Sep 2013 20:19:09 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201309192019.r8JKJ9Sw001364@svn.freebsd.org> From: Mikolaj Golub Date: Thu, 19 Sep 2013 20:19:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255716 - head/sbin/hastd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Sep 2013 20:19:09 -0000 Author: trociny Date: Thu Sep 19 20:19:08 2013 New Revision: 255716 URL: http://svnweb.freebsd.org/changeset/base/255716 Log: When updating the map of dirty extents, most recently used extents are kept dirty to reduce the number of on-disk metadata updates. The sequence of operations is: 1) acquire the activemap lock; 2) update in-memory map; 3) if the list of keepdirty extents is changed, update on-disk metadata; 4) release the lock. On-disk updates are not frequent in comparison with in-memory updates, while require much more time. So situations are possible when one thread is updating on-disk metadata and another one is waiting for the activemap lock just to update the in-memory map. Improve this by introducing additional, on-disk map lock: when in-memory map is updated and it is detected that the on-disk map needs update too, the on-disk map lock is acquired and the on-memory lock is released before flushing the map. Reported by: Yamagi Burmeister yamagi.org Tested by: Yamagi Burmeister yamagi.org Reviewed by: pjd Approved by: re (marius) MFC after: 2 weeks Modified: head/sbin/hastd/hast.h head/sbin/hastd/primary.c Modified: head/sbin/hastd/hast.h ============================================================================== --- head/sbin/hastd/hast.h Thu Sep 19 20:17:50 2013 (r255715) +++ head/sbin/hastd/hast.h Thu Sep 19 20:19:08 2013 (r255716) @@ -226,8 +226,10 @@ struct hast_resource { /* Activemap structure. */ struct activemap *hr_amp; - /* Locked used to synchronize access to hr_amp. */ + /* Lock used to synchronize access to hr_amp. */ pthread_mutex_t hr_amp_lock; + /* Lock used to synchronize access to hr_amp diskmap. */ + pthread_mutex_t hr_amp_diskmap_lock; /* Number of BIO_READ requests. */ uint64_t hr_stat_read; Modified: head/sbin/hastd/primary.c ============================================================================== --- head/sbin/hastd/primary.c Thu Sep 19 20:17:50 2013 (r255715) +++ head/sbin/hastd/primary.c Thu Sep 19 20:19:08 2013 (r255716) @@ -291,22 +291,28 @@ primary_exitx(int exitcode, const char * exit(exitcode); } +/* Expects res->hr_amp locked, returns unlocked. */ static int hast_activemap_flush(struct hast_resource *res) { const unsigned char *buf; size_t size; + int ret; + mtx_lock(&res->hr_amp_diskmap_lock); buf = activemap_bitmap(res->hr_amp, &size); + mtx_unlock(&res->hr_amp_lock); PJDLOG_ASSERT(buf != NULL); PJDLOG_ASSERT((size % res->hr_local_sectorsize) == 0); + ret = 0; if (pwrite(res->hr_localfd, buf, size, METADATA_SIZE) != (ssize_t)size) { pjdlog_errno(LOG_ERR, "Unable to flush activemap to disk"); res->hr_stat_activemap_write_error++; - return (-1); + ret = -1; } - if (res->hr_metaflush == 1 && g_flush(res->hr_localfd) == -1) { + if (ret == 0 && res->hr_metaflush == 1 && + g_flush(res->hr_localfd) == -1) { if (errno == EOPNOTSUPP) { pjdlog_warning("The %s provider doesn't support flushing write cache. Disabling it.", res->hr_localpath); @@ -315,10 +321,11 @@ hast_activemap_flush(struct hast_resourc pjdlog_errno(LOG_ERR, "Unable to flush disk cache on activemap update"); res->hr_stat_activemap_flush_error++; - return (-1); + ret = -1; } } - return (0); + mtx_unlock(&res->hr_amp_diskmap_lock); + return (ret); } static bool @@ -783,6 +790,7 @@ init_remote(struct hast_resource *res, s * Now that we merged bitmaps from both nodes, flush it to the * disk before we start to synchronize. */ + mtx_lock(&res->hr_amp_lock); (void)hast_activemap_flush(res); } nv_free(nvin); @@ -1288,8 +1296,9 @@ ggate_recv_thread(void *arg) ggio->gctl_offset, ggio->gctl_length)) { res->hr_stat_activemap_update++; (void)hast_activemap_flush(res); + } else { + mtx_unlock(&res->hr_amp_lock); } - mtx_unlock(&res->hr_amp_lock); break; case BIO_DELETE: res->hr_stat_delete++; @@ -1650,8 +1659,9 @@ done_queue: if (activemap_need_sync(res->hr_amp, ggio->gctl_offset, ggio->gctl_length)) { (void)hast_activemap_flush(res); + } else { + mtx_unlock(&res->hr_amp_lock); } - mtx_unlock(&res->hr_amp_lock); if (hio->hio_replication == HAST_REPLICATION_MEMSYNC) (void)refcnt_release(&hio->hio_countdown); } @@ -1918,8 +1928,9 @@ ggate_send_thread(void *arg) ggio->gctl_offset, ggio->gctl_length)) { res->hr_stat_activemap_update++; (void)hast_activemap_flush(res); + } else { + mtx_unlock(&res->hr_amp_lock); } - mtx_unlock(&res->hr_amp_lock); } if (ggio->gctl_cmd == BIO_WRITE) { /* @@ -2015,8 +2026,11 @@ sync_thread(void *arg __unused) */ if (activemap_extent_complete(res->hr_amp, syncext)) (void)hast_activemap_flush(res); + else + mtx_unlock(&res->hr_amp_lock); + } else { + mtx_unlock(&res->hr_amp_lock); } - mtx_unlock(&res->hr_amp_lock); if (dorewind) { dorewind = false; if (offset == -1) From owner-svn-src-all@FreeBSD.ORG Thu Sep 19 20:20:59 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D333B10B; Thu, 19 Sep 2013 20:20:59 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C04F6275C; Thu, 19 Sep 2013 20:20:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8JKKxIM003886; Thu, 19 Sep 2013 20:20:59 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8JKKxnr003885; Thu, 19 Sep 2013 20:20:59 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201309192020.r8JKKxnr003885@svn.freebsd.org> From: Mikolaj Golub Date: Thu, 19 Sep 2013 20:20:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255717 - head/sbin/hastd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Sep 2013 20:20:59 -0000 Author: trociny Date: Thu Sep 19 20:20:59 2013 New Revision: 255717 URL: http://svnweb.freebsd.org/changeset/base/255717 Log: Fix comments. Approved by: re (marius) MFC after: 3 days Modified: head/sbin/hastd/secondary.c Modified: head/sbin/hastd/secondary.c ============================================================================== --- head/sbin/hastd/secondary.c Thu Sep 19 20:19:08 2013 (r255716) +++ head/sbin/hastd/secondary.c Thu Sep 19 20:20:59 2013 (r255717) @@ -85,14 +85,13 @@ static TAILQ_HEAD(, hio) hio_free_list; static pthread_mutex_t hio_free_list_lock; static pthread_cond_t hio_free_list_cond; /* - * Disk thread (the one that do I/O requests) takes requests from this list. + * Disk thread (the one that does I/O requests) takes requests from this list. */ static TAILQ_HEAD(, hio) hio_disk_list; static pthread_mutex_t hio_disk_list_lock; static pthread_cond_t hio_disk_list_cond; /* - * There is one recv list for every component, although local components don't - * use recv lists as local requests are done synchronously. + * Thread that sends requests back to primary takes requests from this list. */ static TAILQ_HEAD(, hio) hio_send_list; static pthread_mutex_t hio_send_list_lock; From owner-svn-src-all@FreeBSD.ORG Thu Sep 19 20:30:36 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7B7E794F; Thu, 19 Sep 2013 20:30:36 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5925D2814; Thu, 19 Sep 2013 20:30:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8JKUarD009244; Thu, 19 Sep 2013 20:30:36 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8JKUa84009243; Thu, 19 Sep 2013 20:30:36 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201309192030.r8JKUa84009243@svn.freebsd.org> From: Xin LI Date: Thu, 19 Sep 2013 20:30:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255718 - head/sys/dev/arcmsr X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Sep 2013 20:30:36 -0000 Author: delphij Date: Thu Sep 19 20:30:35 2013 New Revision: 255718 URL: http://svnweb.freebsd.org/changeset/base/255718 Log: Update arcmsr(4) driver to 1.20.00.28 which fixes mutex recursion in CCB abort codepath. Many thanks to Areca for continuing to support FreeBSD. Submitted by: 黃清隆 MFC after: 2 weeks Approved by: re (?) Modified: head/sys/dev/arcmsr/arcmsr.c Modified: head/sys/dev/arcmsr/arcmsr.c ============================================================================== --- head/sys/dev/arcmsr/arcmsr.c Thu Sep 19 20:20:59 2013 (r255717) +++ head/sys/dev/arcmsr/arcmsr.c Thu Sep 19 20:30:35 2013 (r255718) @@ -74,6 +74,7 @@ ** 1.20.00.25 08/17/2012 Ching Huang Fixed hotplug device no function on type A adapter ** 1.20.00.26 12/14/2012 Ching Huang Added support ARC1214,1224,1264,1284 ** 1.20.00.27 05/06/2013 Ching Huang Fixed out standing cmd full on ARC-12x4 +** 1.20.00.28 09/13/2013 Ching Huang Removed recursive mutex in arcmsr_abort_dr_ccbs ****************************************************************************************** */ @@ -145,7 +146,7 @@ __FBSDID("$FreeBSD$"); #define arcmsr_callout_init(a) callout_init(a); #endif -#define ARCMSR_DRIVER_VERSION "Driver Version 1.20.00.27 2013-05-06" +#define ARCMSR_DRIVER_VERSION "arcmsr version 1.20.00.28 2013-09-13" #include /* ************************************************************************** @@ -1621,7 +1622,6 @@ static void arcmsr_abort_dr_ccbs(struct u_int32_t intmask_org; int i; - ARCMSR_LOCK_ACQUIRE(&acb->isr_lock); /* disable all outbound interrupts */ intmask_org = arcmsr_disable_allintr(acb); for (i = 0; i < ARCMSR_MAX_FREESRB_NUM; i++) @@ -1640,7 +1640,6 @@ static void arcmsr_abort_dr_ccbs(struct } /* enable outbound Post Queue, outbound doorbell Interrupt */ arcmsr_enable_allintr(acb, intmask_org); - ARCMSR_LOCK_RELEASE(&acb->isr_lock); } /* ************************************************************************** @@ -3424,8 +3423,7 @@ static void arcmsr_get_hba_config(struct acb_device_map++; i++; } - printf("ARECA RAID ADAPTER%d: %s \n", acb->pci_unit, ARCMSR_DRIVER_VERSION); - printf("ARECA RAID ADAPTER%d: FIRMWARE VERSION %s \n", acb->pci_unit, acb->firm_version); + printf("Areca RAID adapter%d: %s F/W version %s \n", acb->pci_unit, acb->firm_model, acb->firm_version); acb->firm_request_len = CHIP_REG_READ32(HBA_MessageUnit, 0, msgcode_rwbuffer[1]); /*firm_request_len, 1, 04-07*/ acb->firm_numbers_queue = CHIP_REG_READ32(HBA_MessageUnit, 0, msgcode_rwbuffer[2]); /*firm_numbers_queue, 2, 08-11*/ acb->firm_sdram_size = CHIP_REG_READ32(HBA_MessageUnit, 0, msgcode_rwbuffer[3]); /*firm_sdram_size, 3, 12-15*/ @@ -3474,8 +3472,7 @@ static void arcmsr_get_hbb_config(struct acb_device_map++; i++; } - printf("ARECA RAID ADAPTER%d: %s \n", acb->pci_unit, ARCMSR_DRIVER_VERSION); - printf("ARECA RAID ADAPTER%d: FIRMWARE VERSION %s \n", acb->pci_unit, acb->firm_version); + printf("Areca RAID adapter%d: %s F/W version %s \n", acb->pci_unit, acb->firm_model, acb->firm_version); acb->firm_request_len = CHIP_REG_READ32(HBB_RWBUFFER, 1, msgcode_rwbuffer[1]); /*firm_request_len, 1, 04-07*/ acb->firm_numbers_queue = CHIP_REG_READ32(HBB_RWBUFFER, 1, msgcode_rwbuffer[2]); /*firm_numbers_queue, 2, 08-11*/ acb->firm_sdram_size = CHIP_REG_READ32(HBB_RWBUFFER, 1, msgcode_rwbuffer[3]); /*firm_sdram_size, 3, 12-15*/ @@ -3525,8 +3522,7 @@ static void arcmsr_get_hbc_config(struct acb_device_map++; i++; } - printf("ARECA RAID ADAPTER%d: %s \n", acb->pci_unit, ARCMSR_DRIVER_VERSION); - printf("ARECA RAID ADAPTER%d: FIRMWARE VERSION %s \n", acb->pci_unit, acb->firm_version); + printf("Areca RAID adapter%d: %s F/W version %s \n", acb->pci_unit, acb->firm_model, acb->firm_version); acb->firm_request_len = CHIP_REG_READ32(HBC_MessageUnit, 0, msgcode_rwbuffer[1]); /*firm_request_len, 1, 04-07*/ acb->firm_numbers_queue = CHIP_REG_READ32(HBC_MessageUnit, 0, msgcode_rwbuffer[2]); /*firm_numbers_queue, 2, 08-11*/ acb->firm_sdram_size = CHIP_REG_READ32(HBC_MessageUnit, 0, msgcode_rwbuffer[3]); /*firm_sdram_size, 3, 12-15*/ @@ -3577,8 +3573,7 @@ static void arcmsr_get_hbd_config(struct acb_device_map++; i++; } - printf("ARECA RAID ADAPTER%d: %s \n", acb->pci_unit, ARCMSR_DRIVER_VERSION); - printf("ARECA RAID ADAPTER%d: FIRMWARE VERSION %s \n", acb->pci_unit, acb->firm_version); + printf("Areca RAID adapter%d: %s F/W version %s \n", acb->pci_unit, acb->firm_model, acb->firm_version); acb->firm_request_len = CHIP_REG_READ32(HBD_MessageUnit, 0, msgcode_rwbuffer[2]); /*firm_request_len, 1, 04-07*/ acb->firm_numbers_queue = CHIP_REG_READ32(HBD_MessageUnit, 0, msgcode_rwbuffer[3]); /*firm_numbers_queue, 2, 08-11*/ acb->firm_sdram_size = CHIP_REG_READ32(HBD_MessageUnit, 0, msgcode_rwbuffer[4]); /*firm_sdram_size, 3, 12-15*/ @@ -4263,6 +4258,8 @@ static int arcmsr_attach(device_t dev) return (ENOMEM); } arcmsr_mutex_init(acb); + acb->pci_dev = dev; + acb->pci_unit = unit; if(arcmsr_initialize(dev)) { printf("arcmsr%d: initialize failure!\n", unit); arcmsr_mutex_destroy(acb); @@ -4283,8 +4280,6 @@ static int arcmsr_attach(device_t dev) return ENXIO; } acb->irqres = irqres; - acb->pci_dev = dev; - acb->pci_unit = unit; /* * Now let the CAM generic SCSI layer find the SCSI devices on * the bus * start queue to reset to the idle loop. * @@ -4366,7 +4361,7 @@ static int arcmsr_probe(device_t dev) { u_int32_t id; static char buf[256]; - char x_type[]={"X-TYPE"}; + char x_type[]={"unknown"}; char *type; int raid6 = 1; @@ -4412,11 +4407,13 @@ static int arcmsr_probe(device_t dev) break; default: type = x_type; + raid6 = 0; break; } if(type == x_type) return(ENXIO); - sprintf(buf, "Areca %s Host Adapter RAID Controller %s\n", type, raid6 ? "(RAID6 capable)" : ""); + sprintf(buf, "Areca %s Host Adapter RAID Controller %s\n%s\n", + type, raid6 ? "(RAID6 capable)" : "", ARCMSR_DRIVER_VERSION); device_set_desc_copy(dev, buf); return (BUS_PROBE_DEFAULT); } From owner-svn-src-all@FreeBSD.ORG Thu Sep 19 22:06:28 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CD54C36B; Thu, 19 Sep 2013 22:06:28 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B9EF42CE2; Thu, 19 Sep 2013 22:06:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8JM6Sim059240; Thu, 19 Sep 2013 22:06:28 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8JM6SM9059239; Thu, 19 Sep 2013 22:06:28 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201309192206.r8JM6SM9059239@svn.freebsd.org> From: Devin Teske Date: Thu, 19 Sep 2013 22:06:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255719 - stable/9/usr.sbin/bsdconfig/examples X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Sep 2013 22:06:28 -0000 Author: dteske Date: Thu Sep 19 22:06:28 2013 New Revision: 255719 URL: http://svnweb.freebsd.org/changeset/base/255719 Log: MFC r255340: Long URLs don't always appear even with autosizing and other tricks. So, add some whitespace to put the URL on a line by itself, maximizing view. MFC r255341: Remove unnecessary mediaClose (FTP operations are done with either ftp(1) or fetch(1), neither of which are stateful, compared to how sysinstall(8) did FTP operations, maintaining an open session until mediaClose). Modified: stable/9/usr.sbin/bsdconfig/examples/browse_packages.sh Directory Properties: stable/9/usr.sbin/bsdconfig/ (props changed) Modified: stable/9/usr.sbin/bsdconfig/examples/browse_packages.sh ============================================================================== --- stable/9/usr.sbin/bsdconfig/examples/browse_packages.sh Thu Sep 19 20:30:35 2013 (r255718) +++ stable/9/usr.sbin/bsdconfig/examples/browse_packages.sh Thu Sep 19 22:06:28 2013 (r255719) @@ -17,9 +17,8 @@ if [ ! -e "$TMPDIR/packages/INDEX" ]; th # For older releases, use ftp://ftp-archive.freebsd.org mediaSetFTP mediaOpen - f_show_info "Downloading packages/INDEX from %s" "$_ftpPath" + f_show_info "Downloading packages/INDEX from\n %s" "$_ftpPath" f_device_get media packages/INDEX > $TMPDIR/packages/INDEX - mediaClose fi _directoryPath=$TMPDIR mediaSetDirectory From owner-svn-src-all@FreeBSD.ORG Fri Sep 20 01:18:51 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4E690A5A; Fri, 20 Sep 2013 01:18:51 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3C156247A; Fri, 20 Sep 2013 01:18:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8K1Ipxh061271; Fri, 20 Sep 2013 01:18:51 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8K1IpLA061270; Fri, 20 Sep 2013 01:18:51 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201309200118.r8K1IpLA061270@svn.freebsd.org> From: Ed Maste Date: Fri, 20 Sep 2013 01:18:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255721 - head/contrib/llvm/tools/lldb/source X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Sep 2013 01:18:51 -0000 Author: emaste Date: Fri Sep 20 01:18:50 2013 New Revision: 255721 URL: http://svnweb.freebsd.org/changeset/base/255721 Log: Disable LLDB OSX ABI plugin Approved by: re (blanket) Modified: head/contrib/llvm/tools/lldb/source/lldb.cpp Modified: head/contrib/llvm/tools/lldb/source/lldb.cpp ============================================================================== --- head/contrib/llvm/tools/lldb/source/lldb.cpp Fri Sep 20 00:46:29 2013 (r255720) +++ head/contrib/llvm/tools/lldb/source/lldb.cpp Fri Sep 20 01:18:50 2013 (r255721) @@ -24,8 +24,6 @@ #include "llvm/ADT/StringRef.h" -#include "Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h" -#include "Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h" #include "Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h" #include "Plugins/Disassembler/llvm/DisassemblerLLVMC.h" #include "Plugins/Instruction/ARM/EmulateInstructionARM.h" @@ -92,8 +90,6 @@ lldb_private::Initialize () Timer::Initialize (); Timer scoped_timer (__PRETTY_FUNCTION__, __PRETTY_FUNCTION__); - ABIMacOSX_i386::Initialize(); - ABIMacOSX_arm::Initialize(); ABISysV_x86_64::Initialize(); DisassemblerLLVMC::Initialize(); ObjectContainerBSDArchive::Initialize(); @@ -172,8 +168,6 @@ lldb_private::Terminate () // Terminate and unload and loaded system or user LLDB plug-ins PluginManager::Terminate(); - ABIMacOSX_i386::Terminate(); - ABIMacOSX_arm::Terminate(); ABISysV_x86_64::Terminate(); DisassemblerLLVMC::Terminate(); ObjectContainerBSDArchive::Terminate(); From owner-svn-src-all@FreeBSD.ORG Fri Sep 20 01:52:10 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 13197DDE; Fri, 20 Sep 2013 01:52:10 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F2D9225B4; Fri, 20 Sep 2013 01:52:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8K1q9ia080673; Fri, 20 Sep 2013 01:52:09 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8K1q3f0080618; Fri, 20 Sep 2013 01:52:03 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201309200152.r8K1q3f0080618@svn.freebsd.org> From: Ed Maste Date: Fri, 20 Sep 2013 01:52:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255722 - in head: lib/clang lib/clang/liblldb lib/clang/liblldbAPI lib/clang/liblldbBreakpoint lib/clang/liblldbCommands lib/clang/liblldbCore lib/clang/liblldbDataFormatters lib/clang... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Sep 2013 01:52:10 -0000 Author: emaste Date: Fri Sep 20 01:52:02 2013 New Revision: 255722 URL: http://svnweb.freebsd.org/changeset/base/255722 Log: Add LLDB bmake infrastructure This connects LLDB to the build, but it is disabled by default. Add WITH_LLDB= to src.conf to build it. Note that LLDB requires a C++11 compiler so is disabled on platforms using GCC. Approved by: re (gjb) Sponsored by: DARPA, AFRL Added: head/lib/clang/liblldb/ head/lib/clang/liblldb/Makefile (contents, props changed) head/lib/clang/liblldbAPI/ head/lib/clang/liblldbAPI/Makefile (contents, props changed) head/lib/clang/liblldbBreakpoint/ head/lib/clang/liblldbBreakpoint/Makefile (contents, props changed) head/lib/clang/liblldbCommands/ head/lib/clang/liblldbCommands/Makefile (contents, props changed) head/lib/clang/liblldbCore/ head/lib/clang/liblldbCore/Makefile (contents, props changed) head/lib/clang/liblldbDataFormatters/ head/lib/clang/liblldbDataFormatters/Makefile (contents, props changed) head/lib/clang/liblldbExpression/ head/lib/clang/liblldbExpression/Makefile (contents, props changed) head/lib/clang/liblldbHostCommon/ head/lib/clang/liblldbHostCommon/Makefile (contents, props changed) head/lib/clang/liblldbHostFreeBSD/ head/lib/clang/liblldbHostFreeBSD/Makefile (contents, props changed) head/lib/clang/liblldbInterpreter/ head/lib/clang/liblldbInterpreter/Makefile (contents, props changed) head/lib/clang/liblldbPluginABISysV_x86_64/ head/lib/clang/liblldbPluginABISysV_x86_64/Makefile (contents, props changed) head/lib/clang/liblldbPluginCXXItaniumABI/ head/lib/clang/liblldbPluginCXXItaniumABI/Makefile (contents, props changed) head/lib/clang/liblldbPluginDisassemblerLLVM/ head/lib/clang/liblldbPluginDisassemblerLLVM/Makefile (contents, props changed) head/lib/clang/liblldbPluginDynamicLoaderPosixDYLD/ head/lib/clang/liblldbPluginDynamicLoaderPosixDYLD/Makefile (contents, props changed) head/lib/clang/liblldbPluginDynamicLoaderStatic/ head/lib/clang/liblldbPluginDynamicLoaderStatic/Makefile (contents, props changed) head/lib/clang/liblldbPluginInstructionARM/ head/lib/clang/liblldbPluginInstructionARM/Makefile (contents, props changed) head/lib/clang/liblldbPluginObjectContainerBSDArchive/ head/lib/clang/liblldbPluginObjectContainerBSDArchive/Makefile (contents, props changed) head/lib/clang/liblldbPluginObjectFileELF/ head/lib/clang/liblldbPluginObjectFileELF/Makefile (contents, props changed) head/lib/clang/liblldbPluginPlatformFreeBSD/ head/lib/clang/liblldbPluginPlatformFreeBSD/Makefile (contents, props changed) head/lib/clang/liblldbPluginPlatformGDB/ head/lib/clang/liblldbPluginPlatformGDB/Makefile (contents, props changed) head/lib/clang/liblldbPluginProcessElfCore/ head/lib/clang/liblldbPluginProcessElfCore/Makefile (contents, props changed) head/lib/clang/liblldbPluginProcessFreeBSD/ head/lib/clang/liblldbPluginProcessFreeBSD/Makefile (contents, props changed) head/lib/clang/liblldbPluginProcessGDBRemote/ head/lib/clang/liblldbPluginProcessGDBRemote/Makefile (contents, props changed) head/lib/clang/liblldbPluginProcessPOSIX/ head/lib/clang/liblldbPluginProcessPOSIX/Makefile (contents, props changed) head/lib/clang/liblldbPluginProcessUtility/ head/lib/clang/liblldbPluginProcessUtility/Makefile (contents, props changed) head/lib/clang/liblldbPluginSymbolFileDWARF/ head/lib/clang/liblldbPluginSymbolFileDWARF/Makefile (contents, props changed) head/lib/clang/liblldbPluginSymbolFileSymtab/ head/lib/clang/liblldbPluginSymbolFileSymtab/Makefile (contents, props changed) head/lib/clang/liblldbPluginSymbolVendorELF/ head/lib/clang/liblldbPluginSymbolVendorELF/Makefile (contents, props changed) head/lib/clang/liblldbPluginUnwindAssemblyInstEmulation/ head/lib/clang/liblldbPluginUnwindAssemblyInstEmulation/Makefile (contents, props changed) head/lib/clang/liblldbPluginUnwindAssemblyX86/ head/lib/clang/liblldbPluginUnwindAssemblyX86/Makefile (contents, props changed) head/lib/clang/liblldbSymbol/ head/lib/clang/liblldbSymbol/Makefile (contents, props changed) head/lib/clang/liblldbTarget/ head/lib/clang/liblldbTarget/Makefile (contents, props changed) head/lib/clang/liblldbUtility/ head/lib/clang/liblldbUtility/Makefile (contents, props changed) head/lib/clang/lldb.lib.mk (contents, props changed) head/tools/build/options/WITH_LLDB (contents, props changed) head/usr.bin/clang/lldb/ head/usr.bin/clang/lldb/Makefile (contents, props changed) Modified: head/lib/clang/Makefile head/lib/clang/libllvmmc/Makefile head/lib/clang/libllvmsupport/Makefile head/lib/clang/libllvmx86disassembler/Makefile head/share/mk/bsd.own.mk head/usr.bin/clang/Makefile Modified: head/lib/clang/Makefile ============================================================================== --- head/lib/clang/Makefile Fri Sep 20 01:18:50 2013 (r255721) +++ head/lib/clang/Makefile Fri Sep 20 01:52:02 2013 (r255722) @@ -3,17 +3,22 @@ .include .if !make(install) -.if !defined(EARLY_BUILD) && defined(MK_CLANG_FULL) && ${MK_CLANG_FULL} != "no" +.if !defined(EARLY_BUILD) +.if defined(MK_CLANG_FULL) && ${MK_CLANG_FULL} != "no" _libclangstaticanalyzer= \ libclangstaticanalyzercheckers \ libclangstaticanalyzercore \ libclangstaticanalyzerfrontend _libclangarcmigrate= \ libclangarcmigrate +.endif # MK_CLANG_FULL +.if (defined(MK_CLANG_FULL) && ${MK_CLANG_FULL} != "no") || \ + (defined(MK_LLDB) && ${MK_LLDB} != "no") _libclangrewriter= \ libclangrewritecore \ libclangrewritefrontend -.endif # !EARLY_BUILD && MK_CLANG_FULL +.endif # (MK_CLANG_FULL || MK_LLDB) +.endif # !EARLY_BUILD SUBDIR= libclanganalysis \ ${_libclangarcmigrate} \ @@ -82,14 +87,55 @@ SUBDIR= libclanganalysis \ libllvmx86utils .if ${MK_CLANG_EXTRAS} != "no" -SUBDIR+=libllvmdebuginfo \ - libllvmexecutionengine \ +SUBDIR+=libllvmdebuginfo +.endif # MK_CLANG_EXTRAS +.if ${MK_CLANG_EXTRAS} != "no" || ${MK_LLDB} != "no" +SUBDIR+=libllvmexecutionengine \ libllvminterpreter \ libllvmjit \ libllvmmcdisassembler \ libllvmmcjit \ libllvmruntimedyld -.endif # MK_CLANG_EXTRAS +.endif # MK_CLANG_EXTRAS | LLDB + +.if !defined(EARLY_BUILD) && ${MK_LLDB} != "no" +SUBDIR+=liblldb \ + \ + liblldbAPI \ + liblldbBreakpoint \ + liblldbCommands \ + liblldbCore \ + liblldbDataFormatters \ + liblldbExpression \ + liblldbHostCommon \ + liblldbHostFreeBSD \ + liblldbInterpreter \ + liblldbSymbol \ + liblldbTarget \ + liblldbUtility \ + \ + liblldbPluginABISysV_x86_64 \ + liblldbPluginCXXItaniumABI \ + liblldbPluginDisassemblerLLVM \ + liblldbPluginDynamicLoaderStatic \ + liblldbPluginDynamicLoaderPosixDYLD \ + liblldbPluginInstructionARM \ + liblldbPluginObjectContainerBSDArchive \ + liblldbPluginObjectFileELF \ + liblldbPluginPlatformFreeBSD \ + liblldbPluginPlatformGDB \ + liblldbPluginProcessElfCore \ + liblldbPluginProcessFreeBSD \ + liblldbPluginProcessGDBRemote \ + liblldbPluginProcessPOSIX \ + liblldbPluginProcessUtility \ + liblldbPluginSymbolFileDWARF \ + liblldbPluginSymbolFileSymtab \ + liblldbPluginSymbolVendorELF \ + liblldbPluginUnwindAssemblyInstEmulation \ + liblldbPluginUnwindAssemblyX86 +.endif # !EARLY_BUILD && MK_LLDB + .endif # !make(install) SUBDIR+= include Added: head/lib/clang/liblldb/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/liblldb/Makefile Fri Sep 20 01:52:02 2013 (r255722) @@ -0,0 +1,18 @@ +# $FreeBSD$ + +.include + +LIB= lldb + +CFLAGS+=-I${.CURDIR}/../../../contrib/llvm/tools/lldb/source/Plugins/Process/POSIX + +SRCDIR= tools/lldb/source +SRCS= lldb.cpp \ + lldb-log.cpp + +TGHDRS= DiagnosticCommonKinds \ + DeclNodes \ + StmtNodes \ + CommentCommandList + +.include "../lldb.lib.mk" Added: head/lib/clang/liblldbAPI/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/liblldbAPI/Makefile Fri Sep 20 01:52:02 2013 (r255722) @@ -0,0 +1,61 @@ +# $FreeBSD$ + +.include + +LIB= lldbAPI + +SRCDIR= tools/lldb/source/API +SRCS= SBAddress.cpp \ + SBBlock.cpp \ + SBBreakpoint.cpp \ + SBBreakpointLocation.cpp \ + SBBroadcaster.cpp \ + SBCommandInterpreter.cpp \ + SBCommandReturnObject.cpp \ + SBCommunication.cpp \ + SBCompileUnit.cpp \ + SBData.cpp \ + SBDebugger.cpp \ + SBDeclaration.cpp \ + SBError.cpp \ + SBEvent.cpp \ + SBExpressionOptions.cpp \ + SBFileSpec.cpp \ + SBFileSpecList.cpp \ + SBFrame.cpp \ + SBFunction.cpp \ + SBHostOS.cpp \ + SBInputReader.cpp \ + SBInstruction.cpp \ + SBInstructionList.cpp \ + SBLineEntry.cpp \ + SBListener.cpp \ + SBModule.cpp \ + SBModuleSpec.cpp \ + SBProcess.cpp \ + SBSection.cpp \ + SBSourceManager.cpp \ + SBStream.cpp \ + SBStringList.cpp \ + SBSymbol.cpp \ + SBSymbolContext.cpp \ + SBSymbolContextList.cpp \ + SBTarget.cpp \ + SBThread.cpp \ + SBType.cpp \ + SBTypeCategory.cpp \ + SBTypeFilter.cpp \ + SBTypeFormat.cpp \ + SBTypeNameSpecifier.cpp \ + SBTypeSummary.cpp \ + SBTypeSynthetic.cpp \ + SBValue.cpp \ + SBValueList.cpp \ + SBWatchpoint.cpp + +TGHDRS= DiagnosticCommonKinds \ + DeclNodes \ + StmtNodes \ + CommentCommandList + +.include "../lldb.lib.mk" Added: head/lib/clang/liblldbBreakpoint/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/liblldbBreakpoint/Makefile Fri Sep 20 01:52:02 2013 (r255722) @@ -0,0 +1,35 @@ +# $FreeBSD$ + +.include + +LIB= lldbBreakpoint + +SRCDIR= tools/lldb/source/Breakpoint +SRCS= Breakpoint.cpp \ + BreakpointID.cpp \ + BreakpointIDList.cpp \ + BreakpointList.cpp \ + BreakpointLocation.cpp \ + BreakpointLocationCollection.cpp \ + BreakpointLocationList.cpp \ + BreakpointOptions.cpp \ + BreakpointResolver.cpp \ + BreakpointResolverAddress.cpp \ + BreakpointResolverFileLine.cpp \ + BreakpointResolverFileRegex.cpp \ + BreakpointResolverName.cpp \ + BreakpointSite.cpp \ + BreakpointSiteList.cpp \ + Stoppoint.cpp \ + StoppointCallbackContext.cpp \ + StoppointLocation.cpp \ + Watchpoint.cpp \ + WatchpointList.cpp \ + WatchpointOptions.cpp + +TGHDRS= DiagnosticCommonKinds \ + DeclNodes \ + StmtNodes \ + CommentCommandList + +.include "../lldb.lib.mk" Added: head/lib/clang/liblldbCommands/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/liblldbCommands/Makefile Fri Sep 20 01:52:02 2013 (r255722) @@ -0,0 +1,41 @@ +# $FreeBSD$ + +.include + +LIB= lldbCommands + +SRCDIR= tools/lldb/source/Commands +SRCS= CommandCompletions.cpp \ + CommandObjectApropos.cpp \ + CommandObjectArgs.cpp \ + CommandObjectBreakpoint.cpp \ + CommandObjectBreakpointCommand.cpp \ + CommandObjectCommands.cpp \ + CommandObjectDisassemble.cpp \ + CommandObjectExpression.cpp \ + CommandObjectFrame.cpp \ + CommandObjectHelp.cpp \ + CommandObjectLog.cpp \ + CommandObjectMemory.cpp \ + CommandObjectMultiword.cpp \ + CommandObjectPlatform.cpp \ + CommandObjectPlugin.cpp \ + CommandObjectProcess.cpp \ + CommandObjectQuit.cpp \ + CommandObjectRegister.cpp \ + CommandObjectSettings.cpp \ + CommandObjectSource.cpp \ + CommandObjectSyntax.cpp \ + CommandObjectTarget.cpp \ + CommandObjectThread.cpp \ + CommandObjectType.cpp \ + CommandObjectVersion.cpp \ + CommandObjectWatchpoint.cpp \ + CommandObjectWatchpointCommand.cpp + +TGHDRS= DiagnosticCommonKinds \ + DeclNodes \ + StmtNodes \ + CommentCommandList + +.include "../lldb.lib.mk" Added: head/lib/clang/liblldbCore/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/liblldbCore/Makefile Fri Sep 20 01:52:02 2013 (r255722) @@ -0,0 +1,84 @@ +# $FreeBSD$ + +.include + +LIB= lldbCore + +SRCDIR= tools/lldb/source/Core +SRCS= Address.cpp \ + AddressRange.cpp \ + AddressResolver.cpp \ + AddressResolverFileLine.cpp \ + AddressResolverName.cpp \ + ArchSpec.cpp \ + Baton.cpp \ + Broadcaster.cpp \ + Communication.cpp \ + Connection.cpp \ + ConnectionFileDescriptor.cpp \ + ConnectionMachPort.cpp \ + ConnectionSharedMemory.cpp \ + ConstString.cpp \ + DataBufferHeap.cpp \ + DataBufferMemoryMap.cpp \ + DataEncoder.cpp \ + DataExtractor.cpp \ + Debugger.cpp \ + Disassembler.cpp \ + DynamicLoader.cpp \ + EmulateInstruction.cpp \ + Error.cpp \ + Event.cpp \ + FileLineResolver.cpp \ + FileSpecList.cpp \ + History.cpp \ + InputReader.cpp \ + InputReaderEZ.cpp \ + InputReaderStack.cpp \ + Language.cpp \ + Listener.cpp \ + Log.cpp \ + Mangled.cpp \ + Module.cpp \ + ModuleChild.cpp \ + ModuleList.cpp \ + Opcode.cpp \ + PluginManager.cpp \ + RegisterValue.cpp \ + RegularExpression.cpp \ + Scalar.cpp \ + SearchFilter.cpp \ + Section.cpp \ + SourceManager.cpp \ + State.cpp \ + Stream.cpp \ + StreamAsynchronousIO.cpp \ + StreamCallback.cpp \ + StreamFile.cpp \ + StreamString.cpp \ + StringList.cpp \ + Timer.cpp \ + UserID.cpp \ + UserSettingsController.cpp \ + UUID.cpp \ + Value.cpp \ + ValueObject.cpp \ + ValueObjectCast.cpp \ + ValueObjectChild.cpp \ + ValueObjectConstResult.cpp \ + ValueObjectConstResultChild.cpp \ + ValueObjectConstResultImpl.cpp \ + ValueObjectDynamicValue.cpp \ + ValueObjectList.cpp \ + ValueObjectMemory.cpp \ + ValueObjectRegister.cpp \ + ValueObjectSyntheticFilter.cpp \ + ValueObjectVariable.cpp \ + VMRange.cpp + +TGHDRS= DiagnosticCommonKinds \ + DeclNodes \ + StmtNodes \ + CommentCommandList + +.include "../lldb.lib.mk" Added: head/lib/clang/liblldbDataFormatters/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/liblldbDataFormatters/Makefile Fri Sep 20 01:52:02 2013 (r255722) @@ -0,0 +1,33 @@ +# $FreeBSD$ + +.include + +LIB= lldbDataFormatters + +SRCDIR= tools/lldb/source/DataFormatters +SRCS= CF.cpp \ + Cocoa.cpp \ + CXXFormatterFunctions.cpp \ + DataVisualization.cpp \ + FormatCache.cpp \ + FormatClasses.cpp \ + FormatManager.cpp \ + LibCxx.cpp \ + LibCxxList.cpp \ + LibCxxMap.cpp \ + LibStdcpp.cpp \ + NSArray.cpp \ + NSDictionary.cpp \ + NSSet.cpp \ + TypeCategory.cpp \ + TypeCategoryMap.cpp \ + TypeFormat.cpp \ + TypeSummary.cpp \ + TypeSynthetic.cpp + +TGHDRS= DiagnosticCommonKinds \ + DeclNodes \ + StmtNodes \ + CommentCommandList + +.include "../lldb.lib.mk" Added: head/lib/clang/liblldbExpression/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/liblldbExpression/Makefile Fri Sep 20 01:52:02 2013 (r255722) @@ -0,0 +1,39 @@ +# $FreeBSD$ + +.include + +LIB= lldbExpression + +SRCDIR= tools/lldb/source/Expression +SRCS= ASTDumper.cpp \ + ASTResultSynthesizer.cpp \ + ASTStructExtractor.cpp \ + ClangASTSource.cpp \ + ClangExpressionDeclMap.cpp \ + ClangExpressionParser.cpp \ + ClangExpressionVariable.cpp \ + ClangFunction.cpp \ + ClangPersistentVariables.cpp \ + ClangUserExpression.cpp \ + ClangUtilityFunction.cpp \ + DWARFExpression.cpp \ + ExpressionSourceCode.cpp \ + IRDynamicChecks.cpp \ + IRExecutionUnit.cpp \ + IRForTarget.cpp \ + IRInterpreter.cpp \ + IRMemoryMap.cpp \ + Materializer.cpp + +TGHDRS= DiagnosticCommonKinds \ + DeclNodes \ + StmtNodes \ + CommentCommandList \ + AttrList \ + Attrs \ + AttrParsedAttrList \ + DiagnosticFrontendKinds \ + DiagnosticSemaKinds \ + Intrinsics + +.include "../lldb.lib.mk" Added: head/lib/clang/liblldbHostCommon/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/liblldbHostCommon/Makefile Fri Sep 20 01:52:02 2013 (r255722) @@ -0,0 +1,24 @@ +# $FreeBSD$ + +.include + +LIB= lldbHostCommon + +SRCDIR= tools/lldb/source/Host/common +SRCS= Condition.cpp \ + DynamicLibrary.cpp \ + File.cpp \ + FileSpec.cpp \ + Host.cpp \ + Mutex.cpp \ + SocketAddress.cpp \ + Symbols.cpp \ + Terminal.cpp \ + TimeValue.cpp + +TGHDRS= DiagnosticCommonKinds \ + DeclNodes \ + StmtNodes \ + CommentCommandList + +.include "../lldb.lib.mk" Added: head/lib/clang/liblldbHostFreeBSD/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/liblldbHostFreeBSD/Makefile Fri Sep 20 01:52:02 2013 (r255722) @@ -0,0 +1,15 @@ +# $FreeBSD$ + +.include + +LIB= lldbHostFreeBSD + +SRCDIR= tools/lldb/source/Host/freebsd +SRCS= Host.cpp + +TGHDRS= DiagnosticCommonKinds \ + DeclNodes \ + StmtNodes \ + CommentCommandList + +.include "../lldb.lib.mk" Added: head/lib/clang/liblldbInterpreter/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/liblldbInterpreter/Makefile Fri Sep 20 01:52:02 2013 (r255722) @@ -0,0 +1,56 @@ +# $FreeBSD$ + +.include + +LIB= lldbInterpreter + +SRCDIR= tools/lldb/source/Interpreter +SRCS= Args.cpp \ + CommandHistory.cpp \ + CommandInterpreter.cpp \ + CommandObject.cpp \ + CommandObjectRegexCommand.cpp \ + CommandObjectScript.cpp \ + CommandReturnObject.cpp \ + OptionGroupArchitecture.cpp \ + OptionGroupBoolean.cpp \ + OptionGroupFile.cpp \ + OptionGroupFormat.cpp \ + OptionGroupOutputFile.cpp \ + OptionGroupPlatform.cpp \ + OptionGroupString.cpp \ + OptionGroupUInt64.cpp \ + OptionGroupUUID.cpp \ + OptionGroupValueObjectDisplay.cpp \ + OptionValue.cpp \ + OptionValueArch.cpp \ + OptionValueArgs.cpp \ + OptionValueArray.cpp \ + OptionValueBoolean.cpp \ + OptionValueDictionary.cpp \ + OptionValueEnumeration.cpp \ + OptionValueFileSpec.cpp \ + OptionValueFileSpecLIst.cpp \ + OptionValueFormat.cpp \ + OptionValuePathMappings.cpp \ + OptionValueProperties.cpp \ + OptionValueRegex.cpp \ + OptionValueSInt64.cpp \ + OptionValueString.cpp \ + OptionValueUInt64.cpp \ + OptionValueUUID.cpp \ + OptionGroupVariable.cpp \ + OptionGroupWatchpoint.cpp \ + Options.cpp \ + Property.cpp \ + PythonDataObjects.cpp \ + ScriptInterpreter.cpp \ + ScriptInterpreterNone.cpp \ + ScriptInterpreterPython.cpp + +TGHDRS= DiagnosticCommonKinds \ + DeclNodes \ + StmtNodes \ + CommentCommandList + +.include "../lldb.lib.mk" Added: head/lib/clang/liblldbPluginABISysV_x86_64/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/liblldbPluginABISysV_x86_64/Makefile Fri Sep 20 01:52:02 2013 (r255722) @@ -0,0 +1,15 @@ +# $FreeBSD$ + +.include + +LIB= lldbPluginABISysV_x86_64 + +SRCDIR= tools/lldb/source/Plugins/ABI/SysV-x86_64 +SRCS= ABISysV_x86_64.cpp + +TGHDRS= DiagnosticCommonKinds \ + DeclNodes \ + StmtNodes \ + CommentCommandList + +.include "../lldb.lib.mk" Added: head/lib/clang/liblldbPluginCXXItaniumABI/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/liblldbPluginCXXItaniumABI/Makefile Fri Sep 20 01:52:02 2013 (r255722) @@ -0,0 +1,15 @@ +# $FreeBSD$ + +.include + +LIB= lldbPluginCXXItaniumABI + +SRCDIR= tools/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI +SRCS= ItaniumABILanguageRuntime.cpp + +TGHDRS= DiagnosticCommonKinds \ + DeclNodes \ + StmtNodes \ + CommentCommandList + +.include "../lldb.lib.mk" Added: head/lib/clang/liblldbPluginDisassemblerLLVM/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/liblldbPluginDisassemblerLLVM/Makefile Fri Sep 20 01:52:02 2013 (r255722) @@ -0,0 +1,15 @@ +# $FreeBSD$ + +.include + +LIB= lldbPluginDisassemblerLLVM + +SRCDIR= tools/lldb/source/Plugins/Disassembler/llvm +SRCS= DisassemblerLLVMC.cpp + +TGHDRS= DiagnosticCommonKinds \ + DeclNodes \ + StmtNodes \ + CommentCommandList + +.include "../lldb.lib.mk" Added: head/lib/clang/liblldbPluginDynamicLoaderPosixDYLD/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/liblldbPluginDynamicLoaderPosixDYLD/Makefile Fri Sep 20 01:52:02 2013 (r255722) @@ -0,0 +1,17 @@ +# $FreeBSD$ + +.include + +LIB= lldbPluginDynamicLoaderPosixDYLD + +SRCDIR= tools/lldb/source/Plugins/DynamicLoader/POSIX-DYLD +SRCS= AuxVector.cpp \ + DYLDRendezvous.cpp \ + DynamicLoaderPOSIXDYLD.cpp + +TGHDRS= DiagnosticCommonKinds \ + DeclNodes \ + StmtNodes \ + CommentCommandList + +.include "../lldb.lib.mk" Added: head/lib/clang/liblldbPluginDynamicLoaderStatic/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/liblldbPluginDynamicLoaderStatic/Makefile Fri Sep 20 01:52:02 2013 (r255722) @@ -0,0 +1,15 @@ +# $FreeBSD$ + +.include + +LIB= lldbPluginDynamicLoaderStatic + +SRCDIR= tools/lldb/source/Plugins/DynamicLoader/Static +SRCS= DynamicLoaderStatic.cpp + +TGHDRS= DiagnosticCommonKinds \ + DeclNodes \ + StmtNodes \ + CommentCommandList + +.include "../lldb.lib.mk" Added: head/lib/clang/liblldbPluginInstructionARM/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/liblldbPluginInstructionARM/Makefile Fri Sep 20 01:52:02 2013 (r255722) @@ -0,0 +1,16 @@ +# $FreeBSD$ + +.include + +LIB= lldbPluginInstructionARM + +SRCDIR= tools/lldb/source/Plugins/Instruction/ARM +SRCS= EmulateInstructionARM.cpp \ + EmulationStateARM.cpp + +TGHDRS= DiagnosticCommonKinds \ + DeclNodes \ + StmtNodes \ + CommentCommandList + +.include "../lldb.lib.mk" Added: head/lib/clang/liblldbPluginObjectContainerBSDArchive/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/liblldbPluginObjectContainerBSDArchive/Makefile Fri Sep 20 01:52:02 2013 (r255722) @@ -0,0 +1,15 @@ +# $FreeBSD$ + +.include + +LIB= lldbPluginObjectContainerBSDArchive + +SRCDIR= tools/lldb/source/Plugins/ObjectContainer/BSD-Archive +SRCS= ObjectContainerBSDArchive.cpp + +TGHDRS= DiagnosticCommonKinds \ + DeclNodes \ + StmtNodes \ + CommentCommandList + +.include "../lldb.lib.mk" Added: head/lib/clang/liblldbPluginObjectFileELF/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/liblldbPluginObjectFileELF/Makefile Fri Sep 20 01:52:02 2013 (r255722) @@ -0,0 +1,16 @@ +# $FreeBSD$ + +.include + +LIB= lldbPluginObjectFileELF + +SRCDIR= tools/lldb/source/Plugins/ObjectFile/ELF +SRCS= ELFHeader.cpp \ + ObjectFileELF.cpp + +TGHDRS= DiagnosticCommonKinds \ + DeclNodes \ + StmtNodes \ + CommentCommandList + +.include "../lldb.lib.mk" Added: head/lib/clang/liblldbPluginPlatformFreeBSD/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/liblldbPluginPlatformFreeBSD/Makefile Fri Sep 20 01:52:02 2013 (r255722) @@ -0,0 +1,15 @@ +# $FreeBSD$ + +.include + +LIB= lldbPluginPlatformFreeBSD + +SRCDIR= tools/lldb/source/Plugins/Platform/FreeBSD +SRCS= PlatformFreeBSD.cpp + +TGHDRS= DiagnosticCommonKinds \ + DeclNodes \ + StmtNodes \ + CommentCommandList + +.include "../lldb.lib.mk" Added: head/lib/clang/liblldbPluginPlatformGDB/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/liblldbPluginPlatformGDB/Makefile Fri Sep 20 01:52:02 2013 (r255722) @@ -0,0 +1,15 @@ +# $FreeBSD$ + +.include + +LIB= lldbPluginPlatformGDB + +SRCDIR= tools/lldb/source/Plugins/Platform/gdb-server +SRCS= PlatformRemoteGDBServer.cpp + +TGHDRS= DiagnosticCommonKinds \ + DeclNodes \ + StmtNodes \ + CommentCommandList + +.include "../lldb.lib.mk" Added: head/lib/clang/liblldbPluginProcessElfCore/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/liblldbPluginProcessElfCore/Makefile Fri Sep 20 01:52:02 2013 (r255722) @@ -0,0 +1,21 @@ +# $FreeBSD$ + +.include + +LIB= lldbPluginProcessElfCore + +CFLAGS+=-I${.CURDIR}/../../../contrib/llvm/tools/lldb/source/Plugins/Process/POSIX +CFLAGS+=-I${.CURDIR}/../../../contrib/llvm/tools/lldb/source/Plugins/Process/Utility + +SRCDIR= tools/lldb/source/Plugins/Process/elf-core +SRCS= ProcessElfCore.cpp \ + ThreadElfCore.cpp \ + RegisterContextCoreLinux_x86_64.cpp \ + RegisterContextCoreFreeBSD_x86_64.cpp + +TGHDRS= DiagnosticCommonKinds \ + DeclNodes \ + StmtNodes \ + CommentCommandList + +.include "../lldb.lib.mk" Added: head/lib/clang/liblldbPluginProcessFreeBSD/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/liblldbPluginProcessFreeBSD/Makefile Fri Sep 20 01:52:02 2013 (r255722) @@ -0,0 +1,20 @@ +# $FreeBSD$ + +.include + +LIB= lldbPluginProcessFreeBSD + +# include_directories(.) +CFLAGS+=-I${.CURDIR}/../../../contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD +CFLAGS+=-I${.CURDIR}/../../../contrib/llvm/tools/lldb/source/Plugins/Process/POSIX + +SRCDIR= tools/lldb/source/Plugins/Process/FreeBSD +SRCS= ProcessFreeBSD.cpp \ + ProcessMonitor.cpp + +TGHDRS= DiagnosticCommonKinds \ + DeclNodes \ + StmtNodes \ + CommentCommandList + +.include "../lldb.lib.mk" Added: head/lib/clang/liblldbPluginProcessGDBRemote/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/liblldbPluginProcessGDBRemote/Makefile Fri Sep 20 01:52:02 2013 (r255722) @@ -0,0 +1,21 @@ +# $FreeBSD$ + +.include + +LIB= lldbPluginProcessGDBRemote + +SRCDIR= tools/lldb/source/Plugins/Process/gdb-remote +SRCS= GDBRemoteCommunication.cpp \ + GDBRemoteCommunicationClient.cpp \ + GDBRemoteCommunicationServer.cpp \ + GDBRemoteRegisterContext.cpp \ + ProcessGDBRemote.cpp \ + ProcessGDBRemoteLog.cpp \ + ThreadGDBRemote.cpp + +TGHDRS= DiagnosticCommonKinds \ + DeclNodes \ + StmtNodes \ + CommentCommandList + +.include "../lldb.lib.mk" Added: head/lib/clang/liblldbPluginProcessPOSIX/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/liblldbPluginProcessPOSIX/Makefile Fri Sep 20 01:52:02 2013 (r255722) @@ -0,0 +1,28 @@ +# $FreeBSD$ + +.include + +LIB= lldbPluginProcessPOSIX + +# include_directories(.) +CFLAGS+=-I${.CURDIR}/../../../contrib/llvm/tools/lldb/source/Plugins/Process/POSIX +CFLAGS+=-I${.CURDIR}/../../../contrib/llvm/tools/lldb/source/Plugins/Process/Utility +CFLAGS+=-I${.CURDIR}/../../../contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD + +SRCDIR= tools/lldb/source/Plugins/Process/POSIX +SRCS= POSIXStopInfo.cpp \ + POSIXThread.cpp \ + ProcessMessage.cpp \ + ProcessPOSIX.cpp \ + ProcessPOSIXLog.cpp \ + RegisterContextFreeBSD_x86_64.cpp \ + RegisterContext_i386.cpp \ + RegisterContextLinux_x86_64.cpp \ + RegisterContext_x86_64.cpp + +TGHDRS= DiagnosticCommonKinds \ + DeclNodes \ + StmtNodes \ + CommentCommandList + +.include "../lldb.lib.mk" Added: head/lib/clang/liblldbPluginProcessUtility/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/liblldbPluginProcessUtility/Makefile Fri Sep 20 01:52:02 2013 (r255722) @@ -0,0 +1,31 @@ +# $FreeBSD$ + +.include + +LIB= lldbPluginProcessUtility + +SRCDIR= tools/lldb/source/Plugins/Process/Utility +SRCS= DynamicRegisterInfo.cpp \ + InferiorCallPOSIX.cpp \ + RegisterContextDarwin_arm.cpp \ + RegisterContextDarwin_i386.cpp \ + RegisterContextDarwin_x86_64.cpp \ + RegisterContextDummy.cpp \ + RegisterContextLLDB.cpp \ + RegisterContextMach_arm.cpp \ + RegisterContextMach_i386.cpp \ + RegisterContextMach_x86_64.cpp \ + RegisterContextMacOSXFrameBackchain.cpp \ + RegisterContextMemory.cpp \ + RegisterContextThreadMemory.cpp \ + StopInfoMachException.cpp \ + ThreadMemory.cpp \ + UnwindLLDB.cpp \ + UnwindMacOSXFrameBackchain.cpp + +TGHDRS= DiagnosticCommonKinds \ + DeclNodes \ + StmtNodes \ + CommentCommandList + +.include "../lldb.lib.mk" Added: head/lib/clang/liblldbPluginSymbolFileDWARF/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/liblldbPluginSymbolFileDWARF/Makefile Fri Sep 20 01:52:02 2013 (r255722) @@ -0,0 +1,41 @@ +# $FreeBSD$ + +.include + +LIB= lldbPluginSymbolFileDWARF + +SRCDIR= tools/lldb/source/Plugins/SymbolFile/DWARF +SRCS= DWARFAbbreviationDeclaration.cpp \ + DWARFCompileUnit.cpp \ + DWARFDebugAbbrev.cpp \ + DWARFDebugAranges.cpp \ + DWARFDebugArangeSet.cpp \ + DWARFDebugInfo.cpp \ + DWARFDebugInfoEntry.cpp \ + DWARFDebugLine.cpp \ + DWARFDebugMacinfo.cpp \ + DWARFDebugMacinfoEntry.cpp \ + DWARFDebugPubnames.cpp \ + DWARFDebugPubnamesSet.cpp \ + DWARFDebugRanges.cpp \ + DWARFDeclContext.cpp \ + DWARFDefines.cpp \ + DWARFDIECollection.cpp \ + DWARFFormValue.cpp \ + DWARFLocationDescription.cpp \ + DWARFLocationList.cpp \ + LogChannelDWARF.cpp \ + NameToDIE.cpp \ + SymbolFileDWARF.cpp \ + SymbolFileDWARFDebugMap.cpp \ + UniqueDWARFASTType.cpp + +TGHDRS= DiagnosticCommonKinds \ + DeclNodes \ + StmtNodes \ + CommentCommandList \ + AttrParsedAttrList \ + DiagnosticFrontendKinds \ + Intrinsics + +.include "../lldb.lib.mk" Added: head/lib/clang/liblldbPluginSymbolFileSymtab/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/liblldbPluginSymbolFileSymtab/Makefile Fri Sep 20 01:52:02 2013 (r255722) @@ -0,0 +1,15 @@ +# $FreeBSD$ + +.include + +LIB= lldbPluginSymbolFileSymtab + +SRCDIR= tools/lldb/source/Plugins/SymbolFile/Symtab +SRCS= SymbolFileSymtab.cpp + +TGHDRS= DiagnosticCommonKinds \ + DeclNodes \ + StmtNodes \ + CommentCommandList + +.include "../lldb.lib.mk" Added: head/lib/clang/liblldbPluginSymbolVendorELF/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/liblldbPluginSymbolVendorELF/Makefile Fri Sep 20 01:52:02 2013 (r255722) @@ -0,0 +1,15 @@ +# $FreeBSD$ + +.include + +LIB= lldbPluginSymbolVendorELF + +SRCDIR= tools/lldb/source/Plugins/SymbolVendor/ELF +SRCS= SymbolVendorELF.cpp + +TGHDRS= DiagnosticCommonKinds \ + DeclNodes \ + StmtNodes \ + CommentCommandList + +.include "../lldb.lib.mk" Added: head/lib/clang/liblldbPluginUnwindAssemblyInstEmulation/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/liblldbPluginUnwindAssemblyInstEmulation/Makefile Fri Sep 20 01:52:02 2013 (r255722) @@ -0,0 +1,15 @@ +# $FreeBSD$ + +.include + +LIB= lldbPluginUnwindAssemblyInstEmulation + +SRCDIR= tools/lldb/source/Plugins/UnwindAssembly/InstEmulation +SRCS= UnwindAssemblyInstEmulation.cpp + +TGHDRS= DiagnosticCommonKinds \ + DeclNodes \ + StmtNodes \ + CommentCommandList + +.include "../lldb.lib.mk" Added: head/lib/clang/liblldbPluginUnwindAssemblyX86/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/liblldbPluginUnwindAssemblyX86/Makefile Fri Sep 20 01:52:02 2013 (r255722) @@ -0,0 +1,15 @@ +# $FreeBSD$ + +.include + +LIB= lldbPluginUnwindAssemblyX86 + +SRCDIR= tools/lldb/source/Plugins/UnwindAssembly/x86 +SRCS= UnwindAssembly-x86.cpp + +TGHDRS= DiagnosticCommonKinds \ + DeclNodes \ + StmtNodes \ + CommentCommandList + +.include "../lldb.lib.mk" Added: head/lib/clang/liblldbSymbol/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/liblldbSymbol/Makefile Fri Sep 20 01:52:02 2013 (r255722) @@ -0,0 +1,43 @@ +# $FreeBSD$ + +.include + +LIB= lldbSymbol + +SRCDIR= tools/lldb/source/Symbol +SRCS= Block.cpp \ + ClangASTContext.cpp \ + ClangASTImporter.cpp \ + ClangASTType.cpp \ + ClangExternalASTSourceCallbacks.cpp \ + ClangExternalASTSourceCommon.cpp \ + ClangNamespaceDecl.cpp \ + CompileUnit.cpp \ + Declaration.cpp \ + DWARFCallFrameInfo.cpp \ + Function.cpp \ + FuncUnwinders.cpp \ + LineEntry.cpp \ + LineTable.cpp \ + ObjectFile.cpp \ + Symbol.cpp \ + SymbolContext.cpp \ + SymbolFile.cpp \ + SymbolVendor.cpp \ + Symtab.cpp \ + Type.cpp \ + TypeList.cpp \ + UnwindPlan.cpp \ + UnwindTable.cpp \ + Variable.cpp \ + VariableList.cpp \ + VerifyDecl.cpp + +TGHDRS= DiagnosticCommonKinds \ + DeclNodes \ + StmtNodes \ + CommentCommandList \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Sep 20 01:55:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E033AF37; Fri, 20 Sep 2013 01:55:37 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B4C0725C7; Fri, 20 Sep 2013 01:55:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8K1tbZr081378; Fri, 20 Sep 2013 01:55:37 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8K1tbn2081377; Fri, 20 Sep 2013 01:55:37 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201309200155.r8K1tbn2081377@svn.freebsd.org> From: Ed Maste Date: Fri, 20 Sep 2013 01:55:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255723 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Sep 2013 01:55:38 -0000 Author: emaste Date: Fri Sep 20 01:55:37 2013 New Revision: 255723 URL: http://svnweb.freebsd.org/changeset/base/255723 Log: Regenerate after addition of WITH_LLDB Approved by: re (blanket) Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Fri Sep 20 01:52:02 2013 (r255722) +++ head/share/man/man5/src.conf.5 Fri Sep 20 01:55:37 2013 (r255723) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 253304 2013-07-12 23:08:44Z bapt .\" $FreeBSD$ -.Dd September 15, 2013 +.Dd September 19, 2013 .Dt SRC.CONF 5 .Os .Sh NAME @@ -295,6 +295,8 @@ When set, it also enforces the following .Va WITHOUT_CLANG_FULL .It .Va WITHOUT_CLANG_IS_CC +.It +.Va WITHOUT_LLDB .El .It Va WITH_CLANG .\" from FreeBSD: head/tools/build/options/WITH_CLANG 221730 2011-05-10 11:14:40Z ru @@ -329,6 +331,12 @@ and .Pp It is a default setting on arm/armeb, arm/armv6eb, ia64/ia64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. +When set, it also enforces the following options: +.Pp +.Bl -item -compact +.It +.Va WITHOUT_LLDB +.El .It Va WITH_CLANG_IS_CC .\" from FreeBSD: head/tools/build/options/WITH_CLANG_IS_CC 235342 2012-05-12 16:12:36Z gjb Set to install the Clang C/C++ compiler as @@ -403,6 +411,8 @@ When set, it also enforces the following .Va WITHOUT_CLANG_IS_CC .It .Va WITHOUT_GROFF +.It +.Va WITHOUT_LLDB .El .It Va WITH_DEBUG_FILES .\" from FreeBSD: head/tools/build/options/WITH_DEBUG_FILES 251512 2013-06-07 21:40:02Z emaste @@ -779,6 +789,9 @@ When set, it also enforces the following .It .Va WITHOUT_BIND_UTILS .El +.It Va WITH_LLDB +.\" from FreeBSD: head/tools/build/options/WITH_LLDB 255722 2013-09-20 01:52:02Z emaste +Set to build the LLDB debugger. .It Va WITHOUT_LOCALES .\" from FreeBSD: head/tools/build/options/WITHOUT_LOCALES 156932 2006-03-21 07:50:50Z ru Set to not build localization files; see @@ -1149,6 +1162,8 @@ When set, it also enforces the following .Va WITHOUT_GCC .It .Va WITHOUT_GDB +.It +.Va WITHOUT_LLDB .El .It Va WITHOUT_UNBOUND .\" from FreeBSD: head/tools/build/options/WITHOUT_UNBOUND 255597 2013-09-15 14:51:23Z des From owner-svn-src-all@FreeBSD.ORG Fri Sep 20 04:30:22 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 254A6700; Fri, 20 Sep 2013 04:30:22 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0FC052C95; Fri, 20 Sep 2013 04:30:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8K4UMqT068146; Fri, 20 Sep 2013 04:30:22 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8K4UJu0067909; Fri, 20 Sep 2013 04:30:19 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201309200430.r8K4UJu0067909@svn.freebsd.org> From: Alan Cox Date: Fri, 20 Sep 2013 04:30:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255724 - in head/sys: amd64/amd64 arm/arm i386/i386 i386/xen ia64/ia64 mips/mips powerpc/aim powerpc/booke powerpc/powerpc sparc64/sparc64 vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Sep 2013 04:30:22 -0000 Author: alc Date: Fri Sep 20 04:30:18 2013 New Revision: 255724 URL: http://svnweb.freebsd.org/changeset/base/255724 Log: The pmap function pmap_clear_reference() is no longer used. Remove it. pmap_clear_reference() has had exactly one caller in the kernel for several years, more precisely, since FreeBSD 8. Now, that call no longer exists. Approved by: re (kib) Sponsored by: EMC / Isilon Storage Division Modified: head/sys/amd64/amd64/pmap.c head/sys/arm/arm/pmap-v6.c head/sys/arm/arm/pmap.c head/sys/i386/i386/pmap.c head/sys/i386/xen/pmap.c head/sys/ia64/ia64/pmap.c head/sys/mips/mips/pmap.c head/sys/powerpc/aim/mmu_oea.c head/sys/powerpc/aim/mmu_oea64.c head/sys/powerpc/booke/pmap.c head/sys/powerpc/powerpc/pmap_dispatch.c head/sys/sparc64/sparc64/pmap.c head/sys/vm/pmap.h Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Fri Sep 20 01:55:37 2013 (r255723) +++ head/sys/amd64/amd64/pmap.c Fri Sep 20 04:30:18 2013 (r255724) @@ -5382,66 +5382,6 @@ small_mappings: } /* - * pmap_clear_reference: - * - * Clear the reference bit on the specified physical page. - */ -void -pmap_clear_reference(vm_page_t m) -{ - struct md_page *pvh; - pmap_t pmap; - pv_entry_t next_pv, pv; - pd_entry_t oldpde, *pde; - pt_entry_t *pte; - vm_offset_t va; - - KASSERT((m->oflags & VPO_UNMANAGED) == 0, - ("pmap_clear_reference: page %p is not managed", m)); - rw_wlock(&pvh_global_lock); - if ((m->flags & PG_FICTITIOUS) != 0) - goto small_mappings; - pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); - TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_next, next_pv) { - pmap = PV_PMAP(pv); - PMAP_LOCK(pmap); - va = pv->pv_va; - pde = pmap_pde(pmap, va); - oldpde = *pde; - if ((oldpde & PG_A) != 0) { - if (pmap_demote_pde(pmap, pde, va)) { - /* - * Remove the mapping to a single page so - * that a subsequent access may repromote. - * Since the underlying page table page is - * fully populated, this removal never frees - * a page table page. - */ - va += VM_PAGE_TO_PHYS(m) - (oldpde & - PG_PS_FRAME); - pmap_remove_page(pmap, va, pde, NULL); - } - } - PMAP_UNLOCK(pmap); - } -small_mappings: - TAILQ_FOREACH(pv, &m->md.pv_list, pv_next) { - pmap = PV_PMAP(pv); - PMAP_LOCK(pmap); - pde = pmap_pde(pmap, pv->pv_va); - KASSERT((*pde & PG_PS) == 0, ("pmap_clear_reference: found" - " a 2mpage in page %p's pv list", m)); - pte = pmap_pde_to_pte(pde, pv->pv_va); - if (*pte & PG_A) { - atomic_clear_long(pte, PG_A); - pmap_invalidate_page(pmap, pv->pv_va); - } - PMAP_UNLOCK(pmap); - } - rw_wunlock(&pvh_global_lock); -} - -/* * Miscellaneous support routines follow */ Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Fri Sep 20 01:55:37 2013 (r255723) +++ head/sys/arm/arm/pmap-v6.c Fri Sep 20 04:30:18 2013 (r255724) @@ -4905,22 +4905,6 @@ pmap_clear_modify(vm_page_t m) /* - * pmap_clear_reference: - * - * Clear the reference bit on the specified physical page. - */ -void -pmap_clear_reference(vm_page_t m) -{ - - KASSERT((m->oflags & VPO_UNMANAGED) == 0, - ("pmap_clear_reference: page %p is not managed", m)); - if (pmap_is_referenced(m)) - pmap_clearbit(m, PVF_REF); -} - - -/* * Clear the write and modified bits in each of the given page's mappings. */ void Modified: head/sys/arm/arm/pmap.c ============================================================================== --- head/sys/arm/arm/pmap.c Fri Sep 20 01:55:37 2013 (r255723) +++ head/sys/arm/arm/pmap.c Fri Sep 20 04:30:18 2013 (r255724) @@ -4591,21 +4591,6 @@ pmap_is_referenced(vm_page_t m) return ((m->md.pvh_attrs & PVF_REF) != 0); } -/* - * pmap_clear_reference: - * - * Clear the reference bit on the specified physical page. - */ -void -pmap_clear_reference(vm_page_t m) -{ - - KASSERT((m->oflags & VPO_UNMANAGED) == 0, - ("pmap_clear_reference: page %p is not managed", m)); - if (m->md.pvh_attrs & PVF_REF) - pmap_clearbit(m, PVF_REF); -} - /* * Clear the write and modified bits in each of the given page's mappings. Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Fri Sep 20 01:55:37 2013 (r255723) +++ head/sys/i386/i386/pmap.c Fri Sep 20 04:30:18 2013 (r255724) @@ -5049,73 +5049,6 @@ small_mappings: } /* - * pmap_clear_reference: - * - * Clear the reference bit on the specified physical page. - */ -void -pmap_clear_reference(vm_page_t m) -{ - struct md_page *pvh; - pv_entry_t next_pv, pv; - pmap_t pmap; - pd_entry_t oldpde, *pde; - pt_entry_t *pte; - vm_offset_t va; - - KASSERT((m->oflags & VPO_UNMANAGED) == 0, - ("pmap_clear_reference: page %p is not managed", m)); - rw_wlock(&pvh_global_lock); - sched_pin(); - if ((m->flags & PG_FICTITIOUS) != 0) - goto small_mappings; - pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); - TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_next, next_pv) { - va = pv->pv_va; - pmap = PV_PMAP(pv); - PMAP_LOCK(pmap); - pde = pmap_pde(pmap, va); - oldpde = *pde; - if ((oldpde & PG_A) != 0) { - if (pmap_demote_pde(pmap, pde, va)) { - /* - * Remove the mapping to a single page so - * that a subsequent access may repromote. - * Since the underlying page table page is - * fully populated, this removal never frees - * a page table page. - */ - va += VM_PAGE_TO_PHYS(m) - (oldpde & - PG_PS_FRAME); - pmap_remove_page(pmap, va, NULL); - } - } - PMAP_UNLOCK(pmap); - } -small_mappings: - TAILQ_FOREACH(pv, &m->md.pv_list, pv_next) { - pmap = PV_PMAP(pv); - PMAP_LOCK(pmap); - pde = pmap_pde(pmap, pv->pv_va); - KASSERT((*pde & PG_PS) == 0, ("pmap_clear_reference: found" - " a 4mpage in page %p's pv list", m)); - pte = pmap_pte_quick(pmap, pv->pv_va); - if ((*pte & PG_A) != 0) { - /* - * Regardless of whether a pte is 32 or 64 bits - * in size, PG_A is among the least significant - * 32 bits. - */ - atomic_clear_int((u_int *)pte, PG_A); - pmap_invalidate_page(pmap, pv->pv_va); - } - PMAP_UNLOCK(pmap); - } - sched_unpin(); - rw_wunlock(&pvh_global_lock); -} - -/* * Miscellaneous support routines follow */ Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Fri Sep 20 01:55:37 2013 (r255723) +++ head/sys/i386/xen/pmap.c Fri Sep 20 04:30:18 2013 (r255724) @@ -4024,41 +4024,6 @@ pmap_clear_modify(vm_page_t m) } /* - * pmap_clear_reference: - * - * Clear the reference bit on the specified physical page. - */ -void -pmap_clear_reference(vm_page_t m) -{ - pv_entry_t pv; - pmap_t pmap; - pt_entry_t *pte; - - KASSERT((m->oflags & VPO_UNMANAGED) == 0, - ("pmap_clear_reference: page %p is not managed", m)); - rw_wlock(&pvh_global_lock); - sched_pin(); - TAILQ_FOREACH(pv, &m->md.pv_list, pv_next) { - pmap = PV_PMAP(pv); - PMAP_LOCK(pmap); - pte = pmap_pte_quick(pmap, pv->pv_va); - if ((*pte & PG_A) != 0) { - /* - * Regardless of whether a pte is 32 or 64 bits - * in size, PG_A is among the least significant - * 32 bits. - */ - PT_SET_VA_MA(pte, *pte & ~PG_A, FALSE); - pmap_invalidate_page(pmap, pv->pv_va); - } - PMAP_UNLOCK(pmap); - } - sched_unpin(); - rw_wunlock(&pvh_global_lock); -} - -/* * Miscellaneous support routines follow */ Modified: head/sys/ia64/ia64/pmap.c ============================================================================== --- head/sys/ia64/ia64/pmap.c Fri Sep 20 01:55:37 2013 (r255723) +++ head/sys/ia64/ia64/pmap.c Fri Sep 20 04:30:18 2013 (r255724) @@ -2394,37 +2394,6 @@ pmap_clear_modify(vm_page_t m) } /* - * pmap_clear_reference: - * - * Clear the reference bit on the specified physical page. - */ -void -pmap_clear_reference(vm_page_t m) -{ - struct ia64_lpte *pte; - pmap_t oldpmap, pmap; - pv_entry_t pv; - - KASSERT((m->oflags & VPO_UNMANAGED) == 0, - ("pmap_clear_reference: page %p is not managed", m)); - rw_wlock(&pvh_global_lock); - TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { - pmap = PV_PMAP(pv); - PMAP_LOCK(pmap); - oldpmap = pmap_switch(pmap); - pte = pmap_find_vhpt(pv->pv_va); - KASSERT(pte != NULL, ("pte")); - if (pmap_accessed(pte)) { - pmap_clear_accessed(pte); - pmap_invalidate_page(pv->pv_va); - } - pmap_switch(oldpmap); - PMAP_UNLOCK(pmap); - } - rw_wunlock(&pvh_global_lock); -} - -/* * Clear the write and modified bits in each of the given page's mappings. */ void Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Fri Sep 20 01:55:37 2013 (r255723) +++ head/sys/mips/mips/pmap.c Fri Sep 20 04:30:18 2013 (r255724) @@ -3053,24 +3053,6 @@ pmap_is_referenced(vm_page_t m) } /* - * pmap_clear_reference: - * - * Clear the reference bit on the specified physical page. - */ -void -pmap_clear_reference(vm_page_t m) -{ - - KASSERT((m->oflags & VPO_UNMANAGED) == 0, - ("pmap_clear_reference: page %p is not managed", m)); - rw_wlock(&pvh_global_lock); - if (m->md.pv_flags & PV_TABLE_REF) { - m->md.pv_flags &= ~PV_TABLE_REF; - } - rw_wunlock(&pvh_global_lock); -} - -/* * Miscellaneous support routines follow */ Modified: head/sys/powerpc/aim/mmu_oea.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea.c Fri Sep 20 01:55:37 2013 (r255723) +++ head/sys/powerpc/aim/mmu_oea.c Fri Sep 20 04:30:18 2013 (r255724) @@ -278,7 +278,6 @@ int moea_pte_spill(vm_offset_t); */ void moea_change_wiring(mmu_t, pmap_t, vm_offset_t, boolean_t); void moea_clear_modify(mmu_t, vm_page_t); -void moea_clear_reference(mmu_t, vm_page_t); void moea_copy_page(mmu_t, vm_page_t, vm_page_t); void moea_copy_pages(mmu_t mmu, vm_page_t *ma, vm_offset_t a_offset, vm_page_t *mb, vm_offset_t b_offset, int xfersize); @@ -328,7 +327,6 @@ struct pmap_md * moea_scan_md(mmu_t mmu, static mmu_method_t moea_methods[] = { MMUMETHOD(mmu_change_wiring, moea_change_wiring), MMUMETHOD(mmu_clear_modify, moea_clear_modify), - MMUMETHOD(mmu_clear_reference, moea_clear_reference), MMUMETHOD(mmu_copy_page, moea_copy_page), MMUMETHOD(mmu_copy_pages, moea_copy_pages), MMUMETHOD(mmu_enter, moea_enter), @@ -1353,17 +1351,6 @@ moea_is_prefaultable(mmu_t mmu, pmap_t p } void -moea_clear_reference(mmu_t mmu, vm_page_t m) -{ - - KASSERT((m->oflags & VPO_UNMANAGED) == 0, - ("moea_clear_reference: page %p is not managed", m)); - rw_wlock(&pvh_global_lock); - moea_clear_bit(m, PTE_REF); - rw_wunlock(&pvh_global_lock); -} - -void moea_clear_modify(mmu_t mmu, vm_page_t m) { Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Fri Sep 20 01:55:37 2013 (r255723) +++ head/sys/powerpc/aim/mmu_oea64.c Fri Sep 20 04:30:18 2013 (r255724) @@ -288,7 +288,6 @@ static void moea64_syncicache(mmu_t, pm */ void moea64_change_wiring(mmu_t, pmap_t, vm_offset_t, boolean_t); void moea64_clear_modify(mmu_t, vm_page_t); -void moea64_clear_reference(mmu_t, vm_page_t); void moea64_copy_page(mmu_t, vm_page_t, vm_page_t); void moea64_copy_pages(mmu_t mmu, vm_page_t *ma, vm_offset_t a_offset, vm_page_t *mb, vm_offset_t b_offset, int xfersize); @@ -334,7 +333,6 @@ static void moea64_sync_icache(mmu_t, pm static mmu_method_t moea64_methods[] = { MMUMETHOD(mmu_change_wiring, moea64_change_wiring), MMUMETHOD(mmu_clear_modify, moea64_clear_modify), - MMUMETHOD(mmu_clear_reference, moea64_clear_reference), MMUMETHOD(mmu_copy_page, moea64_copy_page), MMUMETHOD(mmu_copy_pages, moea64_copy_pages), MMUMETHOD(mmu_enter, moea64_enter), @@ -1543,15 +1541,6 @@ moea64_is_prefaultable(mmu_t mmu, pmap_t } void -moea64_clear_reference(mmu_t mmu, vm_page_t m) -{ - - KASSERT((m->oflags & VPO_UNMANAGED) == 0, - ("moea64_clear_reference: page %p is not managed", m)); - moea64_clear_bit(mmu, m, LPTE_REF); -} - -void moea64_clear_modify(mmu_t mmu, vm_page_t m) { Modified: head/sys/powerpc/booke/pmap.c ============================================================================== --- head/sys/powerpc/booke/pmap.c Fri Sep 20 01:55:37 2013 (r255723) +++ head/sys/powerpc/booke/pmap.c Fri Sep 20 04:30:18 2013 (r255724) @@ -270,7 +270,6 @@ void pmap_bootstrap_ap(volatile uint32_t */ static void mmu_booke_change_wiring(mmu_t, pmap_t, vm_offset_t, boolean_t); static void mmu_booke_clear_modify(mmu_t, vm_page_t); -static void mmu_booke_clear_reference(mmu_t, vm_page_t); static void mmu_booke_copy(mmu_t, pmap_t, pmap_t, vm_offset_t, vm_size_t, vm_offset_t); static void mmu_booke_copy_page(mmu_t, vm_page_t, vm_page_t); @@ -333,7 +332,6 @@ static mmu_method_t mmu_booke_methods[] /* pmap dispatcher interface */ MMUMETHOD(mmu_change_wiring, mmu_booke_change_wiring), MMUMETHOD(mmu_clear_modify, mmu_booke_clear_modify), - MMUMETHOD(mmu_clear_reference, mmu_booke_clear_reference), MMUMETHOD(mmu_copy, mmu_booke_copy), MMUMETHOD(mmu_copy_page, mmu_booke_copy_page), MMUMETHOD(mmu_copy_pages, mmu_booke_copy_pages), @@ -2357,38 +2355,6 @@ mmu_booke_ts_referenced(mmu_t mmu, vm_pa } /* - * Clear the reference bit on the specified physical page. - */ -static void -mmu_booke_clear_reference(mmu_t mmu, vm_page_t m) -{ - pte_t *pte; - pv_entry_t pv; - - KASSERT((m->oflags & VPO_UNMANAGED) == 0, - ("mmu_booke_clear_reference: page %p is not managed", m)); - rw_wlock(&pvh_global_lock); - TAILQ_FOREACH(pv, &m->md.pv_list, pv_link) { - PMAP_LOCK(pv->pv_pmap); - if ((pte = pte_find(mmu, pv->pv_pmap, pv->pv_va)) != NULL && - PTE_ISVALID(pte)) { - if (PTE_ISREFERENCED(pte)) { - mtx_lock_spin(&tlbivax_mutex); - tlb_miss_lock(); - - tlb0_flush_entry(pv->pv_va); - pte->flags &= ~PTE_REFERENCED; - - tlb_miss_unlock(); - mtx_unlock_spin(&tlbivax_mutex); - } - } - PMAP_UNLOCK(pv->pv_pmap); - } - rw_wunlock(&pvh_global_lock); -} - -/* * Change wiring attribute for a map/virtual-address pair. */ static void Modified: head/sys/powerpc/powerpc/pmap_dispatch.c ============================================================================== --- head/sys/powerpc/powerpc/pmap_dispatch.c Fri Sep 20 01:55:37 2013 (r255723) +++ head/sys/powerpc/powerpc/pmap_dispatch.c Fri Sep 20 04:30:18 2013 (r255724) @@ -116,14 +116,6 @@ pmap_clear_modify(vm_page_t m) } void -pmap_clear_reference(vm_page_t m) -{ - - CTR2(KTR_PMAP, "%s(%p)", __func__, m); - MMU_CLEAR_REFERENCE(mmu_obj, m); -} - -void pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, vm_size_t len, vm_offset_t src_addr) { Modified: head/sys/sparc64/sparc64/pmap.c ============================================================================== --- head/sys/sparc64/sparc64/pmap.c Fri Sep 20 01:55:37 2013 (r255723) +++ head/sys/sparc64/sparc64/pmap.c Fri Sep 20 04:30:18 2013 (r255724) @@ -2165,25 +2165,6 @@ pmap_clear_modify(vm_page_t m) } void -pmap_clear_reference(vm_page_t m) -{ - struct tte *tp; - u_long data; - - KASSERT((m->oflags & VPO_UNMANAGED) == 0, - ("pmap_clear_reference: page %p is not managed", m)); - rw_wlock(&tte_list_global_lock); - TAILQ_FOREACH(tp, &m->md.tte_list, tte_link) { - if ((tp->tte_data & TD_PV) == 0) - continue; - data = atomic_clear_long(&tp->tte_data, TD_REF); - if ((data & TD_REF) != 0) - tlb_page_demap(TTE_GET_PMAP(tp), TTE_GET_VA(tp)); - } - rw_wunlock(&tte_list_global_lock); -} - -void pmap_remove_write(vm_page_t m) { struct tte *tp; Modified: head/sys/vm/pmap.h ============================================================================== --- head/sys/vm/pmap.h Fri Sep 20 01:55:37 2013 (r255723) +++ head/sys/vm/pmap.h Fri Sep 20 04:30:18 2013 (r255724) @@ -104,7 +104,6 @@ void pmap_align_superpage(vm_object_t, vm_size_t); void pmap_change_wiring(pmap_t, vm_offset_t, boolean_t); void pmap_clear_modify(vm_page_t m); -void pmap_clear_reference(vm_page_t m); void pmap_copy(pmap_t, pmap_t, vm_offset_t, vm_size_t, vm_offset_t); void pmap_copy_page(vm_page_t, vm_page_t); void pmap_copy_pages(vm_page_t ma[], vm_offset_t a_offset, From owner-svn-src-all@FreeBSD.ORG Fri Sep 20 04:35:10 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9916C872; Fri, 20 Sep 2013 04:35:10 +0000 (UTC) (envelope-from gibbs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 86F712CB7; Fri, 20 Sep 2013 04:35:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8K4ZAPb070041; Fri, 20 Sep 2013 04:35:10 GMT (envelope-from gibbs@svn.freebsd.org) Received: (from gibbs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8K4ZAaP070039; Fri, 20 Sep 2013 04:35:10 GMT (envelope-from gibbs@svn.freebsd.org) Message-Id: <201309200435.r8K4ZAaP070039@svn.freebsd.org> From: "Justin T. Gibbs" Date: Fri, 20 Sep 2013 04:35:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255725 - head/sys/i386/xen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Sep 2013 04:35:10 -0000 Author: gibbs Date: Fri Sep 20 04:35:09 2013 New Revision: 255725 URL: http://svnweb.freebsd.org/changeset/base/255725 Log: sys/i386/xen/mp_machdep.c: sys/i386/xen/mptable.c: Set PCPU apic_id and acpi_id fields in a fasion compatible with both UP and SMP configurations. Suggested by: jhb Submitted by: Roger Pau Monné Sponsored by: Citrix Systems R&D Reviewed by: gibbs Approved by: re (blanket Xen) MFC after: 2 weeks Modified: head/sys/i386/xen/mp_machdep.c head/sys/i386/xen/mptable.c Modified: head/sys/i386/xen/mp_machdep.c ============================================================================== --- head/sys/i386/xen/mp_machdep.c Fri Sep 20 04:30:18 2013 (r255724) +++ head/sys/i386/xen/mp_machdep.c Fri Sep 20 04:35:09 2013 (r255725) @@ -251,9 +251,6 @@ cpu_add(u_int apic_id, char boot_cpu) if (bootverbose) printf("SMP: Added CPU %d (%s)\n", apic_id, boot_cpu ? "BSP" : "AP"); - - /* Set the ACPI id (it is needed by VCPU operations) */ - pcpu_find(apic_id)->pc_acpi_id = apic_id; } void @@ -786,6 +783,13 @@ start_all_aps(void) dpcpu_init((void *)kmem_malloc(kernel_arena, DPCPU_SIZE, M_WAITOK | M_ZERO), bootAP); pc->pc_apic_id = cpu_apic_ids[bootAP]; + /* + * The i386 PV port uses the apic_id as vCPU id, but the + * PVHVM port needs to use the acpi_id, so set it for PV + * also in order to work with shared devices between PV + * and PVHVM. + */ + pc->pc_acpi_id = cpu_apic_ids[bootAP]; pc->pc_prvspace = pc; pc->pc_curthread = 0; Modified: head/sys/i386/xen/mptable.c ============================================================================== --- head/sys/i386/xen/mptable.c Fri Sep 20 04:30:18 2013 (r255724) +++ head/sys/i386/xen/mptable.c Fri Sep 20 04:35:09 2013 (r255725) @@ -87,6 +87,8 @@ static int mptable_setup_local(void) { + PCPU_SET(apic_id, 0); + PCPU_SET(acpi_id, 0); return (0); } From owner-svn-src-all@FreeBSD.ORG Fri Sep 20 04:48:54 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 76C58BF8; Fri, 20 Sep 2013 04:48:54 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from felyko.com (felyko.com [174.136.100.2]) by mx1.freebsd.org (Postfix) with ESMTP id 5E2F72D2C; Fri, 20 Sep 2013 04:48:54 +0000 (UTC) Received: from [IPv6:2601:9:4d00:119:309d:23f4:2dd:bcf9] (unknown [IPv6:2601:9:4d00:119:309d:23f4:2dd:bcf9]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by felyko.com (Postfix) with ESMTPSA id EF88239880; Thu, 19 Sep 2013 21:48:47 -0700 (PDT) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Subject: Re: svn commit: r255597 - in head: etc etc/mtree lib lib/libunbound share/mk tools/build/mk tools/build/options usr.sbin usr.sbin/unbound usr.sbin/unbound/anchor usr.sbin/unbound/checkconf usr.sbin/unb... From: Rui Paulo In-Reply-To: <201309151451.r8FEpNwg052510@svn.freebsd.org> Date: Thu, 19 Sep 2013 21:48:47 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <9129B5E3-3D20-4996-8BA6-CED375325D69@FreeBSD.org> References: <201309151451.r8FEpNwg052510@svn.freebsd.org> To: =?iso-8859-1?Q?Dag-Erling_Sm=F8rgrav?= X-Mailer: Apple Mail (2.1510) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Sep 2013 04:48:54 -0000 On 15 Sep 2013, at 07:51, Dag-Erling Sm=F8rgrav wrote: > Author: des > Date: Sun Sep 15 14:51:23 2013 > New Revision: 255597 > URL: http://svnweb.freebsd.org/changeset/base/255597 >=20 > Log: > Build and install the Unbound caching DNS resolver daemon. >=20 > Approved by: re (blanket) Is this a suitable replacement for the unbound in ports? What's missing? = What about an rc.d script? -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Fri Sep 20 05:06:07 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C65A6FEE; Fri, 20 Sep 2013 05:06:07 +0000 (UTC) (envelope-from gibbs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B08902E0E; Fri, 20 Sep 2013 05:06:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8K567xK086604; Fri, 20 Sep 2013 05:06:07 GMT (envelope-from gibbs@svn.freebsd.org) Received: (from gibbs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8K5634w086566; Fri, 20 Sep 2013 05:06:03 GMT (envelope-from gibbs@svn.freebsd.org) Message-Id: <201309200506.r8K5634w086566@svn.freebsd.org> From: "Justin T. Gibbs" Date: Fri, 20 Sep 2013 05:06:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255726 - in head/sys: amd64/amd64 amd64/include dev/acpica dev/xen/control dev/xen/timer dev/xen/xenpci i386/i386 i386/include kern sys x86/acpica x86/isa x86/x86 x86/xen xen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Sep 2013 05:06:07 -0000 Author: gibbs Date: Fri Sep 20 05:06:03 2013 New Revision: 255726 URL: http://svnweb.freebsd.org/changeset/base/255726 Log: Add support for suspend/resume/migration operations when running as a Xen PVHVM guest. Submitted by: Roger Pau Monné Sponsored by: Citrix Systems R&D Reviewed by: gibbs Approved by: re (blanket Xen) MFC after: 2 weeks sys/amd64/amd64/mp_machdep.c: sys/i386/i386/mp_machdep.c: - Make sure that are no MMU related IPIs pending on migration. - Reset pending IPI_BITMAP on resume. - Init vcpu_info on resume. sys/amd64/include/intr_machdep.h: sys/i386/include/intr_machdep.h: sys/x86/acpica/acpi_wakeup.c: sys/x86/x86/intr_machdep.c: sys/x86/isa/atpic.c: sys/x86/x86/io_apic.c: sys/x86/x86/local_apic.c: - Add a "suspend_cancelled" parameter to pic_resume(). For the Xen PIC, restoration of interrupt services differs between the aborted suspend and normal resume cases, so we must provide this information. sys/dev/acpica/acpi_timer.c: sys/dev/xen/timer/timer.c: sys/timetc.h: - Don't swap out "suspend safe" timers across a suspend/resume cycle. This includes the Xen PV and ACPI timers. sys/dev/xen/control/control.c: - Perform proper suspend/resume process for PVHVM: - Suspend all APs before going into suspension, this allows us to reset the vcpu_info on resume for each AP. - Reset shared info page and callback on resume. sys/dev/xen/timer/timer.c: - Implement suspend/resume support for the PV timer. Since FreeBSD doesn't perform a per-cpu resume of the timer, we need to call smp_rendezvous in order to correctly resume the timer on each CPU. sys/dev/xen/xenpci/xenpci.c: - Don't reset the PCI interrupt on each suspend/resume. sys/kern/subr_smp.c: - When suspending a PVHVM domain make sure there are no MMU IPIs in-flight, or we will get a lockup on resume due to the fact that pending event channels are not carried over on migration. - Implement a generic version of restart_cpus that can be used by suspended and stopped cpus. sys/x86/xen/hvm.c: - Implement resume support for the hypercall page and shared info. - Clear vcpu_info so it can be reset by APs when resuming from suspension. sys/dev/xen/xenpci/xenpci.c: sys/x86/xen/hvm.c: sys/x86/xen/xen_intr.c: - Support UP kernel configurations. sys/x86/xen/xen_intr.c: - Properly rebind per-cpus VIRQs and IPIs on resume. Modified: head/sys/amd64/amd64/mp_machdep.c head/sys/amd64/include/intr_machdep.h head/sys/dev/acpica/acpi_timer.c head/sys/dev/xen/control/control.c head/sys/dev/xen/timer/timer.c head/sys/dev/xen/xenpci/xenpci.c head/sys/i386/i386/mp_machdep.c head/sys/i386/include/intr_machdep.h head/sys/kern/subr_smp.c head/sys/sys/smp.h head/sys/sys/timetc.h head/sys/x86/acpica/acpi_wakeup.c head/sys/x86/isa/atpic.c head/sys/x86/x86/intr_machdep.c head/sys/x86/x86/io_apic.c head/sys/x86/x86/local_apic.c head/sys/x86/xen/hvm.c head/sys/x86/xen/xen_intr.c head/sys/xen/hvm.h Modified: head/sys/amd64/amd64/mp_machdep.c ============================================================================== --- head/sys/amd64/amd64/mp_machdep.c Fri Sep 20 04:35:09 2013 (r255725) +++ head/sys/amd64/amd64/mp_machdep.c Fri Sep 20 05:06:03 2013 (r255726) @@ -1468,6 +1468,10 @@ cpususpend_handler(void) cpu = PCPU_GET(cpuid); +#ifdef XENHVM + mtx_assert(&smp_ipi_mtx, MA_NOTOWNED); +#endif + if (savectx(susppcbs[cpu])) { ctx_fpusave(susppcbs[cpu]->pcb_fpususpend); wbinvd(); @@ -1486,11 +1490,23 @@ cpususpend_handler(void) while (!CPU_ISSET(cpu, &started_cpus)) ia32_pause(); +#ifdef XENHVM + /* + * Reset pending bitmap IPIs, because Xen doesn't preserve pending + * event channels on migration. + */ + cpu_ipi_pending[cpu] = 0; + /* register vcpu_info area */ + xen_hvm_init_cpu(); +#endif + /* Resume MCA and local APIC */ mca_resume(); lapic_setup(0); CPU_CLR_ATOMIC(cpu, &started_cpus); + /* Indicate that we are resumed */ + CPU_CLR_ATOMIC(cpu, &suspended_cpus); } /* Modified: head/sys/amd64/include/intr_machdep.h ============================================================================== --- head/sys/amd64/include/intr_machdep.h Fri Sep 20 04:35:09 2013 (r255725) +++ head/sys/amd64/include/intr_machdep.h Fri Sep 20 05:06:03 2013 (r255726) @@ -102,7 +102,7 @@ struct pic { int (*pic_vector)(struct intsrc *); int (*pic_source_pending)(struct intsrc *); void (*pic_suspend)(struct pic *); - void (*pic_resume)(struct pic *); + void (*pic_resume)(struct pic *, bool suspend_cancelled); int (*pic_config_intr)(struct intsrc *, enum intr_trigger, enum intr_polarity); int (*pic_assign_cpu)(struct intsrc *, u_int apic_id); @@ -170,7 +170,7 @@ struct intsrc *intr_lookup_source(int ve int intr_register_pic(struct pic *pic); int intr_register_source(struct intsrc *isrc); int intr_remove_handler(void *cookie); -void intr_resume(void); +void intr_resume(bool suspend_cancelled); void intr_suspend(void); void intrcnt_add(const char *name, u_long **countp); void nexus_add_irq(u_long irq); Modified: head/sys/dev/acpica/acpi_timer.c ============================================================================== --- head/sys/dev/acpica/acpi_timer.c Fri Sep 20 04:35:09 2013 (r255725) +++ head/sys/dev/acpica/acpi_timer.c Fri Sep 20 05:06:03 2013 (r255726) @@ -189,6 +189,7 @@ acpi_timer_probe(device_t dev) else acpi_timer_timecounter.tc_counter_mask = 0x00ffffff; acpi_timer_timecounter.tc_frequency = acpi_timer_frequency; + acpi_timer_timecounter.tc_flags = TC_FLAGS_SUSPEND_SAFE; if (testenv("debug.acpi.timer_test")) acpi_timer_boot_test(); @@ -285,6 +286,14 @@ acpi_timer_suspend_handler(struct timeco acpi_timer_eh = NULL; } + if ((timecounter->tc_flags & TC_FLAGS_SUSPEND_SAFE) != 0) { + /* + * If we are using a suspend safe timecounter, don't + * save/restore it across suspend/resume. + */ + return; + } + KASSERT(newtc == &acpi_timer_timecounter, ("acpi_timer_suspend_handler: wrong timecounter")); Modified: head/sys/dev/xen/control/control.c ============================================================================== --- head/sys/dev/xen/control/control.c Fri Sep 20 04:35:09 2013 (r255725) +++ head/sys/dev/xen/control/control.c Fri Sep 20 05:06:03 2013 (r255726) @@ -119,11 +119,9 @@ __FBSDID("$FreeBSD$"); #include #include #include - -#ifndef XENHVM #include #include -#endif +#include #include @@ -140,6 +138,10 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef XENHVM +#include +#endif + #include #include @@ -199,7 +201,7 @@ extern void xencons_resume(void); static void xctrl_suspend() { - int i, j, k, fpp; + int i, j, k, fpp, suspend_cancelled; unsigned long max_pfn, start_info_mfn; EVENTHANDLER_INVOKE(power_suspend); @@ -264,7 +266,7 @@ xctrl_suspend() */ start_info_mfn = VTOMFN(xen_start_info); pmap_suspend(); - HYPERVISOR_suspend(start_info_mfn); + suspend_cancelled = HYPERVISOR_suspend(start_info_mfn); pmap_resume(); pmap_kenter_ma((vm_offset_t) shared_info, xen_start_info->shared_info); @@ -287,7 +289,7 @@ xctrl_suspend() HYPERVISOR_shared_info->arch.max_pfn = max_pfn; gnttab_resume(); - intr_resume(); + intr_resume(suspend_cancelled != 0); local_irq_enable(); xencons_resume(); @@ -331,16 +333,31 @@ xen_pv_shutdown_final(void *arg, int how } #else -extern void xenpci_resume(void); /* HVM mode suspension. */ static void xctrl_suspend() { +#ifdef SMP + cpuset_t cpu_suspend_map; +#endif int suspend_cancelled; EVENTHANDLER_INVOKE(power_suspend); + if (smp_started) { + thread_lock(curthread); + sched_bind(curthread, 0); + thread_unlock(curthread); + } + KASSERT((PCPU_GET(cpuid) == 0), ("Not running on CPU#0")); + + /* + * Clear our XenStore node so the toolstack knows we are + * responding to the suspend request. + */ + xs_write(XST_NIL, "control", "shutdown", ""); + /* * Be sure to hold Giant across DEVICE_SUSPEND/RESUME since non-MPSAFE * drivers need this. @@ -353,31 +370,67 @@ xctrl_suspend() } mtx_unlock(&Giant); +#ifdef SMP + if (smp_started) { + /* + * Suspend other CPUs. This prevents IPIs while we + * are resuming, and will allow us to reset per-cpu + * vcpu_info on resume. + */ + cpu_suspend_map = all_cpus; + CPU_CLR(PCPU_GET(cpuid), &cpu_suspend_map); + if (!CPU_EMPTY(&cpu_suspend_map)) + suspend_cpus(cpu_suspend_map); + } +#endif + /* * Prevent any races with evtchn_interrupt() handler. */ disable_intr(); intr_suspend(); + xen_hvm_suspend(); suspend_cancelled = HYPERVISOR_suspend(0); - intr_resume(); + xen_hvm_resume(suspend_cancelled != 0); + intr_resume(suspend_cancelled != 0); + enable_intr(); /* - * Re-enable interrupts and put the scheduler back to normal. + * Reset grant table info. */ - enable_intr(); + gnttab_resume(); + +#ifdef SMP + if (smp_started && !CPU_EMPTY(&cpu_suspend_map)) { + /* + * Now that event channels have been initialized, + * resume CPUs. + */ + resume_cpus(cpu_suspend_map); + } +#endif /* * FreeBSD really needs to add DEVICE_SUSPEND_CANCEL or * similar. */ mtx_lock(&Giant); - if (!suspend_cancelled) - DEVICE_RESUME(root_bus); + DEVICE_RESUME(root_bus); mtx_unlock(&Giant); + if (smp_started) { + thread_lock(curthread); + sched_unbind(curthread); + thread_unlock(curthread); + } + EVENTHANDLER_INVOKE(power_resume); + + if (bootverbose) + printf("System resumed after suspension\n"); + } #endif Modified: head/sys/dev/xen/timer/timer.c ============================================================================== --- head/sys/dev/xen/timer/timer.c Fri Sep 20 04:35:09 2013 (r255725) +++ head/sys/dev/xen/timer/timer.c Fri Sep 20 05:06:03 2013 (r255726) @@ -1,4 +1,4 @@ -/** +/*- * Copyright (c) 2009 Adrian Chadd * Copyright (c) 2012 Spectra Logic Corporation * All rights reserved. @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "clock_if.h" @@ -316,7 +317,7 @@ xentimer_settime(device_t dev __unused, * Don't return EINVAL here; just silently fail if the domain isn't * privileged enough to set the TOD. */ - return(0); + return (0); } /** @@ -339,7 +340,7 @@ xentimer_gettime(device_t dev, struct ti xen_fetch_uptime(&u_ts); timespecadd(ts, &u_ts); - return(0); + return (0); } /** @@ -457,8 +458,9 @@ xentimer_attach(device_t dev) /* Bind an event channel to a VIRQ on each VCPU. */ CPU_FOREACH(i) { - struct xentimer_pcpu_data *pcpu = DPCPU_ID_PTR(i, xentimer_pcpu); + struct xentimer_pcpu_data *pcpu; + pcpu = DPCPU_ID_PTR(i, xentimer_pcpu); error = HYPERVISOR_vcpu_op(VCPUOP_stop_periodic_timer, i, NULL); if (error) { device_printf(dev, "Error disabling Xen periodic timer " @@ -493,6 +495,7 @@ xentimer_attach(device_t dev) /* Register the timecounter. */ sc->tc.tc_name = "XENTIMER"; sc->tc.tc_quality = XENTIMER_QUALITY; + sc->tc.tc_flags = TC_FLAGS_SUSPEND_SAFE; /* * The underlying resolution is in nanoseconds, since the timer info * scales TSC frequencies using a fraction that represents time in @@ -523,75 +526,60 @@ xentimer_detach(device_t dev) return (EBUSY); } -/** - * The following device methods are disabled because they wouldn't work - * properly. - */ -#ifdef NOTYET +static void +xentimer_percpu_resume(void *arg) +{ + device_t dev = (device_t) arg; + struct xentimer_softc *sc = device_get_softc(dev); + + xentimer_et_start(&sc->et, sc->et.et_min_period, 0); +} + static int xentimer_resume(device_t dev) { - struct xentimer_softc *sc = device_get_softc(dev); - int error = 0; + int error; int i; - device_printf(sc->dev, "%s", __func__); + /* Disable the periodic timer */ CPU_FOREACH(i) { - struct xentimer_pcpu_data *pcpu = DPCPU_ID_PTR(i, xentimer_pcpu); - - /* Skip inactive timers. */ - if (pcpu->timer == 0) - continue; - - /* - * XXX This won't actually work, because Xen requires that - * singleshot timers be set while running on the given CPU. - */ - error = xentimer_vcpu_start_timer(i, pcpu->timer); - if (error == -ETIME) { - /* Event time has already passed; process. */ - xentimer_intr(sc); - } else if (error != 0) { - panic("%s: error %d restarting vcpu %d\n", - __func__, error, i); + error = HYPERVISOR_vcpu_op(VCPUOP_stop_periodic_timer, i, NULL); + if (error != 0) { + device_printf(dev, + "Error disabling Xen periodic timer on CPU %d\n", + i); + return (error); } } - return (error); + /* Reset the last uptime value */ + xen_timer_last_time = 0; + + /* Reset the RTC clock */ + inittodr(time_second); + + /* Kick the timers on all CPUs */ + smp_rendezvous(NULL, xentimer_percpu_resume, NULL, dev); + + if (bootverbose) + device_printf(dev, "resumed operation after suspension\n"); + + return (0); } static int xentimer_suspend(device_t dev) { - struct xentimer_softc *sc = device_get_softc(dev); - int error = 0; - int i; - - device_printf(sc->dev, "%s", __func__); - CPU_FOREACH(i) { - struct xentimer_pcpu_data *pcpu = DPCPU_ID_PTR(i, xentimer_pcpu); - - /* Skip inactive timers. */ - if (pcpu->timer == 0) - continue; - error = xentimer_vcpu_stop_timer(i); - if (error) - panic("Error %d stopping VCPU %d timer\n", error, i); - } - - return (error); + return (0); } -#endif static device_method_t xentimer_methods[] = { DEVMETHOD(device_identify, xentimer_identify), DEVMETHOD(device_probe, xentimer_probe), DEVMETHOD(device_attach, xentimer_attach), DEVMETHOD(device_detach, xentimer_detach), -#ifdef NOTYET DEVMETHOD(device_suspend, xentimer_suspend), DEVMETHOD(device_resume, xentimer_resume), -#endif /* clock interface */ DEVMETHOD(clock_gettime, xentimer_gettime), DEVMETHOD(clock_settime, xentimer_settime), Modified: head/sys/dev/xen/xenpci/xenpci.c ============================================================================== --- head/sys/dev/xen/xenpci/xenpci.c Fri Sep 20 04:35:09 2013 (r255725) +++ head/sys/dev/xen/xenpci/xenpci.c Fri Sep 20 05:06:03 2013 (r255726) @@ -77,6 +77,7 @@ xenpci_irq_init(device_t device, struct if (error) return error; +#ifdef SMP /* * When using the PCI event delivery callback we cannot assign * events to specific vCPUs, so all events are delivered to vCPU#0 by @@ -88,6 +89,7 @@ xenpci_irq_init(device_t device, struct scp->res_irq, 0); if (error) return error; +#endif xen_hvm_set_callback(device); return (0); @@ -309,28 +311,12 @@ xenpci_detach(device_t dev) static int xenpci_suspend(device_t dev) { - struct xenpci_softc *scp = device_get_softc(dev); - device_t parent = device_get_parent(dev); - - if (scp->intr_cookie != NULL) { - if (BUS_TEARDOWN_INTR(parent, dev, scp->res_irq, - scp->intr_cookie) != 0) - printf("intr teardown failed.. continuing\n"); - scp->intr_cookie = NULL; - } - return (bus_generic_suspend(dev)); } static int xenpci_resume(device_t dev) { - struct xenpci_softc *scp = device_get_softc(dev); - device_t parent = device_get_parent(dev); - - BUS_SETUP_INTR(parent, dev, scp->res_irq, - INTR_MPSAFE|INTR_TYPE_MISC, xenpci_intr_filter, NULL, - /*trap_frame*/NULL, &scp->intr_cookie); xen_hvm_set_callback(dev); return (bus_generic_resume(dev)); } Modified: head/sys/i386/i386/mp_machdep.c ============================================================================== --- head/sys/i386/i386/mp_machdep.c Fri Sep 20 04:35:09 2013 (r255725) +++ head/sys/i386/i386/mp_machdep.c Fri Sep 20 05:06:03 2013 (r255726) @@ -1529,6 +1529,10 @@ cpususpend_handler(void) cpu = PCPU_GET(cpuid); +#ifdef XENHVM + mtx_assert(&smp_ipi_mtx, MA_NOTOWNED); +#endif + if (savectx(susppcbs[cpu])) { wbinvd(); CPU_SET_ATOMIC(cpu, &suspended_cpus); @@ -1545,10 +1549,22 @@ cpususpend_handler(void) while (!CPU_ISSET(cpu, &started_cpus)) ia32_pause(); +#ifdef XENHVM + /* + * Reset pending bitmap IPIs, because Xen doesn't preserve pending + * event channels on migration. + */ + cpu_ipi_pending[cpu] = 0; + /* register vcpu_info area */ + xen_hvm_init_cpu(); +#endif + /* Resume MCA and local APIC */ mca_resume(); lapic_setup(0); + /* Indicate that we are resumed */ + CPU_CLR_ATOMIC(cpu, &suspended_cpus); CPU_CLR_ATOMIC(cpu, &started_cpus); } /* Modified: head/sys/i386/include/intr_machdep.h ============================================================================== --- head/sys/i386/include/intr_machdep.h Fri Sep 20 04:35:09 2013 (r255725) +++ head/sys/i386/include/intr_machdep.h Fri Sep 20 05:06:03 2013 (r255726) @@ -108,7 +108,7 @@ struct pic { int (*pic_vector)(struct intsrc *); int (*pic_source_pending)(struct intsrc *); void (*pic_suspend)(struct pic *); - void (*pic_resume)(struct pic *); + void (*pic_resume)(struct pic *, bool suspend_cancelled); int (*pic_config_intr)(struct intsrc *, enum intr_trigger, enum intr_polarity); int (*pic_assign_cpu)(struct intsrc *, u_int apic_id); @@ -166,7 +166,7 @@ struct intsrc *intr_lookup_source(int ve int intr_register_pic(struct pic *pic); int intr_register_source(struct intsrc *isrc); int intr_remove_handler(void *cookie); -void intr_resume(void); +void intr_resume(bool suspend_cancelled); void intr_suspend(void); void intrcnt_add(const char *name, u_long **countp); void nexus_add_irq(u_long irq); Modified: head/sys/kern/subr_smp.c ============================================================================== --- head/sys/kern/subr_smp.c Fri Sep 20 04:35:09 2013 (r255725) +++ head/sys/kern/subr_smp.c Fri Sep 20 05:06:03 2013 (r255726) @@ -225,6 +225,18 @@ generic_stop_cpus(cpuset_t map, u_int ty CTR2(KTR_SMP, "stop_cpus(%s) with %u type", cpusetobj_strprint(cpusetbuf, &map), type); +#ifdef XENHVM + /* + * When migrating a PVHVM domain we need to make sure there are + * no IPIs in progress. IPIs that have been issued, but not + * yet delivered (not pending on a vCPU) will be lost in the + * IPI rebinding process, violating FreeBSD's assumption of + * reliable IPI delivery. + */ + if (type == IPI_SUSPEND) + mtx_lock_spin(&smp_ipi_mtx); +#endif + if (stopping_cpu != PCPU_GET(cpuid)) while (atomic_cmpset_int(&stopping_cpu, NOCPU, PCPU_GET(cpuid)) == 0) @@ -252,6 +264,11 @@ generic_stop_cpus(cpuset_t map, u_int ty } } +#ifdef XENHVM + if (type == IPI_SUSPEND) + mtx_unlock_spin(&smp_ipi_mtx); +#endif + stopping_cpu = NOCPU; return (1); } @@ -292,28 +309,60 @@ suspend_cpus(cpuset_t map) * 0: NA * 1: ok */ -int -restart_cpus(cpuset_t map) +static int +generic_restart_cpus(cpuset_t map, u_int type) { #ifdef KTR char cpusetbuf[CPUSETBUFSIZ]; #endif + volatile cpuset_t *cpus; + + KASSERT( +#if defined(__amd64__) || defined(__i386__) + type == IPI_STOP || type == IPI_STOP_HARD || type == IPI_SUSPEND, +#else + type == IPI_STOP || type == IPI_STOP_HARD, +#endif + ("%s: invalid stop type", __func__)); if (!smp_started) return 0; CTR1(KTR_SMP, "restart_cpus(%s)", cpusetobj_strprint(cpusetbuf, &map)); +#if defined(__amd64__) || defined(__i386__) + if (type == IPI_SUSPEND) + cpus = &suspended_cpus; + else +#endif + cpus = &stopped_cpus; + /* signal other cpus to restart */ CPU_COPY_STORE_REL(&map, &started_cpus); /* wait for each to clear its bit */ - while (CPU_OVERLAP(&stopped_cpus, &map)) + while (CPU_OVERLAP(cpus, &map)) cpu_spinwait(); return 1; } +int +restart_cpus(cpuset_t map) +{ + + return (generic_restart_cpus(map, IPI_STOP)); +} + +#if defined(__amd64__) || defined(__i386__) +int +resume_cpus(cpuset_t map) +{ + + return (generic_restart_cpus(map, IPI_SUSPEND)); +} +#endif + /* * All-CPU rendezvous. CPUs are signalled, all execute the setup function * (if specified), rendezvous, execute the action function (if specified), Modified: head/sys/sys/smp.h ============================================================================== --- head/sys/sys/smp.h Fri Sep 20 04:35:09 2013 (r255725) +++ head/sys/sys/smp.h Fri Sep 20 05:06:03 2013 (r255726) @@ -166,6 +166,7 @@ int stop_cpus(cpuset_t); int stop_cpus_hard(cpuset_t); #if defined(__amd64__) || defined(__i386__) int suspend_cpus(cpuset_t); +int resume_cpus(cpuset_t); #endif void smp_rendezvous_action(void); Modified: head/sys/sys/timetc.h ============================================================================== --- head/sys/sys/timetc.h Fri Sep 20 04:35:09 2013 (r255725) +++ head/sys/sys/timetc.h Fri Sep 20 05:06:03 2013 (r255726) @@ -59,6 +59,10 @@ struct timecounter { */ u_int tc_flags; #define TC_FLAGS_C3STOP 1 /* Timer dies in C3. */ +#define TC_FLAGS_SUSPEND_SAFE 2 /* + * Timer functional across + * suspend/resume. + */ void *tc_priv; /* Pointer to the timecounter's private parts. */ Modified: head/sys/x86/acpica/acpi_wakeup.c ============================================================================== --- head/sys/x86/acpica/acpi_wakeup.c Fri Sep 20 04:35:09 2013 (r255725) +++ head/sys/x86/acpica/acpi_wakeup.c Fri Sep 20 05:06:03 2013 (r255726) @@ -266,7 +266,7 @@ acpi_wakeup_machdep(struct acpi_softc *s restart_cpus(suspcpus); #endif mca_resume(); - intr_resume(); + intr_resume(/*suspend_cancelled*/false); AcpiSetFirmwareWakingVector(0); } else { Modified: head/sys/x86/isa/atpic.c ============================================================================== --- head/sys/x86/isa/atpic.c Fri Sep 20 04:35:09 2013 (r255725) +++ head/sys/x86/isa/atpic.c Fri Sep 20 05:06:03 2013 (r255726) @@ -123,7 +123,7 @@ static void atpic_eoi_slave(struct intsr static void atpic_enable_intr(struct intsrc *isrc); static void atpic_disable_intr(struct intsrc *isrc); static int atpic_vector(struct intsrc *isrc); -static void atpic_resume(struct pic *pic); +static void atpic_resume(struct pic *pic, bool suspend_cancelled); static int atpic_source_pending(struct intsrc *isrc); static int atpic_config_intr(struct intsrc *isrc, enum intr_trigger trig, enum intr_polarity pol); @@ -276,7 +276,7 @@ atpic_source_pending(struct intsrc *isrc } static void -atpic_resume(struct pic *pic) +atpic_resume(struct pic *pic, bool suspend_cancelled) { struct atpic *ap = (struct atpic *)pic; Modified: head/sys/x86/x86/intr_machdep.c ============================================================================== --- head/sys/x86/x86/intr_machdep.c Fri Sep 20 04:35:09 2013 (r255725) +++ head/sys/x86/x86/intr_machdep.c Fri Sep 20 05:06:03 2013 (r255726) @@ -279,7 +279,7 @@ intr_execute_handlers(struct intsrc *isr } void -intr_resume(void) +intr_resume(bool suspend_cancelled) { struct pic *pic; @@ -289,7 +289,7 @@ intr_resume(void) mtx_lock(&intr_table_lock); TAILQ_FOREACH(pic, &pics, pics) { if (pic->pic_resume != NULL) - pic->pic_resume(pic); + pic->pic_resume(pic, suspend_cancelled); } mtx_unlock(&intr_table_lock); } Modified: head/sys/x86/x86/io_apic.c ============================================================================== --- head/sys/x86/x86/io_apic.c Fri Sep 20 04:35:09 2013 (r255725) +++ head/sys/x86/x86/io_apic.c Fri Sep 20 05:06:03 2013 (r255726) @@ -119,7 +119,7 @@ static int ioapic_vector(struct intsrc * static int ioapic_source_pending(struct intsrc *isrc); static int ioapic_config_intr(struct intsrc *isrc, enum intr_trigger trig, enum intr_polarity pol); -static void ioapic_resume(struct pic *pic); +static void ioapic_resume(struct pic *pic, bool suspend_cancelled); static int ioapic_assign_cpu(struct intsrc *isrc, u_int apic_id); static void ioapic_program_intpin(struct ioapic_intsrc *intpin); @@ -486,7 +486,7 @@ ioapic_config_intr(struct intsrc *isrc, } static void -ioapic_resume(struct pic *pic) +ioapic_resume(struct pic *pic, bool suspend_cancelled) { struct ioapic *io = (struct ioapic *)pic; int i; Modified: head/sys/x86/x86/local_apic.c ============================================================================== --- head/sys/x86/x86/local_apic.c Fri Sep 20 04:35:09 2013 (r255725) +++ head/sys/x86/x86/local_apic.c Fri Sep 20 05:06:03 2013 (r255726) @@ -161,7 +161,7 @@ static u_long lapic_timer_divisor; static struct eventtimer lapic_et; static void lapic_enable(void); -static void lapic_resume(struct pic *pic); +static void lapic_resume(struct pic *pic, bool suspend_cancelled); static void lapic_timer_oneshot(struct lapic *, u_int count, int enable_int); static void lapic_timer_periodic(struct lapic *, @@ -566,7 +566,7 @@ lapic_enable(void) /* Reset the local APIC on the BSP during resume. */ static void -lapic_resume(struct pic *pic) +lapic_resume(struct pic *pic, bool suspend_cancelled) { lapic_setup(0); Modified: head/sys/x86/xen/hvm.c ============================================================================== --- head/sys/x86/xen/hvm.c Fri Sep 20 04:35:09 2013 (r255725) +++ head/sys/x86/xen/hvm.c Fri Sep 20 05:06:03 2013 (r255726) @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include /*--------------------------- Forward Declarations ---------------------------*/ +#ifdef SMP static driver_filter_t xen_smp_rendezvous_action; static driver_filter_t xen_invltlb; static driver_filter_t xen_invlpg; @@ -70,6 +71,7 @@ static driver_filter_t xen_ipi_bitmap_ha static driver_filter_t xen_cpustop_handler; static driver_filter_t xen_cpususpend_handler; static driver_filter_t xen_cpustophard_handler; +#endif /*---------------------------- Extern Declarations ---------------------------*/ /* Variables used by mp_machdep to perform the MMU related IPIs */ @@ -93,6 +95,12 @@ extern void pmap_lazyfix_action(void); #define IPI_TO_IDX(ipi) ((ipi) - APIC_IPI_INTS) /*-------------------------------- Local Types -------------------------------*/ +enum xen_hvm_init_type { + XEN_HVM_INIT_COLD, + XEN_HVM_INIT_CANCELLED_SUSPEND, + XEN_HVM_INIT_RESUME +}; + struct xen_ipi_handler { driver_filter_t *filter; @@ -104,6 +112,7 @@ enum xen_domain_type xen_domain_type = X static MALLOC_DEFINE(M_XENHVM, "xen_hvm", "Xen HVM PV Support"); +#ifdef SMP static struct xen_ipi_handler xen_ipis[] = { [IPI_TO_IDX(IPI_RENDEZVOUS)] = { xen_smp_rendezvous_action, "r" }, @@ -119,6 +128,7 @@ static struct xen_ipi_handler xen_ipis[] [IPI_TO_IDX(IPI_SUSPEND)] = { xen_cpususpend_handler, "sp" }, [IPI_TO_IDX(IPI_STOP_HARD)] = { xen_cpustophard_handler, "sth" }, }; +#endif /** * If non-zero, the hypervisor has been configured to use a direct @@ -129,13 +139,16 @@ int xen_vector_callback_enabled; /*------------------------------- Per-CPU Data -------------------------------*/ DPCPU_DEFINE(struct vcpu_info, vcpu_local_info); DPCPU_DEFINE(struct vcpu_info *, vcpu_info); +#ifdef SMP DPCPU_DEFINE(xen_intr_handle_t, ipi_handle[nitems(xen_ipis)]); +#endif /*------------------ Hypervisor Access Shared Memory Regions -----------------*/ /** Hypercall table accessed via HYPERVISOR_*_op() methods. */ char *hypercall_stubs; shared_info_t *HYPERVISOR_shared_info; +#ifdef SMP /*---------------------------- XEN PV IPI Handlers ---------------------------*/ /* * This are C clones of the ASM functions found in apic_vector.s @@ -496,6 +509,7 @@ xen_init_ipis(void) /* Set the xen pv ipi ops to replace the native ones */ cpu_ops.ipi_vectored = xen_ipi_vectored; } +#endif /*---------------------- XEN Hypervisor Probe and Setup ----------------------*/ static uint32_t @@ -579,6 +593,9 @@ xen_hvm_set_callback(device_t dev) struct xen_hvm_param xhp; int irq; + if (xen_vector_callback_enabled) + return; + xhp.domid = DOMID_SELF; xhp.index = HVM_PARAM_CALLBACK_IRQ; if (xen_feature(XENFEAT_hvm_callback_vector) != 0) { @@ -637,41 +654,83 @@ xen_hvm_disable_emulated_devices(void) outw(XEN_MAGIC_IOPORT, XMI_UNPLUG_IDE_DISKS|XMI_UNPLUG_NICS); } +static void +xen_hvm_init(enum xen_hvm_init_type init_type) +{ + int error; + int i; + + if (init_type == XEN_HVM_INIT_CANCELLED_SUSPEND) + return; + + error = xen_hvm_init_hypercall_stubs(); + + switch (init_type) { + case XEN_HVM_INIT_COLD: + if (error != 0) + return; + + setup_xen_features(); + break; + case XEN_HVM_INIT_RESUME: + if (error != 0) + panic("Unable to init Xen hypercall stubs on resume"); + break; + default: + panic("Unsupported HVM initialization type"); + } + + /* Clear any stale vcpu_info. */ + CPU_FOREACH(i) + DPCPU_ID_SET(i, vcpu_info, NULL); + + xen_vector_callback_enabled = 0; + xen_domain_type = XEN_HVM_DOMAIN; + xen_hvm_init_shared_info_page(); + xen_hvm_set_callback(NULL); + xen_hvm_disable_emulated_devices(); +} + void xen_hvm_suspend(void) { } void -xen_hvm_resume(void) +xen_hvm_resume(bool suspend_cancelled) { - xen_hvm_init_hypercall_stubs(); - xen_hvm_init_shared_info_page(); + xen_hvm_init(suspend_cancelled ? + XEN_HVM_INIT_CANCELLED_SUSPEND : XEN_HVM_INIT_RESUME); + + /* Register vcpu_info area for CPU#0. */ + xen_hvm_init_cpu(); } static void -xen_hvm_init(void *dummy __unused) +xen_hvm_sysinit(void *arg __unused) { + xen_hvm_init(XEN_HVM_INIT_COLD); +} - if (xen_hvm_init_hypercall_stubs() != 0) - return; - - xen_domain_type = XEN_HVM_DOMAIN; - setup_xen_features(); - xen_hvm_init_shared_info_page(); - xen_hvm_set_callback(NULL); - xen_hvm_disable_emulated_devices(); -} - -void xen_hvm_init_cpu(void) +void +xen_hvm_init_cpu(void) { struct vcpu_register_vcpu_info info; struct vcpu_info *vcpu_info; int cpu, rc; - cpu = PCPU_GET(acpi_id); + if (DPCPU_GET(vcpu_info) != NULL) { + /* + * vcpu_info is already set. We're resuming + * from a failed migration and our pre-suspend + * configuration is still valid. + */ + return; + } + vcpu_info = DPCPU_PTR(vcpu_local_info); + cpu = PCPU_GET(acpi_id); info.mfn = vtophys(vcpu_info) >> PAGE_SHIFT; info.offset = vtophys(vcpu_info) - trunc_page(vtophys(vcpu_info)); @@ -682,6 +741,8 @@ void xen_hvm_init_cpu(void) DPCPU_SET(vcpu_info, vcpu_info); } -SYSINIT(xen_hvm_init, SI_SUB_HYPERVISOR, SI_ORDER_FIRST, xen_hvm_init, NULL); +SYSINIT(xen_hvm_init, SI_SUB_HYPERVISOR, SI_ORDER_FIRST, xen_hvm_sysinit, NULL); +#ifdef SMP SYSINIT(xen_init_ipis, SI_SUB_SMP, SI_ORDER_FIRST, xen_init_ipis, NULL); +#endif SYSINIT(xen_hvm_init_cpu, SI_SUB_INTR, SI_ORDER_FIRST, xen_hvm_init_cpu, NULL); Modified: head/sys/x86/xen/xen_intr.c ============================================================================== --- head/sys/x86/xen/xen_intr.c Fri Sep 20 04:35:09 2013 (r255725) +++ head/sys/x86/xen/xen_intr.c Fri Sep 20 05:06:03 2013 (r255726) @@ -120,7 +120,7 @@ struct xenisrc { #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) static void xen_intr_suspend(struct pic *); -static void xen_intr_resume(struct pic *); +static void xen_intr_resume(struct pic *, bool suspend_cancelled); static void xen_intr_enable_source(struct intsrc *isrc); static void xen_intr_disable_source(struct intsrc *isrc, int eoi); static void xen_intr_eoi_source(struct intsrc *isrc); @@ -334,7 +334,7 @@ xen_intr_release_isrc(struct xenisrc *is evtchn_cpu_mask_port(isrc->xi_cpu, isrc->xi_port); evtchn_cpu_unmask_port(0, isrc->xi_port); - if (isrc->xi_close != 0) { + if (isrc->xi_close != 0 && is_valid_evtchn(isrc->xi_port)) { struct evtchn_close close = { .port = isrc->xi_port }; if (HYPERVISOR_event_channel_op(EVTCHNOP_close, &close)) panic("EVTCHNOP_close failed"); @@ -408,6 +408,7 @@ xen_intr_bind_isrc(struct xenisrc **isrc return (error); } *isrcp = isrc; + evtchn_unmask_port(local_port); return (0); } @@ -571,6 +572,9 @@ xen_intr_init(void *dummy __unused) struct xen_intr_pcpu_data *pcpu; int i; + if (!xen_domain()) + return (0); + mtx_init(&xen_intr_isrc_lock, "xen-irq-lock", NULL, MTX_DEF); /* @@ -602,20 +606,116 @@ xen_intr_suspend(struct pic *unused) { } +static void +xen_rebind_ipi(struct xenisrc *isrc) +{ +#ifdef SMP + int cpu = isrc->xi_cpu; + int acpi_id = pcpu_find(cpu)->pc_acpi_id; + int error; + struct evtchn_bind_ipi bind_ipi = { .vcpu = acpi_id }; + + error = HYPERVISOR_event_channel_op(EVTCHNOP_bind_ipi, + &bind_ipi); + if (error != 0) + panic("unable to rebind xen IPI: %d", error); + + isrc->xi_port = bind_ipi.port; + isrc->xi_cpu = 0; + xen_intr_port_to_isrc[bind_ipi.port] = isrc; + + error = xen_intr_assign_cpu(&isrc->xi_intsrc, + cpu_apic_ids[cpu]); + if (error) + panic("unable to bind xen IPI to CPU#%d: %d", + cpu, error); + + evtchn_unmask_port(bind_ipi.port); +#else + panic("Resume IPI event channel on UP"); +#endif +} + +static void +xen_rebind_virq(struct xenisrc *isrc) +{ + int cpu = isrc->xi_cpu; + int acpi_id = pcpu_find(cpu)->pc_acpi_id; + int error; + struct evtchn_bind_virq bind_virq = { .virq = isrc->xi_virq, + .vcpu = acpi_id }; + + error = HYPERVISOR_event_channel_op(EVTCHNOP_bind_virq, + &bind_virq); + if (error != 0) + panic("unable to rebind xen VIRQ#%d: %d", isrc->xi_virq, error); + + isrc->xi_port = bind_virq.port; + isrc->xi_cpu = 0; + xen_intr_port_to_isrc[bind_virq.port] = isrc; + +#ifdef SMP + error = xen_intr_assign_cpu(&isrc->xi_intsrc, + cpu_apic_ids[cpu]); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Sep 20 07:31:33 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 76985753; Fri, 20 Sep 2013 07:31:33 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 63AED23E8; Fri, 20 Sep 2013 07:31:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8K7VXNM064871; Fri, 20 Sep 2013 07:31:33 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8K7VXCS064870; Fri, 20 Sep 2013 07:31:33 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201309200731.r8K7VXCS064870@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 20 Sep 2013 07:31:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255727 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Sep 2013 07:31:33 -0000 Author: kib Date: Fri Sep 20 07:31:32 2013 New Revision: 255727 URL: http://svnweb.freebsd.org/changeset/base/255727 Log: MFC r255509: Reduce the scope of the proctree_lock. Modified: stable/9/sys/kern/subr_prf.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/subr_prf.c ============================================================================== --- stable/9/sys/kern/subr_prf.c Fri Sep 20 05:06:03 2013 (r255726) +++ stable/9/sys/kern/subr_prf.c Fri Sep 20 07:31:32 2013 (r255727) @@ -151,26 +151,25 @@ uprintf(const char *fmt, ...) PROC_LOCK(p); if ((p->p_flag & P_CONTROLT) == 0) { PROC_UNLOCK(p); - retval = 0; - goto out; + sx_sunlock(&proctree_lock); + return (0); } SESS_LOCK(p->p_session); pca.tty = p->p_session->s_ttyp; SESS_UNLOCK(p->p_session); PROC_UNLOCK(p); if (pca.tty == NULL) { - retval = 0; - goto out; + sx_sunlock(&proctree_lock); + return (0); } pca.flags = TOTTY; pca.p_bufr = NULL; va_start(ap, fmt); tty_lock(pca.tty); + sx_sunlock(&proctree_lock); retval = kvprintf(fmt, putchar, &pca, 10, ap); tty_unlock(pca.tty); va_end(ap); -out: - sx_sunlock(&proctree_lock); return (retval); } @@ -211,6 +210,7 @@ tprintf(struct proc *p, int pri, const c va_start(ap, fmt); if (pca.tty != NULL) tty_lock(pca.tty); + sx_sunlock(&proctree_lock); kvprintf(fmt, putchar, &pca, 10, ap); if (pca.tty != NULL) tty_unlock(pca.tty); @@ -218,7 +218,6 @@ tprintf(struct proc *p, int pri, const c if (sess != NULL) sess_release(sess); msgbuftrigger = 1; - sx_sunlock(&proctree_lock); } /* From owner-svn-src-all@FreeBSD.ORG Fri Sep 20 07:35:08 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CB1E1994; Fri, 20 Sep 2013 07:35:08 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B8893240C; Fri, 20 Sep 2013 07:35:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8K7Z8vU066220; Fri, 20 Sep 2013 07:35:08 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8K7Z8Hk066219; Fri, 20 Sep 2013 07:35:08 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201309200735.r8K7Z8Hk066219@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 20 Sep 2013 07:35:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255728 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Sep 2013 07:35:08 -0000 Author: kib Date: Fri Sep 20 07:35:08 2013 New Revision: 255728 URL: http://svnweb.freebsd.org/changeset/base/255728 Log: MFC r255510: When opening or closing fifo, ensure that the vnode is locked exclusively. Modified: stable/9/sys/kern/vfs_vnops.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/vfs_vnops.c ============================================================================== --- stable/9/sys/kern/vfs_vnops.c Fri Sep 20 07:31:32 2013 (r255727) +++ stable/9/sys/kern/vfs_vnops.c Fri Sep 20 07:35:08 2013 (r255728) @@ -254,6 +254,8 @@ restart: goto bad; } } + if (vp->v_type == VFIFO && VOP_ISLOCKED(vp) != LK_EXCLUSIVE) + vn_lock(vp, LK_UPGRADE | LK_RETRY); if ((error = VOP_OPEN(vp, fmode, cred, td, fp)) != 0) goto bad; @@ -307,7 +309,7 @@ vn_close(vp, flags, file_cred, td) struct mount *mp; int error, lock_flags; - if (!(flags & FWRITE) && vp->v_mount != NULL && + if (vp->v_type != VFIFO && !(flags & FWRITE) && vp->v_mount != NULL && vp->v_mount->mnt_kern_flag & MNTK_EXTENDED_SHARED) lock_flags = LK_SHARED; else From owner-svn-src-all@FreeBSD.ORG Fri Sep 20 07:45:38 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D01FED18; Fri, 20 Sep 2013 07:45:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A47A724A5; Fri, 20 Sep 2013 07:45:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8K7jcsa071752; Fri, 20 Sep 2013 07:45:38 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8K7jcMc071749; Fri, 20 Sep 2013 07:45:38 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201309200745.r8K7jcMc071749@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 20 Sep 2013 07:45:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255729 - in stable/9/sys: kern sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Sep 2013 07:45:38 -0000 Author: kib Date: Fri Sep 20 07:45:37 2013 New Revision: 255729 URL: http://svnweb.freebsd.org/changeset/base/255729 Log: MFC r255527: Use TAILQ instead of STAILQ for kqeueue filedescriptors to ensure constant time removal on kqueue close. Modified: stable/9/sys/kern/kern_event.c stable/9/sys/sys/event.h stable/9/sys/sys/eventvar.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/sys/kern/kern_event.c ============================================================================== --- stable/9/sys/kern/kern_event.c Fri Sep 20 07:35:08 2013 (r255728) +++ stable/9/sys/kern/kern_event.c Fri Sep 20 07:45:37 2013 (r255729) @@ -707,7 +707,7 @@ sys_kqueue(struct thread *td, struct kqu TASK_INIT(&kq->kq_task, 0, kqueue_task, kq); FILEDESC_XLOCK(fdp); - SLIST_INSERT_HEAD(&fdp->fd_kqlist, kq, kq_list); + TAILQ_INSERT_HEAD(&fdp->fd_kqlist, kq, kq_list); FILEDESC_XUNLOCK(fdp); finit(fp, FREAD | FWRITE, DTYPE_KQUEUE, kq, &kqueueops); @@ -1708,7 +1708,7 @@ kqueue_close(struct file *fp, struct thr KQ_UNLOCK(kq); FILEDESC_XLOCK(fdp); - SLIST_REMOVE(&fdp->fd_kqlist, kq, kqueue, kq_list); + TAILQ_REMOVE(&fdp->fd_kqlist, kq, kq_list); FILEDESC_XUNLOCK(fdp); seldrain(&kq->kq_sel); @@ -2044,7 +2044,7 @@ knote_fdclose(struct thread *td, int fd) * We shouldn't have to worry about new kevents appearing on fd * since filedesc is locked. */ - SLIST_FOREACH(kq, &fdp->fd_kqlist, kq_list) { + TAILQ_FOREACH(kq, &fdp->fd_kqlist, kq_list) { KQ_LOCK(kq); again: Modified: stable/9/sys/sys/event.h ============================================================================== --- stable/9/sys/sys/event.h Fri Sep 20 07:35:08 2013 (r255728) +++ stable/9/sys/sys/event.h Fri Sep 20 07:45:37 2013 (r255729) @@ -134,7 +134,7 @@ struct kevent { struct knote; SLIST_HEAD(klist, knote); struct kqueue; -SLIST_HEAD(kqlist, kqueue); +TAILQ_HEAD(kqlist, kqueue); struct knlist { struct klist kl_list; void (*kl_lock)(void *); /* lock function */ Modified: stable/9/sys/sys/eventvar.h ============================================================================== --- stable/9/sys/sys/eventvar.h Fri Sep 20 07:35:08 2013 (r255728) +++ stable/9/sys/sys/eventvar.h Fri Sep 20 07:45:37 2013 (r255729) @@ -41,7 +41,7 @@ struct kqueue { struct mtx kq_lock; int kq_refcnt; - SLIST_ENTRY(kqueue) kq_list; + TAILQ_ENTRY(kqueue) kq_list; TAILQ_HEAD(, knote) kq_head; /* list of pending event */ int kq_count; /* number of pending events */ struct selinfo kq_sel; From owner-svn-src-all@FreeBSD.ORG Fri Sep 20 15:57:51 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3D2EE9F8; Fri, 20 Sep 2013 15:57:51 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 295022FEA; Fri, 20 Sep 2013 15:57:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8KFvpxE052770; Fri, 20 Sep 2013 15:57:51 GMT (envelope-from hiren@svn.freebsd.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8KFvpVp052769; Fri, 20 Sep 2013 15:57:51 GMT (envelope-from hiren@svn.freebsd.org) Message-Id: <201309201557.r8KFvpVp052769@svn.freebsd.org> From: Hiren Panchasara Date: Fri, 20 Sep 2013 15:57:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255730 - head/sbin/etherswitchcfg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Sep 2013 15:57:51 -0000 Author: hiren Date: Fri Sep 20 15:57:50 2013 New Revision: 255730 URL: http://svnweb.freebsd.org/changeset/base/255730 Log: Fix a range check and a display string. Reviewed by: loos Approved by: sbruno (mentor, implicit) Approved by: re (glebius) Modified: head/sbin/etherswitchcfg/etherswitchcfg.c Modified: head/sbin/etherswitchcfg/etherswitchcfg.c ============================================================================== --- head/sbin/etherswitchcfg/etherswitchcfg.c Fri Sep 20 07:45:37 2013 (r255729) +++ head/sbin/etherswitchcfg/etherswitchcfg.c Fri Sep 20 15:57:50 2013 (r255730) @@ -274,7 +274,7 @@ set_vlangroup_vid(struct cfg *cfg, char etherswitch_vlangroup_t vg; v = strtol(argv[1], NULL, 0); - if (v < 0 || v >= IEEE802DOT1Q_VID_MAX) + if (v < 0 || v > IEEE802DOT1Q_VID_MAX) errx(EX_USAGE, "vlan must be between 0 and %d", IEEE802DOT1Q_VID_MAX); vg.es_vlangroup = cfg->unit; if (ioctl(cfg->fd, IOETHERSWITCHGETVLANGROUP, &vg) != 0) @@ -623,7 +623,7 @@ main(int argc, char *argv[]) print_info(&cfg); } else if (sscanf(argv[0], "port%d", &cfg.unit) == 1) { if (cfg.unit < 0 || cfg.unit >= cfg.info.es_nports) - errx(EX_USAGE, "port unit must be between 0 and %d", cfg.info.es_nports); + errx(EX_USAGE, "port unit must be between 0 and %d", cfg.info.es_nports - 1); newmode(&cfg, MODE_PORT); } else if (sscanf(argv[0], "vlangroup%d", &cfg.unit) == 1) { if (cfg.unit < 0 || cfg.unit >= cfg.info.es_nvlangroups) From owner-svn-src-all@FreeBSD.ORG Fri Sep 20 16:05:09 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A794E14D; Fri, 20 Sep 2013 16:05:09 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 955A62092; Fri, 20 Sep 2013 16:05:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8KG59kq063893; Fri, 20 Sep 2013 16:05:09 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8KG59qQ063892; Fri, 20 Sep 2013 16:05:09 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201309201605.r8KG59qQ063892@svn.freebsd.org> From: John Baldwin Date: Fri, 20 Sep 2013 16:05:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255731 - head/usr.bin/protect X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Sep 2013 16:05:09 -0000 Author: jhb Date: Fri Sep 20 16:05:09 2013 New Revision: 255731 URL: http://svnweb.freebsd.org/changeset/base/255731 Log: Correct stale comments. Approved by: re (joel) Modified: head/usr.bin/protect/protect.1 Modified: head/usr.bin/protect/protect.1 ============================================================================== --- head/usr.bin/protect/protect.1 Fri Sep 20 15:57:50 2013 (r255730) +++ head/usr.bin/protect/protect.1 Fri Sep 20 16:05:09 2013 (r255731) @@ -83,9 +83,7 @@ Remove protection from all current and f .Pp .Dl "protect -cdi -p 1" .Sh SEE ALSO -.Xr pprotect 2 +.Xr procctl 2 .Sh BUGS If you protect a runaway process that allocates all memory the system will deadlock. -.Pp -Inheritance of the protected state is not yet implemented. From owner-svn-src-all@FreeBSD.ORG Fri Sep 20 17:06:50 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3CCB5197; Fri, 20 Sep 2013 17:06:50 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2A1AD23C1; Fri, 20 Sep 2013 17:06:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8KH6oFY031312; Fri, 20 Sep 2013 17:06:50 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8KH6naS031309; Fri, 20 Sep 2013 17:06:49 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201309201706.r8KH6naS031309@svn.freebsd.org> From: Neel Natu Date: Fri, 20 Sep 2013 17:06:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255732 - in head/sys: amd64/include vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Sep 2013 17:06:50 -0000 Author: neel Date: Fri Sep 20 17:06:49 2013 New Revision: 255732 URL: http://svnweb.freebsd.org/changeset/base/255732 Log: Merge the following changes from projects/bhyve_npt_pmap: - add fields to 'struct pmap' that are required to manage nested page tables. - add a parameter to 'vmspace_alloc()' that can be used to override the default pmap initialization routine 'pmap_pinit()'. These changes are pushed ahead of the remaining changes in 'bhyve_npt_pmap' in anticipation of the upcoming KBI freeze for 10.0. Reviewed by: kib@, alc@ Approved by: re (glebius) Modified: head/sys/amd64/include/pmap.h head/sys/vm/vm_extern.h head/sys/vm/vm_map.c Modified: head/sys/amd64/include/pmap.h ============================================================================== --- head/sys/amd64/include/pmap.h Fri Sep 20 16:05:09 2013 (r255731) +++ head/sys/amd64/include/pmap.h Fri Sep 20 17:06:49 2013 (r255732) @@ -231,6 +231,12 @@ struct md_page { int pat_mode; }; +enum pmap_type { + PT_X86, /* regular x86 page tables */ + PT_EPT, /* Intel's nested page tables */ + PT_RVI, /* AMD's nested page tables */ +}; + /* * The kernel virtual address (KVA) of the level 4 page table page is always * within the direct map (DMAP) region. @@ -243,9 +249,11 @@ struct pmap { cpuset_t pm_active; /* active on cpus */ cpuset_t pm_save; /* Context valid on cpus mask */ int pm_pcid; /* context id */ - /* spare u_int here due to padding */ + enum pmap_type pm_type; /* regular or nested tables */ struct pmap_statistics pm_stats; /* pmap statistics */ struct vm_radix pm_root; /* spare page table pages */ + long pm_eptgen; /* EPT pmap generation id */ + int pm_flags; }; typedef struct pmap *pmap_t; Modified: head/sys/vm/vm_extern.h ============================================================================== --- head/sys/vm/vm_extern.h Fri Sep 20 16:05:09 2013 (r255731) +++ head/sys/vm/vm_extern.h Fri Sep 20 17:06:49 2013 (r255732) @@ -33,6 +33,7 @@ #ifndef _VM_EXTERN_H_ #define _VM_EXTERN_H_ +struct pmap; struct proc; struct vmspace; struct vnode; @@ -88,7 +89,8 @@ int vm_mmap(vm_map_t, vm_offset_t *, vm_ int vm_mmap_to_errno(int rv); void vm_set_page_size(void); void vm_sync_icache(vm_map_t, vm_offset_t, vm_size_t); -struct vmspace *vmspace_alloc(vm_offset_t, vm_offset_t); +typedef int (*pmap_pinit_t)(struct pmap *pmap); +struct vmspace *vmspace_alloc(vm_offset_t, vm_offset_t, pmap_pinit_t); struct vmspace *vmspace_fork(struct vmspace *, vm_ooffset_t *); int vmspace_exec(struct proc *, vm_offset_t, vm_offset_t); int vmspace_unshare(struct proc *); Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Fri Sep 20 16:05:09 2013 (r255731) +++ head/sys/vm/vm_map.c Fri Sep 20 17:06:49 2013 (r255732) @@ -280,15 +280,22 @@ vm_map_zdtor(void *mem, int size, void * /* * Allocate a vmspace structure, including a vm_map and pmap, * and initialize those structures. The refcnt is set to 1. + * + * If 'pinit' is NULL then the embedded pmap is initialized via pmap_pinit(). */ struct vmspace * -vmspace_alloc(min, max) - vm_offset_t min, max; +vmspace_alloc(vm_offset_t min, vm_offset_t max, pmap_pinit_t pinit) { struct vmspace *vm; vm = uma_zalloc(vmspace_zone, M_WAITOK); - if (vm->vm_map.pmap == NULL && !pmap_pinit(vmspace_pmap(vm))) { + + KASSERT(vm->vm_map.pmap == NULL, ("vm_map.pmap must be NULL")); + + if (pinit == NULL) + pinit = &pmap_pinit; + + if (!pinit(vmspace_pmap(vm))) { uma_zfree(vmspace_zone, vm); return (NULL); } @@ -3157,7 +3164,7 @@ vmspace_fork(struct vmspace *vm1, vm_oof old_map = &vm1->vm_map; /* Copy immutable fields of vm1 to vm2. */ - vm2 = vmspace_alloc(old_map->min_offset, old_map->max_offset); + vm2 = vmspace_alloc(old_map->min_offset, old_map->max_offset, NULL); if (vm2 == NULL) return (NULL); vm2->vm_taddr = vm1->vm_taddr; @@ -3739,7 +3746,7 @@ vmspace_exec(struct proc *p, vm_offset_t struct vmspace *oldvmspace = p->p_vmspace; struct vmspace *newvmspace; - newvmspace = vmspace_alloc(minuser, maxuser); + newvmspace = vmspace_alloc(minuser, maxuser, NULL); if (newvmspace == NULL) return (ENOMEM); newvmspace->vm_swrss = oldvmspace->vm_swrss; From owner-svn-src-all@FreeBSD.ORG Fri Sep 20 17:14:48 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5B8D257F; Fri, 20 Sep 2013 17:14:48 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-we0-x22e.google.com (mail-we0-x22e.google.com [IPv6:2a00:1450:400c:c03::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8192F245D; Fri, 20 Sep 2013 17:14:47 +0000 (UTC) Received: by mail-we0-f174.google.com with SMTP id q58so779862wes.5 for ; Fri, 20 Sep 2013 10:14:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=QLnog2SRKXV8M5uwbKl8o7/6Wj6b8PDi6Q6j4I401jU=; b=uJsHNvGH6V1u+eYChwGb7CfJab8wm+37JtYAC7BLO6OG3naYIPPSMSdUaU9At101co /AMjcDr5lR9KV+L4DwbL6ZwvDarLTSCGbcwqvPWcNOc+QYmQFg6BMS9HKXlF1ouEXZwl A0hJbTOYrg5U8CcMWDjPn6YhKVvBnHgU0LBS4/IFUKLtiIbcDwa0IHH22ab0NEAbcn3/ qURfcezKlQxzq40Wx/g3cG0q2DVwoJ7KGeqTTZ4q9WNopXBbypsCY7jcEK024TFWGQ4J xSEvHbYMNNsba8ev1LqtfH5oBxUnpd74jleMtpaI2DlN5STzH9RNYEGiKpu6NMC2Hvpx 54aA== MIME-Version: 1.0 X-Received: by 10.180.98.105 with SMTP id eh9mr3599461wib.56.1379697285845; Fri, 20 Sep 2013 10:14:45 -0700 (PDT) Sender: pluknet@gmail.com Received: by 10.216.62.5 with HTTP; Fri, 20 Sep 2013 10:14:45 -0700 (PDT) In-Reply-To: <201309201605.r8KG59qQ063892@svn.freebsd.org> References: <201309201605.r8KG59qQ063892@svn.freebsd.org> Date: Fri, 20 Sep 2013 21:14:45 +0400 X-Google-Sender-Auth: YuR0OXPJP6enOI3ByoZcNGdVShc Message-ID: Subject: Re: svn commit: r255731 - head/usr.bin/protect From: Sergey Kandaurov To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Sep 2013 17:14:48 -0000 On 20 September 2013 20:05, John Baldwin wrote: > Author: jhb > Date: Fri Sep 20 16:05:09 2013 > New Revision: 255731 > URL: http://svnweb.freebsd.org/changeset/base/255731 > > Log: > Correct stale comments. > > Approved by: re (joel) > > Modified: > head/usr.bin/protect/protect.1 > > Modified: head/usr.bin/protect/protect.1 > ============================================================================== > --- head/usr.bin/protect/protect.1 Fri Sep 20 15:57:50 2013 (r255730) > +++ head/usr.bin/protect/protect.1 Fri Sep 20 16:05:09 2013 (r255731) > @@ -83,9 +83,7 @@ Remove protection from all current and f > .Pp > .Dl "protect -cdi -p 1" > .Sh SEE ALSO > -.Xr pprotect 2 > +.Xr procctl 2 > .Sh BUGS > If you protect a runaway process that allocates all memory the system will > deadlock. > -.Pp > -Inheritance of the protected state is not yet implemented. I wanted to report you about this stale sentence, but after looking at the change once more now I think it is still relevant. + if (p1->p_flag2 & P2_INHERIT_PROTECTED) { + p2->p_flag |= P_PROTECTED; + p2->p_flag2 |= P2_INHERIT_PROTECTED; + } + The protected state is not really inherited in terms that it is rather explicitly conditionally enabled. Consider the following process state: p1->p_flag != P_PROTECTED p1->p_flag2 == P2_INHERIT_PROTECTED Ok, this is not an option currently because protect_setchild() resets both flags on PPROT_CLEAR. Anyway the following looks more sane to me: if (p1->p_flag2 & P2_INHERIT_PROTECTED) { p2->p_flag |= p1->p_flag & P_PROTECTED; p2->p_flag2 |= P2_INHERIT_PROTECTED; } -- wbr, pluknet From owner-svn-src-all@FreeBSD.ORG Fri Sep 20 18:03:02 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0331D44C; Fri, 20 Sep 2013 18:03:02 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E54772749; Fri, 20 Sep 2013 18:03:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8KI311V023650; Fri, 20 Sep 2013 18:03:01 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8KI31pe023649; Fri, 20 Sep 2013 18:03:01 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201309201803.r8KI31pe023649@svn.freebsd.org> From: Sean Bruno Date: Fri, 20 Sep 2013 18:03:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r255733 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Sep 2013 18:03:02 -0000 Author: sbruno Date: Fri Sep 20 18:03:01 2013 New Revision: 255733 URL: http://svnweb.freebsd.org/changeset/base/255733 Log: Release hiren from mentorship Modified: svnadmin/conf/mentors Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Fri Sep 20 17:06:49 2013 (r255732) +++ svnadmin/conf/mentors Fri Sep 20 18:03:01 2013 (r255733) @@ -18,7 +18,6 @@ carl jimharris cy andre Co-mentor: glebius eri mlaier Co-mentor: thompsa erwin delphij -hiren sbruno jceel wkoszek Co-mentor: cognet jonathan rwatson jwd rmacklem From owner-svn-src-all@FreeBSD.ORG Fri Sep 20 19:25:01 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C9FE9A90; Fri, 20 Sep 2013 19:25:01 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B81C22C2C; Fri, 20 Sep 2013 19:25:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8KJP1Bn089735; Fri, 20 Sep 2013 19:25:01 GMT (envelope-from hiren@svn.freebsd.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8KJP11Q089733; Fri, 20 Sep 2013 19:25:01 GMT (envelope-from hiren@svn.freebsd.org) Message-Id: <201309201925.r8KJP11Q089733@svn.freebsd.org> From: Hiren Panchasara Date: Fri, 20 Sep 2013 19:25:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255734 - head/sbin/etherswitchcfg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Sep 2013 19:25:01 -0000 Author: hiren Date: Fri Sep 20 19:25:01 2013 New Revision: 255734 URL: http://svnweb.freebsd.org/changeset/base/255734 Log: Improve grammar and readability. Reviewed by: sbruno, loos Approved by: re (gjb) Modified: head/sbin/etherswitchcfg/etherswitchcfg.8 Modified: head/sbin/etherswitchcfg/etherswitchcfg.8 ============================================================================== --- head/sbin/etherswitchcfg/etherswitchcfg.8 Fri Sep 20 18:03:01 2013 (r255733) +++ head/sbin/etherswitchcfg/etherswitchcfg.8 Fri Sep 20 19:25:01 2013 (r255734) @@ -1,5 +1,5 @@ .\" $FreeBSD$ -.Dd December 15, 2011 +.Dd September 20, 2013 .Dt ETHERSWITCHCFG 8 .Os .Sh NAME @@ -145,9 +145,9 @@ to indicate that frames on this port are Control file for the ethernet switch driver. .El .Sh EXAMPLES -Configure VLAN group 1 with a VID of 2 and makes ports 0 and 5 members, +Configure VLAN group 1 with a VID of 2 and make ports 0 and 5 its members while excluding all other ports. -Port 5 will send and receive tagged frames, while port 0 will be untagged. +Port 5 will send and receive tagged frames while port 0 will be untagged. Incoming untagged frames on port 0 are assigned to vlangroup1. .Dl # etherswitchcfg vlangroup1 vlan 2 members 0,5t port0 pvid 2 .Sh SEE ALSO From owner-svn-src-all@FreeBSD.ORG Fri Sep 20 20:04:30 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 152C282D; Fri, 20 Sep 2013 20:04:30 +0000 (UTC) (envelope-from davidch@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DD6F52E49; Fri, 20 Sep 2013 20:04:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8KK4TQ0026676; Fri, 20 Sep 2013 20:04:29 GMT (envelope-from davidch@svn.freebsd.org) Received: (from davidch@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8KK4TEZ026675; Fri, 20 Sep 2013 20:04:29 GMT (envelope-from davidch@svn.freebsd.org) Message-Id: <201309202004.r8KK4TEZ026675@svn.freebsd.org> From: David Christensen Date: Fri, 20 Sep 2013 20:04:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r255735 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Sep 2013 20:04:30 -0000 Author: davidch Date: Fri Sep 20 20:04:29 2013 New Revision: 255735 URL: http://svnweb.freebsd.org/changeset/base/255735 Log: Temporary size limit increase for bxe(4) update. Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf ============================================================================== --- svnadmin/conf/sizelimit.conf Fri Sep 20 19:25:01 2013 (r255734) +++ svnadmin/conf/sizelimit.conf Fri Sep 20 20:04:29 2013 (r255735) @@ -36,3 +36,4 @@ rwatson sam stas thompsa +davidch From owner-svn-src-all@FreeBSD.ORG Fri Sep 20 20:18:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6322ABC1; Fri, 20 Sep 2013 20:18:52 +0000 (UTC) (envelope-from davidch@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4EE3A2F13; Fri, 20 Sep 2013 20:18:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8KKIqxW033818; Fri, 20 Sep 2013 20:18:52 GMT (envelope-from davidch@svn.freebsd.org) Received: (from davidch@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8KKIoK0033805; Fri, 20 Sep 2013 20:18:50 GMT (envelope-from davidch@svn.freebsd.org) Message-Id: <201309202018.r8KKIoK0033805@svn.freebsd.org> From: David Christensen Date: Fri, 20 Sep 2013 20:18:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255736 - in head: share/man/man4 sys/amd64/conf sys/conf sys/dev/bxe sys/i386/conf sys/modules/bxe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Sep 2013 20:18:52 -0000 Author: davidch Date: Fri Sep 20 20:18:49 2013 New Revision: 255736 URL: http://svnweb.freebsd.org/changeset/base/255736 Log: Substantial rewrite of bxe(4) to add support for the BCM57712 and BCM578XX controllers. Approved by: re MFC after: 4 weeks Added: head/sys/dev/bxe/57710_init_values.c (contents, props changed) head/sys/dev/bxe/57710_int_offsets.h (contents, props changed) head/sys/dev/bxe/57711_init_values.c (contents, props changed) head/sys/dev/bxe/57711_int_offsets.h (contents, props changed) head/sys/dev/bxe/57712_init_values.c (contents, props changed) head/sys/dev/bxe/57712_int_offsets.h (contents, props changed) head/sys/dev/bxe/bxe.c (contents, props changed) head/sys/dev/bxe/bxe.h (contents, props changed) head/sys/dev/bxe/bxe_dcb.h (contents, props changed) head/sys/dev/bxe/bxe_debug.c (contents, props changed) head/sys/dev/bxe/bxe_elink.c (contents, props changed) head/sys/dev/bxe/bxe_elink.h (contents, props changed) head/sys/dev/bxe/bxe_stats.c (contents, props changed) head/sys/dev/bxe/bxe_stats.h (contents, props changed) head/sys/dev/bxe/ecore_fw_defs.h (contents, props changed) head/sys/dev/bxe/ecore_hsi.h (contents, props changed) head/sys/dev/bxe/ecore_init.h (contents, props changed) head/sys/dev/bxe/ecore_init_ops.h (contents, props changed) head/sys/dev/bxe/ecore_mfw_req.h (contents, props changed) head/sys/dev/bxe/ecore_reg.h (contents, props changed) head/sys/dev/bxe/ecore_sp.c (contents, props changed) head/sys/dev/bxe/ecore_sp.h (contents, props changed) Deleted: head/sys/dev/bxe/bxe_debug.h head/sys/dev/bxe/bxe_fw_defs.h head/sys/dev/bxe/bxe_hsi.h head/sys/dev/bxe/bxe_include.h head/sys/dev/bxe/bxe_init.h head/sys/dev/bxe/bxe_init_values_e1.h head/sys/dev/bxe/bxe_init_values_e1h.h head/sys/dev/bxe/bxe_link.c head/sys/dev/bxe/bxe_link.h head/sys/dev/bxe/bxe_reg.h head/sys/dev/bxe/bxe_self_test.h head/sys/dev/bxe/dump_e1.h head/sys/dev/bxe/dump_e1h.h head/sys/dev/bxe/hw_dump_reg_st.h head/sys/dev/bxe/if_bxe.c head/sys/dev/bxe/if_bxe.h Modified: head/share/man/man4/altq.4 head/share/man/man4/bxe.4 head/share/man/man4/vlan.4 head/sys/amd64/conf/GENERIC head/sys/amd64/conf/NOTES head/sys/conf/NOTES head/sys/conf/files head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/conf/options head/sys/i386/conf/GENERIC head/sys/i386/conf/NOTES head/sys/modules/bxe/Makefile Modified: head/share/man/man4/altq.4 ============================================================================== --- head/share/man/man4/altq.4 Fri Sep 20 20:04:29 2013 (r255735) +++ head/share/man/man4/altq.4 Fri Sep 20 20:18:49 2013 (r255736) @@ -126,6 +126,7 @@ They have been applied to the following .Xr bce 4 , .Xr bfe 4 , .Xr bge 4 , +.Xr bxe 4 , .Xr cas 4 , .Xr cxgbe 4 , .Xr dc 4 , Modified: head/share/man/man4/bxe.4 ============================================================================== --- head/share/man/man4/bxe.4 Fri Sep 20 20:04:29 2013 (r255735) +++ head/share/man/man4/bxe.4 Fri Sep 20 20:18:49 2013 (r255736) @@ -1,35 +1,41 @@ -.\" Copyright (c) 2012 Edward Tomasz Napierala -.\" All rights reserved. +.\" Copyright (c) 2013 Broadcom Corporation. 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. +.\" 3. Neither the name of Broadcom Corporation nor the name of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written consent. .\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND -.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" 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 AUTHORS 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. +.\" 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. .\" .\" $FreeBSD$ .\" -.Dd June 25, 2012 +.Dd April 29, 2012 .Dt BXE 4 .Os .Sh NAME .Nm bxe -.Nd "Broadcom BCM57710/BCM57711/BCM57711E 10Gb Ethernet adapter driver" +.Nd "Broadcom NetXtreme II Ethernet adapter driver for BCM57710 / BCM57711 / +BCM57711E / BCM57712 / BCM57712-MF / BCM57800 / BCM57800-MF / BCM57810 / +BCM57810-MF / BCM57840 / BCM57840-MF 10Gb PCIE Ethernet Network Controllers +and Broadcom NetXtreme II BCM57840 10Gb/20Gb PCIE Ethernet Network Controllers. .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -38,8 +44,8 @@ kernel configuration file: .Cd "device bxe" .Ed .Pp -Alternatively, to load the driver as a -module at boot time, place the following line in +Alternatively, to load the driver as a module at boot time, place the +following line in .Xr loader.conf 5 : .Bd -literal -offset indent if_bxe_load="YES" @@ -47,76 +53,240 @@ if_bxe_load="YES" .Sh DESCRIPTION The .Nm -driver provides support for PCIe 10GbE Ethernet adapters based on -BCM5771x chips. -The driver supports Jumbo Frames, VLAN tagging, IP, UDP and TCP checksum -offload, MSI-X, TCP Segmentation Offload (TSO), Large Receive Offload (LRO), -and Receive Side Steering (RSS). -.Pp -For more information on configuring this device, see -.Xr ifconfig 8 . +driver provides support for PCIe 10Gb Ethernet adapters based on the Broadcom +NetXtreme II family of 10Gb chips. The driver supports Jumbo Frames, VLAN +tagging, checksum offload (IPv4, TCP, UDP, IPv6-TCP, IPv6-UDP), MSI-X +interrupts, TCP Segmentation Offload (TSO), Large Receive Offload (LRO), and +Receive Side Scaling (RSS). .Sh HARDWARE The .Nm -driver provides support for various NICs based on the Broadcom BCM5771x -family of 10GbE Ethernet controller chips, including the -following: +driver provides support for various NICs based on the Broadcom NetXtreme II +family of 10Gb Ethernet controller chips, including the following: .Pp .Bl -bullet -compact .It -Broadcom NetXtreme II BCM57710 10GbE +Broadcom NetXtreme II BCM57710 10Gb +.It +Broadcom NetXtreme II BCM57711 10Gb +.It +Broadcom NetXtreme II BCM57711E 10Gb +.It +Broadcom NetXtreme II BCM57712 10Gb +.It +Broadcom NetXtreme II BCM57712-MF 10Gb +.It +Broadcom NetXtreme II BCM57800 10Gb .It -Broadcom NetXtreme II BCM57711 10GbE +Broadcom NetXtreme II BCM57800-MF 10Gb .It -Broadcom NetXtreme II BCM57711E 10GbE +Broadcom NetXtreme II BCM57810 10Gb +.It +Broadcom NetXtreme II BCM57810-MF 10Gb +.It +Broadcom NetXtreme II BCM57840 10Gb / 20Gb +.It +Broadcom NetXtreme II BCM57840-MF 10Gb .El -.Sh SYSCTL VARIABLES -The following variables are available as both -.Xr sysctl 8 -variables and -.Xr loader 8 -tunables: +.Sh CONFIGURATION +There a number of configuration parameters that can be set to tweak the +driver's behavior. These parameters can be set via the +.Xr loader.conf 5 +file to take affect during the next system boot. The following parameters affect +ALL instances of the driver. .Bl -tag -width indent -.It Va hw.bxe.dcc_enable -Enable HP Flex-10 support. -Allowed values are 0 to disable and 1 to enable. -The default value is 0. -.It Va hw.bxe.tso_enable -Enable TCP Segmentation Offload. -The default value is 1. -.It Va hw.bxe.int_mode -Set interrupt mode. -Allowed values are 0 for IRQ, 1 for MSI/IRQ and 2 for MSI-X/MSI/IRQ. -The default value is 2. +.It Va hw.bxe.debug +DEFAULT = 0 +.br +Sets the default logging level of the driver. See the Diagnostics and Debugging +section below for more details. +.It Va hw.bxe.interrupt_mode +DEFAULT = 2 +.br +Sets the default interrupt mode: 0=IRQ, 1=MSI, 2=MSIX. If set to MSIX and +allocation fails, the driver will roll back and attempt MSI allocation. If MSI +allocation fails, the driver will roll back and attempt fixed level IRQ +allocation. If IRQ allocation fails, then the driver load fails. With MSI/MSIX, +the driver attempts to allocate a vector for each queue in addition to one more +for default processing. .It Va hw.bxe.queue_count -Specify the number of queues that will be used when a multi-queue -RSS mode is selected using bxe_multi_mode. -Allowed values are 0 for Auto or 1 to 16 for fixed number of queues. -The default value is 0. -.It Va hw.bxe.multi_mode -Enable Receive Side Steering. -Allowed values are 0, which disables all multi-queue/packet sorting -algorithms, and 1, which assigns incoming frames to receive queues -according to RSS. -The default value is 0. -.It Va hw.bxe.rx_ticks -Control interrupt coalescing for received frames. -The first frame always causes an interrupt, but subsequent frames -are coalesced until the RX/TX ticks timer value expires and another -interrupt occurs. -The default value is 25. -.It Va hw.bxe.tx_ticks -Control interrupt coalescing for trasmitted frames. -The first frame always causes an interrupt, but subsequent frames -are coalesced until the RX/TX ticks timer value expires and another -interrupt occurs. -The default value is 50. +DEFAULT = 4 +.br +Sets the default number of fast path packet processing queues. Note that one +MSI/MSIX interrupt vector is allocated per-queue. +.It Va hw.bxe.max_rx_bufs +DEFAULT = 0 +.br +Sets the maximum number of receive buffers to allocate per-queue. Zero(0) means +to allocate a receive buffer for every buffer descriptor. By default this +equates to 4080 buffers per-queue which is the maximum value for this config +parameter. +.It Va hw.bxe.hc_rx_ticks +DEFAULT = 25 +.br +Sets the number of ticks for host interrupt coalescing in the receive path. +.It Va hw.bxe.hc_tx_ticks +DEFAULT = 50 +.br +Sets the number of ticks for host interrupt coalescing in the transmit path. +.It Va hw.bxe.rx_budget +DEFAULT = 0xffffffff +.br +Sets the maximum number of receive packets to process in an interrupt. If the +budget is reached then the remaining/pending packets will be processed in a +scheduled taskqueue. +.It Va hw.bxe.max_aggregation_size +DEFAULT = 32768 +.br +Sets the maximum LRO aggregration byte size. The higher the value the more +packets the hardware will aggregate. Maximum is 65K. .It Va hw.bxe.mrrs -Allows to set the PCIe maximum read request size. -Allowed values are -1 for Auto, 0 for 128B, 1 for 256B, 2 for 512B, -and 3 for 1kB. -The default value is -1. +DEFAULT = -1 +.br +Sets the PCI MRRS: -1=Auto, 0=128B, 1=256B, 2=512B, 3=1KB +.It Va hw.bxe.autogreeen +DEFAULT = 0 +.br +Set AutoGrEEEN: 0=HW_DEFAULT, 1=FORCE_ON, 2=FORCE_OFF +.It Va hw.bxe.udp_rss +DEFAULT = 0 +.br +Enable/Disable 4-tuple RSS for UDP: 0=DISABLED, 1=ENABLED .El +.Pp +Special care must be taken when modifying the number of queues and receive +buffers. FreeBSD imposes a limit on the maximum number of +.Xr mbuf 9 +allocations. If buffer allocations fail, the interface initialization will fail +and the interface will not be usable. The driver does not make a best effort +for buffer allocations. It is an all or nothing effort. +.Pp +You can tweak the +.Xr mbuf 9 +allocation limit using +.Xr sysctl 8 +and view the current usage with +.Xr netstat 1 +as follows: +.Bd -literal -offset indent +# netstat -m +# sysctl kern.ipc.nmbclusters +# sysctl kern.ipc.nmbclusters=<#> +.Ed +.Pp +There are additional configuration parameters that can be set on a per-instance +basis to dynamically override the default configuration. The '#' below must be +replaced with the driver instance / interface unit number: +.Bl -tag -width indent +.It Va dev.bxe.#.debug +DEFAULT = 0 +.br +Sets the default logging level of the driver instance. See hw.bxe.debug above and +the Diagnostics and Debugging section below for more details. +.It Va dev.bxe.#.rx_budget +DEFAULT = 0xffffffff +.br +Sets the maximum number of receive packets to process in an interrupt for the +driver instance. See hw.bxe.rx_budget above for more details. +.El +.Pp +Additional items can be configured using +.Xr ifconfig 8 : +.Bl -tag -width indent +.It Va MTU - Maximum Transmission Unit +DEFAULT = 1500 +.br +RANGE = 46-9184 +.br +# ifconfig bxe# mtu +.It Va Promiscuous Mode +DEFAULT = OFF +.br +# ifconfig bxe# [ promisc | -promisc ] +.It Va Rx/Tx Checksum Offload +DEFAULT = RX/TX CSUM ON +.br +Note that the Rx and Tx settings are not independent. +.br +# ifconfig bxe# [ rxcsum | -rxcsum | txcsum | -txcsum ] +.It Va TSO - TCP Segmentation Offload +DEFAULT = ON +.br +# ifconfig bxe# [ tso | -tso | tso6 | -tso6 ] +.It Va LRO - TCP Large Receive Offload +DEFAULT = ON +.br +# ifconfig bxe# [ lro | -lro ] +.El +.Sh DIAGNOSTICS AND DEBUGGING +There are many statistics exposed by +.Nm +via sysctl. +.Pp +To dump the default driver configuration: +.Bd -literal -offset indent +# sysctl -a | grep hw.bxe +.Ed +.Pp +To dump every instance's configuration and detailed statistics: +.Bd -literal -offset indent +# sysctl -a | grep dev.bxe +.Ed +.Pp +To dump information for a single instance (replace the '#' with the driver +instance / interface unit number): +.Bd -literal -offset indent +# sysctl -a | grep dev.bxe.# +.Ed +.Pp +To dump information for all the queues of a single instance: +.Bd -literal -offset indent +# sysctl -a | grep dev.bxe.#.queue +.Ed +.Pp +To dump information for a single queue of a single instance (replace the +additional '#' with the queue number): +.Bd -literal -offset indent +# sysctl -a | grep dev.bxe.#.queue.# +.Ed +.Pp +The +.Nm +driver has the ability to dump a ton of debug messages to the system +log. The default level of logging can be set with the 'hw.bxe.debug' +configuration parameter. Take care with this setting as it can result in too +many logs being dumped. Since this parameter is the default one, it affects +every instance and will dramatically change the timing in the driver. A better +alternative to aid in debugging is to dynamically change the debug level of a +specific instance with the 'dev.bxe.#.debug' configuration parameter. This allows +you to turn on/off logging of various debug groups on-the-fly. +.Pp +The different debug groups that can be toggled are: +.Bd -literal -offset indent +DBG_LOAD 0x00000001 /* load and unload */ +DBG_INTR 0x00000002 /* interrupt handling */ +DBG_SP 0x00000004 /* slowpath handling */ +DBG_STATS 0x00000008 /* stats updates */ +DBG_TX 0x00000010 /* packet transmit */ +DBG_RX 0x00000020 /* packet receive */ +DBG_PHY 0x00000040 /* phy/link handling */ +DBG_IOCTL 0x00000080 /* ioctl handling */ +DBG_MBUF 0x00000100 /* dumping mbuf info */ +DBG_REGS 0x00000200 /* register access */ +DBG_LRO 0x00000400 /* lro processing */ +DBG_ASSERT 0x80000000 /* debug assert */ +DBG_ALL 0xFFFFFFFF /* flying monkeys */ +.Ed +.Pp +For example, to debug an issue in the receive path on bxe0: +.Bd -literal -offset indent +# sysctl dev.bxe.0.debug=0x22 +.Ed +.Pp +When finished turn the logging back off: +.Bd -literal -offset indent +# sysctl dev.bxe.0.debug=0 +.Ed .Sh SEE ALSO .Xr altq 4 , .Xr arp 4 , @@ -124,6 +294,7 @@ The default value is -1. .Xr ng_ether 4 , .Xr vlan 4 , .Xr ifconfig 8 +.Xr netstat 1 .Sh HISTORY The .Nm @@ -133,6 +304,7 @@ device driver first appeared in The .Nm driver was written by -.An Gary Zambrano Aq zambrano@broadcom.com +.An Eric Davis Aq edavis@broadcom.com , +.An David Christensen Aq davidch@broadcom.com , and -.An David Christensen Aq davidch@broadcom.com . +.An Gary Zambrano Aq zambrano@broadcom.com . Modified: head/share/man/man4/vlan.4 ============================================================================== --- head/share/man/man4/vlan.4 Fri Sep 20 20:04:29 2013 (r255735) +++ head/share/man/man4/vlan.4 Fri Sep 20 20:18:49 2013 (r255736) @@ -127,6 +127,7 @@ in hardware: .Xr ale 4 , .Xr bce 4 , .Xr bge 4 , +.Xr bxe 4 , .Xr cxgb 4 , .Xr cxgbe 4 , .Xr em 4 , Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Fri Sep 20 20:04:29 2013 (r255735) +++ head/sys/amd64/conf/GENERIC Fri Sep 20 20:18:49 2013 (r255736) @@ -204,7 +204,7 @@ device ppi # Parallel port interface d device puc # Multi I/O cards and multi-channel UARTs # PCI Ethernet NICs. -device bxe # Broadcom BCM57710/BCM57711/BCM57711E 10Gb Ethernet +device bxe # Broadcom NetXtreme II BCM5771X/BCM578XX 10GbE device de # DEC/Intel DC21x4x (``Tulip'') device em # Intel PRO/1000 Gigabit Ethernet Family device igb # Intel PRO/1000 PCIE Server Gigabit Family @@ -341,8 +341,5 @@ device virtio_blk # VirtIO Block device device virtio_scsi # VirtIO SCSI device device virtio_balloon # VirtIO Memory Balloon device -# HyperV drivers -device hyperv # HyperV drivers - # VMware support device vmx # VMware VMXNET3 Ethernet Modified: head/sys/amd64/conf/NOTES ============================================================================== --- head/sys/amd64/conf/NOTES Fri Sep 20 20:04:29 2013 (r255735) +++ head/sys/amd64/conf/NOTES Fri Sep 20 20:18:49 2013 (r255736) @@ -294,6 +294,8 @@ options DRM_DEBUG # Include debug print # Network interfaces: # +# bxe: Broadcom NetXtreme II (BCM5771X/BCM578XX) PCIe 10Gb Ethernet +# adapters. # ed: Western Digital and SMC 80xx; Novell NE1000 and NE2000; 3Com 3C503 # HP PC Lan+, various PC Card devices # (requires miibus) @@ -313,6 +315,7 @@ options DRM_DEBUG # Include debug print # wpi: Intel 3945ABG Wireless LAN controller # Requires the wpi firmware module +device bxe # Broadcom NetXtreme II BCM5771X/BCM578XX 10GbE device ed # NE[12]000, SMC Ultra, 3c503, DS8390 cards options ED_3C503 options ED_HPP Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Fri Sep 20 20:04:29 2013 (r255735) +++ head/sys/conf/NOTES Fri Sep 20 20:18:49 2013 (r255736) @@ -1895,7 +1895,7 @@ device xmphy # XaQti XMAC II # BCM570x family of controllers, including the 3Com 3c996-T, # the Netgear GA302T, the SysKonnect SK-9D21 and SK-9D41, and # the embedded gigE NICs on Dell PowerEdge 2550 servers. -# bxe: Broadcom NetXtreme II (BCM57710/57711/57711E) PCIe 10b Ethernet +# bxe: Broadcom NetXtreme II (BCM5771X/BCM578XX) PCIe 10Gb Ethernet # adapters. # bwi: Broadcom BCM430* and BCM431* family of wireless adapters. # bwn: Broadcom BCM43xx family of wireless adapters. @@ -2080,7 +2080,6 @@ device wb # Winbond W89C840F device xl # 3Com 3c90x (``Boomerang'', ``Cyclone'') # PCI Ethernet NICs. -device bxe # Broadcom BCM57710/BCM57711/BCM57711E 10Gb Ethernet device cxgbe # Chelsio T4 10GbE PCIe adapter device de # DEC/Intel DC21x4x (``Tulip'') device em # Intel Pro/1000 Gigabit Ethernet Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Fri Sep 20 20:04:29 2013 (r255735) +++ head/sys/conf/files Fri Sep 20 20:18:49 2013 (r255736) @@ -1116,8 +1116,6 @@ dev/bwi/if_bwi_pci.c optional bwi pci # XXX Work around clang warning, until maintainer approves fix. dev/bwn/if_bwn.c optional bwn siba_bwn \ compile-with "${NORMAL_C} ${NO_WSOMETIMES_UNINITIALIZED}" -dev/bxe/if_bxe.c optional bxe -dev/bxe/bxe_link.c optional bxe dev/cardbus/cardbus.c optional cardbus dev/cardbus/cardbus_cis.c optional cardbus dev/cardbus/cardbus_device.c optional cardbus Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Fri Sep 20 20:04:29 2013 (r255735) +++ head/sys/conf/files.amd64 Fri Sep 20 20:18:49 2013 (r255736) @@ -166,6 +166,14 @@ dev/atkbdc/atkbdc.c optional atkbdc dev/atkbdc/atkbdc_isa.c optional atkbdc isa dev/atkbdc/atkbdc_subr.c optional atkbdc dev/atkbdc/psm.c optional psm atkbdc +dev/bxe/bxe.c optional bxe pci +dev/bxe/bxe_stats.c optional bxe pci +dev/bxe/bxe_debug.c optional bxe pci +dev/bxe/ecore_sp.c optional bxe pci +dev/bxe/bxe_elink.c optional bxe pci +dev/bxe/57710_init_values.c optional bxe pci +dev/bxe/57711_init_values.c optional bxe pci +dev/bxe/57712_init_values.c optional bxe pci dev/coretemp/coretemp.c optional coretemp dev/cpuctl/cpuctl.c optional cpuctl dev/dpms/dpms.c optional dpms Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Fri Sep 20 20:04:29 2013 (r255735) +++ head/sys/conf/files.i386 Fri Sep 20 20:18:49 2013 (r255736) @@ -156,6 +156,14 @@ dev/atkbdc/atkbdc.c optional atkbdc dev/atkbdc/atkbdc_isa.c optional atkbdc isa dev/atkbdc/atkbdc_subr.c optional atkbdc dev/atkbdc/psm.c optional psm atkbdc +dev/bxe/bxe.c optional bxe pci +dev/bxe/bxe_stats.c optional bxe pci +dev/bxe/bxe_debug.c optional bxe pci +dev/bxe/ecore_sp.c optional bxe pci +dev/bxe/bxe_elink.c optional bxe pci +dev/bxe/57710_init_values.c optional bxe pci +dev/bxe/57711_init_values.c optional bxe pci +dev/bxe/57712_init_values.c optional bxe pci dev/ce/ceddk.c optional ce dev/ce/if_ce.c optional ce dev/ce/tau32-ddk.c optional ce \ Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Fri Sep 20 20:04:29 2013 (r255735) +++ head/sys/conf/options Fri Sep 20 20:18:49 2013 (r255736) @@ -711,10 +711,6 @@ ED_SIC opt_ed.h BCE_DEBUG opt_bce.h BCE_NVRAM_WRITE_SUPPORT opt_bce.h -# bxe driver -BXE_DEBUG opt_bxe.h -BXE_NVRAM_WRITE_SUPPORT opt_bxe.h - SOCKBUF_DEBUG opt_global.h Added: head/sys/dev/bxe/57710_init_values.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/bxe/57710_init_values.c Fri Sep 20 20:18:49 2013 (r255736) @@ -0,0 +1,29161 @@ +/*- + * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved. + * + * Eric Davis + * David Christensen + * Gary Zambrano + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of Broadcom Corporation nor the name of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written consent. + * + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + + +/* +* This file contains an array of operations needed to initialize the chip: +* OP_WR - write a single register. +* OP_RD - read a single register. +* OP_SW - write an array to consecutive registers. +* OP_WB - write an array using DMAE. +* OP_ZR - clear consecutive registers. +* OP_WB_ZR - clear consecutive registers using DMAE. +* OP_ZP - unzip and write an array using DMAE. +* OP_WR_64 - write a 64-bit pattern to consecutive registers. +* OP_IF_MODE_OR - skip next ops if all modes do not match. +* OP_IF_MODE_AND - skip next ops if at least one mode does not match. +*/ +#include "bxe.h" + +#include "ecore_init.h" + +#ifdef __SunOS +#define const +#endif + +static const struct raw_op init_ops_e1[] = { +/* #define BRB1_COMMON_START 22 */ + {OP_WR, 0x600dc, 0x1}, + {OP_SW, 0x61000, 0x2000000}, + {OP_RD, 0x600d8, 0x0}, + {OP_SW, 0x60200, 0x30200}, + {OP_WR, 0x600dc, 0x0}, +/* #define BRB1_COMMON_END 23 */ +/* #define BRB1_PORT0_START 24 */ + {OP_WR, 0x60068, 0xb8}, + {OP_WR, 0x60078, 0x114}, + {OP_RD, 0x600b8, 0x0}, + {OP_RD, 0x600c8, 0x0}, +/* #define BRB1_PORT0_END 25 */ +/* #define BRB1_PORT1_START 26 */ + {OP_WR, 0x6006c, 0xb8}, + {OP_WR, 0x6007c, 0x114}, + {OP_RD, 0x600bc, 0x0}, + {OP_RD, 0x600cc, 0x0}, +/* #define BRB1_PORT1_END 27 */ +/* #define CCM_COMMON_START 44 */ + {OP_WR, 0xd0044, 0x32}, + {OP_SW, 0xd004c, 0x40203}, + {OP_ZR, 0xd005c, 0x4}, + {OP_SW, 0xd008c, 0x110207}, + {OP_WR, 0xd015c, 0x1}, + {OP_SW, 0xd0164, 0x20218}, + {OP_WR, 0xd0204, 0x1}, + {OP_SW, 0xd020c, 0x3021a}, + {OP_SW, 0xd0220, 0x2021d}, + {OP_ZR, 0xd0280, 0x12}, + {OP_SW, 0xd0300, 0x18021f}, + {OP_ZR, 0xd0360, 0xc}, + {OP_ZR, 0xd4000, 0xa00}, + {OP_SW, 0xd0004, 0xf0237}, +/* #define CCM_COMMON_END 45 */ +/* #define CCM_PORT0_START 46 */ + {OP_WR, 0xd0114, 0xd}, +/* #define CCM_PORT0_END 47 */ +/* #define CCM_PORT1_START 48 */ + {OP_WR, 0xd0118, 0x2d}, +/* #define CCM_PORT1_END 49 */ +/* #define CDU_COMMON_START 66 */ + {OP_SW, 0x101000, 0x30246}, + {OP_WR, 0x101010, 0x264}, + {OP_WB, 0x101100, 0x100249}, + {OP_WB_ZR, 0x101140, 0x8}, + {OP_WB, 0x101160, 0x100259}, + {OP_WB_ZR, 0x1011a0, 0x18}, + {OP_WB, 0x101800, 0x2000269}, + {OP_WR, 0x101010, 0x0}, +/* #define CDU_COMMON_END 67 */ +/* #define CFC_COMMON_START 88 */ + {OP_ZR, 0x104c00, 0x100}, + {OP_WR, 0x104028, 0x10}, + {OP_WR, 0x104044, 0x3fff}, + {OP_WR, 0x104058, 0x280000}, + {OP_WR, 0x104084, 0x84924a}, + {OP_WR, 0x104058, 0x0}, +/* #define CFC_COMMON_END 89 */ +/* #define CSDM_COMMON_START 110 */ + {OP_SW, 0xc2008, 0x30469}, + {OP_SW, 0xc201c, 0x4046c}, + {OP_SW, 0xc2038, 0x110470}, + {OP_ZR, 0xc207c, 0x4f}, + {OP_SW, 0xc21b8, 0x110481}, + {OP_ZR, 0xc21fc, 0xf}, + {OP_SW, 0xc2238, 0x40492}, + {OP_RD, 0xc2248, 0x0}, + {OP_RD, 0xc224c, 0x0}, + {OP_RD, 0xc2250, 0x0}, + {OP_RD, 0xc2254, 0x0}, + {OP_RD, 0xc2258, 0x0}, + {OP_RD, 0xc225c, 0x0}, + {OP_RD, 0xc2260, 0x0}, + {OP_RD, 0xc2264, 0x0}, + {OP_RD, 0xc2268, 0x0}, + {OP_RD, 0xc226c, 0x0}, + {OP_RD, 0xc2270, 0x0}, + {OP_RD, 0xc2274, 0x0}, + {OP_RD, 0xc2278, 0x0}, + {OP_RD, 0xc227c, 0x0}, + {OP_WR, 0xc24bc, 0x1}, + {OP_IF_MODE_AND, 1, 0x1}, /* asic */ + {OP_WR, 0xc2000, 0x3e8}, + {OP_IF_MODE_AND, 1, 0x2}, /* fpga */ + {OP_WR, 0xc2000, 0xa}, + {OP_IF_MODE_AND, 1, 0x4}, /* emul */ + {OP_WR, 0xc2000, 0x1}, +/* #define CSDM_COMMON_END 111 */ +/* #define CSEM_COMMON_START 132 */ + {OP_FW, 0x200400, 0xe00000}, + {OP_WR_64, 0x200780, 0x100496}, + {OP_ZR, 0x220000, 0x1600}, + {OP_ZR, 0x228000, 0x40}, + {OP_ZR, 0x223bd0, 0x8}, + {OP_ZR, 0x224800, 0x6}, + {OP_SW, 0x224818, 0x40498}, + {OP_ZR, 0x224828, 0xc}, + {OP_SW, 0x224858, 0x4049c}, + {OP_ZR, 0x224868, 0xc}, + {OP_SW, 0x224898, 0x404a0}, + {OP_ZR, 0x2248a8, 0xc}, + {OP_SW, 0x2248d8, 0x404a4}, + {OP_ZR, 0x2248e8, 0xc}, + {OP_SW, 0x224918, 0x404a8}, + {OP_ZR, 0x224928, 0xc}, + {OP_SW, 0x224958, 0x404ac}, + {OP_ZR, 0x224968, 0xc}, + {OP_SW, 0x224998, 0x404b0}, + {OP_ZR, 0x2249a8, 0xc}, + {OP_SW, 0x2249d8, 0x404b4}, + {OP_ZR, 0x2249e8, 0xc}, + {OP_SW, 0x224a18, 0x404b8}, + {OP_ZR, 0x224a28, 0xc}, + {OP_SW, 0x224a58, 0x404bc}, + {OP_ZR, 0x224a68, 0xc}, + {OP_SW, 0x224a98, 0x404c0}, + {OP_ZR, 0x224aa8, 0xc}, + {OP_SW, 0x224ad8, 0x404c4}, + {OP_ZR, 0x224ae8, 0xc}, + {OP_SW, 0x224b18, 0x404c8}, + {OP_ZR, 0x224b28, 0xc}, + {OP_SW, 0x224b58, 0x404cc}, + {OP_ZR, 0x224b68, 0xc}, + {OP_SW, 0x224b98, 0x404d0}, + {OP_ZR, 0x224ba8, 0xc}, + {OP_SW, 0x224bd8, 0x404d4}, + {OP_ZR, 0x224be8, 0xc}, + {OP_SW, 0x224c18, 0x404d8}, + {OP_ZR, 0x224c28, 0xc}, + {OP_SW, 0x224c58, 0x404dc}, + {OP_ZR, 0x224c68, 0xc}, + {OP_SW, 0x224c98, 0x404e0}, + {OP_ZR, 0x224ca8, 0xc}, + {OP_SW, 0x224cd8, 0x404e4}, + {OP_ZR, 0x224ce8, 0xc}, + {OP_SW, 0x224d18, 0x404e8}, + {OP_ZR, 0x224d28, 0xc}, + {OP_SW, 0x224d58, 0x404ec}, + {OP_ZR, 0x224d68, 0xc}, + {OP_SW, 0x224d98, 0x404f0}, + {OP_ZR, 0x224da8, 0xc}, + {OP_SW, 0x224dd8, 0x404f4}, + {OP_ZR, 0x224de8, 0xc}, + {OP_SW, 0x224e18, 0x404f8}, + {OP_ZR, 0x224e28, 0xc}, + {OP_SW, 0x224e58, 0x404fc}, + {OP_ZR, 0x224e68, 0xc}, + {OP_SW, 0x224e98, 0x40500}, + {OP_ZR, 0x224ea8, 0xc}, + {OP_SW, 0x224ed8, 0x40504}, + {OP_ZR, 0x224ee8, 0xc}, + {OP_SW, 0x224f18, 0x40508}, + {OP_ZR, 0x224f28, 0xc}, + {OP_SW, 0x224f58, 0x4050c}, + {OP_ZR, 0x224f68, 0xc}, + {OP_SW, 0x224f98, 0x40510}, + {OP_ZR, 0x224fa8, 0xc}, + {OP_SW, 0x224fd8, 0x40514}, + {OP_ZR, 0x224fe8, 0x6}, + {OP_SW, 0x225198, 0x40518}, + {OP_WR, 0x238000, 0x10}, + {OP_WR, 0x238040, 0x12}, + {OP_WR, 0x238080, 0x30}, + {OP_WR, 0x2380c0, 0xe}, + {OP_WR, 0x238380, 0x7a120}, + {OP_WR, 0x2383c0, 0x1f4}, + {OP_WR, 0x238bc0, 0x1}, + {OP_IF_MODE_AND, 2, 0x1}, /* asic */ + {OP_WR, 0x238300, 0x7a120}, + {OP_WR, 0x238340, 0x1f4}, + {OP_IF_MODE_AND, 2, 0x2}, /* fpga */ + {OP_WR, 0x238300, 0x1388}, + {OP_WR, 0x238340, 0x5}, + {OP_IF_MODE_AND, 2, 0x4}, /* emul */ + {OP_WR, 0x238300, 0x138}, + {OP_WR, 0x238340, 0x0}, + {OP_FW, 0x240000, 0x27300000}, + {OP_WR_64, 0x249cc0, 0x6ace051c}, + {OP_RD, 0x200000, 0x0}, + {OP_RD, 0x200004, 0x0}, + {OP_RD, 0x200008, 0x0}, + {OP_RD, 0x20000c, 0x0}, + {OP_RD, 0x200010, 0x0}, + {OP_RD, 0x200014, 0x0}, + {OP_SW, 0x200020, 0x1a051e}, + {OP_SW, 0x2000a4, 0x20538}, + {OP_WR, 0x200224, 0x0}, + {OP_WR, 0x200234, 0x0}, + {OP_WR, 0x20024c, 0x0}, + {OP_WR, 0x2002e4, 0xffff}, + {OP_WB_ZR, 0x202000, 0x800}, +/* #define CSEM_COMMON_END 133 */ +/* #define CSEM_PORT0_START 134 */ + {OP_ZR, 0x221400, 0x2}, + {OP_ZR, 0x221490, 0x30}, + {OP_ZR, 0x223900, 0x10}, + {OP_ZR, 0x225108, 0x2}, + {OP_ZR, 0x2251a8, 0x6}, +/* #define CSEM_PORT0_END 135 */ +/* #define CSEM_PORT1_START 136 */ + {OP_ZR, 0x221408, 0x2}, + {OP_ZR, 0x221550, 0x30}, + {OP_ZR, 0x223940, 0x10}, + {OP_ZR, 0x225110, 0x2}, + {OP_ZR, 0x2251c0, 0x6}, +/* #define CSEM_PORT1_END 137 */ +/* #define DMAE_COMMON_START 176 */ + {OP_ZR, 0x102400, 0xe0}, + {OP_SW, 0x10201c, 0x2053a}, + {OP_WR, 0x1020c0, 0x1}, + {OP_SW, 0x102004, 0x2053c}, +/* #define DMAE_COMMON_END 177 */ +/* #define DORQ_COMMON_START 198 */ + {OP_WR, 0x170008, 0x2}, + {OP_WR, 0x17002c, 0x3}, + {OP_SW, 0x170038, 0x2053e}, + {OP_SW, 0x170044, 0x60540}, + {OP_SW, 0x170060, 0x50546}, + {OP_SW, 0x170078, 0x2054b}, + {OP_WR, 0x170004, 0xf}, +/* #define DORQ_COMMON_END 199 */ +/* #define HC_COMMON_START 220 */ + {OP_ZR, 0x108068, 0x4}, +/* #define HC_COMMON_END 221 */ +/* #define HC_PORT0_START 222 */ + {OP_WR, 0x108000, 0x1080}, + {OP_ZR, 0x108040, 0x2}, + {OP_ZR, 0x108028, 0x2}, + {OP_WR, 0x108038, 0x10}, + {OP_SW, 0x108040, 0x2054d}, + {OP_WR, 0x108050, 0x0}, + {OP_WR, 0x108100, 0x0}, + {OP_ZR, 0x108120, 0x2}, + {OP_WR, 0x108008, 0x2b5}, + {OP_WR, 0x108010, 0x0}, + {OP_WR, 0x108108, 0x1ffff}, + {OP_ZR, 0x108200, 0x4a}, + {OP_ZR, 0x108140, 0x2}, + {OP_WR, 0x108000, 0x1a80}, + {OP_ZR, 0x109000, 0x24}, + {OP_ZR, 0x109120, 0x4a}, + {OP_ZR, 0x109370, 0x4a}, + {OP_ZR, 0x1095c0, 0x4a}, +/* #define HC_PORT0_END 223 */ +/* #define HC_PORT1_START 224 */ + {OP_WR, 0x108004, 0x1080}, + {OP_ZR, 0x108048, 0x2}, + {OP_ZR, 0x108030, 0x2}, + {OP_WR, 0x10803c, 0x10}, + {OP_SW, 0x108048, 0x2054f}, + {OP_WR, 0x108054, 0x0}, + {OP_WR, 0x108104, 0x0}, + {OP_ZR, 0x108128, 0x2}, + {OP_WR, 0x10800c, 0x2b5}, + {OP_WR, 0x108014, 0x0}, + {OP_WR, 0x10810c, 0x1ffff}, + {OP_ZR, 0x108400, 0x4a}, + {OP_ZR, 0x108148, 0x2}, + {OP_WR, 0x108004, 0x1a80}, + {OP_ZR, 0x109090, 0x24}, + {OP_ZR, 0x109248, 0x4a}, + {OP_ZR, 0x109498, 0x4a}, + {OP_ZR, 0x1096e8, 0x4a}, +/* #define HC_PORT1_END 225 */ +/* #define MISC_COMMON_START 264 */ + {OP_WR, 0xa468, 0xaffdc}, + {OP_WR, 0xa280, 0x1}, + {OP_SW, 0xa294, 0x40551}, + {OP_WR, 0xa4fc, 0xff000000}, +/* #define MISC_COMMON_END 265 */ +/* #define NIG_COMMON_START 286 */ + {OP_SW, 0x100b4, 0x20555}, + {OP_WR, 0x100dc, 0x1}, + {OP_SW, 0x10100, 0x20557}, +/* #define NIG_COMMON_END 287 */ +/* #define NIG_PORT0_START 288 */ + {OP_WR, 0x1007c, 0x300000}, + {OP_WR, 0x10084, 0x28}, + {OP_WR, 0x1008c, 0x0}, + {OP_WR, 0x10130, 0x4}, + {OP_ZR, 0x10138, 0x11}, + {OP_WR, 0x10328, 0x0}, + {OP_WR, 0x10554, 0x30}, + {OP_WR, 0x100c4, 0x1}, + {OP_WR, 0x100cc, 0x1}, + {OP_WR, 0x100f8, 0x1}, + {OP_WR, 0x100f0, 0x1}, +/* #define NIG_PORT0_END 289 */ +/* #define NIG_PORT1_START 290 */ + {OP_WR, 0x10080, 0x300000}, + {OP_WR, 0x10088, 0x28}, + {OP_WR, 0x10090, 0x0}, + {OP_WR, 0x10134, 0x4}, + {OP_ZR, 0x1017c, 0x11}, + {OP_WR, 0x1032c, 0x0}, + {OP_WR, 0x10564, 0x30}, + {OP_WR, 0x100c8, 0x1}, + {OP_WR, 0x100d0, 0x1}, + {OP_WR, 0x100fc, 0x1}, + {OP_WR, 0x100f4, 0x1}, +/* #define NIG_PORT1_END 291 */ +/* #define PBF_COMMON_START 308 */ + {OP_WR, 0x140000, 0x1}, + {OP_WR, 0x14000c, 0x1}, + {OP_SW, 0x140040, 0x20559}, + {OP_WR, 0x14000c, 0x0}, + {OP_WR, 0x140000, 0x0}, + {OP_WR, 0x14006c, 0x0}, +/* #define PBF_COMMON_END 309 */ +/* #define PBF_PORT0_START 310 */ + {OP_WR, 0x140004, 0x1}, + {OP_WR, 0x140030, 0x1}, + {OP_WR, 0x140004, 0x0}, + {OP_WR, 0x14005c, 0x0}, +/* #define PBF_PORT0_END 311 */ +/* #define PBF_PORT1_START 312 */ + {OP_WR, 0x140008, 0x1}, + {OP_WR, 0x140034, 0x1}, + {OP_WR, 0x140008, 0x0}, + {OP_WR, 0x140060, 0x0}, +/* #define PBF_PORT1_END 313 */ +/* #define PRS_COMMON_START 352 */ + {OP_SW, 0x40004, 0x12055b}, + {OP_SW, 0x40054, 0x3056d}, + {OP_WR, 0x40070, 0x4}, + {OP_SW, 0x40078, 0x40570}, + {OP_ZR, 0x40088, 0x5}, + {OP_SW, 0x4009c, 0x30574}, + {OP_ZR, 0x400a8, 0x4}, + {OP_SW, 0x400b8, 0x50577}, + {OP_ZR, 0x400cc, 0x4}, + {OP_SW, 0x400dc, 0x4057c}, + {OP_ZR, 0x400ec, 0x4}, + {OP_RD, 0x40124, 0x0}, + {OP_RD, 0x40128, 0x0}, + {OP_RD, 0x4012c, 0x0}, + {OP_RD, 0x40130, 0x0}, + {OP_WR, 0x40134, 0xf}, +/* #define PRS_COMMON_END 353 */ +/* #define PXP2_COMMON_START 374 */ + {OP_SW, 0x120490, 0x220580}, + {OP_WR, 0x120520, 0x2}, + {OP_WR, 0x120388, 0x64}, + {OP_WR, 0x120390, 0x8}, + {OP_SW, 0x12039c, 0x305a2}, + {OP_WR, 0x1203bc, 0x4}, + {OP_WR, 0x1203c4, 0x4}, + {OP_WR, 0x1203d0, 0x0}, + {OP_WR, 0x1203dc, 0x0}, + {OP_WR, 0x12036c, 0x1}, + {OP_WR, 0x120368, 0x3f}, + {OP_SW, 0x1201bc, 0x3c05a5}, + {OP_SW, 0x1202b0, 0x205e1}, + {OP_SW, 0x120324, 0x205e3}, + {OP_WR, 0x1201b0, 0x1}, +/* #define PXP2_COMMON_END 375 */ +/* #define PXP_COMMON_START 396 */ + {OP_WB, 0x103800, 0x505e5}, + {OP_WB, 0x103c00, 0x505ea}, + {OP_WB, 0x103c20, 0x505ef}, +/* #define PXP_COMMON_END 397 */ +/* #define QM_COMMON_START 418 */ + {OP_SW, 0x168030, 0x805f4}, + {OP_WR, 0x168054, 0x2}, + {OP_SW, 0x168060, 0x505fc}, + {OP_ZR, 0x168074, 0x7}, + {OP_SW, 0x168090, 0x20601}, + {OP_SW, 0x16809c, 0x50603}, + {OP_ZR, 0x1680b0, 0x7}, + {OP_SW, 0x1680cc, 0x80608}, + {OP_WR, 0x1680f0, 0x7}, + {OP_ZR, 0x1680f4, 0xc}, + {OP_SW, 0x168124, 0x40610}, + {OP_ZR, 0x168134, 0xc}, + {OP_SW, 0x168164, 0x3b0614}, + {OP_ZR, 0x168250, 0x4}, + {OP_SW, 0x168260, 0x2064f}, + {OP_ZR, 0x168268, 0x8}, + {OP_SW, 0x168288, 0x80651}, + {OP_ZR, 0x1682a8, 0xa}, + {OP_WR, 0x168804, 0x4}, + {OP_SW, 0x16880c, 0x100659}, + {OP_WR, 0x1680ec, 0xff}, +/* #define QM_COMMON_END 419 */ +/* #define SRC_COMMON_START 440 */ + {OP_SW, 0x40408, 0x140669}, +/* #define SRC_COMMON_END 441 */ +/* #define TCM_COMMON_START 462 */ + {OP_SW, 0x50044, 0x2067d}, + {OP_SW, 0x50050, 0x4067f}, + {OP_ZR, 0x50060, 0x4}, + {OP_SW, 0x50090, 0x130683}, + {OP_WR, 0x50114, 0x1}, + {OP_SW, 0x5011c, 0x20696}, + {OP_WR, 0x50204, 0x1}, + {OP_SW, 0x5020c, 0x20698}, + {OP_SW, 0x5021c, 0x3069a}, + {OP_ZR, 0x50240, 0xa}, + {OP_SW, 0x50280, 0x20069d}, + {OP_ZR, 0x54000, 0xd00}, + {OP_SW, 0x50004, 0x1006bd}, +/* #define TCM_COMMON_END 463 */ +/* #define TCM_PORT0_START 464 */ + {OP_WR, 0x500e0, 0xe}, +/* #define TCM_PORT0_END 465 */ +/* #define TCM_PORT1_START 466 */ + {OP_WR, 0x500e4, 0x2e}, +/* #define TCM_PORT1_END 467 */ +/* #define TM_COMMON_START 484 */ + {OP_ZR, 0x164024, 0x2}, + {OP_SW, 0x164030, 0x306cd}, + {OP_WR, 0x164044, 0x20}, + {OP_WR, 0x164070, 0x1c}, + {OP_WR, 0x164208, 0x1}, + {OP_WR, 0x164210, 0x1}, + {OP_WR, 0x164220, 0x1}, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Sep 20 20:26:16 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 33646E5D; Fri, 20 Sep 2013 20:26:16 +0000 (UTC) (envelope-from davidch@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 087E72F89; Fri, 20 Sep 2013 20:26:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8KKQFfC038137; Fri, 20 Sep 2013 20:26:15 GMT (envelope-from davidch@svn.freebsd.org) Received: (from davidch@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8KKQF5W038136; Fri, 20 Sep 2013 20:26:15 GMT (envelope-from davidch@svn.freebsd.org) Message-Id: <201309202026.r8KKQF5W038136@svn.freebsd.org> From: David Christensen Date: Fri, 20 Sep 2013 20:26:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r255737 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Sep 2013 20:26:16 -0000 Author: davidch Date: Fri Sep 20 20:26:15 2013 New Revision: 255737 URL: http://svnweb.freebsd.org/changeset/base/255737 Log: Removed my name after completing bxe(4) update. Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf ============================================================================== --- svnadmin/conf/sizelimit.conf Fri Sep 20 20:18:49 2013 (r255736) +++ svnadmin/conf/sizelimit.conf Fri Sep 20 20:26:15 2013 (r255737) @@ -36,4 +36,3 @@ rwatson sam stas thompsa -davidch From owner-svn-src-all@FreeBSD.ORG Fri Sep 20 20:44:33 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2FA64306; Fri, 20 Sep 2013 20:44:33 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0DDE520A6; Fri, 20 Sep 2013 20:44:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8KKiWqh047673; Fri, 20 Sep 2013 20:44:32 GMT (envelope-from zbb@svn.freebsd.org) Received: (from zbb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8KKiWFf047672; Fri, 20 Sep 2013 20:44:32 GMT (envelope-from zbb@svn.freebsd.org) Message-Id: <201309202044.r8KKiWFf047672@svn.freebsd.org> From: Zbigniew Bodek Date: Fri, 20 Sep 2013 20:44:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255738 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Sep 2013 20:44:33 -0000 Author: zbb Date: Fri Sep 20 20:44:32 2013 New Revision: 255738 URL: http://svnweb.freebsd.org/changeset/base/255738 Log: Fix GCC build for all ARMs. Revert bug introduced in r255613. Previous change applied in r255613 fixed build for ARMv6 but broke it for previous architecture revisions. This commit eventually fixes GCC build for all ARM revisions. Approved by: cognet (mentor) Approved by: re (kib) Modified: head/sys/arm/arm/stdatomic.c Modified: head/sys/arm/arm/stdatomic.c ============================================================================== --- head/sys/arm/arm/stdatomic.c Fri Sep 20 20:26:15 2013 (r255737) +++ head/sys/arm/arm/stdatomic.c Fri Sep 20 20:44:32 2013 (r255738) @@ -666,6 +666,30 @@ EMIT_FETCH_AND_OP_4(fetch_and_or, "orr") EMIT_FETCH_AND_OP_4(fetch_and_sub, "sub") EMIT_FETCH_AND_OP_4(fetch_and_xor, "eor") +#ifndef __clang__ +__strong_reference(__sync_lock_test_and_set_1_c, __sync_lock_test_and_set_1); +__strong_reference(__sync_lock_test_and_set_2_c, __sync_lock_test_and_set_2); +__strong_reference(__sync_lock_test_and_set_4_c, __sync_lock_test_and_set_4); +__strong_reference(__sync_val_compare_and_swap_1_c, __sync_val_compare_and_swap_1); +__strong_reference(__sync_val_compare_and_swap_2_c, __sync_val_compare_and_swap_2); +__strong_reference(__sync_val_compare_and_swap_4_c, __sync_val_compare_and_swap_4); +__strong_reference(__sync_fetch_and_add_1_c, __sync_fetch_and_add_1); +__strong_reference(__sync_fetch_and_add_2_c, __sync_fetch_and_add_2); +__strong_reference(__sync_fetch_and_add_4_c, __sync_fetch_and_add_4); +__strong_reference(__sync_fetch_and_and_1_c, __sync_fetch_and_and_1); +__strong_reference(__sync_fetch_and_and_2_c, __sync_fetch_and_and_2); +__strong_reference(__sync_fetch_and_and_4_c, __sync_fetch_and_and_4); +__strong_reference(__sync_fetch_and_sub_1_c, __sync_fetch_and_sub_1); +__strong_reference(__sync_fetch_and_sub_2_c, __sync_fetch_and_sub_2); +__strong_reference(__sync_fetch_and_sub_4_c, __sync_fetch_and_sub_4); +__strong_reference(__sync_fetch_and_or_1_c, __sync_fetch_and_or_1); +__strong_reference(__sync_fetch_and_or_2_c, __sync_fetch_and_or_2); +__strong_reference(__sync_fetch_and_or_4_c, __sync_fetch_and_or_4); +__strong_reference(__sync_fetch_and_xor_1_c, __sync_fetch_and_xor_1); +__strong_reference(__sync_fetch_and_xor_2_c, __sync_fetch_and_xor_2); +__strong_reference(__sync_fetch_and_xor_4_c, __sync_fetch_and_xor_4); +#endif + #else /* __ARM_ARCH_5__ */ #ifdef _KERNEL @@ -834,10 +858,6 @@ EMIT_ALL_OPS_N(1, uint8_t, "ldrb", "strb EMIT_ALL_OPS_N(2, uint16_t, "ldrh", "strh", "streqh") EMIT_ALL_OPS_N(4, uint32_t, "ldr", "str", "streq") -#endif /* _KERNEL */ - -#endif - #ifndef __clang__ __strong_reference(__sync_lock_test_and_set_1_c, __sync_lock_test_and_set_1); __strong_reference(__sync_lock_test_and_set_2_c, __sync_lock_test_and_set_2); @@ -862,4 +882,8 @@ __strong_reference(__sync_fetch_and_xor_ __strong_reference(__sync_fetch_and_xor_4_c, __sync_fetch_and_xor_4); #endif +#endif /* _KERNEL */ + +#endif + #endif /* __SYNC_ATOMICS */ From owner-svn-src-all@FreeBSD.ORG Fri Sep 20 21:26:51 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E530BD15; Fri, 20 Sep 2013 21:26:51 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CE52722F3; Fri, 20 Sep 2013 21:26:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8KLQpqg088860; Fri, 20 Sep 2013 21:26:51 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8KLQpBq088858; Fri, 20 Sep 2013 21:26:51 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201309202126.r8KLQpBq088858@svn.freebsd.org> From: Edward Tomasz Napierala Date: Fri, 20 Sep 2013 21:26:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255739 - in head/sys: cam/ctl dev/iscsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Sep 2013 21:26:52 -0000 Author: trasz Date: Fri Sep 20 21:26:51 2013 New Revision: 255739 URL: http://svnweb.freebsd.org/changeset/base/255739 Log: Add some spare fields to structs used by the new iSCSI stack - some just in case, some for future MC/S support. This requires kernel and world rebuild. Approved by: re (blanket) Sponsored by: FreeBSD Foundation Modified: head/sys/cam/ctl/ctl_ioctl.h head/sys/dev/iscsi/iscsi_ioctl.h Modified: head/sys/cam/ctl/ctl_ioctl.h ============================================================================== --- head/sys/cam/ctl/ctl_ioctl.h Fri Sep 20 20:44:32 2013 (r255738) +++ head/sys/cam/ctl/ctl_ioctl.h Fri Sep 20 21:26:51 2013 (r255739) @@ -662,12 +662,14 @@ struct ctl_iscsi_handoff_params { uint32_t max_burst_length; uint32_t first_burst_length; uint32_t immediate_data; + int spare[4]; }; struct ctl_iscsi_list_params { uint32_t alloc_len; /* passed to kernel */ char *conn_xml; /* filled in kernel */ uint32_t fill_len; /* passed to userland */ + int spare[4]; }; struct ctl_iscsi_logout_params { @@ -677,6 +679,7 @@ struct ctl_iscsi_logout_params { char initiator_addr[CTL_ISCSI_ADDR_LEN]; /* passed to kernel */ int all; /* passed to kernel */ + int spare[4]; }; struct ctl_iscsi_terminate_params { @@ -686,6 +689,7 @@ struct ctl_iscsi_terminate_params { char initiator_addr[CTL_ISCSI_NAME_LEN]; /* passed to kernel */ int all; /* passed to kernel */ + int spare[4]; }; #ifdef ICL_KERNEL_PROXY @@ -696,10 +700,12 @@ struct ctl_iscsi_listen_params { int protocol; struct sockaddr *addr; socklen_t addrlen; + int spare[4]; }; struct ctl_iscsi_accept_params { int connection_id; + int spare[4]; }; struct ctl_iscsi_send_params { @@ -709,6 +715,7 @@ struct ctl_iscsi_send_params { void *spare2; size_t data_segment_len; void *data_segment; + int spare[4]; }; struct ctl_iscsi_receive_params { @@ -718,10 +725,12 @@ struct ctl_iscsi_receive_params { void *spare2; size_t data_segment_len; void *data_segment; + int spare[4]; }; struct ctl_iscsi_close_params { int connection_id; + int spare[4]; }; #endif /* ICL_KERNEL_PROXY */ Modified: head/sys/dev/iscsi/iscsi_ioctl.h ============================================================================== --- head/sys/dev/iscsi/iscsi_ioctl.h Fri Sep 20 20:44:32 2013 (r255738) +++ head/sys/dev/iscsi/iscsi_ioctl.h Fri Sep 20 21:26:51 2013 (r255739) @@ -91,6 +91,9 @@ struct iscsi_session_state { struct iscsi_daemon_request { unsigned int idr_session_id; struct iscsi_session_conf idr_conf; + uint8_t idr_spare_isid[6]; + uint16_t idr_spare_tsih; + uint16_t idr_spare_cid; int idr_spare[4]; }; @@ -99,6 +102,8 @@ struct iscsi_daemon_handoff { int idh_socket; char idh_target_alias[ISCSI_ALIAS_LEN]; uint8_t idh_isid[6]; + uint16_t idr_spare_tsih; + uint16_t idr_spare_cid; uint32_t idh_statsn; int idh_header_digest; int idh_data_digest; @@ -107,11 +112,13 @@ struct iscsi_daemon_handoff { size_t idh_max_data_segment_length; size_t idh_max_burst_length; size_t idh_first_burst_length; + int idh_spare[4]; }; struct iscsi_daemon_fail { unsigned int idf_session_id; char idf_reason[ISCSI_REASON_LEN]; + int idf_spare[4]; }; #define ISCSIDWAIT _IOR('I', 0x01, struct iscsi_daemon_request) @@ -145,6 +152,7 @@ struct iscsi_daemon_connect { socklen_t idc_from_addrlen; struct sockaddr *idc_to_addr; socklen_t idc_to_addrlen; + int idc_spare[4]; }; struct iscsi_daemon_send { @@ -154,6 +162,7 @@ struct iscsi_daemon_send { void *ids_spare2; size_t ids_data_segment_len; void *ids_data_segment; + int ids_spare[4]; }; struct iscsi_daemon_receive { @@ -163,10 +172,12 @@ struct iscsi_daemon_receive { void *idr_spare2; size_t idr_data_segment_len; void *idr_data_segment; + int idr_spare[4]; }; struct iscsi_daemon_close { int idc_session_id; + int idc_spare[4]; }; #define ISCSIDCONNECT _IOWR('I', 0x04, struct iscsi_daemon_connect) @@ -182,16 +193,19 @@ struct iscsi_daemon_close { struct iscsi_session_add { struct iscsi_session_conf isa_conf; + int isa_spare[4]; }; struct iscsi_session_remove { unsigned int isr_session_id; struct iscsi_session_conf isr_conf; + int isr_spare[4]; }; struct iscsi_session_list { unsigned int isl_nentries; struct iscsi_session_state *isl_pstates; + int isl_spare[4]; }; #define ISCSISADD _IOW('I', 0x11, struct iscsi_session_add) From owner-svn-src-all@FreeBSD.ORG Fri Sep 20 21:30:10 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CEBDDEB5; Fri, 20 Sep 2013 21:30:10 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A59BF231A; Fri, 20 Sep 2013 21:30:10 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B317CB943; Fri, 20 Sep 2013 17:30:08 -0400 (EDT) From: John Baldwin To: Sergey Kandaurov Subject: Re: svn commit: r255731 - head/usr.bin/protect Date: Fri, 20 Sep 2013 14:42:39 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <201309201605.r8KG59qQ063892@svn.freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201309201442.39702.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 20 Sep 2013 17:30:08 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Sep 2013 21:30:10 -0000 On Friday, September 20, 2013 1:14:45 pm Sergey Kandaurov wrote: > On 20 September 2013 20:05, John Baldwin wrote: > > Author: jhb > > Date: Fri Sep 20 16:05:09 2013 > > New Revision: 255731 > > URL: http://svnweb.freebsd.org/changeset/base/255731 > > > > Log: > > Correct stale comments. > > > > Approved by: re (joel) > > > > Modified: > > head/usr.bin/protect/protect.1 > > > > Modified: head/usr.bin/protect/protect.1 > > ============================================================================== > > --- head/usr.bin/protect/protect.1 Fri Sep 20 15:57:50 2013 (r255730) > > +++ head/usr.bin/protect/protect.1 Fri Sep 20 16:05:09 2013 (r255731) > > @@ -83,9 +83,7 @@ Remove protection from all current and f > > .Pp > > .Dl "protect -cdi -p 1" > > .Sh SEE ALSO > > -.Xr pprotect 2 > > +.Xr procctl 2 > > .Sh BUGS > > If you protect a runaway process that allocates all memory the system will > > deadlock. > > -.Pp > > -Inheritance of the protected state is not yet implemented. > > I wanted to report you about this stale sentence, but after looking > at the change once more now I think it is still relevant. > > + if (p1->p_flag2 & P2_INHERIT_PROTECTED) { > + p2->p_flag |= P_PROTECTED; > + p2->p_flag2 |= P2_INHERIT_PROTECTED; > + } > + > > The protected state is not really inherited in terms that it is rather > explicitly conditionally enabled. Consider the following process state: > > p1->p_flag != P_PROTECTED > p1->p_flag2 == P2_INHERIT_PROTECTED > > Ok, this is not an option currently because protect_setchild() resets > both flags on PPROT_CLEAR. Anyway the following looks more sane to me: > > if (p1->p_flag2 & P2_INHERIT_PROTECTED) { > p2->p_flag |= p1->p_flag & P_PROTECTED; > p2->p_flag2 |= P2_INHERIT_PROTECTED; > } By design P_PROTECTED is always set if P2_INHERIT_PROTECTED is set. It mimics the way ktrace -i works. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Sep 20 21:51:39 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 991DF8BC; Fri, 20 Sep 2013 21:51:39 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 84FC32497; Fri, 20 Sep 2013 21:51:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8KLpd3n004112; Fri, 20 Sep 2013 21:51:39 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8KLpdC1004111; Fri, 20 Sep 2013 21:51:39 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201309202151.r8KLpdC1004111@svn.freebsd.org> From: Mark Johnston Date: Fri, 20 Sep 2013 21:51:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255740 - stable/9/sys/dev/mfi X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Sep 2013 21:51:39 -0000 Author: markj Date: Fri Sep 20 21:51:38 2013 New Revision: 255740 URL: http://svnweb.freebsd.org/changeset/base/255740 Log: MFC r254742: Hold mfi_io_lock across calls to xpt_rescan() and xpt_alloc_ccb_nowait(). xpt_rescan() expects the SIM lock to be held, and we trip a mtx_assert if the driver initiates multiple rescans in quick succession. Modified: stable/9/sys/dev/mfi/mfi_cam.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/mfi/mfi_cam.c ============================================================================== --- stable/9/sys/dev/mfi/mfi_cam.c Fri Sep 20 21:26:51 2013 (r255739) +++ stable/9/sys/dev/mfi/mfi_cam.c Fri Sep 20 21:51:38 2013 (r255740) @@ -307,17 +307,16 @@ mfip_cam_rescan(struct mfi_softc *sc, ui return; } camsc->state = MFIP_STATE_RESCAN; - mtx_unlock(&sc->mfi_io_lock); ccb = xpt_alloc_ccb_nowait(); if (ccb == NULL) { + mtx_unlock(&sc->mfi_io_lock); device_printf(sc->mfi_dev, "Cannot allocate ccb for bus rescan.\n"); return; } sim = camsc->sim; - mtx_lock(&sc->mfi_io_lock); if (xpt_create_path(&ccb->ccb_h.path, NULL, cam_sim_path(sim), tid, CAM_LUN_WILDCARD) != CAM_REQ_CMP) { xpt_free_ccb(ccb); @@ -326,11 +325,8 @@ mfip_cam_rescan(struct mfi_softc *sc, ui "Cannot create path for bus rescan.\n"); return; } - mtx_unlock(&sc->mfi_io_lock); - xpt_rescan(ccb); - mtx_lock(&sc->mfi_io_lock); camsc->state = MFIP_STATE_NONE; mtx_unlock(&sc->mfi_io_lock); } From owner-svn-src-all@FreeBSD.ORG Fri Sep 20 21:52:33 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 95B27ACE; Fri, 20 Sep 2013 21:52:33 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 82C9C24A6; Fri, 20 Sep 2013 21:52:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8KLqXhI004357; Fri, 20 Sep 2013 21:52:33 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8KLqXo9004356; Fri, 20 Sep 2013 21:52:33 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201309202152.r8KLqXo9004356@svn.freebsd.org> From: Mark Johnston Date: Fri, 20 Sep 2013 21:52:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r255741 - stable/8/sys/dev/mfi X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Sep 2013 21:52:33 -0000 Author: markj Date: Fri Sep 20 21:52:33 2013 New Revision: 255741 URL: http://svnweb.freebsd.org/changeset/base/255741 Log: MFC r254742: Hold mfi_io_lock across calls to xpt_rescan() and xpt_alloc_ccb_nowait(). xpt_rescan() expects the SIM lock to be held, and we trip a mtx_assert if the driver initiates multiple rescans in quick succession. Modified: stable/8/sys/dev/mfi/mfi_cam.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/mfi/ (props changed) Modified: stable/8/sys/dev/mfi/mfi_cam.c ============================================================================== --- stable/8/sys/dev/mfi/mfi_cam.c Fri Sep 20 21:51:38 2013 (r255740) +++ stable/8/sys/dev/mfi/mfi_cam.c Fri Sep 20 21:52:33 2013 (r255741) @@ -321,17 +321,16 @@ mfip_cam_rescan(struct mfi_softc *sc, ui return; } camsc->state = MFIP_STATE_RESCAN; - mtx_unlock(&sc->mfi_io_lock); ccb = xpt_alloc_ccb_nowait(); if (ccb == NULL) { + mtx_unlock(&sc->mfi_io_lock); device_printf(sc->mfi_dev, "Cannot allocate ccb for bus rescan.\n"); return; } sim = camsc->sim; - mtx_lock(&sc->mfi_io_lock); if (xpt_create_path(&ccb->ccb_h.path, xpt_periph, cam_sim_path(sim), tid, CAM_LUN_WILDCARD) != CAM_REQ_CMP) { xpt_free_ccb(ccb); @@ -340,11 +339,8 @@ mfip_cam_rescan(struct mfi_softc *sc, ui "Cannot create path for bus rescan.\n"); return; } - mtx_unlock(&sc->mfi_io_lock); - xpt_rescan(ccb); - mtx_lock(&sc->mfi_io_lock); camsc->state = MFIP_STATE_NONE; mtx_unlock(&sc->mfi_io_lock); } From owner-svn-src-all@FreeBSD.ORG Fri Sep 20 22:00:08 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 65394F3C; Fri, 20 Sep 2013 22:00:08 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 52EC024F5; Fri, 20 Sep 2013 22:00:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8KM08EG008227; Fri, 20 Sep 2013 22:00:08 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8KM08RN008226; Fri, 20 Sep 2013 22:00:08 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201309202200.r8KM08RN008226@svn.freebsd.org> From: Mark Johnston Date: Fri, 20 Sep 2013 22:00:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255743 - stable/9/sys/compat/linux X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Sep 2013 22:00:08 -0000 Author: markj Date: Fri Sep 20 22:00:07 2013 New Revision: 255743 URL: http://svnweb.freebsd.org/changeset/base/255743 Log: MFC r254467: Remove a couple of unused macros. Modified: stable/9/sys/compat/linux/linux_dtrace.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/compat/linux/linux_dtrace.h ============================================================================== --- stable/9/sys/compat/linux/linux_dtrace.h Fri Sep 20 21:53:08 2013 (r255742) +++ stable/9/sys/compat/linux/linux_dtrace.h Fri Sep 20 22:00:07 2013 (r255743) @@ -72,11 +72,6 @@ #define LIN_SDT_PROBE_DEFINE5(a, b, c, d, e, f, g, h) _LIN_SDT_PROBE_DEFINE5(\ LINUX_DTRACE, a, b, c, d, e, f, g, h) -#define _LIN_SDT_PROBE_ARGTYPE(a, b, c, d, e, f) SDT_PROBE_ARGTYPE(a, b,\ - c, d, e, f) -#define LIN_SDT_PROBE_ARGTYPE(a, b, c, d, e) _LIN_SDT_PROBE_ARGTYPE( \ - LINUX_DTRACE, a, b, c, d, e) - #define LIN_SDT_PROBE0(a, b, c) SDT_PROBE1(LINUX_DTRACE, a, b, \ c, 0) #define LIN_SDT_PROBE1(a, b, c, d) SDT_PROBE1(LINUX_DTRACE, a, b, \ From owner-svn-src-all@FreeBSD.ORG Fri Sep 20 22:26:26 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2E6FD562; Fri, 20 Sep 2013 22:26:26 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from anacreon.physics.wisc.edu (unknown [IPv6:2607:f388:101c:0:216:cbff:fe39:3fae]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EB4A32627; Fri, 20 Sep 2013 22:26:25 +0000 (UTC) Received: from anacreon.physics.wisc.edu (localhost [IPv6:::1]) by anacreon.physics.wisc.edu (8.14.7/8.14.7) with ESMTP id r8KMQPfc042664; Fri, 20 Sep 2013 17:26:25 -0500 (CDT) (envelope-from nwhitehorn@freebsd.org) Message-ID: <523CCB91.3030606@freebsd.org> Date: Fri, 20 Sep 2013 17:26:25 -0500 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD powerpc; rv:17.0) Gecko/20130402 Thunderbird/17.0.4 MIME-Version: 1.0 To: Alan Cox Subject: Re: svn commit: r255724 - in head/sys: amd64/amd64 arm/arm i386/i386 i386/xen ia64/ia64 mips/mips powerpc/aim powerpc/booke powerpc/powerpc sparc64/sparc64 vm References: <201309200430.r8K4UJu0067909@svn.freebsd.org> In-Reply-To: <201309200430.r8K4UJu0067909@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Sep 2013 22:26:26 -0000 On 09/19/13 23:30, Alan Cox wrote: > Author: alc > Date: Fri Sep 20 04:30:18 2013 > New Revision: 255724 > URL: http://svnweb.freebsd.org/changeset/base/255724 > > Log: > The pmap function pmap_clear_reference() is no longer used. Remove it. > > pmap_clear_reference() has had exactly one caller in the kernel for > several years, more precisely, since FreeBSD 8. Now, that call no > longer exists. > > Approved by: re (kib) > Sponsored by: EMC / Isilon Storage Division > > > static void > > Modified: head/sys/powerpc/powerpc/pmap_dispatch.c > ============================================================================== > --- head/sys/powerpc/powerpc/pmap_dispatch.c Fri Sep 20 01:55:37 2013 (r255723) > +++ head/sys/powerpc/powerpc/pmap_dispatch.c Fri Sep 20 04:30:18 2013 (r255724) > @@ -116,14 +116,6 @@ pmap_clear_modify(vm_page_t m) > } > > void > -pmap_clear_reference(vm_page_t m) > -{ > - > - CTR2(KTR_PMAP, "%s(%p)", __func__, m); > - MMU_CLEAR_REFERENCE(mmu_obj, m); > -} > - > -void > pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, > vm_size_t len, vm_offset_t src_addr) > { > Could you also clean up the corresponding entry in powerpc/powerpc/mmu_if.m? -Nathan From owner-svn-src-all@FreeBSD.ORG Fri Sep 20 22:58:04 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 26FB4638; Fri, 20 Sep 2013 22:58:04 +0000 (UTC) (envelope-from gibbs@FreeBSD.org) Received: from aslan.scsiguy.com (www.scsiguy.com [70.89.174.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D25C027C3; Fri, 20 Sep 2013 22:58:03 +0000 (UTC) Received: from scottherod-vm.sldomain.com (207-225-98-3.dia.static.qwest.net [207.225.98.3]) (authenticated bits=0) by aslan.scsiguy.com (8.14.7/8.14.5) with ESMTP id r8KMw2Uw061031 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Fri, 20 Sep 2013 16:58:02 -0600 (MDT) (envelope-from gibbs@FreeBSD.org) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Subject: Re: svn commit: r255736 - in head: share/man/man4 sys/amd64/conf sys/conf sys/dev/bxe sys/i386/conf sys/modules/bxe From: "Justin T. Gibbs" In-Reply-To: <201309202018.r8KKIoK0033805@svn.freebsd.org> Date: Fri, 20 Sep 2013 16:57:56 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <966F0AA7-F900-45DD-9297-D4E316E48EAE@FreeBSD.org> References: <201309202018.r8KKIoK0033805@svn.freebsd.org> To: David Christensen X-Mailer: Apple Mail (2.1510) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (aslan.scsiguy.com [70.89.174.89]); Fri, 20 Sep 2013 16:58:02 -0600 (MDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Sep 2013 22:58:04 -0000 On Sep 20, 2013, at 2:18 PM, David Christensen = wrote: > Author: davidch > Date: Fri Sep 20 20:18:49 2013 > New Revision: 255736 > URL: http://svnweb.freebsd.org/changeset/base/255736 >=20 > Log: > Substantial rewrite of bxe(4) to add support for the BCM57712 and > BCM578XX controllers. >=20 > Approved by: re > MFC after: 4 weeks This commit appears to have removed HyperV support from the amd64 = GENERIC kernel config. -- Justin =85 > Modified: head/sys/amd64/conf/GENERIC > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/amd64/conf/GENERIC Fri Sep 20 20:04:29 2013 = (r255735) > +++ head/sys/amd64/conf/GENERIC Fri Sep 20 20:18:49 2013 = (r255736) > @@ -204,7 +204,7 @@ device ppi # Parallel port = interface d > device puc # Multi I/O cards and = multi-channel UARTs >=20 > # PCI Ethernet NICs. > -device bxe # Broadcom = BCM57710/BCM57711/BCM57711E 10Gb Ethernet > +device bxe # Broadcom NetXtreme II = BCM5771X/BCM578XX 10GbE > device de # DEC/Intel DC21x4x (``Tulip'') > device em # Intel PRO/1000 Gigabit = Ethernet Family > device igb # Intel PRO/1000 PCIE Server = Gigabit Family > @@ -341,8 +341,5 @@ device virtio_blk # VirtIO Block = device > device virtio_scsi # VirtIO SCSI device > device virtio_balloon # VirtIO Memory Balloon device >=20 > -# HyperV drivers > -device hyperv # HyperV drivers=20 > - > # VMware support > device vmx # VMware VMXNET3 Ethernet From owner-svn-src-all@FreeBSD.ORG Fri Sep 20 22:59:24 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AE3BA86B; Fri, 20 Sep 2013 22:59:24 +0000 (UTC) (envelope-from gibbs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8D13D27E2; Fri, 20 Sep 2013 22:59:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8KMxORW084881; Fri, 20 Sep 2013 22:59:24 GMT (envelope-from gibbs@svn.freebsd.org) Received: (from gibbs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8KMxMP3084866; Fri, 20 Sep 2013 22:59:22 GMT (envelope-from gibbs@svn.freebsd.org) Message-Id: <201309202259.r8KMxMP3084866@svn.freebsd.org> From: "Justin T. Gibbs" Date: Fri, 20 Sep 2013 22:59:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255744 - in head/sys: amd64/amd64 amd64/conf amd64/include i386/conf i386/i386 i386/include kern x86/xen xen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Sep 2013 22:59:24 -0000 Author: gibbs Date: Fri Sep 20 22:59:22 2013 New Revision: 255744 URL: http://svnweb.freebsd.org/changeset/base/255744 Log: Merge Xen PVHVM support into the GENERIC kernel config for both amd64 and i386. Submitted by: Roger Pau Monné Sponsored by: Citrix Systems R&D Reviewed by: gibbs Approved by: re (blanket Xen) MFC after: 2 weeks sys/amd64/amd64/mp_machdep.c: sys/amd64/include/cpu.h: sys/i386/i386/mp_machdep.c: sys/i386/include/cpu.h: - Introduce two new CPU hooks for initialization and resume purposes. This allows us to get rid of the XENHVM ifdefs in mp_machdep, and also sets some hooks into common code that can be used by other hypervisor implementations. sys/amd64/conf/XENHVM: sys/i386/conf/XENHVM: - Remove these configs now that GENERIC has builtin support for Xen HVM. sys/kern/subr_smp.c: - Make sure there are no pending IPIs when suspending a system. sys/x86/xen/hvm.c: - Add cpu init and resume vectors that are called from mp_machdep using the new hooks. - Only clear the vcpu_info mapping data on resume. It is already clear for the BSP on a cold boot and is set correctly as APs are started. - Gate xen_hvm_init_cpu only to systems running under Xen. sys/x86/xen/xen_intr.c: - Gate the setup of event channels only to systems running under Xen. Deleted: head/sys/amd64/conf/XENHVM head/sys/i386/conf/XENHVM Modified: head/sys/amd64/amd64/mp_machdep.c head/sys/amd64/conf/GENERIC head/sys/amd64/include/cpu.h head/sys/i386/conf/GENERIC head/sys/i386/i386/mp_machdep.c head/sys/i386/include/cpu.h head/sys/kern/subr_smp.c head/sys/x86/xen/hvm.c head/sys/xen/hvm.h Modified: head/sys/amd64/amd64/mp_machdep.c ============================================================================== --- head/sys/amd64/amd64/mp_machdep.c Fri Sep 20 22:00:07 2013 (r255743) +++ head/sys/amd64/amd64/mp_machdep.c Fri Sep 20 22:59:22 2013 (r255744) @@ -71,10 +71,6 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef XENHVM -#include -#endif - #define WARMBOOT_TARGET 0 #define WARMBOOT_OFF (KERNBASE + 0x0467) #define WARMBOOT_SEG (KERNBASE + 0x0469) @@ -161,7 +157,7 @@ int cpu_apic_ids[MAXCPU]; int apic_cpuids[MAX_APIC_ID + 1]; /* Holds pending bitmap based IPIs per CPU */ -static volatile u_int cpu_ipi_pending[MAXCPU]; +volatile u_int cpu_ipi_pending[MAXCPU]; static u_int boot_address; static int cpu_logical; /* logical cpus per core */ @@ -732,10 +728,8 @@ init_secondary(void) /* set up FPU state on the AP */ fpuinit(); -#ifdef XENHVM - /* register vcpu_info area */ - xen_hvm_init_cpu(); -#endif + if (cpu_ops.cpu_init) + cpu_ops.cpu_init(); /* A quick check from sanity claus */ cpuid = PCPU_GET(cpuid); @@ -1466,12 +1460,9 @@ cpususpend_handler(void) { u_int cpu; - cpu = PCPU_GET(cpuid); - -#ifdef XENHVM mtx_assert(&smp_ipi_mtx, MA_NOTOWNED); -#endif + cpu = PCPU_GET(cpuid); if (savectx(susppcbs[cpu])) { ctx_fpusave(susppcbs[cpu]->pcb_fpususpend); wbinvd(); @@ -1490,15 +1481,8 @@ cpususpend_handler(void) while (!CPU_ISSET(cpu, &started_cpus)) ia32_pause(); -#ifdef XENHVM - /* - * Reset pending bitmap IPIs, because Xen doesn't preserve pending - * event channels on migration. - */ - cpu_ipi_pending[cpu] = 0; - /* register vcpu_info area */ - xen_hvm_init_cpu(); -#endif + if (cpu_ops.cpu_resume) + cpu_ops.cpu_resume(); /* Resume MCA and local APIC */ mca_resume(); Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Fri Sep 20 22:00:07 2013 (r255743) +++ head/sys/amd64/conf/GENERIC Fri Sep 20 22:59:22 2013 (r255744) @@ -72,6 +72,7 @@ options KDTRACE_FRAME # Ensure frames options KDTRACE_HOOKS # Kernel DTrace hooks options DDB_CTF # Kernel ELF linker loads CTF data options INCLUDE_CONFIG_FILE # Include this file in kernel +options XENHVM # Include Xen support # Debugging support. Always need this: options KDB # Enable kernel debugger support. @@ -341,5 +342,8 @@ device virtio_blk # VirtIO Block device device virtio_scsi # VirtIO SCSI device device virtio_balloon # VirtIO Memory Balloon device +# Xen support +device xenpci # Generic Xen bus + # VMware support device vmx # VMware VMXNET3 Ethernet Modified: head/sys/amd64/include/cpu.h ============================================================================== --- head/sys/amd64/include/cpu.h Fri Sep 20 22:00:07 2013 (r255743) +++ head/sys/amd64/include/cpu.h Fri Sep 20 22:59:22 2013 (r255744) @@ -61,6 +61,8 @@ * hypervisor environment. */ struct cpu_ops { + void (*cpu_init)(void); + void (*cpu_resume)(void); void (*ipi_vectored)(u_int, int); }; Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Fri Sep 20 22:00:07 2013 (r255743) +++ head/sys/i386/conf/GENERIC Fri Sep 20 22:59:22 2013 (r255744) @@ -72,6 +72,7 @@ options MAC # TrustedBSD MAC Framewor options KDTRACE_HOOKS # Kernel DTrace hooks options DDB_CTF # Kernel ELF linker loads CTF data options INCLUDE_CONFIG_FILE # Include this file in kernel +options XENHVM # Include Xen support # Debugging support. Always need this: options KDB # Enable kernel debugger support. @@ -355,5 +356,8 @@ device virtio_blk # VirtIO Block device device virtio_scsi # VirtIO SCSI device device virtio_balloon # VirtIO Memory Balloon device +# Xen support +device xenpci # Generic Xen bus + # VMware support device vmx # VMware VMXNET3 Ethernet Modified: head/sys/i386/i386/mp_machdep.c ============================================================================== --- head/sys/i386/i386/mp_machdep.c Fri Sep 20 22:00:07 2013 (r255743) +++ head/sys/i386/i386/mp_machdep.c Fri Sep 20 22:59:22 2013 (r255744) @@ -83,10 +83,6 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef XENHVM -#include -#endif - #define WARMBOOT_TARGET 0 #define WARMBOOT_OFF (KERNBASE + 0x0467) #define WARMBOOT_SEG (KERNBASE + 0x0469) @@ -202,7 +198,7 @@ int cpu_apic_ids[MAXCPU]; int apic_cpuids[MAX_APIC_ID + 1]; /* Holds pending bitmap based IPIs per CPU */ -static volatile u_int cpu_ipi_pending[MAXCPU]; +volatile u_int cpu_ipi_pending[MAXCPU]; static u_int boot_address; static int cpu_logical; /* logical cpus per core */ @@ -757,10 +753,8 @@ init_secondary(void) /* set up SSE registers */ enable_sse(); -#ifdef XENHVM - /* register vcpu_info area */ - xen_hvm_init_cpu(); -#endif + if (cpu_ops.cpu_init) + cpu_ops.cpu_init(); #ifdef PAE /* Enable the PTE no-execute bit. */ @@ -1527,12 +1521,9 @@ cpususpend_handler(void) { u_int cpu; - cpu = PCPU_GET(cpuid); - -#ifdef XENHVM mtx_assert(&smp_ipi_mtx, MA_NOTOWNED); -#endif + cpu = PCPU_GET(cpuid); if (savectx(susppcbs[cpu])) { wbinvd(); CPU_SET_ATOMIC(cpu, &suspended_cpus); @@ -1549,15 +1540,8 @@ cpususpend_handler(void) while (!CPU_ISSET(cpu, &started_cpus)) ia32_pause(); -#ifdef XENHVM - /* - * Reset pending bitmap IPIs, because Xen doesn't preserve pending - * event channels on migration. - */ - cpu_ipi_pending[cpu] = 0; - /* register vcpu_info area */ - xen_hvm_init_cpu(); -#endif + if (cpu_ops.cpu_resume) + cpu_ops.cpu_resume(); /* Resume MCA and local APIC */ mca_resume(); Modified: head/sys/i386/include/cpu.h ============================================================================== --- head/sys/i386/include/cpu.h Fri Sep 20 22:00:07 2013 (r255743) +++ head/sys/i386/include/cpu.h Fri Sep 20 22:59:22 2013 (r255744) @@ -61,6 +61,8 @@ * hypervisor environment. */ struct cpu_ops { + void (*cpu_init)(void); + void (*cpu_resume)(void); void (*ipi_vectored)(u_int, int); }; Modified: head/sys/kern/subr_smp.c ============================================================================== --- head/sys/kern/subr_smp.c Fri Sep 20 22:00:07 2013 (r255743) +++ head/sys/kern/subr_smp.c Fri Sep 20 22:59:22 2013 (r255744) @@ -225,17 +225,15 @@ generic_stop_cpus(cpuset_t map, u_int ty CTR2(KTR_SMP, "stop_cpus(%s) with %u type", cpusetobj_strprint(cpusetbuf, &map), type); -#ifdef XENHVM /* - * When migrating a PVHVM domain we need to make sure there are - * no IPIs in progress. IPIs that have been issued, but not - * yet delivered (not pending on a vCPU) will be lost in the - * IPI rebinding process, violating FreeBSD's assumption of - * reliable IPI delivery. + * When suspending, ensure there are are no IPIs in progress. + * IPIs that have been issued, but not yet delivered (e.g. + * not pending on a vCPU when running under virtualization) + * will be lost, violating FreeBSD's assumption of reliable + * IPI delivery. */ if (type == IPI_SUSPEND) mtx_lock_spin(&smp_ipi_mtx); -#endif if (stopping_cpu != PCPU_GET(cpuid)) while (atomic_cmpset_int(&stopping_cpu, NOCPU, @@ -264,10 +262,8 @@ generic_stop_cpus(cpuset_t map, u_int ty } } -#ifdef XENHVM if (type == IPI_SUSPEND) mtx_unlock_spin(&smp_ipi_mtx); -#endif stopping_cpu = NOCPU; return (1); Modified: head/sys/x86/xen/hvm.c ============================================================================== --- head/sys/x86/xen/hvm.c Fri Sep 20 22:00:07 2013 (r255743) +++ head/sys/x86/xen/hvm.c Fri Sep 20 22:59:22 2013 (r255744) @@ -72,6 +72,9 @@ static driver_filter_t xen_cpustop_handl static driver_filter_t xen_cpususpend_handler; static driver_filter_t xen_cpustophard_handler; #endif +static void xen_ipi_vectored(u_int vector, int dest); +static void xen_hvm_cpu_resume(void); +static void xen_hvm_cpu_init(void); /*---------------------------- Extern Declarations ---------------------------*/ /* Variables used by mp_machdep to perform the MMU related IPIs */ @@ -91,6 +94,9 @@ extern pmap_t smp_tlb_pmap; extern void pmap_lazyfix_action(void); #endif +/* Variables used by mp_machdep to perform the bitmap IPI */ +extern volatile u_int cpu_ipi_pending[MAXCPU]; + /*---------------------------------- Macros ----------------------------------*/ #define IPI_TO_IDX(ipi) ((ipi) - APIC_IPI_INTS) @@ -110,6 +116,12 @@ struct xen_ipi_handler /*-------------------------------- Global Data -------------------------------*/ enum xen_domain_type xen_domain_type = XEN_NATIVE; +struct cpu_ops xen_hvm_cpu_ops = { + .ipi_vectored = xen_ipi_vectored, + .cpu_init = xen_hvm_cpu_init, + .cpu_resume = xen_hvm_cpu_resume +}; + static MALLOC_DEFINE(M_XENHVM, "xen_hvm", "Xen HVM PV Support"); #ifdef SMP @@ -462,6 +474,22 @@ xen_ipi_vectored(u_int vector, int dest) } } +/* XEN diverged cpu operations */ +static void +xen_hvm_cpu_resume(void) +{ + u_int cpuid = PCPU_GET(cpuid); + + /* + * Reset pending bitmap IPIs, because Xen doesn't preserve pending + * event channels on migration. + */ + cpu_ipi_pending[cpuid] = 0; + + /* register vcpu_info area */ + xen_hvm_cpu_init(); +} + static void xen_cpu_ipi_init(int cpu) { @@ -490,7 +518,7 @@ xen_cpu_ipi_init(int cpu) } static void -xen_init_ipis(void) +xen_setup_cpus(void) { int i; @@ -507,7 +535,7 @@ xen_init_ipis(void) xen_cpu_ipi_init(i); /* Set the xen pv ipi ops to replace the native ones */ - cpu_ops.ipi_vectored = xen_ipi_vectored; + cpu_ops = xen_hvm_cpu_ops; } #endif @@ -675,15 +703,15 @@ xen_hvm_init(enum xen_hvm_init_type init case XEN_HVM_INIT_RESUME: if (error != 0) panic("Unable to init Xen hypercall stubs on resume"); + + /* Clear stale vcpu_info. */ + CPU_FOREACH(i) + DPCPU_ID_SET(i, vcpu_info, NULL); break; default: panic("Unsupported HVM initialization type"); } - /* Clear any stale vcpu_info. */ - CPU_FOREACH(i) - DPCPU_ID_SET(i, vcpu_info, NULL); - xen_vector_callback_enabled = 0; xen_domain_type = XEN_HVM_DOMAIN; xen_hvm_init_shared_info_page(); @@ -704,7 +732,7 @@ xen_hvm_resume(bool suspend_cancelled) XEN_HVM_INIT_CANCELLED_SUSPEND : XEN_HVM_INIT_RESUME); /* Register vcpu_info area for CPU#0. */ - xen_hvm_init_cpu(); + xen_hvm_cpu_init(); } static void @@ -713,13 +741,16 @@ xen_hvm_sysinit(void *arg __unused) xen_hvm_init(XEN_HVM_INIT_COLD); } -void -xen_hvm_init_cpu(void) +static void +xen_hvm_cpu_init(void) { struct vcpu_register_vcpu_info info; struct vcpu_info *vcpu_info; int cpu, rc; + if (!xen_domain()) + return; + if (DPCPU_GET(vcpu_info) != NULL) { /* * vcpu_info is already set. We're resuming @@ -743,6 +774,6 @@ xen_hvm_init_cpu(void) SYSINIT(xen_hvm_init, SI_SUB_HYPERVISOR, SI_ORDER_FIRST, xen_hvm_sysinit, NULL); #ifdef SMP -SYSINIT(xen_init_ipis, SI_SUB_SMP, SI_ORDER_FIRST, xen_init_ipis, NULL); +SYSINIT(xen_setup_cpus, SI_SUB_SMP, SI_ORDER_FIRST, xen_setup_cpus, NULL); #endif -SYSINIT(xen_hvm_init_cpu, SI_SUB_INTR, SI_ORDER_FIRST, xen_hvm_init_cpu, NULL); +SYSINIT(xen_hvm_cpu_init, SI_SUB_INTR, SI_ORDER_FIRST, xen_hvm_cpu_init, NULL); Modified: head/sys/xen/hvm.h ============================================================================== --- head/sys/xen/hvm.h Fri Sep 20 22:00:07 2013 (r255743) +++ head/sys/xen/hvm.h Fri Sep 20 22:59:22 2013 (r255744) @@ -94,5 +94,4 @@ enum { void xen_hvm_set_callback(device_t); void xen_hvm_suspend(void); void xen_hvm_resume(bool suspend_cancelled); -void xen_hvm_init_cpu(void); #endif /* __XEN_HVM_H__ */ From owner-svn-src-all@FreeBSD.ORG Fri Sep 20 23:06:24 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2D928A15; Fri, 20 Sep 2013 23:06:24 +0000 (UTC) (envelope-from davide@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 19A57284C; Fri, 20 Sep 2013 23:06:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8KN6NwF002610; Fri, 20 Sep 2013 23:06:23 GMT (envelope-from davide@svn.freebsd.org) Received: (from davide@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8KN6Mo3002597; Fri, 20 Sep 2013 23:06:22 GMT (envelope-from davide@svn.freebsd.org) Message-Id: <201309202306.r8KN6Mo3002597@svn.freebsd.org> From: Davide Italiano Date: Fri, 20 Sep 2013 23:06:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255745 - in head/sys: dev/hwpmc kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Sep 2013 23:06:24 -0000 Author: davide Date: Fri Sep 20 23:06:21 2013 New Revision: 255745 URL: http://svnweb.freebsd.org/changeset/base/255745 Log: Fix lc_lock/lc_unlock() support for rmlocks held in shared mode. With current lock classes KPI it was really difficult because there was no way to pass an rmtracker object to the lock/unlock routines. In order to accomplish the task, modify the aforementioned functions so that they can return (or pass as argument) an uinptr_t, which is in the rm case used to hold a pointer to struct rm_priotracker for current thread. As an added bonus, this fixes rm_sleep() in the rm shared case, which right now can communicate priotracker structure between lc_unlock()/lc_lock(). Suggested by: jhb Reviewed by: jhb Approved by: re (delphij) Modified: head/sys/dev/hwpmc/hwpmc_mod.c head/sys/kern/kern_condvar.c head/sys/kern/kern_lock.c head/sys/kern/kern_mutex.c head/sys/kern/kern_rmlock.c head/sys/kern/kern_rwlock.c head/sys/kern/kern_sx.c head/sys/kern/kern_synch.c head/sys/sys/lock.h Modified: head/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_mod.c Fri Sep 20 22:59:22 2013 (r255744) +++ head/sys/dev/hwpmc/hwpmc_mod.c Fri Sep 20 23:06:21 2013 (r255745) @@ -2027,6 +2027,7 @@ pmc_allocate_owner_descriptor(struct pro /* allocate space for N pointers and one descriptor struct */ po = malloc(sizeof(struct pmc_owner), M_PMC, M_WAITOK|M_ZERO); po->po_owner = p; + LIST_INIT(&po->po_pmcs); LIST_INSERT_HEAD(poh, po, po_next); /* insert into hash table */ TAILQ_INIT(&po->po_logbuffers); @@ -2152,6 +2153,7 @@ pmc_allocate_pmc_descriptor(void) struct pmc *pmc; pmc = malloc(sizeof(struct pmc), M_PMC, M_WAITOK|M_ZERO); + LIST_INIT(&pmc->pm_targets); PMCDBG(PMC,ALL,1, "allocate-pmc -> pmc=%p", pmc); Modified: head/sys/kern/kern_condvar.c ============================================================================== --- head/sys/kern/kern_condvar.c Fri Sep 20 22:59:22 2013 (r255744) +++ head/sys/kern/kern_condvar.c Fri Sep 20 23:06:21 2013 (r255745) @@ -97,7 +97,7 @@ _cv_wait(struct cv *cvp, struct lock_obj WITNESS_SAVE_DECL(lock_witness); struct lock_class *class; struct thread *td; - int lock_state; + uintptr_t lock_state; td = curthread; lock_state = 0; @@ -214,7 +214,8 @@ _cv_wait_sig(struct cv *cvp, struct lock WITNESS_SAVE_DECL(lock_witness); struct lock_class *class; struct thread *td; - int lock_state, rval; + uintptr_t lock_state; + int rval; td = curthread; lock_state = 0; Modified: head/sys/kern/kern_lock.c ============================================================================== --- head/sys/kern/kern_lock.c Fri Sep 20 22:59:22 2013 (r255744) +++ head/sys/kern/kern_lock.c Fri Sep 20 23:06:21 2013 (r255745) @@ -142,12 +142,12 @@ static void assert_lockmgr(const struct #ifdef DDB static void db_show_lockmgr(const struct lock_object *lock); #endif -static void lock_lockmgr(struct lock_object *lock, int how); +static void lock_lockmgr(struct lock_object *lock, uintptr_t how); #ifdef KDTRACE_HOOKS static int owner_lockmgr(const struct lock_object *lock, struct thread **owner); #endif -static int unlock_lockmgr(struct lock_object *lock); +static uintptr_t unlock_lockmgr(struct lock_object *lock); struct lock_class lock_class_lockmgr = { .lc_name = "lockmgr", @@ -350,13 +350,13 @@ assert_lockmgr(const struct lock_object } static void -lock_lockmgr(struct lock_object *lock, int how) +lock_lockmgr(struct lock_object *lock, uintptr_t how) { panic("lockmgr locks do not support sleep interlocking"); } -static int +static uintptr_t unlock_lockmgr(struct lock_object *lock) { Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Fri Sep 20 22:59:22 2013 (r255744) +++ head/sys/kern/kern_mutex.c Fri Sep 20 23:06:21 2013 (r255745) @@ -101,14 +101,14 @@ static void assert_mtx(const struct lock #ifdef DDB static void db_show_mtx(const struct lock_object *lock); #endif -static void lock_mtx(struct lock_object *lock, int how); -static void lock_spin(struct lock_object *lock, int how); +static void lock_mtx(struct lock_object *lock, uintptr_t how); +static void lock_spin(struct lock_object *lock, uintptr_t how); #ifdef KDTRACE_HOOKS static int owner_mtx(const struct lock_object *lock, struct thread **owner); #endif -static int unlock_mtx(struct lock_object *lock); -static int unlock_spin(struct lock_object *lock); +static uintptr_t unlock_mtx(struct lock_object *lock); +static uintptr_t unlock_spin(struct lock_object *lock); /* * Lock classes for sleep and spin mutexes. @@ -154,20 +154,20 @@ assert_mtx(const struct lock_object *loc } void -lock_mtx(struct lock_object *lock, int how) +lock_mtx(struct lock_object *lock, uintptr_t how) { mtx_lock((struct mtx *)lock); } void -lock_spin(struct lock_object *lock, int how) +lock_spin(struct lock_object *lock, uintptr_t how) { panic("spin locks can only use msleep_spin"); } -int +uintptr_t unlock_mtx(struct lock_object *lock) { struct mtx *m; @@ -178,7 +178,7 @@ unlock_mtx(struct lock_object *lock) return (0); } -int +uintptr_t unlock_spin(struct lock_object *lock) { Modified: head/sys/kern/kern_rmlock.c ============================================================================== --- head/sys/kern/kern_rmlock.c Fri Sep 20 22:59:22 2013 (r255744) +++ head/sys/kern/kern_rmlock.c Fri Sep 20 23:06:21 2013 (r255745) @@ -77,11 +77,11 @@ static void assert_rm(const struct lock_ #ifdef DDB static void db_show_rm(const struct lock_object *lock); #endif -static void lock_rm(struct lock_object *lock, int how); +static void lock_rm(struct lock_object *lock, uintptr_t how); #ifdef KDTRACE_HOOKS static int owner_rm(const struct lock_object *lock, struct thread **owner); #endif -static int unlock_rm(struct lock_object *lock); +static uintptr_t unlock_rm(struct lock_object *lock); struct lock_class lock_class_rm = { .lc_name = "rm", @@ -118,34 +118,61 @@ assert_rm(const struct lock_object *lock rm_assert((const struct rmlock *)lock, what); } -/* - * These do not support read locks because it would be hard to make - * the tracker work correctly with the current lock_class API as you - * would need to have the tracker pointer available when calling - * rm_rlock() in lock_rm(). - */ static void -lock_rm(struct lock_object *lock, int how) +lock_rm(struct lock_object *lock, uintptr_t how) { struct rmlock *rm; + struct rm_priotracker *tracker; rm = (struct rmlock *)lock; - if (how) + if (how == 0) rm_wlock(rm); -#ifdef INVARIANTS - else - panic("lock_rm called in read mode"); -#endif + else { + tracker = (struct rm_priotracker *)how; + rm_rlock(rm, tracker); + } } -static int +static uintptr_t unlock_rm(struct lock_object *lock) { + struct thread *td; + struct pcpu *pc; struct rmlock *rm; + struct rm_queue *queue; + struct rm_priotracker *tracker; + uintptr_t how; rm = (struct rmlock *)lock; - rm_wunlock(rm); - return (1); + tracker = NULL; + how = 0; + rm_assert(rm, RA_LOCKED | RA_NOTRECURSED); + if (rm_wowned(rm)) + rm_wunlock(rm); + else { + /* + * Find the right rm_priotracker structure for curthread. + * The guarantee about its uniqueness is given by the fact + * we already asserted the lock wasn't recursively acquired. + */ + critical_enter(); + td = curthread; + pc = pcpu_find(curcpu); + for (queue = pc->pc_rm_queue.rmq_next; + queue != &pc->pc_rm_queue; queue = queue->rmq_next) { + tracker = (struct rm_priotracker *)queue; + if ((tracker->rmp_rmlock == rm) && + (tracker->rmp_thread == td)) { + how = (uintptr_t)tracker; + break; + } + } + KASSERT(tracker != NULL, + ("rm_priotracker is non-NULL when lock held in read mode")); + critical_exit(); + rm_runlock(rm, tracker); + } + return (how); } #ifdef KDTRACE_HOOKS Modified: head/sys/kern/kern_rwlock.c ============================================================================== --- head/sys/kern/kern_rwlock.c Fri Sep 20 22:59:22 2013 (r255744) +++ head/sys/kern/kern_rwlock.c Fri Sep 20 23:06:21 2013 (r255745) @@ -83,11 +83,11 @@ SYSCTL_INT(_debug_rwlock, OID_AUTO, loop static void db_show_rwlock(const struct lock_object *lock); #endif static void assert_rw(const struct lock_object *lock, int what); -static void lock_rw(struct lock_object *lock, int how); +static void lock_rw(struct lock_object *lock, uintptr_t how); #ifdef KDTRACE_HOOKS static int owner_rw(const struct lock_object *lock, struct thread **owner); #endif -static int unlock_rw(struct lock_object *lock); +static uintptr_t unlock_rw(struct lock_object *lock); struct lock_class lock_class_rw = { .lc_name = "rw", @@ -141,7 +141,7 @@ assert_rw(const struct lock_object *lock } void -lock_rw(struct lock_object *lock, int how) +lock_rw(struct lock_object *lock, uintptr_t how) { struct rwlock *rw; @@ -152,7 +152,7 @@ lock_rw(struct lock_object *lock, int ho rw_rlock(rw); } -int +uintptr_t unlock_rw(struct lock_object *lock) { struct rwlock *rw; Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Fri Sep 20 22:59:22 2013 (r255744) +++ head/sys/kern/kern_sx.c Fri Sep 20 23:06:21 2013 (r255745) @@ -116,11 +116,11 @@ static void assert_sx(const struct lock_ #ifdef DDB static void db_show_sx(const struct lock_object *lock); #endif -static void lock_sx(struct lock_object *lock, int how); +static void lock_sx(struct lock_object *lock, uintptr_t how); #ifdef KDTRACE_HOOKS static int owner_sx(const struct lock_object *lock, struct thread **owner); #endif -static int unlock_sx(struct lock_object *lock); +static uintptr_t unlock_sx(struct lock_object *lock); struct lock_class lock_class_sx = { .lc_name = "sx", @@ -156,7 +156,7 @@ assert_sx(const struct lock_object *lock } void -lock_sx(struct lock_object *lock, int how) +lock_sx(struct lock_object *lock, uintptr_t how) { struct sx *sx; @@ -167,7 +167,7 @@ lock_sx(struct lock_object *lock, int ho sx_slock(sx); } -int +uintptr_t unlock_sx(struct lock_object *lock) { struct sx *sx; Modified: head/sys/kern/kern_synch.c ============================================================================== --- head/sys/kern/kern_synch.c Fri Sep 20 22:59:22 2013 (r255744) +++ head/sys/kern/kern_synch.c Fri Sep 20 23:06:21 2013 (r255745) @@ -157,7 +157,8 @@ _sleep(void *ident, struct lock_object * struct thread *td; struct proc *p; struct lock_class *class; - int catch, lock_state, pri, rval, sleepq_flags; + uintptr_t lock_state; + int catch, pri, rval, sleepq_flags; WITNESS_SAVE_DECL(lock_witness); td = curthread; Modified: head/sys/sys/lock.h ============================================================================== --- head/sys/sys/lock.h Fri Sep 20 22:59:22 2013 (r255744) +++ head/sys/sys/lock.h Fri Sep 20 23:06:21 2013 (r255745) @@ -56,13 +56,14 @@ struct thread; */ struct lock_class { - const char *lc_name; - u_int lc_flags; - void (*lc_assert)(const struct lock_object *lock, int what); - void (*lc_ddb_show)(const struct lock_object *lock); - void (*lc_lock)(struct lock_object *lock, int how); - int (*lc_owner)(const struct lock_object *lock, struct thread **owner); - int (*lc_unlock)(struct lock_object *lock); + const char *lc_name; + u_int lc_flags; + void (*lc_assert)(const struct lock_object *lock, int what); + void (*lc_ddb_show)(const struct lock_object *lock); + void (*lc_lock)(struct lock_object *lock, uintptr_t how); + int (*lc_owner)(const struct lock_object *lock, + struct thread **owner); + uintptr_t (*lc_unlock)(struct lock_object *lock); }; #define LC_SLEEPLOCK 0x00000001 /* Sleep lock. */ From owner-svn-src-all@FreeBSD.ORG Fri Sep 20 23:10:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D1D0DC6C; Fri, 20 Sep 2013 23:10:52 +0000 (UTC) (envelope-from davide@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BF130289C; Fri, 20 Sep 2013 23:10:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8KNAq66005626; Fri, 20 Sep 2013 23:10:52 GMT (envelope-from davide@svn.freebsd.org) Received: (from davide@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8KNAqll005625; Fri, 20 Sep 2013 23:10:52 GMT (envelope-from davide@svn.freebsd.org) Message-Id: <201309202310.r8KNAqll005625@svn.freebsd.org> From: Davide Italiano Date: Fri, 20 Sep 2013 23:10:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255746 - head/sys/dev/hwpmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Sep 2013 23:10:52 -0000 Author: davide Date: Fri Sep 20 23:10:52 2013 New Revision: 255746 URL: http://svnweb.freebsd.org/changeset/base/255746 Log: Remove local change leftover, this should never have been part of r255745. Pointy-hat to: davide Approved by: re (implicit) Modified: head/sys/dev/hwpmc/hwpmc_mod.c Modified: head/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_mod.c Fri Sep 20 23:06:21 2013 (r255745) +++ head/sys/dev/hwpmc/hwpmc_mod.c Fri Sep 20 23:10:52 2013 (r255746) @@ -2027,7 +2027,6 @@ pmc_allocate_owner_descriptor(struct pro /* allocate space for N pointers and one descriptor struct */ po = malloc(sizeof(struct pmc_owner), M_PMC, M_WAITOK|M_ZERO); po->po_owner = p; - LIST_INIT(&po->po_pmcs); LIST_INSERT_HEAD(poh, po, po_next); /* insert into hash table */ TAILQ_INIT(&po->po_logbuffers); @@ -2153,7 +2152,6 @@ pmc_allocate_pmc_descriptor(void) struct pmc *pmc; pmc = malloc(sizeof(struct pmc), M_PMC, M_WAITOK|M_ZERO); - LIST_INIT(&pmc->pm_targets); PMCDBG(PMC,ALL,1, "allocate-pmc -> pmc=%p", pmc); From owner-svn-src-all@FreeBSD.ORG Fri Sep 20 23:16:16 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 14EC8DF0; Fri, 20 Sep 2013 23:16:16 +0000 (UTC) (envelope-from davide@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DD45F28C3; Fri, 20 Sep 2013 23:16:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8KNGFTh007196; Fri, 20 Sep 2013 23:16:15 GMT (envelope-from davide@svn.freebsd.org) Received: (from davide@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8KNGFeZ007194; Fri, 20 Sep 2013 23:16:15 GMT (envelope-from davide@svn.freebsd.org) Message-Id: <201309202316.r8KNGFeZ007194@svn.freebsd.org> From: Davide Italiano Date: Fri, 20 Sep 2013 23:16:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255747 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Sep 2013 23:16:16 -0000 Author: davide Date: Fri Sep 20 23:16:15 2013 New Revision: 255747 URL: http://svnweb.freebsd.org/changeset/base/255747 Log: Fix callout_init_rm() in the shared case, allocating storage for 'struct rm_priotracker' directly in the softclock thread. Now consumers can pass CALLOUT_SHAREDLOCK flag to callout initialization routine safely. The choice of the already existing flags instead of special casing shared rmlocks is done to prevent consumer footshooting. Suggested by: jhb Reviewed by: jhb Approved by: re (delphij) Modified: head/sys/kern/kern_timeout.c Modified: head/sys/kern/kern_timeout.c ============================================================================== --- head/sys/kern/kern_timeout.c Fri Sep 20 23:10:52 2013 (r255746) +++ head/sys/kern/kern_timeout.c Fri Sep 20 23:16:15 2013 (r255747) @@ -597,11 +597,13 @@ softclock_call_cc(struct callout *c, str #endif int direct) { + struct rm_priotracker tracker; void (*c_func)(void *); void *c_arg; struct lock_class *class; struct lock_object *c_lock; - int c_flags, sharedlock; + uintptr_t lock_status; + int c_flags; #ifdef SMP struct callout_cpu *new_cc; void (*new_func)(void *); @@ -620,7 +622,13 @@ softclock_call_cc(struct callout *c, str (CALLOUT_PENDING | CALLOUT_ACTIVE), ("softclock_call_cc: pend|act %p %x", c, c->c_flags)); class = (c->c_lock != NULL) ? LOCK_CLASS(c->c_lock) : NULL; - sharedlock = (c->c_flags & CALLOUT_SHAREDLOCK) ? 0 : 1; + lock_status = 0; + if (c->c_flags & CALLOUT_SHAREDLOCK) { + if (class == &lock_class_rm) + lock_status = (uintptr_t)&tracker; + else + lock_status = 1; + } c_lock = c->c_lock; c_func = c->c_func; c_arg = c->c_arg; @@ -633,7 +641,7 @@ softclock_call_cc(struct callout *c, str cc->cc_exec_entity[direct].cc_cancel = false; CC_UNLOCK(cc); if (c_lock != NULL) { - class->lc_lock(c_lock, sharedlock); + class->lc_lock(c_lock, lock_status); /* * The callout may have been cancelled * while we switched locks. From owner-svn-src-all@FreeBSD.ORG Fri Sep 20 23:22:01 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 863CE2B3; Fri, 20 Sep 2013 23:22:01 +0000 (UTC) (envelope-from davide@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 72C19291D; Fri, 20 Sep 2013 23:22:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8KNM1Nn030883; Fri, 20 Sep 2013 23:22:01 GMT (envelope-from davide@svn.freebsd.org) Received: (from davide@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8KNM1p2030882; Fri, 20 Sep 2013 23:22:01 GMT (envelope-from davide@svn.freebsd.org) Message-Id: <201309202322.r8KNM1p2030882@svn.freebsd.org> From: Davide Italiano Date: Fri, 20 Sep 2013 23:22:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255748 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Sep 2013 23:22:01 -0000 Author: davide Date: Fri Sep 20 23:22:00 2013 New Revision: 255748 URL: http://svnweb.freebsd.org/changeset/base/255748 Log: Fixup cross-device rename checks in ZFS. Add a check for the case where 'fdvp' is a directory, 'tvp' is an already existing directory and they have different mount points. Reported by: avg, pjd Reviewed by: pjd Approved by: re (rodrigc) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Sep 20 23:16:15 2013 (r255747) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Sep 20 23:22:00 2013 (r255748) @@ -6250,12 +6250,15 @@ zfs_freebsd_rename(ap) ASSERT(ap->a_fcnp->cn_flags & (SAVENAME|SAVESTART)); ASSERT(ap->a_tcnp->cn_flags & (SAVENAME|SAVESTART)); - if (fdvp->v_mount == tdvp->v_mount) + /* + * Check for cross-device rename. + */ + if ((fdvp->v_mount != tdvp->v_mount) || + (tvp && (fdvp->v_mount != tvp->v_mount))) + error = EXDEV; + else error = zfs_rename(fdvp, ap->a_fcnp->cn_nameptr, tdvp, ap->a_tcnp->cn_nameptr, ap->a_fcnp->cn_cred, NULL, 0); - else - error = EXDEV; - if (tdvp == tvp) VN_RELE(tdvp); else From owner-svn-src-all@FreeBSD.ORG Fri Sep 20 23:50:15 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3E8ABA26; Fri, 20 Sep 2013 23:50:15 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 29DB62A56; Fri, 20 Sep 2013 23:50:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8KNoFCb079162; Fri, 20 Sep 2013 23:50:15 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8KNoFsd079161; Fri, 20 Sep 2013 23:50:15 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201309202350.r8KNoFsd079161@svn.freebsd.org> From: Mark Johnston Date: Fri, 20 Sep 2013 23:50:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255749 - stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Sep 2013 23:50:15 -0000 Author: markj Date: Fri Sep 20 23:50:14 2013 New Revision: 255749 URL: http://svnweb.freebsd.org/changeset/base/255749 Log: MFC r250953: The fasttrap provider cleans up probes asynchronously when a process with USDT probes exits. This was previously done with a callout; however, it is possible to sleep while holding the DTrace mutexes, so a panic will occur on INVARIANTS kernels if the callout handler can't immediately acquire one of these mutexes. This panic will be frequently triggered on systems where a USDT-enabled program (perl, for instance) is often run. This revision changes the fasttrap cleanup mechanism so that a dedicated thread is used instead of a callout. The old behaviour is otherwise preserved. MFC r252493: Be sure to destory the fasttrap cleanup mutex when unloading the fasttrap module. This should be MFCed with r250953. Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Fri Sep 20 23:22:00 2013 (r255748) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Fri Sep 20 23:50:14 2013 (r255749) @@ -155,9 +155,9 @@ static struct cdevsw fasttrap_cdevsw = { static struct cdev *fasttrap_cdev; static dtrace_meta_provider_id_t fasttrap_meta_id; -static struct callout fasttrap_timeout; +static struct proc *fasttrap_cleanup_proc; static struct mtx fasttrap_cleanup_mtx; -static uint_t fasttrap_cleanup_work; +static uint_t fasttrap_cleanup_work, fasttrap_cleanup_drain, fasttrap_cleanup_cv; /* * Generation count on modifications to the global tracepoint lookup table. @@ -310,8 +310,11 @@ fasttrap_mod_barrier(uint64_t gen) } /* - * This is the timeout's callback for cleaning up the providers and their - * probes. + * This function performs asynchronous cleanup of fasttrap providers. The + * Solaris implementation of this mechanism use a timeout that's activated in + * fasttrap_pid_cleanup(), but this doesn't work in FreeBSD: one may sleep while + * holding the DTrace mutexes, but it is unsafe to sleep in a callout handler. + * Thus we use a dedicated process to perform the cleanup when requested. */ /*ARGSUSED*/ static void @@ -322,11 +325,8 @@ fasttrap_pid_cleanup_cb(void *data) dtrace_provider_id_t provid; int i, later = 0, rval; - static volatile int in = 0; - ASSERT(in == 0); - in = 1; - - while (fasttrap_cleanup_work) { + mtx_lock(&fasttrap_cleanup_mtx); + while (!fasttrap_cleanup_drain || later > 0) { fasttrap_cleanup_work = 0; mtx_unlock(&fasttrap_cleanup_mtx); @@ -397,39 +397,32 @@ fasttrap_pid_cleanup_cb(void *data) } mutex_exit(&bucket->ftb_mtx); } - mtx_lock(&fasttrap_cleanup_mtx); - } -#if 0 - ASSERT(fasttrap_timeout != 0); -#endif + /* + * If we were unable to retire a provider, try again after a + * second. This situation can occur in certain circumstances + * where providers cannot be unregistered even though they have + * no probes enabled because of an execution of dtrace -l or + * something similar. + */ + if (later > 0 || fasttrap_cleanup_work || + fasttrap_cleanup_drain) { + mtx_unlock(&fasttrap_cleanup_mtx); + pause("ftclean", hz); + mtx_lock(&fasttrap_cleanup_mtx); + } else + mtx_sleep(&fasttrap_cleanup_cv, &fasttrap_cleanup_mtx, + 0, "ftcl", 0); + } /* - * If we were unable to remove a retired provider, try again after - * a second. This situation can occur in certain circumstances where - * providers cannot be unregistered even though they have no probes - * enabled because of an execution of dtrace -l or something similar. - * If the timeout has been disabled (set to 1 because we're trying - * to detach), we set fasttrap_cleanup_work to ensure that we'll - * get a chance to do that work if and when the timeout is reenabled - * (if detach fails). - */ - if (later > 0) { - if (callout_active(&fasttrap_timeout)) { - callout_reset(&fasttrap_timeout, hz, - &fasttrap_pid_cleanup_cb, NULL); - } - - else if (later > 0) - fasttrap_cleanup_work = 1; - } else { -#if !defined(sun) - /* Nothing to be done for FreeBSD */ -#endif - } + * Wake up the thread in fasttrap_unload() now that we're done. + */ + wakeup(&fasttrap_cleanup_drain); + mtx_unlock(&fasttrap_cleanup_mtx); - in = 0; + kthread_exit(); } /* @@ -440,8 +433,10 @@ fasttrap_pid_cleanup(void) { mtx_lock(&fasttrap_cleanup_mtx); - fasttrap_cleanup_work = 1; - callout_reset(&fasttrap_timeout, 1, &fasttrap_pid_cleanup_cb, NULL); + if (!fasttrap_cleanup_work) { + fasttrap_cleanup_work = 1; + wakeup(&fasttrap_cleanup_cv); + } mtx_unlock(&fasttrap_cleanup_mtx); } @@ -991,7 +986,6 @@ fasttrap_pid_enable(void *arg, dtrace_id proc_t *p = NULL; int i, rc; - ASSERT(probe != NULL); ASSERT(!probe->ftp_enabled); ASSERT(id == probe->ftp_id); @@ -2272,17 +2266,23 @@ static int fasttrap_load(void) { ulong_t nent; - int i; + int i, ret; /* Create the /dev/dtrace/fasttrap entry. */ fasttrap_cdev = make_dev(&fasttrap_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "dtrace/fasttrap"); mtx_init(&fasttrap_cleanup_mtx, "fasttrap clean", "dtrace", MTX_DEF); - callout_init_mtx(&fasttrap_timeout, &fasttrap_cleanup_mtx, 0); mutex_init(&fasttrap_count_mtx, "fasttrap count mtx", MUTEX_DEFAULT, NULL); + ret = kproc_create(fasttrap_pid_cleanup_cb, NULL, + &fasttrap_cleanup_proc, 0, 0, "ftcleanup"); + if (ret != 0) { + destroy_dev(fasttrap_cdev); + return (ret); + } + #if defined(sun) fasttrap_max = ddi_getprop(DDI_DEV_T_ANY, devi, DDI_PROP_DONTPASS, "fasttrap-max-probes", FASTTRAP_MAX_DEFAULT); @@ -2389,15 +2389,6 @@ fasttrap_unload(void) return (-1); /* - * Prevent any new timeouts from running by setting fasttrap_timeout - * to a non-zero value, and wait for the current timeout to complete. - */ - mtx_lock(&fasttrap_cleanup_mtx); - fasttrap_cleanup_work = 0; - callout_drain(&fasttrap_timeout); - mtx_unlock(&fasttrap_cleanup_mtx); - - /* * Iterate over all of our providers. If there's still a process * that corresponds to that pid, fail to detach. */ @@ -2431,26 +2422,21 @@ fasttrap_unload(void) } if (fail) { - uint_t work; - /* - * If we're failing to detach, we need to unblock timeouts - * and start a new timeout if any work has accumulated while - * we've been unsuccessfully trying to detach. - */ - mtx_lock(&fasttrap_cleanup_mtx); - work = fasttrap_cleanup_work; - callout_drain(&fasttrap_timeout); - mtx_unlock(&fasttrap_cleanup_mtx); - - if (work) - fasttrap_pid_cleanup(); - (void) dtrace_meta_register("fasttrap", &fasttrap_mops, NULL, &fasttrap_meta_id); return (-1); } + mtx_lock(&fasttrap_cleanup_mtx); + fasttrap_cleanup_drain = 1; + /* Wait for the cleanup thread to finish up and signal us. */ + wakeup(&fasttrap_cleanup_cv); + mtx_sleep(&fasttrap_cleanup_drain, &fasttrap_cleanup_mtx, 0, "ftcld", + 0); + fasttrap_cleanup_proc = NULL; + mtx_destroy(&fasttrap_cleanup_mtx); + #ifdef DEBUG mutex_enter(&fasttrap_count_mtx); ASSERT(fasttrap_pid_count == 0); From owner-svn-src-all@FreeBSD.ORG Sat Sep 21 00:17:30 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 56A6D4D7; Sat, 21 Sep 2013 00:17:30 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3F5AD2B95; Sat, 21 Sep 2013 00:17:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8L0HUAn004629; Sat, 21 Sep 2013 00:17:30 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8L0HR1t004574; Sat, 21 Sep 2013 00:17:27 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201309210017.r8L0HR1t004574@svn.freebsd.org> From: Xin LI Date: Sat, 21 Sep 2013 00:17:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255750 - in head: cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/common/zfs sys/cddl/contri... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Sep 2013 00:17:30 -0000 Author: delphij Date: Sat Sep 21 00:17:26 2013 New Revision: 255750 URL: http://svnweb.freebsd.org/changeset/base/255750 Log: MFV r254750: Add support of Illumos dumps on zvol over RAID-Z. Note that this only adds the features. FreeBSD would still need more work to support dumping on zvols. Illumos ZFS issues: 2932 support crash dumps to raidz, etc. pools MFC after: 1 month Approved by: re (ZFS blanket) Added: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_raidz.h - copied, changed from r254750, vendor-sys/illumos/dist/uts/common/fs/zfs/sys/vdev_raidz.h Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h head/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_disk.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_checksum.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Fri Sep 20 23:50:14 2013 (r255749) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Sat Sep 21 00:17:26 2013 (r255750) @@ -19,16 +19,16 @@ .\" .\" Copyright (c) 2010, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2012 by Delphix. 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. +.\" Copyright (c) 2013, Joyent, Inc. All rights reserved. .\" .\" $FreeBSD$ .\" -.Dd March 21, 2013 +.Dd September 20, 2013 .Dt ZFS 8 .Os .Sh NAME @@ -891,14 +891,21 @@ command or unmounted by the command. .Pp This property is not inherited. -.It Sy checksum Ns = Ns Cm on | off | fletcher2 | fletcher4 | sha256 +.It Sy checksum Ns = Ns Cm on | off | fletcher2 | fletcher4 | sha256 | noparity Controls the checksum used to verify data integrity. The default value is .Cm on , which automatically selects an appropriate algorithm (currently, .Cm fletcher4 , but this may change in future releases). The value .Cm off -disables integrity checking on user data. Disabling checksums is +disables integrity checking on user data. +The value +.Cm noparity +not only +disables integrity but also disables maintaining parity for user data. This +setting is used internally by a dump device residing on a RAID-Z pool and should +not be used by any other dataset. +Disabling checksums is .Em NOT a recommended practice. .It Sy compression Ns = Ns Cm on | off | lzjb | gzip | gzip- Ns Ar N | zle | Cm lz4 Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Fri Sep 20 23:50:14 2013 (r255749) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Sat Sep 21 00:17:26 2013 (r255750) @@ -19,10 +19,11 @@ .\" .\" Copyright (c) 2012 by Delphix. All rights reserved. .\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved. +.\" Copyright (c) 2013, Joyent, Inc. All rights reserved. .\" .\" $FreeBSD$ .\" -.Dd February 8, 2013 +.Dd September 20, 2013 .Dt ZPOOL-FEATURES 7 .Os .Sh NAME @@ -229,6 +230,27 @@ feature. At the moment, this operation cannot be reversed. Booting off of .Sy lz4 -compressed root pools is supported. +.It Sy multi_vdev_crash_dump +.Bl -column "READ\-ONLY COMPATIBLE" "com.joyent:multi_vdev_crash_dump" +.It GUID Ta com.joyent:multi_vdev_crash_dump +.It READ\-ONLY COMPATIBLE Ta no +.It DEPENDENCIES Ta none +.El +.Pp +This feature allows a dump device to be configured with a pool comprised +of multiple vdevs. +Those vdevs may be arranged in any mirrored or raidz +configuration. +.\" TODO: this is not yet supported on FreeBSD. +.\" .Pp +.\" When the +.\" .Sy multi_vdev_crash_dump +.\" feature is set to +.\" .Sy enabled , +.\" the administrator can use the +.\" .Xr dumpon 8 +.\" command to configure a +.\" dump device on a pool comprised of multiple vdevs. .El .Sh SEE ALSO .Xr zpool 8 Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Fri Sep 20 23:50:14 2013 (r255749) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Sat Sep 21 00:17:26 2013 (r255750) @@ -23,6 +23,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, Joyent, Inc. All rights reserved. */ #include @@ -4020,9 +4021,7 @@ supported_dump_vdev_type(libzfs_handle_t uint_t children, c; verify(nvlist_lookup_string(config, ZPOOL_CONFIG_TYPE, &type) == 0); - if (strcmp(type, VDEV_TYPE_RAIDZ) == 0 || - strcmp(type, VDEV_TYPE_FILE) == 0 || - strcmp(type, VDEV_TYPE_LOG) == 0 || + if (strcmp(type, VDEV_TYPE_FILE) == 0 || strcmp(type, VDEV_TYPE_HOLE) == 0 || strcmp(type, VDEV_TYPE_MISSING) == 0) { zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, @@ -4041,8 +4040,12 @@ supported_dump_vdev_type(libzfs_handle_t } /* - * check if this zvol is allowable for use as a dump device; zero if - * it is, > 0 if it isn't, < 0 if it isn't a zvol + * Check if this zvol is allowable for use as a dump device; zero if + * it is, > 0 if it isn't, < 0 if it isn't a zvol. + * + * Allowable storage configurations include mirrors, all raidz variants, and + * pools with log, cache, and spare devices. Pools which are backed by files or + * have missing/hole vdevs are not suitable. */ int zvol_check_dump_config(char *arg) @@ -4104,12 +4107,6 @@ zvol_check_dump_config(char *arg) verify(nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_CHILDREN, &top, &toplevels) == 0); - if (toplevels != 1) { - zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, - "'%s' has multiple top level vdevs"), poolname); - (void) zfs_error(hdl, EZFS_DEVOVERFLOW, errbuf); - goto out; - } if (!supported_dump_vdev_type(hdl, top[0], errbuf)) { goto out; Modified: head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c Fri Sep 20 23:50:14 2013 (r255749) +++ head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c Sat Sep 21 00:17:26 2013 (r255750) @@ -22,6 +22,7 @@ /* * Copyright (c) 2012 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ #ifdef _KERNEL @@ -159,4 +160,7 @@ zpool_feature_init(void) zfeature_register(SPA_FEATURE_LZ4_COMPRESS, "org.illumos:lz4_compress", "lz4_compress", "LZ4 compression algorithm support.", B_FALSE, B_FALSE, NULL); + zfeature_register(SPA_FEATURE_MULTI_VDEV_CRASH_DUMP, + "com.joyent:multi_vdev_crash_dump", "multi_vdev_crash_dump", + "Crash dumps to multiple vdev pools.", B_FALSE, B_FALSE, NULL); } Modified: head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h Fri Sep 20 23:50:14 2013 (r255749) +++ head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h Sat Sep 21 00:17:26 2013 (r255750) @@ -22,6 +22,7 @@ /* * Copyright (c) 2012 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ #ifndef _ZFEATURE_COMMON_H @@ -53,6 +54,7 @@ static enum spa_feature { SPA_FEATURE_ASYNC_DESTROY, SPA_FEATURE_EMPTY_BPOBJ, SPA_FEATURE_LZ4_COMPRESS, + SPA_FEATURE_MULTI_VDEV_CRASH_DUMP, SPA_FEATURES } spa_feature_t; Modified: head/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c Fri Sep 20 23:50:14 2013 (r255749) +++ head/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c Sat Sep 21 00:17:26 2013 (r255750) @@ -22,6 +22,7 @@ * Copyright (c) 2005, 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. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ /* Portions Copyright 2010 Robert Milkowski */ @@ -69,6 +70,7 @@ zfs_prop_init(void) { "fletcher2", ZIO_CHECKSUM_FLETCHER_2 }, { "fletcher4", ZIO_CHECKSUM_FLETCHER_4 }, { "sha256", ZIO_CHECKSUM_SHA256 }, + { "noparity", ZIO_CHECKSUM_NOPARITY }, { NULL } }; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Fri Sep 20 23:50:14 2013 (r255749) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Sat Sep 21 00:17:26 2013 (r255750) @@ -23,6 +23,7 @@ * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ #include @@ -2755,7 +2756,8 @@ dbuf_write(dbuf_dirty_record_t *dr, arc_ dr->dt.dl.dr_copies, dr->dt.dl.dr_nopwrite); mutex_exit(&db->db_mtx); } else if (db->db_state == DB_NOFILL) { - ASSERT(zp.zp_checksum == ZIO_CHECKSUM_OFF); + ASSERT(zp.zp_checksum == ZIO_CHECKSUM_OFF || + zp.zp_checksum == ZIO_CHECKSUM_NOPARITY); dr->dr_zio = zio_write(zio, os->os_spa, txg, db->db_blkptr, NULL, db->db.db_size, &zp, dbuf_write_nofill_ready, dbuf_write_nofill_done, db, Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Fri Sep 20 23:50:14 2013 (r255749) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Sat Sep 21 00:17:26 2013 (r255750) @@ -22,8 +22,8 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. */ - /* Copyright (c) 2013 by Saso Kiselkov. All rights reserved. */ +/* Copyright (c) 2013, Joyent, Inc. All rights reserved. */ #include #include @@ -1610,7 +1610,7 @@ dmu_write_policy(objset_t *os, dnode_t * * pipeline. */ compress = ZIO_COMPRESS_OFF; - checksum = ZIO_CHECKSUM_OFF; + checksum = ZIO_CHECKSUM_NOPARITY; } else { compress = zio_compress_select(dn->dn_compress, compress); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_disk.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_disk.h Fri Sep 20 23:50:14 2013 (r255749) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_disk.h Sat Sep 21 00:17:26 2013 (r255750) @@ -21,13 +21,12 @@ /* * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. + * Copyright (c) 2013 Joyent, Inc. All rights reserved. */ #ifndef _SYS_VDEV_DISK_H #define _SYS_VDEV_DISK_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include #ifdef _KERNEL #include @@ -40,14 +39,23 @@ extern "C" { #endif +#ifdef _KERNEL typedef struct vdev_disk { ddi_devid_t vd_devid; char *vd_minor; ldi_handle_t vd_lh; } vdev_disk_t; +#endif +extern int vdev_disk_physio(vdev_t *, + caddr_t, size_t, uint64_t, int, boolean_t); + +/* + * Since vdev_disk.c is not compiled into libzpool, this function should only be + * defined in the zfs kernel module. + */ #ifdef _KERNEL -extern int vdev_disk_physio(ldi_handle_t, caddr_t, size_t, uint64_t, int); +extern int vdev_disk_ldi_physio(ldi_handle_t, caddr_t, size_t, uint64_t, int); #endif #ifdef __cplusplus } Copied and modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_raidz.h (from r254750, vendor-sys/illumos/dist/uts/common/fs/zfs/sys/vdev_raidz.h) ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/vdev_raidz.h Fri Aug 23 23:46:27 2013 (r254750, copy source) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_raidz.h Sat Sep 21 00:17:26 2013 (r255750) @@ -26,12 +26,14 @@ #define _SYS_VDEV_RAIDZ_H #include +#ifdef illumos #include #ifdef _KERNEL #include #include #include #endif +#endif #ifdef __cplusplus extern "C" { Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Fri Sep 20 23:50:14 2013 (r255749) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Sat Sep 21 00:17:26 2013 (r255750) @@ -23,6 +23,7 @@ * Copyright (c) 2005, 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. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ #ifndef _ZIO_H @@ -79,6 +80,7 @@ enum zio_checksum { ZIO_CHECKSUM_FLETCHER_4, ZIO_CHECKSUM_SHA256, ZIO_CHECKSUM_ZILOG2, + ZIO_CHECKSUM_NOPARITY, ZIO_CHECKSUM_FUNCTIONS }; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c Fri Sep 20 23:50:14 2013 (r255749) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c Sat Sep 21 00:17:26 2013 (r255750) @@ -22,6 +22,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright 2013 Nexenta Systems, Inc. All rights reserved. + * Copyright 2013 Joyent, Inc. All rights reserved. */ #include @@ -431,8 +432,29 @@ vdev_disk_close(vdev_t *vd) } int -vdev_disk_physio(ldi_handle_t vd_lh, caddr_t data, size_t size, - uint64_t offset, int flags) +vdev_disk_physio(vdev_t *vd, caddr_t data, + size_t size, uint64_t offset, int flags, boolean_t isdump) +{ + vdev_disk_t *dvd = vd->vdev_tsd; + + ASSERT(vd->vdev_ops == &vdev_disk_ops); + + /* + * If in the context of an active crash dump, use the ldi_dump(9F) + * call instead of ldi_strategy(9F) as usual. + */ + if (isdump) { + ASSERT3P(dvd, !=, NULL); + return (ldi_dump(dvd->vd_lh, data, lbtodb(offset), + lbtodb(size))); + } + + return (vdev_disk_ldi_physio(dvd->vd_lh, data, size, offset, flags)); +} + +int +vdev_disk_ldi_physio(ldi_handle_t vd_lh, caddr_t data, + size_t size, uint64_t offset, int flags) { buf_t *bp; int error = 0; @@ -680,7 +702,7 @@ vdev_disk_read_rootlabel(char *devpath, /* read vdev label */ offset = vdev_label_offset(size, l, 0); - if (vdev_disk_physio(vd_lh, (caddr_t)label, + if (vdev_disk_ldi_physio(vd_lh, (caddr_t)label, VDEV_SKIP_SIZE + VDEV_PHYS_SIZE, offset, B_READ) != 0) continue; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c Fri Sep 20 23:50:14 2013 (r255749) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c Sat Sep 21 00:17:26 2013 (r255750) @@ -22,15 +22,22 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ #include #include #include +#ifdef illumos +#include +#endif +#include +#include #include #include #include #include +#include /* * Virtual device vector for RAID-Z. @@ -154,6 +161,8 @@ typedef struct raidz_map { VDEV_RAIDZ_64MUL_2((x), mask); \ } +#define VDEV_LABEL_OFFSET(x) (x + VDEV_LABEL_START_SIZE) + /* * Force reconstruction to use the general purpose method. */ @@ -437,14 +446,14 @@ static const zio_vsd_ops_t vdev_raidz_vs * the number of children in the target vdev. */ static raidz_map_t * -vdev_raidz_map_alloc(zio_t *zio, uint64_t unit_shift, uint64_t dcols, - uint64_t nparity) +vdev_raidz_map_alloc(caddr_t data, uint64_t size, uint64_t offset, boolean_t dofree, + uint64_t unit_shift, uint64_t dcols, uint64_t nparity) { raidz_map_t *rm; /* The starting RAIDZ (parent) vdev sector of the block. */ - uint64_t b = zio->io_offset >> unit_shift; + uint64_t b = offset >> unit_shift; /* The zio's size in units of the vdev's minimum sector size. */ - uint64_t s = zio->io_size >> unit_shift; + uint64_t s = size >> unit_shift; /* The first column for this stripe. */ uint64_t f = b % dcols; /* The starting byte offset on each child vdev. */ @@ -532,13 +541,13 @@ vdev_raidz_map_alloc(zio_t *zio, uint64_ ASSERT3U(rm->rm_asize - asize, ==, rm->rm_nskip << unit_shift); ASSERT3U(rm->rm_nskip, <=, nparity); - if (zio->io_type != ZIO_TYPE_FREE) { + if (!dofree) { for (c = 0; c < rm->rm_firstdatacol; c++) { rm->rm_col[c].rc_data = zio_buf_alloc(rm->rm_col[c].rc_size); } - rm->rm_col[c].rc_data = zio->io_data; + rm->rm_col[c].rc_data = data; for (c = c + 1; c < acols; c++) { rm->rm_col[c].rc_data = @@ -570,7 +579,7 @@ vdev_raidz_map_alloc(zio_t *zio, uint64_ ASSERT(rm->rm_cols >= 2); ASSERT(rm->rm_col[0].rc_size == rm->rm_col[1].rc_size); - if (rm->rm_firstdatacol == 1 && (zio->io_offset & (1ULL << 20))) { + if (rm->rm_firstdatacol == 1 && (offset & (1ULL << 20))) { devidx = rm->rm_col[0].rc_devidx; o = rm->rm_col[0].rc_offset; rm->rm_col[0].rc_devidx = rm->rm_col[1].rc_devidx; @@ -582,8 +591,6 @@ vdev_raidz_map_alloc(zio_t *zio, uint64_ rm->rm_skipstart = 1; } - zio->io_vsd = rm; - zio->io_vsd_ops = &vdev_raidz_vsd_ops; return (rm); } @@ -993,12 +1000,9 @@ vdev_raidz_reconstruct_pq(raidz_map_t *r * ~~ ~~ * __ __ * | 1 1 1 1 1 1 1 1 | - * | 128 64 32 16 8 4 2 1 | * | 19 205 116 29 64 16 4 1 | * | 1 0 0 0 0 0 0 0 | - * | 0 1 0 0 0 0 0 0 | - * (V|I)' = | 0 0 1 0 0 0 0 0 | - * | 0 0 0 1 0 0 0 0 | + * (V|I)' = | 0 0 0 1 0 0 0 0 | * | 0 0 0 0 1 0 0 0 | * | 0 0 0 0 0 1 0 0 | * | 0 0 0 0 0 0 1 0 | @@ -1532,6 +1536,154 @@ vdev_raidz_close(vdev_t *vd) vdev_close(vd->vdev_child[c]); } +#ifdef illumos +/* + * Handle a read or write I/O to a RAID-Z dump device. + * + * The dump device is in a unique situation compared to other ZFS datasets: + * writing to this device should be as simple and fast as possible. In + * addition, durability matters much less since the dump will be extracted + * once the machine reboots. For that reason, this function eschews parity for + * performance and simplicity. The dump device uses the checksum setting + * ZIO_CHECKSUM_NOPARITY to indicate that parity is not maintained for this + * dataset. + * + * Blocks of size 128 KB have been preallocated for this volume. I/Os less than + * 128 KB will not fill an entire block; in addition, they may not be properly + * aligned. In that case, this function uses the preallocated 128 KB block and + * omits reading or writing any "empty" portions of that block, as opposed to + * allocating a fresh appropriately-sized block. + * + * Looking at an example of a 32 KB I/O to a RAID-Z vdev with 5 child vdevs: + * + * vdev_raidz_io_start(data, size: 32 KB, offset: 64 KB) + * + * If this were a standard RAID-Z dataset, a block of at least 40 KB would be + * allocated which spans all five child vdevs. 8 KB of data would be written to + * each of four vdevs, with the fifth containing the parity bits. + * + * parity data data data data + * | PP | XX | XX | XX | XX | + * ^ ^ ^ ^ ^ + * | | | | | + * 8 KB parity ------8 KB data blocks------ + * + * However, when writing to the dump device, the behavior is different: + * + * vdev_raidz_physio(data, size: 32 KB, offset: 64 KB) + * + * Unlike the normal RAID-Z case in which the block is allocated based on the + * I/O size, reads and writes here always use a 128 KB logical I/O size. If the + * I/O size is less than 128 KB, only the actual portions of data are written. + * In this example the data is written to the third data vdev since that vdev + * contains the offset [64 KB, 96 KB). + * + * parity data data data data + * | | | | XX | | + * ^ + * | + * 32 KB data block + * + * As a result, an individual I/O may not span all child vdevs; moreover, a + * small I/O may only operate on a single child vdev. + * + * Note that since there are no parity bits calculated or written, this format + * remains the same no matter how many parity bits are used in a normal RAID-Z + * stripe. On a RAID-Z3 configuration with seven child vdevs, the example above + * would look like: + * + * parity parity parity data data data data + * | | | | | | XX | | + * ^ + * | + * 32 KB data block + */ +int +vdev_raidz_physio(vdev_t *vd, caddr_t data, size_t size, + uint64_t offset, uint64_t origoffset, boolean_t doread, boolean_t isdump) +{ + vdev_t *tvd = vd->vdev_top; + vdev_t *cvd; + raidz_map_t *rm; + raidz_col_t *rc; + int c, err = 0; + + uint64_t start, end, colstart, colend; + uint64_t coloffset, colsize, colskip; + + int flags = doread ? BIO_READ : BIO_WRITE; + +#ifdef _KERNEL + + /* + * Don't write past the end of the block + */ + VERIFY3U(offset + size, <=, origoffset + SPA_MAXBLOCKSIZE); + + start = offset; + end = start + size; + + /* + * Allocate a RAID-Z map for this block. Note that this block starts + * from the "original" offset, this is, the offset of the extent which + * contains the requisite offset of the data being read or written. + * + * Even if this I/O operation doesn't span the full block size, let's + * treat the on-disk format as if the only blocks are the complete 128 + * KB size. + */ + rm = vdev_raidz_map_alloc(data - (offset - origoffset), + SPA_MAXBLOCKSIZE, origoffset, B_FALSE, tvd->vdev_ashift, vd->vdev_children, + vd->vdev_nparity); + + coloffset = origoffset; + + for (c = rm->rm_firstdatacol; c < rm->rm_cols; + c++, coloffset += rc->rc_size) { + rc = &rm->rm_col[c]; + cvd = vd->vdev_child[rc->rc_devidx]; + + /* + * Find the start and end of this column in the RAID-Z map, + * keeping in mind that the stated size and offset of the + * operation may not fill the entire column for this vdev. + * + * If any portion of the data spans this column, issue the + * appropriate operation to the vdev. + */ + if (coloffset + rc->rc_size <= start) + continue; + if (coloffset >= end) + continue; + + colstart = MAX(coloffset, start); + colend = MIN(end, coloffset + rc->rc_size); + colsize = colend - colstart; + colskip = colstart - coloffset; + + VERIFY3U(colsize, <=, rc->rc_size); + VERIFY3U(colskip, <=, rc->rc_size); + + /* + * Note that the child vdev will have a vdev label at the start + * of its range of offsets, hence the need for + * VDEV_LABEL_OFFSET(). See zio_vdev_child_io() for another + * example of why this calculation is needed. + */ + if ((err = vdev_disk_physio(cvd, + ((char *)rc->rc_data) + colskip, colsize, + VDEV_LABEL_OFFSET(rc->rc_offset) + colskip, + flags, isdump)) != 0) + break; + } + + vdev_raidz_map_free(rm); +#endif /* KERNEL */ + + return (err); +} +#endif + static uint64_t vdev_raidz_asize(vdev_t *vd, uint64_t psize) { @@ -1584,9 +1736,14 @@ vdev_raidz_io_start(zio_t *zio) raidz_col_t *rc; int c, i; - rm = vdev_raidz_map_alloc(zio, tvd->vdev_ashift, vd->vdev_children, + rm = vdev_raidz_map_alloc(zio->io_data, zio->io_size, zio->io_offset, + zio->io_type == ZIO_TYPE_FREE, + tvd->vdev_ashift, vd->vdev_children, vd->vdev_nparity); + zio->io_vsd = rm; + zio->io_vsd_ops = &vdev_raidz_vsd_ops; + ASSERT3U(rm->rm_asize, ==, vdev_psize_to_asize(vd, zio->io_size)); if (zio->io_type == ZIO_TYPE_FREE) { @@ -1729,6 +1886,13 @@ raidz_parity_verify(zio_t *zio, raidz_ma int c, ret = 0; raidz_col_t *rc; + blkptr_t *bp = zio->io_bp; + enum zio_checksum checksum = (bp == NULL ? zio->io_prop.zp_checksum : + (BP_IS_GANG(bp) ? ZIO_CHECKSUM_GANG_HEADER : BP_GET_CHECKSUM(bp))); + + if (checksum == ZIO_CHECKSUM_NOPARITY) + return (ret); + for (c = 0; c < rm->rm_firstdatacol; c++) { rc = &rm->rm_col[c]; if (!rc->rc_tried || rc->rc_error != 0) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_checksum.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_checksum.c Fri Sep 20 23:50:14 2013 (r255749) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_checksum.c Sat Sep 21 00:17:26 2013 (r255750) @@ -21,6 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ #include @@ -78,6 +79,7 @@ zio_checksum_info_t zio_checksum_table[Z {{fletcher_4_native, fletcher_4_byteswap}, 1, 0, 0, "fletcher4"}, {{zio_checksum_SHA256, zio_checksum_SHA256}, 1, 0, 1, "sha256"}, {{fletcher_4_native, fletcher_4_byteswap}, 0, 1, 0, "zilog2"}, + {{zio_checksum_off, zio_checksum_off}, 0, 0, 0, "noparity"}, }; enum zio_checksum Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Fri Sep 20 23:50:14 2013 (r255749) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Sat Sep 21 00:17:26 2013 (r255750) @@ -24,6 +24,7 @@ * Copyright (c) 2006-2010 Pawel Jakub Dawidek * All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ /* Portions Copyright 2010 Robert Milkowski */ @@ -60,6 +61,7 @@ #include #include #include +#include #include #include #include @@ -77,9 +79,14 @@ #include #include #include +#include #include #include #include +#include +#include +#include + #include #include "zfs_namecheck.h" @@ -1158,27 +1165,28 @@ zvol_log_write(zvol_state_t *zv, dmu_tx_ #ifdef sun static int -zvol_dumpio_vdev(vdev_t *vd, void *addr, uint64_t offset, uint64_t size, - boolean_t doread, boolean_t isdump) +zvol_dumpio_vdev(vdev_t *vd, void *addr, uint64_t offset, uint64_t origoffset, + uint64_t size, boolean_t doread, boolean_t isdump) { vdev_disk_t *dvd; int c; int numerrors = 0; - for (c = 0; c < vd->vdev_children; c++) { - ASSERT(vd->vdev_ops == &vdev_mirror_ops || - vd->vdev_ops == &vdev_replacing_ops || - vd->vdev_ops == &vdev_spare_ops); - int err = zvol_dumpio_vdev(vd->vdev_child[c], - addr, offset, size, doread, isdump); - if (err != 0) { - numerrors++; - } else if (doread) { - break; + if (vd->vdev_ops == &vdev_mirror_ops || + vd->vdev_ops == &vdev_replacing_ops || + vd->vdev_ops == &vdev_spare_ops) { + for (c = 0; c < vd->vdev_children; c++) { + int err = zvol_dumpio_vdev(vd->vdev_child[c], + addr, offset, origoffset, size, doread, isdump); + if (err != 0) { + numerrors++; + } else if (doread) { + break; + } } } - if (!vd->vdev_ops->vdev_op_leaf) + if (!vd->vdev_ops->vdev_op_leaf && vd->vdev_ops != &vdev_raidz_ops) return (numerrors < vd->vdev_children ? 0 : EIO); if (doread && !vdev_readable(vd)) @@ -1186,19 +1194,26 @@ zvol_dumpio_vdev(vdev_t *vd, void *addr, else if (!doread && !vdev_writeable(vd)) return (SET_ERROR(EIO)); - dvd = vd->vdev_tsd; - ASSERT3P(dvd, !=, NULL); + if (vd->vdev_ops == &vdev_raidz_ops) { + return (vdev_raidz_physio(vd, + addr, size, offset, origoffset, doread, isdump)); + } + offset += VDEV_LABEL_START_SIZE; if (ddi_in_panic() || isdump) { ASSERT(!doread); if (doread) return (SET_ERROR(EIO)); + dvd = vd->vdev_tsd; + ASSERT3P(dvd, !=, NULL); return (ldi_dump(dvd->vd_lh, addr, lbtodb(offset), lbtodb(size))); } else { - return (vdev_disk_physio(dvd->vd_lh, addr, size, offset, - doread ? B_READ : B_WRITE)); + dvd = vd->vdev_tsd; + ASSERT3P(dvd, !=, NULL); + return (vdev_disk_ldi_physio(dvd->vd_lh, addr, size, + offset, doread ? B_READ : B_WRITE)); } } @@ -1233,7 +1248,8 @@ zvol_dumpio(zvol_state_t *zv, void *addr vd = vdev_lookup_top(spa, DVA_GET_VDEV(&ze->ze_dva)); offset += DVA_GET_OFFSET(&ze->ze_dva); - error = zvol_dumpio_vdev(vd, addr, offset, size, doread, isdump); + error = zvol_dumpio_vdev(vd, addr, offset, DVA_GET_OFFSET(&ze->ze_dva), + size, doread, isdump); if (!ddi_in_panic()) spa_config_exit(spa, SCL_STATE, FTAG); @@ -1253,6 +1269,7 @@ zvol_strategy(struct bio *bp) rl_t *rl; int error = 0; boolean_t doread = (bp->bio_cmd == BIO_READ); + boolean_t is_dumpified; boolean_t sync; if (zv == NULL) { @@ -1279,7 +1296,13 @@ zvol_strategy(struct bio *bp) return (0); } - sync = !doread && zv->zv_objset->os_sync == ZFS_SYNC_ALWAYS; +#ifdef illumos + is_dumpified = zv->zv_flags & ZVOL_DUMPIFIED; +#else + is_dumpified = B_FALSE; +#endif + sync = !doread && !is_dumpified && + zv->zv_objset->os_sync == ZFS_SYNC_ALWAYS; /* * There must be no buffer changes when doing a dmu_sync() because @@ -1290,7 +1313,15 @@ zvol_strategy(struct bio *bp) while (resid != 0 && off < volsize) { size_t size = MIN(resid, zvol_maxphys); +#ifdef illumos + if (is_dumpified) { + size = MIN(size, P2END(off, zv->zv_volblocksize) - off); + error = zvol_dumpio(zv, addr, off, size, + doread, B_FALSE); + } else if (doread) { +#else if (doread) { +#endif error = dmu_read(os, ZVOL_OBJ, off, size, addr, DMU_READ_PREFETCH); } else { @@ -1824,21 +1855,67 @@ zvol_fini(void) } #ifdef sun +/*ARGSUSED*/ +static int +zfs_mvdev_dump_feature_check(void *arg, dmu_tx_t *tx) +{ + spa_t *spa = dmu_tx_pool(tx)->dp_spa; + + if (spa_feature_is_active(spa, + &spa_feature_table[SPA_FEATURE_MULTI_VDEV_CRASH_DUMP])) + return (1); + return (0); +} + +/*ARGSUSED*/ +static void +zfs_mvdev_dump_activate_feature_sync(void *arg, dmu_tx_t *tx) +{ + spa_t *spa = dmu_tx_pool(tx)->dp_spa; + + spa_feature_incr(spa, + &spa_feature_table[SPA_FEATURE_MULTI_VDEV_CRASH_DUMP], tx); +} + static int zvol_dump_init(zvol_state_t *zv, boolean_t resize) { dmu_tx_t *tx; - int error = 0; + int error; objset_t *os = zv->zv_objset; + spa_t *spa = dmu_objset_spa(os); + vdev_t *vd = spa->spa_root_vdev; nvlist_t *nv = NULL; - uint64_t version = spa_version(dmu_objset_spa(zv->zv_objset)); + uint64_t version = spa_version(spa); + enum zio_checksum checksum; ASSERT(MUTEX_HELD(&spa_namespace_lock)); + ASSERT(vd->vdev_ops == &vdev_root_ops); + error = dmu_free_long_range(zv->zv_objset, ZVOL_OBJ, 0, DMU_OBJECT_END); /* wait for dmu_free_long_range to actually free the blocks */ txg_wait_synced(dmu_objset_pool(zv->zv_objset), 0); + /* + * If the pool on which the dump device is being initialized has more + * than one child vdev, check that the MULTI_VDEV_CRASH_DUMP feature is + * enabled. If so, bump that feature's counter to indicate that the + * feature is active. We also check the vdev type to handle the + * following case: + * # zpool create test raidz disk1 disk2 disk3 + * Now have spa_root_vdev->vdev_children == 1 (the raidz vdev), + * the raidz vdev itself has 3 children. + */ + if (vd->vdev_children > 1 || vd->vdev_ops == &vdev_raidz_ops) { + if (!spa_feature_is_enabled(spa, + &spa_feature_table[SPA_FEATURE_MULTI_VDEV_CRASH_DUMP])) + return (SET_ERROR(ENOTSUP)); + (void) dsl_sync_task(spa_name(spa), + zfs_mvdev_dump_feature_check, + zfs_mvdev_dump_activate_feature_sync, NULL, 2); + } + tx = dmu_tx_create(os); dmu_tx_hold_zap(tx, ZVOL_ZAP_OBJ, TRUE, NULL); dmu_tx_hold_bonus(tx, ZVOL_OBJ); @@ -1849,6 +1926,14 @@ zvol_dump_init(zvol_state_t *zv, boolean } /* + * If MULTI_VDEV_CRASH_DUMP is active, use the NOPARITY checksum + * function. Otherwise, use the old default -- OFF. + */ + checksum = spa_feature_is_active(spa, + &spa_feature_table[SPA_FEATURE_MULTI_VDEV_CRASH_DUMP]) ? + ZIO_CHECKSUM_NOPARITY : ZIO_CHECKSUM_OFF; + + /* * If we are resizing the dump device then we only need to * update the refreservation to match the newly updated * zvolsize. Otherwise, we save off the original state of the @@ -1911,7 +1996,7 @@ zvol_dump_init(zvol_state_t *zv, boolean ZIO_COMPRESS_OFF) == 0); VERIFY(nvlist_add_uint64(nv, zfs_prop_to_name(ZFS_PROP_CHECKSUM), - ZIO_CHECKSUM_OFF) == 0); + checksum) == 0); if (version >= SPA_VERSION_DEDUP) { VERIFY(nvlist_add_uint64(nv, zfs_prop_to_name(ZFS_PROP_DEDUP), From owner-svn-src-all@FreeBSD.ORG Sat Sep 21 00:27:54 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3B11D680; Sat, 21 Sep 2013 00:27:54 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0E4092BF4; Sat, 21 Sep 2013 00:27:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8L0Rr5S009599; Sat, 21 Sep 2013 00:27:53 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8L0RrZN009598; Sat, 21 Sep 2013 00:27:53 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201309210027.r8L0RrZN009598@svn.freebsd.org> From: Peter Grehan Date: Sat, 21 Sep 2013 00:27:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255751 - head/sys/amd64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Sep 2013 00:27:54 -0000 Author: grehan Date: Sat Sep 21 00:27:53 2013 New Revision: 255751 URL: http://svnweb.freebsd.org/changeset/base/255751 Log: Reorder/regroup the vmm ioctl api definitions to allow some semblance of API stability and growth during the 10.* timeframe. Userland/kernel bhyve will have to be recompiled after this. Reviewed by: neel Approved by: re@ (blanket) Modified: head/sys/amd64/include/vmm_dev.h Modified: head/sys/amd64/include/vmm_dev.h ============================================================================== --- head/sys/amd64/include/vmm_dev.h Sat Sep 21 00:17:26 2013 (r255750) +++ head/sys/amd64/include/vmm_dev.h Sat Sep 21 00:27:53 2013 (r255751) @@ -136,27 +136,41 @@ struct vm_x2apic { }; enum { - IOCNUM_RUN, - IOCNUM_MAP_MEMORY, - IOCNUM_GET_MEMORY_SEG, - IOCNUM_SET_REGISTER, - IOCNUM_GET_REGISTER, - IOCNUM_SET_SEGMENT_DESCRIPTOR, - IOCNUM_GET_SEGMENT_DESCRIPTOR, - IOCNUM_INJECT_EVENT, - IOCNUM_LAPIC_IRQ, - IOCNUM_SET_CAPABILITY, - IOCNUM_GET_CAPABILITY, - IOCNUM_BIND_PPTDEV, - IOCNUM_UNBIND_PPTDEV, - IOCNUM_MAP_PPTDEV_MMIO, - IOCNUM_PPTDEV_MSI, - IOCNUM_PPTDEV_MSIX, - IOCNUM_INJECT_NMI, - IOCNUM_VM_STATS, - IOCNUM_VM_STAT_DESC, - IOCNUM_SET_X2APIC_STATE, - IOCNUM_GET_X2APIC_STATE, + /* general routines */ + IOCNUM_ABIVERS = 0, + IOCNUM_RUN = 1, + IOCNUM_SET_CAPABILITY = 2, + IOCNUM_GET_CAPABILITY = 3, + + /* memory apis */ + IOCNUM_MAP_MEMORY = 10, + IOCNUM_GET_MEMORY_SEG = 11, + + /* register/state accessors */ + IOCNUM_SET_REGISTER = 20, + IOCNUM_GET_REGISTER = 21, + IOCNUM_SET_SEGMENT_DESCRIPTOR = 22, + IOCNUM_GET_SEGMENT_DESCRIPTOR = 23, + + /* interrupt injection */ + IOCNUM_INJECT_EVENT = 30, + IOCNUM_LAPIC_IRQ = 31, + IOCNUM_INJECT_NMI = 32, + + /* PCI pass-thru */ + IOCNUM_BIND_PPTDEV = 40, + IOCNUM_UNBIND_PPTDEV = 41, + IOCNUM_MAP_PPTDEV_MMIO = 42, + IOCNUM_PPTDEV_MSI = 43, + IOCNUM_PPTDEV_MSIX = 44, + + /* statistics */ + IOCNUM_VM_STATS = 50, + IOCNUM_VM_STAT_DESC = 51, + + /* kernel device state */ + IOCNUM_SET_X2APIC_STATE = 60, + IOCNUM_GET_X2APIC_STATE = 61, }; #define VM_RUN \ From owner-svn-src-all@FreeBSD.ORG Sat Sep 21 01:07:27 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D067ABDD; Sat, 21 Sep 2013 01:07:27 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BBAD52D7D; Sat, 21 Sep 2013 01:07:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8L17RmC031145; Sat, 21 Sep 2013 01:07:27 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8L17Rdj031143; Sat, 21 Sep 2013 01:07:27 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201309210107.r8L17Rdj031143@svn.freebsd.org> From: Glen Barber Date: Sat, 21 Sep 2013 01:07:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255752 - head/sys/amd64/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Sep 2013 01:07:27 -0000 Author: gjb Date: Sat Sep 21 01:07:27 2013 New Revision: 255752 URL: http://svnweb.freebsd.org/changeset/base/255752 Log: Put 'device hyperv' back in amd64/GENERIC, incorrectly removed with r255736. Pointed out by: gibbs Approved by: re (delphij) Sponsored by: The FreeBSD Foundation Modified: head/sys/amd64/conf/GENERIC Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Sat Sep 21 00:27:53 2013 (r255751) +++ head/sys/amd64/conf/GENERIC Sat Sep 21 01:07:27 2013 (r255752) @@ -342,6 +342,9 @@ device virtio_blk # VirtIO Block device device virtio_scsi # VirtIO SCSI device device virtio_balloon # VirtIO Memory Balloon device +# HyperV drivers +device hyperv # HyperV drivers + # Xen support device xenpci # Generic Xen bus From owner-svn-src-all@FreeBSD.ORG Sat Sep 21 03:52:08 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 969EA19B; Sat, 21 Sep 2013 03:52:08 +0000 (UTC) (envelope-from gibbs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8477F2492; Sat, 21 Sep 2013 03:52:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8L3q8jA019375; Sat, 21 Sep 2013 03:52:08 GMT (envelope-from gibbs@svn.freebsd.org) Received: (from gibbs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8L3q80j019374; Sat, 21 Sep 2013 03:52:08 GMT (envelope-from gibbs@svn.freebsd.org) Message-Id: <201309210352.r8L3q80j019374@svn.freebsd.org> From: "Justin T. Gibbs" Date: Sat, 21 Sep 2013 03:52:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255753 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Sep 2013 03:52:08 -0000 Author: gibbs Date: Sat Sep 21 03:52:08 2013 New Revision: 255753 URL: http://svnweb.freebsd.org/changeset/base/255753 Log: Optimize the block size used on ZFS cache devices as is already done for data and log devices. Reported by: Dmitryy Makarov Submitted by: smh Reviewed by: gibbs Approved by: re (delphij) MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sat Sep 21 01:07:27 2013 (r255752) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sat Sep 21 03:52:08 2013 (r255753) @@ -5387,6 +5387,8 @@ l2arc_add_vdev(spa_t *spa, vdev_t *vd) ASSERT(!l2arc_vdev_present(vd)); + vdev_ashift_optimize(vd); + /* * Create a new l2arc device entry. */ From owner-svn-src-all@FreeBSD.ORG Sat Sep 21 03:57:56 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CECD138A; Sat, 21 Sep 2013 03:57:56 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BBCDB24B9; Sat, 21 Sep 2013 03:57:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8L3vu9A020585; Sat, 21 Sep 2013 03:57:56 GMT (envelope-from cy@svn.freebsd.org) Received: (from cy@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8L3vuW9020584; Sat, 21 Sep 2013 03:57:56 GMT (envelope-from cy@svn.freebsd.org) Message-Id: <201309210357.r8L3vuW9020584@svn.freebsd.org> From: Cy Schubert Date: Sat, 21 Sep 2013 03:57:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255754 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Sep 2013 03:57:56 -0000 Author: cy Date: Sat Sep 21 03:57:56 2013 New Revision: 255754 URL: http://svnweb.freebsd.org/changeset/base/255754 Log: Remove additional non-FreeBSD code. Approved by: glebius (mentor) Approved by: re (blanket) Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_compat.h Sat Sep 21 03:52:08 2013 (r255753) +++ head/sys/contrib/ipfilter/netinet/ip_compat.h Sat Sep 21 03:57:56 2013 (r255754) @@ -37,24 +37,6 @@ !defined(_KERNEL) && !defined(USE_INET6) && !defined(NOINET6) # define USE_INET6 #endif -#if defined(__NetBSD_Version__) && (__NetBSD_Version__ >= 105000000) && \ - !defined(_KERNEL) && !defined(USE_INET6) -# define USE_INET6 -#endif -#if defined(__NetBSD_Version__) && (__NetBSD_Version__ >= 106140000) && \ - defined(_KERNEL) && \ - (!defined(IPFILTER_LKM) || (__NetBSD_Version__ >= 399000100)) -# define IPFILTER_M_IPFILTER -#endif -#if !defined(USE_INET6) -# if defined(OpenBSD) && (OpenBSD >= 200206) && \ - !defined(_KERNEL) && !defined(USE_INET6) -# define USE_INET6 -# endif -# if defined(HPUXREV) && (HPUXREV >= 1111) -# define USE_INET6 -# endif -#endif #if defined(__SVR4) || defined(__svr4__) || defined(__sgi) @@ -546,13 +528,8 @@ MALLOC_DECLARE(M_IPFILTER); # define GETIFMTU_6(x) ((struct ifnet *)x)->if_mtu # if !defined(USE_MUTEXES) && !defined(SPL_NET) -# if (defined(NetBSD) && (NetBSD <= 1991011) && (NetBSD >= 199407)) || \ - OPENBSD_GE_REV(200006) -# define SPL_NET(x) x = splsoftnet() -# else -# define SPL_IMP(x) x = splimp() -# define SPL_NET(x) x = splnet() -# endif /* NetBSD && (NetBSD <= 1991011) && (NetBSD >= 199407) */ +# define SPL_IMP(x) x = splimp() +# define SPL_NET(x) x = splnet() # if !defined(SPL_SCHED) # define SPL_SCHED(x) x = splsched() # endif From owner-svn-src-all@FreeBSD.ORG Sat Sep 21 04:05:39 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 93E2C513; Sat, 21 Sep 2013 04:05:39 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 68134250D; Sat, 21 Sep 2013 04:05:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8L45d0b025975; Sat, 21 Sep 2013 04:05:39 GMT (envelope-from cy@svn.freebsd.org) Received: (from cy@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8L45dXM025973; Sat, 21 Sep 2013 04:05:39 GMT (envelope-from cy@svn.freebsd.org) Message-Id: <201309210405.r8L45dXM025973@svn.freebsd.org> From: Cy Schubert Date: Sat, 21 Sep 2013 04:05:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255755 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Sep 2013 04:05:39 -0000 Author: cy Date: Sat Sep 21 04:05:38 2013 New Revision: 255755 URL: http://svnweb.freebsd.org/changeset/base/255755 Log: Convert ipfilter from timeout(9) to callout(9). Submitted by: jhb Approved by: glebius (mentor) Approved by: re (blanket) Modified: head/sys/contrib/ipfilter/netinet/ip_fil.h head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Modified: head/sys/contrib/ipfilter/netinet/ip_fil.h ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_fil.h Sat Sep 21 03:57:56 2013 (r255754) +++ head/sys/contrib/ipfilter/netinet/ip_fil.h Sat Sep 21 04:05:38 2013 (r255755) @@ -1654,7 +1654,7 @@ typedef struct ipf_main_softc_s { ipftoken_t **ipf_token_tail; #if defined(__FreeBSD_version) && (__FreeBSD_version >= 300000) && \ defined(_KERNEL) - struct callout_handle ipf_slow_ch; + struct callout ipf_slow_ch; #endif #if defined(linux) && defined(_KERNEL) struct timer_list ipf_timer; Modified: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Sat Sep 21 03:57:56 2013 (r255754) +++ head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Sat Sep 21 04:05:38 2013 (r255755) @@ -178,11 +178,13 @@ ipf_timer_func(arg) ipf_slowtimer(softc); if (softc->ipf_running == -1 || softc->ipf_running == 1) { -#if FREEBSD_GE_REV(300000) +#if 0 softc->ipf_slow_ch = timeout(ipf_timer_func, softc, hz/2); -#else - timeout(ipf_timer_func, softc, hz/2); #endif + callout_init(&softc->ipf_slow_ch, CALLOUT_MPSAFE); + callout_reset(&softc->ipf_slow_ch, + (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT, + ipf_timer_func, softc); } RWLOCK_EXIT(&softc->ipf_global); SPL_X(s); @@ -223,8 +225,13 @@ ipfattach(softc) ipid = 0; SPL_X(s); +#if 0 softc->ipf_slow_ch = timeout(ipf_timer_func, softc, (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT); +#endif + callout_init(&softc->ipf_slow_ch, CALLOUT_MPSAFE); + callout_reset(&softc->ipf_slow_ch, (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT, + ipf_timer_func, softc); return 0; } @@ -246,9 +253,12 @@ ipfdetach(softc) SPL_NET(s); +#if 0 if (softc->ipf_slow_ch.callout != NULL) untimeout(ipf_timer_func, softc, softc->ipf_slow_ch); bzero(&softc->ipf_slow, sizeof(softc->ipf_slow)); +#endif + callout_drain(&softc->ipf_slow_ch); #ifndef NETBSD_PF if (ipf_checkp != NULL) From owner-svn-src-all@FreeBSD.ORG Sat Sep 21 04:08:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B17D8674; Sat, 21 Sep 2013 04:08:52 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 902FD2527; Sat, 21 Sep 2013 04:08:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8L48qZ0026815; Sat, 21 Sep 2013 04:08:52 GMT (envelope-from cy@svn.freebsd.org) Received: (from cy@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8L48qaI026814; Sat, 21 Sep 2013 04:08:52 GMT (envelope-from cy@svn.freebsd.org) Message-Id: <201309210408.r8L48qaI026814@svn.freebsd.org> From: Cy Schubert Date: Sat, 21 Sep 2013 04:08:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255756 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Sep 2013 04:08:52 -0000 Author: cy Date: Sat Sep 21 04:08:52 2013 New Revision: 255756 URL: http://svnweb.freebsd.org/changeset/base/255756 Log: Enable main ipfilter sysctl MIBs. Approved by: glebius (mentor) Approved by: re (blanket) Modified: head/sys/contrib/ipfilter/netinet/mlfk_ipl.c Modified: head/sys/contrib/ipfilter/netinet/mlfk_ipl.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/mlfk_ipl.c Sat Sep 21 04:05:38 2013 (r255755) +++ head/sys/contrib/ipfilter/netinet/mlfk_ipl.c Sat Sep 21 04:08:52 2013 (r255756) @@ -41,9 +41,7 @@ static struct cdev *ipf_devs[IPL_LOGSIZE static dev_t ipf_devs[IPL_LOGSIZE]; #endif -#if 0 static int sysctl_ipf_int ( SYSCTL_HANDLER_ARGS ); -#endif static int ipf_modload(void); static int ipf_modunload(void); @@ -68,7 +66,6 @@ static int ipfwrite __P((dev_t, struct u #endif /* __FreeBSD_version >= 502116 */ - SYSCTL_DECL(_net_inet); #define SYSCTL_IPF(parent, nbr, name, access, ptr, val, descr) \ SYSCTL_OID(parent, nbr, name, CTLTYPE_INT|access, \ @@ -76,55 +73,58 @@ SYSCTL_DECL(_net_inet); #define CTLFLAG_OFF 0x00800000 /* IPFilter must be disabled */ #define CTLFLAG_RWO (CTLFLAG_RW|CTLFLAG_OFF) SYSCTL_NODE(_net_inet, OID_AUTO, ipf, CTLFLAG_RW, 0, "IPF"); -#if 0 -SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_flags, CTLFLAG_RW, &ipf_flags, 0, ""); -SYSCTL_IPF(_net_inet_ipf, OID_AUTO, ipf_pass, CTLFLAG_RW, &ipf_pass, 0, ""); -SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_active, CTLFLAG_RD, &ipf_active, 0, ""); +SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_flags, CTLFLAG_RW, &ipfmain.ipf_flags, 0, ""); +SYSCTL_IPF(_net_inet_ipf, OID_AUTO, ipf_pass, CTLFLAG_RW, &ipfmain.ipf_pass, 0, ""); +SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_active, CTLFLAG_RD, &ipfmain.ipf_active, 0, ""); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_tcpidletimeout, CTLFLAG_RWO, - &ipf_tcpidletimeout, 0, ""); + &ipfmain.ipf_tcpidletimeout, 0, ""); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_tcphalfclosed, CTLFLAG_RWO, - &ipf_tcphalfclosed, 0, ""); + &ipfmain.ipf_tcphalfclosed, 0, ""); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_tcpclosewait, CTLFLAG_RWO, - &ipf_tcpclosewait, 0, ""); + &ipfmain.ipf_tcpclosewait, 0, ""); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_tcplastack, CTLFLAG_RWO, - &ipf_tcplastack, 0, ""); + &ipfmain.ipf_tcplastack, 0, ""); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_tcptimeout, CTLFLAG_RWO, - &ipf_tcptimeout, 0, ""); + &ipfmain.ipf_tcptimeout, 0, ""); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_tcpclosed, CTLFLAG_RWO, - &ipf_tcpclosed, 0, ""); + &ipfmain.ipf_tcpclosed, 0, ""); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_udptimeout, CTLFLAG_RWO, - &ipf_udptimeout, 0, ""); + &ipfmain.ipf_udptimeout, 0, ""); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_udpacktimeout, CTLFLAG_RWO, - &ipf_udpacktimeout, 0, ""); + &ipfmain.ipf_udpacktimeout, 0, ""); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_icmptimeout, CTLFLAG_RWO, - &ipf_icmptimeout, 0, ""); + &ipfmain.ipf_icmptimeout, 0, ""); +#if 0 +/* this needs to be resolved at compile time */ SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_defnatage, CTLFLAG_RWO, - &ipf_nat_defage, 0, ""); + &((ipf_nat_softc_t *)ipfmain.ipf_nat_soft)->ipf_nat_defage, 0, ""); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_ipfrttl, CTLFLAG_RW, &ipf_ipfrttl, 0, ""); +#endif SYSCTL_IPF(_net_inet_ipf, OID_AUTO, ipf_running, CTLFLAG_RD, - &ipf_running, 0, ""); + &ipfmain.ipf_running, 0, ""); +#if 0 SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_statesize, CTLFLAG_RWO, - &ipf_state_size, 0, ""); + &ipfmain.ipf_state_soft)->ipf_state_size, 0, ""); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_statemax, CTLFLAG_RWO, - &ipf_state_max, 0, ""); + &(ipfmain.ipf_state_soft)->ipf_state_max, 0, ""); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, ipf_nattable_sz, CTLFLAG_RWO, - &ipf_nat_table_sz, 0, ""); + &(ipfmain.ipf_nat_soft)->ipf_nat_table_sz, 0, ""); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, ipf_natrules_sz, CTLFLAG_RWO, - &ipf_nat_maprules_sz, 0, ""); + &(ipfmain.ipf_nat_soft)->ipf_nat_maprules_sz, 0, ""); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, ipf_rdrrules_sz, CTLFLAG_RWO, - &ipf_nat_rdrrules_sz, 0, ""); + &(ipfmain.ipf_nat_soft)->ipf_nat_rdrrules_sz, 0, ""); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, ipf_hostmap_sz, CTLFLAG_RWO, - &ipf_nat_hostmap_sz, 0, ""); + &(ipfmain.ipf_nat_soft)->ipf_nat_hostmap_sz, 0, ""); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_authsize, CTLFLAG_RWO, &ipf_auth_size, 0, ""); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_authused, CTLFLAG_RD, &ipf_auth_used, 0, ""); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_defaultauthage, CTLFLAG_RW, &ipf_auth_defaultage, 0, ""); -SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_chksrc, CTLFLAG_RW, &ipf_chksrc, 0, ""); -SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_minttl, CTLFLAG_RW, &ipf_minttl, 0, ""); #endif +SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_chksrc, CTLFLAG_RW, &ipfmain.ipf_chksrc, 0, ""); +SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_minttl, CTLFLAG_RW, &ipfmain.ipf_minttl, 0, ""); #define CDEV_MAJOR 79 #include @@ -308,7 +308,6 @@ MODULE_VERSION(ipfilter, 1); #endif -#if 0 #ifdef SYSCTL_IPF int sysctl_ipf_int ( SYSCTL_HANDLER_ARGS ) @@ -334,7 +333,6 @@ sysctl_ipf_int ( SYSCTL_HANDLER_ARGS ) return (error); } #endif -#endif static int From owner-svn-src-all@FreeBSD.ORG Sat Sep 21 04:11:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 86AD37BE; Sat, 21 Sep 2013 04:11:52 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 73CE32559; Sat, 21 Sep 2013 04:11:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8L4BqMZ029705; Sat, 21 Sep 2013 04:11:52 GMT (envelope-from cy@svn.freebsd.org) Received: (from cy@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8L4BqhI029704; Sat, 21 Sep 2013 04:11:52 GMT (envelope-from cy@svn.freebsd.org) Message-Id: <201309210411.r8L4BqhI029704@svn.freebsd.org> From: Cy Schubert Date: Sat, 21 Sep 2013 04:11:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255757 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Sep 2013 04:11:52 -0000 Author: cy Date: Sat Sep 21 04:11:51 2013 New Revision: 255757 URL: http://svnweb.freebsd.org/changeset/base/255757 Log: Address double init of ip_log mutex, fixing a panic after ipfilter is re-enabled following it being disabled. Approved by: glebius (mentor) Approved by: re (blanket) Modified: head/sys/contrib/ipfilter/netinet/ip_log.c Modified: head/sys/contrib/ipfilter/netinet/ip_log.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_log.c Sat Sep 21 04:08:52 2013 (r255756) +++ head/sys/contrib/ipfilter/netinet/ip_log.c Sat Sep 21 04:11:51 2013 (r255757) @@ -324,7 +324,7 @@ ipf_log_soft_fini(softc, arg) # endif MUTEX_ENTER(&softl->ipl_mutex[i]); } - MUTEX_EXIT(&softl->ipl_mutex[i]); + MUTEX_DESTROY(&softl->ipl_mutex[i]); } return 0; From owner-svn-src-all@FreeBSD.ORG Sat Sep 21 10:01:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 06DCC76F; Sat, 21 Sep 2013 10:01:52 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E89D22575; Sat, 21 Sep 2013 10:01:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8LA1pN0012737; Sat, 21 Sep 2013 10:01:51 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8LA1pi1012735; Sat, 21 Sep 2013 10:01:51 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201309211001.r8LA1pi1012735@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 21 Sep 2013 10:01:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255759 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Sep 2013 10:01:52 -0000 Author: bz Date: Sat Sep 21 10:01:51 2013 New Revision: 255759 URL: http://svnweb.freebsd.org/changeset/base/255759 Log: Introduce spares in the TCP syncache and timewait structures so that fixed TCP_SIGNATURE handling can later be merged. This is derived from follow-up work to SVN r183001 posted to net@ on Sep 13 2008. Approved by: re (gjb) Modified: head/sys/netinet/tcp_syncache.h head/sys/netinet/tcp_var.h Modified: head/sys/netinet/tcp_syncache.h ============================================================================== --- head/sys/netinet/tcp_syncache.h Sat Sep 21 09:17:14 2013 (r255758) +++ head/sys/netinet/tcp_syncache.h Sat Sep 21 10:01:51 2013 (r255759) @@ -75,6 +75,7 @@ struct syncache { struct label *sc_label; /* MAC label reference */ struct ucred *sc_cred; /* cred cache for jail checks */ + void *sc_pspare; /* TCP_SIGNATURE */ u_int32_t sc_spare[2]; /* UTO */ }; Modified: head/sys/netinet/tcp_var.h ============================================================================== --- head/sys/netinet/tcp_var.h Sat Sep 21 09:17:14 2013 (r255758) +++ head/sys/netinet/tcp_var.h Sat Sep 21 10:01:51 2013 (r255759) @@ -211,7 +211,7 @@ struct tcpcb { u_int t_tsomax; /* tso burst length limit */ uint32_t t_ispare[8]; /* 5 UTO, 3 TBD */ - void *t_pspare2[4]; /* 4 TBD */ + void *t_pspare2[4]; /* 1 TCP_SIGNATURE, 3 TBD */ uint64_t _pad[6]; /* 6 TBD (1-2 CC/RTT?) */ }; @@ -353,6 +353,8 @@ struct tcptw { u_int t_starttime; int tw_time; TAILQ_ENTRY(tcptw) tw_2msl; + void *tw_pspare; /* TCP_SIGNATURE */ + u_int *tw_spare; /* TCP_SIGNATURE */ }; #define intotcpcb(ip) ((struct tcpcb *)(ip)->inp_ppcb) From owner-svn-src-all@FreeBSD.ORG Sat Sep 21 11:10:10 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3488DC28; Sat, 21 Sep 2013 11:10:10 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 08B5028C0; Sat, 21 Sep 2013 11:10:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8LBA9JF049098; Sat, 21 Sep 2013 11:10:09 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8LBA96W049097; Sat, 21 Sep 2013 11:10:09 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309211110.r8LBA96W049097@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sat, 21 Sep 2013 11:10:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255760 - head/secure/usr.bin/bdes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Sep 2013 11:10:10 -0000 Author: des Date: Sat Sep 21 11:10:09 2013 New Revision: 255760 URL: http://svnweb.freebsd.org/changeset/base/255760 Log: Replace claims that DES is a strong cryptosystem with a warning stating that it should no longer be considered secure. Approved by: re (gjb) Modified: head/secure/usr.bin/bdes/bdes.1 Modified: head/secure/usr.bin/bdes/bdes.1 ============================================================================== --- head/secure/usr.bin/bdes/bdes.1 Sat Sep 21 10:01:51 2013 (r255759) +++ head/secure/usr.bin/bdes/bdes.1 Sat Sep 21 11:10:09 2013 (r255760) @@ -35,12 +35,12 @@ .\" @(#)bdes.1 8.1 (Berkeley) 6/29/93 .\" $FreeBSD$ .\" -.Dd June 29, 1993 +.Dd September 20, 2013 .Dt BDES 1 .Os .Sh NAME .Nm bdes -.Nd "encrypt/decrypt using the Data Encryption Standard (DES)" +.Nd "encrypt / decrypt using the Data Encryption Standard (DES)" .Sh SYNOPSIS .Nm .Op Fl abdp @@ -51,6 +51,11 @@ .Op Fl o Ar N .Op Fl v Ar vector .Sh DESCRIPTION +.Bf -symbolic +The DES cipher should no longer be considered secure. +Please consider using a more modern alternative. +.Ef +.Pp The .Nm utility implements all @@ -215,22 +220,6 @@ is given in binary or hex, and can be disabled for .Tn ASCII keys as well. -.Pp -The -.Tn DES -is considered a very strong cryptosystem, -and other than table lookup attacks, -key search attacks, -and Hellman's time-memory tradeoff -(all of which are very expensive and time-consuming), -no cryptanalytic methods -for breaking the -.Tn DES -are known in the open literature. -No doubt the choice of keys -and key security -are the most vulnerable aspect of -.Nm . .Sh IMPLEMENTATION NOTES For implementors wishing to write software compatible with this program, @@ -347,16 +336,6 @@ OUT OF THE USE OF THIS SOFTWARE, EVEN IF SUCH DAMAGE. .Ed .Sh BUGS -There is a controversy raging over whether the -.Tn DES -will still be secure -in a few years. -The advent of special-purpose hardware -could reduce the cost of any of the -methods of attack named above -so that they are no longer -computationally infeasible. -.Pp As the key or key schedule is stored in memory, the encryption can be From owner-svn-src-all@FreeBSD.ORG Sat Sep 21 14:22:07 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B0F09485; Sat, 21 Sep 2013 14:22:07 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9E9A8214B; Sat, 21 Sep 2013 14:22:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8LEM7dV053001; Sat, 21 Sep 2013 14:22:07 GMT (envelope-from cy@svn.freebsd.org) Received: (from cy@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8LEM73r053000; Sat, 21 Sep 2013 14:22:07 GMT (envelope-from cy@svn.freebsd.org) Message-Id: <201309211422.r8LEM73r053000@svn.freebsd.org> From: Cy Schubert Date: Sat, 21 Sep 2013 14:22:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255761 - head/contrib/ipfilter X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Sep 2013 14:22:07 -0000 Author: cy Date: Sat Sep 21 14:22:07 2013 New Revision: 255761 URL: http://svnweb.freebsd.org/changeset/base/255761 Log: Check return code from inet_pton. Discovered by: Coverity. Approved by: glebius (mentor) Approved by: re (blanket) Modified: head/contrib/ipfilter/ip_fil.c Modified: head/contrib/ipfilter/ip_fil.c ============================================================================== --- head/contrib/ipfilter/ip_fil.c Sat Sep 21 11:10:09 2013 (r255760) +++ head/contrib/ipfilter/ip_fil.c Sat Sep 21 14:22:07 2013 (r255761) @@ -228,7 +228,19 @@ ipf_setifpaddr(ifp, addr) sin6 = (struct sockaddr_in6 *)&ifa->ifa_addr; sin6->sin6_family = AF_INET6; - inet_pton(AF_INET6, addr, &sin6->sin6_addr); + /* Abort if bad address. */ + switch (inet_pton(AF_INET6, addr, &sin6->sin6_addr)) + { + case 1: + break; + case -1: + perror("inet_pton"); + abort(); + break; + default: + abort(); + break; + } } else #endif { From owner-svn-src-all@FreeBSD.ORG Sat Sep 21 14:23:21 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0BF7769C; Sat, 21 Sep 2013 14:23:21 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id ED24D2159; Sat, 21 Sep 2013 14:23:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8LENKcR053372; Sat, 21 Sep 2013 14:23:20 GMT (envelope-from cy@svn.freebsd.org) Received: (from cy@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8LENK3M053371; Sat, 21 Sep 2013 14:23:20 GMT (envelope-from cy@svn.freebsd.org) Message-Id: <201309211423.r8LENK3M053371@svn.freebsd.org> From: Cy Schubert Date: Sat, 21 Sep 2013 14:23:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255762 - in head/contrib/ipfilter: . BSD FWTK FreeBSD FreeBSD-2.2 FreeBSD-3 FreeBSD-4.0 etc perl test X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Sep 2013 14:23:21 -0000 Author: cy Date: Sat Sep 21 14:23:20 2013 New Revision: 255762 URL: http://svnweb.freebsd.org/changeset/base/255762 Log: Remove redundant files. Approved by: glebius (mentor) Approved by: re (blanket) Deleted: head/contrib/ipfilter/BSD/ head/contrib/ipfilter/FAQ.FreeBSD head/contrib/ipfilter/FWTK/ head/contrib/ipfilter/FreeBSD/ head/contrib/ipfilter/FreeBSD-2.2/ head/contrib/ipfilter/FreeBSD-3/ head/contrib/ipfilter/FreeBSD-4.0/ head/contrib/ipfilter/IMPORTANT head/contrib/ipfilter/INST.FreeBSD-2.2 head/contrib/ipfilter/INSTALL.FreeBSD head/contrib/ipfilter/INSTALL.xBSD head/contrib/ipfilter/IPF.KANJI head/contrib/ipfilter/WhatsNew40.txt head/contrib/ipfilter/bsdinstall head/contrib/ipfilter/etc/ head/contrib/ipfilter/perl/ head/contrib/ipfilter/test/ head/contrib/ipfilter/todo From owner-svn-src-all@FreeBSD.ORG Sat Sep 21 16:46:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 68772455; Sat, 21 Sep 2013 16:46:37 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 52E6D28F1; Sat, 21 Sep 2013 16:46:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8LGkb0I032270; Sat, 21 Sep 2013 16:46:37 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8LGkYbF032233; Sat, 21 Sep 2013 16:46:34 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201309211646.r8LGkYbF032233@svn.freebsd.org> From: Mark Johnston Date: Sat, 21 Sep 2013 16:46:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255763 - in stable/9/sys: cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/sys cddl/dev/dtrace cddl/dev/fbt cddl/dev/sdt kern netinet sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Sep 2013 16:46:37 -0000 Author: markj Date: Sat Sep 21 16:46:34 2013 New Revision: 255763 URL: http://svnweb.freebsd.org/changeset/base/255763 Log: MFC r252894: Add SDT_PROBE_DEFINE0 for consistency with SDT_PROBE0. MFC r253022: Also define SDT_PROBE_DEFINE0 for the !KDTRACE_HOOKS case. MFC r254266: Add event handlers for module load and unload events. The load handlers are called after the module has been loaded, and the unload handlers are called before the module is unloaded. Moreover, the module unload handlers may return an error to prevent the unload from proceeding. MFC r254267: Remove some unused fields from struct linker_file. They were added in r172862 for use by the DTrace SDT framework but don't seem to have ever been used. MFC r254268: FreeBSD's DTrace implementation has a few problems with respect to handling probes declared in a kernel module when that module is unloaded. In particular, * Unloading a module with active SDT probes will cause a panic. [1] * A module's (FBT/SDT) probes aren't destroyed when the module is unloaded; trying to use them after the fact will generally cause a panic. This change fixes both problems by porting the DTrace module load/unload handlers from illumos and registering them with the corresponding EVENTHANDLER(9) handlers. This allows the DTrace framework to destroy all probes defined in a module when that module is unloaded, and to prevent a module unload from proceeding if some of its probes are active. The latter problem has already been fixed for FBT probes by checking lf->nenabled in kern_kldunload(), but moving the check into the DTrace framework generalizes it to all kernel providers and also fixes a race in the current implementation (since a probe may be activated between the check and the call to linker_file_unload()). Additionally, the SDT implementation has been reworked to define SDT providers/probes/argtypes in linker sets rather than using SYSINIT/SYSUNINIT to create and destroy SDT probes when a module is loaded or unloaded. This simplifies things quite a bit since it means that pretty much all of the SDT code can live in sdt.ko, and since it becomes easier to integrate SDT with the DTrace framework. Furthermore, this allows FreeBSD to be quite flexible in that SDT providers spanning multiple modules can be created on the fly when a module is loaded; at the moment it looks like illumos' SDT implementation requires all SDT probes to be statically defined in a single kernel table. MFC r254309: Use kld_{load,unload} instead of mod_{load,unload} for the linker file load and unload event handlers added in r254266. MFC r254350: Specify SDT probe argument types in the probe definition itself rather than using SDT_PROBE_ARGTYPE(). This will make it easy to extend the SDT(9) API to allow probes with dynamically-translated types. Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h stable/9/sys/cddl/dev/dtrace/dtrace_load.c stable/9/sys/cddl/dev/dtrace/dtrace_unload.c stable/9/sys/cddl/dev/fbt/fbt.c stable/9/sys/cddl/dev/sdt/sdt.c stable/9/sys/kern/kern_exec.c stable/9/sys/kern/kern_exit.c stable/9/sys/kern/kern_fork.c stable/9/sys/kern/kern_linker.c stable/9/sys/kern/kern_proc.c stable/9/sys/kern/kern_sdt.c stable/9/sys/kern/kern_sig.c stable/9/sys/kern/kern_timeout.c stable/9/sys/kern/vfs_syscalls.c stable/9/sys/netinet/sctp_dtrace_define.h stable/9/sys/sys/eventhandler.h stable/9/sys/sys/linker.h stable/9/sys/sys/sdt.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sat Sep 21 14:23:20 2013 (r255762) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sat Sep 21 16:46:34 2013 (r255763) @@ -115,6 +115,7 @@ #if !defined(sun) #include #include +#include #include #include #include @@ -239,6 +240,8 @@ int dtrace_in_probe; /* non-zero if exe #if defined(__i386__) || defined(__amd64__) uintptr_t dtrace_in_probe_addr; /* Address of invop when already in probe */ #endif +static eventhandler_tag dtrace_kld_load_tag; +static eventhandler_tag dtrace_kld_unload_tag; #endif /* @@ -8035,19 +8038,6 @@ dtrace_probe_description(const dtrace_pr (void) strncpy(pdp->dtpd_name, prp->dtpr_name, DTRACE_NAMELEN - 1); } -#if !defined(sun) -static int -dtrace_probe_provide_cb(linker_file_t lf, void *arg) -{ - dtrace_provider_t *prv = (dtrace_provider_t *) arg; - - prv->dtpv_pops.dtps_provide_module(prv->dtpv_arg, lf); - - return(0); -} -#endif - - /* * Called to indicate that a probe -- or probes -- should be provided by a * specfied provider. If the specified description is NULL, the provider will @@ -8101,8 +8091,6 @@ dtrace_probe_provide(dtrace_probedesc_t prv->dtpv_pops.dtps_provide_module(prv->dtpv_arg, ctl); } while ((ctl = ctl->mod_next) != &modules); -#else - (void) linker_file_foreach(dtrace_probe_provide_cb, prv); #endif mutex_exit(&mod_lock); @@ -15121,7 +15109,6 @@ dtrace_helpers_duplicate(proc_t *from, p dtrace_helper_provider_register(to, newhelp, NULL); } -#if defined(sun) /* * DTrace Hook Functions */ @@ -15133,7 +15120,9 @@ dtrace_module_loaded(modctl_t *ctl) mutex_enter(&dtrace_provider_lock); mutex_enter(&mod_lock); +#if defined(sun) ASSERT(ctl->mod_busy); +#endif /* * We're going to call each providers per-module provide operation @@ -15179,17 +15168,46 @@ dtrace_module_loaded(modctl_t *ctl) } static void +#if defined(sun) dtrace_module_unloaded(modctl_t *ctl) +#else +dtrace_module_unloaded(modctl_t *ctl, int *error) +#endif { dtrace_probe_t template, *probe, *first, *next; dtrace_provider_t *prov; +#if !defined(sun) + char modname[DTRACE_MODNAMELEN]; + size_t len; +#endif +#if defined(sun) template.dtpr_mod = ctl->mod_modname; +#else + /* Handle the fact that ctl->filename may end in ".ko". */ + strlcpy(modname, ctl->filename, sizeof(modname)); + len = strlen(ctl->filename); + if (len > 3 && strcmp(modname + len - 3, ".ko") == 0) + modname[len - 3] = '\0'; + template.dtpr_mod = modname; +#endif mutex_enter(&dtrace_provider_lock); mutex_enter(&mod_lock); mutex_enter(&dtrace_lock); +#if !defined(sun) + if (ctl->nenabled > 0) { + /* Don't allow unloads if a probe is enabled. */ + mutex_exit(&dtrace_provider_lock); + mutex_exit(&dtrace_lock); + *error = -1; + printf( + "kldunload: attempt to unload module that has DTrace probes enabled\n"); + return; + } +#endif + if (dtrace_bymod == NULL) { /* * The DTrace module is loaded (obviously) but not attached; @@ -15219,8 +15237,13 @@ dtrace_module_unloaded(modctl_t *ctl) * probe, either. */ if (dtrace_err_verbose) { +#if defined(sun) cmn_err(CE_WARN, "unloaded module '%s' had " "enabled probes", ctl->mod_modname); +#else + cmn_err(CE_WARN, "unloaded module '%s' had " + "enabled probes", modname); +#endif } return; @@ -15263,7 +15286,11 @@ dtrace_module_unloaded(modctl_t *ctl) kmem_free(probe->dtpr_mod, strlen(probe->dtpr_mod) + 1); kmem_free(probe->dtpr_func, strlen(probe->dtpr_func) + 1); kmem_free(probe->dtpr_name, strlen(probe->dtpr_name) + 1); +#if defined(sun) vmem_free(dtrace_arena, (void *)(uintptr_t)probe->dtpr_id, 1); +#else + free_unr(dtrace_arena, probe->dtpr_id); +#endif kmem_free(probe, sizeof (dtrace_probe_t)); } @@ -15272,6 +15299,26 @@ dtrace_module_unloaded(modctl_t *ctl) mutex_exit(&dtrace_provider_lock); } +#if !defined(sun) +static void +dtrace_kld_load(void *arg __unused, linker_file_t lf) +{ + + dtrace_module_loaded(lf); +} + +static void +dtrace_kld_unload(void *arg __unused, linker_file_t lf, int *error) +{ + + if (*error != 0) + /* We already have an error, so don't do anything. */ + return; + dtrace_module_unloaded(lf, error); +} +#endif + +#if defined(sun) static void dtrace_suspend(void) { Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Sat Sep 21 14:23:20 2013 (r255762) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Sat Sep 21 16:46:34 2013 (r255763) @@ -2287,8 +2287,10 @@ extern void dtrace_membar_producer(void) extern void dtrace_membar_consumer(void); extern void (*dtrace_cpu_init)(processorid_t); +#if defined(sun) extern void (*dtrace_modload)(modctl_t *); extern void (*dtrace_modunload)(modctl_t *); +#endif extern void (*dtrace_helpers_cleanup)(void); extern void (*dtrace_helpers_fork)(proc_t *parent, proc_t *child); extern void (*dtrace_cpustart_init)(void); Modified: stable/9/sys/cddl/dev/dtrace/dtrace_load.c ============================================================================== --- stable/9/sys/cddl/dev/dtrace/dtrace_load.c Sat Sep 21 14:23:20 2013 (r255762) +++ stable/9/sys/cddl/dev/dtrace/dtrace_load.c Sat Sep 21 16:46:34 2013 (r255763) @@ -56,6 +56,12 @@ dtrace_load(void *dummy) /* Hang our hook for exceptions. */ dtrace_invop_init(); + /* Register callbacks for linker file load and unload events. */ + dtrace_kld_load_tag = EVENTHANDLER_REGISTER(kld_load, + dtrace_kld_load, NULL, EVENTHANDLER_PRI_ANY); + dtrace_kld_unload_tag = EVENTHANDLER_REGISTER(kld_unload, + dtrace_kld_unload, NULL, EVENTHANDLER_PRI_ANY); + /* * XXX This is a short term hack to avoid having to comment * out lots and lots of lock/unlock calls. Modified: stable/9/sys/cddl/dev/dtrace/dtrace_unload.c ============================================================================== --- stable/9/sys/cddl/dev/dtrace/dtrace_unload.c Sat Sep 21 14:23:20 2013 (r255762) +++ stable/9/sys/cddl/dev/dtrace/dtrace_unload.c Sat Sep 21 16:46:34 2013 (r255763) @@ -67,6 +67,8 @@ dtrace_unload() } dtrace_provider = NULL; + EVENTHANDLER_DEREGISTER(kld_load, dtrace_kld_load_tag); + EVENTHANDLER_DEREGISTER(kld_unload, dtrace_kld_unload_tag); if ((state = dtrace_anon_grab()) != NULL) { /* Modified: stable/9/sys/cddl/dev/fbt/fbt.c ============================================================================== --- stable/9/sys/cddl/dev/fbt/fbt.c Sat Sep 21 14:23:20 2013 (r255762) +++ stable/9/sys/cddl/dev/fbt/fbt.c Sat Sep 21 16:46:34 2013 (r255763) @@ -1329,6 +1329,15 @@ fbt_getargdesc(void *arg __unused, dtrac return; } +static int +fbt_linker_file_cb(linker_file_t lf, void *arg) +{ + + fbt_provide_module(arg, lf); + + return (0); +} + static void fbt_load(void *dummy) { @@ -1353,8 +1362,10 @@ fbt_load(void *dummy) if (dtrace_register("fbt", &fbt_attr, DTRACE_PRIV_USER, NULL, &fbt_pops, NULL, &fbt_id) != 0) return; -} + /* Create probes for the kernel and already-loaded modules. */ + linker_file_foreach(fbt_linker_file_cb, NULL); +} static int fbt_unload() Modified: stable/9/sys/cddl/dev/sdt/sdt.c ============================================================================== --- stable/9/sys/cddl/dev/sdt/sdt.c Sat Sep 21 14:23:20 2013 (r255762) +++ stable/9/sys/cddl/dev/sdt/sdt.c Sat Sep 21 16:46:34 2013 (r255763) @@ -24,36 +24,44 @@ * */ -#ifndef KDTRACE_HOOKS -#define KDTRACE_HOOKS -#endif +#include "opt_kdtrace.h" #include #include #include + #include +#include #include #include -#include #include +#include +#include +#include #include #include - -#include +#include #include -#define SDT_ADDR2NDX(addr) (((uintptr_t)(addr)) >> 4) +#include +#include -static d_open_t sdt_open; -static int sdt_unload(void); +/* DTrace methods. */ static void sdt_getargdesc(void *, dtrace_id_t, void *, dtrace_argdesc_t *); static void sdt_provide_probes(void *, dtrace_probedesc_t *); static void sdt_destroy(void *, dtrace_id_t, void *); static void sdt_enable(void *, dtrace_id_t, void *); static void sdt_disable(void *, dtrace_id_t, void *); + +static d_open_t sdt_open; static void sdt_load(void *); -static int sdt_provider_unreg_callback(struct sdt_provider *prov, - void *arg); +static int sdt_unload(void *); +static void sdt_create_provider(struct sdt_provider *); +static void sdt_create_probe(struct sdt_probe *); +static void sdt_kld_load(void *, struct linker_file *); +static void sdt_kld_unload(void *, struct linker_file *, int *); + +static MALLOC_DEFINE(M_SDT, "SDT", "DTrace SDT providers"); static struct cdevsw sdt_cdevsw = { .d_version = D_VERSION, @@ -79,141 +87,261 @@ static dtrace_pops_t sdt_pops = { sdt_getargdesc, NULL, NULL, - sdt_destroy + sdt_destroy, }; -static struct cdev *sdt_cdev; +static struct cdev *sdt_cdev; -static int -sdt_argtype_callback(struct sdt_argtype *argtype, void *arg) -{ - dtrace_argdesc_t *desc = arg; +static TAILQ_HEAD(, sdt_provider) sdt_prov_list; - if (desc->dtargd_ndx == argtype->ndx) { - desc->dtargd_mapping = desc->dtargd_ndx; /* XXX */ - strlcpy(desc->dtargd_native, argtype->type, - sizeof(desc->dtargd_native)); - desc->dtargd_xlate[0] = '\0'; /* XXX */ - } - - return (0); -} +eventhandler_tag sdt_kld_load_tag; +eventhandler_tag sdt_kld_unload_tag; static void -sdt_getargdesc(void *arg, dtrace_id_t id, void *parg, dtrace_argdesc_t *desc) +sdt_create_provider(struct sdt_provider *prov) { - struct sdt_probe *probe = parg; + struct sdt_provider *curr, *newprov; - if (desc->dtargd_ndx < probe->n_args) - (void) (sdt_argtype_listall(probe, sdt_argtype_callback, desc)); - else - desc->dtargd_ndx = DTRACE_ARGNONE; + TAILQ_FOREACH(curr, &sdt_prov_list, prov_entry) + if (strcmp(prov->name, curr->name) == 0) { + /* The provider has already been defined. */ + curr->sdt_refs++; + return; + } - return; + /* + * Make a copy of prov so that we don't lose fields if its module is + * unloaded but the provider isn't destroyed. This could happen with + * a provider that spans multiple modules. + */ + newprov = malloc(sizeof(*newprov), M_SDT, M_WAITOK | M_ZERO); + newprov->name = strdup(prov->name, M_SDT); + prov->sdt_refs = newprov->sdt_refs = 1; + TAILQ_INIT(&newprov->probe_list); + + TAILQ_INSERT_TAIL(&sdt_prov_list, newprov, prov_entry); + + (void)dtrace_register(newprov->name, &sdt_attr, DTRACE_PRIV_USER, NULL, + &sdt_pops, NULL, (dtrace_provider_id_t *)&newprov->id); + prov->id = newprov->id; } -static int -sdt_probe_callback(struct sdt_probe *probe, void *arg __unused) +static void +sdt_create_probe(struct sdt_probe *probe) { - struct sdt_provider *prov = probe->prov; - char mod[64]; - char func[64]; - char name[64]; + struct sdt_provider *prov; + char mod[DTRACE_MODNAMELEN]; + char func[DTRACE_FUNCNAMELEN]; + char name[DTRACE_NAMELEN]; + size_t len; + + TAILQ_FOREACH(prov, &sdt_prov_list, prov_entry) + if (strcmp(prov->name, probe->prov->name) == 0) + break; + + KASSERT(prov != NULL, ("probe defined without a provider")); + + /* If no module name was specified, use the module filename. */ + if (*probe->mod == 0) { + len = strlcpy(mod, probe->sdtp_lf->filename, sizeof(mod)); + if (len > 3 && strcmp(mod + len - 3, ".ko") == 0) + mod[len - 3] = '\0'; + } else + strlcpy(mod, probe->mod, sizeof(mod)); /* * Unfortunately this is necessary because the Solaris DTrace * code mixes consts and non-consts with casts to override * the incompatibilies. On FreeBSD, we use strict warnings - * in gcc, so we have to respect const vs non-const. + * in the C compiler, so we have to respect const vs non-const. */ - strlcpy(mod, probe->mod, sizeof(mod)); strlcpy(func, probe->func, sizeof(func)); strlcpy(name, probe->name, sizeof(name)); - if (dtrace_probe_lookup(prov->id, mod, func, name) != 0) - return (0); + if (dtrace_probe_lookup(prov->id, mod, func, name) != DTRACE_IDNONE) + return; - (void) dtrace_probe_create(prov->id, probe->mod, probe->func, - probe->name, 1, probe); + TAILQ_INSERT_TAIL(&prov->probe_list, probe, probe_entry); - return (0); + (void)dtrace_probe_create(prov->id, mod, func, name, 1, probe); } -static int -sdt_provider_entry(struct sdt_provider *prov, void *arg) +/* Probes are created through the SDT module load/unload hook. */ +static void +sdt_provide_probes(void *arg, dtrace_probedesc_t *desc) { - return (sdt_probe_listall(prov, sdt_probe_callback, NULL)); } static void -sdt_provide_probes(void *arg, dtrace_probedesc_t *desc) +sdt_enable(void *arg __unused, dtrace_id_t id, void *parg) { - if (desc != NULL) - return; + struct sdt_probe *probe = parg; - (void) sdt_provider_listall(sdt_provider_entry, NULL); + probe->id = id; + probe->sdtp_lf->nenabled++; } static void -sdt_destroy(void *arg, dtrace_id_t id, void *parg) +sdt_disable(void *arg __unused, dtrace_id_t id, void *parg) { - /* Nothing to do here. */ + struct sdt_probe *probe = parg; + + KASSERT(probe->sdtp_lf->nenabled > 0, ("no probes enabled")); + + probe->id = 0; + probe->sdtp_lf->nenabled--; } static void -sdt_enable(void *arg, dtrace_id_t id, void *parg) +sdt_getargdesc(void *arg, dtrace_id_t id, void *parg, dtrace_argdesc_t *desc) { + struct sdt_argtype *argtype; struct sdt_probe *probe = parg; - probe->id = id; + if (desc->dtargd_ndx < probe->n_args) { + TAILQ_FOREACH(argtype, &probe->argtype_list, argtype_entry) { + if (desc->dtargd_ndx == argtype->ndx) { + /* XXX */ + desc->dtargd_mapping = desc->dtargd_ndx; + strlcpy(desc->dtargd_native, argtype->type, + sizeof(desc->dtargd_native)); + desc->dtargd_xlate[0] = '\0'; /* XXX */ + } + } + } else + desc->dtargd_ndx = DTRACE_ARGNONE; } static void -sdt_disable(void *arg, dtrace_id_t id, void *parg) +sdt_destroy(void *arg, dtrace_id_t id, void *parg) { - struct sdt_probe *probe = parg; + struct sdt_probe *probe; - probe->id = 0; + probe = parg; + TAILQ_REMOVE(&probe->prov->probe_list, probe, probe_entry); +} + +/* + * Called from the kernel linker when a module is loaded, before + * dtrace_module_loaded() is called. This is done so that it's possible to + * register new providers when modules are loaded. We cannot do this in the + * provide_module method since it's called with the provider lock held + * and dtrace_register() will try to acquire it again. + */ +static void +sdt_kld_load(void *arg __unused, struct linker_file *lf) +{ + struct sdt_provider **prov, **begin, **end; + struct sdt_probe **probe, **p_begin, **p_end; + struct sdt_argtype **argtype, **a_begin, **a_end; + + if (linker_file_lookup_set(lf, "sdt_providers_set", &begin, &end, NULL)) + return; + for (prov = begin; prov < end; prov++) + sdt_create_provider(*prov); + + if (linker_file_lookup_set(lf, "sdt_probes_set", &p_begin, &p_end, + NULL)) + return; + for (probe = p_begin; probe < p_end; probe++) { + (*probe)->sdtp_lf = lf; + sdt_create_probe(*probe); + TAILQ_INIT(&(*probe)->argtype_list); + } + + if (linker_file_lookup_set(lf, "sdt_argtypes_set", &a_begin, &a_end, + NULL)) + return; + for (argtype = a_begin; argtype < a_end; argtype++) { + (*argtype)->probe->n_args++; + TAILQ_INSERT_TAIL(&(*argtype)->probe->argtype_list, *argtype, + argtype_entry); + } +} + +static void +sdt_kld_unload(void *arg __unused, struct linker_file *lf, int *error __unused) +{ + struct sdt_provider *prov, **curr, **begin, **end, *tmp; + + if (*error != 0) + /* We already have an error, so don't do anything. */ + return; + else if (linker_file_lookup_set(lf, "sdt_providers_set", &begin, &end, NULL)) + /* No DTrace providers are declared in this file. */ + return; + + /* + * Go through all the providers declared in this linker file and + * unregister any that aren't declared in another loaded file. + */ + for (curr = begin; curr < end; curr++) { + TAILQ_FOREACH_SAFE(prov, &sdt_prov_list, prov_entry, tmp) { + if (strcmp(prov->name, (*curr)->name) == 0) { + if (prov->sdt_refs == 1) { + TAILQ_REMOVE(&sdt_prov_list, prov, + prov_entry); + dtrace_unregister(prov->id); + free(prov->name, M_SDT); + free(prov, M_SDT); + } else + prov->sdt_refs--; + break; + } + } + } } static int -sdt_provider_reg_callback(struct sdt_provider *prov, void *arg __unused) +sdt_linker_file_cb(linker_file_t lf, void *arg __unused) { - return (dtrace_register(prov->name, &sdt_attr, DTRACE_PRIV_USER, - NULL, &sdt_pops, NULL, (dtrace_provider_id_t *) &prov->id)); + + sdt_kld_load(NULL, lf); + + return (0); } static void -sdt_load(void *dummy) +sdt_load(void *arg __unused) { + + TAILQ_INIT(&sdt_prov_list); + /* Create the /dev/dtrace/sdt entry. */ sdt_cdev = make_dev(&sdt_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "dtrace/sdt"); sdt_probe_func = dtrace_probe; - sdt_register_callbacks(sdt_provider_reg_callback, NULL, - sdt_provider_unreg_callback, NULL, sdt_probe_callback, NULL); -} + sdt_kld_load_tag = EVENTHANDLER_REGISTER(kld_load, sdt_kld_load, NULL, + EVENTHANDLER_PRI_ANY); + sdt_kld_unload_tag = EVENTHANDLER_REGISTER(kld_unload, sdt_kld_unload, + NULL, EVENTHANDLER_PRI_ANY); -static int -sdt_provider_unreg_callback(struct sdt_provider *prov, void *arg __unused) -{ - return (dtrace_unregister(prov->id)); + /* Pick up probes from the kernel and already-loaded linker files. */ + linker_file_foreach(sdt_linker_file_cb, NULL); } static int -sdt_unload() +sdt_unload(void *arg __unused) { - int error = 0; + struct sdt_provider *prov, *tmp; + + EVENTHANDLER_DEREGISTER(kld_load, sdt_kld_load_tag); + EVENTHANDLER_DEREGISTER(kld_unload, sdt_kld_unload_tag); sdt_probe_func = sdt_probe_stub; - sdt_deregister_callbacks(); - + TAILQ_FOREACH_SAFE(prov, &sdt_prov_list, prov_entry, tmp) { + TAILQ_REMOVE(&sdt_prov_list, prov, prov_entry); + dtrace_unregister(prov->id); + free(prov->name, M_SDT); + free(prov, M_SDT); + } + destroy_dev(sdt_cdev); - return (error); + return (0); } /* ARGSUSED */ @@ -235,7 +363,6 @@ sdt_modevent(module_t mod __unused, int default: error = EOPNOTSUPP; break; - } return (error); @@ -243,8 +370,10 @@ sdt_modevent(module_t mod __unused, int /* ARGSUSED */ static int -sdt_open(struct cdev *dev __unused, int oflags __unused, int devtype __unused, struct thread *td __unused) +sdt_open(struct cdev *dev __unused, int oflags __unused, int devtype __unused, + struct thread *td __unused) { + return (0); } Modified: stable/9/sys/kern/kern_exec.c ============================================================================== --- stable/9/sys/kern/kern_exec.c Sat Sep 21 14:23:20 2013 (r255762) +++ stable/9/sys/kern/kern_exec.c Sat Sep 21 16:46:34 2013 (r255763) @@ -95,12 +95,9 @@ dtrace_execexit_func_t dtrace_fasttrap_e #endif SDT_PROVIDER_DECLARE(proc); -SDT_PROBE_DEFINE(proc, kernel, , exec, exec); -SDT_PROBE_ARGTYPE(proc, kernel, , exec, 0, "char *"); -SDT_PROBE_DEFINE(proc, kernel, , exec_failure, exec-failure); -SDT_PROBE_ARGTYPE(proc, kernel, , exec_failure, 0, "int"); -SDT_PROBE_DEFINE(proc, kernel, , exec_success, exec-success); -SDT_PROBE_ARGTYPE(proc, kernel, , exec_success, 0, "char *"); +SDT_PROBE_DEFINE1(proc, kernel, , exec, exec, "char *"); +SDT_PROBE_DEFINE1(proc, kernel, , exec_failure, exec-failure, "int"); +SDT_PROBE_DEFINE1(proc, kernel, , exec_success, exec-success, "char *"); MALLOC_DEFINE(M_PARGS, "proc-args", "Process arguments"); Modified: stable/9/sys/kern/kern_exit.c ============================================================================== --- stable/9/sys/kern/kern_exit.c Sat Sep 21 14:23:20 2013 (r255762) +++ stable/9/sys/kern/kern_exit.c Sat Sep 21 16:46:34 2013 (r255763) @@ -94,8 +94,7 @@ dtrace_execexit_func_t dtrace_fasttrap_e #endif SDT_PROVIDER_DECLARE(proc); -SDT_PROBE_DEFINE(proc, kernel, , exit, exit); -SDT_PROBE_ARGTYPE(proc, kernel, , exit, 0, "int"); +SDT_PROBE_DEFINE1(proc, kernel, , exit, exit, "int"); /* Hook for NFS teardown procedure. */ void (*nlminfo_release_p)(struct proc *p); Modified: stable/9/sys/kern/kern_fork.c ============================================================================== --- stable/9/sys/kern/kern_fork.c Sat Sep 21 14:23:20 2013 (r255762) +++ stable/9/sys/kern/kern_fork.c Sat Sep 21 16:46:34 2013 (r255763) @@ -89,10 +89,8 @@ dtrace_fork_func_t dtrace_fasttrap_fork; #endif SDT_PROVIDER_DECLARE(proc); -SDT_PROBE_DEFINE(proc, kernel, , create, create); -SDT_PROBE_ARGTYPE(proc, kernel, , create, 0, "struct proc *"); -SDT_PROBE_ARGTYPE(proc, kernel, , create, 1, "struct proc *"); -SDT_PROBE_ARGTYPE(proc, kernel, , create, 2, "int"); +SDT_PROBE_DEFINE3(proc, kernel, , create, create, "struct proc *", + "struct proc *", "int"); #ifndef _SYS_SYSPROTO_H_ struct fork_args { Modified: stable/9/sys/kern/kern_linker.c ============================================================================== --- stable/9/sys/kern/kern_linker.c Sat Sep 21 14:23:20 2013 (r255762) +++ stable/9/sys/kern/kern_linker.c Sat Sep 21 16:46:34 2013 (r255763) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -580,8 +581,6 @@ linker_make_file(const char *pathname, l lf->ndeps = 0; lf->deps = NULL; lf->loadcnt = ++loadcnt; - lf->sdt_probes = NULL; - lf->sdt_nprobes = 0; STAILQ_INIT(&lf->common); TAILQ_INIT(&lf->modules); TAILQ_INSERT_TAIL(&linker_files, lf, link); @@ -1044,6 +1043,9 @@ kern_kldload(struct thread *td, const ch lf->userrefs++; if (fileid != NULL) *fileid = lf->id; + + EVENTHANDLER_INVOKE(kld_load, lf); + #ifdef HWPMC_HOOKS KLD_DOWNGRADE(); pkm.pm_file = lf->filename; @@ -1099,12 +1101,10 @@ kern_kldunload(struct thread *td, int fi if (lf) { KLD_DPF(FILE, ("kldunload: lf->userrefs=%d\n", lf->userrefs)); - /* Check if there are DTrace probes enabled on this file. */ - if (lf->nenabled > 0) { - printf("kldunload: attempt to unload file that has" - " DTrace probes enabled\n"); + EVENTHANDLER_INVOKE(kld_unload, lf, &error); + if (error != 0) error = EBUSY; - } else if (lf->userrefs == 0) { + else if (lf->userrefs == 0) { /* * XXX: maybe LINKER_UNLOAD_FORCE should override ? */ Modified: stable/9/sys/kern/kern_proc.c ============================================================================== --- stable/9/sys/kern/kern_proc.c Sat Sep 21 14:23:20 2013 (r255762) +++ stable/9/sys/kern/kern_proc.c Sat Sep 21 16:46:34 2013 (r255763) @@ -91,33 +91,18 @@ __FBSDID("$FreeBSD$"); #endif SDT_PROVIDER_DEFINE(proc); -SDT_PROBE_DEFINE(proc, kernel, ctor, entry, entry); -SDT_PROBE_ARGTYPE(proc, kernel, ctor, entry, 0, "struct proc *"); -SDT_PROBE_ARGTYPE(proc, kernel, ctor, entry, 1, "int"); -SDT_PROBE_ARGTYPE(proc, kernel, ctor, entry, 2, "void *"); -SDT_PROBE_ARGTYPE(proc, kernel, ctor, entry, 3, "int"); -SDT_PROBE_DEFINE(proc, kernel, ctor, return, return); -SDT_PROBE_ARGTYPE(proc, kernel, ctor, return, 0, "struct proc *"); -SDT_PROBE_ARGTYPE(proc, kernel, ctor, return, 1, "int"); -SDT_PROBE_ARGTYPE(proc, kernel, ctor, return, 2, "void *"); -SDT_PROBE_ARGTYPE(proc, kernel, ctor, return, 3, "int"); -SDT_PROBE_DEFINE(proc, kernel, dtor, entry, entry); -SDT_PROBE_ARGTYPE(proc, kernel, dtor, entry, 0, "struct proc *"); -SDT_PROBE_ARGTYPE(proc, kernel, dtor, entry, 1, "int"); -SDT_PROBE_ARGTYPE(proc, kernel, dtor, entry, 2, "void *"); -SDT_PROBE_ARGTYPE(proc, kernel, dtor, entry, 3, "struct thread *"); -SDT_PROBE_DEFINE(proc, kernel, dtor, return, return); -SDT_PROBE_ARGTYPE(proc, kernel, dtor, return, 0, "struct proc *"); -SDT_PROBE_ARGTYPE(proc, kernel, dtor, return, 1, "int"); -SDT_PROBE_ARGTYPE(proc, kernel, dtor, return, 2, "void *"); -SDT_PROBE_DEFINE(proc, kernel, init, entry, entry); -SDT_PROBE_ARGTYPE(proc, kernel, init, entry, 0, "struct proc *"); -SDT_PROBE_ARGTYPE(proc, kernel, init, entry, 1, "int"); -SDT_PROBE_ARGTYPE(proc, kernel, init, entry, 2, "int"); -SDT_PROBE_DEFINE(proc, kernel, init, return, return); -SDT_PROBE_ARGTYPE(proc, kernel, init, return, 0, "struct proc *"); -SDT_PROBE_ARGTYPE(proc, kernel, init, return, 1, "int"); -SDT_PROBE_ARGTYPE(proc, kernel, init, return, 2, "int"); +SDT_PROBE_DEFINE4(proc, kernel, ctor, entry, entry, "struct proc *", "int", + "void *", "int"); +SDT_PROBE_DEFINE4(proc, kernel, ctor, return, return, "struct proc *", "int", + "void *", "int"); +SDT_PROBE_DEFINE4(proc, kernel, dtor, entry, entry, "struct proc *", "int", + "void *", "struct thread *"); +SDT_PROBE_DEFINE3(proc, kernel, dtor, return, return, "struct proc *", "int", + "void *"); +SDT_PROBE_DEFINE3(proc, kernel, init, entry, entry, "struct proc *", "int", + "int"); +SDT_PROBE_DEFINE3(proc, kernel, init, return, return, "struct proc *", "int", + "int"); MALLOC_DEFINE(M_PGRP, "pgrp", "process group header"); MALLOC_DEFINE(M_SESSION, "session", "session header"); Modified: stable/9/sys/kern/kern_sdt.c ============================================================================== --- stable/9/sys/kern/kern_sdt.c Sat Sep 21 14:23:20 2013 (r255762) +++ stable/9/sys/kern/kern_sdt.c Sat Sep 21 16:46:34 2013 (r255763) @@ -23,317 +23,29 @@ * SUCH DAMAGE. * * $FreeBSD$ - * - * Backend for the Statically Defined Tracing (SDT) kernel support. This is - * required to allow a module to load even though DTrace kernel support may - * not be present. A module may be built with SDT probes in it which are - * registered and deregistered via SYSINIT/SYSUNINIT. - * */ #include "opt_kdtrace.h" -#include #include #include -#include -#include -#include -#include -#include #include /* - * This is the list of statically defined tracing providers. - */ -static TAILQ_HEAD(sdt_provider_list_head, sdt_provider) sdt_provider_list; - -/* - * Mutex to serialise access to the SDT provider list. - */ -static struct sx sdt_sx; - -/* - * Hook for the DTrace probe function. The 'sdt' provider will set this - * to dtrace_probe when it loads. + * Hook for the DTrace probe function. The SDT provider will set this to + * dtrace_probe() when it loads. */ sdt_probe_func_t sdt_probe_func = sdt_probe_stub; -static sdt_provider_listall_func_t sdt_provider_register_func = NULL; -static sdt_provider_listall_func_t sdt_provider_deregister_func = NULL; -static sdt_probe_listall_func_t sdt_probe_register_func = NULL; - -static void *sdt_provider_register_arg; -static void *sdt_provider_deregister_arg; -static void *sdt_probe_register_arg; - -static int sdt_provider_listall_locked(sdt_provider_listall_func_t, void *); - /* * This is a stub for probe calls in case kernel DTrace support isn't - * compiled in. It should never get called because there is no DTrace - * support to enable it. + * enabled. It should never get called because there is no DTrace support + * to enable it. */ void sdt_probe_stub(uint32_t id, uintptr_t arg0, uintptr_t arg1, uintptr_t arg2, uintptr_t arg3, uintptr_t arg4) { - printf("sdt_probe_stub: Why did this get called?\n"); -} - -/* - * Called from SYSINIT to register a provider. - */ -void -sdt_provider_register(void *arg) -{ - struct sdt_provider *prov = arg; - - sx_xlock(&sdt_sx); - - TAILQ_INSERT_TAIL(&sdt_provider_list, prov, prov_entry); - - TAILQ_INIT(&prov->probe_list); - - if (sdt_provider_register_func != NULL) - sdt_provider_register_func(prov, sdt_provider_register_arg); - - sx_xunlock(&sdt_sx); -} - -/* - * Called from SYSUNINIT to de-register a provider. - */ -void -sdt_provider_deregister(void *arg) -{ - struct sdt_provider *prov = arg; - - sx_xlock(&sdt_sx); - - TAILQ_REMOVE(&sdt_provider_list, prov, prov_entry); - - if (sdt_provider_deregister_func != NULL) - sdt_provider_deregister_func(prov, sdt_provider_deregister_arg); - - sx_xunlock(&sdt_sx); -} - -/* - * Called from SYSINIT to register a statically defined trace probe. - */ -void -sdt_probe_register(void *arg) -{ - struct sdt_probe *probe = arg; - - /* - * Check the reference structure version. Only version 1 is - * supported at the moment. - */ - if (probe->version != sizeof(struct sdt_probe)) { - printf("%s:%s:%s has version %d when %d required\n", probe->mod, probe->func, probe->name, probe->version, (int) sizeof(struct sdt_probe)); - return; - } - - sx_xlock(&sdt_sx); - - TAILQ_INSERT_TAIL(&probe->prov->probe_list, probe, probe_entry); - - TAILQ_INIT(&probe->argtype_list); - - probe->state = SDT_INIT; - - if (sdt_probe_register_func != NULL) - sdt_probe_register_func(probe, sdt_provider_register_arg); - - sx_xunlock(&sdt_sx); -} - -/* - * Called from SYSUNINIT to de-register a statically defined trace probe. - */ -void -sdt_probe_deregister(void *arg) -{ - struct sdt_probe *probe = arg; - - sx_xlock(&sdt_sx); - - if (probe->state == SDT_INIT) { - TAILQ_REMOVE(&probe->prov->probe_list, probe, probe_entry); - probe->state = SDT_UNINIT; - } - - sx_xunlock(&sdt_sx); -} - -/* - * Called from SYSINIT to register a statically defined trace probe argument. - */ -void -sdt_argtype_register(void *arg) -{ - struct sdt_argtype *argtype = arg; - - sx_xlock(&sdt_sx); - - TAILQ_INSERT_TAIL(&argtype->probe->argtype_list, argtype, argtype_entry); - - argtype->probe->n_args++; - - sx_xunlock(&sdt_sx); -} - -/* - * Called from SYSUNINIT to de-register a statically defined trace probe argument. - */ -void -sdt_argtype_deregister(void *arg) -{ - struct sdt_argtype *argtype = arg; - - sx_xlock(&sdt_sx); - - TAILQ_REMOVE(&argtype->probe->argtype_list, argtype, argtype_entry); - - sx_xunlock(&sdt_sx); -} - -static void -sdt_init(void *arg) -{ - sx_init_flags(&sdt_sx, "Statically Defined Tracing", SX_NOWITNESS); - - TAILQ_INIT(&sdt_provider_list); -} - -SYSINIT(sdt, SI_SUB_KDTRACE, SI_ORDER_FIRST, sdt_init, NULL); - -static void -sdt_uninit(void *arg) -{ - sx_destroy(&sdt_sx); -} - -SYSUNINIT(sdt, SI_SUB_KDTRACE, SI_ORDER_FIRST, sdt_uninit, NULL); - -/* - * List statically defined tracing providers. - */ -int -sdt_provider_listall(sdt_provider_listall_func_t callback_func, void *arg) -{ - int error; - - sx_xlock(&sdt_sx); - error = sdt_provider_listall_locked(callback_func, arg); - sx_xunlock(&sdt_sx); - - return (error); -} - -static int -sdt_provider_listall_locked(sdt_provider_listall_func_t callback_func, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Sep 21 19:42:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C74F1771; Sat, 21 Sep 2013 19:42:37 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B1E80253C; Sat, 21 Sep 2013 19:42:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8LJgbUv025342; Sat, 21 Sep 2013 19:42:37 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8LJgb3T025341; Sat, 21 Sep 2013 19:42:37 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201309211942.r8LJgb3T025341@svn.freebsd.org> From: Adrian Chadd Date: Sat, 21 Sep 2013 19:42:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255764 - head/sys/mips/atheros X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Sep 2013 19:42:37 -0000 Author: adrian Date: Sat Sep 21 19:42:37 2013 New Revision: 255764 URL: http://svnweb.freebsd.org/changeset/base/255764 Log: Fix the AR933x CPU UART support by using the correct clock when calculating the UART frequency. Tested: * AR933x (carambola 2 board), UART now works again Approved by: re Modified: head/sys/mips/atheros/ar933x_chip.c Modified: head/sys/mips/atheros/ar933x_chip.c ============================================================================== --- head/sys/mips/atheros/ar933x_chip.c Sat Sep 21 16:46:34 2013 (r255763) +++ head/sys/mips/atheros/ar933x_chip.c Sat Sep 21 19:42:37 2013 (r255764) @@ -115,8 +115,14 @@ ar933x_chip_detect_sys_frequency(void) u_ar71xx_ahb_freq = freq / t; } - /* XXX uart should be the refclk, no? */ - u_ar71xx_uart_freq = u_ar71xx_ahb_freq; + /* On the AR933x, the UART frequency is the reference clock, + * not the AHB bus clock. + */ + u_ar71xx_uart_freq = u_ar71xx_refclk; + + /* + * XXX check what the watchdog frequency should be? + */ u_ar71xx_wdt_freq = u_ar71xx_ahb_freq; } From owner-svn-src-all@FreeBSD.ORG Sat Sep 21 20:53:04 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C5153E2C; Sat, 21 Sep 2013 20:53:04 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mail0.glenbarber.us (mail0.glenbarber.us [IPv6:2607:fc50:1:2300:1001:1001:1001:face]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 35BD72837; Sat, 21 Sep 2013 20:53:04 +0000 (UTC) Received: from glenbarber.us (c-71-224-221-174.hsd1.nj.comcast.net [71.224.221.174]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gjb) by mail0.glenbarber.us (Postfix) with ESMTPSA id 0CF1523F1; Sat, 21 Sep 2013 20:53:03 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.8.3 mail0.glenbarber.us 0CF1523F1 Authentication-Results: mail0.glenbarber.us; dkim=none reason="no signature"; dkim-adsp=none Date: Sat, 21 Sep 2013 16:53:01 -0400 From: Glen Barber To: "Justin T. Gibbs" Subject: Re: svn commit: r255744 - in head/sys: amd64/amd64 amd64/conf amd64/include i386/conf i386/i386 i386/include kern x86/xen xen Message-ID: <20130921205301.GT2351@glenbarber.us> References: <201309202259.r8KMxMP3084866@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="LXqH7sWsIplhrbjF" Content-Disposition: inline In-Reply-To: <201309202259.r8KMxMP3084866@svn.freebsd.org> X-Operating-System: FreeBSD 10.0-ALPHA2 amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Sep 2013 20:53:04 -0000 --LXqH7sWsIplhrbjF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 20, 2013 at 10:59:22PM +0000, Justin T. Gibbs wrote: > Author: gibbs > Date: Fri Sep 20 22:59:22 2013 > New Revision: 255744 > URL: http://svnweb.freebsd.org/changeset/base/255744 >=20 > Log: > Merge Xen PVHVM support into the GENERIC kernel config for both > amd64 and i386. > =20 This seems to have broken the mips, ia64, and i386/PAE builds. http://tinderbox.freebsd.org/tinderbox-head-build-HEAD-mips-mips.brief http://tinderbox.freebsd.org/tinderbox-head-build-HEAD-ia64-ia64.brief http://tinderbox.freebsd.org/tinderbox-head-build-HEAD-i386-i386.brief Glen --LXqH7sWsIplhrbjF Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iQEcBAEBCAAGBQJSPgctAAoJEFJPDDeguUajRdUH/A97ZgMVJgblCbEEcQzuGF1E zyCgy2c6sAUUHWTks88ccDkgVL46zX7pvXVJWN1Ju12UZysUtz7y9GL45DyP9PAZ oFHkwi8xbpd5ADrFjrK85ukrG60ivz97XXb7CIvsqVsNOikvCglHtwGvkh2blGjG 1kj0APoO4JpHGS96dNsFQTzToUH9RE+8/5S7OJq8B5s5jes9LRTQWw9fWQ25Ftaq 0NbO7bb40pKDdpB16ZyCFvbr9q2IrJGvg2KbNRLzgOXYQvC6pvtK1K+5f/c1RyBY 6LIpW8DyBiT++zLy+plrlaBW08ExVuBSw9hd3UHzLDZ5xpZsBpDkMZ2ztJ6yiSk= =9jwK -----END PGP SIGNATURE----- --LXqH7sWsIplhrbjF-- From owner-svn-src-all@FreeBSD.ORG Sat Sep 21 21:03:54 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id F3CA2FC5; Sat, 21 Sep 2013 21:03:53 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E009E2893; Sat, 21 Sep 2013 21:03:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8LL3rxW068046; Sat, 21 Sep 2013 21:03:53 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8LL3rKT068041; Sat, 21 Sep 2013 21:03:53 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309212103.r8LL3rKT068041@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sat, 21 Sep 2013 21:03:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255765 - in head: libexec/rtld-elf share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Sep 2013 21:03:54 -0000 Author: des Date: Sat Sep 21 21:03:52 2013 New Revision: 255765 URL: http://svnweb.freebsd.org/changeset/base/255765 Log: Make the directory mapping functionality, which was previously only available in 32-bit compatibility mode, unconditional. Overhaul the man page, which had evolved more by accretion than by design. Approved by: re (gjb) MFC after: 3 weeks Modified: head/libexec/rtld-elf/libmap.c head/libexec/rtld-elf/libmap.h head/libexec/rtld-elf/rtld.c head/share/man/man5/libmap.conf.5 Modified: head/libexec/rtld-elf/libmap.c ============================================================================== --- head/libexec/rtld-elf/libmap.c Sat Sep 21 19:42:37 2013 (r255764) +++ head/libexec/rtld-elf/libmap.c Sat Sep 21 21:03:52 2013 (r255765) @@ -396,7 +396,6 @@ lm_find (const char *p, const char *f) /* Given a libmap translation list and a library name, return the replacement library, or NULL */ -#ifdef COMPAT_32BIT char * lm_findn (const char *p, const char *f, const int n) { @@ -413,7 +412,6 @@ lm_findn (const char *p, const char *f, free(s); return (t); } -#endif static char * lml_find (struct lm_list *lmh, const char *f) Modified: head/libexec/rtld-elf/libmap.h ============================================================================== --- head/libexec/rtld-elf/libmap.h Sat Sep 21 19:42:37 2013 (r255764) +++ head/libexec/rtld-elf/libmap.h Sat Sep 21 21:03:52 2013 (r255765) @@ -5,6 +5,4 @@ int lm_init (char *); void lm_fini (void); char * lm_find (const char *, const char *); -#ifdef COMPAT_32BIT char * lm_findn (const char *, const char *, const int); -#endif Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Sat Sep 21 19:42:37 2013 (r255764) +++ head/libexec/rtld-elf/rtld.c Sat Sep 21 21:03:52 2013 (r255765) @@ -2581,12 +2581,14 @@ rtld_exit(void) lock_release(rtld_bind_lock, &lockstate); } +/* + * Iterate over a search path, translate each element, and invoke the + * callback on the result. + */ static void * path_enumerate(const char *path, path_enum_proc callback, void *arg) { -#ifdef COMPAT_32BIT const char *trans; -#endif if (path == NULL) return (NULL); @@ -2596,13 +2598,11 @@ path_enumerate(const char *path, path_en char *res; len = strcspn(path, ":;"); -#ifdef COMPAT_32BIT trans = lm_findn(NULL, path, len); if (trans) res = callback(trans, strlen(trans), arg); else -#endif - res = callback(path, len, arg); + res = callback(path, len, arg); if (res != NULL) return (res); Modified: head/share/man/man5/libmap.conf.5 ============================================================================== --- head/share/man/man5/libmap.conf.5 Sat Sep 21 19:42:37 2013 (r255764) +++ head/share/man/man5/libmap.conf.5 Sat Sep 21 21:03:52 2013 (r255765) @@ -1,4 +1,5 @@ .\" Copyright (c) 2003 Matthew N. Dodd +.\" Copyright (c) 2013 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 28, 2012 +.Dd September 16, 2013 .Dt LIBMAP.CONF 5 .Os .Sh NAME @@ -35,109 +36,105 @@ The .Nm libmap functionality of .Xr ld-elf.so.1 1 -allows dynamic object dependencies to be mapped to arbitrary -names. +allows dynamic object dependencies to be mapped to arbitrary names. .Pp -The configuration file consists of two whitespace separated columns; the -left hand side containing the mapping candidate and the right hand -side containing the mapping. -Dependencies are matched against candidates and replaced with the mappings. -.Pp -Two special directives are available: +Each line in +.Pa /etc/libmap.conf +can have one of five forms: .Bl -tag -width indent +.It Ar origin Ar target +Whenever a dependency on +.Ar origin +is encountered while loading a dynamic object, use +.Ar target +instead of searching for +.Ar origin +in the normal library search paths. +.It Ar path1 Ar path2 +When iterating through a library search path, replace any element that +matches +.Ar path1 +exactly with +.Ar path2 . +.It Bq Ar constraint +Apply +.Ar constraint +to all subsequent mappings until the next constraint line or the end +of the file. +See the +.Sx Constraints +section for details. .It Cm include Ar file Parse the contents of .Ar file before continuing with the current file. +Nesting depth is limited only by available memory, but each file +encountered is processed only once, and loops are silently ignored. .It Cm includedir Ar dir -Parse the contents of every file in +Recurse through .Ar dir -that ends in +and parse the contents of any file that ends in .Pa .conf before continuing with the current file. +Nesting depth is limited only by available memory, but each directory +or file encountered is processed only once, and loops are silently +ignored. .El -.Pp -Any file or directory encountered while processing -.Cm include -or -.Cm includedir -directives will be parsed exactly once, even if it is encountered -multiple times. -.Pp -Constrained mappings may be specified by enclosing the name of the -executable or library in brackets. -All mappings following a constraint will only be evaluated for that constraint. -Constraints can be one of three types: +.Ss Constraints +Constrained mappings only apply when processing binaries or libraries +that satisfy the constraint. +There are three types of constraints: .Bl -tag -width indent .It Exact The constraint is matched literally so that only an executable with an -identical fully qualified pathname will match the constraint. +identical fully qualified pathname will satisfy the constraint. This means that the executable .Pa /usr/bin/foo -will not match a constraint for -.Pa /usr/bin/./foo +will not satisfy the constraint +.Bq Pa /usr/bin/./foo , and vice-versa. This is the default constraint type. .It Basename A constraint with no path is matched against the basename of the executable. -.Pa foo +For instance, the constraint +.Bq Pa foo will match .Pa /bin/foo , .Pa /usr/local/sbin/foo , or any other executable named .Pa foo , -no matter what its path is. +no matter what directory it is in. .It Directory -A constraint with a trailing slash is prefix-matched against the full -pathname of the executable. -.Pa /usr/bin/ -will match any executable with a path starting with /usr/bin. +A constraint with a trailing slash is satisfied if the full pathname +begins with the constraint string. +For instance, the constraint +.Bq Pa /usr/bin/ +will match any executable with a path starting with +.Pa /usr/bin/ . .El .Pp -Note that the executable path matched against is the -.Fa path -parameter in an -.Fn exec* -function call. -The Directory or Exact constraints can only match when the executable -is called with a full pathname. +Note that the constraints are matched against the path that was passed +as the first argument to whichever +.Xr exec 3 +function was used to execute the binary in question. Most programs executed from a shell are run without a full path, via -.Fn exec*p , -so the Basename constraint type is the most useful. +.Xr execvp 3 +or similar, so the basename constraint type is the most useful. .Pp +.Bf -symbolic WARNING! -Constrained mappings must never appear first in the configuration file. -While there is a way to specify the -.Dq default -constraint, its use is not recommended. -.Pp -The most common use at the date of writing is for allowing multiple -.Tn POSIX -threading libraries to be used on a system without relinking or -changing symlinks. -.Pp -On 64-bit architectures that provide 32-bit runtime support, -the libmap mechanism is available for 32-bit binaries too. -The mappings has to be written into separate configuration file +Constraints apply to all mappings until the next constraint or the end +of the file. +Hence, unconstrained mappings must be placed at the top of the file. +.Ef +.Ss ABI compatibility +On 64-bit architectures that provide 32-bit binary compatibility, the +mappings in +.Pa /etc/libmap.conf +apply only to 64-bit binaries. +Mappings for 32-bit binaries must be placed in .Pa /etc/libmap32.conf . -Currently only supported on amd64. -.Pp -This mechanism has also been used to create shims to allow Linux -shared libraries to be dynamically loaded into -.Fx -binaries. -In this case, an Exact constraint is used for the Linux shared library, -mapping libraries it depends on to a wrapper. -The wrapper then defines any needed symbols for the Linux shared library -and relies on its libraries not being mapped to provide actual -implementations. -It appears that only libraries loaded via -.Xr dlopen 3 -will work correctly. -The symbol version information in shared libraries is checked at -link time, but at run time the version information is currently -ignored. .Sh FILES .Bl -tag -width ".Pa /etc/libmap32.conf" -compact .It Pa /etc/libmap.conf @@ -147,9 +144,8 @@ The libmap configuration file for 32-bit .El .Sh EXAMPLES .Bd -literal -# /etc/libmap.conf # -# candidate mapping +# origin target # libc_r.so.6 libpthread.so.2 # Everything that uses 'libc_r' libc_r.so libpthread.so # now uses 'libpthread' @@ -174,11 +170,11 @@ libdl.so.2 pluginwrapper/pips.so .Xr rtld 1 .Sh HISTORY The -.Nm -manual page and .Nm libmap -functionality first appeared in +mechanism first appeared in .Fx 5.1 . .Sh AUTHORS This manual page was written by -.An Matthew N. Dodd Aq winter@jurai.net . +.An Matthew N. Dodd Aq winter@jurai.net +and extensively rewritten by +.An Dag-Erling Sm\(/orgrav Aq des@FreeBSD.org . From owner-svn-src-all@FreeBSD.ORG Sat Sep 21 21:34:22 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C3084889; Sat, 21 Sep 2013 21:34:22 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AFEAF29C9; Sat, 21 Sep 2013 21:34:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8LLYMEa084061; Sat, 21 Sep 2013 21:34:22 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8LLYM5T084060; Sat, 21 Sep 2013 21:34:22 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309212134.r8LLYM5T084060@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sat, 21 Sep 2013 21:34:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255766 - head/etc/rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Sep 2013 21:34:22 -0000 Author: des Date: Sat Sep 21 21:34:22 2013 New Revision: 255766 URL: http://svnweb.freebsd.org/changeset/base/255766 Log: Ditch the random seeding code, which never really worked as intended. Add config variables to enable / disable individual host key algorithms. Clean up the host key generation code. Approved by: re (gjb) MFC after: 3 weeks Modified: head/etc/rc.d/sshd Modified: head/etc/rc.d/sshd ============================================================================== --- head/etc/rc.d/sshd Sat Sep 21 21:03:52 2013 (r255765) +++ head/etc/rc.d/sshd Sat Sep 21 21:34:22 2013 (r255766) @@ -14,80 +14,59 @@ rcvar="sshd_enable" command="/usr/sbin/${name}" keygen_cmd="sshd_keygen" start_precmd="sshd_precmd" -reload_precmd="sshd_precmd" -restart_precmd="sshd_precmd" +reload_precmd="sshd_configtest" +restart_precmd="sshd_configtest" configtest_cmd="sshd_configtest" pidfile="/var/run/${name}.pid" extra_commands="configtest keygen reload" -timeout=300 +: ${sshd_rsa1_enable:="yes"} +: ${sshd_rsa_enable:="yes"} +: ${sshd_dsa_enable:="yes"} +: ${sshd_ecdsa_enable:="yes"} -user_reseed() +sshd_keygen_alg() { - ( - seeded=`sysctl -n kern.random.sys.seeded 2>/dev/null` - if [ "x${seeded}" != "x" ] && [ ${seeded} -eq 0 ] ; then - warn "Setting entropy source to blocking mode." - echo "====================================================" - echo "Type a full screenful of random junk to unblock" - echo "it and remember to finish with . This will" - echo "timeout in ${timeout} seconds, but waiting for" - echo "the timeout without typing junk may make the" - echo "entropy source deliver predictable output." - echo "" - echo "Just hit for fast+insecure startup." - echo "====================================================" - sysctl kern.random.sys.seeded=0 2>/dev/null - read -t ${timeout} junk - echo "${junk}" `sysctl -a` `date` > /dev/random - fi - ) -} - -sshd_keygen() -{ - ( - umask 022 + local alg=$1 + local ALG="$(echo $alg | tr a-z A-Z)" + local keyfile + + if ! checkyesno "sshd_${alg}_enable" ; then + return 0 + fi + + case $alg in + rsa1) + keyfile="/etc/ssh/ssh_host_key" + ;; + rsa|dsa|ecdsa) + keyfile="/etc/ssh/ssh_host_${alg}_key" + ;; + *) + return 1 + ;; + esac - # Can't do anything if ssh is not installed - [ -x /usr/bin/ssh-keygen ] || { + if [ ! -x /usr/bin/ssh-keygen ] ; then warn "/usr/bin/ssh-keygen does not exist." return 1 - } - - if [ -f /etc/ssh/ssh_host_key ]; then - echo "You already have an RSA host key" \ - "in /etc/ssh/ssh_host_key" - echo "Skipping protocol version 1 RSA Key Generation" - else - /usr/bin/ssh-keygen -t rsa1 -b 1024 \ - -f /etc/ssh/ssh_host_key -N '' fi - if [ -f /etc/ssh/ssh_host_dsa_key ]; then - echo "You already have a DSA host key" \ - "in /etc/ssh/ssh_host_dsa_key" - echo "Skipping protocol version 2 DSA Key Generation" + if [ -f "${keyfile}" ] ; then + echo "$ALG host key exists." else - /usr/bin/ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N '' - fi - - if [ -f /etc/ssh/ssh_host_rsa_key ]; then - echo "You already have an RSA host key" \ - "in /etc/ssh/ssh_host_rsa_key" - echo "Skipping protocol version 2 RSA Key Generation" - else - /usr/bin/ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N '' + echo "Generating $ALG host key." + /usr/bin/ssh-keygen -q -t $alg -f "$keyfile" -N "" + /usr/bin/ssh-keygen -l -f "$keyfile.pub" fi +} - if [ -f /etc/ssh/ssh_host_ecdsa_key ]; then - echo "You already have an ECDSA host key" \ - "in /etc/ssh/ssh_host_ecdsa_key" - echo "Skipping protocol version 2 ECDSA Key Generation" - else - /usr/bin/ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -N '' - fi - ) +sshd_keygen() +{ + sshd_keygen_alg rsa1 + sshd_keygen_alg rsa + sshd_keygen_alg dsa + sshd_keygen_alg ecdsa } sshd_configtest() @@ -98,14 +77,8 @@ sshd_configtest() sshd_precmd() { - if [ ! -f /etc/ssh/ssh_host_key -o \ - ! -f /etc/ssh/ssh_host_dsa_key -o \ - ! -f /etc/ssh/ssh_host_ecdsa_key -o \ - ! -f /etc/ssh/ssh_host_rsa_key ]; then - user_reseed - run_rc_command keygen - fi - sshd_configtest + run_rc_command keygen + run_rc_command configtest } load_rc_config $name From owner-svn-src-all@FreeBSD.ORG Sat Sep 21 21:36:11 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5BA1C9D6; Sat, 21 Sep 2013 21:36:11 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4723429DC; Sat, 21 Sep 2013 21:36:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8LLaBNp085011; Sat, 21 Sep 2013 21:36:11 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8LLa9mC085001; Sat, 21 Sep 2013 21:36:09 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309212136.r8LLa9mC085001@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sat, 21 Sep 2013 21:36:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255767 - in head/crypto/openssh: . openbsd-compat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Sep 2013 21:36:11 -0000 Author: des Date: Sat Sep 21 21:36:09 2013 New Revision: 255767 URL: http://svnweb.freebsd.org/changeset/base/255767 Log: Upgrade to 6.3p1. Approved by: re (gjb) Added: head/crypto/openssh/fixalgorithms - copied unchanged from r255670, vendor-crypto/openssh/dist/fixalgorithms head/crypto/openssh/openbsd-compat/getopt.h - copied unchanged from r255670, vendor-crypto/openssh/dist/openbsd-compat/getopt.h head/crypto/openssh/openbsd-compat/getopt_long.c - copied unchanged from r255670, vendor-crypto/openssh/dist/openbsd-compat/getopt_long.c Deleted: head/crypto/openssh/openbsd-compat/getopt.c Modified: head/crypto/openssh/ChangeLog head/crypto/openssh/README head/crypto/openssh/aclocal.m4 head/crypto/openssh/addrmatch.c head/crypto/openssh/auth-chall.c head/crypto/openssh/auth-krb5.c head/crypto/openssh/auth-options.c head/crypto/openssh/auth-pam.c head/crypto/openssh/auth-rsa.c head/crypto/openssh/auth.c head/crypto/openssh/auth.h head/crypto/openssh/auth1.c head/crypto/openssh/auth2-chall.c head/crypto/openssh/auth2-gss.c head/crypto/openssh/auth2-hostbased.c head/crypto/openssh/auth2-jpake.c head/crypto/openssh/auth2-kbdint.c head/crypto/openssh/auth2-passwd.c head/crypto/openssh/auth2-pubkey.c head/crypto/openssh/auth2.c head/crypto/openssh/authfd.c head/crypto/openssh/authfile.c head/crypto/openssh/bufaux.c head/crypto/openssh/bufbn.c head/crypto/openssh/bufec.c head/crypto/openssh/buffer.c head/crypto/openssh/buffer.h head/crypto/openssh/canohost.c head/crypto/openssh/channels.c head/crypto/openssh/channels.h head/crypto/openssh/cipher-3des1.c head/crypto/openssh/cipher-aes.c head/crypto/openssh/cipher-ctr.c head/crypto/openssh/cipher.c head/crypto/openssh/cipher.h head/crypto/openssh/clientloop.c head/crypto/openssh/clientloop.h head/crypto/openssh/compat.c head/crypto/openssh/config.guess head/crypto/openssh/config.h head/crypto/openssh/config.h.in head/crypto/openssh/defines.h head/crypto/openssh/dh.c head/crypto/openssh/dns.c head/crypto/openssh/groupaccess.c head/crypto/openssh/gss-genr.c head/crypto/openssh/gss-serv-krb5.c head/crypto/openssh/gss-serv.c head/crypto/openssh/hostfile.c head/crypto/openssh/hostfile.h head/crypto/openssh/includes.h head/crypto/openssh/jpake.c head/crypto/openssh/kex.c head/crypto/openssh/kex.h head/crypto/openssh/kexdhc.c head/crypto/openssh/kexdhs.c head/crypto/openssh/kexecdh.c head/crypto/openssh/kexecdhc.c head/crypto/openssh/kexecdhs.c head/crypto/openssh/kexgexc.c head/crypto/openssh/kexgexs.c head/crypto/openssh/key.c head/crypto/openssh/key.h head/crypto/openssh/krl.c head/crypto/openssh/log.c head/crypto/openssh/log.h head/crypto/openssh/loginrec.c head/crypto/openssh/mac.c head/crypto/openssh/mac.h head/crypto/openssh/match.c head/crypto/openssh/misc.c head/crypto/openssh/misc.h head/crypto/openssh/moduli.c head/crypto/openssh/monitor.c head/crypto/openssh/monitor_mm.c head/crypto/openssh/monitor_wrap.c head/crypto/openssh/mux.c head/crypto/openssh/myproposal.h head/crypto/openssh/openbsd-compat/bsd-cygwin_util.c head/crypto/openssh/openbsd-compat/bsd-cygwin_util.h head/crypto/openssh/openbsd-compat/bsd-misc.h head/crypto/openssh/openbsd-compat/getrrsetbyname-ldns.c head/crypto/openssh/openbsd-compat/openbsd-compat.h head/crypto/openssh/openbsd-compat/port-aix.c head/crypto/openssh/openbsd-compat/port-linux.c head/crypto/openssh/openbsd-compat/xcrypt.c head/crypto/openssh/packet.c head/crypto/openssh/packet.h head/crypto/openssh/pathnames.h head/crypto/openssh/progressmeter.c head/crypto/openssh/readconf.c head/crypto/openssh/readconf.h head/crypto/openssh/readpass.c head/crypto/openssh/roaming_client.c head/crypto/openssh/roaming_common.c head/crypto/openssh/rsa.c head/crypto/openssh/sandbox-seccomp-filter.c head/crypto/openssh/sandbox-systrace.c head/crypto/openssh/schnorr.c head/crypto/openssh/scp.1 head/crypto/openssh/scp.c head/crypto/openssh/servconf.c head/crypto/openssh/servconf.h head/crypto/openssh/serverloop.c head/crypto/openssh/session.c head/crypto/openssh/sftp-client.c head/crypto/openssh/sftp-client.h head/crypto/openssh/sftp-common.c head/crypto/openssh/sftp-glob.c head/crypto/openssh/sftp-server.8 head/crypto/openssh/sftp-server.c head/crypto/openssh/sftp.1 head/crypto/openssh/sftp.c head/crypto/openssh/ssh-add.c head/crypto/openssh/ssh-agent.c head/crypto/openssh/ssh-dss.c head/crypto/openssh/ssh-ecdsa.c head/crypto/openssh/ssh-keygen.1 head/crypto/openssh/ssh-keygen.c head/crypto/openssh/ssh-keyscan.1 head/crypto/openssh/ssh-keyscan.c head/crypto/openssh/ssh-keysign.8 head/crypto/openssh/ssh-keysign.c head/crypto/openssh/ssh-pkcs11-client.c head/crypto/openssh/ssh-pkcs11-helper.8 head/crypto/openssh/ssh-pkcs11-helper.c head/crypto/openssh/ssh-pkcs11.c head/crypto/openssh/ssh-rsa.c head/crypto/openssh/ssh.1 head/crypto/openssh/ssh.c head/crypto/openssh/ssh_config head/crypto/openssh/ssh_config.5 head/crypto/openssh/ssh_namespace.h head/crypto/openssh/sshconnect.c head/crypto/openssh/sshconnect1.c head/crypto/openssh/sshconnect2.c head/crypto/openssh/sshd.8 head/crypto/openssh/sshd.c head/crypto/openssh/sshd_config head/crypto/openssh/sshd_config.5 head/crypto/openssh/sshlogin.c head/crypto/openssh/sshlogin.h head/crypto/openssh/uidswap.c head/crypto/openssh/umac.c head/crypto/openssh/umac.h head/crypto/openssh/umac128.c head/crypto/openssh/uuencode.c head/crypto/openssh/version.h head/crypto/openssh/xmalloc.c head/crypto/openssh/xmalloc.h Directory Properties: head/crypto/openssh/ (props changed) Modified: head/crypto/openssh/ChangeLog ============================================================================== --- head/crypto/openssh/ChangeLog Sat Sep 21 21:34:22 2013 (r255766) +++ head/crypto/openssh/ChangeLog Sat Sep 21 21:36:09 2013 (r255767) @@ -1,11 +1,628 @@ +20130913 + - (djm) [channels.c] Fix unaligned access on sparc machines in SOCKS5 code; + ok dtucker@ + - (djm) [channels.c] sigh, typo s/buffet_/buffer_/ + - (djm) Release 6.3p1 + +20130808 + - (dtucker) [regress/Makefile regress/test-exec.sh] Don't try to use test -nt + since some platforms (eg really old FreeBSD) don't have it. Instead, + run "make clean" before a complete regress run. ok djm. + - (dtucker) [misc.c] Fall back to time(2) at runtime if clock_gettime( + CLOCK_MONOTONIC...) fails. Some older versions of RHEL have the + CLOCK_MONOTONIC define but don't actually support it. Found and tested + by Kevin Brott, ok djm. + - (dtucker) [misc.c] Remove define added for fallback testing that was + mistakenly included in the previous commit. + - (dtucker) [regress/Makefile regress/test-exec.sh] Roll back the -nt + removal. The "make clean" removes modpipe which is built by the top-level + directory before running the tests. Spotted by tim@ + +20130804 + - (dtucker) [auth-krb5.c configure.ac openbsd-compat/bsd-misc.h] Add support + for building with older Heimdal versions. ok djm. + +20130801 + - (djm) [channels.c channels.h] bz#2135: On Solaris, isatty() on a non- + blocking connecting socket will clear any stored errno that might + otherwise have been retrievable via getsockopt(). A hack to limit writes + to TTYs on AIX was triggering this. Since only AIX needs the hack, wrap + it in an #ifdef. Diagnosis and patch from Ivo Raisr. + - (djm) [sshlogin.h] Fix prototype merge botch from 2006; bz#2134 + +20130725 + - (djm) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2013/07/20 22:20:42 + [krl.c] + fix verification error in (as-yet usused) KRL signature checking path + - djm@cvs.openbsd.org 2013/07/22 05:00:17 + [umac.c] + make MAC key, data to be hashed and nonce for final hash const; + checked with -Wcast-qual + - djm@cvs.openbsd.org 2013/07/22 12:20:02 + [umac.h] + oops, forgot to commit corresponding header change; + spotted by jsg and jasper + - djm@cvs.openbsd.org 2013/07/25 00:29:10 + [ssh.c] + daemonise backgrounded (ControlPersist'ed) multiplexing master to ensure + it is fully detached from its controlling terminal. based on debugging + - djm@cvs.openbsd.org 2013/07/25 00:56:52 + [sftp-client.c sftp-client.h sftp.1 sftp.c] + sftp support for resuming partial downloads; patch mostly by Loganaden + Velvindron/AfriNIC with some tweaks by me; feedback and ok dtucker@ + "Just be careful" deraadt@ + - djm@cvs.openbsd.org 2013/07/25 00:57:37 + [version.h] + openssh-6.3 for release + - dtucker@cvs.openbsd.org 2013/05/30 20:12:32 + [regress/test-exec.sh] + use ssh and sshd as testdata since it needs to be >256k for the rekey test + - dtucker@cvs.openbsd.org 2013/06/10 21:56:43 + [regress/forwarding.sh] + Add test for forward config parsing + - djm@cvs.openbsd.org 2013/06/21 02:26:26 + [regress/sftp-cmds.sh regress/test-exec.sh] + unbreak sftp-cmds for renamed test data (s/ls/data/) + - (tim) [sftp-client.c] Use of a gcc extension trips up native compilers on + Solaris and UnixWare. Feedback and OK djm@ + - (tim) [regress/forwarding.sh] Fix for building outside source tree. + +20130720 + - (djm) OpenBSD CVS Sync + - markus@cvs.openbsd.org 2013/07/19 07:37:48 + [auth.h kex.h kexdhs.c kexecdhs.c kexgexs.c monitor.c servconf.c] + [servconf.h session.c sshd.c sshd_config.5] + add ssh-agent(1) support to sshd(8); allows encrypted hostkeys, + or hostkeys on smartcards; most of the work by Zev Weiss; bz #1974 + ok djm@ + - djm@cvs.openbsd.org 2013/07/20 01:43:46 + [umac.c] + use a union to ensure correct alignment; ok deraadt + - djm@cvs.openbsd.org 2013/07/20 01:44:37 + [ssh-keygen.c ssh.c] + More useful error message on missing current user in /etc/passwd + - djm@cvs.openbsd.org 2013/07/20 01:50:20 + [ssh-agent.c] + call cleanup_handler on SIGINT when in debug mode to ensure sockets + are cleaned up on manual exit; bz#2120 + - djm@cvs.openbsd.org 2013/07/20 01:55:13 + [auth-krb5.c gss-serv-krb5.c gss-serv.c] + fix kerberos/GSSAPI deprecation warnings and linking; "looks okay" millert@ + +20130718 + - (djm) OpenBSD CVS Sync + - dtucker@cvs.openbsd.org 2013/06/10 19:19:44 + [readconf.c] + revert 1.203 while we investigate crashes reported by okan@ + - guenther@cvs.openbsd.org 2013/06/17 04:48:42 + [scp.c] + Handle time_t values as long long's when formatting them and when + parsing them from remote servers. + Improve error checking in parsing of 'T' lines. + ok dtucker@ deraadt@ + - markus@cvs.openbsd.org 2013/06/20 19:15:06 + [krl.c] + don't leak the rdata blob on errors; ok djm@ + - djm@cvs.openbsd.org 2013/06/21 00:34:49 + [auth-rsa.c auth.h auth2-hostbased.c auth2-pubkey.c monitor.c] + for hostbased authentication, print the client host and user on + the auth success/failure line; bz#2064, ok dtucker@ + - djm@cvs.openbsd.org 2013/06/21 00:37:49 + [ssh_config.5] + explicitly mention that IdentitiesOnly can be used with IdentityFile + to control which keys are offered from an agent. + - djm@cvs.openbsd.org 2013/06/21 05:42:32 + [dh.c] + sprinkle in some error() to explain moduli(5) parse failures + - djm@cvs.openbsd.org 2013/06/21 05:43:10 + [scp.c] + make this -Wsign-compare clean after time_t conversion + - djm@cvs.openbsd.org 2013/06/22 06:31:57 + [scp.c] + improved time_t overflow check suggested by guenther@ + - jmc@cvs.openbsd.org 2013/06/27 14:05:37 + [ssh-keygen.1 ssh.1 ssh_config.5 sshd.8 sshd_config.5] + do not use Sx for sections outwith the man page - ingo informs me that + stuff like html will render with broken links; + issue reported by Eric S. Raymond, via djm + - markus@cvs.openbsd.org 2013/07/02 12:31:43 + [dh.c] + remove extra whitespace + - djm@cvs.openbsd.org 2013/07/12 00:19:59 + [auth-options.c auth-rsa.c bufaux.c buffer.h channels.c hostfile.c] + [hostfile.h mux.c packet.c packet.h roaming_common.c serverloop.c] + fix pointer-signedness warnings from clang/llvm-3.3; "seems nice" deraadt@ + - djm@cvs.openbsd.org 2013/07/12 00:20:00 + [sftp.c ssh-keygen.c ssh-pkcs11.c] + fix pointer-signedness warnings from clang/llvm-3.3; "seems nice" deraadt@ + - djm@cvs.openbsd.org 2013/07/12 00:43:50 + [misc.c] + in ssh_gai_strerror() don't fallback to strerror for EAI_SYSTEM when + errno == 0. Avoids confusing error message in some broken resolver + cases. bz#2122 patch from plautrba AT redhat.com; ok dtucker + - djm@cvs.openbsd.org 2013/07/12 05:42:03 + [ssh-keygen.c] + do_print_resource_record() can never be called with a NULL filename, so + don't attempt (and bungle) asking for one if it has not been specified + bz#2127 ok dtucker@ + - djm@cvs.openbsd.org 2013/07/12 05:48:55 + [ssh.c] + set TCP nodelay for connections started with -N; bz#2124 ok dtucker@ + - schwarze@cvs.openbsd.org 2013/07/16 00:07:52 + [scp.1 sftp-server.8 ssh-keyscan.1 ssh-keysign.8 ssh-pkcs11-helper.8] + use .Mt for email addresses; from Jan Stary ; ok jmc@ + - djm@cvs.openbsd.org 2013/07/18 01:12:26 + [ssh.1] + be more exact wrt perms for ~/.ssh/config; bz#2078 + +20130702 + - (dtucker) [contrib/cygwin/README contrib/cygwin/ssh-host-config + contrib/cygwin/ssh-user-config] Modernizes and improve readability of + the Cygwin README file (which hasn't been updated for ages), drop + unsupported OSes from the ssh-host-config help text, and drop an + unneeded option from ssh-user-config. Patch from vinschen at redhat com. + +20130610 + - (djm) OpenBSD CVS Sync + - dtucker@cvs.openbsd.org 2013/06/07 15:37:52 + [channels.c channels.h clientloop.c] + Add an "ABANDONED" channel state and use for mux sessions that are + disconnected via the ~. escape sequence. Channels in this state will + be able to close if the server responds, but do not count as active channels. + This means that if you ~. all of the mux clients when using ControlPersist + on a broken network, the backgrounded mux master will exit when the + Control Persist time expires rather than hanging around indefinitely. + bz#1917, also reported and tested by tedu@. ok djm@ markus@. + - (dtucker) [Makefile.in configure.ac fixalgorithms] Remove unsupported + algorithms (Ciphers, MACs and HostKeyAlgorithms) from man pages. + - (dtucker) [myproposal.h] Do not advertise AES GSM ciphers if we don't have + the required OpenSSL support. Patch from naddy at freebsd. + - (dtucker) [myproposal.h] Make the conditional algorithm support consistent + and add some comments so it's clear what goes where. + +20130605 + - (dtucker) [myproposal.h] Enable sha256 kex methods based on the presence of + the necessary functions, not from the openssl version. + - (dtucker) [contrib/ssh-copy-id] bz#2117: Use portable operator in test. + Patch from cjwatson at debian. + - (dtucker) [regress/forwarding.sh] For (as yet unknown) reason, the + forwarding test is extremely slow copying data on some machines so switch + back to copying the much smaller ls binary until we can figure out why + this is. + - (dtucker) [Makefile.in] append $CFLAGS to compiler options when building + modpipe in case there's anything in there we need. + - (dtucker) OpenBSD CVS Sync + - dtucker@cvs.openbsd.org 2013/06/02 21:01:51 + [channels.h] + typo in comment + - dtucker@cvs.openbsd.org 2013/06/02 23:36:29 + [clientloop.h clientloop.c mux.c] + No need for the mux cleanup callback to be visible so restore it to static + and call it through the detach_user function pointer. ok djm@ + - dtucker@cvs.openbsd.org 2013/06/03 00:03:18 + [mac.c] + force the MAC output to be 64-bit aligned so umac won't see unaligned + accesses on strict-alignment architectures. bz#2101, patch from + tomas.kuthan at oracle.com, ok djm@ + - dtucker@cvs.openbsd.org 2013/06/04 19:12:23 + [scp.c] + use MAXPATHLEN for buffer size instead of fixed value. ok markus + - dtucker@cvs.openbsd.org 2013/06/04 20:42:36 + [sftp.c] + Make sftp's libedit interface marginally multibyte aware by building up + the quoted string by character instead of by byte. Prevents failures + when linked against a libedit built with wide character support (bz#1990). + "looks ok" djm + - dtucker@cvs.openbsd.org 2013/06/05 02:07:29 + [mux.c] + fix leaks in mux error paths, from Zhenbo Xu, found by Melton. bz#1967, + ok djm + - dtucker@cvs.openbsd.org 2013/06/05 02:27:50 + [sshd.c] + When running sshd -D, close stderr unless we have explicitly requesting + logging to stderr. From james.hunt at ubuntu.com via bz#1976, djm's patch + so, err, ok dtucker. + - dtucker@cvs.openbsd.org 2013/06/05 12:52:38 + [sshconnect2.c] + Fix memory leaks found by Zhenbo Xu and the Melton tool. bz#1967, ok djm + - dtucker@cvs.openbsd.org 2013/06/05 22:00:28 + [readconf.c] + plug another memleak. bz#1967, from Zhenbo Xu, detected by Melton, ok djm + - (dtucker) [configure.ac sftp.c openbsd-compat/openbsd-compat.h] Cater for + platforms that don't have multibyte character support (specifically, + mblen). + +20130602 + - (tim) [Makefile.in] Make Solaris, UnixWare, & OpenServer linkers happy + linking regress/modpipe. + - (dtucker) OpenBSD CVS Sync + - dtucker@cvs.openbsd.org 2013/06/02 13:33:05 + [progressmeter.c] + Add misc.h for monotime prototype. (ID sync only). + - dtucker@cvs.openbsd.org 2013/06/02 13:35:58 + [ssh-agent.c] + Make parent_alive_interval time_t to avoid signed/unsigned comparison + - (dtucker) [configure.ac] sys/un.h needs sys/socket.h on some platforms + to prevent noise from configure. Patch from Nathan Osman. (bz#2114). + - (dtucker) [configure.ac] bz#2111: don't try to use lastlog on Android. + Patch from Nathan Osman. + - (tim) [configure.ac regress/Makefile] With rev 1.47 of test-exec.sh we + need a shell that can handle "[ file1 -nt file2 ]". Rather than keep + dealing with shell portability issues in regression tests, we let + configure find us a capable shell on those platforms with an old /bin/sh. + - (tim) [aclocal.m4] Enhance OSSH_CHECK_CFLAG_COMPILE to check stderr. + feedback and ok dtucker + - (tim) [regress/sftp-chroot.sh] skip if no sudo. ok dtucker + - (dtucker) [configure.ac] Some platforms need sys/types.h before sys/un.h. + - (dtucker) [configure.ac] Some other platforms need sys/types.h before + sys/socket.h. + +20130601 + - (dtucker) [configure.ac openbsd-compat/xcrypt.c] bz#2112: fall back to + using openssl's DES_crypt function on platorms that don't have a native + one, eg Android. Based on a patch from Nathan Osman. + - (dtucker) [configure.ac defines.h] Test for fd_mask, howmany and NFDBITS + rather than trying to enumerate the plaforms that don't have them. + Based on a patch from Nathan Osman, with help from tim@. + - (dtucker) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2013/05/17 00:13:13 + [xmalloc.h cipher.c sftp-glob.c ssh-keyscan.c ssh.c sftp-common.c + ssh-ecdsa.c auth2-chall.c compat.c readconf.c kexgexs.c monitor.c + gss-genr.c cipher-3des1.c kex.c monitor_wrap.c ssh-pkcs11-client.c + auth-options.c rsa.c auth2-pubkey.c sftp.c hostfile.c auth2.c + servconf.c auth.c authfile.c xmalloc.c uuencode.c sftp-client.c + auth2-gss.c sftp-server.c bufaux.c mac.c session.c jpake.c kexgexc.c + sshconnect.c auth-chall.c auth2-passwd.c sshconnect1.c buffer.c + kexecdhs.c kexdhs.c ssh-rsa.c auth1.c ssh-pkcs11.c auth2-kbdint.c + kexdhc.c sshd.c umac.c ssh-dss.c auth2-jpake.c bufbn.c clientloop.c + monitor_mm.c scp.c roaming_client.c serverloop.c key.c auth-rsa.c + ssh-pkcs11-helper.c ssh-keysign.c ssh-keygen.c match.c channels.c + sshconnect2.c addrmatch.c mux.c canohost.c kexecdhc.c schnorr.c + ssh-add.c misc.c auth2-hostbased.c ssh-agent.c bufec.c groupaccess.c + dns.c packet.c readpass.c authfd.c moduli.c] + bye, bye xfree(); ok markus@ + - djm@cvs.openbsd.org 2013/05/19 02:38:28 + [auth2-pubkey.c] + fix failure to recognise cert-authority keys if a key of a different type + appeared in authorized_keys before it; ok markus@ + - djm@cvs.openbsd.org 2013/05/19 02:42:42 + [auth.h auth.c key.c monitor.c auth-rsa.c auth2.c auth1.c key.h] + Standardise logging of supplemental information during userauth. Keys + and ruser is now logged in the auth success/failure message alongside + the local username, remote host/port and protocol in use. Certificates + contents and CA are logged too. + Pushing all logging onto a single line simplifies log analysis as it is + no longer necessary to relate information scattered across multiple log + entries. "I like it" markus@ + - dtucker@cvs.openbsd.org 2013/05/31 12:28:10 + [ssh-agent.c] + Use time_t where appropriate. ok djm + - dtucker@cvs.openbsd.org 2013/06/01 13:15:52 + [ssh-agent.c clientloop.c misc.h packet.c progressmeter.c misc.c + channels.c sandbox-systrace.c] + Use clock_gettime(CLOCK_MONOTONIC ...) for ssh timers so that things like + keepalives and rekeying will work properly over clock steps. Suggested by + markus@, "looks good" djm@. + - dtucker@cvs.openbsd.org 2013/06/01 20:59:25 + [scp.c sftp-client.c] + Replace S_IWRITE, which isn't standardized, with S_IWUSR, which is. Patch + from Nathan Osman via bz#2085. ok deraadt. + - dtucker@cvs.openbsd.org 2013/06/01 22:34:50 + [sftp-client.c] + Update progressmeter when data is acked, not when it's sent. bz#2108, from + Debian via Colin Watson, ok djm@ + - (dtucker) [M auth-chall.c auth-krb5.c auth-pam.c cipher-aes.c cipher-ctr.c + groupaccess.c loginrec.c monitor.c monitor_wrap.c session.c sshd.c + sshlogin.c uidswap.c openbsd-compat/bsd-cygwin_util.c + openbsd-compat/getrrsetbyname-ldns.c openbsd-compat/port-aix.c + openbsd-compat/port-linux.c] Replace portable-specific instances of xfree + with the equivalent calls to free. + - (dtucker) [configure.ac misc.c] Look for clock_gettime in librt and fall + back to time(NULL) if we can't find it anywhere. + - (dtucker) [sandbox-seccomp-filter.c] Allow clock_gettimeofday. + +20130529 + - (dtucker) [configure.ac openbsd-compat/bsd-misc.h] bz#2087: Add a null + implementation of endgrent for platforms that don't have it (eg Android). + Loosely based on a patch from Nathan Osman, ok djm + + 20130517 + - (dtucker) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2013/03/07 00:20:34 + [regress/proxy-connect.sh] + repeat test with a style appended to the username + - dtucker@cvs.openbsd.org 2013/03/23 11:09:43 + [regress/test-exec.sh] + Only regenerate host keys if they don't exist or if ssh-keygen has changed + since they were. Reduces test runtime by 5-30% depending on machine + speed. + - dtucker@cvs.openbsd.org 2013/04/06 06:00:22 + [regress/rekey.sh regress/test-exec.sh regress/integrity.sh + regress/multiplex.sh Makefile regress/cfgmatch.sh] + Split the regress log into 3 parts: the debug output from ssh, the debug + log from sshd and the output from the client command (ssh, scp or sftp). + Somewhat functional now, will become more useful when ssh/sshd -E is added. + - dtucker@cvs.openbsd.org 2013/04/07 02:16:03 + [regress/Makefile regress/rekey.sh regress/integrity.sh + regress/sshd-log-wrapper.sh regress/forwarding.sh regress/test-exec.sh] + use -E option for ssh and sshd to write debuging logs to ssh{,d}.log and + save the output from any failing tests. If a test fails the debug output + from ssh and sshd for the failing tests (and only the failing tests) should + be available in failed-ssh{,d}.log. + - djm@cvs.openbsd.org 2013/04/18 02:46:12 + [regress/Makefile regress/sftp-chroot.sh] + test sshd ChrootDirectory+internal-sftp; feedback & ok dtucker@ + - dtucker@cvs.openbsd.org 2013/04/22 07:23:08 + [regress/multiplex.sh] + Write mux master logs to regress.log instead of ssh.log to keep separate + - djm@cvs.openbsd.org 2013/05/10 03:46:14 + [regress/modpipe.c] + sync some portability changes from portable OpenSSH (id sync only) + - dtucker@cvs.openbsd.org 2013/05/16 02:10:35 + [regress/rekey.sh] + Add test for time-based rekeying + - dtucker@cvs.openbsd.org 2013/05/16 03:33:30 + [regress/rekey.sh] + test rekeying when there's no data being transferred + - dtucker@cvs.openbsd.org 2013/05/16 04:26:10 + [regress/rekey.sh] + add server-side rekey test + - dtucker@cvs.openbsd.org 2013/05/16 05:48:31 + [regress/rekey.sh] + add tests for RekeyLimit parsing + - dtucker@cvs.openbsd.org 2013/05/17 00:37:40 + [regress/agent.sh regress/keytype.sh regress/cfgmatch.sh + regress/forcecommand.sh regress/proto-version.sh regress/test-exec.sh + regress/cipher-speed.sh regress/cert-hostkey.sh regress/cert-userkey.sh + regress/ssh-com.sh] + replace 'echo -n' with 'printf' since it's more portable + also remove "echon" hack. + - dtucker@cvs.openbsd.org 2013/05/17 01:16:09 + [regress/agent-timeout.sh] + Pull back some portability changes from -portable: + - TIMEOUT is a read-only variable in some shells + - not all greps have -q so redirect to /dev/null instead. + (ID sync only) + - dtucker@cvs.openbsd.org 2013/05/17 01:32:11 + [regress/integrity.sh] + don't print output from ssh before getting it (it's available in ssh.log) + - dtucker@cvs.openbsd.org 2013/05/17 04:29:14 + [regress/sftp.sh regress/putty-ciphers.sh regress/cipher-speed.sh + regress/test-exec.sh regress/sftp-batch.sh regress/dynamic-forward.sh + regress/putty-transfer.sh regress/conch-ciphers.sh regress/sftp-cmds.sh + regress/scp.sh regress/ssh-com-sftp.sh regress/rekey.sh + regress/putty-kex.sh regress/stderr-data.sh regress/stderr-after-eof.sh + regress/sftp-badcmds.sh regress/reexec.sh regress/ssh-com-client.sh + regress/sftp-chroot.sh regress/forwarding.sh regress/transfer.sh + regress/multiplex.sh] + Move the setting of DATA and COPY into test-exec.sh + - dtucker@cvs.openbsd.org 2013/05/17 10:16:26 + [regress/try-ciphers.sh] + use expr for math to keep diffs vs portable down + (id sync only) + - dtucker@cvs.openbsd.org 2013/05/17 10:23:52 + [regress/login-timeout.sh regress/reexec.sh regress/test-exec.sh] + Use SUDO when cat'ing pid files and running the sshd log wrapper so that + it works with a restrictive umask and the pid files are not world readable. + Changes from -portable. (id sync only) + - dtucker@cvs.openbsd.org 2013/05/17 10:24:48 + [regress/localcommand.sh] + use backticks for portability. (id sync only) + - dtucker@cvs.openbsd.org 2013/05/17 10:26:26 + [regress/sftp-badcmds.sh] + remove unused BATCH variable. (id sync only) + - dtucker@cvs.openbsd.org 2013/05/17 10:28:11 + [regress/sftp.sh] + only compare copied data if sftp succeeds. from portable (id sync only) + - dtucker@cvs.openbsd.org 2013/05/17 10:30:07 + [regress/test-exec.sh] + wait a bit longer for startup and use case for absolute path. + from portable (id sync only) + - dtucker@cvs.openbsd.org 2013/05/17 10:33:09 + [regress/agent-getpeereid.sh] + don't redirect stdout from sudo. from portable (id sync only) + - dtucker@cvs.openbsd.org 2013/05/17 10:34:30 + [regress/portnum.sh] + use a more portable negated if structure. from portable (id sync only) + - dtucker@cvs.openbsd.org 2013/05/17 10:35:43 + [regress/scp.sh] + use a file extention that's not special on some platforms. from portable + (id sync only) + - (dtucker) [regress/bsd.regress.mk] Remove unused file. We've never used it + in portable and it's long gone in openbsd. + - (dtucker) [regress/integrity.sh]. Force fixed Diffie-Hellman key exchange + methods. When the openssl version doesn't support ECDH then next one on + the list is DH group exchange, but that causes a bit more traffic which can + mean that the tests flip bits in the initial exchange rather than the MACed + traffic and we get different errors to what the tests look for. + - (dtucker) [openbsd-compat/getopt.h] Remove unneeded bits. + - (dtucker) [regress/cfgmatch.sh] Resync config file setup with openbsd. + - (dtucker) [regress/agent-getpeereid.sh] Resync spaces with openbsd. + - (dtucker) [regress/integrity.sh regress/krl.sh regress/test-exec.sh] + Move the jot helper function to portable-specific part of test-exec.sh. + - (dtucker) [regress/test-exec.sh] Move the portable-specific functions + together and add a couple of missing lines from openbsd. + - (dtucker) [regress/stderr-after-eof.sh regress/test-exec.sh] Move the md5 + helper function to the portable part of test-exec.sh. + - (dtucker) [regress/runtests.sh] Remove obsolete test driver script. + - (dtucker) [regress/cfgmatch.sh] Remove unneeded sleep renderd obsolete by + rev 1.6 which calls wait. + +20130516 + - (djm) [contrib/ssh-copy-id] Fix bug that could cause "rm *" to be + executed if mktemp failed; bz#2105 ok dtucker@ + - (dtucker) OpenBSD CVS Sync + - tedu@cvs.openbsd.org 2013/04/23 17:49:45 + [misc.c] + use xasprintf instead of a series of strlcats and strdup. ok djm + - tedu@cvs.openbsd.org 2013/04/24 16:01:46 + [misc.c] + remove extra parens noticed by nicm + - dtucker@cvs.openbsd.org 2013/05/06 07:35:12 + [sftp-server.8] + Reference the version of the sftp draft we actually implement. ok djm@ + - djm@cvs.openbsd.org 2013/05/10 03:40:07 + [sshconnect2.c] + fix bzero(ptr_to_struct, sizeof(ptr_to_struct)); bz#2100 from + Colin Watson + - djm@cvs.openbsd.org 2013/05/10 04:08:01 + [key.c] + memleak in cert_free(), wasn't actually freeing the struct; + bz#2096 from shm AT digitalsun.pl + - dtucker@cvs.openbsd.org 2013/05/10 10:13:50 + [ssh-pkcs11-helper.c] + remove unused extern optarg. ok markus@ + - dtucker@cvs.openbsd.org 2013/05/16 02:00:34 + [ssh_config sshconnect2.c packet.c readconf.h readconf.c clientloop.c + ssh_config.5 packet.h] + Add an optional second argument to RekeyLimit in the client to allow + rekeying based on elapsed time in addition to amount of traffic. + with djm@ jmc@, ok djm + - dtucker@cvs.openbsd.org 2013/05/16 04:09:14 + [sshd_config.5 servconf.c servconf.h packet.c serverloop.c monitor.c sshd_config + sshd.c] Add RekeyLimit to sshd with the same syntax as the client allowing + rekeying based on traffic volume or time. ok djm@, help & ok jmc@ for the man + page. + - djm@cvs.openbsd.org 2013/05/16 04:27:50 + [ssh_config.5 readconf.h readconf.c] + add the ability to ignore specific unrecognised ssh_config options; + bz#866; ok markus@ + - jmc@cvs.openbsd.org 2013/05/16 06:28:45 + [ssh_config.5] + put IgnoreUnknown in the right place; + - jmc@cvs.openbsd.org 2013/05/16 06:30:06 + [sshd_config.5] + oops! avoid Xr to self; + - dtucker@cvs.openbsd.org 2013/05/16 09:08:41 + [log.c scp.c sshd.c serverloop.c schnorr.c sftp.c] + Fix some "unused result" warnings found via clang and -portable. + ok markus@ + - dtucker@cvs.openbsd.org 2013/05/16 09:12:31 + [readconf.c servconf.c] + switch RekeyLimit traffic volume parsing to scan_scaled. ok djm@ + - dtucker@cvs.openbsd.org 2013/05/16 10:43:34 + [servconf.c readconf.c] + remove now-unused variables + - dtucker@cvs.openbsd.org 2013/05/16 10:44:06 + [servconf.c] + remove another now-unused variable + - (dtucker) [configure.ac readconf.c servconf.c + openbsd-compat/openbsd-compat.h] Add compat bits for scan_scaled. + 20130510 - - (djm) OpenBSD CVS Cherrypick + - (dtucker) [configure.ac] Enable -Wsizeof-pointer-memaccess if the compiler + supports it. Mentioned by Colin Watson in bz#2100, ok djm. + - (dtucker) [openbsd-compat/getopt.c] Factor out portibility changes to + getopt.c. Preprocessed source is identical other than line numbers. + - (dtucker) [openbsd-compat/getopt_long.c] Import from OpenBSD. No + portability changes yet. + - (dtucker) [openbsd-compat/Makefile.in openbsd-compat/getopt.c + openbsd-compat/getopt_long.c regress/modpipe.c] Remove getopt.c, add + portability code to getopt_long.c and switch over Makefile and the ugly + hack in modpipe.c. Fixes bz#1448. + - (dtucker) [openbsd-compat/getopt.h openbsd-compat/getopt_long.c + openbsd-compat/openbsd-compat.h] pull in getopt.h from openbsd and plumb + in to use it when we're using our own getopt. + - (dtucker) [kex.c] Only include sha256 and ECC key exchange methods when the + underlying libraries support them. + - (dtucker) [configure.ac] Add -Werror to the -Qunused-arguments test so + we don't get a warning on compilers that *don't* support it. Add + -Wno-unknown-warning-option. Move both to the start of the list for + maximum noise suppression. Tested with gcc 4.6.3, gcc 2.95.4 and clang 2.9. + +20130423 + - (djm) [auth.c configure.ac misc.c monitor.c monitor_wrap.c] Support + platforms, such as Android, that lack struct passwd.pw_gecos. Report + and initial patch from Nathan Osman bz#2086; feedback tim@ ok dtucker@ + - (djm) OpenBSD CVS Sync + - markus@cvs.openbsd.org 2013/03/05 20:16:09 + [sshconnect2.c] + reset pubkey order on partial success; ok djm@ + - djm@cvs.openbsd.org 2013/03/06 23:35:23 + [session.c] + fatal() when ChrootDirectory specified by running without root privileges; + ok markus@ + - djm@cvs.openbsd.org 2013/03/06 23:36:53 + [readconf.c] + g/c unused variable (-Wunused) + - djm@cvs.openbsd.org 2013/03/07 00:19:59 + [auth2-pubkey.c monitor.c] + reconstruct the original username that was sent by the client, which may + have included a style (e.g. "root:skey") when checking public key + signatures. Fixes public key and hostbased auth when the client specified + a style; ok markus@ + - markus@cvs.openbsd.org 2013/03/07 19:27:25 + [auth.h auth2-chall.c auth2.c monitor.c sshd_config.5] + add submethod support to AuthenticationMethods; ok and freedback djm@ + - djm@cvs.openbsd.org 2013/03/08 06:32:58 + [ssh.c] + allow "ssh -f none ..." ok markus@ + - djm@cvs.openbsd.org 2013/04/05 00:14:00 + [auth2-gss.c krl.c sshconnect2.c] + hush some {unused, printf type} warnings + - djm@cvs.openbsd.org 2013/04/05 00:31:49 + [pathnames.h] + use the existing _PATH_SSH_USER_RC define to construct the other + pathnames; bz#2077, ok dtucker@ (no binary change) + - djm@cvs.openbsd.org 2013/04/05 00:58:51 + [mux.c] + cleanup mux-created channels that are in SSH_CHANNEL_OPENING state too + (in addition to ones already in OPEN); bz#2079, ok dtucker@ + - markus@cvs.openbsd.org 2013/04/06 16:07:00 + [channels.c sshd.c] + handle ECONNABORTED for accept(); ok deraadt some time ago... + - dtucker@cvs.openbsd.org 2013/04/07 02:10:33 + [log.c log.h ssh.1 ssh.c sshd.8 sshd.c] + Add -E option to ssh and sshd to append debugging logs to a specified file + instead of stderr or syslog. ok markus@, man page help jmc@ + - dtucker@cvs.openbsd.org 2013/04/07 09:40:27 + [sshd.8] + clarify -e text. suggested by & ok jmc@ - djm@cvs.openbsd.org 2013/04/11 02:27:50 [packet.c] quiet disconnect notifications on the server from error() back to logit() if it is a normal client closure; bz#2057 ok+feedback dtucker@ - - (djm) [version.h contrib/caldera/openssh.spec contrib/redhat/openssh.spec] - [contrib/suse/openssh.spec] Crank version numbers for release. + - dtucker@cvs.openbsd.org 2013/04/17 09:04:09 + [session.c] + revert rev 1.262; it fails because uid is already set here. ok djm@ + - djm@cvs.openbsd.org 2013/04/18 02:16:07 + [sftp.c] + make "sftp -q" do what it says on the sticker: hush everything but errors; + ok dtucker@ + - djm@cvs.openbsd.org 2013/04/19 01:00:10 + [sshd_config.5] + document the requirment that the AuthorizedKeysCommand be owned by root; + ok dtucker@ markus@ + - djm@cvs.openbsd.org 2013/04/19 01:01:00 + [ssh-keygen.c] + fix some memory leaks; bz#2088 ok dtucker@ + - djm@cvs.openbsd.org 2013/04/19 01:03:01 + [session.c] + reintroduce 1.262 without the connection-killing bug: + fatal() when ChrootDirectory specified by running without root privileges; + ok markus@ + - djm@cvs.openbsd.org 2013/04/19 01:06:50 + [authfile.c cipher.c cipher.h kex.c kex.h kexecdh.c kexecdhc.c kexecdhs.c] + [key.c key.h mac.c mac.h packet.c ssh.1 ssh.c] + add the ability to query supported ciphers, MACs, key type and KEX + algorithms to ssh. Includes some refactoring of KEX and key type handling + to be table-driven; ok markus@ + - djm@cvs.openbsd.org 2013/04/19 11:10:18 + [ssh.c] + add -Q to usage; reminded by jmc@ + - djm@cvs.openbsd.org 2013/04/19 12:07:08 + [kex.c] + remove duplicated list entry pointed out by naddy@ + - dtucker@cvs.openbsd.org 2013/04/22 01:17:18 + [mux.c] + typo in debug output: evitval->exitval + +20130418 + - (djm) [config.guess config.sub] Update to last versions before they switch + to GPL3. ok dtucker@ + - (dtucker) [configure.ac] Use -Qunused-arguments to suppress warnings from + unused argument warnings (in particular, -fno-builtin-memset) from clang. 20130404 - (dtucker) OpenBSD CVS Sync @@ -34,10 +651,16 @@ to avoid conflicting definitions of __int64, adding the required bits. Patch from Corinna Vinschen. +20120323 + - (tim) [Makefile.in] remove some duplication introduced in 20130220 commit. + 20120322 - (djm) [contrib/ssh-copy-id contrib/ssh-copy-id.1] Updated to Phil Hands' greatly revised version. - (djm) Release 6.2p1 + - (dtucker) [configure.ac] Add stdlib.h to zlib check for exit() prototype. + - (dtucker) [includes.h] Check if _GNU_SOURCE is already defined before + defining it again. Prevents warnings if someone, eg, sets it in CFLAGS. 20120318 - (djm) [configure.ac log.c scp.c sshconnect2.c openbsd-compat/vis.c] Modified: head/crypto/openssh/README ============================================================================== --- head/crypto/openssh/README Sat Sep 21 21:34:22 2013 (r255766) +++ head/crypto/openssh/README Sat Sep 21 21:36:09 2013 (r255767) @@ -1,4 +1,4 @@ -See http://www.openssh.com/txt/release-6.2p2 for the release notes. +See http://www.openssh.com/txt/release-6.3 for the release notes. - A Japanese translation of this document and of the OpenSSH FAQ is - available at http://www.unixuser.org/~haruyama/security/openssh/index.html @@ -62,4 +62,4 @@ References - [6] http://www.openbsd.org/cgi-bin/man.cgi?query=style&sektion=9 [7] http://www.openssh.com/faq.html -$Id: README,v 1.82.2.1 2013/05/10 06:12:54 djm Exp $ +$Id: README,v 1.83 2013/07/25 02:34:00 djm Exp $ Modified: head/crypto/openssh/aclocal.m4 ============================================================================== --- head/crypto/openssh/aclocal.m4 Sat Sep 21 21:34:22 2013 (r255766) +++ head/crypto/openssh/aclocal.m4 Sat Sep 21 21:36:09 2013 (r255767) @@ -1,4 +1,4 @@ -dnl $Id: aclocal.m4,v 1.8 2011/05/20 01:45:25 djm Exp $ +dnl $Id: aclocal.m4,v 1.9 2013/06/02 21:31:27 tim Exp $ dnl dnl OpenSSH-specific autoconf macros dnl @@ -14,8 +14,15 @@ AC_DEFUN([OSSH_CHECK_CFLAG_COMPILE], [{ _define_flag="$2" test "x$_define_flag" = "x" && _define_flag="$1" AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int main(void) { return 0; }]])], - [ AC_MSG_RESULT([yes]) - CFLAGS="$saved_CFLAGS $_define_flag"], + [ +if `grep -i "unrecognized option" conftest.err >/dev/null` +then + AC_MSG_RESULT([no]) + CFLAGS="$saved_CFLAGS" +else + AC_MSG_RESULT([yes]) + CFLAGS="$saved_CFLAGS $_define_flag" +fi], [ AC_MSG_RESULT([no]) CFLAGS="$saved_CFLAGS" ] ) Modified: head/crypto/openssh/addrmatch.c ============================================================================== --- head/crypto/openssh/addrmatch.c Sat Sep 21 21:34:22 2013 (r255766) +++ head/crypto/openssh/addrmatch.c Sat Sep 21 21:36:09 2013 (r255767) @@ -1,4 +1,4 @@ -/* $OpenBSD: addrmatch.c,v 1.6 2012/06/21 00:16:07 dtucker Exp $ */ +/* $OpenBSD: addrmatch.c,v 1.7 2013/05/17 00:13:13 djm Exp $ */ /* * Copyright (c) 2004-2008 Damien Miller @@ -420,7 +420,7 @@ addr_match_list(const char *addr, const goto foundit; } } - xfree(o); + free(o); return ret; } @@ -494,7 +494,7 @@ addr_match_cidr_list(const char *addr, c continue; } } - xfree(o); + free(o); return ret; } Modified: head/crypto/openssh/auth-chall.c ============================================================================== --- head/crypto/openssh/auth-chall.c Sat Sep 21 21:34:22 2013 (r255766) +++ head/crypto/openssh/auth-chall.c Sat Sep 21 21:36:09 2013 (r255767) @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-chall.c,v 1.12 2006/08/03 03:34:41 deraadt Exp $ */ +/* $OpenBSD: auth-chall.c,v 1.13 2013/05/17 00:13:13 djm Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -69,11 +69,11 @@ get_challenge(Authctxt *authctxt) fatal("get_challenge: numprompts < 1"); challenge = xstrdup(prompts[0]); for (i = 0; i < numprompts; i++) - xfree(prompts[i]); - xfree(prompts); - xfree(name); - xfree(echo_on); - xfree(info); + free(prompts[i]); + free(prompts); + free(name); + free(echo_on); + free(info); return (challenge); } @@ -102,11 +102,11 @@ verify_response(Authctxt *authctxt, cons authenticated = 1; for (i = 0; i < numprompts; i++) - xfree(prompts[i]); - xfree(prompts); - xfree(name); - xfree(echo_on); - xfree(info); + free(prompts[i]); + free(prompts); + free(name); + free(echo_on); + free(info); break; } device->free_ctx(authctxt->kbdintctxt); Modified: head/crypto/openssh/auth-krb5.c ============================================================================== --- head/crypto/openssh/auth-krb5.c Sat Sep 21 21:34:22 2013 (r255766) +++ head/crypto/openssh/auth-krb5.c Sat Sep 21 21:36:09 2013 (r255767) @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-krb5.c,v 1.19 2006/08/03 03:34:41 deraadt Exp $ */ +/* $OpenBSD: auth-krb5.c,v 1.20 2013/07/20 01:55:13 djm Exp $ */ /* * Kerberos v5 authentication and ticket-passing routines. * @@ -79,6 +79,7 @@ auth_krb5_password(Authctxt *authctxt, c krb5_ccache ccache = NULL; int len; char *client, *platform_client; + const char *errmsg; /* get platform-specific kerberos client principal name (if it exists) */ platform_client = platform_krb5_get_principal_name(authctxt->pw->pw_name); @@ -96,7 +97,12 @@ auth_krb5_password(Authctxt *authctxt, c goto out; #ifdef HEIMDAL +# ifdef HAVE_KRB5_CC_NEW_UNIQUE + problem = krb5_cc_new_unique(authctxt->krb5_ctx, + krb5_mcc_ops.prefix, NULL, &ccache); +# else problem = krb5_cc_gen_new(authctxt->krb5_ctx, &krb5_mcc_ops, &ccache); +# endif if (problem) goto out; @@ -115,8 +121,13 @@ auth_krb5_password(Authctxt *authctxt, c if (problem) goto out; +# ifdef HAVE_KRB5_CC_NEW_UNIQUE + problem = krb5_cc_new_unique(authctxt->krb5_ctx, + krb5_fcc_ops.prefix, NULL, &authctxt->krb5_fwd_ccache); +# else problem = krb5_cc_gen_new(authctxt->krb5_ctx, &krb5_fcc_ops, &authctxt->krb5_fwd_ccache); +# endif if (problem) goto out; @@ -181,17 +192,19 @@ auth_krb5_password(Authctxt *authctxt, c out: restore_uid(); - if (platform_client != NULL) - xfree(platform_client); + free(platform_client); if (problem) { if (ccache) krb5_cc_destroy(authctxt->krb5_ctx, ccache); - if (authctxt->krb5_ctx != NULL && problem!=-1) - debug("Kerberos password authentication failed: %s", - krb5_get_err_text(authctxt->krb5_ctx, problem)); - else + if (authctxt->krb5_ctx != NULL && problem!=-1) { + errmsg = krb5_get_error_message(authctxt->krb5_ctx, + problem); + debug("Kerberos password authentication failed: %s", + errmsg); + krb5_free_error_message(authctxt->krb5_ctx, errmsg); + } else debug("Kerberos password authentication failed: %d", problem); Modified: head/crypto/openssh/auth-options.c ============================================================================== --- head/crypto/openssh/auth-options.c Sat Sep 21 21:34:22 2013 (r255766) +++ head/crypto/openssh/auth-options.c Sat Sep 21 21:36:09 2013 (r255767) @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-options.c,v 1.57 2012/12/02 20:46:11 djm Exp $ */ +/* $OpenBSD: auth-options.c,v 1.59 2013/07/12 00:19:58 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -72,15 +72,15 @@ auth_clear_options(void) while (custom_environment) { struct envstring *ce = custom_environment; custom_environment = ce->next; - xfree(ce->s); - xfree(ce); + free(ce->s); + free(ce); } if (forced_command) { - xfree(forced_command); + free(forced_command); forced_command = NULL; } if (authorized_principals) { - xfree(authorized_principals); + free(authorized_principals); authorized_principals = NULL; } forced_tun_device = -1; @@ -149,7 +149,7 @@ auth_parse_options(struct passwd *pw, ch if (strncasecmp(opts, cp, strlen(cp)) == 0) { opts += strlen(cp); if (forced_command != NULL) - xfree(forced_command); + free(forced_command); forced_command = xmalloc(strlen(opts) + 1); i = 0; while (*opts) { @@ -167,7 +167,7 @@ auth_parse_options(struct passwd *pw, ch file, linenum); auth_debug_add("%.100s, line %lu: missing end quote", file, linenum); - xfree(forced_command); + free(forced_command); forced_command = NULL; goto bad_option; } @@ -180,7 +180,7 @@ auth_parse_options(struct passwd *pw, ch if (strncasecmp(opts, cp, strlen(cp)) == 0) { opts += strlen(cp); if (authorized_principals != NULL) - xfree(authorized_principals); + free(authorized_principals); authorized_principals = xmalloc(strlen(opts) + 1); i = 0; while (*opts) { @@ -198,7 +198,7 @@ auth_parse_options(struct passwd *pw, ch file, linenum); auth_debug_add("%.100s, line %lu: missing end quote", file, linenum); - xfree(authorized_principals); + free(authorized_principals); authorized_principals = NULL; goto bad_option; } @@ -232,7 +232,7 @@ auth_parse_options(struct passwd *pw, ch file, linenum); auth_debug_add("%.100s, line %lu: missing end quote", file, linenum); - xfree(s); + free(s); goto bad_option; } s[i] = '\0'; @@ -269,7 +269,7 @@ auth_parse_options(struct passwd *pw, ch file, linenum); auth_debug_add("%.100s, line %lu: missing end quote", file, linenum); - xfree(patterns); + free(patterns); goto bad_option; } patterns[i] = '\0'; @@ -277,7 +277,7 @@ auth_parse_options(struct passwd *pw, ch switch (match_host_and_ip(remote_host, remote_ip, patterns)) { case 1: - xfree(patterns); + free(patterns); /* Host name matches. */ goto next_option; case -1: @@ -287,7 +287,7 @@ auth_parse_options(struct passwd *pw, ch "invalid criteria", file, linenum); /* FALLTHROUGH */ case 0: - xfree(patterns); + free(patterns); logit("Authentication tried for %.100s with " "correct key but not from a permitted " "host (host=%.200s, ip=%.200s).", @@ -323,7 +323,7 @@ auth_parse_options(struct passwd *pw, ch file, linenum); auth_debug_add("%.100s, line %lu: missing " "end quote", file, linenum); - xfree(patterns); + free(patterns); goto bad_option; } patterns[i] = '\0'; @@ -337,7 +337,7 @@ auth_parse_options(struct passwd *pw, ch auth_debug_add("%.100s, line %lu: " "Bad permitopen specification", file, linenum); - xfree(patterns); + free(patterns); goto bad_option; } host = cleanhostname(host); @@ -346,12 +346,12 @@ auth_parse_options(struct passwd *pw, ch "<%.100s>", file, linenum, p ? p : ""); auth_debug_add("%.100s, line %lu: " "Bad permitopen port", file, linenum); - xfree(patterns); + free(patterns); goto bad_option; } if ((options.allow_tcp_forwarding & FORWARD_LOCAL) != 0) channel_add_permitted_opens(host, port); - xfree(patterns); + free(patterns); goto next_option; } cp = "tunnel=\""; @@ -370,13 +370,13 @@ auth_parse_options(struct passwd *pw, ch file, linenum); auth_debug_add("%.100s, line %lu: missing end quote", file, linenum); - xfree(tun); + free(tun); forced_tun_device = -1; goto bad_option; } tun[i] = '\0'; forced_tun_device = a2tun(tun, NULL); - xfree(tun); + free(tun); if (forced_tun_device == SSH_TUNID_ERR) { debug("%.100s, line %lu: invalid tun device", file, linenum); @@ -432,7 +432,8 @@ parse_option_list(u_char *optblob, size_ { char *command, *allowed; const char *remote_ip; - u_char *name = NULL, *data_blob = NULL; + char *name = NULL; + u_char *data_blob = NULL; u_int nlen, dlen, clen; Buffer c, data; int ret = -1, found; @@ -484,7 +485,7 @@ parse_option_list(u_char *optblob, size_ if (*cert_forced_command != NULL) { error("Certificate has multiple " "force-command options"); - xfree(command); + free(command); goto out; } *cert_forced_command = command; @@ -500,7 +501,7 @@ parse_option_list(u_char *optblob, size_ if ((*cert_source_address_done)++) { error("Certificate has multiple " "source-address options"); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Sep 21 21:40:58 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 542F9B3E; Sat, 21 Sep 2013 21:40:58 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3FC442A15; Sat, 21 Sep 2013 21:40:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8LLewwP088088; Sat, 21 Sep 2013 21:40:58 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8LLevpG088085; Sat, 21 Sep 2013 21:40:57 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201309212140.r8LLevpG088085@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 21 Sep 2013 21:40:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255768 - head/sys/dev/usb/controller X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Sep 2013 21:40:58 -0000 Author: hselasky Date: Sat Sep 21 21:40:57 2013 New Revision: 255768 URL: http://svnweb.freebsd.org/changeset/base/255768 Log: Stability fixes for Intel LynxPoint XHCI controllers. Disable XHCI port routing if we get certain errors. Poll for command completion upon command timeouts. The XHCI error events might not generate interrupts. MFC after: 1 week Reported by: Daniel Gerzo , Antonis Anastasiadis PR: usb/181159 Approved by: re (gjb) Modified: head/sys/dev/usb/controller/xhci.c head/sys/dev/usb/controller/xhci.h head/sys/dev/usb/controller/xhci_pci.c Modified: head/sys/dev/usb/controller/xhci.c ============================================================================== --- head/sys/dev/usb/controller/xhci.c Sat Sep 21 21:36:09 2013 (r255767) +++ head/sys/dev/usb/controller/xhci.c Sat Sep 21 21:40:57 2013 (r255768) @@ -108,6 +108,8 @@ TUNABLE_INT("hw.usb.xhci.xhci_port_route SYSCTL_INT(_hw_usb_xhci, OID_AUTO, use_polling, CTLFLAG_RW | CTLFLAG_TUN, &xhcipolling, 0, "Set to enable software interrupt polling for XHCI controller"); TUNABLE_INT("hw.usb.xhci.use_polling", &xhcipolling); +#else +#define xhciroute 0 #endif #define XHCI_INTR_ENDPT 1 @@ -194,16 +196,6 @@ xhci_dump_device(struct xhci_softc *sc, } #endif -uint32_t -xhci_get_port_route(void) -{ -#ifdef USB_DEBUG - return (0xFFFFFFFFU ^ ((uint32_t)xhciroute)); -#else - return (0xFFFFFFFFU); -#endif -} - uint8_t xhci_use_polling(void) { @@ -505,6 +497,11 @@ xhci_start_controller(struct xhci_softc /* catch any lost interrupts */ xhci_do_poll(&sc->sc_bus); + if (sc->sc_port_route != NULL) { + /* Route all ports to the XHCI by default */ + sc->sc_port_route(sc->sc_bus.parent, + ~xhciroute, xhciroute); + } return (0); } @@ -951,7 +948,7 @@ xhci_check_transfer(struct xhci_softc *s } } -static void +static int xhci_check_command(struct xhci_softc *sc, struct xhci_trb *trb) { if (sc->sc_cmd_addr == trb->qwTrb0) { @@ -959,16 +956,19 @@ xhci_check_command(struct xhci_softc *sc sc->sc_cmd_result[0] = trb->dwTrb2; sc->sc_cmd_result[1] = trb->dwTrb3; cv_signal(&sc->sc_cmd_cv); + return (1); /* command match */ } + return (0); } -static void +static int xhci_interrupt_poll(struct xhci_softc *sc) { struct usb_page_search buf_res; struct xhci_hw_root *phwr; uint64_t addr; uint32_t temp; + int retval = 0; uint16_t i; uint8_t event; uint8_t j; @@ -1008,7 +1008,7 @@ xhci_interrupt_poll(struct xhci_softc *s xhci_check_transfer(sc, &phwr->hwr_events[i]); break; case XHCI_TRB_EVENT_CMD_COMPLETE: - xhci_check_command(sc, &phwr->hwr_events[i]); + retval |= xhci_check_command(sc, &phwr->hwr_events[i]); break; default: DPRINTF("Unhandled event = %u\n", event); @@ -1045,6 +1045,8 @@ xhci_interrupt_poll(struct xhci_softc *s XWRITE4(sc, runt, XHCI_ERDP_LO(0), (uint32_t)addr); XWRITE4(sc, runt, XHCI_ERDP_HI(0), (uint32_t)(addr >> 32)); + + return (retval); } static usb_error_t @@ -1132,7 +1134,15 @@ xhci_do_command(struct xhci_softc *sc, s err = cv_timedwait(&sc->sc_cmd_cv, &sc->sc_bus.bus_mtx, USB_MS_TO_TICKS(timeout_ms)); - if (err) { + /* + * In some error cases event interrupts are not generated. + * Poll one time to see if the command has completed. + */ + if (err != 0 && xhci_interrupt_poll(sc) != 0) { + DPRINTF("Command was completed when polling\n"); + err = 0; + } + if (err != 0) { DPRINTFN(0, "Command timeout!\n"); err = USB_ERR_TIMEOUT; trb->dwTrb2 = 0; @@ -1311,6 +1321,14 @@ xhci_set_address(struct usb_device *udev (address == 0), index); if (err != 0) { + temp = le32toh(sc->sc_cmd_result[0]); + if (address == 0 && sc->sc_port_route != NULL && + XHCI_TRB_2_ERROR_GET(temp) == + XHCI_TRB_ERROR_PARAMETER) { + /* LynxPoint XHCI - ports are not switchable */ + /* Un-route all ports from the XHCI */ + sc->sc_port_route(sc->sc_bus.parent, 0, ~0); + } DPRINTF("Could not set address " "for slot %u.\n", index); if (address != 0) Modified: head/sys/dev/usb/controller/xhci.h ============================================================================== --- head/sys/dev/usb/controller/xhci.h Sat Sep 21 21:36:09 2013 (r255767) +++ head/sys/dev/usb/controller/xhci.h Sat Sep 21 21:40:57 2013 (r255768) @@ -431,6 +431,8 @@ union xhci_hub_desc { uint8_t temp[128]; }; +typedef int (xhci_port_route_t)(device_t, uint32_t, uint32_t); + struct xhci_softc { struct xhci_hw_softc sc_hw; /* base device */ @@ -440,6 +442,8 @@ struct xhci_softc { struct usb_callout sc_callout; + xhci_port_route_t *sc_port_route; + union xhci_hub_desc sc_hub_desc; struct cv sc_cmd_cv; @@ -502,7 +506,6 @@ struct xhci_softc { /* prototypes */ -uint32_t xhci_get_port_route(void); uint8_t xhci_use_polling(void); usb_error_t xhci_halt_controller(struct xhci_softc *); usb_error_t xhci_init(struct xhci_softc *, device_t); Modified: head/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- head/sys/dev/usb/controller/xhci_pci.c Sat Sep 21 21:36:09 2013 (r255767) +++ head/sys/dev/usb/controller/xhci_pci.c Sat Sep 21 21:40:57 2013 (r255768) @@ -146,6 +146,25 @@ xhci_interrupt_poll(void *_sc) } static int +xhci_pci_port_route(device_t self, uint32_t set, uint32_t clear) +{ + uint32_t temp; + + temp = pci_read_config(self, PCI_XHCI_INTEL_USB3_PSSEN, 4) | + pci_read_config(self, PCI_XHCI_INTEL_XUSB2PR, 4); + + temp |= set; + temp &= ~clear; + + pci_write_config(self, PCI_XHCI_INTEL_USB3_PSSEN, temp, 4); + pci_write_config(self, PCI_XHCI_INTEL_XUSB2PR, temp, 4); + + device_printf(self, "Port routing mask set to 0x%08x\n", temp); + + return (0); +} + +static int xhci_pci_attach(device_t self) { struct xhci_softc *sc = device_get_softc(self); @@ -189,7 +208,7 @@ xhci_pci_attach(device_t self) &sc->sc_irq_rid, RF_SHAREABLE | RF_ACTIVE); if (sc->sc_irq_res == NULL) { device_printf(self, "Could not allocate IRQ\n"); - goto error; + /* goto error; FALLTHROUGH - use polling */ } sc->sc_bus.bdev = device_add_child(self, "usbus", -1); if (sc->sc_bus.bdev == NULL) { @@ -216,6 +235,16 @@ xhci_pci_attach(device_t self) USB_BUS_UNLOCK(&sc->sc_bus); } + /* On Intel chipsets reroute ports from EHCI to XHCI controller. */ + switch (pci_get_devid(self)) { + case 0x1e318086: /* Panther Point */ + case 0x8c318086: /* Lynx Point */ + sc->sc_port_route = &xhci_pci_port_route; + break; + default: + break; + } + xhci_pci_take_controller(self); err = xhci_halt_controller(sc); @@ -284,7 +313,6 @@ static int xhci_pci_take_controller(device_t self) { struct xhci_softc *sc = device_get_softc(self); - uint32_t device_id = pci_get_devid(self); uint32_t cparams; uint32_t eecp; uint32_t eec; @@ -325,13 +353,5 @@ xhci_pci_take_controller(device_t self) usb_pause_mtx(NULL, hz / 100); /* wait 10ms */ } } - - /* On Intel chipsets reroute ports from EHCI to XHCI controller. */ - if (device_id == 0x1e318086 /* Panther Point */ || - device_id == 0x8c318086 /* Lynx Point */) { - uint32_t temp = xhci_get_port_route(); - pci_write_config(self, PCI_XHCI_INTEL_USB3_PSSEN, temp, 4); - pci_write_config(self, PCI_XHCI_INTEL_XUSB2PR, temp, 4); - } return (0); } From owner-svn-src-all@FreeBSD.ORG Sat Sep 21 22:07:24 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C78F71D2; Sat, 21 Sep 2013 22:07:24 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B4C562B15; Sat, 21 Sep 2013 22:07:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8LM7O2a001391; Sat, 21 Sep 2013 22:07:24 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8LM7OcC001390; Sat, 21 Sep 2013 22:07:24 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201309212207.r8LM7OcC001390@svn.freebsd.org> From: Rick Macklem Date: Sat, 21 Sep 2013 22:07:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255769 - stable/9/sys/fs/nfsclient X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Sep 2013 22:07:24 -0000 Author: rmacklem Date: Sat Sep 21 22:07:24 2013 New Revision: 255769 URL: http://svnweb.freebsd.org/changeset/base/255769 Log: MFC: r255216 Crashes have been observed for NFSv4.1 mounts when the system is being shut down which were caused by the nfscbd_pool being destroyed before the backchannel is disabled. This patch is believed to fix the problem, by simply avoiding ever destroying the nfscbd_pool. Since the NFS client module cannot be unloaded, this should not cause a memory leak. Modified: stable/9/sys/fs/nfsclient/nfs_clkrpc.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/nfsclient/nfs_clkrpc.c ============================================================================== --- stable/9/sys/fs/nfsclient/nfs_clkrpc.c Sat Sep 21 21:40:57 2013 (r255768) +++ stable/9/sys/fs/nfsclient/nfs_clkrpc.c Sat Sep 21 22:07:24 2013 (r255769) @@ -270,20 +270,13 @@ nfsrvd_cbinit(int terminating) NFSD_LOCK_ASSERT(); - if (terminating) { + if (nfscbd_pool == NULL) { NFSD_UNLOCK(); - svcpool_destroy(nfscbd_pool); - nfscbd_pool = NULL; + nfscbd_pool = svcpool_create("nfscbd", NULL); + nfscbd_pool->sp_rcache = NULL; + nfscbd_pool->sp_assign = NULL; + nfscbd_pool->sp_done = NULL; NFSD_LOCK(); } - - NFSD_UNLOCK(); - - nfscbd_pool = svcpool_create("nfscbd", NULL); - nfscbd_pool->sp_rcache = NULL; - nfscbd_pool->sp_assign = NULL; - nfscbd_pool->sp_done = NULL; - - NFSD_LOCK(); } From owner-svn-src-all@FreeBSD.ORG Sat Sep 21 22:10:03 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8D3F34E2; Sat, 21 Sep 2013 22:10:03 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7AD392B59; Sat, 21 Sep 2013 22:10:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8LMA3Vv004190; Sat, 21 Sep 2013 22:10:03 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8LMA3fD004188; Sat, 21 Sep 2013 22:10:03 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201309212210.r8LMA3fD004188@svn.freebsd.org> From: Rick Macklem Date: Sat, 21 Sep 2013 22:10:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255770 - stable/9/sys/rpc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Sep 2013 22:10:03 -0000 Author: rmacklem Date: Sat Sep 21 22:10:02 2013 New Revision: 255770 URL: http://svnweb.freebsd.org/changeset/base/255770 Log: MFC: r255284 It was reported via email that the cu_sent field used by the krpc client side UDP was observed as way out of range and caused the rpc.lockd daemon to hang trying to do an RPC. Inspection of the code found two places where the RPC request is re-queued, but the value of cu_sent was not incremented. Since cu_sent is always decremented when the RPC request is dequeued, I think this could have caused cu_sent to go out of range. This patch adds lines to increment cu_sent for these two cases. Modified: stable/9/sys/rpc/clnt_dg.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/rpc/clnt_dg.c ============================================================================== --- stable/9/sys/rpc/clnt_dg.c Sat Sep 21 22:07:24 2013 (r255769) +++ stable/9/sys/rpc/clnt_dg.c Sat Sep 21 22:10:02 2013 (r255770) @@ -682,6 +682,7 @@ get_reply: next_sendtime += retransmit_time; goto send_again; } + cu->cu_sent += CWNDSCALE; TAILQ_INSERT_TAIL(&cs->cs_pending, cr, cr_link); } @@ -733,6 +734,7 @@ got_reply: */ XDR_DESTROY(&xdrs); mtx_lock(&cs->cs_lock); + cu->cu_sent += CWNDSCALE; TAILQ_INSERT_TAIL(&cs->cs_pending, cr, cr_link); cr->cr_mrep = NULL; From owner-svn-src-all@FreeBSD.ORG Sat Sep 21 22:13:18 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id F113D7E3; Sat, 21 Sep 2013 22:13:17 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DC54D2B94; Sat, 21 Sep 2013 22:13:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8LMDHhs007254; Sat, 21 Sep 2013 22:13:17 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8LMDHPL007252; Sat, 21 Sep 2013 22:13:17 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201309212213.r8LMDHPL007252@svn.freebsd.org> From: Rick Macklem Date: Sat, 21 Sep 2013 22:13:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255773 - stable/9/sys/nlm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Sep 2013 22:13:18 -0000 Author: rmacklem Date: Sat Sep 21 22:13:17 2013 New Revision: 255773 URL: http://svnweb.freebsd.org/changeset/base/255773 Log: MFC: r255333 Intermittent crashes in the NLM (rpc.lockd) code during system shutdown was reporetd via email. The crashes occurred because the client side NLM would attempt to use its socket after it had been destroyed. Looking at the code, it would soclose() once the reference count on the socket handling structure went to 0. Unfortunately, nlm_host_get_rpc() will simply allocate a new socket handling structure when none exists and use the now soclose()d socket. Since there doesn't seem to be a safe way to determine when the socket is no longer needed, this patch modifies the code so that it never soclose()es the socket. Since there is only one socket ever created, this does not introduce a leak when the rpc.lockd is stopped/restarted. The patch also disables unloading of the nfslockd module, since it is not safe to do so (and has never been safe to do so, from what I can see). Modified: stable/9/sys/nlm/nlm_prot_impl.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/nlm/nlm_prot_impl.c ============================================================================== --- stable/9/sys/nlm/nlm_prot_impl.c Sat Sep 21 22:12:09 2013 (r255772) +++ stable/9/sys/nlm/nlm_prot_impl.c Sat Sep 21 22:13:17 2013 (r255773) @@ -133,6 +133,11 @@ static time_t nlm_grace_threshold; static time_t nlm_next_idle_check; /* + * A flag to indicate the server is already running. + */ +static int nlm_is_running; + +/* * A socket to use for RPC - shared by all IPv4 RPC clients. */ static struct socket *nlm_socket; @@ -1526,51 +1531,51 @@ nlm_server_main(int addr_count, char **a struct nlm_waiting_lock *nw; vop_advlock_t *old_nfs_advlock; vop_reclaim_t *old_nfs_reclaim; - int v4_used; -#ifdef INET6 - int v6_used; -#endif - if (nlm_socket) { + if (nlm_is_running != 0) { NLM_ERR("NLM: can't start server - " "it appears to be running already\n"); return (EPERM); } - memset(&opt, 0, sizeof(opt)); + if (nlm_socket == NULL) { + memset(&opt, 0, sizeof(opt)); - nlm_socket = NULL; - error = socreate(AF_INET, &nlm_socket, SOCK_DGRAM, 0, - td->td_ucred, td); - if (error) { - NLM_ERR("NLM: can't create IPv4 socket - error %d\n", error); - return (error); - } - opt.sopt_dir = SOPT_SET; - opt.sopt_level = IPPROTO_IP; - opt.sopt_name = IP_PORTRANGE; - portlow = IP_PORTRANGE_LOW; - opt.sopt_val = &portlow; - opt.sopt_valsize = sizeof(portlow); - sosetopt(nlm_socket, &opt); + error = socreate(AF_INET, &nlm_socket, SOCK_DGRAM, 0, + td->td_ucred, td); + if (error) { + NLM_ERR("NLM: can't create IPv4 socket - error %d\n", + error); + return (error); + } + opt.sopt_dir = SOPT_SET; + opt.sopt_level = IPPROTO_IP; + opt.sopt_name = IP_PORTRANGE; + portlow = IP_PORTRANGE_LOW; + opt.sopt_val = &portlow; + opt.sopt_valsize = sizeof(portlow); + sosetopt(nlm_socket, &opt); #ifdef INET6 - nlm_socket6 = NULL; - error = socreate(AF_INET6, &nlm_socket6, SOCK_DGRAM, 0, - td->td_ucred, td); - if (error) { - NLM_ERR("NLM: can't create IPv6 socket - error %d\n", error); - goto out; - return (error); - } - opt.sopt_dir = SOPT_SET; - opt.sopt_level = IPPROTO_IPV6; - opt.sopt_name = IPV6_PORTRANGE; - portlow = IPV6_PORTRANGE_LOW; - opt.sopt_val = &portlow; - opt.sopt_valsize = sizeof(portlow); - sosetopt(nlm_socket6, &opt); + nlm_socket6 = NULL; + error = socreate(AF_INET6, &nlm_socket6, SOCK_DGRAM, 0, + td->td_ucred, td); + if (error) { + NLM_ERR("NLM: can't create IPv6 socket - error %d\n", + error); + soclose(nlm_socket); + nlm_socket = NULL; + return (error); + } + opt.sopt_dir = SOPT_SET; + opt.sopt_level = IPPROTO_IPV6; + opt.sopt_name = IPV6_PORTRANGE; + portlow = IPV6_PORTRANGE_LOW; + opt.sopt_val = &portlow; + opt.sopt_valsize = sizeof(portlow); + sosetopt(nlm_socket6, &opt); #endif + } nlm_auth = authunix_create(curthread->td_ucred); @@ -1622,6 +1627,7 @@ nlm_server_main(int addr_count, char **a error = EINVAL; goto out; } + nlm_is_running = 1; NLM_DEBUG(1, "NLM: local NSM state is %d\n", smstat.state); nlm_nsm_state = smstat.state; @@ -1638,6 +1644,7 @@ nlm_server_main(int addr_count, char **a nfs_reclaim_p = old_nfs_reclaim; out: + nlm_is_running = 0; if (pool) svcpool_destroy(pool); @@ -1661,13 +1668,8 @@ out: * nlm_hosts to the host (which may remove it from the list * and free it). After this phase, the only entries in the * nlm_host list should be from other threads performing - * client lock requests. We arrange to defer closing the - * sockets until the last RPC client handle is released. + * client lock requests. */ - v4_used = 0; -#ifdef INET6 - v6_used = 0; -#endif mtx_lock(&nlm_global_lock); TAILQ_FOREACH(nw, &nlm_waiting_locks, nw_link) { wakeup(nw); @@ -1678,43 +1680,10 @@ out: nlm_host_release(host); mtx_lock(&nlm_global_lock); } - TAILQ_FOREACH_SAFE(host, &nlm_hosts, nh_link, nhost) { - mtx_lock(&host->nh_lock); - if (host->nh_srvrpc.nr_client - || host->nh_clntrpc.nr_client) { - if (host->nh_addr.ss_family == AF_INET) - v4_used++; -#ifdef INET6 - if (host->nh_addr.ss_family == AF_INET6) - v6_used++; -#endif - /* - * Note that the rpc over udp code copes - * correctly with the fact that a socket may - * be used by many rpc handles. - */ - if (host->nh_srvrpc.nr_client) - CLNT_CONTROL(host->nh_srvrpc.nr_client, - CLSET_FD_CLOSE, 0); - if (host->nh_clntrpc.nr_client) - CLNT_CONTROL(host->nh_clntrpc.nr_client, - CLSET_FD_CLOSE, 0); - } - mtx_unlock(&host->nh_lock); - } mtx_unlock(&nlm_global_lock); AUTH_DESTROY(nlm_auth); - if (!v4_used) - soclose(nlm_socket); - nlm_socket = NULL; -#ifdef INET6 - if (!v6_used) - soclose(nlm_socket6); - nlm_socket6 = NULL; -#endif - return (error); } @@ -2438,7 +2407,15 @@ static int nfslockd_modevent(module_t mod, int type, void *data) { - return (0); + switch (type) { + case MOD_LOAD: + return (0); + case MOD_UNLOAD: + /* The NLM module cannot be safely unloaded. */ + /* FALLTHROUGH */ + default: + return (EOPNOTSUPP); + } } static moduledata_t nfslockd_mod = { "nfslockd", From owner-svn-src-all@FreeBSD.ORG Sat Sep 21 22:24:11 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 45D6BC09; Sat, 21 Sep 2013 22:24:11 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 317232C03; Sat, 21 Sep 2013 22:24:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8LMOBpK014026; Sat, 21 Sep 2013 22:24:11 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8LMOApN014023; Sat, 21 Sep 2013 22:24:10 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309212224.r8LMOApN014023@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sat, 21 Sep 2013 22:24:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255774 - in head/crypto/openssh: . contrib openbsd-compat openbsd-compat/regress regress X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Sep 2013 22:24:11 -0000 Author: des Date: Sat Sep 21 22:24:10 2013 New Revision: 255774 URL: http://svnweb.freebsd.org/changeset/base/255774 Log: Pull in all the OpenSSH bits that we'd previously left out because we didn't use them. This will make future merges from the vendor tree much easier. Approved by: re (gjb) Added: head/crypto/openssh/Makefile.in - copied unchanged from r255674, vendor-crypto/openssh/dist/Makefile.in head/crypto/openssh/buildpkg.sh.in - copied unchanged from r255674, vendor-crypto/openssh/dist/buildpkg.sh.in head/crypto/openssh/config.sub - copied unchanged from r255674, vendor-crypto/openssh/dist/config.sub head/crypto/openssh/configure - copied unchanged from r255674, vendor-crypto/openssh/dist/configure head/crypto/openssh/configure.ac - copied unchanged from r255674, vendor-crypto/openssh/dist/configure.ac head/crypto/openssh/contrib/ - copied from r255674, vendor-crypto/openssh/dist/contrib/ head/crypto/openssh/install-sh - copied unchanged from r255674, vendor-crypto/openssh/dist/install-sh head/crypto/openssh/mdoc2man.awk - copied unchanged from r255674, vendor-crypto/openssh/dist/mdoc2man.awk head/crypto/openssh/moduli.0 - copied unchanged from r255674, vendor-crypto/openssh/dist/moduli.0 head/crypto/openssh/nchan.ms - copied unchanged from r255674, vendor-crypto/openssh/dist/nchan.ms head/crypto/openssh/nchan2.ms - copied unchanged from r255674, vendor-crypto/openssh/dist/nchan2.ms head/crypto/openssh/openbsd-compat/Makefile.in - copied unchanged from r255674, vendor-crypto/openssh/dist/openbsd-compat/Makefile.in head/crypto/openssh/openbsd-compat/regress/ - copied from r255674, vendor-crypto/openssh/dist/openbsd-compat/regress/ head/crypto/openssh/openssh.xml.in - copied unchanged from r255674, vendor-crypto/openssh/dist/openssh.xml.in head/crypto/openssh/opensshd.init.in - copied unchanged from r255674, vendor-crypto/openssh/dist/opensshd.init.in head/crypto/openssh/regress/ - copied from r255674, vendor-crypto/openssh/dist/regress/ head/crypto/openssh/scp.0 - copied unchanged from r255674, vendor-crypto/openssh/dist/scp.0 head/crypto/openssh/sftp-server.0 - copied unchanged from r255674, vendor-crypto/openssh/dist/sftp-server.0 head/crypto/openssh/sftp.0 - copied unchanged from r255674, vendor-crypto/openssh/dist/sftp.0 head/crypto/openssh/ssh-add.0 - copied unchanged from r255674, vendor-crypto/openssh/dist/ssh-add.0 head/crypto/openssh/ssh-agent.0 - copied unchanged from r255674, vendor-crypto/openssh/dist/ssh-agent.0 head/crypto/openssh/ssh-keygen.0 - copied unchanged from r255674, vendor-crypto/openssh/dist/ssh-keygen.0 head/crypto/openssh/ssh-keyscan.0 - copied unchanged from r255674, vendor-crypto/openssh/dist/ssh-keyscan.0 head/crypto/openssh/ssh-keysign.0 - copied unchanged from r255674, vendor-crypto/openssh/dist/ssh-keysign.0 head/crypto/openssh/ssh-pkcs11-helper.0 - copied unchanged from r255674, vendor-crypto/openssh/dist/ssh-pkcs11-helper.0 head/crypto/openssh/ssh.0 - copied unchanged from r255674, vendor-crypto/openssh/dist/ssh.0 head/crypto/openssh/ssh_config.0 - copied unchanged from r255674, vendor-crypto/openssh/dist/ssh_config.0 head/crypto/openssh/sshd.0 - copied unchanged from r255674, vendor-crypto/openssh/dist/sshd.0 head/crypto/openssh/sshd_config.0 - copied unchanged from r255674, vendor-crypto/openssh/dist/sshd_config.0 head/crypto/openssh/survey.sh.in - copied unchanged from r255674, vendor-crypto/openssh/dist/survey.sh.in Copied: head/crypto/openssh/Makefile.in (from r255674, vendor-crypto/openssh/dist/Makefile.in) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/crypto/openssh/Makefile.in Sat Sep 21 22:24:10 2013 (r255774, copy of r255674, vendor-crypto/openssh/dist/Makefile.in) @@ -0,0 +1,459 @@ +# $Id: Makefile.in,v 1.340 2013/06/11 01:26:10 dtucker Exp $ + +# uncomment if you run a non bourne compatable shell. Ie. csh +#SHELL = @SH@ + +AUTORECONF=autoreconf + +prefix=@prefix@ +exec_prefix=@exec_prefix@ +bindir=@bindir@ +sbindir=@sbindir@ +libexecdir=@libexecdir@ +datadir=@datadir@ +datarootdir=@datarootdir@ +mandir=@mandir@ +mansubdir=@mansubdir@ +sysconfdir=@sysconfdir@ +piddir=@piddir@ +srcdir=@srcdir@ +top_srcdir=@top_srcdir@ + +DESTDIR= +VPATH=@srcdir@ +SSH_PROGRAM=@bindir@/ssh +ASKPASS_PROGRAM=$(libexecdir)/ssh-askpass +SFTP_SERVER=$(libexecdir)/sftp-server +SSH_KEYSIGN=$(libexecdir)/ssh-keysign +SSH_PKCS11_HELPER=$(libexecdir)/ssh-pkcs11-helper +PRIVSEP_PATH=@PRIVSEP_PATH@ +SSH_PRIVSEP_USER=@SSH_PRIVSEP_USER@ +STRIP_OPT=@STRIP_OPT@ + +PATHS= -DSSHDIR=\"$(sysconfdir)\" \ + -D_PATH_SSH_PROGRAM=\"$(SSH_PROGRAM)\" \ + -D_PATH_SSH_ASKPASS_DEFAULT=\"$(ASKPASS_PROGRAM)\" \ + -D_PATH_SFTP_SERVER=\"$(SFTP_SERVER)\" \ + -D_PATH_SSH_KEY_SIGN=\"$(SSH_KEYSIGN)\" \ + -D_PATH_SSH_PKCS11_HELPER=\"$(SSH_PKCS11_HELPER)\" \ + -D_PATH_SSH_PIDDIR=\"$(piddir)\" \ + -D_PATH_PRIVSEP_CHROOT_DIR=\"$(PRIVSEP_PATH)\" + +CC=@CC@ +LD=@LD@ +CFLAGS=@CFLAGS@ +CPPFLAGS=-I. -I$(srcdir) @CPPFLAGS@ $(PATHS) @DEFS@ +LIBS=@LIBS@ +K5LIBS=@K5LIBS@ +GSSLIBS=@GSSLIBS@ +SSHLIBS=@SSHLIBS@ +SSHDLIBS=@SSHDLIBS@ +LIBEDIT=@LIBEDIT@ +AR=@AR@ +AWK=@AWK@ +RANLIB=@RANLIB@ +INSTALL=@INSTALL@ +PERL=@PERL@ +SED=@SED@ +ENT=@ENT@ +XAUTH_PATH=@XAUTH_PATH@ +LDFLAGS=-L. -Lopenbsd-compat/ @LDFLAGS@ +EXEEXT=@EXEEXT@ +MANFMT=@MANFMT@ + +TARGETS=ssh$(EXEEXT) sshd$(EXEEXT) ssh-add$(EXEEXT) ssh-keygen$(EXEEXT) ssh-keyscan${EXEEXT} ssh-keysign${EXEEXT} ssh-pkcs11-helper$(EXEEXT) ssh-agent$(EXEEXT) scp$(EXEEXT) sftp-server$(EXEEXT) sftp$(EXEEXT) + +LIBSSH_OBJS=authfd.o authfile.o bufaux.o bufbn.o buffer.o \ + canohost.o channels.o cipher.o cipher-aes.o \ + cipher-bf1.o cipher-ctr.o cipher-3des1.o cleanup.o \ + compat.o compress.o crc32.o deattack.o fatal.o hostfile.o \ + log.o match.o md-sha256.o moduli.o nchan.o packet.o \ + readpass.o rsa.o ttymodes.o xmalloc.o addrmatch.o \ + atomicio.o key.o dispatch.o kex.o mac.o uidswap.o uuencode.o misc.o \ + monitor_fdpass.o rijndael.o ssh-dss.o ssh-ecdsa.o ssh-rsa.o dh.o \ + kexdh.o kexgex.o kexdhc.o kexgexc.o bufec.o kexecdh.o kexecdhc.o \ + msg.o progressmeter.o dns.o entropy.o gss-genr.o umac.o umac128.o \ + jpake.o schnorr.o ssh-pkcs11.o krl.o + +SSHOBJS= ssh.o readconf.o clientloop.o sshtty.o \ + sshconnect.o sshconnect1.o sshconnect2.o mux.o \ + roaming_common.o roaming_client.o + +SSHDOBJS=sshd.o auth-rhosts.o auth-passwd.o auth-rsa.o auth-rh-rsa.o \ + audit.o audit-bsm.o audit-linux.o platform.o \ + sshpty.o sshlogin.o servconf.o serverloop.o \ + auth.o auth1.o auth2.o auth-options.o session.o \ + auth-chall.o auth2-chall.o groupaccess.o \ + auth-skey.o auth-bsdauth.o auth2-hostbased.o auth2-kbdint.o \ + auth2-none.o auth2-passwd.o auth2-pubkey.o auth2-jpake.o \ + monitor_mm.o monitor.o monitor_wrap.o kexdhs.o kexgexs.o kexecdhs.o \ + auth-krb5.o \ + auth2-gss.o gss-serv.o gss-serv-krb5.o \ + loginrec.o auth-pam.o auth-shadow.o auth-sia.o md5crypt.o \ + sftp-server.o sftp-common.o \ + roaming_common.o roaming_serv.o \ + sandbox-null.o sandbox-rlimit.o sandbox-systrace.o sandbox-darwin.o \ + sandbox-seccomp-filter.o + +MANPAGES = moduli.5.out scp.1.out ssh-add.1.out ssh-agent.1.out ssh-keygen.1.out ssh-keyscan.1.out ssh.1.out sshd.8.out sftp-server.8.out sftp.1.out ssh-keysign.8.out ssh-pkcs11-helper.8.out sshd_config.5.out ssh_config.5.out +MANPAGES_IN = moduli.5 scp.1 ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh-keyscan.1 ssh.1 sshd.8 sftp-server.8 sftp.1 ssh-keysign.8 ssh-pkcs11-helper.8 sshd_config.5 ssh_config.5 +MANTYPE = @MANTYPE@ + +CONFIGFILES=sshd_config.out ssh_config.out moduli.out +CONFIGFILES_IN=sshd_config ssh_config moduli + +PATHSUBS = \ + -e 's|/etc/ssh/ssh_config|$(sysconfdir)/ssh_config|g' \ + -e 's|/etc/ssh/ssh_known_hosts|$(sysconfdir)/ssh_known_hosts|g' \ + -e 's|/etc/ssh/sshd_config|$(sysconfdir)/sshd_config|g' \ + -e 's|/usr/libexec|$(libexecdir)|g' \ + -e 's|/etc/shosts.equiv|$(sysconfdir)/shosts.equiv|g' \ + -e 's|/etc/ssh/ssh_host_key|$(sysconfdir)/ssh_host_key|g' \ + -e 's|/etc/ssh/ssh_host_ecdsa_key|$(sysconfdir)/ssh_host_ecdsa_key|g' \ + -e 's|/etc/ssh/ssh_host_dsa_key|$(sysconfdir)/ssh_host_dsa_key|g' \ + -e 's|/etc/ssh/ssh_host_rsa_key|$(sysconfdir)/ssh_host_rsa_key|g' \ + -e 's|/var/run/sshd.pid|$(piddir)/sshd.pid|g' \ + -e 's|/etc/moduli|$(sysconfdir)/moduli|g' \ + -e 's|/etc/ssh/moduli|$(sysconfdir)/moduli|g' \ + -e 's|/etc/ssh/sshrc|$(sysconfdir)/sshrc|g' \ + -e 's|/usr/X11R6/bin/xauth|$(XAUTH_PATH)|g' \ + -e 's|/var/empty|$(PRIVSEP_PATH)|g' \ + -e 's|/usr/bin:/bin:/usr/sbin:/sbin|@user_path@|g' + +FIXPATHSCMD = $(SED) $(PATHSUBS) +FIXALGORITHMSCMD= $(SHELL) $(srcdir)/fixalgorithms $(SED) \ + @UNSUPPORTED_ALGORITHMS@ + +all: $(CONFIGFILES) $(MANPAGES) $(TARGETS) + +$(LIBSSH_OBJS): Makefile.in config.h +$(SSHOBJS): Makefile.in config.h +$(SSHDOBJS): Makefile.in config.h + +.c.o: + $(CC) $(CFLAGS) $(CPPFLAGS) -c $< + +LIBCOMPAT=openbsd-compat/libopenbsd-compat.a +$(LIBCOMPAT): always + (cd openbsd-compat && $(MAKE)) +always: + +libssh.a: $(LIBSSH_OBJS) + $(AR) rv $@ $(LIBSSH_OBJS) + $(RANLIB) $@ + +ssh$(EXEEXT): $(LIBCOMPAT) libssh.a $(SSHOBJS) + $(LD) -o $@ $(SSHOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(SSHLIBS) $(LIBS) $(GSSLIBS) + +sshd$(EXEEXT): libssh.a $(LIBCOMPAT) $(SSHDOBJS) + $(LD) -o $@ $(SSHDOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(SSHDLIBS) $(LIBS) $(GSSLIBS) $(K5LIBS) + +scp$(EXEEXT): $(LIBCOMPAT) libssh.a scp.o progressmeter.o + $(LD) -o $@ scp.o progressmeter.o bufaux.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) + +ssh-add$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-add.o + $(LD) -o $@ ssh-add.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) + +ssh-agent$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-agent.o ssh-pkcs11-client.o + $(LD) -o $@ ssh-agent.o ssh-pkcs11-client.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) + +ssh-keygen$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keygen.o + $(LD) -o $@ ssh-keygen.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) + +ssh-keysign$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keysign.o roaming_dummy.o readconf.o + $(LD) -o $@ ssh-keysign.o readconf.o roaming_dummy.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) + +ssh-pkcs11-helper$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-pkcs11-helper.o ssh-pkcs11.o + $(LD) -o $@ ssh-pkcs11-helper.o ssh-pkcs11.o $(LDFLAGS) -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS) + +ssh-keyscan$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keyscan.o roaming_dummy.o + $(LD) -o $@ ssh-keyscan.o roaming_dummy.o $(LDFLAGS) -lssh -lopenbsd-compat -lssh $(LIBS) + +sftp-server$(EXEEXT): $(LIBCOMPAT) libssh.a sftp.o sftp-common.o sftp-server.o sftp-server-main.o + $(LD) -o $@ sftp-server.o sftp-common.o sftp-server-main.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) + +sftp$(EXEEXT): $(LIBCOMPAT) libssh.a sftp.o sftp-client.o sftp-common.o sftp-glob.o progressmeter.o + $(LD) -o $@ progressmeter.o sftp.o sftp-client.o sftp-common.o sftp-glob.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) $(LIBEDIT) + +# test driver for the loginrec code - not built by default +logintest: logintest.o $(LIBCOMPAT) libssh.a loginrec.o + $(LD) -o $@ logintest.o $(LDFLAGS) loginrec.o -lopenbsd-compat -lssh $(LIBS) + +$(MANPAGES): $(MANPAGES_IN) + if test "$(MANTYPE)" = "cat"; then \ + manpage=$(srcdir)/`echo $@ | sed 's/\.[1-9]\.out$$/\.0/'`; \ + else \ + manpage=$(srcdir)/`echo $@ | sed 's/\.out$$//'`; \ + fi; \ + if test "$(MANTYPE)" = "man"; then \ + $(FIXPATHSCMD) $${manpage} | $(FIXALGORITHMSCMD) | \ + $(AWK) -f $(srcdir)/mdoc2man.awk > $@; \ + else \ + $(FIXPATHSCMD) $${manpage} | $(FIXALGORITHMSCMD) > $@; \ + fi + +$(CONFIGFILES): $(CONFIGFILES_IN) + conffile=`echo $@ | sed 's/.out$$//'`; \ + $(FIXPATHSCMD) $(srcdir)/$${conffile} > $@ + +# fake rule to stop make trying to compile moduli.o into a binary "moduli.o" +moduli: + echo + +# special case target for umac128 +umac128.o: umac.c + $(CC) $(CFLAGS) $(CPPFLAGS) -o umac128.o -c $(srcdir)/umac.c \ + -DUMAC_OUTPUT_LEN=16 -Dumac_new=umac128_new \ + -Dumac_update=umac128_update -Dumac_final=umac128_final \ + -Dumac_delete=umac128_delete + +clean: regressclean + rm -f *.o *.a $(TARGETS) logintest config.cache config.log + rm -f *.out core survey + (cd openbsd-compat && $(MAKE) clean) + +distclean: regressclean + rm -f *.o *.a $(TARGETS) logintest config.cache config.log + rm -f *.out core opensshd.init openssh.xml + rm -f Makefile buildpkg.sh config.h config.status + rm -f survey.sh openbsd-compat/regress/Makefile *~ + rm -rf autom4te.cache + (cd openbsd-compat && $(MAKE) distclean) + if test -d pkg ; then \ + rm -fr pkg ; \ + fi + +veryclean: distclean + rm -f configure config.h.in *.0 + +cleandir: veryclean + +mrproper: veryclean + +realclean: veryclean + +catman-do: + @for f in $(MANPAGES_IN) ; do \ + base=`echo $$f | sed 's/\..*$$//'` ; \ + echo "$$f -> $$base.0" ; \ + $(MANFMT) $$f | cat -v | sed -e 's/.\^H//g' \ + >$$base.0 ; \ + done + +distprep: catman-do + $(AUTORECONF) + -rm -rf autom4te.cache + +install: $(CONFIGFILES) $(MANPAGES) $(TARGETS) install-files install-sysconf host-key check-config +install-nokeys: $(CONFIGFILES) $(MANPAGES) $(TARGETS) install-files install-sysconf +install-nosysconf: $(CONFIGFILES) $(MANPAGES) $(TARGETS) install-files + +check-config: + -$(DESTDIR)$(sbindir)/sshd -t -f $(DESTDIR)$(sysconfdir)/sshd_config + +install-files: + $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir) + $(srcdir)/mkinstalldirs $(DESTDIR)$(sbindir) + $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir) + $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$(mansubdir)1 + $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$(mansubdir)5 + $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$(mansubdir)8 + $(srcdir)/mkinstalldirs $(DESTDIR)$(libexecdir) + (umask 022 ; $(srcdir)/mkinstalldirs $(DESTDIR)$(PRIVSEP_PATH)) + $(INSTALL) -m 0755 $(STRIP_OPT) ssh$(EXEEXT) $(DESTDIR)$(bindir)/ssh$(EXEEXT) + $(INSTALL) -m 0755 $(STRIP_OPT) scp$(EXEEXT) $(DESTDIR)$(bindir)/scp$(EXEEXT) + $(INSTALL) -m 0755 $(STRIP_OPT) ssh-add$(EXEEXT) $(DESTDIR)$(bindir)/ssh-add$(EXEEXT) + $(INSTALL) -m 0755 $(STRIP_OPT) ssh-agent$(EXEEXT) $(DESTDIR)$(bindir)/ssh-agent$(EXEEXT) + $(INSTALL) -m 0755 $(STRIP_OPT) ssh-keygen$(EXEEXT) $(DESTDIR)$(bindir)/ssh-keygen$(EXEEXT) + $(INSTALL) -m 0755 $(STRIP_OPT) ssh-keyscan$(EXEEXT) $(DESTDIR)$(bindir)/ssh-keyscan$(EXEEXT) + $(INSTALL) -m 0755 $(STRIP_OPT) sshd$(EXEEXT) $(DESTDIR)$(sbindir)/sshd$(EXEEXT) + $(INSTALL) -m 4711 $(STRIP_OPT) ssh-keysign$(EXEEXT) $(DESTDIR)$(SSH_KEYSIGN)$(EXEEXT) + $(INSTALL) -m 0755 $(STRIP_OPT) ssh-pkcs11-helper$(EXEEXT) $(DESTDIR)$(SSH_PKCS11_HELPER)$(EXEEXT) + $(INSTALL) -m 0755 $(STRIP_OPT) sftp$(EXEEXT) $(DESTDIR)$(bindir)/sftp$(EXEEXT) + $(INSTALL) -m 0755 $(STRIP_OPT) sftp-server$(EXEEXT) $(DESTDIR)$(SFTP_SERVER)$(EXEEXT) + $(INSTALL) -m 644 ssh.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1 + $(INSTALL) -m 644 scp.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/scp.1 + $(INSTALL) -m 644 ssh-add.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-add.1 + $(INSTALL) -m 644 ssh-agent.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-agent.1 + $(INSTALL) -m 644 ssh-keygen.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keygen.1 + $(INSTALL) -m 644 ssh-keyscan.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keyscan.1 + $(INSTALL) -m 644 moduli.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/moduli.5 + $(INSTALL) -m 644 sshd_config.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/sshd_config.5 + $(INSTALL) -m 644 ssh_config.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/ssh_config.5 + $(INSTALL) -m 644 sshd.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sshd.8 + $(INSTALL) -m 644 sftp.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/sftp.1 + $(INSTALL) -m 644 sftp-server.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8 + $(INSTALL) -m 644 ssh-keysign.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8 + $(INSTALL) -m 644 ssh-pkcs11-helper.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-pkcs11-helper.8 + -rm -f $(DESTDIR)$(bindir)/slogin + ln -s ./ssh$(EXEEXT) $(DESTDIR)$(bindir)/slogin + -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1 + ln -s ./ssh.1 $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1 + +install-sysconf: + if [ ! -d $(DESTDIR)$(sysconfdir) ]; then \ + $(srcdir)/mkinstalldirs $(DESTDIR)$(sysconfdir); \ + fi + @if [ ! -f $(DESTDIR)$(sysconfdir)/ssh_config ]; then \ + $(INSTALL) -m 644 ssh_config.out $(DESTDIR)$(sysconfdir)/ssh_config; \ + else \ + echo "$(DESTDIR)$(sysconfdir)/ssh_config already exists, install will not overwrite"; \ + fi + @if [ ! -f $(DESTDIR)$(sysconfdir)/sshd_config ]; then \ + $(INSTALL) -m 644 sshd_config.out $(DESTDIR)$(sysconfdir)/sshd_config; \ + else \ + echo "$(DESTDIR)$(sysconfdir)/sshd_config already exists, install will not overwrite"; \ + fi + @if [ ! -f $(DESTDIR)$(sysconfdir)/moduli ]; then \ + if [ -f $(DESTDIR)$(sysconfdir)/primes ]; then \ + echo "moving $(DESTDIR)$(sysconfdir)/primes to $(DESTDIR)$(sysconfdir)/moduli"; \ + mv "$(DESTDIR)$(sysconfdir)/primes" "$(DESTDIR)$(sysconfdir)/moduli"; \ + else \ + $(INSTALL) -m 644 moduli.out $(DESTDIR)$(sysconfdir)/moduli; \ + fi ; \ + else \ + echo "$(DESTDIR)$(sysconfdir)/moduli already exists, install will not overwrite"; \ + fi + +host-key: ssh-keygen$(EXEEXT) + @if [ -z "$(DESTDIR)" ] ; then \ + if [ -f "$(sysconfdir)/ssh_host_key" ] ; then \ + echo "$(sysconfdir)/ssh_host_key already exists, skipping." ; \ + else \ + ./ssh-keygen -t rsa1 -f $(sysconfdir)/ssh_host_key -N "" ; \ + fi ; \ + if [ -f $(sysconfdir)/ssh_host_dsa_key ] ; then \ + echo "$(sysconfdir)/ssh_host_dsa_key already exists, skipping." ; \ + else \ + ./ssh-keygen -t dsa -f $(sysconfdir)/ssh_host_dsa_key -N "" ; \ + fi ; \ + if [ -f $(sysconfdir)/ssh_host_rsa_key ] ; then \ + echo "$(sysconfdir)/ssh_host_rsa_key already exists, skipping." ; \ + else \ + ./ssh-keygen -t rsa -f $(sysconfdir)/ssh_host_rsa_key -N "" ; \ + fi ; \ + if [ -z "@COMMENT_OUT_ECC@" ] ; then \ + if [ -f $(sysconfdir)/ssh_host_ecdsa_key ] ; then \ + echo "$(sysconfdir)/ssh_host_ecdsa_key already exists, skipping." ; \ + else \ + ./ssh-keygen -t ecdsa -f $(sysconfdir)/ssh_host_ecdsa_key -N "" ; \ + fi ; \ + fi ; \ + fi ; + +host-key-force: ssh-keygen$(EXEEXT) + ./ssh-keygen -t rsa1 -f $(DESTDIR)$(sysconfdir)/ssh_host_key -N "" + ./ssh-keygen -t dsa -f $(DESTDIR)$(sysconfdir)/ssh_host_dsa_key -N "" + ./ssh-keygen -t rsa -f $(DESTDIR)$(sysconfdir)/ssh_host_rsa_key -N "" + test -z "@COMMENT_OUT_ECC@" && ./ssh-keygen -t ecdsa -f $(DESTDIR)$(sysconfdir)/ssh_host_ecdsa_key -N "" + +uninstallall: uninstall + -rm -f $(DESTDIR)$(sysconfdir)/ssh_config + -rm -f $(DESTDIR)$(sysconfdir)/sshd_config + -rmdir $(DESTDIR)$(sysconfdir) + -rmdir $(DESTDIR)$(bindir) + -rmdir $(DESTDIR)$(sbindir) + -rmdir $(DESTDIR)$(mandir)/$(mansubdir)1 + -rmdir $(DESTDIR)$(mandir)/$(mansubdir)8 + -rmdir $(DESTDIR)$(mandir) + -rmdir $(DESTDIR)$(libexecdir) + +uninstall: + -rm -f $(DESTDIR)$(bindir)/slogin + -rm -f $(DESTDIR)$(bindir)/ssh$(EXEEXT) + -rm -f $(DESTDIR)$(bindir)/scp$(EXEEXT) + -rm -f $(DESTDIR)$(bindir)/ssh-add$(EXEEXT) + -rm -f $(DESTDIR)$(bindir)/ssh-agent$(EXEEXT) + -rm -f $(DESTDIR)$(bindir)/ssh-keygen$(EXEEXT) + -rm -f $(DESTDIR)$(bindir)/ssh-keyscan$(EXEEXT) + -rm -f $(DESTDIR)$(bindir)/sftp$(EXEEXT) + -rm -f $(DESTDIR)$(sbindir)/sshd$(EXEEXT) + -rm -r $(DESTDIR)$(SFTP_SERVER)$(EXEEXT) + -rm -f $(DESTDIR)$(SSH_KEYSIGN)$(EXEEXT) + -rm -f $(DESTDIR)$(SSH_PKCS11_HELPER)$(EXEEXT) + -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1 + -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/scp.1 + -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-add.1 + -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-agent.1 + -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keygen.1 + -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/sftp.1 + -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keyscan.1 + -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/sshd.8 + -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8 + -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8 + -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-pkcs11-helper.8 + -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1 + +regress/modpipe$(EXEEXT): $(srcdir)/regress/modpipe.c + [ -d `pwd`/regress ] || mkdir -p `pwd`/regress + [ -f `pwd`/regress/Makefile ] || \ + ln -s `cd $(srcdir) && pwd`/regress/Makefile `pwd`/regress/Makefile + $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $? \ + $(LDFLAGS) -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS) + +tests interop-tests: $(TARGETS) regress/modpipe$(EXEEXT) + BUILDDIR=`pwd`; \ + TEST_SHELL="@TEST_SHELL@"; \ + TEST_SSH_SSH="$${BUILDDIR}/ssh"; \ + TEST_SSH_SSHD="$${BUILDDIR}/sshd"; \ + TEST_SSH_SSHAGENT="$${BUILDDIR}/ssh-agent"; \ + TEST_SSH_SSHADD="$${BUILDDIR}/ssh-add"; \ + TEST_SSH_SSHKEYGEN="$${BUILDDIR}/ssh-keygen"; \ + TEST_SSH_SSHPKCS11HELPER="$${BUILDDIR}/ssh-pkcs11-helper"; \ + TEST_SSH_SSHKEYSCAN="$${BUILDDIR}/ssh-keyscan"; \ + TEST_SSH_SFTP="$${BUILDDIR}/sftp"; \ + TEST_SSH_SFTPSERVER="$${BUILDDIR}/sftp-server"; \ + TEST_SSH_PLINK="plink"; \ + TEST_SSH_PUTTYGEN="puttygen"; \ + TEST_SSH_CONCH="conch"; \ + TEST_SSH_IPV6="@TEST_SSH_IPV6@" ; \ + TEST_SSH_ECC="@TEST_SSH_ECC@" ; \ + TEST_SSH_SHA256="@TEST_SSH_SHA256@" ; \ + cd $(srcdir)/regress || exit $$?; \ + $(MAKE) \ + .OBJDIR="$${BUILDDIR}/regress" \ + .CURDIR="`pwd`" \ + BUILDDIR="$${BUILDDIR}" \ + OBJ="$${BUILDDIR}/regress/" \ + PATH="$${BUILDDIR}:$${PATH}" \ + TEST_SHELL="$${TEST_SHELL}" \ + TEST_SSH_SSH="$${TEST_SSH_SSH}" \ + TEST_SSH_SSHD="$${TEST_SSH_SSHD}" \ + TEST_SSH_SSHAGENT="$${TEST_SSH_SSHAGENT}" \ + TEST_SSH_SSHADD="$${TEST_SSH_SSHADD}" \ + TEST_SSH_SSHKEYGEN="$${TEST_SSH_SSHKEYGEN}" \ + TEST_SSH_SSHPKCS11HELPER="$${TEST_SSH_SSHPKCS11HELPER}" \ + TEST_SSH_SSHKEYSCAN="$${TEST_SSH_SSHKEYSCAN}" \ + TEST_SSH_SFTP="$${TEST_SSH_SFTP}" \ + TEST_SSH_SFTPSERVER="$${TEST_SSH_SFTPSERVER}" \ + TEST_SSH_PLINK="$${TEST_SSH_PLINK}" \ + TEST_SSH_PUTTYGEN="$${TEST_SSH_PUTTYGEN}" \ + TEST_SSH_CONCH="$${TEST_SSH_CONCH}" \ + TEST_SSH_IPV6="$${TEST_SSH_IPV6}" \ + TEST_SSH_ECC="$${TEST_SSH_ECC}" \ + TEST_SSH_SHA256="$${TEST_SSH_SHA256}" \ + EXEEXT="$(EXEEXT)" \ + $@ && echo all tests passed + +compat-tests: $(LIBCOMPAT) + (cd openbsd-compat/regress && $(MAKE)) + +regressclean: + if [ -f regress/Makefile ] && [ -r regress/Makefile ]; then \ + (cd regress && $(MAKE) clean) \ + fi + +survey: survey.sh ssh + @$(SHELL) ./survey.sh > survey + @echo 'The survey results have been placed in the file "survey" in the' + @echo 'current directory. Please review the file then send with' + @echo '"make send-survey".' + +send-survey: survey + mail portable-survey@mindrot.org /dev/null 2>&1 + [ $? -ne 0 ] && PATH=$PATH:/opt/bin +} +[ -d /usr/local/bin ] && { + echo $PATH | grep ":/usr/local/bin" > /dev/null 2>&1 + [ $? -ne 0 ] && PATH=$PATH:/usr/local/bin +} +[ -d /usr/ccs/bin ] && { + echo $PATH | grep ":/usr/ccs/bin" > /dev/null 2>&1 + [ $? -ne 0 ] && PATH=$PATH:/usr/ccs/bin +} +export PATH +# + +[ -f Makefile ] || { + echo "Please run this script from your build directory" + exit 1 +} + +# we will look for openssh-config.local to override the above options +[ -s ./openssh-config.local ] && . ./openssh-config.local + +START=`pwd` +FAKE_ROOT=$START/pkg + +## Fill in some details, like prefix and sysconfdir +for confvar in prefix exec_prefix bindir sbindir libexecdir datadir mandir sysconfdir piddir srcdir +do + eval $confvar=`grep "^$confvar=" Makefile | cut -d = -f 2` +done + +## Are we using Solaris' SMF? +DO_SMF=0 +if egrep "^#define USE_SOLARIS_PROCESS_CONTRACTS" config.h > /dev/null 2>&1 +then + DO_SMF=1 +fi + +## Collect value of privsep user +for confvar in SSH_PRIVSEP_USER +do + eval $confvar=`awk '/#define[ \t]'$confvar'/{print $3}' config.h` +done + +## Set privsep defaults if not defined +if [ -z "$SSH_PRIVSEP_USER" ] +then + SSH_PRIVSEP_USER=sshd +fi + +## Extract common info requires for the 'info' part of the package. +VERSION=`./ssh -V 2>&1 | sed -e 's/,.*//'` + +ARCH=`uname -m` +DEF_MSG="\n" +OS_VER=`uname -v` +SCRIPT_SHELL=/sbin/sh +UNAME_R=`uname -r` +UNAME_S=`uname -s` +case ${UNAME_S} in + SunOS) UNAME_S=Solaris + OS_VER=${UNAME_R} + ARCH=`uname -p` + RCS_D=yes + DEF_MSG="(default: n)" + ;; + SCO_SV) case ${UNAME_R} in + 3.2) UNAME_S=OpenServer5 + OS_VER=`uname -X | grep Release | sed -e 's/^Rel.*3.2v//'` + ;; + 5) UNAME_S=OpenServer6 + ;; + esac + SCRIPT_SHELL=/bin/sh + RC1_D=no + DEF_MSG="(default: n)" + ;; +esac + +case `basename $0` in + buildpkg.sh) +## Start by faking root install +echo "Faking root install..." +[ -d $FAKE_ROOT ] && rm -fr $FAKE_ROOT +mkdir $FAKE_ROOT +${MAKE} install-nokeys DESTDIR=$FAKE_ROOT +if [ $? -gt 0 ] +then + echo "Fake root install failed, stopping." + exit 1 +fi + +## Setup our run level stuff while we are at it. +if [ $DO_SMF -eq 1 ] +then + # For Solaris' SMF, /lib/svc/method/site is the preferred place + # for start/stop scripts that aren't supplied with the OS, and + # similarly /var/svc/manifest/site for manifests. + mkdir -p $FAKE_ROOT${TEST_DIR}${SMF_METHOD_DIR} + mkdir -p $FAKE_ROOT${TEST_DIR}${SMF_MANIFEST_DIR} + + cp ${OPENSSHD} $FAKE_ROOT${TEST_DIR}${SMF_METHOD_DIR}/${SYSVINIT_NAME} + chmod 744 $FAKE_ROOT${TEST_DIR}${SMF_METHOD_DIR}/${SYSVINIT_NAME} + + cat ${OPENSSH_MANIFEST} | \ + sed -e "s|__SYSVINIT_NAME__|${SYSVINIT_NAME}|" \ + -e "s|__SMF_METHOD_DIR__|${SMF_METHOD_DIR}|" \ + > $FAKE_ROOT${TEST_DIR}${SMF_MANIFEST_DIR}/${SYSVINIT_NAME}.xml + chmod 644 $FAKE_ROOT${TEST_DIR}${SMF_MANIFEST_DIR}/${SYSVINIT_NAME}.xml +else + mkdir -p $FAKE_ROOT${TEST_DIR}/etc/init.d + + cp ${OPENSSHD} $FAKE_ROOT${TEST_DIR}/etc/init.d/${SYSVINIT_NAME} + chmod 744 $FAKE_ROOT${TEST_DIR}/etc/init.d/${SYSVINIT_NAME} +fi + +[ "${PERMIT_ROOT_LOGIN}" = no ] && \ + perl -p -i -e "s/#PermitRootLogin yes/PermitRootLogin no/" \ + $FAKE_ROOT${sysconfdir}/sshd_config +[ "${X11_FORWARDING}" = yes ] && \ + perl -p -i -e "s/#X11Forwarding no/X11Forwarding yes/" \ + $FAKE_ROOT${sysconfdir}/sshd_config +# fix PrintMotd +perl -p -i -e "s/#PrintMotd yes/PrintMotd no/" \ + $FAKE_ROOT${sysconfdir}/sshd_config + +# We don't want to overwrite config files on multiple installs +mv $FAKE_ROOT${sysconfdir}/ssh_config $FAKE_ROOT${sysconfdir}/ssh_config.default +mv $FAKE_ROOT${sysconfdir}/sshd_config $FAKE_ROOT${sysconfdir}/sshd_config.default + +# local tweeks here +[ -s "${POST_MAKE_INSTALL_FIXES}" ] && . ${POST_MAKE_INSTALL_FIXES} + +cd $FAKE_ROOT + +## Ok, this is outright wrong, but it will work. I'm tired of pkgmk +## whining. +for i in *; do + PROTO_ARGS="$PROTO_ARGS $i=/$i"; +done + +## Build info file +echo "Building pkginfo file..." +cat > pkginfo << _EOF +PKG=$PKGNAME +NAME="OpenSSH Portable for ${UNAME_S}" +DESC="Secure Shell remote access utility; replaces telnet and rlogin/rsh." +VENDOR="OpenSSH Portable Team - http://www.openssh.com/portable.html" +ARCH=$ARCH +VERSION=$VERSION$REV +CATEGORY="Security,application" +BASEDIR=/ +CLASSES="none" +PSTAMP="${UNAME_S} ${OS_VER} ${ARCH} `date '+%d%b%Y %H:%M'`" +_EOF + +## Build empty depend file that may get updated by $POST_PROTOTYPE_EDITS +echo "Building depend file..." +touch depend + +## Build space file +echo "Building space file..." +if [ $DO_SMF -eq 1 ] +then + # XXX Is this necessary? If not, remove space line from mk-proto.awk. + touch space +else + cat > space << _EOF +# extra space required by start/stop links added by installf +# in postinstall +$TEST_DIR/etc/rc0.d/${SYSVINITSTOPT}${SYSVINIT_NAME} 0 1 +$TEST_DIR/etc/rc2.d/${SYSVINITSTART}${SYSVINIT_NAME} 0 1 +_EOF + [ "$RC1_D" = no ] || \ + echo "$TEST_DIR/etc/rc1.d/${SYSVINITSTOPT}${SYSVINIT_NAME} 0 1" >> space + [ "$RCS_D" = yes ] && \ + echo "$TEST_DIR/etc/rcS.d/${SYSVINITSTOPT}${SYSVINIT_NAME} 0 1" >> space +fi + +## Build preinstall file +echo "Building preinstall file..." +cat > preinstall << _EOF +#! ${SCRIPT_SHELL} +# +_EOF + +# local preinstall changes here +[ -s "${PKG_PREINSTALL_LOCAL}" ] && . ${PKG_PREINSTALL_LOCAL} + +cat >> preinstall << _EOF +# +if [ "\${PRE_INS_STOP}" = "yes" ] +then + if [ $DO_SMF -eq 1 ] + then + svcadm disable $OPENSSH_FMRI + else + ${TEST_DIR}/etc/init.d/${SYSVINIT_NAME} stop + fi +fi + +exit 0 +_EOF + +## Build postinstall file +echo "Building postinstall file..." +cat > postinstall << _EOF +#! ${SCRIPT_SHELL} +# +[ -f \${PKG_INSTALL_ROOT}${sysconfdir}/ssh_config ] || \\ + cp -p \${PKG_INSTALL_ROOT}${sysconfdir}/ssh_config.default \\ + \${PKG_INSTALL_ROOT}${sysconfdir}/ssh_config +[ -f \${PKG_INSTALL_ROOT}${sysconfdir}/sshd_config ] || \\ + cp -p \${PKG_INSTALL_ROOT}${sysconfdir}/sshd_config.default \\ + \${PKG_INSTALL_ROOT}${sysconfdir}/sshd_config + +# make rc?.d dirs only if we are doing a test install +[ -n "${TEST_DIR}" ] && [ $DO_SMF -ne 1 ] && { + [ "$RCS_D" = yes ] && mkdir -p ${TEST_DIR}/etc/rcS.d + mkdir -p ${TEST_DIR}/etc/rc0.d + [ "$RC1_D" = no ] || mkdir -p ${TEST_DIR}/etc/rc1.d + mkdir -p ${TEST_DIR}/etc/rc2.d +} + +if [ $DO_SMF -eq 1 ] +then + # Delete the existing service, if it exists, then import the + # new one. + if svcs $OPENSSH_FMRI > /dev/null 2>&1 + then + svccfg delete -f $OPENSSH_FMRI + fi + # NOTE, The manifest disables sshd by default. + svccfg import ${TEST_DIR}${SMF_MANIFEST_DIR}/${SYSVINIT_NAME}.xml +else + if [ "\${USE_SYM_LINKS}" = yes ] + then + [ "$RCS_D" = yes ] && \\ + installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR/etc/rcS.d/${SYSVINITSTOPT}${SYSVINIT_NAME}=../init.d/${SYSVINIT_NAME} s + installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR/etc/rc0.d/${SYSVINITSTOPT}${SYSVINIT_NAME}=../init.d/${SYSVINIT_NAME} s + [ "$RC1_D" = no ] || \\ + installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR/etc/rc1.d/${SYSVINITSTOPT}${SYSVINIT_NAME}=../init.d/${SYSVINIT_NAME} s + installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR/etc/rc2.d/${SYSVINITSTART}${SYSVINIT_NAME}=../init.d/${SYSVINIT_NAME} s + else + [ "$RCS_D" = yes ] && \\ + installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR/etc/rcS.d/${SYSVINITSTOPT}${SYSVINIT_NAME}=\${PKG_INSTALL_ROOT}$TEST_DIR/etc/init.d/${SYSVINIT_NAME} l + installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR/etc/rc0.d/${SYSVINITSTOPT}${SYSVINIT_NAME}=\${PKG_INSTALL_ROOT}$TEST_DIR/etc/init.d/${SYSVINIT_NAME} l + [ "$RC1_D" = no ] || \\ + installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR/etc/rc1.d/${SYSVINITSTOPT}${SYSVINIT_NAME}=\${PKG_INSTALL_ROOT}$TEST_DIR/etc/init.d/${SYSVINIT_NAME} l + installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR/etc/rc2.d/${SYSVINITSTART}${SYSVINIT_NAME}=\${PKG_INSTALL_ROOT}$TEST_DIR/etc/init.d/${SYSVINIT_NAME} l + fi +fi + +# If piddir doesn't exist we add it. (Ie. --with-pid-dir=/var/opt/ssh) +[ -d $piddir ] || installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR$piddir d 0755 root sys + +_EOF + +# local postinstall changes here +[ -s "${PKG_POSTINSTALL_LOCAL}" ] && . ${PKG_POSTINSTALL_LOCAL} + +cat >> postinstall << _EOF +installf -f ${PKGNAME} + +# Use chroot to handle PKG_INSTALL_ROOT +if [ ! -z "\${PKG_INSTALL_ROOT}" ] +then + chroot="chroot \${PKG_INSTALL_ROOT}" +fi +# If this is a test build, we will skip the groupadd/useradd/passwd commands +if [ ! -z "${TEST_DIR}" ] +then + chroot=echo +fi + + echo "PrivilegeSeparation user always required." + if cut -f1 -d: \${PKG_INSTALL_ROOT}/etc/passwd | egrep '^'$SSH_PRIVSEP_USER'\$' >/dev/null + then + echo "PrivSep user $SSH_PRIVSEP_USER already exists." + SSH_PRIVSEP_GROUP=\`grep "^$SSH_PRIVSEP_USER:" \${PKG_INSTALL_ROOT}/etc/passwd | awk -F: '{print \$4}'\` + SSH_PRIVSEP_GROUP=\`grep ":\$SSH_PRIVSEP_GROUP:" \${PKG_INSTALL_ROOT}/etc/group | awk -F: '{print \$1}'\` + else + DO_PASSWD=yes + fi + [ -z "\$SSH_PRIVSEP_GROUP" ] && SSH_PRIVSEP_GROUP=$SSH_PRIVSEP_USER + + # group required? + if cut -f1 -d: \${PKG_INSTALL_ROOT}/etc/group | egrep '^'\$SSH_PRIVSEP_GROUP'\$' >/dev/null + then + echo "PrivSep group \$SSH_PRIVSEP_GROUP already exists." + else + DO_GROUP=yes + fi + + # create group if required + [ "\$DO_GROUP" = yes ] && { + # Use gid of 67 if possible + if cut -f3 -d: \${PKG_INSTALL_ROOT}/etc/group | egrep '^'$SSHDGID'\$' >/dev/null + then + : + else + sshdgid="-g $SSHDGID" + fi + echo "Creating PrivSep group \$SSH_PRIVSEP_GROUP." + \$chroot ${PATH_GROUPADD_PROG} \$sshdgid \$SSH_PRIVSEP_GROUP + } + + # Create user if required + [ "\$DO_PASSWD" = yes ] && { + # Use uid of 67 if possible + if cut -f3 -d: \${PKG_INSTALL_ROOT}/etc/passwd | egrep '^'$SSHDUID'\$' >/dev/null + then + : + else + sshduid="-u $SSHDUID" + fi + echo "Creating PrivSep user $SSH_PRIVSEP_USER." + \$chroot ${PATH_USERADD_PROG} -c 'SSHD PrivSep User' -s /bin/false -g $SSH_PRIVSEP_USER \$sshduid $SSH_PRIVSEP_USER + \$chroot ${PATH_PASSWD_PROG} -l $SSH_PRIVSEP_USER + } + +if [ "\${POST_INS_START}" = "yes" ] +then + if [ $DO_SMF -eq 1 ] + then + svcadm enable $OPENSSH_FMRI + else + ${TEST_DIR}/etc/init.d/${SYSVINIT_NAME} start + fi +fi +exit 0 +_EOF + +## Build preremove file +echo "Building preremove file..." +cat > preremove << _EOF +#! ${SCRIPT_SHELL} +# +if [ $DO_SMF -eq 1 ] +then + svcadm disable $OPENSSH_FMRI +else + ${TEST_DIR}/etc/init.d/${SYSVINIT_NAME} stop +fi +_EOF + +# local preremove changes here +[ -s "${PKG_PREREMOVE_LOCAL}" ] && . ${PKG_PREREMOVE_LOCAL} + +cat >> preremove << _EOF +exit 0 +_EOF + +## Build postremove file +echo "Building postremove file..." +cat > postremove << _EOF +#! ${SCRIPT_SHELL} +# +if [ $DO_SMF -eq 1 ] +then + if svcs $OPENSSH_FMRI > /dev/null 2>&1 + then + svccfg delete -f $OPENSSH_FMRI + fi +fi +_EOF + +# local postremove changes here +[ -s "${PKG_POSTREMOVE_LOCAL}" ] && . ${PKG_POSTREMOVE_LOCAL} + +cat >> postremove << _EOF +exit 0 +_EOF + +## Build request file +echo "Building request file..." +cat > request << _EOF +trap 'exit 3' 15 + +_EOF + +[ -x /usr/bin/ckyorn ] || cat >> request << _EOF + +ckyorn() { +# for some strange reason OpenServer5 has no ckyorn +# We build a striped down version here + +DEFAULT=n +PROMPT="Yes or No [yes,no,?,quit]" +HELP_PROMPT=" Enter y or yes if your answer is yes; n or no if your answer is no." +USAGE="usage: ckyorn [options] +where options may include: + -d default + -h help + -p prompt +" + +if [ \$# != 0 ] +then + while getopts d:p:h: c + do + case \$c in + h) HELP_PROMPT="\$OPTARG" ;; + d) DEFAULT=\$OPTARG ;; + p) PROMPT=\$OPTARG ;; + \\?) echo "\$USAGE" 1>&2 + exit 1 ;; + esac + done + shift \`expr \$OPTIND - 1\` +fi + +while true +do + echo "\${PROMPT}\\c " 1>&2 + read key + [ -z "\$key" ] && key=\$DEFAULT + case \$key in + [n,N]|[n,N][o,O]|[y,Y]|[y,Y][e,E][s,S]) echo "\${key}\\c" + exit 0 ;; + \\?) echo \$HELP_PROMPT 1>&2 ;; + q|quit) echo "q\\c" 1>&2 + exit 3 ;; + esac +done + +} + +_EOF + +if [ $DO_SMF -eq 1 ] +then + # This could get hairy, as the running sshd may not be under SMF. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Sep 21 22:29:00 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BC834E10; Sat, 21 Sep 2013 22:29:00 +0000 (UTC) (envelope-from gibbs@FreeBSD.org) Received: from aslan.scsiguy.com (mail.scsiguy.com [70.89.174.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6F8B12C2A; Sat, 21 Sep 2013 22:29:00 +0000 (UTC) Received: from [192.168.0.99] (macbook.scsiguy.com [192.168.0.99]) (authenticated bits=0) by aslan.scsiguy.com (8.14.7/8.14.5) with ESMTP id r8LMSrpD068356 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sat, 21 Sep 2013 16:28:53 -0600 (MDT) (envelope-from gibbs@FreeBSD.org) Content-Type: multipart/signed; boundary="Apple-Mail=_35359ABA-1B34-43AB-8F0E-553F5E6B5071"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Subject: Re: svn commit: r255744 - in head/sys: amd64/amd64 amd64/conf amd64/include i386/conf i386/i386 i386/include kern x86/xen xen From: "Justin T. Gibbs" In-Reply-To: <20130921205301.GT2351@glenbarber.us> Date: Sat, 21 Sep 2013 16:28:36 -0600 Message-Id: <58780CF4-C420-4A02-826D-354A1EB8EB01@FreeBSD.org> References: <201309202259.r8KMxMP3084866@svn.freebsd.org> <20130921205301.GT2351@glenbarber.us> To: Glen Barber X-Mailer: Apple Mail (2.1510) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (aslan.scsiguy.com [70.89.174.89]); Sat, 21 Sep 2013 16:28:53 -0600 (MDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Sep 2013 22:29:00 -0000 --Apple-Mail=_35359ABA-1B34-43AB-8F0E-553F5E6B5071 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On Sep 21, 2013, at 2:53 PM, Glen Barber wrote: > On Fri, Sep 20, 2013 at 10:59:22PM +0000, Justin T. Gibbs wrote: >> Author: gibbs >> Date: Fri Sep 20 22:59:22 2013 >> New Revision: 255744 >> URL: http://svnweb.freebsd.org/changeset/base/255744 >> >> Log: >> Merge Xen PVHVM support into the GENERIC kernel config for both >> amd64 and i386. >> > > This seems to have broken the mips, ia64, and i386/PAE builds. > > http://tinderbox.freebsd.org/tinderbox-head-build-HEAD-mips-mips.brief > http://tinderbox.freebsd.org/tinderbox-head-build-HEAD-ia64-ia64.brief > http://tinderbox.freebsd.org/tinderbox-head-build-HEAD-i386-i386.brief > > Glen I'm looking into this now. -- Justin --Apple-Mail=_35359ABA-1B34-43AB-8F0E-553F5E6B5071 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iQEcBAEBAgAGBQJSPh2kAAoJED9n8CuvaSf4ioEH/0quv8/AP+XHCZHJLVrdNNxR AZtgXmteAQM3Xb51NlDcr+i2y3SXUnevvVB5KPPmmOr3zTBd6CDuZWWQO75H6D8m ciWimd+XgNkp6N/Eh5Qu7RZg/UooIB/m/KgiZc+ED4igwtG+qEOBngoRHClLhzPH ssTVJBmIA0LhPo49cC7tv2qZiN0/xRFw0v3WAuffTh1jevIv+JU5MjPsTQrDbeC9 kmdmP85yPzCf6OnI+OQ1eRgewVmqTWkQR+5XtYzSlN2/AmaQJJuRy5zLTV07+Nj0 KycGINZRePFssX82ZrFJBwfP/B6xOl0UkWtl9Jx38vsAaVYBgbB667bTXhCbuEw= =LjAq -----END PGP SIGNATURE----- --Apple-Mail=_35359ABA-1B34-43AB-8F0E-553F5E6B5071-- From owner-svn-src-all@FreeBSD.ORG Sat Sep 21 22:36:08 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5945CFD7; Sat, 21 Sep 2013 22:36:08 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 468332C8F; Sat, 21 Sep 2013 22:36:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8LMa8wB019995; Sat, 21 Sep 2013 22:36:08 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8LMa7mB019988; Sat, 21 Sep 2013 22:36:07 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201309212236.r8LMa7mB019988@svn.freebsd.org> From: Ian Lepore Date: Sat, 21 Sep 2013 22:36:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255775 - head/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Sep 2013 22:36:08 -0000 Author: ian Date: Sat Sep 21 22:36:07 2013 New Revision: 255775 URL: http://svnweb.freebsd.org/changeset/base/255775 Log: Create a separate script to generate osreldate.h rather than sourcing newvers.sh into a temporary subshell with inline make rules. Using a separate script fixes a variety of problems, including establishing the correct dependencies in the makefiles. It also eliminates a problem with the way newvers.sh uses `realpath $0`, because $0 expands differently within a script sourced into a rule in a makefile depending on the version of make and of /bin/sh being used. The latter can cause build breakage in a cross-build environment, and can also make it difficult to compile 10.0 on older pre-10.0 systems. PR: 160646 174422 Submitted by: Garrett Cooper Approved by: re (gjb) MFC after: 2 weeks Added: head/include/mk-osreldate.sh (contents, props changed) Modified: head/include/Makefile Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Sat Sep 21 22:24:10 2013 (r255774) +++ head/include/Makefile Sat Sep 21 22:36:07 2013 (r255775) @@ -104,19 +104,16 @@ SHARED?= copies INCS+= osreldate.h -osreldate.h: ${.CURDIR}/../sys/conf/newvers.sh ${.CURDIR}/../sys/sys/param.h \ - ${.CURDIR}/Makefile - @${ECHO} creating osreldate.h from newvers.sh - @MAKE=${MAKE}; \ - PARAMFILE=${.CURDIR}/../sys/sys/param.h; \ - . ${.CURDIR}/../sys/conf/newvers.sh; \ - echo "$$COPYRIGHT" > osreldate.h; \ - echo "#ifdef _KERNEL" >> osreldate.h; \ - echo "#error \" cannot be used in the kernel, use \"" >> osreldate.h; \ - echo "#else" >> osreldate.h; \ - echo "#undef __FreeBSD_version" >> osreldate.h; \ - echo "#define __FreeBSD_version $$RELDATE" >> osreldate.h; \ - echo "#endif" >> osreldate.h +NEWVERS_SH= ${.CURDIR}/../sys/conf/newvers.sh +PARAM_H= ${.CURDIR}/../sys/sys/param.h +MK_OSRELDATE_SH= ${.CURDIR}/mk-osreldate.sh + +osreldate.h vers.c: ${NEWVERS_SH} ${PARAM_H} ${MK_OSRELDATE_SH} + env ECHO="${ECHO}" \ + MAKE="${MAKE}" \ + NEWVERS_SH=${NEWVERS_SH} \ + PARAM_H=${PARAM_H} \ + ${MK_OSRELDATE_SH} .for i in ${LHDRS} INCSLINKS+= sys/$i ${INCLUDEDIR}/$i Added: head/include/mk-osreldate.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/include/mk-osreldate.sh Sat Sep 21 22:36:07 2013 (r255775) @@ -0,0 +1,49 @@ +#!/bin/sh - +# Copyright (c) 2013 Garrett Cooper +# 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$ + +set -e + +CURDIR=$(pwd) +ECHO=${ECHO:=echo} + +tmpfile=$(mktemp osreldate.XXXXXXXX) +trap "rm -f $tmpfile" EXIT + +${ECHO} creating osreldate.h from newvers.sh + +export PARAMFILE="${PARAM_H:=$CURDIR/../sys/sys/param.h}" +. "${NEWVERS_SH:=$CURDIR/../sys/conf/newvers.sh}" +cat > $tmpfile < cannot be used in the kernel, use " +#else +#undef __FreeBSD_version +#define __FreeBSD_version $RELDATE +#endif +EOF +mv $tmpfile osreldate.h From owner-svn-src-all@FreeBSD.ORG Sat Sep 21 22:43:50 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BE1F14C2; Sat, 21 Sep 2013 22:43:50 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AB1B72CF9; Sat, 21 Sep 2013 22:43:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8LMhoZG023965; Sat, 21 Sep 2013 22:43:50 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8LMhoTp023964; Sat, 21 Sep 2013 22:43:50 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201309212243.r8LMhoTp023964@svn.freebsd.org> From: Mark Johnston Date: Sat, 21 Sep 2013 22:43:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255776 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Sep 2013 22:43:50 -0000 Author: markj Date: Sat Sep 21 22:43:50 2013 New Revision: 255776 URL: http://svnweb.freebsd.org/changeset/base/255776 Log: Give argtype struct names a different prefix than probe struct names. Otherwise it's possible to declare SDT probes in such a way that a name collision occurs, causing an unexpected compilation error. Approved by: re (gjb) MFC after: 1 week Modified: head/sys/sys/sdt.h Modified: head/sys/sys/sdt.h ============================================================================== --- head/sys/sys/sdt.h Sat Sep 21 22:36:07 2013 (r255775) +++ head/sys/sys/sdt.h Sat Sep 21 22:43:50 2013 (r255776) @@ -160,11 +160,11 @@ SET_DECLARE(sdt_argtypes_set, struct sdt } while (0) #define SDT_PROBE_ARGTYPE(prov, mod, func, name, num, type, xtype) \ - static struct sdt_argtype sdt_##prov##_##mod##_##func##_##name##num[1] \ + static struct sdt_argtype sdta_##prov##_##mod##_##func##_##name##num[1] \ = { { num, type, xtype, { NULL, NULL }, \ sdt_##prov##_##mod##_##func##_##name } \ }; \ - DATA_SET(sdt_argtypes_set, sdt_##prov##_##mod##_##func##_##name##num); + DATA_SET(sdt_argtypes_set, sdta_##prov##_##mod##_##func##_##name##num); #define SDT_PROBE_DEFINE0(prov, mod, func, name, sname) \ SDT_PROBE_DEFINE(prov, mod, func, name, sname) From owner-svn-src-all@FreeBSD.ORG Sat Sep 21 23:05:45 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 14E7C6F6; Sat, 21 Sep 2013 23:05:45 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 02A332DB7; Sat, 21 Sep 2013 23:05:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8LN5i7N035042; Sat, 21 Sep 2013 23:05:44 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8LN5ikB035041; Sat, 21 Sep 2013 23:05:44 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201309212305.r8LN5ikB035041@svn.freebsd.org> From: Mark Johnston Date: Sat, 21 Sep 2013 23:05:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255777 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Sep 2013 23:05:45 -0000 Author: markj Date: Sat Sep 21 23:05:44 2013 New Revision: 255777 URL: http://svnweb.freebsd.org/changeset/base/255777 Log: Omit "__restrict" when generating syscall argument strings. DTrace doesn't handle it and cannot determine the argument type when it's present. Approved by: re (gjb) MFC after: 1 week Modified: head/sys/kern/makesyscalls.sh Modified: head/sys/kern/makesyscalls.sh ============================================================================== --- head/sys/kern/makesyscalls.sh Sat Sep 21 22:43:50 2013 (r255776) +++ head/sys/kern/makesyscalls.sh Sat Sep 21 23:05:44 2013 (r255777) @@ -403,19 +403,21 @@ s/\$//g printf("\t\tswitch(ndx) {\n") > systracetmp printf("\t\tstruct %s *p = params;\n", argalias) > systrace for (i = 1; i <= argc; i++) { - printf("\t\tcase %d:\n\t\t\tp = \"%s\";\n\t\t\tbreak;\n", i - 1, argtype[i]) > systracetmp - if (index(argtype[i], "*") > 0 || argtype[i] == "caddr_t") + arg = argtype[i] + sub("__restrict$", "", arg) + printf("\t\tcase %d:\n\t\t\tp = \"%s\";\n\t\t\tbreak;\n", i - 1, arg) > systracetmp + if (index(arg, "*") > 0 || arg == "caddr_t") printf("\t\tuarg[%d] = (intptr_t) p->%s; /* %s */\n", \ i - 1, \ - argname[i], argtype[i]) > systrace - else if (substr(argtype[i], 1, 1) == "u" || argtype[i] == "size_t") + argname[i], arg) > systrace + else if (substr(arg, 1, 1) == "u" || arg == "size_t") printf("\t\tuarg[%d] = p->%s; /* %s */\n", \ i - 1, \ - argname[i], argtype[i]) > systrace + argname[i], arg) > systrace else printf("\t\tiarg[%d] = p->%s; /* %s */\n", \ i - 1, \ - argname[i], argtype[i]) > systrace + argname[i], arg) > systrace } printf("\t\tdefault:\n\t\t\tbreak;\n\t\t};\n") > systracetmp From owner-svn-src-all@FreeBSD.ORG Sat Sep 21 23:06:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D8706833; Sat, 21 Sep 2013 23:06:37 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B55FD2DC2; Sat, 21 Sep 2013 23:06:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8LN6bog035449; Sat, 21 Sep 2013 23:06:37 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8LN6bW5035447; Sat, 21 Sep 2013 23:06:37 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201309212306.r8LN6bW5035447@svn.freebsd.org> From: Mark Johnston Date: Sat, 21 Sep 2013 23:06:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255778 - in head/sys: compat/freebsd32 kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Sep 2013 23:06:37 -0000 Author: markj Date: Sat Sep 21 23:06:36 2013 New Revision: 255778 URL: http://svnweb.freebsd.org/changeset/base/255778 Log: Regenerate syscall argument strings after r255777. Approved by: re (gjb) MFC after: 1 week Modified: head/sys/compat/freebsd32/freebsd32_systrace_args.c head/sys/kern/systrace_args.c Modified: head/sys/compat/freebsd32/freebsd32_systrace_args.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_systrace_args.c Sat Sep 21 23:05:44 2013 (r255777) +++ head/sys/compat/freebsd32/freebsd32_systrace_args.c Sat Sep 21 23:06:36 2013 (r255778) @@ -3266,8 +3266,8 @@ systrace_args(int sysnum, void *params, case 541: { struct accept4_args *p = params; iarg[0] = p->s; /* int */ - uarg[1] = (intptr_t) p->name; /* struct sockaddr *__restrict */ - uarg[2] = (intptr_t) p->anamelen; /* __socklen_t *__restrict */ + uarg[1] = (intptr_t) p->name; /* struct sockaddr * */ + uarg[2] = (intptr_t) p->anamelen; /* __socklen_t * */ iarg[3] = p->flags; /* int */ *n_args = 4; break; @@ -8793,10 +8793,10 @@ systrace_entry_setargdesc(int sysnum, in p = "int"; break; case 1: - p = "struct sockaddr *__restrict"; + p = "struct sockaddr *"; break; case 2: - p = "__socklen_t *__restrict"; + p = "__socklen_t *"; break; case 3: p = "int"; Modified: head/sys/kern/systrace_args.c ============================================================================== --- head/sys/kern/systrace_args.c Sat Sep 21 23:05:44 2013 (r255777) +++ head/sys/kern/systrace_args.c Sat Sep 21 23:06:36 2013 (r255778) @@ -209,8 +209,8 @@ systrace_args(int sysnum, void *params, uarg[1] = (intptr_t) p->buf; /* caddr_t */ uarg[2] = p->len; /* size_t */ iarg[3] = p->flags; /* int */ - uarg[4] = (intptr_t) p->from; /* struct sockaddr *__restrict */ - uarg[5] = (intptr_t) p->fromlenaddr; /* __socklen_t *__restrict */ + uarg[4] = (intptr_t) p->from; /* struct sockaddr * */ + uarg[5] = (intptr_t) p->fromlenaddr; /* __socklen_t * */ *n_args = 6; break; } @@ -218,8 +218,8 @@ systrace_args(int sysnum, void *params, case 30: { struct accept_args *p = params; iarg[0] = p->s; /* int */ - uarg[1] = (intptr_t) p->name; /* struct sockaddr *__restrict */ - uarg[2] = (intptr_t) p->anamelen; /* __socklen_t *__restrict */ + uarg[1] = (intptr_t) p->name; /* struct sockaddr * */ + uarg[2] = (intptr_t) p->anamelen; /* __socklen_t * */ *n_args = 3; break; } @@ -227,8 +227,8 @@ systrace_args(int sysnum, void *params, case 31: { struct getpeername_args *p = params; iarg[0] = p->fdes; /* int */ - uarg[1] = (intptr_t) p->asa; /* struct sockaddr *__restrict */ - uarg[2] = (intptr_t) p->alen; /* __socklen_t *__restrict */ + uarg[1] = (intptr_t) p->asa; /* struct sockaddr * */ + uarg[2] = (intptr_t) p->alen; /* __socklen_t * */ *n_args = 3; break; } @@ -236,8 +236,8 @@ systrace_args(int sysnum, void *params, case 32: { struct getsockname_args *p = params; iarg[0] = p->fdes; /* int */ - uarg[1] = (intptr_t) p->asa; /* struct sockaddr *__restrict */ - uarg[2] = (intptr_t) p->alen; /* __socklen_t *__restrict */ + uarg[1] = (intptr_t) p->asa; /* struct sockaddr * */ + uarg[2] = (intptr_t) p->alen; /* __socklen_t * */ *n_args = 3; break; } @@ -3355,8 +3355,8 @@ systrace_args(int sysnum, void *params, case 541: { struct accept4_args *p = params; iarg[0] = p->s; /* int */ - uarg[1] = (intptr_t) p->name; /* struct sockaddr *__restrict */ - uarg[2] = (intptr_t) p->anamelen; /* __socklen_t *__restrict */ + uarg[1] = (intptr_t) p->name; /* struct sockaddr * */ + uarg[2] = (intptr_t) p->anamelen; /* __socklen_t * */ iarg[3] = p->flags; /* int */ *n_args = 4; break; @@ -3705,10 +3705,10 @@ systrace_entry_setargdesc(int sysnum, in p = "int"; break; case 4: - p = "struct sockaddr *__restrict"; + p = "struct sockaddr *"; break; case 5: - p = "__socklen_t *__restrict"; + p = "__socklen_t *"; break; default: break; @@ -3721,10 +3721,10 @@ systrace_entry_setargdesc(int sysnum, in p = "int"; break; case 1: - p = "struct sockaddr *__restrict"; + p = "struct sockaddr *"; break; case 2: - p = "__socklen_t *__restrict"; + p = "__socklen_t *"; break; default: break; @@ -3737,10 +3737,10 @@ systrace_entry_setargdesc(int sysnum, in p = "int"; break; case 1: - p = "struct sockaddr *__restrict"; + p = "struct sockaddr *"; break; case 2: - p = "__socklen_t *__restrict"; + p = "__socklen_t *"; break; default: break; @@ -3753,10 +3753,10 @@ systrace_entry_setargdesc(int sysnum, in p = "int"; break; case 1: - p = "struct sockaddr *__restrict"; + p = "struct sockaddr *"; break; case 2: - p = "__socklen_t *__restrict"; + p = "__socklen_t *"; break; default: break; @@ -8970,10 +8970,10 @@ systrace_entry_setargdesc(int sysnum, in p = "int"; break; case 1: - p = "struct sockaddr *__restrict"; + p = "struct sockaddr *"; break; case 2: - p = "__socklen_t *__restrict"; + p = "__socklen_t *"; break; case 3: p = "int"; From owner-svn-src-all@FreeBSD.ORG Sat Sep 21 23:29:03 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B1BE3D95; Sat, 21 Sep 2013 23:29:03 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9F0C72EA1; Sat, 21 Sep 2013 23:29:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8LNT3Po046505; Sat, 21 Sep 2013 23:29:03 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8LNT3nv046503; Sat, 21 Sep 2013 23:29:03 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309212329.r8LNT3nv046503@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sat, 21 Sep 2013 23:29:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255779 - head/contrib/unbound X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Sep 2013 23:29:03 -0000 Author: des Date: Sat Sep 21 23:29:02 2013 New Revision: 255779 URL: http://svnweb.freebsd.org/changeset/base/255779 Log: Set props and correct RCS ID tag. Approved by: re (blanket) Modified: head/contrib/unbound/freebsd-configure.sh (contents, props changed) head/contrib/unbound/freebsd-sources.pl (contents, props changed) Modified: head/contrib/unbound/freebsd-configure.sh ============================================================================== --- head/contrib/unbound/freebsd-configure.sh Sat Sep 21 23:06:36 2013 (r255778) +++ head/contrib/unbound/freebsd-configure.sh Sat Sep 21 23:29:02 2013 (r255779) @@ -1,4 +1,7 @@ #!/bin/sh +# +# $FreeBSD$ +# set -e Modified: head/contrib/unbound/freebsd-sources.pl ============================================================================== --- head/contrib/unbound/freebsd-sources.pl Sat Sep 21 23:06:36 2013 (r255778) +++ head/contrib/unbound/freebsd-sources.pl Sat Sep 21 23:29:02 2013 (r255779) @@ -24,7 +24,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $Id$ +# $FreeBSD$ # use strict; From owner-svn-src-all@FreeBSD.ORG Sat Sep 21 23:30:32 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id DADA3ED7; Sat, 21 Sep 2013 23:30:32 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AD4BB2ECF; Sat, 21 Sep 2013 23:30:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8LNUW0X048689; Sat, 21 Sep 2013 23:30:32 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8LNUWZp048688; Sat, 21 Sep 2013 23:30:32 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309212330.r8LNUWZp048688@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sat, 21 Sep 2013 23:30:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255780 - head/contrib/unbound/validator X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Sep 2013 23:30:32 -0000 Author: des Date: Sat Sep 21 23:30:32 2013 New Revision: 255780 URL: http://svnweb.freebsd.org/changeset/base/255780 Log: Remove autoprops. Approved by: re (blanket) Modified: Directory Properties: head/contrib/unbound/validator/val_secalgo.c (props changed) head/contrib/unbound/validator/val_secalgo.h (props changed)