svn commit: r363595 - head/sys/kern

2020-07-26 Thread Kyle Evans
Author: kevans
Date: Mon Jul 27 03:13:23 2020
New Revision: 363595
URL: https://svnweb.freebsd.org/changeset/base/363595

Log:
  makesyscalls.sh: spit out a deprecation notice to stderr
  
  This has for a while been replaced by makesyscalls.lua in the stock FreeBSD
  build.  Ensure downstreams get some notice that it'a going away if they're
  reliant on it, maybe.

Modified:
  head/sys/kern/makesyscalls.sh

Modified: head/sys/kern/makesyscalls.sh
==
--- head/sys/kern/makesyscalls.sh   Mon Jul 27 01:53:27 2020
(r363594)
+++ head/sys/kern/makesyscalls.sh   Mon Jul 27 03:13:23 2020
(r363595)
@@ -60,6 +60,8 @@ case $# in
;;
 esac
 
+1>&2 echo "$0: This script is deprecated and will be removed before FreeBSD 
13."
+
 if [ -n "$2" ]; then
. "$2"
 fi
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r363594 - stable/12/sys/net

2020-07-26 Thread Matt Macy
Author: mmacy
Date: Mon Jul 27 01:53:27 2020
New Revision: 363594
URL: https://svnweb.freebsd.org/changeset/base/363594

Log:
  iflib: fix cloneattach fail and generalize pseudo device handling
  
  - a cloneattach failure will not currently be handled correctly,
jump to the right target
  
  - pseudo devices are all treat as if they're ethernet devices -
this often doesn't make sense
  
  Sponsored by: Netgate, Inc.
  Differential Revision:https://reviews.freebsd.org/D25083

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

Modified: stable/12/sys/net/iflib.c
==
--- stable/12/sys/net/iflib.c   Mon Jul 27 01:51:33 2020(r363593)
+++ stable/12/sys/net/iflib.c   Mon Jul 27 01:53:27 2020(r363594)
@@ -4838,11 +4838,8 @@ iflib_pseudo_register(device_t dev, if_shared_ctx_t sc
if ((err = IFDI_CLONEATTACH(ctx, clctx->cc_ifc, clctx->cc_name,

clctx->cc_params)) != 0) {
device_printf(dev, "IFDI_CLONEATTACH failed %d\n", err);
-   goto fail_ctx_free;
+   goto fail_unlock;
}
-   ifmedia_add(>ifc_media, IFM_ETHER | IFM_1000_T | IFM_FDX, 0, NULL);
-   ifmedia_add(>ifc_media, IFM_ETHER | IFM_AUTO, 0, NULL);
-   ifmedia_set(>ifc_media, IFM_ETHER | IFM_AUTO);
 
 #ifdef INVARIANTS
if (scctx->isc_capabilities & IFCAP_TXCSUM)
@@ -4854,8 +4851,16 @@ iflib_pseudo_register(device_t dev, if_shared_ctx_t sc
 
ifp->if_flags |= IFF_NOGROUP;
if (sctx->isc_flags & IFLIB_PSEUDO) {
-   ether_ifattach(ctx->ifc_ifp, ctx->ifc_mac);
+   ifmedia_add(>ifc_media, IFM_ETHER | IFM_AUTO, 0, NULL);
+   ifmedia_set(>ifc_media, IFM_ETHER | IFM_AUTO);
 
+   if (sctx->isc_flags & IFLIB_PSEUDO_ETHER) {
+   ether_ifattach(ctx->ifc_ifp, ctx->ifc_mac);
+   } else {
+   if_attach(ctx->ifc_ifp);
+   bpfattach(ctx->ifc_ifp, DLT_NULL, sizeof(u_int32_t));
+   }
+
if ((err = IFDI_ATTACH_POST(ctx)) != 0) {
device_printf(dev, "IFDI_ATTACH_POST failed %d\n", err);
goto fail_detach;
@@ -4877,6 +4882,10 @@ iflib_pseudo_register(device_t dev, if_shared_ctx_t sc
CTX_UNLOCK(ctx);
return (0);
}
+   ifmedia_add(>ifc_media, IFM_ETHER | IFM_1000_T | IFM_FDX, 0, NULL);
+   ifmedia_add(>ifc_media, IFM_ETHER | IFM_AUTO, 0, NULL);
+   ifmedia_set(>ifc_media, IFM_ETHER | IFM_AUTO);
+
_iflib_pre_assert(scctx);
ctx->ifc_txrx = *scctx->isc_txrx;
 
@@ -4992,6 +5001,7 @@ int
 iflib_pseudo_deregister(if_ctx_t ctx)
 {
if_t ifp = ctx->ifc_ifp;
+   if_shared_ctx_t sctx = ctx->ifc_sctx;
iflib_txq_t txq;
iflib_rxq_t rxq;
int i, j;
@@ -5001,7 +5011,13 @@ iflib_pseudo_deregister(if_ctx_t ctx)
/* Unregister VLAN event handlers early */
iflib_unregister_vlan_handlers(ctx);
 
-   ether_ifdetach(ifp);
+   if ((sctx->isc_flags & IFLIB_PSEUDO)  &&
+   (sctx->isc_flags & IFLIB_PSEUDO_ETHER) == 0) {
+   bpfdetach(ifp);
+   if_detach(ifp);
+   } else {
+   ether_ifdetach(ifp);
+   }
/* XXX drain any dependent tasks */
tqg = qgroup_if_io_tqg;
for (txq = ctx->ifc_txqs, i = 0; i < NTXQSETS(ctx); i++, txq++) {
@@ -5325,13 +5341,22 @@ iflib_register(if_ctx_t ctx)
driver_t *driver = sctx->isc_driver;
device_t dev = ctx->ifc_dev;
if_t ifp;
+   u_char type;
+   int iflags;
 
if ((sctx->isc_flags & IFLIB_PSEUDO) == 0)
_iflib_assert(sctx);
 
CTX_LOCK_INIT(ctx);
STATE_LOCK_INIT(ctx, device_get_nameunit(ctx->ifc_dev));
-   ifp = ctx->ifc_ifp = if_alloc(IFT_ETHER);
+   if (sctx->isc_flags & IFLIB_PSEUDO) {
+   if (sctx->isc_flags & IFLIB_PSEUDO_ETHER)
+   type = IFT_ETHER;
+   else
+   type = IFT_PPP;
+   } else
+   type = IFT_ETHER;
+   ifp = ctx->ifc_ifp = if_alloc(type);
if (ifp == NULL) {
device_printf(dev, "can not allocate ifnet structure\n");
return (ENOMEM);
@@ -5356,8 +5381,14 @@ iflib_register(if_ctx_t ctx)
if_settransmitfn(ifp, iflib_if_transmit);
 #endif
if_setqflushfn(ifp, iflib_if_qflush);
-   if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST);
+   iflags = IFF_MULTICAST;
 
+   if ((sctx->isc_flags & IFLIB_PSEUDO) &&
+   (sctx->isc_flags & IFLIB_PSEUDO_ETHER) == 0)
+   iflags |= IFF_POINTOPOINT;
+   else
+   iflags |= IFF_BROADCAST | IFF_SIMPLEX;
+   if_setflags(ifp, iflags);

svn commit: r363592 - stable/12/sys/net

2020-07-26 Thread Matt Macy
Author: mmacy
Date: Mon Jul 27 01:38:14 2020
New Revision: 363592
URL: https://svnweb.freebsd.org/changeset/base/363592

Log:
  Fix panics when using iflib pseudo device support
  
  Reviewed by:  gallatin@, hselasky@
  Sponsored by: Netgate, Inc.
  Differential Revision:https://reviews.freebsd.org/D23710

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

Modified: stable/12/sys/net/iflib.c
==
--- stable/12/sys/net/iflib.c   Mon Jul 27 01:20:49 2020(r363591)
+++ stable/12/sys/net/iflib.c   Mon Jul 27 01:38:14 2020(r363592)
@@ -4874,6 +4874,7 @@ iflib_pseudo_register(device_t dev, if_shared_ctx_t sc
if_setgetcounterfn(ctx->ifc_ifp, iflib_if_get_counter);
iflib_add_device_sysctl_post(ctx);
ctx->ifc_flags |= IFC_INIT_DONE;
+   CTX_UNLOCK(ctx);
return (0);
}
_iflib_pre_assert(scctx);
@@ -5325,7 +5326,8 @@ iflib_register(if_ctx_t ctx)
device_t dev = ctx->ifc_dev;
if_t ifp;
 
-   _iflib_assert(sctx);
+   if ((sctx->isc_flags & IFLIB_PSEUDO) == 0)
+   _iflib_assert(sctx);
 
CTX_LOCK_INIT(ctx);
STATE_LOCK_INIT(ctx, device_get_nameunit(ctx->ifc_dev));
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r363590 - head/sys/net

2020-07-26 Thread Matt Macy
Author: mmacy
Date: Mon Jul 27 01:17:59 2020
New Revision: 363590
URL: https://svnweb.freebsd.org/changeset/base/363590

Log:
  iflib: fix LOR with bpf detach
  
  Reported by:  grehan@
  Approved by:  grehan@
  MFC after:1 week
  Sponsored by: Netgate
  Differential Revision: https://reviews.freebsd.org/D25530

Modified:
  head/sys/net/iflib.c

Modified: head/sys/net/iflib.c
==
--- head/sys/net/iflib.cMon Jul 27 00:26:54 2020(r363589)
+++ head/sys/net/iflib.cMon Jul 27 01:17:59 2020(r363590)
@@ -4192,7 +4192,9 @@ iflib_if_ioctl(if_t ifp, u_long command, caddr_t data)
if (if_getdrvflags(ifp) & IFF_DRV_RUNNING) {
if ((if_getflags(ifp) ^ ctx->ifc_if_flags) &
(IFF_PROMISC | IFF_ALLMULTI)) {
+   CTX_UNLOCK(ctx);
err = IFDI_PROMISC_SET(ctx, 
if_getflags(ifp));
+   CTX_LOCK(ctx);
}
} else
reinit = 1;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r363589 - in stable/12/lib/libpmc/pmu-events/arch/x86: . amdfam17h amdzen1 amdzen2

2020-07-26 Thread Alexander Motin
Author: mav
Date: Mon Jul 27 00:26:54 2020
New Revision: 363589
URL: https://svnweb.freebsd.org/changeset/base/363589

Log:
  MFC r363157: Update AMD Zen1 and add Zen2 events mapping.

Added:
  stable/12/lib/libpmc/pmu-events/arch/x86/amdzen1/
 - copied from r363157, head/lib/libpmc/pmu-events/arch/x86/amdzen1/
  stable/12/lib/libpmc/pmu-events/arch/x86/amdzen2/
 - copied from r363157, head/lib/libpmc/pmu-events/arch/x86/amdzen2/
Deleted:
  stable/12/lib/libpmc/pmu-events/arch/x86/amdfam17h/
Modified:
  stable/12/lib/libpmc/pmu-events/arch/x86/mapfile.csv
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/lib/libpmc/pmu-events/arch/x86/mapfile.csv
==
--- stable/12/lib/libpmc/pmu-events/arch/x86/mapfile.csvMon Jul 27 
00:25:56 2020(r363588)
+++ stable/12/lib/libpmc/pmu-events/arch/x86/mapfile.csvMon Jul 27 
00:26:54 2020(r363589)
@@ -37,9 +37,6 @@ GenuineIntel-6-55-[56789ABCDEF],v1,cascadelakex,core
 GenuineIntel-6-7D,v1,icelake,core
 GenuineIntel-6-7E,v1,icelake,core
 GenuineIntel-6-86,v1,tremontx,core
-AuthenticAMD-23-01,v1,amdfam17h,core
-AuthenticAMD-23-02,v1,amdfam17h,core
-AuthenticAMD-23-03,v1,amdfam17h,core
-AuthenticAMD-23-04,v1,amdfam17h,core
-AuthenticAMD-23-05,v1,amdfam17h,core
-HygonGenuine-24-00,v1,amdfam17h,core
+AuthenticAMD-23-[012][0-9A-F],v2,amdzen1,core
+AuthenticAMD-23-[[:xdigit:]]+,v1,amdzen2,core
+HygonGenuine-24-00,v2,amdzen1,core
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r363588 - stable/12/lib/libpmc/pmu-events/arch/x86/amdfam17h

2020-07-26 Thread Alexander Motin
Author: mav
Date: Mon Jul 27 00:25:56 2020
New Revision: 363588
URL: https://svnweb.freebsd.org/changeset/base/363588

Log:
  MFC r355666: libpmc: sort some amdfam17h entries to make valid json

Modified:
  stable/12/lib/libpmc/pmu-events/arch/x86/amdfam17h/core.json
  stable/12/lib/libpmc/pmu-events/arch/x86/amdfam17h/memory.json
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/lib/libpmc/pmu-events/arch/x86/amdfam17h/core.json
==
--- stable/12/lib/libpmc/pmu-events/arch/x86/amdfam17h/core.jsonSun Jul 
26 23:13:10 2020(r363587)
+++ stable/12/lib/libpmc/pmu-events/arch/x86/amdfam17h/core.jsonMon Jul 
27 00:25:56 2020(r363588)
@@ -2,20 +2,20 @@
  {
  "EventName": "ex_ret_instr",
  "EventCode": "0xc0",
+ "SampleAfterValue": "203",
  "BriefDescription": "Retired Instructions."
-  "SampleAfterValue": "203",
  },
  {
  "EventName": "ex_ret_cops",
  "EventCode": "0xc1",
+ "SampleAfterValue": "203",
  "BriefDescription": "The number of uOps retired. This includes all processor 
activity (instructions, exceptions, interrupts, microcode assists, etc.). The 
number of events logged per cycle can vary from 0 to 4."
-  "SampleAfterValue": "203",
  },
  {
  "EventName": "ex_ret_brn",
  "EventCode": "0xc2",
+ "SampleAfterValue": "203",
  "BriefDescription": "The number of branch instructions retired. This includes 
all types of architectural control flow changes, including exceptions and 
interrupts."
-  "SampleAfterValue": "203",
  },
  {
  "EventName": "ex_ret_brn_misp",

Modified: stable/12/lib/libpmc/pmu-events/arch/x86/amdfam17h/memory.json
==
--- stable/12/lib/libpmc/pmu-events/arch/x86/amdfam17h/memory.json  Sun Jul 
26 23:13:10 2020(r363587)
+++ stable/12/lib/libpmc/pmu-events/arch/x86/amdfam17h/memory.json  Mon Jul 
27 00:25:56 2020(r363588)
@@ -220,7 +220,7 @@
  {
  "EventName": "ls_not_halted_cyc",
  "EventCode": "0x76",
- "BriefDescription": "Cycles not in Halt."
  "SampleAfterValue": "203",
+ "BriefDescription": "Cycles not in Halt."
  }
 ]
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r363587 - head/sys/fs/nfs

2020-07-26 Thread Rick Macklem
Author: rmacklem
Date: Sun Jul 26 23:13:10 2020
New Revision: 363587
URL: https://svnweb.freebsd.org/changeset/base/363587

Log:
  Fix the NFSv4 client so that it checks for support of TimeCreate before
  trying to set it.
  
  r362490 added support for setting of the TimeCreate (va_birthtime) attribute,
  but it does so without checking to see if the server supports the attribute.
  This could result in NFSERR_ATTRNOTSUPP error replies to the Setattr 
operation.
  This patch adds code to check that the server supports TimeCreate before
  attempting to do a Setattr of it to avoid these error returns.

Modified:
  head/sys/fs/nfs/nfs_commonsubs.c

Modified: head/sys/fs/nfs/nfs_commonsubs.c
==
--- head/sys/fs/nfs/nfs_commonsubs.cSun Jul 26 23:03:41 2020
(r363586)
+++ head/sys/fs/nfs/nfs_commonsubs.cSun Jul 26 23:13:10 2020
(r363587)
@@ -504,6 +504,7 @@ nfscl_fillsattr(struct nfsrv_descript *nd, struct vatt
u_int32_t *tl;
struct nfsv2_sattr *sp;
nfsattrbit_t attrbits;
+   struct nfsnode *np;
 
switch (nd->nd_flag & (ND_NFSV2 | ND_NFSV3 | ND_NFSV4)) {
case ND_NFSV2:
@@ -605,8 +606,18 @@ nfscl_fillsattr(struct nfsrv_descript *nd, struct vatt
NFSSETBIT_ATTRBIT(, NFSATTRBIT_TIMEACCESSSET);
if (vap->va_mtime.tv_sec != VNOVAL)
NFSSETBIT_ATTRBIT(, NFSATTRBIT_TIMEMODIFYSET);
-   if (vap->va_birthtime.tv_sec != VNOVAL)
-   NFSSETBIT_ATTRBIT(, NFSATTRBIT_TIMECREATE);
+   if (vap->va_birthtime.tv_sec != VNOVAL &&
+   strcmp(vp->v_mount->mnt_vfc->vfc_name, "nfs") == 0) {
+   /*
+* We can only test for support of TimeCreate if
+* the "vp" argument is for an NFS vnode.
+*/
+   np = VTONFS(vp);
+   if (NFSISSET_ATTRBIT(>n_vattr.na_suppattr,
+   NFSATTRBIT_TIMECREATE))
+   NFSSETBIT_ATTRBIT(,
+   NFSATTRBIT_TIMECREATE);
+   }
(void) nfsv4_fillattr(nd, vp->v_mount, vp, NULL, vap, NULL, 0,
, NULL, NULL, 0, 0, 0, 0, (uint64_t)0, NULL);
break;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r363586 - head/sys/fs/nfsserver

2020-07-26 Thread Rick Macklem
Author: rmacklem
Date: Sun Jul 26 23:03:41 2020
New Revision: 363586
URL: https://svnweb.freebsd.org/changeset/base/363586

Log:
  Fix the NFS server so that it sets va_birthtime.
  
  r362490 marked that the NFSv4 attribute TimeCreate (va_birthtime) is 
supported,
  but it did not change the NFS server code to actually do it.
  As such, errors could occur when unrolling a tarball onto an NFSv4 mounted
  volume, since setting TimeCreate would fail with a NFSERR_ATTRNOTSUPP reply.
  
  This patch fixes the server so that it does TimeCreate and also makes
  sure that TimeCreate will not be set for a DS file for a pNFS server.
  
  A separate commit will add a check to the NFSv4 client for support of
  the TimeCreate attribute before attempting to set it, to avoid a problem
  when mounting a server that does not support the attribute.
  The failures will still occur for r362490 or later kernels that do not
  have this patch, since they indicate support for the attribute, but do not
  actually support the attribute.

Modified:
  head/sys/fs/nfsserver/nfs_nfsdport.c

Modified: head/sys/fs/nfsserver/nfs_nfsdport.c
==
--- head/sys/fs/nfsserver/nfs_nfsdport.cSun Jul 26 22:30:55 2020
(r363585)
+++ head/sys/fs/nfsserver/nfs_nfsdport.cSun Jul 26 23:03:41 2020
(r363586)
@@ -459,6 +459,7 @@ nfsvno_setattr(struct vnode *vp, struct nfsvattr *nvap
 {
u_quad_t savsize = 0;
int error, savedit;
+   time_t savbtime;
 
/*
 * If this is an exported file system and a pNFS service is running,
@@ -490,9 +491,13 @@ nfsvno_setattr(struct vnode *vp, struct nfsvattr *nvap
nvap->na_vattr.va_mode != (mode_t)VNOVAL ||
nvap->na_vattr.va_atime.tv_sec != VNOVAL ||
nvap->na_vattr.va_mtime.tv_sec != VNOVAL)) {
+   /* Never modify birthtime on a DS file. */
+   savbtime = nvap->na_vattr.va_birthtime.tv_sec;
+   nvap->na_vattr.va_birthtime.tv_sec = VNOVAL;
/* For a pNFS server, set the attributes on the DS file. */
error = nfsrv_proxyds(vp, 0, 0, cred, p, NFSPROC_SETATTR,
NULL, NULL, NULL, nvap, NULL, NULL, 0, NULL);
+   nvap->na_vattr.va_birthtime.tv_sec = savbtime;
if (error == ENOENT)
error = 0;
}
@@ -2914,8 +2919,7 @@ nfsv4_sattr(struct nfsrv_descript *nd, vnode_t vp, str
break;
case NFSATTRBIT_TIMECREATE:
NFSM_DISSECT(tl, u_int32_t *, NFSX_V4TIME);
-   if (!nd->nd_repstat)
-   nd->nd_repstat = NFSERR_ATTRNOTSUPP;
+   fxdr_nfsv4time(tl, >na_btime);
attrsum += NFSX_V4TIME;
break;
case NFSATTRBIT_TIMEMODIFYSET:
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r363585 - head/sys/geom

2020-07-26 Thread Xin LI
Author: delphij
Date: Sun Jul 26 22:30:55 2020
New Revision: 363585
URL: https://svnweb.freebsd.org/changeset/base/363585

Log:
  gctl_get_geom: Skip validation of g_class.
  
  The caller from kernel is expected to provide an valid g_class
  pointer, instead of traversing the global g_class list, just
  use that pointer directly instead.
  
  Reviewed by:  mav
  MFC after:2 weeks
  Differential Revision:https://reviews.freebsd.org/D25811

Modified:
  head/sys/geom/geom.h
  head/sys/geom/geom_ctl.c

Modified: head/sys/geom/geom.h
==
--- head/sys/geom/geom.hSun Jul 26 22:30:01 2020(r363584)
+++ head/sys/geom/geom.hSun Jul 26 22:30:55 2020(r363585)
@@ -434,7 +434,7 @@ void *gctl_get_paraml(struct gctl_req *req, const char
 void *gctl_get_paraml_opt(struct gctl_req *req, const char *param, int len);
 int gctl_error(struct gctl_req *req, const char *fmt, ...) __printflike(2, 3);
 struct g_class *gctl_get_class(struct gctl_req *req, char const *arg);
-struct g_geom *gctl_get_geom(struct gctl_req *req, struct g_class *mpr, char 
const *arg);
+struct g_geom *gctl_get_geom(struct gctl_req *req, struct g_class *mp, char 
const *arg);
 struct g_provider *gctl_get_provider(struct gctl_req *req, char const *arg);
 
 #endif /* _GEOM_GEOM_H_ */

Modified: head/sys/geom/geom_ctl.c
==
--- head/sys/geom/geom_ctl.cSun Jul 26 22:30:01 2020(r363584)
+++ head/sys/geom/geom_ctl.cSun Jul 26 22:30:55 2020(r363585)
@@ -409,25 +409,20 @@ gctl_get_class(struct gctl_req *req, char const *arg)
 }
 
 struct g_geom *
-gctl_get_geom(struct gctl_req *req, struct g_class *mpr, char const *arg)
+gctl_get_geom(struct gctl_req *req, struct g_class *mp, char const *arg)
 {
char const *p;
-   struct g_class *mp;
struct g_geom *gp;
 
+   MPASS(mp != NULL);
p = gctl_get_asciiparam(req, arg);
if (p == NULL) {
gctl_error(req, "Missing %s argument", arg);
return (NULL);
}
-   LIST_FOREACH(mp, _classes, class) {
-   if (mpr != NULL && mpr != mp)
-   continue;
-   LIST_FOREACH(gp, >geom, geom) {
-   if (!strcmp(p, gp->name))
-   return (gp);
-   }
-   }
+   LIST_FOREACH(gp, >geom, geom)
+   if (!strcmp(p, gp->name))
+   return (gp);
gctl_error(req, "Geom not found: \"%s\"", p);
return (NULL);
 }
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r363584 - head/sys/geom

2020-07-26 Thread Xin LI
Author: delphij
Date: Sun Jul 26 22:30:01 2020
New Revision: 363584
URL: https://svnweb.freebsd.org/changeset/base/363584

Log:
  geom_map and geom_redboot: Remove unused ctlreq handler.
  
  The two classes do not take any verbs and always gctl_error for
  all requests, so don't bother to provide a ctlreq handler.
  
  Reviewed by:  mav
  MFC after:2 weeks
  Differential Revision:https://reviews.freebsd.org/D25810

Modified:
  head/sys/geom/geom_map.c
  head/sys/geom/geom_redboot.c

Modified: head/sys/geom/geom_map.c
==
--- head/sys/geom/geom_map.cSun Jul 26 19:51:42 2020(r363583)
+++ head/sys/geom/geom_map.cSun Jul 26 22:30:01 2020(r363584)
@@ -387,24 +387,11 @@ g_map_taste(struct g_class *mp, struct g_provider *pp,
return (gp);
 }
 
-static void
-g_map_config(struct gctl_req *req, struct g_class *mp, const char *verb)
-{
-   struct g_geom *gp;
-
-   g_topology_assert();
-   gp = gctl_get_geom(req, mp, "geom");
-   if (gp == NULL)
-   return;
-   gctl_error(req, "Unknown verb");
-}
-
 static struct g_class g_map_class = {
.name = MAP_CLASS_NAME,
.version = G_VERSION,
.taste = g_map_taste,
.dumpconf = g_map_dumpconf,
-   .ctlreq = g_map_config,
 };
 DECLARE_GEOM_CLASS(g_map_class, g_map);
 MODULE_VERSION(geom_map, 0);

Modified: head/sys/geom/geom_redboot.c
==
--- head/sys/geom/geom_redboot.cSun Jul 26 19:51:42 2020
(r363583)
+++ head/sys/geom/geom_redboot.cSun Jul 26 22:30:01 2020
(r363584)
@@ -336,24 +336,11 @@ again:
return (gp);
 }
 
-static void
-g_redboot_config(struct gctl_req *req, struct g_class *mp, const char *verb)
-{
-   struct g_geom *gp;
-
-   g_topology_assert();
-   gp = gctl_get_geom(req, mp, "geom");
-   if (gp == NULL)
-   return;
-   gctl_error(req, "Unknown verb");
-}
-
 static struct g_class g_redboot_class  = {
.name   = REDBOOT_CLASS_NAME,
.version= G_VERSION,
.taste  = g_redboot_taste,
.dumpconf   = g_redboot_dumpconf,
-   .ctlreq = g_redboot_config,
.ioctl  = g_redboot_ioctl,
 };
 DECLARE_GEOM_CLASS(g_redboot_class, g_redboot);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r363568 - stable/12/sys/net

2020-07-26 Thread Kristof Provost

On 26 Jul 2020, at 21:21, mike tancsa wrote:

Hi Kristof,

    First off, thank you for all your efforts in pf and 
if_bridge.  I

have trying to track down a problem with a golang app (sysutils/zrepl)
that started acting up around the time the if_bridge stuff was 
commited
(june 26th).  The problem would manifest in stalls of the daemon and 
am

wondering this might have played a role.  The june 10th kernel I had
seemed to work just fine with the app, although I just rebooted to 
that

to confirm as around that time we added more RAM to the server in
question and put the app under slightly higher load too. I have yet to
boot to a kernel post this being reverted.  But apart from the panics
some people saw could other 'odd' things pop up as well if traffic was
coming in a bridge interface using an igb0 nic ?


I wouldn’t think so, no.

The epoch change mostly removed locks and opportunities to stall (I know 
it fixes at least one deadlock). If there are bugs it’s pretty much 
always going to manifest as a crash (or assertion failure).


Best regards,
Kristof
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r363582 - vendor/llvm-project/llvmorg-11-init-20933-g3c1fca803bc

2020-07-26 Thread Dimitry Andric
Author: dim
Date: Sun Jul 26 19:48:09 2020
New Revision: 363582
URL: https://svnweb.freebsd.org/changeset/base/363582

Log:
  Tag llvm-project branch release/11.x llvmorg-11-init-20933-g3c1fca803bc.

Added:
  vendor/llvm-project/llvmorg-11-init-20933-g3c1fca803bc/
 - copied from r363581, vendor/llvm-project/release-11.x/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r363581 - in vendor/llvm-project/release-11.x: clang/include/clang/Driver clang/include/clang/Sema clang/lib/AST clang/lib/Basic/Targets clang/lib/CodeGen clang/lib/Driver clang/lib/Dri...

2020-07-26 Thread Dimitry Andric
Author: dim
Date: Sun Jul 26 19:46:28 2020
New Revision: 363581
URL: https://svnweb.freebsd.org/changeset/base/363581

Log:
  Vendor import of llvm-project branch release/11.x
  llvmorg-11-init-20933-g3c1fca803bc.

Added:
  
vendor/llvm-project/release-11.x/llvm/include/llvm/Support/RISCVTargetParser.def
Modified:
  vendor/llvm-project/release-11.x/clang/include/clang/Driver/Options.td
  vendor/llvm-project/release-11.x/clang/include/clang/Sema/SemaInternal.h
  vendor/llvm-project/release-11.x/clang/lib/AST/ExprConstant.cpp
  vendor/llvm-project/release-11.x/clang/lib/Basic/Targets/RISCV.cpp
  vendor/llvm-project/release-11.x/clang/lib/Basic/Targets/RISCV.h
  vendor/llvm-project/release-11.x/clang/lib/CodeGen/CGOpenMPRuntime.cpp
  vendor/llvm-project/release-11.x/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
  vendor/llvm-project/release-11.x/clang/lib/CodeGen/CodeGenFunction.cpp
  vendor/llvm-project/release-11.x/clang/lib/Driver/ToolChains/Arch/RISCV.cpp
  vendor/llvm-project/release-11.x/clang/lib/Driver/ToolChains/Clang.cpp
  vendor/llvm-project/release-11.x/clang/lib/Driver/ToolChains/CommonArgs.cpp
  vendor/llvm-project/release-11.x/clang/lib/Driver/Types.cpp
  vendor/llvm-project/release-11.x/clang/lib/Frontend/CompilerInvocation.cpp
  vendor/llvm-project/release-11.x/clang/lib/Sema/SemaExprCXX.cpp
  vendor/llvm-project/release-11.x/clang/lib/Sema/SemaOpenMP.cpp
  vendor/llvm-project/release-11.x/compiler-rt/lib/tsan/rtl/tsan_rtl_report.cpp
  vendor/llvm-project/release-11.x/lld/COFF/SymbolTable.cpp
  
vendor/llvm-project/release-11.x/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
  vendor/llvm-project/release-11.x/llvm/include/llvm/IR/IRBuilder.h
  vendor/llvm-project/release-11.x/llvm/include/llvm/Support/TargetParser.h
  
vendor/llvm-project/release-11.x/llvm/include/llvm/Transforms/Scalar/AlignmentFromAssumptions.h
  vendor/llvm-project/release-11.x/llvm/lib/Analysis/AssumeBundleQueries.cpp
  vendor/llvm-project/release-11.x/llvm/lib/Analysis/ConstantFolding.cpp
  vendor/llvm-project/release-11.x/llvm/lib/Analysis/InstructionSimplify.cpp
  vendor/llvm-project/release-11.x/llvm/lib/Analysis/ScalarEvolution.cpp
  
vendor/llvm-project/release-11.x/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
  vendor/llvm-project/release-11.x/llvm/lib/IR/ConstantFold.cpp
  vendor/llvm-project/release-11.x/llvm/lib/IR/IRBuilder.cpp
  vendor/llvm-project/release-11.x/llvm/lib/IR/Verifier.cpp
  vendor/llvm-project/release-11.x/llvm/lib/MC/MCParser/MasmParser.cpp
  vendor/llvm-project/release-11.x/llvm/lib/Object/RelocationResolver.cpp
  vendor/llvm-project/release-11.x/llvm/lib/Support/TargetParser.cpp
  vendor/llvm-project/release-11.x/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp
  vendor/llvm-project/release-11.x/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
  vendor/llvm-project/release-11.x/llvm/lib/Target/PowerPC/PPCInstr64Bit.td
  vendor/llvm-project/release-11.x/llvm/lib/Target/PowerPC/PPCInstrInfo.td
  vendor/llvm-project/release-11.x/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp
  vendor/llvm-project/release-11.x/llvm/lib/Target/RISCV/RISCV.td
  vendor/llvm-project/release-11.x/llvm/lib/Target/X86/AsmParser/X86Operand.h
  vendor/llvm-project/release-11.x/llvm/lib/Target/X86/X86ISelLowering.cpp
  vendor/llvm-project/release-11.x/llvm/lib/Target/X86/X86InstrInfo.td
  vendor/llvm-project/release-11.x/llvm/lib/Target/X86/X86InstrSystem.td
  
vendor/llvm-project/release-11.x/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
  
vendor/llvm-project/release-11.x/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
  
vendor/llvm-project/release-11.x/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
  
vendor/llvm-project/release-11.x/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
  
vendor/llvm-project/release-11.x/llvm/lib/Transforms/Scalar/AlignmentFromAssumptions.cpp
  vendor/llvm-project/release-11.x/llvm/utils/TableGen/X86RecognizableInstr.cpp

Modified: vendor/llvm-project/release-11.x/clang/include/clang/Driver/Options.td
==
--- vendor/llvm-project/release-11.x/clang/include/clang/Driver/Options.td  
Sun Jul 26 19:40:37 2020(r363580)
+++ vendor/llvm-project/release-11.x/clang/include/clang/Driver/Options.td  
Sun Jul 26 19:46:28 2020(r363581)
@@ -1440,6 +1440,10 @@ def fpch_instantiate_templates:
 def fno_pch_instantiate_templates:
   Flag <["-"], "fno-pch-instantiate-templates">,
   Group, Flags<[CC1Option]>;
+defm pch_codegen: OptInFFlag<"pch-codegen", "Generate ", "Do not generate ",
+  "code for uses of this PCH that assumes an explicit object file will be 
built for the PCH">;
+defm pch_debuginfo: OptInFFlag<"pch-debuginfo", "Generate ", "Do not generate 
",
+  "debug info for types in an object file built from this PCH and do not 
generate them elsewhere">;
 
 def fmodules : Flag <["-"], "fmodules">, Group,
   Flags<[DriverOption, CC1Option]>,

Modified: 

svn commit: r363580 - vendor/llvm-project/release-11.x

2020-07-26 Thread Dimitry Andric
Author: dim
Date: Sun Jul 26 19:40:37 2020
New Revision: 363580
URL: https://svnweb.freebsd.org/changeset/base/363580

Log:
  Branch vendor/llvm-project/master to vendor/llvm-project/release-11.x,
  to allow for independent merges of the upstream master and release-11.x
  branches.

Added:
  vendor/llvm-project/release-11.x/
 - copied from r363579, vendor/llvm-project/master/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r363579 - vendor/llvm-project/llvmorg-11-init-20887-g2e10b7a39b9

2020-07-26 Thread Dimitry Andric
Author: dim
Date: Sun Jul 26 19:39:02 2020
New Revision: 363579
URL: https://svnweb.freebsd.org/changeset/base/363579

Log:
  Tag llvm-project master 2e10b7a39b9, the last commit before the
  llvmorg-12-init tag, from which release/11.x was branched.

Added:
  vendor/llvm-project/llvmorg-11-init-20887-g2e10b7a39b9/
 - copied from r363578, vendor/llvm-project/master/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r363568 - stable/12/sys/net

2020-07-26 Thread mike tancsa
Hi Kristof,

    First off, thank you for all your efforts in pf and if_bridge.  I
have trying to track down a problem with a golang app (sysutils/zrepl)
that started acting up around the time the if_bridge stuff was commited
(june 26th).  The problem would manifest in stalls of the daemon and am
wondering this might have played a role.  The june 10th kernel I had
seemed to work just fine with the app, although I just rebooted to that
to confirm as around that time we added more RAM to the server in
question and put the app under slightly higher load too. I have yet to
boot to a kernel post this being reverted.  But apart from the panics
some people saw could other 'odd' things pop up as well if traffic was
coming in a bridge interface using an igb0 nic ?

    ---Mike

On 7/26/2020 1:44 PM, Kristof Provost wrote:
> Author: kp
> Date: Sun Jul 26 17:44:03 2020
> New Revision: 363568
> URL: https://svnweb.freebsd.org/changeset/base/363568
>
> Log:
>   Revert bridge epochification
>   
>   Revert r363492, r363491, r363430, r363429 and r362650.
>   
>   The introduction of epoch in the network stack is incomplete in stable/12, 
> and
>   there are simply too many limitations to make the bridge epoch code work 
> there.
>   
>   The final problem is capability configuration of the bridge member 
> interfaces.
>   if_bridge needs to enable promiscuous mode, which for certain drivers (e1000
>   for example) can sleep. In stable/12 we may not sleep within epoch.
>
> Modified:
>   stable/12/sys/net/if_bridge.c
>
> Modified: stable/12/sys/net/if_bridge.c
> ==
> --- stable/12/sys/net/if_bridge.c Sun Jul 26 17:21:24 2020
> (r363567)
> +++ stable/12/sys/net/if_bridge.c Sun Jul 26 17:44:03 2020
> (r363568)
> @@ -189,14 +189,41 @@ extern void nd6_setmtu(struct ifnet *);
>   */
>  #define BRIDGE_LOCK_INIT(_sc)do {\
>   mtx_init(&(_sc)->sc_mtx, "if_bridge", NULL, MTX_DEF);   \
> + cv_init(&(_sc)->sc_cv, "if_bridge_cv"); \
>  } while (0)
>  #define BRIDGE_LOCK_DESTROY(_sc) do {\
>   mtx_destroy(&(_sc)->sc_mtx);\
> + cv_destroy(&(_sc)->sc_cv);  \
>  } while (0)
>  #define BRIDGE_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx)
>  #define BRIDGE_UNLOCK(_sc)   mtx_unlock(&(_sc)->sc_mtx)
>  #define BRIDGE_LOCK_ASSERT(_sc)  mtx_assert(&(_sc)->sc_mtx, 
> MA_OWNED)
>  #define BRIDGE_UNLOCK_ASSERT(_sc)mtx_assert(&(_sc)->sc_mtx, MA_NOTOWNED)
> +#define  BRIDGE_LOCK2REF(_sc, _err)  do {\
> + mtx_assert(&(_sc)->sc_mtx, MA_OWNED);   \
> + if ((_sc)->sc_iflist_xcnt > 0)  \
> + (_err) = EBUSY; \
> + else\
> + (_sc)->sc_iflist_ref++; \
> + mtx_unlock(&(_sc)->sc_mtx); \
> +} while (0)
> +#define  BRIDGE_UNREF(_sc)   do {
> \
> + mtx_lock(&(_sc)->sc_mtx);   \
> + (_sc)->sc_iflist_ref--; \
> + if (((_sc)->sc_iflist_xcnt > 0) && ((_sc)->sc_iflist_ref == 0)) \
> + cv_broadcast(&(_sc)->sc_cv);\
> + mtx_unlock(&(_sc)->sc_mtx); \
> +} while (0)
> +#define  BRIDGE_XLOCK(_sc)   do {\
> + mtx_assert(&(_sc)->sc_mtx, MA_OWNED);   \
> + (_sc)->sc_iflist_xcnt++;\
> + while ((_sc)->sc_iflist_ref > 0)\
> + cv_wait(&(_sc)->sc_cv, &(_sc)->sc_mtx); \
> +} while (0)
> +#define  BRIDGE_XDROP(_sc)   do {\
> + mtx_assert(&(_sc)->sc_mtx, MA_OWNED);   \
> + (_sc)->sc_iflist_xcnt--;\
> +} while (0)
>  
>  /*
>   * Bridge interface list entry.
> @@ -210,8 +237,6 @@ struct bridge_iflist {
>   uint32_tbif_addrmax;/* max # of addresses */
>   uint32_tbif_addrcnt;/* cur. # of addresses */
>   uint32_tbif_addrexceeded;/* # of address violations */
> -
> - struct epoch_contextbif_epoch_ctx;
>  };
>  
>  /*
> @@ -225,9 +250,6 @@ struct bridge_rtnode {
>   uint8_t brt_flags;  /* address flags */
>   uint8_t brt_addr[ETHER_ADDR_LEN];
>   uint16_tbrt_vlan;   /* vlan id */
> -
> - struct  vnet*brt_vnet;
> - struct  epoch_context   brt_epoch_ctx;
>  };
>  #define  brt_ifp brt_dst->bif_ifp
>  
> @@ -238,10 +260,13 @@ struct bridge_softc {
>   struct ifnet*sc_ifp;/* make this an interface */
>   LIST_ENTRY(bridge_softc) sc_list;
>   struct mtx  sc_mtx;
> + struct cv   sc_cv;
>   uint32_tsc_brtmax;  /* max # of 

svn commit: r363577 - in stable/12/usr.bin/locale: . tests

2020-07-26 Thread Yuri Pankov
Author: yuripv
Date: Sun Jul 26 19:18:55 2020
New Revision: 363577
URL: https://svnweb.freebsd.org/changeset/base/363577

Log:
  MFC r362146:
  locale: exit 1 if unknown keyword was specified
  
  PR:   241906
  Submitted by: Akos Somfai 

Modified:
  stable/12/usr.bin/locale/locale.c
  stable/12/usr.bin/locale/tests/locale_test.sh
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/usr.bin/locale/locale.c
==
--- stable/12/usr.bin/locale/locale.c   Sun Jul 26 18:33:29 2020
(r363576)
+++ stable/12/usr.bin/locale/locale.c   Sun Jul 26 19:18:55 2020
(r363577)
@@ -61,7 +61,7 @@ void  list_locales(void);
 const char *lookup_localecat(int);
 char   *kwval_lconv(int);
 intkwval_lookup(const char *, char **, int *, int *, int *);
-void   showdetails(const char *);
+intshowdetails(const char *);
 void   showkeywordslist(char *substring);
 void   showlocale(void);
 void   usage(void);
@@ -414,7 +414,8 @@ main(int argc, char *argv[])
setlocale(LC_ALL, "");
if (argc > 0) {
while (argc > 0) {
-   showdetails(*argv);
+   if (showdetails(*argv) != 0)
+   exit(EXIT_FAILURE);
argv++;
argc--;
}
@@ -837,19 +838,16 @@ kwval_lookup(const char *kwname, char **kwval, int *ca
  * Show details about requested keyword according to '-k' and/or '-c'
  * command line options specified.
  */
-void
+int
 showdetails(const char *kw)
 {
int type, cat, tmpval, alloc;
char*kwval;
 
if (kwval_lookup(kw, , , , ) == 0) {
-   /*
-* invalid keyword specified.
-* XXX: any actions?
-*/
+   /* Invalid keyword specified */
fprintf(stderr, "Unknown keyword: `%s'\n", kw);
-   return;
+   return (1);
}
 
if (prt_categories) {
@@ -889,6 +887,8 @@ showdetails(const char *kw)
 
if (alloc)
free(kwval);
+
+   return (0);
 }
 
 /*

Modified: stable/12/usr.bin/locale/tests/locale_test.sh
==
--- stable/12/usr.bin/locale/tests/locale_test.sh   Sun Jul 26 18:33:29 
2020(r363576)
+++ stable/12/usr.bin/locale/tests/locale_test.sh   Sun Jul 26 19:18:55 
2020(r363577)
@@ -160,8 +160,24 @@ no_flags_posix_body()
noexpr
 }
 
+atf_test_case k_flag_unknown_kw
+k_flag_unknown_kw_head()
+{
+   atf_set "descr" \
+   "Verify 'locale -k' exit status is '1' for unknown keywords"
+}
+k_flag_unknown_kw_body()
+{
+   export LC_ALL="C"
+
+   # Hopefully the keyword will stay nonexistent
+   atf_check -s exit:1 -o empty -e ignore locale -k nonexistent
+}
+
+
 atf_init_test_cases()
 {
atf_add_test_case k_flag_posix
atf_add_test_case no_flags_posix
+   atf_add_test_case k_flag_unknown_kw
 }
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


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

2020-07-26 Thread Emmanuel Vadot
Author: manu
Date: Sun Jul 26 18:33:29 2020
New Revision: 363575
URL: https://svnweb.freebsd.org/changeset/base/363575

Log:
  Fix r363565
  
  lockdep.h needs sys/lock.h for LOCK_CLASS

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

Modified: head/sys/compat/linuxkpi/common/include/linux/lockdep.h
==
--- head/sys/compat/linuxkpi/common/include/linux/lockdep.h Sun Jul 26 
18:21:02 2020(r363574)
+++ head/sys/compat/linuxkpi/common/include/linux/lockdep.h Sun Jul 26 
18:33:29 2020(r363575)
@@ -32,6 +32,8 @@
 #ifndef _LINUX_LOCKDEP_H_
 #define_LINUX_LOCKDEP_H_
 
+#include 
+
 struct lock_class_key {
 };
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r363576 - head/usr.bin/vmstat

2020-07-26 Thread Ian Lepore
Author: ian
Date: Sun Jul 26 18:33:29 2020
New Revision: 363576
URL: https://svnweb.freebsd.org/changeset/base/363576

Log:
  Describe the value in the 're' column of vmstat(8) in terms of freebsd's vm
  implementation.  The old description was left over from the 4.4 BSD Lite
  import in 1994, and was a bit misleading (not all arches use simulated
  reference bits, some implement reference tracking in hardware).

Modified:
  head/usr.bin/vmstat/vmstat.8

Modified: head/usr.bin/vmstat/vmstat.8
==
--- head/usr.bin/vmstat/vmstat.8Sun Jul 26 18:33:29 2020
(r363575)
+++ head/usr.bin/vmstat/vmstat.8Sun Jul 26 18:33:29 2020
(r363576)
@@ -283,7 +283,7 @@ These are given in units per second.
 .It flt
 total number of page faults
 .It re
-page reclaims (simulating reference bits)
+pages reactivated (found in laundry or inactive queues)
 .\" .It at
 .\" pages attached (found in free list)
 .It pi
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r363574 - in head/sys: conf riscv/conf riscv/riscv

2020-07-26 Thread Jessica Clarke
Author: jrtc27
Date: Sun Jul 26 18:21:02 2020
New Revision: 363574
URL: https://svnweb.freebsd.org/changeset/base/363574

Log:
  riscv: Include syscon_power device driver in GENERIC kernel config
  
  QEMU's RISC-V virt machine provides syscon-power and syscon-reset
  devices as the means by which to shutdown and reboot. We also need to
  ensure that we have attached the syscon_generic device before attaching
  any syscon_power devices, and so we introduce a new riscv_syscon device
  akin to aw_syscon added in r327936. Currently the SiFive test finisher
  is used as the specific implementation of such a syscon device.
  
  Reviewed by:  br, brooks (mentor), jhb (mentor)
  Approved by:  br, brooks (mentor), jhb (mentor)
  Obtained from:CheriBSD
  Differential Revision:https://reviews.freebsd.org/D25725

Added:
  head/sys/riscv/riscv/riscv_syscon.c   (contents, props changed)
Modified:
  head/sys/conf/files.riscv
  head/sys/riscv/conf/GENERIC

Modified: head/sys/conf/files.riscv
==
--- head/sys/conf/files.riscv   Sun Jul 26 18:19:50 2020(r363573)
+++ head/sys/conf/files.riscv   Sun Jul 26 18:21:02 2020(r363574)
@@ -57,6 +57,7 @@ riscv/riscv/ofw_machdep.c optionalfdt
 riscv/riscv/plic.c standard
 riscv/riscv/pmap.c standard
 riscv/riscv/riscv_console.coptionalrcons
+riscv/riscv/riscv_syscon.c optionalext_resources syscon 
riscv_syscon fdt
 riscv/riscv/sbi.c  standard
 riscv/riscv/soc.c  standard
 riscv/riscv/stack_machdep.coptionalddb | stack

Modified: head/sys/riscv/conf/GENERIC
==
--- head/sys/riscv/conf/GENERIC Sun Jul 26 18:19:50 2020(r363573)
+++ head/sys/riscv/conf/GENERIC Sun Jul 26 18:21:02 2020(r363574)
@@ -77,6 +77,13 @@ options  INTRNG
 # RISC-V SBI console
 device rcons
 
+# EXT_RESOURCES pseudo devices
+optionsEXT_RESOURCES
+device clk
+device syscon
+device syscon_power
+device riscv_syscon
+
 # Bus drivers
 device pci
 

Added: head/sys/riscv/riscv/riscv_syscon.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/riscv/riscv/riscv_syscon.c Sun Jul 26 18:21:02 2020
(r363574)
@@ -0,0 +1,84 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
+ * Copyright (c) 2018 Kyle Evans 
+ * Copyright (c) 2020 Jessica Clarke 
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * RISC-V syscon driver. Used as a generic interface by QEMU's virt machine for
+ * describing the SiFive test finisher as a power and reset controller.
+ */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+static struct ofw_compat_data compat_data[] = {
+   {"sifive,test0",1},
+   {"sifive,test1",1},
+   {NULL,  0}
+};
+
+static int
+riscv_syscon_probe(device_t dev)
+{
+
+   if (!ofw_bus_status_okay(dev))
+   return (ENXIO);
+   if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0)
+   return (ENXIO);
+
+   device_set_desc(dev, "RISC-V syscon");
+   return (BUS_PROBE_DEFAULT);
+}
+
+static device_method_t riscv_syscon_methods[] = {
+   DEVMETHOD(device_probe, riscv_syscon_probe),
+
+   DEVMETHOD_END
+};
+
+DEFINE_CLASS_1(riscv_syscon, riscv_syscon_driver, riscv_syscon_methods,
+

svn commit: r363573 - in head/sys: conf dev/extres/syscon

2020-07-26 Thread Jessica Clarke
Author: jrtc27
Date: Sun Jul 26 18:19:50 2020
New Revision: 363573
URL: https://svnweb.freebsd.org/changeset/base/363573

Log:
  Add syscon power and reset control device driver
  
  This device driver supports both syscon-power and syscon-reset devices,
  as specified in [1] and [2]. These provide a very simple interface for
  power and reset control, and among other things are used by QEMU's virt
  machine on RISC-V. A separate commit will enable this on RISC-V, as that
  requires adding a RISC-V-specific riscv_syscon akin to r327936's
  aw_syscon.
  
  [1] 
https://www.kernel.org/doc/Documentation/devicetree/bindings/power/reset/syscon-poweroff.txt
  [2] 
https://www.kernel.org/doc/Documentation/devicetree/bindings/power/reset/syscon-reboot.txt
  
  Reviewed by:  brooks (mentor), jhb (mentor)
  Approved by:  brooks (mentor), jhb (mentor)
  Obtained from:CheriBSD
  Differential Revision:https://reviews.freebsd.org/D25724

Added:
  head/sys/dev/extres/syscon/syscon_power.c   (contents, props changed)
Modified:
  head/sys/conf/files

Modified: head/sys/conf/files
==
--- head/sys/conf/files Sun Jul 26 18:17:36 2020(r363572)
+++ head/sys/conf/files Sun Jul 26 18:19:50 2020(r363573)
@@ -1702,6 +1702,7 @@ dev/extres/regulator/regulator_fixed.coptional ext_re
 dev/extres/syscon/syscon.c optional ext_resources syscon
 dev/extres/syscon/syscon_generic.c optional ext_resources syscon fdt
 dev/extres/syscon/syscon_if.m  optional ext_resources syscon
+dev/extres/syscon/syscon_power.c   optional ext_resources syscon 
syscon_power fdt
 dev/fb/fbd.c   optional fbd | vt
 dev/fb/fb_if.m standard
 dev/fb/splash.coptional sc splash

Added: head/sys/dev/extres/syscon/syscon_power.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/dev/extres/syscon/syscon_power.c   Sun Jul 26 18:19:50 2020
(r363573)
@@ -0,0 +1,198 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
+ * Copyright (c) 2020 Jessica Clarke 
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Driver for simple syscon poweroff and reset devices. The device tree
+ * specifications are fully described at:
+ *
+ * 
https://www.kernel.org/doc/Documentation/devicetree/bindings/power/reset/syscon-poweroff.txt
+ * 
https://www.kernel.org/doc/Documentation/devicetree/bindings/power/reset/syscon-reboot.txt
+ */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+
+#include "syscon_if.h"
+#include "syscon.h"
+
+struct syscon_power_softc {
+   struct syscon   *regmap;
+   uint32_toffset;
+   uint32_tvalue;
+   uint32_tmask;
+   boolreboot;
+   eventhandler_tagshutdown_tag;
+};
+
+static void
+syscon_power_shutdown_final(device_t dev, int howto)
+{
+   struct syscon_power_softc *sc;
+   bool write;
+
+   sc = device_get_softc(dev);
+   if (sc->reboot)
+   write = (howto & RB_HALT) == 0;
+   else
+   write = (howto & RB_POWEROFF) != 0;
+
+   if (write)
+   SYSCON_MODIFY_4(sc->regmap, sc->offset, sc->mask,
+   sc->value & sc->mask);
+}
+
+static int
+syscon_power_probe(device_t dev)
+{
+
+   if (!ofw_bus_status_okay(dev))
+   return (ENXIO);
+
+   if (ofw_bus_is_compatible(dev, "syscon-poweroff")) {

svn commit: r363572 - in head/stand/efi/loader/arch: arm riscv

2020-07-26 Thread Jessica Clarke
Author: jrtc27
Date: Sun Jul 26 18:17:36 2020
New Revision: 363572
URL: https://svnweb.freebsd.org/changeset/base/363572

Log:
  loader: Avoid -Wpointer-to-int cast warnings for Arm and RISC-V
  
  On RISC-V, Clang warns with:
  
  cast to smaller integer type 'unsigned int' from 'void (*)(void *)'
  
  Instead, use %p as the standard format specifier for printing pointers.
  Whilst Arm's pointer size is the same as unsigned, it's still cleaner to
  use the right thing there too.
  
  Reviewed by:  brooks (mentor), emaste
  Approved by:  brooks (mentor), emaste
  Differential Revision:https://reviews.freebsd.org/D25718

Modified:
  head/stand/efi/loader/arch/arm/exec.c
  head/stand/efi/loader/arch/riscv/exec.c

Modified: head/stand/efi/loader/arch/arm/exec.c
==
--- head/stand/efi/loader/arch/arm/exec.c   Sun Jul 26 18:15:16 2020
(r363571)
+++ head/stand/efi/loader/arch/arm/exec.c   Sun Jul 26 18:17:36 2020
(r363572)
@@ -77,7 +77,7 @@ __elfN(arm_exec)(struct preloaded_file *fp)
 
entry = efi_translate(e->e_entry);
 
-   printf("Kernel entry at 0x%x...\n", (unsigned)entry);
+   printf("Kernel entry at %p...\n", entry);
printf("Kernel args: %s\n", fp->f_args);
 
if ((error = bi_load(fp->f_args, , )) != 0) {

Modified: head/stand/efi/loader/arch/riscv/exec.c
==
--- head/stand/efi/loader/arch/riscv/exec.c Sun Jul 26 18:15:16 2020
(r363571)
+++ head/stand/efi/loader/arch/riscv/exec.c Sun Jul 26 18:17:36 2020
(r363572)
@@ -63,7 +63,7 @@ __elfN(exec)(struct preloaded_file *fp)
 
entry = efi_translate(e->e_entry);
 
-   printf("Kernel entry at 0x%x...\n", (unsigned)entry);
+   printf("Kernel entry at %p...\n", entry);
printf("Kernel args: %s\n", fp->f_args);
 
if ((error = bi_load(fp->f_args, , )) != 0) {
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r363571 - in head/sys: conf dev/goldfish riscv/conf

2020-07-26 Thread Jessica Clarke
Author: jrtc27
Date: Sun Jul 26 18:15:16 2020
New Revision: 363571
URL: https://svnweb.freebsd.org/changeset/base/363571

Log:
  Add Goldfish RTC device driver for RISC-V
  
  This device was originally used as part of the goldfish virtual hardware
  platform used for emulating Android on QEMU, but is now also used as the
  RTC for the RISC-V virt machine in QEMU. It provides a simple 64-bit
  nanosecond timer exposed via a pair of memory-mapped 32-bit registers,
  although only with 1s granularity.
  
  Reviewed by:  brooks (mentor), jhb (mentor), kp
  Approved by:  brooks (mentor), jhb (mentor), kp
  Obtained from:CheriBSD
  Differential Revision:https://reviews.freebsd.org/D25717

Added:
  head/sys/dev/goldfish/
  head/sys/dev/goldfish/goldfish_rtc.c   (contents, props changed)
Modified:
  head/sys/conf/files
  head/sys/riscv/conf/GENERIC

Modified: head/sys/conf/files
==
--- head/sys/conf/files Sun Jul 26 18:12:54 2020(r363570)
+++ head/sys/conf/files Sun Jul 26 18:15:16 2020(r363571)
@@ -1736,6 +1736,7 @@ dev/fxp/if_fxp.c  optional fxp
 dev/fxp/inphy.coptional fxp
 dev/gem/if_gem.c   optional gem
 dev/gem/if_gem_pci.c   optional gem pci
+dev/goldfish/goldfish_rtc.coptional goldfish_rtc fdt
 dev/gpio/dwgpio/dwgpio.c   optional gpio dwgpio fdt
 dev/gpio/dwgpio/dwgpio_bus.c   optional gpio dwgpio fdt
 dev/gpio/dwgpio/dwgpio_if.moptional gpio dwgpio fdt

Added: head/sys/dev/goldfish/goldfish_rtc.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/dev/goldfish/goldfish_rtc.cSun Jul 26 18:15:16 2020
(r363571)
@@ -0,0 +1,182 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
+ * Copyright (c) 2020 Jessica Clarke 
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * RTC for the goldfish virtual hardware platform implemented in QEMU,
+ * initially for Android but now also used for RISC-V's virt machine.
+ *
+ * 
https://android.googlesource.com/platform/external/qemu/+/master/docs/GOLDFISH-VIRTUAL-HARDWARE.TXT
+ */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#include "clock_if.h"
+
+#defineGOLDFISH_RTC_TIME_LOW   0x00
+#defineGOLDFISH_RTC_TIME_HIGH  0x04
+
+struct goldfish_rtc_softc {
+   struct resource *res;
+   int rid;
+   struct mtx  mtx;
+};
+
+static int
+goldfish_rtc_probe(device_t dev)
+{
+
+   if (!ofw_bus_status_okay(dev))
+   return (ENXIO);
+
+   if (ofw_bus_is_compatible(dev, "google,goldfish-rtc")) {
+   device_set_desc(dev, "Goldfish RTC");
+   return (BUS_PROBE_DEFAULT);
+   }
+
+   return (ENXIO);
+}
+
+static int
+goldfish_rtc_attach(device_t dev)
+{
+   struct goldfish_rtc_softc *sc;
+
+   sc = device_get_softc(dev);
+
+   sc->rid = 0;
+   sc->res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, >rid,
+   RF_ACTIVE);
+   if (sc->res == NULL) {
+   device_printf(dev, "could not allocate resource\n");
+   return (ENXIO);
+   }
+
+   mtx_init(>mtx, device_get_nameunit(dev), NULL, MTX_DEF);
+
+   /*
+* Register as a system realtime clock with 1 second resolution.
+*/
+   clock_register_flags(dev, 100, CLOCKF_SETTIME_NO_ADJ);
+   clock_schedule(dev, 1);
+
+   return (0);
+}
+
+static int

svn commit: r363570 - stable/12/usr.bin/whois

2020-07-26 Thread Mark Johnston
Author: markj
Date: Sun Jul 26 18:12:54 2020
New Revision: 363570
URL: https://svnweb.freebsd.org/changeset/base/363570

Log:
  MFC r363052:
  whois: Handle referrals to rwhois servers.
  
  PR:   243862

Modified:
  stable/12/usr.bin/whois/whois.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/usr.bin/whois/whois.c
==
--- stable/12/usr.bin/whois/whois.c Sun Jul 26 17:50:39 2020
(r363569)
+++ stable/12/usr.bin/whois/whois.c Sun Jul 26 18:12:54 2020
(r363570)
@@ -117,6 +117,7 @@ static struct {
WHOIS_REFERRAL("Whois Server:"),
WHOIS_REFERRAL("Registrar WHOIS Server:"), /* corporatedomains.com */
WHOIS_REFERRAL("ReferralServer:  whois://"), /* ARIN */
+   WHOIS_REFERRAL("ReferralServer:  rwhois://"), /* ARIN */
WHOIS_REFERRAL("descr:  region. Please query"), /* AfriNIC */
{ NULL, 0 }
 };
@@ -156,10 +157,10 @@ reset_rir(void) {
 static const char *port = DEFAULT_PORT;
 
 static const char *choose_server(char *);
-static struct addrinfo *gethostinfo(char const *host, int exitnoname);
+static struct addrinfo *gethostinfo(const char *, const char *, int);
 static void s_asprintf(char **ret, const char *format, ...) __printflike(2, 3);
 static void usage(void);
-static void whois(const char *, const char *, int);
+static void whois(const char *, const char *, const char *, int);
 
 int
 main(int argc, char *argv[])
@@ -255,11 +256,11 @@ main(int argc, char *argv[])
if (country != NULL) {
char *qnichost;
s_asprintf(, "%s%s", country, QNICHOST_TAIL);
-   whois(*argv, qnichost, flags);
+   whois(*argv, qnichost, port, flags);
free(qnichost);
} else
whois(*argv, host != NULL ? host :
- choose_server(*argv), flags);
+ choose_server(*argv), port, flags);
reset_rir();
argv++;
}
@@ -283,7 +284,7 @@ choose_server(char *domain)
 }
 
 static struct addrinfo *
-gethostinfo(char const *host, int exit_on_noname)
+gethostinfo(const char *host, const char *hport, int exit_on_noname)
 {
struct addrinfo hints, *res;
int error;
@@ -293,7 +294,7 @@ gethostinfo(char const *host, int exit_on_noname)
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
res = NULL;
-   error = getaddrinfo(host, port, , );
+   error = getaddrinfo(host, hport, , );
if (error && (exit_on_noname || error != EAI_NONAME))
err(EX_NOHOST, "%s: %s", host, gai_strerror(error));
return (res);
@@ -444,15 +445,15 @@ done:
 }
 
 static void
-whois(const char *query, const char *hostname, int flags)
+whois(const char *query, const char *hostname, const char *hostport, int flags)
 {
FILE *fp;
struct addrinfo *hostres;
-   char *buf, *host, *nhost, *p;
+   char *buf, *host, *nhost, *nport, *p;
int comment, s, f;
size_t len, i;
 
-   hostres = gethostinfo(hostname, 1);
+   hostres = gethostinfo(hostname, hostport, 1);
s = connect_to_any_host(hostres);
if (s == -1)
err(EX_OSERR, "connect()");
@@ -532,14 +533,35 @@ whois(const char *query, const char *hostname, int fla
SCAN(p, buf+len, *p == ' ');
host = p;
SCAN(p, buf+len, ishost(*p));
-   if (p > host)
+   if (p > host) {
+   char *pstr;
+
s_asprintf(, "%.*s",
   (int)(p - host), host);
+
+   if (*p != ':') {
+   s_asprintf(, "%s", port);
+   break;
+   }
+
+   pstr = ++p;
+   SCAN(p, buf+len, isdigit(*p));
+   if (p > pstr && (p - pstr) < 6) {
+   s_asprintf(, "%.*s",
+   (int)(p - pstr), pstr);
+   break;
+   }
+
+   /* Invalid port; don't recurse */
+   free(nhost);
+   nhost = NULL;
+   }
break;
}
for (i = 0; actually_arin[i] != NULL; i++) {
if (strncmp(buf, 

svn commit: r363569 - head/usr.bin/vmstat

2020-07-26 Thread Ian Lepore
Author: ian
Date: Sun Jul 26 17:50:39 2020
New Revision: 363569
URL: https://svnweb.freebsd.org/changeset/base/363569

Log:
  Remove commented-out lines describing the old never-implemented -t option.
  
  In 2018, r338094 removed the commented-out code for supporting the -t
  command line option which had been present since the BSD 4.4 Lite import,
  but was never implemented for freebsd.
  
  This does the same for the man page.

Modified:
  head/usr.bin/vmstat/vmstat.8

Modified: head/usr.bin/vmstat/vmstat.8
==
--- head/usr.bin/vmstat/vmstat.8Sun Jul 26 17:44:03 2020
(r363568)
+++ head/usr.bin/vmstat/vmstat.8Sun Jul 26 17:50:39 2020
(r363569)
@@ -28,7 +28,7 @@
 .\"@(#)vmstat.88.1 (Berkeley) 6/6/93
 .\" $FreeBSD$
 .\"
-.Dd May 26, 2020
+.Dd July 26, 2020
 .Dt VMSTAT 8
 .Os
 .Sh NAME
@@ -209,9 +209,6 @@ Display the contents of the
 .Em sum
 structure, giving the total number of several kinds of paging related
 events which have occurred since system startup.
-.\" .It Fl t
-.\" Report on the number of page in and page reclaims since system startup,
-.\" and the amount of time required by each.
 .It Fl w
 Pause
 .Ar wait
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r363568 - stable/12/sys/net

2020-07-26 Thread Kristof Provost
Author: kp
Date: Sun Jul 26 17:44:03 2020
New Revision: 363568
URL: https://svnweb.freebsd.org/changeset/base/363568

Log:
  Revert bridge epochification
  
  Revert r363492, r363491, r363430, r363429 and r362650.
  
  The introduction of epoch in the network stack is incomplete in stable/12, and
  there are simply too many limitations to make the bridge epoch code work 
there.
  
  The final problem is capability configuration of the bridge member interfaces.
  if_bridge needs to enable promiscuous mode, which for certain drivers (e1000
  for example) can sleep. In stable/12 we may not sleep within epoch.

Modified:
  stable/12/sys/net/if_bridge.c

Modified: stable/12/sys/net/if_bridge.c
==
--- stable/12/sys/net/if_bridge.c   Sun Jul 26 17:21:24 2020
(r363567)
+++ stable/12/sys/net/if_bridge.c   Sun Jul 26 17:44:03 2020
(r363568)
@@ -189,14 +189,41 @@ extern void   nd6_setmtu(struct ifnet *);
  */
 #define BRIDGE_LOCK_INIT(_sc)  do {\
mtx_init(&(_sc)->sc_mtx, "if_bridge", NULL, MTX_DEF);   \
+   cv_init(&(_sc)->sc_cv, "if_bridge_cv"); \
 } while (0)
 #define BRIDGE_LOCK_DESTROY(_sc)   do {\
mtx_destroy(&(_sc)->sc_mtx);\
+   cv_destroy(&(_sc)->sc_cv);  \
 } while (0)
 #define BRIDGE_LOCK(_sc)   mtx_lock(&(_sc)->sc_mtx)
 #define BRIDGE_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx)
 #define BRIDGE_LOCK_ASSERT(_sc)mtx_assert(&(_sc)->sc_mtx, 
MA_OWNED)
 #define BRIDGE_UNLOCK_ASSERT(_sc)  mtx_assert(&(_sc)->sc_mtx, MA_NOTOWNED)
+#defineBRIDGE_LOCK2REF(_sc, _err)  do {\
+   mtx_assert(&(_sc)->sc_mtx, MA_OWNED);   \
+   if ((_sc)->sc_iflist_xcnt > 0)  \
+   (_err) = EBUSY; \
+   else\
+   (_sc)->sc_iflist_ref++; \
+   mtx_unlock(&(_sc)->sc_mtx); \
+} while (0)
+#defineBRIDGE_UNREF(_sc)   do {
\
+   mtx_lock(&(_sc)->sc_mtx);   \
+   (_sc)->sc_iflist_ref--; \
+   if (((_sc)->sc_iflist_xcnt > 0) && ((_sc)->sc_iflist_ref == 0)) \
+   cv_broadcast(&(_sc)->sc_cv);\
+   mtx_unlock(&(_sc)->sc_mtx); \
+} while (0)
+#defineBRIDGE_XLOCK(_sc)   do {\
+   mtx_assert(&(_sc)->sc_mtx, MA_OWNED);   \
+   (_sc)->sc_iflist_xcnt++;\
+   while ((_sc)->sc_iflist_ref > 0)\
+   cv_wait(&(_sc)->sc_cv, &(_sc)->sc_mtx); \
+} while (0)
+#defineBRIDGE_XDROP(_sc)   do {\
+   mtx_assert(&(_sc)->sc_mtx, MA_OWNED);   \
+   (_sc)->sc_iflist_xcnt--;\
+} while (0)
 
 /*
  * Bridge interface list entry.
@@ -210,8 +237,6 @@ struct bridge_iflist {
uint32_tbif_addrmax;/* max # of addresses */
uint32_tbif_addrcnt;/* cur. # of addresses */
uint32_tbif_addrexceeded;/* # of address violations */
-
-   struct epoch_contextbif_epoch_ctx;
 };
 
 /*
@@ -225,9 +250,6 @@ struct bridge_rtnode {
uint8_t brt_flags;  /* address flags */
uint8_t brt_addr[ETHER_ADDR_LEN];
uint16_tbrt_vlan;   /* vlan id */
-
-   struct  vnet*brt_vnet;
-   struct  epoch_context   brt_epoch_ctx;
 };
 #definebrt_ifp brt_dst->bif_ifp
 
@@ -238,10 +260,13 @@ struct bridge_softc {
struct ifnet*sc_ifp;/* make this an interface */
LIST_ENTRY(bridge_softc) sc_list;
struct mtx  sc_mtx;
+   struct cv   sc_cv;
uint32_tsc_brtmax;  /* max # of addresses */
uint32_tsc_brtcnt;  /* cur. # of addresses */
uint32_tsc_brttimeout;  /* rt timeout in seconds */
struct callout  sc_brcallout;   /* bridge callout */
+   uint32_tsc_iflist_ref;  /* refcount for sc_iflist */
+   uint32_tsc_iflist_xcnt; /* refcount for sc_iflist */
CK_LIST_HEAD(, bridge_iflist) sc_iflist;/* member interface 
list */
CK_LIST_HEAD(, bridge_rtnode) *sc_rthash;   /* our forwarding table 
*/
CK_LIST_HEAD(, bridge_rtnode) sc_rtlist;/* list version of 
above */
@@ -251,8 +276,6 @@ struct bridge_softc {
uint32_tsc_brtexceeded; /* # of cache drops */
struct ifnet*sc_ifaddr; /* member mac copied from */
struct ether_addr   sc_defaddr; /* Default MAC address */
-
-   struct epoch_context   

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

2020-07-26 Thread Emmanuel Vadot
Author: manu
Date: Sun Jul 26 17:21:24 2020
New Revision: 363567
URL: https://svnweb.freebsd.org/changeset/base/363567

Log:
  Revert r363564
  
  linux/sizes.h doesn't exists in base ... sorry.

Modified:
  head/sys/compat/linuxkpi/common/include/linux/dma-mapping.h

Modified: head/sys/compat/linuxkpi/common/include/linux/dma-mapping.h
==
--- head/sys/compat/linuxkpi/common/include/linux/dma-mapping.h Sun Jul 26 
16:31:49 2020(r363566)
+++ head/sys/compat/linuxkpi/common/include/linux/dma-mapping.h Sun Jul 26 
17:21:24 2020(r363567)
@@ -38,7 +38,6 @@
 #include 
 #include 
 #include 
-#include 
 
 #include 
 #include 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


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

2020-07-26 Thread Emmanuel Vadot
Author: manu
Date: Sun Jul 26 16:31:49 2020
New Revision: 363566
URL: https://svnweb.freebsd.org/changeset/base/363566

Log:
  linuxkpi: Add taint* defines
  
  This isn't used for us but allow us to port drivers more easily.
  
  Reviewed by:  hselasky
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D25703

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

Modified: head/sys/compat/linuxkpi/common/include/linux/kernel.h
==
--- head/sys/compat/linuxkpi/common/include/linux/kernel.h  Sun Jul 26 
16:30:59 2020(r363565)
+++ head/sys/compat/linuxkpi/common/include/linux/kernel.h  Sun Jul 26 
16:31:49 2020(r363566)
@@ -593,4 +593,7 @@ linux_ratelimited(linux_ratelimit_t *rl)
(is_signed(datatype) ? INT8_MIN : 0) \
 )
 
+#defineTAINT_WARN  0
+#definetest_taint(x)   (0)
+
 #endif /* _LINUX_KERNEL_H_ */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


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

2020-07-26 Thread Emmanuel Vadot
Author: manu
Date: Sun Jul 26 16:30:59 2020
New Revision: 363565
URL: https://svnweb.freebsd.org/changeset/base/363565

Log:
  linuxkpi: Include hardirq.h in preempt.h and lockdep.h in hardirq.h
  
  Linux does the same, this avoids ifdef or extra includes in ported drivers.
  
  Reviewed by:  emaste, hselasky
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D25702

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

Modified: head/sys/compat/linuxkpi/common/include/linux/hardirq.h
==
--- head/sys/compat/linuxkpi/common/include/linux/hardirq.h Sun Jul 26 
16:30:01 2020(r363564)
+++ head/sys/compat/linuxkpi/common/include/linux/hardirq.h Sun Jul 26 
16:30:59 2020(r363565)
@@ -32,6 +32,7 @@
 #define_LINUX_HARDIRQ_H_
 
 #include 
+#include 
 
 #include 
 #include 

Modified: head/sys/compat/linuxkpi/common/include/linux/preempt.h
==
--- head/sys/compat/linuxkpi/common/include/linux/preempt.h Sun Jul 26 
16:30:01 2020(r363564)
+++ head/sys/compat/linuxkpi/common/include/linux/preempt.h Sun Jul 26 
16:30:59 2020(r363565)
@@ -29,6 +29,7 @@
 #ifndef _LINUX_PREEMPT_H_
 #define_LINUX_PREEMPT_H_
 
+#include 
 #include 
 
 #definein_interrupt() \
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


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

2020-07-26 Thread Emmanuel Vadot
Author: manu
Date: Sun Jul 26 16:30:01 2020
New Revision: 363564
URL: https://svnweb.freebsd.org/changeset/base/363564

Log:
  linuxkpi: Include linux/sizes.h in dma-mapping.h
  
  Linux does the same, this avoids ifdef or extra includes in ported drivers.
  
  Reviewed by:  emaste, hselasky
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D25701

Modified:
  head/sys/compat/linuxkpi/common/include/linux/dma-mapping.h

Modified: head/sys/compat/linuxkpi/common/include/linux/dma-mapping.h
==
--- head/sys/compat/linuxkpi/common/include/linux/dma-mapping.h Sun Jul 26 
15:10:33 2020(r363563)
+++ head/sys/compat/linuxkpi/common/include/linux/dma-mapping.h Sun Jul 26 
16:30:01 2020(r363564)
@@ -38,6 +38,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r363563 - head/bin/chio

2020-07-26 Thread Ed Maste
Author: emaste
Date: Sun Jul 26 15:10:33 2020
New Revision: 363563
URL: https://svnweb.freebsd.org/changeset/base/363563

Log:
  chio: avoid out of bounds read
  
  ch_ces is alloacated with space for total_elem entries.
  
  CID:  1418536
  Reported by:  Coverity Scan
  Sponsored by: The FreeBSD Foundation

Modified:
  head/bin/chio/chio.c

Modified: head/bin/chio/chio.c
==
--- head/bin/chio/chio.cSun Jul 26 13:30:33 2020(r363562)
+++ head/bin/chio/chio.cSun Jul 26 15:10:33 2020(r363563)
@@ -1144,7 +1144,7 @@ find_element(char *voltag, uint16_t *et, uint16_t *eu)
/*
 * Now search the list the specified 
 */ 
-   for (elem = 0; elem <= total_elem; ++elem) {
+   for (elem = 0; elem < total_elem; ++elem) {
 
ces = _ces[elem];
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r363562 - head/sys/sys

2020-07-26 Thread Mateusz Guzik
Author: mjg
Date: Sun Jul 26 13:30:33 2020
New Revision: 363562
URL: https://svnweb.freebsd.org/changeset/base/363562

Log:
  Bump __FreeBSD_version after introduction of lockless lookup to the VFS layer

Modified:
  head/sys/sys/param.h

Modified: head/sys/sys/param.h
==
--- head/sys/sys/param.hSun Jul 26 13:07:09 2020(r363561)
+++ head/sys/sys/param.hSun Jul 26 13:30:33 2020(r363562)
@@ -60,7 +60,7 @@
  * in the range 5 to 9.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 1300101  /* Master, propagated to newvers */
+#define __FreeBSD_version 1300102  /* Master, propagated to newvers */
 
 /*
  * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r363561 - in stable: 11/usr.sbin/wpa/wpa_supplicant 12/usr.sbin/wpa/wpa_supplicant

2020-07-26 Thread Cy Schubert
Author: cy
Date: Sun Jul 26 13:07:09 2020
New Revision: 363561
URL: https://svnweb.freebsd.org/changeset/base/363561

Log:
  MFC r362651:
  
  Add MATCH option for CONFIG_MATCH_IFACE.
  
  If the interfaces on which wpa_supplicant is to run are not known or do
  not exist, wpa_supplicant can match an interface when it arrives. Each
  matched interface is separated with -M argument and the -i argument now
  allows for pattern matching.
  
  As an example, the following command would start wpa_supplicant for a
  specific wired interface called lan0, any interface starting with wlan
  and lastly any other interface. Each match has its own configuration
  file, and for the wired interface a specific driver has also been given.
  
  wpa_supplicant \
-M -c wpa_wired.conf -ilan0 -D wired \
-M -c wpa1.conf -iwlan* \
-M -c wpa2.conf
  
  PR:   247177
  Reported by:  greg@unrelenting.technology
  Related to:   ports r540412

Modified:
  stable/12/usr.sbin/wpa/wpa_supplicant/Makefile
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/usr.sbin/wpa/wpa_supplicant/Makefile
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/usr.sbin/wpa/wpa_supplicant/Makefile
==
--- stable/12/usr.sbin/wpa/wpa_supplicant/Makefile  Sun Jul 26 12:29:22 
2020(r363560)
+++ stable/12/usr.sbin/wpa/wpa_supplicant/Makefile  Sun Jul 26 13:07:09 
2020(r363561)
@@ -52,7 +52,8 @@ CFLAGS+=-DCONFIG_BACKEND_FILE \
-DCONFIG_TLS=openssl \
-DCONFIG_WPS2 \
-DCONFIG_WPS_UPNP \
-   -DPKCS12_FUNCS
+   -DPKCS12_FUNCS \
+   -DCONFIG_MATCH_IFACE
 #CFLAGS+= -g
 LIBADD=pcap util
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r363561 - in stable: 11/usr.sbin/wpa/wpa_supplicant 12/usr.sbin/wpa/wpa_supplicant

2020-07-26 Thread Cy Schubert
Author: cy
Date: Sun Jul 26 13:07:09 2020
New Revision: 363561
URL: https://svnweb.freebsd.org/changeset/base/363561

Log:
  MFC r362651:
  
  Add MATCH option for CONFIG_MATCH_IFACE.
  
  If the interfaces on which wpa_supplicant is to run are not known or do
  not exist, wpa_supplicant can match an interface when it arrives. Each
  matched interface is separated with -M argument and the -i argument now
  allows for pattern matching.
  
  As an example, the following command would start wpa_supplicant for a
  specific wired interface called lan0, any interface starting with wlan
  and lastly any other interface. Each match has its own configuration
  file, and for the wired interface a specific driver has also been given.
  
  wpa_supplicant \
-M -c wpa_wired.conf -ilan0 -D wired \
-M -c wpa1.conf -iwlan* \
-M -c wpa2.conf
  
  PR:   247177
  Reported by:  greg@unrelenting.technology
  Related to:   ports r540412

Modified:
  stable/11/usr.sbin/wpa/wpa_supplicant/Makefile
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/usr.sbin/wpa/wpa_supplicant/Makefile
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/usr.sbin/wpa/wpa_supplicant/Makefile
==
--- stable/11/usr.sbin/wpa/wpa_supplicant/Makefile  Sun Jul 26 12:29:22 
2020(r363560)
+++ stable/11/usr.sbin/wpa/wpa_supplicant/Makefile  Sun Jul 26 13:07:09 
2020(r363561)
@@ -52,7 +52,8 @@ CFLAGS+=-DCONFIG_BACKEND_FILE \
-DCONFIG_TLS=openssl \
-DCONFIG_WPS2 \
-DCONFIG_WPS_UPNP \
-   -DPKCS12_FUNCS
+   -DPKCS12_FUNCS \
+   -DCONFIG_MATCH_IFACE
 #CFLAGS+= -g
 LIBADD=pcap util
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r363560 - in head/sys: dev/iommu x86/iommu

2020-07-26 Thread Ruslan Bukin
Author: br
Date: Sun Jul 26 12:29:22 2020
New Revision: 363560
URL: https://svnweb.freebsd.org/changeset/base/363560

Log:
  Rename DMAR flags:
  o DMAR_DOMAIN_* -> IOMMU_DOMAIN_*
  o DMAR_PGF_* -> IOMMU_PGF_*
  
  Reviewed by:  kib
  Sponsored by: DARPA/AFRL
  Differential Revision:https://reviews.freebsd.org/D25812

Modified:
  head/sys/dev/iommu/busdma_iommu.c
  head/sys/dev/iommu/iommu.h
  head/sys/dev/iommu/iommu_gas.c
  head/sys/x86/iommu/intel_ctx.c
  head/sys/x86/iommu/intel_drv.c
  head/sys/x86/iommu/intel_idpgtbl.c
  head/sys/x86/iommu/intel_utils.c

Modified: head/sys/dev/iommu/busdma_iommu.c
==
--- head/sys/dev/iommu/busdma_iommu.c   Sun Jul 26 11:16:43 2020
(r363559)
+++ head/sys/dev/iommu/busdma_iommu.c   Sun Jul 26 12:29:22 2020
(r363560)
@@ -1017,7 +1017,7 @@ bus_dma_dmar_load_ident(bus_dma_tag_t dmat, bus_dmamap
map = (struct bus_dmamap_iommu *)map1;
waitok = (flags & BUS_DMA_NOWAIT) != 0;
 
-   entry = iommu_map_alloc_entry(domain, waitok ? 0 : DMAR_PGF_WAITOK);
+   entry = iommu_map_alloc_entry(domain, waitok ? 0 : IOMMU_PGF_WAITOK);
if (entry == NULL)
return (ENOMEM);
entry->start = start;

Modified: head/sys/dev/iommu/iommu.h
==
--- head/sys/dev/iommu/iommu.h  Sun Jul 26 11:16:43 2020(r363559)
+++ head/sys/dev/iommu/iommu.h  Sun Jul 26 12:29:22 2020(r363560)
@@ -134,11 +134,11 @@ struct iommu_ctx {
   ephemeral reference is kept
   to prevent context destruction */
 
-#defineDMAR_DOMAIN_GAS_INITED  0x0001
-#defineDMAR_DOMAIN_PGTBL_INITED0x0002
-#defineDMAR_DOMAIN_IDMAP   0x0010  /* Domain uses identity
+#defineIOMMU_DOMAIN_GAS_INITED 0x0001
+#defineIOMMU_DOMAIN_PGTBL_INITED   0x0002
+#defineIOMMU_DOMAIN_IDMAP  0x0010  /* Domain uses identity
   page table */
-#defineDMAR_DOMAIN_RMRR0x0020  /* Domain contains RMRR 
entry,
+#defineIOMMU_DOMAIN_RMRR   0x0020  /* Domain contains RMRR 
entry,
   cannot be turned off */
 
 /* Map flags */
@@ -146,11 +146,11 @@ struct iommu_ctx {
 #defineIOMMU_MF_CANSPLIT   0x0002
 #defineIOMMU_MF_RMRR   0x0004
 
-#defineDMAR_PGF_WAITOK 0x0001
-#defineDMAR_PGF_ZERO   0x0002
-#defineDMAR_PGF_ALLOC  0x0004
-#defineDMAR_PGF_NOALLOC0x0008
-#defineDMAR_PGF_OBJL   0x0010
+#defineIOMMU_PGF_WAITOK0x0001
+#defineIOMMU_PGF_ZERO  0x0002
+#defineIOMMU_PGF_ALLOC 0x0004
+#defineIOMMU_PGF_NOALLOC   0x0008
+#defineIOMMU_PGF_OBJL  0x0010
 
 #defineIOMMU_LOCK(unit)mtx_lock(&(unit)->lock)
 #defineIOMMU_UNLOCK(unit)  mtx_unlock(&(unit)->lock)

Modified: head/sys/dev/iommu/iommu_gas.c
==
--- head/sys/dev/iommu/iommu_gas.c  Sun Jul 26 11:16:43 2020
(r363559)
+++ head/sys/dev/iommu/iommu_gas.c  Sun Jul 26 12:29:22 2020
(r363560)
@@ -98,10 +98,10 @@ iommu_gas_alloc_entry(struct iommu_domain *domain, u_i
 {
struct iommu_map_entry *res;
 
-   KASSERT((flags & ~(DMAR_PGF_WAITOK)) == 0,
+   KASSERT((flags & ~(IOMMU_PGF_WAITOK)) == 0,
("unsupported flags %x", flags));
 
-   res = uma_zalloc(iommu_map_entry_zone, ((flags & DMAR_PGF_WAITOK) !=
+   res = uma_zalloc(iommu_map_entry_zone, ((flags & IOMMU_PGF_WAITOK) !=
0 ? M_WAITOK : M_NOWAIT) | M_ZERO);
if (res != NULL) {
res->domain = domain;
@@ -218,8 +218,8 @@ iommu_gas_init_domain(struct iommu_domain *domain)
 {
struct iommu_map_entry *begin, *end;
 
-   begin = iommu_gas_alloc_entry(domain, DMAR_PGF_WAITOK);
-   end = iommu_gas_alloc_entry(domain, DMAR_PGF_WAITOK);
+   begin = iommu_gas_alloc_entry(domain, IOMMU_PGF_WAITOK);
+   end = iommu_gas_alloc_entry(domain, IOMMU_PGF_WAITOK);
 
IOMMU_DOMAIN_LOCK(domain);
KASSERT(domain->entries_cnt == 2, ("dirty domain %p", domain));
@@ -238,7 +238,7 @@ iommu_gas_init_domain(struct iommu_domain *domain)
 
domain->first_place = begin;
domain->last_place = end;
-   domain->flags |= DMAR_DOMAIN_GAS_INITED;
+   domain->flags |= IOMMU_DOMAIN_GAS_INITED;
IOMMU_DOMAIN_UNLOCK(domain);
 }
 
@@ -598,7 +598,7 @@ iommu_gas_map(struct iommu_domain *domain,
("invalid flags 0x%x", flags));
 
entry = iommu_gas_alloc_entry(domain,
-   (flags & IOMMU_MF_CANWAIT) != 

svn commit: r363559 - stable/12/usr.sbin/nologin

2020-07-26 Thread Mateusz Piotrowski
Author: 0mp (doc,ports committer)
Date: Sun Jul 26 11:16:43 2020
New Revision: 363559
URL: https://svnweb.freebsd.org/changeset/base/363559

Log:
  MFC 359977:
  
  Fix a typo
  
  Reported by:  rgrimes

Modified:
  stable/12/usr.sbin/nologin/nologin.8
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/usr.sbin/nologin/nologin.8
==
--- stable/12/usr.sbin/nologin/nologin.8Sun Jul 26 11:01:38 2020
(r363558)
+++ stable/12/usr.sbin/nologin/nologin.8Sun Jul 26 11:16:43 2020
(r363559)
@@ -46,7 +46,7 @@ When executed,
 .Nm
 first writes about the login attempt to
 .Xr syslog 3
-and then a displays a message that an account is not available.
+and then displays a message that an account is not available.
 .Pp
 To disable all logins,
 investigate
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r363558 - stable/11/usr.sbin/efibootmgr

2020-07-26 Thread Toomas Soome
Author: tsoome
Date: Sun Jul 26 11:01:38 2020
New Revision: 363558
URL: https://svnweb.freebsd.org/changeset/base/363558

Log:
  MFC 363241:
  
  efibootmgr: typo in long option name
  
  del-timout should be del-timeout
  
  Reported by:  mjg

Modified:
  stable/11/usr.sbin/efibootmgr/efibootmgr.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.sbin/efibootmgr/efibootmgr.c
==
--- stable/11/usr.sbin/efibootmgr/efibootmgr.c  Sun Jul 26 10:59:32 2020
(r363557)
+++ stable/11/usr.sbin/efibootmgr/efibootmgr.c  Sun Jul 26 11:01:38 2020
(r363558)
@@ -99,7 +99,7 @@ static struct option lopts[] = {
{"copy", required_argument, NULL, 'C'}, /* Copy boot method */
{"create", no_argument, NULL, 'c'},
{"deactivate", required_argument, NULL, 'A'},
-   {"del-timout", no_argument, NULL, 'T'},
+   {"del-timeout", no_argument, NULL, 'T'},
{"delete", required_argument, NULL, 'B'},
{"delete-bootnext", required_argument, NULL, 'N'},
{"device", required_argument, NULL, 'd'},
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r363557 - stable/12/usr.sbin/efibootmgr

2020-07-26 Thread Toomas Soome
Author: tsoome
Date: Sun Jul 26 10:59:32 2020
New Revision: 363557
URL: https://svnweb.freebsd.org/changeset/base/363557

Log:
  MFC 363241:
  
  efibootmgr: typo in long option name
  
  del-timout should be del-timeout
  
  Reported by:  mjg

Modified:
  stable/12/usr.sbin/efibootmgr/efibootmgr.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/usr.sbin/efibootmgr/efibootmgr.c
==
--- stable/12/usr.sbin/efibootmgr/efibootmgr.c  Sun Jul 26 10:08:53 2020
(r363556)
+++ stable/12/usr.sbin/efibootmgr/efibootmgr.c  Sun Jul 26 10:59:32 2020
(r363557)
@@ -99,7 +99,7 @@ static struct option lopts[] = {
{"copy", required_argument, NULL, 'C'}, /* Copy boot method */
{"create", no_argument, NULL, 'c'},
{"deactivate", required_argument, NULL, 'A'},
-   {"del-timout", no_argument, NULL, 'T'},
+   {"del-timeout", no_argument, NULL, 'T'},
{"delete", required_argument, NULL, 'B'},
{"delete-bootnext", required_argument, NULL, 'N'},
{"dry-run", no_argument, NULL, 'D'},
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r363556 - stable/12/lib/libc/locale

2020-07-26 Thread Mateusz Piotrowski
Author: 0mp (doc,ports committer)
Date: Sun Jul 26 10:08:53 2020
New Revision: 363556
URL: https://svnweb.freebsd.org/changeset/base/363556

Log:
  MFC 359504:
  
  Use proper mdoc(7) macros for literal text and do not use Tn
  
  Tn is deprecated and upsets linters.

Modified:
  stable/12/lib/libc/locale/big5.5
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/lib/libc/locale/big5.5
==
--- stable/12/lib/libc/locale/big5.5Sun Jul 26 10:07:05 2020
(r363555)
+++ stable/12/lib/libc/locale/big5.5Sun Jul 26 10:08:53 2020
(r363556)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd September 12, 2019
+.Dd April 1, 2020
 .Dt BIG5 5
 .Os
 .Sh NAME
@@ -39,9 +39,8 @@ encoding for Traditional Chinese text
 .Dq Big Five
 is a standard for encoding Traditional Chinese text.
 Each character is represented by either one or two bytes.
-Characters from the
-.Tn ASCII
-character set are represented as single bytes in the range 0x00 - 0x7F.
+Characters from the ASCII character set are represented as
+single bytes in the range 0x00 - 0x7F.
 Traditional Chinese characters are represented by two bytes:
 the first in the range 0xA1 - 0xFE, the second in the range
 0x40 - 0xFE.
@@ -51,7 +50,11 @@ the first in the range 0xA1 - 0xFE, the second in the 
 .Xr utf8 5
 .Sh BUGS
 The range of the second byte overlaps some ASCII characters, including
-0x5C (`\\') and 0x7C (`|') which may cause problems in program execution or
+0x5C
+.Pq Ql \e
+and 0x7C
+.Pq Ql |
+which may cause problems in program execution or
 display.
 Big5 is considered a legacy standard and only preserved for backward
 compatibility reason.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r363555 - head/sys/conf

2020-07-26 Thread Emmanuel Vadot
Author: manu
Date: Sun Jul 26 10:07:05 2020
New Revision: 363555
URL: https://svnweb.freebsd.org/changeset/base/363555

Log:
  arm64: Only compile imx8 files if soc_freescale_imx8 is selected
  
  No Objection from:  gonzo

Modified:
  head/sys/conf/files.arm64

Modified: head/sys/conf/files.arm64
==
--- head/sys/conf/files.arm64   Sun Jul 26 10:04:02 2020(r363554)
+++ head/sys/conf/files.arm64   Sun Jul 26 10:07:05 2020(r363555)
@@ -408,8 +408,8 @@ arm64/freescale/imx/clk/imx_clk_sscg_pll.c  optional fd
 arm64/freescale/imx/clk/imx_clk_frac_pll.c optional fdt soc_freescale_imx8
 
 # iMX drivers
-arm/freescale/imx/imx_gpio.c   optional gpio
+arm/freescale/imx/imx_gpio.c   optional gpio soc_freescale_imx8
 arm/freescale/imx/imx_i2c.coptional fsliic
-arm/freescale/imx/imx_machdep.cstandard
+arm/freescale/imx/imx_machdep.coptional fdt soc_freescale_imx8
 arm64/freescale/imx/imx7gpc.c  optional fdt soc_freescale_imx8
 dev/ffec/if_ffec.c optional ffec
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r363554 - stable/12/usr.sbin/nologin

2020-07-26 Thread Mateusz Piotrowski
Author: 0mp (doc,ports committer)
Date: Sun Jul 26 10:04:02 2020
New Revision: 363554
URL: https://svnweb.freebsd.org/changeset/base/363554

Log:
  MFC 359967:
  
  Document the exit status and the stdout message of nologin(8)
  
  Reviewed by:  debdrup (earlier version)
  Differential Revision:https://reviews.freebsd.org/D24196

Modified:
  stable/12/usr.sbin/nologin/nologin.8
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/usr.sbin/nologin/nologin.8
==
--- stable/12/usr.sbin/nologin/nologin.8Sun Jul 26 10:01:27 2020
(r363553)
+++ stable/12/usr.sbin/nologin/nologin.8Sun Jul 26 10:04:02 2020
(r363554)
@@ -28,7 +28,7 @@
 .\" @(#)nologin.8  8.1 (Berkeley) 6/19/93
 .\" $FreeBSD$
 .\"
-.Dd June 19, 1993
+.Dd April 15, 2020
 .Dt NOLOGIN 8
 .Os
 .Sh NAME
@@ -39,14 +39,31 @@
 .Sh DESCRIPTION
 The
 .Nm
-utility displays a message that an account is not available and
-exits non-zero.
-It is intended as a replacement shell field for accounts that
+is intended as a replacement shell field for accounts that
 have been disabled.
 .Pp
+When executed,
+.Nm
+first writes about the login attempt to
+.Xr syslog 3
+and then a displays a message that an account is not available.
+.Pp
 To disable all logins,
 investigate
 .Xr nologin 5 .
+.Sh EXIT STATUS
+The
+.Nm
+utility always exits non-zero.
+.Sh EXAMPLES
+Here is a demonstration of executing
+.Nm :
+.Bd -literal -offset 4n
+$ nologin
+This account is currently not available.
+$ tail -n 1 /var/log/messages
+Mar 30 21:53:07 example.org nologin[65992]: Attempted login by beastie on 
/dev/pts/18
+.Ed
 .Sh SEE ALSO
 .Xr login 1 ,
 .Xr nologin 5
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r363553 - stable/12/libexec/rc/rc.d

2020-07-26 Thread Mateusz Piotrowski
Author: 0mp (doc,ports committer)
Date: Sun Jul 26 10:01:27 2020
New Revision: 363553
URL: https://svnweb.freebsd.org/changeset/base/363553

Log:
  MFC 359973:
  
  sshd: Warn about missing ssh-keygen only when necessary
  
  The sshd service is using ssh-keygen to generate missing SSH keys.
  If ssh-keygen is missing, it prints the following message:
  
  > /etc/rc.d/sshd: WARNING: /usr/bin/ssh-keygen does not exist.
  
  It makes sense when the key is not generated yet and
  cannot be created because ssh-keygen is missing.
  
  The problem is that even if the key is present on the host,
  the sshd service would still warn about missing ssh-keygen
  (even though it does not need it).
  
  Reviewed by:  emaste
  Approved by:  emaste (src)
  Differential Revision:https://reviews.freebsd.org/D23911

Modified:
  stable/12/libexec/rc/rc.d/sshd
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/libexec/rc/rc.d/sshd
==
--- stable/12/libexec/rc/rc.d/sshd  Sun Jul 26 09:58:52 2020
(r363552)
+++ stable/12/libexec/rc/rc.d/sshd  Sun Jul 26 10:01:27 2020
(r363553)
@@ -45,18 +45,19 @@ sshd_keygen_alg()
;;
esac
 
+   if [ -f "${keyfile}" ] ; then
+   info "$ALG host key exists."
+   return 0
+   fi
+
if [ ! -x /usr/bin/ssh-keygen ] ; then
warn "/usr/bin/ssh-keygen does not exist."
return 1
fi
 
-   if [ -f "${keyfile}" ] ; then
-   info "$ALG host key exists."
-   else
-   echo "Generating $ALG host key."
-   /usr/bin/ssh-keygen -q -t $alg -f "$keyfile" -N ""
-   /usr/bin/ssh-keygen -l -f "$keyfile.pub"
-   fi
+   echo "Generating $ALG host key."
+   /usr/bin/ssh-keygen -q -t $alg -f "$keyfile" -N ""
+   /usr/bin/ssh-keygen -l -f "$keyfile.pub"
 }
 
 sshd_keygen()
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r363552 - stable/12/usr.sbin/bhyve

2020-07-26 Thread Mateusz Piotrowski
Author: 0mp (doc,ports committer)
Date: Sun Jul 26 09:58:52 2020
New Revision: 363552
URL: https://svnweb.freebsd.org/changeset/base/363552

Log:
  MFC 360187:
  
  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
  Differential Revision:https://reviews.freebsd.org/D24526

Modified:
  stable/12/usr.sbin/bhyve/bhyve.8
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/usr.sbin/bhyve/bhyve.8
==
--- stable/12/usr.sbin/bhyve/bhyve.8Sun Jul 26 09:57:43 2020
(r363551)
+++ stable/12/usr.sbin/bhyve/bhyve.8Sun Jul 26 09:58:52 2020
(r363552)
@@ -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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r363551 - stable/11/usr.bin/env

2020-07-26 Thread Mateusz Piotrowski
Author: 0mp (doc,ports committer)
Date: Sun Jul 26 09:57:43 2020
New Revision: 363551
URL: https://svnweb.freebsd.org/changeset/base/363551

Log:
  MFC 360283:
  
  Fix invalid use of macros and two typos
  
  It turns out that currently mandoc(1) is not handling Fl in Ss
  correctly (maybe it never was). Let's just replace "Fl S \ ..."
  with "-S ...". After all, this subsection title is stylized anyway, so Fl
  is not that helpful.

Modified:
  stable/11/usr.bin/env/env.1
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.bin/env/env.1
==
--- stable/11/usr.bin/env/env.1 Sun Jul 26 09:57:08 2020(r363550)
+++ stable/11/usr.bin/env/env.1 Sun Jul 26 09:57:43 2020(r363551)
@@ -31,7 +31,7 @@
 .\" From FreeBSD: src/usr.bin/printenv/printenv.1,v 1.17 2002/11/26 17:33:35 
ru Exp
 .\" $FreeBSD$
 .\"
-.Dd January 19, 2020
+.Dd April 24, 2020
 .Dt ENV 1
 .Os
 .Sh NAME
@@ -165,7 +165,7 @@ and
 .Ar utility
 may not be specified together.
 .\"
-.Ss Details of Fl S \ (split-string) processing
+.Ss Details of -S (split-string) processing
 The processing of the
 .Fl S
 option will split the given
@@ -292,11 +292,11 @@ processing.
 .Pp
 Also,
 .Fl S
-processing can not reference the value of the special parameters
+processing cannot reference the value of the special parameters
 which are defined by most shells.
 For instance,
 .Fl S
-can not recognize special parameters such as:
+cannot recognize special parameters such as:
 .Ql $* ,
 .Ql $@ ,
 .Ql $# ,
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r363550 - stable/12/usr.bin/env

2020-07-26 Thread Mateusz Piotrowski
Author: 0mp (doc,ports committer)
Date: Sun Jul 26 09:57:08 2020
New Revision: 363550
URL: https://svnweb.freebsd.org/changeset/base/363550

Log:
  MFC 360283:
  
  Fix invalid use of macros and two typos
  
  It turns out that currently mandoc(1) is not handling Fl in Ss
  correctly (maybe it never was). Let's just replace "Fl S \ ..."
  with "-S ...". After all, this subsection title is stylized anyway, so Fl
  is not that helpful.

Modified:
  stable/12/usr.bin/env/env.1
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/usr.bin/env/env.1
==
--- stable/12/usr.bin/env/env.1 Sun Jul 26 09:54:32 2020(r363549)
+++ stable/12/usr.bin/env/env.1 Sun Jul 26 09:57:08 2020(r363550)
@@ -31,7 +31,7 @@
 .\" From FreeBSD: src/usr.bin/printenv/printenv.1,v 1.17 2002/11/26 17:33:35 
ru Exp
 .\" $FreeBSD$
 .\"
-.Dd January 19, 2020
+.Dd April 24, 2020
 .Dt ENV 1
 .Os
 .Sh NAME
@@ -165,7 +165,7 @@ and
 .Ar utility
 may not be specified together.
 .\"
-.Ss Details of Fl S \ (split-string) processing
+.Ss Details of -S (split-string) processing
 The processing of the
 .Fl S
 option will split the given
@@ -292,11 +292,11 @@ processing.
 .Pp
 Also,
 .Fl S
-processing can not reference the value of the special parameters
+processing cannot reference the value of the special parameters
 which are defined by most shells.
 For instance,
 .Fl S
-can not recognize special parameters such as:
+cannot recognize special parameters such as:
 .Ql $* ,
 .Ql $@ ,
 .Ql $# ,
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r363549 - stable/11/lib/libcam

2020-07-26 Thread Mateusz Piotrowski
Author: 0mp (doc,ports committer)
Date: Sun Jul 26 09:54:32 2020
New Revision: 363549
URL: https://svnweb.freebsd.org/changeset/base/363549

Log:
  MFC 362956:
  
  Clean up cam.3
  
  - Add a missing Pp [1]
  - Remove uses of Tn
  - Use "Xr open 2" when appropriate
  
  PR:   247783 [1]
  Submitted by: PauAmma  [1]

Modified:
  stable/11/lib/libcam/cam.3
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/lib/libcam/cam.3
==
--- stable/11/lib/libcam/cam.3  Sun Jul 26 09:53:50 2020(r363548)
+++ stable/11/lib/libcam/cam.3  Sun Jul 26 09:54:32 2020(r363549)
@@ -27,7 +27,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 11, 2017
+.Dd July 6, 2020
 .Dt CAM 3
 .Os
 .Sh NAME
@@ -218,15 +218,12 @@ structure using
 .Fn cam_open_btl
 is similar to
 .Fn cam_open_spec_device ,
-except that it takes a
-.Tn SCSI
-bus, target and logical unit instead of a device name and unit number as
+except that it takes a SCSI bus,
+target and logical unit instead of a device name and unit number as
 arguments.
 The
 .Va path_id
-argument is the CAM equivalent of a
-.Tn SCSI
-bus number.
+argument is the CAM equivalent of a SCSI bus number.
 It represents the logical bus number in the system.
 The
 .Ar flags
@@ -263,10 +260,13 @@ should be
 if the user wants the CAM library to allocate space for the
 .Va cam_device
 structure.
+.Pp
 .Fn cam_close_device
 frees the
 .Va cam_device
-structure allocated by one of the above open() calls, and closes the file
+structure allocated by one of the above
+.Xr open 2
+calls, and closes the file
 descriptor to the passthrough device.
 This routine should not be called if
 the user allocated space for the
@@ -276,7 +276,9 @@ Instead, the user should call
 .Fn cam_close_spec_device .
 .Pp
 .Fn cam_close_spec_device
-merely closes the file descriptor opened in one of the open() routines
+merely closes the file descriptor opened in one of the
+.Xr open 2
+routines
 described above.
 This function should be called when the
 .Va cam_device
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r363548 - stable/12/lib/libcam

2020-07-26 Thread Mateusz Piotrowski
Author: 0mp (doc,ports committer)
Date: Sun Jul 26 09:53:50 2020
New Revision: 363548
URL: https://svnweb.freebsd.org/changeset/base/363548

Log:
  MFC 362956:
  
  Clean up cam.3
  
  - Add a missing Pp [1]
  - Remove uses of Tn
  - Use "Xr open 2" when appropriate
  
  PR:   247783 [1]
  Submitted by: PauAmma  [1]

Modified:
  stable/12/lib/libcam/cam.3
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/lib/libcam/cam.3
==
--- stable/12/lib/libcam/cam.3  Sun Jul 26 09:52:48 2020(r363547)
+++ stable/12/lib/libcam/cam.3  Sun Jul 26 09:53:50 2020(r363548)
@@ -27,7 +27,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 11, 2017
+.Dd July 6, 2020
 .Dt CAM 3
 .Os
 .Sh NAME
@@ -218,15 +218,12 @@ structure using
 .Fn cam_open_btl
 is similar to
 .Fn cam_open_spec_device ,
-except that it takes a
-.Tn SCSI
-bus, target and logical unit instead of a device name and unit number as
+except that it takes a SCSI bus,
+target and logical unit instead of a device name and unit number as
 arguments.
 The
 .Va path_id
-argument is the CAM equivalent of a
-.Tn SCSI
-bus number.
+argument is the CAM equivalent of a SCSI bus number.
 It represents the logical bus number in the system.
 The
 .Ar flags
@@ -263,10 +260,13 @@ should be
 if the user wants the CAM library to allocate space for the
 .Va cam_device
 structure.
+.Pp
 .Fn cam_close_device
 frees the
 .Va cam_device
-structure allocated by one of the above open() calls, and closes the file
+structure allocated by one of the above
+.Xr open 2
+calls, and closes the file
 descriptor to the passthrough device.
 This routine should not be called if
 the user allocated space for the
@@ -276,7 +276,9 @@ Instead, the user should call
 .Fn cam_close_spec_device .
 .Pp
 .Fn cam_close_spec_device
-merely closes the file descriptor opened in one of the open() routines
+merely closes the file descriptor opened in one of the
+.Xr open 2
+routines
 described above.
 This function should be called when the
 .Va cam_device
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r363547 - stable/11/usr.sbin/config

2020-07-26 Thread Mateusz Piotrowski
Author: 0mp (doc,ports committer)
Date: Sun Jul 26 09:52:48 2020
New Revision: 363547
URL: https://svnweb.freebsd.org/changeset/base/363547

Log:
  MFC 362742:
  
  Do not use macros in the argument to -width
  
  This patch improves the presentation of the FILES section dramatically.

Modified:
  stable/11/usr.sbin/config/config.8
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.sbin/config/config.8
==
--- stable/11/usr.sbin/config/config.8  Sun Jul 26 09:52:04 2020
(r363546)
+++ stable/11/usr.sbin/config/config.8  Sun Jul 26 09:52:48 2020
(r363547)
@@ -28,7 +28,7 @@
 .\" @(#)config.8   8.2 (Berkeley) 4/19/94
 .\" $FreeBSD$
 .\"
-.Dd May 8, 2007
+.Dd June 29, 2020
 .Dt CONFIG 8
 .Os
 .Sh NAME
@@ -61,7 +61,7 @@ that give alternate files for a specific machine
 section below).
 .Pp
 Available options and operands:
-.Bl -tag -width ".Ar SYSTEM_NAME"
+.Bl -tag -width "SYSTEM_NAME"
 .It Fl V
 Print the
 .Nm
@@ -235,7 +235,7 @@ installs
 in the root file system.
 .El
 .Sh FILES
-.Bl -tag -width ".Pa /sys/ Ns Va ARCH Ns Pa /compile/ Ns Ar SYSTEM_NAME" 
-compact
+.Bl -tag -width "/sys/ARCH/compile/SYSTEM_NAME" -compact
 .It Pa /sys/conf/files
 list of common files system is built from
 .It Pa /sys/conf/Makefile. Ns Va ARCH
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r363546 - stable/12/usr.sbin/config

2020-07-26 Thread Mateusz Piotrowski
Author: 0mp (doc,ports committer)
Date: Sun Jul 26 09:52:04 2020
New Revision: 363546
URL: https://svnweb.freebsd.org/changeset/base/363546

Log:
  MFC 362742:
  
  Do not use macros in the argument to -width
  
  This patch improves the presentation of the FILES section dramatically.

Modified:
  stable/12/usr.sbin/config/config.8
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/usr.sbin/config/config.8
==
--- stable/12/usr.sbin/config/config.8  Sun Jul 26 09:48:04 2020
(r363545)
+++ stable/12/usr.sbin/config/config.8  Sun Jul 26 09:52:04 2020
(r363546)
@@ -28,7 +28,7 @@
 .\" @(#)config.8   8.2 (Berkeley) 4/19/94
 .\" $FreeBSD$
 .\"
-.Dd May 8, 2007
+.Dd June 29, 2020
 .Dt CONFIG 8
 .Os
 .Sh NAME
@@ -61,7 +61,7 @@ that give alternate files for a specific machine
 section below).
 .Pp
 Available options and operands:
-.Bl -tag -width ".Ar SYSTEM_NAME"
+.Bl -tag -width "SYSTEM_NAME"
 .It Fl V
 Print the
 .Nm
@@ -235,7 +235,7 @@ installs
 in the root file system.
 .El
 .Sh FILES
-.Bl -tag -width ".Pa /sys/ Ns Va ARCH Ns Pa /compile/ Ns Ar SYSTEM_NAME" 
-compact
+.Bl -tag -width "/sys/ARCH/compile/SYSTEM_NAME" -compact
 .It Pa /sys/conf/files
 list of common files system is built from
 .It Pa /sys/conf/Makefile. Ns Va ARCH
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r363545 - stable/12/share/man/man4

2020-07-26 Thread Mateusz Piotrowski
Author: 0mp (doc,ports committer)
Date: Sun Jul 26 09:48:04 2020
New Revision: 363545
URL: https://svnweb.freebsd.org/changeset/base/363545

Log:
  MFC 362741:
  
  Document that Intel Dual Band Wireless AC 8265 is supported by iwm(4)

Modified:
  stable/12/share/man/man4/iwm.4
  stable/12/share/man/man4/iwmfw.4
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/share/man/man4/iwm.4
==
--- stable/12/share/man/man4/iwm.4  Sun Jul 26 09:47:01 2020
(r363544)
+++ stable/12/share/man/man4/iwm.4  Sun Jul 26 09:48:04 2020
(r363545)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd November 7, 2019
+.Dd June 28, 2020
 .Dt IWM 4
 .Os
 .Sh NAME
@@ -88,6 +88,7 @@ driver provides support for:
 .It Intel Dual Band Wireless AC 7260
 .It Intel Dual Band Wireless AC 7265
 .It Intel Dual Band Wireless AC 8260
+.It Intel Dual Band Wireless AC 8265
 .It Intel Dual Band Wireless AC 9260
 .It Intel Dual Band Wireless AC 9270
 .It Intel Dual Band Wireless AC 946X

Modified: stable/12/share/man/man4/iwmfw.4
==
--- stable/12/share/man/man4/iwmfw.4Sun Jul 26 09:47:01 2020
(r363544)
+++ stable/12/share/man/man4/iwmfw.4Sun Jul 26 09:48:04 2020
(r363545)
@@ -22,7 +22,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd November 7, 2019
+.Dd June 28, 2020
 .Dt IWMFW 4
 .Os
 .Sh NAME
@@ -68,7 +68,7 @@ iwm9260fw_load="YES"
 .Ed
 .Sh DESCRIPTION
 This module provides access to firmware sets for the
-Intel Dual Band Wireless WiFi 3160, 3165, 3168, 7260, 7265, 8000, 8260,
+Intel Dual Band Wireless WiFi 3160, 3165, 3168, 7260, 7265, 8000, 8260, 8265,
 9000 and 9260 series of IEEE 802.11n/11ac adapters.
 It may be statically linked into the kernel, or loaded as a module.
 .Sh SEE ALSO
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r363544 - stable/12/bin/sh

2020-07-26 Thread Mateusz Piotrowski
Author: 0mp (doc,ports committer)
Date: Sun Jul 26 09:47:01 2020
New Revision: 363544
URL: https://svnweb.freebsd.org/changeset/base/363544

Log:
  MFC 362957:
  
  Fix description of the "\$" sequence for PS1
  
  The manual page documents "\$" to expand to either "$" or "#" followed by
  a single space. In reality, the single space character is not appended.
  
  PR:   247791
  Submitted by: kd-...@pm.me

Modified:
  stable/12/bin/sh/sh.1
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/bin/sh/sh.1
==
--- stable/12/bin/sh/sh.1   Sun Jul 26 09:15:05 2020(r363543)
+++ stable/12/bin/sh/sh.1   Sun Jul 26 09:47:01 2020(r363544)
@@ -32,7 +32,7 @@
 .\"from: @(#)sh.1  8.6 (Berkeley) 5/4/95
 .\" $FreeBSD$
 .\"
-.Dd February 24, 2019
+.Dd July 6, 2020
 .Dt SH 1
 .Os
 .Sh NAME
@@ -1425,9 +1425,9 @@ The final component of the current working directory.
 The entire path of the current working directory.
 .It Li \e$
 Superuser status.
-.Dq Li "$ "
+.Dq Li "$"
 for normal users and
-.Dq Li "# "
+.Dq Li "#"
 for superusers.
 .It Li \e\e
 A literal backslash.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r363543 - in head/usr.bin/sed: . tests

2020-07-26 Thread Yuri Pankov
Author: yuripv
Date: Sun Jul 26 09:15:05 2020
New Revision: 363543
URL: https://svnweb.freebsd.org/changeset/base/363543

Log:
  sed: treat '[' as ordinary character in 'y' command
  
  'y' does not handle bracket expressions, treat '[' as ordinary character
  and do not apply bracket expression checks (GNU sed agrees).
  
  PR:   247931
  Reviewed by:  pfg, kevans
  Tested by:antoine (exp-run), Quentin L'Hours 
  Differential Revision:https://reviews.freebsd.org/D25640

Modified:
  head/usr.bin/sed/compile.c
  head/usr.bin/sed/tests/sed2_test.sh

Modified: head/usr.bin/sed/compile.c
==
--- head/usr.bin/sed/compile.c  Sun Jul 26 02:51:00 2020(r363542)
+++ head/usr.bin/sed/compile.c  Sun Jul 26 09:15:05 2020(r363543)
@@ -437,11 +437,19 @@ compile_delimited(char *p, char *d, int is_tr)
linenum, fname);
while (*p) {
if (*p == '[' && *p != c) {
-   if ((d = compile_ccl(, d)) == NULL)
-   errx(1, "%lu: %s: unbalanced brackets ([])", 
linenum, fname);
-   continue;
+   if (!is_tr) {
+   if ((d = compile_ccl(, d)) == NULL) {
+   errx(1,
+   "%lu: %s: unbalanced brackets ([])",
+   linenum, fname);
+   }
+   continue;
+   }
} else if (*p == '\\' && p[1] == '[') {
-   *d++ = *p++;
+   if (is_tr)
+   p++;
+   else
+   *d++ = *p++;
} else if (*p == '\\' && p[1] == c) {
p++;
} else if (*p == '\\' &&

Modified: head/usr.bin/sed/tests/sed2_test.sh
==
--- head/usr.bin/sed/tests/sed2_test.sh Sun Jul 26 02:51:00 2020
(r363542)
+++ head/usr.bin/sed/tests/sed2_test.sh Sun Jul 26 09:15:05 2020
(r363543)
@@ -134,6 +134,22 @@ commands_on_stdin_body()
atf_check -o 'empty' sed -f - < insert_x
 }
 
+atf_test_case bracket_y
+bracket_y_head()
+{
+   atf_set "descr" "Verify '[' is ordinary character for 'y' command"
+}
+bracket_y_body()
+{
+   atf_check -e empty -o ignore echo | sed 'y/[/x/'
+   atf_check -e empty -o ignore echo | sed 'y/[]/xy/'
+   atf_check -e empty -o ignore echo | sed 'y/[a]/xyz/'
+   atf_check -e empty -o "inline:zyx" echo '][a' | sed 'y/[a]/xyz/'
+   atf_check -e empty -o "inline:bracket\n" echo 'bra[ke]' | sed 'y/[]/ct/'
+   atf_check -e empty -o "inline:bracket\n" \
+   echo 'bra[ke]' | sed 'y[\[][ct['
+}
+
 atf_init_test_cases()
 {
atf_add_test_case inplace_command_q
@@ -142,4 +158,5 @@ atf_init_test_cases()
atf_add_test_case escape_subst
atf_add_test_case commands_on_stdin
atf_add_test_case hex_subst
+   atf_add_test_case bracket_y
 }
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"