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 (2h)  netbsd-8 (5d)  netbsd-10 (5d)  netbsd-9 (11d)  thorpej-ifq (175d)  thorpej-altq-separation (178d) 

2024-05-10 05:46:40 UTC Now

2019-12-14 17:28:59 UTC MAIN commitmail json YAML

Merge from yamt-pagecache: use radixtree for page lookup.

rbtree page lookup was introduced during the NetBSD 5.0 development cycle to
bypass lock contention problems with the (then) global page hash, and was a
temporary solution to allow us to make progress.  radixtree is the intended
replacement.

Ok yamt@.

(ad)

2019-12-14 17:24:43 UTC MAIN commitmail json YAML

2019-12-14 17:24:30 UTC MAIN commitmail json YAML

revert previous - i was confused about boot files on rpi + aarch64

(skrll)

2019-12-14 17:23:47 UTC MAIN commitmail json YAML

2019-12-14 17:23:31 UTC MAIN commitmail json YAML

Omit vestigial unused commented-out experiment.

(riastradh)

2019-12-14 17:15:54 UTC MAIN commitmail json YAML

dm: Don't try to implement "status" as subset of "table"

The way dm_table_status_ioctl() implements "status" and "table" is
not compatible with Linux kernel. Some targets have different outputs
that "status" can't be implemented as subset of "table".

Add ->info() handler to sync with "status" behavior in Linux kernel.
Some targets which currently exist in NetBSD (I think striped)
as well as some minor targets that I plan to port to NetBSD
can/should implement ->info(), but will do that in a different commit.

taken-from: DragonFlyBSD

(tkusumi)

2019-12-14 17:04:02 UTC MAIN commitmail json YAML

Allow RPI firmware boots to work again

(skrll)

2019-12-14 16:58:38 UTC MAIN commitmail json YAML

Just use KASSERTMSG and panic.  No need for custom wrappers.

(riastradh)

2019-12-14 16:58:25 UTC MAIN commitmail json YAML

Remove charade dancing around now-dead RCU patent.

(riastradh)

2019-12-14 16:57:49 UTC MAIN commitmail json YAML

2019-12-14 16:56:34 UTC MAIN commitmail json YAML

src/sys/external/bsd/acpica/dist/common/dmtables.c@1.3 / diff / nxr@1.3
src/sys/external/bsd/acpica/dist/compiler/aslanalyze.c@1.13 / diff / nxr@1.13
src/sys/external/bsd/acpica/dist/compiler/aslcompile.c@1.18 / diff / nxr@1.18
src/sys/external/bsd/acpica/dist/compiler/aslerror.c@1.14 / diff / nxr@1.14
src/sys/external/bsd/acpica/dist/compiler/aslfiles.c@1.15 / diff / nxr@1.15
src/sys/external/bsd/acpica/dist/compiler/aslload.c@1.16 / diff / nxr@1.16
src/sys/external/bsd/acpica/dist/compiler/asloptions.c@1.12 / diff / nxr@1.12
src/sys/external/bsd/acpica/dist/compiler/aslprepkg.c@1.12 / diff / nxr@1.12
src/sys/external/bsd/acpica/dist/compiler/aslutils.c@1.25 / diff / nxr@1.25
src/sys/external/bsd/acpica/dist/compiler/aslxref.c@1.16 / diff / nxr@1.16
src/sys/external/bsd/acpica/dist/compiler/dtcompile.c@1.15 / diff / nxr@1.15
src/sys/external/bsd/acpica/dist/compiler/dtcompilerparser.y@1.3 / diff / nxr@1.3
src/sys/external/bsd/acpica/dist/compiler/dtfield.c@1.15 / diff / nxr@1.15
src/sys/external/bsd/acpica/dist/debugger/dbdisply.c@1.16 / diff / nxr@1.16
src/sys/external/bsd/acpica/dist/debugger/dbinput.c@1.20 / diff / nxr@1.20
src/sys/external/bsd/acpica/dist/debugger/dbmethod.c@1.14 / diff / nxr@1.14
src/sys/external/bsd/acpica/dist/debugger/dbnames.c@1.13 / diff / nxr@1.13
src/sys/external/bsd/acpica/dist/disassembler/dmresrc.c@1.12 / diff / nxr@1.12
src/sys/external/bsd/acpica/dist/disassembler/dmwalk.c@1.12 / diff / nxr@1.12
src/sys/external/bsd/acpica/dist/dispatcher/dscontrol.c@1.12 / diff / nxr@1.12
      :
(more 12 files)
merge conflicts

(christos)

2019-12-14 15:40:43 UTC MAIN commitmail json YAML

Don't assume mii is not null here. Some drivers like urndis don't use
mii, so they always have mii == NULL.

ok riastradh. fixes PR kern/54762

(maya)

2019-12-14 15:36:08 UTC MAIN commitmail json YAML

2019-12-14 15:34:19 UTC MAIN commitmail json YAML

Update uvmexp.nswget with atomics.

(ad)

2019-12-14 15:30:37 UTC MAIN commitmail json YAML

2019-12-14 15:21:51 UTC MAIN commitmail json YAML

Skip npf_config_sync if nothing to do.

Saves an unnecessary pserialize_perform every second.

(riastradh)

2019-12-14 15:08:45 UTC MAIN commitmail json YAML

Don't call uvm_pagedequeue() while holding pg->interlock.

(ad)

2019-12-14 15:04:48 UTC MAIN commitmail json YAML

Adjust pdpending in uvm_pageout_start() and uvm_pageout_done() to avoid
the value going temporarily negative.

(ad)

2019-12-14 14:46:11 UTC MAIN commitmail json YAML

Use pageq.list instead of listq.list.

(ad)

2019-12-14 14:43:38 UTC MAIN commitmail json YAML

dm: Make dm_dbg_print_flags() take uint32_t flag

which comes from prop_dictionary_get_uint32() result.
taken-from: DragonFlyBSD

(tkusumi)

2019-12-14 13:48:10 UTC MAIN commitmail json YAML

Fix build... wire_count probably doesn't need atomics

(skrll)

2019-12-14 13:36:14 UTC MAIN commitmail json YAML

2019-12-14 12:36:33 UTC netbsd-9 commitmail json YAML

2019-12-14 12:35:58 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by gson in ticket #554):

sys/dev/usb/ohci.c: revision 1.292

Preserve the toggleCarry bit in the Endpoint Descriptor in
ohci_abort_xfer().  Fixes the OHCI part of PR kern/50278.

(martin)

2019-12-14 12:34:19 UTC netbsd-8 commitmail json YAML

2019-12-14 12:33:47 UTC netbsd-8 commitmail json YAML

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

sys/dev/usb/if_urtwn.c: revision 1.76

Reset MCU ready status before resetting the MCU.
Fixes PR kern/54728

(martin)

2019-12-14 12:32:11 UTC netbsd-9 commitmail json YAML

2019-12-14 12:30:58 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by gson in ticket #553):

sys/dev/usb/ohci.c: revision 1.291

Preserve the toggleCarry bit in the Endpoint Descriptor when handling
a DataUnderrun condition.  Fixes PR kern/54070.

(martin)

2019-12-14 12:29:13 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by mlelstev in ticket #552):

sys/dev/i2c/i2c.c: revision 1.70

Revert previous. Indirect matches are not wanted on platforms that
use external configuration data (FDT or OF).

(martin)

2019-12-14 12:26:05 UTC netbsd-9 commitmail json YAML

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

sys/dev/usb/if_urtwn.c: revision 1.76
sys/dev/usb/if_urtwn.c: revision 1.77

Reset MCU ready status before resetting the MCU.

Fixes PR kern/54728

Don't deregister twice with pmf.

(martin)

2019-12-14 12:24:23 UTC netbsd-9 commitmail json YAML

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

sys/arch/x86/x86/spectre.c: revision 1.32

Check CPUID.IBRS in addition to ARCH_CAP.IBRS_ALL. For clarity, and also
because VirtualBox clears the former but forgets to clear the latter (which
makes us hit a #GP on RDMSR).

(martin)

2019-12-14 12:22:43 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by tsutsui in ticket #549):

sys/arch/emips/emips/interrupt.c: revision 1.7
sys/arch/emips/emips/interrupt.c: revision 1.8

Fix incorrect argument order of cpu_intr(), slipped in rev 1.2.

Pointed out by maya@ in PR/45080.

Should be pulled up to netbsd-9.

-

Fix a longstanding "freeze right after enabling interrupt" problem.

With this fix, finally NetBSD/emips on Giano is fully functional.
See PR/45080 for more details.

Should be pulled up to netbsd-9.

(martin)

2019-12-14 12:01:13 UTC MAIN commitmail json YAML

autofs: Make /dev/autofs cdevsw functions static

Also less confusing since autofs vnops also has autofs_{open,close} in NetBSD.

(tkusumi)

2019-12-14 12:00:40 UTC MAIN commitmail json YAML

2019-12-14 11:20:51 UTC MAIN commitmail json YAML

dm: Move extern declaration of global variables to dm.h

(tkusumi)

2019-12-14 10:59:25 UTC MAIN commitmail json YAML

switch powerpc to GCC 8.

(mrg)

2019-12-14 10:49:30 UTC MAIN commitmail json YAML

dm: Remove void casts of function calls

Use of void casts in dm is not consistent, just get rid of them.

(tkusumi)

2019-12-14 10:02:35 UTC MAIN commitmail json YAML

dm: Remove unconditional debug prints in targets' ->strategy()

Having debug prints in ->strategy() by default just to tell ->strategy()
is called is overkill.
taken-from: DragonFlyBSD

(tkusumi)

2019-12-14 09:05:30 UTC MAIN commitmail json YAML

Handle NULL params, fix error paths.

(mlelstv)

2019-12-14 07:45:20 UTC MAIN commitmail json YAML

Disable multiboot for now, too much breakage.

(maxv)

2019-12-14 04:12:50 UTC MAIN commitmail json YAML

use FC enable bit for 8842 host port

(nisimura)

2019-12-14 02:58:20 UTC MAIN commitmail json YAML

2019-12-13 23:01:41 UTC MAIN commitmail json YAML

call cpu_topology_set() with adjustments for 970MP CPUs

(macallan)

2019-12-13 22:12:41 UTC MAIN commitmail json YAML

When finding (paritioning scheme native) partition types for file systems
from our install description, pass the partition type (not only the file
system type). Sometimes (e.g. EFI boot partition on GPT) the filesystem
type (MSDOS) is not a unique selector.

(martin)

2019-12-13 22:10:21 UTC MAIN commitmail json YAML

2019-12-13 21:46:59 UTC MAIN commitmail json YAML

When trying to tell a fictious but empty label from a real one, skip
partition a if it has the same start and size as the raw partition.

(martin)

2019-12-13 20:50:08 UTC MAIN commitmail json YAML

NetBSD 9.99.24 - UVM changes

(ad)

2019-12-13 20:25:16 UTC MAIN commitmail json YAML

move P_tmpdir from "/var/tmp/" to "/tmp/".

the main effect of this is to make GCC and other libiberty using
tools use /tmp instead of /var/tmp for compiler temp files,
which can be a bottleneck on larger systems.

a survey of other platforms shows only OSX also uses /var/tmp,
everyone else has switched to /tmp long ago.

cons:  some smaller systems may have a smaller /tmp than /var/tmp,
and this may cause builds to fail with out of space earlier.
point the build to /var/tmp using TMPDIR in this case.

one can argue that setting TMPDIR would work around this, but we
want to have the effect for all users without having special setup.

(mrg)

2019-12-13 20:14:25 UTC MAIN commitmail json YAML

Break the global uvm_pageqlock into a per-page identity lock and a private
lock for use of the pagedaemon policy code.  Discussed on tech-kern.

PR kern/54209: NetBSD 8 large memory performance extremely low
PR kern/54210: NetBSD-8 processes presumably not exiting
PR kern/54727: writing a large file causes unreasonable system behaviour

(ad)

2019-12-13 20:10:22 UTC MAIN commitmail json YAML

2019-12-13 16:15:54 UTC MAIN commitmail json YAML

dm: Don't KASSERT() target handlers

Having assertions here causes panic if target is missing anything
as shown in "dm: Add dummy target ->sync()/->secsize() to prevent panic on modload(8)".
Instead just return EINVAL if a handler(s) isn't implemented.

taken-from: DragonFlyBSD

(tkusumi)

2019-12-13 15:49:22 UTC MAIN commitmail json YAML

dm: Fix memory leak in dm_pdev_rem()

Need to free dmp regardless of dm_pdev_rem() return value.
taken-from: DragonFlyBSD

(tkusumi)

2019-12-13 14:13:55 UTC MAIN commitmail json YAML

Read the len before pushing the packet, otherwise possible use-after-free.
Found by a custom query on LGTM.

(maxv)

2019-12-13 14:10:32 UTC MAIN commitmail json YAML

Fix gross use-after-free. Found by a custom query on LGTM.

(maxv)

2019-12-13 12:05:11 UTC MAIN commitmail json YAML

Do not try to change the keyboard layout if we are not running on the
console.

(martin)

2019-12-13 08:30:26 UTC MAIN commitmail json YAML

2019-12-13 08:11:12 UTC MAIN commitmail json YAML

Fix KASAN support by calling kasan_shadow_map in pmap_growkernel

(skrll)

2019-12-13 08:02:53 UTC MAIN commitmail json YAML

Trailing whitespace

(skrll)

2019-12-13 08:01:26 UTC MAIN commitmail json YAML

2019-12-13 07:59:36 UTC MAIN commitmail json YAML

Inclide sys/atomic for atomic_store_relaxed

(skrll)

2019-12-13 02:03:46 UTC MAIN commitmail json YAML

KNF. No functional change.

(msaitoh)

2019-12-12 22:55:20 UTC MAIN commitmail json YAML

2019-12-12 21:02:19 UTC netbsd-9 commitmail json YAML

2019-12-12 21:00:32 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by maya in ticket #548):

sys/external/bsd/drm2/dist/drm/i915/intel_display.c: revision 1.28
sys/external/bsd/drm2/dist/drm/i915/i915_drv.h: revision 1.30
sys/external/bsd/common/include/linux/bitops.h: revision 1.9
sys/external/bsd/drm2/dist/drm/i915/intel_drv.h: revision 1.11
sys/external/bsd/drm2/dist/drm/i915/i915_gem_gtt.h: revision 1.8
sys/external/bsd/drm2/dist/drm/i915/i915_gem_gtt.c: revision 1.16
sys/external/bsd/drm2/dist/drm/i915/i915_gem_execbuffer.c: revision 1.9
sys/external/bsd/drm2/dist/drm/i915/i915_dma.c: revision 1.28
sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.c: revision 1.19
sys/external/bsd/drm2/dist/drm/i915/intel_pm.c: revision 1.20
sys/external/bsd/drm2/dist/drm/i915/intel_ringbuffer.c: revision 1.11
sys/external/bsd/drm2/dist/drm/i915/intel_ringbuffer.h: revision 1.7
sys/external/bsd/drm2/dist/drm/i915/i915_reg.h: revision 1.14
sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.c: revision 1.20
sys/external/bsd/drm2/dist/drm/i915/i915_gem_context.c: revision 1.10
sys/external/bsd/drm2/dist/drm/i915/i915_drv.c: revision 1.17

Add what appears to be the fixes to CVE-2019-0154, CVE-2019-0155.

This commit requires review, but I'd also like it to be tested by others
while it is being reviewed.
CVE-2019-0155:

It was discovered that the Intel i915 graphics chipsets allowed userspace
to modify page table entries via writes to MMIO from the Blitter Command
Streamer and expose kernel memory information. A local attacker could use
this to expose sensitive information or possibly elevate privileges.

CVE-2019-0154:
It was discovered that the Intel i915 graphics chipsets could cause
a system hang when userspace performed a read from GT memory mapped
input output (MMIO) when the product is in certain low power states.
A local attacker could use this to cause a denial of service.
From upstream commits to linux-4.4.y:
-------------------
From 6d0cfddc7afc715835f0e17827106f832b14dd2a Mon Sep 17 00:00:00 2001
From: Jon Bloomfield <jon.bloomfield%intel.com@localhost>
Date: Thu, 12 Jul 2018 19:53:10 +0100
Subject: [PATCH] drm/i915/gtt: Add read only pages to gen8_pte_encode
We can set a bit inside the ppGTT PTE to indicate a page is read-only;
writes from the GPU will be discarded. We can use this to protect pages
and in particular support read-only userptr mappings (necessary for
importing PROT_READ vma).
-------------------
From 774b68aa2105c70b40c3b1777feb7ab500d716dd Mon Sep 17 00:00:00 2001
From: Jon Bloomfield <jon.bloomfield%intel.com@localhost>
Date: Mon, 6 Aug 2018 14:10:48 -0700
Subject: [PATCH] drm/i915/gtt: Read-only pages for insert_entries on bdw+
Hook up the flags to allow read-only ppGTT mappings for gen8+
v2: Include a selftest to check that writes to a readonly PTE are
dropped
v3: Don't duplicate cpu_check() as we can just reuse it, and even worse
don't wholesale copy the theory-of-operation comment from igt_ctx_exec
without changing it to explain the intention behind the new test!
v4: Joonas really likes magic mystery values
-------------------
From 3fd1c2e65c60c1c513155e1d1d74138b141aa8a3 Mon Sep 17 00:00:00 2001
From: Chris Wilson <chris%chris-wilson.co.uk@localhost>
Date: Thu, 12 Jul 2018 19:53:12 +0100
Subject: [PATCH] drm/i915/gtt: Disable read-only support under GVT
GVT is not propagating the PTE bits, and is always setting the
read-write bit, thus breaking read-only support.
-------------------
From e5e3c0154c19f2d8213e0af88b7a10d9de7fbafd Mon Sep 17 00:00:00 2001
From: Jon Bloomfield <jon.bloomfield%intel.com@localhost>
Date: Fri, 20 Apr 2018 14:26:01 -0700
Subject: [PATCH] drm/i915: Rename gen7 cmdparser tables
We're about to introduce some new tables for later gens, and the
current naming for the gen7 tables will no longer make sense.
v2: rebase
-------------------
From 3122671a5df3ee13f5cf22b7bdacf422b7b4319a Mon Sep 17 00:00:00 2001
From: Jon Bloomfield <jon.bloomfield%intel.com@localhost>
Date: Fri, 8 Jun 2018 08:53:46 -0700
Subject: [PATCH] drm/i915: Disable Secure Batches for gen6+
Retroactively stop reporting support for secure batches
through the api for gen6+ so that older binaries trigger
the fallback path instead.
Older binaries use secure batches pre gen6 to access resources
that are not available to normal usermode processes. However,
all known userspace explicitly checks for HAS_SECURE_BATCHES
before relying on the secure batch feature.
Since there are no known binaries relying on this for newer gens
we can kill secure batches from gen6, via I915_PARAM_HAS_SECURE_BATCHES.
v2: rebase (Mika)
v3: rebase (Mika)
-------------------
From 544fd7d9d4cfe32357beab2f1dc543637d42e69f Mon Sep 17 00:00:00 2001
From: Jon Bloomfield <jon.bloomfield%intel.com@localhost>
Date: Fri, 8 Jun 2018 10:05:26 -0700
Subject: [PATCH] drm/i915: Remove Master tables from cmdparser
The previous patch has killed support for secure batches
on gen6+, and hence the cmdparsers master tables are
now dead code. Remove them.
-------------------
From 17e89f38212d8b3cba470efca91b997ac03c592c Mon Sep 17 00:00:00 2001
From: Jon Bloomfield <jon.bloomfield%intel.com@localhost>
Date: Wed, 1 Aug 2018 09:33:59 -0700
Subject: [PATCH] drm/i915: Add support for mandatory cmdparsing
The existing cmdparser for gen7 can be bypassed by specifying
batch_len=0 in the execbuf call. This is safe because bypassing
simply reduces the cmd-set available.
In a later patch we will introduce cmdparsing for gen9, as a
security measure, which must be strictly enforced since without
it we are vulnerable to DoS attacks.
Introduce the concept of 'required' cmd parsing that cannot be
bypassed by submitting zero-length bb's.
v2: rebase (Mika)
v2: rebase (Mika)
v3: fix conflict on engine flags (Mika)
-------------------
From 77524398bccea3592a25cbe92a9a54fa555013af Mon Sep 17 00:00:00 2001
From: Jon Bloomfield <jon.bloomfield%intel.com@localhost>
Date: Tue, 22 May 2018 13:59:06 -0700
Subject: [PATCH] drm/i915: Support ro ppgtt mapped cmdparser shadow buffers
For Gen7, the original cmdparser motive was to permit limited
use of register read/write instructions in unprivileged BB's.
This worked by copying the user supplied bb to a kmd owned
bb, and running it in secure mode, from the ggtt, only if
the scanner finds no unsafe commands or registers.
For Gen8+ we can't use this same technique because running bb's
from the ggtt also disables access to ppgtt space. But we also
do not actually require 'secure' execution since we are only
trying to reduce the available command/register set. Instead we
will copy the user buffer to a kmd owned read-only bb in ppgtt,
and run in the usual non-secure mode.
Note that ro pages are only supported by ppgtt (not ggtt), but
luckily that's exactly what we need.
Add the required paths to map the shadow buffer to ppgtt ro for Gen8+
v2: IS_GEN7/IS_GEN (Mika)
v3: rebase
v4: rebase
v5: rebase
-------------------
From 2ac501479a1325d00aca5012887ebfece8358032 Mon Sep 17 00:00:00 2001
From: Jon Bloomfield <jon.bloomfield%intel.com@localhost>
Date: Wed, 1 Aug 2018 09:45:50 -0700
Subject: [PATCH] drm/i915: Allow parsing of unsized batches
In "drm/i915: Add support for mandatory cmdparsing" we introduced the
concept of mandatory parsing. This allows the cmdparser to be invoked
even when user passes batch_len=0 to the execbuf ioctl's.
However, the cmdparser needs to know the extents of the buffer being
scanned. Refactor the code to ensure the cmdparser uses the actual
object size, instead of the incoming length, if user passes 0.
-------------------
From 57c2c8f58ca07e8045f020e4e2548ac3bc3a5aab Mon Sep 17 00:00:00 2001
From: Jon Bloomfield <jon.bloomfield%intel.com@localhost>
Date: Mon, 23 Apr 2018 11:12:15 -0700
Subject: [PATCH] drm/i915: Add gen9 BCS cmdparsing
For gen9 we enable cmdparsing on the BCS ring, specifically
to catch inadvertent accesses to sensitive registers
Unlike gen7/hsw, we use the parser only to block certain
registers. We can rely on h/w to block restricted commands,
so the command tables only provide enough info to allow the
parser to delineate each command, and identify commands that
access registers.
Note: This patch deliberately ignores checkpatch issues in
favour of matching the style of the surrounding code. We'll
correct the entire file in one go in a later patch.
v3: rebase (Mika)
v4: Add RING_TIMESTAMP registers to whitelist (Jon)
-------------------
From d88d2d3fc6076760e903e78135f5bef028e6e813 Mon Sep 17 00:00:00 2001
From: Jon Bloomfield <jon.bloomfield%intel.com@localhost>
Date: Fri, 21 Sep 2018 13:18:09 -0700
Subject: [PATCH] drm/i915/cmdparser: Add support for backward jumps
To keep things manageable, the pre-gen9 cmdparser does not
attempt to track any form of nested BB_START's. This did not
prevent usermode from using nested starts, or even chained
batches because the cmdparser is not strictly enforced pre gen9.
Instead, the existence of a nested BB_START would cause the batch
to be emitted in insecure mode, and any privileged capabilities
would not be available.
For Gen9, the cmdparser becomes mandatory (for BCS at least), and
so not providing any form of nested BB_START support becomes
overly restrictive. Any such batch will simply not run.
We make heavy use of backward jumps in igt, and it is much easier
to add support for this restricted subset of nested jumps, than to
rewrite the whole of our test suite to avoid them.
Add the required logic to support limited backward jumps, to
instructions that have already been validated by the parser.
Note that it's not sufficient to simply approve any BB_START
that jumps backwards in the buffer because this would allow an
attacker to embed a rogue instruction sequence within the
operand words of a harmless instruction (say LRI) and jump to
that.
We introduce a bit array to track every instr offset successfully
validated, and test the target of BB_START against this. If the
target offset hits, it is re-written to the same offset in the
shadow buffer and the BB_START cmd is allowed.
Note: This patch deliberately ignores checkpatch issues in the
cmdtables, in order to match the style of the surrounding code.
We'll correct the entire file in one go in a later patch.
v2: set dispatch secure late (Mika)
v3: rebase (Mika)
v4: Clear whitelist on each parse
Minor review updates (Chris)
v5: Correct backward jump batching
v6: fix compilation error due to struct eb shuffle (Mika)
-------------------
From 362917ebcfacbd9c2b5172d5a5fe8cbef3ab838f Mon Sep 17 00:00:00 2001
From: Jon Bloomfield <jon.bloomfield%intel.com@localhost>
Date: Thu, 20 Sep 2018 09:45:10 -0700
Subject: [PATCH] drm/i915/cmdparser: Ignore Length operands during command
matching
Some of the gen instruction macros (e.g. MI_DISPLAY_FLIP) have the
length directly encoded in them. Since these are used directly in
the tables, the Length becomes part of the comparison used for
matching during parsing. Thus, if the cmd being parsed has a
different length to that in the table, it is not matched and the
cmd is accepted via the default variable length path.
Fix by masking out everything except the Opcode in the cmd tables
-------------------
From 1433b8d41b1aa346e100b839c19fc033871ac5a6 Mon Sep 17 00:00:00 2001
From: Uma Shankar <uma.shankar%intel.com@localhost>
Date: Tue, 7 Aug 2018 21:15:35 +0530
Subject: [PATCH] drm/i915: Lower RM timeout to avoid DSI hard hangs
In BXT/APL, device 2 MMIO reads from MIPI controller requires its PLL
to be turned ON. When MIPI PLL is turned off (MIPI Display is not
active or connected), and someone (host or GT engine) tries to read
MIPI registers, it causes hard hang. This is a hardware restriction
or limitation.
Driver by itself doesn't read MIPI registers when MIPI display is off.
But any userspace application can submit unprivileged batch buffer for
execution. In that batch buffer there can be mmio reads. And these
reads are allowed even for unprivileged applications. If these
register reads are for MIPI DSI controller and MIPI display is not
active during that time, then the MMIO read operation causes system
hard hang and only way to recover is hard reboot. A genuine
process/application won't submit batch buffer like this and doesn't
cause any issue. But on a compromised system, a malign userspace
process/app can generate such batch buffer and can trigger system
hard hang (denial of service attack).
The fix is to lower the internal MMIO timeout value to an optimum
value of 950us as recommended by hardware team. If the timeout is
beyond 1ms (which will hit for any value we choose if MMIO READ on a
DSI specific register is performed without PLL ON), it causes the
system hang. But if the timeout value is lower than it will be below
the threshold (even if timeout happens) and system will not get into
a hung state. This will avoid a system hang without losing any
programming or GT interrupts, taking the worst case of lowest CDCLK
frequency and early DC5 abort into account.
-------------------
From 284d38667f7ed7171fd8f168c42490f9087c824c Mon Sep 17 00:00:00 2001
From: Imre Deak <imre.deak%intel.com@localhost>
Date: Mon, 9 Jul 2018 18:24:27 +0300
Subject: [PATCH] drm/i915/gen8+: Add RC6 CTX corruption WA
In some circumstances the RC6 context can get corrupted. We can detect
this and take the required action, that is disable RC6 and runtime PM.
The HW recovers from the corrupted state after a system suspend/resume
cycle, so detect the recovery and re-enable RC6 and runtime PM.
v2: rebase (Mika)
v3:
- Move intel_suspend_gt_powersave() to the end of the GEM suspend
  sequence.
- Add commit message.
v4:
- Rebased on intel_uncore_forcewake_put(i915->uncore, ...) API
  change.
v5: rebased on gem/gt split (Mika)
-------------------
From 6dd52bae8a01af77236b88917e84e84dbcfe06db Mon Sep 17 00:00:00 2001
From: Ben Hutchings <ben%decadent.org.uk@localhost>
Date: Mon, 11 Nov 2019 08:13:24 -0800
Subject: [PATCH] drm/i915/cmdparser: Fix jump whitelist clearing
When a jump_whitelist bitmap is reused, it needs to be cleared.
Currently this is done with memset() and the size calculation assumes
bitmaps are made of 32-bit words, not longs.  So on 64-bit
architectures, only the first half of the bitmap is cleared.
If some whitelist bits are carried over between successive batches
submitted on the same context, this will presumably allow embedding
the rogue instructions that we're trying to reject.
Use bitmap_zero() instead, which gets the calculation right.
Use the original linux function rather than my wrong translation.

-

...Include the header to have it.
Thanks Riastradh!

(martin)

2019-12-12 20:49:15 UTC netbsd-8 commitmail json YAML

2019-12-12 20:48:11 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by sevan in ticket #1471):

external/mit/lua/dist/src/lapi.c: revision 1.12

Apply a fix for the bug "Joining an upvalue with itself can cause a
use-after free", documented on http://www.lua.org/bugs.html

(martin)

2019-12-12 20:46:09 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by sevan in ticket #547):

external/mit/lua/dist/src/lapi.c: revision 1.12

Apply a fix for the bug "Joining an upvalue with itself can cause a
use-after free", documented on http://www.lua.org/bugs.html

(martin)

2019-12-12 20:43:08 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by ad in ticket #546):

sys/kern/kern_resource.c: revision 1.183
sys/kern/kern_softint.c: revision 1.49

calcru: ignore running softints, unless softint_timing is on.
Fixes crazy times reported for proc0.

(martin)

2019-12-12 20:14:22 UTC MAIN commitmail json YAML

Fix inverted comparison

(martin)

2019-12-12 19:29:05 UTC MAIN commitmail json YAML

Fix DISKLABEL_NO_ONDISK_VERIFY (accidently disabled in previous)

(martin)

2019-12-12 16:49:20 UTC MAIN commitmail json YAML

Check CPUID.IBRS in addition to ARCH_CAP.IBRS_ALL. For clarity, and also
because VirtualBox clears the former but forgets to clear the latter (which
makes us hit a #GP on RDMSR).

(maxv)

2019-12-12 16:36:25 UTC MAIN commitmail json YAML

Make sure to #include to get required definitions.

Should fix the build break reported by martin@

(pgoyette)

2019-12-12 16:28:24 UTC MAIN commitmail json YAML

2019-12-12 12:35:44 UTC MAIN commitmail json YAML

Apply a fix for the bug "Joining an upvalue with itself can cause a use-after
free", documented on http://www.lua.org/bugs.html

(mbalmer)

2019-12-12 12:27:14 UTC netbsd-9 commitmail json YAML

Annotate #526 for additional changes

(martin)

2019-12-12 12:26:20 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by maya in ticket #526):

external/mit/MesaLib/dist/src/intel/dev/gen_device_info.c: revision 1.5
external/mit/MesaLib/dist/src/loader/loader.c: revision 1.2
external/mit/MesaLib/dist/src/mesa/main/context.c: revision 1.8
external/mit/MesaLib/dist/src/util/disk_cache.c: revision 1.4
(all via patch)
external/mit/MesaLib/dist/src/egl/drivers/dri2/egl_dri2.c (apply patch)
external/mit/MesaLib/dist/src/gbm/backends/dri/gbm_dri.c (apply patch)
external/mit/MesaLib/dist/src/glx/dri_common.c (apply patch)

Wherever we test for setuid, also test for setgid.

Inspired by a diff to openbsd but with a few more instances.

(martin)

2019-12-12 12:19:39 UTC MAIN commitmail json YAML

Fix detection of existing disklabels in the case when we only have
the disklabel partitioning scheme available.

(martin)

2019-12-12 12:00:06 UTC MAIN commitmail json YAML

use additional MAC addresses to accept mcast

(nisimura)

2019-12-12 11:47:30 UTC MAIN commitmail json YAML

fix build failure. ok by msaitoh@n.o.

(knakahara)

2019-12-12 11:41:52 UTC netbsd-9 commitmail json YAML

2019-12-12 11:40:53 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by jmcneill in ticket #545):

sys/arch/arm/dts/rk3328.dtsi: revision 1.2
sys/dev/fdt/dwc3_fdt.c: revision 1.8
sys/arch/arm/dts/rk3328-rock64.dts: revision 1.5

Add support for snps,dis-tx-ipgap-linecheck-quirk quirk

Enable USB3 support on RK3328

(martin)

2019-12-12 11:36:34 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by maya in ticket #526):

external/mit/MesaLib/dist/src/intel/dev/gen_device_info.c: revision 1.5
external/mit/MesaLib/dist/src/loader/loader.c: revision 1.2
external/mit/MesaLib/dist/src/mesa/main/context.c: revision 1.8
external/mit/MesaLib/dist/src/util/disk_cache.c: revision 1.4
(all via patch)

Wherever we test for setuid, also test for setgid.

Inspired by a diff to openbsd but with a few more instances.

(martin)

2019-12-12 09:32:54 UTC MAIN commitmail json YAML

Add SFP support part 2.

- Add code for 1000BASE-T SFP. It uses SGMII.
- Add extra delay in wm_serdes_power_up_link_82575(). Same as other OSes.

TODO:
- Module insertion/removal support. Currently, SFP detection is only done
  in the driver's attach phase.

(msaitoh)

2019-12-12 09:25:37 UTC MAIN commitmail json YAML

- Remove ESSR_FIBER_LINK bit check in makphyattach(). This bit is valid only
  when the link is up, so it's not good to check in the attach function.
- There is an environment that both copper and fiber bits are set in EXTSR
  but it support copper only. To resolve this problem, check the ESSR
  register's HWCFG_MODE bit and drop unsupported bits.
- If the chip is in Fiber/Copper auto select mode, check which media is
  selected. Currently, the code supports 88E1011, 88E1111 and 88E1112 only.
  To support other chips documents are required.

(msaitoh)

2019-12-12 05:00:33 UTC MAIN commitmail json YAML

Comment out xref to tb(4), it does not exist.

XXX: I don't see it mentioned in amd64/GENERIC nor DEVNAMES

(wiz)

2019-12-12 02:34:55 UTC MAIN commitmail json YAML

Point out that spurious wake-ups are possible, and that an LWP should
check for resource availability after being awoken.

(pgoyette)

2019-12-12 02:15:43 UTC MAIN commitmail json YAML

Rather than keeping a separate mutex, condvar, and pserialize for each
module hook, we can share a common set of synchronization structures.
This cuts the amount of cacheline_aligned data for these structures by
50%.

Note that we still have a per-hook localcount, since we need to count
individual references.

As discussed with riastradh@

Welcome to 9.99.22 !

(pgoyette)

2019-12-12 00:46:32 UTC MAIN commitmail json YAML

2019-12-12 00:45:59 UTC MAIN commitmail json YAML

Add support for snps,dis-tx-ipgap-linecheck-quirk quirk

(jmcneill)

2019-12-11 21:05:17 UTC MAIN commitmail json YAML

Synchronize htdocs, manual, comments, and code so that enabling the platinumfb is done using "platinum" in openfirmware settings.  Remove "screen" option which was somewhat disingenuous.

(scole)

2019-12-11 21:04:47 UTC MAIN commitmail json YAML

Synchronize htdocs, manual, comments, and code so that enabling the platinumfb is done using "platinum" in openfirmware settings.  Remove "screen" option which was somewhat disingenuous.

(scole)

2019-12-11 21:00:11 UTC MAIN commitmail json YAML

Chip matching improvements:
  only match for currently known addresses
  don't generate messages when matching
Tested on Sun Blade 2500 by martin@.

(jdc)

2019-12-11 20:50:32 UTC MAIN commitmail json YAML

Add a comment.

(ad)

2019-12-11 20:46:06 UTC MAIN commitmail json YAML

Comment on previous explaining why it's needed.

(ad)

2019-12-11 20:34:06 UTC MAIN commitmail json YAML

mutex_vector_exit: if the arch doesn't have assembly stubs, we need to
unconditionally release the lock if(cold), so mutexes can be used before
interrupts are set up.  Removed with panicstr checks in 1.81.

(ad)

2019-12-11 20:19:27 UTC MAIN commitmail json YAML

Redo previous more conventionally.  Requested by kre@.

(ad)

2019-12-11 19:51:36 UTC MAIN commitmail json YAML

Report on whether vnodes are MPSAFE.  For diagnosing perf problems.

(ad)

2019-12-11 19:25:50 UTC MAIN commitmail json YAML

For now rely on the kernel mapping native RDB partitions.

(martin)

2019-12-11 19:23:38 UTC MAIN commitmail json YAML

2019-12-11 16:16:13 UTC MAIN commitmail json YAML

Fix a longstanding "freeze right after enabling interrupt" problem.

With this fix, finally NetBSD/emips on Giano is fully functional.
See PR/45080 for more details.

Should be pulled up to netbsd-9.

(tsutsui)

2019-12-11 15:08:45 UTC MAIN commitmail json YAML

2019-12-11 14:58:03 UTC netbsd-9 commitmail json YAML

2019-12-11 14:56:36 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by bouyer in ticket #544):

sys/dev/usb/ugen.c: revision 1.148

reading usbdi.c it looks like usbd_get_config_descriptor() can actually
return NULL, so check for this.

I got NULL pointer dereference here with a device showing:
[  303.732632] ugen0: autoconfiguration error: setting configuration index 0 failed

(martin)

2019-12-11 14:54:47 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by msaitoh in ticket #543):

sys/dev/mii/files.mii: revision 1.54

Add ukphy_subr flag to ipgphy to make kernel compilable with ipgphy and
without ukphy. Pointed out by Hauke.

(martin)

2019-12-11 14:52:50 UTC netbsd-9 commitmail json YAML

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

bin/sh/eval.c: revision 1.176
bin/sh/trap.c: revision 1.53

PR bin/54743

Having traps set should not enforce a fork for the next command,
whatever that command happens to be, only for commands which would
normally fork if they weren't the last command expected to be
executed (ie: builtins and functions shouldn't be exexuted in a
sub-shell merely because a trap is set).

As it was (for example)
trap 'whatever' SIGANY; wait $anypid
was guaranteed to fail the wait, as the subshell it was executed
in could not have any children.

XXX pullup -9

PR bin/54743

If a builtin command or function is the final command intended to be
executed, and is interrupted by a caught signal, the trap handler for
that signal was not executed - the shell simply exited (an exit trap
handler would still have been run - if there was one the handler
for the signal may have been invoked during the execution of the
exit trap handler, which, if it happened, is incorrect sequencing).

Now, if we're exiting, and there are pending signals, run their handlers
just before running the EXIT trap handler, if any.
There are almost certainly plenty more issues with traps that need
solving.  Later,

XXX pullup -9
(-8 is too different in this area, and this problem suitably obscure,
that we won't bother)    (the -7 sh is simply obsolete).

(martin)

2019-12-11 14:48:31 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by msaitoh in ticket #541):

sys/dev/pci/if_wm.c: revision 1.651

Fix a bug that wm_sgmii_readreg_locked() may return error even if error isn't
occurred.

(martin)

2019-12-11 14:46:28 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by sevan in ticket #540):

external/cddl/osnet/dist/uts/common/fs/zfs/arc.c: revision 1.16

We currently lack a tunable to control ZFS prefetch, so skip the warning and
FreeBSD specific instructions on settings.

(martin)

2019-12-11 14:13:40 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by sevan in ticket #539):

etc/rc.d/zfs: revision 1.4
etc/rc.d/zfs: revision 1.5

We don't need to require the presence of /etc/zfs/zpool.cache to unmount &
unload the module, just like for the start target.

This script just makes sure that the ZFS module loads and unloads, mountall
script takes care of mounting filesystems.

Don't try to unmount all file systems before unloading the ZFS module, leave
that to the operator in preperation or the mountall script to take care
of. Module will of course fail to unload then if file systems are still
mounted.

(martin)

2019-12-11 14:03:37 UTC MAIN commitmail json YAML

dm: Revert "Fix error handling in dmioctl()" for now

This change seems to break "deps" in dm ioctl(2) for linear target.
Revert the change, will revisit later.
https://mail-index.netbsd.org/current-users/2019/12/11/msg037179.html

(tkusumi)

2019-12-11 11:54:23 UTC MAIN commitmail json YAML

reading usbdi.c it looks like usbd_get_config_descriptor() can actually
return NULL, so check for this.
I got NULL pointer dereference here with a device showing:
[  303.732632] ugen0: autoconfiguration error: setting configuration index 0 failed

(bouyer)

2019-12-11 10:28:19 UTC MAIN commitmail json YAML

Add SFP support part 1. The code for SerDes and SGMII setting is not include
in this commit. SFP module removal interrupt detects but not used yet:
- Detect SFP's 1000BASE-SX, 1000BASE-LX, 100BASE-FX and 1000BASE-T correctly.
- Detect the Media Auto Sense feature. Not supported yet.
- Add comment.

(msaitoh)

2019-12-11 10:03:08 UTC MAIN commitmail json YAML

Fix to detect link state down

Link status event that is used to update link status sometimes
is not notified when link down. So, use Get Link Status response
that has the same information with the event.
The handling of the event is needed to detect link state
up because the response sometimes does not notify link up.

(yamaguchi)

2019-12-11 09:48:16 UTC MAIN commitmail json YAML

- Set CTRL_ILOS(Invert loss of signal) bit correctly on 82580 port 1, 2, 3 and
  newer chips. This change fixes a bug that some fiber, serdes or SFP devices
  don't detect the link status correctly.
  XXX We should check for other NVM reads if they have the same problem. One of
  the solution to avoid this type of bug is to check the register layout
  in wm_nvm_read().
- Use __BIT()
- Add comment

(msaitoh)

2019-12-11 09:27:46 UTC MAIN commitmail json YAML

- MSI-X doesn't use sc->sc_icr variable, so move the code into non-MSI-X part.
  No functional change intended. OK'd by knakahara.
- Modify debug printfs a bit.

(msaitoh)

2019-12-11 09:12:29 UTC MAIN commitmail json YAML

No functional change:
- Add defintion of CONNSW register and PCS_NPTX (not used yet).
- Add some bit definitions of PCS_LCTL.
- Renae macro.
- Fix comment. Add comment.
- KNF.

(msaitoh)

2019-12-11 07:33:55 UTC MAIN commitmail json YAML

2019-12-11 05:50:03 UTC MAIN commitmail json YAML

Fix build error related to ixl(4) on i386

(yamaguchi)

2019-12-11 02:31:45 UTC MAIN commitmail json YAML

Rollback kernel link scrpt change for multiboot

The multiboot section breaks BIOS boot. Rolling back the link script
removes the section, which breaks multiboot but should restore BIOS boot.

(manu)

2019-12-11 02:22:39 UTC MAIN commitmail json YAML

Add ukphy_subr flag to ipgphy to make kernel compilable with ipgphy and
without ukphy. Pointed out by Hauke.

(msaitoh)

2019-12-11 01:51:23 UTC MAIN commitmail json YAML

Not use _LP64 but sizeof(bus_addr_t) for getting size of address
It makes ixl(4) be able to work on ILP32

pointed out by thorpej@. thanks.

(yamaguchi)

2019-12-10 22:30:34 UTC MAIN commitmail json YAML

Oops -- forgot to kmem_free.

(riastradh)

2019-12-10 19:42:09 UTC MAIN commitmail json YAML

When 'attempted_completion_function' non-NULL, with a 'single_match'
match, the expected space is not being added. Problem observed with
"chronyc" and "sqlite3" tab completion. That functionality got
moved to escape_filename() for the !attempted_completion_function
case, but the non-NULL 'attempted_completion_function' case must
also be handled. (Lonnie Abelbeck)

(christos)

2019-12-10 18:13:07 UTC MAIN commitmail json YAML

Mask out always zero bits off pg->phys_addr.

(ad)

2019-12-10 18:08:33 UTC MAIN commitmail json YAML

pg->phys_addr -> VM_PAGE_TO_PHYS(pg)

(ad)

2019-12-10 18:06:50 UTC MAIN commitmail json YAML

2019-12-10 18:04:54 UTC MAIN commitmail json YAML

pg->phys_addr -> VM_PAGE_TO_PHYS(pg)

(ad)

2019-12-10 18:02:14 UTC MAIN commitmail json YAML

pg->phys_addr -> VM_PAGE_TO_PHYS(pg)

(ad)

2019-12-10 18:00:17 UTC MAIN commitmail json YAML

p->phys_addr -> VM_PAGE_TO_PHYS(p)

(ad)

2019-12-10 13:36:44 UTC MAIN commitmail json YAML

Balance the parentheses - hopefully unbreak the build.

(kre)

2019-12-10 13:07:28 UTC MAIN commitmail json YAML

Added the manual for ixl(4)

(yamaguchi)

2019-12-10 12:20:20 UTC MAIN commitmail json YAML

2019-12-10 12:08:53 UTC MAIN commitmail json YAML

2019-12-10 11:35:29 UTC MAIN commitmail json YAML

Inverted test.

(ad)

2019-12-10 11:19:25 UTC MAIN commitmail json YAML

hvn(4): Handle VMBUS_CHANPKT_TYPE_INBAND packet type.

(nonaka)

2019-12-10 11:12:02 UTC MAIN commitmail json YAML

Fix build break.

(ad)

2019-12-10 09:18:37 UTC MAIN commitmail json YAML

Correct a typo in a comment, 08x0 was meant to be 0x80 (duh!).  NFC.

(kre)

2019-12-10 06:25:50 UTC MAIN commitmail json YAML

2019-12-10 02:06:07 UTC MAIN commitmail json YAML

2019-12-10 02:02:48 UTC MAIN commitmail json YAML

In-RAID partitions with no name can be candidate for booting

The code to select boot partition in RAID assumed thet had a name,
which is true when there is a GPT inside the RAID, but not when there
is a disklabel inside the RAID. This caused a regression from behavior
of NetBSD 8.1.

We fix this by allowing nameless partition to be boot candidates.
This fixes misc/54748

While there, let raid device be used in the boot specification, like
raid0a:/netbsd.

(manu)

2019-12-09 21:08:56 UTC MAIN commitmail json YAML

Add mutex_owner_running().

(ad)

2019-12-09 21:05:23 UTC MAIN commitmail json YAML

- Add a mutex_owner_running() for the benefit of the pagedaemon, which
  needs help with locking things in reverse order.
- Expunge the panicstr checks.
- Make MUTEX_NODEBUG work for adaptive mutexes too.

(ad)

2019-12-09 21:02:10 UTC MAIN commitmail json YAML

Expunge the panicstr checks, we don't need them.

(ad)

2019-12-09 21:00:48 UTC MAIN commitmail json YAML

Fix LOCKDEBUG panic on detach.

(ad)

2019-12-09 19:33:56 UTC netbsd-9 commitmail json YAML

2019-12-09 19:33:26 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by martin in ticket #538):
usr.sbin/sysinst/bsddisklabel.c: revision 1.32
PR install/54745: fix confusion about absolut and NetBSD-partition
relative offsets.

(bouyer)

2019-12-09 19:31:18 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by martin in ticket #537):
usr.sbin/sysinst/disklabel.c: revision 1.16
usr.sbin/sysinst/disklabel.c: revision 1.17
Sanitize disk type and packname a bit more - when using existing disklabel
partitions we might run into trouble later when filing this label (unescaped)
in disktab format otherwise.
Relax restrictions on packnames, as disklabel(8) does not do full decoding
for the tag field.
Fix quoting of command args.

(bouyer)

2019-12-09 19:16:54 UTC MAIN commitmail json YAML

PR install/54582: allow MD code to disable on-disk presence verification
of "real" disklabels. Auto-enable this (at run time) when there is no other
partitioning scheme but disklabel configured.
Hard-coded enable this for x68k to allow using kernel based translations
for native Human68k partitions.

(martin)

2019-12-09 16:23:19 UTC netbsd-9 commitmail json YAML

2019-12-09 16:20:11 UTC netbsd-9 commitmail json YAML

Pull up the following changes, requested by uwe in ticket #536:

distrib/notes/common/legal.common upto 1.124 (adapted)

Sync with reality and sort.

(martin)

2019-12-09 16:19:11 UTC MAIN commitmail json YAML

Fix incorrect argument order of cpu_intr(), slipped in rev 1.2.

Pointed out by maya@ in PR/45080.

Should be pulled up to netbsd-9.

(tsutsui)

2019-12-09 16:14:10 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by uwe in ticket #535):

libexec/ld.elf_so/arch/powerpc/ppc_reloc.c: revision 1.60
libexec/ld.elf_so/arch/powerpc/ppc_reloc.c: revision 1.59

Resolve ADDR16_LO, ADDR16_HI, and ADDR16_HA relocs.

Recent GNU ld does not resolve them statically if the reloc is in a
writable section and the symbol is not already referenced from text.

Use existing lo() and hi() macros.  Same object code is generated.

(martin)

2019-12-09 16:12:16 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by uwe in ticket #534):

libexec/ld.elf_so/rtld.c: revision 1.201

_rtld_relro - fix debug printf format for a size_t argument

(martin)

2019-12-09 16:10:35 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by scole in ticket #533):

sys/arch/macppc/conf/INSTALL_601: revision 1.3

add platinumfb

(martin)

2019-12-09 16:08:58 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by skrll in ticket #532):

sys/arch/aarch64/aarch64/locore.S: revision 1.46

Mark FDT as non-exec and create KVA=VA mapping of same size as identity
mapping, i.e. include BOOTPAGE_ALLOC_MAX

(martin)

2019-12-09 16:06:19 UTC MAIN commitmail json YAML

dm: Silence aprint_normal() in dm_target_linear_status()

dm_target_linear_status() shouldn't print this debug message by default
on dmsetup "table" ioctl/command.

(tkusumi)

2019-12-09 16:05:05 UTC netbsd-9 commitmail json YAML

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

include/monetary.h: revision 1.4

PR lib/54744  (bruno@haible.de)

Add missing __END_DECLS for C++ compiles.

XXX pullup -9 XXX pullup -8 (bug not present in -7).

(martin)

2019-12-09 16:02:37 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by tsutsui in ticket #530):

crypto/external/bsd/openssl/dist/crypto/engine/eng_devcrypto.c: revision 1.5

PR/54740: Izumi Tsutsui: Disable cryptoengine unavailable message when
device is not configured (ENXIO).

(martin)

2019-12-09 16:01:12 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by jmcneill in ticket #529):

sys/arch/evbarm/conf/std.generic64: revision 1.12
sys/arch/arm/rockchip/rk3399_pcie.c: revision 1.8

Define __BUS_SPACE_HAS_PROBING_METHODS
Use bus_space_{peek,poke}_4 for pci conf reg access.

(martin)

2019-12-09 15:58:48 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #528):

sys/dev/cons.c: revision 1.76
sys/dev/cons.c: revision 1.77

Fix reference count leak in cons(4).

Don't forget to vrele after you're done, folks!
XXX pullup-9
XXX pullup-8
XXX pullup-7
XXX pullup-6... 5... 4 might not have had this bug!

Restore historical $Hdr$ tag after git cvsexportcommit nixed it.

(martin)

2019-12-09 15:56:49 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by pgoyette in ticket #527):

sbin/modstat/modstat.8: revision 1.24
sbin/modstat/modstat.8: revision 1.26
lib/libc/sys/modctl.2: revision 1.16

Note that the size returned by modctl(2) and displayed by modstat(8) is
only for the module's text section, not for the entire size of the
module.

Addresses PR kern-54737

Remove superfluous Pp.

(martin)

2019-12-09 15:54:59 UTC MAIN commitmail json YAML

dm: Fix error handling in dmioctl()

Looks like cleanup_exit label is in a wrong place.
Should skip prop_dictionary_copyout_ioctl() on error.

(tkusumi)

2019-12-09 15:37:26 UTC MAIN commitmail json YAML

2019-12-09 15:36:16 UTC MAIN commitmail json YAML

workaround netbsd incompatible LIST_HEAD

adapted from drm_bridge.c r1.3

(jakllsch)

2019-12-09 15:30:42 UTC MAIN commitmail json YAML

dm: Correct target name "stripe" -> "striped"

Sync with Linux kernel.
The file name is "stripe", but the target name is "striped".
DragonFlyBSD also follows this.

(tkusumi)

2019-12-09 15:19:32 UTC netbsd-9 commitmail json YAML

src/distrib/sets/lists/modules/ad.arm@1.12.2.1 / diff / nxr@1.12.2.1
src/distrib/sets/lists/modules/md.amd64@1.80.2.1 / diff / nxr@1.80.2.1
src/distrib/sets/lists/modules/md.i386@1.82.2.1 / diff / nxr@1.82.2.1
src/distrib/sets/lists/modules/mi@1.122.2.3 / diff / nxr@1.122.2.3
src/external/cddl/osnet/dev/dtrace/aarch64/dtrace_asm.S@1.1.2.2 / diff / nxr@1.1.2.2
src/external/cddl/osnet/dev/dtrace/aarch64/dtrace_isa.c@1.1.2.2 / diff / nxr@1.1.2.2
src/external/cddl/osnet/dev/dtrace/aarch64/dtrace_subr.c@1.1.2.2 / diff / nxr@1.1.2.2
src/external/cddl/osnet/dev/dtrace/aarch64/regset.h@1.1.2.2 / diff / nxr@1.1.2.2
src/external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c@1.1.2.2 / diff / nxr@1.1.2.2
src/external/cddl/osnet/dev/fbt/aarch64/fbt_isa.h@1.1.2.2 / diff / nxr@1.1.2.2
src/external/cddl/osnet/dist/lib/libdtrace/aarch64/dt_isadep.c@1.1.1.1.6.1 / diff / nxr@1.1.1.1.6.1
src/external/cddl/osnet/dist/lib/libdtrace/common/dt_link.c@1.11.4.1 / diff / nxr@1.11.4.1
src/external/cddl/osnet/lib/libdtrace/Makefile@1.21.2.1 / diff / nxr@1.21.2.1
src/share/mk/bsd.own.mk@1.1149.2.3 / diff / nxr@1.1149.2.3
src/sys/arch/aarch64/aarch64/start.S@1.2.6.1 / diff / nxr@1.2.6.1
src/sys/arch/aarch64/aarch64/trap.c@1.17.4.2 / diff / nxr@1.17.4.2
src/sys/arch/aarch64/conf/Makefile.aarch64@1.15.4.1 / diff / nxr@1.15.4.1
src/sys/arch/aarch64/include/frame.h@1.2.6.1 / diff / nxr@1.2.6.1
src/sys/arch/evbarm/conf/mk.generic64@1.3.4.1 / diff / nxr@1.3.4.1
src/sys/modules/cyclic/Makefile@1.3.34.1 / diff / nxr@1.3.34.1
      :
(more 3 files)
Pull up following revision(s) (requested by jmcneill in ticket #525):

external/cddl/osnet/dev/dtrace/aarch64/dtrace_isa.c: revision 1.1
distrib/sets/lists/modules/md.i386: revision 1.83
share/mk/bsd.own.mk: revision 1.1168
usr.bin/mkubootimage/mkubootimage.c: revision 1.25
sys/modules/dtrace/Makefile: revision 1.7
usr.bin/mkubootimage/mkubootimage.c: revision 1.26
sys/modules/dtrace/Makefile: revision 1.8
external/cddl/osnet/dist/lib/libdtrace/aarch64/dt_isadep.c: revision 1.2
distrib/sets/lists/modules/mi: revision 1.128
sys/arch/aarch64/include/frame.h: revision 1.3
sys/arch/evbarm/conf/mk.generic64: revision 1.4
external/cddl/osnet/dist/lib/libdtrace/common/dt_link.c: revision 1.12
sys/modules/cyclic/Makefile: revision 1.4
sys/arch/aarch64/conf/Makefile.aarch64: revision 1.16
external/cddl/osnet/dev/dtrace/aarch64/dtrace_subr.c: revision 1.1
sys/arch/aarch64/aarch64/start.S: revision 1.3
sys/arch/aarch64/aarch64/trap.c: revision 1.22
external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c: revision 1.1
external/cddl/osnet/dev/dtrace/aarch64/dtrace_asm.S: revision 1.1
external/cddl/osnet/dev/fbt/aarch64/fbt_isa.h: revision 1.1
external/cddl/osnet/dev/dtrace/aarch64/regset.h: revision 1.1
external/cddl/osnet/lib/libdtrace/Makefile: revision 1.26
distrib/sets/lists/modules/md.amd64: revision 1.82
usr.bin/mkubootimage/mkubootimage.1: revision 1.13
distrib/sets/lists/modules/ad.arm: revision 1.14

Add KDTRACE_HOOKS support.

Define lwp_trapframe() macro

dtrace: add support for aarch64

Add syscall_linux back for other arm architectures (accidently removed
in previous)

Add -u flag for updating headers in place.

Fix alignment of .text section by changing load address to
0xffffffc000000000 and adding 64 bytes of padding before the entry point.

Update arm64 image header in place

Move dtrace_syscall_linux out of mi set list

Enable DTrace on aarch64

Fix signed/unsigned comparison

(martin)

2019-12-09 14:56:44 UTC MAIN commitmail json YAML

2019-12-09 14:56:30 UTC MAIN commitmail json YAML

Avoid a race between interruption and reacquisition of lock.

Otherwise, we would have leaked the memory in this case.

(riastradh)

2019-12-09 14:56:18 UTC MAIN commitmail json YAML

Make sure ERESTART doesn't come flying out to userland.

I picked ERESTART to mean `all channels are occupied' because that's
what opencrypto(9) uses to decide whether to queue a request, but
it's not appropriate for sysctl(2) to return that.

(riastradh)

2019-12-09 14:56:06 UTC MAIN commitmail json YAML

Factor out some of the self-test logic used for debugging.

Add missing bus_dmamap_sync(POSTWRITE) while here.

(riastradh)

2019-12-09 14:55:52 UTC MAIN commitmail json YAML

Reduce some duplicated bus_dma clutter.

(riastradh)

2019-12-09 13:06:38 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by skrll in ticket #524):

sys/external/bsd/dwc2/dwc2.c: revision 1.60
sys/external/bsd/dwc2/dwc2.c: revision 1.61
sys/external/bsd/dwc2/dwc2.c: revision 1.62
sys/external/bsd/dwc2/dwc2.c: revision 1.63
sys/external/bsd/dwc2/dwc2.c: revision 1.64
sys/external/bsd/dwc2/dwc2.c: revision 1.65
sys/external/bsd/dwc2/dwc2.c: revision 1.66

KNF

Make dwc2debug sysctl'able

Need <sys/sysctl.h> for previous

Use size_t for loop count variable

Calulate the right lenght for isoc transfer and the usb_syncmem

PR/54696: Kernel panic in bus_dma.c on Raspberry Pi 3B/3B+

build fix

Consistency.

(martin)

2019-12-09 13:00:23 UTC netbsd-9 commitmail json YAML

Pull up the following revisions, requested by uwe in ticket #523:

distrib/notes/Makefile.inc                      up to 1.52
distrib/notes/common/macros                    up to 1.54

Improve table of contents.

(martin)

2019-12-09 12:55:16 UTC netbsd-9 commitmail json YAML

Pull up the following revisions, requested by uwe in ticket #522:

distrib/notes/common/extract-contrib-string.pl upto 1.24

Various fixes and some more special cases.

(martin)

2019-12-09 12:49:39 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by uwe in ticket #521):

sys/dev/mii/devlist2h.awk: revision 1.10

Fix s/product/model/ search-and-destroy accident that affected license.

Back in 1998 thorpej@ adapted this from one of the several versions we
have in the tree but needed s/product/model/ in the text of the
script.  Unfortunately that also affected the license text: "This
model includes software..." and "...or promote models".

(martin)

2019-12-09 12:48:22 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by uwe in ticket #520):

usr.bin/menuc/testm/main.c: revision 1.8
usr.bin/menuc/testm/menus.mc: revision 1.13

Fix typo in ad clause.  Ok perry@.

(martin)

2019-12-09 12:46:32 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by uwe in ticket #519):

share/tmac/doc2html: revision 1.69

Use groff -Tencoding argument to emit <meta charset="..."/>

(martin)

2019-12-09 04:51:04 UTC MAIN commitmail json YAML

Draft driver for Allwinner Crypto Engine.

Found on, e.g., the Pinebook.

Only used for TRNG at the moment, but hooking it up to opencrypto(9)
shouldn't be too hard if anyone still cares about that these days.

The distribution of the alleged TRNG is very nonuniform distributed
seems to alternate between toward runs with exceptionally high
fractions of 0 bits and runs with exceptionally high fractions of 1
bits -- initially all my samples were mostly 0's, and then all my
samples were mostly 1's, and now I'm seeing more oscillation between
these runs.

So I've wired it up as RND_TYPE_UNKNOWN, not RND_TYPE_RNG (it will
immediately flunk our rngtest and be disabled), and I estimated it to
provide at most one bit of entropy per byte of data -- which may
still be optimistic.  I also added a sysctl node hw.sun8icryptoN.rng
to read out 1024-byte samples for analysis, and I left the driver
commented out in GENERIC64 for now.

(If anyone has contacts at Allwinner who can tell us about how the
alleged TRNG is supposed to work, please let me know!)

(riastradh)

2019-12-09 04:40:50 UTC MAIN commitmail json YAML

2019-12-09 04:39:58 UTC MAIN commitmail json YAML

Convert pmap_pvt to atomic_load/store.

(riastradh)

2019-12-09 02:30:30 UTC MAIN commitmail json YAML

Fix a bug that wm_sgmii_readreg_locked() may return error even if error isn't
occured.

(msaitoh)

2019-12-09 00:15:11 UTC MAIN commitmail json YAML

We currently lack a tunable to control ZFS prefetch, so skip the warning and
FreeBSD specific instructions on settings.

(sevan)

2019-12-09 00:14:30 UTC MAIN commitmail json YAML

PR bin/54743

If a builtin command or function is the final command intended to be
executed, and is interrupted by a caught signal, the trap handler for
that signal was not executed - the shell simply exited (an exit trap
handler would still have been run - if there was one the handler
for the signal may have been invoked during the execution of the
exit trap handler, which, if it happened, is incorrect sequencing).

Now, if we're exiting, and there are pending signals, run their handlers
just before running the EXIT trap handler, if any.

There are almost certainly plenty more issues with traps that need
solving.  Later,

XXX pullup -9

(-8 is too different in this area, and this problem suitably obscure,
that we won't bother)    (the -7 sh is simply obsolete).

(kre)

2019-12-09 00:14:24 UTC MAIN commitmail json YAML

PR bin/54743

Having traps set should not enforce a fork for the next command,
whatever that command happens to be, only for commands which would
normally fork if they weren't the last command expected to be
executed (ie: builtins and functions shouldn't be exexuted in a
sub-shell merely because a trap is set).

As it was (for example)
trap 'whatever' SIGANY; wait $anypid
was guaranteed to fail the wait, as the subshell it was executed
in could not have any children.

XXX pullup -9

(kre)

2019-12-09 00:11:32 UTC MAIN commitmail json YAML

This script just makes sure that the ZFS module loads and unloads, mountall
script takes care of mounting filesystems.
Don't try to unmount all file systems before unloading the ZFS module, leave
that to the operator in preperation or the mountall script to take care
of. Module will of course fail to unload then if file systems are still
mounted.

(sevan)

2019-12-08 23:49:16 UTC MAIN commitmail json YAML

Use existing lo() and hi() macros.  Same object code is generated.

(uwe)

2019-12-08 22:57:51 UTC MAIN commitmail json YAML

Resolve ADDR16_LO, ADDR16_HI, and ADDR16_HA relocs.

Recent GNU ld does not resolve them statically if the reloc is in a
writable section and the symbol is not already referenced from text.

(uwe)

2019-12-08 22:41:42 UTC MAIN commitmail json YAML

Fix typo in a comment.

(uwe)

2019-12-08 22:35:27 UTC MAIN commitmail json YAML

_rtld_relro - fix debug printf format for a size_t argument

(uwe)

2019-12-08 21:46:03 UTC MAIN commitmail json YAML

Fix typo in the definition of #ha() in a comment.

(uwe)

2019-12-08 21:30:00 UTC MAIN commitmail json YAML

2019-12-08 20:42:49 UTC MAIN commitmail json YAML

Merge x86 pmap changes from yamt-pagecache:

- Deal better with the multi-level pmap object locking kludge.
- Handle uvm_pagealloc() being able to block.

(ad)

2019-12-08 20:35:23 UTC MAIN commitmail json YAML

For safety, cv_broadcast(&bp->b_busy) in more places where the buffer is
changing identity or moving from one vnode list to another.

(ad)

2019-12-08 20:00:56 UTC MAIN commitmail json YAML

After lots of testing I'm not convinced of the benefit to the tweak
I made to rw_enter(), so undo it to return to baseline.

(ad)

2019-12-08 19:52:37 UTC MAIN commitmail json YAML

Revert previous.  No performance gain worth the potential headaches
with buffers in these contexts.

(ad)

2019-12-08 19:49:25 UTC MAIN commitmail json YAML

Adjustment to previous: if we're going to toss the buffer, then wake
everybody.

(ad)

2019-12-08 19:26:05 UTC MAIN commitmail json YAML

- Avoid thundering herd: cv_broadcast(&bp->b_busy) -> cv_signal(&bp->b_busy)
- Sprinkle __cacheline_aligned.

(ad)

2019-12-08 19:24:26 UTC MAIN commitmail json YAML

Avoid thundering herd: cv_broadcast(&bp->b_busy) -> cv_signal(&bp->b_busy)

(ad)

2019-12-08 19:23:51 UTC MAIN commitmail json YAML

Avoid thundering herd: cv_broadcast(&bp->b_busy) -> cv_signal(&bp->b_busy)

(ad)

2019-12-08 18:13:24 UTC MAIN commitmail json YAML

Add SUNXI_CCU_NM_ROUND_DOWN to CE clock, fix pll parents to use 2X outputs

(jmcneill)

2019-12-08 17:37:16 UTC MAIN commitmail json YAML

Adjust tests for 0 hex values printing 0 instead of 0x0

(christos)