svn commit: r319996 - head/share/mk

2017-06-15 Thread Bryan Drewery
Author: bdrewery
Date: Fri Jun 16 04:28:10 2017
New Revision: 319996
URL: https://svnweb.freebsd.org/changeset/base/319996

Log:
  WITH_META_MODE: Don't try showing command if .ERROR_META_FILE is empty.
  
  This was sed'ing on stdin for failing .PHONY targets.
  
  Reported by:  Mark Millard
  X-MFC-With:   r319862
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/share/mk/local.sys.mk

Modified: head/share/mk/local.sys.mk
==
--- head/share/mk/local.sys.mk  Fri Jun 16 01:26:01 2017(r319995)
+++ head/share/mk/local.sys.mk  Fri Jun 16 04:28:10 2017(r319996)
@@ -13,7 +13,8 @@ MAKE_PRINT_VAR_ON_ERROR += \
.MAKE.MODE
 .endif
 
-_ERROR_CMD=${sed -n '/^CMD/s,^CMD ,,p' ${.ERROR_META_FILE}:L:sh}
+_ERROR_CMD_EXEC=   ${sed -n '/^CMD/s,^CMD ,,p' ${.ERROR_META_FILE}:L:sh}
+_ERROR_CMD=${!empty(.ERROR_META_FILE):?${_ERROR_CMD_EXEC}:.PHONY}
 MAKE_PRINT_VAR_ON_ERROR+= \
_ERROR_CMD \
.CURDIR \
___
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: r319995 - head/usr.sbin/bhyve

2017-06-15 Thread Marcelo Araujo
Author: araujo
Date: Fri Jun 16 01:26:01 2017
New Revision: 319995
URL: https://svnweb.freebsd.org/changeset/base/319995

Log:
  Check if pthread_create(3) successfully created the thread prior to call
  pthread_join(3). The variable tid is not yet initialized in case
  the authentication fails at early stage, that would lead pthread_join be
  called with an uninitialized variable.
  
  CID:  1375950
  Reported by:  Coverity, cem
  Reviewed by:  cem
  MFC after:3 weeks.
  Sponsored by: iXsystems, Inc.
  Differential Revision:https://reviews.freebsd.org/D11150

Modified:
  head/usr.sbin/bhyve/rfb.c

Modified: head/usr.sbin/bhyve/rfb.c
==
--- head/usr.sbin/bhyve/rfb.c   Fri Jun 16 00:44:23 2017(r319994)
+++ head/usr.sbin/bhyve/rfb.c   Fri Jun 16 01:26:01 2017(r319995)
@@ -769,6 +769,7 @@ rfb_handle(struct rfb_softc *rc, int cfd)
pthread_t tid;
uint32_t sres = 0;
int len;
+   int perror = 1;
 
rc->cfd = cfd;
 
@@ -878,8 +879,9 @@ rfb_handle(struct rfb_softc *rc, int cfd)
 
rfb_send_screen(rc, cfd, 1);
 
-   pthread_create(, NULL, rfb_wr_thr, rc);
-   pthread_set_name_np(tid, "rfbout");
+   perror = pthread_create(, NULL, rfb_wr_thr, rc);
+   if (perror == 0)
+   pthread_set_name_np(tid, "rfbout");
 
 /* Now read in client requests. 1st byte identifies type */
for (;;) {
@@ -915,7 +917,8 @@ rfb_handle(struct rfb_softc *rc, int cfd)
}
 done:
rc->cfd = -1;
-   pthread_join(tid, NULL);
+   if (perror == 0)
+   pthread_join(tid, NULL);
if (rc->enc_zlib_ok)
deflateEnd(>zstream);
 }
___
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: r319994 - head/sys/mips/conf

2017-06-15 Thread Adrian Chadd
Author: adrian
Date: Fri Jun 16 00:44:23 2017
New Revision: 319994
URL: https://svnweb.freebsd.org/changeset/base/319994

Log:
  [ar71xx] migrate all of the duplicate configuration out into a shared config 
file.
  
  This brings the default configurations (drivers, net80211 settings, etc) and 
some
  of the shared configuration into std.AR_MIPS_BASE.  I haven't yet moved the
  -current settings (witness, memguard, etc) into it.
  
  This should simplify building a lot of the same test images for my MIPS AP 
board
  development and testing.
  
  This is a work in progress; it's not designed to be perfect!

Added:
  head/sys/mips/conf/std.AR_MIPS_BASE   (contents, props changed)
Modified:
  head/sys/mips/conf/AP135
  head/sys/mips/conf/AR71XX_BASE
  head/sys/mips/conf/QCA953X_BASE
  head/sys/mips/conf/std.AR724X
  head/sys/mips/conf/std.AR91XX
  head/sys/mips/conf/std.AR933X
  head/sys/mips/conf/std.AR934X
  head/sys/mips/conf/std.QCA955X

Modified: head/sys/mips/conf/AP135
==
--- head/sys/mips/conf/AP135Fri Jun 16 00:00:01 2017(r319993)
+++ head/sys/mips/conf/AP135Fri Jun 16 00:44:23 2017(r319994)
@@ -58,13 +58,9 @@ device  geom_map
 device pci
 device qca955x_pci
 
-device ath_pci
-optionsAR71XX_ATH_EEPROM
 device firmware# Used by the above
+optionsAR71XX_ATH_EEPROM
 optionsATH_EEPROM_FIRMWARE
 
 # Boot off of the rootfs, as defined in the geom_map setup.
 optionsROOTDEVNAME=\"ufs:map/rootfs.uzip\"
-
-# Default to accept
-optionsIPFIREWALL_DEFAULT_TO_ACCEPT

Modified: head/sys/mips/conf/AR71XX_BASE
==
--- head/sys/mips/conf/AR71XX_BASE  Fri Jun 16 00:00:01 2017
(r319993)
+++ head/sys/mips/conf/AR71XX_BASE  Fri Jun 16 00:44:23 2017
(r319994)
@@ -22,13 +22,6 @@ hints"AR71XX_BASE.hints"
 
 makeoptionsDEBUG=-g#Build kernel with gdb(1) debug symbols
 
-# Build these as modules so small platform builds will have the
-# modules already built.
-makeoptionsMODULES_OVERRIDE="gpio ar71xx if_gif if_gre if_bridge bridgestp 
usb wlan wlan_xauth wlan_acl wlan_wep wlan_tkip wlan_ccmp wlan_rssadapt 
wlan_amrr ath ath_pci"
-
-# For small memory footprints
-options VM_KMEM_SIZE_SCALE=1
-
 optionsDDB
 optionsKDB
 
@@ -57,75 +50,19 @@ options FFS #Berkeley Fast
 # options UFS_DIRHASH #Improve performance on big 
directories
 # options  MSDOSFS # Read MSDOS filesystems; useful for 
USB/CF
 
+include"std.AR_MIPS_BASE"
+makeoptionsMODULES_OVERRIDE+="hwpmc_mips24k"
+
 device pci
 device ar71xx_pci
 
-# 802.11 framework
-optionsIEEE80211_DEBUG
-optionsIEEE80211_ALQ
-optionsIEEE80211_SUPPORT_MESH
-optionsIEEE80211_SUPPORT_TDMA
-optionsIEEE80211_AMPDU_AGE
-device wlan# 802.11 support
-device wlan_wep# 802.11 WEP support
-device wlan_ccmp   # 802.11 CCMP support
-device wlan_tkip   # 802.11 TKIP support
-device wlan_xauth  # 802.11 hostap support
-
-# Atheros wireless NICs
-device ath # Atheros interface support
-device ath_pci # Atheros PCI/Cardbus bus
-optionsATH_DEBUG
-optionsATH_DIAGAPI
-optionsATH_ENABLE_11N
-optionsAH_DEBUG
-optionsAH_DEBUG_ALQ
-optionsALQ
-device ath_hal
-option AH_SUPPORT_AR5416
-device ath_rate_sample
-option AH_RXCFG_SDMAMW_4BYTES
-option AH_AR5416_INTERRUPT_MITIGATION
-# There's no DFS radar detection support yet so this won't actually
-# detect radars.  It however does enable the rest of the channel change
-# machinery so DFS can be debugged.
-option ATH_ENABLE_DFS
-
-device mii
-device arge
-
 device usb
-optionsUSB_EHCI_BIG_ENDIAN_DESC# handle big-endian byte order
-optionsUSB_DEBUG
-optionsUSB_HOST_ALIGN=32   # AR71XX (MIPS in general?) 
requires this
 device ehci
 
 device scbus
 device umass
 device da
 
-# On-board SPI flash
-device spibus
-device ar71xx_spi
-device mx25l
 device ar71xx_wdog
-
-device uart
 device uart_ar71xx
-
 device ar71xx_apb
-
-device loop
-device ether
-device md
-device bpf
-device random
-device if_bridge
-device gif # ip[46] in ip[46] tunneling protocol
-device gre # generic encapsulation - only for IPv4 in IPv4 
though atm
-
-optionsARGE_DEBUG  # Enable if_arge debugging for now
-
-# Enable GPIO
-device gpio
-device 

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

2017-06-15 Thread Glen Barber
Author: gjb
Date: Fri Jun 16 00:00:01 2017
New Revision: 319993
URL: https://svnweb.freebsd.org/changeset/base/319993

Log:
  Update stable/11 to BETA2 as part of the 11.1-RELEASE cycle.
  
  Approved by:  re (implicit)
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/11/sys/conf/newvers.sh

Modified: stable/11/sys/conf/newvers.sh
==
--- stable/11/sys/conf/newvers.sh   Thu Jun 15 23:14:04 2017
(r319992)
+++ stable/11/sys/conf/newvers.sh   Fri Jun 16 00:00:01 2017
(r319993)
@@ -44,7 +44,7 @@
 
 TYPE="FreeBSD"
 REVISION="11.1"
-BRANCH="BETA1"
+BRANCH="BETA2"
 if [ -n "${BRANCH_OVERRIDE}" ]; then
BRANCH=${BRANCH_OVERRIDE}
 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: r319992 - stable/10/contrib/smbfs/lib/smb

2017-06-15 Thread Josh Paetzel
Author: jpaetzel
Date: Thu Jun 15 23:14:04 2017
New Revision: 319992
URL: https://svnweb.freebsd.org/changeset/base/319992

Log:
  MFC 319670
  
  Fix SMBFS when saved passwords are greater than 18 characters
  
  PR:   132302
  Submitted by: dhorn2...@gmail.com g...@unixarea.de

Modified:
  stable/10/contrib/smbfs/lib/smb/subr.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/smbfs/lib/smb/subr.c
==
--- stable/10/contrib/smbfs/lib/smb/subr.c  Thu Jun 15 21:34:43 2017
(r319991)
+++ stable/10/contrib/smbfs/lib/smb/subr.c  Thu Jun 15 23:14:04 2017
(r319992)
@@ -232,6 +232,8 @@ smb_simplecrypt(char *dst, const char *src)
  islower(ch) ? ('a' + (ch - 'a' + 13) % 26) : ch);
ch ^= pos;
pos += 13;
+   if (pos > 256)
+   pos -= 256;
sprintf(dst, "%02x", ch);
dst += 2;
}
@@ -262,6 +264,8 @@ smb_simpledecrypt(char *dst, const char *src)
return EINVAL;
ch ^= pos;
pos += 13;
+   if (pos > 256)
+   pos -= 256;
if (isascii(ch))
ch = (isupper(ch) ? ('A' + (ch - 'A' + 13) % 26) :
  islower(ch) ? ('a' + (ch - 'a' + 13) % 26) : ch);
___
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: r319991 - head/share/man/man9

2017-06-15 Thread Eric van Gyzen
Author: vangyzen
Date: Thu Jun 15 21:34:43 2017
New Revision: 319991
URL: https://svnweb.freebsd.org/changeset/base/319991

Log:
  copy(9): clarify that copystr() does not return EFAULT
  
  The previous wording implied that copystr() could return EFAULT.
  
  MFC after:6 weeks
  Sponsored by: Dell EMC

Modified:
  head/share/man/man9/copy.9

Modified: head/share/man/man9/copy.9
==
--- head/share/man/man9/copy.9  Thu Jun 15 21:14:48 2017(r319990)
+++ head/share/man/man9/copy.9  Thu Jun 15 21:34:43 2017(r319991)
@@ -34,7 +34,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd July 9, 2011
+.Dd June 15, 2017
 .Dt COPY 9
 .Os
 .Sh NAME
@@ -147,16 +147,20 @@ is
 .Sh RETURN VALUES
 The
 .Nm
-functions return 0 on success or
+functions return 0 on success.
+All but
+.Fn copystr
+return
 .Er EFAULT
 if a bad address is encountered.
-In addition, the
+The
 .Fn copyin_nofault
 and
 .Fn copyout_nofault
 functions return
 .Er EFAULT
-if a page fault occurs, and the
+if a page fault occurs.
+The
 .Fn copystr
 and
 .Fn copyinstr
___
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: r319990 - head/sys/dev/bnxt

2017-06-15 Thread Sean Bruno
Author: sbruno
Date: Thu Jun 15 21:14:48 2017
New Revision: 319990
URL: https://svnweb.freebsd.org/changeset/base/319990

Log:
  bnxt(4):  Implement temporary workaround in driver to report supported media
  types that are currently unavailable from the firmware.  e.g. 10G, 25G, 50G
  & 100G
  
  Submitted by: bhargava.marre...@broadcom.com
  Reviewed by:  venkatkumar.duvv...@broadcom.com
  Differential Revision:https://reviews.freebsd.org/D10816

Modified:
  head/sys/dev/bnxt/if_bnxt.c

Modified: head/sys/dev/bnxt/if_bnxt.c
==
--- head/sys/dev/bnxt/if_bnxt.c Thu Jun 15 21:06:03 2017(r319989)
+++ head/sys/dev/bnxt/if_bnxt.c Thu Jun 15 21:14:48 2017(r319990)
@@ -287,7 +287,7 @@ static driver_t bnxt_iflib_driver = {
  * iflib shared context
  */
 
-#define BNXT_DRIVER_VERSION"1.0.0.0"
+#define BNXT_DRIVER_VERSION"1.0.0.1"
 char bnxt_driver_version[] = BNXT_DRIVER_VERSION;
 extern struct if_txrx bnxt_txrx;
 static struct if_shared_ctx bnxt_sctx_init = {
@@ -1158,7 +1158,12 @@ bnxt_media_status(if_ctx_t ctx, struct ifmediareq * if
ifmr->ifm_active |= IFM_1000_SGMII;
break;
default:
-   ifmr->ifm_active |= IFM_UNKNOWN;
+/*
+ * Workaround: 
+ *Don't return IFM_UNKNOWN until 
+ *Stratus return proper media_type 
+ */  
+   ifmr->ifm_active |= IFM_1000_KX;
break;
}
break;
@@ -1198,7 +1203,12 @@ bnxt_media_status(if_ctx_t ctx, struct ifmediareq * if
ifmr->ifm_active |= IFM_10G_T;
break;
default:
-   ifmr->ifm_active |= IFM_UNKNOWN;
+/*
+ * Workaround: 
+ *Don't return IFM_UNKNOWN until 
+ *Stratus return proper media_type 
+ */  
+   ifmr->ifm_active |= IFM_10G_CR1;
break;
}
break;
@@ -1219,7 +1229,12 @@ bnxt_media_status(if_ctx_t ctx, struct ifmediareq * if
ifmr->ifm_active |= IFM_25G_SR;
break;
default:
-   ifmr->ifm_active |= IFM_UNKNOWN;
+/*
+ * Workaround: 
+ *Don't return IFM_UNKNOWN until 
+ *Stratus return proper media_type 
+ */  
+   ifmr->ifm_active |= IFM_25G_CR;
break;
}
break;
@@ -1255,7 +1270,12 @@ bnxt_media_status(if_ctx_t ctx, struct ifmediareq * if
ifmr->ifm_active |= IFM_50G_KR2;
break;
default:
-   ifmr->ifm_active |= IFM_UNKNOWN;
+/*
+ * Workaround: 
+ *Don't return IFM_UNKNOWN until 
+ *Stratus return proper media_type 
+ */  
+   ifmr->ifm_active |= IFM_50G_CR2;
break;
}
break;
@@ -1276,7 +1296,12 @@ bnxt_media_status(if_ctx_t ctx, struct ifmediareq * if
ifmr->ifm_active |= IFM_100G_SR4;
break;
default:
-   ifmr->ifm_active |= IFM_UNKNOWN;
+/*
+ * Workaround: 
+ *Don't return IFM_UNKNOWN until 
+ *Stratus return proper media_type 
+ */  
+   ifmr->ifm_active |= IFM_100G_CR4;
break;
}
default:
@@ -2031,9 +2056,6 @@ bnxt_add_media_types(struct bnxt_softc *softc)
ifmedia_add(softc->media, IFM_ETHER | IFM_10G_CR1, 0,
NULL);
break;
-   case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_UNKNOWN:
-   /* Auto only */
-   break;
case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKR4:
case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKR2:
case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKR:
@@ -2114,6 +2136,32 @@ bnxt_add_media_types(struct bnxt_softc *softc)
if (supported & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_1GB)
ifmedia_add(softc->media, IFM_ETHER | IFM_1000_SGMII, 0,
NULL);
+   break;
+   case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_UNKNOWN:
+default:
+/*
+ * Workaround for Cumulus & 

svn commit: r319989 - in head/sys: dev/bnxt net

2017-06-15 Thread Sean Bruno
Author: sbruno
Date: Thu Jun 15 21:06:03 2017
New Revision: 319989
URL: https://svnweb.freebsd.org/changeset/base/319989

Log:
  bnxt(4) Enable LRO support
  
  iflib - Handle out of order packet delivery from hardware in support of LRO
  
  Out of order updates to rxd's is fixed in r315217. However, it is not
  completely fixed.  While refilling the buffers, iflib is not considering
  the out of order descriptors. Hence, it is refilling sequentially.
  "idx" variable in _iflib_fl_refill routine is incremented sequentially.
  By doing refilling sequentially, it will override the SGEs that
  are *IN USE* by other connections.  Fix is to maintain a bitmap of
  rx descriptors and differentiate the used one with unused one and
  refill only at the unused indices.  This patch also fixes a
  few bugs in bnxt, related to the same feature.
  
  Submitted by: bhargava.marre...@broadcom.com
  Reviewed by:  shurd@
  Differential Revision:https://reviews.freebsd.org/D10681

Modified:
  head/sys/dev/bnxt/bnxt.h
  head/sys/dev/bnxt/bnxt_hwrm.c
  head/sys/dev/bnxt/bnxt_txrx.c
  head/sys/dev/bnxt/if_bnxt.c
  head/sys/net/iflib.c

Modified: head/sys/dev/bnxt/bnxt.h
==
--- head/sys/dev/bnxt/bnxt.hThu Jun 15 20:11:29 2017(r319988)
+++ head/sys/dev/bnxt/bnxt.hThu Jun 15 21:06:03 2017(r319989)
@@ -438,6 +438,7 @@ struct bnxt_ring {
uint32_tring_size;  /* Must be a power of two */
uint16_tid; /* Logical ID */
uint16_tphys_id;
+   struct bnxt_full_tpa_start *tpa_start;
 };
 
 struct bnxt_cp_ring {
@@ -564,7 +565,6 @@ struct bnxt_softc {
struct sysctl_ctx_list  hw_stats;
struct sysctl_oid   *hw_stats_oid;
 
-   struct bnxt_full_tpa_start *tpa_start;
struct bnxt_ver_info*ver_info;
struct bnxt_nvram_info  *nvm_info;
bool wol;

Modified: head/sys/dev/bnxt/bnxt_hwrm.c
==
--- head/sys/dev/bnxt/bnxt_hwrm.c   Thu Jun 15 20:11:29 2017
(r319988)
+++ head/sys/dev/bnxt/bnxt_hwrm.c   Thu Jun 15 21:06:03 2017
(r319989)
@@ -935,7 +935,7 @@ bnxt_hwrm_vnic_tpa_cfg(struct bnxt_softc *softc, struc
/* TODO: Calculate this based on ring size? */
req.max_agg_segs = htole16(3);
/* Base this in the allocated TPA start size... */
-   req.max_aggs = htole16(2);
+   req.max_aggs = htole16(7);
/*
 * TODO: max_agg_timer?
 * req.mag_agg_timer = htole32(XXX);

Modified: head/sys/dev/bnxt/bnxt_txrx.c
==
--- head/sys/dev/bnxt/bnxt_txrx.c   Thu Jun 15 20:11:29 2017
(r319988)
+++ head/sys/dev/bnxt/bnxt_txrx.c   Thu Jun 15 21:06:03 2017
(r319989)
@@ -264,6 +264,7 @@ bnxt_isc_rxd_refill(void *sc, if_rxd_update_t iru)
uint8_t flid;
uint64_t *paddrs;
caddr_t *vaddrs;
+   qidx_t  *frag_idxs;
 
rxqid = iru->iru_qsidx;
count = iru->iru_count;
@@ -272,6 +273,7 @@ bnxt_isc_rxd_refill(void *sc, if_rxd_update_t iru)
flid = iru->iru_flidx;
vaddrs = iru->iru_vaddrs;
paddrs = iru->iru_paddrs;
+   frag_idxs = iru->iru_idxs;
 
if (flid == 0) {
rx_ring = >rx_rings[rxqid];
@@ -287,8 +289,8 @@ bnxt_isc_rxd_refill(void *sc, if_rxd_update_t iru)
rxbd[pidx].flags_type = htole16(type);
rxbd[pidx].len = htole16(len);
/* No need to byte-swap the opaque value */
-   rxbd[pidx].opaque = ((rxqid & 0xff) << 24) | (flid << 16)
-   | pidx;
+   rxbd[pidx].opaque = (((rxqid & 0xff) << 24) | (flid << 16)
+   | (frag_idxs[i]));
rxbd[pidx].addr = htole64(paddrs[i]);
if (++pidx == rx_ring->ring_size)
pidx = 0;
@@ -329,7 +331,6 @@ bnxt_isc_rxd_available(void *sc, uint16_t rxqid, qidx_
struct bnxt_softc *softc = (struct bnxt_softc *)sc;
struct bnxt_cp_ring *cpr = >rx_cp_rings[rxqid];
struct rx_pkt_cmpl *rcp;
-   struct rx_tpa_start_cmpl *rtpa;
struct rx_tpa_end_cmpl *rtpae;
struct cmpl_base *cmp = (struct cmpl_base *)cpr->ring.vaddr;
int avail = 0;
@@ -338,7 +339,6 @@ bnxt_isc_rxd_available(void *sc, uint16_t rxqid, qidx_
uint8_t ags;
int i;
uint16_t type;
-   uint8_t agg_id;
 
for (;;) {
NEXT_CP_CONS_V(>ring, cons, v_bit);
@@ -388,18 +388,11 @@ bnxt_isc_rxd_available(void *sc, uint16_t rxqid, qidx_
avail++;
break;
case CMPL_BASE_TYPE_RX_TPA_START:
-   rtpa = (void *)[cons];
-   agg_id = (rtpa->agg_id &
-   

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

2017-06-15 Thread Jason Evans
On Thu, 15 Jun 2017 08:04:57 -0700
Jason Evans  wrote:

> On Thu, 15 Jun 2017 10:31:57 +0200
> "O. Hartmann"  wrote:
> 
> > On Thu, 15 Jun 2017 07:15:06 + (UTC)
> > Jason Evans  wrote:
> > 
> > > Author: jasone
> > > Date: Thu Jun 15 07:15:05 2017
> > > New Revision: 319971
> > > URL: https://svnweb.freebsd.org/changeset/base/319971
> > > 
> > > Log:
> > >   Update jemalloc to 5.0.0.
> > 
> > On all hosts (running CURRENT:  FreeBSD 12.0-CURRENT #15 r319965: Thu Jun 15
> > 05:56:12 CEST 2017 amd64 AND FreeBSD 12.0-CURRENT #20 r319934: Wed Jun 14
> > 06:18:46 CEST 2017 amd64)
> > 
> > buildworld fails on
> > 
> > [...]
> > Building /usr/obj/usr/src/lib/libgcc_s/_libinstall
> > --- secure/lib/libcrypto__L ---
> > --- all_subdir_secure/lib/libcrypto/engines/libaep ---
> > /usr/obj/usr/src/tmp/usr/bin/ld: error: unable to find library -lgcc_s
> > /usr/obj/usr/src/tmp/usr/bin/ld: error: unable to find library -lgcc_s
> > cc: error: linker command failed with exit code 1 (use -v to see invocation)
> > *** [libaep.so] Error code 1
> > 
> > make[6]: stopped in /usr/src/secure/lib/libcrypto/engines/libaep
> > .ERROR_TARGET='libaep.so'
> 
> I tested this commit based on r319490.  I'm in the process of updating to 
> r319971, and will see if the issue reproduces.

I updated from r319490 (with jemalloc update integrated) to r319971, then 
rebuilt r319971 without issues.  Is it possible that the issue you hit isn't 
directly related to r319971?

Thanks,
Jason
___
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: r319988 - head/sys/kern

2017-06-15 Thread Gleb Smirnoff
Author: glebius
Date: Thu Jun 15 20:11:29 2017
New Revision: 319988
URL: https://svnweb.freebsd.org/changeset/base/319988

Log:
  Plug read(2) and write(2) on listening sockets.

Modified:
  head/sys/kern/uipc_socket.c

Modified: head/sys/kern/uipc_socket.c
==
--- head/sys/kern/uipc_socket.c Thu Jun 15 20:06:41 2017(r319987)
+++ head/sys/kern/uipc_socket.c Thu Jun 15 20:11:29 2017(r319988)
@@ -1613,8 +1613,14 @@ sosend(struct socket *so, struct sockaddr *addr, struc
int error;
 
CURVNET_SET(so->so_vnet);
-   error = so->so_proto->pr_usrreqs->pru_sosend(so, addr, uio, top,
-   control, flags, td);
+   if (!SOLISTENING(so))
+   error = so->so_proto->pr_usrreqs->pru_sosend(so, addr, uio,
+   top, control, flags, td);
+   else {
+   m_freem(top);
+   m_freem(control);
+   error = ENOTCONN;
+   }
CURVNET_RESTORE();
return (error);
 }
@@ -2544,8 +2550,11 @@ soreceive(struct socket *so, struct sockaddr **psa, st
int error;
 
CURVNET_SET(so->so_vnet);
-   error = (so->so_proto->pr_usrreqs->pru_soreceive(so, psa, uio, mp0,
-   controlp, flagsp));
+   if (!SOLISTENING(so))
+   error = (so->so_proto->pr_usrreqs->pru_soreceive(so, psa, uio,
+   mp0, controlp, flagsp));
+   else
+   error = ENOTCONN;
CURVNET_RESTORE();
return (error);
 }
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r319987 - head/etc

2017-06-15 Thread Stephen J. Kiernan
Author: stevek
Date: Thu Jun 15 20:06:41 2017
New Revision: 319987
URL: https://svnweb.freebsd.org/changeset/base/319987

Log:
  Replace md(4) usage in diskless(8) script rc.initdiskless with tmpfs(5).
  Need to multiply the size of the disk passed to mount_md by 512 as mdmfs
  expects number of 512-byte blocks while tmpfs size option wants number of
  bytes.
  
  Reviewed by:  brooks
  Approved by:  sjg (mentor)
  Obtained from:Juniper Networks, Inc.
  Differential Revision:https://reviews.freebsd.org/D11106

Modified:
  head/etc/rc.initdiskless

Modified: head/etc/rc.initdiskless
==
--- head/etc/rc.initdisklessThu Jun 15 19:56:59 2017(r319986)
+++ head/etc/rc.initdisklessThu Jun 15 20:06:41 2017(r319987)
@@ -195,10 +195,10 @@ handle_remount() { # $1 = mount point
 to_umount="$b ${to_umount}"
 }
 
-# Create a generic memory disk
+# Create a generic memory disk (using tmpfs)
 #
 mount_md() {
-/sbin/mdmfs -S -i 4096 -s $1 -M md $2
+mount -t tmpfs -o size=$(($1 * 512)) tmpfs $2
 }
 
 # Create the memory filesystem if it has not already been created
___
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: r319986 - head/sys/dev/cxgbe

2017-06-15 Thread Navdeep Parhar
Author: np
Date: Thu Jun 15 19:56:59 2017
New Revision: 319986
URL: https://svnweb.freebsd.org/changeset/base/319986

Log:
  cxgbe(4):  Fix per-queue netmap operation.
  
  Do not attempt to initialize netmap queues that are already initialized
  or aren't supposed to be initialized.  Similarly, do not free queues
  that are not initialized or aren't supposed to be freed.
  
  PR:   217156
  Sponsored by: Chelsio Communications

Modified:
  head/sys/dev/cxgbe/adapter.h
  head/sys/dev/cxgbe/t4_netmap.c
  head/sys/dev/cxgbe/t4_sge.c

Modified: head/sys/dev/cxgbe/adapter.h
==
--- head/sys/dev/cxgbe/adapter.hThu Jun 15 18:49:46 2017
(r319985)
+++ head/sys/dev/cxgbe/adapter.hThu Jun 15 19:56:59 2017
(r319986)
@@ -647,7 +647,7 @@ struct sge_wrq {
 
 } __aligned(CACHE_LINE_SIZE);
 
-
+#define INVALID_NM_RXQ_CNTXT_ID ((uint16_t)(-1))
 struct sge_nm_rxq {
struct vi_info *vi;
 
@@ -680,6 +680,7 @@ struct sge_nm_rxq {
bus_addr_t fl_ba;
 } __aligned(CACHE_LINE_SIZE);
 
+#define INVALID_NM_TXQ_CNTXT_ID ((u_int)(-1))
 struct sge_nm_txq {
struct tx_desc *desc;
uint16_t cidx;

Modified: head/sys/dev/cxgbe/t4_netmap.c
==
--- head/sys/dev/cxgbe/t4_netmap.c  Thu Jun 15 18:49:46 2017
(r319985)
+++ head/sys/dev/cxgbe/t4_netmap.c  Thu Jun 15 19:56:59 2017
(r319986)
@@ -224,6 +224,7 @@ free_nm_rxq_hwq(struct vi_info *vi, struct sge_nm_rxq 
if (rc != 0)
device_printf(sc->dev, "%s: failed for iq %d, fl %d: %d\n",
__func__, nm_rxq->iq_cntxt_id, nm_rxq->fl_cntxt_id, rc);
+   nm_rxq->iq_cntxt_id = INVALID_NM_RXQ_CNTXT_ID;
return (rc);
 }
 
@@ -310,6 +311,7 @@ free_nm_txq_hwq(struct vi_info *vi, struct sge_nm_txq 
if (rc != 0)
device_printf(sc->dev, "%s: failed for eq %d: %d\n", __func__,
nm_txq->cntxt_id, rc);
+   nm_txq->cntxt_id = INVALID_NM_TXQ_CNTXT_ID;
return (rc);
 }
 
@@ -318,6 +320,7 @@ cxgbe_netmap_on(struct adapter *sc, struct vi_info *vi
 struct netmap_adapter *na)
 {
struct netmap_slot *slot;
+   struct netmap_kring *kring;
struct sge_nm_rxq *nm_rxq;
struct sge_nm_txq *nm_txq;
int rc, i, j, hwidx;
@@ -347,6 +350,11 @@ cxgbe_netmap_on(struct adapter *sc, struct vi_info *vi
for_each_nm_rxq(vi, i, nm_rxq) {
struct irq *irq = >irq[vi->first_intr + i];
 
+   kring = >rx_rings[nm_rxq->nid];
+   if (!nm_kring_pending_on(kring) ||
+   nm_rxq->iq_cntxt_id != INVALID_NM_RXQ_CNTXT_ID)
+   continue;
+
alloc_nm_rxq_hwq(vi, nm_rxq, tnl_cong(vi->pi, nm_cong_drop));
nm_rxq->fl_hwidx = hwidx;
slot = netmap_reset(na, NR_RX, i, 0);
@@ -373,6 +381,11 @@ cxgbe_netmap_on(struct adapter *sc, struct vi_info *vi
}
 
for_each_nm_txq(vi, i, nm_txq) {
+   kring = >tx_rings[nm_txq->nid];
+   if (!nm_kring_pending_on(kring) ||
+   nm_txq->cntxt_id != INVALID_NM_TXQ_CNTXT_ID)
+   continue;
+
alloc_nm_txq_hwq(vi, nm_txq);
slot = netmap_reset(na, NR_TX, i, 0);
MPASS(slot != NULL);/* XXXNM: error check, not assert */
@@ -401,6 +414,7 @@ static int
 cxgbe_netmap_off(struct adapter *sc, struct vi_info *vi, struct ifnet *ifp,
 struct netmap_adapter *na)
 {
+   struct netmap_kring *kring;
int rc, i;
struct sge_nm_txq *nm_txq;
struct sge_nm_rxq *nm_rxq;
@@ -419,6 +433,11 @@ cxgbe_netmap_off(struct adapter *sc, struct vi_info *v
for_each_nm_txq(vi, i, nm_txq) {
struct sge_qstat *spg = (void *)_txq->desc[nm_txq->sidx];
 
+   kring = >tx_rings[nm_txq->nid];
+   if (!nm_kring_pending_off(kring) ||
+   nm_txq->cntxt_id == INVALID_NM_TXQ_CNTXT_ID)
+   continue;
+
/* Wait for hw pidx to catch up ... */
while (be16toh(nm_txq->pidx) != spg->pidx)
pause("nmpidx", 1);
@@ -431,6 +450,11 @@ cxgbe_netmap_off(struct adapter *sc, struct vi_info *v
}
for_each_nm_rxq(vi, i, nm_rxq) {
struct irq *irq = >irq[vi->first_intr + i];
+
+   kring = >rx_rings[nm_rxq->nid];
+   if (!nm_kring_pending_off(kring) ||
+   nm_rxq->iq_cntxt_id == INVALID_NM_RXQ_CNTXT_ID)
+   continue;
 
while (!atomic_cmpset_int(>nm_state, NM_ON, NM_OFF))
pause("nmst", 1);

Modified: head/sys/dev/cxgbe/t4_sge.c
==
--- head/sys/dev/cxgbe/t4_sge.c Thu Jun 15 18:49:46 2017(r319985)
+++ 

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

2017-06-15 Thread Alan Cox
Author: alc
Date: Thu Jun 15 18:49:46 2017
New Revision: 319985
URL: https://svnweb.freebsd.org/changeset/base/319985

Log:
  MFC r319540
The data type returned by vmoff() is too narrow in its range.  This could
break the transmission of files longer than 4 GB on 32-bit architectures.
  
  Approved by:  re (gjb)

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

Modified: stable/11/sys/kern/kern_sendfile.c
==
--- stable/11/sys/kern/kern_sendfile.c  Thu Jun 15 17:46:20 2017
(r319984)
+++ stable/11/sys/kern/kern_sendfile.c  Thu Jun 15 18:49:46 2017
(r319985)
@@ -207,12 +207,12 @@ xfsize(int i, int n, off_t off, off_t len)
 /*
  * Helper function to get offset within object for i page.
  */
-static inline vm_offset_t
+static inline vm_ooffset_t
 vmoff(int i, off_t off)
 {
 
if (i == 0)
-   return ((vm_offset_t)off);
+   return ((vm_ooffset_t)off);
 
return (trunc_page(off + i * PAGE_SIZE));
 }
___
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: r319897 - head/usr.bin/yes

2017-06-15 Thread Xin LI
Hi,

On Tue, Jun 13, 2017 at 5:35 AM, Pietro Cerutti  wrote:
[...]
> Modified: head/usr.bin/yes/yes.c
> ==
> --- head/usr.bin/yes/yes.c  Tue Jun 13 12:07:18 2017(r319896)
> +++ head/usr.bin/yes/yes.c  Tue Jun 13 12:35:01 2017(r319897)
> @@ -44,20 +44,42 @@ static const char rcsid[] = "$FreeBSD$";
>  int
>  main(int argc, char **argv)
>  {
[...]
> +   {
> +   exp = argv[1];
> +   explen = strlen(exp) + 1;
> +   exp[explen - 1] = '\n';
> +   }

I think this effectively replaces the terminating NUL character with
'\n', but in this context it seems to be Okay because later code is
treating argv[1] as a block of memory instead of NUL-termated string.

Could you please add comment here, so future readers would not have to
scratch their head and figure this out again and again?

By the way, in r319904, the following was introduced:

if (explen <= sizeof(buf)) {

Why do we bother to copy the buffer when the size is exactly the same
(and we could use it directly), in other words, why not explen <
sizeof(buf)?

Cheers,
___
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: r319921 - head/sys/net

2017-06-15 Thread Sean Bruno


On 06/15/17 04:22, Peter Holm wrote:
> On Wed, Jun 14, 2017 at 09:21:30AM -0600, Sean Bruno wrote:
>>
>>
>> On 06/14/17 08:46, Peter Holm wrote:
>>> On Wed, Jun 14, 2017 at 08:38:36AM -0600, Sean Bruno wrote:


 On 06/14/17 03:17, Peter Holm wrote:
> On Tue, Jun 13, 2017 at 11:16:39PM +, Sean Bruno wrote:
>> Author: sbruno
>> Date: Tue Jun 13 23:16:38 2017
>> New Revision: 319921
>> URL: https://svnweb.freebsd.org/changeset/base/319921
>>
>> Log:
>>   Add new sysctl to allow changing of timing of the txq timers.
>>   
>>   Add new sysctl to override use of busdma in the driver.
>>   
>>   Submitted by:  Drew Gallitin 
>>
>> Modified:
>>   head/sys/net/iflib.c
>>
>> Modified: head/sys/net/iflib.c
>> ==
>> --- head/sys/net/iflib.c Tue Jun 13 22:57:57 2017(r319920)
> 
> 
> I fried up some test hardware and have some more info for you.
> Here's a test triggered by a NFS test scenario:
> 
> https://people.freebsd.org/~pho/stress/log/sbruno002.txt
> 
> I have uploaded the kernel + core to:
> https://people.freebsd.org/~pho/kernel+vmcore.519-t2.txz
> 
> Regards,
> 
> - Peter
> 
> 

Thank you for these diagnostics.  I've reverted this change from head.

sean



signature.asc
Description: OpenPGP digital signature


svn commit: r319984 - head/sys/net

2017-06-15 Thread Sean Bruno
Author: sbruno
Date: Thu Jun 15 17:46:20 2017
New Revision: 319984
URL: https://svnweb.freebsd.org/changeset/base/319984

Log:
  Revert r319921 which seems to cause NFS booting assertion panics in
  various configurations.
  
  Reported by:  pho@

Modified:
  head/sys/net/iflib.c

Modified: head/sys/net/iflib.c
==
--- head/sys/net/iflib.cThu Jun 15 17:44:16 2017(r319983)
+++ head/sys/net/iflib.cThu Jun 15 17:46:20 2017(r319984)
@@ -520,17 +520,6 @@ rxd_info_zero(if_rxd_info_t ri)
 #define MAX_SINGLE_PACKET_FRACTION 12
 #define IF_BAD_DMA (bus_addr_t)-1
 
-static SYSCTL_NODE(_net, OID_AUTO, iflib, CTLFLAG_RD, 0,
-   "iflib driver parameters");
-
-static int iflib_timer_int;
-SYSCTL_INT(_net_iflib, OID_AUTO, timer_int, CTLFLAG_RW, _timer_int,
-0, "interval at which to run per-queue timers (in ticks)");
-
-static int force_busdma = 1;
-SYSCTL_INT(_net_iflib, OID_AUTO, force_busdma, CTLFLAG_RDTUN, _busdma,
-1, "force busdma");
-
 #define CTX_ACTIVE(ctx) ((if_getdrvflags((ctx)->ifc_ifp) & IFF_DRV_RUNNING))
 
 #define CTX_LOCK_INIT(_sc, _name)  mtx_init(&(_sc)->ifc_mtx, _name, "iflib ctx 
lock", MTX_DEF)
@@ -570,6 +559,9 @@ TASKQGROUP_DEFINE(if_config_tqg, 1, 1);
 #endif /* !INVARIANTS */
 #endif
 
+static SYSCTL_NODE(_net, OID_AUTO, iflib, CTLFLAG_RD, 0,
+   "iflib driver parameters");
+
 /*
  * XXX need to ensure that this can't accidentally cause the head to be moved 
backwards 
  */
@@ -1875,6 +1867,7 @@ _iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int coun
cb_arg.error = 0;
q = fl->ifl_rxq;
MPASS(sd_map != NULL);
+   MPASS(sd_map[idx] != NULL);
err = bus_dmamap_load(fl->ifl_desc_tag, sd_map[idx],
 cl, fl->ifl_buf_size, _rxq_refill_cb, _arg, 0);
bus_dmamap_sync(fl->ifl_desc_tag, sd_map[idx], 
BUS_DMASYNC_PREREAD);
@@ -2117,8 +2110,7 @@ iflib_timer(void *arg)
 
sctx->isc_pause_frames = 0;
if (if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_RUNNING) 
-   callout_reset_on(>ift_timer, iflib_timer_int, iflib_timer,
-   txq, txq->ift_timer.c_cpu);
+   callout_reset_on(>ift_timer, hz/2, iflib_timer, txq, 
txq->ift_timer.c_cpu);
return;
 hung:
CTX_LOCK(ctx);
@@ -2193,8 +2185,8 @@ iflib_init_locked(if_ctx_t ctx)
IFDI_INTR_ENABLE(ctx);
txq = ctx->ifc_txqs;
for (i = 0; i < sctx->isc_ntxqsets; i++, txq++)
-   callout_reset_on(>ift_timer, iflib_timer_int, iflib_timer,
-   txq, txq->ift_timer.c_cpu);
+   callout_reset_on(>ift_timer, hz/2, iflib_timer, txq,
+   txq->ift_timer.c_cpu);
 }
 
 static int
@@ -2905,7 +2897,7 @@ iflib_busdma_load_mbuf_sg(iflib_txq_t txq, bus_dma_tag
ifsd_m = txq->ift_sds.ifsd_m;
ntxd = txq->ift_size;
pidx = txq->ift_pidx;
-   if (force_busdma || map != NULL) {
+   if (map != NULL) {
uint8_t *ifsd_flags = txq->ift_sds.ifsd_flags;
 
err = bus_dmamap_load_mbuf_sg(tag, map,
@@ -3045,8 +3037,7 @@ iflib_encap(iflib_txq_t txq, struct mbuf **m_headp)
next = (cidx + CACHE_LINE_SIZE) & (ntxd-1);
prefetch(>ift_sds.ifsd_flags[next]);
}
-   } 
-   if (txq->ift_sds.ifsd_map != NULL)
+   } else if (txq->ift_sds.ifsd_map != NULL)
map = txq->ift_sds.ifsd_map[pidx];
 
if (m_head->m_pkthdr.csum_flags & CSUM_TSO) {
@@ -3542,8 +3533,7 @@ _task_fn_admin(void *context)
}
IFDI_UPDATE_ADMIN_STATUS(ctx);
for (txq = ctx->ifc_txqs, i = 0; i < sctx->isc_ntxqsets; i++, txq++)
-   callout_reset_on(>ift_timer, iflib_timer_int, iflib_timer,
-   txq, txq->ift_timer.c_cpu);
+   callout_reset_on(>ift_timer, hz/2, iflib_timer, txq, 
txq->ift_timer.c_cpu);
IFDI_LINK_INTR_ENABLE(ctx);
if (ctx->ifc_flags & IFC_DO_RESET) {
ctx->ifc_flags &= ~IFC_DO_RESET;
@@ -4097,8 +4087,6 @@ iflib_device_register(device_t dev, void *sc, if_share
/* set unconditionally for !x86 */
ctx->ifc_flags |= IFC_DMAR;
 #endif
-   if (force_busdma)
-   ctx->ifc_flags |= IFC_DMAR;
 
msix_bar = scctx->isc_msix_bar;
main_txq = (sctx->isc_flags & IFLIB_HAS_TXCQ) ? 1 : 0;
@@ -4421,9 +4409,6 @@ iflib_device_iov_add_vf(device_t dev, uint16_t vfnum, 
 static int
 iflib_module_init(void)
 {
-
-   iflib_timer_int = hz / 2;
-   TUNABLE_INT_FETCH("net.iflib.timer_int", _timer_int);
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 commit: r319983 - stable/11/usr.sbin/bsdinstall/scripts

2017-06-15 Thread Allan Jude
Author: allanjude
Date: Thu Jun 15 17:44:16 2017
New Revision: 319983
URL: https://svnweb.freebsd.org/changeset/base/319983

Log:
  MFC: r319863
bsdinstall: Make ZFS min_auto_ashift adjustment persistent
  
  MFC: r319864
bsdinstall: support Auto ZFS mode for ARM64
  
  Approved by:  re (gjb)

Modified:
  stable/11/usr.sbin/bsdinstall/scripts/auto
  stable/11/usr.sbin/bsdinstall/scripts/zfsboot
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.sbin/bsdinstall/scripts/auto
==
--- stable/11/usr.sbin/bsdinstall/scripts/auto  Thu Jun 15 17:43:40 2017
(r319982)
+++ stable/11/usr.sbin/bsdinstall/scripts/auto  Thu Jun 15 17:44:16 2017
(r319983)
@@ -260,7 +260,7 @@ Shell \"Open a shell and partition by hand\""
 
 CURARCH=$( uname -m )
 case $CURARCH in
-   amd64|i386) # Booting ZFS Supported
+   amd64|arm64|i386)   # Booting ZFS Supported
PMODES="$PMODES \"Auto (ZFS)\" \"Guided Root-on-ZFS\""
;;
*)  # Booting ZFS Unspported

Modified: stable/11/usr.sbin/bsdinstall/scripts/zfsboot
==
--- stable/11/usr.sbin/bsdinstall/scripts/zfsboot   Thu Jun 15 17:43:40 
2017(r319982)
+++ stable/11/usr.sbin/bsdinstall/scripts/zfsboot   Thu Jun 15 17:44:16 
2017(r319983)
@@ -1443,6 +1443,12 @@ zfs_create_boot()
 'kern.geom.label.gptid.enable=\"0\"' \
 $BSDINSTALL_TMPBOOT/loader.conf.zfs || return $FAILURE
 
+   if [ "$ZFSBOOT_FORCE_4K_SECTORS" ]; then
+   f_eval_catch $funcname echo "$ECHO_APPEND" \
+'vfs.zfs.min_auto_ashift=12' \
+$BSDINSTALL_TMPBOOT/loader.conf.zfs || return $FAILURE
+   fi
+
if [ "$ZFSBOOT_SWAP_MIRROR" ]; then
f_eval_catch $funcname echo "$ECHO_APPEND" \
 'geom_mirror_load=\"YES\"' \
___
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: r319982 - stable/11/usr.bin/top

2017-06-15 Thread Allan Jude
Author: allanjude
Date: Thu Jun 15 17:43:40 2017
New Revision: 319982
URL: https://svnweb.freebsd.org/changeset/base/319982

Log:
  MFC: r319866, r319867
top: Change the way the ZFS ARC compression ratio is calculated
remove overhead statistics, already included in other counters
  
  Approved by:  re (gjb)

Modified:
  stable/11/usr.bin/top/machine.c
  stable/11/usr.bin/top/top.local.1
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.bin/top/machine.c
==
--- stable/11/usr.bin/top/machine.c Thu Jun 15 17:06:04 2017
(r319981)
+++ stable/11/usr.bin/top/machine.c Thu Jun 15 17:43:40 2017
(r319982)
@@ -188,9 +188,9 @@ char *arcnames[] = {
NULL
 };
 
-int carc_stats[5];
+int carc_stats[4];
 char *carcnames[] = {
-   "K Compressed, ", "K Uncompressed, ", ":1 Ratio, ", "K Overhead",
+   "K Compressed, ", "K Uncompressed, ", ":1 Ratio, ",
NULL
 };
 
@@ -580,11 +580,9 @@ get_system_info(struct system_info *si)
if (carc_enabled) {
GETSYSCTL("kstat.zfs.misc.arcstats.compressed_size", arc_stat);
carc_stats[0] = arc_stat >> 10;
+   carc_stats[2] = arc_stat >> 10; /* For ratio */
GETSYSCTL("kstat.zfs.misc.arcstats.uncompressed_size", 
arc_stat);
carc_stats[1] = arc_stat >> 10;
-   carc_stats[2] = arc_stats[0]; /* ARC Total */
-   GETSYSCTL("kstat.zfs.misc.arcstats.overhead_size", arc_stat);
-   carc_stats[3] = arc_stat >> 10;
si->carc = carc_stats;
}
 

Modified: stable/11/usr.bin/top/top.local.1
==
--- stable/11/usr.bin/top/top.local.1   Thu Jun 15 17:06:04 2017
(r319981)
+++ stable/11/usr.bin/top/top.local.1   Thu Jun 15 17:43:40 2017
(r319982)
@@ -65,10 +65,7 @@ bytes of memory used by ARC caches
 bytes of data stored in ARC caches before compression
 .TP
 .B Ratio:
-ratio of uncompressed data to total ARC size
-.TP
-.B Overhead:
-amount of overhead from ARC compression
+compression ratio of data cached in the ARC
 .SS Swap Stats
 .TP
 .B Total:
___
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: r319981 - in stable/11/sys: kern sys vm

2017-06-15 Thread Alan Cox
Author: alc
Date: Thu Jun 15 17:06:04 2017
New Revision: 319981
URL: https://svnweb.freebsd.org/changeset/base/319981

Log:
  MFC r318995
In r118390, the swap pager's approach to striping swap allocation over
multiple devices was changed.  However, swapoff_one() was not fully and
correctly converted.  In particular, with r118390's introduction of a per-
device blist, the maximum swap block size, "dmmax", became irrelevant to
swapoff_one()'s operation.  Moreover, swapoff_one() was performing out-of-
range operations on the per-device blist that were silently ignored by
blist_fill().
  
This change corrects both of these problems with swapoff_one(), which will
allow us to potentially increase MAX_PAGEOUT_CLUSTER.  Previously,
swapoff_one() would panic inside of blist_fill() if you increased
MAX_PAGEOUT_CLUSTER.
  
  MFC r319001
After r118390, the variable "dmmax" was neither the correct strip size
nor the correct maximum block size.  Moreover, after r318995, it serves
no purpose except to provide information to user space through a read-
sysctl.
  
This change eliminates the variable "dmmax" but retains the sysctl.  It
also corrects the value returned by the sysctl.
  
  MFC r319604
Halve the memory being internally allocated by the blist allocator.  In
short, half of the memory that is allocated to implement the radix tree is
wasted because we did not change "u_daddr_t" to be a 64-bit unsigned int
when we changed "daddr_t" to be a 64-bit (signed) int.  (See r96849 and
r96851.)
  
  MFC r319612
When the function blist_fill() was added to the kernel in r107913, the swap
pager used a different scheme for striping the allocation of swap space
across multiple devices.  And, although blist_fill() was intended to support
fill operations with large counts, the old striping scheme never performed a
fill larger than the stripe size.  Consequently, the misplacement of a
sanity check in blst_meta_fill() went undetected.  Now, moving forward in
time to r118390, a new scheme for striping was introduced that maintained a
blist allocator per device, but as noted in r318995, swapoff_one() was not
fully and correctly converted to the new scheme.  This change completes what
was started in r318995 by fixing the underlying bug in blst_meta_fill() that
stops swapoff_one() from simply performing a single blist_fill() operation.
  
  MFC r319627
Starting in r118390, swaponsomething() began to reserve the blocks at the
beginning of a swap area for a disk label.  However, neither r118390 nor
r118544, which increased the reservation from one to two blocks, correctly
accounted for these blocks when updating the variable "swap_pager_avail".
This change corrects that error.
  
  MFC r319655
Originally, this file could be compiled as a user-space application for
testing purposes.  However, over the years, various changes to the kernel
have broken this feature.  This revision applies some fixes to get user-
space compilation working again.  There are no changes in this revision
to code that is used by the kernel.
  
  Approved by:  re (kib)

Modified:
  stable/11/sys/kern/subr_blist.c
  stable/11/sys/sys/blist.h
  stable/11/sys/vm/swap_pager.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/kern/subr_blist.c
==
--- stable/11/sys/kern/subr_blist.c Thu Jun 15 16:12:45 2017
(r319980)
+++ stable/11/sys/kern/subr_blist.c Thu Jun 15 17:06:04 2017
(r319981)
@@ -99,9 +99,8 @@ __FBSDID("$FreeBSD$");
 #define BLIST_DEBUG
 #endif
 
-#define SWAPBLK_NONE ((daddr_t)-1)
-
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -110,8 +109,6 @@ __FBSDID("$FreeBSD$");
 #define malloc(a,b,c)  calloc(a, 1)
 #define free(a,b)  free(a)
 
-typedef unsigned int u_daddr_t;
-
 #include 
 
 void panic(const char *ctl, ...);
@@ -366,7 +363,7 @@ blst_leaf_alloc(
j >>= 1;
mask >>= j;
}
-   scan->u.bmu_bitmap &= ~(1 << r);
+   scan->u.bmu_bitmap &= ~((u_daddr_t)1 << r);
return(blk + r);
}
if (count <= BLIST_BMAP_RADIX) {
@@ -658,7 +655,7 @@ static void blst_copy(
int i;
 
for (i = 0; i < BLIST_BMAP_RADIX && i < count; ++i) {
-   if (v & (1 << i))
+   if (v & ((u_daddr_t)1 << i))
blist_free(dest, blk + i, 1);
}
}
@@ -769,6 +766,8 @@ blst_meta_fill(
int next_skip = ((u_int)skip / BLIST_META_RADIX);
int nblks = 0;
 
+   if (count > radix)
+   panic("blist_meta_fill: allocation too large");
if (count == radix || scan->u.bmu_avail 

svn commit: r319980 - stable/11/contrib/smbfs/lib/smb

2017-06-15 Thread Josh Paetzel
Author: jpaetzel
Date: Thu Jun 15 16:12:45 2017
New Revision: 319980
URL: https://svnweb.freebsd.org/changeset/base/319980

Log:
  MFC 319670
  
  Fix SMBFS when saved passwords are greater than 18 character
  
  PR:   132302
  Submitted by: dhorn2...@gmail.com g...@unixarea.de
  Approved by:  re (gjb)

Modified:
  stable/11/contrib/smbfs/lib/smb/subr.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/contrib/smbfs/lib/smb/subr.c
==
--- stable/11/contrib/smbfs/lib/smb/subr.c  Thu Jun 15 15:50:49 2017
(r319979)
+++ stable/11/contrib/smbfs/lib/smb/subr.c  Thu Jun 15 16:12:45 2017
(r319980)
@@ -232,6 +232,8 @@ smb_simplecrypt(char *dst, const char *src)
  islower(ch) ? ('a' + (ch - 'a' + 13) % 26) : ch);
ch ^= pos;
pos += 13;
+   if (pos > 256)
+   pos -= 256;
sprintf(dst, "%02x", ch);
dst += 2;
}
@@ -262,6 +264,8 @@ smb_simpledecrypt(char *dst, const char *src)
return EINVAL;
ch ^= pos;
pos += 13;
+   if (pos > 256)
+   pos -= 256;
if (isascii(ch))
ch = (isupper(ch) ? ('A' + (ch - 'A' + 13) % 26) :
  islower(ch) ? ('a' + (ch - 'a' + 13) % 26) : ch);
___
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: r319979 - stable/10/usr.sbin/freebsd-update

2017-06-15 Thread Glen Barber
Author: gjb
Date: Thu Jun 15 15:50:49 2017
New Revision: 319979
URL: https://svnweb.freebsd.org/changeset/base/319979

Log:
  MFC r319954:
   Modernize FreeBSD version numbers in freebsd-update(8).
   While here, expand a contraction to make textproc/igor happy.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/10/usr.sbin/freebsd-update/freebsd-update.8
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/freebsd-update/freebsd-update.8
==
--- stable/10/usr.sbin/freebsd-update/freebsd-update.8  Thu Jun 15 15:50:17 
2017(r319978)
+++ stable/10/usr.sbin/freebsd-update/freebsd-update.8  Thu Jun 15 15:50:49 
2017(r319979)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 2, 2015
+.Dd June 14, 2017
 .Dt FREEBSD-UPDATE 8
 .Os FreeBSD
 .Sh NAME
@@ -56,13 +56,13 @@ by the
 .Fx
 Release Engineering Team, e.g.,
 .Fx
-9.3-RELEASE and
+10.3-RELEASE and
 .Fx
-10.1-RELEASE, but not
+11.0-RELEASE, but not
 .Fx
-9.3-STABLE or
+10.3-STABLE or
 .Fx
-11-CURRENT.
+12-CURRENT.
 .Sh OPTIONS
 The following options are supported:
 .Bl -tag -width "-r newrelease"
@@ -114,7 +114,7 @@ Please do not run
 from crontab or similar using this flag, see:
 .Nm Cm cron
 .It Fl -currently-running Ar release
-Don't detect the currently-running release; instead, assume that the
+Do not detect the currently-running release; instead, assume that the
 system is running the specified
 .Ar release .
 This is most likely to be useful when upgrading jails.
___
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: r319978 - stable/11/usr.sbin/freebsd-update

2017-06-15 Thread Glen Barber
Author: gjb
Date: Thu Jun 15 15:50:17 2017
New Revision: 319978
URL: https://svnweb.freebsd.org/changeset/base/319978

Log:
  MFC r319954:
   Modernize FreeBSD version numbers in freebsd-update(8).
   While here, expand a contraction to make textproc/igor happy.
  
  Approved by:  re (kib)
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/11/usr.sbin/freebsd-update/freebsd-update.8
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.sbin/freebsd-update/freebsd-update.8
==
--- stable/11/usr.sbin/freebsd-update/freebsd-update.8  Thu Jun 15 15:24:15 
2017(r319977)
+++ stable/11/usr.sbin/freebsd-update/freebsd-update.8  Thu Jun 15 15:50:17 
2017(r319978)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 2, 2015
+.Dd June 14, 2017
 .Dt FREEBSD-UPDATE 8
 .Os FreeBSD
 .Sh NAME
@@ -56,13 +56,13 @@ by the
 .Fx
 Release Engineering Team, e.g.,
 .Fx
-9.3-RELEASE and
+10.3-RELEASE and
 .Fx
-10.1-RELEASE, but not
+11.0-RELEASE, but not
 .Fx
-9.3-STABLE or
+10.3-STABLE or
 .Fx
-11-CURRENT.
+12-CURRENT.
 .Sh OPTIONS
 The following options are supported:
 .Bl -tag -width "-r newrelease"
@@ -114,7 +114,7 @@ Please do not run
 from crontab or similar using this flag, see:
 .Nm Cm cron
 .It Fl -currently-running Ar release
-Don't detect the currently-running release; instead, assume that the
+Do not detect the currently-running release; instead, assume that the
 system is running the specified
 .Ar release .
 This is most likely to be useful when upgrading jails.
___
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: r319897 - head/usr.bin/yes

2017-06-15 Thread Bryan Drewery
On 6/15/2017 7:17 AM, Ronald Klop wrote:
> On Wed, 14 Jun 2017 16:27:52 +0200, Bryan Drewery 
> wrote:
> 
>> On 6/14/2017 7:26 AM, Justin Hibbits wrote:
>>> On Wed, Jun 14, 2017 at 9:19 AM, Bryan Drewery 
>>> wrote:
 On 6/13/2017 5:35 AM, Pietro Cerutti wrote:
> Author: gahr (ports committer)
> Date: Tue Jun 13 12:35:01 2017
> New Revision: 319897
> URL: https://svnweb.freebsd.org/changeset/base/319897
>
> Log:
>   Improve yes' throughput
>
>   On my system, this brings up the throughput from ~20 to ~600 MiB/s.
>
>   Inspired by:
> https://www.reddit.com/r/unix/comments/6gxduc/how_is_gnu_yes_so_fast/
>
>   Reviewed by:cognet
>   Approved by:cognet
>
> Modified:
>   head/usr.bin/yes/yes.c


 While here we should add libxo support.

 -- 
 Regards,
 Bryan Drewery

>>>
>>> I think before we add libxo, we need to capsicumize it.  After all, it
>>> does accept arbitrary arguments.
>>
>> The code has become more complex.  I think capsicum does make sense now
>> in case there is an unseen overflow in the new optimized code.
>>
>>
> 
> It already has capsicum...
> https://svnweb.freebsd.org/base?view=revision=308432
> 
> :-)

Doh, perfect!

Now we need libxo support.  I need a constant stream of .

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r319977 - stable/11/usr.sbin/rpc.lockd

2017-06-15 Thread Xin LI
Author: delphij
Date: Thu Jun 15 15:24:15 2017
New Revision: 319977
URL: https://svnweb.freebsd.org/changeset/base/319977

Log:
  MFC r319852:
  
  Fix buffer lengths.
  
  After r319369, the RPC code validates caller supplied buffer length in
  taddr2uaddr.  When no -h is specified, the sizeof(ai_addr) is used,
  which is always smaller than the required size and therefore uaddr
  would be NULL, causing the kernel to copyin() from userland NULL
  and fail with EFAULT.
  
  Approved by:  re (kib)

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

Modified: stable/11/usr.sbin/rpc.lockd/lockd.c
==
--- stable/11/usr.sbin/rpc.lockd/lockd.cThu Jun 15 15:08:54 2017
(r319976)
+++ stable/11/usr.sbin/rpc.lockd/lockd.cThu Jun 15 15:24:15 2017
(r319977)
@@ -902,8 +902,7 @@ lookup_addresses(struct netconfig *nconf)
sin->sin_port = htons(0);
sin->sin_addr.s_addr = 
htonl(INADDR_ANY);
res->ai_addr = (struct 
sockaddr*) sin;
-   res->ai_addrlen = (socklen_t)
-   sizeof(res->ai_addr);
+   res->ai_addrlen = sizeof(struct 
sockaddr_in);
break;
case AF_INET6:
sin6 = malloc(sizeof(struct 
sockaddr_in6));
@@ -913,7 +912,7 @@ lookup_addresses(struct netconfig *nconf)
sin6->sin6_port = htons(0);
sin6->sin6_addr = in6addr_any;
res->ai_addr = (struct 
sockaddr*) sin6;
-   res->ai_addrlen = (socklen_t) 
sizeof(res->ai_addr);
+   res->ai_addrlen = sizeof(struct 
sockaddr_in6);
break;
default:
break;
@@ -938,7 +937,7 @@ lookup_addresses(struct netconfig *nconf)
}
}
 
-   servaddr.len = servaddr.maxlen = res->ai_addr->sa_len;
+   servaddr.len = servaddr.maxlen = res->ai_addrlen;
servaddr.buf = res->ai_addr;
uaddr = taddr2uaddr(nconf, );
 
___
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: r319971 - in head: contrib/jemalloc contrib/jemalloc/doc contrib/jemalloc/include/jemalloc contrib/jemalloc/include/jemalloc/internal contrib/jemalloc/src include lib/libc/stdlib/jemal

2017-06-15 Thread Jason Evans
On Thu, 15 Jun 2017 10:31:57 +0200
"O. Hartmann"  wrote:

> On Thu, 15 Jun 2017 07:15:06 + (UTC)
> Jason Evans  wrote:
> 
> > Author: jasone
> > Date: Thu Jun 15 07:15:05 2017
> > New Revision: 319971
> > URL: https://svnweb.freebsd.org/changeset/base/319971
> > 
> > Log:
> >   Update jemalloc to 5.0.0.
> 
> On all hosts (running CURRENT:  FreeBSD 12.0-CURRENT #15 r319965: Thu Jun 15
> 05:56:12 CEST 2017 amd64 AND FreeBSD 12.0-CURRENT #20 r319934: Wed Jun 14
> 06:18:46 CEST 2017 amd64)
> 
> buildworld fails on
> 
> [...]
> Building /usr/obj/usr/src/lib/libgcc_s/_libinstall
> --- secure/lib/libcrypto__L ---
> --- all_subdir_secure/lib/libcrypto/engines/libaep ---
> /usr/obj/usr/src/tmp/usr/bin/ld: error: unable to find library -lgcc_s
> /usr/obj/usr/src/tmp/usr/bin/ld: error: unable to find library -lgcc_s
> cc: error: linker command failed with exit code 1 (use -v to see invocation)
> *** [libaep.so] Error code 1
> 
> make[6]: stopped in /usr/src/secure/lib/libcrypto/engines/libaep
> .ERROR_TARGET='libaep.so'

I tested this commit based on r319490.  I'm in the process of updating to 
r319971, and will see if the issue reproduces.

Thanks,
Jason
___
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: r319976 - stable/11/tools/test/ptrace

2017-06-15 Thread Konstantin Belousov
Author: kib
Date: Thu Jun 15 15:08:54 2017
New Revision: 319976
URL: https://svnweb.freebsd.org/changeset/base/319976

Log:
  MFC r319869:
  Decode recently added flags.
  
  Approved by:  re (marius)

Modified:
  stable/11/tools/test/ptrace/scescx.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/tools/test/ptrace/scescx.c
==
--- stable/11/tools/test/ptrace/scescx.cThu Jun 15 14:34:33 2017
(r319975)
+++ stable/11/tools/test/ptrace/scescx.cThu Jun 15 15:08:54 2017
(r319976)
@@ -97,6 +97,11 @@ decode_pl_flags(struct ptrace_lwpinfo *lwpinfo)
{ PL_FLAG_EXEC, "EXEC" },
{ PL_FLAG_SI, "SI" },
{ PL_FLAG_FORKED, "FORKED" },
+   { PL_FLAG_CHILD, "CHILD" },
+   { PL_FLAG_BORN, "LWPBORN" },
+   { PL_FLAG_EXITED, "LWPEXITED" },
+   { PL_FLAG_VFORKED, "VFORKED" },
+   { PL_FLAG_VFORK_DONE, "VFORKDONE" },
};
char de[32];
unsigned first, flags, i;
___
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: r319975 - head/sys/vm

2017-06-15 Thread Konstantin Belousov
Author: kib
Date: Thu Jun 15 14:34:33 2017
New Revision: 319975
URL: https://svnweb.freebsd.org/changeset/base/319975

Log:
  Some minor improvements to vnode_pager_generic_putpages().
  - Add asserts that the pages to write are dirty.  The last page, if
partially written, is only required to be dirty, while completely
written pages should have all dirty bit set.
  - Use uintmax_t to print vm_page pindexes.
  - Use NULL instead of casted zero.
  - Remove if () test which duplicated the loop ending condition.
  - Miscellaneous style fixes.
  
  Reviewed by:  alc, markj (previous version)
  Tested by:pho
  Sponsored by: The FreeBSD Foundation
  MFC after:1 week

Modified:
  head/sys/vm/vnode_pager.c

Modified: head/sys/vm/vnode_pager.c
==
--- head/sys/vm/vnode_pager.c   Thu Jun 15 12:47:48 2017(r319974)
+++ head/sys/vm/vnode_pager.c   Thu Jun 15 14:34:33 2017(r319975)
@@ -1198,7 +1198,7 @@ vnode_pager_generic_putpages(struct vnode *vp, vm_page
vm_ooffset_t poffset;
struct uio auio;
struct iovec aiov;
-   int count, error, i, maxsize, ncount, ppscheck;
+   int count, error, i, maxsize, ncount, pgoff, ppscheck;
static struct timeval lastfail;
static int curfail;
 
@@ -1209,10 +1209,11 @@ vnode_pager_generic_putpages(struct vnode *vp, vm_page
rtvals[i] = VM_PAGER_ERROR;
 
if ((int64_t)ma[0]->pindex < 0) {
-   printf("vnode_pager_putpages: attempt to write meta-data!!! -- 
0x%lx(%lx)\n",
-   (long)ma[0]->pindex, (u_long)ma[0]->dirty);
+   printf("vnode_pager_generic_putpages: "
+   "attempt to write meta-data 0x%jx(%lx)\n",
+   (uintmax_t)ma[0]->pindex, (u_long)ma[0]->dirty);
rtvals[0] = VM_PAGER_BAD;
-   return VM_PAGER_BAD;
+   return (VM_PAGER_BAD);
}
 
maxsize = count * PAGE_SIZE;
@@ -1235,8 +1236,6 @@ vnode_pager_generic_putpages(struct vnode *vp, vm_page
VM_OBJECT_WLOCK(object);
if (maxsize + poffset > object->un_pager.vnp.vnp_size) {
if (object->un_pager.vnp.vnp_size > poffset) {
-   int pgoff;
-
maxsize = object->un_pager.vnp.vnp_size - poffset;
ncount = btoc(maxsize);
if ((pgoff = (int)maxsize & PAGE_MASK) != 0) {
@@ -1250,6 +1249,7 @@ vnode_pager_generic_putpages(struct vnode *vp, vm_page
vm_page_assert_sbusied(m);
KASSERT(!pmap_page_is_write_mapped(m),
("vnode_pager_generic_putpages: page %p is not read-only", m));
+   MPASS(m->dirty != 0);
vm_page_clear_dirty(m, pgoff, PAGE_SIZE -
pgoff);
}
@@ -1257,15 +1257,14 @@ vnode_pager_generic_putpages(struct vnode *vp, vm_page
maxsize = 0;
ncount = 0;
}
-   if (ncount < count) {
-   for (i = ncount; i < count; i++) {
-   rtvals[i] = VM_PAGER_BAD;
-   }
-   }
+   for (i = ncount; i < count; i++)
+   rtvals[i] = VM_PAGER_BAD;
}
+   for (i = 0; i < ncount - ((btoc(maxsize) & PAGE_MASK) != 0); i++)
+   MPASS(ma[i]->dirty == VM_PAGE_BITS_ALL);
VM_OBJECT_WUNLOCK(object);
 
-   aiov.iov_base = (caddr_t) 0;
+   aiov.iov_base = NULL;
aiov.iov_len = maxsize;
auio.uio_iov = 
auio.uio_iovcnt = 1;
@@ -1273,26 +1272,23 @@ vnode_pager_generic_putpages(struct vnode *vp, vm_page
auio.uio_segflg = UIO_NOCOPY;
auio.uio_rw = UIO_WRITE;
auio.uio_resid = maxsize;
-   auio.uio_td = (struct thread *) 0;
+   auio.uio_td = NULL;
error = VOP_WRITE(vp, , vnode_pager_putpages_ioflags(flags),
curthread->td_ucred);
VM_CNT_INC(v_vnodeout);
VM_CNT_ADD(v_vnodepgsout, ncount);
 
ppscheck = 0;
-   if (error) {
-   if ((ppscheck = ppsratecheck(, , 1)))
-   printf("vnode_pager_putpages: I/O error %d\n", error);
-   }
-   if (auio.uio_resid) {
-   if (ppscheck || ppsratecheck(, , 1))
-   printf("vnode_pager_putpages: residual I/O %zd at 
%lu\n",
-   auio.uio_resid, (u_long)ma[0]->pindex);
-   }
-   for (i = 0; i < ncount; i++) {
+   if (error != 0 && (ppscheck = ppsratecheck(, , 1))
+   != 0)
+   printf("vnode_pager_putpages: I/O error %d\n", error);
+   if (auio.uio_resid != 0 && (ppscheck != 0 ||
+   ppsratecheck(, , 1) != 0))
+   printf("vnode_pager_putpages: residual I/O %zd at %ju\n",
+

Re: svn commit: r319897 - head/usr.bin/yes

2017-06-15 Thread Ronald Klop
On Wed, 14 Jun 2017 16:27:52 +0200, Bryan Drewery   
wrote:



On 6/14/2017 7:26 AM, Justin Hibbits wrote:
On Wed, Jun 14, 2017 at 9:19 AM, Bryan Drewery   
wrote:

On 6/13/2017 5:35 AM, Pietro Cerutti wrote:

Author: gahr (ports committer)
Date: Tue Jun 13 12:35:01 2017
New Revision: 319897
URL: https://svnweb.freebsd.org/changeset/base/319897

Log:
  Improve yes' throughput

  On my system, this brings up the throughput from ~20 to ~600 MiB/s.

  Inspired by:  
https://www.reddit.com/r/unix/comments/6gxduc/how_is_gnu_yes_so_fast/


  Reviewed by:cognet
  Approved by:cognet

Modified:
  head/usr.bin/yes/yes.c



While here we should add libxo support.

--
Regards,
Bryan Drewery



I think before we add libxo, we need to capsicumize it.  After all, it
does accept arbitrary arguments.


The code has become more complex.  I think capsicum does make sense now
in case there is an unseen overflow in the new optimized code.




It already has capsicum...
https://svnweb.freebsd.org/base?view=revision=308432

:-)
___
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: r319874 - head/sys/kern

2017-06-15 Thread Konstantin Belousov
On Wed, Jun 14, 2017 at 10:04:00PM -0700, Gleb Smirnoff wrote:
> On Tue, Jun 13, 2017 at 03:06:43PM +0300, Konstantin Belousov wrote:
> K> On Mon, Jun 12, 2017 at 04:43:56PM -0700, Gleb Smirnoff wrote:
> K> > On Mon, Jun 12, 2017 at 09:11:11PM +, Konstantin Belousov wrote:
> K> > K> Author: kib
> K> > K> Date: Mon Jun 12 21:11:11 2017
> K> > K> New Revision: 319874
> K> > K> URL: https://svnweb.freebsd.org/changeset/base/319874
> K> > K> 
> K> > K> Log:
> K> > K>   Print unimplemented syscall number to the ctty on SIGSYS, if enabled
> K> > K>   by the knob kern.lognosys.
> K> > 
> K> > Why is it off by default?
> K> In some (non-default) situation it may cause lot of ctty output.
> K> I made the knob tunable to allow it to be set very early (init)
> K> if needed.
> 
> I remember myself being a beginner UNIX user, and all this
> "bad system call, core dumped" messages were so annoyingly
> uninformative for me, and I had no idea how to track to the
> actual problem. This feature gives a lot of clue for a beginner
> user, but having it default to off, devaluates its value.
> 
> To avoid possible tty spam for an application that produces ton
> of bad syscalls, but ignores SIGSYS, we can enable the feature
> for those processes, who doesn't ignore SIGSYS.
I am curious how would you define the process or thread state which
ignores SIGSYS. The signal can be ignored or blocked in the signal mask,
or catched. All these dispositions cause controlling terminal spam.

Also, I do no see a good solution for rate-limiting the message. I argue
that rate-limiting must be per-process or even per-thread and not system
global, but I do not want to add even an int field to struct thread for
this.
___
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: r319881 - head/sys/dev/netmap

2017-06-15 Thread Harry Schmalzbauer
 Bezüglich Harry Schmalzbauer's Nachricht vom 15.06.2017 15:14 (localtime):
>  Bezüglich Luiz Otavio O Souza's Nachricht vom 13.06.2017 00:53
> (localtime):
>> Author: loos
>> Date: Mon Jun 12 22:53:18 2017
>> New Revision: 319881
>> URL: https://svnweb.freebsd.org/changeset/base/319881
>>
>> Log:
>>   Update the current version of netmap to bring it in sync with the github
>>   version.
>>   
>>   This commit contains mostly refactoring, a few fixes and minor added
>>   functionality.
>>   
>>   Submitted by:  Vincenzo Maffione 
>>   Requested by:  many
>>   Sponsored by:  Rubicon Communications, LLC (Netgate)
>>
>> Modified:
>>   head/sys/dev/netmap/if_ixl_netmap.h
>>   head/sys/dev/netmap/netmap.c
>>   head/sys/dev/netmap/netmap_freebsd.c
> Here's a interfering change which
> reverts r313982 for sys/dev/netmap/netmap_freebsd.c:
>
> @@ -2143,7 +2146,7 @@
> if (ptnmd->ptn_dev) {
> nm_os_pt_memdev_iounmap(ptnmd->ptn_dev);
> }
> - ptnmd->nm_addr = NULL;
> + ptnmd->nm_addr = 0;
> ptnmd->nm_paddr = 0;
> }
> }
>
> …
>>   head/sys/dev/netmap/netmap_mem2.c
> Also in sys/dev/netmap/netmap_mem2.c
> r313982 was reverted:
>
> @@ -648,7 +671,7 @@
> , 0, ~0, *mem_size, RF_ACTIVE);
> if (ptn_dev->pci_mem == NULL) {
> *nm_paddr = 0;
> - *nm_addr = NULL;
> + *nm_addr = 0;
> return ENOMEM;
> }
>

Urghs, pasted the hunks wrong!

The latter is in sys/dev/netmap/netmap_freebsd.c
and the former belongs to  sys/dev/netmap/netmap_mem2.c.
Sorry for the consfusion!

-harry

___
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: r319881 - head/sys/dev/netmap

2017-06-15 Thread Harry Schmalzbauer
 Bezüglich Luiz Otavio O Souza's Nachricht vom 13.06.2017 00:53
(localtime):
> Author: loos
> Date: Mon Jun 12 22:53:18 2017
> New Revision: 319881
> URL: https://svnweb.freebsd.org/changeset/base/319881
>
> Log:
>   Update the current version of netmap to bring it in sync with the github
>   version.
>   
>   This commit contains mostly refactoring, a few fixes and minor added
>   functionality.
>   
>   Submitted by:   Vincenzo Maffione 
>   Requested by:   many
>   Sponsored by:   Rubicon Communications, LLC (Netgate)
>
> Modified:
>   head/sys/dev/netmap/if_ixl_netmap.h
>   head/sys/dev/netmap/netmap.c
>   head/sys/dev/netmap/netmap_freebsd.c

Here's a interfering change which
reverts r313982 for sys/dev/netmap/netmap_freebsd.c:

@@ -2143,7 +2146,7 @@
if (ptnmd->ptn_dev) {
nm_os_pt_memdev_iounmap(ptnmd->ptn_dev);
}
- ptnmd->nm_addr = NULL;
+ ptnmd->nm_addr = 0;
ptnmd->nm_paddr = 0;
}
}

…
>   head/sys/dev/netmap/netmap_mem2.c

Also in sys/dev/netmap/netmap_mem2.c
r313982 was reverted:

@@ -648,7 +671,7 @@
, 0, ~0, *mem_size, RF_ACTIVE);
if (ptn_dev->pci_mem == NULL) {
*nm_paddr = 0;
- *nm_addr = NULL;
+ *nm_addr = 0;
return ENOMEM;
}

Don't know about the impact of
https://svnweb.freebsd.org/base?view=revision=313982 and
whether this partial 0/NULL replacement makes sence in
sys/dev/netmap/netmap_mem2.c and sys/dev/netmap/netmap_freebsd.c.
Just wanted to report and ask for review.

Thanks,

-harry

___
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: r319972 - head/sys/dev/mlx4/mlx4_en

2017-06-15 Thread Hans Petter Selasky
Author: hselasky
Date: Thu Jun 15 11:56:40 2017
New Revision: 319972
URL: https://svnweb.freebsd.org/changeset/base/319972

Log:
  Use static device numbering instead of dynamic one when creating
  mlx4en network interfaces. This prevents infinite unit number growth
  typically when the mlx4en driver is used inside virtual machines which
  support runtime PCI attach and detach.
  
  MFC after:3 days
  Sponsored by: Mellanox Technologies

Modified:
  head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c

Modified: head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c
==
--- head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c  Thu Jun 15 07:15:05 2017
(r319971)
+++ head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c  Thu Jun 15 11:56:40 2017
(r319972)
@@ -54,7 +54,6 @@
 
 static void mlx4_en_sysctl_stat(struct mlx4_en_priv *priv);
 static void mlx4_en_sysctl_conf(struct mlx4_en_priv *priv);
-static int mlx4_en_unit;
 
 #ifdef CONFIG_NET_RX_BUSY_POLL
 /* must be called with local_bh_disable()d */
@@ -2052,7 +2051,8 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int 
return -ENOMEM;
}
dev->if_softc = priv;
-   if_initname(dev, "mlxen", atomic_fetchadd_int(_en_unit, 1));
+   if_initname(dev, "mlxen", (device_get_unit(
+   mdev->pdev->dev.bsddev) * MLX4_MAX_PORTS) + port - 1);
dev->if_mtu = ETHERMTU;
dev->if_init = mlx4_en_open;
dev->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
___
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: r319921 - head/sys/net

2017-06-15 Thread Peter Holm
On Wed, Jun 14, 2017 at 09:21:30AM -0600, Sean Bruno wrote:
> 
> 
> On 06/14/17 08:46, Peter Holm wrote:
> > On Wed, Jun 14, 2017 at 08:38:36AM -0600, Sean Bruno wrote:
> >>
> >>
> >> On 06/14/17 03:17, Peter Holm wrote:
> >>> On Tue, Jun 13, 2017 at 11:16:39PM +, Sean Bruno wrote:
>  Author: sbruno
>  Date: Tue Jun 13 23:16:38 2017
>  New Revision: 319921
>  URL: https://svnweb.freebsd.org/changeset/base/319921
> 
>  Log:
>    Add new sysctl to allow changing of timing of the txq timers.
>    
>    Add new sysctl to override use of busdma in the driver.
>    
>    Submitted by:  Drew Gallitin 
> 
>  Modified:
>    head/sys/net/iflib.c
> 
>  Modified: head/sys/net/iflib.c
>  ==
>  --- head/sys/net/iflib.c Tue Jun 13 22:57:57 2017(r319920)


I fried up some test hardware and have some more info for you.
Here's a test triggered by a NFS test scenario:

https://people.freebsd.org/~pho/stress/log/sbruno002.txt

I have uploaded the kernel + core to:
https://people.freebsd.org/~pho/kernel+vmcore.519-t2.txz

Regards,

- Peter
___
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: r319971 - in head: contrib/jemalloc contrib/jemalloc/doc contrib/jemalloc/include/jemalloc contrib/jemalloc/include/jemalloc/internal contrib/jemalloc/src include lib/libc/stdlib/jemal

2017-06-15 Thread O. Hartmann
On Thu, 15 Jun 2017 07:15:06 + (UTC)
Jason Evans  wrote:

> Author: jasone
> Date: Thu Jun 15 07:15:05 2017
> New Revision: 319971
> URL: https://svnweb.freebsd.org/changeset/base/319971
> 
> Log:
>   Update jemalloc to 5.0.0.
> 
> Added:
>   head/contrib/jemalloc/include/jemalloc/internal/arena_externs.h
> (contents, props changed)
> head/contrib/jemalloc/include/jemalloc/internal/arena_inlines_a.h
> (contents, props changed)
> head/contrib/jemalloc/include/jemalloc/internal/arena_inlines_b.h
> (contents, props changed)
> head/contrib/jemalloc/include/jemalloc/internal/arena_structs_a.h
> (contents, props changed)
> head/contrib/jemalloc/include/jemalloc/internal/arena_structs_b.h
> (contents, props changed)
> head/contrib/jemalloc/include/jemalloc/internal/arena_types.h   (contents,
> props changed) head/contrib/jemalloc/include/jemalloc/internal/atomic_c11.h
> (contents, props changed)
> head/contrib/jemalloc/include/jemalloc/internal/atomic_gcc_atomic.h
> (contents, props changed)
> head/contrib/jemalloc/include/jemalloc/internal/atomic_gcc_sync.h
> (contents, props changed)
> head/contrib/jemalloc/include/jemalloc/internal/background_thread_externs.h
> (contents, props changed)
> head/contrib/jemalloc/include/jemalloc/internal/background_thread_inlines.h
> (contents, props changed)
> head/contrib/jemalloc/include/jemalloc/internal/background_thread_structs.h
> (contents, props changed)
> head/contrib/jemalloc/include/jemalloc/internal/base_externs.h   (contents,
> props changed)
> head/contrib/jemalloc/include/jemalloc/internal/base_inlines.h   (contents,
> props changed)
> head/contrib/jemalloc/include/jemalloc/internal/base_structs.h   (contents,
> props changed) head/contrib/jemalloc/include/jemalloc/internal/base_types.h
> (contents, props changed)
> head/contrib/jemalloc/include/jemalloc/internal/bit_util.h   (contents, props
> changed) head/contrib/jemalloc/include/jemalloc/internal/extent_dss.h
> (contents, props changed)
> head/contrib/jemalloc/include/jemalloc/internal/extent_externs.h   (contents,
> props changed)
> head/contrib/jemalloc/include/jemalloc/internal/extent_inlines.h   (contents,
> props changed)
> head/contrib/jemalloc/include/jemalloc/internal/extent_mmap.h   (contents,
> props changed)
> head/contrib/jemalloc/include/jemalloc/internal/extent_structs.h   (contents,
> props changed)
> head/contrib/jemalloc/include/jemalloc/internal/extent_types.h   (contents,
> props changed) head/contrib/jemalloc/include/jemalloc/internal/hooks.h
> (contents, props changed)
> head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_externs.h
> (contents, props changed)
> head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_includes.h
> (contents, props changed)
> head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_a.h
> (contents, props changed)
> head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_b.h
> (contents, props changed)
> head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_c.h
> (contents, props changed)
> head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h
> (contents, props changed)
> head/contrib/jemalloc/include/jemalloc/internal/jemalloc_preamble.h
> (contents, props changed)
> head/contrib/jemalloc/include/jemalloc/internal/large_externs.h   (contents,
> props changed) head/contrib/jemalloc/include/jemalloc/internal/malloc_io.h
> (contents, props changed)
> head/contrib/jemalloc/include/jemalloc/internal/mutex_pool.h   (contents,
> props changed) head/contrib/jemalloc/include/jemalloc/internal/mutex_prof.h
> (contents, props changed)
> head/contrib/jemalloc/include/jemalloc/internal/prof_externs.h   (contents,
> props changed)
> head/contrib/jemalloc/include/jemalloc/internal/prof_inlines_a.h   (contents,
> props changed)
> head/contrib/jemalloc/include/jemalloc/internal/prof_inlines_b.h   (contents,
> props changed)
> head/contrib/jemalloc/include/jemalloc/internal/prof_structs.h   (contents,
> props changed) head/contrib/jemalloc/include/jemalloc/internal/prof_types.h
> (contents, props changed)
> head/contrib/jemalloc/include/jemalloc/internal/rtree_tsd.h   (contents,
> props changed) head/contrib/jemalloc/include/jemalloc/internal/stats_tsd.h
> (contents, props changed)
> head/contrib/jemalloc/include/jemalloc/internal/sz.h   (contents, props
> changed) head/contrib/jemalloc/include/jemalloc/internal/tcache_externs.h
> (contents, props changed)
> head/contrib/jemalloc/include/jemalloc/internal/tcache_inlines.h   (contents,
> props changed)
> head/contrib/jemalloc/include/jemalloc/internal/tcache_structs.h   (contents,
> props changed)
> head/contrib/jemalloc/include/jemalloc/internal/tcache_types.h   (contents,
> props changed)
> head/contrib/jemalloc/include/jemalloc/internal/tsd_generic.h   (contents,
> props changed)
> head/contrib/jemalloc/include/jemalloc/internal/tsd_malloc_thread_cleanup.h
> (contents, props changed)
> 

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

2017-06-15 Thread Jason Evans
Author: jasone
Date: Thu Jun 15 07:15:05 2017
New Revision: 319971
URL: https://svnweb.freebsd.org/changeset/base/319971

Log:
  Update jemalloc to 5.0.0.

Added:
  head/contrib/jemalloc/include/jemalloc/internal/arena_externs.h   (contents, 
props changed)
  head/contrib/jemalloc/include/jemalloc/internal/arena_inlines_a.h   
(contents, props changed)
  head/contrib/jemalloc/include/jemalloc/internal/arena_inlines_b.h   
(contents, props changed)
  head/contrib/jemalloc/include/jemalloc/internal/arena_structs_a.h   
(contents, props changed)
  head/contrib/jemalloc/include/jemalloc/internal/arena_structs_b.h   
(contents, props changed)
  head/contrib/jemalloc/include/jemalloc/internal/arena_types.h   (contents, 
props changed)
  head/contrib/jemalloc/include/jemalloc/internal/atomic_c11.h   (contents, 
props changed)
  head/contrib/jemalloc/include/jemalloc/internal/atomic_gcc_atomic.h   
(contents, props changed)
  head/contrib/jemalloc/include/jemalloc/internal/atomic_gcc_sync.h   
(contents, props changed)
  head/contrib/jemalloc/include/jemalloc/internal/background_thread_externs.h   
(contents, props changed)
  head/contrib/jemalloc/include/jemalloc/internal/background_thread_inlines.h   
(contents, props changed)
  head/contrib/jemalloc/include/jemalloc/internal/background_thread_structs.h   
(contents, props changed)
  head/contrib/jemalloc/include/jemalloc/internal/base_externs.h   (contents, 
props changed)
  head/contrib/jemalloc/include/jemalloc/internal/base_inlines.h   (contents, 
props changed)
  head/contrib/jemalloc/include/jemalloc/internal/base_structs.h   (contents, 
props changed)
  head/contrib/jemalloc/include/jemalloc/internal/base_types.h   (contents, 
props changed)
  head/contrib/jemalloc/include/jemalloc/internal/bit_util.h   (contents, props 
changed)
  head/contrib/jemalloc/include/jemalloc/internal/extent_dss.h   (contents, 
props changed)
  head/contrib/jemalloc/include/jemalloc/internal/extent_externs.h   (contents, 
props changed)
  head/contrib/jemalloc/include/jemalloc/internal/extent_inlines.h   (contents, 
props changed)
  head/contrib/jemalloc/include/jemalloc/internal/extent_mmap.h   (contents, 
props changed)
  head/contrib/jemalloc/include/jemalloc/internal/extent_structs.h   (contents, 
props changed)
  head/contrib/jemalloc/include/jemalloc/internal/extent_types.h   (contents, 
props changed)
  head/contrib/jemalloc/include/jemalloc/internal/hooks.h   (contents, props 
changed)
  head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_externs.h   
(contents, props changed)
  head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_includes.h  
 (contents, props changed)
  head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_a.h 
  (contents, props changed)
  head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_b.h 
  (contents, props changed)
  head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_c.h 
  (contents, props changed)
  head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h   
(contents, props changed)
  head/contrib/jemalloc/include/jemalloc/internal/jemalloc_preamble.h   
(contents, props changed)
  head/contrib/jemalloc/include/jemalloc/internal/large_externs.h   (contents, 
props changed)
  head/contrib/jemalloc/include/jemalloc/internal/malloc_io.h   (contents, 
props changed)
  head/contrib/jemalloc/include/jemalloc/internal/mutex_pool.h   (contents, 
props changed)
  head/contrib/jemalloc/include/jemalloc/internal/mutex_prof.h   (contents, 
props changed)
  head/contrib/jemalloc/include/jemalloc/internal/prof_externs.h   (contents, 
props changed)
  head/contrib/jemalloc/include/jemalloc/internal/prof_inlines_a.h   (contents, 
props changed)
  head/contrib/jemalloc/include/jemalloc/internal/prof_inlines_b.h   (contents, 
props changed)
  head/contrib/jemalloc/include/jemalloc/internal/prof_structs.h   (contents, 
props changed)
  head/contrib/jemalloc/include/jemalloc/internal/prof_types.h   (contents, 
props changed)
  head/contrib/jemalloc/include/jemalloc/internal/rtree_tsd.h   (contents, 
props changed)
  head/contrib/jemalloc/include/jemalloc/internal/stats_tsd.h   (contents, 
props changed)
  head/contrib/jemalloc/include/jemalloc/internal/sz.h   (contents, props 
changed)
  head/contrib/jemalloc/include/jemalloc/internal/tcache_externs.h   (contents, 
props changed)
  head/contrib/jemalloc/include/jemalloc/internal/tcache_inlines.h   (contents, 
props changed)
  head/contrib/jemalloc/include/jemalloc/internal/tcache_structs.h   (contents, 
props changed)
  head/contrib/jemalloc/include/jemalloc/internal/tcache_types.h   (contents, 
props changed)
  head/contrib/jemalloc/include/jemalloc/internal/tsd_generic.h   (contents, 
props changed)
  head/contrib/jemalloc/include/jemalloc/internal/tsd_malloc_thread_cleanup.h   
(contents, props changed)
  head/contrib/jemalloc/include/jemalloc/internal/tsd_tls.h   (contents, props 
changed)
  

svn commit: r319970 - head/usr.sbin/ifmcstat

2017-06-15 Thread Marcelo Araujo
Author: araujo
Date: Thu Jun 15 06:48:36 2017
New Revision: 319970
URL: https://svnweb.freebsd.org/changeset/base/319970

Log:
  Use nitems() from sys/param.h.
  
  MFC after:4 weeks.

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

Modified: head/usr.sbin/ifmcstat/ifmcstat.c
==
--- head/usr.sbin/ifmcstat/ifmcstat.c   Thu Jun 15 06:46:40 2017
(r319969)
+++ head/usr.sbin/ifmcstat/ifmcstat.c   Thu Jun 15 06:48:36 2017
(r319970)
@@ -805,7 +805,7 @@ inm_print_sources_sysctl(uint32_t ifindex, struct in_a
uint32_t fmode;
const char *modestr;
 
-   mibsize = sizeof(mib) / sizeof(mib[0]);
+   mibsize = nitems(mib);
if (sysctlnametomib("net.inet.ip.mcast.filters", mib, ) == -1) {
perror("sysctlnametomib");
return;
@@ -814,7 +814,7 @@ inm_print_sources_sysctl(uint32_t ifindex, struct in_a
needed = 0;
mib[5] = ifindex;
mib[6] = gina.s_addr;   /* 32 bits wide */
-   mibsize = sizeof(mib) / sizeof(mib[0]);
+   mibsize = nitems(mib);
do {
if (sysctl(mib, mibsize, NULL, , NULL, 0) == -1) {
perror("sysctl net.inet.ip.mcast.filters");
@@ -905,7 +905,7 @@ in6m_print_sources_sysctl(uint32_t ifindex, struct in6
uint32_t fmode;
const char *modestr;
 
-   mibsize = sizeof(mib) / sizeof(mib[0]);
+   mibsize = nitems(mib);
if (sysctlnametomib("net.inet6.ip6.mcast.filters", mib,
) == -1) {
perror("sysctlnametomib");
@@ -918,7 +918,7 @@ in6m_print_sources_sysctl(uint32_t ifindex, struct in6
for (i = 0; i < 4; i++)
mib[6 + i] = *pi++;
 
-   mibsize = sizeof(mib) / sizeof(mib[0]);
+   mibsize = nitems(mib);
do {
if (sysctl(mib, mibsize, NULL, , NULL, 0) == -1) {
perror("sysctl net.inet6.ip6.mcast.filters");
@@ -1145,7 +1145,7 @@ ifmcstat_getifmaddrs(void)
size_t mibsize, len;
int mib[5];
 
-   mibsize = sizeof(mib) / sizeof(mib[0]);
+   mibsize = nitems(mib);
if (sysctlnametomib("net.inet.igmp.ifinfo",
mib, ) == -1) {
perror("sysctlnametomib");
@@ -1170,7 +1170,7 @@ ifmcstat_getifmaddrs(void)
size_t mibsize, len;
int mib[5];
 
-   mibsize = sizeof(mib) / sizeof(mib[0]);
+   mibsize = nitems(mib);
if (sysctlnametomib("net.inet6.mld.ifinfo",
mib, ) == -1) {
perror("sysctlnametomib");
___
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: r319969 - head/usr.sbin/ip6addrctl

2017-06-15 Thread Marcelo Araujo
Author: araujo
Date: Thu Jun 15 06:46:40 2017
New Revision: 319969
URL: https://svnweb.freebsd.org/changeset/base/319969

Log:
  Use nitems() from sys/param.h.
  
  MFC after:4 weeks.

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

Modified: head/usr.sbin/ip6addrctl/ip6addrctl.c
==
--- head/usr.sbin/ip6addrctl/ip6addrctl.c   Thu Jun 15 06:21:01 2017
(r319968)
+++ head/usr.sbin/ip6addrctl/ip6addrctl.c   Thu Jun 15 06:46:40 2017
(r319969)
@@ -111,7 +111,7 @@ get_policy(void)
struct in6_addrpolicy *buf;
struct in6_addrpolicy *pol, *ep;
 
-   if (sysctl(mib, sizeof(mib) / sizeof(mib[0]), NULL, , NULL, 0) < 0) {
+   if (sysctl(mib, nitems(mib), NULL, , NULL, 0) < 0) {
err(1, "sysctl(IPV6CTL_ADDRCTLPOLICY)");
/* NOTREACHED */
}
@@ -123,7 +123,7 @@ get_policy(void)
errx(1, "malloc failed");
/* NOTREACHED */
}
-   if (sysctl(mib, sizeof(mib) / sizeof(mib[0]), buf, , NULL, 0) < 0) {
+   if (sysctl(mib, nitems(mib), buf, , NULL, 0) < 0) {
err(1, "sysctl(IPV6CTL_ADDRCTLPOLICY)");
/* NOTREACHED */
}
___
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: r319968 - head/usr.sbin/bhyve

2017-06-15 Thread Marcelo Araujo
Author: araujo
Date: Thu Jun 15 06:21:01 2017
New Revision: 319968
URL: https://svnweb.freebsd.org/changeset/base/319968

Log:
  Initialize variables and use byteorder(9) instead of aliasing char array
  buf via uint32_t pointer.
  
  CID:  1375949
  Reported by:  Coverity, cem
  Reviewed by:  cem
  MFC after:3 weeks
  Sponsored by: iXsystems, Inc.
  Differential Revision:https://reviews.freebsd.org/D11153

Modified:
  head/usr.sbin/bhyve/rfb.c

Modified: head/usr.sbin/bhyve/rfb.c
==
--- head/usr.sbin/bhyve/rfb.c   Thu Jun 15 04:49:12 2017(r319967)
+++ head/usr.sbin/bhyve/rfb.c   Thu Jun 15 06:21:01 2017(r319968)
@@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$");
 #ifndef WITHOUT_CAPSICUM
 #include 
 #endif
+#include 
 #include 
 #include 
 #include 
@@ -754,7 +755,7 @@ rfb_handle(struct rfb_softc *rc, int cfd)
 {
const char *vbuf = "RFB 003.008\n";
unsigned char buf[80];
-   unsigned char *message;
+   unsigned char *message = NULL;
 
 #ifndef NO_OPENSSL
unsigned char challenge[AUTH_LENGTH];
@@ -766,7 +767,7 @@ rfb_handle(struct rfb_softc *rc, int cfd)
 #endif
 
pthread_t tid;
-   uint32_t sres;
+   uint32_t sres = 0;
int len;
 
rc->cfd = cfd;
@@ -858,7 +859,7 @@ rfb_handle(struct rfb_softc *rc, int cfd)
stream_write(cfd, , 4);
 
if (sres) {
-   *((uint32_t *) buf) = htonl(strlen(message));
+   be32enc(buf, strlen(message));
stream_write(cfd, buf, 4);
stream_write(cfd, message, strlen(message));
goto done;
___
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: r319722 - in head: sys/cam/ctl sys/dev/iscsi sys/kern sys/netgraph sys/netgraph/bluetooth/socket sys/netinet sys/ofed/drivers/infiniband/core sys/ofed/drivers/infiniband/ulp/sdp sys/rp

2017-06-15 Thread Andreas Tobler

On 15.06.17 07:00, Gleb Smirnoff wrote:

   Hi,

On Wed, Jun 14, 2017 at 09:59:50AM +0200, Andreas Tobler wrote:
A> with this revision I get either a kernel panic or a hang. This happens
A> on powerpc (32-bit). The powerpc64 looks stable.
A>
A> Here you can see the backtrace in case of the panic:
A> https://people.freebsd.org/~andreast/r319722_ppc32_1.jpg
A>
A> In the source code I see a comment with XXXGL...
A> Is this powerpc specific or do you think that there are some issues in
A> the uipc_socket.c code?

The comment has nothing to do with arch or 32-bit. Is
it possible to understand what is the actual instruction
at soisconnected()+0x21c ?



(gdb) p /x 0x5a5808 + 0x21c
$2 = 0x5a5a24

005a5808 :
  5a5808:   94 21 ff c0 stwur1,-64(r1)
  5a580c:   7c 08 02 a6 mflrr0
  5a5810:   93 01 00 20 stw r24,32(r1)



  5a5a0c:   39 40 00 00 li  r10,0
  5a5a10:   2f 8a 00 00 cmpwi   cr7,r10,0
  5a5a14:   40 9e 00 0c bne cr7,5a5a20 
  5a5a18:   38 7c 00 10 addir3,r28,16
  5a5a1c:   4b f1 c4 61 bl  4c1e7c <__mtx_unlock_sleep>
  5a5a20:   7f 63 db 78 mr  r3,r27
->5a5a24:   4b ff f5 9d bl  5a4fc0 
  5a5a28:   48 00 04 80 b   5a5ea8 
  5a5a2c:   7c 45 13 78 mr  r5,r2
  5a5a30:   39 20 00 04 li  r9,4


I'm going to stress test before 319722 to see if I can confirm Mark's 
comment.


Thanks!
Andreas
___
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"