Re: svn commit: r303446 - head/sys/vm

2016-07-28 Thread Bruce Evans
On Thu, 28 Jul 2016, Konstantin Belousov wrote: Log: Fix style and typo. Modified: head/sys/vm/swap_pager.c == --- head/sys/vm/swap_pager.cThu Jul 28 15:33:19 2016(r303445) +++ head/sys/vm/swap_pager.c

Re: svn commit: r303342 - in head: include lib/libc/stdlib

2016-07-26 Thread Bruce Evans
On Tue, 26 Jul 2016, Ed Schouten wrote: Log: Fix typing of srandom() and initstate(). POSIX requires that these functions have an unsigned int for their first argument; not an unsigned long. My reasoning is that we can safely change these functions without breaking the ABI. As far as I

Re: svn commit: r303225 - head/sys/dev/fb

2016-07-23 Thread Bruce Evans
On Sat, 23 Jul 2016, John Baldwin wrote: Log: Use MTX_SYSINIT for the VESA lock. I wouldn't trust this either. vesa_init_done isn't a reliable guard for the mutex init. If vesa_configure() doesn't find valid VESA info it will not set vesa_init_done, but the lock will remain

Re: svn commit: r303209 - head/sys/powerpc/booke

2016-07-22 Thread Bruce Evans
On Sat, 23 Jul 2016, Justin Hibbits wrote: Log: Use label math instead of hard-coding offsets for return addresses. Though the chances of the code in these sections changing are low, future-proof the sections and use label math. Not with numeric labels. Renumber the surrounding areas

Re: svn commit: r303188 - head/share/mk

2016-07-22 Thread Bruce Evans
On Fri, 22 Jul 2016, Ngie Cooper wrote: On Fri, Jul 22, 2016 at 2:57 PM, Bruce Evans <b...@optusnet.com.au> wrote: ... +# GCC 6.1.0 +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60100 +CWARNFLAGS+= -Wno-error=unused-const-variable= -Wno-error=nonnu

Re: svn commit: r303188 - head/share/mk

2016-07-22 Thread Bruce Evans
On Fri, 22 Jul 2016, John Baldwin wrote: On Friday, July 22, 2016 03:00:38 PM Ruslan Bukin wrote: Log: Add warn flags for GCC 6.1 compiler. Sponsored by: DARPA, AFRL Modified: head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.sys.mk

Re: svn commit: r303146 - head/usr.bin/sed

2016-07-22 Thread Bruce Evans
On Fri, 22 Jul 2016, Alexey Dokuchaev wrote: Log: sed(1): Appease older GCC. "Appease" actually seems to be the correct wording here since gcc's detection of a variable that might be used unitialized seems to report one that is not used uninitialized. Isn't it also being dictated by

Re: svn commit: r303033 - head/share/man/man7

2016-07-20 Thread Bruce Evans
On Tue, 19 Jul 2016, Warner Losh wrote: On Tue, Jul 19, 2016 at 9:01 PM, Jan Beich wrote: Ed Maste writes: +.Ss Predefined Macros +The compiler provides a number of predefined macros. +Some of these provide architecture-specific details and are

Re: svn commit: r302782 - in head/sys: dev/acpica i386/isa

2016-07-15 Thread Bruce Evans
On Fri, 15 Jul 2016, Warner Losh wrote: On Fri, Jul 15, 2016 at 9:09 AM, Bruce Evans <b...@optusnet.com.au> wrote: pmtimer is in i386's GENERIC, but this is probably not needed now I think it's time to relegate pmtimer to the apm power stuff and make sure that ACPI has the right hooks

Re: svn commit: r302782 - in head/sys: dev/acpica i386/isa

2016-07-15 Thread Bruce Evans
On Wed, 13 Jul 2016, Jung-uk Kim wrote: Log: Remove a tunable and always reset system clock while resuming with ACPI. Requested by: bde (long ago) Thanks. Modified: head/sys/dev/acpica/acpi.c head/sys/i386/isa/pmtimer.c This also prevents the reset by pmtimer if acpi is active.

Re: svn commit: r302854 - head/sys/kern

2016-07-15 Thread Bruce Evans
On Fri, 15 Jul 2016, Alexey Dokuchaev wrote: On Fri, Jul 15, 2016 at 07:19:22AM +1000, Bruce Evans wrote: On Fri, 15 Jul 2016, Bruce Evans wrote: Log: Let DDB's buf printer handle NULL pointers in the buf page array. I noticed some other bugs in this code: Oops, that was supposed

Re: svn commit: r302854 - head/sys/kern

2016-07-14 Thread Bruce Evans
On Fri, 15 Jul 2016, Bruce Evans wrote: Log: Let DDB's buf printer handle NULL pointers in the buf page array. I noticed some other bugs in this code: Oops, that was supposed to be a private reply. Bruce ___ svn-src-head@freebsd.org mailing list

Re: svn commit: r302854 - head/sys/kern

2016-07-14 Thread Bruce Evans
Log: Let DDB's buf printer handle NULL pointers in the buf page array. I noticed some other bugs in this code: Modified: head/sys/kern/vfs_bio.c == --- head/sys/kern/vfs_bio.c Thu Jul 14 17:31:29 2016

Re: svn commit: r302252 - head/sys/kern

2016-07-05 Thread Bruce Evans
On Mon, 4 Jul 2016, Adrian Chadd wrote: On 4 July 2016 at 12:28, Ed Schouten wrote: 2016-07-04 21:08 GMT+02:00 Adrian Chadd : Does the specification / implementation also mandate that the padding is zero'ed out or otherwise initialised? Only QOI and

Re: svn commit: r302328 - in head/sys: kern sys

2016-07-05 Thread Bruce Evans
On Sun, 3 Jul 2016, Konstantin Belousov wrote: This is mostly a test reply (replying to src-committers has stopped working for newer commits). Log: Provide helper macros to detect 'non-silent SBDRY' state and to calculate appropriate return value for stops. Simplify the code by using them.

Re: svn commit: r302252 - head/sys/kern

2016-07-02 Thread Bruce Evans
On Fri, 1 Jul 2016, Konstantin Belousov wrote: On Fri, Jul 01, 2016 at 08:39:48PM +1000, Bruce Evans wrote: It seems simple and clean enough, but is too much during a re freeze. I will only make some minor comments about style. Well, it is not only about style. If you have no more comments

Re: svn commit: r302252 - head/sys/kern

2016-07-01 Thread Bruce Evans
On Fri, 1 Jul 2016, Konstantin Belousov wrote: On Thu, Jun 30, 2016 at 09:01:06PM +0300, Konstantin Belousov wrote: Yes, timehands for bootimebin should be the solution, but not in the scope of this patch. I will work on this right after the current changeset lands in svn. Well, there is

Re: svn commit: r302252 - head/sys/kern

2016-06-30 Thread Bruce Evans
On Thu, 30 Jun 2016, Konstantin Belousov wrote: On Thu, Jun 30, 2016 at 05:47:39AM +1000, Bruce Evans wrote: On Wed, 29 Jun 2016, Konstantin Belousov wrote: On Wed, Jun 29, 2016 at 05:54:43PM +0300, Konstantin Belousov wrote: This is a reply to two mails in one, both for r302251 and r302252

Re: svn commit: r302252 - head/sys/kern

2016-06-29 Thread Bruce Evans
On Wed, 29 Jun 2016, Konstantin Belousov wrote: On Wed, Jun 29, 2016 at 05:54:43PM +0300, Konstantin Belousov wrote: This is a reply to two mails in one, both for r302251 and r302252 threads. Reply to your second reply. On Wed, Jun 29, 2016 at 05:58:05PM +1000, Bruce Evans wrote: On Tue

Re: svn commit: r302252 - head/sys/kern

2016-06-29 Thread Bruce Evans
On Tue, 28 Jun 2016, Konstantin Belousov wrote: Log: Currently the ntptime code and resettodr() are Giant-locked. In particular, the Giant is supposed to protect against parallel ntp_adjtime(2) invocations. But, for instance, sys_ntp_adjtime() does copyout(9) under Giant and then examines

Re: svn commit: r302251 - head/sys/kern

2016-06-29 Thread Bruce Evans
On Tue, 28 Jun 2016, Konstantin Belousov wrote: Log: Do not use Giant to prevent parallel calls to CLOCK_SETTIME(). Use private mtx in resettodr(), no implementation of CLOCK_SETTIME() is allowed to sleep. Thanks. As you know, clock locking is still quite broken. The most obvious bugs

Re: svn commit: r301932 - head/sys/dev/cxgbe/tom

2016-06-24 Thread Bruce Evans
On Wed, 15 Jun 2016, John Baldwin wrote: On Wednesday, June 15, 2016 09:08:51 PM John Baldwin wrote: Author: jhb Date: Wed Jun 15 21:08:51 2016 New Revision: 301932 URL: https://svnweb.freebsd.org/changeset/base/301932 Log: Use sbused() instead of sbspace() to avoid signed issues. This

Re: svn commit: r301071 - head/sys/sys

2016-06-02 Thread Bruce Evans
On Wed, 1 Jun 2016, Konstantin Belousov wrote: On Wed, Jun 01, 2016 at 05:44:47PM +0200, Ed Schouten wrote: ... - In our implementation, struct sigevent::sigev_notify_attributes has type "void *" instead of "pthread_attr_t *". My guess is that this was done to prevent pulling in the

Re: svn commit: r300956 - head/lib/libc/stdlib

2016-06-01 Thread Bruce Evans
On Tue, 31 May 2016, Chris Torek wrote: That was what I was complaining about. div.c is for C90 (misspelled "ANSI"). It wasn't misspelled when I wrote it. :-) The 1989 ANSI C :-) standard was formally ratified in Dec 1989, and the draft was pretty firm by the time I wrote the code

Re: svn commit: r301071 - head/sys/sys

2016-06-01 Thread Bruce Evans
On Tue, 31 May 2016, Ed Schouten wrote: Log: Improve POSIX conformance of . - This header file has always depended on pthread_t, pthread_attr_t, struct timespec, size_t and uid_t. Only as of POSIX 2008, these dependencies have been states explicitly. They should now be defined. Not

Re: svn commit: r301037 - head/sys/x86/include

2016-05-31 Thread Bruce Evans
On Tue, 31 May 2016, Ed Schouten wrote: Log: Implement _ALIGN() using internal integer types. The existing version depends on register_t and uintptr_t, which are only available when including headers such as . As this macro is used by , for example, it should be written in such a way that

Re: svn commit: r300956 - head/lib/libc/stdlib

2016-05-31 Thread Bruce Evans
On Tue, 31 May 2016, Andrey Chernov wrote: On 31.05.2016 12:58, Bruce Evans wrote: On Tue, 31 May 2016, Andrey Chernov wrote: ... You can download SPRNG library implementing all of them here: http://www.sprng.org/RNG/ For me it is overcomplicated. The general case is certainly too

Re: svn commit: r300956 - head/lib/libc/stdlib

2016-05-31 Thread Bruce Evans
On Tue, 31 May 2016, Andrey Chernov wrote: On 31.05.2016 9:48, Bruce Evans wrote: Perhaps you can find some ideas, answers and PRNG comparison in the original paper: http://www.firstpr.com.au/dsp/rand31/p1192-park.pdf The ones with Mersenne primes and tweaked Mersenne primes in the reference

Re: svn commit: r300956 - head/lib/libc/stdlib

2016-05-31 Thread Bruce Evans
On Mon, 30 May 2016, Andrey Chernov wrote: On 30.05.2016 5:17, Bruce Evans wrote: ... Even 1980's compiler technology was not far from reducing the division to a multiplication. The LCG expression would then reduce to (uintN_t)(A * x + B) where N is either 32 or 64. Perhaps N needs to be 64

Re: svn commit: r300965 - head/lib/libc/stdlib

2016-05-30 Thread Bruce Evans
On Tue, 31 May 2016, Andrey Chernov wrote: On 31.05.2016 6:42, Bruce Evans wrote: Er, I already said which types are better -- [u]int_fast32_t here. [u]int_fast32_t have _at_least_ 32 bits. int32_t in the initial PRNG can be changed since does not overflow and involve several calculations

Re: svn commit: r300965 - head/lib/libc/stdlib

2016-05-30 Thread Bruce Evans
On Mon, 30 May 2016, Andrey Chernov wrote: On 30.05.2016 6:09, Bruce Evans wrote: ... The correct fix is s/u_long/uint_fast32_t in most places and s/u_long/uint_least32_t/ in some places and then fix any missing "&"'s. The "fast" and "least" types always e

Re: svn commit: r300965 - head/lib/libc/stdlib

2016-05-29 Thread Bruce Evans
On Sun, 29 May 2016, Conrad Meyer wrote: Does clang actually generate different code with this change? It should, on exotic arches. On Sun, May 29, 2016 at 9:39 AM, Andrey A. Chernov wrote: Log: Micro optimize: C standard guarantees that right shift for unsigned value

Re: svn commit: r300956 - head/lib/libc/stdlib

2016-05-29 Thread Bruce Evans
On Sun, 29 May 2016, Andrey A. Chernov wrote: Log: 1) Unifdef USE_WEAK_SEEDING since it is too obsolete to support and makes reading hard. Good. 2) Instead of doing range transformation in each and every function here, do it single time directly in do_rand(). One "mod" operation

Re: svn commit: r300949 - head/sys/netpfil/ipfw

2016-05-29 Thread Bruce Evans
On Sun, 29 May 2016, Don Lewis wrote: Log: Cast some expressions that multiply a long long constant by a floating point constant to int64_t. This avoids the runtime conversion of the the other operand in a set of comparisons from int64_t to floating point and doing the comparisions in

Re: svn commit: r300935 - head/usr.sbin/rpc.statd

2016-05-29 Thread Bruce Evans
On Sun, 29 May 2016, Garrett Cooper wrote: Log: Mark out_of_mem(..) and usage(..) with __dead2 as they both directly call exit as a hint to static analysis tools This is bogus for usage() since it is static so only very broken static analyis tools can't see its full details. Modified:

Re: svn commit: r300718 - in head/sys: kern sys

2016-05-27 Thread Bruce Evans
On Thu, 26 May 2016, Ian Lepore wrote: On Thu, 2016-05-26 at 14:37 -0700, Gleb Smirnoff wrote: Hans, On Thu, May 26, 2016 at 08:41:55AM +, Hans Petter Selasky wrote: H> Author: hselasky H> Date: Thu May 26 08:41:55 2016 H> New Revision: 300718 H> URL:

Re: svn commit: r300557 - head/usr.sbin/apmd

2016-05-27 Thread Bruce Evans
On Thu, 26 May 2016, Jilles Tjoelker wrote: On Tue, May 24, 2016 at 08:52:32AM -0700, John Baldwin wrote: On Monday, May 23, 2016 09:24:41 PM Alan Somers wrote: On Mon, May 23, 2016 at 9:15 PM, Peter Wemm wrote: Author: peter Date: Tue May 24 03:15:46 2016 New Revision:

Re: svn commit: r300423 - in head/sys: fs/ext2fs ufs/ffs

2016-05-24 Thread Bruce Evans
On Sun, 22 May 2016, Kevin Lo wrote: Log: arc4random() returns 0 to (2**32)???1, use an alternative to initialize i_gen if it's zero rather than a divide by 2. With inputs from delphij, mckusick, rmacklem Reviewed by: mckusick ... Modified: head/sys/fs/ext2fs/ext2_alloc.c

Re: svn commit: r300377 - head/sys/compat/ndis

2016-05-21 Thread Bruce Evans
On Sun, 22 May 2016, Andrey Chernov wrote: On 22.05.2016 3:06, Bruce Evans wrote: ... FreeBSD still has the ACM version in libkern, and has a fixed copy of that in libc, with the bad old version under an ifdef. The libc version now adjusts the range from [0, 0x7fff] to 0, 0x7ffd

Re: svn commit: r300384 - head/sys/compat/ndis

2016-05-21 Thread Bruce Evans
On Sun, 22 May 2016, Pedro F. Giffuni wrote: Log: ndis(4): adjustments for our random() specific implementation. - Revert r300377: The implementation claims to return a value within the range. [1] - Adjust the value for the case of a zero seed, whihc according to standards should be

Re: svn commit: r300377 - head/sys/compat/ndis

2016-05-21 Thread Bruce Evans
On Sat, 21 May 2016, Pedro Giffuni wrote: On 05/21/16 16:55, Conrad Meyer wrote: On Sat, May 21, 2016 at 1:40 PM, Pedro Giffuni wrote: On 05/21/16 14:05, Conrad Meyer wrote: Won't this still return a negative integer in many cases? random(9) returns u_long, whereas this

Re: svn commit: r300332 - in head/sys: amd64/amd64 i386/i386

2016-05-20 Thread Bruce Evans
On Fri, 20 May 2016, Conrad Meyer wrote: On Fri, May 20, 2016 at 6:10 PM, Bruce Evans <b...@optusnet.com.au> wrote: On Fri, 20 May 2016, Conrad Meyer wrote: On Fri, May 20, 2016 at 4:02 PM, Bruce Evans <b...@optusnet.com.au> wrote: On Fri, 20 May 2016, Konstantin Belousov wrote

Re: svn commit: r300332 - in head/sys: amd64/amd64 i386/i386

2016-05-20 Thread Bruce Evans
On Fri, 20 May 2016, Conrad Meyer wrote: On Fri, May 20, 2016 at 4:02 PM, Bruce Evans <b...@optusnet.com.au> wrote: On Fri, 20 May 2016, Konstantin Belousov wrote: --- head/sys/i386/i386/sys_machdep.cFri May 20 19:46:25 2016 (r300331) +++ head/sys/i386/i386/sys_machdep.cFri May

Re: svn commit: r300332 - in head/sys: amd64/amd64 i386/i386

2016-05-20 Thread Bruce Evans
On Fri, 20 May 2016, Konstantin Belousov wrote: Log: Check for overflow and return EINVAL if detected. Backport this and r300305 to i386. PR:209661 Reported and reviewed by: cturt Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified:

Re: svn commit: r300167 - in head: contrib/bsnmp/snmpd usr.sbin/bsnmpd/bsnmpd

2016-05-18 Thread Bruce Evans
On Wed, 18 May 2016, Ian Lepore wrote: On Wed, 2016-05-18 at 22:02 +, Gleb Smirnoff wrote: Log: Revert r299830, it has couple of fatal errors. The CMSG_ family of macros take care of alignment, so we don't need r299830 at all, even if it was correct. Put NO_WCAST_ALIGN into

Re: svn commit: r300154 - head/sys/net

2016-05-18 Thread Bruce Evans
On Wed, 18 May 2016, Ian Lepore wrote: On Wed, 2016-05-18 at 17:35 +, Bjoern A. Zeeb wrote: On 18 May 2016, at 17:32 , Ian Lepore wrote: On Wed, 2016-05-18 at 10:14 -0700, Nathan Whitehorn wrote: ... It may be more complicated than that, though. armv6 can do 64-bit

Re: svn commit: r299770 - head/usr.sbin/bsnmpd/tools/libbsnmptools

2016-05-14 Thread Bruce Evans
On Sat, 14 May 2016, Garrett Cooper wrote: Log: Fix up r299764 I meant to use nitems, not sizeof(..) with the destination buffer. Using sizeof(..) on a pointer will always truncate the output in the destination buffer incorrectly Pointyhat to: ngie Er, this is pointier than before.

Re: svn commit: r299709 - head/usr.sbin/timed/timed

2016-05-13 Thread Bruce Evans
On Sat, 14 May 2016, Pedro F. Giffuni wrote: Log: timed(8): Use strlcpy() for bounds checking. Prevent some theorical buffer overruns reported by Coverity. Cleanup a use of gethostname() while here. CID: 1006713, 1011166, 1011167, 1011168, This has minor unimprovements except it

Re: svn commit: r299588 - head/usr.sbin/binmiscctl

2016-05-13 Thread Bruce Evans
On Fri, 13 May 2016, Don Lewis wrote: Log: Revert r299584: Mark usage() as __dead2 so that Coverity doesn't think that execution continues after the call and uses a negative array subscript. Requested by: bde Thanks. What was the problem that confused Coverity? This reminds me

Re: svn commit: r299584 - head/usr.sbin/binmiscctl

2016-05-12 Thread Bruce Evans
On Fri, 13 May 2016, Don Lewis wrote: Log: Mark usage() as __dead2 so that Coverity doesn't think that execution continues after the call and uses a negative array subscript. Reported by: Coverity CID: 1305629 This was just a bug in Coverity. Now it is also a style bug.

Re: svn commit: r299090 - in head: etc/mtree include lib/libbluetooth sbin/hastd share/man/man3 sys/dev/xen/blkback sys/kern sys/net sys/sys tests/sys tests/sys/sys usr.sbin/bluetooth/hccontrol

2016-05-06 Thread Bruce Evans
On Thu, 5 May 2016, Alan Somers wrote: On Thu, May 5, 2016 at 10:31 AM, John Baldwin wrote: On Wednesday, May 04, 2016 10:34:11 PM Alan Somers wrote: ... Log: Improve performance and functionality of the bitstring(3) api ... Doesn't switching from bytes to longs break

Re: svn commit: r298933 - in head: share/man/man9 sys/amd64/include sys/dev/acpica sys/dev/drm2 sys/dev/drm2/i915 sys/kern sys/sys sys/x86/acpica sys/x86/x86

2016-05-05 Thread Bruce Evans
On Wed, 4 May 2016, John Baldwin wrote: On Tuesday, May 03, 2016 11:19:44 AM John Baldwin wrote: On Wednesday, May 04, 2016 03:58:40 AM Bruce Evans wrote: BTW, I don't like select's and bitset's use of longs. Using unsigned for select is a historical mistake. Bitset apparently copied

Re: svn commit: r298933 - in head: share/man/man9 sys/amd64/include sys/dev/acpica sys/dev/drm2 sys/dev/drm2/i915 sys/kern sys/sys sys/x86/acpica sys/x86/x86

2016-05-05 Thread Bruce Evans
On Thu, 5 May 2016, Konstantin Belousov wrote: On Wed, May 04, 2016 at 09:17:50PM -0700, John Baldwin wrote: ... How about this: ... diff --git a/sys/sys/_bitset.h b/sys/sys/_bitset.h index 26a8848..89dd7b6 100644 --- a/sys/sys/_bitset.h +++ b/sys/sys/_bitset.h @@ -36,26 +36,15 @@ * Macros

Re: svn commit: r299108 - head/sys/sys

2016-05-05 Thread Bruce Evans
On Wed, 4 May 2016, John Baldwin wrote: On Thursday, May 05, 2016 02:51:31 AM Garrett Cooper wrote: Log: Revert r299096 The change broke buildworld when building lib/libkvm This change likely needs to be run through a ports -exp run as a sanity check, as it might break downstream

Re: svn commit: r299064 - head/sys/kern

2016-05-04 Thread Bruce Evans
On Wed, 4 May 2016, [UTF-8] Roger Pau Monn?? wrote: Log: rtc: fix inverted resolution check The current code in clock_register checks if the newly added clock has a resolution value higher than the current one in order to make it the default, which is wrong. Clocks with a lower resolution

Re: svn commit: r298933 - in head: share/man/man9 sys/amd64/include sys/dev/acpica sys/dev/drm2 sys/dev/drm2/i915 sys/kern sys/sys sys/x86/acpica sys/x86/x86

2016-05-03 Thread Bruce Evans
On Tue, 3 May 2016, John Baldwin wrote: On Tuesday, May 03, 2016 03:52:56 PM Bruce Evans wrote: On Mon, 2 May 2016, Pedro Giffuni wrote: ... TBH, I thought so too, but I avoided applying such changes to headers, and I haven't touched _bitset.h, _foo.h headers cannot use howmany() due

Re: svn commit: r298933 - in head: share/man/man9 sys/amd64/include sys/dev/acpica sys/dev/drm2 sys/dev/drm2/i915 sys/kern sys/sys sys/x86/acpica sys/x86/x86

2016-05-03 Thread Bruce Evans
On Mon, 2 May 2016, Pedro Giffuni wrote: On 05/02/16 15:52, John Baldwin wrote: On Monday, May 02, 2016 11:45:41 AM Ngie Cooper wrote: On May 2, 2016, at 11:00, John Baldwin wrote: Author: jhb [... excessive quoting trimmed] New Revision: 298933 URL:

Re: svn commit: r298671 - head/sys/geom/part

2016-04-27 Thread Bruce Evans
On Tue, 26 Apr 2016, Conrad E. Meyer wrote: Log: g_part_bsd64: Check for valid on-disk npartitions value This value is u32 on disk, but assigned to an int in memory. After we do the implicit conversion via assignment, check that the result is at least one[1] (non-negative[2]). 1. The

Re: svn commit: r298247 - head/sbin/fdisk_pc98

2016-04-21 Thread Bruce Evans
On Wed, 20 Apr 2016, John Baldwin wrote: On Wednesday, April 20, 2016 01:06:38 PM Bruce Evans wrote: On Wed, 20 Apr 2016, Marcelo Araujo wrote: 2016-04-20 0:16 GMT+08:00 John Baldwin <j...@freebsd.org>: On Tuesday, April 19, 2016 04:46:13 AM Marcelo Araujo wrote: Author: araujo Dat

Re: svn commit: r298247 - head/sbin/fdisk_pc98

2016-04-20 Thread Bruce Evans
On Wed, 20 Apr 2016, Conrad Meyer wrote: On Wed, Apr 20, 2016 at 7:33 AM, Pedro Giffuni wrote: One of the things I dislike is that most of the macros are in lowercase. Lowercase would make sense if these were inline functions but inline functions have disadvantages for these

Re: svn commit: r298247 - head/sbin/fdisk_pc98

2016-04-19 Thread Bruce Evans
On Wed, 20 Apr 2016, Marcelo Araujo wrote: 2016-04-20 0:16 GMT+08:00 John Baldwin : On Tuesday, April 19, 2016 04:46:13 AM Marcelo Araujo wrote: Author: araujo Date: Tue Apr 19 04:46:13 2016 New Revision: 298247 URL: https://svnweb.freebsd.org/changeset/base/298247 Log:

Re: svn commit: r297974 - in head/sys: i386/i386 i386/ibcs2 x86/x86

2016-04-15 Thread Bruce Evans
On Thu, 14 Apr 2016, Peter Wemm wrote: On Thursday, April 14, 2016 12:14:13 PM Pedro Giffuni wrote: On 04/14/16 12:04, Pedro F. Giffuni wrote: Author: pfg Date: Thu Apr 14 17:04:06 2016 New Revision: 297974 URL: https://svnweb.freebsd.org/changeset/base/297974 Log: x86: for pointers

Re: svn commit: r297954 - in head/sys: boot/efi/loader/arch/amd64 boot/i386/libi386 x86/acpica

2016-04-14 Thread Bruce Evans
On Thu, 14 Apr 2016, Warner Losh wrote: Log: Deprecate using hints.acpi.0.rsdp to communicate the RSDP to the system. This uses the hints mechnanism. This mostly works today because when there's no static hints (the default), this value can be fetched from the hint. When there is a static

Re: svn commit: r297690 - head/sys/boot/forth

2016-04-08 Thread Bruce Evans
On Thu, 7 Apr 2016, Maxim Sobolev wrote: Hi Bruce, thanks for the input! I will see if I can move that piece into loader.8 and extend it a bit from the source "documentation". Thanks. I checked what happens for space and newline as field separators. They both to work in -current. The

Re: svn commit: r297690 - head/sys/boot/forth

2016-04-07 Thread Bruce Evans
On Fri, 8 Apr 2016, Maxim Sobolev wrote: Log: Document vfs.root.mountfrom. Reviewed by: imp, wblock The format of this variable is still undocumented, except in the source code. Modified: head/sys/boot/forth/loader.conf.5

Re: svn commit: r297525 - head/sys/compat/linux

2016-04-03 Thread Bruce Evans
On Sun, 3 Apr 2016, Pedro Giffuni wrote: On 03/04/2016 14:11, Bruce Evans wrote: On Sun, 3 Apr 2016, Pedro F. Giffuni wrote: Author: pfg Log: Fix indentation oops. Modified: head/sys/compat/linux/linux_misc.c Modified: head/sys/compat/linux/linux_misc.c

Re: svn commit: r297525 - head/sys/compat/linux

2016-04-03 Thread Bruce Evans
On Sun, 3 Apr 2016, Pedro F. Giffuni wrote: Author: pfg Log: Fix indentation oops. Modified: head/sys/compat/linux/linux_misc.c Modified: head/sys/compat/linux/linux_misc.c == --- head/sys/compat/linux/linux_misc.c

Re: svn commit: r297526 - head/sys/geom/sched

2016-04-03 Thread Bruce Evans
On Sun, 3 Apr 2016, Pedro Giffuni wrote: On 04/03/16 11:58, Kevin Lo wrote: On Sun, Apr 03, 2016 at 04:25:51PM +, Pedro F. Giffuni wrote: Log: g_sched_destroy(): prevent return of uninitialized scalar variable. For the !gsp case there some chance of returning an uninitialized

Re: svn commit: r297408 - head/lib/libc/stdio

2016-03-30 Thread Bruce Evans
On Wed, 30 Mar 2016, Pedro F. Giffuni wrote: Log: freopen(3): prevent uninitialized errno. Revert r297407 and redo it cleanly. This might need a few more commits to do it correctly. Modified: head/lib/libc/stdio/freopen.c

Re: svn commit: r297039 - head/sys/x86/x86

2016-03-27 Thread Bruce Evans
On Sun, 27 Mar 2016, Poul-Henning Kamp wrote: In message <20160327130706.ga1...@kib.kiev.ua>, Konstantin Belousov writes: I haven't seen a single (hardware) system since I started measuring this 15-20 yeas ago on which the i8524 is not fed from the same clock as the TSC. A very

Re: svn commit: r297039 - head/sys/x86/x86

2016-03-27 Thread Bruce Evans
On Sun, 27 Mar 2016, Konstantin Belousov wrote: On Sun, Mar 27, 2016 at 06:49:40AM +1100, Bruce Evans wrote: On Sat, 26 Mar 2016, Konstantin Belousov wrote: On Sat, Mar 26, 2016 at 03:17:43AM +1100, Bruce Evans wrote: This uses the i8254. Well, this is the part which I do not like most

Re: svn commit: r297039 - head/sys/x86/x86

2016-03-26 Thread Bruce Evans
On Sat, 26 Mar 2016, Konstantin Belousov wrote: On Sat, Mar 26, 2016 at 03:17:43AM +1100, Bruce Evans wrote: This uses the i8254. Well, this is the part which I do not like most. It is ridiculous to calibrate relatively high-quality CPU oscillator with 8245 timer, which often fed from

Re: svn commit: r297190 - head/sys/kern

2016-03-25 Thread Bruce Evans
On Fri, 25 Mar 2016, Edward Tomasz [utf-8] Napiera?~Ba wrote: On 0325T0809, Bruce Evans wrote: On Thu, 24 Mar 2016, Edward Tomasz [utf-8] Napiera?~Ba wrote: On 0324T1015, Warner Losh wrote: On Thu, Mar 24, 2016 at 9:46 AM, Ian Lepore <i...@freebsd.org> wrote: On Thu, 2016-03-24 at

Re: svn commit: r297039 - head/sys/x86/x86

2016-03-25 Thread Bruce Evans
On Fri, 25 Mar 2016, Konstantin Belousov wrote: On Fri, Mar 25, 2016 at 07:13:54AM +1100, Bruce Evans wrote: On Thu, 24 Mar 2016, Konstantin Belousov wrote: [Skipped lock adaptive spinning text for now]. My systems allow speed variations of about 4000:800 = 5:1 for one CPU and about 50:1

Re: svn commit: r297190 - head/sys/kern

2016-03-24 Thread Bruce Evans
On Thu, 24 Mar 2016, Edward Tomasz [utf-8] Napiera?~Ba wrote: On 0324T1015, Warner Losh wrote: On Thu, Mar 24, 2016 at 9:46 AM, Ian Lepore wrote: On Thu, 2016-03-24 at 16:01 +0100, Edward Tomasz Napiera??a wrote: On 0324T1609, Alexander Motin wrote: On 24.03.16 15:42,

Re: svn commit: r297039 - head/sys/x86/x86

2016-03-24 Thread Bruce Evans
On Thu, 24 Mar 2016, Konstantin Belousov wrote: On Fri, Mar 25, 2016 at 01:57:32AM +1100, Bruce Evans wrote: In fact, if we can use TSC with the only requirement of being monotonic, I do not see why do we need TSC at all. We can return to pre-r278325 loop, but calibrate the number of loop

Re: svn commit: r297039 - head/sys/x86/x86

2016-03-24 Thread Bruce Evans
On Thu, 24 Mar 2016, Konstantin Belousov wrote: On Wed, Mar 23, 2016 at 02:21:59PM -0700, John Baldwin wrote: As you noted, the issue is if a timecounter needs locks (e.g. i8254) though outside of that I think the patch is great. :-/ Of course, if the TSC isn't advertised as invariant,

Re: svn commit: r297039 - head/sys/x86/x86

2016-03-23 Thread Bruce Evans
On Wed, 23 Mar 2016, John Baldwin wrote: On Wednesday, March 23, 2016 09:58:42 AM Konstantin Belousov wrote: On Mon, Mar 21, 2016 at 11:12:57AM -0700, John Baldwin wrote: On Saturday, March 19, 2016 05:22:16 AM Konstantin Belousov wrote: On Fri, Mar 18, 2016 at 07:48:49PM +, John Baldwin

Re: svn commit: r297201 - in head: share/man/man4 sys/dev/filemon

2016-03-23 Thread Bruce Evans
On Wed, 23 Mar 2016, Rick Macklem wrote: Benjamin Kaduk wrote: On Tue, Mar 22, 2016 at 9:11 PM, Bryan Drewery wrote: The manpage for close(2) does document some errors, one being ENOSPC. The close(2) behavior of returning write(2), really VOP_WRITE(9), errors though

Re: svn commit: r296543 - head/sys/compat/linux

2016-03-20 Thread Bruce Evans
On Sun, 20 Mar 2016, Chagin Dmitry wrote: On Wed, Mar 09, 2016 at 07:16:27PM +1100, Bruce Evans wrote: On Tue, 8 Mar 2016, Dmitry Chagin wrote: Log: Put a commit message from r296502 about Linux alarm() system call behaviour to the source. ... Modified: head/sys/compat/linux/linux_misc.c

Re: svn commit: r296868 - head/sys/sys

2016-03-15 Thread Bruce Evans
On Tue, 15 Mar 2016, Hans Petter Selasky wrote: On 03/14/16 21:33, Gleb Smirnoff wrote: On Mon, Mar 14, 2016 at 02:31:37PM -0400, Ryan Stone wrote: R> On Mon, Mar 14, 2016 at 2:07 PM, Gleb Smirnoff wrote: R> R> > Remove useless cast in SYSCTL_ADD_COUNTER_U64 macro.

Re: svn commit: r296543 - head/sys/compat/linux

2016-03-09 Thread Bruce Evans
On Tue, 8 Mar 2016, Dmitry Chagin wrote: Log: Put a commit message from r296502 about Linux alarm() system call behaviour to the source. ... Modified: head/sys/compat/linux/linux_misc.c == ---

Re: svn commit: r296336 - in head/sys: dev/bhnd dev/pccard dev/pci isa kern sys x86/xen

2016-03-03 Thread Bruce Evans
On Thu, 3 Mar 2016, Justin Hibbits wrote: On Thu, Mar 3, 2016 at 12:18 AM, Bruce Evans <b...@optusnet.com.au> wrote: On Thu, 3 Mar 2016, Justin Hibbits wrote: Log: Replace all resource occurrences of '0UL/~0UL' with '0/~0'. Summary: The idea behind this is '~0ul' is well-d

Re: svn commit: r296336 - in head/sys: dev/bhnd dev/pccard dev/pci isa kern sys x86/xen

2016-03-02 Thread Bruce Evans
On Thu, 3 Mar 2016, Justin Hibbits wrote: Log: Replace all resource occurrences of '0UL/~0UL' with '0/~0'. Summary: The idea behind this is '~0ul' is well-defined, and casting to uintmax_t, on a 32-bit platform, will leave the upper 32 bits as 0. The maximum range of a resource is

Re: svn commit: r296109 - head/libexec/rlogind

2016-02-27 Thread Bruce Evans
On Sat, 27 Feb 2016, Jilles Tjoelker wrote: On Sat, Feb 27, 2016 at 09:48:05AM -0500, Pedro Giffuni wrote: In the case of rlogind, note that the above limitation [FD_SETSIZE] has disappeared by using poll(2). I will add that FreeBSD has a native poll(2) implementation, it is not a wrapper

Re: svn commit: r295854 - head/bin/dd

2016-02-21 Thread Bruce Evans
On Sun, 21 Feb 2016, Edward Tomasz Napierala wrote: Log: Make the "invalid numeric value" error message actually displayable (was a dead code before). Submitted by: bde@ (earlier version) Reviewed by: bde@ Thanks. Modified: head/bin/dd/args.c Modified: head/bin/dd/args.c

Re: svn commit: r295864 - head/sys/kern

2016-02-21 Thread Bruce Evans
On Sun, 21 Feb 2016, Ian Lepore wrote: Log: Allow a dynamic env to override a compiled-in static env by passing in the override indication in the env data. Submitted by: bde Thanks. Bruce ___ svn-src-head@freebsd.org mailing list

Re: svn commit: r295833 - head/sys/sys

2016-02-19 Thread Bruce Evans
On Sat, 20 Feb 2016, Justin Hibbits wrote: Log: Fix the definition of RM_MAX_END. Even though casting from signed to unsigned is well-defined in C, it's better to first cast to the larger unsigned type, then negate. Casting ~0 is well-defined, but ~0 isn't. The operation is

Re: svn commit: r295768 - head/usr.sbin/iostat

2016-02-19 Thread Bruce Evans
On Sat, 20 Feb 2016, Dimitry Andric wrote: On 19 Feb 2016, at 16:49, Alan Somers wrote: On Fri, Feb 19, 2016 at 5:24 AM, Sergey Kandaurov wrote: ... -struct nlist namelist[] = { +static struct nlist namelist[] = { #define X_TTY_NIN 0 - {

Re: svn commit: r295768 - head/usr.sbin/iostat

2016-02-19 Thread Bruce Evans
On Fri, 19 Feb 2016, Benjamin Kaduk wrote: On Fri, Feb 19, 2016 at 5:06 PM, Gleb Smirnoff wrote: On Fri, Feb 19, 2016 at 08:49:43AM -0700, Alan Somers wrote: A> On Fri, Feb 19, 2016 at 5:24 AM, Sergey Kandaurov wrote: A> Yeah, it was being implicitly

Re: svn commit: r295557 - head/sys/dev/uart

2016-02-15 Thread Bruce Evans
On Mon, 15 Feb 2016, Ian Lepore wrote: On Tue, 2016-02-16 at 11:01 +1100, Bruce Evans wrote: On Mon, 15 Feb 2016, Ian Lepore wrote: On Tue, 2016-02-16 at 09:28 +1100, Bruce Evans wrote: On Mon, 15 Feb 2016, Michal Meloun wrote: [...] Please note that ARM architecture does not have

Re: svn commit: r295557 - head/sys/dev/uart

2016-02-15 Thread Bruce Evans
On Mon, 15 Feb 2016, Ian Lepore wrote: On Tue, 2016-02-16 at 09:28 +1100, Bruce Evans wrote: On Mon, 15 Feb 2016, Michal Meloun wrote: [...] Please note that ARM architecture does not have vectored interrupts, CPU must read actual interrupt source from external interrupt controller (GIC

Re: svn commit: r295557 - head/sys/dev/uart

2016-02-15 Thread Bruce Evans
On Mon, 15 Feb 2016, Michal Meloun wrote: Dne 13.02.2016 v 1:58 Marius Strobl napsal(a): On Sat, Feb 13, 2016 at 06:53:25AM +1100, Bruce Evans wrote: On Fri, 12 Feb 2016, Marius Strobl wrote: On Fri, Feb 12, 2016 at 05:14:58AM +, Michal Meloun wrote: Author: mmel Date: Fri Feb 12 05:14

Re: svn commit: r295631 - head/lib/libc/stdio

2016-02-15 Thread Bruce Evans
On Mon, 15 Feb 2016, Pedro F. Giffuni wrote: Log: fputs: Return the number of bytes written. POSIX.1-2008 requires that successful completion simply return a non-negative integer. We have regularly returned a constant value. Another, equally valid, implementation convention implies

Re: svn commit: r295561 - in head: include sys/mips/include sys/powerpc/include sys/sparc64/include sys/sys sys/x86/include

2016-02-13 Thread Bruce Evans
On Sat, 13 Feb 2016, Konstantin Belousov wrote: On Sat, Feb 13, 2016 at 07:29:48AM +1100, Bruce Evans wrote: It needs a version number to be correct. Plain __POSIX_VISIBLE means all versions. __POSIX_VISBLE >= 200112 is probably good enough for the POSIX part. I don't know the corr

Re: svn commit: r295561 - in head: include sys/mips/include sys/powerpc/include sys/sparc64/include sys/sys sys/x86/include

2016-02-13 Thread Bruce Evans
On Sat, 13 Feb 2016, Konstantin Belousov wrote: On Sun, Feb 14, 2016 at 04:02:05AM +1100, Bruce Evans wrote: The old visibility bugs with mc_* should be fixed someday. I said that uc_* could be used. _mc_* should have been used originally. Maybe we can just change to either of these, since

Re: svn commit: r295561 - in head: include sys/mips/include sys/powerpc/include sys/sparc64/include sys/sys sys/x86/include

2016-02-12 Thread Bruce Evans
On Fri, 12 Feb 2016, Konstantin Belousov wrote: Log: POSIX states that #include shall make both mcontext_t and ucontext_t available. Our code even has XXX comment about this. Only newer versions of POSIX have this bug. In the 2001 version, the bug was limited to the XSI section. was

Re: svn commit: r295561 - in head: include sys/mips/include sys/powerpc/include sys/sparc64/include sys/sys sys/x86/include

2016-02-12 Thread Bruce Evans
On Fri, 12 Feb 2016, Konstantin Belousov wrote: On Fri, Feb 12, 2016 at 01:22:04PM +, Ruslan Bukin wrote: On RISC-V it fails with __uint128_t: struct fpregs { __uint128_t fp_x[32]; how to fix? You did not copied the error. If my guess is correct, the issue is that

Re: svn commit: r295561 - in head: include sys/mips/include sys/powerpc/include sys/sparc64/include sys/sys sys/x86/include

2016-02-12 Thread Bruce Evans
On Fri, 12 Feb 2016, Ruslan Bukin wrote: On RISC-V it fails with __uint128_t: struct fpregs { __uint128_t fp_x[32]; how to fix? This seems to be an old bug. __uint128_t shouldn't be used unless it is supported by . In old versions of FreeBSD, I used something like

Re: svn commit: r295561 - in head: include sys/mips/include sys/powerpc/include sys/sparc64/include sys/sys sys/x86/include

2016-02-12 Thread Bruce Evans
On Fri, 12 Feb 2016, Konstantin Belousov wrote: On Sat, Feb 13, 2016 at 01:08:55AM +1100, Bruce Evans wrote: On Fri, 12 Feb 2016, Konstantin Belousov wrote: ... Modified: head/include/signal.h == --- head/include

<    4   5   6   7   8   9   10   11   12   13   >