Link [ NetBSD | NetBSD OpenGrok source search | PR fulltext-search | Summary of daily snapshot builds | history of daily build result | pkgsrc commit viewer ]


   
        usage: [branch:branch] [user:user] [path@revision] keyword [... [-excludekeyword [...]]] (e.g. branch:MAIN sys/arch/arm, if_wm.c@1.234 )




switch to index mode

recent branches: MAIN (13m)  netbsd-8 (6d)  netbsd-10 (6d)  netbsd-9 (12d)  thorpej-ifq (176d)  thorpej-altq-separation (178d) 

2024-05-10 20:49:59 UTC Now

2018-08-27 06:31:41 UTC MAIN commitmail json YAML

Rename drm_drv.c to drm_cdevsw.c.

Previously we overrode upstream's drm_drv.c altogether, and used
upstream's drm_stub.c subroutines.

But upstream deleted drm_drv.c and renamed drm_stub.c to drm_drv.c,
so we have to cope with that reshuffle.

(riastradh)

2018-08-27 06:25:59 UTC MAIN commitmail json YAML

Apply locally overridden files.

(riastradh)

2018-08-27 06:25:48 UTC MAIN commitmail json YAML

Omit PCI files from files.drmkms.

(riastradh)

2018-08-27 06:25:37 UTC MAIN commitmail json YAML

2018-08-27 06:25:28 UTC MAIN commitmail json YAML

Move local files to the top to make them more visible.

(riastradh)

2018-08-27 06:25:18 UTC MAIN commitmail json YAML

Forgot to nix conflicts after moving change to intel_runtime_pm.c.

(riastradh)

2018-08-27 06:25:06 UTC MAIN commitmail json YAML

Forgot to nix conflicts after moving changes to i915_gem_fence.c.

(riastradh)

2018-08-27 06:23:19 UTC MAIN commitmail json YAML

2018-08-27 06:19:26 UTC MAIN commitmail json YAML

2018-08-27 06:19:16 UTC MAIN commitmail json YAML

provide BUILD_BUG_ON_MSG

Author: coypu <coypu@sdf.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>

(riastradh)

2018-08-27 06:19:05 UTC MAIN commitmail json YAML

provide pr_notice
avoid needing unregister_oom_notifier
use intel_register_dsm_handler(dev), as older drm does
provide dummy async_schedule
provide atomic_or
match side-loading

Author: coypu <coypu@sdf.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>

(riastradh)

2018-08-27 06:18:51 UTC MAIN commitmail json YAML

provide CONFIG_PNP if it's defined. i386 only apparently.

XXX I'm not actually building i386 kernels

Author: coypu <coypu@sdf.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>

(riastradh)

2018-08-27 06:18:41 UTC MAIN commitmail json YAML

2018-08-27 06:18:30 UTC MAIN commitmail json YAML

don't provide dev_to_i915 and ifdef out all users (unused)
provide nsecs_to_jiffies64, hopefully msec_to_jiffies * 10^6
provide BUILD_BUG as a no-op
include linux/err.h instead of matching side-loading, too hard to
figure out what gets it.

Author: coypu <coypu@sdf.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>

(riastradh)

2018-08-27 06:18:17 UTC MAIN commitmail json YAML

update i915_trace.h to build withotu -Werror

remove unused users of the type struct intel_ring_buffer
switch others to struct drm_i915_gem_request which is what callers
use.

Author: coypu <coypu@sdf.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>

(riastradh)

2018-08-27 06:18:05 UTC MAIN commitmail json YAML

provide missing declarations
add missing headers

Author: coypu <coypu@sdf.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>

(riastradh)

2018-08-27 06:17:52 UTC MAIN commitmail json YAML

directly include asm/bug.h for WARN_ON instead of fighting
to match side-loading.

include drm_legacy.h as needed

Author: coypu <coypu@sdf.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>

(riastradh)

2018-08-27 06:17:40 UTC MAIN commitmail json YAML

Forget about trying to replicate side-loading, will just include
directly

Author: coypu <coypu@sdf.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>

(riastradh)

2018-08-27 06:17:30 UTC MAIN commitmail json YAML

begin fixing -Werror build:

Provide missing declarations from older drm
provide more definitions used by code
no idea what might_lock is, but it might be some error-checking
lockdep thing.

Author: coypu <coypu@sdf.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>

(riastradh)

2018-08-27 06:17:17 UTC MAIN commitmail json YAML

... Provide GENMASK

Author: coypu <coypu@sdf.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>

(riastradh)

2018-08-27 06:17:05 UTC MAIN commitmail json YAML

un-static i915_disable_vga, used in intelfb.c.

Now I reach linking, and have a lot of undefined functions.
-Werror build still not handled.

Author: coypu <coypu@sdf.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>

(riastradh)

2018-08-27 06:16:50 UTC MAIN commitmail json YAML

2018-08-27 06:16:37 UTC MAIN commitmail json YAML

bring in old drm changes

ifdef out some fb_info usage which we don't have and some of it
ifdef'd out in old drm

strangely reg_offset isn't used in the i2c whatever-thing

we need one more member to drm_fb_helper

define CONFIG_DRM_FBDEV_EMULATION so hopefully fewer redefinitions

Author: coypu <coypu@sdf.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>

(riastradh)

2018-08-27 06:16:22 UTC MAIN commitmail json YAML

2018-08-27 06:16:01 UTC MAIN commitmail json YAML

provide enum irqreturn

merge in old ifdefs
ifdef out code that I'm unsure about right away and turn into panic
call.

Author: coypu <coypu@sdf.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>

(riastradh)

2018-08-27 06:15:32 UTC MAIN commitmail json YAML

move bitops.h so we can include it from kernel.h

match linux side-loading of this header.

Author: coypu <coypu@sdf.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>

(riastradh)

2018-08-27 06:08:38 UTC MAIN commitmail json YAML

2018-08-27 06:08:25 UTC MAIN commitmail json YAML

some more definitions necessary

ifdef out all the i915 gtt virtual memory stuff that errors,
unless it looks exactly like the old code and then merge the
netbsd ifdefs for it.

we don't want to use their ALIGN(, which has more arguments,
use the old alt function.
merge in the old intel_acpi.c code.
don't duplicate DECLARE_BITMAP

Author: coypu <coypu@sdf.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>

(riastradh)

2018-08-27 06:08:09 UTC MAIN commitmail json YAML

something like hashtable.h from openbsd, WIP

Author: coypu <coypu@sdf.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>

(riastradh)

2018-08-27 06:07:58 UTC MAIN commitmail json YAML

bring in old drm changes
panic(XXX) out parts that need attention

Author: coypu <coypu@sdf.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>

(riastradh)

2018-08-27 06:07:44 UTC MAIN commitmail json YAML

make i915_trace.h match newer code

Author: coypu <coypu@sdf.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>

(riastradh)

2018-08-27 06:07:32 UTC MAIN commitmail json YAML

match linux side loading

Author: coypu <coypu@sdf.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>

(riastradh)

2018-08-27 06:07:20 UTC MAIN commitmail json YAML

more declarations of things we need.

more power management ops.

Author: coypu <coypu@sdf.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>

(riastradh)

2018-08-27 06:07:07 UTC MAIN commitmail json YAML

include guard for async.h

Author: coypu <coypu@sdf.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>

(riastradh)

2018-08-27 06:06:55 UTC MAIN commitmail json YAML

dummy file to quiet include warnings

Author: coypu <coypu@sdf.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>

(riastradh)

2018-08-27 06:06:42 UTC MAIN commitmail json YAML

2018-08-27 06:06:31 UTC MAIN commitmail json YAML

include drm_legacy.h as needed...

Author: coypu <coypu@sdf.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>

(riastradh)

2018-08-27 06:06:10 UTC MAIN commitmail json YAML

move printk to common so we can reasonably include it from kernel.h
(linux side-loads the same)

Author: coypu <coypu@sdf.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>

(riastradh)

2018-08-27 05:57:42 UTC MAIN commitmail json YAML

bring in changes from OLDER drmP.h to go forward with compilation

Author: coypu <coypu@sdf.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>

(riastradh)

2018-08-27 05:57:29 UTC MAIN commitmail json YAML

mild modifications to avoid needing more headers

Author: coypu <coypu@sdf.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>

(riastradh)

2018-08-27 05:50:06 UTC MAIN commitmail json YAML

2018-08-27 05:45:28 UTC MAIN commitmail json YAML

2018-08-27 05:45:14 UTC MAIN commitmail json YAML

2018-08-27 05:44:57 UTC MAIN commitmail json YAML

2018-08-27 05:39:57 UTC MAIN commitmail json YAML

Apply upstream deletions that I failed to apply in the merge.

(riastradh)

2018-08-27 05:36:26 UTC MAIN commitmail json YAML

Move local i915 files earlier to make them more obvious.

(riastradh)

2018-08-27 05:36:16 UTC MAIN commitmail json YAML

2018-08-27 05:35:54 UTC MAIN commitmail json YAML

Replace per-file warning options in radeon by radeon-wide options.

(riastradh)

2018-08-27 05:35:43 UTC MAIN commitmail json YAML

Replace nouveau per-file warning options by nouveau-wide options.

(riastradh)

2018-08-27 05:35:31 UTC MAIN commitmail json YAML

Move autogenerated files from dist/ to end of files.radeon.

(riastradh)

2018-08-27 05:35:22 UTC MAIN commitmail json YAML

Add CFLAGS, CPPFLAGS, and CWARNFLAGS from options to .c files.

(riastradh)

2018-08-27 05:35:11 UTC MAIN commitmail json YAML

Define px_dma for our bus_dmaish i915_dma_page.

(riastradh)

2018-08-27 05:35:00 UTC MAIN commitmail json YAML

Tag each .c file with the options that might have brought it in.

(riastradh)

2018-08-27 05:34:49 UTC MAIN commitmail json YAML

Move old DRM_READn definitions into new drm_iomap_netbsd.h

These got deleted from drmP.h.

(riastradh)

2018-08-27 04:58:38 UTC MAIN commitmail json YAML

src/sys/external/bsd/drm2/dist/drm/Kconfig@1.2 / diff / nxr@1.2
src/sys/external/bsd/drm2/dist/drm/Makefile@1.2 / diff / nxr@1.2
src/sys/external/bsd/drm2/dist/drm/README.drm deleted
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/Kconfig@1.2 / diff / nxr@1.2
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/Makefile@1.2 / diff / nxr@1.2
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/ObjectID.h@1.2 / diff / nxr@1.2
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu.h@1.2 / diff / nxr@1.2
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_acpi.c@1.2 / diff / nxr@1.2
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_acpi.h@1.2 / diff / nxr@1.2
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_afmt.c@1.2 / diff / nxr@1.2
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_amdkfd.c@1.2 / diff / nxr@1.2
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_amdkfd.h@1.2 / diff / nxr@1.2
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c@1.2 / diff / nxr@1.2
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c@1.2 / diff / nxr@1.2
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_atombios.c@1.2 / diff / nxr@1.2
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_atombios.h@1.2 / diff / nxr@1.2
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_benchmark.c@1.2 / diff / nxr@1.2
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_bios.c@1.2 / diff / nxr@1.2
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_bo_list.c@1.2 / diff / nxr@1.2
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_cgs.c@1.2 / diff / nxr@1.2
      :
(more 2202 files)
merge linux-drm-v4-4-143

(riastradh)

2018-08-27 04:53:24 UTC MAIN commitmail json YAML

Restore splx removed accidentally at v1.406

Pointed out by k-goda@IIJ

(ozaki-r)

2018-08-27 00:56:38 UTC MAIN commitmail json YAML

Handle uvm object reference counts in uvm_map more carefully.

Acquire a reference unconditionally first; then let uvm_map consume
it on success, and release it ourselves on failure.

As we did before -- acquiring a fresh reference on success -- another
thread might release the reference with a concurrent uvm_unmap before
we could acquire it back, thereby destroying the object.

XXX pullup-7
XXX pullup-8

(riastradh)

2018-08-27 00:51:37 UTC MAIN commitmail json YAML

Restore gtt page table control register on resume.

Additional subroutine agp_i810_reset is used by i915drmkms to make
sure it happens early enough, since i915drmkms resumes before agp.

XXX pullup-7
XXX pullup-8

(riastradh)

2018-08-27 00:46:43 UTC MAIN commitmail json YAML

Preliminary README for drm2 directory.

(riastradh)

2018-08-27 00:46:32 UTC MAIN commitmail json YAML

New script to generate files.drmkms from Linux Makefile.

(riastradh)

2018-08-27 00:46:22 UTC MAIN commitmail json YAML

Move cleantags and rcsid decorations to prepare-import.sh.

Also decorate .h files.

(riastradh)

2018-08-27 00:46:10 UTC MAIN commitmail json YAML

Makefile got moved to Kbuild.  Make sure variables expand.

(riastradh)

2018-08-27 00:46:04 UTC MAIN commitmail json YAML

Allow caller to specify mv so I can stage this in git.

(riastradh)

2018-08-27 00:36:03 UTC MAIN commitmail json YAML

Remove reference to -c flag which was never implemented.

(sevan)

2018-08-26 23:34:52 UTC MAIN commitmail json YAML

-G cannot be specified alongside -i or -P.

Heads up by <leot>

(sevan)

2018-08-26 23:30:29 UTC MAIN commitmail json YAML

Disable mue(4) for INSTALL_C70 like other USB NICs.
Should fix build.

(rin)

2018-08-26 23:01:06 UTC MAIN commitmail json YAML

Update usage to include -w
Match sequence as per SYNOPSIS in manual

(sevan)

2018-08-26 22:52:34 UTC MAIN commitmail json YAML

Add -l to SYNOPSIS

(sevan)

2018-08-26 22:25:38 UTC MAIN commitmail json YAML

Match SYNOPSIS with usage()

(sevan)

2018-08-26 21:31:34 UTC MAIN commitmail json YAML

Document the WCPU field.

(sevan)

2018-08-26 21:28:18 UTC MAIN commitmail json YAML

2018-08-26 21:06:46 UTC MAIN commitmail json YAML

2018-08-26 21:04:16 UTC MAIN commitmail json YAML

add event counter for the unaligned map to get a handle on how often this
actually happens

(jdolecek)

2018-08-26 18:57:24 UTC MAIN commitmail json YAML

update TODO
* done: kernel text/rodata mapping with correct permission. implemented.
* add: kernel preemption

(ryo)

2018-08-26 18:15:50 UTC MAIN commitmail json YAML

2018-08-26 16:54:38 UTC MAIN commitmail json YAML

sdt.h deserves an RCS id like all the other header files.

(riastradh)

2018-08-26 11:53:28 UTC MAIN commitmail json YAML

Refactor the numeric validity check just added, so the error
messages can be (easily) done better.

(kre)

2018-08-26 11:48:00 UTC MAIN commitmail json YAML

Validate that the configuration parameters that are supposed to
be numeric are in fact numeric, and then have the awk script use
them as awk numbers, rather than strings, so awk isn't doing string
comparisons on numbers (where "1024" < 2).

This has no effect with current configuratons, but would if anyone
had ever attempted to configure a system with nsysent >= 1000

(kre)

2018-08-26 11:31:56 UTC MAIN commitmail json YAML

Add back non-512-byte aligned buffers support (reverting 1.84).
Userland users of raw devices don't have to use sector-aligned buffers,
and e.g. disklabel doesn't.
anita tests on Xen should at last complete the install phase again.

(bouyer)

2018-08-26 08:54:03 UTC MAIN commitmail json YAML

2018-08-26 08:06:10 UTC netbsd-8 commitmail json YAML

2018-08-26 08:05:16 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by mlelstv in ticket #990):

sys/dev/usb/usb_subr.c: revision 1.224

add missing KERNEL_LOCK protection around autoconf calls.

Also replace NULL argument with curlwp for style.

(martin)

2018-08-26 07:53:25 UTC MAIN commitmail json YAML

2018-08-26 07:48:31 UTC MAIN commitmail json YAML

2018-08-26 07:46:37 UTC MAIN commitmail json YAML

2018-08-26 06:47:27 UTC MAIN commitmail json YAML

Fix Dd. New line after macro argument end.

(wiz)

2018-08-25 23:12:23 UTC pgoyette-compat commitmail json YAML

Remove duplicate entry for XEN module build infrastructure.

(pgoyette)

2018-08-25 21:01:28 UTC MAIN commitmail json YAML

Add mue(4).

(rin)

2018-08-25 20:55:15 UTC MAIN commitmail json YAML

Set mac-address property to mue(4).

(rin)

2018-08-25 20:52:42 UTC MAIN commitmail json YAML

2018-08-25 20:12:22 UTC MAIN commitmail json YAML

Add mue(4), driver for Microchip LAN75xx/LAN78xx known as internal NIC of
Raspberry Pi 3 B+, from OpenBSD.

Tested on Raspberry Pi 3 B+ (LAN7800) and Z-TEK ZE582 (LAN7500).

* BUGS/TODO

- If the media type is set to something other than 1000baseT-FDX, data
  transmission becomes quite unstable. Also, ukphy(4) recognize 1000baseT as
  a supported media type, but it is not in fact.

- Catch up with changes made to usmsc(4) in nick-nhusb branch, i.e.,
  make the driver MP-safe.

- Support RX/VLAN/TX chekcsum offloading.

(rin)

2018-08-25 19:38:37 UTC MAIN commitmail json YAML

2018-08-25 17:35:31 UTC MAIN commitmail json YAML

PR bin/48875

Add a paragraph (briefer than previously posted to mailing lists)
to explain that there is no guarantee that the results of a command
substitution will be available before all commands started by the
cmdsub have completed.

Include the original proposed text (much longer) as *roff comments, so
it will at least be available to those who browse the man page sources.

While here, clean up the existing text about command substitutions to
make it a little more accurate (and to advise against using the `` form).

(kre)

2018-08-25 17:14:39 UTC netbsd-8 commitmail json YAML

Fix merge mishap due to #983 / #989 pullup order.

(martin)

2018-08-25 17:07:03 UTC netbsd-7 commitmail json YAML

2018-08-25 17:00:14 UTC netbsd-7 commitmail json YAML

Pull up following revision(s) (requested by mrg in ticket #1632):

sys/dev/usb/usbdivar.h: revision 1.117
sys/external/bsd/dwc2/dwc2.c: revision 1.52
sys/dev/usb/xhcivar.h: revision 1.10
sys/dev/usb/motg.c: revision 1.22
sys/dev/usb/ehci.c: revision 1.260
sys/dev/usb/ehci.c: revision 1.261
sys/dev/usb/xhci.c: revision 1.96
sys/dev/usb/ohci.c: revision 1.282
sys/dev/usb/ohci.c: revision 1.283
sys/dev/usb/ehcivar.h: revision 1.45
sys/dev/usb/uhci.c: revision 1.281
sys/dev/usb/uhci.c: revision 1.282
sys/dev/usb/usbdi.c: revision 1.177
sys/dev/usb/ohcivar.h: revision 1.60
sys/dev/usb/uhcivar.h: revision 1.55
(all via patch)

pull across abort fixes from nick-nhusb.  add more abort fixes, using
ideas from Taylor and Nick, and myself.  special thanks to both who
inspired much of the code here, if not wrote it directly.

among other problems, this assert should no longer trigger:

  panic: kernel diagnostic assertion "xfer->ux_state == XFER_ONQU" failed: file "/current/src/sys/dev/usb/usbdi.c", line 914

using usbhist i was able to track down my instance of it being related
to userland close() beginning, dropping the sc_lock, and then the usb
softintr completes the transfer normally, and when it is done, the
abort path attempts to re-complete the transfer, and the above assert
is tripped.

changes from nhusb were commited with these logs:
--
Move the struct usb_task to struct usbd_xfer for everyone to use.
--
Set device transfer status to USBD_IN_PROGRESS if start methods succeeds
--
Actually set the transfer status on transfers in ohci_abort_xfer and
the controller is dying
--
Don't supply the lock to callout_halt when polling as it won't be held
--
Improve transfer abort
--
Mark device transfers as USBD_IN_PROGRESS appropriately and improve
abort handling
--
--
Mark device transfers as USBD_IN_PROGRESS appropriately and improve
abort handling
--

additional changes include:
- initialise the usb abort task in the HCI allocx routine, so that it
  can be safely usb_rem_task()'d.
- rework the handling of softintr vs cancellation vs timeout abort based
  upon a scheme from Taylor:
  when completing a transfer normally:
  - if the status is not in progress, it must be cancelled or timed out,
    and we should not process this xfer.
  - set the status as normal.
  - unconditionallly callout_stop() and usb_rem_task().  they're safe and
    either aren't running, or will run and do nothing.
  - finally call usb_transfer_complete().
  when aborting a transfer:
  - status should be cancelled or timed out.
  - if cancelling, callout_halt and usb_rem_task_wait() to make sure the
    timer is either done or cancelled.
  - at this point, the ux_status must not be cancelled or timed out, and
    if it is not in progress we're done.
  - set the status.
  - if the controller is dying, just return.
  - perform HCI-specific tasks to abort this xfer.
  - finally call usb_transfer_complete().
  for the timeout and timeout task:
  - if the HCI is not dying, and the ux_status is in progress, then
    trigger the usb abort task.
- remove UXFER_ABORTWAIT and UXFER_ABORTING.

tested on:
- multiple PC systems with several types of devices: ugen/UPS, ucom,
  umass with disk, ssd and cdrom backends, kbd, ms, using uhci, ehci
  and xhci.
- erlite3: sd@umass on dwc2.
- sunblade2000: kbd/ms and umass disk on ohci.

untested:
- motg, slhci and ahci.  motg has some portion of the new scheme
  applied, but slhci and ahci require more study.

future work includes pushing a lot of the common abort handling into
usbdi.c and leaving upm_abort() for HC specific tasks, but this change
is pullup-able to netbsd-7 and netbsd-8 as it does not change any
external API, as well as removing over 100 lines of code while adding
over 30 new asserts.

XXX: pullup-7, pullup-8.

fix DIAGNOSTIC build by not copying ub_usepolling to stack before use

Sprinkle __diagused

(martin)

2018-08-25 15:14:23 UTC netbsd-7 commitmail json YAML

2018-08-25 15:11:43 UTC netbsd-7 commitmail json YAML

Catch up to current for the following, requested by kre in ticket #1634:

external/public-domain/tz/dist/Makefile        up to 1.1.1.21
external/public-domain/tz/dist/NEWS            up to 1.1.1.22
external/public-domain/tz/dist/TZDATA_VERSION  up to 1.12
external/public-domain/tz/dist/africa          up to 1.1.1.15
external/public-domain/tz/dist/asia            up to 1.1.1.20
external/public-domain/tz/dist/australasia      up to 1.1.1.15
external/public-domain/tz/dist/europe          up to 1.1.1.21
external/public-domain/tz/dist/theory.html      up to 1.1.1.4
external/public-domain/tz/dist/version          up to 1.1.1.9
external/public-domain/tz/dist/ziguard.awk      up to 1.1.1.2
doc/3RDPARTY 1.1520 (patch)

Import tzdata2018e from ftp://ftp.iana.org/tz/releases/tzdata2018e.tar.gz

Summary of changes in tzdata2018e (2018-05-01 23:42:51 -0700):

News for the tz database

Release 2018e - 2018-05-01 23:42:51 -0700

    North Korea switches back to +09 on 2018-05-05 (tomorrow!)

(martin)

2018-08-25 15:03:00 UTC netbsd-7 commitmail json YAML

Sync to head the following, requested by roy in ticket #1633:

        external/bsd/dhcpcd/dist/src/defs.h            up to 1.1.1.16
        external/bsd/dhcpcd/dist/src/dhcp.c            up to 1.13
        external/bsd/dhcpcd/dist/src/dhcp6.c            up to 1.1.1.13
        external/bsd/dhcpcd/dist/src/if-bsd.c          up to 1.1.1.9
        external/bsd/dhcpcd/dist/src/if.c              up to 1.1.1.9
        external/bsd/dhcpcd/dist/src/ipv4.c            up to 1.1.1.10
        external/bsd/dhcpcd/dist/src/ipv6.c            up to 1.1.1.12
        doc/3RDPARTY                                    (manually edited)

Import dhcpcd-7.0.8 with the following changes:
  *  Don't use IP_PKTINFO on NetBSD-7 as it's incomplete.
  *  Workaround RTM_NEWADDR sending the wrong broadcast address
    on NetBSD-7.
  *  Silence diagnostics if an address vanishes when reading
    it's flags on all BSD's.
  *  Misc compiler warnings fixed.

(martin)

2018-08-25 14:57:35 UTC netbsd-7 commitmail json YAML

Pull up following revision(s) (requested by mrg in ticket #1632):

sys/dev/usb/usbdivar.h: revision 1.117
sys/external/bsd/dwc2/dwc2.c: revision 1.52
sys/dev/usb/xhcivar.h: revision 1.10
sys/dev/usb/motg.c: revision 1.22
sys/dev/usb/ehci.c: revision 1.260
sys/dev/usb/ehci.c: revision 1.261
sys/dev/usb/xhci.c: revision 1.96
sys/dev/usb/ohci.c: revision 1.282
sys/dev/usb/ohci.c: revision 1.283
sys/dev/usb/ehcivar.h: revision 1.45
sys/dev/usb/uhci.c: revision 1.281
sys/dev/usb/uhci.c: revision 1.282
sys/dev/usb/usbdi.c: revision 1.177
sys/dev/usb/ohcivar.h: revision 1.60
sys/dev/usb/uhcivar.h: revision 1.55
(all via patch)

pull across abort fixes from nick-nhusb.  add more abort fixes, using
ideas from Taylor and Nick, and myself.  special thanks to both who
inspired much of the code here, if not wrote it directly.

among other problems, this assert should no longer trigger:

  panic: kernel diagnostic assertion "xfer->ux_state == XFER_ONQU" failed: file "/current/src/sys/dev/usb/usbdi.c", line 914

using usbhist i was able to track down my instance of it being related
to userland close() beginning, dropping the sc_lock, and then the usb
softintr completes the transfer normally, and when it is done, the
abort path attempts to re-complete the transfer, and the above assert
is tripped.

changes from nhusb were commited with these logs:
--
Move the struct usb_task to struct usbd_xfer for everyone to use.
--
Set device transfer status to USBD_IN_PROGRESS if start methods succeeds
--
Actually set the transfer status on transfers in ohci_abort_xfer and
the controller is dying
--
Don't supply the lock to callout_halt when polling as it won't be held
--
Improve transfer abort
--
Mark device transfers as USBD_IN_PROGRESS appropriately and improve
abort handling
--
--
Mark device transfers as USBD_IN_PROGRESS appropriately and improve
abort handling
--

additional changes include:
- initialise the usb abort task in the HCI allocx routine, so that it
  can be safely usb_rem_task()'d.
- rework the handling of softintr vs cancellation vs timeout abort based
  upon a scheme from Taylor:
  when completing a transfer normally:
  - if the status is not in progress, it must be cancelled or timed out,
    and we should not process this xfer.
  - set the status as normal.
  - unconditionallly callout_stop() and usb_rem_task().  they're safe and
    either aren't running, or will run and do nothing.
  - finally call usb_transfer_complete().
  when aborting a transfer:
  - status should be cancelled or timed out.
  - if cancelling, callout_halt and usb_rem_task_wait() to make sure the
    timer is either done or cancelled.
  - at this point, the ux_status must not be cancelled or timed out, and
    if it is not in progress we're done.
  - set the status.
  - if the controller is dying, just return.
  - perform HCI-specific tasks to abort this xfer.
  - finally call usb_transfer_complete().
  for the timeout and timeout task:
  - if the HCI is not dying, and the ux_status is in progress, then
    trigger the usb abort task.
- remove UXFER_ABORTWAIT and UXFER_ABORTING.

tested on:
- multiple PC systems with several types of devices: ugen/UPS, ucom,
  umass with disk, ssd and cdrom backends, kbd, ms, using uhci, ehci
  and xhci.
- erlite3: sd@umass on dwc2.
- sunblade2000: kbd/ms and umass disk on ohci.

untested:
- motg, slhci and ahci.  motg has some portion of the new scheme
  applied, but slhci and ahci require more study.

future work includes pushing a lot of the common abort handling into
usbdi.c and leaving upm_abort() for HC specific tasks, but this change
is pullup-able to netbsd-7 and netbsd-8 as it does not change any
external API, as well as removing over 100 lines of code while adding
over 30 new asserts.

XXX: pullup-7, pullup-8.

fix DIAGNOSTIC build by not copying ub_usepolling to stack before use

Sprinkle __diagused

(martin)

2018-08-25 14:54:18 UTC netbsd-7 commitmail json YAML

Pull up following revision(s) (requested by roy in ticket #1631):

etc/powerd/scripts/sleep_button: revision 1.11

Remove the stopping and starting of various network scripts on
sleep / resume.

This should no longer be needed now the various applications
(dhcpcd, ntpd, wpa_supplicant et all) are more aware to the network state
as all interface carriers should be brought down and up again.

Fixes PR misc/52397.

(martin)

2018-08-25 14:50:21 UTC netbsd-8 commitmail json YAML

2018-08-25 14:48:22 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by kre in ticket #989):

bin/sh/eval.c: revision 1.156
bin/sh/eval.h: revision 1.20
bin/sh/exec.c: revision 1.53

Fix several bugs in the command / type builtin ( including PR bin/48499 )

1. Make command -pv (and -pV) work (which is not as easy as the PR
  suggests it might be (the "check and cause error" was there because
  it did not work, not in order to prevent it from working).

2. Stop -v and -V being both used (that makes no sense).

3. Stop the "type" builtin inheriting the args (-pvV) that "command" has
  (which it did, as when -v -or -V is used with command, it and type are
    implemented using the same code).

4. make "command -v word" DTRT for sh keywords (was treating them as an error).

5. Require at least one arg for "command -[vV]" or "type" else usage & error.
  Strictly this should also apply to "command" and "command -p" (no -v)
  but that's handled elsewhere, so perhaps some other time.  Perhaps
  "command -v" (and -V) should be limited to 1 command name (where "type"
  can have many) as in the POSIX definitions, but I don't think that matters.

6. With "command -V alias", (or "type alias" which is the same thing),
  (but not "command -v alias") alter the output format, so we get
ll is an alias for: ls -al
  instead of the old
ll is an alias for
ls -al
  (and note there was a space, for some reason, after "for")
  That is, unless the alias value contains any \n characters, in which
  case (something approximating) the old multi-line format is retained.
  Also note: that if code wants to parse/use the value of an alias, it
  should be using the output of "alias name", not command or type.

Note that none of the above affects "command [-p] cmd" (no -v or -V options)
only "command -[vV]" and "type".

Note also that the changes to eval.[ch] are merely to make syspath()
visible in exec.c rather than static in eval.c

(martin)

2018-08-25 14:45:37 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by kre in ticket #988):

bin/sh/parser.c: revision 1.147
bin/sh/var.c: revision 1.70
bin/sh/mystring.c: revision 1.18
bin/sh/options.c: revision 1.53
bin/sh/histedit.c: revision 1.53

Remove atoi()

Mostly use number() (no longer implemented using atoi()) when an
unsigned integer is required, but use strtoXXX() when a conversion
is wanted, without the possibility or error (like setting OPTIND
and RANDOM).  Always init OPTIND to 1 when sh starts (overriding
anything in environ.)

(martin)

2018-08-25 14:41:22 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by kre in ticket #987):

bin/sh/trap.c: revision 1.44

PR bin/36532 (perhaps)

This is more or less the same patch as provided in the PR
(just 11 years later, so changed a bit) by woods@...

Since there is no known way to actually cause the reported crash,
we may never know if this change actually fixes anything.  But
even if it doesn't it certainly cannot hurt.

There is a potential race which could possibly explain the issue
(see commentary in the PR) which is not easy to avoid - if that is
the actual cause, this should provide a defence, if not really a fix.

(martin)

2018-08-25 14:35:22 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by ozaki-r in ticket #986):

sys/netipsec/key.c: revision 1.257

Don't call key_ismyaddr, which may sleep, in a pserialize read section

Use mutex here instead of pserialize because using mutex is simpler than
using psz+ref, which is another solution, and key_checkspidup isn't called in
any performance-sensitive paths.

(martin)

2018-08-25 14:33:04 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by manu in ticket #985):

crypto/external/bsd/openssl/lib/libcrypto/arch/i386/modes.inc: revision 1.2
crypto/external/bsd/openssl/lib/libcrypto/arch/i386/modes.inc: revision 1.3

Add missing defines:
https://github.com/openssl/openssl/pull/6828

When ghash-x86.S is generated with -DOPENSSL_IA32_SSE2 we need to
compile
gcm128.c with the same flags.

Reported by manu@

remove -DGHASH_ASM_X86; it is already defined.

(martin)

2018-08-25 14:28:00 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by jdolecek in ticket #984):

sys/arch/xen/xen/xbd_xenbus.c: revision 1.83

avoid race condition between I/O submission in xbd_diskstart() and
interrupt handling in xbd_handler() - need to protect it with splbio()

fixes PR port-xen/53506 by Emmanuel Dreyfus, and likely also port-xen/53074
by Brad Spencer

(martin)

2018-08-25 14:22:50 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by kre in ticket #983):

bin/sh/eval.c: revision 1.158
bin/sh/eval.h: revision 1.21
bin/sh/main.c: revision 1.74

PR bin/48875

Revert the changes that were made 19 May 2016 (principally eval.c 1.125)
and the bug fixes in subsequent days (eval.c 1.126 and 1.127) and also
update some newer code that was added more recently which acted in
accordance with those changes (make that code be as it would have been
if the changes now being reverted had never been made).

While the changes made did solve the problem, in a sense, they were
never correct (see the PR for some discussion) and it had always been
intended that they be reverted.  However, in practical sh code, no
issues were reported - until just recently - so nothing was done,
until now...

After this commit, the validate_fn_redirects test case of the sh ATF
test t_redir will fail.  In particular, the subtest of that test
case which is described in the source (of the test) as:

This one is the real test for PR bin/48875

will fail.

Alternative changes, not to "fix" the problem in the PR, but to
often avoid it will be coming very soon - after which that ATF
test will succeed again.

XXX pullup-8

(martin)

2018-08-25 11:45:40 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by kre in ticket #982):

bin/sh/eval.c: revision 1.157

PR bin/42184 PR bin/52687  (detailing the same bug).

Fix "command not found" handling so that the error message
goes to stderr (after any redirections are applied).

More importantly, in

foo > /tmp/junk

/tmp/junk should be created, before any attempt is made
to execute (the assumed non-existing) "foo".

All this was always true for any command (not found command)
containing a / in its name

foo/bar >/tmp/junk  2>>/tmp/errs

would have created /tmp/junk, then complained (in /tmp/errs)
about foo/bar not being found.  Now that happens for ordinary
commands as well.

The fix (which I found when I saw differences between our
code and FreeBSD's, where, for the benefit of PR 42184,
this has been fixed, sometime in the past 9 years) is
frighteningly simple.  Simply do not short circuit execution
(or print any error) when the initial lookup fails to
find the command - it will fail anyway when we actually
try running it.  The cost is a (seemingly unnecessary,
except that it really is) fork in this case.

This is what I had been planning, but I expected it would
be much more difficult than it turned out....

XXX pullup-8

(martin)

2018-08-25 11:38:19 UTC netbsd-8 commitmail json YAML

Sync to head the following, requested by roy in ticket #981:

external/bsd/dhcpcd/dist/src/defs.h            up to 1.1.1.16
external/bsd/dhcpcd/dist/src/dhcp.c            up to 1.13
external/bsd/dhcpcd/dist/src/dhcp6.c            up to 1.1.1.13
external/bsd/dhcpcd/dist/src/if-bsd.c          up to 1.1.1.9
external/bsd/dhcpcd/dist/src/if.c              up to 1.1.1.9
external/bsd/dhcpcd/dist/src/ipv4.c            up to 1.1.1.10
external/bsd/dhcpcd/dist/src/ipv6.c            up to 1.1.1.12
doc/3RDPARTY (manually edited)

Import dhcpcd-7.0.8 with the following changes:
  *  Don't use IP_PKTINFO on NetBSD-7 as it's incomplete.
  *  Workaround RTM_NEWADDR sending the wrong broadcast address
    on NetBSD-7.
  *  Silence diagnostics if an address vanishes when reading
    it's flags on all BSD's.
  *  Misc compiler warnings fixed.

(martin)

2018-08-25 11:29:52 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by mrg in ticket #980):

sys/dev/usb/usbdivar.h: revision 1.117
sys/external/bsd/dwc2/dwc2.c: revision 1.52
sys/dev/usb/xhcivar.h: revision 1.10
sys/dev/usb/motg.c: revision 1.22
sys/dev/usb/ehci.c: revision 1.260
sys/dev/usb/ehci.c: revision 1.261
sys/dev/usb/xhci.c: revision 1.96
sys/dev/usb/ohci.c: revision 1.282
sys/dev/usb/ohci.c: revision 1.283
sys/dev/usb/ehcivar.h: revision 1.45
sys/dev/usb/uhci.c: revision 1.281
sys/dev/usb/uhci.c: revision 1.282
sys/dev/usb/usbdi.c: revision 1.177
sys/dev/usb/ohcivar.h: revision 1.60
sys/dev/usb/uhcivar.h: revision 1.55
(all via patch)

pull across abort fixes from nick-nhusb.  add more abort fixes, using
ideas from Taylor and Nick, and myself.  special thanks to both who
inspired much of the code here, if not wrote it directly.
among other problems, this assert should no longer trigger:

  panic: kernel diagnostic assertion "xfer->ux_state == XFER_ONQU" failed: file "/current/src/sys/dev/usb/usbdi.c", line 914

using usbhist i was able to track down my instance of it being related
to userland close() beginning, dropping the sc_lock, and then the usb
softintr completes the transfer normally, and when it is done, the
abort path attempts to re-complete the transfer, and the above assert
is tripped.

changes from nhusb were commited with these logs:
--
Move the struct usb_task to struct usbd_xfer for everyone to use.
--
Set device transfer status to USBD_IN_PROGRESS if start methods succeeds
--
Actually set the transfer status on transfers in ohci_abort_xfer and
the controller is dying
--
Don't supply the lock to callout_halt when polling as it won't be held
--
Improve transfer abort
--
Mark device transfers as USBD_IN_PROGRESS appropriately and improve
abort handling
--
--
Mark device transfers as USBD_IN_PROGRESS appropriately and improve
abort handling
--

additional changes include:
- initialise the usb abort task in the HCI allocx routine, so that it
  can be safely usb_rem_task()'d.
- rework the handling of softintr vs cancellation vs timeout abort based
  upon a scheme from Taylor:
  when completing a transfer normally:
  - if the status is not in progress, it must be cancelled or timed out,
    and we should not process this xfer.
  - set the status as normal.
  - unconditionallly callout_stop() and usb_rem_task().  they're safe and
    either aren't running, or will run and do nothing.
  - finally call usb_transfer_complete().
  when aborting a transfer:
  - status should be cancelled or timed out.
  - if cancelling, callout_halt and usb_rem_task_wait() to make sure the
    timer is either done or cancelled.
  - at this point, the ux_status must not be cancelled or timed out, and
    if it is not in progress we're done.
  - set the status.
  - if the controller is dying, just return.
  - perform HCI-specific tasks to abort this xfer.
  - finally call usb_transfer_complete().
  for the timeout and timeout task:
  - if the HCI is not dying, and the ux_status is in progress, then
    trigger the usb abort task.
- remove UXFER_ABORTWAIT and UXFER_ABORTING.

tested on:
- multiple PC systems with several types of devices: ugen/UPS, ucom,
  umass with disk, ssd and cdrom backends, kbd, ms, using uhci, ehci
  and xhci.
- erlite3: sd@umass on dwc2.
- sunblade2000: kbd/ms and umass disk on ohci.

untested:
- motg, slhci and ahci.  motg has some portion of the new scheme
  applied, but slhci and ahci require more study.

future work includes pushing a lot of the common abort handling into
usbdi.c and leaving upm_abort() for HC specific tasks, but this change
is pullup-able to netbsd-7 and netbsd-8 as it does not change any
external API, as well as removing over 100 lines of code while adding
over 30 new asserts.

XXX: pullup-7, pullup-8.

fix DIAGNOSTIC build by not copying ub_usepolling to stack before use

Sprinkle __diagused

(martin)

2018-08-25 11:21:54 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by maxv in ticket #978):

dist/pf/share/man/man4/pfsync.4: revision 1.7
dist/pf/share/man/man4/pf.4: revision 1.13
dist/pf/share/man/man5/pf.os.5: revision 1.7
dist/pf/share/man/man4/pflog.4: revision 1.7
dist/pf/share/man/man5/pf.conf.5: revision 1.17

Add a bold note to say our PF is obsolete.

Add a deprecation note in each of the PF man pages (instead of just pf.4),
so that it's really clear.

(martin)

2018-08-25 11:13:06 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by mrg in ticket #977):

sys/compat/netbsd32/netbsd32_fs.c: revision 1.81
sys/compat/netbsd32/netbsd32.h: revision 1.119

support nullfs in netbsd32.

(martin)

2018-08-25 11:10:52 UTC MAIN commitmail json YAML

2018-08-25 11:06:00 UTC MAIN commitmail json YAML

2018-08-25 09:54:37 UTC MAIN commitmail json YAML

Add KAUTH_REQ_PROCESS_CANSEE_EPROC, and use it for the kern.proc node.
Same permission as before, so no functional change.

(maxv)

2018-08-25 08:12:28 UTC MAIN commitmail json YAML

Belatedly note the removal of vm86 (me, one year ago), and n8 (maya, two
weeks ago).

(maxv)

2018-08-25 08:08:26 UTC MAIN commitmail json YAML

Note removal of NDIS.

(maxv)

2018-08-25 07:48:57 UTC MAIN commitmail json YAML

2018-08-25 07:06:48 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by roy in ticket #976):

sbin/route/route.c: revision 1.160

Resolve every route(4) message type before printing anything more about it
other than the type and length.

This solves the issue where RTM_ONEWADDR is received and it tries to
parse route information from it.

(martin)

2018-08-25 05:56:25 UTC MAIN commitmail json YAML

Disable POOL_REDZONE until we figure out what's wrong. There must be a dumb
problem, that is not triggerable on amd64.

(maxv)

2018-08-25 02:42:49 UTC MAIN commitmail json YAML

PR bin/53548

Deal with the new shell internal exit reason EXEXIT in the case of
a shell which has vfork()'d.  It takes a peculiar set of circumstances
to get into a situation where this is ever relevant, but it can be
done.  See the PR for details.

(kre)

2018-08-25 01:02:49 UTC pgoyette-compat commitmail json YAML

Separate the TODO list into two lists, required-for-merge vs not-required.

Expand a couple entries.

(pgoyette)

2018-08-25 00:09:12 UTC MAIN commitmail json YAML

arm: Add UEFI boot loader for ARM64 platforms.

(jmcneill)

2018-08-25 00:07:09 UTC MAIN commitmail json YAML

2018-08-24 23:22:10 UTC MAIN commitmail json YAML

Use absolute paths for default kernel filenames

(jmcneill)

2018-08-24 23:21:56 UTC MAIN commitmail json YAML

If we could not query the DevicePathProtocol handle, just select no default boot device instead of exiting.

(jmcneill)

2018-08-24 23:20:41 UTC MAIN commitmail json YAML

Sanitize the memory map passed to the kernel.

(jmcneill)

2018-08-24 23:19:42 UTC MAIN commitmail json YAML

If the boot device could not be determined, use the first one found as
the default. While here, remove unnecessary calls to LibFileSystemInfo().

(jmcneill)

2018-08-24 21:56:13 UTC MAIN commitmail json YAML

/cpus node may have any nodes except cpu. count only nodes of device_type "cpu"

(ryo)

2018-08-24 20:55:20 UTC MAIN commitmail json YAML

Start counting down at 5 instead of 4

(jmcneill)

2018-08-24 20:51:16 UTC MAIN commitmail json YAML

EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.Reset() may not be supported. Failing to reset is not a fatal error, so ignore the status.

(jmcneill)

2018-08-24 20:26:03 UTC MAIN commitmail json YAML

OpenSSH 7.8 is out

(sevan)

2018-08-24 19:06:30 UTC MAIN commitmail json YAML

set correctly TCR_EL1 for inner shareable when MULTIPROCESSOR

(ryo)

2018-08-24 17:09:30 UTC MAIN commitmail json YAML

mark one entry as done

(maxv)

2018-08-24 17:06:29 UTC MAIN commitmail json YAML

Use a random hunique, instead of sending the pointer of the interface.
Tested via ATF.

(maxv)

2018-08-24 16:37:19 UTC MAIN commitmail json YAML

<sys/queue.h> for TAILQ_*.  Parenthesize macro arguments.

(riastradh)

2018-08-24 16:01:57 UTC MAIN commitmail json YAML

Adjust makemandb for the latest mandoc

ok christos@

(abhinav)

2018-08-24 14:24:50 UTC MAIN commitmail json YAML

Remove trailing whitespace.

(wiz)

2018-08-24 14:04:27 UTC MAIN commitmail json YAML

Use __predict_false to optimize, and also replace panic->printf.

(maxv)

2018-08-24 11:43:13 UTC MAIN commitmail json YAML

2018-08-24 11:41:16 UTC MAIN commitmail json YAML

2018-08-24 10:04:41 UTC MAIN commitmail json YAML

fix output since protocol agnostic change went in.

XXX: i thought someone hooked this into atf already, please do :)

(mrg)

2018-08-24 05:39:04 UTC MAIN commitmail json YAML

Note kASan support.

(maxv)

2018-08-24 03:25:01 UTC MAIN commitmail json YAML

opt_dtrace.h for KDTRACE_HOOKS.  Use __nothing for empty expansion.

(riastradh)

2018-08-24 02:10:46 UTC MAIN commitmail json YAML

Remove unused file.

(jmcneill)

2018-08-24 02:01:07 UTC MAIN commitmail json YAML

2018-08-24 01:59:40 UTC MAIN commitmail json YAML

2018-08-23 22:34:03 UTC MAIN commitmail json YAML

Deal with reserved memory ranges that start before mem start

(jmcneill)

2018-08-23 21:01:43 UTC MAIN commitmail json YAML

2018-08-23 20:54:43 UTC MAIN commitmail json YAML

2018-08-23 19:01:22 UTC MAIN commitmail json YAML

Fix LOADADDR on aarch64 and use memmove for bcopy instead of memcpy

(jmcneill)

2018-08-23 17:35:42 UTC MAIN commitmail json YAML

Support loading read-only data sections. ARM64 ELF kernels need this. ok skrll@

(jmcneill)

2018-08-23 16:25:38 UTC MAIN commitmail json YAML

mark netbsd-6* as Terminated

(snj)

2018-08-23 13:24:44 UTC MAIN commitmail json YAML

2018-08-23 12:18:02 UTC MAIN commitmail json YAML

Add kASan redzones on pools and pool_caches. Also enable POOL_REDZONE
on DIAGNOSTIC.

(maxv)

2018-08-23 11:56:10 UTC MAIN commitmail json YAML

Improve the detection on global variables, no need to round up.

(maxv)

2018-08-23 11:53:15 UTC MAIN commitmail json YAML

Fix buffer overflow, detected by kASan.

[    1.044878] kASan: Unauthorized Access In 0xffffffff804ec7e2: Addr 0xffffffff818a51e4 [2 bytes, read]
[    1.044878] #0 0xffffffff804ec7e2 in mskc_probe <netbsd>
[    1.044878] #1 0xffffffff80e92a77 in mapply <netbsd>
[    1.044878] #2 0xffffffff80e92e5f in config_search_loc <netbsd>
[    1.044878] #3 0xffffffff80e93fb5 in config_found_sm_loc <netbsd>
[    1.044878] #4 0xffffffff802ca9ea in pci_probe_device <netbsd>
[    1.044878] #5 0xffffffff802cad97 in pci_enumerate_bus <netbsd>
[    1.044878] #6 0xffffffff802caf00 in pcirescan <netbsd>
[    1.044878] #7 0xffffffff802cb1ee in pciattach <netbsd>
[    1.044878] #8 0xffffffff80e93e5b in config_attach_loc <netbsd>
[    1.044878] #9 0xffffffff80e93fce in config_found_sm_loc <netbsd>
[    1.044878] #10 0xffffffff80271212 in mp_pci_scan <netbsd>
[    1.044878] #11 0xffffffff8022d9ee in mainbus_attach <netbsd>
[    1.044878] #12 0xffffffff80e93e5b in config_attach_loc <netbsd>
[    1.044878] #13 0xffffffff8021e38b in cpu_configure <netbsd>
[    1.044878] #14 0xffffffff814a7068 in main <netbsd>

(maxv)

2018-08-23 06:21:37 UTC MAIN commitmail json YAML

PR/53544: Add a dependency on the Makefile to fix incremental builds.

(christos)

2018-08-23 05:19:12 UTC MAIN commitmail json YAML

2018-08-23 05:18:45 UTC MAIN commitmail json YAML

- Add C62x to the descriptions of Intel C620 series devices.
- Add 0xa1ca for Intel C629 LPC or eSPI.

(msaitoh)

2018-08-23 04:04:35 UTC MAIN commitmail json YAML

Remove inclusion of old m68k/sysctl.h

(msaitoh)

2018-08-23 01:55:38 UTC MAIN commitmail json YAML

Don't call key_ismyaddr, which may sleep, in a pserialize read section

Use mutex here instead of pserialize because using mutex is simpler than
using psz+ref, which is another solution, and key_checkspidup isn't called in
any performance-sensitive paths.

(ozaki-r)

2018-08-23 01:25:22 UTC MAIN commitmail json YAML

Support building libfdt with _STANDALONE

(jmcneill)

2018-08-23 01:10:36 UTC MAIN commitmail json YAML

Fix edge case of reference counting, oops.

PR kern/53441

XXX pullup-7
XXX pullup-8

(riastradh)

2018-08-23 01:10:28 UTC MAIN commitmail json YAML

Attempt to make sense of return values of nouveau_fence_wait.

PR kern/53441

XXX pullup-7
XXX pullup-8

(riastradh)

2018-08-23 01:10:21 UTC MAIN commitmail json YAML

Defer nouveau_fence_unref until spin unlock.

- kfree while holding a spin lock is not a good idea.
- Make sure we GC every time we might signal fences.

PR kern/53441

XXX pullup-7
XXX pullup-8

(riastradh)

2018-08-23 01:10:04 UTC MAIN commitmail json YAML

Fences may last longer than their channels.

- Use a reference count on the nouveau_fence_chan object.
- Acquire it with kpreemption disabled.
- Use xcall to wait for kpreempt-disabled sections to complete.

PR kern/53441

XXX pullup-7
XXX pullup-8

(riastradh)

2018-08-23 01:06:51 UTC MAIN commitmail json YAML

2018-08-22 20:08:54 UTC MAIN commitmail json YAML

Fix (hopefully) the problem reported on current-users by Patrick Welche.
we had incorrect usage of setstackmark()/popstackmark()

There was an ancient idiom (imported from CSRG in 1993) where code
can do:
setstackmark(&smark); loop until whatever condition {
/* do lots of code */ popstackmark(&smark);
} popstackmark(&smark);

The 1st (inner) popstackmark() resets the stack, conserving memory,
The 2nd one is needed just in case the "whatever condition" was never
true, and the first one was never executed.

This is (was) safe as all popstackmark() did was reset the stack.
That could be done over and over again with no harm.

That is, until 2000 when a fix from FreeBSD for another problem was
imported.  That connected all the stack marks as a list (so they can be
located).  That caused the problem, as the idiom was not changed, now
there is this list of marks, and popstackmark() was removing an entry.

It rarely (never?) caused any problems as the idiom was rarely used
(the shell used to do loops like above, mostly, without the inner
popstackmark()).  Further, the stack mark list is only ever used when
a memory block is realloc'd.

That is, until last weekend - with the recent set of changes.

Part of that copied code from FreeBSD introduced the idiom above
into more functions - functions used much more, and with a greater
possibility of stack marks being set on blocks that are realloc'd
and so cause the problem.  In the FreeBSD code, they changed the idiom,
and always do a setstackmark() immediately after the inner popstackmark().
But not for reasons related to a list of stack marks, as in the
intervening period, FreeBSD deleted that, but for another reason.

We do not have their issue, and I did not believe that their
updated idiom was needed (I did some analysis of exactly this issue -
just missed the important part!), and just continued using the old one.
Hence Patrick's core dump....

The solution used here is to split popstackmark() into 2 halves,
popstackmark() continues to do what it has (recently) done,
but is now implemented as a call of (a new func) rststackmark()
which does all the original work of popstackmark - but not removing
the entry from the stack mark list (which remains in popstackmark()).
Then in the idiom above, the inner popstackmark() turns into a call of
rststackmark() so the stack is reset, but the stack mark list is
unchanged.  Tail recursion elimination makes this essentially free.

(kre)

2018-08-22 17:38:38 UTC MAIN commitmail json YAML

lint library for pmc is gone.

(christos)

2018-08-22 17:25:02 UTC MAIN commitmail json YAML

Unwind the stack on error, to get the full path that led to the illegal
access. Example of output:

kASan: Unauthorized Access In 0xffffffff80e6219c: Addr 0xffffbb007a39fd03 [1 byte, read]
#0 0xffffffff80e6219c in ras_purgeall <netbsd>
#1 0xffffffff80e62330 in sys_rasctl <netbsd>
#2 0xffffffff80265008 in syscall <netbsd>

(I manually added a one-byte stack read overflow in rasctl to demonstrate.)

(maxv)

2018-08-22 17:04:36 UTC MAIN commitmail json YAML

Explicitly unpoison the stack when entering a softint.

Softints are the only place where we "discard" a part of the stack: we may
have left the thread without allowing the asan instrumentation to clear
the poison, and in this case, we can get false positives when we hit a
poisoned area of the stack while executing another handler within the same
softint thread.

(I was actually getting a rare false positive in ip6intr.)

(maxv)

2018-08-22 14:12:30 UTC MAIN commitmail json YAML

- opt_kasan.h is included from <sys/asan.h>
- now that we are not using inlines, we need one more ifdef.

(christos)

2018-08-22 14:11:26 UTC MAIN commitmail json YAML

- since we include asan.h unconditionally now, make sure opt_kasan.h is
  included here, following the practice from other header files.
- don't use inline functions, adds complexity (and broke the build)

(christos)

2018-08-22 13:16:41 UTC MAIN commitmail json YAML

Explicitly disable v3d, pixelvalve, and hvs for bcm283x at the moment.

When these devices or hdmi are enabled, firmware turns off GPU functionality of
VideoCore, expecting OS drivers handle it appropriately:

https://github.com/raspberrypi/firmware/issues/763

This breaks userland applications using /dev/vchiq, such as omxplayer.

XXX We need enable them back when we import vc4 drm driver.

Fix PR port-evbarm/52984 and
PR port-arm/53042.

OK jmcneill, skrll

(rin)

2018-08-22 12:42:06 UTC MAIN commitmail json YAML

Add back the KASAN ifdefs in kern_malloc until we sort out the type issue,
and fix sys/asan.h. Tested on i386, amd64 and amd64-kasan.

(maxv)

2018-08-22 12:14:29 UTC MAIN commitmail json YAML

Temporarily disable the dummy inline funcs, and replace them with
__nothing until maxv sorts out the type issues - kern_malloc()
(for historical reasons) takes an unsigned long parameter, not a
size_t - on 64 bit arch's this makes no difference (size_t is unsigned
long) but that's not true on 32 bit archs (or not all of them anyway).

This should unbreak the i386 build (others?) - hopefully without
damaging anything too badly.    Note the type issues need fixing,
just making this change permanent is not the solution.

(kre)

2018-08-22 12:07:43 UTC MAIN commitmail json YAML

Add support for monitoring the stack with kASan. This allows us to detect
illegal memory accesses occuring there.

The compiler inlines a piece of code in each function that adds redzones
around the local variables and poisons them. The illegal accesses are then
detected using the usual kASan machinery.

The stack size is doubled, from 4 pages to 8 pages.

Several boot functions are marked with the __noasan flag, to prevent the
compiler from adding redzones in them (because we haven't yet initialized
kASan). The kasan_early_init function is called early at boot time to
quickly create the shadow for the current stack; after this is done, we
don't need __noasan anymore in the boot path.

We pass -fasan-shadow-offset=0xDFFF900000000000, because the compiler
wants to do
shad = shadow-offset + (addr >> 3)
and we do, in kasan_addr_to_shad
shad = KASAN_SHADOW_START + ((addr - CANONICAL_BASE) >> 3)
hence
shad = KASAN_SHADOW_START + (addr >> 3) - (CANONICAL_BASE >> 3)
    = [KASAN_SHADOW_START - (CANONICAL_BASE >> 3)] + (addr >> 3)
implies
shadow-offset = KASAN_SHADOW_START - (CANONICAL_BASE >> 3)
              = 0xFFFF800000000000 - (0xFFFF800000000000 >> 3)
              = 0xDFFF900000000000

In UVM, we add a kasan_free (that is not preceded by a kasan_alloc). We
don't add poisoned redzones ourselves, but all the functions we execute
do, so we need to manually clear the poison before freeing the stack.

With the help of Kamil for the makefile stuff.

(maxv)

2018-08-22 11:55:28 UTC MAIN commitmail json YAML

Change __always_inline to simple __inline to unbreak the build.

(martin)

2018-08-22 10:09:22 UTC MAIN commitmail json YAML

Actually add __unused on the functions themselves in case a .c file does
not use one function.

(maxv)

2018-08-22 09:38:21 UTC MAIN commitmail json YAML

Reduce the number of KASAN ifdefs, suggested by Christos/Taylor.

(maxv)

2018-08-22 09:11:47 UTC MAIN commitmail json YAML

Fix the computation in kasan_shadow_map, we may need one more page because
of the rounddown.

(maxv)

2018-08-22 07:47:33 UTC MAIN commitmail json YAML

2018-08-22 07:43:03 UTC MAIN commitmail json YAML

2018-08-22 06:31:37 UTC MAIN commitmail json YAML

Den't set SA_RESTART in the signal handler allowing the process to get
interrupted durning recv and exit (pointed out by kre@)

(christos)

2018-08-22 03:12:31 UTC MAIN commitmail json YAML

- SIOCGIFINDEX was added in 2013, but if_freenameindex(3) have not used it
  for years. Use it to improve performance. Same as FreeBSD.
- KNF.

(msaitoh)

2018-08-22 01:05:24 UTC MAIN commitmail json YAML

2018-08-21 23:34:56 UTC MAIN commitmail json YAML

Mark kernel-asan as done (by maxv)

(kamil)

2018-08-21 20:13:13 UTC MAIN commitmail json YAML

2018-08-21 18:55:09 UTC MAIN commitmail json YAML

(only commit message for rev 1.85, no actual change)

shuffle code in xbd_handler() response loop so that req_bp is never
touched for non I/O responses; unknown commands are now just skipped, also
without touching neither xbdreq, nor req_bp

add some KASSERTS() for xbdreq->req_nr_segments and xbdreq->req_bp,
and reset req_bp after it's processed to ensure the buf can never
be processed twice

intended to simplify debugging in cases like PR port-xen/53506

(jdolecek)

2018-08-21 18:45:16 UTC MAIN commitmail json YAML

2018-08-21 18:31:55 UTC MAIN commitmail json YAML

remove code handling buffers not aligned to 512-byte boundary, simply return
EINVAL straight away

the condition doesn't seem to be actually hit for normal boots and
tools like fsck, which is good thing since it allocated memory
separately for each such I/O

(jdolecek)

2018-08-21 18:11:10 UTC MAIN commitmail json YAML

avoid race condition between I/O submission in xbd_diskstart() and
interrupt handling in xbd_handler() - need to protect it with splbio()

fixes PR port-xen/53506 by Emmanuel Dreyfus, and likely also port-xen/53074
by Brad Spencer

(jdolecek)

2018-08-21 15:37:34 UTC MAIN commitmail json YAML

2018-08-21 14:59:13 UTC MAIN commitmail json YAML

Result of audit to check that mbuf length is checked before m_copydata()
and that any data supposedly copied out is valid before use.

prompted by maxv@, I have checked every usage of m_copydata() and made
the following corrections

hci_event.c:
hci_event_command_compl()
check that the packet does contain enough data for there to
be a status code before noting possible failures.

hci_event_num_compl_pkts()
check that the packet does contain data to cover the
stated number of handle/num pairs

l2cap_signal.c:
l2cap_recv_signal()
just ignore packets with not enough data rather than
trying to reject them (may not have cmd.ident)

l2cap_recv_command_rej()
check we have a valid reason and/or data before use

(plunky)

2018-08-21 14:09:41 UTC MAIN commitmail json YAML

Fix two typos in the Sunxi thermal driver.

Noticed by rudolf in PR port-arm/53537.

ok jmcneill@

(bsiegert)

2018-08-21 13:00:17 UTC MAIN commitmail json YAML

Add missing lint library, sort

(christos)

2018-08-21 11:47:37 UTC MAIN commitmail json YAML