svn commit: r311966 - in vendor/NetBSD/tests/dist: . crypto/libcrypto crypto/libcrypto/rc4 dev dev/audio dev/cgd fs/ffs fs/fifofs fs/nfs/nfsservice fs/psshfs fs/puffs fs/vfs kernel lib lib/libc/arc...

2017-01-11 Thread Ngie Cooper
Author: ngie
Date: Thu Jan 12 07:26:39 2017
New Revision: 311966
URL: https://svnweb.freebsd.org/changeset/base/311966

Log:
  Sync ^/vendor/NetBSD/tests/dist with upstream

Added:
  vendor/NetBSD/tests/dist/dev/cgd/t_cgd_3des.c   (contents, props changed)
  vendor/NetBSD/tests/dist/dev/cgd/t_cgd_aes.c   (contents, props changed)
  vendor/NetBSD/tests/dist/dev/cgd/t_cgd_blowfish.c   (contents, props changed)
  vendor/NetBSD/tests/dist/kernel/msg.h   (contents, props changed)
  vendor/NetBSD/tests/dist/kernel/t_ptrace.c   (contents, props changed)
  vendor/NetBSD/tests/dist/kernel/t_ptrace_wait.c   (contents, props changed)
  vendor/NetBSD/tests/dist/kernel/t_ptrace_wait.h   (contents, props changed)
  vendor/NetBSD/tests/dist/kernel/t_ptrace_wait3.c   (contents, props changed)
  vendor/NetBSD/tests/dist/kernel/t_ptrace_wait4.c   (contents, props changed)
  vendor/NetBSD/tests/dist/kernel/t_ptrace_wait6.c   (contents, props changed)
  vendor/NetBSD/tests/dist/kernel/t_ptrace_waitid.c   (contents, props changed)
  vendor/NetBSD/tests/dist/kernel/t_ptrace_waitpid.c   (contents, props changed)
  vendor/NetBSD/tests/dist/lib/libc/sys/t_clock_nanosleep.c   (contents, props 
changed)
  vendor/NetBSD/tests/dist/lib/libc/sys/t_wait_noproc.c   (contents, props 
changed)
  vendor/NetBSD/tests/dist/lib/libc/sys/t_wait_noproc_wnohang.c   (contents, 
props changed)
  vendor/NetBSD/tests/dist/net/net/t_mtudisc.sh   (contents, props changed)
  vendor/NetBSD/tests/dist/net/net/t_mtudisc6.sh   (contents, props changed)
  vendor/NetBSD/tests/dist/net/net/t_ping6_opts.sh   (contents, props changed)
  vendor/NetBSD/tests/dist/net/net_common.sh   (contents, props changed)
  vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_c99_anon_union.c   (contents, 
props changed)
  vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_c99_union_cast.c   (contents, 
props changed)
Modified:
  vendor/NetBSD/tests/dist/crypto/libcrypto/rc4/Makefile
  vendor/NetBSD/tests/dist/crypto/libcrypto/t_libcrypto.sh
  vendor/NetBSD/tests/dist/crypto/libcrypto/t_pubkey.sh
  vendor/NetBSD/tests/dist/dev/Makefile
  vendor/NetBSD/tests/dist/dev/audio/h_pad.c
  vendor/NetBSD/tests/dist/dev/audio/t_pad_output.bz2.uue
  vendor/NetBSD/tests/dist/dev/cgd/Makefile
  vendor/NetBSD/tests/dist/fs/ffs/ffs_common.sh
  vendor/NetBSD/tests/dist/fs/fifofs/t_fifo.c
  vendor/NetBSD/tests/dist/fs/nfs/nfsservice/Makefile
  vendor/NetBSD/tests/dist/fs/psshfs/t_psshfs.sh
  vendor/NetBSD/tests/dist/fs/puffs/t_basic.c
  vendor/NetBSD/tests/dist/fs/vfs/Makefile
  vendor/NetBSD/tests/dist/fs/vfs/t_vnops.c
  vendor/NetBSD/tests/dist/h_macros.h
  vendor/NetBSD/tests/dist/kernel/Makefile
  vendor/NetBSD/tests/dist/kernel/t_mqueue.c
  vendor/NetBSD/tests/dist/lib/Makefile
  vendor/NetBSD/tests/dist/lib/libc/arch/sparc64/exec_prot_support.c
  vendor/NetBSD/tests/dist/lib/libc/arch/sparc64/return_one.S
  vendor/NetBSD/tests/dist/lib/libc/db/Makefile
  vendor/NetBSD/tests/dist/lib/libc/db/h_db.c
  vendor/NetBSD/tests/dist/lib/libc/db/t_db.sh
  vendor/NetBSD/tests/dist/lib/libc/gen/Makefile
  vendor/NetBSD/tests/dist/lib/libc/gen/t_fnmatch.c
  vendor/NetBSD/tests/dist/lib/libc/net/getaddrinfo/Makefile
  vendor/NetBSD/tests/dist/lib/libc/regex/Makefile
  vendor/NetBSD/tests/dist/lib/libc/rpc/t_rpc.c
  vendor/NetBSD/tests/dist/lib/libc/sync/cpp_atomic_ops_linkable.cc
  vendor/NetBSD/tests/dist/lib/libc/sys/Makefile
  vendor/NetBSD/tests/dist/lib/libm/Makefile
  vendor/NetBSD/tests/dist/lib/libm/t_ldexp.c
  vendor/NetBSD/tests/dist/lib/libm/t_precision.c
  vendor/NetBSD/tests/dist/lib/libpthread/Makefile
  vendor/NetBSD/tests/dist/lib/libpthread/h_common.h
  vendor/NetBSD/tests/dist/lib/libpthread/t_mutex.c
  vendor/NetBSD/tests/dist/lib/librumpclient/Makefile
  vendor/NetBSD/tests/dist/lib/librumpclient/h_execthr.c
  vendor/NetBSD/tests/dist/lib/librumphijack/t_tcpip.sh
  vendor/NetBSD/tests/dist/lib/libusbhid/t_usbhid.c
  vendor/NetBSD/tests/dist/net/Makefile
  vendor/NetBSD/tests/dist/net/arp/Makefile
  vendor/NetBSD/tests/dist/net/arp/t_arp.sh
  vendor/NetBSD/tests/dist/net/arp/t_dad.sh
  vendor/NetBSD/tests/dist/net/icmp/Makefile
  vendor/NetBSD/tests/dist/net/icmp/t_icmp6_redirect.sh
  vendor/NetBSD/tests/dist/net/icmp/t_icmp_redirect.sh
  vendor/NetBSD/tests/dist/net/if/t_compat.c
  vendor/NetBSD/tests/dist/net/if/t_ifconfig.sh
  vendor/NetBSD/tests/dist/net/if_bridge/Makefile
  vendor/NetBSD/tests/dist/net/if_bridge/t_bridge.sh
  vendor/NetBSD/tests/dist/net/if_gif/Makefile
  vendor/NetBSD/tests/dist/net/if_gif/t_gif.sh
  vendor/NetBSD/tests/dist/net/if_pppoe/Makefile
  vendor/NetBSD/tests/dist/net/if_pppoe/t_pppoe.sh
  vendor/NetBSD/tests/dist/net/if_tap/Makefile
  vendor/NetBSD/tests/dist/net/if_tap/t_tap.sh
  vendor/NetBSD/tests/dist/net/mcast/Makefile
  vendor/NetBSD/tests/dist/net/mcast/t_mcast.sh
  vendor/NetBSD/tests/dist/net/ndp/Makefile
  vendor/NetBSD/tests/dist/net/ndp/t_dad.sh
  vendor/NetBSD/tests/dist/net/ndp/t_ndp.sh
  vendor/NetBSD/tests/dist/net/ndp/t_ra.sh
  

svn commit: r311965 - in vendor/NetBSD/tests/dist/lib/libc: gen string

2017-01-11 Thread Ngie Cooper
Author: ngie
Date: Thu Jan 12 07:21:56 2017
New Revision: 311965
URL: https://svnweb.freebsd.org/changeset/base/311965

Log:
  Commit updates accepted upstream (NetBSD)

Modified:
  vendor/NetBSD/tests/dist/lib/libc/gen/t_dir.c
  vendor/NetBSD/tests/dist/lib/libc/string/t_memcpy.c
  vendor/NetBSD/tests/dist/lib/libc/string/t_memmem.c

Modified: vendor/NetBSD/tests/dist/lib/libc/gen/t_dir.c
==
--- vendor/NetBSD/tests/dist/lib/libc/gen/t_dir.c   Thu Jan 12 06:58:31 
2017(r311964)
+++ vendor/NetBSD/tests/dist/lib/libc/gen/t_dir.c   Thu Jan 12 07:21:56 
2017(r311965)
@@ -1,4 +1,4 @@
-/* $NetBSD: t_dir.c,v 1.8 2017/01/11 07:26:17 christos Exp $ */
+/* $NetBSD: t_dir.c,v 1.10 2017/01/11 18:15:02 christos Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@ ATF_TC_BODY(seekdir_basic, tc)
 
 #defineCREAT(x, m) do {
\
int _creat_fd;  \
-   ATF_REQUIRE_MSG((_creat_fd = creat((x), (m)) != -1),\
+   ATF_REQUIRE_MSG((_creat_fd = creat((x), (m))) != -1,\
"creat(%s, %x) failed: %s", (x), (m),   \
strerror(errno));   \
(void)close(_creat_fd); \
@@ -75,29 +75,40 @@ ATF_TC_BODY(seekdir_basic, tc)
 
/* skip two for . and .. */
entry = readdir(dp);
+   ATF_REQUIRE_MSG(entry != NULL, "readdir[%s] failed: %s",
+   ".", strerror(errno));
+
entry = readdir(dp);
+   ATF_REQUIRE_MSG(entry != NULL, "readdir[%s] failed: %s",
+   "..", strerror(errno));
 
/* get first entry */
entry = readdir(dp);
+   ATF_REQUIRE_MSG(entry != NULL, "readdir[%s] failed: %s",
+   "first", strerror(errno));
+
here = telldir(dp);
-   ATF_REQUIRE_MSG(here != -1,
-   "telldir failed: %s", strerror(errno));
+   ATF_REQUIRE_MSG(here != -1, "telldir failed: %s", strerror(errno));
 
/* get second entry */
entry = readdir(dp);
+   ATF_REQUIRE_MSG(entry != NULL, "readdir[%s] failed: %s",
+   "second", strerror(errno));
+
wasname = strdup(entry->d_name);
if (wasname == NULL)
atf_tc_fail("cannot allocate memory");
 
/* get third entry */
entry = readdir(dp);
+   ATF_REQUIRE_MSG(entry != NULL, "readdir[%s] failed: %s",
+   "third", strerror(errno));
 
/* try to return to the position after the first entry */
seekdir(dp, here);
entry = readdir(dp);
-
-   if (entry == NULL)
-   atf_tc_fail("entry 1 not found");
+   ATF_REQUIRE_MSG(entry != NULL, "readdir[%s] failed: %s",
+   "first[1]", strerror(errno));
if (strcmp(entry->d_name, wasname) != 0)
atf_tc_fail("1st seekdir found wrong name");
 
@@ -105,18 +116,17 @@ ATF_TC_BODY(seekdir_basic, tc)
seekdir(dp, here);
here = telldir(dp);
entry = readdir(dp);
-
-   if (entry == NULL)
-   atf_tc_fail("entry 2 not found");
+   ATF_REQUIRE_MSG(entry != NULL, "readdir[%s] failed: %s",
+   "second[1]", strerror(errno));
if (strcmp(entry->d_name, wasname) != 0)
atf_tc_fail("2nd seekdir found wrong name");
 
/* One more time, to make sure that telldir() doesn't affect result */
seekdir(dp, here);
entry = readdir(dp);
+   ATF_REQUIRE_MSG(entry != NULL, "readdir[%s] failed: %s",
+   "third[1]", strerror(errno));
 
-   if (entry == NULL)
-   atf_tc_fail("entry 3 not found");
if (strcmp(entry->d_name, wasname) != 0)
atf_tc_fail("3rd seekdir found wrong name");
 

Modified: vendor/NetBSD/tests/dist/lib/libc/string/t_memcpy.c
==
--- vendor/NetBSD/tests/dist/lib/libc/string/t_memcpy.c Thu Jan 12 06:58:31 
2017(r311964)
+++ vendor/NetBSD/tests/dist/lib/libc/string/t_memcpy.c Thu Jan 12 07:21:56 
2017(r311965)
@@ -1,4 +1,4 @@
-/* $NetBSD: t_memcpy.c,v 1.5 2013/03/17 02:23:31 christos Exp $ */
+/* $NetBSD: t_memcpy.c,v 1.6 2017/01/11 18:05:54 christos Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -96,7 +96,8 @@ ATF_TC_BODY(memcpy_basic, tc)
if (i != j)
runTest(start[i], start[j]);
MD5End(mc, result);
-   ATF_REQUIRE_EQ(strcmp(result, goodResult), 0);
+   ATF_REQUIRE_EQ_MSG(strcmp(result, goodResult), 0, "%s != %s",
+   result, goodResult);
 }
 
 ATF_TC(memccpy_simple);

Modified: vendor/NetBSD/tests/dist/lib/libc/string/t_memmem.c
==
--- 

svn commit: r311964 - head/sys/geom/raid

2017-01-11 Thread Conrad E. Meyer
Author: cem
Date: Thu Jan 12 06:58:31 2017
New Revision: 311964
URL: https://svnweb.freebsd.org/changeset/base/311964

Log:
  g_raid: Prevent tasters from attempting excessively large reads
  
  Some g_raid tasters attempt metadata reads in multiples of the provider
  sectorsize.  Reads larger than MAXPHYS are invalid, so detect and abort
  in such situations.
  
  Spiritually similar to r217305 / PR 147851.
  
  PR:   214721
  Sponsored by: Dell EMC Isilon

Modified:
  head/sys/geom/raid/md_ddf.c
  head/sys/geom/raid/md_promise.c

Modified: head/sys/geom/raid/md_ddf.c
==
--- head/sys/geom/raid/md_ddf.c Thu Jan 12 06:38:03 2017(r311963)
+++ head/sys/geom/raid/md_ddf.c Thu Jan 12 06:58:31 2017(r311964)
@@ -1161,6 +1161,16 @@ hdrerror:
(GET16(meta, hdr->Configuration_Record_Length) * ss - 512) 
/ 12));
}
 
+   if (GET32(meta, hdr->cd_length) * ss >= MAXPHYS ||
+   GET32(meta, hdr->pdr_length) * ss >= MAXPHYS ||
+   GET32(meta, hdr->vdr_length) * ss >= MAXPHYS ||
+   GET32(meta, hdr->cr_length) * ss >= MAXPHYS ||
+   GET32(meta, hdr->pdd_length) * ss >= MAXPHYS ||
+   GET32(meta, hdr->bbmlog_length) * ss >= MAXPHYS) {
+   G_RAID_DEBUG(1, "%s: Blocksize is too big.", pp->name);
+   goto hdrerror;
+   }
+
/* Read controller data. */
buf = g_read_data(cp, (lba + GET32(meta, hdr->cd_section)) * ss,
GET32(meta, hdr->cd_length) * ss, );

Modified: head/sys/geom/raid/md_promise.c
==
--- head/sys/geom/raid/md_promise.c Thu Jan 12 06:38:03 2017
(r311963)
+++ head/sys/geom/raid/md_promise.c Thu Jan 12 06:58:31 2017
(r311964)
@@ -341,6 +341,11 @@ promise_meta_read(struct g_consumer *cp,
 
pp = cp->provider;
subdisks = 0;
+
+   if (pp->sectorsize * 4 > MAXPHYS) {
+   G_RAID_DEBUG(1, "%s: Blocksize is too big.", pp->name);
+   return (subdisks);
+   }
 next:
/* Read metadata block. */
buf = g_read_data(cp, pp->mediasize - pp->sectorsize *
___
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: r311963 - head/sys/kern

2017-01-11 Thread Ravi Pokala
Author: rpokala
Date: Thu Jan 12 06:38:03 2017
New Revision: 311963
URL: https://svnweb.freebsd.org/changeset/base/311963

Log:
  Remove writability requirement for single-mbuf, contiguous-range
  m_pulldown()
  
  m_pulldown() only needs to determine if a mbuf is writable if it is going to
  copy data into the data region of an existing mbuf. It does this to create a
  contiguous data region in a single mbuf from multiple mbufs in the chain. If
  the requested memory region is already contiguous and nothing needs to
  change, the mbuf does not need to be writeable.
  
  Submitted by: Brian Mueller 
  Reviewed by:  bz
  MFC after:1 week
  Sponsored by: Panasas
  Differential Revision:https://reviews.freebsd.org/D9053

Modified:
  head/sys/kern/uipc_mbuf2.c

Modified: head/sys/kern/uipc_mbuf2.c
==
--- head/sys/kern/uipc_mbuf2.c  Thu Jan 12 06:30:44 2017(r311962)
+++ head/sys/kern/uipc_mbuf2.c  Thu Jan 12 06:38:03 2017(r311963)
@@ -159,7 +159,7 @@ m_pulldown(struct mbuf *m, int off, int 
 * the target data is on .
 * if we got enough data on the mbuf "n", we're done.
 */
-   if ((off == 0 || offp) && len <= n->m_len - off && writable)
+   if ((off == 0 || offp) && len <= n->m_len - off)
goto ok;
 
/*
___
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: r311962 - head/sys/dev/sfxge

2017-01-11 Thread Andrew Rybchenko
Author: arybchik
Date: Thu Jan 12 06:30:44 2017
New Revision: 311962
URL: https://svnweb.freebsd.org/changeset/base/311962

Log:
  sfxge(4): stats refresh in SW should depend on HW update period
  
  The period should be taken into account by the function which
  refreshes driver stats.
  
  Reviewed by:philip
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:  2 days
  Differential Revision:  https://reviews.freebsd.org/D9130

Modified:
  head/sys/dev/sfxge/sfxge.h
  head/sys/dev/sfxge/sfxge_port.c

Modified: head/sys/dev/sfxge/sfxge.h
==
--- head/sys/dev/sfxge/sfxge.h  Thu Jan 12 06:29:14 2017(r311961)
+++ head/sys/dev/sfxge/sfxge.h  Thu Jan 12 06:30:44 2017(r311962)
@@ -159,6 +159,8 @@ enum sfxge_evq_state {
 
 #defineSFXGE_EV_BATCH  16384
 
+#defineSFXGE_STATS_UPDATE_PERIOD_MS1000
+
 struct sfxge_evq {
/* Structure members below are sorted by usage order */
struct sfxge_softc  *sc;

Modified: head/sys/dev/sfxge/sfxge_port.c
==
--- head/sys/dev/sfxge/sfxge_port.c Thu Jan 12 06:29:14 2017
(r311961)
+++ head/sys/dev/sfxge/sfxge_port.c Thu Jan 12 06:30:44 2017
(r311962)
@@ -51,6 +51,7 @@ sfxge_mac_stat_update(struct sfxge_softc
struct sfxge_port *port = >port;
efsys_mem_t *esmp = &(port->mac_stats.dma_buf);
clock_t now;
+   unsigned int min_ticks;
unsigned int count;
int rc;
 
@@ -61,8 +62,10 @@ sfxge_mac_stat_update(struct sfxge_softc
goto out;
}
 
+   min_ticks = (unsigned int)hz * SFXGE_STATS_UPDATE_PERIOD_MS / 1000;
+
now = ticks;
-   if ((unsigned int)(now - port->mac_stats.update_time) < (unsigned 
int)hz) {
+   if ((unsigned int)(now - port->mac_stats.update_time) < min_ticks) {
rc = 0;
goto out;
}
@@ -510,9 +513,10 @@ sfxge_port_start(struct sfxge_softc *sc)
 
sfxge_mac_filter_set_locked(sc);
 
-   /* Update MAC stats by DMA every second */
+   /* Update MAC stats by DMA every period */
if ((rc = efx_mac_stats_periodic(enp, >mac_stats.dma_buf,
-1000, B_FALSE)) != 0)
+SFXGE_STATS_UPDATE_PERIOD_MS,
+B_FALSE)) != 0)
goto fail6;
 
if ((rc = efx_mac_drain(enp, B_FALSE)) != 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: r311961 - head/sys/dev/sfxge/common

2017-01-11 Thread Andrew Rybchenko
Author: arybchik
Date: Thu Jan 12 06:29:14 2017
New Revision: 311961
URL: https://svnweb.freebsd.org/changeset/base/311961

Log:
  sfxge(4): do not ignore requested MAC stats update period
  
  Firmware version which takes PERIOD_MS parameter into account is
  required.
  
  Reviewed by:philip
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:  2 days
  Differential Revision:  https://reviews.freebsd.org/D9129

Modified:
  head/sys/dev/sfxge/common/efx_mcdi.c
  head/sys/dev/sfxge/common/efx_mcdi.h

Modified: head/sys/dev/sfxge/common/efx_mcdi.c
==
--- head/sys/dev/sfxge/common/efx_mcdi.cThu Jan 12 03:34:29 2017
(r311960)
+++ head/sys/dev/sfxge/common/efx_mcdi.cThu Jan 12 06:29:14 2017
(r311961)
@@ -1725,7 +1725,8 @@ static__checkReturn   efx_rc_t
 efx_mcdi_mac_stats(
__inefx_nic_t *enp,
__in_optefsys_mem_t *esmp,
-   __inefx_stats_action_t action)
+   __inefx_stats_action_t action,
+   __inuint16_t period_ms)
 {
efx_mcdi_req_t req;
uint8_t payload[MAX(MC_CMD_MAC_STATS_IN_LEN,
@@ -1750,7 +1751,7 @@ efx_mcdi_mac_stats(
MAC_STATS_IN_PERIODIC_CHANGE, enable | events | disable,
MAC_STATS_IN_PERIODIC_ENABLE, enable | events,
MAC_STATS_IN_PERIODIC_NOEVENT, !events,
-   MAC_STATS_IN_PERIOD_MS, (enable | events) ? 1000 : 0);
+   MAC_STATS_IN_PERIOD_MS, (enable | events) ? period_ms : 0);
 
if (esmp != NULL) {
int bytes = MC_CMD_MAC_NSTATS * sizeof (uint64_t);
@@ -1800,7 +1801,7 @@ efx_mcdi_mac_stats_clear(
 {
efx_rc_t rc;
 
-   if ((rc = efx_mcdi_mac_stats(enp, NULL, EFX_STATS_CLEAR)) != 0)
+   if ((rc = efx_mcdi_mac_stats(enp, NULL, EFX_STATS_CLEAR, 0)) != 0)
goto fail1;
 
return (0);
@@ -1823,7 +1824,7 @@ efx_mcdi_mac_stats_upload(
 * avoid having to pull the statistics buffer into the cache to
 * maintain cumulative statistics.
 */
-   if ((rc = efx_mcdi_mac_stats(enp, esmp, EFX_STATS_UPLOAD)) != 0)
+   if ((rc = efx_mcdi_mac_stats(enp, esmp, EFX_STATS_UPLOAD, 0)) != 0)
goto fail1;
 
return (0);
@@ -1838,7 +1839,7 @@ fail1:
 efx_mcdi_mac_stats_periodic(
__inefx_nic_t *enp,
__inefsys_mem_t *esmp,
-   __inuint16_t period,
+   __inuint16_t period_ms,
__inboolean_t events)
 {
efx_rc_t rc;
@@ -1847,14 +1848,17 @@ efx_mcdi_mac_stats_periodic(
 * The MC DMAs aggregate statistics for our convenience, so we can
 * avoid having to pull the statistics buffer into the cache to
 * maintain cumulative statistics.
-* Huntington uses a fixed 1sec period, so use that on Siena too.
+* Huntington uses a fixed 1sec period.
+* Medford uses a fixed 1sec period before v6.2.1.1033 firmware.
 */
-   if (period == 0)
-   rc = efx_mcdi_mac_stats(enp, NULL, EFX_STATS_DISABLE);
+   if (period_ms == 0)
+   rc = efx_mcdi_mac_stats(enp, NULL, EFX_STATS_DISABLE, 0);
else if (events)
-   rc = efx_mcdi_mac_stats(enp, esmp, EFX_STATS_ENABLE_EVENTS);
+   rc = efx_mcdi_mac_stats(enp, esmp, EFX_STATS_ENABLE_EVENTS,
+   period_ms);
else
-   rc = efx_mcdi_mac_stats(enp, esmp, EFX_STATS_ENABLE_NOEVENTS);
+   rc = efx_mcdi_mac_stats(enp, esmp, EFX_STATS_ENABLE_NOEVENTS,
+   period_ms);
 
if (rc != 0)
goto fail1;

Modified: head/sys/dev/sfxge/common/efx_mcdi.h
==
--- head/sys/dev/sfxge/common/efx_mcdi.hThu Jan 12 03:34:29 2017
(r311960)
+++ head/sys/dev/sfxge/common/efx_mcdi.hThu Jan 12 06:29:14 2017
(r311961)
@@ -218,7 +218,7 @@ extern  __checkReturn   efx_rc_t
 efx_mcdi_mac_stats_periodic(
__inefx_nic_t *enp,
__inefsys_mem_t *esmp,
-   __inuint16_t period,
+   __inuint16_t period_ms,
__inboolean_t events);
 
 
___
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: r309124 - in head: . contrib/compiler-rt contrib/compiler-rt/include/sanitizer contrib/compiler-rt/lib/asan contrib/compiler-rt/lib/builtins contrib/compiler-rt/lib/builtins/arm contri

2017-01-11 Thread Conrad Meyer
More context and fix here:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214654

Best,
Conrad

On Wed, Jan 11, 2017 at 6:35 PM, Conrad Meyer  wrote:
> This appears to have broken Chromium[0]:
>
> FAILED: obj/services/ui/ws/lib/window_manager_display_root.o
> clang++39 -MMD -MF
> obj/services/ui/ws/lib/window_manager_display_root.o.d
> -D_LIBCPP_TRIVIAL_PAIR_COPY_CTOR=1 -DV8_DEPRECATION_WARNINGS
> -DENABLE_MDNS=1 -DENABLE_NOTIFICATIONS -DENABLE_PEPPER_CDMS
> -DENABLE_PLUGINS=1 -DENABLE_PDF=1 -DENABLE_PRINTING=1
> -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1
> -DENABLE_SPELLCHECK=1 -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1
> -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_CLIPBOARD_AURAX11=1
> -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1
> -DUSE_X11=1 -DNO_TCMALLOC -DENABLE_WEBRTC=1 -DDISABLE_NACL
> -DENABLE_EXTENSIONS=1 -DENABLE_TASK_MANAGER=1 -DENABLE_THEMES=1
> -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_SESSION_SERVICE=1
> -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1
> -DUSE_PROPRIETARY_CODECS -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD
> -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1
> -DFIELDTRIAL_TESTING_ENABLED -DCR_CLANG_REVISION=278861-1
> -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
> -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2
> -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0
> -DGL_GLEXT_PROTOTYPES -DUSE_GLX -DUSE_EGL -DSK_IGNORE_DW_GRAY_FIX
> -DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DSK_SUPPORT_GPU=1
> -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_NOEXCEPT=
> -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE
> -I../.. -Igen -I/usr/local/include/glib-2.0
> -I/usr/local/lib/glib-2.0/include -I/usr/local/include
> -Igen/shim_headers/harfbuzz_shim -I../../third_party/khronos
> -I../../gpu -I../../skia/config -I../../skia/ext
> -I../../third_party/skia/include/c
> -I../../third_party/skia/include/config
> -I../../third_party/skia/include/core
> -I../../third_party/skia/include/effects
> -I../../third_party/skia/include/images
> -I../../third_party/skia/include/lazy
> -I../../third_party/skia/include/pathops
> -I../../third_party/skia/include/pdf
> -I../../third_party/skia/include/pipe
> -I../../third_party/skia/include/ports
> -I../../third_party/skia/include/utils
> -I../../third_party/skia/include/gpu -I../../third_party/skia/src/gpu
> -I../../third_party/icu/source/common
> -I../../third_party/icu/source/i18n
> -I../../third_party/mesa/src/include -fno-strict-aliasing
> --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fPIC
> -pipe -fcolor-diagnostics
> -fdebug-prefix-map=/wrkdirs/usr/ports/www/chromium/work/chromium-54.0.2840.100=.
> -pthread -m64 -march=x86-64 -Wall -Wextra
> -Wno-missing-field-initializers -Wno-unused-parameter
> -Wno-c++11-narrowing -Wno-covered-switch-default
> -Wno-deprecated-register -Wno-unneeded-internal-declaration
> -Wno-inconsistent-missing-override -Wno-shift-negative-value
> -Wno-undefined-var-template -Wno-nonportable-include-path -O2
> -fno-ident -fdata-sections -ffunction-sections -g0 -fvisibility=hidden
> -Wheader-hygiene -Wstring-conversion -fno-threadsafe-statics
> -fvisibility-inlines-hidden -std=gnu++11 -fno-rtti -fno-exceptions -c
> ../../services/ui/ws/window_manager_display_root.cc -o
> obj/services/ui/ws/lib/window_manager_display_root.o
> In file included from ../../services/ui/ws/window_manager_display_root.cc:5:
> In file included from ../../services/ui/ws/window_manager_display_root.h:10:
> In file included from /usr/include/c++/v1/memory:599:
> /usr/include/c++/v1/__config:58:2: error:
> "_LIBCPP_TRIVIAL_PAIR_COPY_CTOR" is no longer supported.use
> _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR instead
> #error "_LIBCPP_TRIVIAL_PAIR_COPY_CTOR" is no longer supported. \
>  ^
> 1 error generated.
>
>
> contrib/libc++/include/__config:
> 309124dim #ifdef _LIBCPP_TRIVIAL_PAIR_COPY_CTOR
> 309124dim #error "_LIBCPP_TRIVIAL_PAIR_COPY_CTOR" is no longer
> supported. \
> 309124dimuse
> _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR instead
> 309124dim #endif
>
> Best,
> Conrad
>
>
> [0]: 
> http://beefy12.nyi.freebsd.org/data/head-amd64-default/p431044_s311844/logs/errors/chromium-54.0.2840.100_1.log
> (warning: BIG)
>
> On Thu, Nov 24, 2016 at 2:54 PM, Dimitry Andric  wrote:
>> Author: dim
>> Date: Thu Nov 24 22:54:55 2016
>> New Revision: 309124
>> URL: https://svnweb.freebsd.org/changeset/base/309124
>>
>> Log:
>>   Upgrade our copies of clang, llvm, lldb, compiler-rt and libc++ to 3.9.0
>>   release, and add lld 3.9.0.  Also completely revamp the build system for
>>   clang, llvm, lldb and their related tools.
>>
>>   Please note that from 3.5.0 onwards, clang, llvm and lldb require C++11
>>   support to build; see UPDATING for more information.
>>
>>   Release notes for llvm, clang and lld are available here:
>>   

svn commit: r311960 - stable/11/sys/dev/hwpmc

2017-01-11 Thread George V. Neville-Neil
Author: gnn
Date: Thu Jan 12 03:34:29 2017
New Revision: 311960
URL: https://svnweb.freebsd.org/changeset/base/311960

Log:
  MFC 311224
  
  Fix PMC architecture check to handle later IPAs including Skylake
  Tested with tools/test/hwpmc/pmctest.py
  
  Obtained from:Oliver Pinter

Modified:
  stable/11/sys/dev/hwpmc/hwpmc_core.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/hwpmc/hwpmc_core.c
==
--- stable/11/sys/dev/hwpmc/hwpmc_core.cThu Jan 12 01:20:51 2017
(r311959)
+++ stable/11/sys/dev/hwpmc/hwpmc_core.cThu Jan 12 03:34:29 2017
(r311960)
@@ -2857,7 +2857,7 @@ pmc_core_initialize(struct pmc_mdep *md,
PMCDBG3(MDP,INI,1,"core-init cputype=%d ncpu=%d ipa-version=%d",
core_cputype, maxcpu, ipa_version);
 
-   if (ipa_version < 1 || ipa_version > 3 ||
+   if (ipa_version < 1 || ipa_version > 4 ||
(core_cputype != PMC_CPU_INTEL_CORE && ipa_version == 1)) {
/* Unknown PMC architecture. */
printf("hwpc_core: unknown PMC architecture: %d\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: r311959 - in stable/10/sys: compat/freebsd32 kern

2017-01-11 Thread Konstantin Belousov
Author: kib
Date: Thu Jan 12 01:20:51 2017
New Revision: 311959
URL: https://svnweb.freebsd.org/changeset/base/311959

Log:
  MFC r311447:
  Some style fixes for getfstat(2)-related code.

Modified:
  stable/10/sys/compat/freebsd32/freebsd32_misc.c
  stable/10/sys/kern/vfs_syscalls.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/compat/freebsd32/freebsd32_misc.c
==
--- stable/10/sys/compat/freebsd32/freebsd32_misc.c Thu Jan 12 01:13:05 
2017(r311958)
+++ stable/10/sys/compat/freebsd32/freebsd32_misc.c Thu Jan 12 01:20:51 
2017(r311959)
@@ -244,7 +244,8 @@ copy_statfs(struct statfs *in, struct st
 
 #ifdef COMPAT_FREEBSD4
 int
-freebsd4_freebsd32_getfsstat(struct thread *td, struct 
freebsd4_freebsd32_getfsstat_args *uap)
+freebsd4_freebsd32_getfsstat(struct thread *td,
+struct freebsd4_freebsd32_getfsstat_args *uap)
 {
struct statfs *buf, *sp;
struct statfs32 stat32;

Modified: stable/10/sys/kern/vfs_syscalls.c
==
--- stable/10/sys/kern/vfs_syscalls.c   Thu Jan 12 01:13:05 2017
(r311958)
+++ stable/10/sys/kern/vfs_syscalls.c   Thu Jan 12 01:20:51 2017
(r311959)
@@ -464,7 +464,7 @@ kern_getfsstat(struct thread *td, struct
nmp = TAILQ_NEXT(mp, mnt_list);
continue;
}
-   if (sfsp && count < maxcount) {
+   if (sfsp != NULL && count < maxcount) {
sp = >mnt_stat;
/*
 * Set these in case the underlying filesystem
@@ -509,7 +509,7 @@ kern_getfsstat(struct thread *td, struct
vfs_unbusy(mp);
}
mtx_unlock(_mtx);
-   if (sfsp && count > maxcount)
+   if (sfsp != NULL && count > maxcount)
td->td_retval[0] = maxcount;
else
td->td_retval[0] = count;
___
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: r311950 - head/sys/contrib/ipfilter/netinet

2017-01-11 Thread John Baldwin
On Thursday, January 12, 2017 12:01:02 AM Bjoern A. Zeeb wrote:
> Author: bz
> Date: Thu Jan 12 00:01:02 2017
> New Revision: 311950
> URL: https://svnweb.freebsd.org/changeset/base/311950
> 
> Log:
>   Get rid of a compiler warning which I saw too often.
>   Include netinet/in.h before ip_compat.t which will then check if
>   IPPROTO_IPIP is defined or not.  Doing it the other way round,
>   ip_compat.h would not find it defined and netinet/in.h then
>   redefine it.

Thank you!

-- 
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: r311958 - in head/sys/dev: mpr mps

2017-01-11 Thread Scott Long
Author: scottl
Date: Thu Jan 12 01:13:05 2017
New Revision: 311958
URL: https://svnweb.freebsd.org/changeset/base/311958

Log:
  Print out the number of queues/MSIx vectors.
  
  Sponsored by: Netflix

Modified:
  head/sys/dev/mpr/mpr_table.c
  head/sys/dev/mps/mps_table.c

Modified: head/sys/dev/mpr/mpr_table.c
==
--- head/sys/dev/mpr/mpr_table.cThu Jan 12 01:09:15 2017
(r311957)
+++ head/sys/dev/mpr/mpr_table.cThu Jan 12 01:13:05 2017
(r311958)
@@ -209,6 +209,7 @@ mpr_print_iocfacts(struct mpr_softc *sc,
mpr_dprint_field(sc, MPR_XINFO, "WhoInit: %s\n",
mpr_describe_table(mpr_whoinit_names, facts->WhoInit));
MPR_PRINTFIELD(sc, facts, NumberOfPorts, %d);
+   MPR_PRINTFIELD(sc, facts, MaxMSIxVectors, %d);
MPR_PRINTFIELD(sc, facts, RequestCredit, %d);
MPR_PRINTFIELD(sc, facts, ProductID, 0x%x);
mpr_dprint_field(sc, MPR_XINFO, "IOCCapabilities: %b\n",

Modified: head/sys/dev/mps/mps_table.c
==
--- head/sys/dev/mps/mps_table.cThu Jan 12 01:09:15 2017
(r311957)
+++ head/sys/dev/mps/mps_table.cThu Jan 12 01:13:05 2017
(r311958)
@@ -208,6 +208,7 @@ mps_print_iocfacts(struct mps_softc *sc,
mps_dprint_field(sc, MPS_XINFO, "WhoInit: %s\n",
mps_describe_table(mps_whoinit_names, facts->WhoInit));
MPS_PRINTFIELD(sc, facts, NumberOfPorts, %d);
+   MPS_PRINTFIELD(sc, facts, MaxMSIxVectors, %d);
MPS_PRINTFIELD(sc, facts, RequestCredit, %d);
MPS_PRINTFIELD(sc, facts, ProductID, 0x%x);
mps_dprint_field(sc, MPS_XINFO, "IOCCapabilities: %b\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: r311957 - in stable/11/sys: compat/freebsd32 compat/linux compat/svr4 fs/nfs fs/nfsserver fs/nullfs fs/unionfs i386/ibcs2 kern sys

2017-01-11 Thread Konstantin Belousov
Author: kib
Date: Thu Jan 12 01:09:15 2017
New Revision: 311957
URL: https://svnweb.freebsd.org/changeset/base/311957

Log:
  MFC r311452:
  Do not allocate struct statfs on kernel stack.

Modified:
  stable/11/sys/compat/freebsd32/freebsd32_misc.c
  stable/11/sys/compat/linux/linux_stats.c
  stable/11/sys/compat/svr4/svr4_misc.c
  stable/11/sys/fs/nfs/nfs_commonsubs.c
  stable/11/sys/fs/nfsserver/nfs_nfsdserv.c
  stable/11/sys/fs/nullfs/null_vfsops.c
  stable/11/sys/fs/unionfs/union_vfsops.c
  stable/11/sys/i386/ibcs2/ibcs2_stat.c
  stable/11/sys/kern/kern_acct.c
  stable/11/sys/kern/vfs_default.c
  stable/11/sys/kern/vfs_mount.c
  stable/11/sys/kern/vfs_syscalls.c
  stable/11/sys/sys/mount.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/compat/freebsd32/freebsd32_misc.c
==
--- stable/11/sys/compat/freebsd32/freebsd32_misc.c Thu Jan 12 01:05:34 
2017(r311956)
+++ stable/11/sys/compat/freebsd32/freebsd32_misc.c Thu Jan 12 01:09:15 
2017(r311957)
@@ -265,7 +265,7 @@ freebsd4_freebsd32_getfsstat(struct thre
uap->buf++;
copycount--;
}
-   free(buf, M_TEMP);
+   free(buf, M_STATFS);
}
if (error == 0)
td->td_retval[0] = count;
@@ -1394,14 +1394,17 @@ int
 freebsd4_freebsd32_statfs(struct thread *td, struct 
freebsd4_freebsd32_statfs_args *uap)
 {
struct statfs32 s32;
-   struct statfs s;
+   struct statfs *sp;
int error;
 
-   error = kern_statfs(td, uap->path, UIO_USERSPACE, );
-   if (error)
-   return (error);
-   copy_statfs(, );
-   return (copyout(, uap->buf, sizeof(s32)));
+   sp = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK);
+   error = kern_statfs(td, uap->path, UIO_USERSPACE, sp);
+   if (error == 0) {
+   copy_statfs(sp, );
+   error = copyout(, uap->buf, sizeof(s32));
+   }
+   free(sp, M_STATFS);
+   return (error);
 }
 #endif
 
@@ -1410,14 +1413,17 @@ int
 freebsd4_freebsd32_fstatfs(struct thread *td, struct 
freebsd4_freebsd32_fstatfs_args *uap)
 {
struct statfs32 s32;
-   struct statfs s;
+   struct statfs *sp;
int error;
 
-   error = kern_fstatfs(td, uap->fd, );
-   if (error)
-   return (error);
-   copy_statfs(, );
-   return (copyout(, uap->buf, sizeof(s32)));
+   sp = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK);
+   error = kern_fstatfs(td, uap->fd, sp);
+   if (error == 0) {
+   copy_statfs(sp, );
+   error = copyout(, uap->buf, sizeof(s32));
+   }
+   free(sp, M_STATFS);
+   return (error);
 }
 #endif
 
@@ -1426,17 +1432,20 @@ int
 freebsd4_freebsd32_fhstatfs(struct thread *td, struct 
freebsd4_freebsd32_fhstatfs_args *uap)
 {
struct statfs32 s32;
-   struct statfs s;
+   struct statfs *sp;
fhandle_t fh;
int error;
 
if ((error = copyin(uap->u_fhp, , sizeof(fhandle_t))) != 0)
return (error);
-   error = kern_fhstatfs(td, fh, );
-   if (error)
-   return (error);
-   copy_statfs(, );
-   return (copyout(, uap->buf, sizeof(s32)));
+   sp = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK);
+   error = kern_fhstatfs(td, fh, sp);
+   if (error == 0) {
+   copy_statfs(sp, );
+   error = copyout(, uap->buf, sizeof(s32));
+   }
+   free(sp, M_STATFS);
+   return (error);
 }
 #endif
 

Modified: stable/11/sys/compat/linux/linux_stats.c
==
--- stable/11/sys/compat/linux/linux_stats.cThu Jan 12 01:05:34 2017
(r311956)
+++ stable/11/sys/compat/linux/linux_stats.cThu Jan 12 01:09:15 2017
(r311957)
@@ -415,7 +415,7 @@ int
 linux_statfs(struct thread *td, struct linux_statfs_args *args)
 {
struct l_statfs linux_statfs;
-   struct statfs bsd_statfs;
+   struct statfs *bsd_statfs;
char *path;
int error;
 
@@ -425,12 +425,13 @@ linux_statfs(struct thread *td, struct l
if (ldebug(statfs))
printf(ARGS(statfs, "%s, *"), path);
 #endif
-   error = kern_statfs(td, path, UIO_SYSSPACE, _statfs);
+   bsd_statfs = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK);
+   error = kern_statfs(td, path, UIO_SYSSPACE, bsd_statfs);
LFREEPATH(path);
-   if (error)
-   return (error);
-   error = bsd_to_linux_statfs(_statfs, _statfs);
-   if (error)
+   if (error == 0)
+   error = bsd_to_linux_statfs(bsd_statfs, _statfs);
+   free(bsd_statfs, M_STATFS);
+   if (error != 0)
return (error);
return (copyout(_statfs, args->buf, sizeof(linux_statfs)));
 }
@@ -456,7 +457,7 @@ int
 

svn commit: r311956 - in stable/11/sys: compat/freebsd32 kern

2017-01-11 Thread Konstantin Belousov
Author: kib
Date: Thu Jan 12 01:05:34 2017
New Revision: 311956
URL: https://svnweb.freebsd.org/changeset/base/311956

Log:
  MFC r311447:
  Some style fixes for getfstat(2)-related code.

Modified:
  stable/11/sys/compat/freebsd32/freebsd32_misc.c
  stable/11/sys/kern/vfs_syscalls.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/compat/freebsd32/freebsd32_misc.c
==
--- stable/11/sys/compat/freebsd32/freebsd32_misc.c Thu Jan 12 00:50:37 
2017(r311955)
+++ stable/11/sys/compat/freebsd32/freebsd32_misc.c Thu Jan 12 01:05:34 
2017(r311956)
@@ -244,7 +244,8 @@ copy_statfs(struct statfs *in, struct st
 
 #ifdef COMPAT_FREEBSD4
 int
-freebsd4_freebsd32_getfsstat(struct thread *td, struct 
freebsd4_freebsd32_getfsstat_args *uap)
+freebsd4_freebsd32_getfsstat(struct thread *td,
+struct freebsd4_freebsd32_getfsstat_args *uap)
 {
struct statfs *buf, *sp;
struct statfs32 stat32;

Modified: stable/11/sys/kern/vfs_syscalls.c
==
--- stable/11/sys/kern/vfs_syscalls.c   Thu Jan 12 00:50:37 2017
(r311955)
+++ stable/11/sys/kern/vfs_syscalls.c   Thu Jan 12 01:05:34 2017
(r311956)
@@ -476,7 +476,7 @@ restart:
continue;
}
}
-   if (sfsp && count < maxcount) {
+   if (sfsp != NULL && count < maxcount) {
sp = >mnt_stat;
/*
 * Set these in case the underlying filesystem
@@ -521,7 +521,7 @@ restart:
vfs_unbusy(mp);
}
mtx_unlock(_mtx);
-   if (sfsp && count > maxcount)
+   if (sfsp != NULL && count > maxcount)
*countp = maxcount;
else
*countp = count;
___
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: r311955 - stable/11/sys/netinet

2017-01-11 Thread Hiren Panchasara
Author: hiren
Date: Thu Jan 12 00:50:37 2017
New Revision: 311955
URL: https://svnweb.freebsd.org/changeset/base/311955

Log:
  MFC r311453
  
  sysctl net.inet.tcp.hostcache.list in a jail can see connections from other
  jails and the host. This commit fixes it.
  
  PR:   200361

Modified:
  stable/11/sys/netinet/tcp_hostcache.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/netinet/tcp_hostcache.c
==
--- stable/11/sys/netinet/tcp_hostcache.c   Thu Jan 12 00:48:06 2017
(r311954)
+++ stable/11/sys/netinet/tcp_hostcache.c   Thu Jan 12 00:50:37 2017
(r311955)
@@ -69,10 +69,12 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -623,6 +625,9 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS)
char ip6buf[INET6_ADDRSTRLEN];
 #endif
 
+   if (jailed_without_vnet(curthread->td_ucred) != 0)
+   return (EPERM);
+
sbuf_new(, NULL, linesize * (V_tcp_hostcache.cache_count + 1),
SBUF_INCLUDENUL);
 
___
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: r311954 - in head: lib/libc/gen share/man/man4 sys/kern sys/sys

2017-01-11 Thread Ian Lepore
Author: ian
Date: Thu Jan 12 00:48:06 2017
New Revision: 311954
URL: https://svnweb.freebsd.org/changeset/base/311954

Log:
  Rework tty_drain() to poll the hardware for completion, and restore
  drain timeout handling to historical freebsd behavior.
  
  The primary reason for these changes is the need to have tty_drain() call
  ttydevsw_busy() at some reasonable sub-second rate, to poll hardware that
  doesn't signal an interrupt when the transmit shift register becomes empty
  (which includes virtually all USB serial hardware).  Such hardware hangs
  in a ttyout wait, because it never gets an opportunity to trigger a wakeup
  from the sleep in tty_drain() by calling ttydisc_getc() again, after
  handing the last of the buffered data to the hardware.
  
  While researching the history of changes to tty_drain() I stumbled across
  some email describing the historical BSD behavior of tcdrain() and close()
  on serial ports, and the ability of comcontrol(1) to control timeout
  behavior.  Using that and some advice from Bruce Evans as a guide, I've
  put together these changes to implement the hardware polling and restore
  the historical timeout behaviors...
  
   - tty_drain() now calls ttydevsw_busy() in a loop at 10 Hz to accomodate
 hardware that requires polling for busy state.
  
   - The "new historical" behavior for draining during close(2) is retained:
 the drain timeout is "1 second without making any progress".  When the
 1-second timeout expires, if the count of bytes remaining in the tty
 layer buffer is smaller than last time, the timeout is extended for
 another second.  Unfortunately, the same logic cannot be extended all
 the way down to the hardware, because the interface to that layer is a
 simple busy/not-busy indication.
  
   - Due to the previous point, an application that needs a guarantee that
 all data has been transmitted must use TIOCDRAIN/tcdrain(3) before
 calling close(2).
  
   - The historical behavior of honoring the drainwait setting for TIOCDRAIN
 (used by tcdrain(3)) is restored.
  
   - The historical kern.drainwait sysctl to control the global default
 drainwait time is restored, but is now named kern.tty_drainwait.
  
   - The historical default drainwait timeout of 300 seconds is restored.
  
   - Handling of TIOCGDRAINWAIT and TIOCSDRAINWAIT ioctls is restored
 (this also makes the comcontrol(1) drainwait verb work again).
  
   - Manpages are updated to document these behaviors.
  
  Reviewed by:  bde (prior version)

Modified:
  head/lib/libc/gen/tcsendbreak.3
  head/share/man/man4/tty.4
  head/sys/kern/tty.c
  head/sys/sys/tty.h

Modified: head/lib/libc/gen/tcsendbreak.3
==
--- head/lib/libc/gen/tcsendbreak.3 Thu Jan 12 00:34:37 2017
(r311953)
+++ head/lib/libc/gen/tcsendbreak.3 Thu Jan 12 00:48:06 2017
(r311954)
@@ -28,7 +28,7 @@
 .\"@(#)tcsendbreak.3   8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd June 4, 1993
+.Dd January 11, 2017
 .Dt TCSENDBREAK 3
 .Os
 .Sh NAME
@@ -137,17 +137,44 @@ is not a terminal.
 A signal interrupted the
 .Fn tcdrain
 function.
+.It Bq Er EWOULDBLOCK
+The configured timeout expired before the
+.Fn tcdrain
+function could write all buffered output.
 .El
 .Sh SEE ALSO
 .Xr tcsetattr 3 ,
-.Xr termios 4
+.Xr termios 4 ,
+.Xr tty 4 ,
+.Xr comcontrol 8
 .Sh STANDARDS
 The
 .Fn tcsendbreak ,
-.Fn tcdrain ,
 .Fn tcflush
 and
 .Fn tcflow
 functions are expected to be compliant with the
 .St -p1003.1-88
 specification.
+.Pp
+The
+.Fn tcdrain
+function is expected to be compliant with
+.St -p1003.1-88
+when the drain wait value is set to zero with
+.Xr comcontrol 8 ,
+or with
+.Xr ioctl 2
+.Va TIOCSDRAINWAIT ,
+or with
+.Xr sysctl 8
+.Va kern.tty_drainwait .
+A non-zero drain wait value can result in
+.Fn tcdrain
+returning
+.Va EWOULDBLOCK
+without writing all output.
+The default value for
+.Va kern.tty_drainwait
+is 300 seconds.
+

Modified: head/share/man/man4/tty.4
==
--- head/share/man/man4/tty.4   Thu Jan 12 00:34:37 2017(r311953)
+++ head/share/man/man4/tty.4   Thu Jan 12 00:48:06 2017(r311954)
@@ -28,7 +28,7 @@
 .\" @(#)tty.4  8.3 (Berkeley) 4/19/94
 .\" $FreeBSD$
 .\"
-.Dd December 26, 2009
+.Dd January 11, 2017
 .Dt TTY 4
 .Os
 .Sh NAME
@@ -238,7 +238,16 @@ Start output on the terminal (like typin
 Make the terminal the controlling terminal for the process (the process
 must not currently have a controlling terminal).
 .It Dv TIOCDRAIN Fa void
-Wait until all output is drained.
+Wait until all output is drained, or until the drain wait timeout expires.
+.It Dv TIOCGDRAINWAIT Fa int *timeout
+Return the current drain wait timeout in seconds.
+.It Dv TIOCSDRAINWAIT Fa int *timeout
+Set the drain wait timeout in seconds.
+A value of zero disables timeouts.
+The default drain wait 

svn commit: r311953 - head/usr.sbin/pciconf

2017-01-11 Thread Conrad E. Meyer
Author: cem
Date: Thu Jan 12 00:34:37 2017
New Revision: 311953
URL: https://svnweb.freebsd.org/changeset/base/311953

Log:
  pciconf(8): Reallow trailing colon in selectors
  
  Reallow device selectors to have a trailing colon, as documented in the
  manual page.  This was broken along with some unrelated cleanups in
  r295806.
  
  PR:   215979
  Reported by:  David Boyd 
  Sponsored by: Dell EMC Isilon

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

Modified: head/usr.sbin/pciconf/pciconf.c
==
--- head/usr.sbin/pciconf/pciconf.c Thu Jan 12 00:22:36 2017
(r311952)
+++ head/usr.sbin/pciconf/pciconf.c Thu Jan 12 00:34:37 2017
(r311953)
@@ -917,11 +917,8 @@ parsesel(const char *str)
while (isdigit(*ep) && i < 4) {
selarr[i++] = strtoul(ep, , 10);
ep = eppos;
-   if (*ep == ':') {
+   if (*ep == ':')
ep++;
-   if (*ep  == '\0')
-   i = 0;
-   }
}
if (i > 0 && *ep == '\0') {
sel.pc_func = (i > 2) ? selarr[--i] : 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: r311952 - head/sys/ddb

2017-01-11 Thread Mark Johnston
Author: markj
Date: Thu Jan 12 00:22:36 2017
New Revision: 311952
URL: https://svnweb.freebsd.org/changeset/base/311952

Log:
  Enable the use of ^C and ^S/^Q in DDB.
  
  This lets one interrupt DDB's output, which is useful if paging is
  disabled and the output device is slow.
  
  Submitted by: Anton Rang 
  Reviewed by:  jhb
  MFC after:1 week
  Differential Revision:https://reviews.freebsd.org/D9138

Modified:
  head/sys/ddb/db_input.c

Modified: head/sys/ddb/db_input.c
==
--- head/sys/ddb/db_input.c Thu Jan 12 00:09:31 2017(r311951)
+++ head/sys/ddb/db_input.c Thu Jan 12 00:22:36 2017(r311952)
@@ -63,7 +63,6 @@ static intdb_lhist_nlines;
 #defineBLANK   ' '
 #defineBACKUP  '\b'
 
-static int cnmaygetc(void);
 static voiddb_delete(int n, int bwd);
 static int db_inputchar(int c);
 static voiddb_putnchars(int c, int count);
@@ -291,12 +290,6 @@ db_inputchar(c)
return (0);
 }
 
-static int
-cnmaygetc()
-{
-   return (-1);
-}
-
 int
 db_readline(lstart, lsize)
char *  lstart;
@@ -350,7 +343,7 @@ db_check_interrupt(void)
 {
int c;
 
-   c = cnmaygetc();
+   c = cncheckc();
switch (c) {
case -1:/* no character */
return;
@@ -361,7 +354,7 @@ db_check_interrupt(void)
 
case CTRL('s'):
do {
-   c = cnmaygetc();
+   c = cncheckc();
if (c == CTRL('c'))
db_error((char *)0);
} while (c != CTRL('q'));
___
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: r311951 - head/sys/dev/sdhci

2017-01-11 Thread Ian Lepore
Author: ian
Date: Thu Jan 12 00:09:31 2017
New Revision: 311951
URL: https://svnweb.freebsd.org/changeset/base/311951

Log:
  Include sys/systm.h for use of bootverbose. Fixes powerpc MPC85XXSPE build.

Modified:
  head/sys/dev/sdhci/sdhci_fdt_gpio.c

Modified: head/sys/dev/sdhci/sdhci_fdt_gpio.c
==
--- head/sys/dev/sdhci/sdhci_fdt_gpio.c Thu Jan 12 00:01:02 2017
(r311950)
+++ head/sys/dev/sdhci/sdhci_fdt_gpio.c Thu Jan 12 00:09:31 2017
(r311951)
@@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
___
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: r311950 - head/sys/contrib/ipfilter/netinet

2017-01-11 Thread Bjoern A. Zeeb
Author: bz
Date: Thu Jan 12 00:01:02 2017
New Revision: 311950
URL: https://svnweb.freebsd.org/changeset/base/311950

Log:
  Get rid of a compiler warning which I saw too often.
  Include netinet/in.h before ip_compat.t which will then check if
  IPPROTO_IPIP is defined or not.  Doing it the other way round,
  ip_compat.h would not find it defined and netinet/in.h then
  redefine it.

Modified:
  head/sys/contrib/ipfilter/netinet/ip_fil.h

Modified: head/sys/contrib/ipfilter/netinet/ip_fil.h
==
--- head/sys/contrib/ipfilter/netinet/ip_fil.h  Wed Jan 11 23:48:17 2017
(r311949)
+++ head/sys/contrib/ipfilter/netinet/ip_fil.h  Thu Jan 12 00:01:02 2017
(r311950)
@@ -11,6 +11,10 @@
 #ifndef__IP_FIL_H__
 #define__IP_FIL_H__
 
+#if !defined(linux) || !defined(_KERNEL)
+# include 
+#endif
+
 #include "netinet/ip_compat.h"
 #include "netinet/ipf_rb.h"
 #if NETBSD_GE_REV(10404)
@@ -24,10 +28,6 @@
 # endif
 #endif
 
-#if !defined(linux) || !defined(_KERNEL)
-# include 
-#endif
-
 #ifndefSOLARIS
 # if defined(sun) && (defined(__svr4__) || defined(__SVR4))
 #  define  SOLARIS 1
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r311949 - head/sys/dev/cxgbe/tom

2017-01-11 Thread Navdeep Parhar
Author: np
Date: Wed Jan 11 23:48:17 2017
New Revision: 311949
URL: https://svnweb.freebsd.org/changeset/base/311949

Log:
  cxgbe/tom: Add VIMAGE support to the TOE driver.
  
  Active Open:
  - Save the socket's vnet at the time of the active open (t4_connect) and
switch to it when processing the reply (do_act_open_rpl or
do_act_establish).
  
  Passive Open:
  - Save the listening socket's vnet in the driver's listen_ctx and switch
to it when processing incoming SYNs for the socket.
  - Reject SYNs that arrive on an ifnet that's not in the same vnet as the
listening socket.
  
  CLIP (Compressed Local IPv6) table:
  - Add only those IPv6 addresses to the CLIP that are in a vnet
associated with one of the card's ifnets.
  
  Misc:
  - Set vnet from the toepcb when processing TCP state transitions.
  - The kernel sets the vnet when calling the driver's output routine
so t4_push_frames runs in proper vnet context already.  One exception
is when incoming credits trigger tx within the driver's ithread.  Set
the vnet explicitly in do_fw4_ack for that case.
  
  MFC after:3 days
  Sponsored by: Chelsio Communications

Modified:
  head/sys/dev/cxgbe/tom/t4_connect.c
  head/sys/dev/cxgbe/tom/t4_cpl_io.c
  head/sys/dev/cxgbe/tom/t4_ddp.c
  head/sys/dev/cxgbe/tom/t4_listen.c
  head/sys/dev/cxgbe/tom/t4_tom.c
  head/sys/dev/cxgbe/tom/t4_tom.h

Modified: head/sys/dev/cxgbe/tom/t4_connect.c
==
--- head/sys/dev/cxgbe/tom/t4_connect.c Wed Jan 11 23:32:40 2017
(r311948)
+++ head/sys/dev/cxgbe/tom/t4_connect.c Wed Jan 11 23:48:17 2017
(r311949)
@@ -126,6 +126,7 @@ do_act_establish(struct sge_iq *iq, cons
CTR3(KTR_CXGBE, "%s: atid %u, tid %u", __func__, atid, tid);
free_atid(sc, atid);
 
+   CURVNET_SET(toep->vnet);
INP_WLOCK(inp);
toep->tid = tid;
insert_tid(sc, tid, toep, inp->inp_vflag & INP_IPV6 ? 2 : 1);
@@ -141,6 +142,7 @@ do_act_establish(struct sge_iq *iq, cons
make_established(toep, cpl->snd_isn, cpl->rcv_isn, cpl->tcp_opt);
 done:
INP_WUNLOCK(inp);
+   CURVNET_RESTORE();
return (0);
 }
 
@@ -178,6 +180,7 @@ act_open_failure_cleanup(struct adapter 
free_atid(sc, atid);
toep->tid = -1;
 
+   CURVNET_SET(toep->vnet);
if (status != EAGAIN)
INP_INFO_RLOCK(_tcbinfo);
INP_WLOCK(inp);
@@ -185,6 +188,7 @@ act_open_failure_cleanup(struct adapter 
final_cpl_received(toep);   /* unlocks inp */
if (status != EAGAIN)
INP_INFO_RUNLOCK(_tcbinfo);
+   CURVNET_RESTORE();
 }
 
 /*
@@ -360,6 +364,7 @@ t4_connect(struct toedev *tod, struct so
if (wr == NULL)
DONT_OFFLOAD_ACTIVE_OPEN(ENOMEM);
 
+   toep->vnet = so->so_vnet;
if (sc->tt.ddp && (so->so_options & SO_NO_DDP) == 0)
set_tcpddp_ulp_mode(toep);
else

Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c
==
--- head/sys/dev/cxgbe/tom/t4_cpl_io.c  Wed Jan 11 23:32:40 2017
(r311948)
+++ head/sys/dev/cxgbe/tom/t4_cpl_io.c  Wed Jan 11 23:48:17 2017
(r311949)
@@ -306,7 +306,6 @@ make_established(struct toepcb *toep, ui
uint16_t tcpopt = be16toh(opt);
struct flowc_tx_params ftxp;
 
-   CURVNET_SET(so->so_vnet);
INP_WLOCK_ASSERT(inp);
KASSERT(tp->t_state == TCPS_SYN_SENT ||
tp->t_state == TCPS_SYN_RECEIVED,
@@ -357,7 +356,6 @@ make_established(struct toepcb *toep, ui
send_flowc_wr(toep, );
 
soisconnected(so);
-   CURVNET_RESTORE();
 }
 
 static int
@@ -1146,6 +1144,7 @@ do_peer_close(struct sge_iq *iq, const s
 
KASSERT(toep->tid == tid, ("%s: toep tid mismatch", __func__));
 
+   CURVNET_SET(toep->vnet);
INP_INFO_RLOCK(_tcbinfo);
INP_WLOCK(inp);
tp = intotcpcb(inp);
@@ -1191,6 +1190,7 @@ do_peer_close(struct sge_iq *iq, const s
tcp_twstart(tp);
INP_UNLOCK_ASSERT(inp);  /* safe, we have a ref on the inp */
INP_INFO_RUNLOCK(_tcbinfo);
+   CURVNET_RESTORE();
 
INP_WLOCK(inp);
final_cpl_received(toep);
@@ -1203,6 +1203,7 @@ do_peer_close(struct sge_iq *iq, const s
 done:
INP_WUNLOCK(inp);
INP_INFO_RUNLOCK(_tcbinfo);
+   CURVNET_RESTORE();
return (0);
 }
 
@@ -1229,6 +1230,7 @@ do_close_con_rpl(struct sge_iq *iq, cons
KASSERT(m == NULL, ("%s: wasn't expecting payload", __func__));
KASSERT(toep->tid == tid, ("%s: toep tid mismatch", __func__));
 
+   CURVNET_SET(toep->vnet);
INP_INFO_RLOCK(_tcbinfo);
INP_WLOCK(inp);
tp = intotcpcb(inp);
@@ -1248,6 +1250,7 @@ do_close_con_rpl(struct sge_iq *iq, cons
 release:
INP_UNLOCK_ASSERT(inp); /* safe, we have a ref on the  inp */
 

svn commit: r311948 - head/sys/dev/rtwn/rtl8192c

2017-01-11 Thread Andriy Voskoboinyk
Author: avos
Date: Wed Jan 11 23:32:40 2017
New Revision: 311948
URL: https://svnweb.freebsd.org/changeset/base/311948

Log:
  rtwn: fix R92C_TXDW4_RTSRATE_M definition (0x3f -> 0x1f)
  
  Submitted by: kevlo

Modified:
  head/sys/dev/rtwn/rtl8192c/r92c_tx_desc.h

Modified: head/sys/dev/rtwn/rtl8192c/r92c_tx_desc.h
==
--- head/sys/dev/rtwn/rtl8192c/r92c_tx_desc.h   Wed Jan 11 23:05:29 2017
(r311947)
+++ head/sys/dev/rtwn/rtl8192c/r92c_tx_desc.h   Wed Jan 11 23:32:40 2017
(r311948)
@@ -68,7 +68,7 @@ struct r92c_tx_desc {
uint16_ttxdseq;
 
uint32_ttxdw4;
-#define R92C_TXDW4_RTSRATE_M   0x003f
+#define R92C_TXDW4_RTSRATE_M   0x001f
 #define R92C_TXDW4_RTSRATE_S   0
 #define R92C_TXDW4_SEQ_SEL_M   0x0040
 #define R92C_TXDW4_SEQ_SEL_S   6
___
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: r311947 - head/usr.bin/rpcgen

2017-01-11 Thread Pedro F. Giffuni
Author: pfg
Date: Wed Jan 11 23:05:29 2017
New Revision: 311947
URL: https://svnweb.freebsd.org/changeset/base/311947

Log:
  rpcgen(1): Avoid unused variable warning on generated code.
  
  Avoid "unused variable 'i'" warnings in generated .c files by only
  emitting the "int i;" for non-opaque arrays. Opaque arrays use
  xdr_opaque() rather than iterating over the array.
  
  Obtained from:OpenBSD (CVS rev 1.28)
  MFC after:1 week

Modified:
  head/usr.bin/rpcgen/rpc_cout.c

Modified: head/usr.bin/rpcgen/rpc_cout.c
==
--- head/usr.bin/rpcgen/rpc_cout.c  Wed Jan 11 22:54:04 2017
(r311946)
+++ head/usr.bin/rpcgen/rpc_cout.c  Wed Jan 11 23:05:29 2017
(r311947)
@@ -551,7 +551,8 @@ emit_struct(definition *def)
}
 
for (dl = def->def.st.decls; dl != NULL; dl = dl->next)
-   if (dl->decl.rel == REL_VECTOR){
+   if (dl->decl.rel == REL_VECTOR &&
+   strcmp(dl->decl.type, "opaque") != 0){
f_print(fout, "\tint i;\n");
break;
}
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r311946 - head/contrib/elftoolchain/libelftc

2017-01-11 Thread Ed Maste
Author: emaste
Date: Wed Jan 11 22:54:04 2017
New Revision: 311946
URL: https://svnweb.freebsd.org/changeset/base/311946

Log:
  readelf: add S390 relocation types
  
  From https://refspecs.linuxfoundation.org/ELF/zSeries/lzsabi0_zSeries.html
  
  Reviewed by:  bz
  MFC after:1 month
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D9149

Modified:
  head/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c

Modified: head/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c
==
--- head/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c   Wed Jan 11 
22:50:57 2017(r311945)
+++ head/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c   Wed Jan 11 
22:54:04 2017(r311946)
@@ -664,6 +664,37 @@ elftc_reloc_type_str(unsigned int mach, 
case 48: return "R_RISCV_GPREL_S";
}
break;
+   case EM_S390:
+   switch (type) {
+   case 0: return "R_390_NONE";
+   case 1: return "R_390_8";
+   case 2: return "R_390_12";
+   case 3: return "R_390_16";
+   case 4: return "R_390_32";
+   case 5: return "R_390_PC32";
+   case 6: return "R_390_GOT12";
+   case 7: return "R_390_GOT32";
+   case 8: return "R_390_PLT32";
+   case 9: return "R_390_COPY";
+   case 10: return "R_390_GLOB_DAT";
+   case 11: return "R_390_JMP_SLOT";
+   case 12: return "R_390_RELATIVE";
+   case 13: return "R_390_GOTOFF";
+   case 14: return "R_390_GOTPC";
+   case 15: return "R_390_GOT16";
+   case 16: return "R_390_PC16";
+   case 17: return "R_390_PC16DBL";
+   case 18: return "R_390_PLT16DBL";
+   case 19: return "R_390_PC32DBL";
+   case 20: return "R_390_PLT32DBL";
+   case 21: return "R_390_GOTPCDBL";
+   case 22: return "R_390_64";
+   case 23: return "R_390_PC64";
+   case 24: return "R_390_GOT64";
+   case 25: return "R_390_PLT64";
+   case 26: return "R_390_GOTENT";
+   }
+   break;
case EM_SPARC:
case EM_SPARCV9:
switch(type) {
___
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: r311945 - head/usr.bin/fortune/fortune

2017-01-11 Thread Colin Percival
Author: cperciva
Date: Wed Jan 11 22:50:57 2017
New Revision: 311945
URL: https://svnweb.freebsd.org/changeset/base/311945

Log:
  Remove obsolete path from fortune(6).  This was inadvertantly left over
  when fortune and other games moved from /usr/games to /usr/bin; I am
  removing rather than correcting it since we normally do not mention in
  the FILES section the paths to programs in /usr/bin/.
  
  PR:   215962
  Reported by:  Andras Farkas

Modified:
  head/usr.bin/fortune/fortune/fortune.6

Modified: head/usr.bin/fortune/fortune/fortune.6
==
--- head/usr.bin/fortune/fortune/fortune.6  Wed Jan 11 22:10:56 2017
(r311944)
+++ head/usr.bin/fortune/fortune/fortune.6  Wed Jan 11 22:50:57 2017
(r311945)
@@ -176,7 +176,6 @@ it was up to on disk.
 .El
 .Sh FILES
 .Bl -tag -width ".Pa /usr/share/games/fortune/*"
-.It Pa /usr/games/fortune
 .It Pa /usr/share/games/fortune/*
 the fortunes databases (those files ending
 .Dq Pa -o
___
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: r311929 - head/sys/boot/common

2017-01-11 Thread Dimitry Andric
On 11 Jan 2017, at 23:32, Ngie Cooper  wrote:
> 
> On Wed, Jan 11, 2017 at 2:10 PM, Dimitry Andric  wrote:
> 
> ...
> 
>> The line:
>> 
>>extern int errno;
>> 
>> expanded to:
>> 
>>extern int (* __error());
>> 
>> which is a declaration of an external function pointer called __error
>> (albeit with an empty parameter list).  Since nobody actually refers to
>> this symbol in libstand, there are no later complaints.
>> 
>> Interestingly, reloc_elf.c does not use errno at all, so I have no idea
>> why the include was originally added.
> 
> This is why:
> 
> 95dd728f5ca86 (iedowse  2004-08-28 23:03:05 + 221) #else
> 95dd728f5ca86 (iedowse  2004-08-28 23:03:05 + 222)  return (EOPNOTSUPP);
> 95dd728f5ca86 (iedowse  2004-08-28 23:03:05 + 223) #endif
> 
> You probably just broke tinderbox on non-x86/-powerpc.

Not very likely, since  includes .

-Dimitry



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r311929 - head/sys/boot/common

2017-01-11 Thread Ngie Cooper
On Wed, Jan 11, 2017 at 2:32 PM, Ngie Cooper  wrote:
> On Wed, Jan 11, 2017 at 2:10 PM, Dimitry Andric  wrote:
>
> ...
>
>> The line:
>>
>> extern int errno;
>>
>> expanded to:
>>
>> extern int (* __error());
>>
>> which is a declaration of an external function pointer called __error
>> (albeit with an empty parameter list).  Since nobody actually refers to
>> this symbol in libstand, there are no later complaints.
>>
>> Interestingly, reloc_elf.c does not use errno at all, so I have no idea
>> why the include was originally added.
>
> This is why:
>
> 95dd728f5ca86 (iedowse  2004-08-28 23:03:05 + 221) #else
> 95dd728f5ca86 (iedowse  2004-08-28 23:03:05 + 222)  return (EOPNOTSUPP);
> 95dd728f5ca86 (iedowse  2004-08-28 23:03:05 + 223) #endif

Oh... sparc64's ok too. Talk about #ifdef soup.
Thanks,
-Ngie
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r311929 - head/sys/boot/common

2017-01-11 Thread Ngie Cooper
On Wed, Jan 11, 2017 at 2:10 PM, Dimitry Andric  wrote:

...

> The line:
>
> extern int errno;
>
> expanded to:
>
> extern int (* __error());
>
> which is a declaration of an external function pointer called __error
> (albeit with an empty parameter list).  Since nobody actually refers to
> this symbol in libstand, there are no later complaints.
>
> Interestingly, reloc_elf.c does not use errno at all, so I have no idea
> why the include was originally added.

This is why:

95dd728f5ca86 (iedowse  2004-08-28 23:03:05 + 221) #else
95dd728f5ca86 (iedowse  2004-08-28 23:03:05 + 222)  return (EOPNOTSUPP);
95dd728f5ca86 (iedowse  2004-08-28 23:03:05 + 223) #endif

You probably just broke tinderbox on non-x86/-powerpc.
Cheers,
-Ngie
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r311944 - stable/10/share/misc

2017-01-11 Thread Baptiste Daroussin
Author: bapt
Date: Wed Jan 11 22:10:56 2017
New Revision: 311944
URL: https://svnweb.freebsd.org/changeset/base/311944

Log:
  MFC r311706:
  
  Update pciids to 2017.01.08

Modified:
  stable/10/share/misc/pci_vendors
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/share/misc/pci_vendors
==
--- stable/10/share/misc/pci_vendorsWed Jan 11 22:10:41 2017
(r311943)
+++ stable/10/share/misc/pci_vendorsWed Jan 11 22:10:56 2017
(r311944)
@@ -3,8 +3,8 @@
 #
 #  List of PCI ID's
 #
-#  Version: 2016.11.21
-#  Date:2016-11-21 03:15:01
+#  Version: 2017.01.08
+#  Date:2017-01-08 03:15:02
 #
 #  Maintained by Albert Pool, Martin Mares, and other volunteers from
 #  the PCI ID Project at http://pci-ids.ucw.cz/.
@@ -249,6 +249,7 @@
0014  MegaRAID Tri-Mode SAS3516
1028 1fd4  PERC H745P MX
1d49 0602  ThinkSystem RAID 930-16i 4GB Flash PCIe 12Gb Adapter
+   0015  MegaRAID Tri-Mode SAS3416
0016  MegaRAID Tri-Mode SAS3508
1028 1fc9  PERC H840 Adapter
1028 1fcb  PERC H740P Adapter
@@ -548,6 +549,7 @@
1028 1f53  HBA330 Mini
1028 1fd2  HBA330 MX
1028 1fd3  HBA330 MMZ
+   1bd4 0011  Inspur 12Gb 8i-3008 IT SAS HBA
00ab  SAS3516 Fusion-MPT Tri-Mode RAID On Chip (ROC)
00ac  SAS3416 Fusion-MPT Tri-Mode I/O Controller Chip (IOC)
1d49 0201  ThinkSystem 430-16i SAS/SATA 12Gb HBA
@@ -2201,6 +2203,11 @@
67b9  Vesuvius [Radeon R9 295X2]
67be  Hawaii LE
67c0  Ellesmere [Polaris10]
+   67c4  Ellesmere [Radeon Pro WX 7100]
+   67c7  Ellesmere [Radeon Pro WX 5100]
+   67ca  Ellesmere [Polaris10]
+   67cc  Ellesmere [Polaris10]
+   67cf  Ellesmere [Polaris10]
67df  Ellesmere [Radeon RX 470/480]
1002 0b37  Radeon RX 480
1043 04a8  Radeon RX 480
@@ -2218,6 +2225,7 @@
1787 a480  Radeon RX 480
67e0  Baffin [Polaris11]
67e1  Baffin [Polaris11]
+   67e3  Baffin [Radeon Pro WX 4100]
67e8  Baffin [Polaris11]
67e9  Baffin [Polaris11]
67eb  Baffin [Polaris11]
@@ -2924,6 +2932,12 @@
148c 9380  Radeon R9 380
 # Make naming scheme consistent
174b e308  Radeon R9 380 Nitro 4G D5
+   6980  Polaris12
+   6981  Polaris12
+   6985  Polaris12
+   6986  Polaris12
+   6987  Polaris12
+   699f  Polaris12
700f  RS100 AGP Bridge
7010  RS200/RS250 AGP Bridge
7100  R520 [Radeon X1800 XT]
@@ -5095,6 +5109,7 @@
0675 1704  ISDN Adapter (PCI Bus, D, C)
0675 1707  ISDN Adapter (PCI Bus, DV, W)
10cf 105e  ISDN Adapter (PCI Bus, DV, W)
+   13a0  Transformer Book T101HA-GR030R
 # Should be 1022:9602
9602  AMD RS780/RS880 PCI to PCI bridge (int gfx)
1043 83a2  M4A785TD Motherboard
@@ -10077,6 +10092,7 @@
10c3  GT218 [GeForce 8400 GS Rev. 3]
10c5  GT218 [GeForce 405]
10d8  GT218 [NVS 300]
+   10ef  GP102 HDMI Audio Controller
10f0  GP104 High Definition Audio Controller
1140  GF117M [GeForce 610M/710M/810M/820M / GT 620M/625M/630M/720M]
1019 0799  GeForce 820M
@@ -10620,7 +10636,7 @@
13f1  GM204GL [Quadro M4000]
13f2  GM204GL [Tesla M60]
13f3  GM204GL [Tesla M6]
-   13f8  GM204GLM [Quadro M5000M]
+   13f8  GM204GLM [Quadro M5000M / M5000 SE]
13f9  GM204GLM [Quadro M4000M]
13fa  GM204GLM [Quadro M3000M]
10de 11c9  Quadro M3000 SE
@@ -10634,8 +10650,9 @@
1431  GM206GL [Tesla M4]
15f0  GP100GL
15f1  GP100GL
-   15f8  GP100GL
-   15f9  GP100GL
+   15f7  GP100GL [Tesla P100 PCIe 12GB]
+   15f8  GP100GL [Tesla P100 PCIe 16GB]
+   15f9  GP100GL [Tesla P100 SMX2 16GB]
1617  GM204M [GeForce GTX 980M]
1618  GM204M [GeForce GTX 970M]
1619  GM204M [GeForce GTX 965M]
@@ -10659,10 +10676,12 @@
1b81  GP104 [GeForce GTX 1070]
1b82  GP104
1b83  GP104
+   1b84  GP104 [GeForce GTX 1060 3GB]
1ba0  GP104M [GeForce GTX 1080]
1ba1  GP104M [GeForce GTX 1070]
1bb0  GP104GL [Quadro P5000]
1bb1  GP104GL
+   1bb3  GP104GL [Tesla P4]
1bb4  GP104GL
1be0  GP104M [GeForce GTX 1080]
1be1  GP104M [GeForce GTX 1070]
@@ -10678,6 +10697,9 @@
1c80  GP107
1c81  GP107 [GeForce GTX 1050]
1c82  GP107 [GeForce GTX 1050 Ti]
+   1c8c  GP107M [GeForce GTX 1050 Ti]
+   1c8d  GP107M [GeForce GTX 1050]
+   1c8e  GP107M
1ca7  GP107GL
1ca8  GP107GL
1caa  GP107GL
@@ -12103,7 +12125,11 @@
 111f  Precision Digital Images
4a47  Precision MX Video engine interface
  

Re: svn commit: r311929 - head/sys/boot/common

2017-01-11 Thread Dimitry Andric
On 11 Jan 2017, at 22:42, Ian Lepore  wrote:
> 
> On Wed, 2017-01-11 at 13:35 -0800, Ngie Cooper wrote:
>> On Wed, Jan 11, 2017 at 10:47 AM, Dimitry Andric 
>> wrote:
>>> 
>>> Author: dim
>>> Date: Wed Jan 11 18:47:00 2017
>>> New Revision: 311929
>>> URL: https://svnweb.freebsd.org/changeset/base/311929
>>> 
>>> Log:
>>>   Don't include  in reloc_elf.c, as it includes 
>>> just
>>>   after it, which has a conflicting definition of errno.  This
>>> leads to
>>>   the following warning with clang 4.0.0:
>>> 
>>>   In file included from sys/boot/common/reloc_elf32.c:6:
>>>   In file included from sys/boot/common/reloc_elf.c:37:
>>>   /usr/obj/usr/src/tmp/usr/include/stand.h:155:12: error: this
>>> function declaration is not a prototype [-Werror,-Wstrict-
>>> prototypes]
>>>   extern int errno;
>>>  ^
>>>   sys/sys/errno.h:46:26: note: expanded from macro 'errno'
>>>   #define errno   (* __error())
>> It seems like libstand (once again) should be fixed, not the
>> "offending code".
>> -Ngie
>> 
> 
> In this case it's not the library that's in error.  Libstand is the
> thing that implements errno, so it's the thing that must define it.
> 
> The code that includes both errno.h and libstand.h was wrong.  errno.h
> is a standard header file used with libc, and the loader code doesn't
> link with libc.
> 
> The thing that amazes me is the usual:  how did this ever work with gcc
> 4.2?

The line:

extern int errno;

expanded to:

extern int (* __error());

which is a declaration of an external function pointer called __error
(albeit with an empty parameter list).  Since nobody actually refers to
this symbol in libstand, there are no later complaints.

Interestingly, reloc_elf.c does not use errno at all, so I have no idea
why the include was originally added.

-Dimitry



signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r311943 - stable/11/share/misc

2017-01-11 Thread Baptiste Daroussin
Author: bapt
Date: Wed Jan 11 22:10:41 2017
New Revision: 311943
URL: https://svnweb.freebsd.org/changeset/base/311943

Log:
  MFC r311706:
  
  Update pciids to 2017.01.08

Modified:
  stable/11/share/misc/pci_vendors
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/share/misc/pci_vendors
==
--- stable/11/share/misc/pci_vendorsWed Jan 11 21:28:22 2017
(r311942)
+++ stable/11/share/misc/pci_vendorsWed Jan 11 22:10:41 2017
(r311943)
@@ -3,8 +3,8 @@
 #
 #  List of PCI ID's
 #
-#  Version: 2016.11.21
-#  Date:2016-11-21 03:15:01
+#  Version: 2017.01.08
+#  Date:2017-01-08 03:15:02
 #
 #  Maintained by Albert Pool, Martin Mares, and other volunteers from
 #  the PCI ID Project at http://pci-ids.ucw.cz/.
@@ -249,6 +249,7 @@
0014  MegaRAID Tri-Mode SAS3516
1028 1fd4  PERC H745P MX
1d49 0602  ThinkSystem RAID 930-16i 4GB Flash PCIe 12Gb Adapter
+   0015  MegaRAID Tri-Mode SAS3416
0016  MegaRAID Tri-Mode SAS3508
1028 1fc9  PERC H840 Adapter
1028 1fcb  PERC H740P Adapter
@@ -548,6 +549,7 @@
1028 1f53  HBA330 Mini
1028 1fd2  HBA330 MX
1028 1fd3  HBA330 MMZ
+   1bd4 0011  Inspur 12Gb 8i-3008 IT SAS HBA
00ab  SAS3516 Fusion-MPT Tri-Mode RAID On Chip (ROC)
00ac  SAS3416 Fusion-MPT Tri-Mode I/O Controller Chip (IOC)
1d49 0201  ThinkSystem 430-16i SAS/SATA 12Gb HBA
@@ -2201,6 +2203,11 @@
67b9  Vesuvius [Radeon R9 295X2]
67be  Hawaii LE
67c0  Ellesmere [Polaris10]
+   67c4  Ellesmere [Radeon Pro WX 7100]
+   67c7  Ellesmere [Radeon Pro WX 5100]
+   67ca  Ellesmere [Polaris10]
+   67cc  Ellesmere [Polaris10]
+   67cf  Ellesmere [Polaris10]
67df  Ellesmere [Radeon RX 470/480]
1002 0b37  Radeon RX 480
1043 04a8  Radeon RX 480
@@ -2218,6 +2225,7 @@
1787 a480  Radeon RX 480
67e0  Baffin [Polaris11]
67e1  Baffin [Polaris11]
+   67e3  Baffin [Radeon Pro WX 4100]
67e8  Baffin [Polaris11]
67e9  Baffin [Polaris11]
67eb  Baffin [Polaris11]
@@ -2924,6 +2932,12 @@
148c 9380  Radeon R9 380
 # Make naming scheme consistent
174b e308  Radeon R9 380 Nitro 4G D5
+   6980  Polaris12
+   6981  Polaris12
+   6985  Polaris12
+   6986  Polaris12
+   6987  Polaris12
+   699f  Polaris12
700f  RS100 AGP Bridge
7010  RS200/RS250 AGP Bridge
7100  R520 [Radeon X1800 XT]
@@ -5095,6 +5109,7 @@
0675 1704  ISDN Adapter (PCI Bus, D, C)
0675 1707  ISDN Adapter (PCI Bus, DV, W)
10cf 105e  ISDN Adapter (PCI Bus, DV, W)
+   13a0  Transformer Book T101HA-GR030R
 # Should be 1022:9602
9602  AMD RS780/RS880 PCI to PCI bridge (int gfx)
1043 83a2  M4A785TD Motherboard
@@ -10077,6 +10092,7 @@
10c3  GT218 [GeForce 8400 GS Rev. 3]
10c5  GT218 [GeForce 405]
10d8  GT218 [NVS 300]
+   10ef  GP102 HDMI Audio Controller
10f0  GP104 High Definition Audio Controller
1140  GF117M [GeForce 610M/710M/810M/820M / GT 620M/625M/630M/720M]
1019 0799  GeForce 820M
@@ -10620,7 +10636,7 @@
13f1  GM204GL [Quadro M4000]
13f2  GM204GL [Tesla M60]
13f3  GM204GL [Tesla M6]
-   13f8  GM204GLM [Quadro M5000M]
+   13f8  GM204GLM [Quadro M5000M / M5000 SE]
13f9  GM204GLM [Quadro M4000M]
13fa  GM204GLM [Quadro M3000M]
10de 11c9  Quadro M3000 SE
@@ -10634,8 +10650,9 @@
1431  GM206GL [Tesla M4]
15f0  GP100GL
15f1  GP100GL
-   15f8  GP100GL
-   15f9  GP100GL
+   15f7  GP100GL [Tesla P100 PCIe 12GB]
+   15f8  GP100GL [Tesla P100 PCIe 16GB]
+   15f9  GP100GL [Tesla P100 SMX2 16GB]
1617  GM204M [GeForce GTX 980M]
1618  GM204M [GeForce GTX 970M]
1619  GM204M [GeForce GTX 965M]
@@ -10659,10 +10676,12 @@
1b81  GP104 [GeForce GTX 1070]
1b82  GP104
1b83  GP104
+   1b84  GP104 [GeForce GTX 1060 3GB]
1ba0  GP104M [GeForce GTX 1080]
1ba1  GP104M [GeForce GTX 1070]
1bb0  GP104GL [Quadro P5000]
1bb1  GP104GL
+   1bb3  GP104GL [Tesla P4]
1bb4  GP104GL
1be0  GP104M [GeForce GTX 1080]
1be1  GP104M [GeForce GTX 1070]
@@ -10678,6 +10697,9 @@
1c80  GP107
1c81  GP107 [GeForce GTX 1050]
1c82  GP107 [GeForce GTX 1050 Ti]
+   1c8c  GP107M [GeForce GTX 1050 Ti]
+   1c8d  GP107M [GeForce GTX 1050]
+   1c8e  GP107M
1ca7  GP107GL
1ca8  GP107GL
1caa  GP107GL
@@ -12103,7 +12125,11 @@
 111f  Precision Digital Images
4a47  Precision MX Video engine interface
  

Re: svn commit: r311929 - head/sys/boot/common

2017-01-11 Thread Ian Lepore
On Wed, 2017-01-11 at 13:35 -0800, Ngie Cooper wrote:
> On Wed, Jan 11, 2017 at 10:47 AM, Dimitry Andric 
> wrote:
> > 
> > Author: dim
> > Date: Wed Jan 11 18:47:00 2017
> > New Revision: 311929
> > URL: https://svnweb.freebsd.org/changeset/base/311929
> > 
> > Log:
> >   Don't include  in reloc_elf.c, as it includes 
> > just
> >   after it, which has a conflicting definition of errno.  This
> > leads to
> >   the following warning with clang 4.0.0:
> > 
> >   In file included from sys/boot/common/reloc_elf32.c:6:
> >   In file included from sys/boot/common/reloc_elf.c:37:
> >   /usr/obj/usr/src/tmp/usr/include/stand.h:155:12: error: this
> > function declaration is not a prototype [-Werror,-Wstrict-
> > prototypes]
> >   extern int errno;
> >  ^
> >   sys/sys/errno.h:46:26: note: expanded from macro 'errno'
> >   #define errno   (* __error())
> It seems like libstand (once again) should be fixed, not the
> "offending code".
> -Ngie
> 

In this case it's not the library that's in error.  Libstand is the
thing that implements errno, so it's the thing that must define it.

The code that includes both errno.h and libstand.h was wrong.  errno.h
is a standard header file used with libc, and the loader code doesn't
link with libc.

The thing that amazes me is the usual:  how did this ever work with gcc
4.2?

-- Ian

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


Re: svn commit: r311929 - head/sys/boot/common

2017-01-11 Thread Ngie Cooper
On Wed, Jan 11, 2017 at 10:47 AM, Dimitry Andric  wrote:
> Author: dim
> Date: Wed Jan 11 18:47:00 2017
> New Revision: 311929
> URL: https://svnweb.freebsd.org/changeset/base/311929
>
> Log:
>   Don't include  in reloc_elf.c, as it includes  just
>   after it, which has a conflicting definition of errno.  This leads to
>   the following warning with clang 4.0.0:
>
>   In file included from sys/boot/common/reloc_elf32.c:6:
>   In file included from sys/boot/common/reloc_elf.c:37:
>   /usr/obj/usr/src/tmp/usr/include/stand.h:155:12: error: this function 
> declaration is not a prototype [-Werror,-Wstrict-prototypes]
>   extern int errno;
>  ^
>   sys/sys/errno.h:46:26: note: expanded from macro 'errno'
>   #define errno   (* __error())

It seems like libstand (once again) should be fixed, not the "offending code".
-Ngie
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r311942 - head/contrib/elftoolchain/libelftc

2017-01-11 Thread Ed Maste
Author: emaste
Date: Wed Jan 11 21:28:22 2017
New Revision: 311942
URL: https://svnweb.freebsd.org/changeset/base/311942

Log:
  readelf: add more PPC64 relocation types found in LLVM
  
  MFC after:2 weeks
  MFC with: r311941
  Sponsored by: The FreeBSD Foundation

Modified:
  head/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c

Modified: head/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c
==
--- head/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c   Wed Jan 11 
21:18:14 2017(r311941)
+++ head/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c   Wed Jan 11 
21:28:22 2017(r311942)
@@ -607,6 +607,12 @@ elftc_reloc_type_str(unsigned int mach, 
case 104: return "R_PPC64_DTPREL16_HIGHERA";
case 105: return "R_PPC64_DTPREL16_HIGHEST";
case 106: return "R_PPC64_DTPREL16_HIGHESTA";
+   case 107: return "R_PPC64_TLSGD";
+   case 108: return "R_PPC64_TLSLD";
+   case 249: return "R_PPC64_REL16";
+   case 250: return "R_PPC64_REL16_LO";
+   case 251: return "R_PPC64_REL16_HI";
+   case 252: return "R_PPC64_REL16_HA";
}
break;
case EM_RISCV:
___
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: r311941 - head/contrib/elftoolchain/libelftc

2017-01-11 Thread Ed Maste
Author: emaste
Date: Wed Jan 11 21:18:14 2017
New Revision: 311941
URL: https://svnweb.freebsd.org/changeset/base/311941

Log:
  readelf: add PPC64 relocation types
  
  Reported by:  Mark Millard
  MFC after:2 weeks
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D9146

Modified:
  head/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c

Modified: head/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c
==
--- head/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c   Wed Jan 11 
21:05:13 2017(r311940)
+++ head/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c   Wed Jan 11 
21:18:14 2017(r311941)
@@ -501,6 +501,114 @@ elftc_reloc_type_str(unsigned int mach, 
case 116: return "R_PPC_EMB_RELSDA";
}
break;
+   case EM_PPC64:
+   switch(type) {
+   case 0: return "R_PPC64_NONE";
+   case 1: return "R_PPC64_ADDR32";
+   case 2: return "R_PPC64_ADDR24";
+   case 3: return "R_PPC64_ADDR16";
+   case 4: return "R_PPC64_ADDR16_LO";
+   case 5: return "R_PPC64_ADDR16_HI";
+   case 6: return "R_PPC64_ADDR16_HA";
+   case 7: return "R_PPC64_ADDR14";
+   case 8: return "R_PPC64_ADDR14_BRTAKEN";
+   case 9: return "R_PPC64_ADDR14_BRNTAKEN";
+   case 10: return "R_PPC64_REL24";
+   case 11: return "R_PPC64_REL14";
+   case 12: return "R_PPC64_REL14_BRTAKEN";
+   case 13: return "R_PPC64_REL14_BRNTAKEN";
+   case 14: return "R_PPC64_GOT16";
+   case 15: return "R_PPC64_GOT16_LO";
+   case 16: return "R_PPC64_GOT16_HI";
+   case 17: return "R_PPC64_GOT16_HA";
+   case 19: return "R_PPC64_COPY";
+   case 20: return "R_PPC64_GLOB_DAT";
+   case 21: return "R_PPC64_JMP_SLOT";
+   case 22: return "R_PPC64_RELATIVE";
+   case 24: return "R_PPC64_UADDR32";
+   case 25: return "R_PPC64_UADDR16";
+   case 26: return "R_PPC64_REL32";
+   case 27: return "R_PPC64_PLT32";
+   case 28: return "R_PPC64_PLTREL32";
+   case 29: return "R_PPC64_PLT16_LO";
+   case 30: return "R_PPC64_PLT16_HI";
+   case 31: return "R_PPC64_PLT16_HA";
+   case 33: return "R_PPC64_SECTOFF";
+   case 34: return "R_PPC64_SECTOFF_LO";
+   case 35: return "R_PPC64_SECTOFF_HI";
+   case 36: return "R_PPC64_SECTOFF_HA";
+   case 37: return "R_PPC64_ADDR30";
+   case 38: return "R_PPC64_ADDR64";
+   case 39: return "R_PPC64_ADDR16_HIGHER";
+   case 40: return "R_PPC64_ADDR16_HIGHERA";
+   case 41: return "R_PPC64_ADDR16_HIGHEST";
+   case 42: return "R_PPC64_ADDR16_HIGHESTA";
+   case 43: return "R_PPC64_UADDR64";
+   case 44: return "R_PPC64_REL64";
+   case 45: return "R_PPC64_PLT64";
+   case 46: return "R_PPC64_PLTREL64";
+   case 47: return "R_PPC64_TOC16";
+   case 48: return "R_PPC64_TOC16_LO";
+   case 49: return "R_PPC64_TOC16_HI";
+   case 50: return "R_PPC64_TOC16_HA";
+   case 51: return "R_PPC64_TOC";
+   case 52: return "R_PPC64_PLTGOT16";
+   case 53: return "R_PPC64_PLTGOT16_LO";
+   case 54: return "R_PPC64_PLTGOT16_HI";
+   case 55: return "R_PPC64_PLTGOT16_HA";
+   case 56: return "R_PPC64_ADDR16_DS";
+   case 57: return "R_PPC64_ADDR16_LO_DS";
+   case 58: return "R_PPC64_GOT16_DS";
+   case 59: return "R_PPC64_GOT16_LO_DS";
+   case 60: return "R_PPC64_PLT16_LO_DS";
+   case 61: return "R_PPC64_SECTOFF_DS";
+   case 62: return "R_PPC64_SECTOFF_LO_DS";
+   case 63: return "R_PPC64_TOC16_DS";
+   case 64: return "R_PPC64_TOC16_LO_DS";
+   case 65: return "R_PPC64_PLTGOT16_DS";
+   case 66: return "R_PPC64_PLTGOT16_LO_DS";
+   case 67: return "R_PPC64_TLS";
+   case 68: return "R_PPC64_DTPMOD64";
+   case 69: return "R_PPC64_TPREL16";
+   case 70: return "R_PPC64_TPREL16_LO";
+   case 71: return "R_PPC64_TPREL16_HI";
+   case 72: return "R_PPC64_TPREL16_HA";
+   case 73: return "R_PPC64_TPREL64";
+   case 74: return "R_PPC64_DTPREL16";
+   case 75: return "R_PPC64_DTPREL16_LO";
+   case 76: return "R_PPC64_DTPREL16_HI";
+   case 77: return "R_PPC64_DTPREL16_HA";
+   case 78: return "R_PPC64_DTPREL64";
+   case 79: return 

svn commit: r311939 - in stable: 10/sys/geom/vinum 11/sys/geom/vinum 9/sys/geom/vinum

2017-01-11 Thread Dimitry Andric
Author: dim
Date: Wed Jan 11 21:01:49 2017
New Revision: 311939
URL: https://svnweb.freebsd.org/changeset/base/311939

Log:
  MFC r311688:
  
  Fix logic error in gvinum's gv_set_sd_state()
  
  With clang 4.0.0, I'm getting the following warnings:
  
  sys/geom/vinum/geom_vinum_state.c:186:7: error: logical not is only
  applied to the left hand side of this bitwise operator
  [-Werror,-Wlogical-not-parentheses]
  if (!flags & GV_SETSTATE_FORCE)
  ^  ~
  
  The logical not operator should obiously be called after masking.
  
  Reviewed by:  mav, pfg
  Differential Revision:https://reviews.freebsd.org/D9093

Modified:
  stable/10/sys/geom/vinum/geom_vinum_state.c
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/sys/geom/vinum/geom_vinum_state.c
  stable/9/sys/geom/vinum/geom_vinum_state.c
Directory Properties:
  stable/11/   (props changed)
  stable/9/   (props changed)
  stable/9/sys/   (props changed)

Modified: stable/10/sys/geom/vinum/geom_vinum_state.c
==
--- stable/10/sys/geom/vinum/geom_vinum_state.c Wed Jan 11 20:55:01 2017
(r311938)
+++ stable/10/sys/geom/vinum/geom_vinum_state.c Wed Jan 11 21:01:49 2017
(r311939)
@@ -183,7 +183,7 @@ gv_set_sd_state(struct gv_sd *s, int new
 * Only do this if we're forced, since it usually is done
 * internally, and then we do use the force flag. 
 */
-   if (!flags & GV_SETSTATE_FORCE)
+   if (!(flags & GV_SETSTATE_FORCE))
return (GV_ERR_SETSTATE);
break;
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r311939 - in stable: 10/sys/geom/vinum 11/sys/geom/vinum 9/sys/geom/vinum

2017-01-11 Thread Dimitry Andric
Author: dim
Date: Wed Jan 11 21:01:49 2017
New Revision: 311939
URL: https://svnweb.freebsd.org/changeset/base/311939

Log:
  MFC r311688:
  
  Fix logic error in gvinum's gv_set_sd_state()
  
  With clang 4.0.0, I'm getting the following warnings:
  
  sys/geom/vinum/geom_vinum_state.c:186:7: error: logical not is only
  applied to the left hand side of this bitwise operator
  [-Werror,-Wlogical-not-parentheses]
  if (!flags & GV_SETSTATE_FORCE)
  ^  ~
  
  The logical not operator should obiously be called after masking.
  
  Reviewed by:  mav, pfg
  Differential Revision:https://reviews.freebsd.org/D9093

Modified:
  stable/11/sys/geom/vinum/geom_vinum_state.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/sys/geom/vinum/geom_vinum_state.c
  stable/9/sys/geom/vinum/geom_vinum_state.c
Directory Properties:
  stable/10/   (props changed)
  stable/9/   (props changed)
  stable/9/sys/   (props changed)

Modified: stable/11/sys/geom/vinum/geom_vinum_state.c
==
--- stable/11/sys/geom/vinum/geom_vinum_state.c Wed Jan 11 20:55:01 2017
(r311938)
+++ stable/11/sys/geom/vinum/geom_vinum_state.c Wed Jan 11 21:01:49 2017
(r311939)
@@ -183,7 +183,7 @@ gv_set_sd_state(struct gv_sd *s, int new
 * Only do this if we're forced, since it usually is done
 * internally, and then we do use the force flag. 
 */
-   if (!flags & GV_SETSTATE_FORCE)
+   if (!(flags & GV_SETSTATE_FORCE))
return (GV_ERR_SETSTATE);
break;
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r311939 - in stable: 10/sys/geom/vinum 11/sys/geom/vinum 9/sys/geom/vinum

2017-01-11 Thread Dimitry Andric
Author: dim
Date: Wed Jan 11 21:01:49 2017
New Revision: 311939
URL: https://svnweb.freebsd.org/changeset/base/311939

Log:
  MFC r311688:
  
  Fix logic error in gvinum's gv_set_sd_state()
  
  With clang 4.0.0, I'm getting the following warnings:
  
  sys/geom/vinum/geom_vinum_state.c:186:7: error: logical not is only
  applied to the left hand side of this bitwise operator
  [-Werror,-Wlogical-not-parentheses]
  if (!flags & GV_SETSTATE_FORCE)
  ^  ~
  
  The logical not operator should obiously be called after masking.
  
  Reviewed by:  mav, pfg
  Differential Revision:https://reviews.freebsd.org/D9093

Modified:
  stable/9/sys/geom/vinum/geom_vinum_state.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/sys/   (props changed)

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

Modified: stable/9/sys/geom/vinum/geom_vinum_state.c
==
--- stable/9/sys/geom/vinum/geom_vinum_state.c  Wed Jan 11 20:55:01 2017
(r311938)
+++ stable/9/sys/geom/vinum/geom_vinum_state.c  Wed Jan 11 21:01:49 2017
(r311939)
@@ -183,7 +183,7 @@ gv_set_sd_state(struct gv_sd *s, int new
 * Only do this if we're forced, since it usually is done
 * internally, and then we do use the force flag. 
 */
-   if (!flags & GV_SETSTATE_FORCE)
+   if (!(flags & GV_SETSTATE_FORCE))
return (GV_ERR_SETSTATE);
break;
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r311938 - stable/11/contrib/tcpdump

2017-01-11 Thread Dimitry Andric
Author: dim
Date: Wed Jan 11 20:55:01 2017
New Revision: 311938
URL: https://svnweb.freebsd.org/changeset/base/311938

Log:
  MFC r311570:
  
  In tcpdump's print-tcp.c, avoid increasing alignment when taking the
  addresses of members of struct ip, which is packed.  Since the pointers
  are only used for memcmp'ing, they can be pointing to void instead.
  
  Note that upstream has removed the src and dst variables, in the mean
  time.

Modified:
  stable/11/contrib/tcpdump/print-tcp.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/contrib/tcpdump/print-tcp.c
==
--- stable/11/contrib/tcpdump/print-tcp.c   Wed Jan 11 20:45:27 2017
(r311937)
+++ stable/11/contrib/tcpdump/print-tcp.c   Wed Jan 11 20:55:01 2017
(r311938)
@@ -253,7 +253,7 @@ tcp_print(netdissect_options *ndo,
 if (ip6) {
 register struct tcp_seq_hash6 *th;
 struct tcp_seq_hash6 *tcp_seq_hash;
-const struct in6_addr *src, *dst;
+const void *src, *dst;
 struct tha6 tha;
 
 tcp_seq_hash = tcp_seq_hash6;
@@ -309,7 +309,7 @@ tcp_print(netdissect_options *ndo,
 #endif /*INET6*/
 register struct tcp_seq_hash *th;
 struct tcp_seq_hash *tcp_seq_hash;
-const struct in_addr *src, *dst;
+const void *src, *dst;
 struct tha tha;
 
 tcp_seq_hash = tcp_seq_hash4;
___
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: r311937 - in stable: 10/contrib/ngatm/snmp_atm 11/contrib/ngatm/snmp_atm 9/contrib/ngatm/snmp_atm

2017-01-11 Thread Dimitry Andric
Author: dim
Date: Wed Jan 11 20:45:27 2017
New Revision: 311937
URL: https://svnweb.freebsd.org/changeset/base/311937

Log:
  MFC r311649:
  
  Fix the following clang 4.0.0 warning in ngatm's snmp_atm.c:
  
  contrib/ngatm/snmp_atm/snmp_atm.c:173:6: error: logical not is only
  applied to the left hand side of this bitwise operator
  [-Werror,-Wlogical-not-parentheses]
  if (!ifmr.ifm_status & IFM_AVALID) {
  ^~
  
  Obviously, the masking needs to be done before the logical not
  operation.  Add parentheses to make it so.

Modified:
  stable/10/contrib/ngatm/snmp_atm/snmp_atm.c
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/contrib/ngatm/snmp_atm/snmp_atm.c
  stable/9/contrib/ngatm/snmp_atm/snmp_atm.c
Directory Properties:
  stable/11/   (props changed)
  stable/9/   (props changed)
  stable/9/contrib/   (props changed)

Modified: stable/10/contrib/ngatm/snmp_atm/snmp_atm.c
==
--- stable/10/contrib/ngatm/snmp_atm/snmp_atm.c Wed Jan 11 20:29:58 2017
(r311936)
+++ stable/10/contrib/ngatm/snmp_atm/snmp_atm.c Wed Jan 11 20:45:27 2017
(r311937)
@@ -170,7 +170,7 @@ atmif_check_carrier(struct atmif_priv *a
aif->pub.carrier = ATMIF_CARRIER_UNKNOWN;
return;
}
-   if (!ifmr.ifm_status & IFM_AVALID) {
+   if (!(ifmr.ifm_status & IFM_AVALID)) {
aif->pub.carrier = ATMIF_CARRIER_UNKNOWN;
return;
}
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r311937 - in stable: 10/contrib/ngatm/snmp_atm 11/contrib/ngatm/snmp_atm 9/contrib/ngatm/snmp_atm

2017-01-11 Thread Dimitry Andric
Author: dim
Date: Wed Jan 11 20:45:27 2017
New Revision: 311937
URL: https://svnweb.freebsd.org/changeset/base/311937

Log:
  MFC r311649:
  
  Fix the following clang 4.0.0 warning in ngatm's snmp_atm.c:
  
  contrib/ngatm/snmp_atm/snmp_atm.c:173:6: error: logical not is only
  applied to the left hand side of this bitwise operator
  [-Werror,-Wlogical-not-parentheses]
  if (!ifmr.ifm_status & IFM_AVALID) {
  ^~
  
  Obviously, the masking needs to be done before the logical not
  operation.  Add parentheses to make it so.

Modified:
  stable/11/contrib/ngatm/snmp_atm/snmp_atm.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/contrib/ngatm/snmp_atm/snmp_atm.c
  stable/9/contrib/ngatm/snmp_atm/snmp_atm.c
Directory Properties:
  stable/10/   (props changed)
  stable/9/   (props changed)
  stable/9/contrib/   (props changed)

Modified: stable/11/contrib/ngatm/snmp_atm/snmp_atm.c
==
--- stable/11/contrib/ngatm/snmp_atm/snmp_atm.c Wed Jan 11 20:29:58 2017
(r311936)
+++ stable/11/contrib/ngatm/snmp_atm/snmp_atm.c Wed Jan 11 20:45:27 2017
(r311937)
@@ -170,7 +170,7 @@ atmif_check_carrier(struct atmif_priv *a
aif->pub.carrier = ATMIF_CARRIER_UNKNOWN;
return;
}
-   if (!ifmr.ifm_status & IFM_AVALID) {
+   if (!(ifmr.ifm_status & IFM_AVALID)) {
aif->pub.carrier = ATMIF_CARRIER_UNKNOWN;
return;
}
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r311937 - in stable: 10/contrib/ngatm/snmp_atm 11/contrib/ngatm/snmp_atm 9/contrib/ngatm/snmp_atm

2017-01-11 Thread Dimitry Andric
Author: dim
Date: Wed Jan 11 20:45:27 2017
New Revision: 311937
URL: https://svnweb.freebsd.org/changeset/base/311937

Log:
  MFC r311649:
  
  Fix the following clang 4.0.0 warning in ngatm's snmp_atm.c:
  
  contrib/ngatm/snmp_atm/snmp_atm.c:173:6: error: logical not is only
  applied to the left hand side of this bitwise operator
  [-Werror,-Wlogical-not-parentheses]
  if (!ifmr.ifm_status & IFM_AVALID) {
  ^~
  
  Obviously, the masking needs to be done before the logical not
  operation.  Add parentheses to make it so.

Modified:
  stable/9/contrib/ngatm/snmp_atm/snmp_atm.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/contrib/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/contrib/ngatm/snmp_atm/snmp_atm.c
  stable/11/contrib/ngatm/snmp_atm/snmp_atm.c
Directory Properties:
  stable/10/   (props changed)
  stable/11/   (props changed)

Modified: stable/9/contrib/ngatm/snmp_atm/snmp_atm.c
==
--- stable/9/contrib/ngatm/snmp_atm/snmp_atm.c  Wed Jan 11 20:29:58 2017
(r311936)
+++ stable/9/contrib/ngatm/snmp_atm/snmp_atm.c  Wed Jan 11 20:45:27 2017
(r311937)
@@ -170,7 +170,7 @@ atmif_check_carrier(struct atmif_priv *a
aif->pub.carrier = ATMIF_CARRIER_UNKNOWN;
return;
}
-   if (!ifmr.ifm_status & IFM_AVALID) {
+   if (!(ifmr.ifm_status & IFM_AVALID)) {
aif->pub.carrier = ATMIF_CARRIER_UNKNOWN;
return;
}
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r311936 - stable/11/sbin/ping

2017-01-11 Thread Dimitry Andric
Author: dim
Date: Wed Jan 11 20:29:58 2017
New Revision: 311936
URL: https://svnweb.freebsd.org/changeset/base/311936

Log:
  MFC r311530:
  
  Fix clang 4.0.0 warnings about taking the address of a packed member of
  struct ip in ping(8):
  
  sbin/ping/ping.c:1684:53: error: taking address of packed member
  'ip_src' of class or structure 'ip' may result in an unaligned pointer
  value [-Werror,-Waddress-of-packed-member]
  (void)printf(" %s ", inet_ntoa(*(struct in_addr 
*)>ip_src.s_addr));
 ^
  sbin/ping/ping.c:1685:53: error: taking address of packed member
  'ip_dst' of class or structure 'ip' may result in an unaligned pointer
  value [-Werror,-Waddress-of-packed-member]
  (void)printf(" %s ", inet_ntoa(*(struct in_addr 
*)>ip_dst.s_addr));
 ^

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

Modified: stable/11/sbin/ping/ping.c
==
--- stable/11/sbin/ping/ping.c  Wed Jan 11 20:23:45 2017(r311935)
+++ stable/11/sbin/ping/ping.c  Wed Jan 11 20:29:58 2017(r311936)
@@ -1666,6 +1666,7 @@ pr_icmph(struct icmp *icp)
 static void
 pr_iph(struct ip *ip)
 {
+   struct in_addr ina;
u_char *cp;
int hlen;
 
@@ -1681,8 +1682,10 @@ pr_iph(struct ip *ip)
(u_long) ntohl(ip->ip_off) & 0x1fff);
(void)printf("  %02x  %02x %04x", ip->ip_ttl, ip->ip_p,
ntohs(ip->ip_sum));
-   (void)printf(" %s ", inet_ntoa(*(struct in_addr *)>ip_src.s_addr));
-   (void)printf(" %s ", inet_ntoa(*(struct in_addr *)>ip_dst.s_addr));
+   memcpy(, >ip_src.s_addr, sizeof ina);
+   (void)printf(" %s ", inet_ntoa(ina));
+   memcpy(, >ip_dst.s_addr, sizeof ina);
+   (void)printf(" %s ", inet_ntoa(ina));
/* dump any option bytes */
while (hlen-- > 20) {
(void)printf("%02x", *cp++);
___
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: r311935 - head/sys/dev/ntb/if_ntb

2017-01-11 Thread Alexander Motin
Author: mav
Date: Wed Jan 11 20:23:45 2017
New Revision: 311935
URL: https://svnweb.freebsd.org/changeset/base/311935

Log:
  Pretend we support some IOCTLs to not scary upper layers.
  
  MFC after:2 weeks

Modified:
  head/sys/dev/ntb/if_ntb/if_ntb.c

Modified: head/sys/dev/ntb/if_ntb/if_ntb.c
==
--- head/sys/dev/ntb/if_ntb/if_ntb.cWed Jan 11 20:21:05 2017
(r311934)
+++ head/sys/dev/ntb/if_ntb/if_ntb.cWed Jan 11 20:23:45 2017
(r311935)
@@ -237,6 +237,11 @@ ntb_ioctl(if_t ifp, u_long command, cadd
int error = 0;
 
switch (command) {
+   case SIOCSIFFLAGS:
+   case SIOCADDMULTI:
+   case SIOCDELMULTI:
+   break;
+
case SIOCSIFMTU:
{
if (ifr->ifr_mtu > sc->mtu - ETHER_HDR_LEN) {
___
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: r311934 - in stable/11: . tools/build/mk usr.bin/clang/llvm-ar

2017-01-11 Thread Dimitry Andric
Author: dim
Date: Wed Jan 11 20:21:05 2017
New Revision: 311934
URL: https://svnweb.freebsd.org/changeset/base/311934

Log:
  MFC r311565:
  
  Link llvm-ar to llvm-ranlib, if WITH_CLANG_EXTRAS is enabled.  When
  invoked as llvm-ranlib, it can create an archive symbol table for
  archives of objects compiled for LTO by an LLVM compiler.
  
  Submitted by: Dan McGregor 
  
  MFC r311806:
  
  After r311565, also remove llvm-ranlib from ObsoleteFiles.inc.

Modified:
  stable/11/ObsoleteFiles.inc
  stable/11/tools/build/mk/OptionalObsoleteFiles.inc
  stable/11/usr.bin/clang/llvm-ar/Makefile
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/ObsoleteFiles.inc
==
--- stable/11/ObsoleteFiles.inc Wed Jan 11 20:00:24 2017(r311933)
+++ stable/11/ObsoleteFiles.inc Wed Jan 11 20:21:05 2017(r311934)
@@ -2177,7 +2177,6 @@ OLD_LIBS+=usr/lib32/private/libyaml.so.1
 OLD_FILES+=usr/lib32/private/libyaml_p.a
 # 20140216: new clang import which bumps version from 3.3 to 3.4.
 OLD_FILES+=usr/bin/llvm-prof
-OLD_FILES+=usr/bin/llvm-ranlib
 OLD_FILES+=usr/include/clang/3.3/__wmmintrin_aes.h
 OLD_FILES+=usr/include/clang/3.3/__wmmintrin_pclmul.h
 OLD_FILES+=usr/include/clang/3.3/altivec.h

Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc
==
--- stable/11/tools/build/mk/OptionalObsoleteFiles.inc  Wed Jan 11 20:00:24 
2017(r311933)
+++ stable/11/tools/build/mk/OptionalObsoleteFiles.inc  Wed Jan 11 20:21:05 
2017(r311934)
@@ -1493,6 +1493,7 @@ OLD_FILES+=usr/bin/llvm-mc
 OLD_FILES+=usr/bin/llvm-nm
 OLD_FILES+=usr/bin/llvm-objdump
 OLD_FILES+=usr/bin/llvm-pdbdump
+OLD_FILES+=usr/bin/llvm-ranlib
 OLD_FILES+=usr/bin/llvm-rtdyld
 OLD_FILES+=usr/bin/llvm-symbolizer
 OLD_FILES+=usr/bin/opt

Modified: stable/11/usr.bin/clang/llvm-ar/Makefile
==
--- stable/11/usr.bin/clang/llvm-ar/MakefileWed Jan 11 20:00:24 2017
(r311933)
+++ stable/11/usr.bin/clang/llvm-ar/MakefileWed Jan 11 20:21:05 2017
(r311934)
@@ -7,4 +7,6 @@ SRCS+=  llvm-ar.cpp
 
 LIBADD+=   z
 
+LINKS+=${BINDIR}/llvm-ar ${BINDIR}/llvm-ranlib
+
 .include "../llvm.prog.mk"
___
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: r311933 - head/sys/boot/efi/boot1

2017-01-11 Thread Dimitry Andric
Author: dim
Date: Wed Jan 11 20:00:24 2017
New Revision: 311933
URL: https://svnweb.freebsd.org/changeset/base/311933

Log:
  Use proper prototypes in struct boot_module_t
  
  With clang 4.0.0, we are getting the following warnings about struct
  boot_module_t in efi's boot_module.h:
  
  In file included from sys/boot/efi/boot1/ufs_module.c:41:
  sys/boot/efi/boot1/boot_module.h:67:14: error: this function declaration is 
not a prototype [-Werror,-Wstrict-prototypes]
  void (*init)();
  ^
   void
  sys/boot/efi/boot1/boot_module.h:92:16: error: this function declaration is 
not a prototype [-Werror,-Wstrict-prototypes]
  void (*status)();
^
 void
  sys/boot/efi/boot1/boot_module.h:95:24: error: this function declaration is 
not a prototype [-Werror,-Wstrict-prototypes]
  dev_info_t *(*devices)();
^
 void
  3 errors generated.
  
  Fix this by adding 'void' to the parameter lists.  No functional change.
  
  Reviewed by:  emaste, imp, smh
  MFC after:3 days
  Differential Revision:https://reviews.freebsd.org/D9144

Modified:
  head/sys/boot/efi/boot1/boot_module.h

Modified: head/sys/boot/efi/boot1/boot_module.h
==
--- head/sys/boot/efi/boot1/boot_module.h   Wed Jan 11 19:59:27 2017
(r311932)
+++ head/sys/boot/efi/boot1/boot_module.h   Wed Jan 11 20:00:24 2017
(r311933)
@@ -64,7 +64,7 @@ typedef struct boot_module_t
const char *name;
 
/* init is the optional initialiser for the module. */
-   void (*init)();
+   void (*init)(void);
 
/*
 * probe checks to see if the module can handle dev.
@@ -89,10 +89,10 @@ typedef struct boot_module_t
void **buf, size_t *bufsize);
 
/* status outputs information about the probed devices. */
-   void (*status)();
+   void (*status)(void);
 
/* valid devices as found by probe. */
-   dev_info_t *(*devices)();
+   dev_info_t *(*devices)(void);
 } boot_module_t;
 
 /* Standard boot modules. */
___
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: r311932 - head/sys/boot/efi/include

2017-01-11 Thread Dimitry Andric
Author: dim
Date: Wed Jan 11 19:59:27 2017
New Revision: 311932
URL: https://svnweb.freebsd.org/changeset/base/311932

Log:
  Make EFI_RESERVED_SERVICE a proper prototype
  
  With clang 4.0.0, the EFI API header causes the following warning:
  
  In file included from sys/boot/efi/loader/bootinfo.c:43:
  In file included from sys/boot/efi/loader/../include/efi.h:52:
  sys/boot/efi/include/efiapi.h:534:32: error: this function declaration is not 
a prototype [-Werror,-Wstrict-prototypes]
  (EFIAPI *EFI_RESERVED_SERVICE) (
 ^
  
  Add VOID to make it into a real prototype.
  
  Reviewed by:  imp, emaste, tsoome
  MFC after:3 days
  Differential Revision:https://reviews.freebsd.org/D9132

Modified:
  head/sys/boot/efi/include/efiapi.h

Modified: head/sys/boot/efi/include/efiapi.h
==
--- head/sys/boot/efi/include/efiapi.h  Wed Jan 11 19:29:33 2017
(r311931)
+++ head/sys/boot/efi/include/efiapi.h  Wed Jan 11 19:59:27 2017
(r311932)
@@ -532,6 +532,7 @@ EFI_STATUS
 typedef
 EFI_STATUS
 (EFIAPI *EFI_RESERVED_SERVICE) (
+VOID
 );
 
 typedef
___
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: r311931 - head/sys/dev/e1000

2017-01-11 Thread Andrey V. Elsukov

On 11.01.2017 22:29, Sean Bruno wrote:

Author: sbruno
Date: Wed Jan 11 19:29:33 2017
New Revision: 311931
URL: https://svnweb.freebsd.org/changeset/base/311931

Log:
  Restore v6 offload caps for igb(4) class devices.
Modified: head/sys/dev/e1000/if_em.h
==
--- head/sys/dev/e1000/if_em.h  Wed Jan 11 19:29:28 2017(r311930)
+++ head/sys/dev/e1000/if_em.h  Wed Jan 11 19:29:33 2017(r311931)
@@ -330,7 +330,8 @@
 #define EM_MSIX_LINK   0x0100 /* For 82574 use */
 #define ETH_ZLEN   60
 #define ETH_ADDR_LEN   6
-#define CSUM_OFFLOAD   7   /* Offload bits in mbuf flag */
+#define EM_CSUM_OFFLOAD7   /* Offload bits in mbuf flag */
+#define IGB_CSUM_OFFLOAD   0x0E0F  /* Offload bits in mbuf flag */


Hi, Sean,

why did you not define these masks using macros from sys/mbuf.h?
It seems it would be more readable.

--
WBR, Andrey V. Elsukov
___
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: r311931 - head/sys/dev/e1000

2017-01-11 Thread Sean Bruno
Author: sbruno
Date: Wed Jan 11 19:29:33 2017
New Revision: 311931
URL: https://svnweb.freebsd.org/changeset/base/311931

Log:
  Restore v6 offload caps for igb(4) class devices.
  
  Reported by:  tuxen

Modified:
  head/sys/dev/e1000/em_txrx.c
  head/sys/dev/e1000/if_em.h
  head/sys/dev/e1000/igb_txrx.c

Modified: head/sys/dev/e1000/em_txrx.c
==
--- head/sys/dev/e1000/em_txrx.cWed Jan 11 19:29:28 2017
(r311930)
+++ head/sys/dev/e1000/em_txrx.cWed Jan 11 19:29:33 2017
(r311931)
@@ -304,7 +304,7 @@ em_isc_txd_encap(void *arg, if_pkt_info_
if (do_tso) {
i = em_tso_setup(sc, pi, _upper, _lower);
tso_desc = TRUE;
-   } else if (csum_flags & CSUM_OFFLOAD) {
+   } else if (csum_flags & EM_CSUM_OFFLOAD) {
i = em_transmit_checksum_setup(sc, pi, _upper, _lower);
}
 

Modified: head/sys/dev/e1000/if_em.h
==
--- head/sys/dev/e1000/if_em.h  Wed Jan 11 19:29:28 2017(r311930)
+++ head/sys/dev/e1000/if_em.h  Wed Jan 11 19:29:33 2017(r311931)
@@ -330,7 +330,8 @@
 #define EM_MSIX_LINK   0x0100 /* For 82574 use */
 #define ETH_ZLEN   60
 #define ETH_ADDR_LEN   6
-#define CSUM_OFFLOAD   7   /* Offload bits in mbuf flag */
+#define EM_CSUM_OFFLOAD7   /* Offload bits in mbuf flag */
+#define IGB_CSUM_OFFLOAD   0x0E0F  /* Offload bits in mbuf flag */
 
 #define IGB_PKTTYPE_MASK   0xFFF0
 #define IGB_DMCTLX_DCFLUSH_DIS 0x8000  /* Disable DMA Coalesce Flush */

Modified: head/sys/dev/e1000/igb_txrx.c
==
--- head/sys/dev/e1000/igb_txrx.c   Wed Jan 11 19:29:28 2017
(r311930)
+++ head/sys/dev/e1000/igb_txrx.c   Wed Jan 11 19:29:33 2017
(r311931)
@@ -171,7 +171,7 @@ igb_tx_ctx_setup(struct tx_ring *txr, if
*/
 if (pi->ipi_mflags & M_VLANTAG) {
vlan_macip_lens |= (pi->ipi_vtag << E1000_ADVTXD_VLAN_SHIFT);
-   } else if ((pi->ipi_csum_flags & CSUM_OFFLOAD) == 0) {
+   } else if ((pi->ipi_csum_flags & IGB_CSUM_OFFLOAD) == 0) {
return (0);
}

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


svn commit: r311930 - head/share/misc

2017-01-11 Thread Jean-Sébastien Pédron
Author: dumbbell
Date: Wed Jan 11 19:29:28 2017
New Revision: 311930
URL: https://svnweb.freebsd.org/changeset/base/311930

Log:
  committers-ports.dot: Add myself
  
  Approved by:  antoine (mentor)
  Differential Revision:https://reviews.freebsd.org/D9143

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

Modified: head/share/misc/committers-ports.dot
==
--- head/share/misc/committers-ports.dotWed Jan 11 18:47:00 2017
(r311929)
+++ head/share/misc/committers-ports.dotWed Jan 11 19:29:28 2017
(r311930)
@@ -90,6 +90,7 @@ delphij [label="Xin Li\ndelphij@FreeBSD.
 demon [label="Dmitry Sivachenko\nde...@freebsd.org\n2000/11/13"]
 dhn [label="Dennis Herrmann\n...@freebsd.org\n2009/03/03"]
 dryice [label="Dryice Dong Liu\ndry...@freebsd.org\n2006/12/25"]
+dumbbell [label="Jean-Sebastien Pedron\ndumbb...@freebsd.org\n2017/01/10"]
 dvl [label="Dan Langille\n...@freebsd.org\n2014/08/10"]
 eadler [label="Eitan Adler\nead...@freebsd.org\n2011/08/17"]
 edwin [label="Edwin Groothuis\ned...@freebsd.org\n2002/10/22"]
@@ -265,6 +266,8 @@ ahze -> tmclaugh
 
 amdmi3 -> jrm
 
+antoine -> dumbbell
+
 araujo -> lippe
 araujo -> pclin
 araujo -> pgollucci
@@ -283,6 +286,7 @@ bdrewery -> trociny
 
 bapt -> bdrewery
 bapt -> bofh
+bapt -> dumbbell
 bapt -> eadler
 bapt -> grembo
 bapt -> jbeich
___
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: r311929 - head/sys/boot/common

2017-01-11 Thread Dimitry Andric
Author: dim
Date: Wed Jan 11 18:47:00 2017
New Revision: 311929
URL: https://svnweb.freebsd.org/changeset/base/311929

Log:
  Don't include  in reloc_elf.c, as it includes  just
  after it, which has a conflicting definition of errno.  This leads to
  the following warning with clang 4.0.0:
  
  In file included from sys/boot/common/reloc_elf32.c:6:
  In file included from sys/boot/common/reloc_elf.c:37:
  /usr/obj/usr/src/tmp/usr/include/stand.h:155:12: error: this function 
declaration is not a prototype [-Werror,-Wstrict-prototypes]
  extern int errno;
 ^
  sys/sys/errno.h:46:26: note: expanded from macro 'errno'
  #define errno   (* __error())
^
  
  MFC after:3 days

Modified:
  head/sys/boot/common/reloc_elf.c

Modified: head/sys/boot/common/reloc_elf.c
==
--- head/sys/boot/common/reloc_elf.cWed Jan 11 16:09:25 2017
(r311928)
+++ head/sys/boot/common/reloc_elf.cWed Jan 11 18:47:00 2017
(r311929)
@@ -33,7 +33,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-#include 
 #include 
 
 #define FREEBSD_ELF
___
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: r311911 - in head/sys: conf dev/sdhci modules modules/sdhci_acpi

2017-01-11 Thread Oleksandr Tymoshenko
Ngie Cooper (yaneurabeya) (yaneurab...@gmail.com) wrote:
> 
> > On Jan 10, 2017, at 5:53 PM, Oleksandr Tymoshenko  wrote:
> > 
> > Author: gonzo
> > Date: Wed Jan 11 01:53:54 2017
> > New Revision: 311911
> > URL: https://svnweb.freebsd.org/changeset/base/311911
> > 
> > Log:
> >  [sdhci] Add ACPI platform support for SDHCI driver
> > 
> >  - Create ACPI version of SDHCI attach/detach/accessors logic. Some
> >  platforms (e.g. BayTrail-based Minnowboard) expose SDHCI devices
> >  via ACPI, not PCI
> >  - Add sdchi_acpi kernel module
> > 
> >  Reviewed by:   ian, imp
> >  MFC after: 1 week
> >  Differential Revision: https://reviews.freebsd.org/D9112
> 
> 
> Hi,
>   This broke the build for a bit because of missing headers in SRCS. 
> Please MFC r311923 too.
> Thank you!

Oops. My apologies. Thanks for fixing. 

-- 
gonzo
___
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: r311895 - in head: etc/mtree usr.bin/tail usr.bin/tail/tests

2017-01-11 Thread Alan Somers
On Wed, Jan 11, 2017 at 5:53 AM, Sergey Kandaurov  wrote:
> On 10 January 2017 at 23:43, Alan Somers  wrote:
>>
>> Author: asomers
>> Date: Tue Jan 10 20:43:32 2017
>> New Revision: 311895
>> URL: https://svnweb.freebsd.org/changeset/base/311895
>>
>> Log:
>>   Fix memory leaks during "tail -r" of an irregular file
>> [..]
>>
>> -typedef struct bf {
>> -   struct bf *next;
>> -   struct bf *prev;
>> -   int len;
>> -   char *l;
>> -} BF;
>> +static const size_t bsz = 128 * 1024;
>> +typedef struct bfelem {
>> +   TAILQ_ENTRY(bfelem) entries;
>> +   size_t len;
>> +   char l[bsz];
>> +} bfelem_t;
>>
>
> This breaks on gcc that doesn't respect const for some reason:
> reverse.c:177: error: variably modified 'l' at file scope
>
>>
>>  /*
>>   * r_buf -- display a non-regular file in reverse order by line.
>> @@ -189,64 +190,42 @@ typedef struct bf {
>>  static void
>>  r_buf(FILE *fp, const char *fn)
>>  {
>> -   BF *mark, *tl, *tr;
>> -   int ch, len, llen;
>> +   struct bfelem *tl, *temp, *first = NULL;
>> +   size_t len, llen;
>
>
> reverse.c:194: warning: 'len' may be used uninitialized in this function
>
> I suspect this is due to a typo on line 254.
>
>  [..]
>
>>
>> /*
>> -* Step through the blocks in the reverse order read.  The last
>> char
>> -* is special, ignore whether newline or not.
>> +* Now print the lines in reverse order
>> +* Outline:
>> +*Scan backward for "\n",
>> +*print forward to the end of the buffers
>> +*free any buffers that start after the "\n" just found
>> +*Loop
>>  */
>> -   for (mark = tl;;) {
>> -   for (p = tl->l + (len = tl->len) - 1, llen = 0; len--;
>> -   --p, ++llen)
>> -   if (*p == '\n') {
>> -   if (llen) {
>> +   tl = TAILQ_LAST(, bfhead);
>> +   first = TAILQ_FIRST();
>> +   while (tl != NULL) {
>> +   for (p = tl->l + tl->len - 1, llen = 0; p >= tl->l;
>> +   --p, ++llen) {
>> +   int start = (tl == first && p == tl->l);
>> +
>> +   if ((*p == '\n') || start) {
>> +   struct bfelem *tr;
>> +
>> +   if (start && len)
>
>
> here
>
> joint patch to fix build on gcc (not tested, although tests pass)
>
> Index: reverse.c
> ===
> --- reverse.c(revision 311927)
> +++ reverse.c(working copy)
> @@ -170,11 +170,11 @@
>  ierr(fn);
>  }
>
> -static const size_t bsz = 128 * 1024;
> +#defineBSZ(128 * 1024)
>  typedef struct bfelem {
>  TAILQ_ENTRY(bfelem) entries;
>  size_t len;
> -char l[bsz];
> +char l[BSZ];
>  } bfelem_t;
>
>  /*
> @@ -216,9 +216,9 @@
>
>  /* Fill the block with input data. */
>  len = 0;
> -while ((!feof(fp)) && len < bsz) {
> +while ((!feof(fp)) && len < BSZ) {
>  p = tl->l + len;
> -len += fread(p, 1, bsz - len, fp);
> +len += fread(p, 1, BSZ - len, fp);
>  if (ferror(fp)) {
>  ierr(fn);
>  return;
> @@ -251,7 +251,7 @@
>  if ((*p == '\n') || start) {
>  struct bfelem *tr;
>
> -if (start && len)
> +if (start && llen)
>  WR(p, llen + 1);
>  else if (llen)
>  WR(p + 1, llen);
>
> --
> wbr,
> pluknet

Thanks for the tip, Sergey.  Fixed in 311928.
___
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: r311928 - head/usr.bin/tail

2017-01-11 Thread Alan Somers
Author: asomers
Date: Wed Jan 11 16:09:25 2017
New Revision: 311928
URL: https://svnweb.freebsd.org/changeset/base/311928

Log:
  Fix build of usr.bin/tail with GCC
  
  Submitted by: pluknet
  Reported by:  pluknet
  MFC after:27 days
  X-MFC-with:   311895
  Sponsored by: Spectra Logic Corp

Modified:
  head/usr.bin/tail/reverse.c

Modified: head/usr.bin/tail/reverse.c
==
--- head/usr.bin/tail/reverse.c Wed Jan 11 11:25:18 2017(r311927)
+++ head/usr.bin/tail/reverse.c Wed Jan 11 16:09:25 2017(r311928)
@@ -170,11 +170,11 @@ r_reg(FILE *fp, const char *fn, enum STY
ierr(fn);
 }
 
-static const size_t bsz = 128 * 1024;
+#define BSZ(128 * 1024)
 typedef struct bfelem {
TAILQ_ENTRY(bfelem) entries;
size_t len;
-   char l[bsz];
+   char l[BSZ];
 } bfelem_t;
 
 /*
@@ -190,8 +190,8 @@ typedef struct bfelem {
 static void
 r_buf(FILE *fp, const char *fn)
 {
-   struct bfelem *tl, *temp, *first = NULL;
-   size_t len, llen;
+   struct bfelem *tl, *first = NULL;
+   size_t llen;
char *p;
off_t enomem = 0;
TAILQ_HEAD(bfhead, bfelem) head;
@@ -199,6 +199,8 @@ r_buf(FILE *fp, const char *fn)
TAILQ_INIT();
 
while (!feof(fp)) {
+   size_t len;
+
/*
 * Allocate a new block and link it into place in a doubly
 * linked list.  If out of memory, toss the LRU block and
@@ -216,9 +218,9 @@ r_buf(FILE *fp, const char *fn)
 
/* Fill the block with input data. */
len = 0;
-   while ((!feof(fp)) && len < bsz) {
+   while ((!feof(fp)) && len < BSZ) {
p = tl->l + len;
-   len += fread(p, 1, bsz - len, fp);
+   len += fread(p, 1, BSZ - len, fp);
if (ferror(fp)) {
ierr(fn);
return;
@@ -244,6 +246,8 @@ r_buf(FILE *fp, const char *fn)
tl = TAILQ_LAST(, bfhead);
first = TAILQ_FIRST();
while (tl != NULL) {
+   struct bfelem *temp;
+
for (p = tl->l + tl->len - 1, llen = 0; p >= tl->l;
--p, ++llen) {
int start = (tl == first && p == tl->l);
@@ -251,7 +255,7 @@ r_buf(FILE *fp, const char *fn)
if ((*p == '\n') || start) {
struct bfelem *tr;
 
-   if (start && len)
+   if (start && llen)
WR(p, llen + 1);
else if (llen)
WR(p + 1, llen);
___
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: r311895 - in head: etc/mtree usr.bin/tail usr.bin/tail/tests

2017-01-11 Thread Sergey Kandaurov
On 10 January 2017 at 23:43, Alan Somers  wrote:

> Author: asomers
> Date: Tue Jan 10 20:43:32 2017
> New Revision: 311895
> URL: https://svnweb.freebsd.org/changeset/base/311895
>
> Log:
>   Fix memory leaks during "tail -r" of an irregular file
> [..]

-typedef struct bf {
> -   struct bf *next;
> -   struct bf *prev;
> -   int len;
> -   char *l;
> -} BF;
> +static const size_t bsz = 128 * 1024;
> +typedef struct bfelem {
> +   TAILQ_ENTRY(bfelem) entries;
> +   size_t len;
> +   char l[bsz];
> +} bfelem_t;
>
>
This breaks on gcc that doesn't respect const for some reason:
reverse.c:177: error: variably modified 'l' at file scope


>  /*
>   * r_buf -- display a non-regular file in reverse order by line.
> @@ -189,64 +190,42 @@ typedef struct bf {
>  static void
>  r_buf(FILE *fp, const char *fn)
>  {
> -   BF *mark, *tl, *tr;
> -   int ch, len, llen;
> +   struct bfelem *tl, *temp, *first = NULL;
> +   size_t len, llen;
>

reverse.c:194: warning: 'len' may be used uninitialized in this function

I suspect this is due to a typo on line 254.

 [..]


> /*
> -* Step through the blocks in the reverse order read.  The last
> char
> -* is special, ignore whether newline or not.
> +* Now print the lines in reverse order
> +* Outline:
> +*Scan backward for "\n",
> +*print forward to the end of the buffers
> +*free any buffers that start after the "\n" just found
> +*Loop
>  */
> -   for (mark = tl;;) {
> -   for (p = tl->l + (len = tl->len) - 1, llen = 0; len--;
> -   --p, ++llen)
> -   if (*p == '\n') {
> -   if (llen) {
> +   tl = TAILQ_LAST(, bfhead);
> +   first = TAILQ_FIRST();
> +   while (tl != NULL) {
> +   for (p = tl->l + tl->len - 1, llen = 0; p >= tl->l;
> +   --p, ++llen) {
> +   int start = (tl == first && p == tl->l);
> +
> +   if ((*p == '\n') || start) {
> +   struct bfelem *tr;
> +
> +   if (start && len)
>

here

joint patch to fix build on gcc (not tested, although tests pass)

Index: reverse.c
===
--- reverse.c(revision 311927)
+++ reverse.c(working copy)
@@ -170,11 +170,11 @@
 ierr(fn);
 }

-static const size_t bsz = 128 * 1024;
+#defineBSZ(128 * 1024)
 typedef struct bfelem {
 TAILQ_ENTRY(bfelem) entries;
 size_t len;
-char l[bsz];
+char l[BSZ];
 } bfelem_t;

 /*
@@ -216,9 +216,9 @@

 /* Fill the block with input data. */
 len = 0;
-while ((!feof(fp)) && len < bsz) {
+while ((!feof(fp)) && len < BSZ) {
 p = tl->l + len;
-len += fread(p, 1, bsz - len, fp);
+len += fread(p, 1, BSZ - len, fp);
 if (ferror(fp)) {
 ierr(fn);
 return;
@@ -251,7 +251,7 @@
 if ((*p == '\n') || start) {
 struct bfelem *tr;

-if (start && len)
+if (start && llen)
 WR(p, llen + 1);
 else if (llen)
 WR(p + 1, llen);

-- 
wbr,
pluknet
___
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: r311927 - stable/11/lib/libc/x86/sys

2017-01-11 Thread Konstantin Belousov
Author: kib
Date: Wed Jan 11 11:25:18 2017
New Revision: 311927
URL: https://svnweb.freebsd.org/changeset/base/311927

Log:
  MFC r311287:
  __vdso_gettc(): be extra careful with /dev/hpet mappings, never unmap
  the mapping which might be accessed by other threads.

Modified:
  stable/11/lib/libc/x86/sys/__vdso_gettc.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/lib/libc/x86/sys/__vdso_gettc.c
==
--- stable/11/lib/libc/x86/sys/__vdso_gettc.c   Wed Jan 11 10:20:35 2017
(r311926)
+++ stable/11/lib/libc/x86/sys/__vdso_gettc.c   Wed Jan 11 11:25:18 2017
(r311927)
@@ -1,6 +1,6 @@
 /*-
  * Copyright (c) 2012 Konstantin Belousov 
- * Copyright (c) 2016 The FreeBSD Foundation
+ * Copyright (c) 2016, 2017 The FreeBSD Foundation
  * All rights reserved.
  *
  * Portions of this software were developed by Konstantin Belousov
@@ -42,11 +42,11 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include "un-namespace.h"
+#include 
 #include 
 #include 
 #include 
 #ifdef __amd64__
-#include 
 #include 
 #endif
 #include "libc_private.h"
@@ -115,37 +115,47 @@ __vdso_rdtsc32(void)
return (rdtsc32());
 }
 
-static char *hpet_dev_map = NULL;
-static uint32_t hpet_idx = 0x;
+#defineHPET_DEV_MAP_MAX10
+static volatile char *hpet_dev_map[HPET_DEV_MAP_MAX];
 
 static void
 __vdso_init_hpet(uint32_t u)
 {
static const char devprefix[] = "/dev/hpet";
char devname[64], *c, *c1, t;
+   volatile char *new_map, *old_map;
+   uint32_t u1;
int fd;
 
c1 = c = stpcpy(devname, devprefix);
-   u = hpet_idx;
+   u1 = u;
do {
-   *c++ = u % 10 + '0';
-   u /= 10;
-   } while (u != 0);
+   *c++ = u1 % 10 + '0';
+   u1 /= 10;
+   } while (u1 != 0);
*c = '\0';
for (c--; c1 != c; c1++, c--) {
t = *c1;
*c1 = *c;
*c = t;
}
+
+   old_map = hpet_dev_map[u];
+   if (old_map != NULL)
+   return;
+
fd = _open(devname, O_RDONLY);
if (fd == -1) {
-   hpet_dev_map = MAP_FAILED;
+   atomic_cmpset_rel_ptr((volatile uintptr_t *)_dev_map[u],
+   (uintptr_t)old_map, (uintptr_t)MAP_FAILED);
return;
}
-   if (hpet_dev_map != NULL && hpet_dev_map != MAP_FAILED)
-   munmap(hpet_dev_map, PAGE_SIZE);
-   hpet_dev_map = mmap(NULL, PAGE_SIZE, PROT_READ, MAP_SHARED, fd, 0);
+   new_map = mmap(NULL, PAGE_SIZE, PROT_READ, MAP_SHARED, fd, 0);
_close(fd);
+   if (atomic_cmpset_rel_ptr((volatile uintptr_t *)_dev_map[u],
+   (uintptr_t)old_map, (uintptr_t)new_map) == 0 &&
+   new_map != MAP_FAILED)
+   munmap((void *)new_map, PAGE_SIZE);
 }
 
 #ifdef __amd64__
@@ -213,7 +223,8 @@ __vdso_hyperv_tsc(struct hyperv_reftsc *
 int
 __vdso_gettc(const struct vdso_timehands *th, u_int *tc)
 {
-   uint32_t tmp;
+   volatile char *map;
+   uint32_t idx;
 
switch (th->th_algo) {
case VDSO_TH_ALGO_X86_TSC:
@@ -221,14 +232,19 @@ __vdso_gettc(const struct vdso_timehands
__vdso_rdtsc32();
return (0);
case VDSO_TH_ALGO_X86_HPET:
-   tmp = th->th_x86_hpet_idx;
-   if (hpet_dev_map == NULL || tmp != hpet_idx) {
-   hpet_idx = tmp;
-   __vdso_init_hpet(hpet_idx);
+   idx = th->th_x86_hpet_idx;
+   if (idx >= HPET_DEV_MAP_MAX)
+   return (ENOSYS);
+   map = (volatile char *)atomic_load_acq_ptr(
+   (volatile uintptr_t *)_dev_map[idx]);
+   if (map == NULL) {
+   __vdso_init_hpet(idx);
+   map = (volatile char *)atomic_load_acq_ptr(
+   (volatile uintptr_t *)_dev_map[idx]);
}
-   if (hpet_dev_map == MAP_FAILED)
+   if (map == MAP_FAILED)
return (ENOSYS);
-   *tc = *(volatile uint32_t *)(hpet_dev_map + HPET_MAIN_COUNTER);
+   *tc = *(volatile uint32_t *)(map + HPET_MAIN_COUNTER);
return (0);
 #ifdef __amd64__
case VDSO_TH_ALGO_X86_HVTSC:
___
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: r311926 - head/contrib/netbsd-tests/lib/libc/regex

2017-01-11 Thread Ngie Cooper
Author: ngie
Date: Wed Jan 11 10:20:35 2017
New Revision: 311926
URL: https://svnweb.freebsd.org/changeset/base/311926

Log:
  Consolidate __NetBSD__ #ifdef
  
  MFC after:3 days

Modified:
  head/contrib/netbsd-tests/lib/libc/regex/debug.c

Modified: head/contrib/netbsd-tests/lib/libc/regex/debug.c
==
--- head/contrib/netbsd-tests/lib/libc/regex/debug.cWed Jan 11 09:51:34 
2017(r311925)
+++ head/contrib/netbsd-tests/lib/libc/regex/debug.cWed Jan 11 10:20:35 
2017(r311926)
@@ -48,9 +48,7 @@
 #ifdef __NetBSD__
 static void s_print(struct re_guts *, FILE *);
 static char *regchar(int);
-#endif
 
-#ifdef __NetBSD__
 /*
  * regprint - print a regexp for debugging
  */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r286649 - in head: contrib/netbsd-tests/lib/libc/locale lib/libc/tests/locale

2017-01-11 Thread Ngie Cooper (yaneurabeya)

> On Aug 11, 2015, at 6:45 PM, Craig Rodrigues  wrote:
> 
> On Tue, Aug 11, 2015 at 2:59 PM, Jilles Tjoelker  > wrote:
> Author: jilles
> Date: Tue Aug 11 21:59:36 2015
> New Revision: 286649
> URL: https://svnweb.freebsd.org/changeset/base/286649 
> 
> 
> Log:
>   Fix and re-enable UTF-8 tests.
> 
> Modified:
>   head/contrib/netbsd-tests/lib/libc/locale/t_mbrtowc.c
>   head/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c
>   head/lib/libc/tests/locale/Makefile
> 
> 
> Thanks for fixing this.  What is the procedure that FreeBSD developers need 
> to follow
> to push this kind of change upstream to NetBSD?

I’m submitting PRs with NetBSD as needed. To be frank, I’m not sure 
that this change is needed upstream (I’m probably going to #ifdef the code — 
some things I found when trying to push things back).
Thanks,
-Ngie
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

svn commit: r311925 - in head/contrib/netbsd-tests/lib/libc: . c063 gen gen/posix_spawn string sys

2017-01-11 Thread Ngie Cooper
Author: ngie
Date: Wed Jan 11 09:51:34 2017
New Revision: 311925
URL: https://svnweb.freebsd.org/changeset/base/311925

Log:
  Import testcase updates with code contributed back to NetBSD
  
  This also (inadvertently) contains an update to
  contrib/netbsd-tests/lib/libc/sys/t_wait.c (new testcases).
  
  MFC after:2 weeks
  In collaboration with:chris...@netbsd.org

Modified:
  head/contrib/netbsd-tests/lib/libc/c063/t_faccessat.c
  head/contrib/netbsd-tests/lib/libc/c063/t_fchmodat.c
  head/contrib/netbsd-tests/lib/libc/c063/t_fchownat.c
  head/contrib/netbsd-tests/lib/libc/c063/t_fexecve.c
  head/contrib/netbsd-tests/lib/libc/c063/t_fstatat.c
  head/contrib/netbsd-tests/lib/libc/c063/t_mkfifoat.c
  head/contrib/netbsd-tests/lib/libc/c063/t_mknodat.c
  head/contrib/netbsd-tests/lib/libc/c063/t_o_search.c
  head/contrib/netbsd-tests/lib/libc/c063/t_openat.c
  head/contrib/netbsd-tests/lib/libc/c063/t_readlinkat.c
  head/contrib/netbsd-tests/lib/libc/c063/t_unlinkat.c
  head/contrib/netbsd-tests/lib/libc/c063/t_utimensat.c
  head/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c
  head/contrib/netbsd-tests/lib/libc/gen/t_assert.c
  head/contrib/netbsd-tests/lib/libc/gen/t_dir.c
  head/contrib/netbsd-tests/lib/libc/gen/t_ftok.c
  head/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c
  head/contrib/netbsd-tests/lib/libc/gen/t_sleep.c
  head/contrib/netbsd-tests/lib/libc/gen/t_time.c
  head/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c
  head/contrib/netbsd-tests/lib/libc/gen/t_vis.c
  head/contrib/netbsd-tests/lib/libc/string/t_strchr.c
  head/contrib/netbsd-tests/lib/libc/string/t_strerror.c
  head/contrib/netbsd-tests/lib/libc/sys/t_access.c
  head/contrib/netbsd-tests/lib/libc/sys/t_chroot.c
  head/contrib/netbsd-tests/lib/libc/sys/t_mincore.c
  head/contrib/netbsd-tests/lib/libc/sys/t_mmap.c
  head/contrib/netbsd-tests/lib/libc/sys/t_wait.c
  head/contrib/netbsd-tests/lib/libc/t_cdb.c
Directory Properties:
  head/contrib/netbsd-tests/   (props changed)

Modified: head/contrib/netbsd-tests/lib/libc/c063/t_faccessat.c
==
--- head/contrib/netbsd-tests/lib/libc/c063/t_faccessat.c   Wed Jan 11 
09:34:42 2017(r311924)
+++ head/contrib/netbsd-tests/lib/libc/c063/t_faccessat.c   Wed Jan 11 
09:51:34 2017(r311925)
@@ -1,4 +1,4 @@
-/* $NetBSD: t_faccessat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $ */
+/* $NetBSD: t_faccessat.c,v 1.3 2017/01/10 15:13:56 christos Exp $ */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -29,8 +29,10 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: t_faccessat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $");
+__RCSID("$NetBSD: t_faccessat.c,v 1.3 2017/01/10 15:13:56 christos Exp $");
 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -39,10 +41,6 @@ __RCSID("$NetBSD: t_faccessat.c,v 1.2 20
 #include 
 #include 
 #include 
-#include 
-#ifdef __FreeBSD__
-#include 
-#endif
 
 #define DIR "dir"
 #define FILE "dir/faccessat"

Modified: head/contrib/netbsd-tests/lib/libc/c063/t_fchmodat.c
==
--- head/contrib/netbsd-tests/lib/libc/c063/t_fchmodat.cWed Jan 11 
09:34:42 2017(r311924)
+++ head/contrib/netbsd-tests/lib/libc/c063/t_fchmodat.cWed Jan 11 
09:51:34 2017(r311925)
@@ -1,4 +1,4 @@
-/* $NetBSD: t_fchmodat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $ */
+/* $NetBSD: t_fchmodat.c,v 1.3 2017/01/10 15:13:56 christos Exp $ */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -29,8 +29,10 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: t_fchmodat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $");
+__RCSID("$NetBSD: t_fchmodat.c,v 1.3 2017/01/10 15:13:56 christos Exp $");
 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -39,10 +41,6 @@ __RCSID("$NetBSD: t_fchmodat.c,v 1.2 201
 #include 
 #include 
 #include 
-#include 
-#ifdef __FreeBSD__
-#include 
-#endif
 
 #define DIR "dir"
 #define FILE "dir/fchmodat"

Modified: head/contrib/netbsd-tests/lib/libc/c063/t_fchownat.c
==
--- head/contrib/netbsd-tests/lib/libc/c063/t_fchownat.cWed Jan 11 
09:34:42 2017(r311924)
+++ head/contrib/netbsd-tests/lib/libc/c063/t_fchownat.cWed Jan 11 
09:51:34 2017(r311925)
@@ -1,4 +1,4 @@
-/* $NetBSD: t_fchownat.c,v 1.3 2013/03/17 04:46:06 jmmv Exp $ */
+/* $NetBSD: t_fchownat.c,v 1.4 2017/01/10 15:13:56 christos Exp $ */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -29,8 +29,10 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: t_fchownat.c,v 1.3 2013/03/17 04:46:06 jmmv Exp $");
+__RCSID("$NetBSD: t_fchownat.c,v 1.4 2017/01/10 15:13:56 christos Exp $");
 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -40,10 +42,6 @@ __RCSID("$NetBSD: 

svn commit: r311924 - head/contrib/netbsd-tests/lib/libc/gen

2017-01-11 Thread Ngie Cooper
Author: ngie
Date: Wed Jan 11 09:34:42 2017
New Revision: 311924
URL: https://svnweb.freebsd.org/changeset/base/311924

Log:
  Fix whitespace in comment
  
  MFC after:3 days

Modified:
  head/contrib/netbsd-tests/lib/libc/gen/t_setdomainname.c
  head/contrib/netbsd-tests/lib/libc/gen/t_sethostname.c

Modified: head/contrib/netbsd-tests/lib/libc/gen/t_setdomainname.c
==
--- head/contrib/netbsd-tests/lib/libc/gen/t_setdomainname.cWed Jan 11 
08:43:58 2017(r311923)
+++ head/contrib/netbsd-tests/lib/libc/gen/t_setdomainname.cWed Jan 11 
09:34:42 2017(r311924)
@@ -64,7 +64,7 @@ ATF_TC_BODY(setdomainname_basic, tc)
(void)memset(name, 0, sizeof(name));
 
 #ifdef __FreeBSD__
-   /* 
+   /*
 * Sanity checks to ensure that the wrong invariant isn't being
 * tested for per PR # 181127
 */

Modified: head/contrib/netbsd-tests/lib/libc/gen/t_sethostname.c
==
--- head/contrib/netbsd-tests/lib/libc/gen/t_sethostname.c  Wed Jan 11 
08:43:58 2017(r311923)
+++ head/contrib/netbsd-tests/lib/libc/gen/t_sethostname.c  Wed Jan 11 
09:34:42 2017(r311924)
@@ -66,7 +66,7 @@ ATF_TC_BODY(sethostname_basic, tc)
(void)memset(name, 0, sizeof(name));
 
 #ifdef __FreeBSD__
-   /* 
+   /*
 * Sanity checks to ensure that the wrong invariant isn't being
 * tested for per PR # 181127
 */
___
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: r311911 - in head/sys: conf dev/sdhci modules modules/sdhci_acpi

2017-01-11 Thread Ngie Cooper (yaneurabeya)

> On Jan 10, 2017, at 5:53 PM, Oleksandr Tymoshenko  wrote:
> 
> Author: gonzo
> Date: Wed Jan 11 01:53:54 2017
> New Revision: 311911
> URL: https://svnweb.freebsd.org/changeset/base/311911
> 
> Log:
>  [sdhci] Add ACPI platform support for SDHCI driver
> 
>  - Create ACPI version of SDHCI attach/detach/accessors logic. Some
>  platforms (e.g. BayTrail-based Minnowboard) expose SDHCI devices
>  via ACPI, not PCI
>  - Add sdchi_acpi kernel module
> 
>  Reviewed by: ian, imp
>  MFC after:   1 week
>  Differential Revision:   https://reviews.freebsd.org/D9112


Hi,
This broke the build for a bit because of missing headers in SRCS. 
Please MFC r311923 too.
Thank you!
-Ngie
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r311923 - head/sys/modules/sdhci_acpi

2017-01-11 Thread Ngie Cooper
Author: ngie
Date: Wed Jan 11 08:43:58 2017
New Revision: 311923
URL: https://svnweb.freebsd.org/changeset/base/311923

Log:
  Add acpi_if.h and opt_acpi.h to Makefile to unbreak "make depend" with
  sys/modules/sdhci_acpi
  
  MFC after:6 days
  X-MFC with:   r311911
  Reported by:  Jenkins

Modified:
  head/sys/modules/sdhci_acpi/Makefile

Modified: head/sys/modules/sdhci_acpi/Makefile
==
--- head/sys/modules/sdhci_acpi/MakefileWed Jan 11 08:15:18 2017
(r311922)
+++ head/sys/modules/sdhci_acpi/MakefileWed Jan 11 08:43:58 2017
(r311923)
@@ -3,6 +3,7 @@
 .PATH: ${.CURDIR}/../../dev/sdhci
 
 KMOD=  sdhci_acpi
-SRCS=  sdhci_acpi.c sdhci.h sdhci_if.h device_if.h bus_if.h pci_if.h mmcbr_if.h
+SRCS=  sdhci_acpi.c sdhci.h sdhci_if.h
+SRCS+= acpi_if.h device_if.h bus_if.h opt_acpi.h pci_if.h mmcbr_if.h
 
 .include 
___
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: r311922 - in vendor/NetBSD/tests/dist/lib/libc: . c063 gen gen/posix_spawn string sys

2017-01-11 Thread Ngie Cooper
Author: ngie
Date: Wed Jan 11 08:15:18 2017
New Revision: 311922
URL: https://svnweb.freebsd.org/changeset/base/311922

Log:
  Pull in changes from upstream for lib/libc/{c063,gen,string,sys} to address
  issues resolved in FreeBSD or support added to testcases
  
  In collaboration with:

Modified:
  vendor/NetBSD/tests/dist/lib/libc/c063/t_faccessat.c
  vendor/NetBSD/tests/dist/lib/libc/c063/t_fchmodat.c
  vendor/NetBSD/tests/dist/lib/libc/c063/t_fchownat.c
  vendor/NetBSD/tests/dist/lib/libc/c063/t_fexecve.c
  vendor/NetBSD/tests/dist/lib/libc/c063/t_fstatat.c
  vendor/NetBSD/tests/dist/lib/libc/c063/t_mkfifoat.c
  vendor/NetBSD/tests/dist/lib/libc/c063/t_mknodat.c
  vendor/NetBSD/tests/dist/lib/libc/c063/t_o_search.c
  vendor/NetBSD/tests/dist/lib/libc/c063/t_openat.c
  vendor/NetBSD/tests/dist/lib/libc/c063/t_readlinkat.c
  vendor/NetBSD/tests/dist/lib/libc/c063/t_unlinkat.c
  vendor/NetBSD/tests/dist/lib/libc/c063/t_utimensat.c
  vendor/NetBSD/tests/dist/lib/libc/gen/posix_spawn/t_fileactions.c
  vendor/NetBSD/tests/dist/lib/libc/gen/t_assert.c
  vendor/NetBSD/tests/dist/lib/libc/gen/t_dir.c
  vendor/NetBSD/tests/dist/lib/libc/gen/t_ftok.c
  vendor/NetBSD/tests/dist/lib/libc/gen/t_humanize_number.c
  vendor/NetBSD/tests/dist/lib/libc/gen/t_sleep.c
  vendor/NetBSD/tests/dist/lib/libc/gen/t_time.c
  vendor/NetBSD/tests/dist/lib/libc/gen/t_ttyname.c
  vendor/NetBSD/tests/dist/lib/libc/gen/t_vis.c
  vendor/NetBSD/tests/dist/lib/libc/string/t_strchr.c
  vendor/NetBSD/tests/dist/lib/libc/string/t_strerror.c
  vendor/NetBSD/tests/dist/lib/libc/sys/t_access.c
  vendor/NetBSD/tests/dist/lib/libc/sys/t_chroot.c
  vendor/NetBSD/tests/dist/lib/libc/sys/t_mincore.c
  vendor/NetBSD/tests/dist/lib/libc/sys/t_mmap.c
  vendor/NetBSD/tests/dist/lib/libc/sys/t_wait.c
  vendor/NetBSD/tests/dist/lib/libc/t_cdb.c

Modified: vendor/NetBSD/tests/dist/lib/libc/c063/t_faccessat.c
==
--- vendor/NetBSD/tests/dist/lib/libc/c063/t_faccessat.cWed Jan 11 
07:46:01 2017(r311921)
+++ vendor/NetBSD/tests/dist/lib/libc/c063/t_faccessat.cWed Jan 11 
08:15:18 2017(r311922)
@@ -1,4 +1,4 @@
-/* $NetBSD: t_faccessat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $ */
+/* $NetBSD: t_faccessat.c,v 1.3 2017/01/10 15:13:56 christos Exp $ */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -29,8 +29,10 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: t_faccessat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $");
+__RCSID("$NetBSD: t_faccessat.c,v 1.3 2017/01/10 15:13:56 christos Exp $");
 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -39,7 +41,6 @@ __RCSID("$NetBSD: t_faccessat.c,v 1.2 20
 #include 
 #include 
 #include 
-#include 
 
 #define DIR "dir"
 #define FILE "dir/faccessat"

Modified: vendor/NetBSD/tests/dist/lib/libc/c063/t_fchmodat.c
==
--- vendor/NetBSD/tests/dist/lib/libc/c063/t_fchmodat.c Wed Jan 11 07:46:01 
2017(r311921)
+++ vendor/NetBSD/tests/dist/lib/libc/c063/t_fchmodat.c Wed Jan 11 08:15:18 
2017(r311922)
@@ -1,4 +1,4 @@
-/* $NetBSD: t_fchmodat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $ */
+/* $NetBSD: t_fchmodat.c,v 1.3 2017/01/10 15:13:56 christos Exp $ */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -29,8 +29,10 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: t_fchmodat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $");
+__RCSID("$NetBSD: t_fchmodat.c,v 1.3 2017/01/10 15:13:56 christos Exp $");
 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -39,7 +41,6 @@ __RCSID("$NetBSD: t_fchmodat.c,v 1.2 201
 #include 
 #include 
 #include 
-#include 
 
 #define DIR "dir"
 #define FILE "dir/fchmodat"

Modified: vendor/NetBSD/tests/dist/lib/libc/c063/t_fchownat.c
==
--- vendor/NetBSD/tests/dist/lib/libc/c063/t_fchownat.c Wed Jan 11 07:46:01 
2017(r311921)
+++ vendor/NetBSD/tests/dist/lib/libc/c063/t_fchownat.c Wed Jan 11 08:15:18 
2017(r311922)
@@ -1,4 +1,4 @@
-/* $NetBSD: t_fchownat.c,v 1.3 2013/03/17 04:46:06 jmmv Exp $ */
+/* $NetBSD: t_fchownat.c,v 1.4 2017/01/10 15:13:56 christos Exp $ */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -29,8 +29,10 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: t_fchownat.c,v 1.3 2013/03/17 04:46:06 jmmv Exp $");
+__RCSID("$NetBSD: t_fchownat.c,v 1.4 2017/01/10 15:13:56 christos Exp $");
 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -40,7 +42,6 @@ __RCSID("$NetBSD: t_fchownat.c,v 1.3 201
 #include 
 #include 
 #include 
-#include 
 
 #define DIR "dir"
 #define FILE "dir/fchownat"

Modified: vendor/NetBSD/tests/dist/lib/libc/c063/t_fexecve.c
==
---