From owner-svn-src-stable-10@freebsd.org Sun Jan 31 02:23:32 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25CA0A74B22; Sun, 31 Jan 2016 02:23:32 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB342102B; Sun, 31 Jan 2016 02:23:31 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0V2NUDH065440; Sun, 31 Jan 2016 02:23:30 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0V2NUcp065439; Sun, 31 Jan 2016 02:23:30 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201601310223.u0V2NUcp065439@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Sun, 31 Jan 2016 02:23:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r295088 - stable/10/sys/dev/ixl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2016 02:23:32 -0000 Author: smh Date: Sun Jan 31 02:23:30 2016 New Revision: 295088 URL: https://svnweb.freebsd.org/changeset/base/295088 Log: MFC r295051: Fix phy interrupts setup for ixl Approved by: re (gjb) Sponsored by: Multiplay Modified: stable/10/sys/dev/ixl/if_ixl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ixl/if_ixl.c ============================================================================== --- stable/10/sys/dev/ixl/if_ixl.c Sat Jan 30 22:48:06 2016 (r295087) +++ stable/10/sys/dev/ixl/if_ixl.c Sun Jan 31 02:23:30 2016 (r295088) @@ -673,9 +673,9 @@ ixl_attach(device_t dev) } /* Limit phy interrupts to link and modules failure */ - error = i40e_aq_set_phy_int_mask(hw, - I40E_AQ_EVENT_LINK_UPDOWN | I40E_AQ_EVENT_MODULE_QUAL_FAIL, NULL); - if (error) + error = i40e_aq_set_phy_int_mask(hw, ~(I40E_AQ_EVENT_LINK_UPDOWN | + I40E_AQ_EVENT_MODULE_QUAL_FAIL), NULL); + if (error) device_printf(dev, "set phy mask failed: %d\n", error); /* Get the bus configuration and set the shared code */ From owner-svn-src-stable-10@freebsd.org Mon Feb 1 00:44:31 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49111A74E6E; Mon, 1 Feb 2016 00:44:31 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 21BAEB68; Mon, 1 Feb 2016 00:44:31 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u110iUju062869; Mon, 1 Feb 2016 00:44:30 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u110iTg9062862; Mon, 1 Feb 2016 00:44:29 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201602010044.u110iTg9062862@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 1 Feb 2016 00:44:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r295107 - in stable/10: lib/libdpv sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2016 00:44:31 -0000 Author: dteske Date: Mon Feb 1 00:44:29 2016 New Revision: 295107 URL: https://svnweb.freebsd.org/changeset/base/295107 Log: MFC revisions 294860,294862,294892-294893,294922 r294860: Add keep_tite configuration option r294862: Bump copyrights r294892: Remove unused function prototype r294893: Fix a crash if `-D' is used without `-t title' r294922: Fix fatal warn when compiling under GCC 5.2.0 Approved by: re (marius) Modified: stable/10/lib/libdpv/dialog_util.c stable/10/lib/libdpv/dialog_util.h stable/10/lib/libdpv/dpv.3 stable/10/lib/libdpv/dpv.c stable/10/lib/libdpv/dpv.h stable/10/lib/libdpv/dpv_private.h stable/10/sys/sys/param.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libdpv/dialog_util.c ============================================================================== --- stable/10/lib/libdpv/dialog_util.c Sun Jan 31 21:34:25 2016 (r295106) +++ stable/10/lib/libdpv/dialog_util.c Mon Feb 1 00:44:29 2016 (r295107) @@ -261,6 +261,13 @@ dialog_spawn_gauge(char *init_prompt, pi errx(EXIT_FAILURE, "Out of memory?!"); sprintf(dargv[n++], "--title"); dargv[n++] = title; + } else { + if ((dargv[n] = malloc(8)) == NULL) + errx(EXIT_FAILURE, "Out of memory?!"); + sprintf(dargv[n++], "--title"); + if ((dargv[n] = malloc(1)) == NULL) + errx(EXIT_FAILURE, "Out of memory?!"); + *dargv[n++] = '\0'; } if (backtitle != NULL) { if ((dargv[n] = malloc(12)) == NULL) Modified: stable/10/lib/libdpv/dialog_util.h ============================================================================== --- stable/10/lib/libdpv/dialog_util.h Sun Jan 31 21:34:25 2016 (r295106) +++ stable/10/lib/libdpv/dialog_util.h Mon Feb 1 00:44:29 2016 (r295107) @@ -55,7 +55,6 @@ extern int dheight, dwidth; __BEGIN_DECLS uint8_t dialog_prompt_nlstate(const char *_prompt); -void dialog_gauge_free(void); void dialog_maxsize_free(void); char *dialog_prompt_lastline(char *_prompt, uint8_t _nlstate); int dialog_maxcols(void); Modified: stable/10/lib/libdpv/dpv.3 ============================================================================== --- stable/10/lib/libdpv/dpv.3 Sun Jan 31 21:34:25 2016 (r295106) +++ stable/10/lib/libdpv/dpv.3 Mon Feb 1 00:44:29 2016 (r295107) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2013-2015 Devin Teske +.\" Copyright (c) 2013-2016 Devin Teske .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Oct 22, 2015 +.Dd Jan 26, 2016 .Dt DPV 3 .Os .Sh NAME @@ -64,6 +64,7 @@ argument contains the following properti features: .Bd -literal -offset indent struct dpv_config { + uint8_t keep_tite; /* Cleaner exit for scripts */ enum dpv_display display_type; /* Def. DPV_DISPLAY_LIBDIALOG */ enum dpv_output output_type; /* Default DPV_OUTPUT_NONE */ int debug; /* Enable debug on stderr */ Modified: stable/10/lib/libdpv/dpv.c ============================================================================== --- stable/10/lib/libdpv/dpv.c Sun Jan 31 21:34:25 2016 (r295106) +++ stable/10/lib/libdpv/dpv.c Mon Feb 1 00:44:29 2016 (r295107) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2014 Devin Teske + * Copyright (c) 2013-2016 Devin Teske * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -69,6 +69,7 @@ long long dpv_overall_read = 0; static char pathbuf[PATH_MAX]; /* Extra display information */ +uint8_t keep_tite = FALSE; /* dpv_config.keep_tite */ uint8_t no_labels = FALSE; /* dpv_config.options & DPV_NO_LABELS */ uint8_t wide = FALSE; /* dpv_config.options & DPV_WIDE_MODE */ char *aprompt = NULL; /* dpv_config.aprompt */ @@ -150,6 +151,7 @@ dpv(struct dpv_config *config, struct dp dialog_updates_per_second = DIALOG_UPDATES_PER_SEC; display_limit = DISPLAY_LIMIT_DEFAULT; display_type = DPV_DISPLAY_LIBDIALOG; + keep_tite = FALSE; label_size = LABEL_SIZE_DEFAULT; msg_done = NULL; msg_fail = NULL; @@ -193,6 +195,7 @@ dpv(struct dpv_config *config, struct dp dialog_updates_per_second = config->dialog_updates_per_second; display_limit = config->display_limit; display_type = config->display_type; + keep_tite = config->keep_tite; label_size = config->label_size; msg_done = (char *)config->msg_done; msg_fail = (char *)config->msg_fail; @@ -695,7 +698,7 @@ dpv(struct dpv_config *config, struct dp close(dialog_out); waitpid(pid, (int *)NULL, 0); } - if (!dpv_interrupt) + if (!keep_tite && !dpv_interrupt) printf("\n"); } else warnx("%s: %lli overall read", __func__, dpv_overall_read); Modified: stable/10/lib/libdpv/dpv.h ============================================================================== --- stable/10/lib/libdpv/dpv.h Sun Jan 31 21:34:25 2016 (r295106) +++ stable/10/lib/libdpv/dpv.h Mon Feb 1 00:44:29 2016 (r295107) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2014 Devin Teske + * Copyright (c) 2013-2016 Devin Teske * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -97,6 +97,7 @@ struct dpv_file_node { * Anatomy of config option to pass as dpv() config argument */ struct dpv_config { + uint8_t keep_tite; /* Prevent visually distracting exit */ enum dpv_display display_type; /* Display (default TYPE_LIBDIALOG) */ enum dpv_output output_type; /* Output (default TYPE_NONE) */ int debug; /* Enable debugging output on stderr */ Modified: stable/10/lib/libdpv/dpv_private.h ============================================================================== --- stable/10/lib/libdpv/dpv_private.h Sun Jan 31 21:34:25 2016 (r295106) +++ stable/10/lib/libdpv/dpv_private.h Mon Feb 1 00:44:29 2016 (r295107) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2014 Devin Teske + * Copyright (c) 2013-2016 Devin Teske * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -38,6 +38,7 @@ extern uint8_t debug; extern unsigned int dpv_nfiles; /* Extra display information */ +extern uint8_t keep_tite; extern uint8_t no_labels; extern uint8_t wide; extern char *msg_done, *msg_fail, *msg_pending; Modified: stable/10/sys/sys/param.h ============================================================================== --- stable/10/sys/sys/param.h Sun Jan 31 21:34:25 2016 (r295106) +++ stable/10/sys/sys/param.h Mon Feb 1 00:44:29 2016 (r295107) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1002508 /* Master, propagated to newvers */ +#define __FreeBSD_version 1002509 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-stable-10@freebsd.org Mon Feb 1 00:58:09 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4632CA73550; Mon, 1 Feb 2016 00:58:09 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0131B13D0; Mon, 1 Feb 2016 00:58:08 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u110w8E8066066; Mon, 1 Feb 2016 00:58:08 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u110w73S066064; Mon, 1 Feb 2016 00:58:07 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201602010058.u110w73S066064@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 1 Feb 2016 00:58:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r295110 - stable/10/usr.bin/dpv X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2016 00:58:09 -0000 Author: dteske Date: Mon Feb 1 00:58:07 2016 New Revision: 295110 URL: https://svnweb.freebsd.org/changeset/base/295110 Log: MFC revisions 294861,294863 r294861: Add `-k' for dpv(3) `keep_tite' config option r294863: Bump copyright Approved by: re (gjb) Modified: stable/10/usr.bin/dpv/dpv.1 stable/10/usr.bin/dpv/dpv.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/dpv/dpv.1 ============================================================================== --- stable/10/usr.bin/dpv/dpv.1 Mon Feb 1 00:55:15 2016 (r295109) +++ stable/10/usr.bin/dpv/dpv.1 Mon Feb 1 00:58:07 2016 (r295110) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2013-2015 Devin Teske +.\" Copyright (c) 2013-2016 Devin Teske .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Oct 22, 2015 +.Dd Jan 26, 2016 .Dt DPV 1 .Os .Sh NAME @@ -138,6 +138,11 @@ Default value is .Dq Li %'10lli bytes read @ %'9.1f bytes/sec. [%i/%i busy/wait] . This format is used when handling more than one file. +.It Fl k +Keep tite. +Prevent visually distracting initialization/exit routines for scripts running +.Xr dialog 1 +several times. .It Fl l Line mode. Read lines from input instead of bytes. .It Fl L Ar size Modified: stable/10/usr.bin/dpv/dpv.c ============================================================================== --- stable/10/usr.bin/dpv/dpv.c Mon Feb 1 00:55:15 2016 (r295109) +++ stable/10/usr.bin/dpv/dpv.c Mon Feb 1 00:58:07 2016 (r295110) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2014 Devin Teske + * Copyright (c) 2013-2016 Devin Teske * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -271,7 +271,7 @@ main(int argc, char *argv[]) * Process command-line options */ while ((ch = getopt(argc, argv, - "a:b:dDhi:I:lL:mn:No:p:P:t:TU:wx:X")) != -1) { + "a:b:dDhi:I:klL:mn:No:p:P:t:TU:wx:X")) != -1) { switch(ch) { case 'a': /* additional message text to append */ if (config->aprompt == NULL) { @@ -307,6 +307,9 @@ main(int argc, char *argv[]) case 'I': /* status line format string for many-files */ config->status_many = optarg; break; + case 'k': /* keep tite */ + config->keep_tite = TRUE; + break; case 'l': /* Line mode */ line_mode = TRUE; break; @@ -467,7 +470,8 @@ main(int argc, char *argv[]) if (dpv(config, file_list) != 0 && debug) warnx("dpv(3) returned error!?"); - end_dialog(); + if (!config->keep_tite) + end_dialog(); dpv_free(); exit(EXIT_SUCCESS); From owner-svn-src-stable-10@freebsd.org Mon Feb 1 03:24:40 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3301A748B5; Mon, 1 Feb 2016 03:24:39 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C39731C34; Mon, 1 Feb 2016 03:24:39 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u113Ocv2011072; Mon, 1 Feb 2016 03:24:38 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u113Oc6i011071; Mon, 1 Feb 2016 03:24:38 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201602010324.u113Oc6i011071@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 1 Feb 2016 03:24:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r295115 - in stable: 10/release/doc/share/xml 9/release/doc/share/xml X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2016 03:24:40 -0000 Author: gjb Date: Mon Feb 1 03:24:38 2016 New Revision: 295115 URL: https://svnweb.freebsd.org/changeset/base/295115 Log: Document SA-16:11. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/share/xml/security.xml Changes in other areas also in this revision: Modified: stable/9/release/doc/share/xml/security.xml Modified: stable/10/release/doc/share/xml/security.xml ============================================================================== --- stable/10/release/doc/share/xml/security.xml Mon Feb 1 02:33:58 2016 (r295114) +++ stable/10/release/doc/share/xml/security.xml Mon Feb 1 03:24:38 2016 (r295115) @@ -122,6 +122,14 @@ &man.issetugid.2; system call vulnerability. + + + FreeBSD-SA-16:11.openssl + 30 January 2016 + SSLv2 cipher suite downgrade + vulnerability. + From owner-svn-src-stable-10@freebsd.org Mon Feb 1 14:56:13 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3603FA75274; Mon, 1 Feb 2016 14:56:13 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02A3E8DF; Mon, 1 Feb 2016 14:56:12 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u11EuCFT016433; Mon, 1 Feb 2016 14:56:12 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u11EuBDE016423; Mon, 1 Feb 2016 14:56:11 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <201602011456.u11EuBDE016423@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Mon, 1 Feb 2016 14:56:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r295124 - in stable/10: lib/libvmmapi share/examples/bhyve sys/amd64/include sys/amd64/vmm sys/amd64/vmm/amd sys/amd64/vmm/intel sys/amd64/vmm/io sys/sys usr.sbin/bhyve usr.sbin/bhyvect... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2016 14:56:13 -0000 Author: grehan Date: Mon Feb 1 14:56:11 2016 New Revision: 295124 URL: https://svnweb.freebsd.org/changeset/base/295124 Log: MFC r284539, r284630, r284688, r284877, r285217, r285218, r286837, r286838, r288470, r288522, r288524, r288826, r289001 Pull in bhyve bug fixes and changes to allow UEFI booting. This provides Windows support. Tested on Intel and AMD with: - Arch Linux i386+amd64 (kernel 4.3.3) - Ubuntu 15.10 server 64-bit - FreeBSD-CURRENT/amd64 20160127 snap - FreeBSD 10.2 i386+amd64 - OpenBSD 5.8 i386+amd64 - SmartOS latest - Windows 10 build 1511' Huge thanks to Yamagi Burmeister who submitted the patch and did the majority of the testing. r284539 - bootrom mem allocation support r284630 - Add SO_REUSEADDR when starting debug port r284688 - Fix a regression in "movs" emulation r284877 - verify_gla() non-zero segment base fix r285217 - Always assert DCD and DSR in the uart r285218 - devmem nodes moved to /dev/vmm.io/ r286837 - Add define for SATA Check-Power-Mode r286838 - Add simple (no-op) SATA cmd emulations r288470 - Increase virtio-blk indirect descs r288522 - Firmware guest query interface r288524 - Fix post-test typo r288826 - Clean up SATA unimplemented cmd msg r289001 - Add -l option to specify userboot path Submitted by: Yamagi Burmeister Approved by: re (kib) Added: stable/10/usr.sbin/bhyve/bootrom.c - copied unchanged from r284539, head/usr.sbin/bhyve/bootrom.c stable/10/usr.sbin/bhyve/bootrom.h - copied unchanged from r284539, head/usr.sbin/bhyve/bootrom.h stable/10/usr.sbin/bhyve/fwctl.c - copied, changed from r288522, head/usr.sbin/bhyve/fwctl.c stable/10/usr.sbin/bhyve/fwctl.h - copied unchanged from r288522, head/usr.sbin/bhyve/fwctl.h Modified: stable/10/lib/libvmmapi/vmmapi.c stable/10/lib/libvmmapi/vmmapi.h stable/10/share/examples/bhyve/vmrun.sh stable/10/sys/amd64/include/vmm.h stable/10/sys/amd64/include/vmm_dev.h stable/10/sys/amd64/vmm/amd/svm.c stable/10/sys/amd64/vmm/intel/vmx.c stable/10/sys/amd64/vmm/io/ppt.c stable/10/sys/amd64/vmm/vmm.c stable/10/sys/amd64/vmm/vmm_dev.c stable/10/sys/amd64/vmm/vmm_instruction_emul.c stable/10/sys/amd64/vmm/vmm_mem.c stable/10/sys/amd64/vmm/vmm_mem.h stable/10/sys/sys/ata.h stable/10/usr.sbin/bhyve/Makefile stable/10/usr.sbin/bhyve/bhyve.8 stable/10/usr.sbin/bhyve/bhyverun.c stable/10/usr.sbin/bhyve/dbgport.c stable/10/usr.sbin/bhyve/pci_ahci.c stable/10/usr.sbin/bhyve/pci_lpc.c stable/10/usr.sbin/bhyve/pci_lpc.h stable/10/usr.sbin/bhyve/pci_passthru.c stable/10/usr.sbin/bhyve/pci_virtio_net.c stable/10/usr.sbin/bhyve/uart_emul.c stable/10/usr.sbin/bhyvectl/bhyvectl.c stable/10/usr.sbin/bhyveload/bhyveload.8 stable/10/usr.sbin/bhyveload/bhyveload.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libvmmapi/vmmapi.c ============================================================================== --- stable/10/lib/libvmmapi/vmmapi.c Mon Feb 1 14:28:58 2016 (r295123) +++ stable/10/lib/libvmmapi/vmmapi.c Mon Feb 1 14:56:11 2016 (r295124) @@ -58,15 +58,23 @@ __FBSDID("$FreeBSD$"); #define MB (1024 * 1024UL) #define GB (1024 * 1024 * 1024UL) +/* + * Size of the guard region before and after the virtual address space + * mapping the guest physical memory. This must be a multiple of the + * superpage size for performance reasons. + */ +#define VM_MMAP_GUARD_SIZE (4 * MB) + +#define PROT_RW (PROT_READ | PROT_WRITE) +#define PROT_ALL (PROT_READ | PROT_WRITE | PROT_EXEC) + struct vmctx { int fd; uint32_t lowmem_limit; - enum vm_mmap_style vms; int memflags; size_t lowmem; - char *lowmem_addr; size_t highmem; - char *highmem_addr; + char *baseaddr; char *name; }; @@ -157,22 +165,6 @@ vm_parse_memsize(const char *optarg, siz return (error); } -int -vm_get_memory_seg(struct vmctx *ctx, vm_paddr_t gpa, size_t *ret_len, - int *wired) -{ - int error; - struct vm_memory_segment seg; - - bzero(&seg, sizeof(seg)); - seg.gpa = gpa; - error = ioctl(ctx->fd, VM_GET_MEMORY_SEG, &seg); - *ret_len = seg.len; - if (wired != NULL) - *wired = seg.wired; - return (error); -} - uint32_t vm_get_lowmem_limit(struct vmctx *ctx) { @@ -194,39 +186,184 @@ vm_set_memflags(struct vmctx *ctx, int f ctx->memflags = flags; } +int +vm_get_memflags(struct vmctx *ctx) +{ + + return (ctx->memflags); +} + +/* + * Map segment 'segid' starting at 'off' into guest address range [gpa,gpa+len). + */ +int +vm_mmap_memseg(struct vmctx *ctx, vm_paddr_t gpa, int segid, vm_ooffset_t off, + size_t len, int prot) +{ + struct vm_memmap memmap; + int error, flags; + + memmap.gpa = gpa; + memmap.segid = segid; + memmap.segoff = off; + memmap.len = len; + memmap.prot = prot; + memmap.flags = 0; + + if (ctx->memflags & VM_MEM_F_WIRED) + memmap.flags |= VM_MEMMAP_F_WIRED; + + /* + * If this mapping already exists then don't create it again. This + * is the common case for SYSMEM mappings created by bhyveload(8). + */ + error = vm_mmap_getnext(ctx, &gpa, &segid, &off, &len, &prot, &flags); + if (error == 0 && gpa == memmap.gpa) { + if (segid != memmap.segid || off != memmap.segoff || + prot != memmap.prot || flags != memmap.flags) { + errno = EEXIST; + return (-1); + } else { + return (0); + } + } + + error = ioctl(ctx->fd, VM_MMAP_MEMSEG, &memmap); + return (error); +} + +int +vm_mmap_getnext(struct vmctx *ctx, vm_paddr_t *gpa, int *segid, + vm_ooffset_t *segoff, size_t *len, int *prot, int *flags) +{ + struct vm_memmap memmap; + int error; + + bzero(&memmap, sizeof(struct vm_memmap)); + memmap.gpa = *gpa; + error = ioctl(ctx->fd, VM_MMAP_GETNEXT, &memmap); + if (error == 0) { + *gpa = memmap.gpa; + *segid = memmap.segid; + *segoff = memmap.segoff; + *len = memmap.len; + *prot = memmap.prot; + *flags = memmap.flags; + } + return (error); +} + +/* + * Return 0 if the segments are identical and non-zero otherwise. + * + * This is slightly complicated by the fact that only device memory segments + * are named. + */ static int -setup_memory_segment(struct vmctx *ctx, vm_paddr_t gpa, size_t len, char **addr) +cmpseg(size_t len, const char *str, size_t len2, const char *str2) { - int error, mmap_flags; - struct vm_memory_segment seg; + + if (len == len2) { + if ((!str && !str2) || (str && str2 && !strcmp(str, str2))) + return (0); + } + return (-1); +} + +static int +vm_alloc_memseg(struct vmctx *ctx, int segid, size_t len, const char *name) +{ + struct vm_memseg memseg; + size_t n; + int error; /* - * Create and optionally map 'len' bytes of memory at guest - * physical address 'gpa' + * If the memory segment has already been created then just return. + * This is the usual case for the SYSMEM segment created by userspace + * loaders like bhyveload(8). */ - bzero(&seg, sizeof(seg)); - seg.gpa = gpa; - seg.len = len; - error = ioctl(ctx->fd, VM_MAP_MEMORY, &seg); - if (error == 0 && addr != NULL) { - mmap_flags = MAP_SHARED; - if ((ctx->memflags & VM_MEM_F_INCORE) == 0) - mmap_flags |= MAP_NOCORE; - *addr = mmap(NULL, len, PROT_READ | PROT_WRITE, mmap_flags, - ctx->fd, gpa); + error = vm_get_memseg(ctx, segid, &memseg.len, memseg.name, + sizeof(memseg.name)); + if (error) + return (error); + + if (memseg.len != 0) { + if (cmpseg(len, name, memseg.len, VM_MEMSEG_NAME(&memseg))) { + errno = EINVAL; + return (-1); + } else { + return (0); + } + } + + bzero(&memseg, sizeof(struct vm_memseg)); + memseg.segid = segid; + memseg.len = len; + if (name != NULL) { + n = strlcpy(memseg.name, name, sizeof(memseg.name)); + if (n >= sizeof(memseg.name)) { + errno = ENAMETOOLONG; + return (-1); + } + } + + error = ioctl(ctx->fd, VM_ALLOC_MEMSEG, &memseg); + return (error); +} + +int +vm_get_memseg(struct vmctx *ctx, int segid, size_t *lenp, char *namebuf, + size_t bufsize) +{ + struct vm_memseg memseg; + size_t n; + int error; + + memseg.segid = segid; + error = ioctl(ctx->fd, VM_GET_MEMSEG, &memseg); + if (error == 0) { + *lenp = memseg.len; + n = strlcpy(namebuf, memseg.name, bufsize); + if (n >= bufsize) { + errno = ENAMETOOLONG; + error = -1; + } } return (error); } +static int +setup_memory_segment(struct vmctx *ctx, vm_paddr_t gpa, size_t len, char *base) +{ + char *ptr; + int error, flags; + + /* Map 'len' bytes starting at 'gpa' in the guest address space */ + error = vm_mmap_memseg(ctx, gpa, VM_SYSMEM, gpa, len, PROT_ALL); + if (error) + return (error); + + flags = MAP_SHARED | MAP_FIXED; + if ((ctx->memflags & VM_MEM_F_INCORE) == 0) + flags |= MAP_NOCORE; + + /* mmap into the process address space on the host */ + ptr = mmap(base + gpa, len, PROT_RW, flags, ctx->fd, gpa); + if (ptr == MAP_FAILED) + return (-1); + + return (0); +} + int vm_setup_memory(struct vmctx *ctx, size_t memsize, enum vm_mmap_style vms) { - char **addr; - int error; + size_t objsize, len; + vm_paddr_t gpa; + char *baseaddr, *ptr; + int error, flags; - /* XXX VM_MMAP_SPARSE not implemented yet */ - assert(vms == VM_MMAP_NONE || vms == VM_MMAP_ALL); - ctx->vms = vms; + assert(vms == VM_MMAP_ALL); /* * If 'memsize' cannot fit entirely in the 'lowmem' segment then @@ -234,43 +371,69 @@ vm_setup_memory(struct vmctx *ctx, size_ */ if (memsize > ctx->lowmem_limit) { ctx->lowmem = ctx->lowmem_limit; - ctx->highmem = memsize - ctx->lowmem; + ctx->highmem = memsize - ctx->lowmem_limit; + objsize = 4*GB + ctx->highmem; } else { ctx->lowmem = memsize; ctx->highmem = 0; + objsize = ctx->lowmem; } - if (ctx->lowmem > 0) { - addr = (vms == VM_MMAP_ALL) ? &ctx->lowmem_addr : NULL; - error = setup_memory_segment(ctx, 0, ctx->lowmem, addr); + error = vm_alloc_memseg(ctx, VM_SYSMEM, objsize, NULL); + if (error) + return (error); + + /* + * Stake out a contiguous region covering the guest physical memory + * and the adjoining guard regions. + */ + len = VM_MMAP_GUARD_SIZE + objsize + VM_MMAP_GUARD_SIZE; + flags = MAP_PRIVATE | MAP_ANON | MAP_NOCORE | MAP_ALIGNED_SUPER; + ptr = mmap(NULL, len, PROT_NONE, flags, -1, 0); + if (ptr == MAP_FAILED) + return (-1); + + baseaddr = ptr + VM_MMAP_GUARD_SIZE; + if (ctx->highmem > 0) { + gpa = 4*GB; + len = ctx->highmem; + error = setup_memory_segment(ctx, gpa, len, baseaddr); if (error) return (error); } - if (ctx->highmem > 0) { - addr = (vms == VM_MMAP_ALL) ? &ctx->highmem_addr : NULL; - error = setup_memory_segment(ctx, 4*GB, ctx->highmem, addr); + if (ctx->lowmem > 0) { + gpa = 0; + len = ctx->lowmem; + error = setup_memory_segment(ctx, gpa, len, baseaddr); if (error) return (error); } + ctx->baseaddr = baseaddr; + return (0); } +/* + * Returns a non-NULL pointer if [gaddr, gaddr+len) is entirely contained in + * the lowmem or highmem regions. + * + * In particular return NULL if [gaddr, gaddr+len) falls in guest MMIO region. + * The instruction emulation code depends on this behavior. + */ void * vm_map_gpa(struct vmctx *ctx, vm_paddr_t gaddr, size_t len) { - /* XXX VM_MMAP_SPARSE not implemented yet */ - assert(ctx->vms == VM_MMAP_ALL); - - if (gaddr < ctx->lowmem && gaddr + len <= ctx->lowmem) - return ((void *)(ctx->lowmem_addr + gaddr)); + if (ctx->lowmem > 0) { + if (gaddr < ctx->lowmem && gaddr + len <= ctx->lowmem) + return (ctx->baseaddr + gaddr); + } - if (gaddr >= 4*GB) { - gaddr -= 4*GB; - if (gaddr < ctx->highmem && gaddr + len <= ctx->highmem) - return ((void *)(ctx->highmem_addr + gaddr)); + if (ctx->highmem > 0) { + if (gaddr >= 4*GB && gaddr + len <= 4*GB + ctx->highmem) + return (ctx->baseaddr + gaddr); } return (NULL); @@ -290,6 +453,56 @@ vm_get_highmem_size(struct vmctx *ctx) return (ctx->highmem); } +void * +vm_create_devmem(struct vmctx *ctx, int segid, const char *name, size_t len) +{ + char pathname[MAXPATHLEN]; + size_t len2; + char *base, *ptr; + int fd, error, flags; + + fd = -1; + ptr = MAP_FAILED; + if (name == NULL || strlen(name) == 0) { + errno = EINVAL; + goto done; + } + + error = vm_alloc_memseg(ctx, segid, len, name); + if (error) + goto done; + + strlcpy(pathname, "/dev/vmm.io/", sizeof(pathname)); + strlcat(pathname, ctx->name, sizeof(pathname)); + strlcat(pathname, ".", sizeof(pathname)); + strlcat(pathname, name, sizeof(pathname)); + + fd = open(pathname, O_RDWR); + if (fd < 0) + goto done; + + /* + * Stake out a contiguous region covering the device memory and the + * adjoining guard regions. + */ + len2 = VM_MMAP_GUARD_SIZE + len + VM_MMAP_GUARD_SIZE; + flags = MAP_PRIVATE | MAP_ANON | MAP_NOCORE | MAP_ALIGNED_SUPER; + base = mmap(NULL, len2, PROT_NONE, flags, -1, 0); + if (base == MAP_FAILED) + goto done; + + flags = MAP_SHARED | MAP_FIXED; + if ((ctx->memflags & VM_MEM_F_INCORE) == 0) + flags |= MAP_NOCORE; + + /* mmap the devmem region in the host address space */ + ptr = mmap(base + VM_MMAP_GUARD_SIZE, len, PROT_RW, flags, fd, 0); +done: + if (fd >= 0) + close(fd); + return (ptr); +} + int vm_set_desc(struct vmctx *ctx, int vcpu, int reg, uint64_t base, uint32_t limit, uint32_t access) Modified: stable/10/lib/libvmmapi/vmmapi.h ============================================================================== --- stable/10/lib/libvmmapi/vmmapi.h Mon Feb 1 14:28:58 2016 (r295123) +++ stable/10/lib/libvmmapi/vmmapi.h Mon Feb 1 14:56:11 2016 (r295124) @@ -36,7 +36,7 @@ * API version for out-of-tree consumers like grub-bhyve for making compile * time decisions. */ -#define VMMAPI_VERSION 0101 /* 2 digit major followed by 2 digit minor */ +#define VMMAPI_VERSION 0102 /* 2 digit major followed by 2 digit minor */ struct iovec; struct vmctx; @@ -52,14 +52,59 @@ enum vm_mmap_style { VM_MMAP_SPARSE, /* mappings created on-demand */ }; +/* + * 'flags' value passed to 'vm_set_memflags()'. + */ #define VM_MEM_F_INCORE 0x01 /* include guest memory in core file */ +#define VM_MEM_F_WIRED 0x02 /* guest memory is wired */ + +/* + * Identifiers for memory segments: + * - vm_setup_memory() uses VM_SYSMEM for the system memory segment. + * - the remaining identifiers can be used to create devmem segments. + */ +enum { + VM_SYSMEM, + VM_BOOTROM, + VM_FRAMEBUFFER, +}; + +/* + * Get the length and name of the memory segment identified by 'segid'. + * Note that system memory segments are identified with a nul name. + * + * Returns 0 on success and non-zero otherwise. + */ +int vm_get_memseg(struct vmctx *ctx, int ident, size_t *lenp, char *name, + size_t namesiz); + +/* + * Iterate over the guest address space. This function finds an address range + * that starts at an address >= *gpa. + * + * Returns 0 if the next address range was found and non-zero otherwise. + */ +int vm_mmap_getnext(struct vmctx *ctx, vm_paddr_t *gpa, int *segid, + vm_ooffset_t *segoff, size_t *len, int *prot, int *flags); +/* + * Create a device memory segment identified by 'segid'. + * + * Returns a pointer to the memory segment on success and MAP_FAILED otherwise. + */ +void *vm_create_devmem(struct vmctx *ctx, int segid, const char *name, + size_t len); + +/* + * Map the memory segment identified by 'segid' into the guest address space + * at [gpa,gpa+len) with protection 'prot'. + */ +int vm_mmap_memseg(struct vmctx *ctx, vm_paddr_t gpa, int segid, + vm_ooffset_t segoff, size_t len, int prot); int vm_create(const char *name); struct vmctx *vm_open(const char *name); void vm_destroy(struct vmctx *ctx); int vm_parse_memsize(const char *optarg, size_t *memsize); -int vm_get_memory_seg(struct vmctx *ctx, vm_paddr_t gpa, size_t *ret_len, - int *wired); int vm_setup_memory(struct vmctx *ctx, size_t len, enum vm_mmap_style s); void *vm_map_gpa(struct vmctx *ctx, vm_paddr_t gaddr, size_t len); int vm_get_gpa_pmap(struct vmctx *, uint64_t gpa, uint64_t *pte, int *num); @@ -68,6 +113,7 @@ int vm_gla2gpa(struct vmctx *, int vcpui uint32_t vm_get_lowmem_limit(struct vmctx *ctx); void vm_set_lowmem_limit(struct vmctx *ctx, uint32_t limit); void vm_set_memflags(struct vmctx *ctx, int flags); +int vm_get_memflags(struct vmctx *ctx); size_t vm_get_lowmem_size(struct vmctx *ctx); size_t vm_get_highmem_size(struct vmctx *ctx); int vm_set_desc(struct vmctx *ctx, int vcpu, int reg, Modified: stable/10/share/examples/bhyve/vmrun.sh ============================================================================== --- stable/10/share/examples/bhyve/vmrun.sh Mon Feb 1 14:28:58 2016 (r295123) +++ stable/10/share/examples/bhyve/vmrun.sh Mon Feb 1 14:56:11 2016 (r295124) @@ -48,8 +48,8 @@ usage() { echo "Usage: vmrun.sh [-ahi] [-c ] [-C ] [-d ]" echo " [-e ] [-g ] [-H ]" - echo " [-I ] [-m ]" - echo " [-t ] " + echo " [-I ] [-l ]" + echo " [-m ] [-t ] " echo "" echo " -h: display this help message" echo " -a: force memory mapped local APIC access" @@ -61,6 +61,7 @@ usage() { echo " -H: host filesystem to export to the loader" echo " -i: force boot of the Installation CDROM image" echo " -I: Installation CDROM image location (default is ${DEFAULT_ISOFILE})" + echo " -l: the OS loader to use (default is /boot/userboot.so)" echo " -m: memory size (default is ${DEFAULT_MEMSIZE})" echo " -p: pass-through a host PCI device at bus/slot/func (e.g. 10/0/0)" echo " -t: tap device for virtio-net (default is $DEFAULT_TAPDEV)" @@ -87,15 +88,15 @@ console=${DEFAULT_CONSOLE} cpus=${DEFAULT_CPUS} tap_total=0 disk_total=0 -apic_opt="" gdbport=0 loader_opt="" +bhyverun_opt="-H -A -P" pass_total=0 -while getopts ac:C:d:e:g:hH:iI:m:p:t: c ; do +while getopts ac:C:d:e:g:hH:iI:l:m:p:t: c ; do case $c in a) - apic_opt="-a" + bhyverun_opt="${bhyverun_opt} -a" ;; c) cpus=${OPTARG} @@ -125,6 +126,9 @@ while getopts ac:C:d:e:g:hH:iI:m:p:t: c I) isofile=${OPTARG} ;; + l) + loader_opt="${loader_opt} -l ${OPTARG}" + ;; m) memsize=${OPTARG} ;; @@ -163,6 +167,12 @@ if [ -n "${host_base}" ]; then loader_opt="${loader_opt} -h ${host_base}" fi +# If PCI passthru devices are configured then guest memory must be wired +if [ ${pass_total} -gt 0 ]; then + loader_opt="${loader_opt} -S" + bhyverun_opt="${bhyverun_opt} -S" +fi + make_and_check_diskdev() { local virtio_diskdev="$1" @@ -263,7 +273,7 @@ while [ 1 ]; do i=$(($i + 1)) done - ${FBSDRUN} -c ${cpus} -m ${memsize} ${apic_opt} -A -H -P \ + ${FBSDRUN} -c ${cpus} -m ${memsize} ${bhyverun_opt} \ -g ${gdbport} \ -s 0:0,hostbridge \ -s 1:0,lpc \ Modified: stable/10/sys/amd64/include/vmm.h ============================================================================== --- stable/10/sys/amd64/include/vmm.h Mon Feb 1 14:28:58 2016 (r295123) +++ stable/10/sys/amd64/include/vmm.h Mon Feb 1 14:56:11 2016 (r295124) @@ -108,7 +108,6 @@ enum x2apic_state { struct vm; struct vm_exception; -struct vm_memory_segment; struct seg_desc; struct vm_exit; struct vm_run; @@ -175,17 +174,33 @@ int vm_create(const char *name, struct v void vm_destroy(struct vm *vm); int vm_reinit(struct vm *vm); const char *vm_name(struct vm *vm); -int vm_malloc(struct vm *vm, vm_paddr_t gpa, size_t len); + +/* + * APIs that modify the guest memory map require all vcpus to be frozen. + */ +int vm_mmap_memseg(struct vm *vm, vm_paddr_t gpa, int segid, vm_ooffset_t off, + size_t len, int prot, int flags); +int vm_alloc_memseg(struct vm *vm, int ident, size_t len, bool sysmem); +void vm_free_memseg(struct vm *vm, int ident); int vm_map_mmio(struct vm *vm, vm_paddr_t gpa, size_t len, vm_paddr_t hpa); int vm_unmap_mmio(struct vm *vm, vm_paddr_t gpa, size_t len); -void *vm_gpa_hold(struct vm *, vm_paddr_t gpa, size_t len, int prot, - void **cookie); +int vm_assign_pptdev(struct vm *vm, int bus, int slot, int func); +int vm_unassign_pptdev(struct vm *vm, int bus, int slot, int func); + +/* + * APIs that inspect the guest memory map require only a *single* vcpu to + * be frozen. This acts like a read lock on the guest memory map since any + * modification requires *all* vcpus to be frozen. + */ +int vm_mmap_getnext(struct vm *vm, vm_paddr_t *gpa, int *segid, + vm_ooffset_t *segoff, size_t *len, int *prot, int *flags); +int vm_get_memseg(struct vm *vm, int ident, size_t *len, bool *sysmem, + struct vm_object **objptr); +void *vm_gpa_hold(struct vm *, int vcpuid, vm_paddr_t gpa, size_t len, + int prot, void **cookie); void vm_gpa_release(void *cookie); -int vm_gpabase2memseg(struct vm *vm, vm_paddr_t gpabase, - struct vm_memory_segment *seg); -int vm_get_memobj(struct vm *vm, vm_paddr_t gpa, size_t len, - vm_offset_t *offset, struct vm_object **object); -boolean_t vm_mem_allocated(struct vm *vm, vm_paddr_t gpa); +bool vm_mem_allocated(struct vm *vm, int vcpuid, vm_paddr_t gpa); + int vm_get_register(struct vm *vm, int vcpu, int reg, uint64_t *retval); int vm_set_register(struct vm *vm, int vcpu, int reg, uint64_t val); int vm_get_seg_desc(struct vm *vm, int vcpu, int reg, @@ -302,8 +317,6 @@ vcpu_should_yield(struct vm *vm, int vcp void *vcpu_stats(struct vm *vm, int vcpu); void vcpu_notify_event(struct vm *vm, int vcpuid, bool lapic_intr); struct vmspace *vm_get_vmspace(struct vm *vm); -int vm_assign_pptdev(struct vm *vm, int bus, int slot, int func); -int vm_unassign_pptdev(struct vm *vm, int bus, int slot, int func); struct vatpic *vm_atpic(struct vm *vm); struct vatpit *vm_atpit(struct vm *vm); struct vpmtmr *vm_pmtmr(struct vm *vm); Modified: stable/10/sys/amd64/include/vmm_dev.h ============================================================================== --- stable/10/sys/amd64/include/vmm_dev.h Mon Feb 1 14:28:58 2016 (r295123) +++ stable/10/sys/amd64/include/vmm_dev.h Mon Feb 1 14:56:11 2016 (r295124) @@ -34,10 +34,22 @@ void vmmdev_init(void); int vmmdev_cleanup(void); #endif -struct vm_memory_segment { - vm_paddr_t gpa; /* in */ +struct vm_memmap { + vm_paddr_t gpa; + int segid; /* memory segment */ + vm_ooffset_t segoff; /* offset into memory segment */ + size_t len; /* mmap length */ + int prot; /* RWX */ + int flags; +}; +#define VM_MEMMAP_F_WIRED 0x01 +#define VM_MEMMAP_F_IOMMU 0x02 + +#define VM_MEMSEG_NAME(m) ((m)->name[0] != '\0' ? (m)->name : NULL) +struct vm_memseg { + int segid; size_t len; - int wired; + char name[SPECNAMELEN + 1]; }; struct vm_register { @@ -214,10 +226,14 @@ enum { IOCNUM_REINIT = 5, /* memory apis */ - IOCNUM_MAP_MEMORY = 10, - IOCNUM_GET_MEMORY_SEG = 11, + IOCNUM_MAP_MEMORY = 10, /* deprecated */ + IOCNUM_GET_MEMORY_SEG = 11, /* deprecated */ IOCNUM_GET_GPA_PMAP = 12, IOCNUM_GLA2GPA = 13, + IOCNUM_ALLOC_MEMSEG = 14, + IOCNUM_GET_MEMSEG = 15, + IOCNUM_MMAP_MEMSEG = 16, + IOCNUM_MMAP_GETNEXT = 17, /* register/state accessors */ IOCNUM_SET_REGISTER = 20, @@ -278,10 +294,14 @@ enum { _IOW('v', IOCNUM_SUSPEND, struct vm_suspend) #define VM_REINIT \ _IO('v', IOCNUM_REINIT) -#define VM_MAP_MEMORY \ - _IOWR('v', IOCNUM_MAP_MEMORY, struct vm_memory_segment) -#define VM_GET_MEMORY_SEG \ - _IOWR('v', IOCNUM_GET_MEMORY_SEG, struct vm_memory_segment) +#define VM_ALLOC_MEMSEG \ + _IOW('v', IOCNUM_ALLOC_MEMSEG, struct vm_memseg) +#define VM_GET_MEMSEG \ + _IOWR('v', IOCNUM_GET_MEMSEG, struct vm_memseg) +#define VM_MMAP_MEMSEG \ + _IOW('v', IOCNUM_MMAP_MEMSEG, struct vm_memmap) +#define VM_MMAP_GETNEXT \ + _IOWR('v', IOCNUM_MMAP_GETNEXT, struct vm_memmap) #define VM_SET_REGISTER \ _IOW('v', IOCNUM_SET_REGISTER, struct vm_register) #define VM_GET_REGISTER \ Modified: stable/10/sys/amd64/vmm/amd/svm.c ============================================================================== --- stable/10/sys/amd64/vmm/amd/svm.c Mon Feb 1 14:28:58 2016 (r295123) +++ stable/10/sys/amd64/vmm/amd/svm.c Mon Feb 1 14:56:11 2016 (r295124) @@ -1477,7 +1477,7 @@ svm_vmexit(struct svm_softc *svm_sc, int VCPU_CTR2(svm_sc->vm, vcpu, "nested page fault with " "reserved bits set: info1(%#lx) info2(%#lx)", info1, info2); - } else if (vm_mem_allocated(svm_sc->vm, info2)) { + } else if (vm_mem_allocated(svm_sc->vm, vcpu, info2)) { vmexit->exitcode = VM_EXITCODE_PAGING; vmexit->u.paging.gpa = info2; vmexit->u.paging.fault_type = npf_fault_type(info1); Modified: stable/10/sys/amd64/vmm/intel/vmx.c ============================================================================== --- stable/10/sys/amd64/vmm/intel/vmx.c Mon Feb 1 14:28:58 2016 (r295123) +++ stable/10/sys/amd64/vmm/intel/vmx.c Mon Feb 1 14:56:11 2016 (r295124) @@ -2426,7 +2426,7 @@ vmx_exit_process(struct vmx *vmx, int vc * this must be an instruction that accesses MMIO space. */ gpa = vmcs_gpa(); - if (vm_mem_allocated(vmx->vm, gpa) || + if (vm_mem_allocated(vmx->vm, vcpu, gpa) || apic_access_fault(vmx, vcpu, gpa)) { vmexit->exitcode = VM_EXITCODE_PAGING; vmexit->inst_length = 0; Modified: stable/10/sys/amd64/vmm/io/ppt.c ============================================================================== --- stable/10/sys/amd64/vmm/io/ppt.c Mon Feb 1 14:28:58 2016 (r295123) +++ stable/10/sys/amd64/vmm/io/ppt.c Mon Feb 1 14:56:11 2016 (r295124) @@ -76,11 +76,17 @@ struct pptintr_arg { /* pptintr(pptin uint64_t msg_data; }; +struct pptseg { + vm_paddr_t gpa; + size_t len; + int wired; +}; + struct pptdev { device_t dev; struct vm *vm; /* owner of this device */ TAILQ_ENTRY(pptdev) next; - struct vm_memory_segment mmio[MAX_MMIOSEGS]; + struct pptseg mmio[MAX_MMIOSEGS]; struct { int num_msgs; /* guest state */ @@ -207,14 +213,14 @@ static void ppt_unmap_mmio(struct vm *vm, struct pptdev *ppt) { int i; - struct vm_memory_segment *seg; + struct pptseg *seg; for (i = 0; i < MAX_MMIOSEGS; i++) { seg = &ppt->mmio[i]; if (seg->len == 0) continue; (void)vm_unmap_mmio(vm, seg->gpa, seg->len); - bzero(seg, sizeof(struct vm_memory_segment)); + bzero(seg, sizeof(struct pptseg)); } } @@ -324,7 +330,7 @@ ppt_is_mmio(struct vm *vm, vm_paddr_t gp { int i; struct pptdev *ppt; - struct vm_memory_segment *seg; + struct pptseg *seg; TAILQ_FOREACH(ppt, &pptdev_list, next) { if (ppt->vm != vm) @@ -410,7 +416,7 @@ ppt_map_mmio(struct vm *vm, int bus, int vm_paddr_t gpa, size_t len, vm_paddr_t hpa) { int i, error; - struct vm_memory_segment *seg; + struct pptseg *seg; struct pptdev *ppt; ppt = ppt_find(bus, slot, func); Modified: stable/10/sys/amd64/vmm/vmm.c ============================================================================== --- stable/10/sys/amd64/vmm/vmm.c Mon Feb 1 14:28:58 2016 (r295123) +++ stable/10/sys/amd64/vmm/vmm.c Mon Feb 1 14:56:11 2016 (r295124) @@ -120,12 +120,21 @@ struct vcpu { #define vcpu_assert_locked(v) mtx_assert(&((v)->mtx), MA_OWNED) struct mem_seg { + size_t len; + bool sysmem; + struct vm_object *object; +}; +#define VM_MAX_MEMSEGS 2 + +struct mem_map { vm_paddr_t gpa; size_t len; - boolean_t wired; - vm_object_t object; + vm_ooffset_t segoff; + int segid; + int prot; + int flags; }; -#define VM_MAX_MEMORY_SEGMENTS 2 +#define VM_MAX_MEMMAPS 4 /* * Initialization: @@ -151,8 +160,8 @@ struct vm { void *rendezvous_arg; /* (x) rendezvous func/arg */ vm_rendezvous_func_t rendezvous_func; struct mtx rendezvous_mtx; /* (o) rendezvous lock */ - int num_mem_segs; /* (o) guest memory segments */ - struct mem_seg mem_segs[VM_MAX_MEMORY_SEGMENTS]; + struct mem_map mem_maps[VM_MAX_MEMMAPS]; /* (i) guest address space */ + struct mem_seg mem_segs[VM_MAX_MEMSEGS]; /* (o) guest memory regions */ struct vmspace *vmspace; /* (o) guest's address space */ char name[VM_MAX_NAMELEN]; /* (o) virtual machine name */ struct vcpu vcpu[VM_MAXCPU]; /* (i) guest vcpus */ @@ -224,6 +233,8 @@ TUNABLE_INT("hw.vmm.force_iommu", &vmm_f SYSCTL_INT(_hw_vmm, OID_AUTO, force_iommu, CTLFLAG_RDTUN, &vmm_force_iommu, 0, "Force use of I/O MMU even if no passthrough devices were found."); +static void vm_free_memmap(struct vm *vm, int ident); +static bool sysmem_mapping(struct vm *vm, struct mem_map *mm); static void vcpu_notify_event_locked(struct vcpu *vcpu, bool lapic_intr); #ifdef KTR @@ -444,7 +455,6 @@ vm_create(const char *name, struct vm ** vm = malloc(sizeof(struct vm), M_VM, M_WAITOK | M_ZERO); strcpy(vm->name, name); - vm->num_mem_segs = 0; vm->vmspace = vmspace; mtx_init(&vm->rendezvous_mtx, "vm rendezvous lock", 0, MTX_DEF); @@ -455,18 +465,9 @@ vm_create(const char *name, struct vm ** } static void -vm_free_mem_seg(struct vm *vm, struct mem_seg *seg) -{ - - if (seg->object != NULL) - vmm_mem_free(vm->vmspace, seg->gpa, seg->len); - - bzero(seg, sizeof(*seg)); -} - -static void vm_cleanup(struct vm *vm, bool destroy) { + struct mem_map *mm; int i; ppt_unassign_all(vm); @@ -489,11 +490,23 @@ vm_cleanup(struct vm *vm, bool destroy) VMCLEANUP(vm->cookie); - if (destroy) { - for (i = 0; i < vm->num_mem_segs; i++) - vm_free_mem_seg(vm, &vm->mem_segs[i]); + /* + * System memory is removed from the guest address space only when + * the VM is destroyed. This is because the mapping remains the same + * across VM reset. + * + * Device memory can be relocated by the guest (e.g. using PCI BARs) + * so those mappings are removed on a VM reset. + */ + for (i = 0; i < VM_MAX_MEMMAPS; i++) { + mm = &vm->mem_maps[i]; + if (destroy || !sysmem_mapping(vm, mm)) + vm_free_memmap(vm, i); + } - vm->num_mem_segs = 0; + if (destroy) { + for (i = 0; i < VM_MAX_MEMSEGS; i++) + vm_free_memseg(vm, i); VMSPACE_FREE(vm->vmspace); vm->vmspace = NULL; @@ -551,146 +564,243 @@ vm_unmap_mmio(struct vm *vm, vm_paddr_t return (0); } -boolean_t -vm_mem_allocated(struct vm *vm, vm_paddr_t gpa) +/* + * Return 'true' if 'gpa' is allocated in the guest address space. + * + * This function is called in the context of a running vcpu which acts as + * an implicit lock on 'vm->mem_maps[]'. + */ +bool +vm_mem_allocated(struct vm *vm, int vcpuid, vm_paddr_t gpa) { + struct mem_map *mm; int i; - vm_paddr_t gpabase, gpalimit; - for (i = 0; i < vm->num_mem_segs; i++) { - gpabase = vm->mem_segs[i].gpa; - gpalimit = gpabase + vm->mem_segs[i].len; - if (gpa >= gpabase && gpa < gpalimit) - return (TRUE); /* 'gpa' is regular memory */ +#ifdef INVARIANTS + int hostcpu, state; + state = vcpu_get_state(vm, vcpuid, &hostcpu); + KASSERT(state == VCPU_RUNNING && hostcpu == curcpu, + ("%s: invalid vcpu state %d/%d", __func__, state, hostcpu)); +#endif + + for (i = 0; i < VM_MAX_MEMMAPS; i++) { + mm = &vm->mem_maps[i]; + if (mm->len != 0 && gpa >= mm->gpa && gpa < mm->gpa + mm->len) + return (true); /* 'gpa' is sysmem or devmem */ } if (ppt_is_mmio(vm, gpa)) - return (TRUE); /* 'gpa' is pci passthru mmio */ + return (true); /* 'gpa' is pci passthru mmio */ - return (FALSE); + return (false); } int -vm_malloc(struct vm *vm, vm_paddr_t gpa, size_t len) +vm_alloc_memseg(struct vm *vm, int ident, size_t len, bool sysmem) { - int available, allocated; struct mem_seg *seg; - vm_object_t object; - vm_paddr_t g; + vm_object_t obj; - if ((gpa & PAGE_MASK) || (len & PAGE_MASK) || len == 0) + if (ident < 0 || ident >= VM_MAX_MEMSEGS) return (EINVAL); - - available = allocated = 0; - g = gpa; - while (g < gpa + len) { - if (vm_mem_allocated(vm, g)) - allocated++; - else - available++; - g += PAGE_SIZE; - } - - /* - * If there are some allocated and some available pages in the address - * range then it is an error. - */ - if (allocated && available) + if (len == 0 || (len & PAGE_MASK)) return (EINVAL); - /* - * If the entire address range being requested has already been - * allocated then there isn't anything more to do. - */ - if (allocated && available == 0) - return (0); - - if (vm->num_mem_segs >= VM_MAX_MEMORY_SEGMENTS) - return (E2BIG); - - seg = &vm->mem_segs[vm->num_mem_segs]; + seg = &vm->mem_segs[ident]; + if (seg->object != NULL) { + if (seg->len == len && seg->sysmem == sysmem) + return (EEXIST); + else + return (EINVAL); + } - if ((object = vmm_mem_alloc(vm->vmspace, gpa, len)) == NULL) + obj = vm_object_allocate(OBJT_DEFAULT, len >> PAGE_SHIFT); + if (obj == NULL) return (ENOMEM); - seg->gpa = gpa; seg->len = len; - seg->object = object; - seg->wired = FALSE; + seg->object = obj; + seg->sysmem = sysmem; + return (0); +} - vm->num_mem_segs++; +int +vm_get_memseg(struct vm *vm, int ident, size_t *len, bool *sysmem, + vm_object_t *objptr) +{ + struct mem_seg *seg; + + if (ident < 0 || ident >= VM_MAX_MEMSEGS) + return (EINVAL); + seg = &vm->mem_segs[ident]; + if (len) + *len = seg->len; + if (sysmem) + *sysmem = seg->sysmem; + if (objptr) + *objptr = seg->object; return (0); } -static vm_paddr_t -vm_maxmem(struct vm *vm) +void +vm_free_memseg(struct vm *vm, int ident) { - int i; - vm_paddr_t gpa, maxmem; + struct mem_seg *seg; - maxmem = 0; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-10@freebsd.org Mon Feb 1 18:16:44 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60812A9778D; Mon, 1 Feb 2016 18:16:44 +0000 (UTC) (envelope-from lists@yamagi.org) Received: from mail1.yamagi.org (yugo.yamagi.org [212.48.122.103]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F363A1242; Mon, 1 Feb 2016 18:16:43 +0000 (UTC) (envelope-from lists@yamagi.org) Received: from p5485a317.dip0.t-ipconnect.de ([84.133.163.23] helo=kosei.home.yamagi.org.dhcp.yamagi.org) by mail1.yamagi.org with esmtpsa (TLSv1:ECDHE-RSA-AES256-SHA:256) (Exim 4.86 (FreeBSD)) (envelope-from ) id 1aQJ1Z-000AQM-NN; Mon, 01 Feb 2016 19:16:32 +0100 Date: Mon, 1 Feb 2016 19:16:24 +0100 From: Yamagi Burmeister To: grehan@FreeBSD.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r295124 - in stable/10: lib/libvmmapi share/examples/bhyve sys/amd64/include sys/amd64/vmm sys/amd64/vmm/amd sys/amd64/vmm/intel sys/amd64/vmm/io sys/sys usr.sbin/bhyve usr.sbin/bhyvect... Message-Id: <20160201191624.ade2d7a19f6eb7921603133c@yamagi.org> In-Reply-To: <201602011456.u11EuBDE016423@repo.freebsd.org> References: <201602011456.u11EuBDE016423@repo.freebsd.org> X-Mailer: Sylpheed 3.4.3 (GTK+ 2.24.29; x86_64-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2016 18:16:44 -0000 And huge thanks to you for committing this. On Mon, 1 Feb 2016 14:56:11 +0000 (UTC) Peter Grehan wrote: > Author: grehan > Date: Mon Feb 1 14:56:11 2016 > New Revision: 295124 > URL: https://svnweb.freebsd.org/changeset/base/295124 > > Log: > MFC r284539, r284630, r284688, r284877, r285217, r285218, > r286837, r286838, r288470, r288522, r288524, r288826, > r289001 > > Pull in bhyve bug fixes and changes to allow UEFI booting. > This provides Windows support. > > Tested on Intel and AMD with: > - Arch Linux i386+amd64 (kernel 4.3.3) > - Ubuntu 15.10 server 64-bit > - FreeBSD-CURRENT/amd64 20160127 snap > - FreeBSD 10.2 i386+amd64 > - OpenBSD 5.8 i386+amd64 > - SmartOS latest > - Windows 10 build 1511' > > Huge thanks to Yamagi Burmeister who submitted the patch > and did the majority of the testing. > > r284539 - bootrom mem allocation support > r284630 - Add SO_REUSEADDR when starting debug port > r284688 - Fix a regression in "movs" emulation > r284877 - verify_gla() non-zero segment base fix > r285217 - Always assert DCD and DSR in the uart > r285218 - devmem nodes moved to /dev/vmm.io/ > r286837 - Add define for SATA Check-Power-Mode > r286838 - Add simple (no-op) SATA cmd emulations > r288470 - Increase virtio-blk indirect descs > r288522 - Firmware guest query interface > r288524 - Fix post-test typo > r288826 - Clean up SATA unimplemented cmd msg > r289001 - Add -l option to specify userboot path > > Submitted by: Yamagi Burmeister > Approved by: re (kib) > > Added: > stable/10/usr.sbin/bhyve/bootrom.c > - copied unchanged from r284539, head/usr.sbin/bhyve/bootrom.c > stable/10/usr.sbin/bhyve/bootrom.h > - copied unchanged from r284539, head/usr.sbin/bhyve/bootrom.h > stable/10/usr.sbin/bhyve/fwctl.c > - copied, changed from r288522, head/usr.sbin/bhyve/fwctl.c > stable/10/usr.sbin/bhyve/fwctl.h > - copied unchanged from r288522, head/usr.sbin/bhyve/fwctl.h > Modified: > stable/10/lib/libvmmapi/vmmapi.c > stable/10/lib/libvmmapi/vmmapi.h > stable/10/share/examples/bhyve/vmrun.sh > stable/10/sys/amd64/include/vmm.h > stable/10/sys/amd64/include/vmm_dev.h > stable/10/sys/amd64/vmm/amd/svm.c > stable/10/sys/amd64/vmm/intel/vmx.c > stable/10/sys/amd64/vmm/io/ppt.c > stable/10/sys/amd64/vmm/vmm.c > stable/10/sys/amd64/vmm/vmm_dev.c > stable/10/sys/amd64/vmm/vmm_instruction_emul.c > stable/10/sys/amd64/vmm/vmm_mem.c > stable/10/sys/amd64/vmm/vmm_mem.h > stable/10/sys/sys/ata.h > stable/10/usr.sbin/bhyve/Makefile > stable/10/usr.sbin/bhyve/bhyve.8 > stable/10/usr.sbin/bhyve/bhyverun.c > stable/10/usr.sbin/bhyve/dbgport.c > stable/10/usr.sbin/bhyve/pci_ahci.c > stable/10/usr.sbin/bhyve/pci_lpc.c > stable/10/usr.sbin/bhyve/pci_lpc.h > stable/10/usr.sbin/bhyve/pci_passthru.c > stable/10/usr.sbin/bhyve/pci_virtio_net.c > stable/10/usr.sbin/bhyve/uart_emul.c > stable/10/usr.sbin/bhyvectl/bhyvectl.c > stable/10/usr.sbin/bhyveload/bhyveload.8 > stable/10/usr.sbin/bhyveload/bhyveload.c > Directory Properties: > stable/10/ (props changed) > > Modified: stable/10/lib/libvmmapi/vmmapi.c > ============================================================================== > --- stable/10/lib/libvmmapi/vmmapi.c Mon Feb 1 14:28:58 2016 (r295123) > +++ stable/10/lib/libvmmapi/vmmapi.c Mon Feb 1 14:56:11 2016 (r295124) > @@ -58,15 +58,23 @@ __FBSDID("$FreeBSD$"); > #define MB (1024 * 1024UL) > #define GB (1024 * 1024 * 1024UL) > > +/* > + * Size of the guard region before and after the virtual address space > + * mapping the guest physical memory. This must be a multiple of the > + * superpage size for performance reasons. > + */ > +#define VM_MMAP_GUARD_SIZE (4 * MB) > + > +#define PROT_RW (PROT_READ | PROT_WRITE) > +#define PROT_ALL (PROT_READ | PROT_WRITE | PROT_EXEC) > + > struct vmctx { > int fd; > uint32_t lowmem_limit; > - enum vm_mmap_style vms; > int memflags; > size_t lowmem; > - char *lowmem_addr; > size_t highmem; > - char *highmem_addr; > + char *baseaddr; > char *name; > }; > > @@ -157,22 +165,6 @@ vm_parse_memsize(const char *optarg, siz > return (error); > } > > -int > -vm_get_memory_seg(struct vmctx *ctx, vm_paddr_t gpa, size_t *ret_len, > - int *wired) > -{ > - int error; > - struct vm_memory_segment seg; > - > - bzero(&seg, sizeof(seg)); > - seg.gpa = gpa; > - error = ioctl(ctx->fd, VM_GET_MEMORY_SEG, &seg); > - *ret_len = seg.len; > - if (wired != NULL) > - *wired = seg.wired; > - return (error); > -} > - > uint32_t > vm_get_lowmem_limit(struct vmctx *ctx) > { > @@ -194,39 +186,184 @@ vm_set_memflags(struct vmctx *ctx, int f > ctx->memflags = flags; > } > > +int > +vm_get_memflags(struct vmctx *ctx) > +{ > + > + return (ctx->memflags); > +} > + > +/* > + * Map segment 'segid' starting at 'off' into guest address range [gpa,gpa+len). > + */ > +int > +vm_mmap_memseg(struct vmctx *ctx, vm_paddr_t gpa, int segid, vm_ooffset_t off, > + size_t len, int prot) > +{ > + struct vm_memmap memmap; > + int error, flags; > + > + memmap.gpa = gpa; > + memmap.segid = segid; > + memmap.segoff = off; > + memmap.len = len; > + memmap.prot = prot; > + memmap.flags = 0; > + > + if (ctx->memflags & VM_MEM_F_WIRED) > + memmap.flags |= VM_MEMMAP_F_WIRED; > + > + /* > + * If this mapping already exists then don't create it again. This > + * is the common case for SYSMEM mappings created by bhyveload(8). > + */ > + error = vm_mmap_getnext(ctx, &gpa, &segid, &off, &len, &prot, &flags); > + if (error == 0 && gpa == memmap.gpa) { > + if (segid != memmap.segid || off != memmap.segoff || > + prot != memmap.prot || flags != memmap.flags) { > + errno = EEXIST; > + return (-1); > + } else { > + return (0); > + } > + } > + > + error = ioctl(ctx->fd, VM_MMAP_MEMSEG, &memmap); > + return (error); > +} > + > +int > +vm_mmap_getnext(struct vmctx *ctx, vm_paddr_t *gpa, int *segid, > + vm_ooffset_t *segoff, size_t *len, int *prot, int *flags) > +{ > + struct vm_memmap memmap; > + int error; > + > + bzero(&memmap, sizeof(struct vm_memmap)); > + memmap.gpa = *gpa; > + error = ioctl(ctx->fd, VM_MMAP_GETNEXT, &memmap); > + if (error == 0) { > + *gpa = memmap.gpa; > + *segid = memmap.segid; > + *segoff = memmap.segoff; > + *len = memmap.len; > + *prot = memmap.prot; > + *flags = memmap.flags; > + } > + return (error); > +} > + > +/* > + * Return 0 if the segments are identical and non-zero otherwise. > + * > + * This is slightly complicated by the fact that only device memory segments > + * are named. > + */ > static int > -setup_memory_segment(struct vmctx *ctx, vm_paddr_t gpa, size_t len, char **addr) > +cmpseg(size_t len, const char *str, size_t len2, const char *str2) > { > - int error, mmap_flags; > - struct vm_memory_segment seg; > + > + if (len == len2) { > + if ((!str && !str2) || (str && str2 && !strcmp(str, str2))) > + return (0); > + } > + return (-1); > +} > + > +static int > +vm_alloc_memseg(struct vmctx *ctx, int segid, size_t len, const char *name) > +{ > + struct vm_memseg memseg; > + size_t n; > + int error; > > /* > - * Create and optionally map 'len' bytes of memory at guest > - * physical address 'gpa' > + * If the memory segment has already been created then just return. > + * This is the usual case for the SYSMEM segment created by userspace > + * loaders like bhyveload(8). > */ > - bzero(&seg, sizeof(seg)); > - seg.gpa = gpa; > - seg.len = len; > - error = ioctl(ctx->fd, VM_MAP_MEMORY, &seg); > - if (error == 0 && addr != NULL) { > - mmap_flags = MAP_SHARED; > - if ((ctx->memflags & VM_MEM_F_INCORE) == 0) > - mmap_flags |= MAP_NOCORE; > - *addr = mmap(NULL, len, PROT_READ | PROT_WRITE, mmap_flags, > - ctx->fd, gpa); > + error = vm_get_memseg(ctx, segid, &memseg.len, memseg.name, > + sizeof(memseg.name)); > + if (error) > + return (error); > + > + if (memseg.len != 0) { > + if (cmpseg(len, name, memseg.len, VM_MEMSEG_NAME(&memseg))) { > + errno = EINVAL; > + return (-1); > + } else { > + return (0); > + } > + } > + > + bzero(&memseg, sizeof(struct vm_memseg)); > + memseg.segid = segid; > + memseg.len = len; > + if (name != NULL) { > + n = strlcpy(memseg.name, name, sizeof(memseg.name)); > + if (n >= sizeof(memseg.name)) { > + errno = ENAMETOOLONG; > + return (-1); > + } > + } > + > + error = ioctl(ctx->fd, VM_ALLOC_MEMSEG, &memseg); > + return (error); > +} > + > +int > +vm_get_memseg(struct vmctx *ctx, int segid, size_t *lenp, char *namebuf, > + size_t bufsize) > +{ > + struct vm_memseg memseg; > + size_t n; > + int error; > + > + memseg.segid = segid; > + error = ioctl(ctx->fd, VM_GET_MEMSEG, &memseg); > + if (error == 0) { > + *lenp = memseg.len; > + n = strlcpy(namebuf, memseg.name, bufsize); > + if (n >= bufsize) { > + errno = ENAMETOOLONG; > + error = -1; > + } > } > return (error); > } > > +static int > +setup_memory_segment(struct vmctx *ctx, vm_paddr_t gpa, size_t len, char *base) > +{ > + char *ptr; > + int error, flags; > + > + /* Map 'len' bytes starting at 'gpa' in the guest address space */ > + error = vm_mmap_memseg(ctx, gpa, VM_SYSMEM, gpa, len, PROT_ALL); > + if (error) > + return (error); > + > + flags = MAP_SHARED | MAP_FIXED; > + if ((ctx->memflags & VM_MEM_F_INCORE) == 0) > + flags |= MAP_NOCORE; > + > + /* mmap into the process address space on the host */ > + ptr = mmap(base + gpa, len, PROT_RW, flags, ctx->fd, gpa); > + if (ptr == MAP_FAILED) > + return (-1); > + > + return (0); > +} > + > int > vm_setup_memory(struct vmctx *ctx, size_t memsize, enum vm_mmap_style vms) > { > - char **addr; > - int error; > + size_t objsize, len; > + vm_paddr_t gpa; > + char *baseaddr, *ptr; > + int error, flags; > > - /* XXX VM_MMAP_SPARSE not implemented yet */ > - assert(vms == VM_MMAP_NONE || vms == VM_MMAP_ALL); > - ctx->vms = vms; > + assert(vms == VM_MMAP_ALL); > > /* > * If 'memsize' cannot fit entirely in the 'lowmem' segment then > @@ -234,43 +371,69 @@ vm_setup_memory(struct vmctx *ctx, size_ > */ > if (memsize > ctx->lowmem_limit) { > ctx->lowmem = ctx->lowmem_limit; > - ctx->highmem = memsize - ctx->lowmem; > + ctx->highmem = memsize - ctx->lowmem_limit; > + objsize = 4*GB + ctx->highmem; > } else { > ctx->lowmem = memsize; > ctx->highmem = 0; > + objsize = ctx->lowmem; > } > > - if (ctx->lowmem > 0) { > - addr = (vms == VM_MMAP_ALL) ? &ctx->lowmem_addr : NULL; > - error = setup_memory_segment(ctx, 0, ctx->lowmem, addr); > + error = vm_alloc_memseg(ctx, VM_SYSMEM, objsize, NULL); > + if (error) > + return (error); > + > + /* > + * Stake out a contiguous region covering the guest physical memory > + * and the adjoining guard regions. > + */ > + len = VM_MMAP_GUARD_SIZE + objsize + VM_MMAP_GUARD_SIZE; > + flags = MAP_PRIVATE | MAP_ANON | MAP_NOCORE | MAP_ALIGNED_SUPER; > + ptr = mmap(NULL, len, PROT_NONE, flags, -1, 0); > + if (ptr == MAP_FAILED) > + return (-1); > + > + baseaddr = ptr + VM_MMAP_GUARD_SIZE; > + if (ctx->highmem > 0) { > + gpa = 4*GB; > + len = ctx->highmem; > + error = setup_memory_segment(ctx, gpa, len, baseaddr); > if (error) > return (error); > } > > - if (ctx->highmem > 0) { > - addr = (vms == VM_MMAP_ALL) ? &ctx->highmem_addr : NULL; > - error = setup_memory_segment(ctx, 4*GB, ctx->highmem, addr); > + if (ctx->lowmem > 0) { > + gpa = 0; > + len = ctx->lowmem; > + error = setup_memory_segment(ctx, gpa, len, baseaddr); > if (error) > return (error); > } > > + ctx->baseaddr = baseaddr; > + > return (0); > } > > +/* > + * Returns a non-NULL pointer if [gaddr, gaddr+len) is entirely contained in > + * the lowmem or highmem regions. > + * > + * In particular return NULL if [gaddr, gaddr+len) falls in guest MMIO region. > + * The instruction emulation code depends on this behavior. > + */ > void * > vm_map_gpa(struct vmctx *ctx, vm_paddr_t gaddr, size_t len) > { > > - /* XXX VM_MMAP_SPARSE not implemented yet */ > - assert(ctx->vms == VM_MMAP_ALL); > - > - if (gaddr < ctx->lowmem && gaddr + len <= ctx->lowmem) > - return ((void *)(ctx->lowmem_addr + gaddr)); > + if (ctx->lowmem > 0) { > + if (gaddr < ctx->lowmem && gaddr + len <= ctx->lowmem) > + return (ctx->baseaddr + gaddr); > + } > > - if (gaddr >= 4*GB) { > - gaddr -= 4*GB; > - if (gaddr < ctx->highmem && gaddr + len <= ctx->highmem) > - return ((void *)(ctx->highmem_addr + gaddr)); > + if (ctx->highmem > 0) { > + if (gaddr >= 4*GB && gaddr + len <= 4*GB + ctx->highmem) > + return (ctx->baseaddr + gaddr); > } > > return (NULL); > @@ -290,6 +453,56 @@ vm_get_highmem_size(struct vmctx *ctx) > return (ctx->highmem); > } > > +void * > +vm_create_devmem(struct vmctx *ctx, int segid, const char *name, size_t len) > +{ > + char pathname[MAXPATHLEN]; > + size_t len2; > + char *base, *ptr; > + int fd, error, flags; > + > + fd = -1; > + ptr = MAP_FAILED; > + if (name == NULL || strlen(name) == 0) { > + errno = EINVAL; > + goto done; > + } > + > + error = vm_alloc_memseg(ctx, segid, len, name); > + if (error) > + goto done; > + > + strlcpy(pathname, "/dev/vmm.io/", sizeof(pathname)); > + strlcat(pathname, ctx->name, sizeof(pathname)); > + strlcat(pathname, ".", sizeof(pathname)); > + strlcat(pathname, name, sizeof(pathname)); > + > + fd = open(pathname, O_RDWR); > + if (fd < 0) > + goto done; > + > + /* > + * Stake out a contiguous region covering the device memory and the > + * adjoining guard regions. > + */ > + len2 = VM_MMAP_GUARD_SIZE + len + VM_MMAP_GUARD_SIZE; > + flags = MAP_PRIVATE | MAP_ANON | MAP_NOCORE | MAP_ALIGNED_SUPER; > + base = mmap(NULL, len2, PROT_NONE, flags, -1, 0); > + if (base == MAP_FAILED) > + goto done; > + > + flags = MAP_SHARED | MAP_FIXED; > + if ((ctx->memflags & VM_MEM_F_INCORE) == 0) > + flags |= MAP_NOCORE; > + > + /* mmap the devmem region in the host address space */ > + ptr = mmap(base + VM_MMAP_GUARD_SIZE, len, PROT_RW, flags, fd, 0); > +done: > + if (fd >= 0) > + close(fd); > + return (ptr); > +} > + > int > vm_set_desc(struct vmctx *ctx, int vcpu, int reg, > uint64_t base, uint32_t limit, uint32_t access) > > Modified: stable/10/lib/libvmmapi/vmmapi.h > ============================================================================== > --- stable/10/lib/libvmmapi/vmmapi.h Mon Feb 1 14:28:58 2016 (r295123) > +++ stable/10/lib/libvmmapi/vmmapi.h Mon Feb 1 14:56:11 2016 (r295124) > @@ -36,7 +36,7 @@ > * API version for out-of-tree consumers like grub-bhyve for making compile > * time decisions. > */ > -#define VMMAPI_VERSION 0101 /* 2 digit major followed by 2 digit minor */ > +#define VMMAPI_VERSION 0102 /* 2 digit major followed by 2 digit minor */ > > struct iovec; > struct vmctx; > @@ -52,14 +52,59 @@ enum vm_mmap_style { > VM_MMAP_SPARSE, /* mappings created on-demand */ > }; > > +/* > + * 'flags' value passed to 'vm_set_memflags()'. > + */ > #define VM_MEM_F_INCORE 0x01 /* include guest memory in core file */ > +#define VM_MEM_F_WIRED 0x02 /* guest memory is wired */ > + > +/* > + * Identifiers for memory segments: > + * - vm_setup_memory() uses VM_SYSMEM for the system memory segment. > + * - the remaining identifiers can be used to create devmem segments. > + */ > +enum { > + VM_SYSMEM, > + VM_BOOTROM, > + VM_FRAMEBUFFER, > +}; > + > +/* > + * Get the length and name of the memory segment identified by 'segid'. > + * Note that system memory segments are identified with a nul name. > + * > + * Returns 0 on success and non-zero otherwise. > + */ > +int vm_get_memseg(struct vmctx *ctx, int ident, size_t *lenp, char *name, > + size_t namesiz); > + > +/* > + * Iterate over the guest address space. This function finds an address range > + * that starts at an address >= *gpa. > + * > + * Returns 0 if the next address range was found and non-zero otherwise. > + */ > +int vm_mmap_getnext(struct vmctx *ctx, vm_paddr_t *gpa, int *segid, > + vm_ooffset_t *segoff, size_t *len, int *prot, int *flags); > +/* > + * Create a device memory segment identified by 'segid'. > + * > + * Returns a pointer to the memory segment on success and MAP_FAILED otherwise. > + */ > +void *vm_create_devmem(struct vmctx *ctx, int segid, const char *name, > + size_t len); > + > +/* > + * Map the memory segment identified by 'segid' into the guest address space > + * at [gpa,gpa+len) with protection 'prot'. > + */ > +int vm_mmap_memseg(struct vmctx *ctx, vm_paddr_t gpa, int segid, > + vm_ooffset_t segoff, size_t len, int prot); > > int vm_create(const char *name); > struct vmctx *vm_open(const char *name); > void vm_destroy(struct vmctx *ctx); > int vm_parse_memsize(const char *optarg, size_t *memsize); > -int vm_get_memory_seg(struct vmctx *ctx, vm_paddr_t gpa, size_t *ret_len, > - int *wired); > int vm_setup_memory(struct vmctx *ctx, size_t len, enum vm_mmap_style s); > void *vm_map_gpa(struct vmctx *ctx, vm_paddr_t gaddr, size_t len); > int vm_get_gpa_pmap(struct vmctx *, uint64_t gpa, uint64_t *pte, int *num); > @@ -68,6 +113,7 @@ int vm_gla2gpa(struct vmctx *, int vcpui > uint32_t vm_get_lowmem_limit(struct vmctx *ctx); > void vm_set_lowmem_limit(struct vmctx *ctx, uint32_t limit); > void vm_set_memflags(struct vmctx *ctx, int flags); > +int vm_get_memflags(struct vmctx *ctx); > size_t vm_get_lowmem_size(struct vmctx *ctx); > size_t vm_get_highmem_size(struct vmctx *ctx); > int vm_set_desc(struct vmctx *ctx, int vcpu, int reg, > > Modified: stable/10/share/examples/bhyve/vmrun.sh > ============================================================================== > --- stable/10/share/examples/bhyve/vmrun.sh Mon Feb 1 14:28:58 2016 (r295123) > +++ stable/10/share/examples/bhyve/vmrun.sh Mon Feb 1 14:56:11 2016 (r295124) > @@ -48,8 +48,8 @@ usage() { > > echo "Usage: vmrun.sh [-ahi] [-c ] [-C ] [-d ]" > echo " [-e ] [-g ] [-H ]" > - echo " [-I ] [-m ]" > - echo " [-t ] " > + echo " [-I ] [-l ]" > + echo " [-m ] [-t ] " > echo "" > echo " -h: display this help message" > echo " -a: force memory mapped local APIC access" > @@ -61,6 +61,7 @@ usage() { > echo " -H: host filesystem to export to the loader" > echo " -i: force boot of the Installation CDROM image" > echo " -I: Installation CDROM image location (default is ${DEFAULT_ISOFILE})" > + echo " -l: the OS loader to use (default is /boot/userboot.so)" > echo " -m: memory size (default is ${DEFAULT_MEMSIZE})" > echo " -p: pass-through a host PCI device at bus/slot/func (e.g. 10/0/0)" > echo " -t: tap device for virtio-net (default is $DEFAULT_TAPDEV)" > @@ -87,15 +88,15 @@ console=${DEFAULT_CONSOLE} > cpus=${DEFAULT_CPUS} > tap_total=0 > disk_total=0 > -apic_opt="" > gdbport=0 > loader_opt="" > +bhyverun_opt="-H -A -P" > pass_total=0 > > -while getopts ac:C:d:e:g:hH:iI:m:p:t: c ; do > +while getopts ac:C:d:e:g:hH:iI:l:m:p:t: c ; do > case $c in > a) > - apic_opt="-a" > + bhyverun_opt="${bhyverun_opt} -a" > ;; > c) > cpus=${OPTARG} > @@ -125,6 +126,9 @@ while getopts ac:C:d:e:g:hH:iI:m:p:t: c > I) > isofile=${OPTARG} > ;; > + l) > + loader_opt="${loader_opt} -l ${OPTARG}" > + ;; > m) > memsize=${OPTARG} > ;; > @@ -163,6 +167,12 @@ if [ -n "${host_base}" ]; then > loader_opt="${loader_opt} -h ${host_base}" > fi > > +# If PCI passthru devices are configured then guest memory must be wired > +if [ ${pass_total} -gt 0 ]; then > + loader_opt="${loader_opt} -S" > + bhyverun_opt="${bhyverun_opt} -S" > +fi > + > make_and_check_diskdev() > { > local virtio_diskdev="$1" > @@ -263,7 +273,7 @@ while [ 1 ]; do > i=$(($i + 1)) > done > > - ${FBSDRUN} -c ${cpus} -m ${memsize} ${apic_opt} -A -H -P \ > + ${FBSDRUN} -c ${cpus} -m ${memsize} ${bhyverun_opt} \ > -g ${gdbport} \ > -s 0:0,hostbridge \ > -s 1:0,lpc \ > > Modified: stable/10/sys/amd64/include/vmm.h > ============================================================================== > --- stable/10/sys/amd64/include/vmm.h Mon Feb 1 14:28:58 2016 (r295123) > +++ stable/10/sys/amd64/include/vmm.h Mon Feb 1 14:56:11 2016 (r295124) > @@ -108,7 +108,6 @@ enum x2apic_state { > > struct vm; > struct vm_exception; > -struct vm_memory_segment; > struct seg_desc; > struct vm_exit; > struct vm_run; > @@ -175,17 +174,33 @@ int vm_create(const char *name, struct v > void vm_destroy(struct vm *vm); > int vm_reinit(struct vm *vm); > const char *vm_name(struct vm *vm); > -int vm_malloc(struct vm *vm, vm_paddr_t gpa, size_t len); > + > +/* > + * APIs that modify the guest memory map require all vcpus to be frozen. > + */ > +int vm_mmap_memseg(struct vm *vm, vm_paddr_t gpa, int segid, vm_ooffset_t off, > + size_t len, int prot, int flags); > +int vm_alloc_memseg(struct vm *vm, int ident, size_t len, bool sysmem); > +void vm_free_memseg(struct vm *vm, int ident); > int vm_map_mmio(struct vm *vm, vm_paddr_t gpa, size_t len, vm_paddr_t hpa); > int vm_unmap_mmio(struct vm *vm, vm_paddr_t gpa, size_t len); > -void *vm_gpa_hold(struct vm *, vm_paddr_t gpa, size_t len, int prot, > - void **cookie); > +int vm_assign_pptdev(struct vm *vm, int bus, int slot, int func); > +int vm_unassign_pptdev(struct vm *vm, int bus, int slot, int func); > + > +/* > + * APIs that inspect the guest memory map require only a *single* vcpu to > + * be frozen. This acts like a read lock on the guest memory map since any > + * modification requires *all* vcpus to be frozen. > + */ > +int vm_mmap_getnext(struct vm *vm, vm_paddr_t *gpa, int *segid, > + vm_ooffset_t *segoff, size_t *len, int *prot, int *flags); > +int vm_get_memseg(struct vm *vm, int ident, size_t *len, bool *sysmem, > + struct vm_object **objptr); > +void *vm_gpa_hold(struct vm *, int vcpuid, vm_paddr_t gpa, size_t len, > + int prot, void **cookie); > void vm_gpa_release(void *cookie); > -int vm_gpabase2memseg(struct vm *vm, vm_paddr_t gpabase, > - struct vm_memory_segment *seg); > -int vm_get_memobj(struct vm *vm, vm_paddr_t gpa, size_t len, > - vm_offset_t *offset, struct vm_object **object); > -boolean_t vm_mem_allocated(struct vm *vm, vm_paddr_t gpa); > +bool vm_mem_allocated(struct vm *vm, int vcpuid, vm_paddr_t gpa); > + > int vm_get_register(struct vm *vm, int vcpu, int reg, uint64_t *retval); > int vm_set_register(struct vm *vm, int vcpu, int reg, uint64_t val); > int vm_get_seg_desc(struct vm *vm, int vcpu, int reg, > @@ -302,8 +317,6 @@ vcpu_should_yield(struct vm *vm, int vcp > void *vcpu_stats(struct vm *vm, int vcpu); > void vcpu_notify_event(struct vm *vm, int vcpuid, bool lapic_intr); > struct vmspace *vm_get_vmspace(struct vm *vm); > -int vm_assign_pptdev(struct vm *vm, int bus, int slot, int func); > -int vm_unassign_pptdev(struct vm *vm, int bus, int slot, int func); > struct vatpic *vm_atpic(struct vm *vm); > struct vatpit *vm_atpit(struct vm *vm); > struct vpmtmr *vm_pmtmr(struct vm *vm); > > Modified: stable/10/sys/amd64/include/vmm_dev.h > ============================================================================== > --- stable/10/sys/amd64/include/vmm_dev.h Mon Feb 1 14:28:58 2016 (r295123) > +++ stable/10/sys/amd64/include/vmm_dev.h Mon Feb 1 14:56:11 2016 (r295124) > @@ -34,10 +34,22 @@ void vmmdev_init(void); > int vmmdev_cleanup(void); > #endif > > -struct vm_memory_segment { > - vm_paddr_t gpa; /* in */ > +struct vm_memmap { > + vm_paddr_t gpa; > + int segid; /* memory segment */ > + vm_ooffset_t segoff; /* offset into memory segment */ > + size_t len; /* mmap length */ > + int prot; /* RWX */ > + int flags; > +}; > +#define VM_MEMMAP_F_WIRED 0x01 > +#define VM_MEMMAP_F_IOMMU 0x02 > + > +#define VM_MEMSEG_NAME(m) ((m)->name[0] != '\0' ? (m)->name : NULL) > +struct vm_memseg { > + int segid; > size_t len; > - int wired; > + char name[SPECNAMELEN + 1]; > }; > > struct vm_register { > @@ -214,10 +226,14 @@ enum { > IOCNUM_REINIT = 5, > > /* memory apis */ > - IOCNUM_MAP_MEMORY = 10, > - IOCNUM_GET_MEMORY_SEG = 11, > + IOCNUM_MAP_MEMORY = 10, /* deprecated */ > + IOCNUM_GET_MEMORY_SEG = 11, /* deprecated */ > IOCNUM_GET_GPA_PMAP = 12, > IOCNUM_GLA2GPA = 13, > + IOCNUM_ALLOC_MEMSEG = 14, > + IOCNUM_GET_MEMSEG = 15, > + IOCNUM_MMAP_MEMSEG = 16, > + IOCNUM_MMAP_GETNEXT = 17, > > /* register/state accessors */ > IOCNUM_SET_REGISTER = 20, > @@ -278,10 +294,14 @@ enum { > _IOW('v', IOCNUM_SUSPEND, struct vm_suspend) > #define VM_REINIT \ > _IO('v', IOCNUM_REINIT) > -#define VM_MAP_MEMORY \ > - _IOWR('v', IOCNUM_MAP_MEMORY, struct vm_memory_segment) > -#define VM_GET_MEMORY_SEG \ > - _IOWR('v', IOCNUM_GET_MEMORY_SEG, struct vm_memory_segment) > +#define VM_ALLOC_MEMSEG \ > + _IOW('v', IOCNUM_ALLOC_MEMSEG, struct vm_memseg) > +#define VM_GET_MEMSEG \ > + _IOWR('v', IOCNUM_GET_MEMSEG, struct vm_memseg) > +#define VM_MMAP_MEMSEG \ > + _IOW('v', IOCNUM_MMAP_MEMSEG, struct vm_memmap) > +#define VM_MMAP_GETNEXT \ > + _IOWR('v', IOCNUM_MMAP_GETNEXT, struct vm_memmap) > #define VM_SET_REGISTER \ > _IOW('v', IOCNUM_SET_REGISTER, struct vm_register) > #define VM_GET_REGISTER \ > > Modified: stable/10/sys/amd64/vmm/amd/svm.c > ============================================================================== > --- stable/10/sys/amd64/vmm/amd/svm.c Mon Feb 1 14:28:58 2016 (r295123) > +++ stable/10/sys/amd64/vmm/amd/svm.c Mon Feb 1 14:56:11 2016 (r295124) > @@ -1477,7 +1477,7 @@ svm_vmexit(struct svm_softc *svm_sc, int > VCPU_CTR2(svm_sc->vm, vcpu, "nested page fault with " > "reserved bits set: info1(%#lx) info2(%#lx)", > info1, info2); > - } else if (vm_mem_allocated(svm_sc->vm, info2)) { > + } else if (vm_mem_allocated(svm_sc->vm, vcpu, info2)) { > vmexit->exitcode = VM_EXITCODE_PAGING; > vmexit->u.paging.gpa = info2; > vmexit->u.paging.fault_type = npf_fault_type(info1); > > Modified: stable/10/sys/amd64/vmm/intel/vmx.c > ============================================================================== > --- stable/10/sys/amd64/vmm/intel/vmx.c Mon Feb 1 14:28:58 2016 (r295123) > +++ stable/10/sys/amd64/vmm/intel/vmx.c Mon Feb 1 14:56:11 2016 (r295124) > @@ -2426,7 +2426,7 @@ vmx_exit_process(struct vmx *vmx, int vc > * this must be an instruction that accesses MMIO space. > */ > gpa = vmcs_gpa(); > - if (vm_mem_allocated(vmx->vm, gpa) || > + if (vm_mem_allocated(vmx->vm, vcpu, gpa) || > apic_access_fault(vmx, vcpu, gpa)) { > vmexit->exitcode = VM_EXITCODE_PAGING; > vmexit->inst_length = 0; > > Modified: stable/10/sys/amd64/vmm/io/ppt.c > ============================================================================== > --- stable/10/sys/amd64/vmm/io/ppt.c Mon Feb 1 14:28:58 2016 (r295123) > +++ stable/10/sys/amd64/vmm/io/ppt.c Mon Feb 1 14:56:11 2016 (r295124) > @@ -76,11 +76,17 @@ struct pptintr_arg { /* pptintr(pptin > uint64_t msg_data; > }; > > +struct pptseg { > + vm_paddr_t gpa; > + size_t len; > + int wired; > +}; > + > struct pptdev { > device_t dev; > struct vm *vm; /* owner of this device */ > TAILQ_ENTRY(pptdev) next; > - struct vm_memory_segment mmio[MAX_MMIOSEGS]; > + struct pptseg mmio[MAX_MMIOSEGS]; > struct { > int num_msgs; /* guest state */ > > @@ -207,14 +213,14 @@ static void > ppt_unmap_mmio(struct vm *vm, struct pptdev *ppt) > { > int i; > - struct vm_memory_segment *seg; > + struct pptseg *seg; > > for (i = 0; i < MAX_MMIOSEGS; i++) { > seg = &ppt->mmio[i]; > if (seg->len == 0) > continue; > (void)vm_unmap_mmio(vm, seg->gpa, seg->len); > - bzero(seg, sizeof(struct vm_memory_segment)); > + bzero(seg, sizeof(struct pptseg)); > } > } > > @@ -324,7 +330,7 @@ ppt_is_mmio(struct vm *vm, vm_paddr_t gp > { > int i; > struct pptdev *ppt; > - struct vm_memory_segment *seg; > + struct pptseg *seg; > > TAILQ_FOREACH(ppt, &pptdev_list, next) { > if (ppt->vm != vm) > @@ -410,7 +416,7 @@ ppt_map_mmio(struct vm *vm, int bus, int > vm_paddr_t gpa, size_t len, vm_paddr_t hpa) > { > int i, error; > - struct vm_memory_segment *seg; > + struct pptseg *seg; > struct pptdev *ppt; > > ppt = ppt_find(bus, slot, func); > > Modified: stable/10/sys/amd64/vmm/vmm.c > ============================================================================== > --- stable/10/sys/amd64/vmm/vmm.c Mon Feb 1 14:28:58 2016 (r295123) > +++ stable/10/sys/amd64/vmm/vmm.c Mon Feb 1 14:56:11 2016 (r295124) > @@ -120,12 +120,21 @@ struct vcpu { > #define vcpu_assert_locked(v) mtx_assert(&((v)->mtx), MA_OWNED) > > struct mem_seg { > + size_t len; > + bool sysmem; > + struct vm_object *object; > +}; > +#define VM_MAX_MEMSEGS 2 > + > +struct mem_map { > vm_paddr_t gpa; > size_t len; > - boolean_t wired; > - vm_object_t object; > + vm_ooffset_t segoff; > + int segid; > + int prot; > + int flags; > }; > -#define VM_MAX_MEMORY_SEGMENTS 2 > +#define VM_MAX_MEMMAPS 4 > > /* > * Initialization: > @@ -151,8 +160,8 @@ struct vm { > void *rendezvous_arg; /* (x) rendezvous func/arg */ > vm_rendezvous_func_t rendezvous_func; > struct mtx rendezvous_mtx; /* (o) rendezvous lock */ > - int num_mem_segs; /* (o) guest memory segments */ > - struct mem_seg mem_segs[VM_MAX_MEMORY_SEGMENTS]; > + struct mem_map mem_maps[VM_MAX_MEMMAPS]; /* (i) guest address space */ > + struct mem_seg mem_segs[VM_MAX_MEMSEGS]; /* (o) guest memory regions */ > struct vmspace *vmspace; /* (o) guest's address space */ > char name[VM_MAX_NAMELEN]; /* (o) virtual machine name */ > struct vcpu vcpu[VM_MAXCPU]; /* (i) guest vcpus */ > @@ -224,6 +233,8 @@ TUNABLE_INT("hw.vmm.force_iommu", &vmm_f > SYSCTL_INT(_hw_vmm, OID_AUTO, force_iommu, CTLFLAG_RDTUN, &vmm_force_iommu, 0, > "Force use of I/O MMU even if no passthrough devices were found."); > > +static void vm_free_memmap(struct vm *vm, int ident); > +static bool sysmem_mapping(struct vm *vm, struct mem_map *mm); > static void vcpu_notify_event_locked(struct vcpu *vcpu, bool lapic_intr); > > #ifdef KTR > @@ -444,7 +455,6 @@ vm_create(const char *name, struct vm ** > > vm = malloc(sizeof(struct vm), M_VM, M_WAITOK | M_ZERO); > strcpy(vm->name, name); > - vm->num_mem_segs = 0; > vm->vmspace = vmspace; > mtx_init(&vm->rendezvous_mtx, "vm rendezvous lock", 0, MTX_DEF); > > @@ -455,18 +465,9 @@ vm_create(const char *name, struct vm ** > } > > static void > -vm_free_mem_seg(struct vm *vm, struct mem_seg *seg) > -{ > - > - if (seg->object != NULL) > - vmm_mem_free(vm->vmspace, seg->gpa, seg->len); > - > - bzero(seg, sizeof(*seg)); > -} > - > -static void > vm_cleanup(struct vm *vm, bool destroy) > { > + struct mem_map *mm; > int i; > > ppt_unassign_all(vm); > @@ -489,11 +490,23 @@ vm_cleanup(struct vm *vm, bool destroy) > > VMCLEANUP(vm->cookie); > > - if (destroy) { > - for (i = 0; i < vm->num_mem_segs; i++) > - vm_free_mem_seg(vm, &vm->mem_segs[i]); > + /* > + * System memory is removed from the guest address space only when > + * the VM is destroyed. This is because the mapping remains the same > + * across VM reset. > + * > + * Device memory can be relocated by the guest (e.g. using PCI BARs) > + * so those mappings are removed on a VM reset. > + */ > + for (i = 0; i < VM_MAX_MEMMAPS; i++) { > + mm = &vm->mem_maps[i]; > + if (destroy || !sysmem_mapping(vm, mm)) > + vm_free_memmap(vm, i); > + } > > - vm->num_mem_segs = 0; > + if (destroy) { > + for (i = 0; i < VM_MAX_MEMSEGS; i++) > + vm_free_memseg(vm, i); > > VMSPACE_FREE(vm->vmspace); > vm->vmspace = NULL; > @@ -551,146 +564,243 @@ vm_unmap_mmio(struct vm *vm, vm_paddr_t > return (0); > } > > -boolean_t > -vm_mem_allocated(struct vm *vm, vm_paddr_t gpa) > +/* > + * Return 'true' if 'gpa' is allocated in the guest address space. > + * > + * This function is called in the context of a running vcpu which acts as > + * an implicit lock on 'vm->mem_maps[]'. > + */ > +bool > +vm_mem_allocated(struct vm *vm, int vcpuid, vm_paddr_t gpa) > { > + struct mem_map *mm; > int i; > - vm_paddr_t gpabase, gpalimit; > > - for (i = 0; i < vm->num_mem_segs; i++) { > - gpabase = vm->mem_segs[i].gpa; > - gpalimit = gpabase + vm->mem_segs[i].len; > - if (gpa >= gpabase && gpa < gpalimit) > - return (TRUE); /* 'gpa' is regular memory */ > +#ifdef INVARIANTS > + int hostcpu, state; > + state = vcpu_get_state(vm, vcpuid, &hostcpu); > + KASSERT(state == VCPU_RUNNING && hostcpu == curcpu, > + ("%s: invalid vcpu state %d/%d", __func__, state, hostcpu)); > +#endif > + > + for (i = 0; i < VM_MAX_MEMMAPS; i++) { > + mm = &vm->mem_maps[i]; > + if (mm->len != 0 && gpa >= mm->gpa && gpa < mm->gpa + mm->len) > + return (true); /* 'gpa' is sysmem or devmem */ > } > > if (ppt_is_mmio(vm, gpa)) > - return (TRUE); /* 'gpa' is pci passthru mmio */ > + return (true); /* 'gpa' is pci passthru mmio */ > > - return (FALSE); > + return (false); > } > > int > -vm_malloc(struct vm *vm, vm_paddr_t gpa, size_t len) > +vm_alloc_memseg(struct vm *vm, int ident, size_t len, bool sysmem) > { > - int available, allocated; > struct mem_seg *seg; > - vm_object_t object; > - vm_paddr_t g; > + vm_object_t obj; > > - if ((gpa & PAGE_MASK) || (len & PAGE_MASK) || len == 0) > + if (ident < 0 || ident >= VM_MAX_MEMSEGS) > return (EINVAL); > - > - available = allocated = 0; > - g = gpa; > - while (g < gpa + len) { > - if (vm_mem_allocated(vm, g)) > - allocated++; > - else > - available++; > > - g += PAGE_SIZE; > - } > - > - /* > - * If there are some allocated and some available pages in the address > - * range then it is an error. > - */ > - if (allocated && available) > + if (len == 0 || (len & PAGE_MASK)) > return (EINVAL); > > - /* > - * If the entire address range being requested has already been > - * allocated then there isn't anything more to do. > - */ > - if (allocated && available == 0) > - return (0); > - > - if (vm->num_mem_segs >= VM_MAX_MEMORY_SEGMENTS) > - return (E2BIG); > - > - seg = &vm->mem_segs[vm->num_mem_segs]; > + seg = &vm->mem_segs[ident]; > + if (seg->object != NULL) { > + if (seg->len == len && seg->sysmem == sysmem) > + return (EEXIST); > + else > + return (EINVAL); > + } > > - if ((object = vmm_mem_alloc(vm->vmspace, gpa, len)) == NULL) > + obj = vm_object_allocate(OBJT_DEFAULT, len >> PAGE_SHIFT); > + if (obj == NULL) > return (ENOMEM); > > - seg->gpa = gpa; > seg->len = len; > - seg->object = object; > - seg->wired = FALSE; > + seg->object = obj; > + seg->sysmem = sysmem; > + return (0); > +} > > - vm->num_mem_segs++; > +int > +vm_get_memseg(struct vm *vm, int ident, size_t *len, bool *sysmem, > + vm_object_t *objptr) > +{ > + struct mem_seg *seg; > + > + if (ident < 0 || ident >= VM_MAX_MEMSEGS) > + return (EINVAL); > > + seg = &vm->mem_segs[ident]; > + if (len) > + *len = seg->len; > + if (sysmem) > + *sysmem = seg->sysmem; > + if (objptr) > + *objptr = seg->object; > return (0); > } > > -static vm_paddr_t > -vm_maxmem(struct vm *vm) > +void > +vm_free_memseg(struct vm *vm, int ident) > { > - int i; > - vm_paddr_t gpa, maxmem; > + struct mem_seg *seg; > > - maxmem = 0; > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > _______________________________________________ > svn-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" -- Homepage: www.yamagi.org XMPP: yamagi@yamagi.org GnuPG/GPG: 0xEFBCCBCB From owner-svn-src-stable-10@freebsd.org Mon Feb 1 22:16:43 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45A4DA98D3A; Mon, 1 Feb 2016 22:16:43 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 16A271756; Mon, 1 Feb 2016 22:16:43 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u11MGgQu049922; Mon, 1 Feb 2016 22:16:42 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u11MGgEp049921; Mon, 1 Feb 2016 22:16:42 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201602012216.u11MGgEp049921@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Mon, 1 Feb 2016 22:16:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r295130 - stable/10/etc/periodic/security X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2016 22:16:43 -0000 Author: marius Date: Mon Feb 1 22:16:41 2016 New Revision: 295130 URL: https://svnweb.freebsd.org/changeset/base/295130 Log: MFC: r295032 Use '^[>+][^+]' instead of '^[>+]' with grep(1) when filtering the diff(1) output between two files in "new_only"-mode. Otherwise, with the default of using unified format a remnant of the header in the output is the result. This is especially irritating when the two files differ but the second one is empty, amounting to the vestige of the header being the only readout. Reported by: Stefan Haemmerl Approved by: re (delphij) Modified: stable/10/etc/periodic/security/security.functions Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/periodic/security/security.functions ============================================================================== --- stable/10/etc/periodic/security/security.functions Mon Feb 1 19:43:04 2016 (r295129) +++ stable/10/etc/periodic/security/security.functions Mon Feb 1 22:16:41 2016 (r295130) @@ -51,7 +51,7 @@ check_diff() { rc=0 if [ "$1" = "new_only" ]; then shift - filter="grep '^[>+]'" + filter="grep '^[>+][^+]'" else filter="cat" fi From owner-svn-src-stable-10@freebsd.org Mon Feb 1 23:07:34 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B25EA970EC; Mon, 1 Feb 2016 23:07:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3ADF71396; Mon, 1 Feb 2016 23:07:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u11N7X5r064614; Mon, 1 Feb 2016 23:07:33 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u11N7Vom064597; Mon, 1 Feb 2016 23:07:31 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201602012307.u11N7Vom064597@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 1 Feb 2016 23:07:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r295131 - in stable/10: contrib/mdocml lib lib/libdevctl share/mk sys/conf sys/dev/acpica sys/dev/pci sys/kern sys/sys usr.sbin usr.sbin/devctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2016 23:07:34 -0000 Author: jhb Date: Mon Feb 1 23:07:31 2016 New Revision: 295131 URL: https://svnweb.freebsd.org/changeset/base/295131 Log: MFC 278320,278336,278830,285621: Add devctl(8): a utility for manipulating new-bus devices. Note that this version does not include the 'suspend' and 'resume' commands present in HEAD as those depend on larger changes to the suspend and resume code in the kernel. 278320: Add a new device control utility for new-bus devices called devctl. This allows the user to request administrative changes to individual devices such as attach or detaching drivers or disabling and re-enabling devices. - Add a new /dev/devctl2 character device which uses ioctls for device requests. The ioctls use a common 'struct devreq' which is somewhat similar to 'struct ifreq'. - The ioctls identify the device to operate on via a string. This string can either by the device's name, or it can be a bus-specific address. (For unattached devices, a bus address is the only way to locate a device.) Bus drivers register an eventhandler to claim unrecognized device names that the driver recognizes as a valid address. Two buses currently support addresses: ACPI recognizes any device in the ACPI namespace via its full path starting with "\" and the PCI bus driver recognizes an address specification of 'pci[:]::' (identical to the PCI selector strings supported by pciconf). - To make it easier to cut and paste, change the PnP location string in the PCI bus driver to output a full PCI selector string rather than 'slot= function='. - Add a devctl(3) interface in libdevctl which provides a wrapper around the ioctls and is the preferred interface for other userland code. - Add a devctl(8) program which is a simple wrapper around the requests supported by devctl(3). - Add a resource_unset_value() function that can be used to remove a hint from the kernel environment. This is used to clear a hint...disabled hint when re-enabling a boot-time disabled device. 278336: Unbreak the build (memchr is explicitly required by devctl(9) after r278320) 278830: install the man page... 285621: Fix formatting. Approved by: re (marius) Added: stable/10/lib/libdevctl/ - copied from r278320, head/lib/libdevctl/ stable/10/usr.sbin/devctl/ - copied from r278320, head/usr.sbin/devctl/ Modified: stable/10/contrib/mdocml/lib.in stable/10/lib/Makefile stable/10/lib/libdevctl/devctl.3 stable/10/lib/libdevctl/devctl.c stable/10/lib/libdevctl/devctl.h stable/10/share/mk/bsd.libnames.mk stable/10/sys/conf/files stable/10/sys/dev/acpica/acpi.c stable/10/sys/dev/pci/pci.c stable/10/sys/kern/subr_bus.c stable/10/sys/kern/subr_hints.c stable/10/sys/sys/bus.h stable/10/usr.sbin/Makefile stable/10/usr.sbin/devctl/Makefile stable/10/usr.sbin/devctl/devctl.8 stable/10/usr.sbin/devctl/devctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/mdocml/lib.in ============================================================================== --- stable/10/contrib/mdocml/lib.in Mon Feb 1 22:16:41 2016 (r295130) +++ stable/10/contrib/mdocml/lib.in Mon Feb 1 23:07:31 2016 (r295131) @@ -37,6 +37,7 @@ LINE("libcipher", "FreeSec Crypt Library LINE("libcompat", "Compatibility Library (libcompat, \\-lcompat)") LINE("libcrypt", "Crypt Library (libcrypt, \\-lcrypt)") LINE("libcurses", "Curses Library (libcurses, \\-lcurses)") +LINE("libdevctl", "Device Control Library (libdevctl, \\-ldevctl)") LINE("libdevinfo", "Device and Resource Information Utility Library (libdevinfo, \\-ldevinfo)") LINE("libdevstat", "Device Statistics Library (libdevstat, \\-ldevstat)") LINE("libdisk", "Interface to Slice and Partition Labels Library (libdisk, \\-ldisk)") Modified: stable/10/lib/Makefile ============================================================================== --- stable/10/lib/Makefile Mon Feb 1 22:16:41 2016 (r295130) +++ stable/10/lib/Makefile Mon Feb 1 23:07:31 2016 (r295131) @@ -37,6 +37,7 @@ SUBDIR= ${SUBDIR_ORDERED} \ ${_libcom_err} \ libcompat \ libcrypt \ + libdevctl \ libdevinfo \ libdevstat \ libdpv \ Modified: stable/10/lib/libdevctl/devctl.3 ============================================================================== --- head/lib/libdevctl/devctl.3 Fri Feb 6 16:09:01 2015 (r278320) +++ stable/10/lib/libdevctl/devctl.3 Mon Feb 1 23:07:31 2016 (r295131) @@ -33,9 +33,7 @@ .Nm devctl_attach , .Nm devctl_detach , .Nm devctl_disable , -.Nm devctl_enable , -.Nm devctl_resume , -.Nm devctl_suspend +.Nm devctl_enable .Nd device control library .Sh LIBRARY .Lb libdevctl @@ -50,10 +48,6 @@ .Ft int .Fn devctl_enable "const char *device" .Ft int -.Fn devctl_resume "const char *device" -.Ft int -.Fn devctl_suspend "const char *device" -.Ft int .Fn devctl_set_driver "const char *device" "const char *driver" "bool force" .Sh DESCRIPTION The @@ -125,16 +119,6 @@ function re-enables a disabled device. The device will probe and attach if a suitable device driver is found. .Pp The -.Fn devctl_suspend -function suspends a device. -This may include placing the device in a reduced power state, -but any device driver currently attached to the device will remain attached. -.Pp -The -.Fn devctl_resume -function resumes a suspended device to a fully working state. -.Pp -The .Fn devctl_set_driver function attaches a device driver named .Fa driver @@ -150,7 +134,7 @@ the device will be detached from its cur attached to the new device driver. .Sh RETURN VALUES .Rv -std devctl_attach devctl_detach devctl_disable devctl_enable \ -devctl_suspend devctl_resume devctl_set_driver +devctl_set_driver .Sh ERRORS In addition to specific errors noted below, all of the @@ -235,26 +219,6 @@ does not support detaching. .El .Pp The -.Fn devctl_suspend -function may fail if: -.Bl -tag -width Er -.It Bq Er EBUSY -The device is already suspended. -.It Bq Er EINVAL -The device to be suspended is the root bus device. -.El -.Pp -The -.Fn devctl_resume -function may fail if: -.Bl -tag -width Er -.It Bq Er EINVAL -The device is not suspended. -.It Bq Er EINVAL -The device to be resumed is the root bus device. -.El -.Pp -The .Fn devctl_set_driver function may fail if: .Bl -tag -width Er @@ -288,8 +252,3 @@ The .Nm library first appeared in .Fx 11.0 . -.Sh BUGS -If a device is suspended individually via -.Fn devctl_suspend -and the entire machine is subsequently suspended, -the device will be resumed when the machine resumes. Modified: stable/10/lib/libdevctl/devctl.c ============================================================================== --- head/lib/libdevctl/devctl.c Fri Feb 6 16:09:01 2015 (r278320) +++ stable/10/lib/libdevctl/devctl.c Mon Feb 1 23:07:31 2016 (r295131) @@ -93,20 +93,6 @@ devctl_disable(const char *device, bool } int -devctl_suspend(const char *device) -{ - - return (devctl_simple_request(DEV_SUSPEND, device, 0)); -} - -int -devctl_resume(const char *device) -{ - - return (devctl_simple_request(DEV_RESUME, device, 0)); -} - -int devctl_set_driver(const char *device, const char *driver, bool force) { struct devreq req; Modified: stable/10/lib/libdevctl/devctl.h ============================================================================== --- head/lib/libdevctl/devctl.h Fri Feb 6 16:09:01 2015 (r278320) +++ stable/10/lib/libdevctl/devctl.h Mon Feb 1 23:07:31 2016 (r295131) @@ -35,8 +35,6 @@ int devctl_attach(const char *device); int devctl_detach(const char *device, bool force); int devctl_enable(const char *device); int devctl_disable(const char *device, bool force_detach); -int devctl_suspend(const char *device); -int devctl_resume(const char *device); int devctl_set_driver(const char *device, const char *driver, bool force); #endif /* !__DEVCTL_H__ */ Modified: stable/10/share/mk/bsd.libnames.mk ============================================================================== --- stable/10/share/mk/bsd.libnames.mk Mon Feb 1 22:16:41 2016 (r295130) +++ stable/10/share/mk/bsd.libnames.mk Mon Feb 1 23:07:31 2016 (r295131) @@ -38,6 +38,7 @@ LIBCRYPT?= ${DESTDIR}${LIBDIR}/libcrypt. LIBCRYPTO?= ${DESTDIR}${LIBDIR}/libcrypto.a LIBCTF?= ${DESTDIR}${LIBDIR}/libctf.a LIBCURSES?= ${DESTDIR}${LIBDIR}/libcurses.a +LIBDEVCTL?= ${DESTDIR}${LIBDIR}/libdevctl.a LIBDEVINFO?= ${DESTDIR}${LIBDIR}/libdevinfo.a LIBDEVSTAT?= ${DESTDIR}${LIBDIR}/libdevstat.a LIBDIALOG?= ${DESTDIR}${LIBDIR}/libdialog.a Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Mon Feb 1 22:16:41 2016 (r295130) +++ stable/10/sys/conf/files Mon Feb 1 23:07:31 2016 (r295131) @@ -3238,7 +3238,7 @@ libkern/jenkins_hash.c standard libkern/murmur3_32.c standard libkern/mcount.c optional profiling-routine libkern/memcchr.c standard -libkern/memchr.c optional fdt +libkern/memchr.c standard libkern/memcmp.c standard libkern/qsort.c standard libkern/qsort_r.c standard Modified: stable/10/sys/dev/acpica/acpi.c ============================================================================== --- stable/10/sys/dev/acpica/acpi.c Mon Feb 1 22:16:41 2016 (r295130) +++ stable/10/sys/dev/acpica/acpi.c Mon Feb 1 23:07:31 2016 (r295131) @@ -100,6 +100,7 @@ int acpi_quirks; /* Supported sleep states. */ static BOOLEAN acpi_sleep_states[ACPI_S_STATE_COUNT]; +static void acpi_lookup(void *arg, const char *name, device_t *dev); static int acpi_modevent(struct module *mod, int event, void *junk); static int acpi_probe(device_t dev); static int acpi_attach(device_t dev); @@ -670,8 +671,10 @@ acpi_attach(device_t dev) /* Register ACPI again to pass the correct argument of pm_func. */ power_pm_register(POWER_PM_TYPE_ACPI, acpi_pm_func, sc); - if (!acpi_disabled("bus")) + if (!acpi_disabled("bus")) { + EVENTHANDLER_REGISTER(dev_lookup, acpi_lookup, NULL, 1000); acpi_probe_children(dev); + } /* Update all GPEs and enable runtime GPEs. */ status = AcpiUpdateAllGpes(); @@ -3404,6 +3407,31 @@ acpi_disabled(char *subsys) return (0); } +static void +acpi_lookup(void *arg, const char *name, device_t *dev) +{ + ACPI_HANDLE handle; + + if (*dev != NULL) + return; + + /* + * Allow any handle name that is specified as an absolute path and + * starts with '\'. We could restrict this to \_SB and friends, + * but see acpi_probe_children() for notes on why we scan the entire + * namespace for devices. + * + * XXX: The pathname argument to AcpiGetHandle() should be fixed to + * be const. + */ + if (name[0] != '\\') + return; + if (ACPI_FAILURE(AcpiGetHandle(ACPI_ROOT_OBJECT, __DECONST(char *, name), + &handle))) + return; + *dev = acpi_get_device(handle); +} + /* * Control interface. * Modified: stable/10/sys/dev/pci/pci.c ============================================================================== --- stable/10/sys/dev/pci/pci.c Mon Feb 1 22:16:41 2016 (r295130) +++ stable/10/sys/dev/pci/pci.c Mon Feb 1 23:07:31 2016 (r295131) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -4924,8 +4925,8 @@ pci_child_location_str_method(device_t d size_t buflen) { - snprintf(buf, buflen, "slot=%d function=%d", pci_get_slot(child), - pci_get_function(child)); + snprintf(buf, buflen, "pci%d:%d:%d:%d", pci_get_domain(child), + pci_get_bus(child), pci_get_slot(child), pci_get_function(child)); return (0); } @@ -4955,10 +4956,60 @@ pci_assign_interrupt_method(device_t dev cfg->intpin)); } +static void +pci_lookup(void *arg, const char *name, device_t *dev) +{ + long val; + char *end; + int domain, bus, slot, func; + + if (*dev != NULL) + return; + + /* + * Accept pciconf-style selectors of either pciD:B:S:F or + * pciB:S:F. In the latter case, the domain is assumed to + * be zero. + */ + if (strncmp(name, "pci", 3) != 0) + return; + val = strtol(name + 3, &end, 10); + if (val < 0 || val > INT_MAX || *end != ':') + return; + domain = val; + val = strtol(end + 1, &end, 10); + if (val < 0 || val > INT_MAX || *end != ':') + return; + bus = val; + val = strtol(end + 1, &end, 10); + if (val < 0 || val > INT_MAX) + return; + slot = val; + if (*end == ':') { + val = strtol(end + 1, &end, 10); + if (val < 0 || val > INT_MAX || *end != '\0') + return; + func = val; + } else if (*end == '\0') { + func = slot; + slot = bus; + bus = domain; + domain = 0; + } else + return; + + if (domain > PCI_DOMAINMAX || bus > PCI_BUSMAX || slot > PCI_SLOTMAX || + func > PCIE_ARI_FUNCMAX || (slot != 0 && func > PCI_FUNCMAX)) + return; + + *dev = pci_find_dbsf(domain, bus, slot, func); +} + static int pci_modevent(module_t mod, int what, void *arg) { static struct cdev *pci_cdev; + static eventhandler_tag tag; switch (what) { case MOD_LOAD: @@ -4967,9 +5018,13 @@ pci_modevent(module_t mod, int what, voi pci_cdev = make_dev(&pcicdev, 0, UID_ROOT, GID_WHEEL, 0644, "pci"); pci_load_vendor_data(); + tag = EVENTHANDLER_REGISTER(dev_lookup, pci_lookup, NULL, + 1000); break; case MOD_UNLOAD: + if (tag != NULL) + EVENTHANDLER_DEREGISTER(dev_lookup, tag); destroy_dev(pci_cdev); break; } Modified: stable/10/sys/kern/subr_bus.c ============================================================================== --- stable/10/sys/kern/subr_bus.c Mon Feb 1 22:16:41 2016 (r295130) +++ stable/10/sys/kern/subr_bus.c Mon Feb 1 23:07:31 2016 (r295131) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -147,6 +148,8 @@ struct device { static MALLOC_DEFINE(M_BUS, "bus", "Bus data structures"); static MALLOC_DEFINE(M_BUS_SC, "bus-sc", "Bus data structures, softc"); +static void devctl2_init(void); + #ifdef BUS_DEBUG static int bus_debug = 1; @@ -434,6 +437,7 @@ devinit(void) cv_init(&devsoftc.cv, "dev cv"); TAILQ_INIT(&devsoftc.devq); knlist_init_mtx(&devsoftc.sel.si_note, &devsoftc.mtx); + devctl2_init(); } static int @@ -4998,3 +5002,229 @@ bus_free_resource(device_t dev, int type return (0); return (bus_release_resource(dev, type, rman_get_rid(r), r)); } + +/* + * /dev/devctl2 implementation. The existing /dev/devctl device has + * implicit semantics on open, so it could not be reused for this. + * Another option would be to call this /dev/bus? + */ +static int +find_device(struct devreq *req, device_t *devp) +{ + device_t dev; + + /* + * First, ensure that the name is nul terminated. + */ + if (memchr(req->dr_name, '\0', sizeof(req->dr_name)) == NULL) + return (EINVAL); + + /* + * Second, try to find an attached device whose name matches + * 'name'. + */ + TAILQ_FOREACH(dev, &bus_data_devices, devlink) { + if (dev->nameunit != NULL && + strcmp(dev->nameunit, req->dr_name) == 0) { + *devp = dev; + return (0); + } + } + + /* Finally, give device enumerators a chance. */ + dev = NULL; + EVENTHANDLER_INVOKE(dev_lookup, req->dr_name, &dev); + if (dev == NULL) + return (ENOENT); + *devp = dev; + return (0); +} + +static bool +driver_exists(struct device *bus, const char *driver) +{ + devclass_t dc; + + for (dc = bus->devclass; dc != NULL; dc = dc->parent) { + if (devclass_find_driver_internal(dc, driver) != NULL) + return (true); + } + return (false); +} + +static int +devctl2_ioctl(struct cdev *cdev, u_long cmd, caddr_t data, int fflag, + struct thread *td) +{ + struct devreq *req; + device_t dev; + int error, old; + + /* Locate the device to control. */ + mtx_lock(&Giant); + req = (struct devreq *)data; + switch (cmd) { + case DEV_ATTACH: + case DEV_DETACH: + case DEV_ENABLE: + case DEV_DISABLE: + case DEV_SET_DRIVER: + error = priv_check(td, PRIV_DRIVER); + if (error == 0) + error = find_device(req, &dev); + break; + default: + error = ENOTTY; + break; + } + if (error) { + mtx_unlock(&Giant); + return (error); + } + + /* Perform the requested operation. */ + switch (cmd) { + case DEV_ATTACH: + if (device_is_attached(dev) && (dev->flags & DF_REBID) == 0) + error = EBUSY; + else if (!device_is_enabled(dev)) + error = ENXIO; + else + error = device_probe_and_attach(dev); + break; + case DEV_DETACH: + if (!device_is_attached(dev)) { + error = ENXIO; + break; + } + if (!(req->dr_flags & DEVF_FORCE_DETACH)) { + error = device_quiesce(dev); + if (error) + break; + } + error = device_detach(dev); + break; + case DEV_ENABLE: + if (device_is_enabled(dev)) { + error = EBUSY; + break; + } + + /* + * If the device has been probed but not attached (e.g. + * when it has been disabled by a loader hint), just + * attach the device rather than doing a full probe. + */ + device_enable(dev); + if (device_is_alive(dev)) { + /* + * If the device was disabled via a hint, clear + * the hint. + */ + if (resource_disabled(dev->driver->name, dev->unit)) + resource_unset_value(dev->driver->name, + dev->unit, "disabled"); + error = device_attach(dev); + } else + error = device_probe_and_attach(dev); + break; + case DEV_DISABLE: + if (!device_is_enabled(dev)) { + error = ENXIO; + break; + } + + if (!(req->dr_flags & DEVF_FORCE_DETACH)) { + error = device_quiesce(dev); + if (error) + break; + } + + /* + * Force DF_FIXEDCLASS on around detach to preserve + * the existing name. + */ + old = dev->flags; + dev->flags |= DF_FIXEDCLASS; + error = device_detach(dev); + if (!(old & DF_FIXEDCLASS)) + dev->flags &= ~DF_FIXEDCLASS; + if (error == 0) + device_disable(dev); + break; + case DEV_SET_DRIVER: { + devclass_t dc; + char driver[128]; + + error = copyinstr(req->dr_data, driver, sizeof(driver), NULL); + if (error) + break; + if (driver[0] == '\0') { + error = EINVAL; + break; + } + if (dev->devclass != NULL && + strcmp(driver, dev->devclass->name) == 0) + /* XXX: Could possibly force DF_FIXEDCLASS on? */ + break; + + /* + * Scan drivers for this device's bus looking for at + * least one matching driver. + */ + if (dev->parent == NULL) { + error = EINVAL; + break; + } + if (!driver_exists(dev->parent, driver)) { + error = ENOENT; + break; + } + dc = devclass_create(driver); + if (dc == NULL) { + error = ENOMEM; + break; + } + + /* Detach device if necessary. */ + if (device_is_attached(dev)) { + if (req->dr_flags & DEVF_SET_DRIVER_DETACH) + error = device_detach(dev); + else + error = EBUSY; + if (error) + break; + } + + /* Clear any previously-fixed device class and unit. */ + if (dev->flags & DF_FIXEDCLASS) + devclass_delete_device(dev->devclass, dev); + dev->flags |= DF_WILDCARD; + dev->unit = -1; + + /* Force the new device class. */ + error = devclass_add_device(dc, dev); + if (error) + break; + dev->flags |= DF_FIXEDCLASS; + error = device_probe_and_attach(dev); + break; + } + } + mtx_unlock(&Giant); + return (error); +} + +static struct cdevsw devctl2_cdevsw = { + .d_version = D_VERSION, + .d_ioctl = devctl2_ioctl, + .d_name = "devctl2", +}; + +static void +devctl2_init(void) +{ + + make_dev_credf(MAKEDEV_ETERNAL, &devctl2_cdevsw, 0, NULL, + UID_ROOT, GID_WHEEL, 0600, "devctl2"); +} Modified: stable/10/sys/kern/subr_hints.c ============================================================================== --- stable/10/sys/kern/subr_hints.c Mon Feb 1 22:16:41 2016 (r295130) +++ stable/10/sys/kern/subr_hints.c Mon Feb 1 23:07:31 2016 (r295131) @@ -461,3 +461,31 @@ resource_disabled(const char *name, int return (0); return (value); } + +/* + * Clear a value associated with a device by removing it from + * the kernel environment. This only removes a hint for an + * exact unit. + */ +int +resource_unset_value(const char *name, int unit, const char *resname) +{ + char varname[128]; + const char *retname, *retvalue; + int error, line; + size_t len; + + line = 0; + error = resource_find(&line, NULL, name, &unit, resname, NULL, + &retname, NULL, NULL, NULL, NULL, &retvalue); + if (error) + return (error); + + retname -= strlen("hint."); + len = retvalue - retname - 1; + if (len > sizeof(varname) - 1) + return (ENAMETOOLONG); + memcpy(varname, retname, len); + varname[len] = '\0'; + return (unsetenv(varname)); +} Modified: stable/10/sys/sys/bus.h ============================================================================== --- stable/10/sys/sys/bus.h Mon Feb 1 22:16:41 2016 (r295130) +++ stable/10/sys/sys/bus.h Mon Feb 1 23:07:31 2016 (r295131) @@ -31,6 +31,7 @@ #include #include +#include /** * @defgroup NEWBUS newbus - a generic framework for managing devices @@ -75,9 +76,43 @@ struct u_device { /* XXX more driver info? */ }; +/** + * @brief Device request structure used for ioctl's. + * + * Used for ioctl's on /dev/devctl2. All device ioctl's + * must have parameter definitions which begin with dr_name. + */ +struct devreq_buffer { + void *buffer; + size_t length; +}; + +struct devreq { + char dr_name[128]; + int dr_flags; /* request-specific flags */ + union { + struct devreq_buffer dru_buffer; + void *dru_data; + } dr_dru; +#define dr_buffer dr_dru.dru_buffer /* variable-sized buffer */ +#define dr_data dr_dru.dru_data /* fixed-size buffer */ +}; + +#define DEV_ATTACH _IOW('D', 1, struct devreq) +#define DEV_DETACH _IOW('D', 2, struct devreq) +#define DEV_ENABLE _IOW('D', 3, struct devreq) +#define DEV_DISABLE _IOW('D', 4, struct devreq) +#define DEV_SET_DRIVER _IOW('D', 7, struct devreq) + +/* Flags for DEV_DETACH and DEV_DISABLE. */ +#define DEVF_FORCE_DETACH 0x0000001 + +/* Flags for DEV_SET_DRIVER. */ +#define DEVF_SET_DRIVER_DETACH 0x0000001 /* Detach existing driver. */ + #ifdef _KERNEL -#include +#include #include /** @@ -94,6 +129,14 @@ void devctl_queue_data_f(char *__data, i void devctl_queue_data(char *__data); /** + * Device name parsers. Hook to allow device enumerators to map + * scheme-specific names to a device. + */ +typedef void (*dev_lookup_fn)(void *arg, const char *name, + device_t *result); +EVENTHANDLER_DECLARE(dev_lookup, dev_lookup_fn); + +/** * @brief A device driver (included mainly for compatibility with * FreeBSD 4.x). */ @@ -454,6 +497,7 @@ struct sysctl_oid *device_get_sysctl_tre int device_is_alive(device_t dev); /* did probe succeed? */ int device_is_attached(device_t dev); /* did attach succeed? */ int device_is_enabled(device_t dev); +int device_is_suspended(device_t dev); int device_is_quiet(device_t dev); int device_print_prettyname(device_t dev); int device_printf(device_t dev, const char *, ...) __printflike(2, 3); @@ -517,6 +561,8 @@ int resource_set_long(const char *name, long value); int resource_set_string(const char *name, int unit, const char *resname, const char *value); +int resource_unset_value(const char *name, int unit, const char *resname); + /* * Functions for maintaining and checking consistency of * bus information exported to userspace. Modified: stable/10/usr.sbin/Makefile ============================================================================== --- stable/10/usr.sbin/Makefile Mon Feb 1 22:16:41 2016 (r295130) +++ stable/10/usr.sbin/Makefile Mon Feb 1 23:07:31 2016 (r295131) @@ -20,6 +20,7 @@ SUBDIR= adduser \ ctld \ daemon \ dconschat \ + devctl \ devinfo \ digictl \ diskinfo \ Modified: stable/10/usr.sbin/devctl/Makefile ============================================================================== --- head/usr.sbin/devctl/Makefile Fri Feb 6 16:09:01 2015 (r278320) +++ stable/10/usr.sbin/devctl/Makefile Mon Feb 1 23:07:31 2016 (r295131) @@ -2,8 +2,8 @@ PROG= devctl MAN= devctl.8 -MAN= -LIBADD= devctl +DPADD= ${LIBDEVCTL} +LDADD= -ldevctl .include Modified: stable/10/usr.sbin/devctl/devctl.8 ============================================================================== --- head/usr.sbin/devctl/devctl.8 Fri Feb 6 16:09:01 2015 (r278320) +++ stable/10/usr.sbin/devctl/devctl.8 Mon Feb 1 23:07:31 2016 (r295131) @@ -47,12 +47,6 @@ .Cm enable .Ar device .Nm -.Cm suspend -.Ar device -.Nm -.Cm resume -.Ar device -.Nm .Cm set driver .Op Fl f .Ar device driver @@ -106,11 +100,6 @@ Enable a device. The device will probe and attach if a suitable device driver is found. Note that this can re-enable a device disabled at boot time via a loader tunable. -.It Cm suspend Ar device -Suspend a device. -This may include placing the device in a reduced power state. -.It Cm resume device -Resume a suspended device to a fully working state. .It Xo Cm set driver .Op Fl f .Ar device driver Modified: stable/10/usr.sbin/devctl/devctl.c ============================================================================== --- head/usr.sbin/devctl/devctl.c Fri Feb 6 16:09:01 2015 (r278320) +++ stable/10/usr.sbin/devctl/devctl.c Mon Feb 1 23:07:31 2016 (r295131) @@ -70,13 +70,11 @@ DEVCTL_TABLE(top, set); static void usage(void) { - fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n", + fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n", "usage: devctl attach device", " devctl detach [-f] device", " devctl disable [-f] device", " devctl enable device", - " devctl suspend device", - " devctl resume device", " devctl set driver [-f] device driver"); exit(1); } @@ -201,30 +199,6 @@ enable(int ac, char **av) } DEVCTL_COMMAND(top, enable, enable); -static int -suspend(int ac, char **av) -{ - - if (ac != 2) - usage(); - if (devctl_suspend(av[1]) < 0) - err(1, "Failed to suspend %s", av[1]); - return (0); -} -DEVCTL_COMMAND(top, suspend, suspend); - -static int -resume(int ac, char **av) -{ - - if (ac != 2) - usage(); - if (devctl_resume(av[1]) < 0) - err(1, "Failed to resume %s", av[1]); - return (0); -} -DEVCTL_COMMAND(top, resume, resume); - static void set_driver_usage(void) { From owner-svn-src-stable-10@freebsd.org Tue Feb 2 01:23:06 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7FCE8A9818D for ; Tue, 2 Feb 2016 01:23:06 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail-wm0-x22d.google.com (mail-wm0-x22d.google.com [IPv6:2a00:1450:400c:c09::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AC375147C for ; Tue, 2 Feb 2016 01:23:05 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: by mail-wm0-x22d.google.com with SMTP id l66so745553wml.0 for ; Mon, 01 Feb 2016 17:23:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sippysoft-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=UBpXhxHRALj8uksailVoJI9znOuWJn0z0HOM4P+X6iI=; b=xVj4YnPwLw2GJObZHDKwUA7z0709Oed9y34z4xYwKnfnGi4pqeIMgrjxILrtww8qEC Bqn+/pxw3D91oLaSooSROXew8ctbmAPGgkky5kzlzxTUBo4N9Y5CLbbx2xRaMWs8S4+9 wdcy+Z29HrtEAKZ7OI9ECw/EvS2Ypppy2Hz+hX1osz6frzY56oY1G4S+rA4/jmvdFjrp Rc9lTYWO9zK8A4B1OCkNU3y1n/YaJQX725HWsWaemynJUvhMck6MDADL/HJjJa2yMdAT RARlBeIn1coFTD3gUWKkwrU2Y/k03VUYvXOxXh6J1e/TUvW3gzCo4WKOdDiNh8dP9n1E ucMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=UBpXhxHRALj8uksailVoJI9znOuWJn0z0HOM4P+X6iI=; b=eg/KfEWtxHI8nZqReIJWnwQD/82Cp/bQAC+ez4JdbJcw5+uxJx4WLx/7biYZMC6JZA bbb5XJxLUFk52o79dSIZWwGaijr57vfCE9bpm0ahHBaLqWwrZipWuCX+Mpx9dp4bRluH w4h4rtgkaUZ3WHv+Kz+DmMaBiJgeGv30wyceUPj4Xfd+IxGml8Jg4h2aBsof3tDpMYYw IsfQPbaBcDyXvP4wkX7XOdVKy1p0DjAv88UrZVUCYvk6ZJ+mMKAWQPSXBLmgQvE+/TtH Dsnq0XmN3Gbp4fdL9oqhuOd0FBlIzlQw77b76FDGu0AUv1V5kUbvzYiGKyFZiTxF0v7E aNiA== X-Gm-Message-State: AG10YOTXT2nKY9d7/VO313EgFRIoyhY5O03UMZ+3tnbNPlV6BrQyV706PQANRLMJXw3Wy/dJhaDXLqXEosLPkLGr MIME-Version: 1.0 X-Received: by 10.194.174.36 with SMTP id bp4mr25141243wjc.137.1454376183183; Mon, 01 Feb 2016 17:23:03 -0800 (PST) Sender: sobomax@sippysoft.com Received: by 10.27.39.195 with HTTP; Mon, 1 Feb 2016 17:23:03 -0800 (PST) In-Reply-To: <201601161906.u0GJ6Cid076259@repo.freebsd.org> References: <201601161906.u0GJ6Cid076259@repo.freebsd.org> Date: Mon, 1 Feb 2016 17:23:03 -0800 X-Google-Sender-Auth: ZTjnZUjr2I4xIWc5YV78Ce7xUn0 Message-ID: Subject: Re: svn: stable/10/contrib/unbound: . compat daemon dns64 dnstap doc iterator libunbound libunbound/python libunbound/python/doc libunbound/python/doc/modules libunbound/python/exam... From: Maxim Sobolev To: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 01:23:06 -0000 > Added: > stable/10/contrib/unbound/.gitignore Please remove this from both HEAD and stable. It "ignores" config.h, which is actually needed for the FreeBSD build. But in general, those files don't need to be in FreeBSD tree. Thanks! -Max On Sat, Jan 16, 2016 at 11:06 AM, Dag-Erling Sm=C3=B8rgrav wrote: > Author: des > Date: Sat Jan 16 19:06:12 2016 > New Revision: 294190 > URL: https://svnweb.freebsd.org/changeset/base/294190 > > Log: > MFH (r292206): upgrade to Unbound 1.5.7 > MFH (r292135): run configure script with correct compiler > > Added: > stable/10/contrib/unbound/.gitignore > - copied unchanged from r292206, head/contrib/unbound/.gitignore > stable/10/contrib/unbound/compat/isblank.c > - copied unchanged from r292206, head/contrib/unbound/compat/isblank= .c > Modified: > stable/10/contrib/unbound/Makefile.in > stable/10/contrib/unbound/acx_nlnetlabs.m4 > stable/10/contrib/unbound/compat/arc4random.c > stable/10/contrib/unbound/compat/getentropy_linux.c > stable/10/contrib/unbound/compat/getentropy_solaris.c > stable/10/contrib/unbound/compat/reallocarray.c > stable/10/contrib/unbound/compat/sha512.c > stable/10/contrib/unbound/compat/snprintf.c > stable/10/contrib/unbound/config.h > stable/10/contrib/unbound/config.h.in > stable/10/contrib/unbound/configure > stable/10/contrib/unbound/configure.ac > stable/10/contrib/unbound/daemon/remote.c > stable/10/contrib/unbound/daemon/unbound.c > stable/10/contrib/unbound/daemon/worker.c > stable/10/contrib/unbound/dns64/dns64.c > stable/10/contrib/unbound/dnstap/dnstap.proto > stable/10/contrib/unbound/doc/Changelog > stable/10/contrib/unbound/doc/README > stable/10/contrib/unbound/doc/example.conf > stable/10/contrib/unbound/doc/example.conf.in > stable/10/contrib/unbound/doc/libunbound.3 > stable/10/contrib/unbound/doc/libunbound.3.in > stable/10/contrib/unbound/doc/unbound-anchor.8 > stable/10/contrib/unbound/doc/unbound-anchor.8.in > stable/10/contrib/unbound/doc/unbound-checkconf.8 > stable/10/contrib/unbound/doc/unbound-checkconf.8.in > stable/10/contrib/unbound/doc/unbound-control.8 > stable/10/contrib/unbound/doc/unbound-control.8.in > stable/10/contrib/unbound/doc/unbound-host.1 > stable/10/contrib/unbound/doc/unbound-host.1.in > stable/10/contrib/unbound/doc/unbound.8 > stable/10/contrib/unbound/doc/unbound.8.in > stable/10/contrib/unbound/doc/unbound.conf.5 > stable/10/contrib/unbound/doc/unbound.conf.5.in > stable/10/contrib/unbound/freebsd-configure.sh > stable/10/contrib/unbound/iterator/iter_scrub.c > stable/10/contrib/unbound/iterator/iter_utils.c > stable/10/contrib/unbound/iterator/iterator.c > stable/10/contrib/unbound/iterator/iterator.h > stable/10/contrib/unbound/libunbound/libunbound.c > stable/10/contrib/unbound/libunbound/python/Makefile > stable/10/contrib/unbound/libunbound/python/doc/install.rst > stable/10/contrib/unbound/libunbound/python/doc/modules/unbound.rst > stable/10/contrib/unbound/libunbound/python/examples/dnssec-valid.py > stable/10/contrib/unbound/libunbound/python/libunbound.i > stable/10/contrib/unbound/ltmain.sh > stable/10/contrib/unbound/services/cache/dns.c > stable/10/contrib/unbound/services/cache/rrset.c > stable/10/contrib/unbound/sldns/parseutil.h > stable/10/contrib/unbound/sldns/wire2str.c > stable/10/contrib/unbound/smallapp/unbound-anchor.c > stable/10/contrib/unbound/smallapp/unbound-checkconf.c > stable/10/contrib/unbound/smallapp/unbound-control-setup.sh > stable/10/contrib/unbound/smallapp/unbound-control-setup.sh.in > stable/10/contrib/unbound/smallapp/unbound-control.c > stable/10/contrib/unbound/util/config_file.c > stable/10/contrib/unbound/util/config_file.h > stable/10/contrib/unbound/util/configlexer.lex > stable/10/contrib/unbound/util/configparser.y > stable/10/contrib/unbound/util/iana_ports.inc > stable/10/contrib/unbound/util/locks.c > stable/10/contrib/unbound/util/net_help.c > stable/10/contrib/unbound/util/random.c > stable/10/contrib/unbound/util/rbtree.c > stable/10/contrib/unbound/util/rtt.h > stable/10/contrib/unbound/util/storage/lookup3.c > stable/10/contrib/unbound/util/tube.h > stable/10/contrib/unbound/util/winsock_event.h > stable/10/contrib/unbound/validator/autotrust.c > stable/10/contrib/unbound/validator/val_neg.c > stable/10/contrib/unbound/validator/val_neg.h > stable/10/contrib/unbound/validator/val_nsec.c > stable/10/contrib/unbound/validator/val_nsec.h > stable/10/contrib/unbound/validator/val_nsec3.c > stable/10/contrib/unbound/validator/val_nsec3.h > stable/10/contrib/unbound/validator/val_secalgo.c > stable/10/contrib/unbound/validator/val_secalgo.h > stable/10/contrib/unbound/validator/val_sigcrypt.c > stable/10/contrib/unbound/validator/val_utils.h > stable/10/contrib/unbound/validator/validator.c > Directory Properties: > stable/10/ (props changed) > > Copied: stable/10/contrib/unbound/.gitignore (from r292206, > head/contrib/unbound/.gitignore) > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ stable/10/contrib/unbound/.gitignore Sat Jan 16 19:06:12 2016 > (r294190, copy of r292206, head/contrib/unbound/.gitignore) > @@ -0,0 +1,38 @@ > +*.lo > +*.o > +/.libs/ > +/Makefile > +/autom4te.cache/ > +/config.h > +/config.log > +/config.status > +/dnstap/dnstap_config.h > +/doc/example.conf > +/doc/libunbound.3 > +/doc/unbound-anchor.8 > +/doc/unbound-checkconf.8 > +/doc/unbound-control.8 > +/doc/unbound-host.1 > +/doc/unbound.8 > +/doc/unbound.conf.5 > +/libtool > +/libunbound.la > +/smallapp/unbound-control-setup.sh > +/unbound > +/unbound-anchor > +/unbound-checkconf > +/unbound-control > +/unbound-control-setup > +/unbound-host > +/unbound.h > +/asynclook > +/delayer > +/lock-verify > +/memstats > +/perf > +/petal > +/pktview > +/streamtcp > +/testbound > +/unittest > + > > Modified: stable/10/contrib/unbound/Makefile.in > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- stable/10/contrib/unbound/Makefile.in Sat Jan 16 18:59:10 2016 > (r294189) > +++ stable/10/contrib/unbound/Makefile.in Sat Jan 16 19:06:12 2016 > (r294190) > @@ -38,6 +38,7 @@ UNBOUND_VERSION_MINOR=3D@UNBOUND_VERSION_M > UNBOUND_VERSION_MICRO=3D@UNBOUND_VERSION_MICRO@ > ALLTARGET=3D@ALLTARGET@ > INSTALLTARGET=3D@INSTALLTARGET@ > +SSLLIB=3D@SSLLIB@ > > # _unbound.la if pyunbound enabled. > PYUNBOUND_TARGET=3D@PYUNBOUND_TARGET@ > @@ -132,7 +133,7 @@ compat/memcmp.c compat/memmove.c compat/ > compat/strlcpy.c compat/strptime.c compat/getentropy_linux.c \ > compat/getentropy_osx.c compat/getentropy_solaris.c > compat/getentropy_win.c \ > compat/explicit_bzero.c compat/arc4random.c compat/arc4random_uniform.c = \ > -compat/arc4_lock.c compat/sha512.c compat/reallocarray.c > +compat/arc4_lock.c compat/sha512.c compat/reallocarray.c compat/isblank.= c > COMPAT_OBJ=3D$(LIBOBJS:.o=3D.lo) > COMPAT_OBJ_WITHOUT_CTIME=3D$(LIBOBJ_WITHOUT_CTIME:.o=3D.lo) > COMPAT_OBJ_WITHOUT_CTIMEARC4=3D$(LIBOBJ_WITHOUT_CTIMEARC4:.o=3D.lo) > @@ -295,22 +296,22 @@ longtest: tests > lib: libunbound.la unbound.h > > libunbound.la: $(LIBUNBOUND_OBJ_LINK) > - $(LINK_LIB) $(UBSYMS) -o $@ $(LIBUNBOUND_OBJ_LINK) -rpath > $(libdir) -lssl $(LIBS) > + $(LINK_LIB) $(UBSYMS) -o $@ $(LIBUNBOUND_OBJ_LINK) -rpath > $(libdir) $(SSLLIB) $(LIBS) > > unbound$(EXEEXT): $(DAEMON_OBJ_LINK) libunbound.la > - $(LINK) -o $@ $(DAEMON_OBJ_LINK) $(EXTRALINK) -lssl $(LIBS) > + $(LINK) -o $@ $(DAEMON_OBJ_LINK) $(EXTRALINK) $(SSLLIB) $(LIBS) > > unbound-checkconf$(EXEEXT): $(CHECKCONF_OBJ_LINK) libunbound.la > - $(LINK) -o $@ $(CHECKCONF_OBJ_LINK) $(EXTRALINK) -lssl $(LIBS) > + $(LINK) -o $@ $(CHECKCONF_OBJ_LINK) $(EXTRALINK) $(SSLLIB) $(LIBS= ) > > unbound-control$(EXEEXT): $(CONTROL_OBJ_LINK) libunbound.la > - $(LINK) -o $@ $(CONTROL_OBJ_LINK) $(EXTRALINK) -lssl $(LIBS) > + $(LINK) -o $@ $(CONTROL_OBJ_LINK) $(EXTRALINK) $(SSLLIB) $(LIBS) > > unbound-host$(EXEEXT): $(HOST_OBJ_LINK) libunbound.la > $(LINK) -o $@ $(HOST_OBJ_LINK) -L. -L.libs -lunbound $(LIBS) > > unbound-anchor$(EXEEXT): $(UBANCHOR_OBJ_LINK) libunbound.la > - $(LINK) -o $@ $(UBANCHOR_OBJ_LINK) -L. -L.libs -lunbound -lexpat > -lssl $(LIBS) > + $(LINK) -o $@ $(UBANCHOR_OBJ_LINK) -L. -L.libs -lunbound -lexpat > $(SSLLIB) $(LIBS) > > unbound-service-install$(EXEEXT): $(SVCINST_OBJ_LINK) > $(LINK) -o $@ $(SVCINST_OBJ_LINK) $(LIBS) > @@ -322,37 +323,37 @@ anchor-update$(EXEEXT): $(ANCHORUPD_OBJ > $(LINK) -o $@ $(ANCHORUPD_OBJ_LINK) -L. -L.libs -lunbound $(LIBS) > > unittest$(EXEEXT): $(UNITTEST_OBJ_LINK) > - $(LINK) -o $@ $(UNITTEST_OBJ_LINK) -lssl $(LIBS) > + $(LINK) -o $@ $(UNITTEST_OBJ_LINK) $(SSLLIB) $(LIBS) > > testbound$(EXEEXT): $(TESTBOUND_OBJ_LINK) > - $(LINK) -o $@ $(TESTBOUND_OBJ_LINK) -lssl $(LIBS) > + $(LINK) -o $@ $(TESTBOUND_OBJ_LINK) $(SSLLIB) $(LIBS) > > lock-verify$(EXEEXT): $(LOCKVERIFY_OBJ_LINK) > - $(LINK) -o $@ $(LOCKVERIFY_OBJ_LINK) -lssl $(LIBS) > + $(LINK) -o $@ $(LOCKVERIFY_OBJ_LINK) $(SSLLIB) $(LIBS) > > petal$(EXEEXT): $(PETAL_OBJ_LINK) > - $(LINK) -o $@ $(PETAL_OBJ_LINK) -lssl $(LIBS) > + $(LINK) -o $@ $(PETAL_OBJ_LINK) $(SSLLIB) $(LIBS) > > pktview$(EXEEXT): $(PKTVIEW_OBJ_LINK) > - $(LINK) -o $@ $(PKTVIEW_OBJ_LINK) -lssl $(LIBS) > + $(LINK) -o $@ $(PKTVIEW_OBJ_LINK) $(SSLLIB) $(LIBS) > > memstats$(EXEEXT): $(MEMSTATS_OBJ_LINK) > - $(LINK) -o $@ $(MEMSTATS_OBJ_LINK) -lssl $(LIBS) > + $(LINK) -o $@ $(MEMSTATS_OBJ_LINK) $(SSLLIB) $(LIBS) > > asynclook$(EXEEXT): $(ASYNCLOOK_OBJ_LINK) libunbound.la > $(LINK) -o $@ $(ASYNCLOOK_OBJ_LINK) $(LIBS) -L. -L.libs -lunbound > > streamtcp$(EXEEXT): $(STREAMTCP_OBJ_LINK) > - $(LINK) -o $@ $(STREAMTCP_OBJ_LINK) -lssl $(LIBS) > + $(LINK) -o $@ $(STREAMTCP_OBJ_LINK) $(SSLLIB) $(LIBS) > > perf$(EXEEXT): $(PERF_OBJ_LINK) > - $(LINK) -o $@ $(PERF_OBJ_LINK) -lssl $(LIBS) > + $(LINK) -o $@ $(PERF_OBJ_LINK) $(SSLLIB) $(LIBS) > > delayer$(EXEEXT): $(DELAYER_OBJ_LINK) > - $(LINK) -o $@ $(DELAYER_OBJ_LINK) -lssl $(LIBS) > + $(LINK) -o $@ $(DELAYER_OBJ_LINK) $(SSLLIB) $(LIBS) > > signit$(EXEEXT): testcode/signit.c > - $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ testcode/signit.c $(LDFLAGS) > -lldns -lssl $(LIBS) > + $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ testcode/signit.c $(LDFLAGS) > -lldns $(SSLLIB) $(LIBS) > > unbound.h: $(srcdir)/libunbound/unbound.h > sed -e 's/@''UNBOUND_VERSION_MAJOR@/$(UNBOUND_VERSION_MAJOR)/' -e > 's/@''UNBOUND_VERSION_MINOR@/$(UNBOUND_VERSION_MINOR)/' -e > 's/@''UNBOUND_VERSION_MICRO@/$(UNBOUND_VERSION_MICRO)/' < > $(srcdir)/libunbound/unbound.h > $@ > @@ -644,7 +645,7 @@ iterator.lo iterator.o: $(srcdir)/iterat > $(srcdir)/util/rtt.h $(srcdir)/util/netevent.h $(srcdir)/util/net_help.= h > $(srcdir)/util/regional.h \ > $(srcdir)/util/data/dname.h $(srcdir)/util/data/msgencode.h > $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h \ > $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h > $(srcdir)/util/config_file.h $(srcdir)/util/random.h \ > - $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/parseutil.h > $(srcdir)/sldns/sbuffer.h > + $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/str2wire.h > $(srcdir)/sldns/parseutil.h $(srcdir)/sldns/sbuffer.h > iter_delegpt.lo iter_delegpt.o: $(srcdir)/iterator/iter_delegpt.c > config.h $(srcdir)/iterator/iter_delegpt.h \ > $(srcdir)/util/log.h $(srcdir)/services/cache/dns.h > $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ > $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h > $(srcdir)/util/regional.h \ > @@ -727,8 +728,7 @@ outside_network.lo outside_network.o: $( > $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h > $(srcdir)/util/data/msgencode.h \ > $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h > $(srcdir)/util/random.h $(srcdir)/util/fptr_wlist.h \ > $(srcdir)/util/module.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h > $(srcdir)/services/modstack.h \ > - $(srcdir)/sldns/sbuffer.h $(srcdir)/dnstap/dnstap.h \ > - > + $(srcdir)/sldns/sbuffer.h $(srcdir)/dnstap/dnstap.h > alloc.lo alloc.o: $(srcdir)/util/alloc.c config.h $(srcdir)/util/alloc.h > $(srcdir)/util/locks.h $(srcdir)/util/log.h \ > $(srcdir)/util/regional.h $(srcdir)/util/data/packed_rrset.h > $(srcdir)/util/storage/lruhash.h \ > $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h > $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ > @@ -776,14 +776,12 @@ netevent.lo netevent.o: $(srcdir)/util/n > $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h > $(srcdir)/util/data/packed_rrset.h \ > $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h > $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ > $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h > $(srcdir)/services/modstack.h $(srcdir)/sldns/sbuffer.h \ > - $(srcdir)/dnstap/dnstap.h \ > - $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h > + $(srcdir)/dnstap/dnstap.h $(srcdir)/util/mini_event.h > $(srcdir)/util/rbtree.h > net_help.lo net_help.o: $(srcdir)/util/net_help.c config.h > $(srcdir)/util/net_help.h $(srcdir)/util/log.h \ > $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h > $(srcdir)/util/locks.h $(srcdir)/util/module.h \ > $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h > $(srcdir)/util/data/msgparse.h \ > $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h > $(srcdir)/util/regional.h $(srcdir)/sldns/parseutil.h \ > - $(srcdir)/sldns/wire2str.h \ > - > + $(srcdir)/sldns/wire2str.h > random.lo random.o: $(srcdir)/util/random.c config.h > $(srcdir)/util/random.h $(srcdir)/util/log.h > rbtree.lo rbtree.o: $(srcdir)/util/rbtree.c config.h $(srcdir)/util/log.= h > $(srcdir)/util/fptr_wlist.h \ > $(srcdir)/util/netevent.h $(srcdir)/util/storage/lruhash.h > $(srcdir)/util/locks.h $(srcdir)/util/log.h \ > @@ -818,8 +816,7 @@ autotrust.lo autotrust.o: $(srcdir)/vali > $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h > $(srcdir)/util/regional.h $(srcdir)/util/random.h \ > $(srcdir)/services/mesh.h $(srcdir)/util/netevent.h > $(srcdir)/services/modstack.h \ > $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h > $(srcdir)/validator/val_kcache.h \ > - $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/wire2str.h > $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/keyraw.h \ > - > + $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/wire2str.h > $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/keyraw.h > val_anchor.lo val_anchor.o: $(srcdir)/validator/val_anchor.c config.h > $(srcdir)/validator/val_anchor.h \ > $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/util/log.h > $(srcdir)/validator/val_sigcrypt.h \ > $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h > $(srcdir)/validator/autotrust.h \ > @@ -844,18 +841,16 @@ val_kcache.lo val_kcache.o: $(srcdir)/va > val_kentry.lo val_kentry.o: $(srcdir)/validator/val_kentry.c config.h > $(srcdir)/validator/val_kentry.h \ > $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h > $(srcdir)/util/log.h $(srcdir)/util/data/packed_rrset.h \ > $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lookup3.h > $(srcdir)/util/regional.h $(srcdir)/util/net_help.h \ > - $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/keyraw.h \ > - > -val_neg.lo val_neg.o: $(srcdir)/validator/val_neg.c config.h \ > - $(srcdir)/validator/val_neg.h $(srcdir)/util/locks.h > $(srcdir)/util/log.h $(srcdir)/util/rbtree.h \ > - $(srcdir)/validator/val_nsec.h $(srcdir)/util/data/packed_rrset.h > $(srcdir)/util/storage/lruhash.h \ > - $(srcdir)/validator/val_nsec3.h $(srcdir)/validator/val_utils.h > $(srcdir)/util/data/dname.h \ > - $(srcdir)/util/data/msgreply.h $(srcdir)/util/net_help.h > $(srcdir)/util/config_file.h \ > - $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h > $(srcdir)/services/cache/dns.h \ > - $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/sbuffer.h > -val_nsec3.lo val_nsec3.o: $(srcdir)/validator/val_nsec3.c config.h \ > - $(srcdir)/validator/val_nsec3.h $(srcdir)/util/rbtree.h > $(srcdir)/util/data/packed_rrset.h \ > - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h > $(srcdir)/util/log.h $(srcdir)/validator/validator.h \ > + $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/keyraw.h > +val_neg.lo val_neg.o: $(srcdir)/validator/val_neg.c config.h > $(srcdir)/validator/val_neg.h $(srcdir)/util/locks.h \ > + $(srcdir)/util/log.h $(srcdir)/util/rbtree.h > $(srcdir)/validator/val_nsec.h $(srcdir)/util/data/packed_rrset.h \ > + $(srcdir)/util/storage/lruhash.h $(srcdir)/validator/val_nsec3.h > $(srcdir)/validator/val_utils.h \ > + $(srcdir)/util/data/dname.h $(srcdir)/util/data/msgreply.h > $(srcdir)/util/net_help.h \ > + $(srcdir)/util/config_file.h $(srcdir)/services/cache/rrset.h > $(srcdir)/util/storage/slabhash.h \ > + $(srcdir)/services/cache/dns.h $(srcdir)/sldns/rrdef.h > $(srcdir)/sldns/sbuffer.h > +val_nsec3.lo val_nsec3.o: $(srcdir)/validator/val_nsec3.c config.h > $(srcdir)/validator/val_nsec3.h \ > + $(srcdir)/util/rbtree.h $(srcdir)/util/data/packed_rrset.h > $(srcdir)/util/storage/lruhash.h \ > + $(srcdir)/util/locks.h $(srcdir)/util/log.h > $(srcdir)/validator/val_secalgo.h $(srcdir)/validator/validator.h \ > $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h > $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ > $(srcdir)/sldns/rrdef.h $(srcdir)/validator/val_utils.h > $(srcdir)/validator/val_kentry.h \ > $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h > $(srcdir)/util/regional.h \ > @@ -867,17 +862,15 @@ val_nsec.lo val_nsec.o: $(srcdir)/valida > $(srcdir)/sldns/rrdef.h $(srcdir)/services/cache/rrset.h > $(srcdir)/util/storage/slabhash.h > val_secalgo.lo val_secalgo.o: $(srcdir)/validator/val_secalgo.c config.h > $(srcdir)/util/data/packed_rrset.h \ > $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h > $(srcdir)/util/log.h $(srcdir)/validator/val_secalgo.h \ > - $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/keyraw.h \ > - $(srcdir)/sldns/sbuffer.h \ > - > + $(srcdir)/validator/val_nsec3.h $(srcdir)/util/rbtree.h > $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/keyraw.h \ > + $(srcdir)/sldns/sbuffer.h > val_sigcrypt.lo val_sigcrypt.o: $(srcdir)/validator/val_sigcrypt.c > config.h \ > $(srcdir)/validator/val_sigcrypt.h $(srcdir)/util/data/packed_rrset.h > $(srcdir)/util/storage/lruhash.h \ > $(srcdir)/util/locks.h $(srcdir)/util/log.h > $(srcdir)/validator/val_secalgo.h $(srcdir)/validator/validator.h \ > $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h > $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ > $(srcdir)/sldns/rrdef.h $(srcdir)/validator/val_utils.h > $(srcdir)/util/data/dname.h $(srcdir)/util/rbtree.h \ > - $(srcdir)/util/net_help.h $(srcdir)/util/regional.h > $(srcdir)/sldns/keyraw.h \ > - $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/parseutil.h > $(srcdir)/sldns/wire2str.h \ > - > + $(srcdir)/util/net_help.h $(srcdir)/util/regional.h > $(srcdir)/sldns/keyraw.h $(srcdir)/sldns/sbuffer.h \ > + $(srcdir)/sldns/parseutil.h $(srcdir)/sldns/wire2str.h > val_utils.lo val_utils.o: $(srcdir)/validator/val_utils.c config.h > $(srcdir)/validator/val_utils.h \ > $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h > $(srcdir)/util/locks.h $(srcdir)/util/log.h \ > $(srcdir)/validator/validator.h $(srcdir)/util/module.h > $(srcdir)/util/data/msgreply.h \ > @@ -895,11 +888,6 @@ dns64.lo dns64.o: $(srcdir)/dns64/dns64. > $(srcdir)/services/modstack.h $(srcdir)/util/net_help.h > $(srcdir)/util/regional.h > checklocks.lo checklocks.o: $(srcdir)/testcode/checklocks.c config.h > $(srcdir)/util/locks.h $(srcdir)/util/log.h \ > $(srcdir)/testcode/checklocks.h > -dnstap.lo dnstap.o: $(srcdir)/dnstap/dnstap.c config.h > $(srcdir)/sldns/sbuffer.h \ > - $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h > $(srcdir)/util/log.h $(srcdir)/util/netevent.h \ > - $(srcdir)/dnstap/dnstap.h \ > - $(srcdir)/dnstap/dnstap.pb-c.h > -dnstap.pb-c.lo dnstap.pb-c.o: $(srcdir)/dnstap/dnstap.pb-c.c > $(srcdir)/dnstap/dnstap.pb-c.h > unitanchor.lo unitanchor.o: $(srcdir)/testcode/unitanchor.c config.h > $(srcdir)/util/log.h $(srcdir)/util/data/dname.h \ > $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h > $(srcdir)/testcode/unitmain.h \ > $(srcdir)/validator/val_anchor.h $(srcdir)/util/rbtree.h > $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/rrdef.h > @@ -908,8 +896,7 @@ unitdname.lo unitdname.o: $(srcdir)/test > $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h > unitlruhash.lo unitlruhash.o: $(srcdir)/testcode/unitlruhash.c config.h > $(srcdir)/testcode/unitmain.h \ > $(srcdir)/util/log.h $(srcdir)/util/storage/lruhash.h > $(srcdir)/util/locks.h $(srcdir)/util/storage/slabhash.h > -unitmain.lo unitmain.o: $(srcdir)/testcode/unitmain.c config.h \ > - $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/keyraw.h \ > +unitmain.lo unitmain.o: $(srcdir)/testcode/unitmain.c config.h > $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/keyraw.h \ > $(srcdir)/util/log.h $(srcdir)/testcode/unitmain.h > $(srcdir)/util/alloc.h $(srcdir)/util/locks.h $(srcdir)/util/net_help.h \ > $(srcdir)/util/config_file.h $(srcdir)/util/rtt.h > $(srcdir)/services/cache/infra.h \ > $(srcdir)/util/storage/lruhash.h $(srcdir)/util/storage/dnstree.h > $(srcdir)/util/rbtree.h \ > @@ -947,38 +934,35 @@ unitldns.lo unitldns.o: $(srcdir)/testco > acl_list.lo acl_list.o: $(srcdir)/daemon/acl_list.c config.h > $(srcdir)/daemon/acl_list.h \ > $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h > $(srcdir)/util/regional.h $(srcdir)/util/log.h \ > $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h > -cachedump.lo cachedump.o: $(srcdir)/daemon/cachedump.c config.h \ > - $(srcdir)/daemon/cachedump.h $(srcdir)/daemon/remote.h > $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h \ > - $(srcdir)/sldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h > $(srcdir)/util/storage/lruhash.h \ > - $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/netevent.h > $(srcdir)/util/alloc.h \ > +cachedump.lo cachedump.o: $(srcdir)/daemon/cachedump.c config.h > $(srcdir)/daemon/cachedump.h \ > + $(srcdir)/daemon/remote.h $(srcdir)/daemon/worker.h > $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ > + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h > $(srcdir)/util/locks.h $(srcdir)/util/log.h \ > + $(srcdir)/util/netevent.h $(srcdir)/util/alloc.h > $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h \ > + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h > $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h \ > + $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h \ > + $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h > $(srcdir)/services/cache/dns.h \ > + $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h > $(srcdir)/util/rbtree.h $(srcdir)/util/rtt.h \ > + $(srcdir)/util/regional.h $(srcdir)/util/net_help.h > $(srcdir)/util/data/dname.h $(srcdir)/iterator/iterator.h \ > + $(srcdir)/services/outbound_list.h $(srcdir)/iterator/iter_delegpt.h > $(srcdir)/iterator/iter_utils.h \ > + $(srcdir)/iterator/iter_resptype.h $(srcdir)/iterator/iter_fwd.h > $(srcdir)/iterator/iter_hints.h \ > + $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/str2wire.h > +daemon.lo daemon.o: $(srcdir)/daemon/daemon.c config.h > $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h \ > + $(srcdir)/util/log.h $(srcdir)/util/alloc.h > $(srcdir)/services/modstack.h \ > + $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h > $(srcdir)/sldns/sbuffer.h \ > + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h > $(srcdir)/util/netevent.h \ > $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h > $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ > $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h > $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h \ > - $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ > - $(srcdir)/services/cache/dns.h $(srcdir)/services/cache/infra.h > $(srcdir)/util/storage/dnstree.h \ > - $(srcdir)/util/rbtree.h $(srcdir)/util/rtt.h $(srcdir)/util/regional.h > $(srcdir)/util/net_help.h \ > - $(srcdir)/util/data/dname.h $(srcdir)/iterator/iterator.h > $(srcdir)/services/outbound_list.h \ > - $(srcdir)/iterator/iter_delegpt.h $(srcdir)/iterator/iter_utils.h > $(srcdir)/iterator/iter_resptype.h \ > - $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h > $(srcdir)/sldns/wire2str.h \ > - $(srcdir)/sldns/str2wire.h > -daemon.lo daemon.o: $(srcdir)/daemon/daemon.c config.h \ > - $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h $(srcdir)/util/log.h > $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ > - $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h \ > - $(srcdir)/sldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h > $(srcdir)/util/storage/lruhash.h \ > - $(srcdir)/util/netevent.h $(srcdir)/util/data/msgreply.h > $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ > - $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h > $(srcdir)/util/timehist.h $(srcdir)/util/module.h \ > - $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/remote.h \ > - $(srcdir)/daemon/acl_list.h $(srcdir)/util/storage/dnstree.h > $(srcdir)/util/rbtree.h \ > + $(srcdir)/daemon/remote.h $(srcdir)/daemon/acl_list.h > $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h \ > $(srcdir)/util/config_file.h $(srcdir)/util/storage/lookup3.h > $(srcdir)/util/storage/slabhash.h \ > $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h > $(srcdir)/services/cache/infra.h \ > $(srcdir)/util/rtt.h $(srcdir)/services/localzone.h > $(srcdir)/util/random.h $(srcdir)/util/tube.h \ > $(srcdir)/util/net_help.h $(srcdir)/sldns/keyraw.h > -remote.lo remote.o: $(srcdir)/daemon/remote.c config.h \ > - $(srcdir)/daemon/remote.h \ > - $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h > $(srcdir)/sldns/sbuffer.h \ > - $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h > $(srcdir)/util/locks.h $(srcdir)/util/log.h \ > - $(srcdir)/util/netevent.h $(srcdir)/util/alloc.h > $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h \ > - $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h > $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h \ > - $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h > $(srcdir)/daemon/daemon.h \ > +remote.lo remote.o: $(srcdir)/daemon/remote.c config.h > $(srcdir)/daemon/remote.h $(srcdir)/daemon/worker.h \ > + $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h > $(srcdir)/util/data/packed_rrset.h \ > + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h > $(srcdir)/util/log.h $(srcdir)/util/netevent.h \ > + $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h > $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ > + $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h > $(srcdir)/util/timehist.h $(srcdir)/util/module.h \ > + $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/daemon.h \ > $(srcdir)/services/modstack.h $(srcdir)/daemon/cachedump.h > $(srcdir)/util/config_file.h \ > $(srcdir)/util/net_help.h $(srcdir)/services/listen_dnsport.h > $(srcdir)/services/cache/rrset.h \ > $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/infra.h > $(srcdir)/util/storage/dnstree.h \ > @@ -1002,35 +986,33 @@ stats.lo stats.o: $(srcdir)/daemon/stats > $(srcdir)/util/rtt.h $(srcdir)/validator/val_kcache.h > unbound.lo unbound.o: $(srcdir)/daemon/unbound.c config.h > $(srcdir)/util/log.h $(srcdir)/daemon/daemon.h \ > $(srcdir)/util/locks.h $(srcdir)/util/alloc.h > $(srcdir)/services/modstack.h \ > - $(srcdir)/daemon/remote.h \ > - $(srcdir)/util/config_file.h $(srcdir)/util/storage/slabhash.h > $(srcdir)/util/storage/lruhash.h \ > - $(srcdir)/services/listen_dnsport.h $(srcdir)/util/netevent.h > $(srcdir)/services/cache/rrset.h \ > - $(srcdir)/util/data/packed_rrset.h $(srcdir)/services/cache/infra.h > $(srcdir)/util/storage/dnstree.h \ > - $(srcdir)/util/rbtree.h $(srcdir)/util/rtt.h $(srcdir)/util/fptr_wlist.= h > $(srcdir)/util/module.h \ > - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h > $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ > - $(srcdir)/util/tube.h $(srcdir)/services/mesh.h > $(srcdir)/util/net_help.h $(srcdir)/util/mini_event.h \ > - $(srcdir)/util/rbtree.h > + $(srcdir)/daemon/remote.h $(srcdir)/util/config_file.h > $(srcdir)/util/storage/slabhash.h \ > + $(srcdir)/util/storage/lruhash.h $(srcdir)/services/listen_dnsport.h > $(srcdir)/util/netevent.h \ > + $(srcdir)/services/cache/rrset.h $(srcdir)/util/data/packed_rrset.h > $(srcdir)/services/cache/infra.h \ > + $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h > $(srcdir)/util/rtt.h $(srcdir)/util/fptr_wlist.h \ > + $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h > $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ > + $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h > $(srcdir)/util/net_help.h \ > + $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h > worker.lo worker.o: $(srcdir)/daemon/worker.c config.h > $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ > $(srcdir)/util/random.h $(srcdir)/daemon/worker.h > $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ > $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h > $(srcdir)/util/locks.h \ > $(srcdir)/util/netevent.h $(srcdir)/util/alloc.h > $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h \ > $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h > $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h \ > $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h > $(srcdir)/daemon/daemon.h \ > - $(srcdir)/services/modstack.h $(srcdir)/daemon/remote.h \ > - $(srcdir)/daemon/acl_list.h $(srcdir)/util/storage/dnstree.h > $(srcdir)/util/rbtree.h \ > - $(srcdir)/util/config_file.h $(srcdir)/util/regional.h > $(srcdir)/util/storage/slabhash.h \ > - $(srcdir)/services/listen_dnsport.h $(srcdir)/services/outside_network.= h > \ > - $(srcdir)/services/outbound_list.h $(srcdir)/services/cache/rrset.h > $(srcdir)/services/cache/infra.h \ > - $(srcdir)/util/rtt.h $(srcdir)/services/cache/dns.h > $(srcdir)/services/mesh.h $(srcdir)/services/localzone.h \ > + $(srcdir)/services/modstack.h $(srcdir)/daemon/remote.h > $(srcdir)/daemon/acl_list.h \ > + $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h > $(srcdir)/util/config_file.h $(srcdir)/util/regional.h \ > + $(srcdir)/util/storage/slabhash.h $(srcdir)/services/listen_dnsport.h \ > + $(srcdir)/services/outside_network.h $(srcdir)/services/outbound_list.h= \ > + $(srcdir)/services/cache/rrset.h $(srcdir)/services/cache/infra.h > $(srcdir)/util/rtt.h \ > + $(srcdir)/services/cache/dns.h $(srcdir)/services/mesh.h > $(srcdir)/services/localzone.h \ > $(srcdir)/util/data/msgencode.h $(srcdir)/util/data/dname.h > $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h \ > $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h > $(srcdir)/validator/autotrust.h \ > $(srcdir)/validator/val_anchor.h $(srcdir)/libunbound/context.h > $(srcdir)/libunbound/unbound.h \ > $(srcdir)/libunbound/libworker.h > testbound.lo testbound.o: $(srcdir)/testcode/testbound.c config.h > $(srcdir)/testcode/testpkts.h \ > $(srcdir)/testcode/replay.h $(srcdir)/util/netevent.h > $(srcdir)/util/rbtree.h $(srcdir)/testcode/fake_event.h \ > - $(srcdir)/daemon/remote.h \ > - $(srcdir)/util/config_file.h $(srcdir)/sldns/keyraw.h > $(srcdir)/daemon/unbound.c $(srcdir)/util/log.h \ > - $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h $(srcdir)/util/alloc.h > $(srcdir)/services/modstack.h \ > + $(srcdir)/daemon/remote.h $(srcdir)/util/config_file.h > $(srcdir)/sldns/keyraw.h $(srcdir)/daemon/unbound.c \ > + $(srcdir)/util/log.h $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h > $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ > $(srcdir)/util/storage/slabhash.h $(srcdir)/util/storage/lruhash.h \ > $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h \ > $(srcdir)/util/data/packed_rrset.h $(srcdir)/services/cache/infra.h > $(srcdir)/util/storage/dnstree.h \ > @@ -1046,12 +1028,12 @@ worker.lo worker.o: $(srcdir)/daemon/wor > $(srcdir)/util/netevent.h $(srcdir)/util/alloc.h > $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h \ > $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h > $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h \ > $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h > $(srcdir)/daemon/daemon.h \ > - $(srcdir)/services/modstack.h $(srcdir)/daemon/remote.h \ > - $(srcdir)/daemon/acl_list.h $(srcdir)/util/storage/dnstree.h > $(srcdir)/util/rbtree.h \ > - $(srcdir)/util/config_file.h $(srcdir)/util/regional.h > $(srcdir)/util/storage/slabhash.h \ > - $(srcdir)/services/listen_dnsport.h $(srcdir)/services/outside_network.= h > \ > - $(srcdir)/services/outbound_list.h $(srcdir)/services/cache/rrset.h > $(srcdir)/services/cache/infra.h \ > - $(srcdir)/util/rtt.h $(srcdir)/services/cache/dns.h > $(srcdir)/services/mesh.h $(srcdir)/services/localzone.h \ > + $(srcdir)/services/modstack.h $(srcdir)/daemon/remote.h > $(srcdir)/daemon/acl_list.h \ > + $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h > $(srcdir)/util/config_file.h $(srcdir)/util/regional.h \ > + $(srcdir)/util/storage/slabhash.h $(srcdir)/services/listen_dnsport.h \ > + $(srcdir)/services/outside_network.h $(srcdir)/services/outbound_list.h= \ > + $(srcdir)/services/cache/rrset.h $(srcdir)/services/cache/infra.h > $(srcdir)/util/rtt.h \ > + $(srcdir)/services/cache/dns.h $(srcdir)/services/mesh.h > $(srcdir)/services/localzone.h \ > $(srcdir)/util/data/msgencode.h $(srcdir)/util/data/dname.h > $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h \ > $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h > $(srcdir)/validator/autotrust.h \ > $(srcdir)/validator/val_anchor.h $(srcdir)/libunbound/context.h > $(srcdir)/libunbound/unbound.h \ > @@ -1059,14 +1041,13 @@ worker.lo worker.o: $(srcdir)/daemon/wor > acl_list.lo acl_list.o: $(srcdir)/daemon/acl_list.c config.h > $(srcdir)/daemon/acl_list.h \ > $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h > $(srcdir)/util/regional.h $(srcdir)/util/log.h \ > $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h > -daemon.lo daemon.o: $(srcdir)/daemon/daemon.c config.h \ > - $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h $(srcdir)/util/log.h > $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ > - $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h \ > - $(srcdir)/sldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h > $(srcdir)/util/storage/lruhash.h \ > - $(srcdir)/util/netevent.h $(srcdir)/util/data/msgreply.h > $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ > - $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h > $(srcdir)/util/timehist.h $(srcdir)/util/module.h \ > - $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/remote.h \ > - $(srcdir)/daemon/acl_list.h $(srcdir)/util/storage/dnstree.h > $(srcdir)/util/rbtree.h \ > +daemon.lo daemon.o: $(srcdir)/daemon/daemon.c config.h > $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h \ > + $(srcdir)/util/log.h $(srcdir)/util/alloc.h > $(srcdir)/services/modstack.h \ > + $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h > $(srcdir)/sldns/sbuffer.h \ > + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h > $(srcdir)/util/netevent.h \ > + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h > $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ > + $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h > $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h \ > + $(srcdir)/daemon/remote.h $(srcdir)/daemon/acl_list.h > $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h \ > $(srcdir)/util/config_file.h $(srcdir)/util/storage/lookup3.h > $(srcdir)/util/storage/slabhash.h \ > $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h > $(srcdir)/services/cache/infra.h \ > $(srcdir)/util/rtt.h $(srcdir)/services/localzone.h > $(srcdir)/util/random.h $(srcdir)/util/tube.h \ > @@ -1141,19 +1122,18 @@ libunbound.lo libunbound.o: $(srcdir)/li > $(srcdir)/util/random.h $(srcdir)/util/net_help.h $(srcdir)/util/tube.h > $(srcdir)/services/localzone.h \ > $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h > $(srcdir)/util/rtt.h \ > $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h > $(srcdir)/sldns/sbuffer.h > -libworker.lo libworker.o: $(srcdir)/libunbound/libworker.c config.h \ > - $(srcdir)/libunbound/libworker.h $(srcdir)/util/data/packed_rrset.h > $(srcdir)/util/storage/lruhash.h \ > - $(srcdir)/util/locks.h $(srcdir)/util/log.h > $(srcdir)/libunbound/context.h $(srcdir)/util/alloc.h > $(srcdir)/util/rbtree.h \ > - $(srcdir)/services/modstack.h $(srcdir)/libunbound/unbound.h > $(srcdir)/libunbound/worker.h \ > - $(srcdir)/sldns/sbuffer.h $(srcdir)/libunbound/unbound-event.h > $(srcdir)/services/outside_network.h \ > - $(srcdir)/util/netevent.h $(srcdir)/services/mesh.h \ > - $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h > $(srcdir)/sldns/rrdef.h $(srcdir)/util/module.h \ > - $(srcdir)/util/data/msgreply.h $(srcdir)/services/localzone.h > $(srcdir)/services/cache/rrset.h \ > - $(srcdir)/util/storage/slabhash.h $(srcdir)/services/outbound_list.h > $(srcdir)/util/fptr_wlist.h \ > - $(srcdir)/util/tube.h $(srcdir)/util/regional.h $(srcdir)/util/random.h > $(srcdir)/util/config_file.h \ > - $(srcdir)/util/storage/lookup3.h $(srcdir)/util/net_help.h > $(srcdir)/util/data/dname.h \ > - $(srcdir)/util/data/msgencode.h $(srcdir)/iterator/iter_fwd.h > $(srcdir)/iterator/iter_hints.h \ > - $(srcdir)/util/storage/dnstree.h $(srcdir)/sldns/str2wire.h > +libworker.lo libworker.o: $(srcdir)/libunbound/libworker.c config.h > $(srcdir)/libunbound/libworker.h \ > + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h > $(srcdir)/util/locks.h $(srcdir)/util/log.h \ > + $(srcdir)/libunbound/context.h $(srcdir)/util/alloc.h > $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h \ > + $(srcdir)/libunbound/unbound.h $(srcdir)/libunbound/worker.h > $(srcdir)/sldns/sbuffer.h \ > + $(srcdir)/libunbound/unbound-event.h > $(srcdir)/services/outside_network.h $(srcdir)/util/netevent.h \ > + $(srcdir)/services/mesh.h $(srcdir)/util/data/msgparse.h \ > + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/module.= h > $(srcdir)/util/data/msgreply.h \ > + $(srcdir)/services/localzone.h $(srcdir)/services/cache/rrset.h > $(srcdir)/util/storage/slabhash.h \ > + $(srcdir)/services/outbound_list.h $(srcdir)/util/fptr_wlist.h > $(srcdir)/util/tube.h $(srcdir)/util/regional.h \ > + $(srcdir)/util/random.h $(srcdir)/util/config_file.h > $(srcdir)/util/storage/lookup3.h $(srcdir)/util/net_help.h \ > + $(srcdir)/util/data/dname.h $(srcdir)/util/data/msgencode.h > $(srcdir)/iterator/iter_fwd.h \ > + $(srcdir)/iterator/iter_hints.h $(srcdir)/util/storage/dnstree.h > $(srcdir)/sldns/str2wire.h > unbound-host.lo unbound-host.o: $(srcdir)/smallapp/unbound-host.c > config.h $(srcdir)/libunbound/unbound.h \ > $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/wire2str.h > asynclook.lo asynclook.o: $(srcdir)/testcode/asynclook.c config.h > $(srcdir)/libunbound/unbound.h \ > @@ -1164,21 +1144,18 @@ streamtcp.lo streamtcp.o: $(srcdir)/test > $(srcdir)/util/net_help.h $(srcdir)/util/data/msgencode.h > $(srcdir)/util/data/msgparse.h \ > $(srcdir)/util/storage/lruhash.h $(srcdir)/sldns/pkthdr.h > $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/msgreply.h \ > $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/dname.h > $(srcdir)/sldns/sbuffer.h \ > - $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/wire2str.h \ > - > + $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/wire2str.h > perf.lo perf.o: $(srcdir)/testcode/perf.c config.h $(srcdir)/util/log.h > $(srcdir)/util/locks.h $(srcdir)/util/net_help.h \ > $(srcdir)/util/data/msgencode.h $(srcdir)/util/data/msgreply.h > $(srcdir)/util/storage/lruhash.h \ > $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h > $(srcdir)/sldns/pkthdr.h \ > $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/sbuffer.h > $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/str2wire.h > delayer.lo delayer.o: $(srcdir)/testcode/delayer.c config.h > $(srcdir)/util/net_help.h $(srcdir)/util/log.h \ > $(srcdir)/util/config_file.h $(srcdir)/sldns/sbuffer.h > -unbound-control.lo unbound-control.o: > $(srcdir)/smallapp/unbound-control.c config.h \ > - $(srcdir)/util/log.h $(srcdir)/util/config_file.h $(srcdir)/util/locks.= h > $(srcdir)/util/net_help.h > +unbound-control.lo unbound-control.o: > $(srcdir)/smallapp/unbound-control.c config.h $(srcdir)/util/log.h \ > + $(srcdir)/util/config_file.h $(srcdir)/util/locks.h > $(srcdir)/util/net_help.h > unbound-anchor.lo unbound-anchor.o: $(srcdir)/smallapp/unbound-anchor.c > config.h $(srcdir)/libunbound/unbound.h \ > - $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/parseutil.h \ > - > -petal.lo petal.o: $(srcdir)/testcode/petal.c config.h \ > - > + $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/parseutil.h > +petal.lo petal.o: $(srcdir)/testcode/petal.c config.h > pythonmod_utils.lo pythonmod_utils.o: > $(srcdir)/pythonmod/pythonmod_utils.c config.h $(srcdir)/util/module.h \ > $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h > $(srcdir)/util/log.h $(srcdir)/util/data/msgreply.h \ > $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h > $(srcdir)/sldns/pkthdr.h \ > @@ -1191,8 +1168,7 @@ win_svc.lo win_svc.o: $(srcdir)/winrc/wi > $(srcdir)/sldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h > $(srcdir)/util/storage/lruhash.h \ > $(srcdir)/util/netevent.h $(srcdir)/util/data/msgreply.h > $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ > $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h > $(srcdir)/util/timehist.h $(srcdir)/util/module.h \ > - $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/remote.h \ > - $(srcdir)/util/config_file.h $(srcdir)/util/winsock_event.h > + $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/remote.h > $(srcdir)/util/config_file.h $(srcdir)/util/winsock_event.h > w_inst.lo w_inst.o: $(srcdir)/winrc/w_inst.c config.h > $(srcdir)/winrc/w_inst.h $(srcdir)/winrc/win_svc.h > unbound-service-install.lo unbound-service-install.o: > $(srcdir)/winrc/unbound-service-install.c config.h \ > $(srcdir)/winrc/w_inst.h > @@ -1200,14 +1176,11 @@ unbound-service-remove.lo unbound-servic > $(srcdir)/winrc/w_inst.h > anchor-update.lo anchor-update.o: $(srcdir)/winrc/anchor-update.c > config.h $(srcdir)/libunbound/unbound.h \ > $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/pkthdr.h > $(srcdir)/sldns/wire2str.h > -keyraw.lo keyraw.o: $(srcdir)/sldns/keyraw.c config.h > $(srcdir)/sldns/keyraw.h \ > - $(srcdir)/sldns/rrdef.h \ > - > +keyraw.lo keyraw.o: $(srcdir)/sldns/keyraw.c config.h > $(srcdir)/sldns/keyraw.h $(srcdir)/sldns/rrdef.h > sbuffer.lo sbuffer.o: $(srcdir)/sldns/sbuffer.c config.h > $(srcdir)/sldns/sbuffer.h > wire2str.lo wire2str.o: $(srcdir)/sldns/wire2str.c config.h > $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/str2wire.h \ > $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/pkthdr.h > $(srcdir)/sldns/parseutil.h $(srcdir)/sldns/sbuffer.h \ > - $(srcdir)/sldns/keyraw.h \ > - > + $(srcdir)/sldns/keyraw.h > parse.lo parse.o: $(srcdir)/sldns/parse.c config.h > $(srcdir)/sldns/parse.h $(srcdir)/sldns/parseutil.h \ > $(srcdir)/sldns/sbuffer.h > parseutil.lo parseutil.o: $(srcdir)/sldns/parseutil.c config.h > $(srcdir)/sldns/parseutil.h > @@ -1227,8 +1200,7 @@ snprintf.lo snprintf.o: $(srcdir)/compat > strlcat.lo strlcat.o: $(srcdir)/compat/strlcat.c config.h > strlcpy.lo strlcpy.o: $(srcdir)/compat/strlcpy.c config.h > strptime.lo strptime.o: $(srcdir)/compat/strptime.c config.h > -getentropy_linux.lo getentropy_linux.o: > $(srcdir)/compat/getentropy_linux.c config.h \ > - > +getentropy_linux.lo getentropy_linux.o: > $(srcdir)/compat/getentropy_linux.c config.h > getentropy_osx.lo getentropy_osx.o: $(srcdir)/compat/getentropy_osx.c > config.h > getentropy_solaris.lo getentropy_solaris.o: > $(srcdir)/compat/getentropy_solaris.c config.h > getentropy_win.lo getentropy_win.o: $(srcdir)/compat/getentropy_win.c > @@ -1238,3 +1210,4 @@ arc4random_uniform.lo arc4random_uniform > arc4_lock.lo arc4_lock.o: $(srcdir)/compat/arc4_lock.c config.h > $(srcdir)/util/locks.h > sha512.lo sha512.o: $(srcdir)/compat/sha512.c config.h > reallocarray.lo reallocarray.o: $(srcdir)/compat/reallocarray.c config.h > +isblank.lo isblank.o: $(srcdir)/compat/isblank.c config.h > > Modified: stable/10/contrib/unbound/acx_nlnetlabs.m4 > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- stable/10/contrib/unbound/acx_nlnetlabs.m4 Sat Jan 16 18:59:10 2016 > (r294189) > +++ stable/10/contrib/unbound/acx_nlnetlabs.m4 Sat Jan 16 19:06:12 2016 > (r294190) > @@ -2,7 +2,9 @@ > # Copyright 2009, Wouter Wijngaards, NLnet Labs. > # BSD licensed. > # > -# Version 28 > +# Version 30 > +# 2015-11-18 spelling check fix. > +# 2015-11-05 ACX_SSL_CHECKS no longer adds -ldl needlessly. > # 2015-08-28 ACX_CHECK_PIE and ACX_CHECK_RELRO_NOW added. > # 2015-03-17 AHX_CONFIG_REALLOCARRAY added > # 2013-09-19 FLTO help text improved. > @@ -24,7 +26,7 @@ > # 2010-07-02 Add check for ss_family (for minix). > # 2010-04-26 Fix to use CPPFLAGS for CHECK_COMPILER_FLAGS. > # 2010-03-01 Fix RPATH using CONFIG_COMMANDS to run at the very end. > -# 2010-02-18 WITH_SSL outputs the LIBSSL_LDFLAGS, LIBS, CPPFLAGS > seperate, -ldl > +# 2010-02-18 WITH_SSL outputs the LIBSSL_LDFLAGS, LIBS, CPPFLAGS > separate, -ldl > # 2010-02-01 added ACX_CHECK_MEMCMP_SIGNED, AHX_MEMCMP_BROKEN > # 2010-01-20 added AHX_COONFIG_STRLCAT > # 2009-07-14 U_CHAR detection improved for windows crosscompile. > @@ -715,12 +717,6 @@ AC_DEFUN([ACX_SSL_CHECKS], [ > fi > AC_SUBST(HAVE_SSL) > AC_SUBST(RUNTIME_PATH) > - # openssl engine functionality needs dlopen(). > - BAKLIBS=3D"$LIBS" > - AC_SEARCH_LIBS([dlopen], [dl]) > - if test "$LIBS" !=3D "$BAKLIBS"; then > - LIBSSL_LIBS=3D"$LIBSSL_LIBS -ldl" > - fi > fi > AC_CHECK_HEADERS([openssl/ssl.h],,, [AC_INCLUDES_DEFAULT]) > AC_CHECK_HEADERS([openssl/err.h],,, [AC_INCLUDES_DEFAULT]) > > Modified: stable/10/contrib/unbound/compat/arc4random.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- stable/10/contrib/unbound/compat/arc4random.c Sat Jan 16 > 18:59:10 2016 (r294189) > +++ stable/10/contrib/unbound/compat/arc4random.c Sat Jan 16 > 19:06:12 2016 (r294190) > @@ -26,7 +26,9 @@ > #include > #include > #include > +#ifdef HAVE_STDINT_H > #include > +#endif > #include > #include > #include > > Modified: stable/10/contrib/unbound/compat/getentropy_linux.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- stable/10/contrib/unbound/compat/getentropy_linux.c Sat Jan 16 > 18:59:10 2016 (r294189) > +++ stable/10/contrib/unbound/compat/getentropy_linux.c Sat Jan 16 > 19:06:12 2016 (r294190) > @@ -46,7 +46,12 @@ > #include > #include > #include > + > +#if defined(HAVE_SSL) > #include > +#elif defined(HAVE_NETTLE) > +#include > +#endif > > #include > #include > @@ -67,9 +72,21 @@ > HD(b); \ > } while (0) > > +#if defined(HAVE_SSL) > +#define CRYPTO_SHA512_CTX SHA512_CTX > +#define CRYPTO_SHA512_INIT(x) SHA512_Init(x) > +#define CRYPTO_SHA512_FINAL(r, c) SHA512_Final(r, c) > #define HR(x, l) (SHA512_Update(&ctx, (char *)(x), (l))) > #define HD(x) (SHA512_Update(&ctx, (char *)&(x), sizeof (x))) > #define HF(x) (SHA512_Update(&ctx, (char *)&(x), sizeof (void*))) > +#elif defined(HAVE_NETTLE) > +#define CRYPTO_SHA512_CTX struct sha512_ctx > +#define CRYPTO_SHA512_INIT(x) sha512_init(x) > +#define CRYPTO_SHA512_FINAL(r, c) sha512_digest(c, > SHA512_DIGEST_SIZE, r) > +#define HR(x, l) (sha512_update(&ctx, (l), (uint8_t *)(x))) > +#define HD(x) (sha512_update(&ctx, sizeof (x), (uint8_t *)&(x))) > +#define HF(x) (sha512_update(&ctx, sizeof (void*), (uint8_t *)&(x))) > +#endif > > int getentropy(void *buf, size_t len); > > @@ -122,7 +139,7 @@ getentropy(void *buf, size_t len) > * Try to use sysctl CTL_KERN, KERN_RANDOM, RANDOM_UUID. > * sysctl is a failsafe API, so it guarantees a result. This > * should work inside a chroot, or when file descriptors are > - * exhuasted. > + * exhausted. > * > * However this can fail if the Linux kernel removes support > * for sysctl. Starting in 2007, there have been efforts to > @@ -337,7 +354,7 @@ getentropy_fallback(void *buf, size_t le > struct rusage ru; > sigset_t sigset; > struct stat st; > - SHA512_CTX ctx; > + CRYPTO_SHA512_CTX ctx; > static pid_t lastpid; > pid_t pid; > size_t i, ii, m; > @@ -354,7 +371,7 @@ getentropy_fallback(void *buf, size_t le > } > for (i =3D 0; i < len; ) { > int j; > - SHA512_Init(&ctx); > + CRYPTO_SHA512_INIT(&ctx); > for (j =3D 0; j < repeat; j++) { > HX((e =3D gettimeofday(&tv, NULL)) =3D=3D -1, tv)= ; > if (e !=3D -1) { > @@ -526,7 +543,7 @@ getentropy_fallback(void *buf, size_t le > # endif > #endif /* HAVE_GETAUXVAL */ > > - SHA512_Final(results, &ctx); > + CRYPTO_SHA512_FINAL(results, &ctx); > memcpy((char*)buf + i, results, min(sizeof(results), len = - > i)); > i +=3D min(sizeof(results), len - i); > } > > Modified: stable/10/contrib/unbound/compat/getentropy_solaris.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- stable/10/contrib/unbound/compat/getentropy_solaris.c Sat Jan 1= 6 > 18:59:10 2016 (r294189) > +++ stable/10/contrib/unbound/compat/getentropy_solaris.c Sat Jan 1= 6 > 19:06:12 2016 (r294190) > @@ -30,7 +30,9 @@ > #include > #include > #include > +#ifdef HAVE_STDINT_H > #include > +#endif > #include > #include > #include > @@ -39,10 +41,14 @@ > #include > #include > #include > +#ifdef HAVE_SYS_SHA2_H > #include > #define SHA512_Init SHA512Init > #define SHA512_Update SHA512Update > #define SHA512_Final SHA512Final > +#else > +#include "openssl/sha.h" > +#endif > > #include > #include > > Copied: stable/10/contrib/unbound/compat/isblank.c (from r292206, > head/contrib/unbound/compat/isblank.c) > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ stable/10/contrib/unbound/compat/isblank.c Sat Jan 16 19:06:12 2016 > (r294190, copy of r292206, head/contrib/unbound/compat/isblank.c) > @@ -0,0 +1,45 @@ > +/* isblank - compatibility implementation of isblank > + * > + * Copyright (c) 2015, 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 COPYRIGHT > + * HOLDER 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, O= R > + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY O= F > + * 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 "config.h" > + > +/* return true for a blank character: space or tab */ > +int isblank(int c); > + > +/* implementation of isblank. unsigned char is the argument */ > +int > +isblank(int c) > +{ > + return (c=3D=3D' ' || c=3D=3D'\t'); > +} > > Modified: stable/10/contrib/unbound/compat/reallocarray.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- stable/10/contrib/unbound/compat/reallocarray.c Sat Jan 16 > 18:59:10 2016 (r294189) > +++ stable/10/contrib/unbound/compat/reallocarray.c Sat Jan 16 > 19:06:12 2016 (r294190) > @@ -18,7 +18,10 @@ > #include "config.h" > #include > #include > +#ifdef HAVE_STDINT_H > #include > +#endif > +#include > #include > > /* > > Modified: stable/10/contrib/unbound/compat/sha512.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- stable/10/contrib/unbound/compat/sha512.c Sat Jan 16 18:59:10 2016 > (r294189) > +++ stable/10/contrib/unbound/compat/sha512.c Sat Jan 16 19:06:12 2016 > (r294190) > @@ -70,7 +70,7 @@ unsigned char *SHA512(void *data, unsign > * Please make sure that your system defines BYTE_ORDER. If your > * architecture is little-endian, make sure it also defines > * LITTLE_ENDIAN and that the two (BYTE_ORDER and LITTLE_ENDIAN) are > - * equivilent. > + * equivalent. > * > * If your system does not define the above, then you can do so by > * hand like this: > > Modified: stable/10/contrib/unbound/compat/snprintf.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- stable/10/contrib/unbound/compat/snprintf.c Sat Jan 16 18:59:10 2016 > (r294189) > +++ stable/10/contrib/unbound/compat/snprintf.c Sat Jan 16 19:06:12 2016 > (r294190) > @@ -42,6 +42,7 @@ > #ifdef HAVE_STDINT_H > #include > #endif > +#include > > /* for test */ > /* #define SNPRINTF_TEST 1 */ > @@ -428,7 +429,7 @@ print_num_llp(char** at, size_t* left, i > char buf[PRINT_DEC_BUFSZ]; > int negative =3D 0; > int zero =3D (value =3D=3D 0); > -#if defined(UINTPTR_MAX) && defined(UINT32_MAX) && (UINTPTR_MAX =3D=3D > UINT32_MAX) > +#if defined(SIZE_MAX) && defined(UINT32_MAX) && (UINT32_MAX =3D=3D SIZE_= MAX > || INT32_MAX =3D=3D SIZE_MAX) > /* avoid warning about upcast on 32bit systems */ > unsigned long long llvalue =3D (unsigned long)value; > #else > > Modified: stable/10/contrib/unbound/config.h > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- stable/10/contrib/unbound/config.h Sat Jan 16 18:59:10 2016 > (r294189) > +++ stable/10/contrib/unbound/config.h Sat Jan 16 19:06:12 2016 > (r294190) > @@ -95,6 +95,10 @@ > don't. */ > /* #undef HAVE_DECL_STRLCPY */ > > +/* Define to 1 if you have the declaration of `XML_StopParser', and to 0 > if > + you don't. */ > +#define HAVE_DECL_XML_STOPPARSER 1 > + > /* Define to 1 if you have the header file. */ > #define HAVE_DLFCN_H 1 > > @@ -152,6 +156,9 @@ > /* Define to 1 if fseeko (and presumably ftello) exists and is declared. > */ > #define HAVE_FSEEKO 1 > > +/* Define to 1 if you have the `fsync' function. */ > +#define HAVE_FSYNC 1 > + > /* Whether getaddrinfo is available */ > #define HAVE_GETADDRINFO 1 > > @@ -206,6 +213,9 @@ > /* Define to 1 if you have the header file. */ > /* #undef HAVE_IPHLPAPI_H */ > > +/* Define to 1 if you have the `isblank' function. */ > +#define HAVE_ISBLANK 1 > + > /* Define to 1 if you have the `kill' function. */ > #define HAVE_KILL 1 > > @@ -233,6 +243,9 @@ > /* Define to 1 if you have the header file. */ > #define HAVE_NETINET_IN_H 1 > > +/* Use libnettle for crypto */ > +/* #undef HAVE_NETTLE */ > + > /* Use libnss for crypto */ > /* #undef HAVE_NSS */ > > @@ -497,7 +510,7 @@ > #define PACKAGE_NAME "unbound" > > /* Define to the full name and version of this package. */ > -#define PACKAGE_STRING "unbound 1.5.5" > +#define PACKAGE_STRING "unbound 1.5.7" > > /* Define to the one symbol short name of this package. */ > #define PACKAGE_TARNAME "unbound" > @@ -506,7 +519,7 @@ > #define PACKAGE_URL "" > > /* Define to the version of this package. */ > -#define PACKAGE_VERSION "1.5.5" > +#define PACKAGE_VERSION "1.5.7" > > /* default pidfile location */ > #define PIDFILE "/var/unbound/unbound.pid" > @@ -525,7 +538,7 @@ > #define ROOT_CERT_FILE "/var/unbound/icannbundle.pem" > > /* version number for resource files */ > -#define RSRC_PACKAGE_VERSION 1,5,5,0 > +#define RSRC_PACKAGE_VERSION 1,5,7,0 > > /* Directory to chdir to */ > #define RUN_DIR "/var/unbound" > @@ -536,6 +549,9 @@ > /* The size of `time_t', as computed by sizeof. */ > #define SIZEOF_TIME_T 8 > > +/* define if (v)snprintf does not return length needed, (but length used= ) > */ > +/* #undef SNPRINTF_RET_BROKEN */ > + > /* Define to 1 if you have the ANSI C header files. */ > #define STDC_HEADERS 1 > > @@ -570,7 +586,7 @@ > /* #undef USE_ECDSA_EVP_WORKAROUND */ > > /* Define this to enable GOST support. */ > -/* #undef USE_GOST */ > +#define USE_GOST 1 > > /* Define if you want to use internal select based events */ > #define USE_MINI_EVENT 1 > @@ -849,15 +865,13 @@ > #define MAXHOSTNAMELEN 256 > #endif > > - > -#ifndef HAVE_SNPRINTF > +#if !defined(HAVE_SNPRINTF) || defined(SNPRINTF_RET_BROKEN) > #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 */ > - > +#endif /* HAVE_SNPRINTF or SNPRINTF_RET_BROKEN */ > > #ifndef HAVE_INET_PTON > #define inet_pton inet_pton_unbound > @@ -953,6 +967,11 @@ int memcmp(const void *x, const void *y, > char *ctime_r(const time_t *timep, char *buf); > #endif > > +#ifndef HAVE_ISBLANK > +#define isblank unbound_isblank > +int isblank(int c); > +#endif > + > #if !defined(HAVE_STRPTIME) || !defined(STRPTIME_WORKS) > #define strptime unbound_strptime > struct tm; > > Modified: stable/10/contrib/unbound/config.h.in > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- stable/10/contrib/unbound/config.h.in Sat Jan 16 18:59:10 2016 > (r294189) > +++ stable/10/contrib/unbound/config.h.in Sat Jan 16 19:06:12 2016 > (r294190) > @@ -94,6 +94,10 @@ > don't. */ > #undef HAVE_DECL_STRLCPY > > +/* Define to 1 if you have the declaration of `XML_StopParser', and to 0 > if > + you don't. */ > +#undef HAVE_DECL_XML_STOPPARSER > + > /* Define to 1 if you have the header file. */ > #undef HAVE_DLFCN_H > > @@ -151,6 +155,9 @@ > /* Define to 1 if fseeko (and presumably ftello) exists and is declared. > */ > #undef HAVE_FSEEKO > > +/* Define to 1 if you have the `fsync' function. */ > +#undef HAVE_FSYNC > + > /* Whether getaddrinfo is available */ > #undef HAVE_GETADDRINFO > > @@ -205,6 +212,9 @@ > /* Define to 1 if you have the header file. */ > #undef HAVE_IPHLPAPI_H > > +/* Define to 1 if you have the `isblank' function. */ > +#undef HAVE_ISBLANK > + > /* Define to 1 if you have the `kill' function. */ > #undef HAVE_KILL > > @@ -232,6 +242,9 @@ > /* Define to 1 if you have the header file. */ > #undef HAVE_NETINET_IN_H > > +/* Use libnettle for crypto */ > +#undef HAVE_NETTLE > + > /* Use libnss for crypto */ > #undef HAVE_NSS > > @@ -535,6 +548,9 @@ > /* The size of `time_t', as computed by sizeof. */ > #undef SIZEOF_TIME_T > > +/* define if (v)snprintf does not return length needed, (but length used= ) > */ > +#undef SNPRINTF_RET_BROKEN > + > /* Define to 1 if you have the ANSI C header files. */ > #undef STDC_HEADERS > > @@ -848,15 +864,13 @@ > #define MAXHOSTNAMELEN 256 > #endif > > - > -#ifndef HAVE_SNPRINTF > +#if !defined(HAVE_SNPRINTF) || defined(SNPRINTF_RET_BROKEN) > #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 */ > - > +#endif /* HAVE_SNPRINTF or SNPRINTF_RET_BROKEN */ > > #ifndef HAVE_INET_PTON > #define inet_pton inet_pton_unbound > @@ -952,6 +966,11 @@ int memcmp(const void *x, const void *y, > char *ctime_r(const time_t *timep, char *buf); > #endif > > +#ifndef HAVE_ISBLANK > +#define isblank unbound_isblank > +int isblank(int c); > +#endif > + > #if !defined(HAVE_STRPTIME) || !defined(STRPTIME_WORKS) > #define strptime unbound_strptime > struct tm; > > Modified: stable/10/contrib/unbound/configure > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- stable/10/contrib/unbound/configure Sat Jan 16 18:59:10 2016 > (r294189) > +++ stable/10/contrib/unbound/configure Sat Jan 16 19:06:12 2016 > (r294190) > @@ -1,6 +1,6 @@ > #! /bin/sh > # Guess values for system-dependent variables and create Makefiles. > -# Generated by GNU Autoconf 2.69 for unbound 1.5.5. > +# Generated by GNU Autoconf 2.69 for unbound 1.5.7. > # > # Report bugs to . > # > @@ -590,8 +590,8 @@ MAKEFLAGS=3D > # Identity of this package. > PACKAGE_NAME=3D'unbound' > PACKAGE_TARNAME=3D'unbound' > -PACKAGE_VERSION=3D'1.5.5' > -PACKAGE_STRING=3D'unbound 1.5.5' > +PACKAGE_VERSION=3D'1.5.7' > +PACKAGE_STRING=3D'unbound 1.5.7' > PACKAGE_BUGREPORT=3D'unbound-bugs@nlnetlabs.nl' > PACKAGE_URL=3D'' > > @@ -661,6 +661,7 @@ CHECKLOCK_OBJ > staticexe > UNBOUND_EVENT_UNINSTALL > UNBOUND_EVENT_INSTALL > +SSLLIB > HAVE_SSL > CONFIG_DATE > NETBSD_LINTFLAGS > @@ -823,6 +824,7 @@ with_solaris_threads > with_pyunbound > with_pythonmodule > with_nss > +with_nettle > with_ssl > enable_sha2 > enable_gost > @@ -1391,7 +1393,7 @@ if test "$ac_init_help" =3D "long"; then > # Omit some internal or obsolete options to make the list less imposin= g. > # This message is too long to be a string in the A/UX 3.1 sh. > cat <<_ACEOF > -\`configure' configures unbound 1.5.5 to adapt to many kinds of systems. > +\`configure' configures unbound 1.5.7 to adapt to many kinds of systems. > > Usage: $0 [OPTION]... [VAR=3DVALUE]... > > @@ -1456,7 +1458,7 @@ fi > > if test -n "$ac_init_help"; then > case $ac_init_help in > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > > From owner-svn-src-stable-10@freebsd.org Tue Feb 2 03:08:38 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 806BCA737B5; Tue, 2 Feb 2016 03:08:38 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 530AA78E; Tue, 2 Feb 2016 03:08:38 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u1238bTv035560; Tue, 2 Feb 2016 03:08:37 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u1238bR5035559; Tue, 2 Feb 2016 03:08:37 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201602020308.u1238bR5035559@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Tue, 2 Feb 2016 03:08:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r295135 - stable/10/sys/boot/ficl/i386 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 03:08:38 -0000 Author: allanjude Date: Tue Feb 2 03:08:37 2016 New Revision: 295135 URL: https://svnweb.freebsd.org/changeset/base/295135 Log: MFC: r294926 ficl on i386 should cast to unsigned char output to support efi i386 Submitted by: Toomas Soome Approved by: re (gjb) Modified: stable/10/sys/boot/ficl/i386/sysdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/ficl/i386/sysdep.c ============================================================================== --- stable/10/sys/boot/ficl/i386/sysdep.c Tue Feb 2 00:14:51 2016 (r295134) +++ stable/10/sys/boot/ficl/i386/sysdep.c Tue Feb 2 03:08:37 2016 (r295135) @@ -58,7 +58,7 @@ void ficlTextOut(FICL_VM *pVM, char *ms IGNORE(pVM); while(*msg != 0) - putchar(*(msg++)); + putchar((unsigned char)*(msg++)); if (fNewline) putchar('\n'); From owner-svn-src-stable-10@freebsd.org Tue Feb 2 09:59:42 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 523C5A989B3; Tue, 2 Feb 2016 09:59:42 +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 1B428224; Tue, 2 Feb 2016 09:59:41 +0000 (UTC) (envelope-from des@des.no) Received: from desk.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id 41CFAAE64; Tue, 2 Feb 2016 09:59:41 +0000 (UTC) Received: by desk.des.no (Postfix, from userid 1001) id EBF584655E; Tue, 2 Feb 2016 10:59:35 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Maxim Sobolev Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn: stable/10/contrib/unbound: . compat daemon dns64 dnstap doc iterator libunbound libunbound/python libunbound/python/doc libunbound/python/doc/modules libunbound/python/exam... References: <201601161906.u0GJ6Cid076259@repo.freebsd.org> Date: Tue, 02 Feb 2016 10:59:35 +0100 In-Reply-To: (Maxim Sobolev's message of "Mon, 1 Feb 2016 17:23:03 -0800") Message-ID: <86mvrjwhyw.fsf@desk.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 09:59:42 -0000 Maxim Sobolev writes: > Please remove this from both HEAD and stable. Feel free. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-stable-10@freebsd.org Tue Feb 2 14:16:09 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C49CA9931D; Tue, 2 Feb 2016 14:16:09 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD224973; Tue, 2 Feb 2016 14:16:08 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u12EG7Wf030899; Tue, 2 Feb 2016 14:16:07 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u12EG7SJ030897; Tue, 2 Feb 2016 14:16:07 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201602021416.u12EG7SJ030897@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 2 Feb 2016 14:16:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r295148 - in stable/10/sys: amd64/amd64 i386/isa X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 14:16:09 -0000 Author: kib Date: Tue Feb 2 14:16:07 2016 New Revision: 295148 URL: https://svnweb.freebsd.org/changeset/base/295148 Log: MFC r294311: Clear whole XMM register file instead of only XMM0. Also clear x87 registers. This brings amd64 on par with i386, providing consistent initial FPU state. PR: 206370 MFC r294312: Use ANSI definitions. Wrap long line. MFC r294313: Adjust i386 comment to match amd64 one after r294311. Approved by: re (gjb) Modified: stable/10/sys/amd64/amd64/fpu.c stable/10/sys/i386/isa/npx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/fpu.c ============================================================================== --- stable/10/sys/amd64/amd64/fpu.c Tue Feb 2 11:51:18 2016 (r295147) +++ stable/10/sys/amd64/amd64/fpu.c Tue Feb 2 14:16:07 2016 (r295148) @@ -318,13 +318,15 @@ fpuinitstate(void *arg __unused) cpu_mxcsr_mask = 0xFFBF; /* - * The fninit instruction does not modify XMM registers. The - * fpusave call dumped the garbage contained in the registers - * after reset to the initial state saved. Clear XMM - * registers file image to make the startup program state and - * signal handler XMM register content predictable. + * The fninit instruction does not modify XMM registers or x87 + * registers (MM/ST). The fpusave call dumped the garbage + * contained in the registers after reset to the initial state + * saved. Clear XMM and x87 registers file image to make the + * startup program state and signal handler XMM/x87 register + * content predictable. */ - bzero(&fpu_initialstate->sv_xmm[0], sizeof(struct xmmacc)); + bzero(fpu_initialstate->sv_fp, sizeof(fpu_initialstate->sv_fp)); + bzero(fpu_initialstate->sv_xmm, sizeof(fpu_initialstate->sv_xmm)); /* * Create a table describing the layout of the CPU Extended @@ -375,7 +377,7 @@ fpuexit(struct thread *td) } int -fpuformat() +fpuformat(void) { return (_MC_FPFMT_XMM); @@ -661,7 +663,8 @@ fpudna(void) * fpu_initialstate, to ignite the XSAVEOPT * tracking engine. */ - bcopy(fpu_initialstate, curpcb->pcb_save, cpu_max_ext_state_size); + bcopy(fpu_initialstate, curpcb->pcb_save, + cpu_max_ext_state_size); fpurestore(curpcb->pcb_save); if (curpcb->pcb_initial_fpucw != __INITIAL_FPUCW__) fldcw(curpcb->pcb_initial_fpucw); @@ -676,7 +679,7 @@ fpudna(void) } void -fpudrop() +fpudrop(void) { struct thread *td; Modified: stable/10/sys/i386/isa/npx.c ============================================================================== --- stable/10/sys/i386/isa/npx.c Tue Feb 2 11:51:18 2016 (r295147) +++ stable/10/sys/i386/isa/npx.c Tue Feb 2 14:16:07 2016 (r295148) @@ -503,11 +503,12 @@ npxinitstate(void *arg __unused) /* * The fninit instruction does not modify XMM - * registers. The fpusave call dumped the garbage - * contained in the registers after reset to the - * initial state saved. Clear XMM registers file - * image to make the startup program state and signal - * handler XMM register content predictable. + * registers or x87 registers (MM/ST). The fpusave + * call dumped the garbage contained in the registers + * after reset to the initial state saved. Clear XMM + * and x87 registers file image to make the startup + * program state and signal handler XMM/x87 register + * content predictable. */ bzero(npx_initialstate->sv_xmm.sv_fp, sizeof(npx_initialstate->sv_xmm.sv_fp)); From owner-svn-src-stable-10@freebsd.org Wed Feb 3 14:04:09 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60153A99DA3; Wed, 3 Feb 2016 14:04:09 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F11363F; Wed, 3 Feb 2016 14:04:09 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u13E48n1065559; Wed, 3 Feb 2016 14:04:08 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u13E47VR065554; Wed, 3 Feb 2016 14:04:07 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201602031404.u13E47VR065554@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 3 Feb 2016 14:04:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r295208 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 14:04:09 -0000 Author: tuexen Date: Wed Feb 3 14:04:07 2016 New Revision: 295208 URL: https://svnweb.freebsd.org/changeset/base/295208 Log: MFC r294995: Always look in the TCP pool. This fixes issues with a restarting peer when the listening 1-to-1 style socket is closed. MFC r295021: Remove debug output which was committed by accident. Thanks to Oliver Pinter for reporting. MFC r295069: Ignore peer addresses in a consistent way also when checking for new addresses during restart. If this is not done, restart doesn't work when the local socket is IPv4 only and the peer uses IPv4 and IPv6 addresses. MFC r295070: Don't change the remote UDP encapsulation port for SCTP packets containing an INIT chunk. MFC r295072: Don't allow a remote encapsulation port change during the SCTP restart procedure. MFC r295075: Update the path mtu when turning on/off UDP encapsulation for SCTP. MFC r295077: Add missing parentheses. This was reported by ccaughie via GitHub for the userland stack. Approved by: re (kib) Modified: stable/10/sys/netinet/sctp_input.c stable/10/sys/netinet/sctp_output.c stable/10/sys/netinet/sctp_output.h stable/10/sys/netinet/sctp_pcb.c stable/10/sys/netinet/sctp_var.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctp_input.c ============================================================================== --- stable/10/sys/netinet/sctp_input.c Wed Feb 3 13:47:50 2016 (r295207) +++ stable/10/sys/netinet/sctp_input.c Wed Feb 3 14:04:07 2016 (r295208) @@ -85,7 +85,7 @@ static void sctp_handle_init(struct mbuf *m, int iphlen, int offset, struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, struct sctp_init_chunk *cp, struct sctp_inpcb *inp, - struct sctp_tcb *stcb, int *abort_no_unlock, + struct sctp_tcb *stcb, struct sctp_nets *net, int *abort_no_unlock, uint8_t mflowtype, uint32_t mflowid, uint32_t vrf_id, uint16_t port) { @@ -198,8 +198,8 @@ sctp_handle_init(struct mbuf *m, int iph sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_CONTROL_PROC, SCTP_SO_NOT_LOCKED); } else { SCTPDBG(SCTP_DEBUG_INPUT3, "sctp_handle_init: sending INIT-ACK\n"); - sctp_send_initiate_ack(inp, stcb, m, iphlen, offset, src, dst, - sh, cp, + sctp_send_initiate_ack(inp, stcb, net, m, iphlen, offset, + src, dst, sh, cp, mflowtype, mflowid, vrf_id, port, ((stcb == NULL) ? SCTP_HOLDS_LOCK : SCTP_NOT_LOCKED)); @@ -4840,7 +4840,7 @@ process_control_chunks: } sctp_handle_init(m, iphlen, *offset, src, dst, sh, (struct sctp_init_chunk *)ch, inp, - stcb, &abort_no_unlock, + stcb, *netp, &abort_no_unlock, mflowtype, mflowid, vrf_id, port); *offset = length; @@ -5684,9 +5684,18 @@ sctp_common_input_processing(struct mbuf stcb = sctp_findassociation_addr(m, offset, src, dst, sh, ch, &inp, &net, vrf_id); #if defined(INET) || defined(INET6) - if ((net != NULL) && (port != 0)) { + if ((ch->chunk_type != SCTP_INITIATION) && + (net != NULL) && (net->port != port)) { if (net->port == 0) { - sctp_pathmtu_adjustment(stcb, net->mtu - sizeof(struct udphdr)); + /* UDP encapsulation turned on. */ + net->mtu -= sizeof(struct udphdr); + if (stcb->asoc.smallest_mtu > net->mtu) { + sctp_pathmtu_adjustment(stcb, net->mtu); + } + } else if (port == 0) { + /* UDP encapsulation turned off. */ + net->mtu += sizeof(struct udphdr); + /* XXX Update smallest_mtu */ } net->port = port; } @@ -5715,9 +5724,18 @@ sctp_common_input_processing(struct mbuf stcb = sctp_findassociation_addr(m, offset, src, dst, sh, ch, &inp, &net, vrf_id); #if defined(INET) || defined(INET6) - if ((net != NULL) && (port != 0)) { + if ((ch->chunk_type != SCTP_INITIATION) && + (net != NULL) && (net->port != port)) { if (net->port == 0) { - sctp_pathmtu_adjustment(stcb, net->mtu - sizeof(struct udphdr)); + /* UDP encapsulation turned on. */ + net->mtu -= sizeof(struct udphdr); + if (stcb->asoc.smallest_mtu > net->mtu) { + sctp_pathmtu_adjustment(stcb, net->mtu); + } + } else if (port == 0) { + /* UDP encapsulation turned off. */ + net->mtu += sizeof(struct udphdr); + /* XXX Update smallest_mtu */ } net->port = port; } @@ -5829,9 +5847,18 @@ sctp_common_input_processing(struct mbuf */ inp = stcb->sctp_ep; #if defined(INET) || defined(INET6) - if ((net != NULL) && (port != 0)) { + if ((ch->chunk_type != SCTP_INITIATION) && + (net != NULL) && (net->port != port)) { if (net->port == 0) { - sctp_pathmtu_adjustment(stcb, net->mtu - sizeof(struct udphdr)); + /* UDP encapsulation turned on. */ + net->mtu -= sizeof(struct udphdr); + if (stcb->asoc.smallest_mtu > net->mtu) { + sctp_pathmtu_adjustment(stcb, net->mtu); + } + } else if (port == 0) { + /* UDP encapsulation turned off. */ + net->mtu += sizeof(struct udphdr); + /* XXX Update smallest_mtu */ } net->port = port; } Modified: stable/10/sys/netinet/sctp_output.c ============================================================================== --- stable/10/sys/netinet/sctp_output.c Wed Feb 3 13:47:50 2016 (r295207) +++ stable/10/sys/netinet/sctp_output.c Wed Feb 3 14:04:07 2016 (r295208) @@ -5307,6 +5307,7 @@ sctp_are_there_new_addresses(struct sctp uint16_t ptype, plen; uint8_t fnd; struct sctp_nets *net; + int check_src; #ifdef INET struct sockaddr_in sin4, *sa4; @@ -5328,39 +5329,61 @@ sctp_are_there_new_addresses(struct sctp sin6.sin6_len = sizeof(sin6); #endif /* First what about the src address of the pkt ? */ - fnd = 0; - TAILQ_FOREACH(net, &asoc->nets, sctp_next) { - sa = (struct sockaddr *)&net->ro._l_addr; - if (sa->sa_family == src->sa_family) { + check_src = 0; + switch (src->sa_family) { #ifdef INET - if (sa->sa_family == AF_INET) { - struct sockaddr_in *src4; + case AF_INET: + if (asoc->scope.ipv4_addr_legal) { + check_src = 1; + } + break; +#endif +#ifdef INET6 + case AF_INET6: + if (asoc->scope.ipv6_addr_legal) { + check_src = 1; + } + break; +#endif + default: + /* TSNH */ + break; + } + if (check_src) { + fnd = 0; + TAILQ_FOREACH(net, &asoc->nets, sctp_next) { + sa = (struct sockaddr *)&net->ro._l_addr; + if (sa->sa_family == src->sa_family) { +#ifdef INET + if (sa->sa_family == AF_INET) { + struct sockaddr_in *src4; - sa4 = (struct sockaddr_in *)sa; - src4 = (struct sockaddr_in *)src; - if (sa4->sin_addr.s_addr == src4->sin_addr.s_addr) { - fnd = 1; - break; + sa4 = (struct sockaddr_in *)sa; + src4 = (struct sockaddr_in *)src; + if (sa4->sin_addr.s_addr == src4->sin_addr.s_addr) { + fnd = 1; + break; + } } - } #endif #ifdef INET6 - if (sa->sa_family == AF_INET6) { - struct sockaddr_in6 *src6; + if (sa->sa_family == AF_INET6) { + struct sockaddr_in6 *src6; - sa6 = (struct sockaddr_in6 *)sa; - src6 = (struct sockaddr_in6 *)src; - if (SCTP6_ARE_ADDR_EQUAL(sa6, src6)) { - fnd = 1; - break; + sa6 = (struct sockaddr_in6 *)sa; + src6 = (struct sockaddr_in6 *)src; + if (SCTP6_ARE_ADDR_EQUAL(sa6, src6)) { + fnd = 1; + break; + } } - } #endif + } + } + if (fnd == 0) { + /* New address added! no need to look futher. */ + return (1); } - } - if (fnd == 0) { - /* New address added! no need to look futher. */ - return (1); } /* Ok so far lets munge through the rest of the packet */ offset += sizeof(struct sctp_init_chunk); @@ -5381,9 +5404,11 @@ sctp_are_there_new_addresses(struct sctp phdr == NULL) { return (1); } - p4 = (struct sctp_ipv4addr_param *)phdr; - sin4.sin_addr.s_addr = p4->addr; - sa_touse = (struct sockaddr *)&sin4; + if (asoc->scope.ipv4_addr_legal) { + p4 = (struct sctp_ipv4addr_param *)phdr; + sin4.sin_addr.s_addr = p4->addr; + sa_touse = (struct sockaddr *)&sin4; + } break; } #endif @@ -5398,10 +5423,12 @@ sctp_are_there_new_addresses(struct sctp phdr == NULL) { return (1); } - p6 = (struct sctp_ipv6addr_param *)phdr; - memcpy((caddr_t)&sin6.sin6_addr, p6->addr, - sizeof(p6->addr)); - sa_touse = (struct sockaddr *)&sin6; + if (asoc->scope.ipv6_addr_legal) { + p6 = (struct sctp_ipv6addr_param *)phdr; + memcpy((caddr_t)&sin6.sin6_addr, p6->addr, + sizeof(p6->addr)); + sa_touse = (struct sockaddr *)&sin6; + } break; } #endif @@ -5457,7 +5484,8 @@ sctp_are_there_new_addresses(struct sctp */ void sctp_send_initiate_ack(struct sctp_inpcb *inp, struct sctp_tcb *stcb, - struct mbuf *init_pkt, int iphlen, int offset, + struct sctp_nets *src_net, struct mbuf *init_pkt, + int iphlen, int offset, struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, struct sctp_init_chunk *init_chk, uint8_t mflowtype, uint32_t mflowid, @@ -5501,20 +5529,39 @@ sctp_send_initiate_ack(struct sctp_inpcb asoc = NULL; } if ((asoc != NULL) && - (SCTP_GET_STATE(asoc) != SCTP_STATE_COOKIE_WAIT) && - (sctp_are_there_new_addresses(asoc, init_pkt, offset, src))) { - /* new addresses, out of here in non-cookie-wait states */ - /* - * Send a ABORT, we don't add the new address error clause - * though we even set the T bit and copy in the 0 tag.. this - * looks no different than if no listener was present. - */ - op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), - "Address added"); - sctp_send_abort(init_pkt, iphlen, src, dst, sh, 0, op_err, - mflowtype, mflowid, inp->fibnum, - vrf_id, port); - return; + (SCTP_GET_STATE(asoc) != SCTP_STATE_COOKIE_WAIT)) { + if (sctp_are_there_new_addresses(asoc, init_pkt, offset, src)) { + /* + * new addresses, out of here in non-cookie-wait + * states + * + * Send an ABORT, without the new address error cause. + * This looks no different than if no listener was + * present. + */ + op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), + "Address added"); + sctp_send_abort(init_pkt, iphlen, src, dst, sh, 0, op_err, + mflowtype, mflowid, inp->fibnum, + vrf_id, port); + return; + } + if (src_net != NULL && (src_net->port != port)) { + /* + * change of remote encapsulation port, out of here + * in non-cookie-wait states + * + * Send an ABORT, without an specific error cause. This + * looks no different than if no listener was + * present. + */ + op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), + "Remote encapsulation port changed"); + sctp_send_abort(init_pkt, iphlen, src, dst, sh, 0, op_err, + mflowtype, mflowid, inp->fibnum, + vrf_id, port); + return; + } } abort_flag = 0; op_err = sctp_arethere_unrecognized_parameters(init_pkt, Modified: stable/10/sys/netinet/sctp_output.h ============================================================================== --- stable/10/sys/netinet/sctp_output.h Wed Feb 3 13:47:50 2016 (r295207) +++ stable/10/sys/netinet/sctp_output.h Wed Feb 3 14:04:07 2016 (r295208) @@ -80,7 +80,8 @@ sctp_send_initiate(struct sctp_inpcb *, ); void -sctp_send_initiate_ack(struct sctp_inpcb *, struct sctp_tcb *, struct mbuf *, +sctp_send_initiate_ack(struct sctp_inpcb *, struct sctp_tcb *, + struct sctp_nets *, struct mbuf *, int, int, struct sockaddr *, struct sockaddr *, struct sctphdr *, struct sctp_init_chunk *, Modified: stable/10/sys/netinet/sctp_pcb.c ============================================================================== --- stable/10/sys/netinet/sctp_pcb.c Wed Feb 3 13:47:50 2016 (r295207) +++ stable/10/sys/netinet/sctp_pcb.c Wed Feb 3 14:04:07 2016 (r295208) @@ -2256,7 +2256,6 @@ sctp_findassociation_addr(struct mbuf *m struct sctphdr *sh, struct sctp_chunkhdr *ch, struct sctp_inpcb **inp_p, struct sctp_nets **netp, uint32_t vrf_id) { - int find_tcp_pool; struct sctp_tcb *stcb; struct sctp_inpcb *inp; @@ -2268,25 +2267,13 @@ sctp_findassociation_addr(struct mbuf *m return (stcb); } } - find_tcp_pool = 0; - /* - * Don't consider INIT chunks since that breaks 1-to-1 sockets: When - * a server closes the listener, incoming INIT chunks are not - * responsed by an INIT-ACK chunk. - */ - if ((ch->chunk_type != SCTP_INITIATION_ACK) && - (ch->chunk_type != SCTP_COOKIE_ACK) && - (ch->chunk_type != SCTP_COOKIE_ECHO)) { - /* Other chunk types go to the tcp pool. */ - find_tcp_pool = 1; - } if (inp_p) { stcb = sctp_findassociation_addr_sa(src, dst, inp_p, netp, - find_tcp_pool, vrf_id); + 1, vrf_id); inp = *inp_p; } else { stcb = sctp_findassociation_addr_sa(src, dst, &inp, netp, - find_tcp_pool, vrf_id); + 1, vrf_id); } SCTPDBG(SCTP_DEBUG_PCB1, "stcb:%p inp:%p\n", (void *)stcb, (void *)inp); if (stcb == NULL && inp) { Modified: stable/10/sys/netinet/sctp_var.h ============================================================================== --- stable/10/sys/netinet/sctp_var.h Wed Feb 3 13:47:50 2016 (r295207) +++ stable/10/sys/netinet/sctp_var.h Wed Feb 3 14:04:07 2016 (r295208) @@ -86,7 +86,7 @@ extern struct pr_usrreqs sctp_usrreqs; #define sctp_sbspace_failedmsgs(sb) ((long) ((sctp_maxspace(sb) > (sb)->sb_cc) ? (sctp_maxspace(sb) - (sb)->sb_cc) : 0)) -#define sctp_sbspace_sub(a,b) ((a > b) ? (a - b) : 0) +#define sctp_sbspace_sub(a,b) (((a) > (b)) ? ((a) - (b)) : 0) /* * I tried to cache the readq entries at one point. But the reality From owner-svn-src-stable-10@freebsd.org Wed Feb 3 15:16:21 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0756A99992; Wed, 3 Feb 2016 15:16:21 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D3FF12A8; Wed, 3 Feb 2016 15:16:21 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u13FGKUl086350; Wed, 3 Feb 2016 15:16:20 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u13FGKr2086349; Wed, 3 Feb 2016 15:16:20 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201602031516.u13FGKr2086349@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 3 Feb 2016 15:16:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r295211 - stable/10/sys/dev/pty X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 15:16:21 -0000 Author: kib Date: Wed Feb 3 15:16:20 2016 New Revision: 295211 URL: https://svnweb.freebsd.org/changeset/base/295211 Log: MFC r293825: Switch legacy pty clone handler to use make_dev_s(9). MFC r294594: Remove printf only useful for debugging. Approved by: re (marius) Modified: stable/10/sys/dev/pty/pty.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/pty/pty.c ============================================================================== --- stable/10/sys/dev/pty/pty.c Wed Feb 3 14:34:25 2016 (r295210) +++ stable/10/sys/dev/pty/pty.c Wed Feb 3 15:16:20 2016 (r295211) @@ -97,6 +97,8 @@ static void pty_clone(void *arg, struct ucred *cr, char *name, int namelen, struct cdev **dev) { + struct make_dev_args mda; + int error; /* Cloning is already satisfied. */ if (*dev != NULL) @@ -117,8 +119,15 @@ pty_clone(void *arg, struct ucred *cr, c return; /* Create the controller device node. */ - *dev = make_dev_credf(MAKEDEV_REF, &ptydev_cdevsw, 0, - NULL, UID_ROOT, GID_WHEEL, 0666, "%s", name); + make_dev_args_init(&mda); + mda.mda_flags = MAKEDEV_CHECKNAME | MAKEDEV_REF; + mda.mda_devsw = &ptydev_cdevsw; + mda.mda_uid = UID_ROOT; + mda.mda_gid = GID_WHEEL; + mda.mda_mode = 0666; + error = make_dev_s(&mda, dev, "%s", name); + if (error != 0) + *dev = NULL; } static int From owner-svn-src-stable-10@freebsd.org Thu Feb 4 15:46:14 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 203ADA9B75E; Thu, 4 Feb 2016 15:46:14 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF14510B7; Thu, 4 Feb 2016 15:46:13 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u14FkCAa025166; Thu, 4 Feb 2016 15:46:12 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u14FkCmj025165; Thu, 4 Feb 2016 15:46:12 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201602041546.u14FkCmj025165@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Thu, 4 Feb 2016 15:46:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r295264 - stable/10/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 15:46:14 -0000 Author: allanjude Date: Thu Feb 4 15:46:12 2016 New Revision: 295264 URL: https://svnweb.freebsd.org/changeset/base/295264 Log: MFC: r295074 The zfsboot (zfs auto mode) part of bsdinstall now supports UEFI Approved by: re (marius) Relnotes: yes Sponsored by: ScaleEngine Inc. Modified: stable/10/usr.sbin/bsdinstall/scripts/zfsboot Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/zfsboot Thu Feb 4 15:41:00 2016 (r295263) +++ stable/10/usr.sbin/bsdinstall/scripts/zfsboot Thu Feb 4 15:46:12 2016 (r295264) @@ -109,7 +109,12 @@ f_include $BSDCFG_SHARE/variable.subr # # Default partitioning scheme to use on disks # -: ${ZFSBOOT_PARTITION_SCHEME:=GPT} +: ${ZFSBOOT_PARTITION_SCHEME:=} + +# +# Default partitioning scheme to use on disks +# +: ${ZFSBOOT_BOOT_TYPE:=} # # How much swap to put on each block device in the boot zpool @@ -193,6 +198,7 @@ GPART_ADD_ALIGN_LABEL='gpart add %s -l % GPART_ADD_ALIGN_LABEL_WITH_SIZE='gpart add %s -l %s -t %s -s %s "%s"' GPART_BOOTCODE='gpart bootcode -b "%s" "%s"' GPART_BOOTCODE_PART='gpart bootcode -b "%s" -p "%s" -i %s "%s"' +GPART_BOOTCODE_PARTONLY='gpart bootcode -p "%s" -i %s "%s"' GPART_CREATE='gpart create -s %s "%s"' GPART_DESTROY_F='gpart destroy -F "%s"' GPART_SET_ACTIVE='gpart set -a active -i %s "%s"' @@ -297,7 +303,6 @@ msg_swap_size="Swap Size" msg_swap_size_help="Customize how much swap space is allocated to each selected disk" msg_swap_toosmall="The selected swap size (%s) is to small. Please enter a value greater than 100MB or enter 0 for no swap" msg_these_disks_are_too_small="These disks are too small given the amount of requested\nswap (%s) and/or geli(8) (%s) partitions, which would\ntake 50%% or more of each of the following selected disk\ndevices (not recommended):\n\n %s\n\nRecommend changing partition size(s) and/or selecting a\ndifferent set of devices." -msg_uefi_not_supported="The FreeBSD UEFI loader does not currently support booting root-on-ZFS. Your system will need to boot in legacy (CSM) mode.\nDo you want to continue?" msg_unable_to_get_disk_capacity="Unable to get disk capacity of \`%s'" msg_unsupported_partition_scheme="%s is an unsupported partition scheme" msg_user_cancelled="User Cancelled." @@ -345,7 +350,7 @@ dialog_menu_main() 'E $msg_encrypt_disks' '$usegeli' '$msg_encrypt_disks_help' 'P $msg_partition_scheme' - '$ZFSBOOT_PARTITION_SCHEME' + '$ZFSBOOT_PARTITION_SCHEME ($ZFSBOOT_BOOT_TYPE)' '$msg_partition_scheme_help' 'S $msg_swap_size' '$ZFSBOOT_SWAP_SIZE' '$msg_swap_size_help' @@ -695,48 +700,6 @@ dialog_menu_layout() return $DIALOG_OK } -# dialog_uefi_prompt -# -# Confirm that the user wants to continue with the installation on a BIOS -# system when they have booted with UEFI -# -dialog_uefi_prompt() -{ - local title="$DIALOG_TITLE" - local btitle="$DIALOG_BACKTITLE" - local prompt # Calculated below - local hline="$hline_arrows_tab_enter" - - local height=8 width=50 prefix=" " - local plen=${#prefix} list= line= - local max_width=$(( $width - 3 - $plen )) - - local yes no defaultno extra_args format - if [ "$USE_XDIALOG" ]; then - yes=ok no=cancel defaultno=default-no - extra_args="--wrap --left" - format="$msg_uefi_not_supported" - else - yes=yes no=no defaultno=defaultno - extra_args="--cr-wrap" - format="$msg_uefi_not_supported" - fi - - # Add height for Xdialog(1) - [ "$USE_XDIALOG" ] && height=$(( $height + $height / 5 + 3 )) - - prompt=$( printf "$format" ) - f_dprintf "%s: UEFI prompt" "$0" - $DIALOG \ - --title "$title" \ - --backtitle "$btitle" \ - --hline "$hline" \ - --$yes-label "$msg_yes" \ - --$no-label "$msg_no" \ - $extra_args \ - --yesno "$prompt" $height $width -} - # zfs_create_diskpart $disk $index # # For each block device to be used in the zpool, rather than just create the @@ -848,14 +811,25 @@ zfs_create_diskpart() fi # - # 2. Add small freebsd-boot partition labeled `boot#' + # 2. Add small freebsd-boot or efi partition # - f_eval_catch $funcname gpart "$GPART_ADD_ALIGN_LABEL_WITH_SIZE" \ - "$align_small" gptboot$index freebsd-boot 512k $disk || - return $FAILURE - f_eval_catch $funcname gpart "$GPART_BOOTCODE_PART" \ - /boot/pmbr /boot/gptzfsboot 1 $disk || - return $FAILURE + if [ "$ZFSBOOT_BOOT_TYPE" = "UEFI" ]; then + f_eval_catch $funcname gpart \ + "$GPART_ADD_ALIGN_LABEL_WITH_SIZE" \ + "$align_small" efiboot$index efi 800k $disk || + return $FAILURE + f_eval_catch $funcname gpart "$GPART_BOOTCODE_PARTONLY" \ + /boot/boot1.efifat 1 $disk || + return $FAILURE + else + f_eval_catch $funcname gpart \ + "$GPART_ADD_ALIGN_LABEL_WITH_SIZE" \ + "$align_small" gptboot$index freebsd-boot \ + 512k $disk || return $FAILURE + f_eval_catch $funcname gpart "$GPART_BOOTCODE_PART" \ + /boot/pmbr /boot/gptzfsboot 1 $disk || + return $FAILURE + fi # NB: zpool will use the `zfs#' GPT labels bootpart=p2 swappart=p2 targetpart=p2 @@ -1460,18 +1434,16 @@ f_dprintf "BSDINSTALL_TMPETC=[%s]" "$BSD f_dprintf "FSTAB_FMT=[%s]" "$FSTAB_FMT" # -# If the system was booted with UEFI, warn the user that FreeBSD can't do -# ZFS with UEFI yet +# If the system was booted with UEFI, set the default boot type to UEFI # -if f_interactive; then - bootmethod=$( sysctl -n machdep.bootmethod ) - f_dprintf "machdep.bootmethod=[%s]" "$bootmethod" - if [ "$bootmethod" != "BIOS" ]; then - dialog_uefi_prompt - retval=$? - f_dprintf "uefi_prompt=[%s]" "$retval" - [ $retval -eq $DIALOG_OK ] || f_die - fi +bootmethod=$( sysctl -n machdep.bootmethod ) +f_dprintf "machdep.bootmethod=[%s]" "$bootmethod" +if [ "$bootmethod" = "UEFI" ]; then + : ${ZFSBOOT_BOOT_TYPE:=UEFI} + : ${ZFSBOOT_PARTITION_SCHEME:=GPT} +else + : ${ZFSBOOT_BOOT_TYPE:=BIOS} + : ${ZFSBOOT_PARTITION_SCHEME:=GPT} fi # @@ -1593,15 +1565,22 @@ while :; do fi ;; ?" $msg_partition_scheme") - # Toggle between GPT and MBR - if [ "$ZFSBOOT_PARTITION_SCHEME" = GPT ]; then - ZFSBOOT_PARTITION_SCHEME=MBR - elif [ "$ZFSBOOT_PARTITION_SCHEME" = MBR ]; then + # Toggle between GPT (BIOS), GPT (UEFI) and MBR + if [ "$ZFSBOOT_PARTITION_SCHEME" = "GPT" -a "$ZFSBOOT_BOOT_TYPE" = "BIOS" ]; then + ZFSBOOT_PARTITION_SCHEME="GPT" + ZFSBOOT_BOOT_TYPE="UEFI" + elif [ "$ZFSBOOT_PARTITION_SCHEME" = "GPT" ]; then + ZFSBOOT_PARTITION_SCHEME="MBR" + ZFSBOOT_BOOT_TYPE="BIOS" + elif [ "$ZFSBOOT_PARTITION_SCHEME" = "MBR" ]; then ZFSBOOT_PARTITION_SCHEME="GPT + Active" + ZFSBOOT_BOOT_TYPE="BIOS" elif [ "$ZFSBOOT_PARTITION_SCHEME" = "GPT + Active" ]; then ZFSBOOT_PARTITION_SCHEME="GPT + Lenovo Fix" + ZFSBOOT_BOOT_TYPE="BIOS" else - ZFSBOOT_PARTITION_SCHEME=GPT + ZFSBOOT_PARTITION_SCHEME="GPT" + ZFSBOOT_BOOT_TYPE="BIOS" fi ;; ?" $msg_swap_size") From owner-svn-src-stable-10@freebsd.org Thu Feb 4 22:53:14 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8EC5BA9D474; Thu, 4 Feb 2016 22:53:14 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 51C2A13CC; Thu, 4 Feb 2016 22:53:14 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u14MrDbV057257; Thu, 4 Feb 2016 22:53:13 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u14MrCqn057246; Thu, 4 Feb 2016 22:53:12 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201602042253.u14MrCqn057246@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Thu, 4 Feb 2016 22:53:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r295285 - in stable/10: share/man/man4 sys/net sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 22:53:14 -0000 Author: gnn Date: Thu Feb 4 22:53:12 2016 New Revision: 295285 URL: https://svnweb.freebsd.org/changeset/base/295285 Log: MFC: r290383,295282,295283 Replace the fastforward path with tryforward which does not require a sysctl and will always be on. The former split between default and fast forwarding is removed by this commit while preserving the ability to use all network stack features. Differential Revision: https://reviews.freebsd.org/D4042 Reviewed by: ae, melifaro, olivier, rwatson Approved by: re (glebius) Sponsored by: Rubicon Communications (Netgate) Modified: stable/10/share/man/man4/inet.4 stable/10/sys/net/if_arcsubr.c stable/10/sys/net/if_ef.c stable/10/sys/net/if_ethersubr.c stable/10/sys/net/if_fddisubr.c stable/10/sys/net/if_fwsubr.c stable/10/sys/net/if_iso88025subr.c stable/10/sys/netinet/in_var.h stable/10/sys/netinet/ip_fastfwd.c stable/10/sys/netinet/ip_input.c Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/inet.4 ============================================================================== --- stable/10/share/man/man4/inet.4 Thu Feb 4 22:39:27 2016 (r295284) +++ stable/10/share/man/man4/inet.4 Thu Feb 4 22:53:12 2016 (r295285) @@ -32,7 +32,7 @@ .\" From: @(#)inet.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd January 26, 2012 +.Dd Feb 4, 2016 .Dt INET 4 .Os .Sh NAME @@ -169,33 +169,11 @@ MIB. In addition to the variables supported by the transport protocols (for which the respective manual pages may be consulted), the following general variables are defined: -.Bl -tag -width IPCTL_FASTFORWARDING +.Bl -tag -width IPCTL_ACCEPTSOURCEROUTE .It Dv IPCTL_FORWARDING .Pq ip.forwarding Boolean: enable/disable forwarding of IP packets. Defaults to off. -.It Dv IPCTL_FASTFORWARDING -.Pq ip.fastforwarding -Boolean: enable/disable the use of -.Tn fast IP forwarding -code. -Defaults to off. -When -.Tn fast IP forwarding -is enabled, IP packets are forwarded directly to the appropriate network -interface with direct processing to completion, which greatly improves -the throughput. -All packets for local IP addresses, non-unicast, or with IP options are -handled by the normal IP input processing path. -All features of the normal (slow) IP forwarding path are supported -including firewall (through -.Xr pfil 9 -hooks) checking, except -.Xr ipsec 4 -tunnel brokering. -The -.Tn IP fastforwarding -path does not generate ICMP redirect or source quench messages. .It Dv IPCTL_SENDREDIRECTS .Pq ip.redirect Boolean: enable/disable sending of ICMP redirects in response to Modified: stable/10/sys/net/if_arcsubr.c ============================================================================== --- stable/10/sys/net/if_arcsubr.c Thu Feb 4 22:39:27 2016 (r295284) +++ stable/10/sys/net/if_arcsubr.c Thu Feb 4 22:53:12 2016 (r295285) @@ -557,15 +557,11 @@ arc_input(struct ifnet *ifp, struct mbuf #ifdef INET case ARCTYPE_IP: m_adj(m, ARC_HDRNEWLEN); - if ((m = ip_fastforward(m)) == NULL) - return; isr = NETISR_IP; break; case ARCTYPE_IP_OLD: m_adj(m, ARC_HDRLEN); - if ((m = ip_fastforward(m)) == NULL) - return; isr = NETISR_IP; break; Modified: stable/10/sys/net/if_ef.c ============================================================================== --- stable/10/sys/net/if_ef.c Thu Feb 4 22:39:27 2016 (r295284) +++ stable/10/sys/net/if_ef.c Thu Feb 4 22:53:12 2016 (r295285) @@ -240,8 +240,6 @@ ef_inputEII(struct mbuf *m, struct ether #endif #ifdef INET case ETHERTYPE_IP: - if ((m = ip_fastforward(m)) == NULL) - return (0); isr = NETISR_IP; break; Modified: stable/10/sys/net/if_ethersubr.c ============================================================================== --- stable/10/sys/net/if_ethersubr.c Thu Feb 4 22:39:27 2016 (r295284) +++ stable/10/sys/net/if_ethersubr.c Thu Feb 4 22:53:12 2016 (r295285) @@ -784,8 +784,6 @@ ether_demux(struct ifnet *ifp, struct mb switch (ether_type) { #ifdef INET case ETHERTYPE_IP: - if ((m = ip_fastforward(m)) == NULL) - return; isr = NETISR_IP; break; Modified: stable/10/sys/net/if_fddisubr.c ============================================================================== --- stable/10/sys/net/if_fddisubr.c Thu Feb 4 22:39:27 2016 (r295284) +++ stable/10/sys/net/if_fddisubr.c Thu Feb 4 22:53:12 2016 (r295285) @@ -501,8 +501,6 @@ fddi_input(ifp, m) switch (type) { #ifdef INET case ETHERTYPE_IP: - if ((m = ip_fastforward(m)) == NULL) - return; isr = NETISR_IP; break; Modified: stable/10/sys/net/if_fwsubr.c ============================================================================== --- stable/10/sys/net/if_fwsubr.c Thu Feb 4 22:39:27 2016 (r295284) +++ stable/10/sys/net/if_fwsubr.c Thu Feb 4 22:53:12 2016 (r295285) @@ -595,8 +595,6 @@ firewire_input(struct ifnet *ifp, struct switch (type) { #ifdef INET case ETHERTYPE_IP: - if ((m = ip_fastforward(m)) == NULL) - return; isr = NETISR_IP; break; Modified: stable/10/sys/net/if_iso88025subr.c ============================================================================== --- stable/10/sys/net/if_iso88025subr.c Thu Feb 4 22:39:27 2016 (r295284) +++ stable/10/sys/net/if_iso88025subr.c Thu Feb 4 22:53:12 2016 (r295285) @@ -579,8 +579,6 @@ iso88025_input(ifp, m) #ifdef INET case ETHERTYPE_IP: th->iso88025_shost[0] &= ~(TR_RII); - if ((m = ip_fastforward(m)) == NULL) - return; isr = NETISR_IP; break; Modified: stable/10/sys/netinet/in_var.h ============================================================================== --- stable/10/sys/netinet/in_var.h Thu Feb 4 22:39:27 2016 (r295284) +++ stable/10/sys/netinet/in_var.h Thu Feb 4 22:53:12 2016 (r295285) @@ -452,7 +452,7 @@ int in_scrubprefix(struct in_ifaddr *, u void ip_input(struct mbuf *); int in_ifadown(struct ifaddr *ifa, int); void in_ifscrub(struct ifnet *, struct in_ifaddr *, u_int); -struct mbuf *ip_fastforward(struct mbuf *); +struct mbuf *ip_tryforward(struct mbuf *); void *in_domifattach(struct ifnet *); void in_domifdetach(struct ifnet *, void *); Modified: stable/10/sys/netinet/ip_fastfwd.c ============================================================================== --- stable/10/sys/netinet/ip_fastfwd.c Thu Feb 4 22:39:27 2016 (r295284) +++ stable/10/sys/netinet/ip_fastfwd.c Thu Feb 4 22:53:12 2016 (r295285) @@ -109,12 +109,6 @@ __FBSDID("$FreeBSD$"); #include -static VNET_DEFINE(int, ipfastforward_active); -#define V_ipfastforward_active VNET(ipfastforward_active) - -SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, fastforwarding, CTLFLAG_RW, - &VNET_NAME(ipfastforward_active), 0, "Enable fast IP forwarding"); - static struct sockaddr_in * ip_findroute(struct route *ro, struct in_addr dest, struct mbuf *m) { @@ -159,7 +153,7 @@ ip_findroute(struct route *ro, struct in * to ip_input for full processing. */ struct mbuf * -ip_fastforward(struct mbuf *m) +ip_tryforward(struct mbuf *m) { struct ip *ip; struct mbuf *m0 = NULL; @@ -167,119 +161,20 @@ ip_fastforward(struct mbuf *m) struct sockaddr_in *dst = NULL; struct ifnet *ifp; struct in_addr odest, dest; - uint16_t sum, ip_len, ip_off; + uint16_t ip_len, ip_off; int error = 0; - int hlen, mtu; + int mtu; struct m_tag *fwd_tag = NULL; /* * Are we active and forwarding packets? */ - if (!V_ipfastforward_active || !V_ipforwarding) - return m; M_ASSERTVALID(m); M_ASSERTPKTHDR(m); bzero(&ro, sizeof(ro)); - /* - * Step 1: check for packet drop conditions (and sanity checks) - */ - - /* - * Is entire packet big enough? - */ - if (m->m_pkthdr.len < sizeof(struct ip)) { - IPSTAT_INC(ips_tooshort); - goto drop; - } - - /* - * Is first mbuf large enough for ip header and is header present? - */ - if (m->m_len < sizeof (struct ip) && - (m = m_pullup(m, sizeof (struct ip))) == NULL) { - IPSTAT_INC(ips_toosmall); - return NULL; /* mbuf already free'd */ - } - - ip = mtod(m, struct ip *); - - /* - * Is it IPv4? - */ - if (ip->ip_v != IPVERSION) { - IPSTAT_INC(ips_badvers); - goto drop; - } - - /* - * Is IP header length correct and is it in first mbuf? - */ - hlen = ip->ip_hl << 2; - if (hlen < sizeof(struct ip)) { /* minimum header length */ - IPSTAT_INC(ips_badhlen); - goto drop; - } - if (hlen > m->m_len) { - if ((m = m_pullup(m, hlen)) == NULL) { - IPSTAT_INC(ips_badhlen); - return NULL; /* mbuf already free'd */ - } - ip = mtod(m, struct ip *); - } - - /* - * Checksum correct? - */ - if (m->m_pkthdr.csum_flags & CSUM_IP_CHECKED) - sum = !(m->m_pkthdr.csum_flags & CSUM_IP_VALID); - else { - if (hlen == sizeof(struct ip)) - sum = in_cksum_hdr(ip); - else - sum = in_cksum(m, hlen); - } - if (sum) { - IPSTAT_INC(ips_badsum); - goto drop; - } - - /* - * Remember that we have checked the IP header and found it valid. - */ - m->m_pkthdr.csum_flags |= (CSUM_IP_CHECKED | CSUM_IP_VALID); - - ip_len = ntohs(ip->ip_len); - - /* - * Is IP length longer than packet we have got? - */ - if (m->m_pkthdr.len < ip_len) { - IPSTAT_INC(ips_tooshort); - goto drop; - } - - /* - * Is packet longer than IP header tells us? If yes, truncate packet. - */ - if (m->m_pkthdr.len > ip_len) { - if (m->m_len == m->m_pkthdr.len) { - m->m_len = ip_len; - m->m_pkthdr.len = ip_len; - } else - m_adj(m, ip_len - m->m_pkthdr.len); - } - - /* - * Is packet from or to 127/8? - */ - if ((ntohl(ip->ip_dst.s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET || - (ntohl(ip->ip_src.s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET) { - IPSTAT_INC(ips_badaddr); - goto drop; - } #ifdef ALTQ /* @@ -290,12 +185,10 @@ ip_fastforward(struct mbuf *m) #endif /* - * Step 2: fallback conditions to normal ip_input path processing - */ - - /* * Only IP packets without options */ + ip = mtod(m, struct ip *); + if (ip->ip_hl != (sizeof(struct ip) >> 2)) { if (V_ip_doopts == 1) return m; Modified: stable/10/sys/netinet/ip_input.c ============================================================================== --- stable/10/sys/netinet/ip_input.c Thu Feb 4 22:39:27 2016 (r295284) +++ stable/10/sys/netinet/ip_input.c Thu Feb 4 22:53:12 2016 (r295285) @@ -77,6 +77,8 @@ __FBSDID("$FreeBSD$"); #include #ifdef IPSEC #include +#include +#include #endif /* IPSEC */ #include @@ -464,12 +466,22 @@ tooshort: } else m_adj(m, ip_len - m->m_pkthdr.len); } + /* Try to forward the packet, but if we fail continue */ #ifdef IPSEC + /* For now we do not handle IPSEC in tryforward. */ + if (!key_havesp(IPSEC_DIR_INBOUND) && !key_havesp(IPSEC_DIR_OUTBOUND) && + (V_ipforwarding == 1)) + if (ip_tryforward(m) == NULL) + return; /* * Bypass packet filtering for packets previously handled by IPsec. */ if (ip_ipsec_filtertunnel(m)) goto passin; +#else + if (V_ipforwarding == 1) + if (ip_tryforward(m) == NULL) + return; #endif /* IPSEC */ /* From owner-svn-src-stable-10@freebsd.org Thu Feb 4 23:56:02 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73243A9B839; Thu, 4 Feb 2016 23:56:02 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 45BCA161E; Thu, 4 Feb 2016 23:56:02 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u14Nu1Hn074802; Thu, 4 Feb 2016 23:56:01 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u14Nu1m3074801; Thu, 4 Feb 2016 23:56:01 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201602042356.u14Nu1m3074801@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Thu, 4 Feb 2016 23:56:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r295287 - stable/10/sys/dev/e1000 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 23:56:02 -0000 Author: marius Date: Thu Feb 4 23:56:01 2016 New Revision: 295287 URL: https://svnweb.freebsd.org/changeset/base/295287 Log: MFC: r295133 As it turns out, one of the more or less recent changes to em(4) causes watchdog timeouts when using TSO4 at link speeds below Gigabit, at least with 82573E. So disable the assist automatically when at lower speeds. Submitted by: jfv Approved by: re (kib), erj Obtained from: D3162 Modified: stable/10/sys/dev/e1000/if_em.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/e1000/if_em.c ============================================================================== --- stable/10/sys/dev/e1000/if_em.c Thu Feb 4 23:38:55 2016 (r295286) +++ stable/10/sys/dev/e1000/if_em.c Thu Feb 4 23:56:01 2016 (r295287) @@ -1377,8 +1377,15 @@ em_init_locked(struct adapter *adapter) ifp->if_hwassist = 0; if (ifp->if_capenable & IFCAP_TXCSUM) ifp->if_hwassist |= (CSUM_TCP | CSUM_UDP); - if (ifp->if_capenable & IFCAP_TSO4) - ifp->if_hwassist |= CSUM_TSO; + /* + ** There have proven to be problems with TSO when not + ** at full gigabit speed, so disable the assist automatically + ** when at lower speeds. -jfv + */ + if (ifp->if_capenable & IFCAP_TSO4) { + if (adapter->link_speed == SPEED_1000) + ifp->if_hwassist |= CSUM_TSO; + } /* Configure for OS presence */ em_init_manageability(adapter); From owner-svn-src-stable-10@freebsd.org Fri Feb 5 00:12:14 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BEC3AA9C188; Fri, 5 Feb 2016 00:12:14 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F3FE255; Fri, 5 Feb 2016 00:12:14 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u150CD79080728; Fri, 5 Feb 2016 00:12:13 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u150CDvD080727; Fri, 5 Feb 2016 00:12:13 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201602050012.u150CDvD080727@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Fri, 5 Feb 2016 00:12:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r295288 - stable/10/sys/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 00:12:14 -0000 Author: marius Date: Fri Feb 5 00:12:13 2016 New Revision: 295288 URL: https://svnweb.freebsd.org/changeset/base/295288 Log: Update stable/10 to BETA1 in preparation for 10.3-BETA1 builds. Approved by: re (implicit) Modified: stable/10/sys/conf/newvers.sh Modified: stable/10/sys/conf/newvers.sh ============================================================================== --- stable/10/sys/conf/newvers.sh Thu Feb 4 23:56:01 2016 (r295287) +++ stable/10/sys/conf/newvers.sh Fri Feb 5 00:12:13 2016 (r295288) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.3" -BRANCH="PRERELEASE" +BRANCH="BETA" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-stable-10@freebsd.org Fri Feb 5 00:14:26 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E207A9C244; Fri, 5 Feb 2016 00:14:26 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 20B04643; Fri, 5 Feb 2016 00:14:26 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u150EP1h080838; Fri, 5 Feb 2016 00:14:25 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u150EPaI080837; Fri, 5 Feb 2016 00:14:25 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201602050014.u150EPaI080837@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Fri, 5 Feb 2016 00:14:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r295289 - stable/10/sys/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 00:14:26 -0000 Author: marius Date: Fri Feb 5 00:14:24 2016 New Revision: 295289 URL: https://svnweb.freebsd.org/changeset/base/295289 Log: Update stable/10 to BETA1 in preparation for 10.3-BETA1 builds, take 2. Approved by: re (implicit) Modified: stable/10/sys/conf/newvers.sh Modified: stable/10/sys/conf/newvers.sh ============================================================================== --- stable/10/sys/conf/newvers.sh Fri Feb 5 00:12:13 2016 (r295288) +++ stable/10/sys/conf/newvers.sh Fri Feb 5 00:14:24 2016 (r295289) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.3" -BRANCH="BETA" +BRANCH="BETA1" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-stable-10@freebsd.org Fri Feb 5 21:22:13 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85C31A9E4B7; Fri, 5 Feb 2016 21:22:13 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x235.google.com (mail-pf0-x235.google.com [IPv6:2607:f8b0:400e:c00::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 57C8EFDD; Fri, 5 Feb 2016 21:22:13 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x235.google.com with SMTP id n128so74402893pfn.3; Fri, 05 Feb 2016 13:22:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=KoCraDauKZUQWHQoPl3qygjQrsO95RDhKqs7h4UerL0=; b=BZOC4oscEaDNL3XoxPzEsjbPP2hvHwf2unChPlMhqE87UBV2H3efP9RfeHi3GmZZW8 2L97FGJJaGbW2diPAIe5HuUI5xmygw6pble4fHeyeUHbYjeu2kP7AKqwGkbWU1+CBXJ1 d3YvQF6/o6ISCk3BxOg3Jx+yIrqtehgKvD8QMKoZiZ++rYyKqpipNXxYPNEE6fSXh13Q GFjad/I3hTmrfnBB5D2AumyiXcs8nY+sitQO9Sz5OCKWrpCw0KihqZ+JBzyBOqRbbLNt c0QCfkDG0CdIRWuDyolKJbHZByIHxj+eoB4xfcZ/+zvbm5XgjtUs8BcBpRP8MQ1yo2V2 v1AA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=KoCraDauKZUQWHQoPl3qygjQrsO95RDhKqs7h4UerL0=; b=TmDwc48k6kJg4sbDEbj9s8jDf46pyacbSQXtsd2uEwe5OEsvoJFDYVMSxMP9engzpA K/CEla3GPbaAjahFdo9ufkNFw+Fgi+uYs4LEhgN2T5M+zvA0PrbKAWDBo5TpsvBIF05v 1TOSCy2CQURhX9n0qnTfobqCZKrp+R7Ko9M1qPu5c586KsAOys+Kv2ZY5z3OWcESi3fH 0bqYTPeFF2MpBrnCj76+WXQN1HXqUXDQoYUqUILKtMxFOMcXchN+u7RtFdJ5MM6PUqq5 ImjVAL5gWbUiI4s0cf6iqLYC+Wmsra6c6nH/7iSvzzQKA/be3l8TXO5KGqb1U9710Eg/ /OAg== X-Gm-Message-State: AG10YOS2Hu+M8hQIlmmikxpFZBeEmxxTz/StfmzWU2pV+w/Is0Ai64l52WBSB26OYlZ8yw== X-Received: by 10.98.43.88 with SMTP id r85mr22754776pfr.7.1454707332934; Fri, 05 Feb 2016 13:22:12 -0800 (PST) Received: from [192.168.100.83] ([199.231.240.59]) by smtp.gmail.com with ESMTPSA id tv6sm26640801pab.4.2016.02.05.13.22.10 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 05 Feb 2016 13:22:11 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: svn commit: r294981 - in stable/10/sys/boot: common efi efi/boot1 efi/include efi/libefi efi/loader efi/loader/arch/amd64 fdt i386/libi386 From: NGie Cooper In-Reply-To: <201601281211.u0SCBhQG058154@repo.freebsd.org> Date: Fri, 5 Feb 2016 13:22:09 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org, FreeBSD Release Engineering Team Content-Transfer-Encoding: quoted-printable Message-Id: <88C90200-1BC4-4C95-B37B-71AC33868217@gmail.com> References: <201601281211.u0SCBhQG058154@repo.freebsd.org> To: Steven Hartland X-Mailer: Apple Mail (2.2104) X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 21:22:13 -0000 > On Jan 28, 2016, at 04:11, Steven Hartland wrote: >=20 > Author: smh > Date: Thu Jan 28 12:11:42 2016 > New Revision: 294981 > URL: https://svnweb.freebsd.org/changeset/base/294981 >=20 > Log: > MFC r281169, r293724, r293796, r294029, r294041, r294058 >=20 > MFC r281169 (by andrew): > Make global variabled only used in this file static >=20 > MFC r294058: > Make common boot file_loadraw name parameter const >=20 > MFC r294041: > Remove unused reg param from fdt_fixup_memory >=20 > MFC r293724: > Enable warnings in EFI boot code >=20 > MFC r293796: > Fix typo in libefi.c >=20 > MFC r294029: > Only build EFI components on supported compilers >=20 > Sponsored by: Multiplay This commit broke tinderbox with arm:armeb on universe10a.freebsd.org: cc1: warnings being treated as errors In file included from = /scratch/tmp/ngie/svn/sys/boot/arm/uboot/../../common/load_elf32.c:7: /scratch/tmp/ngie/svn/sys/boot/arm/uboot/../../common/load_elf.c: In = function 'elf32_parse_modmetadata': /scratch/tmp/ngie/svn/sys/boot/arm/uboot/../../common/load_elf.c:859: = warning: cast to pointer from integer of different size *** [load_elf32.o] Error code 1 Given the issues that we have with ia64 not being able to build right = now, I would consider pulling this out of ^/stable/10, fully fixing it, = then reintegrating it. Thanks, -Ngie= From owner-svn-src-stable-10@freebsd.org Sat Feb 6 08:58:12 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DCEA2A9E295; Sat, 6 Feb 2016 08:58:11 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ACB071D60; Sat, 6 Feb 2016 08:58:11 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u168wAWl066071; Sat, 6 Feb 2016 08:58:10 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u168wAsL066069; Sat, 6 Feb 2016 08:58:10 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201602060858.u168wAsL066069@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sat, 6 Feb 2016 08:58:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r295346 - stable/10/sys/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2016 08:58:12 -0000 Author: hselasky Date: Sat Feb 6 08:58:10 2016 New Revision: 295346 URL: https://svnweb.freebsd.org/changeset/base/295346 Log: MFC r294915: Fix generation of dependency rules for the LinuxKPI, the MLX5 driver and all of OFED except MLX4[EN/IB]. Sponsored by: Mellanox Technologies Approved by: re (marius) Modified: stable/10/sys/conf/files stable/10/sys/conf/kern.post.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Sat Feb 6 04:13:20 2016 (r295345) +++ stable/10/sys/conf/files Sat Feb 6 08:58:10 2016 (r295346) @@ -3646,128 +3646,91 @@ nlm/sm_inter_xdr.c optional nfslockd | # OpenFabrics Enterprise Distribution (Infiniband) ofed/include/linux/linux_compat.c optional ofed | compat_linuxkpi \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/include/linux/linux_idr.c optional ofed | compat_linuxkpi \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/include/linux/linux_radix.c optional ofed | compat_linuxkpi \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/drivers/infiniband/core/addr.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/agent.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/cache.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" # XXX Mad.c must be ordered before cm.c for sysinit sets to occur in # the correct order. ofed/drivers/infiniband/core/mad.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/cm.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/ -Wno-unused-function" ofed/drivers/infiniband/core/cma.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/device.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/fmr_pool.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/iwcm.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/local_sa.c optional ofed \ no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/mad_rmpp.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/multicast.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/notice.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/packer.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/sa_query.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/smi.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/sysfs.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/ucm.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/ucma.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/ud_header.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/umem.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/user_mad.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/uverbs_cmd.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/uverbs_main.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/uverbs_marshall.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/verbs.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c optional ipoib \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" #ofed/drivers/infiniband/ulp/ipoib/ipoib_fs.c optional ipoib \ -# no-depend \ # compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c optional ipoib \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c optional ipoib \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" ofed/drivers/infiniband/ulp/ipoib/ipoib_multicast.c optional ipoib \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" ofed/drivers/infiniband/ulp/ipoib/ipoib_verbs.c optional ipoib \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" #ofed/drivers/infiniband/ulp/ipoib/ipoib_vlan.c optional ipoib \ -# no-depend \ # compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" ofed/drivers/infiniband/ulp/sdp/sdp_bcopy.c optional sdp inet \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/" ofed/drivers/infiniband/ulp/sdp/sdp_main.c optional sdp inet \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/" ofed/drivers/infiniband/ulp/sdp/sdp_rx.c optional sdp inet \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/" ofed/drivers/infiniband/ulp/sdp/sdp_cma.c optional sdp inet \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/" ofed/drivers/infiniband/ulp/sdp/sdp_tx.c optional sdp inet \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/" ofed/drivers/infiniband/hw/mlx4/alias_GUID.c optional mlx4ib \ @@ -3897,95 +3860,95 @@ ofed/drivers/net/mlx4/en_tx.c optional compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" dev/mlx5/mlx5_core/mlx5_alloc.c optional mlx5 pci \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_cmd.c optional mlx5 pci \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_cq.c optional mlx5 pci \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_eq.c optional mlx5 pci \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_flow_table.c optional mlx5 pci \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_fw.c optional mlx5 pci \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_health.c optional mlx5 pci \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_mad.c optional mlx5 pci \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_main.c optional mlx5 pci \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_mcg.c optional mlx5 pci \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_mr.c optional mlx5 pci \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_pagealloc.c optional mlx5 pci \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_pd.c optional mlx5 pci \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_port.c optional mlx5 pci \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_qp.c optional mlx5 pci \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_srq.c optional mlx5 pci \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_transobj.c optional mlx5 pci \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_uar.c optional mlx5 pci \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_vport.c optional mlx5 pci \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_wq.c optional mlx5 pci \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_en/mlx5_en_ethtool.c optional mlx5en pci inet inet6 \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_en/mlx5_en_main.c optional mlx5en pci inet inet6 \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_en/mlx5_en_tx.c optional mlx5en pci inet inet6 \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_en/mlx5_en_flow_table.c optional mlx5en pci inet inet6 \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_en/mlx5_en_rx.c optional mlx5en pci inet inet6 \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_en/mlx5_en_txrx.c optional mlx5en pci inet inet6 \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_allocator.c optional mthca \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_av.c optional mthca \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_catas.c optional mthca \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_cmd.c optional mthca \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_cq.c optional mthca \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_eq.c optional mthca \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_mad.c optional mthca \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_main.c optional mthca \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_mcg.c optional mthca \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_memfree.c optional mthca \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_mr.c optional mthca \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_pd.c optional mthca \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_profile.c optional mthca \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_provider.c optional mthca \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_qp.c optional mthca \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_reset.c optional mthca \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_srq.c optional mthca \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_uar.c optional mthca \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" # crypto support opencrypto/cast.c optional crypto | ipsec Modified: stable/10/sys/conf/kern.post.mk ============================================================================== --- stable/10/sys/conf/kern.post.mk Sat Feb 6 04:13:20 2016 (r295345) +++ stable/10/sys/conf/kern.post.mk Sat Feb 6 08:58:10 2016 (r295346) @@ -183,12 +183,20 @@ genassym.o: $S/$M/$M/genassym.c ${SYSTEM_OBJS} genassym.o vers.o: opt_global.h -# We have "special" -I include paths for opensolaris/zfs files in 'depend'. -CFILES_NOZFS= ${CFILES:N*/opensolaris/*} -SFILES_NOZFS= ${SFILES:N*/opensolaris/*} +# Normal files first +CFILES_NORMAL= ${CFILES:N*/opensolaris/*:N*/ofed/*:N*/dev/mlx5/*} +SFILES_NORMAL= ${SFILES:N*/opensolaris/*} + +# We have "special" -I include paths for zfs/dtrace files in 'depend'. CFILES_ZFS= ${CFILES:M*/opensolaris/*} SFILES_ZFS= ${SFILES:M*/opensolaris/*} +# We have "special" -I include paths for OFED. +CFILES_OFED=${CFILES:M*/ofed/*} + +# We have "special" -I include paths for MLX5. +CFILES_MLX5=${CFILES:M*/dev/mlx5/*} + kernel-depend: .depend # The argument list can be very long, so use make -V and xargs to # pass it to mkdep. @@ -196,17 +204,21 @@ SRCS= assym.s vnode_if.h ${BEFORE_DEPEND ${SYSTEM_CFILES} ${GEN_CFILES} ${SFILES} \ ${MFILES:T:S/.m$/.h/} .depend: .PRECIOUS ${SRCS} - rm -f .newdep - ${MAKE} -V CFILES_NOZFS -V SYSTEM_CFILES -V GEN_CFILES | \ - MKDEP_CPP="${CC} -E" CC="${CC}" xargs mkdep -a -f .newdep ${CFLAGS} + rm -f ${.TARGET}.tmp +# C files + ${MAKE} -V CFILES_NORMAL -V SYSTEM_CFILES -V GEN_CFILES | \ + MKDEP_CPP="${CC} -E" CC="${CC}" xargs mkdep -a -f ${.TARGET}.tmp ${CFLAGS} ${MAKE} -V CFILES_ZFS | \ - MKDEP_CPP="${CC} -E" CC="${CC}" xargs mkdep -a -f .newdep ${ZFS_CFLAGS} - ${MAKE} -V SFILES_NOZFS | \ - MKDEP_CPP="${CC} -E" xargs mkdep -a -f .newdep ${ASM_CFLAGS} + MKDEP_CPP="${CC} -E" CC="${CC}" xargs mkdep -a -f ${.TARGET}.tmp ${ZFS_CFLAGS} + ${MAKE} -V CFILES_OFED -V CFILES_MLX5 | \ + MKDEP_CPP="${CC} -E" CC="${CC}" xargs mkdep -a -f ${.TARGET}.tmp \ + ${CFLAGS} ${OFEDINCLUDES} +# Assembly files + ${MAKE} -V SFILES_NORMAL | \ + MKDEP_CPP="${CC} -E" CC="${CC}" xargs mkdep -a -f ${.TARGET}.tmp ${ASM_CFLAGS} ${MAKE} -V SFILES_ZFS | \ - MKDEP_CPP="${CC} -E" xargs mkdep -a -f .newdep ${ZFS_ASM_CFLAGS} - rm -f .depend - mv .newdep .depend + MKDEP_CPP="${CC} -E" CC="${CC}" xargs mkdep -a -f ${.TARGET}.tmp ${ZFS_ASM_CFLAGS} + mv ${.TARGET}.tmp ${.TARGET} _ILINKS= machine .if ${MACHINE} != ${MACHINE_CPUARCH} From owner-svn-src-stable-10@freebsd.org Sat Feb 6 14:03:32 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA280A9ED42; Sat, 6 Feb 2016 14:03:32 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A6FE87F4; Sat, 6 Feb 2016 14:03:32 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u16E3V6N056484; Sat, 6 Feb 2016 14:03:31 GMT (envelope-from wblock@FreeBSD.org) Received: (from wblock@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u16E3VIp056483; Sat, 6 Feb 2016 14:03:31 GMT (envelope-from wblock@FreeBSD.org) Message-Id: <201602061403.u16E3VIp056483@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wblock set sender to wblock@FreeBSD.org using -f From: Warren Block Date: Sat, 6 Feb 2016 14:03:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r295350 - stable/10/lib/libc/string X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2016 14:03:33 -0000 Author: wblock (doc committer) Date: Sat Feb 6 14:03:31 2016 New Revision: 295350 URL: https://svnweb.freebsd.org/changeset/base/295350 Log: MFC r294597: Add a standards compliance note for strtok_r Approved by: re (marius@) Modified: stable/10/lib/libc/string/strtok.3 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/string/strtok.3 ============================================================================== --- stable/10/lib/libc/string/strtok.3 Sat Feb 6 13:39:20 2016 (r295349) +++ stable/10/lib/libc/string/strtok.3 Sat Feb 6 14:03:31 2016 (r295350) @@ -44,7 +44,7 @@ .\" @(#)strtok.3 8.2 (Berkeley) 2/3/94 .\" $FreeBSD$ .\" -.Dd November 27, 1998 +.Dd January 22, 2016 .Dt STRTOK 3 .Os .Sh NAME @@ -149,6 +149,11 @@ The function conforms to .St -isoC . +The +.Fn strtok_r +function +conforms to +.St -p1003.1-2001 . .Sh AUTHORS .An Wes Peters , Softweyr LLC: From owner-svn-src-stable-10@freebsd.org Sat Feb 6 16:58:57 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4D29A9F31D; Sat, 6 Feb 2016 16:58:57 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B605118E; Sat, 6 Feb 2016 16:58:57 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u16Gwug2006968; Sat, 6 Feb 2016 16:58:56 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u16GwuhB006967; Sat, 6 Feb 2016 16:58:56 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201602061658.u16GwuhB006967@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 6 Feb 2016 16:58:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r295353 - stable/10/sys/fs/ext2fs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2016 16:58:57 -0000 Author: pfg Date: Sat Feb 6 16:58:56 2016 New Revision: 295353 URL: https://svnweb.freebsd.org/changeset/base/295353 Log: MFC r295209; Revert r294695; passthrough any extra timestamps to the dinode struct. The original ext2fs change worked fine on disks formated with default values, but it was the cause of a regression when inodes are small. Revert it for now, while we figure out safer ways pass such values, PR: 206820 Approved by: re Modified: stable/10/sys/fs/ext2fs/ext2_inode_cnv.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/ext2fs/ext2_inode_cnv.c ============================================================================== --- stable/10/sys/fs/ext2fs/ext2_inode_cnv.c Sat Feb 6 15:39:04 2016 (r295352) +++ stable/10/sys/fs/ext2fs/ext2_inode_cnv.c Sat Feb 6 16:58:56 2016 (r295353) @@ -149,11 +149,13 @@ ext2_i2ei(struct inode *ip, struct ext2f ei->e2di_atime = ip->i_atime; ei->e2di_mtime = ip->i_mtime; ei->e2di_ctime = ip->i_ctime; - ei->e2di_ctime_extra = NSEC_TO_XTIME(ip->i_ctimensec); - ei->e2di_mtime_extra = NSEC_TO_XTIME(ip->i_mtimensec); - ei->e2di_atime_extra = NSEC_TO_XTIME(ip->i_atimensec); - ei->e2di_crtime = ip->i_birthtime; - ei->e2di_crtime_extra = NSEC_TO_XTIME(ip->i_birthnsec); + if (E2DI_HAS_XTIME(ip)) { + ei->e2di_ctime_extra = NSEC_TO_XTIME(ip->i_ctimensec); + ei->e2di_mtime_extra = NSEC_TO_XTIME(ip->i_mtimensec); + ei->e2di_atime_extra = NSEC_TO_XTIME(ip->i_atimensec); + ei->e2di_crtime = ip->i_birthtime; + ei->e2di_crtime_extra = NSEC_TO_XTIME(ip->i_birthnsec); + } ei->e2di_flags = 0; ei->e2di_flags |= (ip->i_flags & SF_APPEND) ? EXT2_APPEND: 0; ei->e2di_flags |= (ip->i_flags & SF_IMMUTABLE) ? EXT2_IMMUTABLE: 0; From owner-svn-src-stable-10@freebsd.org Sat Feb 6 22:06:18 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6FD8AA9F248 for ; Sat, 6 Feb 2016 22:06:18 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: from mail-wm0-x229.google.com (mail-wm0-x229.google.com [IPv6:2a00:1450:400c:c09::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0CC45C3E for ; Sat, 6 Feb 2016 22:06:17 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: by mail-wm0-x229.google.com with SMTP id 128so112145848wmz.1 for ; Sat, 06 Feb 2016 14:06:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=from:subject:to:references:cc:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=Am9S6Uv5jMNxIKFcDvCZ+/zd8FS5dOBBdL6mYr11R1Q=; b=z8fzgtNuzJAHio4rQMdzGKhlrYrbl7bOKqp0syxLc12Dlf9dSskck6mrqYvBFRoFAB Io3fAE7bK8U3Dx2b4rjhN7yQJk/957clwTRFKODQ/uEz9QNE9kft4XUFI9blWixokNnK IIFuBgtCINGUDonhjpXPtfndz+ExdD/grdlYFwZpcBpo3nDyvLqzGLZlx9lXsMbn7/Cd C/DmyvZxFOFGdqBGwU66uJqvOH2Aw9EDS/DQw5oWcauJhyKIU5gcFEClyypd/MmqYP0J AWDL+wKBKxjo0W0Z37OeONmJ+IwjV8K6i8maWPkd15sqmrYBUREg3lLuvFOOxToaJnJv b+bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:subject:to:references:cc:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=Am9S6Uv5jMNxIKFcDvCZ+/zd8FS5dOBBdL6mYr11R1Q=; b=BI+CvXoqIxk7VXRZSoPQj3K8TraroXphjm+MzpgWApSTuLQybFVN4ujB7VtzFM4yqB NJQTKtLe/Uzv0cqZeFTODtutyl5ag7uiwNzTWgQHxS9GPQtXCxLkPXFhZlKFBRV8PtpA +jLAW/tfLrNJGMtQxls0TIW/b7AQvKVaVOIILqIAM7ueYtzsu+DH0qi6PZCOgFu0z56/ 6T93zUueOJUEId6NR+zMIcVmN5LIGnHooChF7lZNA7FtiL6QtVhPP2v85OyE27gW9CYC x9uPBqhPufQeRJiKEEJ42noK3YU2GxF3ADQV/Gb47E/tGoZWpFOye/JTU2RhKcYq8tcd nyYg== X-Gm-Message-State: AG10YOSTomytP+ywFUDeyzPnyq2v0Fw07YdXO5F6Qd2sAa3Vhw1m/XFJrWSxGwVHquIdJMR6 X-Received: by 10.28.148.130 with SMTP id w124mr4224091wmd.71.1454796376251; Sat, 06 Feb 2016 14:06:16 -0800 (PST) Received: from [10.10.1.58] (liv3d.labs.multiplay.co.uk. [82.69.141.171]) by smtp.gmail.com with ESMTPSA id t205sm4972641wmt.23.2016.02.06.14.06.14 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 06 Feb 2016 14:06:14 -0800 (PST) From: Steven Hartland X-Google-Original-From: Steven Hartland Subject: Re: svn commit: r294981 - in stable/10/sys/boot: common efi efi/boot1 efi/include efi/libefi efi/loader efi/loader/arch/amd64 fdt i386/libi386 To: NGie Cooper References: <201601281211.u0SCBhQG058154@repo.freebsd.org> <88C90200-1BC4-4C95-B37B-71AC33868217@gmail.com> Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org, FreeBSD Release Engineering Team Message-ID: <56B66E71.2050802@freebsd.org> Date: Sat, 6 Feb 2016 22:06:41 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <88C90200-1BC4-4C95-B37B-71AC33868217@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2016 22:06:18 -0000 After waiting 6 1/2 hours for a tinderbox build the fix for this is in r295356. I'm now kicking off a stable/10 tinderbox with this + ia64 (stable/10) fix. I'll know by tomorrow morning, apologies for the breakage. Regards Steve On 05/02/2016 21:22, NGie Cooper wrote: >> On Jan 28, 2016, at 04:11, Steven Hartland wrote: >> >> Author: smh >> Date: Thu Jan 28 12:11:42 2016 >> New Revision: 294981 >> URL: https://svnweb.freebsd.org/changeset/base/294981 >> >> Log: >> MFC r281169, r293724, r293796, r294029, r294041, r294058 >> >> MFC r281169 (by andrew): >> Make global variabled only used in this file static >> >> MFC r294058: >> Make common boot file_loadraw name parameter const >> >> MFC r294041: >> Remove unused reg param from fdt_fixup_memory >> >> MFC r293724: >> Enable warnings in EFI boot code >> >> MFC r293796: >> Fix typo in libefi.c >> >> MFC r294029: >> Only build EFI components on supported compilers >> >> Sponsored by: Multiplay > This commit broke tinderbox with arm:armeb on universe10a.freebsd.org: > > cc1: warnings being treated as errors > In file included from /scratch/tmp/ngie/svn/sys/boot/arm/uboot/../../common/load_elf32.c:7: > /scratch/tmp/ngie/svn/sys/boot/arm/uboot/../../common/load_elf.c: In function 'elf32_parse_modmetadata': > /scratch/tmp/ngie/svn/sys/boot/arm/uboot/../../common/load_elf.c:859: warning: cast to pointer from integer of different size > *** [load_elf32.o] Error code 1 > > Given the issues that we have with ia64 not being able to build right now, I would consider pulling this out of ^/stable/10, fully fixing it, then reintegrating it. > > Thanks, > -Ngie