269491 Commits

Author SHA1 Message Date
uwe
9028c79eae Install manual pages for tar and cpio only if ${MKBSDTAR} == "no"
PR bin/54468
2019-08-15 21:05:16 +00:00
martin
effa0345f7 Never trust a compiler that predefines i386 as 1 - do the symbol name
concatenation at the make level instead.
2019-08-15 19:53:01 +00:00
kamil
645a2f39f4 Ship with sanitizer/lsan_interface.h for LLVM 7
Leak Sanitizer header is already needed in the distribution for built with
Address Sanitizer (MKSANITIZER):

 - dist/llvm/utils/TableGen/TableGen.cpp
 - dist/clang/utils/TableGen/TableGen.cpp

Next version of LLVM (9.0) will ship with LSan.
2019-08-15 16:31:17 +00:00
kamil
c208434299 Ship with sanitizer/lsan_interface.h for GCC 7
Leak Sanitizer is there.
2019-08-15 16:01:27 +00:00
martin
3e1d4a8ce3 Replace black voodo linker magic (sometimes failing) with some
makefile + macro magic to trim the list of available machines on size
restricted install media.
2019-08-15 14:06:40 +00:00
rin
02bb085b60 Recent rasops(9) changes have been pulled up to netbsd-9. 2019-08-15 13:33:15 +00:00
maxv
3808726a03 Unlink KMEM_GUARD leftovers. 2019-08-15 12:24:08 +00:00
maxv
46fb8844fe Retire KMEM_GUARD. It has been superseded by kASan, which is much more
powerful, has much more coverage - far beyond just kmem(9) -, and also
consumes less memory.

KMEM_GUARD was a debug-only option that required special DDB tweaking, and
had no use in releases or even diagnostic kernels.

As a general rule, the policy now is to harden the pool layer by default
in GENERIC, and use kASan as a diagnostic/debug/fuzzing feature to verify
each memory allocation & access in the system.
2019-08-15 12:06:42 +00:00
christos
2d0aa66b2f PR/54343: Prevent NULL pointers in callback strings; use "*?*" for now to
identify them.
2019-08-15 10:29:07 +00:00
skrll
c28f60683c Make pmap_db_pte_print more terse so it's quicker on serial consoles 2019-08-15 10:24:26 +00:00
skrll
7351e1c2bf Indent the field value defines. NFCI. 2019-08-15 09:07:34 +00:00
skrll
0b1a41caff More diagnostic 2019-08-15 09:04:22 +00:00
skrll
d065a43358 Indentation and wrap the resulting long line 2019-08-15 09:03:09 +00:00
gson
89beec5aa9 Set the ATAPI "BYTE COUNT LIMIT" field in the SATA case like we
already do in the ATA case, to make NetBSD work with the virtual
SATA CD-ROM of "qemu-system-i386 -machine q35".  Fixes PR kern/54389.
OK mlelstv.
2019-08-15 09:00:23 +00:00
mrg
8ad871e868 usbnet(9): Add common framework for USB network devices. Port the
axe(4), axen(4), cdce(4), cue(4), mue(4), smsc(4), udav(4),
	ure(4), url(4), and urndis(4) drivers fixing many bugs and
	porting to NET_MPSAFE in the process.  [mrg 20190814]
2019-08-15 08:55:06 +00:00
kamil
8d8be769a2 Adapt tests/kernel/t_subr_prf for MKSANITIZER
Allow to rename snprintf-like functions to avoid clashes with a sanitizer.

This tests needs a fixup to remove 'undef symbol' from the test code
generator.
2019-08-15 08:46:09 +00:00
kamil
0e6f677375 Add SANITIZER_RENAME_CLASSES in bsd.prog.mk
This adds a more flexible version of SANITIZER_RENAME_SYMBOL.

New symbol allows to specify MKSANITIZER specific renames on per-file and
per-symbol basis.
2019-08-15 08:42:59 +00:00
wiz
377f156ee7 Fix Xr usage. 2019-08-15 08:37:13 +00:00
kamil
74a26dbbb0 Add missing extern declaration of ib_mach_emips in installboot
Change added for the consistency with the existing code.
2019-08-15 08:36:09 +00:00
kamil
bffacbd197 Stop defining _rpcsvcdirty in bss and data
_rpcsvcdirty is already defined in the generated code from rpcgen(1).

Detected during the build with Address Sanitizer (MKSANITIZER).
2019-08-15 08:34:19 +00:00
mrg
d3025cbd35 - document locking requirements more
- expand uno_foo() docs to include return type and parameters
- expand uno_intr() docs
- add uno_tick()
- fix various typoes
2019-08-15 08:33:14 +00:00
kamil
cb47fa61ba Avoid symbol clashes in usr.sbin/ypserv/ypserv under MKSANITIZER
Remove symbol conflicts for: gethostbyname2
2019-08-15 08:30:19 +00:00
kamil
fab4b3f46f Avoid symbol clashes in bin/df under MKSANITIZER
Remove symbol conflicts for: __getmntinfo13
2019-08-15 08:24:11 +00:00
kamil
5d3c833b7d Avoid symbol clashes in fs/nfs/nfsservice under MKSANITIZER
Remove symbol conflicts for: __getmntinfo13
2019-08-15 08:23:45 +00:00
kamil
825c3698b4 Avoid symbol clashes in tests/usr.bin/id under MKSANITIZER
Remove symbol conflicts for:

 - __getpwnam50
 - __getpwuid50
 - getgrgid
 - getgrouplist
 - getgroups
2019-08-15 08:22:52 +00:00
kamil
1101023c0c Fix build of t_ubsan/t_ubsanxx under MKSANITIZER
Do not link micro-ubsan runtime for disabled tests.

This avoids double symbols linked into a single binary.
2019-08-15 08:17:32 +00:00
mrg
d1509fdd73 port cue(4), mue(4) and url(4) to usbnet(9). diffstat says:
8 files changed, 911 insertions(+), 3087 deletions(-)
2019-08-15 08:02:32 +00:00
mrg
f2c22b6b6e - usbnet_rx_loop_cb's usbd_xfer parameter is never used and available
in the usbnet_chain if needed.  remove it
- usbnet media status change already set link to false, don't repeat
  this in every driver
- don't clear link in stop, nothing was re-enabling it for non-MII
- add optional uno_tick_cb(struct usbnet *un) that is called from the
  usbnet tick timer
- remove wrong debug sysctl prototype

rx_loop and timer are kernel versions changes, but hopefully this is
the last one for usbnet.  working with 3 more drivers now (cue, mue
and url), leaving only aue, kue, upl and umb undone (aue may work
with previously supported devices, mine doesn't work with our driver,
kue and upl have patches for testing and umb is undone.)
2019-08-15 05:52:23 +00:00
ozaki-r
bce11250f5 tests: check if ifconfig (ioctl) works after a failure of ifconfig destroy
This is a test for PR kern/54434.
2019-08-15 04:21:33 +00:00
ozaki-r
426920b6c8 Restore if_ioctl on error of ifc_destroy
Otherwise subsequence ioctls won't work.

Patch from Harold Gutch on PR kern/54434 (tweaked a bit by me)
2019-08-15 04:20:59 +00:00
kamil
1f7b844ec7 fsck: Stop defining the same variable concurrently in bss and data
returntosingle was defined in multiple places:

 - fsck_lfs/main.c
 - fsck_ffs/main.c
 - fsck_ext2fs/main.c
 - fsck/fsutil.c

Keep the fsutil.c definition as the only one.

Detected during the build of telned with Address Sanitizer (MKSANITIZER).
2019-08-15 03:10:42 +00:00
kamil
d9a1e5d37f telnetd: Stop defining the same variables concurrently in bss and data
auth_level and require_secure_login were defined in two places:

 - global.c that picked it from headers and removed 'extern'
 - telnetd.c that initialized it to 0

line was defined twice: in global.c and sys_term.c with a non-zero value.
Remove the definition and initialization from sys_term.c and initialize
the variable early in main().

Detected during the build of telned with Address Sanitizer (MKSANITIZER).

Reviewed by <mrg>
2019-08-15 01:15:21 +00:00
rin
4cfa5c766e Support bitmap fonts with stride 4 (i.e., width 17 to 32). 2019-08-15 00:50:11 +00:00
rin
04cebdd3c6 kern/52229
Correct linebytes (stride) for intelfb(4), which fixes screen
corruption on the following machines:

- MacBookAir5,2 (Ivy Bridge, 13-inch, Mid 2012)
- MacBookAir6,1 (Haswell, 11-inch, Early 2014)

Now, wsdisplay(4) console as well as intel(4) driver of Xorg
works fine on these machines.

Also there's no side effects found on another machine:

- ThinkPad T480s (Kaby Lake R)

XXX
pullup to netbsd-9
2019-08-15 00:27:47 +00:00
skrll
92c78af154 Add a meson6_timer driver and provide a timecounter 2019-08-14 15:08:53 +00:00
martin
3004d9767f Fix some "partition index" (as used in the abstract interface)
versus disklabel "partition letter" confusion.
2019-08-14 13:58:00 +00:00
martin
b04f4d6257 On architectures that usually do MBR/disklabel, nevertheless deal with
pure/plain disklabel disks, and explicitly offer this as partitioning
option when bootability is not a concern.
2019-08-14 13:02:23 +00:00
martin
6fec679845 When we ask the user to select a partitioning scheme and they refuse
(that is: select "Exit" in the menu), abort installation.
2019-08-14 12:55:35 +00:00
martin
13f836ecb6 Provide some documentation for macros / defines used in the machine
dependent backend parts of sysinst.
2019-08-14 12:49:37 +00:00
martin
3d3e06b3da Update to newer sshd (the host key is the same as before, it already
was a rsa key). From Harold Gutch.
2019-08-14 12:08:27 +00:00
jmcneill
5dad262c9e Catch up to recent mainline dts changes 2019-08-14 09:54:34 +00:00
jmcneill
e60aa95be2 Add eth_rxd3 and eth_rxd2 pinctrl groups 2019-08-14 09:50:20 +00:00
skrll
bfcaf5a7bd Various fixes / changes
- don't use prescaler
- improve AB_DEBUG output
- fix a9ptmr_delay to work with a decrementing counter!

Thanks to jmcneill@ for proving I'm an idiot
2019-08-14 09:20:00 +00:00
ozaki-r
bf98d6f362 Add missing IFNET_LOCK for regen_tmpaddr
Reported by ryo@
2019-08-14 08:34:44 +00:00
mrg
f1e87e99ec introduce usbnet_set_dying(). will be used by url(4) conversion.
bump version.

introduce USBNET_MODULE() that encompasses almost all the module
specific code for usbnet modules.  they still need to include
the relevant ioconf.c, but everything else is now just, eg,

	USBNET_MODULE(axen)
2019-08-14 03:44:58 +00:00
kamil
f3834eb55d Add LLVM sanitizers in the MKLLVM=yes build
Enable in all the supported variations for NetBSD/amd64:

 - Address Sanitizer
 - Thread Sanitizer
 - Memory Sanitizer
 - Undefined Behavior Sanitizer
 - SafeStack
 - libFuzzer
 - XRay

This change enables the features on amd64 for start.
2019-08-14 01:42:08 +00:00
kamil
a8c3f321e2 Cherry-pick upstream compiler-rt patches for LLVM sanitizers
Upstream no longer accepts patches for LLVM-8, therefore pull needed changes downstream.

Enhancements:

 * resolved build failured with NetBSD 9.99.3
 * ioctl(2) lists are synced with NetBSD 9.99.3
 * fixes dynamic asan (-fsanitize=address -shared-libasa) crash on init

commit 092068cd7429659138d6779a3072298462ad3e9c
Author: Kamil Rytarowski <n54@gmx.com>
Date:   Wed Aug 7 21:56:43 2019 +0000

    Restrict the NetBSD ASan TSD fallback to !ASAN_DYNAMIC

    The fallback to the alternative implementation of TSD with TLS
    is only needed for the static version of ASan for NetBSD.

    The same code cannot be reused for the dynamic version of ASan as
    TLS breaks and TSD code works.

    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@368219 91177308-0d34-0410-b5e6-96231b3b80d8

commit 0bd9d23c4317d5d1c440e19892e178a29c9fe7be
Author: Kamil Rytarowski <n54@gmx.com>
Date:   Thu Aug 8 02:21:44 2019 +0000

    Sync ioctl(2) list with NetBSD 9.99.3

    Register 36 new ioctl(2) calls.

    Enable NVMM for amd64 as the API has been stabilized.

    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@368247 91177308-0d34-0410-b5e6-96231b3b80d8

commit 08d3c10606f09a4545487e9c3fad919ee396e3a6
Author: Tom Stellard <tstellar@redhat.com>
Date:   Wed May 15 20:29:49 2019 +0000

    Merging r360212:

    ------------------------------------------------------------------------
    r360212 | kamil | 2019-05-07 17:44:41 -0700 (Tue, 07 May 2019) | 6 lines

    Fix build on NetBSD 8.99.38

    With recent changes the dev/nvmm/nvmm_ioctl.h header is no longer
    a standalone NVMM header. Disable it until the NVMM operations will
    stabilize and be included in the ioctl(2) interceptors.

    ------------------------------------------------------------------------

    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_80@360811 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-14 00:51:48 +00:00
rin
f48f7ada9d When using stamp, drop attributions other than back and foreground
colors so that stamp is not updated unnecessarily.
2019-08-14 00:51:10 +00:00
rjs
12b0ad45ff Remove unused checksum code. 2019-08-13 19:55:40 +00:00
martin
736e79ce31 Make sure to completely initialize dynamic menu entries. 2019-08-13 17:57:49 +00:00