Re: svn commit: r312910 - in head: . etc/etc.pc98 etc/rc.d lib/libsysdecode libexec release release/doc release/doc/en_US.ISO8859-1/hardware release/doc/en_US.ISO8859-1/readme release/doc/share/exampl

2017-02-01 Thread Peter Jeremy
On 2017-Feb-01 23:26:21 +, Alexey Dokuchaev  wrote:
>Well, we're doing something more than devoid any support claims: we're
>deliberately breaking it, often for little to no reason.  Things like
>r431746 are disgrace to FreeBSD and utter disrespect to our users. :-(

Actually, that's an excellent commit and I commend amdmi3 on it.  It will
help both our users and our developers.  It clearly states to users that
their system is unsupported and explains how they can bypass the check if
they know what they are doing.  That's far better than users getting
strange build or runtime failures that require investigation and
potentially emails to work out what's wrong.

>That's largely irrelevant and hardly ever causing problems.  All needed
>make(1) implementations are available in ports; I can still build modern
>ports in 8.x tinderbox with WITH_PKGNG=yes/PKGSUFFIX=.txz.

And you are doing so in the clear knowledge that what you are doing is
not supported by the FreeBSD Project.

-- 
Peter Jeremy


signature.asc
Description: PGP signature


svn commit: r313089 - head/sys/dev/cesa

2017-02-01 Thread Wojciech Macek
Author: wma
Date: Thu Feb  2 06:07:39 2017
New Revision: 313089
URL: https://svnweb.freebsd.org/changeset/base/313089

Log:
  Remove remaining ifdefs from CESA header
  
  Commit r312743 ("Use SoC ID - based detection in CESA") resulted
  in build failing for Marvell armv5 platforms, which don't support
  the newer version of CESA controller. This patch provides a fix by
  removing ifdefs around bitfields' definitions, so that they are
  known to all platforms.
  
  Submitted by:  Marcin Wojtas 
  Obtained from: Semihalf
  Sponsored by:  Stormshield

Modified:
  head/sys/dev/cesa/cesa.h

Modified: head/sys/dev/cesa/cesa.h
==
--- head/sys/dev/cesa/cesa.hThu Feb  2 05:29:22 2017(r313088)
+++ head/sys/dev/cesa/cesa.hThu Feb  2 06:07:39 2017(r313089)
@@ -336,10 +336,7 @@ struct cesa_chain_info {
 #define CESA_TDMA_CR_ENABLE(1 << 12)
 #define CESA_TDMA_CR_FETCHND   (1 << 13)
 #define CESA_TDMA_CR_ACTIVE(1 << 14)
-
-#if defined (SOC_MV_ARMADA38X)
 #define CESA_TDMA_NUM_OUTSTAND (2 << 16)
-#endif
 
 #define CESA_TDMA_ECR  0x08C8
 #define CESA_TDMA_ECR_MISS (1 << 0)
@@ -361,10 +358,7 @@ struct cesa_chain_info {
 /* CESA SA registers definitions */
 #define CESA_SA_CMD0x0E00
 #define CESA_SA_CMD_ACTVATE(1 << 0)
-
-#if defined (SOC_MV_ARMADA38X)
 #define CESA_SA_CMD_SHA2   (1 << 31)
-#endif
 
 #define CESA_SA_DPR0x0E04
 
___
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: r313088 - head/sys/contrib/dev/ath/ath_hal/ar9300

2017-02-01 Thread Adrian Chadd
Author: adrian
Date: Thu Feb  2 05:29:22 2017
New Revision: 313088
URL: https://svnweb.freebsd.org/changeset/base/313088

Log:
  [ath_hal] [ar9300] initial hacks to make spectral scan working on AR9380 and 
later NICs.
  
  * add debugging
  * disable the manual noise floor calibration and tracking done by the HAL;
this interferes with the normal calibration path and will lock up the RX
side
  * don't program short report / priority if they're provided as NOVAL.

Modified:
  head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_spectral.c

Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_spectral.c
==
--- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_spectral.c   Thu Feb  2 
05:27:48 2017(r313087)
+++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_spectral.c   Thu Feb  2 
05:29:22 2017(r313088)
@@ -309,17 +309,27 @@ ar9300_noise_floor_power_get(struct ath_
 void
 ar9300_configure_spectral_scan(struct ath_hal *ah, HAL_SPECTRAL_PARAM *ss)
 {
-u_int32_t val, i;
+u_int32_t val;
+//uint32_t i;
 struct ath_hal_9300 *ahp = AH9300(ah);
 HAL_BOOL asleep = ahp->ah_chip_full_sleep;
-int16_t nf_buf[HAL_NUM_NF_READINGS];
+//int16_t nf_buf[HAL_NUM_NF_READINGS];
 
 if ((AR_SREV_WASP(ah) || AR_SREV_SCORPION(ah)) && asleep) {
 ar9300_set_power_mode(ah, HAL_PM_AWAKE, AH_TRUE);
 }
 
+HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "%s: called\n", __func__);
+
+HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "ss_fft_period=%d\n", ss->ss_fft_period);
+HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "ss_period=%d\n", ss->ss_period);
+HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "ss_count=%d\n", ss->ss_count);
+HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "ss_short_report=%d\n", 
ss->ss_short_report);
+HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "ss_spectral_pri=%d\n", 
ss->ss_spectral_pri);
+
 ar9300_prep_spectral_scan(ah);
 
+#if 0
 if (ss->ss_spectral_pri) {
 for (i = 0; i < HAL_NUM_NF_READINGS; i++) {
 nf_buf[i] = NOISE_PWR_DBM_2_INT(ss->ss_nf_cal[i]);
@@ -333,6 +343,7 @@ ar9300_configure_spectral_scan(struct at
 /*ar9300_disable_restart(ah);*/
 #endif
 }   
+#endif
 
 val = OS_REG_READ(ah, AR_PHY_SPECTRAL_SCAN);
 
@@ -364,18 +375,22 @@ ar9300_configure_spectral_scan(struct at
 val |= SM(ss->ss_period, AR_PHY_SPECTRAL_SCAN_PERIOD);
 }
 
+if (ss->ss_short_report != HAL_SPECTRAL_PARAM_NOVAL) {
 if (ss->ss_short_report == AH_TRUE) {
 val |= AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT;
 } else {
 val &= ~AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT;
 }
+}
 
 /* if noise power cal, force high priority */
+if (ss->ss_spectral_pri != HAL_SPECTRAL_PARAM_NOVAL) {
 if (ss->ss_spectral_pri) {
 val |= AR_PHY_SPECTRAL_SCAN_PRIORITY_HI;
 } else {
 val &= ~AR_PHY_SPECTRAL_SCAN_PRIORITY_HI;
 }
+}
 
 /* enable spectral scan */
 OS_REG_WRITE(ah, AR_PHY_SPECTRAL_SCAN, val | AR_PHY_SPECTRAL_SCAN_ENABLE);
@@ -400,6 +415,8 @@ ar9300_get_spectral_params(struct ath_ha
 struct ath_hal_9300 *ahp = AH9300(ah);
 HAL_BOOL asleep = ahp->ah_chip_full_sleep;
 
+HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "%s: called\n", __func__);
+
 c = AH_PRIVATE(ah)->ah_curchan;
 if (c != NULL)
 chan = ath_hal_checkchannel(ah, c);
@@ -416,6 +433,17 @@ ar9300_get_spectral_params(struct ath_ha
 ss->ss_count = MS(val, AR_PHY_SPECTRAL_SCAN_COUNT);
 ss->ss_short_report = (val & AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT) ? 1:0;
 ss->ss_spectral_pri = ( val & AR_PHY_SPECTRAL_SCAN_PRIORITY_HI) ? 1:0;
+ss->ss_enabled = !! (val & AR_PHY_SPECTRAL_SCAN_ENABLE);
+ss->ss_active = !! (val & AR_PHY_SPECTRAL_SCAN_ACTIVE);
+
+HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "ss_fft_period=%d\n", ss->ss_fft_period);
+HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "ss_period=%d\n", ss->ss_period);
+HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "ss_count=%d\n", ss->ss_count);
+HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "ss_short_report=%d\n", 
ss->ss_short_report);
+HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "ss_spectral_pri=%d\n", 
ss->ss_spectral_pri);
+HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "ss_enabled=%d\n", ss->ss_enabled);
+HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "ss_active=%d\n", ss->ss_active);
+
 OS_MEMZERO(ss->ss_nf_cal, sizeof(ss->ss_nf_cal)); 
 OS_MEMZERO(ss->ss_nf_pwr, sizeof(ss->ss_nf_cal)); 
 ss->ss_nf_temp_data = 0;
@@ -470,6 +498,8 @@ void ar9300_start_spectral_scan(struct a
 ar9300_set_power_mode(ah, HAL_PM_AWAKE, AH_TRUE);
 }
 
+HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "%s: called\n", __func__);
+
 ar9300_prep_spectral_scan(ah);
 
 /* activate spectral scan */
___
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: r313086 - head/sys/dev/ath/ath_hal

2017-02-01 Thread Adrian Chadd
Author: adrian
Date: Thu Feb  2 05:27:27 2017
New Revision: 313086
URL: https://svnweb.freebsd.org/changeset/base/313086

Log:
  [ath_hal] add debugging level for spectral scan.

Modified:
  head/sys/dev/ath/ath_hal/ah_debug.h

Modified: head/sys/dev/ath/ath_hal/ah_debug.h
==
--- head/sys/dev/ath/ath_hal/ah_debug.h Thu Feb  2 05:27:06 2017
(r313085)
+++ head/sys/dev/ath/ath_hal/ah_debug.h Thu Feb  2 05:27:27 2017
(r313086)
@@ -54,6 +54,7 @@ enum {
HAL_DEBUG_PRINT_REG = 0x0800,
HAL_DEBUG_FCS_RTT   = 0x1000,
HAL_DEBUG_BT_COEX   = 0x2000,
+   HAL_DEBUG_SPECTRAL  = 0x4000,
 
HAL_DEBUG_UNMASKABLE= 0x8000,   /* always printed */
HAL_DEBUG_ANY   = 0x
___
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: r313087 - head/sys/dev/ath

2017-02-01 Thread Adrian Chadd
Author: adrian
Date: Thu Feb  2 05:27:48 2017
New Revision: 313087
URL: https://svnweb.freebsd.org/changeset/base/313087

Log:
  [ath] ensure the NIC is woken up before changing the spectral scan parameters.

Modified:
  head/sys/dev/ath/if_ath_spectral.c

Modified: head/sys/dev/ath/if_ath_spectral.c
==
--- head/sys/dev/ath/if_ath_spectral.c  Thu Feb  2 05:27:27 2017
(r313086)
+++ head/sys/dev/ath/if_ath_spectral.c  Thu Feb  2 05:27:48 2017
(r313087)
@@ -70,6 +70,7 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -191,6 +192,10 @@ ath_ioctl_spectral(struct ath_softc *sc,
if (! ath_hal_spectral_supported(sc->sc_ah))
return (EINVAL);
 
+   ATH_LOCK(sc);
+   ath_power_set_power_state(sc, HAL_PM_AWAKE);
+   ATH_UNLOCK(sc);
+
if (ad->ad_id & ATH_DIAG_IN) {
/*
 * Copy in data.
@@ -285,6 +290,10 @@ bad:
free(indata, M_TEMP);
if ((ad->ad_id & ATH_DIAG_DYN) && outdata != NULL)
free(outdata, M_TEMP);
+   ATH_LOCK(sc);
+   ath_power_restore_power_state(sc);
+   ATH_UNLOCK(sc);
+
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: r313085 - head/sys/dev/ath

2017-02-01 Thread Adrian Chadd
Author: adrian
Date: Thu Feb  2 05:27:06 2017
New Revision: 313085
URL: https://svnweb.freebsd.org/changeset/base/313085

Log:
  [ath] add spectral scan priority.

Modified:
  head/sys/dev/ath/if_athioctl.h

Modified: head/sys/dev/ath/if_athioctl.h
==
--- head/sys/dev/ath/if_athioctl.h  Thu Feb  2 05:26:39 2017
(r313084)
+++ head/sys/dev/ath/if_athioctl.h  Thu Feb  2 05:27:06 2017
(r313085)
@@ -432,6 +432,7 @@ struct ath_tx_radiotap_header {
 #defineSPECTRAL_PARAM_SS_SHORT_RPT 4
 #defineSPECTRAL_PARAM_ENABLED  5
 #defineSPECTRAL_PARAM_ACTIVE   6
+#defineSPECTRAL_PARAM_SS_SPECTRAL_PRI  7
 
 /*
  * Spectral control parameters
___
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: r313084 - head/tools/tools/ath/athspectral

2017-02-01 Thread Adrian Chadd
Author: adrian
Date: Thu Feb  2 05:26:39 2017
New Revision: 313084
URL: https://svnweb.freebsd.org/changeset/base/313084

Log:
  [athspectral] add a knob to expose the spectral scan priority.
  
  This is required for AR9380 and later chips.. please leave it at 0 for now.

Modified:
  head/tools/tools/ath/athspectral/athspectral.c

Modified: head/tools/tools/ath/athspectral/athspectral.c
==
--- head/tools/tools/ath/athspectral/athspectral.c  Thu Feb  2 04:53:33 
2017(r313083)
+++ head/tools/tools/ath/athspectral/athspectral.c  Thu Feb  2 05:26:39 
2017(r313084)
@@ -104,6 +104,9 @@ spectralset(struct spectralhandler *spec
case SPECTRAL_PARAM_SS_SHORT_RPT:
pe.ss_short_report = param;
break;
+   case SPECTRAL_PARAM_SS_SPECTRAL_PRI:
+   pe.ss_spectral_pri = param;
+   break;
}
 
spectral->atd.ad_id = SPECTRAL_CONTROL_SET_PARAMS | ATH_DIAG_IN;
@@ -138,6 +141,7 @@ spectral_get(struct spectralhandler *spe
printf("   ss_fft_period: %d\n", pe.ss_fft_period);
printf("   ss_period: %d\n", pe.ss_period);
printf("   ss_short_report: %d\n", pe.ss_short_report);
+   printf("   ss_spectral_pri: %d\n", pe.ss_spectral_pri);
printf("   radar_bin_thresh_sel: %d\n", pe.radar_bin_thresh_sel);
 }
 
@@ -222,6 +226,8 @@ spectral_set_param(struct spectralhandle
spectralset(spectral, SPECTRAL_PARAM_SS_PERIOD, v);
} else if (strcmp(param, "ss_count") == 0) {
spectralset(spectral, SPECTRAL_PARAM_SS_COUNT, v);
+   } else if (strcmp(param, "ss_spectral_pri") == 0) {
+   spectralset(spectral, SPECTRAL_PARAM_SS_SPECTRAL_PRI, v);
} else {
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: r313083 - head/usr.sbin/tcpdump/tcpdump

2017-02-01 Thread Gleb Smirnoff
Author: glebius
Date: Thu Feb  2 04:53:33 2017
New Revision: 313083
URL: https://svnweb.freebsd.org/changeset/base/313083

Log:
  Fix build with WITHOUT_INET6.
  
  Submitted by: Alex Deiter 

Modified:
  head/usr.sbin/tcpdump/tcpdump/Makefile

Modified: head/usr.sbin/tcpdump/tcpdump/Makefile
==
--- head/usr.sbin/tcpdump/tcpdump/Makefile  Thu Feb  2 04:50:20 2017
(r313082)
+++ head/usr.sbin/tcpdump/tcpdump/Makefile  Thu Feb  2 04:53:33 2017
(r313083)
@@ -36,6 +36,7 @@ SRCS= addrtoname.c \
print-ascii.c \
print-atalk.c \
print-atm.c \
+   print-babel.c \
print-beep.c \
print-bfd.c \
print-bgp.c \
@@ -50,6 +51,7 @@ SRCS= addrtoname.c \
print-cnfp.c \
print-dccp.c \
print-decnet.c \
+   print-dhcp6.c \
print-domain.c \
print-dtp.c \
print-dvmrp.c \
@@ -62,6 +64,7 @@ SRCS= addrtoname.c \
print-fddi.c \
print-forces.c \
print-fr.c \
+   print-frag6.c \
print-ftp.c \
print-geneve.c \
print-geonet.c \
@@ -70,10 +73,12 @@ SRCS=   addrtoname.c \
print-hsrp.c \
print-http.c \
print-icmp.c \
+   print-icmp6.c \
print-igmp.c \
print-igrp.c \
print-ip.c \
print-ip6.c \
+   print-ip6opts.c \
print-ipcomp.c \
print-ipfc.c \
print-ipnet.c \
@@ -96,6 +101,7 @@ SRCS=addrtoname.c \
print-m3ua.c \
print-medsa.c \
print-mobile.c \
+   print-mobility.c \
print-mpcp.c \
print-mpls.c \
print-mptcp.c \
@@ -109,6 +115,7 @@ SRCS=   addrtoname.c \
print-openflow.c \
print-openflow-1.0.c \
print-ospf.c \
+   print-ospf6.c \
print-otv.c \
print-pgm.c \
print-pim.c \
@@ -121,9 +128,11 @@ SRCS=  addrtoname.c \
print-raw.c \
print-resp.c \
print-rip.c \
+   print-ripng.c \
print-rpki-rtr.c \
print-rrcp.c \
print-rsvp.c \
+   print-rt6.c \
print-rtsp.c \
print-rx.c \
print-sctp.c \
@@ -171,15 +180,6 @@ CFLAGS+= -DHAVE_CONFIG_H
 CFLAGS+= -D_U_="__attribute__((unused))"
 
 .if ${MK_INET6_SUPPORT} != "no"
-SRCS+= print-babel.c \
-   print-dhcp6.c \
-   print-frag6.c \
-   print-icmp6.c \
-   print-ip6opts.c \
-   print-mobility.c \
-   print-ospf6.c \
-   print-ripng.c \
-   print-rt6.c
 CFLAGS+=   -DINET6 -DHAVE_OS_IPV6_SUPPORT
 .endif
 .if ${MACHINE_CPUARCH} != "i386"
___
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: r313082 - head/sys/dev/de

2017-02-01 Thread Warner Losh
Author: imp
Date: Thu Feb  2 04:50:20 2017
New Revision: 313082
URL: https://svnweb.freebsd.org/changeset/base/313082

Log:
  Remove dangling DE425 EISA card references in the de driver. They
  aren't used, and this doesn't change the supported hardware.

Modified:
  head/sys/dev/de/dc21040reg.h

Modified: head/sys/dev/de/dc21040reg.h
==
--- head/sys/dev/de/dc21040reg.hThu Feb  2 03:54:43 2017
(r313081)
+++ head/sys/dev/de/dc21040reg.hThu Feb  2 04:50:20 2017
(r313082)
@@ -494,20 +494,6 @@ typedef struct {
 #definePHYCTL_AUTONEG_RESTART  0x0200
 #definePHYCTL_FULL_DUPLEX  0x0100
 
-/*
- * Definitions for the DE425.
- */
-#defineDE425_CFID  0x08/* Configuration Id */
-#defineDE425_CFCS  0x0C/* Configuration Command-Status 
*/
-#defineDE425_CFRV  0x18/* Configuration Revision */
-#defineDE425_CFLT  0x1C/* Configuration Latency Timer 
*/
-#defineDE425_CBIO  0x28/* Configuration Base IO 
Address */
-#defineDE425_CFDA  0x2C/* Configuration Driver Area */
-#defineDE425_ENETROM_OFFSET0xC90   /* Offset in I/O space for 
ENETROM */
-#defineDE425_CFG0  0xC88   /* IRQ register */
-#defineDE425_EISAID0x10a34250 /* EISA device id */
-#defineDE425_EISA_IOSIZE   0x100
-
 #defineDEC_VENDORID0x1011
 #defineCHIPID_210400x0002
 #defineCHIPID_211400x0009
___
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: r313081 - head/tests/sys/geom/class/gate

2017-02-01 Thread Ngie Cooper
Author: ngie
Date: Thu Feb  2 03:54:43 2017
New Revision: 313081
URL: https://svnweb.freebsd.org/changeset/base/313081

Log:
  Replace for/retry loops with "wait_for_ggate_device" calls and check
  results of commands
  
  As noted in r313008, the underlying issue was that geom_gate device
  creation wasn't created at ggatel command completion, but some short
  time after. ggatec(8) employs similar logic when creating geom_gate(4)
  devices.
  
  Switch from retry loops (after the ggatec/dd write calls) to
  wait_for_ggate_device function calls after calling ggatec(8) instead
  to detect the presence of the /dev/ggate* device, as this function is
  sufficient for determining whether or not the character device is ready
  for testing
  
  While here, use atf_check consistently with all dd calls to ensure that
  data output is as expected.
  
  MFC after:1 week
  Reviewed by:  asomers
  Differential Revision:D9409
  Sponsored by: Dell EMC Isilon

Modified:
  head/tests/sys/geom/class/gate/ggate_test.sh

Modified: head/tests/sys/geom/class/gate/ggate_test.sh
==
--- head/tests/sys/geom/class/gate/ggate_test.shThu Feb  2 01:33:08 
2017(r313080)
+++ head/tests/sys/geom/class/gate/ggate_test.shThu Feb  2 03:54:43 
2017(r313081)
@@ -4,7 +4,6 @@ PIDFILE=ggated.pid
 PLAINFILES=plainfiles
 PORT=33080
 CONF=gg.exports
-RETRIES=16
 
 atf_test_case ggated cleanup
 ggated_head()
@@ -21,31 +20,23 @@ ggated_body()
work=$(alloc_md)
src=$(alloc_md)
 
-   dd if=/dev/random of=/dev/$work bs=1m count=1 conv=notrunc
-   dd if=/dev/random of=/dev/$src bs=1m count=1 conv=notrunc
+   atf_check -e ignore -o ignore \
+   dd if=/dev/random of=/dev/$work bs=1m count=1 conv=notrunc
+   atf_check -e ignore -o ignore \
+   dd if=/dev/random of=/dev/$src bs=1m count=1 conv=notrunc
 
echo $CONF >> $PLAINFILES
echo "127.0.0.1 RW /dev/$work" > $CONF
 
atf_check ggated -p $PORT -F $PIDFILE $CONF
-   for try in `jot $RETRIES`; do
-   ggatec create -p $PORT -u $us 127.0.0.1 /dev/$work && break
-   # wait for ggated to be ready
-   sleep 0.25
-   done
-   if [ "$try" -eq "$RETRIES" ]; then
-   atf_fail "ggatec create failed"
-   fi
+   atf_check ggatec create -p $PORT -u $us 127.0.0.1 /dev/$work
 
-   for try in `jot $RETRIES`; do
-   dd if=/dev/${src} of=/dev/ggate${us} bs=1m count=1 conv=notrunc\
-   && break
-   # Wait for /dev/ggate${us} to be ready
-   sleep 0.25
-   done
-   if [ "$try" -eq "$RETRIES" ]; then
-   atf_fail "dd failed; /dev/ggate${us} isn't working"
-   fi
+   ggate_dev=/dev/ggate${us}
+
+   wait_for_ggate_device ${ggate_dev}
+
+   atf_check -e ignore -o ignore \
+   dd if=/dev/${src} of=${ggate_dev} bs=1m count=1 conv=notrunc
 
checksum /dev/$src /dev/$work
 }
@@ -78,7 +69,8 @@ ggatel_file_body()
 
wait_for_ggate_device ${ggate_dev}
 
-   dd if=src of=${ggate_dev} bs=1m count=1 conv=notrunc
+   atf_check -e ignore -o ignore \
+   dd if=src of=${ggate_dev} bs=1m count=1 conv=notrunc
 
checksum src work
 }
@@ -103,8 +95,10 @@ ggatel_md_body()
work=$(alloc_md)
src=$(alloc_md)
 
-   dd if=/dev/random of=$work bs=1m count=1 conv=notrunc
-   dd if=/dev/random of=$src bs=1m count=1 conv=notrunc
+   atf_check -e ignore -o ignore \
+   dd if=/dev/random of=$work bs=1m count=1 conv=notrunc
+   atf_check -e ignore -o ignore \
+   dd if=/dev/random of=$src bs=1m count=1 conv=notrunc
 
atf_check ggatel create -u $us /dev/$work
 
@@ -112,7 +106,8 @@ ggatel_md_body()
 
wait_for_ggate_device ${ggate_dev}
 
-   dd if=/dev/$src of=${ggate_dev} bs=1m count=1 conv=notrunc
+   atf_check -e ignore -o ignore \
+   dd if=/dev/$src of=${ggate_dev} bs=1m count=1 conv=notrunc
 
checksum /dev/$src /dev/$work
 }
___
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: r312910 - in head: . etc/etc.pc98 etc/rc.d lib/libsysdecode libexec release release/doc release/doc/en_US.ISO8859-1/hardware release/doc/en_US.ISO8859-1/readme release/doc/share/exampl

2017-02-01 Thread Warner Losh
On Wed, Feb 1, 2017 at 2:55 PM, Ian Lepore  wrote:
> On Thu, 2017-02-02 at 00:50 +0300, Slawa Olhovchenkov wrote:
>> On Wed, Feb 01, 2017 at 03:39:57PM -0600, Mark Linimon wrote:
>>
>> >
>> > On Wed, Feb 01, 2017 at 08:09:50PM +0300, Slawa Olhovchenkov wrote:
>> > >
>> > > Also, I am think current ports don't build on 4.x.
>> > I will personally guarantee, in writing, that current ports do not
>> > build
>> > on 4.x, nor have they done so for years.  I personally removed the
>> > legacy
>> > cruft when 4.11 finally went EOL.
>> >
>> > >
>> > > I am got complains about using ports on 8.x.
>> > I am 99% certain that ports will not work on either 8.x or
>> > 9.x.  Legacy
>> > cruft was removed at the EOL in each of those cases.
>> >
>> > Anyone who think that we can support ports on 4.x, 5.x, 6.x, 7.x,
>> > 8.x,
>> > 9.x, 10.x, 11.x, and -current, all at the same time, needs to seek
>> > medical
>> > attention at once.  At the absolute least, that era spans 3 major
>> > versions
>> > of make(1) and two completely different package implementations.
>> I am assume no problem to use new make on old system.
>> May be posible use pkg too (not sure about pkg requirements to
>> syscalls).
>>
>
> I can't say anything about 4.x, but I have no problems building current
> ports on 8.2.  I have backported a few crucial changes to make, like
> handling :tl and :tu, and that's about it.  It may not be officially
> supported, but it's not hard to make it work for those who have a need.
>
> I also still support systems that use true ISA-slot hardware, but that
> doesn't include any storage or network controllers.  Mostly the ISA
> cards are proprietary things, plus one ancient 8-port uart expansion
> card that amazingly still works and can still be purchased.

Yea, but those systems aren't quite pure ISA systems. They are SBCs
with an ISA interface, but with PCI NICs and built in IDE controllers.
We're not talking about breaking those. Your systems have 64MB or more
of RAM, which is enough to run FreeBSD (should you guys ever forward
port). Though, to be honest, I'm not sure if UART would work with that
particular card... All the proprietary cards that I recall should
still work, though there may be some hassle with the network stuff one
of them does.

Warner
___
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: r312975 - head/sys/i386/include

2017-02-01 Thread Mateusz Guzik
On Wed, Feb 01, 2017 at 10:12:57PM +1100, Bruce Evans wrote:
> On Mon, 30 Jan 2017, Bruce Evans wrote:
> 
> >On Mon, 30 Jan 2017, Mateusz Guzik wrote:
> >
> >>Log:
> >> i386: add atomic_fcmpset
> >>
> >> Tested by: pho
> >
> >This is has some bugs and style bugs.
> 
> This is still broken.  The invalid asm breaks building at least atomic.o
> with gcc-4.2.1.
> 
> Tested fix:
> 
> X Index: i386/include/atomic.h
> X ===
> X --- i386/include/atomic.h   (revision 313007)
> X +++ i386/include/atomic.h   (working copy)
> X @@ -225,9 +225,9 @@
> X "   cmpxchgl %3,%1 ;"
> X "   sete%0 ;"
> X "# atomic_cmpset_int"
> X -   : "=r" (res),   /* 0 */
> X +   : "=q" (res),   /* 0 */
> X   "+m" (*dst),  /* 1 */
> X - "+a" (*expect)/* 2 */
> X + "+a" (*expect)/* 2 */
> X : "r" (src) /* 3 */
> X : "memory", "cc");
> X return (res);
> 

Uh, I ended up with the same fix. Committed in r313080.

Sorry for breakage in the first place.

> The semantics of fcmpset seem to be undocumented.  On x86, *expect is
> updated non-atomically by a store in the output parameter.  I think
> cmpxchg updates the "a" register atomically, but then the output
> parameter causes this to be stored non-atomically to *expect.  A better
> API would somehow return the "a" register and let the caller store it
> if it wants.  Ordinary cmpset can be built on this by not storing, and
> the caller can do the store atomically to a different place if *expect
> is too volatile to be atomic.
> 

The primitive was modeled after atomic_compare_exchange_* from c11
atomics. I don't see what's the benefit of storing the result
separately.

As it is, the primitive fits nicely into loops like "inc not zero".

Like this:
r = *counter;
for (;;) {
if (r == 0)
break;
if (atomic_fcmpset_int(counter, &r, r + 1))
break;
// r we can loop back to re-test r
}

> Maybe just decouple the input parameter from the output parameter.  The
> following works right (for an amd64 API):
> 
> Y static __inline int
> Y atomic_xfcmpset_long(volatile u_long *dst, u_long *expect_out, u_long 
> expect_in,
> Y u_long src)
> Y {
> Y u_long expect;
> Y u_char res;
> Y Y   expect = expect_in;
> Y __asm __volatile(
> Y "   " MPLOCKED ""
> Y "   cmpxchgq %3,%1 ;"
> Y "   sete%0 ;"
> Y "# atomic_fcmpset_long"
> Y : "=r" (res),   /* 0 */
> Y   "+m" (*dst),  /* 1 */
> Y   "+a" (expect) /* 2 */
> Y : "r" (src) /* 3 */
> Y : "memory", "cc");
> Y *expect_out = expect;
> 
> If the caller doesn't want to use *expect_out, it passes a pointer to an
> unused local variable.  The compiler can then optimize away the store
> since it is not hidden in the asm.
> 

_fcmpset is specifically for callers who want the value back. Ones which
don't can use the _cmpset variant.

-- 
Mateusz Guzik 
___
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: r313080 - head/sys/i386/include

2017-02-01 Thread Mateusz Guzik
Author: mjg
Date: Thu Feb  2 01:33:08 2017
New Revision: 313080
URL: https://svnweb.freebsd.org/changeset/base/313080

Log:
  i386: fixup fcmpset
  
  An incorrect output specifier was used which worked with clang by accident,
  but breaks with the in-tree gcc version.
  
  While here plug a whitespace nit.
  
  Reported by:  bde

Modified:
  head/sys/i386/include/atomic.h

Modified: head/sys/i386/include/atomic.h
==
--- head/sys/i386/include/atomic.h  Thu Feb  2 01:21:55 2017
(r313079)
+++ head/sys/i386/include/atomic.h  Thu Feb  2 01:33:08 2017
(r313080)
@@ -225,9 +225,9 @@ atomic_fcmpset_int(volatile u_int *dst, 
"   cmpxchgl %3,%1 ;"
"   sete%0 ;"
"# atomic_cmpset_int"
-   : "=r" (res),   /* 0 */
+   : "=q" (res),   /* 0 */
  "+m" (*dst),  /* 1 */
- "+a" (*expect)/* 2 */
+ "+a" (*expect)/* 2 */
: "r" (src) /* 3 */
: "memory", "cc");
return (res);
___
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: r313079 - stable/11/share/man/man5

2017-02-01 Thread Konstantin Belousov
Author: kib
Date: Thu Feb  2 01:21:55 2017
New Revision: 313079
URL: https://svnweb.freebsd.org/changeset/base/313079

Log:
  MFC r312649:
  Document mount option "nonc" for tmpfs.

Modified:
  stable/11/share/man/man5/tmpfs.5
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/share/man/man5/tmpfs.5
==
--- stable/11/share/man/man5/tmpfs.5Thu Feb  2 01:18:54 2017
(r313078)
+++ stable/11/share/man/man5/tmpfs.5Thu Feb  2 01:21:55 2017
(r313079)
@@ -54,7 +54,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd January 17, 2017
+.Dd January 20, 2017
 .Dt TMPFS 5
 .Os
 .Sh NAME
@@ -120,6 +120,10 @@ Defaults to the mount point's UID.
 .It Cm mode
 Specifies the mode (in octal notation) of the root inode of the file system.
 Defaults to the mount point's mode.
+.It Cm nonc
+Do not use namecache to resolve names to files for the created mount.
+This saves memory, but currently might impair scalability for highly
+used mounts on large machines.
 .It Cm inodes
 Specifies the maximum number of nodes available to the file system.
 If not specified, the file system chooses a reasonable maximum based on
___
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: r313078 - stable/11/sys/fs/tmpfs

2017-02-01 Thread Konstantin Belousov
Author: kib
Date: Thu Feb  2 01:18:54 2017
New Revision: 313078
URL: https://svnweb.freebsd.org/changeset/base/313078

Log:
  MFC r312432:
  Add a mount option for tmpfs(5) to not use namecache.

Modified:
  stable/11/sys/fs/tmpfs/tmpfs.h
  stable/11/sys/fs/tmpfs/tmpfs_subr.c
  stable/11/sys/fs/tmpfs/tmpfs_vfsops.c
  stable/11/sys/fs/tmpfs/tmpfs_vnops.c
  stable/11/sys/fs/tmpfs/tmpfs_vnops.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/fs/tmpfs/tmpfs.h
==
--- stable/11/sys/fs/tmpfs/tmpfs.h  Thu Feb  2 01:17:04 2017
(r313077)
+++ stable/11/sys/fs/tmpfs/tmpfs.h  Thu Feb  2 01:18:54 2017
(r313078)
@@ -383,7 +383,9 @@ struct tmpfs_mount {
uma_zone_t  tm_node_pool;
 
/* Read-only status. */
-   int tm_ronly;
+   booltm_ronly;
+   /* Do not use namecache. */
+   booltm_nonc;
 };
 #defineTMPFS_LOCK(tm) mtx_lock(&(tm)->tm_allnode_lock)
 #defineTMPFS_UNLOCK(tm) mtx_unlock(&(tm)->tm_allnode_lock)
@@ -528,4 +530,11 @@ VP_TO_TMPFS_DIR(struct vnode *vp)
return (node);
 }
 
+static inline bool
+tmpfs_use_nc(struct vnode *vp)
+{
+
+   return (!(VFS_TO_TMPFS(vp->v_mount)->tm_nonc));
+}
+
 #endif /* _FS_TMPFS_TMPFS_H_ */

Modified: stable/11/sys/fs/tmpfs/tmpfs_subr.c
==
--- stable/11/sys/fs/tmpfs/tmpfs_subr.c Thu Feb  2 01:17:04 2017
(r313077)
+++ stable/11/sys/fs/tmpfs/tmpfs_subr.c Thu Feb  2 01:18:54 2017
(r313078)
@@ -592,7 +592,8 @@ loop:
TMPFS_NODE_UNLOCK(node);
 
/* Get a new vnode and associate it with our node. */
-   error = getnewvnode("tmpfs", mp, &tmpfs_vnodeop_entries, &vp);
+   error = getnewvnode("tmpfs", mp, VFS_TO_TMPFS(mp)->tm_nonc ?
+   &tmpfs_vnodeop_nonc_entries : &tmpfs_vnodeop_entries, &vp);
if (error != 0)
goto unlock;
MPASS(vp != NULL);

Modified: stable/11/sys/fs/tmpfs/tmpfs_vfsops.c
==
--- stable/11/sys/fs/tmpfs/tmpfs_vfsops.c   Thu Feb  2 01:17:04 2017
(r313077)
+++ stable/11/sys/fs/tmpfs/tmpfs_vfsops.c   Thu Feb  2 01:18:54 2017
(r313078)
@@ -79,7 +79,7 @@ static void   tmpfs_susp_clean(struct moun
 
 static const char *tmpfs_opts[] = {
"from", "size", "maxfilesize", "inodes", "uid", "gid", "mode", "export",
-   "union", NULL
+   "union", "nonc", NULL
 };
 
 static const char *tmpfs_updateopts[] = {
@@ -138,6 +138,7 @@ tmpfs_mount(struct mount *mp)
struct tmpfs_node *root;
struct thread *td = curthread;
int error;
+   bool nonc;
/* Size counters. */
u_quad_t pages;
off_t nodes_max, size_max, maxfilesize;
@@ -186,6 +187,7 @@ tmpfs_mount(struct mount *mp)
size_max = 0;
if (vfs_getopt_size(mp->mnt_optnew, "maxfilesize", &maxfilesize) != 0)
maxfilesize = 0;
+   nonc = vfs_getopt(mp->mnt_optnew, "nonc", NULL, NULL) == 0;
 
/* Do not allow mounts if we do not have enough memory to preserve
 * the minimum reserved pages. */
@@ -236,6 +238,7 @@ tmpfs_mount(struct mount *mp)
sizeof(struct tmpfs_node), tmpfs_node_ctor, tmpfs_node_dtor,
tmpfs_node_init, tmpfs_node_fini, UMA_ALIGN_PTR, 0);
tmp->tm_ronly = (mp->mnt_flag & MNT_RDONLY) != 0;
+   tmp->tm_nonc = nonc;
 
/* Allocate the root node. */
error = tmpfs_alloc_node(mp, tmp, VDIR, root_uid, root_gid,

Modified: stable/11/sys/fs/tmpfs/tmpfs_vnops.c
==
--- stable/11/sys/fs/tmpfs/tmpfs_vnops.cThu Feb  2 01:17:04 2017
(r313077)
+++ stable/11/sys/fs/tmpfs/tmpfs_vnops.cThu Feb  2 01:18:54 2017
(r313078)
@@ -76,11 +76,8 @@ tmpfs_vn_get_ino_alloc(struct mount *mp,
 }
 
 static int
-tmpfs_lookup(struct vop_cachedlookup_args *v)
+tmpfs_lookup1(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp)
 {
-   struct vnode *dvp = v->a_dvp;
-   struct vnode **vpp = v->a_vpp;
-   struct componentname *cnp = v->a_cnp;
struct tmpfs_dirent *de;
struct tmpfs_node *dnode, *pnode;
struct tmpfs_mount *tm;
@@ -213,7 +210,7 @@ tmpfs_lookup(struct vop_cachedlookup_arg
 * request was for creation, as it does not improve timings on
 * emprical tests.
 */
-   if ((cnp->cn_flags & MAKEENTRY) != 0)
+   if ((cnp->cn_flags & MAKEENTRY) != 0 && tmpfs_use_nc(dvp))
cache_enter(dvp, *vpp, cnp);
 
 out:
@@ -227,6 +224,20 @@ out:
 }
 
 static int
+tmpfs_cached_lookup(struct vop_cachedlookup_args *v)
+{
+
+   return (tmpfs_lookup1(v->a_dvp, v->a_vpp, v->a_cnp));
+}
+
+static int
+tmpfs_lookup(struct vop_

svn commit: r313077 - stable/11/sys/fs/tmpfs

2017-02-01 Thread Konstantin Belousov
Author: kib
Date: Thu Feb  2 01:17:04 2017
New Revision: 313077
URL: https://svnweb.freebsd.org/changeset/base/313077

Log:
  MFC r312430:
  Implement VOP_VPTOCNP() for tmpfs.

Modified:
  stable/11/sys/fs/tmpfs/tmpfs_vnops.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/fs/tmpfs/tmpfs_vnops.c
==
--- stable/11/sys/fs/tmpfs/tmpfs_vnops.cThu Feb  2 01:14:44 2017
(r313076)
+++ stable/11/sys/fs/tmpfs/tmpfs_vnops.cThu Feb  2 01:17:04 2017
(r313077)
@@ -1406,6 +1406,132 @@ tmpfs_whiteout(struct vop_whiteout_args 
}
 }
 
+static int
+tmpfs_vptocnp_dir(struct tmpfs_node *tn, struct tmpfs_node *tnp,
+struct tmpfs_dirent **pde)
+{
+   struct tmpfs_dir_cursor dc;
+   struct tmpfs_dirent *de;
+
+   for (de = tmpfs_dir_first(tnp, &dc); de != NULL;
+de = tmpfs_dir_next(tnp, &dc)) {
+   if (de->td_node == tn) {
+   *pde = de;
+   return (0);
+   }
+   }
+   return (ENOENT);
+}
+
+static int
+tmpfs_vptocnp_fill(struct vnode *vp, struct tmpfs_node *tn,
+struct tmpfs_node *tnp, char *buf, int *buflen, struct vnode **dvp)
+{
+   struct tmpfs_dirent *de;
+   int error, i;
+
+   error = vn_vget_ino_gen(vp, tmpfs_vn_get_ino_alloc, tnp, LK_SHARED,
+   dvp);
+   if (error != 0)
+   return (error);
+   error = tmpfs_vptocnp_dir(tn, tnp, &de);
+   if (error == 0) {
+   i = *buflen;
+   i -= de->td_namelen;
+   if (i < 0) {
+   error = ENOMEM;
+   } else {
+   bcopy(de->ud.td_name, buf + i, de->td_namelen);
+   *buflen = i;
+   }
+   }
+   if (error == 0) {
+   if (vp != *dvp)
+   VOP_UNLOCK(*dvp, 0);
+   } else {
+   if (vp != *dvp)
+   vput(*dvp);
+   else
+   vrele(vp);
+   }
+   return (error);
+}
+
+static int
+tmpfs_vptocnp(struct vop_vptocnp_args *ap)
+{
+   struct vnode *vp, **dvp;
+   struct tmpfs_node *tn, *tnp, *tnp1;
+   struct tmpfs_dirent *de;
+   struct tmpfs_mount *tm;
+   char *buf;
+   int *buflen;
+   int error;
+
+   vp = ap->a_vp;
+   dvp = ap->a_vpp;
+   buf = ap->a_buf;
+   buflen = ap->a_buflen;
+
+   tm = VFS_TO_TMPFS(vp->v_mount);
+   tn = VP_TO_TMPFS_NODE(vp);
+   if (tn->tn_type == VDIR) {
+   tnp = tn->tn_dir.tn_parent;
+   if (tnp == NULL)
+   return (ENOENT);
+   tmpfs_ref_node(tnp);
+   error = tmpfs_vptocnp_fill(vp, tn, tn->tn_dir.tn_parent, buf,
+   buflen, dvp);
+   tmpfs_free_node(tm, tnp);
+   return (error);
+   }
+restart:
+   TMPFS_LOCK(tm);
+   LIST_FOREACH_SAFE(tnp, &tm->tm_nodes_used, tn_entries, tnp1) {
+   if (tnp->tn_type != VDIR)
+   continue;
+   TMPFS_NODE_LOCK(tnp);
+   tmpfs_ref_node_locked(tnp);
+
+   /*
+* tn_vnode cannot be instantiated while we hold the
+* node lock, so the directory cannot be changed while
+* we iterate over it.  Do this to avoid instantiating
+* vnode for directories which cannot point to our
+* node.
+*/
+   error = tnp->tn_vnode == NULL ? tmpfs_vptocnp_dir(tn, tnp,
+   &de) : 0;
+
+   if (error == 0) {
+   TMPFS_NODE_UNLOCK(tnp);
+   TMPFS_UNLOCK(tm);
+   error = tmpfs_vptocnp_fill(vp, tn, tnp, buf, buflen,
+   dvp);
+   if (error == 0) {
+   tmpfs_free_node(tm, tnp);
+   return (0);
+   }
+   if ((vp->v_iflag & VI_DOOMED) != 0) {
+   tmpfs_free_node(tm, tnp);
+   return (ENOENT);
+   }
+   TMPFS_LOCK(tm);
+   TMPFS_NODE_LOCK(tnp);
+   }
+   if (tmpfs_free_node_locked(tm, tnp, false)) {
+   goto restart;
+   } else {
+   KASSERT(tnp->tn_refcount > 0,
+   ("node %p refcount zero", tnp));
+   tnp1 = LIST_NEXT(tnp, tn_entries);
+   TMPFS_NODE_UNLOCK(tnp);
+   }
+   }
+   TMPFS_UNLOCK(tm);
+   return (ENOENT);
+}
+
 /*
  * Vnode operations vector used for files stored in a tmpfs file system.
  */
@@ -1438,5 +1564,6 @@ struct vop_vector tmpfs_vnodeop_entries 
.vop_vptofh =  

svn commit: r313076 - stable/11/sys/fs/tmpfs

2017-02-01 Thread Konstantin Belousov
Author: kib
Date: Thu Feb  2 01:14:44 2017
New Revision: 313076
URL: https://svnweb.freebsd.org/changeset/base/313076

Log:
  MFC r312429:
  VNON nodes cannot exist.

Modified:
  stable/11/sys/fs/tmpfs/tmpfs_subr.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/fs/tmpfs/tmpfs_subr.c
==
--- stable/11/sys/fs/tmpfs/tmpfs_subr.c Thu Feb  2 01:11:49 2017
(r313075)
+++ stable/11/sys/fs/tmpfs/tmpfs_subr.c Thu Feb  2 01:14:44 2017
(r313076)
@@ -333,11 +333,6 @@ tmpfs_free_node_locked(struct tmpfs_moun
TMPFS_UNLOCK(tmp);
 
switch (node->tn_type) {
-   case VNON:
-   /* Do not do anything.  VNON is provided to let the
-* allocation routine clean itself easily by avoiding
-* duplicating code in it. */
-   /* FALLTHROUGH */
case VBLK:
/* FALLTHROUGH */
case VCHR:
___
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: r313075 - stable/11/sys/fs/tmpfs

2017-02-01 Thread Konstantin Belousov
Author: kib
Date: Thu Feb  2 01:11:49 2017
New Revision: 313075
URL: https://svnweb.freebsd.org/changeset/base/313075

Log:
  MFC r312428:
  Refcount tmpfs nodes and mount structures.

Modified:
  stable/11/sys/fs/tmpfs/tmpfs.h
  stable/11/sys/fs/tmpfs/tmpfs_subr.c
  stable/11/sys/fs/tmpfs/tmpfs_vfsops.c
  stable/11/sys/fs/tmpfs/tmpfs_vnops.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/fs/tmpfs/tmpfs.h
==
--- stable/11/sys/fs/tmpfs/tmpfs.h  Thu Feb  2 00:50:46 2017
(r313074)
+++ stable/11/sys/fs/tmpfs/tmpfs.h  Thu Feb  2 01:11:49 2017
(r313075)
@@ -158,9 +158,11 @@ struct tmpfs_node {
 * Doubly-linked list entry which links all existing nodes for
 * a single file system.  This is provided to ease the removal
 * of all nodes during the unmount operation, and to support
-* the implementation of VOP_VNTOCNP().
+* the implementation of VOP_VNTOCNP().  tn_attached is false
+* when the node is removed from list and unlocked.
 */
LIST_ENTRY(tmpfs_node)  tn_entries; /* (m) */
+   booltn_attached;/* (m) */
 
/*
 * The node's type.  Any of 'VBLK', 'VCHR', 'VDIR', 'VFIFO',
@@ -231,6 +233,9 @@ struct tmpfs_node {
 */
int tn_vpstate; /* (i) */
 
+   /* Transient refcounter on this node. */
+   u_int   tn_refcount;/* (m) + (i) */
+
/* misc data field for different tn_type node */
union {
/* Valid when tn_type == VBLK || tn_type == VCHR. */
@@ -358,6 +363,9 @@ struct tmpfs_mount {
/* Number of nodes currently that are in use. */
ino_t   tm_nodes_inuse;
 
+   /* Refcounter on this struct tmpfs_mount. */
+   uint64_ttm_refcount;
+
/* maximum representable file size */
u_int64_t   tm_maxfilesize;
 
@@ -402,10 +410,14 @@ struct tmpfs_dir_cursor {
  * Prototypes for tmpfs_subr.c.
  */
 
+void   tmpfs_ref_node(struct tmpfs_node *node);
+void   tmpfs_ref_node_locked(struct tmpfs_node *node);
 inttmpfs_alloc_node(struct mount *mp, struct tmpfs_mount *, enum vtype,
uid_t uid, gid_t gid, mode_t mode, struct tmpfs_node *,
char *, dev_t, struct tmpfs_node **);
 void   tmpfs_free_node(struct tmpfs_mount *, struct tmpfs_node *);
+bool   tmpfs_free_node_locked(struct tmpfs_mount *, struct tmpfs_node *, bool);
+void   tmpfs_free_tmp(struct tmpfs_mount *);
 inttmpfs_alloc_dirent(struct tmpfs_mount *, struct tmpfs_node *,
const char *, u_int, struct tmpfs_dirent **);
 void   tmpfs_free_dirent(struct tmpfs_mount *, struct tmpfs_dirent *);

Modified: stable/11/sys/fs/tmpfs/tmpfs_subr.c
==
--- stable/11/sys/fs/tmpfs/tmpfs_subr.c Thu Feb  2 00:50:46 2017
(r313074)
+++ stable/11/sys/fs/tmpfs/tmpfs_subr.c Thu Feb  2 01:11:49 2017
(r313075)
@@ -132,6 +132,26 @@ tmpfs_pages_check_avail(struct tmpfs_mou
return (1);
 }
 
+void
+tmpfs_ref_node(struct tmpfs_node *node)
+{
+
+   TMPFS_NODE_LOCK(node);
+   tmpfs_ref_node_locked(node);
+   TMPFS_NODE_UNLOCK(node);
+}
+
+void
+tmpfs_ref_node_locked(struct tmpfs_node *node)
+{
+
+   TMPFS_NODE_ASSERT_LOCKED(node);
+   KASSERT(node->tn_refcount > 0, ("node %p zero refcount", node));
+   KASSERT(node->tn_refcount < UINT_MAX, ("node %p refcount %u", node,
+   node->tn_refcount));
+   node->tn_refcount++;
+}
+
 /*
  * Allocates a new node of type 'type' inside the 'tmp' mount point, with
  * its owner set to 'uid', its group to 'gid' and its mode set to 'mode',
@@ -206,6 +226,7 @@ tmpfs_alloc_node(struct mount *mp, struc
nnode->tn_gid = gid;
nnode->tn_mode = mode;
nnode->tn_id = alloc_unr(tmp->tm_ino_unr);
+   nnode->tn_refcount = 1;
 
/* Type-specific initialization. */
switch (nnode->tn_type) {
@@ -259,7 +280,9 @@ tmpfs_alloc_node(struct mount *mp, struc
 
TMPFS_LOCK(tmp);
LIST_INSERT_HEAD(&tmp->tm_nodes_used, nnode, tn_entries);
+   nnode->tn_attached = true;
tmp->tm_nodes_inuse++;
+   tmp->tm_refcount++;
TMPFS_UNLOCK(tmp);
 
*node = nnode;
@@ -273,18 +296,40 @@ tmpfs_alloc_node(struct mount *mp, struc
 void
 tmpfs_free_node(struct tmpfs_mount *tmp, struct tmpfs_node *node)
 {
+
+   TMPFS_LOCK(tmp);
+   TMPFS_NODE_LOCK(node);
+   if (!tmpfs_free_node_locked(tmp, node, false)) {
+   TMPFS_NODE_UNLOCK(node);
+   TMPFS_UNLOCK(tmp);
+   }
+}
+
+bool
+tmpfs_free_node_locked(struct tmpfs_mount *tmp, struct tmpfs_node *node,
+bool detach)
+{
vm_object_t uobj;
 
+   TMPFS_MP_ASSERT_LOCKED(tmp);
+   TMPFS_NODE_ASSERT_LOCKED(node);
+   KASSERT(node->tn_refcount > 0

svn commit: r313074 - in head: contrib/libarchive contrib/libarchive/libarchive contrib/libarchive/libarchive/test contrib/libarchive/tar contrib/libarchive/tar/test lib/libarchive lib/libarchive/t...

2017-02-01 Thread Martin Matuska
Author: mm
Date: Thu Feb  2 00:50:46 2017
New Revision: 313074
URL: https://svnweb.freebsd.org/changeset/base/313074

Log:
  MFV r313071:
  Sync libarchive with vendor
  
  Vendor changes (relevant to FreeBSD):
  - support extracting NFSv4 ACLs from Solaris tar archives
  - bugfixes and optimizations in the ACL code
  - multiple fixes in the test suite
  - typo and other small bugfixes
  
  Security fixes:
  - cab reader: endless loop when parsing MSZIP signature (OSS-Fuzz 335)
  - LHA reader: heap-buffer-overflow in lha_read_file_header_1()
(CVE-2017-5601)
  - LZ4 reader: null-pointer dereference in lz4_filter_read_legacy_stream()
(OSS-Fuzz 453)
  - mtree reader: heap-buffer-overflow in detect_form() (OSS-Fuzz 421, 443)
  - WARC reader: heap-buffer-overflow in xstrpisotime() (OSS-Fuzz 382, 458)
  
  Memory leak fixes:
  - ACL support: free memory allocated by acl_get_qualifier()
  - disk writer: missing free in create_filesystem_object()
  - file reader: fd leak (Coverity 1016755)
  - gnutar writer: fix free in archive_write_gnutar_header()
(Coverity 101675)
  - iso 9660 reader: missing free in parse_file_info()
(partial Coverity 1016754)
  - program reader: missing free in __archive_read_program()
  - program writer: missing free in __archive_write_program_free()
  - xar reader: missing free in xar_cleanup()
  - xar reader: missing frees in expat_xmlattr_setup()
(Coverity 1229979-1229981)
  - xar writer: missing free in file_free()
  - zip reader: missing free in zip_read_local_file_header()
  
  MFC after:1 week
  X-MFC with:   310866, 310868, 310870, 311899

Added:
  head/contrib/libarchive/libarchive/test/test_acl_platform_nfs4.c
 - copied unchanged from r313071, 
vendor/libarchive/dist/libarchive/test/test_acl_platform_nfs4.c
  head/contrib/libarchive/libarchive/test/test_acl_platform_posix1e.c
 - copied unchanged from r313071, 
vendor/libarchive/dist/libarchive/test/test_acl_platform_posix1e.c
Deleted:
  head/contrib/libarchive/libarchive/test/test_acl_freebsd_nfs4.c
  head/contrib/libarchive/libarchive/test/test_acl_freebsd_posix1e.c
Modified:
  head/contrib/libarchive/NEWS
  head/contrib/libarchive/libarchive/archive_acl.c
  head/contrib/libarchive/libarchive/archive_acl_private.h
  head/contrib/libarchive/libarchive/archive_entry.c
  head/contrib/libarchive/libarchive/archive_entry_strmode.c
  head/contrib/libarchive/libarchive/archive_platform.h
  head/contrib/libarchive/libarchive/archive_random.c
  head/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c
  head/contrib/libarchive/libarchive/archive_read_open_filename.c
  head/contrib/libarchive/libarchive/archive_read_support_filter_lz4.c
  head/contrib/libarchive/libarchive/archive_read_support_filter_program.c
  head/contrib/libarchive/libarchive/archive_read_support_format_cab.c
  head/contrib/libarchive/libarchive/archive_read_support_format_cpio.c
  head/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c
  head/contrib/libarchive/libarchive/archive_read_support_format_lha.c
  head/contrib/libarchive/libarchive/archive_read_support_format_mtree.c
  head/contrib/libarchive/libarchive/archive_read_support_format_tar.c
  head/contrib/libarchive/libarchive/archive_read_support_format_warc.c
  head/contrib/libarchive/libarchive/archive_read_support_format_xar.c
  head/contrib/libarchive/libarchive/archive_read_support_format_zip.c
  head/contrib/libarchive/libarchive/archive_write_add_filter_program.c
  head/contrib/libarchive/libarchive/archive_write_disk_acl.c
  head/contrib/libarchive/libarchive/archive_write_disk_posix.c
  head/contrib/libarchive/libarchive/archive_write_open.3
  head/contrib/libarchive/libarchive/archive_write_set_format_gnutar.c
  head/contrib/libarchive/libarchive/archive_write_set_format_iso9660.c
  head/contrib/libarchive/libarchive/archive_write_set_format_xar.c
  head/contrib/libarchive/libarchive/test/main.c
  head/contrib/libarchive/libarchive/test/test.h
  head/contrib/libarchive/libarchive/test/test_acl_text.c
  head/contrib/libarchive/libarchive/test/test_archive_string.c
  head/contrib/libarchive/libarchive/test/test_compat_gtar.c
  head/contrib/libarchive/libarchive/test/test_compat_solaris_tar_acl.c
  head/contrib/libarchive/libarchive/test/test_compat_solaris_tar_acl.tar.uu
  head/contrib/libarchive/libarchive/test/test_fuzz.c
  head/contrib/libarchive/libarchive/test/test_read_disk_directory_traversals.c
  head/contrib/libarchive/libarchive/test/test_read_filter_lzop.c
  head/contrib/libarchive/libarchive/test/test_read_filter_lzop_multiple_parts.c
  head/contrib/libarchive/libarchive/test/test_read_format_zip.c
  head/contrib/libarchive/libarchive/test/test_read_format_zip_comment_stored.c
  head/contrib/libarchive/libarchive/test/test_read_format_zip_mac_metadata.c
  head/contrib/libarchive/libarchive/test/test_read_format_zip_malformed.c
  head/contrib/libarchive/libarchive/test/test_read_format_zip_nested.c
  head/contrib/libarchive/libarchi

svn commit: r313073 - stable/9/sys/dev/qlxgbe

2017-02-01 Thread David C Somayajulu
Author: davidcs
Date: Thu Feb  2 00:37:21 2017
New Revision: 313073
URL: https://svnweb.freebsd.org/changeset/base/313073

Log:
  MFC r312728
  Added support for if_transmit and if_qflush
  Removed if_start
  updated version to 3.10.33

Modified:
  stable/9/sys/dev/qlxgbe/ql_def.h
  stable/9/sys/dev/qlxgbe/ql_glbl.h
  stable/9/sys/dev/qlxgbe/ql_hw.c
  stable/9/sys/dev/qlxgbe/ql_hw.h
  stable/9/sys/dev/qlxgbe/ql_isr.c
  stable/9/sys/dev/qlxgbe/ql_os.c
  stable/9/sys/dev/qlxgbe/ql_os.h
  stable/9/sys/dev/qlxgbe/ql_ver.h
Directory Properties:
  stable/9/   (props changed)
  stable/9/sys/   (props changed)

Modified: stable/9/sys/dev/qlxgbe/ql_def.h
==
--- stable/9/sys/dev/qlxgbe/ql_def.hThu Feb  2 00:20:53 2017
(r313072)
+++ stable/9/sys/dev/qlxgbe/ql_def.hThu Feb  2 00:37:21 2017
(r313073)
@@ -112,6 +112,16 @@ typedef struct _qla_tx_ring {
uint64_tcount;
 } qla_tx_ring_t;
 
+typedef struct _qla_tx_fp {
+   struct mtx  tx_mtx;
+   chartx_mtx_name[32];
+   struct buf_ring *tx_br;
+   struct task fp_task;
+   struct taskqueue*fp_taskqueue;
+   void*ha;
+   uint32_ttxr_idx;
+} qla_tx_fp_t;
+
 /*
  * Adapter structure contains the hardware independant information of the
  * pci function.
@@ -178,10 +188,9 @@ struct qla_host {
qla_tx_ring_t   tx_ring[NUM_TX_RINGS];

bus_dma_tag_t   tx_tag;
-   struct task tx_task;
-   struct taskqueue*tx_tq;
struct callout  tx_callout;
-   struct mtx  tx_lock;
+
+   qla_tx_fp_t tx_fp[MAX_SDS_RINGS];
 
qla_rx_ring_t   rx_ring[MAX_RDS_RINGS];
bus_dma_tag_t   rx_tag;

Modified: stable/9/sys/dev/qlxgbe/ql_glbl.h
==
--- stable/9/sys/dev/qlxgbe/ql_glbl.h   Thu Feb  2 00:20:53 2017
(r313072)
+++ stable/9/sys/dev/qlxgbe/ql_glbl.h   Thu Feb  2 00:37:21 2017
(r313073)
@@ -39,6 +39,7 @@
  */
 extern void ql_mbx_isr(void *arg);
 extern void ql_isr(void *arg);
+extern uint32_t ql_rcv_isr(qla_host_t *ha, uint32_t sds_idx, uint32_t count);
 
 /*
  * from ql_os.c
@@ -66,7 +67,7 @@ extern void qla_reset_promisc(qla_host_t
 extern int ql_set_allmulti(qla_host_t *ha);
 extern void qla_reset_allmulti(qla_host_t *ha);
 extern void ql_update_link_state(qla_host_t *ha);
-extern void ql_hw_tx_done(qla_host_t *ha);
+extern void ql_hw_tx_done_locked(qla_host_t *ha, uint32_t txr_idx);
 extern int ql_set_max_mtu(qla_host_t *ha, uint32_t mtu, uint16_t cntxt_id);
 extern void ql_hw_stop_rcv(qla_host_t *ha);
 extern void ql_get_stats(qla_host_t *ha);
@@ -76,7 +77,7 @@ extern void qla_hw_async_event(qla_host_
 extern int qla_get_nic_partition(qla_host_t *ha, uint32_t *supports_9kb,
uint32_t *num_rcvq);
 
-extern int qla_iscsi_pdu(qla_host_t *ha, struct mbuf *mp);
+extern int ql_iscsi_pdu(qla_host_t *ha, struct mbuf *mp);
 
 extern void ql_minidump(qla_host_t *ha);
 extern int ql_minidump_init(qla_host_t *ha);

Modified: stable/9/sys/dev/qlxgbe/ql_hw.c
==
--- stable/9/sys/dev/qlxgbe/ql_hw.c Thu Feb  2 00:20:53 2017
(r313072)
+++ stable/9/sys/dev/qlxgbe/ql_hw.c Thu Feb  2 00:37:21 2017
(r313073)
@@ -51,7 +51,6 @@ static void qla_del_rcv_cntxt(qla_host_t
 static int qla_init_rcv_cntxt(qla_host_t *ha);
 static void qla_del_xmt_cntxt(qla_host_t *ha);
 static int qla_init_xmt_cntxt(qla_host_t *ha);
-static void qla_hw_tx_done_locked(qla_host_t *ha, uint32_t txr_idx);
 static int qla_mbx_cmd(qla_host_t *ha, uint32_t *h_mbox, uint32_t n_hmbox,
uint32_t *fw_mbox, uint32_t n_fwmbox, uint32_t no_pause);
 static int qla_config_intr_cntxt(qla_host_t *ha, uint32_t start_idx,
@@ -2047,7 +2046,7 @@ ql_hw_send(qla_host_t *ha, bus_dma_segme
ha->hw.iscsi_pkt_count++;
 
if (hw->tx_cntxt[txr_idx].txr_free <= (num_tx_cmds + QLA_TX_MIN_FREE)) {
-   qla_hw_tx_done_locked(ha, txr_idx);
+   ql_hw_tx_done_locked(ha, txr_idx);
if (hw->tx_cntxt[txr_idx].txr_free <=
(num_tx_cmds + QLA_TX_MIN_FREE)) {
QL_DPRINT8(ha, (dev, "%s: (hw->txr_free <= "
@@ -2552,15 +2551,8 @@ qla_init_rcv_cntxt(qla_host_t *ha)
qla_host_to_le64(hw->dma_buf.sds_ring[i].dma_addr);
rcntxt->sds[i].size =
qla_host_to_le32(NUM_STATUS_DESCRIPTORS);
-   if (ha->msix_count == 2) {
-   rcntxt->sds[i].intr_id =
-   qla_host_to_le16(hw->intr_id[0]);
-   rcntxt->sds[i].intr_src_

svn commit: r313072 - stable/10/sys/dev/qlxgbe

2017-02-01 Thread David C Somayajulu
Author: davidcs
Date: Thu Feb  2 00:20:53 2017
New Revision: 313072
URL: https://svnweb.freebsd.org/changeset/base/313072

Log:
  MFC r312728
  Added support for if_transmit and if_qflush
  Removed if_start
  updated version to 3.10.33

Modified:
  stable/10/sys/dev/qlxgbe/ql_def.h
  stable/10/sys/dev/qlxgbe/ql_glbl.h
  stable/10/sys/dev/qlxgbe/ql_hw.c
  stable/10/sys/dev/qlxgbe/ql_hw.h
  stable/10/sys/dev/qlxgbe/ql_isr.c
  stable/10/sys/dev/qlxgbe/ql_os.c
  stable/10/sys/dev/qlxgbe/ql_os.h
  stable/10/sys/dev/qlxgbe/ql_ver.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/qlxgbe/ql_def.h
==
--- stable/10/sys/dev/qlxgbe/ql_def.h   Thu Feb  2 00:20:18 2017
(r313071)
+++ stable/10/sys/dev/qlxgbe/ql_def.h   Thu Feb  2 00:20:53 2017
(r313072)
@@ -112,6 +112,16 @@ typedef struct _qla_tx_ring {
uint64_tcount;
 } qla_tx_ring_t;
 
+typedef struct _qla_tx_fp {
+   struct mtx  tx_mtx;
+   chartx_mtx_name[32];
+   struct buf_ring *tx_br;
+   struct task fp_task;
+   struct taskqueue*fp_taskqueue;
+   void*ha;
+   uint32_ttxr_idx;
+} qla_tx_fp_t;
+
 /*
  * Adapter structure contains the hardware independant information of the
  * pci function.
@@ -178,10 +188,9 @@ struct qla_host {
qla_tx_ring_t   tx_ring[NUM_TX_RINGS];

bus_dma_tag_t   tx_tag;
-   struct task tx_task;
-   struct taskqueue*tx_tq;
struct callout  tx_callout;
-   struct mtx  tx_lock;
+
+   qla_tx_fp_t tx_fp[MAX_SDS_RINGS];
 
qla_rx_ring_t   rx_ring[MAX_RDS_RINGS];
bus_dma_tag_t   rx_tag;

Modified: stable/10/sys/dev/qlxgbe/ql_glbl.h
==
--- stable/10/sys/dev/qlxgbe/ql_glbl.h  Thu Feb  2 00:20:18 2017
(r313071)
+++ stable/10/sys/dev/qlxgbe/ql_glbl.h  Thu Feb  2 00:20:53 2017
(r313072)
@@ -39,6 +39,7 @@
  */
 extern void ql_mbx_isr(void *arg);
 extern void ql_isr(void *arg);
+extern uint32_t ql_rcv_isr(qla_host_t *ha, uint32_t sds_idx, uint32_t count);
 
 /*
  * from ql_os.c
@@ -66,7 +67,7 @@ extern void qla_reset_promisc(qla_host_t
 extern int ql_set_allmulti(qla_host_t *ha);
 extern void qla_reset_allmulti(qla_host_t *ha);
 extern void ql_update_link_state(qla_host_t *ha);
-extern void ql_hw_tx_done(qla_host_t *ha);
+extern void ql_hw_tx_done_locked(qla_host_t *ha, uint32_t txr_idx);
 extern int ql_set_max_mtu(qla_host_t *ha, uint32_t mtu, uint16_t cntxt_id);
 extern void ql_hw_stop_rcv(qla_host_t *ha);
 extern void ql_get_stats(qla_host_t *ha);
@@ -76,7 +77,7 @@ extern void qla_hw_async_event(qla_host_
 extern int qla_get_nic_partition(qla_host_t *ha, uint32_t *supports_9kb,
uint32_t *num_rcvq);
 
-extern int qla_iscsi_pdu(qla_host_t *ha, struct mbuf *mp);
+extern int ql_iscsi_pdu(qla_host_t *ha, struct mbuf *mp);
 
 extern void ql_minidump(qla_host_t *ha);
 extern int ql_minidump_init(qla_host_t *ha);

Modified: stable/10/sys/dev/qlxgbe/ql_hw.c
==
--- stable/10/sys/dev/qlxgbe/ql_hw.cThu Feb  2 00:20:18 2017
(r313071)
+++ stable/10/sys/dev/qlxgbe/ql_hw.cThu Feb  2 00:20:53 2017
(r313072)
@@ -51,7 +51,6 @@ static void qla_del_rcv_cntxt(qla_host_t
 static int qla_init_rcv_cntxt(qla_host_t *ha);
 static void qla_del_xmt_cntxt(qla_host_t *ha);
 static int qla_init_xmt_cntxt(qla_host_t *ha);
-static void qla_hw_tx_done_locked(qla_host_t *ha, uint32_t txr_idx);
 static int qla_mbx_cmd(qla_host_t *ha, uint32_t *h_mbox, uint32_t n_hmbox,
uint32_t *fw_mbox, uint32_t n_fwmbox, uint32_t no_pause);
 static int qla_config_intr_cntxt(qla_host_t *ha, uint32_t start_idx,
@@ -2047,7 +2046,7 @@ ql_hw_send(qla_host_t *ha, bus_dma_segme
ha->hw.iscsi_pkt_count++;
 
if (hw->tx_cntxt[txr_idx].txr_free <= (num_tx_cmds + QLA_TX_MIN_FREE)) {
-   qla_hw_tx_done_locked(ha, txr_idx);
+   ql_hw_tx_done_locked(ha, txr_idx);
if (hw->tx_cntxt[txr_idx].txr_free <=
(num_tx_cmds + QLA_TX_MIN_FREE)) {
QL_DPRINT8(ha, (dev, "%s: (hw->txr_free <= "
@@ -2552,15 +2551,8 @@ qla_init_rcv_cntxt(qla_host_t *ha)
qla_host_to_le64(hw->dma_buf.sds_ring[i].dma_addr);
rcntxt->sds[i].size =
qla_host_to_le32(NUM_STATUS_DESCRIPTORS);
-   if (ha->msix_count == 2) {
-   rcntxt->sds[i].intr_id =
-   qla_host_to_le16(hw->intr_id[0]);
-   rcntxt->sds[i].intr_src_bit = qla_host_to_le16

svn commit: r313071 - in vendor/libarchive/dist: . build build/cmake libarchive libarchive/test tar tar/test

2017-02-01 Thread Martin Matuska
Author: mm
Date: Thu Feb  2 00:20:18 2017
New Revision: 313071
URL: https://svnweb.freebsd.org/changeset/base/313071

Log:
  Update vendor/libarchive to git d77b577b2d5aa259fca06313c4940e1e61ab1e0e
  
  Vendor changes (relevant to FreeBSD):
  - bugfixes, improvemens and optimizations in ACL code
  - NFSv4 ACLs can now be extracted from Solaris tar archives
  
  Security fixes:
  - cab reader: endless loop when parsing MSZIP signature (OSS-Fuzz 335)
  - LHA reader: heap-buffer-overflow in lha_read_file_header_1() (CVE-2017-5601)
  - LZ4 reader: null-pointer dereference in lz4_filter_read_legacy_stream()
(OSS-Fuzz 453)
  - mtree reader: heap-buffer-overflow in detect_form() (OSS-Fuzz 421, 443)
  - WARC reader: heap-buffer-overflow in xstrpisotime() (OSS-Fuzz 382, 458)
  
  Memory leak fixes:
  - ACL support: free memory allocated by acl_get_qualifier()
  - disk writer: missing free in create_filesystem_object()
  - file reader: fd leak (Coverity 1016755)
  - gnutar writer: fix free in archive_write_gnutar_header() (Coverity 1016752)
  - iso 9660 reader: missing free in parse_file_info() (part. Coverity 1016754)
  - program reader: missing free in __archive_read_program()
  - program writer: missing free in __archive_write_program_free()
  - xar reader: missing free in xar_cleanup()
  - xar reader: missing frees in expat_xmlattr_setup() (Coverity 
1229979-1229981)
  - xar writer: missing free in file_free()
  - zip reader: missing free in zip_read_locazip_read_local_file_header()

Added:
  vendor/libarchive/dist/libarchive/test/test_acl_platform_nfs4.c
 - copied, changed from r313070, 
vendor/libarchive/dist/libarchive/test/test_acl_freebsd_nfs4.c
  vendor/libarchive/dist/libarchive/test/test_acl_platform_posix1e.c
 - copied, changed from r313070, 
vendor/libarchive/dist/libarchive/test/test_acl_freebsd_posix1e.c
Deleted:
  vendor/libarchive/dist/libarchive/test/test_acl_freebsd_nfs4.c
  vendor/libarchive/dist/libarchive/test/test_acl_freebsd_posix1e.c
Modified:
  vendor/libarchive/dist/.travis.yml
  vendor/libarchive/dist/CMakeLists.txt
  vendor/libarchive/dist/Makefile.am
  vendor/libarchive/dist/NEWS
  vendor/libarchive/dist/build/ci_build.sh
  vendor/libarchive/dist/build/ci_test_driver
  vendor/libarchive/dist/build/cmake/config.h.in
  vendor/libarchive/dist/configure.ac
  vendor/libarchive/dist/libarchive/CMakeLists.txt
  vendor/libarchive/dist/libarchive/archive_acl.c
  vendor/libarchive/dist/libarchive/archive_acl_private.h
  vendor/libarchive/dist/libarchive/archive_entry.c
  vendor/libarchive/dist/libarchive/archive_entry_strmode.c
  vendor/libarchive/dist/libarchive/archive_platform.h
  vendor/libarchive/dist/libarchive/archive_random.c
  vendor/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c
  vendor/libarchive/dist/libarchive/archive_read_open_filename.c
  vendor/libarchive/dist/libarchive/archive_read_support_filter_lz4.c
  vendor/libarchive/dist/libarchive/archive_read_support_filter_program.c
  vendor/libarchive/dist/libarchive/archive_read_support_format_cab.c
  vendor/libarchive/dist/libarchive/archive_read_support_format_cpio.c
  vendor/libarchive/dist/libarchive/archive_read_support_format_iso9660.c
  vendor/libarchive/dist/libarchive/archive_read_support_format_lha.c
  vendor/libarchive/dist/libarchive/archive_read_support_format_mtree.c
  vendor/libarchive/dist/libarchive/archive_read_support_format_tar.c
  vendor/libarchive/dist/libarchive/archive_read_support_format_warc.c
  vendor/libarchive/dist/libarchive/archive_read_support_format_xar.c
  vendor/libarchive/dist/libarchive/archive_read_support_format_zip.c
  vendor/libarchive/dist/libarchive/archive_windows.c
  vendor/libarchive/dist/libarchive/archive_windows.h
  vendor/libarchive/dist/libarchive/archive_write_add_filter_program.c
  vendor/libarchive/dist/libarchive/archive_write_disk_acl.c
  vendor/libarchive/dist/libarchive/archive_write_disk_posix.c
  vendor/libarchive/dist/libarchive/archive_write_open.3
  vendor/libarchive/dist/libarchive/archive_write_set_format_gnutar.c
  vendor/libarchive/dist/libarchive/archive_write_set_format_iso9660.c
  vendor/libarchive/dist/libarchive/archive_write_set_format_xar.c
  vendor/libarchive/dist/libarchive/test/CMakeLists.txt
  vendor/libarchive/dist/libarchive/test/main.c
  vendor/libarchive/dist/libarchive/test/test.h
  vendor/libarchive/dist/libarchive/test/test_acl_text.c
  vendor/libarchive/dist/libarchive/test/test_archive_string.c
  vendor/libarchive/dist/libarchive/test/test_compat_gtar.c
  vendor/libarchive/dist/libarchive/test/test_compat_solaris_tar_acl.c
  vendor/libarchive/dist/libarchive/test/test_compat_solaris_tar_acl.tar.uu
  vendor/libarchive/dist/libarchive/test/test_fuzz.c
  vendor/libarchive/dist/libarchive/test/test_read_disk_directory_traversals.c
  vendor/libarchive/dist/libarchive/test/test_read_filter_lzop.c
  vendor/libarchive/dist/libarchive/test/test_read_filter_lzop_multiple_parts.c
  vendor/libarchive/dist/libarchive/test/test_read_

svn commit: r313070 - stable/11/sys/dev/qlxgbe

2017-02-01 Thread David C Somayajulu
Author: davidcs
Date: Thu Feb  2 00:12:24 2017
New Revision: 313070
URL: https://svnweb.freebsd.org/changeset/base/313070

Log:
  MFC r312728
Added support for if_transmit and if_qflush
Removed if_start
updated version to 3.10.33

Modified:
  stable/11/sys/dev/qlxgbe/ql_def.h
  stable/11/sys/dev/qlxgbe/ql_glbl.h
  stable/11/sys/dev/qlxgbe/ql_hw.c
  stable/11/sys/dev/qlxgbe/ql_hw.h
  stable/11/sys/dev/qlxgbe/ql_isr.c
  stable/11/sys/dev/qlxgbe/ql_os.c
  stable/11/sys/dev/qlxgbe/ql_os.h
  stable/11/sys/dev/qlxgbe/ql_ver.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/qlxgbe/ql_def.h
==
--- stable/11/sys/dev/qlxgbe/ql_def.h   Wed Feb  1 23:22:54 2017
(r313069)
+++ stable/11/sys/dev/qlxgbe/ql_def.h   Thu Feb  2 00:12:24 2017
(r313070)
@@ -112,6 +112,16 @@ typedef struct _qla_tx_ring {
uint64_tcount;
 } qla_tx_ring_t;
 
+typedef struct _qla_tx_fp {
+   struct mtx  tx_mtx;
+   chartx_mtx_name[32];
+   struct buf_ring *tx_br;
+   struct task fp_task;
+   struct taskqueue*fp_taskqueue;
+   void*ha;
+   uint32_ttxr_idx;
+} qla_tx_fp_t;
+
 /*
  * Adapter structure contains the hardware independent information of the
  * pci function.
@@ -178,10 +188,9 @@ struct qla_host {
qla_tx_ring_t   tx_ring[NUM_TX_RINGS];

bus_dma_tag_t   tx_tag;
-   struct task tx_task;
-   struct taskqueue*tx_tq;
struct callout  tx_callout;
-   struct mtx  tx_lock;
+
+   qla_tx_fp_t tx_fp[MAX_SDS_RINGS];
 
qla_rx_ring_t   rx_ring[MAX_RDS_RINGS];
bus_dma_tag_t   rx_tag;

Modified: stable/11/sys/dev/qlxgbe/ql_glbl.h
==
--- stable/11/sys/dev/qlxgbe/ql_glbl.h  Wed Feb  1 23:22:54 2017
(r313069)
+++ stable/11/sys/dev/qlxgbe/ql_glbl.h  Thu Feb  2 00:12:24 2017
(r313070)
@@ -39,6 +39,7 @@
  */
 extern void ql_mbx_isr(void *arg);
 extern void ql_isr(void *arg);
+extern uint32_t ql_rcv_isr(qla_host_t *ha, uint32_t sds_idx, uint32_t count);
 
 /*
  * from ql_os.c
@@ -66,7 +67,7 @@ extern void qla_reset_promisc(qla_host_t
 extern int ql_set_allmulti(qla_host_t *ha);
 extern void qla_reset_allmulti(qla_host_t *ha);
 extern void ql_update_link_state(qla_host_t *ha);
-extern void ql_hw_tx_done(qla_host_t *ha);
+extern void ql_hw_tx_done_locked(qla_host_t *ha, uint32_t txr_idx);
 extern int ql_set_max_mtu(qla_host_t *ha, uint32_t mtu, uint16_t cntxt_id);
 extern void ql_hw_stop_rcv(qla_host_t *ha);
 extern void ql_get_stats(qla_host_t *ha);
@@ -76,7 +77,7 @@ extern void qla_hw_async_event(qla_host_
 extern int qla_get_nic_partition(qla_host_t *ha, uint32_t *supports_9kb,
uint32_t *num_rcvq);
 
-extern int qla_iscsi_pdu(qla_host_t *ha, struct mbuf *mp);
+extern int ql_iscsi_pdu(qla_host_t *ha, struct mbuf *mp);
 
 extern void ql_minidump(qla_host_t *ha);
 extern int ql_minidump_init(qla_host_t *ha);

Modified: stable/11/sys/dev/qlxgbe/ql_hw.c
==
--- stable/11/sys/dev/qlxgbe/ql_hw.cWed Feb  1 23:22:54 2017
(r313069)
+++ stable/11/sys/dev/qlxgbe/ql_hw.cThu Feb  2 00:12:24 2017
(r313070)
@@ -51,7 +51,6 @@ static void qla_del_rcv_cntxt(qla_host_t
 static int qla_init_rcv_cntxt(qla_host_t *ha);
 static void qla_del_xmt_cntxt(qla_host_t *ha);
 static int qla_init_xmt_cntxt(qla_host_t *ha);
-static void qla_hw_tx_done_locked(qla_host_t *ha, uint32_t txr_idx);
 static int qla_mbx_cmd(qla_host_t *ha, uint32_t *h_mbox, uint32_t n_hmbox,
uint32_t *fw_mbox, uint32_t n_fwmbox, uint32_t no_pause);
 static int qla_config_intr_cntxt(qla_host_t *ha, uint32_t start_idx,
@@ -2047,7 +2046,7 @@ ql_hw_send(qla_host_t *ha, bus_dma_segme
ha->hw.iscsi_pkt_count++;
 
if (hw->tx_cntxt[txr_idx].txr_free <= (num_tx_cmds + QLA_TX_MIN_FREE)) {
-   qla_hw_tx_done_locked(ha, txr_idx);
+   ql_hw_tx_done_locked(ha, txr_idx);
if (hw->tx_cntxt[txr_idx].txr_free <=
(num_tx_cmds + QLA_TX_MIN_FREE)) {
QL_DPRINT8(ha, (dev, "%s: (hw->txr_free <= "
@@ -2552,15 +2551,8 @@ qla_init_rcv_cntxt(qla_host_t *ha)
qla_host_to_le64(hw->dma_buf.sds_ring[i].dma_addr);
rcntxt->sds[i].size =
qla_host_to_le32(NUM_STATUS_DESCRIPTORS);
-   if (ha->msix_count == 2) {
-   rcntxt->sds[i].intr_id =
-   qla_host_to_le16(hw->intr_id[0]);
-   rcntxt->sds[i].intr_src_bit = qla_host_to_le16((i));

Re: svn commit: r312910 - in head: . etc/etc.pc98 etc/rc.d lib/libsysdecode libexec release release/doc release/doc/en_US.ISO8859-1/hardware release/doc/en_US.ISO8859-1/readme release/doc/share/exampl

2017-02-01 Thread Alexey Dokuchaev
On Wed, Feb 01, 2017 at 03:39:57PM -0600, Mark Linimon wrote:
> On Wed, Feb 01, 2017 at 08:09:50PM +0300, Slawa Olhovchenkov wrote:
> > Also, I am think current ports don't build on 4.x.
> 
> I will personally guarantee, in writing, that current ports do not build
> on 4.x, nor have they done so for years.  I personally removed the legacy
> cruft when 4.11 finally went EOL.

They don't build as is, but they still can be tamed (patched) to build and
install nicely on 4.x with some effort.  Most remaining 4.x installations
are server ones which typically carry a well known selection of ports that
are not hard to maintain locally for 4.x compatibility.  One does not have
to have *entire* tree to build flawlessly on 4.x.

> > I am got complains about using ports on 8.x.
> 
> I am 99% certain that ports will not work on either 8.x or 9.x.  Legacy
> cruft was removed at the EOL in each of those cases.

That's quite wrong actually: most ports build and run just fine on 8.x
(X.org stack is one major exception), with some fairly trivial changes.

> Anyone who think that we can support ports on 4.x, 5.x, 6.x, 7.x, 8.x,
> 9.x, 10.x, 11.x, and -current, all at the same time, needs to seek medical
> attention at once.

Well, we're doing something more than devoid any support claims: we're
deliberately breaking it, often for little to no reason.  Things like
r431746 are disgrace to FreeBSD and utter disrespect to our users. :-(

> At the absolute least, that era spans 3 major versions of make(1) and
> two completely different package implementations.

That's largely irrelevant and hardly ever causing problems.  All needed
make(1) implementations are available in ports; I can still build modern
ports in 8.x tinderbox with WITH_PKGNG=yes/PKGSUFFIX=.txz.

./danfe
___
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: r313069 - in head/etc/periodic: daily monthly weekly

2017-02-01 Thread Alan Somers
Author: asomers
Date: Wed Feb  1 23:22:54 2017
New Revision: 313069
URL: https://svnweb.freebsd.org/changeset/base/313069

Log:
  Allow 999.local to run scripts in any language
  
  If one of the scripts listed in (daily|weekly|monthly)_local is executable,
  999.local should simply execute it. Only if the script isn't executable
  should 999.local assume it needs /bin/sh.
  
  Reviewed by:  brian
  MFC after:3 weeks
  Sponsored by: Spectra Logic Corp

Modified:
  head/etc/periodic/daily/999.local
  head/etc/periodic/monthly/999.local
  head/etc/periodic/weekly/999.local

Modified: head/etc/periodic/daily/999.local
==
--- head/etc/periodic/daily/999.local   Wed Feb  1 22:03:59 2017
(r313068)
+++ head/etc/periodic/daily/999.local   Wed Feb  1 23:22:54 2017
(r313069)
@@ -20,7 +20,12 @@ do
 echo ''
 case "$script" in
/*)
-   if [ -f "$script" ]
+   if [ -x "$script" ]
+   then
+   echo "Running $script:"
+
+   $script || rc=3
+   elif [ -f "$script" ]
then
echo "Running $script:"
 

Modified: head/etc/periodic/monthly/999.local
==
--- head/etc/periodic/monthly/999.local Wed Feb  1 22:03:59 2017
(r313068)
+++ head/etc/periodic/monthly/999.local Wed Feb  1 23:22:54 2017
(r313069)
@@ -17,7 +17,12 @@ do
 echo ''
 case "$script" in
/*)
-   if [ -f "$script" ]
+   if [ -x "$script" ]
+   then
+   echo "Running $script:"
+
+   $script || rc=3
+   elif [ -f "$script" ]
then
echo "Running $script:"
 

Modified: head/etc/periodic/weekly/999.local
==
--- head/etc/periodic/weekly/999.local  Wed Feb  1 22:03:59 2017
(r313068)
+++ head/etc/periodic/weekly/999.local  Wed Feb  1 23:22:54 2017
(r313069)
@@ -17,7 +17,12 @@ do
 echo ''
 case "$script" in
/*)
-   if [ -f "$script" ]
+   if [ -x "$script" ]
+   then
+   echo "Running $script:"
+
+   $script || rc=3
+   elif [ -f "$script" ]
then
echo "Running $script:"
 
___
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: r312910 - in head: . etc/etc.pc98 etc/rc.d lib/libsysdecode libexec release release/doc release/doc/en_US.ISO8859-1/hardware release/doc/en_US.ISO8859-1/readme release/doc/share/exampl

2017-02-01 Thread Slawa Olhovchenkov
On Wed, Feb 01, 2017 at 10:56:24AM -0700, Warner Losh wrote:

> >> > > Fair enough.  I haven't fully put away my 12 axe and am toying with
> >> > > dropping any ISA-only storage and NIC drivers (and perhaps pccard-only
> >> > > as well in that case).  Hardware that wants to use ISA/pccard for
> >> > > storage is probably happier running 4.x anyway.  One question is if we
> >> > > should drop ISA attachments in that case for drivers that support PCI
> >> > > and ISA.  However, there's a fair list of ISA-only adapters that would
> >> > > be a good place to start anyway.  One concern is to not drop any 
> >> > > drivers
> >> >
> >> > ps/2 keyboard, mouse, touchpads, lm sensors, etc?...
> >>
> >> Those aren't storage or NICs.  There are many "legacy" device still present
> >> in modern systems that we obviously have to support.  However, if you have
> >> an ISA Adapter SCSI HBA in an ISA slot, the machine running that is 
> >> probably
> >> happier running 4.x than 12.0.
> >
> > My be I am missread, I think removed ISA bus and all devices attached
> > to ISA bus.
> 
> We will never ever ever remove the ISA bus on the i386 or amd64 ports.
> That's simply not possible due to the legacy busses and the fact that
> many devices are logically attached to the address space used by the
> ISA bus even if there aren't physical plastic ISA slots.

Ah, sorry, this is my missread.
I am don't have any ISA cards in use many years.
Only some ISA COM/LPT/sound cards in far-away box.

PS: again, may be time to move all drivers to modules and load all
GENERIC's devices from loader.conf? /boot/loader have good performance
now.
___
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: r313068 - head/sys/arm/ti/am335x

2017-02-01 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Wed Feb  1 22:03:59 2017
New Revision: 313068
URL: https://svnweb.freebsd.org/changeset/base/313068

Log:
  [am335x] Fallback to standard video interface bindings when using Linux dts
  
  Historically AM335x LCDC driver used non-standard "hdmi" property to
  refer to HDMI framer. There is no such thing in upstream DTS, so to
  handle both cases fallback to bindings described in
  bindings/media/video-interfaces.txt in Linux documentation.
  
  We still make some assumptions that are not universally true: we
  assume that if remote endpoint is available it's going to be HDMI
  framer. Which is true for AM335x-based devices currently supported
  but may be not true for some custom hardware.
  
  MFC after:1 week

Modified:
  head/sys/arm/ti/am335x/am335x_lcd.c

Modified: head/sys/arm/ti/am335x/am335x_lcd.c
==
--- head/sys/arm/ti/am335x/am335x_lcd.c Wed Feb  1 21:57:07 2017
(r313067)
+++ head/sys/arm/ti/am335x/am335x_lcd.c Wed Feb  1 22:03:59 2017
(r313068)
@@ -343,15 +343,46 @@ static void
 am335x_read_hdmi_property(device_t dev)
 {
phandle_t node;
+   phandle_t endpoint;
phandle_t hdmi_xref;
struct am335x_lcd_softc *sc;
 
sc = device_get_softc(dev);
node = ofw_bus_get_node(dev);
-   if (OF_getencprop(node, "hdmi", &hdmi_xref, sizeof(hdmi_xref)) == -1)
-   sc->sc_hdmi_framer = 0;
-   else
-   sc->sc_hdmi_framer = hdmi_xref; 
+   sc->sc_hdmi_framer = 0;
+
+   /*
+* Old FreeBSD way of referencing to HDMI framer
+*/
+   if (OF_getencprop(node, "hdmi", &hdmi_xref, sizeof(hdmi_xref)) != -1) {
+   sc->sc_hdmi_framer = hdmi_xref;
+   return;
+   }
+
+   /*
+* Use bindings described in Linux docs:
+* bindings/media/video-interfaces.txt
+* We assume that the only endpoint in LCDC node
+* is HDMI framer.
+*/
+   node = ofw_bus_find_child(node, "port");
+
+   /* No media bindings */
+   if (node == 0)
+   return;
+
+   for (endpoint = OF_child(node); endpoint != 0; endpoint = 
OF_peer(endpoint)) {
+   if (OF_getencprop(endpoint, "remote-endpoint", &node, 
sizeof(node)) != -1) {
+   /* port node of remote endpoint */
+   node = OF_node_from_xref(node);
+   /* port/ node */
+   node = OF_parent(node);
+   /* actual owner of port/endpoint, in our case HDMI 
framer */
+   sc->sc_hdmi_framer = OF_parent(node);
+   if (sc->sc_hdmi_framer != 0)
+   return;
+   }
+   }
 }
 
 static int
___
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: r312910 - in head: . etc/etc.pc98 etc/rc.d lib/libsysdecode libexec release release/doc release/doc/en_US.ISO8859-1/hardware release/doc/en_US.ISO8859-1/readme release/doc/share/exampl

2017-02-01 Thread Ian Lepore
On Thu, 2017-02-02 at 00:50 +0300, Slawa Olhovchenkov wrote:
> On Wed, Feb 01, 2017 at 03:39:57PM -0600, Mark Linimon wrote:
> 
> > 
> > On Wed, Feb 01, 2017 at 08:09:50PM +0300, Slawa Olhovchenkov wrote:
> > > 
> > > Also, I am think current ports don't build on 4.x.
> > I will personally guarantee, in writing, that current ports do not
> > build
> > on 4.x, nor have they done so for years.  I personally removed the
> > legacy
> > cruft when 4.11 finally went EOL.
> > 
> > > 
> > > I am got complains about using ports on 8.x.
> > I am 99% certain that ports will not work on either 8.x or
> > 9.x.  Legacy
> > cruft was removed at the EOL in each of those cases.
> > 
> > Anyone who think that we can support ports on 4.x, 5.x, 6.x, 7.x,
> > 8.x,
> > 9.x, 10.x, 11.x, and -current, all at the same time, needs to seek
> > medical
> > attention at once.  At the absolute least, that era spans 3 major
> > versions
> > of make(1) and two completely different package implementations.
> I am assume no problem to use new make on old system.
> May be posible use pkg too (not sure about pkg requirements to
> syscalls).
> 

I can't say anything about 4.x, but I have no problems building current
ports on 8.2.  I have backported a few crucial changes to make, like
handling :tl and :tu, and that's about it.  It may not be officially
supported, but it's not hard to make it work for those who have a need.

I also still support systems that use true ISA-slot hardware, but that
doesn't include any storage or network controllers.  Mostly the ISA
cards are proprietary things, plus one ancient 8-port uart expansion
card that amazingly still works and can still be purchased.

-- Ian

___
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: r312910 - in head: . etc/etc.pc98 etc/rc.d lib/libsysdecode libexec release release/doc release/doc/en_US.ISO8859-1/hardware release/doc/en_US.ISO8859-1/readme release/doc/share/exampl

2017-02-01 Thread Slawa Olhovchenkov
On Wed, Feb 01, 2017 at 01:45:14PM -0800, John Baldwin wrote:

> On Wednesday, February 01, 2017 03:39:57 PM Mark Linimon wrote:
> > On Wed, Feb 01, 2017 at 08:09:50PM +0300, Slawa Olhovchenkov wrote:
> > > Also, I am think current ports don't build on 4.x.
> > 
> > I will personally guarantee, in writing, that current ports do not build
> > on 4.x, nor have they done so for years.  I personally removed the legacy
> > cruft when 4.11 finally went EOL.
> > 
> > > I am got complains about using ports on 8.x.
> > 
> > I am 99% certain that ports will not work on either 8.x or 9.x.  Legacy
> > cruft was removed at the EOL in each of those cases.
> > 
> > Anyone who think that we can support ports on 4.x, 5.x, 6.x, 7.x, 8.x,
> > 9.x, 10.x, 11.x, and -current, all at the same time, needs to seek medical
> > attention at once.  At the absolute least, that era spans 3 major versions
> > of make(1) and two completely different package implementations.
> 
> I think Slawa's point was that my suggestion that people with old hardware
> should run old releases means that they cannot use a modern ports checkout

Yes.

> with those older systems.  That point is correct, but you probably don't
> want to run newer, more bloated 3rd party software on such gear either.

Not all software bloated, some software need to updated (for example, not sure
about sshd in 4.x system. Or openssl).
___
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: r312910 - in head: . etc/etc.pc98 etc/rc.d lib/libsysdecode libexec release release/doc release/doc/en_US.ISO8859-1/hardware release/doc/en_US.ISO8859-1/readme release/doc/share/exampl

2017-02-01 Thread Slawa Olhovchenkov
On Wed, Feb 01, 2017 at 03:39:57PM -0600, Mark Linimon wrote:

> On Wed, Feb 01, 2017 at 08:09:50PM +0300, Slawa Olhovchenkov wrote:
> > Also, I am think current ports don't build on 4.x.
> 
> I will personally guarantee, in writing, that current ports do not build
> on 4.x, nor have they done so for years.  I personally removed the legacy
> cruft when 4.11 finally went EOL.
> 
> > I am got complains about using ports on 8.x.
> 
> I am 99% certain that ports will not work on either 8.x or 9.x.  Legacy
> cruft was removed at the EOL in each of those cases.
> 
> Anyone who think that we can support ports on 4.x, 5.x, 6.x, 7.x, 8.x,
> 9.x, 10.x, 11.x, and -current, all at the same time, needs to seek medical
> attention at once.  At the absolute least, that era spans 3 major versions
> of make(1) and two completely different package implementations.

I am assume no problem to use new make on old system.
May be posible use pkg too (not sure about pkg requirements to
syscalls).
___
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: r312910 - in head: . etc/etc.pc98 etc/rc.d lib/libsysdecode libexec release release/doc release/doc/en_US.ISO8859-1/hardware release/doc/en_US.ISO8859-1/readme release/doc/share/exampl

2017-02-01 Thread John Baldwin
On Wednesday, February 01, 2017 03:39:57 PM Mark Linimon wrote:
> On Wed, Feb 01, 2017 at 08:09:50PM +0300, Slawa Olhovchenkov wrote:
> > Also, I am think current ports don't build on 4.x.
> 
> I will personally guarantee, in writing, that current ports do not build
> on 4.x, nor have they done so for years.  I personally removed the legacy
> cruft when 4.11 finally went EOL.
> 
> > I am got complains about using ports on 8.x.
> 
> I am 99% certain that ports will not work on either 8.x or 9.x.  Legacy
> cruft was removed at the EOL in each of those cases.
> 
> Anyone who think that we can support ports on 4.x, 5.x, 6.x, 7.x, 8.x,
> 9.x, 10.x, 11.x, and -current, all at the same time, needs to seek medical
> attention at once.  At the absolute least, that era spans 3 major versions
> of make(1) and two completely different package implementations.

I think Slawa's point was that my suggestion that people with old hardware
should run old releases means that they cannot use a modern ports checkout
with those older systems.  That point is correct, but you probably don't
want to run newer, more bloated 3rd party software on such gear either.

-- 
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: r312988 - in head/sys: compat/cloudabi compat/linux kern sys

2017-02-01 Thread John Baldwin
On Wednesday, February 01, 2017 10:23:37 AM Gleb Smirnoff wrote:
> On Tue, Jan 31, 2017 at 02:13:36PM -0800, John Baldwin wrote:
> J> On Monday, January 30, 2017 12:57:23 PM Edward Tomasz Napierala wrote:
> J> > Author: trasz
> J> > Date: Mon Jan 30 12:57:22 2017
> J> > New Revision: 312988
> J> > URL: https://svnweb.freebsd.org/changeset/base/312988
> J> > 
> J> > Log:
> J> >   Add kern_listen(), kern_shutdown(), and kern_socket(), and use them
> J> >   instead of their sys_*() counterparts in various compats. The svr4
> J> >   is left untouched, because there's no point.
> J> 
> J> Note that you can compile test svr4 since it is still in the tree.
> J> If we want to remove svr4, then we should remove it.  However, we
> J> should maintain code that is in the tree if it is still there.
> 
> All we can do right now is maintain it as compilable. My example with
> COMPAT_OLDSOCK shows that SVR4 simply doesn't work as kld, and nobody
> complains.
> 
> Okay, what if I say on freebsd-arch/freebsd-current that I am going
> to remove it and wait for any objections for a month, and then do it?

I would rather remove it than start skipping it in tree sweeps.  We should
strive to maintain code that is in our tree.  If you can't get things tested,
then we are better off removing the code instead of having it rot in the
tree (cf the discussion on old ISA drivers).

-- 
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"


svn commit: r313066 - stable/10/sys/net

2017-02-01 Thread Kristof Provost
Author: kp
Date: Wed Feb  1 21:44:50 2017
New Revision: 313066
URL: https://svnweb.freebsd.org/changeset/base/313066

Log:
  MFC 312782
  
  bridge: Release the bridge lock when calling bridge_set_ifcap()
  
  This calls ioctl() handlers for the different interfaces in the bridge.
  These handlers expect to get called in an ioctl context where it's safe
  for them to sleep. We may not sleep with the bridge lock held.
  
  However, we still need to protect the interface list, to ensure it
  doesn't get changed while we iterate over it.
  Use BRIDGE_XLOCK(), which prevents bridge members from being removed.
  Adding bridge members is safe, because it uses LIST_INSERT_HEAD().
  
  This caused panics when adding xen interfaces to a bridge.
  
  PR:   216304
  Reviewed by:  ae
  Sponsored by: RootBSD
  Differential Revision:https://reviews.freebsd.org/D9290

Modified:
  stable/10/sys/net/if_bridge.c
  stable/10/sys/net/if_bridgevar.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/net/if_bridge.c
==
--- stable/10/sys/net/if_bridge.c   Wed Feb  1 21:35:25 2017
(r313065)
+++ stable/10/sys/net/if_bridge.c   Wed Feb  1 21:44:50 2017
(r313066)
@@ -860,14 +860,18 @@ bridge_mutecaps(struct bridge_softc *sc)
mask &= bif->bif_savedcaps;
}
 
+   BRIDGE_XLOCK(sc);
LIST_FOREACH(bif, &sc->sc_iflist, bif_next) {
enabled = bif->bif_ifp->if_capenable;
enabled &= ~BRIDGE_IFCAPS_STRIP;
/* strip off mask bits and enable them again if allowed */
enabled &= ~BRIDGE_IFCAPS_MASK;
enabled |= mask;
+   BRIDGE_UNLOCK(sc);
bridge_set_ifcap(sc, bif, enabled);
+   BRIDGE_LOCK(sc);
}
+   BRIDGE_XDROP(sc);
 
 }
 
@@ -878,6 +882,8 @@ bridge_set_ifcap(struct bridge_softc *sc
struct ifreq ifr;
int error;
 
+   BRIDGE_UNLOCK_ASSERT(sc);
+
bzero(&ifr, sizeof(ifr));
ifr.ifr_reqcap = set;
 

Modified: stable/10/sys/net/if_bridgevar.h
==
--- stable/10/sys/net/if_bridgevar.hWed Feb  1 21:35:25 2017
(r313065)
+++ stable/10/sys/net/if_bridgevar.hWed Feb  1 21:44:50 2017
(r313066)
@@ -280,6 +280,7 @@ struct ifbpstpconf {
 #define BRIDGE_LOCK(_sc)   mtx_lock(&(_sc)->sc_mtx)
 #define BRIDGE_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx)
 #define BRIDGE_LOCK_ASSERT(_sc)mtx_assert(&(_sc)->sc_mtx, 
MA_OWNED)
+#define BRIDGE_UNLOCK_ASSERT(_sc)  mtx_assert(&(_sc)->sc_mtx, MA_NOTOWNED)
 #defineBRIDGE_LOCK2REF(_sc, _err)  do {\
mtx_assert(&(_sc)->sc_mtx, MA_OWNED);   \
if ((_sc)->sc_iflist_xcnt > 0)  \
___
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: r312910 - in head: . etc/etc.pc98 etc/rc.d lib/libsysdecode libexec release release/doc release/doc/en_US.ISO8859-1/hardware release/doc/en_US.ISO8859-1/readme release/doc/share/exampl

2017-02-01 Thread Mark Linimon
On Wed, Feb 01, 2017 at 08:09:50PM +0300, Slawa Olhovchenkov wrote:
> Also, I am think current ports don't build on 4.x.

I will personally guarantee, in writing, that current ports do not build
on 4.x, nor have they done so for years.  I personally removed the legacy
cruft when 4.11 finally went EOL.

> I am got complains about using ports on 8.x.

I am 99% certain that ports will not work on either 8.x or 9.x.  Legacy
cruft was removed at the EOL in each of those cases.

Anyone who think that we can support ports on 4.x, 5.x, 6.x, 7.x, 8.x,
9.x, 10.x, 11.x, and -current, all at the same time, needs to seek medical
attention at once.  At the absolute least, that era spans 3 major versions
of make(1) and two completely different package implementations.

mcl
___
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: r313062 - vendor/libc++/libc++-release_40-r293807

2017-02-01 Thread Dimitry Andric
Author: dim
Date: Wed Feb  1 21:35:14 2017
New Revision: 313062
URL: https://svnweb.freebsd.org/changeset/base/313062

Log:
  Tag libc++ release_40 branch r293807.

Added:
  vendor/libc++/libc++-release_40-r293807/
 - copied from r313061, vendor/libc++/dist/
___
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: r313060 - vendor/compiler-rt/compiler-rt-release_40-r293807

2017-02-01 Thread Dimitry Andric
Author: dim
Date: Wed Feb  1 21:35:09 2017
New Revision: 313060
URL: https://svnweb.freebsd.org/changeset/base/313060

Log:
  Tag compiler-rt release_40 branch r293807.

Added:
  vendor/compiler-rt/compiler-rt-release_40-r293807/
 - copied from r313059, vendor/compiler-rt/dist/
___
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: r313065 - vendor/lldb/lldb-release_40-r293807

2017-02-01 Thread Dimitry Andric
Author: dim
Date: Wed Feb  1 21:35:25 2017
New Revision: 313065
URL: https://svnweb.freebsd.org/changeset/base/313065

Log:
  Tag lldb release_40 branch r293807.

Added:
  vendor/lldb/lldb-release_40-r293807/
 - copied from r313064, vendor/lldb/dist/
___
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: r313064 - vendor/lld/lld-release_40-r293807

2017-02-01 Thread Dimitry Andric
Author: dim
Date: Wed Feb  1 21:35:22 2017
New Revision: 313064
URL: https://svnweb.freebsd.org/changeset/base/313064

Log:
  Tag lld release_40 branch r293807.

Added:
  vendor/lld/lld-release_40-r293807/
 - copied from r313063, vendor/lld/dist/
___
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: r313063 - in vendor/lld/dist: ELF test/ELF test/ELF/Inputs

2017-02-01 Thread Dimitry Andric
Author: dim
Date: Wed Feb  1 21:35:17 2017
New Revision: 313063
URL: https://svnweb.freebsd.org/changeset/base/313063

Log:
  Vendor import of lld release_40 branch r293807:
  https://llvm.org/svn/llvm-project/lld/branches/release_40@293807

Added:
  vendor/lld/dist/test/ELF/Inputs/dtrace-r.o   (contents, props changed)
  vendor/lld/dist/test/ELF/aarch64-relro.s   (contents, props changed)
  vendor/lld/dist/test/ELF/dtrace-r.test
Modified:
  vendor/lld/dist/ELF/InputFiles.h
  vendor/lld/dist/ELF/InputSection.cpp
  vendor/lld/dist/ELF/SyntheticSections.cpp
  vendor/lld/dist/ELF/SyntheticSections.h
  vendor/lld/dist/ELF/Writer.cpp
  vendor/lld/dist/test/ELF/basic-mips.s
  vendor/lld/dist/test/ELF/basic-ppc.s

Modified: vendor/lld/dist/ELF/InputFiles.h
==
--- vendor/lld/dist/ELF/InputFiles.hWed Feb  1 21:35:14 2017
(r313062)
+++ vendor/lld/dist/ELF/InputFiles.hWed Feb  1 21:35:17 2017
(r313063)
@@ -180,10 +180,6 @@ public:
   // R_MIPS_GPREL16 / R_MIPS_GPREL32 relocations.
   uint32_t MipsGp0 = 0;
 
-  // The number is the offset in the string table. It will be used as the
-  // st_name of the symbol.
-  std::vector *, unsigned>> KeptLocalSyms;
-
   // Name of source file obtained from STT_FILE symbol value,
   // or empty string if there is no such symbol in object file
   // symbol table.

Modified: vendor/lld/dist/ELF/InputSection.cpp
==
--- vendor/lld/dist/ELF/InputSection.cppWed Feb  1 21:35:14 2017
(r313062)
+++ vendor/lld/dist/ELF/InputSection.cppWed Feb  1 21:35:17 2017
(r313063)
@@ -246,7 +246,8 @@ void InputSection::copyRelocations
 if (Config->Rela)
   P->r_addend = getAddend(Rel);
 P->r_offset = RelocatedSection->getOffset(Rel.r_offset);
-P->setSymbolAndType(Body.DynsymIndex, Type, Config->Mips64EL);
+P->setSymbolAndType(In::SymTab->getSymbolIndex(&Body), Type,
+Config->Mips64EL);
   }
 }
 

Modified: vendor/lld/dist/ELF/SyntheticSections.cpp
==
--- vendor/lld/dist/ELF/SyntheticSections.cpp   Wed Feb  1 21:35:14 2017
(r313062)
+++ vendor/lld/dist/ELF/SyntheticSections.cpp   Wed Feb  1 21:35:17 2017
(r313063)
@@ -1065,22 +1065,21 @@ template  void SymbolTableSe
   this->OutSec->Info = this->Info = NumLocals + 1;
   this->OutSec->Entsize = this->Entsize;
 
-  if (Config->Relocatable) {
-size_t I = NumLocals;
-for (const SymbolTableEntry &S : Symbols)
-  S.Symbol->DynsymIndex = ++I;
+  if (Config->Relocatable)
 return;
-  }
 
   if (!StrTabSec.isDynamic()) {
-std::stable_sort(
-Symbols.begin(), Symbols.end(),
-[](const SymbolTableEntry &L, const SymbolTableEntry &R) {
-  return L.Symbol->symbol()->computeBinding() == STB_LOCAL &&
- R.Symbol->symbol()->computeBinding() != STB_LOCAL;
+auto GlobBegin = Symbols.begin() + NumLocals;
+auto It = std::stable_partition(
+GlobBegin, Symbols.end(), [](const SymbolTableEntry &S) {
+  return S.Symbol->symbol()->computeBinding() == STB_LOCAL;
 });
+// update sh_info with number of Global symbols output with computed
+// binding of STB_LOCAL
+this->OutSec->Info = this->Info = 1 + It - Symbols.begin();
 return;
   }
+
   if (In::GnuHashTab)
 // NB: It also sorts Symbols to meet the GNU hash table requirements.
 In::GnuHashTab->addSymbols(Symbols);
@@ -1094,10 +1093,25 @@ template  void SymbolTableSe
 S.Symbol->DynsymIndex = ++I;
 }
 
-template  void SymbolTableSection::addSymbol(SymbolBody *B) {
+template  void SymbolTableSection::addGlobal(SymbolBody *B) {
   Symbols.push_back({B, StrTabSec.addString(B->getName(), false)});
 }
 
+template  void SymbolTableSection::addLocal(SymbolBody *B) {
+  assert(!StrTabSec.isDynamic());
+  ++NumLocals;
+  Symbols.push_back({B, StrTabSec.addString(B->getName())});
+}
+
+template 
+size_t SymbolTableSection::getSymbolIndex(SymbolBody *Body) {
+  auto I = llvm::find_if(
+  Symbols, [&](const SymbolTableEntry &E) { return E.Symbol == Body; });
+  if (I == Symbols.end())
+return 0;
+  return I - Symbols.begin() + 1;
+}
+
 template  void SymbolTableSection::writeTo(uint8_t *Buf) {
   Buf += sizeof(Elf_Sym);
 
@@ -1113,26 +1127,24 @@ template 
 void SymbolTableSection::writeLocalSymbols(uint8_t *&Buf) {
   // Iterate over all input object files to copy their local symbols
   // to the output symbol table pointed by Buf.
-  for (ObjectFile *File : Symtab::X->getObjectFiles()) {
-for (const std::pair *, size_t> &P :
- File->KeptLocalSyms) {
-  const DefinedRegular &Body = *P.first;
-  InputSectionBase *Section = Body.Section;
-  auto *ESym = reinterpret_cast(Buf);
-
-  if (!Section) {
-ESym->st_shndx = SHN_ABS;
-ESym->st_value = B

svn commit: r313061 - vendor/libc++/dist/include

2017-02-01 Thread Dimitry Andric
Author: dim
Date: Wed Feb  1 21:35:12 2017
New Revision: 313061
URL: https://svnweb.freebsd.org/changeset/base/313061

Log:
  Vendor import of libc++ release_40 branch r293807:
  https://llvm.org/svn/llvm-project/libcxx/branches/release_40@293807

Modified:
  vendor/libc++/dist/include/mutex

Modified: vendor/libc++/dist/include/mutex
==
--- vendor/libc++/dist/include/mutexWed Feb  1 21:35:09 2017
(r313060)
+++ vendor/libc++/dist/include/mutexWed Feb  1 21:35:12 2017
(r313061)
@@ -559,7 +559,6 @@ public:
 #endif
 
 template 
-inline _LIBCPP_INLINE_VISIBILITY
 void
 __call_once_proxy(void* __vp)
 {
___
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: r313056 - in vendor/llvm/dist: cmake/modules include/llvm/CodeGen lib/CodeGen lib/CodeGen/AsmPrinter lib/CodeGen/SelectionDAG lib/MC lib/Target/Mips lib/Target/Mips/AsmParser lib/Target...

2017-02-01 Thread Dimitry Andric
Author: dim
Date: Wed Feb  1 21:34:47 2017
New Revision: 313056
URL: https://svnweb.freebsd.org/changeset/base/313056

Log:
  Vendor import of llvm release_40 branch r293807:
  https://llvm.org/svn/llvm-project/llvm/branches/release_40@293807

Added:
  vendor/llvm/dist/test/CodeGen/SystemZ/pr31710.ll
  vendor/llvm/dist/test/DebugInfo/Mips/tls.ll
  vendor/llvm/dist/test/MC/MachO/ARM/no-tls-assert.ll
  vendor/llvm/dist/test/Transforms/IPConstantProp/naked-return.ll
  vendor/llvm/dist/test/Transforms/InterleavedAccess/AArch64/
  
vendor/llvm/dist/test/Transforms/InterleavedAccess/AArch64/interleaved-accesses-extract-user.ll
  
vendor/llvm/dist/test/Transforms/InterleavedAccess/AArch64/interleaved-accesses.ll
  vendor/llvm/dist/test/Transforms/InterleavedAccess/AArch64/lit.local.cfg
  vendor/llvm/dist/test/Transforms/InterleavedAccess/ARM/
  
vendor/llvm/dist/test/Transforms/InterleavedAccess/ARM/interleaved-accesses-extract-user.ll
  vendor/llvm/dist/test/Transforms/InterleavedAccess/ARM/interleaved-accesses.ll
  vendor/llvm/dist/test/Transforms/InterleavedAccess/ARM/lit.local.cfg
Deleted:
  
vendor/llvm/dist/test/CodeGen/AArch64/aarch64-interleaved-accesses-extract-user.ll
  vendor/llvm/dist/test/CodeGen/AArch64/aarch64-interleaved-accesses.ll
  vendor/llvm/dist/test/CodeGen/ARM/arm-interleaved-accesses-extract-user.ll
  vendor/llvm/dist/test/CodeGen/ARM/arm-interleaved-accesses.ll
  vendor/llvm/dist/test/MC/Disassembler/Mips/mips4/valid-xfail-mips4.txt
  vendor/llvm/dist/test/MC/Mips/mips3/invalid-mips4-wrong-error.s
Modified:
  vendor/llvm/dist/cmake/modules/DetermineGCCCompatible.cmake
  vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h
  vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGISel.h
  vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  vendor/llvm/dist/lib/CodeGen/AsmPrinter/DIE.cpp
  vendor/llvm/dist/lib/CodeGen/InterleavedAccessPass.cpp
  vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
  vendor/llvm/dist/lib/MC/MCMachOStreamer.cpp
  vendor/llvm/dist/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
  vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsBaseInfo.h
  vendor/llvm/dist/lib/Target/Mips/MicroMipsInstrFPU.td
  vendor/llvm/dist/lib/Target/Mips/MicroMipsInstrFormats.td
  vendor/llvm/dist/lib/Target/Mips/MipsAsmPrinter.cpp
  vendor/llvm/dist/lib/Target/Mips/MipsAsmPrinter.h
  vendor/llvm/dist/lib/Target/Mips/MipsFastISel.cpp
  vendor/llvm/dist/lib/Target/Mips/MipsInstrFPU.td
  vendor/llvm/dist/lib/Target/Mips/MipsInstrFormats.td
  vendor/llvm/dist/lib/Target/Mips/MipsTargetObjectFile.cpp
  vendor/llvm/dist/lib/Target/Mips/MipsTargetObjectFile.h
  vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.td
  vendor/llvm/dist/lib/Target/PowerPC/PPCSchedule.td
  vendor/llvm/dist/lib/Target/PowerPC/PPCScheduleE500mc.td
  vendor/llvm/dist/lib/Target/PowerPC/PPCScheduleE5500.td
  vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCompares.cpp
  vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
  vendor/llvm/dist/lib/Transforms/Scalar/SCCP.cpp
  vendor/llvm/dist/test/MC/Disassembler/PowerPC/ppc64-encoding-bookIII.txt
  vendor/llvm/dist/test/MC/Mips/micromips/valid.s
  vendor/llvm/dist/test/MC/Mips/mips1/invalid-mips4-wrong-error.s
  vendor/llvm/dist/test/MC/Mips/mips1/invalid-mips4.s
  vendor/llvm/dist/test/MC/Mips/mips1/invalid-mips5-wrong-error.s
  vendor/llvm/dist/test/MC/Mips/mips1/invalid-mips5.s
  vendor/llvm/dist/test/MC/Mips/mips2/invalid-mips32.s
  vendor/llvm/dist/test/MC/Mips/mips2/invalid-mips32r2.s
  vendor/llvm/dist/test/MC/Mips/mips2/invalid-mips4-wrong-error.s
  vendor/llvm/dist/test/MC/Mips/mips2/invalid-mips4.s
  vendor/llvm/dist/test/MC/Mips/mips2/invalid-mips5.s
  vendor/llvm/dist/test/MC/Mips/mips3/invalid-mips4.s
  vendor/llvm/dist/test/MC/Mips/mips3/invalid-mips5-wrong-error.s
  vendor/llvm/dist/test/MC/Mips/mips3/invalid-mips5.s
  vendor/llvm/dist/test/MC/Mips/mips32/valid-xfail.s
  vendor/llvm/dist/test/MC/Mips/mips32/valid.s
  vendor/llvm/dist/test/MC/Mips/mips32r2/valid-xfail.s
  vendor/llvm/dist/test/MC/Mips/mips32r2/valid.s
  vendor/llvm/dist/test/MC/Mips/mips32r3/valid-xfail.s
  vendor/llvm/dist/test/MC/Mips/mips32r3/valid.s
  vendor/llvm/dist/test/MC/Mips/mips32r5/valid-xfail.s
  vendor/llvm/dist/test/MC/Mips/mips32r5/valid.s
  vendor/llvm/dist/test/MC/Mips/mips4/valid-xfail.s
  vendor/llvm/dist/test/MC/Mips/mips4/valid.s
  vendor/llvm/dist/test/MC/Mips/mips5/valid-xfail.s
  vendor/llvm/dist/test/MC/Mips/mips5/valid.s
  vendor/llvm/dist/test/MC/Mips/mips64/valid-xfail.s
  vendor/llvm/dist/test/MC/Mips/mips64/valid.s
  vendor/llvm/dist/test/MC/Mips/mips64r2/valid-xfail.s
  vendor/llvm/dist/test/MC/Mips/mips64r2/valid.s
  vendor/llvm/dist/test/MC/Mips/mips64r3/valid-xfail.s
  vendor/llvm/dist/test/MC/Mips/mips64r3/valid.s
  vendor/llvm/dist/test/MC/Mips/mips64r5/valid-xfail.s
  vendor/llvm/dist/test/MC/Mips/mips64r5/valid.s
  vendor/llvm/dist/test/MC/PowerPC/ppc64-encoding-bookIII.s
  vendor/llvm/dist/test/Transforms/InstCombine/i

svn commit: r313058 - in vendor/clang/dist: include/clang/AST include/clang/Basic include/clang/Sema lib/AST lib/CodeGen lib/Sema test/CodeGenCXX test/CodeGenObjC test/Sema test/Sema/Inputs test/Se...

2017-02-01 Thread Dimitry Andric
Author: dim
Date: Wed Feb  1 21:35:00 2017
New Revision: 313058
URL: https://svnweb.freebsd.org/changeset/base/313058

Log:
  Vendor import of clang release_40 branch r293807:
  https://llvm.org/svn/llvm-project/cfe/branches/release_40@293807

Added:
  vendor/clang/dist/test/CodeGenObjC/block-ptr-type-crash.m
  vendor/clang/dist/test/Sema/Inputs/diagnose-if-warn-system-header.h   
(contents, props changed)
Modified:
  vendor/clang/dist/include/clang/AST/Type.h
  vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td
  vendor/clang/dist/include/clang/Sema/Overload.h
  vendor/clang/dist/include/clang/Sema/Sema.h
  vendor/clang/dist/lib/AST/ExprConstant.cpp
  vendor/clang/dist/lib/CodeGen/CodeGenTypes.cpp
  vendor/clang/dist/lib/Sema/SemaChecking.cpp
  vendor/clang/dist/lib/Sema/SemaExpr.cpp
  vendor/clang/dist/lib/Sema/SemaExprCXX.cpp
  vendor/clang/dist/lib/Sema/SemaLookup.cpp
  vendor/clang/dist/lib/Sema/SemaOverload.cpp
  vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp
  vendor/clang/dist/lib/Sema/TreeTransform.h
  vendor/clang/dist/test/CodeGenCXX/microsoft-abi-default-cc.cpp
  vendor/clang/dist/test/CodeGenObjC/encode-test.m
  vendor/clang/dist/test/Sema/diagnose_if.c
  vendor/clang/dist/test/SemaCXX/destructor.cpp
  vendor/clang/dist/test/SemaCXX/diagnose_if.cpp

Modified: vendor/clang/dist/include/clang/AST/Type.h
==
--- vendor/clang/dist/include/clang/AST/Type.h  Wed Feb  1 21:34:55 2017
(r313057)
+++ vendor/clang/dist/include/clang/AST/Type.h  Wed Feb  1 21:35:00 2017
(r313058)
@@ -3827,13 +3827,13 @@ private:
 
   friend class ASTContext; // creates these
 
-  AttributedType(QualType canon, Kind attrKind,
- QualType modified, QualType equivalent)
-: Type(Attributed, canon, canon->isDependentType(),
-   canon->isInstantiationDependentType(),
-   canon->isVariablyModifiedType(),
-   canon->containsUnexpandedParameterPack()),
-  ModifiedType(modified), EquivalentType(equivalent) {
+  AttributedType(QualType canon, Kind attrKind, QualType modified,
+ QualType equivalent)
+  : Type(Attributed, canon, equivalent->isDependentType(),
+ equivalent->isInstantiationDependentType(),
+ equivalent->isVariablyModifiedType(),
+ equivalent->containsUnexpandedParameterPack()),
+ModifiedType(modified), EquivalentType(equivalent) {
 AttributedTypeBits.AttrKind = attrKind;
   }
 

Modified: vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td
==
--- vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.tdWed Feb 
 1 21:34:55 2017(r313057)
+++ vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.tdWed Feb 
 1 21:35:00 2017(r313058)
@@ -3373,7 +3373,8 @@ def note_ovl_candidate_has_pass_object_s
 "candidate address cannot be taken because parameter %0 has "
 "pass_object_size attribute">;
 def err_diagnose_if_succeeded : Error<"%0">;
-def warn_diagnose_if_succeeded : Warning<"%0">, InGroup;
+def warn_diagnose_if_succeeded : Warning<"%0">, InGroup,
+ShowInSystemHeader;
 def note_ovl_candidate_disabled_by_function_cond_attr : Note<
 "candidate disabled: %0">;
 def note_ovl_candidate_disabled_by_extension : Note<

Modified: vendor/clang/dist/include/clang/Sema/Overload.h
==
--- vendor/clang/dist/include/clang/Sema/Overload.h Wed Feb  1 21:34:55 
2017(r313057)
+++ vendor/clang/dist/include/clang/Sema/Overload.h Wed Feb  1 21:35:00 
2017(r313058)
@@ -675,26 +675,6 @@ namespace clang {
 /// to be used while performing partial ordering of function templates.
 unsigned ExplicitCallArguments;
 
-/// The number of diagnose_if attributes that this overload triggered.
-/// If any of the triggered attributes are errors, this won't count
-/// diagnose_if warnings.
-unsigned NumTriggeredDiagnoseIfs = 0;
-
-/// Basically a TinyPtrVector that doesn't own the 
vector:
-/// If NumTriggeredDiagnoseIfs is 0 or 1, this is a DiagnoseIfAttr *,
-/// otherwise it's a pointer to an array of `NumTriggeredDiagnoseIfs`
-/// DiagnoseIfAttr *s.
-llvm::PointerUnion DiagnoseIfInfo;
-
-/// Gets an ArrayRef for the data at DiagnoseIfInfo. Note that this may 
give
-/// you a pointer into DiagnoseIfInfo.
-ArrayRef getDiagnoseIfInfo() const {
-  auto *Ptr = NumTriggeredDiagnoseIfs <= 1
-  ? DiagnoseIfInfo.getAddrOfPtr1()
-  : DiagnoseIfInfo.get();
-  return {Ptr, NumTriggeredDiagnoseIfs};
-}
-
 union {
   DeductionFailureInfo DeductionFailure;
   
@@ -759,9 +739,8 @@ namespace clang {
 SmallVector Candidates;
 llvm::SmallPtrSet Functions;
 
-// Allocator for ConversionSeque

svn commit: r313059 - vendor/clang/clang-release_40-r293807

2017-02-01 Thread Dimitry Andric
Author: dim
Date: Wed Feb  1 21:35:06 2017
New Revision: 313059
URL: https://svnweb.freebsd.org/changeset/base/313059

Log:
  Tag clang release_40 branch r293807.

Added:
  vendor/clang/clang-release_40-r293807/
 - copied from r313058, vendor/clang/dist/
___
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: r313057 - vendor/llvm/llvm-release_40-r293807

2017-02-01 Thread Dimitry Andric
Author: dim
Date: Wed Feb  1 21:34:55 2017
New Revision: 313057
URL: https://svnweb.freebsd.org/changeset/base/313057

Log:
  Tag llvm release_40 branch r293807.

Added:
  vendor/llvm/llvm-release_40-r293807/
 - copied from r313056, vendor/llvm/dist/
___
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: r313053 - vendor/tcpdump

2017-02-01 Thread Gleb Smirnoff
Author: glebius
Date: Wed Feb  1 20:50:44 2017
New Revision: 313053
URL: https://svnweb.freebsd.org/changeset/base/313053

Log:
  Document tcpdump update procedure used.

Added:
  vendor/tcpdump/FreeBSD-upgrade

Added: vendor/tcpdump/FreeBSD-upgrade
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ vendor/tcpdump/FreeBSD-upgrade  Wed Feb  1 20:50:44 2017
(r313053)
@@ -0,0 +1,40 @@
+The last import of tcpdump 4.9.0 documentation.
+
+In vendor/tcpdump checkout:
+
+# tar xzvf tcpdump-4.9.0.tar.gz
+# mv tcpdump-4.9.0 4.9.0
+# svn add 4.9.0/
+# svn propdel -R svn:keywords 4.9.0
+# svn commit 4.9.0
+# cd 4.9.0
+# rsync --archive --delete . ../dist/
+# cd ../dist/
+# svn rm $(svn stat | awk '$1 == "!" { print $2 }')
+# svn add $(svn stat | awk '$1 == "?" { print $2 }')
+# svn propdel -R svn:keywords .
+# svn commit
+
+Get revision from the last command.
+
+In head checkout:
+# cd contrib/tcpdump
+# svn merge -c ${rev} svn+ssh://repo.freebsd.org/base/vendor/tcpdump/dist
+
+Resolve conflicts.
+
+Our exclusion list is:
+
+aclocal.m4
+Readme.Win32
+tests
+win32
+
+In head checkout:
+
+# cd usr.sbin/tcpdump
+
+Update Makefile if needed, and config.h. Compare to config.h generated by
+configure.
+
+Run 'make worlds' to test that everything is compilable. Commit.
___
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: r313052 - in head/contrib/compiler-rt/lib: asan lsan sanitizer_common

2017-02-01 Thread Dimitry Andric
Author: dim
Date: Wed Feb  1 20:41:09 2017
New Revision: 313052
URL: https://svnweb.freebsd.org/changeset/base/313052

Log:
  Pull in r293536 from upstream compiler-rt trunk:
  
Recommit: Stop intercepting some malloc-related functions on FreeBSD
and macOS
  
Summary:
In https://bugs.freebsd.org/215125 I was notified that some configure
scripts attempt to test for the Linux-specific `mallinfo` and
`mallopt` functions by compiling and linking small programs which
references the functions, and observing whether that results in
errors.
  
FreeBSD and macOS do not have the `mallinfo` and `mallopt` functions,
so normally these tests would fail, but when sanitizers are enabled,
they incorrectly succeed, because the sanitizers define interceptors
for these functions.  This also applies to some other malloc-related
functions, such as `memalign`, `pvalloc` and `cfree`.
  
Fix this by not intercepting `mallinfo`, `mallopt`, `memalign`,
`pvalloc` and `cfree` for FreeBSD and macOS, in all sanitizers.
  
Also delete the non-functional `cfree` wrapper for Windows, to fix the
test cases on that platform.
  
Reviewers: emaste, kcc, rnk
  
Subscribers: timu, eugenis, hans, joerg, llvm-commits, kubamracek
  
Differential Revision: https://reviews.llvm.org/D27654
  
  This prevents autoconf scripts from incorrectly detecting that functions
  like mallinfo, mallopt, memalign, pvalloc and cfree are supported.
  
  PR:   215125, 215455
  MFC after:1 week

Modified:
  head/contrib/compiler-rt/lib/asan/asan_malloc_linux.cc
  head/contrib/compiler-rt/lib/asan/asan_malloc_win.cc
  head/contrib/compiler-rt/lib/lsan/lsan_interceptors.cc
  
head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h

Modified: head/contrib/compiler-rt/lib/asan/asan_malloc_linux.cc
==
--- head/contrib/compiler-rt/lib/asan/asan_malloc_linux.cc  Wed Feb  1 
20:28:48 2017(r313051)
+++ head/contrib/compiler-rt/lib/asan/asan_malloc_linux.cc  Wed Feb  1 
20:41:09 2017(r313052)
@@ -50,12 +50,14 @@ INTERCEPTOR(void, free, void *ptr) {
   asan_free(ptr, &stack, FROM_MALLOC);
 }
 
+#if SANITIZER_INTERCEPT_CFREE
 INTERCEPTOR(void, cfree, void *ptr) {
   GET_STACK_TRACE_FREE;
   if (UNLIKELY(IsInDlsymAllocPool(ptr)))
 return;
   asan_free(ptr, &stack, FROM_MALLOC);
 }
+#endif // SANITIZER_INTERCEPT_CFREE
 
 INTERCEPTOR(void*, malloc, uptr size) {
   if (UNLIKELY(!asan_inited))
@@ -85,22 +87,24 @@ INTERCEPTOR(void*, realloc, void *ptr, u
   return asan_realloc(ptr, size, &stack);
 }
 
+#if SANITIZER_INTERCEPT_MEMALIGN
 INTERCEPTOR(void*, memalign, uptr boundary, uptr size) {
   GET_STACK_TRACE_MALLOC;
   return asan_memalign(boundary, size, &stack, FROM_MALLOC);
 }
 
-INTERCEPTOR(void*, aligned_alloc, uptr boundary, uptr size) {
-  GET_STACK_TRACE_MALLOC;
-  return asan_memalign(boundary, size, &stack, FROM_MALLOC);
-}
-
 INTERCEPTOR(void*, __libc_memalign, uptr boundary, uptr size) {
   GET_STACK_TRACE_MALLOC;
   void *res = asan_memalign(boundary, size, &stack, FROM_MALLOC);
   DTLS_on_libc_memalign(res, size);
   return res;
 }
+#endif // SANITIZER_INTERCEPT_MEMALIGN
+
+INTERCEPTOR(void*, aligned_alloc, uptr boundary, uptr size) {
+  GET_STACK_TRACE_MALLOC;
+  return asan_memalign(boundary, size, &stack, FROM_MALLOC);
+}
 
 INTERCEPTOR(uptr, malloc_usable_size, void *ptr) {
   GET_CURRENT_PC_BP_SP;
@@ -108,6 +112,7 @@ INTERCEPTOR(uptr, malloc_usable_size, vo
   return asan_malloc_usable_size(ptr, pc, bp);
 }
 
+#if SANITIZER_INTERCEPT_MALLOPT_AND_MALLINFO
 // We avoid including malloc.h for portability reasons.
 // man mallinfo says the fields are "long", but the implementation uses int.
 // It doesn't matter much -- we just need to make sure that the libc's mallinfo
@@ -125,6 +130,7 @@ INTERCEPTOR(struct fake_mallinfo, mallin
 INTERCEPTOR(int, mallopt, int cmd, int value) {
   return -1;
 }
+#endif // SANITIZER_INTERCEPT_MALLOPT_AND_MALLINFO
 
 INTERCEPTOR(int, posix_memalign, void **memptr, uptr alignment, uptr size) {
   GET_STACK_TRACE_MALLOC;
@@ -137,10 +143,12 @@ INTERCEPTOR(void*, valloc, uptr size) {
   return asan_valloc(size, &stack);
 }
 
+#if SANITIZER_INTERCEPT_PVALLOC
 INTERCEPTOR(void*, pvalloc, uptr size) {
   GET_STACK_TRACE_MALLOC;
   return asan_pvalloc(size, &stack);
 }
+#endif // SANITIZER_INTERCEPT_PVALLOC
 
 INTERCEPTOR(void, malloc_stats, void) {
   __asan_print_accumulated_stats();

Modified: head/contrib/compiler-rt/lib/asan/asan_malloc_win.cc
==
--- head/contrib/compiler-rt/lib/asan/asan_malloc_win.ccWed Feb  1 
20:28:48 2017(r313051)
+++ head/contrib/compiler-rt/lib/asan/asan_malloc_win.ccWed Feb  1 
20:41:09 2017(r313052)
@@ -56,11 +56,6 @@ void _free_base(void *ptr) {
 }
 
 ALLOCATION_FUNCTION_ATTRIBUTE
-void c

svn commit: r313050 - stable/11/sys/net

2017-02-01 Thread Kristof Provost
Author: kp
Date: Wed Feb  1 20:27:38 2017
New Revision: 313050
URL: https://svnweb.freebsd.org/changeset/base/313050

Log:
  MFC 312782
  
  bridge: Release the bridge lock when calling bridge_set_ifcap()
  
  This calls ioctl() handlers for the different interfaces in the bridge.
  These handlers expect to get called in an ioctl context where it's safe
  for them to sleep. We may not sleep with the bridge lock held.
  
  However, we still need to protect the interface list, to ensure it
  doesn't get changed while we iterate over it.
  Use BRIDGE_XLOCK(), which prevents bridge members from being removed.
  Adding bridge members is safe, because it uses LIST_INSERT_HEAD().
  
  This caused panics when adding xen interfaces to a bridge.
  
  PR:   216304
  Reviewed by:  ae
  Sponsored by: RootBSD
  Differential Revision:https://reviews.freebsd.org/D9290

Modified:
  stable/11/sys/net/if_bridge.c
  stable/11/sys/net/if_bridgevar.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/net/if_bridge.c
==
--- stable/11/sys/net/if_bridge.c   Wed Feb  1 20:27:07 2017
(r313049)
+++ stable/11/sys/net/if_bridge.c   Wed Feb  1 20:27:38 2017
(r313050)
@@ -909,14 +909,18 @@ bridge_mutecaps(struct bridge_softc *sc)
mask &= bif->bif_savedcaps;
}
 
+   BRIDGE_XLOCK(sc);
LIST_FOREACH(bif, &sc->sc_iflist, bif_next) {
enabled = bif->bif_ifp->if_capenable;
enabled &= ~BRIDGE_IFCAPS_STRIP;
/* strip off mask bits and enable them again if allowed */
enabled &= ~BRIDGE_IFCAPS_MASK;
enabled |= mask;
+   BRIDGE_UNLOCK(sc);
bridge_set_ifcap(sc, bif, enabled);
+   BRIDGE_LOCK(sc);
}
+   BRIDGE_XDROP(sc);
 
 }
 
@@ -927,6 +931,8 @@ bridge_set_ifcap(struct bridge_softc *sc
struct ifreq ifr;
int error;
 
+   BRIDGE_UNLOCK_ASSERT(sc);
+
bzero(&ifr, sizeof(ifr));
ifr.ifr_reqcap = set;
 

Modified: stable/11/sys/net/if_bridgevar.h
==
--- stable/11/sys/net/if_bridgevar.hWed Feb  1 20:27:07 2017
(r313049)
+++ stable/11/sys/net/if_bridgevar.hWed Feb  1 20:27:38 2017
(r313050)
@@ -280,6 +280,7 @@ struct ifbpstpconf {
 #define BRIDGE_LOCK(_sc)   mtx_lock(&(_sc)->sc_mtx)
 #define BRIDGE_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx)
 #define BRIDGE_LOCK_ASSERT(_sc)mtx_assert(&(_sc)->sc_mtx, 
MA_OWNED)
+#define BRIDGE_UNLOCK_ASSERT(_sc)  mtx_assert(&(_sc)->sc_mtx, MA_NOTOWNED)
 #defineBRIDGE_LOCK2REF(_sc, _err)  do {\
mtx_assert(&(_sc)->sc_mtx, MA_OWNED);   \
if ((_sc)->sc_iflist_xcnt > 0)  \
___
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: r313049 - svnadmin/conf

2017-02-01 Thread Gleb Smirnoff
Author: glebius
Date: Wed Feb  1 20:27:07 2017
New Revision: 313049
URL: https://svnweb.freebsd.org/changeset/base/313049

Log:
  Remove me from sizelimit.conf

Modified:
  svnadmin/conf/sizelimit.conf

Modified: svnadmin/conf/sizelimit.conf
==
--- svnadmin/conf/sizelimit.confWed Feb  1 20:26:42 2017
(r313048)
+++ svnadmin/conf/sizelimit.confWed Feb  1 20:27:07 2017
(r313049)
@@ -27,4 +27,3 @@ np
 obrien
 peter
 rwatson
-glebius
___
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: r313048 - in head: contrib/tcpdump contrib/tcpdump/lbl contrib/tcpdump/missing usr.sbin/tcpdump/tcpdump

2017-02-01 Thread Gleb Smirnoff
Author: glebius
Date: Wed Feb  1 20:26:42 2017
New Revision: 313048
URL: https://svnweb.freebsd.org/changeset/base/313048

Log:
  Update tcpdump to 4.9.0.
  
  It fixes many buffer overflow in different protocol parsers, but none of
  them are critical, even in absense of Capsicum.
  
  Security: CVE-2016-7922, CVE-2016-7923, CVE-2016-7924, CVE-2016-7925
  Security: CVE-2016-7926, CVE-2016-7927, CVE-2016-7928, CVE-2016-7929
  Security: CVE-2016-7930, CVE-2016-7931, CVE-2016-7932, CVE-2016-7933
  Security: CVE-2016-7934, CVE-2016-7935, CVE-2016-7936, CVE-2016-7937
  Security: CVE-2016-7938, CVE-2016-7939, CVE-2016-7940, CVE-2016-7973
  Security: CVE-2016-7974, CVE-2016-7975, CVE-2016-7983, CVE-2016-7984
  Security: CVE-2016-7985, CVE-2016-7986, CVE-2016-7992, CVE-2016-7993
  Security: CVE-2016-8574, CVE-2016-8575, CVE-2017-5202, CVE-2017-5203
  Security: CVE-2017-5204, CVE-2017-5205, CVE-2017-5341, CVE-2017-5342
  Security: CVE-2017-5482, CVE-2017-5483, CVE-2017-5484, CVE-2017-5485
  Security: CVE-2017-5486

Added:
  head/contrib/tcpdump/CONTRIBUTING
 - copied unchanged from r313024, vendor/tcpdump/dist/CONTRIBUTING
  head/contrib/tcpdump/PLATFORMS
 - copied unchanged from r313024, vendor/tcpdump/dist/PLATFORMS
  head/contrib/tcpdump/README
 - copied unchanged from r313024, vendor/tcpdump/dist/README
  head/contrib/tcpdump/addrtostr.c
 - copied, changed from r313024, vendor/tcpdump/dist/addrtostr.c
  head/contrib/tcpdump/addrtostr.h
 - copied unchanged from r313024, vendor/tcpdump/dist/addrtostr.h
  head/contrib/tcpdump/ascii_strcasecmp.c
 - copied unchanged from r313024, vendor/tcpdump/dist/ascii_strcasecmp.c
  head/contrib/tcpdump/ascii_strcasecmp.h
 - copied unchanged from r313024, vendor/tcpdump/dist/ascii_strcasecmp.h
  head/contrib/tcpdump/netdissect-stdinc.h
 - copied unchanged from r313024, vendor/tcpdump/dist/netdissect-stdinc.h
  head/contrib/tcpdump/netdissect.c
 - copied unchanged from r313024, vendor/tcpdump/dist/netdissect.c
  head/contrib/tcpdump/print-hncp.c
 - copied unchanged from r313024, vendor/tcpdump/dist/print-hncp.c
  head/contrib/tcpdump/print-lisp.c
 - copied unchanged from r313024, vendor/tcpdump/dist/print-lisp.c
  head/contrib/tcpdump/print-medsa.c
 - copied unchanged from r313024, vendor/tcpdump/dist/print-medsa.c
  head/contrib/tcpdump/print-nsh.c
 - copied unchanged from r313024, vendor/tcpdump/dist/print-nsh.c
  head/contrib/tcpdump/print-resp.c
 - copied unchanged from r313024, vendor/tcpdump/dist/print-resp.c
  head/contrib/tcpdump/print-vxlan-gpe.c
 - copied unchanged from r313024, vendor/tcpdump/dist/print-vxlan-gpe.c
  head/contrib/tcpdump/print.c
 - copied unchanged from r313024, vendor/tcpdump/dist/print.c
  head/contrib/tcpdump/print.h
 - copied unchanged from r313024, vendor/tcpdump/dist/print.h
  head/contrib/tcpdump/strtoaddr.c
 - copied unchanged from r313024, vendor/tcpdump/dist/strtoaddr.c
  head/contrib/tcpdump/strtoaddr.h
 - copied unchanged from r313024, vendor/tcpdump/dist/strtoaddr.h
  head/contrib/tcpdump/timeval-operations.h
 - copied unchanged from r313024, vendor/tcpdump/dist/timeval-operations.h
  head/contrib/tcpdump/util-print.c
 - copied unchanged from r313024, vendor/tcpdump/dist/util-print.c
Deleted:
  head/contrib/tcpdump/.cvsignore
  head/contrib/tcpdump/atmuni31.h
  head/contrib/tcpdump/missing/addrinfo.h
  head/contrib/tcpdump/missing/getnameinfo.c
  head/contrib/tcpdump/missing/inet_aton.c
  head/contrib/tcpdump/missing/inet_ntop.c
  head/contrib/tcpdump/missing/inet_pton.c
  head/contrib/tcpdump/strcasecmp.c
  head/contrib/tcpdump/tcpdump-stdinc.h
  head/contrib/tcpdump/util.c
Modified:
  head/contrib/tcpdump/CHANGES   (contents, props changed)
  head/contrib/tcpdump/CREDITS   (contents, props changed)
  head/contrib/tcpdump/INSTALL.txt   (contents, props changed)
  head/contrib/tcpdump/Makefile.in   (contents, props changed)
  head/contrib/tcpdump/VERSION   (contents, props changed)
  head/contrib/tcpdump/addrtoname.c   (contents, props changed)
  head/contrib/tcpdump/addrtoname.h   (contents, props changed)
  head/contrib/tcpdump/af.c   (contents, props changed)
  head/contrib/tcpdump/af.h   (contents, props changed)
  head/contrib/tcpdump/bpf_dump.c   (contents, props changed)
  head/contrib/tcpdump/checksum.c   (contents, props changed)
  head/contrib/tcpdump/config.h.in   (contents, props changed)
  head/contrib/tcpdump/configure   (contents, props changed)
  head/contrib/tcpdump/configure.in   (contents, props changed)
  head/contrib/tcpdump/cpack.c   (contents, props changed)
  head/contrib/tcpdump/cpack.h   (contents, props changed)
  head/contrib/tcpdump/ether.h   (contents, props changed)
  head/contrib/tcpdump/ethertype.h   (contents, props changed)
  head/contrib/tcpdump/extract.h   (contents, props changed)
  head/contrib/tcpdump/gmpls.c   (contents, props changed)
  head/contrib/tcpdump/gmt2local.c   

svn commit: r313047 - in head/sys/boot: common i386/libi386 uboot/lib usb/storage zfs

2017-02-01 Thread Toomas Soome
Author: tsoome
Date: Wed Feb  1 20:10:56 2017
New Revision: 313047
URL: https://svnweb.freebsd.org/changeset/base/313047

Log:
  loader: disk/part api needs to use uint64_t offsets
  
  The disk_* and part_* api is using 64bit values for media size and
  offsets. However, the current api is using off_t type, which is signed
  64-bit int.
  
  In this context the signed media size does not make any sense, and
  the offsets are used to mark absolute, not relative locations.
  
  Also, the data from GPT partition table and some other sources is
  already using uint64_t data type, so using signed off_t can cause sign
  issues.
  
  Reviewed by:  imp
  Approved by:  imp (mentor)
  Differential Revision:https://reviews.freebsd.org/D8710

Modified:
  head/sys/boot/common/disk.c
  head/sys/boot/common/disk.h
  head/sys/boot/common/part.c
  head/sys/boot/common/part.h
  head/sys/boot/i386/libi386/biosdisk.c
  head/sys/boot/uboot/lib/disk.c
  head/sys/boot/usb/storage/umass_loader.c
  head/sys/boot/zfs/zfs.c

Modified: head/sys/boot/common/disk.c
==
--- head/sys/boot/common/disk.c Wed Feb  1 19:36:33 2017(r313046)
+++ head/sys/boot/common/disk.c Wed Feb  1 20:10:56 2017(r313047)
@@ -45,7 +45,7 @@ __FBSDID("$FreeBSD$");
 
 struct open_disk {
struct ptable   *table;
-   off_t   mediasize;
+   uint64_tmediasize;
u_int   sectorsize;
u_int   flags;
int rcnt;
@@ -64,7 +64,7 @@ struct dentry {
int d_partition;
 
struct open_disk*od;
-   off_t   d_offset;
+   uint64_td_offset;
STAILQ_ENTRY(dentry)entry;
 #ifdef DISK_DEBUG
uint32_tcount;
@@ -171,7 +171,7 @@ display_size(uint64_t size, u_int sector
 }
 
 int
-ptblread(void *d, void *buf, size_t blocks, off_t offset)
+ptblread(void *d, void *buf, size_t blocks, uint64_t offset)
 {
struct disk_devdesc *dev;
struct open_disk *od;
@@ -238,7 +238,7 @@ disk_print(struct disk_devdesc *dev, cha
 }
 
 int
-disk_read(struct disk_devdesc *dev, void *buf, off_t offset, u_int blocks)
+disk_read(struct disk_devdesc *dev, void *buf, uint64_t offset, u_int blocks)
 {
struct open_disk *od;
int ret;
@@ -251,7 +251,7 @@ disk_read(struct disk_devdesc *dev, void
 }
 
 int
-disk_write(struct disk_devdesc *dev, void *buf, off_t offset, u_int blocks)
+disk_write(struct disk_devdesc *dev, void *buf, uint64_t offset, u_int blocks)
 {
struct open_disk *od;
int ret;
@@ -274,7 +274,7 @@ disk_ioctl(struct disk_devdesc *dev, u_l
 }
 
 int
-disk_open(struct disk_devdesc *dev, off_t mediasize, u_int sectorsize,
+disk_open(struct disk_devdesc *dev, uint64_t mediasize, u_int sectorsize,
 u_int flags)
 {
struct open_disk *od;

Modified: head/sys/boot/common/disk.h
==
--- head/sys/boot/common/disk.h Wed Feb  1 19:36:33 2017(r313046)
+++ head/sys/boot/common/disk.h Wed Feb  1 20:10:56 2017(r313047)
@@ -86,7 +86,7 @@ struct disk_devdesc
void*d_opendata;
int d_slice;
int d_partition;
-   off_t   d_offset;
+   uint64_td_offset;
 };
 
 enum disk_ioctl {
@@ -97,17 +97,17 @@ enum disk_ioctl {
 /*
  * Parse disk metadata and initialise dev->d_offset.
  */
-extern int disk_open(struct disk_devdesc *dev, off_t mediasize,
+extern int disk_open(struct disk_devdesc *dev, uint64_t mediasize,
 u_int sectorsize, u_int flags);
 #defineDISK_F_NOCACHE  0x0001  /* Do not use metadata caching 
*/
 extern int disk_close(struct disk_devdesc *dev);
 extern void disk_cleanup(const struct devsw *d_dev);
 extern int disk_ioctl(struct disk_devdesc *dev, u_long cmd, void *buf);
-extern int disk_read(struct disk_devdesc *dev, void *buf, off_t offset,
+extern int disk_read(struct disk_devdesc *dev, void *buf, uint64_t offset,
 u_int blocks);
-extern int disk_write(struct disk_devdesc *dev, void *buf, off_t offset,
+extern int disk_write(struct disk_devdesc *dev, void *buf, uint64_t offset,
 u_int blocks);
-extern int ptblread(void *d, void *buf, size_t blocks, off_t offset);
+extern int ptblread(void *d, void *buf, size_t blocks, uint64_t offset);
 
 /*
  * Print information about slices on a disk.

Modified: head/sys/boot/common/part.c
==
--- head/sys/boot/common/part.c Wed Feb  1 19:36:33 2017(r313046)
+++ head/sys/boot/common/part.c Wed Feb  1 20:10:56 2017(r313047)
@@ -584,7 +584,7 @@ out:
 #endif /* LOADER_VTOC8_SUPPORT */
 
 struct ptable*
-ptable_open(void *dev, off_t sectors, uint16_t sectorsize,
+ptable_open(void *dev, uint64_t sectors, ui

svn commit: r313045 - in head: cddl/lib/libdtrace sys/netinet

2017-02-01 Thread George V. Neville-Neil
Author: gnn
Date: Wed Feb  1 19:33:00 2017
New Revision: 313045
URL: https://svnweb.freebsd.org/changeset/base/313045

Log:
  Add an mbuf to ipinfo_t translator to finish cleanup of mbuf passing to TCP 
probes.
  
  Reviewed by:  markj
  MFC after:2 weeks
  Sponsored by: DARPA, AFRL
  Differential Revision:https://reviews.freebsd.org/D9401

Modified:
  head/cddl/lib/libdtrace/ip.d
  head/sys/netinet/in_kdtrace.c

Modified: head/cddl/lib/libdtrace/ip.d
==
--- head/cddl/lib/libdtrace/ip.dWed Feb  1 16:15:23 2017
(r313044)
+++ head/cddl/lib/libdtrace/ip.dWed Feb  1 19:33:00 2017
(r313045)
@@ -238,6 +238,24 @@ translator ipinfo_t < uint8_t *p > {
inet_ntoa6(&((struct ip6_hdr *)p)->ip6_dst);
 };
 
+#pragma D binding "1.13" translator
+translator ipinfo_t < struct mbuf *m > {
+   ip_ver =m == NULL ? 0 : ((struct ip *)m->m_data)->ip_v;
+   ip_plength =m == NULL ? 0 :
+   ((struct ip *)m->m_data)->ip_v == 4 ?
+   ntohs(((struct ip *)m->m_data)->ip_len) - 
+   (((struct ip *)m->m_data)->ip_hl << 2):
+   ntohs(((struct ip6_hdr 
*)m->m_data)->ip6_ctlun.ip6_un1.ip6_un1_plen);
+   ip_saddr =  m == NULL ? 0 :
+   ((struct ip *)m->m_data)->ip_v == 4 ?
+   inet_ntoa(&((struct ip *)m->m_data)->ip_src.s_addr) :
+   inet_ntoa6(&((struct ip6_hdr *)m->m_data)->ip6_src);
+   ip_daddr =  m == NULL ? 0 :
+   ((struct ip *)m->m_data)->ip_v == 4 ?
+   inet_ntoa(&((struct ip *)m->m_data)->ip_dst.s_addr) :
+   inet_ntoa6(&((struct ip6_hdr *)m->m_data)->ip6_dst);
+};
+
 #pragma D binding "1.5" IFF_LOOPBACK
 inline int IFF_LOOPBACK =  0x8;
 

Modified: head/sys/netinet/in_kdtrace.c
==
--- head/sys/netinet/in_kdtrace.c   Wed Feb  1 16:15:23 2017
(r313044)
+++ head/sys/netinet/in_kdtrace.c   Wed Feb  1 19:33:00 2017
(r313045)
@@ -56,28 +56,28 @@ SDT_PROBE_DEFINE6_XLATE(ip, , , send,
 SDT_PROBE_DEFINE5_XLATE(tcp, , , accept__established,
 "void *", "pktinfo_t *",
 "struct tcpcb *", "csinfo_t *",
-"uint8_t *", "ipinfo_t *",
+"struct mbuf *", "ipinfo_t *",
 "struct tcpcb *", "tcpsinfo_t *" ,
 "struct tcphdr *", "tcpinfoh_t *");
 
 SDT_PROBE_DEFINE5_XLATE(tcp, , , accept__refused,
 "void *", "pktinfo_t *",
 "struct tcpcb *", "csinfo_t *",
-"uint8_t *", "ipinfo_t *",
+"struct mbuf *", "ipinfo_t *",
 "struct tcpcb *", "tcpsinfo_t *" ,
 "struct tcphdr *", "tcpinfo_t *");
 
 SDT_PROBE_DEFINE5_XLATE(tcp, , , connect__established,
 "void *", "pktinfo_t *",
 "struct tcpcb *", "csinfo_t *",
-"uint8_t *", "ipinfo_t *",
+"struct mbuf *", "ipinfo_t *",
 "struct tcpcb *", "tcpsinfo_t *" ,
 "struct tcphdr *", "tcpinfoh_t *");
 
 SDT_PROBE_DEFINE5_XLATE(tcp, , , connect__refused,
 "void *", "pktinfo_t *",
 "struct tcpcb *", "csinfo_t *",
-"uint8_t *", "ipinfo_t *",
+"struct mbuf *", "ipinfo_t *",
 "struct tcpcb *", "tcpsinfo_t *" ,
 "struct tcphdr *", "tcpinfoh_t *");
 
@@ -91,7 +91,7 @@ SDT_PROBE_DEFINE5_XLATE(tcp, , , connect
 SDT_PROBE_DEFINE5_XLATE(tcp, , , receive,
 "void *", "pktinfo_t *",
 "struct tcpcb *", "csinfo_t *",
-"uint8_t *", "ipinfo_t *",
+"struct mbuf *", "ipinfo_t *",
 "struct tcpcb *", "tcpsinfo_t *" ,
 "struct tcphdr *", "tcpinfoh_t *");
 
@@ -113,7 +113,7 @@ SDT_PROBE_DEFINE3_XLATE(tcp, , , debug__
 SDT_PROBE_DEFINE3_XLATE(tcp, , , debug__output,
 "struct tcpcb *", "tcpsinfo_t *" ,
 "struct tcphdr *", "tcpinfo_t *",
-"uint8_t *", "ipinfo_t *");
+"struct mbuf *", "ipinfo_t *");
 
 SDT_PROBE_DEFINE2_XLATE(tcp, , , debug__user,
 "struct tcpcb *", "tcpsinfo_t *" ,
@@ -122,7 +122,7 @@ SDT_PROBE_DEFINE2_XLATE(tcp, , , debug__
 SDT_PROBE_DEFINE3_XLATE(tcp, , , debug__drop,
 "struct tcpcb *", "tcpsinfo_t *" ,
 "struct tcphdr *", "tcpinfo_t *",
-"uint8_t *", "ipinfo_t *");
+"struct mbuf *", "ipinfo_t *");
 
 SDT_PROBE_DEFINE6_XLATE(tcp, , , state__change,
 "void *", "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"



Re: svn commit: r312988 - in head/sys: compat/cloudabi compat/linux kern sys

2017-02-01 Thread Gleb Smirnoff
On Tue, Jan 31, 2017 at 02:13:36PM -0800, John Baldwin wrote:
J> On Monday, January 30, 2017 12:57:23 PM Edward Tomasz Napierala wrote:
J> > Author: trasz
J> > Date: Mon Jan 30 12:57:22 2017
J> > New Revision: 312988
J> > URL: https://svnweb.freebsd.org/changeset/base/312988
J> > 
J> > Log:
J> >   Add kern_listen(), kern_shutdown(), and kern_socket(), and use them
J> >   instead of their sys_*() counterparts in various compats. The svr4
J> >   is left untouched, because there's no point.
J> 
J> Note that you can compile test svr4 since it is still in the tree.
J> If we want to remove svr4, then we should remove it.  However, we
J> should maintain code that is in the tree if it is still there.

All we can do right now is maintain it as compilable. My example with
COMPAT_OLDSOCK shows that SVR4 simply doesn't work as kld, and nobody
complains.

Okay, what if I say on freebsd-arch/freebsd-current that I am going
to remove it and wait for any objections for a month, and then do it?

-- 
Totus tuus, Glebius.
___
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: r313043 - head/sys/kern

2017-02-01 Thread Gleb Smirnoff
On Wed, Feb 01, 2017 at 01:12:07PM +, Hartmut Brandt wrote:
H> Author: harti
H> Date: Wed Feb  1 13:12:07 2017
H> New Revision: 313043
H> URL: https://svnweb.freebsd.org/changeset/base/313043
H> 
H> Log:
H>   Merge filt_soread and filt_solisten and decide what to do when checking
H>   for EVFILT_READ at the point of the check not when the event is registers.
H>   This fixes a problem with asio when accepting a connection.
H>   
H>   Reviewed by:   kib@, Scott Mitchell

This goes into opposite direction with what I am doing:

https://reviews.freebsd.org/D9356

Can you please explain the problem with asio when accepting a connection?

-- 
Totus tuus, Glebius.
___
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: r312910 - in head: . etc/etc.pc98 etc/rc.d lib/libsysdecode libexec release release/doc release/doc/en_US.ISO8859-1/hardware release/doc/en_US.ISO8859-1/readme release/doc/share/exampl

2017-02-01 Thread Warner Losh
On Wed, Feb 1, 2017 at 10:06 AM, Slawa Olhovchenkov  wrote:
> On Wed, Feb 01, 2017 at 08:59:40AM -0800, John Baldwin wrote:
>
>> On Wednesday, February 01, 2017 01:35:56 PM Slawa Olhovchenkov wrote:
>> > On Tue, Jan 31, 2017 at 02:46:23PM -0800, John Baldwin wrote:
>> >
>> > > On Tuesday, January 31, 2017 03:33:55 PM Warner Losh wrote:
>> > > > On Tue, Jan 31, 2017 at 3:20 PM, John Baldwin  wrote:
>> > > > > On Saturday, January 28, 2017 02:22:15 AM Takahashi Yoshihiro wrote:
>> > > > >> Author: nyan
>> > > > >> Date: Sat Jan 28 02:22:15 2017
>> > > > >> New Revision: 312910
>> > > > >> URL: https://svnweb.freebsd.org/changeset/base/312910
>> > > > >>
>> > > > >> Log:
>> > > > >>   Remove pc98 support completely.
>> > > > >>   I thank all developers and contributors for pc98.
>> > > > >>
>> > > > >>   Relnotes:   yes
>> > > > >
>> > > > > BTW, my impression was that there are some other device drivers
>> > > > > that are effectively PC-98 only (e.g. everything that uses 
>> > > > > scsi_low.c)
>> > > > > but they might have pccard attachments for use with PC-98 laptops?
>> > > > >
>> > > > > Perhaps Warner might know?
>> > > > >
>> > > > > It seems stg(4) had PCI variants, but nsp(4), ncv(4), and stg(4)
>> > > > > all came from NetBSD/pc98 via PAO.
>> > > >
>> > > > These all work correctly on any PC Card machine. The only reason they
>> > > > came in this way was because these devices were original marketed only
>> > > > in Japan. I've used all these cards with external SCSI drives in the
>> > > > past.
>> > > >
>> > > > As far as I know, only the if_snc driver, which was removed, is truly
>> > > > pc98 specific. It is wired in such a way that cannot be used in ibm-at
>> > > > compatible laptops.  IIRC, it had hard-wired memory decode lines that
>> > > > landed in the middle of the VGA graphics pages or BIOS low memory
>> > > > areas. I have one of these cards still, and it will be detected on my
>> > > > laptops, but can't work due to the required mappings.
>> > > >
>> > > > Now, there's an different question about whether it is time to retire
>> > > > some of the now-ancient SCSI cards from the system, but that's a
>> > > > different kettle of fish that's larger than just nsp, ncv and stg.
>> > >
>> > > Fair enough.  I haven't fully put away my 12 axe and am toying with
>> > > dropping any ISA-only storage and NIC drivers (and perhaps pccard-only
>> > > as well in that case).  Hardware that wants to use ISA/pccard for
>> > > storage is probably happier running 4.x anyway.  One question is if we
>> > > should drop ISA attachments in that case for drivers that support PCI
>> > > and ISA.  However, there's a fair list of ISA-only adapters that would
>> > > be a good place to start anyway.  One concern is to not drop any drivers
>> >
>> > ps/2 keyboard, mouse, touchpads, lm sensors, etc?...
>>
>> Those aren't storage or NICs.  There are many "legacy" device still present
>> in modern systems that we obviously have to support.  However, if you have
>> an ISA Adapter SCSI HBA in an ISA slot, the machine running that is probably
>> happier running 4.x than 12.0.
>
> My be I am missread, I think removed ISA bus and all devices attached
> to ISA bus.

We will never ever ever remove the ISA bus on the i386 or amd64 ports.
That's simply not possible due to the legacy busses and the fact that
many devices are logically attached to the address space used by the
ISA bus even if there aren't physical plastic ISA slots.

Ps/2 keyboards, mice, etc usually also have ACPI attachments. lm
sensors might not, but those are still used and useful.

If you have an ISA system, you are limited to about 16-32MB of RAM.
That's what John is talking about. These systems will barely boot a
modern FreeBSD. However, there are many people that have ISA cards in
a PCI system to do things. Those systems can still run FreeBSD
decently well if they aren't running X11. However, performance of ISA
SCSI and ISA Networking cards for those boxes is horrible and there
are many PCI-based alternatives that should drop in. I have a friend
that has several of these systems he's not going to ever upgrade the
hardware since they work just fine for what he needs. He does want to
run the latest software to pickup security fixes. But AFAIK, none of
these systems is using ISA SCSI. There may be the odd NE-2000
compatible ISA card, but even those have been upgraded a long time ago
when his DSL speeds started to exceed 10Mbps.

John's point is there's little practical value to keeping the old ISA
SCSI cards in the tree. And there's some benefit to removing them
since there are a few CAM features that are used only on one or two of
these systems. ISA Networking cards are limited to 10Mbps (even if
they have PHYs that do 100Mbps) because of the ISA bus. These cards
aren't installed in modern systems, and it is quite doubtful they are
in systems that will be upgraded to 12. And they are untested. Since
there's a non-zero cost in keeping them, there needs to be s

Re: svn commit: r313043 - head/sys/kern

2017-02-01 Thread hiren panchasara
On 02/01/17 at 01:12P, Hartmut Brandt wrote:
> Author: harti
> Date: Wed Feb  1 13:12:07 2017
> New Revision: 313043
> URL: https://svnweb.freebsd.org/changeset/base/313043
> 
> Log:
>   Merge filt_soread and filt_solisten and decide what to do when checking
>   for EVFILT_READ at the point of the check not when the event is registers.
>   This fixes a problem with asio when accepting a connection.
>   
>   Reviewed by:kib@, Scott Mitchell
> 
> Modified:
>   head/sys/kern/uipc_socket.c

Is it possible to MFC this back to 11?

Cheers,
Hiren


pgpj_Qej66LQO.pgp
Description: PGP signature


Re: svn commit: r312910 - in head: . etc/etc.pc98 etc/rc.d lib/libsysdecode libexec release release/doc release/doc/en_US.ISO8859-1/hardware release/doc/en_US.ISO8859-1/readme release/doc/share/exampl

2017-02-01 Thread Slawa Olhovchenkov
On Wed, Feb 01, 2017 at 08:59:40AM -0800, John Baldwin wrote:

> > > Fair enough.  I haven't fully put away my 12 axe and am toying with
> > > dropping any ISA-only storage and NIC drivers (and perhaps pccard-only
> > > as well in that case).  Hardware that wants to use ISA/pccard for
> > > storage is probably happier running 4.x anyway.  One question is if we
> > > should drop ISA attachments in that case for drivers that support PCI
> > > and ISA.  However, there's a fair list of ISA-only adapters that would
> > > be a good place to start anyway.  One concern is to not drop any drivers
> > 
> > ps/2 keyboard, mouse, touchpads, lm sensors, etc?...
> 
> Those aren't storage or NICs.  There are many "legacy" device still present
> in modern systems that we obviously have to support.  However, if you have
> an ISA Adapter SCSI HBA in an ISA slot, the machine running that is probably
> happier running 4.x than 12.0.

Also, I am think current ports don't build on 4.x.
I am got complains about using ports on 8.x.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r312910 - in head: . etc/etc.pc98 etc/rc.d lib/libsysdecode libexec release release/doc release/doc/en_US.ISO8859-1/hardware release/doc/en_US.ISO8859-1/readme release/doc/share/exampl

2017-02-01 Thread Slawa Olhovchenkov
On Wed, Feb 01, 2017 at 08:59:40AM -0800, John Baldwin wrote:

> On Wednesday, February 01, 2017 01:35:56 PM Slawa Olhovchenkov wrote:
> > On Tue, Jan 31, 2017 at 02:46:23PM -0800, John Baldwin wrote:
> > 
> > > On Tuesday, January 31, 2017 03:33:55 PM Warner Losh wrote:
> > > > On Tue, Jan 31, 2017 at 3:20 PM, John Baldwin  wrote:
> > > > > On Saturday, January 28, 2017 02:22:15 AM Takahashi Yoshihiro wrote:
> > > > >> Author: nyan
> > > > >> Date: Sat Jan 28 02:22:15 2017
> > > > >> New Revision: 312910
> > > > >> URL: https://svnweb.freebsd.org/changeset/base/312910
> > > > >>
> > > > >> Log:
> > > > >>   Remove pc98 support completely.
> > > > >>   I thank all developers and contributors for pc98.
> > > > >>
> > > > >>   Relnotes:   yes
> > > > >
> > > > > BTW, my impression was that there are some other device drivers
> > > > > that are effectively PC-98 only (e.g. everything that uses scsi_low.c)
> > > > > but they might have pccard attachments for use with PC-98 laptops?
> > > > >
> > > > > Perhaps Warner might know?
> > > > >
> > > > > It seems stg(4) had PCI variants, but nsp(4), ncv(4), and stg(4)
> > > > > all came from NetBSD/pc98 via PAO.
> > > > 
> > > > These all work correctly on any PC Card machine. The only reason they
> > > > came in this way was because these devices were original marketed only
> > > > in Japan. I've used all these cards with external SCSI drives in the
> > > > past.
> > > > 
> > > > As far as I know, only the if_snc driver, which was removed, is truly
> > > > pc98 specific. It is wired in such a way that cannot be used in ibm-at
> > > > compatible laptops.  IIRC, it had hard-wired memory decode lines that
> > > > landed in the middle of the VGA graphics pages or BIOS low memory
> > > > areas. I have one of these cards still, and it will be detected on my
> > > > laptops, but can't work due to the required mappings.
> > > > 
> > > > Now, there's an different question about whether it is time to retire
> > > > some of the now-ancient SCSI cards from the system, but that's a
> > > > different kettle of fish that's larger than just nsp, ncv and stg.
> > > 
> > > Fair enough.  I haven't fully put away my 12 axe and am toying with
> > > dropping any ISA-only storage and NIC drivers (and perhaps pccard-only
> > > as well in that case).  Hardware that wants to use ISA/pccard for
> > > storage is probably happier running 4.x anyway.  One question is if we
> > > should drop ISA attachments in that case for drivers that support PCI
> > > and ISA.  However, there's a fair list of ISA-only adapters that would
> > > be a good place to start anyway.  One concern is to not drop any drivers
> > 
> > ps/2 keyboard, mouse, touchpads, lm sensors, etc?...
> 
> Those aren't storage or NICs.  There are many "legacy" device still present
> in modern systems that we obviously have to support.  However, if you have
> an ISA Adapter SCSI HBA in an ISA slot, the machine running that is probably
> happier running 4.x than 12.0.

My be I am missread, I think removed ISA bus and all devices attached
to ISA bus.
___
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: r312910 - in head: . etc/etc.pc98 etc/rc.d lib/libsysdecode libexec release release/doc release/doc/en_US.ISO8859-1/hardware release/doc/en_US.ISO8859-1/readme release/doc/share/exampl

2017-02-01 Thread John Baldwin
On Wednesday, February 01, 2017 01:35:56 PM Slawa Olhovchenkov wrote:
> On Tue, Jan 31, 2017 at 02:46:23PM -0800, John Baldwin wrote:
> 
> > On Tuesday, January 31, 2017 03:33:55 PM Warner Losh wrote:
> > > On Tue, Jan 31, 2017 at 3:20 PM, John Baldwin  wrote:
> > > > On Saturday, January 28, 2017 02:22:15 AM Takahashi Yoshihiro wrote:
> > > >> Author: nyan
> > > >> Date: Sat Jan 28 02:22:15 2017
> > > >> New Revision: 312910
> > > >> URL: https://svnweb.freebsd.org/changeset/base/312910
> > > >>
> > > >> Log:
> > > >>   Remove pc98 support completely.
> > > >>   I thank all developers and contributors for pc98.
> > > >>
> > > >>   Relnotes:   yes
> > > >
> > > > BTW, my impression was that there are some other device drivers
> > > > that are effectively PC-98 only (e.g. everything that uses scsi_low.c)
> > > > but they might have pccard attachments for use with PC-98 laptops?
> > > >
> > > > Perhaps Warner might know?
> > > >
> > > > It seems stg(4) had PCI variants, but nsp(4), ncv(4), and stg(4)
> > > > all came from NetBSD/pc98 via PAO.
> > > 
> > > These all work correctly on any PC Card machine. The only reason they
> > > came in this way was because these devices were original marketed only
> > > in Japan. I've used all these cards with external SCSI drives in the
> > > past.
> > > 
> > > As far as I know, only the if_snc driver, which was removed, is truly
> > > pc98 specific. It is wired in such a way that cannot be used in ibm-at
> > > compatible laptops.  IIRC, it had hard-wired memory decode lines that
> > > landed in the middle of the VGA graphics pages or BIOS low memory
> > > areas. I have one of these cards still, and it will be detected on my
> > > laptops, but can't work due to the required mappings.
> > > 
> > > Now, there's an different question about whether it is time to retire
> > > some of the now-ancient SCSI cards from the system, but that's a
> > > different kettle of fish that's larger than just nsp, ncv and stg.
> > 
> > Fair enough.  I haven't fully put away my 12 axe and am toying with
> > dropping any ISA-only storage and NIC drivers (and perhaps pccard-only
> > as well in that case).  Hardware that wants to use ISA/pccard for
> > storage is probably happier running 4.x anyway.  One question is if we
> > should drop ISA attachments in that case for drivers that support PCI
> > and ISA.  However, there's a fair list of ISA-only adapters that would
> > be a good place to start anyway.  One concern is to not drop any drivers
> 
> ps/2 keyboard, mouse, touchpads, lm sensors, etc?...

Those aren't storage or NICs.  There are many "legacy" device still present
in modern systems that we obviously have to support.  However, if you have
an ISA Adapter SCSI HBA in an ISA slot, the machine running that is probably
happier running 4.x than 12.0.

-- 
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: r313008 - head/tests/sys/geom/class/gate

2017-02-01 Thread Ngie Cooper (yaneurabeya)

> On Jan 31, 2017, at 07:10, Alan Somers  wrote:
> 
> I think wait_for_ggate_device should also be used at line 32, which
> calls "ggatec create".
> -Alan

Yes, you’re right. If I add in the wait_for_ggate_device call, then I 
can get rid of the other for loops with retry logic in them. I’m testing out a 
change and will add you to a CR if successful.
Thanks!
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r313040 - head/sys/mips/include

2017-02-01 Thread David Chisnall
On 1 Feb 2017, at 08:13, Konstantin Belousov  wrote:
> 
> On Wed, Feb 01, 2017 at 10:38:42AM -0500, Alexander Kabaev wrote:
>> On Wed, 1 Feb 2017 16:17:21 +0200
>> Konstantin Belousov  wrote:
>> 
>>> Please do not retry on sc failure, return the error to upper layer.
>>> See also r313007 and preceeding discussion after r312973.
>> 
>> There was not much a discussion there, do you mind expanding a bit on
>> why one behavior is more desired than other? I am not against the
>> change, but I need to understand the reasoning behind it better. Since
>> atomic_cmpset retries too, it will have to be adjusted as well.
> 
> atomic_cmpset() cannot avoid retry on the ll/sc architectures, because
> sc might fail even if the old and the new values are same. One of the
> points of the fcmpset API design is to avoid nested loops: this is a
> microoptimization to put less pressure on the CPUs frontend. The caller
> of (f)cmpset must check for failure anyway, so not doing this inside the
> function reduces number of branches. Less branches makes code shorter,
> and reduces utilization of some CPU resources, like branch predictor
> state.

C[++]11 addresses this by having a weak and a strong variant of compare and 
exchange.  The strong version may only fail if the comparison fails, we weak 
version is permitted to fail spuriously.  Given that most uses of compare and 
exchange use a loop, and most ll/sc architectures guarantee forward process 
after a few attempts, you almost always want to use the weak version.

The weak version also has the advantage that the compiler is free to fold the 
initial load into the load linked, as long as the target architecture would 
permit it, so you end up with more idiomatic ll, op, sc, branch sequences, 
rather than l, op, ll, branch, sc, branch sequences.

David



smime.p7s
Description: S/MIME cryptographic signature


Re: svn commit: r313040 - head/sys/mips/include

2017-02-01 Thread Konstantin Belousov
On Wed, Feb 01, 2017 at 10:38:42AM -0500, Alexander Kabaev wrote:
> On Wed, 1 Feb 2017 16:17:21 +0200
> Konstantin Belousov  wrote:
> 
> > Please do not retry on sc failure, return the error to upper layer.
> > See also r313007 and preceeding discussion after r312973.
> 
> There was not much a discussion there, do you mind expanding a bit on
> why one behavior is more desired than other? I am not against the
> change, but I need to understand the reasoning behind it better. Since
> atomic_cmpset retries too, it will have to be adjusted as well.

atomic_cmpset() cannot avoid retry on the ll/sc architectures, because
sc might fail even if the old and the new values are same. One of the
points of the fcmpset API design is to avoid nested loops: this is a
microoptimization to put less pressure on the CPUs frontend. The caller
of (f)cmpset must check for failure anyway, so not doing this inside the
function reduces number of branches. Less branches makes code shorter,
and reduces utilization of some CPU resources, like branch predictor
state.
___
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: r313040 - head/sys/mips/include

2017-02-01 Thread Alexander Kabaev
On Wed, 1 Feb 2017 16:17:21 +0200
Konstantin Belousov  wrote:

> Please do not retry on sc failure, return the error to upper layer.
> See also r313007 and preceeding discussion after r312973.

There was not much a discussion there, do you mind expanding a bit on
why one behavior is more desired than other? I am not against the
change, but I need to understand the reasoning behind it better. Since
atomic_cmpset retries too, it will have to be adjusted as well.
-- 
Alexander Kabaev


pgpzgDy6O5ezk.pgp
Description: Цифровая подпись OpenPGP


Re: svn commit: r313040 - head/sys/mips/include

2017-02-01 Thread Konstantin Belousov
On Wed, Feb 01, 2017 at 05:00:34AM +, Alexander Kabaev wrote:
> Author: kan
> Date: Wed Feb  1 05:00:34 2017
> New Revision: 313040
> URL: https://svnweb.freebsd.org/changeset/base/313040
> 
> Log:
>   Add atomic_fcmpset_*() inlines for MIPS
>   
>   atomic_fcmpset_*() is analogous to atomic_cmpset(), but saves off the
>   read value from the target memory location into the 'old' pointer.
>   
>   Reviewed by:imp, brooks
>   Requested by:   mjg
>   Differential Revision:  https://reviews.freebsd.org/D9391
> 
> Modified:
>   head/sys/mips/include/atomic.h
> 
> Modified: head/sys/mips/include/atomic.h
> ==
> --- head/sys/mips/include/atomic.hWed Feb  1 04:54:23 2017
> (r313039)
> +++ head/sys/mips/include/atomic.hWed Feb  1 05:00:34 2017
> (r313040)
> @@ -362,7 +362,7 @@ atomic_load_64(__volatile uint64_t *p, u
>   * zero if the compare failed, nonzero otherwise.
>   */
>  static __inline uint32_t
> -atomic_cmpset_32(__volatile uint32_t* p, uint32_t cmpval, uint32_t newval)
> +atomic_cmpset_32(__volatile uint32_t *p, uint32_t cmpval, uint32_t newval)
>  {
>   uint32_t ret;
>  
> @@ -405,6 +405,46 @@ atomic_cmpset_rel_32(__volatile uint32_t
>   return (atomic_cmpset_32(p, cmpval, newval));
>  }
>  
> +static __inline uint32_t
> +atomic_fcmpset_32(__volatile uint32_t *p, uint32_t *cmpval, uint32_t newval)
> +{
> + uint32_t ret;
> +
> + __asm __volatile (
> + "1:\n\t"
> + "ll %0, %1\n\t" /* load old value */
> + "bne%0, %4, 2f\n\t" /* compare */
> + "move   %0, %3\n\t" /* value to store */
> + "sc %0, %1\n\t" /* attempt to store */
> + "beqz   %0, 1b\n\t" /* if it failed, spin */
Please do not retry on sc failure, return the error to upper layer.
See also r313007 and preceeding discussion after r312973.

> + "j  3f\n\t"
> + "2:\n\t"
> + "sw %0, %2\n\t" /* save old value */
> + "li %0, 0\n\t"
> + "3:\n"
> + : "=&r" (ret), "+m" (*p), "=m" (*cmpval)
> + : "r" (newval), "r" (*cmpval)
> + : "memory");
> + return ret;
> +}
> +
___
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: r313043 - head/sys/kern

2017-02-01 Thread Hartmut Brandt
Author: harti
Date: Wed Feb  1 13:12:07 2017
New Revision: 313043
URL: https://svnweb.freebsd.org/changeset/base/313043

Log:
  Merge filt_soread and filt_solisten and decide what to do when checking
  for EVFILT_READ at the point of the check not when the event is registers.
  This fixes a problem with asio when accepting a connection.
  
  Reviewed by:  kib@, Scott Mitchell

Modified:
  head/sys/kern/uipc_socket.c

Modified: head/sys/kern/uipc_socket.c
==
--- head/sys/kern/uipc_socket.c Wed Feb  1 08:46:59 2017(r313042)
+++ head/sys/kern/uipc_socket.c Wed Feb  1 13:12:07 2017(r313043)
@@ -159,16 +159,10 @@ static void   filt_sordetach(struct knote 
 static int filt_soread(struct knote *kn, long hint);
 static voidfilt_sowdetach(struct knote *kn);
 static int filt_sowrite(struct knote *kn, long hint);
-static int filt_solisten(struct knote *kn, long hint);
 static int inline hhook_run_socket(struct socket *so, void *hctx, int32_t 
h_id);
 static int filt_soempty(struct knote *kn, long hint);
 fo_kqfilter_t  soo_kqfilter;
 
-static struct filterops solisten_filtops = {
-   .f_isfd = 1,
-   .f_detach = filt_sordetach,
-   .f_event = filt_solisten,
-};
 static struct filterops soread_filtops = {
.f_isfd = 1,
.f_detach = filt_sordetach,
@@ -3107,10 +3101,7 @@ soo_kqfilter(struct file *fp, struct kno
 
switch (kn->kn_filter) {
case EVFILT_READ:
-   if (so->so_options & SO_ACCEPTCONN)
-   kn->kn_fop = &solisten_filtops;
-   else
-   kn->kn_fop = &soread_filtops;
+   kn->kn_fop = &soread_filtops;
sb = &so->so_rcv;
break;
case EVFILT_WRITE:
@@ -3321,6 +3312,11 @@ filt_soread(struct knote *kn, long hint)
struct socket *so;
 
so = kn->kn_fp->f_data;
+   if (so->so_options & SO_ACCEPTCONN) {
+   kn->kn_data = so->so_qlen;
+   return (!TAILQ_EMPTY(&so->so_comp));
+
+   }
SOCKBUF_LOCK_ASSERT(&so->so_rcv);
 
kn->kn_data = sbavail(&so->so_rcv) - so->so_rcv.sb_ctl;
@@ -,11 +3329,9 @@ filt_soread(struct knote *kn, long hint)
 
if (kn->kn_sfflags & NOTE_LOWAT) {
if (kn->kn_data >= kn->kn_sdata)
-   return 1;
-   } else {
-   if (sbavail(&so->so_rcv) >= so->so_rcv.sb_lowat)
-   return 1;
-   }
+   return (1);
+   } else if (sbavail(&so->so_rcv) >= so->so_rcv.sb_lowat)
+   return (1);
 
/* This hook returning non-zero indicates an event, not error */
return (hhook_run_socket(so, NULL, HHOOK_FILT_SOREAD));
@@ -3397,16 +3391,6 @@ filt_soempty(struct knote *kn, long hint
return (0);
 }
 
-/*ARGSUSED*/
-static int
-filt_solisten(struct knote *kn, long hint)
-{
-   struct socket *so = kn->kn_fp->f_data;
-
-   kn->kn_data = so->so_qlen;
-   return (!TAILQ_EMPTY(&so->so_comp));
-}
-
 int
 socheckuid(struct socket *so, uid_t uid)
 {
___
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: r312975 - head/sys/i386/include

2017-02-01 Thread Bruce Evans

On Mon, 30 Jan 2017, Bruce Evans wrote:


On Mon, 30 Jan 2017, Mateusz Guzik wrote:


Log:
 i386: add atomic_fcmpset

 Tested by: pho


This is has some bugs and style bugs.


This is still broken.  The invalid asm breaks building at least atomic.o
with gcc-4.2.1.

Tested fix:

X Index: i386/include/atomic.h
X ===
X --- i386/include/atomic.h (revision 313007)
X +++ i386/include/atomic.h (working copy)
X @@ -225,9 +225,9 @@
X   "  cmpxchgl %3,%1 ;"
X   "   sete   %0 ;"
X   "# atomic_cmpset_int"
X - : "=r" (res), /* 0 */
X + : "=q" (res), /* 0 */
X "+m" (*dst),/* 1 */
X -   "+a" (*expect)  /* 2 */
X +   "+a" (*expect)  /* 2 */
X   : "r" (src)   /* 3 */
X   : "memory", "cc");
X   return (res);

The semantics of fcmpset seem to be undocumented.  On x86, *expect is
updated non-atomically by a store in the output parameter.  I think
cmpxchg updates the "a" register atomically, but then the output
parameter causes this to be stored non-atomically to *expect.  A better
API would somehow return the "a" register and let the caller store it
if it wants.  Ordinary cmpset can be built on this by not storing, and
the caller can do the store atomically to a different place if *expect
is too volatile to be atomic.

Maybe just decouple the input parameter from the output parameter.  The
following works right (for an amd64 API):

Y static __inline int
Y atomic_xfcmpset_long(volatile u_long *dst, u_long *expect_out, u_long 
expect_in,
Y u_long src)
Y {
Y   u_long expect;
Y   u_char res;
Y 
Y 	expect = expect_in;

Y   __asm __volatile(
Y   "  " MPLOCKED "  "
Y   "  cmpxchgq %3,%1 ;"
Y   "   sete   %0 ;"
Y   "# atomic_fcmpset_long"
Y   : "=r" (res), /* 0 */
Y "+m" (*dst),/* 1 */
Y "+a" (expect)   /* 2 */
Y   : "r" (src)   /* 3 */
Y   : "memory", "cc");
Y   *expect_out = expect;

If the caller doesn't want to use *expect_out, it passes a pointer to an
unused local variable.  The compiler can then optimize away the store
since it is not hidden in the asm.

Y   return (res);
Y }

Bruce
___
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: r313006 - in head: sys/conf sys/libkern sys/libkern/x86 sys/sys tests/sys/kern

2017-02-01 Thread Bruce Evans

On Tue, 31 Jan 2017, Conrad Meyer wrote:


On Tue, Jan 31, 2017 at 7:16 PM, Bruce Evans  wrote:

Another reply to this...

On Tue, 31 Jan 2017, Conrad Meyer wrote:


On Tue, Jan 31, 2017 at 7:36 AM, Bruce Evans  wrote:


On Tue, 31 Jan 2017, Bruce Evans wrote:
I
think there should by no alignment on entry -- just assume the buffer is
aligned in the usual case, and only run 4% slower when it is misaligned.


Please write such a patch and demonstrate the improvement.


It is easy to demonstrate.  I just put #if 0 around the early alignment
code.  The result seem too good to be true, so maybe I missed some
later dependency on alignment of the addresses:
- for 128-byte buffers and misalignment of 3, 10g takes 1.48 seconds with
  alignment and 1.02 seconds without alignment.
This actually makes sense, 128 bytes can be done with 16 8-byte unaligned
crc32q's.  The alignment code makes it do 15 * 8-but and (5 + 3) * 1-byte.
7 more 3-cycle instructions and overhead too is far more than the cost
of letting the CPU do read-combining.
- for 4096-byte buffers, the difference is insignificant (0.47 seconds for
  10g.


I believe it, especially for newer amd64.  I seem to recall that older
x86 machines had a higher misalignment penalty, but it was largely
reduced in (?)Nehalem.  Why don't you go ahead and commit that change?


Needs more work.

Here are fairly clean patches for the unportabilities.  I can't really
test these in the kernel.  Merge the asms with yours if yours are better
in parts.

X Index: conf/files.amd64
X ===
X --- conf/files.amd64  (revision 313007)
X +++ conf/files.amd64  (working copy)
X @@ -536,6 +536,9 @@
X  isa/vga_isa.coptionalvga
X  kern/kern_clocksource.c  standard
X  kern/link_elf_obj.c  standard
X +libkern/x86/crc32_sse42.cstandard
X +libkern/memmove.cstandard
X +libkern/memset.c standard
X  #
X  # IA32 binary support
X  #
X @@ -593,14 +596,6 @@
X  compat/ndis/subr_usbd.c  optionalndisapi pci
X  compat/ndis/winx64_wrap.Soptionalndisapi pci
X  #
X -crc32_sse42.ostandard
\
X - dependency  "$S/libkern/x86/crc32_sse42.c"\
X - compile-with"${CC} -c ${CFLAGS:N-nostdinc} ${WERROR} ${PROF} -msse4 
${.IMPSRC}" \
X - no-implicit-rule\
X - clean   "crc32_sse42.o"
X -libkern/memmove.cstandard
X -libkern/memset.c standard
X -#
X  # x86 real mode BIOS emulator, required by dpms/pci/vesa
X  #
X  compat/x86bios/x86bios.c optional x86bios | dpms | pci | vesa

This also fixes unsorting by crc32_sse42.o and nearby unsorting by all other
libkern lines (just 2) in files.amd64.  This file is still grossly unsorted
near the end.

X Index: conf/files.i386
X ===
X --- conf/files.i386   (revision 313007)
X +++ conf/files.i386   (working copy)
X @@ -554,11 +554,6 @@
X  kern/imgact_aout.c   optional compat_aout
X  kern/imgact_gzip.c   optional gzip
X  kern/subr_sfbuf.cstandard
X -crc32_sse42.ostandard
\
X - dependency  "$S/libkern/x86/crc32_sse42.c"\
X - compile-with"${CC} -c ${CFLAGS:N-nostdinc} ${WERROR} ${PROF} -msse4 
${.IMPSRC}" \
X - no-implicit-rule\
X - clean   "crc32_sse42.o"
X  libkern/divdi3.c standard
X  libkern/ffsll.c  standard
X  libkern/flsll.c  standard
X @@ -569,6 +564,7 @@
X  libkern/ucmpdi2.cstandard
X  libkern/udivdi3.cstandard
X  libkern/umoddi3.cstandard
X +libkern/x86/crc32_sse42.cstandard
X  i386/xbox/xbox.c optional xbox
X  i386/xbox/xboxfb.c   optional xboxfb
X  dev/fb/boot_font.c   optional xboxfb

This also fixes unsorting by crc32_sse42.o.  files.i386 is not as unsorted
as files.i386.

The rules for sorting generated files are unclear.  They are not in source
directories so are nor naturally grouped.  Old ones are mostly placed near
the beginning.  Some are sorted on a pathname of the source file(s) in
scattered places in the make rules.  crc32_sse42.o is partly like that.
It was sorted with libkern sources but not by the x86 part.

X Index: libkern/x86/crc32_sse42.c
X ===
X --- libkern/x86/crc32_sse42.c (revision 313007)
X +++ libkern/x86/crc32_sse42.c (working copy)
X @@ -31,15 +31,41 @@
X   */
X  #ifdef USERSPACE_TESTING
X  #include 
X +#include 

Fix dependency on namespace pollution in  for at least size_t.

X  #else
X  #include 
X +#include 
X  #include 
X -#include 
X -#include 
X  #endif

Fix ord

Re: svn commit: r312910 - in head: . etc/etc.pc98 etc/rc.d lib/libsysdecode libexec release release/doc release/doc/en_US.ISO8859-1/hardware release/doc/en_US.ISO8859-1/readme release/doc/share/exampl

2017-02-01 Thread Slawa Olhovchenkov
On Tue, Jan 31, 2017 at 02:46:23PM -0800, John Baldwin wrote:

> On Tuesday, January 31, 2017 03:33:55 PM Warner Losh wrote:
> > On Tue, Jan 31, 2017 at 3:20 PM, John Baldwin  wrote:
> > > On Saturday, January 28, 2017 02:22:15 AM Takahashi Yoshihiro wrote:
> > >> Author: nyan
> > >> Date: Sat Jan 28 02:22:15 2017
> > >> New Revision: 312910
> > >> URL: https://svnweb.freebsd.org/changeset/base/312910
> > >>
> > >> Log:
> > >>   Remove pc98 support completely.
> > >>   I thank all developers and contributors for pc98.
> > >>
> > >>   Relnotes:   yes
> > >
> > > BTW, my impression was that there are some other device drivers
> > > that are effectively PC-98 only (e.g. everything that uses scsi_low.c)
> > > but they might have pccard attachments for use with PC-98 laptops?
> > >
> > > Perhaps Warner might know?
> > >
> > > It seems stg(4) had PCI variants, but nsp(4), ncv(4), and stg(4)
> > > all came from NetBSD/pc98 via PAO.
> > 
> > These all work correctly on any PC Card machine. The only reason they
> > came in this way was because these devices were original marketed only
> > in Japan. I've used all these cards with external SCSI drives in the
> > past.
> > 
> > As far as I know, only the if_snc driver, which was removed, is truly
> > pc98 specific. It is wired in such a way that cannot be used in ibm-at
> > compatible laptops.  IIRC, it had hard-wired memory decode lines that
> > landed in the middle of the VGA graphics pages or BIOS low memory
> > areas. I have one of these cards still, and it will be detected on my
> > laptops, but can't work due to the required mappings.
> > 
> > Now, there's an different question about whether it is time to retire
> > some of the now-ancient SCSI cards from the system, but that's a
> > different kettle of fish that's larger than just nsp, ncv and stg.
> 
> Fair enough.  I haven't fully put away my 12 axe and am toying with
> dropping any ISA-only storage and NIC drivers (and perhaps pccard-only
> as well in that case).  Hardware that wants to use ISA/pccard for
> storage is probably happier running 4.x anyway.  One question is if we
> should drop ISA attachments in that case for drivers that support PCI
> and ISA.  However, there's a fair list of ISA-only adapters that would
> be a good place to start anyway.  One concern is to not drop any drivers

ps/2 keyboard, mouse, touchpads, lm sensors, etc?...

___
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: r313042 - in head/sys/boot: efi/include efi/libefi efi/loader forth

2017-02-01 Thread Toomas Soome
Author: tsoome
Date: Wed Feb  1 08:46:59 2017
New Revision: 313042
URL: https://svnweb.freebsd.org/changeset/base/313042

Log:
  loader.efi environment related cleanups
  
  Since we have dedicated libefi/env.c file for variable support, the following
  changes are done:
  
  Simple cstyle changes in env.c
  Moved efi variable related commands from loader/main.c to libefi/env.c
  Did create function to set "efi-version" environment variable in env.c.
  
  This function does serve two purposes: for first a  small clean up of the
  loader main(), and for second, it does replace the otherwise unused
  efi_variable_support hack.
  A bit of cleanup of ficl backend functions. The TEST_MAIN has no meaning,
  and removed few memory leaks.
  
  The forth code is updated to use "efi-version" variable, instead of ficl
  environment check.
  
  Reviewed by:  imp
  Approved by:  imp (mentor)
  Differential Revision:https://reviews.freebsd.org/D9165

Added:
  head/sys/boot/efi/libefi/wchar.c   (contents, props changed)
Modified:
  head/sys/boot/efi/include/efilib.h
  head/sys/boot/efi/libefi/Makefile
  head/sys/boot/efi/libefi/env.c
  head/sys/boot/efi/loader/main.c
  head/sys/boot/forth/loader.4th

Modified: head/sys/boot/efi/include/efilib.h
==
--- head/sys/boot/efi/include/efilib.h  Wed Feb  1 05:24:17 2017
(r313041)
+++ head/sys/boot/efi/include/efilib.h  Wed Feb  1 08:46:59 2017
(r313042)
@@ -65,4 +65,12 @@ EFI_STATUS main(int argc, CHAR16 *argv[]
 void exit(EFI_STATUS status);
 void delay(int usecs);
 
+/* EFI environment initialization. */
+void efi_init_environment(void);
+
+/* CHAR16 utility functions. */
+int wcscmp(CHAR16 *, CHAR16 *);
+void cpy8to16(const char *, CHAR16 *, size_t);
+void cpy16to8(const CHAR16 *, char *, size_t);
+
 #endif /* _LOADER_EFILIB_H */

Modified: head/sys/boot/efi/libefi/Makefile
==
--- head/sys/boot/efi/libefi/Makefile   Wed Feb  1 05:24:17 2017
(r313041)
+++ head/sys/boot/efi/libefi/Makefile   Wed Feb  1 08:46:59 2017
(r313042)
@@ -3,6 +3,7 @@
 .include 
 
 .if ${MK_FORTH} != "no"
+CFLAGS+= -DBOOT_FORTH
 .include "${.CURDIR}/../../Makefile.ficl"
 .endif
 
@@ -10,17 +11,14 @@ LIB=efi
 INTERNALLIB=
 WARNS?=2
 
-SRCS=  delay.c devpath.c efi_console.c efinet.c efipart.c errno.c \
-   handles.c libefi.c
+SRCS=  delay.c devpath.c efi_console.c efinet.c efipart.c env.c errno.c \
+   handles.c wchar.c libefi.c
 
 .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
 SRCS+= time.c
 .elif ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm"
 SRCS+= time_event.c
 .endif
-.if ${MK_FORTH} != "no"
-SRCS+= env.c
-.endif
 
 # We implement a slightly non-standard %S in that it always takes a
 # CHAR16 that's common in UEFI-land instead of a wchar_t. This only

Modified: head/sys/boot/efi/libefi/env.c
==
--- head/sys/boot/efi/libefi/env.c  Wed Feb  1 05:24:17 2017
(r313041)
+++ head/sys/boot/efi/libefi/env.c  Wed Feb  1 08:46:59 2017
(r313042)
@@ -26,15 +26,17 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include "bootstrap.h"
+#ifdef BOOT_FORTH
 #include "ficl.h"
-
-int efi_variable_support = 1;
+#endif
 
 /*
  * Simple wrappers to the underlying UEFI functions.
@@ -42,36 +44,348 @@ int efi_variable_support = 1;
  * for details.
  */
 EFI_STATUS
-efi_get_next_variable_name(UINTN *variable_name_size, CHAR16 *variable_name, 
EFI_GUID *vendor_guid)
+efi_get_next_variable_name(UINTN *variable_name_size, CHAR16 *variable_name,
+EFI_GUID *vendor_guid)
 {
-   return RS->GetNextVariableName(variable_name_size, variable_name, 
vendor_guid);
+   return (RS->GetNextVariableName(variable_name_size, variable_name,
+   vendor_guid));
 }
 
 EFI_STATUS
-efi_get_variable(CHAR16 *variable_name, EFI_GUID *vendor_guid, UINT32 
*attributes, UINTN *data_size,
-void *data)
+efi_get_variable(CHAR16 *variable_name, EFI_GUID *vendor_guid,
+UINT32 *attributes, UINTN *data_size, void *data)
 {
-   return RS->GetVariable(variable_name, vendor_guid, attributes, 
data_size, data);
+   return (RS->GetVariable(variable_name, vendor_guid, attributes,
+   data_size, data));
 }
 
 EFI_STATUS
-efi_set_variable(CHAR16 *variable_name, EFI_GUID *vendor_guid, UINT32 
attributes, UINTN data_size,
-void *data)
+efi_set_variable(CHAR16 *variable_name, EFI_GUID *vendor_guid,
+UINT32 attributes, UINTN data_size, void *data)
+{
+   return (RS->SetVariable(variable_name, vendor_guid, attributes,
+   data_size, data));
+}
+
+void
+efi_init_environment(void)
+{
+   char var[128];
+
+   snprintf(var, sizeof(var), "%d.%02d", ST->Hdr.Revision >> 16,
+   ST->Hdr.Revis