Commit Graph

9159 Commits

Author SHA1 Message Date
lukem
46b85cbbd3 kyua-cli: convert auto_ptr to unique_ptr
Update kyua-cli to C++11 and use unique_ptr instead of auto_ptr,
(with std::move() where appropriate), to avoid deprecated warning by g++ 8.

(I didn't change some of the code that could arguably be refactored
to use unique_ptr or shared_ptr instead of raw pointers
and therefore remove the special case destructor handling).
2020-07-02 14:04:00 +00:00
roy
2fc7a081d2 Sync 2020-07-02 13:59:19 +00:00
roy
a43a146444 Update to dhcpcd-9.1.3 with the following changes:
* inet6: Add support for reporting Mobile IPv6 RA's
 * inet6: Report RA Proxy flag if set
 * BSD: Allow non NetBSD and OpenBSD to set IN6_IFF_AUTOCONF
 * privsep: Don't handle any signals meant for the main process
 * eloop: Try and survive a signal storm
 * dhcpcd: Add an option to poll the interface carrier state
 * script: Make visible some link level parameters to lease dumping
 * inet6: Don't regen temp addresses we didn't add
 * privsep: Don't limit file writes if logging to a file
 * DHCP6: Fix lease timings with nodelay option
2020-07-02 13:57:40 +00:00
lukem
e60d5634a2 lutok: auto_ptr replaced; remove build workaround 2020-07-02 13:56:10 +00:00
lukem
8665e60721 lutok: use unique_ptr not auto_ptr 2020-07-02 13:54:19 +00:00
lukem
7115637964 Fix addition of C++ .cc source to SRCS
Fix assumption that all of the source files are .c, as some are .cc.

Not tested, based on similar change to
  external/gpl3/gcc/usr.bin/cc1plus/Makefile
2020-07-01 08:25:44 +00:00
lukem
b252a0e204 use ggc-none.c not ggc-none.o in SRCS
not tested, based on similar change to
 external/gpl3/gcc/usr.bin/lto-wrapper/Makefile
2020-07-01 07:54:24 +00:00
lukem
a0572f97f3 kyua-cli: fix build of .cpp files
Fix assignment of SRCS for C++ sources that use .cpp instead of .cc.
2020-06-29 08:54:58 +00:00
lukem
41feef0356 Fix addition of C++ .cc source to SRCS
Fix assumption that all of the source files are .c, as some are .cc.
2020-06-29 08:34:17 +00:00
lukem
96e11f690b use ggc-none.c not ggc-none.o in SRCS 2020-06-29 08:30:42 +00:00
jdolecek
0762753c60 fix bug introduced in conversion to kmem(9), passing address of the local
variable instead of pointer to allocated memory

should fix PR kern/55426 by Andreas Gustafsson
2020-06-27 21:21:11 +00:00
wiz
2680eae4a7 Sort options and their descriptions.
Replace tab with space in table.
Make non-standard section subsections.
Comment out Xr to procsystime(1) which does not exist on NetBSD.
2020-06-26 15:45:18 +00:00
thorpej
fd0ca8eb0d Hack to get the "has ANSI C headers" check to pass on newer versions
of clang as bundled with Xcode.  If someone really cares about ensuring
NetBSD's host tools build on a system without <stdlib.h>, then I'm sure
that enterprising individual will also find a super #correct fix for this
specific problem.
2020-06-26 06:08:37 +00:00
uwe
aa0264d3ca Try to improve markup. 2020-06-25 14:59:51 +00:00
uwe
9a3f56c91e Try to improve markup. 2020-06-25 14:08:48 +00:00
sevan
72bdb0fb50 space, tab 2020-06-25 09:48:29 +00:00
sevan
86e1b08aff Fix column layout 2020-06-25 09:39:19 +00:00
mlelstv
bf2615aa1b Don't assume everything is a wedge and has a parent device. On non-wedges
this crashes.

Instead, just talk to the referenced device and rely on the dk driver
to pass requests correctly.
2020-06-25 09:39:15 +00:00
sevan
5c85b20eb8 No truss here 2020-06-24 18:49:01 +00:00
sevan
115e612e0f mdocify 2020-06-24 18:43:38 +00:00
sevan
7226fd0ff8 mdocify 2020-06-24 18:06:01 +00:00
jdolecek
ce67beced2 reduce stack usage in dsl_scan_recurse() - allocate memory for
temporary zbookmark_phys_t using kmem_alloc() rather than stack;
this recuses several times usually, and this saves 2x
sizeof(zbookmark_phys_t) == 64 bytes per recursion

part of fix for PR kern/55402 by Frank Kardel
2020-06-24 16:29:34 +00:00
jdolecek
41a612de4f change dsl_scan_visitbp() to allocate blkptr_t dynamically rather than
on-stack - this function is called recursively, and the 120 bytes per call
add up; also remove unused variable

part of fix for PR kern/55402 by Frank Kardel
2020-06-24 16:23:16 +00:00
jdolecek
5964fe3b97 reduce stack usage in vdev_queue_io_to_issue() - zio_t is about 1KB, and
the function potentially recurses into itself

part of fix for PR kern/55402 by Frank Kardel
2020-06-24 16:16:01 +00:00
rin
c57c4e528d PR bin/55411 (Akihiko HAYASHI)
Remove stray ``&&'' introduced in the previous revision, so that
host tools are correctly passed to configure script.

No similar problem for gcc.old. No release branches are affected.
2020-06-24 05:06:08 +00:00
jmcneill
62a169693c If calling d_minphys on the parent disk device, make sure we use the
parent disk device's dev_t. Fixes zfs on wedges on ld(4).

XXX pullup-9
2020-06-21 21:29:11 +00:00
lukem
9afb92341a kyua-cli: avoid warning about deprecated auto_ptr 2020-06-21 14:26:16 +00:00
lukem
ac33d8c71a lutok; fix build of c++ tests 2020-06-21 14:12:50 +00:00
lukem
456534299b lutok; fix strncpy -Wstringop-truncation warning 2020-06-21 14:11:54 +00:00
lukem
894e537a2e fix build of atf .cpp files 2020-06-21 13:59:56 +00:00
jdolecek
99379c717f use pool_cache for (meta)data buffers also on NetBSD
this should generally slightly improve performance on MP systems, and
specifically for xbd(4) storage avoids slow unaligned I/O buffer handling

this change requires updated kernel, to allow up to SPA_MAXBLOCKSHIFT item
size for pools

fixes PR kern/55397 by Frank Kardel
2020-06-19 14:13:23 +00:00
christos
ca704e13dc Add --timestamp for reproducible builds. 2020-06-16 00:47:21 +00:00
christos
356495e423 s/Black/Block 2020-06-15 21:27:57 +00:00
roy
b49ede492e dhcpcd: Build privsep resource limited sandbox. 2020-06-15 17:02:58 +00:00
roy
a47a5665d4 Sync 2020-06-15 16:59:05 +00:00
roy
e66fc20f54 Update to dhcpcd-9.1.2 with the following changes:
* NetBSD: free ARP state once IPv4LL address announced
* NetBSD: Mark RA dervied addresses as AUTOCONF
* BSD: Only mark static routes from dhcpcd.conf as static
* DHCP6: Ensure requested addresses are requested
* DHCP6: Fix prefix length calculation when no prefix specified
* privsep: Implement a resource limited sandbox
2020-06-15 16:58:01 +00:00
christos
a51582d48a missed the capitalized ones. 2020-06-15 02:29:44 +00:00
christos
2f0bfbf344 Rename blacklist -> blocklist 2020-06-15 01:57:29 +00:00
christos
df83713dd8 Import blocklist from https://github.com/zoulasc/blocklist.
This is the same code as blacklist from the HEAD of the NetBSD tree.
2020-06-15 01:52:52 +00:00
christos
29faeba762 merge conflicts 2020-06-15 00:37:24 +00:00
christos
03c288bb80 Import 5.39:
* Remove unused subtype_mime (Steve Grubb)
   * Remove unused check in okstat (Steve Grubb)
   * Fix mime-type in elf binaries by making sure $x is set
   * Fix indirect negative offsets broken by OFFNEGATIVE
   * Fix GUID equality check
   * PR/165: Handle empty array and strings in JSON
   * PR/162: Add --exclude-quiet
   * Fix memory leak in ascmagic (Steve Grubb)
   * Fix string comparison length with ignore whitespace
   * Fix mingwin 64 compilation
   * PR/159: whitelist getpid needed for file_pipe2file()
   * Indicate negative offsets with a flag OFFNEGATIVE
     so that -0 works.
   * Introduce "offset" magic type that can be used to
     detect the file size, and bail on short files.
   * document DER better in the magic man page.
   * fix memory leaks (SonarQube)
   * rewrite confusing loops (SonarQube)
   * fix bogus test (SonarQube)
   * pass a sized buffer to file_fmttime() (SonarQube)
   * Don't allow * in printf formats, or the code itself (Christoph Biedl)
   * Introduce a printf output size checker to avoid DoS attacks
   * Avoid memory leak on error (oss-fuzz)
   * Check length of string on DER before derefercing and add new types
   * Add missing DER string (oss-fuzz)
   * Add missing DER types, and debugging
   * PR/140: Avoid abort with hand-crafted magic file (gockelhahn)
   * PR/139:  Avoid DoS in printf with hand-crafted magic file (gockelhahn)
   * PR/138: Avoid crash with hand-crafted magic file (gockelhahn)
   * PR/136: Fix static build by adding a libmagic.pc (Fabrice Fontaine)
   * add guid support native support via the "guid" type.
2020-06-15 00:18:47 +00:00
fox
cdb11efe4c external/gpl3/gcc: Suppress -Werror=maybe-uninitialized
Seems like false positive since the ASM_GENERATE_INTERNAL_LABEL macro
stores the value into prev_label, so it is alright for prev_label to
be uninitialized.

Error was reported when build.sh was run with MKSANITIZER=yes flag.

Reviewed by: kamil@
2020-06-12 14:37:51 +00:00
ad
4b8a875ae2 uvm_availmem(): give it a boolean argument to specify whether a recent
cached value will do, or if the very latest total must be fetched.  It can
be called thousands of times a second and fetching the totals impacts not
only the calling LWP but other CPUs doing unrelated activity in the VM
system.
2020-06-11 19:20:42 +00:00
roy
378e0318d0 dhcpcd: Disable priviledge separation and sandboxing for SMALLPROG builds
It's a fair chunk of code and is probably safe enough for our ramdisks.
2020-06-11 16:05:54 +00:00
kamil
4228f24a2e Build and install llvm-symbolizer for MKLLVM=yes
llvm-symbolizer is an alternative for GNU addr2line(1), heavily used by the
LLVM sanitizers.

Do not install it as tools as it is not necessary as of today in that
stage.
2020-06-09 21:50:32 +00:00
fox
6ed49867f1 external/mpl/dhcp: Suppress -Werror=stringop-truncation error
This logic correctly uses strncpy(3) to fully initialize a fixed-width field, and also ensures
NUL-termination on the next line as other users of the field expect.

Add -Werror=stringop-truncation to prevent build failure, when run with MKSANITIZER=yes.

Error was reported when build.sh was run with MKSANITIZER=yes flag.

Reviewed by: kamil@
2020-06-07 23:29:16 +00:00
fox
1644357e99 external/cddl/osnet: Suppress -Werror=stringop-truncation error
This logic correctly uses strncpy(3) to fully initialize a fixed-width field, and also ensures
NUL-termination on the next line as other users of the field expect.

Add -Werror=stringop-truncation to prevent build failure, when run with MKSANITIZER=yes.

Error was reported when build.sh was run with MKSANITIZER=yes flag.

Reviewed by: kamil@
2020-06-07 23:26:54 +00:00
fox
9674cee3b8 external/bsd/atf: Suppress -Werror=stringop-truncation error
This logic correctly uses strncpy(3) to fully initialize a fixed-width field, and also ensures
NUL-termination on the next line as other users of the field expect.

Add -Werror=stringop-truncation to prevent build failure, when run with MKSANITIZER=yes.

Error was reported when build.sh was run with MKSANITIZER=yes flag.

Reviewed by: kamil@
2020-06-07 23:09:34 +00:00
rin
a3321772bf Check x > 0 *before*, not after, using (x - 1) as index of array. 2020-06-05 12:47:28 +00:00
roy
50e9876ff7 dhcpcd: kqueue(2) support removed in favour of pollts(2) 2020-06-04 13:09:45 +00:00