Commit Graph

258912 Commits

Author SHA1 Message Date
uwe
c1a5c8576e Add missing $NetBSD$ comment at the beginning. 2018-05-27 12:24:36 +00:00
kamil
223c019e6d Fix ATF ptrace(2) bytes_transfer_piod_read_auxv test
Make the initial buffer larger to stop triggering the runtime assert about
its size.

Its size is probably larger than all real use cases, but it's good enough
for the purpose of ATF tests and immune of potential AUXV size.

Sponsored by <The NetBSD Foundation>
2018-05-27 08:08:24 +00:00
wiz
b86c168cf0 Minor improvements. 2018-05-27 07:12:26 +00:00
wiz
5adfef80f5 Fix typo in comment. 2018-05-27 06:40:31 +00:00
thorpej
91d6af5a4b Add a driver for the Taos TSL256x light sensors. 2018-05-27 05:31:20 +00:00
thorpej
033d68f1b3 Add support for light sensors that report Illuminance in lux. 2018-05-27 01:39:00 +00:00
christos
c50a4e606c - Introduce :q modifier for make variables and make it double escape $'s so
that passing variables to recursive makes with :q works as expected.
- Revert :Q to work as before.
- Adjust makefiles that use recursive make to use :q

Discussed on tech-toolchain@
XXX: pullup 8
2018-05-27 01:14:50 +00:00
christos
d25ad815ca alloca, bad; stack protector, good. 2018-05-27 00:36:56 +00:00
jmcneill
f0c65f7a3b Export a psci_fdt_reset function, usable from FDT platform code. 2018-05-26 22:49:03 +00:00
thorpej
711fe4468e Avoid dereferencing NULL if we attempt to look up an known unit type. 2018-05-26 21:15:46 +00:00
kamil
c2b9ec1954 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>
2018-05-26 21:07:47 +00:00
kamil
4ee7ae6051 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>
2018-05-26 20:27:48 +00:00
alnsn
1a047feb17 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.
2018-05-26 20:17:56 +00:00
palle
255706fd38 next_stick() - fix typy in comment: tick->stick 2018-05-26 19:20:21 +00:00
riastradh
aafff8763a 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.
2018-05-26 19:18:11 +00:00
jdolecek
91c2b8613a 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
2018-05-26 18:57:35 +00:00
kamil
d959277a02 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>
2018-05-26 18:18:19 +00:00
kamil
1aca04ce92 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>
2018-05-26 15:32:31 +00:00
kamil
49ea5747bf 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>
2018-05-26 15:15:17 +00:00
jmcneill
86c215cc57 Add battery voltage, charge current, and discharge current sensors for
AXP803.
2018-05-26 14:39:20 +00:00
jakllsch
7a065bfebf 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.
2018-05-26 13:33:44 +00:00
jakllsch
b002e1595d regen 2018-05-26 13:26:01 +00:00
jakllsch
91f3f310cd Add Intel 82Q45 IDER 2018-05-26 13:25:19 +00:00
wiz
5e5fa70115 Merge single-letter options. Use more markup. 2018-05-26 12:40:06 +00:00
leot
8d25f7611b 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>!
2018-05-26 11:20:30 +00:00
jmcneill
5c5ebc1dee Add -v flag which prints the full path of each device node when dumping
the full tree.
2018-05-26 10:21:41 +00:00
jmcneill
c9b64841e5 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.
2018-05-26 00:17:54 +00:00
macallan
b3cd4c7e60 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
2018-05-25 23:00:34 +00:00
uwe
2a24bb8653 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.
2018-05-25 20:48:54 +00:00
jdolecek
546a023e11 add the KASSERT() for loan_count wrap-around to all places which increase it 2018-05-25 20:11:03 +00:00
jmcneill
73ce2b1955 hdmiddc -> hdmi for function name on PH6/PH7/PH8 2018-05-25 19:56:47 +00:00
jakllsch
2aa8255a0f Compile dtbs with -@ so that fdtoverlay(1) et.al. can symbolically
reference phandles.
2018-05-25 19:48:12 +00:00
martin
14167a96a3 Fix typo in local macro name, pointed out by uwe 2018-05-25 16:30:03 +00:00
maxv
4929e31107 Hide a bunch of local symbols. 2018-05-25 16:01:31 +00:00
ryoon
dc1eda5068 Fix HIDMS_DEBUG build 2018-05-25 15:52:45 +00:00
maxv
236f8e6360 Rename the entry points of the prekern, rename the array and move it into
.rodata.
2018-05-25 15:52:11 +00:00
ryoon
fb3dc77909 If fixed feature buttons exist, print detection messages. 2018-05-25 15:48:00 +00:00
martin
878ebc8c91 Add new test program 2018-05-25 15:42:48 +00:00
martin
b11873986d Add a test to verify syscall() and/or __syscall() are working.
This used to trigger a panic (see PR kern/53261) on arm.
2018-05-25 15:42:30 +00:00
martin
cb95e17bac PR kern/53261: handle SYS_syscall indirection in MD code - the generic
version would misalign the argument array.
2018-05-25 15:37:57 +00:00
maxv
aaf238e228 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.
2018-05-25 15:33:56 +00:00
jdolecek
3e6fdee79b Don't use uvm_emap_size, emap was removed 2018-05-25 06:34:02 +00:00
ozaki-r
74ffb1c2c6 Ensure to call if_register after interface initializations finish 2018-05-25 04:40:26 +00:00
riastradh
0840e69c34 Add a topical acronym for this week: GDPR. 2018-05-25 00:31:07 +00:00
christos
5afe69313b obsolete DES_random_key 2018-05-24 22:37:58 +00:00
sevan
3c5b0d3e82 Note libbozohttpd(3) & bozohttpd(3lua) from earlier in the month. 2018-05-24 20:04:46 +00:00
reinoud
b19ccb8124 First try at TLS support and getcontext/setcontext/swapcontext support. 2018-05-24 19:39:04 +00:00
christos
268058c040 One more possible star. 2018-05-24 19:21:01 +00:00
christos
cf5e80d451 handle '*' entries in rules. 2018-05-24 19:19:37 +00:00
christos
e1b6c9c92d remove DES_random_key.3 since it is in libdes. 2018-05-24 19:03:47 +00:00