svn commit: r309528 - head/sys/dev/sound/pci/hda

2016-12-03 Thread Pyun YongHyeon
Author: yongari
Date: Sun Dec  4 05:55:18 2016
New Revision: 309528
URL: https://svnweb.freebsd.org/changeset/base/309528

Log:
  Fix too low volume on MSI H170 GAMING M3 board by poking vendor
  specific COEF.

Modified:
  head/sys/dev/sound/pci/hda/hdaa_patches.c

Modified: head/sys/dev/sound/pci/hda/hdaa_patches.c
==
--- head/sys/dev/sound/pci/hda/hdaa_patches.c   Sun Dec  4 05:46:30 2016
(r309527)
+++ head/sys/dev/sound/pci/hda/hdaa_patches.c   Sun Dec  4 05:55:18 2016
(r309528)
@@ -739,6 +739,12 @@ hdaa_patch_direct(struct hdaa_devinfo *d
hda_command(dev, HDA_CMD_12BIT(0, devinfo->nid,
0xf88, 0xc0));
break;
+   case HDA_CODEC_ALC1150:
+   if (subid == 0xd9781462) {
+   /* Too low volume on MSI H170 GAMING M3. */
+   hdaa_write_coef(dev, 0x20, 0x07, 0x7cb);
+   }
+   break;
}
if (subid == APPLE_INTEL_MAC)
hda_command(dev, HDA_CMD_12BIT(0, devinfo->nid,
___
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: r309527 - head/sys/dev/sound/pci/hda

2016-12-03 Thread Pyun YongHyeon
Author: yongari
Date: Sun Dec  4 05:46:30 2016
New Revision: 309527
URL: https://svnweb.freebsd.org/changeset/base/309527

Log:
  Recognize RealTek ALC1150 7.1 channel HD audio codec.

Modified:
  head/sys/dev/sound/pci/hda/hdac.h
  head/sys/dev/sound/pci/hda/hdacc.c

Modified: head/sys/dev/sound/pci/hda/hdac.h
==
--- head/sys/dev/sound/pci/hda/hdac.h   Sun Dec  4 04:04:57 2016
(r309526)
+++ head/sys/dev/sound/pci/hda/hdac.h   Sun Dec  4 05:46:30 2016
(r309527)
@@ -368,6 +368,7 @@
 #define HDA_CODEC_ALC889   HDA_CODEC_CONSTRUCT(REALTEK, 0x0889)
 #define HDA_CODEC_ALC892   HDA_CODEC_CONSTRUCT(REALTEK, 0x0892)
 #define HDA_CODEC_ALC899   HDA_CODEC_CONSTRUCT(REALTEK, 0x0899)
+#define HDA_CODEC_ALC1150  HDA_CODEC_CONSTRUCT(REALTEK, 0x0900)
 #define HDA_CODEC_ALC  HDA_CODEC_CONSTRUCT(REALTEK, 0x)
 
 /* Motorola */

Modified: head/sys/dev/sound/pci/hda/hdacc.c
==
--- head/sys/dev/sound/pci/hda/hdacc.c  Sun Dec  4 04:04:57 2016
(r309526)
+++ head/sys/dev/sound/pci/hda/hdacc.c  Sun Dec  4 05:46:30 2016
(r309527)
@@ -111,6 +111,7 @@ static const struct {
{ HDA_CODEC_ALC889, 0,  "Realtek ALC889" },
{ HDA_CODEC_ALC892, 0,  "Realtek ALC892" },
{ HDA_CODEC_ALC899, 0,  "Realtek ALC899" },
+   { HDA_CODEC_ALC1150, 0, "Realtek ALC1150" },
{ HDA_CODEC_AD1882, 0,  "Analog Devices AD1882" },
{ HDA_CODEC_AD1882A, 0, "Analog Devices AD1882A" },
{ HDA_CODEC_AD1883, 0,  "Analog Devices AD1883" },
___
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: r309526 - head/sys/dev/ioat

2016-12-03 Thread Conrad E. Meyer
Author: cem
Date: Sun Dec  4 04:04:57 2016
New Revision: 309526
URL: https://svnweb.freebsd.org/changeset/base/309526

Log:
  ioat(4): Compile on i386
  
  Truncate BUS_SPACE_MAXADDR_40BIT to essentially BUS_SPACE_MAXADDR_32BIT on
  platforms with 32-bit bus_addr_t (i.e., i386).
  
  PR:   215034
  Reported by:  ngie@
  Sponsored by: Dell EMC Isilon

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

Modified: head/sys/dev/ioat/ioat.c
==
--- head/sys/dev/ioat/ioat.cSun Dec  4 03:50:57 2016(r309525)
+++ head/sys/dev/ioat/ioat.cSun Dec  4 04:04:57 2016(r309526)
@@ -486,8 +486,9 @@ ioat3_attach(device_t device)
ringsz = sizeof(struct ioat_dma_hw_descriptor) * num_descriptors;
 
error = bus_dma_tag_create(bus_get_dma_tag(ioat->device),
-   2 * 1024 * 1024, 0x0, BUS_SPACE_MAXADDR_40BIT, BUS_SPACE_MAXADDR,
-   NULL, NULL, ringsz, 1, ringsz, 0, NULL, NULL, >hw_desc_tag);
+   2 * 1024 * 1024, 0x0, (bus_addr_t)BUS_SPACE_MAXADDR_40BIT,
+   BUS_SPACE_MAXADDR, NULL, NULL, ringsz, 1, ringsz, 0, NULL, NULL,
+   >hw_desc_tag);
if (error != 0)
return (error);
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r309525 - head/tests/sys/kern

2016-12-03 Thread Conrad E. Meyer
Author: cem
Date: Sun Dec  4 03:50:57 2016
New Revision: 309525
URL: https://svnweb.freebsd.org/changeset/base/309525

Log:
  coredump_phnum_test: Make expected pheader count more flexible
  
  Note: this test still requires binutils readelf (from ports) to pass, until a
  few issues are resolved in elftoolchain.
  
  PR:   215019
  Reported by:  ngie@
  Sponsored by: Dell EMC Isilon

Modified:
  head/tests/sys/kern/coredump_phnum_test.sh

Modified: head/tests/sys/kern/coredump_phnum_test.sh
==
--- head/tests/sys/kern/coredump_phnum_test.sh  Sun Dec  4 03:10:25 2016
(r309524)
+++ head/tests/sys/kern/coredump_phnum_test.sh  Sun Dec  4 03:50:57 2016
(r309525)
@@ -39,7 +39,7 @@ coredump_phnum_head()
 }
 coredump_phnum_body()
 {
-   atf_expect_fail "the value parsed doesn't always match the value 
obtained on the running system; bug # 215019"
+   atf_expect_fail "elftoolchain (base) readelf doesn't handle extended 
program header numbers; bug # 215019"
 
# Set up core dumping
cat > coredump_phnum_restore_state.sh <<-EOF
@@ -65,17 +65,17 @@ EOF
# the result of running the helper program and dumping core.  The only
# important bit is that they're larger than 65535 (UINT16_MAX).
readelf -h coredump_phnum_helper.core | \
-   atf_check -o "match:65535 \(66169\)" \
+   atf_check -o "match:65535 \(66[0-9]{3}\)" \
grep "Number of program headers:"
readelf -l coredump_phnum_helper.core | \
-   atf_check -o "match:There are 66169 program headers" \
+   atf_check -o "match:There are 66[0-9]{3} program headers" \
grep -1 "program headers"
readelf -S coredump_phnum_helper.core | \
-   atf_check -o "match: 0001 .* 66169 " \
+   atf_check -o "match: 0001 .* 66[0-9]{3} " \
grep -A1 "^  \[ 0\] "
 
procstat -v coredump_phnum_helper.core | \
-   atf_check -o "match:66545" wc -l
+   atf_check -o "match:66[0-9]{3}" wc -l
 }
 coredump_phnum_cleanup()
 {
___
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: r309524 - head/usr.bin/indent

2016-12-03 Thread Pedro F. Giffuni
Author: pfg
Date: Sun Dec  4 03:10:25 2016
New Revision: 309524
URL: https://svnweb.freebsd.org/changeset/base/309524

Log:
  indent(1): remove unneeded comma.
  
  It is not a good practice to start a newline with a comma anyways.
  
  Discussed with:bjk
  Differential Revision:https://reviews.freebsd.org/D8690

Modified:
  head/usr.bin/indent/indent.1

Modified: head/usr.bin/indent/indent.1
==
--- head/usr.bin/indent/indent.1Sun Dec  4 02:58:13 2016
(r309523)
+++ head/usr.bin/indent/indent.1Sun Dec  4 03:10:25 2016
(r309524)
@@ -148,7 +148,7 @@ Default:
 .It Fl badp , nbadp
 This is vaguely similar to
 .Fl bad
-, except that it only applies to the first set of declarations
+except that it only applies to the first set of declarations
 in a procedure (just after the first `{') and it causes a blank
 line to be generated even if there are no declarations.
 The default is
___
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: r309523 - head/contrib/libarchive/libarchive

2016-12-03 Thread Martin Matuska
Author: mm
Date: Sun Dec  4 02:58:13 2016
New Revision: 309523
URL: https://svnweb.freebsd.org/changeset/base/309523

Log:
  Relax sanity check of number fields in tar header even more.
  
  This fixes reading tar archives created by older versions of
  plexus-archiver (used by maven-assembly-plugin) that fill uid and gid
  fields with spaces (PLXCOMP-233).
  
  Vendor issue:
  https://github.com/libarchive/libarchive/issues/832
  
  Reported by:  Antoine Brodin 
  MFC after:1 week

Modified:
  head/contrib/libarchive/libarchive/archive_read_support_format_tar.c

Modified: head/contrib/libarchive/libarchive/archive_read_support_format_tar.c
==
--- head/contrib/libarchive/libarchive/archive_read_support_format_tar.c
Sun Dec  4 02:15:46 2016(r309522)
+++ head/contrib/libarchive/libarchive/archive_read_support_format_tar.c
Sun Dec  4 02:58:13 2016(r309523)
@@ -324,11 +324,7 @@ validate_number_field(const char* p_fiel
while (i < i_size && p_field[i] == ' ') {
++i;
}
-   /* Must be at least one octal digit. */
-   if (i >= i_size || p_field[i] < '0' || p_field[i] > '7') {
-   return 0;
-   }
-   /* Skip remaining octal digits. */
+   /* Skip octal digits. */
while (i < i_size && p_field[i] >= '0' && p_field[i] <= '7') {
++i;
}
___
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: r309522 - head/sys/powerpc/booke

2016-12-03 Thread Justin Hibbits
On Sun, 4 Dec 2016 02:15:46 + (UTC)
Justin Hibbits  wrote:

> Author: jhibbits
> Date: Sun Dec  4 02:15:46 2016
> New Revision: 309522
> URL: https://svnweb.freebsd.org/changeset/base/309522
> 
> Log:
>   Fix a typo (move parenthesis to correct location in the line).
>   
>   Before this, it would cause the one consumer of this API in powerpc
> usage (dev/dpaa) to set the PTE WIMG flags to empty instead of --M-,
> making the cache-enabled buffer portals non-coherent.

Not really, because the buffer portals are in TLB1, not TLB0, so this
is effectively a no-op for existing code.
___
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: r309522 - head/sys/powerpc/booke

2016-12-03 Thread Justin Hibbits
Author: jhibbits
Date: Sun Dec  4 02:15:46 2016
New Revision: 309522
URL: https://svnweb.freebsd.org/changeset/base/309522

Log:
  Fix a typo (move parenthesis to correct location in the line).
  
  Before this, it would cause the one consumer of this API in powerpc usage
  (dev/dpaa) to set the PTE WIMG flags to empty instead of --M-, making the
  cache-enabled buffer portals non-coherent.

Modified:
  head/sys/powerpc/booke/pmap.c

Modified: head/sys/powerpc/booke/pmap.c
==
--- head/sys/powerpc/booke/pmap.c   Sun Dec  4 02:08:40 2016
(r309521)
+++ head/sys/powerpc/booke/pmap.c   Sun Dec  4 02:15:46 2016
(r309522)
@@ -2967,7 +2967,7 @@ mmu_booke_change_attr(mmu_t mmu, vm_offs
for (va = addr; va < addr + sz; va += PAGE_SIZE) {
pte = pte_find(mmu, kernel_pmap, va);
*pte &= ~(PTE_MAS2_MASK << PTE_MAS2_SHIFT);
-   *pte |= tlb_calc_wimg(PTE_PA(pte), mode << PTE_MAS2_SHIFT);
+   *pte |= tlb_calc_wimg(PTE_PA(pte), mode) << PTE_MAS2_SHIFT;
tlb0_flush_entry(va);
}
tlb_miss_unlock();
___
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: r309521 - head/sys/modules/ioat

2016-12-03 Thread Ngie Cooper
Author: ngie
Date: Sun Dec  4 02:08:40 2016
New Revision: 309521
URL: https://svnweb.freebsd.org/changeset/base/309521

Log:
  Unbreak "make depend" with sys/modules/ioat by adding opt_ddb.h to SRCS
  
  MFC after: 2 weeks

Modified:
  head/sys/modules/ioat/Makefile

Modified: head/sys/modules/ioat/Makefile
==
--- head/sys/modules/ioat/Makefile  Sun Dec  4 00:33:07 2016
(r309520)
+++ head/sys/modules/ioat/Makefile  Sun Dec  4 02:08:40 2016
(r309521)
@@ -9,6 +9,7 @@ IOAT_SRC_PATH = ${.CURDIR}/../..
 KMOD=  ioat
 SRCS=  ioat.c ioat_test.c
 SRCS+= device_if.h bus_if.h pci_if.h
+SRCS+= opt_ddb.h
 
 CFLAGS+=   -I${IOAT_SRC_PATH}
 
___
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: r309405 - head/contrib/libarchive/libarchive

2016-12-03 Thread Martin Matuska
Looks like older versions of "plexus-archiver" (plugin used by maven)
create malformed tar archives with spaced uid/gid fields (PLXCOMP-233).
I will fix that quickly or backout the header sanity check for now.

On 03.12.2016 22:48, Antoine Brodin wrote:
> On Fri, Dec 2, 2016 at 10:30 AM, Martin Matuska  wrote:
>> Author: mm
>> Date: Fri Dec  2 09:30:13 2016
>> New Revision: 309405
>> URL: https://svnweb.freebsd.org/changeset/base/309405
>>
>> Log:
>>   MFV r309403:
>>
>>   Sync libarchive with vendor.
>>
>>   Vendor bugfixes:
>>   Fix for heap-buffer-overflow in archive_le16dec()
>>   Fix for heap-buffer-overflow in uudecode_bidder_bid()
>>   Reworked fix for compatibility with archives created by Perl Archive::Tar
>>
>>   MFC after:1 week
> Hi,
>
> There are still ports failing to extract (logs are ipv6 only):
> http://beefy11.nyi.freebsd.org/data/head-i386-default/p427588_s309451/logs/errors/jakarta-commons-logging-1.2.log
> http://beefy11.nyi.freebsd.org/data/head-i386-default/p427588_s309451/logs/errors/activemq-5.14.1.log
> http://beefy11.nyi.freebsd.org/data/head-i386-default/p427588_s309451/logs/errors/hadoop2-2.7.2_1.log
>
> Please request an exp-run before updating libarchive.
>
> Cheers,
>
> Antoine


___
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: r309520 - in stable/11/sys: fs/nfsclient fs/nullfs sys

2016-12-03 Thread Konstantin Belousov
Author: kib
Date: Sun Dec  4 00:33:07 2016
New Revision: 309520
URL: https://svnweb.freebsd.org/changeset/base/309520

Log:
  MFC r309209:
  Do not enable nullfs vnode caching over nfs v4 mounts.

Modified:
  stable/11/sys/fs/nfsclient/nfs_clvfsops.c
  stable/11/sys/fs/nullfs/null_vfsops.c
  stable/11/sys/sys/mount.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/fs/nfsclient/nfs_clvfsops.c
==
--- stable/11/sys/fs/nfsclient/nfs_clvfsops.c   Sun Dec  4 00:00:56 2016
(r309519)
+++ stable/11/sys/fs/nfsclient/nfs_clvfsops.c   Sun Dec  4 00:33:07 2016
(r309520)
@@ -1320,6 +1320,8 @@ out:
MNT_ILOCK(mp);
mp->mnt_kern_flag |= MNTK_LOOKUP_SHARED | MNTK_NO_IOPF |
MNTK_USES_BCACHE;
+   if ((VFSTONFS(mp)->nm_flag & NFSMNT_NFSV4) != 0)
+   mp->mnt_kern_flag |= MNTK_NULL_NOCACHE;
MNT_IUNLOCK(mp);
}
return (error);

Modified: stable/11/sys/fs/nullfs/null_vfsops.c
==
--- stable/11/sys/fs/nullfs/null_vfsops.c   Sun Dec  4 00:00:56 2016
(r309519)
+++ stable/11/sys/fs/nullfs/null_vfsops.c   Sun Dec  4 00:33:07 2016
(r309520)
@@ -188,7 +188,8 @@ nullfs_mount(struct mount *mp)
}
 
xmp->nullm_flags |= NULLM_CACHE;
-   if (vfs_getopt(mp->mnt_optnew, "nocache", NULL, NULL) == 0)
+   if (vfs_getopt(mp->mnt_optnew, "nocache", NULL, NULL) == 0 ||
+   (xmp->nullm_vfs->mnt_kern_flag & MNTK_NULL_NOCACHE) != 0)
xmp->nullm_flags &= ~NULLM_CACHE;
 
MNT_ILOCK(mp);

Modified: stable/11/sys/sys/mount.h
==
--- stable/11/sys/sys/mount.h   Sun Dec  4 00:00:56 2016(r309519)
+++ stable/11/sys/sys/mount.h   Sun Dec  4 00:33:07 2016(r309520)
@@ -366,7 +366,8 @@ void  __mnt_vnode_markerfree_act
 #defineMNTK_SUSPEND0x0800  /* request write suspension */
 #defineMNTK_SUSPEND2   0x0400  /* block secondary writes */
 #defineMNTK_SUSPENDED  0x1000  /* write operations are 
suspended */
-#defineMNTK_UNUSED10x2000
+#defineMNTK_NULL_NOCACHE   0x2000 /* auto disable cache for 
nullfs
+ mounts over this fs */
 #define MNTK_LOOKUP_SHARED 0x4000 /* FS supports shared lock lookups */
 #defineMNTK_NOKNOTE0x8000  /* Don't send KNOTEs from VOP 
hooks */
 
___
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: r309518 - stable/10/sbin/umount

2016-12-03 Thread Rick Macklem
Author: rmacklem
Date: Sat Dec  3 21:56:46 2016
New Revision: 309518
URL: https://svnweb.freebsd.org/changeset/base/309518

Log:
  MFC: r308871
  Modify umount so that it does not do an Unmount RPC for NFSv4 mounts
  and uses TCP for the Unmount RPC if the mount is over TCP.
  Without this patch, umount does an Unmount RPC over UDP for all NFS mounts.

Modified:
  stable/10/sbin/umount/umount.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sbin/umount/umount.c
==
--- stable/10/sbin/umount/umount.c  Sat Dec  3 21:49:26 2016
(r309517)
+++ stable/10/sbin/umount/umount.c  Sat Dec  3 21:56:46 2016
(r309518)
@@ -49,6 +49,7 @@ static const char rcsid[] =
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -317,6 +318,9 @@ umountfs(struct statfs *sfs)
CLIENT *clp;
char *nfsdirname, *orignfsdirname;
char *hostp, *delimp;
+   char buf[1024];
+   struct nfscl_dumpmntopts dumpmntopts;
+   const char *proto_ptr = NULL;
 
ai = NULL;
do_rpc = 0;
@@ -355,8 +359,24 @@ umountfs(struct statfs *sfs)
 * mount from mntfromname that is still mounted.
 */
if (getmntentry(sfs->f_mntfromname, NULL, NULL,
-   CHECKUNIQUE) != NULL)
+   CHECKUNIQUE) != NULL) {
do_rpc = 1;
+   proto_ptr = "udp";
+   /*
+* Try and find out whether this NFS mount is NFSv4 and
+* what protocol is being used. If this fails, the
+* default is NFSv2,3 and use UDP for the Unmount RPC.
+*/
+   dumpmntopts.ndmnt_fname = sfs->f_mntonname;
+   dumpmntopts.ndmnt_buf = buf;
+   dumpmntopts.ndmnt_blen = sizeof(buf);
+   if (nfssvc(NFSSVC_DUMPMNTOPTS, ) >= 0) {
+   if (strstr(buf, "nfsv4,") != NULL)
+   do_rpc = 0;
+   else if (strstr(buf, ",tcp,") != NULL)
+   proto_ptr = "tcp";
+   }
+   }
}
 
if (!namematch(ai)) {
@@ -394,7 +414,7 @@ umountfs(struct statfs *sfs)
 * has been unmounted.
 */
if (ai != NULL && !(fflag & MNT_FORCE) && do_rpc) {
-   clp = clnt_create(hostp, MOUNTPROG, MOUNTVERS3, "udp");
+   clp = clnt_create(hostp, MOUNTPROG, MOUNTVERS3, proto_ptr);
if (clp  == NULL) {
warnx("%s: %s", hostp,
clnt_spcreateerror("MOUNTPROG"));
___
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: r309517 - stable/11/sbin/umount

2016-12-03 Thread Rick Macklem
Author: rmacklem
Date: Sat Dec  3 21:49:26 2016
New Revision: 309517
URL: https://svnweb.freebsd.org/changeset/base/309517

Log:
  MFC: r308871
  Modify umount so that it does not do an Unmount RPC for NFSv4 mounts
  and uses TCP for the Unmount RPC if the mount is over TCP.
  Without this patch, umount does an Unmount RPC over UDP for all NFS mounts.

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

Modified: stable/11/sbin/umount/umount.c
==
--- stable/11/sbin/umount/umount.c  Sat Dec  3 21:27:19 2016
(r309516)
+++ stable/11/sbin/umount/umount.c  Sat Dec  3 21:49:26 2016
(r309517)
@@ -49,6 +49,7 @@ static const char rcsid[] =
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -323,6 +324,9 @@ umountfs(struct statfs *sfs)
CLIENT *clp;
char *nfsdirname, *orignfsdirname;
char *hostp, *delimp;
+   char buf[1024];
+   struct nfscl_dumpmntopts dumpmntopts;
+   const char *proto_ptr = NULL;
 
ai = NULL;
do_rpc = 0;
@@ -361,8 +365,24 @@ umountfs(struct statfs *sfs)
 * mount from mntfromname that is still mounted.
 */
if (getmntentry(sfs->f_mntfromname, NULL, NULL,
-   CHECKUNIQUE) != NULL)
+   CHECKUNIQUE) != NULL) {
do_rpc = 1;
+   proto_ptr = "udp";
+   /*
+* Try and find out whether this NFS mount is NFSv4 and
+* what protocol is being used. If this fails, the
+* default is NFSv2,3 and use UDP for the Unmount RPC.
+*/
+   dumpmntopts.ndmnt_fname = sfs->f_mntonname;
+   dumpmntopts.ndmnt_buf = buf;
+   dumpmntopts.ndmnt_blen = sizeof(buf);
+   if (nfssvc(NFSSVC_DUMPMNTOPTS, ) >= 0) {
+   if (strstr(buf, "nfsv4,") != NULL)
+   do_rpc = 0;
+   else if (strstr(buf, ",tcp,") != NULL)
+   proto_ptr = "tcp";
+   }
+   }
}
 
if (!namematch(ai)) {
@@ -400,7 +420,7 @@ umountfs(struct statfs *sfs)
 * has been unmounted.
 */
if (ai != NULL && !(fflag & MNT_FORCE) && do_rpc) {
-   clp = clnt_create(hostp, MOUNTPROG, MOUNTVERS3, "udp");
+   clp = clnt_create(hostp, MOUNTPROG, MOUNTVERS3, proto_ptr);
if (clp  == NULL) {
warnx("%s: %s", hostp,
clnt_spcreateerror("MOUNTPROG"));
___
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: r309405 - head/contrib/libarchive/libarchive

2016-12-03 Thread Antoine Brodin
On Fri, Dec 2, 2016 at 10:30 AM, Martin Matuska  wrote:
> Author: mm
> Date: Fri Dec  2 09:30:13 2016
> New Revision: 309405
> URL: https://svnweb.freebsd.org/changeset/base/309405
>
> Log:
>   MFV r309403:
>
>   Sync libarchive with vendor.
>
>   Vendor bugfixes:
>   Fix for heap-buffer-overflow in archive_le16dec()
>   Fix for heap-buffer-overflow in uudecode_bidder_bid()
>   Reworked fix for compatibility with archives created by Perl Archive::Tar
>
>   MFC after:1 week

Hi,

There are still ports failing to extract (logs are ipv6 only):
http://beefy11.nyi.freebsd.org/data/head-i386-default/p427588_s309451/logs/errors/jakarta-commons-logging-1.2.log
http://beefy11.nyi.freebsd.org/data/head-i386-default/p427588_s309451/logs/errors/activemq-5.14.1.log
http://beefy11.nyi.freebsd.org/data/head-i386-default/p427588_s309451/logs/errors/hadoop2-2.7.2_1.log

Please request an exp-run before updating libarchive.

Cheers,

Antoine
___
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: r309516 - stable/11/sys/cam/ctl

2016-12-03 Thread Edward Tomasz Napierala
Author: trasz
Date: Sat Dec  3 21:27:19 2016
New Revision: 309516
URL: https://svnweb.freebsd.org/changeset/base/309516

Log:
  MFC r308250:
  
  Check for lengths being <= 0.  Note that this interface can only
  be accessed by root.  It uses unsigned ints instead of size_t
  to preserve the ABI.
  
  PR:   207627

Modified:
  stable/11/sys/cam/ctl/ctl.c
  stable/11/sys/cam/ctl/ctl_ioctl.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/cam/ctl/ctl.c
==
--- stable/11/sys/cam/ctl/ctl.c Sat Dec  3 21:23:43 2016(r309515)
+++ stable/11/sys/cam/ctl/ctl.c Sat Dec  3 21:27:19 2016(r309516)
@@ -2370,7 +2370,7 @@ ctl_ioctl_fill_ooa(struct ctl_lun *lun, 
 }
 
 static void *
-ctl_copyin_alloc(void *user_addr, int len, char *error_str,
+ctl_copyin_alloc(void *user_addr, unsigned int len, char *error_str,
 size_t error_str_len)
 {
void *kptr;
@@ -2425,6 +2425,12 @@ ctl_copyin_args(int num_args, struct ctl
for (i = 0; i < num_args; i++) {
uint8_t *tmpptr;
 
+   if (args[i].namelen == 0) {
+   snprintf(error_str, error_str_len, "Argument %d "
+"name length is zero", i);
+   goto bailout;
+   }
+
args[i].kname = ctl_copyin_alloc(args[i].name,
args[i].namelen, error_str, error_str_len);
if (args[i].kname == NULL)
@@ -2437,10 +2443,17 @@ ctl_copyin_args(int num_args, struct ctl
}
 
if (args[i].flags & CTL_BEARG_RD) {
+   if (args[i].vallen == 0) {
+   snprintf(error_str, error_str_len, "Argument %d 
"
+"value length is zero", i);
+   goto bailout;
+   }
+
tmpptr = ctl_copyin_alloc(args[i].value,
args[i].vallen, error_str, error_str_len);
if (tmpptr == NULL)
goto bailout;
+
if ((args[i].flags & CTL_BEARG_ASCII)
 && (tmpptr[args[i].vallen - 1] != '\0')) {
snprintf(error_str, error_str_len, "Argument "

Modified: stable/11/sys/cam/ctl/ctl_ioctl.h
==
--- stable/11/sys/cam/ctl/ctl_ioctl.h   Sat Dec  3 21:23:43 2016
(r309515)
+++ stable/11/sys/cam/ctl/ctl_ioctl.h   Sat Dec  3 21:27:19 2016
(r309516)
@@ -317,20 +317,20 @@ typedef enum {
  *
  * flags:  Flags for the parameter, see above for values.
  *
- * vallen: Length of the value in bytes.
+ * vallen: Length of the value in bytes, including the terminating NUL.
  *
- * value:  Value to be set/fetched.
+ * value:  Value to be set/fetched. This must be NUL-terminated.
  *
  * kname:  For kernel use only.
  *
  * kvalue: For kernel use only.
  */
 struct ctl_be_arg {
-   int namelen;
-   char*name;
-   int flags;
-   int vallen;
-   void*value;
+   unsigned intnamelen;
+   char*name;
+   int flags;
+   unsigned intvallen;
+   void*value;
 
char*kname;
void*kvalue;
___
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: r309462 - head/tests/sys/kern

2016-12-03 Thread Ngie Cooper

> On Dec 3, 2016, at 12:02, Conrad Meyer  wrote:
> 
>> On Fri, Dec 2, 2016 at 6:09 PM, Ngie Cooper  wrote:
>> Author: ngie
>> Date: Sat Dec  3 02:09:23 2016
>> New Revision: 309462
>> URL: https://svnweb.freebsd.org/changeset/base/309462
>> 
>> Log:
>>  Fix test coredump_phnum_test:coredump_phnum require.config specification
>> 
>>  The requirement is set via `atf_set "require.config" 
>> "allow_sysctl_side_effects"',
>>  not `atf_set "require.config" "allow_sysctl_side_effects"'
>> 
>>  X-MFC with: r308177
>>  Pointyhat to: cmeyer
> 
> Ngie,
> 
> This line was added verbatim at your request:
> https://reviews.freebsd.org/D7264?id=18609#inline-43800

Ok, I'll take that part of the pointhat.
-Ngie
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r309515 - stable/11/sys/kern

2016-12-03 Thread Edward Tomasz Napierala
Author: trasz
Date: Sat Dec  3 21:23:43 2016
New Revision: 309515
URL: https://svnweb.freebsd.org/changeset/base/309515

Log:
  MFC r308209:
  
  Fix getfsstat(2) with MNT_WAIT to not skip filesystems that are in the
  process of being unmounted.  Previously it would skip them, even if the
  unmount eventually failed eg due to the filesystem being busy.
  
  This behaviour broke autounmountd(8) - if you tried to manually unmount
  a mounted filesystem, using 'automount -u', and the autounmountd attempted
  to refresh the filesystem list in that very moment, it would conclude that
  the filesystem got unmounted and not try to unmount it afterwards.

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

Modified: stable/11/sys/kern/vfs_syscalls.c
==
--- stable/11/sys/kern/vfs_syscalls.c   Sat Dec  3 21:19:45 2016
(r309514)
+++ stable/11/sys/kern/vfs_syscalls.c   Sat Dec  3 21:23:43 2016
(r309515)
@@ -446,16 +446,19 @@ kern_getfsstat(struct thread *td, struct
 size_t *countp, enum uio_seg bufseg, int flags)
 {
struct mount *mp, *nmp;
-   struct statfs *sfsp, *sp, sb;
+   struct statfs *sfsp, *sp, sb, *tofree;
size_t count, maxcount;
int error;
 
+restart:
maxcount = bufsize / sizeof(struct statfs);
-   if (bufsize == 0)
+   if (bufsize == 0) {
sfsp = NULL;
-   else if (bufseg == UIO_USERSPACE)
+   tofree = NULL;
+   } else if (bufseg == UIO_USERSPACE) {
sfsp = *buf;
-   else /* if (bufseg == UIO_SYSSPACE) */ {
+   tofree = NULL;
+   } else /* if (bufseg == UIO_SYSSPACE) */ {
count = 0;
mtx_lock(_mtx);
TAILQ_FOREACH(mp, , mnt_list) {
@@ -464,8 +467,8 @@ kern_getfsstat(struct thread *td, struct
mtx_unlock(_mtx);
if (maxcount > count)
maxcount = count;
-   sfsp = *buf = malloc(maxcount * sizeof(struct statfs), M_TEMP,
-   M_WAITOK);
+   tofree = sfsp = *buf = malloc(maxcount * sizeof(struct statfs),
+   M_TEMP, M_WAITOK);
}
count = 0;
mtx_lock(_mtx);
@@ -480,9 +483,24 @@ kern_getfsstat(struct thread *td, struct
continue;
}
 #endif
-   if (vfs_busy(mp, MBF_NOWAIT | MBF_MNTLSTLOCK)) {
-   nmp = TAILQ_NEXT(mp, mnt_list);
-   continue;
+   if (flags == MNT_WAIT) {
+   if (vfs_busy(mp, MBF_MNTLSTLOCK) != 0) {
+   /*
+* If vfs_busy() failed, and MBF_NOWAIT
+* wasn't passed, then the mp is gone.
+* Furthermore, because of MBF_MNTLSTLOCK,
+* the mountlist_mtx was dropped.  We have
+* no other choice than to start over.
+*/
+   mtx_unlock(_mtx);
+   free(tofree, M_TEMP);
+   goto restart;
+   }
+   } else {
+   if (vfs_busy(mp, MBF_NOWAIT | MBF_MNTLSTLOCK) != 0) {
+   nmp = TAILQ_NEXT(mp, mnt_list);
+   continue;
+   }
}
if (sfsp && count < maxcount) {
sp = >mnt_stat;
___
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: r309514 - stable/11/sys/kern

2016-12-03 Thread Edward Tomasz Napierala
Author: trasz
Date: Sat Dec  3 21:19:45 2016
New Revision: 309514
URL: https://svnweb.freebsd.org/changeset/base/309514

Log:
  MFC r308088:
  
  Fix getfsstat(2) handling of flags. The 'flags' argument is an enum,
  not a bitfield. For the intended usage - being passed either MNT_WAIT,
  or MNT_NOWAIT - this shouldn't introduce any changes in behaviour.

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

Modified: stable/11/sys/kern/vfs_syscalls.c
==
--- stable/11/sys/kern/vfs_syscalls.c   Sat Dec  3 20:35:39 2016
(r309513)
+++ stable/11/sys/kern/vfs_syscalls.c   Sat Dec  3 21:19:45 2016
(r309514)
@@ -495,16 +495,16 @@ kern_getfsstat(struct thread *td, struct
sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK;
/*
 * If MNT_NOWAIT or MNT_LAZY is specified, do not
-* refresh the fsstat cache. MNT_NOWAIT or MNT_LAZY
-* overrides MNT_WAIT.
+* refresh the fsstat cache.
 */
-   if (((flags & (MNT_LAZY|MNT_NOWAIT)) == 0 ||
-   (flags & MNT_WAIT)) &&
-   (error = VFS_STATFS(mp, sp))) {
-   mtx_lock(_mtx);
-   nmp = TAILQ_NEXT(mp, mnt_list);
-   vfs_unbusy(mp);
-   continue;
+   if (flags != MNT_LAZY && flags != MNT_NOWAIT) {
+   error = VFS_STATFS(mp, sp);
+   if (error != 0) {
+   mtx_lock(_mtx);
+   nmp = TAILQ_NEXT(mp, mnt_list);
+   vfs_unbusy(mp);
+   continue;
+   }
}
if (priv_check(td, PRIV_VFS_GENERATION)) {
bcopy(sp, , sizeof(sb));
___
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: r309462 - head/tests/sys/kern

2016-12-03 Thread Conrad Meyer
On Fri, Dec 2, 2016 at 6:09 PM, Ngie Cooper  wrote:
> Author: ngie
> Date: Sat Dec  3 02:09:23 2016
> New Revision: 309462
> URL: https://svnweb.freebsd.org/changeset/base/309462
>
> Log:
>   Fix test coredump_phnum_test:coredump_phnum require.config specification
>
>   The requirement is set via `atf_set "require.config" 
> "allow_sysctl_side_effects"',
>   not `atf_set "require.config" "allow_sysctl_side_effects"'
>
>   X-MFC with: r308177
>   Pointyhat to: cmeyer

Ngie,

This line was added verbatim at your request:
https://reviews.freebsd.org/D7264?id=18609#inline-43800

Conrad
___
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: r309400 - head/sys/dev/acpica

2016-12-03 Thread Oliver Pinter
On 12/3/16, Oliver Pinter  wrote:
> On Fri, Dec 2, 2016 at 9:21 AM, Hans Petter Selasky
>  wrote:
>> Author: hselasky
>> Date: Fri Dec  2 08:21:08 2016
>> New Revision: 309400
>> URL: https://svnweb.freebsd.org/changeset/base/309400
>>
>> Log:
>>   Fix for endless recursion in the ACPI GPE handler during boot.
>>
>>   When handling a GPE ACPI interrupt object the EcSpaceHandler()
>>   function can be called which checks the EC_EVENT_SCI bit and then
>>   recurse on the EcGpeQueryHandler() function. If there are multiple GPE
>>   events pending the EC_EVENT_SCI bit will be set at the next call to
>>   EcSpaceHandler() causing it to recurse again via the
>>   EcGpeQueryHandler() function. This leads to a slow never ending
>>   recursion during boot which prevents proper system startup, because
>>   the EC_EVENT_SCI bit never gets cleared in this scenario.
>>
>>   The behaviour is reproducible with the ALASKA AMI in combination with
>>   a newer Skylake based mainboard in the following way:
>>
>>   Enter BIOS and adjust the clock one hour forward. Save and exit the
>>   BIOS. System fails to boot due to the above mentioned bug in
>>   EcGpeQueryHandler() which was observed recursing multiple times.
>>
>>   This patch adds a simple recursion guard to the EcGpeQueryHandler()
>>   function and also also adds logic to detect if new GPE events occurred
>>   during the execution of EcGpeQueryHandler() and then loop on this
>>   function instead of recursing.
>>
>>   Reviewed by:  jhb
>>   MFC after:2 weeks
>>
>> Modified:
>>   head/sys/dev/acpica/acpi_ec.c
>
>
> I have similar error since the latest BIOS update on my gigabyte
> H170N-Wifi board. The curiosity of the BIOS update was after upgrading
> to this version, there are no possibility to rollback to older
> version.
>
> The other weird thing, is that MFCing back this patch does not help. I
> get stucked lock in acmtx mutex, as you
> could see from the attached log. The other interesting is the ACPI
> error at boot time:
>
> [1] ACPI Error: Mutex [0x0] is not acquired, cannot release
> (20160527/utmutex-386)
> [1] ACPI Error: Could not release AML Interpreter mutex
> (20160527/exutils-147)
> [1] ACPI Error: Mutex [0x0] is not acquired, cannot release
> (20160527/utmutex-386)
> [1] ACPI Error: Could not release AML Interpreter mutex
> (20160527/exutils-147)
> [1] cpu1:  on acpi0
> [1] ACPI Error: Mutex [0x0] is not acquired, cannot release
> (20160527/utmutex-386)
> [1] ACPI Error: Could not release AML Interpreter mutex
> (20160527/exutils-147)
> [1] ACPI Error: Mutex [0x0] is not acquired, cannot release
> (20160527/utmutex-386)
> [1] ACPI Error: Could not release AML Interpreter mutex
> (20160527/exutils-147)
>
> (This error is on 10-STABLE.)
>

After backported the last to ACPICA update to 10-STABLE with this
patch, the issue reducated to this warning message:

 [1] acpi0: Power Button (fixed)
[1] ACPI Error: Method parse/execution failed [\134_SB.PCI0.IOTR._CRS]
(Node 0xf80006592f00), AE_AML_NO_RESOURCE_END_TAG
(20161117/psparse-560)
[1] ACPI Error: Method execution failed [\134_SB.PCI0.IOTR._CRS] (Node
0xf80006592f00), AE_AML_NO_RESOURCE_END_TAG (20161117/uteval-111)
[1] can't fetch resources for \134_SB_.PCI0.IOTR - AE_AML_NO_RESOURCE_END_TAG

but the lockup has gone. ;)


[trim]
___
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: r309513 - head/sbin/camcontrol

2016-12-03 Thread Adrian Chadd
Author: adrian
Date: Sat Dec  3 20:35:39 2016
New Revision: 309513
URL: https://svnweb.freebsd.org/changeset/base/309513

Log:
  [camcontrol] init ts=0 to quieten gcc.
  
  It "looks" like ts is set to something on success, and not modified on
  error.
  
  Checked on IRC with: cem

Modified:
  head/sbin/camcontrol/timestamp.c

Modified: head/sbin/camcontrol/timestamp.c
==
--- head/sbin/camcontrol/timestamp.cSat Dec  3 20:30:25 2016
(r309512)
+++ head/sbin/camcontrol/timestamp.cSat Dec  3 20:35:39 2016
(r309513)
@@ -328,7 +328,7 @@ timestamp(struct cam_device *device, int
  int retry_count, int timeout, int verbosemode __unused)
 {
int c;
-   uint64_t ts;
+   uint64_t ts = 0;
char *format_string = NULL;
char *timestamp_string = NULL;
int action = -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: r309374 - in head: sbin/camcontrol sys/cam/scsi

2016-12-03 Thread Conrad Meyer
On Fri, Dec 2, 2016 at 9:38 PM, Ravi Pokala  wrote:
> -Original Message-
>> From:  on behalf of Kyle Evans 
>> 
>>
>> I understand that this is a bogus error because at this point it
>> pretty much *has* to be set by the report_timestamp call just prior,
>> but is there a clean way to trick GCC into agreeing, or is it just a
>> matter of explicitly initializing it to 0 before the report_timestamp
>> call?
>
> Actually, it's a valid warning. While all paths to that point in timestamp() 
> go through report_timestamp(), not all paths through report_timestamp() set 
> *ts. Specifically, if cam_getccb() or cam_send_ccb() fail, or the request was 
> not completed, report_timestamp() does 'goto bailout' without setting *ts.

But in that case, report_timestamp() returns a non-zero error.  And
timestamp() will goto its own bailout, avoiding use of an unset value.

> I'm disappointed that `clang' (on i386 and amd64) didn't notice this; I was 
> under the impression `clang' did more of that type of deep path analysis than 
> `gcc'. 

I think it's purely spurious, although understandably difficult for
the compiler to notice.  Adrian's proposed zero initialization seems
like a fine fix.

Best,
Conrad
___
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: r309512 - in stable/10/contrib/subversion: . subversion/include subversion/include/private subversion/libsvn_client subversion/libsvn_fs_fs subversion/libsvn_fs_x subversion/libsvn_ra_s...

2016-12-03 Thread Peter Wemm
Author: peter
Date: Sat Dec  3 20:30:25 2016
New Revision: 309512
URL: https://svnweb.freebsd.org/changeset/base/309512

Log:
  MFC r309356: svn 1.9.4 -> 1.9.5

Modified:
  stable/10/contrib/subversion/CHANGES
  stable/10/contrib/subversion/README
  stable/10/contrib/subversion/build-outputs.mk
  stable/10/contrib/subversion/configure
  stable/10/contrib/subversion/configure.ac
  stable/10/contrib/subversion/get-deps.sh
  stable/10/contrib/subversion/subversion/include/private/svn_sqlite.h
  stable/10/contrib/subversion/subversion/include/svn_version.h
  stable/10/contrib/subversion/subversion/libsvn_client/merge.c
  stable/10/contrib/subversion/subversion/libsvn_fs_fs/cached_data.c
  stable/10/contrib/subversion/subversion/libsvn_fs_fs/caching.c
  stable/10/contrib/subversion/subversion/libsvn_fs_fs/fs.c
  stable/10/contrib/subversion/subversion/libsvn_fs_fs/fs_fs.c
  stable/10/contrib/subversion/subversion/libsvn_fs_fs/low_level.c
  stable/10/contrib/subversion/subversion/libsvn_fs_fs/pack.c
  stable/10/contrib/subversion/subversion/libsvn_fs_fs/pack.h
  stable/10/contrib/subversion/subversion/libsvn_fs_fs/rep-cache-db.h
  stable/10/contrib/subversion/subversion/libsvn_fs_fs/rep-cache.c
  stable/10/contrib/subversion/subversion/libsvn_fs_fs/rep-cache.h
  stable/10/contrib/subversion/subversion/libsvn_fs_fs/transaction.c
  stable/10/contrib/subversion/subversion/libsvn_fs_fs/tree.c
  stable/10/contrib/subversion/subversion/libsvn_fs_x/rep-cache-db.h
  stable/10/contrib/subversion/subversion/libsvn_ra_serf/xml.c
  stable/10/contrib/subversion/subversion/libsvn_repos/reporter.c
  stable/10/contrib/subversion/subversion/libsvn_repos/repos.c
  stable/10/contrib/subversion/subversion/libsvn_subr/config_file.c
  stable/10/contrib/subversion/subversion/libsvn_subr/deprecated.c
  stable/10/contrib/subversion/subversion/libsvn_subr/gpg_agent.c
  stable/10/contrib/subversion/subversion/libsvn_subr/internal_statements.h
  stable/10/contrib/subversion/subversion/libsvn_subr/sqlite.c
  stable/10/contrib/subversion/subversion/libsvn_subr/sysinfo.c
  stable/10/contrib/subversion/subversion/libsvn_subr/win32_crashrpt.c
  stable/10/contrib/subversion/subversion/libsvn_subr/xml.c
  stable/10/contrib/subversion/subversion/libsvn_wc/conflicts.c
  stable/10/contrib/subversion/subversion/libsvn_wc/update_editor.c
  stable/10/contrib/subversion/subversion/libsvn_wc/wc-checks.h
  stable/10/contrib/subversion/subversion/libsvn_wc/wc-metadata.h
  stable/10/contrib/subversion/subversion/libsvn_wc/wc-queries.h
  stable/10/contrib/subversion/subversion/svn/info-cmd.c
  stable/10/contrib/subversion/subversion/svn/merge-cmd.c
  stable/10/contrib/subversion/subversion/svnserve/serve.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/subversion/CHANGES
==
--- stable/10/contrib/subversion/CHANGESSat Dec  3 20:30:05 2016
(r309511)
+++ stable/10/contrib/subversion/CHANGESSat Dec  3 20:30:25 2016
(r309512)
@@ -1,3 +1,54 @@
+Version 1.9.5
+(29 Nov 2016, from /branches/1.9.x)
+http://svn.apache.org/repos/asf/subversion/tags/1.9.5
+
+ User-visible changes:
+  - Client-side bugfixes:
+* fix accessing non-existent paths during reintegrate merge (r1766699 et 
al)
+* fix handling of newly secured subdirectories in working copy (r1724448)
+* info: remove trailing whitespace in --show-item=revision (issue #4660)
+* fix recording wrong revisions for tree conflicts (r1734106)
+* gpg-agent: improve discovery of gpg-agent sockets (r1766327)
+* gpg-agent: fix file descriptor leak (r1766323)
+* resolve: fix --accept=mine-full for binary files (issue #4647)
+* merge: fix possible crash (issue #4652)
+* resolve: fix possible crash (r1748514)
+* fix potential crash in Win32 crash reporter (r1663253 et al)
+
+  - Server-side bugfixes:
+* fsfs: fix "offset too large" error during pack (issue #4657)
+* svnserve: enable hook script environments (r1769152)
+* fsfs: fix possible data reconstruction error (issue #4658)
+* fix source of spurious 'incoming edit' tree conflicts (r1770108)
+* fsfs: improve caching for large directories (r1721285)
+* fsfs: fix crash when encountering all-zero checksums (r1759686)
+* fsfs: fix potential source of repository corruptions (r1756266)
+* mod_dav_svn: fix excessive memory usage with mod_headers/mod_deflate
+  (issue #3084)
+* mod_dav_svn: reduce memory usage during GET requests (r1757529 et al)
+* fsfs: fix unexpected "database is locked" errors (r1741096 et al)
+* fsfs: fix opening old repositories without db/format files (r1720015)
+
+  - Client-side and server-side bugfixes:
+* fix possible crash when reading invalid configuration files (r1715777)
+
+  - Bindings bugfixes:
+* swig-pl: do not corrupt "{DATE}" revision variable (r1767768)
+* javahl: fix temporary accepting SSL server 

svn commit: r309511 - in stable/11/contrib/subversion: . subversion/include subversion/include/private subversion/libsvn_client subversion/libsvn_fs_fs subversion/libsvn_fs_x subversion/libsvn_ra_s...

2016-12-03 Thread Peter Wemm
Author: peter
Date: Sat Dec  3 20:30:05 2016
New Revision: 309511
URL: https://svnweb.freebsd.org/changeset/base/309511

Log:
  MFC r309356: svn 1.9.4 -> 1.9.5

Modified:
  stable/11/contrib/subversion/CHANGES
  stable/11/contrib/subversion/README
  stable/11/contrib/subversion/build-outputs.mk
  stable/11/contrib/subversion/configure
  stable/11/contrib/subversion/configure.ac
  stable/11/contrib/subversion/get-deps.sh
  stable/11/contrib/subversion/subversion/include/private/svn_sqlite.h
  stable/11/contrib/subversion/subversion/include/svn_version.h
  stable/11/contrib/subversion/subversion/libsvn_client/merge.c
  stable/11/contrib/subversion/subversion/libsvn_fs_fs/cached_data.c
  stable/11/contrib/subversion/subversion/libsvn_fs_fs/caching.c
  stable/11/contrib/subversion/subversion/libsvn_fs_fs/fs.c
  stable/11/contrib/subversion/subversion/libsvn_fs_fs/fs_fs.c
  stable/11/contrib/subversion/subversion/libsvn_fs_fs/low_level.c
  stable/11/contrib/subversion/subversion/libsvn_fs_fs/pack.c
  stable/11/contrib/subversion/subversion/libsvn_fs_fs/pack.h
  stable/11/contrib/subversion/subversion/libsvn_fs_fs/rep-cache-db.h
  stable/11/contrib/subversion/subversion/libsvn_fs_fs/rep-cache.c
  stable/11/contrib/subversion/subversion/libsvn_fs_fs/rep-cache.h
  stable/11/contrib/subversion/subversion/libsvn_fs_fs/transaction.c
  stable/11/contrib/subversion/subversion/libsvn_fs_fs/tree.c
  stable/11/contrib/subversion/subversion/libsvn_fs_x/rep-cache-db.h
  stable/11/contrib/subversion/subversion/libsvn_ra_serf/xml.c
  stable/11/contrib/subversion/subversion/libsvn_repos/reporter.c
  stable/11/contrib/subversion/subversion/libsvn_repos/repos.c
  stable/11/contrib/subversion/subversion/libsvn_subr/config_file.c
  stable/11/contrib/subversion/subversion/libsvn_subr/deprecated.c
  stable/11/contrib/subversion/subversion/libsvn_subr/gpg_agent.c
  stable/11/contrib/subversion/subversion/libsvn_subr/internal_statements.h
  stable/11/contrib/subversion/subversion/libsvn_subr/sqlite.c
  stable/11/contrib/subversion/subversion/libsvn_subr/sysinfo.c
  stable/11/contrib/subversion/subversion/libsvn_subr/win32_crashrpt.c
  stable/11/contrib/subversion/subversion/libsvn_subr/xml.c
  stable/11/contrib/subversion/subversion/libsvn_wc/conflicts.c
  stable/11/contrib/subversion/subversion/libsvn_wc/update_editor.c
  stable/11/contrib/subversion/subversion/libsvn_wc/wc-checks.h
  stable/11/contrib/subversion/subversion/libsvn_wc/wc-metadata.h
  stable/11/contrib/subversion/subversion/libsvn_wc/wc-queries.h
  stable/11/contrib/subversion/subversion/svn/info-cmd.c
  stable/11/contrib/subversion/subversion/svn/merge-cmd.c
  stable/11/contrib/subversion/subversion/svnserve/serve.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/contrib/subversion/CHANGES
==
--- stable/11/contrib/subversion/CHANGESSat Dec  3 20:01:12 2016
(r309510)
+++ stable/11/contrib/subversion/CHANGESSat Dec  3 20:30:05 2016
(r309511)
@@ -1,3 +1,54 @@
+Version 1.9.5
+(29 Nov 2016, from /branches/1.9.x)
+http://svn.apache.org/repos/asf/subversion/tags/1.9.5
+
+ User-visible changes:
+  - Client-side bugfixes:
+* fix accessing non-existent paths during reintegrate merge (r1766699 et 
al)
+* fix handling of newly secured subdirectories in working copy (r1724448)
+* info: remove trailing whitespace in --show-item=revision (issue #4660)
+* fix recording wrong revisions for tree conflicts (r1734106)
+* gpg-agent: improve discovery of gpg-agent sockets (r1766327)
+* gpg-agent: fix file descriptor leak (r1766323)
+* resolve: fix --accept=mine-full for binary files (issue #4647)
+* merge: fix possible crash (issue #4652)
+* resolve: fix possible crash (r1748514)
+* fix potential crash in Win32 crash reporter (r1663253 et al)
+
+  - Server-side bugfixes:
+* fsfs: fix "offset too large" error during pack (issue #4657)
+* svnserve: enable hook script environments (r1769152)
+* fsfs: fix possible data reconstruction error (issue #4658)
+* fix source of spurious 'incoming edit' tree conflicts (r1770108)
+* fsfs: improve caching for large directories (r1721285)
+* fsfs: fix crash when encountering all-zero checksums (r1759686)
+* fsfs: fix potential source of repository corruptions (r1756266)
+* mod_dav_svn: fix excessive memory usage with mod_headers/mod_deflate
+  (issue #3084)
+* mod_dav_svn: reduce memory usage during GET requests (r1757529 et al)
+* fsfs: fix unexpected "database is locked" errors (r1741096 et al)
+* fsfs: fix opening old repositories without db/format files (r1720015)
+
+  - Client-side and server-side bugfixes:
+* fix possible crash when reading invalid configuration files (r1715777)
+
+  - Bindings bugfixes:
+* swig-pl: do not corrupt "{DATE}" revision variable (r1767768)
+* javahl: fix temporary accepting SSL server 

Re: svn commit: r309400 - head/sys/dev/acpica

2016-12-03 Thread Oliver Pinter
On Fri, Dec 2, 2016 at 9:21 AM, Hans Petter Selasky
 wrote:
> Author: hselasky
> Date: Fri Dec  2 08:21:08 2016
> New Revision: 309400
> URL: https://svnweb.freebsd.org/changeset/base/309400
>
> Log:
>   Fix for endless recursion in the ACPI GPE handler during boot.
>
>   When handling a GPE ACPI interrupt object the EcSpaceHandler()
>   function can be called which checks the EC_EVENT_SCI bit and then
>   recurse on the EcGpeQueryHandler() function. If there are multiple GPE
>   events pending the EC_EVENT_SCI bit will be set at the next call to
>   EcSpaceHandler() causing it to recurse again via the
>   EcGpeQueryHandler() function. This leads to a slow never ending
>   recursion during boot which prevents proper system startup, because
>   the EC_EVENT_SCI bit never gets cleared in this scenario.
>
>   The behaviour is reproducible with the ALASKA AMI in combination with
>   a newer Skylake based mainboard in the following way:
>
>   Enter BIOS and adjust the clock one hour forward. Save and exit the
>   BIOS. System fails to boot due to the above mentioned bug in
>   EcGpeQueryHandler() which was observed recursing multiple times.
>
>   This patch adds a simple recursion guard to the EcGpeQueryHandler()
>   function and also also adds logic to detect if new GPE events occurred
>   during the execution of EcGpeQueryHandler() and then loop on this
>   function instead of recursing.
>
>   Reviewed by:  jhb
>   MFC after:2 weeks
>
> Modified:
>   head/sys/dev/acpica/acpi_ec.c


I have similar error since the latest BIOS update on my gigabyte
H170N-Wifi board. The curiosity of the BIOS update was after upgrading
to this version, there are no possibility to rollback to older
version.

The other weird thing, is that MFCing back this patch does not help. I
get stucked lock in acmtx mutex, as you
could see from the attached log. The other interesting is the ACPI
error at boot time:

[1] ACPI Error: Mutex [0x0] is not acquired, cannot release
(20160527/utmutex-386)
[1] ACPI Error: Could not release AML Interpreter mutex (20160527/exutils-147)
[1] ACPI Error: Mutex [0x0] is not acquired, cannot release
(20160527/utmutex-386)
[1] ACPI Error: Could not release AML Interpreter mutex (20160527/exutils-147)
[1] cpu1:  on acpi0
[1] ACPI Error: Mutex [0x0] is not acquired, cannot release
(20160527/utmutex-386)
[1] ACPI Error: Could not release AML Interpreter mutex (20160527/exutils-147)
[1] ACPI Error: Mutex [0x0] is not acquired, cannot release
(20160527/utmutex-386)
[1] ACPI Error: Could not release AML Interpreter mutex (20160527/exutils-147)

(This error is on 10-STABLE.)

>
> Modified: head/sys/dev/acpica/acpi_ec.c
> ==
> --- head/sys/dev/acpica/acpi_ec.c   Fri Dec  2 08:15:52 2016
> (r309399)
> +++ head/sys/dev/acpica/acpi_ec.c   Fri Dec  2 08:21:08 2016
> (r309400)
> @@ -613,16 +613,14 @@ EcCheckStatus(struct acpi_ec_softc *sc,
>  }
>
>  static void
> -EcGpeQueryHandler(void *Context)
> +EcGpeQueryHandlerSub(struct acpi_ec_softc *sc)
>  {
> -struct acpi_ec_softc   *sc = (struct acpi_ec_softc *)Context;
>  UINT8  Data;
>  ACPI_STATUSStatus;
>  intretry;
>  char   qxx[5];
>
>  ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__);
> -KASSERT(Context != NULL, ("EcGpeQueryHandler called with NULL"));
>
>  /* Serialize user access with EcSpaceHandler(). */
>  Status = EcLock(sc);
> @@ -647,7 +645,6 @@ EcGpeQueryHandler(void *Context)
> EC_EVENT_INPUT_BUFFER_EMPTY)))
> break;
>  }
> -sc->ec_sci_pend = FALSE;
>  if (ACPI_FAILURE(Status)) {
> EcUnlock(sc);
> device_printf(sc->ec_dev, "GPE query failed: %s\n",
> @@ -678,6 +675,29 @@ EcGpeQueryHandler(void *Context)
>  }
>  }
>
> +static void
> +EcGpeQueryHandler(void *Context)
> +{
> +struct acpi_ec_softc *sc = (struct acpi_ec_softc *)Context;
> +int pending;
> +
> +KASSERT(Context != NULL, ("EcGpeQueryHandler called with NULL"));
> +
> +do {
> +   /* Read the current pending count */
> +   pending = atomic_load_acq_int(>ec_sci_pend);
> +
> +   /* Call GPE handler function */
> +   EcGpeQueryHandlerSub(sc);
> +
> +   /*
> +* Try to reset the pending count to zero. If this fails we
> +* know another GPE event has occurred while handling the
> +* current GPE event and need to loop.
> +*/
> +} while (!atomic_cmpset_int(>ec_sci_pend, pending, 0));
> +}
> +
>  /*
>   * The GPE handler is called when IBE/OBF or SCI events occur.  We are
>   * called from an unknown lock context.
> @@ -706,13 +726,14 @@ EcGpeHandler(ACPI_HANDLE GpeDevice, UINT
>   * It will run the query and _Qxx method later, under the lock.
>   */
>  EcStatus = EC_GET_CSR(sc);
> -if ((EcStatus & 

svn commit: r309510 - stable/10/lib/msun/src

2016-12-03 Thread Edward Tomasz Napierala
Author: trasz
Date: Sat Dec  3 20:01:12 2016
New Revision: 309510
URL: https://svnweb.freebsd.org/changeset/base/309510

Log:
  MFC r301761:
  
  Fix frexpl() declaration to not include the field name.

Modified:
  stable/10/lib/msun/src/math.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/msun/src/math.h
==
--- stable/10/lib/msun/src/math.h   Sat Dec  3 19:55:55 2016
(r309509)
+++ stable/10/lib/msun/src/math.h   Sat Dec  3 20:01:12 2016
(r309510)
@@ -465,7 +465,7 @@ long double fmal(long double, long doubl
 long doublefmaxl(long double, long double) __pure2;
 long doublefminl(long double, long double) __pure2;
 long doublefmodl(long double, long double);
-long doublefrexpl(long double value, int *); /* fundamentally !__pure2 */
+long doublefrexpl(long double, int *); /* fundamentally !__pure2 */
 long doublehypotl(long double, long double);
 intilogbl(long double) __pure2;
 long doubleldexpl(long double, int);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r309509 - stable/10/usr.sbin/autofs

2016-12-03 Thread Edward Tomasz Napierala
Author: trasz
Date: Sat Dec  3 19:55:55 2016
New Revision: 309509
URL: https://svnweb.freebsd.org/changeset/base/309509

Log:
  MFC r308206:
  
  Make autounmountd(8) not die when traced with "truss -p".

Modified:
  stable/10/usr.sbin/autofs/autounmountd.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/autofs/autounmountd.c
==
--- stable/10/usr.sbin/autofs/autounmountd.cSat Dec  3 19:53:15 2016
(r309508)
+++ stable/10/usr.sbin/autofs/autounmountd.cSat Dec  3 19:55:55 2016
(r309509)
@@ -244,8 +244,11 @@ do_wait(int kq, double sleep_time)
log_debugx("waiting for filesystem event");
nevents = kevent(kq, NULL, 0, , 1, NULL);
}
-   if (nevents < 0)
+   if (nevents < 0) {
+   if (errno == EINTR)
+   return;
log_err(1, "kevent");
+   }
 
if (nevents == 0) {
log_debugx("timeout reached");
___
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: r309508 - stable/11/usr.sbin/autofs

2016-12-03 Thread Edward Tomasz Napierala
Author: trasz
Date: Sat Dec  3 19:53:15 2016
New Revision: 309508
URL: https://svnweb.freebsd.org/changeset/base/309508

Log:
  MFC r308206:
  
  Make autounmountd(8) not die when traced with "truss -p".

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

Modified: stable/11/usr.sbin/autofs/autounmountd.c
==
--- stable/11/usr.sbin/autofs/autounmountd.cSat Dec  3 19:52:33 2016
(r309507)
+++ stable/11/usr.sbin/autofs/autounmountd.cSat Dec  3 19:53:15 2016
(r309508)
@@ -244,8 +244,11 @@ do_wait(int kq, double sleep_time)
log_debugx("waiting for filesystem event");
nevents = kevent(kq, NULL, 0, , 1, NULL);
}
-   if (nevents < 0)
+   if (nevents < 0) {
+   if (errno == EINTR)
+   return;
log_err(1, "kevent");
+   }
 
if (nevents == 0) {
log_debugx("timeout reached");
___
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: r309507 - stable/10/lib/libc/rpc

2016-12-03 Thread Ngie Cooper
Author: ngie
Date: Sat Dec  3 19:52:33 2016
New Revision: 309507
URL: https://svnweb.freebsd.org/changeset/base/309507

Log:
  MFC r264196:
  r264196 (by theraven):
  
  Move definitions out of rpc_com so that the linker doesn't complain about
  multiple definitions.

Modified:
  stable/10/lib/libc/rpc/rpc_com.h
  stable/10/lib/libc/rpc/svc.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/rpc/rpc_com.h
==
--- stable/10/lib/libc/rpc/rpc_com.hSat Dec  3 19:21:35 2016
(r309506)
+++ stable/10/lib/libc/rpc/rpc_com.hSat Dec  3 19:52:33 2016
(r309507)
@@ -86,8 +86,8 @@ bool_t __xdrrec_setnonblock(XDR *, int);
 bool_t __xdrrec_getrec(XDR *, enum xprt_stat *, bool_t);
 void __xprt_unregister_unlocked(SVCXPRT *);
 
-SVCXPRT **__svc_xports;
-int __svc_maxrec;
+extern SVCXPRT **__svc_xports;
+extern int __svc_maxrec;
 
 __END_DECLS
 

Modified: stable/10/lib/libc/rpc/svc.c
==
--- stable/10/lib/libc/rpc/svc.cSat Dec  3 19:21:35 2016
(r309506)
+++ stable/10/lib/libc/rpc/svc.cSat Dec  3 19:52:33 2016
(r309507)
@@ -84,6 +84,9 @@ static struct svc_callout {
void(*sc_dispatch)(struct svc_req *, SVCXPRT *);
 } *svc_head;
 
+SVCXPRT **__svc_xports;
+int __svc_maxrec;
+
 static struct svc_callout *svc_find(rpcprog_t, rpcvers_t,
 struct svc_callout **, char *);
 static void __xprt_do_unregister (SVCXPRT *xprt, bool_t dolock);
___
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: r309506 - stable/10/usr.sbin/rpcbind

2016-12-03 Thread Ngie Cooper
Author: ngie
Date: Sat Dec  3 19:21:35 2016
New Revision: 309506
URL: https://svnweb.freebsd.org/changeset/base/309506

Log:
  MFC r301770:
  r301770 (by pfg):
  
  rpcbind(8): Make use of some xdr_* macros.
  
  xdr_rpcproc, xdr_rpcprog and xdr_rpcvers were broken in older
  versions of FreeBSD but fixed in r296394.  Give them some use
  hoping they help make the code somewhat more readable.

Modified:
  stable/10/usr.sbin/rpcbind/rpcb_svc_com.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/rpcbind/rpcb_svc_com.c
==
--- stable/10/usr.sbin/rpcbind/rpcb_svc_com.c   Sat Dec  3 19:15:26 2016
(r309505)
+++ stable/10/usr.sbin/rpcbind/rpcb_svc_com.c   Sat Dec  3 19:21:35 2016
(r309506)
@@ -430,9 +430,9 @@ static bool_t
 xdr_rmtcall_args(XDR *xdrs, struct r_rmtcall_args *cap)
 {
/* does not get the address or the arguments */
-   if (xdr_u_int32_t(xdrs, &(cap->rmt_prog)) &&
-   xdr_u_int32_t(xdrs, &(cap->rmt_vers)) &&
-   xdr_u_int32_t(xdrs, &(cap->rmt_proc))) {
+   if (xdr_rpcprog(xdrs, &(cap->rmt_prog)) &&
+   xdr_rpcvers(xdrs, &(cap->rmt_vers)) &&
+   xdr_rpcproc(xdrs, &(cap->rmt_proc))) {
return (xdr_encap_parms(xdrs, &(cap->rmt_args)));
}
return (FALSE);
___
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: r309505 - stable/10/usr.bin/rpcgen

2016-12-03 Thread Ngie Cooper
Author: ngie
Date: Sat Dec  3 19:15:26 2016
New Revision: 309505
URL: https://svnweb.freebsd.org/changeset/base/309505

Log:
  MFC r298183,r304226:
  
  r298183 (by araujo):
  
  Use NULL for pointers.
  
  strrchr(3) will return NULL if the character does not appears in
  the string.
  
  r304226 (by araujo):
  
  Use nitems() from sys/param.h.

Modified:
  stable/10/usr.bin/rpcgen/rpc_main.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/rpcgen/rpc_main.c
==
--- stable/10/usr.bin/rpcgen/rpc_main.c Sat Dec  3 19:03:40 2016
(r309504)
+++ stable/10/usr.bin/rpcgen/rpc_main.c Sat Dec  3 19:15:26 2016
(r309505)
@@ -82,11 +82,11 @@ static char pathbuf[MAXPATHLEN + 1];
 static const char *allv[] = {
"rpcgen", "-s", "udp", "-s", "tcp",
 };
-static int allc = sizeof (allv)/sizeof (allv[0]);
+static int allc = nitems(allv);
 static const char *allnv[] = {
"rpcgen", "-s", "netpath",
 };
-static int allnc = sizeof (allnv)/sizeof (allnv[0]);
+static int allnc = nitems(allnv);
 
 /*
  * machinations for handling expanding argument list
@@ -451,7 +451,7 @@ generate_guard(const char *pathname)
char *guard, *tmp, *stopat;
 
filename = strrchr(pathname, '/');  /* find last component */
-   filename = ((filename == 0) ? pathname : filename+1);
+   filename = ((filename == NULL) ? pathname : filename+1);
guard = xstrdup(filename);
stopat = strrchr(guard, '.');
 
___
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: r309504 - head/etc

2016-12-03 Thread Devin Teske
Author: dteske
Date: Sat Dec  3 19:03:40 2016
New Revision: 309504
URL: https://svnweb.freebsd.org/changeset/base/309504

Log:
  Fix bug preventing limits(1) from being applied
  
  PR:   misc/212493
  Differential Revision:https://reviews.freebsd.org/D8232
  Submitted by: girgen
  Reviewed by:  adrian
  MFC after:3 days
  X-MFC-to: stable/11

Modified:
  head/etc/rc.subr

Modified: head/etc/rc.subr
==
--- head/etc/rc.subrSat Dec  3 19:03:25 2016(r309503)
+++ head/etc/rc.subrSat Dec  3 19:03:40 2016(r309504)
@@ -1045,6 +1045,7 @@ run_rc_command()
#
check_startmsgs && echo "Starting ${name}."
if [ -n "$_chroot" ]; then
+   _cd=
_doit="\
 ${_nice:+nice -n $_nice }\
 ${_fib:+setfib -F $_fib }\
@@ -1052,8 +1053,8 @@ ${_env:+env $_env }\
 chroot ${_user:+-u $_user }${_group:+-g $_group }${_groups:+-G $_groups }\
 $_chroot $command $rc_flags $command_args"
else
+   _cd="${_chdir:+cd $_chdir && }"
_doit="\
-${_chdir:+cd $_chdir && }\
 ${_fib:+setfib -F $_fib }\
 ${_env:+env $_env }\
 $command $rc_flags $command_args"
@@ -1072,7 +1073,7 @@ $command $rc_flags $command_args"
fi
 
# Prepend default limits
-   _doit="limits -C $_login_class $_doit"
+   _doit="$_cd limits -C $_login_class $_doit"
 
# run the full command
#
___
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: r309503 - in stable/10/sys: rpc xdr

2016-12-03 Thread Ngie Cooper
Author: ngie
Date: Sat Dec  3 19:03:25 2016
New Revision: 309503
URL: https://svnweb.freebsd.org/changeset/base/309503

Log:
  MFC r297975:
  r297975 (by pfg):
  
  RPC: for pointers replace 0 with NULL.
  
  These are mostly cosmetical, no functional change.
  
  Found with devel/coccinelle.

Modified:
  stable/10/sys/rpc/svc_vc.c
  stable/10/sys/xdr/xdr_mem.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/rpc/svc_vc.c
==
--- stable/10/sys/rpc/svc_vc.c  Sat Dec  3 18:56:28 2016(r309502)
+++ stable/10/sys/rpc/svc_vc.c  Sat Dec  3 19:03:25 2016(r309503)
@@ -414,7 +414,7 @@ svc_vc_rendezvous_recv(SVCXPRT *xprt, st
 
sx_xunlock(>xp_lock);
 
-   sa = 0;
+   sa = NULL;
error = soaccept(so, );
 
if (error) {

Modified: stable/10/sys/xdr/xdr_mem.c
==
--- stable/10/sys/xdr/xdr_mem.c Sat Dec  3 18:56:28 2016(r309502)
+++ stable/10/sys/xdr/xdr_mem.c Sat Dec  3 19:03:25 2016(r309503)
@@ -214,7 +214,7 @@ xdrmem_setpos(XDR *xdrs, u_int pos)
 static int32_t *
 xdrmem_inline_aligned(XDR *xdrs, u_int len)
 {
-   int32_t *buf = 0;
+   int32_t *buf = NULL;
 
if (xdrs->x_handy >= len) {
xdrs->x_handy -= len;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r309502 - in stable/10: include/rpc lib/libc/rpc

2016-12-03 Thread Ngie Cooper
Author: ngie
Date: Sat Dec  3 18:56:28 2016
New Revision: 309502
URL: https://svnweb.freebsd.org/changeset/base/309502

Log:
  MFC r296133:
  r296133 (by pfg):
  
  RPC: update the getrpcbyname() definition to include a const qualifier.
  
  Add const qualifier making getrpcbyname() and getrpcbyname_r()
  prototypes match those used in latest Sun RPC code (TI-RPC 2.3).
  
  Obtained from:NetBSD

Modified:
  stable/10/include/rpc/rpcent.h
  stable/10/lib/libc/rpc/getrpcent.3
  stable/10/lib/libc/rpc/getrpcent.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/include/rpc/rpcent.h
==
--- stable/10/include/rpc/rpcent.h  Sat Dec  3 18:53:03 2016
(r309501)
+++ stable/10/include/rpc/rpcent.h  Sat Dec  3 18:56:28 2016
(r309502)
@@ -56,7 +56,7 @@ __BEGIN_DECLS
  * These interfaces are currently implemented through nsswitch and are
  * MT-safe.
  */
-extern struct rpcent *getrpcbyname(char *);
+extern struct rpcent *getrpcbyname(const char *);
 extern struct rpcent *getrpcbynumber(int);
 extern struct rpcent *getrpcent(void);
 extern void setrpcent(int);

Modified: stable/10/lib/libc/rpc/getrpcent.3
==
--- stable/10/lib/libc/rpc/getrpcent.3  Sat Dec  3 18:53:03 2016
(r309501)
+++ stable/10/lib/libc/rpc/getrpcent.3  Sat Dec  3 18:56:28 2016
(r309502)
@@ -2,7 +2,7 @@
 .\" $NetBSD: getrpcent.3,v 1.6 1998/02/05 18:49:06 perry Exp $
 .\" $FreeBSD$
 .\"
-.Dd December 14, 1987
+.Dd February 26, 2016
 .Dt GETRPCENT 3
 .Os
 .Sh NAME
@@ -19,7 +19,7 @@
 .Ft struct rpcent *
 .Fn getrpcent void
 .Ft struct rpcent *
-.Fn getrpcbyname "char *name"
+.Fn getrpcbyname "const char *name"
 .Ft struct rpcent *
 .Fn getrpcbynumber "int number"
 .Ft void

Modified: stable/10/lib/libc/rpc/getrpcent.c
==
--- stable/10/lib/libc/rpc/getrpcent.c  Sat Dec  3 18:53:03 2016
(r309501)
+++ stable/10/lib/libc/rpc/getrpcent.c  Sat Dec  3 18:56:28 2016
(r309502)
@@ -971,7 +971,7 @@ getrpc(int (*fn)(union key, struct rpcen
 }
 
 struct rpcent *
-getrpcbyname(char *name)
+getrpcbyname(const char *name)
 {
union key key;
 
___
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: r309501 - in stable/10: lib/libc/rpc sys/rpc

2016-12-03 Thread Ngie Cooper
Author: ngie
Date: Sat Dec  3 18:53:03 2016
New Revision: 309501
URL: https://svnweb.freebsd.org/changeset/base/309501

Log:
  MFC r301734:
  r301734 (by kevlo):
  
  Fix the rpcb_getaddr() definition to match its declaration.

Modified:
  stable/10/lib/libc/rpc/rpcb_clnt.c
  stable/10/sys/rpc/rpcb_clnt.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/rpc/rpcb_clnt.c
==
--- stable/10/lib/libc/rpc/rpcb_clnt.c  Sat Dec  3 18:48:39 2016
(r309500)
+++ stable/10/lib/libc/rpc/rpcb_clnt.c  Sat Dec  3 18:53:03 2016
(r309501)
@@ -1010,7 +1010,7 @@ done:
  *
  * Assuming that the address is all properly allocated
  */
-int
+bool_t
 rpcb_getaddr(rpcprog_t program, rpcvers_t version, const struct netconfig 
*nconf,
 struct netbuf *address, const char *host)
 {

Modified: stable/10/sys/rpc/rpcb_clnt.c
==
--- stable/10/sys/rpc/rpcb_clnt.c   Sat Dec  3 18:48:39 2016
(r309500)
+++ stable/10/sys/rpc/rpcb_clnt.c   Sat Dec  3 18:53:03 2016
(r309501)
@@ -1051,7 +1051,7 @@ done:
  *
  * Assuming that the address is all properly allocated
  */
-int
+bool_t
 rpcb_getaddr(program, version, nconf, address, host)
rpcprog_t program;
rpcvers_t version;
___
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: r309500 - stable/10/lib/libc/rpc

2016-12-03 Thread Ngie Cooper
Author: ngie
Date: Sat Dec  3 18:48:39 2016
New Revision: 309500
URL: https://svnweb.freebsd.org/changeset/base/309500

Log:
  MFC r296404:
  r296404 (by pfg):
  
  Stray tabs and spaces.
  
  No functional change.

Modified:
  stable/10/lib/libc/rpc/rtime.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/rpc/rtime.c
==
--- stable/10/lib/libc/rpc/rtime.c  Sat Dec  3 18:45:12 2016
(r309499)
+++ stable/10/lib/libc/rpc/rtime.c  Sat Dec  3 18:48:39 2016
(r309500)
@@ -61,8 +61,8 @@ __FBSDID("$FreeBSD$");
 
 extern int _rpc_dtablesize( void );
 
-#define NYEARS (unsigned long)(1970 - 1900)
-#define TOFFSET (unsigned long)(60*60*24*(365*NYEARS + (NYEARS/4)))
+#defineNYEARS  (unsigned long)(1970 - 1900)
+#defineTOFFSET (unsigned long)(60*60*24*(365*NYEARS + (NYEARS/4)))
 
 static void do_close( int );
 
@@ -98,11 +98,11 @@ rtime(struct sockaddr_in *addrp, struct 
addrp->sin_port = serv->s_port;
 
if (type == SOCK_DGRAM) {
-   res = _sendto(s, (char *), sizeof(thetime), 0, 
+   res = _sendto(s, (char *), sizeof(thetime), 0,
 (struct sockaddr *)addrp, sizeof(*addrp));
if (res < 0) {
do_close(s);
-   return(-1); 
+   return(-1);
}
do {
FD_ZERO();
@@ -115,14 +115,14 @@ rtime(struct sockaddr_in *addrp, struct 
errno = ETIMEDOUT;
}
do_close(s);
-   return(-1); 
+   return(-1);
}
fromlen = sizeof(from);
-   res = _recvfrom(s, (char *), sizeof(thetime), 0, 
+   res = _recvfrom(s, (char *), sizeof(thetime), 0,
   (struct sockaddr *), );
do_close(s);
if (res < 0) {
-   return(-1); 
+   return(-1);
}
} else {
if (_connect(s, (struct sockaddr *)addrp, sizeof(*addrp)) < 0) {
@@ -137,7 +137,7 @@ rtime(struct sockaddr_in *addrp, struct 
}
if (res != sizeof(thetime)) {
errno = EIO;
-   return(-1); 
+   return(-1);
}
thetime = ntohl(thetime);
timep->tv_sec = thetime - TOFFSET;
___
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: r309499 - stable/10/lib/libc/rpc

2016-12-03 Thread Ngie Cooper
Author: ngie
Date: Sat Dec  3 18:45:12 2016
New Revision: 309499
URL: https://svnweb.freebsd.org/changeset/base/309499

Log:
  MFC r287353:
  r287353 (by rodrigc):
  
  Use unsigned variable.
  
  Eliminates gcc 4.9 compiler warning.

Modified:
  stable/10/lib/libc/rpc/clnt_bcast.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/rpc/clnt_bcast.c
==
--- stable/10/lib/libc/rpc/clnt_bcast.c Sat Dec  3 18:40:39 2016
(r309498)
+++ stable/10/lib/libc/rpc/clnt_bcast.c Sat Dec  3 18:45:12 2016
(r309499)
@@ -256,7 +256,7 @@ rpc_broadcast_exp(rpcprog_t prog, rpcver
int inlen;
u_int   maxbufsize = 0;
AUTH*sys_auth = authunix_create_default();
-   int i;
+   u_int   i;
void*handle;
charuaddress[1024]; /* A self imposed limit */
char*uaddrp = uaddress;
___
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: r309498 - stable/10/lib/libc/rpc

2016-12-03 Thread Ngie Cooper
Author: ngie
Date: Sat Dec  3 18:40:39 2016
New Revision: 309498
URL: https://svnweb.freebsd.org/changeset/base/309498

Log:
  MFC r296386:
  r296386 (by pfg):
  
  Work around aliasing issues detected in modern GCC.
  
  Avoid casting gymnastics that lead to pointer aliasing by introducing an
  inline function as done in NetBSD (but without #if0'd WIP code).
  
  Obtained from:NetBSD (CVS Rev. 1.24, 1.25)

Modified:
  stable/10/lib/libc/rpc/clnt_vc.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/rpc/clnt_vc.c
==
--- stable/10/lib/libc/rpc/clnt_vc.cSat Dec  3 18:26:41 2016
(r309497)
+++ stable/10/lib/libc/rpc/clnt_vc.cSat Dec  3 18:40:39 2016
(r309498)
@@ -503,6 +503,20 @@ clnt_vc_abort(CLIENT *cl)
 {
 }
 
+static __inline void
+htonlp(void *dst, const void *src, uint32_t incr)
+{
+   /* We are aligned, so we think */
+   *(uint32_t *)dst = htonl(*(const uint32_t *)src + incr);
+}
+
+static __inline void
+ntohlp(void *dst, const void *src)
+{
+   /* We are aligned, so we think */
+   *(uint32_t *)dst = htonl(*(const uint32_t *)src);
+}
+
 static bool_t
 clnt_vc_control(CLIENT *cl, u_int request, void *info)
 {
@@ -577,14 +591,12 @@ clnt_vc_control(CLIENT *cl, u_int reques
 * first element in the call structure
 * This will get the xid of the PREVIOUS call
 */
-   *(u_int32_t *)info =
-   ntohl(*(u_int32_t *)(void *)>ct_u.ct_mcalli);
+   ntohlp(info, >ct_u.ct_mcalli);
break;
case CLSET_XID:
/* This will set the xid of the NEXT call */
-   *(u_int32_t *)(void *)>ct_u.ct_mcalli =
-   htonl(*((u_int32_t *)info) + 1);
/* increment by 1 as clnt_vc_call() decrements once */
+   htonlp(>ct_u.ct_mcalli, info, 1);
break;
case CLGET_VERS:
/*
@@ -593,15 +605,11 @@ clnt_vc_control(CLIENT *cl, u_int reques
 * begining of the RPC header. MUST be changed if the
 * call_struct is changed
 */
-   *(u_int32_t *)info =
-   ntohl(*(u_int32_t *)(void *)(ct->ct_u.ct_mcallc +
-   4 * BYTES_PER_XDR_UNIT));
+   ntohlp(info, ct->ct_u.ct_mcallc + 4 * BYTES_PER_XDR_UNIT);
break;
 
case CLSET_VERS:
-   *(u_int32_t *)(void *)(ct->ct_u.ct_mcallc +
-   4 * BYTES_PER_XDR_UNIT) =
-   htonl(*(u_int32_t *)info);
+   htonlp(ct->ct_u.ct_mcallc + 4 * BYTES_PER_XDR_UNIT, info, 0);
break;
 
case CLGET_PROG:
@@ -611,15 +619,11 @@ clnt_vc_control(CLIENT *cl, u_int reques
 * begining of the RPC header. MUST be changed if the
 * call_struct is changed
 */
-   *(u_int32_t *)info =
-   ntohl(*(u_int32_t *)(void *)(ct->ct_u.ct_mcallc +
-   3 * BYTES_PER_XDR_UNIT));
+   ntohlp(info, ct->ct_u.ct_mcallc + 3 * BYTES_PER_XDR_UNIT);
break;
 
case CLSET_PROG:
-   *(u_int32_t *)(void *)(ct->ct_u.ct_mcallc +
-   3 * BYTES_PER_XDR_UNIT) =
-   htonl(*(u_int32_t *)info);
+   htonlp(ct->ct_u.ct_mcallc + 3 * BYTES_PER_XDR_UNIT, info, 0);
break;
 
default:
___
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: r309497 - stable/10/lib/libc/rpc

2016-12-03 Thread Ngie Cooper
Author: ngie
Date: Sat Dec  3 18:26:41 2016
New Revision: 309497
URL: https://svnweb.freebsd.org/changeset/base/309497

Log:
  MFC r278039:
  r278039 (by pfg):
  
  Resource leak
  
  CID:  1016703

Modified:
  stable/10/lib/libc/rpc/crypt_client.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/rpc/crypt_client.c
==
--- stable/10/lib/libc/rpc/crypt_client.c   Sat Dec  3 18:25:23 2016
(r309496)
+++ stable/10/lib/libc/rpc/crypt_client.c   Sat Dec  3 18:26:41 2016
(r309497)
@@ -61,6 +61,7 @@ _des_crypt_call(char *buf, int len, stru
}
if (nconf == NULL) {
warnx("getnetconfig: %s", nc_sperror());
+   endnetconfig(localhandle);
return(DESERR_HWERROR);
}
clnt = clnt_tp_create(NULL, CRYPT_PROG, CRYPT_VERS, nconf);
___
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: r309496 - stable/10/lib/libc/rpc

2016-12-03 Thread Ngie Cooper
Author: ngie
Date: Sat Dec  3 18:25:23 2016
New Revision: 309496
URL: https://svnweb.freebsd.org/changeset/base/309496

Log:
  MFC r288017:
  r288017 (by rodrigc):
  
  Use ANSI C prototypes.
  
  Eliminates gcc 4.9 warnings.

Modified:
  stable/10/lib/libc/rpc/svc.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/rpc/svc.c
==
--- stable/10/lib/libc/rpc/svc.cSat Dec  3 18:21:28 2016
(r309495)
+++ stable/10/lib/libc/rpc/svc.cSat Dec  3 18:25:23 2016
(r309496)
@@ -94,8 +94,7 @@ static void __xprt_do_unregister (SVCXPR
  * Activate a transport handle.
  */
 void
-xprt_register(xprt)
-   SVCXPRT *xprt;
+xprt_register(SVCXPRT *xprt)
 {
int sock;
 
@@ -137,9 +136,7 @@ __xprt_unregister_unlocked(SVCXPRT *xprt
  * De-activate a transport handle.
  */
 static void
-__xprt_do_unregister(xprt, dolock)
-   SVCXPRT *xprt;
-   bool_t dolock;
+__xprt_do_unregister(SVCXPRT *xprt, bool_t dolock)
 {
int sock;
 
@@ -168,12 +165,9 @@ __xprt_do_unregister(xprt, dolock)
  * program number comes in.
  */
 bool_t
-svc_reg(xprt, prog, vers, dispatch, nconf)
-   SVCXPRT *xprt;
-   const rpcprog_t prog;
-   const rpcvers_t vers;
-   void (*dispatch)(struct svc_req *, SVCXPRT *);
-   const struct netconfig *nconf;
+svc_reg(SVCXPRT *xprt, const rpcprog_t prog, const rpcvers_t vers,
+void (*dispatch)(struct svc_req *, SVCXPRT *),
+const struct netconfig *nconf)
 {
bool_t dummy;
struct svc_callout *prev;
@@ -240,9 +234,7 @@ rpcb_it:
  * Remove a service program from the callout list.
  */
 void
-svc_unreg(prog, vers)
-   const rpcprog_t prog;
-   const rpcvers_t vers;
+svc_unreg(const rpcprog_t prog, const rpcvers_t vers)
 {
struct svc_callout *prev;
struct svc_callout *s;
@@ -273,12 +265,9 @@ svc_unreg(prog, vers)
  * program number comes in.
  */
 bool_t
-svc_register(xprt, prog, vers, dispatch, protocol)
-   SVCXPRT *xprt;
-   u_long prog;
-   u_long vers;
-   void (*dispatch)(struct svc_req *, SVCXPRT *);
-   int protocol;
+svc_register(SVCXPRT *xprt, u_long prog, u_long vers,
+void (*dispatch)(struct svc_req *, SVCXPRT *),
+int protocol)
 {
struct svc_callout *prev;
struct svc_callout *s;
@@ -313,9 +302,7 @@ pmap_it:
  * Remove a service program from the callout list.
  */
 void
-svc_unregister(prog, vers)
-   u_long prog;
-   u_long vers;
+svc_unregister(u_long prog, u_long vers)
 {
struct svc_callout *prev;
struct svc_callout *s;
@@ -340,11 +327,8 @@ svc_unregister(prog, vers)
  * struct.
  */
 static struct svc_callout *
-svc_find(prog, vers, prev, netid)
-   rpcprog_t prog;
-   rpcvers_t vers;
-   struct svc_callout **prev;
-   char *netid;
+svc_find(rpcprog_t prog, rpcvers_t vers, struct svc_callout **prev,
+char *netid)
 {
struct svc_callout *s, *p;
 
@@ -368,10 +352,8 @@ svc_find(prog, vers, prev, netid)
  * Send a reply to an rpc request
  */
 bool_t
-svc_sendreply(xprt, xdr_results, xdr_location)
-   SVCXPRT *xprt;
-   xdrproc_t xdr_results;
-   void * xdr_location;
+svc_sendreply(SVCXPRT *xprt, xdrproc_t xdr_results,
+void * xdr_location)
 {
struct rpc_msg rply; 
 
@@ -390,8 +372,7 @@ svc_sendreply(xprt, xdr_results, xdr_loc
  * No procedure error reply
  */
 void
-svcerr_noproc(xprt)
-   SVCXPRT *xprt;
+svcerr_noproc(SVCXPRT *xprt)
 {
struct rpc_msg rply;
 
@@ -408,8 +389,7 @@ svcerr_noproc(xprt)
  * Can't decode args error reply
  */
 void
-svcerr_decode(xprt)
-   SVCXPRT *xprt;
+svcerr_decode(SVCXPRT *xprt)
 {
struct rpc_msg rply; 
 
@@ -426,8 +406,7 @@ svcerr_decode(xprt)
  * Some system error
  */
 void
-svcerr_systemerr(xprt)
-   SVCXPRT *xprt;
+svcerr_systemerr(SVCXPRT *xprt)
 {
struct rpc_msg rply; 
 
@@ -448,31 +427,27 @@ svcerr_systemerr(xprt)
  * protocol: the portmapper (or rpc binder).
  */
 void
-__svc_versquiet_on(xprt)
-   SVCXPRT *xprt;
+__svc_versquiet_on(SVCXPRT *xprt)
 {
 
SVC_EXT(xprt)->xp_flags |= SVC_VERSQUIET;
 }
 
 void
-__svc_versquiet_off(xprt)
-   SVCXPRT *xprt;
+__svc_versquiet_off(SVCXPRT *xprt)
 {
 
SVC_EXT(xprt)->xp_flags &= ~SVC_VERSQUIET;
 }
 
 void
-svc_versquiet(xprt)
-   SVCXPRT *xprt;
+svc_versquiet(SVCXPRT *xprt)
 {
__svc_versquiet_on(xprt);
 }
 
 int
-__svc_versquiet_get(xprt)
-   SVCXPRT *xprt;
+__svc_versquiet_get(SVCXPRT *xprt)
 {
 
return (SVC_EXT(xprt)->xp_flags & SVC_VERSQUIET);
@@ -483,9 +458,7 @@ __svc_versquiet_get(xprt)
  * Authentication error reply
  */
 void
-svcerr_auth(xprt, why)
-   SVCXPRT *xprt;
-   enum auth_stat why;
+svcerr_auth(SVCXPRT *xprt, enum auth_stat why)
 {
struct rpc_msg rply;
 
@@ -502,8 +475,7 @@ svcerr_auth(xprt, why)
  * Auth too weak error reply
  */
 void
-svcerr_weakauth(xprt)
-   SVCXPRT 

svn commit: r309495 - stable/10/lib/libc/rpc

2016-12-03 Thread Ngie Cooper
Author: ngie
Date: Sat Dec  3 18:21:28 2016
New Revision: 309495
URL: https://svnweb.freebsd.org/changeset/base/309495

Log:
  MFC r288995:
  r288995 (by rodrigc):
  
  Use proper function prototypes.
  Eliminates -Wstrict-prototypes warning

Modified:
  stable/10/lib/libc/rpc/getpublickey.c
  stable/10/lib/libc/rpc/key_call.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/rpc/getpublickey.c
==
--- stable/10/lib/libc/rpc/getpublickey.c   Sat Dec  3 18:17:06 2016
(r309494)
+++ stable/10/lib/libc/rpc/getpublickey.c   Sat Dec  3 18:21:28 2016
(r309495)
@@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$");
 /*
  * Hack to let ypserv/rpc.nisd use AUTH_DES.
  */
-int (*__getpublickey_LOCAL)() = 0;
+int (*__getpublickey_LOCAL)(const char *, char *) = 0;
 
 /*
  * Get somebody's public key

Modified: stable/10/lib/libc/rpc/key_call.c
==
--- stable/10/lib/libc/rpc/key_call.c   Sat Dec  3 18:17:06 2016
(r309494)
+++ stable/10/lib/libc/rpc/key_call.c   Sat Dec  3 18:21:28 2016
(r309495)
@@ -81,9 +81,9 @@ __FBSDID("$FreeBSD$");
  * implementations of these functions, and to call those in key_call().
  */
 
-cryptkeyres *(*__key_encryptsession_pk_LOCAL)() = 0;
-cryptkeyres *(*__key_decryptsession_pk_LOCAL)() = 0;
-des_block *(*__key_gendes_LOCAL)() = 0;
+cryptkeyres *(*__key_encryptsession_pk_LOCAL)(uid_t, void *arg) = 0;
+cryptkeyres *(*__key_decryptsession_pk_LOCAL)(uid_t, void *arg) = 0;
+des_block *(*__key_gendes_LOCAL)(uid_t, void *) = 0;
 
 static int key_call( u_long, xdrproc_t, void *, xdrproc_t, void *);
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r309494 - stable/10/lib/libc/rpc

2016-12-03 Thread Ngie Cooper
Author: ngie
Date: Sat Dec  3 18:17:06 2016
New Revision: 309494
URL: https://svnweb.freebsd.org/changeset/base/309494

Log:
  MFC r287347:
  r287347 (by rodrigc):
  
  Use ANSI C prototypes.
  
  Eliminates gcc 4.9 warnings.

Modified:
  stable/10/lib/libc/rpc/rpc_prot.c

Modified: stable/10/lib/libc/rpc/rpc_prot.c
==
--- stable/10/lib/libc/rpc/rpc_prot.c   Sat Dec  3 18:14:29 2016
(r309493)
+++ stable/10/lib/libc/rpc/rpc_prot.c   Sat Dec  3 18:17:06 2016
(r309494)
@@ -68,9 +68,7 @@ extern struct opaque_auth _null_auth;
  * (see auth.h)
  */
 bool_t
-xdr_opaque_auth(xdrs, ap)
-   XDR *xdrs;
-   struct opaque_auth *ap;
+xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap)
 {
 
assert(xdrs != NULL);
@@ -86,9 +84,7 @@ xdr_opaque_auth(xdrs, ap)
  * XDR a DES block
  */
 bool_t
-xdr_des_block(xdrs, blkp)
-   XDR *xdrs;
-   des_block *blkp;
+xdr_des_block(XDR *xdrs, des_block *blkp)
 {
 
assert(xdrs != NULL);
@@ -103,9 +99,7 @@ xdr_des_block(xdrs, blkp)
  * XDR the MSG_ACCEPTED part of a reply message union
  */
 bool_t
-xdr_accepted_reply(xdrs, ar)
-   XDR *xdrs;   
-   struct accepted_reply *ar;
+xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar)
 {
enum accept_stat *par_stat;
 
@@ -142,9 +136,7 @@ xdr_accepted_reply(xdrs, ar)
  * XDR the MSG_DENIED part of a reply message union
  */
 bool_t 
-xdr_rejected_reply(xdrs, rr)
-   XDR *xdrs;
-   struct rejected_reply *rr;
+xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr)
 {
enum reject_stat *prj_stat;
enum auth_stat *prj_why;
@@ -182,9 +174,7 @@ static const struct xdr_discrim reply_ds
  * XDR a reply message
  */
 bool_t
-xdr_replymsg(xdrs, rmsg)
-   XDR *xdrs;
-   struct rpc_msg *rmsg;
+xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg)
 {
enum msg_type *prm_direction;
enum reply_stat *prp_stat;
@@ -212,9 +202,7 @@ xdr_replymsg(xdrs, rmsg)
  * The rm_xid is not really static, but the user can easily munge on the fly.
  */
 bool_t
-xdr_callhdr(xdrs, cmsg)
-   XDR *xdrs;
-   struct rpc_msg *cmsg;
+xdr_callhdr(XDR *xdrs, struct rpc_msg *cmsg)
 {
enum msg_type *prm_direction;
 
@@ -238,9 +226,7 @@ xdr_callhdr(xdrs, cmsg)
 /* ** Client utility routine * */
 
 static void
-accepted(acpt_stat, error)
-   enum accept_stat acpt_stat;
-   struct rpc_err *error;
+accepted(enum accept_stat acpt_stat, struct rpc_err *error)
 {
 
assert(error != NULL);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r309493 - stable/10/lib/libc/rpc

2016-12-03 Thread Ngie Cooper
Author: ngie
Date: Sat Dec  3 18:14:29 2016
New Revision: 309493
URL: https://svnweb.freebsd.org/changeset/base/309493

Log:
  MFC r301754,r301769:
  
  r301754 (by pfg):
  
  libc/rpc: Make use of some xdr_* macros.
  
  xdr_rpcprog and xdr_rpcvers were broken in older versions of FreeBSD
  but were fixed in r296394. Give them some use hoping they help make
  the code somewhat more readable.
  
  r301769 (by pfg):
  
  libc/rpc: Make use of some xdr_* macros. (part 2)
  
  xdr_rpcproc, xdr_rpcprog and xdr_rpcvers were broken in older
  versions of FreeBSD but fixed in r296394.  Give them some use
  hoping they help make the code somewhat more readable.

Modified:
  stable/10/lib/libc/rpc/rpc_callmsg.c
  stable/10/lib/libc/rpc/rpc_prot.c
  stable/10/lib/libc/rpc/rpcb_prot.c
  stable/10/lib/libc/rpc/rpcb_st_xdr.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/rpc/rpc_callmsg.c
==
--- stable/10/lib/libc/rpc/rpc_callmsg.cSat Dec  3 18:08:49 2016
(r309492)
+++ stable/10/lib/libc/rpc/rpc_callmsg.cSat Dec  3 18:14:29 2016
(r309493)
@@ -193,11 +193,11 @@ xdr_callmsg(XDR *xdrs, struct rpc_msg *c
xdr_u_int32_t(xdrs, &(cmsg->rm_xid)) &&
xdr_enum(xdrs, (enum_t *) prm_direction) &&
(cmsg->rm_direction == CALL) &&
-   xdr_u_int32_t(xdrs, &(cmsg->rm_call.cb_rpcvers)) &&
+   xdr_rpcvers(xdrs, &(cmsg->rm_call.cb_rpcvers)) &&
(cmsg->rm_call.cb_rpcvers == RPC_MSG_VERSION) &&
-   xdr_u_int32_t(xdrs, &(cmsg->rm_call.cb_prog)) &&
-   xdr_u_int32_t(xdrs, &(cmsg->rm_call.cb_vers)) &&
-   xdr_u_int32_t(xdrs, &(cmsg->rm_call.cb_proc)) &&
+   xdr_rpcprog(xdrs, &(cmsg->rm_call.cb_prog)) &&
+   xdr_rpcvers(xdrs, &(cmsg->rm_call.cb_vers)) &&
+   xdr_rpcproc(xdrs, &(cmsg->rm_call.cb_proc)) &&
xdr_opaque_auth(xdrs, &(cmsg->rm_call.cb_cred)) )
return (xdr_opaque_auth(xdrs, &(cmsg->rm_call.cb_verf)));
return (FALSE);

Modified: stable/10/lib/libc/rpc/rpc_prot.c
==
--- stable/10/lib/libc/rpc/rpc_prot.c   Sat Dec  3 18:08:49 2016
(r309492)
+++ stable/10/lib/libc/rpc/rpc_prot.c   Sat Dec  3 18:14:29 2016
(r309493)
@@ -125,9 +125,9 @@ xdr_accepted_reply(xdrs, ar)
return ((*(ar->ar_results.proc))(xdrs, ar->ar_results.where));
 
case PROG_MISMATCH:
-   if (! xdr_u_int32_t(xdrs, &(ar->ar_vers.low)))
+   if (!xdr_rpcvers(xdrs, &(ar->ar_vers.low)))
return (FALSE);
-   return (xdr_u_int32_t(xdrs, &(ar->ar_vers.high)));
+   return (xdr_rpcvers(xdrs, &(ar->ar_vers.high)));
 
case GARBAGE_ARGS:
case SYSTEM_ERR:
@@ -160,9 +160,9 @@ xdr_rejected_reply(xdrs, rr)
switch (rr->rj_stat) {
 
case RPC_MISMATCH:
-   if (! xdr_u_int32_t(xdrs, &(rr->rj_vers.low)))
+   if (! xdr_rpcvers(xdrs, &(rr->rj_vers.low)))
return (FALSE);
-   return (xdr_u_int32_t(xdrs, &(rr->rj_vers.high)));
+   return (xdr_rpcvers(xdrs, &(rr->rj_vers.high)));
 
case AUTH_ERROR:
prj_why = >rj_why;
@@ -229,8 +229,8 @@ xdr_callhdr(xdrs, cmsg)
(xdrs->x_op == XDR_ENCODE) &&
xdr_u_int32_t(xdrs, &(cmsg->rm_xid)) &&
xdr_enum(xdrs, (enum_t *) prm_direction) &&
-   xdr_u_int32_t(xdrs, &(cmsg->rm_call.cb_rpcvers)) &&
-   xdr_u_int32_t(xdrs, &(cmsg->rm_call.cb_prog)) )
+   xdr_rpcvers(xdrs, &(cmsg->rm_call.cb_rpcvers)) &&
+   xdr_rpcprog(xdrs, &(cmsg->rm_call.cb_prog)) )
return (xdr_u_int32_t(xdrs, &(cmsg->rm_call.cb_vers)));
return (FALSE);
 }

Modified: stable/10/lib/libc/rpc/rpcb_prot.c
==
--- stable/10/lib/libc/rpc/rpcb_prot.c  Sat Dec  3 18:08:49 2016
(r309492)
+++ stable/10/lib/libc/rpc/rpcb_prot.c  Sat Dec  3 18:14:29 2016
(r309493)
@@ -56,10 +56,10 @@ __FBSDID("$FreeBSD$");
 bool_t
 xdr_rpcb(XDR *xdrs, RPCB *objp)
 {
-   if (!xdr_u_int32_t(xdrs, >r_prog)) {
+   if (!xdr_rpcprog(xdrs, >r_prog)) {
return (FALSE);
}
-   if (!xdr_u_int32_t(xdrs, >r_vers)) {
+   if (!xdr_rpcvers(xdrs, >r_vers)) {
return (FALSE);
}
if (!xdr_string(xdrs, >r_netid, (u_int)~0)) {
@@ -243,13 +243,13 @@ xdr_rpcb_rmtcallargs(XDR *xdrs, struct r
 
buf = XDR_INLINE(xdrs, 3 * BYTES_PER_XDR_UNIT);
if (buf == NULL) {
-   if (!xdr_u_int32_t(xdrs, >prog)) {
+   if (!xdr_rpcprog(xdrs, >prog)) {
return (FALSE);
}
-   if (!xdr_u_int32_t(xdrs, >vers)) {
+   if (!xdr_rpcvers(xdrs, 

svn commit: r309492 - stable/10/lib/libc/rpc

2016-12-03 Thread Ngie Cooper
Author: ngie
Date: Sat Dec  3 18:08:49 2016
New Revision: 309492
URL: https://svnweb.freebsd.org/changeset/base/309492

Log:
  MFC r278041:
  r278041 (by pfg):
  
  rpc: Uninitialized pointer read
  
  Initialize *xprt to avoid exposing a random value
  in cleanup_svc_vc_create.
  
  CID:  1018723
  Phabric:  D1749

Modified:
  stable/10/lib/libc/rpc/svc_vc.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/rpc/svc_vc.c
==
--- stable/10/lib/libc/rpc/svc_vc.c Sat Dec  3 17:54:08 2016
(r309491)
+++ stable/10/lib/libc/rpc/svc_vc.c Sat Dec  3 18:08:49 2016
(r309492)
@@ -125,7 +125,7 @@ struct cf_conn {  /* kept in xprt->xp_p1
 SVCXPRT *
 svc_vc_create(int fd, u_int sendsize, u_int recvsize)
 {
-   SVCXPRT *xprt;
+   SVCXPRT *xprt = NULL;
struct cf_rendezvous *r = NULL;
struct __rpc_sockinfo si;
struct sockaddr_storage sslocal;
___
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: r309491 - in head/sys/modules: . bios

2016-12-03 Thread Ravi Pokala
Author: rpokala
Date: Sat Dec  3 17:54:08 2016
New Revision: 309491
URL: https://svnweb.freebsd.org/changeset/base/309491

Log:
  Build smbios.ko as a module for amd64 and i386
  
  For whatever reason, smapi, smbios, vpd are all under the "bios" directory.
  smapi is only for i386, so the entire "bios" directory is only built for
  i386. Break smapi out, and make only it i386-specific. Then, build the
  "bios" directory for both amd64 and i386.
  
  Reviewed by:  imp
  MFC after:1 week
  Sponsored by: Panasas
  Differential Revision:https://reviews.freebsd.org/D8609

Modified:
  head/sys/modules/Makefile
  head/sys/modules/bios/Makefile

Modified: head/sys/modules/Makefile
==
--- head/sys/modules/Makefile   Sat Dec  3 17:44:43 2016(r309490)
+++ head/sys/modules/Makefile   Sat Dec  3 17:54:08 2016(r309491)
@@ -550,6 +550,7 @@ _igb=   igb
 _agp=  agp
 _an=   an
 _aout= aout
+_bios= bios
 _bktr= bktr
 _bxe=  bxe
 _cardbus=  cardbus
@@ -730,7 +731,6 @@ _svr4=  svr4
 .if ${MK_EISA} != "no"
 _ahb=  ahb
 .endif
-_bios= bios
 _cm=   cm
 .if ${MK_SOURCELESS_UCODE} != "no"
 _ctau= ctau

Modified: head/sys/modules/bios/Makefile
==
--- head/sys/modules/bios/Makefile  Sat Dec  3 17:44:43 2016
(r309490)
+++ head/sys/modules/bios/Makefile  Sat Dec  3 17:54:08 2016
(r309491)
@@ -1,6 +1,10 @@
 # $FreeBSD$
 #
 
-SUBDIR=smapi smbios vpd
+SUBDIR=smbios vpd
+
+.if ${MACHINE_ARCH} == "i386"
+SUBDIR+=   smapi
+.endif
 
 .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: r309490 - head/cddl/contrib/opensolaris/tools/ctf/cvt

2016-12-03 Thread Pedro F. Giffuni
Author: pfg
Date: Sat Dec  3 17:44:43 2016
New Revision: 309490
URL: https://svnweb.freebsd.org/changeset/base/309490

Log:
  Revert r253678, r253661:
  Fix a segfault in ctfmerge(1) due to a bug in GCC.
  
  The change was correct and the bug real, but upstream didn't adopt it
  and we want to remain in sync. When/if upstream does something about it
  we can bring their version.
  
  The bug in question was fixed in GCC 4.9 which is now the default in
  FreeBSD's ports. Our native gcc-4.2, which is still in use in some Tier-2
  platforms also has a workaround so no end-user should be harmed by the
  revert.

Modified:
  head/cddl/contrib/opensolaris/tools/ctf/cvt/ctf.c
  head/cddl/contrib/opensolaris/tools/ctf/cvt/ctftools.h
  head/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
  head/cddl/contrib/opensolaris/tools/ctf/cvt/st_parse.c

Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/ctf.c
==
--- head/cddl/contrib/opensolaris/tools/ctf/cvt/ctf.c   Sat Dec  3 17:40:58 
2016(r309489)
+++ head/cddl/contrib/opensolaris/tools/ctf/cvt/ctf.c   Sat Dec  3 17:44:43 
2016(r309490)
@@ -52,8 +52,6 @@ static char *curfile;
 #defineCTF_BUF_CHUNK_SIZE  (64 * 1024)
 #defineRES_BUF_CHUNK_SIZE  (64 * 1024)
 
-static int ntypes = 0; /* The number of types. */
-
 struct ctf_buf {
strtab_t ctb_strtab;/* string table */
caddr_t ctb_base;   /* pointer to base of buffer */
@@ -1145,10 +1143,6 @@ resurrect_types(ctf_header_t *h, tdata_t
(*mpp)->ml_type = tdarr[ctm->ctm_type];
(*mpp)->ml_offset = ctm->ctm_offset;
(*mpp)->ml_size = 0;
-   if (ctm->ctm_type > ntypes) {
-   parseterminate("Invalid member 
type ctm_type=%d",
-   ctm->ctm_type);
-   }
}
} else {
for (i = 0, mpp = >t_members; i < vlen;
@@ -1165,10 +1159,6 @@ resurrect_types(ctf_header_t *h, tdata_t
(*mpp)->ml_offset =
(int)CTF_LMEM_OFFSET(ctlm);
(*mpp)->ml_size = 0;
-   if (ctlm->ctlm_type > ntypes) {
-   parseterminate("Invalid lmember 
type ctlm_type=%d",
-   ctlm->ctlm_type);
-   }
}
}
 
@@ -1282,10 +1272,9 @@ ctf_parse(ctf_header_t *h, caddr_t buf, 
 {
tdata_t *td = tdata_new();
tdesc_t **tdarr;
+   int ntypes = count_types(h, buf);
int idx, i;
 
-   ntypes = count_types(h, buf);
-
/* shudder */
tdarr = xcalloc(sizeof (tdesc_t *) * (ntypes + 1));
tdarr[0] = NULL;

Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/ctftools.h
==
--- head/cddl/contrib/opensolaris/tools/ctf/cvt/ctftools.h  Sat Dec  3 
17:40:58 2016(r309489)
+++ head/cddl/contrib/opensolaris/tools/ctf/cvt/ctftools.h  Sat Dec  3 
17:44:43 2016(r309490)
@@ -159,7 +159,7 @@ typedef struct ardef {
 /* Auxiliary structure for structure/union tdesc_t */
 typedef struct mlist {
int ml_offset;  /* Offset from start of structure (in bits) */
-   uint_t  ml_size;/* Member size (in bits) */
+   int ml_size;/* Member size (in bits) */
char*ml_name;   /* Member name */
struct  tdesc *ml_type; /* Member type */
struct  mlist *ml_next; /* Next member */

Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
==
--- head/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c Sat Dec  3 17:40:58 
2016(r309489)
+++ head/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c Sat Dec  3 17:44:43 
2016(r309490)
@@ -727,13 +727,6 @@ die_array_create(dwarf_t *dw, Dwarf_Die 
tdesc_t *dimtdp;
int flags;
 
-   /* Check for bogus gcc DW_AT_byte_size attribute */
-   if (uval == (unsigned)-1) {
-   printf("dwarf.c:%s() working around bogus -1 
DW_AT_byte_size\n",
-   __func__);
-   uval = 0;
-   }
-   
tdp->t_size = uval;
 
/*
@@ -826,12 +819,6 @@ die_enum_create(dwarf_t *dw, Dwarf_Die d
tdp->t_type = ENUM;
 
(void) die_unsigned(dw, die, DW_AT_byte_size, , DW_ATTR_REQ);
-   

svn commit: r309489 - stable/10/lib/libc/rpc

2016-12-03 Thread Ngie Cooper
Author: ngie
Date: Sat Dec  3 17:40:58 2016
New Revision: 309489
URL: https://svnweb.freebsd.org/changeset/base/309489

Log:
  MFC r287341,r287342,r287348:
  
  r287341 (by rodrigc):
  
  Use ANSI C prototypes.
  
  Eliminates gcc 4.9 warnings.
  
  r287342 (by rodrigc):
  
  Mark unused parameters to reduce gcc 4.9 warnings.
  
  r287348 (by rodrigc):
  
  Use correct function prototype for signal handler.
  
  Eliminates gcc 4.9 warning.

Modified:
  stable/10/lib/libc/rpc/auth_des.c
  stable/10/lib/libc/rpc/auth_time.c
  stable/10/lib/libc/rpc/clnt_dg.c
  stable/10/lib/libc/rpc/crypt_client.c
  stable/10/lib/libc/rpc/des_crypt.c
  stable/10/lib/libc/rpc/des_soft.c
  stable/10/lib/libc/rpc/getpublickey.c
  stable/10/lib/libc/rpc/key_call.c
  stable/10/lib/libc/rpc/rpc_soc.c
  stable/10/lib/libc/rpc/rpcb_clnt.c
  stable/10/lib/libc/rpc/rpcdname.c
  stable/10/lib/libc/rpc/rtime.c
  stable/10/lib/libc/rpc/svc_auth.c
  stable/10/lib/libc/rpc/svc_auth_des.c
  stable/10/lib/libc/rpc/svc_dg.c
  stable/10/lib/libc/rpc/svc_vc.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/rpc/auth_des.c
==
--- stable/10/lib/libc/rpc/auth_des.c   Sat Dec  3 17:40:26 2016
(r309488)
+++ stable/10/lib/libc/rpc/auth_des.c   Sat Dec  3 17:40:58 2016
(r309489)
@@ -259,7 +259,7 @@ failed:
  */
 /*ARGSUSED*/
 static void
-authdes_nextverf(AUTH *auth)
+authdes_nextverf(AUTH *auth __unused)
 {
/* what the heck am I supposed to do??? */
 }
@@ -420,7 +420,7 @@ authdes_validate(AUTH *auth, struct opaq
  */
 /*ARGSUSED*/
 static bool_t
-authdes_refresh(AUTH *auth, void *dummy)
+authdes_refresh(AUTH *auth, void *dummy __unused)
 {
 /* LINTED pointer alignment */
struct ad_private *ad = AUTH_PRIVATE(auth);

Modified: stable/10/lib/libc/rpc/auth_time.c
==
--- stable/10/lib/libc/rpc/auth_time.c  Sat Dec  3 17:40:26 2016
(r309488)
+++ stable/10/lib/libc/rpc/auth_time.c  Sat Dec  3 17:40:58 2016
(r309489)
@@ -61,8 +61,7 @@ extern int _rpc_dtablesize( void );
 static int saw_alarm = 0;
 
 static void
-alarm_hndler(s)
-   int s;
+alarm_hndler(int s)
 {
saw_alarm = 1;
return;
@@ -83,12 +82,7 @@ alarm_hndler(s)
  * Turn a 'universal address' into a struct sockaddr_in.
  * Bletch.
  */
-static int uaddr_to_sockaddr(uaddr, sin)
-#ifdef foo
-   endpoint*endpt;
-#endif
-   char*uaddr;
-   struct sockaddr_in  *sin;
+static int uaddr_to_sockaddr(char *uaddr, struct sockaddr_in *sin)
 {
unsigned char   p_bytes[2];
int i;
@@ -118,9 +112,7 @@ static int uaddr_to_sockaddr(uaddr, sin)
  * Free the strings that were strduped into the eps structure.
  */
 static void
-free_eps(eps, num)
-   endpointeps[];
-   int num;
+free_eps(endpoint eps[], int num)
 {
int i;
 
@@ -142,14 +134,15 @@ free_eps(eps, num)
  * fact that gethostbyname() could do an NIS search. Ideally, the
  * NIS+ server will call __rpc_get_time_offset() with the nis_server
  * structure already populated.
+ *
+ * host  - name of the time host
+ * srv   - nis_server struct to use.
+ * eps[] - array of endpoints
+ * maxep - max array size
  */
 static nis_server *
-get_server(sin, host, srv, eps, maxep)
-   struct sockaddr_in *sin;
-   char*host;  /* name of the time host*/
-   nis_server  *srv;   /* nis_server struct to use.*/
-   endpointeps[];  /* array of endpoints   */
-   int maxep;  /* max array size   */
+get_server(struct sockaddr_in *sin, char *host, nis_server *srv,
+endpoint eps[], int maxep)
 {
charhname[256];
int num_ep = 0, i;
@@ -236,14 +229,16 @@ get_server(sin, host, srv, eps, maxep)
  * structure and to then contact the machine for the time.
  *
  * td = "server" - "client"
+ *
+ * td- Time difference
+ * srv   - NIS Server description
+ * thost - if no server, this is the timehost
+ * uaddr - known universal address
+ * netid - known network identifier
  */
 int
-__rpc_get_time_offset(td, srv, thost, uaddr, netid)
-   struct timeval  *td; /* Time difference */
-   nis_server  *srv;/* NIS Server description  */
-   char*thost;  /* if no server, this is the timehost  */
-   char**uaddr; /* known universal address */
-   struct sockaddr_in *netid; /* known network identifier  */
+__rpc_get_time_offset(struct timeval *td, nis_server *srv, char *thost,
+char **uaddr, struct sockaddr_in *netid)
 {
CLIENT  *clnt;  /* Client handle*/
endpoint*ep,/* useful 

svn commit: r309488 - in stable/11/sys: dev/kbdmux modules/kbdmux

2016-12-03 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Sat Dec  3 17:40:26 2016
New Revision: 309488
URL: https://svnweb.freebsd.org/changeset/base/309488

Log:
  MFC r308668:
  
  [evdev] Add evdev support to kbdmux(4) driver
  
  To enable event sourcing from kbdmux(4) kern.evdev.rcpt_mask value
  should have bit 1 set (this is default)
  
  Submitted by: Vladimir Kondratiev 
  Differential Revision:https://reviews.freebsd.org/D8437

Modified:
  stable/11/sys/dev/kbdmux/kbdmux.c
  stable/11/sys/modules/kbdmux/Makefile
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/kbdmux/kbdmux.c
==
--- stable/11/sys/dev/kbdmux/kbdmux.c   Sat Dec  3 17:27:28 2016
(r309487)
+++ stable/11/sys/dev/kbdmux/kbdmux.c   Sat Dec  3 17:40:26 2016
(r309488)
@@ -32,6 +32,7 @@
  */
 
 #include "opt_compat.h"
+#include "opt_evdev.h"
 #include "opt_kbd.h"
 #include "opt_kbdmux.h"
 
@@ -64,6 +65,11 @@
 
 #include 
 
+#ifdef EVDEV_SUPPORT
+#include 
+#include 
+#endif
+
 #define KEYBOARD_NAME  "kbdmux"
 
 MALLOC_DECLARE(M_KBDMUX);
@@ -159,6 +165,11 @@ struct kbdmux_state
u_intks_composed_char; /* composed char code */
u_char   ks_prefix; /* AT scan code prefix */
 
+#ifdef EVDEV_SUPPORT
+   struct evdev_dev *   ks_evdev;
+   int  ks_evdev_state;
+#endif
+
SLIST_HEAD(, kbdmux_kbd) ks_kbds;   /* keyboards */
 
KBDMUX_LOCK_DECL_GLOBAL;
@@ -371,6 +382,12 @@ static keyboard_switch_t kbdmuxsw = {
.diag = genkbd_diag,
 };
 
+#ifdef EVDEV_SUPPORT
+static const struct evdev_methods kbdmux_evdev_methods = {
+   .ev_event = evdev_ev_kbd_event,
+};
+#endif
+
 /*
  * Return the number of found keyboards
  */
@@ -404,6 +421,10 @@ kbdmux_init(int unit, keyboard_t **kbdp,
 accentmap_t*accmap = NULL;
 fkeytab_t  *fkeymap = NULL;
int  error, needfree, fkeymap_size, delay[2];
+#ifdef EVDEV_SUPPORT
+   struct evdev_dev *evdev;
+   char phys_loc[NAMELEN];
+#endif
 
if (*kbdp == NULL) {
*kbdp = kbd = malloc(sizeof(*kbd), M_KBDMUX, M_NOWAIT | M_ZERO);
@@ -464,6 +485,30 @@ kbdmux_init(int unit, keyboard_t **kbdp,
delay[1] = kbd->kb_delay2;
kbdmux_ioctl(kbd, KDSETREPEAT, (caddr_t)delay);
 
+#ifdef EVDEV_SUPPORT
+   /* register as evdev provider */
+   evdev = evdev_alloc();
+   evdev_set_name(evdev, "System keyboard multiplexer");
+   snprintf(phys_loc, NAMELEN, KEYBOARD_NAME"%d", unit);
+   evdev_set_phys(evdev, phys_loc);
+   evdev_set_id(evdev, BUS_VIRTUAL, 0, 0, 0);
+   evdev_set_methods(evdev, kbd, _evdev_methods);
+   evdev_support_event(evdev, EV_SYN);
+   evdev_support_event(evdev, EV_KEY);
+   evdev_support_event(evdev, EV_LED);
+   evdev_support_event(evdev, EV_REP);
+   evdev_support_all_known_keys(evdev);
+   evdev_support_led(evdev, LED_NUML);
+   evdev_support_led(evdev, LED_CAPSL);
+   evdev_support_led(evdev, LED_SCROLLL);
+
+   if (evdev_register(evdev))
+   evdev_free(evdev);
+   else
+   state->ks_evdev = evdev;
+   state->ks_evdev_state = 0;
+#endif
+
KBD_INIT_DONE(kbd);
}
 
@@ -532,6 +577,10 @@ kbdmux_term(keyboard_t *kbd)
 
kbd_unregister(kbd);
 
+#ifdef EVDEV_SUPPORT
+   evdev_free(state->ks_evdev);
+#endif
+
KBDMUX_LOCK_DESTROY(state);
bzero(state, sizeof(*state));
free(state, M_KBDMUX);
@@ -694,6 +743,20 @@ next_code:
 
kbd->kb_count ++;
 
+#ifdef EVDEV_SUPPORT
+   /* push evdev event */
+   if (evdev_rcpt_mask & EVDEV_RCPT_KBDMUX && state->ks_evdev != NULL) {
+   uint16_t key = evdev_scancode2key(>ks_evdev_state,
+   scancode);
+
+   if (key != KEY_RESERVED) {
+   evdev_push_event(state->ks_evdev, EV_KEY,
+   key, scancode & 0x80 ? 0 : 1);
+   evdev_sync(state->ks_evdev);
+   }
+   }
+#endif
+
/* return the byte as is for the K_RAW mode */
if (state->ks_mode == K_RAW) {
KBDMUX_UNLOCK(state);
@@ -1120,7 +1183,11 @@ kbdmux_ioctl(keyboard_t *kbd, u_long cmd
}
 
KBD_LED_VAL(kbd) = *(int *)arg;
-
+#ifdef EVDEV_SUPPORT
+   if (state->ks_evdev != NULL &&
+   evdev_rcpt_mask & EVDEV_RCPT_KBDMUX)
+   evdev_push_leds(state->ks_evdev, *(int *)arg);
+#endif
/* KDSETLED on all slave keyboards */
SLIST_FOREACH(k, >ks_kbds, next)
(void)kbdd_ioctl(k->kbd, KDSETLED, arg);
@@ -1197,7 

svn commit: r309487 - stable/10/lib/libc/rpc

2016-12-03 Thread Ngie Cooper
Author: ngie
Date: Sat Dec  3 17:27:28 2016
New Revision: 309487
URL: https://svnweb.freebsd.org/changeset/base/309487

Log:
  MFC r288113:
  r288113 (by rodrigc):
  
  Use ANSI C prototypes.  Eliminates -Wold-style-definition warnings.

Modified:
  stable/10/lib/libc/rpc/auth_unix.c
  stable/10/lib/libc/rpc/authdes_prot.c
  stable/10/lib/libc/rpc/authunix_prot.c
  stable/10/lib/libc/rpc/bindresvport.c
  stable/10/lib/libc/rpc/clnt_bcast.c
  stable/10/lib/libc/rpc/clnt_perror.c
  stable/10/lib/libc/rpc/clnt_raw.c
  stable/10/lib/libc/rpc/clnt_simple.c
  stable/10/lib/libc/rpc/clnt_vc.c
  stable/10/lib/libc/rpc/des_crypt.c
  stable/10/lib/libc/rpc/getnetconfig.c
  stable/10/lib/libc/rpc/getnetpath.c
  stable/10/lib/libc/rpc/getrpcent.c
  stable/10/lib/libc/rpc/getrpcport.c
  stable/10/lib/libc/rpc/mt_misc.c
  stable/10/lib/libc/rpc/netname.c
  stable/10/lib/libc/rpc/netnamer.c
  stable/10/lib/libc/rpc/pmap_getmaps.c
  stable/10/lib/libc/rpc/pmap_getport.c
  stable/10/lib/libc/rpc/pmap_prot.c
  stable/10/lib/libc/rpc/pmap_prot2.c
  stable/10/lib/libc/rpc/pmap_rmt.c
  stable/10/lib/libc/rpc/rpc_callmsg.c
  stable/10/lib/libc/rpc/rpc_generic.c
  stable/10/lib/libc/rpc/rpc_prot.c
  stable/10/lib/libc/rpc/rpc_soc.c
  stable/10/lib/libc/rpc/rpcb_clnt.c
  stable/10/lib/libc/rpc/rpcb_prot.c
  stable/10/lib/libc/rpc/rpcb_st_xdr.c
  stable/10/lib/libc/rpc/svc_auth.c
  stable/10/lib/libc/rpc/svc_auth_unix.c
  stable/10/lib/libc/rpc/svc_generic.c
  stable/10/lib/libc/rpc/svc_raw.c
  stable/10/lib/libc/rpc/svc_run.c
  stable/10/lib/libc/rpc/svc_simple.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/rpc/auth_unix.c
==
--- stable/10/lib/libc/rpc/auth_unix.c  Sat Dec  3 17:27:10 2016
(r309486)
+++ stable/10/lib/libc/rpc/auth_unix.c  Sat Dec  3 17:27:28 2016
(r309487)
@@ -91,12 +91,7 @@ struct audata {
  * Returns an auth handle with the given stuff in it.
  */
 AUTH *
-authunix_create(machname, uid, gid, len, aup_gids)
-   char *machname;
-   u_int uid;
-   u_int gid;
-   int len;
-   u_int *aup_gids;
+authunix_create(char *machname, u_int uid, u_int gid, int len, u_int *aup_gids)
 {
struct authunix_parms aup;
char mymem[MAX_AUTH_BYTES];
@@ -182,7 +177,7 @@ authunix_create(machname, uid, gid, len,
  * syscalls.
  */
 AUTH *
-authunix_create_default()
+authunix_create_default(void)
 {
AUTH *auth;
int ngids;
@@ -218,16 +213,13 @@ authunix_create_default()
 
 /* ARGSUSED */
 static void
-authunix_nextverf(auth)
-   AUTH *auth;
+authunix_nextverf(AUTH *auth)
 {
/* no action necessary */
 }
 
 static bool_t
-authunix_marshal(auth, xdrs)
-   AUTH *auth;
-   XDR *xdrs;
+authunix_marshal(AUTH *auth, XDR *xdrs)
 {
struct audata *au;
 
@@ -239,9 +231,7 @@ authunix_marshal(auth, xdrs)
 }
 
 static bool_t
-authunix_validate(auth, verf)
-   AUTH *auth;
-   struct opaque_auth *verf;
+authunix_validate(AUTH *auth, struct opaque_auth *verf)
 {
struct audata *au;
XDR xdrs;
@@ -317,8 +307,7 @@ done:
 }
 
 static void
-authunix_destroy(auth)
-   AUTH *auth;
+authunix_destroy(AUTH *auth)
 {
struct audata *au;
 
@@ -343,8 +332,7 @@ authunix_destroy(auth)
  * sets private data, au_marshed and au_mpos
  */
 static void
-marshal_new_auth(auth)
-   AUTH *auth;
+marshal_new_auth(AUTH *auth)
 {
XDR xdr_stream;
XDR *xdrs = _stream;
@@ -363,7 +351,7 @@ marshal_new_auth(auth)
 }
 
 static struct auth_ops *
-authunix_ops()
+authunix_ops(void)
 {
static struct auth_ops ops;
 

Modified: stable/10/lib/libc/rpc/authdes_prot.c
==
--- stable/10/lib/libc/rpc/authdes_prot.c   Sat Dec  3 17:27:10 2016
(r309486)
+++ stable/10/lib/libc/rpc/authdes_prot.c   Sat Dec  3 17:27:28 2016
(r309487)
@@ -49,9 +49,7 @@ __FBSDID("$FreeBSD$");
 #define ATTEMPT(xdr_op) if (!(xdr_op)) return (FALSE)
 
 bool_t
-xdr_authdes_cred(xdrs, cred)
-   XDR *xdrs;
-   struct authdes_cred *cred;
+xdr_authdes_cred(XDR *xdrs, struct authdes_cred *cred)
 {
enum authdes_namekind *padc_namekind = >adc_namekind;
/*
@@ -78,9 +76,7 @@ xdr_authdes_cred(xdrs, cred)
 
 
 bool_t
-xdr_authdes_verf(xdrs, verf)
-   XDR *xdrs;
-   struct authdes_verf *verf;  
+xdr_authdes_verf(XDR *xdrs, struct authdes_verf *verf)
 {
/*
 * Unrolled xdr

Modified: stable/10/lib/libc/rpc/authunix_prot.c
==
--- stable/10/lib/libc/rpc/authunix_prot.c  Sat Dec  3 17:27:10 2016
(r309486)
+++ stable/10/lib/libc/rpc/authunix_prot.c  Sat Dec  3 17:27:28 2016
(r309487)
@@ -55,9 +55,7 @@ __FBSDID("$FreeBSD$");
  * XDR for unix authentication parameters.
  */
 bool_t
-xdr_authunix_parms(xdrs, p)
-   XDR 

svn commit: r309486 - head/sys/dev/rtwn

2016-12-03 Thread Andriy Voskoboinyk
Author: avos
Date: Sat Dec  3 17:27:10 2016
New Revision: 309486
URL: https://svnweb.freebsd.org/changeset/base/309486

Log:
  rtwn: fix bitmap size calculation.
  
  Tested with RTL8188CE, STA mode.

Modified:
  head/sys/dev/rtwn/if_rtwnvar.h

Modified: head/sys/dev/rtwn/if_rtwnvar.h
==
--- head/sys/dev/rtwn/if_rtwnvar.h  Sat Dec  3 17:17:42 2016
(r309485)
+++ head/sys/dev/rtwn/if_rtwnvar.h  Sat Dec  3 17:27:10 2016
(r309486)
@@ -207,8 +207,8 @@ struct rtwn_softc {
int vaps_running;
int monvaps_running;
 
-   uint16_tnext_rom_addr;
-   uint8_t keys_bmap[roundup2(RTWN_CAM_ENTRY_LIMIT, NBBY)];
+   uint16_tnext_rom_addr;
+   uint8_t keys_bmap[howmany(RTWN_CAM_ENTRY_LIMIT, NBBY)];
 
struct rtwn_vap *vaps[RTWN_PORT_COUNT];
struct ieee80211_node   *node_list[RTWN_MACID_LIMIT];
___
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: r309485 - in stable/10/lib/libc: db/hash gen locale net posix1e resolv rpc softfloat uuid xdr

2016-12-03 Thread Ngie Cooper
Author: ngie
Date: Sat Dec  3 17:17:42 2016
New Revision: 309485
URL: https://svnweb.freebsd.org/changeset/base/309485

Log:
  MFC r297790:
  r297790 (by pfg):
  
  libc: replace 0 with NULL for pointers.
  
  While here also cleanup some surrounding code; particularly
  drop some malloc() casts.
  
  Found with devel/coccinelle.

Modified:
  stable/10/lib/libc/db/hash/hash.c
  stable/10/lib/libc/db/hash/hash_buf.c
  stable/10/lib/libc/gen/err.c
  stable/10/lib/libc/gen/getmntinfo.c
  stable/10/lib/libc/gen/opendir.c
  stable/10/lib/libc/gen/tls.c
  stable/10/lib/libc/locale/xlocale_private.h
  stable/10/lib/libc/net/base64.c
  stable/10/lib/libc/net/getifaddrs.c
  stable/10/lib/libc/net/getservent.c
  stable/10/lib/libc/net/rcmd.c
  stable/10/lib/libc/posix1e/acl_support_nfs4.c
  stable/10/lib/libc/resolv/mtctxres.c
  stable/10/lib/libc/resolv/res_init.c
  stable/10/lib/libc/resolv/res_mkupdate.c
  stable/10/lib/libc/rpc/auth_none.c
  stable/10/lib/libc/rpc/clnt_perror.c
  stable/10/lib/libc/rpc/mt_misc.c
  stable/10/lib/libc/rpc/rpcdname.c
  stable/10/lib/libc/softfloat/timesoftfloat.c
  stable/10/lib/libc/uuid/uuid_to_string.c
  stable/10/lib/libc/xdr/xdr_mem.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/db/hash/hash.c
==
--- stable/10/lib/libc/db/hash/hash.c   Sat Dec  3 17:10:37 2016
(r309484)
+++ stable/10/lib/libc/db/hash/hash.c   Sat Dec  3 17:17:42 2016
(r309485)
@@ -771,7 +771,7 @@ next_bucket:
if (__big_keydata(hashp, bufp, key, data, 1))
return (ERROR);
} else {
-   if (hashp->cpage == 0)
+   if (hashp->cpage == NULL)
return (ERROR);
key->data = (u_char *)hashp->cpage->page + bp[ndx];
key->size = (ndx > 1 ? bp[ndx - 1] : hashp->BSIZE) - bp[ndx];

Modified: stable/10/lib/libc/db/hash/hash_buf.c
==
--- stable/10/lib/libc/db/hash/hash_buf.c   Sat Dec  3 17:10:37 2016
(r309484)
+++ stable/10/lib/libc/db/hash/hash_buf.c   Sat Dec  3 17:17:42 2016
(r309485)
@@ -245,7 +245,7 @@ newbuf(HTAB *hashp, u_int32_t addr, BUFH
 */
for (xbp = bp; xbp->ovfl;) {
next_xbp = xbp->ovfl;
-   xbp->ovfl = 0;
+   xbp->ovfl = NULL;
xbp = next_xbp;
 
/* Check that ovfl pointer is up date. */
@@ -350,7 +350,7 @@ __buf_free(HTAB *hashp, int do_free, int
 void
 __reclaim_buf(HTAB *hashp, BUFHEAD *bp)
 {
-   bp->ovfl = 0;
+   bp->ovfl = NULL;
bp->addr = 0;
bp->flags = 0;
BUF_REMOVE(bp);

Modified: stable/10/lib/libc/gen/err.c
==
--- stable/10/lib/libc/gen/err.cSat Dec  3 17:10:37 2016
(r309484)
+++ stable/10/lib/libc/gen/err.cSat Dec  3 17:17:42 2016
(r309485)
@@ -99,7 +99,7 @@ errc(int eval, int code, const char *fmt
 void
 verrc(int eval, int code, const char *fmt, va_list ap)
 {
-   if (err_file == 0)
+   if (err_file == NULL)
err_set_file((FILE *)0);
fprintf(err_file, "%s: ", _getprogname());
if (fmt != NULL) {
@@ -124,7 +124,7 @@ errx(int eval, const char *fmt, ...)
 void
 verrx(int eval, const char *fmt, va_list ap)
 {
-   if (err_file == 0)
+   if (err_file == NULL)
err_set_file((FILE *)0);
fprintf(err_file, "%s: ", _getprogname());
if (fmt != NULL)
@@ -164,7 +164,7 @@ warnc(int code, const char *fmt, ...)
 void
 vwarnc(int code, const char *fmt, va_list ap)
 {
-   if (err_file == 0)
+   if (err_file == NULL)
err_set_file((FILE *)0);
fprintf(err_file, "%s: ", _getprogname());
if (fmt != NULL) {
@@ -186,7 +186,7 @@ warnx(const char *fmt, ...)
 void
 vwarnx(const char *fmt, va_list ap)
 {
-   if (err_file == 0)
+   if (err_file == NULL)
err_set_file((FILE *)0);
fprintf(err_file, "%s: ", _getprogname());
if (fmt != NULL)

Modified: stable/10/lib/libc/gen/getmntinfo.c
==
--- stable/10/lib/libc/gen/getmntinfo.c Sat Dec  3 17:10:37 2016
(r309484)
+++ stable/10/lib/libc/gen/getmntinfo.c Sat Dec  3 17:17:42 2016
(r309485)
@@ -58,7 +58,7 @@ getmntinfo(mntbufp, flags)
if (mntbuf)
free(mntbuf);
bufsize = (mntsize + 1) * sizeof(struct statfs);
-   if ((mntbuf = (struct statfs *)malloc(bufsize)) == 0)
+   if ((mntbuf = malloc(bufsize)) == NULL)
return (0);
if ((mntsize = 

svn commit: r309484 - stable/10/lib/libc/rpc

2016-12-03 Thread Ngie Cooper
Author: ngie
Date: Sat Dec  3 17:10:37 2016
New Revision: 309484
URL: https://svnweb.freebsd.org/changeset/base/309484

Log:
  MFC r287350:
  r287350 (by rodrigc):
  
  Use ANSI C prototypes.
  
  Eliminates gcc 4.9 warnings.

Modified:
  stable/10/lib/libc/rpc/auth_des.c
  stable/10/lib/libc/rpc/auth_none.c
  stable/10/lib/libc/rpc/rpcb_clnt.c
  stable/10/lib/libc/rpc/rpcdname.c
  stable/10/lib/libc/rpc/svc_auth_des.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/rpc/auth_des.c
==
--- stable/10/lib/libc/rpc/auth_des.c   Sat Dec  3 17:10:04 2016
(r309483)
+++ stable/10/lib/libc/rpc/auth_des.c   Sat Dec  3 17:10:37 2016
(r309484)
@@ -69,7 +69,7 @@ __FBSDID("$FreeBSD$");
 
 extern bool_t xdr_authdes_cred( XDR *, struct authdes_cred *);
 extern bool_t xdr_authdes_verf( XDR *, struct authdes_verf *);
-extern int key_encryptsession_pk();
+extern int key_encryptsession_pk(char *, netobj *, des_block *);
 
 extern bool_t __rpc_get_time_offset(struct timeval *, nis_server *, char *,
char **, char **);

Modified: stable/10/lib/libc/rpc/auth_none.c
==
--- stable/10/lib/libc/rpc/auth_none.c  Sat Dec  3 17:10:04 2016
(r309483)
+++ stable/10/lib/libc/rpc/auth_none.c  Sat Dec  3 17:10:37 2016
(r309484)
@@ -65,9 +65,9 @@ static bool_t authnone_validate (AUTH *,
 static bool_t authnone_refresh (AUTH *, void *);
 static void authnone_destroy (AUTH *);
 
-extern bool_t xdr_opaque_auth();
+extern bool_t xdr_opaque_auth(XDR *, struct opaque_auth *);
 
-static struct auth_ops *authnone_ops();
+static struct auth_ops *authnone_ops(void);
 
 static struct authnone_private {
AUTHno_client;
@@ -76,7 +76,7 @@ static struct authnone_private {
 } *authnone_private;
 
 AUTH *
-authnone_create()
+authnone_create(void)
 {
struct authnone_private *ap = authnone_private;
XDR xdr_stream;
@@ -156,7 +156,7 @@ authnone_destroy(AUTH *client)
 }
 
 static struct auth_ops *
-authnone_ops()
+authnone_ops(void)
 {
static struct auth_ops ops;
  

Modified: stable/10/lib/libc/rpc/rpcb_clnt.c
==
--- stable/10/lib/libc/rpc/rpcb_clnt.c  Sat Dec  3 17:10:04 2016
(r309483)
+++ stable/10/lib/libc/rpc/rpcb_clnt.c  Sat Dec  3 17:10:37 2016
(r309484)
@@ -661,7 +661,7 @@ got_entry(relp, nconf)
  * local transport.
  */
 static bool_t
-__rpcbind_is_up()
+__rpcbind_is_up(void)
 {
struct netconfig *nconf;
struct sockaddr_un sun;

Modified: stable/10/lib/libc/rpc/rpcdname.c
==
--- stable/10/lib/libc/rpc/rpcdname.c   Sat Dec  3 17:10:04 2016
(r309483)
+++ stable/10/lib/libc/rpc/rpcdname.c   Sat Dec  3 17:10:37 2016
(r309484)
@@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$");
 static char *default_domain = 0;
 
 static char *
-get_default_domain()
+get_default_domain(void)
 {
char temp[256];
 

Modified: stable/10/lib/libc/rpc/svc_auth_des.c
==
--- stable/10/lib/libc/rpc/svc_auth_des.c   Sat Dec  3 17:10:04 2016
(r309483)
+++ stable/10/lib/libc/rpc/svc_auth_des.c   Sat Dec  3 17:10:37 2016
(r309484)
@@ -90,11 +90,11 @@ struct cache_entry {
 static struct cache_entry *authdes_cache/* [AUTHDES_CACHESZ] */;
 static short *authdes_lru/* [AUTHDES_CACHESZ] */;
 
-static void cache_init();  /* initialize the cache */
-static short cache_spot(); /* find an entry in the cache */
+static void cache_init(void);  /* initialize the cache */
+static short cache_spot(des_block *, char *, struct timeval *); /* find an 
entry in the cache */
 static void cache_ref(/*short sid*/);  /* note that sid was ref'd */
 
-static void invalidate();  /* invalidate entry in cache */
+static void invalidate(char *);/* invalidate entry in cache */
 
 /*
  * cache statistics 
@@ -355,7 +355,7 @@ _svcauth_des(rqst, msg)
  * Initialize the cache
  */
 static void
-cache_init()
+cache_init(void)
 {
int i;
 
@@ -378,7 +378,7 @@ cache_init()
  * Find the lru victim
  */
 static short
-cache_victim()
+cache_victim(void)
 {
return (authdes_lru[AUTHDES_CACHESZ-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: r309483 - stable/11/sys/x86/x86

2016-12-03 Thread Konstantin Belousov
Author: kib
Date: Sat Dec  3 17:10:04 2016
New Revision: 309483
URL: https://svnweb.freebsd.org/changeset/base/309483

Log:
  MFC r309189:
  Fix automatic eventtimer hardware selection when ARAT is not implemented,
  and do not ignore TSCDLT.

Modified:
  stable/11/sys/x86/x86/local_apic.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/x86/x86/local_apic.c
==
--- stable/11/sys/x86/x86/local_apic.c  Sat Dec  3 16:52:40 2016
(r309482)
+++ stable/11/sys/x86/x86/local_apic.c  Sat Dec  3 17:10:04 2016
(r309483)
@@ -478,8 +478,9 @@ native_lapic_init(vm_paddr_t addr)
lapic_et.et_quality = 600;
if (!arat) {
lapic_et.et_flags |= ET_FLAGS_C3STOP;
-   lapic_et.et_quality -= 200;
-   } else if ((cpu_feature & CPUID_TSC) != 0 &&
+   lapic_et.et_quality = 100;
+   }
+   if ((cpu_feature & CPUID_TSC) != 0 &&
(cpu_feature2 & CPUID2_TSCDLT) != 0 &&
tsc_is_invariant && tsc_freq != 0) {
lapic_timer_tsc_deadline = 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: r309454 - stable/10/lib/libc/tests

2016-12-03 Thread Ngie Cooper (yaneurabeya)

> On Dec 2, 2016, at 19:37, Ngie Cooper (yaneurabeya)  
> wrote:

…

>   I’m aware of the fact that this causes a build failure (I missed the 
> fact that it added the directory instead of shifting it from the existing 
> TESTS_SUBDIRS definition). I’ll either revert this commit or bring in the 
> missing MFC (r299704).
> Thanks,

Fixed in 309482.
Thanks,
-Ngie



signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r309482 - in stable/10: etc/mtree lib/libc/iconv lib/libc/tests lib/libc/tests/iconv

2016-12-03 Thread Ngie Cooper
Author: ngie
Date: Sat Dec  3 16:52:40 2016
New Revision: 309482
URL: https://svnweb.freebsd.org/changeset/base/309482

Log:
  MFC r299704:
  r299704 (by vangyzen):
  
  iconvctl(3): remove superfluous NULL pointer tests
  
  convname and dst are guaranteed to be non-NULL by iconv_open(3).
  src is an array. Remove these tests for NULL pointers.
  While I'm here, eliminate a strlcpy with a correct but suspicious-looking
  calculation for the third parameter (i.e. not a simple sizeof).
  Compare the strings in-place instead of copying.
  
  Found by: bdrewery
  Found by: Coverity
  CID:  1130050, 1130056

Added:
  stable/10/lib/libc/tests/iconv/
 - copied from r299704, head/lib/libc/tests/iconv/
Modified:
  stable/10/etc/mtree/BSD.tests.dist
  stable/10/lib/libc/iconv/bsd_iconv.c
  stable/10/lib/libc/tests/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/etc/mtree/BSD.tests.dist
==
--- stable/10/etc/mtree/BSD.tests.dist  Sat Dec  3 16:02:53 2016
(r309481)
+++ stable/10/etc/mtree/BSD.tests.dist  Sat Dec  3 16:52:40 2016
(r309482)
@@ -99,6 +99,8 @@
 data
 ..
 ..
+iconv
+..
 inet
 ..
 locale

Modified: stable/10/lib/libc/iconv/bsd_iconv.c
==
--- stable/10/lib/libc/iconv/bsd_iconv.cSat Dec  3 16:02:53 2016
(r309481)
+++ stable/10/lib/libc/iconv/bsd_iconv.cSat Dec  3 16:52:40 2016
(r309482)
@@ -259,8 +259,9 @@ __bsd_iconvctl(iconv_t cd, int request, 
struct _citrus_iconv *cv;
struct iconv_hooks *hooks;
const char *convname;
-   char src[PATH_MAX], *dst;
+   char *dst;
int *i;
+   size_t srclen;
 
cv = (struct _citrus_iconv *)(void *)cd;
hooks = (struct iconv_hooks *)argument;
@@ -275,12 +276,9 @@ __bsd_iconvctl(iconv_t cd, int request, 
case ICONV_TRIVIALP:
convname = cv->cv_shared->ci_convname;
dst = strchr(convname, '/');
-
-   strlcpy(src, convname, dst - convname + 1);
+   srclen = dst - convname;
dst++;
-   if ((convname == NULL) || (src == NULL) || (dst == NULL))
-   return (-1);
-   *i = strcmp(src, dst) == 0 ? 1 : 0;
+   *i = (srclen == strlen(dst)) && !memcmp(convname, dst, srclen);
return (0);
case ICONV_GET_TRANSLITERATE:
*i = 1;

Modified: stable/10/lib/libc/tests/Makefile
==
--- stable/10/lib/libc/tests/Makefile   Sat Dec  3 16:02:53 2016
(r309481)
+++ stable/10/lib/libc/tests/Makefile   Sat Dec  3 16:52:40 2016
(r309482)
@@ -10,6 +10,7 @@ TESTS_SUBDIRS=c063
 TESTS_SUBDIRS+=db
 TESTS_SUBDIRS+=gen
 TESTS_SUBDIRS+=hash
+TESTS_SUBDIRS+=iconv
 TESTS_SUBDIRS+=inet
 TESTS_SUBDIRS+=net
 TESTS_SUBDIRS+=nss
___
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: r309481 - head/sys/dev/usb/wlan

2016-12-03 Thread Andriy Voskoboinyk
Author: avos
Date: Sat Dec  3 16:02:53 2016
New Revision: 309481
URL: https://svnweb.freebsd.org/changeset/base/309481

Log:
  rsu: fix frame processing in the Rx path (similar to r292207).
  
  - Fill in Rx radiotap header correctly (for every packet in a chain;
  not once per chain).
  - Fix rate / flags fields in Rx radiotap.
  - Add debug messages for discarded frames.
  - Pass received control (< sizeof(struct ieee80211_frame)) frames
  to net80211 (if allowed by device filter; cannot happen yet).
  
  Tested with Asus USB-N10.
  
  Differential Revision:https://reviews.freebsd.org/D5723

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

Modified: head/sys/dev/usb/wlan/if_rsu.c
==
--- head/sys/dev/usb/wlan/if_rsu.c  Sat Dec  3 14:41:53 2016
(r309480)
+++ head/sys/dev/usb/wlan/if_rsu.c  Sat Dec  3 16:02:53 2016
(r309481)
@@ -219,7 +219,10 @@ static voidrsu_rx_multi_event(struct rs
 #if 0
 static int8_t  rsu_get_rssi(struct rsu_softc *, int, void *);
 #endif
-static struct mbuf * rsu_rx_frame(struct rsu_softc *, uint8_t *, int);
+static struct mbuf * rsu_rx_copy_to_mbuf(struct rsu_softc *,
+   struct r92s_rx_stat *, int);
+static struct ieee80211_node * rsu_rx_frame(struct rsu_softc *, struct mbuf *,
+   int8_t *);
 static struct mbuf * rsu_rx_multi_frame(struct rsu_softc *, uint8_t *, int);
 static struct mbuf *
rsu_rxeof(struct usb_xfer *, struct rsu_data *);
@@ -1827,64 +1830,76 @@ rsu_get_rssi(struct rsu_softc *sc, int r
 #endif
 
 static struct mbuf *
-rsu_rx_frame(struct rsu_softc *sc, uint8_t *buf, int pktlen)
+rsu_rx_copy_to_mbuf(struct rsu_softc *sc, struct r92s_rx_stat *stat,
+int totlen)
 {
struct ieee80211com *ic = >sc_ic;
-   struct ieee80211_frame *wh;
+   struct mbuf *m;
+   uint32_t rxdw0;
+   int pktlen;
+
+   rxdw0 = le32toh(stat->rxdw0);
+   if (__predict_false(rxdw0 & R92S_RXDW0_CRCERR)) {
+   RSU_DPRINTF(sc, RSU_DEBUG_RX,
+   "%s: RX flags error (CRC)\n", __func__);
+   goto fail;
+   }
+
+   pktlen = MS(rxdw0, R92S_RXDW0_PKTLEN);
+   if (__predict_false(pktlen < sizeof (struct ieee80211_frame_ack))) {
+   RSU_DPRINTF(sc, RSU_DEBUG_RX,
+   "%s: frame is too short: %d\n", __func__, pktlen);
+   goto fail;
+   }
+
+   m = m_get2(totlen, M_NOWAIT, MT_DATA, M_PKTHDR);
+   if (__predict_false(m == NULL)) {
+   device_printf(sc->sc_dev, "%s: could not allocate RX mbuf\n",
+   __func__);
+   goto fail;
+   }
+
+   /* Finalize mbuf. */
+   memcpy(mtod(m, uint8_t *), (uint8_t *)stat, totlen);
+   m->m_pkthdr.len = m->m_len = totlen;
+ 
+   return (m);
+fail:
+   counter_u64_add(ic->ic_ierrors, 1);
+   return (NULL);
+}
+
+static struct ieee80211_node *
+rsu_rx_frame(struct rsu_softc *sc, struct mbuf *m, int8_t *rssi_p)
+{
+   struct ieee80211com *ic = >sc_ic;
+   struct ieee80211_frame_min *wh;
struct r92s_rx_stat *stat;
uint32_t rxdw0, rxdw3;
-   struct mbuf *m;
uint8_t rate;
int infosz;
 
-   stat = (struct r92s_rx_stat *)buf;
+   stat = mtod(m, struct r92s_rx_stat *);
rxdw0 = le32toh(stat->rxdw0);
rxdw3 = le32toh(stat->rxdw3);
 
-   if (__predict_false(rxdw0 & R92S_RXDW0_CRCERR)) {
-   counter_u64_add(ic->ic_ierrors, 1);
-   return NULL;
-   }
-   if (__predict_false(pktlen < sizeof(*wh) || pktlen > MCLBYTES)) {
-   counter_u64_add(ic->ic_ierrors, 1);
-   return NULL;
-   }
-
rate = MS(rxdw3, R92S_RXDW3_RATE);
infosz = MS(rxdw0, R92S_RXDW0_INFOSZ) * 8;
 
 #if 0
/* Get RSSI from PHY status descriptor if present. */
if (infosz != 0)
-   *rssi = rsu_get_rssi(sc, rate, [1]);
+   *rssi_p = rsu_get_rssi(sc, rate, [1]);
else
-   *rssi = 0;
 #endif
-
-   RSU_DPRINTF(sc, RSU_DEBUG_RX,
-   "%s: Rx frame len=%d rate=%d infosz=%d\n",
-   __func__, pktlen, rate, infosz);
-
-   m = m_get2(pktlen, M_NOWAIT, MT_DATA, M_PKTHDR);
-   if (__predict_false(m == NULL)) {
-   counter_u64_add(ic->ic_ierrors, 1);
-   return NULL;
-   }
-   /* Hardware does Rx TCP checksum offload. */
-   if (rxdw3 & R92S_RXDW3_TCPCHKVALID) {
-   if (__predict_true(rxdw3 & R92S_RXDW3_TCPCHKRPT))
-   m->m_pkthdr.csum_flags |= CSUM_DATA_VALID;
-   }
-   wh = (struct ieee80211_frame *)((uint8_t *)[1] + infosz);
-   memcpy(mtod(m, uint8_t *), wh, pktlen);
-   m->m_pkthdr.len = m->m_len = pktlen;
+   *rssi_p = 0;
 
if (ieee80211_radiotap_active(ic)) {
struct rsu_rx_radiotap_header *tap = >sc_rxtap;
 
/* Map HW 

svn commit: r309480 - head/sys/dev/rtwn/rtl8192c/usb

2016-12-03 Thread Kevin Lo
Author: kevlo
Date: Sat Dec  3 14:41:53 2016
New Revision: 309480
URL: https://svnweb.freebsd.org/changeset/base/309480

Log:
  Fix logic error so the R92C_TDECTRL register value is updated correctly.
  
  Reviewed by:  avos

Modified:
  head/sys/dev/rtwn/rtl8192c/usb/r92cu_init.c

Modified: head/sys/dev/rtwn/rtl8192c/usb/r92cu_init.c
==
--- head/sys/dev/rtwn/rtl8192c/usb/r92cu_init.c Sat Dec  3 14:26:58 2016
(r309479)
+++ head/sys/dev/rtwn/rtl8192c/usb/r92cu_init.c Sat Dec  3 14:41:53 2016
(r309480)
@@ -333,9 +333,11 @@ void
 r92cu_init_tx_agg(struct rtwn_softc *sc)
 {
struct rtwn_usb_softc *uc = RTWN_USB_SOFTC(sc);
+   uint32_t reg;
 
-   rtwn_setbits_4(sc, R92C_TDECTRL,
-   R92C_TDECTRL_BLK_DESC_NUM_M, uc->tx_agg_desc_num);
+   reg = rtwn_read_4(sc, R92C_TDECTRL);
+   reg = RW(reg, R92C_TDECTRL_BLK_DESC_NUM, uc->tx_agg_desc_num);
+   rtwn_write_4(sc, R92C_TDECTRL, reg);
 }
 
 void
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


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

2016-12-03 Thread Andriy Voskoboinyk
Author: avos
Date: Sat Dec  3 14:26:58 2016
New Revision: 309479
URL: https://svnweb.freebsd.org/changeset/base/309479

Log:
  rsu: remove unused structures / variables.

Modified:
  head/sys/dev/usb/wlan/if_rsu.c
  head/sys/dev/usb/wlan/if_rsureg.h

Modified: head/sys/dev/usb/wlan/if_rsu.c
==
--- head/sys/dev/usb/wlan/if_rsu.c  Sat Dec  3 05:29:35 2016
(r309478)
+++ head/sys/dev/usb/wlan/if_rsu.c  Sat Dec  3 14:26:58 2016
(r309479)
@@ -2937,9 +2937,6 @@ rsu_init(struct rsu_softc *sc)
/* Ensure the mbuf queue is drained */
rsu_drain_mbufq(sc);
 
-   /* Init host async commands ring. */
-   sc->cmdq.cur = sc->cmdq.next = sc->cmdq.queued = 0;
-
/* Reset power management state. */
rsu_write_1(sc, R92S_USB_HRPWM, 0);
 

Modified: head/sys/dev/usb/wlan/if_rsureg.h
==
--- head/sys/dev/usb/wlan/if_rsureg.h   Sat Dec  3 05:29:35 2016
(r309478)
+++ head/sys/dev/usb/wlan/if_rsureg.h   Sat Dec  3 14:26:58 2016
(r309479)
@@ -625,8 +625,6 @@ struct r92s_add_ba_req {
 #define RSU_RX_LIST_COUNT  100
 #define RSU_TX_LIST_COUNT  32
 
-#define RSU_HOST_CMD_RING_COUNT32
-
 #define RSU_RXBUFSZ(8 * 1024)
 #define RSU_TXBUFSZ\
((sizeof(struct r92s_tx_desc) + IEEE80211_MAX_LEN + 3) & ~3)
@@ -700,27 +698,6 @@ struct rsu_tx_radiotap_header {
 
 struct rsu_softc;
 
-struct rsu_host_cmd {
-   void(*cb)(struct rsu_softc *, void *);
-   uint8_t data[256];
-};
-
-struct rsu_cmd_newstate {
-   enum ieee80211_statestate;
-   int arg;
-};
-
-struct rsu_cmd_key {
-   struct ieee80211_keykey;
-};
-
-struct rsu_host_cmd_ring {
-   struct rsu_host_cmd cmd[RSU_HOST_CMD_RING_COUNT];
-   int cur;
-   int next;
-   int queued;
-};
-
 enum {
RSU_BULK_RX,
RSU_BULK_TX_BE_BK,  /* = WME_AC_BE/BK */
@@ -755,12 +732,9 @@ struct rsu_softc {
struct mbufqsc_snd;
device_tsc_dev;
struct usb_device   *sc_udev;
-   int (*sc_newstate)(struct ieee80211com *,
-   enum ieee80211_state, int);
-   struct usbd_interface   *sc_iface;
+
struct timeout_task calib_task;
struct task tx_task;
-   const uint8_t   *qid2idx;
struct mtx  sc_mtx;
int sc_ht;
int sc_nendpoints;
@@ -775,10 +749,8 @@ struct rsu_softc {
uint8_t sc_rftype;
int8_t  sc_nrxstream;
int8_t  sc_ntxstream;
-   struct rsu_host_cmd_ringcmdq;
struct rsu_data sc_rx[RSU_RX_LIST_COUNT];
struct rsu_data sc_tx[RSU_TX_LIST_COUNT];
-   struct rsu_data *fwcmd_data;
uint8_t cmd_seq;
uint8_t rom[128];
struct usb_xfer *sc_xfer[RSU_N_TRANSFER];
___
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"