Re: svn commit: r278889 - head/lib/libc/include

2015-02-18 Thread Bruce Evans
On Wed, 18 Feb 2015, Bryan Drewery wrote: On 2/17/2015 2:54 AM, Konstantin Belousov wrote: ... Log: Restore the extern qualifier on __cleanup. ... Modified: head/lib/libc/include/libc_private.h == ---

Re: svn commit: r278913 - in head/sys: conf modules/cxgbe/if_cxgbe modules/drm2/radeonkms modules/ibcore modules/ipoib modules/mlx4 modules/mlx4ib modules/mlxen modules/mthca ofed/drivers/net/mlx4

2015-02-17 Thread Bruce Evans
On Tue, 17 Feb 2015, Gleb Smirnoff wrote: Author: glebius Date: Tue Feb 17 19:27:14 2015 New Revision: 278913 URL: https://svnweb.freebsd.org/changeset/base/278913 Log: Globally enable -fms-extensions when building kernel with gcc, and remove this option from all modules that enable it

Re: svn commit: r278737 - head/usr.sbin/flowctl

2015-02-15 Thread Bruce Evans
On Sat, 14 Feb 2015, John-Mark Gurney wrote: Bruce Evans wrote this message on Sun, Feb 15, 2015 at 17:53 +1100: On Sat, 14 Feb 2015, Pedro Giffuni wrote: On 02/14/15 13:33, Ian Lepore wrote: On Sat, 2015-02-14 at 21:15 +0300, Gleb Smirnoff wrote: On Sat, Feb 14, 2015 at 08:46:58PM +1100

Re: svn commit: r278737 - head/usr.sbin/flowctl

2015-02-14 Thread Bruce Evans
On Sun, 15 Feb 2015, Bruce Evans wrote: On Sat, 14 Feb 2015, Pedro Giffuni wrote: _ ... BUGS The alloca() function is machine and compiler dependent; its use is dis- couraged. This became out of date with VLAs in C99. Except for scopes, compilers must have slightly more complications

Re: svn commit: r278737 - head/usr.sbin/flowctl

2015-02-14 Thread Bruce Evans
On Fri, 13 Feb 2015, Gleb Smirnoff wrote: Author: glebius Date: Fri Feb 13 23:57:20 2015 New Revision: 278737 URL: https://svnweb.freebsd.org/changeset/base/278737 Log: Use less ugly code to allocate buffer of SORCVBUF_SIZE. Less ugly, but wrong. The version that used alloca() was correct.

Re: svn commit: r278739 - head/lib/libc/regex

2015-02-14 Thread Bruce Evans
On Fri, 13 Feb 2015, Bryan Drewery wrote: On 2/13/2015 6:37 PM, Bryan Drewery wrote: On 2/13/2015 6:23 PM, Xin LI wrote: Author: delphij Date: Sat Feb 14 00:23:53 2015 New Revision: 278739 URL: https://svnweb.freebsd.org/changeset/base/278739 Log: Disallow pattern spaces which would cause

Re: svn commit: r278737 - head/usr.sbin/flowctl

2015-02-14 Thread Bruce Evans
On Sat, 14 Feb 2015, Pedro Giffuni wrote: On 02/14/15 13:33, Ian Lepore wrote: On Sat, 2015-02-14 at 21:15 +0300, Gleb Smirnoff wrote: On Sat, Feb 14, 2015 at 08:46:58PM +1100, Bruce Evans wrote: B Using VLAs and also the C99 feature of declarations anwhere, and extensions B like __aligned

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

2015-02-13 Thread Bruce Evans
On Sat, 14 Feb 2015, Bruce Evans wrote: ... However, I don't like using rlim_t for the scaled value that is not an rlimit. An incomplete fix with handling of negative values restored is something like: intmax_t targ; targ = arg; if (targ RLIM_INFINITY / 512

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

2015-02-13 Thread Bruce Evans
On Fri, 13 Feb 2015, Andrey Chernov wrote: On 13.02.2015 10:18, Bruce Evans wrote: if (arg RLIM_INFINITY) err(...); Checking for RLIM_INFINITY is wrong here, since it is ulong long max, No, it is correct. rlim_t is neither unsigned not specificially ulong long. It is int64_t

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

2015-02-13 Thread Bruce Evans
On Fri, 13 Feb 2015, Andrey Chernov wrote: We even don't need to check arg excepting for 0, because what is needed is rlimt_t and not arg. So this version will be better: rlimt_t targ; if (arg 0) { errno = EINVAL; return (-1); } This is reasonable, but not encouraged by the API or

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

2015-02-13 Thread Bruce Evans
On Fri, 13 Feb 2015, Pedro Giffuni wrote: On 02/13/15 09:29, Bruce Evans wrote: On Fri, 13 Feb 2015, Andrey Chernov wrote: We even don't need to check arg excepting for 0, because what is needed is rlimt_t and not arg. So this version will be better: rlimt_t targ; if (arg 0) { errno

Re: svn commit: r278589 - head/usr.sbin/flowctl

2015-02-12 Thread Bruce Evans
On Wed, 11 Feb 2015, Pedro F. Giffuni wrote: Log: flowctl: Replace alloca() with an array. Reviewed by: glebius Modified: head/usr.sbin/flowctl/flowctl.c Modified: head/usr.sbin/flowctl/flowctl.c == ---

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

2015-02-12 Thread Bruce Evans
On Thu, 12 Feb 2015, Bjoern A. Zeeb wrote: On 12 Feb 2015, at 22:34 , Pedro Giffuni p...@freebsd.org wrote: On 02/12/15 17:27, Bjoern A. Zeeb wrote: On 12 Feb 2015, at 21:07 , Pedro F. Giffuni p...@freebsd.org wrote: ... Log: ulimit(3): Fix broken check. ... Did this compile? Yes! Any

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

2015-02-10 Thread Bruce Evans
On Mon, 9 Feb 2015, Jung-uk Kim wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 02/09/2015 16:08, John Baldwin wrote: On Monday, February 09, 2015 09:03:24 PM John Baldwin wrote: Author: jhb Date: Mon Feb 9 21:03:23 2015 New Revision: 278474 URL:

Re: svn commit: r278431 - head/sys/contrib/vchiq/interface/vchiq_arm

2015-02-09 Thread Bruce Evans
On Mon, 9 Feb 2015, Konstantin Belousov wrote: On Mon, Feb 09, 2015 at 05:00:49PM +1100, Bruce Evans wrote: On Mon, 9 Feb 2015, Oleksandr Tymoshenko wrote: ... I think the full bugs only occur when arch has strict alignment requirements and the alignment of the __packed objects is not known

Re: svn commit: r278431 - head/sys/contrib/vchiq/interface/vchiq_arm

2015-02-08 Thread Bruce Evans
On Mon, 9 Feb 2015, Oleksandr Tymoshenko wrote: Log: Do not mark shared structures as __packed, it leads to race condition If structure packed as __packed clang (and probably gcc) generates code that loads word fields (e.g. tx_pos) byte-by-byte and if it's modified by VideoCore in the

Re: svn commit: r278154 - head/lib/msun/src

2015-02-04 Thread Bruce Evans
On Tue, 3 Feb 2015, Steve Kargl wrote: On Wed, Feb 04, 2015 at 04:37:14AM +1100, Bruce Evans wrote: On Tue, 3 Feb 2015, Steve Kargl wrote: -#include limits.h +#include float.h #include math.h +#defineFLT_LARGE FLT_MAX_EXP - FLT_MIN_EXP + FLT_MANT_DIG +... This is a lot

Re: svn commit: r278154 - head/lib/msun/src

2015-02-03 Thread Bruce Evans
On Tue, 3 Feb 2015, Pedro F. Giffuni wrote: Log: Reduce confusion in scalbnl() family of functions. The changes unrelated to the bug in r277948 made the code very difficult to understand to both coverity and regular humans so take a step back to something that is much easier to understand

Re: svn commit: r278081 - head/sbin/ifconfig

2015-02-03 Thread Bruce Evans
On Mon, 2 Feb 2015, Vsevolod Stakhov wrote: Log: Style(9) fixes. This is still a fair way from style(9) even on the changed lines. Modified: head/sbin/ifconfig/af_inet6.c == --- head/sbin/ifconfig/af_inet6.c

Re: svn commit: r278154 - head/lib/msun/src

2015-02-03 Thread Bruce Evans
On Tue, 3 Feb 2015, Pedro Giffuni wrote: On 03/02/2015 10:38 a.m., Bruce Evans wrote: Please trim quotes. [... quotes truncated] You mean, take a step backwards to something that is harder to understand. Modified: head/lib/msun/src/s_scalbln.c

Re: svn commit: r278154 - head/lib/msun/src

2015-02-03 Thread Bruce Evans
On Tue, 3 Feb 2015, Steve Kargl wrote: On Wed, Feb 04, 2015 at 02:38:40AM +1100, Bruce Evans wrote: On Tue, 3 Feb 2015, Pedro F. Giffuni wrote: Log: Reduce confusion in scalbnl() family of functions. The changes unrelated to the bug in r277948 made the code very difficult to understand

Re: svn commit: r278004 - head/sys/dev/drm2/radeon

2015-01-31 Thread Bruce Evans
On Sat, 31 Jan 2015, Dimitry Andric wrote: Log: Constify a number of accesses in drm2's radeon drivers to avoid -Wcast-qual warnings. No functional change. This is much better than using __DECONST(), but still has bogus casts. Modified: head/sys/dev/drm2/radeon/ni.c

Re: svn commit: r277898 - head/sys/fs/msdosfs

2015-01-29 Thread Bruce Evans
On Thu, 29 Jan 2015, Dimitry Andric wrote: Log: Fix a bunch of -Wcast-qual warnings in msdosfs_conv.c, by using __DECONST. No functional change. My flamethrower was not warm enough when __DECONST() was committed. I only removed (never merged) it in my version, and backed out a few early

Re: svn commit: r277903 - head/sys/libkern

2015-01-29 Thread Bruce Evans
On Thu, 29 Jan 2015, Dimitry Andric wrote: Log: Similar to r277901, fix more -Wcast-qual warnings in libkern's strtoq(), strtoul() and strtouq(), by using __DECONST. No functional change. Here the fix is no worse than the original code. Modified: head/sys/libkern/strtoq.c

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

2015-01-28 Thread Bruce Evans
On Tue, 27 Jan 2015, Pedro F. Giffuni wrote: Log: Fix resource leak and dereference after NULL. process.c: Protect access against NULL. main.c: Prevent outfile overwrite resource leak. ... Modified: head/usr.bin/sed/main.c

Re: svn commit: r277652 - in head/usr.sbin/pw: . tests

2015-01-28 Thread Bruce Evans
On Tue, 27 Jan 2015, Robert Watson wrote: On Sun, 25 Jan 2015, Bruce Evans wrote: Negative ids have historical abuses in places like mountd. mountd still hard-codes -2 and -2 for the default uid and gid of an unprivileged user. ... I'm sure it goes without saying, but for those that don't

Re: svn commit: r277764 - in head/usr.sbin/pw: . tests

2015-01-28 Thread Bruce Evans
On Mon, 26 Jan 2015, Baptiste Daroussin wrote: Log: Revert r277652 uid and gid are never and should never be negative. The pw(8) manpage clearly states the -u and -g arguments are for uids/gids, hence using negative values is abusing a bug in former versions of pw(8) Thanks. Further

Re: svn commit: r277806 - head/sys/dev/vt

2015-01-27 Thread Bruce Evans
On Tue, 27 Jan 2015, Xin LI wrote: Log: Use unsigned int for index value. Without this change a local attacker could trigger a panic by tricking the kernel into accessing undefined kernel memory. Why not fix the range check instead of using even more type hacks/errors? Modified:

Re: svn commit: r277652 - in head/usr.sbin/pw: . tests

2015-01-25 Thread Bruce Evans
On Sun, 25 Jan 2015, Slawa Olhovchenkov wrote: On Sun, Jan 25, 2015 at 04:56:24PM +1100, Bruce Evans wrote: Negative ids have historical abuses in places like mountd. mountd still hard-codes -2 and -2 for the default uid and gid of an unprivileged user. It at least casts these values

Re: svn commit: r277652 - in head/usr.sbin/pw: . tests

2015-01-24 Thread Bruce Evans
On Sat, 24 Jan 2015, Baptiste Daroussin wrote: Log: Allow negative numbers in -u and -g options This is backwards. ids and gids are non-negative integers that can be represented in the type uid_t and gid_t, respectively. All versions of POSIX require this. Old versions of POSIX allowed

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

2015-01-08 Thread Bruce Evans
On Thu, 8 Jan 2015, Konstantin Belousov wrote: On Thu, Jan 08, 2015 at 01:27:44AM +, Craig Rodrigues wrote: @@ -43,11 +43,11 @@ .Sh DESCRIPTION The .Fn sleep -function suspends execution of the calling process until either +function suspends execution of the calling thread until either

Re: svn commit: r276521 - head/contrib/netbsd-tests/lib/libm

2015-01-05 Thread Bruce Evans
On Sun, 4 Jan 2015, Garrett Cooper wrote: On Jan 2, 2015, at 0:03, Bruce Evans b...@optusnet.com.au wrote: rv = scalbnf(tests[i].inval, tests[i].exp); ATF_CHECK_EQ_MSG(errno, tests[i].error, test %zu: errno %d instead of %d, i, errno

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

2015-01-04 Thread Bruce Evans
On Sun, 4 Jan 2015, Hans Petter Selasky wrote: On 01/03/15 21:17, Bruce Evans wrote: On Sat, 3 Jan 2015, Hans Petter Selasky wrote: Log: Rework r276532 a bit. Always avoid recursing into the console drivers clients, hence they might not handle it very well. This change allows debugging

Re: svn commit: r276652 - head/sys/powerpc/include

2015-01-04 Thread Bruce Evans
On Sun, 4 Jan 2015, Justin Hibbits wrote: Log: Truncate DB_SMALL_VALUE_MAX to a much lower value. Unlike the other architectures, the PowerPC kernel is loaded under the 2GB boundary. MFC after: 2 weeks Modified: head/sys/powerpc/include/db_machdep.h Modified:

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

2015-01-03 Thread Bruce Evans
On Sat, 3 Jan 2015, Hans Petter Selasky wrote: Log: Rework r276532 a bit. Always avoid recursing into the console drivers clients, hence they might not handle it very well. This change allows debugging mutex problems with kernel console drivers when debug.witness.skipspin=0 is set in the

Re: svn commit: r276596 - in head/sys/arm: arm include

2015-01-03 Thread Bruce Evans
On Fri, 2 Jan 2015, Ian Lepore wrote: Log: Fix alignment directives in arm asm code after clang 3.5 import. The ancient gas we've been using interprets .align 0 as align to the minimum required alignment for the current section. Clang's integrated assembler interprets it as align to a

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

2015-01-03 Thread Bruce Evans
On Fri, 2 Jan 2015, Dmitry Chagin wrote: Log: Cast *path to silence clang -Wpointer-sign warning. Why not fix the bug instead of breaking the warning? (You usually do this better.) Modified: head/sys/compat/linux/linux_getcwd.c

Re: svn commit: r276521 - head/contrib/netbsd-tests/lib/libm

2015-01-02 Thread Bruce Evans
On Fri, 2 Jan 2015, Garrett Cooper wrote: Log: Reset errno in :scalbnf_val and :scalbnl_val before running the tests so the tested errno isn't stale It is a bug to even test errno. No function in libm accesses errno. This was needed in order for the test to pass on amd64 with stable/10

Re: svn commit: r275961 - head/sys/arm/conf

2014-12-21 Thread Bruce Evans
On Sun, 21 Dec 2014, Ian Lepore wrote: On Sun, 2014-12-21 at 08:07 +, Alexey Dokuchaev wrote: On Sat, Dec 20, 2014 at 06:15:24PM +, Andrew Turner wrote: Log: Clean up to use the standard style of options \t and device\t\t optionsHZ=500 # Scheduling quantum

Re: svn commit: r275241 - head/sys/boot/pc98/boot2

2014-11-29 Thread Bruce Evans
On Sat, 29 Nov 2014, Takahashi Yoshihiro wrote: Log: MFi386: r275059, r275061, r275062 and r275191 (by rdivacky) Shrink boot2 by a couple more bytes. These changes don't look too good to me. One is just a bug. Modified: head/sys/boot/pc98/boot2/boot2.c

Re: svn commit: r274489 - in head/sys/amd64: amd64 include

2014-11-23 Thread Bruce Evans
On Sun, 23 Nov 2014, David Chisnall wrote: On 21 Nov 2014, at 23:26, Scott Long scott4l...@yahoo.com wrote: That?s a good question to look further into. I didn?t see any measurable differences with this change. I think that the cost of the function call itself masks the cost of a few

Re: svn commit: r274489 - in head/sys/amd64: amd64 include

2014-11-21 Thread Bruce Evans
On Thu, 20 Nov 2014, Rui Paulo wrote: On Nov 13, 2014, at 14:11, Scott Long sco...@freebsd.org wrote: Author: scottl Date: Thu Nov 13 22:11:44 2014 New Revision: 274489 URL: https://svnweb.freebsd.org/changeset/base/274489 Log: Extend earlier addition of stack frames to most of support.S.

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

2014-11-19 Thread Bruce Evans
On Wed, 19 Nov 2014, Warner Losh wrote: Log: The number of BSD partitions is variable. Return the proper number (which is in basetable-gpt_entries). Submitted by: ae@ Modified: head/sys/geom/part/g_part_bsd.c Modified: head/sys/geom/part/g_part_bsd.c

Re: svn commit: r274340 - in head/sys: crypto/rijndael dev/random geom/bde

2014-11-13 Thread Bruce Evans
On Wed, 12 Nov 2014, [utf-8] Dag-Erling Sm??rgrav wrote: Bruce Evans b...@optusnet.com.au writes: On Tue, 11 Nov 2014, [utf-8] Dag-Erling Sm??rgrav wrote: ... but the alternative is worse. In my experience, the majority of cases where a cast discards a qualifier are bugs, with struct iov

Re: svn commit: r274340 - in head/sys: crypto/rijndael dev/random geom/bde

2014-11-11 Thread Bruce Evans
On Tue, 11 Nov 2014, [utf-8] Dag-Erling Sm??rgrav wrote: Bjoern A. Zeeb b...@freebsd.org writes: This fails to compile on all gcc platforms. cc1: warnings being treated as errors /scratch/tmp/bz/head.svn/sys/modules/geom/geom_bde/../../../crypto/rijndael/rijndael-api-fst.c: In function

Re: svn commit: r274340 - in head/sys: crypto/rijndael dev/random geom/bde

2014-11-11 Thread Bruce Evans
On Tue, 11 Nov 2014, [utf-8] Dag-Erling Sm??rgrav wrote: Bruce Evans b...@optusnet.com.au writes: -Wcast-qual is not a very good warning option since the official way to remove qualifiers in C is to cast them away. Casting them away is better than using the __DECONST() abomination

Re: svn commit: r274340 - in head/sys: crypto/rijndael dev/random geom/bde

2014-11-11 Thread Bruce Evans
On Tue, 11 Nov 2014, Brooks Davis wrote: On Tue, Nov 11, 2014 at 03:07:54PM +0100, Dag-Erling Sm?rgrav wrote: I agree that __DECONST() is ugly (not least because it strips all qualifiers, not just const, so it should be DEQUAL()), but the alternative is worse. In my experience, the majority

Re: svn commit: r274315 - in head/sys/netpfil: ipfw pf

2014-11-09 Thread Bruce Evans
On Sun, 9 Nov 2014, Konstantin Belousov wrote: On Sun, Nov 09, 2014 at 09:00:00PM +0400, Alexander V. Chernikov wrote: On 09.11.2014 20:29, Konstantin Belousov wrote: On Sun, Nov 09, 2014 at 04:15:29PM +, Alexander V. Chernikov wrote: Author: melifaro Date: Sun Nov 9 16:15:28 2014 New

Re: svn commit: r274183 - head/sys/modules/mrsas

2014-11-06 Thread Bruce Evans
On Thu, 6 Nov 2014, Warner Losh wrote: Log: clean removes @ and machine now, so no need to do it again. That is a bug in the clean target. It invalidates the pathnames in the generated .depend file. The cleandepend target still documents the care that it takes with this: cleandepend:

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

2014-11-05 Thread Bruce Evans
On Tue, 4 Nov 2014, Ian Lepore wrote: On Wed, 2014-11-05 at 07:46 +1100, Bruce Evans wrote: ... _ALIGNBYTES should probably have type u_long to begin with to reduce the magic. ... So bottom line, define _ALIGNBYTES as (8UL - 1) to minimize the magic? 8UL on 64-bit arches and 8U on 32-bit

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

2014-11-04 Thread Bruce Evans
On Tue, 4 Nov 2014, Mateusz Guzik wrote: On Tue, Nov 04, 2014 at 11:29:49AM +, Hans Petter Selasky wrote: Author: hselasky Date: Tue Nov 4 11:29:49 2014 New Revision: 274088 URL: https://svnweb.freebsd.org/changeset/base/274088 Log: Simplify logic a bit. Ensure data buffer is properly

Re: svn commit: r274086 - head/sbin/route

2014-11-04 Thread Bruce Evans
On Tue, 4 Nov 2014, David Chisnall wrote: On 4 Nov 2014, at 10:28, Stefan Farfeleder stef...@freebsd.org wrote: Shouldn't Coverity understand that err doesn't return? err() is marked as __dead2, which expands to __attribute__((__noreturn__)). If Coverity doesn't know that

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

2014-11-04 Thread Bruce Evans
On Tue, 4 Nov 2014, Brooks Davis wrote: On Tue, Nov 04, 2014 at 06:41:44AM +0100, Mateusz Guzik wrote: re-sent with trimmed cc On Mon, Nov 03, 2014 at 07:35:56PM +, Poul-Henning Kamp wrote: In message 20141104045159.e1...@besplex.bde.org, Bruce Evans writes: This optimization

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

2014-11-04 Thread Bruce Evans
On Tue, 4 Nov 2014, Ian Lepore wrote: On Wed, 2014-11-05 at 03:19 +1100, Bruce Evans wrote: [...] Another unsuitable alignment is by the MD ALIGNBYTES macro. This is (sizeof(register_t) - 1) on all arches except mips 32-bit where it is 7 sparc64 where it is 15. On arm, it is 3, but arm also

Re: svn commit: r273958 - head/sys/dev/random

2014-11-03 Thread Bruce Evans
On Mon, 3 Nov 2014, Konstantin Belousov wrote: On Mon, Nov 03, 2014 at 11:53:26AM +1100, Bruce Evans wrote: On Sun, 2 Nov 2014, Ian Lepore wrote: On Sun, 2014-11-02 at 12:27 -0800, Xin Li wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Hi, Mark, I'd like to propose the attached

Re: svn commit: r273958 - head/sys/dev/random

2014-11-03 Thread Bruce Evans
On Mon, 3 Nov 2014, Xin Li wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 11/2/14 5:13 PM, Bruce Evans wrote: % - % -KASSERT(random_adaptor != NULL, (No active random adaptor in %s, __func__)); % } % % void Lots of style bugs (long lines, use of the __func__ obfuscation

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

2014-11-03 Thread Bruce Evans
On Mon, 3 Nov 2014, Julian Elischer wrote: On 11/3/14, 3:46 PM, Mateusz Guzik wrote: Author: mjg Date: Mon Nov 3 07:46:51 2014 New Revision: 274017 URL: https://svnweb.freebsd.org/changeset/base/274017 Log: Provide an on-stack temporary buffer for small ioctl requests. I'm not sure I

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

2014-11-03 Thread Bruce Evans
On Mon, 3 Nov 2014, Konstantin Belousov wrote: On Mon, Nov 03, 2014 at 10:21:32AM +0100, Mateusz Guzik wrote: On Mon, Nov 03, 2014 at 09:29:06AM +0100, Hans Petter Selasky wrote: On 11/03/14 09:23, Julian Elischer wrote: On 11/3/14, 4:21 PM, Julian Elischer wrote: On 11/3/14, 3:46 PM,

Re: svn commit: r273958 - head/sys/dev/random

2014-11-02 Thread Bruce Evans
On Sun, 2 Nov 2014, Ian Lepore wrote: On Sun, 2014-11-02 at 12:27 -0800, Xin Li wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Hi, Mark, I'd like to propose the attached patch for review. It replaces tsleep's with sx_sleep's, then checks the return value and quit the loop. It

Re: svn commit: r273958 - head/sys/dev/random

2014-11-02 Thread Bruce Evans
On Sun, 2 Nov 2014, Xin Li wrote: Another revision to make Jilles happy -- changed 'block' to 'randrd' and 'randwr', I saw his email but forgot to make the change. % Index: sys/dev/random/random_adaptors.c % === % ---

Re: svn commit: r273865 - in head: sbin/fsck_msdosfs sys/boot/amd64/boot1.efi

2014-10-30 Thread Bruce Evans
On Thu, 30 Oct 2014, Doug Ambrisko wrote: Log: Make UEFI booting of 4Kn disks work: -convert boot1.efi to corrrectly calculate the lba for what the media reports and convert the size based on what FreeBSD uses. The existing code would use the 512 byte lba and

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

2014-10-29 Thread Bruce Evans
On Wed, 29 Oct 2014, Konstantin Belousov wrote: On Tue, Oct 28, 2014 at 04:28:37AM +1100, Bruce Evans wrote: @diff -u2 dd.c~ dd.c @--- dd.c~ Wed Apr 7 20:20:48 2004 @+++ dd.c Wed Apr 7 20:20:49 2004 @@@ -247,21 +245,18 @@ @ io-flags |= ISTRUNC; @ if (S_ISCHR

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

2014-10-28 Thread Bruce Evans
On Tue, 28 Oct 2014, [utf-8] Dag-Erling Sm??rgrav wrote: Kurt Jaeger p...@freebsd.org writes: Konstantin Belousov kostik...@gmail.com writes: On Mon, Oct 27, 2014 at 11:38:17AM +, Kurt Jaeger wrote: /scratch/tmp/kib/src/bin/dd/args.c:192: warning: format '%jd' expects type 'intmax_t',

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

2014-10-28 Thread Bruce Evans
On Tue, 28 Oct 2014, [utf-8] Dag-Erling Sm??rgrav wrote: Bruce Evans b...@optusnet.com.au writes: Dag-Erling Sm??rgrav d...@des.no writes: This is a bug on all platforms, and both clang and (recent) gcc should complain about it. That printf() call will print garbage. No, this is only a bug

Re: svn commit: r273784 - in head/sys: amd64/ia32 compat/freebsd32 i386/i386 kern net

2014-10-28 Thread Bruce Evans
On Tue, 28 Oct 2014, Konstantin Belousov wrote: Log: Replace some calls to fuword() by fueword() with proper error checking. I just noticed some more API design errors. The pointer type for new APIs should be [qualifed] wordsize_t *, not [qualified] void *. Using void * reduces type safety

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

2014-10-27 Thread Bruce Evans
On Mon, 27 Oct 2014, Konstantin Belousov wrote: On Mon, Oct 27, 2014 at 11:38:17AM +, Kurt Jaeger wrote: Log: bin/dd: Fix incorrect casting of arguments This causes non-trivial amount of errors like cc1: warnings being treated as errors /scratch/tmp/kib/src/bin/dd/args.c: In function

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

2014-10-27 Thread Bruce Evans
On Mon, 27 Oct 2014, Kurt Jaeger wrote: Log: bin/dd: Fix incorrect casting of arguments dd(1) casts many of its numeric arguments from uintmax_t to intmax_t and back again to detect whether or not the original arguments were negative. This caused wrong behaviour in some boundary cases: $

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

2014-10-27 Thread Bruce Evans
On Mon, 27 Oct 2014, Kurt Jaeger wrote: Log: bin/dd: Fix incorrect casting of arguments [...] Both of these work correctly in my version (with a relatively small patch and no breakage of other cases). (I actually typed large values as -1 and 11. -1 means

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

2014-10-27 Thread Bruce Evans
On Wed, 15 Oct 2014, Konstantin Belousov wrote: Log: Implement FIODTYPE for master ptys. Requested and reviewed by: bde Sponsored by: The FreeBSD Foundation MFC after: 1 week Thanks. This allows dd to work on ptys again. dd has the following bad code: % static void %

Re: svn commit: r273130 - head/sys/fs/deadfs

2014-10-27 Thread Bruce Evans
On Wed, 15 Oct 2014, Konstantin Belousov wrote: Log: Change the deadfs poll VOP to return POLLIN|POLLRDNORM if the caller is interested in i/o state. Return POLLNVAL for invalid bits, similar to poll_no_poll(). Note that POLLOUT must not be returned, since POLLHUP is set. Noted and

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

2014-10-21 Thread Bruce Evans
On Tue, 21 Oct 2014, David Chisnall wrote: On 19 Oct 2014, at 13:02, Andriy Gapon a...@freebsd.org wrote: I think that on platforms where an optimized version of fls() is available that would work faster than this cool piece of bit magic. Even a lightly optimized naive linear search might

Re: svn commit: r273295 - in head/sbin: ping ping6

2014-10-20 Thread Bruce Evans
On Mon, 20 Oct 2014, Hiroki Sato wrote: Thank you for your review. I fixed lines you pointed out and attached a patch candidate. I will show each change line by line in this email, too: Thanks. Bruce Evans b...@optusnet.com.au wrote in 20141020140848.d...@besplex.bde.org: br

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

2014-10-12 Thread Bruce Evans
On Sat, 11 Oct 2014, Konstantin Belousov wrote: Log: Do not set IN_ACCESS flag for read-only mounts. The IN_ACCESS survives remount in rw, also it is set for vnodes on rootfs before noatime can be set or clock is adjusted. All conditions result in wrong atime for accessed vnodes.

Re: svn commit: r272372 - stable/10/bin/rm

2014-10-04 Thread Bruce Evans
On Sat, 4 Oct 2014, Bruce Evans wrote: On Fri, 3 Oct 2014, Garrett Cooper wrote: ? as filtering out these errors would handle the case that -f should handle according to the manpage: -f Attempt to remove the files without prompting for confirmation, regardless

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

2014-10-04 Thread Bruce Evans
On Sat, 4 Oct 2014, Bjoern A. Zeeb wrote: On 04 Oct 2014, at 08:08 , Mateusz Guzik m...@freebsd.org wrote: ... Log: Plug capability races. ... This file is included from user space. There is no opt_capsicum.h there. Including an opt_* in the header file seems wrong in a lot of ways

Re: svn commit: r272372 - stable/10/bin/rm

2014-10-03 Thread Bruce Evans
On Fri, 3 Oct 2014, Garrett Cooper wrote: On Oct 2, 2014, at 16:34, Bruce Evans b...@optusnet.com.au wrote: There is still the larger problem with fts_read(). Applications like rm are specified to do a complete tree walk, with special handling for files that do not exist. If fts_read

Re: svn commit: r272372 - stable/10/bin/rm

2014-10-02 Thread Bruce Evans
On Thu, 2 Oct 2014, John Baldwin wrote: On Thursday, October 02, 2014 2:16:28 am Glen Barber wrote: On Thu, Oct 02, 2014 at 02:56:05PM +1000, Bruce Evans wrote: On Wed, 1 Oct 2014, Glen Barber wrote: Log: MFC r268376 (imp): rm -rf can fail sometimes with an error from fts_read. Make

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

2014-10-01 Thread Bruce Evans
On Wed, 1 Oct 2014, Mateusz Guzik wrote: On Wed, Oct 01, 2014 at 03:32:29PM +, Will Andrews wrote: Author: will Date: Wed Oct 1 15:32:28 2014 New Revision: 272366 URL: https://svnweb.freebsd.org/changeset/base/272366 Log: In the syncer, drop the sync mutex while patting the watchdog.

Re: svn commit: r272372 - stable/10/bin/rm

2014-10-01 Thread Bruce Evans
On Wed, 1 Oct 2014, Glen Barber wrote: Log: MFC r268376 (imp): rm -rf can fail sometimes with an error from fts_read. Make it honor fflag to ignore fts_read errors, but stop deleting from that directory because no further progress can be made. I asked for this to be backed out in

Re: svn commit: r272207 - in head/games: factor primes

2014-09-30 Thread Bruce Evans
On Mon, 29 Sep 2014, John Baldwin wrote: On Saturday, September 27, 2014 06:00:28 AM Colin Percival wrote: On 09/27/14 05:52, John Baldwin wrote: On Saturday, September 27, 2014 09:00:39 AM Colin Percival wrote: #defineBIG ULONG_MAX /* largest value will sieve */

Re: svn commit: r272281 - head/lib/libpam/modules/pam_login_access

2014-09-29 Thread Bruce Evans
On Mon, 29 Sep 2014, Bjoern A. Zeeb wrote: On 29 Sep 2014, at 11:10 , Dimitry Andric d...@freebsd.org wrote: On 29 Sep 2014, at 12:36, Bjoern A. Zeeb b...@freebsd.org wrote: ... Log: Hopefully fix build breakage with gcc passing void * instead of char * to %s format string after r272280.

Re: svn commit: r272207 - in head/games: factor primes

2014-09-27 Thread Bruce Evans
On Sat, 27 Sep 2014, Colin Percival wrote: Log: Switch primes(6) from using unsigned long to using uint64_t. This fixes 'limited range of type' warnings about comparisons on 32-bit systems, and allows 32-bit systems to compute the full range of primes. Since it no longer pretends to

Re: svn commit: r272210 - head/games/factor

2014-09-27 Thread Bruce Evans
On Sat, 27 Sep 2014, Sean Bruno wrote: Log: Update factor for changes to types in primes, which is a dependency. Fixes build-fail on mips32 introduced at 272207. Modified: head/games/factor/factor.c Modified: head/games/factor/factor.c

Re: svn commit: r272144 - head/sbin/sysctl

2014-09-25 Thread Bruce Evans
On Thu, 25 Sep 2014, Xin Li wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 09/25/14 15:40, Mateusz Guzik wrote: On Thu, Sep 25, 2014 at 10:37:28PM +, Xin LI wrote: Author: delphij Date: Thu Sep 25 22:37:27 2014 New Revision: 272144 URL:

Re: svn commit: r271771 - in head: bin/csh etc/mail lib/libc usr.bin/grep usr.sbin/mtree

2014-09-20 Thread Bruce Evans
On Sat, 20 Sep 2014, Julian Elischer wrote: On 9/18/14, 10:41 PM, Will Andrews wrote: Author: will Date: Thu Sep 18 14:41:57 2014 New Revision: 271771 URL: http://svnweb.freebsd.org/changeset/base/271771 Log: Fix incremental builds involving non-root users with read-only source files.

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

2014-09-07 Thread Bruce Evans
On Sun, 7 Sep 2014, Rui Paulo wrote: On Aug 21, 2014, at 02:01, Davide Italiano dav...@freebsd.org wrote: Author: davide Date: Thu Aug 21 09:01:42 2014 New Revision: 270261 URL: http://svnweb.freebsd.org/changeset/base/270261 Log: Revert r270227. GCC doesn't like the lack of LL suffix, so

Re: svn commit: r270850 - in head/sys: i386/i386 i386/include i386/isa x86/acpica

2014-09-05 Thread Bruce Evans
On Fri, 5 Sep 2014, John Baldwin wrote: We might also consider removing support for 486sx CPUs and requiring an on-CPU FPU for i386. If we do that we might able to use a common fpu.c which would be even nicer. You mean a common npx.c. The 'x' part of npx.c is much more descriptive now than

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

2014-08-28 Thread Bruce Evans
On Thu, 28 Aug 2014, Warner Losh wrote: Author: imp Date: Thu Aug 28 21:30:39 2014 New Revision: 270771 URL: http://svnweb.freebsd.org/changeset/base/270771 Log: Add canonical population of a disk / thumb drive from an image example. Modified: head/bin/dd/dd.1 Modified: head/bin/dd/dd.1

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

2014-08-26 Thread Bruce Evans
On Tue, 26 Aug 2014, Ed Schouten wrote: On 20 August 2014 18:32, Davide Italiano dav...@freebsd.org wrote: - _bt-frac = _ts-tv_nsec * (uint64_t)18446744073LL; + _bt-frac = _ts-tv_nsec * (uint64_t)18446744073; You could also consider using UINT64_C(18446744073); that's the C

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

2014-08-26 Thread Bruce Evans
On Tue, 26 Aug 2014, Benjamin Kaduk wrote: On Tue, Aug 26, 2014 at 9:58 AM, Bruce Evans b...@optusnet.com.au wrote: That would be a further obfuscation. The *INTnC() macros expand to integer constant expressions of the specified type suitable for use in #if preprocessing directives

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

2014-08-20 Thread Bruce Evans
On Wed, 20 Aug 2014, Xin Li wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 08/20/14 09:32, Davide Italiano wrote: Author: davide Date: Wed Aug 20 16:32:02 2014 New Revision: 270227 URL: http://svnweb.freebsd.org/changeset/base/270227 Log: Make Bruce happy removing the LL

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

2014-08-20 Thread Bruce Evans
On Thu, 21 Aug 2014, Bruce Evans wrote: On Wed, 20 Aug 2014, Xin Li wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 08/20/14 09:32, Davide Italiano wrote: Author: davide Date: Wed Aug 20 16:32:02 2014 New Revision: 270227 URL: http://svnweb.freebsd.org/changeset/base/270227 Log

Re: svn commit: r254627 - in head: bin/chflags bin/ls lib/libc/gen lib/libc/sys sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/fs/msdosfs sys/fs/smbfs sys/sys sys/ufs/ufs

2014-08-20 Thread Bruce Evans
[My mail connection wasn't working back in June when I wrote this. This is the first of many replies to try to prevent breakage of mv. I have now checked what happens for simple tests on ref11. Details in later replies.] On Sat, 28 Jun 2014, Bruce Evans wrote: On Fri, 27 Jun 2014, Kenneth D

Re: svn commit: r267977 - head/bin/mv

2014-08-20 Thread Bruce Evans
[My mail connection wasn't working back in June when I wrote this. This is the first of many replies to try to prevent breakage of mv. I have now checked what happens for simple tests on ref11. Details in later replies.] On Sat, 28 Jun 2014, Bruce Evans wrote: On Sat, 28 Jun 2014, Jilles

Re: svn commit: r268129 - head/bin/mv

2014-08-20 Thread Bruce Evans
[My mail connection wasn't working back in June when I wrote this. This is the last of many old replies to try to prevent breakage of mv. The second of the old replies was labeled as the first again. This reply adds new details] On Wed, 2 Jul 2014, Bruce Evans wrote: On Tue, 1 Jul 2014, Xin

Re: svn commit: r270035 - stable/10/lib/libc/stdio

2014-08-17 Thread Bruce Evans
On Sun, 17 Aug 2014, Pedro Giffuni wrote: On 08/17/14 13:20, Andrey Chernov wrote: On 16.08.2014 5:29, Pedro F. Giffuni wrote: Author: pfg Date: Sat Aug 16 01:29:49 2014 New Revision: 270035 URL: http://svnweb.freebsd.org/changeset/base/270035 Log: MFC r268924: Update fflush(3) to

Re: svn commit: r269474 - in head: share/man/man4 sys/dev/vt

2014-08-11 Thread Bruce Evans
On Mon, 11 Aug 2014, John Baldwin wrote: On Monday, August 04, 2014 8:03:58 pm Bruce Evans wrote: On Mon, 4 Aug 2014, John Baldwin wrote: I realize the API uses 'SPCL' as an abbreviation, but for user-facing things like a sysctl and tunable, I think it might be better to spell it out

Re: svn commit: r269741 - head/sys/boot/userboot/userboot

2014-08-08 Thread Bruce Evans
On Fri, 8 Aug 2014, Sean Bruno wrote: Log: Quiesce warning about discarding a const qualifier in assignement. This replaces an error by another error. (Non-C compilers like clang and gcc give only a warning for the first error and not even a warning for the second error when it is

Re: svn commit: r269505 - head/libexec/rtld-elf/tests/target

2014-08-04 Thread Bruce Evans
On Mon, 4 Aug 2014, Garrett Cooper wrote: Log: Move a -L argument from LDADD to LDFLAGS Phabric: D525 (part of a larger patch) Reviewed by: jmmv Approved by: jmmv (co-mentor) Modified: head/libexec/rtld-elf/tests/target/Makefile Modified: head/libexec/rtld-elf/tests/target/Makefile

Re: svn commit: r269523 - head/sys/fs/ext2fs

2014-08-04 Thread Bruce Evans
On Mon, 4 Aug 2014, Pedro F. Giffuni wrote: Log: set EXT2_LINK_MAX to LINK_MAX In linux EXT4_LINK_MAX is now 64000. We can't really do that since i_nlink and va_nlink are signed so setting higher values is likely to cause trouble. Hmm, va_nlink doesn't use nlink_t and is inconsistent

<    7   8   9   10   11   12   13   14   15   16   >