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

2024-05-10 13:50:41 UTC Now

2018-05-26 21:15:46 UTC MAIN commitmail json YAML

Avoid dereferencing NULL if we attempt to look up an known unit type.

(thorpej)

2018-05-26 21:07:47 UTC MAIN commitmail json YAML

Fix sysctl(3):vm.minaddress in compat_netbsd32(8)

Cast minaddress from LP64-specific long (64-bit) to 32-bit long (int).

This value is usually 0 or 0+PAGE_SIZE. There is need to change type in
order to keep original code functional, without prompting the value with
'long long' or a similar approach.

There are more CTLTYPE_LONG with a need for fixes in the compat code:

uipc_usrreq.c
1975 CTLTYPE_LONG, "sendspace",
1981 CTLTYPE_LONG, "recvspace",
1987 CTLTYPE_LONG, "sendspace",
1993 CTLTYPE_LONG, "recvspace",
vfs_bio.c
1921 CTLTYPE_LONG, "bufmem",
1928 CTLTYPE_LONG, "bufmem_lowater",
1935 CTLTYPE_LONG, "bufmem_hiwater",

Sponsored by <The NetBSD Foundation>

(kamil)

2018-05-26 20:27:48 UTC MAIN commitmail json YAML

Port the CVE 2018-8897 mitigation to i386 ATF ptrace(2) tests

On i386 there is no need to switch execution mode.
Use 0x23 SS selector for i386, amd64 used 0x4f.

Based on pointers from <maxv>.

Sponsored by <The NetBSD Foundation>

(kamil)

2018-05-26 20:17:56 UTC MAIN commitmail json YAML

Change LUAL_BUFFERSIZE from 4-8K to 128 bytes for kernel-side Lua.

LUAL_BUFFERSIZE defines how much luaL_Buffer allocates from
the stack. Apparently, 4-8K is too much for the kernel stack.

(alnsn)

2018-05-26 19:20:21 UTC MAIN commitmail json YAML

next_stick() - fix typy in comment: tick->stick

(palle)

2018-05-26 19:18:11 UTC MAIN commitmail json YAML

Revert previous: Don't generate XMSS host keys for sshd by default.

XMSS is a stateful post-quantum signature scheme.

- Post-quantum security for _online_ authentication is not important
  until quantum computers become practical; there's no danger of
  retroactive forgery in sessions that have already completed.

- As a stateful signature schemes, XMSS is qualitatively different
  from all the other ones sshd supports, requiring additional
  administrative care: roll back the state (e.g., from a disk backup
  or VM snapshot), and you've shot yourself in the foot.

If users want XMSS keys, they can make them explicitly, but there's
no need for this to be enabled by default.

Discussed with christos offline.

(riastradh)

2018-05-26 18:57:35 UTC MAIN commitmail json YAML

uvm_pageactivate() needs to be called _after_ code is done with the page, no reason
to bother pdaemon with PG_BUSY pages; also clear the PG_FAKE and PG_CLEAN after
we are done with the write

this does not make any difference on my machine, but maybe it might fix
the machine check panic on Martin's alpha

while here remove UBC_PARTIALOK handling from ubc_zeropage_direct(), just to be sure
it works exactly the same as the non-direct one

(jdolecek)

2018-05-26 18:18:19 UTC MAIN commitmail json YAML

Handle vm.maxaddress in compat_netbsd32(8)

Return VM_MAXUSER_ADDRESS32 instead of the 64-bit specific address.

Use CTLTYPE_INT instead of CTLTYPE_LONG in order to retain the same integer
type between 64-bit native kernel and 32-bit emulated program.

There probably should be CTLTYPE_LONG32 available for this purpose.

On NetBSD/i386:
vm.maxaddress=bfeff000

On NetBSD/amd64:
vm.maxaddress=7fbfdfeff000

On NetBSD/amd64 running i386 program:
vm.maxaddress=fffff000

A 32-bit program on the 64-bit kernel can use larger user space, this
difference is on purpose and expected.

Sponsored by <The NetBSD Foundation>

(kamil)

2018-05-26 15:32:31 UTC MAIN commitmail json YAML

Refactor the PT_WRITE*/PT_READ* and PIOD_* ATF ptrace(2) tests

Merge all the PT_WRITE*/PT_READ* and PIOD_* the test cases into the common
body.

Changes:
- treat D and I variations exactly the same
- stop testing 2-3-4 attempts to perform the same read/write operation
- stop testing interlocked (handshake) read/write operations
- rename the tests
- test write to .text section (with D and I type of operations)

New tests:
- bytes_transfer_piod_read_d_8
- bytes_transfer_piod_read_d_16
- bytes_transfer_piod_read_d_32
- bytes_transfer_piod_read_d_64
- bytes_transfer_piod_read_i_8
- bytes_transfer_piod_read_i_16
- bytes_transfer_piod_read_i_32
- bytes_transfer_piod_read_i_64
- bytes_transfer_piod_write_d_8
- bytes_transfer_piod_write_d_16
- bytes_transfer_piod_write_d_32
- bytes_transfer_piod_write_d_64
- bytes_transfer_piod_write_i_8
- bytes_transfer_piod_write_i_16
- bytes_transfer_piod_write_i_32
- bytes_transfer_piod_write_i_64
- bytes_transfer_read_d
- bytes_transfer_read_i
- bytes_transfer_write_d
- bytes_transfer_write_i
- bytes_transfer_piod_read_d_8_text
- bytes_transfer_piod_read_d_16_text
- bytes_transfer_piod_read_d_32_text
- bytes_transfer_piod_read_d_64_text
- bytes_transfer_piod_read_i_8_text
- bytes_transfer_piod_read_i_16_text
- bytes_transfer_piod_read_i_32_text
- bytes_transfer_piod_read_i_64_text
- bytes_transfer_piod_write_d_8_text
- bytes_transfer_piod_write_d_16_text
- bytes_transfer_piod_write_d_32_text
- bytes_transfer_piod_write_d_64_text
- bytes_transfer_piod_write_i_8_text
- bytes_transfer_piod_write_i_16_text
- bytes_transfer_piod_write_i_32_text
- bytes_transfer_piod_write_i_64_text
- bytes_transfer_read_d_text
- bytes_transfer_read_i_text
- bytes_transfer_write_d_text
- bytes_transfer_write_i_text
- bytes_transfer_piod_read_auxv

These tests are now covering all usual code paths.

All tests pass.
The PaX MPROTECT violating ones automatically detect whether to be skipped.

Eliminated 4x more code than removed.

Sponsored by <The NetBSD Foundation>

(kamil)

2018-05-26 15:15:17 UTC MAIN commitmail json YAML

Introduce can_we_write_to_text() to ATF ptrace(2) tests

The purpose of this function is to detect whether a tracer can write to the
.text section of its tracee.

Sponsored by <The NetBSD Foundation>

(kamil)

2018-05-26 14:39:20 UTC MAIN commitmail json YAML

Add battery voltage, charge current, and discharge current sensors for
AXP803.

(jmcneill)

2018-05-26 13:33:44 UTC MAIN commitmail json YAML

Match PCI_PRODUCT_INTEL_82Q45_IDER.

Not entirely sure which chip map to use, but as this is for AMT, it's
probably not like there's a real PATA interface to configure DMA for,
and as the 965 AMT stuff uses the sata version of the chip map, we'll
cargo cult it for now.

(jakllsch)

2018-05-26 13:26:02 UTC MAIN commitmail json YAML

2018-05-26 13:25:19 UTC MAIN commitmail json YAML

Add Intel 82Q45 IDER

(jakllsch)

2018-05-26 12:40:06 UTC MAIN commitmail json YAML

Merge single-letter options. Use more markup.

(wiz)

2018-05-26 11:48:40 UTC pgoyette-compat commitmail json YAML

Add a $NetBSD$ line to track revision/changes

(pgoyette)

2018-05-26 11:20:31 UTC MAIN commitmail json YAML

Do not accept invalid octal character values (>= 0400).

This also avoid possible stack corruption (e.g. previously `tr -s '\400'' or
similars lead to them).

Reviewed and thanks to <pgoyette>!

(leot)

2018-05-26 10:21:41 UTC MAIN commitmail json YAML

Add -v flag which prints the full path of each device node when dumping
the full tree.

(jmcneill)

2018-05-26 03:12:34 UTC pgoyette-compat commitmail json YAML

Remove a To-Do entry that is already done (re-pointing the MODULAR
sys-calls at their individual module).

Merge the multiple entries concerning rtsock compat code.  It really
is a mess, but we don't need to say so three times!

(pgoyette)

2018-05-26 00:17:54 UTC MAIN commitmail json YAML

Silence ssh-keygen output when host keys are generated. Instead, print only
key fingerprints. This replaces dozens of lines out ASCII art output with
something more reasonable:

armv7# service sshd start
ssh-keygen: 1024 SHA256:ynP4BQ2B0Fknnf9PfF4QoUDlYi0+7rNfYXTOYP2cDic root@armv7 (DSA)
ssh-keygen: 521 SHA256:Eoj382aaJNlSxuq/aYj3AXgxfMJAkyVPoCQd2BNjJiA root@armv7 (ECDSA)
ssh-keygen: 256 SHA256:+e9/qTbbN/g6xvkadtHsmIQ+Pc0afZRxbXJsk2HKIzY root@armv7 (ED25519)
ssh-keygen: 2048 SHA256:urNaF/m6oiCe5hXFZBxGLW2PvLz0ibtRFrqYw6R+qTw root@armv7 (RSA)
ssh-keygen: 256 SHA256:Su2Nal2W3vrFz8ukpcSXngl1/bu6xUm1nSvbxTHe9Js root@armv7 (XMSS)
Starting sshd.

(jmcneill)

2018-05-25 23:00:34 UTC MAIN commitmail json YAML

copy HID1 from the boot CPU to secondary CPUs as well on 64bit CPUs
now the 2nd CPU on my G5s runs at full speed

(macallan)

2018-05-25 20:48:54 UTC MAIN commitmail json YAML

Provide resize_disklabel=NO default.  Used by arm images and is not
part of the stock rc.d yet.  This silences rc when you delete the
whole resize_* block from rc.conf after the first boot.

(uwe)

2018-05-25 20:11:03 UTC MAIN commitmail json YAML

add the KASSERT() for loan_count wrap-around to all places which increase it

(jdolecek)

2018-05-25 19:56:47 UTC MAIN commitmail json YAML

hdmiddc -> hdmi for function name on PH6/PH7/PH8

(jmcneill)

2018-05-25 19:48:12 UTC MAIN commitmail json YAML

Compile dtbs with -@ so that fdtoverlay(1) et.al. can symbolically
reference phandles.

(jakllsch)

2018-05-25 16:30:03 UTC MAIN commitmail json YAML

Fix typo in local macro name, pointed out by uwe

(martin)

2018-05-25 16:01:31 UTC MAIN commitmail json YAML

Hide a bunch of local symbols.

(maxv)

2018-05-25 15:52:46 UTC MAIN commitmail json YAML

Fix HIDMS_DEBUG build

(ryoon)

2018-05-25 15:52:11 UTC MAIN commitmail json YAML

Rename the entry points of the prekern, rename the array and move it into
.rodata.

(maxv)

2018-05-25 15:48:00 UTC MAIN commitmail json YAML

If fixed feature buttons exist, print detection messages.

(ryoon)

2018-05-25 15:42:48 UTC MAIN commitmail json YAML

2018-05-25 15:42:30 UTC MAIN commitmail json YAML

Add a test to verify syscall() and/or __syscall() are working.
This used to trigger a panic (see PR kern/53261) on arm.

(martin)

2018-05-25 15:37:58 UTC MAIN commitmail json YAML

PR kern/53261: handle SYS_syscall indirection in MD code - the generic
version would misalign the argument array.

(martin)

2018-05-25 15:33:56 UTC MAIN commitmail json YAML

When the previous contrext is in kernel mode we are not guaranteed to have
a 16-byte-aligned stack pointer, so align it. That's what the CPU would do
on exception entry.

(maxv)

2018-05-25 06:34:02 UTC MAIN commitmail json YAML

Don't use uvm_emap_size, emap was removed

(jdolecek)

2018-05-25 04:40:27 UTC MAIN commitmail json YAML

2018-05-25 00:31:07 UTC MAIN commitmail json YAML

Add a topical acronym for this week: GDPR.

(riastradh)

2018-05-24 22:37:58 UTC MAIN commitmail json YAML

2018-05-24 20:04:47 UTC MAIN commitmail json YAML

Note libbozohttpd(3) & bozohttpd(3lua) from earlier in the month.

(sevan)

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

First try at TLS support and getcontext/setcontext/swapcontext support.

(reinoud)

2018-05-24 19:21:01 UTC MAIN commitmail json YAML

2018-05-24 19:19:37 UTC MAIN commitmail json YAML

2018-05-24 19:03:47 UTC MAIN commitmail json YAML

remove DES_random_key.3 since it is in libdes.

(christos)

2018-05-24 17:07:51 UTC MAIN commitmail json YAML

2018-05-24 17:05:54 UTC MAIN commitmail json YAML

rename flag to the official name.

(christos)

2018-05-24 17:05:18 UTC MAIN commitmail json YAML

Complete the list of DF_1 flags.

(christos)

2018-05-24 14:54:36 UTC MAIN commitmail json YAML

2018-05-24 08:28:40 UTC MAIN commitmail json YAML

Try to fix 32-bit build

Cast pointer to uintptr_t rather than uintmax_t.

(kamil)

2018-05-24 07:00:28 UTC MAIN commitmail json YAML

ipsecif(4) must not set port number to spidx even if NAT-T. Pointed out by ohishi@IIJ, thanks.

(knakahara)

2018-05-24 05:27:29 UTC MAIN commitmail json YAML

Print "NET_MPSAFE enabled" if it's enabled.

(msaitoh)

2018-05-24 04:29:56 UTC MAIN commitmail json YAML

2018-05-24 04:29:25 UTC MAIN commitmail json YAML

Add some Marvell Yukon devices.

(msaitoh)

2018-05-24 02:06:31 UTC MAIN commitmail json YAML

Be more selective about remapping object directories otherwise we pick
objdump and objcopy with the regex.

XXX: pullup-8

(christos)

2018-05-24 00:27:25 UTC MAIN commitmail json YAML

Since ${MAKE} converts $$ -> $ during parsing we need to put it back to
preserve the original variable value with :Q.
XXX: pullup-8

(christos)

2018-05-24 00:25:44 UTC MAIN commitmail json YAML

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

Merge the eventmask[1-6] ATF ptrace(2) tests into a shared function body

While there, rename the tests to:
- eventmask_preserved_empty
- eventmask_preserved_fork
- eventmask_preserved_lwp_create
- eventmask_preserved_lwp_exit
- eventmask_preserved_vfork
- eventmask_preserved_vfork_done

Sponsored by <The NetBSD Foundation>

(kamil)

2018-05-23 21:21:27 UTC MAIN commitmail json YAML

Simplify to avoid pointless null pointer arithmetic.

(joerg)

2018-05-23 21:20:20 UTC MAIN commitmail json YAML

deconst -> __UNCONST to avoid null pointer arithmetic

(joerg)

2018-05-23 21:16:57 UTC MAIN commitmail json YAML

Replace null pointer arithmethic with direct cast

(joerg)

2018-05-23 18:40:30 UTC MAIN commitmail json YAML

2018-05-23 16:04:13 UTC MAIN commitmail json YAML

Increase strictness of blacklistd patches to include timeouts, operating
system errors, and pam failures.

(christos)

2018-05-23 16:03:07 UTC MAIN commitmail json YAML

refresh the diffs to the latest portable

(christos)

2018-05-23 13:51:28 UTC MAIN commitmail json YAML

Extend traceme_vfork_breakpoint in ATF ptrace(2) tests for more scenarios

traceme_vfork_breakpoint used to test SIGTRAP event. Reuse its code for:
SIGSEGV, SIGILL, SIGFPE and SIGBUS.

The SIGILL case is disabled as of now as it required addition of
PTRACE_ILLEGAL_ASM in MD ptrace(2) headers.

Added tests:
- traceme_vfork_crash_trap
- traceme_vfork_crash_segv (renamed from traceme_vfork_breakpoint)
- traceme_vfork_crash_ill (disabled)
- traceme_vfork_crash_fpe
- traceme_vfork_crash_bus

All enabled tests pass.

Sponsored by <The NetBSD Foundation>

(kamil)

2018-05-23 13:18:09 UTC MAIN commitmail json YAML

Add new auxiliary functions in ATF ptrace(2) tests

Introduce:
- trigger_trap()
- trigger_segv()
- trigger_ill()
- trigger_fpe()
- trigger_bus()

These functions generate appropriate signals caused by crashes.

A debugger is required to collect the crashes regardless of signal masking,
catching or ignoring rules.

While there, append __used argument to can_we_set_dbregs().

Sponsored by <The NetBSD Foundation>

(kamil)

2018-05-23 11:16:13 UTC MAIN commitmail json YAML

Cherry-pick upstream patch for internal_mmap() in GCC(.old) sanitizers

Fix internal_mmap() on 32-bit NetBSD platforms

There is need to use internal_syscall64() instead of internal_syscall_ptr().
The offset argument of type off_t is always 64-bit.

http://llvm.org/viewvc/llvm-project?view=revision&revision=333075

PR kern/53261 by Martin Husemann

(kamil)

2018-05-23 11:14:49 UTC MAIN commitmail json YAML

Cherry-pick upstream patch for internal_mmap() in GCC sanitizers

Fix internal_mmap() on 32-bit NetBSD platforms

There is need to use internal_syscall64() instead of internal_syscall_ptr().
The offset argument of type off_t is always 64-bit.

http://llvm.org/viewvc/llvm-project?view=revision&revision=333075

PR kern/53261 by Martin Husemann

(kamil)

2018-05-23 10:42:05 UTC MAIN commitmail json YAML

2018-05-23 10:21:43 UTC MAIN commitmail json YAML

Add a comment about recent AMD CPUs.

(maxv)

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

2018-05-23 10:00:27 UTC MAIN commitmail json YAML

Clarify and extend the fix for the AMD FPU leaks. We were clearing the x87
state only on FXRSTOR, but the same problem exists on XRSTOR, so clear the
state there too.

(maxv)

2018-05-23 09:52:27 UTC MAIN commitmail json YAML

gmake: __alloca and __stat are provided only when building with GLIBC.

Fix a build failure on Ubuntu 18.04.

(nonaka)

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

2018-05-23 07:45:35 UTC MAIN commitmail json YAML

2018-05-23 07:34:40 UTC MAIN commitmail json YAML

2018-05-23 07:33:55 UTC MAIN commitmail json YAML

fix build

obsolete HMAC from cat3 as it was renamed to openssl_HMAC

(para)

2018-05-23 07:24:38 UTC MAIN commitmail json YAML

2018-05-23 07:08:13 UTC MAIN commitmail json YAML

Mark up argument. Fix typo.

(wiz)

2018-05-23 07:06:45 UTC MAIN commitmail json YAML

Add missing .El. Replace Ta outside its defined usage with No (no change
to text output).

(wiz)

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

Use .An in authors section. Remove empty section.

(wiz)

2018-05-23 05:04:39 UTC MAIN commitmail json YAML

2018-05-23 04:45:24 UTC MAIN commitmail json YAML

Don't check IFF_RUNNING in ixgbe_rxeof(). Doing break and leaving a deacriptor
with DD bit is worse than just processing the entry. And it's also racy to
check IFF_RUNNING in rxeof(). If you'd like to strictly obey IFF_RUNNING,
it would be better to do it in the upper layer.

Same as DragonFly (a part of 79251f5ebe4cf9dd2f3e6aed590e09d756d39922).

(msaitoh)

2018-05-23 04:37:13 UTC MAIN commitmail json YAML

Add rxd_nxck (Receive Descriptor next to check) read only sysctl.

(msaitoh)

2018-05-23 02:08:40 UTC MAIN commitmail json YAML

Add cross references to the openssl man pages.

(christos)

2018-05-23 02:06:04 UTC MAIN commitmail json YAML

rename {HMAC,MD5} to openssl_{HMAC,MD5}; add openssl_MD{2,4}

(christos)

2018-05-23 01:58:40 UTC MAIN commitmail json YAML

2018-05-23 01:29:43 UTC MAIN commitmail json YAML

Refactor the attach[1-8] and race1 ATF t_ptrace_wait* tests

Share code in: attach1, attach2 and race1 in the same function body.
Rename thsee tests to more verbose names:
- tracer_sees_terminaton_before_the_parent
- tracer_sysctl_lookup_without_duplicates
- unrelated_tracer_sees_terminaton_before_the_parent

Rename attach3 to parent_attach_to_its_child.

Rename attach4 to child_attach_to_its_parent.

Share code in attach5, attach6 and attach7 in the same function body and
reanem the tests to:
- tracee_sees_its_original_parent_getppid
- tracee_sees_its_original_parent_sysctl_kinfo_proc2
- tracee_sees_its_original_parent_procfs_status

Reduce the code by around 50%.

No functional change intended. All tests pass.

Sponsored by <The NetBSD Foundation>

(kamil)

2018-05-23 01:05:47 UTC MAIN commitmail json YAML

2018-05-23 01:03:46 UTC MAIN commitmail json YAML

2018-05-22 21:03:09 UTC MAIN commitmail json YAML

Define PTRACE_BREAKPOINT_ASM for i386 in the MD part of <sys/ptrace.h>

x86 uses int3 for software breakpoint on i386 and amd64.

Sponsored by <The NetBSD Foundation>

(kamil)

2018-05-22 17:51:55 UTC netbsd-8 commitmail json YAML

2018-05-22 17:50:27 UTC netbsd-8 commitmail json YAML

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

sys/kern/uipc_mbuf.c: revision 1.214

Revert my rev1.190, remove the M_READONLY check. The initial code was
correct: what is read-only is the mbuf storage, not the mbuf itself. The
storage contains the packet payload, and never has anything related to
mbufs. So it is fine to remove M_PKTHDR on mbufs that have a read-only
storage.

In fact it was kind of obvious, since several places already manually
remove M_PKTHDR without taking care of the external storage.

(martin)

2018-05-22 17:43:21 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by jakllsch in ticket #831):

sys/arch/i386/stand/efiboot/eficons.c: revision 1.6

During awaitkey(), move the cursor back to the beginning of the
countdown with '\b' only after waiting.

Some UEFI implementations have a destructive/erasing backspace,
and will not show the countdown if we move the cursor back before the
wait.

My ThinkPad T430 w/ Lenovo's UEFI exhibited this whiteout-backspace,
while my Gigabyte Brix GB-BXBT-2807 did not.

Should fix PR #53292.

(martin)

2018-05-22 17:41:12 UTC netbsd-8 commitmail json YAML

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

sys/netinet6/nd6_rtr.c: revision 1.142

Add missing m_put_rcvif_psref.

(martin)

2018-05-22 17:38:48 UTC netbsd-7-0 commitmail json YAML

2018-05-22 17:38:05 UTC netbsd-7-0 commitmail json YAML

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

sys/kern/uipc_mbuf.c: revision 1.214

Revert my rev1.190, remove the M_READONLY check. The initial code was
correct: what is read-only is the mbuf storage, not the mbuf itself. The
storage contains the packet payload, and never has anything related to
mbufs. So it is fine to remove M_PKTHDR on mbufs that have a read-only
storage.

In fact it was kind of obvious, since several places already manually
remove M_PKTHDR without taking care of the external storage.

(martin)

2018-05-22 17:37:15 UTC netbsd-7-1 commitmail json YAML

2018-05-22 17:36:45 UTC netbsd-7-1 commitmail json YAML

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

sys/kern/uipc_mbuf.c: revision 1.214

Revert my rev1.190, remove the M_READONLY check. The initial code was
correct: what is read-only is the mbuf storage, not the mbuf itself. The
storage contains the packet payload, and never has anything related to
mbufs. So it is fine to remove M_PKTHDR on mbufs that have a read-only
storage.

In fact it was kind of obvious, since several places already manually
remove M_PKTHDR without taking care of the external storage.

(martin)

2018-05-22 17:36:10 UTC netbsd-7 commitmail json YAML

2018-05-22 17:35:38 UTC netbsd-7 commitmail json YAML

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

sys/kern/uipc_mbuf.c: revision 1.214

Revert my rev1.190, remove the M_READONLY check. The initial code was
correct: what is read-only is the mbuf storage, not the mbuf itself. The
storage contains the packet payload, and never has anything related to
mbufs. So it is fine to remove M_PKTHDR on mbufs that have a read-only
storage.

In fact it was kind of obvious, since several places already manually
remove M_PKTHDR without taking care of the external storage.

(martin)

2018-05-22 17:14:47 UTC MAIN commitmail json YAML

Extend the AMD NONARCH method to family 17h. The AMD spec states that for
17h care must be taken when handling sibling threads.

The concern is that if we have a protected two-thread process running on
two siblings, and context switch one thread to another unprotected thread,
disabling the SSB protection on one logical core will disable SSB on its
sibling too (which is still running the protected thread).

All of that doesn't matter to us, because the SSB value we set is
system-wide, not per-process.

(maxv)

2018-05-22 16:44:43 UTC MAIN commitmail json YAML

Simplify the sysctl handlers.

(maxv)

2018-05-22 16:36:19 UTC MAIN commitmail json YAML

Forgot switch cases for AMD.

(maxv)

2018-05-22 14:50:06 UTC netbsd-6-0 commitmail json YAML

2018-05-22 14:49:02 UTC netbsd-6-0 commitmail json YAML

2018-05-22 14:45:21 UTC netbsd-6-1 commitmail json YAML

2018-05-22 14:44:31 UTC netbsd-6-1 commitmail json YAML

2018-05-22 14:40:58 UTC netbsd-6 commitmail json YAML

2018-05-22 14:38:20 UTC netbsd-6 commitmail json YAML

2018-05-22 14:38:10 UTC MAIN commitmail json YAML

2018-05-22 11:09:57 UTC MAIN commitmail json YAML

2018-05-22 10:48:06 UTC MAIN commitmail json YAML

Add new ATF ptrace(2) tests: traceme_sendsignal_{masked,ignored}[1-3]

These tests emit signal from a tracer/parent to the child and verify the
behavior in the case of SIG_BLOCK (masked) and SIG_IGN (ignored).

The signal is not reported by the child process.

These tests pass.

While there, rename for consistency with other tests:
- traceme_sighandler_catch[1-3] -> traceme_sendsignal_handle[1-3]
- traceme_signal_nohandler[1-5] -> traceme_sendsignal_simple[1-5]

Sponsored by <The NetBSD Foundation>

(kamil)

2018-05-22 10:20:05 UTC MAIN commitmail json YAML

Implement a mitigation for SpectreV4 on AMD families 15h and 16h. We use
a non-architectural MSR. This MSR is also available on 17h, but there SMT
is involved, and it needs more investigation.

Not tested (I have only 10h).

(maxv)

2018-05-22 09:25:58 UTC MAIN commitmail json YAML

Several changes:

- Move the sysctl initialization code into spectre.c. This way each
  variable is local. Rename the variables, use shorter names.

- Use mitigation methods for SpectreV4, like SpectreV2. There are
  several available on AMD (that we don't support yet). Add a "method"
  leaf.

- Make SSB_NO a mitigation method by itself. This way we report as
  "mitigated" a CPU that is not affected by SpectreV4. In this case,
  of course, the user can't enable/disable the mitigation. Drop the
  "affected" sysctl leaf.

(maxv)

2018-05-22 08:15:26 UTC MAIN commitmail json YAML

Clarify the parameters for the SpectreV2 mitigation.

Add:
machdep.spectre_v2.swmitigated
Rename:
machdep.spectre_v2.mitigated -> machdep.spectre_v2.hwmitigated

Change the method string, to combine both the hardware and software
mitigations. swmitigated is set at compile time, hwmitigated can be
set by the user.

Examples:

spectre_v2.swmitigated = 1
spectre_v2.hwmitigated = 0
spectre_v2.method = [GCC retpoline]

spectre_v2.swmitigated = 0
spectre_v2.hwmitigated = 0
spectre_v2.method = (none)

spectre_v2.swmitigated = 1
spectre_v2.hwmitigated = 1
spectre_v2.method = [GCC retpoline] + [Intel IBRS]

(maxv)

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

Add RSBA. When set, it indicates that the CPU is vulnerable to SpectreV2
via the RSB.

(maxv)

2018-05-22 07:11:54 UTC MAIN commitmail json YAML

Mitigation for SpectreV4, based on SSBD. The following sysctl branches
are added:

machdep.spectre_v4.mitigated = {0/1} user-settable
machdep.spectre_v4.affected = {0/1} set by the kernel

The mitigation is not enabled by default yet. It is not tested either,
because no microcode update has been published yet.

On current CPUs a microcode/bios update must be applied for SSBD to be
available. The user can then set mitigated=1. Even with an update applied
the kernel will set affected=1.

On future CPUs, where the problem will presumably be fixed by default,
the CPU will report SSB_NO, and the kernel will set affected=0. In this
case we also have mitigated=0, but the mitigation is not needed.

For now the feature is system-wide. Perhaps we will want a more
fine-grained, per-process approach in the future.

(maxv)

2018-05-22 06:31:05 UTC MAIN commitmail json YAML

Reorder and rename, to make the code less SpectreV2-specific.

(maxv)

2018-05-22 05:39:45 UTC MAIN commitmail json YAML

Remove reference to itself.

(wiz)

2018-05-22 04:32:56 UTC MAIN commitmail json YAML

Extend ATF tests in t_trapsignal.sh to verify software breakpoint traps

There are at least four types of SIGTRAP events:
- software/hardware single step (trace trap)
- software breakpoint
- hardware breakpoint/watchpoint
- kernel event (exec, fork, vfork, vfork-done, lwp-create, lwp-exit)

A program can execute software breakpoint without the context of being
traced and this is a regular crash signal emitting SIGTRAP (TRAP_BRKPT).

Rename original trap_* tests (trap_simple, trap_handle, trap_mask,
trap_handle_recurse and trap_ignore) to segv_* tests and restrict them for
SIGSEGV.

Add new tests: trap_* testing the same scenarios as segv_ ones, however
verifying the software breakpoint trap (SIGTRAP).

Keep the original name of h_segv.c, and extend it for software breakpoint
events.

The purpose of these tests is to verify SIGTRAP kernel paths without the
ptrace(2) context.

All tests pass.

Sponsored by <The NetBSD Foundation>

(kamil)

2018-05-22 03:07:50 UTC MAIN commitmail json YAML

Minor improvement in sigaction(2)

Note that SIGCHLD covers process continued event.

Sponsored by <The NetBSD Foundation>

(kamil)

2018-05-22 02:54:32 UTC MAIN commitmail json YAML

Add M&O, ROM, and SWOT

(ginsbach)

2018-05-22 02:46:19 UTC MAIN commitmail json YAML

2018-05-22 02:31:57 UTC MAIN commitmail json YAML

Minor update to signal(7)

Note that SIGCHLD is not just a child exit signal.
Note that SIGIOT is PDP-11 specific signal.

Sponsored by <The NetBSD Foundation>

(kamil)

2018-05-22 01:35:49 UTC MAIN commitmail json YAML

Using audioctl without the -p switch defaults to the mix ring.  This allows
setting the hardware gain etc.

Update the audio spec in audio.7 to reflect these changes.

Addresses PR kern/52781.

(nat)

2018-05-21 22:04:27 UTC MAIN commitmail json YAML

Workaround bogus GCC warning about an uninitialized variable

(jmcneill)

2018-05-21 14:48:55 UTC MAIN commitmail json YAML

Postfix 3.1.9/3.2.6/3.3.1 has released.

(taca)

2018-05-21 10:28:13 UTC MAIN commitmail json YAML

Replace stable_read/write debug printfs with event counters

(jmcneill)

2018-05-21 08:58:47 UTC MAIN commitmail json YAML

disable drm2 on modern nouveau cards (Pascal-based).

our older drm doesn't have any support for modern Pascal or
the second version of Maxwell (but not disabled here yet)
but the driver tries to attach on any nvidia gpu.

this should workaround PR#53258, and other issues reported
with modern nvidia chipsets.

XXX: pullup-7, pullup-8.

(mrg)

2018-05-21 08:49:03 UTC MAIN commitmail json YAML

Add new ATF test: t_trapsignal:trap_ignore

Test ignored trap with right exit code.

This test passes.

Sponsored by <The NetBSD Foundation>

(kamil)

2018-05-21 04:36:21 UTC pgoyette-compat commitmail json YAML

2018-05-21 03:56:21 UTC MAIN commitmail json YAML

add Oxford Semiconductor OXPCIe954 PCIe 4-port serial card

(jnemeth)

2018-05-21 03:54:06 UTC MAIN commitmail json YAML

2018-05-21 03:45:50 UTC MAIN commitmail json YAML

add Oxford Semiconductor OXPCIe954 PCIe 4-port serial card

(jnemeth)

2018-05-21 02:10:47 UTC MAIN commitmail json YAML

2018-05-20 23:47:16 UTC MAIN commitmail json YAML

Refactor and enable the signal3 ATF ptrace(2) test

Adapt the test to be independent from the software breakpoint trap
behavior, whether the Program Counter is moved or not. Just kill the
process after catching the expected signal, instead of pretending to resume
it.

This test passes.

Sponsored by <The NetBSD Foundation>

(kamil)

2018-05-20 15:28:28 UTC MAIN commitmail json YAML

End sentence with a dot.

(wiz)

2018-05-20 15:15:41 UTC MAIN commitmail json YAML

Add a 1PPS-over-GPIO driver, originally by Brad Spencer, with changes by
me to adapt to the new GPIO interrupt interface and support a wider variety
of GPIO pin configuations.

PR kern/51676

(Oops, forgot to "cvs add" these items previously.)

(thorpej)

2018-05-20 14:39:53 UTC MAIN commitmail json YAML

Also substitute ${X11SRCDIR} for the random seed for reproducible builds so
that the random seed is consistent.
XXX: pullup-8

(christos)

2018-05-20 14:08:33 UTC MAIN commitmail json YAML

2018-05-20 12:08:46 UTC MAIN commitmail json YAML

End sentence with a dot.

(wiz)

2018-05-20 09:14:18 UTC MAIN commitmail json YAML

Add a note about FreeBSD.

(maxv)

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

Update, after ten years. Importantly, add a "History" section, to explain
what's going on.

We have now become "upstream", and most of the ipsec-tools development is
done in NetBSD's CVS. However, many distributions still take their
tarballs from SourceForge (which is defunct, and not maintained).

(maxv)

2018-05-20 06:45:00 UTC MAIN commitmail json YAML

pmap_enter() must update modified/referenced flags by 'flags' not 'prot'.

(ryo)

2018-05-20 06:29:43 UTC MAIN commitmail json YAML

2018-05-20 06:15:45 UTC MAIN commitmail json YAML

2018-05-20 04:00:35 UTC MAIN commitmail json YAML

Make stopsigmask a non-static symbol now as it's used in ptrace(2) code

This is a missing part of the previous commit.

While there fix a typo in a newly added comment in the ptrace(2) code.

Sponsored by <The NetBSD Foundation>

(kamil)

2018-05-20 03:51:32 UTC MAIN commitmail json YAML

Fix and enable traceme_signal_nohandler2 in ATF ptrace(2) tests

traceme_signal_nohandler2 checks emitting SIGSTOP to a traced process
with the PT_CONTINUE operation.

The expected behavior is to simulate a behavior of receiving SIGSTOP,
generating SIGCHLD to its parent (in this case the debugger) and ability
to call wait(2)-like function receiving the stopped child event.

The previous behavior was unstopping the process and it has been adjusted
in the kernel code.

FreeBSD keeps unstopping a process for emitting SIGSTOP.
Linux handles this scenario in the same way as NetBSD now.

While there, implement the missing bits in the userland ATF test for
traceme_signal_nohandler2: receiving and validating 2nd SIGSTOP event and
continuing the process, followed by its normal termination.

Sponsored by <The NetBSD Foundation>

(kamil)

2018-05-20 03:09:02 UTC MAIN commitmail json YAML

Fix reproducible builds
XXX: pullup-8

(christos)

2018-05-19 22:57:54 UTC MAIN commitmail json YAML

Note GPIO interrupt support overhaul.

(thorpej)

2018-05-19 21:20:35 UTC MAIN commitmail json YAML

don't prepend sysroots when we already have prepended it (breaks X11 binaries)

(christos)

2018-05-19 20:40:40 UTC MAIN commitmail json YAML

Remove dead code, and style.

(maxv)

2018-05-19 20:21:23 UTC MAIN commitmail json YAML

Remove unused 'error' variables, it's obvious they should have no use.

(maxv)

2018-05-19 20:14:56 UTC MAIN commitmail json YAML

2018-05-19 20:04:41 UTC MAIN commitmail json YAML

Implement PMAP_DIRECT / pmap_direct_process() in support of experimental
UBC optimizations.

(thorpej)

2018-05-19 19:47:47 UTC MAIN commitmail json YAML

2018-05-19 19:32:16 UTC MAIN commitmail json YAML

2018-05-19 19:23:15 UTC MAIN commitmail json YAML

2018-05-19 18:51:59 UTC MAIN commitmail json YAML

2018-05-19 18:19:37 UTC MAIN commitmail json YAML

Fix some whitespace style issues.

(jakllsch)

2018-05-19 18:18:16 UTC MAIN commitmail json YAML

Compact crc32 code by 12 bytes of text.

From dave0 in #NetBSD on Freenode circa December 2017.

Tested in a 32-bit userland harness to produce identical results as old
code for one set of inputs.

(jakllsch)

2018-05-19 18:14:52 UTC MAIN commitmail json YAML

2018-05-19 18:14:36 UTC MAIN commitmail json YAML

add more casts (needed for c++)
XXX: A better solution would be to use C++ casts.

(christos)

2018-05-19 17:48:51 UTC MAIN commitmail json YAML

remove trailing newline

(christos)

2018-05-19 17:44:44 UTC MAIN commitmail json YAML

Need to delete ${DESTDIR} for lint
XXX: pullup-8

(christos)

2018-05-19 17:21:42 UTC MAIN commitmail json YAML

Re-enable PCI window decode enable in PCI Command Register upon
successful pci_mapreg_map().

Loosely related to PR #53286.

(jakllsch)

2018-05-19 17:18:57 UTC MAIN commitmail json YAML

Refine previous change to enable PCI window decoding in Command
Register upon mapping; conditionalize on a global variable, that is set
to true on x86 machines booting under EFI.

For now, initialize the global variable at compile time to false.  This
is intended to limit potential problems for other NetBSD ports, should
this changeset be pulled up to netbsd-8.

Related to PR #53286.

(jakllsch)

2018-05-19 16:55:59 UTC MAIN commitmail json YAML

remove some remaining uvm_emap(9)-related function prototypes

(jakllsch)

2018-05-19 16:51:32 UTC MAIN commitmail json YAML

remove more vestiges of uvm_emap_*(), to fix x86 kernel linking

(jakllsch)

2018-05-19 15:18:02 UTC MAIN commitmail json YAML

adjust heuristics for read-ahead to skip the full read-ahead when last page of
the range is already cached; this speeds up I/O from cache, since it avoids
the lookup and allocation overhead

on my system I observed 4.5% - 15% improvement for cached I/O - from 2.2 GB/s to
2.3 GB/s for cached reads using non-direct UBC, and from 5.6 GB/s to 6.5 GB/s
for UBC using direct map

part of PR kern/53124

(jdolecek)

2018-05-19 15:13:26 UTC MAIN commitmail json YAML

change code to take advantage of direct map when available, avoiding the need
to map pages into kernel

this improves performance of UBC-based (read(2)/write(2)) I/O especially
for cached block I/O - sequential read on my NVMe goes from 1.7 GB/s to 1.9 GB/s
for non-cached, and from 2.2 GB/s to 5.6 GB/s for cached read

the new code is conditional now and off for now, so that it can be tested further;
can be turned on by adjusting ubc_direct variable to true

part of fix for PR kern/53124

(jdolecek)

2018-05-19 15:03:26 UTC MAIN commitmail json YAML

add experimental new function uvm_direct_process(), to allow of read/writes
of contents of uvm pages without mapping them into kernel, using
direct map or moral equivalent; pmaps supporting the interface need
to provide pmap_direct_process() and define PMAP_DIRECT

implement the new interface for amd64; I hear alpha and mips might be relatively
easy to add too, but I lack the knowledge

part of resolution for PR kern/53124

(jdolecek)

2018-05-19 14:15:40 UTC MAIN commitmail json YAML

Add an example "gpioirq" driver that demonstrates interrupts on GPIO
pins.  Will be enhanced in the future to support sending events to
user space on edge-triggered interrupt events.

Based on initial work by Brad Spencer.
PR kern/51676

(thorpej)

2018-05-19 14:11:30 UTC MAIN commitmail json YAML

Prevent 'make obj' creating an objdir inside an objdir. This happens the
second time we call 'make obj' in /usr/src/rescue with MAKEOBJDIR set.
XXX: pullup-8

(christos)

2018-05-19 14:02:10 UTC MAIN commitmail json YAML

Add support for interrupts on GPIO pins.  We support both FDT-driven
interrupt registration as well as the new GPIO interrupt interface.

Based on initial work by Brad Spencer.
PR kern/51676

(thorpej)

2018-05-19 13:59:07 UTC MAIN commitmail json YAML

Overhaul of GPIO interrupt support (that wasn't even used by anything).
- Remove the old, not-expressive-enough interrupt flags, and replace them
  with a new set of interrupt-specific flags that can express a wide
  variety of interrupt configurations (pos, neg, and double-edge, high
  and low level).
- Remove old, unused gpio_pin_ctl_intr() and gpio_pin_irqen(), and
  replace them with gpio_intr_establish(), gpio_intr_disestablish(),
  and gpio_intr_str().  Corresponding fields in the gpio_chipset_tag
  are also added for back-end controllers, which now handle the actual
  dispatch of GPIO interrupts in order to properly support level-triggered
  interrupts as well as interoperate properly with FDT-registered
  interrupts.

Piggy-back on the 8.99.18 version bump.

Inspired by initial work from Brad Spencer.
PR kern/51676

(thorpej)

2018-05-19 11:40:22 UTC MAIN commitmail json YAML

bump version to 8.99.18 - emap removal

(jdolecek)

2018-05-19 11:39:37 UTC MAIN commitmail json YAML

Remove emap support. Unfortunately it never got to state where it would be
used and usable, due to reliability and limited & complicated MD support.

Going forward, we need to concentrate on interface which do not map anything
into kernel in first place (such as direct map or KVA-less I/O), rather
than making those mappings cheaper to do.

(jdolecek)

2018-05-19 11:02:33 UTC MAIN commitmail json YAML

detect wraparound when bumping page wire_count and loan_count

(jdolecek)

2018-05-19 09:32:55 UTC MAIN commitmail json YAML

Intermediate changes to make it further into actually at least compile, not nearly yet
complete. Committed so that others can possibly pick it off, as discussed
on tech-userlevel@ with Martin

(jdolecek)

2018-05-19 09:27:10 UTC MAIN commitmail json YAML

2018-05-19 08:59:38 UTC MAIN commitmail json YAML

2018-05-19 08:54:34 UTC MAIN commitmail json YAML

2018-05-19 08:22:58 UTC MAIN commitmail json YAML

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

Remove misleading comment.

(maxv)

2018-05-19 05:39:21 UTC MAIN commitmail json YAML

Note in vfork(2) that SIGTSTP is masked

SIGSTOP is no longer masked, but it was never documented.

Sponsored by <The NetBSD Foundation>

(kamil)

2018-05-19 05:25:21 UTC MAIN commitmail json YAML

Cover SIGTSTP, SIGTTIN and SIGTTOU in traceme_vfork_raise ATF tests

SIGTSTP, SIGTTIN and SIGTTOU are special case signals ignored in a
vfork(2)ed child. Assert the behavior of raise(2) after calling
PT_TRACE_ME.

Renumber existing traceme_vfork_raise tests.

Sponsored by <The NetBSD Foundation>

(kamil)

2018-05-19 05:10:16 UTC MAIN commitmail json YAML

Reflect reality in the comment

The watcher process is emitting SIGKILL, not SIGTERM.

Sponsored by <The NetBSD Foundation>

(kamil)

2018-05-19 05:07:42 UTC MAIN commitmail json YAML

Enable traceme_vfork_raise2 in ATF ptrace(2) tests

raise(SIGSTOP) is now handled correctly by the kernel, in a child that
vfork(2)ed and called PT_TRACE_ME.

Implement a helper process emitting SIGKILL to a stopped child of a
vfork(2)ed process.

Sponsored by <The NetBSD Foundation>

(kamil)

2018-05-19 05:04:09 UTC MAIN commitmail json YAML

Add new auxiliary functions in t_ptrace_wait.h

New functions:
- FORKEE_ASSERT_NEQ()
- await_stopped_child()

Both will be used soon in a new ATF ptrace(2) test.

Sponsored by <The NetBSD Foundation>

(kamil)

2018-05-19 05:01:42 UTC MAIN commitmail json YAML

Stop masking raise(SIGSTOP) in a vfork(2)ed child that called PT_TRACE_ME.

Sponsored by <The NetBSD Foundation>

(kamil)

2018-05-19 02:42:59 UTC MAIN commitmail json YAML

Stop masking SIGSTOP in a vfork(2)ed child

Keep the traditional BSD behavior masking SIGTSTP, SIGTTIN and SIGTTOU in
a vfork(2)ed child before exec(3)/exit(3). This is useful in shells and
prevents deadlocking, when a parent cannot unstop the sleeping child.

Change the behavior for SIGSTOP. This signal is by design not maskable and
this property shall be obeyed without exceptions. The STOP behavior is
expected in the context of debuggers and useful in standalone programs.

It is still possible to stop a vfork(2)ed child, however it requires
proc.curproc.stopfork=1, but it is not a flexible solution.

FreeBSD and OpenBSD keep masking SIGSTOP in a vfork(2)ed child.
Linux does not mask stop signals in the same scenarios.

This fixes ATF test: t_vfork:raise2.
No known regressions reported in the existing ATF tests.

Discussed with <kre>

Sponsored by <The NetBSD Foundation>

(kamil)

2018-05-19 01:53:24 UTC MAIN commitmail json YAML

2018-05-19 01:52:49 UTC MAIN commitmail json YAML

provide bison compatibility for YYLLOC_DEFAULT

(christos)

2018-05-19 01:51:05 UTC MAIN commitmail json YAML

2018-05-18 21:05:10 UTC MAIN commitmail json YAML

2018-05-18 21:03:33 UTC MAIN commitmail json YAML

Add missing m_put_rcvif_psref.

(maxv)

2018-05-18 20:24:57 UTC MAIN commitmail json YAML

Include OUR types.h and not the machine's. A small step to allow for
crosscompilation.

(reinoud)

2018-05-18 20:24:16 UTC MAIN commitmail json YAML

Replace the dynamically allocated signal stack to a static claimed one and add
diagnostic messages that can be enabled.

(reinoud)

2018-05-18 20:21:14 UTC MAIN commitmail json YAML

Use knowledge of mcontext for i386 support

(reinoud)

2018-05-18 20:11:48 UTC MAIN commitmail json YAML

Use knowledge about the mcontext

(reinoud)