svn commit: r360684 - stable/11/sys/dev/ata/chipsets

2020-05-05 Thread Dimitry Andric
Author: dim
Date: Wed May  6 05:41:02 2020
New Revision: 360684
URL: https://svnweb.freebsd.org/changeset/base/360684

Log:
  MFC r335894 (by sbruno):
  
  Reset indentation of this flag. No functional change intended.
  Found with gcc.
  
  sys/dev/ata/chipsets/ata-siliconimage.c: In function 'ata_cmd_ch_attach':
  sys/dev/ata/chipsets/ata-siliconimage.c:187:5:
   warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   if (ctlr->chip->cfg2 & SII_INTR)
   ^~
  sys/dev/ata/chipsets/ata-siliconimage.c:190:2:
  note: ...this statement, but the latter is misleadingly indented as if it 
were guarded by the 'if'
ch->flags |= ATA_NO_ATAPI_DMA;

Modified:
  stable/11/sys/dev/ata/chipsets/ata-siliconimage.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/ata/chipsets/ata-siliconimage.c
==
--- stable/11/sys/dev/ata/chipsets/ata-siliconimage.c   Wed May  6 05:35:00 
2020(r360683)
+++ stable/11/sys/dev/ata/chipsets/ata-siliconimage.c   Wed May  6 05:41:02 
2020(r360684)
@@ -185,7 +185,7 @@ ata_cmd_ch_attach(device_t dev)
 if (ctlr->chip->cfg2 & SII_INTR)
ch->hw.status = ata_cmd_status;
 
-   ch->flags |= ATA_NO_ATAPI_DMA;
+ch->flags |= ATA_NO_ATAPI_DMA;
 
 return 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: r360683 - stable/11/sys/dev/ata

2020-05-05 Thread Dimitry Andric
Author: dim
Date: Wed May  6 05:35:00 2020
New Revision: 360683
URL: https://svnweb.freebsd.org/changeset/base/360683

Log:
  MFC r335896 (by sbruno):
  
  Reset indentiation of ata_suspend() such that its clear we fall through
  this function and that we aren't supposed to be controlled by the first
  if() conditional.  Found with gcc.
  
  No functional change is intended with this commit.

Modified:
  stable/11/sys/dev/ata/ata-all.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/ata/ata-all.c
==
--- stable/11/sys/dev/ata/ata-all.c Wed May  6 05:32:50 2020
(r360682)
+++ stable/11/sys/dev/ata/ata-all.c Wed May  6 05:35:00 2020
(r360683)
@@ -314,13 +314,13 @@ ata_suspend(device_t dev)
 if (!dev || !(ch = device_get_softc(dev)))
return ENXIO;
 
-   if (ch->flags & ATA_PERIODIC_POLL)
-   callout_drain(>poll_callout);
-   mtx_lock(>state_mtx);
-   xpt_freeze_simq(ch->sim, 1);
-   while (ch->state != ATA_IDLE)
-   msleep(ch, >state_mtx, PRIBIO, "atasusp", hz/100);
-   mtx_unlock(>state_mtx);
+if (ch->flags & ATA_PERIODIC_POLL)
+   callout_drain(>poll_callout);
+mtx_lock(>state_mtx);
+xpt_freeze_simq(ch->sim, 1);
+while (ch->state != ATA_IDLE)
+   msleep(ch, >state_mtx, PRIBIO, "atasusp", hz/100);
+mtx_unlock(>state_mtx);
 return(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: r360682 - stable/11/sys/cam/ctl

2020-05-05 Thread Dimitry Andric
Author: dim
Date: Wed May  6 05:32:50 2020
New Revision: 360682
URL: https://svnweb.freebsd.org/changeset/base/360682

Log:
  MFC r333465 (by lwhsu):
  
  Fix build for platforms using GCC:
  
  - Remove unused or dead store variable
  - Remove unused function ctl_copyin_alloc
  - Add missing curly brackets, this seems a regression in r287720
  
  Reviewed by:  jhibbits
  Differential Revision:https://reviews.freebsd.org/D15383

Modified:
  stable/11/sys/cam/ctl/ctl.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/cam/ctl/ctl.c
==
--- stable/11/sys/cam/ctl/ctl.c Wed May  6 05:29:00 2020(r360681)
+++ stable/11/sys/cam/ctl/ctl.c Wed May  6 05:32:50 2020(r360682)
@@ -2440,25 +2440,6 @@ ctl_ioctl_fill_ooa(struct ctl_lun *lun, uint32_t *cur_
mtx_unlock(>lun_lock);
 }
 
-static void *
-ctl_copyin_alloc(void *user_addr, unsigned int len, char *error_str,
-size_t error_str_len)
-{
-   void *kptr;
-
-   kptr = malloc(len, M_CTL, M_WAITOK | M_ZERO);
-
-   if (copyin(user_addr, kptr, len) != 0) {
-   snprintf(error_str, error_str_len, "Error copying %d bytes "
-"from user address %p to kernel address %p", len,
-user_addr, kptr);
-   free(kptr, M_CTL);
-   return (NULL);
-   }
-
-   return (kptr);
-}
-
 static void
 ctl_free_args(int num_args, struct ctl_be_arg *args)
 {
@@ -5052,11 +5033,9 @@ ctl_lun_secondary(struct ctl_be_lun *be_lun)
 int
 ctl_invalidate_lun(struct ctl_be_lun *be_lun)
 {
-   struct ctl_softc *softc;
struct ctl_lun *lun;
 
lun = (struct ctl_lun *)be_lun->ctl_lun;
-   softc = lun->ctl_softc;
 
mtx_lock(>lun_lock);
 
@@ -6252,7 +6231,7 @@ ctl_mode_select(struct ctl_scsiio *ctsio)
 {
struct ctl_lun *lun = CTL_LUN(ctsio);
union ctl_modepage_info *modepage_info;
-   int bd_len, i, header_size, param_len, pf, rtd, sp;
+   int bd_len, i, header_size, param_len, rtd;
uint32_t initidx;
 
initidx = ctl_get_initindex(>io_hdr.nexus);
@@ -6262,9 +6241,7 @@ ctl_mode_select(struct ctl_scsiio *ctsio)
 
cdb = (struct scsi_mode_select_6 *)ctsio->cdb;
 
-   pf = (cdb->byte2 & SMS_PF) ? 1 : 0;
rtd = (cdb->byte2 & SMS_RTD) ? 1 : 0;
-   sp = (cdb->byte2 & SMS_SP) ? 1 : 0;
param_len = cdb->length;
header_size = sizeof(struct scsi_mode_header_6);
break;
@@ -6274,9 +6251,7 @@ ctl_mode_select(struct ctl_scsiio *ctsio)
 
cdb = (struct scsi_mode_select_10 *)ctsio->cdb;
 
-   pf = (cdb->byte2 & SMS_PF) ? 1 : 0;
rtd = (cdb->byte2 & SMS_RTD) ? 1 : 0;
-   sp = (cdb->byte2 & SMS_SP) ? 1 : 0;
param_len = scsi_2btoul(cdb->length);
header_size = sizeof(struct scsi_mode_header_10);
break;
@@ -6399,13 +6374,12 @@ int
 ctl_mode_sense(struct ctl_scsiio *ctsio)
 {
struct ctl_lun *lun = CTL_LUN(ctsio);
-   int pc, page_code, dbd, llba, subpage;
+   int pc, page_code, dbd, subpage;
int alloc_len, page_len, header_len, total_len;
struct scsi_mode_block_descr *block_desc;
struct ctl_page_index *page_index;
 
dbd = 0;
-   llba = 0;
block_desc = NULL;
 
CTL_DEBUG_PRINT(("ctl_mode_sense\n"));
@@ -6439,8 +6413,6 @@ ctl_mode_sense(struct ctl_scsiio *ctsio)
dbd = 1;
else
header_len += sizeof(struct scsi_mode_block_descr);
-   if (cdb->byte2 & SMS10_LLBAA)
-   llba = 1;
pc = (cdb->page & SMS_PAGE_CTRL_MASK) >> 6;
page_code = cdb->page & SMS_PAGE_CODE;
subpage = cdb->subpage;
@@ -8591,10 +8563,11 @@ ctl_hndl_per_res_out_on_other_sc(union ctl_io *io)
if (lun->pr_res_type != SPR_TYPE_EX_AC &&
lun->pr_res_type != SPR_TYPE_WR_EX &&
(lun->MODE_CTRL.queue_flags & SCP_NUAR) == 0) {
-   for (i = softc->init_min; i < softc->init_max; i++)
+   for (i = softc->init_min; i < softc->init_max; i++) {
if (i == residx || ctl_get_prkey(lun, i) == 0)
continue;
ctl_est_ua(lun, i, CTL_UA_RES_RELEASE);
+   }
}
 
lun->flags &= ~CTL_LUN_PR_RESERVED;
@@ -10402,7 +10375,6 @@ ctl_get_event_status(struct ctl_scsiio *ctsio)
struct scsi_get_event_status_header *hdr;
struct scsi_get_event_status *cdb;
uint32_t alloc_len, data_len;
-   int notif_class;
 
cdb = (struct scsi_get_event_status *)ctsio->cdb;
if ((cdb->byte2 & SGESN_POLLED) == 0) {
@@ 

svn commit: r360681 - stable/12/sys/mips/conf

2020-05-05 Thread John Baldwin
Author: jhb
Date: Wed May  6 05:29:00 2020
New Revision: 360681
URL: https://svnweb.freebsd.org/changeset/base/360681

Log:
  Update a few more kernel configs for tun -> tuntap.

Modified:
  stable/12/sys/mips/conf/GXEMUL
  stable/12/sys/mips/conf/GXEMUL32

Modified: stable/12/sys/mips/conf/GXEMUL
==
--- stable/12/sys/mips/conf/GXEMUL  Wed May  6 01:47:45 2020
(r360680)
+++ stable/12/sys/mips/conf/GXEMUL  Wed May  6 05:29:00 2020
(r360681)
@@ -54,7 +54,7 @@ devicegxemul_ether
 device loop# Network loopback
 device random  # Entropy device
 device ether   # Ethernet support
-device tun # Packet tunnel.
+device tuntap  # Packet tunnel.
 device md  # Memory "disks"
 device gif # IPv6 and IPv4 tunneling
 

Modified: stable/12/sys/mips/conf/GXEMUL32
==
--- stable/12/sys/mips/conf/GXEMUL32Wed May  6 01:47:45 2020
(r360680)
+++ stable/12/sys/mips/conf/GXEMUL32Wed May  6 05:29:00 2020
(r360681)
@@ -52,7 +52,7 @@ devicegxemul_ether
 device loop# Network loopback
 device random  # Entropy device
 device ether   # Ethernet support
-device tun # Packet tunnel.
+device tuntap  # Packet tunnel.
 device md  # Memory "disks"
 device gif # IPv6 and IPv4 tunneling
 
___
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: r360648 - in head: lib/libvmmapi share/man/man5 share/mk sys/amd64/include sys/amd64/vmm sys/amd64/vmm/amd sys/amd64/vmm/intel sys/amd64/vmm/io sys/conf sys/modules/vmm tools/build/opt

2020-05-05 Thread Li-Wen Hsu
On Tue, May 5, 2020 at 8:02 AM John Baldwin  wrote:
>
> Author: jhb
> Date: Tue May  5 00:02:04 2020
> New Revision: 360648
> URL: https://svnweb.freebsd.org/changeset/base/360648
...
> Added:
>   head/sys/amd64/include/vmm_snapshot.h   (contents, props changed)
>   head/sys/amd64/vmm/vmm_snapshot.c   (contents, props changed)
>   head/tools/build/options/WITH_BHYVE_SNAPSHOT   (contents, props changed)
>   head/usr.sbin/bhyve/snapshot.c   (contents, props changed)
>   head/usr.sbin/bhyve/snapshot.h   (contents, props changed)

These added files all have "THIS SOFTWARE IS PROVIDED BY NETAPP, INC"
in copyright header, but non of the authors look like from NetApp.  Is
it intended or it's better to have "THIS SOFTWARE IS PROVIDED BY THE
AUTHOR AND CONTRIBUTORS"?

Best,
Li-Wen
___
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: r360679 - head/contrib/binutils/gas

2020-05-05 Thread Ed Maste
Author: emaste
Date: Wed May  6 01:08:19 2020
New Revision: 360679
URL: https://svnweb.freebsd.org/changeset/base/360679

Log:
  GNU as: print a deprecation warning on program start
  
  GNU as 2.17.50 will be removed before FreeBSD 13.

Modified:
  head/contrib/binutils/gas/as.c

Modified: head/contrib/binutils/gas/as.c
==
--- head/contrib/binutils/gas/as.c  Wed May  6 00:44:03 2020
(r360678)
+++ head/contrib/binutils/gas/as.c  Wed May  6 01:08:19 2020
(r360679)
@@ -1089,6 +1089,7 @@ main (int argc, char ** argv)
   expandargv (, );
 
   START_PROGRESS (myname, 0);
+  fprintf (stderr, _("warning: as 2.17.50 is deprecated in FreeBSD and will be 
removed\n"));
 
 #ifndef OBJ_DEFAULT_OUTPUT_FILE_NAME
 #define OBJ_DEFAULT_OUTPUT_FILE_NAME "a.out"
___
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: r360678 - head/sys/fs/nfs

2020-05-05 Thread Rick Macklem
Author: rmacklem
Date: Wed May  6 00:44:03 2020
New Revision: 360678
URL: https://svnweb.freebsd.org/changeset/base/360678

Log:
  Delete unused function newnfs_trimleading.
  
  The NFS function called newnfs_trimleading() has not been used by the
  code in long time. To give you a clue, it still had a K style function
  declaration.
  Delete it, since it is just cruft, as a part of the NFS mbuf handling
  cleanup in preparation for adding ext_pgs mbuf support.
  The ext_pgs mbuf support for the build/send side is needed by
  nfs-over-tls.

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

Modified: head/sys/fs/nfs/nfs_commonsubs.c
==
--- head/sys/fs/nfs/nfs_commonsubs.cWed May  6 00:25:43 2020
(r360677)
+++ head/sys/fs/nfs/nfs_commonsubs.cWed May  6 00:44:03 2020
(r360678)
@@ -1006,53 +1006,6 @@ nfsaddr2_match(NFSSOCKADDR_T nam1, NFSSOCKADDR_T nam2)
return (0);
 }
 
-
-/*
- * Trim the stuff already dissected off the mbuf list.
- */
-APPLESTATIC void
-newnfs_trimleading(nd)
-   struct nfsrv_descript *nd;
-{
-   struct mbuf *m, *n;
-   int offs;
-
-   /*
-* First, free up leading mbufs.
-*/
-   if (nd->nd_mrep != nd->nd_md) {
-   m = nd->nd_mrep;
-   while (m->m_next != nd->nd_md) {
-   if (m->m_next == NULL)
-   panic("nfsm trim leading");
-   m = m->m_next;
-   }
-   m->m_next = NULL;
-   m_freem(nd->nd_mrep);
-   }
-   m = nd->nd_md;
-
-   /*
-* Now, adjust this mbuf, based on nd_dpos.
-*/
-   offs = nd->nd_dpos - mtod(m, caddr_t);
-   if (offs == m->m_len) {
-   n = m;
-   m = m->m_next;
-   if (m == NULL)
-   panic("nfsm trim leading2");
-   n->m_next = NULL;
-   m_freem(n);
-   } else if (offs > 0) {
-   m->m_len -= offs;
-   m->m_data += offs;
-   } else if (offs < 0)
-   panic("nfsm trimleading offs");
-   nd->nd_mrep = m;
-   nd->nd_md = m;
-   nd->nd_dpos = mtod(m, caddr_t);
-}
-
 /*
  * Trim trailing data off the mbuf list being built.
  */

Modified: head/sys/fs/nfs/nfs_var.h
==
--- head/sys/fs/nfs/nfs_var.h   Wed May  6 00:25:43 2020(r360677)
+++ head/sys/fs/nfs/nfs_var.h   Wed May  6 00:44:03 2020(r360678)
@@ -324,7 +324,6 @@ int nfsm_mbufuio(struct nfsrv_descript *, struct uio *
 int nfsm_fhtom(struct nfsrv_descript *, u_int8_t *, int, int);
 int nfsm_advance(struct nfsrv_descript *, int, int);
 void *nfsm_dissct(struct nfsrv_descript *, int, int);
-void newnfs_trimleading(struct nfsrv_descript *);
 void newnfs_trimtrailing(struct nfsrv_descript *, struct mbuf *,
 caddr_t);
 void newnfs_copycred(struct nfscred *, struct ucred *);
___
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: r360677 - stable/12/lib/liblua

2020-05-05 Thread Ed Maste
Author: emaste
Date: Wed May  6 00:25:43 2020
New Revision: 360677
URL: https://svnweb.freebsd.org/changeset/base/360677

Log:
  MFC r360460: liblua: ensure that "require" will fail in bootstrap flua
  
  We do not want to support bootstrapping lua modules, so ensure that
  require will fail by providing a nonexistent path.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/12/lib/liblua/Makefile
  stable/12/lib/liblua/luaconf.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/lib/liblua/Makefile
==
--- stable/12/lib/liblua/Makefile   Tue May  5 21:50:52 2020
(r360676)
+++ stable/12/lib/liblua/Makefile   Wed May  6 00:25:43 2020
(r360677)
@@ -26,4 +26,9 @@ SRCS+=lauxlib.c lbaselib.c lbitlib.c lcorolib.c ldbli
 CFLAGS+=   -I${.CURDIR} -I${.CURDIR}/modules -I${LUASRC}
 CFLAGS+=   -DLUA_PROGNAME="\"${PROG}\""
 
+.if defined(BOOTSTRAPPING)
+CFLAGS+=   -DLUA_PATH_DEFAULT="\"/nonexistent/?.lua\""
+CFLAGS+=   -DLUA_CPATH_DEFAULT="\"/nonexistent/?.so\""
+.endif
+
 .include 

Modified: stable/12/lib/liblua/luaconf.h
==
--- stable/12/lib/liblua/luaconf.h  Tue May  5 21:50:52 2020
(r360676)
+++ stable/12/lib/liblua/luaconf.h  Wed May  6 00:25:43 2020
(r360677)
@@ -208,12 +208,16 @@
 #define LUA_ROOT   "/usr/local/"
 #define LUA_LDIR   LUA_ROOT "share/lua/" LUA_VDIR "/"
 #define LUA_CDIR   LUA_ROOT "lib/lua/" LUA_VDIR "/"
+#if !defined(LUA_PATH_DEFAULT)
 #define LUA_PATH_DEFAULT  \
LUA_LDIR"?.lua;"  LUA_LDIR"?/init.lua;" \
LUA_CDIR"?.lua;"  LUA_CDIR"?/init.lua;" \
"./?.lua;" "./?/init.lua"
+#endif
+#if !defined(LUA_CPATH_DEFAULT)
 #define LUA_CPATH_DEFAULT \
LUA_CDIR"?.so;" LUA_CDIR"loadall.so;" "./?.so"
+#endif
 #endif /* } */
 
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360676 - head/usr.bin/elfctl

2020-05-05 Thread Ed Maste
Author: emaste
Date: Tue May  5 21:50:52 2020
New Revision: 360676
URL: https://svnweb.freebsd.org/changeset/base/360676

Log:
  elfctl: update earliest FreeBSD revision to 12.2
  
  elfctl has been merged to stable/12, and so will appear in FreeBSD 12.2
  
  Reported by:  Dewayne Geraghty
  MFC after:1 week
  Sponsored by: The FreeBSD Foundation

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

Modified: head/usr.bin/elfctl/elfctl.1
==
--- head/usr.bin/elfctl/elfctl.1Tue May  5 21:01:43 2020
(r360675)
+++ head/usr.bin/elfctl/elfctl.1Tue May  5 21:50:52 2020
(r360676)
@@ -85,7 +85,7 @@ elfctl -e +aslr file
 .Sh HISTORY
 .Nm
 first appeared in
-.Fx 13.0 .
+.Fx 12.2 .
 .Sh AUTHORS
 .Nm
 was written by
___
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: r360675 - stable/11/usr.sbin/lmcconfig

2020-05-05 Thread Dimitry Andric
Author: dim
Date: Tue May  5 21:01:43 2020
New Revision: 360675
URL: https://svnweb.freebsd.org/changeset/base/360675

Log:
  Fix misleading indentation warning:
  
  usr.sbin/lmcconfig/lmcconfig.c:941:39: error: misleading indentation; 
statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]
return 64.0;
^
  usr.sbin/lmcconfig/lmcconfig.c:940:3: note: previous statement is here
if ((vga >= 0x3A) && (vga <  0x3F)) return 50.0 + 2.80 * (vga - 0x3A);
^
  
  Direct commit to stable/11, since lmcconfig has been removed from
  FreeBSD 12 and later.

Modified:
  stable/11/usr.sbin/lmcconfig/lmcconfig.c

Modified: stable/11/usr.sbin/lmcconfig/lmcconfig.c
==
--- stable/11/usr.sbin/lmcconfig/lmcconfig.cTue May  5 20:56:41 2020
(r360674)
+++ stable/11/usr.sbin/lmcconfig/lmcconfig.cTue May  5 21:01:43 2020
(r360675)
@@ -938,7 +938,7 @@ vga_dbs(u_int8_t vga)
   if ((vga >= 0x1C) && (vga <= 0x33)) return 10.0 + 1.25 * (vga - 0x1C);
   if ((vga >= 0x34) && (vga <= 0x39)) return 40.0 + 1.67 * (vga - 0x34);
   if ((vga >= 0x3A) && (vga <  0x3F)) return 50.0 + 2.80 * (vga - 0x3A);
-  return 64.0;
+  return 64.0;
 }
 
 static void
___
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: r360674 - stable/11/sbin/pfctl

2020-05-05 Thread Dimitry Andric
Author: dim
Date: Tue May  5 20:56:41 2020
New Revision: 360674
URL: https://svnweb.freebsd.org/changeset/base/360674

Log:
  MFC r335608 (by sbruno):
  
  Assuming that the intent (from the white space) is that the fprintf()
  be executed in the if() conditional.  If its not supposed to be printed
  inside the conditional, then the braces should be removed and the extra
  tabs on the fprintf() should be removed.
  
  Noted by cross compilation with gcc-mips.

Modified:
  stable/11/sbin/pfctl/pfctl_altq.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sbin/pfctl/pfctl_altq.c
==
--- stable/11/sbin/pfctl/pfctl_altq.c   Tue May  5 20:53:45 2020
(r360673)
+++ stable/11/sbin/pfctl/pfctl_altq.c   Tue May  5 20:56:41 2020
(r360674)
@@ -497,12 +497,13 @@ cbq_compute_idletime(struct pfctl *pf, struct pf_altq 
 * this causes integer overflow in kernel!
 * (bandwidth < 6Kbps when max_pkt_size=1500)
 */
-   if (pa->bandwidth != 0 && (pf->opts & PF_OPT_QUIET) == 0)
+   if (pa->bandwidth != 0 && (pf->opts & PF_OPT_QUIET) == 0) {
warnx("queue bandwidth must be larger than %s",
rate2str(ifnsPerByte * (double)opts->maxpktsize /
(double)INT_MAX * (double)pa->ifbandwidth));
fprintf(stderr, "cbq: queue %s is too slow!\n",
pa->qname);
+   }
nsPerByte = (double)(INT_MAX / opts->maxpktsize);
}
 
___
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: r360673 - stable/11/libexec/rshd

2020-05-05 Thread Dimitry Andric
Author: dim
Date: Tue May  5 20:53:45 2020
New Revision: 360673
URL: https://svnweb.freebsd.org/changeset/base/360673

Log:
  Fix misleading indentation warning:
  
  libexec/rshd/rshd.c:442:5: error: misleading indentation; statement is not 
part of the previous 'else' [-Werror,-Wmisleading-indentation]
  ioctl(pv[0], FIONBIO, (char *));
  ^
  libexec/rshd/rshd.c:440:4: note: previous statement is here
  else
  ^
  
  Direct commit to stable/11, since rshd has been removed from FreeBSD 12
  and later.

Modified:
  stable/11/libexec/rshd/rshd.c

Modified: stable/11/libexec/rshd/rshd.c
==
--- stable/11/libexec/rshd/rshd.c   Tue May  5 20:45:54 2020
(r360672)
+++ stable/11/libexec/rshd/rshd.c   Tue May  5 20:53:45 2020
(r360673)
@@ -439,7 +439,7 @@ doit(struct sockaddr *fromp)
nfd = pv[0];
else
nfd = s;
-   ioctl(pv[0], FIONBIO, (char *));
+   ioctl(pv[0], FIONBIO, (char *));
 
/* should set s nbio! */
nfd++;
___
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: r360672 - stable/11/usr.sbin/mpsutil

2020-05-05 Thread Dimitry Andric
Author: dim
Date: Tue May  5 20:45:54 2020
New Revision: 360672
URL: https://svnweb.freebsd.org/changeset/base/360672

Log:
  MFC r334075 (by eadler):
  
  mpsutil: add missing braces
  
  Obtained from:DragonFly (c5d53f11a9510c5c79e196857a1200925fffacc8)
  
  MFC r334085 (by eadler):
  
  mpsutil: correct style
  
  Reported by:  bapt

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

Modified: stable/11/usr.sbin/mpsutil/mpsutil.c
==
--- stable/11/usr.sbin/mpsutil/mpsutil.cTue May  5 19:54:30 2020
(r360671)
+++ stable/11/usr.sbin/mpsutil/mpsutil.cTue May  5 20:45:54 2020
(r360672)
@@ -59,9 +59,9 @@ usage(void)
fprintf(stderr, "usage: %s [-u unit]  ...\n\n", getprogname());
fprintf(stderr, "Commands include:\n");
SET_FOREACH(cmd, MPS_DATASET(usage)) {
-   if (*cmd == NULL)
+   if (*cmd == NULL) {
fprintf(stderr, "\n");
-   else
+   } else {
(*cmd)->handler(, );
if (strncmp((*cmd)->set, "top", 3) == 0)
fprintf(stderr, "%s %-30s\t%s\n",
@@ -69,6 +69,7 @@ usage(void)
else
fprintf(stderr, "%s %s %-30s\t%s\n",
(*cmd)->set, (*cmd)->name, args, desc);
+   }
}
exit(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: r360671 - head/sys/netinet

2020-05-05 Thread Michael Tuexen
Author: tuexen
Date: Tue May  5 19:54:30 2020
New Revision: 360671
URL: https://svnweb.freebsd.org/changeset/base/360671

Log:
  Avoid underflowing a variable, which would result in taking more
  data from the stream queues then needed.
  
  Thanks to Timo Voelker for finding this bug and providing a fix.
  
  MFC after:3 days

Modified:
  head/sys/netinet/sctp_output.c

Modified: head/sys/netinet/sctp_output.c
==
--- head/sys/netinet/sctp_output.c  Tue May  5 19:31:47 2020
(r360670)
+++ head/sys/netinet/sctp_output.c  Tue May  5 19:54:30 2020
(r360671)
@@ -7763,7 +7763,11 @@ sctp_fill_outqueue(struct sctp_tcb *stcb,
}
strq = stcb->asoc.ss_functions.sctp_ss_select_stream(stcb, net, 
asoc);
total_moved += moved;
-   space_left -= moved;
+   if (space_left >= moved) {
+   space_left -= moved;
+   } else {
+   space_left = 0;
+   }
if (space_left >= SCTP_DATA_CHUNK_OVERHEAD(stcb)) {
space_left -= SCTP_DATA_CHUNK_OVERHEAD(stcb);
} else {
___
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: r360670 - in head/lib: libc/sys libthr

2020-05-05 Thread Benedict Reuschling
Author: bcr (doc committer)
Date: Tue May  5 19:31:47 2020
New Revision: 360670
URL: https://svnweb.freebsd.org/changeset/base/360670

Log:
  Add HISTORY sections to document when this
  functionality first appeared in FreeBSD.
  
  Submitted by: Gordon Bergling gbergling_gmail.com
  Approved by:  bcr
  Differential Revision:https://reviews.freebsd.org/D24677

Modified:
  head/lib/libc/sys/thr_exit.2
  head/lib/libc/sys/thr_kill.2
  head/lib/libc/sys/thr_new.2
  head/lib/libc/sys/thr_self.2
  head/lib/libc/sys/thr_set_name.2
  head/lib/libc/sys/thr_suspend.2
  head/lib/libc/sys/thr_wake.2
  head/lib/libthr/libthr.3

Modified: head/lib/libc/sys/thr_exit.2
==
--- head/lib/libc/sys/thr_exit.2Tue May  5 19:00:26 2020
(r360669)
+++ head/lib/libc/sys/thr_exit.2Tue May  5 19:31:47 2020
(r360670)
@@ -28,7 +28,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 1, 2016
+.Dd May 5, 2020
 .Dt THR_EXIT 2
 .Os
 .Sh NAME
@@ -88,3 +88,8 @@ to implement
 .St -p1003.1-2001
 .Xr pthread 3
 functionality.
+.Sh HISTORY
+The
+.Fn thr_exit
+system call first appeared in
+.Fx 5.2 .

Modified: head/lib/libc/sys/thr_kill.2
==
--- head/lib/libc/sys/thr_kill.2Tue May  5 19:00:26 2020
(r360669)
+++ head/lib/libc/sys/thr_kill.2Tue May  5 19:31:47 2020
(r360670)
@@ -28,7 +28,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 1, 2016
+.Dd May 5, 2020
 .Dt THR_kill 2
 .Os
 .Sh NAME
@@ -131,3 +131,10 @@ to implement
 .St -p1003.1-2001
 .Xr pthread 3
 functionality.
+.Sh HISTORY
+The
+.Fn thr_kill
+and
+.Fn thr_kill2
+system calls first appeared in
+.Fx 5.2 .

Modified: head/lib/libc/sys/thr_new.2
==
--- head/lib/libc/sys/thr_new.2 Tue May  5 19:00:26 2020(r360669)
+++ head/lib/libc/sys/thr_new.2 Tue May  5 19:31:47 2020(r360670)
@@ -28,7 +28,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 2, 2016
+.Dd May 5, 2020
 .Dt THR_NEW 2
 .Os
 .Sh NAME
@@ -243,3 +243,8 @@ to implement
 .St -p1003.1-2001
 .Xr pthread 3
 functionality.
+.Sh HISTORY
+The
+.Fn thr_new
+system call first appeared in
+.Fx 5.2 .

Modified: head/lib/libc/sys/thr_self.2
==
--- head/lib/libc/sys/thr_self.2Tue May  5 19:00:26 2020
(r360669)
+++ head/lib/libc/sys/thr_self.2Tue May  5 19:31:47 2020
(r360670)
@@ -28,7 +28,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 3, 2020
+.Dd May 5, 2020
 .Dt THR_SELF 2
 .Os
 .Sh NAME
@@ -88,3 +88,8 @@ to implement
 .St -p1003.1-2001
 .Xr pthread 3
 functionality.
+.Sh HISTORY
+The
+.Fn thr_self
+system call first appeared in
+.Fx 5.2 .

Modified: head/lib/libc/sys/thr_set_name.2
==
--- head/lib/libc/sys/thr_set_name.2Tue May  5 19:00:26 2020
(r360669)
+++ head/lib/libc/sys/thr_set_name.2Tue May  5 19:31:47 2020
(r360670)
@@ -28,7 +28,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 2, 2016
+.Dd May 5, 2020
 .Dt THR_SET_NAME 2
 .Os
 .Sh NAME
@@ -92,3 +92,8 @@ The
 .Fn thr_set_name
 system call is non-standard and is used by the
 .Lb libthr .
+.Sh HISTORY
+The
+.Fn thr_set_name
+system call first appeared in
+.Fx 5.2 .

Modified: head/lib/libc/sys/thr_suspend.2
==
--- head/lib/libc/sys/thr_suspend.2 Tue May  5 19:00:26 2020
(r360669)
+++ head/lib/libc/sys/thr_suspend.2 Tue May  5 19:31:47 2020
(r360670)
@@ -28,7 +28,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd September 23, 2016
+.Dd May 5, 2020
 .Dt THR_SUSPEND 2
 .Os
 .Sh NAME
@@ -128,3 +128,8 @@ The sleep was interrupted by a signal.
 The
 .Fn thr_suspend
 system call is non-standard.
+.Sh HISTORY
+The
+.Fn thr_suspend
+system call first appeared in
+.Fx 5.2 .

Modified: head/lib/libc/sys/thr_wake.2
==
--- head/lib/libc/sys/thr_wake.2Tue May  5 19:00:26 2020
(r360669)
+++ head/lib/libc/sys/thr_wake.2Tue May  5 19:31:47 2020
(r360670)
@@ -28,7 +28,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd September 23, 2016
+.Dd May 5, 2020
 .Dt THR_WAKE 2
 .Os
 .Sh NAME
@@ -110,3 +110,8 @@ to implement
 .St -p1003.1-2001
 .Xr pthread 3
 functionality.
+.Sh HISTORY
+The
+.Fn thr_suspend
+system call first appeared in
+.Fx 5.2 .

Modified: head/lib/libthr/libthr.3
==
--- head/lib/libthr/libthr.3Tue May  5 19:00:26 2020(r360669)
+++ head/lib/libthr/libthr.3Tue May  5 19:31:47 2020(r360670)
@@ -29,7 +29,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd May 17, 2016
+.Dd May 5, 2020
 .Dt LIBTHR 3
 .Os
 .Sh NAME
@@ -279,6 +279,11 @@ logs.
 .Xr pthread_create 3 ,
 .Xr 

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

2020-05-05 Thread Benedict Reuschling
Author: bcr (doc committer)
Date: Tue May  5 19:00:26 2020
New Revision: 360669
URL: https://svnweb.freebsd.org/changeset/base/360669

Log:
  Fix broken links in the man page by pointing to a
  source that works or is the new location on the
  same page.
  
  Submitted by: alfix86_gmail.com
  Approved by:  bcr
  Differential Revision:https://reviews.freebsd.org/D23769

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

Modified: head/share/man/man4/pcm.4
==
--- head/share/man/man4/pcm.4   Tue May  5 18:49:04 2020(r360668)
+++ head/share/man/man4/pcm.4   Tue May  5 19:00:26 2020(r360669)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 22, 2012
+.Dd May 5, 2020
 .Dt SOUND 4
 .Os
 .Sh NAME
@@ -743,8 +743,8 @@ A device node is not created properly.
 .Xr mixer 8 ,
 .Xr sysctl 8
 .Rs
-.%T "Cookbook formulae for audio EQ biquad filter coefficients, by Robert 
Bristow-Johnson"
-.%U "http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt;
+.%T "Cookbook formulae for audio EQ biquad filter coefficients 
(Audio-EQ-Cookbook.txt), by Robert Bristow-Johnson"
+.%U "https://www.musicdsp.org/en/latest/Filters/197-rbj-audio-eq-cookbook.html;
 .Re
 .Rs
 .%T "Julius O'Smith's Digital Audio Resampling"
@@ -752,7 +752,7 @@ A device node is not created properly.
 .Re
 .Rs
 .%T "Polynomial Interpolators for High-Quality Resampling of Oversampled 
Audio, by Olli Niemitalo"
-.%U "http://www.student.oulu.fi/~oniemita/dsp/deip.pdf;
+.%U "http://yehar.com/blog/wp-content/uploads/2009/08/deip.pdf;
 .Re
 .Rs
 .%T "The OSS API"
___
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: r360668 - in stable/11: . contrib/llvm-project/clang contrib/llvm-project/compiler-rt contrib/llvm-project/libcxx contrib/llvm-project/libunwind contrib/llvm-project/lld contrib/llvm-pr...

2020-05-05 Thread Dimitry Andric
Author: dim
Date: Tue May  5 18:49:04 2020
New Revision: 360668
URL: https://svnweb.freebsd.org/changeset/base/360668

Log:
  Record-only merge of r310775 and its reversal, r310792. This is so these
  do not show up in any future merge attempts.

Modified:
Directory Properties:
  stable/11/   (props changed)
  stable/11/contrib/llvm-project/clang/   (props changed)
  stable/11/contrib/llvm-project/compiler-rt/   (props changed)
  stable/11/contrib/llvm-project/libcxx/   (props changed)
  stable/11/contrib/llvm-project/libunwind/   (props changed)
  stable/11/contrib/llvm-project/lld/   (props changed)
  stable/11/contrib/llvm-project/lldb/   (props changed)
  stable/11/contrib/llvm-project/llvm/   (props changed)
  stable/11/contrib/llvm-project/openmp/   (props changed)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360667 - in stable/11: gnu/usr.bin/binutils/ld lib/clang/libllvm usr.bin/clang/lld

2020-05-05 Thread Dimitry Andric
Author: dim
Date: Tue May  5 18:44:06 2020
New Revision: 360667
URL: https://svnweb.freebsd.org/changeset/base/360667

Log:
  MFC r330366 (by emaste):
  
  When lld is ld, install bfd's man page as ld.bfd.1
  
  When WITH_LLD_IS_LD is set, lld's man page is installed as ld.1.gz, as
  was GNU BFD's man page prior to this change.
  
  Reported by:  Tobias Kortkamp
  Sponsored by: The FreeBSD Foundation
  
  MFC r335447 (by bdrewery):
  
  Rework how the ld link is handled in WORLDTMP from r322811.
  
  LLD_BOOTSTRAP (build) is independent of LLD_IS_LD (installed) so they
  should not be based on each other.
  
  This is related to upcoming WITH_SYSTEM_LINKER work.
  
  Reviewed by:  emaste
  Sponsored by: Dell EMC
  Differential Revision:https://reviews.freebsd.org/D15836
  
  MFC r335448 (by bdrewery):
  
  Rework WITHOUT_LLD/TOOLCHAIN fix from r327892 for cross-tools.
  
  MK_LLD is for the installed lld while MK_LLD_BOOTSTRAP is for the build
  tool.  For WITH_SYSTEM_LINKER it is necesarry to separate the logic of
  these two.  When building libllvm TOOLS_PREFIX will be defined and
  MK_LLD_BOOTSTRAP should be checked instead.
  
  Sponsored by: Dell EMC
  Differential Revision:https://reviews.freebsd.org/D15837
  
  MFC r335449 (by bdrewery):
  
  Fix sources needed for lld.
  
  lld always needs these DWARF sources, as well as other default and extra
  tools. XDL seems to be the best fit list.
  
  Remove MK_LLD_IS_LD check from SRCS_MIW which is now reduced to just a
  few files for llvm-objdump.
  
  Sponsored by: Dell EMC
  Differential Revision:https://reviews.freebsd.org/D15915
  
  MFC r335560 (by bdrewery):
  
  Revert r335449 and add needed MK_LLD_BOOTSTRAP check for SRCS_MIW.
  
  This effectively reverts r335449 and changes the previous MK_LLD_IS_LD
  to a MK_LLD_BOOTSTRAP check.  If !TOOLS_PREFIX then these sources are
  always built for llvm-objdump, lld, and llvm-cov.  When TOOLS_PREFIX
  is set then they are only needed if lld is being bootstrapped.
  
  Reported by:  dim
  Pointyhat to: bdrewery
  Sponsored by: Dell EMC

Modified:
  stable/11/gnu/usr.bin/binutils/ld/Makefile
  stable/11/lib/clang/libllvm/Makefile
  stable/11/usr.bin/clang/lld/Makefile
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/gnu/usr.bin/binutils/ld/Makefile
==
--- stable/11/gnu/usr.bin/binutils/ld/Makefile  Tue May  5 18:09:06 2020
(r360666)
+++ stable/11/gnu/usr.bin/binutils/ld/Makefile  Tue May  5 18:44:06 2020
(r360667)
@@ -7,7 +7,17 @@ ELF_SCR_EXT=   x xbn xc xd xdc xdw xn xr xs xsc xsw xu x
 .PATH: ${SRCDIR}/ld
 
 PROG=  ld.bfd
+.if (!defined(TOOLS_PREFIX) && ${MK_LLD_IS_LD} == "no") || \
+(defined(TOOLS_PREFIX) && ${MK_LLD_BOOTSTRAP} == "no")
 MAN=   ld.1
+LINKS= ${BINDIR}/ld.bfd ${BINDIR}/ld
+.else
+MAN=   ld.bfd.1
+CLEANFILES+=   ld.bfd.1
+ld.bfd.1:  ld.1
+   ${CP} ${.ALLSRC} ${.TARGET}
+.endif
+
 SCRIPTDIR= /usr/libdata/ldscripts
 SRCS+= ldcref.c \
ldctor.c \
@@ -49,9 +59,6 @@ CLEANFILES+=  ldemul-list.h stringify.sed
 
 FILES= ${LDSCRIPTS:S|^|ldscripts/|}
 FILESDIR=  ${SCRIPTDIR}
-.if ${MK_LLD_IS_LD} == "no"
-LINKS= ${BINDIR}/ld.bfd ${BINDIR}/ld
-.endif
 
 HOST=  ${TARGET_TUPLE}
 LIBSEARCHPATH= \"=/lib\":\"=/usr/lib\"

Modified: stable/11/lib/clang/libllvm/Makefile
==
--- stable/11/lib/clang/libllvm/MakefileTue May  5 18:09:06 2020
(r360666)
+++ stable/11/lib/clang/libllvm/MakefileTue May  5 18:44:06 2020
(r360667)
@@ -1539,7 +1539,7 @@ SRCS_EXT+=XRay/RecordInitializer.cpp
 SRCS_EXT+= XRay/Trace.cpp
 
 SRCS_ALL+= ${SRCS_MIN}
-.if !defined(TOOLS_PREFIX) || ${MK_LLD_IS_LD} != "no"
+.if !defined(TOOLS_PREFIX) || ${MK_LLD_BOOTSTRAP} != "no"
 SRCS_ALL+= ${SRCS_MIW}
 .endif
 .if ${MK_CLANG_EXTRAS} != "no"
@@ -1548,16 +1548,19 @@ SRCS_ALL+=  ${SRCS_EXT}
 .if ${MK_CLANG_FULL} != "no"
 SRCS_ALL+= ${SRCS_FUL}
 .endif
-.if ${MK_CLANG_EXTRAS} != "no" || ${MK_LLD} != "no"
+.if ${MK_CLANG_EXTRAS} != "no" || ${MK_LLD} != "no" || \
+(defined(TOOLS_PREFIX) && ${MK_LLD_BOOTSTRAP} != "no")
 SRCS_ALL+= ${SRCS_EXL}
 .endif
-.if ${MK_LLD} != "no"
+.if ${MK_LLD} != "no" || \
+(defined(TOOLS_PREFIX) && ${MK_LLD_BOOTSTRAP} != "no")
 SRCS_ALL+= ${SRCS_LLD}
 .endif
 .if ${MK_CLANG_EXTRAS} != "no" || ${MK_LLDB} != "no"
 SRCS_ALL+= ${SRCS_XDB}
 .endif
-.if ${MK_CLANG_EXTRAS} != "no" || ${MK_LLDB} != "no" || ${MK_LLD} != "no"
+.if ${MK_CLANG_EXTRAS} != "no" || ${MK_LLDB} != "no" || ${MK_LLD} != "no" || \
+(defined(TOOLS_PREFIX) && ${MK_LLD_BOOTSTRAP} != "no")
 SRCS_ALL+= ${SRCS_XDL}
 .endif
 .if ${MK_CLANG_EXTRAS} != "no" || ${MK_LLDB} != "no" || !defined(TOOLS_PREFIX)

Modified: stable/11/usr.bin/clang/lld/Makefile

svn commit: r360666 - in stable/11: . contrib/llvm-project/clang contrib/llvm-project/compiler-rt contrib/llvm-project/libcxx contrib/llvm-project/libunwind contrib/llvm-project/lld contrib/llvm-pr...

2020-05-05 Thread Dimitry Andric
Author: dim
Date: Tue May  5 18:09:06 2020
New Revision: 360666
URL: https://svnweb.freebsd.org/changeset/base/360666

Log:
  Record-only merge of r332501 and its reversal, r332503. This is so these
  do not show up in any future merge attempts.

Modified:
Directory Properties:
  stable/11/   (props changed)
  stable/11/contrib/llvm-project/clang/   (props changed)
  stable/11/contrib/llvm-project/compiler-rt/   (props changed)
  stable/11/contrib/llvm-project/libcxx/   (props changed)
  stable/11/contrib/llvm-project/libunwind/   (props changed)
  stable/11/contrib/llvm-project/lld/   (props changed)
  stable/11/contrib/llvm-project/lldb/   (props changed)
  stable/11/contrib/llvm-project/llvm/   (props changed)
  stable/11/contrib/llvm-project/openmp/   (props changed)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360665 - head/bin/ls

2020-05-05 Thread Conrad Meyer
Author: cem
Date: Tue May  5 18:06:32 2020
New Revision: 360665
URL: https://svnweb.freebsd.org/changeset/base/360665

Log:
  ls(1): Fix trivial SEGV due to NULL deref in OOM path
  
  Reported by:  Anton Rang 
  Sponsored by: Dell EMC Isilon

Modified:
  head/bin/ls/ls.c

Modified: head/bin/ls/ls.c
==
--- head/bin/ls/ls.cTue May  5 17:57:04 2020(r360664)
+++ head/bin/ls/ls.cTue May  5 18:06:32 2020(r360665)
@@ -838,7 +838,21 @@ display(const FTSENT *p, FTSENT *list, int options)
group = ngroup;
} else {
user = user_from_uid(sp->st_uid, 0);
+   /*
+* user_from_uid(..., 0) only returns
+* NULL in OOM conditions.  We could
+* format the uid here, but (1) in
+* general ls(1) exits on OOM, and (2)
+* there is another allocation/exit
+* path directly below, which will
+* likely exit anyway.
+*/
+   if (user == NULL)
+   err(1, "user_from_uid");
group = group_from_gid(sp->st_gid, 0);
+   /* Ditto. */
+   if (group == NULL)
+   err(1, "group_from_gid");
}
if ((ulen = strlen(user)) > maxuser)
maxuser = ulen;
___
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: r360664 - head/lib/libc/string

2020-05-05 Thread Conrad Meyer
Author: cem
Date: Tue May  5 17:57:04 2020
New Revision: 360664
URL: https://svnweb.freebsd.org/changeset/base/360664

Log:
  strdup.3: Slightly canonicalize OOM return/error status
  
  Attempted to clean up the language around "this is a malloc'd object."  May be
  passed as a parameter to free(3) is a bit obtuse.
  
  Sponsored by: Dell EMC Isilon

Modified:
  head/lib/libc/string/strdup.3

Modified: head/lib/libc/string/strdup.3
==
--- head/lib/libc/string/strdup.3   Tue May  5 17:55:45 2020
(r360663)
+++ head/lib/libc/string/strdup.3   Tue May  5 17:57:04 2020
(r360664)
@@ -28,7 +28,7 @@
 .\" @(#)strdup.3   8.1 (Berkeley) 6/9/93
 .\" $FreeBSD$
 .\"
-.Dd June 6, 2018
+.Dd May 5, 2020
 .Dt STRDUP 3
 .Os
 .Sh NAME
@@ -51,15 +51,12 @@ allocates sufficient memory for a copy
 of the string
 .Fa str ,
 does the copy, and returns a pointer to it.
-The pointer may subsequently be used as an
-argument to the function
-.Xr free 3 .
+The memory is allocated with
+.Xr malloc 3
+and should be released with
+.Xr free 3
+when no longer needed.
 .Pp
-If insufficient memory is available, NULL is returned and
-.Va errno
-is set to
-.Er ENOMEM .
-.Pp
 The
 .Fn strndup
 function copies at most
@@ -69,6 +66,14 @@ characters from the string
 always
 .Dv NUL
 terminating the copied string.
+.Sh RETURN VALUES
+If insufficient memory is available, NULL is returned and
+.Va errno
+is set to
+.Er ENOMEM .
+Otherwise, the
+.Fn strdup
+family of functions return a pointer to the copied string.
 .Sh SEE ALSO
 .Xr free 3 ,
 .Xr malloc 3 ,
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360663 - head/contrib/libc-pwcache

2020-05-05 Thread Conrad Meyer
Author: cem
Date: Tue May  5 17:55:45 2020
New Revision: 360663
URL: https://svnweb.freebsd.org/changeset/base/360663

Log:
  pwcache.3: Explicitly document OOM condition
  
  The pwcache functions allocate memory, and may return NULL pointers if that
  allocation fails and the corresponding uid or gid was not found in the local
  password database.  Document this behavior.
  
  Sponsored by: Dell EMC Isilon

Modified:
  head/contrib/libc-pwcache/pwcache.3

Modified: head/contrib/libc-pwcache/pwcache.3
==
--- head/contrib/libc-pwcache/pwcache.3 Tue May  5 17:52:44 2020
(r360662)
+++ head/contrib/libc-pwcache/pwcache.3 Tue May  5 17:55:45 2020
(r360663)
@@ -56,7 +56,7 @@
 .\"
 .\" @(#)pwcache.3  8.1 (Berkeley) 6/9/93
 .\"
-.Dd October 19, 2012
+.Dd May 5, 2020
 .Dt PWCACHE 3
 .Os
 .Sh NAME
@@ -193,6 +193,15 @@ and
 may be
 .Dv NULL
 pointers.
+.Sh ERRORS
+If insufficient memory is available,
+.Fn user_from_uid
+and
+.Fn group_from_gid
+may return NULL pointers.
+.Va errno
+is set to
+.Er ENOMEM .
 .Sh SEE ALSO
 .Xr getgrgid 3 ,
 .Xr getgrnam 3 ,
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360662 - head/sys/netinet

2020-05-05 Thread Michael Tuexen
Author: tuexen
Date: Tue May  5 17:52:44 2020
New Revision: 360662
URL: https://svnweb.freebsd.org/changeset/base/360662

Log:
  Fix the computation of the numbers of entries of the mapping array to
  look at when generating a SACK. This was wrong in case of sequence
  numbers wrap arounds.
  
  Thanks to Gwenael FOURRE for reporting the issue for the userland stack:
  https://github.com/sctplab/usrsctp/issues/462
  MFC after:3 days

Modified:
  head/sys/netinet/sctp_output.c

Modified: head/sys/netinet/sctp_output.c
==
--- head/sys/netinet/sctp_output.c  Tue May  5 17:50:27 2020
(r360661)
+++ head/sys/netinet/sctp_output.c  Tue May  5 17:52:44 2020
(r360662)
@@ -10713,7 +10713,7 @@ sctp_send_sack(struct sctp_tcb *stcb, int so_locked
if (highest_tsn > asoc->mapping_array_base_tsn) {
siz = (((highest_tsn - asoc->mapping_array_base_tsn) + 
1) + 7) / 8;
} else {
-   siz = (((MAX_TSN - highest_tsn) + 1) + highest_tsn + 7) 
/ 8;
+   siz = (((MAX_TSN - asoc->mapping_array_base_tsn) + 1) + 
highest_tsn + 7) / 8;
}
} else {
sack = 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: r360661 - in stable/11: . contrib/llvm-project contrib/llvm-project/clang contrib/llvm-project/clang/include/clang/Basic contrib/llvm-project/clang/include/clang/CodeGen contrib/llvm-pr...

2020-05-05 Thread Dimitry Andric
pp
  stable/11/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstr64Bit.td
  stable/11/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrInfo.td
  stable/11/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCSubtarget.cpp
  stable/11/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
  
stable/11/contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
  stable/11/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
  stable/11/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
  stable/11/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVInstrInfoD.td
  stable/11/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVRegisterInfo.h
  
stable/11/contrib/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyInstrFloat.td
  stable/11/contrib/llvm-project/llvm/lib/Target/X86/X86FlagsCopyLowering.cpp
  stable/11/contrib/llvm-project/llvm/lib/Target/X86/X86FrameLowering.cpp
  stable/11/contrib/llvm-project/llvm/lib/Target/X86/X86FrameLowering.h
  stable/11/contrib/llvm-project/llvm/lib/Target/X86/X86InstrInfo.cpp
  stable/11/contrib/llvm-project/llvm/lib/Target/X86/X86MachineFunctionInfo.h
  stable/11/contrib/llvm-project/llvm/lib/Target/X86/X86RegisterInfo.cpp
  
stable/11/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
  
stable/11/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
  stable/11/contrib/llvm-project/llvm/lib/Transforms/Scalar/GVN.cpp
  stable/11/contrib/llvm-project/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
  stable/11/contrib/llvm-project/llvm/lib/Transforms/Scalar/SROA.cpp
  stable/11/contrib/llvm-project/llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp
  stable/11/contrib/llvm-project/llvm/tools/llvm-objcopy/ObjcopyOpts.td
  stable/11/contrib/llvm-project/llvm/tools/llvm-objcopy/StripOpts.td
  stable/11/contrib/llvm-project/llvm/tools/opt/opt.cpp
  stable/11/etc/mtree/BSD.debug.dist
  stable/11/etc/mtree/BSD.usr.dist
  stable/11/lib/clang/freebsd_cc_version.h
  stable/11/lib/clang/headers/Makefile
  stable/11/lib/clang/include/VCSVersion.inc
  stable/11/lib/clang/include/clang/Basic/Version.inc
  stable/11/lib/clang/include/clang/Config/config.h
  stable/11/lib/clang/include/lld/Common/Version.inc
  stable/11/lib/clang/include/llvm/Config/config.h
  stable/11/lib/clang/include/llvm/Config/llvm-config.h
  stable/11/lib/clang/include/llvm/Support/VCSRevision.h
  stable/11/lib/libclang_rt/Makefile.inc
  stable/11/lib/libcompiler_rt/Makefile.inc
  stable/11/tools/build/mk/OptionalObsoleteFiles.inc
Directory Properties:
  stable/11/   (props changed)
  stable/11/contrib/llvm-project/clang/   (props changed)
  stable/11/contrib/llvm-project/compiler-rt/   (props changed)
  stable/11/contrib/llvm-project/libcxx/   (props changed)
  stable/11/contrib/llvm-project/libunwind/   (props changed)
  stable/11/contrib/llvm-project/lld/   (props changed)
  stable/11/contrib/llvm-project/lldb/   (props changed)
  stable/11/contrib/llvm-project/llvm/   (props changed)
  stable/11/contrib/llvm-project/openmp/   (props changed)

Modified: stable/11/ObsoleteFiles.inc
==
--- stable/11/ObsoleteFiles.inc Tue May  5 17:10:49 2020(r360660)
+++ stable/11/ObsoleteFiles.inc Tue May  5 17:50:27 2020(r360661)
@@ -38,6 +38,243 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20200505: new clang import which bumps version from 9.0.0 to 9.0.1.
+OLD_FILES+=usr/lib/clang/9.0.0/include/cuda_wrappers/algorithm
+OLD_FILES+=usr/lib/clang/9.0.0/include/cuda_wrappers/complex
+OLD_FILES+=usr/lib/clang/9.0.0/include/cuda_wrappers/new
+OLD_DIRS+=usr/lib/clang/9.0.0/include/cuda_wrappers
+OLD_FILES+=usr/lib/clang/9.0.0/include/openmp_wrappers/__clang_openmp_math.h
+OLD_FILES+=usr/lib/clang/9.0.0/include/openmp_wrappers/__clang_openmp_math_declares.h
+OLD_FILES+=usr/lib/clang/9.0.0/include/openmp_wrappers/cmath
+OLD_FILES+=usr/lib/clang/9.0.0/include/openmp_wrappers/math.h
+OLD_DIRS+=usr/lib/clang/9.0.0/include/openmp_wrappers
+OLD_FILES+=usr/lib/clang/9.0.0/include/ppc_wrappers/emmintrin.h
+OLD_FILES+=usr/lib/clang/9.0.0/include/ppc_wrappers/mm_malloc.h
+OLD_FILES+=usr/lib/clang/9.0.0/include/ppc_wrappers/mmintrin.h
+OLD_FILES+=usr/lib/clang/9.0.0/include/ppc_wrappers/xmmintrin.h
+OLD_DIRS+=usr/lib/clang/9.0.0/include/ppc_wrappers
+OLD_FILES+=usr/lib/clang/9.0.0/include/sanitizer/allocator_interface.h
+OLD_FILES+=usr/lib/clang/9.0.0/include/sanitizer/asan_interface.h
+OLD_FILES+=usr/lib/clang/9.0.0/include/sanitizer/common_interface_defs.h
+OLD_FILES+=usr/lib/clang/9.0.0/include/sanitizer/coverage_interface.h
+OLD_FILES+=usr/lib/clang/9.0.0/include/sanitizer/dfsan_interface.h
+OLD_FILES+=usr/lib/clang/9.0.0/include/sanitizer/hwasan_interface.h
+OLD_FILES+=usr/lib/clang/9.0.0/include/sanitizer/linux_syscall_hooks.h
+OLD_FILES+=usr/lib/clang/9.0.0/include/sanitizer/lsan_interface.h
+OLD_FILES+=usr/lib/clang/9.0.0/include/sanitizer/msan_in

svn commit: r360660 - in stable/11: . contrib/compiler-rt contrib/libc++ contrib/libunwind contrib/llvm contrib/llvm-project/libcxx/include contrib/openmp gnu/usr.bin/cc/include lib/clang lib/clang...

2020-05-05 Thread Dimitry Andric
Author: dim
Date: Tue May  5 17:10:49 2020
New Revision: 360660
URL: https://svnweb.freebsd.org/changeset/base/360660

Log:
  MFC r355940:
  
  Move all sources from the llvm project into contrib/llvm-project.
  
  This uses the new layout of the upstream repository, which was recently
  migrated to GitHub, and converted into a "monorepo".  That is, most of
  the earlier separate sub-projects with their own branches and tags were
  consolidated into one top-level directory, and are now branched and
  tagged together.
  
  Updating the vendor area to match this layout is next.

Added:
 - copied from r355940, head/contrib/llvm-project/
Directory Properties:
  stable/11/contrib/llvm-project/   (props changed)
Deleted:
  stable/11/contrib/compiler-rt/
  stable/11/contrib/libc++/
  stable/11/contrib/libunwind/
  stable/11/contrib/llvm/
  stable/11/contrib/openmp/
Modified:
  stable/11/MAINTAINERS
  stable/11/contrib/llvm-project/libcxx/include/__errc
  stable/11/contrib/llvm-project/libcxx/include/errno.h
  stable/11/gnu/usr.bin/cc/include/Makefile
  stable/11/lib/clang/clang.build.mk
  stable/11/lib/clang/clang.pre.mk
  stable/11/lib/clang/libclang/Makefile
  stable/11/lib/clang/liblldb/Makefile
  stable/11/lib/clang/libllvm/Makefile
  stable/11/lib/clang/libllvmminimal/Makefile
  stable/11/lib/clang/lldb.pre.mk
  stable/11/lib/clang/llvm.build.mk
  stable/11/lib/clang/llvm.pre.mk
  stable/11/lib/libblocksruntime/Makefile
  stable/11/lib/libc++/Makefile
  stable/11/lib/libc++experimental/Makefile
  stable/11/lib/libc/arm/aeabi/Makefile.inc
  stable/11/lib/libclang_rt/Makefile.inc
  stable/11/lib/libcompiler_rt/Makefile.inc
  stable/11/lib/libexecinfo/Makefile
  stable/11/lib/libgcc_eh/Makefile.inc
  stable/11/lib/libomp/Makefile
  stable/11/share/doc/llvm/Makefile
  stable/11/share/doc/llvm/clang/Makefile
  stable/11/share/mk/bsd.clang-analyze.mk
  stable/11/stand/i386/boot2/Makefile
  stable/11/stand/libsa/Makefile
  stable/11/usr.bin/clang/bugpoint/Makefile
  stable/11/usr.bin/clang/clang-format/Makefile
  stable/11/usr.bin/clang/clang-tblgen/Makefile
  stable/11/usr.bin/clang/clang/Makefile
  stable/11/usr.bin/clang/llc/Makefile
  stable/11/usr.bin/clang/lld/Makefile
  stable/11/usr.bin/clang/lldb-tblgen/Makefile
  stable/11/usr.bin/clang/lldb/Makefile
  stable/11/usr.bin/clang/lli/Makefile
  stable/11/usr.bin/clang/llvm-ar/Makefile
  stable/11/usr.bin/clang/llvm-as/Makefile
  stable/11/usr.bin/clang/llvm-bcanalyzer/Makefile
  stable/11/usr.bin/clang/llvm-cov/Makefile
  stable/11/usr.bin/clang/llvm-cxxdump/Makefile
  stable/11/usr.bin/clang/llvm-cxxfilt/Makefile
  stable/11/usr.bin/clang/llvm-diff/Makefile
  stable/11/usr.bin/clang/llvm-dis/Makefile
  stable/11/usr.bin/clang/llvm-dwarfdump/Makefile
  stable/11/usr.bin/clang/llvm-extract/Makefile
  stable/11/usr.bin/clang/llvm-link/Makefile
  stable/11/usr.bin/clang/llvm-lto/Makefile
  stable/11/usr.bin/clang/llvm-lto2/Makefile
  stable/11/usr.bin/clang/llvm-mc/Makefile
  stable/11/usr.bin/clang/llvm-mca/Makefile
  stable/11/usr.bin/clang/llvm-modextract/Makefile
  stable/11/usr.bin/clang/llvm-nm/Makefile
  stable/11/usr.bin/clang/llvm-objcopy/Makefile
  stable/11/usr.bin/clang/llvm-objdump/Makefile
  stable/11/usr.bin/clang/llvm-pdbutil/Makefile
  stable/11/usr.bin/clang/llvm-profdata/Makefile
  stable/11/usr.bin/clang/llvm-rtdyld/Makefile
  stable/11/usr.bin/clang/llvm-symbolizer/Makefile
  stable/11/usr.bin/clang/llvm-tblgen/Makefile
  stable/11/usr.bin/clang/llvm-xray/Makefile
  stable/11/usr.bin/clang/opt/Makefile
Directory Properties:
  stable/11/   (props changed)
  stable/11/contrib/llvm-project/clang/   (props changed)
  stable/11/contrib/llvm-project/compiler-rt/   (props changed)
  stable/11/contrib/llvm-project/libcxx/   (props changed)
  stable/11/contrib/llvm-project/libunwind/   (props changed)
  stable/11/contrib/llvm-project/lld/   (props changed)
  stable/11/contrib/llvm-project/lldb/   (props changed)
  stable/11/contrib/llvm-project/llvm/   (props changed)
  stable/11/contrib/llvm-project/openmp/   (props changed)

Modified: stable/11/MAINTAINERS
==
--- stable/11/MAINTAINERS   Tue May  5 15:29:16 2020(r360659)
+++ stable/11/MAINTAINERS   Tue May  5 17:10:49 2020(r360660)
@@ -37,11 +37,13 @@ subsystem   login   notes
 -
 atffreebsd-testing,jmmv,ngie   Pre-commit review 
requested.
 ath(4) adrian  Pre-commit review requested, send to 
freebsd-wirel...@freebsd.org
-contrib/compiler-rtdim Pre-commit review preferred.
-contrib/libc++ dim Pre-commit review preferred.
-contrib/libcxxrt   dim Pre-commit review preferred.
-contrib/llvm   dim Pre-commit review preferred.
-contrib/llvm/tools/lldbemaste  Pre-commit review preferred.
+contrib/libcxxrt   dim,emaste  Pre-commit review preferred.
+contrib/llvm-project/compiler-rt 

Re: svn commit: r360648 - in head: lib/libvmmapi share/man/man5 share/mk sys/amd64/include sys/amd64/vmm sys/amd64/vmm/amd sys/amd64/vmm/intel sys/amd64/vmm/io sys/conf sys/modules/vmm tools/build/opt

2020-05-05 Thread John Baldwin
On 5/4/20 5:02 PM, John Baldwin wrote:
> Author: jhb
> Date: Tue May  5 00:02:04 2020
> New Revision: 360648
> URL: https://svnweb.freebsd.org/changeset/base/360648
> 
> Log:
>   Initial support for bhyve save and restore.

This represents a lot of work by the folks at UPB.  I merely fixed a few
nits.  This does need further maturing, but it is easier to do that in
the tree at this point than to keep maintaining this patchset out-of-tree.

You can find instructions on using this and testing it here:

https://github.com/FreeBSD-UPB/freebsd/wiki/Save-and-Restore-a-virtual-machine-using-bhyve

Though you will want to build world with WITH_BHYVE_SNAPSHOT=yes and
add 'options BHYVE_SNAPSHOT' to your kernel config.

My own todo list of small cleanups is below, but a bigger issue is defining
a more flexible file format for snapshots that encodes the machine
configuration and is not as tied to internal ABIs of device models.  That
is quite a lift, but one that can be done somewhat incrementally I think.

My next set of cleanups:

- Remove int arg from VM_RESTORE_TIME ioctl
- Remove 'ctx' from vm_snapshot ioctl structure
- Add /var/run/bhyve to mtree, remove makedirs, remove checkpoint
  subdir
- block_if.c
  - Change blockif_flush_bc to return ioctl / fsync return value
  - Axe bc_paused_cond and just use bc_cond
  - Use pointer arith for idx in block_if.c
- snapshot.c
  - rewrite strcat_extension to use asprintf
  - review other bits of this file
- remove lseek from vm_mem_read_file?
- remove  from vmm_snapshot.h?
- fix to work with capsicum

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


Re: svn commit: r360648 - in head: lib/libvmmapi share/man/man5 share/mk sys/amd64/include sys/amd64/vmm sys/amd64/vmm/amd sys/amd64/vmm/intel sys/amd64/vmm/io sys/conf sys/modules/vmm tools/build/

2020-05-05 Thread Cy Schubert
In message <202005050002.04502576094...@repo.freebsd.org>, John Baldwin 
writes:
> Author: jhb
> Date: Tue May  5 00:02:04 2020
> New Revision: 360648
> URL: https://svnweb.freebsd.org/changeset/base/360648
>
> Log:
>   Initial support for bhyve save and restore.
>   
>   Save and restore (also known as suspend and resume) permits a snapshot
>   to be taken of a guest's state that can later be resumed.  In the
>   current implementation, bhyve(8) creates a UNIX domain socket that is
>   used by bhyvectl(8) to send a request to save a snapshot (and
>   optionally exit after the snapshot has been taken).  A snapshot
>   currently consists of two files: the first holds a copy of guest RAM,
>   and the second file holds other guest state such as vCPU register
>   values and device model state.
>   
>   To resume a guest, bhyve(8) must be started with a matching pair of
>   command line arguments to instantiate the same set of device models as
>   well as a pointer to the saved snapshot.
>   
>   While the current implementation is useful for several uses cases, it
>   has a few limitations.  The file format for saving the guest state is
>   tied to the ABI of internal bhyve structures and is not
>   self-describing (in that it does not communicate the set of device
>   models present in the system).  In addition, the state saved for some
>   device models closely matches the internal data structures which might
>   prove a challenge for compatibility of snapshot files across a range
>   of bhyve versions.  The file format also does not currently support
>   versioning of individual chunks of state.  As a result, the current
>   file format is not a fixed binary format and future revisions to save
>   and restore will break binary compatiblity of snapshot files.  The
>   goal is to move to a more flexible format that adds versioning,
>   etc. and at that point to commit to providing a reasonable level of
>   compatibility.  As a result, the current implementation is not enabled
>   by default.  It can be enabled via the WITH_BHYVE_SNAPSHOT=yes option
>   for userland builds, and the kernel option BHYVE_SHAPSHOT.
>   
>   Submitted by:   Mihai Tiganus, Flavius Anton, Darius Mihai
>   Submitted by:   Elena Mihailescu, Mihai Carabas, Sergiu Weisz
>   Relnotes:   yes
>   Sponsored by:   University Politehnica of Bucharest
>   Sponsored by:   Matthew Grooms (student scholarships)
>   Sponsored by:   iXsystems
>   Differential Revision:  https://reviews.freebsd.org/D19495

Could also be the basis of a vmotion-like function. And possibly a 
hot-failover facility like VMware has.

Vmotion and hot-failover require shared disk but we could use ZFS snapshots 
instead.


-- 
Cheers,
Cy Schubert 
FreeBSD UNIX: Web:  https://FreeBSD.org
NTP:   Web:  https://nwtime.org

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


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


svn commit: r360659 - stable/11/sys/arm/include

2020-05-05 Thread Dimitry Andric
Author: dim
Date: Tue May  5 15:29:16 2020
New Revision: 360659
URL: https://svnweb.freebsd.org/changeset/base/360659

Log:
  Fix-up for arm, armeb and armv6 builds erroring after r360658, with:
  
  In file included from 
/usr/src/contrib/compiler-rt/lib/builtins/clear_cache.c:26:
  /usr/obj/arm.armv6/usr/src/tmp/usr/include/machine/sysarch.h:95:22: error: 
unknown type name 'u_int'
  int arm_sync_icache (u_int addr, int len);
  ^
  
  MFC r349887 (by ian):
  
  De-pollute arm's sysarch.h.
  
  Instead of including stdint.h for uintptr_t, include sys/_types.h and use
  __types for everything that isn't a native C keyword type.
  
  Remove the #include of cdefs.h.  It appears after the include of armreg.h
  which has a precondition of cdefs.h being included before it, so everyone
  including sysarch.h is already including cdefs.h.  (When armv5 support
  goes away, there will be no need include armreg.h here either.)
  
  Unfortunately, the unprefixed struct member names "addr" and "len" cannot
  be changed, because 3rd-party software is relying on them (libcompiler_rt
  is one known consumer).

Modified:
  stable/11/sys/arm/include/sysarch.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/arm/include/sysarch.h
==
--- stable/11/sys/arm/include/sysarch.h Tue May  5 12:59:04 2020
(r360658)
+++ stable/11/sys/arm/include/sysarch.h Tue May  5 15:29:16 2020
(r360659)
@@ -63,12 +63,10 @@
 #ifndef LOCORE
 #ifndef __ASSEMBLER__
 
-#include 
-
 /*
- * Pickup definition of uintptr_t
+ * Pickup definition of various __types.
  */
-#include 
+#include 
 
 /*
  * Architecture specific syscalls (arm)
@@ -81,19 +79,19 @@
 #define ARM_GET_VFPSTATE   4
 
 struct arm_sync_icache_args {
-   uintptr_t   addr;   /* Virtual start address */
-   size_t  len;/* Region size */
+   __uintptr_t addr;   /* Virtual start address */
+   __size_tlen;/* Region size */
 };
 
 struct arm_get_vfpstate_args {
-   size_t  mc_vfp_size;
+   __size_tmc_vfp_size;
void*mc_vfp;
 };
 
 #ifndef _KERNEL
 __BEGIN_DECLS
-intarm_sync_icache (u_int addr, int len);
-intarm_drain_writebuf (void);
+intarm_sync_icache(unsigned int, int);
+intarm_drain_writebuf(void);
 intsysarch(int, void *);
 __END_DECLS
 #endif
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


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

2020-05-05 Thread Andriy Gapon
Author: avg
Date: Tue May  5 12:14:11 2020
New Revision: 360657
URL: https://svnweb.freebsd.org/changeset/base/360657

Log:
  acpi_video: try our best to work on systems without non-essential methods
  
  Only _BCL and _BCM methods seem to be essential to the driver's
  operation.  If _BQC is missing then we can assume that the current
  brightness is whatever we set by the last _BCM invocation.  If _DCS or
  _DGS is missing the we can make assumptions as well.
  
  The change is based on a patch suggested by Anthony Jenkins
   in PR 207086.
  
  PR:   207086
  Submitted by: Anthony Jenkins https://reviews.freebsd.org/D24653

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

Modified: head/sys/dev/acpica/acpi_video.c
==
--- head/sys/dev/acpica/acpi_video.cTue May  5 11:14:28 2020
(r360656)
+++ head/sys/dev/acpica/acpi_video.cTue May  5 12:14:11 2020
(r360657)
@@ -52,6 +52,8 @@ struct acpi_video_output {
int num;
STAILQ_ENTRY(acpi_video_output) next;
} vo_unit;
+   int vo_hasbqc;  /* Query method is present. */
+   int vo_level;   /* Cached level when !vo_hasbqc. */
int vo_brightness;
int vo_fullpower;
int vo_economy;
@@ -96,8 +98,8 @@ static void   vid_set_switch_policy(ACPI_HANDLE, UINT32)
 static int vid_enum_outputs(ACPI_HANDLE,
void(*)(ACPI_HANDLE, UINT32, void *), void *);
 static int vo_get_brightness_levels(ACPI_HANDLE, int **);
-static int vo_get_brightness(ACPI_HANDLE);
-static voidvo_set_brightness(ACPI_HANDLE, int);
+static int vo_get_brightness(struct acpi_video_output *);
+static voidvo_set_brightness(struct acpi_video_output *, int);
 static UINT32  vo_get_device_status(ACPI_HANDLE);
 static UINT32  vo_get_graphics_state(ACPI_HANDLE);
 static voidvo_set_device_state(ACPI_HANDLE, UINT32);
@@ -327,9 +329,9 @@ acpi_video_resume(device_t dev)
if ((vo_get_device_status(vo->handle) & DCS_ACTIVE) == 0)
continue;
 
-   level = vo_get_brightness(vo->handle);
+   level = vo_get_brightness(vo);
if (level != -1)
-   vo_set_brightness(vo->handle, level);
+   vo_set_brightness(vo, level);
}
ACPI_SERIAL_END(video_output);
ACPI_SERIAL_END(video);
@@ -419,7 +421,7 @@ acpi_video_power_profile(void *context)
ACPI_SERIAL_BEGIN(video_output);
STAILQ_FOREACH(vo, >vid_outputs, vo_next) {
if (vo->vo_levels != NULL && vo->vo_brightness == -1)
-   vo_set_brightness(vo->handle,
+   vo_set_brightness(vo,
state == POWER_PROFILE_ECONOMY ?
vo->vo_economy : vo->vo_fullpower);
}
@@ -518,6 +520,8 @@ acpi_video_vo_init(UINT32 adr)
vo->handle = NULL;
vo->adr = adr;
vo->vo_unit.num = n;
+   vo->vo_hasbqc = -1;
+   vo->vo_level = -1;
vo->vo_brightness = -1;
vo->vo_fullpower = -1;  /* TODO: override with tunables */
vo->vo_economy = -1;
@@ -698,7 +702,7 @@ acpi_video_vo_notify_handler(ACPI_HANDLE handle, UINT3
case VID_NOTIFY_ZERO_BRN:
if (vo->vo_levels == NULL)
goto out;
-   level = vo_get_brightness(handle);
+   level = vo_get_brightness(vo);
if (level < 0)
goto out;
break;
@@ -742,7 +746,7 @@ acpi_video_vo_notify_handler(ACPI_HANDLE handle, UINT3
break;
}
if (new_level != level) {
-   vo_set_brightness(handle, new_level);
+   vo_set_brightness(vo, new_level);
vo->vo_brightness = new_level;
}
 
@@ -807,7 +811,7 @@ acpi_video_vo_bright_sysctl(SYSCTL_HANDLER_ARGS)
if (level != -1 && (err = acpi_video_vo_check_level(vo, level)))
goto out;
vo->vo_brightness = level;
-   vo_set_brightness(vo->handle, (level == -1) ? preset : level);
+   vo_set_brightness(vo, (level == -1) ? preset : level);
 
 out:
ACPI_SERIAL_END(video_output);
@@ -848,7 +852,7 @@ acpi_video_vo_presets_sysctl(SYSCTL_HANDLER_ARGS)
goto out;
 
if (vo->vo_brightness == -1 && (power_profile_get_state() == arg2))
-   vo_set_brightness(vo->handle, level);
+   vo_set_brightness(vo, level);
*preset = level;
 
 out:
@@ -1018,15 +1022,39 @@ out:
 }
 
 static int
-vo_get_brightness(ACPI_HANDLE handle)
+vo_get_bqc(struct acpi_video_output *vo, UINT32 *level)
 {
+   ACPI_STATUS status;
+
+   switch (vo->vo_hasbqc) {
+   case 1:
+   case -1:
+   status = 

svn commit: r360656 - stable/11/sys/conf

2020-05-05 Thread Dimitry Andric
Author: dim
Date: Tue May  5 11:14:28 2020
New Revision: 360656
URL: https://svnweb.freebsd.org/changeset/base/360656

Log:
  MFC r316513 (by jhb):
  
  Sync SYSTEM_LD in Makefile.arm with kern.pre.mk.
  
  - Add --no-warn-mismatch.
  - Use same whitespace to make future updates simpler.
  
  Reviewed by:  imp (part of a larger change)
  Sponsored by: DARPA / AFRL
  Differential Revision:https://reviews.freebsd.org/D10085
  
  MFC r316514 (by jhb):
  
  Always pass the linker emulation via -m when linking modules and kernels.
  
  Previously the linker emulation was only passed when building binary
  objects for firmware modules.  This change always passes the desired
  output format for kernel modules and kernels rather than requiring the
  toolchain's default output format to match the desired output format.
  This in turn permits use of external toolchains whose default output
  format does not match the desired output format.
  
  Reviewed by:  imp, emaste
  Sponsored by: DARPA / AFRL
  Differential Revision:https://reviews.freebsd.org/D10085
  
  MFC r320179 (by emaste):
  
  add -znotext to kernel module link invocation
  
  ARM kernel modules require .text relocations (DT_TEXTREL) in shared
  object ouptut, which is not allowed by default by lld.  Add the -znotext
  option to enable this.  For simplicity add it unconditionally: it is
  already default and thus either redundant (GNU BFD ld and gold from
  ports) or ignored as an unknown option (GNU BFD ld 2.17.50 in the base
  system).
  
  Reviewed by:  kib
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D11250

Modified:
  stable/11/sys/conf/Makefile.arm
  stable/11/sys/conf/kern.mk
  stable/11/sys/conf/kern.pre.mk
  stable/11/sys/conf/kmod.mk
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/conf/Makefile.arm
==
--- stable/11/sys/conf/Makefile.arm Tue May  5 10:01:10 2020
(r360655)
+++ stable/11/sys/conf/Makefile.arm Tue May  5 11:14:28 2020
(r360656)
@@ -61,9 +61,10 @@ KERNVIRTADDR= 0xc000
 # hack because genassym.c includes sys/bus.h which includes these.
 genassym.o: bus_if.h device_if.h
 
-SYSTEM_LD_ = ${LD} -Bdynamic -T ldscript.$M.noheader ${_LDFLAGS} \
- -warn-common -export-dynamic -dynamic-linker /red/herring -o \
-  ${FULLKERNEL}.noheader -X ${SYSTEM_OBJS} vers.o
+SYSTEM_LD_ = ${LD} -m ${LD_EMULATION} -Bdynamic -T ldscript.$M.noheader \
+   ${_LDFLAGS} --no-warn-mismatch --warn-common --export-dynamic \
+   --dynamic-linker /red/herring \
+   -o ${FULLKERNEL}.noheader -X ${SYSTEM_OBJS} vers.o
 SYSTEM_LD_TAIL +=;sed s/" + SIZEOF_HEADERS"// ldscript.$M\
>ldscript.$M.noheader; \
${SYSTEM_LD_}; \

Modified: stable/11/sys/conf/kern.mk
==
--- stable/11/sys/conf/kern.mk  Tue May  5 10:01:10 2020(r360655)
+++ stable/11/sys/conf/kern.mk  Tue May  5 11:14:28 2020(r360656)
@@ -256,8 +256,7 @@ CFLAGS+=-std=iso9899:1999
 CFLAGS+=-std=${CSTD}
 .endif # CSTD
 
-# Set target-specific linker emulation name. Used by ld -b binary to convert
-# binary files into ELF objects.
+# Set target-specific linker emulation name.
 LD_EMULATION_aarch64=aarch64elf
 LD_EMULATION_amd64=elf_x86_64_fbsd
 LD_EMULATION_arm=armelf_fbsd

Modified: stable/11/sys/conf/kern.pre.mk
==
--- stable/11/sys/conf/kern.pre.mk  Tue May  5 10:01:10 2020
(r360655)
+++ stable/11/sys/conf/kern.pre.mk  Tue May  5 11:14:28 2020
(r360656)
@@ -206,8 +206,9 @@ MD_ROOT_SIZE_CONFIGURED!=   grep MD_ROOT_SIZE opt_md.h |
 SYSTEM_OBJS+= embedfs_${MFS_IMAGE:T:R}.o
 .endif
 .endif
-SYSTEM_LD= @${LD} -Bdynamic -T ${LDSCRIPT} ${_LDFLAGS} --no-warn-mismatch \
-   --warn-common --export-dynamic --dynamic-linker /red/herring \
+SYSTEM_LD= @${LD} -m ${LD_EMULATION} -Bdynamic -T ${LDSCRIPT} ${_LDFLAGS} \
+   --no-warn-mismatch --warn-common --export-dynamic \
+   --dynamic-linker /red/herring \
-o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
 SYSTEM_LD_TAIL= @${OBJCOPY} --strip-symbol gcc2_compiled. ${.TARGET} ; \
${SIZE} ${.TARGET} ; chmod 755 ${.TARGET}

Modified: stable/11/sys/conf/kmod.mk
==
--- stable/11/sys/conf/kmod.mk  Tue May  5 10:01:10 2020(r360655)
+++ stable/11/sys/conf/kmod.mk  Tue May  5 11:14:28 2020(r360656)
@@ -228,7 +228,8 @@ ${PROG}.debug: ${FULLPROG}
 
 .if ${__KLD_SHARED} == yes
 ${FULLPROG}: ${KMOD}.kld
-   ${LD} -Bshareable ${_LDFLAGS} -o ${.TARGET} ${KMOD}.kld
+   ${LD} -m ${LD_EMULATION} -Bshareable -znotext ${_LDFLAGS} \
+   -o ${.TARGET} ${KMOD}.kld
 .if !defined(DEBUG_FLAGS)
${OBJCOPY} 

svn commit: r360655 - head/stand/efi/boot1

2020-05-05 Thread Andrew Turner
Author: andrew
Date: Tue May  5 10:01:10 2020
New Revision: 360655
URL: https://svnweb.freebsd.org/changeset/base/360655

Log:
  Fix the EFI_DEBUG case, prio_str is only used when EFI_DEBUG is unset.
  
  Sponsored by: Innovate UK

Modified:
  head/stand/efi/boot1/proto.c

Modified: head/stand/efi/boot1/proto.c
==
--- head/stand/efi/boot1/proto.cTue May  5 09:42:26 2020
(r360654)
+++ head/stand/efi/boot1/proto.cTue May  5 10:01:10 2020
(r360655)
@@ -38,12 +38,14 @@ __FBSDID("$FreeBSD$");
 static EFI_GUID BlockIoProtocolGUID = BLOCK_IO_PROTOCOL;
 static EFI_GUID DevicePathGUID = DEVICE_PATH_PROTOCOL;
 
+#ifndef EFI_DEBUG
 static const char *prio_str[] = {
"error",
"not supported",
"good",
"better"
 };
+#endif
 
 /*
  * probe_handle determines if the passed handle represents a logical partition
___
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: r360654 - head/stand/efi/boot1

2020-05-05 Thread Andrew Turner
Author: andrew
Date: Tue May  5 09:42:26 2020
New Revision: 360654
URL: https://svnweb.freebsd.org/changeset/base/360654

Log:
  As with r352446 align blocks in boot1.efi
  
  We need to ensure the buffers are aligned before passing them to ReadBlocks.
  Assume 512 bytes is enough for now.
  
  Reviewed by:  imp
  MFC after:1 month
  Sponsored by: Innovate UK

Modified:
  head/stand/efi/boot1/ufs_module.c

Modified: head/stand/efi/boot1/ufs_module.c
==
--- head/stand/efi/boot1/ufs_module.c   Tue May  5 04:42:47 2020
(r360653)
+++ head/stand/efi/boot1/ufs_module.c   Tue May  5 09:42:26 2020
(r360654)
@@ -73,12 +73,12 @@ dskread(void *buf, uint64_t lba, int nblk)
 
 #include "ufsread.c"
 
-static struct dmadat __dmadat;
+static struct dmadat __dmadat __aligned(512);
+static char ufs_buffer[BSD_LABEL_BUFFER] __aligned(512);
 
 static int
 init_dev(dev_info_t* dev)
 {
-   char buffer[BSD_LABEL_BUFFER];
struct disklabel *dl;
uint64_t bs;
int ok;
@@ -109,14 +109,14 @@ init_dev(dev_info_t* dev)
 * will retry fsread(0) only if there's a label found with a non-zero
 * offset.
 */
-   if (dskread(buffer, 0, BSD_LABEL_BUFFER / DEV_BSIZE) != 0)
+   if (dskread(ufs_buffer, 0, BSD_LABEL_BUFFER / DEV_BSIZE) != 0)
return (-1);
dl = NULL;
bs = devinfo->dev->Media->BlockSize;
if (bs != 0 && bs <= BSD_LABEL_BUFFER / 2)
-   dl = (struct disklabel *)[bs];
+   dl = (struct disklabel *)_buffer[bs];
if (dl == NULL || dl->d_magic != BSD_MAGIC || dl->d_magic2 != BSD_MAGIC)
-   dl = (struct disklabel *)[BSD_LABEL_OFFSET];
+   dl = (struct disklabel *)_buffer[BSD_LABEL_OFFSET];
if (dl->d_magic != BSD_MAGIC || dl->d_magic2 != BSD_MAGIC ||
dl->d_partitions[0].p_offset == 0)
return (-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"