svn commit: r318397 - in stable/11: sbin/ifconfig sys/net sys/sys

2017-05-16 Thread Ravi Pokala
Author: rpokala
Date: Wed May 17 05:53:25 2017
New Revision: 318397
URL: https://svnweb.freebsd.org/changeset/base/318397

Log:
  MFC r318160, 318176: Persistently store NIC's hardware MAC address, and add
  a way to retrive it
  
  The MAC address reported by `ifconfig ${nic} ether' does not always match
  the address in the hardware, as reported by the driver during attach. In
  particular, NICs which are components of a lagg(4) interface all report the
  same MAC.
  
  When attaching, the NIC driver passes the MAC address it read from the
  hardware as an argument to ether_ifattach(). Keep a second copy of it, and
  create ioctl(SIOCGHWADDR) to return it. Teach `ifconfig' to report it along
  with the active MAC address.
  
  PR:   194386

Modified:
  stable/11/sbin/ifconfig/af_link.c
  stable/11/sys/net/if.c
  stable/11/sys/net/if_ethersubr.c
  stable/11/sys/net/if_var.h
  stable/11/sys/sys/sockio.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sbin/ifconfig/af_link.c
==
--- stable/11/sbin/ifconfig/af_link.c   Wed May 17 05:47:31 2017
(r318396)
+++ stable/11/sbin/ifconfig/af_link.c   Wed May 17 05:53:25 2017
(r318397)
@@ -42,6 +42,7 @@ static const char rcsid[] =
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -67,7 +68,7 @@ link_status(int s __unused, const struct
sdl->sdl_alen == ETHER_ADDR_LEN) {
ether_format = ether_ntoa((struct ether_addr 
*)LLADDR(sdl));
if (f_ether != NULL && strcmp(f_ether, "dash") == 0) {
-   for (format_char = strchr(ether_format, ':'); 
+   for (format_char = strchr(ether_format, ':');
format_char != NULL; 
format_char = strchr(ether_format, ':'))
*format_char = '-';
@@ -78,6 +79,48 @@ link_status(int s __unused, const struct
 
printf("\tlladdr %s\n", link_ntoa(sdl) + n);
}
+   /* Best-effort (i.e. failures are silent) to get original
+* hardware address, as read by NIC driver at attach time. Only
+* applies to Ethernet NICs (IFT_ETHER). However, laggX
+* interfaces claim to be IFT_ETHER, and re-type their component
+* Ethernet NICs as IFT_IEEE8023ADLAG. So, check for both. If
+* the MAC is zeroed, then it's actually a lagg.
+*/
+   if ((sdl->sdl_type == IFT_ETHER ||
+   sdl->sdl_type == IFT_IEEE8023ADLAG) &&
+   sdl->sdl_alen == ETHER_ADDR_LEN) {
+   struct ifreq ifr;
+   int sock_hw;
+   int rc;
+   static const u_char laggaddr[6] = {0};
+
+   strncpy(ifr.ifr_name, ifa->ifa_name,
+   sizeof(ifr.ifr_name));
+   memcpy(&ifr.ifr_addr, ifa->ifa_addr,
+   sizeof(ifa->ifa_addr->sa_len));
+   ifr.ifr_addr.sa_family = AF_LOCAL;
+   if ((sock_hw = socket(AF_LOCAL, SOCK_DGRAM, 0)) < 0) {
+   warn("socket(AF_LOCAL,SOCK_DGRAM)");
+   return;
+   }
+   rc = ioctl(sock_hw, SIOCGHWADDR, &ifr);
+   close(sock_hw);
+   if (rc != 0) {
+   return;
+   }
+   if (memcmp(ifr.ifr_addr.sa_data, laggaddr, 
sdl->sdl_alen) == 0) {
+   return;
+   }
+   ether_format = ether_ntoa((const struct ether_addr *)
+   &ifr.ifr_addr.sa_data);
+   if (f_ether != NULL && strcmp(f_ether, "dash") == 0) {
+   for (format_char = strchr(ether_format, ':');
+   format_char != NULL; 
+   format_char = strchr(ether_format, ':'))
+   *format_char = '-';
+   }
+   printf("\thwaddr %s\n", ether_format);
+   }
}
 }
 

Modified: stable/11/sys/net/if.c
==
--- stable/11/sys/net/if.c  Wed May 17 05:47:31 2017(r318396)
+++ stable/11/sys/net/if.c  Wed May 17 05:53:25 2017(r318397)
@@ -744,6 +744,11 @@ if_attach_internal(struct ifnet *ifp, in
/* Reliably crash if used uninitialized. */
ifp->if_broadcastaddr = NULL;
 
+   if (ifp->if_type == IFT_ETHER) {
+   ifp->if_hw_addr = malloc(ifp->if_addrlen, M_IF

svn commit: r318396 - stable/11/usr.sbin/bsdinstall/partedit

2017-05-16 Thread Marcelo Araujo
Author: araujo
Date: Wed May 17 05:47:31 2017
New Revision: 318396
URL: https://svnweb.freebsd.org/changeset/base/318396

Log:
  MFC r317743:
  
  Use nitems() from sys/param.h.
  
  Reviewed by:  ngie
  Differential Revision:https://reviews.freebsd.org/D9942

Modified:
  stable/11/usr.sbin/bsdinstall/partedit/gpart_ops.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.sbin/bsdinstall/partedit/gpart_ops.c
==
--- stable/11/usr.sbin/bsdinstall/partedit/gpart_ops.c  Wed May 17 05:28:16 
2017(r318395)
+++ stable/11/usr.sbin/bsdinstall/partedit/gpart_ops.c  Wed May 17 05:47:31 
2017(r318396)
@@ -101,14 +101,14 @@ newfs_command(const char *fstype, char *
if (!use_default) {
int choice;
choice = dlg_checklist("UFS Options", "", 0, 0, 0,
-   sizeof(items)/sizeof(items[0]), items, NULL,
+   nitems(items), items, NULL,
FLAG_CHECK, &i);
if (choice == 1) /* Cancel */
return;
}
 
strcpy(command, "newfs ");
-   for (i = 0; i < (int)(sizeof(items)/sizeof(items[0])); i++) {
+   for (i = 0; i < (int)nitems(items); i++) {
if (items[i].state == 0)
continue;
if (strcmp(items[i].name, "UFS1") == 0)
@@ -139,7 +139,7 @@ newfs_command(const char *fstype, char *
if (!use_default) {
int choice;
choice = dlg_checklist("ZFS Options", "", 0, 0, 0,
-   sizeof(items)/sizeof(items[0]), items, NULL,
+   nitems(items), items, NULL,
FLAG_CHECK, &i);
if (choice == 1) /* Cancel */
return;
@@ -155,7 +155,7 @@ newfs_command(const char *fstype, char *
sprintf(command, "%s -o cachefile=%s/zpool.cache ",
command, zfsboot_path);
}
-   for (i = 0; i < (int)(sizeof(items)/sizeof(items[0])); i++) {
+   for (i = 0; i < (int)nitems(items); i++) {
if (items[i].state == 0)
continue;
if (strcmp(items[i].name, "fletcher4") == 0)
@@ -181,14 +181,14 @@ newfs_command(const char *fstype, char *
if (!use_default) {
int choice;
choice = dlg_checklist("FAT Options", "", 0, 0, 0,
-   sizeof(items)/sizeof(items[0]), items, NULL,
+   nitems(items), items, NULL,
FLAG_RADIO, &i);
if (choice == 1) /* Cancel */
return;
}
 
strcpy(command, "newfs_msdos ");
-   for (i = 0; i < (int)(sizeof(items)/sizeof(items[0])); i++) {
+   for (i = 0; i < (int)nitems(items); i++) {
if (items[i].state == 0)
continue;
if (strcmp(items[i].name, "FAT32") == 0)
@@ -231,7 +231,7 @@ parttypemenu:
dialog_vars.default_item = __DECONST(char *, def_scheme);
cancel = dlg_menu("Partition Scheme",
"Select a partition scheme for this volume:", 0, 0, 0,
-   sizeof(items) / sizeof(items[0]), items, &choice, NULL);
+   nitems(items), items, &choice, NULL);
dialog_vars.default_item = NULL;
 
if (cancel)
@@ -653,7 +653,7 @@ endedit:
"freebsd") == 0)
gpart_partition(pp->lg_name, "BSD");
 
-   for (i = 0; i < (sizeof(items) / sizeof(items[0])); i++)
+   for (i = 0; i < nitems(items); i++)
if (items[i].text_free)
free(items[i].text);
 }
@@ -1191,7 +1191,7 @@ addpartform:
set_default_part_metadata(newpartname, scheme,
items[0].text, items[2].text, newfs);
 
-   for (i = 0; i < (sizeof(items) / sizeof(items[0])); i++)
+   for (i = 0; i < nitems(items); i++)
if (items[i].text_free)
free(items[i].text);
 
___
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: r318395 - stable/11/usr.sbin/fdread

2017-05-16 Thread Marcelo Araujo
Author: araujo
Date: Wed May 17 05:28:16 2017
New Revision: 318395
URL: https://svnweb.freebsd.org/changeset/base/318395

Log:
  MFC r317742:
  
  Free the memory allocated to trackbuf before exiting, it might fix a potential
  memory leak.
  
  Submitted by: t...@juniper.net
  Differential Revision:https://reviews.freebsd.org/D9856

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

Modified: stable/11/usr.sbin/fdread/fdread.c
==
--- stable/11/usr.sbin/fdread/fdread.c  Wed May 17 05:21:03 2017
(r318394)
+++ stable/11/usr.sbin/fdread/fdread.c  Wed May 17 05:28:16 2017
(r318395)
@@ -184,6 +184,7 @@ doread(int fd, FILE *of, const char *_de
if (rv == 0) {
/* EOF? */
warnx("premature EOF after %u bytes", nbytes);
+   free(trackbuf);
return (EX_OK);
}
if ((unsigned)rv == tracksize) {
@@ -215,6 +216,7 @@ doread(int fd, FILE *of, const char *_de
if (!quiet)
putc('\n', stderr);
perror("non-IO error");
+   free(trackbuf);
return (EX_OSERR);
}
if (ioctl(fd, FD_GSTAT, &fdcs) == -1)
@@ -233,6 +235,7 @@ doread(int fd, FILE *of, const char *_de
if (!recover) {
if (!quiet)
putc('\n', stderr);
+   free(trackbuf);
return (EX_IOERR);
}
memset(trackbuf, fillbyte, secsize);
@@ -284,6 +287,7 @@ doread(int fd, FILE *of, const char *_de
continue;
}
}
+   free(trackbuf);
if (!quiet) {
putc('\n', stderr);
if (nerrs)
___
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: r318394 - in stable/11: sbin/geom/class/label sys/geom/part

2017-05-16 Thread Marcelo Araujo
Author: araujo
Date: Wed May 17 05:21:03 2017
New Revision: 318394
URL: https://svnweb.freebsd.org/changeset/base/318394

Log:
  MFC r315112, r315196
  
  r315112:
  Add the capability to refresh the gpart(8) label without need a reboot.
  
  gpart(8) has functionality to change the label of an GPT partition.
  This functionality works like it should, however, after a label change
  the /dev/gpt/ entries remain unchanged. glabel(8) status output remains
  unchanged. The change only takes effect after a reboot.
  
  PR:   162690
  Submitted by: sub.mesa@gmail, Ben RUBSON , ae
  Reviewed by:  allanjude, bapt, bcr
  Differential Revision:https://reviews.freebsd.org/D9935
  
  r315196:
  After r315112 I broke the tests with eli, instead to pass 0, I should pass
  M_NOWAIT to g_media_changed() that will call g_post_event() with this flag.
  
  Reported by:  lwhsu, ngie and ae

Modified:
  stable/11/sbin/geom/class/label/geom_label.c
  stable/11/sbin/geom/class/label/glabel.8
  stable/11/sys/geom/part/g_part.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sbin/geom/class/label/geom_label.c
==
--- stable/11/sbin/geom/class/label/geom_label.cWed May 17 02:40:06 
2017(r318393)
+++ stable/11/sbin/geom/class/label/geom_label.cWed May 17 05:21:03 
2017(r318394)
@@ -53,6 +53,7 @@ static void label_main(struct gctl_req *
 static void label_clear(struct gctl_req *req);
 static void label_dump(struct gctl_req *req);
 static void label_label(struct gctl_req *req);
+static void label_refresh(struct gctl_req *req);
 
 struct g_command PUBSYM(class_commands)[] = {
{ "clear", G_FLAG_VERBOSE, label_main, G_NULL_OPTS,
@@ -74,6 +75,9 @@ struct g_command PUBSYM(class_commands)[
{ "label", G_FLAG_VERBOSE | G_FLAG_LOADKLD, label_main, G_NULL_OPTS,
"[-v] name dev"
},
+   { "refresh", 0, label_main, G_NULL_OPTS,
+   "dev ..."
+   },
{ "stop", G_FLAG_VERBOSE, NULL,
{
{ 'f', "force", NULL, G_TYPE_BOOL },
@@ -105,6 +109,8 @@ label_main(struct gctl_req *req, unsigne
label_clear(req);
else if (strcmp(name, "dump") == 0)
label_dump(req);
+   else if (strcmp(name, "refresh") == 0)
+   label_refresh(req);
else
gctl_error(req, "Unknown command: %s.", name);
 }
@@ -223,3 +229,28 @@ label_dump(struct gctl_req *req)
printf("\n");
}
 }
+
+static void
+label_refresh(struct gctl_req *req)
+{
+   const char *name;
+   int i, nargs, fd;
+
+   nargs = gctl_get_int(req, "nargs");
+   if (nargs < 1) {
+   gctl_error(req, "Too few arguments.");
+   return;
+   }
+
+   for (i = 0; i < nargs; i++) {
+   name = gctl_get_ascii(req, "arg%d", i);
+   fd = g_open(name, 1);
+   if (fd == -1) {
+   printf("Can't refresh metadata from %s: %s.\n",
+   name, strerror(errno));
+   } else {
+   printf("Metadata from %s refreshed.\n", name);
+   (void)g_close(fd);
+   }
+   }
+}

Modified: stable/11/sbin/geom/class/label/glabel.8
==
--- stable/11/sbin/geom/class/label/glabel.8Wed May 17 02:40:06 2017
(r318393)
+++ stable/11/sbin/geom/class/label/glabel.8Wed May 17 05:21:03 2017
(r318394)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 22, 2013
+.Dd March 12, 2017
 .Dt GLABEL 8
 .Os
 .Sh NAME
@@ -57,6 +57,9 @@
 .Cm dump
 .Ar dev ...
 .Nm
+.Cm refresh
+.Ar dev ...
+.Nm
 .Cm list
 .Nm
 .Cm status
@@ -186,6 +189,8 @@ Same as
 Clear metadata on the given devices.
 .It Cm dump
 Dump metadata stored on the given devices.
+.It Cm refresh
+Refresh / rediscover metadata from the given devices.
 .It Cm list
 See
 .Xr geom 8 .

Modified: stable/11/sys/geom/part/g_part.c
==
--- stable/11/sys/geom/part/g_part.cWed May 17 02:40:06 2017
(r318393)
+++ stable/11/sys/geom/part/g_part.cWed May 17 05:21:03 2017
(r318394)
@@ -884,6 +884,10 @@ g_part_ctl_commit(struct gctl_req *req, 
 
LIST_FOREACH_SAFE(entry, &table->gpt_entry, gpe_entry, tmp) {
if (!entry->gpe_deleted) {
+   /* Notify consumers that provider might be changed. */
+   if (entry->gpe_modified && (
+   entry->gpe_pp->acw + entry->gpe_pp->ace) == 0)
+   g_media_changed(entry->gpe_pp, M_NOWAIT);
entry->gpe_created = 0;
entry->gpe_modified = 0;
continue;
___
svn-src-all@f

Re: svn commit: r318336 - head/sys/arm/mv

2017-05-16 Thread Michal Meloun


On 16.05.2017 6:47, Luiz Otavio O Souza wrote:
> Author: loos
> Date: Tue May 16 04:47:50 2017
> New Revision: 318336
> URL: https://svnweb.freebsd.org/changeset/base/318336
> 
> Log:
>   Add the SDHCI Address Decoder registers and routines for ARMADA 38X.
>   
>   Tested on:  ClearFog Pro
>   Reviewed by:Marcin Wojtas 
>   Sponsored by:   Rubicon Communications, LLC (Netgate)
>   Differential Revision:  https://reviews.freebsd.org/D10601
> 
This commit breaks many of ARMv6 kernels. ARMADAXP, DB-78XXX,
DB-88F5XXX, DB-88F6XXX, TS7800, LINT.

Michal


> Modified:
>   head/sys/arm/mv/mv_common.c
>   head/sys/arm/mv/mvwin.h
> 
> Modified: head/sys/arm/mv/mv_common.c
> ==
> --- head/sys/arm/mv/mv_common.c   Tue May 16 03:31:49 2017
> (r318335)
> +++ head/sys/arm/mv/mv_common.c   Tue May 16 04:47:50 2017
> (r318336)
> @@ -82,6 +82,7 @@ static int decode_win_usb3_valid(void);
>  static int decode_win_eth_valid(void);
>  static int decode_win_pcie_valid(void);
>  static int decode_win_sata_valid(void);
> +static int decode_win_sdhci_valid(void);
>  
>  static int decode_win_idma_valid(void);
>  static int decode_win_xor_valid(void);
> @@ -95,6 +96,7 @@ static void decode_win_usb3_setup(u_long
>  static void decode_win_eth_setup(u_long);
>  static void decode_win_sata_setup(u_long);
>  static void decode_win_ahci_setup(u_long);
> +static void decode_win_sdhci_setup(u_long);
>  
>  static void decode_win_idma_setup(u_long);
>  static void decode_win_xor_setup(u_long);
> @@ -105,6 +107,7 @@ static void decode_win_eth_dump(u_long b
>  static void decode_win_idma_dump(u_long base);
>  static void decode_win_xor_dump(u_long base);
>  static void decode_win_ahci_dump(u_long base);
> +static void decode_win_sdhci_dump(u_long);
>  
>  static int fdt_get_ranges(const char *, void *, int, int *, int *);
>  #ifdef SOC_MV_ARMADA38X
> @@ -138,6 +141,7 @@ static struct soc_node_spec soc_nodes[] 
>   { "mrvl,usb-ehci", &decode_win_usb_setup, &decode_win_usb_dump },
>   { "marvell,armada-380-xhci", &decode_win_usb3_setup, 
> &decode_win_usb3_dump },
>   { "marvell,armada-380-ahci", &decode_win_ahci_setup, 
> &decode_win_ahci_dump },
> + { "marvell,armada-380-sdhci", &decode_win_sdhci_setup, 
> &decode_win_sdhci_dump },
>   { "mrvl,sata", &decode_win_sata_setup, NULL },
>   { "mrvl,xor", &decode_win_xor_setup, &decode_win_xor_dump },
>   { "mrvl,idma", &decode_win_idma_setup, &decode_win_idma_dump },
> @@ -568,7 +572,8 @@ soc_decode_win(void)
>   if (!decode_win_cpu_valid() || !decode_win_usb_valid() ||
>   !decode_win_eth_valid() || !decode_win_idma_valid() ||
>   !decode_win_pcie_valid() || !decode_win_sata_valid() ||
> - !decode_win_xor_valid() || !decode_win_usb3_valid())
> + !decode_win_xor_valid() || !decode_win_usb3_valid() ||
> + !decode_win_sdhci_valid())
>   return (EINVAL);
>  
>   decode_win_cpu_setup();
> @@ -659,6 +664,11 @@ WIN_REG_BASE_IDX_RD(win_sata, sz, MV_WIN
>  WIN_REG_BASE_IDX_WR(win_sata, sz, MV_WIN_SATA_SIZE);
>  #endif
>  
> +WIN_REG_BASE_IDX_RD(win_sdhci, cr, MV_WIN_SDHCI_CTRL);
> +WIN_REG_BASE_IDX_RD(win_sdhci, br, MV_WIN_SDHCI_BASE);
> +WIN_REG_BASE_IDX_WR(win_sdhci, cr, MV_WIN_SDHCI_CTRL);
> +WIN_REG_BASE_IDX_WR(win_sdhci, br, MV_WIN_SDHCI_BASE);
> +
>  #ifndef SOC_MV_DOVE
>  WIN_REG_IDX_RD(ddr, br, MV_WIN_DDR_BASE, MV_DDR_CADR_BASE)
>  WIN_REG_IDX_RD(ddr, sz, MV_WIN_DDR_SIZE, MV_DDR_CADR_BASE)
> @@ -2073,6 +2083,60 @@ decode_win_sata_valid(void)
>   return (decode_win_can_cover_ddr(MV_WIN_SATA_MAX));
>  }
>  
> +static void
> +decode_win_sdhci_setup(u_long base)
> +{
> + uint32_t cr, br;
> + int i, j;
> +
> + for (i = 0; i < MV_WIN_SDHCI_MAX; i++) {
> + win_sdhci_cr_write(base, i, 0);
> + win_sdhci_br_write(base, i, 0);
> + }
> +
> + for (i = 0; i < MV_WIN_DDR_MAX; i++)
> + if (ddr_is_active(i)) {
> + br = ddr_base(i);
> + cr = (((ddr_size(i) - 1) &
> + (IO_WIN_SIZE_MASK << IO_WIN_SIZE_SHIFT)) |
> + (ddr_attr(i) << IO_WIN_ATTR_SHIFT) |
> + (ddr_target(i) << IO_WIN_TGT_SHIFT) |
> + IO_WIN_ENA_MASK);
> +
> + /* Use the first available SDHCI window */
> + for (j = 0; j < MV_WIN_SDHCI_MAX; j++) {
> + if (win_sdhci_cr_read(base, j) & 
> IO_WIN_ENA_MASK)
> + continue;
> +
> + win_sdhci_cr_write(base, j, cr);
> + win_sdhci_br_write(base, j, br);
> + break;
> + }
> + }
> +}
> +
> +static void
> +decode_win_sdhci_dump(u_long base)
> +{
> + int i;
> +
> + for (i = 0; i < MV_WIN_SDHCI_MAX; i++)

svn commit: r318393 - in stable/10/sys: conf dev/acpica dev/hyperv/vmbus modules/hyperv/vmbus

2017-05-16 Thread Sepherosa Ziehau
Author: sephe
Date: Wed May 17 02:40:06 2017
New Revision: 318393
URL: https://svnweb.freebsd.org/changeset/base/318393

Log:
  MFC 318136
  
  hyperv/vmbus: Reorganize vmbus device tree
  
  For GEN1 Hyper-V, vmbus is attached to pcib0, which contains the
  resources for PCI passthrough and SR-IOV.  There is no
  acpi_syscontainer0 on GEN1 Hyper-V.
  
  For GEN2 Hyper-V, vmbus is attached to acpi_syscontainer0, which
  contains the resources for PCI passthrough and SR-IOV.  There is
  no pcib0 on GEN2 Hyper-V.
  
  The ACPI VMBUS device now only holds its _CRS, which is empty as
  of this commit; its existence is mainly for upward compatibility.
  
  Device tree structure is suggested by jhb@.
  
  Tested-by:dexuan@
  Collabrated-wth:  dexuan@
  Sponsored by: Microsoft
  Differential Revision:https://reviews.freebsd.org/D10565

Added:
  stable/10/sys/dev/acpica/acpi_container.c
 - copied unchanged from r318136, head/sys/dev/acpica/acpi_container.c
  stable/10/sys/dev/hyperv/vmbus/vmbus_res.c
 - copied unchanged from r318136, head/sys/dev/hyperv/vmbus/vmbus_res.c
Modified:
  stable/10/sys/conf/files
  stable/10/sys/conf/files.amd64
  stable/10/sys/conf/files.i386
  stable/10/sys/dev/acpica/acpi_pcib_acpi.c
  stable/10/sys/dev/hyperv/vmbus/vmbus.c
  stable/10/sys/modules/hyperv/vmbus/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/conf/files
==
--- stable/10/sys/conf/filesWed May 17 01:48:44 2017(r318392)
+++ stable/10/sys/conf/filesWed May 17 02:40:06 2017(r318393)
@@ -617,6 +617,7 @@ dev/acpica/acpi_perf.c  optional acpi
 dev/acpica/acpi_powerres.c optional acpi
 dev/acpica/acpi_quirk.coptional acpi
 dev/acpica/acpi_resource.c optional acpi
+dev/acpica/acpi_container.coptional acpi
 dev/acpica/acpi_smbat.coptional acpi
 dev/acpica/acpi_thermal.c  optional acpi
 dev/acpica/acpi_throttle.c optional acpi

Modified: stable/10/sys/conf/files.amd64
==
--- stable/10/sys/conf/files.amd64  Wed May 17 01:48:44 2017
(r318392)
+++ stable/10/sys/conf/files.amd64  Wed May 17 02:40:06 2017
(r318393)
@@ -281,6 +281,7 @@ dev/hyperv/vmbus/vmbus_br.c 
optional
 dev/hyperv/vmbus/vmbus_chan.c  optionalhyperv
 dev/hyperv/vmbus/vmbus_et.coptionalhyperv
 dev/hyperv/vmbus/vmbus_if.moptionalhyperv
+dev/hyperv/vmbus/vmbus_res.c   optionalhyperv
 dev/hyperv/vmbus/vmbus_xact.c  optionalhyperv
 dev/hyperv/vmbus/amd64/hyperv_machdep.coptional
hyperv
 dev/hyperv/vmbus/amd64/vmbus_vector.S  optionalhyperv

Modified: stable/10/sys/conf/files.i386
==
--- stable/10/sys/conf/files.i386   Wed May 17 01:48:44 2017
(r318392)
+++ stable/10/sys/conf/files.i386   Wed May 17 02:40:06 2017
(r318393)
@@ -256,6 +256,7 @@ dev/hyperv/vmbus/vmbus_br.c 
optional
 dev/hyperv/vmbus/vmbus_chan.c  optionalhyperv
 dev/hyperv/vmbus/vmbus_et.coptionalhyperv
 dev/hyperv/vmbus/vmbus_if.moptionalhyperv
+dev/hyperv/vmbus/vmbus_res.c   optionalhyperv
 dev/hyperv/vmbus/vmbus_xact.c  optionalhyperv
 dev/hyperv/vmbus/i386/hyperv_machdep.c optionalhyperv
 dev/hyperv/vmbus/i386/vmbus_vector.S   optionalhyperv

Copied: stable/10/sys/dev/acpica/acpi_container.c (from r318136, 
head/sys/dev/acpica/acpi_container.c)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/10/sys/dev/acpica/acpi_container.c   Wed May 17 02:40:06 2017
(r318393, copy of r318136, head/sys/dev/acpica/acpi_container.c)
@@ -0,0 +1,166 @@
+/*-
+ * Copyright (c) 2017 Microsoft Corp.
+ * All rights reserved.
+ *
+ * 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 unmodified, 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 d

svn commit: r318392 - in stable/11/sys: conf dev/acpica dev/hyperv/vmbus modules/hyperv/vmbus

2017-05-16 Thread Sepherosa Ziehau
Author: sephe
Date: Wed May 17 01:48:44 2017
New Revision: 318392
URL: https://svnweb.freebsd.org/changeset/base/318392

Log:
  MFC 318136
  
  hyperv/vmbus: Reorganize vmbus device tree
  
  For GEN1 Hyper-V, vmbus is attached to pcib0, which contains the
  resources for PCI passthrough and SR-IOV.  There is no
  acpi_syscontainer0 on GEN1 Hyper-V.
  
  For GEN2 Hyper-V, vmbus is attached to acpi_syscontainer0, which
  contains the resources for PCI passthrough and SR-IOV.  There is
  no pcib0 on GEN2 Hyper-V.
  
  The ACPI VMBUS device now only holds its _CRS, which is empty as
  of this commit; its existence is mainly for upward compatibility.
  
  Device tree structure is suggested by jhb@.
  
  Tested-by:dexuan@
  Collabrated-wth:  dexuan@
  Sponsored by: Microsoft
  Differential Revision:https://reviews.freebsd.org/D10565

Added:
  stable/11/sys/dev/acpica/acpi_container.c
 - copied unchanged from r318136, head/sys/dev/acpica/acpi_container.c
  stable/11/sys/dev/hyperv/vmbus/vmbus_res.c
 - copied unchanged from r318136, head/sys/dev/hyperv/vmbus/vmbus_res.c
Modified:
  stable/11/sys/conf/files
  stable/11/sys/conf/files.amd64
  stable/11/sys/conf/files.i386
  stable/11/sys/dev/acpica/acpi_pcib_acpi.c
  stable/11/sys/dev/hyperv/vmbus/vmbus.c
  stable/11/sys/modules/hyperv/vmbus/Makefile
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/conf/files
==
--- stable/11/sys/conf/filesWed May 17 01:45:26 2017(r318391)
+++ stable/11/sys/conf/filesWed May 17 01:48:44 2017(r318392)
@@ -664,6 +664,7 @@ dev/acpica/acpi_perf.c  optional acpi
 dev/acpica/acpi_powerres.c optional acpi
 dev/acpica/acpi_quirk.coptional acpi
 dev/acpica/acpi_resource.c optional acpi
+dev/acpica/acpi_container.coptional acpi
 dev/acpica/acpi_smbat.coptional acpi
 dev/acpica/acpi_thermal.c  optional acpi
 dev/acpica/acpi_throttle.c optional acpi

Modified: stable/11/sys/conf/files.amd64
==
--- stable/11/sys/conf/files.amd64  Wed May 17 01:45:26 2017
(r318391)
+++ stable/11/sys/conf/files.amd64  Wed May 17 01:48:44 2017
(r318392)
@@ -317,6 +317,7 @@ dev/hyperv/vmbus/vmbus_br.c 
optional
 dev/hyperv/vmbus/vmbus_chan.c  optionalhyperv
 dev/hyperv/vmbus/vmbus_et.coptionalhyperv
 dev/hyperv/vmbus/vmbus_if.moptionalhyperv
+dev/hyperv/vmbus/vmbus_res.c   optionalhyperv
 dev/hyperv/vmbus/vmbus_xact.c  optionalhyperv
 dev/hyperv/vmbus/amd64/hyperv_machdep.coptional
hyperv
 dev/hyperv/vmbus/amd64/vmbus_vector.S  optionalhyperv

Modified: stable/11/sys/conf/files.i386
==
--- stable/11/sys/conf/files.i386   Wed May 17 01:45:26 2017
(r318391)
+++ stable/11/sys/conf/files.i386   Wed May 17 01:48:44 2017
(r318392)
@@ -267,6 +267,7 @@ dev/hyperv/vmbus/vmbus_br.c 
optional
 dev/hyperv/vmbus/vmbus_chan.c  optionalhyperv
 dev/hyperv/vmbus/vmbus_et.coptionalhyperv
 dev/hyperv/vmbus/vmbus_if.moptionalhyperv
+dev/hyperv/vmbus/vmbus_res.c   optionalhyperv
 dev/hyperv/vmbus/vmbus_xact.c  optionalhyperv
 dev/hyperv/vmbus/i386/hyperv_machdep.c optionalhyperv
 dev/hyperv/vmbus/i386/vmbus_vector.S   optionalhyperv

Copied: stable/11/sys/dev/acpica/acpi_container.c (from r318136, 
head/sys/dev/acpica/acpi_container.c)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/11/sys/dev/acpica/acpi_container.c   Wed May 17 01:48:44 2017
(r318392, copy of r318136, head/sys/dev/acpica/acpi_container.c)
@@ -0,0 +1,166 @@
+/*-
+ * Copyright (c) 2017 Microsoft Corp.
+ * All rights reserved.
+ *
+ * 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 unmodified, 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 d

svn commit: r318391 - in stable: 10/contrib/ipfilter/lib 11/contrib/ipfilter/lib

2017-05-16 Thread Cy Schubert
Author: cy
Date: Wed May 17 01:45:26 2017
New Revision: 318391
URL: https://svnweb.freebsd.org/changeset/base/318391

Log:
  MFC r318283:
  
  As of r318281 in HEAD (r318390 [in stable/10 & stable/11]), there is no
  need to put a colon (:) in the message string.

Modified:
  stable/11/contrib/ipfilter/lib/printhash_live.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/contrib/ipfilter/lib/printhash_live.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/11/contrib/ipfilter/lib/printhash_live.c
==
--- stable/11/contrib/ipfilter/lib/printhash_live.c Wed May 17 01:38:32 
2017(r318390)
+++ stable/11/contrib/ipfilter/lib/printhash_live.c Wed May 17 01:45:26 
2017(r318391)
@@ -59,7 +59,7 @@ printhash_live(hp, fd, name, opts, field
printed++;
}
if (last == 0)
-   ipferror(fd, "walking hash nodes:");
+   ipferror(fd, "walking hash nodes");
 
if (printed == 0)
putchar(';');
___
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: r318391 - in stable: 10/contrib/ipfilter/lib 11/contrib/ipfilter/lib

2017-05-16 Thread Cy Schubert
Author: cy
Date: Wed May 17 01:45:26 2017
New Revision: 318391
URL: https://svnweb.freebsd.org/changeset/base/318391

Log:
  MFC r318283:
  
  As of r318281 in HEAD (r318390 [in stable/10 & stable/11]), there is no
  need to put a colon (:) in the message string.

Modified:
  stable/10/contrib/ipfilter/lib/printhash_live.c
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/contrib/ipfilter/lib/printhash_live.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/10/contrib/ipfilter/lib/printhash_live.c
==
--- stable/10/contrib/ipfilter/lib/printhash_live.c Wed May 17 01:38:32 
2017(r318390)
+++ stable/10/contrib/ipfilter/lib/printhash_live.c Wed May 17 01:45:26 
2017(r318391)
@@ -59,7 +59,7 @@ printhash_live(hp, fd, name, opts, field
printed++;
}
if (last == 0)
-   ipferror(fd, "walking hash nodes:");
+   ipferror(fd, "walking hash nodes");
 
if (printed == 0)
putchar(';');
___
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: r318390 - in stable: 10/contrib/ipfilter/lib 11/contrib/ipfilter/lib

2017-05-16 Thread Cy Schubert
Author: cy
Date: Wed May 17 01:38:32 2017
New Revision: 318390
URL: https://svnweb.freebsd.org/changeset/base/318390

Log:
  MFC r318281:
  
  Separate the ipfilter function/static string from the error with a
  colon (:) in error messages to assist the user in parsing out the error
  from where or which object the error message refers to.

Modified:
  stable/10/contrib/ipfilter/lib/ipf_perror.c
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/contrib/ipfilter/lib/ipf_perror.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/10/contrib/ipfilter/lib/ipf_perror.c
==
--- stable/10/contrib/ipfilter/lib/ipf_perror.c Wed May 17 00:34:34 2017
(r318389)
+++ stable/10/contrib/ipfilter/lib/ipf_perror.c Wed May 17 01:38:32 2017
(r318390)
@@ -10,7 +10,7 @@ ipf_perror(err, string)
if (err == 0)
fprintf(stderr, "%s\n", string);
else
-   fprintf(stderr, "%s %s\n", string, ipf_strerror(err));
+   fprintf(stderr, "%s: %s\n", string, ipf_strerror(err));
 }
 
 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: r318390 - in stable: 10/contrib/ipfilter/lib 11/contrib/ipfilter/lib

2017-05-16 Thread Cy Schubert
Author: cy
Date: Wed May 17 01:38:32 2017
New Revision: 318390
URL: https://svnweb.freebsd.org/changeset/base/318390

Log:
  MFC r318281:
  
  Separate the ipfilter function/static string from the error with a
  colon (:) in error messages to assist the user in parsing out the error
  from where or which object the error message refers to.

Modified:
  stable/11/contrib/ipfilter/lib/ipf_perror.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/contrib/ipfilter/lib/ipf_perror.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/11/contrib/ipfilter/lib/ipf_perror.c
==
--- stable/11/contrib/ipfilter/lib/ipf_perror.c Wed May 17 00:34:34 2017
(r318389)
+++ stable/11/contrib/ipfilter/lib/ipf_perror.c Wed May 17 01:38:32 2017
(r318390)
@@ -10,7 +10,7 @@ ipf_perror(err, string)
if (err == 0)
fprintf(stderr, "%s\n", string);
else
-   fprintf(stderr, "%s %s\n", string, ipf_strerror(err));
+   fprintf(stderr, "%s: %s\n", string, ipf_strerror(err));
 }
 
 int
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r318364 - in head: contrib/libxo contrib/libxo/doc contrib/libxo/libxo contrib/libxo/tests/core contrib/libxo/tests/core/saved contrib/libxo/tests/gettext/saved contrib/libxo/xo lib/li

2017-05-16 Thread Phil Shafer
"Ngie Cooper (yaneurabeya)" writes:
>> URL: https://svnweb.freebsd.org/changeset/base/318364
>Relnotes: yes
>Also, what does this upgrade entail, in terms of new features/risk?

It's all documentation and minor fixes (213478, 204651).  There is
also a fix for using "int"s to keep buffer offsets (#55 on github).
No user-visible changes.

Thanks,
 Phil
___
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: r318389 - in head/sys: amd64/amd64 arm/arm arm/include crypto/des ddb dev/cs dev/ixgb dev/lge dev/mse dev/my dev/pcn dev/ppbus dev/ppc dev/qlxgb dev/qlxgbe dev/qlxge dev/rl dev/sound/pc...

2017-05-16 Thread Ed Maste
Author: emaste
Date: Wed May 17 00:34:34 2017
New Revision: 318389
URL: https://svnweb.freebsd.org/changeset/base/318389

Log:
  Remove register keyword from sys/ and ANSIfy prototypes
  
  A long long time ago the register keyword told the compiler to store
  the corresponding variable in a CPU register, but it is not relevant
  for any compiler used in the FreeBSD world today.
  
  ANSIfy related prototypes while here.
  
  Reviewed by:  cem, jhb
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D10193

Modified:
  head/sys/amd64/amd64/sys_machdep.c
  head/sys/amd64/amd64/vm_machdep.c
  head/sys/arm/arm/sys_machdep.c
  head/sys/arm/arm/vm_machdep.c
  head/sys/arm/include/atomic-v4.h
  head/sys/crypto/des/des_enc.c
  head/sys/crypto/des/des_setkey.c
  head/sys/ddb/db_access.c
  head/sys/ddb/db_output.c
  head/sys/ddb/db_sym.c
  head/sys/dev/cs/if_cs.c
  head/sys/dev/ixgb/if_ixgb.c
  head/sys/dev/lge/if_lge.c
  head/sys/dev/mse/mse_isa.c
  head/sys/dev/my/if_my.c
  head/sys/dev/pcn/if_pcn.c
  head/sys/dev/ppbus/immio.c
  head/sys/dev/ppbus/vpoio.c
  head/sys/dev/ppc/ppc.c
  head/sys/dev/qlxgb/qla_os.c
  head/sys/dev/qlxgbe/ql_os.c
  head/sys/dev/qlxge/qls_os.c
  head/sys/dev/rl/if_rl.c
  head/sys/dev/sound/pci/fm801.c
  head/sys/dev/speaker/spkr.c
  head/sys/dev/tl/if_tl.c
  head/sys/dev/usb/usb_busdma.c
  head/sys/dev/wb/if_wb.c
  head/sys/dev/xl/if_xl.c
  head/sys/fs/fifofs/fifo_vnops.c
  head/sys/fs/nandfs/nandfs_vnops.c
  head/sys/i386/i386/in_cksum.c
  head/sys/i386/i386/k6_mem.c
  head/sys/i386/i386/sys_machdep.c
  head/sys/i386/i386/vm_machdep.c
  head/sys/i386/ibcs2/ibcs2_misc.c
  head/sys/i386/ibcs2/ibcs2_other.c
  head/sys/i386/ibcs2/ibcs2_signal.c
  head/sys/i386/ibcs2/ibcs2_socksys.c
  head/sys/i386/isa/ccbque.h
  head/sys/i386/isa/elink.c
  head/sys/kern/inflate.c
  head/sys/kern/kern_clock.c
  head/sys/kern/kern_exec.c
  head/sys/kern/kern_prot.c
  head/sys/kern/kern_resource.c
  head/sys/kern/kern_sig.c
  head/sys/kern/kern_timeout.c
  head/sys/kern/kern_xxx.c
  head/sys/kern/sched_4bsd.c
  head/sys/kern/sysv_msg.c
  head/sys/kern/vfs_export.c
  head/sys/kern/vfs_mount.c
  head/sys/kern/vfs_syscalls.c
  head/sys/kern/vfs_vnops.c
  head/sys/libkern/zlib.c
  head/sys/mips/cavium/cryptocteon/cavium_crypto.c
  head/sys/mips/mips/vm_machdep.c
  head/sys/net/altq/altq_rio.c
  head/sys/net/altq/altq_rmclass.h
  head/sys/net/bpf_filter.c
  head/sys/net/if_llatbl.c
  head/sys/net/if_media.c
  head/sys/net/slcompress.c
  head/sys/netinet/in.c
  head/sys/netinet/in_cksum.c
  head/sys/netinet/ip_icmp.c
  head/sys/netinet6/in6_pcb.c
  head/sys/netinet6/raw_ip6.c
  head/sys/netipsec/ipsec_mbuf.c
  head/sys/rpc/clnt.h
  head/sys/sparc64/include/pcpu.h

Modified: head/sys/amd64/amd64/sys_machdep.c
==
--- head/sys/amd64/amd64/sys_machdep.c  Tue May 16 23:31:52 2017
(r318388)
+++ head/sys/amd64/amd64/sys_machdep.c  Wed May 17 00:34:34 2017
(r318389)
@@ -169,9 +169,7 @@ update_gdt_fsbase(struct thread *td, uin
 }
 
 int
-sysarch(td, uap)
-   struct thread *td;
-   register struct sysarch_args *uap;
+sysarch(struct thread *td, struct sysarch_args *uap)
 {
int error = 0;
struct pcb *pcb = curthread->td_pcb;

Modified: head/sys/amd64/amd64/vm_machdep.c
==
--- head/sys/amd64/amd64/vm_machdep.c   Tue May 16 23:31:52 2017
(r318388)
+++ head/sys/amd64/amd64/vm_machdep.c   Wed May 17 00:34:34 2017
(r318389)
@@ -148,13 +148,9 @@ alloc_fpusave(int flags)
  * ready to run and return to user mode.
  */
 void
-cpu_fork(td1, p2, td2, flags)
-   register struct thread *td1;
-   register struct proc *p2;
-   struct thread *td2;
-   int flags;
+cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags)
 {
-   register struct proc *p1;
+   struct proc *p1;
struct pcb *pcb2;
struct mdproc *mdp1, *mdp2;
struct proc_ldt *pldt;

Modified: head/sys/arm/arm/sys_machdep.c
==
--- head/sys/arm/arm/sys_machdep.c  Tue May 16 23:31:52 2017
(r318388)
+++ head/sys/arm/arm/sys_machdep.c  Wed May 17 00:34:34 2017
(r318389)
@@ -188,9 +188,7 @@ arm32_get_tp(struct thread *td, void *ar
 }
 
 int
-sysarch(td, uap)
-   struct thread *td;
-   register struct sysarch_args *uap;
+sysarch(struct thread *td, struct sysarch_args *uap)
 {
int error;
 

Modified: head/sys/arm/arm/vm_machdep.c
==
--- head/sys/arm/arm/vm_machdep.c   Tue May 16 23:31:52 2017
(r318388)
+++ head/sys/arm/arm/vm_machdep.c   Wed May 17 00:34:34 2017
(r318389)
@@ -93,8 +93,7 @@ uint32_t initial_fpscr = VFPSCR_DN | VFP
  * ready to run and return to user

Re: svn commit: r318364 - in head: contrib/libxo contrib/libxo/doc contrib/libxo/libxo contrib/libxo/tests/core contrib/libxo/tests/core/saved contrib/libxo/tests/gettext/saved contrib/libxo/xo lib/li

2017-05-16 Thread Ngie Cooper (yaneurabeya)

> On May 16, 2017, at 11:46, Phil Shafer  wrote:
> 
> Author: phil
> Date: Tue May 16 18:46:56 2017
> New Revision: 318364
> URL: https://svnweb.freebsd.org/changeset/base/318364
> 
> Log:
>  Import libxo-0.7.2; add xo_options.7.
> 
>  Submitted by:phil
>  Reviewed by: sjg
>  Approved by: sjg (mentor)

Relnotes: yes

Also, what does this upgrade entail, in terms of new features/risk?

Thanks,
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r318388 - in head: share/man/man9 sys/kern sys/sys

2017-05-16 Thread John Baldwin
Author: jhb
Date: Tue May 16 23:31:52 2017
New Revision: 318388
URL: https://svnweb.freebsd.org/changeset/base/318388

Log:
  Add sglist_append_sglist().
  
  This function permits a range of one scatter/gather list to be appended to
  another sglist.  This can be used to construct a scatter/gather list that
  reorders or duplicates ranges from one or more existing scatter/gather
  lists.
  
  Sponsored by: Chelsio Communications

Modified:
  head/share/man/man9/Makefile
  head/share/man/man9/sglist.9
  head/sys/kern/subr_sglist.c
  head/sys/sys/sglist.h

Modified: head/share/man/man9/Makefile
==
--- head/share/man/man9/MakefileTue May 16 23:18:50 2017
(r318387)
+++ head/share/man/man9/MakefileTue May 16 23:31:52 2017
(r318388)
@@ -1572,6 +1572,7 @@ MLINKS+=sglist.9 sglist_alloc.9 \
sglist.9 sglist_append_bio.9 \
sglist.9 sglist_append_mbuf.9 \
sglist.9 sglist_append_phys.9 \
+   sglist.9 sglist_append_sglist.9 \
sglist.9 sglist_append_uio.9 \
sglist.9 sglist_append_user.9 \
sglist.9 sglist_append_vmpages.9 \

Modified: head/share/man/man9/sglist.9
==
--- head/share/man/man9/sglist.9Tue May 16 23:18:50 2017
(r318387)
+++ head/share/man/man9/sglist.9Tue May 16 23:31:52 2017
(r318388)
@@ -26,7 +26,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd January 12, 2014
+.Dd May 16, 2017
 .Dt SGLIST 9
 .Os
 .Sh NAME
@@ -36,6 +36,7 @@
 .Nm sglist_append_bio ,
 .Nm sglist_append_mbuf ,
 .Nm sglist_append_phys ,
+.Nm sglist_append_sglist ,
 .Nm sglist_append_uio ,
 .Nm sglist_append_user ,
 .Nm sglist_append_vmpages ,
@@ -67,6 +68,8 @@
 .Ft int
 .Fn sglist_append_phys "struct sglist *sg" "vm_paddr_t paddr" "size_t len"
 .Ft int
+.Fn sglist_append_sglist "struct sglist *sg" "struct sglist *source" "size_t 
offset" "size_t len"
+.Ft int
 .Fn sglist_append_uio "struct sglist *sg" "struct uio *uio"
 .Ft int
 .Fn sglist_append_user "struct sglist *sg" "void *buf" "size_t len" "struct 
thread *td"
@@ -252,6 +255,20 @@ and is
 bytes long.
 .Pp
 The
+.Nm sglist_append_sglist
+function appends physical address ranges described by the scatter/gather list
+.Fa source
+to the scatter/gather list
+.Fa sg .
+The physical address ranges start at offset
+.Fa offset
+within
+.Fa source
+and continue for
+.Fa len
+bytes.
+.Pp
+The
 .Nm sglist_append_uio
 function appends the physical address ranges described by a
 .Xr uio 9

Modified: head/sys/kern/subr_sglist.c
==
--- head/sys/kern/subr_sglist.c Tue May 16 23:18:50 2017(r318387)
+++ head/sys/kern/subr_sglist.c Tue May 16 23:31:52 2017(r318388)
@@ -413,6 +413,49 @@ sglist_append_user(struct sglist *sg, vo
 }
 
 /*
+ * Append a subset of an existing scatter/gather list 'source' to a
+ * the scatter/gather list 'sg'.  If there are insufficient segments,
+ * then this fails with EFBIG.
+ */
+int
+sglist_append_sglist(struct sglist *sg, struct sglist *source, size_t offset,
+size_t length)
+{
+   struct sgsave save;
+   struct sglist_seg *ss;
+   size_t seglen;
+   int error, i;
+
+   if (sg->sg_maxseg == 0 || length == 0)
+   return (EINVAL);
+   SGLIST_SAVE(sg, save);
+   error = EINVAL;
+   ss = &sg->sg_segs[sg->sg_nseg - 1];
+   for (i = 0; i < source->sg_nseg; i++) {
+   if (offset >= source->sg_segs[i].ss_len) {
+   offset -= source->sg_segs[i].ss_len;
+   continue;
+   }
+   seglen = source->sg_segs[i].ss_len - offset;
+   if (seglen > length)
+   seglen = length;
+   error = _sglist_append_range(sg, &ss,
+   source->sg_segs[i].ss_paddr + offset, seglen);
+   if (error)
+   break;
+   offset = 0;
+   length -= seglen;
+   if (length == 0)
+   break;
+   }
+   if (length != 0)
+   error = EINVAL;
+   if (error)
+   SGLIST_RESTORE(sg, save);
+   return (error);
+}
+
+/*
  * Append the segments that describe a single uio to a scatter/gather
  * list.  If there are insufficient segments, then this fails with
  * EFBIG.

Modified: head/sys/sys/sglist.h
==
--- head/sys/sys/sglist.h   Tue May 16 23:18:50 2017(r318387)
+++ head/sys/sys/sglist.h   Tue May 16 23:31:52 2017(r318388)
@@ -88,6 +88,8 @@ int   sglist_append_bio(struct sglist *sg,
 intsglist_append_mbuf(struct sglist *sg, struct mbuf *m0);
 intsglist_append_phys(struct sglist *sg, vm_paddr_t paddr,
size_t len);
+intsglist_append_sglist(struct sglist *sg, struct 

svn commit: r318387 - head/sys/dev/cxgbe

2017-05-16 Thread John Baldwin
Author: jhb
Date: Tue May 16 23:18:50 2017
New Revision: 318387
URL: https://svnweb.freebsd.org/changeset/base/318387

Log:
  Add support for child devices that aren't ports.
  
  Invoke any identify routines of child drivers during attach before attaching
  children, and delete any remaining devices after deleting ports.
  
  MFC after:1 month
  Sponsored by: Chelsio Communications

Modified:
  head/sys/dev/cxgbe/t4_main.c

Modified: head/sys/dev/cxgbe/t4_main.c
==
--- head/sys/dev/cxgbe/t4_main.cTue May 16 23:15:40 2017
(r318386)
+++ head/sys/dev/cxgbe/t4_main.cTue May 16 23:18:50 2017
(r318387)
@@ -1186,6 +1186,12 @@ t4_attach(device_t dev)
goto done;
}
 
+   rc = bus_generic_probe(dev);
+   if (rc != 0) {
+   device_printf(dev, "failed to probe child drivers: %d\n", rc);
+   goto done;
+   }
+
rc = bus_generic_attach(dev);
if (rc != 0) {
device_printf(dev,
@@ -1339,6 +1345,8 @@ t4_detach_common(device_t dev)
}
}
 
+   device_delete_children(dev);
+
if (sc->flags & FULL_INIT_DONE)
adapter_full_uninit(sc);
 
___
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: r318386 - head/share/man/man7

2017-05-16 Thread John Baldwin
Author: jhb
Date: Tue May 16 23:15:40 2017
New Revision: 318386
URL: https://svnweb.freebsd.org/changeset/base/318386

Log:
  Note that the first release of FreeBSD/alpha was 3.2.
  
  Alpha is explicitly mentioned in the release announcements beginning with
  3.2.

Modified:
  head/share/man/man7/arch.7

Modified: head/share/man/man7/arch.7
==
--- head/share/man/man7/arch.7  Tue May 16 21:54:51 2017(r318385)
+++ head/share/man/man7/arch.7  Tue May 16 23:15:40 2017(r318386)
@@ -26,7 +26,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd May 5, 2017
+.Dd May 16, 2017
 .Dt ARCH 7
 .Os
 .Sh NAME
@@ -90,7 +90,7 @@ architectures, the final release.
 .Pp
 .Bl -column -offset indent "Sy Architecture" "Sy Initial Release" "Sy Final 
Release"
 .It Sy Architecture Ta Sy Initial Release Ta Sy Final Release
-.It alpha   Ta 3.x   Ta 6.4
+.It alpha   Ta 3.2   Ta 6.4
 .It amd64   Ta 5.1
 .It arm Ta 6.0
 .It armeb   Ta 8.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: r318385 - head/bin/sh

2017-05-16 Thread Jilles Tjoelker
Author: jilles
Date: Tue May 16 21:54:51 2017
New Revision: 318385
URL: https://svnweb.freebsd.org/changeset/base/318385

Log:
  sh: Simplify output buffering.
  
  Similarly to how STPUTC was changed, change struct output to store the
  pointer just past the end of the available space instead of the size of the
  available space, so after writing a character it is only necessary to
  increment a pointer and not to decrement a counter.

Modified:
  head/bin/sh/eval.c
  head/bin/sh/output.c
  head/bin/sh/output.h

Modified: head/bin/sh/eval.c
==
--- head/bin/sh/eval.c  Tue May 16 21:50:29 2017(r318384)
+++ head/bin/sh/eval.c  Tue May 16 21:54:51 2017(r318385)
@@ -1080,8 +1080,8 @@ evalcommand(union node *cmd, int flags, 
 #endif
mode = (cmdentry.u.index == EXECCMD)? 0 : REDIR_PUSH;
if (flags == EV_BACKCMD) {
-   memout.nleft = 0;
memout.nextc = memout.buf;
+   memout.bufend = memout.buf;
memout.bufsize = 64;
mode |= REDIR_BACKQ;
}
@@ -1134,8 +1134,11 @@ cmddone:
exitshell(exitstatus);
if (flags == EV_BACKCMD) {
backcmd->buf = memout.buf;
-   backcmd->nleft = memout.nextc - memout.buf;
+   backcmd->nleft = memout.buf != NULL ?
+   memout.nextc - memout.buf : 0;
memout.buf = NULL;
+   memout.nextc = NULL;
+   memout.bufend = NULL;
}
if (cmdentry.u.index != EXECCMD)
popredir();

Modified: head/bin/sh/output.c
==
--- head/bin/sh/output.cTue May 16 21:50:29 2017(r318384)
+++ head/bin/sh/output.cTue May 16 21:54:51 2017(r318385)
@@ -71,9 +71,9 @@ __FBSDID("$FreeBSD$");
 
 static int doformat_wr(void *, const char *, int);
 
-struct output output = {NULL, 0, NULL, OUTBUFSIZ, 1, 0};
-struct output errout = {NULL, 0, NULL, 256, 2, 0};
-struct output memout = {NULL, 0, NULL, 0, MEM_OUT, 0};
+struct output output = {NULL, NULL, NULL, OUTBUFSIZ, 1, 0};
+struct output errout = {NULL, NULL, NULL, 256, 2, 0};
+struct output memout = {NULL, NULL, NULL, 0, MEM_OUT, 0};
 struct output *out1 = &output;
 struct output *out2 = &errout;
 
@@ -214,20 +214,19 @@ emptyoutbuf(struct output *dest)
INTOFF;
dest->buf = ckmalloc(dest->bufsize);
dest->nextc = dest->buf;
-   dest->nleft = dest->bufsize;
+   dest->bufend = dest->buf + dest->bufsize;
INTON;
} else if (dest->fd == MEM_OUT) {
-   offset = dest->bufsize;
+   offset = dest->nextc - dest->buf;
INTOFF;
dest->bufsize <<= 1;
dest->buf = ckrealloc(dest->buf, dest->bufsize);
-   dest->nleft = dest->bufsize - offset;
+   dest->bufend = dest->buf + dest->bufsize;
dest->nextc = dest->buf + offset;
INTON;
} else {
flushout(dest);
}
-   dest->nleft--;
 }
 
 
@@ -248,7 +247,6 @@ flushout(struct output *dest)
if (xwrite(dest->fd, dest->buf, dest->nextc - dest->buf) < 0)
dest->flags |= OUTPUT_ERR;
dest->nextc = dest->buf;
-   dest->nleft = dest->bufsize;
 }
 
 
@@ -258,8 +256,9 @@ freestdout(void)
INTOFF;
if (output.buf) {
ckfree(output.buf);
+   output.nextc = NULL;
output.buf = NULL;
-   output.nleft = 0;
+   output.bufend = NULL;
}
INTON;
 }

Modified: head/bin/sh/output.h
==
--- head/bin/sh/output.hTue May 16 21:50:29 2017(r318384)
+++ head/bin/sh/output.hTue May 16 21:54:51 2017(r318385)
@@ -40,7 +40,7 @@
 
 struct output {
char *nextc;
-   int nleft;
+   char *bufend;
char *buf;
int bufsize;
short fd;
@@ -75,7 +75,7 @@ void fmtstr(char *, int, const char *, .
 void doformat(struct output *, const char *, va_list) __printflike(2, 0);
 int xwrite(int, const char *, int);
 
-#define outc(c, file)  (--(file)->nleft < 0? (emptyoutbuf(file), 
*(file)->nextc++ = (c)) : (*(file)->nextc++ = (c)))
+#define outc(c, file)  ((file)->nextc == (file)->bufend ? (emptyoutbuf(file), 
*(file)->nextc++ = (c)) : (*(file)->nextc++ = (c)))
 #define out1c(c)   outc(c, out1);
 #define out2c(c)   outcslow(c, out2);
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, sen

svn commit: r318383 - head/sys/dev/qlnx/qlnxe

2017-05-16 Thread David C Somayajulu
Author: davidcs
Date: Tue May 16 21:46:30 2017
New Revision: 318383
URL: https://svnweb.freebsd.org/changeset/base/318383

Log:
  QL_DPRINT macro modfied to handle multiple args; print line#.
  
  Submitted by:shminderjit.si...@cavium.com
  MFC after:3 days

Modified:
  head/sys/dev/qlnx/qlnxe/qlnx_def.h
  head/sys/dev/qlnx/qlnxe/qlnx_ioctl.c
  head/sys/dev/qlnx/qlnxe/qlnx_os.c

Modified: head/sys/dev/qlnx/qlnxe/qlnx_def.h
==
--- head/sys/dev/qlnx/qlnxe/qlnx_def.h  Tue May 16 21:34:40 2017
(r318382)
+++ head/sys/dev/qlnx/qlnxe/qlnx_def.h  Tue May 16 21:46:30 2017
(r318383)
@@ -483,35 +483,141 @@ typedef struct qlnx_host qlnx_host_t;
 
 #ifdef QLNX_DEBUG
 
-#define QL_DPRINT1(ha, x)   if (ha->dbg_level & 0x0001) device_printf x
-#define QL_DPRINT2(ha, x)   if (ha->dbg_level & 0x0002) device_printf x
-#define QL_DPRINT3(ha, x)   if (ha->dbg_level & 0x0004) device_printf x
-#define QL_DPRINT4(ha, x)   if (ha->dbg_level & 0x0008) device_printf x
-#define QL_DPRINT5(ha, x)   if (ha->dbg_level & 0x0010) device_printf x
-#define QL_DPRINT6(ha, x)   if (ha->dbg_level & 0x0020) device_printf x
-#define QL_DPRINT7(ha, x)   if (ha->dbg_level & 0x0040) device_printf x
-#define QL_DPRINT8(ha, x)   if (ha->dbg_level & 0x0080) device_printf x
-#define QL_DPRINT9(ha, x)   if (ha->dbg_level & 0x0100) device_printf x
-#define QL_DPRINT11(ha, x)  if (ha->dbg_level & 0x0400) device_printf x
-#define QL_DPRINT12(ha, x)  if (ha->dbg_level & 0x0800) device_printf x
-#define QL_DPRINT13(ha, x)  if (ha->dbg_level & 0x1000) device_printf x
-#define QL_DPRINT14(ha, x)  if (ha->dbg_level & 0x2000) device_printf x
+#define QL_DPRINT1(ha, x, ...) \
+   do {\
+   if ((ha)->dbg_level & 0x0001) { \
+   device_printf ((ha)->pci_dev,   \
+   "[%s:%d]" x,\
+   __func__, __LINE__, \
+   ## __VA_ARGS__);\
+   }   \
+   } while (0)
+
+#define QL_DPRINT2(ha, x, ...) \
+   do {\
+   if ((ha)->dbg_level & 0x0002) { \
+   device_printf ((ha)->pci_dev,   \
+   "[%s:%d]" x,\
+   __func__, __LINE__, \
+   ## __VA_ARGS__);\
+   }   \
+   } while (0)
+
+#define QL_DPRINT3(ha, x, ...) \
+   do {\
+   if ((ha)->dbg_level & 0x0004) { \
+   device_printf ((ha)->pci_dev,   \
+   "[%s:%d]" x,\
+   __func__, __LINE__, \
+   ## __VA_ARGS__);\
+   }   \
+   } while (0)
+
+#define QL_DPRINT4(ha, x, ...) \
+   do {\
+   if ((ha)->dbg_level & 0x0008) { \
+   device_printf ((ha)->pci_dev,   \
+   "[%s:%d]" x,\
+   __func__, __LINE__, \
+   ## __VA_ARGS__);\
+   }   \
+   } while (0)
+
+#define QL_DPRINT5(ha, x, ...) \
+   do {\
+   if ((ha)->dbg_level & 0x0010) { \
+   device_printf ((ha)->pci_dev,   \
+   "[%s:%d]" x,\
+   __func__, __LINE__, \
+   ## __VA_ARGS__);\
+   }   \
+   } while (0)
+
+#define QL_DPRINT6(ha, x, ...) \
+   do {\
+   if ((ha)->dbg_level & 0x0020) { \
+   device_printf ((ha)->pci_dev,   \
+   "[%s:%d]" x,\
+   __func__, __LINE__, \
+   ## __VA_ARGS__);\
+   } 

svn commit: r318382 - in head/sys: dev/qlnx/qlnxe modules/qlnx/qlnxe

2017-05-16 Thread David C Somayajulu
Author: davidcs
Date: Tue May 16 21:34:40 2017
New Revision: 318382
URL: https://svnweb.freebsd.org/changeset/base/318382

Log:
  1. Move Rx Processing to fp_taskqueue(). With this CPU utilization for 
processing interrupts drops to around 1% for 100G and under 1% for other speeds.
  2. Use sysctls for TRACE_LRO_CNT and TRACE_TSO_PKT_LEN
  3. remove unused mtx tx_lock
  4. bind taskqueue kernel thread to the appropriate cpu core
  5. when tx_ring is full, stop further transmits till at least 1/16th of the 
Tx Ring is empty. In our case 1K entries. Also if there are rx_pkts to process, 
put the taskqueue thread to sleep for 100ms, before enabling interrupts.
  6. Use rx_pkt_threshold of 128.
  
  MFC after:3 days

Modified:
  head/sys/dev/qlnx/qlnxe/qlnx_def.h
  head/sys/dev/qlnx/qlnxe/qlnx_os.c
  head/sys/dev/qlnx/qlnxe/qlnx_os.h
  head/sys/modules/qlnx/qlnxe/Makefile

Modified: head/sys/dev/qlnx/qlnxe/qlnx_def.h
==
--- head/sys/dev/qlnx/qlnxe/qlnx_def.h  Tue May 16 19:54:47 2017
(r318381)
+++ head/sys/dev/qlnx/qlnxe/qlnx_def.h  Tue May 16 21:34:40 2017
(r318382)
@@ -191,6 +191,7 @@ struct qlnx_fastpath {
struct mtx  tx_mtx;
chartx_mtx_name[32];
struct buf_ring *tx_br;
+   uint32_ttx_ring_full;
 
struct task fp_task;
struct taskqueue*fp_taskqueue;
@@ -364,6 +365,8 @@ struct qlnx_host {
/* debug */
 
uint32_tdbg_level;
+   uint32_tdbg_trace_lro_cnt;
+   uint32_tdbg_trace_tso_pkt_len;
uint32_tdp_level;
uint32_tdp_module;
 
@@ -386,7 +389,6 @@ struct qlnx_host {
 
/* tx related */
struct callout  tx_callout;
-   struct mtx  tx_lock;
uint32_ttxr_idx;
 
/* rx related */

Modified: head/sys/dev/qlnx/qlnxe/qlnx_os.c
==
--- head/sys/dev/qlnx/qlnxe/qlnx_os.c   Tue May 16 19:54:47 2017
(r318381)
+++ head/sys/dev/qlnx/qlnxe/qlnx_os.c   Tue May 16 21:34:40 2017
(r318382)
@@ -382,16 +382,77 @@ qlnx_fp_taskqueue(void *context, int pen
 struct ifnet   *ifp;
 struct mbuf*mp;
 intret;
+   int lro_enable, tc;
+   int rx_int = 0, total_rx_count = 0;
+   struct thread   *cthread;
 
 fp = context;
 
 if (fp == NULL)
 return;
 
+   cthread = curthread;
+
+   thread_lock(cthread);
+
+   if (!sched_is_bound(cthread))
+   sched_bind(cthread, fp->rss_id);
+
+   thread_unlock(cthread);
+
 ha = (qlnx_host_t *)fp->edev;
 
 ifp = ha->ifp;
 
+   lro_enable = ha->ifp->if_capenable & IFCAP_LRO;
+
+   rx_int = qlnx_rx_int(ha, fp, ha->rx_pkt_threshold, lro_enable);
+
+   if (rx_int) {
+   fp->rx_pkts += rx_int;
+   total_rx_count += rx_int;
+   }
+
+#ifdef QLNX_SOFT_LRO
+   {
+   struct lro_ctrl *lro;
+
+   lro = &fp->rxq->lro;
+
+   if (lro_enable && total_rx_count) {
+
+#if (__FreeBSD_version >= 1100101) || (defined QLNX_QSORT_LRO)
+
+   if (ha->dbg_trace_lro_cnt) {
+   if (lro->lro_mbuf_count & ~1023)
+   fp->lro_cnt_1024++;
+   else if (lro->lro_mbuf_count & ~511)
+   fp->lro_cnt_512++;
+   else if (lro->lro_mbuf_count & ~255)
+   fp->lro_cnt_256++;
+   else if (lro->lro_mbuf_count & ~127)
+   fp->lro_cnt_128++;
+   else if (lro->lro_mbuf_count & ~63)
+   fp->lro_cnt_64++;
+   }
+   tcp_lro_flush_all(lro);
+
+#else
+   struct lro_entry *queued;
+
+   while ((!SLIST_EMPTY(&lro->lro_active))) {
+   queued = SLIST_FIRST(&lro->lro_active);
+   SLIST_REMOVE_HEAD(&lro->lro_active, next);
+   tcp_lro_flush(lro, queued);
+   }
+#endif /* #if (__FreeBSD_version >= 1100101) || (defined QLNX_QSORT_LRO) */
+   }
+   }
+#endif /* #ifdef QLNX_SOFT_LRO */
+
+   ecore_sb_update_sb_idx(fp->sb_info);
+   rmb();
+
 mtx_lock(&fp->tx_mtx);
 
 if (((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) !=
@@ -401,13 +462,19 @@ qlnx_fp_taskqueue(void *context, int pen
 goto qlnx_fp_taskqueue_exit;
 }
 
-(void)q

Re: svn commit: r317732 - head/usr.bin/truss

2017-05-16 Thread Michael Tuexen
> On 16. May 2017, at 20:28, John Baldwin  wrote:
> 
> On Wednesday, May 03, 2017 09:23:14 AM Michael Tuexen wrote:
>> Author: tuexen
>> Date: Wed May  3 09:23:13 2017
>> New Revision: 317732
>> URL: https://svnweb.freebsd.org/changeset/base/317732
>> 
>> Log:
>>  Decode the third argument of socket().
> 
> This is not quite right for sockets that aren't PF_INET.  Probably this
> warrants a const char *sysdecode_socket_protocol(int domain, int protocol)
> that honors the domain in deciding what protocol value to output.  For now
> this could just handle PF_INET:
> 
> const char *
> sysdecode_socket_protocol(int domain, int protocol)
> {
> 
>switch (domain) {
>case PF_INET:
>return (lookup_value(sockipproto, protocol));
>default:
>return (NULL));
> }
> 
> Then use this in truss.
Yes, you are right. Will fix this tomorrow.

Best regards
Michael
> 
> The socket option stuff currently hardcodes IP protocols and levels only
> because we don't have a good way of obtaining the domain of an existing
> socket in a target process.  For socket()'s protocol argument though we
> readily have the domain available.
> 
> At some point in the future we might address the socket option issue by
> caching the domain argument when sockets are created in a table, and for
> truss when attaching to an existing process using the kinfo_file interface to
> learn about existing sockets, but that's not entirely trivial.
> 
> -- 
> John Baldwin

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


svn commit: r318380 - head/libexec/rtld-elf

2017-05-16 Thread Konstantin Belousov
Author: kib
Date: Tue May 16 19:53:38 2017
New Revision: 318380
URL: https://svnweb.freebsd.org/changeset/base/318380

Log:
  Pretend that there is some security when executing in direct mode.
  
  Do not allow direct exec if we the process is suid. Try to follow Unix
  permission checks for DACs, ignore ACLs.
  
  Reviewed by:  emaste
  Sponsored by: The FreeBSD Foundation
  MFC after:2 weeks
  Differential revision:https://reviews.freebsd.org/D10750

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

Modified: head/libexec/rtld-elf/rtld.c
==
--- head/libexec/rtld-elf/rtld.cTue May 16 19:48:07 2017
(r318379)
+++ head/libexec/rtld-elf/rtld.cTue May 16 19:53:38 2017
(r318380)
@@ -345,12 +345,14 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_
 const Elf_Phdr *phdr;
 Objlist initlist;
 RtldLockState lockstate;
+struct stat st;
 Elf_Addr *argcp;
 char **argv, *argv0, **env, **envp, *kexecpath, *library_path_rpath;
 caddr_t imgentry;
 char buf[MAXPATHLEN];
 int argc, fd, i, mib[2], phnum;
 size_t len;
+bool dir_enable;
 
 /*
  * On entry, the dynamic linker itself has not been relocated yet.
@@ -419,6 +421,11 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_
assert(aux_info[AT_PHDR] != NULL);
phdr = (const Elf_Phdr *)aux_info[AT_PHDR]->a_un.a_ptr;
if (phdr == obj_rtld.phdr) {
+   if (!trust) {
+   rtld_printf("Tainted process refusing to run binary %s\n",
+ argv0);
+   rtld_die();
+   }
dbg("opening main program in direct exec mode");
if (argc >= 2) {
argv0 = argv[1];
@@ -428,6 +435,37 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_
  rtld_strerror(errno));
rtld_die();
}
+   if (fstat(fd, &st) == -1) {
+   rtld_printf("Stat %s: %s\n", argv0,
+ rtld_strerror(errno));
+   rtld_die();
+   }
+
+   /*
+* Rough emulation of the permission checks done by
+* execve(2), only Unix DACs are checked, ACLs are
+* ignored.  Preserve the semantic of disabling owner
+* to execute if owner x bit is cleared, even if
+* others x bit is enabled.
+* mmap(2) does not allow to mmap with PROT_EXEC if
+* binary' file comes from noexec mount.  We cannot
+* set VV_TEXT on the binary.
+*/
+   dir_enable = false;
+   if (st.st_uid == geteuid()) {
+   if ((st.st_mode & S_IXUSR) != 0)
+   dir_enable = true;
+   } else if (st.st_gid == getegid()) {
+   if ((st.st_mode & S_IXGRP) != 0)
+   dir_enable = true;
+   } else if ((st.st_mode & S_IXOTH) != 0) {
+   dir_enable = true;
+   }
+   if (!dir_enable) {
+   rtld_printf("No execute permission for binary %s\n",
+ argv0);
+   rtld_die();
+   }
 
/*
 * For direct exec mode, argv[0] is the interpreter
___
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: r318379 - vendor/lldb/lldb-trunk-r303197

2017-05-16 Thread Dimitry Andric
Author: dim
Date: Tue May 16 19:48:07 2017
New Revision: 318379
URL: https://svnweb.freebsd.org/changeset/base/318379

Log:
  Tag lldb trunk r303197.

Added:
  vendor/lldb/lldb-trunk-r303197/
 - copied from r318378, 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: r318378 - in vendor/lldb/dist: include/lldb include/lldb/API include/lldb/Breakpoint include/lldb/Core include/lldb/DataFormatters include/lldb/Expression include/lldb/Host include/lldb...

2017-05-16 Thread Dimitry Andric
Author: dim
Date: Tue May 16 19:47:58 2017
New Revision: 318378
URL: https://svnweb.freebsd.org/changeset/base/318378

Log:
  Vendor import of lldb trunk r303197:
  https://llvm.org/svn/llvm-project/lldb/trunk@303197

Added:
  vendor/lldb/dist/include/lldb/Utility/Status.h   (contents, props changed)
  
vendor/lldb/dist/packages/Python/lldbsuite/test/lang/cpp/class-template-parameter-pack/
  
vendor/lldb/dist/packages/Python/lldbsuite/test/lang/cpp/class-template-parameter-pack/Makefile
   (contents, props changed)
  
vendor/lldb/dist/packages/Python/lldbsuite/test/lang/cpp/class-template-parameter-pack/TestClassTemplateParameterPack.py
   (contents, props changed)
  
vendor/lldb/dist/packages/Python/lldbsuite/test/lang/cpp/class-template-parameter-pack/main.cpp
   (contents, props changed)
  
vendor/lldb/dist/packages/Python/lldbsuite/test/lang/cpp/function-template-parameter-pack/
  
vendor/lldb/dist/packages/Python/lldbsuite/test/lang/cpp/function-template-parameter-pack/Makefile
   (contents, props changed)
  
vendor/lldb/dist/packages/Python/lldbsuite/test/lang/cpp/function-template-parameter-pack/TestFunctionTemplateParameterPack.py
   (contents, props changed)
  
vendor/lldb/dist/packages/Python/lldbsuite/test/lang/cpp/function-template-parameter-pack/main.cpp
   (contents, props changed)
  vendor/lldb/dist/packages/Python/lldbsuite/test/lang/objc/ptr_refs/
  vendor/lldb/dist/packages/Python/lldbsuite/test/lang/objc/ptr_refs/Makefile   
(contents, props changed)
  
vendor/lldb/dist/packages/Python/lldbsuite/test/lang/objc/ptr_refs/TestPtrRefsObjC.py
   (contents, props changed)
  vendor/lldb/dist/packages/Python/lldbsuite/test/lang/objc/ptr_refs/main.m
  vendor/lldb/dist/source/Utility/Status.cpp   (contents, props changed)
  vendor/lldb/dist/unittests/Utility/StatusTest.cpp   (contents, props changed)
Deleted:
  vendor/lldb/dist/include/lldb/Utility/Error.h
  vendor/lldb/dist/source/Utility/Error.cpp
  vendor/lldb/dist/unittests/Utility/ErrorTest.cpp
Modified:
  vendor/lldb/dist/include/lldb/API/SBError.h
  vendor/lldb/dist/include/lldb/API/SBPlatform.h
  vendor/lldb/dist/include/lldb/API/SBTarget.h
  vendor/lldb/dist/include/lldb/Breakpoint/Breakpoint.h
  vendor/lldb/dist/include/lldb/Breakpoint/BreakpointID.h
  vendor/lldb/dist/include/lldb/Breakpoint/BreakpointLocation.h
  vendor/lldb/dist/include/lldb/Breakpoint/BreakpointOptions.h
  vendor/lldb/dist/include/lldb/Breakpoint/BreakpointResolver.h
  vendor/lldb/dist/include/lldb/Breakpoint/BreakpointResolverAddress.h
  vendor/lldb/dist/include/lldb/Breakpoint/BreakpointResolverFileLine.h
  vendor/lldb/dist/include/lldb/Breakpoint/BreakpointResolverFileRegex.h
  vendor/lldb/dist/include/lldb/Breakpoint/BreakpointResolverName.h
  vendor/lldb/dist/include/lldb/Breakpoint/Watchpoint.h
  vendor/lldb/dist/include/lldb/Core/Communication.h
  vendor/lldb/dist/include/lldb/Core/Connection.h
  vendor/lldb/dist/include/lldb/Core/Debugger.h
  vendor/lldb/dist/include/lldb/Core/FormatEntity.h
  vendor/lldb/dist/include/lldb/Core/MappedHash.h
  vendor/lldb/dist/include/lldb/Core/Module.h
  vendor/lldb/dist/include/lldb/Core/ModuleList.h
  vendor/lldb/dist/include/lldb/Core/PluginManager.h
  vendor/lldb/dist/include/lldb/Core/RegisterValue.h
  vendor/lldb/dist/include/lldb/Core/Scalar.h
  vendor/lldb/dist/include/lldb/Core/SearchFilter.h
  vendor/lldb/dist/include/lldb/Core/StructuredData.h
  vendor/lldb/dist/include/lldb/Core/StructuredDataImpl.h
  vendor/lldb/dist/include/lldb/Core/Timer.h
  vendor/lldb/dist/include/lldb/Core/UserSettingsController.h
  vendor/lldb/dist/include/lldb/Core/Value.h
  vendor/lldb/dist/include/lldb/Core/ValueObject.h
  vendor/lldb/dist/include/lldb/Core/ValueObjectConstResult.h
  vendor/lldb/dist/include/lldb/Core/ValueObjectConstResultCast.h
  vendor/lldb/dist/include/lldb/Core/ValueObjectConstResultChild.h
  vendor/lldb/dist/include/lldb/Core/ValueObjectConstResultImpl.h
  vendor/lldb/dist/include/lldb/Core/ValueObjectDynamicValue.h
  vendor/lldb/dist/include/lldb/Core/ValueObjectRegister.h
  vendor/lldb/dist/include/lldb/Core/ValueObjectSyntheticFilter.h
  vendor/lldb/dist/include/lldb/Core/ValueObjectVariable.h
  vendor/lldb/dist/include/lldb/DataFormatters/TypeSummary.h
  vendor/lldb/dist/include/lldb/Expression/DWARFExpression.h
  vendor/lldb/dist/include/lldb/Expression/ExpressionParser.h
  vendor/lldb/dist/include/lldb/Expression/IRExecutionUnit.h
  vendor/lldb/dist/include/lldb/Expression/IRInterpreter.h
  vendor/lldb/dist/include/lldb/Expression/IRMemoryMap.h
  vendor/lldb/dist/include/lldb/Expression/LLVMUserExpression.h
  vendor/lldb/dist/include/lldb/Expression/Materializer.h
  vendor/lldb/dist/include/lldb/Expression/REPL.h
  vendor/lldb/dist/include/lldb/Expression/UserExpression.h
  vendor/lldb/dist/include/lldb/Expression/UtilityFunction.h
  vendor/lldb/dist/include/lldb/Host/File.h
  vendor/lldb/dist/include/lldb/Host/FileCache.h
  vendor/lldb/dist/include/lldb/Host/FileSystem.h
  vendor/lldb/dist/include/lldb/Host

svn commit: r318377 - vendor/lld/lld-trunk-r303197

2017-05-16 Thread Dimitry Andric
Author: dim
Date: Tue May 16 19:47:48 2017
New Revision: 318377
URL: https://svnweb.freebsd.org/changeset/base/318377

Log:
  Tag lld trunk r303197.

Added:
  vendor/lld/lld-trunk-r303197/
 - copied from r318376, 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: r318376 - in vendor/lld/dist: COFF ELF docs include/lld/Core lib/Core lib/ReaderWriter/MachO test/COFF test/ELF test/ELF/Inputs test/ELF/linkerscript unittests unittests/CoreTests

2017-05-16 Thread Dimitry Andric
Author: dim
Date: Tue May 16 19:47:41 2017
New Revision: 318376
URL: https://svnweb.freebsd.org/changeset/base/318376

Log:
  Vendor import of lld trunk r303197:
  https://llvm.org/svn/llvm-project/lld/trunk@303197

Added:
  vendor/lld/dist/test/ELF/gdb-index-empty.s   (contents, props changed)
  vendor/lld/dist/test/ELF/gdb-index-gc-sections.s   (contents, props changed)
  vendor/lld/dist/test/ELF/linkerscript/early-assign-symbol.s   (contents, 
props changed)
  vendor/lld/dist/test/ELF/linkerscript/symbol-memoryexpr.s   (contents, props 
changed)
  vendor/lld/dist/test/ELF/many-alloc-sections.s   (contents, props changed)
  vendor/lld/dist/test/ELF/x86-64-reloc-tpoff32-fpic.s   (contents, props 
changed)
Deleted:
  vendor/lld/dist/include/lld/Core/Parallel.h
  vendor/lld/dist/include/lld/Core/TaskGroup.h
  vendor/lld/dist/lib/Core/TaskGroup.cpp
  vendor/lld/dist/test/COFF/constant-export.yaml
  vendor/lld/dist/test/ELF/Inputs/i386-static-tls-model1.s
  vendor/lld/dist/test/ELF/Inputs/i386-static-tls-model2.s
  vendor/lld/dist/test/ELF/Inputs/i386-static-tls-model3.s
  vendor/lld/dist/test/ELF/Inputs/i386-static-tls-model4.s
  vendor/lld/dist/test/ELF/i386-static-tls-model.s
  vendor/lld/dist/unittests/CoreTests/
Modified:
  vendor/lld/dist/COFF/Driver.cpp
  vendor/lld/dist/COFF/ICF.cpp
  vendor/lld/dist/COFF/MapFile.cpp
  vendor/lld/dist/COFF/Writer.cpp
  vendor/lld/dist/ELF/Config.h
  vendor/lld/dist/ELF/Driver.cpp
  vendor/lld/dist/ELF/GdbIndex.h
  vendor/lld/dist/ELF/ICF.cpp
  vendor/lld/dist/ELF/InputFiles.cpp
  vendor/lld/dist/ELF/InputSection.cpp
  vendor/lld/dist/ELF/LinkerScript.cpp
  vendor/lld/dist/ELF/LinkerScript.h
  vendor/lld/dist/ELF/MapFile.cpp
  vendor/lld/dist/ELF/OutputSections.cpp
  vendor/lld/dist/ELF/OutputSections.h
  vendor/lld/dist/ELF/Relocations.cpp
  vendor/lld/dist/ELF/ScriptParser.cpp
  vendor/lld/dist/ELF/Strings.cpp
  vendor/lld/dist/ELF/Symbols.cpp
  vendor/lld/dist/ELF/Symbols.h
  vendor/lld/dist/ELF/SyntheticSections.cpp
  vendor/lld/dist/ELF/SyntheticSections.h
  vendor/lld/dist/ELF/Target.cpp
  vendor/lld/dist/ELF/Threads.h
  vendor/lld/dist/ELF/Thunks.cpp
  vendor/lld/dist/ELF/Writer.cpp
  vendor/lld/dist/ELF/Writer.h
  vendor/lld/dist/docs/CMakeLists.txt
  vendor/lld/dist/lib/Core/CMakeLists.txt
  vendor/lld/dist/lib/ReaderWriter/MachO/LayoutPass.cpp
  vendor/lld/dist/test/COFF/constant-export.test
  vendor/lld/dist/test/ELF/i386-tls-ie-shared.s
  vendor/lld/dist/test/ELF/incompatible-section-types2.s
  vendor/lld/dist/test/ELF/linkerscript/ehdr_start.s
  vendor/lld/dist/test/ELF/linkerscript/sections-constraint.s
  vendor/lld/dist/test/ELF/linkerscript/sections.s
  vendor/lld/dist/test/ELF/many-sections.s
  vendor/lld/dist/test/ELF/tls-dynamic-i686.s
  vendor/lld/dist/test/ELF/tls-opt-iele-i686-nopic.s
  vendor/lld/dist/unittests/CMakeLists.txt

Modified: vendor/lld/dist/COFF/Driver.cpp
==
--- vendor/lld/dist/COFF/Driver.cpp Tue May 16 19:47:39 2017
(r318375)
+++ vendor/lld/dist/COFF/Driver.cpp Tue May 16 19:47:41 2017
(r318376)
@@ -18,7 +18,6 @@
 #include "lld/Driver/Driver.h"
 #include "llvm/ADT/Optional.h"
 #include "llvm/ADT/StringSwitch.h"
-#include "llvm/LibDriver/LibDriver.h"
 #include "llvm/Object/ArchiveWriter.h"
 #include "llvm/Option/Arg.h"
 #include "llvm/Option/ArgList.h"
@@ -29,6 +28,7 @@
 #include "llvm/Support/TarWriter.h"
 #include "llvm/Support/TargetSelect.h"
 #include "llvm/Support/raw_ostream.h"
+#include "llvm/ToolDrivers/llvm-lib/LibDriver.h"
 #include 
 #include 
 

Modified: vendor/lld/dist/COFF/ICF.cpp
==
--- vendor/lld/dist/COFF/ICF.cppTue May 16 19:47:39 2017
(r318375)
+++ vendor/lld/dist/COFF/ICF.cppTue May 16 19:47:41 2017
(r318376)
@@ -21,9 +21,9 @@
 #include "Chunks.h"
 #include "Error.h"
 #include "Symbols.h"
-#include "lld/Core/Parallel.h"
 #include "llvm/ADT/Hashing.h"
 #include "llvm/Support/Debug.h"
+#include "llvm/Support/Parallel.h"
 #include "llvm/Support/raw_ostream.h"
 #include 
 #include 
@@ -192,7 +192,7 @@ void ICF::forEachClass(std::function
 getSymbolStrings(ArrayRef Syms) {
   std::vector Str(Syms.size());
-  parallel_for((size_t)0, Syms.size(), [&](size_t I) {
+  for_each_n(parallel::par, (size_t)0, Syms.size(), [&](size_t I) {
 raw_string_ostream OS(Str[I]);
 writeHeader(OS, Syms[I]->getRVA(), 0, 0);
 OS << indent(2) << toString(*Syms[I]);

Modified: vendor/lld/dist/COFF/Writer.cpp
==
--- vendor/lld/dist/COFF/Writer.cpp Tue May 16 19:47:39 2017
(r318375)
+++ vendor/lld/dist/COFF/Writer.cpp Tue May 16 19:47:41 2017
(r318376)
@@ -17,13 +17,13 @@
 #include "PDB.h"
 #include "SymbolTable.h"
 #include "Symbols.h"
-#include "lld/Core/Parallel.h"
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/STLExtras.h

svn commit: r318372 - in vendor/compiler-rt/dist: . cmake include/xray lib/asan lib/asan/tests lib/builtins lib/builtins/arm lib/esan lib/lsan lib/msan lib/msan/tests lib/sanitizer_common lib/sanit...

2017-05-16 Thread Dimitry Andric
Author: dim
Date: Tue May 16 19:47:19 2017
New Revision: 318372
URL: https://svnweb.freebsd.org/changeset/base/318372

Log:
  Vendor import of compiler-rt trunk r303197:
  https://llvm.org/svn/llvm-project/compiler-rt/trunk@303197

Added:
  vendor/compiler-rt/dist/lib/scudo/scudo_allocator_combined.h   (contents, 
props changed)
  vendor/compiler-rt/dist/lib/scudo/scudo_crc32.h   (contents, props changed)
  
vendor/compiler-rt/dist/test/asan/TestCases/Linux/sanbox_read_proc_self_maps_test.cc
   (contents, props changed)
  vendor/compiler-rt/dist/test/asan/TestCases/Posix/strndup_oob_test.cc   
(contents, props changed)
  vendor/compiler-rt/dist/test/msan/pr32842.c   (contents, props changed)
  vendor/compiler-rt/dist/test/msan/strndup.cc   (contents, props changed)
  vendor/compiler-rt/dist/test/xray/TestCases/Linux/custom-event-logging.cc   
(contents, props changed)
Modified:
  vendor/compiler-rt/dist/CMakeLists.txt
  vendor/compiler-rt/dist/cmake/config-ix.cmake
  vendor/compiler-rt/dist/include/xray/xray_interface.h
  vendor/compiler-rt/dist/lib/asan/asan_allocator.h
  vendor/compiler-rt/dist/lib/asan/asan_flags.cc
  vendor/compiler-rt/dist/lib/asan/tests/asan_str_test.cc
  vendor/compiler-rt/dist/lib/builtins/CMakeLists.txt
  vendor/compiler-rt/dist/lib/builtins/adddf3.c
  vendor/compiler-rt/dist/lib/builtins/addsf3.c
  vendor/compiler-rt/dist/lib/builtins/arm/aeabi_cdcmpeq_check_nan.c
  vendor/compiler-rt/dist/lib/builtins/arm/aeabi_cfcmpeq_check_nan.c
  vendor/compiler-rt/dist/lib/builtins/arm/aeabi_div0.c
  vendor/compiler-rt/dist/lib/builtins/arm/aeabi_drsub.c
  vendor/compiler-rt/dist/lib/builtins/arm/aeabi_frsub.c
  vendor/compiler-rt/dist/lib/builtins/ashldi3.c
  vendor/compiler-rt/dist/lib/builtins/ashrdi3.c
  vendor/compiler-rt/dist/lib/builtins/assembly.h
  vendor/compiler-rt/dist/lib/builtins/comparedf2.c
  vendor/compiler-rt/dist/lib/builtins/comparesf2.c
  vendor/compiler-rt/dist/lib/builtins/divdf3.c
  vendor/compiler-rt/dist/lib/builtins/divsf3.c
  vendor/compiler-rt/dist/lib/builtins/divsi3.c
  vendor/compiler-rt/dist/lib/builtins/extendhfsf2.c
  vendor/compiler-rt/dist/lib/builtins/extendsfdf2.c
  vendor/compiler-rt/dist/lib/builtins/fixdfdi.c
  vendor/compiler-rt/dist/lib/builtins/fixdfsi.c
  vendor/compiler-rt/dist/lib/builtins/fixsfdi.c
  vendor/compiler-rt/dist/lib/builtins/fixsfsi.c
  vendor/compiler-rt/dist/lib/builtins/fixunsdfdi.c
  vendor/compiler-rt/dist/lib/builtins/fixunsdfsi.c
  vendor/compiler-rt/dist/lib/builtins/fixunssfdi.c
  vendor/compiler-rt/dist/lib/builtins/fixunssfsi.c
  vendor/compiler-rt/dist/lib/builtins/floatdidf.c
  vendor/compiler-rt/dist/lib/builtins/floatdisf.c
  vendor/compiler-rt/dist/lib/builtins/floatsidf.c
  vendor/compiler-rt/dist/lib/builtins/floatsisf.c
  vendor/compiler-rt/dist/lib/builtins/floatundidf.c
  vendor/compiler-rt/dist/lib/builtins/floatundisf.c
  vendor/compiler-rt/dist/lib/builtins/floatunsidf.c
  vendor/compiler-rt/dist/lib/builtins/floatunsisf.c
  vendor/compiler-rt/dist/lib/builtins/int_lib.h
  vendor/compiler-rt/dist/lib/builtins/lshrdi3.c
  vendor/compiler-rt/dist/lib/builtins/muldf3.c
  vendor/compiler-rt/dist/lib/builtins/muldi3.c
  vendor/compiler-rt/dist/lib/builtins/mulsf3.c
  vendor/compiler-rt/dist/lib/builtins/negdf2.c
  vendor/compiler-rt/dist/lib/builtins/negsf2.c
  vendor/compiler-rt/dist/lib/builtins/subdf3.c
  vendor/compiler-rt/dist/lib/builtins/subsf3.c
  vendor/compiler-rt/dist/lib/builtins/truncdfhf2.c
  vendor/compiler-rt/dist/lib/builtins/truncdfsf2.c
  vendor/compiler-rt/dist/lib/builtins/truncsfhf2.c
  vendor/compiler-rt/dist/lib/builtins/udivsi3.c
  vendor/compiler-rt/dist/lib/esan/esan_interceptors.cpp
  vendor/compiler-rt/dist/lib/lsan/lsan_allocator.h
  vendor/compiler-rt/dist/lib/lsan/lsan_common_linux.cc
  vendor/compiler-rt/dist/lib/lsan/lsan_common_mac.cc
  vendor/compiler-rt/dist/lib/msan/msan_allocator.cc
  vendor/compiler-rt/dist/lib/msan/msan_interceptors.cc
  vendor/compiler-rt/dist/lib/msan/tests/msan_test.cc
  vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_internal.h
  vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_primary32.h
  vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common_interceptors.inc
  vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flags.inc
  vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform_interceptors.h
  vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_procmaps.h
  vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_procmaps_linux.cc
  vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_procmaps_mac.cc
  vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_stoptheworld_mac.cc
  vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_allocator_test.cc
  vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_test_utils.h
  vendor/compiler-rt/dist/lib/scudo/scudo_allocator.cpp
  vendor/compiler-rt/dist/lib/scudo/scudo_allocator.h
  vendor/compiler-rt/dist/lib/scudo/scudo_allocator_secon

svn commit: r318374 - in vendor/libc++/dist: . docs include include/experimental include/ext include/support/win32 src src/include src/support/runtime src/support/win32 test/libcxx/input.output/fil...

2017-05-16 Thread Dimitry Andric
Author: dim
Date: Tue May 16 19:47:31 2017
New Revision: 318374
URL: https://svnweb.freebsd.org/changeset/base/318374

Log:
  Vendor import of libc++ trunk r303197:
  https://llvm.org/svn/llvm-project/libcxx/trunk@303197

Added:
  vendor/libc++/dist/appveyor-reqs-install.cmd
  vendor/libc++/dist/include/support/win32/limits_msvc_win32.h   (contents, 
props changed)
  
vendor/libc++/dist/test/libcxx/input.output/file.streams/c.files/no.global.filesystem.namespace/
  
vendor/libc++/dist/test/libcxx/input.output/file.streams/c.files/no.global.filesystem.namespace/fopen.fail.cpp
   (contents, props changed)
  
vendor/libc++/dist/test/libcxx/input.output/file.streams/c.files/no.global.filesystem.namespace/rename.fail.cpp
   (contents, props changed)
  
vendor/libc++/dist/test/libcxx/thread/thread.condition/PR30202_notify_from_pthread_created_thread.pass.cpp
   (contents, props changed)
  vendor/libc++/dist/test/libcxx/thread/thread.threads/thread.thread.this/
  
vendor/libc++/dist/test/libcxx/thread/thread.threads/thread.thread.this/sleep_for.pass.cpp
   (contents, props changed)
  vendor/libc++/dist/test/libcxx/utilities/function.objects/refwrap/
  
vendor/libc++/dist/test/libcxx/utilities/function.objects/refwrap/binary.pass.cpp
   (contents, props changed)
  
vendor/libc++/dist/test/libcxx/utilities/function.objects/refwrap/unary.pass.cpp
   (contents, props changed)
  vendor/libc++/dist/test/libcxx/utilities/template.bitset/includes.pass.cpp   
(contents, props changed)
  
vendor/libc++/dist/test/libcxx/utilities/tuple/tuple.tuple/empty_member.pass.cpp
   (contents, props changed)
  
vendor/libc++/dist/test/std/language.support/support.types/byteops/enum_direct_init.pass.cpp
   (contents, props changed)
  
vendor/libc++/dist/test/std/thread/thread.threads/thread.thread.this/sleep_for_tested_elsewhere.pass.cpp
   (contents, props changed)
  
vendor/libc++/dist/test/support/test.workarounds/c1xx_broken_za_ctor_check.pass.cpp
   (contents, props changed)
Deleted:
  vendor/libc++/dist/include/support/win32/limits_win32.h
  vendor/libc++/dist/include/support/win32/locale_mgmt_win32.h
  vendor/libc++/dist/include/support/win32/support.h
  vendor/libc++/dist/install-appveyor-reqs.cmd
  
vendor/libc++/dist/test/std/input.output/file.streams/c.files/no.global.filesystem.namespace/fopen.fail.cpp
  
vendor/libc++/dist/test/std/input.output/file.streams/c.files/no.global.filesystem.namespace/lit.local.cfg
  
vendor/libc++/dist/test/std/input.output/file.streams/c.files/no.global.filesystem.namespace/rename.fail.cpp
  
vendor/libc++/dist/test/std/strings/string.view/string.view.modifiers/clear.pass.cpp
  
vendor/libc++/dist/test/std/thread/thread.condition/PR30202_notify_from_pthread_created_thread.pass.cpp
  
vendor/libc++/dist/test/std/thread/thread.threads/thread.thread.this/sleep_for.pass.cpp
  vendor/libc++/dist/test/std/utilities/function.objects/refwrap/binary.pass.cpp
  vendor/libc++/dist/test/std/utilities/function.objects/refwrap/unary.pass.cpp
  vendor/libc++/dist/test/std/utilities/tuple/tuple.tuple/empty_member.pass.cpp
Modified:
  vendor/libc++/dist/appveyor.yml
  vendor/libc++/dist/docs/CMakeLists.txt
  vendor/libc++/dist/docs/TestingLibcxx.rst
  vendor/libc++/dist/include/__bsd_locale_fallbacks.h
  vendor/libc++/dist/include/__config
  vendor/libc++/dist/include/__locale
  vendor/libc++/dist/include/__mutex_base
  vendor/libc++/dist/include/__threading_support
  vendor/libc++/dist/include/__undef_min_max
  vendor/libc++/dist/include/algorithm
  vendor/libc++/dist/include/ctype.h
  vendor/libc++/dist/include/experimental/numeric
  vendor/libc++/dist/include/ext/hash_map
  vendor/libc++/dist/include/ext/hash_set
  vendor/libc++/dist/include/limits
  vendor/libc++/dist/include/locale
  vendor/libc++/dist/include/memory
  vendor/libc++/dist/include/numeric
  vendor/libc++/dist/include/stdio.h
  vendor/libc++/dist/include/stdlib.h
  vendor/libc++/dist/include/string_view
  vendor/libc++/dist/include/support/win32/locale_win32.h
  vendor/libc++/dist/include/variant
  vendor/libc++/dist/include/wchar.h
  vendor/libc++/dist/src/include/atomic_support.h
  vendor/libc++/dist/src/locale.cpp
  vendor/libc++/dist/src/string.cpp
  vendor/libc++/dist/src/support/runtime/exception_pointer_msvc.ipp
  vendor/libc++/dist/src/support/win32/locale_win32.cpp
  vendor/libc++/dist/src/thread.cpp
  
vendor/libc++/dist/test/std/experimental/utilities/meta/meta.type.synop/meta.unary.prop.pass.cpp
  
vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp
  
vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp
  
vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp
  
vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow_replace.pass.cpp
  
vendor/libc++/dist/test/std/language.s

svn commit: r318373 - vendor/compiler-rt/compiler-rt-trunk-r303197

2017-05-16 Thread Dimitry Andric
Author: dim
Date: Tue May 16 19:47:28 2017
New Revision: 318373
URL: https://svnweb.freebsd.org/changeset/base/318373

Log:
  Tag compiler-rt trunk r303197.

Added:
  vendor/compiler-rt/compiler-rt-trunk-r303197/
 - copied from r318372, 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: r318375 - vendor/libc++/libc++-trunk-r303197

2017-05-16 Thread Dimitry Andric
Author: dim
Date: Tue May 16 19:47:39 2017
New Revision: 318375
URL: https://svnweb.freebsd.org/changeset/base/318375

Log:
  Tag libc++ trunk r303197.

Added:
  vendor/libc++/libc++-trunk-r303197/
 - copied from r318374, 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: r318371 - vendor/clang/clang-trunk-r303197

2017-05-16 Thread Dimitry Andric
Author: dim
Date: Tue May 16 19:47:16 2017
New Revision: 318371
URL: https://svnweb.freebsd.org/changeset/base/318371

Log:
  Tag clang trunk r303197.

Added:
  vendor/clang/clang-trunk-r303197/
 - copied from r318370, 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: r318370 - in vendor/clang/dist: . cmake/caches docs include/clang-c include/clang/AST include/clang/Basic include/clang/Driver include/clang/Format include/clang/Frontend include/clang/...

2017-05-16 Thread Dimitry Andric
Author: dim
Date: Tue May 16 19:47:09 2017
New Revision: 318370
URL: https://svnweb.freebsd.org/changeset/base/318370

Log:
  Vendor import of clang trunk r303197:
  https://llvm.org/svn/llvm-project/cfe/trunk@303197

Added:
  vendor/clang/dist/test/Analysis/builtin-assume.c   (contents, props changed)
  vendor/clang/dist/test/CXX/drs/dr20xx.cpp   (contents, props changed)
  vendor/clang/dist/test/CodeGen/asan-no-globals-no-comdat.cpp   (contents, 
props changed)
  vendor/clang/dist/test/CodeGen/mips-aggregate-arg.c   (contents, props 
changed)
  vendor/clang/dist/test/CodeGen/sparcv8-inline-asm.c   (contents, props 
changed)
  vendor/clang/dist/test/CodeGen/x86_64-mno-sse.c   (contents, props changed)
  vendor/clang/dist/test/CodeGen/xray-customevent.cpp   (contents, props 
changed)
  vendor/clang/dist/test/CodeGenCXX/array-default-argument.cpp   (contents, 
props changed)
  vendor/clang/dist/test/Import/conflicting-struct/
  vendor/clang/dist/test/Import/conflicting-struct/Inputs/
  vendor/clang/dist/test/Import/conflicting-struct/Inputs/S1.cpp   (contents, 
props changed)
  vendor/clang/dist/test/Import/conflicting-struct/Inputs/S2.cpp   (contents, 
props changed)
  vendor/clang/dist/test/Import/conflicting-struct/test.cpp   (contents, props 
changed)
  vendor/clang/dist/test/Index/Core/index-dependent-source.cpp   (contents, 
props changed)
  vendor/clang/dist/test/Index/Core/index-instantiated-source.cpp   (contents, 
props changed)
  vendor/clang/dist/test/Index/complete-available.m
  vendor/clang/dist/test/Modules/DebugInfoNamespace.cpp   (contents, props 
changed)
  vendor/clang/dist/test/Modules/Inputs/DebugInfoNamespace/
  vendor/clang/dist/test/Modules/Inputs/DebugInfoNamespace/A.h   (contents, 
props changed)
  vendor/clang/dist/test/Modules/Inputs/DebugInfoNamespace/B.h   (contents, 
props changed)
  vendor/clang/dist/test/Modules/Inputs/DebugInfoNamespace/module.modulemap
  vendor/clang/dist/test/Modules/Inputs/MainA.framework/
  vendor/clang/dist/test/Modules/Inputs/MainA.framework/Frameworks/
  
vendor/clang/dist/test/Modules/Inputs/MainA.framework/Frameworks/Sub.framework/
  
vendor/clang/dist/test/Modules/Inputs/MainA.framework/Frameworks/Sub.framework/Headers/
  
vendor/clang/dist/test/Modules/Inputs/MainA.framework/Frameworks/Sub.framework/Headers/B.h
   (contents, props changed)
  
vendor/clang/dist/test/Modules/Inputs/MainA.framework/Frameworks/Sub.framework/Headers/Sub.h
   (contents, props changed)
  
vendor/clang/dist/test/Modules/Inputs/MainA.framework/Frameworks/Sub.framework/PrivateHeaders/
  
vendor/clang/dist/test/Modules/Inputs/MainA.framework/Frameworks/Sub.framework/PrivateHeaders/BPriv.h
   (contents, props changed)
  
vendor/clang/dist/test/Modules/Inputs/MainA.framework/Frameworks/Sub.framework/PrivateHeaders/SubPriv.h
   (contents, props changed)
  vendor/clang/dist/test/Modules/Inputs/MainA.framework/Headers/
  vendor/clang/dist/test/Modules/Inputs/MainA.framework/Headers/A.h   
(contents, props changed)
  vendor/clang/dist/test/Modules/Inputs/MainA.framework/Headers/Main.h   
(contents, props changed)
  vendor/clang/dist/test/Modules/Inputs/MainA.framework/Modules/
  vendor/clang/dist/test/Modules/Inputs/MainA.framework/Modules/module.modulemap
  
vendor/clang/dist/test/Modules/Inputs/MainA.framework/Modules/module.private.modulemap
  vendor/clang/dist/test/Modules/Inputs/MainA.framework/PrivateHeaders/
  vendor/clang/dist/test/Modules/Inputs/MainA.framework/PrivateHeaders/APriv.h  
 (contents, props changed)
  
vendor/clang/dist/test/Modules/Inputs/MainA.framework/PrivateHeaders/MainPriv.h 
  (contents, props changed)
  vendor/clang/dist/test/Modules/Inputs/SameHeader/
  vendor/clang/dist/test/Modules/Inputs/SameHeader/A.h   (contents, props 
changed)
  vendor/clang/dist/test/Modules/Inputs/SameHeader/B.h   (contents, props 
changed)
  vendor/clang/dist/test/Modules/Inputs/SameHeader/C.h   (contents, props 
changed)
  vendor/clang/dist/test/Modules/Inputs/SameHeader/module.modulemap
  vendor/clang/dist/test/Modules/redefinition-same-header.m
  vendor/clang/dist/test/OpenMP/report_default_DSA.cpp   (contents, props 
changed)
  vendor/clang/dist/test/Sema/redefinition-same-header.c   (contents, props 
changed)
  vendor/clang/dist/test/Sema/vector-gcc-compat.c   (contents, props changed)
  vendor/clang/dist/test/Sema/vector-gcc-compat.cpp   (contents, props changed)
  vendor/clang/dist/test/SemaObjCXX/interface-return-type.mm
  vendor/clang/dist/test/SemaObjCXX/is-base-of.mm
  vendor/clang/dist/test/SemaOpenCL/array-init.cl
  vendor/clang/dist/test/SemaTemplate/typo-template-name.cpp   (contents, props 
changed)
Modified:
  vendor/clang/dist/CMakeLists.txt
  vendor/clang/dist/cmake/caches/Apple-stage2.cmake
  vendor/clang/dist/cmake/caches/DistributionExample.cmake
  vendor/clang/dist/docs/CMakeLists.txt
  vendor/clang/dist/docs/ClangFormatStyleOptions.rst
  vendor/clang/dist/docs/ThreadSafetyAnalysis.rst
  vendor/clang/dist/include/clang-c/Index.h
  vendor/clang/dist/i

svn commit: r318368 - in vendor/llvm/dist: . cmake cmake/modules docs include/llvm include/llvm/ADT include/llvm/Analysis include/llvm/Bitcode include/llvm/CodeGen include/llvm/CodeGen/GlobalISel i...

2017-05-16 Thread Dimitry Andric
Author: dim
Date: Tue May 16 19:46:52 2017
New Revision: 318368
URL: https://svnweb.freebsd.org/changeset/base/318368

Log:
  Vendor import of llvm trunk r303197:
  https://llvm.org/svn/llvm-project/llvm/trunk@303197

Added:
  vendor/llvm/dist/include/llvm/CodeGen/ExpandReductions.h   (contents, props 
changed)
  vendor/llvm/dist/include/llvm/DebugInfo/CodeView/RandomAccessTypeVisitor.h   
(contents, props changed)
  vendor/llvm/dist/include/llvm/Support/Parallel.h   (contents, props changed)
  vendor/llvm/dist/include/llvm/ToolDrivers/
  vendor/llvm/dist/include/llvm/ToolDrivers/llvm-lib/
  vendor/llvm/dist/include/llvm/ToolDrivers/llvm-lib/LibDriver.h   (contents, 
props changed)
  vendor/llvm/dist/lib/CodeGen/ExpandReductions.cpp   (contents, props changed)
  vendor/llvm/dist/lib/CodeGen/LiveRangeShrink.cpp   (contents, props changed)
  vendor/llvm/dist/lib/CodeGen/ScalarizeMaskedMemIntrin.cpp   (contents, props 
changed)
  vendor/llvm/dist/lib/DebugInfo/CodeView/RandomAccessTypeVisitor.cpp   
(contents, props changed)
  vendor/llvm/dist/lib/Fuzzer/test/OverwriteInputTest.cpp   (contents, props 
changed)
  vendor/llvm/dist/lib/Fuzzer/test/afl-driver.test
  vendor/llvm/dist/lib/Fuzzer/test/overwrite-input.test
  vendor/llvm/dist/lib/Support/Parallel.cpp   (contents, props changed)
  vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUMachineCFGStructurizer.cpp   
(contents, props changed)
  vendor/llvm/dist/lib/ToolDrivers/
  vendor/llvm/dist/lib/ToolDrivers/CMakeLists.txt   (contents, props changed)
  vendor/llvm/dist/lib/ToolDrivers/LLVMBuild.txt   (contents, props changed)
  vendor/llvm/dist/lib/ToolDrivers/llvm-lib/
  vendor/llvm/dist/lib/ToolDrivers/llvm-lib/CMakeLists.txt   (contents, props 
changed)
  vendor/llvm/dist/lib/ToolDrivers/llvm-lib/LLVMBuild.txt   (contents, props 
changed)
  vendor/llvm/dist/lib/ToolDrivers/llvm-lib/LibDriver.cpp   (contents, props 
changed)
  vendor/llvm/dist/lib/ToolDrivers/llvm-lib/Options.td
  vendor/llvm/dist/test/Analysis/BasicAA/cs-cs-arm.ll
  vendor/llvm/dist/test/Analysis/BasicAA/intrinsics-arm.ll
  vendor/llvm/dist/test/Analysis/CostModel/AArch64/free-widening-casts.ll
  vendor/llvm/dist/test/Analysis/CostModel/AMDGPU/shufflevector.ll
  vendor/llvm/dist/test/Analysis/ScalarEvolution/different-loops-recs.ll
  vendor/llvm/dist/test/Assembler/globalvariable-attributes.ll
  vendor/llvm/dist/test/Bitcode/globalvariable-attributes.ll
  
vendor/llvm/dist/test/Bitcode/thinlto-function-summary-callgraph-sample-profile-summary.ll
  vendor/llvm/dist/test/CodeGen/AArch64/macho-global-symbols.ll
  vendor/llvm/dist/test/CodeGen/AMDGPU/GlobalISel/legalize-constant.mir
  vendor/llvm/dist/test/CodeGen/AMDGPU/GlobalISel/lit.local.cfg
  vendor/llvm/dist/test/CodeGen/AVR/select-mbb-placement-bug.ll
  vendor/llvm/dist/test/CodeGen/Generic/expand-experimental-reductions.ll
  vendor/llvm/dist/test/CodeGen/Lanai/masking_setccs.ll
  vendor/llvm/dist/test/CodeGen/MIR/ARM/PR32721_ifcvt_triangle_unanalyzable.mir
  vendor/llvm/dist/test/CodeGen/MIR/ARM/ifcvt_canFallThroughTo.mir
  vendor/llvm/dist/test/CodeGen/MSP430/hwmult16.ll
  vendor/llvm/dist/test/CodeGen/MSP430/hwmult32.ll
  vendor/llvm/dist/test/CodeGen/MSP430/hwmultf5.ll
  vendor/llvm/dist/test/CodeGen/MSP430/libcalls.ll
  vendor/llvm/dist/test/CodeGen/MSP430/promote-i8-mul.ll
  vendor/llvm/dist/test/CodeGen/PowerPC/mtvsrdd.ll
  vendor/llvm/dist/test/CodeGen/PowerPC/testComparesieqsc.ll
  vendor/llvm/dist/test/CodeGen/PowerPC/testComparesieqsi.ll
  vendor/llvm/dist/test/CodeGen/PowerPC/testComparesieqss.ll
  vendor/llvm/dist/test/CodeGen/PowerPC/testComparesiequc.ll
  vendor/llvm/dist/test/CodeGen/PowerPC/testComparesiequi.ll
  vendor/llvm/dist/test/CodeGen/PowerPC/testComparesiequs.ll
  vendor/llvm/dist/test/CodeGen/PowerPC/testCompareslleqsc.ll
  vendor/llvm/dist/test/CodeGen/PowerPC/testCompareslleqsi.ll
  vendor/llvm/dist/test/CodeGen/PowerPC/testCompareslleqss.ll
  vendor/llvm/dist/test/CodeGen/PowerPC/testComparesllequc.ll
  vendor/llvm/dist/test/CodeGen/PowerPC/testComparesllequi.ll
  vendor/llvm/dist/test/CodeGen/PowerPC/testComparesllequs.ll
  vendor/llvm/dist/test/CodeGen/SPARC/inlineasm-v9.ll
  vendor/llvm/dist/test/CodeGen/SystemZ/list-ilp-crash.ll
  vendor/llvm/dist/test/CodeGen/SystemZ/lower-copy-undef-src.mir
  vendor/llvm/dist/test/CodeGen/X86/GlobalISel/add-scalar.ll
  vendor/llvm/dist/test/CodeGen/X86/GlobalISel/br.ll
  vendor/llvm/dist/test/CodeGen/X86/GlobalISel/cmp.ll
  vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-cmp.mir
  vendor/llvm/dist/test/CodeGen/X86/GlobalISel/memop-scalar-x32.ll
  vendor/llvm/dist/test/CodeGen/X86/GlobalISel/memop-scalar.ll
  vendor/llvm/dist/test/CodeGen/X86/GlobalISel/memop-vec.ll
  vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-br.mir
  vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-cmp.mir
  vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-memop-scalar-x32.mir
  vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-memop-scalar.mir
  vendor/llvm/dist/test/CodeGen/X86/Glo

svn commit: r318369 - vendor/llvm/llvm-trunk-r303197

2017-05-16 Thread Dimitry Andric
Author: dim
Date: Tue May 16 19:47:00 2017
New Revision: 318369
URL: https://svnweb.freebsd.org/changeset/base/318369

Log:
  Tag llvm trunk r303197.

Added:
  vendor/llvm/llvm-trunk-r303197/
 - copied from r318368, 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: r318367 - stable/11/sys/kern

2017-05-16 Thread Mateusz Guzik
Author: mjg
Date: Tue May 16 19:35:25 2017
New Revision: 318367
URL: https://svnweb.freebsd.org/changeset/base/318367

Log:
  MFC r317784:
  
  cache: stop holding the ncneg_hot lock across purging
  
  Only non-hot entries are purged so the lock is not needed in the first place.
  This saves one lock/unlock pair.

Modified:
  stable/11/sys/kern/vfs_cache.c

Modified: stable/11/sys/kern/vfs_cache.c
==
--- stable/11/sys/kern/vfs_cache.c  Tue May 16 19:03:26 2017
(r318366)
+++ stable/11/sys/kern/vfs_cache.c  Tue May 16 19:35:25 2017
(r318367)
@@ -735,13 +735,12 @@ cache_negative_remove(struct namecache *
list_locked = true;
mtx_lock(&neglist->nl_lock);
}
-   } else {
-   mtx_assert(&neglist->nl_lock, MA_OWNED);
-   mtx_assert(&ncneg_hot.nl_lock, MA_OWNED);
}
if (ncp->nc_flag & NCF_HOTNEGATIVE) {
+   mtx_assert(&ncneg_hot.nl_lock, MA_OWNED);
TAILQ_REMOVE(&ncneg_hot.nl_list, ncp, nc_dst);
} else {
+   mtx_assert(&neglist->nl_lock, MA_OWNED);
TAILQ_REMOVE(&neglist->nl_list, ncp, nc_dst);
}
if (list_locked)
@@ -816,7 +815,6 @@ cache_negative_zap_one(void)
mtx_unlock(&ncneg_hot.nl_lock);
mtx_lock(dvlp);
rw_wlock(blp);
-   mtx_lock(&ncneg_hot.nl_lock);
mtx_lock(&neglist->nl_lock);
ncp2 = TAILQ_FIRST(&neglist->nl_list);
if (ncp != ncp2 || dvlp != VP2VNODELOCK(ncp2->nc_dvp) ||
@@ -830,7 +828,6 @@ cache_negative_zap_one(void)
cache_zap_locked(ncp, true);
 out_unlock_all:
mtx_unlock(&neglist->nl_lock);
-   mtx_unlock(&ncneg_hot.nl_lock);
rw_wunlock(blp);
mtx_unlock(dvlp);
 out:
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r318366 - head/sbin/newfs_msdos

2017-05-16 Thread Ed Maste
Author: emaste
Date: Tue May 16 19:03:26 2017
New Revision: 318366
URL: https://svnweb.freebsd.org/changeset/base/318366

Log:
  newfs_msdos: clarify description of -T (timestamp) option
  
  Submitted by: Siva Mahadevan 
  Reported by:  Daniel Shahaf 
  Reviewed by:  emaste
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sbin/newfs_msdos/newfs_msdos.8

Modified: head/sbin/newfs_msdos/newfs_msdos.8
==
--- head/sbin/newfs_msdos/newfs_msdos.8 Tue May 16 18:54:25 2017
(r318365)
+++ head/sbin/newfs_msdos/newfs_msdos.8 Tue May 16 19:03:26 2017
(r318366)
@@ -38,10 +38,11 @@
 .Op Fl B Ar boot
 .Op Fl C Ar create-size
 .Op Fl F Ar FAT-type
-.Op Fl I Ar VolumeId
+.Op Fl I Ar VolumeID
 .Op Fl L Ar label
 .Op Fl O Ar OEM
 .Op Fl S Ar sector-size
+.Op Fl T Ar timestamp
 .Op Fl a Ar FAT-size
 .Op Fl b Ar block-size
 .Op Fl c Ar cluster-size
@@ -55,7 +56,6 @@
 .Op Fl o Ar hidden
 .Op Fl r Ar reserved
 .Op Fl s Ar total
-.Op Fl T Ar timestamp
 .Op Fl u Ar track-size
 .Ar special
 .Op Ar disktype
@@ -118,6 +118,14 @@ The default is
 Number of bytes per sector.
 Acceptable values are powers of 2
 in the range 512 through 32768, inclusive.
+.It Fl T Ar timestamp
+Create the filesystem as though the current time is
+.Ar timestamp .
+The default filesystem volume ID is derived from the time.
+.Ar timestamp
+can be a pathname (where the timestamp is derived from
+that file) or an integer value interpreted
+as the number of seconds since the Epoch.
 .It Fl a Ar FAT-size
 Number of sectors per FAT.
 .It Fl b Ar block-size
@@ -160,17 +168,11 @@ Number of hidden sectors.
 Number of reserved sectors.
 .It Fl s Ar total
 File system size.
-.It Fl T Ar timestamp
-Specify a timestamp to be used for filesystem creation so that
-it can be consistent for reproducible builds.
-The timestamp can be a pathname (where the timestamps are derived from
-that file) or an integer value interpreted
-as the number of seconds since the Epoch.
 .It Fl u Ar track-size
 Number of sectors per track.
 .El
 .Sh NOTES
-If some parameters (e.g. size, number of sectors, etc.) are not specified
+If some parameters (e.g., size, number of sectors, etc.) are not specified
 through options or disktype, the program tries to generate them automatically.
 In particular, the size is determined as the device or file size minus the
 offset specified with the
___
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: r318365 - in stable: 10/lib/msun/src 11/lib/msun/src

2017-05-16 Thread Dimitry Andric
Author: dim
Date: Tue May 16 18:54:25 2017
New Revision: 318365
URL: https://svnweb.freebsd.org/changeset/base/318365

Log:
  MFC r318259:
  
  Silence a -Wunused warning about the junk variable being used to raise
  an inexact floating point exception.  The variable cannot be eliminated,
  unfortunately, otherwise the desired addition triggering the exception
  will be emitted neither by clang, nor by gcc.
  
  Reviewed by:  Steve Kargl, bde

Modified:
  stable/10/lib/msun/src/catrig.c
  stable/10/lib/msun/src/catrigf.c
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/lib/msun/src/catrig.c
  stable/11/lib/msun/src/catrigf.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/10/lib/msun/src/catrig.c
==
--- stable/10/lib/msun/src/catrig.c Tue May 16 18:46:56 2017
(r318364)
+++ stable/10/lib/msun/src/catrig.c Tue May 16 18:54:25 2017
(r318365)
@@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$");
 #define isinf(x)   (fabs(x) == INFINITY)
 #undef isnan
 #define isnan(x)   ((x) != (x))
-#defineraise_inexact() do { volatile float junk = 1 + tiny; } while(0)
+#defineraise_inexact() do { volatile float junk __unused = 1 + tiny; } 
while(0)
 #undef signbit
 #define signbit(x) (__builtin_signbit(x))
 

Modified: stable/10/lib/msun/src/catrigf.c
==
--- stable/10/lib/msun/src/catrigf.cTue May 16 18:46:56 2017
(r318364)
+++ stable/10/lib/msun/src/catrigf.cTue May 16 18:54:25 2017
(r318365)
@@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$");
 #define isinf(x)   (fabsf(x) == INFINITY)
 #undef isnan
 #define isnan(x)   ((x) != (x))
-#defineraise_inexact() do { volatile float junk = 1 + tiny; } while(0)
+#defineraise_inexact() do { volatile float junk __unused = 1 + tiny; } 
while(0)
 #undef signbit
 #define signbit(x) (__builtin_signbitf(x))
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r318365 - in stable: 10/lib/msun/src 11/lib/msun/src

2017-05-16 Thread Dimitry Andric
Author: dim
Date: Tue May 16 18:54:25 2017
New Revision: 318365
URL: https://svnweb.freebsd.org/changeset/base/318365

Log:
  MFC r318259:
  
  Silence a -Wunused warning about the junk variable being used to raise
  an inexact floating point exception.  The variable cannot be eliminated,
  unfortunately, otherwise the desired addition triggering the exception
  will be emitted neither by clang, nor by gcc.
  
  Reviewed by:  Steve Kargl, bde

Modified:
  stable/11/lib/msun/src/catrig.c
  stable/11/lib/msun/src/catrigf.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/lib/msun/src/catrig.c
  stable/10/lib/msun/src/catrigf.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/11/lib/msun/src/catrig.c
==
--- stable/11/lib/msun/src/catrig.c Tue May 16 18:46:56 2017
(r318364)
+++ stable/11/lib/msun/src/catrig.c Tue May 16 18:54:25 2017
(r318365)
@@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$");
 #define isinf(x)   (fabs(x) == INFINITY)
 #undef isnan
 #define isnan(x)   ((x) != (x))
-#defineraise_inexact() do { volatile float junk = 1 + tiny; } while(0)
+#defineraise_inexact() do { volatile float junk __unused = 1 + tiny; } 
while(0)
 #undef signbit
 #define signbit(x) (__builtin_signbit(x))
 

Modified: stable/11/lib/msun/src/catrigf.c
==
--- stable/11/lib/msun/src/catrigf.cTue May 16 18:46:56 2017
(r318364)
+++ stable/11/lib/msun/src/catrigf.cTue May 16 18:54:25 2017
(r318365)
@@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$");
 #define isinf(x)   (fabsf(x) == INFINITY)
 #undef isnan
 #define isnan(x)   ((x) != (x))
-#defineraise_inexact() do { volatile float junk = 1 + tiny; } while(0)
+#defineraise_inexact() do { volatile float junk __unused = 1 + tiny; } 
while(0)
 #undef signbit
 #define signbit(x) (__builtin_signbitf(x))
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r318364 - in head: contrib/libxo contrib/libxo/doc contrib/libxo/libxo contrib/libxo/tests/core contrib/libxo/tests/core/saved contrib/libxo/tests/gettext/saved contrib/libxo/xo lib/lib...

2017-05-16 Thread Phil Shafer
Author: phil
Date: Tue May 16 18:46:56 2017
New Revision: 318364
URL: https://svnweb.freebsd.org/changeset/base/318364

Log:
  Import libxo-0.7.2; add xo_options.7.
  
  Submitted by: phil
  Reviewed by:  sjg
  Approved by:  sjg (mentor)

Added:
  head/contrib/libxo/libxo/xo_options.7
 - copied unchanged from r318362, 
vendor/Juniper/libxo/dist/libxo/xo_options.7
Modified:
  head/contrib/libxo/configure.ac
  head/contrib/libxo/doc/Makefile.am
  head/contrib/libxo/doc/libxo-manual.html
  head/contrib/libxo/doc/libxo.txt
  head/contrib/libxo/libxo/Makefile.am
  head/contrib/libxo/libxo/libxo.c
  head/contrib/libxo/libxo/xo.h
  head/contrib/libxo/libxo/xo_buf.h
  head/contrib/libxo/libxo/xo_encoder.c
  head/contrib/libxo/libxo/xo_format.5
  head/contrib/libxo/libxo/xo_syslog.c
  head/contrib/libxo/tests/core/saved/test_01.E.out
  head/contrib/libxo/tests/core/saved/test_01.J.out
  head/contrib/libxo/tests/core/saved/test_01.JP.out
  head/contrib/libxo/tests/core/saved/test_01.X.out
  head/contrib/libxo/tests/core/saved/test_01.XP.out
  head/contrib/libxo/tests/core/saved/test_10.X.out
  head/contrib/libxo/tests/core/saved/test_10.XP.out
  head/contrib/libxo/tests/core/saved/test_11.X.out
  head/contrib/libxo/tests/core/saved/test_11.XP.out
  head/contrib/libxo/tests/core/test_01.c
  head/contrib/libxo/tests/gettext/saved/gt_01.J.out
  head/contrib/libxo/tests/gettext/saved/gt_01.JP.out
  head/contrib/libxo/xo/xo.c
  head/lib/libxo/Makefile
  head/lib/libxo/add.man
  head/lib/libxo/xo_config.h
  head/usr.bin/xo/Makefile
Directory Properties:
  head/contrib/libxo/   (props changed)

Modified: head/contrib/libxo/configure.ac
==
--- head/contrib/libxo/configure.ac Tue May 16 18:42:44 2017
(r318363)
+++ head/contrib/libxo/configure.ac Tue May 16 18:46:56 2017
(r318364)
@@ -12,7 +12,7 @@
 #
 
 AC_PREREQ(2.2)
-AC_INIT([libxo], [0.6.3], [p...@juniper.net])
+AC_INIT([libxo], [0.7.2], [p...@juniper.net])
 AM_INIT_AUTOMAKE([-Wall -Werror foreign -Wno-portability])
 
 # Support silent build rules.  Requires at least automake-1.11.
@@ -20,7 +20,6 @@ AM_INIT_AUTOMAKE([-Wall -Werror foreign 
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
 AC_PROG_CC
-AM_PROG_AR
 AC_PROG_INSTALL
 AC_CONFIG_MACRO_DIR([m4])
 AC_PROG_LN_S
@@ -135,6 +134,21 @@ if test "$GETTEXT_ENABLE" != "no"; then
 
   AC_MSG_RESULT([$HAVE_GETTEXT])
   fi
+
+  if test "$HAVE_GETTEXT" != "yes"; then
+  GETTEXT_PREFIX=/usr/local
+  AC_MSG_CHECKING([gettext in ${GETTEXT_PREFIX}])
+
+  _save_cflags="$CFLAGS"
+  CFLAGS="$CFLAGS -I${GETTEXT_PREFIX}/include -L${GETTEXT_PREFIX}/lib 
-Werror -lintl"
+  AC_LINK_IFELSE([AC_LANG_SOURCE([[#include ]
+ [int main() {char *cp = dgettext(NULL, "xx"); return 0; }]])],
+ [HAVE_GETTEXT=yes],
+ [HAVE_GETTEXT=no])
+  CFLAGS="$_save_cflags"
+
+  AC_MSG_RESULT([$HAVE_GETTEXT])
+  fi
 fi
 
 if test "$HAVE_GETTEXT" = "yes"; then
@@ -278,6 +292,13 @@ AC_ARG_ENABLE([debug],
 AC_MSG_RESULT([$LIBXO_DEBUG])
 AM_CONDITIONAL([LIBXO_DEBUG], [test "$LIBXO_DEBUG" != "no"])
 
+AC_MSG_CHECKING([whether to use int return codes])
+AC_ARG_ENABLE([int-return-codes],
+[  --enable-int-return-codesUse int return codes (instead of ssize_t)],
+[USE_INT_RETURN_CODES=yes; AC_DEFINE([USE_INT_RETURN_CODES], [1], [Use int 
return codes])],
+[USE_INT_RETURN_CODES=no])
+AC_MSG_RESULT([$USE_INT_RETURN_CODES])
+
 AC_MSG_CHECKING([whether to build with text-only rendering])
 AC_ARG_ENABLE([text-only],
 [  --enable-text-onlyTurn on text-only rendering],

Modified: head/contrib/libxo/doc/Makefile.am
==
--- head/contrib/libxo/doc/Makefile.am  Tue May 16 18:42:44 2017
(r318363)
+++ head/contrib/libxo/doc/Makefile.am  Tue May 16 18:46:56 2017
(r318364)
@@ -61,9 +61,9 @@ xolint.txt: ${top_srcdir}/xolint/xolint.
 CLEANFILES = \
 xolint.txt \
 ${INPUT}.xml \
-${INPUT}.txt \
 ${INPUT}.fxml \
-${INPUT}.html
+${OUTPUT}.txt \
+${OUTPUT}.html
 else
 doc docs:
@${ECHO} "The 'oxtradoc' tool is not installed; see libslax.org"

Modified: head/contrib/libxo/doc/libxo-manual.html
==
--- head/contrib/libxo/doc/libxo-manual.htmlTue May 16 18:42:44 2017
(r318363)
+++ head/contrib/libxo/doc/libxo-manual.htmlTue May 16 18:46:56 2017
(r318364)
@@ -515,7 +515,7 @@ li.indline1 {
  
   } 
   @top-right {
-   content: "May 2016";
+   content: "May 2017";
  
   } 
   @top-center {
@@ -22009,7 +22009,7 @@ jQuery(function ($) {
 
 
 
-May 28, 2016
+May 15, 2017
 
 
 libxo: The Easy Way to Generate text, XML, JSON, 
and HTML outputlibxo-manual
@@ -22271,36 +22271,40 @@ jQuery(function ($) {
 
 
 3.1.4���
-xo_set_style
+xo_set_style
+
+
+3.1.5���
+xo_get_style
 
-3.1.4.1���
+3.1.5.

svn commit: r318363 - in head/contrib: atf/atf-c/detail netbsd-tests/lib/libc/sys

2017-05-16 Thread John Baldwin
Author: jhb
Date: Tue May 16 18:42:44 2017
New Revision: 318363
URL: https://svnweb.freebsd.org/changeset/base/318363

Log:
  Skip tests depending on coredumps if coredumps are disabled via kern.coredump.
  
  The kern.coredump sysctl can be set to 0 to disable coredumps.  Skip the
  'status_coredump' and 'wait6_coredumped' tests if this sysctl is set to 0
  rather than reporting a failure.
  
  Submitted by: brooks
  Reviewed by:  ngie
  Obtained from:CheriBSD
  Sponsored by: DARPA / AFRL
  Differential Revision:https://reviews.freebsd.org/D10665

Modified:
  head/contrib/atf/atf-c/detail/process_test.c
  head/contrib/netbsd-tests/lib/libc/sys/t_wait.c

Modified: head/contrib/atf/atf-c/detail/process_test.c
==
--- head/contrib/atf/atf-c/detail/process_test.cTue May 16 18:42:07 
2017(r318362)
+++ head/contrib/atf/atf-c/detail/process_test.cTue May 16 18:42:44 
2017(r318363)
@@ -26,6 +26,9 @@
 #include "atf-c/detail/process.h"
 
 #include 
+#ifdef __FreeBSD__
+#include 
+#endif
 #include 
 #include 
 #include 
@@ -667,6 +670,14 @@ ATF_TC_BODY(status_coredump, tc)
 atf_tc_skip("Cannot unlimit the core file size; check limits "
 "manually");
 
+#ifdef __FreeBSD__
+   int coredump_enabled;
+   size_t ce_len = sizeof(coredump_enabled);
+   if (sysctlbyname("kern.coredump", &coredump_enabled, &ce_len, NULL,
+   0) == 0 && !coredump_enabled)
+   atf_tc_skip("Coredumps disabled");
+#endif
+
 const int rawstatus = fork_and_wait_child(child_sigquit);
 atf_process_status_t s;
 RE(atf_process_status_init(&s, rawstatus));

Modified: head/contrib/netbsd-tests/lib/libc/sys/t_wait.c
==
--- head/contrib/netbsd-tests/lib/libc/sys/t_wait.c Tue May 16 18:42:07 
2017(r318362)
+++ head/contrib/netbsd-tests/lib/libc/sys/t_wait.c Tue May 16 18:42:44 
2017(r318363)
@@ -31,6 +31,10 @@
 #include 
 __RCSID("$NetBSD: t_wait.c,v 1.8 2017/01/13 19:28:55 christos Exp $");
 
+#ifdef __FreeBSD__
+#include 
+#include 
+#endif
 #include 
 #include 
 
@@ -147,6 +151,14 @@ ATF_TC_BODY(wait6_coredumped, tc)
pid_t pid;
static const struct rlimit rl = { RLIM_INFINITY, RLIM_INFINITY };
 
+#ifdef __FreeBSD__
+   int coredump_enabled;
+   size_t ce_len = sizeof(coredump_enabled);
+   if (sysctlbyname("kern.coredump", &coredump_enabled, &ce_len, NULL,
+   0) == 0 && !coredump_enabled)
+   atf_tc_skip("Coredumps disabled");
+#endif
+
switch (pid = fork()) {
case 0:
ATF_REQUIRE(setrlimit(RLIMIT_CORE, &rl) == 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: r318362 - vendor/Juniper/libxo/0.7.2

2017-05-16 Thread Phil Shafer
Author: phil
Date: Tue May 16 18:42:07 2017
New Revision: 318362
URL: https://svnweb.freebsd.org/changeset/base/318362

Log:
  Tag libxo 0.7.2

Added:
 - copied from r318361, vendor/Juniper/libxo/dist/
Directory Properties:
  vendor/Juniper/libxo/0.7.2/   (props changed)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r318361 - in vendor/Juniper/libxo/dist: . doc libxo tests/core tests/core/saved tests/gettext tests/gettext/po/pig_latin tests/gettext/saved xo

2017-05-16 Thread Phil Shafer
Author: phil
Date: Tue May 16 18:41:36 2017
New Revision: 318361
URL: https://svnweb.freebsd.org/changeset/base/318361

Log:
  Import libxo 0.7.2

Added:
  vendor/Juniper/libxo/dist/libxo/xo_options.7   (contents, props changed)
Modified:
  vendor/Juniper/libxo/dist/configure.ac
  vendor/Juniper/libxo/dist/doc/Makefile.am
  vendor/Juniper/libxo/dist/doc/libxo-manual.html
  vendor/Juniper/libxo/dist/doc/libxo.txt
  vendor/Juniper/libxo/dist/libxo/Makefile.am
  vendor/Juniper/libxo/dist/libxo/libxo.c
  vendor/Juniper/libxo/dist/libxo/xo.h
  vendor/Juniper/libxo/dist/libxo/xo_buf.h
  vendor/Juniper/libxo/dist/libxo/xo_encoder.c
  vendor/Juniper/libxo/dist/libxo/xo_format.5
  vendor/Juniper/libxo/dist/libxo/xo_syslog.c
  vendor/Juniper/libxo/dist/tests/core/saved/test_01.E.out
  vendor/Juniper/libxo/dist/tests/core/saved/test_01.J.out
  vendor/Juniper/libxo/dist/tests/core/saved/test_01.JP.out
  vendor/Juniper/libxo/dist/tests/core/saved/test_01.X.out
  vendor/Juniper/libxo/dist/tests/core/saved/test_01.XP.out
  vendor/Juniper/libxo/dist/tests/core/saved/test_10.X.out
  vendor/Juniper/libxo/dist/tests/core/saved/test_10.XP.out
  vendor/Juniper/libxo/dist/tests/core/saved/test_11.X.out
  vendor/Juniper/libxo/dist/tests/core/saved/test_11.XP.out
  vendor/Juniper/libxo/dist/tests/core/test_01.c
  vendor/Juniper/libxo/dist/tests/gettext/po/pig_latin/strerror.po
  vendor/Juniper/libxo/dist/tests/gettext/saved/gt_01.J.out
  vendor/Juniper/libxo/dist/tests/gettext/saved/gt_01.JP.out
  vendor/Juniper/libxo/dist/tests/gettext/strerror.pot
  vendor/Juniper/libxo/dist/xo/xo.c

Modified: vendor/Juniper/libxo/dist/configure.ac
==
--- vendor/Juniper/libxo/dist/configure.ac  Tue May 16 18:39:23 2017
(r318360)
+++ vendor/Juniper/libxo/dist/configure.ac  Tue May 16 18:41:36 2017
(r318361)
@@ -12,7 +12,7 @@
 #
 
 AC_PREREQ(2.2)
-AC_INIT([libxo], [0.6.3], [p...@juniper.net])
+AC_INIT([libxo], [0.7.2], [p...@juniper.net])
 AM_INIT_AUTOMAKE([-Wall -Werror foreign -Wno-portability])
 
 # Support silent build rules.  Requires at least automake-1.11.
@@ -20,7 +20,6 @@ AM_INIT_AUTOMAKE([-Wall -Werror foreign 
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
 AC_PROG_CC
-AM_PROG_AR
 AC_PROG_INSTALL
 AC_CONFIG_MACRO_DIR([m4])
 AC_PROG_LN_S
@@ -135,6 +134,21 @@ if test "$GETTEXT_ENABLE" != "no"; then
 
   AC_MSG_RESULT([$HAVE_GETTEXT])
   fi
+
+  if test "$HAVE_GETTEXT" != "yes"; then
+  GETTEXT_PREFIX=/usr/local
+  AC_MSG_CHECKING([gettext in ${GETTEXT_PREFIX}])
+
+  _save_cflags="$CFLAGS"
+  CFLAGS="$CFLAGS -I${GETTEXT_PREFIX}/include -L${GETTEXT_PREFIX}/lib 
-Werror -lintl"
+  AC_LINK_IFELSE([AC_LANG_SOURCE([[#include ]
+ [int main() {char *cp = dgettext(NULL, "xx"); return 0; }]])],
+ [HAVE_GETTEXT=yes],
+ [HAVE_GETTEXT=no])
+  CFLAGS="$_save_cflags"
+
+  AC_MSG_RESULT([$HAVE_GETTEXT])
+  fi
 fi
 
 if test "$HAVE_GETTEXT" = "yes"; then
@@ -278,6 +292,13 @@ AC_ARG_ENABLE([debug],
 AC_MSG_RESULT([$LIBXO_DEBUG])
 AM_CONDITIONAL([LIBXO_DEBUG], [test "$LIBXO_DEBUG" != "no"])
 
+AC_MSG_CHECKING([whether to use int return codes])
+AC_ARG_ENABLE([int-return-codes],
+[  --enable-int-return-codesUse int return codes (instead of ssize_t)],
+[USE_INT_RETURN_CODES=yes; AC_DEFINE([USE_INT_RETURN_CODES], [1], [Use int 
return codes])],
+[USE_INT_RETURN_CODES=no])
+AC_MSG_RESULT([$USE_INT_RETURN_CODES])
+
 AC_MSG_CHECKING([whether to build with text-only rendering])
 AC_ARG_ENABLE([text-only],
 [  --enable-text-onlyTurn on text-only rendering],

Modified: vendor/Juniper/libxo/dist/doc/Makefile.am
==
--- vendor/Juniper/libxo/dist/doc/Makefile.am   Tue May 16 18:39:23 2017
(r318360)
+++ vendor/Juniper/libxo/dist/doc/Makefile.am   Tue May 16 18:41:36 2017
(r318361)
@@ -61,9 +61,9 @@ xolint.txt: ${top_srcdir}/xolint/xolint.
 CLEANFILES = \
 xolint.txt \
 ${INPUT}.xml \
-${INPUT}.txt \
 ${INPUT}.fxml \
-${INPUT}.html
+${OUTPUT}.txt \
+${OUTPUT}.html
 else
 doc docs:
@${ECHO} "The 'oxtradoc' tool is not installed; see libslax.org"

Modified: vendor/Juniper/libxo/dist/doc/libxo-manual.html
==
--- vendor/Juniper/libxo/dist/doc/libxo-manual.html Tue May 16 18:39:23 
2017(r318360)
+++ vendor/Juniper/libxo/dist/doc/libxo-manual.html Tue May 16 18:41:36 
2017(r318361)
@@ -515,7 +515,7 @@ li.indline1 {
  
   } 
   @top-right {
-   content: "May 2016";
+   content: "May 2017";
  
   } 
   @top-center {
@@ -22009,7 +22009,7 @@ jQuery(function ($) {
 
 
 
-May 28, 2016
+May 15, 2017
 
 
 libxo: The Easy Way to Generate text, XML, JSON, 
and HTML outputlibxo-manual
@@ -22271,36 +22271,40 @@ jQuery(function ($) {
 
 
 3.1.4���
-xo_set_style
+xo_set_style

svn commit: r318360 - head/sys/sys

2017-05-16 Thread John Baldwin
Author: jhb
Date: Tue May 16 18:39:23 2017
New Revision: 318360
URL: https://svnweb.freebsd.org/changeset/base/318360

Log:
  Fix p_endcopy.
  
  For p_endcopy to work correctly, it must be the name of the next element
  in struct proc after the end of the copy region, not the name of the
  last element in the copy region.  Currently, the last element
  (p_elf_flags) is not being copied.  In addition, the p_xexit and
  p_xsig fields should not be copied on fork, so move them out of the
  copy region.
  
  Reviewed by:  kib
  MFC after:3 days
  Differential Revision:https://reviews.freebsd.org/D10677

Modified:
  head/sys/sys/proc.h

Modified: head/sys/sys/proc.h
==
--- head/sys/sys/proc.h Tue May 16 18:05:34 2017(r318359)
+++ head/sys/sys/proc.h Tue May 16 18:39:23 2017(r318360)
@@ -624,13 +624,13 @@ struct proc {
pid_t   p_reapsubtree;  /* (e) Pid of the direct child of the
   reaper which spawned
   our subtree. */
-   u_int   p_xexit;/* (c) Exit code. */
-   u_int   p_xsig; /* (c) Stop/kill sig. */
uint16_tp_elf_machine;  /* (x) ELF machine type */
uint64_tp_elf_flags;/* (x) ELF flags */
-
 /* End area that is copied on creation. */
-#definep_endcopy   p_elf_flags
+#definep_endcopy   p_xexit
+
+   u_int   p_xexit;/* (c) Exit code. */
+   u_int   p_xsig; /* (c) Stop/kill sig. */
struct pgrp *p_pgrp;/* (c + e) Pointer to process group. */
struct knlist   *p_klist;   /* (c) Knotes attached to this proc. */
int p_numthreads;   /* (c) Number of threads. */
___
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: r317732 - head/usr.bin/truss

2017-05-16 Thread John Baldwin
On Wednesday, May 03, 2017 09:23:14 AM Michael Tuexen wrote:
> Author: tuexen
> Date: Wed May  3 09:23:13 2017
> New Revision: 317732
> URL: https://svnweb.freebsd.org/changeset/base/317732
> 
> Log:
>   Decode the third argument of socket().

This is not quite right for sockets that aren't PF_INET.  Probably this
warrants a const char *sysdecode_socket_protocol(int domain, int protocol)
that honors the domain in deciding what protocol value to output.  For now
this could just handle PF_INET:

const char *
sysdecode_socket_protocol(int domain, int protocol)
{

switch (domain) {
case PF_INET:
return (lookup_value(sockipproto, protocol));
default:
return (NULL));
}

Then use this in truss.

The socket option stuff currently hardcodes IP protocols and levels only
because we don't have a good way of obtaining the domain of an existing
socket in a target process.  For socket()'s protocol argument though we
readily have the domain available.

At some point in the future we might address the socket option issue by
caching the domain argument when sockets are created in a table, and for
truss when attaching to an existing process using the kinfo_file interface to
learn about existing sockets, but that's not entirely trivial.

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


svn commit: r318359 - head/sys/dev/bnxt

2017-05-16 Thread Sean Bruno
Author: sbruno
Date: Tue May 16 18:05:34 2017
New Revision: 318359
URL: https://svnweb.freebsd.org/changeset/base/318359

Log:
  Add version tag to the driver.
  
  Start at version 1.0.0.0
  
  Submitted by: bhargava.marre...@broadcom.com
  Reviewed by:  venkatkumar.duvv...@broadcom.com
  Differential Revision:https://reviews.freebsd.org/D10616

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

Modified: head/sys/dev/bnxt/if_bnxt.c
==
--- head/sys/dev/bnxt/if_bnxt.c Tue May 16 17:51:30 2017(r318358)
+++ head/sys/dev/bnxt/if_bnxt.c Tue May 16 18:05:34 2017(r318359)
@@ -287,7 +287,8 @@ static driver_t bnxt_iflib_driver = {
  * iflib shared context
  */
 
-char bnxt_driver_version[] = "FreeBSD base";
+#define BNXT_DRIVER_VERSION"1.0.0.0"
+char bnxt_driver_version[] = BNXT_DRIVER_VERSION;
 extern struct if_txrx bnxt_txrx;
 static struct if_shared_ctx bnxt_sctx_init = {
.isc_magic = IFLIB_MAGIC,
___
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: r318358 - stable/11/sys/net

2017-05-16 Thread Eric Joyner
Author: erj
Date: Tue May 16 17:51:30 2017
New Revision: 318358
URL: https://svnweb.freebsd.org/changeset/base/318358

Log:
  MFC r318147: Add several new media types to if_media.h
  
  These include several 25G types (for active direct attach cables and LR 
modules),
  and a missing type for 10G active direct attach.
  
  Sponsored by: Intel Corporation

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

Modified: stable/11/sys/net/ieee8023ad_lacp.c
==
--- stable/11/sys/net/ieee8023ad_lacp.c Tue May 16 17:49:15 2017
(r318357)
+++ stable/11/sys/net/ieee8023ad_lacp.c Tue May 16 17:51:30 2017
(r318358)
@@ -1090,6 +1090,7 @@ lacp_compose_key(struct lacp_port *lp)
case IFM_10G_CR1:
case IFM_10G_ER:
case IFM_10G_SFI:
+   case IFM_10G_AOC:
key = IFM_10G_LR;
break;
case IFM_20G_KR2:
@@ -1114,6 +1115,9 @@ lacp_compose_key(struct lacp_port *lp)
case IFM_25G_CR:
case IFM_25G_KR:
case IFM_25G_SR:
+   case IFM_25G_LR:
+   case IFM_25G_ACC:
+   case IFM_25G_AOC:
key = IFM_25G_PCIE;
break;
case IFM_40G_CR4:

Modified: stable/11/sys/net/if_media.h
==
--- stable/11/sys/net/if_media.hTue May 16 17:49:15 2017
(r318357)
+++ stable/11/sys/net/if_media.hTue May 16 17:51:30 2017
(r318358)
@@ -196,6 +196,10 @@ uint64_t   ifmedia_baudrate(int);
 #defineIFM_25G_SR  IFM_X(55)   /* 25GBase-SR */
 #defineIFM_50G_CR2 IFM_X(56)   /* 50GBase-CR2 */
 #defineIFM_50G_KR2 IFM_X(57)   /* 50GBase-KR2 */
+#defineIFM_25G_LR  IFM_X(58)   /* 25GBase-LR */
+#defineIFM_10G_AOC IFM_X(59)   /* 10G active optical cable */
+#defineIFM_25G_ACC IFM_X(60)   /* 25G active copper cable */
+#defineIFM_25G_AOC IFM_X(61)   /* 25G active optical cable */
 
 /*
  * Please update ieee8023ad_lacp.c:lacp_compose_key()
@@ -447,6 +451,10 @@ struct ifmedia_description {
{ IFM_25G_SR,   "25GBase-SR" }, \
{ IFM_50G_CR2,  "50GBase-CR2" },\
{ IFM_50G_KR2,  "50GBase-KR2" },\
+   { IFM_25G_LR,   "25GBase-LR" }, \
+   { IFM_10G_AOC,  "10GBase-AOC" },\
+   { IFM_25G_ACC,  "25GBase-ACC" },\
+   { IFM_25G_AOC,  "25GBase-AOC" },\
{ 0, NULL },\
 }
 
@@ -775,6 +783,10 @@ struct ifmedia_baudrate {
{ IFM_ETHER | IFM_25G_SR,   IF_Gbps(25ULL) },   \
{ IFM_ETHER | IFM_50G_CR2,  IF_Gbps(50ULL) },   \
{ IFM_ETHER | IFM_50G_KR2,  IF_Gbps(50ULL) },   \
+   { IFM_ETHER | IFM_25G_LR,   IF_Gbps(25ULL) },   \
+   { IFM_ETHER | IFM_10G_AOC,  IF_Gbps(10ULL) },   \
+   { IFM_ETHER | IFM_25G_ACC,  IF_Gbps(25ULL) },   \
+   { IFM_ETHER | IFM_25G_AOC,  IF_Gbps(25ULL) },   \
\
{ IFM_TOKEN | IFM_TOK_STP4, IF_Mbps(4) },   \
{ IFM_TOKEN | IFM_TOK_STP16,IF_Mbps(16) },  \
___
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: r318357 - in stable/11/sys: amd64/conf conf dev/ixl modules/ixl modules/ixlv

2017-05-16 Thread Eric Joyner
Author: erj
Date: Tue May 16 17:49:15 2017
New Revision: 318357
URL: https://svnweb.freebsd.org/changeset/base/318357

Log:
  MFC r313497: ixl(4): Update to 1.7.12-k.
  
  Refresh upstream driver before impending conversion to iflib.
  
  Major new features:
  
  - Support for Fortville-based 25G adapters
  - Support for I2C reads/writes
  
  (To prevent getting or sending corrupt data, you should set
  dev.ixl.0.debug.disable_fw_link_management=1 when using I2C
  [this will disable link!], then set it to 0 when done. The driver implements
  the SIOCGI2C ioctl, so ifconfig -v works for reading I2C data,
  but there are read_i2c and write_i2c sysctls under the .debug sysctl tree
  [the latter being useful for upper page support in QSFP+]).
  
  - Addition of an iWARP client interface (so the future iWARP driver for
X722 devices can communicate with the base driver).
  - Add "options IXL_IW" to kernel config to enable this option.
  
  Sponsored by: Intel Corporation

Added:
  stable/11/sys/dev/ixl/ixl_iw.c
 - copied unchanged from r313497, head/sys/dev/ixl/ixl_iw.c
  stable/11/sys/dev/ixl/ixl_iw.h
 - copied unchanged from r313497, head/sys/dev/ixl/ixl_iw.h
  stable/11/sys/dev/ixl/ixl_iw_int.h
 - copied unchanged from r313497, head/sys/dev/ixl/ixl_iw_int.h
  stable/11/sys/dev/ixl/ixl_pf_i2c.c
 - copied unchanged from r313497, head/sys/dev/ixl/ixl_pf_i2c.c
Modified:
  stable/11/sys/amd64/conf/NOTES
  stable/11/sys/conf/files.amd64
  stable/11/sys/conf/options.amd64
  stable/11/sys/dev/ixl/i40e_adminq.c
  stable/11/sys/dev/ixl/i40e_adminq_cmd.h
  stable/11/sys/dev/ixl/i40e_common.c
  stable/11/sys/dev/ixl/i40e_devids.h
  stable/11/sys/dev/ixl/i40e_lan_hmc.c
  stable/11/sys/dev/ixl/i40e_nvm.c
  stable/11/sys/dev/ixl/i40e_osdep.c
  stable/11/sys/dev/ixl/i40e_osdep.h
  stable/11/sys/dev/ixl/i40e_prototype.h
  stable/11/sys/dev/ixl/i40e_type.h
  stable/11/sys/dev/ixl/i40e_virtchnl.h
  stable/11/sys/dev/ixl/if_ixl.c
  stable/11/sys/dev/ixl/if_ixlv.c
  stable/11/sys/dev/ixl/ixl.h
  stable/11/sys/dev/ixl/ixl_pf.h
  stable/11/sys/dev/ixl/ixl_pf_iov.c
  stable/11/sys/dev/ixl/ixl_pf_iov.h
  stable/11/sys/dev/ixl/ixl_pf_main.c
  stable/11/sys/dev/ixl/ixl_txrx.c
  stable/11/sys/dev/ixl/ixlv.h
  stable/11/sys/dev/ixl/ixlvc.c
  stable/11/sys/modules/ixl/Makefile
  stable/11/sys/modules/ixlv/Makefile
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/amd64/conf/NOTES
==
--- stable/11/sys/amd64/conf/NOTES  Tue May 16 17:35:05 2017
(r318356)
+++ stable/11/sys/amd64/conf/NOTES  Tue May 16 17:49:15 2017
(r318357)
@@ -341,6 +341,7 @@ device  ipw # Intel 2100 wireless 
NICs.
 device iwi # Intel 2200BG/2225BG/2915ABG wireless NICs.
 device iwn # Intel 4965/1000/5000/6000 wireless NICs.
 device ixl # Intel XL710 40Gbe PCIE Ethernet
+optionsIXL_IW  # Enable iWARP Client Interface in 
ixl(4)
 device ixlv# Intel XL710 40Gbe VF PCIE Ethernet
 device mlx4ib  # Mellanox ConnectX HCA InfiniBand
 device mlxen   # Mellanox ConnectX HCA Ethernet

Modified: stable/11/sys/conf/files.amd64
==
--- stable/11/sys/conf/files.amd64  Tue May 16 17:35:05 2017
(r318356)
+++ stable/11/sys/conf/files.amd64  Tue May 16 17:49:15 2017
(r318357)
@@ -249,6 +249,10 @@ dev/ixl/ixl_pf_qmgr.c  optionalixl pci 
compile-with "${NORMAL_C} -I$S/dev/ixl"
 dev/ixl/ixl_pf_iov.c   optionalixl pci \
compile-with "${NORMAL_C} -I$S/dev/ixl"
+dev/ixl/ixl_pf_i2c.c   optionalixl pci \
+   compile-with "${NORMAL_C} -I$S/dev/ixl"
+dev/ixl/ixl_iw.c   optionalixl pci \
+   compile-with "${NORMAL_C} -I$S/dev/ixl"
 dev/ixl/if_ixlv.c  optionalixlv pci \
compile-with "${NORMAL_C} -I$S/dev/ixl"
 dev/ixl/ixlvc.coptionalixlv pci \

Modified: stable/11/sys/conf/options.amd64
==
--- stable/11/sys/conf/options.amd64Tue May 16 17:35:05 2017
(r318356)
+++ stable/11/sys/conf/options.amd64Tue May 16 17:49:15 2017
(r318357)
@@ -49,6 +49,9 @@ AGP_DEBUG opt_agp.h
 
 ATKBD_DFLT_KEYMAP  opt_atkbd.h
 
+# iWARP client interface support in ixl
+IXL_IW opt_ixl.h
+
 # ---
 # EOF
 # ---

Modified: stable/11/sys/dev/ixl/i40e_adminq.c
==
--- stable/11/sys/dev/ixl/i40e_adminq.c Tue May 16 17:35:05 2017
(r318356)
+++ stable/11/sys/dev/ixl/i40e_adminq.c Tue May 16 17:49:15 2017
(r

svn commit: r318356 - in head: lib/libstand sys/boot/i386/pxeldr

2017-05-16 Thread Toomas Soome
Author: tsoome
Date: Tue May 16 17:35:05 2017
New Revision: 318356
URL: https://svnweb.freebsd.org/changeset/base/318356

Log:
  libstand: increase nfs max read size to 16k
  
  With ip fragment reassembly implemented, it makes sense to allow
  larger nfs reads. Note due to loader heap size limit, we do not want
  to set too large maximum read size. Also we do not change default read size.
  
  Reviewed by:  bcr, allanjude
  Differential Revision:https://reviews.freebsd.org/D10754

Modified:
  head/lib/libstand/nfs.c
  head/sys/boot/i386/pxeldr/pxeboot.8

Modified: head/lib/libstand/nfs.c
==
--- head/lib/libstand/nfs.c Tue May 16 17:04:50 2017(r318355)
+++ head/lib/libstand/nfs.c Tue May 16 17:35:05 2017(r318356)
@@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$");
 #define NFS_DEBUGxx
 
 #define NFSREAD_MIN_SIZE 1024
-#define NFSREAD_MAX_SIZE 4096
+#define NFSREAD_MAX_SIZE 16384
 
 /* NFSv3 definitions */
 #defineNFS_V3MAXFHSIZE 64

Modified: head/sys/boot/i386/pxeldr/pxeboot.8
==
--- head/sys/boot/i386/pxeldr/pxeboot.8 Tue May 16 17:04:50 2017
(r318355)
+++ head/sys/boot/i386/pxeldr/pxeboot.8 Tue May 16 17:35:05 2017
(r318356)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd May 1, 2000
+.Dd May 16, 2017
 .Dt PXEBOOT 8
 .Os
 .Sh NAME
@@ -91,7 +91,7 @@ This may be changed by setting the
 .Va nfs.read_size
 variable in
 .Pa /boot/loader.conf .
-Valid values range from 1024 to 4096 bytes.
+Valid values range from 1024 to 16384 bytes.
 .Pp
 In all other respects,
 .Nm
___
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: r318355 - head/sbin/newfs_msdos

2017-05-16 Thread Ed Maste
Author: emaste
Date: Tue May 16 17:04:50 2017
New Revision: 318355
URL: https://svnweb.freebsd.org/changeset/base/318355

Log:
  newfs_msdos: add -T (timestamp) option for reproducible builds
  
  This includes some whitespace and minor bug fixes relative to NetBSD,
  which will be submitted upstream at the conclusion of the makefs
  msdos update.
  
  NetBSD revs:
  mkfs_msdos.c  1.11
  mkfs_msdos.h  1.4
  newfs_msdos.8 1.22
  newfs_msdos.c 1.44
  
  Submitted by: Siva Mahadevan 
  Reviewed by:  emaste
  Obtained from:NetBSD
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sbin/newfs_msdos/mkfs_msdos.c
  head/sbin/newfs_msdos/mkfs_msdos.h
  head/sbin/newfs_msdos/newfs_msdos.8
  head/sbin/newfs_msdos/newfs_msdos.c

Modified: head/sbin/newfs_msdos/mkfs_msdos.c
==
--- head/sbin/newfs_msdos/mkfs_msdos.c  Tue May 16 16:20:22 2017
(r318354)
+++ head/sbin/newfs_msdos/mkfs_msdos.c  Tue May 16 17:04:50 2017
(r318355)
@@ -566,9 +566,17 @@ mkfs_msdos(const char *fname, const char
 }
 print_bpb(&bpb);
 if (!o.no_create) {
-   gettimeofday(&tv, NULL);
-   now = tv.tv_sec;
-   tm = localtime(&now);
+   if (o.timestamp_set) {
+   tv.tv_sec = now = o.timestamp;
+   tv.tv_usec = 0;
+   tm = gmtime(&now);
+   } else {
+   gettimeofday(&tv, NULL);
+   now = tv.tv_sec;
+   tm = localtime(&now);
+   }
+
+
if (!(img = malloc(bpb.bpbBytesPerSec))) {
warn(NULL);
goto done;

Modified: head/sbin/newfs_msdos/mkfs_msdos.h
==
--- head/sbin/newfs_msdos/mkfs_msdos.h  Tue May 16 16:20:22 2017
(r318354)
+++ head/sbin/newfs_msdos/mkfs_msdos.h  Tue May 16 17:04:50 2017
(r318355)
@@ -42,6 +42,7 @@ AOPT('L', const char *, volume_label, -1
 AOPT('N', bool, no_create, -2, "Don't create filesystem, print params only") \
 AOPT('O', const char *, OEM_string, -1, "OEM string") \
 AOPT('S', uint16_t, bytes_per_sector, 1, "Bytes per sector") \
+AOPT('T', time_t, timestamp, 0, "Timestamp") \
 AOPT('a', uint32_t, sectors_per_fat, 1, "Sectors per FAT") \
 AOPT('b', uint32_t, block_size, 1, "Block size") \
 AOPT('c', uint8_t, sectors_per_cluster, 1, "Sectors per cluster") \
@@ -61,6 +62,7 @@ struct msdos_options {
 #define AOPT(_opt, _type, _name, _min, _desc) _type _name;
 ALLOPTS
 #undef AOPT
+   uint32_t timestamp_set:1;
uint32_t volume_id_set:1;
uint32_t media_descriptor_set:1;
uint32_t hidden_sectors_set:1;

Modified: head/sbin/newfs_msdos/newfs_msdos.8
==
--- head/sbin/newfs_msdos/newfs_msdos.8 Tue May 16 16:20:22 2017
(r318354)
+++ head/sbin/newfs_msdos/newfs_msdos.8 Tue May 16 17:04:50 2017
(r318355)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 9, 2015
+.Dd May 16, 2017
 .Dt NEWFS_MSDOS 8
 .Os
 .Sh NAME
@@ -55,6 +55,7 @@
 .Op Fl o Ar hidden
 .Op Fl r Ar reserved
 .Op Fl s Ar total
+.Op Fl T Ar timestamp
 .Op Fl u Ar track-size
 .Ar special
 .Op Ar disktype
@@ -159,6 +160,12 @@ Number of hidden sectors.
 Number of reserved sectors.
 .It Fl s Ar total
 File system size.
+.It Fl T Ar timestamp
+Specify a timestamp to be used for filesystem creation so that
+it can be consistent for reproducible builds.
+The timestamp can be a pathname (where the timestamps are derived from
+that file) or an integer value interpreted
+as the number of seconds since the Epoch.
 .It Fl u Ar track-size
 Number of sectors per track.
 .El

Modified: head/sbin/newfs_msdos/newfs_msdos.c
==
--- head/sbin/newfs_msdos/newfs_msdos.c Tue May 16 16:20:22 2017
(r318354)
+++ head/sbin/newfs_msdos/newfs_msdos.c Tue May 16 17:04:50 2017
(r318355)
@@ -31,7 +31,7 @@ static const char rcsid[] =
 #endif /* not lint */
 
 #include 
-
+#include 
 #include 
 #include 
 #include 
@@ -51,13 +51,30 @@ static u_int argtou(const char *, u_int,
 static off_t argtooff(const char *, const char *);
 static void usage(void);
 
+static time_t
+get_tstamp(const char *b)
+{
+struct stat st;
+char *eb;
+long long l;
+
+if (stat(b, &st) != -1)
+return (time_t)st.st_mtime;
+
+errno = 0;
+l = strtoll(b, &eb, 0);
+if (b == eb || *eb || errno)
+errx(EXIT_FAILURE, "Can't parse timestamp '%s'", b);
+return (time_t)l;
+}
+
 /*
  * Construct a FAT12, FAT16, or FAT32 file system.
  */
 int
 main(int argc, char *argv[])
 {
-static const char opts[] = "@:NB:C:F:I:L:O:S:a:b:c:e:f:h:i:k:m:n:o:r:s:u:";
+static const char opts[] = 
"@:NB:C:F:I:L:O:S:a:b:c:e:f:h:i:k:m:n:o:r:s:T:u:";
 struct msdos_options o;
 const char *fname, *dtype;
 char buf[MAXPATHLEN];
@@ -142,6 +159,10 @@ main(int argc, char *argv[])
case 's'

Re: svn commit: r318354 - head/sys/amd64/amd64

2017-05-16 Thread Ngie Cooper (yaneurabeya)

> On May 16, 2017, at 9:20 AM, Conrad Meyer  wrote:
> 
> Author: cem
> Date: Tue May 16 16:20:22 2017
> New Revision: 318354
> URL: https://svnweb.freebsd.org/changeset/base/318354
> 
> Log:
>  Correct page frame mask constant used in pmap_change_attr_locked
> 
>  This was introduced in r290156.  It's present in 11.0, but not any 10.x
>  release unless someone decided to MFC it.

Hi Conrad,
It wasn’t MFCed according to 
https://svnweb.freebsd.org/base/stable/10/sys/amd64/amd64/pmap.c 
, so that’s 
ok.
Could you please MFC this change since you understand it/made it?
Thank you,
-Ngie


signature.asc
Description: Message signed with OpenPGP


svn commit: r318354 - head/sys/amd64/amd64

2017-05-16 Thread Conrad Meyer
Author: cem
Date: Tue May 16 16:20:22 2017
New Revision: 318354
URL: https://svnweb.freebsd.org/changeset/base/318354

Log:
  Correct page frame mask constant used in pmap_change_attr_locked
  
  This was introduced in r290156.  It's present in 11.0, but not any 10.x
  release unless someone decided to MFC it.
  
  It affects ordinary pages right above the DMAP limit, which is effectively
  system memory rounded up to a 1 GB (3rd level superpage) boundary (or up to
  a minimum of 4 GB, on small systems).
  
  Reported by:  vangyzen
  Reviewed by:  kib, alc
  Sponsored by: Dell EMC Isilon
  Differential Revision:https://reviews.freebsd.org/D4030

Modified:
  head/sys/amd64/amd64/pmap.c

Modified: head/sys/amd64/amd64/pmap.c
==
--- head/sys/amd64/amd64/pmap.c Tue May 16 14:21:37 2017(r318353)
+++ head/sys/amd64/amd64/pmap.c Tue May 16 16:20:22 2017(r318354)
@@ -6691,7 +6691,7 @@ pmap_change_attr_locked(vm_offset_t va, 
changed = TRUE;
}
if (tmpva >= VM_MIN_KERNEL_ADDRESS &&
-   (*pte & PG_PS_FRAME) < dmaplimit) {
+   (*pte & PG_FRAME) < dmaplimit) {
if (pa_start == pa_end) {
/* Start physical address run. */
pa_start = *pte & PG_FRAME;
___
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: r318353 - in head/sys: arm/arm arm64/arm64 mips/mips x86/x86

2017-05-16 Thread Hans Petter Selasky
Author: hselasky
Date: Tue May 16 14:21:37 2017
New Revision: 318353
URL: https://svnweb.freebsd.org/changeset/base/318353

Log:
  Avoid use of contiguous memory allocations in busdma when possible.
  
  This patch improves the boundary checks in busdma to allow more cases
  using the regular page based kernel memory allocator. Especially in
  the case of having a non-zero boundary in the parent DMA tag. For
  example AMD64 based platforms set the PCI DMA tag boundary to
  PCI_DMA_BOUNDARY, 4GB, which before this patch caused contiguous
  memory allocations to be preferred when allocating more than PAGE_SIZE
  bytes. Even if the required alignment was less than PAGE_SIZE bytes.
  
  This patch also fixes the nsegments check for using kmem_alloc_attr()
  when the maximum segment size is less than PAGE_SIZE bytes.
  
  Updated some comments describing the code in question.
  
  Differential Revision:https://reviews.freebsd.org/D10645
  Reviewed by:  kib, jhb, gallatin, scottl
  MFC after:1 week
  Sponsored by: Mellanox Technologies

Modified:
  head/sys/arm/arm/busdma_machdep-v4.c
  head/sys/arm/arm/busdma_machdep-v6.c
  head/sys/arm64/arm64/busdma_bounce.c
  head/sys/mips/mips/busdma_machdep.c
  head/sys/x86/x86/busdma_bounce.c

Modified: head/sys/arm/arm/busdma_machdep-v4.c
==
--- head/sys/arm/arm/busdma_machdep-v4.cTue May 16 13:27:44 2017
(r318352)
+++ head/sys/arm/arm/busdma_machdep-v4.cTue May 16 14:21:37 2017
(r318353)
@@ -736,8 +736,10 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi
if (bufzone != NULL && dmat->alignment <= bufzone->size &&
!_bus_dma_can_bounce(dmat->lowaddr, dmat->highaddr)) {
*vaddr = uma_zalloc(bufzone->umazone, mflags);
-   } else if (dmat->nsegments >= btoc(dmat->maxsize) &&
-   dmat->alignment <= PAGE_SIZE && dmat->boundary == 0) {
+   } else if (dmat->nsegments >=
+   howmany(dmat->maxsize, MIN(dmat->maxsegsz, PAGE_SIZE)) &&
+   dmat->alignment <= PAGE_SIZE &&
+   (dmat->boundary % PAGE_SIZE) == 0) {
*vaddr = (void *)kmem_alloc_attr(kernel_arena, dmat->maxsize,
mflags, 0, dmat->lowaddr, memattr);
} else {

Modified: head/sys/arm/arm/busdma_machdep-v6.c
==
--- head/sys/arm/arm/busdma_machdep-v6.cTue May 16 13:27:44 2017
(r318352)
+++ head/sys/arm/arm/busdma_machdep-v6.cTue May 16 14:21:37 2017
(r318353)
@@ -779,7 +779,9 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi
 *(the allocator aligns buffers to their size boundaries).
 *  - There's no need to handle lowaddr/highaddr exclusion zones.
 * else allocate non-contiguous pages if...
-*  - The page count that could get allocated doesn't exceed nsegments.
+*  - The page count that could get allocated doesn't exceed
+*nsegments also when the maximum segment size is less
+*than PAGE_SIZE.
 *  - The alignment constraint isn't larger than a page boundary.
 *  - There are no boundary-crossing constraints.
 * else allocate a block of contiguous pages because one or more of the
@@ -788,8 +790,10 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi
if (bufzone != NULL && dmat->alignment <= bufzone->size &&
!exclusion_bounce(dmat)) {
*vaddr = uma_zalloc(bufzone->umazone, mflags);
-   } else if (dmat->nsegments >= btoc(dmat->maxsize) &&
-   dmat->alignment <= PAGE_SIZE && dmat->boundary == 0) {
+   } else if (dmat->nsegments >=
+   howmany(dmat->maxsize, MIN(dmat->maxsegsz, PAGE_SIZE)) &&
+   dmat->alignment <= PAGE_SIZE &&
+   (dmat->boundary % PAGE_SIZE) == 0) {
*vaddr = (void *)kmem_alloc_attr(kernel_arena, dmat->maxsize,
mflags, 0, dmat->lowaddr, memattr);
} else {

Modified: head/sys/arm64/arm64/busdma_bounce.c
==
--- head/sys/arm64/arm64/busdma_bounce.cTue May 16 13:27:44 2017
(r318352)
+++ head/sys/arm64/arm64/busdma_bounce.cTue May 16 14:21:37 2017
(r318353)
@@ -461,22 +461,35 @@ bounce_bus_dmamem_alloc(bus_dma_tag_t dm
(*mapp)->flags = DMAMAP_FROM_DMAMEM;
 
/*
-* XXX:
-* (dmat->alignment <= dmat->maxsize) is just a quick hack; the exact
-* alignment guarantees of malloc need to be nailed down, and the
-* code below should be rewritten to take that into account.
+* Allocate the buffer from the malloc(9) allocator if...
+*  - It's small enough to fit into a single power of two sized bucket.
+*  - The alignment is less than or equal to the maximum size
+*  - The low address requirement is fulf

svn commit: r318352 - head/libexec/rtld-elf

2017-05-16 Thread Jonathan Anderson
Author: jonathan
Date: Tue May 16 13:27:44 2017
New Revision: 318352
URL: https://svnweb.freebsd.org/changeset/base/318352

Log:
  Rename rtld's parse_libdir to parse_integer.
  
  This is a more accurate name, as the integer doesn't have to be a library
  directory descriptor. It is also a prerequisite for more argument parsing
  coming in the near future (e.g., parsing explicit binary descriptors).
  
  Reviewed by:  kib
  MFC after:2 weeks
  Sponsored by: NSERC

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

Modified: head/libexec/rtld-elf/rtld.c
==
--- head/libexec/rtld-elf/rtld.cTue May 16 11:52:27 2017
(r318351)
+++ head/libexec/rtld-elf/rtld.cTue May 16 13:27:44 2017
(r318352)
@@ -115,7 +115,7 @@ static void objlist_push_head(Objlist *,
 static void objlist_push_tail(Objlist *, Obj_Entry *);
 static void objlist_put_after(Objlist *, Obj_Entry *, Obj_Entry *);
 static void objlist_remove(Objlist *, Obj_Entry *);
-static int parse_libdir(const char *);
+static int parse_integer(const char *);
 static void *path_enumerate(const char *, path_enum_proc, void *);
 static void release_object(Obj_Entry *);
 static int relocate_object_dag(Obj_Entry *root, bool bind_now,
@@ -3033,9 +3033,12 @@ search_library_pathfds(const char *name,
envcopy = xstrdup(path);
for (fdstr = strtok_r(envcopy, ":", &last_token); fdstr != NULL;
fdstr = strtok_r(NULL, ":", &last_token)) {
-   dirfd = parse_libdir(fdstr);
-   if (dirfd < 0)
+   dirfd = parse_integer(fdstr);
+   if (dirfd < 0) {
+   _rtld_error("failed to parse directory FD: '%s'",
+   fdstr);
break;
+   }
fd = __sys_openat(dirfd, name, O_RDONLY | O_CLOEXEC | O_VERIFY);
if (fd >= 0) {
*fdp = fd;
@@ -5236,29 +5239,27 @@ symlook_init_from_req(SymLook *dst, cons
  * Parse a file descriptor number without pulling in more of libc (e.g. atoi).
  */
 static int
-parse_libdir(const char *str)
+parse_integer(const char *str)
 {
static const int RADIX = 10;  /* XXXJA: possibly support hex? */
const char *orig;
-   int fd;
+   int n;
char c;
 
orig = str;
-   fd = 0;
+   n = 0;
for (c = *str; c != '\0'; c = *++str) {
if (c < '0' || c > '9')
return (-1);
 
-   fd *= RADIX;
-   fd += c - '0';
+   n *= RADIX;
+   n += c - '0';
}
 
/* Make sure we actually parsed something. */
-   if (str == orig) {
-   _rtld_error("failed to parse directory FD from '%s'", str);
+   if (str == orig)
return (-1);
-   }
-   return (fd);
+   return (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"


svn commit: r318347 - in stable/11/sys: dev/xen/evtchn x86/xen xen

2017-05-16 Thread Roger Pau Monné
Author: royger
Date: Tue May 16 09:39:20 2017
New Revision: 318347
URL: https://svnweb.freebsd.org/changeset/base/318347

Log:
  MCF r310418: xen: fix IPI setup with EARLY_AP_STARTUP
  
  Sponsored by: Citrix Systems R&D

Modified:
  stable/11/sys/dev/xen/evtchn/evtchn_dev.c
  stable/11/sys/x86/xen/xen_apic.c
  stable/11/sys/x86/xen/xen_intr.c
  stable/11/sys/xen/xen_intr.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/xen/evtchn/evtchn_dev.c
==
--- stable/11/sys/dev/xen/evtchn/evtchn_dev.c   Tue May 16 09:24:18 2017
(r318346)
+++ stable/11/sys/dev/xen/evtchn/evtchn_dev.c   Tue May 16 09:39:20 2017
(r318347)
@@ -373,9 +373,9 @@ evtchn_bind_user_port(struct per_user_da
mtx_lock(&u->bind_mutex);
RB_INSERT(evtchn_tree, &u->evtchns, evtchn);
mtx_unlock(&u->bind_mutex);
-   error = xen_intr_add_handler(evtchn_dev, evtchn_filter,
-   evtchn_interrupt, evtchn, INTR_TYPE_MISC | INTR_MPSAFE,
-   evtchn->handle);
+   error = xen_intr_add_handler(device_get_nameunit(evtchn_dev),
+   evtchn_filter, evtchn_interrupt, evtchn,
+   INTR_TYPE_MISC | INTR_MPSAFE, evtchn->handle);
if (error != 0) {
xen_intr_unbind(&evtchn->handle);
mtx_lock(&u->bind_mutex);

Modified: stable/11/sys/x86/xen/xen_apic.c
==
--- stable/11/sys/x86/xen/xen_apic.cTue May 16 09:24:18 2017
(r318346)
+++ stable/11/sys/x86/xen/xen_apic.cTue May 16 09:39:20 2017
(r318347)
@@ -500,12 +500,9 @@ xen_cpu_ipi_init(int cpu)
 {
xen_intr_handle_t *ipi_handle;
const struct xen_ipi_handler *ipi;
-   device_t dev;
int idx, rc;
 
ipi_handle = DPCPU_ID_GET(cpu, ipi_handle);
-   dev = pcpu_find(cpu)->pc_device;
-   KASSERT((dev != NULL), ("NULL pcpu device_t"));
 
for (ipi = xen_ipis, idx = 0; idx < nitems(xen_ipis); ipi++, idx++) {
 
@@ -514,7 +511,7 @@ xen_cpu_ipi_init(int cpu)
continue;
}
 
-   rc = xen_intr_alloc_and_bind_ipi(dev, cpu, ipi->filter,
+   rc = xen_intr_alloc_and_bind_ipi(cpu, ipi->filter,
INTR_TYPE_TTY, &ipi_handle[idx]);
if (rc != 0)
panic("Unable to allocate a XEN IPI port");

Modified: stable/11/sys/x86/xen/xen_intr.c
==
--- stable/11/sys/x86/xen/xen_intr.cTue May 16 09:24:18 2017
(r318346)
+++ stable/11/sys/x86/xen/xen_intr.cTue May 16 09:39:20 2017
(r318347)
@@ -392,7 +392,7 @@ xen_intr_release_isrc(struct xenisrc *is
  */
 static int
 xen_intr_bind_isrc(struct xenisrc **isrcp, evtchn_port_t local_port,
-enum evtchn_type type, device_t intr_owner, driver_filter_t filter,
+enum evtchn_type type, const char *intr_owner, driver_filter_t filter,
 driver_intr_t handler, void *arg, enum intr_type flags,
 xen_intr_handle_t *port_handlep)
 {
@@ -401,8 +401,8 @@ xen_intr_bind_isrc(struct xenisrc **isrc
 
*isrcp = NULL;
if (port_handlep == NULL) {
-   device_printf(intr_owner,
- "xen_intr_bind_isrc: Bad event handle\n");
+   printf("%s: xen_intr_bind_isrc: Bad event handle\n",
+   intr_owner);
return (EINVAL);
}
 
@@ -1174,8 +1174,9 @@ xen_intr_bind_local_port(device_t dev, e
struct xenisrc *isrc;
int error;
 
-   error = xen_intr_bind_isrc(&isrc, local_port, EVTCHN_TYPE_PORT, dev,
-   filter, handler, arg, flags, port_handlep);
+   error = xen_intr_bind_isrc(&isrc, local_port, EVTCHN_TYPE_PORT,
+   device_get_nameunit(dev), filter, handler, arg, flags,
+   port_handlep);
if (error != 0)
return (error);
 
@@ -1209,8 +1210,8 @@ xen_intr_alloc_and_bind_local_port(devic
}
 
error = xen_intr_bind_isrc(&isrc, alloc_unbound.port, EVTCHN_TYPE_PORT,
-dev, filter, handler, arg, flags,
-port_handlep);
+   device_get_nameunit(dev), filter, handler, arg, flags,
+   port_handlep);
if (error != 0) {
evtchn_close_t close = { .port = alloc_unbound.port };
if (HYPERVISOR_event_channel_op(EVTCHNOP_close, &close))
@@ -1244,8 +1245,8 @@ xen_intr_bind_remote_port(device_t dev, 
}
 
error = xen_intr_bind_isrc(&isrc, bind_interdomain.local_port,
-EVTCHN_TYPE_PORT, dev, filter, handler,
-arg, flags, port_handlep);
+   EVTCHN_TYPE_PORT, device_get_nameunit(dev), filter, handler, arg,
+   flags, port_handlep);
if (error) {
evtchn_clo

svn commit: r318339 - stable/8/share/man/man4

2017-05-16 Thread Hans Petter Selasky
Author: hselasky
Date: Tue May 16 07:24:09 2017
New Revision: 318339
URL: https://svnweb.freebsd.org/changeset/base/318339

Log:
  MFC r317584:
  Correct manual page link to usbdi(9).

Modified:
  stable/8/share/man/man4/usb.4
Directory Properties:
  stable/8/share/   (props changed)
  stable/8/share/man/   (props changed)
  stable/8/share/man/man4/   (props changed)

Modified: stable/8/share/man/man4/usb.4
==
--- stable/8/share/man/man4/usb.4   Tue May 16 07:22:41 2017
(r318338)
+++ stable/8/share/man/man4/usb.4   Tue May 16 07:24:09 2017
(r318339)
@@ -170,7 +170,7 @@ specifications can be found at:
 .D1 Pa http://www.usb.org/developers/docs/
 .Pp
 .Xr libusb 3 ,
-.Xr usbdi 4 ,
+.Xr usbdi 9 ,
 .Xr aue 4 ,
 .Xr axe 4 ,
 .Xr cue 4 ,
___
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: r318338 - stable/9/share/man/man4

2017-05-16 Thread Hans Petter Selasky
Author: hselasky
Date: Tue May 16 07:22:41 2017
New Revision: 318338
URL: https://svnweb.freebsd.org/changeset/base/318338

Log:
  MFC r317584:
  Correct manual page link to usbdi(9).

Modified:
  stable/9/share/man/man4/usb.4
Directory Properties:
  stable/9/share/   (props changed)
  stable/9/share/man/   (props changed)
  stable/9/share/man/man4/   (props changed)

Modified: stable/9/share/man/man4/usb.4
==
--- stable/9/share/man/man4/usb.4   Tue May 16 05:10:15 2017
(r318337)
+++ stable/9/share/man/man4/usb.4   Tue May 16 07:22:41 2017
(r318338)
@@ -144,7 +144,7 @@ specifications can be found at:
 .D1 Pa http://www.usb.org/developers/docs/
 .Pp
 .Xr libusb 3 ,
-.Xr usbdi 4 ,
+.Xr usbdi 9 ,
 .Xr aue 4 ,
 .Xr axe 4 ,
 .Xr axge 4 ,
___
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"