svn commit: r360218 - in head/sys: net netinet6

2020-04-23 Thread Alexander V. Chernikov
Author: melifaro
Date: Thu Apr 23 08:04:20 2020
New Revision: 360218
URL: https://svnweb.freebsd.org/changeset/base/360218

Log:
  Convert rtentry field accesses into nhop field accesses.
  
  One of the goals of the new routing KPI defined in r359823 is to entirely
   hide`struct rtentry` from the consumers. It will allow to improve routing
   subsystem internals and deliver more features much faster.
  
  This commit is mostly mechanical change to eliminate direct struct rtentry
   field accesses.
  
  The only notable difference is AF_LINK gateway encoding.
  
  AF_LINK gw is used in routing stack for operations with interface routes
   and host loopback routes.
  In the former case it indicates _some_ non-NULL gateway, as the interface
   is the same as in rt_ifp in kernel and rtm_ifindex in rtsock reporting.
  In the latter case the interface index inside gateway was used by the IPv6
   datapath to verify address scope for link-local interfaces.
  
  Kernel uses struct sockaddr_dl for this type of gateway. This structure
   allows for specifying rich interface data, such as mac address and interface
   name. However, this results in relatively large structure size - 52 bytes.
  Routing stack fils in only 2 fields - sdl_index and sdl_type, which reside
   in the first 8 bytes of the structure.
  
  In the new KPI, struct nhop_object tries to be cache-efficient, hence
   embodies gateway address inside the structure. In the AF_LINK case it
   stores stortened version of the structure - struct sockaddr_dl_short,
   which occupies 16 bytes. After D24340 changes, the data inside AF_LINK
   gateway will not be used in the kernel at all, leaving rtsock as the only
   potential concern.
  
  The difference in rtsock reporting:
  
  (old)
  got message of size 240 on Thu Apr 16 03:12:13 2020
  RTM_ADD: Add Route: len 240, pid: 0, seq 0, errno 0, flags:
  locks:  inits:
  sockaddrs: 
   10.0.0.0 link#5 255.255.255.0
  
  (new)
  got message of size 200 on Sun Apr 19 09:46:32 2020
  RTM_ADD: Add Route: len 200, pid: 0, seq 0, errno 0, flags:
  locks:  inits:
  sockaddrs: 
   10.0.0.0 link#5 255.255.255.0
  
  Note 40 bytes different (52-16 + alignment).
  However, gateway is still a valid AF_LINK gateway with proper data filled in.
  
  It is worth noting that these particular messages (interface routes) are 
mostly
   ignored by routing daemons:
  * bird/quagga/frr uses RTM_NEWADDR and ignores prefix route addition messages.
  * quagga/frr ignores routes without gateway
  
  More detailed overview on how rtsock messages are used by the
   routing daemons to reconstruct the kernel view, can be found in D22974.
  
  Differential Revision:https://reviews.freebsd.org/D24519

Modified:
  head/sys/net/radix_mpath.c
  head/sys/net/route.c
  head/sys/net/rtsock.c
  head/sys/netinet6/nd6.c
  head/sys/netinet6/nd6.h
  head/sys/netinet6/nd6_rtr.c

Modified: head/sys/net/radix_mpath.c
==
--- head/sys/net/radix_mpath.c  Thu Apr 23 06:55:33 2020(r360217)
+++ head/sys/net/radix_mpath.c  Thu Apr 23 08:04:20 2020(r360218)
@@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -110,22 +111,24 @@ struct rtentry *
 rt_mpath_matchgate(struct rtentry *rt, struct sockaddr *gate)
 {
struct radix_node *rn;
+   struct nhop_object *nh;
 
-   if (!gate || !rt->rt_gateway)
-   return NULL;
+   if (gate == NULL)
+   return (NULL);
 
/* beyond here, we use rn as the master copy */
rn = (struct radix_node *)rt;
do {
rt = (struct rtentry *)rn;
+   nh = rt->rt_nhop;
/*
-* we are removing an address alias that has 
+* we are removing an address alias that has
 * the same prefix as another address
 * we need to compare the interface address because
-* rt_gateway is a special sockadd_dl structure
+* gateway is a special sockaddr_dl structure
 */
-   if (rt->rt_gateway->sa_family == AF_LINK) {
-   if (!memcmp(rt->rt_ifa->ifa_addr, gate, gate->sa_len))
+   if (nh->gw_sa.sa_family == AF_LINK) {
+   if (!memcmp(nh->nh_ifa->ifa_addr, gate, gate->sa_len))
break;
}
 
@@ -134,8 +137,8 @@ rt_mpath_matchgate(struct rtentry *rt, struct sockaddr
 * 1) Routes with 'real' IPv4/IPv6 gateway
 * 2) Loopback host routes (another AF_LINK/sockadd_dl check)
 * */
-   if (rt->rt_gateway->sa_len == gate->sa_len &&
-   !memcmp(rt->rt_gateway, gate, gate->sa_len))
+   if (nh->gw_sa.sa_len == gate->sa_len &&
+   !memcmp(&nh->gw_sa, gate, gate->sa_len))
break;

svn commit: r360219 - head/sys/nlm

2020-04-23 Thread Konstantin Belousov
Author: kib
Date: Thu Apr 23 09:37:22 2020
New Revision: 360219
URL: https://svnweb.freebsd.org/changeset/base/360219

Log:
  Make nfslockd depend on xdr.
  
  This is needed after r360036.
  
  Reported by:  netchild
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/nlm/nlm_prot_impl.c

Modified: head/sys/nlm/nlm_prot_impl.c
==
--- head/sys/nlm/nlm_prot_impl.cThu Apr 23 08:04:20 2020
(r360218)
+++ head/sys/nlm/nlm_prot_impl.cThu Apr 23 09:37:22 2020
(r360219)
@@ -2410,6 +2410,7 @@ static moduledata_t nfslockd_mod = {
 DECLARE_MODULE(nfslockd, nfslockd_mod, SI_SUB_VFS, SI_ORDER_ANY);
 
 /* So that loader and kldload(2) can find us, wherever we are.. */
+MODULE_DEPEND(nfslockd, xdr, 1, 1, 1);
 MODULE_DEPEND(nfslockd, krpc, 1, 1, 1);
 MODULE_DEPEND(nfslockd, nfscommon, 1, 1, 1);
 MODULE_VERSION(nfslockd, 1);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r360221 - in head/contrib/sqlite3: . tea tea/generic tea/win

2020-04-23 Thread Cy Schubert
Author: cy
Date: Thu Apr 23 13:46:34 2020
New Revision: 360221
URL: https://svnweb.freebsd.org/changeset/base/360221

Log:
  In preparation for update to sqlite3-3.31.1 (3310100),
  recommit r357201: MFV r357163, which was reverted by r357522
  due to segfault under PowerPc.
  
  Update sqlite3-3.30.1 (3300100) --> sqlite3-3.31.0 (331)
  
  MFC after:1 month

Modified:
  head/contrib/sqlite3/Makefile.msc
  head/contrib/sqlite3/configure
  head/contrib/sqlite3/configure.ac
  head/contrib/sqlite3/shell.c
  head/contrib/sqlite3/sqlite3.c
  head/contrib/sqlite3/sqlite3.h
  head/contrib/sqlite3/sqlite3ext.h
  head/contrib/sqlite3/tea/configure
  head/contrib/sqlite3/tea/configure.ac
  head/contrib/sqlite3/tea/generic/tclsqlite3.c
  head/contrib/sqlite3/tea/win/makefile.vc

Modified: head/contrib/sqlite3/Makefile.msc
==
--- head/contrib/sqlite3/Makefile.msc   Thu Apr 23 09:48:02 2020
(r360220)
+++ head/contrib/sqlite3/Makefile.msc   Thu Apr 23 13:46:34 2020
(r360221)
@@ -210,6 +210,12 @@ OPTIMIZATIONS = 2
 SESSION = 0
 !ENDIF
 
+# Set this to non-0 to enable support for the rbu extension.
+#
+!IFNDEF RBU
+RBU = 0
+!ENDIF
+
 # Set the source code file to be used by executables and libraries when
 # they need the amalgamation.
 #
@@ -282,7 +288,6 @@ OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENAB
 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_STMTVTAB=1
 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_DBPAGE_VTAB=1
 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_DBSTAT_VTAB=1
-OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_INTROSPECTION_PRAGMAS=1
 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_DESERIALIZE=1
 !ENDIF
 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_COLUMN_METADATA=1
@@ -296,6 +301,13 @@ OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENAB
 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_PREUPDATE_HOOK=1
 !ENDIF
 
+# Should the rbu extension be enabled?  If so, add compilation options
+# to enable it.
+#
+!IF $(RBU)!=0
+OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_RBU=1
+!ENDIF
+
 # These are the "extended" SQLite compilation options used when compiling for
 # the Windows 10 platform.
 #
@@ -978,7 +990,7 @@ Replace.exe:
 sqlite3.def:   Replace.exe $(LIBOBJ)
echo EXPORTS > sqlite3.def
dumpbin /all $(LIBOBJ) \
-   | .\Replace.exe 
"^\s+/EXPORT:_?(sqlite3(?:session|changeset|changegroup|rebaser)?_[^@,]*)(?:@\d+|,DATA)?$$"
 $$1 true \
+   | .\Replace.exe 
"^\s+/EXPORT:_?(sqlite3(?:session|changeset|changegroup|rebaser|rbu)?_[^@,]*)(?:@\d+|,DATA)?$$"
 $$1 true \
| sort >> sqlite3.def
 
 $(SQLITE3EXE): shell.c $(SHELL_CORE_DEP) $(LIBRESOBJS) $(SHELL_CORE_SRC) 
$(SQLITE3H)

Modified: head/contrib/sqlite3/configure
==
--- head/contrib/sqlite3/configure  Thu Apr 23 09:48:02 2020
(r360220)
+++ head/contrib/sqlite3/configure  Thu Apr 23 13:46:34 2020
(r360221)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for sqlite 3.30.1.
+# Generated by GNU Autoconf 2.69 for sqlite 3.31.0.
 #
 # Report bugs to .
 #
@@ -590,8 +590,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='sqlite'
 PACKAGE_TARNAME='sqlite'
-PACKAGE_VERSION='3.30.1'
-PACKAGE_STRING='sqlite 3.30.1'
+PACKAGE_VERSION='3.31.0'
+PACKAGE_STRING='sqlite 3.31.0'
 PACKAGE_BUGREPORT='http://www.sqlite.org'
 PACKAGE_URL=''
 
@@ -1341,7 +1341,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures sqlite 3.30.1 to adapt to many kinds of systems.
+\`configure' configures sqlite 3.31.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1412,7 +1412,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
- short | recursive ) echo "Configuration of sqlite 3.30.1:";;
+ short | recursive ) echo "Configuration of sqlite 3.31.0:";;
esac
   cat <<\_ACEOF
 
@@ -1537,7 +1537,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-sqlite configure 3.30.1
+sqlite configure 3.31.0
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1952,7 +1952,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by sqlite $as_me 3.30.1, which was
+It was created by sqlite $as_me 3.31.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2818,7 +2818,7 @@ fi
 
 # Define the identity of the pa

svn commit: r360222 - in head/contrib/sqlite3: . tea

2020-04-23 Thread Cy Schubert
Author: cy
Date: Thu Apr 23 13:58:11 2020
New Revision: 360222
URL: https://svnweb.freebsd.org/changeset/base/360222

Log:
  MFV r360158:
  
  Update sqlite3-3.31.0 (331) --> sqlite3-3.31.1 (3310100)
  
  Tested by:Mark Millard 
With to be committed PowerPC patch
  MFC after:1 month
  X-MFC with:   r360221

Modified:
  head/contrib/sqlite3/configure
  head/contrib/sqlite3/configure.ac
  head/contrib/sqlite3/sqlite3.c
  head/contrib/sqlite3/sqlite3.h
  head/contrib/sqlite3/sqlite3ext.h
  head/contrib/sqlite3/tea/configure
  head/contrib/sqlite3/tea/configure.ac
Directory Properties:
  head/contrib/sqlite3/   (props changed)

Modified: head/contrib/sqlite3/configure
==
--- head/contrib/sqlite3/configure  Thu Apr 23 13:46:34 2020
(r360221)
+++ head/contrib/sqlite3/configure  Thu Apr 23 13:58:11 2020
(r360222)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for sqlite 3.31.0.
+# Generated by GNU Autoconf 2.69 for sqlite 3.31.1.
 #
 # Report bugs to .
 #
@@ -590,8 +590,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='sqlite'
 PACKAGE_TARNAME='sqlite'
-PACKAGE_VERSION='3.31.0'
-PACKAGE_STRING='sqlite 3.31.0'
+PACKAGE_VERSION='3.31.1'
+PACKAGE_STRING='sqlite 3.31.1'
 PACKAGE_BUGREPORT='http://www.sqlite.org'
 PACKAGE_URL=''
 
@@ -1341,7 +1341,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures sqlite 3.31.0 to adapt to many kinds of systems.
+\`configure' configures sqlite 3.31.1 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1412,7 +1412,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
- short | recursive ) echo "Configuration of sqlite 3.31.0:";;
+ short | recursive ) echo "Configuration of sqlite 3.31.1:";;
esac
   cat <<\_ACEOF
 
@@ -1537,7 +1537,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-sqlite configure 3.31.0
+sqlite configure 3.31.1
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1952,7 +1952,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by sqlite $as_me 3.31.0, which was
+It was created by sqlite $as_me 3.31.1, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2818,7 +2818,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='sqlite'
- VERSION='3.31.0'
+ VERSION='3.31.1'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -14438,7 +14438,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by sqlite $as_me 3.31.0, which was
+This file was extended by sqlite $as_me 3.31.1, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES= $CONFIG_FILES
@@ -14495,7 +14495,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/&/g'`"
 ac_cs_version="\\
-sqlite config.status 3.31.0
+sqlite config.status 3.31.1
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 

Modified: head/contrib/sqlite3/configure.ac
==
--- head/contrib/sqlite3/configure.ac   Thu Apr 23 13:46:34 2020
(r360221)
+++ head/contrib/sqlite3/configure.ac   Thu Apr 23 13:58:11 2020
(r360222)
@@ -10,7 +10,7 @@
 #
 
 AC_PREREQ(2.61)
-AC_INIT(sqlite, 3.31.0, http://www.sqlite.org)
+AC_INIT(sqlite, 3.31.1, http://www.sqlite.org)
 AC_CONFIG_SRCDIR([sqlite3.c])
 AC_CONFIG_AUX_DIR([.])
 

Modified: head/contrib/sqlite3/sqlite3.c
==
--- head/contrib/sqlite3/sqlite3.c  Thu Apr 23 13:46:34 2020
(r360221)
+++ head/contrib/sqlite3/sqlite3.c  Thu Apr 23 13:58:11 2020
(r360222)
@@ -1,6 +1,6 @@
 /**
 ** This file is an amalgamation of many separate C source files from SQLite
-** version 3.31.0.  By combining all the individual C code files into this
+** version 3.31.1.  By combining all the individual C code files into this
 ** single large file, the entire code can be compiled as a single translation
 ** unit.  This allows many compilers to do optimizations that would not be
 ** possible if the files were compiled separately.  Performance improvements
@@ -1165,9 +1165,9 @@ extern "C" {
 *

svn commit: r360223 - head/contrib/sqlite3

2020-04-23 Thread Cy Schubert
Author: cy
Date: Thu Apr 23 14:08:40 2020
New Revision: 360223
URL: https://svnweb.freebsd.org/changeset/base/360223

Log:
  Fix PowerPC segfault.
  
  The segfault fix was originally developed by our upstream, sqlite.org,
  to address S/390 and Sparc segfaults, both of which are big endian.
  Our PowerPC is also big endian, which this patch also fixes.
  
  Reported by:  Mark Millard 
  Tested by:Mark Millard 
  Obtained from:https://www.sqlite.org/src/vinfo/04885763c4cd00cb?diff=1
https://sqlite.org/forum/forumpost/672291a5b2
  MFC after:1 month
  X-MFC with:   r360221, 360221

Modified:
  head/contrib/sqlite3/sqlite3.c

Modified: head/contrib/sqlite3/sqlite3.c
==
--- head/contrib/sqlite3/sqlite3.c  Thu Apr 23 13:58:11 2020
(r360222)
+++ head/contrib/sqlite3/sqlite3.c  Thu Apr 23 14:08:40 2020
(r360223)
@@ -121302,12 +121302,14 @@ SQLITE_PRIVATE void sqlite3GenerateConstraintChecks(
 x = *sqlite3VdbeGetOp(v, addrConflictCk);
 if( x.opcode!=OP_IdxRowid ){
   int p2;  /* New P2 value for copied conflict check opcode */
+  const char *zP4;
   if( sqlite3OpcodeProperty[x.opcode]&OPFLG_JUMP ){
 p2 = lblRecheckOk;
   }else{
 p2 = x.p2;
   }
-  sqlite3VdbeAddOp4(v, x.opcode, x.p1, p2, x.p3, x.p4.z, x.p4type);
+  zP4 = x.p4type==P4_INT32 ? SQLITE_INT_TO_PTR(x.p4.i) : x.p4.z;
+  sqlite3VdbeAddOp4(v, x.opcode, x.p1, p2, x.p3, zP4, x.p4type);
   sqlite3VdbeChangeP5(v, x.p5);
   VdbeCoverageIf(v, p2!=x.p2);
 }
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r360224 - head/sys/dev/acpica

2020-04-23 Thread Conrad Meyer
Author: cem
Date: Thu Apr 23 17:30:03 2020
New Revision: 360224
URL: https://svnweb.freebsd.org/changeset/base/360224

Log:
  acpi_ec(4): Don't probe erroneously if success occurred
  
  In r360131, acpi_ec probe was changed to not clobber an error status prior to
  several error cases that did not explicitly set the error variable before
  goto'ing the exit path.  However, I did not notice that the error variable was
  not set to success in the success path.  That caused all successful probes to
  fail, which is obviously undesirable.
  
  PR:   245778
  Reported by:  Neel Chauhan , Evilham 
  Tested by:Evilham
  X-MFC-With:   r360131

Modified:
  head/sys/dev/acpica/acpi_ec.c

Modified: head/sys/dev/acpica/acpi_ec.c
==
--- head/sys/dev/acpica/acpi_ec.c   Thu Apr 23 14:08:40 2020
(r360223)
+++ head/sys/dev/acpica/acpi_ec.c   Thu Apr 23 17:30:03 2020
(r360224)
@@ -443,6 +443,8 @@ acpi_ec_probe(device_t dev)
 
 if (buf.Pointer)
AcpiOsFree(buf.Pointer);
+
+ret = rc;
 out:
 if (ret <= 0) {
snprintf(desc, sizeof(desc), "Embedded Controller: GPE %#x%s%s",
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r360226 - in head/sbin: decryptcore dumpon

2020-04-23 Thread Conrad Meyer
Author: cem
Date: Thu Apr 23 17:56:48 2020
New Revision: 360226
URL: https://svnweb.freebsd.org/changeset/base/360226

Log:
  EKCD: Preload error strings, PRNG seed; use OAEP padding
  
  Preload OpenSSL ERR string data so that the formatted error messages are
  vaguely meaningful. Add OpenSSL error information to the RSA_public_encrypt()
  operation failure case in one-time key generation.
  
  For obsolescent OpenSSL versions (*cough* FIPS *cough*), pre-seed the PRNG
  before entering Cap mode, as old versions of OpenSSL are unaware of kernel
  RNG interfaces aside from /dev/random (such as the long-supported kern.arnd, 
or
  the slightly more recent getentropy(3) or getrandom(2)). (RSA_public_encrypt()
  wants a seeded PRNG to randomize the "PS" portion of PKCS 1.5 padding or the
  "MGF" pseudo-random function in OAEP padding.)
  
  Switch dumpon to encrypt the one-time key with OAEP padding (recommended since
  1998; RFC2437) rather than the obsolescent PKCS 1.5 padding (1993; RFC2313).
  
  Switch decryptcore to attempt OAEP decryption first, and try PKCS 1.5
  decryption on failure. This is intended only for transition convenience, and
  we should obsolete support for non-OAEP padding in a release or two.
  
  Reviewed by:  markj
  MFC After:2 weeks
  Sponsored by: Dell EMC Isilon
  Differential Revision:https://reviews.freebsd.org/D24534

Modified:
  head/sbin/decryptcore/decryptcore.c
  head/sbin/dumpon/dumpon.c

Modified: head/sbin/decryptcore/decryptcore.c
==
--- head/sbin/decryptcore/decryptcore.c Thu Apr 23 17:46:29 2020
(r360225)
+++ head/sbin/decryptcore/decryptcore.c Thu Apr 23 17:56:48 2020
(r360226)
@@ -219,6 +219,10 @@ decrypt(int ofd, const char *privkeyfile, const char *
 
if (RSA_private_decrypt(kdk->kdk_encryptedkeysize,
kdk->kdk_encryptedkey, key, privkey,
+   RSA_PKCS1_OAEP_PADDING) != sizeof(key) &&
+   /* Fallback to deprecated, formerly-used PKCS 1.5 padding. */
+   RSA_private_decrypt(kdk->kdk_encryptedkeysize,
+   kdk->kdk_encryptedkey, key, privkey,
RSA_PKCS1_PADDING) != sizeof(key)) {
pjdlog_error("Unable to decrypt key: %s",
ERR_error_string(ERR_get_error(), NULL));

Modified: head/sbin/dumpon/dumpon.c
==
--- head/sbin/dumpon/dumpon.c   Thu Apr 23 17:46:29 2020(r360225)
+++ head/sbin/dumpon/dumpon.c   Thu Apr 23 17:56:48 2020(r360226)
@@ -77,6 +77,7 @@ __FBSDID("$FreeBSD$");
 #ifdef HAVE_CRYPTO
 #include 
 #include 
+#include 
 #include 
 #endif
 
@@ -224,6 +225,18 @@ genkey(const char *pubkeyfile, struct diocskerneldump_
if (fp == NULL)
err(1, "Unable to open %s", pubkeyfile);
 
+   /*
+* Obsolescent OpenSSL only knows about /dev/random, and needs to
+* pre-seed before entering cap mode.  For whatever reason,
+* RSA_pub_encrypt uses the internal PRNG.
+*/
+#if OPENSSL_VERSION_NUMBER < 0x1010L
+   {
+   unsigned char c[1];
+   RAND_bytes(c, 1);
+   }
+#endif
+
if (caph_enter() < 0)
err(1, "Unable to enter capability mode");
 
@@ -286,8 +299,9 @@ genkey(const char *pubkeyfile, struct diocskerneldump_
arc4random_buf(kdap->kda_key, sizeof(kdap->kda_key));
if (RSA_public_encrypt(sizeof(kdap->kda_key), kdap->kda_key,
kdap->kda_encryptedkey, pubkey,
-   RSA_PKCS1_PADDING) != (int)kdap->kda_encryptedkeysize) {
-   errx(1, "Unable to encrypt the one-time key.");
+   RSA_PKCS1_OAEP_PADDING) != (int)kdap->kda_encryptedkeysize) {
+   errx(1, "Unable to encrypt the one-time key: %s",
+   ERR_error_string(ERR_get_error(), NULL));
}
RSA_free(pubkey);
 }
@@ -470,8 +484,11 @@ main(int argc, char *argv[])
usage();
 
 #ifdef HAVE_CRYPTO
-   if (cipher != KERNELDUMP_ENC_NONE && pubkeyfile == NULL)
+   if (cipher != KERNELDUMP_ENC_NONE && pubkeyfile == NULL) {
errx(EX_USAGE, "-C option requires a public key file.");
+   } else if (pubkeyfile != NULL) {
+   ERR_load_crypto_strings();
+   }
 #else
if (pubkeyfile != NULL)
errx(EX_UNAVAILABLE,"Unable to use the public key."
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r360227 - head/sbin/dumpon

2020-04-23 Thread Conrad Meyer
Author: cem
Date: Thu Apr 23 18:04:52 2020
New Revision: 360227
URL: https://svnweb.freebsd.org/changeset/base/360227

Log:
  dumpon.8: Update minimum key size language
  
  dumpon(8) has not accepted 1024-bit RSA keys since prior to r339784 (2018-10).
  The manual page language was not updated at that time (oops).  The minimum
  accepted is 2048 bits, which is also a good default choice.
  
  Sponsored by: Dell EMC Isilon

Modified:
  head/sbin/dumpon/dumpon.8

Modified: head/sbin/dumpon/dumpon.8
==
--- head/sbin/dumpon/dumpon.8   Thu Apr 23 17:56:48 2020(r360226)
+++ head/sbin/dumpon/dumpon.8   Thu Apr 23 18:04:52 2020(r360227)
@@ -28,7 +28,7 @@
 .\" From: @(#)swapon.8 8.1 (Berkeley) 6/5/93
 .\" $FreeBSD$
 .\"
-.Dd May 23, 2019
+.Dd April 23, 2020
 .Dt DUMPON 8
 .Os
 .Sh NAME
@@ -130,7 +130,7 @@ The goal of the mechanism is to provide confidentialit
 .Pp
 The
 .Va pubkey
-file should be a PEM-formatted RSA key of at least 1024 bits.
+file should be a PEM-formatted RSA key of at least 2048 bits.
 .It Fl C Ar cipher
 Select the symmetric algorithm used for encrypted kernel crash dump.
 The default is
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r360228 - head/sys/arm64/rockchip

2020-04-23 Thread Emmanuel Vadot
Author: manu
Date: Thu Apr 23 19:16:20 2020
New Revision: 360228
URL: https://svnweb.freebsd.org/changeset/base/360228

Log:
  arm64: rockchip: Fix TSADC on RK3328
  
  The TSADC familiy is a little bit more complex than V2 and V3.
  Early revision do not use syscon and do not use qsel (RK3288).
  Next revision still do not use syscon but uses qsel (RK3328).
  Final revision use both.
  
  Submitted by: peterj
  MFC after:1 month

Modified:
  head/sys/arm64/rockchip/rk_tsadc.c

Modified: head/sys/arm64/rockchip/rk_tsadc.c
==
--- head/sys/arm64/rockchip/rk_tsadc.c  Thu Apr 23 18:04:52 2020
(r360227)
+++ head/sys/arm64/rockchip/rk_tsadc.c  Thu Apr 23 19:16:20 2020
(r360228)
@@ -98,24 +98,19 @@ struct tsensor {
int channel;
 };
 
-enum tsadc_type {
-   RK_TSADC_V2,
-   RK_TSADC_V3
-};
-
 struct rk_calib_entry {
uint32_traw;
int temp;
 };
 
 struct tsadc_calib_info {
-   bool decrement_mode;
struct rk_calib_entry   *table;
int nentries;
 };
 
 struct tsadc_conf {
-   enum tsadc_type type;
+   int use_syscon;
+   int q_sel_ntc;
int shutdown_temp;
int shutdown_mode;
int shutdown_pol;
@@ -188,7 +183,8 @@ struct tsensor rk3288_tsensors[] = {
 };
 
 struct tsadc_conf rk3288_tsadc_conf = {
-   .type = RK_TSADC_V2,
+   .use_syscon =   0,
+   .q_sel_ntc =0,
.shutdown_temp =95000,
.shutdown_mode =1, /* GPIO */
.shutdown_pol = 0, /* Low  */
@@ -241,7 +237,8 @@ static struct tsensor rk3328_tsensors[] = {
 };
 
 static struct tsadc_conf rk3328_tsadc_conf = {
-   .type = RK_TSADC_V3,
+   .use_syscon =   0,
+   .q_sel_ntc =1,
.shutdown_temp =95000,
.shutdown_mode =0, /* CRU */
.shutdown_pol = 0, /* Low  */
@@ -296,7 +293,8 @@ static struct tsensor rk3399_tsensors[] = {
 };
 
 static struct tsadc_conf rk3399_tsadc_conf = {
-   .type = RK_TSADC_V3,
+   .use_syscon =   1,
+   .q_sel_ntc =1,
.shutdown_temp =95000,
.shutdown_mode =1, /* GPIO */
.shutdown_pol = 0, /* Low  */
@@ -444,11 +442,11 @@ tsadc_init(struct tsadc_softc *sc)
val |= TSADC_AUTO_CON_POL_HI;
else
val &= ~TSADC_AUTO_CON_POL_HI;
-   if (sc->conf->type == RK_TSADC_V3)
+   if (sc->conf->q_sel_ntc)
val |= TSADC_AUTO_Q_SEL;
WR4(sc, TSADC_AUTO_CON, val);
 
-   if (sc->conf->type == RK_TSADC_V2) {
+   if (!sc->conf->use_syscon) {
/* V2 init */
WR4(sc, TSADC_AUTO_PERIOD, 250);/* 250 ms */
WR4(sc, TSADC_AUTO_PERIOD_HT, 50);  /*  50 ms */
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r360229 - head/usr.sbin/bhyve

2020-04-23 Thread Allan Jude
Author: allanjude
Date: Thu Apr 23 19:20:58 2020
New Revision: 360229
URL: https://svnweb.freebsd.org/changeset/base/360229

Log:
  Add VIRTIO_BLK_T_DISCARD (TRIM) support to the bhyve virtio-blk backend
  
  This will advertise support for TRIM to the guest virtio-blk driver and
  perform the DIOCGDELETE ioctl on the backing storage if it supports it.
  
  Thanks to Jason King and others at Joyent and illumos for expanding on
  my original patch, adding improvements including better error handling
  and making sure to following the virtio spec.
  
  Submitted by: Jason King  (improvements)
  Reviewed by:  jhb
  Obtained from:illumos-joyent (improvements)
  MFC after:1 month
  Relnotes: yes
  Sponsored by: Klara Inc.
  Differential Revision:https://reviews.freebsd.org/D21707

Modified:
  head/usr.sbin/bhyve/block_if.c
  head/usr.sbin/bhyve/pci_virtio_block.c

Modified: head/usr.sbin/bhyve/block_if.c
==
--- head/usr.sbin/bhyve/block_if.c  Thu Apr 23 19:16:20 2020
(r360228)
+++ head/usr.sbin/bhyve/block_if.c  Thu Apr 23 19:20:58 2020
(r360229)
@@ -3,6 +3,7 @@
  *
  * Copyright (c) 2013  Peter Grehan 
  * All rights reserved.
+ * Copyright 2020 Joyent, Inc.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -410,6 +411,8 @@ blockif_open(const char *optstr, const char *ident)
off_t size, psectsz, psectoff;
int extra, fd, i, sectsz;
int nocache, sync, ro, candelete, geom, ssopt, pssopt;
+   int nodelete;
+
 #ifndef WITHOUT_CAPSICUM
cap_rights_t rights;
cap_ioctl_t cmds[] = { DIOCGFLUSH, DIOCGDELETE };
@@ -422,6 +425,7 @@ blockif_open(const char *optstr, const char *ident)
nocache = 0;
sync = 0;
ro = 0;
+   nodelete = 0;
 
/*
 * The first element in the optstring is always a pathname.
@@ -434,6 +438,8 @@ blockif_open(const char *optstr, const char *ident)
continue;
else if (!strcmp(cp, "nocache"))
nocache = 1;
+   else if (!strcmp(cp, "nodelete"))
+   nodelete = 1;
else if (!strcmp(cp, "sync") || !strcmp(cp, "direct"))
sync = 1;
else if (!strcmp(cp, "ro"))
@@ -500,7 +506,7 @@ blockif_open(const char *optstr, const char *ident)
ioctl(fd, DIOCGSTRIPEOFFSET, &psectoff);
strlcpy(arg.name, "GEOM::candelete", sizeof(arg.name));
arg.len = sizeof(arg.value.i);
-   if (ioctl(fd, DIOCGATTR, &arg) == 0)
+   if (nodelete == 0 && ioctl(fd, DIOCGATTR, &arg) == 0)
candelete = arg.value.i;
if (ioctl(fd, DIOCGPROVIDERNAME, name) == 0)
geom = 1;

Modified: head/usr.sbin/bhyve/pci_virtio_block.c
==
--- head/usr.sbin/bhyve/pci_virtio_block.c  Thu Apr 23 19:16:20 2020
(r360228)
+++ head/usr.sbin/bhyve/pci_virtio_block.c  Thu Apr 23 19:20:58 2020
(r360229)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 2011 NetApp, Inc.
  * All rights reserved.
- * Copyright (c) 2019 Joyent, Inc.
+ * Copyright 2020 Joyent, Inc.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -57,26 +57,37 @@ __FBSDID("$FreeBSD$");
 #include "virtio.h"
 #include "block_if.h"
 
-#define VTBLK_RINGSZ   128
+#defineVTBLK_BSIZE 512
+#defineVTBLK_RINGSZ128
 
 _Static_assert(VTBLK_RINGSZ <= BLOCKIF_RING_MAX, "Each ring entry must be able 
to queue a request");
 
-#define VTBLK_S_OK 0
-#define VTBLK_S_IOERR  1
+#defineVTBLK_S_OK  0
+#defineVTBLK_S_IOERR   1
 #defineVTBLK_S_UNSUPP  2
 
 #defineVTBLK_BLK_ID_BYTES  20 + 1
 
 /* Capability bits */
-#defineVTBLK_F_SEG_MAX (1 << 2)/* Maximum request 
segments */
-#defineVTBLK_F_BLK_SIZE(1 << 6)/* cfg block size valid 
*/
-#defineVTBLK_F_FLUSH   (1 << 9)/* Cache flush support 
*/
-#defineVTBLK_F_TOPOLOGY(1 << 10)   /* Optimal I/O 
alignment */
+#defineVTBLK_F_BARRIER (1 << 0)/* Does host support 
barriers? */
+#defineVTBLK_F_SIZE_MAX(1 << 1)/* Indicates maximum 
segment size */
+#defineVTBLK_F_SEG_MAX (1 << 2)/* Indicates maximum # 
of segments */
+#defineVTBLK_F_GEOMETRY(1 << 4)/* Legacy geometry 
available  */
+#defineVTBLK_F_RO  (1 << 5)/* Disk is read-only */
+#defineVTBLK_F_BLK_SIZE(1 << 6)/* Block size of disk 
is available*/
+#define   

svn commit: r360230 - head/usr.sbin/trim

2020-04-23 Thread Allan Jude
Author: allanjude
Date: Thu Apr 23 20:14:59 2020
New Revision: 360230
URL: https://svnweb.freebsd.org/changeset/base/360230

Log:
  trim(8): candelete() returns wrong results because fd is opened O_WRONLY
  
  This was discovered while using trim(8) to test bhyve trim
  
  Reviewed by:  asomers
  Differential Revision:https://reviews.freebsd.org/D24371

Modified:
  head/usr.sbin/trim/trim.c

Modified: head/usr.sbin/trim/trim.c
==
--- head/usr.sbin/trim/trim.c   Thu Apr 23 19:20:58 2020(r360229)
+++ head/usr.sbin/trim/trim.c   Thu Apr 23 20:14:59 2020(r360230)
@@ -220,7 +220,7 @@ trim(const char *path, off_t offset, off_t length, boo
return (0);
}
 
-   fd = opendev(path, O_WRONLY | O_DIRECT);
+   fd = opendev(path, O_RDWR | O_DIRECT);
arg[0] = offset;
arg[1] = length;
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r360231 - head/lib/libc/net

2020-04-23 Thread Kristof Provost
Author: kp
Date: Thu Apr 23 21:16:51 2020
New Revision: 360231
URL: https://svnweb.freebsd.org/changeset/base/360231

Log:
  libc: Shortcut if_indextoname() if index == 0
  
  If the index we're trying to convert is 0 we can avoid a potentially
  expensive call to getifaddrs(). No interface has an ifindex of zero, so
  we can handle this as an error: set the errno to ENXIO and return NULL.
  
  Submitted by: Nick Rogers
  Reviewed by:  lutz at donnerhacke.de
  MFC after:2 weeks
  Sponsored by: RG Nets
  Differential Revision:https://reviews.freebsd.org/D24524

Modified:
  head/lib/libc/net/if_indextoname.c

Modified: head/lib/libc/net/if_indextoname.c
==
--- head/lib/libc/net/if_indextoname.c  Thu Apr 23 20:14:59 2020
(r360230)
+++ head/lib/libc/net/if_indextoname.c  Thu Apr 23 21:16:51 2020
(r360231)
@@ -66,6 +66,11 @@ if_indextoname(unsigned int ifindex, char *ifname)
struct ifaddrs *ifaddrs, *ifa;
int error = 0;
 
+   if (ifindex == 0) {
+   errno = ENXIO;
+   return(NULL);
+   }
+
if (getifaddrs(&ifaddrs) < 0)
return(NULL);   /* getifaddrs properly set errno */
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r360232 - head/sys/dev/cxgbe/crypto

2020-04-23 Thread Navdeep Parhar
Author: np
Date: Thu Apr 23 23:54:23 2020
New Revision: 360232
URL: https://svnweb.freebsd.org/changeset/base/360232

Log:
  cxgbe/crypto: Fix the key size in a couple of places to catch up with
  the recent OCF refactor.
  
  Sponsored by: Chelsio Communications

Modified:
  head/sys/dev/cxgbe/crypto/t4_kern_tls.c

Modified: head/sys/dev/cxgbe/crypto/t4_kern_tls.c
==
--- head/sys/dev/cxgbe/crypto/t4_kern_tls.c Thu Apr 23 21:16:51 2020
(r360231)
+++ head/sys/dev/cxgbe/crypto/t4_kern_tls.c Thu Apr 23 23:54:23 2020
(r360232)
@@ -812,11 +812,11 @@ ktls_setup_keys(struct tlspcb *tlsp, const struct ktls
if (tlsp->enc_mode == SCMD_CIPH_MODE_AES_GCM) {
memcpy(khdr->txsalt, tls->params.iv, SALT_SIZE);
t4_init_gmac_hash(tls->params.cipher_key,
-   tls->params.cipher_key_len * 8,
+   tls->params.cipher_key_len,
(char *)key + tls->params.cipher_key_len);
} else {
t4_init_hmac_digest(axf, partial_digest_len,
-   tls->params.auth_key, tls->params.auth_key_len * 8,
+   tls->params.auth_key, tls->params.auth_key_len,
(char *)key + tls->params.cipher_key_len);
}
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r360233 - in head: contrib/jemalloc contrib/jemalloc/doc contrib/jemalloc/include/jemalloc contrib/jemalloc/include/jemalloc/internal contrib/jemalloc/src lib/libc/stdlib/jemalloc

2020-04-23 Thread Eric van Gyzen
Author: vangyzen
Date: Thu Apr 23 23:57:43 2020
New Revision: 360233
URL: https://svnweb.freebsd.org/changeset/base/360233

Log:
  Update jemalloc to version 5.2.1
  
  Revert r354606 to restore r354605.
  
  Apply one line from jemalloc commit d01b425e5d1e1 in hash_x86_128()
  to fix the build with gcc, which only allows a fallthrough attribute
  to appear before a case or default label.
  
  Submitted by: jasone in r354605
  Discussed with:   jasone
  Reviewed by:  bdrewery
  MFC after:never, due to gcc 4.2.1
  Relnotes: yes
  Sponsored by: Dell EMC Isilon
  Differential Revision:https://reviews.freebsd.org/D24522

Added:
  head/contrib/jemalloc/include/jemalloc/internal/bin_types.h
 - copied unchanged from r354605, 
head/contrib/jemalloc/include/jemalloc/internal/bin_types.h
  head/contrib/jemalloc/include/jemalloc/internal/hook.h
 - copied unchanged from r354605, 
head/contrib/jemalloc/include/jemalloc/internal/hook.h
  
head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_defs_FreeBSD.h
 - copied unchanged from r354605, 
head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_defs_FreeBSD.h
  head/contrib/jemalloc/include/jemalloc/internal/quantum.h
 - copied unchanged from r354605, 
head/contrib/jemalloc/include/jemalloc/internal/quantum.h
  head/contrib/jemalloc/include/jemalloc/internal/safety_check.h
 - copied unchanged from r354605, 
head/contrib/jemalloc/include/jemalloc/internal/safety_check.h
  head/contrib/jemalloc/include/jemalloc/internal/sc.h
 - copied unchanged from r354605, 
head/contrib/jemalloc/include/jemalloc/internal/sc.h
  head/contrib/jemalloc/include/jemalloc/internal/seq.h
 - copied unchanged from r354605, 
head/contrib/jemalloc/include/jemalloc/internal/seq.h
  head/contrib/jemalloc/include/jemalloc/internal/test_hooks.h
 - copied unchanged from r354605, 
head/contrib/jemalloc/include/jemalloc/internal/test_hooks.h
  head/contrib/jemalloc/src/hook.c
 - copied unchanged from r354605, head/contrib/jemalloc/src/hook.c
  head/contrib/jemalloc/src/safety_check.c
 - copied unchanged from r354605, head/contrib/jemalloc/src/safety_check.c
  head/contrib/jemalloc/src/sc.c
 - copied unchanged from r354605, head/contrib/jemalloc/src/sc.c
  head/contrib/jemalloc/src/test_hooks.c
 - copied unchanged from r354605, head/contrib/jemalloc/src/test_hooks.c
Deleted:
  head/contrib/jemalloc/include/jemalloc/internal/hooks.h
  head/contrib/jemalloc/include/jemalloc/internal/size_classes.h
  head/contrib/jemalloc/src/hooks.c
Modified:
  head/contrib/jemalloc/COPYING
  head/contrib/jemalloc/ChangeLog
  head/contrib/jemalloc/FREEBSD-Xlist
  head/contrib/jemalloc/FREEBSD-diffs
  head/contrib/jemalloc/VERSION
  head/contrib/jemalloc/doc/jemalloc.3
  head/contrib/jemalloc/include/jemalloc/internal/arena_externs.h
  head/contrib/jemalloc/include/jemalloc/internal/arena_inlines_b.h
  head/contrib/jemalloc/include/jemalloc/internal/arena_stats.h
  head/contrib/jemalloc/include/jemalloc/internal/arena_structs_b.h
  head/contrib/jemalloc/include/jemalloc/internal/arena_types.h
  head/contrib/jemalloc/include/jemalloc/internal/atomic.h
  head/contrib/jemalloc/include/jemalloc/internal/atomic_gcc_atomic.h
  head/contrib/jemalloc/include/jemalloc/internal/atomic_gcc_sync.h
  head/contrib/jemalloc/include/jemalloc/internal/background_thread_externs.h
  head/contrib/jemalloc/include/jemalloc/internal/background_thread_inlines.h
  head/contrib/jemalloc/include/jemalloc/internal/background_thread_structs.h
  head/contrib/jemalloc/include/jemalloc/internal/base_structs.h
  head/contrib/jemalloc/include/jemalloc/internal/bin.h
  head/contrib/jemalloc/include/jemalloc/internal/bin_stats.h
  head/contrib/jemalloc/include/jemalloc/internal/bit_util.h
  head/contrib/jemalloc/include/jemalloc/internal/bitmap.h
  head/contrib/jemalloc/include/jemalloc/internal/cache_bin.h
  head/contrib/jemalloc/include/jemalloc/internal/ctl.h
  head/contrib/jemalloc/include/jemalloc/internal/emitter.h
  head/contrib/jemalloc/include/jemalloc/internal/extent_externs.h
  head/contrib/jemalloc/include/jemalloc/internal/extent_inlines.h
  head/contrib/jemalloc/include/jemalloc/internal/extent_structs.h
  head/contrib/jemalloc/include/jemalloc/internal/extent_types.h
  head/contrib/jemalloc/include/jemalloc/internal/hash.h
  head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_decls.h
  head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h
  head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_externs.h
  head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_a.h
  head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_b.h
  head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_c.h
  head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_macros.h
  head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h
  head/contrib/jemallo

svn commit: r360235 - head/sys/bsm

2020-04-23 Thread Kyle Evans
Author: kevans
Date: Fri Apr 24 01:27:25 2020
New Revision: 360235
URL: https://svnweb.freebsd.org/changeset/base/360235

Log:
  bsm: add AUE_CLOSERANGE
  
  AUE_CLOSERANGE has been accepted upstream as 43265; AUE_REALPATHAT has now
  been upstreamed.

Modified:
  head/sys/bsm/audit_kevents.h

Modified: head/sys/bsm/audit_kevents.h
==
--- head/sys/bsm/audit_kevents.hFri Apr 24 00:08:39 2020
(r360234)
+++ head/sys/bsm/audit_kevents.hFri Apr 24 01:27:25 2020
(r360235)
@@ -658,6 +658,7 @@
 #defineAUE_EXECVEAT43262   /* FreeBSD/Linux. */
 #defineAUE_SHMRENAME   43263   /* FreeBSD-specific. */
 #defineAUE_REALPATHAT  43264   /* FreeBSD-specific. */
+#defineAUE_CLOSERANGE  43265   /* FreeBSD-specific. */
 
 /*
  * Darwin BSM uses a number of AUE_O_* definitions, which are aliased to the
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r360236 - in head/sys: compat/freebsd32 kern

2020-04-23 Thread Kyle Evans
Author: kevans
Date: Fri Apr 24 01:30:00 2020
New Revision: 360236
URL: https://svnweb.freebsd.org/changeset/base/360236

Log:
  close_range(2): use newly assigned AUE_CLOSERANGE

Modified:
  head/sys/compat/freebsd32/syscalls.master
  head/sys/kern/syscalls.master

Modified: head/sys/compat/freebsd32/syscalls.master
==
--- head/sys/compat/freebsd32/syscalls.master   Fri Apr 24 01:27:25 2020
(r360235)
+++ head/sys/compat/freebsd32/syscalls.master   Fri Apr 24 01:30:00 2020
(r360236)
@@ -1162,7 +1162,7 @@
 573AUE_NULLNOPROTO { int sigfastblock(int cmd, uint32_t *ptr); }
 574AUE_REALPATHAT  NOPROTO { int __realpathat(int fd, const char *path, \
char *buf, size_t size, int flags); }
-575AUE_NULLNOPROTO { int close_range(u_int lowfd, u_int highfd, \
+575AUE_CLOSERANGE  NOPROTO { int close_range(u_int lowfd, u_int highfd, \
int flags); }
 
 ; vim: syntax=off

Modified: head/sys/kern/syscalls.master
==
--- head/sys/kern/syscalls.master   Fri Apr 24 01:27:25 2020
(r360235)
+++ head/sys/kern/syscalls.master   Fri Apr 24 01:30:00 2020
(r360236)
@@ -3227,7 +3227,7 @@
int flags
);
}
-575AUE_NULLSTD {
+575AUE_CLOSERANGE  STD {
int close_range(
u_int lowfd,
u_int highfd,
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r360237 - in head/sys: compat/freebsd32 kern sys

2020-04-23 Thread Kyle Evans
Author: kevans
Date: Fri Apr 24 01:30:33 2020
New Revision: 360237
URL: https://svnweb.freebsd.org/changeset/base/360237

Log:
  sysent: re-roll after 360236 (AUE_CLOSERANGE used)

Modified:
  head/sys/compat/freebsd32/freebsd32_sysent.c
  head/sys/kern/init_sysent.c
  head/sys/sys/sysproto.h

Modified: head/sys/compat/freebsd32/freebsd32_sysent.c
==
--- head/sys/compat/freebsd32/freebsd32_sysent.cFri Apr 24 01:30:00 
2020(r360236)
+++ head/sys/compat/freebsd32/freebsd32_sysent.cFri Apr 24 01:30:33 
2020(r360237)
@@ -664,5 +664,5 @@ struct sysent freebsd32_sysent[] = {
{ AS(shm_rename_args), (sy_call_t *)sys_shm_rename, AUE_SHMRENAME, 
NULL, 0, 0, 0, SY_THR_STATIC },  /* 572 = shm_rename */
{ AS(sigfastblock_args), (sy_call_t *)sys_sigfastblock, AUE_NULL, NULL, 
0, 0, SYF_CAPENABLED, SY_THR_STATIC },  /* 573 = sigfastblock */
{ AS(__realpathat_args), (sy_call_t *)sys___realpathat, AUE_REALPATHAT, 
NULL, 0, 0, 0, SY_THR_STATIC }, /* 574 = __realpathat */
-   { AS(close_range_args), (sy_call_t *)sys_close_range, AUE_NULL, NULL, 
0, 0, SYF_CAPENABLED, SY_THR_STATIC },/* 575 = close_range */
+   { AS(close_range_args), (sy_call_t *)sys_close_range, AUE_CLOSERANGE, 
NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },  /* 575 = close_range */
 };

Modified: head/sys/kern/init_sysent.c
==
--- head/sys/kern/init_sysent.c Fri Apr 24 01:30:00 2020(r360236)
+++ head/sys/kern/init_sysent.c Fri Apr 24 01:30:33 2020(r360237)
@@ -630,5 +630,5 @@ struct sysent sysent[] = {
{ AS(shm_rename_args), (sy_call_t *)sys_shm_rename, AUE_SHMRENAME, 
NULL, 0, 0, 0, SY_THR_STATIC },  /* 572 = shm_rename */
{ AS(sigfastblock_args), (sy_call_t *)sys_sigfastblock, AUE_NULL, NULL, 
0, 0, SYF_CAPENABLED, SY_THR_STATIC },  /* 573 = sigfastblock */
{ AS(__realpathat_args), (sy_call_t *)sys___realpathat, AUE_REALPATHAT, 
NULL, 0, 0, 0, SY_THR_STATIC }, /* 574 = __realpathat */
-   { AS(close_range_args), (sy_call_t *)sys_close_range, AUE_NULL, NULL, 
0, 0, SYF_CAPENABLED, SY_THR_STATIC },/* 575 = close_range */
+   { AS(close_range_args), (sy_call_t *)sys_close_range, AUE_CLOSERANGE, 
NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },  /* 575 = close_range */
 };

Modified: head/sys/sys/sysproto.h
==
--- head/sys/sys/sysproto.h Fri Apr 24 01:30:00 2020(r360236)
+++ head/sys/sys/sysproto.h Fri Apr 24 01:30:33 2020(r360237)
@@ -3151,7 +3151,7 @@ int   freebsd12_closefrom(struct thread *, struct 
freebs
 #defineSYS_AUE_shm_rename  AUE_SHMRENAME
 #defineSYS_AUE_sigfastblockAUE_NULL
 #defineSYS_AUE___realpathatAUE_REALPATHAT
-#defineSYS_AUE_close_range AUE_NULL
+#defineSYS_AUE_close_range AUE_CLOSERANGE
 
 #undef PAD_
 #undef PADL_
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r360240 - head/contrib/tzdata

2020-04-23 Thread Philip Paeps
Author: philip
Date: Fri Apr 24 05:05:58 2020
New Revision: 360240
URL: https://svnweb.freebsd.org/changeset/base/360240

Log:
  Import tzdata 2020a
  
  Changes: https://github.com/eggert/tz/blob/2020a/NEWS
  
  MFC after:3 days

Modified:
  head/contrib/tzdata/Makefile
  head/contrib/tzdata/NEWS
  head/contrib/tzdata/africa
  head/contrib/tzdata/asia
  head/contrib/tzdata/backward
  head/contrib/tzdata/backzone
  head/contrib/tzdata/europe
  head/contrib/tzdata/leap-seconds.list
  head/contrib/tzdata/leapseconds
  head/contrib/tzdata/leapseconds.awk
  head/contrib/tzdata/northamerica
  head/contrib/tzdata/theory.html
  head/contrib/tzdata/version
  head/contrib/tzdata/zone.tab
  head/contrib/tzdata/zone1970.tab
Directory Properties:
  head/contrib/tzdata/   (props changed)

Modified: head/contrib/tzdata/Makefile
==
--- head/contrib/tzdata/MakefileFri Apr 24 04:54:47 2020
(r360239)
+++ head/contrib/tzdata/MakefileFri Apr 24 05:05:58 2020
(r360240)
@@ -150,6 +150,15 @@ TIME_T_ALTERNATIVES_TAIL = int32_t uint32_t uint64_t
 
 REDO=  posix_right
 
+# Whether to put an "Expires" line in the leapseconds file.
+# Use EXPIRES_LINE=1 to put the line in, 0 to omit it.
+# The EXPIRES_LINE value matters only if REDO's value contains "right".
+# If you change EXPIRES_LINE, remove the leapseconds file before running 
"make".
+# zic's support for the Expires line was introduced in tzdb 2020a,
+# and EXPIRES_LINE defaults to 0 for now so that the leapseconds file
+# can be given to older zic implementations.
+EXPIRES_LINE=  0
+
 # To install data in text form that has all the information of the TZif data,
 # (optionally incorporating leap second information), use
 #  TZDATA_TEXT=tzdata.zi leapseconds
@@ -295,8 +304,9 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \
 # than TM_GMTOFF and TM_ZONE.  However, most of them are standardized.
 # #
 # # To omit or support the external variable "tzname", add one of:
-# #-DHAVE_TZNAME=0
-# #-DHAVE_TZNAME=1
+# #-DHAVE_TZNAME=0 # do not support "tzname"
+# #-DHAVE_TZNAME=1 # support "tzname", which is defined by system library
+# #-DHAVE_TZNAME=2 # support and define "tzname"
 # # to the "CFLAGS=" line.  "tzname" is required by POSIX 1988 and later.
 # # If not defined, the code attempts to guess HAVE_TZNAME from other macros.
 # # Warning: unless time_tz is also defined, HAVE_TZNAME=1 can cause
@@ -304,16 +314,20 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \
 # # presumably due to memory allocation issues.
 # #
 # # To omit or support the external variables "timezone" and "daylight", add
-# #-DUSG_COMPAT=0
-# #-DUSG_COMPAT=1
+# #-DUSG_COMPAT=0 # do not support
+# #-DUSG_COMPAT=1 # support, and variables are defined by system library
+# #-DUSG_COMPAT=2 # support and define variables
 # # to the "CFLAGS=" line; "timezone" and "daylight" are inspired by
 # # Unix Systems Group code and are required by POSIX 2008 (with XSI) and 
later.
 # # If not defined, the code attempts to guess USG_COMPAT from other macros.
 # #
 # # To support the external variable "altzone", add
-# #-DALTZONE
+# #-DALTZONE=0 # do not support
+# #-DALTZONE=1 # support "altzone", which is defined by system library
+# #-DALTZONE=2 # support and define "altzone"
 # # to the end of the "CFLAGS=" line; although "altzone" appeared in
 # # System V Release 3.1 it has not been standardized.
+# # If not defined, the code attempts to guess ALTZONE from other macros.
 #
 # If you want functions that were inspired by early versions of X3J11's work,
 # add
@@ -321,9 +335,7 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \
 # to the end of the "CFLAGS=" line.  This arranges for the functions
 # "tzsetwall", "offtime", "timelocal", "timegm", "timeoff",
 # "posix2time", and "time2posix" to be added to the time conversion library.
-# "tzsetwall" is like "tzset" except that it arranges for local wall clock
-# time (rather than the timezone specified in the TZ environment variable)
-# to be used.
+# "tzsetwall" is deprecated and is intended to be removed soon; see NEWS.
 # "offtime" is like "gmtime" except that it accepts a second (long) argument
 # that gives an offset to add to the time_t when converting it.
 # "timelocal" is equivalent to "mktime".
@@ -333,7 +345,6 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \
 # that gives an offset to use when converting to a time_t.
 # "posix2time" and "time2posix" are described in an included manual page.
 # X3J11's work does not describe any of these functions.
-# Sun has provided "tzsetwall", "timelocal", and "timegm" in SunOS 4.0.
 # These functions may well disappear in future releases of the time
 # conversion package.
 #
@@ -505,11 +516,11 @@ RANLIB=   :
 TZCOBJS=   zic.o
 TZDOBJS=   zdump.o localtime.o asctime.o strftime.o
 DATEOBJS=  date.o localtime.o strfti

Re: svn commit: r360233 - in head: contrib/jemalloc contrib/jemalloc/doc contrib/jemalloc/include/jemalloc contrib/jemalloc/include/jemalloc/internal contrib/jemalloc/src lib/libc/stdlib/jemalloc

2020-04-23 Thread nonameless


> Author: vangyzen
> Date: Thu Apr 23 23:57:43 2020
> New Revision: 360233
> URL: https://svnweb.freebsd.org/changeset/base/360233
> 
> Log:
> Update jemalloc to version 5.2.1
> 
> Revert r354606 to restore r data-ukrnet-code="354605">354605.
> 
> Apply one line from jemalloc commit d01b425e5d1e1 in hash_x86_128()
> to fix the build with gcc, which only allows a fallthrough attribute
> to appear before a case or default label.
> 
> Submitted by: jasone in r354605
> Discussed with: jasone
> Reviewed by: bdrewery
> MFC after: never, due to gcc 4.2.1
> Relnotes: yes
> Sponsored by: Dell EMC Isilon
> Differential Revision: https://reviews.freebsd.org/D24522
> 
> ...

Thank you!
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"