svn commit: r324148 - in head: contrib/libarchive/cat/test contrib/libarchive/cpio contrib/libarchive/cpio/test contrib/libarchive/libarchive contrib/libarchive/libarchive/test contrib/libarchive/t...

2017-09-30 Thread Martin Matuska
Author: mm
Date: Sun Oct  1 00:40:23 2017
New Revision: 324148
URL: https://svnweb.freebsd.org/changeset/base/324148

Log:
  MFV r324145,324147:
  Sync libarchive with vendor.
  
  Relevant vendor changes:
PR #905: Support for Zstandard read and write filters
PR #922: Avoid overflow when reading corrupt cpio archive
Issue #935: heap-based buffer overflow in xml_data (CVE-2017-14166)
OSS-Fuzz 2936: Place a limit on the mtree line length
OSS-Fuzz 2394: Ensure that the ZIP AES extension header is large enough
OSS-Fuzz 573: Read off-by-one error in RAR archives (CVE-2017-14502)
  
  MFC after:1 week
  Security: CVE-2017-14166, CVE-2017-14502

Added:
  head/contrib/libarchive/cat/test/test_empty.zst.uu
 - copied unchanged from r324145, 
vendor/libarchive/dist/cat/test/test_empty.zst.uu
  head/contrib/libarchive/cat/test/test_empty_zstd.c
 - copied unchanged from r324145, 
vendor/libarchive/dist/cat/test/test_empty_zstd.c
  head/contrib/libarchive/cat/test/test_expand.zst.uu
 - copied unchanged from r324145, 
vendor/libarchive/dist/cat/test/test_expand.zst.uu
  head/contrib/libarchive/cat/test/test_expand_zstd.c
 - copied unchanged from r324145, 
vendor/libarchive/dist/cat/test/test_expand_zstd.c
  head/contrib/libarchive/cpio/test/test_extract.cpio.zst.uu
 - copied unchanged from r324145, 
vendor/libarchive/dist/cpio/test/test_extract.cpio.zst.uu
  head/contrib/libarchive/cpio/test/test_extract_cpio_zstd.c
 - copied unchanged from r324145, 
vendor/libarchive/dist/cpio/test/test_extract_cpio_zstd.c
  head/contrib/libarchive/cpio/test/test_option_zstd.c
 - copied unchanged from r324145, 
vendor/libarchive/dist/cpio/test/test_option_zstd.c
  head/contrib/libarchive/libarchive/archive_read_support_filter_zstd.c
 - copied unchanged from r324145, 
vendor/libarchive/dist/libarchive/archive_read_support_filter_zstd.c
  head/contrib/libarchive/libarchive/archive_write_add_filter_zstd.c
 - copied unchanged from r324145, 
vendor/libarchive/dist/libarchive/archive_write_add_filter_zstd.c
  head/contrib/libarchive/libarchive/test/test_compat_zstd.c
 - copied unchanged from r324145, 
vendor/libarchive/dist/libarchive/test/test_compat_zstd.c
  head/contrib/libarchive/libarchive/test/test_compat_zstd_1.tar.zst.uu
 - copied unchanged from r324145, 
vendor/libarchive/dist/libarchive/test/test_compat_zstd_1.tar.zst.uu
  head/contrib/libarchive/libarchive/test/test_write_filter_zstd.c
 - copied unchanged from r324145, 
vendor/libarchive/dist/libarchive/test/test_write_filter_zstd.c
  head/contrib/libarchive/tar/test/test_extract.tar.zst.uu
 - copied unchanged from r324145, 
vendor/libarchive/dist/tar/test/test_extract.tar.zst.uu
  head/contrib/libarchive/tar/test/test_extract_tar_zstd.c
 - copied unchanged from r324145, 
vendor/libarchive/dist/tar/test/test_extract_tar_zstd.c
  head/contrib/libarchive/tar/test/test_option_zstd.c
 - copied unchanged from r324145, 
vendor/libarchive/dist/tar/test/test_option_zstd.c
Modified:
  head/contrib/libarchive/cpio/bsdcpio.1
  head/contrib/libarchive/cpio/cmdline.c
  head/contrib/libarchive/cpio/cpio.c
  head/contrib/libarchive/cpio/cpio.h
  head/contrib/libarchive/libarchive/archive.h
  head/contrib/libarchive/libarchive/archive_cmdline.c
  head/contrib/libarchive/libarchive/archive_platform.h
  head/contrib/libarchive/libarchive/archive_read_append_filter.c
  head/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c
  head/contrib/libarchive/libarchive/archive_read_filter.3
  head/contrib/libarchive/libarchive/archive_read_support_filter_all.c
  head/contrib/libarchive/libarchive/archive_read_support_format_cpio.c
  head/contrib/libarchive/libarchive/archive_read_support_format_mtree.c
  head/contrib/libarchive/libarchive/archive_read_support_format_rar.c
  head/contrib/libarchive/libarchive/archive_read_support_format_tar.c
  head/contrib/libarchive/libarchive/archive_read_support_format_xar.c
  head/contrib/libarchive/libarchive/archive_read_support_format_zip.c
  head/contrib/libarchive/libarchive/archive_string.c
  head/contrib/libarchive/libarchive/archive_version_details.c
  head/contrib/libarchive/libarchive/archive_write.3
  head/contrib/libarchive/libarchive/archive_write_add_filter.c
  head/contrib/libarchive/libarchive/archive_write_add_filter_by_name.c
  head/contrib/libarchive/libarchive/archive_write_filter.3
  head/contrib/libarchive/libarchive/archive_write_set_format_pax.c
  
head/contrib/libarchive/libarchive/test/test_archive_write_add_filter_by_name.c
  head/contrib/libarchive/libarchive/test/test_fuzz.c
  head/contrib/libarchive/tar/bsdtar.1
  head/contrib/libarchive/tar/bsdtar.c
  head/contrib/libarchive/tar/bsdtar.h
  head/contrib/libarchive/tar/cmdline.c
  head/contrib/libarchive/tar/creation_set.c
  head/contrib/libarchive/tar/test/test_option_acls.c
  head/contrib/libarchive/test_utils/test_common.h
  head/contrib/libarchive/test_utils/test_main.c
  

svn commit: r324147 - vendor/libarchive/dist/tar

2017-09-30 Thread Martin Matuska
Author: mm
Date: Sun Oct  1 00:26:06 2017
New Revision: 324147
URL: https://svnweb.freebsd.org/changeset/base/324147

Log:
  Update libarchive to git 47636913968b0b0dbde770f4234930e84de0e37c
  
  Relevant vendor changes:
Tar manpage fix

Modified:
  vendor/libarchive/dist/tar/bsdtar.1

Modified: vendor/libarchive/dist/tar/bsdtar.1
==
--- vendor/libarchive/dist/tar/bsdtar.1 Sat Sep 30 23:41:28 2017
(r324146)
+++ vendor/libarchive/dist/tar/bsdtar.1 Sun Oct  1 00:26:06 2017
(r324147)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd February 25, 2017
+.Dd October 1, 2017
 .Dt TAR 1
 .Os
 .Sh NAME
@@ -302,19 +302,18 @@ containing the string
 Compress the resulting archive with
 .Xr xz 1 .
 In extract or list modes, this option is ignored.
-Note that, unlike other
+Note that this
 .Nm tar
-implementations, this implementation recognizes XZ compression
-automatically when reading archives.
+implementation recognizes XZ compression automatically when reading archives.
 .It Fl j , Fl Fl bzip , Fl Fl bzip2 , Fl Fl bunzip2
 (c mode only)
 Compress the resulting archive with
 .Xr bzip2 1 .
 In extract or list modes, this option is ignored.
-Note that, unlike other
+Note that this
 .Nm tar
-implementations, this implementation recognizes bzip2 compression
-automatically when reading archives.
+implementation recognizes bzip2 compression automatically when reading
+archives.
 .It Fl k , Fl Fl keep-old-files
 (x mode only)
 Do not overwrite existing files.
@@ -337,29 +336,41 @@ Issue a warning message unless all links to each file 
 Compress the resulting archive with
 .Xr lrzip 1 .
 In extract or list modes, this option is ignored.
+Note that this
+.Nm tar
+implementation recognizes lrzip compression automatically when reading
+archives.
 .It Fl Fl lz4
 (c mode only)
 Compress the archive with lz4-compatible compression before writing it.
-In input mode, this option is ignored; lz4 compression is recognized
-automatically on input.
+In extract or list modes, this option is ignored.
+Note that this
+.Nm tar
+implementation recognizes lz4 compression automatically when reading archives.
 .It Fl Fl zstd
+(c mode only)
 Compress the archive with zstd-compatible compression before writing it.
-In input mode, this option is ignored; lz4 compression is recognized
-automatically on input.
+In extract or list modes, this option is ignored.
+Note that this
+.Nm tar
+implementation recognizes zstd compression automatically when reading archives.
 .It Fl Fl lzma
 (c mode only) Compress the resulting archive with the original LZMA algorithm.
+In extract or list modes, this option is ignored.
 Use of this option is discouraged and new archives should be created with
 .Fl Fl xz
 instead.
-Note that, unlike other
+Note that this
 .Nm tar
-implementations, this implementation recognizes LZMA compression
-automatically when reading archives.
+implementation recognizes LZMA compression automatically when reading archives.
 .It Fl Fl lzop
 (c mode only)
 Compress the resulting archive with
 .Xr lzop 1 .
 In extract or list modes, this option is ignored.
+Note that this
+.Nm tar
+implementation recognizes LZO compression automatically when reading archives.
 .It Fl m , Fl Fl modification-time
 (x mode only)
 Do not extract modification time.
@@ -832,28 +843,28 @@ is run in x mode as root.
 Compress the resulting archive with
 .Xr bzip2 1 .
 In extract or list modes, this option is ignored.
-Note that, unlike other
+Note that this
 .Nm tar
-implementations, this implementation recognizes bzip2 compression
-automatically when reading archives.
+implementation recognizes bzip2 compression automatically when reading
+archives.
 .It Fl Z , Fl Fl compress , Fl Fl uncompress
 (c mode only)
 Compress the resulting archive with
 .Xr compress 1 .
 In extract or list modes, this option is ignored.
-Note that, unlike other
+Note that this
 .Nm tar
-implementations, this implementation recognizes compress compression
-automatically when reading archives.
+implementation recognizes compress compression automatically when reading
+archives.
 .It Fl z , Fl Fl gunzip , Fl Fl gzip
 (c mode only)
 Compress the resulting archive with
 .Xr gzip 1 .
 In extract or list modes, this option is ignored.
-Note that, unlike other
+Note that this
 .Nm tar
-implementations, this implementation recognizes gzip compression
-automatically when reading archives.
+implementation recognizes gzip compression automatically when reading
+archives.
 .El
 .Sh ENVIRONMENT
 The following environment variables affect the execution of
___
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: r324146 - head/sys/kern

2017-09-30 Thread Mark Johnston
Author: markj
Date: Sat Sep 30 23:41:28 2017
New Revision: 324146
URL: https://svnweb.freebsd.org/changeset/base/324146

Log:
  Have uiomove_object_page() keep accessed pages in the active queue.
  
  Previously, uiomove_object_page() would maintain LRU by requeuing the
  accessed page. This involves acquiring one of the heavily contended page
  queue locks. Moreover, it is unnecessarily expensive for pages in the
  active queue.
  
  As of r254304 the page daemon continually performs a slow scan of the
  active queue, with the effect that unreferenced pages are gradually
  moved to the inactive queue, from which they can be reclaimed. Prior to
  that revision, the active queue was scanned only during shortages of
  free and inactive pages, meaning that unreferenced pages could get
  "stuck" in the queue. Thus, tmpfs was required to use the inactive queue
  and requeue pages in order to maintain LRU. Now that this is no longer
  the case, tmpfs I/O operations can use the active queue and avoid the
  page queue locks in most cases, instead setting PGA_REFERENCED on
  referenced pages to provide pseudo-LRU.
  
  Reviewed by:  alc (previous version)
  MFC after:2 weeks

Modified:
  head/sys/kern/uipc_shm.c

Modified: head/sys/kern/uipc_shm.c
==
--- head/sys/kern/uipc_shm.cSat Sep 30 23:33:19 2017(r324145)
+++ head/sys/kern/uipc_shm.cSat Sep 30 23:41:28 2017(r324146)
@@ -209,12 +209,10 @@ uiomove_object_page(vm_object_t obj, size_t len, struc
}
vm_page_lock(m);
vm_page_hold(m);
-   if (m->queue == PQ_NONE) {
-   vm_page_deactivate(m);
-   } else {
-   /* Requeue to maintain LRU ordering. */
-   vm_page_requeue(m);
-   }
+   if (m->queue != PQ_ACTIVE)
+   vm_page_activate(m);
+   else
+   vm_page_reference(m);
vm_page_unlock(m);
VM_OBJECT_WUNLOCK(obj);
error = uiomove_fromphys(, offset, tlen, uio);
___
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: r324145 - in vendor/libarchive/dist: . build/cmake build/pkgconfig cat/test contrib/android cpio cpio/test libarchive libarchive/test tar tar/test test_utils

2017-09-30 Thread Martin Matuska
Author: mm
Date: Sat Sep 30 23:33:19 2017
New Revision: 324145
URL: https://svnweb.freebsd.org/changeset/base/324145

Log:
  Update vendor/libarchive to git 92366744a52f3fa83c3899e375e415a5080a05f2
  
  Relevant vendor changes:
PR #905: Support for Zstandard read and write filters
PR #922: Avoid overflow when reading corrupt cpio archive
Issue #935: heap-based buffer overflow in xml_data (CVE-2017-14166)
OSS-Fuzz 2936: Place a limit on the mtree line length
OSS-Fuzz 2394: Ensure that the ZIP AES extension header is large enough
OSS-Fuzz 573: Read off-by-one error in RAR archives (CVE-2017-14502)
  
  Security: CVE-2017-14166, CVE-2017-14502

Added:
  vendor/libarchive/dist/cat/test/test_empty.zst.uu
  vendor/libarchive/dist/cat/test/test_empty_zstd.c   (contents, props changed)
  vendor/libarchive/dist/cat/test/test_expand.zst.uu
  vendor/libarchive/dist/cat/test/test_expand_zstd.c   (contents, props changed)
  vendor/libarchive/dist/cpio/test/test_extract.cpio.zst.uu
  vendor/libarchive/dist/cpio/test/test_extract_cpio_zstd.c   (contents, props 
changed)
  vendor/libarchive/dist/cpio/test/test_option_zstd.c   (contents, props 
changed)
  vendor/libarchive/dist/libarchive/archive_read_support_filter_zstd.c   
(contents, props changed)
  vendor/libarchive/dist/libarchive/archive_write_add_filter_zstd.c   
(contents, props changed)
  vendor/libarchive/dist/libarchive/test/test_compat_zstd.c   (contents, props 
changed)
  vendor/libarchive/dist/libarchive/test/test_compat_zstd_1.tar.zst.uu
  vendor/libarchive/dist/libarchive/test/test_write_filter_zstd.c   (contents, 
props changed)
  vendor/libarchive/dist/tar/test/test_extract.tar.zst.uu
  vendor/libarchive/dist/tar/test/test_extract_tar_zstd.c   (contents, props 
changed)
  vendor/libarchive/dist/tar/test/test_option_zstd.c   (contents, props changed)
Modified:
  vendor/libarchive/dist/.travis.yml
  vendor/libarchive/dist/CMakeLists.txt
  vendor/libarchive/dist/Makefile.am
  vendor/libarchive/dist/build/cmake/config.h.in
  vendor/libarchive/dist/build/pkgconfig/libarchive.pc.in
  vendor/libarchive/dist/cat/test/CMakeLists.txt
  vendor/libarchive/dist/configure.ac
  vendor/libarchive/dist/contrib/android/Android.mk
  vendor/libarchive/dist/cpio/bsdcpio.1
  vendor/libarchive/dist/cpio/cmdline.c
  vendor/libarchive/dist/cpio/cpio.c
  vendor/libarchive/dist/cpio/cpio.h
  vendor/libarchive/dist/cpio/test/CMakeLists.txt
  vendor/libarchive/dist/libarchive/CMakeLists.txt
  vendor/libarchive/dist/libarchive/archive.h
  vendor/libarchive/dist/libarchive/archive_cmdline.c
  vendor/libarchive/dist/libarchive/archive_platform.h
  vendor/libarchive/dist/libarchive/archive_read_append_filter.c
  vendor/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c
  vendor/libarchive/dist/libarchive/archive_read_filter.3
  vendor/libarchive/dist/libarchive/archive_read_support_filter_all.c
  vendor/libarchive/dist/libarchive/archive_read_support_format_cpio.c
  vendor/libarchive/dist/libarchive/archive_read_support_format_mtree.c
  vendor/libarchive/dist/libarchive/archive_read_support_format_rar.c
  vendor/libarchive/dist/libarchive/archive_read_support_format_tar.c
  vendor/libarchive/dist/libarchive/archive_read_support_format_xar.c
  vendor/libarchive/dist/libarchive/archive_read_support_format_zip.c
  vendor/libarchive/dist/libarchive/archive_string.c
  vendor/libarchive/dist/libarchive/archive_version_details.c
  vendor/libarchive/dist/libarchive/archive_write.3
  vendor/libarchive/dist/libarchive/archive_write_add_filter.c
  vendor/libarchive/dist/libarchive/archive_write_add_filter_by_name.c
  vendor/libarchive/dist/libarchive/archive_write_filter.3
  vendor/libarchive/dist/libarchive/archive_write_set_format_pax.c
  vendor/libarchive/dist/libarchive/test/CMakeLists.txt
  vendor/libarchive/dist/libarchive/test/test_archive_write_add_filter_by_name.c
  vendor/libarchive/dist/libarchive/test/test_fuzz.c
  vendor/libarchive/dist/tar/bsdtar.1
  vendor/libarchive/dist/tar/bsdtar.c
  vendor/libarchive/dist/tar/bsdtar.h
  vendor/libarchive/dist/tar/cmdline.c
  vendor/libarchive/dist/tar/creation_set.c
  vendor/libarchive/dist/tar/test/CMakeLists.txt
  vendor/libarchive/dist/tar/test/test_option_acls.c
  vendor/libarchive/dist/test_utils/test_common.h
  vendor/libarchive/dist/test_utils/test_main.c

Modified: vendor/libarchive/dist/.travis.yml
==
--- vendor/libarchive/dist/.travis.yml  Sat Sep 30 21:00:46 2017
(r324144)
+++ vendor/libarchive/dist/.travis.yml  Sat Sep 30 23:33:19 2017
(r324145)
@@ -25,6 +25,6 @@ matrix:
 before_install:
   - if [ `uname` = "Darwin" ]; then brew update; fi
 install:
-  - if [ `uname` = "Darwin" ]; then brew install xz lzop lz4; fi
+  - if [ `uname` = "Darwin" ]; then brew install xz lzop lz4 zstd; fi
 script:
   - build/ci_build.sh

Modified: vendor/libarchive/dist/CMakeLists.txt

svn commit: r324144 - head/sys/dev/usb/wlan

2017-09-30 Thread Andriy Voskoboinyk
Author: avos
Date: Sat Sep 30 21:00:46 2017
New Revision: 324144
URL: https://svnweb.freebsd.org/changeset/base/324144

Log:
  uath(4): fix varible types, add missing checks for descriptor / command
  header structure fields.
  
  Reported by:  hselasky
  Reviewed by:  hselasky
  Differential Revision:https://reviews.freebsd.org/D11786

Modified:
  head/sys/dev/usb/wlan/if_uath.c

Modified: head/sys/dev/usb/wlan/if_uath.c
==
--- head/sys/dev/usb/wlan/if_uath.c Sat Sep 30 21:00:08 2017
(r324143)
+++ head/sys/dev/usb/wlan/if_uath.c Sat Sep 30 21:00:46 2017
(r324144)
@@ -2201,17 +2201,19 @@ uath_sysctl_node(struct uath_softc *sc)
 
 #undef UATH_SYSCTL_STAT_ADD32
 
+CTASSERT(sizeof(u_int) >= sizeof(uint32_t));
+
 static void
 uath_cmdeof(struct uath_softc *sc, struct uath_cmd *cmd)
 {
struct uath_cmd_hdr *hdr;
-   int dlen;
+   uint32_t dlen;
 
hdr = (struct uath_cmd_hdr *)cmd->buf;
/* NB: msgid is passed thru w/o byte swapping */
 #ifdef UATH_DEBUG
if (sc->sc_debug & UATH_DEBUG_CMDS) {
-   int len = be32toh(hdr->len);
+   uint32_t len = be32toh(hdr->len);
printf("%s: %s [ix %u] len %u status %u\n",
__func__, uath_codename(be32toh(hdr->code)),
hdr->msgid, len, be32toh(hdr->magic));
@@ -2227,15 +2229,9 @@ uath_cmdeof(struct uath_softc *sc, struct uath_cmd *cm
switch (hdr->code & 0xff) {
/* reply to a read command */
default:
-   dlen = hdr->len - sizeof(*hdr);
-   if (dlen < 0) {
-   device_printf(sc->sc_dev,
-   "Invalid header length %d\n", dlen);
-   return;
-   }
DPRINTF(sc, UATH_DEBUG_RX_PROC | UATH_DEBUG_RECV_ALL,
-   "%s: code %d data len %u\n",
-   __func__, hdr->code & 0xff, dlen);
+   "%s: code %d hdr len %u\n",
+   __func__, hdr->code & 0xff, hdr->len);
/*
 * The first response from the target after the
 * HOST_AVAILABLE has an invalid msgid so we must
@@ -2245,8 +2241,8 @@ uath_cmdeof(struct uath_softc *sc, struct uath_cmd *cm
uint32_t *rp = (uint32_t *)(hdr+1);
u_int olen;
 
-   if (!(sizeof(*hdr) <= hdr->len &&
- hdr->len < UATH_MAX_CMDSZ)) {
+   if (sizeof(*hdr) > hdr->len ||
+   hdr->len >= UATH_MAX_CMDSZ) {
device_printf(sc->sc_dev,
"%s: invalid WDC msg length %u; "
"msg ignored\n", __func__, hdr->len);
@@ -2258,7 +2254,8 @@ uath_cmdeof(struct uath_softc *sc, struct uath_cmd *cm
 * number of bytes--unless it's 0 in which
 * case a single 32-bit word should be present.
 */
-   if (dlen >= (int)sizeof(uint32_t)) {
+   dlen = hdr->len - sizeof(*hdr);
+   if (dlen >= sizeof(uint32_t)) {
olen = be32toh(rp[0]);
dlen -= sizeof(uint32_t);
if (olen == 0) {
@@ -2278,7 +2275,7 @@ uath_cmdeof(struct uath_softc *sc, struct uath_cmd *cm
cmd->olen);
olen = cmd->olen;
}
-   if (olen > (u_int)dlen) {
+   if (olen > dlen) {
/* XXX complain, shouldn't happen */
device_printf(sc->sc_dev,
"%s: cmd 0x%x olen %u dlen %u\n",
@@ -2300,8 +2297,10 @@ uath_cmdeof(struct uath_softc *sc, struct uath_cmd *cm
return;
}
dlen = hdr->len - sizeof(*hdr);
-   if (dlen != (int)sizeof(uint32_t)) {
-   /* XXX something wrong */
+   if (dlen != sizeof(uint32_t)) {
+   device_printf(sc->sc_dev,
+   "%s: dlen (%u) != %zu!\n",
+   __func__, dlen, sizeof(uint32_t));
return;
}
/* XXX have submitter do this */
@@ -2330,6 +2329,7 @@ uath_intr_rx_callback(struct usb_xfer *xfer, usb_error
 {
struct uath_softc *sc = usbd_xfer_softc(xfer);
struct uath_cmd *cmd;
+   struct uath_cmd_hdr *hdr;
struct usb_page_cache *pc;
int actlen;
 
@@ -2347,10 +2347,25 @@ uath_intr_rx_callback(struct usb_xfer *xfer, usb_error
STAILQ_INSERT_TAIL(>sc_cmd_inactive, cmd, 

svn commit: r324143 - head

2017-09-30 Thread Ngie Cooper
Author: ngie
Date: Sat Sep 30 21:00:08 2017
New Revision: 324143
URL: https://svnweb.freebsd.org/changeset/base/324143

Log:
  Adjust r322633 to only apply to libexec/rtld-elf, and not usr.bin/ldd,
  when running build32/install32
  
  This unbreaks installing usr.bin/ldd as ldd32 when NO_RTLD is defined.
  
  MFC after:  1 week
  MFC with:   r322633

Modified:
  head/Makefile.libcompat

Modified: head/Makefile.libcompat
==
--- head/Makefile.libcompat Sat Sep 30 20:50:31 2017(r324142)
+++ head/Makefile.libcompat Sat Sep 30 21:00:08 2017(r324143)
@@ -179,10 +179,12 @@ build${libcompat}: .PHONY
 .endfor
${_+_}cd ${.CURDIR}; \
${LIBCOMPATWMAKE} -f Makefile.inc1 -DNO_FSCHG libraries
-.if ${libcompat} == "32" && !defined(NO_RTLD)
+.if ${libcompat} == "32"
 .for _t in ${_obj} all
+.if !defined(NO_RTLD)
${_+_}cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 
${LIBCOMPATWMAKE} \
-DNO_FSCHG DIRPRFX=libexec/rtld-elf/ ${_t}
+.endif
${_+_}cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIBCOMPATWMAKE} \
DIRPRFX=usr.bin/ldd ${_t}
 .endfor
@@ -192,9 +194,11 @@ distribute${libcompat} install${libcompat}: .PHONY
 .for _dir in ${_LC_LIBDIRS.yes}
${_+_}cd ${.CURDIR}/${_dir}; ${LIBCOMPATIMAKE} 
${.TARGET:S/${libcompat}$//}
 .endfor
-.if ${libcompat} == "32" && !defined(NO_RTLD)
+.if ${libcompat} == "32"
+.if !defined(NO_RTLD)
${_+_}cd ${.CURDIR}/libexec/rtld-elf; \
PROG=ld-elf32.so.1 ${LIBCOMPATIMAKE} ${.TARGET:S/32$//}
+.endif
${_+_}cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIBCOMPATIMAKE} \
${.TARGET:S/32$//}
 .endif
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r324142 - stable/10/usr.sbin/bootparamd/callbootd

2017-09-30 Thread Ngie Cooper
Author: ngie
Date: Sat Sep 30 20:50:31 2017
New Revision: 324142
URL: https://svnweb.freebsd.org/changeset/base/324142

Log:
  MFC r322635:
  
  Fix WARNS
  
  - Remove ad hoc inet_ntoa prototype declaration; it's already handled
by the included headers.
  - De-K the function prototypes for eachres_whoami(..),
eachres_getfile(..), and main(..).
  
  PR:   71667
  Tested with:  clang (5.0), gcc (4.2.1, 5)

Modified:
  stable/10/usr.sbin/bootparamd/callbootd/callbootd.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/bootparamd/callbootd/callbootd.c
==
--- stable/10/usr.sbin/bootparamd/callbootd/callbootd.c Sat Sep 30 20:48:02 
2017(r324141)
+++ stable/10/usr.sbin/bootparamd/callbootd/callbootd.c Sat Sep 30 20:50:31 
2017(r324142)
@@ -32,15 +32,12 @@ int broadcast;
 char cln[MAX_MACHINE_NAME+1];
 char dmn[MAX_MACHINE_NAME+1];
 char path[MAX_PATH_LEN+1];
-extern char *inet_ntoa();
 static void usage(void);
 int printgetfile(bp_getfile_res *);
 int printwhoami(bp_whoami_res *);
 
-bool_t
-eachres_whoami(resultp, raddr)
-bp_whoami_res *resultp;
-struct sockaddr_in *raddr;
+static bool_t
+eachres_whoami(bp_whoami_res *resultp, struct sockaddr_in *raddr)
 {
   struct hostent *he;
 
@@ -51,10 +48,8 @@ struct sockaddr_in *raddr;
   return(0);
 }
 
-bool_t
-eachres_getfile(resultp, raddr)
-bp_getfile_res *resultp;
-struct sockaddr_in *raddr;
+static bool_t
+eachres_getfile(bp_getfile_res *resultp, struct sockaddr_in *raddr)
 {
   struct hostent *he;
 
@@ -67,9 +62,7 @@ struct sockaddr_in *raddr;
 
 
 int
-main(argc, argv)
-int argc;
-char **argv;
+main(int argc, char **argv)
 {
   char *server;
 
___
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: r324141 - stable/10/share/man/man5

2017-09-30 Thread Ngie Cooper
Author: ngie
Date: Sat Sep 30 20:48:02 2017
New Revision: 324141
URL: https://svnweb.freebsd.org/changeset/base/324141

Log:
  Regenerate src.conf(5) per r324140

Modified:
  stable/10/share/man/man5/src.conf.5

Modified: stable/10/share/man/man5/src.conf.5
==
--- stable/10/share/man/man5/src.conf.5 Sat Sep 30 20:46:34 2017
(r324140)
+++ stable/10/share/man/man5/src.conf.5 Sat Sep 30 20:48:02 2017
(r324141)
@@ -1,7 +1,7 @@
 .\" DO NOT EDIT-- this file is automatically generated.
 .\" from FreeBSD: stable/10/tools/build/options/makeman 318614 2017-05-22 
06:08:20Z ngie
 .\" $FreeBSD$
-.Dd August 5, 2017
+.Dd September 30, 2017
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -860,6 +860,12 @@ entries.
 .It Va WITHOUT_NLS
 .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_NLS 156932 2006-03-21 
07:50:50Z ru
 Set to not build NLS catalogs.
+When set, it also enforces the following options:
+.Pp
+.Bl -item -compact
+.It
+.Va WITHOUT_NLS_CATALOGS
+.El
 .It Va WITHOUT_NLS_CATALOGS
 .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_NLS_CATALOGS 156932 
2006-03-21 07:50:50Z ru
 Set to not build NLS catalog support for
___
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: r324140 - stable/10/share/mk

2017-09-30 Thread Ngie Cooper
Author: ngie
Date: Sat Sep 30 20:46:34 2017
New Revision: 324140
URL: https://svnweb.freebsd.org/changeset/base/324140

Log:
  MFC r321952:
  
  Allowing MK_NLS_CATALOGS to be enabled if MK_NLS == no doesn't make a whole 
lot
  of sense. Anchor MK_NLS_CATALOGS being enabled off of MK_NLS.

Modified:
  stable/10/share/mk/bsd.own.mk
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/share/mk/bsd.own.mk
==
--- stable/10/share/mk/bsd.own.mk   Sat Sep 30 20:44:25 2017
(r324139)
+++ stable/10/share/mk/bsd.own.mk   Sat Sep 30 20:46:34 2017
(r324140)
@@ -569,6 +569,10 @@ MK_ATM:=   no
 MK_BLUETOOTH:= no
 .endif
 
+.if ${MK_NLS} == "no"
+MK_NLS_CATALOGS:= no
+.endif
+
 .if ${MK_OPENSSL} == "no"
 MK_OPENSSH:=   no
 MK_KERBEROS:=  no
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r324139 - in stable/10: bin sbin usr.bin usr.sbin

2017-09-30 Thread Ngie Cooper
Author: ngie
Date: Sat Sep 30 20:44:25 2017
New Revision: 324139
URL: https://svnweb.freebsd.org/changeset/base/324139

Log:
  MFC r322951:
  
  Respect MK_TCSH with build-tools and native-xtools
  
  This helps reduce the WORLDTMP footprint slightly.
  
  Based on a patch I submitted 5 years ago to GNATS.
  
  PR:   174051
  Relnotes: yes (anyone who cross-builds with MK_TCSH=yes will run into
 build failures if the host doesn't have tcsh(1))
  Reminded by:  Fabian Keil 

Modified:
  stable/10/bin/Makefile
  stable/10/sbin/Makefile
  stable/10/usr.bin/Makefile
  stable/10/usr.sbin/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/bin/Makefile
==
--- stable/10/bin/Makefile  Sat Sep 30 20:31:37 2017(r324138)
+++ stable/10/bin/Makefile  Sat Sep 30 20:44:25 2017(r324139)
@@ -58,8 +58,6 @@ SUBDIR+=  tests
 
 .include 
 
-SUBDIR:=   ${SUBDIR:O}
-
 SUBDIR_PARALLEL=
 
 .include 

Modified: stable/10/sbin/Makefile
==
--- stable/10/sbin/Makefile Sat Sep 30 20:31:37 2017(r324138)
+++ stable/10/sbin/Makefile Sat Sep 30 20:44:25 2017(r324139)
@@ -130,8 +130,6 @@ SUBDIR+=tests
 
 .include 
 
-SUBDIR:=   ${SUBDIR:O}
-
 SUBDIR_PARALLEL=
 
 .include 

Modified: stable/10/usr.bin/Makefile
==
--- stable/10/usr.bin/Makefile  Sat Sep 30 20:31:37 2017(r324138)
+++ stable/10/usr.bin/Makefile  Sat Sep 30 20:44:25 2017(r324139)
@@ -415,8 +415,6 @@ SUBDIR+=mkesdb_static
 
 .include 
 
-SUBDIR:=   ${SUBDIR:O}
-
 SUBDIR_PARALLEL=
 
 .include 

Modified: stable/10/usr.sbin/Makefile
==
--- stable/10/usr.sbin/Makefile Sat Sep 30 20:31:37 2017(r324138)
+++ stable/10/usr.sbin/Makefile Sat Sep 30 20:44:25 2017(r324139)
@@ -369,8 +369,6 @@ SUBDIR+=wpa
 
 .include 
 
-SUBDIR:=   ${SUBDIR:O}
-
 SUBDIR_PARALLEL=
 
 .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: r324138 - in stable/11/etc: . mtree

2017-09-30 Thread Ngie Cooper
Author: ngie
Date: Sat Sep 30 20:31:37 2017
New Revision: 324138
URL: https://svnweb.freebsd.org/changeset/base/324138

Log:
  MFC r321444,r321446:
  
  r321444:
  
  Remove ${MTREE} and leverage etc/mtree/Makefile instead with
  "make distribution".
  
  This also fixes the fact that BSD.debug.dist was being installed if/when
  ${MK_DEBUG_FILES} != "no" before this commit.
  
  r321446:
  
  Unconditionally install etc/mtree/BSD.debug.dist again
  
  r279248 unconditionally installed BSD.debug.dist for ease-of-developer-use.
  Restore the previous behavior.
  
  While here, add a comment to note that this is intentional to avoid accidental
  future removal.
  
  MFC with: r321444

Modified:
  stable/11/etc/Makefile
  stable/11/etc/mtree/Makefile
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/etc/Makefile
==
--- stable/11/etc/Makefile  Sat Sep 30 20:31:27 2017(r324137)
+++ stable/11/etc/Makefile  Sat Sep 30 20:31:37 2017(r324138)
@@ -152,20 +152,6 @@ BIN1+= regdomain.xml
 # -rwxr-xr-x root:wheel, for the new cron root:wheel
 BIN2=  netstart pccard_ether rc.suspend rc.resume
 
-MTREE= BSD.debug.dist BSD.include.dist BSD.root.dist BSD.usr.dist BSD.var.dist
-.if ${MK_LIB32} != "no"
-MTREE+=BSD.lib32.dist
-.endif
-.if ${MK_LIBSOFT} != "no"
-MTREE+=BSD.libsoft.dist
-.endif
-.if ${MK_TESTS} != "no"
-MTREE+=BSD.tests.dist
-.endif
-.if ${MK_SENDMAIL} != "no"
-MTREE+=BSD.sendmail.dist
-.endif
-
 PPPCNF=ppp.conf
 
 .if ${MK_SENDMAIL} == "no"
@@ -253,6 +239,7 @@ distribution:
${_+_}cd ${.CURDIR}/defaults; ${MAKE} install
${_+_}cd ${.CURDIR}/devd; ${MAKE} install
${_+_}cd ${.CURDIR}/gss; ${MAKE} install
+   ${_+_}cd ${.CURDIR}/mtree; ${MAKE} install
${_+_}cd ${.CURDIR}/newsyslog.conf.d; ${MAKE} install
 .if ${MK_NTP} != "no"
${_+_}cd ${.CURDIR}/ntp; ${MAKE} install
@@ -306,8 +293,6 @@ distribution:
rm -f ${DESTDIR}/.cshrc; \
ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc
 .endif
-   cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
-   ${MTREE} ${DESTDIR}/etc/mtree
 .if ${MK_MAIL} != "no"
cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
${ETCMAIL} ${DESTDIR}/etc/mail

Modified: stable/11/etc/mtree/Makefile
==
--- stable/11/etc/mtree/MakefileSat Sep 30 20:31:27 2017
(r324137)
+++ stable/11/etc/mtree/MakefileSat Sep 30 20:31:37 2017
(r324138)
@@ -2,7 +2,9 @@
 
 .include 
 
-FILES= ${_BSD.debug.dist} \
+# NOTE: BSD.debug.dist is unconditionally installed for developer ease-of-use.
+FILES= \
+   BSD.debug.dist \
BSD.include.dist \
BSD.root.dist \
${_BSD.lib32.dist} \
@@ -12,9 +14,6 @@ FILES=${_BSD.debug.dist} \
BSD.usr.dist \
BSD.var.dist
 
-.if ${MK_DEBUG_FILES} != "no"
-_BSD.debug.dist=   BSD.debug.dist
-.endif
 .if ${MK_GROFF} != "no"
 _BSD.groff.dist=   BSD.groff.dist
 .endif
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r324137 - stable/10/crypto/openssh

2017-09-30 Thread Ngie Cooper
Author: ngie
Date: Sat Sep 30 20:31:27 2017
New Revision: 324137
URL: https://svnweb.freebsd.org/changeset/base/324137

Log:
  MFC r314601:
  r314601 (by des):
  
  Re-apply part of r311585 which was inadvertantly reverted in the upgrade
  to 7.3p1.  The other part (which adds -DLIBWRAP to sshd's CFLAGS) is
  still in place.

Modified:
  stable/10/crypto/openssh/config.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/crypto/openssh/config.h
==
--- stable/10/crypto/openssh/config.h   Sat Sep 30 20:28:50 2017
(r324136)
+++ stable/10/crypto/openssh/config.h   Sat Sep 30 20:31:27 2017
(r324137)
@@ -1438,7 +1438,7 @@
 /* #undef LASTLOG_WRITE_PUTUTXLINE */
 
 /* Define if you want TCP Wrappers support */
-#define LIBWRAP 1
+/* #undef LIBWRAP */
 
 /* Define to whatever link() returns for "not supported" if it doesn't return
EOPNOTSUPP. */
___
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: r324136 - in head: sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/dispatcher sys/contrib/dev/acpica/components/ha...

2017-09-30 Thread Jung-uk Kim
Author: jkim
Date: Sat Sep 30 20:28:50 2017
New Revision: 324136
URL: https://svnweb.freebsd.org/changeset/base/324136

Log:
  Revert r324109.  This commit broke a number of systems.
  
  Reported by:  lwhsu, kib
  Requested by: ngie

Deleted:
  head/sys/contrib/dev/acpica/compiler/aslallocate.c
  head/sys/contrib/dev/acpica/compiler/aslcache.c
Modified:
  head/sys/contrib/dev/acpica/changes.txt
  head/sys/contrib/dev/acpica/common/adfile.c
  head/sys/contrib/dev/acpica/common/ahtable.c
  head/sys/contrib/dev/acpica/common/dmtable.c
  head/sys/contrib/dev/acpica/common/dmtbdump.c
  head/sys/contrib/dev/acpica/common/dmtbinfo.c
  head/sys/contrib/dev/acpica/compiler/aslcompile.c
  head/sys/contrib/dev/acpica/compiler/aslcompiler.h
  head/sys/contrib/dev/acpica/compiler/aslcompiler.l
  head/sys/contrib/dev/acpica/compiler/asldebug.c
  head/sys/contrib/dev/acpica/compiler/aslerror.c
  head/sys/contrib/dev/acpica/compiler/aslfiles.c
  head/sys/contrib/dev/acpica/compiler/aslhelp.c
  head/sys/contrib/dev/acpica/compiler/aslload.c
  head/sys/contrib/dev/acpica/compiler/aslmapenter.c
  head/sys/contrib/dev/acpica/compiler/aslmaputils.c
  head/sys/contrib/dev/acpica/compiler/aslmessages.c
  head/sys/contrib/dev/acpica/compiler/aslmessages.h
  head/sys/contrib/dev/acpica/compiler/aslmethod.c
  head/sys/contrib/dev/acpica/compiler/asloperands.c
  head/sys/contrib/dev/acpica/compiler/aslopt.c
  head/sys/contrib/dev/acpica/compiler/asloptions.c
  head/sys/contrib/dev/acpica/compiler/aslparseop.c
  head/sys/contrib/dev/acpica/compiler/aslprintf.c
  head/sys/contrib/dev/acpica/compiler/aslstartup.c
  head/sys/contrib/dev/acpica/compiler/aslsupport.l
  head/sys/contrib/dev/acpica/compiler/asltypes.h
  head/sys/contrib/dev/acpica/compiler/aslutils.c
  head/sys/contrib/dev/acpica/compiler/cvcompiler.c
  head/sys/contrib/dev/acpica/compiler/cvparser.c
  head/sys/contrib/dev/acpica/compiler/dtcompile.c
  head/sys/contrib/dev/acpica/compiler/dtcompiler.h
  head/sys/contrib/dev/acpica/compiler/dtexpress.c
  head/sys/contrib/dev/acpica/compiler/dtfield.c
  head/sys/contrib/dev/acpica/compiler/dtio.c
  head/sys/contrib/dev/acpica/compiler/dtparser.y
  head/sys/contrib/dev/acpica/compiler/dtsubtable.c
  head/sys/contrib/dev/acpica/compiler/dttable.c
  head/sys/contrib/dev/acpica/compiler/dttable1.c
  head/sys/contrib/dev/acpica/compiler/dttable2.c
  head/sys/contrib/dev/acpica/compiler/dttemplate.c
  head/sys/contrib/dev/acpica/compiler/dttemplate.h
  head/sys/contrib/dev/acpica/compiler/dtutils.c
  head/sys/contrib/dev/acpica/compiler/prexpress.c
  head/sys/contrib/dev/acpica/compiler/prmacros.c
  head/sys/contrib/dev/acpica/compiler/prparser.y
  head/sys/contrib/dev/acpica/compiler/prscan.c
  head/sys/contrib/dev/acpica/compiler/prutils.c
  head/sys/contrib/dev/acpica/components/dispatcher/dscontrol.c
  head/sys/contrib/dev/acpica/components/hardware/hwtimer.c
  head/sys/contrib/dev/acpica/components/namespace/nsaccess.c
  head/sys/contrib/dev/acpica/components/namespace/nssearch.c
  head/sys/contrib/dev/acpica/components/parser/psobject.c
  head/sys/contrib/dev/acpica/components/parser/psutils.c
  head/sys/contrib/dev/acpica/components/utilities/utinit.c
  head/sys/contrib/dev/acpica/components/utilities/utmath.c
  head/sys/contrib/dev/acpica/include/acapps.h
  head/sys/contrib/dev/acpica/include/acconfig.h
  head/sys/contrib/dev/acpica/include/acdisasm.h
  head/sys/contrib/dev/acpica/include/acexcep.h
  head/sys/contrib/dev/acpica/include/aclocal.h
  head/sys/contrib/dev/acpica/include/acpixf.h
  head/sys/contrib/dev/acpica/include/actbl1.h
  head/sys/contrib/dev/acpica/include/actbl2.h
  head/sys/contrib/dev/acpica/include/actypes.h
  head/sys/dev/acpica/acpi_cpu.c
  head/usr.sbin/acpi/iasl/Makefile

Modified: head/sys/contrib/dev/acpica/changes.txt
==
--- head/sys/contrib/dev/acpica/changes.txt Sat Sep 30 20:07:57 2017
(r324135)
+++ head/sys/contrib/dev/acpica/changes.txt Sat Sep 30 20:28:50 2017
(r324136)
@@ -1,104 +1,4 @@
 
-29 September 2017. Summary of changes for version 20170929:
-
-
-1) ACPICA kernel-resident subsystem:
-
-Redesigned and implemented an improved ASL While() loop timeout 
-mechanism. This mechanism is used to prevent infinite loops in the kernel 
-AML interpreter caused by either non-responsive hardware or incorrect AML 
-code. The new implementation uses AcpiOsGetTimer instead of a simple 
-maximum loop count, and is thus more accurate and constant across 
-different machines. The default timeout is currently 30 seconds, but this 
-may be adjusted later.
-
-Renamed the ACPI_AML_INFINITE_LOOP exception to AE_AML_LOOP_TIMEOUT to 
-better reflect the new implementation of the loop timeout mechanism.
-
-Updated the AcpiGetTimerDuration interface to cleanup the 64-bit support 
-and to fix an off-by-one error. Jung-uk Kim.
-
-Fixed an EFI build problem by updating the 

svn commit: r324134 - stable/11/share/mk

2017-09-30 Thread Ngie Cooper
Author: ngie
Date: Sat Sep 30 20:07:54 2017
New Revision: 324134
URL: https://svnweb.freebsd.org/changeset/base/324134

Log:
  MFC r322441:
  
  Delete trailing whitespace

Modified:
  stable/11/share/mk/bsd.cpu.mk
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/share/mk/bsd.cpu.mk
==
--- stable/11/share/mk/bsd.cpu.mk   Sat Sep 30 20:06:44 2017
(r324133)
+++ stable/11/share/mk/bsd.cpu.mk   Sat Sep 30 20:07:54 2017
(r324134)
@@ -358,7 +358,7 @@ CFLAGS_NO_SIMD= -mno-mmx -mno-sse
 .endif
 CFLAGS_NO_SIMD += ${CFLAGS_NO_SIMD.${COMPILER_TYPE}}
 
-# Add in any architecture-specific CFLAGS.  
+# Add in any architecture-specific CFLAGS.
 # These come from make.conf or the command line or the environment.
 CFLAGS += ${CFLAGS.${MACHINE_ARCH}}
 CXXFLAGS += ${CXXFLAGS.${MACHINE_ARCH}}
___
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: r324135 - stable/10/share/mk

2017-09-30 Thread Ngie Cooper
Author: ngie
Date: Sat Sep 30 20:07:57 2017
New Revision: 324135
URL: https://svnweb.freebsd.org/changeset/base/324135

Log:
  MFC r322441:
  
  Delete trailing whitespace

Modified:
  stable/10/share/mk/bsd.cpu.mk
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/share/mk/bsd.cpu.mk
==
--- stable/10/share/mk/bsd.cpu.mk   Sat Sep 30 20:07:54 2017
(r324134)
+++ stable/10/share/mk/bsd.cpu.mk   Sat Sep 30 20:07:57 2017
(r324135)
@@ -288,7 +288,7 @@ CFLAGS_NO_SIMD= -mno-mmx -mno-sse
 .endif
 CFLAGS_NO_SIMD += ${CFLAGS_NO_SIMD.${COMPILER_TYPE}}
 
-# Add in any architecture-specific CFLAGS.  
+# Add in any architecture-specific CFLAGS.
 # These come from make.conf or the command line or the environment.
 CFLAGS += ${CFLAGS.${MACHINE_ARCH}}
 CXXFLAGS += ${CXXFLAGS.${MACHINE_ARCH}}
___
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: r324133 - stable/11

2017-09-30 Thread Ngie Cooper
Author: ngie
Date: Sat Sep 30 20:06:44 2017
New Revision: 324133
URL: https://svnweb.freebsd.org/changeset/base/324133

Log:
  MFC r322951:
  
  Respect MK_TCSH with build-tools and native-xtools
  
  This helps reduce the WORLDTMP footprint slightly.
  
  Based on a patch I submitted 5 years ago to GNATS.
  
  PR:   174051
  Relnotes: yes (anyone who cross-builds with MK_TCSH=yes will run into
 build failures if the host doesn't have tcsh(1))
  Reminded by:  Fabian Keil 

Modified:
  stable/11/Makefile.inc1
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/Makefile.inc1
==
--- stable/11/Makefile.inc1 Sat Sep 30 20:06:36 2017(r324132)
+++ stable/11/Makefile.inc1 Sat Sep 30 20:06:44 2017(r324133)
@@ -1780,8 +1780,12 @@ _gcc_tools= gnu/usr.bin/cc/cc_tools
 _rescue=rescue/rescue
 .endif
 
+.if ${MK_TCSH} != "no"
+_tcsh=bin/csh
+.endif
+
 .for _tool in \
-bin/csh \
+${_tcsh} \
 bin/sh \
 ${LOCAL_TOOL_DIRS} \
 lib/ncurses/ncurses \
@@ -1938,7 +1942,7 @@ native-xtools: .PHONY
 bin/cat \
 bin/chmod \
 bin/cp \
-bin/csh \
+${_tcsh} \
 bin/echo \
 bin/expr \
 bin/hostname \
___
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: r324132 - stable/10

2017-09-30 Thread Ngie Cooper
Author: ngie
Date: Sat Sep 30 20:06:36 2017
New Revision: 324132
URL: https://svnweb.freebsd.org/changeset/base/324132

Log:
  MFC r321845:
  
  Standardize on SRCTOP instead of .CURDIR-relative paths

Modified:
  stable/10/Makefile.inc1
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/Makefile.inc1
==
--- stable/10/Makefile.inc1 Sat Sep 30 19:54:30 2017(r324131)
+++ stable/10/Makefile.inc1 Sat Sep 30 20:06:36 2017(r324132)
@@ -1460,9 +1460,14 @@ _gcc_tools= gnu/usr.bin/cc/cc_tools
 _rescue= rescue/rescue
 .endif
 
+.if ${MK_TCSH} != "no"
+_tcsh=bin/csh
+.endif
+
 build-tools: .MAKE
+
 .for _tool in \
-bin/csh \
+${_tcsh} \
 bin/sh \
 ${_rescue} \
 ${LOCAL_TOOL_DIRS} \
@@ -1580,7 +1585,7 @@ native-xtools: .PHONY
 bin/cat \
 bin/chmod \
 bin/cp \
-bin/csh \
+${_tcsh} \
 bin/echo \
 bin/expr \
 bin/hostname \
___
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: r324131 - in stable/11/sys: kern sys vm

2017-09-30 Thread Alan Cox
Author: alc
Date: Sat Sep 30 19:54:30 2017
New Revision: 324131
URL: https://svnweb.freebsd.org/changeset/base/324131

Log:
  MFC r323391
To analyze the allocation of swap blocks by blist functions, add a method
for analyzing the radix tree structures and reporting on the number, and
sizes, of maximal intervals of free blocks.  The report includes the number
of maximal intervals, and also the number of them in each of several size
ranges, from small (size 1, or 3 to 4) to large (28657 to 46367) with size
boundaries defined by Fibonacci numbers.  The report is written in the test
tool with the 's' command, or in a running kernel by sysctl.
  
The analysis of the radix tree frequently computes the position of the lone
bit set in a u_daddr_t, a computation that also appears in leaf allocation.
That computation has been moved into a function of its own, and optimized
for cases where an inlined machine instruction can replace the usual binary
search.

Modified:
  stable/11/sys/kern/subr_blist.c
  stable/11/sys/sys/blist.h
  stable/11/sys/vm/swap_pager.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/kern/subr_blist.c
==
--- stable/11/sys/kern/subr_blist.c Sat Sep 30 19:23:49 2017
(r324130)
+++ stable/11/sys/kern/subr_blist.c Sat Sep 30 19:54:30 2017
(r324131)
@@ -90,6 +90,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -101,6 +102,7 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -144,6 +146,7 @@ static MALLOC_DEFINE(M_SWAP, "SWAP", "Swap space");
 #endif
 
 CTASSERT(BLIST_BMAP_RADIX % BLIST_META_RADIX == 0);
+#defineBLIST_META_MASK (BLIST_META_RADIX - 1)
 
 /*
  * For a subtree that can represent the state of up to 'radix' blocks, the
@@ -166,10 +169,38 @@ radix_to_skip(daddr_t radix)
 {
 
return (radix /
-   ((BLIST_BMAP_RADIX / BLIST_META_RADIX) * (BLIST_META_RADIX - 1)));
+   ((BLIST_BMAP_RADIX / BLIST_META_RADIX) * BLIST_META_MASK));
 }
 
 /*
+ * Use binary search, or a faster method, to find the 1 bit in a u_daddr_t.
+ * Assumes that the argument has only one bit set.
+ */
+static inline int
+bitpos(u_daddr_t mask)
+{
+   int hi, lo, mid;
+
+   switch (sizeof(mask)) {
+#ifdef HAVE_INLINE_FFSLL
+   case sizeof(long long):
+   return (ffsll(mask) - 1);
+#endif
+   default:
+   lo = 0;
+   hi = BLIST_BMAP_RADIX;
+   while (lo + 1 < hi) {
+   mid = (lo + hi) >> 1;
+   if ((mask >> mid) != 0)
+   lo = mid;
+   else
+   hi = mid;
+   }
+   return (lo);
+   }
+}
+
+/*
  * blist_create() - create a blist capable of handling up to the specified
  * number of blocks
  *
@@ -340,6 +371,192 @@ blist_print(blist_t bl)
 
 #endif
 
+static const u_daddr_t fib[] = {
+   1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584,
+   4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418, 317811,
+   514229, 832040, 1346269, 2178309, 3524578,
+};
+
+/*
+ * Use 'gap' to describe a maximal range of unallocated blocks/bits.
+ */
+struct gap_stats {
+   daddr_t start;  /* current gap start, or SWAPBLK_NONE */
+   daddr_t num;/* number of gaps observed */
+   daddr_t max;/* largest gap size */
+   daddr_t avg;/* average gap size */
+   daddr_t err;/* sum - num * avg */
+   daddr_t histo[nitems(fib)]; /* # gaps in each size range */
+   int max_bucket; /* last histo elt with nonzero val */
+};
+
+/*
+ * gap_stats_counting()- is the state 'counting 1 bits'?
+ *   or 'skipping 0 bits'?
+ */
+static inline bool
+gap_stats_counting(const struct gap_stats *stats)
+{
+
+   return (stats->start != SWAPBLK_NONE);
+}
+
+/*
+ * init_gap_stats()- initialize stats on gap sizes
+ */
+static inline void
+init_gap_stats(struct gap_stats *stats)
+{
+
+   bzero(stats, sizeof(*stats));
+   stats->start = SWAPBLK_NONE;
+}
+
+/*
+ * update_gap_stats()- update stats on gap sizes
+ */
+static void
+update_gap_stats(struct gap_stats *stats, daddr_t posn)
+{
+   daddr_t size;
+   int hi, lo, mid;
+
+   if (!gap_stats_counting(stats)) {
+   stats->start = posn;
+   return;
+   }
+   size = posn - stats->start;
+   stats->start = SWAPBLK_NONE;
+   if (size > stats->max)
+   stats->max = size;
+
+   /*
+* Find the fibonacci range that contains size,
+* expecting to find it in an early range.
+*/
+   lo = 0;
+   hi = 1;
+   while (hi < nitems(fib) && fib[hi] 

svn commit: r324130 - in stable/11/sys: kern sys

2017-09-30 Thread Alan Cox
Author: alc
Date: Sat Sep 30 19:23:49 2017
New Revision: 324130
URL: https://svnweb.freebsd.org/changeset/base/324130

Log:
  MFC r322459,322897
The *_meta_* functions include a radix parameter, a blk parameter, and
another parameter that identifies a starting point in the memory address
block.  Radix is a power of two, blk is a multiple of radix, and the
starting point is in the range [blk, blk+radix), so that blk can always be
computed from the other two.  This change drops the blk parameter from the
meta functions and computes it instead.  (On amd64, for example, this
change reduces subr_blist.o's text size by 7%.)
  
It also makes the radix parameters unsigned to address concerns that the
calculation of '-radix' might overflow without the -fwrapv option.  (See
https://reviews.freebsd.org/D11819.)
  
Correct a regression in the previous change, r322459.  Specifically, the
removal of the "blk" parameter from blst_meta_alloc() had the unintended
effect of generating an out-of-range allocation when the cursor reaches
the end of the tree if the number of managed blocks in the tree equals
the so-called "radix" (which in the blist code is not the standard notion
of what a radix is but rather the maximum number of leaves in a tree of
the current height.)  In other words, only certain swap configurations
were affected, which is why earlier testing did not reveal the problem.

Modified:
  stable/11/sys/kern/subr_blist.c
  stable/11/sys/sys/blist.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/kern/subr_blist.c
==
--- stable/11/sys/kern/subr_blist.c Sat Sep 30 18:52:59 2017
(r324129)
+++ stable/11/sys/kern/subr_blist.c Sat Sep 30 19:23:49 2017
(r324130)
@@ -123,16 +123,16 @@ void panic(const char *ctl, ...);
  */
 static daddr_t blst_leaf_alloc(blmeta_t *scan, daddr_t blk, int count,
daddr_t cursor);
-static daddr_t blst_meta_alloc(blmeta_t *scan, daddr_t blk, daddr_t count,
-   daddr_t radix, daddr_t cursor);
+static daddr_t blst_meta_alloc(blmeta_t *scan, daddr_t cursor, daddr_t count,
+   u_daddr_t radix);
 static void blst_leaf_free(blmeta_t *scan, daddr_t relblk, int count);
 static void blst_meta_free(blmeta_t *scan, daddr_t freeBlk, daddr_t count,
-   daddr_t radix, daddr_t blk);
+   u_daddr_t radix);
 static void blst_copy(blmeta_t *scan, daddr_t blk, daddr_t radix,
blist_t dest, daddr_t count);
 static daddr_t blst_leaf_fill(blmeta_t *scan, daddr_t blk, int count);
 static daddr_t blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, daddr_t count,
-   daddr_t radix, daddr_t blk);
+   u_daddr_t radix);
 static daddr_t blst_radix_init(blmeta_t *scan, daddr_t radix, daddr_t count);
 #ifndef _KERNEL
 static voidblst_radix_print(blmeta_t *scan, daddr_t blk, daddr_t radix,
@@ -247,10 +247,12 @@ blist_alloc(blist_t bl, daddr_t count)
 * reduce the hint, stopping further iterations.
 */
while (count <= bl->bl_root->bm_bighint) {
-   blk = blst_meta_alloc(bl->bl_root, 0, count, bl->bl_radix,
-   bl->bl_cursor);
+   blk = blst_meta_alloc(bl->bl_root, bl->bl_cursor, count,
+   bl->bl_radix);
if (blk != SWAPBLK_NONE) {
bl->bl_cursor = blk + count;
+   if (bl->bl_cursor == bl->bl_blocks)
+   bl->bl_cursor = 0;
return (blk);
} else if (bl->bl_cursor != 0)
bl->bl_cursor = 0;
@@ -280,7 +282,7 @@ void
 blist_free(blist_t bl, daddr_t blkno, daddr_t count)
 {
 
-   blst_meta_free(bl->bl_root, blkno, count, bl->bl_radix, 0);
+   blst_meta_free(bl->bl_root, blkno, count, bl->bl_radix);
 }
 
 /*
@@ -293,7 +295,7 @@ daddr_t
 blist_fill(blist_t bl, daddr_t blkno, daddr_t count)
 {
 
-   return (blst_meta_fill(bl->bl_root, blkno, count, bl->bl_radix, 0));
+   return (blst_meta_fill(bl->bl_root, blkno, count, bl->bl_radix));
 }
 
 /*
@@ -447,13 +449,13 @@ blst_leaf_alloc(blmeta_t *scan, daddr_t blk, int count
  * and we have a few optimizations strewn in as well.
  */
 static daddr_t
-blst_meta_alloc(blmeta_t *scan, daddr_t blk, daddr_t count, daddr_t radix,
-daddr_t cursor)
+blst_meta_alloc(blmeta_t *scan, daddr_t cursor, daddr_t count, u_daddr_t radix)
 {
-   daddr_t i, next_skip, r, skip;
+   daddr_t blk, i, next_skip, r, skip;
int child;
bool scan_from_start;
 
+   blk = cursor & -radix;
if (radix == BLIST_BMAP_RADIX)
return (blst_leaf_alloc(scan, blk, count, cursor));
if (scan->u.bmu_avail < count) {
@@ -505,8 +507,8 @@ blst_meta_alloc(blmeta_t *scan, daddr_t blk, daddr_t c
   

Re: svn commit: r324109 - in head: sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/dispatcher sys/contrib/dev/acpica/components/h

2017-09-30 Thread Ngie Cooper (yaneurabeya)

> On Sep 30, 2017, at 09:16, Konstantin Belousov  wrote:

Given the number of panic reports, could the commit be reverted and a 
fix be submitted later so others can develop on ^/head?
Thanks,
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r324129 - stable/11/sys/dev/drm2/i915

2017-09-30 Thread Alan Cox
Author: alc
Date: Sat Sep 30 18:52:59 2017
New Revision: 324129
URL: https://svnweb.freebsd.org/changeset/base/324129

Log:
  MFC r323868
Modernize calls to vm_page_unwire().  As of r288122, vm_page_unwire()
accepts PQ_NONE as the specified queue and returns a Boolean indicating
whether the page's wire count transitioned to zero.  Use these features
in dev/drm2.

Modified:
  stable/11/sys/dev/drm2/i915/i915_gem.c
  stable/11/sys/dev/drm2/i915/i915_gem_gtt.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/drm2/i915/i915_gem.c
==
--- stable/11/sys/dev/drm2/i915/i915_gem.c  Sat Sep 30 18:32:00 2017
(r324128)
+++ stable/11/sys/dev/drm2/i915/i915_gem.c  Sat Sep 30 18:52:59 2017
(r324129)
@@ -1890,8 +1890,7 @@ i915_gem_object_put_pages_range_locked(struct drm_i915
KASSERT(page->pindex == i, ("pindex %jx %jx",
(uintmax_t)page->pindex, (uintmax_t)i));
vm_page_lock(page);
-   vm_page_unwire(page, PQ_INACTIVE);
-   if (page->wire_count == 0)
+   if (vm_page_unwire(page, PQ_INACTIVE))
atomic_add_long(_gem_wired_pages_cnt, -1);
vm_page_unlock(page);
}

Modified: stable/11/sys/dev/drm2/i915/i915_gem_gtt.c
==
--- stable/11/sys/dev/drm2/i915/i915_gem_gtt.c  Sat Sep 30 18:32:00 2017
(r324128)
+++ stable/11/sys/dev/drm2/i915/i915_gem_gtt.c  Sat Sep 30 18:52:59 2017
(r324129)
@@ -198,7 +198,7 @@ err_pt_alloc:
free(ppgtt->pt_dma_addr, DRM_I915_GEM);
for (i = 0; i < ppgtt->num_pd_entries; i++) {
if (ppgtt->pt_pages[i]) {
-   vm_page_unwire(ppgtt->pt_pages[i], PQ_INACTIVE);
+   vm_page_unwire(ppgtt->pt_pages[i], PQ_NONE);
vm_page_free(ppgtt->pt_pages[i]);
}
}
@@ -228,7 +228,7 @@ void i915_gem_cleanup_aliasing_ppgtt(struct drm_device
 
free(ppgtt->pt_dma_addr, DRM_I915_GEM);
for (i = 0; i < ppgtt->num_pd_entries; i++) {
-   vm_page_unwire(ppgtt->pt_pages[i], PQ_INACTIVE);
+   vm_page_unwire(ppgtt->pt_pages[i], PQ_NONE);
vm_page_free(ppgtt->pt_pages[i]);
}
free(ppgtt->pt_pages, DRM_I915_GEM);
___
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: r324128 - stable/11/sys/net

2017-09-30 Thread Alan Cox
Author: alc
Date: Sat Sep 30 18:32:00 2017
New Revision: 324128
URL: https://svnweb.freebsd.org/changeset/base/324128

Log:
  MFC r323786
In r288122, we changed vm_page_unwire() so that it returns a Boolean
indicating whether the page's wire count transitioned to zero.  Use that
return value in zbuf_page_free() rather than checking the wire count.

Modified:
  stable/11/sys/net/bpf_zerocopy.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/net/bpf_zerocopy.c
==
--- stable/11/sys/net/bpf_zerocopy.cSat Sep 30 18:23:45 2017
(r324127)
+++ stable/11/sys/net/bpf_zerocopy.cSat Sep 30 18:32:00 2017
(r324128)
@@ -114,8 +114,7 @@ zbuf_page_free(vm_page_t pp)
 {
 
vm_page_lock(pp);
-   vm_page_unwire(pp, PQ_INACTIVE);
-   if (pp->wire_count == 0 && pp->object == NULL)
+   if (vm_page_unwire(pp, PQ_INACTIVE) && pp->object == NULL)
vm_page_free(pp);
vm_page_unlock(pp);
 }
___
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: r324127 - head/sys/fs/tmpfs

2017-09-30 Thread Mateusz Guzik
Author: mjg
Date: Sat Sep 30 18:23:45 2017
New Revision: 324127
URL: https://svnweb.freebsd.org/changeset/base/324127

Log:
  tmpfs: skip zero-sized page count updates
  
  Such updates consisted of vast majority of modificiations, especially
  in tmpfs_reg_resize.
  
  For the case where page count did no change and the size grew we only
  need to update tn_size. Use this fact to avoid vm object lock/relock.
  
  MFC after:1 week

Modified:
  head/sys/fs/tmpfs/tmpfs_subr.c

Modified: head/sys/fs/tmpfs/tmpfs_subr.c
==
--- head/sys/fs/tmpfs/tmpfs_subr.c  Sat Sep 30 18:07:46 2017
(r324126)
+++ head/sys/fs/tmpfs/tmpfs_subr.c  Sat Sep 30 18:23:45 2017
(r324127)
@@ -350,7 +350,8 @@ tmpfs_free_node_locked(struct tmpfs_mount *tmp, struct
case VREG:
uobj = node->tn_reg.tn_aobj;
if (uobj != NULL) {
-   atomic_subtract_long(>tm_pages_used, uobj->size);
+   if (uobj->size != 0)
+   atomic_subtract_long(>tm_pages_used, 
uobj->size);
KASSERT((uobj->flags & OBJ_TMPFS) == 0,
("leaked OBJ_TMPFS node %p vm_obj %p", node, uobj));
vm_object_deallocate(uobj);
@@ -1375,6 +1376,12 @@ tmpfs_reg_resize(struct vnode *vp, off_t newsize, bool
oldpages = OFF_TO_IDX(oldsize + PAGE_MASK);
MPASS(oldpages == uobj->size);
newpages = OFF_TO_IDX(newsize + PAGE_MASK);
+
+   if (__predict_true(newpages == oldpages && newsize >= oldsize)) {
+   node->tn_size = newsize;
+   return (0);
+   }
+
if (newpages > oldpages &&
tmpfs_pages_check_avail(tmp, newpages - oldpages) == 0)
return (ENOSPC);
___
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: r324126 - stable/11/sys/riscv/riscv

2017-09-30 Thread Alan Cox
Author: alc
Date: Sat Sep 30 18:07:46 2017
New Revision: 324126
URL: https://svnweb.freebsd.org/changeset/base/324126

Log:
  MFC r323785
Sync with amd64/arm/arm64/i386/mips pmap change r288256:
  
Exploit r288122 to address a cosmetic issue.  Since PV chunk pages don't
belong to a vm object, they can't be paged out.  Since they can't be paged
out, they are never enqueued in a paging queue.  Nonetheless, passing
PQ_INACTIVE to vm_page_unwire() creates the appearance that these pages
are being enqueued in the inactive queue.  As of r288122, we can avoid
this false impression by passing PQ_NONE.

Modified:
  stable/11/sys/riscv/riscv/pmap.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/riscv/riscv/pmap.c
==
--- stable/11/sys/riscv/riscv/pmap.cSat Sep 30 17:51:10 2017
(r324125)
+++ stable/11/sys/riscv/riscv/pmap.cSat Sep 30 18:07:46 2017
(r324126)
@@ -1589,7 +1589,7 @@ free_pv_chunk(struct pv_chunk *pc)
 #if 0 /* TODO: For minidump */
dump_drop_page(m->phys_addr);
 #endif
-   vm_page_unwire(m, PQ_INACTIVE);
+   vm_page_unwire(m, PQ_NONE);
vm_page_free(m);
 }
 
___
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: r324125 - head/sbin/mdmfs

2017-09-30 Thread Andreas Tobler
Author: andreast
Date: Sat Sep 30 17:51:10 2017
New Revision: 324125
URL: https://svnweb.freebsd.org/changeset/base/324125

Log:
  Initialize mdsize to make gcc happy again. This fixes buildworld on powerpc.
  
  Reviewed by:  ian@

Modified:
  head/sbin/mdmfs/mdmfs.c

Modified: head/sbin/mdmfs/mdmfs.c
==
--- head/sbin/mdmfs/mdmfs.c Sat Sep 30 17:30:22 2017(r324124)
+++ head/sbin/mdmfs/mdmfs.c Sat Sep 30 17:51:10 2017(r324125)
@@ -117,6 +117,7 @@ main(int argc, char **argv)
mdtype = MD_SWAP;
mdname = MD_NAME;
mdnamelen = strlen(mdname);
+   mdsize = 0;
/*
 * Can't set these to NULL.  They may be passed to the
 * respective programs without modification.  I.e., we may not
___
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: r324124 - in stable: 10/usr.bin/getconf 11/usr.bin/getconf

2017-09-30 Thread John Baldwin
Author: jhb
Date: Sat Sep 30 17:30:22 2017
New Revision: 324124
URL: https://svnweb.freebsd.org/changeset/base/324124

Log:
  MFC 323631: Add an -a flag to getconf.
  
  When -a is specified, the name and value of all system or path
  configuration values is reported to standard output.
  
  Sponsored by: Chelsio Communications

Modified:
  stable/11/usr.bin/getconf/confstr.gperf
  stable/11/usr.bin/getconf/getconf.1
  stable/11/usr.bin/getconf/getconf.c
  stable/11/usr.bin/getconf/getconf.h
  stable/11/usr.bin/getconf/pathconf.gperf
  stable/11/usr.bin/getconf/sysconf.gperf
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/usr.bin/getconf/confstr.gperf
  stable/10/usr.bin/getconf/getconf.1
  stable/10/usr.bin/getconf/getconf.c
  stable/10/usr.bin/getconf/getconf.h
  stable/10/usr.bin/getconf/pathconf.gperf
  stable/10/usr.bin/getconf/sysconf.gperf
Directory Properties:
  stable/10/   (props changed)

Modified: stable/11/usr.bin/getconf/confstr.gperf
==
--- stable/11/usr.bin/getconf/confstr.gperf Sat Sep 30 13:17:31 2017
(r324123)
+++ stable/11/usr.bin/getconf/confstr.gperf Sat Sep 30 17:30:22 2017
(r324124)
@@ -68,3 +68,14 @@ find_confstr(const char *name, int *key)
}
return 0;
 }
+
+void
+foreach_confstr(void (*func)(const char *, int))
+{
+   const struct map *mp;
+
+   for (mp = wordlist; mp->name != NULL; mp++) {
+   if (mp->valid)
+   func(mp->name, mp->key);
+   }
+}

Modified: stable/11/usr.bin/getconf/getconf.1
==
--- stable/11/usr.bin/getconf/getconf.1 Sat Sep 30 13:17:31 2017
(r324123)
+++ stable/11/usr.bin/getconf/getconf.1 Sat Sep 30 17:30:22 2017
(r324124)
@@ -28,7 +28,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 8, 2016
+.Dd September 15, 2017
 .Dt GETCONF 1
 .Os
 .Sh NAME
@@ -36,6 +36,9 @@
 .Nd retrieve standard configuration variables
 .Sh SYNOPSIS
 .Nm
+.Fl a
+.Op Ar file
+.Nm
 .Op Fl v Ar environment
 .Ar path_var
 .Ar file
@@ -45,20 +48,35 @@
 .Sh DESCRIPTION
 The
 .Nm
-utility prints the value of a
+utility prints the values of
 .Tn POSIX
 or
 .Tn X/Open
-path or system configuration variable to the standard output.
-If the specified variable is undefined, the string
+path or system configuration variables to the standard output.
+If a variable is undefined, the string
 .Dq Li undefined
 is output.
 .Pp
-The first form of the command, with two mandatory
+The first form of the command displays all of the path or system configuration
+variables to standard output.
+If
+.Ar file
+is provided,
+all path configuration variables are reported for
+.Ar file
+using
+.Xr pathconf 2 .
+Otherwise,
+all system configuration variables are reported using
+.Xr confstr 3
+and
+.Xr sysconf 3.
+.Pp
+The second form of the command, with two mandatory
 arguments, retrieves file- and file system-specific
 configuration variables using
 .Xr pathconf 2 .
-The second form, with a single argument, retrieves system
+The third form, with a single argument, retrieves system
 configuration variables using
 .Xr confstr 3
 and

Modified: stable/11/usr.bin/getconf/getconf.c
==
--- stable/11/usr.bin/getconf/getconf.c Sat Sep 30 13:17:31 2017
(r324123)
+++ stable/11/usr.bin/getconf/getconf.c Sat Sep 30 17:30:22 2017
(r324124)
@@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -41,6 +42,8 @@ __FBSDID("$FreeBSD$");
 
 #include "getconf.h"
 
+static voiddo_allsys(void);
+static voiddo_allpath(const char *path);
 static voiddo_confstr(const char *name, int key);
 static voiddo_sysconf(const char *name, int key);
 static voiddo_pathconf(const char *name, int key, const char *path);
@@ -49,7 +52,8 @@ static void
 usage(void)
 {
fprintf(stderr,
-"usage: getconf [-v prog_env] system_var\n"
+"usage: getconf -a [pathname]\n"
+"   getconf [-v prog_env] system_var\n"
 "   getconf [-v prog_env] path_var pathname\n");
exit(EX_USAGE);
 }
@@ -57,13 +61,18 @@ usage(void)
 int
 main(int argc, char **argv)
 {
+   bool aflag;
int c, key, valid;
const char *name, *vflag, *alt_path;
intmax_t limitval;
 
+   aflag = false;
vflag = NULL;
-   while ((c = getopt(argc, argv, "v:")) != -1) {
+   while ((c = getopt(argc, argv, "av:")) != -1) {
switch (c) {
+   case 'a':
+   aflag = true;
+   break;
case 'v':
vflag = optarg;
break;
@@ -73,6 +82,16 @@ main(int argc, char **argv)
}
}
 
+   if (aflag) {
+   if (vflag != NULL)
+ 

svn commit: r324124 - in stable: 10/usr.bin/getconf 11/usr.bin/getconf

2017-09-30 Thread John Baldwin
Author: jhb
Date: Sat Sep 30 17:30:22 2017
New Revision: 324124
URL: https://svnweb.freebsd.org/changeset/base/324124

Log:
  MFC 323631: Add an -a flag to getconf.
  
  When -a is specified, the name and value of all system or path
  configuration values is reported to standard output.
  
  Sponsored by: Chelsio Communications

Modified:
  stable/10/usr.bin/getconf/confstr.gperf
  stable/10/usr.bin/getconf/getconf.1
  stable/10/usr.bin/getconf/getconf.c
  stable/10/usr.bin/getconf/getconf.h
  stable/10/usr.bin/getconf/pathconf.gperf
  stable/10/usr.bin/getconf/sysconf.gperf
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/usr.bin/getconf/confstr.gperf
  stable/11/usr.bin/getconf/getconf.1
  stable/11/usr.bin/getconf/getconf.c
  stable/11/usr.bin/getconf/getconf.h
  stable/11/usr.bin/getconf/pathconf.gperf
  stable/11/usr.bin/getconf/sysconf.gperf
Directory Properties:
  stable/11/   (props changed)

Modified: stable/10/usr.bin/getconf/confstr.gperf
==
--- stable/10/usr.bin/getconf/confstr.gperf Sat Sep 30 13:17:31 2017
(r324123)
+++ stable/10/usr.bin/getconf/confstr.gperf Sat Sep 30 17:30:22 2017
(r324124)
@@ -68,3 +68,14 @@ find_confstr(const char *name, int *key)
}
return 0;
 }
+
+void
+foreach_confstr(void (*func)(const char *, int))
+{
+   const struct map *mp;
+
+   for (mp = wordlist; mp->name != NULL; mp++) {
+   if (mp->valid)
+   func(mp->name, mp->key);
+   }
+}

Modified: stable/10/usr.bin/getconf/getconf.1
==
--- stable/10/usr.bin/getconf/getconf.1 Sat Sep 30 13:17:31 2017
(r324123)
+++ stable/10/usr.bin/getconf/getconf.1 Sat Sep 30 17:30:22 2017
(r324124)
@@ -28,7 +28,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 8, 2016
+.Dd September 15, 2017
 .Dt GETCONF 1
 .Os
 .Sh NAME
@@ -36,6 +36,9 @@
 .Nd retrieve standard configuration variables
 .Sh SYNOPSIS
 .Nm
+.Fl a
+.Op Ar file
+.Nm
 .Op Fl v Ar environment
 .Ar path_var
 .Ar file
@@ -45,20 +48,35 @@
 .Sh DESCRIPTION
 The
 .Nm
-utility prints the value of a
+utility prints the values of
 .Tn POSIX
 or
 .Tn X/Open
-path or system configuration variable to the standard output.
-If the specified variable is undefined, the string
+path or system configuration variables to the standard output.
+If a variable is undefined, the string
 .Dq Li undefined
 is output.
 .Pp
-The first form of the command, with two mandatory
+The first form of the command displays all of the path or system configuration
+variables to standard output.
+If
+.Ar file
+is provided,
+all path configuration variables are reported for
+.Ar file
+using
+.Xr pathconf 2 .
+Otherwise,
+all system configuration variables are reported using
+.Xr confstr 3
+and
+.Xr sysconf 3.
+.Pp
+The second form of the command, with two mandatory
 arguments, retrieves file- and file system-specific
 configuration variables using
 .Xr pathconf 2 .
-The second form, with a single argument, retrieves system
+The third form, with a single argument, retrieves system
 configuration variables using
 .Xr confstr 3
 and

Modified: stable/10/usr.bin/getconf/getconf.c
==
--- stable/10/usr.bin/getconf/getconf.c Sat Sep 30 13:17:31 2017
(r324123)
+++ stable/10/usr.bin/getconf/getconf.c Sat Sep 30 17:30:22 2017
(r324124)
@@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -41,6 +42,8 @@ __FBSDID("$FreeBSD$");
 
 #include "getconf.h"
 
+static voiddo_allsys(void);
+static voiddo_allpath(const char *path);
 static voiddo_confstr(const char *name, int key);
 static voiddo_sysconf(const char *name, int key);
 static voiddo_pathconf(const char *name, int key, const char *path);
@@ -49,7 +52,8 @@ static void
 usage(void)
 {
fprintf(stderr,
-"usage: getconf [-v prog_env] system_var\n"
+"usage: getconf -a [pathname]\n"
+"   getconf [-v prog_env] system_var\n"
 "   getconf [-v prog_env] path_var pathname\n");
exit(EX_USAGE);
 }
@@ -57,13 +61,18 @@ usage(void)
 int
 main(int argc, char **argv)
 {
+   bool aflag;
int c, key, valid;
const char *name, *vflag, *alt_path;
intmax_t limitval;
 
+   aflag = false;
vflag = NULL;
-   while ((c = getopt(argc, argv, "v:")) != -1) {
+   while ((c = getopt(argc, argv, "av:")) != -1) {
switch (c) {
+   case 'a':
+   aflag = true;
+   break;
case 'v':
vflag = optarg;
break;
@@ -73,6 +82,16 @@ main(int argc, char **argv)
}
}
 
+   if (aflag) {
+   if (vflag != NULL)
+ 

Re: svn commit: r324109 - in head: sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/dispatcher sys/contrib/dev/acpica/components

2017-09-30 Thread Cy Schubert
In message <20170930161624.gk95...@kib.kiev.ua>, Konstantin Belousov writes:
> On Sat, Sep 30, 2017 at 05:42:55PM +0300, Andriy Gapon wrote:
> > On 30/09/2017 15:04, Konstantin Belousov wrote:
> > > On Sat, Sep 30, 2017 at 10:58:41AM +, Li-Wen Hsu wrote:
> > >> On Fri, Sep 29, 2017 at 23:02:49 +, Jung-uk Kim wrote:
> > >>> Author: jkim
> > >>> Date: Fri Sep 29 23:02:49 2017
> > >>> New Revision: 324109
> > >>> URL: https://svnweb.freebsd.org/changeset/base/324109
> > >>>
> > >>> Log:
> > >>>   Merge ACPICA 20170929.
> > >>>
> > >>> Added:
> > >>>   head/sys/contrib/dev/acpica/compiler/aslallocate.c
> > >>>  - copied, changed from r324104, vendor-sys/acpica/dist/source/comp
> iler/aslallocate.c
> > >>
> > >> Hi Jung-uk,
> > >>
> > >> After this change, the test machine booting in bhyve panics with this
> > >> message:
> > >>
> > >>   panic: acpi: timer op not yet supported during boot
> > >>
> > >> Could you help to check what happened here?  The full boot log can be
> > >> found here:
> > >>
> > >>   https://ci.freebsd.org/job/FreeBSD-head-amd64-test/4496/console
> > >>
> > > 
> > > This happens for me on the real hardware as well.
> > > 
> > > SMP: passed TSC synchronization test
> > > Timecounter "TSC" frequency 2095144854 Hz quality 1000
> > > random: entropy device external interface
> > > io: 
> > > nfslock: pseudo-device
> > > mem: 
> > > null: 
> > > nexus0
> > > random: harvesting attach, 8 bytes (4 bits) from ram0
> > > acpi0:  on motherboard
> > > ACPI: 4 ACPI AML tables successfully acquired and loaded
> > > panic: acpi: timer op not yet supported during boot
> > 
> > Seems like it's triggered by the code that's supposed to limit execution ti
> me of
> > loops.
> > 
> After your comment I thought that this is another case of an update requiring
> EARLY_AP_STARTUP option, but apparently the kernel config on this box does
> contain it already.

I have disabled EARLY_AP_STARTUP (due to an issue in a local bge WOL patch, 
which I have yet to resolve). My kernel boots, so EARLY_AP_STARTUP is 
likely not involved.


-- 
Cheers,
Cy Schubert 
FreeBSD UNIX:     Web:  http://www.FreeBSD.org

The need of the many outweighs the greed of the few.


___
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: r324109 - in head: sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/dispatcher sys/contrib/dev/acpica/components/h

2017-09-30 Thread Konstantin Belousov
On Sat, Sep 30, 2017 at 05:42:55PM +0300, Andriy Gapon wrote:
> On 30/09/2017 15:04, Konstantin Belousov wrote:
> > On Sat, Sep 30, 2017 at 10:58:41AM +, Li-Wen Hsu wrote:
> >> On Fri, Sep 29, 2017 at 23:02:49 +, Jung-uk Kim wrote:
> >>> Author: jkim
> >>> Date: Fri Sep 29 23:02:49 2017
> >>> New Revision: 324109
> >>> URL: https://svnweb.freebsd.org/changeset/base/324109
> >>>
> >>> Log:
> >>>   Merge ACPICA 20170929.
> >>>
> >>> Added:
> >>>   head/sys/contrib/dev/acpica/compiler/aslallocate.c
> >>>  - copied, changed from r324104, 
> >>> vendor-sys/acpica/dist/source/compiler/aslallocate.c
> >>
> >> Hi Jung-uk,
> >>
> >> After this change, the test machine booting in bhyve panics with this
> >> message:
> >>
> >>   panic: acpi: timer op not yet supported during boot
> >>
> >> Could you help to check what happened here?  The full boot log can be
> >> found here:
> >>
> >>   https://ci.freebsd.org/job/FreeBSD-head-amd64-test/4496/console
> >>
> > 
> > This happens for me on the real hardware as well.
> > 
> > SMP: passed TSC synchronization test
> > Timecounter "TSC" frequency 2095144854 Hz quality 1000
> > random: entropy device external interface
> > io: 
> > nfslock: pseudo-device
> > mem: 
> > null: 
> > nexus0
> > random: harvesting attach, 8 bytes (4 bits) from ram0
> > acpi0:  on motherboard
> > ACPI: 4 ACPI AML tables successfully acquired and loaded
> > panic: acpi: timer op not yet supported during boot
> 
> Seems like it's triggered by the code that's supposed to limit execution time 
> of
> loops.
> 
After your comment I thought that this is another case of an update requiring
EARLY_AP_STARTUP option, but apparently the kernel config on this box does
contain it already.

> > cpuid = 17
> > time = 1
> > KDB: stack backtrace:
> > db_trace_self_wrapper() at 0x802ac6fb = 
> > db_trace_self_wrapper+0x2b/frame 0x80de9da0
> > vpanic() at 0x80380e0c = vpanic+0x19c/frame 0x80de9e20
> > kassert_panic() at 0x80380c6f = kassert_panic+0x16f/frame 
> > 0x80de9e90
> > AcpiOsGetTimer() at 0x802b1b08 = AcpiOsGetTimer+0x48/frame 
> > 0x80de9eb0
> > AcpiDsExecBeginControlOp() at 0x80276f40 = 
> > AcpiDsExecBeginControlOp+0x80/frame 0x80de9ee0
> > AcpiPsCreateOp() at 0x80290c83 = AcpiPsCreateOp+0x1b3/frame 
> > 0x80de9f30
> > AcpiPsParseLoop() at 0x8029047f = AcpiPsParseLoop+0x1bf/frame 
> > 0x80de9fa0
> > AcpiPsParseAml() at 0x80291540 = AcpiPsParseAml+0x80/frame 
> > 0x80de9fe0
> > AcpiDsExecuteArguments() at 0x80276d4d = 
> > AcpiDsExecuteArguments+0x13d/frame 0x80dea040
> > AcpiDsGetRegionArguments() at 0x80276e96 = 
> > AcpiDsGetRegionArguments+0x36/frame 0x80dea060
> > AcpiNsInitOneObject() at 0x8028b153 = 
> > AcpiNsInitOneObject+0xd3/frame 0x80dea0a0
> > AcpiNsWalkNamespace() at 0x8028e673 = 
> > AcpiNsWalkNamespace+0xc3/frame 0x80dea100
> > AcpiWalkNamespace() at 0x8028ebf9 = AcpiWalkNamespace+0x99/frame 
> > 0x80dea160
> > AcpiNsInitializeObjects() at 0x8028b052 = 
> > AcpiNsInitializeObjects+0x42/frame 0x80dea1c0
> > AcpiLoadTables() at 0x80296648 = AcpiLoadTables+0x78/frame 
> > 0x80dea1e0
> > acpi_attach() at 0x802b59cc = acpi_attach+0x31c/frame 
> > 0x80dea290
> > device_attach() at 0x803b7833 = device_attach+0x3f3/frame 
> > 0x80dea2d0
> > bus_generic_attach() at 0x803b898a = bus_generic_attach+0x5a/frame 
> > 0x80dea2f0
> > nexus_acpi_attach() at 0x805b3593 = nexus_acpi_attach+0x73/frame 
> > 0x80dea320
> > device_attach() at 0x803b7833 = device_attach+0x3f3/frame 
> > 0x80dea360
> > bus_generic_new_pass() at 0x803b9016 = 
> > bus_generic_new_pass+0x116/frame 0x80dea390
> > bus_set_pass() at 0x803b4e1c = bus_set_pass+0x8c/frame 
> > 0x80dea3c0
> > configure() at 0x806283a9 = configure+0x9/frame 0x80dea3d0
> > mi_startup() at 0x8031f4cc = mi_startup+0x9c/frame 
> > 0x80dea3f0
> > btext() at 0x80268e8c = btext+0x2c
> > KDB: enter: panic
> > [ thread pid 0 tid 10 ]
> > Stopped at  0x803c4d9b = kdb_enter+0x3b:movq
> > $0,0x80a3e260 = kdb_why
> 
> 
> -- 
> Andriy Gapon
___
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: r324109 - in head: sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/dispatcher sys/contrib/dev/acpica/components/h

2017-09-30 Thread Andriy Gapon
On 30/09/2017 15:04, Konstantin Belousov wrote:
> On Sat, Sep 30, 2017 at 10:58:41AM +, Li-Wen Hsu wrote:
>> On Fri, Sep 29, 2017 at 23:02:49 +, Jung-uk Kim wrote:
>>> Author: jkim
>>> Date: Fri Sep 29 23:02:49 2017
>>> New Revision: 324109
>>> URL: https://svnweb.freebsd.org/changeset/base/324109
>>>
>>> Log:
>>>   Merge ACPICA 20170929.
>>>
>>> Added:
>>>   head/sys/contrib/dev/acpica/compiler/aslallocate.c
>>>  - copied, changed from r324104, 
>>> vendor-sys/acpica/dist/source/compiler/aslallocate.c
>>
>> Hi Jung-uk,
>>
>> After this change, the test machine booting in bhyve panics with this
>> message:
>>
>>   panic: acpi: timer op not yet supported during boot
>>
>> Could you help to check what happened here?  The full boot log can be
>> found here:
>>
>>   https://ci.freebsd.org/job/FreeBSD-head-amd64-test/4496/console
>>
> 
> This happens for me on the real hardware as well.
> 
> SMP: passed TSC synchronization test
> Timecounter "TSC" frequency 2095144854 Hz quality 1000
> random: entropy device external interface
> io: 
> nfslock: pseudo-device
> mem: 
> null: 
> nexus0
> random: harvesting attach, 8 bytes (4 bits) from ram0
> acpi0:  on motherboard
> ACPI: 4 ACPI AML tables successfully acquired and loaded
> panic: acpi: timer op not yet supported during boot

Seems like it's triggered by the code that's supposed to limit execution time of
loops.

> cpuid = 17
> time = 1
> KDB: stack backtrace:
> db_trace_self_wrapper() at 0x802ac6fb = 
> db_trace_self_wrapper+0x2b/frame 0x80de9da0
> vpanic() at 0x80380e0c = vpanic+0x19c/frame 0x80de9e20
> kassert_panic() at 0x80380c6f = kassert_panic+0x16f/frame 
> 0x80de9e90
> AcpiOsGetTimer() at 0x802b1b08 = AcpiOsGetTimer+0x48/frame 
> 0x80de9eb0
> AcpiDsExecBeginControlOp() at 0x80276f40 = 
> AcpiDsExecBeginControlOp+0x80/frame 0x80de9ee0
> AcpiPsCreateOp() at 0x80290c83 = AcpiPsCreateOp+0x1b3/frame 
> 0x80de9f30
> AcpiPsParseLoop() at 0x8029047f = AcpiPsParseLoop+0x1bf/frame 
> 0x80de9fa0
> AcpiPsParseAml() at 0x80291540 = AcpiPsParseAml+0x80/frame 
> 0x80de9fe0
> AcpiDsExecuteArguments() at 0x80276d4d = 
> AcpiDsExecuteArguments+0x13d/frame 0x80dea040
> AcpiDsGetRegionArguments() at 0x80276e96 = 
> AcpiDsGetRegionArguments+0x36/frame 0x80dea060
> AcpiNsInitOneObject() at 0x8028b153 = AcpiNsInitOneObject+0xd3/frame 
> 0x80dea0a0
> AcpiNsWalkNamespace() at 0x8028e673 = AcpiNsWalkNamespace+0xc3/frame 
> 0x80dea100
> AcpiWalkNamespace() at 0x8028ebf9 = AcpiWalkNamespace+0x99/frame 
> 0x80dea160
> AcpiNsInitializeObjects() at 0x8028b052 = 
> AcpiNsInitializeObjects+0x42/frame 0x80dea1c0
> AcpiLoadTables() at 0x80296648 = AcpiLoadTables+0x78/frame 
> 0x80dea1e0
> acpi_attach() at 0x802b59cc = acpi_attach+0x31c/frame 
> 0x80dea290
> device_attach() at 0x803b7833 = device_attach+0x3f3/frame 
> 0x80dea2d0
> bus_generic_attach() at 0x803b898a = bus_generic_attach+0x5a/frame 
> 0x80dea2f0
> nexus_acpi_attach() at 0x805b3593 = nexus_acpi_attach+0x73/frame 
> 0x80dea320
> device_attach() at 0x803b7833 = device_attach+0x3f3/frame 
> 0x80dea360
> bus_generic_new_pass() at 0x803b9016 = 
> bus_generic_new_pass+0x116/frame 0x80dea390
> bus_set_pass() at 0x803b4e1c = bus_set_pass+0x8c/frame 
> 0x80dea3c0
> configure() at 0x806283a9 = configure+0x9/frame 0x80dea3d0
> mi_startup() at 0x8031f4cc = mi_startup+0x9c/frame 0x80dea3f0
> btext() at 0x80268e8c = btext+0x2c
> KDB: enter: panic
> [ thread pid 0 tid 10 ]
> Stopped at  0x803c4d9b = kdb_enter+0x3b:movq
> $0,0x80a3e260 = kdb_why


-- 
Andriy Gapon
___
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: r324123 - head/sys/cam/ctl

2017-09-30 Thread Alexander Motin
Author: mav
Date: Sat Sep 30 13:17:31 2017
New Revision: 324123
URL: https://svnweb.freebsd.org/changeset/base/324123

Log:
  Add sysctl/tunable for maximal request time.
  
  MFC after:1 week

Modified:
  head/sys/cam/ctl/ctl.c
  head/sys/cam/ctl/ctl_io.h

Modified: head/sys/cam/ctl/ctl.c
==
--- head/sys/cam/ctl/ctl.c  Sat Sep 30 12:30:05 2017(r324122)
+++ head/sys/cam/ctl/ctl.c  Sat Sep 30 13:17:31 2017(r324123)
@@ -40,8 +40,6 @@
  * Author: Ken Merry 
  */
 
-#define _CTL_C
-
 #include 
 __FBSDID("$FreeBSD$");
 
@@ -410,6 +408,11 @@ SYSCTL_INT(_kern_cam_ctl, OID_AUTO, debug, CTLFLAG_RWT
 static int ctl_lun_map_size = 1024;
 SYSCTL_INT(_kern_cam_ctl, OID_AUTO, lun_map_size, CTLFLAG_RWTUN,
 _lun_map_size, 0, "Size of per-port LUN map (max LUN + 1)");
+#ifdef  CTL_TIME_IO
+static int ctl_time_io_secs = CTL_TIME_IO_DEFAULT_SECS;
+SYSCTL_INT(_kern_cam_ctl, OID_AUTO, time_io_secs, CTLFLAG_RWTUN,
+_time_io_secs, 0, "Log requests taking more seconds");
+#endif
 
 /*
  * Supported pages (0x00), Serial number (0x80), Device ID (0x83),

Modified: head/sys/cam/ctl/ctl_io.h
==
--- head/sys/cam/ctl/ctl_io.h   Sat Sep 30 12:30:05 2017(r324122)
+++ head/sys/cam/ctl/ctl_io.h   Sat Sep 30 13:17:31 2017(r324123)
@@ -40,12 +40,6 @@
 #ifndef_CTL_IO_H_
 #define_CTL_IO_H_
 
-#ifdef _CTL_C
-#define EXTERN(__var,__val) __var = __val
-#else
-#define EXTERN(__var,__val) extern __var
-#endif
-
 #defineCTL_MAX_CDBLEN  32
 /*
  * Uncomment this next line to enable printing out times for I/Os
@@ -55,7 +49,6 @@
 #defineCTL_TIME_IO
 #ifdef  CTL_TIME_IO
 #defineCTL_TIME_IO_DEFAULT_SECS90
-EXTERN(int ctl_time_io_secs, CTL_TIME_IO_DEFAULT_SECS);
 #endif
 
 /*
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r324122 - head/usr.sbin/traceroute6

2017-09-30 Thread Michael Tuexen
Author: tuexen
Date: Sat Sep 30 12:30:05 2017
New Revision: 324122
URL: https://svnweb.freebsd.org/changeset/base/324122

Log:
  Fix reporting of probing size. This bug was introduced in r324119.
  
  MFC after:4 weeks

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

Modified: head/usr.sbin/traceroute6/traceroute6.c
==
--- head/usr.sbin/traceroute6/traceroute6.c Sat Sep 30 12:06:21 2017
(r324121)
+++ head/usr.sbin/traceroute6/traceroute6.c Sat Sep 30 12:30:05 2017
(r324122)
@@ -904,7 +904,8 @@ main(int argc, char *argv[])
if (source)
fprintf(stderr, " from %s", source);
fprintf(stderr, ", %lu hops max, %lu byte packets\n",
-   max_hops, datalen);
+   max_hops,
+   datalen + ((useproto == IPPROTO_UDP) ? sizeof(struct udphdr) : 0));
(void) fflush(stderr);
 
if (first_hop > 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"


Re: svn commit: r324109 - in head: sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/dispatcher sys/contrib/dev/acpica/components/h

2017-09-30 Thread Konstantin Belousov
On Sat, Sep 30, 2017 at 10:58:41AM +, Li-Wen Hsu wrote:
> On Fri, Sep 29, 2017 at 23:02:49 +, Jung-uk Kim wrote:
> > Author: jkim
> > Date: Fri Sep 29 23:02:49 2017
> > New Revision: 324109
> > URL: https://svnweb.freebsd.org/changeset/base/324109
> > 
> > Log:
> >   Merge ACPICA 20170929.
> > 
> > Added:
> >   head/sys/contrib/dev/acpica/compiler/aslallocate.c
> >  - copied, changed from r324104, 
> > vendor-sys/acpica/dist/source/compiler/aslallocate.c
> 
> Hi Jung-uk,
> 
> After this change, the test machine booting in bhyve panics with this
> message:
> 
>   panic: acpi: timer op not yet supported during boot
> 
> Could you help to check what happened here?  The full boot log can be
> found here:
> 
>   https://ci.freebsd.org/job/FreeBSD-head-amd64-test/4496/console
> 

This happens for me on the real hardware as well.

SMP: passed TSC synchronization test
Timecounter "TSC" frequency 2095144854 Hz quality 1000
random: entropy device external interface
io: 
nfslock: pseudo-device
mem: 
null: 
nexus0
random: harvesting attach, 8 bytes (4 bits) from ram0
acpi0:  on motherboard
ACPI: 4 ACPI AML tables successfully acquired and loaded
panic: acpi: timer op not yet supported during boot
cpuid = 17
time = 1
KDB: stack backtrace:
db_trace_self_wrapper() at 0x802ac6fb = 
db_trace_self_wrapper+0x2b/frame 0x80de9da0
vpanic() at 0x80380e0c = vpanic+0x19c/frame 0x80de9e20
kassert_panic() at 0x80380c6f = kassert_panic+0x16f/frame 
0x80de9e90
AcpiOsGetTimer() at 0x802b1b08 = AcpiOsGetTimer+0x48/frame 
0x80de9eb0
AcpiDsExecBeginControlOp() at 0x80276f40 = 
AcpiDsExecBeginControlOp+0x80/frame 0x80de9ee0
AcpiPsCreateOp() at 0x80290c83 = AcpiPsCreateOp+0x1b3/frame 
0x80de9f30
AcpiPsParseLoop() at 0x8029047f = AcpiPsParseLoop+0x1bf/frame 
0x80de9fa0
AcpiPsParseAml() at 0x80291540 = AcpiPsParseAml+0x80/frame 
0x80de9fe0
AcpiDsExecuteArguments() at 0x80276d4d = 
AcpiDsExecuteArguments+0x13d/frame 0x80dea040
AcpiDsGetRegionArguments() at 0x80276e96 = 
AcpiDsGetRegionArguments+0x36/frame 0x80dea060
AcpiNsInitOneObject() at 0x8028b153 = AcpiNsInitOneObject+0xd3/frame 
0x80dea0a0
AcpiNsWalkNamespace() at 0x8028e673 = AcpiNsWalkNamespace+0xc3/frame 
0x80dea100
AcpiWalkNamespace() at 0x8028ebf9 = AcpiWalkNamespace+0x99/frame 
0x80dea160
AcpiNsInitializeObjects() at 0x8028b052 = 
AcpiNsInitializeObjects+0x42/frame 0x80dea1c0
AcpiLoadTables() at 0x80296648 = AcpiLoadTables+0x78/frame 
0x80dea1e0
acpi_attach() at 0x802b59cc = acpi_attach+0x31c/frame 0x80dea290
device_attach() at 0x803b7833 = device_attach+0x3f3/frame 
0x80dea2d0
bus_generic_attach() at 0x803b898a = bus_generic_attach+0x5a/frame 
0x80dea2f0
nexus_acpi_attach() at 0x805b3593 = nexus_acpi_attach+0x73/frame 
0x80dea320
device_attach() at 0x803b7833 = device_attach+0x3f3/frame 
0x80dea360
bus_generic_new_pass() at 0x803b9016 = bus_generic_new_pass+0x116/frame 
0x80dea390
bus_set_pass() at 0x803b4e1c = bus_set_pass+0x8c/frame 
0x80dea3c0
configure() at 0x806283a9 = configure+0x9/frame 0x80dea3d0
mi_startup() at 0x8031f4cc = mi_startup+0x9c/frame 0x80dea3f0
btext() at 0x80268e8c = btext+0x2c
KDB: enter: panic
[ thread pid 0 tid 10 ]
Stopped at  0x803c4d9b = kdb_enter+0x3b:movq
$0,0x80a3e260 = kdb_why

___
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: r324120 - head/usr.sbin/traceroute6

2017-09-30 Thread Michael Tuexen
Author: tuexen
Date: Sat Sep 30 11:45:33 2017
New Revision: 324120
URL: https://svnweb.freebsd.org/changeset/base/324120

Log:
  Add SCTP and TCP as protocols for sending probe packets.
  
  MFC after:4 weeks

Modified:
  head/usr.sbin/traceroute6/traceroute6.8
  head/usr.sbin/traceroute6/traceroute6.c

Modified: head/usr.sbin/traceroute6/traceroute6.8
==
--- head/usr.sbin/traceroute6/traceroute6.8 Sat Sep 30 11:40:18 2017
(r324119)
+++ head/usr.sbin/traceroute6/traceroute6.8 Sat Sep 30 11:45:33 2017
(r324120)
@@ -40,7 +40,7 @@
 .Sh SYNOPSIS
 .Nm
 .Bk -words
-.Op Fl adIlnNrUv
+.Op Fl adIlnNrSTUv
 .Ek
 .Bk -words
 .Op Fl f Ar firsthop
@@ -119,7 +119,7 @@ Do not resolve numeric address to hostname.
 Use a packet with no upper layer header for the probes,
 instead of UDP datagrams.
 .It Fl p Ar port
-Set UDP port number to
+Set SCTP/TCP/UDP port number to
 .Ar port .
 .It Fl q Ar probes
 Set the number of probe per hop count to
@@ -138,6 +138,10 @@ that has no route through it
 .It Fl s Ar src
 .Ar Src
 specifies the source IPv6 address to be used.
+.It Fl S
+Use SCTP packets for the probes.
+.It Fl T
+Use TCP segments for the probes.
 .It Fl U
 Use UDP datagrams for the probes.
 This is the default.

Modified: head/usr.sbin/traceroute6/traceroute6.c
==
--- head/usr.sbin/traceroute6/traceroute6.c Sat Sep 30 11:40:18 2017
(r324119)
+++ head/usr.sbin/traceroute6/traceroute6.c Sat Sep 30 11:45:33 2017
(r324120)
@@ -271,6 +271,8 @@ static const char rcsid[] =
 
 #include 
 #include 
+#include 
+#include 
 #include 
 
 #ifdef IPSEC
@@ -307,10 +309,14 @@ const char *pr_type(int);
 intpacket_ok(struct msghdr *, int, int);
 void   print(struct msghdr *, int);
 const char *inetname(struct sockaddr *);
+u_int32_t sctp_crc32c(void *, u_int32_t);
+u_int16_t in_cksum(u_int16_t *addr, int);
+u_int16_t tcp_chksum(struct sockaddr_in6 *, struct sockaddr_in6 *,
+void *, u_int32_t);
 void   usage(void);
 
 int rcvsock;   /* receive (icmp) socket file descriptor */
-int sndsock;   /* send (udp) socket file descriptor */
+int sndsock;   /* send (raw/udp) socket file descriptor */
 
 struct msghdr rcvmhdr;
 struct iovec rcviov[2];
@@ -394,8 +400,9 @@ main(int argc, char *argv[])
 #endif
 
seq = 0;
+   ident = htons(getpid() & 0x); /* same as ping6 */
 
-   while ((ch = getopt(argc, argv, "aA:df:g:Ilm:nNp:q:rs:Uvw:")) != -1)
+   while ((ch = getopt(argc, argv, "aA:df:g:Ilm:nNp:q:rs:STUvw:")) != -1)
switch (ch) {
case 'a':
as_path = 1;
@@ -455,7 +462,6 @@ main(int argc, char *argv[])
break;
case 'I':
useproto = IPPROTO_ICMPV6;
-   ident = htons(getpid() & 0x); /* same as ping6 */
break;
case 'l':
lflag++;
@@ -516,6 +522,12 @@ main(int argc, char *argv[])
 */
source = optarg;
break;
+   case 'S':
+   useproto = IPPROTO_SCTP;
+   break;
+   case 'T':
+   useproto = IPPROTO_TCP;
+   break;
case 'U':
useproto = IPPROTO_UDP;
break;
@@ -557,7 +569,9 @@ main(int argc, char *argv[])
}
break;
case IPPROTO_NONE:
-   if ((sndsock = socket(AF_INET6, SOCK_RAW, IPPROTO_NONE)) < 0) {
+   case IPPROTO_SCTP:
+   case IPPROTO_TCP:
+   if ((sndsock = socket(AF_INET6, SOCK_RAW, useproto)) < 0) {
perror("socket(SOCK_RAW)");
exit(5);
}
@@ -641,6 +655,12 @@ main(int argc, char *argv[])
minlen = 0;
datalen = 0;
break;
+   case IPPROTO_SCTP:
+   minlen = sizeof(struct sctphdr);
+   break;
+   case IPPROTO_TCP:
+   minlen = sizeof(struct tcphdr);
+   break;
default:
fprintf(stderr, "traceroute6: unknown probe protocol %d.\n",
useproto);
@@ -1026,6 +1046,9 @@ void
 send_probe(int seq, u_long hops)
 {
struct icmp6_hdr *icp;
+   struct sctphdr *sctp;
+   struct sctp_chunkhdr *chk;
+   struct tcphdr *tcp;
int i;
 
i = hops;
@@ -1051,6 +1074,43 @@ send_probe(int seq, u_long hops)
case IPPROTO_NONE:
/* No space for anything. No harm as seq/tv32 are decorative. */
break;
+   case IPPROTO_SCTP:
+   sctp = (struct sctphdr *)outpacket;
+
+   sctp->src_port = 

svn commit: r324119 - head/usr.sbin/traceroute6

2017-09-30 Thread Michael Tuexen
Author: tuexen
Date: Sat Sep 30 11:40:18 2017
New Revision: 324119
URL: https://svnweb.freebsd.org/changeset/base/324119

Log:
  * Update function definitions.
  * Ensure that the datalen always describes the length after the IPv6
header consistently, not matter which protocol us used for probes..
  * Document that the default length is 20, not 12.
  * Don't send inormation in probe packets which is not needed or
even checked when the responses are processed.
  * Address CID 978587.
  
  This is mainly a cleanup preparing the addition of SCTP and TCP
  as possible probe packet protocols.
  
  MFC after:4 weeks

Modified:
  head/usr.sbin/traceroute6/traceroute6.8
  head/usr.sbin/traceroute6/traceroute6.c

Modified: head/usr.sbin/traceroute6/traceroute6.8
==
--- head/usr.sbin/traceroute6/traceroute6.8 Sat Sep 30 10:35:44 2017
(r324118)
+++ head/usr.sbin/traceroute6/traceroute6.8 Sat Sep 30 11:40:18 2017
(r324119)
@@ -29,7 +29,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 24, 2009
+.Dd September 30, 2017
 .Dt TRACEROUTE6 8
 .Os
 .\"
@@ -40,7 +40,7 @@
 .Sh SYNOPSIS
 .Nm
 .Bk -words
-.Op Fl adIlnNrvU
+.Op Fl adIlnNrUv
 .Ek
 .Bk -words
 .Op Fl f Ar firsthop
@@ -79,7 +79,7 @@ uses the IPv6 protocol hop limit field to elicit an IC
 response from each gateway along the path to some host.
 .Pp
 The only mandatory parameter is the destination host name or IPv6 address.
-The default probe datagram carries 12 bytes of payload,
+The default probe datagram carries 20 bytes of payload,
 in addition to the IPv6 header.
 The size of the payload can be specified by giving a length
 (in bytes)
@@ -96,9 +96,9 @@ Debug mode.
 .It Fl f Ar firsthop
 Specify how many hops to skip in trace.
 .It Fl g Ar gateway
-Specify intermediate gateway
-.Nm (
-uses routing header).
+Specify intermediate gateway. Please note that
+.Nm
+tries to use routing headers.
 .It Fl I
 Use ICMP6 ECHO instead of UDP datagrams.
 .It Fl l

Modified: head/usr.sbin/traceroute6/traceroute6.c
==
--- head/usr.sbin/traceroute6/traceroute6.c Sat Sep 30 10:35:44 2017
(r324118)
+++ head/usr.sbin/traceroute6/traceroute6.c Sat Sep 30 11:40:18 2017
(r324119)
@@ -289,23 +289,8 @@ static const char rcsid[] =
 #define freehostent(x)
 #endif
 
-/*
- * format of a (udp) probe packet.
- */
-struct tv32 {
-   u_int32_t tv32_sec;
-   u_int32_t tv32_usec;
-};
-
-struct opacket {
-   u_char seq; /* sequence number of this packet */
-   u_char hops;/* hop limit of the packet */
-   u_char pad[2];
-   struct tv32 tv; /* time packet left */
-} __attribute__((__packed__));
-
 u_char packet[512];/* last inbound (icmp) packet */
-struct opacket *outpacket; /* last output (udp) packet */
+char   *outpacket; /* last output packet */
 
 intmain(int, char *[]);
 intwait_for_reply(int, struct msghdr *);
@@ -333,7 +318,7 @@ int rcvhlim;
 struct in6_pktinfo *rcvpktinfo;
 
 struct sockaddr_in6 Src, Dst, Rcv;
-u_long datalen;/* How much data */
+u_long datalen = 20;   /* How much data */
 #defineICMP6ECHOLEN8
 /* XXX: 2064 = 127(max hops in type 0 rthdr) * sizeof(ip6_hdr) + 16(margin) */
 char rtbuf[2064];
@@ -362,9 +347,7 @@ char *as_server = NULL;
 void *asn;
 
 int
-main(argc, argv)
-   int argc;
-   char *argv[];
+main(int argc, char *argv[])
 {
int mib[4] = { CTL_NET, PF_INET6, IPPROTO_IPV6, IPV6CTL_DEFHLIM };
char hbuf[NI_MAXHOST], src0[NI_MAXHOST], *ep;
@@ -533,12 +516,12 @@ main(argc, argv)
 */
source = optarg;
break;
-   case 'v':
-   verbose++;
-   break;
case 'U':
useproto = IPPROTO_UDP;
break;
+   case 'v':
+   verbose++;
+   break;
case 'w':
ep = NULL;
errno = 0;
@@ -574,13 +557,13 @@ main(argc, argv)
}
break;
case IPPROTO_NONE:
-   if ((sndsock = socket(AF_INET6, SOCK_RAW, IPPROTO_NONE)) < 0) {
+   if ((sndsock = socket(AF_INET6, SOCK_RAW, IPPROTO_NONE)) < 0) {
perror("socket(SOCK_RAW)");
exit(5);
}
break;
default:
-   fprintf(stderr, "traceroute6: unknown probe protocol %d",
+   fprintf(stderr, "traceroute6: unknown probe protocol %d\n",
useproto);
exit(5);
}
@@ -641,7 +624,7 @@ main(argc, argv)
ep = NULL;
errno = 0;
datalen = strtoul(*argv, , 0);

Re: svn commit: r324109 - in head: sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/dispatcher sys/contrib/dev/acpica/components/h

2017-09-30 Thread Li-Wen Hsu
On Fri, Sep 29, 2017 at 23:02:49 +, Jung-uk Kim wrote:
> Author: jkim
> Date: Fri Sep 29 23:02:49 2017
> New Revision: 324109
> URL: https://svnweb.freebsd.org/changeset/base/324109
> 
> Log:
>   Merge ACPICA 20170929.
> 
> Added:
>   head/sys/contrib/dev/acpica/compiler/aslallocate.c
>  - copied, changed from r324104, 
> vendor-sys/acpica/dist/source/compiler/aslallocate.c

Hi Jung-uk,

After this change, the test machine booting in bhyve panics with this
message:

  panic: acpi: timer op not yet supported during boot

Could you help to check what happened here?  The full boot log can be
found here:

  https://ci.freebsd.org/job/FreeBSD-head-amd64-test/4496/console

Thanks,
Li-Wen

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


svn commit: r324118 - head/sys/arm/allwinner

2017-09-30 Thread Jared McNeill
Author: jmcneill
Date: Sat Sep 30 10:35:44 2017
New Revision: 324118
URL: https://svnweb.freebsd.org/changeset/base/324118

Log:
  Disable/enable CSUM_UDP and CSUM_TCP along with CSUM_IP
  
  Submitted by: guy...@gmail.com
  Differential Revision:https://reviews.freebsd.org/D12536

Modified:
  head/sys/arm/allwinner/if_awg.c

Modified: head/sys/arm/allwinner/if_awg.c
==
--- head/sys/arm/allwinner/if_awg.c Sat Sep 30 10:34:07 2017
(r324117)
+++ head/sys/arm/allwinner/if_awg.c Sat Sep 30 10:35:44 2017
(r324118)
@@ -1041,10 +1041,10 @@ awg_ioctl(if_t ifp, u_long cmd, caddr_t data)
if_togglecapenable(ifp, IFCAP_RXCSUM);
if (mask & IFCAP_TXCSUM)
if_togglecapenable(ifp, IFCAP_TXCSUM);
-   if ((if_getcapenable(ifp) & (IFCAP_RXCSUM|IFCAP_TXCSUM)) != 0)
-   if_sethwassistbits(ifp, CSUM_IP, 0);
+   if ((if_getcapenable(ifp) & IFCAP_TXCSUM) != 0)
+   if_sethwassistbits(ifp, CSUM_IP | CSUM_UDP | CSUM_TCP, 
0);
else
-   if_sethwassistbits(ifp, 0, CSUM_IP);
+   if_sethwassistbits(ifp, 0, CSUM_IP | CSUM_UDP | 
CSUM_TCP);
break;
default:
error = ether_ioctl(ifp, cmd, data);
___
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: r324117 - head/sys/arm/allwinner

2017-09-30 Thread Jared McNeill
Author: jmcneill
Date: Sat Sep 30 10:34:07 2017
New Revision: 324117
URL: https://svnweb.freebsd.org/changeset/base/324117

Log:
  Fix if_awg tx dma status reg offsets.
  
  Submitted by: guy...@gmail.com
  Differential Revision:https://reviews.freebsd.org/D12535

Modified:
  head/sys/arm/allwinner/if_awgreg.h

Modified: head/sys/arm/allwinner/if_awgreg.h
==
--- head/sys/arm/allwinner/if_awgreg.h  Sat Sep 30 10:16:15 2017
(r324116)
+++ head/sys/arm/allwinner/if_awgreg.h  Sat Sep 30 10:34:07 2017
(r324117)
@@ -115,9 +115,9 @@
 #defineEMAC_MII_DATA   0x4c
 #defineEMAC_ADDR_HIGH(n)   (0x50 + (n) * 8)
 #defineEMAC_ADDR_LOW(n)(0x54 + (n) * 8)
-#defineEMAC_TX_DMA_STA 0x80
-#defineEMAC_TX_DMA_CUR_DESC0x84
-#defineEMAC_TX_DMA_CUR_BUF 0x88
+#defineEMAC_TX_DMA_STA 0xb0
+#defineEMAC_TX_DMA_CUR_DESC0xb4
+#defineEMAC_TX_DMA_CUR_BUF 0xb8
 #defineEMAC_RX_DMA_STA 0xc0
 #defineEMAC_RX_DMA_CUR_DESC0xc4
 #defineEMAC_RX_DMA_CUR_BUF 0xc8
___
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: r324116 - stable/10/sys/net

2017-09-30 Thread Kristof Provost
Author: kp
Date: Sat Sep 30 10:16:15 2017
New Revision: 324116
URL: https://svnweb.freebsd.org/changeset/base/324116

Log:
  MFC r323864
  
  bridge: Set module version
  
  This ensures that the loader will not load the module if it's also built in to
  the kernel.
  
  PR: 220860
  Submitted by:   Eugene Grosbein 

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

Modified: stable/10/sys/net/if_bridge.c
==
--- stable/10/sys/net/if_bridge.c   Sat Sep 30 10:15:04 2017
(r324115)
+++ stable/10/sys/net/if_bridge.c   Sat Sep 30 10:16:15 2017
(r324116)
@@ -537,6 +537,7 @@ static moduledata_t bridge_mod = {
 };
 
 DECLARE_MODULE(if_bridge, bridge_mod, SI_SUB_PSEUDO, SI_ORDER_ANY);
+MODULE_VERSION(if_bridge, 1);
 MODULE_DEPEND(if_bridge, bridgestp, 1, 1, 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: r324115 - stable/11/sys/net

2017-09-30 Thread Kristof Provost
Author: kp
Date: Sat Sep 30 10:15:04 2017
New Revision: 324115
URL: https://svnweb.freebsd.org/changeset/base/324115

Log:
  MFC r323864
  
  bridge: Set module version
  
  This ensures that the loader will not load the module if it's also built in to
  the kernel.
  
  PR: 220860
  Submitted by:   Eugene Grosbein 

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

Modified: stable/11/sys/net/if_bridge.c
==
--- stable/11/sys/net/if_bridge.c   Sat Sep 30 10:03:42 2017
(r324114)
+++ stable/11/sys/net/if_bridge.c   Sat Sep 30 10:15:04 2017
(r324115)
@@ -584,6 +584,7 @@ static moduledata_t bridge_mod = {
 };
 
 DECLARE_MODULE(if_bridge, bridge_mod, SI_SUB_PSEUDO, SI_ORDER_ANY);
+MODULE_VERSION(if_bridge, 1);
 MODULE_DEPEND(if_bridge, bridgestp, 1, 1, 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: r324114 - head/usr.sbin/cpucontrol

2017-09-30 Thread Konstantin Belousov
Author: kib
Date: Sat Sep 30 10:03:42 2017
New Revision: 324114
URL: https://svnweb.freebsd.org/changeset/base/324114

Log:
  Update cpucontrol(8).
  
  Mention new -n flag.
  Remove optional -h from the operation list lines, -h would cause the
  utility to exit without performing the action.
  Explain the default path behavior, list default path.
  Correct example of update performed from the non-default path,
  it needs -n and the trailing slash is redundand.
  Remove useless BUGS section.
  
  Sponsored by: The FreeBSD Foundation
  MFC after:1 week

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

Modified: head/usr.sbin/cpucontrol/cpucontrol.8
==
--- head/usr.sbin/cpucontrol/cpucontrol.8   Sat Sep 30 09:59:32 2017
(r324113)
+++ head/usr.sbin/cpucontrol/cpucontrol.8   Sat Sep 30 10:03:42 2017
(r324114)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 30, 2009
+.Dd September 30, 2017
 .Dt CPUCONTROL 8
 .Os
 .Sh NAME
@@ -34,43 +34,43 @@
 device
 .Sh SYNOPSIS
 .Nm
-.Op Fl vh
+.Op Fl v
 .Fl m Ar msr
 .Bk
 .Ar device
 .Ek
 .Nm
-.Op Fl vh
+.Op Fl v
 .Fl m Ar msr Ns = Ns Ar value
 .Bk
 .Ar device
 .Ek
 .Nm
-.Op Fl vh
+.Op Fl v
 .Fl m Ar msr Ns &= Ns Ar mask
 .Bk
 .Ar device
 .Ek
 .Nm
-.Op Fl vh
+.Op Fl v
 .Fl m Ar msr Ns |= Ns Ar mask
 .Bk
 .Ar device
 .Ek
 .Nm
-.Op Fl vh
+.Op Fl v
 .Fl i Ar level
 .Bk
 .Ar device
 .Ek
 .Nm
-.Op Fl vh
+.Op Fl v
 .Fl i Ar level,level_type
 .Bk
 .Ar device
 .Ek
 .Nm
-.Op Fl vh
+.Op Fl vn
 .Op Fl d Ar datadir
 .Fl u
 .Bk
@@ -88,8 +88,14 @@ It can also be used to apply CPU firmware updates.
 The following options are available:
 .Bl -tag -width indent
 .It Fl d Ar datadir
-Where to look for microcode images.
+Directory paths where to look for microcode images.
 The option can be specified multiple times.
+The paths are added in order of the options appearance on the command
+line, default directories are appended after the user-supplied paths.
+.It Fl n
+Do not look for the microcode images in the standard directories.
+Currently standard directory to look for the microcode update files is
+.Pa /usr/local/share/cpucontrol .
 .It Fl m Ar msr
 Show value of the specified MSR.
 MSR register number should be given as a hexadecimal number.
@@ -163,10 +169,10 @@ The command
 will retrieve the CPUID level 0x1 from CPU 1.
 .Pp
 To perform firmware updates on CPU 0 from images located at
-.Pa /usr/local/share/cpuctl/
+.Pa /usr/local/share/cpuctl
 use the following command:
 .Pp
-.Dq Li "cpucontrol -d /usr/local/share/cpuctl/ -u /dev/cpuctl0"
+.Dq Li "cpucontrol -nd /usr/local/share/cpuctl -u /dev/cpuctl0"
 .Sh SEE ALSO
 .Xr cpuctl 4
 .Sh HISTORY
@@ -179,5 +185,3 @@ The
 .Nm
 utility and this manual page was written by
 .An Stanislav Sedov Aq Mt s...@freebsd.org .
-.Sh BUGS
-Yes, probably, report if any.
___
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: r324113 - head/usr.sbin/cpucontrol

2017-09-30 Thread Konstantin Belousov
Author: kib
Date: Sat Sep 30 09:59:32 2017
New Revision: 324113
URL: https://svnweb.freebsd.org/changeset/base/324113

Log:
  Allow to disable default microcode updates search path with the new
  '-n' option.
  
  Look for updates in the default locations only after user-supplied
  locations are tried.
  
  If newer microcode files are put into non-standard path, both measures
  allow to avoid situation where older update loaded from the default
  path first, and then the second update is applied from non-standard
  path.  Applying intermediate updates might be undesirable.
  
  Sponsored by: The FreeBSD Foundation
  MFC after:1 week

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

Modified: head/usr.sbin/cpucontrol/cpucontrol.c
==
--- head/usr.sbin/cpucontrol/cpucontrol.c   Fri Sep 29 23:47:23 2017
(r324112)
+++ head/usr.sbin/cpucontrol/cpucontrol.c   Sat Sep 30 09:59:32 2017
(r324113)
@@ -60,6 +60,7 @@ int   verbosity_level = 0;
 #defineFLAG_I  0x01
 #defineFLAG_M  0x02
 #defineFLAG_U  0x04
+#defineFLAG_N  0x08
 
 #defineOP_INVAL0x00
 #defineOP_READ 0x01
@@ -427,11 +428,7 @@ main(int argc, char *argv[])
error = 0;
cmdarg = "";/* To keep gcc3 happy. */
 
-   /*
-* Add all default data dirs to the list first.
-*/
-   datadir_add(DEFAULT_DATADIR);
-   while ((c = getopt(argc, argv, "d:hi:m:uv")) != -1) {
+   while ((c = getopt(argc, argv, "d:hi:m:nuv")) != -1) {
switch (c) {
case 'd':
datadir_add(optarg);
@@ -444,6 +441,9 @@ main(int argc, char *argv[])
flags |= FLAG_M;
cmdarg = optarg;
break;
+   case 'n':
+   flags |= FLAG_N;
+   break;
case 'u':
flags |= FLAG_U;
break;
@@ -463,6 +463,8 @@ main(int argc, char *argv[])
usage();
/* NOTREACHED */
}
+   if ((flags & FLAG_N) == 0)
+   datadir_add(DEFAULT_DATADIR);
dev = argv[0];
c = flags & (FLAG_I | FLAG_M | FLAG_U);
switch (c) {
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"