svn commit: r343828 - head/sys/dts/arm

2019-02-05 Thread Michal Meloun
Author: mmel
Date: Wed Feb  6 06:03:44 2019
New Revision: 343828
URL: https://svnweb.freebsd.org/changeset/base/343828

Log:
  Adapt FreeBSD specific DT stub for Jetson TK1 board to be consistent with
  update of devicetree to 4.19 in r340337.
  Our build system doesn't provide dependencies for included DTS files, so
  nobody noticed this issue for long time.
  
  PR:   235362
  MFC after:1 week

Modified:
  head/sys/dts/arm/tegra124-jetson-tk1-fbsd.dts

Modified: head/sys/dts/arm/tegra124-jetson-tk1-fbsd.dts
==
--- head/sys/dts/arm/tegra124-jetson-tk1-fbsd.dts   Wed Feb  6 04:36:28 
2019(r343827)
+++ head/sys/dts/arm/tegra124-jetson-tk1-fbsd.dts   Wed Feb  6 06:03:44 
2019(r343828)
@@ -38,7 +38,7 @@
stdout = 
};
 
-   memory {
+   memory@8000 {
 /* reg = <0x0 0x8000 0x0 0x8000>; */
reg = <0x0 0x8000 0x0 0x7000>;
};
___
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: r343827 - head/lib/libcasper/services/cap_syslog

2019-02-05 Thread Jason A. Harmening
Author: jah
Date: Wed Feb  6 04:36:28 2019
New Revision: 343827
URL: https://svnweb.freebsd.org/changeset/base/343827

Log:
  r341692 changed cap_syslog(3) to preserve the stdio descriptors inherited
  from its parent so that LOG_PERROR would work.  However, this caused
  dhclient(8)'s stdio streams to remain open across daemonization, breaking
  the ability to capture its foreground output as done in netconfig_ipv4.
  
  Fix this by reverting r341692 and instead passing the parent's stderr
  descriptor as an argument to cap_openlog() only when LOG_PERROR is specified
  in logopt.
  
  PR:   234514
  Suggested by: markj
  Reported by:  Shawn Webb
  Reviewed by:  markj, oshogbo
  MFC after:2 weeks
  Differential Revision:https://reviews.freebsd.org/D18989

Modified:
  head/lib/libcasper/services/cap_syslog/cap_syslog.c

Modified: head/lib/libcasper/services/cap_syslog/cap_syslog.c
==
--- head/lib/libcasper/services/cap_syslog/cap_syslog.c Wed Feb  6 04:00:37 
2019(r343826)
+++ head/lib/libcasper/services/cap_syslog/cap_syslog.c Wed Feb  6 04:36:28 
2019(r343827)
@@ -88,6 +88,9 @@ cap_openlog(cap_channel_t *chan, const char *ident, in
}
nvlist_add_number(nvl, "logopt", logopt);
nvlist_add_number(nvl, "facility", facility);
+   if (logopt & LOG_PERROR) {
+   nvlist_add_descriptor(nvl, "stderr", STDERR_FILENO);
+   }
nvl = cap_xfer_nvlist(chan, nvl);
if (nvl == NULL) {
return;
@@ -131,6 +134,7 @@ cap_setlogmask(cap_channel_t *chan, int maskpri)
  */
 
 static char *LogTag;
+static int prev_stderr = -1;
 
 static void
 slog_vsyslog(const nvlist_t *limits __unused, const nvlist_t *nvlin,
@@ -146,6 +150,8 @@ slog_openlog(const nvlist_t *limits __unused, const nv
 nvlist_t *nvlout __unused)
 {
const char *ident;
+   uint64_t logopt;
+   int stderr_fd;
 
ident = dnvlist_get_string(nvlin, "ident", NULL);
if (ident != NULL) {
@@ -153,8 +159,19 @@ slog_openlog(const nvlist_t *limits __unused, const nv
LogTag = strdup(ident);
}
 
-   openlog(LogTag, nvlist_get_number(nvlin, "logopt"),
-   nvlist_get_number(nvlin, "facility"));
+   logopt = nvlist_get_number(nvlin, "logopt");
+   if (logopt & LOG_PERROR) {
+   stderr_fd = dnvlist_get_descriptor(nvlin, "stderr", -1);
+   if (prev_stderr == -1)
+   prev_stderr = dup(STDERR_FILENO);
+   if (prev_stderr != -1)
+   (void)dup2(stderr_fd, STDERR_FILENO);
+   } else if (prev_stderr != -1) {
+   (void)dup2(prev_stderr, STDERR_FILENO);
+   close(prev_stderr);
+   prev_stderr = -1;
+   }
+   openlog(LogTag, logopt, nvlist_get_number(nvlin, "facility"));
 }
 
 static void
@@ -166,6 +183,12 @@ slog_closelog(const nvlist_t *limits __unused, const n
 
free(LogTag);
LogTag = NULL;
+
+   if (prev_stderr != -1) {
+   (void)dup2(prev_stderr, STDERR_FILENO);
+   close(prev_stderr);
+   prev_stderr = -1;
+   }
 }
 
 static void
@@ -198,4 +221,4 @@ syslog_command(const char *cmd, const nvlist_t *limits
return (0);
 }
 
-CREATE_SERVICE("system.syslog", NULL, syslog_command, CASPER_SERVICE_STDIO);
+CREATE_SERVICE("system.syslog", NULL, syslog_command, 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: r343826 - head/usr.sbin/pwm

2019-02-05 Thread Yuri Pankov
Author: yuripv
Date: Wed Feb  6 04:00:37 2019
New Revision: 343826
URL: https://svnweb.freebsd.org/changeset/base/343826

Log:
  pwm.8: fix markup in synopsis, add -f description
  
  Reviewed by:  bcr, manu
  Differential revision:https://reviews.freebsd.org/D18829

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

Modified: head/usr.sbin/pwm/pwm.8
==
--- head/usr.sbin/pwm/pwm.8 Wed Feb  6 03:57:51 2019(r343825)
+++ head/usr.sbin/pwm/pwm.8 Wed Feb  6 04:00:37 2019(r343826)
@@ -22,7 +22,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd November 12, 2018
+.Dd January 12, 2019
 .Dt PWM 8
 .Os
 .Sh NAME
@@ -44,20 +44,25 @@
 .Nm
 .Op Fl f Ar device
 .Fl c Ar channel
-.Fl p period
+.Fl p Ar period
 .Nm
 .Op Fl f Ar device
 .Fl c Ar channel
-.Fl d duty
+.Fl d Ar duty
 .Sh DESCRIPTION
 The
 .Nm
 utility can be used to configure pwm controllers.
 .Pp
 The options are as follow:
-.Bl -tag -width ".Fl f Ar device"
+.Bl -tag -width "-c channel"
 .It Fl c Ar channel
 Channel number to operate on
+.It Fl f Ar device
+Device to operate on.
+If not specified,
+.Pa /dev/pwmc0
+is used.
 .It Fl E
 Enable the pwm channel
 .It Fl D
@@ -73,16 +78,19 @@ Configure the duty (in nanoseconds or percentage) of t
 .Bl -bullet
 .It
 Show the configuration of the pwm channel:
-.Pp
+.Bd -literal
 pwm -f /dev/pwmc0 -C
+.Ed
 .It
 Configure a 5 ns period and a 25000 duty cycle:
-.Pp
+.Bd -literal
 pwm -f /dev/pwmc0 -p 5 -d 25000
+.Ed
 .It
 Configure a 50% duty cycle:
-.Pp
+.Bd -literal
 pwm -f /dev/pwmc0 -d 50%
+.Ed
 .El
 .Sh SEE ALSO
 .Xr pwm 9 ,
___
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: r343825 - head/share/man/man9

2019-02-05 Thread Yuri Pankov
Author: yuripv
Date: Wed Feb  6 03:57:51 2019
New Revision: 343825
URL: https://svnweb.freebsd.org/changeset/base/343825

Log:
  pwm.9: fix markup in interfaces description
  
  Reviewed by:  manu
  Differential revision:https://reviews.freebsd.org/D18830

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

Modified: head/share/man/man9/pwm.9
==
--- head/share/man/man9/pwm.9   Wed Feb  6 03:52:14 2019(r343824)
+++ head/share/man/man9/pwm.9   Wed Feb  6 03:57:51 2019(r343825)
@@ -22,7 +22,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd November 12, 2018
+.Dd January 12, 2019
 .Dt PWM 9
 .Os
 .Sh NAME
@@ -79,7 +79,7 @@ Get the current flags for the channel.
 Enable the PWM channel.
 .It Fn PWM_CHANNEL_ISENABLED "device_t dev" "int channel" "bool *enable"
 Test if the PWM channel is enabled.
-.It PWM_CHANNEL_MAX "device_t dev" "int channel" "int *nchannel"
+.It Fn PWM_CHANNEL_MAX "device_t dev" "int channel" "int *nchannel"
 Get the maximum number of channels supported by the controller.
 .El
 .Sh HISTORY
___
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: r343824 - in head/sys/powerpc: include ofw powerpc

2019-02-05 Thread Justin Hibbits
Author: jhibbits
Date: Wed Feb  6 03:52:14 2019
New Revision: 343824
URL: https://svnweb.freebsd.org/changeset/base/343824

Log:
  powerpc: Bind IRQs to only one interrupt on QorIQ SoCs
  
  The QorIQ SoCs don't actually support multicast interrupts, and the
  references state explicitly that multicast is undefined behavior.  Avoid the
  undefined behavior by binding to only a single CPU, using a quirk to
  determine if this is necessary.
  
  MFC after:3 weeks

Modified:
  head/sys/powerpc/include/openpicvar.h
  head/sys/powerpc/ofw/openpic_ofw.c
  head/sys/powerpc/powerpc/openpic.c

Modified: head/sys/powerpc/include/openpicvar.h
==
--- head/sys/powerpc/include/openpicvar.h   Wed Feb  6 02:35:56 2019
(r343823)
+++ head/sys/powerpc/include/openpicvar.h   Wed Feb  6 03:52:14 2019
(r343824)
@@ -34,6 +34,8 @@
 
 #define OPENPIC_IRQMAX 256 /* h/w allows more */
 
+#defineOPENPIC_QUIRK_SINGLE_BIND   1   /* Bind interrupts to 
only 1 CPU */
+
 /* Names match the macros in openpicreg.h. */
 struct openpic_timer {
uint32_ttcnt;
@@ -55,6 +57,7 @@ struct openpic_softc {
u_int   sc_ncpu;
u_int   sc_nirq;
int sc_psim;
+   u_int   sc_quirks;
 
/* Saved states. */
uint32_tsc_saved_config;

Modified: head/sys/powerpc/ofw/openpic_ofw.c
==
--- head/sys/powerpc/ofw/openpic_ofw.c  Wed Feb  6 02:35:56 2019
(r343823)
+++ head/sys/powerpc/ofw/openpic_ofw.c  Wed Feb  6 03:52:14 2019
(r343824)
@@ -128,14 +128,19 @@ openpic_ofw_probe(device_t dev)
 static int
 openpic_ofw_attach(device_t dev)
 {
+   struct openpic_softc *sc;
phandle_t xref, node;
 
node = ofw_bus_get_node(dev);
+   sc = device_get_softc(dev);
 
if (OF_getencprop(node, "phandle", , sizeof(xref)) == -1 &&
OF_getencprop(node, "ibm,phandle", , sizeof(xref)) == -1 &&
OF_getencprop(node, "linux,phandle", , sizeof(xref)) == -1)
xref = node;
+   
+   if (ofw_bus_is_compatible(dev, "fsl,mpic"))
+   sc->sc_quirks = OPENPIC_QUIRK_SINGLE_BIND;
 
return (openpic_common_attach(dev, xref));
 }

Modified: head/sys/powerpc/powerpc/openpic.c
==
--- head/sys/powerpc/powerpc/openpic.c  Wed Feb  6 02:35:56 2019
(r343823)
+++ head/sys/powerpc/powerpc/openpic.c  Wed Feb  6 03:52:14 2019
(r343824)
@@ -35,6 +35,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -236,6 +237,7 @@ void
 openpic_bind(device_t dev, u_int irq, cpuset_t cpumask, void **priv __unused)
 {
struct openpic_softc *sc;
+   uint32_t mask;
 
/* If we aren't directly connected to the CPU, this won't work */
if (dev != root_pic)
@@ -247,7 +249,23 @@ openpic_bind(device_t dev, u_int irq, cpuset_t cpumask
 * XXX: openpic_write() is very special and just needs a 32 bits mask.
 * For the moment, just play dirty and get the first half word.
 */
-   openpic_write(sc, OPENPIC_IDEST(irq), cpumask.__bits[0] & 0x);
+   mask = cpumask.__bits[0] & 0x;
+   if (sc->sc_quirks & OPENPIC_QUIRK_SINGLE_BIND) {
+   int i = mftb() % CPU_COUNT();
+   int cpu, ncpu;
+
+   ncpu = 0;
+   CPU_FOREACH(cpu) {
+   if (!(mask & (1 << cpu)))
+   continue;
+   if (ncpu == i)
+   break;
+   ncpu++;
+   }
+   mask &= (1 << cpu);
+   }
+
+   openpic_write(sc, OPENPIC_IDEST(irq), mask);
 }
 
 void
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r343823 - in stable: 10/sys/dev/wtap 11/sys/dev/wtap 12/sys/dev/wtap

2019-02-05 Thread Andriy Voskoboinyk
Author: avos
Date: Wed Feb  6 02:35:56 2019
New Revision: 343823
URL: https://svnweb.freebsd.org/changeset/base/343823

Log:
  MFC r343682:
  sys/dev/wtap: Check return value from malloc(..., M_NOWAIT) and
  drop unneeded cast.

Modified:
  stable/12/sys/dev/wtap/if_wtap.c
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/sys/dev/wtap/if_wtap.c
  stable/11/sys/dev/wtap/if_wtap.c
Directory Properties:
  stable/10/   (props changed)
  stable/11/   (props changed)

Modified: stable/12/sys/dev/wtap/if_wtap.c
==
--- stable/12/sys/dev/wtap/if_wtap.cWed Feb  6 02:30:14 2019
(r343822)
+++ stable/12/sys/dev/wtap/if_wtap.cWed Feb  6 02:35:56 2019
(r343823)
@@ -372,7 +372,7 @@ wtap_vap_delete(struct ieee80211vap *vap)
destroy_dev(avp->av_dev);
callout_stop(>av_swba);
ieee80211_vap_detach(vap);
-   free((struct wtap_vap*) vap, M_80211_VAP);
+   free(avp, M_80211_VAP);
 }
 
 static void
@@ -601,6 +601,8 @@ wtap_node_alloc(struct ieee80211vap *vap, const uint8_
 
ni = malloc(sizeof(struct ieee80211_node), M_80211_NODE,
M_NOWAIT|M_ZERO);
+   if (ni == NULL)
+   return (NULL);
 
ni->ni_txrate = 130;
return ni;
___
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: r343823 - in stable: 10/sys/dev/wtap 11/sys/dev/wtap 12/sys/dev/wtap

2019-02-05 Thread Andriy Voskoboinyk
Author: avos
Date: Wed Feb  6 02:35:56 2019
New Revision: 343823
URL: https://svnweb.freebsd.org/changeset/base/343823

Log:
  MFC r343682:
  sys/dev/wtap: Check return value from malloc(..., M_NOWAIT) and
  drop unneeded cast.

Modified:
  stable/10/sys/dev/wtap/if_wtap.c
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/sys/dev/wtap/if_wtap.c
  stable/12/sys/dev/wtap/if_wtap.c
Directory Properties:
  stable/11/   (props changed)
  stable/12/   (props changed)

Modified: stable/10/sys/dev/wtap/if_wtap.c
==
--- stable/10/sys/dev/wtap/if_wtap.cWed Feb  6 02:30:14 2019
(r343822)
+++ stable/10/sys/dev/wtap/if_wtap.cWed Feb  6 02:35:56 2019
(r343823)
@@ -371,7 +371,7 @@ wtap_vap_delete(struct ieee80211vap *vap)
destroy_dev(avp->av_dev);
callout_stop(>av_swba);
ieee80211_vap_detach(vap);
-   free((struct wtap_vap*) vap, M_80211_VAP);
+   free(avp, M_80211_VAP);
 }
 
 /* NB: This function is not used.
@@ -744,6 +744,8 @@ wtap_node_alloc(struct ieee80211vap *vap, const uint8_
 
ni = malloc(sizeof(struct ieee80211_node), M_80211_NODE,
M_NOWAIT|M_ZERO);
+   if (ni == NULL)
+   return (NULL);
 
ni->ni_txrate = 130;
return ni;
___
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: r343823 - in stable: 10/sys/dev/wtap 11/sys/dev/wtap 12/sys/dev/wtap

2019-02-05 Thread Andriy Voskoboinyk
Author: avos
Date: Wed Feb  6 02:35:56 2019
New Revision: 343823
URL: https://svnweb.freebsd.org/changeset/base/343823

Log:
  MFC r343682:
  sys/dev/wtap: Check return value from malloc(..., M_NOWAIT) and
  drop unneeded cast.

Modified:
  stable/11/sys/dev/wtap/if_wtap.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/sys/dev/wtap/if_wtap.c
  stable/12/sys/dev/wtap/if_wtap.c
Directory Properties:
  stable/10/   (props changed)
  stable/12/   (props changed)

Modified: stable/11/sys/dev/wtap/if_wtap.c
==
--- stable/11/sys/dev/wtap/if_wtap.cWed Feb  6 02:30:14 2019
(r343822)
+++ stable/11/sys/dev/wtap/if_wtap.cWed Feb  6 02:35:56 2019
(r343823)
@@ -370,7 +370,7 @@ wtap_vap_delete(struct ieee80211vap *vap)
destroy_dev(avp->av_dev);
callout_stop(>av_swba);
ieee80211_vap_detach(vap);
-   free((struct wtap_vap*) vap, M_80211_VAP);
+   free(avp, M_80211_VAP);
 }
 
 static void
@@ -599,6 +599,8 @@ wtap_node_alloc(struct ieee80211vap *vap, const uint8_
 
ni = malloc(sizeof(struct ieee80211_node), M_80211_NODE,
M_NOWAIT|M_ZERO);
+   if (ni == NULL)
+   return (NULL);
 
ni->ni_txrate = 130;
return ni;
___
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: r343822 - stable/12/sys/dev/usb/wlan

2019-02-05 Thread Andriy Voskoboinyk
Author: avos
Date: Wed Feb  6 02:30:14 2019
New Revision: 343822
URL: https://svnweb.freebsd.org/changeset/base/343822

Log:
  MFC r343577:
  rsu(4): add support for ifconfig(8) 'maxretry' option

Modified:
  stable/12/sys/dev/usb/wlan/if_rsu.c
  stable/12/sys/dev/usb/wlan/if_rsureg.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/usb/wlan/if_rsu.c
==
--- stable/12/sys/dev/usb/wlan/if_rsu.c Wed Feb  6 02:18:11 2019
(r343821)
+++ stable/12/sys/dev/usb/wlan/if_rsu.c Wed Feb  6 02:30:14 2019
(r343822)
@@ -2759,7 +2759,7 @@ rsu_tx_start(struct rsu_softc *sc, struct ieee80211_no
struct ieee80211_frame *wh;
struct ieee80211_key *k = NULL;
struct r92s_tx_desc *txd;
-   uint8_t rate, ridx, type, cipher;
+   uint8_t rate, ridx, type, cipher, qos;
int prio = 0;
uint8_t which;
int hasqos;
@@ -2808,12 +2808,14 @@ rsu_tx_start(struct rsu_softc *sc, struct ieee80211_no
prio = M_WME_GETAC(m0);
which = rsu_wme_ac_xfer_map[prio];
hasqos = 1;
+   qos = ((const struct ieee80211_qosframe *)wh)->i_qos[0];
} else {
/* Non-QoS TID */
/* XXX TODO: tid=0 for non-qos TID? */
which = rsu_wme_ac_xfer_map[WME_AC_BE];
hasqos = 0;
prio = 0;
+   qos = 0;
}
 
qid = rsu_ac2qid[prio];
@@ -2871,6 +2873,12 @@ rsu_tx_start(struct rsu_softc *sc, struct ieee80211_no
txd->txdw2 |= htole32(R92S_TXDW2_BK);
if (ismcast)
txd->txdw2 |= htole32(R92S_TXDW2_BMCAST);
+
+   if (!ismcast && (!qos || (qos & IEEE80211_QOS_ACKPOLICY) !=
+   IEEE80211_QOS_ACKPOLICY_NOACK)) {
+   txd->txdw2 |= htole32(R92S_TXDW2_RTY_LMT_ENA);
+   txd->txdw2 |= htole32(SM(R92S_TXDW2_RTY_LMT, tp->maxretry));
+   }
 
/* Force mgmt / mcast / ucast rate if needed. */
if (rate != 0) {

Modified: stable/12/sys/dev/usb/wlan/if_rsureg.h
==
--- stable/12/sys/dev/usb/wlan/if_rsureg.h  Wed Feb  6 02:18:11 2019
(r343821)
+++ stable/12/sys/dev/usb/wlan/if_rsureg.h  Wed Feb  6 02:30:14 2019
(r343822)
@@ -688,6 +688,9 @@ struct r92s_tx_desc {
 #define R92S_TXDW1_HWPC0x8000
 
uint32_ttxdw2;
+#define R92S_TXDW2_RTY_LMT_M   0x003f
+#define R92S_TXDW2_RTY_LMT_S   0
+#define R92S_TXDW2_RTY_LMT_ENA 0x0040
 #define R92S_TXDW2_BMCAST  0x0080
 #define R92S_TXDW2_AGGEN   0x2000
 #define R92S_TXDW2_BK  0x4000
___
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: r343821 - in stable: 10/sys/dev/usb/wlan 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan

2019-02-05 Thread Andriy Voskoboinyk
Author: avos
Date: Wed Feb  6 02:18:11 2019
New Revision: 343821
URL: https://svnweb.freebsd.org/changeset/base/343821

Log:
  MFC r343681:
  run(4): fix allocated memory type for ieee80211_node(4)
  
  PR:   177366

Modified:
  stable/12/sys/dev/usb/wlan/if_run.c
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/sys/dev/usb/wlan/if_run.c
  stable/11/sys/dev/usb/wlan/if_run.c
Directory Properties:
  stable/10/   (props changed)
  stable/11/   (props changed)

Modified: stable/12/sys/dev/usb/wlan/if_run.c
==
--- stable/12/sys/dev/usb/wlan/if_run.c Wed Feb  6 02:07:37 2019
(r343820)
+++ stable/12/sys/dev/usb/wlan/if_run.c Wed Feb  6 02:18:11 2019
(r343821)
@@ -2029,7 +2029,8 @@ run_read_eeprom(struct run_softc *sc)
 static struct ieee80211_node *
 run_node_alloc(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN])
 {
-   return malloc(sizeof (struct run_node), M_DEVBUF, M_NOWAIT | M_ZERO);
+   return malloc(sizeof (struct run_node), M_80211_NODE,
+   M_NOWAIT | M_ZERO);
 }
 
 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"


svn commit: r343821 - in stable: 10/sys/dev/usb/wlan 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan

2019-02-05 Thread Andriy Voskoboinyk
Author: avos
Date: Wed Feb  6 02:18:11 2019
New Revision: 343821
URL: https://svnweb.freebsd.org/changeset/base/343821

Log:
  MFC r343681:
  run(4): fix allocated memory type for ieee80211_node(4)
  
  PR:   177366

Modified:
  stable/10/sys/dev/usb/wlan/if_run.c
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/sys/dev/usb/wlan/if_run.c
  stable/12/sys/dev/usb/wlan/if_run.c
Directory Properties:
  stable/11/   (props changed)
  stable/12/   (props changed)

Modified: stable/10/sys/dev/usb/wlan/if_run.c
==
--- stable/10/sys/dev/usb/wlan/if_run.c Wed Feb  6 02:07:37 2019
(r343820)
+++ stable/10/sys/dev/usb/wlan/if_run.c Wed Feb  6 02:18:11 2019
(r343821)
@@ -1987,7 +1987,8 @@ run_read_eeprom(struct run_softc *sc)
 static struct ieee80211_node *
 run_node_alloc(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN])
 {
-   return malloc(sizeof (struct run_node), M_DEVBUF, M_NOWAIT | M_ZERO);
+   return malloc(sizeof (struct run_node), M_80211_NODE,
+   M_NOWAIT | M_ZERO);
 }
 
 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"


svn commit: r343821 - in stable: 10/sys/dev/usb/wlan 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan

2019-02-05 Thread Andriy Voskoboinyk
Author: avos
Date: Wed Feb  6 02:18:11 2019
New Revision: 343821
URL: https://svnweb.freebsd.org/changeset/base/343821

Log:
  MFC r343681:
  run(4): fix allocated memory type for ieee80211_node(4)
  
  PR:   177366

Modified:
  stable/11/sys/dev/usb/wlan/if_run.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/sys/dev/usb/wlan/if_run.c
  stable/12/sys/dev/usb/wlan/if_run.c
Directory Properties:
  stable/10/   (props changed)
  stable/12/   (props changed)

Modified: stable/11/sys/dev/usb/wlan/if_run.c
==
--- stable/11/sys/dev/usb/wlan/if_run.c Wed Feb  6 02:07:37 2019
(r343820)
+++ stable/11/sys/dev/usb/wlan/if_run.c Wed Feb  6 02:18:11 2019
(r343821)
@@ -1982,7 +1982,8 @@ run_read_eeprom(struct run_softc *sc)
 static struct ieee80211_node *
 run_node_alloc(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN])
 {
-   return malloc(sizeof (struct run_node), M_DEVBUF, M_NOWAIT | M_ZERO);
+   return malloc(sizeof (struct run_node), M_80211_NODE,
+   M_NOWAIT | M_ZERO);
 }
 
 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"


svn commit: r343820 - in stable/10/sys: compat/ndis dev/if_ndis

2019-02-05 Thread Andriy Voskoboinyk
Author: avos
Date: Wed Feb  6 02:07:37 2019
New Revision: 343820
URL: https://svnweb.freebsd.org/changeset/base/343820

Log:
  MFC r343574:
  Fix compilation with 'option NDISAPI + device ndis' and
  without 'device pccard' in the kernel config file.
  
  PR:   171532
  Reported by:  Robert Bonomi 

Modified:
  stable/10/sys/compat/ndis/ndis_var.h
  stable/10/sys/dev/if_ndis/if_ndis.c
  stable/10/sys/dev/if_ndis/if_ndis_pccard.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/compat/ndis/ndis_var.h
==
--- stable/10/sys/compat/ndis/ndis_var.hWed Feb  6 02:06:00 2019
(r343819)
+++ stable/10/sys/compat/ndis/ndis_var.hWed Feb  6 02:07:37 2019
(r343820)
@@ -1734,8 +1734,6 @@ extern int ndis_get_supported_oids(void *, ndis_oid **
 extern int ndis_send_packets(void *, ndis_packet **, int);
 extern int ndis_send_packet(void *, ndis_packet *);
 extern int ndis_convert_res(void *);
-extern int ndis_alloc_amem(void *);
-extern void ndis_free_amem(void *);
 extern void ndis_free_packet(ndis_packet *);
 extern void ndis_free_bufs(ndis_buffer *);
 extern int ndis_reset_nic(void *);

Modified: stable/10/sys/dev/if_ndis/if_ndis.c
==
--- stable/10/sys/dev/if_ndis/if_ndis.c Wed Feb  6 02:06:00 2019
(r343819)
+++ stable/10/sys/dev/if_ndis/if_ndis.c Wed Feb  6 02:07:37 2019
(r343820)
@@ -559,15 +559,6 @@ ndis_attach(dev)
InitializeListHead(>ndisusb_xferdonelist);
callout_init(>ndis_stat_callout, 1);
 
-   if (sc->ndis_iftype == PCMCIABus) {
-   error = ndis_alloc_amem(sc);
-   if (error) {
-   device_printf(dev, "failed to allocate "
-   "attribute memory\n");
-   goto fail;
-   }
-   }
-
/* Create sysctl registry nodes */
ndis_create_sysctls(sc);
 
@@ -1078,9 +1069,6 @@ ndis_detach(dev)
 
if (ifp != NULL)
if_free(ifp);
-
-   if (sc->ndis_iftype == PCMCIABus)
-   ndis_free_amem(sc);
 
if (sc->ndis_sc)
ndis_destroy_dma(sc);

Modified: stable/10/sys/dev/if_ndis/if_ndis_pccard.c
==
--- stable/10/sys/dev/if_ndis/if_ndis_pccard.c  Wed Feb  6 02:06:00 2019
(r343819)
+++ stable/10/sys/dev/if_ndis/if_ndis_pccard.c  Wed Feb  6 02:07:37 2019
(r343820)
@@ -70,6 +70,7 @@ MODULE_DEPEND(ndis, pccard, 1, 1, 1);
 
 static int ndis_probe_pccard   (device_t);
 static int ndis_attach_pccard  (device_t);
+static int ndis_detach_pccard  (device_t);
 static struct resource_list *ndis_get_resource_list
(device_t, device_t);
 static int ndis_devcompare (interface_type,
@@ -87,7 +88,7 @@ static device_method_t ndis_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, ndis_probe_pccard),
DEVMETHOD(device_attach,ndis_attach_pccard),
-   DEVMETHOD(device_detach,ndis_detach),
+   DEVMETHOD(device_detach,ndis_detach_pccard),
DEVMETHOD(device_shutdown,  ndis_shutdown),
DEVMETHOD(device_suspend,   ndis_suspend),
DEVMETHOD(device_resume,ndis_resume),
@@ -171,6 +172,50 @@ ndis_probe_pccard(dev)
return(ENXIO);
 }
 
+#define NDIS_AM_RID 3
+
+static int
+ndis_alloc_amem(struct ndis_softc *sc)
+{
+   int error, rid;
+
+   rid = NDIS_AM_RID;
+   sc->ndis_res_am = bus_alloc_resource(sc->ndis_dev, SYS_RES_MEMORY,
+   , 0UL, ~0UL, 0x1000, RF_ACTIVE);
+
+   if (sc->ndis_res_am == NULL) {
+   device_printf(sc->ndis_dev,
+   "failed to allocate attribute memory\n");
+   return(ENXIO);
+   }
+   sc->ndis_rescnt++;
+   resource_list_add(>ndis_rl, SYS_RES_MEMORY, rid,
+   rman_get_start(sc->ndis_res_am), rman_get_end(sc->ndis_res_am),
+   rman_get_size(sc->ndis_res_am));
+
+   error = CARD_SET_MEMORY_OFFSET(device_get_parent(sc->ndis_dev),
+   sc->ndis_dev, rid, 0, NULL);
+
+   if (error) {
+   device_printf(sc->ndis_dev,
+   "CARD_SET_MEMORY_OFFSET() returned 0x%x\n", error);
+   return(error);
+   }
+
+   error = CARD_SET_RES_FLAGS(device_get_parent(sc->ndis_dev),
+   sc->ndis_dev, SYS_RES_MEMORY, rid, PCCARD_A_MEM_ATTR);
+
+   if (error) {
+   device_printf(sc->ndis_dev,
+   "CARD_SET_RES_FLAGS() returned 0x%x\n", error);
+   return(error);
+   }
+
+   sc->ndis_am_rid = rid;
+
+   return(0);
+}
+
 /*
  * Attach the interface. Allocate softc structures, do ifmedia
  * setup and ethernet/BPF attach.
@@ -247,88 +292,40 @@ ndis_attach_pccard(dev)
 
sc->ndis_devidx = 

svn commit: r343819 - in stable: 11/sys/compat/ndis 11/sys/dev/if_ndis 12/sys/compat/ndis 12/sys/dev/if_ndis

2019-02-05 Thread Andriy Voskoboinyk
Author: avos
Date: Wed Feb  6 02:06:00 2019
New Revision: 343819
URL: https://svnweb.freebsd.org/changeset/base/343819

Log:
  MFC r343574:
  Fix compilation with 'option NDISAPI + device ndis' and
  without 'device pccard' in the kernel config file.
  
  PR:   171532
  Reported by:  Robert Bonomi 

Modified:
  stable/11/sys/compat/ndis/ndis_var.h
  stable/11/sys/dev/if_ndis/if_ndis.c
  stable/11/sys/dev/if_ndis/if_ndis_pccard.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/sys/compat/ndis/ndis_var.h
  stable/12/sys/dev/if_ndis/if_ndis.c
  stable/12/sys/dev/if_ndis/if_ndis_pccard.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/sys/compat/ndis/ndis_var.h
==
--- stable/11/sys/compat/ndis/ndis_var.hWed Feb  6 01:53:01 2019
(r343818)
+++ stable/11/sys/compat/ndis/ndis_var.hWed Feb  6 02:06:00 2019
(r343819)
@@ -1734,8 +1734,6 @@ extern int ndis_get_supported_oids(void *, ndis_oid **
 extern int ndis_send_packets(void *, ndis_packet **, int);
 extern int ndis_send_packet(void *, ndis_packet *);
 extern int ndis_convert_res(void *);
-extern int ndis_alloc_amem(void *);
-extern void ndis_free_amem(void *);
 extern void ndis_free_packet(ndis_packet *);
 extern void ndis_free_bufs(ndis_buffer *);
 extern int ndis_reset_nic(void *);

Modified: stable/11/sys/dev/if_ndis/if_ndis.c
==
--- stable/11/sys/dev/if_ndis/if_ndis.c Wed Feb  6 01:53:01 2019
(r343818)
+++ stable/11/sys/dev/if_ndis/if_ndis.c Wed Feb  6 02:06:00 2019
(r343819)
@@ -566,15 +566,6 @@ ndis_attach(device_t dev)
callout_init(>ndis_stat_callout, 1);
mbufq_init(>ndis_rxqueue, INT_MAX); /* XXXGL: sane maximum */
 
-   if (sc->ndis_iftype == PCMCIABus) {
-   error = ndis_alloc_amem(sc);
-   if (error) {
-   device_printf(dev, "failed to allocate "
-   "attribute memory\n");
-   goto fail;
-   }
-   }
-
/* Create sysctl registry nodes */
ndis_create_sysctls(sc);
 
@@ -1095,9 +1086,6 @@ ndis_detach(device_t dev)
 
if (ifp != NULL)
if_free(ifp);
-
-   if (sc->ndis_iftype == PCMCIABus)
-   ndis_free_amem(sc);
 
if (sc->ndis_sc)
ndis_destroy_dma(sc);

Modified: stable/11/sys/dev/if_ndis/if_ndis_pccard.c
==
--- stable/11/sys/dev/if_ndis/if_ndis_pccard.c  Wed Feb  6 01:53:01 2019
(r343818)
+++ stable/11/sys/dev/if_ndis/if_ndis_pccard.c  Wed Feb  6 02:06:00 2019
(r343819)
@@ -72,6 +72,7 @@ MODULE_DEPEND(ndis, pccard, 1, 1, 1);
 
 static int ndis_probe_pccard   (device_t);
 static int ndis_attach_pccard  (device_t);
+static int ndis_detach_pccard  (device_t);
 static struct resource_list *ndis_get_resource_list
(device_t, device_t);
 static int ndis_devcompare (interface_type,
@@ -89,7 +90,7 @@ static device_method_t ndis_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, ndis_probe_pccard),
DEVMETHOD(device_attach,ndis_attach_pccard),
-   DEVMETHOD(device_detach,ndis_detach),
+   DEVMETHOD(device_detach,ndis_detach_pccard),
DEVMETHOD(device_shutdown,  ndis_shutdown),
DEVMETHOD(device_suspend,   ndis_suspend),
DEVMETHOD(device_resume,ndis_resume),
@@ -173,6 +174,50 @@ ndis_probe_pccard(dev)
return(ENXIO);
 }
 
+#define NDIS_AM_RID 3
+
+static int
+ndis_alloc_amem(struct ndis_softc *sc)
+{
+   int error, rid;
+
+   rid = NDIS_AM_RID;
+   sc->ndis_res_am = bus_alloc_resource_anywhere(sc->ndis_dev,
+   SYS_RES_MEMORY, , 0x1000, RF_ACTIVE);
+
+   if (sc->ndis_res_am == NULL) {
+   device_printf(sc->ndis_dev,
+   "failed to allocate attribute memory\n");
+   return(ENXIO);
+   }
+   sc->ndis_rescnt++;
+   resource_list_add(>ndis_rl, SYS_RES_MEMORY, rid,
+   rman_get_start(sc->ndis_res_am), rman_get_end(sc->ndis_res_am),
+   rman_get_size(sc->ndis_res_am));
+
+   error = CARD_SET_MEMORY_OFFSET(device_get_parent(sc->ndis_dev),
+   sc->ndis_dev, rid, 0, NULL);
+
+   if (error) {
+   device_printf(sc->ndis_dev,
+   "CARD_SET_MEMORY_OFFSET() returned 0x%x\n", error);
+   return(error);
+   }
+
+   error = CARD_SET_RES_FLAGS(device_get_parent(sc->ndis_dev),
+   sc->ndis_dev, SYS_RES_MEMORY, rid, PCCARD_A_MEM_ATTR);
+
+   if (error) {
+   device_printf(sc->ndis_dev,
+   "CARD_SET_RES_FLAGS() returned 0x%x\n", error);
+   

svn commit: r343819 - in stable: 11/sys/compat/ndis 11/sys/dev/if_ndis 12/sys/compat/ndis 12/sys/dev/if_ndis

2019-02-05 Thread Andriy Voskoboinyk
Author: avos
Date: Wed Feb  6 02:06:00 2019
New Revision: 343819
URL: https://svnweb.freebsd.org/changeset/base/343819

Log:
  MFC r343574:
  Fix compilation with 'option NDISAPI + device ndis' and
  without 'device pccard' in the kernel config file.
  
  PR:   171532
  Reported by:  Robert Bonomi 

Modified:
  stable/12/sys/compat/ndis/ndis_var.h
  stable/12/sys/dev/if_ndis/if_ndis.c
  stable/12/sys/dev/if_ndis/if_ndis_pccard.c
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/sys/compat/ndis/ndis_var.h
  stable/11/sys/dev/if_ndis/if_ndis.c
  stable/11/sys/dev/if_ndis/if_ndis_pccard.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/sys/compat/ndis/ndis_var.h
==
--- stable/12/sys/compat/ndis/ndis_var.hWed Feb  6 01:53:01 2019
(r343818)
+++ stable/12/sys/compat/ndis/ndis_var.hWed Feb  6 02:06:00 2019
(r343819)
@@ -1736,8 +1736,6 @@ extern int ndis_get_supported_oids(void *, ndis_oid **
 extern int ndis_send_packets(void *, ndis_packet **, int);
 extern int ndis_send_packet(void *, ndis_packet *);
 extern int ndis_convert_res(void *);
-extern int ndis_alloc_amem(void *);
-extern void ndis_free_amem(void *);
 extern void ndis_free_packet(ndis_packet *);
 extern void ndis_free_bufs(ndis_buffer *);
 extern int ndis_reset_nic(void *);

Modified: stable/12/sys/dev/if_ndis/if_ndis.c
==
--- stable/12/sys/dev/if_ndis/if_ndis.c Wed Feb  6 01:53:01 2019
(r343818)
+++ stable/12/sys/dev/if_ndis/if_ndis.c Wed Feb  6 02:06:00 2019
(r343819)
@@ -568,15 +568,6 @@ ndis_attach(device_t dev)
callout_init(>ndis_stat_callout, 1);
mbufq_init(>ndis_rxqueue, INT_MAX); /* XXXGL: sane maximum */
 
-   if (sc->ndis_iftype == PCMCIABus) {
-   error = ndis_alloc_amem(sc);
-   if (error) {
-   device_printf(dev, "failed to allocate "
-   "attribute memory\n");
-   goto fail;
-   }
-   }
-
/* Create sysctl registry nodes */
ndis_create_sysctls(sc);
 
@@ -1097,9 +1088,6 @@ ndis_detach(device_t dev)
 
if (ifp != NULL)
if_free(ifp);
-
-   if (sc->ndis_iftype == PCMCIABus)
-   ndis_free_amem(sc);
 
if (sc->ndis_sc)
ndis_destroy_dma(sc);

Modified: stable/12/sys/dev/if_ndis/if_ndis_pccard.c
==
--- stable/12/sys/dev/if_ndis/if_ndis_pccard.c  Wed Feb  6 01:53:01 2019
(r343818)
+++ stable/12/sys/dev/if_ndis/if_ndis_pccard.c  Wed Feb  6 02:06:00 2019
(r343819)
@@ -74,6 +74,7 @@ MODULE_DEPEND(ndis, pccard, 1, 1, 1);
 
 static int ndis_probe_pccard   (device_t);
 static int ndis_attach_pccard  (device_t);
+static int ndis_detach_pccard  (device_t);
 static struct resource_list *ndis_get_resource_list
(device_t, device_t);
 static int ndis_devcompare (interface_type,
@@ -91,7 +92,7 @@ static device_method_t ndis_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, ndis_probe_pccard),
DEVMETHOD(device_attach,ndis_attach_pccard),
-   DEVMETHOD(device_detach,ndis_detach),
+   DEVMETHOD(device_detach,ndis_detach_pccard),
DEVMETHOD(device_shutdown,  ndis_shutdown),
DEVMETHOD(device_suspend,   ndis_suspend),
DEVMETHOD(device_resume,ndis_resume),
@@ -175,6 +176,50 @@ ndis_probe_pccard(dev)
return(ENXIO);
 }
 
+#define NDIS_AM_RID 3
+
+static int
+ndis_alloc_amem(struct ndis_softc *sc)
+{
+   int error, rid;
+
+   rid = NDIS_AM_RID;
+   sc->ndis_res_am = bus_alloc_resource_anywhere(sc->ndis_dev,
+   SYS_RES_MEMORY, , 0x1000, RF_ACTIVE);
+
+   if (sc->ndis_res_am == NULL) {
+   device_printf(sc->ndis_dev,
+   "failed to allocate attribute memory\n");
+   return(ENXIO);
+   }
+   sc->ndis_rescnt++;
+   resource_list_add(>ndis_rl, SYS_RES_MEMORY, rid,
+   rman_get_start(sc->ndis_res_am), rman_get_end(sc->ndis_res_am),
+   rman_get_size(sc->ndis_res_am));
+
+   error = CARD_SET_MEMORY_OFFSET(device_get_parent(sc->ndis_dev),
+   sc->ndis_dev, rid, 0, NULL);
+
+   if (error) {
+   device_printf(sc->ndis_dev,
+   "CARD_SET_MEMORY_OFFSET() returned 0x%x\n", error);
+   return(error);
+   }
+
+   error = CARD_SET_RES_FLAGS(device_get_parent(sc->ndis_dev),
+   sc->ndis_dev, SYS_RES_MEMORY, rid, PCCARD_A_MEM_ATTR);
+
+   if (error) {
+   device_printf(sc->ndis_dev,
+   "CARD_SET_RES_FLAGS() returned 0x%x\n", error);
+   

svn commit: r343818 - in stable: 10/sys/net80211 11/sys/net80211 12/sys/net80211

2019-02-05 Thread Andriy Voskoboinyk
Author: avos
Date: Wed Feb  6 01:53:01 2019
New Revision: 343818
URL: https://svnweb.freebsd.org/changeset/base/343818

Log:
  MFC r343697:
  net80211(4): fix rate check when 'roaming' ifconfig(8) option is set to 'auto'
  
  Do not try to clear 'basic rate' bit from roamRate; it cannot be here and,
  actually, this operation clears 'MCS rate' bit instead, breaking comparison
  for 11n / 11ac modes.

Modified:
  stable/12/sys/net80211/ieee80211_scan_sta.c
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/sys/net80211/ieee80211_scan_sta.c
  stable/11/sys/net80211/ieee80211_scan_sta.c
Directory Properties:
  stable/10/   (props changed)
  stable/11/   (props changed)

Modified: stable/12/sys/net80211/ieee80211_scan_sta.c
==
--- stable/12/sys/net80211/ieee80211_scan_sta.c Wed Feb  6 01:47:22 2019
(r343817)
+++ stable/12/sys/net80211/ieee80211_scan_sta.c Wed Feb  6 01:53:01 2019
(r343818)
@@ -1359,7 +1359,6 @@ sta_roam_check(struct ieee80211_scan_state *ss, struct
curRssi = ic->ic_node_getrssi(ni);
if (ucastRate == IEEE80211_FIXED_RATE_NONE) {
curRate = ni->ni_txrate;
-   roamRate &= IEEE80211_RATE_VAL;
IEEE80211_DPRINTF(vap, IEEE80211_MSG_ROAM,
"%s: currssi %d currate %u roamrssi %d roamrate %u\n",
__func__, curRssi, curRate, roamRssi, roamRate);
___
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: r343818 - in stable: 10/sys/net80211 11/sys/net80211 12/sys/net80211

2019-02-05 Thread Andriy Voskoboinyk
Author: avos
Date: Wed Feb  6 01:53:01 2019
New Revision: 343818
URL: https://svnweb.freebsd.org/changeset/base/343818

Log:
  MFC r343697:
  net80211(4): fix rate check when 'roaming' ifconfig(8) option is set to 'auto'
  
  Do not try to clear 'basic rate' bit from roamRate; it cannot be here and,
  actually, this operation clears 'MCS rate' bit instead, breaking comparison
  for 11n / 11ac modes.

Modified:
  stable/10/sys/net80211/ieee80211_scan_sta.c
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/sys/net80211/ieee80211_scan_sta.c
  stable/12/sys/net80211/ieee80211_scan_sta.c
Directory Properties:
  stable/11/   (props changed)
  stable/12/   (props changed)

Modified: stable/10/sys/net80211/ieee80211_scan_sta.c
==
--- stable/10/sys/net80211/ieee80211_scan_sta.c Wed Feb  6 01:47:22 2019
(r343817)
+++ stable/10/sys/net80211/ieee80211_scan_sta.c Wed Feb  6 01:53:01 2019
(r343818)
@@ -1311,7 +1311,6 @@ sta_roam_check(struct ieee80211_scan_state *ss, struct
curRssi = ic->ic_node_getrssi(ni);
if (ucastRate == IEEE80211_FIXED_RATE_NONE) {
curRate = ni->ni_txrate;
-   roamRate &= IEEE80211_RATE_VAL;
IEEE80211_DPRINTF(vap, IEEE80211_MSG_ROAM,
"%s: currssi %d currate %u roamrssi %d roamrate %u\n",
__func__, curRssi, curRate, roamRssi, roamRate);
___
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: r343818 - in stable: 10/sys/net80211 11/sys/net80211 12/sys/net80211

2019-02-05 Thread Andriy Voskoboinyk
Author: avos
Date: Wed Feb  6 01:53:01 2019
New Revision: 343818
URL: https://svnweb.freebsd.org/changeset/base/343818

Log:
  MFC r343697:
  net80211(4): fix rate check when 'roaming' ifconfig(8) option is set to 'auto'
  
  Do not try to clear 'basic rate' bit from roamRate; it cannot be here and,
  actually, this operation clears 'MCS rate' bit instead, breaking comparison
  for 11n / 11ac modes.

Modified:
  stable/11/sys/net80211/ieee80211_scan_sta.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/sys/net80211/ieee80211_scan_sta.c
  stable/12/sys/net80211/ieee80211_scan_sta.c
Directory Properties:
  stable/10/   (props changed)
  stable/12/   (props changed)

Modified: stable/11/sys/net80211/ieee80211_scan_sta.c
==
--- stable/11/sys/net80211/ieee80211_scan_sta.c Wed Feb  6 01:47:22 2019
(r343817)
+++ stable/11/sys/net80211/ieee80211_scan_sta.c Wed Feb  6 01:53:01 2019
(r343818)
@@ -1329,7 +1329,6 @@ sta_roam_check(struct ieee80211_scan_state *ss, struct
curRssi = ic->ic_node_getrssi(ni);
if (ucastRate == IEEE80211_FIXED_RATE_NONE) {
curRate = ni->ni_txrate;
-   roamRate &= IEEE80211_RATE_VAL;
IEEE80211_DPRINTF(vap, IEEE80211_MSG_ROAM,
"%s: currssi %d currate %u roamrssi %d roamrate %u\n",
__func__, curRssi, curRate, roamRssi, roamRate);
___
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: r343817 - in stable: 11/sys/net80211 12/sys/net80211

2019-02-05 Thread Andriy Voskoboinyk
Author: avos
Date: Wed Feb  6 01:47:22 2019
New Revision: 343817
URL: https://svnweb.freebsd.org/changeset/base/343817

Log:
  MFC r343684:
  Drop unused M_80211_COM malloc(9) type.
  
  It is not used since r287197.

Modified:
  stable/12/sys/net80211/ieee80211_freebsd.c
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/sys/net80211/ieee80211_freebsd.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/sys/net80211/ieee80211_freebsd.c
==
--- stable/12/sys/net80211/ieee80211_freebsd.c  Wed Feb  6 01:42:26 2019
(r343816)
+++ stable/12/sys/net80211/ieee80211_freebsd.c  Wed Feb  6 01:47:22 2019
(r343817)
@@ -68,8 +68,6 @@ SYSCTL_INT(_net_wlan, OID_AUTO, debug, CTLFLAG_RW, 
0, "debugging printfs");
 #endif
 
-static MALLOC_DEFINE(M_80211_COM, "80211com", "802.11 com state");
-
 static const char wlanname[] = "wlan";
 static struct if_clone *wlan_cloner;
 
___
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: r343817 - in stable: 11/sys/net80211 12/sys/net80211

2019-02-05 Thread Andriy Voskoboinyk
Author: avos
Date: Wed Feb  6 01:47:22 2019
New Revision: 343817
URL: https://svnweb.freebsd.org/changeset/base/343817

Log:
  MFC r343684:
  Drop unused M_80211_COM malloc(9) type.
  
  It is not used since r287197.

Modified:
  stable/11/sys/net80211/ieee80211_freebsd.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/sys/net80211/ieee80211_freebsd.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/sys/net80211/ieee80211_freebsd.c
==
--- stable/11/sys/net80211/ieee80211_freebsd.c  Wed Feb  6 01:42:26 2019
(r343816)
+++ stable/11/sys/net80211/ieee80211_freebsd.c  Wed Feb  6 01:47:22 2019
(r343817)
@@ -66,8 +66,6 @@ SYSCTL_INT(_net_wlan, OID_AUTO, debug, CTLFLAG_RW, 
0, "debugging printfs");
 #endif
 
-static MALLOC_DEFINE(M_80211_COM, "80211com", "802.11 com state");
-
 static const char wlanname[] = "wlan";
 static struct if_clone *wlan_cloner;
 
___
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: r343816 - in stable: 10/sys/dev/usb/wlan 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan

2019-02-05 Thread Andriy Voskoboinyk
Author: avos
Date: Wed Feb  6 01:42:26 2019
New Revision: 343816
URL: https://svnweb.freebsd.org/changeset/base/343816

Log:
  MFC r343542:
  upgt(4): unbreak build with UPGT_DEBUG

Modified:
  stable/10/sys/dev/usb/wlan/if_upgt.c
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/sys/dev/usb/wlan/if_upgt.c
  stable/12/sys/dev/usb/wlan/if_upgt.c
Directory Properties:
  stable/11/   (props changed)
  stable/12/   (props changed)

Modified: stable/10/sys/dev/usb/wlan/if_upgt.c
==
--- stable/10/sys/dev/usb/wlan/if_upgt.cWed Feb  6 01:34:14 2019
(r343815)
+++ stable/10/sys/dev/usb/wlan/if_upgt.cWed Feb  6 01:42:26 2019
(r343816)
@@ -1700,7 +1700,7 @@ upgt_fw_load(struct upgt_softc *sc)
data_cmd->buflen = bsize;
upgt_bulk_tx(sc, data_cmd);
 
-   DPRINTF(sc, UPGT_DEBUG_FW, "FW offset=%d, read=%d, sent=%d\n",
+   DPRINTF(sc, UPGT_DEBUG_FW, "FW offset=%zu, read=%d, sent=%d\n",
offset, n, bsize);
bsize = n;
}
@@ -1857,7 +1857,7 @@ upgt_fw_verify(struct upgt_softc *sc)
}
 
DPRINTF(sc, UPGT_DEBUG_FW,
-   "firmware Boot Record Area found at offset %d\n", offset);
+   "firmware Boot Record Area found at offset %zu\n", offset);
 
/*
 * Parse Boot Record Area (BRA) options.
___
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: r343816 - in stable: 10/sys/dev/usb/wlan 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan

2019-02-05 Thread Andriy Voskoboinyk
Author: avos
Date: Wed Feb  6 01:42:26 2019
New Revision: 343816
URL: https://svnweb.freebsd.org/changeset/base/343816

Log:
  MFC r343542:
  upgt(4): unbreak build with UPGT_DEBUG

Modified:
  stable/12/sys/dev/usb/wlan/if_upgt.c
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/sys/dev/usb/wlan/if_upgt.c
  stable/11/sys/dev/usb/wlan/if_upgt.c
Directory Properties:
  stable/10/   (props changed)
  stable/11/   (props changed)

Modified: stable/12/sys/dev/usb/wlan/if_upgt.c
==
--- stable/12/sys/dev/usb/wlan/if_upgt.cWed Feb  6 01:34:14 2019
(r343815)
+++ stable/12/sys/dev/usb/wlan/if_upgt.cWed Feb  6 01:42:26 2019
(r343816)
@@ -1615,7 +1615,7 @@ upgt_fw_load(struct upgt_softc *sc)
data_cmd->buflen = bsize;
upgt_bulk_tx(sc, data_cmd);
 
-   DPRINTF(sc, UPGT_DEBUG_FW, "FW offset=%d, read=%d, sent=%d\n",
+   DPRINTF(sc, UPGT_DEBUG_FW, "FW offset=%zu, read=%d, sent=%d\n",
offset, n, bsize);
bsize = n;
}
@@ -1772,7 +1772,7 @@ upgt_fw_verify(struct upgt_softc *sc)
}
 
DPRINTF(sc, UPGT_DEBUG_FW,
-   "firmware Boot Record Area found at offset %d\n", offset);
+   "firmware Boot Record Area found at offset %zu\n", offset);
 
/*
 * Parse Boot Record Area (BRA) options.
___
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: r343816 - in stable: 10/sys/dev/usb/wlan 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan

2019-02-05 Thread Andriy Voskoboinyk
Author: avos
Date: Wed Feb  6 01:42:26 2019
New Revision: 343816
URL: https://svnweb.freebsd.org/changeset/base/343816

Log:
  MFC r343542:
  upgt(4): unbreak build with UPGT_DEBUG

Modified:
  stable/11/sys/dev/usb/wlan/if_upgt.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/sys/dev/usb/wlan/if_upgt.c
  stable/12/sys/dev/usb/wlan/if_upgt.c
Directory Properties:
  stable/10/   (props changed)
  stable/12/   (props changed)

Modified: stable/11/sys/dev/usb/wlan/if_upgt.c
==
--- stable/11/sys/dev/usb/wlan/if_upgt.cWed Feb  6 01:34:14 2019
(r343815)
+++ stable/11/sys/dev/usb/wlan/if_upgt.cWed Feb  6 01:42:26 2019
(r343816)
@@ -1613,7 +1613,7 @@ upgt_fw_load(struct upgt_softc *sc)
data_cmd->buflen = bsize;
upgt_bulk_tx(sc, data_cmd);
 
-   DPRINTF(sc, UPGT_DEBUG_FW, "FW offset=%d, read=%d, sent=%d\n",
+   DPRINTF(sc, UPGT_DEBUG_FW, "FW offset=%zu, read=%d, sent=%d\n",
offset, n, bsize);
bsize = n;
}
@@ -1770,7 +1770,7 @@ upgt_fw_verify(struct upgt_softc *sc)
}
 
DPRINTF(sc, UPGT_DEBUG_FW,
-   "firmware Boot Record Area found at offset %d\n", offset);
+   "firmware Boot Record Area found at offset %zu\n", offset);
 
/*
 * Parse Boot Record Area (BRA) options.
___
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: r343815 - head/sys/dev/iwn

2019-02-05 Thread Andriy Voskoboinyk
Author: avos
Date: Wed Feb  6 01:34:14 2019
New Revision: 343815
URL: https://svnweb.freebsd.org/changeset/base/343815

Log:
  iwn(4): plug initialization path vs interrupt handler races
  
  There are few places in interrupt handler where the driver
  lock is dropped; ensure that device is still running before
  processing remaining ring entries.
  
  PR:   192641
  MFC after:5 days

Modified:
  head/sys/dev/iwn/if_iwn.c

Modified: head/sys/dev/iwn/if_iwn.c
==
--- head/sys/dev/iwn/if_iwn.c   Tue Feb  5 22:53:36 2019(r343814)
+++ head/sys/dev/iwn/if_iwn.c   Wed Feb  6 01:34:14 2019(r343815)
@@ -3990,6 +3990,7 @@ iwn_notif_intr(struct iwn_softc *sc)
struct ieee80211com *ic = >sc_ic;
struct ieee80211vap *vap = TAILQ_FIRST(>ic_vaps);
uint16_t hw;
+   int is_stopped;
 
bus_dmamap_sync(sc->rxq.stat_dma.tag, sc->rxq.stat_dma.map,
BUS_DMASYNC_POSTREAD);
@@ -4021,6 +4022,11 @@ iwn_notif_intr(struct iwn_softc *sc)
case IWN_MPDU_RX_DONE:
/* An 802.11 frame has been received. */
iwn_rx_done(sc, desc, data);
+
+   is_stopped = (sc->sc_flags & IWN_FLAG_RUNNING) == 0;
+   if (__predict_false(is_stopped))
+   return;
+
break;
 
case IWN_RX_COMPRESSED_BA:
@@ -4061,6 +4067,11 @@ iwn_notif_intr(struct iwn_softc *sc)
IWN_UNLOCK(sc);
ieee80211_beacon_miss(ic);
IWN_LOCK(sc);
+
+   is_stopped = (sc->sc_flags &
+   IWN_FLAG_RUNNING) == 0;
+   if (__predict_false(is_stopped))
+   return;
}
}
break;
@@ -4127,6 +4138,11 @@ iwn_notif_intr(struct iwn_softc *sc)
IWN_UNLOCK(sc);
ieee80211_scan_next(vap);
IWN_LOCK(sc);
+
+   is_stopped = (sc->sc_flags & IWN_FLAG_RUNNING) == 0;
+   if (__predict_false(is_stopped))  
+   return;
+
break;
}
case IWN5000_CALIBRATION_RESULT:
___
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: r343814 - in head/sys/cam: ata scsi

2019-02-05 Thread Warner Losh
Author: imp
Date: Tue Feb  5 22:53:36 2019
New Revision: 343814
URL: https://svnweb.freebsd.org/changeset/base/343814

Log:
  Add quirk for Sansisk X400 drives
  
  Certain versions of Sandisk x400 firmware can hang under extremely
  heavly load of large I/Os for prolonged periods of time. Newer /
  current versions work fine, and should be used where possible. Where
  not possible, this quirk ensures that I/O requests are limited to 128k
  to avoids the bug, even under extreme load. Since MAXPHYS is 128k,
  only users with custom kernels are at risk on the older firmware.
  Once all known users of the older firmware have upgraded, this quirk
  will be removed.
  
  Sponsored by: Netflix, Inc.

Modified:
  head/sys/cam/ata/ata_da.c
  head/sys/cam/scsi/scsi_da.c

Modified: head/sys/cam/ata/ata_da.c
==
--- head/sys/cam/ata/ata_da.c   Tue Feb  5 22:08:49 2019(r343813)
+++ head/sys/cam/ata/ata_da.c   Tue Feb  5 22:53:36 2019(r343814)
@@ -119,7 +119,8 @@ typedef enum {
ADA_Q_NCQ_TRIM_BROKEN   = 0x02,
ADA_Q_LOG_BROKEN= 0x04,
ADA_Q_SMR_DM= 0x08,
-   ADA_Q_NO_TRIM   = 0x10
+   ADA_Q_NO_TRIM   = 0x10,
+   ADA_Q_128KB = 0x20
 } ada_quirks;
 
 #define ADA_Q_BIT_STRING   \
@@ -128,7 +129,8 @@ typedef enum {
"\002NCQ_TRIM_BROKEN"   \
"\003LOG_BROKEN"\
"\004SMR_DM"\
-   "\005NO_TRIM"
+   "\005NO_TRIM"   \
+   "\006128KB"
 
 typedef enum {
ADA_CCB_RAHEAD  = 0x01,
@@ -277,6 +279,11 @@ struct ada_quirk_entry {
 static struct ada_quirk_entry ada_quirk_table[] =
 {
{
+   /* Sandisk X400 */
+   { T_DIRECT, SIP_MEDIA_FIXED, "*", "SanDisk?SD8SB8U1T00*", 
"X4162000*" },
+   /*quirks*/ADA_Q_128KB
+   },
+   {
/* Hitachi Advanced Format (4k) drives */
{ T_DIRECT, SIP_MEDIA_FIXED, "*", "Hitachi H??E3*", "*" 
},
/*quirks*/ADA_Q_4K
@@ -1815,6 +1822,8 @@ adaregister(struct cam_periph *periph, void *arg)
maxio = min(maxio, 65536 * softc->params.secsize);
else/* 28bit ATA command limit */
maxio = min(maxio, 256 * softc->params.secsize);
+   if (softc->quirks & ADA_Q_128KB)
+   maxio = min(maxio, 128 * 1024);
softc->disk->d_maxsize = maxio;
softc->disk->d_unit = periph->unit_number;
softc->disk->d_flags = DISKFLAG_DIRECT_COMPLETION | DISKFLAG_CANZONE;

Modified: head/sys/cam/scsi/scsi_da.c
==
--- head/sys/cam/scsi/scsi_da.c Tue Feb  5 22:08:49 2019(r343813)
+++ head/sys/cam/scsi/scsi_da.c Tue Feb  5 22:53:36 2019(r343814)
@@ -130,7 +130,8 @@ typedef enum {
DA_Q_NO_UNMAP   = 0x20,
DA_Q_RETRY_BUSY = 0x40,
DA_Q_SMR_DM = 0x80,
-   DA_Q_STRICT_UNMAP   = 0x100
+   DA_Q_STRICT_UNMAP   = 0x100,
+   DA_Q_128KB  = 0x200
 } da_quirks;
 
 #define DA_Q_BIT_STRING\
@@ -143,7 +144,8 @@ typedef enum {
"\006NO_UNMAP"  \
"\007RETRY_BUSY"\
"\010SMR_DM"\
-   "\011STRICT_UNMAP"
+   "\011STRICT_UNMAP"  \
+   "\012128KB"
 
 typedef enum {
DA_CCB_PROBE_RC = 0x01,
@@ -871,6 +873,11 @@ static struct da_quirk_entry da_quirk_table[] =
},
/* ATA/SATA devices over SAS/USB/... */
{
+   /* Sandisk X400 */
+   { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "SanDisk SD8SB8U1*", "*" },
+   /*quirks*/DA_Q_128KB
+   },
+   {
/* Hitachi Advanced Format (4k) drives */
{ T_DIRECT, SIP_MEDIA_FIXED, "Hitachi", "H??E3*", "*" },
/*quirks*/DA_Q_4K
@@ -2825,6 +2832,8 @@ daregister(struct cam_periph *periph, void *arg)
softc->maxio = MAXPHYS; /* for safety */
else
softc->maxio = cpi.maxio;
+   if (softc->quirks & DA_Q_128KB)
+   softc->maxio = min(softc->maxio, 128 * 1024);
softc->disk->d_maxsize = softc->maxio;
softc->disk->d_unit = periph->unit_number;
softc->disk->d_flags = DISKFLAG_DIRECT_COMPLETION | DISKFLAG_CANZONE;
___
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: r342634 - in head/sys: arm/broadcom/bcm2835 arm/nvidia arm/ti dev/sdhci

2019-02-05 Thread Ed Maste
On Sun, 30 Dec 2018 at 18:08, Marius Strobl  wrote:
>
> Author: marius
> Date: Sun Dec 30 23:08:06 2018
> New Revision: 342634
> URL: https://svnweb.freebsd.org/changeset/base/342634
>
> Log:
>   o Don't allocate resources for SDMA in sdhci(4) if the controller or the
...

It seems this change introduced a panic on boot on the Jetson TK1
platform, see PR 235542. Can you please take a look at the PR and
suggest next steps for debugging?
___
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: r343813 - stable/11/release/doc/share/xml

2019-02-05 Thread Glen Barber
Author: gjb
Date: Tue Feb  5 22:08:49 2019
New Revision: 343813
URL: https://svnweb.freebsd.org/changeset/base/343813

Log:
  Document SA-19:01 and SA-19:02.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/11/release/doc/share/xml/security.xml

Modified: stable/11/release/doc/share/xml/security.xml
==
--- stable/11/release/doc/share/xml/security.xmlTue Feb  5 21:37:45 
2019(r343812)
+++ stable/11/release/doc/share/xml/security.xmlTue Feb  5 22:08:49 
2019(r343813)
@@ -77,6 +77,21 @@
19December2018
Buffer overflow
   
+
+  
+   FreeBSD-SA-19:01.syscall
+   5February2019
+   Kernel data register leak
+  
+
+  
+   FreeBSD-SA-19:02.fd
+   5February2019
+   File description reference count
+   leak
+  
 
   
 
___
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: r343812 - head/sys/dev/usb/controller

2019-02-05 Thread Warner Losh
Author: imp
Date: Tue Feb  5 21:37:45 2019
New Revision: 343812
URL: https://svnweb.freebsd.org/changeset/base/343812

Log:
  Remove obsolete controller
  
  We removed support for the super-old samsung s3 parts, but this is
  a straggler. Remove it too.

Deleted:
  head/sys/dev/usb/controller/ohci_s3c24x0.c
___
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: r343811 - in head: libexec/talkd share/man/man9 sys/dev/flash sys/dev/mmc sys/dev/pccbb sys/dev/puc sys/dev/sio sys/dev/uart sys/dev/usb/controller sys/dev/wi usr.sbin/dumpcis

2019-02-05 Thread Warner Losh
Author: imp
Date: Tue Feb  5 21:37:34 2019
New Revision: 343811
URL: https://svnweb.freebsd.org/changeset/base/343811

Log:
  Remove All Rights Reserved
  
  Remove the all rights reserved clause from my copyright, and make
  other minor tweaks needed where that might have created ambiguity.

Modified:
  head/libexec/talkd/extern.h
  head/share/man/man9/config_intrhook.9
  head/sys/dev/flash/mx25l.c
  head/sys/dev/flash/n25q.c
  head/sys/dev/mmc/bridge.h
  head/sys/dev/mmc/mmc.c
  head/sys/dev/mmc/mmc_private.h
  head/sys/dev/mmc/mmc_subr.c
  head/sys/dev/mmc/mmc_subr.h
  head/sys/dev/mmc/mmcbrvar.h
  head/sys/dev/mmc/mmcreg.h
  head/sys/dev/mmc/mmcsd.c
  head/sys/dev/mmc/mmcvar.h
  head/sys/dev/pccbb/pccbbdevid.h
  head/sys/dev/puc/puc_pci.c
  head/sys/dev/sio/sio_isa.c
  head/sys/dev/sio/sio_pccard.c
  head/sys/dev/sio/sio_pci.c
  head/sys/dev/sio/sio_puc.c
  head/sys/dev/uart/uart_bus_acpi.c
  head/sys/dev/uart/uart_bus_pccard.c
  head/sys/dev/uart/uart_bus_puc.c
  head/sys/dev/usb/controller/generic_ohci.c
  head/sys/dev/usb/controller/ohci_s3c24x0.c
  head/sys/dev/wi/if_wivar.h
  head/usr.sbin/dumpcis/main.c

Modified: head/libexec/talkd/extern.h
==
--- head/libexec/talkd/extern.h Tue Feb  5 21:28:29 2019(r343810)
+++ head/libexec/talkd/extern.h Tue Feb  5 21:37:34 2019(r343811)
@@ -1,7 +1,7 @@
 /*-
  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
  *
- * Copyright (c) 2002 M. Warner Losh.  All rights reserved.
+ * Copyright (c) 2002 M. Warner Losh.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions

Modified: head/share/man/man9/config_intrhook.9
==
--- head/share/man/man9/config_intrhook.9   Tue Feb  5 21:28:29 2019
(r343810)
+++ head/share/man/man9/config_intrhook.9   Tue Feb  5 21:37:34 2019
(r343811)
@@ -1,5 +1,5 @@
 .\"
-.\" Copyright (C) 2006 M. Warner Losh . All rights reserved.
+.\" Copyright (C) 2006 M. Warner Losh .
 .\"
 .\" Redistribution and use in source and binary forms, with or without
 .\" modification, are permitted provided that the following conditions

Modified: head/sys/dev/flash/mx25l.c
==
--- head/sys/dev/flash/mx25l.c  Tue Feb  5 21:28:29 2019(r343810)
+++ head/sys/dev/flash/mx25l.c  Tue Feb  5 21:37:34 2019(r343811)
@@ -1,7 +1,7 @@
 /*-
  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
  *
- * Copyright (c) 2006 M. Warner Losh.  All rights reserved.
+ * Copyright (c) 2006 M. Warner Losh.
  * Copyright (c) 2009 Oleksandr Tymoshenko.  All rights reserved.
  * Copyright (c) 2018 Ian Lepore.  All rights reserved.
  *

Modified: head/sys/dev/flash/n25q.c
==
--- head/sys/dev/flash/n25q.c   Tue Feb  5 21:28:29 2019(r343810)
+++ head/sys/dev/flash/n25q.c   Tue Feb  5 21:37:34 2019(r343811)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2006 M. Warner Losh.  All rights reserved.
+ * Copyright (c) 2006 M. Warner Losh.
  * Copyright (c) 2009 Oleksandr Tymoshenko.  All rights reserved.
  * Copyright (c) 2017 Ruslan Bukin 
  * Copyright (c) 2018 Ian Lepore.  All rights reserved.

Modified: head/sys/dev/mmc/bridge.h
==
--- head/sys/dev/mmc/bridge.h   Tue Feb  5 21:28:29 2019(r343810)
+++ head/sys/dev/mmc/bridge.h   Tue Feb  5 21:37:34 2019(r343811)
@@ -1,7 +1,7 @@
 /*-
  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
  *
- * Copyright (c) 2006 M. Warner Losh.  All rights reserved.
+ * Copyright (c) 2006 M. Warner Losh.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions

Modified: head/sys/dev/mmc/mmc.c
==
--- head/sys/dev/mmc/mmc.c  Tue Feb  5 21:28:29 2019(r343810)
+++ head/sys/dev/mmc/mmc.c  Tue Feb  5 21:37:34 2019(r343811)
@@ -2,7 +2,7 @@
  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
  *
  * Copyright (c) 2006 Bernd Walter.  All rights reserved.
- * Copyright (c) 2006 M. Warner Losh.  All rights reserved.
+ * Copyright (c) 2006 M. Warner Losh.
  * Copyright (c) 2017 Marius Strobl 
  *
  * Redistribution and use in source and binary forms, with or without

Modified: head/sys/dev/mmc/mmc_private.h
==
--- head/sys/dev/mmc/mmc_private.h  Tue Feb  5 21:28:29 2019
(r343810)
+++ head/sys/dev/mmc/mmc_private.h  Tue Feb  5 21:37:34 2019
(r343811)
@@ -1,6 +1,6 @@
 /*-
  * Copyright (c) 2006 Bernd Walter.  All rights reserved.
- * Copyright (c) 2006 M. 

svn commit: r343810 - in head: . share/man/man9 sys/dev/cardbus sys/mips/include

2019-02-05 Thread Warner Losh
Author: imp
Date: Tue Feb  5 21:28:29 2019
New Revision: 343810
URL: https://svnweb.freebsd.org/changeset/base/343810

Log:
  Remove a few stray "All Rights Reserved." declarations on stuff I've
  written.

Modified:
  head/UPDATING
  head/share/man/man9/bus_space.9
  head/sys/dev/cardbus/cardbus.c
  head/sys/mips/include/elf.h

Modified: head/UPDATING
==
--- head/UPDATING   Tue Feb  5 20:09:31 2019(r343809)
+++ head/UPDATING   Tue Feb  5 21:28:29 2019(r343810)
@@ -1936,7 +1936,7 @@ to fetch an UPDATING file from an older FreeBSD releas
 
 Copyright information:
 
-Copyright 1998-2009 M. Warner Losh.  All Rights Reserved.
+Copyright 1998-2009 M. Warner Losh.
 
 Redistribution, publication, translation and use, with or without
 modification, in full or in part, in any form or format of this

Modified: head/share/man/man9/bus_space.9
==
--- head/share/man/man9/bus_space.9 Tue Feb  5 20:09:31 2019
(r343809)
+++ head/share/man/man9/bus_space.9 Tue Feb  5 21:28:29 2019
(r343810)
@@ -1,6 +1,7 @@
 .\" $NetBSD: bus_space.9,v 1.9 1999/03/06 22:09:29 mycroft Exp $
 .\"
-.\" Copyright (c) 2005 M. Warner Losh.  All Rights Reserved.
+.\" Copyright (c) 2005 M. Warner Losh.
+.\"
 .\" Redistribution and use in source and binary forms, with or without
 .\" modification, are permitted provided that the following conditions
 .\" are met:

Modified: head/sys/dev/cardbus/cardbus.c
==
--- head/sys/dev/cardbus/cardbus.c  Tue Feb  5 20:09:31 2019
(r343809)
+++ head/sys/dev/cardbus/cardbus.c  Tue Feb  5 21:28:29 2019
(r343810)
@@ -1,8 +1,9 @@
 /*-
  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
  *
- * Copyright (c) 2003-2008 M. Warner Losh.  All Rights Reserved.
  * Copyright (c) 2000,2001 Jonathan Chen.  All rights reserved.
+ *
+ * Copyright (c) 2003-2008 M. Warner Losh.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions

Modified: head/sys/mips/include/elf.h
==
--- head/sys/mips/include/elf.h Tue Feb  5 20:09:31 2019(r343809)
+++ head/sys/mips/include/elf.h Tue Feb  5 21:28:29 2019(r343810)
@@ -1,7 +1,7 @@
 /*-
  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD AND BSD-2-Clause-NetBSD
  *
- * Copyright (c) 2013 M. Warner Losh. All Rights Reserved.
+ * Copyright (c) 2013 M. Warner Losh.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
___
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: r343809 - head/sys/i386/i386

2019-02-05 Thread Konstantin Belousov
Author: kib
Date: Tue Feb  5 20:09:31 2019
New Revision: 343809
URL: https://svnweb.freebsd.org/changeset/base/343809

Log:
  Make it possible to override PAE mode on boot.
  
  Initialize the static kenv in pmap_cold() and fetch user opinion on
  vm.pmap.pae_mode tunable if hardware is capable.  Note that the static
  environment is reinitilized in init386() later when paging is enabled.
  
  Reviewed by:  bde
  Discussed with:   kevans
  Sponsored by: The FreeBSD Foundation
  MFC after:2 months

Modified:
  head/sys/i386/i386/pmap_base.c

Modified: head/sys/i386/i386/pmap_base.c
==
--- head/sys/i386/i386/pmap_base.c  Tue Feb  5 20:02:16 2019
(r343808)
+++ head/sys/i386/i386/pmap_base.c  Tue Feb  5 20:09:31 2019
(r343809)
@@ -96,6 +96,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -935,16 +936,19 @@ pmap_kremove(vm_offset_t va)
 
 extern struct pmap_methods pmap_pae_methods, pmap_nopae_methods;
 int pae_mode;
-SYSCTL_INT(_vm_pmap, OID_AUTO, pae_mode, CTLFLAG_RD,
-_mode, 1,
+SYSCTL_INT(_vm_pmap, OID_AUTO, pae_mode, CTLFLAG_RDTUN | CTLFLAG_NOFETCH,
+_mode, 0,
 "PAE");
 
 void
 pmap_cold(void)
 {
 
-   if ((cpu_feature & CPUID_PAE) != 0) {
-   pae_mode = 1;
+   init_static_kenv((char *)bootinfo.bi_envp, 0);
+   pae_mode = (cpu_feature & CPUID_PAE) != 0;
+   if (pae_mode)
+   TUNABLE_INT_FETCH("vm.pmap.pae_mode", _mode);
+   if (pae_mode) {
pmap_methods_ptr = _pae_methods;
pmap_pae_cold();
} else {
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r343808 - head/sys/i386/i386

2019-02-05 Thread Konstantin Belousov
Author: kib
Date: Tue Feb  5 20:02:16 2019
New Revision: 343808
URL: https://svnweb.freebsd.org/changeset/base/343808

Log:
  Remove pointless initial value for i386 vm.pmap.pat_works sysctl definition.
  
  The OID is served by external data.
  
  Submitted by: bde
  MFC after:3 days

Modified:
  head/sys/i386/i386/pmap_base.c

Modified: head/sys/i386/i386/pmap_base.c
==
--- head/sys/i386/i386/pmap_base.c  Tue Feb  5 19:50:46 2019
(r343807)
+++ head/sys/i386/i386/pmap_base.c  Tue Feb  5 20:02:16 2019
(r343808)
@@ -136,7 +136,7 @@ int i386_pmap_PDRSHIFT;
 
 int pat_works = 1;
 SYSCTL_INT(_vm_pmap, OID_AUTO, pat_works, CTLFLAG_RD,
-_works, 1,
+_works, 0,
 "Is page attribute table fully functional?");
 
 int pg_ps_enabled = 1;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r343801 - vendor/libc++/libc++-release_80-r353167

2019-02-05 Thread Dimitry Andric
Author: dim
Date: Tue Feb  5 18:39:51 2019
New Revision: 343801
URL: https://svnweb.freebsd.org/changeset/base/343801

Log:
  Tag libc++ release_80 branch r353167.

Added:
  vendor/libc++/libc++-release_80-r353167/
 - copied from r343800, vendor/libc++/dist-release_80/
___
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: r343800 - in vendor/libc++/dist-release_80: cmake/Modules test/std/language.support/support.dynamic/new.delete/new.delete.array test/std/language.support/support.dynamic/new.delete/new....

2019-02-05 Thread Dimitry Andric
Author: dim
Date: Tue Feb  5 18:39:44 2019
New Revision: 343800
URL: https://svnweb.freebsd.org/changeset/base/343800

Log:
  Vendor import of libc++ release_80 branch r353167:
  https://llvm.org/svn/llvm-project/libcxx/branches/release_80@353167

Modified:
  vendor/libc++/dist-release_80/cmake/Modules/HandleOutOfTreeLLVM.cmake
  
vendor/libc++/dist-release_80/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp
  
vendor/libc++/dist-release_80/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp
  
vendor/libc++/dist-release_80/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp
  
vendor/libc++/dist-release_80/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow_replace.pass.cpp
  
vendor/libc++/dist-release_80/test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp
  
vendor/libc++/dist-release_80/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp
  
vendor/libc++/dist-release_80/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp
  
vendor/libc++/dist-release_80/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow_replace.pass.cpp

Modified: vendor/libc++/dist-release_80/cmake/Modules/HandleOutOfTreeLLVM.cmake
==
--- vendor/libc++/dist-release_80/cmake/Modules/HandleOutOfTreeLLVM.cmake   
Tue Feb  5 18:39:39 2019(r343799)
+++ vendor/libc++/dist-release_80/cmake/Modules/HandleOutOfTreeLLVM.cmake   
Tue Feb  5 18:39:44 2019(r343800)
@@ -116,7 +116,7 @@ macro(configure_out_of_tree_llvm)
 # Required LIT Configuration 

 # Define the default arguments to use with 'lit', and an option for the 
user
 # to override.
-set(LLVM_EXTERNAL_LIT "${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py")
+set(LLVM_DEFAULT_EXTERNAL_LIT "${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py")
 set(LIT_ARGS_DEFAULT "-sv --show-xfail --show-unsupported")
 if (MSVC OR XCODE)
   set(LIT_ARGS_DEFAULT "${LIT_ARGS_DEFAULT} --no-progress-bar")

Modified: 
vendor/libc++/dist-release_80/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp
==
--- 
vendor/libc++/dist-release_80/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp
 Tue Feb  5 18:39:39 2019(r343799)
+++ 
vendor/libc++/dist-release_80/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp
 Tue Feb  5 18:39:44 2019(r343800)
@@ -17,9 +17,11 @@
 // None of the current GCC compilers support this.
 // UNSUPPORTED: gcc-5, gcc-6
 
-// Aligned allocation was not provided before macosx10.12 and as a result we
-// get availability errors when the deployment target is older than 
macosx10.13.
-// However, AppleClang 10 (and older) don't trigger availability errors.
+// Aligned allocation was not provided before macosx10.14 and as a result we
+// get availability errors when the deployment target is older than 
macosx10.14.
+// However, AppleClang 10 (and older) don't trigger availability errors, and
+// Clang < 8.0 doesn't warn for 10.13.
+// XFAIL: !(apple-clang-9 || apple-clang-10 || clang-7) && 
availability=macosx10.13
 // XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.12
 // XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.11
 // XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.10

Modified: 
vendor/libc++/dist-release_80/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp
==
--- 
vendor/libc++/dist-release_80/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp
Tue Feb  5 18:39:39 2019(r343799)
+++ 
vendor/libc++/dist-release_80/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp
Tue Feb  5 18:39:44 2019(r343800)
@@ -15,9 +15,11 @@
 // FIXME change this to XFAIL.
 // UNSUPPORTED: no-aligned-allocation && !gcc
 
-// Aligned allocation was not provided before macosx10.12 and as a result we
-// get availability errors when the deployment target is older than 
macosx10.13.
-// However, AppleClang 10 (and older) don't trigger availability errors.
+// Aligned allocation was not provided before macosx10.14 and as a result we
+// get availability errors when the deployment target is older than 
macosx10.14.
+// However, 

svn commit: r343805 - vendor/lldb/lldb-release_80-r353167

2019-02-05 Thread Dimitry Andric
Author: dim
Date: Tue Feb  5 18:40:18 2019
New Revision: 343805
URL: https://svnweb.freebsd.org/changeset/base/343805

Log:
  Tag lldb release_80 branch r353167.

Added:
  vendor/lldb/lldb-release_80-r353167/
 - copied from r343804, vendor/lldb/dist-release_80/
___
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: r343803 - vendor/lld/lld-release_80-r353167

2019-02-05 Thread Dimitry Andric
Author: dim
Date: Tue Feb  5 18:40:07 2019
New Revision: 343803
URL: https://svnweb.freebsd.org/changeset/base/343803

Log:
  Tag lld release_80 branch r353167.

Added:
  vendor/lld/lld-release_80-r353167/
 - copied from r343802, vendor/lld/dist-release_80/
___
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: r343796 - in vendor/clang/dist-release_80: docs include/clang/Basic include/clang/Driver include/clang/Tooling lib/Basic lib/Basic/Targets lib/Driver/ToolChains lib/Headers lib/Lex lib/...

2019-02-05 Thread Dimitry Andric
Author: dim
Date: Tue Feb  5 18:39:15 2019
New Revision: 343796
URL: https://svnweb.freebsd.org/changeset/base/343796

Log:
  Vendor import of clang release_80 branch r353167:
  https://llvm.org/svn/llvm-project/cfe/branches/release_80@353167

Added:
  vendor/clang/dist-release_80/test/CodeCompletion/crash-null-type.cpp
  vendor/clang/dist-release_80/test/PCH/leakfiles
  vendor/clang/dist-release_80/test/Sema/Float16.c
  vendor/clang/dist-release_80/test/SemaCXX/Float16.cpp
  vendor/clang/dist-release_80/test/SemaCXX/PR40395.cpp
Modified:
  vendor/clang/dist-release_80/docs/LanguageExtensions.rst
  vendor/clang/dist-release_80/docs/OpenMPSupport.rst
  vendor/clang/dist-release_80/docs/ReleaseNotes.rst
  vendor/clang/dist-release_80/include/clang/Basic/BuiltinsAArch64.def
  vendor/clang/dist-release_80/include/clang/Basic/Features.def
  vendor/clang/dist-release_80/include/clang/Basic/FileManager.h
  vendor/clang/dist-release_80/include/clang/Basic/TargetInfo.h
  vendor/clang/dist-release_80/include/clang/Driver/Options.td
  vendor/clang/dist-release_80/include/clang/Tooling/ArgumentsAdjusters.h
  vendor/clang/dist-release_80/lib/Basic/FileManager.cpp
  vendor/clang/dist-release_80/lib/Basic/TargetInfo.cpp
  vendor/clang/dist-release_80/lib/Basic/Targets.cpp
  vendor/clang/dist-release_80/lib/Basic/Targets/AArch64.cpp
  vendor/clang/dist-release_80/lib/Basic/Targets/ARM.cpp
  vendor/clang/dist-release_80/lib/Basic/Targets/OSTargets.h
  vendor/clang/dist-release_80/lib/Basic/Targets/SPIR.h
  vendor/clang/dist-release_80/lib/Driver/ToolChains/Clang.cpp
  vendor/clang/dist-release_80/lib/Driver/ToolChains/NetBSD.cpp
  vendor/clang/dist-release_80/lib/Headers/opencl-c.h
  vendor/clang/dist-release_80/lib/Lex/LiteralSupport.cpp
  vendor/clang/dist-release_80/lib/Sema/SemaCodeComplete.cpp
  vendor/clang/dist-release_80/lib/Sema/SemaDeclCXX.cpp
  vendor/clang/dist-release_80/lib/Sema/SemaExpr.cpp
  vendor/clang/dist-release_80/lib/Sema/SemaTemplate.cpp
  vendor/clang/dist-release_80/lib/Sema/SemaType.cpp
  vendor/clang/dist-release_80/lib/Tooling/ArgumentsAdjusters.cpp
  vendor/clang/dist-release_80/test/AST/float16.cpp
  vendor/clang/dist-release_80/test/CXX/dcl.dcl/dcl.attr/dcl.align/p8.cpp
  vendor/clang/dist-release_80/test/CodeGen/arm64-crc32.c
  vendor/clang/dist-release_80/test/CodeGen/builtins-arm64.c
  vendor/clang/dist-release_80/test/CodeGenCXX/float16-declarations.cpp
  vendor/clang/dist-release_80/test/CodeGenCXX/mangle-ms.cpp
  vendor/clang/dist-release_80/test/CodeGenCXX/trivial_abi.cpp
  vendor/clang/dist-release_80/test/CodeGenOpenCL/printf.cl
  vendor/clang/dist-release_80/test/Driver/mips-features.c
  vendor/clang/dist-release_80/test/Lexer/half-literal.cpp
  vendor/clang/dist-release_80/test/Preprocessor/init.c
  vendor/clang/dist-release_80/test/SemaCXX/cxx1z-decomposition.cpp
  vendor/clang/dist-release_80/test/SemaObjC/enum-fixed-type.m
  vendor/clang/dist-release_80/test/SemaOpenCL/printf-format-string-warnings.cl
  vendor/clang/dist-release_80/test/SemaOpenCL/printf-format-strings.cl
  vendor/clang/dist-release_80/unittests/Basic/FileManagerTest.cpp
  vendor/clang/dist-release_80/unittests/Tooling/ToolingTest.cpp

Modified: vendor/clang/dist-release_80/docs/LanguageExtensions.rst
==
--- vendor/clang/dist-release_80/docs/LanguageExtensions.rstTue Feb  5 
18:39:08 2019(r343795)
+++ vendor/clang/dist-release_80/docs/LanguageExtensions.rstTue Feb  5 
18:39:15 2019(r343796)
@@ -474,44 +474,58 @@ Half-Precision Floating Point
 =
 
 Clang supports two half-precision (16-bit) floating point types: ``__fp16`` and
-``_Float16``. ``__fp16`` is defined in the ARM C Language Extensions (`ACLE
-`_)
-and ``_Float16`` in ISO/IEC TS 18661-3:2015.
+``_Float16``.  These types are supported in all language modes.
 
-``__fp16`` is a storage and interchange format only. This means that values of
-``__fp16`` promote to (at least) float when used in arithmetic operations.
-There are two ``__fp16`` formats. Clang supports the IEEE 754-2008 format and
-not the ARM alternative format.
+``__fp16`` is supported on every target, as it is purely a storage format; see 
below.
+``_Float16`` is currently only supported on the following targets, with further
+targets pending ABI standardization:
+- 32-bit ARM
+- 64-bit ARM (AArch64)
+- SPIR
+``_Float16`` will be supported on more targets as they define ABIs for it.
 
-ISO/IEC TS 18661-3:2015 defines C support for additional floating point types.
-``_FloatN`` is defined as a binary floating type, where the N suffix denotes
-the number of bits and is 16, 32, 64, or greater and equal to 128 and a
-multiple of 32. Clang supports ``_Float16``. The difference from ``__fp16`` is
-that arithmetic on ``_Float16`` is performed in half-precision, thus it is not
-a storage-only 

svn commit: r343802 - in vendor/lld/dist-release_80: COFF ELF MinGW docs test/COFF test/ELF

2019-02-05 Thread Dimitry Andric
Author: dim
Date: Tue Feb  5 18:39:57 2019
New Revision: 343802
URL: https://svnweb.freebsd.org/changeset/base/343802

Log:
  Vendor import of lld release_80 branch r353167:
  https://llvm.org/svn/llvm-project/lld/branches/release_80@353167

Added:
  vendor/lld/dist-release_80/test/COFF/arm-thumb-thunks-pdb.s
  vendor/lld/dist-release_80/test/COFF/arm64-thunks.s
  vendor/lld/dist-release_80/test/ELF/no-discard-this_module.s
  vendor/lld/dist-release_80/test/ELF/sht-group-empty.test
Deleted:
  vendor/lld/dist-release_80/test/COFF/arm64-branch-range.test
Modified:
  vendor/lld/dist-release_80/COFF/Chunks.cpp
  vendor/lld/dist-release_80/COFF/Chunks.h
  vendor/lld/dist-release_80/COFF/DLL.cpp
  vendor/lld/dist-release_80/COFF/ICF.cpp
  vendor/lld/dist-release_80/COFF/Writer.cpp
  vendor/lld/dist-release_80/ELF/ICF.cpp
  vendor/lld/dist-release_80/ELF/InputFiles.cpp
  vendor/lld/dist-release_80/ELF/InputFiles.h
  vendor/lld/dist-release_80/ELF/ScriptParser.cpp
  vendor/lld/dist-release_80/ELF/SyntheticSections.cpp
  vendor/lld/dist-release_80/MinGW/Options.td
  vendor/lld/dist-release_80/docs/ReleaseNotes.rst
  vendor/lld/dist-release_80/test/COFF/imports.test
  vendor/lld/dist-release_80/test/ELF/arm-gnu-ifunc.s
  vendor/lld/dist-release_80/test/ELF/comdat-linkonce.s
  vendor/lld/dist-release_80/test/ELF/emulation-aarch64.s
  vendor/lld/dist-release_80/test/ELF/emulation-ppc.s
  vendor/lld/dist-release_80/test/ELF/emulation-x86.s

Modified: vendor/lld/dist-release_80/COFF/Chunks.cpp
==
--- vendor/lld/dist-release_80/COFF/Chunks.cpp  Tue Feb  5 18:39:51 2019
(r343801)
+++ vendor/lld/dist-release_80/COFF/Chunks.cpp  Tue Feb  5 18:39:57 2019
(r343802)
@@ -669,16 +669,36 @@ const uint8_t ArmThunk[] = {
 0xe7, 0x44, // L1: add  pc, ip
 };
 
-size_t RangeExtensionThunk::getSize() const {
+size_t RangeExtensionThunkARM::getSize() const {
   assert(Config->Machine == ARMNT);
   return sizeof(ArmThunk);
 }
 
-void RangeExtensionThunk::writeTo(uint8_t *Buf) const {
+void RangeExtensionThunkARM::writeTo(uint8_t *Buf) const {
   assert(Config->Machine == ARMNT);
   uint64_t Offset = Target->getRVA() - RVA - 12;
   memcpy(Buf + OutputSectionOff, ArmThunk, sizeof(ArmThunk));
   applyMOV32T(Buf + OutputSectionOff, uint32_t(Offset));
+}
+
+// A position independent ARM64 adrp+add thunk, with a maximum range of
+// +/- 4 GB, which is enough for any PE-COFF.
+const uint8_t Arm64Thunk[] = {
+0x10, 0x00, 0x00, 0x90, // adrp x16, Dest
+0x10, 0x02, 0x00, 0x91, // add  x16, x16, :lo12:Dest
+0x00, 0x02, 0x1f, 0xd6, // br   x16
+};
+
+size_t RangeExtensionThunkARM64::getSize() const {
+  assert(Config->Machine == ARM64);
+  return sizeof(Arm64Thunk);
+}
+
+void RangeExtensionThunkARM64::writeTo(uint8_t *Buf) const {
+  assert(Config->Machine == ARM64);
+  memcpy(Buf + OutputSectionOff, Arm64Thunk, sizeof(Arm64Thunk));
+  applyArm64Addr(Buf + OutputSectionOff + 0, Target->getRVA(), RVA, 12);
+  applyArm64Imm(Buf + OutputSectionOff + 4, Target->getRVA() & 0xfff, 0);
 }
 
 void LocalImportChunk::getBaserels(std::vector *Res) {

Modified: vendor/lld/dist-release_80/COFF/Chunks.h
==
--- vendor/lld/dist-release_80/COFF/Chunks.hTue Feb  5 18:39:51 2019
(r343801)
+++ vendor/lld/dist-release_80/COFF/Chunks.hTue Feb  5 18:39:57 2019
(r343802)
@@ -355,9 +355,18 @@ class ImportThunkChunkARM64 : public Chunk { (private)
   Defined *ImpSymbol;
 };
 
-class RangeExtensionThunk : public Chunk {
+class RangeExtensionThunkARM : public Chunk {
 public:
-  explicit RangeExtensionThunk(Defined *T) : Target(T) {}
+  explicit RangeExtensionThunkARM(Defined *T) : Target(T) {}
+  size_t getSize() const override;
+  void writeTo(uint8_t *Buf) const override;
+
+  Defined *Target;
+};
+
+class RangeExtensionThunkARM64 : public Chunk {
+public:
+  explicit RangeExtensionThunkARM64(Defined *T) : Target(T) {}
   size_t getSize() const override;
   void writeTo(uint8_t *Buf) const override;
 

Modified: vendor/lld/dist-release_80/COFF/DLL.cpp
==
--- vendor/lld/dist-release_80/COFF/DLL.cpp Tue Feb  5 18:39:51 2019
(r343801)
+++ vendor/lld/dist-release_80/COFF/DLL.cpp Tue Feb  5 18:39:57 2019
(r343802)
@@ -47,6 +47,7 @@ class HintNameChunk : public Chunk { (public)
   }
 
   void writeTo(uint8_t *Buf) const override {
+memset(Buf + OutputSectionOff, 0, getSize());
 write16le(Buf + OutputSectionOff, Hint);
 memcpy(Buf + OutputSectionOff + 2, Name.data(), Name.size());
   }
@@ -63,7 +64,10 @@ class LookupChunk : public Chunk { (public)
   size_t getSize() const override { return Config->Wordsize; }
 
   void writeTo(uint8_t *Buf) const override {
-write32le(Buf + OutputSectionOff, HintName->getRVA());
+if (Config->is64())
+  

svn commit: r343799 - vendor/compiler-rt/compiler-rt-release_80-r353167

2019-02-05 Thread Dimitry Andric
Author: dim
Date: Tue Feb  5 18:39:39 2019
New Revision: 343799
URL: https://svnweb.freebsd.org/changeset/base/343799

Log:
  Tag compiler-rt release_80 branch r353167.

Added:
  vendor/compiler-rt/compiler-rt-release_80-r353167/
 - copied from r343798, vendor/compiler-rt/dist-release_80/
___
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: r343804 - in vendor/lldb/dist-release_80: cmake/modules lit source/Plugins/Process/NetBSD

2019-02-05 Thread Dimitry Andric
Author: dim
Date: Tue Feb  5 18:40:11 2019
New Revision: 343804
URL: https://svnweb.freebsd.org/changeset/base/343804

Log:
  Vendor import of lldb release_80 branch r353167:
  https://llvm.org/svn/llvm-project/lldb/branches/release_80@353167

Modified:
  vendor/lldb/dist-release_80/cmake/modules/AddLLDB.cmake
  vendor/lldb/dist-release_80/cmake/modules/LLDBStandalone.cmake
  vendor/lldb/dist-release_80/lit/CMakeLists.txt
  vendor/lldb/dist-release_80/source/Plugins/Process/NetBSD/CMakeLists.txt

Modified: vendor/lldb/dist-release_80/cmake/modules/AddLLDB.cmake
==
--- vendor/lldb/dist-release_80/cmake/modules/AddLLDB.cmake Tue Feb  5 
18:40:07 2019(r343803)
+++ vendor/lldb/dist-release_80/cmake/modules/AddLLDB.cmake Tue Feb  5 
18:40:11 2019(r343804)
@@ -88,7 +88,9 @@ function(add_lldb_library name)
   # Hack: only some LLDB libraries depend on the clang autogenerated headers,
   # but it is simple enough to make all of LLDB depend on some of those
   # headers without negatively impacting much of anything.
-  add_dependencies(${name} clang-tablegen-targets)
+  if(NOT LLDB_BUILT_STANDALONE)
+add_dependencies(${name} clang-tablegen-targets)
+  endif()
 
   # Add in any extra C++ compilation flags for this library.
   target_compile_options(${name} PRIVATE ${PARAM_EXTRA_CXXFLAGS})

Modified: vendor/lldb/dist-release_80/cmake/modules/LLDBStandalone.cmake
==
--- vendor/lldb/dist-release_80/cmake/modules/LLDBStandalone.cmake  Tue Feb 
 5 18:40:07 2019(r343803)
+++ vendor/lldb/dist-release_80/cmake/modules/LLDBStandalone.cmake  Tue Feb 
 5 18:40:11 2019(r343804)
@@ -58,7 +58,7 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR
   set(LLVM_DIR ${LLVM_OBJ_ROOT}/cmake/modules/CMakeFiles CACHE PATH "Path to 
LLVM build tree CMake files")
   set(LLVM_BINARY_DIR ${LLVM_OBJ_ROOT} CACHE PATH "Path to LLVM build tree")
   set(LLVM_MAIN_SRC_DIR ${MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree")
-  set(LLVM_EXTERNAL_LIT ${LLVM_TOOLS_BINARY_DIR}/llvm-lit CACHE PATH "Path to 
llvm-lit")
+  set(LLVM_DEFAULT_EXTERNAL_LIT ${LLVM_TOOLS_BINARY_DIR}/llvm-lit CACHE PATH 
"Path to llvm-lit")
 
   find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR}
 NO_DEFAULT_PATH)

Modified: vendor/lldb/dist-release_80/lit/CMakeLists.txt
==
--- vendor/lldb/dist-release_80/lit/CMakeLists.txt  Tue Feb  5 18:40:07 
2019(r343803)
+++ vendor/lldb/dist-release_80/lit/CMakeLists.txt  Tue Feb  5 18:40:11 
2019(r343804)
@@ -26,9 +26,6 @@ list(APPEND LLDB_TEST_DEPS
   llvm-config
   llvm-mc
   llvm-objcopy
-  FileCheck
-  count
-  not
   )
 
 if(TARGET lld)
@@ -54,6 +51,14 @@ configure_lit_site_cfg(
 configure_lit_site_cfg(
   ${CMAKE_CURRENT_SOURCE_DIR}/Suite/lit.site.cfg.in
   ${CMAKE_CURRENT_BINARY_DIR}/Suite/lit.site.cfg)
+
+if(NOT LLDB_BUILT_STANDALONE)
+  list(APPEND LLDB_TEST_DEPS
+FileCheck
+count
+not
+  )
+endif()
 
 add_lit_testsuite(check-lldb-lit "Running lldb lit test suite"
   ${CMAKE_CURRENT_BINARY_DIR}

Modified: 
vendor/lldb/dist-release_80/source/Plugins/Process/NetBSD/CMakeLists.txt
==
--- vendor/lldb/dist-release_80/source/Plugins/Process/NetBSD/CMakeLists.txt
Tue Feb  5 18:40:07 2019(r343803)
+++ vendor/lldb/dist-release_80/source/Plugins/Process/NetBSD/CMakeLists.txt
Tue Feb  5 18:40:11 2019(r343804)
@@ -11,6 +11,7 @@ add_lldb_library(lldbPluginProcessNetBSD PLUGIN
 lldbUtility
 lldbPluginProcessPOSIX
 lldbPluginProcessUtility
+util
   LINK_COMPONENTS
 Support
   )
___
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: r343798 - in vendor/compiler-rt/dist-release_80: cmake lib/xray/tests test

2019-02-05 Thread Dimitry Andric
Author: dim
Date: Tue Feb  5 18:39:32 2019
New Revision: 343798
URL: https://svnweb.freebsd.org/changeset/base/343798

Log:
  Vendor import of compiler-rt release_80 branch r353167:
  https://llvm.org/svn/llvm-project/compiler-rt/branches/release_80@353167

Modified:
  vendor/compiler-rt/dist-release_80/cmake/config-ix.cmake
  vendor/compiler-rt/dist-release_80/lib/xray/tests/CMakeLists.txt
  vendor/compiler-rt/dist-release_80/test/CMakeLists.txt

Modified: vendor/compiler-rt/dist-release_80/cmake/config-ix.cmake
==
--- vendor/compiler-rt/dist-release_80/cmake/config-ix.cmakeTue Feb  5 
18:39:28 2019(r343797)
+++ vendor/compiler-rt/dist-release_80/cmake/config-ix.cmakeTue Feb  5 
18:39:32 2019(r343798)
@@ -118,6 +118,7 @@ check_library_exists(dl dlopen "" COMPILER_RT_HAS_LIBD
 check_library_exists(rt shm_open "" COMPILER_RT_HAS_LIBRT)
 check_library_exists(m pow "" COMPILER_RT_HAS_LIBM)
 check_library_exists(pthread pthread_create "" COMPILER_RT_HAS_LIBPTHREAD)
+check_library_exists(execinfo backtrace "" COMPILER_RT_HAS_LIBEXECINFO)
 
 # Look for terminfo library, used in unittests that depend on LLVMSupport.
 if(LLVM_ENABLE_TERMINFO)

Modified: vendor/compiler-rt/dist-release_80/lib/xray/tests/CMakeLists.txt
==
--- vendor/compiler-rt/dist-release_80/lib/xray/tests/CMakeLists.txtTue Feb 
 5 18:39:28 2019(r343797)
+++ vendor/compiler-rt/dist-release_80/lib/xray/tests/CMakeLists.txtTue Feb 
 5 18:39:32 2019(r343798)
@@ -71,13 +71,14 @@ if (NOT APPLE)
 endforeach()
 
 # We also add the actual libraries to link as dependencies.
-list(APPEND XRAY_UNITTEST_LINK_FLAGS -lLLVMXRay -lLLVMSupport 
-lLLVMTestingSupport)
+list(APPEND XRAY_UNITTEST_LINK_FLAGS -lLLVMXRay -lLLVMSupport 
-lLLVMDemangle -lLLVMTestingSupport)
   endif()
 
   append_list_if(COMPILER_RT_HAS_LIBM -lm XRAY_UNITTEST_LINK_FLAGS)
   append_list_if(COMPILER_RT_HAS_LIBRT -lrt XRAY_UNITTEST_LINK_FLAGS)
   append_list_if(COMPILER_RT_HAS_LIBDL -ldl XRAY_UNITTEST_LINK_FLAGS)
   append_list_if(COMPILER_RT_HAS_LIBPTHREAD -pthread XRAY_UNITTEST_LINK_FLAGS)
+  append_list_if(COMPILER_RT_HAS_LIBEXECINFO -lexecinfo 
XRAY_UNITTEST_LINK_FLAGS)
 endif()
 
 macro(add_xray_unittest testname)

Modified: vendor/compiler-rt/dist-release_80/test/CMakeLists.txt
==
--- vendor/compiler-rt/dist-release_80/test/CMakeLists.txt  Tue Feb  5 
18:39:28 2019(r343797)
+++ vendor/compiler-rt/dist-release_80/test/CMakeLists.txt  Tue Feb  5 
18:39:32 2019(r343798)
@@ -14,10 +14,6 @@ if(COMPILER_RT_BUILD_PROFILE AND COMPILER_RT_HAS_PROFI
   list(APPEND SANITIZER_COMMON_LIT_TEST_DEPS profile)
 endif()
 
-if(COMPILER_RT_STANDALONE_BUILD)
-  list(APPEND SANITIZER_COMMON_LIT_TEST_DEPS FileCheck)
-endif()
-
 # When ANDROID, we build tests with the host compiler (i.e. CMAKE_C_COMPILER),
 # and run tests with tools from the host toolchain.
 if(NOT ANDROID)
___
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: r343797 - vendor/clang/clang-release_80-r353167

2019-02-05 Thread Dimitry Andric
Author: dim
Date: Tue Feb  5 18:39:28 2019
New Revision: 343797
URL: https://svnweb.freebsd.org/changeset/base/343797

Log:
  Tag clang release_80 branch r353167.

Added:
  vendor/clang/clang-release_80-r353167/
 - copied from r343796, vendor/clang/dist-release_80/
___
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: r343794 - in vendor/llvm/dist-release_80: cmake/modules docs include/llvm/Support include/llvm/Transforms/Utils lib/CodeGen lib/CodeGen/AsmPrinter lib/CodeGen/SelectionDAG lib/DebugInfo...

2019-02-05 Thread Dimitry Andric
Author: dim
Date: Tue Feb  5 18:38:58 2019
New Revision: 343794
URL: https://svnweb.freebsd.org/changeset/base/343794

Log:
  Vendor import of llvm release_80 branch r353167:
  https://llvm.org/svn/llvm-project/llvm/branches/release_80@353167

Added:
  vendor/llvm/dist-release_80/test/CodeGen/AArch64/build-vector-extract.ll
  vendor/llvm/dist-release_80/test/CodeGen/AArch64/eh_recoverfp.ll
  vendor/llvm/dist-release_80/test/CodeGen/Mips/reloc-jalr.ll
  vendor/llvm/dist-release_80/test/DebugInfo/COFF/types-empty-member-fn.ll
  vendor/llvm/dist-release_80/test/Transforms/FunctionImport/Inputs/comdat.ll
  vendor/llvm/dist-release_80/test/Transforms/FunctionImport/comdat.ll
  
vendor/llvm/dist-release_80/test/Transforms/LoopTransformWarning/enable_and_isvectorized.ll
  
vendor/llvm/dist-release_80/test/Transforms/LoopVectorize/no_switch_disable_vectorization.ll
Modified:
  vendor/llvm/dist-release_80/cmake/modules/AddLLVM.cmake
  vendor/llvm/dist-release_80/docs/ReleaseNotes.rst
  vendor/llvm/dist-release_80/include/llvm/Support/JSON.h
  
vendor/llvm/dist-release_80/include/llvm/Transforms/Utils/FunctionImportUtils.h
  vendor/llvm/dist-release_80/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
  vendor/llvm/dist-release_80/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
  vendor/llvm/dist-release_80/lib/CodeGen/MachineInstr.cpp
  vendor/llvm/dist-release_80/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  vendor/llvm/dist-release_80/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
  vendor/llvm/dist-release_80/lib/IR/AutoUpgrade.cpp
  vendor/llvm/dist-release_80/lib/Support/JSON.cpp
  vendor/llvm/dist-release_80/lib/Target/AArch64/AArch64SpeculationHardening.cpp
  vendor/llvm/dist-release_80/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
  vendor/llvm/dist-release_80/lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp
  vendor/llvm/dist-release_80/lib/Target/Mips/MCTargetDesc/MipsBaseInfo.h
  vendor/llvm/dist-release_80/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp
  vendor/llvm/dist-release_80/lib/Target/Mips/MCTargetDesc/MipsMCExpr.cpp
  vendor/llvm/dist-release_80/lib/Target/Mips/MicroMips32r6InstrInfo.td
  vendor/llvm/dist-release_80/lib/Target/Mips/MicroMipsInstrInfo.td
  vendor/llvm/dist-release_80/lib/Target/Mips/Mips32r6InstrInfo.td
  vendor/llvm/dist-release_80/lib/Target/Mips/MipsAsmPrinter.cpp
  vendor/llvm/dist-release_80/lib/Target/Mips/MipsFastISel.cpp
  vendor/llvm/dist-release_80/lib/Target/Mips/MipsISelLowering.cpp
  vendor/llvm/dist-release_80/lib/Target/Mips/MipsISelLowering.h
  vendor/llvm/dist-release_80/lib/Target/Mips/MipsInstrInfo.cpp
  vendor/llvm/dist-release_80/lib/Target/Mips/MipsInstrInfo.td
  vendor/llvm/dist-release_80/lib/Target/Mips/MipsMCInstLower.cpp
  vendor/llvm/dist-release_80/lib/Target/X86/X86DiscriminateMemOps.cpp
  vendor/llvm/dist-release_80/lib/Target/X86/X86InsertPrefetch.cpp
  vendor/llvm/dist-release_80/lib/Transforms/Utils/FunctionImportUtils.cpp
  vendor/llvm/dist-release_80/lib/Transforms/Utils/LoopUtils.cpp
  
vendor/llvm/dist-release_80/test/CodeGen/AArch64/speculation-hardening-loads.ll
  vendor/llvm/dist-release_80/test/CodeGen/AArch64/speculation-hardening.ll
  vendor/llvm/dist-release_80/test/CodeGen/AArch64/speculation-hardening.mir
  vendor/llvm/dist-release_80/test/CodeGen/Mips/cconv/vector.ll
  vendor/llvm/dist-release_80/test/CodeGen/Mips/gprestore.ll
  vendor/llvm/dist-release_80/test/CodeGen/Mips/llvm-ir/sdiv.ll
  vendor/llvm/dist-release_80/test/CodeGen/Mips/llvm-ir/srem.ll
  vendor/llvm/dist-release_80/test/CodeGen/Mips/llvm-ir/udiv.ll
  vendor/llvm/dist-release_80/test/CodeGen/Mips/llvm-ir/urem.ll
  vendor/llvm/dist-release_80/test/CodeGen/Mips/long-call-attr.ll
  vendor/llvm/dist-release_80/test/CodeGen/Mips/long-call-mcount.ll
  vendor/llvm/dist-release_80/test/CodeGen/Mips/msa/f16-llvm-ir.ll
  vendor/llvm/dist-release_80/test/CodeGen/Mips/o32_cc_byval.ll
  vendor/llvm/dist-release_80/test/CodeGen/Mips/shrink-wrapping.ll
  vendor/llvm/dist-release_80/test/CodeGen/X86/debug-loclists.ll
  vendor/llvm/dist-release_80/test/CodeGen/X86/discriminate-mem-ops.ll
  vendor/llvm/dist-release_80/test/CodeGen/X86/insert-prefetch-inline.ll
  vendor/llvm/dist-release_80/test/CodeGen/X86/insert-prefetch-invalid-instr.ll
  vendor/llvm/dist-release_80/test/CodeGen/X86/insert-prefetch.ll
  vendor/llvm/dist-release_80/test/DebugInfo/Mips/dwarfdump-tls.ll
  vendor/llvm/dist-release_80/test/DebugInfo/X86/dwarfdump-debug-loclists.test
  
vendor/llvm/dist-release_80/test/tools/llvm-dwarfdump/X86/debug_loclists_startx_length.s

Modified: vendor/llvm/dist-release_80/cmake/modules/AddLLVM.cmake
==
--- vendor/llvm/dist-release_80/cmake/modules/AddLLVM.cmake Tue Feb  5 
18:22:21 2019(r343793)
+++ vendor/llvm/dist-release_80/cmake/modules/AddLLVM.cmake Tue Feb  5 
18:38:58 2019(r343794)
@@ -1280,7 +1280,6 @@ function(get_llvm_lit_path base_dir file_name)
   cmake_parse_arguments(ARG "ALLOW_EXTERNAL" "" "" 

svn commit: r343795 - vendor/llvm/llvm-release_80-r353167

2019-02-05 Thread Dimitry Andric
Author: dim
Date: Tue Feb  5 18:39:08 2019
New Revision: 343795
URL: https://svnweb.freebsd.org/changeset/base/343795

Log:
  Tag llvm release_80 branch r353167.

Added:
  vendor/llvm/llvm-release_80-r353167/
 - copied from r343794, vendor/llvm/dist-release_80/
___
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: r343793 - in releng/11.2: . sys/conf

2019-02-05 Thread Ed Maste
Author: emaste
Date: Tue Feb  5 18:22:21 2019
New Revision: 343793
URL: https://svnweb.freebsd.org/changeset/base/343793

Log:
  UPDATING and newvers entries for 11.2-p9
  
  Approved by:  so
  Security: FreeBSD-SA-19:01.syscall

Modified:
  releng/11.2/UPDATING
  releng/11.2/sys/conf/newvers.sh

Modified: releng/11.2/UPDATING
==
--- releng/11.2/UPDATINGTue Feb  5 18:20:34 2019(r343792)
+++ releng/11.2/UPDATINGTue Feb  5 18:22:21 2019(r343793)
@@ -16,6 +16,11 @@ from older versions of FreeBSD, try WITHOUT_CLANG and 
 the tip of head, and then rebuild without this option. The bootstrap process
 from older version of current across the gcc/clang cutover is a bit fragile.
 
+20190205   p9  FreeBSD-SA-19:01.syscall
+
+   amd64: clear callee-preserved registers on syscall exit
+   [SA-19:01.syscall]
+
 20190109   p8  FreeBSD-EN-19:03.sqlite
FreeBSD-EN-19:04.tzdata
FreeBSD-EN-19:05.kqueue

Modified: releng/11.2/sys/conf/newvers.sh
==
--- releng/11.2/sys/conf/newvers.sh Tue Feb  5 18:20:34 2019
(r343792)
+++ releng/11.2/sys/conf/newvers.sh Tue Feb  5 18:22:21 2019
(r343793)
@@ -44,7 +44,7 @@
 
 TYPE="FreeBSD"
 REVISION="11.2"
-BRANCH="RELEASE-p8"
+BRANCH="RELEASE-p9"
 if [ -n "${BRANCH_OVERRIDE}" ]; then
BRANCH=${BRANCH_OVERRIDE}
 fi
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r343792 - in releng/12.0: . sys/conf

2019-02-05 Thread Ed Maste
Author: emaste
Date: Tue Feb  5 18:20:34 2019
New Revision: 343792
URL: https://svnweb.freebsd.org/changeset/base/343792

Log:
  UPDATING and newvers entries for 12.0-p3
  
  Approved by:  so
  Security: FreeBSD-SA-19:01.syscall
  Security: FreeBSD-SA-19:02.fd
  Security: FreeBSD-EN-19:06.dtrace
  Security: FreeBSD-EN-19:07.lle

Modified:
  releng/12.0/UPDATING
  releng/12.0/sys/conf/newvers.sh

Modified: releng/12.0/UPDATING
==
--- releng/12.0/UPDATINGTue Feb  5 18:16:14 2019(r343791)
+++ releng/12.0/UPDATINGTue Feb  5 18:20:34 2019(r343792)
@@ -16,6 +16,21 @@ from older versions of FreeBSD, try WITHOUT_CLANG and 
 the tip of head, and then rebuild without this option. The bootstrap process
 from older version of current across the gcc/clang cutover is a bit fragile.
 
+20190205:  p3  FreeBSD-SA-19:01.syscall
+   FreeBSD-SA-19:02.fd
+   FreeBSD-EN-19:06.dtrace
+   FreeBSD-EN-19:07.lle
+
+   amd64: clear callee-preserved registers on syscall exit
+   [SA-19:01.syscall]
+
+   Avoid leaking fp references when truncating SCM_RIGHTS control messages.
+   [SA-19:02.fd]
+
+   dtrace: fix userspace access on boxes with SMAP [EN-19:06.dtrace]
+
+   Fix an LLE lookup race [EN-19:07.lle]
+
 20190109:  p2  FreeBSD-EN-19:01.cc_cubic
FreeBSD-EN-19:02.tcp
FreeBSD-EN-19:03.sqlite

Modified: releng/12.0/sys/conf/newvers.sh
==
--- releng/12.0/sys/conf/newvers.sh Tue Feb  5 18:16:14 2019
(r343791)
+++ releng/12.0/sys/conf/newvers.sh Tue Feb  5 18:20:34 2019
(r343792)
@@ -46,7 +46,7 @@
 
 TYPE="FreeBSD"
 REVISION="12.0"
-BRANCH="RELEASE-p2"
+BRANCH="RELEASE-p3"
 if [ -n "${BRANCH_OVERRIDE}" ]; then
BRANCH=${BRANCH_OVERRIDE}
 fi
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r343790 - releng/12.0/sys/kern

2019-02-05 Thread Ed Maste
Author: emaste
Date: Tue Feb  5 18:11:15 2019
New Revision: 343790
URL: https://svnweb.freebsd.org/changeset/base/343790

Log:
  MFS12 r343785: Avoid leaking fp references when truncating SCM_RIGHTS
  
  control messages.
  
  Submitted by: markj
  Approved by:  so
  Security: CVE-2019-5596

Modified:
  releng/12.0/sys/kern/uipc_syscalls.c
Directory Properties:
  releng/12.0/   (props changed)

Modified: releng/12.0/sys/kern/uipc_syscalls.c
==
--- releng/12.0/sys/kern/uipc_syscalls.cTue Feb  5 18:07:45 2019
(r343789)
+++ releng/12.0/sys/kern/uipc_syscalls.cTue Feb  5 18:11:15 2019
(r343790)
@@ -1607,8 +1607,10 @@ m_dispose_extcontrolm(struct mbuf *m)
fd = *fds++;
error = fget(td, fd, _no_rights,
);
-   if (error == 0)
+   if (error == 0) {
fdclose(td, fp, fd);
+   fdrop(fp, td);
+   }
}
}
clen -= datalen;
___
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: r343791 - head/sys/powerpc/pseries

2019-02-05 Thread Leandro Lupori
Author: luporl
Date: Tue Feb  5 18:16:14 2019
New Revision: 343791
URL: https://svnweb.freebsd.org/changeset/base/343791

Log:
  [ppc64] llan: fix fatal kernel trap when system is low on memory
  
  When running several builders in parallel, on QEMU, with 8GB of
  memory, a fatal kernel trap (0x300 (data storage interrupt))
  caused by llan driver is sometimes observed, when the system
  starts to run out of swap space.
  
  This happens because, at llan_intr(), a phyp call to add a
  logical LAN buffer is always made when llan_add_rxbuf() fails,
  even if it fails to allocate a new buffer.
  
  PR:   235489
  Reviewed by:  jhibbits
  Differential Revision:https://reviews.freebsd.org/D19084

Modified:
  head/sys/powerpc/pseries/phyp_llan.c

Modified: head/sys/powerpc/pseries/phyp_llan.c
==
--- head/sys/powerpc/pseries/phyp_llan.cTue Feb  5 18:11:15 2019
(r343790)
+++ head/sys/powerpc/pseries/phyp_llan.cTue Feb  5 18:16:14 2019
(r343791)
@@ -386,8 +386,6 @@ restart:
/* llan_add_rxbuf does DMA sync and unload as well as requeue */
if (llan_add_rxbuf(sc, rx) != 0) {
if_inc_counter(sc->ifp, IFCOUNTER_IERRORS, 1);
-   phyp_hcall(H_ADD_LOGICAL_LAN_BUFFER, sc->unit,
-   rx->rx_bufdesc);
continue;
}
 
___
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: r343789 - releng/11.2/sys/amd64/amd64

2019-02-05 Thread Ed Maste
Author: emaste
Date: Tue Feb  5 18:07:45 2019
New Revision: 343789
URL: https://svnweb.freebsd.org/changeset/base/343789

Log:
  amd64: clear callee-preserved registers on syscall exit
  
  Submitted by: kib
  Approved by:  so
  Security: CVE-2019-5595
  Security: FreeBSD-SA-19:01.syscall

Modified:
  releng/11.2/sys/amd64/amd64/exception.S

Modified: releng/11.2/sys/amd64/amd64/exception.S
==
--- releng/11.2/sys/amd64/amd64/exception.S Tue Feb  5 18:05:05 2019
(r343788)
+++ releng/11.2/sys/amd64/amd64/exception.S Tue Feb  5 18:07:45 2019
(r343789)
@@ -496,12 +496,14 @@ fast_syscall_common:
movqTF_RFLAGS(%rsp),%r11/* original %rflags */
movqTF_RIP(%rsp),%rcx   /* original %rip */
movqTF_RSP(%rsp),%rsp   /* user stack pointer */
+   xorl%r8d,%r8d   /* zero the rest of GPRs */
+   xorl%r10d,%r10d
cmpb$0,pti
je  2f
movqPCPU(UCR3),%r9
movq%r9,%cr3
-   xorl%r9d,%r9d
-2: swapgs
+2: xorl%r9d,%r9d
+   swapgs
sysretq
 
 3: /* AST scheduled. */
___
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: r343788 - releng/12.0/sys/amd64/amd64

2019-02-05 Thread Ed Maste
Author: emaste
Date: Tue Feb  5 18:05:05 2019
New Revision: 343788
URL: https://svnweb.freebsd.org/changeset/base/343788

Log:
  MFS12 r343781: amd64: clear callee-preserved registers on syscall exit
  
  Submitted by: kib
  Approved by:  so
  Security: CVE-2019-5595
  Security: FreeBSD-SA-19:01.syscall

Modified:
  releng/12.0/sys/amd64/amd64/exception.S
Directory Properties:
  releng/12.0/   (props changed)

Modified: releng/12.0/sys/amd64/amd64/exception.S
==
--- releng/12.0/sys/amd64/amd64/exception.S Tue Feb  5 17:59:50 2019
(r343787)
+++ releng/12.0/sys/amd64/amd64/exception.S Tue Feb  5 18:05:05 2019
(r343788)
@@ -521,12 +521,14 @@ fast_syscall_common:
movqTF_RFLAGS(%rsp),%r11/* original %rflags */
movqTF_RIP(%rsp),%rcx   /* original %rip */
movqTF_RSP(%rsp),%rsp   /* user stack pointer */
+   xorl%r8d,%r8d   /* zero the rest of GPRs */
+   xorl%r10d,%r10d
cmpq$~0,PCPU(UCR3)
je  2f
movqPCPU(UCR3),%r9
movq%r9,%cr3
-   xorl%r9d,%r9d
-2: swapgs
+2: xorl%r9d,%r9d
+   swapgs
sysretq
 
 3: /* AST scheduled. */
___
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: r343787 - in releng/12.0/sys: netinet netinet6

2019-02-05 Thread Ed Maste
Author: emaste
Date: Tue Feb  5 17:59:50 2019
New Revision: 343787
URL: https://svnweb.freebsd.org/changeset/base/343787

Log:
  MFS12 r343454: Fix an LLE lookup race
  
  PR:   234296
  Submitted by: markj
  Approved by:  so

Modified:
  releng/12.0/sys/netinet/in.c
  releng/12.0/sys/netinet6/in6.c
Directory Properties:
  releng/12.0/   (props changed)

Modified: releng/12.0/sys/netinet/in.c
==
--- releng/12.0/sys/netinet/in.cTue Feb  5 17:57:30 2019
(r343786)
+++ releng/12.0/sys/netinet/in.cTue Feb  5 17:59:50 2019
(r343787)
@@ -1372,15 +1372,13 @@ in_lltable_lookup(struct lltable *llt, u_int flags, co
IF_AFDATA_LOCK_ASSERT(llt->llt_ifp);
KASSERT(l3addr->sa_family == AF_INET,
("sin_family %d", l3addr->sa_family));
-   lle = in_lltable_find_dst(llt, sin->sin_addr);
+   KASSERT((flags & (LLE_UNLOCKED | LLE_EXCLUSIVE)) !=
+   (LLE_UNLOCKED | LLE_EXCLUSIVE),
+   ("wrong lle request flags: %#x", flags));
 
+   lle = in_lltable_find_dst(llt, sin->sin_addr);
if (lle == NULL)
return (NULL);
-
-   KASSERT((flags & (LLE_UNLOCKED|LLE_EXCLUSIVE)) !=
-   (LLE_UNLOCKED|LLE_EXCLUSIVE),("wrong lle request flags: 0x%X",
-   flags));
-
if (flags & LLE_UNLOCKED)
return (lle);
 
@@ -1389,6 +1387,17 @@ in_lltable_lookup(struct lltable *llt, u_int flags, co
else
LLE_RLOCK(lle);
 
+   /*
+* If the afdata lock is not held, the LLE may have been unlinked while
+* we were blocked on the LLE lock.  Check for this case.
+*/
+   if (__predict_false((lle->la_flags & LLE_LINKED) == 0)) {
+   if (flags & LLE_EXCLUSIVE)
+   LLE_WUNLOCK(lle);
+   else
+   LLE_RUNLOCK(lle);
+   return (NULL);
+   }
return (lle);
 }
 

Modified: releng/12.0/sys/netinet6/in6.c
==
--- releng/12.0/sys/netinet6/in6.c  Tue Feb  5 17:57:30 2019
(r343786)
+++ releng/12.0/sys/netinet6/in6.c  Tue Feb  5 17:59:50 2019
(r343787)
@@ -2311,16 +2311,13 @@ in6_lltable_lookup(struct lltable *llt, u_int flags,
IF_AFDATA_LOCK_ASSERT(llt->llt_ifp);
KASSERT(l3addr->sa_family == AF_INET6,
("sin_family %d", l3addr->sa_family));
+   KASSERT((flags & (LLE_UNLOCKED | LLE_EXCLUSIVE)) !=
+   (LLE_UNLOCKED | LLE_EXCLUSIVE),
+   ("wrong lle request flags: %#x", flags));
 
lle = in6_lltable_find_dst(llt, >sin6_addr);
-
if (lle == NULL)
return (NULL);
-
-   KASSERT((flags & (LLE_UNLOCKED|LLE_EXCLUSIVE)) !=
-   (LLE_UNLOCKED|LLE_EXCLUSIVE),("wrong lle request flags: 0x%X",
-   flags));
-
if (flags & LLE_UNLOCKED)
return (lle);
 
@@ -2328,6 +2325,18 @@ in6_lltable_lookup(struct lltable *llt, u_int flags,
LLE_WLOCK(lle);
else
LLE_RLOCK(lle);
+
+   /*
+* If the afdata lock is not held, the LLE may have been unlinked while
+* we were blocked on the LLE lock.  Check for this case.
+*/
+   if (__predict_false((lle->la_flags & LLE_LINKED) == 0)) {
+   if (flags & LLE_EXCLUSIVE)
+   LLE_WUNLOCK(lle);
+   else
+   LLE_RUNLOCK(lle);
+   return (NULL);
+   }
return (lle);
 }
 
___
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: r343786 - stable/11/sys/kern

2019-02-05 Thread Mark Johnston
Author: markj
Date: Tue Feb  5 17:57:30 2019
New Revision: 343786
URL: https://svnweb.freebsd.org/changeset/base/343786

Log:
  MFC r343784:
  Avoid leaking fp references when truncating SCM_RIGHTS control messages.
  
  Approved by:  so
  Security: CVE-2019-5596

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

Modified: stable/11/sys/kern/uipc_syscalls.c
==
--- stable/11/sys/kern/uipc_syscalls.c  Tue Feb  5 17:56:22 2019
(r343785)
+++ stable/11/sys/kern/uipc_syscalls.c  Tue Feb  5 17:57:30 2019
(r343786)
@@ -1831,8 +1831,10 @@ m_dispose_extcontrolm(struct mbuf *m)
fd = *fds++;
error = fget(td, fd,
cap_rights_init(), );
-   if (error == 0)
+   if (error == 0) {
fdclose(td, fp, fd);
+   fdrop(fp, td);
+   }
}
}
clen -= datalen;
___
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: r343785 - stable/12/sys/kern

2019-02-05 Thread Mark Johnston
Author: markj
Date: Tue Feb  5 17:56:22 2019
New Revision: 343785
URL: https://svnweb.freebsd.org/changeset/base/343785

Log:
  MFC r343784:
  Avoid leaking fp references when truncating SCM_RIGHTS control messages.
  
  Approved by:  so
  Security: CVE-2019-5596

Modified:
  stable/12/sys/kern/uipc_syscalls.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/kern/uipc_syscalls.c
==
--- stable/12/sys/kern/uipc_syscalls.c  Tue Feb  5 17:55:08 2019
(r343784)
+++ stable/12/sys/kern/uipc_syscalls.c  Tue Feb  5 17:56:22 2019
(r343785)
@@ -1607,8 +1607,10 @@ m_dispose_extcontrolm(struct mbuf *m)
fd = *fds++;
error = fget(td, fd, _no_rights,
);
-   if (error == 0)
+   if (error == 0) {
fdclose(td, fp, fd);
+   fdrop(fp, td);
+   }
}
}
clen -= datalen;
___
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: r343784 - head/sys/kern

2019-02-05 Thread Mark Johnston
Author: markj
Date: Tue Feb  5 17:55:08 2019
New Revision: 343784
URL: https://svnweb.freebsd.org/changeset/base/343784

Log:
  Avoid leaking fp references when truncating SCM_RIGHTS control messages.
  
  Reported by:  pho
  Approved by:  so
  MFC after:0 minutes
  Security: CVE-2019-5596
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/kern/uipc_syscalls.c

Modified: head/sys/kern/uipc_syscalls.c
==
--- head/sys/kern/uipc_syscalls.c   Tue Feb  5 17:54:09 2019
(r343783)
+++ head/sys/kern/uipc_syscalls.c   Tue Feb  5 17:55:08 2019
(r343784)
@@ -1605,8 +1605,10 @@ m_dispose_extcontrolm(struct mbuf *m)
fd = *fds++;
error = fget(td, fd, _no_rights,
);
-   if (error == 0)
+   if (error == 0) {
fdclose(td, fp, fd);
+   fdrop(fp, td);
+   }
}
}
clen -= datalen;
___
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: r343783 - releng/12.0/sys/cddl/dev/dtrace/amd64

2019-02-05 Thread Ed Maste
Author: emaste
Date: Tue Feb  5 17:54:09 2019
New Revision: 343783
URL: https://svnweb.freebsd.org/changeset/base/343783

Log:
  MFS12 r342267: dtrace: fix userspace access on boxes with SMAP
  
  Approved by:  so
  Sponsored by: The FreeBSD Foundation

Modified:
  releng/12.0/sys/cddl/dev/dtrace/amd64/dtrace_asm.S
  releng/12.0/sys/cddl/dev/dtrace/amd64/dtrace_isa.c
Directory Properties:
  releng/12.0/   (props changed)

Modified: releng/12.0/sys/cddl/dev/dtrace/amd64/dtrace_asm.S
==
--- releng/12.0/sys/cddl/dev/dtrace/amd64/dtrace_asm.S  Tue Feb  5 17:54:02 
2019(r343782)
+++ releng/12.0/sys/cddl/dev/dtrace/amd64/dtrace_asm.S  Tue Feb  5 17:54:09 
2019(r343783)
@@ -208,7 +208,7 @@ dtrace_caller(int aframes)
 void
 dtrace_copy(uintptr_t src, uintptr_t dest, size_t size)
 */
-   ENTRY(dtrace_copy)
+   ENTRY(dtrace_copy_nosmap)
pushq   %rbp
movq%rsp, %rbp
 
@@ -218,14 +218,28 @@ dtrace_copy(uintptr_t src, uintptr_t dest, size_t size
smovb   /*   move from %ds:rsi to %ed:rdi */
leave
ret
-   END(dtrace_copy)
+   END(dtrace_copy_nosmap)
 
+   ENTRY(dtrace_copy_smap)
+   pushq   %rbp
+   movq%rsp, %rbp
+
+   xchgq   %rdi, %rsi  /* make %rsi source, %rdi dest */
+   movq%rdx, %rcx  /* load count */
+   stac
+   repz/* repeat for count ... */
+   smovb   /*   move from %ds:rsi to %ed:rdi */
+   clac
+   leave
+   ret
+   END(dtrace_copy_smap)
+
 /*
 void
 dtrace_copystr(uintptr_t uaddr, uintptr_t kaddr, size_t size,
 volatile uint16_t *flags)
 */
-   ENTRY(dtrace_copystr)
+   ENTRY(dtrace_copystr_nosmap)
pushq   %rbp
movq%rsp, %rbp
 
@@ -248,55 +262,120 @@ dtrace_copystr(uintptr_t uaddr, uintptr_t kaddr, size_
leave
ret
 
-   END(dtrace_copystr)
+   END(dtrace_copystr_nosmap)
 
+   ENTRY(dtrace_copystr_smap)
+   pushq   %rbp
+   movq%rsp, %rbp
+
+   stac
+0:
+   movb(%rdi), %al /* load from source */
+   movb%al, (%rsi) /* store to destination */
+   addq$1, %rdi/* increment source pointer */
+   addq$1, %rsi/* increment destination pointer */
+   subq$1, %rdx/* decrement remaining count */
+   cmpb$0, %al
+   je  2f
+   testq   $0xfff, %rdx/* test if count is 4k-aligned */
+   jnz 1f  /* if not, continue with copying */
+   testq   $CPU_DTRACE_BADADDR, (%rcx) /* load and test dtrace flags */
+   jnz 2f
+1:
+   cmpq$0, %rdx
+   jne 0b
+2:
+   clac
+   leave
+   ret
+
+   END(dtrace_copystr_smap)
+
 /*
 uintptr_t
 dtrace_fulword(void *addr)
 */
-   ENTRY(dtrace_fulword)
+   ENTRY(dtrace_fulword_nosmap)
movq(%rdi), %rax
ret
-   END(dtrace_fulword)
+   END(dtrace_fulword_nosmap)
 
+   ENTRY(dtrace_fulword_smap)
+   stac
+   movq(%rdi), %rax
+   clac
+   ret
+   END(dtrace_fulword_smap)
+
 /*
 uint8_t
 dtrace_fuword8_nocheck(void *addr)
 */
-   ENTRY(dtrace_fuword8_nocheck)
+   ENTRY(dtrace_fuword8_nocheck_nosmap)
xorq%rax, %rax
movb(%rdi), %al
ret
-   END(dtrace_fuword8_nocheck)
+   END(dtrace_fuword8_nocheck_nosmap)
 
+   ENTRY(dtrace_fuword8_nocheck_smap)
+   stac
+   xorq%rax, %rax
+   movb(%rdi), %al
+   clac
+   ret
+   END(dtrace_fuword8_nocheck_smap)
+
 /*
 uint16_t
 dtrace_fuword16_nocheck(void *addr)
 */
-   ENTRY(dtrace_fuword16_nocheck)
+   ENTRY(dtrace_fuword16_nocheck_nosmap)
xorq%rax, %rax
movw(%rdi), %ax
ret
-   END(dtrace_fuword16_nocheck)
+   END(dtrace_fuword16_nocheck_nosmap)
 
+   ENTRY(dtrace_fuword16_nocheck_smap)
+   stac
+   xorq%rax, %rax
+   movw(%rdi), %ax
+   clac
+   ret
+   END(dtrace_fuword16_nocheck_smap)
+
 /*
 uint32_t
 dtrace_fuword32_nocheck(void *addr)
 */
-   ENTRY(dtrace_fuword32_nocheck)
+   ENTRY(dtrace_fuword32_nocheck_nosmap)
xorq%rax, %rax
movl(%rdi), %eax
ret
-   END(dtrace_fuword32_nocheck)
+   END(dtrace_fuword32_nocheck_nosmap)
 
+   ENTRY(dtrace_fuword32_nocheck_smap)
+   stac
+   xorq%rax, %rax
+   movl(%rdi), %eax
+   clac
+   ret
+   END(dtrace_fuword32_nocheck_smap)
+
 /*
 uint64_t
 dtrace_fuword64_nocheck(void *addr)
 */
-   ENTRY(dtrace_fuword64_nocheck)
+   ENTRY(dtrace_fuword64_nocheck_nosmap)
movq(%rdi), %rax
ret
-   END(dtrace_fuword64_nocheck)
+   END(dtrace_fuword64_nocheck_nosmap)
+
+   

svn commit: r343782 - stable/11/sys/amd64/amd64

2019-02-05 Thread Konstantin Belousov
Author: kib
Date: Tue Feb  5 17:54:02 2019
New Revision: 343782
URL: https://svnweb.freebsd.org/changeset/base/343782

Log:
  MFC r343780:
  amd64: clear callee-preserved registers on syscall exit.
  
  Approved by:  so
  Security: CVE-2019-5595

Modified:
  stable/11/sys/amd64/amd64/exception.S
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/amd64/amd64/exception.S
==
--- stable/11/sys/amd64/amd64/exception.S   Tue Feb  5 17:52:06 2019
(r343781)
+++ stable/11/sys/amd64/amd64/exception.S   Tue Feb  5 17:54:02 2019
(r343782)
@@ -511,12 +511,14 @@ fast_syscall_common:
movqTF_RFLAGS(%rsp),%r11/* original %rflags */
movqTF_RIP(%rsp),%rcx   /* original %rip */
movqTF_RSP(%rsp),%rsp   /* user stack pointer */
+   xorl%r8d,%r8d   /* zero the rest of GPRs */
+   xorl%r10d,%r10d
cmpq$~0,PCPU(UCR3)
je  2f
movqPCPU(UCR3),%r9
movq%r9,%cr3
-   xorl%r9d,%r9d
-2: swapgs
+2: xorl%r9d,%r9d
+   swapgs
sysretq
 
 3: /* AST scheduled. */
___
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: r343781 - stable/12/sys/amd64/amd64

2019-02-05 Thread Konstantin Belousov
Author: kib
Date: Tue Feb  5 17:52:06 2019
New Revision: 343781
URL: https://svnweb.freebsd.org/changeset/base/343781

Log:
  MFC r343780:
  amd64: clear callee-preserved registers on syscall exit.
  
  Approved by:  so
  Security: CVE-2019-5595

Modified:
  stable/12/sys/amd64/amd64/exception.S
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/amd64/amd64/exception.S
==
--- stable/12/sys/amd64/amd64/exception.S   Tue Feb  5 17:49:27 2019
(r343780)
+++ stable/12/sys/amd64/amd64/exception.S   Tue Feb  5 17:52:06 2019
(r343781)
@@ -521,12 +521,14 @@ fast_syscall_common:
movqTF_RFLAGS(%rsp),%r11/* original %rflags */
movqTF_RIP(%rsp),%rcx   /* original %rip */
movqTF_RSP(%rsp),%rsp   /* user stack pointer */
+   xorl%r8d,%r8d   /* zero the rest of GPRs */
+   xorl%r10d,%r10d
cmpq$~0,PCPU(UCR3)
je  2f
movqPCPU(UCR3),%r9
movq%r9,%cr3
-   xorl%r9d,%r9d
-2: swapgs
+2: xorl%r9d,%r9d
+   swapgs
sysretq
 
 3: /* AST scheduled. */
___
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: r343780 - head/sys/amd64/amd64

2019-02-05 Thread Konstantin Belousov
Author: kib
Date: Tue Feb  5 17:49:27 2019
New Revision: 343780
URL: https://svnweb.freebsd.org/changeset/base/343780

Log:
  amd64: clear callee-preserved registers on syscall exit.
  
  %r8, %r10, and on non-KPTI configuration %r9 were not restored on fast
  return from a syscall.
  
  Reviewed by:  markj
  Approved by:  so
  Security: CVE-2019-5595
  Sponsored by: The FreeBSD Foundation
  MFC after:0 minutes

Modified:
  head/sys/amd64/amd64/exception.S

Modified: head/sys/amd64/amd64/exception.S
==
--- head/sys/amd64/amd64/exception.STue Feb  5 17:17:12 2019
(r343779)
+++ head/sys/amd64/amd64/exception.STue Feb  5 17:49:27 2019
(r343780)
@@ -521,12 +521,14 @@ fast_syscall_common:
movqTF_RFLAGS(%rsp),%r11/* original %rflags */
movqTF_RIP(%rsp),%rcx   /* original %rip */
movqTF_RSP(%rsp),%rsp   /* user stack pointer */
+   xorl%r8d,%r8d   /* zero the rest of GPRs */
+   xorl%r10d,%r10d
cmpq$~0,PCPU(UCR3)
je  2f
movqPCPU(UCR3),%r9
movq%r9,%cr3
-   xorl%r9d,%r9d
-2: swapgs
+2: xorl%r9d,%r9d
+   swapgs
sysretq
 
 3: /* AST scheduled. */
___
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: r343777 - head/sys/kern

2019-02-05 Thread Bruce Evans

On Tue, 5 Feb 2019, Kyle Evans wrote:


On Tue, Feb 5, 2019 at 9:35 AM Bruce Evans  wrote:

...
Log:
  Fix zapping of static hints and env in init_static_kenv().  Environments
  are terminated by 2 NULs, but only 1 NUL was zapped.  Zapping only 1
  NUL just splits the first string into an empty string and a corrupted
  string.  All other strings in static hints and env remained live early
  in the boot when they were supposed to be disabled.


I think we need to go another step here. This stuff was functional in
my testing because it was all late enough to happen after static_env
and static_hints were merged into the dynamic kenv (which I've only
now noticed after you fixed this). It looks like our logic for merging
is broken, IMO.


It was too early to work in hammer_time() and init386() where important
tunables are looked up.  E.g., dynamic kenv needs malloc, but in these
functions even the memory size isn't quite known and it is controlled
by the hw.physmem tunable.

I missed this since I don't use the merging feature and usually duplicate
the static hints in the dynamic hints.


Before I touched it:

- When static_hints did get merged (by toggling of sysctl) it would
stop merging at the first empty string (strlen(cp) == 0) -- introduced
in r240067 -- regardless of whether said empty string was followed by
a second NUL terminator.


I think the syntax of the config file doesn't allow creating empty
strings in the middle, so this worked.


- When static_env merged in at SU_SUB_KMEM, it wouldn't merge if
*kern_envp == '\0' but it wouldn't stop at an empty string, instead
carrying the empty string into the dynamic env if my reading is
correct.

I broke the former even further by not merging anything at all if
*static_hints == '\0', and I maintained the latter breakage except
added an additional warning if we ventured upon a malformed entry.


I thought that the dynamic env initialization dropped the misformatted
static hints and env more intentionally.


Both of these are inconsistent with how the environments are observed
by kern_getenv or hints consumers before the merging, which will
simply skip over the malformed empty strings until it hits proper
termination. I think the resulting environment should be consistent
with what these consumers would've seen pre-merge, and I think this
should be fixed, if we can.


I think we can trust the compile-time hints and envs to not have empty
strings (or even ones not in the form name=value).  Then don't mess them
up by zapping them but instead start with a compile-time initialization
of a pointer to them and zap that.  The pointer can be null and the
hints and env don't even need to exist when they are empty.
_getenv_static() already works right with null pointers.  Hints looks
like it needs more reorganization.

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: r325728 - head/lib/libkvm

2019-02-05 Thread Brooks Davis
On Tue, Feb 05, 2019 at 09:14:46AM -0800, John Baldwin wrote:
> On 2/5/19 8:25 AM, Bruce Evans wrote:
> > On Tue, 5 Feb 2019, Ed Maste wrote:
> > 
> >> On Tue, 5 Feb 2019 at 05:17, Bruce Evans  wrote:
> >>>
> >>> On Mon, 4 Feb 2019, Ed Maste wrote:
>  This should probably be uin64_t to support cross-debugging cores from
>  64-bit machines on 32-bit hosts; also for i386 PAE. Or, on IRC jhb
>  suggested we introduce a kpaddr_t typedef akin to kvaddr_t.
> >>>
> >>> The correct type is vm_paddr_t or maybe a kvm wrapper of this.
> >>
> >> That precludes cross-arch and cross-size use of kvm_walk_pages; kvm
> >> supports this use (see kvm_read2) so it should be a 64-bit kvm
> >> wrapper.
> > 
> > kvm or system?  kvaddr_t is system and the corresponding physical address
> > type should probably be system too.
> 
> It only needs to exist for libkvm.  I want to make a 'portable' libkvm that
> can be built on non-FreeBSD OS's such as OS X, etc.  That is the last thing
> needed to let kgdb run on non-FreeBSD OS's to cross-debug crash dumps.  For
> that you would want self-contained types I think such as kvm_vaddr_t and
> kvm_paddr_t.  I guess I just reused kvaddr_t because it already existed,
> but having dedicated types in kvm.h is probably better long term.

IIRC, you created kvaddr_t first and I co-opted it for the kernel after
finding a namespace collision when I merged the kvaddr_t from CheriBSD.
Using kvm_ types seems like a good idea for the reaons you hilight.

-- Brooks


signature.asc
Description: PGP signature


svn commit: r343779 - head/sys/dev/vt

2019-02-05 Thread Bruce Evans
Author: bde
Date: Tue Feb  5 17:17:12 2019
New Revision: 343779
URL: https://svnweb.freebsd.org/changeset/base/343779

Log:
  Fix missing translation of old ioctls for KDSETMODE, KDSBORDER and
  CONS_SETWINORG.  After translation, the last 2 are not supported, but
  the first one has incomplete support that is enough to run old versions
  of X.

Modified:
  head/sys/dev/vt/vt_core.c

Modified: head/sys/dev/vt/vt_core.c
==
--- head/sys/dev/vt/vt_core.c   Tue Feb  5 16:59:29 2019(r343778)
+++ head/sys/dev/vt/vt_core.c   Tue Feb  5 17:17:12 2019(r343779)
@@ -2114,11 +2114,20 @@ vtterm_ioctl(struct terminal *tm, u_long cmd, caddr_t 
case _IO('K', 8):
cmd = KDMKTONE;
break;
+   case _IO('K', 10):
+   cmd = KDSETMODE;
+   break;
+   case _IO('K', 13):
+   cmd = KDSBORDER;
+   break;
case _IO('K', 63):
cmd = KIOCSOUND;
break;
case _IO('K', 66):
cmd = KDSETLED;
+   break;
+   case _IO('c', 104):
+   cmd = CONS_SETWINORG;
break;
case _IO('c', 110):
cmd = CONS_SETKBD;
___
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: r343777 - head/sys/kern

2019-02-05 Thread Kyle Evans
On Tue, Feb 5, 2019 at 9:35 AM Bruce Evans  wrote:
>
> Author: bde
> Date: Tue Feb  5 15:34:55 2019
> New Revision: 343777
> URL: https://svnweb.freebsd.org/changeset/base/343777
>
> Log:
>   Fix zapping of static hints and env in init_static_kenv().  Environments
>   are terminated by 2 NULs, but only 1 NUL was zapped.  Zapping only 1
>   NUL just splits the first string into an empty string and a corrupted
>   string.  All other strings in static hints and env remained live early
>   in the boot when they were supposed to be disabled.
>

I think we need to go another step here. This stuff was functional in
my testing because it was all late enough to happen after static_env
and static_hints were merged into the dynamic kenv (which I've only
now noticed after you fixed this). It looks like our logic for merging
is broken, IMO.

Before I touched it:

- When static_hints did get merged (by toggling of sysctl) it would
stop merging at the first empty string (strlen(cp) == 0) -- introduced
in r240067 -- regardless of whether said empty string was followed by
a second NUL terminator.

- When static_env merged in at SU_SUB_KMEM, it wouldn't merge if
*kern_envp == '\0' but it wouldn't stop at an empty string, instead
carrying the empty string into the dynamic env if my reading is
correct.

I broke the former even further by not merging anything at all if
*static_hints == '\0', and I maintained the latter breakage except
added an additional warning if we ventured upon a malformed entry.

Both of these are inconsistent with how the environments are observed
by kern_getenv or hints consumers before the merging, which will
simply skip over the malformed empty strings until it hits proper
termination. I think the resulting environment should be consistent
with what these consumers would've seen pre-merge, and I think this
should be fixed, if we can.

Thoughts?

Thanks,

Kyle Evans
___
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: r325728 - head/lib/libkvm

2019-02-05 Thread John Baldwin
On 2/5/19 8:25 AM, Bruce Evans wrote:
> On Tue, 5 Feb 2019, Ed Maste wrote:
> 
>> On Tue, 5 Feb 2019 at 05:17, Bruce Evans  wrote:
>>>
>>> On Mon, 4 Feb 2019, Ed Maste wrote:
 This should probably be uin64_t to support cross-debugging cores from
 64-bit machines on 32-bit hosts; also for i386 PAE. Or, on IRC jhb
 suggested we introduce a kpaddr_t typedef akin to kvaddr_t.
>>>
>>> The correct type is vm_paddr_t or maybe a kvm wrapper of this.
>>
>> That precludes cross-arch and cross-size use of kvm_walk_pages; kvm
>> supports this use (see kvm_read2) so it should be a 64-bit kvm
>> wrapper.
> 
> kvm or system?  kvaddr_t is system and the corresponding physical address
> type should probably be system too.

It only needs to exist for libkvm.  I want to make a 'portable' libkvm that
can be built on non-FreeBSD OS's such as OS X, etc.  That is the last thing
needed to let kgdb run on non-FreeBSD OS's to cross-debug crash dumps.  For
that you would want self-contained types I think such as kvm_vaddr_t and
kvm_paddr_t.  I guess I just reused kvaddr_t because it already existed,
but having dedicated types in kvm.h is probably better long term.

> Signed kp_offset seems wrong.  Apart from it not reaching the top of 64-
> bit address spaces, adding unsigned kp_len to it gives an unsigned type.

kp_offset is the file offset in the vmcore file so that you can directly
use it with pread() or lseek().  In that case, I think off_t is the right
type.  Similarly, the 'len' should stay as size_t since it is intended to
be used as the argument to read()/pread() or a size passed to malloc(), etc.
I don't think vm_ooffset_t is appropriate as it is 1) non-portable and
2) not suitable for userspace APIs.

-- 
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: r343778 - in head/sys: dev/syscons teken teken/libteken

2019-02-05 Thread Bruce Evans
Author: bde
Date: Tue Feb  5 16:59:29 2019
New Revision: 343778
URL: https://svnweb.freebsd.org/changeset/base/343778

Log:
  My recent fix for programmable function keys in syscons only worked
  when TEKEN_CONS25 is configured.  Fix this by adding a function to
  set the flag that enables the fix and always calling this function
  for syscons.
  
  Expand the man page for teken_set_cons25().  This function is not
  very useful since it can only set but not clear 1 flag.  In practice,
  it is only used when TEKEN_CONS25 is configured and all that does is
  choose the the default emulation for syscons at compile time.

Modified:
  head/sys/dev/syscons/scterm-teken.c
  head/sys/teken/libteken/teken.3
  head/sys/teken/teken.c
  head/sys/teken/teken.h

Modified: head/sys/dev/syscons/scterm-teken.c
==
--- head/sys/dev/syscons/scterm-teken.c Tue Feb  5 15:34:55 2019
(r343777)
+++ head/sys/dev/syscons/scterm-teken.c Tue Feb  5 16:59:29 2019
(r343778)
@@ -144,6 +144,7 @@ scteken_init(scr_stat *scp, void **softc, int code)
 #ifdef TEKEN_CONS25
teken_set_cons25(>ts_teken);
 #endif /* TEKEN_CONS25 */
+   teken_set_cons25keys(>ts_teken);
scteken_sync_internal(scp, ts);
break;
}

Modified: head/sys/teken/libteken/teken.3
==
--- head/sys/teken/libteken/teken.3 Tue Feb  5 15:34:55 2019
(r343777)
+++ head/sys/teken/libteken/teken.3 Tue Feb  5 16:59:29 2019
(r343778)
@@ -66,6 +66,8 @@
 .Fn teken_set_8bit "teken_t *t"
 .Ft void
 .Fn teken_set_cons25 "teken_t *t"
+.Ft void
+.Fn teken_set_cons25keys "teken_t *t"
 .Sh DESCRIPTION
 The
 .Nm
@@ -194,11 +196,24 @@ which can be used to support character sets like CP437
 .Pp
 The
 .Fn teken_set_cons25
-function switches terminal emulation to
+function sets the terminal emulation to
 .Dv cons25 ,
-which is used by versions of
+which was the default for
+.Xr syscons 4
+in versions of
 .Fx
 prior to 9.0.
+This function is only useful for initialization.
+The emulation can be changed at any time using an escape sequence,
+and this function is not used then.
+.Pp
+The
+.Fn teken_set_cons25keys
+function tells the
+.Fn teken_get_sequence
+function to not interpret special keys in
+.Dv cons25
+mode.
 .Sh SEE ALSO
 .Xr ncurses 3 ,
 .Xr termcap 3 ,

Modified: head/sys/teken/teken.c
==
--- head/sys/teken/teken.c  Tue Feb  5 15:34:55 2019(r343777)
+++ head/sys/teken/teken.c  Tue Feb  5 16:59:29 2019(r343778)
@@ -412,7 +412,14 @@ void
 teken_set_cons25(teken_t *t)
 {
 
-   t->t_stateflags |= TS_CONS25 | TS_CONS25KEYS;
+   t->t_stateflags |= TS_CONS25;
+}
+
+void
+teken_set_cons25keys(teken_t *t)
+{
+
+   t->t_stateflags |= TS_CONS25KEYS;
 }
 
 /*

Modified: head/sys/teken/teken.h
==
--- head/sys/teken/teken.h  Tue Feb  5 15:34:55 2019(r343777)
+++ head/sys/teken/teken.h  Tue Feb  5 16:59:29 2019(r343778)
@@ -212,6 +212,7 @@ const char *teken_get_sequence(const teken_t *, unsign
 /* Legacy features. */
 void   teken_set_8bit(teken_t *);
 void   teken_set_cons25(teken_t *);
+void   teken_set_cons25keys(teken_t *);
 
 /* Color conversion. */
 teken_color_t teken_256to16(teken_color_t);
___
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: r325728 - head/lib/libkvm

2019-02-05 Thread Bruce Evans

On Tue, 5 Feb 2019, Ed Maste wrote:


On Tue, 5 Feb 2019 at 05:17, Bruce Evans  wrote:


On Mon, 4 Feb 2019, Ed Maste wrote:


On Sat, 11 Nov 2017 at 18:31, Will Andrews  wrote:


Author: will
Date: Sat Nov 11 23:30:58 2017
New Revision: 325728
URL: https://svnweb.freebsd.org/changeset/base/325728

Log:
  libkvm: add kvm_walk_pages API.


(Replying here only to the comments on the issues I brought up.)


+   u_long paddr;


Further pollution in the type and struct member names.  Further misformatting

The include of sys/_types.h was apparently changed to sys/types.h to support
using u_long.


If we change the types then we can presumably revert that part.


It would need the kva wrapper type in sys/_types.h.

In fact, older, more standard types are already declared there, but with
underscores as needed to have no pollution in there.  sys/types.h and
some other files turn the underscored versions into non-underscored
versions.


This should probably be uin64_t to support cross-debugging cores from
64-bit machines on 32-bit hosts; also for i386 PAE. Or, on IRC jhb
suggested we introduce a kpaddr_t typedef akin to kvaddr_t.


The correct type is vm_paddr_t or maybe a kvm wrapper of this.


That precludes cross-arch and cross-size use of kvm_walk_pages; kvm
supports this use (see kvm_read2) so it should be a 64-bit kvm
wrapper.


kvm or system?  kvaddr_t is system and the corresponding physical address
type should probably be system too.

The name kvaddr_t is not very good.  kva is a good abbreviation, and
kva_ is a good prefix.  kvaddr is not so good for either.  We now want
a physical address type and its matching name is kpaddr_t, but that means
that the prefix is just k.




+   u_long kmap_vaddr;
+   u_long dmap_vaddr;


These two should be kvaddr_t.


Further pollution and style bugs in names, types and formatting.


Somewhat difficult to change now though... but what about:

struct kvm_page {
   u_int kp_version;
   kpaddr_t kp_paddr;
   kvaddr_t kp_kmap_vaddr;
   kvaddr_t kp_dmap_vaddr;
   vm_prot_t kp_prot;
   off_t kp_offset;
   size_t kp_len;
};


This should have tabs after 3 shorter type names.

Signed kp_offset seems wrong.  Apart from it not reaching the top of 64-
bit address spaces, adding unsigned kp_len to it gives an unsigned type.

u_int, vm_prot_t and size_t give sparse packing with binary incompatibilities.
vm_prot_t is 8 bits, so there there is 7 bytes of padding after kp_prot on
amd64 and only 3 bytes on i386.  4 or 0 bytes of padding after kp_version
and kp_len.  This is hard to fix now.  But you already changed the ABI on
i386 by expanding all the u_long's.


[kvaddr_t] is currently hard-coded as __uint64_t.  That works for all supported
arches now, but eventually some typedefs will actually be needed for their
purpose of being implementation-depended and changeable.


Except that these should be MI for cross-debugging.


+   vm_prot_t prot;
+   u_long offset;


off_t?


Further pollution and style bugs in names, types and formatting.

Maybe uoff_t.  off_t is 64-bits signed so can't reach most kernel addresses
on some 64-bit arches like amd64.


I believe the offset here is the offset of the page in the vmcore
file, so off_t should be appropriate.


That is spelled vm_ooffset_t in the kernel.  This was MD in theory
before r313194 2 years ago, but it was always 64 bits signed ad was
made MI to give a consistent ABI.  The MD version had less pollution
than the MI version -- it gave an underscored version that was available
without including .  It was still hard to remember to use
it instead of off_t.  Then it was changed to uint64_t in r341398 for
much the same reason as one of me reasons above -- most uses of it
convert it to an unsigned type (sometimes by unsigned poisoning).

So vm_ooffset_t is appropriate.


+   size_t len;


Further pollution and style bugs 1 name and formatting.


Off hand I'm not sure of the appropriate type for a MI size; in
practice now though this len will be page size.


I also don't like most uses of size_t, especially in ABIs.  Many are
for values that are sure to be small.  Small values can be packed into
uint32_t or smaller.  If the size is unlimited, use uint64_t.  The
address space might be unlimited, but 64 bits for a single (non-sparse)
object is preposterously large.

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"


svn commit: r343777 - head/sys/kern

2019-02-05 Thread Bruce Evans
Author: bde
Date: Tue Feb  5 15:34:55 2019
New Revision: 343777
URL: https://svnweb.freebsd.org/changeset/base/343777

Log:
  Fix zapping of static hints and env in init_static_kenv().  Environments
  are terminated by 2 NULs, but only 1 NUL was zapped.  Zapping only 1
  NUL just splits the first string into an empty string and a corrupted
  string.  All other strings in static hints and env remained live early
  in the boot when they were supposed to be disabled.
  
  Support calling init_static_kenv() very early in the boot, so as to
  use the env very early in the boot.  Then the pointer to the loader
  env may change after the first call due to enabling paging or otherwise
  remapping the pointer.  Another call is needed to register the change.
  Don't use the previous pointer in this (or any) later call.
  
  Reviewed by:  kib

Modified:
  head/sys/kern/kern_environment.c

Modified: head/sys/kern/kern_environment.c
==
--- head/sys/kern/kern_environment.cTue Feb  5 15:05:22 2019
(r343776)
+++ head/sys/kern/kern_environment.cTue Feb  5 15:34:55 2019
(r343777)
@@ -250,7 +250,24 @@ init_static_kenv(char *buf, size_t len)
char *eval;
 
KASSERT(!dynamic_kenv, ("kenv: dynamic_kenv already initialized"));
+
/*
+* We may be called twice, with the second call needed to relocate
+* md_envp after enabling paging.  md_envp is then garbage if it is
+* not null and the relocation will move it.  Discard it so as to
+* not crash using its old value in our first call to kern_getenv().
+*
+* The second call gives the same environment as the first except
+* in silly configurations where the static env disables itself.
+*
+* Other env calls don't handle possibly-garbage pointers, so must
+* not be made between enabling paging and calling here.
+*/
+   md_envp = NULL;
+   md_env_len = 0;
+   md_env_pos = 0;
+
+   /*
 * Give the static environment a chance to disable the loader(8)
 * environment first.  This is done with loader_env.disabled=1.
 *
@@ -275,12 +292,16 @@ init_static_kenv(char *buf, size_t len)
md_env_pos = 0;
 
eval = kern_getenv("static_env.disabled");
-   if (eval != NULL && strcmp(eval, "1") == 0)
-   *kern_envp = '\0';
+   if (eval != NULL && strcmp(eval, "1") == 0) {
+   kern_envp[0] = '\0';
+   kern_envp[1] = '\0';
+   }
}
eval = kern_getenv("static_hints.disabled");
-   if (eval != NULL && strcmp(eval, "1") == 0)
-   *static_hints = '\0';
+   if (eval != NULL && strcmp(eval, "1") == 0) {
+   static_hints[0] = '\0';
+   static_hints[1] = '\0';
+   }
 }
 
 static void
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r343776 - vendor-crypto/openssh/dist

2019-02-05 Thread Dag-Erling Smørgrav
Author: des
Date: Tue Feb  5 15:05:22 2019
New Revision: 343776
URL: https://svnweb.freebsd.org/changeset/base/343776

Log:
  Re-apply scp filename matching fix.

Modified:
  vendor-crypto/openssh/dist/scp.1
  vendor-crypto/openssh/dist/scp.c

Modified: vendor-crypto/openssh/dist/scp.1
==
--- vendor-crypto/openssh/dist/scp.1Tue Feb  5 15:04:28 2019
(r343775)
+++ vendor-crypto/openssh/dist/scp.1Tue Feb  5 15:05:22 2019
(r343776)
@@ -18,7 +18,7 @@
 .Nd secure copy (remote file copy program)
 .Sh SYNOPSIS
 .Nm scp
-.Op Fl 346BCpqrv
+.Op Fl 346BCpqrTv
 .Op Fl c Ar cipher
 .Op Fl F Ar ssh_config
 .Op Fl i Ar identity_file
@@ -208,6 +208,16 @@ to use for the encrypted connection.
 The program must understand
 .Xr ssh 1
 options.
+.It Fl T
+Disable strict filename checking.
+By default when copying files from a remote host to a local directory
+.Nm
+checks that the received filenames match those requested on the command-line
+to prevent the remote end from sending unexpected or unwanted files.
+Because of differences in how various operating systems and shells interpret
+filename wildcards, these checks may cause wanted files to be rejected.
+This option disables these checks at the expense of fully trusting that
+the server will not send unexpected filenames.
 .It Fl v
 Verbose mode.
 Causes

Modified: vendor-crypto/openssh/dist/scp.c
==
--- vendor-crypto/openssh/dist/scp.cTue Feb  5 15:04:28 2019
(r343775)
+++ vendor-crypto/openssh/dist/scp.cTue Feb  5 15:05:22 2019
(r343776)
@@ -1,4 +1,4 @@
-/* $OpenBSD: scp.c,v 1.197 2018/06/01 04:31:48 dtucker Exp $ */
+/* $OpenBSD: scp.c,v 1.203 2019/01/27 07:14:11 jmc Exp $ */
 /*
  * scp - secure remote copy.  This is basically patched BSD rcp which
  * uses ssh to do the data transfer (instead of using rcmd).
@@ -94,6 +94,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -375,14 +376,14 @@ void verifydir(char *);
 struct passwd *pwd;
 uid_t userid;
 int errs, remin, remout;
-int pflag, iamremote, iamrecursive, targetshouldbedirectory;
+int Tflag, pflag, iamremote, iamrecursive, targetshouldbedirectory;
 
 #defineCMDNEEDS64
 char cmd[CMDNEEDS];/* must hold "rcp -r -p -d\0" */
 
 int response(void);
 void rsource(char *, struct stat *);
-void sink(int, char *[]);
+void sink(int, char *[], const char *);
 void source(int, char *[]);
 void tolocal(int, char *[]);
 void toremote(int, char *[]);
@@ -421,8 +422,9 @@ main(int argc, char **argv)
addargs(, "-oRemoteCommand=none");
addargs(, "-oRequestTTY=no");
 
-   fflag = tflag = 0;
-   while ((ch = getopt(argc, argv, "dfl:prtvBCc:i:P:q12346S:o:F:")) != -1)
+   fflag = Tflag = tflag = 0;
+   while ((ch = getopt(argc, argv,
+   "dfl:prtTvBCc:i:P:q12346S:o:F:")) != -1) {
switch (ch) {
/* User-visible flags. */
case '1':
@@ -501,9 +503,13 @@ main(int argc, char **argv)
setmode(0, O_BINARY);
 #endif
break;
+   case 'T':
+   Tflag = 1;
+   break;
default:
usage();
}
+   }
argc -= optind;
argv += optind;
 
@@ -534,7 +540,7 @@ main(int argc, char **argv)
}
if (tflag) {
/* Receive data. */
-   sink(argc, argv);
+   sink(argc, argv, NULL);
exit(errs != 0);
}
if (argc < 2)
@@ -791,7 +797,7 @@ tolocal(int argc, char **argv)
continue;
}
free(bp);
-   sink(1, argv + argc - 1);
+   sink(1, argv + argc - 1, src);
(void) close(remin);
remin = remout = -1;
}
@@ -967,7 +973,7 @@ rsource(char *name, struct stat *statp)
 (sizeof(type) != 4 && sizeof(type) != 8))
 
 void
-sink(int argc, char **argv)
+sink(int argc, char **argv, const char *src)
 {
static BUF buffer;
struct stat stb;
@@ -983,6 +989,7 @@ sink(int argc, char **argv)
unsigned long long ull;
int setimes, targisdir, wrerrno = 0;
char ch, *cp, *np, *targ, *why, *vect[1], buf[2048], visbuf[2048];
+   char *src_copy = NULL, *restrict_pattern = NULL;
struct timeval tv[2];
 
 #defineatime   tv[0]
@@ -1007,6 +1014,17 @@ sink(int argc, char **argv)
(void) atomicio(vwrite, remout, "", 1);
if (stat(targ, ) == 0 && S_ISDIR(stb.st_mode))
targisdir = 1;
+   if (src != NULL && !iamrecursive && !Tflag) {
+   /*
+* Prepare to try to restrict incoming filenames to match
+* the requested destination file glob.
+*/
+

svn commit: r343774 - in vendor-crypto/openssh/dist: . contrib/redhat contrib/suse openbsd-compat regress regress/misc/fuzz-harness regress/unittests/sshkey regress/unittests/sshkey/testdata regres...

2019-02-05 Thread Dag-Erling Smørgrav
Author: des
Date: Tue Feb  5 15:03:53 2019
New Revision: 343774
URL: https://svnweb.freebsd.org/changeset/base/343774

Log:
  Vendor import of OpenSSH 7.9p1.

Added:
  vendor-crypto/openssh/dist/regress/misc/fuzz-harness/authopt_fuzz.cc
  vendor-crypto/openssh/dist/regress/unittests/sshkey/testdata/rsa_1_sha1
  
vendor-crypto/openssh/dist/regress/unittests/sshkey/testdata/rsa_1_sha1-cert.pub
  vendor-crypto/openssh/dist/regress/unittests/sshkey/testdata/rsa_1_sha1.pub
  vendor-crypto/openssh/dist/regress/unittests/sshkey/testdata/rsa_1_sha512
  
vendor-crypto/openssh/dist/regress/unittests/sshkey/testdata/rsa_1_sha512-cert.pub
  vendor-crypto/openssh/dist/regress/unittests/sshkey/testdata/rsa_1_sha512.pub
Modified:
  vendor-crypto/openssh/dist/.depend
  vendor-crypto/openssh/dist/.skipped-commit-ids
  vendor-crypto/openssh/dist/ChangeLog
  vendor-crypto/openssh/dist/Makefile.in
  vendor-crypto/openssh/dist/PROTOCOL
  vendor-crypto/openssh/dist/PROTOCOL.krl
  vendor-crypto/openssh/dist/PROTOCOL.mux
  vendor-crypto/openssh/dist/README
  vendor-crypto/openssh/dist/auth-options.c
  vendor-crypto/openssh/dist/auth-passwd.c
  vendor-crypto/openssh/dist/auth.c
  vendor-crypto/openssh/dist/auth2-hostbased.c
  vendor-crypto/openssh/dist/auth2-pubkey.c
  vendor-crypto/openssh/dist/authfile.c
  vendor-crypto/openssh/dist/channels.c
  vendor-crypto/openssh/dist/channels.h
  vendor-crypto/openssh/dist/clientloop.c
  vendor-crypto/openssh/dist/config.h.in
  vendor-crypto/openssh/dist/configure
  vendor-crypto/openssh/dist/configure.ac
  vendor-crypto/openssh/dist/contrib/redhat/openssh.spec
  vendor-crypto/openssh/dist/contrib/suse/openssh.spec
  vendor-crypto/openssh/dist/dh.c
  vendor-crypto/openssh/dist/groupaccess.c
  vendor-crypto/openssh/dist/kexgexs.c
  vendor-crypto/openssh/dist/krl.c
  vendor-crypto/openssh/dist/krl.h
  vendor-crypto/openssh/dist/misc.c
  vendor-crypto/openssh/dist/misc.h
  vendor-crypto/openssh/dist/moduli
  vendor-crypto/openssh/dist/mux.c
  vendor-crypto/openssh/dist/myproposal.h
  vendor-crypto/openssh/dist/nchan.c
  vendor-crypto/openssh/dist/openbsd-compat/bsd-asprintf.c
  vendor-crypto/openssh/dist/openbsd-compat/bsd-misc.c
  vendor-crypto/openssh/dist/openbsd-compat/openssl-compat.c
  vendor-crypto/openssh/dist/openbsd-compat/port-linux.c
  vendor-crypto/openssh/dist/openbsd-compat/port-uw.c
  vendor-crypto/openssh/dist/openbsd-compat/setproctitle.c
  vendor-crypto/openssh/dist/openbsd-compat/xcrypt.c
  vendor-crypto/openssh/dist/readconf.c
  vendor-crypto/openssh/dist/readconf.h
  vendor-crypto/openssh/dist/regress/README.regress
  vendor-crypto/openssh/dist/regress/krl.sh
  vendor-crypto/openssh/dist/regress/misc/fuzz-harness/Makefile
  vendor-crypto/openssh/dist/regress/unittests/sshkey/common.c
  vendor-crypto/openssh/dist/regress/unittests/sshkey/mktestdata.sh
  vendor-crypto/openssh/dist/regress/unittests/sshkey/test_file.c
  vendor-crypto/openssh/dist/regress/unittests/sshkey/test_sshkey.c
  vendor-crypto/openssh/dist/regress/unittests/test_helper/fuzz.c
  vendor-crypto/openssh/dist/regress/unittests/test_helper/test_helper.c
  vendor-crypto/openssh/dist/sandbox-seccomp-filter.c
  vendor-crypto/openssh/dist/scp.0
  vendor-crypto/openssh/dist/scp.1
  vendor-crypto/openssh/dist/scp.c
  vendor-crypto/openssh/dist/servconf.c
  vendor-crypto/openssh/dist/servconf.h
  vendor-crypto/openssh/dist/session.c
  vendor-crypto/openssh/dist/session.h
  vendor-crypto/openssh/dist/sftp-common.c
  vendor-crypto/openssh/dist/sftp.0
  vendor-crypto/openssh/dist/sftp.1
  vendor-crypto/openssh/dist/sftp.c
  vendor-crypto/openssh/dist/ssh-add.c
  vendor-crypto/openssh/dist/ssh-keygen.0
  vendor-crypto/openssh/dist/ssh-keygen.1
  vendor-crypto/openssh/dist/ssh-keygen.c
  vendor-crypto/openssh/dist/ssh.0
  vendor-crypto/openssh/dist/ssh.1
  vendor-crypto/openssh/dist/ssh.c
  vendor-crypto/openssh/dist/ssh_config.0
  vendor-crypto/openssh/dist/ssh_config.5
  vendor-crypto/openssh/dist/sshconnect.c
  vendor-crypto/openssh/dist/sshconnect2.c
  vendor-crypto/openssh/dist/sshd.c
  vendor-crypto/openssh/dist/sshd_config.0
  vendor-crypto/openssh/dist/sshd_config.5
  vendor-crypto/openssh/dist/sshkey.c
  vendor-crypto/openssh/dist/sshkey.h
  vendor-crypto/openssh/dist/version.h

Modified: vendor-crypto/openssh/dist/.depend
==
--- vendor-crypto/openssh/dist/.depend  Tue Feb  5 13:48:26 2019
(r343773)
+++ vendor-crypto/openssh/dist/.depend  Tue Feb  5 15:03:53 2019
(r343774)
@@ -83,8 +83,8 @@ match.o: includes.h config.h defines.h platform.h open
 md5crypt.o: includes.h config.h defines.h platform.h 
openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h 
openbsd-compat/readpassphrase.h openbsd-compat/vis.h 
openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h 
openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h 
openbsd-compat/getopt.h 

Re: svn commit: r325728 - head/lib/libkvm

2019-02-05 Thread Ed Maste
On Tue, 5 Feb 2019 at 05:17, Bruce Evans  wrote:
>
> On Mon, 4 Feb 2019, Ed Maste wrote:
>
> > On Sat, 11 Nov 2017 at 18:31, Will Andrews  wrote:
> >>
> >> Author: will
> >> Date: Sat Nov 11 23:30:58 2017
> >> New Revision: 325728
> >> URL: https://svnweb.freebsd.org/changeset/base/325728
> >>
> >> Log:
> >>   libkvm: add kvm_walk_pages API.

(Replying here only to the comments on the issues I brought up.)

>>> +   u_long paddr;
>
> Further pollution in the type and struct member names.  Further misformatting
>
> The include of sys/_types.h was apparently changed to sys/types.h to support
> using u_long.

If we change the types then we can presumably revert that part.

> > This should probably be uin64_t to support cross-debugging cores from
> > 64-bit machines on 32-bit hosts; also for i386 PAE. Or, on IRC jhb
> > suggested we introduce a kpaddr_t typedef akin to kvaddr_t.
>
> The correct type is vm_paddr_t or maybe a kvm wrapper of this.

That precludes cross-arch and cross-size use of kvm_walk_pages; kvm
supports this use (see kvm_read2) so it should be a 64-bit kvm
wrapper.

> >> +   u_long kmap_vaddr;
> >> +   u_long dmap_vaddr;
> >
> > These two should be kvaddr_t.
>
> Further pollution and style bugs in names, types and formatting.

Somewhat difficult to change now though... but what about:

struct kvm_page {
u_int kp_version;
kpaddr_t kp_paddr;
kvaddr_t kp_kmap_vaddr;
kvaddr_t kp_dmap_vaddr;
vm_prot_t kp_prot;
off_t kp_offset;
size_t kp_len;
};

> [kvaddr_t] is currently hard-coded as __uint64_t.  That works for all 
> supported
> arches now, but eventually some typedefs will actually be needed for their
> purpose of being implementation-depended and changeable.

Except that these should be MI for cross-debugging.

> >> +   vm_prot_t prot;
> >> +   u_long offset;
> >
> > off_t?
>
> Further pollution and style bugs in names, types and formatting.
>
> Maybe uoff_t.  off_t is 64-bits signed so can't reach most kernel addresses
> on some 64-bit arches like amd64.

I believe the offset here is the offset of the page in the vmcore
file, so off_t should be appropriate.

> >> +   size_t len;
>
> Further pollution and style bugs 1 name and formatting.

Off hand I'm not sure of the appropriate type for a MI size; in
practice now though this len will be page size.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r343775 - vendor-crypto/openssh/7.9p1

2019-02-05 Thread Dag-Erling Smørgrav
Author: des
Date: Tue Feb  5 15:04:28 2019
New Revision: 343775
URL: https://svnweb.freebsd.org/changeset/base/343775

Log:
  Tag OpenSSH 7.9p1.

Added:
  vendor-crypto/openssh/7.9p1/
 - copied from r343774, vendor-crypto/openssh/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: r343773 - stable/12/usr.bin/fortune/datfiles

2019-02-05 Thread Benedict Reuschling
Author: bcr (doc committer)
Date: Tue Feb  5 13:48:26 2019
New Revision: 343773
URL: https://svnweb.freebsd.org/changeset/base/343773

Log:
  MFC r343532:
  A few corrections and clarifications to r343406.
  
  - Use "in" instead of "on" when referring to directory and UFS partition.
  - Switch from hw.physmem to hw.realmem and add a description to
  distinguish the two.
  - Explain why the "df" command is having trouble displaying ZFS sizes
  correctly. Add a bit more descriptive text to help why the output of
  "zfs list -o space" should be used.
  - Switch to vmstat instead of iostat display for systat(1) as it shows
  more information on one screen. Describe what is displayed based on the
  text of the man page. Change the list of the other values accordingly.
  - Sort the flags to "zfs destroy" alphabetically.
  
  Reviewed by:  rgrimes
  Approved by:  rgrimes
  Differential Revision:https://reviews.freebsd.org/D18993

Modified:
  stable/12/usr.bin/fortune/datfiles/freebsd-tips
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/usr.bin/fortune/datfiles/freebsd-tips
==
--- stable/12/usr.bin/fortune/datfiles/freebsd-tips Tue Feb  5 12:10:48 
2019(r343772)
+++ stable/12/usr.bin/fortune/datfiles/freebsd-tips Tue Feb  5 13:48:26 
2019(r343773)
@@ -275,7 +275,7 @@ To see how much disk space is left on your UFS partiti
df -h
-- Dru 
 %
-To see the 10 largest files on a directory or UFS partition, use
+To see the 10 largest files in a directory or on a UFS partition, use
 
du -h /partition_or_directory_name | sort -rh | head
-- Dru 
@@ -560,31 +560,38 @@ curl -v -d "nickname=$USER" -d "description=FreeBSD/$(
 $(kenv smbios.system.maker) $(kenv smbios.system.product)" -d "do=addd" \
 --data-urlencode 'dmesg@/var/run/dmesg.boot' http://dmesgd.nycbug.org/index.cgi
 %
-Want to know how much memory (in bytes) your machine has available? Let
+Want to know how much memory (in bytes) your machine has installed? Let
 sysctl(8) tell you with the following command:
 
-sysctl hw.physmem
+sysctl hw.realmem
 
+The realmem value is memory before the kernel and modules are loaded, whereas
+hw.physmem is what is left after they were loaded. 
+
 The number of active CPUs is displayed using this command:
 
 sysctl hw.ncpu
 
-- Benedict Reuschling 
 %
-When using ZFS as the file system the "df" command will display confusing 
-values. Use the built-in "zfs list" command to get an overview of space usage:
+When using ZFS as the file system the "df" command is reporting the pool size
+and not file system sizes. It also does not know about descendent ZFS
+datasets, snapshots, quotas, and reservations with their individual space 
usage. 
+Use the built-in "zfs list" command to get a better overview of space usage:
 
 zfs list -o space
 
-- Benedict Reuschling 
 %
 To learn more about what your system is doing, take a look at systat(1). For
-example, to get an overview of I/O happening in the system, run:
+example, to get various of statistics related to virtual memory usage, process
+scheduling, device interrupts, system name translation caching, and disk I/O,
+enter the following:
 
-systat -iostat
+systat -vmstat
 
-Other values are icmp, icmp6, ifstat, ip, ip6, netstat, pigs, sctp, swap, tcp,
-vmstat, or zarc. You can switch between displays using : and exit
+Other values are icmp, icmp6, ifstat, iostat, ip, ip6, netstat, pigs, sctp,
+swap, tcp, or zarc. You can switch between displays using : and exit
 back to your shell by typing
 
 :quit
@@ -694,7 +701,7 @@ dataset/snapshot and not any dependent ones. ZFS will 
 action when -n is combined with the -v option without actually performing
 it:
 
-zfs destroy -rvn mypool@mysnap
+zfs destroy -nrv mypool@mysnap
 
 Once you are sure this is exactly what you intend to do, remove the -n
 parameter to execute the destroy operation.
___
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: r343772 - head/sys/dev/netmap

2019-02-05 Thread Vincenzo Maffione
Author: vmaffione
Date: Tue Feb  5 12:10:48 2019
New Revision: 343772
URL: https://svnweb.freebsd.org/changeset/base/343772

Log:
  netmap: refactor logging macros and pipes
  
  Changelist:
  - Replace ND, D and RD macros with nm_prdis, nm_prinf, nm_prerr
and nm_prlim, to avoid possible naming conflicts.
  - Add netmap_krings_mode_commit() helper function and use that
to reduce code duplication.
  - Refactor pipes control code to export some functions that
can be reused by the veth driver (on Linux) and epair(4).
  - Add check to reject API requests with version less than 11.
  - Small code refactoring for the null adapter.
  
  MFC after:1 week

Modified:
  head/sys/dev/netmap/if_ptnet.c
  head/sys/dev/netmap/if_vtnet_netmap.h
  head/sys/dev/netmap/netmap.c
  head/sys/dev/netmap/netmap_bdg.c
  head/sys/dev/netmap/netmap_freebsd.c
  head/sys/dev/netmap/netmap_generic.c
  head/sys/dev/netmap/netmap_kern.h
  head/sys/dev/netmap/netmap_legacy.c
  head/sys/dev/netmap/netmap_mem2.c
  head/sys/dev/netmap/netmap_monitor.c
  head/sys/dev/netmap/netmap_null.c
  head/sys/dev/netmap/netmap_offloadings.c
  head/sys/dev/netmap/netmap_pipe.c
  head/sys/dev/netmap/netmap_vale.c

Modified: head/sys/dev/netmap/if_ptnet.c
==
--- head/sys/dev/netmap/if_ptnet.c  Tue Feb  5 10:33:22 2019
(r343771)
+++ head/sys/dev/netmap/if_ptnet.c  Tue Feb  5 12:10:48 2019
(r343772)
@@ -1151,10 +1151,10 @@ ptnet_sync_from_csb(struct ptnet_softc *sc, struct net
kring->nr_hwtail = kring->rtail =
kring->ring->tail = ktoa->hwtail;
 
-   ND("%d,%d: csb {hc %u h %u c %u ht %u}", t, i,
+   nm_prdis("%d,%d: csb {hc %u h %u c %u ht %u}", t, i,
   ktoa->hwcur, atok->head, atok->cur,
   ktoa->hwtail);
-   ND("%d,%d: kring {hc %u rh %u rc %u h %u c %u ht %u rt %u t 
%u}",
+   nm_prdis("%d,%d: kring {hc %u rh %u rc %u h %u c %u ht %u rt %u 
t %u}",
   t, i, kring->nr_hwcur, kring->rhead, kring->rcur,
   kring->ring->head, kring->ring->cur, kring->nr_hwtail,
   kring->rtail, kring->ring->tail);
@@ -1179,7 +1179,6 @@ ptnet_nm_register(struct netmap_adapter *na, int onoff
struct ptnet_softc *sc = if_getsoftc(ifp);
int native = (na == >ptna->hwup.up);
struct ptnet_queue *pq;
-   enum txrx t;
int ret = 0;
int i;
 
@@ -1194,7 +1193,7 @@ ptnet_nm_register(struct netmap_adapter *na, int onoff
 * in the RX rings, since we will not receive further interrupts
 * until these will be processed. */
if (native && !onoff && na->active_fds == 0) {
-   D("Exit netmap mode, re-enable interrupts");
+   nm_prinf("Exit netmap mode, re-enable interrupts");
for (i = 0; i < sc->num_rings; i++) {
pq = sc->queues + i;
pq->atok->appl_need_kick = 1;
@@ -1230,30 +1229,14 @@ ptnet_nm_register(struct netmap_adapter *na, int onoff
/* If not native, don't call nm_set_native_flags, since we 
don't want
 * to replace if_transmit method, nor set NAF_NETMAP_ON */
if (native) {
-   for_rx_tx(t) {
-   for (i = 0; i <= nma_get_nrings(na, t); i++) {
-   struct netmap_kring *kring = NMR(na, 
t)[i];
-
-   if (nm_kring_pending_on(kring)) {
-   kring->nr_mode = NKR_NETMAP_ON;
-   }
-   }
-   }
+   netmap_krings_mode_commit(na, onoff);
nm_set_native_flags(na);
}
 
} else {
if (native) {
nm_clear_native_flags(na);
-   for_rx_tx(t) {
-   for (i = 0; i <= nma_get_nrings(na, t); i++) {
-   struct netmap_kring *kring = NMR(na, 
t)[i];
-
-   if (nm_kring_pending_off(kring)) {
-   kring->nr_mode = NKR_NETMAP_OFF;
-   }
-   }
-   }
+   netmap_krings_mode_commit(na, onoff);
}
 
if (sc->ptna->backend_users == 0) {
@@ -1728,7 +1711,7 @@ ptnet_drain_transmit_queue(struct ptnet_queue *pq, uns
 
if (!PTNET_Q_TRYLOCK(pq)) {
/* We failed to acquire the lock, schedule the taskqueue. */
-   RD(1, "Deferring TX work");
+   nm_prlim(1, "Deferring TX work");
if (may_resched) {

svn commit: r343771 - stable/11/sys/dev/netmap

2019-02-05 Thread Vincenzo Maffione
Author: vmaffione
Date: Tue Feb  5 10:33:22 2019
New Revision: 343771
URL: https://svnweb.freebsd.org/changeset/base/343771

Log:
  netmap: small cleanup on em, lem, igb, ixgbe
  
  Replace D, ND and RD macros with the corresponding nm_pr* ones.

Modified:
  stable/11/sys/dev/netmap/if_em_netmap.h
  stable/11/sys/dev/netmap/if_igb_netmap.h
  stable/11/sys/dev/netmap/if_lem_netmap.h
  stable/11/sys/dev/netmap/ixgbe_netmap.h

Modified: stable/11/sys/dev/netmap/if_em_netmap.h
==
--- stable/11/sys/dev/netmap/if_em_netmap.h Tue Feb  5 10:29:31 2019
(r343770)
+++ stable/11/sys/dev/netmap/if_em_netmap.h Tue Feb  5 10:33:22 2019
(r343771)
@@ -188,8 +188,8 @@ em_netmap_txsync(struct netmap_kring *kring, int flags
if (flags & NAF_FORCE_RECLAIM || nm_kr_txempty(kring)) {
/* record completed transmissions using TDH */
nic_i = E1000_READ_REG(>hw, E1000_TDH(kring->ring_id));
-   if (nic_i >= kring->nkr_num_slots) { /* XXX can it happen ? */
-   D("TDH wrap %d", nic_i);
+   if (unlikely(nic_i >= kring->nkr_num_slots)) {
+   nm_prerr("TDH wrap at idx %d", nic_i);
nic_i -= kring->nkr_num_slots;
}
if (nic_i != txr->next_to_clean) {

Modified: stable/11/sys/dev/netmap/if_igb_netmap.h
==
--- stable/11/sys/dev/netmap/if_igb_netmap.hTue Feb  5 10:29:31 2019
(r343770)
+++ stable/11/sys/dev/netmap/if_igb_netmap.hTue Feb  5 10:33:22 2019
(r343771)
@@ -172,8 +172,8 @@ igb_netmap_txsync(struct netmap_kring *kring, int flag
if (flags & NAF_FORCE_RECLAIM || nm_kr_txempty(kring)) {
/* record completed transmissions using TDH */
nic_i = E1000_READ_REG(>hw, E1000_TDH(kring->ring_id));
-   if (nic_i >= kring->nkr_num_slots) { /* XXX can it happen ? */
-   D("TDH wrap %d", nic_i);
+   if (unlikely(nic_i >= kring->nkr_num_slots)) {
+   nm_prerr("TDH wrap at idx %d", nic_i);
nic_i -= kring->nkr_num_slots;
}
txr->next_to_clean = nic_i;

Modified: stable/11/sys/dev/netmap/if_lem_netmap.h
==
--- stable/11/sys/dev/netmap/if_lem_netmap.hTue Feb  5 10:29:31 2019
(r343770)
+++ stable/11/sys/dev/netmap/if_lem_netmap.hTue Feb  5 10:33:22 2019
(r343771)
@@ -172,8 +172,8 @@ lem_netmap_txsync(struct netmap_kring *kring, int flag
kring->last_reclaim = ticks;
/* record completed transmissions using TDH */
nic_i = E1000_READ_REG(>hw, E1000_TDH(0));
-   if (nic_i >= kring->nkr_num_slots) { /* XXX can it happen ? */
-   D("TDH wrap %d", nic_i);
+   if (unlikely(nic_i >= kring->nkr_num_slots)) {
+   nm_prerr("TDH wrap at idx %d", nic_i);
nic_i -= kring->nkr_num_slots;
}
adapter->next_tx_to_clean = nic_i;
@@ -226,7 +226,7 @@ lem_netmap_rxsync(struct netmap_kring *kring, int flag
break;
len = le16toh(curr->length) - 4; // CRC
if (len < 0) {
-   RD(5, "bogus pkt (%d) size %d nic idx %d", n, 
len, nic_i);
+   nm_prlim(2, "bogus pkt (%d) size %d nic idx 
%d", n, len, nic_i);
len = 0;
}
ring->slot[nm_i].len = len;
@@ -238,7 +238,7 @@ lem_netmap_rxsync(struct netmap_kring *kring, int flag
nic_i = nm_next(nic_i, lim);
}
if (n) { /* update the state variables */
-   ND("%d new packets at nic %d nm %d tail %d",
+   nm_prdis("%d new packets at nic %d nm %d tail %d",
n,
adapter->next_rx_desc_to_check,
netmap_idx_n2k(kring, 
adapter->next_rx_desc_to_check),

Modified: stable/11/sys/dev/netmap/ixgbe_netmap.h
==
--- stable/11/sys/dev/netmap/ixgbe_netmap.h Tue Feb  5 10:29:31 2019
(r343770)
+++ stable/11/sys/dev/netmap/ixgbe_netmap.h Tue Feb  5 10:33:22 2019
(r343771)
@@ -88,7 +88,7 @@ set_crcstrip(struct ixgbe_hw *hw, int onoff)
hl = IXGBE_READ_REG(hw, IXGBE_HLREG0);
rxc = IXGBE_READ_REG(hw, IXGBE_RDRXCTL);
if (netmap_verbose)
-   D("%s read  HLREG 0x%x rxc 0x%x",
+   nm_prinf("%s read  HLREG 0x%x rxc 0x%x",
onoff ? "enter" : 

svn commit: r343770 - head/sys/netinet

2019-02-05 Thread Michael Tuexen
Author: tuexen
Date: Tue Feb  5 10:29:31 2019
New Revision: 343770
URL: https://svnweb.freebsd.org/changeset/base/343770

Log:
  Only reduce the PMTU after the send call. The only way to increase it, is
  via PMTUD.
  
  This fixes an MTU issue reported by Timo Voelker.
  
  MFC after:3 days

Modified:
  head/sys/netinet/sctp_output.c

Modified: head/sys/netinet/sctp_output.c
==
--- head/sys/netinet/sctp_output.c  Tue Feb  5 10:13:51 2019
(r343769)
+++ head/sys/netinet/sctp_output.c  Tue Feb  5 10:29:31 2019
(r343770)
@@ -4289,10 +4289,12 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp,
if (net->port) {
mtu -= sizeof(struct 
udphdr);
}
-   if ((stcb != NULL) && 
(stcb->asoc.smallest_mtu > mtu)) {
-   
sctp_mtu_size_reset(inp, >asoc, mtu);
+   if (mtu < net->mtu) {
+   if ((stcb != NULL) && 
(stcb->asoc.smallest_mtu > mtu)) {
+   
sctp_mtu_size_reset(inp, >asoc, mtu);
+   }
+   net->mtu = mtu;
}
-   net->mtu = mtu;
}
} else if (ro->ro_rt == NULL) {
/* route was freed */
@@ -4647,10 +4649,12 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp,
if (net->port) {
mtu -= sizeof(struct 
udphdr);
}
-   if ((stcb != NULL) && 
(stcb->asoc.smallest_mtu > mtu)) {
-   
sctp_mtu_size_reset(inp, >asoc, mtu);
+   if (mtu < net->mtu) {
+   if ((stcb != NULL) && 
(stcb->asoc.smallest_mtu > mtu)) {
+   
sctp_mtu_size_reset(inp, >asoc, mtu);
+   }
+   net->mtu = mtu;
}
-   net->mtu = mtu;
}
} else if (ifp) {
if (ND_IFINFO(ifp)->linkmtu &&
___
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: r325728 - head/lib/libkvm

2019-02-05 Thread Bruce Evans

On Mon, 4 Feb 2019, Ed Maste wrote:


On Sat, 11 Nov 2017 at 18:31, Will Andrews  wrote:


Author: will
Date: Sat Nov 11 23:30:58 2017
New Revision: 325728
URL: https://svnweb.freebsd.org/changeset/base/325728

Log:
  libkvm: add kvm_walk_pages API.

Modified: head/lib/libkvm/kvm.h
==
--- head/lib/libkvm/kvm.h   Sat Nov 11 22:50:14 2017(r325727)
+++ head/lib/libkvm/kvm.h   Sat Nov 11 23:30:58 2017(r325728)
@@ -36,6 +36,7 @@
 #include 


Redundant.  sys/types.h already includes this (more than once via nesting),
and it is OK to depend on this, especially since sys/types.h depends on it
much more than this header.


 #include 


Namespace pollution.  Old versions were carefully written to not have this.
They didn't use pollution like u_long, and included only 


 #include 


Namespace pollution.  Old versions have this.  I fixed this in my version
15-20 years ago:

XX Index: kvm.h
XX ===
XX RCS file: /home/ncvs/src/lib/libkvm/kvm.h,v
XX retrieving revision 1.16
XX diff -u -2 -r1.16 kvm.h
XX --- kvm.h13 Oct 2003 04:44:55 -  1.16
XX +++ kvm.h13 Oct 2003 04:46:29 -
XX @@ -40,5 +40,4 @@
XX  #include 
XX  #include 
XX -#include 
XX 
XX  /* Default version symbol. */

XX @@ -59,4 +58,5 @@
XX 
XX  struct kinfo_proc;

XX +struct nlist;
XX  struct proc;


+#include 


Larger, newer namespace pollution.



 /* Default version symbol. */
 #defineVRS_SYM "_version"
@@ -73,7 +74,19 @@ struct kvm_swap {
u_int   ksw_reserved2;
 };

+struct kvm_page {
+   unsigned int version;


This would be a style bug if the namespace pollution is allowed.  'unsigned
int' is spelled u_int in the kernel and in system headers and files.  But
portable ones can't use it.

The struct member name is also namespace pollution and a style bug.
'version' is in the application namespace and is especially likely
to be used in applications, perhaps to #define it.  Old structs in
this header are careful to use a prefix for names.  Unfortunately, the
prefix in the one struct was ksw which is not obviousy related to kvm.
Even the prefix kvm_ is not documented as being reserved in kvm(3).

There was already massive breakage in this area:
- old versions have the struct tags kinfo_proc and proc, and much more in
  the nlist include, but the above fix reduces this to a another struct
  tag.
- the previous version has a private declaration of vm_prot_t to avoid
  the pollution of including vm/vm.h.  This is nonsense now.
- VRS_SYM and VRS_KEY are in the application namespace, and their names
  don't even give a hint that they are for kvm
- member names n_* in struct kvm_nlist gives some of the pollution fixed
  by not including nlist.h
- the type of the struct members in struct kvm_swap rotted from int to
  u_int
- u_int for the name of type of the struct members in struct kvm_swap is
  pollution that is still carefully avoided in old parts of the file
- the struct member names in struct kvm_page are in the apolication
  namespace
- the struct member declarations in struct kvm_page are misformatted.
  They mostly use the pollution u_long, but one uses the verbose "unsigned
  int".  The shorted type names can be formatted better
- SWIF_DEV_PREFIX and LIBKVM_WALK_PAGES_VERSION are in the application
  namespace.  The latter at least gives a hint that it is for vm
- the prototype for kvm_counter_u64_fetch() uses u_long.  Old prototypes
  are more careful
- the declarations for kvm_walk_pages* are misformatted and unsorted.


+   u_long paddr;


Further pollution in the type and struct member names.  Further misformatting

The include of sys/_types.h was apparently changed to sys/types.h to support
using u_long.


This should probably be uin64_t to support cross-debugging cores from
64-bit machines on 32-bit hosts; also for i386 PAE. Or, on IRC jhb
suggested we introduce a kpaddr_t typedef akin to kvaddr_t.


The correct type is vm_paddr_t or maybe a kvm wrapper of this.

kib just changed vm_paddr_t on i386.  I don't like this (it gives another
pessimization of i386) and it depends on a kernel option in my version.
Applications can't use this kernel option so would have to use their own
larger type.  Even uint64_t might be too small.  Hard-coding it is worse
than hard-coding unsigned long.




+   u_long kmap_vaddr;
+   u_long dmap_vaddr;


These two should be kvaddr_t.


Further pollution and style bugs in names, types and formatting.

The implementation of this is another bug.  It is declared in sys/types.h,
so application headers like kvm.h can't use it without including lots of
pollution.  Maybe getting it was the original reason for changing the
included and the pollution and style bugs from using u_long is bitrot.

It is currently hard-coded as __uint64_t.  That works for all supported
arches now, but eventually some typedefs will 

svn commit: r343769 - head/sys/netinet

2019-02-05 Thread Michael Tuexen
Author: tuexen
Date: Tue Feb  5 10:13:51 2019
New Revision: 343769
URL: https://svnweb.freebsd.org/changeset/base/343769

Log:
  Fix an off-by-one error in the input validation of the SCTP_RESET_STREAMS
  socketoption.
  
  This was found by running syzkaller.
  
  MFC after:3 days

Modified:
  head/sys/netinet/sctp_usrreq.c

Modified: head/sys/netinet/sctp_usrreq.c
==
--- head/sys/netinet/sctp_usrreq.c  Tue Feb  5 08:15:19 2019
(r343768)
+++ head/sys/netinet/sctp_usrreq.c  Tue Feb  5 10:13:51 2019
(r343769)
@@ -4654,13 +4654,13 @@ sctp_setopt(struct socket *so, int optname, void *optv
}
for (i = 0; i < strrst->srs_number_streams; i++) {
if ((send_in) &&
-   (strrst->srs_stream_list[i] > 
stcb->asoc.streamincnt)) {
+   (strrst->srs_stream_list[i] >= 
stcb->asoc.streamincnt)) {
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, 
SCTP_FROM_SCTP_USRREQ, EINVAL);
error = EINVAL;
break;
}
if ((send_out) &&
-   (strrst->srs_stream_list[i] > 
stcb->asoc.streamoutcnt)) {
+   (strrst->srs_stream_list[i] >= 
stcb->asoc.streamoutcnt)) {
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, 
SCTP_FROM_SCTP_USRREQ, EINVAL);
error = EINVAL;
break;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r343767 - vendor-crypto/openssh/dist

2019-02-05 Thread Dag-Erling Smørgrav
Author: des
Date: Tue Feb  5 08:10:36 2019
New Revision: 343767
URL: https://svnweb.freebsd.org/changeset/base/343767

Log:
  Merge upstream 2c21b75a7be6ebdcbceaebb43157c48dbb36f3d8:
  
  | scp: add -T to usage();
  |
  | OpenBSD-Commit-ID: a7ae14d9436c64e1bd05022329187ea3a0ce1899

Modified:
  vendor-crypto/openssh/dist/scp.c

Modified: vendor-crypto/openssh/dist/scp.c
==
--- vendor-crypto/openssh/dist/scp.cTue Feb  5 08:07:56 2019
(r343766)
+++ vendor-crypto/openssh/dist/scp.cTue Feb  5 08:10:36 2019
(r343767)
@@ -1,4 +1,4 @@
-/* $OpenBSD: scp.c,v 1.202 2019/01/26 22:41:28 djm Exp $ */
+/* $OpenBSD: scp.c,v 1.203 2019/01/27 07:14:11 jmc Exp $ */
 /*
  * scp - secure remote copy.  This is basically patched BSD rcp which
  * uses ssh to do the data transfer (instead of using rcmd).
@@ -1336,7 +1336,7 @@ void
 usage(void)
 {
(void) fprintf(stderr,
-   "usage: scp [-346BCpqrv] [-c cipher] [-F ssh_config] [-i 
identity_file]\n"
+   "usage: scp [-346BCpqrTv] [-c cipher] [-F ssh_config] [-i 
identity_file]\n"
"   [-l limit] [-o ssh_option] [-P port] [-S program] 
source ... target\n");
exit(1);
 }
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r343766 - vendor-crypto/openssh/dist

2019-02-05 Thread Dag-Erling Smørgrav
Author: des
Date: Tue Feb  5 08:07:56 2019
New Revision: 343766
URL: https://svnweb.freebsd.org/changeset/base/343766

Log:
  Merge upstream 391ffc4b9d31fa1f4ad566499fef9176ff8a07dc:
  
  | remote->local directory copies satisfy the wildcard specified by the user.
  |
  | This checking provides some protection against a malicious server
  | sending unexpected filenames, but it comes at a risk of rejecting wanted
  | files due to differences between client and server wildcard expansion rules.
  |
  | For this reason, this also adds a new -T flag to disable the check.
  |
  | reported by Harry Sintonen
  | fix approach suggested by markus@;
  | has been in snaps for ~1wk courtesy deraadt@
  |
  | OpenBSD-Commit-ID: 00f44b50d2be8e321973f3c6d014260f8f7a8eda

Modified:
  vendor-crypto/openssh/dist/scp.1
  vendor-crypto/openssh/dist/scp.c

Modified: vendor-crypto/openssh/dist/scp.1
==
--- vendor-crypto/openssh/dist/scp.1Tue Feb  5 08:05:42 2019
(r343765)
+++ vendor-crypto/openssh/dist/scp.1Tue Feb  5 08:07:56 2019
(r343766)
@@ -18,7 +18,7 @@
 .Nd secure copy (remote file copy program)
 .Sh SYNOPSIS
 .Nm scp
-.Op Fl 346BCpqrv
+.Op Fl 346BCpqrTv
 .Op Fl c Ar cipher
 .Op Fl F Ar ssh_config
 .Op Fl i Ar identity_file
@@ -207,6 +207,16 @@ to use for the encrypted connection.
 The program must understand
 .Xr ssh 1
 options.
+.It Fl T
+Disable strict filename checking.
+By default when copying files from a remote host to a local directory
+.Nm
+checks that the received filenames match those requested on the command-line
+to prevent the remote end from sending unexpected or unwanted files.
+Because of differences in how various operating systems and shells interpret
+filename wildcards, these checks may cause wanted files to be rejected.
+This option disables these checks at the expense of fully trusting that
+the server will not send unexpected filenames.
 .It Fl v
 Verbose mode.
 Causes

Modified: vendor-crypto/openssh/dist/scp.c
==
--- vendor-crypto/openssh/dist/scp.cTue Feb  5 08:05:42 2019
(r343765)
+++ vendor-crypto/openssh/dist/scp.cTue Feb  5 08:07:56 2019
(r343766)
@@ -1,4 +1,4 @@
-/* $OpenBSD: scp.c,v 1.197 2018/06/01 04:31:48 dtucker Exp $ */
+/* $OpenBSD: scp.c,v 1.202 2019/01/26 22:41:28 djm Exp $ */
 /*
  * scp - secure remote copy.  This is basically patched BSD rcp which
  * uses ssh to do the data transfer (instead of using rcmd).
@@ -94,6 +94,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -375,14 +376,14 @@ void verifydir(char *);
 struct passwd *pwd;
 uid_t userid;
 int errs, remin, remout;
-int pflag, iamremote, iamrecursive, targetshouldbedirectory;
+int Tflag, pflag, iamremote, iamrecursive, targetshouldbedirectory;
 
 #defineCMDNEEDS64
 char cmd[CMDNEEDS];/* must hold "rcp -r -p -d\0" */
 
 int response(void);
 void rsource(char *, struct stat *);
-void sink(int, char *[]);
+void sink(int, char *[], const char *);
 void source(int, char *[]);
 void tolocal(int, char *[]);
 void toremote(int, char *[]);
@@ -421,8 +422,9 @@ main(int argc, char **argv)
addargs(, "-oRemoteCommand=none");
addargs(, "-oRequestTTY=no");
 
-   fflag = tflag = 0;
-   while ((ch = getopt(argc, argv, "dfl:prtvBCc:i:P:q12346S:o:F:")) != -1)
+   fflag = Tflag = tflag = 0;
+   while ((ch = getopt(argc, argv,
+   "dfl:prtTvBCc:i:P:q12346S:o:F:J:")) != -1) {
switch (ch) {
/* User-visible flags. */
case '1':
@@ -501,9 +503,13 @@ main(int argc, char **argv)
setmode(0, O_BINARY);
 #endif
break;
+   case 'T':
+   Tflag = 1;
+   break;
default:
usage();
}
+   }
argc -= optind;
argv += optind;
 
@@ -534,7 +540,7 @@ main(int argc, char **argv)
}
if (tflag) {
/* Receive data. */
-   sink(argc, argv);
+   sink(argc, argv, NULL);
exit(errs != 0);
}
if (argc < 2)
@@ -791,7 +797,7 @@ tolocal(int argc, char **argv)
continue;
}
free(bp);
-   sink(1, argv + argc - 1);
+   sink(1, argv + argc - 1, src);
(void) close(remin);
remin = remout = -1;
}
@@ -967,7 +973,7 @@ rsource(char *name, struct stat *statp)
 (sizeof(type) != 4 && sizeof(type) != 8))
 
 void
-sink(int argc, char **argv)
+sink(int argc, char **argv, const char *src)
 {
static BUF buffer;
struct stat stb;
@@ -983,6 +989,7 @@ sink(int argc, char **argv)
unsigned long long ull;
int setimes, targisdir, wrerrno = 0;
   

svn commit: r343765 - stable/12/usr.bin/mkimg

2019-02-05 Thread Xin LI
Author: delphij
Date: Tue Feb  5 08:05:42 2019
New Revision: 343765
URL: https://svnweb.freebsd.org/changeset/base/343765

Log:
  MFC r342813: Remove unneeded headers.

Modified:
  stable/12/usr.bin/mkimg/apm.c
  stable/12/usr.bin/mkimg/bsd.c
  stable/12/usr.bin/mkimg/ebr.c
  stable/12/usr.bin/mkimg/endian.h
  stable/12/usr.bin/mkimg/format.c
  stable/12/usr.bin/mkimg/gpt.c
  stable/12/usr.bin/mkimg/mbr.c
  stable/12/usr.bin/mkimg/qcow.c
  stable/12/usr.bin/mkimg/raw.c
  stable/12/usr.bin/mkimg/scheme.c
  stable/12/usr.bin/mkimg/uuid.c
  stable/12/usr.bin/mkimg/vhd.c
  stable/12/usr.bin/mkimg/vmdk.c
  stable/12/usr.bin/mkimg/vtoc8.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/usr.bin/mkimg/apm.c
==
--- stable/12/usr.bin/mkimg/apm.c   Tue Feb  5 06:25:35 2019
(r343764)
+++ stable/12/usr.bin/mkimg/apm.c   Tue Feb  5 08:05:42 2019
(r343765)
@@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 
 #include 
 

Modified: stable/12/usr.bin/mkimg/bsd.c
==
--- stable/12/usr.bin/mkimg/bsd.c   Tue Feb  5 06:25:35 2019
(r343764)
+++ stable/12/usr.bin/mkimg/bsd.c   Tue Feb  5 08:05:42 2019
(r343765)
@@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 
 #include 
 

Modified: stable/12/usr.bin/mkimg/ebr.c
==
--- stable/12/usr.bin/mkimg/ebr.c   Tue Feb  5 06:25:35 2019
(r343764)
+++ stable/12/usr.bin/mkimg/ebr.c   Tue Feb  5 08:05:42 2019
(r343765)
@@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 
 #include 
 

Modified: stable/12/usr.bin/mkimg/endian.h
==
--- stable/12/usr.bin/mkimg/endian.hTue Feb  5 06:25:35 2019
(r343764)
+++ stable/12/usr.bin/mkimg/endian.hTue Feb  5 08:05:42 2019
(r343765)
@@ -29,6 +29,8 @@
 #ifndef _MKIMG_ENDIAN_H_
 #define _MKIMG_ENDIAN_H_
 
+#include 
+
 static __inline uint16_t
 be16dec(const void *pp)
 {

Modified: stable/12/usr.bin/mkimg/format.c
==
--- stable/12/usr.bin/mkimg/format.cTue Feb  5 06:25:35 2019
(r343764)
+++ stable/12/usr.bin/mkimg/format.cTue Feb  5 08:05:42 2019
(r343765)
@@ -28,16 +28,11 @@
 __FBSDID("$FreeBSD$");
 
 #include 
-#include 
 #include 
-#include 
-#include 
 #include 
-#include 
 
 #include "image.h"
 #include "format.h"
-#include "mkimg.h"
 
 static struct mkimg_format *first;
 static struct mkimg_format *format;

Modified: stable/12/usr.bin/mkimg/gpt.c
==
--- stable/12/usr.bin/mkimg/gpt.c   Tue Feb  5 06:25:35 2019
(r343764)
+++ stable/12/usr.bin/mkimg/gpt.c   Tue Feb  5 08:05:42 2019
(r343765)
@@ -32,7 +32,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 
 #include 
 #include 

Modified: stable/12/usr.bin/mkimg/mbr.c
==
--- stable/12/usr.bin/mkimg/mbr.c   Tue Feb  5 06:25:35 2019
(r343764)
+++ stable/12/usr.bin/mkimg/mbr.c   Tue Feb  5 08:05:42 2019
(r343765)
@@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 
 #include 
 

Modified: stable/12/usr.bin/mkimg/qcow.c
==
--- stable/12/usr.bin/mkimg/qcow.c  Tue Feb  5 06:25:35 2019
(r343764)
+++ stable/12/usr.bin/mkimg/qcow.c  Tue Feb  5 08:05:42 2019
(r343765)
@@ -29,11 +29,9 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
-#include 
 
 #include "endian.h"
 #include "image.h"

Modified: stable/12/usr.bin/mkimg/raw.c
==
--- stable/12/usr.bin/mkimg/raw.c   Tue Feb  5 06:25:35 2019
(r343764)
+++ stable/12/usr.bin/mkimg/raw.c   Tue Feb  5 08:05:42 2019
(r343765)
@@ -28,14 +28,10 @@
 __FBSDID("$FreeBSD$");
 
 #include 
-#include 
-#include 
-#include 
 #include 
 
 #include "image.h"
 #include "format.h"
-#include "mkimg.h"
 
 static int
 raw_resize(lba_t imgsz __unused)

Modified: stable/12/usr.bin/mkimg/scheme.c
==
--- stable/12/usr.bin/mkimg/scheme.cTue Feb  5 06:25:35 2019
(r343764)
+++ stable/12/usr.bin/mkimg/scheme.cTue Feb  5 08:05:42 2019
(r343765)
@@ -29,10 +29,8 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
-#include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include