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

2018-05-16 Thread Bruce Evans
On Wed, 16 May 2018, [UTF-8] Jean-S??bastien P??dron wrote: Author: dumbbell Date: Wed May 16 09:01:02 2018 New Revision: 333669 URL: https://svnweb.freebsd.org/changeset/base/333669 Log: teken, vt(4): New callbacks to lock the terminal once ... to process input, instead of inside each small

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

2018-05-16 Thread Bruce Evans
On Wed, 16 May 2018, Bruce Evans wrote: On Wed, 16 May 2018, [UTF-8] Jean-S??bastien P??dron wrote: Author: dumbbell Date: Wed May 16 09:01:02 2018 New Revision: 333669 URL: https://svnweb.freebsd.org/changeset/base/333669 Log: teken, vt(4): New callbacks to lock the terminal once ... to

Re: svn commit: r333945 - head/usr.bin/top

2018-05-20 Thread Bruce Evans
On Sun, 20 May 2018, Eitan Adler wrote: Log: top(1): set max username length based on system constant This changes previous behavior of calculating it at startup based on the current max username length. This is done because: - it is in theory possible for the max length to change at run-

Re: svn commit: r333995 - head/sys/teken

2018-05-21 Thread Bruce Evans
On Mon, 21 May 2018, [UTF-8] Jean-S??bastien P??dron wrote: Log: teken: Rename the "Set Cursor Style" sequence to match vt100.net docs This fixes inconsistencies with the rest of the `sequences` file. No functional changes. Requested by: ed Modified: head/sys/teken/sequences ===

Re: svn commit: r334171 - head

2018-05-24 Thread Bruce Evans
On Thu, 24 May 2018, Ed Maste wrote: Log: UPDATING: remove EOL whitespace in 20180523 entry This file has many other formatting errors. There are 2 more on just the line changed by this commit, and 1 of these is another implementation of EOL whitespace. Modified: head/UPDATING

Re: svn commit: r333945 - head/usr.bin/top

2018-05-26 Thread Bruce Evans
On Fri, 25 May 2018, Eitan Adler wrote: On 20 May 2018 at 23:39, Alexey Dokuchaev wrote: On Mon, May 21, 2018 at 10:32:30AM +1000, Bruce Evans wrote: ... if (smpmode && namelength > SMPUNAMELEN) namelength = SMPUNAMELEN; else if (namelength > UPUNAMELEN

Re: svn commit: r334275 - head/lib/libc/string

2018-05-28 Thread Bruce Evans
On Mon, 28 May 2018, Marcelo Araujo wrote: Log: Update strsep(3) EXAMPLE section regards the usage of assert(3). As many people has pointed out, using assert(3) shall be not the best approach to verify if strdup(3) has allocated memory to string. Reviewed by: imp Modified: head/lib/li

Re: svn commit: r334291 - head/lib/libc/string

2018-05-28 Thread Bruce Evans
On Mon, 28 May 2018, Ed Maste wrote: Log: strsep.3: don't silently ignore errors Reported by: bde MFC with: r334275 Thanks. Modified: head/lib/libc/string/strsep.3 == --- head/lib/libc/string/strsep.3

Re: svn commit: r334302 - head/sys/teken

2018-05-28 Thread Bruce Evans
On Mon, 28 May 2018, [UTF-8] Jean-S??bastien P??dron wrote: Log: teken: Sort DECSCUSR alphabetically While here, align columns again. Reported by: bde This unimproves the formatting of 73 lines to improve it for 1. The number of lines with msialigned columns remains unchanged at 1, sin

Re: svn commit: r334306 - in head: lib/libc/stdlib share/man/man3

2018-05-28 Thread Bruce Evans
On Tue, 29 May 2018, Eric van Gyzen wrote: Log: Cross-reference abort2(2) from a few man pages I didn't know abort2 existed until it was mentioned on a mailing list. Mention it in related pages so others can find it easily. MFC after: 3 days Sponsored by: Dell EMC Modified: head/li

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

2018-05-31 Thread Bruce Evans
On Thu, 31 May 2018, Mateusz Guzik wrote: Log: amd64: switch pagecopy from non-temporal stores to rep movsq As for pagezero, this pessimizes for machines with slow movsq and/or caches (mostly older machines). The copied data is accessed in part soon after and it results with additional ca

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

2018-05-31 Thread Bruce Evans
On Thu, 31 May 2018, Mateusz Guzik wrote: On Thu, May 31, 2018 at 09:19:58PM +1000, Bruce Evans wrote: On Thu, 31 May 2018, Mateusz Guzik wrote: Log: amd64: switch pagecopy from non-temporal stores to rep movsq As for pagezero, this pessimizes for machines with slow movsq and/or caches

svn commit: r334520 - in head/sys: amd64/amd64 i386/i386 i386/include libkern

2018-06-01 Thread Bruce Evans
Author: bde Date: Sat Jun 2 04:25:09 2018 New Revision: 334520 URL: https://svnweb.freebsd.org/changeset/base/334520 Log: Fix recent breakages of kernel profiling, mostly on i386 (high resolution kernel profiling remains broken). memmove() was broken using ALTENTRY(). ALTENTRY() is only

svn commit: r334522 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include

2018-06-01 Thread Bruce Evans
Author: bde Date: Sat Jun 2 05:48:44 2018 New Revision: 334522 URL: https://svnweb.freebsd.org/changeset/base/334522 Log: Fix high resolution kernel profiling just enough to not crash at boot time, especially for SMP. If configured, it turns itself on at boot time for calibration, so is fr

svn commit: r334523 - in head/sys: amd64/conf conf i386/conf

2018-06-01 Thread Bruce Evans
Author: bde Date: Sat Jun 2 06:40:15 2018 New Revision: 334523 URL: https://svnweb.freebsd.org/changeset/base/334523 Log: Finish COMPAT_AOUT support for amd64. It wasn't in any amd64 or MI file in /sys/conf, so was unavailable in configurations that don't use modules, and was not testable

svn commit: r334526 - head/sys/dev/syscons

2018-06-02 Thread Bruce Evans
Author: bde Date: Sat Jun 2 08:38:59 2018 New Revision: 334526 URL: https://svnweb.freebsd.org/changeset/base/334526 Log: Fix low-level locking during panics. The SCHEDULER_STOPPED() hack breaks locking generally, and mtx_trylock_*() especially. When mtx_trylock_*() returns nonzero, n

svn commit: r334528 - head/sys/i386/include

2018-06-02 Thread Bruce Evans
Author: bde Date: Sat Jun 2 09:59:27 2018 New Revision: 334528 URL: https://svnweb.freebsd.org/changeset/base/334528 Log: Oops, the last minute reduction in the clobber list for i386 MCOUNT_OVERHEAD() in r334522 was too agressive. Only mcount exit preserves %eax and %edx. Modified: head

svn commit: r334529 - head/sys/dev/syscons

2018-06-02 Thread Bruce Evans
Author: bde Date: Sat Jun 2 10:36:30 2018 New Revision: 334529 URL: https://svnweb.freebsd.org/changeset/base/334529 Log: Use per-CPU attributes earlier. The per-CPU ts is not initialized early, so the global kernel ts is used early, but it ony has 1 (normal) attribute. Switch this to t

svn commit: r334530 - in head: share/man/man4 sys/conf sys/dev/syscons

2018-06-02 Thread Bruce Evans
Author: bde Date: Sat Jun 2 14:07:27 2018 New Revision: 334530 URL: https://svnweb.freebsd.org/changeset/base/334530 Log: Improve defaults for per-CPU kernel console colors, especially with 2 or 4 CPUs. Add a compile-time option SC_KERNEL_CONS_ATTRS to control the defaults. Default to

Re: svn commit: r334604 - head/usr.bin/top

2018-06-04 Thread Bruce Evans
On Mon, 4 Jun 2018, Ian Lepore wrote: On Mon, 2018-06-04 at 05:27 +, Eitan Adler wrote: ... Log: \xa0 top(1): some nitpicks \xa0\xa0 \xa0 - prefer fully spelled names to "u_long" Why? I though we preferred the u_char, u_int, u_long spellings in BSD code? (I certainly prefer them, and I th

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

2018-06-05 Thread Bruce Evans
On Tue, 5 Jun 2018, Eric van Gyzen wrote: On 06/05/2018 15:53, Ian Lepore wrote: On Tue, 2018-06-05 at 20:34 +, Eric van Gyzen wrote: Author: vangyzen Date: Tue Jun\xc2\xa0\xc2\xa05 20:34:11 2018 New Revision: 334669 URL: https://svnweb.freebsd.org/changeset/base/334669 Log: \xc2\xa0 Make

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

2018-06-06 Thread Bruce Evans
On Wed, 6 Jun 2018, Benjamin Kaduk wrote: On Wed, Jun 6, 2018 at 6:35 AM, Ravi Pokala wrote: Hi Mateusz, ... ... #ifdef _KERNEL #define malloc(size, type, flags) ({ \ Now that I'm taking another look at this, I'm confused as to why the entire macro expansion is inside parenthe

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

2018-06-10 Thread Bruce Evans
Author: bde Date: Sun Jun 10 14:21:01 2018 New Revision: 334924 URL: https://svnweb.freebsd.org/changeset/base/334924 Log: Fix panics in potentially all x86bios calls on i386 since r332489. A call to npxsave() in the exception trampolines was not relocated. This call to a garbage address

svn commit: r334925 - in head/sys: amd64/amd64 x86/x86

2018-06-10 Thread Bruce Evans
Author: bde Date: Sun Jun 10 14:49:13 2018 New Revision: 334925 URL: https://svnweb.freebsd.org/changeset/base/334925 Log: Untangle configuration ifdefs a little. On x86, msi is optional on pci, and also on apic in common and i386 files (except for xen it is optional only on xenhvm), but it

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

2018-06-10 Thread Bruce Evans
On Sun, 10 Jun 2018, Konstantin Belousov wrote: Log: libc qsort(3): stop aliasing. Qsort swap code aliases the sorted array elements to ints and longs in order to do swap by machine words. Unfortunately this breaks with the full code optimization, e.g. LTO. See https://gcc.gnu.org/bugzil

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

2018-06-11 Thread Bruce Evans
On Mon, 11 Jun 2018, Konstantin Belousov wrote: On Mon, Jun 11, 2018 at 03:48:52PM +1000, Bruce Evans wrote: Change TYPE to unsigned char[sizeof(old TYPE)] and use memcpy() to assign the variables to fix this with small churn and without the pessimizations in this commit. This gives portable

svn commit: r335035 - in head/sys: compat/freebsd32 compat/linux kern

2018-06-13 Thread Bruce Evans
Author: bde Date: Wed Jun 13 08:50:43 2018 New Revision: 335035 URL: https://svnweb.freebsd.org/changeset/base/335035 Log: Fix some bugs found while fixing the representation and translation of 64-bit dev_t's (but not ones involving dev_t's). st_size was supposed to be clamped in cvtstat(

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

2018-06-13 Thread Bruce Evans
On Wed, 13 Jun 2018, Eitan Adler wrote: Log: libc: remove explicit cast NULL in atoi There isn't any reason to cast NULL so just remove it. Noticed when cleaning up top. There are many reasons to cast NULL for all members of the ato*() family: - it is required if no prototype is in scope -

svn commit: r335053 - in head/sys: compat/freebsd32 compat/linux fs/nfsclient kern sys

2018-06-13 Thread Bruce Evans
Author: bde Date: Wed Jun 13 12:22:00 2018 New Revision: 335053 URL: https://svnweb.freebsd.org/changeset/base/335053 Log: Fix the encoding of major and minor numbers in 64-bit dev_t by restoring the old encodings for the lower 16 and 32 bits and only using the higher 32 bits for unusually l

svn commit: r335057 - head/sys/compat/linux

2018-06-13 Thread Bruce Evans
Author: bde Date: Wed Jun 13 12:44:45 2018 New Revision: 335057 URL: https://svnweb.freebsd.org/changeset/base/335057 Log: Oops, r335053 had an old version of the comment about 16-bit linux dev_t translation. Modified: head/sys/compat/linux/linux_stats.c Modified: head/sys/compat/linux/lin

Re: svn commit: r335094 - head/sys/ofed/drivers/infiniband/core

2018-06-14 Thread Bruce Evans
On Wed, 13 Jun 2018, Matthew Macy wrote: On Wed, Jun 13, 2018 at 4:47 PM, Ryan Libby wrote: On Wed, Jun 13, 2018 at 4:30 PM, Matt Macy wrote: Author: mmacy Date: Wed Jun 13 23:30:54 2018 New Revision: 335094 URL: https://svnweb.freebsd.org/changeset/base/335094 Log: fix OFED build after r

Re: svn commit: r335053 - in head/sys: compat/freebsd32 compat/linux fs/nfsclient kern sys

2018-06-14 Thread Bruce Evans
On Thu, 14 Jun 2018, Hans Petter Selasky wrote: On 06/13/18 14:22, Bruce Evans wrote: [... inlines for makedev(), etc.] Can you use all macros here? This breaks OFED, because __makedev() is used to initialize variables. See another reply. I will change them to macros and fear breaking

Re: svn commit: r335094 - head/sys/ofed/drivers/infiniband/core

2018-06-14 Thread Bruce Evans
On Thu, 14 Jun 2018, Hans Petter Selasky wrote: On 06/14/18 02:03, Matthew Macy wrote: On Wed, Jun 13, 2018 at 4:47 PM, Ryan Libby wrote: On Wed, Jun 13, 2018 at 4:30 PM, Matt Macy wrote: Author: mmacy Date: Wed Jun 13 23:30:54 2018 New Revision: 335094 URL: https://svnweb.freebsd.org/chang

Re: svn commit: r335094 - head/sys/ofed/drivers/infiniband/core

2018-06-14 Thread Bruce Evans
On Thu, 14 Jun 2018, Hans Petter Selasky wrote: On 06/14/18 10:46, Bruce Evans wrote: Are these macros for conversion of host (FreeBSD) dev_t's or target (Linux) ones??? If for the host, then I don't see any reason not to use the host APIs. If for the target, then they shouldn'

Re: svn commit: r333945 - head/usr.bin/top

2018-06-14 Thread Bruce Evans
On Thu, 14 Jun 2018, Eitan Adler wrote: On 10 June 2018 at 09:26, Alexey Dokuchaev wrote: On Sun, Jun 10, 2018 at 08:56:24AM -0700, Eitan Adler wrote: On 10 June 2018 at 05:28, Alexey Dokuchaev wrote: I've just tried the latest top(1). Now it's even worse: ... Also, it is COMMA now. Can w

Re: svn commit: r335177 - in head/sys: compat/freebsd32 compat/linux i386/ibcs2 kern vm

2018-06-14 Thread Bruce Evans
On Thu, 14 Jun 2018, Brooks Davis wrote: ... Log: Name the implementation of brk and sbrk sys_break(). This API was actually named brk(2). Now brk(2) doesn't actually give this API. brk(2) doesn't exist in libc. Only brk(3) exists. It calls the actual brk(2) and adds complications. brk(3) d

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

2018-06-15 Thread Bruce Evans
On Fri, 15 Jun 2018, Gleb Smirnoff wrote: Log: Since 'ticks' is an int, it may wrap around and cr_ticks at a certain counter_rate will be greater than ticks, resulting in counter_ratecheck() failure. To fix this take an absolute value of the difference between ticks and cr_ticks. This only

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

2018-06-16 Thread Bruce Evans
On Sat, 16 Jun 2018, Kurt Lidl wrote: On 6/11/18 4:42 AM, Dimitry Andric wrote: /// Log: Disable building aesni with base gcc Because base gcc does not support the required intrinsics, do not attempt to compile the aesni module with it. ... Modified: head/sys/modules/Makefile ==

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

2018-06-16 Thread Bruce Evans
On Wed, 13 Jun 2018, Jilles Tjoelker wrote: On Wed, Jun 13, 2018 at 08:03:13PM +1000, Bruce Evans wrote: On Wed, 13 Jun 2018, Eitan Adler wrote: Log: libc: remove explicit cast NULL in atoi There isn't any reason to cast NULL so just remove it. Noticed when cleaning up top.

Re: svn commit: r335278 - head/bin/pwd

2018-06-16 Thread Bruce Evans
On Sun, 17 Jun 2018, Eitan Adler wrote: Log: pwd: mark usage as dead Modified: head/bin/pwd/pwd.c Modified: head/bin/pwd/pwd.c == --- head/bin/pwd/pwd.c Sun Jun 17 03:33:29 2018(r335277) +++ head/bin/pwd/pwd

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 Reported

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 Diffe

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. The

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: 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 make

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 correc

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. Bru

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 sys/systm.h

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" floppies, though it's

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 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 powerpc it declares __syncicache

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 integ

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: 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 ign

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 w

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 09:05:3

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, Warner Losh wrote: On Thu, Dec 7, 2017 at 3:50 PM, Bruce Evans wrote: On Thu, 7 Dec 2017, Mark Johnston wrote: Log: Ensure that "out" is initialized in all error paths. ... Modified: head/lib/libefivar/efivar-

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 o

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: 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&R 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: 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 dri

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 rem

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 C

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 s

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 fo

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. Thi

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

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 == --- he

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 thing

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: 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. No

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 racy

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. T

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 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 review of pas

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: 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: 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 you defer the declaration of "int

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 accept an operand that is a size that

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, i

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: Revert r327828,

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 nmemb, size_t size, str

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: 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 va

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: 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 - config does not need a

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 u

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 to

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 that

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: 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)); - host[sizeof(utmp.ut_host)

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 con

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 wrote: * [... context lost to corruption of spaces which makes it unreadable] Wait... This may access utmp.ut_host one byte

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 lock

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 hold

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(r331327)

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

2018-03-21 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: r331298 - head/sys/dev/syscons

2018-03-21 Thread Bruce Evans
On Wed, 21 Mar 2018, Warner Losh wrote: On Wed, Mar 21, 2018 at 11:53 AM, 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

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 schedule the task whi

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

2018-03-22 Thread Bruce Evans
On Thu, 22 Mar 2018, Konstantin Belousov wrote: On Thu, Mar 22, 2018 at 05:50:57PM +1100, Bruce Evans wrote: 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

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

2018-03-22 Thread Bruce Evans
On Thu, 22 Mar 2018, Jeff Roberson wrote: On Thu, 22 Mar 2018, Cy Schubert wrote: It broke i386 too. I just did TARGET_ARCH=i386 make buildworld TARGET_ARCH=i386 make buildkernel This worked for me? Index: sys/vm/vm_reserv.c

  1   2   3   4   5   6   7   8   9   10   >