Re: svn commit: r331506 - in stable/11/sys: arm/at91 arm/broadcom/bcm2835 arm/freescale/imx arm/freescale/vybrid arm/lpc arm/samsung/exynos arm/ti dev/flash dev/spibus dev/xilinx mips/atheros mips/med

2018-03-28 Thread Andre Albsmeier
On Sat, 24-Mar-2018 at 23:23:31 +, Ian Lepore wrote:
> Author: ian
> Date: Sat Mar 24 23:23:31 2018
> New Revision: 331506
> URL: https://svnweb.freebsd.org/changeset/base/331506
> 
> Log:
>   MFC r310017, r310229, r312289, r327260, r329539, r329544-r329546, r329620,
>   r329729, r329911, r32
>   ...
>   r329546:
>   Build at45d and mx25l SPI flash drivers as modules.
>   ...

Probably missing:

--- sys/modules/spi/mx25l/Makefile.ORI  2018-03-25 19:36:19.825192000 +0200
+++ sys/modules/spi/mx25l/Makefile  2018-03-29 07:23:45.630508000 +0200
@@ -10,6 +10,7 @@
bus_if.h \
device_if.h \
spibus_if.h \
+   opt_platform.h
 
 .if !empty(OPT_FDT)
 SRCS+= ofw_bus_if.h
___
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-unsubscr...@freebsd.org"


svn commit: r331729 - stable/11/sbin/ifconfig

2018-03-28 Thread Marcelo Araujo
Author: araujo
Date: Thu Mar 29 05:01:49 2018
New Revision: 331729
URL: https://svnweb.freebsd.org/changeset/base/331729

Log:
  MFC r305860, r306371
  
  r305860:
  Add an option called "random" that combined with "ether" can generate a
  random MAC address for an Ethernet interface.
  
  PR:   211984
  Submitted by: pi@
  Reviewed by:  gnn, cem, jhb, lidl, rpokala, wblock
  Approved by:  wblock (manpages)
  
  r306371:
  Indicate that this is a locally administered MAC address.
  
  Submitted by: lidl
  Differential Revision:https://reviews.freebsd.org/D7903
  
  PR:   226459
  Requested by: tobik

Modified:
  stable/11/sbin/ifconfig/af_link.c
  stable/11/sbin/ifconfig/ifconfig.8
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sbin/ifconfig/af_link.c
==
--- stable/11/sbin/ifconfig/af_link.c   Thu Mar 29 04:51:07 2018
(r331728)
+++ stable/11/sbin/ifconfig/af_link.c   Thu Mar 29 05:01:49 2018
(r331729)
@@ -133,13 +133,24 @@ link_getaddr(const char *addr, int which)
 
if (which != ADDR)
errx(1, "can't set link-level netmask or broadcast");
-   if ((temp = malloc(strlen(addr) + 2)) == NULL)
-   errx(1, "malloc failed");
-   temp[0] = ':';
-   strcpy(temp + 1, addr);
-   sdl.sdl_len = sizeof(sdl);
-   link_addr(temp, );
-   free(temp);
+   if (!strcmp(addr, "random")) {
+   sdl.sdl_len = sizeof(sdl);
+   sdl.sdl_alen = ETHER_ADDR_LEN;
+   sdl.sdl_nlen = 0;
+   sdl.sdl_family = AF_LINK;
+   arc4random_buf(_data, ETHER_ADDR_LEN);
+   /* Non-multicast and claim it is locally administered. */
+   sdl.sdl_data[0] &= 0xfc;
+   sdl.sdl_data[0] |= 0x02;
+   } else {
+   if ((temp = malloc(strlen(addr) + 2)) == NULL)
+   errx(1, "malloc failed");
+   temp[0] = ':';
+   strcpy(temp + 1, addr);
+   sdl.sdl_len = sizeof(sdl);
+   link_addr(temp, );
+   free(temp);
+   }
if (sdl.sdl_alen > sizeof(sa->sa_data))
errx(1, "malformed link-level address");
sa->sa_family = AF_LINK;

Modified: stable/11/sbin/ifconfig/ifconfig.8
==
--- stable/11/sbin/ifconfig/ifconfig.8  Thu Mar 29 04:51:07 2018
(r331728)
+++ stable/11/sbin/ifconfig/ifconfig.8  Thu Mar 29 05:01:49 2018
(r331729)
@@ -28,7 +28,7 @@
 .\" From: @(#)ifconfig.8   8.3 (Berkeley) 1/5/94
 .\" $FreeBSD$
 .\"
-.Dd June 8, 2016
+.Dd September 17, 2016
 .Dt IFCONFIG 8
 .Os
 .Sh NAME
@@ -145,6 +145,12 @@ is specified as a series of colon-separated hex digits
 This can be used to, for example,
 set a new MAC address on an Ethernet interface, though the
 mechanism used is not Ethernet specific.
+Use the
+.Pq Dq random
+keyword to set a randomly generated MAC address.
+A randomly-generated MAC address might be the same as one already in use
+in the network.
+Such duplications are extremely unlikely.
 If the interface is already
 up when this option is used, it will be briefly brought down and
 then brought back up again in order to ensure that the receive
@@ -254,7 +260,7 @@ Display subnet masks in dotted quad notation, for exam
 .br
 255.255.0.0 or 255.255.255.192
 .It Sy hex
-Display subnet masks in hexidecimal, for example:
+Display subnet masks in hexadecimal, for example:
 .br
 0x or 0xffc0
 .El
@@ -2615,13 +2621,13 @@ and
 .Cm vlandev
 must both be set at the same time.
 .It Cm vlanpcp Ar priority_code_point
-Priority code point 
+Priority code point
 .Pq Dv PCP
 is an 3-bit field which refers to the IEEE 802.1p
 class of service and maps to the frame priority level.
 .Pp
 Values in order of priority are:
-.Cm 1 
+.Cm 1
 .Pq Dv Background (lowest) ,
 .Cm 0
 .Pq Dv Best effort (default) ,
@@ -2759,7 +2765,7 @@ interface to send the frame directly to the remote hos
 broadcasting the frame to the multicast group.
 This is the default.
 .It Fl vxlanlearn
-The forwarding table is not populated by recevied packets.
+The forwarding table is not populated by received packets.
 .It Cm vxlanflush
 Delete all dynamically-learned addresses from the forwarding table.
 .It Cm vxlanflushall
___
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-unsubscr...@freebsd.org"


svn commit: r331728 - in stable/11/etc: . rc.d

2018-03-28 Thread Marcelo Araujo
Author: araujo
Date: Thu Mar 29 04:51:07 2018
New Revision: 331728
URL: https://svnweb.freebsd.org/changeset/base/331728

Log:
  MFC r329817:
  
  The firewall_type is ignored if not set in rc.conf or rc.conf.local,
  after r190575 there is an option to call rc.firewall with the firewall_type
  passed in as an argument.
  
  Submitted by: David P. Discher 
  Sponsored by: iXsystems Inc.
  Differential Revision:https://reviews.freebsd.org/D14286

Modified:
  stable/11/etc/rc.d/ipfw
  stable/11/etc/rc.firewall
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/etc/rc.d/ipfw
==
--- stable/11/etc/rc.d/ipfw Thu Mar 29 04:41:45 2018(r331727)
+++ stable/11/etc/rc.d/ipfw Thu Mar 29 04:51:07 2018(r331728)
@@ -40,7 +40,11 @@ ipfw_start()
 {
local   _firewall_type
 
-   _firewall_type=$1
+   if [ -n "${1}" ]; then
+   _firewall_type=$1
+   else
+   _firewall_type=${firewall_type}
+   fi
 
# set the firewall rules script if none was specified
[ -z "${firewall_script}" ] && firewall_script=/etc/rc.firewall

Modified: stable/11/etc/rc.firewall
==
--- stable/11/etc/rc.firewall   Thu Mar 29 04:41:45 2018(r331727)
+++ stable/11/etc/rc.firewall   Thu Mar 29 04:51:07 2018(r331728)
@@ -112,12 +112,20 @@ setup_ipv6_mandatory() {
${fwcmd} add pass ipv6-icmp from any to any icmp6types 2,135,136
 }
 
+. /etc/rc.subr
+. /etc/network.subr
+
 if [ -n "${1}" ]; then
firewall_type="${1}"
 fi
+if [ -z "${firewall_rc_config_load}" ]; then
+load_rc_config ipfw
+else
+for i in ${firewall_rc_config_load}; do
+load_rc_config $i
+done
+fi
 
-. /etc/rc.subr
-. /etc/network.subr
 afexists inet6
 ipv6_available=$?
 
___
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-unsubscr...@freebsd.org"


Re: svn commit: r331502 - stable/11/sys/modules/i2c/iicbus

2018-03-28 Thread Andre Albsmeier
On Sat, 24-Mar-2018 at 22:50:59 +, Ian Lepore wrote:
> Author: ian
> Date: Sat Mar 24 22:50:59 2018
> New Revision: 331502
> URL: https://svnweb.freebsd.org/changeset/base/331502
> 
> Log:
>   MFC r329534-r329535
>   
>   r329534:
>   Arrange SRCS= as 1 file per line, alphabetical, so it's easier to maintain.
>   Whitespace only, no functional changes.
>   
>   r329535:
>   Add iic_recover_bus.c, now part of iicbus.  This should have been added
>   as part of r320463.

And this one probably too ;-).
 
--- Makefile.ORI2018-03-29 06:40:08.695742000 +0200
+++ Makefile2018-03-29 06:40:20.743473000 +0200
@@ -13,6 +13,7 @@
iicbus_if.h \
iiconf.c \
iiconf.h \
+   opt_platform.h
 
 .if !empty(OPT_FDT)
 SRCS+= ofw_iicbus.c ofw_bus_if.h
___
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-unsubscr...@freebsd.org"


svn commit: r331727 - in stable/11: share/man/man9 sys/kern sys/sys

2018-03-28 Thread Matt Joras
Author: mjoras
Date: Thu Mar 29 04:41:45 2018
New Revision: 331727
URL: https://svnweb.freebsd.org/changeset/base/331727

Log:
  MFC r325621, r325622, r331227
  
  Add EVENTHANDLER_LIST and some users.
  
  Also fix a longstanding bug in mtx initialization.

Modified:
  stable/11/share/man/man9/EVENTHANDLER.9
  stable/11/sys/kern/init_main.c
  stable/11/sys/kern/kern_exec.c
  stable/11/sys/kern/kern_exit.c
  stable/11/sys/kern/kern_fork.c
  stable/11/sys/kern/kern_proc.c
  stable/11/sys/kern/kern_thread.c
  stable/11/sys/kern/subr_eventhandler.c
  stable/11/sys/sys/eventhandler.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/share/man/man9/EVENTHANDLER.9
==
--- stable/11/share/man/man9/EVENTHANDLER.9 Thu Mar 29 04:14:37 2018
(r331726)
+++ stable/11/share/man/man9/EVENTHANDLER.9 Thu Mar 29 04:41:45 2018
(r331727)
@@ -23,7 +23,7 @@
 .\" SUCH DAMAGE.
 .\" $FreeBSD$
 .\"
-.Dd October 1, 2017
+.Dd October 31, 2017
 .Dt EVENTHANDLER 9
 .Os
 .Sh NAME
@@ -38,6 +38,9 @@
 .Fn EVENTHANDLER_REGISTER name func arg priority
 .Fn EVENTHANDLER_DEREGISTER name tag
 .Fn EVENTHANDLER_DEREGISTER_NOWAIT name tag
+.Fn EVENTHANDLER_LIST_DECLARE name
+.Fn EVENTHANDLER_LIST_DEFINE name
+.Fn EVENTHANDLER_DIRECT_INVOKE name
 .Ft eventhandler_tag
 .Fo eventhandler_register
 .Fa "struct eventhandler_list *list"
@@ -82,8 +85,13 @@ may be used if the handler does not have a specific pr
 associated with it.
 .Pp
 The normal way to use this subsystem is via the macro interface.
-The macros that can be used for working with event handlers and callback
-function lists are:
+For events that are high frequency it is suggested that you additionally use
+.Fn EVENTHANDLER_LIST_DEFINE
+so that the event handlers can be invoked directly using
+.Fn EVENTHANDLER_DIRECT_INVOKE
+(see below).
+This saves the invoker from having to do a locked traversal of a global
+list of event handler lists.
 .Bl -tag -width indent
 .It Fn EVENTHANDLER_DECLARE
 This macro declares an event handler named by argument
@@ -148,6 +156,27 @@ Additional arguments to the macro after the
 .Fa name
 parameter are passed as the second and subsequent arguments to each
 registered callback function.
+.It Fn EVENTHANDLER_LIST_DEFINE
+This macro defines a reference to an event handler list named by
+argument
+.Fa name .
+It uses
+.Xr SYSINIT 9
+to initialize the reference and the eventhandler list.
+.It Fn EVENTHANDLER_LIST_DECLARE
+This macro declares an event handler list named by argument
+.Fa name .
+This is only needed for users of
+.Fn EVENTHANDLER_DIRECT_INVOKE
+which are not in the same compilation unit of that list's definition.
+.It Fn EVENTHANDLER_DIRECT_INVOKE
+This macro invokes the event handlers registered for the list named by
+argument
+.Fa name .
+This macro can only be used if the list was defined with
+.Fn EVENTHANDLER_LIST_DEFINE .
+The macro is variadic with the same semantics as
+.Fn EVENTHANDLER_INVOKE .
 .El
 .Pp
 The macros are implemented using the following functions:
@@ -315,7 +344,7 @@ This is never called.
 .It Vt process_fork
 Callbacks invoked when a process forks a child.
 .It Vt process_init
-Callback invoked when a process is initalized.
+Callback invoked when a process is initialized.
 .It Vt random_adaptor_attach
 Callback invoked when a new random module has been loaded.
 .It Vt register_framebuffer
@@ -337,7 +366,7 @@ Callback invoked when a thread object is created.
 .It Vt thread_dtor
 Callback invoked when a thread object is destroyed.
 .It Vt thread_init
-Callback invoked when a thread object is initalized.
+Callback invoked when a thread object is initialized.
 .It Vt thread_fini
 Callback invoked when a thread object is deinitalized.
 .It Vt usb_dev_configured
@@ -384,4 +413,6 @@ facility first appeared in
 .Fx 4.0 .
 .Sh AUTHORS
 This manual page was written by
-.An Joseph Koshy Aq Mt jko...@freebsd.org .
+.An Joseph Koshy Aq Mt jko...@freebsd.org
+and
+.An Matt Joras Aq Mt mjo...@freebsd.org .

Modified: stable/11/sys/kern/init_main.c
==
--- stable/11/sys/kern/init_main.c  Thu Mar 29 04:14:37 2018
(r331726)
+++ stable/11/sys/kern/init_main.c  Thu Mar 29 04:41:45 2018
(r331727)
@@ -136,6 +136,11 @@ SET_DECLARE(sysinit_set, struct sysinit);
 struct sysinit **sysinit, **sysinit_end;
 struct sysinit **newsysinit, **newsysinit_end;
 
+EVENTHANDLER_LIST_DECLARE(process_init);
+EVENTHANDLER_LIST_DECLARE(thread_init);
+EVENTHANDLER_LIST_DECLARE(process_ctor);
+EVENTHANDLER_LIST_DECLARE(thread_ctor);
+
 /*
  * Merge a new sysinit set into the current set, reallocating it if
  * necessary.  This can only be called after malloc is running.
@@ -585,10 +590,10 @@ proc0_init(void *dummy __unused)
 * Call the init and ctor for the new thread and proc.  We wait
 * to do this until all other structures are 

svn commit: r331726 - head/tools/tools/crypto

2018-03-28 Thread Conrad Meyer
Author: cem
Date: Thu Mar 29 04:14:37 2018
New Revision: 331726
URL: https://svnweb.freebsd.org/changeset/base/331726

Log:
  cryptocheck: Add Chacha20 cipher to tool

Modified:
  head/tools/tools/crypto/cryptocheck.c

Modified: head/tools/tools/crypto/cryptocheck.c
==
--- head/tools/tools/crypto/cryptocheck.c   Thu Mar 29 04:07:53 2018
(r331725)
+++ head/tools/tools/crypto/cryptocheck.c   Thu Mar 29 04:14:37 2018
(r331726)
@@ -96,6 +96,7 @@
  * aes-ctr256  256-bit aes ctr
  * aes-xts 128-bit aes xts
  * aes-xts256  256-bit aes xts
+ * chacha20
  *
  * Authenticated Encryption:
  * +
@@ -162,6 +163,8 @@ struct alg {
  .evp_cipher = EVP_aes_128_xts },
{ .name = "aes-xts256", .cipher = CRYPTO_AES_XTS, .type = T_BLKCIPHER,
  .evp_cipher = EVP_aes_256_xts },
+   { .name = "chacha20", .cipher = CRYPTO_CHACHA20, .type = T_BLKCIPHER,
+ .evp_cipher = EVP_chacha20 },
{ .name = "aes-gcm", .cipher = CRYPTO_AES_NIST_GCM_16,
  .mac = CRYPTO_AES_128_NIST_GMAC, .type = T_GCM,
  .evp_cipher = EVP_aes_128_gcm },
___
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-unsubscr...@freebsd.org"


svn commit: r331725 - head/tools/tools/crypto

2018-03-28 Thread Conrad Meyer
Author: cem
Date: Thu Mar 29 04:07:53 2018
New Revision: 331725
URL: https://svnweb.freebsd.org/changeset/base/331725

Log:
  cryptotest: Add chacha20 cipher

Modified:
  head/tools/tools/crypto/cryptotest.c

Modified: head/tools/tools/crypto/cryptotest.c
==
--- head/tools/tools/crypto/cryptotest.cThu Mar 29 04:02:50 2018
(r331724)
+++ head/tools/tools/crypto/cryptotest.cThu Mar 29 04:07:53 2018
(r331725)
@@ -56,6 +56,7 @@
  * aes rijndael/aes 128-bit cbc
  * aes192  rijndael/aes 192-bit cbc
  * aes256  rijndael/aes 256-bit cbc
+ * chacha20 Chacha20 stream cipher
  * blake2b Blake2b
  * blake2s Blake2s
  * md5 md5 hmac
@@ -134,6 +135,7 @@ struct alg {
{ "aes",0,  16, 16, 16, CRYPTO_AES_CBC},
{ "aes192", 0,  16, 24, 24, CRYPTO_AES_CBC},
{ "aes256", 0,  16, 32, 32, CRYPTO_AES_CBC},
+   { "chacha20",   0,  1,  32, 32, CRYPTO_CHACHA20},
{ "blake2b",1,  128,64, 64, CRYPTO_BLAKE2B },
{ "blake2s",1,  64, 32, 32, CRYPTO_BLAKE2S },
{ "md5",1,  8,  16, 16, CRYPTO_MD5_HMAC },
@@ -150,7 +152,7 @@ usage(const char* cmd)
cmd);
printf("where algorithm is one of:\n");
printf("null des 3des (default) blowfish cast skipjack rij\n");
-   printf("aes aes192 aes256 md5 sha1 sha256 sha384 sha512\n");
+   printf("aes aes192 aes256 chacha20 md5 sha1 sha256 sha384 
sha512\n");
printf("blake2b blake2s\n");
printf(" or an encryption algorithm concatented with authentication\n");
printf(" algorithm with '+' in the middle, e.g., aes+sha1.\n");
___
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-unsubscr...@freebsd.org"


svn commit: r331724 - in head/sys: conf crypto/chacha20 modules/crypto opencrypto

2018-03-28 Thread Conrad Meyer
Author: cem
Date: Thu Mar 29 04:02:50 2018
New Revision: 331724
URL: https://svnweb.freebsd.org/changeset/base/331724

Log:
  opencrypto: Integrate Chacha20 algorithm into OCF
  
  Mostly this is a thin shim around existing code to integrate with enc_xform
  and cryptosoft (+ cryptodev).
  
  Expand the cryptodev buffer used to match that of Chacha20's native block
  size as a performance enhancement for chacha20_xform_crypt_multi.

Added:
  head/sys/crypto/chacha20/chacha-sw.c   (contents, props changed)
Modified:
  head/sys/conf/files
  head/sys/modules/crypto/Makefile
  head/sys/opencrypto/cryptodev.c
  head/sys/opencrypto/cryptodev.h
  head/sys/opencrypto/cryptosoft.c
  head/sys/opencrypto/xform_enc.h

Modified: head/sys/conf/files
==
--- head/sys/conf/files Thu Mar 29 02:54:50 2018(r331723)
+++ head/sys/conf/files Thu Mar 29 04:02:50 2018(r331724)
@@ -662,6 +662,8 @@ crypto/blowfish/bf_ecb.coptional ipsec | ipsec_suppor
 crypto/blowfish/bf_skey.c  optional crypto | ipsec | ipsec_support
 crypto/camellia/camellia.c optional crypto | ipsec | ipsec_support
 crypto/camellia/camellia-api.c optional crypto | ipsec | ipsec_support
+crypto/chacha20/chacha.c   optional crypto | ipsec | ipsec_support
+crypto/chacha20/chacha-sw.coptional crypto | ipsec | ipsec_support
 crypto/des/des_ecb.c   optional crypto | ipsec | ipsec_support | netsmb
 crypto/des/des_setkey.coptional crypto | ipsec | ipsec_support 
| netsmb
 crypto/rc4/rc4.c   optional netgraph_mppc_encryption | kgssapi

Added: head/sys/crypto/chacha20/chacha-sw.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/crypto/chacha20/chacha-sw.cThu Mar 29 04:02:50 2018
(r331724)
@@ -0,0 +1,78 @@
+/* This file is in the public domain. */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+#include 
+#include 
+
+static int
+chacha20_xform_setkey(u_int8_t **sched, u_int8_t *key, int len)
+{
+   struct chacha_ctx *ctx;
+
+   if (len != CHACHA_MINKEYLEN && len != 32)
+   return (EINVAL);
+
+   ctx = malloc(sizeof(*ctx), M_CRYPTO_DATA, M_NOWAIT | M_ZERO);
+   *sched = (void *)ctx;
+   if (ctx == NULL)
+   return (ENOMEM);
+
+   chacha_keysetup(ctx, key, len * 8);
+   return (0);
+}
+
+static void
+chacha20_xform_reinit(caddr_t key, u_int8_t *iv)
+{
+   struct chacha_ctx *ctx;
+
+   ctx = (void *)key;
+   chacha_ivsetup(ctx, iv + 8, iv);
+}
+
+static void
+chacha20_xform_zerokey(u_int8_t **sched)
+{
+   struct chacha_ctx *ctx;
+
+   ctx = (void *)*sched;
+   explicit_bzero(ctx, sizeof(*ctx));
+   free(ctx, M_CRYPTO_DATA);
+   *sched = NULL;
+}
+
+static void
+chacha20_xform_crypt(caddr_t cctx, u_int8_t *bytes)
+{
+   struct chacha_ctx *ctx;
+
+   ctx = (void *)cctx;
+   chacha_encrypt_bytes(ctx, bytes, bytes, 1);
+}
+
+static void
+chacha20_xform_crypt_multi(void *vctx, uint8_t *bytes, size_t len)
+{
+   struct chacha_ctx *ctx;
+
+   ctx = vctx;
+   chacha_encrypt_bytes(ctx, bytes, bytes, len);
+}
+
+struct enc_xform enc_xform_chacha20 = {
+   .type = CRYPTO_CHACHA20,
+   .name = "chacha20",
+   .blocksize = 1,
+   .ivsize = CHACHA_NONCELEN + CHACHA_CTRLEN,
+   .minkey = CHACHA_MINKEYLEN,
+   .maxkey = 32,
+   .encrypt = chacha20_xform_crypt,
+   .decrypt = chacha20_xform_crypt,
+   .setkey = chacha20_xform_setkey,
+   .zerokey = chacha20_xform_zerokey,
+   .reinit = chacha20_xform_reinit,
+   .encrypt_multi = chacha20_xform_crypt_multi,
+   .decrypt_multi = chacha20_xform_crypt_multi,
+};

Modified: head/sys/modules/crypto/Makefile
==
--- head/sys/modules/crypto/MakefileThu Mar 29 02:54:50 2018
(r331723)
+++ head/sys/modules/crypto/MakefileThu Mar 29 04:02:50 2018
(r331724)
@@ -10,6 +10,7 @@
 .PATH: ${SRCTOP}/sys/crypto/siphash
 .PATH: ${SRCTOP}/sys/crypto/skein
 .PATH: ${SRCTOP}/sys/crypto/blake2
+.PATH: ${SRCTOP}/sys/crypto/chacha20
 .PATH: ${SRCTOP}/sys/contrib/libb2
 
 KMOD   = crypto
@@ -41,6 +42,8 @@ CFLAGS.blake2s-ref.c  += -I${SRCTOP}/sys/crypto/blake2 
 CFLAGS.blake2-sw.c += -I${SRCTOP}/sys/crypto/blake2
 CWARNFLAGS.blake2b-ref.c   += ${NO_WCAST_QUAL}
 CWARNFLAGS.blake2s-ref.c   += ${NO_WCAST_QUAL}
+SRCS   += chacha.c
+SRCS   += chacha-sw.c
 SRCS   += opt_param.h cryptodev_if.h bus_if.h device_if.h
 SRCS   += opt_ddb.h
 

Modified: head/sys/opencrypto/cryptodev.c
==
--- head/sys/opencrypto/cryptodev.c Thu Mar 29 02:54:50 2018
(r331723)
+++ head/sys/opencrypto/cryptodev.c Thu Mar 29 04:02:50 2018
(r331724)
@@ -443,6 +443,9 @@ 

Re: svn commit: r331722 - in stable/11: bin/cat bin/chflags bin/chmod bin/cp bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/hostname bin/kill bin/ln bin/ls bin/mkdir bin/mv bin/pax bin/ps b

2018-03-28 Thread Rodney W. Grimes
-- Start of PGP signed section.
> On Thu, Mar 29, 2018 at 02:51:04AM +, Eitan Adler wrote:
> > Author: eadler
> > Date: Thu Mar 29 02:50:57 2018
> > New Revision: 331722
> > URL: https://svnweb.freebsd.org/changeset/base/331722
> > 
> > Log:
> >   Revert r330897:
> >   
> >   This was intended to be a non-functional change. It wasn't. The commit
> >   message was thus wrong. In addition it broke arm, and merged crypto
> >   related code.
> >   
> >   Revert with prejudice.
> >   
> >   This revert skips files touched in r316370 since that commit was since
> >   MFCed.

Um, not sure that was the right way to revert :-(.

> >   This revert also skips files that require $FreeBSD$ property
> >   changes.

And more doubts that this is right to skip anything.

> >   Thank you to those who helped me get out of this mess including but not
> >   limited to gonzo, kevans, rgrimes.
> >   
> >   Requested by: gjb (re)
> > 
> 
> I did *not* request this, especially not on re@'s behalf.  I provided
> input on what I felt was the correct way to proceed in this situation,
> where a number of commits that were not related to the intent were
> included.  There is a difference.

I tried to get this slowed down until we could get to a concenses,
I think our mess is as big now as it was before.

-- 
Rod Grimes rgri...@freebsd.org
___
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-unsubscr...@freebsd.org"


Re: Mismerge at r330897 in stable/11, Audit report

2018-03-28 Thread Rodney W. Grimes
> On Wed, Mar 28, 2018 at 07:49:06PM -0700, Rodney W. Grimes wrote:
> > > On Wed, Mar 28, 2018 at 07:17:20PM -0700, Eitan Adler wrote:
> > > > On 28 March 2018 at 19:04, Rodney W. Grimes
> > > >  wrote:
> > > > >> On 28 March 2018 at 18:35, Rodney W. Grimes
> > > > >>  wrote:
> > > > >> >> >> Hi!
> > > > >> >> >>
> > > > >> >> >> This part of the MFC is wrong:
> > > > >> >> >>
> > > > >> >> >> https://svnweb.freebsd.org/base/stable/11/sys/sys/random.h?limit_changes=0=330897=330896=330897
> > > > >> >
> > > > >> > Can we try to identify exactly what rXX that is a merge of?
> > > > >> >
> > > > >> >> >> Could you please MFC back the other random related changes 
> > > > >> >> >> too? Some
> > > > >> >> >> of them made by cem@.
> > > > >> >> >>
> > > > >> >> >> On 3/14/18, Eitan Adler  wrote:
> > > > >> >> >>> Author: eadler
> > > > >> >> >>> Date: Wed Mar 14 03:19:51 2018
> > > > >> >> >>> New Revision: 330897
> > > > >> >> >>> URL: https://svnweb.freebsd.org/changeset/base/330897
> > > > >> >> >>>
> > > > >> >> >>> Log:
> > > > >> >> >>>   Partial merge of the SPDX changes
> > > > >> >> >>>
> > > > >> >> >>>   These changes are incomplete but are making it difficult
> > > > >> >> >>>   to determine what other changes can/should be merged.
> > > > >> >> >>>
> > > > >> >> >>>   No objections from:pfg
> > > > >> >> >>>
> > > > >> >> > Am I missing something? If this MFC was supposed to be of the 
> > > > >> >> > SPDX
> > > > >> >> > license tagging, why does it have any functional changes?
> > > > >> >> >
> > > > >> >> > Especially changes to random(4)?
> > > > >> >>
> > > > >> >> This was my failure. I only spot checked & compile-checked the 
> > > > >> >> diff
> > > > >> >> since I expected all changes to be comments/SPDX.
> > > > >> >>
> > > > >> >> However, I must have gotten carried away and included a few too 
> > > > >> >> many
> > > > >> >> revisions. Unfortunately some people have already merged fixes to 
> > > > >> >> my
> > > > >> >> failure and thus this can't be reverted as is without also 
> > > > >> >> reverting
> > > > >> >> those fixes.
> > > > >> >>
> > > > >> >> That said, I should do that since this commit message is utterly 
> > > > >> >> wrong.
> > > > >> >
> > > > >> > We do not have to revert r330897, with what follows I think
> > > > >> > we can easily find the revisions to revert from stable/11.
> > > > >> > ...
> > > > >>
> > > > >> While we don't have to revert it I'd rather do so than have bogus 
> > > > >> history.
> > > > >
> > > > > Reverting wont remove that history, thats a one way deal,
> > > > > and I think if we revert the bogus merges with the wrong
> > > > > history thats as good as its gona get.
> > > > >
> > > > >>
> > > > >> >From a look it seems the following was also merged:
> > > > >> r316370, r317095, r324394, and a few others.
> > > > >>
> > > > >> Is there a reason you don't want me to revert the changes?
> > > > >
> > > > > Repository churn is my main concern.
> > > > >
> > > > > It touches 6000+ files some of which have probably
> > > > > been touched since.   A very carefull pre commit
> > > > > audit would need to be done.
> > > > >
> > > > > Then another commit to 6000+ files to put it back,
> > > > > also needing a pre-commit audit. (Pretty easy now
> > > > > that I have a filter.)
> > > > 
> > > > I'm actually using the same filter you pasted above to verify that my
> > > > changes are only reverting said files. That said, while I'd prefer to
> > > > revert, I'll defer to others if they have a differing opinion.
> > > > 
> > > > 
> > > > Note that I won't have access my dev box after tomorrow for about a 
> > > > week.
> > > > 
> > > 
> > > IMHO, if you are going to be away for over a week while we're headed
> > > directly into the 11.2 release cycle, revert the change.  What you
> > > committed is not what was intended, clearly, and the commit message does
> > > not reflect what had happened (as you noted).
> > > 
> > > Any disagreements on this decision should be directed to me specifically
> > > in this case.
> > 
> > Glen,
> > I would rather not revert, as I believe that would cause more
> > damages as people have already cleaned up some of the mis merge from
> > this commit.  I am pretty sure a revert would lead to a broken tree.
> > 
> > In Eitans absence I am willing to take responsiblity to untangle
> > the wrong bits and clean up stable/11.
> > 
> > Ok?
> > 
> 
> I disagree with this approach.  A mishandled merge which as in this case
> contains extraneous changes limit our ability to properly audit the
> branch.
> 
> My strong feeling is that if "too many" revisions were merged, we should
> not piecemeal break out what should not have been included.  We should,
> instead, revert the offending commit as an "oops", redo the intended
> merge, and then in a separate commit re-apply the bits from the
> offending merge in a completely separate commit.
> 

Re: Mismerge at r330897 in stable/11, Audit report

2018-03-28 Thread Glen Barber
On Wed, Mar 28, 2018 at 07:49:06PM -0700, Rodney W. Grimes wrote:
> > On Wed, Mar 28, 2018 at 07:17:20PM -0700, Eitan Adler wrote:
> > > On 28 March 2018 at 19:04, Rodney W. Grimes
> > >  wrote:
> > > >> On 28 March 2018 at 18:35, Rodney W. Grimes
> > > >>  wrote:
> > > >> >> >> Hi!
> > > >> >> >>
> > > >> >> >> This part of the MFC is wrong:
> > > >> >> >>
> > > >> >> >> https://svnweb.freebsd.org/base/stable/11/sys/sys/random.h?limit_changes=0=330897=330896=330897
> > > >> >
> > > >> > Can we try to identify exactly what rXX that is a merge of?
> > > >> >
> > > >> >> >> Could you please MFC back the other random related changes too? 
> > > >> >> >> Some
> > > >> >> >> of them made by cem@.
> > > >> >> >>
> > > >> >> >> On 3/14/18, Eitan Adler  wrote:
> > > >> >> >>> Author: eadler
> > > >> >> >>> Date: Wed Mar 14 03:19:51 2018
> > > >> >> >>> New Revision: 330897
> > > >> >> >>> URL: https://svnweb.freebsd.org/changeset/base/330897
> > > >> >> >>>
> > > >> >> >>> Log:
> > > >> >> >>>   Partial merge of the SPDX changes
> > > >> >> >>>
> > > >> >> >>>   These changes are incomplete but are making it difficult
> > > >> >> >>>   to determine what other changes can/should be merged.
> > > >> >> >>>
> > > >> >> >>>   No objections from:pfg
> > > >> >> >>>
> > > >> >> > Am I missing something? If this MFC was supposed to be of the SPDX
> > > >> >> > license tagging, why does it have any functional changes?
> > > >> >> >
> > > >> >> > Especially changes to random(4)?
> > > >> >>
> > > >> >> This was my failure. I only spot checked & compile-checked the diff
> > > >> >> since I expected all changes to be comments/SPDX.
> > > >> >>
> > > >> >> However, I must have gotten carried away and included a few too many
> > > >> >> revisions. Unfortunately some people have already merged fixes to my
> > > >> >> failure and thus this can't be reverted as is without also reverting
> > > >> >> those fixes.
> > > >> >>
> > > >> >> That said, I should do that since this commit message is utterly 
> > > >> >> wrong.
> > > >> >
> > > >> > We do not have to revert r330897, with what follows I think
> > > >> > we can easily find the revisions to revert from stable/11.
> > > >> > ...
> > > >>
> > > >> While we don't have to revert it I'd rather do so than have bogus 
> > > >> history.
> > > >
> > > > Reverting wont remove that history, thats a one way deal,
> > > > and I think if we revert the bogus merges with the wrong
> > > > history thats as good as its gona get.
> > > >
> > > >>
> > > >> >From a look it seems the following was also merged:
> > > >> r316370, r317095, r324394, and a few others.
> > > >>
> > > >> Is there a reason you don't want me to revert the changes?
> > > >
> > > > Repository churn is my main concern.
> > > >
> > > > It touches 6000+ files some of which have probably
> > > > been touched since.   A very carefull pre commit
> > > > audit would need to be done.
> > > >
> > > > Then another commit to 6000+ files to put it back,
> > > > also needing a pre-commit audit. (Pretty easy now
> > > > that I have a filter.)
> > > 
> > > I'm actually using the same filter you pasted above to verify that my
> > > changes are only reverting said files. That said, while I'd prefer to
> > > revert, I'll defer to others if they have a differing opinion.
> > > 
> > > 
> > > Note that I won't have access my dev box after tomorrow for about a week.
> > > 
> > 
> > IMHO, if you are going to be away for over a week while we're headed
> > directly into the 11.2 release cycle, revert the change.  What you
> > committed is not what was intended, clearly, and the commit message does
> > not reflect what had happened (as you noted).
> > 
> > Any disagreements on this decision should be directed to me specifically
> > in this case.
> 
> Glen,
>   I would rather not revert, as I believe that would cause more
> damages as people have already cleaned up some of the mis merge from
> this commit.  I am pretty sure a revert would lead to a broken tree.
> 
> In Eitans absence I am willing to take responsiblity to untangle
> the wrong bits and clean up stable/11.
> 
> Ok?
> 

I disagree with this approach.  A mishandled merge which as in this case
contains extraneous changes limit our ability to properly audit the
branch.

My strong feeling is that if "too many" revisions were merged, we should
not piecemeal break out what should not have been included.  We should,
instead, revert the offending commit as an "oops", redo the intended
merge, and then in a separate commit re-apply the bits from the
offending merge in a completely separate commit.

While this may be perceived as churn against the tree, it keeps tracking
what happened much easier to manage, especially if we were to have to
rely on mergeinfo.

> Eitan,
>   Are you ok with that as well?
> 

Glen



signature.asc
Description: PGP signature


Re: Mismerge at r330897 in stable/11, Audit report

2018-03-28 Thread Rodney W. Grimes
[ Charset UTF-8 unsupported, converting... ]
> On 28 March 2018 at 19:49, Rodney W. Grimes
>  wrote:
> >> On Wed, Mar 28, 2018 at 07:17:20PM -0700, Eitan Adler wrote:
> >> > On 28 March 2018 at 19:04, Rodney W. Grimes
> >> >  wrote:
> >> > >> On 28 March 2018 at 18:35, Rodney W. Grimes
> >> > >>  wrote:
> >> > >> >> >> Hi!
> >> > >> >> >>
> >> > >> >> >> This part of the MFC is wrong:
> >> > >> >> >>
> >> > >> >> >> https://svnweb.freebsd.org/base/stable/11/sys/sys/random.h?limit_changes=0=330897=330896=330897
> >> > >> >
> >> > >> > Can we try to identify exactly what rXX that is a merge of?
> >> > >> >
> >> > >> >> >> Could you please MFC back the other random related changes too? 
> >> > >> >> >> Some
> >> > >> >> >> of them made by cem@.
> >> > >> >> >>
> >> > >> >> >> On 3/14/18, Eitan Adler  wrote:
> >> > >> >> >>> Author: eadler
> >> > >> >> >>> Date: Wed Mar 14 03:19:51 2018
> >> > >> >> >>> New Revision: 330897
> >> > >> >> >>> URL: https://svnweb.freebsd.org/changeset/base/330897
> >> > >> >> >>>
> >> > >> >> >>> Log:
> >> > >> >> >>>   Partial merge of the SPDX changes
> >> > >> >> >>>
> >> > >> >> >>>   These changes are incomplete but are making it difficult
> >> > >> >> >>>   to determine what other changes can/should be merged.
> >> > >> >> >>>
> >> > >> >> >>>   No objections from:pfg
> >> > >> >> >>>
> >> > >> >> > Am I missing something? If this MFC was supposed to be of the 
> >> > >> >> > SPDX
> >> > >> >> > license tagging, why does it have any functional changes?
> >> > >> >> >
> >> > >> >> > Especially changes to random(4)?
> >> > >> >>
> >> > >> >> This was my failure. I only spot checked & compile-checked the diff
> >> > >> >> since I expected all changes to be comments/SPDX.
> >> > >> >>
> >> > >> >> However, I must have gotten carried away and included a few too 
> >> > >> >> many
> >> > >> >> revisions. Unfortunately some people have already merged fixes to 
> >> > >> >> my
> >> > >> >> failure and thus this can't be reverted as is without also 
> >> > >> >> reverting
> >> > >> >> those fixes.
> >> > >> >>
> >> > >> >> That said, I should do that since this commit message is utterly 
> >> > >> >> wrong.
> >> > >> >
> >> > >> > We do not have to revert r330897, with what follows I think
> >> > >> > we can easily find the revisions to revert from stable/11.
> >> > >> > ...
> >> > >>
> >> > >> While we don't have to revert it I'd rather do so than have bogus 
> >> > >> history.
> >> > >
> >> > > Reverting wont remove that history, thats a one way deal,
> >> > > and I think if we revert the bogus merges with the wrong
> >> > > history thats as good as its gona get.
> >> > >
> >> > >>
> >> > >> >From a look it seems the following was also merged:
> >> > >> r316370, r317095, r324394, and a few others.
> >> > >>
> >> > >> Is there a reason you don't want me to revert the changes?
> >> > >
> >> > > Repository churn is my main concern.
> >> > >
> >> > > It touches 6000+ files some of which have probably
> >> > > been touched since.   A very carefull pre commit
> >> > > audit would need to be done.
> >> > >
> >> > > Then another commit to 6000+ files to put it back,
> >> > > also needing a pre-commit audit. (Pretty easy now
> >> > > that I have a filter.)
> >> >
> >> > I'm actually using the same filter you pasted above to verify that my
> >> > changes are only reverting said files. That said, while I'd prefer to
> >> > revert, I'll defer to others if they have a differing opinion.
> >> >
> >> >
> >> > Note that I won't have access my dev box after tomorrow for about a week.
> >> >
> >>
> >> IMHO, if you are going to be away for over a week while we're headed
> >> directly into the 11.2 release cycle, revert the change.  What you
> >> committed is not what was intended, clearly, and the commit message does
> >> not reflect what had happened (as you noted).
> >>
> >> Any disagreements on this decision should be directed to me specifically
> >> in this case.
> >
> > Glen,
> > I would rather not revert, as I believe that would cause more
> > damages as people have already cleaned up some of the mis merge from
> > this commit.  I am pretty sure a revert would lead to a broken tree.
> >
> > In Eitans absence I am willing to take responsiblity to untangle
> > the wrong bits and clean up stable/11.
> >
> > Ok?
> >
> > Eitan,
> > Are you ok with that as well?
> 
> Yes. I also thank everyone who has helped me get out of this mess.
> 
> My current action plan: do nothing

Well, you just reverted it before this discussion came to a
concensus on that.   Not sure what to do now.

I guess we wait to see whats broken.

-- 
Rod Grimes rgri...@freebsd.org
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send 

Re: svn commit: r331722 - in stable/11: bin/cat bin/chflags bin/chmod bin/cp bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/hostname bin/kill bin/ln bin/ls bin/mkdir bin/mv bin/pax bin/ps b

2018-03-28 Thread Glen Barber
On Thu, Mar 29, 2018 at 02:51:04AM +, Eitan Adler wrote:
> Author: eadler
> Date: Thu Mar 29 02:50:57 2018
> New Revision: 331722
> URL: https://svnweb.freebsd.org/changeset/base/331722
> 
> Log:
>   Revert r330897:
>   
>   This was intended to be a non-functional change. It wasn't. The commit
>   message was thus wrong. In addition it broke arm, and merged crypto
>   related code.
>   
>   Revert with prejudice.
>   
>   This revert skips files touched in r316370 since that commit was since
>   MFCed. This revert also skips files that require $FreeBSD$ property
>   changes.
>   
>   Thank you to those who helped me get out of this mess including but not
>   limited to gonzo, kevans, rgrimes.
>   
>   Requested by: gjb (re)
> 

I did *not* request this, especially not on re@'s behalf.  I provided
input on what I felt was the correct way to proceed in this situation,
where a number of commits that were not related to the intent were
included.  There is a difference.

Glen



signature.asc
Description: PGP signature


svn commit: r331723 - in head: share/man/man9 sys/kern sys/sys sys/vm usr.bin/cpuset

2018-03-28 Thread Jeff Roberson
Author: jeff
Date: Thu Mar 29 02:54:50 2018
New Revision: 331723
URL: https://svnweb.freebsd.org/changeset/base/331723

Log:
  Implement several enhancements to NUMA policies.
  
  Add a new "interleave" allocation policy which stripes pages across
  domains with a stride or width keeping contiguity within a multi-page
  region.
  
  Move the kernel to the dedicated numbered cpuset #2 making it possible
  to assign kernel threads and memory policy separately from user.  This
  also eliminates the need for the complicated interrupt binding code.
  
  Add a sysctl API for viewing and manipulating domainsets.  Refactor some
  of the cpuset_t manipulation code using the generic bitset type so that
  it can be used for both.  This probably belongs in a dedicated subr file.
  
  Attempt to improve the include situation.
  
  Reviewed by:  kib
  Discussed with:   jhb (cpuset parts)
  Tested by:pho (before review feedback)
  Sponsored by: Netflix, Dell/EMC Isilon
  Differential Revision:https://reviews.freebsd.org/D14839

Added:
  head/share/man/man9/domainset.9   (contents, props changed)
Modified:
  head/share/man/man9/Makefile
  head/sys/kern/kern_cpuset.c
  head/sys/kern/kern_kthread.c
  head/sys/sys/_bitset.h
  head/sys/sys/cpuset.h
  head/sys/sys/domainset.h
  head/sys/sys/proc.h
  head/sys/vm/vm_domainset.c
  head/sys/vm/vm_domainset.h
  head/sys/vm/vm_page.c
  head/sys/vm/vnode_pager.c
  head/usr.bin/cpuset/cpuset.1
  head/usr.bin/cpuset/cpuset.c

Modified: head/share/man/man9/Makefile
==
--- head/share/man/man9/MakefileThu Mar 29 02:50:57 2018
(r331722)
+++ head/share/man/man9/MakefileThu Mar 29 02:54:50 2018
(r331723)
@@ -118,6 +118,7 @@ MAN=accept_filter.9 \
disk.9 \
dnv.9 \
domain.9 \
+   domainset.9 \
dpcpu.9 \
drbr.9 \
driver.9 \

Added: head/share/man/man9/domainset.9
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/man/man9/domainset.9 Thu Mar 29 02:54:50 2018
(r331723)
@@ -0,0 +1,128 @@
+.\" Copyright (c) 2018 Jeffrey Roberson 
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"notice, this list of conditions and the following disclaimer in the
+.\"documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS''
+.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE
+.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 24, 2018
+.Dt DOMAINSET 9
+.Os
+.Sh NAME
+.Nm domainset(9)
+\(em
+.Nm domainset_create ,
+.Nm sysctl_handle_domainset .
+.Nd domainset functions and operation
+.Sh SYNOPSIS
+.In sys/_domainset.h
+.In sys/domainset.h
+.\"
+.Bd -literal -offset indent
+struct domainset {
+domainset_t ds_mask;
+uint16_tds_policy;
+domainid_t  ds_prefer;
+   ...
+};
+.Ed
+.Pp
+.Ft struct domainset *
+.Fn domainset_create "const struct domainset *key"
+.Ft int
+.Fn sysctl_handle_domainset "SYSCTL_HANDLER_ARGS"
+.Sh DESCRIPTION
+The
+.Nm
+API provides memory domain allocation policy for NUMA machines.
+Each
+.Vt domainset
+contains a bitmask of allowed domains, an integer policy, and an optional
+preferred domain.
+Together, these specify a search order for memory allocations as well as
+the ability to restrict threads and objects to a subset of available
+memory domains for system partitioning and resource management.
+.Pp
+Every thread in the system and optionally every
+.Vt vm_object_t ,
+which is used to represent files and other memory sources, has
+a reference to a
+.Vt struct domainset .
+The domainset associated with the object is consulted first and the system
+falls back to the thread policy if none exists.
+.Pp
+The allocation policy has the following 

Re: Mismerge at r330897 in stable/11, Audit report

2018-03-28 Thread Eitan Adler
On 28 March 2018 at 19:49, Rodney W. Grimes
 wrote:
>> On Wed, Mar 28, 2018 at 07:17:20PM -0700, Eitan Adler wrote:
>> > On 28 March 2018 at 19:04, Rodney W. Grimes
>> >  wrote:
>> > >> On 28 March 2018 at 18:35, Rodney W. Grimes
>> > >>  wrote:
>> > >> >> >> Hi!
>> > >> >> >>
>> > >> >> >> This part of the MFC is wrong:
>> > >> >> >>
>> > >> >> >> https://svnweb.freebsd.org/base/stable/11/sys/sys/random.h?limit_changes=0=330897=330896=330897
>> > >> >
>> > >> > Can we try to identify exactly what rXX that is a merge of?
>> > >> >
>> > >> >> >> Could you please MFC back the other random related changes too? 
>> > >> >> >> Some
>> > >> >> >> of them made by cem@.
>> > >> >> >>
>> > >> >> >> On 3/14/18, Eitan Adler  wrote:
>> > >> >> >>> Author: eadler
>> > >> >> >>> Date: Wed Mar 14 03:19:51 2018
>> > >> >> >>> New Revision: 330897
>> > >> >> >>> URL: https://svnweb.freebsd.org/changeset/base/330897
>> > >> >> >>>
>> > >> >> >>> Log:
>> > >> >> >>>   Partial merge of the SPDX changes
>> > >> >> >>>
>> > >> >> >>>   These changes are incomplete but are making it difficult
>> > >> >> >>>   to determine what other changes can/should be merged.
>> > >> >> >>>
>> > >> >> >>>   No objections from:pfg
>> > >> >> >>>
>> > >> >> > Am I missing something? If this MFC was supposed to be of the SPDX
>> > >> >> > license tagging, why does it have any functional changes?
>> > >> >> >
>> > >> >> > Especially changes to random(4)?
>> > >> >>
>> > >> >> This was my failure. I only spot checked & compile-checked the diff
>> > >> >> since I expected all changes to be comments/SPDX.
>> > >> >>
>> > >> >> However, I must have gotten carried away and included a few too many
>> > >> >> revisions. Unfortunately some people have already merged fixes to my
>> > >> >> failure and thus this can't be reverted as is without also reverting
>> > >> >> those fixes.
>> > >> >>
>> > >> >> That said, I should do that since this commit message is utterly 
>> > >> >> wrong.
>> > >> >
>> > >> > We do not have to revert r330897, with what follows I think
>> > >> > we can easily find the revisions to revert from stable/11.
>> > >> > ...
>> > >>
>> > >> While we don't have to revert it I'd rather do so than have bogus 
>> > >> history.
>> > >
>> > > Reverting wont remove that history, thats a one way deal,
>> > > and I think if we revert the bogus merges with the wrong
>> > > history thats as good as its gona get.
>> > >
>> > >>
>> > >> >From a look it seems the following was also merged:
>> > >> r316370, r317095, r324394, and a few others.
>> > >>
>> > >> Is there a reason you don't want me to revert the changes?
>> > >
>> > > Repository churn is my main concern.
>> > >
>> > > It touches 6000+ files some of which have probably
>> > > been touched since.   A very carefull pre commit
>> > > audit would need to be done.
>> > >
>> > > Then another commit to 6000+ files to put it back,
>> > > also needing a pre-commit audit. (Pretty easy now
>> > > that I have a filter.)
>> >
>> > I'm actually using the same filter you pasted above to verify that my
>> > changes are only reverting said files. That said, while I'd prefer to
>> > revert, I'll defer to others if they have a differing opinion.
>> >
>> >
>> > Note that I won't have access my dev box after tomorrow for about a week.
>> >
>>
>> IMHO, if you are going to be away for over a week while we're headed
>> directly into the 11.2 release cycle, revert the change.  What you
>> committed is not what was intended, clearly, and the commit message does
>> not reflect what had happened (as you noted).
>>
>> Any disagreements on this decision should be directed to me specifically
>> in this case.
>
> Glen,
> I would rather not revert, as I believe that would cause more
> damages as people have already cleaned up some of the mis merge from
> this commit.  I am pretty sure a revert would lead to a broken tree.
>
> In Eitans absence I am willing to take responsiblity to untangle
> the wrong bits and clean up stable/11.
>
> Ok?
>
> Eitan,
> Are you ok with that as well?

Yes. I also thank everyone who has helped me get out of this mess.

My current action plan: do nothing


-- 
Eitan Adler
Source, Ports, Doc committer
Bugmeister, Ports Security teams
___
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-unsubscr...@freebsd.org"


Re: Mismerge at r330897 in stable/11, Audit report

2018-03-28 Thread Cy Schubert
In message <20180329022626.gp81...@freebsd.org>, Glen Barber writes:
> 
> --88pBQ1/6ie/nQzMF
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: inline
> Content-Transfer-Encoding: quoted-printable
>
> On Wed, Mar 28, 2018 at 07:17:20PM -0700, Eitan Adler wrote:
> > On 28 March 2018 at 19:04, Rodney W. Grimes
> >  wrote:
> > >> On 28 March 2018 at 18:35, Rodney W. Grimes
> > >>  wrote:
> > >> >> >> Hi!
> > >> >> >>
> > >> >> >> This part of the MFC is wrong:
> > >> >> >>
> > >> >> >> https://svnweb.freebsd.org/base/stable/11/sys/sys/random.h?limit=
> _changes=3D0=3D330897=3D330896=3D330897
> > >> >
> > >> > Can we try to identify exactly what rXX that is a merge of?
> > >> >
> > >> >> >> Could you please MFC back the other random related changes too? =
> Some
> > >> >> >> of them made by cem@.
> > >> >> >>
> > >> >> >> On 3/14/18, Eitan Adler  wrote:
> > >> >> >>> Author: eadler
> > >> >> >>> Date: Wed Mar 14 03:19:51 2018
> > >> >> >>> New Revision: 330897
> > >> >> >>> URL: https://svnweb.freebsd.org/changeset/base/330897
> > >> >> >>>
> > >> >> >>> Log:
> > >> >> >>>   Partial merge of the SPDX changes
> > >> >> >>>
> > >> >> >>>   These changes are incomplete but are making it difficult
> > >> >> >>>   to determine what other changes can/should be merged.
> > >> >> >>>
> > >> >> >>>   No objections from:pfg
> > >> >> >>>
> > >> >> > Am I missing something? If this MFC was supposed to be of the SPDX
> > >> >> > license tagging, why does it have any functional changes?
> > >> >> >
> > >> >> > Especially changes to random(4)?
> > >> >>
> > >> >> This was my failure. I only spot checked & compile-checked the diff
> > >> >> since I expected all changes to be comments/SPDX.
> > >> >>
> > >> >> However, I must have gotten carried away and included a few too many
> > >> >> revisions. Unfortunately some people have already merged fixes to my
> > >> >> failure and thus this can't be reverted as is without also reverting
> > >> >> those fixes.
> > >> >>
> > >> >> That said, I should do that since this commit message is utterly wr=
> ong.
> > >> >
> > >> > We do not have to revert r330897, with what follows I think
> > >> > we can easily find the revisions to revert from stable/11.
> > >> > ...
> > >>
> > >> While we don't have to revert it I'd rather do so than have bogus hist=
> ory.
> > >
> > > Reverting wont remove that history, thats a one way deal,
> > > and I think if we revert the bogus merges with the wrong
> > > history thats as good as its gona get.
> > >
> > >>
> > >> >From a look it seems the following was also merged:
> > >> r316370, r317095, r324394, and a few others.
> > >>
> > >> Is there a reason you don't want me to revert the changes?
> > >
> > > Repository churn is my main concern.
> > >
> > > It touches 6000+ files some of which have probably
> > > been touched since.   A very carefull pre commit
> > > audit would need to be done.
> > >
> > > Then another commit to 6000+ files to put it back,
> > > also needing a pre-commit audit. (Pretty easy now
> > > that I have a filter.)
> >=20
> > I'm actually using the same filter you pasted above to verify that my
> > changes are only reverting said files. That said, while I'd prefer to
> > revert, I'll defer to others if they have a differing opinion.
> >=20
> >=20
> > Note that I won't have access my dev box after tomorrow for about a week.
> >=20
>
> IMHO, if you are going to be away for over a week while we're headed
> directly into the 11.2 release cycle, revert the change.  What you
> committed is not what was intended, clearly, and the commit message does
> not reflect what had happened (as you noted).
>
> Any disagreements on this decision should be directed to me specifically
> in this case.

Agreed however we must tread carefully.


-- 
Cheers,
Cy Schubert 
FreeBSD UNIX:     Web:  http://www.FreeBSD.org

The need of the many outweighs the greed of the few.


___
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-unsubscr...@freebsd.org"


Re: Mismerge at r330897 in stable/11, Audit report

2018-03-28 Thread Rodney W. Grimes
> On Wed, Mar 28, 2018 at 07:17:20PM -0700, Eitan Adler wrote:
> > On 28 March 2018 at 19:04, Rodney W. Grimes
> >  wrote:
> > >> On 28 March 2018 at 18:35, Rodney W. Grimes
> > >>  wrote:
> > >> >> >> Hi!
> > >> >> >>
> > >> >> >> This part of the MFC is wrong:
> > >> >> >>
> > >> >> >> https://svnweb.freebsd.org/base/stable/11/sys/sys/random.h?limit_changes=0=330897=330896=330897
> > >> >
> > >> > Can we try to identify exactly what rXX that is a merge of?
> > >> >
> > >> >> >> Could you please MFC back the other random related changes too? 
> > >> >> >> Some
> > >> >> >> of them made by cem@.
> > >> >> >>
> > >> >> >> On 3/14/18, Eitan Adler  wrote:
> > >> >> >>> Author: eadler
> > >> >> >>> Date: Wed Mar 14 03:19:51 2018
> > >> >> >>> New Revision: 330897
> > >> >> >>> URL: https://svnweb.freebsd.org/changeset/base/330897
> > >> >> >>>
> > >> >> >>> Log:
> > >> >> >>>   Partial merge of the SPDX changes
> > >> >> >>>
> > >> >> >>>   These changes are incomplete but are making it difficult
> > >> >> >>>   to determine what other changes can/should be merged.
> > >> >> >>>
> > >> >> >>>   No objections from:pfg
> > >> >> >>>
> > >> >> > Am I missing something? If this MFC was supposed to be of the SPDX
> > >> >> > license tagging, why does it have any functional changes?
> > >> >> >
> > >> >> > Especially changes to random(4)?
> > >> >>
> > >> >> This was my failure. I only spot checked & compile-checked the diff
> > >> >> since I expected all changes to be comments/SPDX.
> > >> >>
> > >> >> However, I must have gotten carried away and included a few too many
> > >> >> revisions. Unfortunately some people have already merged fixes to my
> > >> >> failure and thus this can't be reverted as is without also reverting
> > >> >> those fixes.
> > >> >>
> > >> >> That said, I should do that since this commit message is utterly 
> > >> >> wrong.
> > >> >
> > >> > We do not have to revert r330897, with what follows I think
> > >> > we can easily find the revisions to revert from stable/11.
> > >> > ...
> > >>
> > >> While we don't have to revert it I'd rather do so than have bogus 
> > >> history.
> > >
> > > Reverting wont remove that history, thats a one way deal,
> > > and I think if we revert the bogus merges with the wrong
> > > history thats as good as its gona get.
> > >
> > >>
> > >> >From a look it seems the following was also merged:
> > >> r316370, r317095, r324394, and a few others.
> > >>
> > >> Is there a reason you don't want me to revert the changes?
> > >
> > > Repository churn is my main concern.
> > >
> > > It touches 6000+ files some of which have probably
> > > been touched since.   A very carefull pre commit
> > > audit would need to be done.
> > >
> > > Then another commit to 6000+ files to put it back,
> > > also needing a pre-commit audit. (Pretty easy now
> > > that I have a filter.)
> > 
> > I'm actually using the same filter you pasted above to verify that my
> > changes are only reverting said files. That said, while I'd prefer to
> > revert, I'll defer to others if they have a differing opinion.
> > 
> > 
> > Note that I won't have access my dev box after tomorrow for about a week.
> > 
> 
> IMHO, if you are going to be away for over a week while we're headed
> directly into the 11.2 release cycle, revert the change.  What you
> committed is not what was intended, clearly, and the commit message does
> not reflect what had happened (as you noted).
> 
> Any disagreements on this decision should be directed to me specifically
> in this case.

Glen,
I would rather not revert, as I believe that would cause more
damages as people have already cleaned up some of the mis merge from
this commit.  I am pretty sure a revert would lead to a broken tree.

In Eitans absence I am willing to take responsiblity to untangle
the wrong bits and clean up stable/11.

Ok?

Eitan,
Are you ok with that as well?

-- 
Rod Grimes rgri...@freebsd.org
___
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-unsubscr...@freebsd.org"


Re: Mismerge at r330897 in stable/11, Audit report

2018-03-28 Thread Rodney W. Grimes
> In message <20180329022626.gp81...@freebsd.org>, Glen Barber writes:
> > 
> > --88pBQ1/6ie/nQzMF
> > Content-Type: text/plain; charset=us-ascii
> > Content-Disposition: inline
> > Content-Transfer-Encoding: quoted-printable
> >
> > On Wed, Mar 28, 2018 at 07:17:20PM -0700, Eitan Adler wrote:
> > > On 28 March 2018 at 19:04, Rodney W. Grimes
> > >  wrote:
> > > >> On 28 March 2018 at 18:35, Rodney W. Grimes
> > > >>  wrote:
> > > >> >> >> Hi!
> > > >> >> >>
> > > >> >> >> This part of the MFC is wrong:
> > > >> >> >>
> > > >> >> >> https://svnweb.freebsd.org/base/stable/11/sys/sys/random.h?limit=
> > _changes=3D0=3D330897=3D330896=3D330897
> > > >> >
> > > >> > Can we try to identify exactly what rXX that is a merge of?
> > > >> >
> > > >> >> >> Could you please MFC back the other random related changes too? =
> > Some
> > > >> >> >> of them made by cem@.
> > > >> >> >>
> > > >> >> >> On 3/14/18, Eitan Adler  wrote:
> > > >> >> >>> Author: eadler
> > > >> >> >>> Date: Wed Mar 14 03:19:51 2018
> > > >> >> >>> New Revision: 330897
> > > >> >> >>> URL: https://svnweb.freebsd.org/changeset/base/330897
> > > >> >> >>>
> > > >> >> >>> Log:
> > > >> >> >>>   Partial merge of the SPDX changes
> > > >> >> >>>
> > > >> >> >>>   These changes are incomplete but are making it difficult
> > > >> >> >>>   to determine what other changes can/should be merged.
> > > >> >> >>>
> > > >> >> >>>   No objections from:pfg
> > > >> >> >>>
> > > >> >> > Am I missing something? If this MFC was supposed to be of the SPDX
> > > >> >> > license tagging, why does it have any functional changes?
> > > >> >> >
> > > >> >> > Especially changes to random(4)?
> > > >> >>
> > > >> >> This was my failure. I only spot checked & compile-checked the diff
> > > >> >> since I expected all changes to be comments/SPDX.
> > > >> >>
> > > >> >> However, I must have gotten carried away and included a few too many
> > > >> >> revisions. Unfortunately some people have already merged fixes to my
> > > >> >> failure and thus this can't be reverted as is without also reverting
> > > >> >> those fixes.
> > > >> >>
> > > >> >> That said, I should do that since this commit message is utterly wr=
> > ong.
> > > >> >
> > > >> > We do not have to revert r330897, with what follows I think
> > > >> > we can easily find the revisions to revert from stable/11.
> > > >> > ...
> > > >>
> > > >> While we don't have to revert it I'd rather do so than have bogus hist=
> > ory.
> > > >
> > > > Reverting wont remove that history, thats a one way deal,
> > > > and I think if we revert the bogus merges with the wrong
> > > > history thats as good as its gona get.
> > > >
> > > >>
> > > >> >From a look it seems the following was also merged:
> > > >> r316370, r317095, r324394, and a few others.
> > > >>
> > > >> Is there a reason you don't want me to revert the changes?
> > > >
> > > > Repository churn is my main concern.
> > > >
> > > > It touches 6000+ files some of which have probably
> > > > been touched since.   A very carefull pre commit
> > > > audit would need to be done.
> > > >
> > > > Then another commit to 6000+ files to put it back,
> > > > also needing a pre-commit audit. (Pretty easy now
> > > > that I have a filter.)
> > >=20
> > > I'm actually using the same filter you pasted above to verify that my
> > > changes are only reverting said files. That said, while I'd prefer to
> > > revert, I'll defer to others if they have a differing opinion.
> > >=20
> > >=20
> > > Note that I won't have access my dev box after tomorrow for about a week.
> > >=20
> >
> > IMHO, if you are going to be away for over a week while we're headed
> > directly into the 11.2 release cycle, revert the change.  What you
> > committed is not what was intended, clearly, and the commit message does
> > not reflect what had happened (as you noted).
> >
> > Any disagreements on this decision should be directed to me specifically
> > in this case.
> 
> Agreed however we must tread carefully.

Agreed to that tread carefully, and I am almost positive that an
attempt to revert would lead to breakage that may be more difficult
to untangle than what we have now.

Let me clone my stable/11 and see what a revert does to the tree.

-- 
Rod Grimes rgri...@freebsd.org
___
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-unsubscr...@freebsd.org"


Re: Mismerge at r330897 in stable/11, Audit report

2018-03-28 Thread Rodney W. Grimes
> On 28 March 2018 at 19:04, Rodney W. Grimes
>  wrote:
> >> On 28 March 2018 at 18:35, Rodney W. Grimes
> >>  wrote:
> >> >> >> Hi!
> >> >> >>
> >> >> >> This part of the MFC is wrong:
> >> >> >>
> >> >> >> https://svnweb.freebsd.org/base/stable/11/sys/sys/random.h?limit_changes=0=330897=330896=330897
> >> >
> >> > Can we try to identify exactly what rXX that is a merge of?
> >> >
> >> >> >> Could you please MFC back the other random related changes too? Some
> >> >> >> of them made by cem@.
> >> >> >>
> >> >> >> On 3/14/18, Eitan Adler  wrote:
> >> >> >>> Author: eadler
> >> >> >>> Date: Wed Mar 14 03:19:51 2018
> >> >> >>> New Revision: 330897
> >> >> >>> URL: https://svnweb.freebsd.org/changeset/base/330897
> >> >> >>>
> >> >> >>> Log:
> >> >> >>>   Partial merge of the SPDX changes
> >> >> >>>
> >> >> >>>   These changes are incomplete but are making it difficult
> >> >> >>>   to determine what other changes can/should be merged.
> >> >> >>>
> >> >> >>>   No objections from:pfg
> >> >> >>>
> >> >> > Am I missing something? If this MFC was supposed to be of the SPDX
> >> >> > license tagging, why does it have any functional changes?
> >> >> >
> >> >> > Especially changes to random(4)?
> >> >>
> >> >> This was my failure. I only spot checked & compile-checked the diff
> >> >> since I expected all changes to be comments/SPDX.
> >> >>
> >> >> However, I must have gotten carried away and included a few too many
> >> >> revisions. Unfortunately some people have already merged fixes to my
> >> >> failure and thus this can't be reverted as is without also reverting
> >> >> those fixes.
> >> >>
> >> >> That said, I should do that since this commit message is utterly wrong.
> >> >
> >> > We do not have to revert r330897, with what follows I think
> >> > we can easily find the revisions to revert from stable/11.
> >> > ...
> >>
> >> While we don't have to revert it I'd rather do so than have bogus history.
> >
> > Reverting wont remove that history, thats a one way deal,
> > and I think if we revert the bogus merges with the wrong
> > history thats as good as its gona get.
> >
> >>
> >> >From a look it seems the following was also merged:
> >> r316370, r317095, r324394, and a few others.
> >>
> >> Is there a reason you don't want me to revert the changes?
> >
> > Repository churn is my main concern.
> >
> > It touches 6000+ files some of which have probably
> > been touched since.   A very carefull pre commit
> > audit would need to be done.
> >
> > Then another commit to 6000+ files to put it back,
> > also needing a pre-commit audit. (Pretty easy now
> > that I have a filter.)
> 
> I'm actually using the same filter you pasted above to verify that my
> changes are only reverting said files. That said, while I'd prefer to
> revert, I'll defer to others if they have a differing opinion.
> 
> 
> Note that I won't have access my dev box after tomorrow for about a week.

I would rather approach this with great care, please do not just revert,
as to me that looks like a huge churn, and it well not remove the incorrect
history.

Lets focus on clearly identifying the list of rXX by
expanding your list of r316370, r317095, r324394 until we
have them.  Then we need to verify we are not getting anything
that has already been cleaned up by someone else. (Also a concern
with just trying to revert this patch).

-- 
Rod Grimes rgri...@freebsd.org
___
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-unsubscr...@freebsd.org"


svn commit: r331721 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2018-03-28 Thread Alexander Motin
Author: mav
Date: Thu Mar 29 02:25:34 2018
New Revision: 331721
URL: https://svnweb.freebsd.org/changeset/base/331721

Log:
  MFC r329738: MFV r329736: 8969 Cannot boot from RAIDZ with parity > 1
  
  illumos/illumos-gate@0fb055e81fd0cda5221da8ddd98b2f8d1fc6bdbe
  
  At present it is possible to boot from a root pool that is on RAIDZ but not
  one that is on RAIDZ2 or RAIDZ3.  This is because, at the time the pool
  version is checked to ensure support for dual/triple parity, the uberblock
  has not yet been loaded into the SPA and therefore the code determines that
  the pool version is too old and returns ENOTSUP.
  
  Reviewed by: Igor Kozhukhov 
  Reviewed by: Andriy Gapon 
  Reviewed by: Pavel Zakharov 
  Reviewed by: Andy Stormont 
  Reviewed by: Toomas Soome 
  Approved by: Gordon Ross 
  Author: Andy Fiddaman 
  
  FreeBSD already had this fixed, so this is just a diff reduction.

Modified:
  stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
==
--- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c  Thu Mar 
29 02:13:58 2018(r331720)
+++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c  Thu Mar 
29 02:25:34 2018(r331721)
@@ -29,6 +29,7 @@
  * Copyright (c) 2014 Integros [integros.com]
  * Copyright 2017 Joyent, Inc.
  * Copyright (c) 2017 Datto Inc.
+ * Copyright 2018 OmniOS Community Edition (OmniOSce) Association.
  */
 
 /*
@@ -4076,6 +4077,9 @@ spa_import_rootpool(char *devpath, char *devid)
spa = spa_add(pname, config, NULL);
spa->spa_is_root = B_TRUE;
spa->spa_import_flags = ZFS_IMPORT_VERBATIM;
+   if (nvlist_lookup_uint64(config, ZPOOL_CONFIG_VERSION,
+   >spa_ubsync.ub_version) != 0)
+   spa->spa_ubsync.ub_version = SPA_VERSION_INITIAL;
 
/*
 * Build up a vdev tree based on the boot device's label config.
___
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-unsubscr...@freebsd.org"


Re: Mismerge at r330897 in stable/11, Audit report

2018-03-28 Thread Glen Barber
On Wed, Mar 28, 2018 at 07:17:20PM -0700, Eitan Adler wrote:
> On 28 March 2018 at 19:04, Rodney W. Grimes
>  wrote:
> >> On 28 March 2018 at 18:35, Rodney W. Grimes
> >>  wrote:
> >> >> >> Hi!
> >> >> >>
> >> >> >> This part of the MFC is wrong:
> >> >> >>
> >> >> >> https://svnweb.freebsd.org/base/stable/11/sys/sys/random.h?limit_changes=0=330897=330896=330897
> >> >
> >> > Can we try to identify exactly what rXX that is a merge of?
> >> >
> >> >> >> Could you please MFC back the other random related changes too? Some
> >> >> >> of them made by cem@.
> >> >> >>
> >> >> >> On 3/14/18, Eitan Adler  wrote:
> >> >> >>> Author: eadler
> >> >> >>> Date: Wed Mar 14 03:19:51 2018
> >> >> >>> New Revision: 330897
> >> >> >>> URL: https://svnweb.freebsd.org/changeset/base/330897
> >> >> >>>
> >> >> >>> Log:
> >> >> >>>   Partial merge of the SPDX changes
> >> >> >>>
> >> >> >>>   These changes are incomplete but are making it difficult
> >> >> >>>   to determine what other changes can/should be merged.
> >> >> >>>
> >> >> >>>   No objections from:pfg
> >> >> >>>
> >> >> > Am I missing something? If this MFC was supposed to be of the SPDX
> >> >> > license tagging, why does it have any functional changes?
> >> >> >
> >> >> > Especially changes to random(4)?
> >> >>
> >> >> This was my failure. I only spot checked & compile-checked the diff
> >> >> since I expected all changes to be comments/SPDX.
> >> >>
> >> >> However, I must have gotten carried away and included a few too many
> >> >> revisions. Unfortunately some people have already merged fixes to my
> >> >> failure and thus this can't be reverted as is without also reverting
> >> >> those fixes.
> >> >>
> >> >> That said, I should do that since this commit message is utterly wrong.
> >> >
> >> > We do not have to revert r330897, with what follows I think
> >> > we can easily find the revisions to revert from stable/11.
> >> > ...
> >>
> >> While we don't have to revert it I'd rather do so than have bogus history.
> >
> > Reverting wont remove that history, thats a one way deal,
> > and I think if we revert the bogus merges with the wrong
> > history thats as good as its gona get.
> >
> >>
> >> >From a look it seems the following was also merged:
> >> r316370, r317095, r324394, and a few others.
> >>
> >> Is there a reason you don't want me to revert the changes?
> >
> > Repository churn is my main concern.
> >
> > It touches 6000+ files some of which have probably
> > been touched since.   A very carefull pre commit
> > audit would need to be done.
> >
> > Then another commit to 6000+ files to put it back,
> > also needing a pre-commit audit. (Pretty easy now
> > that I have a filter.)
> 
> I'm actually using the same filter you pasted above to verify that my
> changes are only reverting said files. That said, while I'd prefer to
> revert, I'll defer to others if they have a differing opinion.
> 
> 
> Note that I won't have access my dev box after tomorrow for about a week.
> 

IMHO, if you are going to be away for over a week while we're headed
directly into the 11.2 release cycle, revert the change.  What you
committed is not what was intended, clearly, and the commit message does
not reflect what had happened (as you noted).

Any disagreements on this decision should be directed to me specifically
in this case.

Glen



signature.asc
Description: PGP signature


Re: Mismerge at r330897 in stable/11, Audit report

2018-03-28 Thread Eitan Adler
On 28 March 2018 at 19:04, Rodney W. Grimes
 wrote:
>> On 28 March 2018 at 18:35, Rodney W. Grimes
>>  wrote:
>> >> >> Hi!
>> >> >>
>> >> >> This part of the MFC is wrong:
>> >> >>
>> >> >> https://svnweb.freebsd.org/base/stable/11/sys/sys/random.h?limit_changes=0=330897=330896=330897
>> >
>> > Can we try to identify exactly what rXX that is a merge of?
>> >
>> >> >> Could you please MFC back the other random related changes too? Some
>> >> >> of them made by cem@.
>> >> >>
>> >> >> On 3/14/18, Eitan Adler  wrote:
>> >> >>> Author: eadler
>> >> >>> Date: Wed Mar 14 03:19:51 2018
>> >> >>> New Revision: 330897
>> >> >>> URL: https://svnweb.freebsd.org/changeset/base/330897
>> >> >>>
>> >> >>> Log:
>> >> >>>   Partial merge of the SPDX changes
>> >> >>>
>> >> >>>   These changes are incomplete but are making it difficult
>> >> >>>   to determine what other changes can/should be merged.
>> >> >>>
>> >> >>>   No objections from:pfg
>> >> >>>
>> >> > Am I missing something? If this MFC was supposed to be of the SPDX
>> >> > license tagging, why does it have any functional changes?
>> >> >
>> >> > Especially changes to random(4)?
>> >>
>> >> This was my failure. I only spot checked & compile-checked the diff
>> >> since I expected all changes to be comments/SPDX.
>> >>
>> >> However, I must have gotten carried away and included a few too many
>> >> revisions. Unfortunately some people have already merged fixes to my
>> >> failure and thus this can't be reverted as is without also reverting
>> >> those fixes.
>> >>
>> >> That said, I should do that since this commit message is utterly wrong.
>> >
>> > We do not have to revert r330897, with what follows I think
>> > we can easily find the revisions to revert from stable/11.
>> > ...
>>
>> While we don't have to revert it I'd rather do so than have bogus history.
>
> Reverting wont remove that history, thats a one way deal,
> and I think if we revert the bogus merges with the wrong
> history thats as good as its gona get.
>
>>
>> >From a look it seems the following was also merged:
>> r316370, r317095, r324394, and a few others.
>>
>> Is there a reason you don't want me to revert the changes?
>
> Repository churn is my main concern.
>
> It touches 6000+ files some of which have probably
> been touched since.   A very carefull pre commit
> audit would need to be done.
>
> Then another commit to 6000+ files to put it back,
> also needing a pre-commit audit. (Pretty easy now
> that I have a filter.)

I'm actually using the same filter you pasted above to verify that my
changes are only reverting said files. That said, while I'd prefer to
revert, I'll defer to others if they have a differing opinion.


Note that I won't have access my dev box after tomorrow for about a week.


-- 
Eitan Adler
Source, Ports, Doc committer
Bugmeister, Ports Security teams
___
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-unsubscr...@freebsd.org"


svn commit: r331720 - head/usr.bin/timeout

2018-03-28 Thread Conrad Meyer
Author: cem
Date: Thu Mar 29 02:13:58 2018
New Revision: 331720
URL: https://svnweb.freebsd.org/changeset/base/331720

Log:
  timeout.1: Try to improve clarity
  
  Minor rewordings, markup fixes or enhancements, and some typo fixes.  Add a 
few
  sentences clarifying the special zero duration.
  
  PR:   227012
  Submitted by: Mateusz Piotrowski (0mp@) (earlier version)

Modified:
  head/usr.bin/timeout/timeout.1

Modified: head/usr.bin/timeout/timeout.1
==
--- head/usr.bin/timeout/timeout.1  Thu Mar 29 01:20:58 2018
(r331719)
+++ head/usr.bin/timeout/timeout.1  Thu Mar 29 02:13:58 2018
(r331720)
@@ -1,3 +1,5 @@
+.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+.\"
 .\" Copyright (c) 2014 Baptiste Daroussin 
 .\" All rights reserved.
 .\"
@@ -24,7 +26,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd February 20, 2017
+.Dd March 28, 2018
 .Dt TIMEOUT 1
 .Os
 .Sh NAME
@@ -36,40 +38,47 @@
 .Op Fl -preserve-status
 .Op Fl -kill-after Ar time | Fl k Ar time
 .Op Fl -foreground
-.Ao Ar duration Ac
-.Ao Ar command Ac
-.Ao Ar args ... Ac
+.Ar duration
+.Ar command
+.Op Ar args ...
 .Sh DESCRIPTION
 .Nm
 starts the
 .Ar command
 with its
-.Ar args.
-If
+.Ar args .
+If the
 .Ar command
 is still running after
 .Ar duration ,
 it is killed.
 By default,
-.Ar SIGTERM.
+.Dv SIGTERM
 is sent.
-.Bl -tag -width "-k time, --kill-after time"
+The special
+.Ar duration ,
+zero, signifies no limit.
+Therefore a signal is never sent if
+.Ar duration
+is 0.
+.Pp
+The options are as follows:
+.Bl -tag -width indent
 .It Fl -preserve-status
-Always exits with the same status as
-.Ar command
-even if it times out.
+Exit with the same status as
+.Ar command ,
+even if it times out and is killed.
 .It Fl -foreground
-Do not propagate timeout to the
-.Ar command
-children.
+Do not propagate timeout to the children of
+.Ar command .
 .It Fl s Ar sig , Fl -signal Ar sig
 Specify the signal to send on timeout.
 By default,
-.Ar SIGTERM .
+.Dv SIGTERM
 is sent.
 .It Fl k Ar time , Fl -kill-after Ar time
 Send a
-.Ar SIGKILL
+.Dv SIGKILL
 signal if
 .Ar command
 is still running after
@@ -80,18 +89,19 @@ after the first signal was sent.
 .Ar duration
 and
 .Ar time
-can be integer or decimal numbers.
-Values without unit symbols are interpreted as seconds.
+are non-negative integer or real (decimal) numbers, with an optional
+unit-specifying suffix.
+Values without an explicit unit are interpreted as seconds.
 .Pp
 Supported unit symbols are:
 .Bl -tag -width indent -compact
-.It s
+.It Cm s
 seconds
-.It m
+.It Cm m
 minutes
-.It h
+.It Cm h
 hours
-.It d
+.It Cm d
 days
 .El
 .Sh EXIT STATUS
@@ -115,17 +125,17 @@ plus 128.
 .Pp
 If
 .Ar command
-is an invalid command, the exit status returned is 126.
+refers to a non-existing program, the exit status returned is 127.
 .Pp
 If
 .Ar command
-is a non existing command, the exit status returned is 127.
+is an otherwise invalid program, the exit status returned is 126.
 .Pp
 If an invalid parameter is passed to
 .Fl s
 or
 .Fl k ,
-the exit status return is 125.
+the exit status returned is 125.
 .Sh SEE ALSO
 .Xr kill 1 ,
 .Xr signal 3
___
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-unsubscr...@freebsd.org"


Re: Mismerge at r330897 in stable/11, Audit report

2018-03-28 Thread Eitan Adler
On 28 March 2018 at 19:17, Eitan Adler  wrote:
> On 28 March 2018 at 19:04, Rodney W. Grimes
>  wrote:
>>> On 28 March 2018 at 18:35, Rodney W. Grimes
>>>  wrote:
>>> >> >> Hi!
>>> >> >>
>>> >> >> This part of the MFC is wrong:
>>> >> >>
>>> >> >> https://svnweb.freebsd.org/base/stable/11/sys/sys/random.h?limit_changes=0=330897=330896=330897
>>> >
>>> > Can we try to identify exactly what rXX that is a merge of?
>>> >
>>> >> >> Could you please MFC back the other random related changes too? Some
>>> >> >> of them made by cem@.
>>> >> >>
>>> >> >> On 3/14/18, Eitan Adler  wrote:
>>> >> >>> Author: eadler
>>> >> >>> Date: Wed Mar 14 03:19:51 2018
>>> >> >>> New Revision: 330897
>>> >> >>> URL: https://svnweb.freebsd.org/changeset/base/330897
>>> >> >>>
>>> >> >>> Log:
>>> >> >>>   Partial merge of the SPDX changes
>>> >> >>>
>>> >> >>>   These changes are incomplete but are making it difficult
>>> >> >>>   to determine what other changes can/should be merged.
>>> >> >>>
>>> >> >>>   No objections from:pfg
>>> >> >>>
>>> >> > Am I missing something? If this MFC was supposed to be of the SPDX
>>> >> > license tagging, why does it have any functional changes?
>>> >> >
>>> >> > Especially changes to random(4)?
>>> >>
>>> >> This was my failure. I only spot checked & compile-checked the diff
>>> >> since I expected all changes to be comments/SPDX.
>>> >>
>>> >> However, I must have gotten carried away and included a few too many
>>> >> revisions. Unfortunately some people have already merged fixes to my
>>> >> failure and thus this can't be reverted as is without also reverting
>>> >> those fixes.
>>> >>
>>> >> That said, I should do that since this commit message is utterly wrong.
>>> >
>>> > We do not have to revert r330897, with what follows I think
>>> > we can easily find the revisions to revert from stable/11.
>>> > ...
>>>
>>> While we don't have to revert it I'd rather do so than have bogus history.
>>
>> Reverting wont remove that history, thats a one way deal,
>> and I think if we revert the bogus merges with the wrong
>> history thats as good as its gona get.
>>
>>>
>>> >From a look it seems the following was also merged:
>>> r316370, r317095, r324394, and a few others.
>>>
>>> Is there a reason you don't want me to revert the changes?
>>
>> Repository churn is my main concern.
>>
>> It touches 6000+ files some of which have probably
>> been touched since.   A very carefull pre commit
>> audit would need to be done.
>>
>> Then another commit to 6000+ files to put it back,
>> also needing a pre-commit audit. (Pretty easy now
>> that I have a filter.)
>
> I'm actually using the same filter you pasted above to verify that my
> changes are only reverting said files. That said, while I'd prefer to
> revert, I'll defer to others if they have a differing opinion.

Someone else mentioned out of band to not revert as well. Since this
seems to be the consensus I'll go with that. Let me merge the missing
commits that op mentioned.


Once again, sorry all :(

-- 
Eitan Adler
Source, Ports, Doc committer
Bugmeister, Ports Security teams
___
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-unsubscr...@freebsd.org"


Re: Mismerge at r330897 in stable/11, Audit report

2018-03-28 Thread Rodney W. Grimes
> On 28 March 2018 at 18:35, Rodney W. Grimes
>  wrote:
> >> >> Hi!
> >> >>
> >> >> This part of the MFC is wrong:
> >> >>
> >> >> https://svnweb.freebsd.org/base/stable/11/sys/sys/random.h?limit_changes=0=330897=330896=330897
> >
> > Can we try to identify exactly what rXX that is a merge of?
> >
> >> >> Could you please MFC back the other random related changes too? Some
> >> >> of them made by cem@.
> >> >>
> >> >> On 3/14/18, Eitan Adler  wrote:
> >> >>> Author: eadler
> >> >>> Date: Wed Mar 14 03:19:51 2018
> >> >>> New Revision: 330897
> >> >>> URL: https://svnweb.freebsd.org/changeset/base/330897
> >> >>>
> >> >>> Log:
> >> >>>   Partial merge of the SPDX changes
> >> >>>
> >> >>>   These changes are incomplete but are making it difficult
> >> >>>   to determine what other changes can/should be merged.
> >> >>>
> >> >>>   No objections from:pfg
> >> >>>
> >> > Am I missing something? If this MFC was supposed to be of the SPDX
> >> > license tagging, why does it have any functional changes?
> >> >
> >> > Especially changes to random(4)?
> >>
> >> This was my failure. I only spot checked & compile-checked the diff
> >> since I expected all changes to be comments/SPDX.
> >>
> >> However, I must have gotten carried away and included a few too many
> >> revisions. Unfortunately some people have already merged fixes to my
> >> failure and thus this can't be reverted as is without also reverting
> >> those fixes.
> >>
> >> That said, I should do that since this commit message is utterly wrong.
> >
> > We do not have to revert r330897, with what follows I think
> > we can easily find the revisions to revert from stable/11.
> > ...
> 
> While we don't have to revert it I'd rather do so than have bogus history.

Reverting wont remove that history, thats a one way deal,
and I think if we revert the bogus merges with the wrong
history thats as good as its gona get.

> 
> >From a look it seems the following was also merged:
> r316370, r317095, r324394, and a few others.
> 
> Is there a reason you don't want me to revert the changes?

Repository churn is my main concern.

It touches 6000+ files some of which have probably
been touched since.   A very carefull pre commit
audit would need to be done.

Then another commit to 6000+ files to put it back,
also needing a pre-commit audit. (Pretty easy now
that I have a filter.)

-- 
Rod Grimes rgri...@freebsd.org
___
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-unsubscr...@freebsd.org"


Re: Mismerge at r330897 in stable/11, Audit report

2018-03-28 Thread Eitan Adler
On 28 March 2018 at 18:35, Rodney W. Grimes
 wrote:
>> >> Hi!
>> >>
>> >> This part of the MFC is wrong:
>> >>
>> >> https://svnweb.freebsd.org/base/stable/11/sys/sys/random.h?limit_changes=0=330897=330896=330897
>
> Can we try to identify exactly what rXX that is a merge of?
>
>> >> Could you please MFC back the other random related changes too? Some
>> >> of them made by cem@.
>> >>
>> >> On 3/14/18, Eitan Adler  wrote:
>> >>> Author: eadler
>> >>> Date: Wed Mar 14 03:19:51 2018
>> >>> New Revision: 330897
>> >>> URL: https://svnweb.freebsd.org/changeset/base/330897
>> >>>
>> >>> Log:
>> >>>   Partial merge of the SPDX changes
>> >>>
>> >>>   These changes are incomplete but are making it difficult
>> >>>   to determine what other changes can/should be merged.
>> >>>
>> >>>   No objections from:pfg
>> >>>
>> > Am I missing something? If this MFC was supposed to be of the SPDX
>> > license tagging, why does it have any functional changes?
>> >
>> > Especially changes to random(4)?
>>
>> This was my failure. I only spot checked & compile-checked the diff
>> since I expected all changes to be comments/SPDX.
>>
>> However, I must have gotten carried away and included a few too many
>> revisions. Unfortunately some people have already merged fixes to my
>> failure and thus this can't be reverted as is without also reverting
>> those fixes.
>>
>> That said, I should do that since this commit message is utterly wrong.
>
> We do not have to revert r330897, with what follows I think
> we can easily find the revisions to revert from stable/11.
> ...

While we don't have to revert it I'd rather do so than have bogus history.

>From a look it seems the following was also merged:
r316370, r317095, r324394, and a few others.

Is there a reason you don't want me to revert the changes?

-- 
Eitan Adler
Source, Ports, Doc committer
Bugmeister, Ports Security teams
___
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-unsubscr...@freebsd.org"


Mismerge at r330897 in stable/11, Audit report

2018-03-28 Thread Rodney W. Grimes
> >> Hi!
> >>
> >> This part of the MFC is wrong:
> >>
> >> https://svnweb.freebsd.org/base/stable/11/sys/sys/random.h?limit_changes=0=330897=330896=330897

Can we try to identify exactly what rXX that is a merge of?

> >> Could you please MFC back the other random related changes too? Some
> >> of them made by cem@.
> >>
> >> On 3/14/18, Eitan Adler  wrote:
> >>> Author: eadler
> >>> Date: Wed Mar 14 03:19:51 2018
> >>> New Revision: 330897
> >>> URL: https://svnweb.freebsd.org/changeset/base/330897
> >>>
> >>> Log:
> >>>   Partial merge of the SPDX changes
> >>>
> >>>   These changes are incomplete but are making it difficult
> >>>   to determine what other changes can/should be merged.
> >>>
> >>>   No objections from:pfg
> >>>
> > Am I missing something? If this MFC was supposed to be of the SPDX
> > license tagging, why does it have any functional changes?
> >
> > Especially changes to random(4)?
> 
> This was my failure. I only spot checked & compile-checked the diff
> since I expected all changes to be comments/SPDX.
> 
> However, I must have gotten carried away and included a few too many
> revisions. Unfortunately some people have already merged fixes to my
> failure and thus this can't be reverted as is without also reverting
> those fixes.
> 
> That said, I should do that since this commit message is utterly wrong.

We do not have to revert r330897, with what follows I think
we can easily find the revisions to revert from stable/11.
...


I saw someone complain about other bits that got pulled in
eadler merged a huge chunk of SPDX tags.  This commit
is weeks old, and bothersome that this was just now being found.

So I decided to Audit r330897 for anything that is not an SPDX change.

This audit is basically from:
svn diff -r 330896:330897 svn+ssh://repo.freebsd.org/base/stable/11 | \
grep -v '^=' | \
grep -v '^---' | \
grep -v '^+++' | \
grep -v '^@@ ' | \
grep -v '^ ' |
grep -v 'SPDX-License-Identifier' |
grep -v '^+ \*$' | \
grep -v '^-/\*$' | \
grep -v '^+/\*-$' | \
more

The outout of that was cleaned up slightly by removing the large blocks of
Index: path/to/file
that showed no other changes to that file, and a few copyright noises
leaving us with these very questionable merges that are NOT SPDX related
that I can see in any way.

There is still some noise, ($FreeBSD) and I left some things in the output
that I would like to take a closer look at that are probably noise
but I want to make certain.

I think r330897 actually merged about 4 or 5 things that are not part of
SPDX at all.

With the file paths now in hand, it should be a short order to sort out
which rXX should be reverted from stable/11.  

At the very end is the full mergeinfo.  If anyone wants the raw
svn diff I can upload that as well.

Index: lib/libutil/pw_util.c
-/*-
+/*--
Index: sbin/dhclient/dhctoken.h
+ * $FreeBSD$
Index: sbin/dhclient/tree.h
+ * $FreeBSD$
Index: sbin/rcorder/sprite.h
+ * $FreeBSD$
Index: share/examples/tests/tests/plain/printf_test.c
-/* $FreeBSD$
+/* $FreeBSD$ */
+
Index: sys/arm/arm/pl190.c
- * Copyright (c) 2012 Oleksandr Tymoshenko 
+ * Copyright (c) 2012-2017 Oleksandr Tymoshenko 
-
+#include 
-#include 
+#include "pic_if.h"
+
+struct pl190_intc_irqsrc {
+   struct intr_irqsrc  isrc;
+   u_int   irq;
+};
+
-   device_tsc_dev;
+   device_tdev;
+   struct mtx  mtx;
+   struct pl190_intc_irqsrcisrcs[VIC_NIRQS];
-static struct pl190_intc_softc *pl190_intc_sc = NULL;
+#defineINTC_VIC_READ_4(sc, reg)\
+bus_read_4(sc->intc_res, (reg))
+#defineINTC_VIC_WRITE_4(sc, reg, val)  \
+bus_write_4(sc->intc_res, (reg), (val))
-#defineintc_vic_read_4(reg)\
-bus_read_4(pl190_intc_sc->intc_res, (reg))
-#defineintc_vic_write_4(reg, val)  \
-bus_write_4(pl190_intc_sc->intc_res, (reg), (val))
+#defineVIC_LOCK(_sc) mtx_lock_spin(&(_sc)->mtx)
+#defineVIC_UNLOCK(_sc) mtx_unlock_spin(&(_sc)->mtx)
+static inline void
+pl190_intc_irq_dispatch(struct pl190_intc_softc *sc, u_int irq,
+struct trapframe *tf)
+{
+   struct pl190_intc_irqsrc *src;
+
+   src = >isrcs[irq];
+   if (intr_isrc_dispatch(>isrc, tf) != 0)
+   device_printf(sc->dev, "Stray irq %u detected\n", irq);
+}
+
+pl190_intc_intr(void *arg)
+{
+   struct pl190_intc_softc *sc;
+   u_int cpu;
+   uint32_t num, pending;
+   struct trapframe *tf;
+
+   sc = arg;
+   cpu = PCPU_GET(cpuid);
+   tf = curthread->td_intr_frame;
+
+   VIC_LOCK(sc);
+   pending = INTC_VIC_READ_4(sc, VICIRQSTATUS);
+   VIC_UNLOCK(sc);
+   for (num = 0 ; num < VIC_NIRQS; num++) {
+   if (pending & (1 << num))
+  

svn commit: r331719 - in stable/10/sys: conf dev/cxgbe/firmware dev/cxgbe/iw_cxgbe modules/cxgbe/t4_firmware modules/cxgbe/t5_firmware modules/cxgbe/t6_firmware

2018-03-28 Thread Navdeep Parhar
Author: np
Date: Thu Mar 29 01:20:58 2018
New Revision: 331719
URL: https://svnweb.freebsd.org/changeset/base/331719

Log:
  MFC r323006 and r324386.
  
  This brings the cxgbe(4) firmware up to 1.16.63.0.
  
  Sponsored by: Chelsio Communications

Added:
  stable/10/sys/dev/cxgbe/firmware/t4fw-1.16.63.0.bin.uu
 - copied unchanged from r324386, 
head/sys/dev/cxgbe/firmware/t4fw-1.16.63.0.bin.uu
  stable/10/sys/dev/cxgbe/firmware/t5fw-1.16.63.0.bin.uu
 - copied unchanged from r324386, 
head/sys/dev/cxgbe/firmware/t5fw-1.16.63.0.bin.uu
  stable/10/sys/dev/cxgbe/firmware/t6fw-1.16.63.0.bin.uu
 - copied unchanged from r324386, 
head/sys/dev/cxgbe/firmware/t6fw-1.16.63.0.bin.uu
Deleted:
  stable/10/sys/dev/cxgbe/firmware/t4fw-1.16.45.0.bin.uu
  stable/10/sys/dev/cxgbe/firmware/t5fw-1.16.45.0.bin.uu
  stable/10/sys/dev/cxgbe/firmware/t6fw-1.16.45.0.bin.uu
Modified:
  stable/10/sys/conf/files
  stable/10/sys/dev/cxgbe/firmware/t4fw_interface.h
  stable/10/sys/dev/cxgbe/firmware/t6fw_cfg.txt
  stable/10/sys/dev/cxgbe/firmware/t6fw_cfg_uwire.txt
  stable/10/sys/dev/cxgbe/iw_cxgbe/qp.c
  stable/10/sys/modules/cxgbe/t4_firmware/Makefile
  stable/10/sys/modules/cxgbe/t5_firmware/Makefile
  stable/10/sys/modules/cxgbe/t6_firmware/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/conf/files
==
--- stable/10/sys/conf/filesThu Mar 29 00:55:11 2018(r331718)
+++ stable/10/sys/conf/filesThu Mar 29 01:20:58 2018(r331719)
@@ -1195,7 +1195,7 @@ t4fw.fwo  optional cxgbe  
\
no-implicit-rule\
clean   "t4fw.fwo"
 t4fw.fwoptional cxgbe  
\
-   dependency  "$S/dev/cxgbe/firmware/t4fw-1.16.45.0.bin.uu"   \
+   dependency  "$S/dev/cxgbe/firmware/t4fw-1.16.63.0.bin.uu"   \
compile-with"${NORMAL_FW}"  \
no-obj no-implicit-rule \
clean   "t4fw.fw"
@@ -1219,7 +1219,7 @@ t5fw.fwo  optional cxgbe  
\
no-implicit-rule\
clean   "t5fw.fwo"
 t5fw.fwoptional cxgbe  
\
-   dependency  "$S/dev/cxgbe/firmware/t5fw-1.16.45.0.bin.uu"   \
+   dependency  "$S/dev/cxgbe/firmware/t5fw-1.16.63.0.bin.uu"   \
compile-with"${NORMAL_FW}"  \
no-obj no-implicit-rule \
clean   "t5fw.fw"
@@ -1243,7 +1243,7 @@ t6fw.fwo  optional cxgbe  
\
no-implicit-rule\
clean   "t6fw.fwo"
 t6fw.fwoptional cxgbe  
\
-   dependency  "$S/dev/cxgbe/firmware/t6fw-1.16.45.0.bin.uu"   \
+   dependency  "$S/dev/cxgbe/firmware/t6fw-1.16.63.0.bin.uu"   \
compile-with"${NORMAL_FW}"  \
no-obj no-implicit-rule \
clean   "t6fw.fw"

Copied: stable/10/sys/dev/cxgbe/firmware/t4fw-1.16.63.0.bin.uu (from r324386, 
head/sys/dev/cxgbe/firmware/t4fw-1.16.63.0.bin.uu)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/10/sys/dev/cxgbe/firmware/t4fw-1.16.63.0.bin.uu  Thu Mar 29 
01:20:58 2018(r331719, copy of r324386, 
head/sys/dev/cxgbe/firmware/t4fw-1.16.63.0.bin.uu)
@@ -0,0 +1,9567 @@
+/*-
+ * Copyright (c) 2017 Chelsio Communications, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR 

Re: svn commit: r330897 - in stable/11: bin/cat bin/chflags bin/chmod bin/cp bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/hostname bin/kill bin/ln bin/ls bin/mkdir bin/mv bin/pax bin/ps b

2018-03-28 Thread Rodney W. Grimes
[ Charset UTF-8 unsupported, converting... ]
> On Wed, Mar 28, 2018 at 8:04 PM, Allan Jude  wrote:
> > On 2018-03-28 14:15, Oliver Pinter wrote:
> >> Hi!
> >>
> >> This part of the MFC is wrong:
> >>
> >> https://svnweb.freebsd.org/base/stable/11/sys/sys/random.h?limit_changes=0=330897=330896=330897
> >>
> >> Could you please MFC back the other random related changes too? Some
> >> of them made by cem@.
> >>
> >> On 3/14/18, Eitan Adler  wrote:
> >>> Author: eadler
> >>> Date: Wed Mar 14 03:19:51 2018
> >>> New Revision: 330897
> >>> URL: https://svnweb.freebsd.org/changeset/base/330897
> >>>
> >>> Log:
> >>>   Partial merge of the SPDX changes
> >>>
> >>>   These changes are incomplete but are making it difficult
> >>>   to determine what other changes can/should be merged.
> >>>
> >>>   No objections from:pfg
> >>>
> > Am I missing something? If this MFC was supposed to be of the SPDX
> > license tagging, why does it have any functional changes?
> >
> > Especially changes to random(4)?
> 
> For extra fun, it also had some ARM driver changes that had broken the
> VERSATILE kernels, as I recall. gonzo@ took care of MFC'ing the other
> parts needed for those, though. It does make me wonder what else was
> overlooked, but the commit was large enough that it's not fun to
> glance over.

I have an audit report coming out in a few minutes that makes it
clear what the non SPDX bits are, I belive we can clean this up
with a few rXX reverts in short order.


-- 
Rod Grimes rgri...@freebsd.org
___
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-unsubscr...@freebsd.org"


Re: svn commit: r330897 - in stable/11: bin/cat bin/chflags bin/chmod bin/cp bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/hostname bin/kill bin/ln bin/ls bin/mkdir bin/mv bin/pax bin/ps b

2018-03-28 Thread Eitan Adler
On 28 March 2018 at 18:04, Allan Jude  wrote:
> On 2018-03-28 14:15, Oliver Pinter wrote:
>> Hi!
>>
>> This part of the MFC is wrong:
>>
>> https://svnweb.freebsd.org/base/stable/11/sys/sys/random.h?limit_changes=0=330897=330896=330897
>>
>> Could you please MFC back the other random related changes too? Some
>> of them made by cem@.
>>
>> On 3/14/18, Eitan Adler  wrote:
>>> Author: eadler
>>> Date: Wed Mar 14 03:19:51 2018
>>> New Revision: 330897
>>> URL: https://svnweb.freebsd.org/changeset/base/330897
>>>
>>> Log:
>>>   Partial merge of the SPDX changes
>>>
>>>   These changes are incomplete but are making it difficult
>>>   to determine what other changes can/should be merged.
>>>
>>>   No objections from:pfg
>>>
> Am I missing something? If this MFC was supposed to be of the SPDX
> license tagging, why does it have any functional changes?
>
> Especially changes to random(4)?

This was my failure. I only spot checked & compile-checked the diff
since I expected all changes to be comments/SPDX.

However, I must have gotten carried away and included a few too many
revisions. Unfortunately some people have already merged fixes to my
failure and thus this can't be reverted as is without also reverting
those fixes.

That said, I should do that since this commit message is utterly wrong.


-- 
Eitan Adler
Source, Ports, Doc committer
Bugmeister, Ports Security teams
___
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-unsubscr...@freebsd.org"


Re: svn commit: r330897 - in stable/11: bin/cat bin/chflags bin/chmod bin/cp bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/hostname bin/kill bin/ln bin/ls bin/mkdir bin/mv bin/pax bin/ps b

2018-03-28 Thread Kyle Evans
On Wed, Mar 28, 2018 at 8:04 PM, Allan Jude  wrote:
> On 2018-03-28 14:15, Oliver Pinter wrote:
>> Hi!
>>
>> This part of the MFC is wrong:
>>
>> https://svnweb.freebsd.org/base/stable/11/sys/sys/random.h?limit_changes=0=330897=330896=330897
>>
>> Could you please MFC back the other random related changes too? Some
>> of them made by cem@.
>>
>> On 3/14/18, Eitan Adler  wrote:
>>> Author: eadler
>>> Date: Wed Mar 14 03:19:51 2018
>>> New Revision: 330897
>>> URL: https://svnweb.freebsd.org/changeset/base/330897
>>>
>>> Log:
>>>   Partial merge of the SPDX changes
>>>
>>>   These changes are incomplete but are making it difficult
>>>   to determine what other changes can/should be merged.
>>>
>>>   No objections from:pfg
>>>
> Am I missing something? If this MFC was supposed to be of the SPDX
> license tagging, why does it have any functional changes?
>
> Especially changes to random(4)?

For extra fun, it also had some ARM driver changes that had broken the
VERSATILE kernels, as I recall. gonzo@ took care of MFC'ing the other
parts needed for those, though. It does make me wonder what else was
overlooked, but the commit was large enough that it's not fun to
glance over.
___
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-unsubscr...@freebsd.org"


Re: svn commit: r330897 - in stable/11: bin/cat bin/chflags bin/chmod bin/cp bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/hostname bin/kill bin/ln bin/ls bin/mkdir bin/mv bin/pax bin/ps b

2018-03-28 Thread Allan Jude
On 2018-03-28 14:15, Oliver Pinter wrote:
> Hi!
> 
> This part of the MFC is wrong:
> 
> https://svnweb.freebsd.org/base/stable/11/sys/sys/random.h?limit_changes=0=330897=330896=330897
> 
> Could you please MFC back the other random related changes too? Some
> of them made by cem@.
> 
> On 3/14/18, Eitan Adler  wrote:
>> Author: eadler
>> Date: Wed Mar 14 03:19:51 2018
>> New Revision: 330897
>> URL: https://svnweb.freebsd.org/changeset/base/330897
>>
>> Log:
>>   Partial merge of the SPDX changes
>>
>>   These changes are incomplete but are making it difficult
>>   to determine what other changes can/should be merged.
>>
>>   No objections from:pfg
>>
Am I missing something? If this MFC was supposed to be of the SPDX
license tagging, why does it have any functional changes?

Especially changes to random(4)?


-- 
Allan Jude



signature.asc
Description: OpenPGP digital signature


svn commit: r331718 - head/stand/i386/libi386

2018-03-28 Thread Kyle Evans
Author: kevans
Date: Thu Mar 29 00:55:11 2018
New Revision: 331718
URL: https://svnweb.freebsd.org/changeset/base/331718

Log:
  stand: Add workaround for HP BIOS issues
  
  hrs@ and kuriyama@ have found that on some HP BIOS, a system will fail to
  boot immediately after installation with the claim that it can't work out
  which disk they are booting from.
  
  They tracked it down to a buffer overrun, and found that it could be
  alleviated by doing a dummy read before-hand.
  
  Submitted by: kuriyama
  MFC after:1 week
  Differential Revision:https://reviews.freebsd.org/D14341

Modified:
  head/stand/i386/libi386/biosdisk.c

Modified: head/stand/i386/libi386/biosdisk.c
==
--- head/stand/i386/libi386/biosdisk.c  Thu Mar 29 00:42:44 2018
(r331717)
+++ head/stand/i386/libi386/biosdisk.c  Thu Mar 29 00:55:11 2018
(r331718)
@@ -122,6 +122,8 @@ static int nbdinfo = 0;
 
 #defineBD(dev) (bdinfo[(dev)->dd.d_unit])
 
+static void bd_io_workaround(struct disk_devdesc *dev);
+
 static int bd_read(struct disk_devdesc *dev, daddr_t dblk, int blks,
 caddr_t dest);
 static int bd_write(struct disk_devdesc *dev, daddr_t dblk, int blks,
@@ -724,6 +726,15 @@ bd_chs_io(struct disk_devdesc *dev, daddr_t dblk, int 
 return (0);
 }
 
+static void
+bd_io_workaround(struct disk_devdesc *dev)
+{
+   uint8_t buf[8 * 1024];
+
+   bd_edd_io(dev, 0x, 1, (caddr_t)buf, 0);
+}
+
+
 static int
 bd_io(struct disk_devdesc *dev, daddr_t dblk, int blks, caddr_t dest, int 
write)
 {
@@ -736,6 +747,17 @@ bd_io(struct disk_devdesc *dev, daddr_t dblk, int blks
 
 resid = blks;
 p = dest;
+
+/*
+ * Workaround for a problem with some HP ProLiant BIOS failing to work out
+ * the boot disk after installation. hrs and kuriyama discovered this
+ * problem with an HP ProLiant DL320e Gen 8 with a 3TB HDD, and discovered
+ * that an int13h call seems to cause a buffer overrun in the bios. The
+ * problem is alleviated by doing an extra read before the buggy read. It
+ * is not immediately known whether other models are similarly affected.
+ */
+if (dblk >= 0x1)
+   bd_io_workaround(dev);
 
 /* Decide whether we have to bounce */
 if (VTOP(dest) >> 20 != 0 || (BD(dev).bd_unit < 0x80 &&
___
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-unsubscr...@freebsd.org"


svn commit: r331717 - in stable: 10/release/tools 11/release/tools

2018-03-28 Thread Glen Barber
Author: gjb
Date: Thu Mar 29 00:42:44 2018
New Revision: 331717
URL: https://svnweb.freebsd.org/changeset/base/331717

Log:
  MFC r331559:
   Escape trailing newlines in a long variable list for consistency.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/11/release/tools/gce.conf
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/release/tools/gce.conf
Directory Properties:
  stable/10/   (props changed)

Modified: stable/11/release/tools/gce.conf
==
--- stable/11/release/tools/gce.confThu Mar 29 00:12:50 2018
(r331716)
+++ stable/11/release/tools/gce.confThu Mar 29 00:42:44 2018
(r331717)
@@ -11,8 +11,8 @@ export VM_EXTRA_PACKAGES="firstboot-freebsd-update fir
 # Set to a list of third-party software to enable in rc.conf(5).
 export VM_RC_LIST="ntpd sshd firstboot_growfs \
firstboot_pkgs firstboot_freebsd_update google_startup \
-   google_accounts_daemon google_clock_skew_daemon
-   google_instance_setup google_ip_forwarding_daemon
+   google_accounts_daemon google_clock_skew_daemon \
+   google_instance_setup google_ip_forwarding_daemon \
google_network_setup"
 
 vm_extra_install_base() {
___
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-unsubscr...@freebsd.org"


svn commit: r331717 - in stable: 10/release/tools 11/release/tools

2018-03-28 Thread Glen Barber
Author: gjb
Date: Thu Mar 29 00:42:44 2018
New Revision: 331717
URL: https://svnweb.freebsd.org/changeset/base/331717

Log:
  MFC r331559:
   Escape trailing newlines in a long variable list for consistency.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/10/release/tools/gce.conf
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/release/tools/gce.conf
Directory Properties:
  stable/11/   (props changed)

Modified: stable/10/release/tools/gce.conf
==
--- stable/10/release/tools/gce.confThu Mar 29 00:12:50 2018
(r331716)
+++ stable/10/release/tools/gce.confThu Mar 29 00:42:44 2018
(r331717)
@@ -11,8 +11,8 @@ export VM_EXTRA_PACKAGES="firstboot-freebsd-update fir
 # Set to a list of third-party software to enable in rc.conf(5).
 export VM_RC_LIST="ntpd sshd firstboot_growfs \
firstboot_pkgs firstboot_freebsd_update google_startup \
-   google_accounts_daemon google_clock_skew_daemon
-   google_instance_setup google_ip_forwarding_daemon
+   google_accounts_daemon google_clock_skew_daemon \
+   google_instance_setup google_ip_forwarding_daemon \
google_network_setup"
 
 vm_extra_install_base() {
___
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-unsubscr...@freebsd.org"


svn commit: r331716 - head/usr.bin/truss

2018-03-28 Thread John Baldwin
Author: jhb
Date: Thu Mar 29 00:12:50 2018
New Revision: 331716
URL: https://svnweb.freebsd.org/changeset/base/331716

Log:
  Reformat the enum of syscall argument types.
  
  List enum values on separate lines to minimize diffs as new types are
  added.  Split the enum values up into groups and use some simple sorting
  within groups (scalar enums are sorted by size, then base, all other
  groups are generally sorted alphabetically).
  
  No functional change.

Modified:
  head/usr.bin/truss/syscall.h

Modified: head/usr.bin/truss/syscall.h
==
--- head/usr.bin/truss/syscall.hThu Mar 29 00:04:07 2018
(r331715)
+++ head/usr.bin/truss/syscall.hThu Mar 29 00:12:50 2018
(r331716)
@@ -69,31 +69,143 @@
  * IN (meaning that the data is passed *into* the system call).
  */
 
-enum Argtype { None = 1, Hex, Octal, Int, UInt, LongHex, Name, Ptr, Stat, 
Stat11, Ioctl,
-   Quad, Signal, Sockaddr, StringArray, Timespec, Timeval, Itimerval,
-   Pollfd, Fd_set, Sigaction, Fcntl, Mprot, Mmapflags, Whence, Readlinkres,
-   Sigset, Sigprocmask, StatFs, Kevent, Sockdomain, Socktype, Open,
-   Fcntlflag, Rusage, RusageWho, BinString, Shutdown, Resource, Rlimit,
-   Timeval2, Pathconf, Rforkflags, ExitStatus, Waitoptions, Idtype, 
Procctl,
-   LinuxSockArgs, Umtxop, Atfd, Atflags, Timespec2, Accessmode, Long,
-   Sysarch, ExecArgs, ExecEnv, PipeFds, QuadHex, Utrace, IntArray, Pipe2,
-   CapFcntlRights, Fadvice, FileFlags, Flockop, Getfsstatmode, Kldsymcmd,
-   Kldunloadflags, Sizet, Madvice, Socklent, Sockprotocol, Sockoptlevel,
-   Sockoptname, Msgflags, CapRights, PUInt, PQuadHex, Acltype,
-   Extattrnamespace, Minherit, Mlockall, Mountflags, Msync, Priowhich,
-   Ptraceop, Quotactlcmd, Reboothowto, Rtpriofunc, Schedpolicy, Schedparam,
-   PSig, Siginfo, Kevent11, Iovec, Sctpsndrcvinfo, Msghdr,
+enum Argtype {
+   None = 1,
 
-   CloudABIAdvice, CloudABIClockID, CloudABIFDSFlags,
-   CloudABIFDStat, CloudABIFileStat, CloudABIFileType,
-   CloudABIFSFlags, CloudABILookup, CloudABIMFlags, CloudABIMProt,
-   CloudABIMSFlags, CloudABIOFlags, CloudABISDFlags,
-   CloudABISignal, CloudABISockStat, CloudABISSFlags,
-   CloudABITimestamp, CloudABIULFlags, CloudABIWhence };
+   /* Scalar integers. */
+   Socklent,
+   Octal,
+   Int,
+   UInt,
+   Hex,
+   Long,
+   LongHex,
+   Sizet,
+   Quad,
+   QuadHex,
 
+   /* Encoded scalar values. */
+   Accessmode,
+   Acltype,
+   Atfd,
+   Atflags,
+   CapFcntlRights,
+   Extattrnamespace,
+   Fadvice,
+   Fcntl,
+   Fcntlflag,
+   FileFlags,
+   Flockop,
+   Getfsstatmode,
+   Idtype,
+   Ioctl,
+   Kldsymcmd,
+   Kldunloadflags,
+   Madvice,
+   Minherit,
+   Msgflags,
+   Mlockall,
+   Mmapflags,
+   Mountflags,
+   Mprot,
+   Msync,
+   Open,
+   Pathconf,
+   Pipe2,
+   Procctl,
+   Priowhich,
+   Ptraceop,
+   Quotactlcmd,
+   Reboothowto,
+   Resource,
+   Rforkflags,
+   Rtpriofunc,
+   RusageWho,
+   Schedpolicy,
+   Shutdown,
+   Signal,
+   Sigprocmask,
+   Sockdomain,
+   Sockoptlevel,
+   Sockoptname,
+   Sockprotocol,
+   Socktype,
+   Sysarch,
+   Umtxop,
+   Waitoptions,
+   Whence,
+
+   /* Pointers to non-structures. */
+   Ptr,
+   BinString,
+   CapRights,
+   ExecArgs,
+   ExecEnv,
+   ExitStatus,
+   Fd_set,
+   IntArray,
+   Iovec,
+   Name,
+   PipeFds,
+   PSig,
+   PQuadHex,
+   PUInt,
+   Readlinkres,
+   StringArray,
+
+   /* Pointers to structures. */
+   Itimerval,
+   Kevent,
+   Kevent11,
+   LinuxSockArgs,
+   Msghdr,
+   Pollfd,
+   Rlimit,
+   Rusage,
+   Schedparam,
+   Sctpsndrcvinfo,
+   Sigaction,
+   Siginfo,
+   Sigset,
+   Sockaddr,
+   Stat,
+   Stat11,
+   StatFs,
+   Timespec,
+   Timespec2,
+   Timeval,
+   Timeval2,
+   Utrace,
+
+   CloudABIAdvice,
+   CloudABIClockID,
+   CloudABIFDSFlags,
+   CloudABIFDStat,
+   CloudABIFileStat,
+   CloudABIFileType,
+   CloudABIFSFlags,
+   CloudABILookup,
+   CloudABIMFlags,
+   CloudABIMProt,
+   CloudABIMSFlags,
+   CloudABIOFlags,
+   CloudABISDFlags,
+   CloudABISignal,
+   CloudABISockStat,
+   CloudABISSFlags,
+   CloudABITimestamp,
+   CloudABIULFlags,
+   CloudABIWhence,
+
+   MAX_ARG_TYPE,
+};
+
 #defineARG_MASK0xff
 #defineOUT 0x100
 #defineIN  /*0x20*/0
+
+_Static_assert(ARG_MASK > MAX_ARG_TYPE,
+"ARG_MASK overlaps with Argtype values");
 
 struct syscall_args {
enum Argtype type;

svn commit: r331715 - head/usr.bin/truss

2018-03-28 Thread John Baldwin
Author: jhb
Date: Thu Mar 29 00:04:07 2018
New Revision: 331715
URL: https://svnweb.freebsd.org/changeset/base/331715

Log:
  Rename ClouduABIFDSFlags to CloudABIFDSFlags.

Modified:
  head/usr.bin/truss/syscall.h
  head/usr.bin/truss/syscalls.c

Modified: head/usr.bin/truss/syscall.h
==
--- head/usr.bin/truss/syscall.hWed Mar 28 23:33:26 2018
(r331714)
+++ head/usr.bin/truss/syscall.hThu Mar 29 00:04:07 2018
(r331715)
@@ -84,7 +84,7 @@ enum Argtype { None = 1, Hex, Octal, Int, UInt, LongHe
Ptraceop, Quotactlcmd, Reboothowto, Rtpriofunc, Schedpolicy, Schedparam,
PSig, Siginfo, Kevent11, Iovec, Sctpsndrcvinfo, Msghdr,
 
-   CloudABIAdvice, CloudABIClockID, ClouduABIFDSFlags,
+   CloudABIAdvice, CloudABIClockID, CloudABIFDSFlags,
CloudABIFDStat, CloudABIFileStat, CloudABIFileType,
CloudABIFSFlags, CloudABILookup, CloudABIMFlags, CloudABIMProt,
CloudABIMSFlags, CloudABIOFlags, CloudABISDFlags,

Modified: head/usr.bin/truss/syscalls.c
==
--- head/usr.bin/truss/syscalls.c   Wed Mar 28 23:33:26 2018
(r331714)
+++ head/usr.bin/truss/syscalls.c   Thu Mar 29 00:04:07 2018
(r331715)
@@ -580,7 +580,7 @@ static struct syscall decoded_syscalls[] = {
  .args = { { Int, 0 }, { CloudABIFDStat | OUT, 1 } } },
{ .name = "cloudabi_sys_fd_stat_put", .ret_type = 1, .nargs = 3,
  .args = { { Int, 0 }, { CloudABIFDStat | IN, 1 },
-   { ClouduABIFDSFlags, 2 } } },
+   { CloudABIFDSFlags, 2 } } },
{ .name = "cloudabi_sys_fd_sync", .ret_type = 1, .nargs = 1,
  .args = { { Int, 0 } } },
{ .name = "cloudabi_sys_file_advise", .ret_type = 1, .nargs = 4,
@@ -2519,7 +2519,7 @@ print_arg(struct syscall_args *sc, unsigned long *args
case CloudABIClockID:
fputs(xlookup(cloudabi_clockid, args[sc->offset]), fp);
break;
-   case ClouduABIFDSFlags:
+   case CloudABIFDSFlags:
fputs(xlookup_bits(cloudabi_fdsflags, args[sc->offset]), fp);
break;
case CloudABIFDStat: {
___
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-unsubscr...@freebsd.org"


svn commit: r331714 - in head: . sys/conf sys/net sys/netinet sys/netinet6 sys/nfs usr.sbin/arp

2018-03-28 Thread Brooks Davis
Author: brooks
Date: Wed Mar 28 23:33:26 2018
New Revision: 331714
URL: https://svnweb.freebsd.org/changeset/base/331714

Log:
  Remove infrastructure for token-ring networks.
  
  Reviewed by:  cem, imp, jhb, jmallett
  Relnotes: yes
  Sponsored by: DARPA, AFRL
  Differential Revision:https://reviews.freebsd.org/D14875

Deleted:
  head/sys/net/if_iso88025subr.c
  head/sys/net/iso88025.h
Modified:
  head/UPDATING
  head/sys/conf/NOTES
  head/sys/conf/files
  head/sys/net/if.c
  head/sys/netinet/ip_carp.c
  head/sys/netinet6/in6.c
  head/sys/netinet6/in6_ifattach.c
  head/sys/netinet6/nd6.c
  head/sys/netinet6/nd6_nbr.c
  head/sys/nfs/bootp_subr.c
  head/usr.sbin/arp/arp.c

Modified: head/UPDATING
==
--- head/UPDATING   Wed Mar 28 23:17:29 2018(r331713)
+++ head/UPDATING   Wed Mar 28 23:33:26 2018(r331714)
@@ -51,6 +51,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW:
 
 ** SPECIAL WARNING: **
 
+20180528:
+   Support for token ring networks has been removed. If you
+   have "device token" in your kernel config you should remove
+   it. No device drivers supported token ring.
+
 20180323:
makefs was modified to be able to tag ISO9660 El Torito boot catalog
entries as EFI instead of overloading the i386 tag as done previously.

Modified: head/sys/conf/NOTES
==
--- head/sys/conf/NOTES Wed Mar 28 23:17:29 2018(r331713)
+++ head/sys/conf/NOTES Wed Mar 28 23:33:26 2018(r331714)
@@ -807,7 +807,7 @@ device  loop
 
 #  The `ether' device provides generic code to handle
 #  Ethernets; it is MANDATORY when an Ethernet device driver is
-#  configured or token-ring is enabled.
+#  configured.
 device ether
 
 #  The `vlan' device implements the VLAN tagging of Ethernet frames
@@ -845,9 +845,6 @@ device  wlan_xauth
 #  The 'wlan_amrr' device provides AMRR transmit rate control algorithm
 device wlan_acl
 device wlan_amrr
-
-# Generic TokenRing
-device token
 
 #  The `fddi' device provides generic code to support FDDI.
 device fddi

Modified: head/sys/conf/files
==
--- head/sys/conf/files Wed Mar 28 23:17:29 2018(r331713)
+++ head/sys/conf/files Wed Mar 28 23:33:26 2018(r331714)
@@ -4114,7 +4114,6 @@ net/if_gif.c  optional gif inet | gif 
inet6 | \
 netgraph_gif inet | netgraph_gif inet6
 net/if_gre.c   optional gre inet | gre inet6
 net/if_ipsec.c optional inet ipsec | inet6 ipsec
-net/if_iso88025subr.c  optional token
 net/if_lagg.c  optional lagg
 net/if_loop.c  optional loop
 net/if_llatbl.cstandard

Modified: head/sys/net/if.c
==
--- head/sys/net/if.c   Wed Mar 28 23:17:29 2018(r331713)
+++ head/sys/net/if.c   Wed Mar 28 23:33:26 2018(r331714)
@@ -3626,7 +3626,6 @@ if_setlladdr(struct ifnet *ifp, const u_char *lladdr, 
case IFT_ETHER:
case IFT_FDDI:
case IFT_XETHER:
-   case IFT_ISO88025:
case IFT_L2VLAN:
case IFT_BRIDGE:
case IFT_ARCNET:

Modified: head/sys/netinet/ip_carp.c
==
--- head/sys/netinet/ip_carp.c  Wed Mar 28 23:17:29 2018(r331713)
+++ head/sys/netinet/ip_carp.c  Wed Mar 28 23:33:26 2018(r331714)
@@ -61,7 +61,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 
@@ -1539,17 +1538,6 @@ carp_output(struct ifnet *ifp, struct mbuf *m, const s
fh->fddi_shost[5] = sc->sc_vhid;
}
break;
-   case IFT_ISO88025: {
-   struct iso88025_header *th;
-   th = mtod(m, struct iso88025_header *);
-   th->iso88025_shost[0] = 3;
-   th->iso88025_shost[1] = 0;
-   th->iso88025_shost[2] = 0x40 >> (sc->sc_vhid - 1);
-   th->iso88025_shost[3] = 0x4 >> (sc->sc_vhid - 1);
-   th->iso88025_shost[4] = 0;
-   th->iso88025_shost[5] = 0;
-   }
-   break;
default:
printf("%s: carp is not supported for the %d interface type\n",
ifp->if_xname, ifp->if_type);
@@ -1732,7 +1720,6 @@ carp_ioctl(struct ifreq *ifr, u_long cmd, struct threa
case IFT_L2VLAN:
case IFT_BRIDGE:
case IFT_FDDI:
-   case IFT_ISO88025:
break;
default:
  

svn commit: r331713 - in head: cddl/contrib/opensolaris/cmd/ztest sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2018-03-28 Thread Alexander Motin
Author: mav
Date: Wed Mar 28 23:17:29 2018
New Revision: 331713
URL: https://svnweb.freebsd.org/changeset/base/331713

Log:
  MFV r331712:
  9280 Assertion failure while running removal_with_ganging test with 4K devices
  
  illumos/illumos-gate@243952c7eeef020886e3e2e3df99a513df40584a
  
  Reviewed by: George Wilson 
  Reviewed by: John Kennedy 
  Approved by: Garrett D'Amore 
  Author: Matt Ahrens 

Modified:
  head/cddl/contrib/opensolaris/cmd/ztest/ztest.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c
Directory Properties:
  head/cddl/contrib/opensolaris/   (props changed)
  head/sys/cddl/contrib/opensolaris/   (props changed)

Modified: head/cddl/contrib/opensolaris/cmd/ztest/ztest.c
==
--- head/cddl/contrib/opensolaris/cmd/ztest/ztest.c Wed Mar 28 23:12:03 
2018(r331712)
+++ head/cddl/contrib/opensolaris/cmd/ztest/ztest.c Wed Mar 28 23:17:29 
2018(r331713)
@@ -164,7 +164,7 @@ typedef struct ztest_shared_opts {
int zo_init;
uint64_t zo_time;
uint64_t zo_maxloops;
-   uint64_t zo_metaslab_gang_bang;
+   uint64_t zo_metaslab_force_ganging;
 } ztest_shared_opts_t;
 
 static const ztest_shared_opts_t ztest_opts_defaults = {
@@ -186,10 +186,10 @@ static const ztest_shared_opts_t ztest_opts_defaults =
.zo_init = 1,
.zo_time = 300, /* 5 minutes */
.zo_maxloops = 50,  /* max loops during spa_freeze() */
-   .zo_metaslab_gang_bang = 32 << 10
+   .zo_metaslab_force_ganging = 32 << 10
 };
 
-extern uint64_t metaslab_gang_bang;
+extern uint64_t metaslab_force_ganging;
 extern uint64_t metaslab_df_alloc_threshold;
 extern uint64_t zfs_deadman_synctime_ms;
 extern int metaslab_preload_limit;
@@ -567,12 +567,12 @@ usage(boolean_t requested)
const ztest_shared_opts_t *zo = _opts_defaults;
 
char nice_vdev_size[NN_NUMBUF_SZ];
-   char nice_gang_bang[NN_NUMBUF_SZ];
+   char nice_force_ganging[NN_NUMBUF_SZ];
FILE *fp = requested ? stdout : stderr;
 
nicenum(zo->zo_vdev_size, nice_vdev_size, sizeof (nice_vdev_size));
-   nicenum(zo->zo_metaslab_gang_bang, nice_gang_bang,
-   sizeof (nice_gang_bang));
+   nicenum(zo->zo_metaslab_force_ganging, nice_force_ganging,
+   sizeof (nice_force_ganging));
 
(void) fprintf(fp, "Usage: %s\n"
"\t[-v vdevs (default: %llu)]\n"
@@ -607,7 +607,7 @@ usage(boolean_t requested)
zo->zo_raidz_parity,/* -R */
zo->zo_datasets,/* -d */
zo->zo_threads, /* -t */
-   nice_gang_bang, /* -g */
+   nice_force_ganging, /* -g */
zo->zo_init,/* -i */
(u_longlong_t)zo->zo_killrate,  /* -k */
zo->zo_pool,/* -p */
@@ -676,8 +676,8 @@ process_options(int argc, char **argv)
zo->zo_threads = MAX(1, value);
break;
case 'g':
-   zo->zo_metaslab_gang_bang = MAX(SPA_MINBLOCKSIZE << 1,
-   value);
+   zo->zo_metaslab_force_ganging =
+   MAX(SPA_MINBLOCKSIZE << 1, value);
break;
case 'i':
zo->zo_init = value;
@@ -6425,7 +6425,7 @@ main(int argc, char **argv)
zs = ztest_shared;
 
if (fd_data_str) {
-   metaslab_gang_bang = ztest_opts.zo_metaslab_gang_bang;
+   metaslab_force_ganging = ztest_opts.zo_metaslab_force_ganging;
metaslab_df_alloc_threshold =
zs->zs_metaslab_df_alloc_threshold;
 

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c  Wed Mar 
28 23:12:03 2018(r331712)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c  Wed Mar 
28 23:17:29 2018(r331713)
@@ -44,9 +44,9 @@ SYSCTL_NODE(_vfs_zfs, OID_AUTO, metaslab, CTLFLAG_RW, 
((flags) & (METASLAB_GANG_CHILD | METASLAB_GANG_HEADER))
 
 uint64_t metaslab_aliquot = 512ULL << 10;
-uint64_t metaslab_gang_bang = SPA_MAXBLOCKSIZE + 1;/* force gang blocks */
-SYSCTL_QUAD(_vfs_zfs_metaslab, OID_AUTO, gang_bang, CTLFLAG_RWTUN,
-_gang_bang, 0,
+uint64_t metaslab_force_ganging = SPA_MAXBLOCKSIZE + 1;/* force gang 
blocks */
+SYSCTL_QUAD(_vfs_zfs_metaslab, OID_AUTO, force_ganging, CTLFLAG_RWTUN,
+_force_ganging, 0,
 "Force gang block allocation for blocks larger than or equal 

svn commit: r331712 - vendor-sys/illumos/dist/uts/common/fs/zfs vendor/illumos/dist/cmd/ztest

2018-03-28 Thread Alexander Motin
Author: mav
Date: Wed Mar 28 23:12:03 2018
New Revision: 331712
URL: https://svnweb.freebsd.org/changeset/base/331712

Log:
  9280 Assertion failure while running removal_with_ganging test with 4K devices
  
  illumos/illumos-gate@243952c7eeef020886e3e2e3df99a513df40584a
  
  Reviewed by: George Wilson 
  Reviewed by: John Kennedy 
  Approved by: Garrett D'Amore 
  Author: Matt Ahrens 

Modified:
  vendor/illumos/dist/cmd/ztest/ztest.c

Changes in other areas also in this revision:
Modified:
  vendor-sys/illumos/dist/uts/common/fs/zfs/metaslab.c

Modified: vendor/illumos/dist/cmd/ztest/ztest.c
==
--- vendor/illumos/dist/cmd/ztest/ztest.c   Wed Mar 28 23:05:48 2018
(r331711)
+++ vendor/illumos/dist/cmd/ztest/ztest.c   Wed Mar 28 23:12:03 2018
(r331712)
@@ -162,7 +162,7 @@ typedef struct ztest_shared_opts {
int zo_init;
uint64_t zo_time;
uint64_t zo_maxloops;
-   uint64_t zo_metaslab_gang_bang;
+   uint64_t zo_metaslab_force_ganging;
 } ztest_shared_opts_t;
 
 static const ztest_shared_opts_t ztest_opts_defaults = {
@@ -184,10 +184,10 @@ static const ztest_shared_opts_t ztest_opts_defaults =
.zo_init = 1,
.zo_time = 300, /* 5 minutes */
.zo_maxloops = 50,  /* max loops during spa_freeze() */
-   .zo_metaslab_gang_bang = 32 << 10
+   .zo_metaslab_force_ganging = 32 << 10
 };
 
-extern uint64_t metaslab_gang_bang;
+extern uint64_t metaslab_force_ganging;
 extern uint64_t metaslab_df_alloc_threshold;
 extern uint64_t zfs_deadman_synctime_ms;
 extern int metaslab_preload_limit;
@@ -565,12 +565,12 @@ usage(boolean_t requested)
const ztest_shared_opts_t *zo = _opts_defaults;
 
char nice_vdev_size[NN_NUMBUF_SZ];
-   char nice_gang_bang[NN_NUMBUF_SZ];
+   char nice_force_ganging[NN_NUMBUF_SZ];
FILE *fp = requested ? stdout : stderr;
 
nicenum(zo->zo_vdev_size, nice_vdev_size, sizeof (nice_vdev_size));
-   nicenum(zo->zo_metaslab_gang_bang, nice_gang_bang,
-   sizeof (nice_gang_bang));
+   nicenum(zo->zo_metaslab_force_ganging, nice_force_ganging,
+   sizeof (nice_force_ganging));
 
(void) fprintf(fp, "Usage: %s\n"
"\t[-v vdevs (default: %llu)]\n"
@@ -605,7 +605,7 @@ usage(boolean_t requested)
zo->zo_raidz_parity,/* -R */
zo->zo_datasets,/* -d */
zo->zo_threads, /* -t */
-   nice_gang_bang, /* -g */
+   nice_force_ganging, /* -g */
zo->zo_init,/* -i */
(u_longlong_t)zo->zo_killrate,  /* -k */
zo->zo_pool,/* -p */
@@ -674,8 +674,8 @@ process_options(int argc, char **argv)
zo->zo_threads = MAX(1, value);
break;
case 'g':
-   zo->zo_metaslab_gang_bang = MAX(SPA_MINBLOCKSIZE << 1,
-   value);
+   zo->zo_metaslab_force_ganging =
+   MAX(SPA_MINBLOCKSIZE << 1, value);
break;
case 'i':
zo->zo_init = value;
@@ -6418,7 +6418,7 @@ main(int argc, char **argv)
zs = ztest_shared;
 
if (fd_data_str) {
-   metaslab_gang_bang = ztest_opts.zo_metaslab_gang_bang;
+   metaslab_force_ganging = ztest_opts.zo_metaslab_force_ganging;
metaslab_df_alloc_threshold =
zs->zs_metaslab_df_alloc_threshold;
 
___
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-unsubscr...@freebsd.org"


svn commit: r331712 - vendor-sys/illumos/dist/uts/common/fs/zfs vendor/illumos/dist/cmd/ztest

2018-03-28 Thread Alexander Motin
Author: mav
Date: Wed Mar 28 23:12:03 2018
New Revision: 331712
URL: https://svnweb.freebsd.org/changeset/base/331712

Log:
  9280 Assertion failure while running removal_with_ganging test with 4K devices
  
  illumos/illumos-gate@243952c7eeef020886e3e2e3df99a513df40584a
  
  Reviewed by: George Wilson 
  Reviewed by: John Kennedy 
  Approved by: Garrett D'Amore 
  Author: Matt Ahrens 

Modified:
  vendor-sys/illumos/dist/uts/common/fs/zfs/metaslab.c

Changes in other areas also in this revision:
Modified:
  vendor/illumos/dist/cmd/ztest/ztest.c

Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/metaslab.c
==
--- vendor-sys/illumos/dist/uts/common/fs/zfs/metaslab.cWed Mar 28 
23:05:48 2018(r331711)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/metaslab.cWed Mar 28 
23:12:03 2018(r331712)
@@ -41,7 +41,7 @@
((flags) & (METASLAB_GANG_CHILD | METASLAB_GANG_HEADER))
 
 uint64_t metaslab_aliquot = 512ULL << 10;
-uint64_t metaslab_gang_bang = SPA_MAXBLOCKSIZE + 1;/* force gang blocks */
+uint64_t metaslab_force_ganging = SPA_MAXBLOCKSIZE + 1;/* force gang 
blocks */
 
 /*
  * Since we can touch multiple metaslabs (and their respective space maps)
@@ -3080,7 +3080,7 @@ metaslab_alloc_dva(spa_t *spa, metaslab_class_t *mc, u
/*
 * For testing, make some blocks above a certain size be gang blocks.
 */
-   if (psize >= metaslab_gang_bang && (ddi_get_lbolt() & 3) == 0) {
+   if (psize >= metaslab_force_ganging && (ddi_get_lbolt() & 3) == 0) {
metaslab_trace_add(zal, NULL, NULL, psize, d, TRACE_FORCE_GANG);
return (SET_ERROR(ENOSPC));
}
___
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-unsubscr...@freebsd.org"


svn commit: r331711 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2018-03-28 Thread Alexander Motin
Author: mav
Date: Wed Mar 28 23:05:48 2018
New Revision: 331711
URL: https://svnweb.freebsd.org/changeset/base/331711

Log:
  MFV 331710:
  9188 increase size of dbuf cache to reduce indirect block decompression
  
  illumos/illumos-gate@268bbb2a2fa79c36d4695d13a595ba50a7754b76
  
  With compressed ARC (6950) we use up to 25% of our CPU to decompress indirect
  blocks, under a workload of random cached reads. To reduce this decompression
  cost, we would like to increase the size of the dbuf cache so that more
  indirect blocks can be stored uncompressed.
  
  If we are caching entire large files of recordsize=8K, the indirect blocks
  use 1/64th as much memory as the data blocks (assuming they have the same
  compression ratio). We suggest making the dbuf cache be 1/32nd of all memory,
  so that in this scenario we should be able to keep all the indirect blocks
  decompressed in the dbuf cache. (We want it to be more than the 1/64th that
  the indirect blocks would use because we need to cache other stuff in the
  dbuf cache as well.)
  
  In real world workloads, this won't help as dramatically as the example
  above, but we think it's still worth it because the risk of decreasing
  performance is low. The potential negative performance impact is that we
  will be slightly reducing the size of the ARC (by ~3%).
  
  Reviewed by: Dan Kimmel 
  Reviewed by: Prashanth Sreenivasa 
  Reviewed by: Paul Dagnelie 
  Reviewed by: Sanjay Nadkarni 
  Reviewed by: Allan Jude 
  Reviewed by: Igor Kozhukhov 
  Approved by: Garrett D'Amore 
  Author: George Wilson 

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
Directory Properties:
  head/sys/cddl/contrib/opensolaris/   (props changed)

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c  Wed Mar 28 
22:57:02 2018(r331710)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c  Wed Mar 28 
23:05:48 2018(r331711)
@@ -85,10 +85,10 @@ static boolean_t dbuf_evict_thread_exit;
  */
 static multilist_t *dbuf_cache;
 static refcount_t dbuf_cache_size;
-uint64_t dbuf_cache_max_bytes = 100 * 1024 * 1024;
+uint64_t dbuf_cache_max_bytes = 0;
 
-/* Cap the size of the dbuf cache to log2 fraction of arc size. */
-int dbuf_cache_max_shift = 5;
+/* Set the default size of the dbuf cache to log2 fraction of arc size. */
+int dbuf_cache_shift = 5;
 
 /*
  * The dbuf cache uses a three-stage eviction policy:
@@ -138,8 +138,8 @@ uint_t dbuf_cache_lowater_pct = 10;
 SYSCTL_DECL(_vfs_zfs);
 SYSCTL_QUAD(_vfs_zfs, OID_AUTO, dbuf_cache_max_bytes, CTLFLAG_RWTUN,
 _cache_max_bytes, 0, "dbuf cache size in bytes");
-SYSCTL_INT(_vfs_zfs, OID_AUTO, dbuf_cache_max_shift, CTLFLAG_RDTUN,
-_cache_max_shift, 0, "dbuf size as log2 fraction of ARC");
+SYSCTL_INT(_vfs_zfs, OID_AUTO, dbuf_cache_shift, CTLFLAG_RDTUN,
+_cache_shift, 0, "dbuf cache size as log2 fraction of ARC");
 SYSCTL_UINT(_vfs_zfs, OID_AUTO, dbuf_cache_hiwater_pct, CTLFLAG_RWTUN,
 _cache_hiwater_pct, 0, "max percents above the dbuf cache size");
 SYSCTL_UINT(_vfs_zfs, OID_AUTO, dbuf_cache_lowater_pct, CTLFLAG_RWTUN,
@@ -610,11 +610,15 @@ retry:
mutex_init(>hash_mutexes[i], NULL, MUTEX_DEFAULT, NULL);
 
/*
-* Setup the parameters for the dbuf cache. We cap the size of the
-* dbuf cache to 1/32nd (default) of the size of the ARC.
+* Setup the parameters for the dbuf cache. We set the size of the
+* dbuf cache to 1/32nd (default) of the size of the ARC. If the value
+* has been set in /etc/system and it's not greater than the size of
+* the ARC, then we honor that value.
 */
-   dbuf_cache_max_bytes = MIN(dbuf_cache_max_bytes,
-   arc_max_bytes() >> dbuf_cache_max_shift);
+   if (dbuf_cache_max_bytes == 0 ||
+   dbuf_cache_max_bytes >= arc_max_bytes())  {
+   dbuf_cache_max_bytes = arc_max_bytes() >> dbuf_cache_shift;
+   }
 
/*
 * All entries are queued via taskq_dispatch_ent(), so min/maxalloc
___
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-unsubscr...@freebsd.org"


svn commit: r331710 - vendor-sys/illumos/dist/uts/common/fs/zfs

2018-03-28 Thread Alexander Motin
Author: mav
Date: Wed Mar 28 22:57:02 2018
New Revision: 331710
URL: https://svnweb.freebsd.org/changeset/base/331710

Log:
  9188 increase size of dbuf cache to reduce indirect block decompression
  
  illumos/illumos-gate@268bbb2a2fa79c36d4695d13a595ba50a7754b76
  
  With compressed ARC (6950) we use up to 25% of our CPU to decompress indirect
  blocks, under a workload of random cached reads. To reduce this decompression
  cost, we would like to increase the size of the dbuf cache so that more
  indirect blocks can be stored uncompressed.
  
  If we are caching entire large files of recordsize=8K, the indirect blocks
  use 1/64th as much memory as the data blocks (assuming they have the same
  compression ratio). We suggest making the dbuf cache be 1/32nd of all memory,
  so that in this scenario we should be able to keep all the indirect blocks
  decompressed in the dbuf cache. (We want it to be more than the 1/64th that
  the indirect blocks would use because we need to cache other stuff in the
  dbuf cache as well.)
  
  In real world workloads, this won't help as dramatically as the example
  above, but we think it's still worth it because the risk of decreasing
  performance is low. The potential negative performance impact is that we
  will be slightly reducing the size of the ARC (by ~3%).
  
  Reviewed by: Dan Kimmel 
  Reviewed by: Prashanth Sreenivasa 
  Reviewed by: Paul Dagnelie 
  Reviewed by: Sanjay Nadkarni 
  Reviewed by: Allan Jude 
  Reviewed by: Igor Kozhukhov 
  Approved by: Garrett D'Amore 
  Author: George Wilson 

Modified:
  vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c

Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c
==
--- vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.cWed Mar 28 22:50:05 
2018(r331709)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.cWed Mar 28 22:57:02 
2018(r331710)
@@ -85,10 +85,10 @@ static boolean_t dbuf_evict_thread_exit;
  */
 static multilist_t *dbuf_cache;
 static refcount_t dbuf_cache_size;
-uint64_t dbuf_cache_max_bytes = 100 * 1024 * 1024;
+uint64_t dbuf_cache_max_bytes = 0;
 
-/* Cap the size of the dbuf cache to log2 fraction of arc size. */
-int dbuf_cache_max_shift = 5;
+/* Set the default size of the dbuf cache to log2 fraction of arc size. */
+int dbuf_cache_shift = 5;
 
 /*
  * The dbuf cache uses a three-stage eviction policy:
@@ -600,11 +600,15 @@ retry:
mutex_init(>hash_mutexes[i], NULL, MUTEX_DEFAULT, NULL);
 
/*
-* Setup the parameters for the dbuf cache. We cap the size of the
-* dbuf cache to 1/32nd (default) of the size of the ARC.
+* Setup the parameters for the dbuf cache. We set the size of the
+* dbuf cache to 1/32nd (default) of the size of the ARC. If the value
+* has been set in /etc/system and it's not greater than the size of
+* the ARC, then we honor that value.
 */
-   dbuf_cache_max_bytes = MIN(dbuf_cache_max_bytes,
-   arc_max_bytes() >> dbuf_cache_max_shift);
+   if (dbuf_cache_max_bytes == 0 ||
+   dbuf_cache_max_bytes >= arc_max_bytes())  {
+   dbuf_cache_max_bytes = arc_max_bytes() >> dbuf_cache_shift;
+   }
 
/*
 * All entries are queued via taskq_dispatch_ent(), so min/maxalloc
___
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-unsubscr...@freebsd.org"


svn commit: r331709 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2018-03-28 Thread Alexander Motin
Author: mav
Date: Wed Mar 28 22:50:05 2018
New Revision: 331709
URL: https://svnweb.freebsd.org/changeset/base/331709

Log:
  MFV r331708:
  9321 arc_loan_compressed_buf() can increment arc_loaned_bytes by the wrong 
value
  
  illumos/illumos-gate@9be12bd737714550277bd02b0c693db560976990
  
  arc_loan_compressed_buf() increments arc_loaned_bytes by psize unconditionally
  In the case of zfs_compressed_arc_enabled=0, when the buf is returned via
  arc_return_buf(), if ARC_BUF_COMPRESSED(buf) is false, then arc_loaned_bytes
  is decremented by lsize, not psize.
  
  Switch to using arc_buf_size(buf), instead of psize, which will return
  psize or lsize, depending on the result of ARC_BUF_COMPRESSED(buf).
  
  Reviewed by: Matt Ahrens 
  Reviewed by: George Wilson 
  Approved by: Garrett D'Amore 
  Author: Allan Jude 

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
Directory Properties:
  head/sys/cddl/contrib/opensolaris/   (props changed)

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c   Wed Mar 28 
22:43:55 2018(r331708)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c   Wed Mar 28 
22:50:05 2018(r331709)
@@ -2877,7 +2877,7 @@ arc_loan_buf(spa_t *spa, boolean_t is_metadata, int si
arc_buf_t *buf = arc_alloc_buf(spa, arc_onloan_tag,
is_metadata ? ARC_BUFC_METADATA : ARC_BUFC_DATA, size);
 
-   arc_loaned_bytes_update(size);
+   arc_loaned_bytes_update(arc_buf_size(buf));
 
return (buf);
 }
@@ -2889,7 +2889,7 @@ arc_loan_compressed_buf(spa_t *spa, uint64_t psize, ui
arc_buf_t *buf = arc_alloc_compressed_buf(spa, arc_onloan_tag,
psize, lsize, compression_type);
 
-   arc_loaned_bytes_update(psize);
+   arc_loaned_bytes_update(arc_buf_size(buf));
 
return (buf);
 }
___
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-unsubscr...@freebsd.org"


svn commit: r331708 - vendor-sys/illumos/dist/uts/common/fs/zfs

2018-03-28 Thread Alexander Motin
Author: mav
Date: Wed Mar 28 22:43:55 2018
New Revision: 331708
URL: https://svnweb.freebsd.org/changeset/base/331708

Log:
  9321 arc_loan_compressed_buf() can increment arc_loaned_bytes by the wrong 
value
  
  illumos/illumos-gate@9be12bd737714550277bd02b0c693db560976990
  
  arc_loan_compressed_buf() increments arc_loaned_bytes by psize unconditionally
  In the case of zfs_compressed_arc_enabled=0, when the buf is returned via
  arc_return_buf(), if ARC_BUF_COMPRESSED(buf) is false, then arc_loaned_bytes
  is decremented by lsize, not psize.
  
  Switch to using arc_buf_size(buf), instead of psize, which will return
  psize or lsize, depending on the result of ARC_BUF_COMPRESSED(buf).
  
  Reviewed by: Matt Ahrens 
  Reviewed by: George Wilson 
  Approved by: Garrett D'Amore 
  Author: Allan Jude 

Modified:
  vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c

Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c
==
--- vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Wed Mar 28 22:29:06 
2018(r331707)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Wed Mar 28 22:43:55 
2018(r331708)
@@ -2557,7 +2557,7 @@ arc_loan_buf(spa_t *spa, boolean_t is_metadata, int si
arc_buf_t *buf = arc_alloc_buf(spa, arc_onloan_tag,
is_metadata ? ARC_BUFC_METADATA : ARC_BUFC_DATA, size);
 
-   arc_loaned_bytes_update(size);
+   arc_loaned_bytes_update(arc_buf_size(buf));
 
return (buf);
 }
@@ -2569,7 +2569,7 @@ arc_loan_compressed_buf(spa_t *spa, uint64_t psize, ui
arc_buf_t *buf = arc_alloc_compressed_buf(spa, arc_onloan_tag,
psize, lsize, compression_type);
 
-   arc_loaned_bytes_update(psize);
+   arc_loaned_bytes_update(arc_buf_size(buf));
 
return (buf);
 }
___
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-unsubscr...@freebsd.org"


svn commit: r331707 - in head: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/common/zfs sys/cddl/contri...

2018-03-28 Thread Alexander Motin
Author: mav
Date: Wed Mar 28 22:29:06 2018
New Revision: 331707
URL: https://svnweb.freebsd.org/changeset/base/331707

Log:
  MFV r331706:
  9235 rename zpool_rewind_policy_t to zpool_load_policy_t
  
  illumos/illumos-gate@5dafeea3ebd2dd77affc802bcb90f63faf01589f
  
  We want to be able to pass various settings during import/open of a pool,
  which are not only related to rewind. Instead of adding a new policy and
  duplicate a bunch of code, we should just rename rewind_policy to a more
  generic term like load_policy.
  
  For instance, we'd like to set spa->spa_import_flags from the nvlist,
  rather from a flags parameter passed to spa_import as in some cases we want
  those flags not only for the import case, but also for the open case. One
  such flag could be ZFS_IMPORT_MISSING_LOG (as used in zdb) which would
  allow zfs to open a pool when logs are missing.
  
  Reviewed by: Matt Ahrens 
  Reviewed by: George Wilson 
  Approved by: Robert Mustacchi 
  Author: Pavel Zakharov 

Modified:
  head/cddl/contrib/opensolaris/cmd/zdb/zdb.c
  head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
  head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h
  head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c
  head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c
  head/sys/cddl/contrib/opensolaris/common/zfs/zfs_comutil.c
  head/sys/cddl/contrib/opensolaris/common/zfs/zfs_comutil.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
  head/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h
Directory Properties:
  head/cddl/contrib/opensolaris/   (props changed)
  head/cddl/contrib/opensolaris/cmd/zdb/   (props changed)
  head/cddl/contrib/opensolaris/lib/libzfs/   (props changed)
  head/sys/cddl/contrib/opensolaris/   (props changed)

Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c
==
--- head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Wed Mar 28 22:16:51 2018
(r331706)
+++ head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Wed Mar 28 22:29:06 2018
(r331707)
@@ -5222,8 +5222,8 @@ main(int argc, char **argv)
(dump_opt['X'] ? ZPOOL_EXTREME_REWIND : 0);
 
if (nvlist_alloc(, NV_UNIQUE_NAME_TYPE, 0) != 0 ||
-   nvlist_add_uint64(policy, ZPOOL_REWIND_REQUEST_TXG, max_txg) != 0 ||
-   nvlist_add_uint32(policy, ZPOOL_REWIND_REQUEST, rewind) != 0)
+   nvlist_add_uint64(policy, ZPOOL_LOAD_REQUEST_TXG, max_txg) != 0 ||
+   nvlist_add_uint32(policy, ZPOOL_LOAD_REWIND_POLICY, rewind) != 0)
fatal("internal error: %s", strerror(ENOMEM));
 
error = 0;
@@ -5240,7 +5240,7 @@ main(int argc, char **argv)
}
 
if (nvlist_add_nvlist(cfg,
-   ZPOOL_REWIND_POLICY, policy) != 0) {
+   ZPOOL_LOAD_POLICY, policy) != 0) {
fatal("can't open '%s': %s",
target, strerror(ENOMEM));
}

Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
==
--- head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.cWed Mar 28 
22:16:51 2018(r331706)
+++ head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.cWed Mar 28 
22:29:06 2018(r331707)
@@ -2357,8 +2357,9 @@ zpool_do_import(int argc, char **argv)
 
/* In the future, we can capture further policy and include it here */
if (nvlist_alloc(, NV_UNIQUE_NAME, 0) != 0 ||
-   nvlist_add_uint64(policy, ZPOOL_REWIND_REQUEST_TXG, txg) != 0 ||
-   nvlist_add_uint32(policy, ZPOOL_REWIND_REQUEST, rewind_policy) != 0)
+   nvlist_add_uint64(policy, ZPOOL_LOAD_REQUEST_TXG, txg) != 0 ||
+   nvlist_add_uint32(policy, ZPOOL_LOAD_REWIND_POLICY,
+   rewind_policy) != 0)
goto error;
 
if (searchdirs == NULL) {
@@ -2483,7 +2484,7 @@ zpool_do_import(int argc, char **argv)
if (do_destroyed && pool_state != POOL_STATE_DESTROYED)
continue;
 
-   verify(nvlist_add_nvlist(config, ZPOOL_REWIND_POLICY,
+   verify(nvlist_add_nvlist(config, ZPOOL_LOAD_POLICY,
policy) == 0);
 
if (argc == 0) {
@@ -3971,8 +3972,10 @@ zpool_do_clear(int argc, char **argv)
 
/* In future, further rewind policy choices can be passed along here */
if (nvlist_alloc(, NV_UNIQUE_NAME, 0) != 0 ||
-   nvlist_add_uint32(policy, ZPOOL_REWIND_REQUEST, rewind_policy) != 0)
+   nvlist_add_uint32(policy, ZPOOL_LOAD_REWIND_POLICY,
+   rewind_policy) != 0) {
return (1);
+   }
 
pool = argv[0];
device = argc == 2 ? argv[1] : NULL;

Modified: 

svn commit: r331706 - vendor-sys/illumos/dist/common/zfs vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/sys/fs vendor/illumos/dist/cmd/zdb vendor/illumos/dist/cmd/zpoo...

2018-03-28 Thread Alexander Motin
Author: mav
Date: Wed Mar 28 22:16:51 2018
New Revision: 331706
URL: https://svnweb.freebsd.org/changeset/base/331706

Log:
  9235 rename zpool_rewind_policy_t to zpool_load_policy_t
  
  illumos/illumos-gate@5dafeea3ebd2dd77affc802bcb90f63faf01589f
  
  We want to be able to pass various settings during import/open of a pool,
  which are not only related to rewind. Instead of adding a new policy and
  duplicate a bunch of code, we should just rename rewind_policy to a more
  generic term like load_policy.
  
  For instance, we'd like to set spa->spa_import_flags from the nvlist,
  rather from a flags parameter passed to spa_import as in some cases we want
  those flags not only for the import case, but also for the open case. One
  such flag could be ZFS_IMPORT_MISSING_LOG (as used in zdb) which would
  allow zfs to open a pool when logs are missing.
  
  Reviewed by: Matt Ahrens 
  Reviewed by: George Wilson 
  Approved by: Robert Mustacchi 
  Author: Pavel Zakharov 

Modified:
  vendor/illumos/dist/cmd/zdb/zdb.c
  vendor/illumos/dist/cmd/zpool/zpool_main.c
  vendor/illumos/dist/lib/libzfs/common/libzfs.h
  vendor/illumos/dist/lib/libzfs/common/libzfs_import.c
  vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c

Changes in other areas also in this revision:
Modified:
  vendor-sys/illumos/dist/common/zfs/zfs_comutil.c
  vendor-sys/illumos/dist/common/zfs/zfs_comutil.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c
  vendor-sys/illumos/dist/uts/common/sys/fs/zfs.h

Modified: vendor/illumos/dist/cmd/zdb/zdb.c
==
--- vendor/illumos/dist/cmd/zdb/zdb.c   Wed Mar 28 22:10:06 2018
(r331705)
+++ vendor/illumos/dist/cmd/zdb/zdb.c   Wed Mar 28 22:16:51 2018
(r331706)
@@ -5183,8 +5183,8 @@ main(int argc, char **argv)
(dump_opt['X'] ? ZPOOL_EXTREME_REWIND : 0);
 
if (nvlist_alloc(, NV_UNIQUE_NAME_TYPE, 0) != 0 ||
-   nvlist_add_uint64(policy, ZPOOL_REWIND_REQUEST_TXG, max_txg) != 0 ||
-   nvlist_add_uint32(policy, ZPOOL_REWIND_REQUEST, rewind) != 0)
+   nvlist_add_uint64(policy, ZPOOL_LOAD_REQUEST_TXG, max_txg) != 0 ||
+   nvlist_add_uint32(policy, ZPOOL_LOAD_REWIND_POLICY, rewind) != 0)
fatal("internal error: %s", strerror(ENOMEM));
 
error = 0;
@@ -5201,7 +5201,7 @@ main(int argc, char **argv)
}
 
if (nvlist_add_nvlist(cfg,
-   ZPOOL_REWIND_POLICY, policy) != 0) {
+   ZPOOL_LOAD_POLICY, policy) != 0) {
fatal("can't open '%s': %s",
target, strerror(ENOMEM));
}

Modified: vendor/illumos/dist/cmd/zpool/zpool_main.c
==
--- vendor/illumos/dist/cmd/zpool/zpool_main.c  Wed Mar 28 22:10:06 2018
(r331705)
+++ vendor/illumos/dist/cmd/zpool/zpool_main.c  Wed Mar 28 22:16:51 2018
(r331706)
@@ -2325,8 +2325,9 @@ zpool_do_import(int argc, char **argv)
 
/* In the future, we can capture further policy and include it here */
if (nvlist_alloc(, NV_UNIQUE_NAME, 0) != 0 ||
-   nvlist_add_uint64(policy, ZPOOL_REWIND_REQUEST_TXG, txg) != 0 ||
-   nvlist_add_uint32(policy, ZPOOL_REWIND_REQUEST, rewind_policy) != 0)
+   nvlist_add_uint64(policy, ZPOOL_LOAD_REQUEST_TXG, txg) != 0 ||
+   nvlist_add_uint32(policy, ZPOOL_LOAD_REWIND_POLICY,
+   rewind_policy) != 0)
goto error;
 
if (searchdirs == NULL) {
@@ -2451,7 +2452,7 @@ zpool_do_import(int argc, char **argv)
if (do_destroyed && pool_state != POOL_STATE_DESTROYED)
continue;
 
-   verify(nvlist_add_nvlist(config, ZPOOL_REWIND_POLICY,
+   verify(nvlist_add_nvlist(config, ZPOOL_LOAD_POLICY,
policy) == 0);
 
if (argc == 0) {
@@ -3939,8 +3940,10 @@ zpool_do_clear(int argc, char **argv)
 
/* In future, further rewind policy choices can be passed along here */
if (nvlist_alloc(, NV_UNIQUE_NAME, 0) != 0 ||
-   nvlist_add_uint32(policy, ZPOOL_REWIND_REQUEST, rewind_policy) != 0)
+   nvlist_add_uint32(policy, ZPOOL_LOAD_REWIND_POLICY,
+   rewind_policy) != 0) {
return (1);
+   }
 
pool = argv[0];
device = argc == 2 ? argv[1] : NULL;

Modified: vendor/illumos/dist/lib/libzfs/common/libzfs.h
==
--- vendor/illumos/dist/lib/libzfs/common/libzfs.h  Wed Mar 28 22:10:06 
2018(r331705)
+++ vendor/illumos/dist/lib/libzfs/common/libzfs.h  Wed Mar 28 22:16:51 
2018(r331706)
@@ -393,7 +393,7 @@ typedef struct 

svn commit: r331706 - vendor-sys/illumos/dist/common/zfs vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/sys/fs vendor/illumos/dist/cmd/zdb vendor/illumos/dist/cmd/zpoo...

2018-03-28 Thread Alexander Motin
Author: mav
Date: Wed Mar 28 22:16:51 2018
New Revision: 331706
URL: https://svnweb.freebsd.org/changeset/base/331706

Log:
  9235 rename zpool_rewind_policy_t to zpool_load_policy_t
  
  illumos/illumos-gate@5dafeea3ebd2dd77affc802bcb90f63faf01589f
  
  We want to be able to pass various settings during import/open of a pool,
  which are not only related to rewind. Instead of adding a new policy and
  duplicate a bunch of code, we should just rename rewind_policy to a more
  generic term like load_policy.
  
  For instance, we'd like to set spa->spa_import_flags from the nvlist,
  rather from a flags parameter passed to spa_import as in some cases we want
  those flags not only for the import case, but also for the open case. One
  such flag could be ZFS_IMPORT_MISSING_LOG (as used in zdb) which would
  allow zfs to open a pool when logs are missing.
  
  Reviewed by: Matt Ahrens 
  Reviewed by: George Wilson 
  Approved by: Robert Mustacchi 
  Author: Pavel Zakharov 

Modified:
  vendor-sys/illumos/dist/common/zfs/zfs_comutil.c
  vendor-sys/illumos/dist/common/zfs/zfs_comutil.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c
  vendor-sys/illumos/dist/uts/common/sys/fs/zfs.h

Changes in other areas also in this revision:
Modified:
  vendor/illumos/dist/cmd/zdb/zdb.c
  vendor/illumos/dist/cmd/zpool/zpool_main.c
  vendor/illumos/dist/lib/libzfs/common/libzfs.h
  vendor/illumos/dist/lib/libzfs/common/libzfs_import.c
  vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c

Modified: vendor-sys/illumos/dist/common/zfs/zfs_comutil.c
==
--- vendor-sys/illumos/dist/common/zfs/zfs_comutil.cWed Mar 28 22:10:06 
2018(r331705)
+++ vendor-sys/illumos/dist/common/zfs/zfs_comutil.cWed Mar 28 22:16:51 
2018(r331706)
@@ -20,7 +20,7 @@
  */
 /*
  * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012 by Delphix. All rights reserved.
+ * Copyright (c) 2012, 2017 by Delphix. All rights reserved.
  */
 
 /*
@@ -67,17 +67,17 @@ zfs_allocatable_devs(nvlist_t *nv)
 }
 
 void
-zpool_get_rewind_policy(nvlist_t *nvl, zpool_rewind_policy_t *zrpp)
+zpool_get_load_policy(nvlist_t *nvl, zpool_load_policy_t *zlpp)
 {
nvlist_t *policy;
nvpair_t *elem;
char *nm;
 
/* Defaults */
-   zrpp->zrp_request = ZPOOL_NO_REWIND;
-   zrpp->zrp_maxmeta = 0;
-   zrpp->zrp_maxdata = UINT64_MAX;
-   zrpp->zrp_txg = UINT64_MAX;
+   zlpp->zlp_rewind = ZPOOL_NO_REWIND;
+   zlpp->zlp_maxmeta = 0;
+   zlpp->zlp_maxdata = UINT64_MAX;
+   zlpp->zlp_txg = UINT64_MAX;
 
if (nvl == NULL)
return;
@@ -85,24 +85,24 @@ zpool_get_rewind_policy(nvlist_t *nvl, zpool_rewind_po
elem = NULL;
while ((elem = nvlist_next_nvpair(nvl, elem)) != NULL) {
nm = nvpair_name(elem);
-   if (strcmp(nm, ZPOOL_REWIND_POLICY) == 0) {
+   if (strcmp(nm, ZPOOL_LOAD_POLICY) == 0) {
if (nvpair_value_nvlist(elem, ) == 0)
-   zpool_get_rewind_policy(policy, zrpp);
+   zpool_get_load_policy(policy, zlpp);
return;
-   } else if (strcmp(nm, ZPOOL_REWIND_REQUEST) == 0) {
-   if (nvpair_value_uint32(elem, >zrp_request) == 0)
-   if (zrpp->zrp_request & ~ZPOOL_REWIND_POLICIES)
-   zrpp->zrp_request = ZPOOL_NO_REWIND;
-   } else if (strcmp(nm, ZPOOL_REWIND_REQUEST_TXG) == 0) {
-   (void) nvpair_value_uint64(elem, >zrp_txg);
-   } else if (strcmp(nm, ZPOOL_REWIND_META_THRESH) == 0) {
-   (void) nvpair_value_uint64(elem, >zrp_maxmeta);
-   } else if (strcmp(nm, ZPOOL_REWIND_DATA_THRESH) == 0) {
-   (void) nvpair_value_uint64(elem, >zrp_maxdata);
+   } else if (strcmp(nm, ZPOOL_LOAD_REWIND_POLICY) == 0) {
+   if (nvpair_value_uint32(elem, >zlp_rewind) == 0)
+   if (zlpp->zlp_rewind & ~ZPOOL_REWIND_POLICIES)
+   zlpp->zlp_rewind = ZPOOL_NO_REWIND;
+   } else if (strcmp(nm, ZPOOL_LOAD_REQUEST_TXG) == 0) {
+   (void) nvpair_value_uint64(elem, >zlp_txg);
+   } else if (strcmp(nm, ZPOOL_LOAD_META_THRESH) == 0) {
+   (void) nvpair_value_uint64(elem, >zlp_maxmeta);
+   } else if (strcmp(nm, ZPOOL_LOAD_DATA_THRESH) == 0) {
+   (void) nvpair_value_uint64(elem, >zlp_maxdata);
}
}
-   if (zrpp->zrp_request == 0)
-   zrpp->zrp_request = ZPOOL_NO_REWIND;
+   if (zlpp->zlp_rewind == 0)
+   zlpp->zlp_rewind = 

svn commit: r331705 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2018-03-28 Thread Alexander Motin
Author: mav
Date: Wed Mar 28 22:10:06 2018
New Revision: 331705
URL: https://svnweb.freebsd.org/changeset/base/331705

Log:
  MFV 331704:
  9191 dump vdev tree to zfs_dbgmsg when spa load fails due to missing log 
devices
  
  illumos/illumos-gate@ccef24b493bcbd146fcd6d894cae081470b6
  
  Reviewed by: George Wilson 
  Reviewed by: Prakash Surya 
  Reviewed by: Matt Ahrens 
  Approved by: Robert Mustacchi 
  Author: Pavel Zakharov 

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
Directory Properties:
  head/sys/cddl/contrib/opensolaris/   (props changed)

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c   Wed Mar 28 
22:08:57 2018(r331704)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c   Wed Mar 28 
22:10:06 2018(r331705)
@@ -1887,6 +1887,7 @@ spa_check_for_missing_logs(spa_t *spa)
 
if (idx > 0) {
spa_load_failed(spa, "some log devices are missing");
+   vdev_dbgmsg_print_tree(rvd, 2);
return (SET_ERROR(ENXIO));
}
} else {
@@ -1898,6 +1899,7 @@ spa_check_for_missing_logs(spa_t *spa)
spa_set_log_state(spa, SPA_LOG_CLEAR);
spa_load_note(spa, "some log devices are "
"missing, ZIL is dropped.");
+   vdev_dbgmsg_print_tree(rvd, 2);
break;
}
}
___
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-unsubscr...@freebsd.org"


svn commit: r331703 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2018-03-28 Thread Alexander Motin
Author: mav
Date: Wed Mar 28 22:07:31 2018
New Revision: 331703
URL: https://svnweb.freebsd.org/changeset/base/331703

Log:
  MFV 331702:
  9187 racing condition between vdev label and spa_last_synced_txg in 
vdev_validate
  
  illumos/illumos-gate@d1de72cfa29ab77ff80e2bb0e668a6afa5bccaf0
  
  ztest failed with uncorrectable IO error despite having the fix for #7163.
  Both sides of the mirror have CANT_OPEN_BAD_LABEL, which also distinguishes
  it from that issue.
  
  Definitely seems like a racing condition between the vdev_validate and 
spa_sync:
  1. Thread A (spa_sync): vdev label is updated to latest txg
  2. Thread B (vdev_validate): vdev label's txg is compared to 
spa_last_synced_txg and is ahead.
  3. Thread A (spa_sync): spa_last_synced_txg is updated to latest txg.
  
  Solution: do not check txg in vdev_validate unless config lock is held.
  
  Reviewed by: George Wilson 
  Reviewed by: Matt Ahrens 
  Approved by: Robert Mustacchi 
  Author: Pavel Zakharov 

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
Directory Properties:
  head/sys/cddl/contrib/opensolaris/   (props changed)

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c  Wed Mar 28 
22:06:12 2018(r331702)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c  Wed Mar 28 
22:07:31 2018(r331703)
@@ -1696,8 +1696,11 @@ vdev_validate(vdev_t *vd)
/*
 * If we are performing an extreme rewind, we allow for a label that
 * was modified at a point after the current txg.
+* If config lock is not held do not check for the txg. spa_sync could
+* be updating the vdev's label before updating spa_last_synced_txg.
 */
-   if (spa->spa_extreme_rewind || spa_last_synced_txg(spa) == 0)
+   if (spa->spa_extreme_rewind || spa_last_synced_txg(spa) == 0 ||
+   spa_config_held(spa, SCL_CONFIG, RW_WRITER) != SCL_CONFIG)
txg = UINT64_MAX;
else
txg = spa_last_synced_txg(spa);
___
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-unsubscr...@freebsd.org"


svn commit: r331704 - vendor-sys/illumos/dist/uts/common/fs/zfs

2018-03-28 Thread Alexander Motin
Author: mav
Date: Wed Mar 28 22:08:57 2018
New Revision: 331704
URL: https://svnweb.freebsd.org/changeset/base/331704

Log:
  9191 dump vdev tree to zfs_dbgmsg when spa load fails due to missing log 
devices
  
  illumos/illumos-gate@ccef24b493bcbd146fcd6d894cae081470b6
  
  Reviewed by: George Wilson 
  Reviewed by: Prakash Surya 
  Reviewed by: Matt Ahrens 
  Approved by: Robert Mustacchi 
  Author: Pavel Zakharov 

Modified:
  vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c

Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c
==
--- vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c Wed Mar 28 22:07:31 
2018(r331703)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c Wed Mar 28 22:08:57 
2018(r331704)
@@ -1814,6 +1814,7 @@ spa_check_for_missing_logs(spa_t *spa)
 
if (idx > 0) {
spa_load_failed(spa, "some log devices are missing");
+   vdev_dbgmsg_print_tree(rvd, 2);
return (SET_ERROR(ENXIO));
}
} else {
@@ -1825,6 +1826,7 @@ spa_check_for_missing_logs(spa_t *spa)
spa_set_log_state(spa, SPA_LOG_CLEAR);
spa_load_note(spa, "some log devices are "
"missing, ZIL is dropped.");
+   vdev_dbgmsg_print_tree(rvd, 2);
break;
}
}
___
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-unsubscr...@freebsd.org"


svn commit: r331702 - vendor-sys/illumos/dist/uts/common/fs/zfs

2018-03-28 Thread Alexander Motin
Author: mav
Date: Wed Mar 28 22:06:12 2018
New Revision: 331702
URL: https://svnweb.freebsd.org/changeset/base/331702

Log:
  9187 racing condition between vdev label and spa_last_synced_txg in 
vdev_validate
  
  illumos/illumos-gate@d1de72cfa29ab77ff80e2bb0e668a6afa5bccaf0
  
  ztest failed with uncorrectable IO error despite having the fix for #7163.
  Both sides of the mirror have CANT_OPEN_BAD_LABEL, which also distinguishes
  it from that issue.
  
  Definitely seems like a racing condition between the vdev_validate and 
spa_sync:
  1. Thread A (spa_sync): vdev label is updated to latest txg
  2. Thread B (vdev_validate): vdev label's txg is compared to 
spa_last_synced_txg and is ahead.
  3. Thread A (spa_sync): spa_last_synced_txg is updated to latest txg.
  
  Solution: do not check txg in vdev_validate unless config lock is held.
  
  Reviewed by: George Wilson 
  Reviewed by: Matt Ahrens 
  Approved by: Robert Mustacchi 
  Author: Pavel Zakharov 

Modified:
  vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c

Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c
==
--- vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.cWed Mar 28 22:01:27 
2018(r331701)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.cWed Mar 28 22:06:12 
2018(r331702)
@@ -1573,8 +1573,11 @@ vdev_validate(vdev_t *vd)
/*
 * If we are performing an extreme rewind, we allow for a label that
 * was modified at a point after the current txg.
+* If config lock is not held do not check for the txg. spa_sync could
+* be updating the vdev's label before updating spa_last_synced_txg.
 */
-   if (spa->spa_extreme_rewind || spa_last_synced_txg(spa) == 0)
+   if (spa->spa_extreme_rewind || spa_last_synced_txg(spa) == 0 ||
+   spa_config_held(spa, SCL_CONFIG, RW_WRITER) != SCL_CONFIG)
txg = UINT64_MAX;
else
txg = spa_last_synced_txg(spa);
___
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-unsubscr...@freebsd.org"


svn commit: r331701 - in head: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/cmd/ztest cddl/contrib/opensolaris/lib/libzfs/common cddl/contrib/opensol...

2018-03-28 Thread Alexander Motin
Author: mav
Date: Wed Mar 28 22:01:27 2018
New Revision: 331701
URL: https://svnweb.freebsd.org/changeset/base/331701

Log:
  MFV r331695, 331700: 9166 zfs storage pool checkpoint
  
  illumos/illumos-gate@8671400134a11c848244896ca51a7db4d0f69da4
  
  The idea of Storage Pool Checkpoint (aka zpool checkpoint) deals with
  exactly that.  It can be thought of as a “pool-wide snapshot” (or a
  variation of extreme rewind that doesn’t corrupt your data).  It remembers
  the entire state of the pool at the point that it was taken and the user
  can revert back to it later or discard it.  Its generic use case is an
  administrator that is about to perform a set of destructive actions to ZFS
  as part of a critical procedure.  She takes a checkpoint of the pool before
  performing the actions, then rewinds back to it if one of them fails or puts
  the pool into an unexpected state.  Otherwise, she discards it.  With the
  assumption that no one else is making modifications to ZFS, she basically
  wraps all these actions into a “high-level transaction”.
  
  Reviewed by: Matthew Ahrens 
  Reviewed by: John Kennedy 
  Reviewed by: Dan Kimmel 
  Approved by: Richard Lowe 
  Author: Serapheim Dimitropoulos 

Added:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_checkpoint.c
 - copied unchanged from r331700, 
vendor-sys/illumos/dist/uts/common/fs/zfs/spa_checkpoint.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_checkpoint.h
 - copied unchanged from r331700, 
vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa_checkpoint.h
Modified:
  head/cddl/contrib/opensolaris/cmd/zdb/zdb.8
  head/cddl/contrib/opensolaris/cmd/zdb/zdb.c
  head/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c
  head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7
  head/cddl/contrib/opensolaris/cmd/zpool/zpool.8
  head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
  head/cddl/contrib/opensolaris/cmd/ztest/ztest.c
  head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h
  head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c
  head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c
  head/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c
  head/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h
  head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c
  head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h
  head/sys/cddl/contrib/opensolaris/common/zfs/zpool_prop.c
  head/sys/cddl/contrib/opensolaris/uts/common/Makefile.files
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_synctask.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_userhold.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_synctask.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/range_tree.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/space_map.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/uberblock_impl.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_removal.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zthr.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/uberblock.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c
  

svn commit: r331700 - in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys

2018-03-28 Thread Alexander Motin
Author: mav
Date: Wed Mar 28 21:00:34 2018
New Revision: 331700
URL: https://svnweb.freebsd.org/changeset/base/331700

Log:
  Add files missed from r331695.

Added:
  vendor-sys/illumos/dist/uts/common/fs/zfs/spa_checkpoint.c   (contents, props 
changed)
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa_checkpoint.h   (contents, 
props changed)

Added: vendor-sys/illumos/dist/uts/common/fs/zfs/spa_checkpoint.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/spa_checkpoint.c  Wed Mar 28 
21:00:34 2018(r331700)
@@ -0,0 +1,623 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright (c) 2017 by Delphix. All rights reserved.
+ */
+
+/*
+ * Storage Pool Checkpoint
+ *
+ * A storage pool checkpoint can be thought of as a pool-wide snapshot or
+ * a stable version of extreme rewind that guarantees no blocks from the
+ * checkpointed state will have been overwritten. It remembers the entire
+ * state of the storage pool (e.g. snapshots, dataset names, etc..) from the
+ * point that it was taken and the user can rewind back to that point even if
+ * they applied destructive operations on their datasets or even enabled new
+ * zpool on-disk features. If a pool has a checkpoint that is no longer
+ * needed, the user can discard it.
+ *
+ * == On disk data structures used ==
+ *
+ * - The pool has a new feature flag and a new entry in the MOS. The feature
+ *   flag is set to active when we create the checkpoint and remains active
+ *   until the checkpoint is fully discarded. The entry in the MOS config
+ *   (DMU_POOL_ZPOOL_CHECKPOINT) is populated with the uberblock that
+ *   references the state of the pool when we take the checkpoint. The entry
+ *   remains populated until we start discarding the checkpoint or we rewind
+ *   back to it.
+ *
+ * - Each vdev contains a vdev-wide space map while the pool has a checkpoint,
+ *   which persists until the checkpoint is fully discarded. The space map
+ *   contains entries that have been freed in the current state of the pool
+ *   but we want to keep around in case we decide to rewind to the checkpoint.
+ *   [see vdev_checkpoint_sm]
+ *
+ * - Each metaslab's ms_sm space map behaves the same as without the
+ *   checkpoint, with the only exception being the scenario when we free
+ *   blocks that belong to the checkpoint. In this case, these blocks remain
+ *   ALLOCATED in the metaslab's space map and they are added as FREE in the
+ *   vdev's checkpoint space map.
+ *
+ * - Each uberblock has a field (ub_checkpoint_txg) which holds the txg that
+ *   the uberblock was checkpointed. For normal uberblocks this field is 0.
+ *
+ * == Overview of operations ==
+ *
+ * - To create a checkpoint, we first wait for the current TXG to be synced,
+ *   so we can use the most recently synced uberblock (spa_ubsync) as the
+ *   checkpointed uberblock. Then we use an early synctask to place that
+ *   uberblock in MOS config, increment the feature flag for the checkpoint
+ *   (marking it active), and setting spa_checkpoint_txg (see its use below)
+ *   to the TXG of the checkpointed uberblock. We use an early synctask for
+ *   the aforementioned operations to ensure that no blocks were dirtied
+ *   between the current TXG and the TXG of the checkpointed uberblock
+ *   (e.g the previous txg).
+ *
+ * - When a checkpoint exists, we need to ensure that the blocks that
+ *   belong to the checkpoint are freed but never reused. This means that
+ *   these blocks should never end up in the ms_allocatable or the ms_freeing
+ *   trees of a metaslab. Therefore, whenever there is a checkpoint the new
+ *   ms_checkpointing tree is used in addition to the aforementioned ones.
+ *
+ *   Whenever a block is freed and we find out that it is referenced by the
+ *   checkpoint (we find out by comparing its birth to spa_checkpoint_txg),
+ *   we place it in the ms_checkpointing tree instead of the ms_freeingtree.
+ *   This way, we divide the blocks that are being freed into checkpointed
+ *   and not-checkpointed blocks.
+ *
+ *   In order to 

svn commit: r331699 - in head/cddl/contrib/opensolaris/cmd: zdb ztest

2018-03-28 Thread Alexander Motin
Author: mav
Date: Wed Mar 28 20:41:15 2018
New Revision: 331699
URL: https://svnweb.freebsd.org/changeset/base/331699

Log:
  Partial MFV r329753:
  8809 libzpool should leverage work done in libfakekernel
  
  illumos/illumos-gate@f06dce2c1f0f3af78581e7574f65bfba843ddb6e
  
  Reviewed by: Sebastien Roy 
  Reviewed by: Prakash Surya 
  Reviewed by: Gordon Ross 
  Approved by: Richard Lowe 
  Author: Andrew Stormont 
  
  We do not have libfakekernel, but need to reduce code divergence.

Modified:
  head/cddl/contrib/opensolaris/cmd/zdb/zdb.c
  head/cddl/contrib/opensolaris/cmd/ztest/ztest.c
Directory Properties:
  head/cddl/contrib/opensolaris/   (props changed)
  head/cddl/contrib/opensolaris/cmd/zdb/   (props changed)

Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c
==
--- head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Wed Mar 28 18:47:35 2018
(r331698)
+++ head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Wed Mar 28 20:41:15 2018
(r331699)
@@ -24,6 +24,7 @@
  * Copyright (c) 2011, 2017 by Delphix. All rights reserved.
  * Copyright (c) 2014 Integros [integros.com]
  * Copyright 2017 Nexenta Systems, Inc.
+ * Copyright 2017 RackTop Systems.
  */
 
 #include 
@@ -88,12 +89,14 @@ extern boolean_t zfs_recover;
 extern uint64_t zfs_arc_max, zfs_arc_meta_limit;
 extern int zfs_vdev_async_read_max_active;
 extern boolean_t spa_load_verify_dryrun;
+extern int aok;
 #else
 int reference_tracking_enable;
 boolean_t zfs_recover;
 uint64_t zfs_arc_max, zfs_arc_meta_limit;
 int zfs_vdev_async_read_max_active;
 boolean_t spa_load_verify_dryrun;
+int aok;
 #endif
 
 static const char cmdname[] = "zdb";

Modified: head/cddl/contrib/opensolaris/cmd/ztest/ztest.c
==
--- head/cddl/contrib/opensolaris/cmd/ztest/ztest.c Wed Mar 28 18:47:35 
2018(r331698)
+++ head/cddl/contrib/opensolaris/cmd/ztest/ztest.c Wed Mar 28 20:41:15 
2018(r331699)
@@ -26,6 +26,7 @@
  * Copyright (c) 2013 Steven Hartland. All rights reserved.
  * Copyright (c) 2014 Integros [integros.com]
  * Copyright 2017 Joyent, Inc.
+ * Copyright 2017 RackTop Systems.
  */
 
 /*
@@ -247,8 +248,8 @@ typedef enum {
 typedef struct rll {
void*rll_writer;
int rll_readers;
-   mutex_t rll_lock;
-   cond_t  rll_cv;
+   kmutex_trll_lock;
+   kcondvar_t  rll_cv;
 } rll_t;
 
 typedef struct rl {
@@ -282,11 +283,11 @@ typedef struct ztest_od {
 typedef struct ztest_ds {
ztest_shared_ds_t *zd_shared;
objset_t*zd_os;
-   rwlock_tzd_zilog_lock;
+   krwlock_t   zd_zilog_lock;
zilog_t *zd_zilog;
ztest_od_t  *zd_od; /* debugging aid */
charzd_name[ZFS_MAX_DATASET_NAME_LEN];
-   mutex_t zd_dirobj_lock;
+   kmutex_tzd_dirobj_lock;
rll_t   zd_object_lock[ZTEST_OBJECT_LOCKS];
rll_t   zd_range_lock[ZTEST_RANGE_LOCKS];
 } ztest_ds_t;
@@ -397,7 +398,7 @@ ztest_info_t ztest_info[] = {
  * The callbacks are ordered by txg number.
  */
 typedef struct ztest_cb_list {
-   mutex_t zcl_callbacks_lock;
+   kmutex_t zcl_callbacks_lock;
list_t  zcl_callbacks;
 } ztest_cb_list_t;
 
@@ -432,7 +433,7 @@ ztest_shared_t *ztest_shared;
 static spa_t *ztest_spa = NULL;
 static ztest_ds_t *ztest_ds;
 
-static mutex_t ztest_vdev_lock;
+static kmutex_t ztest_vdev_lock;
 
 /*
  * The ztest_name_lock protects the pool and dataset namespace used by
@@ -440,7 +441,7 @@ static mutex_t ztest_vdev_lock;
  * this lock as writer. Grabbing the lock as reader will ensure that the
  * namespace does not change while the lock is held.
  */
-static rwlock_t ztest_name_lock;
+static krwlock_t ztest_name_lock;
 
 static boolean_t ztest_dump_core = B_TRUE;
 static boolean_t ztest_exiting;
@@ -1096,8 +1097,8 @@ ztest_rll_init(rll_t *rll)
 {
rll->rll_writer = NULL;
rll->rll_readers = 0;
-   VERIFY(_mutex_init(>rll_lock, USYNC_THREAD, NULL) == 0);
-   VERIFY(cond_init(>rll_cv, USYNC_THREAD, NULL) == 0);
+   mutex_init(>rll_lock, NULL, USYNC_THREAD, NULL);
+   cv_init(>rll_cv, NULL, USYNC_THREAD, NULL);
 }
 
 static void
@@ -1105,32 +1106,32 @@ ztest_rll_destroy(rll_t *rll)
 {
ASSERT(rll->rll_writer == NULL);
ASSERT(rll->rll_readers == 0);
-   VERIFY(_mutex_destroy(>rll_lock) == 0);
-   VERIFY(cond_destroy(>rll_cv) == 0);
+   mutex_destroy(>rll_lock);
+   cv_destroy(>rll_cv);
 }
 
 static void
 ztest_rll_lock(rll_t *rll, rl_type_t type)
 {
-   VERIFY(mutex_lock(>rll_lock) == 0);
+   mutex_enter(>rll_lock);
 
if (type == RL_READER) {
while (rll->rll_writer != 

Re: svn commit: r331686 - head

2018-03-28 Thread Dimitry Andric
On 28 Mar 2018, at 18:51, John Baldwin  wrote:
> 
> Author: jhb
> Date: Wed Mar 28 16:51:05 2018
> New Revision: 331686
> URL: https://svnweb.freebsd.org/changeset/base/331686
> 
> Log:
>  Expand remaining instances of 'make kernel' to buildkernel + installkernel.
> 
>  The 'kernel' target is a bit more obscure compared to buildkernel and
>  installkernel.

The 'kernel' target doesn't seem that obscure to me, it is clearly
documented in build(7), right?  In my opinion, the main advantage of
separate build and install steps is that you can run the former as a
non-privileged user, while only having to run the latter as super-user.

-Dimitry



signature.asc
Description: Message signed with OpenPGP


svn commit: r331698 - in head/sys: amd64/include i386/include kern x86/x86 x86/xen

2018-03-28 Thread Jeff Roberson
Author: jeff
Date: Wed Mar 28 18:47:35 2018
New Revision: 331698
URL: https://svnweb.freebsd.org/changeset/base/331698

Log:
  Restore r331606 with a bugfix to setup cpuset_domain[] earlier on all
  platforms.  Original commit message as follows:
  
  Only use CPUs in the domain the device is attached to for default
  assignment.  Device drivers are able to override the default assignment
  if they bind directly.  There are severe performance penalties for
  handling interrupts on remote CPUs and this should only be done in
  very controlled circumstances.
  
  Reviewed by:jhb, kib
  Tested by:  pho
  Sponsored by:   Netflix, Dell/EMC Isilon
  Differential Revision:  https://reviews.freebsd.org/D14838

Modified:
  head/sys/amd64/include/intr_machdep.h
  head/sys/i386/include/intr_machdep.h
  head/sys/kern/kern_cpuset.c
  head/sys/x86/x86/intr_machdep.c
  head/sys/x86/x86/io_apic.c
  head/sys/x86/x86/msi.c
  head/sys/x86/x86/nexus.c
  head/sys/x86/xen/xen_intr.c

Modified: head/sys/amd64/include/intr_machdep.h
==
--- head/sys/amd64/include/intr_machdep.h   Wed Mar 28 18:43:06 2018
(r331697)
+++ head/sys/amd64/include/intr_machdep.h   Wed Mar 28 18:47:35 2018
(r331698)
@@ -132,6 +132,7 @@ struct intsrc {
u_long *is_straycount;
u_int is_index;
u_int is_handlers;
+   u_int is_domain;
u_int is_cpu;
 };
 
@@ -168,7 +169,7 @@ voidintr_add_cpu(u_int cpu);
 #endif
 intintr_add_handler(const char *name, int vector, driver_filter_t filter, 
 driver_intr_t handler, void *arg, enum intr_type 
flags, 
-void **cookiep);
+void **cookiep, int domain);
 #ifdef SMP
 intintr_bind(u_int vector, u_char cpu);
 #endif
@@ -176,7 +177,7 @@ int intr_config_intr(int vector, enum intr_trigger tri
 enum intr_polarity pol);
 intintr_describe(u_int vector, void *ih, const char *descr);
 void   intr_execute_handlers(struct intsrc *isrc, struct trapframe *frame);
-u_int  intr_next_cpu(void);
+u_int  intr_next_cpu(int domain);
 struct intsrc *intr_lookup_source(int vector);
 intintr_register_pic(struct pic *pic);
 intintr_register_source(struct intsrc *isrc);

Modified: head/sys/i386/include/intr_machdep.h
==
--- head/sys/i386/include/intr_machdep.hWed Mar 28 18:43:06 2018
(r331697)
+++ head/sys/i386/include/intr_machdep.hWed Mar 28 18:47:35 2018
(r331698)
@@ -132,6 +132,7 @@ struct intsrc {
u_long *is_straycount;
u_int is_index;
u_int is_handlers;
+   u_int is_domain;
u_int is_cpu;
 };
 
@@ -158,7 +159,8 @@ voidelcr_write_trigger(u_int irq, enum intr_trigger 
t
 void   intr_add_cpu(u_int cpu);
 #endif
 intintr_add_handler(const char *name, int vector, driver_filter_t filter,
-driver_intr_t handler, void *arg, enum intr_type flags, void **cookiep);
+driver_intr_t handler, void *arg, enum intr_type flags, void **cookiep,
+int domain);
 #ifdef SMP
 intintr_bind(u_int vector, u_char cpu);
 #endif
@@ -166,7 +168,7 @@ int intr_config_intr(int vector, enum intr_trigger tri
 enum intr_polarity pol);
 intintr_describe(u_int vector, void *ih, const char *descr);
 void   intr_execute_handlers(struct intsrc *isrc, struct trapframe *frame);
-u_int  intr_next_cpu(void);
+u_int  intr_next_cpu(int domain);
 struct intsrc *intr_lookup_source(int vector);
 intintr_register_pic(struct pic *pic);
 intintr_register_source(struct intsrc *isrc);

Modified: head/sys/kern/kern_cpuset.c
==
--- head/sys/kern/kern_cpuset.c Wed Mar 28 18:43:06 2018(r331697)
+++ head/sys/kern/kern_cpuset.c Wed Mar 28 18:47:35 2018(r331698)
@@ -1363,6 +1363,7 @@ cpuset_thread0(void)
 {
struct cpuset *set;
int error;
+   int i;
 
cpuset_zone = uma_zcreate("cpuset", sizeof(struct cpuset), NULL, NULL,
NULL, NULL, UMA_ALIGN_PTR, 0);
@@ -1374,11 +1375,11 @@ cpuset_thread0(void)
 * cpuset_create() due to NULL parent.
 */
set = uma_zalloc(cpuset_zone, M_WAITOK | M_ZERO);
-   CPU_FILL(>cs_mask);
+   CPU_COPY(_cpus, >cs_mask);
LIST_INIT(>cs_children);
LIST_INSERT_HEAD(_ids, set, cs_link);
set->cs_ref = 1;
-   set->cs_flags = CPU_SET_ROOT;
+   set->cs_flags = CPU_SET_ROOT | CPU_SET_RDONLY;
set->cs_domain = 
cpuset_zero = set;
cpuset_root = >cs_mask;
@@ -1396,6 +1397,16 @@ cpuset_thread0(void)
 */
cpuset_unr = new_unrhdr(2, INT_MAX, NULL);
 
+   /*
+* If MD code has not initialized per-domain cpusets, place all
+* CPUs in domain 0.
+*/
+   for (i = 0; i < MAXMEMDOM; i++)
+   if 

svn commit: r331697 - head/share/man/man7

2018-03-28 Thread Glen Barber
Author: gjb
Date: Wed Mar 28 18:43:06 2018
New Revision: 331697
URL: https://svnweb.freebsd.org/changeset/base/331697

Log:
  Add an example for building SD card images for the RPI-B and
  RPI3.
  
  MFC after:3 days
  Suggested by: Arshan Khanifar
  Reviewed by:  Arshan Khanifar 
  Sponsored by: The FreeBSD Foundation

Modified:
  head/share/man/man7/release.7

Modified: head/share/man/man7/release.7
==
--- head/share/man/man7/release.7   Wed Mar 28 18:28:27 2018
(r331696)
+++ head/share/man/man7/release.7   Wed Mar 28 18:43:06 2018
(r331697)
@@ -687,6 +687,23 @@ cd /usr/src/release
 sh release.sh -c $HOME/release.conf
 .Ed
 .Pp
+Configuration files specific to various supported embedded systems, such as
+the Raspberry Pi, exist in the directory corresponding to the
+.Va TARGET
+.Xr make 1
+variable.
+For example, to build an image for the Raspberry Pi:
+.Bd -literal -offset indent
+cd /usr/src/release
+sh release.sh -c arm/RPI-B.conf
+.Ed
+.Pp
+To build an image for the Raspberry Pi 3:
+.Bd -literal -offset indent
+cd /usr/src/release
+sh release.sh -c arm64/RPI3.conf
+.Ed
+.Pp
 After running these commands, all prepared release files are available in the
 .Pa /scratch
 directory.
___
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-unsubscr...@freebsd.org"


Re: svn commit: r330897 - in stable/11: bin/cat bin/chflags bin/chmod bin/cp bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/hostname bin/kill bin/ln bin/ls bin/mkdir bin/mv bin/pax bin/ps b

2018-03-28 Thread Oliver Pinter
On 3/28/18, Oliver Pinter  wrote:
> On 3/28/18, Oliver Pinter  wrote:
>> Hi!
>>
>> This part of the MFC is wrong:
>>
>> https://svnweb.freebsd.org/base/stable/11/sys/sys/random.h?limit_changes=0=330897=330896=330897
>>
>> Could you please MFC back the other random related changes too? Some
>> of them made by cem@.
>
> Namely these commits:
>
> commit b95744ba0ac2f46a95ecbe423a4d8dd7c9513da0
> Author: Oliver Pinter 
> Date:   Sun Oct 15 17:15:48 2017 +0200
>
> opBSD MFC r324394: random(4): Gather entropy from Pure sources
>
> At initialization, hc_source_mask only includes non-Pure sources.
>
> The patch changes source registration to enable the registered source in
> the
> hc_source_mask bitmask. This mask governs which sources are harvested.
>
> This patch also disallows userspace from disabling such sources.
>
> PR: 222807
> Submitted by:   W. Dean Freeman 
> Reviewed by:jmg (earlier version), delphij
> Approved by:secteam (delphij)
> Obtained from:  HBSD 0054e3e170e083811acc9f3b637f8be8a86c03e7
> Security:   yes
> Differential Revision:  https://reviews.freebsd.org/D12611
>
> (cherry picked from commit 1c36667f647c87c89227b495e8a79ff1d38a2d31)
>
> Author: cem 
> Original-commit-date: Sat Oct 7 19:02:03 2017 +
> svn-commit-id: /head/ r324394
> Signed-off-by: Oliver Pinter 
>
> commit 6c94c5ce8a5b3ed5dec3bb0437da293de1da22fc
> Author: Oliver Pinter 
> Date:   Sun Oct 15 17:15:43 2017 +0200
>
> opBSD MFC r324393: random(4): Add missing source descriptions
>
> Add source descriptions missed in r260847, r303035.
>
> While here, convert the array to C99 initializers.
>
> Reviewed by:delphij
> Approved by:secteam (delphij)
> Sponsored by:   Dell EMC Isilon
> Differential Revision:  https://reviews.freebsd.org/D12618
>
> (cherry picked from commit 25edb3fc554994c75b6282d88b1dd960fd476737)
>
> Adopted to 11-STABLE since arm/broadcom/bcm2835/bcm2835_rng.c
> does not exists here.
>
> Author: cem 
> Original-commit-date: Sat Oct 7 18:59:29 2017 +
> svn-commit-id: /head/ r324393
> Signed-off-by: Oliver Pinter 
>
> commit 28fc9178aca64f2fec46e2753187b35bcab8e962
> Author: Oliver Pinter 
> Date:   Sun Oct 15 17:15:37 2017 +0200
>
> opBSD MFC r324372: random(4): Discard low entropy inputs
>
> The later fields of the harvest_event structure are predictable and
> provide
> little value to the entropy pool.  Only feed in the relatively high
> entropy
> counter and explicit entropy buffer to increase measured input entropy.
>
> See also:
> https://people.freebsd.org/~jmg/vbsdcon_2017_ddfreebsdrng_slides.pdf
>
> PR: 222807
> Submitted by:   W. Dean Freeman 
> Reviewed by:jmg (earlier version), delphij
> Approved by:secteam (delphij)
> Obtained from:  HBSD 8d809124d563937edd84c9c9d5494406e359c55c
> Security:   no -- low entropy marginal input has no known
> negative affect on pool quality
> Differential Revision:  https://reviews.freebsd.org/D12610
>
> (cherry picked from commit 1d234c562d594d49fd330eef90cd1b8f0e73f8fa)
>
> Author: cem 
> Original-commit-date: Fri Oct 6 18:27:55 2017 +
> svn-commit-id: /head/ r324372
> Signed-off-by: Oliver Pinter 
>

Or please apply the attached patch.

>
>>
>> On 3/14/18, Eitan Adler  wrote:
>>> Author: eadler
>>> Date: Wed Mar 14 03:19:51 2018
>>> New Revision: 330897
>>> URL: https://svnweb.freebsd.org/changeset/base/330897
>>>
>
> [... trim ...]
>
From 38d9b670806c64c31f49f425707d59aad89b6246 Mon Sep 17 00:00:00 2001
From: Oliver Pinter 
Date: Wed, 28 Mar 2018 20:26:30 +0200
Subject: [PATCH] opBSD: revert misMFCd parts of sys/sys/random.h

Signed-off-by: Oliver Pinter 

diff --git a/sys/sys/random.h b/sys/sys/random.h
index 9e03e5ef6527..26764851d00c 100644
--- a/sys/sys/random.h
+++ b/sys/sys/random.h
@@ -60,9 +60,9 @@ read_random(void *a __unused, u_int b __unused)
 #endif
 
 /*
- * Note: if you add or remove members of random_entropy_source, remember to
- * also update the strings in the static array random_source_descr[] in
- * random_harvestq.c.
+ * Note: if you add or remove members of random_entropy_source, remember to 
also update the
+ * KASSERT regarding what valid members are in random_harvest_internal(), and 
remember the
+ * strings in the static array random_source_descr[] in random_harvestq.c.
  *
  * NOTE: complain loudly to markm@ or on the lists if this enum gets more than 
32
  * distinct values (0-31)! ENTROPYSOURCE may be == 32, 

svn commit: r331696 - head/share/man/man7

2018-03-28 Thread Glen Barber
Author: gjb
Date: Wed Mar 28 18:28:27 2018
New Revision: 331696
URL: https://svnweb.freebsd.org/changeset/base/331696

Log:
  Update the Release Engineering article URL to the modern version.
  
  MFC after:3 days
  Sponsored by: The FreeBSD Foundation

Modified:
  head/share/man/man7/release.7

Modified: head/share/man/man7/release.7
==
--- head/share/man/man7/release.7   Wed Mar 28 18:12:06 2018
(r331695)
+++ head/share/man/man7/release.7   Wed Mar 28 18:28:27 2018
(r331696)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd November 28, 2017
+.Dd March 28, 2018
 .Dt RELEASE 7
 .Os
 .Sh NAME
@@ -709,7 +709,7 @@ variable in
 .Xr sysctl 8
 .Rs
 .%T "FreeBSD Release Engineering"
-.%U https://www.FreeBSD.org/doc/en_US.ISO8859-1/articles/releng/
+.%U https://www.FreeBSD.org/doc/en_US.ISO8859-1/articles/freebsd-releng/
 .Re
 .Rs
 .%T "FreeBSD Developers' Handbook"
___
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-unsubscr...@freebsd.org"


Re: svn commit: r330897 - in stable/11: bin/cat bin/chflags bin/chmod bin/cp bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/hostname bin/kill bin/ln bin/ls bin/mkdir bin/mv bin/pax bin/ps b

2018-03-28 Thread Oliver Pinter
On 3/28/18, Oliver Pinter  wrote:
> Hi!
>
> This part of the MFC is wrong:
>
> https://svnweb.freebsd.org/base/stable/11/sys/sys/random.h?limit_changes=0=330897=330896=330897
>
> Could you please MFC back the other random related changes too? Some
> of them made by cem@.

Namely these commits:

commit b95744ba0ac2f46a95ecbe423a4d8dd7c9513da0
Author: Oliver Pinter 
Date:   Sun Oct 15 17:15:48 2017 +0200

opBSD MFC r324394: random(4): Gather entropy from Pure sources

At initialization, hc_source_mask only includes non-Pure sources.

The patch changes source registration to enable the registered source in the
hc_source_mask bitmask. This mask governs which sources are harvested.

This patch also disallows userspace from disabling such sources.

PR: 222807
Submitted by:   W. Dean Freeman 
Reviewed by:jmg (earlier version), delphij
Approved by:secteam (delphij)
Obtained from:  HBSD 0054e3e170e083811acc9f3b637f8be8a86c03e7
Security:   yes
Differential Revision:  https://reviews.freebsd.org/D12611

(cherry picked from commit 1c36667f647c87c89227b495e8a79ff1d38a2d31)

Author: cem 
Original-commit-date: Sat Oct 7 19:02:03 2017 +
svn-commit-id: /head/ r324394
Signed-off-by: Oliver Pinter 

commit 6c94c5ce8a5b3ed5dec3bb0437da293de1da22fc
Author: Oliver Pinter 
Date:   Sun Oct 15 17:15:43 2017 +0200

opBSD MFC r324393: random(4): Add missing source descriptions

Add source descriptions missed in r260847, r303035.

While here, convert the array to C99 initializers.

Reviewed by:delphij
Approved by:secteam (delphij)
Sponsored by:   Dell EMC Isilon
Differential Revision:  https://reviews.freebsd.org/D12618

(cherry picked from commit 25edb3fc554994c75b6282d88b1dd960fd476737)

Adopted to 11-STABLE since arm/broadcom/bcm2835/bcm2835_rng.c
does not exists here.

Author: cem 
Original-commit-date: Sat Oct 7 18:59:29 2017 +
svn-commit-id: /head/ r324393
Signed-off-by: Oliver Pinter 

commit 28fc9178aca64f2fec46e2753187b35bcab8e962
Author: Oliver Pinter 
Date:   Sun Oct 15 17:15:37 2017 +0200

opBSD MFC r324372: random(4): Discard low entropy inputs

The later fields of the harvest_event structure are predictable and provide
little value to the entropy pool.  Only feed in the relatively high entropy
counter and explicit entropy buffer to increase measured input entropy.

See also:
https://people.freebsd.org/~jmg/vbsdcon_2017_ddfreebsdrng_slides.pdf

PR: 222807
Submitted by:   W. Dean Freeman 
Reviewed by:jmg (earlier version), delphij
Approved by:secteam (delphij)
Obtained from:  HBSD 8d809124d563937edd84c9c9d5494406e359c55c
Security:   no -- low entropy marginal input has no known
negative affect on pool quality
Differential Revision:  https://reviews.freebsd.org/D12610

(cherry picked from commit 1d234c562d594d49fd330eef90cd1b8f0e73f8fa)

Author: cem 
Original-commit-date: Fri Oct 6 18:27:55 2017 +
svn-commit-id: /head/ r324372
Signed-off-by: Oliver Pinter 


>
> On 3/14/18, Eitan Adler  wrote:
>> Author: eadler
>> Date: Wed Mar 14 03:19:51 2018
>> New Revision: 330897
>> URL: https://svnweb.freebsd.org/changeset/base/330897
>>

[... trim ...]
___
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-unsubscr...@freebsd.org"


svn commit: r331695 - vendor-sys/illumos/dist/common/zfs vendor-sys/illumos/dist/uts/common vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor-sys/illumo...

2018-03-28 Thread Alexander Motin
Author: mav
Date: Wed Mar 28 18:12:06 2018
New Revision: 331695
URL: https://svnweb.freebsd.org/changeset/base/331695

Log:
  9166 zfs storage pool checkpoint
  
  illumos/illumos-gate@8671400134a11c848244896ca51a7db4d0f69da4
  
  The idea of Storage Pool Checkpoint (aka zpool checkpoint) deals with
  exactly that.  It can be thought of as a “pool-wide snapshot” (or a
  variation of extreme rewind that doesn’t corrupt your data).  It remembers
  the entire state of the pool at the point that it was taken and the user
  can revert back to it later or discard it.  Its generic use case is an
  administrator that is about to perform a set of destructive actions to ZFS
  as part of a critical procedure.  She takes a checkpoint of the pool before
  performing the actions, then rewinds back to it if one of them fails or puts
  the pool into an unexpected state.  Otherwise, she discards it.  With the
  assumption that no one else is making modifications to ZFS, she basically
  wraps all these actions into a “high-level transaction”.
  
  Reviewed by: Matthew Ahrens 
  Reviewed by: John Kennedy 
  Reviewed by: Dan Kimmel 
  Approved by: Richard Lowe 
  Author: Serapheim Dimitropoulos 

Modified:
  vendor/illumos/dist/cmd/zdb/zdb.c
  vendor/illumos/dist/cmd/zdb/zdb_il.c
  vendor/illumos/dist/cmd/zpool/zpool_main.c
  vendor/illumos/dist/cmd/ztest/ztest.c
  vendor/illumos/dist/lib/libzfs/common/libzfs.h
  vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c
  vendor/illumos/dist/lib/libzfs/common/libzfs_util.c
  vendor/illumos/dist/lib/libzfs_core/common/libzfs_core.c
  vendor/illumos/dist/lib/libzfs_core/common/libzfs_core.h
  vendor/illumos/dist/man/man1m/zdb.1m
  vendor/illumos/dist/man/man1m/zpool.1m
  vendor/illumos/dist/man/man5/zpool-features.5

Changes in other areas also in this revision:
Modified:
  vendor-sys/illumos/dist/common/zfs/zfeature_common.c
  vendor-sys/illumos/dist/common/zfs/zfeature_common.h
  vendor-sys/illumos/dist/common/zfs/zpool_prop.c
  vendor-sys/illumos/dist/uts/common/Makefile.files
  vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_traverse.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dnode.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dnode_sync.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_destroy.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dir.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_pool.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_synctask.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_userhold.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/metaslab.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/range_tree.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/spa_misc.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/space_map.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dir.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_pool.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_synctask.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/metaslab.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/metaslab_impl.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/range_tree.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa_impl.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/space_map.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/uberblock_impl.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/vdev.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/vdev_impl.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/vdev_removal.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zio.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zthr.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/uberblock.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_indirect.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_label.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_removal.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/zcp.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/zcp_synctask.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/zil.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/zthr.c
  vendor-sys/illumos/dist/uts/common/sys/fs/zfs.h

Modified: vendor/illumos/dist/cmd/zdb/zdb.c
==
--- vendor/illumos/dist/cmd/zdb/zdb.c   Wed Mar 28 17:54:34 2018
(r331694)
+++ vendor/illumos/dist/cmd/zdb/zdb.c   Wed Mar 28 18:12:06 2018
(r331695)
@@ -131,7 +131,7 @@ static void
 usage(void)
 {
(void) fprintf(stderr,
-   "Usage:\t%s 

svn commit: r331695 - vendor-sys/illumos/dist/common/zfs vendor-sys/illumos/dist/uts/common vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor-sys/illumo...

2018-03-28 Thread Alexander Motin
Author: mav
Date: Wed Mar 28 18:12:06 2018
New Revision: 331695
URL: https://svnweb.freebsd.org/changeset/base/331695

Log:
  9166 zfs storage pool checkpoint
  
  illumos/illumos-gate@8671400134a11c848244896ca51a7db4d0f69da4
  
  The idea of Storage Pool Checkpoint (aka zpool checkpoint) deals with
  exactly that.  It can be thought of as a “pool-wide snapshot” (or a
  variation of extreme rewind that doesn’t corrupt your data).  It remembers
  the entire state of the pool at the point that it was taken and the user
  can revert back to it later or discard it.  Its generic use case is an
  administrator that is about to perform a set of destructive actions to ZFS
  as part of a critical procedure.  She takes a checkpoint of the pool before
  performing the actions, then rewinds back to it if one of them fails or puts
  the pool into an unexpected state.  Otherwise, she discards it.  With the
  assumption that no one else is making modifications to ZFS, she basically
  wraps all these actions into a “high-level transaction”.
  
  Reviewed by: Matthew Ahrens 
  Reviewed by: John Kennedy 
  Reviewed by: Dan Kimmel 
  Approved by: Richard Lowe 
  Author: Serapheim Dimitropoulos 

Modified:
  vendor-sys/illumos/dist/common/zfs/zfeature_common.c
  vendor-sys/illumos/dist/common/zfs/zfeature_common.h
  vendor-sys/illumos/dist/common/zfs/zpool_prop.c
  vendor-sys/illumos/dist/uts/common/Makefile.files
  vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_traverse.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dnode.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dnode_sync.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_destroy.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dir.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_pool.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_synctask.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_userhold.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/metaslab.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/range_tree.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/spa_misc.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/space_map.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dir.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_pool.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_synctask.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/metaslab.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/metaslab_impl.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/range_tree.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa_impl.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/space_map.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/uberblock_impl.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/vdev.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/vdev_impl.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/vdev_removal.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zio.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zthr.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/uberblock.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_indirect.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_label.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_removal.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/zcp.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/zcp_synctask.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/zil.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/zthr.c
  vendor-sys/illumos/dist/uts/common/sys/fs/zfs.h

Changes in other areas also in this revision:
Modified:
  vendor/illumos/dist/cmd/zdb/zdb.c
  vendor/illumos/dist/cmd/zdb/zdb_il.c
  vendor/illumos/dist/cmd/zpool/zpool_main.c
  vendor/illumos/dist/cmd/ztest/ztest.c
  vendor/illumos/dist/lib/libzfs/common/libzfs.h
  vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c
  vendor/illumos/dist/lib/libzfs/common/libzfs_util.c
  vendor/illumos/dist/lib/libzfs_core/common/libzfs_core.c
  vendor/illumos/dist/lib/libzfs_core/common/libzfs_core.h
  vendor/illumos/dist/man/man1m/zdb.1m
  vendor/illumos/dist/man/man1m/zpool.1m
  vendor/illumos/dist/man/man5/zpool-features.5

Modified: vendor-sys/illumos/dist/common/zfs/zfeature_common.c
==
--- vendor-sys/illumos/dist/common/zfs/zfeature_common.cWed Mar 28 
17:54:34 2018(r331694)
+++ vendor-sys/illumos/dist/common/zfs/zfeature_common.cWed Mar 28 
18:12:06 2018(r331695)
@@ -20,7 +20,7 @@
  */
 
 /*
- * Copyright (c) 

svn commit: r331694 - head/sys/compat/linuxkpi/common/include/linux

2018-03-28 Thread Hans Petter Selasky
Author: hselasky
Date: Wed Mar 28 17:54:34 2018
New Revision: 331694
URL: https://svnweb.freebsd.org/changeset/base/331694

Log:
  Swap two instances of regular macros with function macros in the LinuxKPI,
  to narrow down the substitution scope.
  
  MFC after:1 week
  Sponsored by: Mellanox Technologies

Modified:
  head/sys/compat/linuxkpi/common/include/linux/pci.h

Modified: head/sys/compat/linuxkpi/common/include/linux/pci.h
==
--- head/sys/compat/linuxkpi/common/include/linux/pci.h Wed Mar 28 17:49:31 
2018(r331693)
+++ head/sys/compat/linuxkpi/common/include/linux/pci.h Wed Mar 28 17:54:34 
2018(r331694)
@@ -538,7 +538,9 @@ struct msix_entry {
  * NB: define added to prevent this definition of pci_enable_msix from
  * clashing with the native FreeBSD version.
  */
-#definepci_enable_msix linux_pci_enable_msix
+#definepci_enable_msix(...) \
+  linux_pci_enable_msix(__VA_ARGS__)
+
 static inline int
 pci_enable_msix(struct pci_dev *pdev, struct msix_entry *entries, int nreq)
 {
@@ -572,7 +574,9 @@ pci_enable_msix(struct pci_dev *pdev, struct msix_entr
return (0);
 }
 
-#definepci_enable_msix_range   linux_pci_enable_msix_range
+#definepci_enable_msix_range(...) \
+  linux_pci_enable_msix_range(__VA_ARGS__)
+
 static inline int
 pci_enable_msix_range(struct pci_dev *dev, struct msix_entry *entries,
 int minvec, int maxvec)
___
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-unsubscr...@freebsd.org"


svn commit: r331693 - stable/11/sys/netipsec

2018-03-28 Thread John Baldwin
Author: jhb
Date: Wed Mar 28 17:49:31 2018
New Revision: 331693
URL: https://svnweb.freebsd.org/changeset/base/331693

Log:
  MFC 331248: Set the proper vnet in IPsec callback functions.
  
  When using hardware crypto engines, the callback functions used to handle
  an IPsec packet after it has been encrypted or decrypted can be invoked
  asynchronously from a worker thread that is not associated with a vnet.
  Extend 'struct xform_data' to include a vnet pointer and save the current
  vnet in this new member when queueing crypto requests in IPsec.  In the
  IPsec callback routines, use the new member to set the current vnet while
  processing the modified packet.
  
  This fixes a panic when using hardware offload such as ccr(4) with IPsec
  after VIMAGE was enabled in GENERIC.
  
  Sponsored by: Chelsio Communications

Modified:
  stable/11/sys/netipsec/xform.h
  stable/11/sys/netipsec/xform_ah.c
  stable/11/sys/netipsec/xform_esp.c
  stable/11/sys/netipsec/xform_ipcomp.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/netipsec/xform.h
==
--- stable/11/sys/netipsec/xform.h  Wed Mar 28 17:39:23 2018
(r331692)
+++ stable/11/sys/netipsec/xform.h  Wed Mar 28 17:49:31 2018
(r331693)
@@ -76,6 +76,7 @@ struct xform_data {
int protoff;/* current protocol offset */
int skip;   /* data offset */
uint8_t nxt;/* next protocol, e.g. IPV4 */
+   struct vnet *vnet;
 };
 
 #defineXF_IP4  1   /* unused */

Modified: stable/11/sys/netipsec/xform_ah.c
==
--- stable/11/sys/netipsec/xform_ah.c   Wed Mar 28 17:39:23 2018
(r331692)
+++ stable/11/sys/netipsec/xform_ah.c   Wed Mar 28 17:49:31 2018
(r331693)
@@ -665,6 +665,7 @@ ah_input(struct mbuf *m, struct secasvar *sav, int ski
xd->protoff = protoff;
xd->skip = skip;
xd->cryptoid = cryptoid;
+   xd->vnet = curvnet;
return (crypto_dispatch(crp));
 bad:
m_freem(m);
@@ -694,6 +695,7 @@ ah_input_cb(struct cryptop *crp)
crd = crp->crp_desc;
m = (struct mbuf *) crp->crp_buf;
xd = (struct xform_data *) crp->crp_opaque;
+   CURVNET_SET(xd->vnet);
sav = xd->sav;
skip = xd->skip;
nxt = xd->nxt;
@@ -713,6 +715,7 @@ ah_input_cb(struct cryptop *crp)
if (ipsec_updateid(sav, >crp_sid, ) != 0)
crypto_freesession(cryptoid);
xd->cryptoid = crp->crp_sid;
+   CURVNET_RESTORE();
return (crypto_dispatch(crp));
}
AHSTAT_INC(ahs_noxform);
@@ -808,8 +811,10 @@ ah_input_cb(struct cryptop *crp)
panic("%s: Unexpected address family: %d saidx=%p", __func__,
saidx->dst.sa.sa_family, saidx);
}
+   CURVNET_RESTORE();
return error;
 bad:
+   CURVNET_RESTORE();
if (sav)
key_freesav();
if (m != NULL)
@@ -1041,6 +1046,7 @@ ah_output(struct mbuf *m, struct secpolicy *sp, struct
xd->skip = skip;
xd->idx = idx;
xd->cryptoid = cryptoid;
+   xd->vnet = curvnet;
 
return crypto_dispatch(crp);
 bad:
@@ -1068,6 +1074,7 @@ ah_output_cb(struct cryptop *crp)
 
m = (struct mbuf *) crp->crp_buf;
xd = (struct xform_data *) crp->crp_opaque;
+   CURVNET_SET(xd->vnet);
sp = xd->sp;
sav = xd->sav;
skip = xd->skip;
@@ -1082,6 +1089,7 @@ ah_output_cb(struct cryptop *crp)
if (ipsec_updateid(sav, >crp_sid, ) != 0)
crypto_freesession(cryptoid);
xd->cryptoid = crp->crp_sid;
+   CURVNET_RESTORE();
return (crypto_dispatch(crp));
}
AHSTAT_INC(ahs_noxform);
@@ -1123,8 +1131,10 @@ ah_output_cb(struct cryptop *crp)
 
/* NB: m is reclaimed by ipsec_process_done. */
error = ipsec_process_done(m, sp, sav, idx);
+   CURVNET_RESTORE();
return (error);
 bad:
+   CURVNET_RESTORE();
free(xd, M_XDATA);
crypto_freereq(crp);
key_freesav();

Modified: stable/11/sys/netipsec/xform_esp.c
==
--- stable/11/sys/netipsec/xform_esp.c  Wed Mar 28 17:39:23 2018
(r331692)
+++ stable/11/sys/netipsec/xform_esp.c  Wed Mar 28 17:49:31 2018
(r331693)
@@ -395,6 +395,7 @@ esp_input(struct mbuf *m, struct secasvar *sav, int sk
xd->protoff = protoff;
xd->skip = skip;
xd->cryptoid = cryptoid;
+   xd->vnet = curvnet;
 
/* Decryption descriptor */

svn commit: r331692 - head/sys/dev/usb/input

2018-03-28 Thread Hans Petter Selasky
Author: hselasky
Date: Wed Mar 28 17:39:23 2018
New Revision: 331692
URL: https://svnweb.freebsd.org/changeset/base/331692

Log:
  Fix for regression issue in USB keyboard driver after r304735.
  
  A series of zero delay callouts can happen causing high CPU usage of the
  timer subsystem when trying to repeat keys, because the time of the
  absolute timeout is not moving forward. The condition clears when all
  keys are released.
  
  Reported by:  Johannes Lundberg 
  Discussed with:   bde@
  PR:   226968
  MFC after:1 week
  Sponsored by: Mellanox Technologies

Modified:
  head/sys/dev/usb/input/ukbd.c

Modified: head/sys/dev/usb/input/ukbd.c
==
--- head/sys/dev/usb/input/ukbd.c   Wed Mar 28 17:19:04 2018
(r331691)
+++ head/sys/dev/usb/input/ukbd.c   Wed Mar 28 17:39:23 2018
(r331692)
@@ -386,10 +386,22 @@ ukbd_any_key_pressed(struct ukbd_softc *sc)
 static void
 ukbd_start_timer(struct ukbd_softc *sc)
 {
-   sbintime_t delay, prec;
+   sbintime_t delay, now, prec;
 
+   now = sbinuptime();
+
+   /* check if initial delay passed and fallback to key repeat delay */
+   if (sc->sc_delay == 0)
+   sc->sc_delay = sc->sc_kbd.kb_delay2;
+
+   /* compute timeout */
delay = SBT_1MS * sc->sc_delay;
sc->sc_co_basetime += delay;
+
+   /* check if we are running behind */
+   if (sc->sc_co_basetime < now)
+   sc->sc_co_basetime = now;
+
/* This is rarely called, so prefer precision to efficiency. */
prec = qmin(delay >> 7, SBT_1MS * 10);
usb_callout_reset_sbt(>sc_callout, sc->sc_co_basetime, prec,
@@ -510,7 +522,6 @@ ukbd_get_key(struct ukbd_softc *sc, uint8_t wait)
 static void
 ukbd_interrupt(struct ukbd_softc *sc)
 {
-   struct timeval ctv;
uint32_t n_mod;
uint32_t o_mod;
uint32_t now = sc->sc_time_ms;
@@ -580,14 +591,11 @@ rfound:   ;
break;
}
}
-   if (j < UKBD_NKEYCODE) {
-   /* Old key repeating. */
-   sc->sc_delay = sc->sc_kbd.kb_delay2;
-   } else {
-   /* New key. */
-   microuptime();
-   sc->sc_co_basetime = tvtosbt(ctv);
+   if (j == UKBD_NKEYCODE) {
+   /* New key - set initial delay and [re]start timer */
+   sc->sc_co_basetime = sbinuptime();
sc->sc_delay = sc->sc_kbd.kb_delay1;
+   ukbd_start_timer(sc);
}
ukbd_put_key(sc, key | KEY_PRESS);
 
@@ -837,10 +845,6 @@ ukbd_intr_callback(struct usb_xfer *xfer, usb_error_t 
}
 
ukbd_interrupt(sc);
-
-   if (ukbd_any_key_pressed(sc) != 0) {
-   ukbd_start_timer(sc);
-   }
 
case USB_ST_SETUP:
 tr_setup:
___
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-unsubscr...@freebsd.org"


svn commit: r331691 - stable/11/sys/tools

2018-03-28 Thread Ed Maste
Author: emaste
Date: Wed Mar 28 17:19:04 2018
New Revision: 331691
URL: https://svnweb.freebsd.org/changeset/base/331691

Log:
  MFC r326992: embed_mfs: support embedding mfs into loader
  
  The script originally supported embedding an mfs into ELF files or any
  other type of file, because it searched for magic strings to mark the
  beginning and end of the embeddable section. It was later modified to
  read the section offset and length via readelf, which made it work for
  ELF only. Restore the ability to update arbitrary file types by using
  the readelf technique for ELF, and the magic string technique for all
  others (including PE/COFF files like loader.efi).
  
  Submitted by: Zakary Nafziger 
  
  MFC r327526: embed_mfs: correctly test grep return value
  
  Reported by:  br
  
  MFC r327527: ath: revert accidental change committed with r327526
  
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/11/sys/tools/embed_mfs.sh
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/tools/embed_mfs.sh
==
--- stable/11/sys/tools/embed_mfs.shWed Mar 28 17:16:16 2018
(r331690)
+++ stable/11/sys/tools/embed_mfs.shWed Mar 28 17:19:04 2018
(r331691)
@@ -25,10 +25,10 @@
 #
 # $FreeBSD$ 
 #
-# Embed the MFS image into the kernel body (expects space reserved via 
-# MD_ROOT_SIZE)
+# Embed an MFS image into the kernel body or the loader body (expects space
+# reserved via MD_ROOT_SIZE (kernel) or MD_IMAGE_SIZE (loader))
 #
-# $1: kernel filename
+# $1: kernel or loader filename
 # $2: MFS image filename
 #
 
@@ -45,16 +45,39 @@ mfs_size=`stat -f '%z' $2 2> /dev/null`
 # If we can't determine MFS image size - bail.
 [ -z ${mfs_size} ] && echo "Can't determine MFS image size" && exit 1
 
-sec_info=`elfdump -c $1 2> /dev/null | grep -A 5 -E "sh_name: oldmfs$"`
-# If we can't find the mfs section within the given kernel - bail.
-[ -z "${sec_info}" ] && echo "Can't locate mfs section within $1" && exit 1
+err_no_mfs="Can't locate mfs section within "
 
-sec_size=`echo "${sec_info}" | awk '/sh_size/ {print $2}' 2> /dev/null`
-sec_start=`echo "${sec_info}" | awk '/sh_offset/ {print $2}' 2> /dev/null`
+if file -b $1 | grep -q '^ELF ..-bit .SB executable'; then
 
+   sec_info=`elfdump -c $1 2> /dev/null | grep -A 5 -E "sh_name: oldmfs$"`
+   # If we can't find the mfs section within the given kernel - bail.
+   [ -z "${sec_info}" ] && echo "${err_no_mfs} $1" && exit 1
+
+   sec_size=`echo "${sec_info}" | awk '/sh_size/ {print $2}' 2>/dev/null`
+   sec_start=`echo "${sec_info}" | \
+   awk '/sh_offset/ {print $2}' 2>/dev/null`
+
+else
+
+   #try to find start byte of MFS start flag otherwise - bail.
+   sec_start=`strings -at d $1 | grep "MFS Filesystem goes here"` || \
+   { echo "${err_no_mfs} $1"; exit 1; }
+   sec_start=`echo ${sec_start} | awk '{print $1}'`
+
+   #try to find start byte of MFS end flag otherwise - bail.
+   sec_end=`strings -at d $1 | \
+   grep "MFS Filesystem had better STOP here"` || \
+   { echo "${err_no_mfs} $1"; exit 1; }
+   sec_end=`echo ${sec_end} | awk '{print $1}'`
+
+   #calculate MFS section size
+   sec_size=`expr ${sec_end} - ${sec_start}`
+
+fi
+
 # If the mfs section size is smaller than the mfs image - bail.
 [ ${sec_size} -lt ${mfs_size} ] && echo "MFS image too large" && exit 1
 
 # Dump the mfs image into the mfs section
 dd if=$2 ibs=8192 of=$1 obs=${sec_start} oseek=1 conv=notrunc 2> /dev/null && \
-echo "MFS image embedded into kernel" && exit 0
+echo "MFS image embedded into $1" && exit 0
___
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-unsubscr...@freebsd.org"


svn commit: r331690 - stable/11/sys/tools

2018-03-28 Thread Ed Maste
Author: emaste
Date: Wed Mar 28 17:16:16 2018
New Revision: 331690
URL: https://svnweb.freebsd.org/changeset/base/331690

Log:
  MFC r324707: embed_mfs: add error handling, usage
  
  Ensure that we are called with two arguments, and that the output file
  is writable. Also, if we cannot find the mfs section report the output
  file name rather than "kernel", as this script may be used with other
  than kernels.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/11/sys/tools/embed_mfs.sh
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/tools/embed_mfs.sh
==
--- stable/11/sys/tools/embed_mfs.shWed Mar 28 16:58:24 2018
(r331689)
+++ stable/11/sys/tools/embed_mfs.shWed Mar 28 17:16:16 2018
(r331690)
@@ -32,13 +32,22 @@
 # $2: MFS image filename
 #
 
+if [ $# -ne 2 ]; then
+   echo "usage: $(basename $0) target mfs_image"
+   exit 0
+fi
+if [ ! -w "$1" ]; then
+   echo $1 not writable
+   exit 1
+fi
+
 mfs_size=`stat -f '%z' $2 2> /dev/null`
 # If we can't determine MFS image size - bail.
 [ -z ${mfs_size} ] && echo "Can't determine MFS image size" && exit 1
 
 sec_info=`elfdump -c $1 2> /dev/null | grep -A 5 -E "sh_name: oldmfs$"`
 # If we can't find the mfs section within the given kernel - bail.
-[ -z "${sec_info}" ] && echo "Can't locate mfs section within kernel" && exit 1
+[ -z "${sec_info}" ] && echo "Can't locate mfs section within $1" && exit 1
 
 sec_size=`echo "${sec_info}" | awk '/sh_size/ {print $2}' 2> /dev/null`
 sec_start=`echo "${sec_info}" | awk '/sh_offset/ {print $2}' 2> /dev/null`
___
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-unsubscr...@freebsd.org"


svn commit: r331689 - in stable/11: contrib/binutils/ld/emulparams sys/conf

2018-03-28 Thread Ed Maste
Author: emaste
Date: Wed Mar 28 16:58:24 2018
New Revision: 331689
URL: https://svnweb.freebsd.org/changeset/base/331689

Log:
  MFC r315522: use INT3 instead of NOP for x86 binary padding
  
  We should never end up executing the inter-function padding, so we
  are better off faulting than silently carrying on to whatever function
  happens to be next.
  
  Note that LLD does this by default.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/11/contrib/binutils/ld/emulparams/elf_i386.sh
  stable/11/contrib/binutils/ld/emulparams/elf_x86_64.sh
  stable/11/sys/conf/ldscript.amd64
  stable/11/sys/conf/ldscript.i386
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/contrib/binutils/ld/emulparams/elf_i386.sh
==
--- stable/11/contrib/binutils/ld/emulparams/elf_i386.shWed Mar 28 
16:55:45 2018(r331688)
+++ stable/11/contrib/binutils/ld/emulparams/elf_i386.shWed Mar 28 
16:58:24 2018(r331689)
@@ -6,7 +6,7 @@ COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
 NONPAGED_TEXT_START_ADDR=0x08048000
 ARCH=i386
 MACHINE=
-NOP=0x90909090
+NOP=0x
 TEMPLATE_NAME=elf32
 GENERATE_SHLIB_SCRIPT=yes
 GENERATE_PIE_SCRIPT=yes

Modified: stable/11/contrib/binutils/ld/emulparams/elf_x86_64.sh
==
--- stable/11/contrib/binutils/ld/emulparams/elf_x86_64.sh  Wed Mar 28 
16:55:45 2018(r331688)
+++ stable/11/contrib/binutils/ld/emulparams/elf_x86_64.sh  Wed Mar 28 
16:58:24 2018(r331689)
@@ -7,7 +7,7 @@ COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
 NONPAGED_TEXT_START_ADDR=0x40
 ARCH="i386:x86-64"
 MACHINE=
-NOP=0x90909090
+NOP=0x
 TEMPLATE_NAME=elf32
 GENERATE_SHLIB_SCRIPT=yes
 GENERATE_PIE_SCRIPT=yes

Modified: stable/11/sys/conf/ldscript.amd64
==
--- stable/11/sys/conf/ldscript.amd64   Wed Mar 28 16:55:45 2018
(r331688)
+++ stable/11/sys/conf/ldscript.amd64   Wed Mar 28 16:58:24 2018
(r331689)
@@ -56,7 +56,7 @@ SECTIONS
   .init   :
   {
 KEEP (*(.init))
-  } =0x90909090
+  } =0x
   .plt: { *(.plt) }
   .text   :
   {
@@ -64,11 +64,11 @@ SECTIONS
 KEEP (*(.text.*personality*))
 /* .gnu.warning sections are handled specially by elf32.em.  */
 *(.gnu.warning)
-  } =0x90909090
+  } =0x
   .fini   :
   {
 KEEP (*(.fini))
-  } =0x90909090
+  } =0x
   PROVIDE (__etext = .);
   PROVIDE (_etext = .);
   PROVIDE (etext = .);

Modified: stable/11/sys/conf/ldscript.i386
==
--- stable/11/sys/conf/ldscript.i386Wed Mar 28 16:55:45 2018
(r331688)
+++ stable/11/sys/conf/ldscript.i386Wed Mar 28 16:58:24 2018
(r331689)
@@ -44,7 +44,7 @@ SECTIONS
   .init   :
   {
 KEEP (*(.init))
-  } =0x90909090
+  } =0x
   .plt: { *(.plt) }
   .text   :
   {
@@ -52,11 +52,11 @@ SECTIONS
 KEEP (*(.text.*personality*))
 /* .gnu.warning sections are handled specially by elf32.em.  */
 *(.gnu.warning)
-  } =0x90909090
+  } =0x
   .fini   :
   {
 KEEP (*(.fini))
-  } =0x90909090
+  } =0x
   PROVIDE (__etext = .);
   PROVIDE (_etext = .);
   PROVIDE (etext = .);
___
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-unsubscr...@freebsd.org"


svn commit: r331688 - stable/11/lib/libc/sys

2018-03-28 Thread Ed Maste
Author: emaste
Date: Wed Mar 28 16:55:45 2018
New Revision: 331688
URL: https://svnweb.freebsd.org/changeset/base/331688

Log:
  MFC r323623: rename(2): document capability mode errors
  
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/11/lib/libc/sys/rename.2
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/lib/libc/sys/rename.2
==
--- stable/11/lib/libc/sys/rename.2 Wed Mar 28 16:54:15 2018
(r331687)
+++ stable/11/lib/libc/sys/rename.2 Wed Mar 28 16:55:45 2018
(r331688)
@@ -28,7 +28,7 @@
 .\" @(#)rename.2   8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd April 10, 2008
+.Dd September 15, 2017
 .Dt RENAME 2
 .Os
 .Sh NAME
@@ -252,6 +252,9 @@ The
 .Fa to
 argument
 is a directory and is not empty.
+.It Bq Er ECAPMODE
+.Fn rename
+was called and the process is in capability mode.
 .El
 .Pp
 In addition to the errors returned by the
@@ -288,6 +291,26 @@ argument is not an absolute path and
 is neither
 .Dv AT_FDCWD
 nor a file descriptor associated with a directory.
+.It Bq Er ECAPMODE
+.Dv AT_FDCWD
+is specified and the process is in capability mode.
+.It Bq Er ENOTCAPABLE
+.Fa path
+is an absolute path or contained a ".." component leading to a directory
+outside of the directory hierarchy specified by
+.Fa fromfd
+or
+.Fa tofd .
+.It Bq Er ENOTCAPABLE
+The
+.Fa fromfd
+file descriptor lacks the
+.Dv CAP_RENAMEAT_SOURCE
+right, or the
+.Fa tofd
+file descriptor lacks the
+.Dv CAP_RENAMEAT_TARGET
+right.
 .El
 .Sh SEE ALSO
 .Xr chflags 2 ,
___
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-unsubscr...@freebsd.org"


svn commit: r331687 - stable/11/lib/libc/sys

2018-03-28 Thread Ed Maste
Author: emaste
Date: Wed Mar 28 16:54:15 2018
New Revision: 331687
URL: https://svnweb.freebsd.org/changeset/base/331687

Log:
  MFC r325422: posix_fallocate.2: add an EINVAL errno case
  
  As of r325320 in HEAD posix_fallocate returns EINVAL on ZFS to indicate
  that the underlying filesystem does not support this operation, per
  POSIX.1-2008. Document this case in the man page.
  
  Note that r325320 has not yet been merged to stable/11, and may or may
  not be.  However, we should document that EINVAL may be returned if the
  filesystem does not support posix_fallocate (even if we don't actually
  do so in stable/11), as software should be prepared to handle that case.
  
  Discussed with:   avg
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/11/lib/libc/sys/posix_fallocate.2
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/lib/libc/sys/posix_fallocate.2
==
--- stable/11/lib/libc/sys/posix_fallocate.2Wed Mar 28 16:51:05 2018
(r331686)
+++ stable/11/lib/libc/sys/posix_fallocate.2Wed Mar 28 16:54:15 2018
(r331687)
@@ -28,7 +28,7 @@
 .\" @(#)open.2 8.2 (Berkeley) 11/16/93
 .\" $FreeBSD$
 .\"
-.Dd October 12, 2017
+.Dd November 4, 2017
 .Dt POSIX_FALLOCATE 2
 .Os
 .Sh NAME
@@ -106,9 +106,10 @@ A signal was caught during execution.
 .It Bq Er EINVAL
 The
 .Fa len
-argument was less than or equal to zero or the
+argument was less than or equal to zero, the
 .Fa offset
-argument was less than zero.
+argument was less than zero,
+or the operation is not supported by the file system.
 .It Bq Er EIO
 An I/O error occurred while reading from or writing to a file system.
 .It Bq Er ENODEV
___
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-unsubscr...@freebsd.org"


svn commit: r331686 - head

2018-03-28 Thread John Baldwin
Author: jhb
Date: Wed Mar 28 16:51:05 2018
New Revision: 331686
URL: https://svnweb.freebsd.org/changeset/base/331686

Log:
  Expand remaining instances of 'make kernel' to buildkernel + installkernel.
  
  The 'kernel' target is a bit more obscure compared to buildkernel and
  installkernel.  One instance was already expanded previously in r325097.

Modified:
  head/UPDATING

Modified: head/UPDATING
==
--- head/UPDATING   Wed Mar 28 16:48:26 2018(r331685)
+++ head/UPDATING   Wed Mar 28 16:51:05 2018(r331686)
@@ -624,7 +624,8 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW:
rebooting, e.g.:
 
make buildworld
-   make kernel KERNCONF=YOUR_KERNEL_HERE
+   make buildkernel KERNCONF=YOUR_KERNEL_HERE
+   make installkernel KERNCONF=YOUR_KERNEL_HERE
make -C sys/boot install

 
@@ -1995,7 +1996,8 @@ COMMON ITEMS:
--

make buildworld [9]
-   make kernel KERNCONF=YOUR_KERNEL_HERE   [8]
+   make buildkernel KERNCONF=YOUR_KERNEL_HERE  [8]
+   make installkernel KERNCONF=YOUR_KERNEL_HERE
[1]
 [3]
mergemaster -Fp [5]
___
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-unsubscr...@freebsd.org"


svn commit: r331685 - stable/11

2018-03-28 Thread Kyle Evans
Author: kevans
Date: Wed Mar 28 16:48:26 2018
New Revision: 331685
URL: https://svnweb.freebsd.org/changeset/base/331685

Log:
  Record-only MFC of r330252, r330253
  
  r330253 reverted r330252, which was committed with nothing but the message:
  "MFC After: 1 week"
  
  Go ahead and record the merge of both of them. r330254 was the follow-up
  commit with the same contents as r330252 but with an appropriate message. It
  will be MFC'd along with the introduction of the corresponding options as
  appropriate.

Modified:
Directory Properties:
  stable/11/   (props changed)
___
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-unsubscr...@freebsd.org"


svn commit: r331683 - in head: share/mk sys/conf

2018-03-28 Thread Bryan Drewery
Author: bdrewery
Date: Wed Mar 28 16:28:24 2018
New Revision: 331683
URL: https://svnweb.freebsd.org/changeset/base/331683

Log:
  Avoid looping if SYSDIR already known.
  
  Sponsored by: Dell EMC

Modified:
  head/share/mk/bsd.dtb.mk
  head/share/mk/bsd.kmod.mk
  head/sys/conf/kmod.mk

Modified: head/share/mk/bsd.dtb.mk
==
--- head/share/mk/bsd.dtb.mkWed Mar 28 16:28:20 2018(r331682)
+++ head/share/mk/bsd.dtb.mkWed Mar 28 16:28:24 2018(r331683)
@@ -2,12 +2,14 @@
 
 # Search for kernel source tree in standard places.
 .if empty(KERNBUILDDIR)
+.if !defined(SYSDIR)
 .for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. \
 ${.CURDIR}/../../../../.. /sys /usr/src/sys
-.if !defined(SYSDIR) && exists(${_dir}/kern/) && exists(${_dir}/conf/kmod.mk)
+.if exists(${_dir}/kern/) && exists(${_dir}/conf/kmod.mk)
 SYSDIR=${_dir}
 .endif
 .endfor
+.endif
 .if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) || \
 !exists(${SYSDIR}/conf/kmod.mk)
 .error Unable to locate the kernel source tree. Set SYSDIR to override.

Modified: head/share/mk/bsd.kmod.mk
==
--- head/share/mk/bsd.kmod.mk   Wed Mar 28 16:28:20 2018(r331682)
+++ head/share/mk/bsd.kmod.mk   Wed Mar 28 16:28:24 2018(r331683)
@@ -2,12 +2,14 @@
 
 # Search for kernel source tree in standard places.
 .if empty(KERNBUILDDIR)
+.if !defined(SYSDIR)
 .for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. \
 ${.CURDIR}/../../../../.. /sys /usr/src/sys
-.if !defined(SYSDIR) && exists(${_dir}/kern/) && exists(${_dir}/conf/kmod.mk)
+.if exists(${_dir}/kern/) && exists(${_dir}/conf/kmod.mk)
 SYSDIR=${_dir:tA}
 .endif
 .endfor
+.endif
 .if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) || \
 !exists(${SYSDIR}/conf/kmod.mk)
 .error Unable to locate the kernel source tree. Set SYSDIR to override.

Modified: head/sys/conf/kmod.mk
==
--- head/sys/conf/kmod.mk   Wed Mar 28 16:28:20 2018(r331682)
+++ head/sys/conf/kmod.mk   Wed Mar 28 16:28:24 2018(r331683)
@@ -82,11 +82,13 @@ OBJCOPY?=   objcopy
 
 # Search for kernel source tree in standard places.
 .if empty(KERNBUILDDIR)
+.if !defined(SYSDIR)
 .for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. /sys /usr/src/sys
-.if !defined(SYSDIR) && exists(${_dir}/kern/)
+.if exists(${_dir}/kern/)
 SYSDIR=${_dir:tA}
 .endif
 .endfor
+.endif
 .if !defined(SYSDIR) || !exists(${SYSDIR}/kern/)
 .error "can't find kernel source tree"
 .endif
___
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-unsubscr...@freebsd.org"


svn commit: r331682 - in head: share/mk sys/conf

2018-03-28 Thread Bryan Drewery
Author: bdrewery
Date: Wed Mar 28 16:28:20 2018
New Revision: 331682
URL: https://svnweb.freebsd.org/changeset/base/331682

Log:
  Avoid upwards directory walk in kernel build for finding known SYSDIR.
  
  Sponsored by: Dell EMC

Modified:
  head/share/mk/bsd.dtb.mk
  head/share/mk/bsd.kmod.mk
  head/sys/conf/kmod.mk

Modified: head/share/mk/bsd.dtb.mk
==
--- head/share/mk/bsd.dtb.mkWed Mar 28 16:24:56 2018(r331681)
+++ head/share/mk/bsd.dtb.mkWed Mar 28 16:28:20 2018(r331682)
@@ -1,6 +1,7 @@
 # $FreeBSD$
 
 # Search for kernel source tree in standard places.
+.if empty(KERNBUILDDIR)
 .for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. \
 ${.CURDIR}/../../../../.. /sys /usr/src/sys
 .if !defined(SYSDIR) && exists(${_dir}/kern/) && exists(${_dir}/conf/kmod.mk)
@@ -10,6 +11,7 @@ SYSDIR=   ${_dir}
 .if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) || \
 !exists(${SYSDIR}/conf/kmod.mk)
 .error Unable to locate the kernel source tree. Set SYSDIR to override.
+.endif
 .endif
 
 .include "${SYSDIR}/conf/dtb.mk"

Modified: head/share/mk/bsd.kmod.mk
==
--- head/share/mk/bsd.kmod.mk   Wed Mar 28 16:24:56 2018(r331681)
+++ head/share/mk/bsd.kmod.mk   Wed Mar 28 16:28:20 2018(r331682)
@@ -1,6 +1,7 @@
 # $FreeBSD$
 
 # Search for kernel source tree in standard places.
+.if empty(KERNBUILDDIR)
 .for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. \
 ${.CURDIR}/../../../../.. /sys /usr/src/sys
 .if !defined(SYSDIR) && exists(${_dir}/kern/) && exists(${_dir}/conf/kmod.mk)
@@ -10,6 +11,7 @@ SYSDIR=   ${_dir:tA}
 .if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) || \
 !exists(${SYSDIR}/conf/kmod.mk)
 .error Unable to locate the kernel source tree. Set SYSDIR to override.
+.endif
 .endif
 
 .include "${SYSDIR}/conf/kmod.mk"

Modified: head/sys/conf/kmod.mk
==
--- head/sys/conf/kmod.mk   Wed Mar 28 16:24:56 2018(r331681)
+++ head/sys/conf/kmod.mk   Wed Mar 28 16:28:20 2018(r331682)
@@ -81,6 +81,7 @@ OBJCOPY?= objcopy
 .include "config.mk"
 
 # Search for kernel source tree in standard places.
+.if empty(KERNBUILDDIR)
 .for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. /sys /usr/src/sys
 .if !defined(SYSDIR) && exists(${_dir}/kern/)
 SYSDIR=${_dir:tA}
@@ -88,6 +89,7 @@ SYSDIR=   ${_dir:tA}
 .endfor
 .if !defined(SYSDIR) || !exists(${SYSDIR}/kern/)
 .error "can't find kernel source tree"
+.endif
 .endif
 
 .SUFFIXES: .out .o .c .cc .cxx .C .y .l .s .S .m
___
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-unsubscr...@freebsd.org"


svn commit: r331681 - in head/sys: amd64/amd64 i386/i386

2018-03-28 Thread John Baldwin
Author: jhb
Date: Wed Mar 28 16:24:56 2018
New Revision: 331681
URL: https://svnweb.freebsd.org/changeset/base/331681

Log:
  Fix kernel builds without options DDB after r331650.
  
  Reported by:  cy

Modified:
  head/sys/amd64/amd64/machdep.c
  head/sys/i386/i386/machdep.c

Modified: head/sys/amd64/amd64/machdep.c
==
--- head/sys/amd64/amd64/machdep.c  Wed Mar 28 14:44:45 2018
(r331680)
+++ head/sys/amd64/amd64/machdep.c  Wed Mar 28 16:24:56 2018
(r331681)
@@ -127,6 +127,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #ifdef SMP
 #include 

Modified: head/sys/i386/i386/machdep.c
==
--- head/sys/i386/i386/machdep.cWed Mar 28 14:44:45 2018
(r331680)
+++ head/sys/i386/i386/machdep.cWed Mar 28 16:24:56 2018
(r331681)
@@ -129,6 +129,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #ifdef PERFMON
___
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-unsubscr...@freebsd.org"


Re: svn commit: r331606 - in head/sys: amd64/include i386/include x86/x86 x86/xen

2018-03-28 Thread John Baldwin
On Tuesday, March 27, 2018 11:07:22 AM Jeff Roberson wrote:
> On Tue, 27 Mar 2018, Li-Wen Hsu wrote:
> 
> > On Mon, Mar 26, 2018 at 20:35:12 -1000, Jeff Roberson wrote:
> >> The patch has been on my branch for weeks and has been tested by a half
> >> dozen people.  I'm sorry it does not work for you.  If you reverted 331605
> >> the change that followed should not have built properly.  Did you build
> >> cleanly?  Can you share your kernel config?
> >>
> >> I tried with and without EARLY_AP_STARTUP and with and without NUMA.  I'm
> >> not having any trouble booting.  Did you make cleandepend && make depend?
> >
> > It also hangs in our testing system:
> >
> > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/6817/console
> > https://ci.freebsd.org/job/FreeBSD-head-i386-test/1000/console
> >
> > It is built cleanly and uses unmodified GENERIC config.
> >
> > The artifacts used are available here:
> >
> > https://artifact.ci.freebsd.org/snapshot/head/r331606/amd64/amd64/
> > https://artifact.ci.freebsd.org/snapshot/head/r331606/i386/i386/
> >
> > Hope these information help.
> 
> Could someone who was experiencing the hang try the enclosed patch?  I can 
> only verify that it continues to boot for me but I believe this fixes the 
> bug on other systems.
> 
> I believe the issue was that cpuset_domain[0] was initialized too late on 
> some systems.  It depended on what kind of hardware was present and which 
> sysinit with SI_ORDER_ANY ran first.

Hmm, does this work if you don't use EARLY_AP_STARTUP?  I think all_cpus
isn't set yet (or only contains the BSP) when cpuset_thread0 is run if you
don't have EARLY_AP_STARTUP (and EARLY_AP_STARTUP is only supported on
x86 currently)

-- 
John Baldwin
___
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-unsubscr...@freebsd.org"


svn commit: r331680 - in stable/11/sys: compat/freebsd32 kern

2018-03-28 Thread Ed Maste
Author: emaste
Date: Wed Mar 28 14:44:45 2018
New Revision: 331680
URL: https://svnweb.freebsd.org/changeset/base/331680

Log:
  Regen *sysent.c after r331679 - posix_fallocate in capability mode
  
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/11/sys/compat/freebsd32/freebsd32_sysent.c
  stable/11/sys/kern/init_sysent.c

Modified: stable/11/sys/compat/freebsd32/freebsd32_sysent.c
==
--- stable/11/sys/compat/freebsd32/freebsd32_sysent.c   Wed Mar 28 14:39:56 
2018(r331679)
+++ stable/11/sys/compat/freebsd32/freebsd32_sysent.c   Wed Mar 28 14:44:45 
2018(r331680)
@@ -596,11 +596,11 @@ struct sysent freebsd32_sysent[] = {
{ AS(rctl_add_rule_args), (sy_call_t *)sys_rctl_add_rule, AUE_NULL, 
NULL, 0, 0, 0, SY_THR_STATIC }, /* 528 = rctl_add_rule */
{ AS(rctl_remove_rule_args), (sy_call_t *)sys_rctl_remove_rule, 
AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC },   /* 529 = rctl_remove_rule */
 #ifdef PAD64_REQUIRED
-   { AS(freebsd32_posix_fallocate_args), (sy_call_t 
*)freebsd32_posix_fallocate, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 530 = 
freebsd32_posix_fallocate */
+   { AS(freebsd32_posix_fallocate_args), (sy_call_t 
*)freebsd32_posix_fallocate, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, 
SY_THR_STATIC },/* 530 = freebsd32_posix_fallocate */
{ AS(freebsd32_posix_fadvise_args), (sy_call_t 
*)freebsd32_posix_fadvise, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 531 
= freebsd32_posix_fadvise */
{ AS(freebsd32_wait6_args), (sy_call_t *)freebsd32_wait6, AUE_WAIT6, 
NULL, 0, 0, 0, SY_THR_STATIC },/* 532 = freebsd32_wait6 */
 #else
-   { AS(freebsd32_posix_fallocate_args), (sy_call_t 
*)freebsd32_posix_fallocate, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 530 = 
freebsd32_posix_fallocate */
+   { AS(freebsd32_posix_fallocate_args), (sy_call_t 
*)freebsd32_posix_fallocate, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, 
SY_THR_STATIC },/* 530 = freebsd32_posix_fallocate */
{ AS(freebsd32_posix_fadvise_args), (sy_call_t 
*)freebsd32_posix_fadvise, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 531 
= freebsd32_posix_fadvise */
{ AS(freebsd32_wait6_args), (sy_call_t *)freebsd32_wait6, AUE_WAIT6, 
NULL, 0, 0, 0, SY_THR_STATIC },/* 532 = freebsd32_wait6 */
 #endif

Modified: stable/11/sys/kern/init_sysent.c
==
--- stable/11/sys/kern/init_sysent.cWed Mar 28 14:39:56 2018
(r331679)
+++ stable/11/sys/kern/init_sysent.cWed Mar 28 14:44:45 2018
(r331680)
@@ -575,7 +575,7 @@ struct sysent sysent[] = {
{ AS(rctl_get_limits_args), (sy_call_t *)sys_rctl_get_limits, AUE_NULL, 
NULL, 0, 0, 0, SY_THR_STATIC }, /* 527 = rctl_get_limits */
{ AS(rctl_add_rule_args), (sy_call_t *)sys_rctl_add_rule, AUE_NULL, 
NULL, 0, 0, 0, SY_THR_STATIC }, /* 528 = rctl_add_rule */
{ AS(rctl_remove_rule_args), (sy_call_t *)sys_rctl_remove_rule, 
AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC },   /* 529 = rctl_remove_rule */
-   { AS(posix_fallocate_args), (sy_call_t *)sys_posix_fallocate, AUE_NULL, 
NULL, 0, 0, 0, SY_THR_STATIC }, /* 530 = posix_fallocate */
+   { AS(posix_fallocate_args), (sy_call_t *)sys_posix_fallocate, AUE_NULL, 
NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },/* 530 = posix_fallocate */
{ AS(posix_fadvise_args), (sy_call_t *)sys_posix_fadvise, AUE_NULL, 
NULL, 0, 0, 0, SY_THR_STATIC }, /* 531 = posix_fadvise */
{ AS(wait6_args), (sy_call_t *)sys_wait6, AUE_WAIT6, NULL, 0, 0, 0, 
SY_THR_STATIC },/* 532 = wait6 */
{ AS(cap_rights_limit_args), (sy_call_t *)sys_cap_rights_limit, 
AUE_CAP_RIGHTS_LIMIT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },  /* 533 
= cap_rights_limit */
___
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-unsubscr...@freebsd.org"


svn commit: r331679 - in stable/11: lib/libc/sys sys/compat/freebsd32 sys/kern

2018-03-28 Thread Ed Maste
Author: emaste
Date: Wed Mar 28 14:39:56 2018
New Revision: 331679
URL: https://svnweb.freebsd.org/changeset/base/331679

Log:
  MFC r324560: allow posix_fallocate in capability mode
  
  posix_fallocate is logically equivalent to writing zero blocks to the
  desired file size and there is no reason to prevent calling it in
  capability mode. posix_fallocate already checked for the CAP_WRITE
  right, so we merely need to list it in capabilities.conf.
  
  Also MFC r324564: allow posix_fallocate in 32-bit compat capability mode
  
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/11/lib/libc/sys/posix_fallocate.2
  stable/11/sys/compat/freebsd32/capabilities.conf
  stable/11/sys/kern/capabilities.conf
  stable/11/sys/kern/vfs_syscalls.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/lib/libc/sys/posix_fallocate.2
==
--- stable/11/lib/libc/sys/posix_fallocate.2Wed Mar 28 14:35:24 2018
(r331678)
+++ stable/11/lib/libc/sys/posix_fallocate.2Wed Mar 28 14:39:56 2018
(r331679)
@@ -28,7 +28,7 @@
 .\" @(#)open.2 8.2 (Berkeley) 11/16/93
 .\" $FreeBSD$
 .\"
-.Dd January 23, 2014
+.Dd October 12, 2017
 .Dt POSIX_FALLOCATE 2
 .Os
 .Sh NAME
@@ -118,6 +118,10 @@ argument does not refer to a regular file.
 .It Bq Er ENOSPC
 There is insufficient free space remaining on the file system storage
 media.
+.It Bq Er ENOTCAPABLE
+The file descriptor
+.Fa fd
+has insufficient rights.
 .It Bq Er ESPIPE
 The
 .Fa fd

Modified: stable/11/sys/compat/freebsd32/capabilities.conf
==
--- stable/11/sys/compat/freebsd32/capabilities.confWed Mar 28 14:35:24 
2018(r331678)
+++ stable/11/sys/compat/freebsd32/capabilities.confWed Mar 28 14:39:56 
2018(r331679)
@@ -196,6 +196,7 @@ pdkill
 freebsd32_pipe
 pipe2
 poll
+freebsd32_posix_fallocate
 freebsd32_pread
 freebsd32_preadv
 profil

Modified: stable/11/sys/kern/capabilities.conf
==
--- stable/11/sys/kern/capabilities.confWed Mar 28 14:35:24 2018
(r331678)
+++ stable/11/sys/kern/capabilities.confWed Mar 28 14:39:56 2018
(r331679)
@@ -495,6 +495,7 @@ poll
 ##
 ## Allow I/O-related file descriptors, subject to capability rights.
 ##
+posix_fallocate
 pread
 preadv
 

Modified: stable/11/sys/kern/vfs_syscalls.c
==
--- stable/11/sys/kern/vfs_syscalls.c   Wed Mar 28 14:35:24 2018
(r331678)
+++ stable/11/sys/kern/vfs_syscalls.c   Wed Mar 28 14:39:56 2018
(r331679)
@@ -4163,7 +4163,7 @@ kern_posix_fallocate(struct thread *td, int fd, off_t 
/* Check for wrap. */
if (offset > OFF_MAX - len)
return (EFBIG);
-   error = fget(td, fd, cap_rights_init(, CAP_WRITE), );
+   error = fget(td, fd, cap_rights_init(, CAP_PWRITE), );
if (error != 0)
return (error);
if ((fp->f_ops->fo_flags & DFLAG_SEEKABLE) == 0) {
___
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-unsubscr...@freebsd.org"


svn commit: r331678 - stable/11/lib/libc/sys

2018-03-28 Thread Ed Maste
Author: emaste
Date: Wed Mar 28 14:35:24 2018
New Revision: 331678
URL: https://svnweb.freebsd.org/changeset/base/331678

Log:
  MFC Capsicum open(2) and openat(2) documentation
  
  r306537 by cem: open.2: Document Capsicum behavior
  
  Document open(2) and openat(2) behavior in Capsicum capability mode.
  
  Sponsored by: Dell EMC Isilon
  
  r323622 by emaste: open(2): update ENOTCAPABLE description for .. lookups
  
  After r308732 (MFC of r308212) Capsicum permits .. lookups in capability
  mode, as long as path component traversal does not escape the directory
  corresponding to the provided file descriptor.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/11/lib/libc/sys/open.2
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/lib/libc/sys/open.2
==
--- stable/11/lib/libc/sys/open.2   Wed Mar 28 14:33:35 2018
(r331677)
+++ stable/11/lib/libc/sys/open.2   Wed Mar 28 14:35:24 2018
(r331678)
@@ -28,7 +28,7 @@
 .\" @(#)open.2 8.2 (Berkeley) 11/16/93
 .\" $FreeBSD$
 .\"
-.Dd November 22, 2016
+.Dd March 28, 2018
 .Dt OPEN 2
 .Os
 .Sh NAME
@@ -95,6 +95,28 @@ parameter, the current working directory is used
 and the behavior is identical to a call to
 .Fn open .
 .Pp
+In
+.Xr capsicum 4
+capability mode,
+.Fn open
+is not permitted.
+The
+.Fa path
+argument to
+.Fn openat
+must be strictly relative to a file descriptor
+.Fa fd ,
+as defined in
+.Pa sys/kern/vfs_lookup.c .
+.Fa path
+must not be an absolute path and must not contain ".." components.
+Additionally, no symbolic link in
+.Fa path
+may contain ".." components either.
+.Fa fd
+must not be
+.Dv AT_FDCWD .
+.Pp
 The flags specified are formed by
 .Em or Ns 'ing
 the following values
@@ -457,6 +479,17 @@ nor a file descriptor associated with a directory.
 .It Bq Er ENOTDIR
 .Dv O_DIRECTORY
 is specified and the file is not a directory.
+.It Bq Er ECAPMODE
+.Dv AT_FDCWD
+is specified and the process is in capability mode.
+.It Bq Er ECAPMODE
+.Fn open
+was called and the process is in capability mode.
+.It Bq Er ENOTCAPABLE
+.Fa path
+is an absolute path or contained a ".." component leading to a
+directory outside of the directory hierarchy specified by
+.Fa fd .
 .El
 .Sh SEE ALSO
 .Xr chmod 2 ,
___
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-unsubscr...@freebsd.org"


Re: svn commit: r331551 - stable/11/cddl/contrib/opensolaris/lib/libdtrace/common

2018-03-28 Thread Mark Johnston
On Wed, Mar 28, 2018 at 02:00:39PM +, Antoine Brodin wrote:
> On Wed, Mar 28, 2018 at 1:40 PM, Mark Johnston  wrote:
> > On Wed, Mar 28, 2018 at 08:43:12AM +, Antoine Brodin wrote:
> >> On Mon, Mar 26, 2018 at 3:17 PM, Mark Johnston  wrote:
> >> > Author: markj
> >> > Date: Mon Mar 26 15:17:31 2018
> >> > New Revision: 331551
> >> > URL: https://svnweb.freebsd.org/changeset/base/331551
> >> >
> >> > Log:
> >> >   MFC r331222:
> >> >   Given hidden visibility to symbols referenced by the DOF section.
> >>
> >> Hi,
> >>
> >> This commit broke lang/perl* and lang/tcl* on stable/11.
> >> Please revert.
> >
> > Done. Can you confirm that the problem doesn't appear to affect
> > -CURRENT? I can't reproduce these build failures there.
> 
> Thanks.
> I didn't notice any new failure when it was committed in head.

I see now that the change shouldn't have been merged in the first place,
as it is a fixup for r313262, which is only in head. Sorry for the
breakage.
___
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-unsubscr...@freebsd.org"


svn commit: r331673 - stable/11/sys/net

2018-03-28 Thread Mark Johnston
Author: markj
Date: Wed Mar 28 14:01:26 2018
New Revision: 331673
URL: https://svnweb.freebsd.org/changeset/base/331673

Log:
  MFC r331538:
  Clamp IFLIB_RX_COPY_THRESH to MHLEN in iflib_rxd_pkt_get().

Modified:
  stable/11/sys/net/iflib.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/net/iflib.c
==
--- stable/11/sys/net/iflib.c   Wed Mar 28 14:00:46 2018(r331672)
+++ stable/11/sys/net/iflib.c   Wed Mar 28 14:01:26 2018(r331673)
@@ -2056,7 +2056,7 @@ iflib_rxd_pkt_get(iflib_rxq_t rxq, if_rxd_info_t ri)
 
/* should I merge this back in now that the two paths are basically 
duplicated? */
if (ri->iri_nfrags == 1 &&
-   ri->iri_frags[0].irf_len <= IFLIB_RX_COPY_THRESH) {
+   ri->iri_frags[0].irf_len <= MIN(IFLIB_RX_COPY_THRESH, MHLEN)) {
sd = rxd_frag_to_sd(rxq, >iri_frags[0], NULL, FALSE);
m = sd->ifsd_m;
sd->ifsd_m = NULL;
___
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-unsubscr...@freebsd.org"


svn commit: r331672 - stable/11/sys/kern

2018-03-28 Thread Mark Johnston
Author: markj
Date: Wed Mar 28 14:00:46 2018
New Revision: 331672
URL: https://svnweb.freebsd.org/changeset/base/331672

Log:
  MFC r331536:
  Use LIST_FOREACH_SAFE in sleepq_chains_remove_matching().

Modified:
  stable/11/sys/kern/subr_sleepqueue.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/kern/subr_sleepqueue.c
==
--- stable/11/sys/kern/subr_sleepqueue.cWed Mar 28 13:44:02 2018
(r331671)
+++ stable/11/sys/kern/subr_sleepqueue.cWed Mar 28 14:00:46 2018
(r331672)
@@ -1098,7 +1098,7 @@ void
 sleepq_chains_remove_matching(bool (*matches)(struct thread *))
 {
struct sleepqueue_chain *sc;
-   struct sleepqueue *sq;
+   struct sleepqueue *sq, *sq1;
int i, wakeup_swapper;
 
wakeup_swapper = 0;
@@ -1107,7 +1107,7 @@ sleepq_chains_remove_matching(bool (*matches)(struct t
continue;
}
mtx_lock_spin(>sc_lock);
-   LIST_FOREACH(sq, >sc_queues, sq_hash) {
+   LIST_FOREACH_SAFE(sq, >sc_queues, sq_hash, sq1) {
for (i = 0; i < NR_SLEEPQS; ++i) {
wakeup_swapper |= sleepq_remove_matching(sq, i,
matches, 0);
___
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-unsubscr...@freebsd.org"


Re: svn commit: r331551 - stable/11/cddl/contrib/opensolaris/lib/libdtrace/common

2018-03-28 Thread Antoine Brodin
On Wed, Mar 28, 2018 at 1:40 PM, Mark Johnston  wrote:
> On Wed, Mar 28, 2018 at 08:43:12AM +, Antoine Brodin wrote:
>> On Mon, Mar 26, 2018 at 3:17 PM, Mark Johnston  wrote:
>> > Author: markj
>> > Date: Mon Mar 26 15:17:31 2018
>> > New Revision: 331551
>> > URL: https://svnweb.freebsd.org/changeset/base/331551
>> >
>> > Log:
>> >   MFC r331222:
>> >   Given hidden visibility to symbols referenced by the DOF section.
>>
>> Hi,
>>
>> This commit broke lang/perl* and lang/tcl* on stable/11.
>> Please revert.
>
> Done. Can you confirm that the problem doesn't appear to affect
> -CURRENT? I can't reproduce these build failures there.

Thanks.
I didn't notice any new failure when it was committed in head.

Antoine
___
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-unsubscr...@freebsd.org"


svn commit: r331671 - stable/10/sys/i386/ibcs2

2018-03-28 Thread Ed Maste
Author: emaste
Date: Wed Mar 28 13:44:02 2018
New Revision: 331671
URL: https://svnweb.freebsd.org/changeset/base/331671

Log:
  MFC r331329: Fix kernel memory disclosure in ibcs2_getdents
  
  ibcs2_getdents() copies a dirent structure to userland.  The ibcs2
  dirent structure contains a 2 byte pad element.  This element is never
  initialized, but copied to userland none-the-less.
  
  Note that ibcs2 has not built on HEAD since r302095.
  
  Submitted by: Domagoj Stolfa 
  Reported by:  Ilja Van Sprundel 
  Security: Kernel memory disclosure (803)
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/10/sys/i386/ibcs2/ibcs2_misc.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/i386/ibcs2/ibcs2_misc.c
==
--- stable/10/sys/i386/ibcs2/ibcs2_misc.c   Wed Mar 28 13:41:43 2018
(r331670)
+++ stable/10/sys/i386/ibcs2/ibcs2_misc.c   Wed Mar 28 13:44:02 2018
(r331671)
@@ -352,6 +352,7 @@ ibcs2_getdents(td, uap)
 #defineBSD_DIRENT(cp)  ((struct dirent *)(cp))
 #defineIBCS2_RECLEN(reclen)(reclen + sizeof(u_short))
 
+   memset(, 0, sizeof(idb));
error = getvnode(td->td_proc->p_fd, uap->fd,
cap_rights_init(, CAP_READ), );
if (error != 0)
___
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-unsubscr...@freebsd.org"


svn commit: r331670 - stable/11/sys/i386/ibcs2

2018-03-28 Thread Ed Maste
Author: emaste
Date: Wed Mar 28 13:41:43 2018
New Revision: 331670
URL: https://svnweb.freebsd.org/changeset/base/331670

Log:
  MFC r331329: Fix kernel memory disclosure in ibcs2_getdents
  
  ibcs2_getdents() copies a dirent structure to userland.  The ibcs2
  dirent structure contains a 2 byte pad element.  This element is never
  initialized, but copied to userland none-the-less.
  
  Note that ibcs2 has not built on HEAD since r302095.
  
  Submitted by: Domagoj Stolfa 
  Reported by:  Ilja Van Sprundel 
  Security: Kernel memory disclosure (803)
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/11/sys/i386/ibcs2/ibcs2_misc.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/i386/ibcs2/ibcs2_misc.c
==
--- stable/11/sys/i386/ibcs2/ibcs2_misc.c   Wed Mar 28 13:39:20 2018
(r331669)
+++ stable/11/sys/i386/ibcs2/ibcs2_misc.c   Wed Mar 28 13:41:43 2018
(r331670)
@@ -330,6 +330,7 @@ ibcs2_getdents(struct thread *td, struct ibcs2_getdent
 #defineBSD_DIRENT(cp)  ((struct dirent *)(cp))
 #defineIBCS2_RECLEN(reclen)(reclen + sizeof(u_short))
 
+   memset(, 0, sizeof(idb));
error = getvnode(td, uap->fd, cap_rights_init(, CAP_READ), );
if (error != 0)
return (error);
___
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-unsubscr...@freebsd.org"


Re: svn commit: r331551 - stable/11/cddl/contrib/opensolaris/lib/libdtrace/common

2018-03-28 Thread Mark Johnston
On Wed, Mar 28, 2018 at 08:43:12AM +, Antoine Brodin wrote:
> On Mon, Mar 26, 2018 at 3:17 PM, Mark Johnston  wrote:
> > Author: markj
> > Date: Mon Mar 26 15:17:31 2018
> > New Revision: 331551
> > URL: https://svnweb.freebsd.org/changeset/base/331551
> >
> > Log:
> >   MFC r331222:
> >   Given hidden visibility to symbols referenced by the DOF section.
> 
> Hi,
> 
> This commit broke lang/perl* and lang/tcl* on stable/11.
> Please revert.

Done. Can you confirm that the problem doesn't appear to affect
-CURRENT? I can't reproduce these build failures there.
___
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-unsubscr...@freebsd.org"


svn commit: r331669 - stable/11/cddl/contrib/opensolaris/lib/libdtrace/common

2018-03-28 Thread Mark Johnston
Author: markj
Date: Wed Mar 28 13:39:20 2018
New Revision: 331669
URL: https://svnweb.freebsd.org/changeset/base/331669

Log:
  Revert r331551. It is causing perl and tcl port build failures.
  
  Reported by:  antoine

Modified:
  stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c
==
--- stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c   Wed Mar 
28 12:44:28 2018(r331668)
+++ stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c   Wed Mar 
28 13:39:20 2018(r331669)
@@ -22,7 +22,6 @@
 /*
  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
- * Copyright 2017-2018 Mark Johnston 
  */
 
 #pragma ident  "%Z%%M% %I% %E% SMI"
@@ -275,7 +274,7 @@ prepare_elf32(dtrace_hdl_t *dtp, const dof_hdr_t *dof,
sym->st_value = 0;
sym->st_size = 0;
sym->st_info = ELF32_ST_INFO(STB_GLOBAL, STT_FUNC);
-   sym->st_other = ELF32_ST_VISIBILITY(STV_HIDDEN);
+   sym->st_other = 0;
sym->st_shndx = SHN_UNDEF;
 
rel++;
@@ -473,7 +472,7 @@ prepare_elf64(dtrace_hdl_t *dtp, const dof_hdr_t *dof,
sym->st_value = 0;
sym->st_size = 0;
sym->st_info = GELF_ST_INFO(STB_GLOBAL, STT_FUNC);
-   sym->st_other = ELF64_ST_VISIBILITY(STV_HIDDEN);
+   sym->st_other = 0;
sym->st_shndx = SHN_UNDEF;
 
rel++;
___
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-unsubscr...@freebsd.org"


Re: svn commit: r331650 - in head/sys: amd64/amd64 amd64/ia32amd64/linux amd64/linux32 cddl/contrib/opensolaris/uts/intel/dtracecddl/dev/dtrace/amd64 cddl/dev/dtrace/i386 i386/i386 i386/linux x86/inc.

2018-03-28 Thread Herbert J. Skuhra
On Wed, Mar 28, 2018 at 07:23:27AM +0200, O. Hartmann wrote:
> On Tue, 27 Mar 2018 23:20:53 -0600
> Cy Schubert  wrote:
> 
> > Have you disabled DDB in your kernel config?

At the moment I am building non-GENERIC kernel with the below patch:

Index: sys/amd64/amd64/machdep.c
===
--- sys/amd64/amd64/machdep.c   (revision 331667)
+++ sys/amd64/amd64/machdep.c   (working copy)
@@ -108,6 +108,8 @@
 #endif
 #include 
 #include 
+#else
+#include 
 #endif

 #include 

-- 
Herbert
___
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-unsubscr...@freebsd.org"


svn commit: r331668 - head/sbin/ipfw

2018-03-28 Thread Andrey V. Elsukov
Author: ae
Date: Wed Mar 28 12:44:28 2018
New Revision: 331668
URL: https://svnweb.freebsd.org/changeset/base/331668

Log:
  Rework ipfw rules parsing and printing code.
  
  Introduce show_state structure to keep information about printed opcodes.
  Split show_static_rule() function into several smaller functions. Make
  parsing and printing opcodes into several passes. Each printed opcode
  is marked in show_state structure and will be skipped in next passes.
  Now show_static_rule() function is simple, it just prints each part
  of rule separately: action, modifiers, proto, src and dst addresses,
  options. The main goal of this change is avoiding occurrence of wrong
  result of `ifpw show` command, that can not be parsed by ipfw(8).
  Also now it is possible to make some simple static optimizations
  by reordering of opcodes in the rule.
  
  PR:   222705
  Discussed with:   melifaro
  MFC after:2 weeks
  Sponsored by: Yandex LLC

Modified:
  head/sbin/ipfw/ipfw2.c
  head/sbin/ipfw/ipfw2.h
  head/sbin/ipfw/main.c

Modified: head/sbin/ipfw/ipfw2.c
==
--- head/sbin/ipfw/ipfw2.c  Wed Mar 28 08:58:32 2018(r331667)
+++ head/sbin/ipfw/ipfw2.c  Wed Mar 28 12:44:28 2018(r331668)
@@ -1176,7 +1176,7 @@ print_flags(struct buf_pr *bp, char const *name, ipfw_
  * Print the ip address contained in a command.
  */
 static void
-print_ip(struct buf_pr *bp, struct format_opts *fo, ipfw_insn_ip *cmd,
+print_ip(struct buf_pr *bp, const struct format_opts *fo, ipfw_insn_ip *cmd,
 char const *s)
 {
struct hostent *he = NULL;
@@ -1277,7 +1277,7 @@ print_ip(struct buf_pr *bp, struct format_opts *fo, ip
  * prints a MAC address/mask pair
  */
 static void
-print_mac(struct buf_pr *bp, uint8_t *addr, uint8_t *mask)
+format_mac(struct buf_pr *bp, uint8_t *addr, uint8_t *mask)
 {
int l = contigmask(mask, 48);
 
@@ -1296,6 +1296,15 @@ print_mac(struct buf_pr *bp, uint8_t *addr, uint8_t *m
 }
 
 static void
+print_mac(struct buf_pr *bp, ipfw_insn_mac *mac)
+{
+
+   bprintf(bp, " MAC");
+   format_mac(bp, mac->addr, mac->mask);
+   format_mac(bp, mac->addr + 6, mac->mask + 6);
+}
+
+static void
 fill_icmptypes(ipfw_insn_u32 *cmd, char *av)
 {
uint8_t type;
@@ -1358,817 +1367,843 @@ print_dscp(struct buf_pr *bp, ipfw_insn_u32 *cmd)
}
 }
 
-/*
- * show_ipfw() prints the body of an ipfw rule.
- * Because the standard rule has at least proto src_ip dst_ip, we use
- * a helper function to produce these entries if not provided explicitly.
- * The first argument is the list of fields we have, the second is
- * the list of fields we want to be printed.
- *
- * Special cases if we have provided a MAC header:
- *   + if the rule does not contain IP addresses/ports, do not print them;
- *   + if the rule does not contain an IP proto, print "all" instead of "ip";
- *
- * Once we have 'have_options', IP header fields are printed as options.
- */
+#defineinsntod(cmd, type)  ((ipfw_insn_ ## type *)(cmd))
+struct show_state {
+   struct ip_fw_rule   *rule;
+   const ipfw_insn *eaction;
+   uint8_t *printed;
+   int flags;
 #defineHAVE_PROTO  0x0001
 #defineHAVE_SRCIP  0x0002
 #defineHAVE_DSTIP  0x0004
-#defineHAVE_PROTO4 0x0008
-#defineHAVE_PROTO6 0x0010
-#defineHAVE_IP 0x0100
-#defineHAVE_OPTIONS0x8000
+   int proto;
+   int or_block;
+};
 
-static void
-show_prerequisites(struct buf_pr *bp, int *flags, int want, int cmd)
+static int
+init_show_state(struct show_state *state, struct ip_fw_rule *rule)
 {
-   (void)cmd;  /* UNUSED */
-   if (co.comment_only)
-   return;
-   if ( (*flags & HAVE_IP) == HAVE_IP)
-   *flags |= HAVE_OPTIONS;
 
-   if ( !(*flags & HAVE_OPTIONS)) {
-   if ( !(*flags & HAVE_PROTO) && (want & HAVE_PROTO)) {
-   if ( (*flags & HAVE_PROTO4))
-   bprintf(bp, " ip4");
-   else if ( (*flags & HAVE_PROTO6))
-   bprintf(bp, " ip6");
-   else
-   bprintf(bp, " ip");
-   }
-   if ( !(*flags & HAVE_SRCIP) && (want & HAVE_SRCIP))
-   bprintf(bp, " from any");
-   if ( !(*flags & HAVE_DSTIP) && (want & HAVE_DSTIP))
-   bprintf(bp, " to any");
-   }
-   *flags |= want;
+   state->printed = calloc(rule->cmd_len, sizeof(uint8_t));
+   if (state->printed == NULL)
+   return (ENOMEM);
+   state->rule = rule;
+   state->eaction = NULL;
+   state->flags = 0;
+   state->proto = 0;
+   state->or_block = 0;
+   return (0);
 }
 
 static void

Re: svn commit: r331666 - in head/sys: cddl/contrib/opensolaris/uts/common/fs kern sys

2018-03-28 Thread Konstantin Belousov
On Wed, Mar 28, 2018 at 08:55:31AM +, Andriy Gapon wrote:
> +static __inline int
> +refcount_acquire_if_not_zero(volatile u_int *count)
What about refcount_acquire_nz()

> +static __inline int
> +refcount_release_if_not_last(volatile u_int *count)
refcount_release_nz()
___
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-unsubscr...@freebsd.org"


svn commit: r331666 - in head/sys: cddl/contrib/opensolaris/uts/common/fs kern sys

2018-03-28 Thread Andriy Gapon
Author: avg
Date: Wed Mar 28 08:55:31 2018
New Revision: 331666
URL: https://svnweb.freebsd.org/changeset/base/331666

Log:
  ZFS vn_rele_async: catch up with the use of refcount(9) for the vnode use 
count
  
  It's not sufficient nor required to use the vnode interlock when
  checking if we are going to drop the last use count as the code in
  vputx() uses refcount (atomic) operations for both checking and
  decrementing the use code.  Apply the same method to vn_rele_async().
  While here, remove vn_rele_inactive(), a wrapper around vrele() that
  didn't add any value.
  
  Also, the change required making vfs_refcount_release_if_not_last()
  public.  I've made vfs_refcount_acquire_if_not_zero() public as well.
  They are in sys/refcount.h now.  While making the move I've dropped the
  vfs_ prefix.
  
  Reviewed by:  mjg
  MFC after:2 weeks
  Sponsored by: Panzura
  Differential Revision: https://reviews.freebsd.org/D14869

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/vnode.c
  head/sys/kern/vfs_subr.c
  head/sys/sys/refcount.h

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/vnode.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/vnode.c Wed Mar 28 
07:59:16 2018(r331665)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/vnode.c Wed Mar 28 
08:55:31 2018(r331666)
@@ -72,12 +72,6 @@ xva_getxoptattr(xvattr_t *xvap)
return (xoap);
 }
 
-static void
-vn_rele_inactive(vnode_t *vp)
-{
-   vrele(vp);
-}
-
 /*
  * Like vn_rele() except if we are going to call VOP_INACTIVE() then do it
  * asynchronously using a taskq. This can avoid deadlocks caused by re-entering
@@ -92,13 +86,10 @@ void
 vn_rele_async(vnode_t *vp, taskq_t *taskq)
 {
VERIFY(vp->v_count > 0);
-   VI_LOCK(vp);
-   if (vp->v_count == 1 && !(vp->v_iflag & VI_DOINGINACT)) {
-   VI_UNLOCK(vp);
-   VERIFY(taskq_dispatch((taskq_t *)taskq,
-   (task_func_t *)vn_rele_inactive, vp, TQ_SLEEP) != 0);
+   if (refcount_release_if_not_last(>v_usecount)) {
+   vdrop(vp);
return;
}
-   refcount_release(>v_usecount);
-   vdropl(vp);
+   VERIFY(taskq_dispatch((taskq_t *)taskq,
+   (task_func_t *)vrele, vp, TQ_SLEEP) != 0);
 }

Modified: head/sys/kern/vfs_subr.c
==
--- head/sys/kern/vfs_subr.cWed Mar 28 07:59:16 2018(r331665)
+++ head/sys/kern/vfs_subr.cWed Mar 28 08:55:31 2018(r331666)
@@ -2455,37 +2455,6 @@ reassignbuf(struct buf *bp)
BO_UNLOCK(bo);
 }
 
-/*
- * A temporary hack until refcount_* APIs are sorted out.
- */
-static __inline int
-vfs_refcount_acquire_if_not_zero(volatile u_int *count)
-{
-   u_int old;
-
-   old = *count;
-   for (;;) {
-   if (old == 0)
-   return (0);
-   if (atomic_fcmpset_int(count, , old + 1))
-   return (1);
-   }
-}
-
-static __inline int
-vfs_refcount_release_if_not_last(volatile u_int *count)
-{
-   u_int old;
-
-   old = *count;
-   for (;;) {
-   if (old == 1)
-   return (0);
-   if (atomic_fcmpset_int(count, , old - 1))
-   return (1);
-   }
-}
-
 static void
 v_init_counters(struct vnode *vp)
 {
@@ -2524,7 +2493,7 @@ v_incr_usecount(struct vnode *vp)
CTR2(KTR_VFS, "%s: vp %p", __func__, vp);
 
if (vp->v_type != VCHR &&
-   vfs_refcount_acquire_if_not_zero(>v_usecount)) {
+   refcount_acquire_if_not_zero(>v_usecount)) {
VNASSERT((vp->v_iflag & VI_OWEINACT) == 0, vp,
("vnode with usecount and VI_OWEINACT set"));
} else {
@@ -2616,7 +2585,7 @@ vget(struct vnode *vp, int flags, struct thread *td)
 * Upgrade our holdcnt to a usecount.
 */
if (vp->v_type == VCHR ||
-   !vfs_refcount_acquire_if_not_zero(>v_usecount)) {
+   !refcount_acquire_if_not_zero(>v_usecount)) {
VI_LOCK(vp);
if ((vp->v_iflag & VI_OWEINACT) == 0) {
oweinact = 0;
@@ -2720,7 +2689,7 @@ vputx(struct vnode *vp, int func)
CTR2(KTR_VFS, "%s: vp %p", __func__, vp);
 
if (vp->v_type != VCHR &&
-   vfs_refcount_release_if_not_last(>v_usecount)) {
+   refcount_release_if_not_last(>v_usecount)) {
if (func == VPUTX_VPUT)
VOP_UNLOCK(vp, 0);
vdrop(vp);
@@ -2836,7 +2805,7 @@ _vhold(struct vnode *vp, bool locked)
ASSERT_VI_UNLOCKED(vp, __func__);
CTR2(KTR_VFS, "%s: vp %p", __func__, vp);
if (!locked) {
-   if (vfs_refcount_acquire_if_not_zero(>v_holdcnt)) {
+   if (refcount_acquire_if_not_zero(>v_holdcnt)) {

Re: svn commit: r331551 - stable/11/cddl/contrib/opensolaris/lib/libdtrace/common

2018-03-28 Thread Antoine Brodin
On Mon, Mar 26, 2018 at 3:17 PM, Mark Johnston  wrote:
> Author: markj
> Date: Mon Mar 26 15:17:31 2018
> New Revision: 331551
> URL: https://svnweb.freebsd.org/changeset/base/331551
>
> Log:
>   MFC r331222:
>   Given hidden visibility to symbols referenced by the DOF section.

Hi,

This commit broke lang/perl* and lang/tcl* on stable/11.
Please revert.

Cheers,

Antoine (with hat: portmgr)
___
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-unsubscr...@freebsd.org"


svn commit: r331665 - in head: share/man/man4 sys/conf sys/contrib/dev/iwm sys/dev/iwm sys/modules/iwmfw sys/modules/iwmfw/iwm3168fw

2018-03-28 Thread Eitan Adler
Author: eadler
Date: Wed Mar 28 07:59:16 2018
New Revision: 331665
URL: https://svnweb.freebsd.org/changeset/base/331665

Log:
  [iwm] Add support for iwm 3168 cards
  
  ```
  iwm0@pci0:5:0:0:class=0x028000 card=0x21108086 chip=0x24fb8086
  rev=0x10 hdr=0x00
  vendor = 'Intel Corporation'
  device = 'Dual Band Wireless-AC 3168NGW [Stone Peak]'
  class  = network
  [94829] iwm0:  mem
  0xef70-0xef701fff at device 0.0 on pci5
  [94829] iwm0: hw rev 0x220, fw ver 22.361476.0, address
  28:c6:3f:15:43:c5
  ```
  
  MFC After:2 weeks
  Reviewed by:  ivadasz (over IRC)
  PR:   224886
  Differential Revision:https://reviews.freebsd.org/D14865

Added:
  head/sys/contrib/dev/iwm/iwm-3168-22.fw.uu
  head/sys/modules/iwmfw/iwm3168fw/
  head/sys/modules/iwmfw/iwm3168fw/Makefile   (contents, props changed)
Modified:
  head/share/man/man4/iwm.4
  head/share/man/man4/iwmfw.4
  head/sys/conf/files
  head/sys/dev/iwm/if_iwm.c
  head/sys/dev/iwm/if_iwm_7000.c
  head/sys/dev/iwm/if_iwm_config.h
  head/sys/modules/iwmfw/Makefile

Modified: head/share/man/man4/iwm.4
==
--- head/share/man/man4/iwm.4   Wed Mar 28 07:49:36 2018(r331664)
+++ head/share/man/man4/iwm.4   Wed Mar 28 07:59:16 2018(r331665)
@@ -46,6 +46,7 @@ You also need to select a firmware for your device.
 Choose one from:
 .Bd -ragged -offset indent
 .Cd "device iwm3160fw"
+.Cd "device iwm3168fw"
 .Cd "device iwm7260fw"
 .Cd "device iwm7265fw"
 .Cd "device iwm8000Cfw"
@@ -65,6 +66,7 @@ module at boot time, place the following lines in
 .Bd -literal -offset indent
 if_iwm_load="YES"
 iwm3160fw_load="YES"
+iwm3168fw_load="YES"
 iwm7260fw_load="YES"
 iwm7265fw_load="YES"
 iwm8000Cfw_load="YES"
@@ -78,6 +80,7 @@ driver provides support for:
 .Bl -tag -width Ds -offset indent -compact
 .It Intel Dual Band Wireless AC 3160
 .It Intel Dual Band Wireless AC 3165
+.It Intel Dual Band Wireless AC 3168
 .It Intel Dual Band Wireless AC 7260
 .It Intel Dual Band Wireless AC 7265
 .It Intel Dual Band Wireless AC 8260

Modified: head/share/man/man4/iwmfw.4
==
--- head/share/man/man4/iwmfw.4 Wed Mar 28 07:49:36 2018(r331664)
+++ head/share/man/man4/iwmfw.4 Wed Mar 28 07:59:16 2018(r331665)
@@ -43,6 +43,7 @@ If you want to pick only the firmware image for your n
 of the following:
 .Bd -ragged -offset indent
 .Cd "device iwm3160fw"
+.Cd "device iwm3168fw"
 .Cd "device iwm7260fw"
 .Cd "device iwm7265fw"
 .Cd "device iwm8000Cfw"
@@ -54,6 +55,7 @@ module at boot time, place the following line in
 .Xr loader.conf 5 :
 .Bd -literal -offset indent
 iwm3160fw_load="YES"
+iwm3168fw_load="YES"
 iwm7260fw_load="YES"
 iwm7265fw_load="YES"
 iwm7265Dfw_load="YES"
@@ -62,7 +64,7 @@ iwm8265fw_load="YES"
 .Ed
 .Sh DESCRIPTION
 This module provides access to firmware sets for the
-Intel Dual Band Wireless WiFi 3160, 3165, 7260, 7265, 8000, and 8260 series of
+Intel Dual Band Wireless WiFi 3160, 3165, 3168, 7260, 7265, 8000, and 8260 
series of
 IEEE 802.11n/11ac adapters.
 It may be
 statically linked into the kernel, or loaded as a module.

Modified: head/sys/conf/files
==
--- head/sys/conf/files Wed Mar 28 07:49:36 2018(r331664)
+++ head/sys/conf/files Wed Mar 28 07:59:16 2018(r331665)
@@ -1988,6 +1988,20 @@ iwm3160.fw   optional iwm3160fw | 
iwmfw  \
compile-with"${NORMAL_FW}"  \
no-obj no-implicit-rule \
clean   "iwm3160.fw"
+iwm3168fw.coptional iwm3168fw | iwmfw  \
+   compile-with"${AWK} -f $S/tools/fw_stub.awk iwm3168.fw:iwm3168fw 
-miwm3168fw -c${.TARGET}" \
+   no-implicit-rule before-depend local\
+   clean   "iwm3168fw.c"
+iwm3168fw.fwo  optional iwm3168fw | iwmfw  \
+   dependency  "iwm3168.fw"\
+   compile-with"${NORMAL_FWO}" \
+   no-implicit-rule\
+   clean   "iwm3168fw.fwo"
+iwm3168.fw optional iwm3168fw | iwmfw  \
+   dependency  "$S/contrib/dev/iwm/iwm-3168-22.fw.uu"  \
+   compile-with"${NORMAL_FW}"  \
+   no-obj no-implicit-rule \
+   clean   "iwm3168.fw"
 iwm7260fw.coptional iwm7260fw | iwmfw  \
compile-with"${AWK} -f $S/tools/fw_stub.awk iwm7260.fw:iwm7260fw 
-miwm7260fw -c${.TARGET}" \
no-implicit-rule before-depend local  

svn commit: r331664 - head/share/misc

2018-03-28 Thread Rodney W. Grimes
Author: rgrimes
Date: Wed Mar 28 07:49:36 2018
New Revision: 331664
URL: https://svnweb.freebsd.org/changeset/base/331664

Log:
  Add Bruce Evans
  Update my mentors to bde and phk
  
  Approved by:  core, bde (mentor), phk (mentor)
  MFC after:3 days

Modified:
  head/share/misc/committers-src.dot

Modified: head/share/misc/committers-src.dot
==
--- head/share/misc/committers-src.dot  Wed Mar 28 07:45:57 2018
(r331663)
+++ head/share/misc/committers-src.dot  Wed Mar 28 07:49:36 2018
(r331664)
@@ -122,6 +122,7 @@ avg [label="Andriy Gapon\n...@freebsd.org\n2009/02/18"
 avos [label="Andriy Voskoboinyk\na...@freebsd.org\n2015/09/24"]
 badger [label="Eric Badger\nbad...@freebsd.org\n2016/07/01"]
 bapt [label="Baptiste Daroussin\nb...@freebsd.org\n2011/12/23"]
+bde [label="Bruce Evans\n...@freebsd.org\n1994/08/20"]
 bdrewery [label="Bryan Drewery\nbdrew...@freebsd.org\n2013/12/14"]
 benl [label="Ben Laurie\nb...@freebsd.org\n2011/05/18"]
 benno [label="Benno Rice\nbe...@freebsd.org\n2000/11/02"]
@@ -402,6 +403,8 @@ bapt -> araujo
 bapt -> bdrewery
 bapt -> wulf
 
+bde -> rgrimes
+
 benno -> grehan
 
 billf -> dougb
@@ -720,6 +723,7 @@ philip -> kp
 
 phk -> jkoshy
 phk -> mux
+phk -> rgrimes
 
 pjd -> def
 pjd -> kib
___
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-unsubscr...@freebsd.org"


svn commit: r331663 - stable/10/contrib/tzdata

2018-03-28 Thread Philip Paeps
Author: philip
Date: Wed Mar 28 07:45:57 2018
New Revision: 331663
URL: https://svnweb.freebsd.org/changeset/base/331663

Log:
  MFC r331481: Import tzdata 2018d

Added:
  stable/10/contrib/tzdata/ziguard.awk
 - copied unchanged from r331481, head/contrib/tzdata/ziguard.awk
Modified:
  stable/10/contrib/tzdata/CONTRIBUTING
  stable/10/contrib/tzdata/Makefile
  stable/10/contrib/tzdata/NEWS
  stable/10/contrib/tzdata/africa
  stable/10/contrib/tzdata/antarctica
  stable/10/contrib/tzdata/asia
  stable/10/contrib/tzdata/australasia
  stable/10/contrib/tzdata/backzone
  stable/10/contrib/tzdata/checktab.awk
  stable/10/contrib/tzdata/europe
  stable/10/contrib/tzdata/northamerica
  stable/10/contrib/tzdata/southamerica
  stable/10/contrib/tzdata/theory.html
  stable/10/contrib/tzdata/version
  stable/10/contrib/tzdata/zishrink.awk
  stable/10/contrib/tzdata/zone.tab
  stable/10/contrib/tzdata/zone1970.tab
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/tzdata/CONTRIBUTING
==
--- stable/10/contrib/tzdata/CONTRIBUTING   Wed Mar 28 07:42:50 2018
(r331662)
+++ stable/10/contrib/tzdata/CONTRIBUTING   Wed Mar 28 07:45:57 2018
(r331663)
@@ -25,7 +25,8 @@ justification.  Citations should use https: URLs if av
 
 Please submit changes against either the latest release in
  or the master branch of the development
-repository.  If you use Git the following workflow may be helpful:
+repository.  The latter is preferred.  If you use Git the following
+workflow may be helpful:
 
   * Copy the development repository.
 
@@ -42,6 +43,12 @@ repository.  If you use Git the following workflow may
 
   git checkout -b mybranch
 
+  * Sleuth by using 'git blame'.  For example, when fixing data for
+Africa/Sao_Tome, if the command 'git blame africa' outputs a line
+'2951fa3b (Paul Eggert 2018-01-08 09:03:13 -0800 1068) Zone
+Africa/Sao_Tome 0:26:56 - LMT 1884', commit 2951fa3b should
+provide some justification for the 'Zone Africa/Sao_Tome' line.
+
   * Edit source files.  Include commentary that justifies the
 changes by citing reliable sources.
 
@@ -66,6 +73,9 @@ repository.  If you use Git the following workflow may
 for others to review.
 
   git send-email master
+
+For an archived example of such an email, see
+.
 
   * Start anew by getting current with the master branch again
 (the second step above).

Modified: stable/10/contrib/tzdata/Makefile
==
--- stable/10/contrib/tzdata/Makefile   Wed Mar 28 07:42:50 2018
(r331662)
+++ stable/10/contrib/tzdata/Makefile   Wed Mar 28 07:45:57 2018
(r331663)
@@ -10,6 +10,15 @@ VERSION= unknown
 # Email address for bug reports.
 BUGEMAIL=  t...@iana.org
 
+# Choose source data features.  To get new features right away, use:
+#  DATAFORM=   vanguard
+# To wait a while before using new features, to give downstream users
+# time to upgrade zic (the default), use:
+#  DATAFORM=   main
+# To wait even longer for new features, use:
+#  DATAFORM=   rearguard
+DATAFORM=  main
+
 # Change the line below for your time zone (after finding the zone you want in
 # the time zone files, or adding it to a time zone file).
 # Alternately, if you discover you've got the wrong time zone, you can just
@@ -25,10 +34,10 @@ LOCALTIME=  GMT
 # for handling POSIX-style time zone environment variables,
 # change the line below (after finding the zone you want in the
 # time zone files, or adding it to a time zone file).
-# (When a POSIX-style environment variable is handled, the rules in the
+# When a POSIX-style environment variable is handled, the rules in the
 # template file are used to determine "spring forward" and "fall back" days and
 # times; the environment variable itself specifies UT offsets of standard and
-# summer time.)
+# daylight saving time.
 # Alternately, if you discover you've got the wrong time zone, you can just
 #  zic -p rightzone
 # to correct things.
@@ -189,13 +198,18 @@ LDLIBS=
 #  -DHAVE_STDINT_H if you have a non-C99 compiler with 
 #  -DHAVE_STRFTIME_L if  declares locale_t and strftime_l
 #  -DHAVE_STRDUP=0 if your system lacks the strdup function
+#  -DHAVE_STRTOLL=0 if your system lacks the strtoll function
 #  -DHAVE_SYMLINK=0 if your system lacks the symlink function
 #  -DHAVE_SYS_STAT_H=0 if your compiler lacks a 
 #  -DHAVE_SYS_WAIT_H=0 if your compiler lacks a 
 #  -DHAVE_TZSET=0 if your system lacks a tzset function
 #  -DHAVE_UNISTD_H=0 if your compiler lacks a 
 #  -Dlocale_t=XXX if your system uses XXX instead of locale_t
+#  -DRESERVE_STD_EXT_IDS if your platform reserves standard identifiers
+#  with external linkage, e.g., applications cannot define 

svn commit: r331662 - stable/11/contrib/tzdata

2018-03-28 Thread Philip Paeps
Author: philip
Date: Wed Mar 28 07:42:50 2018
New Revision: 331662
URL: https://svnweb.freebsd.org/changeset/base/331662

Log:
  MFC r331481: Import tzdata 2018d

Added:
  stable/11/contrib/tzdata/ziguard.awk
 - copied unchanged from r331481, head/contrib/tzdata/ziguard.awk
Modified:
  stable/11/contrib/tzdata/CONTRIBUTING
  stable/11/contrib/tzdata/Makefile
  stable/11/contrib/tzdata/NEWS
  stable/11/contrib/tzdata/africa
  stable/11/contrib/tzdata/antarctica
  stable/11/contrib/tzdata/asia
  stable/11/contrib/tzdata/australasia
  stable/11/contrib/tzdata/backzone
  stable/11/contrib/tzdata/checktab.awk
  stable/11/contrib/tzdata/europe
  stable/11/contrib/tzdata/northamerica
  stable/11/contrib/tzdata/southamerica
  stable/11/contrib/tzdata/theory.html
  stable/11/contrib/tzdata/version
  stable/11/contrib/tzdata/zishrink.awk
  stable/11/contrib/tzdata/zone.tab
  stable/11/contrib/tzdata/zone1970.tab
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/contrib/tzdata/CONTRIBUTING
==
--- stable/11/contrib/tzdata/CONTRIBUTING   Wed Mar 28 05:58:08 2018
(r331661)
+++ stable/11/contrib/tzdata/CONTRIBUTING   Wed Mar 28 07:42:50 2018
(r331662)
@@ -25,7 +25,8 @@ justification.  Citations should use https: URLs if av
 
 Please submit changes against either the latest release in
  or the master branch of the development
-repository.  If you use Git the following workflow may be helpful:
+repository.  The latter is preferred.  If you use Git the following
+workflow may be helpful:
 
   * Copy the development repository.
 
@@ -42,6 +43,12 @@ repository.  If you use Git the following workflow may
 
   git checkout -b mybranch
 
+  * Sleuth by using 'git blame'.  For example, when fixing data for
+Africa/Sao_Tome, if the command 'git blame africa' outputs a line
+'2951fa3b (Paul Eggert 2018-01-08 09:03:13 -0800 1068) Zone
+Africa/Sao_Tome 0:26:56 - LMT 1884', commit 2951fa3b should
+provide some justification for the 'Zone Africa/Sao_Tome' line.
+
   * Edit source files.  Include commentary that justifies the
 changes by citing reliable sources.
 
@@ -66,6 +73,9 @@ repository.  If you use Git the following workflow may
 for others to review.
 
   git send-email master
+
+For an archived example of such an email, see
+.
 
   * Start anew by getting current with the master branch again
 (the second step above).

Modified: stable/11/contrib/tzdata/Makefile
==
--- stable/11/contrib/tzdata/Makefile   Wed Mar 28 05:58:08 2018
(r331661)
+++ stable/11/contrib/tzdata/Makefile   Wed Mar 28 07:42:50 2018
(r331662)
@@ -10,6 +10,15 @@ VERSION= unknown
 # Email address for bug reports.
 BUGEMAIL=  t...@iana.org
 
+# Choose source data features.  To get new features right away, use:
+#  DATAFORM=   vanguard
+# To wait a while before using new features, to give downstream users
+# time to upgrade zic (the default), use:
+#  DATAFORM=   main
+# To wait even longer for new features, use:
+#  DATAFORM=   rearguard
+DATAFORM=  main
+
 # Change the line below for your time zone (after finding the zone you want in
 # the time zone files, or adding it to a time zone file).
 # Alternately, if you discover you've got the wrong time zone, you can just
@@ -25,10 +34,10 @@ LOCALTIME=  GMT
 # for handling POSIX-style time zone environment variables,
 # change the line below (after finding the zone you want in the
 # time zone files, or adding it to a time zone file).
-# (When a POSIX-style environment variable is handled, the rules in the
+# When a POSIX-style environment variable is handled, the rules in the
 # template file are used to determine "spring forward" and "fall back" days and
 # times; the environment variable itself specifies UT offsets of standard and
-# summer time.)
+# daylight saving time.
 # Alternately, if you discover you've got the wrong time zone, you can just
 #  zic -p rightzone
 # to correct things.
@@ -189,13 +198,18 @@ LDLIBS=
 #  -DHAVE_STDINT_H if you have a non-C99 compiler with 
 #  -DHAVE_STRFTIME_L if  declares locale_t and strftime_l
 #  -DHAVE_STRDUP=0 if your system lacks the strdup function
+#  -DHAVE_STRTOLL=0 if your system lacks the strtoll function
 #  -DHAVE_SYMLINK=0 if your system lacks the symlink function
 #  -DHAVE_SYS_STAT_H=0 if your compiler lacks a 
 #  -DHAVE_SYS_WAIT_H=0 if your compiler lacks a 
 #  -DHAVE_TZSET=0 if your system lacks a tzset function
 #  -DHAVE_UNISTD_H=0 if your compiler lacks a 
 #  -Dlocale_t=XXX if your system uses XXX instead of locale_t
+#  -DRESERVE_STD_EXT_IDS if your platform reserves standard identifiers
+#  with external linkage, e.g., applications cannot define