Re: svn commit: r238722 - in head/lib/msun: . ld128 ld80 man src

2012-07-24 Thread Alexey Dokuchaev
On Mon, Jul 23, 2012 at 07:13:56PM +, Steve Kargl wrote:
> Author: kargl
> Date: Mon Jul 23 19:13:55 2012
> New Revision: 238722
> URL: http://svn.freebsd.org/changeset/base/238722
> 
> Log:
>   Compute the exponential of x for Intel 80-bit format and IEEE 128-bit
>   format.  These implementations are based on
>   
>   PTP Tang, "Table-driven implementation of the exponential function
>   in IEEE floating-point arithmetic," ACM Trans. Math. Soft., 15,
>   144-157 (1989).

I believe some ports could benefit from OSVERSION bump for this one.

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


Re: svn commit: r238672 - head/sys/dev/sdhci

2012-07-24 Thread Bruce Evans

On Mon, 23 Jul 2012, Garrett Cooper wrote:


On Mon, Jul 23, 2012 at 5:07 PM, Warner Losh  wrote:

[>* trimmed]



Double spacing is the one true way I learned how to type in school.  Since the 
1980's though, things have changed and many advocate single spaces.  However, 
that's for folks with fancy variable pitch font and such.  For fixed-witdh 
fonts, 2 is still preferred in some circles, including ours.


   And now that I look at style(9), there are subtleties that
demonstrate this in the roff generated text:

=

FreeBSD source tree.  It is also a guide for the preferred userland code
  ^^
style.  Many of the style rules are implicit in the examples.  Be careful
^^
  ^^
to check the examples before assuming that style is silent on an issue.

=


Where's the indentometer when you need it? :-)

roff understands formatting, and generates these 2-space sentence breaks
automatically for -Tascii, and something different (more like 1.5 spaces?)
for proportional fonts.  This is provided you don't hard-code sentence
breaks in the man page source.  Not starting sentences on new lines gives
hard-coded sentence breaks a their start.


   I wish this point was more explicit, but like style(9), there are
other unspoken rules that should/must be adhered to.


style(9) consisted entirely of examples before it was mangled to create
a man page.  The mangling gave zillions of whitespace errors (mainly
for man pages' 5-space indentation and corresponding tab lossage
(leading tabs in literal source code become 1 tab followed by 5 spaces)),
but there are no examples of single-space sentence breaks in literal
source code.  Unfortunately, this is because there are almost no
examples of sentence breaks in literal source code.  There used to be
about 25 such examples (in C comments of course), but most of these
rotted to meta-descriptions in man page text.  In the man page source,
all of the latter are correctly formatted (with new sentences on new
lines, so that there are no literal spaces.  In the man output, these
are formatted according to man/roff rules which are unrelated to C
style rules and in fact differ for proportional fonts, so they don't
provide examples of C style.

4 examples on 3 lines remain.  The most relevant one is:

"
* Multi-line comments look like this.  Make them real sentences.  Fill
..."

Single-space sentence breaks give comments that don't look like this.

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


Re: svn commit: r238118 - head/lib/libc/gen

2012-07-24 Thread David Schultz
On Wed, Jul 04, 2012, Doug Barton wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
> 
> On 07/04/2012 13:32, Andrey Chernov wrote:
> > 1) /dev/urandom may not exist in jails/sandboxes
> 
> That would be a pretty serious configuration error.

Yes -- but the scary part is that arc4random() is not fail-safe at
all.  If /dev/random isn't there, you just silently get
predictable "randomness".  If you needed that randomness for
cryptographic purposes you're out of luck; you might as well have
used rot13.  Using the sysctl doesn't fix the failure mode (in
fact, as I recall the sysctl dubiously never reports failure even
if there is no entropy), but there's a narrower set of
circumstances under which the sysctl can fail.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r238739 - head/sys/cam/scsi

2012-07-24 Thread Alexander Motin
Author: mav
Date: Tue Jul 24 13:08:43 2012
New Revision: 238739
URL: http://svn.freebsd.org/changeset/base/238739

Log:
  Do not call ses_softc_cleanup() in case of configuration read failure.
  Just free inclomplete daemon cache instead to let it retry next time.
  Premature ses_softc_cleanup() caused NULL dereference when freed softc
  was accessed later.

Modified:
  head/sys/cam/scsi/scsi_enc_ses.c

Modified: head/sys/cam/scsi/scsi_enc_ses.c
==
--- head/sys/cam/scsi/scsi_enc_ses.cTue Jul 24 04:14:16 2012
(r238738)
+++ head/sys/cam/scsi/scsi_enc_ses.cTue Jul 24 13:08:43 2012
(r238739)
@@ -1473,7 +1473,7 @@ ses_process_config(enc_softc_t *enc, str
 
 out:
if (err)
-   ses_softc_cleanup(enc);
+   ses_cache_free(enc, enc_cache);
else {
enc_update_request(enc, SES_UPDATE_GETSTATUS);
enc_update_request(enc, SES_UPDATE_GETELMDESCS);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r238740 - head/sys/cam/scsi

2012-07-24 Thread Alexander Motin
Author: mav
Date: Tue Jul 24 13:32:49 2012
New Revision: 238740
URL: http://svn.freebsd.org/changeset/base/238740

Log:
  Fix off by one error in ses_enc_desc_last_byte().

Modified:
  head/sys/cam/scsi/scsi_ses.h

Modified: head/sys/cam/scsi/scsi_ses.h
==
--- head/sys/cam/scsi/scsi_ses.hTue Jul 24 13:08:43 2012
(r238739)
+++ head/sys/cam/scsi/scsi_ses.hTue Jul 24 13:32:49 2012
(r238740)
@@ -117,7 +117,7 @@ struct ses_enc_desc {
 static inline uint8_t *
 ses_enc_desc_last_byte(struct ses_enc_desc *encdesc)
 {
-   return (&encdesc->length + encdesc->length + 1);
+   return (&encdesc->length + encdesc->length);
 }
 
 static inline struct ses_enc_desc *
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r238741 - head/lib/libelf

2012-07-24 Thread Andrey A. Chernov
Author: ache
Date: Tue Jul 24 16:03:28 2012
New Revision: 238741
URL: http://svn.freebsd.org/changeset/base/238741

Log:
  Don't ever build files depending on the directory where they are placed in.
  It is obvious that its modification time will change with each such file
  builded.
  This bug cause whole libelf to rebuild itself each second make run
  (and relink that files on each first make run) in the loop.

Modified:
  head/lib/libelf/Makefile

Modified: head/lib/libelf/Makefile
==
--- head/lib/libelf/MakefileTue Jul 24 13:32:49 2012(r238740)
+++ head/lib/libelf/MakefileTue Jul 24 16:03:28 2012(r238741)
@@ -68,11 +68,9 @@ CLEANFILES=  ${GENSRCS}
 CLEANDIRS= sys
 CFLAGS+=   -I${.CURDIR} -I.
 
-sys/elf32.h sys/elf64.h sys/elf_common.h: sys
-   ln -sf ${.CURDIR}/../../sys/${.TARGET} ${.TARGET}
-
-sys:
+sys/elf32.h sys/elf64.h sys/elf_common.h: ${.CURDIR}/../../sys/${.TARGET}
mkdir -p ${.OBJDIR}/sys
+   ln -sf ${.CURDIR}/../../sys/${.TARGET} ${.TARGET}
 
 SHLIB_MAJOR=   1
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r238742 - in head: contrib/dtc contrib/dtc/Documentation contrib/dtc/libfdt sys/contrib/libfdt

2012-07-24 Thread Warner Losh
Author: imp
Date: Tue Jul 24 16:29:33 2012
New Revision: 238742
URL: http://svn.freebsd.org/changeset/base/238742

Log:
  Update to latest git version of dtc to get new dtsv2 support,
  including the include directive.
  
  Fix minor build issue corrected by converting yypush_buffer_state and
  yypop_buffer_state to yy_set_buffer_state and a hard-coded 100-deep
  stack.  It was easier to fix it here than to import that support into
  our flex.
  
  The new tools and test hardness remain unsupported at the moment.

Added:
  head/contrib/dtc/dtdiff
 - copied unchanged from r238738, vendor/dtc/dist/dtdiff
  head/contrib/dtc/fdtdump.c
 - copied unchanged from r238738, vendor/dtc/dist/fdtdump.c
  head/contrib/dtc/fdtget.c
 - copied unchanged from r238738, vendor/dtc/dist/fdtget.c
  head/contrib/dtc/fdtput.c
 - copied unchanged from r238738, vendor/dtc/dist/fdtput.c
  head/contrib/dtc/libfdt/fdt_empty_tree.c
 - copied unchanged from r238738, vendor/dtc/dist/libfdt/fdt_empty_tree.c
  head/sys/contrib/libfdt/fdt_empty_tree.c
 - copied unchanged from r238738, vendor/dtc/dist/libfdt/fdt_empty_tree.c
Modified:
  head/contrib/dtc/Documentation/dts-format.txt
  head/contrib/dtc/Documentation/manual.txt
  head/contrib/dtc/Makefile
  head/contrib/dtc/checks.c
  head/contrib/dtc/convert-dtsv0-lexer.l
  head/contrib/dtc/data.c
  head/contrib/dtc/dtc-lexer.l
  head/contrib/dtc/dtc-parser.y
  head/contrib/dtc/dtc.c
  head/contrib/dtc/dtc.h
  head/contrib/dtc/flattree.c
  head/contrib/dtc/fstree.c
  head/contrib/dtc/libfdt/Makefile.libfdt
  head/contrib/dtc/libfdt/fdt.c
  head/contrib/dtc/libfdt/fdt_ro.c
  head/contrib/dtc/libfdt/fdt_rw.c
  head/contrib/dtc/libfdt/libfdt.h
  head/contrib/dtc/libfdt/libfdt_env.h
  head/contrib/dtc/libfdt/libfdt_internal.h
  head/contrib/dtc/livetree.c
  head/contrib/dtc/srcpos.c
  head/contrib/dtc/srcpos.h
  head/contrib/dtc/treesource.c
  head/contrib/dtc/util.c
  head/contrib/dtc/util.h
  head/sys/contrib/libfdt/fdt.c
  head/sys/contrib/libfdt/fdt_ro.c
  head/sys/contrib/libfdt/fdt_rw.c
  head/sys/contrib/libfdt/libfdt.h
  head/sys/contrib/libfdt/libfdt_env.h
  head/sys/contrib/libfdt/libfdt_internal.h
Directory Properties:
  head/contrib/dtc/   (props changed)
  head/sys/contrib/libfdt/   (props changed)

Modified: head/contrib/dtc/Documentation/dts-format.txt
==
--- head/contrib/dtc/Documentation/dts-format.txt   Tue Jul 24 16:03:28 
2012(r238741)
+++ head/contrib/dtc/Documentation/dts-format.txt   Tue Jul 24 16:29:33 
2012(r238742)
@@ -29,18 +29,28 @@ except for properties with empty (zero l
 form:
[label:] property-name;
 
-Property values may be defined as an array of 32-bit integer cells, as
-NUL-terminated strings, as bytestrings or a combination of these.
+Property values may be defined as an array of 8, 16, 32, or 64-bit integer
+elements, as NUL-terminated strings, as bytestrings or a combination of these.
 
-* Arrays of cells are represented by angle brackets surrounding a
-  space separated list of C-style integers
+* Arrays are represented by angle brackets surrounding a space separated list
+  of C-style integers or character literals.  Array elements default to 32-bits
+  in size.  An array of 32-bit elements is also known as a cell list or a list
+  of cells.  A cell being an unsigned 32-bit integer.
 
e.g. interrupts = <17 0xc>;
 
-* A 64-bit value is represented with two 32-bit cells.
+* A 64-bit value can be represented with two 32-bit elements.
 
e.g. clock-frequency = <0x0001 0x>;
 
+* The storage size of an element can be changed using the /bits/ prefix.  The
+  /bits/ prefix allows for the creation of 8, 16, 32, and 64-bit elements.
+  The resulting array will not be padded to a multiple of the default 32-bit
+  element size.
+
+   e.g. interrupts = /bits/ 8 <17 0xc>;
+   e.g. clock-frequency = /bits/ 64 <0x0001>;
+
 * A NUL-terminated string value is represented using double quotes
   (the property value is considered to include the terminating NUL
   character).
@@ -59,19 +69,20 @@ NUL-terminated strings, as bytestrings o
e.g. compatible = "ns16550", "ns8250";
 example = <0xf00f 19>, "a strange property format";
 
-* In a cell array a reference to another node will be expanded to that
-  node's phandle.  References may by '&' followed by a node's label:
+* In an array a reference to another node will be expanded to that node's
+  phandle.  References may by '&' followed by a node's label:
e.g. interrupt-parent = < &mpic >;
   or they may be '&' followed by a node's full path in braces:
e.g. interrupt-parent = < &{/soc/interrupt-controller@4} >;
+  References are only permitted in arrays that have an element size of
+  32-bits.
 
-* Outside a cell array, a reference to another node will be expanded
-  to that node's full path.
+* Outside an array, 

Re: svn commit: r238722 - in head/lib/msun: . ld128 ld80 man src

2012-07-24 Thread Steve Kargl
On Tue, Jul 24, 2012 at 08:43:35AM +, Alexey Dokuchaev wrote:
> On Mon, Jul 23, 2012 at 07:13:56PM +, Steve Kargl wrote:
> > Author: kargl
> > Date: Mon Jul 23 19:13:55 2012
> > New Revision: 238722
> > URL: http://svn.freebsd.org/changeset/base/238722
> > 
> > Log:
> >   Compute the exponential of x for Intel 80-bit format and IEEE 128-bit
> >   format.  These implementations are based on
> >   
> >   PTP Tang, "Table-driven implementation of the exponential function
> >   in IEEE floating-point arithmetic," ACM Trans. Math. Soft., 15,
> >   144-157 (1989).
> 
> I believe some ports could benefit from OSVERSION bump for this one.
> 

I've never done a OSVERSION bump, so you'll need to tell me how.
But, more importantly, I can find no information in the Developer's
Handbook and only two rather terse references in the Porter's
Handbook.  So, what is OSVERSION?  Why do you think it needs a
bump?

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


Re: svn commit: r238722 - in head/lib/msun: . ld128 ld80 man src

2012-07-24 Thread David Schultz
On Tue, Jul 24, 2012, Steve Kargl wrote:
> On Tue, Jul 24, 2012 at 08:43:35AM +, Alexey Dokuchaev wrote:
> > On Mon, Jul 23, 2012 at 07:13:56PM +, Steve Kargl wrote:
> > > Author: kargl
> > > Date: Mon Jul 23 19:13:55 2012
> > > New Revision: 238722
> > > URL: http://svn.freebsd.org/changeset/base/238722
> > > 
> > > Log:
> > >   Compute the exponential of x for Intel 80-bit format and IEEE 128-bit
> > >   format.  These implementations are based on
> > >   
> > >   PTP Tang, "Table-driven implementation of the exponential function
> > >   in IEEE floating-point arithmetic," ACM Trans. Math. Soft., 15,
> > >   144-157 (1989).
> > 
> > I believe some ports could benefit from OSVERSION bump for this one.
> > 
> 
> I've never done a OSVERSION bump, so you'll need to tell me how.
> But, more importantly, I can find no information in the Developer's
> Handbook and only two rather terse references in the Porter's
> Handbook.  So, what is OSVERSION?  Why do you think it needs a
> bump?

It is the same as the __FreeBSD_version bump I mentioned in my
email last week.  Basically it is a number you increment in
sys/sys/param.h whenever there is a significant change that
porters and developers of third-party software might want to test
against.  In this case, it would help any ports that have
workarounds for the lack of expl() to compile both before and
after this change.  But it's also important not to bump the
version gratuitously if there's no reason to believe the change
might introduce incompatibilities.

The purpose of each __FreeBSD_version bump is documented here:

  http://www.freebsd.org/doc/en/books/porters-handbook/freebsd-versions.html

We should probably talk about how to update this file at some
point, although for the first one or two times, it's probably fine
to get a doc committer to help out with this step.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r238743 - head/cddl/contrib/opensolaris/cmd/dtrace

2012-07-24 Thread George V. Neville-Neil
Author: gnn
Date: Tue Jul 24 18:01:28 2012
New Revision: 238743
URL: http://svn.freebsd.org/changeset/base/238743

Log:
  Fix a bug in interrupt handling so that we're only considered
  impatient if we sent more than 2 INT signals.  This fixes a bug where
  we wouldn't see aggregations print on the command line if we Ctrl-C'd
  a dtrace script or command line invocation.
  
  MFC after:2 weeks

Modified:
  head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c

Modified: head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c
==
--- head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c   Tue Jul 24 16:29:33 
2012(r238742)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c   Tue Jul 24 18:01:28 
2012(r238743)
@@ -70,6 +70,8 @@ typedef struct dtrace_cmd {
 #defineE_ERROR 1
 #defineE_USAGE 2
 
+#define IMPATIENT_LIMIT2
+
 static const char DTRACE_OPTSTR[] =
"3:6:aAb:Bc:CD:ef:FGhHi:I:lL:m:n:o:p:P:qs:SU:vVwx:X:Z";
 
@@ -1202,7 +1204,7 @@ intr(int signo)
if (!g_intr)
g_newline = 1;
 
-   if (g_intr++)
+   if (g_intr++ > IMPATIENT_LIMIT)
g_impatient = 1;
 }
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r238746 - in head/contrib/bind9: . lib/dns

2012-07-24 Thread Doug Barton
Author: dougb
Date: Tue Jul 24 18:53:28 2012
New Revision: 238746
URL: http://svn.freebsd.org/changeset/base/238746

Log:
  Heavy DNSSEC Validation Load Can Cause a "Bad Cache" Assertion Failure
  in BIND9
  
  High numbers of queries with DNSSEC validation enabled can cause an
  assertion failure in named, caused by using a "bad cache" data structure
  before it has been initialized.
  
  CVE: CVE-2012-3817
  Posting date: 24 July, 2012

Modified:
  head/contrib/bind9/CHANGES
  head/contrib/bind9/lib/dns/resolver.c
  head/contrib/bind9/lib/dns/zone.c
  head/contrib/bind9/version
Directory Properties:
  head/contrib/bind9/   (props changed)

Modified: head/contrib/bind9/CHANGES
==
--- head/contrib/bind9/CHANGES  Tue Jul 24 18:49:18 2012(r238745)
+++ head/contrib/bind9/CHANGES  Tue Jul 24 18:53:28 2012(r238746)
@@ -1,3 +1,12 @@
+   --- 9.8.3-P2 released ---
+
+3346.  [security]  Bad-cache data could be used before it was
+   initialized, causing an assert. [RT #30025]
+
+3342.  [bug]   Change #3314 broke saving of stub zones to disk
+   resulting in excessive cpu usage in some cases.
+   [RT #29952]
+
--- 9.8.3-P1 released ---
 
 3331.  [security]  dns_rdataslab_fromrdataset could produce bad

Modified: head/contrib/bind9/lib/dns/resolver.c
==
--- head/contrib/bind9/lib/dns/resolver.c   Tue Jul 24 18:49:18 2012
(r238745)
+++ head/contrib/bind9/lib/dns/resolver.c   Tue Jul 24 18:53:28 2012
(r238746)
@@ -8448,6 +8448,7 @@ dns_resolver_addbadcache(dns_resolver_t 
goto cleanup;
bad->type = type;
bad->hashval = hashval;
+   bad->expire = *expire;
isc_buffer_init(&buffer, bad + 1, name->length);
dns_name_init(&bad->name, NULL);
dns_name_copy(name, &bad->name, &buffer);
@@ -8459,8 +8460,8 @@ dns_resolver_addbadcache(dns_resolver_t 
if (resolver->badcount < resolver->badhash * 2 &&
resolver->badhash > DNS_BADCACHE_SIZE)
resizehash(resolver, &now, ISC_FALSE);
-   }
-   bad->expire = *expire;
+   } else
+   bad->expire = *expire;
  cleanup:
UNLOCK(&resolver->lock);
 }

Modified: head/contrib/bind9/lib/dns/zone.c
==
--- head/contrib/bind9/lib/dns/zone.c   Tue Jul 24 18:49:18 2012
(r238745)
+++ head/contrib/bind9/lib/dns/zone.c   Tue Jul 24 18:53:28 2012
(r238746)
@@ -8027,13 +8027,14 @@ zone_maintenance(dns_zone_t *zone) {
case dns_zone_master:
case dns_zone_slave:
case dns_zone_key:
+   case dns_zone_stub:
LOCK_ZONE(zone);
if (zone->masterfile != NULL &&
isc_time_compare(&now, &zone->dumptime) >= 0 &&
DNS_ZONE_FLAG(zone, DNS_ZONEFLG_LOADED) &&
DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NEEDDUMP)) {
dumping = was_dumping(zone);
-   } else
+   } else 
dumping = ISC_TRUE;
UNLOCK_ZONE(zone);
if (!dumping) {
@@ -8386,7 +8387,7 @@ zone_dump(dns_zone_t *zone, isc_boolean_
goto fail;
}
 
-   if (compact) {
+   if (compact && zone->type != dns_zone_stub) {
dns_zone_t *dummy = NULL;
LOCK_ZONE(zone);
zone_iattach(zone, &dummy);
@@ -9242,7 +9243,7 @@ stub_callback(isc_task_t *task, isc_even
dns_zone_t *zone = NULL;
char master[ISC_SOCKADDR_FORMATSIZE];
char source[ISC_SOCKADDR_FORMATSIZE];
-   isc_uint32_t nscnt, cnamecnt;
+   isc_uint32_t nscnt, cnamecnt, refresh, retry, expire;
isc_result_t result;
isc_time_t now;
isc_boolean_t exiting = ISC_FALSE;
@@ -9390,19 +9391,32 @@ stub_callback(isc_task_t *task, isc_even
ZONEDB_LOCK(&zone->dblock, isc_rwlocktype_write);
if (zone->db == NULL)
zone_attachdb(zone, stub->db);
+   result = zone_get_from_db(zone, zone->db, NULL, NULL, NULL, &refresh,
+ &retry, &expire, NULL, NULL);
+   if (result == ISC_R_SUCCESS) {
+   zone->refresh = RANGE(refresh, zone->minrefresh,
+ zone->maxrefresh);
+   zone->retry = RANGE(retry, zone->minretry, zone->maxretry);
+   zone->expire = RANGE(expire, zone->refresh + zone->retry,
+DNS_MAX_EXPIRE);
+   DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_HAVETIMERS);
+   }
ZONEDB_UNLOCK(&zone->dblock, isc_rwlocktype_write);
dns_db_detach(&stub->db);
 
-  

svn commit: r238753 - head/usr.bin/procstat

2012-07-24 Thread Mikolaj Golub
Author: trociny
Date: Tue Jul 24 19:40:12 2012
New Revision: 238753
URL: http://svn.freebsd.org/changeset/base/238753

Log:
  Align the header with output.
  
  MFC after:3 days

Modified:
  head/usr.bin/procstat/procstat_vm.c

Modified: head/usr.bin/procstat/procstat_vm.c
==
--- head/usr.bin/procstat/procstat_vm.c Tue Jul 24 19:11:50 2012
(r238752)
+++ head/usr.bin/procstat/procstat_vm.c Tue Jul 24 19:40:12 2012
(r238753)
@@ -50,7 +50,7 @@ procstat_vm(struct kinfo_proc *kipp)
 
ptrwidth = 2*sizeof(void *) + 2;
if (!hflag)
-   printf("%5s %*s %*s %3s %4s %4s %3s %3s %3s %-2s %-s\n",
+   printf("%5s %*s %*s %3s %4s %4s %3s %3s %4s %-2s %-s\n",
"PID", ptrwidth, "START", ptrwidth, "END", "PRT", "RES",
"PRES", "REF", "SHD", "FL", "TP", "PATH");
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r238722 - in head/lib/msun: . ld128 ld80 man src

2012-07-24 Thread Steve Kargl
On Tue, Jul 24, 2012 at 01:57:12PM -0400, David Schultz wrote:
> On Tue, Jul 24, 2012, Steve Kargl wrote:
> > On Tue, Jul 24, 2012 at 08:43:35AM +, Alexey Dokuchaev wrote:
> > > On Mon, Jul 23, 2012 at 07:13:56PM +, Steve Kargl wrote:
> > > > Author: kargl
> > > > Date: Mon Jul 23 19:13:55 2012
> > > > New Revision: 238722
> > > > URL: http://svn.freebsd.org/changeset/base/238722
> > > > 
> > > > Log:
> > > >   Compute the exponential of x for Intel 80-bit format and IEEE 128-bit
> > > >   format.  These implementations are based on
> > > >   
> > > >   PTP Tang, "Table-driven implementation of the exponential function
> > > >   in IEEE floating-point arithmetic," ACM Trans. Math. Soft., 15,
> > > >   144-157 (1989).
> > > 
> > > I believe some ports could benefit from OSVERSION bump for this one.
> > > 
> > 
> > I've never done a OSVERSION bump, so you'll need to tell me how.
> > But, more importantly, I can find no information in the Developer's
> > Handbook and only two rather terse references in the Porter's
> > Handbook.  So, what is OSVERSION?  Why do you think it needs a
> > bump?
> 
> It is the same as the __FreeBSD_version bump I mentioned in my
> email last week.  Basically it is a number you increment in
> sys/sys/param.h whenever there is a significant change that
> porters and developers of third-party software might want to test
> against.  In this case, it would help any ports that have
> workarounds for the lack of expl() to compile both before and
> after this change.  But it's also important not to bump the
> version gratuitously if there's no reason to believe the change
> might introduce incompatibilities.
> 
> The purpose of each __FreeBSD_version bump is documented here:
> 
>   http://www.freebsd.org/doc/en/books/porters-handbook/freebsd-versions.html
> 
> We should probably talk about how to update this file at some
> point, although for the first one or two times, it's probably fine
> to get a doc committer to help out with this step.

The only time that __FreeBSD_version has been  bumped for a libm change
occurred at

802502  March 6, 2011   8.2-STABLE after merging log2 and log2f into 
libm.
900027  December 5, 20109.0-CURRENT after the addition of log2 to libm.

Conspicuously, missing are bumps for additions of sqrtl(), cbrtl(), long
double trig. functions, exp2l(), and few other changes.  But, if people
want a bump here's a diff

Index: sys/sys/param.h
===
--- sys/sys/param.h (revision 238752)
+++ sys/sys/param.h (working copy)
@@ -58,7 +58,7 @@
  * in the range 5 to 9.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 115  /* Master, propagated to newvers */
+#define __FreeBSD_version 116  /* Master, propagated to newvers */
 
 /*
  * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,

I can't change the porters-handbook, as I grab sources with csup and
the following supfile:

*default host=cvsup3.FreeBSD.org
*default base=/usr/home/kargl/freebsd/ncvs
*default prefix=/usr/home/kargl/freebsd/ncvs
*default release=cvs
*default delete use-rel-suffix
*default compress
doc-all
www

A check out of doc/ yields a file named 
doc/en_US.ISO8859-1/books/porters-handbook/book.sgml 

The last entry in this file reads


  112
  May 2, 2012
  10-CURRENT jemalloc import
(rev 234924).


If one checks the URL you posted, one see that
113 May 22, 201210-CURRENT after byacc import (rev 
235788).
114 June 27, 2012   10-CURRENT after BSD sort becoming the 
default sort (rev 237629).
115 July 12, 2012   10-CURRENT after import of OpenSSL 
1.0.1c (rev 238405).
(not changed)   July 13, 2012   10-CURRENT after the fix for LLVM/Clang 3.1 
regression (rev 238429).

So, I have no idea were the most current source lives.

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


Re: svn commit: r238722 - in head/lib/msun: . ld128 ld80 man src

2012-07-24 Thread Doug Barton
On 7/24/2012 1:53 PM, Steve Kargl wrote:
> So, I have no idea were the most current source lives.

All 3 parts of the project are in svn now. There is a primer for doc svn
on the wiki.

-- 
If you're never wrong, you're not trying hard enough


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


Re: svn commit: r238743 - head/cddl/contrib/opensolaris/cmd/dtrace

2012-07-24 Thread Andriy Gapon
on 24/07/2012 21:01 George V. Neville-Neil said the following:
> Author: gnn
> Date: Tue Jul 24 18:01:28 2012
> New Revision: 238743
> URL: http://svn.freebsd.org/changeset/base/238743
> 
> Log:
>   Fix a bug in interrupt handling so that we're only considered
>   impatient if we sent more than 2 INT signals.  This fixes a bug where
>   we wouldn't see aggregations print on the command line if we Ctrl-C'd
>   a dtrace script or command line invocation.

I'd rather fix the shell that sends 2 or 2+ SIGINTs on one Ctrl-C. [half-joking]
I think that _a bug_ is there, not here.  I do not experience any such problems
with zsh.

>   MFC after:  2 weeks
> 
> Modified:
>   head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c
> 
> Modified: head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c
> ==
> --- head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c Tue Jul 24 16:29:33 
> 2012(r238742)
> +++ head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c Tue Jul 24 18:01:28 
> 2012(r238743)
> @@ -70,6 +70,8 @@ typedef struct dtrace_cmd {
>  #define  E_ERROR 1
>  #define  E_USAGE 2
>  
> +#define IMPATIENT_LIMIT  2
> +
>  static const char DTRACE_OPTSTR[] =
>   "3:6:aAb:Bc:CD:ef:FGhHi:I:lL:m:n:o:p:P:qs:SU:vVwx:X:Z";
>  
> @@ -1202,7 +1204,7 @@ intr(int signo)
>   if (!g_intr)
>   g_newline = 1;
>  
> - if (g_intr++)
> + if (g_intr++ > IMPATIENT_LIMIT)
>   g_impatient = 1;

Because of the postfix ++ g_impatient will be set to one at the _forth_ run
through this code (assuming that the initial value of g_intr is zero) contrary
to what you say in the commit message.

>  }
>  
> 

BTW, posting even trivial patches for a review as a part of the routine seems to
be a good habit in general.

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


svn commit: r238755 - head/sys/x86/x86

2012-07-24 Thread Jim Harris
Author: jimharris
Date: Tue Jul 24 22:10:11 2012
New Revision: 238755
URL: http://svn.freebsd.org/changeset/base/238755

Log:
  Add rmb() to tsc_read_##x to enforce serialization of rdtsc captures.
  
  Intel Architecture Manual specifies that rdtsc instruction is not serialized,
  so without this change, TSC synchronization test would periodically fail,
  resulting in use of HPET timecounter instead of TSC-low.  This caused
  severe performance degradation (40-50%) when running high IO/s workloads due 
to
  HPET MMIO reads and GEOM stat collection.
  
  Tests on Xeon E5-2600 (Sandy Bridge) 8C systems were seeing TSC 
synchronization
  fail approximately 20% of the time.
  
  Sponsored by: Intel
  Reviewed by: kib
  MFC after: 3 days

Modified:
  head/sys/x86/x86/tsc.c

Modified: head/sys/x86/x86/tsc.c
==
--- head/sys/x86/x86/tsc.c  Tue Jul 24 20:15:41 2012(r238754)
+++ head/sys/x86/x86/tsc.c  Tue Jul 24 22:10:11 2012(r238755)
@@ -328,6 +328,7 @@ init_TSC(void)
 
 #ifdef SMP
 
+/* rmb is required here because rdtsc is not a serializing instruction. */
 #defineTSC_READ(x) \
 static void\
 tsc_read_##x(void *arg)\
@@ -335,6 +336,7 @@ tsc_read_##x(void *arg) \
uint32_t *tsc = arg;\
u_int cpu = PCPU_GET(cpuid);\
\
+   rmb();  \
tsc[cpu * 3 + x] = rdtsc32();   \
 }
 TSC_READ(0)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r238722 - in head/lib/msun: . ld128 ld80 man src

2012-07-24 Thread David Schultz
On Tue, Jul 24, 2012, Steve Kargl wrote:
> On Tue, Jul 24, 2012 at 01:57:12PM -0400, David Schultz wrote:
> > On Tue, Jul 24, 2012, Steve Kargl wrote:
> > > On Tue, Jul 24, 2012 at 08:43:35AM +, Alexey Dokuchaev wrote:
> > > > On Mon, Jul 23, 2012 at 07:13:56PM +, Steve Kargl wrote:
> > > > > Author: kargl
> > > > > Date: Mon Jul 23 19:13:55 2012
> > > > > New Revision: 238722
> > > > > URL: http://svn.freebsd.org/changeset/base/238722
> > > > > 
> > > > > Log:
> > > > >   Compute the exponential of x for Intel 80-bit format and IEEE 
> > > > > 128-bit
> > > > >   format.  These implementations are based on
> > > > >   
> > > > >   PTP Tang, "Table-driven implementation of the exponential function
> > > > >   in IEEE floating-point arithmetic," ACM Trans. Math. Soft., 15,
> > > > >   144-157 (1989).
> > > > 
> > > > I believe some ports could benefit from OSVERSION bump for this one.
> > > > 
> > > 
> > > I've never done a OSVERSION bump, so you'll need to tell me how.
> > > But, more importantly, I can find no information in the Developer's
> > > Handbook and only two rather terse references in the Porter's
> > > Handbook.  So, what is OSVERSION?  Why do you think it needs a
> > > bump?
> > 
> > It is the same as the __FreeBSD_version bump I mentioned in my
> > email last week.  Basically it is a number you increment in
> > sys/sys/param.h whenever there is a significant change that
> > porters and developers of third-party software might want to test
> > against.  In this case, it would help any ports that have
> > workarounds for the lack of expl() to compile both before and
> > after this change.  But it's also important not to bump the
> > version gratuitously if there's no reason to believe the change
> > might introduce incompatibilities.
> > 
> > The purpose of each __FreeBSD_version bump is documented here:
> > 
> >   http://www.freebsd.org/doc/en/books/porters-handbook/freebsd-versions.html
> > 
> > We should probably talk about how to update this file at some
> > point, although for the first one or two times, it's probably fine
> > to get a doc committer to help out with this step.
> 
> The only time that __FreeBSD_version has been  bumped for a libm change
> occurred at
> 
> 802502March 6, 2011   8.2-STABLE after merging log2 and log2f 
> into libm.
> 900027December 5, 20109.0-CURRENT after the addition of log2 
> to libm.
> 
> Conspicuously, missing are bumps for additions of sqrtl(), cbrtl(), long
> double trig. functions, exp2l(), and few other changes.  But, if people
> want a bump here's a diff

I believe there's at least one other; if a bump occurred due to
another recent change, we usually don't bump it again.  For most
of those functions there weren't any workarounds in ports that had
to be ifdef'd.  With expl(), there probably are, although I
haven't checked.

> Index: sys/sys/param.h
> ===
> --- sys/sys/param.h (revision 238752)
> +++ sys/sys/param.h (working copy)
> @@ -58,7 +58,7 @@
>   * in the range 5 to 9.
>   */
>  #undef __FreeBSD_version
> -#define __FreeBSD_version 115  /* Master, propagated to newvers */
> +#define __FreeBSD_version 116  /* Master, propagated to newvers */
>  
>  /*
>   * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,

This looks good.  Note that if you MFC the change, there will need
to be a different bump in -STABLE.

> I can't change the porters-handbook, as I grab sources with csup and
> the following supfile:
> 
> *default host=cvsup3.FreeBSD.org
> *default base=/usr/home/kargl/freebsd/ncvs
> *default prefix=/usr/home/kargl/freebsd/ncvs
> *default release=cvs
> *default delete use-rel-suffix
> *default compress
> doc-all
> www
> 
> A check out of doc/ yields a file named 
> doc/en_US.ISO8859-1/books/porters-handbook/book.sgml 
> 
> The last entry in this file reads
> 
>   
> 112
> May 2, 2012
> 10-CURRENT jemalloc import
>   (rev 234924).
>   

That's the right file, and you can commit changes with
'cvs -dka...@ncvs.freebsd.org:/home/dcvs' even if you checked
the file out from a local repo.  As a src committer, you want
to be careful if you touch other repositories, i.e., ask a doc
committer to review it if you're unsure.

> If one checks the URL you posted, one see that
> 113   May 22, 201210-CURRENT after byacc import (rev 
> 235788).
> 114   June 27, 2012   10-CURRENT after BSD sort becoming the 
> default sort (rev 237629).
> 115   July 12, 2012   10-CURRENT after import of 
> OpenSSL 1.0.1c (rev 238405).
> (not changed) July 13, 2012   10-CURRENT after the fix for LLVM/Clang 
> 3.1 regression (rev 238429).
> 
> So, I have no idea were the most current source lives.

Yeah, often people neglect to document version bumps until someone
cleans up after th

Re: svn commit: r238722 - in head/lib/msun: . ld128 ld80 man src

2012-07-24 Thread David Schultz
On Tue, Jul 24, 2012, David Schultz wrote:
> That's the right file, and you can commit changes with
> 'cvs -dka...@ncvs.freebsd.org:/home/dcvs' even if you checked
> the file out from a local repo.  As a src committer, you want
> to be careful if you touch other repositories, i.e., ask a doc
> committer to review it if you're unsure.

I just remembered that the doc repo was recently switched to svn,
so ignore the first sentence.  The second sentence still applies,
and this is an example of why. :)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r238763 - head/contrib/dtc

2012-07-24 Thread Warner Losh
Author: imp
Date: Wed Jul 25 06:04:38 2012
New Revision: 238763
URL: http://svn.freebsd.org/changeset/base/238763

Log:
  Preen unused Makefiles, programs and ftdump.c which has been renamed
  to fdtdump.c in the upstream repo.  This escaped my attention in the
  import.

Deleted:
  head/contrib/dtc/Makefile.convert-dtsv0
  head/contrib/dtc/Makefile.ftdump
  head/contrib/dtc/convert-dtsv0-lexer.l
  head/contrib/dtc/ftdump.c
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"