svn commit: r281505 - in stable: 10/usr.sbin/acpi/acpidump 8/usr.sbin/acpi/acpidump 9/usr.sbin/acpi/acpidump

2015-04-13 Thread Jung-uk Kim
Author: jkim
Date: Mon Apr 13 22:22:32 2015
New Revision: 281505
URL: https://svnweb.freebsd.org/changeset/base/281505

Log:
  MFC:  r281331
  
  Do not crash when RSDT/XSDT contains an empty entry.

Modified:
  stable/10/usr.sbin/acpi/acpidump/acpi.c
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/8/usr.sbin/acpi/acpidump/acpi.c
  stable/9/usr.sbin/acpi/acpidump/acpi.c
Directory Properties:
  stable/8/usr.sbin/acpi/acpidump/   (props changed)
  stable/9/usr.sbin/acpi/acpidump/   (props changed)

Modified: stable/10/usr.sbin/acpi/acpidump/acpi.c
==
--- stable/10/usr.sbin/acpi/acpidump/acpi.c Mon Apr 13 21:33:49 2015
(r281504)
+++ stable/10/usr.sbin/acpi/acpidump/acpi.c Mon Apr 13 22:22:32 2015
(r281505)
@@ -1084,17 +1084,10 @@ acpi_print_rsdt(ACPI_TABLE_HEADER *rsdp)
for (i = 0; i  entries; i++) {
if (i  0)
printf(, );
-   switch (addr_size) {
-   case 4:
+   if (addr_size == 4)
addr = le32toh(rsdt-TableOffsetEntry[i]);
-   break;
-   case 8:
+   else
addr = le64toh(xsdt-TableOffsetEntry[i]);
-   break;
-   default:
-   addr = 0;
-   }
-   assert(addr != 0);
printf(0x%08lx, addr);
}
printf( }\n);
@@ -1341,17 +1334,12 @@ acpi_handle_rsdt(ACPI_TABLE_HEADER *rsdp
xsdt = (ACPI_TABLE_XSDT *)rsdp;
entries = (rsdp-Length - sizeof(ACPI_TABLE_HEADER)) / addr_size;
for (i = 0; i  entries; i++) {
-   switch (addr_size) {
-   case 4:
+   if (addr_size == 4)
addr = le32toh(rsdt-TableOffsetEntry[i]);
-   break;
-   case 8:
+   else
addr = le64toh(xsdt-TableOffsetEntry[i]);
-   break;
-   default:
-   assert((addr = 0));
-   }
-
+   if (addr == 0)
+   continue;
sdp = (ACPI_TABLE_HEADER *)acpi_map_sdt(addr);
if (acpi_checksum(sdp, sdp-Length)) {
warnx(RSDT entry %d (sig %.4s) is corrupt, i,
@@ -1546,16 +1534,12 @@ sdt_from_rsdt(ACPI_TABLE_HEADER *rsdp, c
xsdt = (ACPI_TABLE_XSDT *)rsdp;
entries = (rsdp-Length - sizeof(ACPI_TABLE_HEADER)) / addr_size;
for (i = 0; i  entries; i++) {
-   switch (addr_size) {
-   case 4:
+   if (addr_size == 4)
addr = le32toh(rsdt-TableOffsetEntry[i]);
-   break;
-   case 8:
+   else
addr = le64toh(xsdt-TableOffsetEntry[i]);
-   break;
-   default:
-   assert((addr = 0));
-   }
+   if (addr == 0)
+   continue;
sdt = (ACPI_TABLE_HEADER *)acpi_map_sdt(addr);
if (last != NULL) {
if (sdt == last)
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to svn-src-stable-10-unsubscr...@freebsd.org


svn commit: r281512 - stable/10/sbin/md5

2015-04-13 Thread Xin LI
Author: delphij
Date: Tue Apr 14 00:27:54 2015
New Revision: 281512
URL: https://svnweb.freebsd.org/changeset/base/281512

Log:
  MFC r266417 (bjk):
  
  Assorted updates to md5.1
  
  Note that the -c argument's parameter is compared against the digest of
  the file, not the file. [1]
  
  Update the current time parentheticals for notes about reversing
  and colliding the hash functions. [1]
  
  Some general mdoc updates.
  
  PR:   docs/188043 [1]
  Submitted by: Jamie Landeg-Jones [1]

Modified:
  stable/10/sbin/md5/md5.1
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sbin/md5/md5.1
==
--- stable/10/sbin/md5/md5.1Tue Apr 14 00:02:39 2015(r281511)
+++ stable/10/sbin/md5/md5.1Tue Apr 14 00:27:54 2015(r281512)
@@ -1,5 +1,5 @@
 .\ $FreeBSD$
-.Dd July 31, 2012
+.Dd May 17, 2014
 .Dt MD5 1
 .Os
 .Sh NAME
@@ -63,12 +63,12 @@ concerned, and should not be relied upon
 This also means that
 .Tn MD5
 should not be used as part of a cryptographic signature scheme.
-At the current time (2009-01-06) there is no publicly known method to
+At the current time (2014-05-17) there is no publicly known method to
 .Dq reverse
 MD5, i.e., to find an input given a hash value.
 .Pp
 .Tn SHA-1
-currently (2009-01-06) has no known collisions, but an attack has been
+currently (2014-05-17) has no known collisions, but an attack has been
 found which is faster than a brute-force search, placing the security of
 .Tn SHA-1
 in doubt.
@@ -83,15 +83,15 @@ The hexadecimal checksum of each file li
 after the options are processed.
 .Bl -tag -width indent
 .It Fl c Ar string
-Compare files to this md5 string.
-(Note that this option is not yet useful if multiple files are specified.)
+Compare the digest of the file against this string.
+.Pq Note that this option is not yet useful if multiple files are specified.
 .It Fl s Ar string
 Print a checksum of the given
 .Ar string .
 .It Fl p
 Echo stdin to stdout and append the checksum to stdout.
 .It Fl q
-Quiet mode - only the checksum is printed out.
+Quiet mode \(em only the checksum is printed out.
 Overrides the
 .Fl r
 option.
@@ -114,7 +114,9 @@ and
 .Nm rmd160
 utilities exit 0 on success,
 1 if at least one of the input files could not be read,
-and 2 if at least one file does not have the same hash as the -c option.
+and 2 if at least one file does not have the same hash as the
+.Fl c
+option.
 .Sh SEE ALSO
 .Xr cksum 1 ,
 .Xr md5 3 ,
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to svn-src-stable-10-unsubscr...@freebsd.org


svn commit: r281487 - stable/10/sys/kern

2015-04-13 Thread Alexander Motin
Author: mav
Date: Mon Apr 13 09:17:57 2015
New Revision: 281487
URL: https://svnweb.freebsd.org/changeset/base/281487

Log:
  MFC r280850:
  Periodically wake up threads waiting for vmem(9) resources, so they could
  ask for resource reclamation again.
  
  This is kind of dirty hack, but as last resort this is better then stuck
  indefinitely because of KVA fragmentation, waiting until some random event
  free something sufficient.  OpenSolaris also has this hack in its vmem(9).

Modified:
  stable/10/sys/kern/subr_vmem.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/kern/subr_vmem.c
==
--- stable/10/sys/kern/subr_vmem.c  Mon Apr 13 08:35:03 2015
(r281486)
+++ stable/10/sys/kern/subr_vmem.c  Mon Apr 13 09:17:57 2015
(r281487)
@@ -746,6 +746,12 @@ vmem_periodic(void *unused, int pending)
/* Grow in powers of two.  Shrink less aggressively. */
if (desired = current * 2 || desired * 4 = current)
vmem_rehash(vm, desired);
+
+   /*
+* Periodically wake up threads waiting for resources,
+* so they could ask for reclamation again.
+*/
+   VMEM_CONDVAR_BROADCAST(vm);
}
mtx_unlock(vmem_list_lock);
 
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to svn-src-stable-10-unsubscr...@freebsd.org


svn commit: r281488 - stable/10/usr.sbin/ctld

2015-04-13 Thread Alexander Motin
Author: mav
Date: Mon Apr 13 09:18:56 2015
New Revision: 281488
URL: https://svnweb.freebsd.org/changeset/base/281488

Log:
  MFC r281163: Make ctld to not exit on ECONNABORTED on accept().
  
  That is not really an error for the main process.

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

Modified: stable/10/usr.sbin/ctld/ctld.c
==
--- stable/10/usr.sbin/ctld/ctld.c  Mon Apr 13 09:17:57 2015
(r281487)
+++ stable/10/usr.sbin/ctld/ctld.c  Mon Apr 13 09:18:56 2015
(r281488)
@@ -2382,8 +2382,11 @@ found:
client_fd = accept(portal-p_socket,
(struct sockaddr *)client_sa,
client_salen);
-   if (client_fd  0)
+   if (client_fd  0) {
+   if (errno == ECONNABORTED)
+   continue;
log_err(1, accept);
+   }
assert(client_salen = 
client_sa.ss_len);
 
handle_connection(portal, client_fd,
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to svn-src-stable-10-unsubscr...@freebsd.org


svn commit: r281486 - in stable/10/libexec/rtld-elf: . ia64

2015-04-13 Thread Peter Wemm
Author: peter
Date: Mon Apr 13 08:35:03 2015
New Revision: 281486
URL: https://svnweb.freebsd.org/changeset/base/281486

Log:
  MFC r268182:  Initialize page sizes early for ia64.

Modified:
  stable/10/libexec/rtld-elf/ia64/rtld_machdep.h
  stable/10/libexec/rtld-elf/rtld.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/libexec/rtld-elf/ia64/rtld_machdep.h
==
--- stable/10/libexec/rtld-elf/ia64/rtld_machdep.h  Mon Apr 13 04:48:13 
2015(r281485)
+++ stable/10/libexec/rtld-elf/ia64/rtld_machdep.h  Mon Apr 13 08:35:03 
2015(r281486)
@@ -69,4 +69,6 @@ extern void *__tls_get_addr(unsigned lon
 #defineRTLD_DEFAULT_STACK_PF_EXEC  0
 #defineRTLD_DEFAULT_STACK_EXEC 0
 
+#defineRTLD_INIT_PAGESIZES_EARLY   1
+
 #endif

Modified: stable/10/libexec/rtld-elf/rtld.c
==
--- stable/10/libexec/rtld-elf/rtld.c   Mon Apr 13 04:48:13 2015
(r281485)
+++ stable/10/libexec/rtld-elf/rtld.c   Mon Apr 13 08:35:03 2015
(r281486)
@@ -1807,6 +1807,11 @@ init_rtld(caddr_t mapbase, Elf_Auxinfo *
 const Elf_Dyn *dyn_soname;
 const Elf_Dyn *dyn_runpath;
 
+#ifdef RTLD_INIT_PAGESIZES_EARLY
+/* The page size is required by the dynamic memory allocator. */
+init_pagesizes(aux_info);
+#endif
+
 /*
  * Conjure up an Obj_Entry structure for the dynamic linker.
  *
@@ -1843,8 +1848,10 @@ init_rtld(caddr_t mapbase, Elf_Auxinfo *
 /* Now that non-local variables can be accesses, copy out obj_rtld. */
 memcpy(obj_rtld, objtmp, sizeof(obj_rtld));
 
+#ifndef RTLD_INIT_PAGESIZES_EARLY
 /* The page size is required by the dynamic memory allocator. */
 init_pagesizes(aux_info);
+#endif
 
 if (aux_info[AT_OSRELDATE] != NULL)
osreldate = aux_info[AT_OSRELDATE]-a_un.a_val;
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to svn-src-stable-10-unsubscr...@freebsd.org