svn commit: r360213 - head/bin/rm

2020-04-22 Thread Xin LI
Author: delphij
Date: Thu Apr 23 03:46:41 2020
New Revision: 360213
URL: https://svnweb.freebsd.org/changeset/base/360213

Log:
  Remove include of stdint.h.  It was added in r241014 for uintmax_t,
  which is gone in r340330 and is therefore no longer necessary.
  
  MFC after:2 weeks

Modified:
  head/bin/rm/rm.c

Modified: head/bin/rm/rm.c
==
--- head/bin/rm/rm.cWed Apr 22 23:53:28 2020(r360212)
+++ head/bin/rm/rm.cThu Apr 23 03:46:41 2020(r360213)
@@ -54,7 +54,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
___
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: r360211 - head/sys/dev/cxgbe/iw_cxgbe

2020-04-22 Thread Navdeep Parhar
Author: np
Date: Wed Apr 22 21:54:21 2020
New Revision: 360211
URL: https://svnweb.freebsd.org/changeset/base/360211

Log:
  cxgbe/iw_cxgbe: Create a LinuxKPI pci device for an adapter and use it
  as the dma_device during RDMA registration.
  
  cxgbe's struct device cannot be used as-is because it's a native FreeBSD
  driver and ibcore is LinuxKPI based.
  
  MFC after:1 week
  MFC after:r360196

Modified:
  head/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h
  head/sys/dev/cxgbe/iw_cxgbe/provider.c

Modified: head/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h
==
--- head/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h  Wed Apr 22 21:45:43 2020
(r360210)
+++ head/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h  Wed Apr 22 21:54:21 2020
(r360211)
@@ -261,6 +261,7 @@ out:
 
 struct c4iw_dev {
struct ib_device ibdev;
+   struct pci_dev pdev;
struct c4iw_rdev rdev;
u32 device_cap_flags;
struct idr cqidr;

Modified: head/sys/dev/cxgbe/iw_cxgbe/provider.c
==
--- head/sys/dev/cxgbe/iw_cxgbe/provider.c  Wed Apr 22 21:45:43 2020
(r360210)
+++ head/sys/dev/cxgbe/iw_cxgbe/provider.c  Wed Apr 22 21:54:21 2020
(r360211)
@@ -434,6 +434,9 @@ c4iw_register_device(struct c4iw_dev *dev)
 
CTR3(KTR_IW_CXGBE, "%s c4iw_dev %p, adapter %p", __func__, dev, sc);
BUG_ON(!sc->port[0]);
+   ret = linux_pci_attach_device(sc->dev, NULL, NULL, >pdev);
+   if (ret)
+   return (ret);
strlcpy(ibdev->name, device_get_nameunit(sc->dev), sizeof(ibdev->name));
memset(>node_guid, 0, sizeof(ibdev->node_guid));
memcpy(>node_guid, sc->port[0]->vi[0].hw_addr, ETHER_ADDR_LEN);
@@ -465,7 +468,7 @@ c4iw_register_device(struct c4iw_dev *dev)
strlcpy(ibdev->node_desc, C4IW_NODE_DESC, sizeof(ibdev->node_desc));
ibdev->phys_port_cnt = sc->params.nports;
ibdev->num_comp_vectors = 1;
-   ibdev->dma_device = NULL;
+   ibdev->dma_device = >pdev.dev;
ibdev->query_device = c4iw_query_device;
ibdev->query_port = c4iw_query_port;
ibdev->modify_port = c4iw_modify_port;
@@ -517,8 +520,10 @@ c4iw_register_device(struct c4iw_dev *dev)
ibdev->iwcm = iwcm;
 
ret = ib_register_device(>ibdev, NULL);
-   if (ret)
+   if (ret) {
kfree(iwcm);
+   linux_pci_detach_device(>pdev);
+   }
 
return (ret);
 }
@@ -531,6 +536,7 @@ c4iw_unregister_device(struct c4iw_dev *dev)
dev->rdev.adap);
ib_unregister_device(>ibdev);
kfree(dev->ibdev.iwcm);
+   linux_pci_detach_device(>pdev);
return;
 }
 #endif
___
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: r360210 - head/bin/sh

2020-04-22 Thread Jilles Tjoelker
Author: jilles
Date: Wed Apr 22 21:45:43 2020
New Revision: 360210
URL: https://svnweb.freebsd.org/changeset/base/360210

Log:
  sh: Remove remnants to compile out fc completely
  
  r360139 made compiling with NO_HISTORY work. This #define does not remove
  the fc and bind builtins completely but makes them always write an error
  message.
  
  However, there was also some code in builtins.def and mkbuiltins to remove
  the fc builtin entirely (but not the bind builtin). The additional build
  system complication to make this work seems not worth it, so remove that
  code.

Modified:
  head/bin/sh/builtins.def
  head/bin/sh/mkbuiltins

Modified: head/bin/sh/builtins.def
==
--- head/bin/sh/builtins.defWed Apr 22 21:22:33 2020(r360209)
+++ head/bin/sh/builtins.defWed Apr 22 21:45:43 2020(r360210)
@@ -39,8 +39,6 @@
 # of a C routine.
 # The -j flag specifies that this command is to be excluded from systems
 # without job control.
-# The -h flag specifies that this command is to be excluded from systems
-# based on the NO_HISTORY compile-time symbol.
 # The -n flag specifies that this command can safely be run in the same
 # process when it is the only command in a command substitution.  Some
 # commands have special logic defined in safe_builtin().
@@ -71,7 +69,7 @@ fgcmd -j  fg
 freebsd_wordexpcmd freebsd_wordexp
 getoptscmd getopts
 hashcmdhash
-histcmd -h fc
+histcmdfc
 jobidcmd -njobid
 jobscmd -n jobs
 killcmd -n kill

Modified: head/bin/sh/mkbuiltins
==
--- head/bin/sh/mkbuiltins  Wed Apr 22 21:22:33 2020(r360209)
+++ head/bin/sh/mkbuiltins  Wed Apr 22 21:45:43 2020(r360210)
@@ -35,11 +35,6 @@
 # $FreeBSD$
 
 temp=`mktemp -t ka`
-havehist=1
-if [ "X$1" = "X-h" ]; then
-   havehist=0
-   shift
-fi
 srcdir=$1
 havejobs=0
 if grep '^#define[  ]*JOBS[ ]*1' $srcdir/shell.h > /dev/null
@@ -56,8 +51,8 @@ cat <<\!
 #include "builtins.h"
 
 !
-awk '/^[^#]/ {if(('$havejobs' || $2 != "-j") && ('$havehist' || $2 != "-h")) \
-print $0}' $srcdir/builtins.def | sed 's/-[hj]//' > $temp
+awk '/^[^#]/ {if('$havejobs' || $2 != "-j") \
+print $0}' $srcdir/builtins.def | sed 's/-j//' > $temp
 echo 'int (*const builtinfunc[])(int, char **) = {'
 awk '/^[^#]/ { printf "\t%s,\n", $1}' $temp
 echo '};
___
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: r360209 - head/sys/netinet

2020-04-22 Thread Michael Tuexen
Author: tuexen
Date: Wed Apr 22 21:22:33 2020
New Revision: 360209
URL: https://svnweb.freebsd.org/changeset/base/360209

Log:
  Improve input validation when processing AUTH chunks.
  
  Thanks to Natalie Silvanovich from Google for finding and reporting the
  issue found by her in the SCTP userland stack.
  
  MFC after:3 days
  X-MFC with:   https://svnweb.freebsd.org/changeset/base/360193

Modified:
  head/sys/netinet/sctp_input.c

Modified: head/sys/netinet/sctp_input.c
==
--- head/sys/netinet/sctp_input.c   Wed Apr 22 21:15:26 2020
(r360208)
+++ head/sys/netinet/sctp_input.c   Wed Apr 22 21:22:33 2020
(r360209)
@@ -2094,7 +2094,7 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, in
int init_offset, initack_offset, initack_limit;
int retval;
int error = 0;
-   uint8_t auth_chunk_buf[SCTP_PARAM_BUFFER_SIZE];
+   uint8_t auth_chunk_buf[SCTP_CHUNK_BUFFER_SIZE];
 #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING)
struct socket *so;
 
@@ -2273,7 +2273,7 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, in
if (auth_skipped) {
struct sctp_auth_chunk *auth;
 
-   if (auth_len <= SCTP_PARAM_BUFFER_SIZE) {
+   if (auth_len <= SCTP_CHUNK_BUFFER_SIZE) {
auth = (struct sctp_auth_chunk *)sctp_m_getptr(m, 
auth_offset, auth_len, auth_chunk_buf);
} else {
auth = NULL;
@@ -4670,11 +4670,13 @@ sctp_process_control(struct mbuf *m, int iphlen, int *
if (auth_skipped && (stcb != NULL)) {
struct sctp_auth_chunk *auth;
 
-   auth = (struct sctp_auth_chunk *)
-   sctp_m_getptr(m, auth_offset,
-   auth_len, chunk_buf);
-   got_auth = 1;
-   auth_skipped = 0;
+   if (auth_len <= SCTP_CHUNK_BUFFER_SIZE) {
+   auth = (struct sctp_auth_chunk 
*)sctp_m_getptr(m, auth_offset, auth_len, chunk_buf);
+   got_auth = 1;
+   auth_skipped = 0;
+   } else {
+   auth = NULL;
+   }
if ((auth == NULL) || sctp_handle_auth(stcb, 
auth, m,
auth_offset)) {
/* auth HMAC failed so dump it */
___
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: r360206 - head/sys/netipsec

2020-04-22 Thread John Baldwin
Author: jhb
Date: Wed Apr 22 21:03:24 2020
New Revision: 360206
URL: https://svnweb.freebsd.org/changeset/base/360206

Log:
  Fix name of 3DES cipher in deprecation warning.
  
  Submitted by: cem
  MFC after:1 week

Modified:
  head/sys/netipsec/xform_esp.c

Modified: head/sys/netipsec/xform_esp.c
==
--- head/sys/netipsec/xform_esp.c   Wed Apr 22 21:00:14 2020
(r360205)
+++ head/sys/netipsec/xform_esp.c   Wed Apr 22 21:03:24 2020
(r360206)
@@ -166,7 +166,7 @@ esp_init(struct secasvar *sav, struct xformsw *xsp)
break;
case SADB_EALG_3DESCBC:
if (ratecheck(, _warn_interval))
-   gone_in(13, "DES cipher for IPsec");
+   gone_in(13, "3DES cipher for IPsec");
break;
case SADB_X_EALG_BLOWFISHCBC:
if (ratecheck(, _warn_interval))
___
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: r360205 - in head/sys/fs: nfs nfsclient

2020-04-22 Thread Rick Macklem
Author: rmacklem
Date: Wed Apr 22 21:00:14 2020
New Revision: 360205
URL: https://svnweb.freebsd.org/changeset/base/360205

Log:
  Make the NFSv4.n client's recovery from NFSERR_BADSESSION RFC5661 conformant.
  
  RFC5661 specifies that a client's recovery upon receipt of NFSERR_BADSESSION
  should first consist of a CreateSession operation using the extant ClientID.
  If that fails, then a full recovery beginning with the ExchangeID operation
  is to be done.
  Without this patch, the FreeBSD client did not attempt the CreateSession
  operation with the extant ClientID and went directly to a full recovery
  beginning with ExchangeID. I have had this patch several years, but since
  no extant NFSv4.n server required the CreateSession with extant ClientID,
  I have never committed it.
  I an committing it now, since I suspect some future NFSv4.n server will
  require this and it should not negatively impact recovery for extant NFSv4.n
  servers, since they should all return NFSERR_STATECLIENTID for this first
  CreateSession.
  
  The patched client has been tested for recovery against both the FreeBSD
  and Linux NFSv4.n servers and no problems have been observed.
  
  MFC after:1 month

Modified:
  head/sys/fs/nfs/nfs_var.h
  head/sys/fs/nfsclient/nfs_clrpcops.c
  head/sys/fs/nfsclient/nfs_clstate.c

Modified: head/sys/fs/nfs/nfs_var.h
==
--- head/sys/fs/nfs/nfs_var.h   Wed Apr 22 20:50:24 2020(r360204)
+++ head/sys/fs/nfs/nfs_var.h   Wed Apr 22 21:00:14 2020(r360205)
@@ -454,7 +454,7 @@ int nfsrpc_closerpc(struct nfsrv_descript *, struct nf
 int nfsrpc_openconfirm(vnode_t, u_int8_t *, int, struct nfsclopen *,
 struct ucred *, NFSPROC_T *);
 int nfsrpc_setclient(struct nfsmount *, struct nfsclclient *, int,
-struct ucred *, NFSPROC_T *);
+bool *, struct ucred *, NFSPROC_T *);
 int nfsrpc_getattr(vnode_t, struct ucred *, NFSPROC_T *,
 struct nfsvattr *, void *);
 int nfsrpc_getattrnovp(struct nfsmount *, u_int8_t *, int, int,

Modified: head/sys/fs/nfsclient/nfs_clrpcops.c
==
--- head/sys/fs/nfsclient/nfs_clrpcops.cWed Apr 22 20:50:24 2020
(r360204)
+++ head/sys/fs/nfsclient/nfs_clrpcops.cWed Apr 22 21:00:14 2020
(r360205)
@@ -932,7 +932,7 @@ nfsmout:
  */
 APPLESTATIC int
 nfsrpc_setclient(struct nfsmount *nmp, struct nfsclclient *clp, int reclaim,
-struct ucred *cred, NFSPROC_T *p)
+bool *retokp, struct ucred *cred, NFSPROC_T *p)
 {
u_int32_t *tl;
struct nfsrv_descript nfsd;
@@ -944,26 +944,81 @@ nfsrpc_setclient(struct nfsmount *nmp, struct nfsclcli
nfsquad_t confirm;
u_int32_t lease;
static u_int32_t rev = 0;
-   struct nfsclds *dsp;
+   struct nfsclds *dsp, *odsp;
struct in6_addr a6;
struct nfsclsession *tsep;
 
if (nfsboottime.tv_sec == 0)
NFSSETBOOTTIME(nfsboottime);
-   clp->nfsc_rev = rev++;
if (NFSHASNFSV4N(nmp)) {
-   /*
-* Either there was no previous session or the
-* previous session has failed, so...
-* do an ExchangeID followed by the CreateSession.
-*/
-   error = nfsrpc_exchangeid(nmp, clp, >nm_sockreq, 0,
-   NFSV4EXCH_USEPNFSMDS | NFSV4EXCH_USENONPNFS, , cred, p);
-   NFSCL_DEBUG(1, "aft exch=%d\n", error);
-   if (error == 0)
+   error = NFSERR_BADSESSION;
+   odsp = dsp = NULL;
+   if (retokp != NULL) {
+   NFSLOCKMNT(nmp);
+   odsp = TAILQ_FIRST(>nm_sess);
+   NFSUNLOCKMNT(nmp);
+   }
+   if (odsp != NULL) {
+   /*
+* When a session already exists, first try a
+* CreateSession with the extant ClientID.
+*/
+   dsp = malloc(sizeof(struct nfsclds) +
+   odsp->nfsclds_servownlen + 1, M_NFSCLDS,
+   M_WAITOK | M_ZERO);
+   dsp->nfsclds_expire = NFSD_MONOSEC + clp->nfsc_renew;
+   dsp->nfsclds_servownlen = odsp->nfsclds_servownlen;
+   dsp->nfsclds_sess.nfsess_clientid =
+   odsp->nfsclds_sess.nfsess_clientid;
+   dsp->nfsclds_sess.nfsess_sequenceid =
+   odsp->nfsclds_sess.nfsess_sequenceid;
+   dsp->nfsclds_flags = odsp->nfsclds_flags;
+   if (dsp->nfsclds_servownlen > 0)
+   memcpy(dsp->nfsclds_serverown,
+   odsp->nfsclds_serverown,
+   dsp->nfsclds_servownlen + 1);
+   

svn commit: r360204 - head/tests/sys/netipsec/tunnel

2020-04-22 Thread Li-Wen Hsu
Author: lwhsu
Date: Wed Apr 22 20:50:24 2020
New Revision: 360204
URL: https://svnweb.freebsd.org/changeset/base/360204

Log:
  Temporarily skip sys.netipsec.tunnel.empty.v{4,6} in CI
  
  PR:   245832
  Sponsored by: The FreeBSD Foundation

Modified:
  head/tests/sys/netipsec/tunnel/empty.sh

Modified: head/tests/sys/netipsec/tunnel/empty.sh
==
--- head/tests/sys/netipsec/tunnel/empty.sh Wed Apr 22 20:43:18 2020
(r360203)
+++ head/tests/sys/netipsec/tunnel/empty.sh Wed Apr 22 20:50:24 2020
(r360204)
@@ -11,6 +11,10 @@ v4_head()
 
 v4_body()
 {
+   if [ "$(atf_config_get ci false)" = "true" ]; then
+   atf_skip "https://bugs.freebsd.org/245832;
+   fi
+
# Can't use filename "null" for this script: PR 223564
ist_test 4 null ""
 }
@@ -29,6 +33,10 @@ v6_head()
 
 v6_body()
 {
+   if [ "$(atf_config_get ci false)" = "true" ]; then
+   atf_skip "https://bugs.freebsd.org/245832;
+   fi
+
ist_test 6 null ""
 }
 
___
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: r360203 - head/tests/sys/opencrypto

2020-04-22 Thread John Baldwin
Author: jhb
Date: Wed Apr 22 20:43:18 2020
New Revision: 360203
URL: https://svnweb.freebsd.org/changeset/base/360203

Log:
  Update blake2 accelerated software tests to work after OCF refactoring.
  
  - Lookup device drivers to test by name instead of assuming that the
software / hardware flags will select specific drivers.
  - Set the sysctl to permit software /dev/crypto requests when testing
the accelerated software blake2 driver.
  
  PR:   245825
  Reported by:  lwhsu
  Reviewed by:  cem, lwhsu
  Sponsored by: Chelsio Communications
  Differential Revision:https://reviews.freebsd.org/D24540

Modified:
  head/tests/sys/opencrypto/blake2_test.c

Modified: head/tests/sys/opencrypto/blake2_test.c
==
--- head/tests/sys/opencrypto/blake2_test.c Wed Apr 22 19:44:33 2020
(r360202)
+++ head/tests/sys/opencrypto/blake2_test.c Wed Apr 22 20:43:18 2020
(r360203)
@@ -75,6 +75,17 @@ initialize_constant_buffers(void)
 }
 
 static int
+lookup_crid(int fd, const char *devname)
+{
+   struct crypt_find_op find;
+
+   find.crid = -1;
+   strlcpy(find.name, devname, sizeof(find.name));
+   ATF_REQUIRE(ioctl(fd, CIOCFINDDEV, ) != -1);
+   return (find.crid);
+}
+
+static int
 get_handle_fd(void)
 {
int dc_fd, fd;
@@ -124,10 +135,10 @@ do_cryptop(int fd, int ses, size_t inlen, void *out)
 }
 
 static void
-test_blake2b_vectors(int crid, const char *modname)
+test_blake2b_vectors(const char *devname, const char *modname)
 {
uint8_t hash[BLAKE2B_OUTBYTES];
-   int fd, ses;
+   int crid, fd, ses;
size_t i;
 
ATF_REQUIRE_KERNEL_MODULE(modname);
@@ -135,6 +146,7 @@ test_blake2b_vectors(int crid, const char *modname)
 
initialize_constant_buffers();
fd = get_handle_fd();
+   crid = lookup_crid(fd, devname);
ses = create_session(fd, CRYPTO_BLAKE2B, crid, key2b, sizeof(key2b));
 
for (i = 0; i < sizeof(katbuf); i++) {
@@ -147,10 +159,10 @@ test_blake2b_vectors(int crid, const char *modname)
 }
 
 static void
-test_blake2s_vectors(int crid, const char *modname)
+test_blake2s_vectors(const char *devname, const char *modname)
 {
uint8_t hash[BLAKE2S_OUTBYTES];
-   int fd, ses;
+   int crid, fd, ses;
size_t i;
 
ATF_REQUIRE_KERNEL_MODULE(modname);
@@ -158,6 +170,7 @@ test_blake2s_vectors(int crid, const char *modname)
 
initialize_constant_buffers();
fd = get_handle_fd();
+   crid = lookup_crid(fd, devname);
ses = create_session(fd, CRYPTO_BLAKE2S, crid, key2s, sizeof(key2s));
 
for (i = 0; i < sizeof(katbuf); i++) {
@@ -173,33 +186,29 @@ ATF_TC_WITHOUT_HEAD(blake2b_vectors);
 ATF_TC_BODY(blake2b_vectors, tc)
 {
ATF_REQUIRE_SYSCTL_INT("kern.cryptodevallowsoft", 1);
-   test_blake2b_vectors(CRYPTO_FLAG_SOFTWARE, "nexus/cryptosoft");
+   test_blake2b_vectors("cryptosoft0", "nexus/cryptosoft");
 }
 
 ATF_TC_WITHOUT_HEAD(blake2s_vectors);
 ATF_TC_BODY(blake2s_vectors, tc)
 {
ATF_REQUIRE_SYSCTL_INT("kern.cryptodevallowsoft", 1);
-   test_blake2s_vectors(CRYPTO_FLAG_SOFTWARE, "nexus/cryptosoft");
+   test_blake2s_vectors("cryptosoft0", "nexus/cryptosoft");
 }
 
 #if defined(__i386__) || defined(__amd64__)
 ATF_TC_WITHOUT_HEAD(blake2b_vectors_x86);
 ATF_TC_BODY(blake2b_vectors_x86, tc)
 {
-   if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false))
-   atf_tc_skip("https://bugs.freebsd.org/245825;);
-
-   test_blake2b_vectors(CRYPTO_FLAG_HARDWARE, "nexus/blake2");
+   ATF_REQUIRE_SYSCTL_INT("kern.cryptodevallowsoft", 1);
+   test_blake2b_vectors("blaketwo0", "nexus/blake2");
 }
 
 ATF_TC_WITHOUT_HEAD(blake2s_vectors_x86);
 ATF_TC_BODY(blake2s_vectors_x86, tc)
 {
-   if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false))
-   atf_tc_skip("https://bugs.freebsd.org/245825;);
-
-   test_blake2s_vectors(CRYPTO_FLAG_HARDWARE, "nexus/blake2");
+   ATF_REQUIRE_SYSCTL_INT("kern.cryptodevallowsoft", 1);
+   test_blake2s_vectors("blaketwo0", "nexus/blake2");
 }
 #endif
 
___
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: r360202 - head/sys/netipsec

2020-04-22 Thread John Baldwin
Author: jhb
Date: Wed Apr 22 19:44:33 2020
New Revision: 360202
URL: https://svnweb.freebsd.org/changeset/base/360202

Log:
  Deprecate 3des support in IPsec for FreeBSD 13.
  
  RFC 8221 does not outright ban 3des as the algorithms deprecated for
  13 in r348205, but it is listed as a SHOULD NOT and will likely be a
  MUST NOT by the time 13 ships.
  
  Discussed with:   bjk
  MFC after:1 week
  Sponsored by: Chelsio Communications
  Differential Revision:https://reviews.freebsd.org/D24341

Modified:
  head/sys/netipsec/xform_esp.c

Modified: head/sys/netipsec/xform_esp.c
==
--- head/sys/netipsec/xform_esp.c   Wed Apr 22 18:39:45 2020
(r360201)
+++ head/sys/netipsec/xform_esp.c   Wed Apr 22 19:44:33 2020
(r360202)
@@ -94,7 +94,7 @@ SYSCTL_VNET_PCPUSTAT(_net_inet_esp, IPSECCTL_STATS, st
 struct espstat, espstat,
 "ESP statistics (struct espstat, netipsec/esp_var.h");
 
-static struct timeval deswarn, blfwarn, castwarn, camelliawarn;
+static struct timeval deswarn, blfwarn, castwarn, camelliawarn, tdeswarn;
 
 static int esp_input_cb(struct cryptop *op);
 static int esp_output_cb(struct cryptop *crp);
@@ -162,6 +162,10 @@ esp_init(struct secasvar *sav, struct xformsw *xsp)
switch (sav->alg_enc) {
case SADB_EALG_DESCBC:
if (ratecheck(, _warn_interval))
+   gone_in(13, "DES cipher for IPsec");
+   break;
+   case SADB_EALG_3DESCBC:
+   if (ratecheck(, _warn_interval))
gone_in(13, "DES cipher for IPsec");
break;
case SADB_X_EALG_BLOWFISHCBC:
___
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: r360201 - head/libexec/rtld-elf

2020-04-22 Thread Konstantin Belousov
Author: kib
Date: Wed Apr 22 18:39:45 2020
New Revision: 360201
URL: https://svnweb.freebsd.org/changeset/base/360201

Log:
  rtld: ignore static TLS segments when tracing.
  
  For PIE binaries, ldd(1) performs dlopen(RTLD_TRACE) on the binary.
  It is legal for binary to use initial exec TLS mode, but when such
  binary (actually dso) is dlopened, we might not have enough free space
  in the finalized static TLS segment.  Make ldd operational by skipping
  TLS space allocation, we are not going to execute any code from the
  dso anyway.
  
  Reported by:  tobik
  PR:   245677
  Sponsored by: The FreeBSD Foundation
  MFC after:1 week

Modified:
  head/libexec/rtld-elf/rtld.c
  head/libexec/rtld-elf/rtld.h

Modified: head/libexec/rtld-elf/rtld.c
==
--- head/libexec/rtld-elf/rtld.cWed Apr 22 17:14:02 2020
(r360200)
+++ head/libexec/rtld-elf/rtld.cWed Apr 22 18:39:45 2020
(r360201)
@@ -3367,7 +3367,7 @@ rtld_dlopen(const char *name, int fd, int mode)
 if (mode & RTLD_NOLOAD)
lo_flags |= RTLD_LO_NOLOAD;
 if (ld_tracing != NULL)
-   lo_flags |= RTLD_LO_TRACE;
+   lo_flags |= RTLD_LO_TRACE | RTLD_LO_IGNSTLS;
 
 return (dlopen_object(name, fd, obj_main, lo_flags,
   mode & (RTLD_MODEMASK | RTLD_GLOBAL), NULL));
@@ -3418,15 +3418,15 @@ dlopen_object(const char *name, int fd, Obj_Entry *ref
/* We loaded something new. */
assert(globallist_next(old_obj_tail) == obj);
result = 0;
-   if ((lo_flags & RTLD_LO_EARLY) == 0 && obj->static_tls &&
- !allocate_tls_offset(obj)) {
+   if ((lo_flags & (RTLD_LO_EARLY | RTLD_LO_IGNSTLS)) == 0 &&
+ obj->static_tls && !allocate_tls_offset(obj)) {
_rtld_error("%s: No space available "
  "for static Thread Local Storage", obj->path);
result = -1;
}
if (result != -1)
result = load_needed_objects(obj, lo_flags & (RTLD_LO_DLOPEN |
-   RTLD_LO_EARLY));
+   RTLD_LO_EARLY | RTLD_LO_IGNSTLS));
init_dag(obj);
ref_dag(obj);
if (result != -1)

Modified: head/libexec/rtld-elf/rtld.h
==
--- head/libexec/rtld-elf/rtld.hWed Apr 22 17:14:02 2020
(r360200)
+++ head/libexec/rtld-elf/rtld.hWed Apr 22 18:39:45 2020
(r360201)
@@ -308,6 +308,7 @@ TAILQ_HEAD(obj_entry_q, Struct_Obj_Entry);
 #defineRTLD_LO_FILTEES 0x10/* Loading filtee. */
 #defineRTLD_LO_EARLY   0x20/* Do not call ctors, postpone it to the
   initialization during the image start. */
+#defineRTLD_LO_IGNSTLS 0x40/* Do not allocate static TLS */
 
 /*
  * Symbol cache entry used during relocation to avoid multiple lookups
___
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: r360199 - head/stand/lua

2020-04-22 Thread Ryan Moeller
Author: freqlabs
Date: Wed Apr 22 17:04:31 2020
New Revision: 360199
URL: https://svnweb.freebsd.org/changeset/base/360199

Log:
  menu.lua: Give names to menu entries
  
  Make menu customizations easier by naming the entries and using the
  names to build the table entries.
  
  Reviewed by:  kevans
  Approved by:  mav (mentor)
  MFC after:1 week
  Sponsored by: iXsystems, Inc.
  Differential Revision:https://reviews.freebsd.org/D24527

Modified:
  head/stand/lua/menu.lua

Modified: head/stand/lua/menu.lua
==
--- head/stand/lua/menu.lua Wed Apr 22 14:45:00 2020(r360198)
+++ head/stand/lua/menu.lua Wed Apr 22 17:04:31 2020(r360199)
@@ -212,30 +212,50 @@ menu.boot_options = {
 menu.welcome = {
entries = function()
local menu_entries = menu.welcome.all_entries
-   -- Swap the first two menu items on single user boot
+   local multi_user = menu_entries.multi_user
+   local single_user = menu_entries.single_user
+   local boot_entry_1, boot_entry_2
if core.isSingleUserBoot() then
-   -- We'll cache the swapped menu, for performance
-   if menu.welcome.swapped_menu ~= nil then
-   return menu.welcome.swapped_menu
+   -- Swap the first two menu items on single user boot.
+   -- We'll cache the alternate entries for performance.
+   local alts = menu_entries.alts
+   if alts == nil then
+   single_user = core.deepCopyTable(single_user)
+   multi_user = core.deepCopyTable(multi_user)
+   single_user.name = single_user.alternate_name
+   multi_user.name = multi_user.alternate_name
+   menu_entries.alts = {
+   single_user = single_user,
+   multi_user = multi_user,
+   }
+   else
+   single_user = alts.single_user 
+   multi_user = alts.multi_user
end
-   -- Shallow copy the table
-   menu_entries = core.deepCopyTable(menu_entries)
-
-   -- Swap the first two menu entries
-   menu_entries[1], menu_entries[2] =
-   menu_entries[2], menu_entries[1]
-
-   -- Then set their names to their alternate names
-   menu_entries[1].name, menu_entries[2].name =
-   menu_entries[1].alternate_name,
-   menu_entries[2].alternate_name
-   menu.welcome.swapped_menu = menu_entries
+   boot_entry_1, boot_entry_2 = single_user, multi_user
+   else
+   boot_entry_1, boot_entry_2 = multi_user, single_user
end
-   return menu_entries
+   return {
+   boot_entry_1,
+   boot_entry_2,
+   menu_entries.prompt,
+   menu_entries.reboot,
+   {
+   entry_type = core.MENU_SEPARATOR,
+   },
+   {
+   entry_type = core.MENU_SEPARATOR,
+   name = "Options:",
+   },
+   menu_entries.kernel_options,
+   menu_entries.boot_options,
+   menu_entries.boot_envs,
+   menu_entries.chainload,
+   }
end,
all_entries = {
-   -- boot multi user
-   {
+   multi_user = {
entry_type = core.MENU_ENTRY,
name = color.highlight("B") .. "oot Multi user " ..
color.highlight("[Enter]"),
@@ -248,8 +268,7 @@ menu.welcome = {
end,
alias = {"b", "B"},
},
-   -- boot single user
-   {
+   single_user = {
entry_type = core.MENU_ENTRY,
name = "Boot " .. color.highlight("S") .. "ingle user",
-- Not a standard menu entry function!
@@ -261,8 +280,7 @@ menu.welcome = {
end,
alias = {"s", "S"},
},
-   -- escape to interpreter
-   {
+   prompt = {
entry_type = core.MENU_RETURN,
name = color.highlight("Esc") .. "ape to loader prompt",
 

svn commit: r360198 - head/tests/sys/opencrypto

2020-04-22 Thread Li-Wen Hsu
Author: lwhsu
Date: Wed Apr 22 14:45:00 2020
New Revision: 360198
URL: https://svnweb.freebsd.org/changeset/base/360198

Log:
  Temporarily skip sys.opencrypto.blake2_test.blake2{b,s}_vectors_x86 in CI
  
  PR:   245825
  Sponsored by: The FreeBSD Foundation

Modified:
  head/tests/sys/opencrypto/blake2_test.c

Modified: head/tests/sys/opencrypto/blake2_test.c
==
--- head/tests/sys/opencrypto/blake2_test.c Wed Apr 22 14:38:39 2020
(r360197)
+++ head/tests/sys/opencrypto/blake2_test.c Wed Apr 22 14:45:00 2020
(r360198)
@@ -187,12 +187,18 @@ ATF_TC_BODY(blake2s_vectors, tc)
 ATF_TC_WITHOUT_HEAD(blake2b_vectors_x86);
 ATF_TC_BODY(blake2b_vectors_x86, tc)
 {
+   if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false))
+   atf_tc_skip("https://bugs.freebsd.org/245825;);
+
test_blake2b_vectors(CRYPTO_FLAG_HARDWARE, "nexus/blake2");
 }
 
 ATF_TC_WITHOUT_HEAD(blake2s_vectors_x86);
 ATF_TC_BODY(blake2s_vectors_x86, tc)
 {
+   if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false))
+   atf_tc_skip("https://bugs.freebsd.org/245825;);
+
test_blake2s_vectors(CRYPTO_FLAG_HARDWARE, "nexus/blake2");
 }
 #endif
___
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: r360197 - head/usr.sbin/bluetooth/hccontrol

2020-04-22 Thread Hans Petter Selasky
Author: hselasky
Date: Wed Apr 22 14:38:39 2020
New Revision: 360197
URL: https://svnweb.freebsd.org/changeset/base/360197

Log:
  Add support for Read_Local_Supported_Commands command to hccontrol(8).
  
  Submitted by: Marc Veldman 
  PR:   245811
  MFC after:1 week
  Sponsored by: Mellanox Technologies

Modified:
  head/usr.sbin/bluetooth/hccontrol/hccontrol.8
  head/usr.sbin/bluetooth/hccontrol/hccontrol.h
  head/usr.sbin/bluetooth/hccontrol/info.c
  head/usr.sbin/bluetooth/hccontrol/util.c

Modified: head/usr.sbin/bluetooth/hccontrol/hccontrol.8
==
--- head/usr.sbin/bluetooth/hccontrol/hccontrol.8   Wed Apr 22 14:33:25 
2020(r360196)
+++ head/usr.sbin/bluetooth/hccontrol/hccontrol.8   Wed Apr 22 14:38:39 
2020(r360197)
@@ -134,6 +134,7 @@ are:
 .It Cm Read_Page_Scan_Mode
 .It Cm Write_Page_Scan_Mode
 .It Cm Read_Local_Version_Information
+.It Cm Read_Local_Supported_Commands
 .It Cm Read_Local_Supported_Features
 .It Cm Read_Buffer_Size
 .It Cm Read_Country_Code

Modified: head/usr.sbin/bluetooth/hccontrol/hccontrol.h
==
--- head/usr.sbin/bluetooth/hccontrol/hccontrol.h   Wed Apr 22 14:33:25 
2020(r360196)
+++ head/usr.sbin/bluetooth/hccontrol/hccontrol.h   Wed Apr 22 14:38:39 
2020(r360197)
@@ -72,6 +72,7 @@ char const *  hci_hmode2str   (int, char *, int);
 char const *   hci_ver2str (int);
 char const *   hci_lmpver2str  (int);
 char const *   hci_manufacturer2str(int);
+char const *   hci_commands2str(uint8_t *, char *, int);
 char const *   hci_features2str(uint8_t *, char *, int);
 char const *   hci_le_features2str (uint8_t *, char *, int);
 char const *   hci_cc2str  (int);

Modified: head/usr.sbin/bluetooth/hccontrol/info.c
==
--- head/usr.sbin/bluetooth/hccontrol/info.cWed Apr 22 14:33:25 2020
(r360196)
+++ head/usr.sbin/bluetooth/hccontrol/info.cWed Apr 22 14:38:39 2020
(r360197)
@@ -72,6 +72,38 @@ hci_read_local_version_information(int s, int argc, ch
return (OK);
 } /* hci_read_local_version_information */
 
+/* Send Read_Local_Supported_Commands command to the unit */
+static int
+hci_read_local_supported_commands(int s, int argc, char **argv)
+{
+   ng_hci_read_local_commands_rp   rp;
+   int n;
+   charbuffer[16384];
+
+   n = sizeof(rp);
+   if (hci_simple_request(s, NG_HCI_OPCODE(NG_HCI_OGF_INFO,
+   NG_HCI_OCF_READ_LOCAL_COMMANDS),
+   (char *) , ) == ERROR)
+   return (ERROR);
+
+   if (rp.status != 0x00) {
+   fprintf(stdout, "Status: %s [%#02x]\n", 
+   hci_status2str(rp.status), rp.status);
+   return (FAILED);
+   }
+
+   fprintf(stdout, "Supported commands:");
+   for (n = 0; n < sizeof(rp.features); n++) {
+   if (n % 8 == 0)
+   fprintf(stdout, "\n");
+   fprintf(stdout, "%#02x ", rp.features[n]);
+   }
+   fprintf(stdout, "\n%s\n", hci_commands2str(rp.features, 
+   buffer, sizeof(buffer)));
+
+   return (OK);
+} /* hci_read_local_supported_commands */
+
 /* Send Read_Local_Supported_Features command to the unit */
 static int
 hci_read_local_supported_features(int s, int argc, char **argv)
@@ -186,6 +218,11 @@ struct hci_command info_commands[] = {
 "\nThis command will read the values for the version information for the\n" \
 "local Bluetooth unit.",
 _read_local_version_information
+},
+{
+"read_local_supported_commands",
+"\nThis command will read the commands the local Bluetooth unit supports.\n",
+_read_local_supported_commands 
 },
 {
 "read_local_supported_features",

Modified: head/usr.sbin/bluetooth/hccontrol/util.c
==
--- head/usr.sbin/bluetooth/hccontrol/util.cWed Apr 22 14:33:25 2020
(r360196)
+++ head/usr.sbin/bluetooth/hccontrol/util.cWed Apr 22 14:38:39 2020
(r360197)
@@ -2430,6 +2430,501 @@ hci_manufacturer2str(int m)
 } /* hci_manufacturer2str */
 
 char const *
+hci_commands2str(uint8_t *commands, char *buffer, int size)
+{
+   static char const * const   t[][8] = {
+   { /* byte 0 */
+   /* 0 */ " ",
+   /* 1 */ " ",
+   /* 2 */ " ",
+   /* 3 */ " ",
+   /* 4 */ " ",
+   /* 5 */ " ",
+   /* 6 */ " ",
+   /* 7 */ " "
+   },
+   { /* byte 1 */
+   /* 0 */ " ",
+   /* 1 */ " ",
+   /* 2 */ " ",
+   /* 3 */ " ",
+   /* 4 */ " ",
+   /* 5 */ " ",
+   /* 6 */ " 

svn commit: r360196 - in head/sys/compat/linuxkpi/common: include/linux src

2020-04-22 Thread Hans Petter Selasky
Author: hselasky
Date: Wed Apr 22 14:33:25 2020
New Revision: 360196
URL: https://svnweb.freebsd.org/changeset/base/360196

Log:
  Factor code in LinuxKPI to allow attach and detach using any BSD device.
  This allows non-LinuxKPI based infiniband device drivers to attach
  correctly to ibcore.
  
  No functional change intended.
  
  Reviewed by:  np @
  Differential Revision:https://reviews.freebsd.org/D24514
  MFC after:1 week
  Sponsored by: Mellanox Technologies

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

Modified: head/sys/compat/linuxkpi/common/include/linux/pci.h
==
--- head/sys/compat/linuxkpi/common/include/linux/pci.h Wed Apr 22 13:53:22 
2020(r360195)
+++ head/sys/compat/linuxkpi/common/include/linux/pci.h Wed Apr 22 14:33:25 
2020(r360196)
@@ -954,4 +954,15 @@ pcie_get_width_cap(struct pci_dev *dev)
return (PCIE_LNK_WIDTH_UNKNOWN);
 }
 
+/*
+ * The following functions can be used to attach/detach the LinuxKPI's
+ * PCI device runtime. The pci_driver and pci_device_id pointer is
+ * allowed to be NULL. Other pointers must be all valid.
+ * The pci_dev structure should be zero-initialized before passed
+ * to the linux_pci_attach_device function.
+ */
+extern int linux_pci_attach_device(device_t, struct pci_driver *,
+const struct pci_device_id *, struct pci_dev *);
+extern int linux_pci_detach_device(struct pci_dev *);
+
 #endif /* _LINUX_PCI_H_ */

Modified: head/sys/compat/linuxkpi/common/src/linux_pci.c
==
--- head/sys/compat/linuxkpi/common/src/linux_pci.c Wed Apr 22 13:53:22 
2020(r360195)
+++ head/sys/compat/linuxkpi/common/src/linux_pci.c Wed Apr 22 14:33:25 
2020(r360196)
@@ -213,22 +213,33 @@ linux_pci_probe(device_t dev)
 static int
 linux_pci_attach(device_t dev)
 {
+   const struct pci_device_id *id;
+   struct pci_driver *pdrv;
+   struct pci_dev *pdev;
+
+   pdrv = linux_pci_find(dev, );
+   pdev = device_get_softc(dev);
+
+   MPASS(pdrv != NULL);
+   MPASS(pdev != NULL);
+
+   return (linux_pci_attach_device(dev, pdrv, id, pdev));
+}
+
+int
+linux_pci_attach_device(device_t dev, struct pci_driver *pdrv,
+const struct pci_device_id *id, struct pci_dev *pdev)
+{
struct resource_list_entry *rle;
struct pci_bus *pbus;
-   struct pci_dev *pdev;
struct pci_devinfo *dinfo;
-   struct pci_driver *pdrv;
-   const struct pci_device_id *id;
device_t parent;
int error;
 
linux_set_current(curthread);
 
-   pdrv = linux_pci_find(dev, );
-   pdev = device_get_softc(dev);
-
-   parent = device_get_parent(dev);
-   if (pdrv->isdrm) {
+   if (pdrv != NULL && pdrv->isdrm) {
+   parent = device_get_parent(dev);
dinfo = device_get_ivars(parent);
device_set_ivars(dev, dinfo);
} else {
@@ -270,9 +281,11 @@ linux_pci_attach(device_t dev)
list_add(>links, _devices);
spin_unlock(_lock);
 
-   error = pdrv->probe(pdev, id);
-   if (error)
-   goto out_probe;
+   if (pdrv != NULL) {
+   error = pdrv->probe(pdev, id);
+   if (error)
+   goto out_probe;
+   }
return (0);
 
 out_probe:
@@ -291,18 +304,30 @@ linux_pci_detach(device_t dev)
 {
struct pci_dev *pdev;
 
-   linux_set_current(curthread);
pdev = device_get_softc(dev);
 
-   pdev->pdrv->remove(pdev);
+   MPASS(pdev != NULL);
 
+   device_set_desc(dev, NULL);
+
+   return (linux_pci_detach_device(pdev));
+}
+
+int
+linux_pci_detach_device(struct pci_dev *pdev)
+{
+
+   linux_set_current(curthread);
+
+   if (pdev->pdrv != NULL)
+   pdev->pdrv->remove(pdev);
+
free(pdev->bus, M_DEVBUF);
linux_pdev_dma_uninit(pdev);
 
spin_lock(_lock);
list_del(>links);
spin_unlock(_lock);
-   device_set_desc(dev, NULL);
put_device(>dev);
 
return (0);
___
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: r360193 - head/sys/netinet

2020-04-22 Thread Michael Tuexen
Author: tuexen
Date: Wed Apr 22 12:47:46 2020
New Revision: 360193
URL: https://svnweb.freebsd.org/changeset/base/360193

Log:
  Improve input validation when processing AUTH chunks.
  
  Thanks to Natalie Silvanovich from Google for finding and reporting the
  issue found by her in the SCTP userland stack.
  
  MFC after:3 days

Modified:
  head/sys/netinet/sctp_input.c

Modified: head/sys/netinet/sctp_input.c
==
--- head/sys/netinet/sctp_input.c   Wed Apr 22 09:53:41 2020
(r360192)
+++ head/sys/netinet/sctp_input.c   Wed Apr 22 12:47:46 2020
(r360193)
@@ -2273,8 +2273,11 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, in
if (auth_skipped) {
struct sctp_auth_chunk *auth;
 
-   auth = (struct sctp_auth_chunk *)
-   sctp_m_getptr(m, auth_offset, auth_len, auth_chunk_buf);
+   if (auth_len <= SCTP_PARAM_BUFFER_SIZE) {
+   auth = (struct sctp_auth_chunk *)sctp_m_getptr(m, 
auth_offset, auth_len, auth_chunk_buf);
+   } else {
+   auth = NULL;
+   }
if ((auth == NULL) || sctp_handle_auth(stcb, auth, m, 
auth_offset)) {
/* auth HMAC failed, dump the assoc and packet */
SCTPDBG(SCTP_DEBUG_AUTH1,
___
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: r360192 - head/tests/sys/kqueue/libkqueue

2020-04-22 Thread Li-Wen Hsu
Author: lwhsu
Date: Wed Apr 22 09:53:41 2020
New Revision: 360192
URL: https://svnweb.freebsd.org/changeset/base/360192

Log:
  Enable timer tests in sys.kqueue.libkqueue.kqueue_test.main on i386
  
  They were fixed in r360140
  
  PR:   245768
  Sponsored by: The FreeBSD Foundation

Modified:
  head/tests/sys/kqueue/libkqueue/kqueue_test.sh

Modified: head/tests/sys/kqueue/libkqueue/kqueue_test.sh
==
--- head/tests/sys/kqueue/libkqueue/kqueue_test.sh  Wed Apr 22 07:53:43 
2020(r360191)
+++ head/tests/sys/kqueue/libkqueue/kqueue_test.sh  Wed Apr 22 09:53:41 
2020(r360192)
@@ -1,13 +1,8 @@
 #!/bin/sh
 # $FreeBSD$
 
-skip=""
 # Temporarily disable evfilt_proc tests: https://bugs.freebsd.org/233586
-skip="${skip} --no-proc"
-if [ "$(uname -p)" = "i386" ]; then
-   # Temporarily disable timer tests on i386: 
https://bugs.freebsd.org/245768
-   skip="${skip} --no-timer"
-fi
+skip="--no-proc"
 
 i=1
 "$(dirname $0)/kqtest" ${skip} | while read line; do
___
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: r360191 - in head/sys: dev/cxgbe/tom netinet

2020-04-22 Thread Alexander V. Chernikov
Author: melifaro
Date: Wed Apr 22 07:53:43 2020
New Revision: 360191
URL: https://svnweb.freebsd.org/changeset/base/360191

Log:
  Convert TOE routing lookups to the new routing KPI.
  
  Reviewed by:  np
  Differential Revision:https://reviews.freebsd.org/D24388

Modified:
  head/sys/dev/cxgbe/tom/t4_connect.c
  head/sys/dev/cxgbe/tom/t4_tom.h
  head/sys/netinet/tcp_offload.c
  head/sys/netinet/toecore.c
  head/sys/netinet/toecore.h

Modified: head/sys/dev/cxgbe/tom/t4_connect.c
==
--- head/sys/dev/cxgbe/tom/t4_connect.c Wed Apr 22 07:47:04 2020
(r360190)
+++ head/sys/dev/cxgbe/tom/t4_connect.c Wed Apr 22 07:53:43 2020
(r360191)
@@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -226,13 +227,13 @@ act_open_cpl_size(struct adapter *sc, int isipv6)
  * rtalloc1, RT_UNLOCK on rt.
  */
 int
-t4_connect(struct toedev *tod, struct socket *so, struct rtentry *rt,
+t4_connect(struct toedev *tod, struct socket *so, struct nhop_object *nh,
 struct sockaddr *nam)
 {
struct adapter *sc = tod->tod_softc;
struct toepcb *toep = NULL;
struct wrqe *wr = NULL;
-   struct ifnet *rt_ifp = rt->rt_ifp;
+   struct ifnet *rt_ifp = nh->nh_ifp;
struct vi_info *vi;
int qid_atid, rc, isipv6;
struct inpcb *inp = sotoinpcb(so);
@@ -277,7 +278,7 @@ t4_connect(struct toedev *tod, struct socket *so, stru
DONT_OFFLOAD_ACTIVE_OPEN(ENOMEM);
 
toep->l2te = t4_l2t_get(vi->pi, rt_ifp,
-   rt->rt_flags & RTF_GATEWAY ? rt->rt_gateway : nam);
+   nh->nh_flags & NHF_GATEWAY ? >gw_sa : nam);
if (toep->l2te == NULL)
DONT_OFFLOAD_ACTIVE_OPEN(ENOMEM);
 

Modified: head/sys/dev/cxgbe/tom/t4_tom.h
==
--- head/sys/dev/cxgbe/tom/t4_tom.h Wed Apr 22 07:47:04 2020
(r360190)
+++ head/sys/dev/cxgbe/tom/t4_tom.h Wed Apr 22 07:53:43 2020
(r360191)
@@ -370,7 +370,7 @@ int add_tid_to_history(struct adapter *, u_int);
 /* t4_connect.c */
 void t4_init_connect_cpl_handlers(void);
 void t4_uninit_connect_cpl_handlers(void);
-int t4_connect(struct toedev *, struct socket *, struct rtentry *,
+int t4_connect(struct toedev *, struct socket *, struct nhop_object *,
 struct sockaddr *);
 void act_open_failure_cleanup(struct adapter *, u_int, u_int);
 

Modified: head/sys/netinet/tcp_offload.c
==
--- head/sys/netinet/tcp_offload.c  Wed Apr 22 07:47:04 2020
(r360190)
+++ head/sys/netinet/tcp_offload.c  Wed Apr 22 07:53:43 2020
(r360191)
@@ -41,8 +41,11 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #defineTCPOUTFLAGS
@@ -60,7 +63,8 @@ tcp_offload_connect(struct socket *so, struct sockaddr
 {
struct ifnet *ifp;
struct toedev *tod;
-   struct rtentry *rt;
+   struct nhop_object *nh;
+   struct epoch_tracker et;
int error = EOPNOTSUPP;
 
INP_WLOCK_ASSERT(sotoinpcb(so));
@@ -70,13 +74,20 @@ tcp_offload_connect(struct socket *so, struct sockaddr
if (registered_toedevs == 0)
return (error);
 
-   rt = rtalloc1(nam, 0, 0);
-   if (rt)
-   RT_UNLOCK(rt);
-   else
+   NET_EPOCH_ENTER(et);
+   nh = NULL;
+   if (nam->sa_family == AF_INET)
+   nh = fib4_lookup(0, ((struct sockaddr_in *)nam)->sin_addr,
+   NHR_NONE, 0, 0);
+   else if (nam->sa_family == AF_INET6)
+   nh = fib6_lookup(0, &((struct sockaddr_in6 *)nam)->sin6_addr,
+   NHR_NONE, 0, 0);
+   if (nh == NULL) {
+   NET_EPOCH_EXIT(et);
return (EHOSTUNREACH);
+   }
 
-   ifp = rt->rt_ifp;
+   ifp = nh->nh_ifp;
 
if (nam->sa_family == AF_INET && !(ifp->if_capenable & IFCAP_TOE4))
goto done;
@@ -85,9 +96,9 @@ tcp_offload_connect(struct socket *so, struct sockaddr
 
tod = TOEDEV(ifp);
if (tod != NULL)
-   error = tod->tod_connect(tod, so, rt, nam);
+   error = tod->tod_connect(tod, so, nh, nam);
 done:
-   RTFREE(rt);
+   NET_EPOCH_EXIT(et);
return (error);
 }
 

Modified: head/sys/netinet/toecore.c
==
--- head/sys/netinet/toecore.c  Wed Apr 22 07:47:04 2020(r360190)
+++ head/sys/netinet/toecore.c  Wed Apr 22 07:53:43 2020(r360191)
@@ -77,7 +77,7 @@ static eventhandler_tag lle_event_eh;
 
 static int
 toedev_connect(struct toedev *tod __unused, struct socket *so __unused,
-struct rtentry *rt __unused, struct sockaddr *nam __unused)
+struct nhop_object *nh __unused, 

svn commit: r360190 - head/share/man/man4

2020-04-22 Thread Christian Brueffer
Author: brueffer
Date: Wed Apr 22 07:47:04 2020
New Revision: 360190
URL: https://svnweb.freebsd.org/changeset/base/360190

Log:
  Correct efi(8) reference.
  
  Submitted by: Gordon Bergling
  Differential Revision:https://reviews.freebsd.org/D24441

Modified:
  head/share/man/man4/smbios.4

Modified: head/share/man/man4/smbios.4
==
--- head/share/man/man4/smbios.4Wed Apr 22 07:24:30 2020
(r360189)
+++ head/share/man/man4/smbios.4Wed Apr 22 07:47:04 2020
(r360190)
@@ -23,7 +23,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 6, 2020
+.Dd April 22, 2020
 .Dt SMBIOS 4
 .Os
 .Sh NAME
@@ -46,7 +46,7 @@ smbios_load="YES"
 .Sh DESCRIPTION
 The System Management BIOS (SMBIOS) describes hardware components.
 .Sh SEE ALSO
-.Xr efi 4
+.Xr efi 8
 .Rs
 .%T System Management BIOS (SMBIOS) Reference Specification
 .%N DMTF DSP0134
___
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: r360187 - head/usr.sbin/bhyve

2020-04-22 Thread Mateusz Piotrowski
Author: 0mp (doc,ports committer)
Date: Wed Apr 22 06:32:51 2020
New Revision: 360187
URL: https://svnweb.freebsd.org/changeset/base/360187

Log:
  Improve formatting of synopsis section
  
  This patch is about sorting the arguments and using proper mdoc(7) macros
  to stylize arguments and command modifiers for much better readability.
  
  Further style fixes in other sections within the bhyve manual page are
  going to be worked on in upcoming patches.
  
  Reviewed by:  rgrimes
  MFC after:1 week
  Differential Revision:https://reviews.freebsd.org/D24526

Modified:
  head/usr.sbin/bhyve/bhyve.8

Modified: head/usr.sbin/bhyve/bhyve.8
==
--- head/usr.sbin/bhyve/bhyve.8 Wed Apr 22 05:54:46 2020(r360186)
+++ head/usr.sbin/bhyve/bhyve.8 Wed Apr 22 06:32:51 2020(r360187)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 13, 2019
+.Dd April 22, 2020
 .Dt BHYVE 8
 .Os
 .Sh NAME
@@ -32,23 +32,40 @@
 .Nd "run a guest operating system inside a virtual machine"
 .Sh SYNOPSIS
 .Nm
-.Op Fl abehuwxACHPSWY
+.Op Fl AabCeHhPSuWwxY
 .Oo
-.Fl c\~ Ns
+.Sm off
+.Fl c\~
 .Oo
-.Op Ar cpus= Ns
-.Ar numcpus Ns
-.Oc Ns
-.Op Ar ,sockets=n Ns
-.Op Ar ,cores=n Ns
-.Op Ar ,threads=n
+.Op Cm cpus=
+.Ar numcpus
 .Oc
-.Op Fl g Ar gdbport
-.Op Fl l Ar help|lpcdev Ns Op , Ns Ar conf
-.Op Fl m Ar memsize Ns Op Ar K|k|M|m|G|g|T|t
-.Op Fl p Ar vcpu:hostcpu
-.Op Fl s Ar help|slot,emulation Ns Op , Ns Ar conf
+.Op Cm ,sockets= Ar n
+.Op Cm ,cores= Ar n
+.Op Cm ,threads= Ar n
+.Oc
+.Sm on
 .Op Fl G Ar port
+.Op Fl g Ar gdbport
+.Oo Fl l
+.Sm off
+.Cm help | Ar lpcdev Op Cm \&, Ar conf
+.Sm on
+.Oc
+.Oo Fl m
+.Sm off
+.Ar memsize
+.Oo
+.Cm K No | Cm k No | Cm M No | Cm m No | Cm G No | Cm g No | Cm T No | Cm t
+.Oc
+.Sm on
+.Oc
+.Op Fl p Ar vcpu Ns Cm \&: Ns Ar hostcpu
+.Oo Fl s
+.Sm off
+.Cm help | Ar slot Cm \&, Ar emulation Op Cm \&, Ar conf
+.Sm on
+.Oc
 .Op Fl U Ar uuid
 .Ar vmname
 .Sh DESCRIPTION
___
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"