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

svn commit: r328189 - head/usr.bin/hexdump/tests

2018-01-19 Thread Kyle Evans
Author: kevans Date: Sat Jan 20 03:50:56 2018 New Revision: 328189 URL: https://svnweb.freebsd.org/changeset/base/328189 Log: od(1): Fix mis-patch from r328188 od_test.sh got duplicated erroneously when it was added in r328188. Dedup. Modified: head/usr.bin/hexdump/tests/od_test.sh

svn commit: r328188 - in head/usr.bin/hexdump: . tests

2018-01-19 Thread Kyle Evans
Author: kevans Date: Sat Jan 20 02:49:32 2018 New Revision: 328188 URL: https://svnweb.freebsd.org/changeset/base/328188 Log: od(1): Fix wrong output for some corner cases in multibyte locales. Restore the original character to print if we used the look-ahead buffer, but that didn't help

svn commit: r328187 - head/sys/dev/bhnd/cores/chipc

2018-01-19 Thread Landon J. Fuller
Author: landonf Date: Sat Jan 20 01:55:34 2018 New Revision: 328187 URL: https://svnweb.freebsd.org/changeset/base/328187 Log: bhnd_chipc(4): Fix leak of child device ivars by explicitly deleting any children prior to detach. With the newbus child deletion ordering changes introduced in

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

2018-01-19 Thread Mark Millard via svn-src-head
Conrad Meyer cem at freebsd.org wrote on Fri Jan 19 05:07:22 UTC 2018 : > The spec says the behavior is undefined; not that the compiler has to > produce a warning or error message. The compiler *does* get to > arbitrarily decide what it wants to do when it encounters UB. It is > wholly free to

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

2018-01-19 Thread Don Lewis
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

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

2018-01-19 Thread Don Lewis
On 19 Jan, David Chisnall wrote: > On 19 Jan 2018, at 05:07, Conrad Meyer wrote: >> >> The spec says the behavior is undefined; not that the compiler has to >> produce a warning or error message. The compiler *does* get to >> arbitrarily decide what it wants to do when it

Re: svn commit: r328129 - head/sys/fs/nfsserver

2018-01-19 Thread Rick Macklem
Emmanuel Vadot wrote: [stuff snipped] > So should we warn once or maybe return EBUSY on unloading if there is >still lock structures ? My intent was that a module unload would clear out all data structures, so I would so no. I would also say that I envisioned an unload of nfsd.ko as a last resort,

svn commit: r328183 - in head: share/man/man9 sys/dev/bhnd sys/dev/bwn

2018-01-19 Thread Landon J. Fuller
Author: landonf Date: Fri Jan 19 22:43:08 2018 New Revision: 328183 URL: https://svnweb.freebsd.org/changeset/base/328183 Log: bhnd/bwn(4): Define a bhnd(4) softmodem device class for the v.90 modem codec core, and mark the core as unpopulated on all BCM4306 bwn(4) devices. Sponsored by:

svn commit: r328182 - head/sys/dev/bwn

2018-01-19 Thread Landon J. Fuller
Author: landonf Date: Fri Jan 19 22:37:48 2018 New Revision: 328182 URL: https://svnweb.freebsd.org/changeset/base/328182 Log: bwn(4): Add missing BCM4306 PCI IDs. Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/bwn/if_bwn_pci.c Modified: head/sys/dev/bwn/if_bwn_pci.c

svn commit: r328181 - head/sys/dev/bwn

2018-01-19 Thread Landon J. Fuller
Author: landonf Date: Fri Jan 19 22:33:25 2018 New Revision: 328181 URL: https://svnweb.freebsd.org/changeset/base/328181 Log: bwn(4): Fix DMA translation lookup on devices limited to 30-bit host addressing. The host addressing constraint does not apply to device address space, and

svn commit: r328180 - head/sys/dev/bhnd/bhndb

2018-01-19 Thread Landon J. Fuller
Author: landonf Date: Fri Jan 19 22:22:02 2018 New Revision: 328180 URL: https://svnweb.freebsd.org/changeset/base/328180 Log: bhndb_pci(4): Implement bridge support for CardBus-attached devices. - Extend the probe method to accept devclasses that inherit from the pci devclass (e.g.

svn commit: r328179 - head/sys/powerpc/aim

2018-01-19 Thread Nathan Whitehorn
Author: nwhitehorn Date: Fri Jan 19 22:19:50 2018 New Revision: 328179 URL: https://svnweb.freebsd.org/changeset/base/328179 Log: On AIM systems without a software-managed SLB, such as POWER9 systems using either hardware segment tables or radix-tree-based page tables, do not try to install

svn commit: r328178 - in head/sys: arm/include compat/linuxkpi/common/src i386/include sys

2018-01-19 Thread Nathan Whitehorn
Author: nwhitehorn Date: Fri Jan 19 22:17:13 2018 New Revision: 328178 URL: https://svnweb.freebsd.org/changeset/base/328178 Log: Define PHYS_TO_DMAP() and DMAP_TO_PHYS() as panics on the architectures (i386 and arm) that never implement them. This allows the removal of #ifdef PHYS_TO_DMAP

svn commit: r328177 - in head/sys/amd64: amd64 include

2018-01-19 Thread Konstantin Belousov
Author: kib Date: Fri Jan 19 22:10:29 2018 New Revision: 328177 URL: https://svnweb.freebsd.org/changeset/base/328177 Log: PTI: Trap if we returned to userspace with kernel (full) page table still active. Map userspace portion of VA in the PTI kernel-mode page table as non-executable.

svn commit: r328176 - in head/sys/dev/bhnd: cores/chipc/pwrctl siba

2018-01-19 Thread Landon J. Fuller
Author: landonf Date: Fri Jan 19 21:58:48 2018 New Revision: 328176 URL: https://svnweb.freebsd.org/changeset/base/328176 Log: bhnd(4): fix a few bugs in pwrctl/fixed-clock device support. - Do not panic on siba(4) detach when the bhnd(4) bus calls bhnd_get_pmu_info() on a PMU-less

svn commit: r328174 - head/sys/dev/bhnd/cores/chipc

2018-01-19 Thread Landon J. Fuller
Author: landonf Date: Fri Jan 19 21:36:28 2018 New Revision: 328174 URL: https://svnweb.freebsd.org/changeset/base/328174 Log: bhnd_chipc(4): Fix the assignment of non-wildcard child unit numbers introduced in r326102 and r326109; all chipc children should be added with a wildcard unit

svn commit: r328173 - head/usr.bin/dtc

2018-01-19 Thread Kyle Evans
Author: kevans Date: Fri Jan 19 21:20:24 2018 New Revision: 328173 URL: https://svnweb.freebsd.org/changeset/base/328173 Log: dtc(1): Update to upstream ea3c233 Highlights of this update: - /__local_fixups__ is now generated to be GPL dtc and libfdt compliant - Compiling with -@ will

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

2018-01-19 Thread Mark Millard via svn-src-head
Andriy Gapon avg at FreeBSD.org wrote on Fri Jan 19 18:41:07 UTC 2018 : > On 19/01/2018 20:30, 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

svn commit: r328171 - head/contrib/bsnmp/snmpd

2018-01-19 Thread Andrey V. Elsukov
Author: ae Date: Fri Jan 19 20:33:47 2018 New Revision: 328171 URL: https://svnweb.freebsd.org/changeset/base/328171 Log: Rename "index" variable to "idx" since gcc complains that it shadows index(3) function declaration. Reported by: lwhsu MFC after:2 weeks Modified:

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

2018-01-19 Thread Mark Millard via svn-src-head
Rodney W. Grimes freebsd at pdx.rh.CN85.dnsmgr.net wrote on Fri Jan 19 18:39:03 UTC 2018 (quoting style(9)): > I think everyone glossed over: > > Parts of a for loop may be left empty. Do not put declarations inside > blocks unless the routine is unusually complicated. > > Perhaps

svn commit: r328170 - head/sys/cam/mmc

2018-01-19 Thread Scott Long
Author: scottl Date: Fri Jan 19 19:18:14 2018 New Revision: 328170 URL: https://svnweb.freebsd.org/changeset/base/328170 Log: Fix compile errors in r328165 Reported by: O. Hartmann Sponsored by: Netflix Modified: head/sys/cam/mmc/mmc_xpt.c Modified: head/sys/cam/mmc/mmc_xpt.c

svn commit: r328169 - head/stand/efi/loader/arch/i386

2018-01-19 Thread Warner Losh
Author: imp Date: Fri Jan 19 19:09:17 2018 New Revision: 328169 URL: https://svnweb.freebsd.org/changeset/base/328169 Log: Remove extra copy of bootinfo.c. It's a bit rotted copy of the one in efi/loader. Differential Review: https://reviews.freebsd.org/D13986 Deleted:

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

2018-01-19 Thread Rodney W. Grimes
[ Charset UTF-8 unsupported, converting... ] > On Fri, Jan 19, 2018 at 9:51 AM, John Baldwin wrote: > > On Friday, January 19, 2018 04:34:06 AM Conrad Meyer wrote: > >> The logical result of a right shift >= the width of a type is zero, but > >> our > >> compiler decides

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

2018-01-19 Thread Warner Losh
On Fri, Jan 19, 2018 at 11:31 AM, Conrad Meyer wrote: > On Fri, Jan 19, 2018 at 9:51 AM, John Baldwin wrote: > > On Friday, January 19, 2018 04:34:06 AM Conrad Meyer wrote: > >> The logical result of a right shift >= the width of a type is zero, > but our >

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

2018-01-19 Thread Andriy Gapon
On 19/01/2018 20:30, 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

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

2018-01-19 Thread Rodney W. Grimes
> On Friday, January 19, 2018 04:34:06 AM Conrad Meyer wrote: > > Author: cem > > Date: Fri Jan 19 04:34:06 2018 > > New Revision: 328159 > > URL: https://svnweb.freebsd.org/changeset/base/328159 > > > > Log: > > Unbreak i386 build > > > > The logical result of a right shift >= the width

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

2018-01-19 Thread Rodney W. Grimes
[ Charset UTF-8 unsupported, converting... ] > On Thu, Jan 18, 2018 at 1:32 PM, Conrad Meyer wrote: > > > On Thu, Jan 18, 2018 at 12:01 PM, Eric van Gyzen > > wrote: > > > On 01/17/2018 16:40, Gleb Smirnoff wrote: > > >> Yeah, style is sacred, but is there a

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

2018-01-19 Thread Conrad Meyer
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 can hold log2(wordsize). This is a

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

2018-01-19 Thread Conrad Meyer
On Fri, Jan 19, 2018 at 9:51 AM, John Baldwin wrote: > On Friday, January 19, 2018 04:34:06 AM Conrad Meyer wrote: >> The logical result of a right shift >= the width of a type is zero, but our >> compiler decides this is a warning (and thus, error). Just remove ccp(4) >>

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

2018-01-19 Thread Brooks Davis
On Fri, Jan 19, 2018 at 09:25:34AM -0800, 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 > >

Re: svn commit: r328165 - in head: sbin/camcontrol sys/cam sys/cam/mmc

2018-01-19 Thread Scott Long
> On Jan 19, 2018, at 11:01 AM, O. Hartmann wrote: > > It seems, this broke buildkernel for me (and probably others): > > [...] > ===> bhnd/cores/bhnd_pci (all) > --- mmc_xpt.o --- > /usr/src/sys/cam/mmc/mmc_xpt.c:371:17: error: assigning to 'off_t' (aka > 'long')

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

2018-01-19 Thread John Baldwin
On Friday, January 19, 2018 04:34:06 AM Conrad Meyer wrote: > Author: cem > Date: Fri Jan 19 04:34:06 2018 > New Revision: 328159 > URL: https://svnweb.freebsd.org/changeset/base/328159 > > Log: > Unbreak i386 build > > The logical result of a right shift >= the width of a type is zero,

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

2018-01-19 Thread John Baldwin
On Wednesday, January 17, 2018 03:14:37 PM Gleb Smirnoff wrote: > On Tue, Jan 02, 2018 at 09:56:09AM -0800, John Baldwin wrote: > J> > this is a recurring issue. Program that want to look into the > J> > internals of files such as mount.h > J> > and define _KERNEL to allow themselves to do so.

Re: svn commit: r328165 - in head: sbin/camcontrol sys/cam sys/cam/mmc

2018-01-19 Thread O. Hartmann
Am Fri, 19 Jan 2018 15:32:27 + (UTC) Scott Long schrieb: > Author: scottl > Date: Fri Jan 19 15:32:27 2018 > New Revision: 328165 > URL: https://svnweb.freebsd.org/changeset/base/328165 > > Log: > Revert ABI breakage to CAM that came in with MMC/SD support in r320844.

svn commit: r328168 - in head/sys: amd64/include arm/include arm64/include compat/linuxkpi/common/src dev/efidev i386/include kern mips/include powerpc/include riscv/include sparc64/include sys vm

2018-01-19 Thread Nathan Whitehorn
Author: nwhitehorn Date: Fri Jan 19 17:46:31 2018 New Revision: 328168 URL: https://svnweb.freebsd.org/changeset/base/328168 Log: Remove SFBUF_OPTIONAL_DIRECT_MAP and such hacks, replacing them across the kernel by PHYS_TO_DMAP() as previously present on amd64, arm64, riscv, and powerpc64.

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

2018-01-19 Thread Rodney W. Grimes
[ Charset UTF-8 unsupported, converting... ] > On Fri, Jan 19, 2018 at 6:56 AM, David Chisnall wrote: > > In C, a right-shift of a signed type propagates the sign bit. Right > > shifting a negative 32-bit int by 16 and then again by 16 is not undefined > > behaviour

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

2018-01-19 Thread Conrad Meyer
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 i"

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

2018-01-19 Thread Conrad Meyer
On Fri, Jan 19, 2018 at 6:56 AM, David Chisnall wrote: > In C, a right-shift of a signed type propagates the sign bit. Right shifting > a negative 32-bit int by 16 and then again by 16 is not undefined behaviour > (though doing the shift as a single operation is) and will

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

2018-01-19 Thread Rodney W. Grimes
> 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: > > K> Style.

svn commit: r328166 - in head/sys: amd64/amd64 x86/include x86/x86

2018-01-19 Thread Ed Maste
Author: emaste Date: Fri Jan 19 15:42:34 2018 New Revision: 328166 URL: https://svnweb.freebsd.org/changeset/base/328166 Log: Enable KPTI by default on amd64 for non-AMD CPUs Kernel Page Table Isolation (KPTI) was introduced in r328083 as a mitigation for the 'Meltdown' vulnerability.

svn commit: r328165 - in head: sbin/camcontrol sys/cam sys/cam/mmc

2018-01-19 Thread Scott Long
Author: scottl Date: Fri Jan 19 15:32:27 2018 New Revision: 328165 URL: https://svnweb.freebsd.org/changeset/base/328165 Log: Revert ABI breakage to CAM that came in with MMC/SD support in r320844. Make it possible to retrieve mmc parameters via the XPT_GET_ADVINFO call instead. Convert

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

2018-01-19 Thread David Chisnall
On 19 Jan 2018, at 05:07, Conrad Meyer wrote: > > The spec says the behavior is undefined; not that the compiler has to > produce a warning or error message. The compiler *does* get to > arbitrarily decide what it wants to do when it encounters UB. It is > wholly free to

svn commit: r328164 - head/sys/contrib/libnv

2018-01-19 Thread Pedro F. Giffuni
Author: pfg Date: Fri Jan 19 14:50:53 2018 New Revision: 328164 URL: https://svnweb.freebsd.org/changeset/base/328164 Log: libnv: Use mallocarray(9) for the nv_calloc. Modified: head/sys/contrib/libnv/nv_impl.h Modified: head/sys/contrib/libnv/nv_impl.h

svn commit: r328163 - in head/sys/dev/usb: . serial

2018-01-19 Thread Hans Petter Selasky
Author: hselasky Date: Fri Jan 19 13:06:36 2018 New Revision: 328163 URL: https://svnweb.freebsd.org/changeset/base/328163 Log: Add new USB ID to U3G driver. PR: 134299 MFC after:1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/usb/serial/u3g.c

svn commit: r328162 - in head/sys/dev/usb: net serial

2018-01-19 Thread Hans Petter Selasky
Author: hselasky Date: Fri Jan 19 12:59:14 2018 New Revision: 328162 URL: https://svnweb.freebsd.org/changeset/base/328162 Log: Improve support for USB based 3G/4G/5G dongles from Huawei. PR: 192345 Sponsored by: Mellanox Technologies Modified: head/sys/dev/usb/net/if_cdce.c

svn commit: r328161 - head/sys/netpfil/ipfw

2018-01-19 Thread Andrey V. Elsukov
Author: ae Date: Fri Jan 19 12:50:03 2018 New Revision: 328161 URL: https://svnweb.freebsd.org/changeset/base/328161 Log: Add UDPLite support to ipfw(4). Now it is possible to use UDPLite's port numbers in rules, create dynamic states for UDPLite packets and see "UDPLite" for matched

Re: svn commit: r327676 - head/sys/compat/linuxkpi/common/include/linux

2018-01-19 Thread Hans Petter Selasky
On 01/07/18 20:07, Rodney W. Grimes wrote: -static inline void * -kcalloc(size_t n, size_t size, gfp_t flags) -{ - flags |= __GFP_ZERO; - return (mallocarray(n, size, M_KMALLOC, linux_check_m_flags(flags))); -} -

Re: svn commit: r328129 - head/sys/fs/nfsserver

2018-01-19 Thread Emmanuel Vadot
On Thu, 18 Jan 2018 22:15:16 + Rick Macklem wrote: > Emmanuel Vadot wrote: > >> Author: manu > >> Date: Thu Jan 18 15:28:49 2018 > >> New Revision: 328129 > >> URL: https://svnweb.freebsd.org/changeset/base/328129 > >> > >> Log: > >> nfs: Do not printf each time a

svn commit: r328160 - head/contrib/bsnmp/snmpd

2018-01-19 Thread Andrey V. Elsukov
Author: ae Date: Fri Jan 19 08:48:14 2018 New Revision: 328160 URL: https://svnweb.freebsd.org/changeset/base/328160 Log: Add to bsnmpd(1) ability to specify multiple community strings with different access rights. By default there are two community strings with index 1 and 2, one for

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

2018-01-19 Thread Peter Jeremy
On 2018-Jan-18 21:07:19 -0800, Conrad Meyer wrote: >The spec says the behavior is undefined; not that the compiler has to >produce a warning or error message. The compiler *does* get to >arbitrarily decide what it wants to do when it encounters UB. It is >wholly free to