Re: svn commit: r331298 - head/sys/dev/syscons

2018-03-22 Thread Bruce Evans
On Wed, 21 Mar 2018, Warner Losh wrote: On Wed, Mar 21, 2018 at 2:27 PM, Konstantin Belousov wrote: ... Are you saying that fast interrupt handlers call shutdown_nice() ? This is the quite serious bug on its own. To fix it, shutdown_nice() should use a fast taskqueue to

Re: svn commit: r331298 - head/sys/dev/syscons

2018-03-22 Thread Bruce Evans
On Wed, 21 Mar 2018, Warner Losh wrote: On Wed, Mar 21, 2018 at 11:53 AM, Bruce Evans <b...@optusnet.com.au> wrote: On Wed, 21 Mar 2018, Warner Losh wrote: Log: Unlock giant when calling shutdown_nice() This breaks the driver. Giant is syscons' driver lock, and also the int

Re: svn commit: r331298 - head/sys/dev/syscons

2018-03-22 Thread Bruce Evans
On Wed, 21 Mar 2018, Konstantin Belousov wrote: On Thu, Mar 22, 2018 at 04:53:22AM +1100, Bruce Evans wrote: Serial console drivers with fast interrupt handlers have much more broken locking for ddb special keys. It is invalid to either drop locks or call the "any" function f

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

2018-03-21 Thread Bruce Evans
On Wed, 21 Mar 2018, Gleb Smirnoff wrote: Log: Fix sysctl types broken in r329612. This is still broken. Modified: head/sys/kern/vfs_bio.c == --- head/sys/kern/vfs_bio.c Wed Mar 21 23:17:26 2018

Re: svn commit: r331298 - head/sys/dev/syscons

2018-03-21 Thread Bruce Evans
On Thu, 22 Mar 2018, Bruce Evans wrote: On Wed, 21 Mar 2018, Warner Losh wrote: Log: Unlock giant when calling shutdown_nice() ... This breaks the driver. Giant is syscons' driver lock, and also the interrupt handler lock for at least the atkbd keyboard driver, so vt sometimes holds

Re: svn commit: r331298 - head/sys/dev/syscons

2018-03-21 Thread Bruce Evans
On Wed, 21 Mar 2018, Warner Losh wrote: Log: Unlock giant when calling shutdown_nice() This breaks the driver. Giant is syscons' driver lock, and also the interrupt handler lock for at least the atkbd keyboard driver, so vt sometimes holds the lock for. vt has to sprinkle lots of Giant

Re: svn commit: r331269 - head/share/man/man9

2018-03-20 Thread Bruce Evans
On Tue, 20 Mar 2018, Warner Losh wrote: Log: Remove reference to lint. We no longer support it, so exceptions for it are no longer relevant. ... Modified: head/share/man/man9/style.9 == --- head/share/man/man9/style.9

Re: svn commit: r331226 - in head/sys: amd64/linux amd64/linux32 i386/linux

2018-03-20 Thread Bruce Evans
On Tue, 20 Mar 2018, Ed Maste wrote: On 20 March 2018 at 04:19, Bruce Evans <b...@optusnet.com.au> wrote: It is preferable to have a well-chosen (short...) prefix. The linux emulator mostly uses l_ for internal names. That is a bit too short for external names. l_ is too short. Th

Re: svn commit: r331226 - in head/sys: amd64/linux amd64/linux32 i386/linux

2018-03-20 Thread Bruce Evans
On Mon, 19 Mar 2018, Ed Maste wrote: Log: Rename linuxulator functions with linux_ prefix It's preferable to have a consistent prefix. This also reduces differences between the three linux*_sysvec.c files. It is preferable to have a well-chosen (short...) prefix. The linux emulator

Re: svn commit: r331083 - in head: lib/libufs sbin/dump sbin/fsck_ffs sbin/fsdb sbin/newfs sbin/quotacheck sbin/restore sbin/tunefs stand/libsa sys/fs/ext2fs sys/fs/nandfs sys/ufs/ffs sys/ufs/ufs usr.

2018-03-17 Thread Bruce Evans
On Sat, 17 Mar 2018, Ed Maste wrote: Log: Prefix UFS symbols with UFS_ to reduce namespace pollution Followup to r313780. Also prefix ext2's and nandfs's versions with EXT2_ and NANDFS_. S_IFMT is already MI. So this churnge is mostly wrong unless file systems do the identity

Re: svn commit: r331063 - head/sys/arm/arm

2018-03-16 Thread Bruce Evans
On Fri, 16 Mar 2018, Ian Lepore wrote: Log: Add the header file needed for the recently-added call to pagedaemon_wakeup(). Modified: head/sys/arm/arm/pmap-v4.c Modified: head/sys/arm/arm/pmap-v4.c == ---

Re: svn commit: r330780 - in head/sys: amd64/include isa x86/isa

2018-03-12 Thread Bruce Evans
On Mon, 12 Mar 2018, Konstantin Belousov wrote: On Mon, Mar 12, 2018 at 09:34:51AM -0600, Ian Lepore wrote: On Sun, 2018-03-11 at 23:25 +0200, Konstantin Belousov wrote: On Sun, Mar 11, 2018 at 02:20:39PM -0600, Ian Lepore wrote: On Sun, 2018-03-11 at 21:58 +0200, Konstantin Belousov wrote:

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

2018-03-11 Thread Bruce Evans
On Sat, 10 Mar 2018, Ian Lepore wrote: Author: ian ... Log: Make root mount timeout logic work for filesystems other than ufs. ... These changes are based on the patch attached to the PR, but it's rewritten enough that all mistakes belong to me. PR:208882 X-MFC after:

Re: svn commit: r330722 - head/sys/conf

2018-03-09 Thread Bruce Evans
On Sat, 10 Mar 2018, Bryan Drewery wrote: Log: Reduce overhead for simple 'make -V' lookups by avoiding 'find sys/'. Setting -DNO_SKIP_MPATH can be used for debugging. Reported by: bde Thanks. Bruce ___ svn-src-head@freebsd.org mailing list

Re: svn commit: r330712 - head/bin/ps

2018-03-09 Thread Bruce Evans
On Sat, 10 Mar 2018, Mike Karels wrote: ... Log: Change ps(1) output width to unlimited if not interactive ... Modified: head/bin/ps/ps.1 == --- head/bin/ps/ps.1Fri Mar 9 23:37:19 2018(r330711) +++

Re: svn commit: r330338 - head/sys/amd64/amd64

2018-03-09 Thread Bruce Evans
On Fri, 9 Mar 2018, John Baldwin wrote: On Saturday, March 10, 2018 07:41:30 AM Bruce Evans wrote: On Fri, 9 Mar 2018, John Baldwin wrote: On Saturday, March 03, 2018 03:10:37 PM Andriy Gapon wrote: Author: avg Date: Sat Mar 3 15:10:37 2018 New Revision: 330338 URL: https

Re: svn commit: r330338 - head/sys/amd64/amd64

2018-03-09 Thread Bruce Evans
On Sat, 10 Mar 2018, Bruce Evans wrote: On Fri, 9 Mar 2018, John Baldwin wrote: I think you actually just want to replace Xfast_syscall with fast_syscall_common. Neither Xfast_syscall nor Xfast_syscall_pti call any functions before jumping to the common label, so when unwinding from

Re: svn commit: r330338 - head/sys/amd64/amd64

2018-03-09 Thread Bruce Evans
On Fri, 9 Mar 2018, John Baldwin wrote: On Saturday, March 03, 2018 03:10:37 PM Andriy Gapon wrote: Author: avg Date: Sat Mar 3 15:10:37 2018 New Revision: 330338 URL: https://svnweb.freebsd.org/changeset/base/330338 Log: db_nextframe/amd64: catch up with r328083 to recognize

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

2018-03-09 Thread Bruce Evans
On Thu, 8 Mar 2018, Conrad Meyer wrote: On Thu, Mar 8, 2018 at 8:42 PM, Bruce Evans <b...@optusnet.com.au> wrote: On Thu, 8 Mar 2018, Mark Johnston wrote: ... +++ head/sys/kern/kern_shutdown.c Thu Mar 8 17:04:36 2018 (r330663) @@ -1115,6 +1115,12 @@ dump_check_bounds(struct dump

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

2018-03-08 Thread Bruce Evans
On Thu, 8 Mar 2018, Mark Johnston wrote: Log: Return E2BIG if we run out of space writing a compressed kernel dump. E2BIG a very wrong errno. It means "Argment list too long". It is broken as designed, with "too" encrypted as "2" and no indication of what is too big. EFBIG is not so

Re: svn commit: r315480 - in head/sys: dev/syscons dev/vt kern teken

2018-03-08 Thread Bruce Evans
On Wed, 7 Mar 2018, Eitan Adler wrote: On 18 March 2017 at 04:13, Bruce Evans <b...@freebsd.org> wrote: Author: bde Date: Sat Mar 18 11:13:54 2017 New Revision: 315480 URL: https://svnweb.freebsd.org/changeset/base/315480 Log: Fix bright colors for syscons, and make them work for the

Re: svn commit: r330436 - head/bin/chflags

2018-03-07 Thread Bruce Evans
On Mon, 5 Mar 2018, Bruce Evans wrote: On Sun, 4 Mar 2018, Ian Lepore wrote: On Mon, 2018-03-05 at 01:56 +, Bryan Drewery wrote: Log: \xa0 chflags: Add -x option to not traverse mount points. Yay! \xa0One day later than I needed it, but still, yay! I recently noticed that find(1

Re: svn commit: r330602 - head/sys/compat/cloudabi

2018-03-07 Thread Bruce Evans
On Wed, 7 Mar 2018, Benjamin Kaduk wrote: On Wed, Mar 7, 2018 at 9:44 AM, Ed Maste wrote: On 7 March 2018 at 09:47, Eitan Adler wrote: ... Log: sys/cloudabi: Avoid relying on GNU specific extensions An empty initializer list is not technically

Re: svn commit: r330436 - head/bin/chflags

2018-03-04 Thread Bruce Evans
On Sun, 4 Mar 2018, Ian Lepore wrote: On Mon, 2018-03-05 at 01:56 +, Bryan Drewery wrote: Log: \xa0 chflags: Add -x option to not traverse mount points. Yay! \xa0One day later than I needed it, but still, yay! I recently noticed that find(1) needs an option to not look at mount points

Re: svn commit: r330352 - in head/sys/compat/linuxkpi/common: include/linux src

2018-03-03 Thread Bruce Evans
On Sat, 3 Mar 2018, Ian Lepore wrote: On Sat, 2018-03-03 at 22:49 +0200, Konstantin Belousov wrote: ,,, BTW mstosbt() and other functions have weird bracing in the formula. I think that the formula as calculated by the C operator precedence is fine, i.e. multiplication is done before right

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

2018-03-03 Thread Bruce Evans
On Sat, 3 Mar 2018, Konstantin Belousov wrote: On Sat, Mar 03, 2018 at 01:47:41PM +1100, Bruce Evans wrote: On Fri, 2 Mar 2018, Konstantin Belousov wrote: On Fri, Mar 02, 2018 at 12:43:34PM -0500, Pedro Giffuni wrote: ... I think use of _Nonnull attributes in the threading functions may

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

2018-03-02 Thread Bruce Evans
On Fri, 2 Mar 2018, Mateusz Guzik wrote: Log: sx: fix adaptive spinning broken in r327397 The condition was flipped. In particular heavy multithreaded kernel builds on zfs started suffering due to nested sx locks. For instance make -s -j 128 buildkernel: before: 3326.67s user 1269.62s

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

2018-03-02 Thread Bruce Evans
On Fri, 2 Mar 2018, Konstantin Belousov wrote: On Fri, Mar 02, 2018 at 12:43:34PM -0500, Pedro Giffuni wrote: ... I think use of _Nonnull attributes in the threading functions may also be a waste (I introduced them mostly to be compatible with Android). FWIW, Dragonfly sprinkled some restrict

Re: svn commit: r329859 - in head: contrib/compiler-rt/lib/builtins include stand sys/arm/include sys/arm64/include sys/mips/include sys/powerpc/include sys/riscv/include sys/sparc64/include sys/sys s

2018-02-23 Thread Bruce Evans
On Fri, 23 Feb 2018, Warner Losh wrote: On Thu, Feb 22, 2018 at 11:12 PM, Bruce Evans <b...@optusnet.com.au> wrote: On Fri, 23 Feb 2018, Warner Losh wrote: * ... Modified: head/sys/arm/include/_types.h == --

Re: svn commit: r329859 - in head: contrib/compiler-rt/lib/builtins include stand sys/arm/include sys/arm64/include sys/mips/include sys/powerpc/include sys/riscv/include sys/sparc64/include sys/sys s

2018-02-23 Thread Bruce Evans
On Fri, 23 Feb 2018, Bruce Evans wrote: On Fri, 23 Feb 2018, Warner Losh wrote: Log: Do not include float interfaces when using libsa. We don't support float in the boot loaders, so don't include interfaces for float or double in systems headers. In addition, take the unusual step

Re: svn commit: r329859 - in head: contrib/compiler-rt/lib/builtins include stand sys/arm/include sys/arm64/include sys/mips/include sys/powerpc/include sys/riscv/include sys/sparc64/include sys/sys s

2018-02-22 Thread Bruce Evans
On Fri, 23 Feb 2018, Warner Losh wrote: Log: Do not include float interfaces when using libsa. We don't support float in the boot loaders, so don't include interfaces for float or double in systems headers. In addition, take the unusual step of spiking double and float to prevent any more

Re: svn commit: r329737 - head/stand/i386/boot2

2018-02-22 Thread Bruce Evans
On Wed, 21 Feb 2018, Benno Rice wrote: On Feb 21, 2018, at 10:46 AM, Colin Percival wrote: On 02/21/18 10:10, Benno Rice wrote: Curiously, changing whitespace seems to cause the md5 of the .o files to differ these days hence the following testing strategy: Tested

Re: svn commit: r329269 - head/stand/i386/boot2

2018-02-16 Thread Bruce Evans
On Wed, 14 Feb 2018, Benno Rice wrote: Log: Reformat to come significantly closer to style(9). This gives unreadable diffs. It does more than reformatting. Bugs have been reported. They must be in the non-reformatting changes. Modified: head/stand/i386/boot2/boot2.c

Re: svn commit: r329340 - head/sys/amd64/include

2018-02-15 Thread Bruce Evans
On Thu, 15 Feb 2018, Jung-uk Kim wrote: Log: Change size of padding to reflect reality. No functional change. Discussed with:kib Modified: head/sys/amd64/include/pcpu.h Modified: head/sys/amd64/include/pcpu.h

Re: svn commit: r329296 - head/sbin/devd

2018-02-15 Thread Bruce Evans
On Wed, 14 Feb 2018, Warner Losh wrote: On Wed, Feb 14, 2018 at 8:51 PM, Eitan Adler wrote: On 14 February 2018 at 19:48, Warner Losh wrote: On Wed, Feb 14, 2018 at 8:39 PM, Warner Losh wrote: On Feb 14, 2018 8:23 PM, "Eitan Adler"

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

2018-02-13 Thread Bruce Evans
On Tue, 13 Feb 2018, Ian Lepore wrote: On Tue, 2018-02-13 at 14:43 -0500, Ed Maste wrote: On 13 February 2018 at 14:23, Ian Lepore wrote: On Tue, 2018-02-13 at 19:17 +, Ed Maste wrote: Author: emaste Date: Tue Feb 13 19:17:48 2018 New Revision: 329237 URL:

Re: svn commit: r329126 - head/etc/devd

2018-02-11 Thread Bruce Evans
On Sun, 11 Feb 2018, Warner Losh wrote: On Feb 11, 2018 7:05 PM, "Conrad Meyer" wrote: On Sun, Feb 11, 2018 at 3:46 PM, Rodney W. Grimes wrote: Moving this to /usr creates a cyclic issue in that you then need /usr to be mounted before devd

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

2018-02-11 Thread Bruce Evans
On Sun, 11 Feb 2018, Warner Losh wrote: Log: Consistent macro indentation is the hobgoblin of small minds Line up the macro definitions and names here like the machine/stdarg.h files that this replaced. This is easier to read and also makes it easier to match up with other includes. Also

Re: svn commit: r327495 - head/usr.sbin/rpcbind

2018-02-04 Thread Bruce Evans
On Sun, 4 Feb 2018, Konstantin Belousov wrote: On Sun, Feb 04, 2018 at 04:15:16PM +1100, Bruce Evans wrote: sig_atomic_t is no better than plain int. This behaviour now makes complete sense. It is just like the undefined behaviour with the ctype functions, except since we own terminate_wfd

Re: svn commit: r327495 - head/usr.sbin/rpcbind

2018-02-04 Thread Bruce Evans
On Sat, 3 Feb 2018, Conrad Meyer wrote: On Sat, Feb 3, 2018 at 6:46 AM, Bruce Evans <b...@optusnet.com.au> wrote: On Tue, 2 Jan 2018, Conrad Meyer wrote: ... Today I learned from the POSIX list that the pselect() function is designed to avoid this bug. It takes a signal mask arg

Re: svn commit: r327495 - head/usr.sbin/rpcbind

2018-02-03 Thread Bruce Evans
On Tue, 2 Jan 2018, Conrad Meyer wrote: Log: rpcbind: Fix race in signal termination I have yet to see any application that was correctly converted from using unsafe signal handlers to safe signal handlers that just set a flag. That is without even noticing this race problem before. If a

Re: svn commit: r328492 - head/contrib/opie/libopie

2018-01-27 Thread Bruce Evans
On Sat, 27 Jan 2018, Pedro Giffuni wrote: On 01/27/18 18:21, Bruce Evans wrote: On Sat, 27 Jan 2018, Dimitry Andric wrote: On 27 Jan 2018, at 23:20, Ed Schouten <e...@nuxi.nl> wrote: * [... context lost to corruption of spaces which makes it unreadable] Wait... This may

Re: svn commit: r328486 - head/usr.bin/fortune/fortune

2018-01-27 Thread Bruce Evans
On Sat, 27 Jan 2018, Ian Lepore wrote: On Sat, 2018-01-27 at 22:56 +, Conrad Meyer wrote: I don?t think dragonfly has anything to do with this???If you?re converting bool increments to setting true values in FreeBSD, use ?true.???That?s all there is to it. style(9) emphasizes internal

Re: svn commit: r328492 - head/contrib/opie/libopie

2018-01-27 Thread Bruce Evans
On Sat, 27 Jan 2018, Dimitry Andric wrote: On 27 Jan 2018, at 23:20, Ed Schouten wrote: 2018-01-27 23:16 GMT+01:00 Pedro F. Giffuni : char host[sizeof(utmp.ut_host) + 1]; insecure = 1; - strncpy(host, utmp.ut_host, sizeof(utmp.ut_host));

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

2018-01-27 Thread Bruce Evans
On Sat, 27 Jan 2018, Konstantin Belousov wrote: On Sat, Jan 27, 2018 at 03:33:52PM +, Pedro F. Giffuni wrote: Log: {ext2|ufs}_readdir: Set limit on valid ncookies values. Sanitize the values that will be assigned to ncookies so that we ensure they are sane and we can handle them.

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

2018-01-27 Thread Bruce Evans
On Fri, 26 Jan 2018, Pedro Giffuni wrote: On 01/26/18 06:36, Bruce Evans wrote: On Thu, 25 Jan 2018, Pedro Giffuni wrote: On 25/01/2018 14:24, Bruce Evans wrote: ... This code only works because (if?) nfs is the only caller and nfs never passes insane values. I am starting to think

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

2018-01-26 Thread Bruce Evans
On Thu, 25 Jan 2018, Pedro Giffuni wrote: On 25/01/2018 14:24, Bruce Evans wrote: ... This code only works because (if?) nfs is the only caller and nfs never passes insane values. I am starting to think that we should simply match uio_resid and set it to ssize_t. Returning the value

Re: svn commit: r328430 - head/sbin/devd

2018-01-26 Thread Bruce Evans
On Fri, 26 Jan 2018, Ed Schouten wrote: static void usage(void) __dead2; This should be spelled: [[noreturn]] static void usage(); That would be as silly as __dead2, and has a worse syntactic style (attributes before the return type mess up the formatting). It is obvious even to lint that

Re: svn commit: r328430 - head/sbin/devd

2018-01-26 Thread Bruce Evans
On Thu, 25 Jan 2018, Warner Losh wrote: On Thu, Jan 25, 2018 at 9:40 PM, Eitan Adler wrote: Author: eadler Date: Fri Jan 26 04:40:41 2018 New Revision: 328430 URL: https://svnweb.freebsd.org/changeset/base/328430 Log: devd: minor nits - mark usage as noreturn -

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

2018-01-25 Thread Bruce Evans
On Thu, 25 Jan 2018, Pedro Giffuni wrote: This is almost unreadable due to hard-coded UTF-8 (mostly for tabs corrupted to spaces) even in previously-literally quoted C code. On 01/25/18 11:28, Bruce Evans wrote: On Wed, 24 Jan 2018, Pedro F. Giffuni wrote: [... Most unreadable lines deleted

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

2018-01-25 Thread Bruce Evans
On Wed, 24 Jan 2018, Pedro F. Giffuni wrote: Log: ext2fs|ufs:Unsign some values related to allocation. When allocating memory through malloc(9), we always expect the amount of memory requested to be unsigned as a negative value would either stand for an error or an overflow. Unsign some

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

2018-01-25 Thread Bruce Evans
On Wed, 24 Jan 2018, Pedro F. Giffuni wrote: Log: Revert r327781, r328093, r328056: ufs|ext2fs: Revert uses of mallocarray(9). These aren't really useful: drop them. Variable unsigning will be brought again later. Variable "unsigning" (that is, adding unsign extension bugs) is even more

Re: svn commit: r328218 - in head/sys: amd64/amd64 arm/xscale/ixp425 arm64/arm64 cam cam/ctl compat/ndis dev/aacraid dev/advansys dev/ath dev/beri/virtio dev/bnxt dev/bwn dev/ciss dev/cxgbe/crypto dev

2018-01-25 Thread Bruce Evans
On Wed, 24 Jan 2018, Conrad Meyer wrote: On Wed, Jan 24, 2018 at 10:05 AM, Warner Losh wrote: ... Let's start with his point about u_long vs size_t causing problems: void*malloc(unsigned long size, struct malloc_type *type, int flags) vs void*mallocarray(size_t

Re: svn commit: r328218 - in head/sys: amd64/amd64 arm/xscale/ixp425 arm64/arm64 cam cam/ctl compat/ndis dev/aacraid dev/advansys dev/ath dev/beri/virtio dev/bnxt dev/bwn dev/ciss dev/cxgbe/crypto dev

2018-01-24 Thread Bruce Evans
On Tue, 23 Jan 2018, Pedro Giffuni wrote: On 23/01/2018 14:08, Conrad Meyer wrote: Hi Pedro, On Sun, Jan 21, 2018 at 7:42 AM, Pedro F. Giffuni wrote: Author: pfg Date: Sun Jan 21 15:42:36 2018 New Revision: 328218 URL: https://svnweb.freebsd.org/changeset/base/328218 Log:

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

2018-01-22 Thread Bruce Evans
On Sun, 21 Jan 2018, Eric van Gyzen wrote: On 01/18/2018 01:38, Wojciech Macek wrote: Author: wma Date: Thu Jan 18 07:38:54 2018 New Revision: 328110 URL: https://svnweb.freebsd.org/changeset/base/328110 Log: KDB: restart only CPUs stopped by KDB @@ -707,8 +708,9 @@ kdb_trap(int type,

Re: svn commit: r328159 - head/sys/modules

2018-01-20 Thread Bruce Evans
On Fri, 19 Jan 2018, Don Lewis wrote: On 19 Jan, Conrad Meyer wrote: On Fri, Jan 19, 2018 at 9:37 AM, Rodney W. Grimes wrote: If you think in assembler it is easy to understand why this is UB, most (all) architectures Right Logic or Arithmetic Shift only

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

2018-01-19 Thread Bruce Evans
On Fri, 19 Jan 2018, Conrad Meyer wrote: On Fri, Jan 19, 2018 at 9:04 AM, Rodney W. Grimes wrote: BUT I do not believe this bit of "style" has anything to do with readability of code, and has more to do with how code runs on a processor and stack frames. If

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

2018-01-18 Thread Bruce Evans
On Thu, 18 Jan 2018, Eric van Gyzen wrote: On 01/17/2018 16:40, Gleb Smirnoff wrote: On Fri, Dec 29, 2017 at 07:05:07PM +, Konstantin Belousov wrote: K> Author: kib K> Date: Fri Dec 29 19:05:07 2017 K> New Revision: 327354 K> URL: https://svnweb.freebsd.org/changeset/base/327354 K> K> Log:

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

2018-01-18 Thread Bruce Evans
On Thu, 18 Jan 2018, Andriy Gapon wrote: On 18/01/2018 09:38, Wojciech Macek wrote: ... Log: KDB: restart only CPUs stopped by KDB There is a case when not all CPUs went online. In that situation, restart only APs which were operational before entering KDB. What is the context here? I

Re: svn commit: r327774 - in head: . sys/i386/bios

2018-01-14 Thread Bruce Evans
On Sat, 13 Jan 2018, Warner Losh wrote: On Sat, Jan 13, 2018 at 6:17 AM, Bruce Evans <b...@optusnet.com.au> wrote: On Wed, 10 Jan 2018, Warner Losh wrote: Log: inittodr(0) actually sets the time, so there's no need to call tc_setclock(). It's redundant. Tweak UPDATING based on code

Re: svn commit: r327767 - in head/sys: conf i386/bios i386/conf i386/isa

2018-01-13 Thread Bruce Evans
On Sat, 13 Jan 2018, Warner Losh wrote: [trimmed, sorry ] Your mail client also corrupted the formatting, especially for tabs. It sends plain text with tabs corrupted to spaces and an html attachment with full-width tabs corrupted to "=C2=A0 =C2=A0 =C2=A0 =C2=A0 ", both with charset UTF-8.

Re: svn commit: r327774 - in head: . sys/i386/bios

2018-01-13 Thread Bruce Evans
On Wed, 10 Jan 2018, Warner Losh wrote: Log: inittodr(0) actually sets the time, so there's no need to call tc_setclock(). It's redundant. Tweak UPDATING based on code review of past releases. No, tc_setclock() is not redundant (except for bugs). initodr(0) sets a raw RTC time (plus a

Re: svn commit: r327767 - in head/sys: conf i386/bios i386/conf i386/isa

2018-01-13 Thread Bruce Evans
On Wed, 10 Jan 2018, Warner Losh wrote: Log: Retire pmtimer driver. Move time fixing into apm driver. Move Iwasaki-san's copyright over. Remove FIXME code that couldn't possibly work. Call tc_settime() with our estimate of the delta we've been alseep (the one we print) to adjust the time.

svn commit: r327056 - in head/sys: kern sys x86/acpica x86/x86

2017-12-21 Thread Bruce Evans
Author: bde Date: Thu Dec 21 09:17:48 2017 New Revision: 327056 URL: https://svnweb.freebsd.org/changeset/base/327056 Log: Use resume_cpus() instead of restart_cpus() to resume from ACPI suspension. restart_cpus() worked well enough by accident. Before this set of fixes, resume_cpus() used

Re: svn commit: r326758 - in head/sys/i386: conf include

2017-12-20 Thread Bruce Evans
On Wed, 20 Dec 2017, John Baldwin wrote: On Wednesday, December 20, 2017 10:16:58 AM Nathan Whitehorn wrote: ... With GCC 4, it takes a little while, but trying to build ports over NFS is a sure-fire way to bring down the kernel. I haven't tried any other compilers. Ah, I have only done

Re: svn commit: r326982 - head/share/man/man9

2017-12-19 Thread Bruce Evans
On Tue, 19 Dec 2017, Alan Cox wrote: Log: ... Reorder and revise some of the existing text. For example, more precisely describe when ordinary accesses are atomic. ... Modified: head/share/man/man9/atomic.9 == ---

Re: svn commit: r326932 - in head/sys: i386/i386 x86/acpica x86/x86

2017-12-18 Thread Bruce Evans
On Mon, 18 Dec 2017, Bruce Evans wrote: Author: bde Date: Mon Dec 18 13:53:22 2017 New Revision: 326932 URL: https://svnweb.freebsd.org/changeset/base/326932 Log: Remove the permanent double mapping of low physical memory and replace it by a transient double mapping for the one instruction

svn commit: r326933 - head/sys/i386/i386

2017-12-18 Thread Bruce Evans
Author: bde Date: Mon Dec 18 14:29:48 2017 New Revision: 326933 URL: https://svnweb.freebsd.org/changeset/base/326933 Log: Also forgotten in the previous that removed the permanent double mapping of low physical memory: Update the comment about leaving the permanent mapping in place.

svn commit: r326932 - in head/sys: i386/i386 x86/acpica x86/x86

2017-12-18 Thread Bruce Evans
Author: bde Date: Mon Dec 18 13:53:22 2017 New Revision: 326932 URL: https://svnweb.freebsd.org/changeset/base/326932 Log: Remove the permanent double mapping of low physical memory and replace it by a transient double mapping for the one instruction in ACPI wakeup where it is needed (and

svn commit: r326931 - head/sys/i386/i386

2017-12-18 Thread Bruce Evans
Author: bde Date: Mon Dec 18 11:57:05 2017 New Revision: 326931 URL: https://svnweb.freebsd.org/changeset/base/326931 Log: Fix the undersupported option KERNLOAD, part 2: fix crashes in locore when KERNLOAD is smaller than NBPDR (not the default) and PG_G is enabled (the default if the CPU

svn commit: r326929 - head/sys/i386/i386

2017-12-18 Thread Bruce Evans
Author: bde Date: Mon Dec 18 09:32:56 2017 New Revision: 326929 URL: https://svnweb.freebsd.org/changeset/base/326929 Log: Fix the undersupported option KERNLOAD, part 1: fix crashes in locore when KERNLOAD is not a multiple of NBPDR (not the default) and PSE is enabled (the default if the

svn commit: r326867 - head/sys/i386/acpica

2017-12-14 Thread Bruce Evans
Author: bde Date: Fri Dec 15 03:05:14 2017 New Revision: 326867 URL: https://svnweb.freebsd.org/changeset/base/326867 Log: Minor cleanups found while fixing a bug involving double mapping of low memory: Load the kernel eflags less magically, as in locore. The magic increased when I

Re: svn commit: r326773 - in head/sys: conf dev/syscon

2017-12-11 Thread Bruce Evans
On Mon, 11 Dec 2017, Nathan Whitehorn wrote: I think this name might confuse people looking for "syscons". Can it be renamed? Also, if it is ARM-specific, maybe it belongs in sys/arm? The wouldn't find it since it is not in any man page, GENERIC, or even in NOTES. It is not as bad as some

Re: svn commit: r326771 - head/usr.sbin/efibootmgr

2017-12-11 Thread Bruce Evans
On Mon, 11 Dec 2017, Warner Losh wrote: Log: Unbreak gcc build by using (void) for functions that take no args. You mean "Fix a bug (K function definition without even a C99 prototype) that is detected by compilers like gcc with non-broken support for the -W flag that we used to detect such

Re: svn commit: r326736 - head/usr.bin/wc

2017-12-10 Thread Bruce Evans
On Sat, 9 Dec 2017, Conrad Meyer wrote: Log: wc(1): Extend non-controversial optimizations to '-c' mode wc(1)'s slow path for counting words or multibyte characters requires conversion of the 8-bit input stream to wide characters. However, a faster path can be used for counting only lines

Re: svn commit: r326733 - head/usr.sbin/acpi/acpiconf

2017-12-09 Thread Bruce Evans
On Sat, 9 Dec 2017, Niclas Zeising wrote: Log: Improve options and error handling. Improve options handling and error out if multiple mutually exclusive options are passed to acpiconf. Switch from using atoi() to strtol() for argument parsing, and add error checking and handling, instead

Re: svn commit: r326658 - head/lib/libefivar

2017-12-07 Thread Bruce Evans
On Thu, 7 Dec 2017, Warner Losh wrote: On Thu, Dec 7, 2017 at 3:50 PM, Bruce Evans <b...@optusnet.com.au> wrote: On Thu, 7 Dec 2017, Mark Johnston wrote: Log: Ensure that "out" is initialized in all error paths. ... Modified: head/lib/libefivar/e

Re: svn commit: r326669 - head/lib/msun/man

2017-12-07 Thread Bruce Evans
On Thu, 7 Dec 2017, Dimitry Andric wrote: Log: Remove the sentence in math(3) about some long double math functions not being available. Submitted by: Steve Kargl MFC after: 3 days Modified: head/lib/msun/man/math.3 Modified: head/lib/msun/man/math.3

Re: svn commit: r326658 - head/lib/libefivar

2017-12-07 Thread Bruce Evans
On Thu, 7 Dec 2017, Mark Johnston wrote: Log: Ensure that "out" is initialized in all error paths. ... Modified: head/lib/libefivar/efivar-dp-xlate.c == --- head/lib/libefivar/efivar-dp-xlate.cThu Dec 7

svn commit: r326656 - in head/sys: amd64/amd64 arm/arm arm64/arm64 i386/i386 kern mips/mips powerpc/powerpc riscv/riscv sparc64/sparc64

2017-12-06 Thread Bruce Evans
Author: bde Date: Thu Dec 7 07:55:38 2017 New Revision: 326656 URL: https://svnweb.freebsd.org/changeset/base/326656 Log: Move instantiation of msgbufp from 9 MD files to subr_prf.c. This variable should be pure MI except possibly for reading it in MD dump routines. Its initialization

Re: svn commit: r326626 - head/lib/libproc

2017-12-06 Thread Bruce Evans
On Wed, 6 Dec 2017, Mark Johnston wrote: Log: Use a global extern declaration to appease gcc. Why not do this to fix the bug which is reported by gcc as requested by using -Wnested-externs (given by WARNS?=6 in ../Makefile.inc). clang doesn't suuport this option except in a broken way by

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

2017-12-05 Thread Bruce Evans
On Wed, 6 Dec 2017, Justin Hibbits wrote: Log: Use unsigned intptr_t type for framebuffer addresses Summary: Some architectures (powerpc Book-E) have a vm_paddr_t larger than intptr_t. Casting from the intptr_t to vm_paddr_t causes sign extension, leading to a potentially invalid address.

Re: svn commit: r326506 - in head/sys/contrib/zstd/lib: common compress

2017-12-03 Thread Bruce Evans
On Mon, 4 Dec 2017, Allan Jude wrote: Log: Use __has_builtin() to ensure clz and clzll builtins are available The existing check of the GCC version number is not sufficient It also checked a wrong version number, and still doesn't. This fixes the build on sparc64 in preparation for

Re: svn commit: r326486 - in head/stand: ofw/libofw powerpc/boot1.chrp

2017-12-03 Thread Bruce Evans
On Sun, 3 Dec 2017, Warner Losh wrote: On Sun, Dec 3, 2017 at 2:35 AM, Bruce Evans <b...@optusnet.com.au> wrote: On Sun, 3 Dec 2017, Warner Losh wrote: Log: Include machine/md_var to pick up __syncicache prototype. This is nonsense. machine/md_var.h is kernel-only, but on p

Re: svn commit: r326486 - in head/stand: ofw/libofw powerpc/boot1.chrp

2017-12-03 Thread Bruce Evans
On Sat, 2 Dec 2017, Warner Losh wrote: On Sat, Dec 2, 2017 at 7:18 PM, Eitan Adler wrote: I'd like to remove floppy drive support from FreeBSD: No thanks. - The physical media is no longer produced Old media still exists. There's still one company producing 3.5"

Re: svn commit: r326486 - in head/stand: ofw/libofw powerpc/boot1.chrp

2017-12-03 Thread Bruce Evans
On Sun, 3 Dec 2017, Warner Losh wrote: Log: Include machine/md_var to pick up __syncicache prototype. This is nonsense. machine/md_var.h is kernel-only, but on powerpc it declares __syncicache() which also exists in userland. This include is like including the kernel-only header

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

2017-12-02 Thread Bruce Evans
On Sun, 3 Dec 2017, Ed Maste wrote: Log: lib/msun: remove trailing whitespace from e_pow.c Submitted by: Steve Kargl MFC after: 1 week This undoes parts of r141296. Trailing whitespace was previously removed in r8880. This was warmly received, and r141296 backed out the change.

Re: svn commit: r326377 - in head/sys: amd64/conf arm/conf i386/conf mips/conf modules/aic7xxx/ahc modules/aic7xxx/ahd powerpc/conf sparc64/conf

2017-11-29 Thread Bruce Evans
On Wed, 29 Nov 2017, Scott Long wrote: Log: It's time to retire AHC_REG_PRETTY_PRINT and AHD_REG_PRETTY_PRINT from the standard kernels. They are still available as custom compile options. MI NOTES still gives MI sizes for these options. It seems unlikely that these sizes are still

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

2017-11-29 Thread Bruce Evans
On Wed, 29 Nov 2017, Alex Richardson wrote: Log: Don't fail the build due to clang integer constant range warnings This warning checks whether a constant is out of range of the integer type. An example is `comparison of 'u_int' > 4294967295 is always false` and in this case the warning

Re: svn commit: r326314 - in head/sys: ddb kern sys

2017-11-29 Thread Bruce Evans
On Wed, 29 Nov 2017, Alexey Dokuchaev wrote: On Wed, Nov 29, 2017 at 04:04:49AM +1100, Bruce Evans wrote: I use the following fix of disabling the spam in all cases (unless reenabled in all cases using ddb): [...] Since someone is hacking on subr_kdb.c, may I ask them to commit attached

Re: svn commit: r326342 - head/lib/libc/mips/gen

2017-11-28 Thread Bruce Evans
On Tue, 28 Nov 2017, Alex Richardson wrote: Log: Fix fabs() for MIPS when used on -0.0 Only arm and mips have this in C in libc. arm still has the broken version, libm has better versions. Only 1 in C and none in asm, where libc has many C and asm versions with at least 1 still wrong.

Re: svn commit: r326314 - in head/sys: ddb kern sys

2017-11-28 Thread Bruce Evans
On Tue, 28 Nov 2017, Edward Tomasz Napierala wrote: Log: Make kdb_reenter() silent when explicitly called from db_error(). This removes the useless backtrace on various ddb(4) user errors. Reviewed by: jhb@ Obtained from: CheriBSD MFC after: 2 weeks Sponsored by: DARPA, AFRL

Re: svn commit: r326312 - head/sys/arm64/arm64

2017-11-28 Thread Bruce Evans
On Tue, 28 Nov 2017, Andrew Turner wrote: Log: When we exit the kernel debugger having entered because of a breakpoint instruction we need to jump over the instruction. Without this we will execute the same instruction again and enter into the debugger again. PR:223917

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

2017-11-27 Thread Bruce Evans
On Sun, 26 Nov 2017, Nathan Whitehorn wrote: On 11/26/17 20:50, John Baldwin wrote: On Saturday, November 25, 2017 11:41:05 PM Nathan Whitehorn wrote: ... Modified: head/sys/kern/kern_clock.c == ---

Re: svn commit: r326225 - head/sys/arm64/arm64

2017-11-26 Thread Bruce Evans
On Sun, 26 Nov 2017, Andrew Turner wrote: Log: Make the arm64 pmap_invalidate functions static inline. This fixes building with DIAGNOSTIC. This is fairly broken on x86 too. Modified: head/sys/arm64/arm64/pmap.c

Re: svn commit: r326125 - head/usr.sbin/kgmon

2017-11-26 Thread Bruce Evans
On Sun, 26 Nov 2017, Edward Tomasz Napierala wrote: On 1124T0138, Bruce Evans wrote: On Thu, 23 Nov 2017, Edward Tomasz Napierala wrote: Log: Mark kgmon(8) obsolete, redirecting users to pmcstat(8). It isn't obsolete. pmcstat can't do at least full (non-statistical) call graphs and high

Re: svn commit: r326095 - head/usr.sbin/bsdinstall/scripts

2017-11-25 Thread Bruce Evans
On Fri, 24 Nov 2017, Ian Lepore wrote: On Fri, 2017-11-24 at 22:25 +1100, Bruce Evans wrote: On Thu, 23 Nov 2017, Devin Teske wrote: [...] ntpdate's man page claims this, but is wrong AFAIK.? It says that the functionality of ntpdate is now available in ntpd(8) using -q.? However ntpdate -q

Re: svn commit: r326073 - head/usr.bin/systat

2017-11-24 Thread Bruce Evans
On Fri, 24 Nov 2017, Konstantin Belousov wrote: On Sat, Nov 25, 2017 at 12:14:10AM +1100, Bruce Evans wrote: * ... Hmm, I couldn't find any arch with even a compile-time variable PAGE_SIZE. It is currently just unportable in theory to use hard-coded PAGE_SIZE or macros that use it. sparc64

Re: svn commit: r326073 - head/usr.bin/systat

2017-11-24 Thread Bruce Evans
On Fri, 24 Nov 2017, Konstantin Belousov wrote: On Fri, Nov 24, 2017 at 08:15:06PM +1100, Bruce Evans wrote: On Thu, 23 Nov 2017, Konstantin Belousov wrote: * ... #define pgtok(p)((uintmax_t)(p) * pageKilo) Amusingly there is already MD macro in machine/param.h with the same name

Re: svn commit: r326095 - head/usr.sbin/bsdinstall/scripts

2017-11-24 Thread Bruce Evans
On Thu, 23 Nov 2017, Devin Teske wrote: On Nov 23, 2017, at 9:29 AM, Rodney W. Grimes wrote: [ Charset UTF-8 unsupported, converting... ] On Thu, Nov 23, 2017 at 7:17 AM, Rodney W. Grimes wrote: Also we do provide an ntp.conf

<    1   2   3   4   5   6   7   8   9   10   >