svn commit: r294969 - stable/10/sys/sys

2016-01-27 Thread Ed Maste
Author: emaste
Date: Thu Jan 28 01:45:15 2016
New Revision: 294969
URL: https://svnweb.freebsd.org/changeset/base/294969

Log:
  MFC r294530: Add STB_GNU_UNIQUE symbol binding definition
  
  Red Hat created STB_GNU_UNIQUE to handle certain special cases relating
  to dynamically loading C++ DSOs[1].
  
  We don't (currently) have support for STB_GNU_UNIQUE, but ought to
  reserve the value in ELFNN_ST_BIND. This will also be used by an
  upcoming ELF Tool Chain import.

Modified:
  stable/10/sys/sys/elf_common.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/sys/elf_common.h
==
--- stable/10/sys/sys/elf_common.h  Thu Jan 28 01:19:19 2016
(r294968)
+++ stable/10/sys/sys/elf_common.h  Thu Jan 28 01:45:15 2016
(r294969)
@@ -748,8 +748,9 @@ typedef struct {
 #defineSTB_LOCAL   0   /* Local symbol */
 #defineSTB_GLOBAL  1   /* Global symbol */
 #defineSTB_WEAK2   /* like global - lower precedence */
-#defineSTB_LOOS10  /* Reserved range for operating system 
*/
-#defineSTB_HIOS12  /*   specific semantics. */
+#defineSTB_LOOS10  /* Start of operating system reserved 
range. */
+#defineSTB_GNU_UNIQUE  10  /* Unique symbol (GNU) */
+#defineSTB_HIOS12  /* End of operating system reserved 
range. */
 #defineSTB_LOPROC  13  /* reserved range for processor */
 #defineSTB_HIPROC  15  /*   specific semantics. */
 
___
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: r294959 - in stable/10/sys: dev/uart kern sys

2016-01-27 Thread Marius Strobl
Author: marius
Date: Wed Jan 27 22:48:04 2016
New Revision: 294959
URL: https://svnweb.freebsd.org/changeset/base/294959

Log:
  MFC: r294362, r294414, r294753
  
  - Fix tty_drain() and, thus, TIOCDRAIN of the current tty(4) incarnation
to actually wait until the TX FIFOs of UARTs have be drained before
returning. This is done by bringing the equivalent of the TS_BUSY flag
found in the previous implementation back in an ABI-preserving way.
Reported and tested by: Patrick Powell
  - Make the code consistent with itself style-wise and bring it closer
to style(9).
  - Mark unused arguments as such.
  - Make the ttystates table const.

Modified:
  stable/10/sys/dev/uart/uart_tty.c
  stable/10/sys/kern/tty.c
  stable/10/sys/sys/ttydevsw.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/uart/uart_tty.c
==
--- stable/10/sys/dev/uart/uart_tty.c   Wed Jan 27 22:31:08 2016
(r294958)
+++ stable/10/sys/dev/uart/uart_tty.c   Wed Jan 27 22:48:04 2016
(r294959)
@@ -57,6 +57,16 @@ static cn_putc_t uart_cnputc;
 static cn_grab_t uart_cngrab;
 static cn_ungrab_t uart_cnungrab;
 
+static tsw_open_t uart_tty_open;
+static tsw_close_t uart_tty_close;
+static tsw_outwakeup_t uart_tty_outwakeup;
+static tsw_inwakeup_t uart_tty_inwakeup;
+static tsw_ioctl_t uart_tty_ioctl;
+static tsw_param_t uart_tty_param;
+static tsw_modem_t uart_tty_modem;
+static tsw_free_t uart_tty_free;
+static tsw_busy_t uart_tty_busy;
+
 CONSOLE_DRIVER(uart);
 
 static struct uart_devinfo uart_console;
@@ -157,7 +167,7 @@ uart_tty_close(struct tty *tp)
struct uart_softc *sc;
 
sc = tty_softc(tp);
-   if (sc == NULL || sc->sc_leaving || !sc->sc_opened) 
+   if (sc == NULL || sc->sc_leaving || !sc->sc_opened)
return;
 
if (sc->sc_hwiflow)
@@ -169,7 +179,6 @@ uart_tty_close(struct tty *tp)
 
wakeup(sc);
sc->sc_opened = 0;
-   return;
 }
 
 static void
@@ -215,7 +224,8 @@ uart_tty_inwakeup(struct tty *tp)
 }
 
 static int
-uart_tty_ioctl(struct tty *tp, u_long cmd, caddr_t data, struct thread *td)
+uart_tty_ioctl(struct tty *tp, u_long cmd, caddr_t data,
+struct thread *td __unused)
 {
struct uart_softc *sc;
 
@@ -262,8 +272,8 @@ uart_tty_param(struct tty *tp, struct te
}
stopbits = (t->c_cflag & CSTOPB) ? 2 : 1;
if (t->c_cflag & PARENB)
-   parity = (t->c_cflag & PARODD) ? UART_PARITY_ODD
-   : UART_PARITY_EVEN;
+   parity = (t->c_cflag & PARODD) ? UART_PARITY_ODD :
+   UART_PARITY_EVEN;
else
parity = UART_PARITY_NONE;
if (UART_PARAM(sc, t->c_ospeed, databits, stopbits, parity) != 0)
@@ -291,7 +301,7 @@ uart_tty_modem(struct tty *tp, int biton
 
sc = tty_softc(tp);
if (biton != 0 || bitoff != 0)
-   UART_SETSIG(sc, SER_DELTA(bitoff|biton) | biton);
+   UART_SETSIG(sc, SER_DELTA(bitoff | biton) | biton);
return (sc->sc_hwsig);
 }
 
@@ -350,7 +360,7 @@ uart_tty_intr(void *arg)
 }
 
 static void
-uart_tty_free(void *arg)
+uart_tty_free(void *arg __unused)
 {
 
/*
@@ -361,6 +371,18 @@ uart_tty_free(void *arg)
 */
 }
 
+static bool
+uart_tty_busy(struct tty *tp)
+{
+   struct uart_softc *sc;
+
+   sc = tty_softc(tp);
+   if (sc == NULL || sc->sc_leaving)
+return (FALSE);
+
+   return (sc->sc_txbusy);
+}
+
 static struct ttydevsw uart_tty_class = {
.tsw_flags  = TF_INITLOCK|TF_CALLOUT,
.tsw_open   = uart_tty_open,
@@ -371,6 +393,7 @@ static struct ttydevsw uart_tty_class = 
.tsw_param  = uart_tty_param,
.tsw_modem  = uart_tty_modem,
.tsw_free   = uart_tty_free,
+   .tsw_busy   = uart_tty_busy,
 };
 
 int

Modified: stable/10/sys/kern/tty.c
==
--- stable/10/sys/kern/tty.cWed Jan 27 22:31:08 2016(r294958)
+++ stable/10/sys/kern/tty.cWed Jan 27 22:48:04 2016(r294959)
@@ -132,11 +132,11 @@ tty_drain(struct tty *tp, int leaving)
/* buffer is inaccessible */
return (0);
 
-   while (ttyoutq_bytesused(>t_outq) > 0) {
+   while (ttyoutq_bytesused(>t_outq) > 0 || ttydevsw_busy(tp)) {
ttydevsw_outwakeup(tp);
/* Could be handled synchronously. */
bytesused = ttyoutq_bytesused(>t_outq);
-   if (bytesused == 0)
+   if (bytesused == 0 && !ttydevsw_busy(tp))
return (0);
 
/* Wait for data to be drained. */
@@ -175,6 +175,7 @@ tty_drain(struct tty *tp, int leaving)
 static __inline int
 ttydev_enter(struct tty *tp)
 {
+
tty_lock(tp);
 
if (tty_gone(tp) || !tty_opened(tp)) {
@@ -189,6 +190,7 @@ ttydev_enter(struct tty *tp)

svn commit: r294963 - in stable/10: lib/libc/gen tools/regression/posixsem2

2016-01-27 Thread Jilles Tjoelker
Author: jilles
Date: Wed Jan 27 22:56:04 2016
New Revision: 294963
URL: https://svnweb.freebsd.org/changeset/base/294963

Log:
  MFC r294565: sem: Don't free nameinfo that is still in list when open()
  fails.
  
  This bug could be reproduced easily by calling sem_open() with O_CREAT |
  O_EXCL on a semaphore that is already open in the process. The struct
  sem_nameinfo would be freed while still in sem_list and later calls to
  sem_open() or sem_close() could access freed memory.
  
  PR:   206396

Modified:
  stable/10/lib/libc/gen/sem_new.c
  stable/10/tools/regression/posixsem2/semtest.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/gen/sem_new.c
==
--- stable/10/lib/libc/gen/sem_new.cWed Jan 27 22:52:20 2016
(r294962)
+++ stable/10/lib/libc/gen/sem_new.cWed Jan 27 22:56:04 2016
(r294963)
@@ -176,8 +176,10 @@ _sem_open(const char *name, int flags, .
if (ni->name != NULL && strcmp(name, ni->name) == 0) {
fd = _open(path, flags | O_RDWR | O_CLOEXEC |
O_EXLOCK, mode);
-   if (fd == -1 || _fstat(fd, ) == -1)
+   if (fd == -1 || _fstat(fd, ) == -1) {
+   ni = NULL;
goto error;
+   }
if ((flags & (O_CREAT | O_EXCL)) == (O_CREAT |
O_EXCL) || ni->dev != sb.st_dev ||
ni->ino != sb.st_ino) {

Modified: stable/10/tools/regression/posixsem2/semtest.c
==
--- stable/10/tools/regression/posixsem2/semtest.c  Wed Jan 27 22:52:20 
2016(r294962)
+++ stable/10/tools/regression/posixsem2/semtest.c  Wed Jan 27 22:56:04 
2016(r294963)
@@ -7,6 +7,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -14,6 +15,7 @@
 
 int test_unnamed(void);
 int test_named(void);
+int test_named2(void);
 
 int
 test_unnamed(void)
@@ -94,9 +96,42 @@ test_named(void)
 }
 
 int
+test_named2(void)
+{
+   sem_t *s, *s2, *s3;
+
+   printf("testing named process-shared semaphore, O_EXCL cases\n");
+   sem_unlink(SEM_NAME);
+   s = sem_open(SEM_NAME, O_CREAT | O_EXCL, 0777, 0);
+   if (s == SEM_FAILED)
+   err(1, "sem_open failed");
+   s2 = sem_open(SEM_NAME, O_CREAT | O_EXCL, 0777, 0);
+   if (s2 != SEM_FAILED)
+   errx(2, "second sem_open call wrongly succeeded");
+   if (errno != EEXIST)
+   err(3, "second sem_open call failed with wrong errno");
+
+   s3 = sem_open(SEM_NAME, 0);
+   if (s3 == SEM_FAILED)
+   err(4, "third sem_open call failed");
+   if (s != s3)
+   errx(5,
+"two sem_open calls for same semaphore do not return same address");
+   if (sem_close(s3))
+   err(6, "sem_close failed");
+
+   if (sem_close(s))
+   err(7, "sem_close failed");
+   
+   printf("OK.\n");
+   return (0);
+}
+
+int
 main(void)
 {
test_unnamed();
test_named();
+   test_named2();
return (0);
 }
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r294961 - stable/10/sys/dev/puc

2016-01-27 Thread Marius Strobl
Author: marius
Date: Wed Jan 27 22:50:04 2016
New Revision: 294961
URL: https://svnweb.freebsd.org/changeset/base/294961

Log:
  - Add an entry for the SIIG Cyber 2SP1 PCIe adapter, which is based
on an Oxford Semiconductor OX16PCI954 but uses only two ports and
a non-default clock rate. [1]
  - Add entries for the more prominent members of the Digi International
Neo series, which are based on Exar PCI chips.
Tested by: Patrick Powell
  - Mark some unused parameters as such.
  - Fix style/whitespace
  
  PR:   176407 [1]

Modified:
  stable/10/sys/dev/puc/pucdata.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/puc/pucdata.c
==
--- stable/10/sys/dev/puc/pucdata.c Wed Jan 27 22:48:52 2016
(r294960)
+++ stable/10/sys/dev/puc/pucdata.c Wed Jan 27 22:50:04 2016
(r294961)
@@ -64,7 +64,6 @@ static puc_config_f puc_config_timedia;
 static puc_config_f puc_config_titan;
 
 const struct puc_cfg puc_pci_devices[] = {
-
{   0x0009, 0x7168, 0x, 0,
"Sunix SUN1889",
DEFAULT_RCLK * 8,
@@ -179,6 +178,55 @@ const struct puc_cfg puc_pci_devices[] =
.config_function = puc_config_amc
},
 
+   /*
+* The following members of the Digi International Neo series are
+* based on Exar PCI chips, f. e. the 8 port variants on XR17V258IV.
+* Accordingly, the PCIe versions of these cards incorporate a PLX
+* PCIe-PCI-bridge.
+*/
+
+   {   0x114f, 0x00b0, 0x, 0,
+   "Digi Neo PCI 4 Port",
+   DEFAULT_RCLK * 8,
+   PUC_PORT_4S, 0x10, 0, -1,
+   .config_function = puc_config_exar
+   },
+
+   {   0x114f, 0x00b1, 0x, 0,
+   "Digi Neo PCI 8 Port",
+   DEFAULT_RCLK * 8,
+   PUC_PORT_8S, 0x10, 0, -1,
+   .config_function = puc_config_exar
+   },
+
+   {   0x114f, 0x00f0, 0x, 0,
+   "Digi Neo PCIe 8 Port",
+   DEFAULT_RCLK * 8,
+   PUC_PORT_8S, 0x10, 0, -1,
+   .config_function = puc_config_exar
+   },
+
+   {   0x114f, 0x00f1, 0x, 0,
+   "Digi Neo PCIe 4 Port",
+   DEFAULT_RCLK * 8,
+   PUC_PORT_4S, 0x10, 0, -1,
+   .config_function = puc_config_exar
+   },
+
+   {   0x114f, 0x00f2, 0x, 0,
+   "Digi Neo PCIe 4 Port RJ45",
+   DEFAULT_RCLK * 8,
+   PUC_PORT_4S, 0x10, 0, -1,
+   .config_function = puc_config_exar
+   },
+
+   {   0x114f, 0x00f3, 0x, 0,
+   "Digi Neo PCIe 8 Port RJ45",
+   DEFAULT_RCLK * 8,
+   PUC_PORT_8S, 0x10, 0, -1,
+   .config_function = puc_config_exar
+   },
+
{   0x11fe, 0x8010, 0x, 0,
"Comtrol RocketPort 550/8 RJ11 part A",
DEFAULT_RCLK * 4,
@@ -763,6 +811,12 @@ const struct puc_cfg puc_pci_devices[] =
PUC_PORT_4S, 0x10, 0, 8,
},
 
+   {   0x1415, 0x950a, 0x131f, 0x2061,
+   "SIIG Cyber 2SP1 PCIe",
+   DEFAULT_RCLK * 10,
+   PUC_PORT_2S, 0x10, 0, 8,
+   },
+
{   0x1415, 0x950a, 0x, 0,
"Oxford Semiconductor OX16PCI954 UARTs",
DEFAULT_RCLK,
@@ -840,9 +894,9 @@ const struct puc_cfg puc_pci_devices[] =
 */
 
{   0x1415, 0xc11b, 0x, 0,
-"Oxford Semiconductor OXPCIe952 1S1P",
-DEFAULT_RCLK * 0x22,
-PUC_PORT_NONSTANDARD, 0x10, 0, -1,
+   "Oxford Semiconductor OXPCIe952 1S1P",
+   DEFAULT_RCLK * 0x22,
+   PUC_PORT_NONSTANDARD, 0x10, 0, -1,
.config_function = puc_config_oxford_pcie
},
 
@@ -1202,9 +1256,10 @@ const struct puc_cfg puc_pci_devices[] =
 };
 
 static int
-puc_config_amc(struct puc_softc *sc, enum puc_cfg_cmd cmd, int port,
+puc_config_amc(struct puc_softc *sc __unused, enum puc_cfg_cmd cmd, int port,
 intptr_t *res)
 {
+
switch (cmd) {
case PUC_CFG_GET_OFS:
*res = 8 * (port & 1);
@@ -1236,9 +1291,10 @@ puc_config_diva(struct puc_softc *sc, en
 }
 
 static int
-puc_config_exar(struct puc_softc *sc, enum puc_cfg_cmd cmd, int port,
-intptr_t *res)
+puc_config_exar(struct puc_softc *sc __unused, enum puc_cfg_cmd cmd,
+int port, intptr_t *res)
 {
+
if (cmd == PUC_CFG_GET_OFS) {
*res = port * 0x200;
return (0);
@@ -1247,9 +1303,10 @@ puc_config_exar(struct puc_softc *sc, en
 }
 
 static int
-puc_config_exar_pcie(struct puc_softc *sc, enum puc_cfg_cmd cmd, int port,
-intptr_t *res)
+puc_config_exar_pcie(struct puc_softc *sc __unused, enum puc_cfg_cmd cmd,
+int port, intptr_t *res)
 {
+
if (cmd == PUC_CFG_GET_OFS) {
*res = port * 0x400;
return (0);
@@ -1258,9 +1315,10 @@ puc_config_exar_pcie(struct puc_softc *s
 }
 
 static int
-puc_config_icbook(struct puc_softc 

svn commit: r294968 - head/sys/dev/filemon

2016-01-27 Thread Bryan Drewery
Author: bdrewery
Date: Thu Jan 28 01:19:19 2016
New Revision: 294968
URL: https://svnweb.freebsd.org/changeset/base/294968

Log:
  Follow-up r294967: Mark flags unused.
  
  X-MFC-With:   r294967
  MFC after:2 weeks
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/filemon/filemon_wrapper.c

Modified: head/sys/dev/filemon/filemon_wrapper.c
==
--- head/sys/dev/filemon/filemon_wrapper.c  Thu Jan 28 01:17:55 2016
(r294967)
+++ head/sys/dev/filemon/filemon_wrapper.c  Thu Jan 28 01:19:19 2016
(r294968)
@@ -523,7 +523,7 @@ filemon_wrapper_unlink(struct thread *td
 
 static void
 filemon_event_process_fork(void *arg __unused, struct proc *p1,
-struct proc *p2, int flags)
+struct proc *p2, int flags __unused)
 {
size_t len;
struct filemon *filemon;
___
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: r294965 - head/sys/dev/filemon

2016-01-27 Thread Bryan Drewery
Author: bdrewery
Date: Thu Jan 28 00:51:17 2016
New Revision: 294965
URL: https://svnweb.freebsd.org/changeset/base/294965

Log:
  filemon: Use process_exit EVENTHANDLER to capture process exit.
  
  This fixes some cases where a process could exit without being untracked
  by filemon.
  
  Reported by:  mjg
  MFC after:2 weeks
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/filemon/filemon_wrapper.c

Modified: head/sys/dev/filemon/filemon_wrapper.c
==
--- head/sys/dev/filemon/filemon_wrapper.c  Thu Jan 28 00:41:07 2016
(r294964)
+++ head/sys/dev/filemon/filemon_wrapper.c  Thu Jan 28 00:51:17 2016
(r294965)
@@ -29,6 +29,7 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include 
 #include 
 
 #include "opt_compat.h"
@@ -52,12 +53,13 @@ __FBSDID("$FreeBSD$");
 #define sys_symlinksymlink
 #define sys_unlink unlink
 #define sys_vfork  vfork
-#define sys_sys_exit   sys_exit
 #ifdef FILEMON_HAS_LINKAT
 #define sys_linkat linkat
 #endif
 #endif /* __FreeBSD_version */
 
+static eventhandler_tag filemon_exit_tag;
+
 static void
 filemon_output(struct filemon *filemon, char *msg, size_t len)
 {
@@ -485,7 +487,7 @@ filemon_wrapper_freebsd32_stat(struct th
 #endif
 
 static void
-filemon_wrapper_sys_exit(struct thread *td, struct sys_exit_args *uap)
+filemon_event_process_exit(void *arg __unused, struct proc *p)
 {
size_t len;
struct filemon *filemon;
@@ -494,14 +496,14 @@ filemon_wrapper_sys_exit(struct thread *
/* Get timestamp before locking. */
getmicrotime();
 
-   if ((filemon = filemon_pid_check(curproc)) != NULL) {
+   if ((filemon = filemon_pid_check(p)) != NULL) {
len = snprintf(filemon->msgbufr, sizeof(filemon->msgbufr),
-   "X %d %d\n", curproc->p_pid, uap->rval);
+   "X %d %d %d\n", p->p_pid, p->p_xexit, p->p_xsig);
 
filemon_output(filemon, filemon->msgbufr, len);
 
/* Check if the monitored process is about to exit. */
-   if (filemon->pid == curproc->p_pid) {
+   if (filemon->pid == p->p_pid) {
len = snprintf(filemon->msgbufr,
sizeof(filemon->msgbufr),
"# Stop %ju.%06ju\n# Bye bye\n",
@@ -514,8 +516,6 @@ filemon_wrapper_sys_exit(struct thread *
/* Unlock the found filemon structure. */
filemon_filemon_unlock(filemon);
}
-
-   sys_sys_exit(td, uap);
 }
 
 static int
@@ -578,7 +578,6 @@ filemon_wrapper_install(void)
 #endif
 
sv_table[SYS_chdir].sy_call = (sy_call_t *) filemon_wrapper_chdir;
-   sv_table[SYS_exit].sy_call = (sy_call_t *) filemon_wrapper_sys_exit;
sv_table[SYS_execve].sy_call = (sy_call_t *) filemon_wrapper_execve;
sv_table[SYS_fork].sy_call = (sy_call_t *) filemon_wrapper_fork;
sv_table[SYS_open].sy_call = (sy_call_t *) filemon_wrapper_open;
@@ -597,7 +596,6 @@ filemon_wrapper_install(void)
sv_table = ia32_freebsd_sysvec.sv_table;
 
sv_table[FREEBSD32_SYS_chdir].sy_call = (sy_call_t *) 
filemon_wrapper_chdir;
-   sv_table[FREEBSD32_SYS_exit].sy_call = (sy_call_t *) 
filemon_wrapper_sys_exit;
sv_table[FREEBSD32_SYS_freebsd32_execve].sy_call = (sy_call_t *) 
filemon_wrapper_freebsd32_execve;
sv_table[FREEBSD32_SYS_fork].sy_call = (sy_call_t *) 
filemon_wrapper_fork;
sv_table[FREEBSD32_SYS_open].sy_call = (sy_call_t *) 
filemon_wrapper_open;
@@ -612,6 +610,9 @@ filemon_wrapper_install(void)
sv_table[FREEBSD32_SYS_linkat].sy_call = (sy_call_t *) 
filemon_wrapper_linkat;
 #endif
 #endif /* COMPAT_ARCH32 */
+
+   filemon_exit_tag = EVENTHANDLER_REGISTER(process_exit,
+   filemon_event_process_exit, NULL, EVENTHANDLER_PRI_LAST);
 }
 
 static void
@@ -624,7 +625,6 @@ filemon_wrapper_deinstall(void)
 #endif
 
sv_table[SYS_chdir].sy_call = (sy_call_t *)sys_chdir;
-   sv_table[SYS_exit].sy_call = (sy_call_t *)sys_sys_exit;
sv_table[SYS_execve].sy_call = (sy_call_t *)sys_execve;
sv_table[SYS_fork].sy_call = (sy_call_t *)sys_fork;
sv_table[SYS_open].sy_call = (sy_call_t *)sys_open;
@@ -643,7 +643,6 @@ filemon_wrapper_deinstall(void)
sv_table = ia32_freebsd_sysvec.sv_table;
 
sv_table[FREEBSD32_SYS_chdir].sy_call = (sy_call_t *)sys_chdir;
-   sv_table[FREEBSD32_SYS_exit].sy_call = (sy_call_t *)sys_sys_exit;
sv_table[FREEBSD32_SYS_freebsd32_execve].sy_call = (sy_call_t 
*)freebsd32_execve;
sv_table[FREEBSD32_SYS_fork].sy_call = (sy_call_t *)sys_fork;
sv_table[FREEBSD32_SYS_open].sy_call = (sy_call_t *)sys_open;
@@ -658,4 +657,6 @@ filemon_wrapper_deinstall(void)
sv_table[FREEBSD32_SYS_linkat].sy_call = (sy_call_t *)sys_linkat;
 #endif
 #endif /* COMPAT_ARCH32 */
+
+   EVENTHANDLER_DEREGISTER(process_exit, 

svn commit: r294964 - stable/10/etc/rc.d

2016-01-27 Thread Jamie Gritton
Author: jamie
Date: Thu Jan 28 00:41:07 2016
New Revision: 294964
URL: https://svnweb.freebsd.org/changeset/base/294964

Log:
  MFC r294749:
  
Allow the (old rc-style) exec_afterstart jail parameters to start numbering
at 0, like exec_prestart and the others do.  Make param0 optional, i.e.
still look for param1.
  
  PR:   142973

Modified:
  stable/10/etc/rc.d/jail
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/etc/rc.d/jail
==
--- stable/10/etc/rc.d/jail Wed Jan 27 22:56:04 2016(r294963)
+++ stable/10/etc/rc.d/jail Thu Jan 28 00:41:07 2016(r294964)
@@ -32,7 +32,7 @@ need_dad_wait=
 #  Extract value from ${jail_$jv_$name} or ${jail_$name} and
 #  set it to $param.  If not defined, $defval is used.
 #  When $num is [0-9]*, ${jail_$jv_$name$num} are looked up and
-#  $param is set by using +=.
+#  $param is set by using +=.  $num=0 is optional (params may start at 1).
 #  When $num is YN or NY, the value is interpret as boolean.
 extract_var()
 {
@@ -72,7 +72,7 @@ extract_var()
eval _tmpargs=\"\${$_name1:-\${$_name2:-$_def}}\"
if [ -n "$_tmpargs" ]; then 
echo "  $_param += \"$_tmpargs\";"
-   else
+   elif [ $i != 0 ]; then
break;
fi
i=$(($i + 1))
@@ -202,7 +202,7 @@ parse_options()
extract_var $_jv exec_poststop exec.poststop 0 ""
 
echo "  exec.start += \"$_exec_start\";"
-   extract_var $_jv exec_afterstart exec.start 1 ""
+   extract_var $_jv exec_afterstart exec.start 0 ""
echo "  exec.stop = \"$_exec_stop\";"
 
extract_var $_jv consolelog exec.consolelog - \
___
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: r294967 - head/sys/dev/filemon

2016-01-27 Thread Bryan Drewery
Author: bdrewery
Date: Thu Jan 28 01:17:55 2016
New Revision: 294967
URL: https://svnweb.freebsd.org/changeset/base/294967

Log:
  filemon: Trace fork via process_fork event.
  
  This avoids needing ugly hooks and needing both a vfork and fork
  handler.
  
  MFC after:2 weeks
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/filemon/filemon_wrapper.c

Modified: head/sys/dev/filemon/filemon_wrapper.c
==
--- head/sys/dev/filemon/filemon_wrapper.c  Thu Jan 28 01:15:57 2016
(r294966)
+++ head/sys/dev/filemon/filemon_wrapper.c  Thu Jan 28 01:17:55 2016
(r294967)
@@ -45,20 +45,19 @@ __FBSDID("$FreeBSD$");
   9-CURRENT September 10th-16th. */
 #define sys_chdir  chdir
 #define sys_execve execve
-#define sys_fork   fork
 #define sys_link   link
 #define sys_open   open
 #define sys_rename rename
 #define sys_stat   stat
 #define sys_symlinksymlink
 #define sys_unlink unlink
-#define sys_vfork  vfork
 #ifdef FILEMON_HAS_LINKAT
 #define sys_linkat linkat
 #endif
 #endif /* __FreeBSD_version */
 
 static eventhandler_tag filemon_exit_tag;
+static eventhandler_tag filemon_fork_tag;
 
 static void
 filemon_output(struct filemon *filemon, char *msg, size_t len)
@@ -196,29 +195,6 @@ filemon_wrapper_freebsd32_execve(struct 
 #endif
 
 static int
-filemon_wrapper_fork(struct thread *td, struct fork_args *uap)
-{
-   int ret;
-   size_t len;
-   struct filemon *filemon;
-
-   if ((ret = sys_fork(td, uap)) == 0) {
-   if ((filemon = filemon_pid_check(curproc)) != NULL) {
-   len = snprintf(filemon->msgbufr,
-   sizeof(filemon->msgbufr), "F %d %ld\n",
-   curproc->p_pid, (long)curthread->td_retval[0]);
-
-   filemon_output(filemon, filemon->msgbufr, len);
-
-   /* Unlock the found filemon structure. */
-   filemon_filemon_unlock(filemon);
-   }
-   }
-
-   return (ret);
-}
-
-static int
 filemon_wrapper_open(struct thread *td, struct open_args *uap)
 {
int ret;
@@ -545,27 +521,23 @@ filemon_wrapper_unlink(struct thread *td
return (ret);
 }
 
-static int
-filemon_wrapper_vfork(struct thread *td, struct vfork_args *uap)
+static void
+filemon_event_process_fork(void *arg __unused, struct proc *p1,
+struct proc *p2, int flags)
 {
-   int ret;
size_t len;
struct filemon *filemon;
 
-   if ((ret = sys_vfork(td, uap)) == 0) {
-   if ((filemon = filemon_pid_check(curproc)) != NULL) {
-   len = snprintf(filemon->msgbufr,
-   sizeof(filemon->msgbufr), "F %d %ld\n",
-   curproc->p_pid, (long)curthread->td_retval[0]);
+   if ((filemon = filemon_pid_check(p1)) != NULL) {
+   len = snprintf(filemon->msgbufr,
+   sizeof(filemon->msgbufr), "F %d %d\n",
+   p1->p_pid, p2->p_pid);
 
-   filemon_output(filemon, filemon->msgbufr, len);
+   filemon_output(filemon, filemon->msgbufr, len);
 
-   /* Unlock the found filemon structure. */
-   filemon_filemon_unlock(filemon);
-   }
+   /* Unlock the found filemon structure. */
+   filemon_filemon_unlock(filemon);
}
-
-   return (ret);
 }
 
 static void
@@ -579,13 +551,11 @@ filemon_wrapper_install(void)
 
sv_table[SYS_chdir].sy_call = (sy_call_t *) filemon_wrapper_chdir;
sv_table[SYS_execve].sy_call = (sy_call_t *) filemon_wrapper_execve;
-   sv_table[SYS_fork].sy_call = (sy_call_t *) filemon_wrapper_fork;
sv_table[SYS_open].sy_call = (sy_call_t *) filemon_wrapper_open;
sv_table[SYS_openat].sy_call = (sy_call_t *) filemon_wrapper_openat;
sv_table[SYS_rename].sy_call = (sy_call_t *) filemon_wrapper_rename;
sv_table[SYS_stat].sy_call = (sy_call_t *) filemon_wrapper_stat;
sv_table[SYS_unlink].sy_call = (sy_call_t *) filemon_wrapper_unlink;
-   sv_table[SYS_vfork].sy_call = (sy_call_t *) filemon_wrapper_vfork;
sv_table[SYS_link].sy_call = (sy_call_t *) filemon_wrapper_link;
sv_table[SYS_symlink].sy_call = (sy_call_t *) filemon_wrapper_symlink;
 #ifdef FILEMON_HAS_LINKAT
@@ -597,13 +567,11 @@ filemon_wrapper_install(void)
 
sv_table[FREEBSD32_SYS_chdir].sy_call = (sy_call_t *) 
filemon_wrapper_chdir;
sv_table[FREEBSD32_SYS_freebsd32_execve].sy_call = (sy_call_t *) 
filemon_wrapper_freebsd32_execve;
-   sv_table[FREEBSD32_SYS_fork].sy_call = (sy_call_t *) 
filemon_wrapper_fork;
sv_table[FREEBSD32_SYS_open].sy_call = (sy_call_t *) 
filemon_wrapper_open;
sv_table[FREEBSD32_SYS_openat].sy_call = (sy_call_t *) 
filemon_wrapper_openat;
   

svn commit: r294970 - stable/10/sys/fs/ext2fs

2016-01-27 Thread Pedro F. Giffuni
Author: pfg
Date: Thu Jan 28 02:19:47 2016
New Revision: 294970
URL: https://svnweb.freebsd.org/changeset/base/294970

Log:
  MFC   r294695:
  ext2fs: passthrough any extra timestamps to the dinode struct.
  
  In general we don't trust any of the extended timestamps unless the
  EXT2F_ROCOMPAT_EXTRA_ISIZE feature is set. However, in the case where
  we freshly allocated a new inode the information is valid and it is
  better to pass it along instead of leaving the value undefined.
  
  This should have no practical effect but should reduce the amount of
  garbage if EXT2F_ROCOMPAT_EXTRA_ISIZE is set, like in cases where the
  filesystem is converted from ext3 to ext4.

Modified:
  stable/10/sys/fs/ext2fs/ext2_inode_cnv.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/fs/ext2fs/ext2_inode_cnv.c
==
--- stable/10/sys/fs/ext2fs/ext2_inode_cnv.cThu Jan 28 01:45:15 2016
(r294969)
+++ stable/10/sys/fs/ext2fs/ext2_inode_cnv.cThu Jan 28 02:19:47 2016
(r294970)
@@ -149,13 +149,11 @@ ext2_i2ei(struct inode *ip, struct ext2f
ei->e2di_atime = ip->i_atime;
ei->e2di_mtime = ip->i_mtime;
ei->e2di_ctime = ip->i_ctime;
-   if (E2DI_HAS_XTIME(ip)) {
-   ei->e2di_ctime_extra = NSEC_TO_XTIME(ip->i_ctimensec);
-   ei->e2di_mtime_extra = NSEC_TO_XTIME(ip->i_mtimensec);
-   ei->e2di_atime_extra = NSEC_TO_XTIME(ip->i_atimensec);
-   ei->e2di_crtime = ip->i_birthtime;
-   ei->e2di_crtime_extra = NSEC_TO_XTIME(ip->i_birthnsec);
-   }
+   ei->e2di_ctime_extra = NSEC_TO_XTIME(ip->i_ctimensec);
+   ei->e2di_mtime_extra = NSEC_TO_XTIME(ip->i_mtimensec);
+   ei->e2di_atime_extra = NSEC_TO_XTIME(ip->i_atimensec);
+   ei->e2di_crtime = ip->i_birthtime;
+   ei->e2di_crtime_extra = NSEC_TO_XTIME(ip->i_birthnsec);
ei->e2di_flags = 0;
ei->e2di_flags |= (ip->i_flags & SF_APPEND) ? EXT2_APPEND: 0;
ei->e2di_flags |= (ip->i_flags & SF_IMMUTABLE) ? EXT2_IMMUTABLE: 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: r294971 - stable/9/sys/fs/ext2fs

2016-01-27 Thread Pedro F. Giffuni
Author: pfg
Date: Thu Jan 28 02:21:20 2016
New Revision: 294971
URL: https://svnweb.freebsd.org/changeset/base/294971

Log:
  MFC   r294695:
  ext2fs: passthrough any extra timestamps to the dinode struct.
  
  In general we don't trust any of the extended timestamps unless the
  EXT2F_ROCOMPAT_EXTRA_ISIZE feature is set. However, in the case where
  we freshly allocated a new inode the information is valid and it is
  better to pass it along instead of leaving the value undefined.
  
  This should have no practical effect but should reduce the amount of
  garbage if EXT2F_ROCOMPAT_EXTRA_ISIZE is set, like in cases where the
  filesystem is converted from ext3 to ext4.

Modified:
  stable/9/sys/fs/ext2fs/ext2_inode_cnv.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/fs/   (props changed)

Modified: stable/9/sys/fs/ext2fs/ext2_inode_cnv.c
==
--- stable/9/sys/fs/ext2fs/ext2_inode_cnv.c Thu Jan 28 02:19:47 2016
(r294970)
+++ stable/9/sys/fs/ext2fs/ext2_inode_cnv.c Thu Jan 28 02:21:20 2016
(r294971)
@@ -149,13 +149,11 @@ ext2_i2ei(struct inode *ip, struct ext2f
ei->e2di_atime = ip->i_atime;
ei->e2di_mtime = ip->i_mtime;
ei->e2di_ctime = ip->i_ctime;
-   if (E2DI_HAS_XTIME(ip)) {
-   ei->e2di_ctime_extra = NSEC_TO_XTIME(ip->i_ctimensec);
-   ei->e2di_mtime_extra = NSEC_TO_XTIME(ip->i_mtimensec);
-   ei->e2di_atime_extra = NSEC_TO_XTIME(ip->i_atimensec);
-   ei->e2di_crtime = ip->i_birthtime;
-   ei->e2di_crtime_extra = NSEC_TO_XTIME(ip->i_birthnsec);
-   }
+   ei->e2di_ctime_extra = NSEC_TO_XTIME(ip->i_ctimensec);
+   ei->e2di_mtime_extra = NSEC_TO_XTIME(ip->i_mtimensec);
+   ei->e2di_atime_extra = NSEC_TO_XTIME(ip->i_atimensec);
+   ei->e2di_crtime = ip->i_birthtime;
+   ei->e2di_crtime_extra = NSEC_TO_XTIME(ip->i_birthnsec);
ei->e2di_flags = 0;
ei->e2di_flags |= (ip->i_flags & SF_APPEND) ? EXT2_APPEND: 0;
ei->e2di_flags |= (ip->i_flags & SF_IMMUTABLE) ? EXT2_IMMUTABLE: 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: r294973 - head/sbin/ggate/ggated

2016-01-27 Thread Garrett Cooper
Author: ngie
Date: Thu Jan 28 03:24:06 2016
New Revision: 294973
URL: https://svnweb.freebsd.org/changeset/base/294973

Log:
  Add pidfile support to ggated(8)
  
  The tests will manipulate the system daemon today, which can cause undesired
  service interruption when the tests are run.
  
  This change allows the geom_gate tests to be run with an arbitrary ggated(8)
  daemon / geom_gate(4) device pairing.
  
  Other changes:
  - Sort #includes
  - Use a more common idiom for parsing options with getopt(3)
  
  Differential Revision: https://reviews.freebsd.org/D4836
  MFC after: 2 weeks
  Reviewed by: bjk (manpages), pjd (maintainer timeout)
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sbin/ggate/ggated/Makefile
  head/sbin/ggate/ggated/ggated.8
  head/sbin/ggate/ggated/ggated.c

Modified: head/sbin/ggate/ggated/Makefile
==
--- head/sbin/ggate/ggated/Makefile Thu Jan 28 02:56:30 2016
(r294972)
+++ head/sbin/ggate/ggated/Makefile Thu Jan 28 03:24:06 2016
(r294973)
@@ -6,7 +6,7 @@ PROG=   ggated
 MAN=   ggated.8
 SRCS=  ggated.c ggate.c
 
-LIBADD=pthread
+LIBADD=pthread util
 
 CFLAGS+= -I${.CURDIR}/../shared
 

Modified: head/sbin/ggate/ggated/ggated.8
==
--- head/sbin/ggate/ggated/ggated.8 Thu Jan 28 02:56:30 2016
(r294972)
+++ head/sbin/ggate/ggated/ggated.8 Thu Jan 28 03:24:06 2016
(r294973)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd July 14, 2015
+.Dd January 27, 2016
 .Dt GGATED 8
 .Os
 .Sh NAME
@@ -37,6 +37,7 @@
 .Op Fl v
 .Op Fl a Ar address
 .Op Fl p Ar port
+.Op Fl F Ar pidfile
 .Op Fl R Ar rcvbuf
 .Op Fl S Ar sndbuf
 .Op Ar "exports file"
@@ -67,6 +68,10 @@ Port on which
 .Nm
 listens for connections.
 Default is 3080.
+.It Fl F Ar pidfile
+PID file that
+.Nm
+uses.
 .It Fl R Ar rcvbuf
 Size of receive buffer to use.
 Default is 131072 (128kB).
@@ -86,6 +91,13 @@ The format of an exports file is as foll
 1.2.3.0/24 RW  /tmp/test.img
 hostname   WO  /tmp/image
 .Ed
+.Sh FILES
+.Bl -tag -width ".Pa /var/run/ggated.pid" -compact
+.It Pa /var/run/ggated.pid
+The default location of the
+.Nm
+PID file.
+.El
 .Sh EXIT STATUS
 Exit status is 0 on success, or 1 if the command fails.
 To get details about the failure,

Modified: head/sbin/ggate/ggated/ggated.c
==
--- head/sbin/ggate/ggated/ggated.c Thu Jan 28 02:56:30 2016
(r294972)
+++ head/sbin/ggate/ggated/ggated.c Thu Jan 28 03:24:06 2016
(r294973)
@@ -26,32 +26,34 @@
  * $FreeBSD$
  */
 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
 #include 
-#include 
+#include 
+#include 
 #include 
-#include 
 #include 
+#include 
+#include 
 #include 
 #include 
-#include 
-#include 
+#include 
 #include 
 #include 
-#include 
-#include 
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
-#include 
+#include 
+#include 
+#include 
+#include 
 #include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
 
 #include "ggate.h"
 
@@ -110,8 +112,8 @@ static void
 usage(void)
 {
 
-   fprintf(stderr, "usage: %s [-nv] [-a address] [-p port] [-R rcvbuf] "
-   "[-S sndbuf] [exports file]\n", getprogname());
+   fprintf(stderr, "usage: %s [-nv] [-a address] [-F pidfile] [-p port] "
+   "[-R rcvbuf] [-S sndbuf] [exports file]\n", getprogname());
exit(EXIT_FAILURE);
 }
 
@@ -946,20 +948,18 @@ huphandler(int sig __unused)
 int
 main(int argc, char *argv[])
 {
+   const char *ggated_pidfile = _PATH_VARRUN "/ggated.pid";
+   struct pidfh *pfh;
struct sockaddr_in serv;
struct sockaddr from;
socklen_t fromlen;
-   int sfd, tmpsfd;
+   pid_t otherpid;
+   int ch, sfd, tmpsfd;
unsigned port;
 
bindaddr = htonl(INADDR_ANY);
port = G_GATE_PORT;
-   for (;;) {
-   int ch;
-
-   ch = getopt(argc, argv, "a:hnp:R:S:v");
-   if (ch == -1)
-   break;
+   while ((ch = getopt(argc, argv, "a:hnp:F:R:S:v")) != -1) {
switch (ch) {
case 'a':
bindaddr = g_gate_str2ip(optarg);
@@ -968,6 +968,9 @@ main(int argc, char *argv[])
"Invalid IP/host name to bind to.");
}
break;
+   case 'F':
+   ggated_pidfile = optarg;
+   break;
case 'n':
nagle = 0;
break;
@@ -1004,12 +1007,23 @@ main(int argc, char *argv[])
exports_file = argv[0];
exports_get();
 
+   pfh = pidfile_open(ggated_pidfile, 0600, );
+   if (pfh == NULL) {
+   if (errno == EEXIST) {
+ 

svn commit: r294958 - in stable/10: share/man/man4 sys/dev/e1000 sys/dev/ixgb sys/dev/netmap

2016-01-27 Thread Marius Strobl
Author: marius
Date: Wed Jan 27 22:31:08 2016
New Revision: 294958
URL: https://svnweb.freebsd.org/changeset/base/294958

Log:
  Sync the e1000 drivers with what's in head as of r294327, modulo parts
  that don't apply to stable/10 (driver API, if_inc_counter(), RSS changes
  etc.) and modulo r287465 (which reportedly breaks igb(4)), i. e. assorted
  fixes and improvements only:
  
  o MFC r267385 (partial):
- Don't compare bus_dma map pointers for static DMA allocations against
  NULL to determine if bus_dmamap_unload() or bus_dmamem_free() should be
  called. Instead, check the associated bus and virtual addresses.
- Don't clear static DMA maps to NULL.
  o MFC r284933:
Delete the refernce to VLAN handling being disabled by default. This is
no longer the case. [1]
  o MFC r285639:
Add an adapter CORE lock in the DDB hook em_dump_queue to avoid WITNESS
panic in em_init_locked() while debugging.
  o MFC r285879:
- Remove unused txd_saved.
- Intialize txd_upper, txd_lower and txd_used at declaration.
  o MFC r286162:
Free mbufs when busdma loading fails.
  o MFC r286829:
Add capability to disable CRC stripping as it breaks IPMI/BMC capabilities
on certain adatpers. [2]
  o MFC r286831: [3]
- Increase EM_MAX_SCATTER to 64 such that the size of em_xmit()::
  segs[EM_MAX_SCATTER] doesn't get overrun by things like NFS that can
  and do shove more than 32 segs when being used with em(4) and TSO4.
- Update tso handling code in em_xmit() with update from jhb@
- Set if_hw_tsomax, if_hw_tsomaxsegcount and if_hw_tsomaxsegsize to
  appropriate values.
- Define a TSO workaround "magic" number of 4 that is used to avoid an
  alignment issue in hardware.
- Change a couple of integer values that were used as booleans to actual
  bool types.
- Ensure that em_enable_intr() enables the appropriate mask of interrupts
  and not just a hardcoded define of values.
  o MFC r286832:
e1000/if_lem.c bump to 1.1.0
  o MFC r286833:
Bump all copywrite dates to 2015.
  o MFC r287112:
Style/whitespace cleanup in shared/common code.
  o MFC r293331:
- Switch em(4) to the extended RX descriptor format.
- Split rxbuffer and txbuffer apart to support the new RX descriptor
  format structures. Move rxbuffer manipulation to em_setup_rxdesc() to
  unify the new behavior changes.
- Add a RSSKEYLEN macro for help in generating the RSSKEY data structures
  in the card.
- Change em_receive_checksum() to process the new rxdescriptor format
  status bit.
  o MFC r293332:
Disable the reuse of checksum offload context descriptors in the case
of multiple queues in em(4). Document errata in the code.
  o MFC r293854:
Given that em(4), lem(4) and igb(4) hardware doesn't require the
alignment guarantees provided by m_defrag(9), use m_collapse(9)
instead for performance reasons.
While at it, sanitize the statistics softc members, i. e. retire
unused ones and add SYSCTL nodes missing for actually used ones.
  
  PR:   118693 [1], 161277 [2], 195078 [3], 199174 [3], 200221 [3]

Modified:
  stable/10/share/man/man4/em.4
  stable/10/sys/dev/e1000/e1000_80003es2lan.c
  stable/10/sys/dev/e1000/e1000_80003es2lan.h
  stable/10/sys/dev/e1000/e1000_82540.c
  stable/10/sys/dev/e1000/e1000_82541.c
  stable/10/sys/dev/e1000/e1000_82541.h
  stable/10/sys/dev/e1000/e1000_82542.c
  stable/10/sys/dev/e1000/e1000_82543.c
  stable/10/sys/dev/e1000/e1000_82543.h
  stable/10/sys/dev/e1000/e1000_82571.c
  stable/10/sys/dev/e1000/e1000_82571.h
  stable/10/sys/dev/e1000/e1000_82575.c
  stable/10/sys/dev/e1000/e1000_82575.h
  stable/10/sys/dev/e1000/e1000_api.c
  stable/10/sys/dev/e1000/e1000_api.h
  stable/10/sys/dev/e1000/e1000_defines.h
  stable/10/sys/dev/e1000/e1000_hw.h
  stable/10/sys/dev/e1000/e1000_i210.c
  stable/10/sys/dev/e1000/e1000_i210.h
  stable/10/sys/dev/e1000/e1000_ich8lan.c
  stable/10/sys/dev/e1000/e1000_ich8lan.h
  stable/10/sys/dev/e1000/e1000_mac.c
  stable/10/sys/dev/e1000/e1000_mac.h
  stable/10/sys/dev/e1000/e1000_manage.c
  stable/10/sys/dev/e1000/e1000_manage.h
  stable/10/sys/dev/e1000/e1000_mbx.c
  stable/10/sys/dev/e1000/e1000_mbx.h
  stable/10/sys/dev/e1000/e1000_nvm.c
  stable/10/sys/dev/e1000/e1000_nvm.h
  stable/10/sys/dev/e1000/e1000_osdep.c
  stable/10/sys/dev/e1000/e1000_osdep.h
  stable/10/sys/dev/e1000/e1000_phy.c
  stable/10/sys/dev/e1000/e1000_phy.h
  stable/10/sys/dev/e1000/e1000_regs.h
  stable/10/sys/dev/e1000/e1000_vf.c
  stable/10/sys/dev/e1000/e1000_vf.h
  stable/10/sys/dev/e1000/if_em.c
  stable/10/sys/dev/e1000/if_em.h
  stable/10/sys/dev/e1000/if_igb.c
  stable/10/sys/dev/e1000/if_igb.h
  stable/10/sys/dev/e1000/if_lem.c
  stable/10/sys/dev/e1000/if_lem.h
  stable/10/sys/dev/ixgb/if_ixgb.c
  stable/10/sys/dev/netmap/if_em_netmap.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/share/man/man4/em.4

Re: svn commit: r294925 - in head/sys/boot: common i386/boot2 i386/gptboot i386/zfsboot mips/beri/boot2 pc98/boot2

2016-01-27 Thread Steven Hartland



On 27/01/2016 16:36, Warner Losh wrote:

Author: imp
Date: Wed Jan 27 16:36:18 2016
New Revision: 294925
URL: https://svnweb.freebsd.org/changeset/base/294925

Log:
   Fix mistake when transitioning to the new defines with ZFS loader. I
   hate adding yet another define, but it is the lessor of the evil
   choices available. Kill another evil by removing PATH_BOOT3 and
   replacing it with PATH_LOADER or PATH_LOADER_ZFS as appropriate.
   
   PR: 206659


Modified:
   head/sys/boot/common/paths.h
   head/sys/boot/i386/boot2/boot2.c
   head/sys/boot/i386/gptboot/gptboot.c
   head/sys/boot/i386/zfsboot/zfsboot.c
   head/sys/boot/mips/beri/boot2/boot2.c
   head/sys/boot/pc98/boot2/boot2.c

Modified: head/sys/boot/common/paths.h
==
--- head/sys/boot/common/paths.hWed Jan 27 16:17:15 2016
(r294924)
+++ head/sys/boot/common/paths.hWed Jan 27 16:36:18 2016
(r294925)
@@ -31,9 +31,9 @@
  
  #define PATH_DOTCONFIG	"/boot.config"

  #define PATH_CONFIG   "/boot/config"
-#define PATH_BOOT3 "/boot/loader"
  #define PATH_LOADER   "/boot/loader"
  #define PATH_LOADER_EFI   "/boot/loader.efi"
+#define PATH_LOADER_ZFS"/boot/zfsloader"
  #define PATH_KERNEL   "/boot/kernel/kernel"
  
  #endif /* _PATHS_H_ */


Modified: head/sys/boot/i386/boot2/boot2.c
==
--- head/sys/boot/i386/boot2/boot2.cWed Jan 27 16:17:15 2016
(r294924)
+++ head/sys/boot/i386/boot2/boot2.cWed Jan 27 16:36:18 2016
(r294925)
@@ -235,7 +235,7 @@ main(void)
   */
  
  if (!kname) {

-   kname = PATH_BOOT3;
+   kname = PATH_LOADER;
if (autoboot && !keyhit(3*SECOND)) {
load();
kname = PATH_KERNEL;

Modified: head/sys/boot/i386/gptboot/gptboot.c
==
--- head/sys/boot/i386/gptboot/gptboot.cWed Jan 27 16:17:15 2016
(r294924)
+++ head/sys/boot/i386/gptboot/gptboot.cWed Jan 27 16:36:18 2016
(r294925)
@@ -178,7 +178,7 @@ main(void)
  
  		if (autoboot && keyhit(3)) {

if (*kname == '\0')
-   memcpy(kname, PATH_BOOT3, sizeof(PATH_BOOT3));
+   memcpy(kname, PATH_LOADER, sizeof(PATH_LOADER));
break;
}
autoboot = 0;
@@ -190,7 +190,7 @@ main(void)
 */
if (*kname != '\0')
load();
-   memcpy(kname, PATH_BOOT3, sizeof(PATH_BOOT3));
+   memcpy(kname, PATH_LOADER, sizeof(PATH_LOADER));
load();
memcpy(kname, PATH_KERNEL, sizeof(PATH_KERNEL));
load();

Modified: head/sys/boot/i386/zfsboot/zfsboot.c
==
--- head/sys/boot/i386/zfsboot/zfsboot.cWed Jan 27 16:17:15 2016
(r294924)
+++ head/sys/boot/i386/zfsboot/zfsboot.cWed Jan 27 16:36:18 2016
(r294925)
@@ -546,12 +546,12 @@ main(void)
  }
  
  /*

- * Try to exec stage 3 boot loader. If interrupted by a keypress,
+ * Try to exec /boot/loader. If interrupted by a keypress,
This comment should either refer the constant (so its always correct) or 
be /boot/zfsloader not /boot/loader


___
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: r294893 - head/lib/libdpv

2016-01-27 Thread Bjoern A. Zeeb

> On 27 Jan 2016, at 06:21 , Devin Teske  wrote:
> 
> Author: dteske
> Date: Wed Jan 27 06:21:35 2016
> New Revision: 294893
> URL: https://svnweb.freebsd.org/changeset/base/294893
> 
> Log:
>  Fix a crash if `-D' is used without `-t title'
> 
>  dialog(3)'s dlg_reallocate_gauge(), used both by dialog(3)'s dialog_gauge()
>  and dialog(1)'s `--gauge', will segmentation fault in strlen(3) if no title
>  is set for the widget. Reproducible with `dialog --gauge hi 6 20' (adding
>  `—title “”' is enough to prevent segmentation fault).


mips/sparc64/powerpc say:

/scratch/tmp/bz/head.svn/lib/libdpv/dialog_util.c: In function 
'dialog_spawn_gauge':
/scratch/tmp/bz/head.svn/lib/libdpv/dialog_util.c:270: warning: zero-length 
printf format string


___
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: r294922 - head/lib/libdpv

2016-01-27 Thread Devin Teske
Author: dteske
Date: Wed Jan 27 15:28:23 2016
New Revision: 294922
URL: https://svnweb.freebsd.org/changeset/base/294922

Log:
  Fix fatal warn when compiling under GCC 5.2.0
  
  GCC 5.2.0 generates the following [fatal] warning:
  dialog_util.c:270:23: error:
  zero-length gnu_printf format string [-Werror=format-zero-length]
 sprintf(dargv[n++], "");
  
  Fix malloc argument while here, removing sprintf.
  
  Reported by:  Ruslan Bukin 

Modified:
  head/lib/libdpv/dialog_util.c

Modified: head/lib/libdpv/dialog_util.c
==
--- head/lib/libdpv/dialog_util.c   Wed Jan 27 15:19:48 2016
(r294921)
+++ head/lib/libdpv/dialog_util.c   Wed Jan 27 15:28:23 2016
(r294922)
@@ -265,9 +265,9 @@ dialog_spawn_gauge(char *init_prompt, pi
if ((dargv[n] = malloc(8)) == NULL)
errx(EXIT_FAILURE, "Out of memory?!");
sprintf(dargv[n++], "--title");
-   if ((dargv[n] = malloc(8)) == NULL)
+   if ((dargv[n] = malloc(1)) == NULL)
errx(EXIT_FAILURE, "Out of memory?!");
-   sprintf(dargv[n++], "");
+   *dargv[n++] = '\0';
}
if (backtitle != NULL) {
if ((dargv[n] = malloc(12)) == NULL)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r294893 - head/lib/libdpv

2016-01-27 Thread Devin Teske
On Wed, 2016-01-27 at 15:21 +, Bjoern A. Zeeb wrote:
> > On 27 Jan 2016, at 06:21 , Devin Teske  wrote:
> > 
> > Author: dteske
> > Date: Wed Jan 27 06:21:35 2016
> > New Revision: 294893
> > URL: https://svnweb.freebsd.org/changeset/base/294893
> > 
> > Log:
> >  Fix a crash if `-D' is used without `-t title'
> > 
> >  dialog(3)'s dlg_reallocate_gauge(), used both by dialog(3)'s
> > dialog_gauge()
> >  and dialog(1)'s `--gauge', will segmentation fault in strlen(3) if
> > no title
> >  is set for the widget. Reproducible with `dialog --gauge hi 6 20'
> > (adding
> >  `—title “”' is enough to prevent segmentation fault).
> 
> 
> mips/sparc64/powerpc say:
> 
> /scratch/tmp/bz/head.svn/lib/libdpv/dialog_util.c: In function
> 'dialog_spawn_gauge':
> /scratch/tmp/bz/head.svn/lib/libdpv/dialog_util.c:270: warning: zero
> -length printf format string
> 
> 

Fixed before you could hit send ;D
https://svnweb.freebsd.org/base?view=revision=294922

(someone else reported it last night)
-- 
Devin

___
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: r294923 - head/contrib/netbsd-tests/usr.bin/grep

2016-01-27 Thread Alan Somers
Author: asomers
Date: Wed Jan 27 16:13:10 2016
New Revision: 294923
URL: https://svnweb.freebsd.org/changeset/base/294923

Log:
  Fix grep_test:recurse with ZFS and TMPFS tmpdirs
  
  contrib/netbsd-tests/usr.bin/grep/t_grep.sh
Fix grep_test:recurse when /tmp is either zfs or tmpfs. The test was
relying on an implicit ordering of directory recursion which happens
to be true when using UFS. grep's specification requires no such
ordering. The solution is to ignore the order of grep's results.
  
  Reviewed by:  ngie
  MFC after:32 days
  Sponsored by: Spectra Logic Corp
  Differential Revision:https://reviews.freebsd.org/D4925

Modified:
  head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh

Modified: head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh
==
--- head/contrib/netbsd-tests/usr.bin/grep/t_grep.shWed Jan 27 15:28:23 
2016(r294922)
+++ head/contrib/netbsd-tests/usr.bin/grep/t_grep.shWed Jan 27 16:13:10 
2016(r294923)
@@ -70,7 +70,15 @@ recurse_body()
echo -e "cod\ndover sole\nhaddock\nhalibut\npilchard" > recurse/d/fish
echo -e "cod\nhaddock\nplaice" > recurse/a/f/favourite-fish
 
+   # Begin FreeBSD
+   if true; then
+   atf_check -o file:"$(atf_get_srcdir)/d_recurse.out" -x "grep -r 
haddock recurse | sort"
+   else
+   # End FreeBSD
atf_check -o file:"$(atf_get_srcdir)/d_recurse.out" grep -r haddock 
recurse
+   # Begin FreeBSD
+   fi
+   # End FreeBSD
 }
 
 atf_test_case recurse_symlink
___
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: r294893 - head/lib/libdpv

2016-01-27 Thread Devin Teske
On Wed, 2016-01-27 at 11:03 +, Ruslan Bukin wrote:
> I get this with GCC 5.2.0:
> 
> /home/rb743/dev/freebsd-riscv/lib/libdpv/dialog_util.c:270:23: error:
> zero-length gnu_printf format string [-Werror=for
> mat-zero-length]
>sprintf(dargv[n++], "");
> 
> Ruslan
> 

Fixed just now:
https://svnweb.freebsd.org/base?view=revision=294922

Thanks a bunch!
-- 
Cheers,Devin


> On Wed, Jan 27, 2016 at 06:21:35AM +, Devin Teske wrote:
> > Author: dteske
> > Date: Wed Jan 27 06:21:35 2016
> > New Revision: 294893
> > URL: https://svnweb.freebsd.org/changeset/base/294893
> > 
> > Log:
> >   Fix a crash if `-D' is used without `-t title'
> >   
> >   dialog(3)'s dlg_reallocate_gauge(), used both by dialog(3)'s
> > dialog_gauge()
> >   and dialog(1)'s `--gauge', will segmentation fault in strlen(3)
> > if no title
> >   is set for the widget. Reproducible with `dialog --gauge hi 6 20'
> > (adding
> >   `--title ""' is enough to prevent segmentation fault).
> >   
> >   MFC after:3 days
> >   X-MFC-to: stable/10
> > 
> > Modified:
> >   head/lib/libdpv/dialog_util.c
> > 
> > Modified: head/lib/libdpv/dialog_util.c
> > ===
> > ===
> > --- head/lib/libdpv/dialog_util.c   Wed Jan 27 06:16:53 2016
> > (r294892)
> > +++ head/lib/libdpv/dialog_util.c   Wed Jan 27 06:21:35 2016
> > (r294893)
> > @@ -261,6 +261,13 @@ dialog_spawn_gauge(char *init_prompt, pi
> > errx(EXIT_FAILURE, "Out of memory?!");
> > sprintf(dargv[n++], "--title");
> > dargv[n++] = title;
> > +   } else {
> > +   if ((dargv[n] = malloc(8)) == NULL)
> > +   errx(EXIT_FAILURE, "Out of memory?!");
> > +   sprintf(dargv[n++], "--title");
> > +   if ((dargv[n] = malloc(8)) == NULL)
> > +   errx(EXIT_FAILURE, "Out of memory?!");
> > +   sprintf(dargv[n++], "");
> > }
> > if (backtitle != NULL) {
> > if ((dargv[n] = malloc(12)) == NULL)
> > 
> 
> 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r294924 - head/usr.sbin/syslogd

2016-01-27 Thread Alan Somers
Author: asomers
Date: Wed Jan 27 16:17:15 2016
New Revision: 294924
URL: https://svnweb.freebsd.org/changeset/base/294924

Log:
  syslogd: Enable repeated line compression for lines of any length.
  
  Enable repeated line compression for lines of any length, instead of only
  short lines. AFAICT repeated line compression was limited to short lines as
  a RAM optimization, which made sense when karels added it in 1988, but no
  longer.  The penalty is a paltry 904B of RAM per file logged.
  
  Reviewed by:  rpaulo
  MFC after:32 days
  Sponsored by: Spectra Logic Corp
  Differential Revision:https://reviews.freebsd.org/D4475

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

Modified: head/usr.sbin/syslogd/syslogd.c
==
--- head/usr.sbin/syslogd/syslogd.c Wed Jan 27 16:13:10 2016
(r294923)
+++ head/usr.sbin/syslogd/syslogd.c Wed Jan 27 16:17:15 2016
(r294924)
@@ -69,7 +69,7 @@ __FBSDID("$FreeBSD$");
  */
 
 #defineMAXLINE 1024/* maximum line length */
-#defineMAXSVLINE   120 /* maximum saved line length */
+#defineMAXSVLINE   MAXLINE /* maximum saved line length */
 #defineDEFUPRI (LOG_USER|LOG_NOTICE)
 #defineDEFSPRI (LOG_KERN|LOG_CRIT)
 #defineTIMERINTVL  30  /* interval for checking flush, 
mark */
___
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: r294925 - in head/sys/boot: common i386/boot2 i386/gptboot i386/zfsboot mips/beri/boot2 pc98/boot2

2016-01-27 Thread Warner Losh
Author: imp
Date: Wed Jan 27 16:36:18 2016
New Revision: 294925
URL: https://svnweb.freebsd.org/changeset/base/294925

Log:
  Fix mistake when transitioning to the new defines with ZFS loader. I
  hate adding yet another define, but it is the lessor of the evil
  choices available. Kill another evil by removing PATH_BOOT3 and
  replacing it with PATH_LOADER or PATH_LOADER_ZFS as appropriate.
  
  PR: 206659

Modified:
  head/sys/boot/common/paths.h
  head/sys/boot/i386/boot2/boot2.c
  head/sys/boot/i386/gptboot/gptboot.c
  head/sys/boot/i386/zfsboot/zfsboot.c
  head/sys/boot/mips/beri/boot2/boot2.c
  head/sys/boot/pc98/boot2/boot2.c

Modified: head/sys/boot/common/paths.h
==
--- head/sys/boot/common/paths.hWed Jan 27 16:17:15 2016
(r294924)
+++ head/sys/boot/common/paths.hWed Jan 27 16:36:18 2016
(r294925)
@@ -31,9 +31,9 @@
 
 #define PATH_DOTCONFIG "/boot.config"
 #define PATH_CONFIG"/boot/config"
-#define PATH_BOOT3 "/boot/loader"
 #define PATH_LOADER"/boot/loader"
 #define PATH_LOADER_EFI"/boot/loader.efi"
+#define PATH_LOADER_ZFS"/boot/zfsloader"
 #define PATH_KERNEL"/boot/kernel/kernel"
 
 #endif /* _PATHS_H_ */

Modified: head/sys/boot/i386/boot2/boot2.c
==
--- head/sys/boot/i386/boot2/boot2.cWed Jan 27 16:17:15 2016
(r294924)
+++ head/sys/boot/i386/boot2/boot2.cWed Jan 27 16:36:18 2016
(r294925)
@@ -235,7 +235,7 @@ main(void)
  */
 
 if (!kname) {
-   kname = PATH_BOOT3;
+   kname = PATH_LOADER;
if (autoboot && !keyhit(3*SECOND)) {
load();
kname = PATH_KERNEL;

Modified: head/sys/boot/i386/gptboot/gptboot.c
==
--- head/sys/boot/i386/gptboot/gptboot.cWed Jan 27 16:17:15 2016
(r294924)
+++ head/sys/boot/i386/gptboot/gptboot.cWed Jan 27 16:36:18 2016
(r294925)
@@ -178,7 +178,7 @@ main(void)
 
if (autoboot && keyhit(3)) {
if (*kname == '\0')
-   memcpy(kname, PATH_BOOT3, sizeof(PATH_BOOT3));
+   memcpy(kname, PATH_LOADER, sizeof(PATH_LOADER));
break;
}
autoboot = 0;
@@ -190,7 +190,7 @@ main(void)
 */
if (*kname != '\0')
load();
-   memcpy(kname, PATH_BOOT3, sizeof(PATH_BOOT3));
+   memcpy(kname, PATH_LOADER, sizeof(PATH_LOADER));
load();
memcpy(kname, PATH_KERNEL, sizeof(PATH_KERNEL));
load();

Modified: head/sys/boot/i386/zfsboot/zfsboot.c
==
--- head/sys/boot/i386/zfsboot/zfsboot.cWed Jan 27 16:17:15 2016
(r294924)
+++ head/sys/boot/i386/zfsboot/zfsboot.cWed Jan 27 16:36:18 2016
(r294925)
@@ -546,12 +546,12 @@ main(void)
 }
 
 /*
- * Try to exec stage 3 boot loader. If interrupted by a keypress,
+ * Try to exec /boot/loader. If interrupted by a keypress,
  * or in case of failure, try to load a kernel directly instead.
  */
 
 if (autoboot && !*kname) {
-   memcpy(kname, PATH_BOOT3, sizeof(PATH_BOOT3));
+   memcpy(kname, PATH_LOADER_ZFS, sizeof(PATH_LOADER_ZFS));
if (!keyhit(3)) {
load();
memcpy(kname, PATH_KERNEL, sizeof(PATH_KERNEL));

Modified: head/sys/boot/mips/beri/boot2/boot2.c
==
--- head/sys/boot/mips/beri/boot2/boot2.c   Wed Jan 27 16:17:15 2016
(r294924)
+++ head/sys/boot/mips/beri/boot2/boot2.c   Wed Jan 27 16:36:18 2016
(r294925)
@@ -248,7 +248,7 @@ main(u_int argc, const char *argv[], con
  */
 
 if (!kname) {
-   kname = PATH_BOOT3;
+   kname = PATH_LOADER;
if (autoboot && !keyhit(3*SECOND)) {
boot_fromfs();
kname = PATH_KERNEL;

Modified: head/sys/boot/pc98/boot2/boot2.c
==
--- head/sys/boot/pc98/boot2/boot2.cWed Jan 27 16:17:15 2016
(r294924)
+++ head/sys/boot/pc98/boot2/boot2.cWed Jan 27 16:36:18 2016
(r294925)
@@ -374,7 +374,7 @@ main(void)
  */
 
 if (!kname) {
-   kname = PATH_BOOT3;
+   kname = PATH_LOADER;
if (autoboot && !keyhit(3*SECOND)) {
load();
kname = PATH_KERNEL;
___
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: r294926 - head/sys/boot/ficl/i386

2016-01-27 Thread Allan Jude
Author: allanjude
Date: Wed Jan 27 16:45:23 2016
New Revision: 294926
URL: https://svnweb.freebsd.org/changeset/base/294926

Log:
  ficl on i386 should cast to unsigned char output to support efi i386
  
  make it possible for efi_console to recognize and translate box characters
  on i386 build (unsigned versus signed char passed as int issue).
  
  Submitted by: Toomas Soome 
  Reviewed by:  emaste, smh, dteske
  MFC after:3 days
  Differential Revision:https://reviews.freebsd.org/D4993

Modified:
  head/sys/boot/ficl/i386/sysdep.c

Modified: head/sys/boot/ficl/i386/sysdep.c
==
--- head/sys/boot/ficl/i386/sysdep.cWed Jan 27 16:36:18 2016
(r294925)
+++ head/sys/boot/ficl/i386/sysdep.cWed Jan 27 16:45:23 2016
(r294926)
@@ -58,7 +58,7 @@ void  ficlTextOut(FICL_VM *pVM, char *ms
 IGNORE(pVM);
 
 while(*msg != 0)
-   putchar(*(msg++));
+   putchar((unsigned char)*(msg++));
 if (fNewline)
putchar('\n');
 
___
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: r294909 - head/crypto/openssh

2016-01-27 Thread NGie Cooper

> On Jan 27, 2016, at 05:40, Dag-Erling Smørgrav  wrote:
> 
> Author: des
> Date: Wed Jan 27 13:40:44 2016
> New Revision: 294909
> URL: https://svnweb.freebsd.org/changeset/base/294909
> 
> Log:
>  Switch UseDNS back on

Please add "Relnotes: yes" to the MFC commit, if this is MFCed. Speaking of 
which, is there a plan for MFCing this? It wasn't noted in the commit message..
Thanks!
-NGie
___
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: r294932 - head/usr.sbin/iscsid

2016-01-27 Thread Edward Tomasz Napierala
Author: trasz
Date: Wed Jan 27 18:12:42 2016
New Revision: 294932
URL: https://svnweb.freebsd.org/changeset/base/294932

Log:
  Improve reporting of connection problems in iscsid(8).
  
  Obtained from:Mellanox Technologies
  MFC after:1 month
  Sponsored by: The FreeBSD Foundation

Modified:
  head/usr.sbin/iscsid/pdu.c

Modified: head/usr.sbin/iscsid/pdu.c
==
--- head/usr.sbin/iscsid/pdu.c  Wed Jan 27 17:59:39 2016(r294931)
+++ head/usr.sbin/iscsid/pdu.c  Wed Jan 27 18:12:42 2016(r294932)
@@ -34,7 +34,9 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
+#include 
 #include 
 
 #include "iscsid.h"
@@ -177,18 +179,23 @@ pdu_padding(const struct pdu *pdu)
 }
 
 static void
-pdu_read(int fd, char *data, size_t len)
+pdu_read(const struct connection *conn, char *data, size_t len)
 {
ssize_t ret;
 
while (len > 0) {
-   ret = read(fd, data, len);
+   ret = read(conn->conn_socket, data, len);
if (ret < 0) {
-   if (timed_out())
+   if (timed_out()) {
+   fail(conn, "Login Phase timeout");
log_errx(1, "exiting due to timeout");
+   }
+   fail(conn, strerror(errno));
log_err(1, "read");
-   } else if (ret == 0)
+   } else if (ret == 0) {
+   fail(conn, "connection lost");
log_errx(1, "read: connection lost");
+   }
len -= ret;
data += ret;
}
@@ -207,7 +214,7 @@ pdu_receive(struct pdu *pdu)
 
assert(pdu->pdu_connection->conn_conf.isc_iser == 0);
 
-   pdu_read(pdu->pdu_connection->conn_socket,
+   pdu_read(pdu->pdu_connection,
(char *)pdu->pdu_bhs, sizeof(*pdu->pdu_bhs));
 
len = pdu_ahs_length(pdu);
@@ -227,13 +234,13 @@ pdu_receive(struct pdu *pdu)
if (pdu->pdu_data == NULL)
log_err(1, "malloc");
 
-   pdu_read(pdu->pdu_connection->conn_socket,
+   pdu_read(pdu->pdu_connection,
(char *)pdu->pdu_data, pdu->pdu_data_len);
 
padding = pdu_padding(pdu);
if (padding != 0) {
assert(padding < sizeof(dummy));
-   pdu_read(pdu->pdu_connection->conn_socket,
+   pdu_read(pdu->pdu_connection,
(char *)dummy, padding);
}
}
___
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: r294927 - head/sys/dev/ofw

2016-01-27 Thread Ian Lepore
On Wed, 2016-01-27 at 17:33 +, Andrew Turner wrote:
> Author: andrew
> Date: Wed Jan 27 17:33:31 2016
> New Revision: 294927
> URL: https://svnweb.freebsd.org/changeset/base/294927
...
> +   KASSERT(size = BUS_SPACE_MAXSIZE,
> +   ("Bus size is too large: %jx", (intmax_t)addr));

Oops, printing addr in the size assert.

-- Ian

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


svn commit: r294930 - in head/sys: amd64/amd64 amd64/ia32 amd64/linux amd64/linux32 arm/arm arm64/arm64 i386/i386 i386/linux i386/svr4 mips/mips powerpc/powerpc sparc64/sparc64 sys

2016-01-27 Thread John Baldwin
Author: jhb
Date: Wed Jan 27 17:55:01 2016
New Revision: 294930
URL: https://svnweb.freebsd.org/changeset/base/294930

Log:
  Convert ss_sp in stack_t and sigstack to void *.
  
  POSIX requires these members to be of type void * rather than the
  char * inherited from 4BSD.  NetBSD and OpenBSD both changed their
  fields to void * back in 1998.  No new build failures were reported
  via an exp-run.
  
  PR:   206503 (exp-run)
  Reviewed by:  kib
  MFC after:1 week
  Differential Revision:https://reviews.freebsd.org/D5092

Modified:
  head/sys/amd64/amd64/machdep.c
  head/sys/amd64/ia32/ia32_signal.c
  head/sys/amd64/linux/linux_sysvec.c
  head/sys/amd64/linux32/linux32_sysvec.c
  head/sys/arm/arm/machdep.c
  head/sys/arm64/arm64/machdep.c
  head/sys/arm64/arm64/vm_machdep.c
  head/sys/i386/i386/machdep.c
  head/sys/i386/linux/linux_sysvec.c
  head/sys/i386/svr4/svr4_machdep.c
  head/sys/mips/mips/freebsd32_machdep.c
  head/sys/mips/mips/pm_machdep.c
  head/sys/mips/mips/vm_machdep.c
  head/sys/powerpc/powerpc/exec_machdep.c
  head/sys/sparc64/sparc64/machdep.c
  head/sys/sys/signal.h

Modified: head/sys/amd64/amd64/machdep.c
==
--- head/sys/amd64/amd64/machdep.c  Wed Jan 27 17:53:26 2016
(r294929)
+++ head/sys/amd64/amd64/machdep.c  Wed Jan 27 17:55:01 2016
(r294930)
@@ -389,7 +389,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, 
/* Allocate space for the signal handler context. */
if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack &&
SIGISMEMBER(psp->ps_sigonstack, sig)) {
-   sp = td->td_sigstk.ss_sp + td->td_sigstk.ss_size;
+   sp = (char *)td->td_sigstk.ss_sp + td->td_sigstk.ss_size;
 #if defined(COMPAT_43)
td->td_sigstk.ss_flags |= SS_ONSTACK;
 #endif

Modified: head/sys/amd64/ia32/ia32_signal.c
==
--- head/sys/amd64/ia32/ia32_signal.c   Wed Jan 27 17:53:26 2016
(r294929)
+++ head/sys/amd64/ia32/ia32_signal.c   Wed Jan 27 17:55:01 2016
(r294930)
@@ -354,7 +354,7 @@ ia32_osendsig(sig_t catcher, ksiginfo_t 
/* Allocate space for the signal handler context. */
if ((td->td_pflags & TDP_ALTSTACK) && !oonstack &&
SIGISMEMBER(psp->ps_sigonstack, sig)) {
-   fp = (struct ia32_sigframe3 *)(td->td_sigstk.ss_sp +
+   fp = (struct ia32_sigframe3 *)((uintptr_t)td->td_sigstk.ss_sp +
td->td_sigstk.ss_size - sizeof(sf));
td->td_sigstk.ss_flags |= SS_ONSTACK;
} else
@@ -488,7 +488,7 @@ freebsd4_ia32_sendsig(sig_t catcher, ksi
/* Allocate space for the signal handler context. */
if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack &&
SIGISMEMBER(psp->ps_sigonstack, sig)) {
-   sfp = (struct ia32_sigframe4 *)(td->td_sigstk.ss_sp +
+   sfp = (struct ia32_sigframe4 *)((uintptr_t)td->td_sigstk.ss_sp +
td->td_sigstk.ss_size - sizeof(sf));
} else
sfp = (struct ia32_sigframe4 *)regs->tf_rsp - 1;
@@ -622,7 +622,7 @@ ia32_sendsig(sig_t catcher, ksiginfo_t *
/* Allocate space for the signal handler context. */
if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack &&
SIGISMEMBER(psp->ps_sigonstack, sig))
-   sp = td->td_sigstk.ss_sp + td->td_sigstk.ss_size;
+   sp = (char *)td->td_sigstk.ss_sp + td->td_sigstk.ss_size;
else
sp = (char *)regs->tf_rsp;
if (xfpusave != NULL) {

Modified: head/sys/amd64/linux/linux_sysvec.c
==
--- head/sys/amd64/linux/linux_sysvec.c Wed Jan 27 17:53:26 2016
(r294929)
+++ head/sys/amd64/linux/linux_sysvec.c Wed Jan 27 17:55:01 2016
(r294930)
@@ -630,7 +630,7 @@ linux_rt_sendsig(sig_t catcher, ksiginfo
/* Allocate space for the signal handler context. */
if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack &&
SIGISMEMBER(psp->ps_sigonstack, sig)) {
-   sp = td->td_sigstk.ss_sp + td->td_sigstk.ss_size -
+   sp = (caddr_t)td->td_sigstk.ss_sp + td->td_sigstk.ss_size -
sizeof(struct l_rt_sigframe);
} else
sp = (caddr_t)regs->tf_rsp - sizeof(struct l_rt_sigframe) - 128;

Modified: head/sys/amd64/linux32/linux32_sysvec.c
==
--- head/sys/amd64/linux32/linux32_sysvec.c Wed Jan 27 17:53:26 2016
(r294929)
+++ head/sys/amd64/linux32/linux32_sysvec.c Wed Jan 27 17:55:01 2016
(r294930)
@@ -315,7 +315,7 @@ linux_rt_sendsig(sig_t catcher, ksiginfo
 */
if ((td->td_pflags & TDP_ALTSTACK) && !oonstack &&
SIGISMEMBER(psp->ps_sigonstack, sig)) {
-   fp = 

Re: svn commit: r294909 - head/crypto/openssh

2016-01-27 Thread Conrad Meyer
From context in other emails: This commit will not be MFCed, because
this configuration is already enabled in stable/10.  For the same
reason, it doesn't need Relnotes.

Best,
Conrad

On Wed, Jan 27, 2016 at 9:25 AM, NGie Cooper  wrote:
>
>> On Jan 27, 2016, at 05:40, Dag-Erling Smørgrav  wrote:
>>
>> Author: des
>> Date: Wed Jan 27 13:40:44 2016
>> New Revision: 294909
>> URL: https://svnweb.freebsd.org/changeset/base/294909
>>
>> Log:
>>  Switch UseDNS back on
>
> Please add "Relnotes: yes" to the MFC commit, if this is MFCed. Speaking of 
> which, is there a plan for MFCing this? It wasn't noted in the commit 
> message..
> Thanks!
> -NGie
___
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: r294927 - head/sys/dev/ofw

2016-01-27 Thread Andrew Turner
Author: andrew
Date: Wed Jan 27 17:33:31 2016
New Revision: 294927
URL: https://svnweb.freebsd.org/changeset/base/294927

Log:
  When finding the physical address of a device allow intermediate addresses
  to be 64-bit on 32-bit architectures. It is not uncommon for device trees
  to use the upper 32-bits to store what effectively is an index into the
  parent ranges property. In this case, when running with a 32-bit bus_addr_t
  and bus_size_t, we would previously truncate the address, this may then
  incorrectly match the wrong range, and return the wrong address.
  
  Tested by:bz (earlier version)

Modified:
  head/sys/dev/ofw/ofw_subr.c

Modified: head/sys/dev/ofw/ofw_subr.c
==
--- head/sys/dev/ofw/ofw_subr.c Wed Jan 27 16:45:23 2016(r294926)
+++ head/sys/dev/ofw/ofw_subr.c Wed Jan 27 17:33:31 2016(r294927)
@@ -75,8 +75,8 @@ ofw_reg_to_paddr(phandle_t dev, int regn
 bus_size_t *psize, pcell_t *ppci_hi)
 {
pcell_t cell[32], pci_hi;
-   bus_addr_t addr, raddr, baddr;
-   bus_size_t size, rsize;
+   uint64_t addr, raddr, baddr;
+   uint64_t size, rsize;
uint32_t c, nbridge, naddr, nsize;
phandle_t bridge, parent;
u_int spc, rspc;
@@ -167,6 +167,11 @@ ofw_reg_to_paddr(phandle_t dev, int regn
get_addr_props(bridge, , , );
}
 
+   KASSERT(addr <= BUS_SPACE_MAXADDR,
+   ("Bus sddress is too large: %jx", (intmax_t)addr));
+   KASSERT(size <= BUS_SPACE_MAXSIZE,
+   ("Bus size is too large: %jx", (intmax_t)addr));
+
*paddr = addr;
*psize = size;
if (ppci_hi != NULL)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r294931 - in head: share/man/man9 sys/netinet sys/netinet/cc sys/netinet/tcp_stacks

2016-01-27 Thread Gleb Smirnoff
Author: glebius
Date: Wed Jan 27 17:59:39 2016
New Revision: 294931
URL: https://svnweb.freebsd.org/changeset/base/294931

Log:
  Rename netinet/tcp_cc.h to netinet/cc/cc.h.
  
  Discussed with:   lstewart

Added:
  head/sys/netinet/cc/cc.h
 - copied, changed from r294930, head/sys/netinet/tcp_cc.h
Deleted:
  head/sys/netinet/tcp_cc.h
Modified:
  head/share/man/man9/mod_cc.9
  head/sys/netinet/cc/cc.c
  head/sys/netinet/cc/cc_cdg.c
  head/sys/netinet/cc/cc_chd.c
  head/sys/netinet/cc/cc_cubic.c
  head/sys/netinet/cc/cc_dctcp.c
  head/sys/netinet/cc/cc_hd.c
  head/sys/netinet/cc/cc_htcp.c
  head/sys/netinet/cc/cc_newreno.c
  head/sys/netinet/cc/cc_vegas.c
  head/sys/netinet/tcp_input.c
  head/sys/netinet/tcp_output.c
  head/sys/netinet/tcp_stacks/fastpath.c
  head/sys/netinet/tcp_subr.c
  head/sys/netinet/tcp_timer.c
  head/sys/netinet/tcp_usrreq.c

Modified: head/share/man/man9/mod_cc.9
==
--- head/share/man/man9/mod_cc.9Wed Jan 27 17:55:01 2016
(r294930)
+++ head/share/man/man9/mod_cc.9Wed Jan 27 17:59:39 2016
(r294931)
@@ -41,7 +41,7 @@
 .Nd Modular Congestion Control
 .Sh SYNOPSIS
 .In netinet/tcp.h
-.In netinet/tcp_cc.h
+.In netinet/cc/cc.h
 .In netinet/cc/cc_module.h
 .Fn DECLARE_CC_MODULE "ccname" "ccalgo"
 .Fn CCV "ccv" "what"

Modified: head/sys/netinet/cc/cc.c
==
--- head/sys/netinet/cc/cc.cWed Jan 27 17:55:01 2016(r294930)
+++ head/sys/netinet/cc/cc.cWed Jan 27 17:59:39 2016(r294931)
@@ -69,7 +69,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
+#include 
 
 #include 
 

Copied and modified: head/sys/netinet/cc/cc.h (from r294930, 
head/sys/netinet/tcp_cc.h)
==
--- head/sys/netinet/tcp_cc.h   Wed Jan 27 17:55:01 2016(r294930, copy 
source)
+++ head/sys/netinet/cc/cc.hWed Jan 27 17:59:39 2016(r294931)
@@ -48,8 +48,8 @@
  *   http://caia.swin.edu.au/urp/newtcp/
  */
 
-#ifndef _NETINET_TCP_CC_H_
-#define _NETINET_TCP_CC_H_
+#ifndef _NETINET_CC_CC_H_
+#define _NETINET_CC_CC_H_
 
 #if !defined(_KERNEL)
 #error "no user-servicable parts inside"
@@ -175,4 +175,4 @@ extern struct rwlock cc_list_lock;
 #defineCC_LIST_WUNLOCK()   rw_wunlock(_list_lock)
 #defineCC_LIST_LOCK_ASSERT()   rw_assert(_list_lock, RA_LOCKED)
 
-#endif /* _NETINET_TCP_CC_H_ */
+#endif /* _NETINET_CC_CC_H_ */

Modified: head/sys/netinet/cc/cc_cdg.c
==
--- head/sys/netinet/cc/cc_cdg.cWed Jan 27 17:55:01 2016
(r294930)
+++ head/sys/netinet/cc/cc_cdg.cWed Jan 27 17:59:39 2016
(r294931)
@@ -69,7 +69,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 
 #include 

Modified: head/sys/netinet/cc/cc_chd.c
==
--- head/sys/netinet/cc/cc_chd.cWed Jan 27 17:55:01 2016
(r294930)
+++ head/sys/netinet/cc/cc_chd.cWed Jan 27 17:59:39 2016
(r294931)
@@ -71,7 +71,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 
 #include 

Modified: head/sys/netinet/cc/cc_cubic.c
==
--- head/sys/netinet/cc/cc_cubic.c  Wed Jan 27 17:55:01 2016
(r294930)
+++ head/sys/netinet/cc/cc_cubic.c  Wed Jan 27 17:59:39 2016
(r294931)
@@ -63,7 +63,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 

Modified: head/sys/netinet/cc/cc_dctcp.c
==
--- head/sys/netinet/cc/cc_dctcp.c  Wed Jan 27 17:55:01 2016
(r294930)
+++ head/sys/netinet/cc/cc_dctcp.c  Wed Jan 27 17:59:39 2016
(r294931)
@@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 
 #defineCAST_PTR_INT(X) (*((int*)(X)))

Modified: head/sys/netinet/cc/cc_hd.c
==
--- head/sys/netinet/cc/cc_hd.c Wed Jan 27 17:55:01 2016(r294930)
+++ head/sys/netinet/cc/cc_hd.c Wed Jan 27 17:59:39 2016(r294931)
@@ -72,7 +72,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 
 #include 

Modified: head/sys/netinet/cc/cc_htcp.c
==
--- head/sys/netinet/cc/cc_htcp.c   Wed Jan 27 17:55:01 2016
(r294930)
+++ head/sys/netinet/cc/cc_htcp.c   Wed Jan 27 17:59:39 2016
(r294931)
@@ -66,7 +66,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 

svn commit: r294928 - head/sys/dev/ofw

2016-01-27 Thread Andrew Turner
Author: andrew
Date: Wed Jan 27 17:47:07 2016
New Revision: 294928
URL: https://svnweb.freebsd.org/changeset/base/294928

Log:
  Fix the value we print when the size is too large. While here fix the types
  we cast to to be unsigned as the data is unsigned.
  
  Reviewed by:  ian

Modified:
  head/sys/dev/ofw/ofw_subr.c

Modified: head/sys/dev/ofw/ofw_subr.c
==
--- head/sys/dev/ofw/ofw_subr.c Wed Jan 27 17:33:31 2016(r294927)
+++ head/sys/dev/ofw/ofw_subr.c Wed Jan 27 17:47:07 2016(r294928)
@@ -168,9 +168,9 @@ ofw_reg_to_paddr(phandle_t dev, int regn
}
 
KASSERT(addr <= BUS_SPACE_MAXADDR,
-   ("Bus sddress is too large: %jx", (intmax_t)addr));
+   ("Bus sddress is too large: %jx", (uintmax_t)addr));
KASSERT(size <= BUS_SPACE_MAXSIZE,
-   ("Bus size is too large: %jx", (intmax_t)addr));
+   ("Bus size is too large: %jx", (uintmax_t)size));
 
*paddr = addr;
*psize = size;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r294915 - head/sys/conf

2016-01-27 Thread Bryan Drewery
On 1/27/2016 6:46 AM, Hans Petter Selasky wrote:
> ==
> --- head/sys/conf/kern.post.mkWed Jan 27 14:16:13 2016
> (r294914)
> +++ head/sys/conf/kern.post.mkWed Jan 27 14:46:30 2016
> (r294915)
> @@ -186,12 +186,23 @@ genassym.o: $S/$M/$M/genassym.c
>  
>  ${SYSTEM_OBJS} genassym.o vers.o: opt_global.h
>  
> +# Normal files first
> +CFILES_NORMAL=   
> ${CFILES:N*/cddl/*:N*fs/nfsclient/nfs_clkdtrace*:N*/compat/linuxkpi/common/*:N*/ofed/*:N*/dev/mlx5/*}
> +SFILES_NORMAL=   ${SFILES:N*/cddl/*}
> +
>  # We have "special" -I include paths for zfs/dtrace files in 'depend'.
> -CFILES_NOCDDL=   ${CFILES:N*/cddl/*:N*fs/nfsclient/nfs_clkdtrace*}
> -SFILES_NOCDDL=   ${SFILES:N*/cddl/*}
>  CFILES_CDDL= ${CFILES:M*/cddl/*}
>  SFILES_CDDL= ${SFILES:M*/cddl/*}
>  
> +# We have "special" -I include paths for LinuxKPI.
> +CFILES_LINUXKPI=${CFILES:M*/compat/linuxkpi/common/*}
> +
> +# We have "special" -I include paths for OFED.
> +CFILES_OFED=${CFILES:M*/ofed/*}
> +
> +# We have "special" -I include paths for MLX5.
> +CFILES_MLX5=${CFILES:M*/dev/mlx5/*}
> +
>  kernel-depend: .depend
>  # The argument list can be very long, so use make -V and xargs to
>  # pass it to mkdep.
> @@ -220,12 +231,20 @@ DEPENDFILES_OBJS=   ${DEPENDOBJS:O:u:C/^/.
>  .depend: .PRECIOUS ${SRCS}
>  .if ${MK_FAST_DEPEND} == "no"
>   rm -f ${.TARGET}.tmp
> - ${MAKE} -V CFILES_NOCDDL -V SYSTEM_CFILES -V GEN_CFILES | \
> +# C files
> + ${MAKE} -V CFILES_NORMAL -V SYSTEM_CFILES -V GEN_CFILES | \
>   CC="${_MKDEPCC}" xargs mkdep -a -f ${.TARGET}.tmp ${CFLAGS}
>   ${MAKE} -V CFILES_CDDL | \
>   CC="${_MKDEPCC}" xargs mkdep -a -f ${.TARGET}.tmp ${ZFS_CFLAGS} \
>   ${FBT_CFLAGS} ${DTRACE_CFLAGS}
> - ${MAKE} -V SFILES_NOCDDL | \
> + ${MAKE} -V CFILES_LINUXKPI | \
> + CC="${_MKDEPCC}" xargs mkdep -a -f ${.TARGET}.tmp \
> + ${CFLAGS} ${LINUXKPI_INCLUDES}
> + ${MAKE} -V CFILES_OFED -V CFILES_MLX5 | \
> + CC="${_MKDEPCC}" xargs mkdep -a -f ${.TARGET}.tmp \
> + ${CFLAGS} ${OFEDINCLUDES}
> +# Assembly files
> + ${MAKE} -V SFILES_NORMAL | \
>   CC="${_MKDEPCC}" xargs mkdep -a -f ${.TARGET}.tmp ${ASM_CFLAGS}
>   ${MAKE} -V SFILES_CDDL | \
>   CC="${_MKDEPCC}" xargs mkdep -a -f ${.TARGET}.tmp ${ZFS_ASM_CFLAGS}
> 

I plan to nuke this code quite soon in favor of FAST_DEPEND. None of
this or related hacks will be needed anymore.

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r294933 - head/sys/dev/filemon

2016-01-27 Thread Bryan Drewery
Author: bdrewery
Date: Wed Jan 27 19:11:11 2016
New Revision: 294933
URL: https://svnweb.freebsd.org/changeset/base/294933

Log:
  Drop any previous fd when setting a new one.
  
  Reported by:  mjg
  Sponsored by: EMC / Isilon Storage Division
  MFC after:2 weeks

Modified:
  head/sys/dev/filemon/filemon.c

Modified: head/sys/dev/filemon/filemon.c
==
--- head/sys/dev/filemon/filemon.c  Wed Jan 27 18:12:42 2016
(r294932)
+++ head/sys/dev/filemon/filemon.c  Wed Jan 27 19:11:11 2016
(r294933)
@@ -148,6 +148,9 @@ filemon_ioctl(struct cdev *dev, u_long c
switch (cmd) {
/* Set the output file descriptor. */
case FILEMON_SET_FD:
+   if (filemon->fp != NULL)
+   fdrop(filemon->fp, td);
+
error = fget_write(td, *(int *)data,
 #if __FreeBSD_version >= 900041
cap_rights_init(, CAP_PWRITE),
___
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: r294934 - head/sys/kern

2016-01-27 Thread Mateusz Guzik
Author: mjg
Date: Wed Jan 27 19:55:02 2016
New Revision: 294934
URL: https://svnweb.freebsd.org/changeset/base/294934

Log:
  ktrace: tidy up ktrstruct
  
  - minor style fixes
  - avoid doing strlen twice [1]
  
  PR:   206648
  Submitted by: C Turt  (original version) [1]

Modified:
  head/sys/kern/kern_ktrace.c

Modified: head/sys/kern/kern_ktrace.c
==
--- head/sys/kern/kern_ktrace.c Wed Jan 27 19:11:11 2016(r294933)
+++ head/sys/kern/kern_ktrace.c Wed Jan 27 19:55:02 2016(r294934)
@@ -757,15 +757,16 @@ ktrstruct(name, data, datalen)
size_t datalen;
 {
struct ktr_request *req;
-   char *buf = NULL;
-   size_t buflen;
+   char *buf;
+   size_t buflen, namelen;
 
-   if (!data)
+   if (data == NULL)
datalen = 0;
-   buflen = strlen(name) + 1 + datalen;
+   namelen = strlen(name) + 1;
+   buflen = namelen + datalen;
buf = malloc(buflen, M_KTRACE, M_WAITOK);
strcpy(buf, name);
-   bcopy(data, buf + strlen(name) + 1, datalen);
+   bcopy(data, buf + namelen, datalen);
if ((req = ktr_getrequest(KTR_STRUCT)) == NULL) {
free(buf, M_KTRACE);
return;
___
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: r294915 - head/sys/conf

2016-01-27 Thread Bryan Drewery
On 1/27/2016 12:36 PM, Hans Petter Selasky wrote:
> On 01/27/16 20:19, Bryan Drewery wrote:
>> On 1/27/2016 6:46 AM, Hans Petter Selasky wrote:
>>> ==
>>>
>>> --- head/sys/conf/kern.post.mkWed Jan 27 14:16:13 2016(r294914)
>>> +++ head/sys/conf/kern.post.mkWed Jan 27 14:46:30 2016(r294915)
>>> @@ -186,12 +186,23 @@ genassym.o: $S/$M/$M/genassym.c
>>>
>>>   ${SYSTEM_OBJS} genassym.o vers.o: opt_global.h
>>>
>>> +# Normal files first
>>> +CFILES_NORMAL=   
>>> ${CFILES:N*/cddl/*:N*fs/nfsclient/nfs_clkdtrace*:N*/compat/linuxkpi/common/*:N*/ofed/*:N*/dev/mlx5/*}
>>>
>>> +SFILES_NORMAL=${SFILES:N*/cddl/*}
>>> +
> 
>>
>> I plan to nuke this code quite soon in favor of FAST_DEPEND. None of
>> this or related hacks will be needed anymore.
>>
> 
> OK, I guess you know what you are doing :-)
> 
> BTW: Have you thought about implementing -jX option for make depend, by
> splitting the source files which needs depend in to some kind of groups?

Yes, that was my first implementation. It made the overall build slower.
Either way the pre-build dependency calculation isn't needed. It's
explained in https://svnweb.freebsd.org/base?view=revision=290433

Anyway I was just giving an FYI to anyone who cared. I wrote up an arch@
mail after the previous mail though as it is a more appropriate place.


-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r294915 - head/sys/conf

2016-01-27 Thread Hans Petter Selasky

On 01/27/16 20:19, Bryan Drewery wrote:

On 1/27/2016 6:46 AM, Hans Petter Selasky wrote:

==
--- head/sys/conf/kern.post.mk  Wed Jan 27 14:16:13 2016(r294914)
+++ head/sys/conf/kern.post.mk  Wed Jan 27 14:46:30 2016(r294915)
@@ -186,12 +186,23 @@ genassym.o: $S/$M/$M/genassym.c

  ${SYSTEM_OBJS} genassym.o vers.o: opt_global.h

+# Normal files first
+CFILES_NORMAL= 
${CFILES:N*/cddl/*:N*fs/nfsclient/nfs_clkdtrace*:N*/compat/linuxkpi/common/*:N*/ofed/*:N*/dev/mlx5/*}
+SFILES_NORMAL= ${SFILES:N*/cddl/*}
+




I plan to nuke this code quite soon in favor of FAST_DEPEND. None of
this or related hacks will be needed anymore.



OK, I guess you know what you are doing :-)

BTW: Have you thought about implementing -jX option for make depend, by 
splitting the source files which needs depend in to some kind of groups?


--HPS
___
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: r294936 - head/libexec/rtld-elf

2016-01-27 Thread Alexander Kabaev
Author: kan
Date: Wed Jan 27 20:20:37 2016
New Revision: 294936
URL: https://svnweb.freebsd.org/changeset/base/294936

Log:
  Do not unlock rtld_phdr_lock over callback invocations.
  
  The dl_iterate_phdr consumer code in libgcc does not expect multiple
  callbacks running concurrently. This was fixed once already in r178807,
  but accidentally got reverted in r294373.

Modified:
  head/libexec/rtld-elf/rtld.c

Modified: head/libexec/rtld-elf/rtld.c
==
--- head/libexec/rtld-elf/rtld.cWed Jan 27 20:20:35 2016
(r294935)
+++ head/libexec/rtld-elf/rtld.cWed Jan 27 20:20:37 2016
(r294936)
@@ -3533,11 +3533,9 @@ dl_iterate_phdr(__dl_iterate_hdr_callbac
TAILQ_INSERT_AFTER(_list, obj, , next);
rtld_fill_dl_phdr_info(obj, _info);
lock_release(rtld_bind_lock, _lockstate);
-   lock_release(rtld_phdr_lock, _lockstate);
 
error = callback(_info, sizeof phdr_info, param);
 
-   wlock_acquire(rtld_phdr_lock, _lockstate);
rlock_acquire(rtld_bind_lock, _lockstate);
obj = globallist_next();
TAILQ_REMOVE(_list, , next);
@@ -3551,9 +3549,9 @@ dl_iterate_phdr(__dl_iterate_hdr_callbac
if (error == 0) {
rtld_fill_dl_phdr_info(_rtld, _info);
lock_release(rtld_bind_lock, _lockstate);
-   lock_release(rtld_phdr_lock, _lockstate);
error = callback(_info, sizeof(phdr_info), param);
}
+   lock_release(rtld_phdr_lock, _lockstate);
return (error);
 }
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r294935 - head/gnu/lib/libgcc

2016-01-27 Thread Alexander Kabaev
Author: kan
Date: Wed Jan 27 20:20:35 2016
New Revision: 294935
URL: https://svnweb.freebsd.org/changeset/base/294935

Log:
  Make .debug file for libgcc_s.so.1 more useful.
  
  The files compiled into libgcc_s.so.1 did not have -g on
  compiler command line, making generated .debug quite
  pointless.

Modified:
  head/gnu/lib/libgcc/Makefile

Modified: head/gnu/lib/libgcc/Makefile
==
--- head/gnu/lib/libgcc/MakefileWed Jan 27 19:55:02 2016
(r294934)
+++ head/gnu/lib/libgcc/MakefileWed Jan 27 20:20:35 2016
(r294935)
@@ -211,7 +211,7 @@ COMMONHDRS+=unwind.h
 HIDE =  -fvisibility=hidden -DHIDE_EXPORTS
 CC_T = ${CC} -c ${CFLAGS} ${HIDE} -fPIC
 CC_P = ${CC} -c ${CFLAGS} ${HIDE} -p -fPIC
-CC_S = ${CC} -c ${CFLAGS} ${PICFLAG} -DSHARED
+CC_S = ${CC} -c ${CFLAGS} ${SHARED_CFLAGS} ${PICFLAG} -DSHARED
 
 #---
 #
___
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: r294937 - head/share/vt/fonts

2016-01-27 Thread Ed Maste
Author: emaste
Date: Wed Jan 27 20:23:42 2016
New Revision: 294937
URL: https://svnweb.freebsd.org/changeset/base/294937

Log:
  Replace prebuilt uuencoded gallant.fnt with editable hex version

Added:
  head/share/vt/fonts/gallant.hex   (contents, props changed)
Deleted:
  head/share/vt/fonts/gallant.fnt.uu

Added: head/share/vt/fonts/gallant.hex
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/vt/fonts/gallant.hex Wed Jan 27 20:23:42 2016
(r294937)
@@ -0,0 +1,226 @@
+# $FreeBSD$
+# Width: 12
+# Height: 22
+:7fe07fe07fe07fe07fe07fe07fe07fe07fe07fe07fe07fe07fe07fe07fe0
+0001:06000f001f803fc07fe07fe03fc01f800f000600
+0002:55402aa055402aa055402aa055402aa055402aa05540
+0003:4400440044007c0044004400440003e0008000800080008000800080
+0004:7c004000400078004000400043e00200020003c0020002000200
+0005:380044004000400040004400380003c00220022003c0028002400220
+0006:4000400040004000400040007c0003e00200020003c0020002000200
+0007:0e00170023806180618071003a001c00
+0008:06000600060006007fe07fe006000600060006007fe07fe0
+0009:44006400640054004c004c00440002000200020002000200020003e0
+000a:44004400440028002800100013e0008000800080008000800080
+000b:0600060006000600060006000600060006000600fe00fe00
+000c:fe00fe000600060006000600060006000600060006000600
+000d:07f007f00600060006000600060006000600060006000600
+000e:060006000600060006000600060006000600060007f007f0
+000f:0600060006000600060006000600060006000600fff0fff00600060006000600060006000600060006000600
+0010:fff0fff0
+0011:fff0fff0
+0012:fff0fff0
+0013:fff0fff0
+0014:fff0fff0
+0015:060006000600060006000600060006000600060007f007f00600060006000600060006000600060006000600
+0016:0600060006000600060006000600060006000600fe00fe000600060006000600060006000600060006000600
+0017:0600060006000600060006000600060006000600fff0fff0
+0018:fff0fff00600060006000600060006000600060006000600
+0019:0600060006000600060006000600060006000600060006000600060006000600060006000600060006000600
+001a:00e007801e00780078001e00078000e07fe07fe0
+001b:70001e00078001e001e007801e0070007fe07fe0
+001c:3fe07fc019801980198019803180318031c060c0
+001d:004000c001807fc07fc006000c007fc07fc0300060004000
+001e:06000c00100010003000300030003e007c0018001800180018003f203fe031c0
+001f:06000600
+0020:
+0021:0600060006000600060006000600060006000600060006000600
+0022:198019801980198019801980
+0023:03300330033006601ff01ff00cc00cc0198019807fc07fc0330066006600
+0024:06001f803fc066e0666066003e001f8007c00660066066607fc03f800600
+0025:386044c044c0458039800300030006000c000c0019c01a203220322061c0
+0026:07000f8018c018c018c00f801e003e007700636061e061c061803fe01e60
+0027:0c001e001e00060006000c0018001000
+0028:00c0018003800300070006000600060006000600070003000380018000c0
+0029:300018001c000c000e00060006000600060006000e000c001c0018003000
+002a:0f000600666076e01980198076e0666006000f00
+002b:06000600060006007fe07fe00600060006000600
+002c:0c001e001e00060006000c0018001000

Re: svn commit: r294936 - head/libexec/rtld-elf

2016-01-27 Thread Alexander Kabaev
On Wed, 27 Jan 2016 20:20:37 + (UTC)
Alexander Kabaev  wrote:

> Author: kan
> Date: Wed Jan 27 20:20:37 2016
> New Revision: 294936
> URL: https://svnweb.freebsd.org/changeset/base/294936
> 
> Log:
>   Do not unlock rtld_phdr_lock over callback invocations.
>   
>   The dl_iterate_phdr consumer code in libgcc does not expect multiple
>   callbacks running concurrently. This was fixed once already in
> r178807, but accidentally got reverted in r294373.
> 
> Modified:
>   head/libexec/rtld-elf/rtld.c
> 

I lost the commit message through wonders of svn dcommit somehow. This
should have been:

Reviewed by:kib
Tested by:  kib, davide

-- 
Alexander Kabaev


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


svn commit: r294941 - vendor/clang/clang-release_38-r258968

2016-01-27 Thread Dimitry Andric
Author: dim
Date: Wed Jan 27 21:09:57 2016
New Revision: 294941
URL: https://svnweb.freebsd.org/changeset/base/294941

Log:
  Tag clang release_38 branch r258968.

Added:
  vendor/clang/clang-release_38-r258968/
 - copied from r294940, vendor/clang/dist/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r294943 - in vendor/compiler-rt/dist/cmake: . Modules

2016-01-27 Thread Dimitry Andric
Author: dim
Date: Wed Jan 27 21:10:16 2016
New Revision: 294943
URL: https://svnweb.freebsd.org/changeset/base/294943

Log:
  Vendor import of compiler-rt release_38 branch r258968:
  https://llvm.org/svn/llvm-project/compiler-rt/branches/release_38@258968

Modified:
  vendor/compiler-rt/dist/cmake/Modules/AddCompilerRT.cmake
  vendor/compiler-rt/dist/cmake/Modules/CompilerRTDarwinUtils.cmake
  vendor/compiler-rt/dist/cmake/Modules/CompilerRTUtils.cmake
  vendor/compiler-rt/dist/cmake/config-ix.cmake

Modified: vendor/compiler-rt/dist/cmake/Modules/AddCompilerRT.cmake
==
--- vendor/compiler-rt/dist/cmake/Modules/AddCompilerRT.cmake   Wed Jan 27 
21:10:03 2016(r294942)
+++ vendor/compiler-rt/dist/cmake/Modules/AddCompilerRT.cmake   Wed Jan 27 
21:10:16 2016(r294943)
@@ -19,7 +19,7 @@ function(add_compiler_rt_object_librarie
   set(libname "${name}.${os}")
   set(libnames ${libnames} ${libname})
   set(extra_cflags_${libname} ${DARWIN_${os}_CFLAGS})
-  list_union(LIB_ARCHS_${libname} DARWIN_${os}_ARCHS LIB_ARCHS)
+  list_intersect(LIB_ARCHS_${libname} DARWIN_${os}_ARCHS LIB_ARCHS)
 endforeach()
   else()
 foreach(arch ${LIB_ARCHS})
@@ -87,7 +87,7 @@ function(add_compiler_rt_runtime name ty
 set(libname "${name}_${os}_dynamic")
 set(extra_linkflags_${libname} ${DARWIN_${os}_LINKFLAGS} 
${LIB_LINKFLAGS})
   endif()
-  list_union(LIB_ARCHS_${libname} DARWIN_${os}_ARCHS LIB_ARCHS)
+  list_intersect(LIB_ARCHS_${libname} DARWIN_${os}_ARCHS LIB_ARCHS)
   if(LIB_ARCHS_${libname})
 list(APPEND libnames ${libname})
 set(extra_cflags_${libname} ${DARWIN_${os}_CFLAGS} ${LIB_CFLAGS})

Modified: vendor/compiler-rt/dist/cmake/Modules/CompilerRTDarwinUtils.cmake
==
--- vendor/compiler-rt/dist/cmake/Modules/CompilerRTDarwinUtils.cmake   Wed Jan 
27 21:10:03 2016(r294942)
+++ vendor/compiler-rt/dist/cmake/Modules/CompilerRTDarwinUtils.cmake   Wed Jan 
27 21:10:16 2016(r294943)
@@ -91,7 +91,7 @@ endfunction()
 # This function checks the host cpusubtype to see if it is post-haswell. 
Haswell
 # and later machines can run x86_64h binaries. Haswell is cpusubtype 8.
 function(darwin_filter_host_archs input output)
-  list_union(tmp_var DARWIN_osx_ARCHS ${input})
+  list_intersect(tmp_var DARWIN_osx_ARCHS ${input})
   execute_process(
 COMMAND sysctl hw.cpusubtype
 OUTPUT_VARIABLE SUBTYPE)
@@ -285,7 +285,7 @@ macro(darwin_add_builtin_libraries)
   ../profile/InstrProfilingPlatformDarwin
   ../profile/InstrProfilingWriter)
   foreach (os ${ARGN})
-list_union(DARWIN_BUILTIN_ARCHS DARWIN_${os}_ARCHS BUILTIN_SUPPORTED_ARCH)
+list_intersect(DARWIN_BUILTIN_ARCHS DARWIN_${os}_ARCHS 
BUILTIN_SUPPORTED_ARCH)
 foreach (arch ${DARWIN_BUILTIN_ARCHS})
   darwin_find_excluded_builtins_list(${arch}_${os}_EXCLUDED_BUILTINS
   OS ${os}

Modified: vendor/compiler-rt/dist/cmake/Modules/CompilerRTUtils.cmake
==
--- vendor/compiler-rt/dist/cmake/Modules/CompilerRTUtils.cmake Wed Jan 27 
21:10:03 2016(r294942)
+++ vendor/compiler-rt/dist/cmake/Modules/CompilerRTUtils.cmake Wed Jan 27 
21:10:16 2016(r294943)
@@ -58,7 +58,7 @@ macro(append_have_file_definition filena
   list(APPEND ${list} "${varname}=${${varname}}")
 endmacro()
 
-macro(list_union output input1 input2)
+macro(list_intersect output input1 input2)
   set(${output})
   foreach(it ${${input1}})
 list(FIND ${input2} ${it} index)

Modified: vendor/compiler-rt/dist/cmake/config-ix.cmake
==
--- vendor/compiler-rt/dist/cmake/config-ix.cmake   Wed Jan 27 21:10:03 
2016(r294942)
+++ vendor/compiler-rt/dist/cmake/config-ix.cmake   Wed Jan 27 21:10:16 
2016(r294943)
@@ -488,42 +488,42 @@ if(APPLE)
 endforeach()
   endif()
 
-  # for list_union
+  # for list_intersect
   include(CompilerRTUtils)
 
-  list_union(BUILTIN_SUPPORTED_ARCH ALL_BUILTIN_SUPPORTED_ARCH 
toolchain_arches)
+  list_intersect(BUILTIN_SUPPORTED_ARCH ALL_BUILTIN_SUPPORTED_ARCH 
toolchain_arches)
 
-  list_union(SANITIZER_COMMON_SUPPORTED_ARCH
+  list_intersect(SANITIZER_COMMON_SUPPORTED_ARCH
 ALL_SANITIZER_COMMON_SUPPORTED_ARCH
 COMPILER_RT_SUPPORTED_ARCH
 )
   set(LSAN_COMMON_SUPPORTED_ARCH ${SANITIZER_COMMON_SUPPORTED_ARCH})
   set(UBSAN_COMMON_SUPPORTED_ARCH ${SANITIZER_COMMON_SUPPORTED_ARCH})
-  list_union(ASAN_SUPPORTED_ARCH
+  list_intersect(ASAN_SUPPORTED_ARCH
 ALL_ASAN_SUPPORTED_ARCH
 SANITIZER_COMMON_SUPPORTED_ARCH)
-  list_union(DFSAN_SUPPORTED_ARCH
+  list_intersect(DFSAN_SUPPORTED_ARCH
 ALL_DFSAN_SUPPORTED_ARCH
 SANITIZER_COMMON_SUPPORTED_ARCH)
-  

svn commit: r294940 - vendor/clang/dist/tools/driver

2016-01-27 Thread Dimitry Andric
Author: dim
Date: Wed Jan 27 21:09:38 2016
New Revision: 294940
URL: https://svnweb.freebsd.org/changeset/base/294940

Log:
  Vendor import of clang release_38 branch r258968:
  https://llvm.org/svn/llvm-project/cfe/branches/release_38@258968

Modified:
  vendor/clang/dist/tools/driver/driver.cpp

Modified: vendor/clang/dist/tools/driver/driver.cpp
==
--- vendor/clang/dist/tools/driver/driver.cpp   Wed Jan 27 21:09:14 2016
(r294939)
+++ vendor/clang/dist/tools/driver/driver.cpp   Wed Jan 27 21:09:38 2016
(r294940)
@@ -290,9 +290,9 @@ static void SetInstallDir(SmallVectorImp
   if (CanonicalPrefixes)
 llvm::sys::fs::make_absolute(InstalledPath);
 
-  InstalledPath = llvm::sys::path::parent_path(InstalledPath);
-  if (llvm::sys::fs::exists(InstalledPath.c_str()))
-TheDriver.setInstalledDir(InstalledPath);
+  StringRef InstalledPathParent(llvm::sys::path::parent_path(InstalledPath));
+  if (llvm::sys::fs::exists(InstalledPathParent))
+TheDriver.setInstalledDir(InstalledPathParent);
 }
 
 static int ExecuteCC1Tool(ArrayRef argv, StringRef Tool) {
___
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: r294950 - vendor/lldb/dist/cmake/modules

2016-01-27 Thread Dimitry Andric
Author: dim
Date: Wed Jan 27 21:12:23 2016
New Revision: 294950
URL: https://svnweb.freebsd.org/changeset/base/294950

Log:
  Vendor import of lldb release_38 branch r258968:
  https://llvm.org/svn/llvm-project/lldb/branches/release_38@258968

Modified:
  vendor/lldb/dist/cmake/modules/AddLLDB.cmake

Modified: vendor/lldb/dist/cmake/modules/AddLLDB.cmake
==
--- vendor/lldb/dist/cmake/modules/AddLLDB.cmakeWed Jan 27 21:12:18 
2016(r294949)
+++ vendor/lldb/dist/cmake/modules/AddLLDB.cmakeWed Jan 27 21:12:23 
2016(r294950)
@@ -56,7 +56,7 @@ macro(add_lldb_library name)
   if (PARAM_OBJECT)
 add_library(${name} ${libkind} ${srcs})
   else()
-llvm_add_library(${name} ${libkind} ${srcs})
+llvm_add_library(${name} ${libkind} DISABLE_LLVM_LINK_LLVM_DYLIB ${srcs})
 
 lldb_link_common_libs(${name} "${libkind}")
 
@@ -93,7 +93,7 @@ macro(add_lldb_library name)
 endmacro(add_lldb_library)
 
 macro(add_lldb_executable name)
-  add_llvm_executable(${name} ${ARGN})
+  add_llvm_executable(${name} DISABLE_LLVM_LINK_LLVM_DYLIB ${ARGN})
   set_target_properties(${name} PROPERTIES FOLDER "lldb executables")
 endmacro(add_lldb_executable)
 
___
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: r294949 - head/sys/dev/filemon

2016-01-27 Thread Bryan Drewery
Author: bdrewery
Date: Wed Jan 27 21:12:18 2016
New Revision: 294949
URL: https://svnweb.freebsd.org/changeset/base/294949

Log:
  filemon_ioctl: Handle error from devfs_get_cdevpriv(9).
  
  MFC after:2 weeks
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/filemon/filemon.c

Modified: head/sys/dev/filemon/filemon.c
==
--- head/sys/dev/filemon/filemon.c  Wed Jan 27 21:12:02 2016
(r294948)
+++ head/sys/dev/filemon/filemon.c  Wed Jan 27 21:12:18 2016
(r294949)
@@ -143,7 +143,8 @@ filemon_ioctl(struct cdev *dev, u_long c
cap_rights_t rights;
 #endif
 
-   devfs_get_cdevpriv((void **) );
+   if ((error = devfs_get_cdevpriv((void **) )) != 0)
+   return (error);
 
switch (cmd) {
/* Set the output file descriptor. */
___
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: r294948 - vendor/lld/lld-release_38-r258968

2016-01-27 Thread Dimitry Andric
Author: dim
Date: Wed Jan 27 21:12:02 2016
New Revision: 294948
URL: https://svnweb.freebsd.org/changeset/base/294948

Log:
  Tag lld release_38 branch r258968.

Added:
  vendor/lld/lld-release_38-r258968/
 - copied from r294947, vendor/lld/dist/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r294951 - vendor/lldb/lldb-release_38-r258968

2016-01-27 Thread Dimitry Andric
Author: dim
Date: Wed Jan 27 21:12:47 2016
New Revision: 294951
URL: https://svnweb.freebsd.org/changeset/base/294951

Log:
  Tag lldb release_38 branch r258968.

Added:
  vendor/lldb/lldb-release_38-r258968/
 - copied from r294950, vendor/lldb/dist/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r294953 - head/sys/dev/filemon

2016-01-27 Thread Bryan Drewery
Author: bdrewery
Date: Wed Jan 27 21:17:43 2016
New Revision: 294953
URL: https://svnweb.freebsd.org/changeset/base/294953

Log:
  filemon_comment has nothing to do with wrappers so move it out of 
filemon_wrapper.c.
  
  It only prints the header from filemon_ioctl.  Keep the name though to stay
  closer to other implementations.
  
  MFC after:2 weeks
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/filemon/filemon.c
  head/sys/dev/filemon/filemon_wrapper.c

Modified: head/sys/dev/filemon/filemon.c
==
--- head/sys/dev/filemon/filemon.c  Wed Jan 27 21:14:09 2016
(r294952)
+++ head/sys/dev/filemon/filemon.c  Wed Jan 27 21:17:43 2016
(r294953)
@@ -105,6 +105,22 @@ static struct cdev *filemon_dev;
 #include "filemon_wrapper.c"
 
 static void
+filemon_comment(struct filemon *filemon)
+{
+   int len;
+   struct timeval now;
+
+   getmicrotime();
+
+   len = snprintf(filemon->msgbufr, sizeof(filemon->msgbufr),
+   "# filemon version %d\n# Target pid %d\n# Start %ju.%06ju\nV %d\n",
+   FILEMON_VERSION, curproc->p_pid, (uintmax_t)now.tv_sec,
+   (uintmax_t)now.tv_usec, FILEMON_VERSION);
+
+   filemon_output(filemon, filemon->msgbufr, len);
+}
+
+static void
 filemon_dtr(void *data)
 {
struct filemon *filemon = data;

Modified: head/sys/dev/filemon/filemon_wrapper.c
==
--- head/sys/dev/filemon/filemon_wrapper.c  Wed Jan 27 21:14:09 2016
(r294952)
+++ head/sys/dev/filemon/filemon_wrapper.c  Wed Jan 27 21:17:43 2016
(r294953)
@@ -109,22 +109,6 @@ filemon_pid_check(struct proc *p)
return (NULL);
 }
 
-static void
-filemon_comment(struct filemon *filemon)
-{
-   int len;
-   struct timeval now;
-
-   getmicrotime();
-
-   len = snprintf(filemon->msgbufr, sizeof(filemon->msgbufr),
-   "# filemon version %d\n# Target pid %d\n# Start %ju.%06ju\nV %d\n",
-   FILEMON_VERSION, curproc->p_pid, (uintmax_t)now.tv_sec,
-   (uintmax_t)now.tv_usec, FILEMON_VERSION);
-
-   filemon_output(filemon, filemon->msgbufr, len);
-}
-
 static int
 filemon_wrapper_chdir(struct thread *td, struct chdir_args *uap)
 {
___
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: r294938 - in vendor/llvm/dist: include/llvm/Analysis lib/Analysis lib/Target/AMDGPU lib/Target/X86 lib/Transforms/Instrumentation test/Analysis/DemandedBits test/CodeGen/X86 test/Transf...

2016-01-27 Thread Dimitry Andric
Author: dim
Date: Wed Jan 27 21:08:51 2016
New Revision: 294938
URL: https://svnweb.freebsd.org/changeset/base/294938

Log:
  Vendor import of llvm release_38 branch r258968:
  https://llvm.org/svn/llvm-project/llvm/branches/release_38@258968

Added:
  vendor/llvm/dist/test/Transforms/GCOVProfiling/modules.ll
  vendor/llvm/dist/test/Transforms/IndVarSimplify/pr26207.ll
Modified:
  vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h
  vendor/llvm/dist/lib/Analysis/DemandedBits.cpp
  vendor/llvm/dist/lib/Analysis/ScalarEvolution.cpp
  vendor/llvm/dist/lib/Target/AMDGPU/AMDGPU.td
  vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
  vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUSubtarget.h
  vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
  vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp
  vendor/llvm/dist/lib/Transforms/Instrumentation/GCOVProfiling.cpp
  vendor/llvm/dist/test/Analysis/DemandedBits/basic.ll
  vendor/llvm/dist/test/CodeGen/X86/cmovcmov.ll
  vendor/llvm/dist/utils/release/test-release.sh

Modified: vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h
==
--- vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.hWed Jan 27 
20:23:42 2016(r294937)
+++ vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.hWed Jan 27 
21:08:51 2016(r294938)
@@ -412,7 +412,11 @@ namespace llvm {
 
   /*implicit*/ ExitLimit(const SCEV *E) : Exact(E), Max(E) {}
 
-  ExitLimit(const SCEV *E, const SCEV *M) : Exact(E), Max(M) {}
+  ExitLimit(const SCEV *E, const SCEV *M) : Exact(E), Max(M) {
+assert((isa(Exact) ||
+!isa(Max)) &&
+   "Exact is not allowed to be less precise than Max");
+  }
 
   /// Test whether this ExitLimit contains any computed information, or
   /// whether it's all SCEVCouldNotCompute values.

Modified: vendor/llvm/dist/lib/Analysis/DemandedBits.cpp
==
--- vendor/llvm/dist/lib/Analysis/DemandedBits.cpp  Wed Jan 27 20:23:42 
2016(r294937)
+++ vendor/llvm/dist/lib/Analysis/DemandedBits.cpp  Wed Jan 27 21:08:51 
2016(r294938)
@@ -244,7 +244,7 @@ void DemandedBits::determineLiveOperandB
 break;
   case Instruction::ICmp:
 // Count the number of leading zeroes in each operand.
-ComputeKnownBits(BitWidth, I, UserI->getOperand(1));
+ComputeKnownBits(BitWidth, UserI->getOperand(0), UserI->getOperand(1));
 auto NumLeadingZeroes = std::min(KnownZero.countLeadingOnes(),
  KnownZero2.countLeadingOnes());
 AB = ~APInt::getHighBitsSet(BitWidth, NumLeadingZeroes);

Modified: vendor/llvm/dist/lib/Analysis/ScalarEvolution.cpp
==
--- vendor/llvm/dist/lib/Analysis/ScalarEvolution.cpp   Wed Jan 27 20:23:42 
2016(r294937)
+++ vendor/llvm/dist/lib/Analysis/ScalarEvolution.cpp   Wed Jan 27 21:08:51 
2016(r294938)
@@ -5368,6 +5368,14 @@ ScalarEvolution::computeExitLimitFromCon
   BECount = EL0.Exact;
   }
 
+  // There are cases (e.g. PR26207) where computeExitLimitFromCond is able
+  // to be more aggressive when computing BECount than when computing
+  // MaxBECount.  In these cases it is possible for EL0.Exact and EL1.Exact
+  // to match, but for EL0.Max and EL1.Max to not.
+  if (isa(MaxBECount) &&
+  !isa(BECount))
+MaxBECount = BECount;
+
   return ExitLimit(BECount, MaxBECount);
 }
 if (BO->getOpcode() == Instruction::Or) {

Modified: vendor/llvm/dist/lib/Target/AMDGPU/AMDGPU.td
==
--- vendor/llvm/dist/lib/Target/AMDGPU/AMDGPU.tdWed Jan 27 20:23:42 
2016(r294937)
+++ vendor/llvm/dist/lib/Target/AMDGPU/AMDGPU.tdWed Jan 27 21:08:51 
2016(r294938)
@@ -138,6 +138,11 @@ def FeatureEnableHugeScratchBuffer : Sub
 "true",
 "Enable scratch buffer sizes greater than 128 GB">;
 
+def FeatureEnableSIScheduler : SubtargetFeature<"si-scheduler",
+"EnableSIScheduler",
+"true",
+"Enable SI Machine Scheduler">;
+
 class SubtargetFeatureFetchLimit  :
   SubtargetFeature <"fetch"#Value,
 "TexVTXClauseSize",

Modified: vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
==
--- vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUSubtarget.cpp  Wed Jan 27 
20:23:42 2016(r294937)
+++ vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUSubtarget.cpp  Wed Jan 27 
21:08:51 2016(r294938)
@@ -78,7 +78,7 @@ AMDGPUSubtarget::AMDGPUSubtarget(const T
   EnableVGPRSpilling(false), SGPRInitBug(false), IsGCN(false),
   GCN1Encoding(false), GCN3Encoding(false), CIInsts(false), 
LDSBankCount(0),

svn commit: r294939 - vendor/llvm/llvm-release_38-r258968

2016-01-27 Thread Dimitry Andric
Author: dim
Date: Wed Jan 27 21:09:14 2016
New Revision: 294939
URL: https://svnweb.freebsd.org/changeset/base/294939

Log:
  Tag llvm release_38 branch r258968.

Added:
  vendor/llvm/llvm-release_38-r258968/
 - copied from r294938, vendor/llvm/dist/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r294947 - vendor/lld/dist/docs

2016-01-27 Thread Dimitry Andric
Author: dim
Date: Wed Jan 27 21:11:38 2016
New Revision: 294947
URL: https://svnweb.freebsd.org/changeset/base/294947

Log:
  Vendor import of lld release_38 branch r258968:
  https://llvm.org/svn/llvm-project/lld/branches/release_38@258968

Modified:
  vendor/lld/dist/docs/getting_started.rst

Modified: vendor/lld/dist/docs/getting_started.rst
==
--- vendor/lld/dist/docs/getting_started.rstWed Jan 27 21:11:18 2016
(r294946)
+++ vendor/lld/dist/docs/getting_started.rstWed Jan 27 21:11:38 2016
(r294947)
@@ -68,7 +68,7 @@ Using Visual Studio
   * `Python 2.4`_\+ (not 3.x) for running tests.
 
 .. _CMake 2.8: http://www.cmake.org/cmake/resources/software.html
-.. _Visual Studio 11 (2012) or later: 
http://www.microsoft.com/visualstudio/11/en-us
+.. _Visual Studio 12 (2013) or later: 
http://www.microsoft.com/visualstudio/11/en-us
 .. _Python 2.4: http://python.org/download/
 
 #. Check out LLVM::
___
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: r294945 - in vendor/libc++/dist/test/std: input.output/file.streams/fstreams/filebuf.virtuals input.output/iostream.format/ext.manip input.output/iostreams.base/ios.base/ios.base.callba...

2016-01-27 Thread Dimitry Andric
Author: dim
Date: Wed Jan 27 21:10:55 2016
New Revision: 294945
URL: https://svnweb.freebsd.org/changeset/base/294945

Log:
  Vendor import of libc++ release_38 branch r258968:
  https://llvm.org/svn/llvm-project/libcxx/branches/release_38@258968

Modified:
  
vendor/libc++/dist/test/std/input.output/file.streams/fstreams/filebuf.virtuals/overflow.pass.cpp
  
vendor/libc++/dist/test/std/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp
  
vendor/libc++/dist/test/std/input.output/iostream.format/ext.manip/get_time.pass.cpp
  
vendor/libc++/dist/test/std/input.output/iostream.format/ext.manip/put_time.pass.cpp
  
vendor/libc++/dist/test/std/input.output/iostreams.base/ios.base/ios.base.callback/register_callback.pass.cpp
  
vendor/libc++/dist/test/std/input.output/iostreams.base/ios.base/ios.base.locales/imbue.pass.cpp
  
vendor/libc++/dist/test/std/input.output/iostreams.base/ios/basic.ios.members/imbue.pass.cpp
  
vendor/libc++/dist/test/std/input.output/stream.buffers/streambuf/streambuf.cons/copy.pass.cpp
  
vendor/libc++/dist/test/std/input.output/stream.buffers/streambuf/streambuf.cons/default.pass.cpp
  
vendor/libc++/dist/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.assign/assign.pass.cpp
  
vendor/libc++/dist/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.assign/swap.pass.cpp
  
vendor/libc++/dist/test/std/localization/locale.categories/category.collate/locale.collate.byname/hash.pass.cpp
  
vendor/libc++/dist/test/std/localization/locale.categories/category.collate/locale.collate.byname/types.pass.cpp
  
vendor/libc++/dist/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_wchar_t.pass.cpp
  
vendor/libc++/dist/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/types.pass.cpp
  
vendor/libc++/dist/test/std/localization/locales/locale/locale.cons/default.pass.cpp
  
vendor/libc++/dist/test/std/localization/locales/locale/locale.cons/locale_string_cat.pass.cpp
  
vendor/libc++/dist/test/std/localization/locales/locale/locale.members/name.pass.cpp
  
vendor/libc++/dist/test/std/localization/locales/locale/locale.operators/eq.pass.cpp
  
vendor/libc++/dist/test/std/localization/locales/locale/locale.statics/global.pass.cpp
  vendor/libc++/dist/test/std/re/re.regex/re.regex.locale/imbue.pass.cpp
  vendor/libc++/dist/test/std/re/re.traits/default.pass.cpp
  vendor/libc++/dist/test/std/re/re.traits/getloc.pass.cpp
  vendor/libc++/dist/test/std/re/re.traits/imbue.pass.cpp

Modified: 
vendor/libc++/dist/test/std/input.output/file.streams/fstreams/filebuf.virtuals/overflow.pass.cpp
==
--- 
vendor/libc++/dist/test/std/input.output/file.streams/fstreams/filebuf.virtuals/overflow.pass.cpp
   Wed Jan 27 21:10:40 2016(r294944)
+++ 
vendor/libc++/dist/test/std/input.output/file.streams/fstreams/filebuf.virtuals/overflow.pass.cpp
   Wed Jan 27 21:10:55 2016(r294945)
@@ -7,6 +7,8 @@
 //
 
//===--===//
 
+// REQUIRES: locale.en_US.UTF-8
+
 // 
 
 // int_type overflow(int_type c = traits::eof());

Modified: 
vendor/libc++/dist/test/std/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp
==
--- 
vendor/libc++/dist/test/std/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp
  Wed Jan 27 21:10:40 2016(r294944)
+++ 
vendor/libc++/dist/test/std/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp
  Wed Jan 27 21:10:55 2016(r294945)
@@ -7,6 +7,8 @@
 //
 
//===--===//
 
+// REQUIRES: locale.en_US.UTF-8
+
 // 
 
 // int_type underflow();

Modified: 
vendor/libc++/dist/test/std/input.output/iostream.format/ext.manip/get_time.pass.cpp
==
--- 
vendor/libc++/dist/test/std/input.output/iostream.format/ext.manip/get_time.pass.cpp
Wed Jan 27 21:10:40 2016(r294944)
+++ 
vendor/libc++/dist/test/std/input.output/iostream.format/ext.manip/get_time.pass.cpp
Wed Jan 27 21:10:55 2016(r294945)
@@ -7,6 +7,8 @@
 //
 
//===--===//
 
+// REQUIRES: locale.en_US.UTF-8
+
 // 
 
 // template  T9 get_time(struct tm* tmb, const charT* fmt);

Modified: 
vendor/libc++/dist/test/std/input.output/iostream.format/ext.manip/put_time.pass.cpp
==
--- 
vendor/libc++/dist/test/std/input.output/iostream.format/ext.manip/put_time.pass.cpp
Wed Jan 27 21:10:40 2016(r294944)
+++ 
vendor/libc++/dist/test/std/input.output/iostream.format/ext.manip/put_time.pass.cpp
Wed Jan 27 21:10:55 2016  

svn commit: r294946 - vendor/libc++/libc++-release_38-r258968

2016-01-27 Thread Dimitry Andric
Author: dim
Date: Wed Jan 27 21:11:18 2016
New Revision: 294946
URL: https://svnweb.freebsd.org/changeset/base/294946

Log:
  Tag libc++ release_38 branch r258968.

Added:
  vendor/libc++/libc++-release_38-r258968/
 - copied from r294945, vendor/libc++/dist/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r294944 - vendor/compiler-rt/compiler-rt-release_38-r258968

2016-01-27 Thread Dimitry Andric
Author: dim
Date: Wed Jan 27 21:10:40 2016
New Revision: 294944
URL: https://svnweb.freebsd.org/changeset/base/294944

Log:
  Tag compiler-rt release_38 branch r258968.

Added:
  vendor/compiler-rt/compiler-rt-release_38-r258968/
 - copied from r294943, vendor/compiler-rt/dist/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r294952 - head/sys/dev/filemon

2016-01-27 Thread Bryan Drewery
Author: bdrewery
Date: Wed Jan 27 21:14:09 2016
New Revision: 294952
URL: https://svnweb.freebsd.org/changeset/base/294952

Log:
  filemon_ioctl: Lock the associated filemon handle before writing to it.
  
  Reported by:  mjg
  MFC after:2 weeks
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/filemon/filemon.c
  head/sys/dev/filemon/filemon_wrapper.c

Modified: head/sys/dev/filemon/filemon.c
==
--- head/sys/dev/filemon/filemon.c  Wed Jan 27 21:12:47 2016
(r294951)
+++ head/sys/dev/filemon/filemon.c  Wed Jan 27 21:14:09 2016
(r294952)
@@ -146,6 +146,8 @@ filemon_ioctl(struct cdev *dev, u_long c
if ((error = devfs_get_cdevpriv((void **) )) != 0)
return (error);
 
+   filemon_filemon_lock(filemon);
+
switch (cmd) {
/* Set the output file descriptor. */
case FILEMON_SET_FD:
@@ -177,6 +179,7 @@ filemon_ioctl(struct cdev *dev, u_long c
break;
}
 
+   filemon_filemon_unlock(filemon);
return (error);
 }
 

Modified: head/sys/dev/filemon/filemon_wrapper.c
==
--- head/sys/dev/filemon/filemon_wrapper.c  Wed Jan 27 21:12:47 2016
(r294951)
+++ head/sys/dev/filemon/filemon_wrapper.c  Wed Jan 27 21:14:09 2016
(r294952)
@@ -115,21 +115,14 @@ filemon_comment(struct filemon *filemon)
int len;
struct timeval now;
 
-   /* Load timestamp before locking.  Less accurate but less contention. */
getmicrotime();
 
-   /* Lock the found filemon structure. */
-   filemon_filemon_lock(filemon);
-
len = snprintf(filemon->msgbufr, sizeof(filemon->msgbufr),
"# filemon version %d\n# Target pid %d\n# Start %ju.%06ju\nV %d\n",
FILEMON_VERSION, curproc->p_pid, (uintmax_t)now.tv_sec,
(uintmax_t)now.tv_usec, FILEMON_VERSION);
 
filemon_output(filemon, filemon->msgbufr, len);
-
-   /* Unlock the found filemon structure. */
-   filemon_filemon_unlock(filemon);
 }
 
 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: r294954 - in head/sys: kern ufs/ffs

2016-01-27 Thread Kirk McKusick
Author: mckusick
Date: Wed Jan 27 21:23:01 2016
New Revision: 294954
URL: https://svnweb.freebsd.org/changeset/base/294954

Log:
  The bread() function was inconsistent about whether it would return
  a buffer pointer in the event of an error (for some errors it would
  return a buffer pointer and for other errors it would not return a
  buffer pointer). The cluster_read() function was similarly inconsistent.
  
  Clients of these functions were inconsistent in handling errors.
  Some would assume that no buffer was returned after an error and
  would thus lose buffers under certain error conditions. Others would
  assume that brelse() should always be called after an error and
  would thus panic the system under certain error conditions.
  
  To correct both of these problems with minimal code churn, bread()
  and cluster_write() now always free the buffer when returning an
  error thus ensuring that buffers will never be lost. The brelse()
  routine checks for being passed a NULL buffer pointer and silently
  returns to avoid panics. Thus both approaches to handling error
  returns from bread() and cluster_read() will work correctly.
  
  Future code should be written assuming that bread() and cluster_read()
  will never return a buffer with an error, so should not attempt to
  brelse() the buffer when an error is returned.
  
  Reviewed by: kib

Modified:
  head/sys/kern/vfs_bio.c
  head/sys/kern/vfs_cluster.c
  head/sys/ufs/ffs/ffs_inode.c

Modified: head/sys/kern/vfs_bio.c
==
--- head/sys/kern/vfs_bio.c Wed Jan 27 21:17:43 2016(r294953)
+++ head/sys/kern/vfs_bio.c Wed Jan 27 21:23:01 2016(r294954)
@@ -1809,6 +1809,8 @@ breada(struct vnode * vp, daddr_t * rabl
  * must clear BIO_ERROR and B_INVAL prior to initiating I/O.  If B_CACHE
  * is set, the buffer is valid and we do not have to do anything, see
  * getblk(). Also starts asynchronous I/O on read-ahead blocks.
+ *
+ * Always return a NULL buffer pointer (in bpp) when returning an error.
  */
 int
 breadn_flags(struct vnode *vp, daddr_t blkno, int size, daddr_t *rablkno,
@@ -1844,6 +1846,10 @@ breadn_flags(struct vnode *vp, daddr_t b
 
if (readwait) {
rv = bufwait(bp);
+   if (rv != 0) {
+   brelse(bp);
+   *bpp = NULL;
+   }
}
return (rv);
 }
@@ -2238,6 +2244,12 @@ brelse(struct buf *bp)
 {
int qindex;
 
+   /*
+* Many function erroneously call brelse with a NULL bp under rare
+* error conditions. Simply return when called with a NULL bp.
+*/
+   if (bp == NULL)
+   return;
CTR3(KTR_BUF, "brelse(%p) vp %p flags %X",
bp, bp->b_vp, bp->b_flags);
KASSERT(!(bp->b_flags & (B_CLUSTER|B_PAGING)),

Modified: head/sys/kern/vfs_cluster.c
==
--- head/sys/kern/vfs_cluster.c Wed Jan 27 21:17:43 2016(r294953)
+++ head/sys/kern/vfs_cluster.c Wed Jan 27 21:23:01 2016(r294954)
@@ -119,6 +119,8 @@ cluster_read(struct vnode *vp, u_quad_t 
 * get the requested block
 */
*bpp = reqbp = bp = getblk(vp, lblkno, size, 0, 0, gbflags);
+   if (bp == NULL)
+   return (EBUSY);
origblkno = lblkno;
 
/*
@@ -295,10 +297,18 @@ cluster_read(struct vnode *vp, u_quad_t 
curthread->td_ru.ru_inblock++;
}
 
-   if (reqbp)
-   return (bufwait(reqbp));
-   else
-   return (error);
+   if (reqbp) {
+   /*
+* Like bread, always brelse() the buffer when
+* returning an error.
+*/
+   error = bufwait(reqbp);
+   if (error != 0) {
+   brelse(reqbp);
+   *bpp = NULL;
+   }
+   }
+   return (error);
 }
 
 /*

Modified: head/sys/ufs/ffs/ffs_inode.c
==
--- head/sys/ufs/ffs/ffs_inode.cWed Jan 27 21:17:43 2016
(r294953)
+++ head/sys/ufs/ffs/ffs_inode.cWed Jan 27 21:23:01 2016
(r294954)
@@ -113,10 +113,8 @@ loop:
 fsbtodb(fs, ino_to_fsba(fs, ip->i_number)),
 (int) fs->fs_bsize, 0, 0, 0, NOCRED, flags, );
if (error != 0) {
-   if (error != EBUSY) {
-   brelse(bp);
+   if (error != EBUSY)
return (error);
-   }
KASSERT((IS_SNAPSHOT(ip)), ("EBUSY from non-snapshot"));
/*
 * Wait for our inode block to become available.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to 

svn commit: r294956 - head/sys/ufs/ffs

2016-01-27 Thread Kirk McKusick
Author: mckusick
Date: Wed Jan 27 21:27:05 2016
New Revision: 294956
URL: https://svnweb.freebsd.org/changeset/base/294956

Log:
  This fixes a bug in UFS2 exported NFS volumes. An NFS client can
  crash a server that has exported UFS2 by presenting a filehandle
  with an inode number that references an uninitialized inode in a
  cylinder group. The problem is that UFS2 only initializes blocks
  of inodes as they are first allocated and ffs_fhtovp() does not
  validate that the inode is in a range of inodes that have been
  initialized. Attempting to read an uninitialized inode gets random
  data from the disk. When the kernel tries to interpret it as an
  inode, panics often arise.
  
  Reported by: Christos Zoulas (from NetBSD)
  Reviewed by: kib

Modified:
  head/sys/ufs/ffs/ffs_vfsops.c

Modified: head/sys/ufs/ffs/ffs_vfsops.c
==
--- head/sys/ufs/ffs/ffs_vfsops.c   Wed Jan 27 21:24:45 2016
(r294955)
+++ head/sys/ufs/ffs/ffs_vfsops.c   Wed Jan 27 21:27:05 2016
(r294956)
@@ -1797,6 +1797,7 @@ ffs_vgetf(mp, ino, flags, vpp, ffs_flags
  *
  * Have to be really careful about stale file handles:
  * - check that the inode number is valid
+ * - for UFS2 check that the inode number is initialized
  * - call ffs_vget() to get the locked inode
  * - check for an unallocated inode (i_mode == 0)
  * - check that the given client host has export rights and return
@@ -1810,13 +1811,37 @@ ffs_fhtovp(mp, fhp, flags, vpp)
struct vnode **vpp;
 {
struct ufid *ufhp;
+   struct ufsmount *ump;
struct fs *fs;
+   struct cg *cgp;
+   struct buf *bp;
+   ino_t ino;
+   u_int cg;
+   int error;
 
ufhp = (struct ufid *)fhp;
-   fs = VFSTOUFS(mp)->um_fs;
-   if (ufhp->ufid_ino < ROOTINO ||
-   ufhp->ufid_ino >= fs->fs_ncg * fs->fs_ipg)
+   ino = ufhp->ufid_ino;
+   ump = VFSTOUFS(mp);
+   fs = ump->um_fs;
+   if (ino < ROOTINO || ino >= fs->fs_ncg * fs->fs_ipg)
+   return (ESTALE);
+   /*
+* Need to check if inode is initialized because UFS2 does lazy
+* initialization and nfs_fhtovp can offer arbitrary inode numbers.
+*/
+   if (fs->fs_magic != FS_UFS2_MAGIC)
+   return (ufs_fhtovp(mp, ufhp, flags, vpp));
+   cg = ino_to_cg(fs, ino);
+   error = bread(ump->um_devvp, fsbtodb(fs, cgtod(fs, cg)),
+   (int)fs->fs_cgsize, NOCRED, );
+   if (error)
+   return (error);
+   cgp = (struct cg *)bp->b_data;
+   if (!cg_chkmagic(cgp) || ino >= cg * fs->fs_ipg + cgp->cg_initediblk) {
+   brelse(bp);
return (ESTALE);
+   }
+   brelse(bp);
return (ufs_fhtovp(mp, ufhp, flags, vpp));
 }
 
___
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: r294957 - head/sys/dev/filemon

2016-01-27 Thread Bryan Drewery
Author: bdrewery
Date: Wed Jan 27 21:37:43 2016
New Revision: 294957
URL: https://svnweb.freebsd.org/changeset/base/294957

Log:
  filemon_dtr: Lock the associated filemon handle before writing to it.
  
  Reported by:  mjg
  MFC after:2 weeks
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/filemon/filemon.c

Modified: head/sys/dev/filemon/filemon.c
==
--- head/sys/dev/filemon/filemon.c  Wed Jan 27 21:27:05 2016
(r294956)
+++ head/sys/dev/filemon/filemon.c  Wed Jan 27 21:37:43 2016
(r294957)
@@ -126,14 +126,16 @@ filemon_dtr(void *data)
struct filemon *filemon = data;
 
if (filemon != NULL) {
-   struct file *fp = filemon->fp;
+   struct file *fp;
 
-   /* Get exclusive write access. */
+   /* Follow same locking order as filemon_pid_check. */
filemon_lock_write();
+   filemon_filemon_lock(filemon);
 
/* Remove from the in-use list. */
TAILQ_REMOVE(_inuse, filemon, link);
 
+   fp = filemon->fp;
filemon->fp = NULL;
filemon->pid = -1;
 
@@ -141,6 +143,7 @@ filemon_dtr(void *data)
TAILQ_INSERT_TAIL(_free, filemon, link);
 
/* Give up write access. */
+   filemon_filemon_unlock(filemon);
filemon_unlock_write();
 
if (fp != NULL)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r294893 - head/lib/libdpv

2016-01-27 Thread Ruslan Bukin
I get this with GCC 5.2.0:

/home/rb743/dev/freebsd-riscv/lib/libdpv/dialog_util.c:270:23: error: 
zero-length gnu_printf format string [-Werror=for
mat-zero-length]
   sprintf(dargv[n++], "");

Ruslan

On Wed, Jan 27, 2016 at 06:21:35AM +, Devin Teske wrote:
> Author: dteske
> Date: Wed Jan 27 06:21:35 2016
> New Revision: 294893
> URL: https://svnweb.freebsd.org/changeset/base/294893
> 
> Log:
>   Fix a crash if `-D' is used without `-t title'
>   
>   dialog(3)'s dlg_reallocate_gauge(), used both by dialog(3)'s dialog_gauge()
>   and dialog(1)'s `--gauge', will segmentation fault in strlen(3) if no title
>   is set for the widget. Reproducible with `dialog --gauge hi 6 20' (adding
>   `--title ""' is enough to prevent segmentation fault).
>   
>   MFC after:  3 days
>   X-MFC-to:   stable/10
> 
> Modified:
>   head/lib/libdpv/dialog_util.c
> 
> Modified: head/lib/libdpv/dialog_util.c
> ==
> --- head/lib/libdpv/dialog_util.c Wed Jan 27 06:16:53 2016
> (r294892)
> +++ head/lib/libdpv/dialog_util.c Wed Jan 27 06:21:35 2016
> (r294893)
> @@ -261,6 +261,13 @@ dialog_spawn_gauge(char *init_prompt, pi
>   errx(EXIT_FAILURE, "Out of memory?!");
>   sprintf(dargv[n++], "--title");
>   dargv[n++] = title;
> + } else {
> + if ((dargv[n] = malloc(8)) == NULL)
> + errx(EXIT_FAILURE, "Out of memory?!");
> + sprintf(dargv[n++], "--title");
> + if ((dargv[n] = malloc(8)) == NULL)
> + errx(EXIT_FAILURE, "Out of memory?!");
> + sprintf(dargv[n++], "");
>   }
>   if (backtitle != NULL) {
>   if ((dargv[n] = malloc(12)) == NULL)
> 

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


svn commit: r294908 - head/lib/libthread_db/arch/riscv

2016-01-27 Thread Ruslan Bukin
Author: br
Date: Wed Jan 27 10:34:07 2016
New Revision: 294908
URL: https://svnweb.freebsd.org/changeset/base/294908

Log:
  Add the RISC-V MD parts of libthread_db.
  
  Sponsored by: DARPA, AFRL
  Sponsored by: HEIF5
  Differential Revision:https://reviews.freebsd.org/D5064

Added:
  head/lib/libthread_db/arch/riscv/
  head/lib/libthread_db/arch/riscv/libpthread_md.c   (contents, props changed)

Added: head/lib/libthread_db/arch/riscv/libpthread_md.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/lib/libthread_db/arch/riscv/libpthread_md.cWed Jan 27 10:34:07 
2016(r294908)
@@ -0,0 +1,104 @@
+/*-
+ * Copyright (c) 2015 Ruslan Bukin 
+ * All rights reserved.
+ *
+ * Portions of this software were developed by SRI International and the
+ * University of Cambridge Computer Laboratory under DARPA/AFRL contract
+ * FA8750-10-C-0237 ("CTSRD"), as part of the DARPA CRASH research programme.
+ *
+ * Portions of this software were developed by the University of Cambridge
+ * Computer Laboratory as part of the CTSRD Project, with support from the
+ * UK Higher Education Innovation Fund (HEIF).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+#include 
+#include 
+#include 
+
+#include "libpthread_db.h"
+
+void
+pt_reg_to_ucontext(const struct reg *r, ucontext_t *uc)
+{
+   mcontext_t *mc;
+
+   mc = >uc_mcontext;
+
+   memcpy(mc->mc_gpregs.gp_t, r->t, sizeof(mc->mc_gpregs.gp_t));
+   memcpy(mc->mc_gpregs.gp_s, r->s, sizeof(mc->mc_gpregs.gp_s));
+   memcpy(mc->mc_gpregs.gp_a, r->a, sizeof(mc->mc_gpregs.gp_a));
+   mc->mc_gpregs.gp_ra = r->ra;
+   mc->mc_gpregs.gp_sp = r->sp;
+   mc->mc_gpregs.gp_gp = r->gp;
+   mc->mc_gpregs.gp_tp = r->tp;
+   mc->mc_gpregs.gp_sepc = r->sepc;
+   mc->mc_gpregs.gp_sstatus = r->sstatus;
+}
+
+void
+pt_ucontext_to_reg(const ucontext_t *uc, struct reg *r)
+{
+   const mcontext_t *mc;
+
+   mc = >uc_mcontext;
+
+   memcpy(r->t, mc->mc_gpregs.gp_t, sizeof(mc->mc_gpregs.gp_t));
+   memcpy(r->s, mc->mc_gpregs.gp_s, sizeof(mc->mc_gpregs.gp_s));
+   memcpy(r->a, mc->mc_gpregs.gp_a, sizeof(mc->mc_gpregs.gp_a));
+   r->ra = mc->mc_gpregs.gp_ra;
+   r->sp = mc->mc_gpregs.gp_sp;
+   r->gp = mc->mc_gpregs.gp_gp;
+   r->tp = mc->mc_gpregs.gp_tp;
+   r->sepc = mc->mc_gpregs.gp_sepc;
+   r->sstatus = mc->mc_gpregs.gp_sstatus;
+}
+
+void
+pt_fpreg_to_ucontext(const struct fpreg *r __unused, ucontext_t *uc __unused)
+{
+
+   /* RISCVTODO */
+}
+
+void
+pt_ucontext_to_fpreg(const ucontext_t *uc __unused, struct fpreg *r __unused)
+{
+
+   /* RISCVTODO */
+}
+
+void
+pt_md_init(void)
+{
+}
+
+int
+pt_reg_sstep(struct reg *reg __unused, int step __unused)
+{
+
+   return (0);
+}
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r294909 - head/crypto/openssh

2016-01-27 Thread Dag-Erling Smørgrav
Steven Hartland  writes:
> While I can guess the reason, it would be nice to document the reason
> on things like this :-)

Because it used to be on, and people who relied on it were locked out
after upgrading.  We can consider turning it back off before 11, with
sufficient advance warning (and possibly code in /etc/rc.d/sshd that
looks for and warns about host names in sshd_config and root's
authorized_keys).

DES
-- 
Dag-Erling Smørgrav - d...@des.no
___
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: r294915 - head/sys/conf

2016-01-27 Thread Hans Petter Selasky
Author: hselasky
Date: Wed Jan 27 14:46:30 2016
New Revision: 294915
URL: https://svnweb.freebsd.org/changeset/base/294915

Log:
  Fix generation of dependency rules for the LinuxKPI, the MLX5 driver
  and all of OFED except MLX4[EN/IB].
  
  Sponsored by: Mellanox Technologies
  MFC after:1 week

Modified:
  head/sys/conf/files
  head/sys/conf/kern.post.mk

Modified: head/sys/conf/files
==
--- head/sys/conf/files Wed Jan 27 14:16:13 2016(r294914)
+++ head/sys/conf/files Wed Jan 27 14:46:30 2016(r294915)
@@ -3821,133 +3821,96 @@ nlm/sm_inter_xdr.c optional nfslockd | 
 
 # Linux Kernel Programming Interface
 compat/linuxkpi/common/src/linux_kmod.coptional 
compat_linuxkpi \
-   no-depend compile-with "${LINUXKPI_C}"
+   compile-with "${LINUXKPI_C}"
 compat/linuxkpi/common/src/linux_compat.c  optional compat_linuxkpi \
-   no-depend compile-with "${LINUXKPI_C}"
+   compile-with "${LINUXKPI_C}"
 compat/linuxkpi/common/src/linux_pci.c optional compat_linuxkpi pci \
-   no-depend compile-with "${LINUXKPI_C}"
+   compile-with "${LINUXKPI_C}"
 compat/linuxkpi/common/src/linux_idr.c optional compat_linuxkpi \
-   no-depend compile-with "${LINUXKPI_C}"
+   compile-with "${LINUXKPI_C}"
 compat/linuxkpi/common/src/linux_radix.c   optional compat_linuxkpi \
-   no-depend compile-with "${LINUXKPI_C}"
+   compile-with "${LINUXKPI_C}"
 compat/linuxkpi/common/src/linux_usb.c optional compat_linuxkpi usb \
-   no-depend compile-with "${LINUXKPI_C}"
+   compile-with "${LINUXKPI_C}"
 
 # OpenFabrics Enterprise Distribution (Infiniband)
 ofed/drivers/infiniband/core/addr.coptional ofed   \
-   no-depend   \
compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/"
 ofed/drivers/infiniband/core/agent.c   optional ofed   \
-   no-depend   \
compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/"
 ofed/drivers/infiniband/core/cache.c   optional ofed   \
-   no-depend   \
compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/"
 # XXX Mad.c must be ordered before cm.c for sysinit sets to occur in
 # the correct order.
 ofed/drivers/infiniband/core/mad.c optional ofed   \
-   no-depend   \
compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/"
 ofed/drivers/infiniband/core/cm.c  optional ofed   \
-   no-depend   \
compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/ 
-Wno-unused-function"
 ofed/drivers/infiniband/core/cma.c optional ofed   \
-   no-depend   \
compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/"
 ofed/drivers/infiniband/core/device.c  optional ofed   \
-   no-depend   \
compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/"
 ofed/drivers/infiniband/core/fmr_pool.coptional ofed   
\
-   no-depend   \
compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/"
 ofed/drivers/infiniband/core/iwcm.coptional ofed   \
-   no-depend   \
compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/"
 ofed/drivers/infiniband/core/mad_rmpp.coptional ofed   
\
-   no-depend   \
compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/"
 ofed/drivers/infiniband/core/multicast.c   optional ofed   \
-   no-depend   \
compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/"
 ofed/drivers/infiniband/core/packer.c  optional ofed   \
-   no-depend   \
compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/"
 ofed/drivers/infiniband/core/peer_mem.coptional ofed   
\
-   no-depend   \
compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/"
 ofed/drivers/infiniband/core/sa_query.coptional ofed   
\
-   no-depend   \
compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/"
 ofed/drivers/infiniband/core/smi.c optional ofed   \
-  

svn commit: r294916 - head/share/misc

2016-01-27 Thread Svatopluk Kraus
Author: skra
Date: Wed Jan 27 14:47:00 2016
New Revision: 294916
URL: https://svnweb.freebsd.org/changeset/base/294916

Log:
  Fix my email.

Modified:
  head/share/misc/committers-src.dot

Modified: head/share/misc/committers-src.dot
==
--- head/share/misc/committers-src.dot  Wed Jan 27 14:46:30 2016
(r294915)
+++ head/share/misc/committers-src.dot  Wed Jan 27 14:47:00 2016
(r294916)
@@ -288,7 +288,7 @@ sephe [label="Sepherosa Ziehau\nsephe@Fr
 sepotvin [label="Stephane E. Potvin\nsepot...@freebsd.org\n2007/02/15"]
 simon [label="Simon L. Nielsen\nsi...@freebsd.org\n2006/03/07"]
 sjg [label="Simon J. Gerraty\n...@freebsd.org\n2012/10/23"]
-skra [label="Svatopluk Kraus\n...@freebsd.org\n2015/10/28"]
+skra [label="Svatopluk Kraus\ns...@freebsd.org\n2015/10/28"]
 slm [label="Stephen McConnell\n...@freebsd.org\n2014/05/07"]
 smh [label="Steven Hartland\n...@freebsd.org\n2012/11/12"]
 sobomax [label="Maxim Sobolev\nsobo...@freebsd.org\n2001/07/25"]
___
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: r294909 - head/crypto/openssh

2016-01-27 Thread Slawa Olhovchenkov
On Wed, Jan 27, 2016 at 01:56:39PM +, Steven Hartland wrote:

> While I can guess the reason, it would be nice to document the reason on 
> things like this :-)

Or use more clear commit message (on stable/10 UseDNS is on by
default, but nothing about relation to host names in
~/.ssh/known_hosts).

> On 27/01/2016 13:40, Dag-Erling Smørgrav wrote:
> > Author: des
> > Date: Wed Jan 27 13:40:44 2016
> > New Revision: 294909
> > URL: https://svnweb.freebsd.org/changeset/base/294909
> >
> > Log:
> >Switch UseDNS back on
> >
> > Modified:
> >head/crypto/openssh/FREEBSD-upgrade
> >head/crypto/openssh/servconf.c
> >head/crypto/openssh/sshd_config
> >head/crypto/openssh/sshd_config.5
> >
> > Modified: head/crypto/openssh/FREEBSD-upgrade
> > ==
> > --- head/crypto/openssh/FREEBSD-upgrade Wed Jan 27 10:34:07 2016
> > (r294908)
> > +++ head/crypto/openssh/FREEBSD-upgrade Wed Jan 27 13:40:44 2016
> > (r294909)
> > @@ -117,6 +117,7 @@
> > - PasswordAuthentication defaults to "no".
> > - VersionAddendum defaults to "FreeBSD-MMDD".
> > - PrivilegeSeparation defaults to "sandbox".
> > +  - UseDNS defaults to "yes".
> >   
> >   2) Modified client-side defaults
> >   
> >
> > Modified: head/crypto/openssh/servconf.c
> > ==
> > --- head/crypto/openssh/servconf.c  Wed Jan 27 10:34:07 2016
> > (r294908)
> > +++ head/crypto/openssh/servconf.c  Wed Jan 27 13:40:44 2016
> > (r294909)
> > @@ -320,7 +320,7 @@ fill_default_server_options(ServerOption
> > if (options->max_sessions == -1)
> > options->max_sessions = DEFAULT_SESSIONS_MAX;
> > if (options->use_dns == -1)
> > -   options->use_dns = 0;
> > +   options->use_dns = 1;
> > if (options->client_alive_interval == -1)
> > options->client_alive_interval = 0;
> > if (options->client_alive_count_max == -1)
> >
> > Modified: head/crypto/openssh/sshd_config
> > ==
> > --- head/crypto/openssh/sshd_config Wed Jan 27 10:34:07 2016
> > (r294908)
> > +++ head/crypto/openssh/sshd_config Wed Jan 27 13:40:44 2016
> > (r294909)
> > @@ -115,7 +115,7 @@
> >   #Compression delayed
> >   #ClientAliveInterval 0
> >   #ClientAliveCountMax 3
> > -#UseDNS no
> > +#UseDNS yes
> >   #PidFile /var/run/sshd.pid
> >   #MaxStartups 10:30:100
> >   #PermitTunnel no
> >
> > Modified: head/crypto/openssh/sshd_config.5
> > ==
> > --- head/crypto/openssh/sshd_config.5   Wed Jan 27 10:34:07 2016
> > (r294908)
> > +++ head/crypto/openssh/sshd_config.5   Wed Jan 27 13:40:44 2016
> > (r294909)
> > @@ -1541,8 +1541,8 @@ the resolved host name for the remote IP
> >   very same IP address.
> >   .Pp
> >   If this option is set to
> > -.Dq no
> > -(the default) then only addresses and not host names may be used in
> > +.Dq no ,
> > +then only addresses and not host names may be used in
> >   .Pa ~/.ssh/known_hosts
> >   .Cm from
> >   and
> > @@ -1550,6 +1550,8 @@ and
> >   .Cm Match
> >   .Cm Host
> >   directives.
> > +The default is
> > +.Dq yes .
> >   .It Cm UseLogin
> >   Specifies whether
> >   .Xr login 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-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: r294912 - head/lib/libthr/arch/riscv/include

2016-01-27 Thread Ruslan Bukin
Author: br
Date: Wed Jan 27 14:10:50 2016
New Revision: 294912
URL: https://svnweb.freebsd.org/changeset/base/294912

Log:
  Add pthread MD part for RISC-V.
  
  Reviewed by:  andrew
  Sponsored by: DARPA, AFRL
  Sponsored by: HEIF5
  Differential Revision:https://reviews.freebsd.org/D5063

Added:
  head/lib/libthr/arch/riscv/include/
  head/lib/libthr/arch/riscv/include/pthread_md.h   (contents, props changed)

Added: head/lib/libthr/arch/riscv/include/pthread_md.h
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/lib/libthr/arch/riscv/include/pthread_md.h Wed Jan 27 14:10:50 
2016(r294912)
@@ -0,0 +1,92 @@
+/*-
+ * Copyright (c) 2005 David Xu 
+ * Copyright (c) 2015 Ruslan Bukin 
+ * All rights reserved.
+ *
+ * Portions of this software were developed by SRI International and the
+ * University of Cambridge Computer Laboratory under DARPA/AFRL contract
+ * FA8750-10-C-0237 ("CTSRD"), as part of the DARPA CRASH research programme.
+ *
+ * Portions of this software were developed by the University of Cambridge
+ * Computer Laboratory as part of the CTSRD Project, with support from the
+ * UK Higher Education Innovation Fund (HEIF).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+/*
+ * Machine-dependent thread prototypes/definitions.
+ */
+#ifndef _PTHREAD_MD_H_
+#define_PTHREAD_MD_H_
+
+#include 
+#include 
+
+#defineCPU_SPINWAIT
+#defineDTV_OFFSET  offsetof(struct tcb, tcb_dtv)
+#defineTP_OFFSET   0x10
+
+/*
+ * Variant I tcb. The structure layout is fixed, don't blindly
+ * change it!
+ */
+struct tcb {
+   void*tcb_dtv;
+   struct pthread  *tcb_thread;
+};
+
+/* Called from the thread to set its private data. */
+static __inline void
+_tcb_set(struct tcb *tcb)
+{
+
+   __asm __volatile("mv tp, %0" :: "r"((uint8_t *)tcb + TP_OFFSET));
+}
+
+/*
+ * Get the current tcb.
+ */
+static __inline struct tcb *
+_tcb_get(void)
+{
+   register uint8_t *_tp;
+
+   __asm __volatile("mv %0, tp" : "=r"(_tp));
+
+   return ((struct tcb *)(_tp - TP_OFFSET));
+}
+
+extern struct pthread *_thr_initial;
+
+static __inline struct pthread *
+_get_curthread(void)
+{
+
+   if (_thr_initial)
+   return (_tcb_get()->tcb_thread);
+   return (NULL);
+}
+
+#endif /* _PTHREAD_MD_H_ */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r294913 - in stable: 10/release/doc/share/xml 9/release/doc/share/xml

2016-01-27 Thread Glen Barber
Author: gjb
Date: Wed Jan 27 14:12:10 2016
New Revision: 294913
URL: https://svnweb.freebsd.org/changeset/base/294913

Log:
  Document SA-16:08, SA-16:09, SA-16:10.
  
  Sponsored by: The FreeBSD Foundation

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

Changes in other areas also in this revision:
Modified:
  stable/9/release/doc/share/xml/security.xml

Modified: stable/10/release/doc/share/xml/security.xml
==
--- stable/10/release/doc/share/xml/security.xmlWed Jan 27 14:10:50 
2016(r294912)
+++ stable/10/release/doc/share/xml/security.xmlWed Jan 27 14:12:10 
2016(r294913)
@@ -107,6 +107,21 @@
OpenSSH client
information leak
   
+
+  
+   FreeBSD-SA-16:09.ntp
+   27January2016
+   Multiple vulnerabilities.
+  
+
+  
+   FreeBSD-SA-16:10.linux
+   27January2016
+system call
+   vulnerability.
+  
 
   
 
___
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: r294913 - in stable: 10/release/doc/share/xml 9/release/doc/share/xml

2016-01-27 Thread Glen Barber
Author: gjb
Date: Wed Jan 27 14:12:10 2016
New Revision: 294913
URL: https://svnweb.freebsd.org/changeset/base/294913

Log:
  Document SA-16:08, SA-16:09, SA-16:10.
  
  Sponsored by: The FreeBSD Foundation

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

Changes in other areas also in this revision:
Modified:
  stable/10/release/doc/share/xml/security.xml

Modified: stable/9/release/doc/share/xml/security.xml
==
--- stable/9/release/doc/share/xml/security.xml Wed Jan 27 14:10:50 2016
(r294912)
+++ stable/9/release/doc/share/xml/security.xml Wed Jan 27 14:12:10 2016
(r294913)
@@ -313,6 +313,29 @@
OpenSSH client
information leak
   
+
+  
+   FreeBSD-SA-16:08.bind
+   27January2016
+   Remote denial of service
+   vulnerability.
+  
+
+  
+   FreeBSD-SA-16:09.ntp
+   27January2016
+   Multiple vulnerabilities.
+  
+
+  
+   FreeBSD-SA-16:10.linux
+   27January2016
+system call
+   vulnerability.
+  
 
   
 
___
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: r294910 - stable/10/lib/libc/net

2016-01-27 Thread Michael Tuexen
Author: tuexen
Date: Wed Jan 27 13:59:27 2016
New Revision: 294910
URL: https://svnweb.freebsd.org/changeset/base/294910

Log:
  MFC r294688:
  sctp_sendv() needs to fill in the association id on return.

Modified:
  stable/10/lib/libc/net/sctp_sys_calls.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/net/sctp_sys_calls.c
==
--- stable/10/lib/libc/net/sctp_sys_calls.c Wed Jan 27 13:40:44 2016
(r294909)
+++ stable/10/lib/libc/net/sctp_sys_calls.c Wed Jan 27 13:59:27 2016
(r294910)
@@ -984,6 +984,7 @@ sctp_sendv(int sd,
struct sockaddr *addr;
struct sockaddr_in *addr_in;
struct sockaddr_in6 *addr_in6;
+   sctp_assoc_t *assoc_id;
 
if ((addrcnt < 0) ||
(iovcnt < 0) ||
@@ -1002,6 +1003,7 @@ sctp_sendv(int sd,
errno = ENOMEM;
return (-1);
}
+   assoc_id = NULL;
msg.msg_control = cmsgbuf;
msg.msg_controllen = 0;
cmsg = (struct cmsghdr *)cmsgbuf;
@@ -1025,6 +1027,7 @@ sctp_sendv(int sd,
memcpy(CMSG_DATA(cmsg), info, sizeof(struct sctp_sndinfo));
msg.msg_controllen += CMSG_SPACE(sizeof(struct sctp_sndinfo));
cmsg = (struct cmsghdr *)((caddr_t)cmsg + 
CMSG_SPACE(sizeof(struct sctp_sndinfo)));
+   assoc_id = &(((struct sctp_sndinfo *)info)->snd_assoc_id);
break;
case SCTP_SENDV_PRINFO:
if ((info == NULL) || (infolen < sizeof(struct sctp_prinfo))) {
@@ -1066,6 +1069,7 @@ sctp_sendv(int sd,
memcpy(CMSG_DATA(cmsg), _info->sendv_sndinfo, 
sizeof(struct sctp_sndinfo));
msg.msg_controllen += CMSG_SPACE(sizeof(struct 
sctp_sndinfo));
cmsg = (struct cmsghdr *)((caddr_t)cmsg + 
CMSG_SPACE(sizeof(struct sctp_sndinfo)));
+   assoc_id = &(spa_info->sendv_sndinfo.snd_assoc_id);
}
if (spa_info->sendv_flags & SCTP_SEND_PRINFO_VALID) {
cmsg->cmsg_level = IPPROTO_SCTP;
@@ -1164,6 +1168,9 @@ sctp_sendv(int sd,
msg.msg_flags = 0;
ret = sendmsg(sd, , flags);
free(cmsgbuf);
+   if ((ret >= 0) && (addrs != NULL) && (assoc_id != NULL)) {
+   *assoc_id = sctp_getassocid(sd, addrs);
+   }
return (ret);
 }
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r294911 - stable/10/lib/libc/net

2016-01-27 Thread Michael Tuexen
Author: tuexen
Date: Wed Jan 27 14:01:21 2016
New Revision: 294911
URL: https://svnweb.freebsd.org/changeset/base/294911

Log:
  MFC r294694:
  sctp_sendx() needs to provide the assoc_id back.

Modified:
  stable/10/lib/libc/net/sctp_sys_calls.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/net/sctp_sys_calls.c
==
--- stable/10/lib/libc/net/sctp_sys_calls.c Wed Jan 27 13:59:27 2016
(r294910)
+++ stable/10/lib/libc/net/sctp_sys_calls.c Wed Jan 27 14:01:21 2016
(r294911)
@@ -700,14 +700,19 @@ sctp_sendx(int sd, const void *msg, size
 #ifdef SYS_sctp_generic_sendmsg
if (addrcnt == 1) {
socklen_t l;
+   ssize_t ret;
 
/*
 * Quick way, we don't need to do a connectx so lets use the
 * syscall directly.
 */
l = addrs->sa_len;
-   return (syscall(SYS_sctp_generic_sendmsg, sd,
-   msg, msg_len, addrs, l, sinfo, flags));
+   ret = syscall(SYS_sctp_generic_sendmsg, sd,
+   msg, msg_len, addrs, l, sinfo, flags);
+   if ((ret >= 0) && (sinfo != NULL)) {
+   sinfo->sinfo_assoc_id = sctp_getassocid(sd, addrs);
+   }
+   return (ret);
}
 #endif
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r294909 - head/crypto/openssh

2016-01-27 Thread Steven Hartland
While I can guess the reason, it would be nice to document the reason on 
things like this :-)


Regards
Steve

On 27/01/2016 13:40, Dag-Erling Smørgrav wrote:

Author: des
Date: Wed Jan 27 13:40:44 2016
New Revision: 294909
URL: https://svnweb.freebsd.org/changeset/base/294909

Log:
   Switch UseDNS back on

Modified:
   head/crypto/openssh/FREEBSD-upgrade
   head/crypto/openssh/servconf.c
   head/crypto/openssh/sshd_config
   head/crypto/openssh/sshd_config.5

Modified: head/crypto/openssh/FREEBSD-upgrade
==
--- head/crypto/openssh/FREEBSD-upgrade Wed Jan 27 10:34:07 2016
(r294908)
+++ head/crypto/openssh/FREEBSD-upgrade Wed Jan 27 13:40:44 2016
(r294909)
@@ -117,6 +117,7 @@
- PasswordAuthentication defaults to "no".
- VersionAddendum defaults to "FreeBSD-MMDD".
- PrivilegeSeparation defaults to "sandbox".
+  - UseDNS defaults to "yes".
  
  2) Modified client-side defaults
  


Modified: head/crypto/openssh/servconf.c
==
--- head/crypto/openssh/servconf.c  Wed Jan 27 10:34:07 2016
(r294908)
+++ head/crypto/openssh/servconf.c  Wed Jan 27 13:40:44 2016
(r294909)
@@ -320,7 +320,7 @@ fill_default_server_options(ServerOption
if (options->max_sessions == -1)
options->max_sessions = DEFAULT_SESSIONS_MAX;
if (options->use_dns == -1)
-   options->use_dns = 0;
+   options->use_dns = 1;
if (options->client_alive_interval == -1)
options->client_alive_interval = 0;
if (options->client_alive_count_max == -1)

Modified: head/crypto/openssh/sshd_config
==
--- head/crypto/openssh/sshd_config Wed Jan 27 10:34:07 2016
(r294908)
+++ head/crypto/openssh/sshd_config Wed Jan 27 13:40:44 2016
(r294909)
@@ -115,7 +115,7 @@
  #Compression delayed
  #ClientAliveInterval 0
  #ClientAliveCountMax 3
-#UseDNS no
+#UseDNS yes
  #PidFile /var/run/sshd.pid
  #MaxStartups 10:30:100
  #PermitTunnel no

Modified: head/crypto/openssh/sshd_config.5
==
--- head/crypto/openssh/sshd_config.5   Wed Jan 27 10:34:07 2016
(r294908)
+++ head/crypto/openssh/sshd_config.5   Wed Jan 27 13:40:44 2016
(r294909)
@@ -1541,8 +1541,8 @@ the resolved host name for the remote IP
  very same IP address.
  .Pp
  If this option is set to
-.Dq no
-(the default) then only addresses and not host names may be used in
+.Dq no ,
+then only addresses and not host names may be used in
  .Pa ~/.ssh/known_hosts
  .Cm from
  and
@@ -1550,6 +1550,8 @@ and
  .Cm Match
  .Cm Host
  directives.
+The default is
+.Dq yes .
  .It Cm UseLogin
  Specifies whether
  .Xr login 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"

Quick enquiry for gcu.info

2016-01-27 Thread james
Good morning,

I have been looking through your site and found from this page http://gcu.info/ 
a link to ietf.org, this got me thinking about the history of the internet and 
how it has changed. I then found this: 
http://www.evolutionoftheweb.com/?hl=en-gb which shows the timeline of how 
things have changed on the internet and I thought you may like this resource 
for you site? I also came accross a company that provides connectivity for 
businesses using internet phones, something I had no idea existed other than 
Skype. So I thought I would give you that link as well, as it might be helpful 
to your visitors. http://www.idtexpress.com/en/about#quality 

Please let me know if this was useful? Also I'm on the look out for resources 
people need in your industry, so if you have any idea's please let me know.

Kind regards

James

ALL GREEN PR LIMITED, 

Kemp House,

152 City Road,

London

EC1V 2NX

www.allgreenpr.com

 

 

 

Remove me from James's address book, don't worry he will not mind.

 

___
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: r294909 - head/crypto/openssh

2016-01-27 Thread Dag-Erling Smørgrav
Author: des
Date: Wed Jan 27 13:40:44 2016
New Revision: 294909
URL: https://svnweb.freebsd.org/changeset/base/294909

Log:
  Switch UseDNS back on

Modified:
  head/crypto/openssh/FREEBSD-upgrade
  head/crypto/openssh/servconf.c
  head/crypto/openssh/sshd_config
  head/crypto/openssh/sshd_config.5

Modified: head/crypto/openssh/FREEBSD-upgrade
==
--- head/crypto/openssh/FREEBSD-upgrade Wed Jan 27 10:34:07 2016
(r294908)
+++ head/crypto/openssh/FREEBSD-upgrade Wed Jan 27 13:40:44 2016
(r294909)
@@ -117,6 +117,7 @@
   - PasswordAuthentication defaults to "no".
   - VersionAddendum defaults to "FreeBSD-MMDD".
   - PrivilegeSeparation defaults to "sandbox".
+  - UseDNS defaults to "yes".
 
 2) Modified client-side defaults
 

Modified: head/crypto/openssh/servconf.c
==
--- head/crypto/openssh/servconf.c  Wed Jan 27 10:34:07 2016
(r294908)
+++ head/crypto/openssh/servconf.c  Wed Jan 27 13:40:44 2016
(r294909)
@@ -320,7 +320,7 @@ fill_default_server_options(ServerOption
if (options->max_sessions == -1)
options->max_sessions = DEFAULT_SESSIONS_MAX;
if (options->use_dns == -1)
-   options->use_dns = 0;
+   options->use_dns = 1;
if (options->client_alive_interval == -1)
options->client_alive_interval = 0;
if (options->client_alive_count_max == -1)

Modified: head/crypto/openssh/sshd_config
==
--- head/crypto/openssh/sshd_config Wed Jan 27 10:34:07 2016
(r294908)
+++ head/crypto/openssh/sshd_config Wed Jan 27 13:40:44 2016
(r294909)
@@ -115,7 +115,7 @@
 #Compression delayed
 #ClientAliveInterval 0
 #ClientAliveCountMax 3
-#UseDNS no
+#UseDNS yes
 #PidFile /var/run/sshd.pid
 #MaxStartups 10:30:100
 #PermitTunnel no

Modified: head/crypto/openssh/sshd_config.5
==
--- head/crypto/openssh/sshd_config.5   Wed Jan 27 10:34:07 2016
(r294908)
+++ head/crypto/openssh/sshd_config.5   Wed Jan 27 13:40:44 2016
(r294909)
@@ -1541,8 +1541,8 @@ the resolved host name for the remote IP
 very same IP address.
 .Pp
 If this option is set to
-.Dq no
-(the default) then only addresses and not host names may be used in
+.Dq no ,
+then only addresses and not host names may be used in
 .Pa ~/.ssh/known_hosts
 .Cm from
 and
@@ -1550,6 +1550,8 @@ and
 .Cm Match
 .Cm Host
 directives.
+The default is
+.Dq yes .
 .It Cm UseLogin
 Specifies whether
 .Xr login 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: r294917 - stable/10/sys/dev/mlx5/mlx5_en

2016-01-27 Thread Hans Petter Selasky
Author: hselasky
Date: Wed Jan 27 14:55:41 2016
New Revision: 294917
URL: https://svnweb.freebsd.org/changeset/base/294917

Log:
  MFC r294314:
  Allow RX and TX pause frames to be set through ifconfig.
  
  Sponsored by: Mellanox Technologies
  Differential Revision:https://reviews.freebsd.org/D4817

Modified:
  stable/10/sys/dev/mlx5/mlx5_en/en.h
  stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c
  stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/mlx5/mlx5_en/en.h
==
--- stable/10/sys/dev/mlx5/mlx5_en/en.h Wed Jan 27 14:47:00 2016
(r294916)
+++ stable/10/sys/dev/mlx5/mlx5_en/en.h Wed Jan 27 14:55:41 2016
(r294917)
@@ -375,11 +375,11 @@ struct mlx5e_params {
boolcqe_zipping_en;
u32 lro_wqe_sz;
u16 rx_hash_log_tbl_sz;
+   u32 tx_pauseframe_control;
+   u32 rx_pauseframe_control;
 };
 
 #defineMLX5E_PARAMS(m) 
\
-  m(+1, u64 tx_pauseframe_control, "tx_pauseframe_control", "Set to enable TX 
pause frames. Clear to disable.") \
-  m(+1, u64 rx_pauseframe_control, "rx_pauseframe_control", "Set to enable RX 
pause frames. Clear to disable.") \
   m(+1, u64 tx_queue_size_max, "tx_queue_size_max", "Max send queue size") \
   m(+1, u64 rx_queue_size_max, "rx_queue_size_max", "Max receive queue size") \
   m(+1, u64 tx_queue_size, "tx_queue_size", "Default send queue size") \

Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c
==
--- stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.cWed Jan 27 14:47:00 
2016(r294916)
+++ stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.cWed Jan 27 14:55:41 
2016(r294917)
@@ -113,21 +113,6 @@ mlx5e_ethtool_handler(SYSCTL_HANDLER_ARG
}
priv->params.tx_cq_moderation_pkts = 
priv->params_ethtool.tx_coalesce_pkts;
 
-   if (>params_ethtool.arg[arg2] == 
>params_ethtool.rx_pauseframe_control ||
-   >params_ethtool.arg[arg2] == 
>params_ethtool.tx_pauseframe_control) {
-   /* range check parameters */
-   priv->params_ethtool.rx_pauseframe_control =
-   priv->params_ethtool.rx_pauseframe_control ? 1 : 0;
-   priv->params_ethtool.tx_pauseframe_control =
-   priv->params_ethtool.tx_pauseframe_control ? 1 : 0;
-
-   /* update firmware */
-   error = -mlx5_set_port_pause(priv->mdev, 1,
-   priv->params_ethtool.rx_pauseframe_control,
-   priv->params_ethtool.tx_pauseframe_control);
-   goto done;
-   }
-
was_opened = test_bit(MLX5E_STATE_OPENED, >state);
if (was_opened) {
u64 *xarg = priv->params_ethtool.arg + arg2;

Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
==
--- stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c   Wed Jan 27 14:47:00 
2016(r294916)
+++ stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c   Wed Jan 27 14:55:41 
2016(r294917)
@@ -222,8 +222,8 @@ mlx5e_media_status(struct ifnet *dev, st
 
ifmr->ifm_status = priv->media_status_last;
ifmr->ifm_active = priv->media_active_last |
-   (priv->params_ethtool.rx_pauseframe_control ? IFM_ETH_RXPAUSE : 0) |
-   (priv->params_ethtool.tx_pauseframe_control ? IFM_ETH_TXPAUSE : 0);
+   (priv->params.rx_pauseframe_control ? IFM_ETH_RXPAUSE : 0) |
+   (priv->params.tx_pauseframe_control ? IFM_ETH_TXPAUSE : 0);
 
 }
 
@@ -250,6 +250,7 @@ mlx5e_media_change(struct ifnet *dev)
struct mlx5_core_dev *mdev = priv->mdev;
u32 eth_proto_cap;
u32 link_mode;
+   int was_opened;
int locked;
int error;
 
@@ -263,24 +264,45 @@ mlx5e_media_change(struct ifnet *dev)
}
link_mode = mlx5e_find_link_mode(IFM_SUBTYPE(priv->media.ifm_media));
 
+   /* query supported capabilities */
error = mlx5_query_port_proto_cap(mdev, _proto_cap, MLX5_PTYS_EN);
-   if (error) {
+   if (error != 0) {
if_printf(dev, "Query port media capability failed\n");
goto done;
}
-   if (IFM_SUBTYPE(priv->media.ifm_media) == IFM_AUTO)
+   /* check for autoselect */
+   if (IFM_SUBTYPE(priv->media.ifm_media) == IFM_AUTO) {
link_mode = eth_proto_cap;
-   else
+   if (link_mode == 0) {
+   if_printf(dev, "Port media capability is zero\n");
+   error = EINVAL;
+   goto done;
+   }
+   } else {
link_mode = link_mode & eth_proto_cap;
-
-   if (!link_mode) {
-   if_printf(dev, "Not supported link mode 

svn commit: r294918 - stable/10/sys/dev/mlx5/mlx5_en

2016-01-27 Thread Hans Petter Selasky
Author: hselasky
Date: Wed Jan 27 14:57:37 2016
New Revision: 294918
URL: https://svnweb.freebsd.org/changeset/base/294918

Log:
  MFC r294317:
  Declare local variables at top of function.
  
  Sponsored by: Mellanox Technologies
  Differential Revision:https://reviews.freebsd.org/D4939

Modified:
  stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c
==
--- stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c Wed Jan 27 14:55:41 2016
(r294917)
+++ stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c Wed Jan 27 14:57:37 2016
(r294918)
@@ -100,20 +100,23 @@ mlx5e_lro_update_hdr(struct mbuf *mb, st
/* TODO: consider vlans, ip options, ... */
struct ether_header *eh;
uint16_t eh_type;
+   uint16_t tot_len;
struct ip6_hdr *ip6 = NULL;
struct ip *ip4 = NULL;
struct tcphdr *th;
uint32_t *ts_ptr;
+   uint8_t l4_hdr_type;
+   int tcp_ack;
 
eh = mtod(mb, struct ether_header *);
eh_type = ntohs(eh->ether_type);
 
-   u8 l4_hdr_type = get_cqe_l4_hdr_type(cqe);
-   int tcp_ack = ((CQE_L4_HDR_TYPE_TCP_ACK_NO_DATA == l4_hdr_type) ||
+   l4_hdr_type = get_cqe_l4_hdr_type(cqe);
+   tcp_ack = ((CQE_L4_HDR_TYPE_TCP_ACK_NO_DATA == l4_hdr_type) ||
(CQE_L4_HDR_TYPE_TCP_ACK_AND_DATA == l4_hdr_type));
 
/* TODO: consider vlan */
-   u16 tot_len = be32_to_cpu(cqe->byte_cnt) - ETHER_HDR_LEN;
+   tot_len = be32_to_cpu(cqe->byte_cnt) - ETHER_HDR_LEN;
 
switch (eh_type) {
case ETHERTYPE_IP:
___
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: r294919 - stable/10/sys/dev/mlx5/mlx5_en

2016-01-27 Thread Hans Petter Selasky
Author: hselasky
Date: Wed Jan 27 14:59:22 2016
New Revision: 294919
URL: https://svnweb.freebsd.org/changeset/base/294919

Log:
  MFC r294318:
  Add clarifying comment about CQE zipping.
  
  Sponsored by: Mellanox Technologies
  Differential Revision:https://reviews.freebsd.org/D4940

Modified:
  stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c
==
--- stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c Wed Jan 27 14:57:37 2016
(r294918)
+++ stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c Wed Jan 27 14:59:22 2016
(r294919)
@@ -270,6 +270,11 @@ mlx5e_decompress_cqe(struct mlx5e_cq *cq
 struct mlx5_mini_cqe8 *mini,
 u16 wqe_counter, int i)
 {
+   /*
+* NOTE: The fields which are not set here are copied from the
+* initial and common title. See memcpy() in
+* mlx5e_write_cqe_slot().
+*/
title->byte_cnt = mini->byte_cnt;
title->wqe_counter = cpu_to_be16((wqe_counter + i) & cq->wq.sz_m1);
title->check_sum = mini->checksum;
___
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: r294920 - stable/10/sys/dev/mlx5/mlx5_en

2016-01-27 Thread Hans Petter Selasky
Author: hselasky
Date: Wed Jan 27 15:01:08 2016
New Revision: 294920
URL: https://svnweb.freebsd.org/changeset/base/294920

Log:
  MFC r294319:
  Fix an issue where the network adapter could be left in down state
  after changing the HW LRO sysctl when previously in up state.
  
  Sponsored by: Mellanox Technologies
  Differential Revision:https://reviews.freebsd.org/D4941

Modified:
  stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c
==
--- stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.cWed Jan 27 14:59:22 
2016(r294919)
+++ stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.cWed Jan 27 15:01:08 
2016(r294920)
@@ -178,23 +178,21 @@ mlx5e_ethtool_handler(SYSCTL_HANDLER_ARG
priv->params.tx_cq_moderation_mode = 
priv->params_ethtool.tx_coalesce_mode;
 
/* we always agree to turn off HW LRO - but not always to turn on */
-   if (priv->params_ethtool.hw_lro) {
-   if (priv->params_ethtool.hw_lro != 1) {
-   priv->params_ethtool.hw_lro = priv->params.hw_lro_en;
-   error = EINVAL;
-   goto done;
-   }
-   if (priv->ifp->if_capenable & IFCAP_LRO)
-   priv->params.hw_lro_en = !!MLX5_CAP_ETH(priv->mdev, 
lro_cap);
-   else {
-   /* set the correct (0) value to params_ethtool.hw_lro, 
issue a warning and return error */
+   if (priv->params_ethtool.hw_lro != 0) {
+   if ((priv->ifp->if_capenable & IFCAP_LRO) &&
+   MLX5_CAP_ETH(priv->mdev, lro_cap)) {
+   priv->params.hw_lro_en = 1;
+   priv->params_ethtool.hw_lro = 1;
+   } else {
+   priv->params.hw_lro_en = 0;
priv->params_ethtool.hw_lro = 0;
error = EINVAL;
-   if_printf(priv->ifp, "Can't set HW_LRO to a device with 
LRO turned off");
-   goto done;
+
+   if_printf(priv->ifp, "Can't enable HW LRO: "
+   "The HW or SW LRO feature is disabled");
}
} else {
-   priv->params.hw_lro_en = false;
+   priv->params.hw_lro_en = 0;
}
 
if (>params_ethtool.arg[arg2] ==
@@ -208,7 +206,6 @@ mlx5e_ethtool_handler(SYSCTL_HANDLER_ARG
priv->params_ethtool.cqe_zipping = 0;
}
}
-
if (was_opened)
mlx5e_open_locked(priv->ifp);
 done:
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r294921 - stable/10/sys/boot/forth

2016-01-27 Thread Devin Teske
Author: dteske
Date: Wed Jan 27 15:19:48 2016
New Revision: 294921
URL: https://svnweb.freebsd.org/changeset/base/294921

Log:
  MFC 283933: Add comments
  
  r283933: Indicate where the flag for later abort" originates.

Modified:
  stable/10/sys/boot/forth/support.4th
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/boot/forth/support.4th
==
--- stable/10/sys/boot/forth/support.4thWed Jan 27 15:01:08 2016
(r294920)
+++ stable/10/sys/boot/forth/support.4thWed Jan 27 15:19:48 2016
(r294921)
@@ -1460,12 +1460,12 @@ also builtins
   abort" Unable to load a kernel!"
 ;
 
-: load_xen ( -- )
+: load_xen ( -- flag )
   s" xen_kernel" getenv dup -1 <> if
-1 1 load
+1 1 load ( c-addr/u flag N -- flag )
   else
 drop
-0
+0 ( -1 -- flag )
   then
 ;
 
___
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"