Commit Graph

12956 Commits

Author SHA1 Message Date
mrg 6274000239 avoid potential uninitialised variable use. 2021-04-13 05:58:45 +00:00
mrg f5c1005436 apply some -Wno- to ignore several new warnings with GCC 10.
ntp: ignore truncation beyond api sizes, and ignore wrongly
guessed underflow

tmux: ignore maybe uninitialised warning for impossible case

libbfd: signed/unsigned variables assigned in the same statement

dri/gallium: -Wno-builtin-declaration-mismatch for u_atomic.c as
it implements backend functions with different in-C-machine but
same-in-real-machine types

libXfont/libXfont2: signed/unsigned variables assigned in the same
statement

i915drm: ignore impossible maybe uninitialised warnings

sysinst: ignore an invalid string truncation issue
2021-04-13 04:58:59 +00:00
mrg 72ccf7c95b apply -fcommon to sources that still rely upon it. 2021-04-13 01:11:05 +00:00
nia 124e280e84 hdaudioctl.8: add missing arguments
pointed out by RVP
2021-04-12 12:22:10 +00:00
mrg 8d689c0cf0 avoid attempting to print NULL. 2021-04-12 09:30:32 +00:00
mrg b6529141f9 use strlcpy() to ensure desired nul termination.
trailing nul bytes are not needed here.
2021-04-12 09:29:53 +00:00
mrg dcf8481a48 fix a buffer size (off by one), and fix all the comments for the
3 other correctly sized buffers with the same comment/context.
2021-04-12 05:11:09 +00:00
mrg a2d1542565 add some new uses of existing GCC_NO_* variables for warning issues.
remove an no longer relevant for gcc7 workaround (works fine in both
gcc9 and gcc 10.)
2021-04-12 02:54:07 +00:00
simonb ba42c78d37 Add a -L option to follow all symbolic links. Useful if you have symlinks
in a makefs directory tree but want to refer to the actual file.
2021-04-03 14:10:56 +00:00
simonb 353a61bfae Deal with the case when a device gets recreated (eg when mtree is called by
MAKEDEV) and the stat buffer contains information about the original device
before checking/setting the owner/group/mode of the new device file.
2021-04-03 13:37:18 +00:00
christos eacf04d89a print function names as %s: not <%s> everywhere for consistency. 2021-03-23 18:16:53 +00:00
christos d4aba2dbef interface indexes are unsigned 2021-03-23 18:16:21 +00:00
christos 7b76707a70 call tzset() before chroot so we initialize our timezone data 2021-03-23 18:13:07 +00:00
christos b4e13c3078 fix misplaced paren, add missing va_end() 2021-03-23 18:06:19 +00:00
christos b3ffdf360d - remove extra \n from stderr logging
- add string message types
- sprinkle const
2021-03-22 18:41:11 +00:00
christos 5eb26e7317 Avoid memory leak on empty lines (https://reviews.freebsd.org/D29370) 2021-03-22 03:28:55 +00:00
cheusov 6e95ab06dc mtree: use POSIX type uint32_t instead of u_int32_t 2021-03-18 20:02:18 +00:00
christos d54a6e0c5d Add blocklist support to libwrap which enables all programs using libwrap
to block access from hosts we deny. (libwrap support from Greg A. Woods)
2021-03-07 15:09:12 +00:00
nat b4f84d307a Intoduce "-n" switch.
Running btat2dpd with "-n" especially for use with pad(4) will stop bta2dpd
from exiting upon a read error from pad(4) devices.

This is to compenstate for the behaviour in NetBSD current that pad(4) will
no longer output 0's when its corresponding audio(4) device is not active.

I believe that this new pad(4) behaviour is not present in -9 and -8.

While here I've improved its function as a daemon and it should reconnect to
bluetooth speakers when they are disconnected/reconnected.

Reported and tested by reinoud@ and maya@
2021-03-07 13:09:43 +00:00
christos f525b84e77 - Enable WARMSTART
- Pass fd to libwrap
- Add blocklist
From Greg A. Woods

- Tidy up debugging
2021-03-07 00:23:06 +00:00
rin 96f4ee7d70 Adjust manpage for amiga/boot ver 3.1.
Bump date.
2021-02-25 03:44:27 +00:00
joerg c88f61af16 Make use of packed member addreses non-fatal for clang, too 2021-02-23 15:05:08 +00:00
jmcneill 9f542e2491 Adjust description of compact list view output. 2021-02-22 11:38:13 +00:00
jmcneill 25801e14c4 In compact view, show the CPUs as a range (0-n) instead of a list
(0, 1, 2, ...) when the interrupt is assigned to all CPUs in the system.
2021-02-22 11:33:34 +00:00
wiz 0b10797fb6 Reword slightly. 2021-02-16 10:01:55 +00:00
hannken b1564e28a9 Add support for multiple exports files. This will be useful for example for
ZFS, where we have an automatically generated /etc/zfs/exports file, which
should not be edited directly.
2021-02-16 10:00:27 +00:00
hannken 3067a266c7 Split get_exportlist() into get_exportlist() and get_exportlist_one()
in preparation to support multiple input files.

No functional change intended.
2021-02-16 09:58:35 +00:00
martin 8d9b89d19f PR 55991: when extending the marked partition (typically: the NetBSD root
partition) round the new size up to current alignment.

This may lead to a slightly smaller than initialy planned last partition
(depending on order added) if the disk size is odd or the partitioning
scheme needs some internal space (like GPT) - but it avoids gaps elsewhere
due to alignement.

Ideally we would pin all other partitions in a first pass and then let
the partitioning backend pick the full available size for the extended
partition, but this should be good enough.
2021-02-13 15:31:35 +00:00
rin 4cb98d1efb Mention fdisk(8) and x86/mbr(8) in example for x86, for careless
people like me ;).

Bump date.
2021-02-06 12:18:45 +00:00
roy dae81dbd1d rtadvd: no longer need packed member warning 2021-02-03 06:50:07 +00:00
roy e94348982f traceroute: no longer need gcc packed member warning 2021-02-03 06:49:18 +00:00
roy 68cffc06d7 ldpd: Discard warning about accessing packed member
I don't see a good way of fixing this right now.
2021-02-03 06:46:27 +00:00
roy 14360cba7a traceroute6: Remove __packed 2021-02-03 06:42:50 +00:00
joerg faee973249 Ignore address of packed-member for clang too 2021-02-02 21:31:11 +00:00
rillig 6dccb7a0e9 sysinst: remove trailing whitespace from *.c *.h
In contrast to the messages files, this whitespace is not significant.
2021-01-31 22:45:46 +00:00
rillig 3d3e682f03 sysinst: fix some more typos in the German translation 2021-01-31 22:19:24 +00:00
rillig cc8233cb1e sysinst: restore the few intentional line breaks in German
Marking a forced line break with a trailing space is a terrible idea.
Most of the lines that previously had trailing whitespace did so
unintentionally, destroying the auto-layout.
2021-01-31 21:28:16 +00:00
rillig 105c093d2a sysinst: proofread German translation
It was a mixture of all possible styles, with several typos and
inconsistencies.
2021-01-31 21:00:43 +00:00
rillig 002fd351ad sysinst: warp factor.c to the 21st century
That file contained some conditionally defined code that still used
old-style function definitions.
2021-01-31 20:51:04 +00:00
rillig 014e728a52 sysinst: fix German translation, remove more trailing whitespace 2021-01-31 18:31:59 +00:00
rillig 2065669482 sysinst: remove trailing whitespace in German translation 2021-01-31 18:22:11 +00:00
jmcneill 2763548bcd Print the path that we failed to open on error 2021-01-30 11:46:25 +00:00
tsutsui cf9407e993 Fix "Cannot allocate memory" failure on amd64.
BIOCGBLEN ioctl of bpf(4) requires u_int, not size_t.
The problem is reported by Kenji Aoyama.

Should be pulled up to netbsd-9 and netbsd-8.
2021-01-30 11:34:28 +00:00
tkusumi ed5947a0ff fstyp: Fix exfat detection
taken-from FreeBSD ddf61156132b610915325769cbb93ea11be0d433
2021-01-24 14:37:32 +00:00
skrll 91ad7c9ee3 Consistently use ACPI_SIG_SSDT 2021-01-20 15:27:51 +00:00
jmcneill 89f30dcf4f trailing whitespace 2021-01-16 15:35:28 +00:00
jmcneill f13c261fb1 ID_AA64PFR0_EL1.GIC=0 means that the CPU interface system registers are
not implemented. This does not necessarily mean that there is no GIC in the
system, as GICv2 uses MMIO instead of system registers for the CPU
interface.

While here, add description for GIC=3, which means that the v4.1 system
register interface is supported.
2021-01-16 15:34:37 +00:00
martin 6903ba0384 Explicitly cast offset calculation, size_t may be smaller than off_t. 2021-01-10 13:44:57 +00:00
tkusumi f8ac354381 fstyp: Sync HAMMER1/2 with DragonFly BSD
taken-from: DragonFly BSD
2021-01-10 12:38:40 +00:00
wiz 93cc9aa740 Add magic incantation to configure an image for mount_udf(8). 2021-01-09 23:54:26 +00:00
ryo ea9fe086ae sync cpuids[] of sys/arch/aarch64/aarch64/cpu.c r1.43 2021-01-04 05:35:14 +00:00
taca 8202121906 Change second gc.interval_min to gc.interval_max.
Obviously, second gc.interval_min should be gc.interval_max.

Should be pulled up to netbnsd-9.
2020-12-17 05:33:06 +00:00
jmcneill 798fdf3f82 MAsk -> Mask, spotted by rillig@ 2020-12-14 10:18:28 +00:00
jmcneill 0eb6f089ee Add support for decoding Platform Communications Channel Tables ("PCCT"). 2020-12-12 16:08:39 +00:00
jmcneill 962d94c5c4 acpidump: Do not print FACS if HW_REDUCED flag is set.
According to ACPI 6.3 spec, FACS is optional when HW_REDUCED is set. ACPICA
ignores the FACS completely when HW_REDUCED is set, so we need to follow
suit since it is not available through /dev/acpi as the table is not
installed.
2020-12-06 18:38:58 +00:00
jmcneill 161b30af53 acpi: add character device for accessing ACPI tables
The /dev/acpi character device gives an aperture into physical memory
that allows only read access to known ACPI tables: RSDP, XSDT/RSDT, and
the root tables. Adapt acpidump(8) to use this interface by default,
falling back to the old /dev/mem method if it is not available or if
ACPIDUMP_USE_DEVMEM=1 is set in the environment. The user visible benefit
of this change is that "options INSECURE" is no longer required to
dump ACPI tables.
2020-12-06 02:57:29 +00:00
wiz 0fff63c9f6 comparision -> comparison 2020-12-02 14:20:19 +00:00
rin 530d774931 Explicitly link liblber and libssl when ldap support is enabled.
Fix sun2, i.e., MKPIC=no build.
2020-12-02 02:21:43 +00:00
bouyer cfd5acca1c Enable ldap support in racoon(8). Proposed on tech-userlevel,
"Go for it" from christos@
2020-12-01 10:10:57 +00:00
jmcneill 5bdad892bd Make sure the kernel set is selected, even if extracting parts of it
manually.
2020-11-28 13:05:58 +00:00
msaitoh 1e34099b98 - Print CPUID 0x8000008 %ebx on Intel, too. Intel now supports WBNOINVD.
- Print CPUID leaf 7 subleaf 1.
2020-11-24 00:48:39 +00:00
rin 2b36317ff7 Support aarch64eb; just works fine. 2020-11-17 10:47:17 +00:00
jmcneill 8ab169f5c2 Add "efi" as a supported boot image type and derive the platform ID for
the validation entry from the default boot image instead of hard-coding
X86.
2020-11-15 00:18:48 +00:00
wiz af09e09a6e New sentence, new line.
Other whitespace fixes, and some Xr fixes.
2020-11-14 20:07:13 +00:00
mlelstv cc6482f1d2 Add option -n to print only the value of a sensor.
If statistics are selected with -T, then also display max, min and average.
The empty line between each display is skipped when one or more sensors are
selected with -s.
2020-11-14 16:32:53 +00:00
mlelstv 48032c2032 Allow to select raw output for a single device or a list of sensors. 2020-11-14 12:36:49 +00:00
mlelstv 799a3dc99b For raw output (-x) allow to extract individual properties like drvctl -p.
E.g.

# envstat -x /vcmbox0/0/cur-value
328150000
2020-11-14 09:11:55 +00:00
martin fe44212f38 Disable all entropy checks for now untill consensus has been found how
to properly deal with it.
2020-11-13 17:39:06 +00:00
nia a42fc114cd Revert addition of pthread dependency on sqlite.
It is less trivial than expected and introduced some surprising breakage.
2020-11-12 17:53:43 +00:00
reinoud 551fa9b117 rock_ridge_move_count is only incremented and can never be negative so change
%08i to %08u.
This removes a warning when compiling with tools outside ./build.sh
2020-11-10 20:48:29 +00:00
gson d56a0f0357 Fix typos in comment 2020-11-10 09:14:01 +00:00
martin 312a1f515d Fix copy&pasto in previous 2020-11-09 10:19:41 +00:00
nia 70f54ff57b sqlite: do not build without multithreading support
at least a few pkgsrc packages avoid base sqlite because it fails
this check, and it's probably a surprising performance penalty for
unsuspecting users
2020-11-08 21:56:47 +00:00
dholland 5f378fab42 syslogd: in die(), don't call die() again recursively.
Particularly not for something as immaterial as close failing.

PR 55795
2020-11-08 01:12:46 +00:00
christos cab1687af0 make the buffer fit any 32 bit number. 2020-11-07 17:46:56 +00:00
christos 8cb1641ff6 PR/55794: Jan Schaumann: Eliminate unchecked malloc 2020-11-07 16:16:33 +00:00
martin 35097c7d0a Minimize the installer for crunched install media 2020-11-06 19:47:31 +00:00
martin 6948e0f3e4 Fix copy & pasted copyright comments. 2020-11-06 12:23:10 +00:00
christos a71fcfa7e4 Print the program name in error messages. 2020-11-05 19:13:21 +00:00
martin aeba785f6e Remove an unused message (accidently placed inconsistently in
previous)
2020-11-05 11:10:11 +00:00
martin 78ab2ae046 Avoid warnings 2020-11-04 16:26:35 +00:00
martin 043e812b52 Add (experimental) entropy input support:
Early during new installs or after upgrades we check if entropy is
available. If not (no hardware random number generator available)
we inform the user and ask them to fix it.
2020-11-04 14:29:40 +00:00
martin bfb6e5613b PR 55769: avoid the module set if we do not build any 2020-10-30 18:47:38 +00:00
abs c30a39f078 Fix tcpdump example from "‐i npflog0.pcap" to "‐i npflog0" 2020-10-30 09:23:36 +00:00
martin 827c798e7b Fix obvious copy&pasto 2020-10-29 08:50:42 +00:00
abs f6c2394005 Update mopd for 4k VAX page size and support 1k page a.out binaries
From dreamlayers
2020-10-27 17:16:24 +00:00
abs c185136d00 Fix Linux pfInit() parameter order for mopd
From dreamlayers
2020-10-27 17:07:14 +00:00
martin da165701f6 When we did not magically find any CD medium with sets, offer a manual
override (so ISO images on USB sticks or Xen's xbd(4) work).
2020-10-27 15:28:01 +00:00
martin a466822889 PR 55752: relax an assertion, the first getvfsstat() call may overestimate
the file systems visible to us.
2020-10-26 20:18:33 +00:00
martin 6c05a6401d Mark a variable only used in an assert as __diagused. 2020-10-25 08:50:32 +00:00
martin 04645caa29 When looking for available CD media, skip those that are already mounted.
When no medium with sets is found, show a new error message and return
to the source selection menu.
Rearrange all source option menus to have the proper set suffix
available (either .tgz or .tar.xz).
2020-10-24 16:13:15 +00:00
martin 57bc5d61da Do not force bootselector MBR code for installs with only a single named
partition.
2020-10-23 19:03:42 +00:00
martin ea4944af8e Do not force alignment of the first partition by default (which is
treated special to skip the first track), unless an existing partition
table hints at it.
2020-10-23 19:02:58 +00:00
martin 7714ed32ca Properly convert partition default sizes in MB to number of sectors 2020-10-14 15:09:10 +00:00
martin bb6bc013a3 Move MBR writing (if any) post disklabel writing, otherwise strange
interactions happen.
2020-10-14 14:37:59 +00:00
martin 7a17fd0552 Remove dead code 2020-10-14 13:20:27 +00:00
martin 0d9613fa7b Fix copy & pasto (missing "again" label) 2020-10-14 08:49:04 +00:00
martin 852192b2dd Fix copy & pasto noticed by Jason Mitchell: change the type of a GPT
partition via "gpt type" - not "gpt label".
2020-10-14 04:17:43 +00:00
martin cb429b904f PR 55142: on popular demand bring back expert options to adjust the
number of free inodes, block size and fragment size for FFS and LFS.
2020-10-13 17:26:28 +00:00
kamil b221147bfb Convert the CIRCLEQ (from sys/queue.h) usage to TAILQ
The CIRCLEQ API from sys/queue.h is deprecated since NetBSD 7 and is
already gone from FreeBSD and OpenBSD.
2020-10-13 13:56:34 +00:00
martin a207068d8b When renumbering partitions (after deletions) be slightly more lax
in matching, to cope with differences between MBR EFI partitions and
disklabel MSDOS partitions.
2020-10-13 11:28:32 +00:00
martin 29ef4ac716 Ooops, part of previous was not meant to be included yet 2020-10-13 10:44:25 +00:00
martin d03b267b69 Before forcing MBR partitions into our disklabel, make sure they are not
there yet - could happen in various paths when reusing existing partitions
(or parts of that) - previously we would blindly duplicate identical
partitions.
2020-10-13 10:43:23 +00:00
roy d3b0ce63f8 powerd: Stop crashing if entries are not found in the dictionary
If the first three are not found, log a diagnostic and do nothing.
If the latter two are not found, set them to NULL rather than garbage.
2020-10-12 16:54:43 +00:00
martin df588a63f3 Minor fix to previous: fix condition when we offer the partition type
switch - it makes sense even if the disk is partitioned but has no valid
partitions.
2020-10-12 16:27:23 +00:00
martin 957b5cd6f4 PR 55536: when we find existing partition tables and have alternative
formats available, offer to delete partitions and create new ones from
scratch (in some other or the same on-disk format).
2020-10-12 16:14:32 +00:00
martin f184b4ad4d Remove very strange code that special-cased MSDOS file systems and refused
to newfs the partition (despite explicit request to do so) if it was
mountable.
Accidently carried over from a dim and distant past, before we had
fsck_newfs.
2020-10-12 14:29:41 +00:00
martin a615c4ceeb Previously we abused pm->ptstart / pm->ptsize to pass the bounds of the
NetBSD outer partition to the inner partition editor - but now this is
not a valid assumption any more, so explicitly fix the bounds if an
outer partition exists.
2020-10-12 12:17:29 +00:00
martin a4ca382971 Fix editing start and size of not yet existing outer partitions. 2020-10-12 11:23:45 +00:00
martin 6ddad1490c Remove more pm->ptstart abuse - calculate values localy where needed
instead.
2020-10-10 19:42:19 +00:00
martin 6a8fd65bf3 Use an install target hint to mark a new partition active.
When compiled with BOOTSEL support, also name the new partition "NetBSD".
2020-10-10 18:49:27 +00:00
martin 951934d3a6 When creating new partitions for "full disk" use, pass a install target
hint to the partitioning backend (for the outer NetBSD partition).
2020-10-10 18:48:32 +00:00
jmcneill 29517913b7 Report half-precision FP and SIMD support 2020-10-10 08:27:41 +00:00
martin 8f65adda90 When MD code requests a reserved area (at the start of the disk)
make sure to properly account for the "lost" space during all calculations
and especially when expanding the main partition to fill the disk.

Avoid using the global "pm" or a passed device descriptons when we are
passing disk limits explicitly anyway.

Simplify/fix a few rounding calculations.
2020-10-09 18:33:00 +00:00
martin 325b99962d Add a heuristic to detect and properly mark EFI system partitions
when re-using pre-existing partitions.
2020-10-05 12:28:45 +00:00
roy 82328146fe ifwatchd: Enable SO_RERROR to re-sync interface state.
Interface arrival, departure and link state changes will sync
and if different will be actioned.

Currently we do not track addresses, so any changes there are still lost.
2020-10-04 20:36:32 +00:00
martin 905a0d3296 When merging existing partitions with desired target system layout
information, only force the "mount" flag if the existing partitions
has a valid mount point.
2020-10-04 19:05:47 +00:00
martin a2df346540 If we have no explicitly marke target root partition, make sure to set
the proper flag on the implicit one.
2020-10-04 16:09:12 +00:00
martin d9c7022040 PR 55384: detangle pm->ptstart from the "install" flag (selecting a
target partition). Instead introduce a new PTI_INSTALL_TARGET per partition
flag and deal with it in the partitioning backends.

Honour pm->ptstart when allocating new partitions - it is supposed to be
the first sector usable by NetBSD.
2020-10-03 18:54:18 +00:00
christos 1f8ba1a635 Filter out the VUSECOUNT_GATE bit 2020-10-03 14:01:16 +00:00
martin a23a20c65a Apply patch provided by Izumi Tsutsui in PR 55382: make ext2 partitions
show up in the outer (MBR) partition table, needed for example on Cobalt
where firmware boots from that partition.
2020-09-29 15:29:17 +00:00
martin 8e2247ea41 PR 55381: try to deal with moved (but not yet saved) partitions when
calculating free space
2020-09-29 14:29:56 +00:00
gson fe093d7595 When reporting an error before daemonizing, prefix the error message
with the program name.
2020-09-29 14:08:43 +00:00
msaitoh 57920690e6 s/occurence/occurrence/ 2020-09-29 02:58:51 +00:00
msaitoh 811d5a8b03 s/parition/partition/ 2020-09-29 02:49:55 +00:00
martin 6b2c269297 PR 55379: avoid creating bogus /etc/fstab lines for /dev/cd* if no
cdrom is available.
2020-09-28 18:51:34 +00:00
martin 07c7ef657d PR 55378: do not assume RAW_PART to be either 2 or 3 2020-09-28 18:40:23 +00:00
martin 7886d74d77 PR 55377: mark boot partitions in the partition size display, as suggested
by Izumi Tsutsui (minor modifications + all bugs by me)
2020-09-28 18:13:25 +00:00
roy e13af7a251 ifwatchd: remove SIOCGIFDATA and SIOCGIFMEDIA ioctls
getifaddrs(3) and route(4) provide all the data we need.
2020-09-27 19:55:21 +00:00
martin dd0cd7720b If there is no current partitioning manager assume we are editing the
current system and make target_already_root() return true.
Fixes various fallout when using sysinst post installation.
2020-09-27 17:51:48 +00:00
martin 2298856256 Fix display of timezone selection menu 2020-09-27 17:36:40 +00:00
jmcneill c9f4e317e7 Add HAVE_NVMM and use it to control the build of NVMM related components.
Defined to "yes" on amd64, "no" everywhere else.
2020-09-26 17:49:49 +00:00
tkusumi 00cd46e047 fstyp: Sync hammer2_disk.h with DragonFly BSD
taken-from: DragonFly BSD
2020-09-23 14:39:23 +00:00
roy cf9ee22cf9 ifwatchd: Check link state if no media is supported on initial ups.
We can check this via SIOCGIFDATA and ifi_link_state.
2020-09-23 02:32:04 +00:00
martin 194d5a77b0 Keep a list of all partition tables from which we have deleted partitions
and make sure we update those partition tables when writing partitions,
even if no install related partition remains on them.
2020-09-22 16:18:54 +00:00
martin d6ad885809 Typo in comment 2020-09-22 15:16:49 +00:00
martin d988559899 In the concrete partitions editor, after deleting the last partition move
the menu selection to the "add a partition" entry (instead of the sentinel
line which is not an active menu entry).
2020-09-22 12:21:11 +00:00
martin bed1a988f9 When adding a new partition in the concrete partition editor, make sure
to set a pointer to the partition table interface in the new entry.
Otherwise we may end up not writing back the partitions at all, leading
to further fallout later.
Receipe to reproduce the issue from Frederic Fauberteau, thanks!
2020-09-22 11:44:44 +00:00
snj fde9d6c257 alpha: GENERIC.MP is no more 2020-09-22 02:53:52 +00:00
christos 74f5524807 Revert previous, don't write to the parent too early because it can exit
before the child is ready to serve. The child will write in daemon2_detach()
when it is ready.
While here:
- return EXIT_{SUCCESS,FAILURE)
- check syscall error against -1
2020-09-17 12:48:12 +00:00
roy 2ead7eac29 arp: Permanence is from the llentry, not the route 2020-09-15 11:14:16 +00:00
roy 9613f51d0a ndp: Show U for Unreachable 2020-09-15 10:11:35 +00:00
roy b718bc3ed3 arp: Show U for Unreachable 2020-09-15 10:11:15 +00:00
jmcneill 0d54a9589a Add HAVE_ACPI and HAVE_UEFI flags to bsd.own.mk and use them to
conditionally include ACPI and UEFI bits instead of relying on adhoc
MACHINE_ARCH tests.
2020-09-12 15:25:41 +00:00
roy 222abc89f8 arp: Use SIOCGNBRINFO to display neighbor state information 2020-09-11 15:28:29 +00:00
jmcneill f2c0a93275 Build acpi tools and iasl on aarch64eb, and fix set lists for MKDEBUG. 2020-09-11 14:06:00 +00:00
christos 7286702501 change cksum prototype to const void *, and check alignment via assertion. 2020-09-07 18:37:21 +00:00
mrg 95c5ec5682 remove GCC_NO_ADDR_OF_PACKED_MEMBER now lfs_accessors.h works. 2020-09-07 03:19:04 +00:00
mrg c2082ece61 remove GCC_NO_ADDR_OF_PACKED_MEMBER for several subdir builds
that are now handled by lfs_accessors.h internally.
2020-09-07 03:09:53 +00:00
mrg cb93b81028 add support for new GCC 9 warnings that may be too much to fix
right now.  new address-of-packed-member and format-overflow
warnings have new GCC_NO_ADDR_OF_PACKED_MEMBER amd
GCC_NO_FORMAT_OVERFLOW variables to remove these warnings.

apply to a bunch of the tree.  mostly, these are real bugs that
should be fixed, but in many cases, only by removing the 'packed'
attribute from some structure that doesn't really need it.  (i
looked at many different ones, and while perhaps 60-80% were
already properly aligned, it wasn't clear to me that the uses
were always coming from sane data vs network alignment, so it
doesn't seem safe to remove packed without careful research for
each affect struct.)  clang already warned (and was not erroring)
for many of these cases, but gcc picked up dozens more.
2020-09-06 07:20:26 +00:00
maxv 60236c8c49 x86: fix several CPUID flags
- Rename: CPUID_PN      -> CPUID_PSN
           CPUID_CFLUSH  -> CPUID_CLFSH
           CPUID_SBF     -> CPUID_PBE
           CPUID_LZCNT   -> CPUID_ABM
           CPUID_P1GB    -> CPUID_PAGE1GB
           CPUID2_PCLMUL -> CPUID2_PCLMULQDQ
           CPUID2_CID    -> CPUID2_CNXTID
           CPUID2_xTPR   -> CPUID2_XTPR
           CPUID2_AES    -> CPUID2_AESNI
   To match the x86 specification and the other OSes.

 - Remove: CPUID_B10, CPUID_B20, CPUID_IA64. They do not exist.
2020-09-05 07:45:44 +00:00
maxv 4a2e4dc388 nvmm: update copyright headers 2020-09-05 07:22:25 +00:00
christos 5cba22b413 include bsd.init.mk to avoid:
make: Bad conditional expression ` != "no"' in  != "no"? -DINET6 :
2020-08-30 21:12:45 +00:00
tih 0e6edd4d77 Show the time of the latest handshake properly formatted. 2020-08-28 17:17:53 +00:00
christos 566d2c2d32 missing quote 2020-08-28 15:26:23 +00:00
christos 608106539e Restrict npf.conf fixes to "blacklistd" -> "blocklistd" 2020-08-28 15:25:16 +00:00
rjs aaf1e01132 Use wrapper name for call to setsockopt(2), NFC for non-rump builds. 2020-08-28 00:19:37 +00:00
riastradh b13ab56848 npftest: Wait at least one tick in each gc busy wait iteration.
Otherwise the busy wait loop runs a little too fast for the gc about
half the times I run the test.

XXX We should really arrange mstohz to round up!
2020-08-27 18:51:20 +00:00
riastradh fdedb3494c npf: Make sure to initialize portmap_lock only once.
PR kern/55586
2020-08-27 18:50:25 +00:00
riastradh 25154f5f0c Clarify wg(4)'s relation to WireGuard, pending further discussion.
Still planning to replace wgconfig(8) and wg-keygen(8) by one wg(8)
tool compatible with wireguard-tools; update wg(4) for the minor
changes from the 2018-06-30 spec to the 2020-06-01 spec; &c.  This just
clarifies the current state of affairs as it exists in the development
tree for now.

Mark the man page EXPERIMENTAL for extra clarity.
2020-08-26 16:03:40 +00:00
riastradh c0eeeb4aa7 wgconfig does not need libcrypt. 2020-08-26 15:49:07 +00:00
gson 57091f5040 Fix indentation 2020-08-26 13:35:12 +00:00
gson 460a8a88e0 Remove trailing whitespace 2020-08-26 13:33:42 +00:00
gson 69570b99d6 Remove superfluous empty line 2020-08-26 13:32:56 +00:00
martin e11752f35f Use %zu for size_t 2020-08-21 17:51:31 +00:00
uwe d7ff38016a Mark up a few missed equal signs as literal. 2020-08-21 03:44:58 +00:00
uwe 001a378b00 Markup fixes. 2020-08-21 03:13:30 +00:00
uwe 595cfacbca Fix synopsis. 2020-08-21 02:45:33 +00:00
riastradh 0a3195bdf5 Fix markup around optional command name.
Avoids emboldened brackets.  I remain fuzzy on how grouping in roff
works, or doesn't work.
2020-08-21 01:36:04 +00:00
riastradh 859a2fd925 Add missing description for wgconfig `set private-key' command. 2020-08-20 23:03:08 +00:00
riastradh c28ef62782 Mark up argument as such and write out wgconfig command correctly. 2020-08-20 23:01:20 +00:00
riastradh 89205cd245 Tweak markup so the square brackets don't become bold. 2020-08-20 22:58:06 +00:00
riastradh 3699389b49 Fix up wg-userspace(8) man page. 2020-08-20 22:17:16 +00:00
riastradh 0252686c58 Fill out WireGuard man pages. 2020-08-20 21:35:59 +00:00
riastradh a32c8cce00 Update wgconfig(8) for proplib API changes.
Also check type tags before conversion.
2020-08-20 21:34:51 +00:00
riastradh 2c3dfe7425 Make `wgconfig --help' and variations work. 2020-08-20 21:31:26 +00:00
riastradh 591b22f37f Descend into wg-userspace. 2020-08-20 21:30:46 +00:00
riastradh 61fd7d67f5 [ozaki-r] Add wg files 2020-08-20 21:28:00 +00:00
riastradh a14187eca5 [ozaki-r] Changes to the kernel core for wireguard 2020-08-20 21:21:31 +00:00
riastradh 25f11de3b9 mmap MAP_FAILED audit. 2020-08-20 15:54:11 +00:00
msaitoh cc67c5474a s/ be be / be / 2020-08-19 02:19:06 +00:00
christos 0c510515ef use opendisk()/dehumanize_number 2020-08-18 19:26:29 +00:00
mrg 4d62e2455a mostly complete basic port of crash(8) to mips.
tested on mipsel and mips64eb.  basic functionality works
on the running kernel, not yet tested on crash dumps.
2020-08-17 04:15:33 +00:00
tkusumi ae112b0a4f fstyp: Fix incorrect pfs_type test for HAMMER2 inode
taken-from: DragonFly BSD
2020-08-14 18:35:57 +00:00
martin 909a0d73c8 PR 55572: avoid crash when answering the mount point prompt for a previously
empty mount point with an emptry sting.
2020-08-14 08:46:54 +00:00
rin e45d30c746 Silence -Wstringop-truncation for ``name'' in disp_selected_part().
This variable is used only for display, and truncation seems harmless.
2020-08-10 06:54:45 +00:00
jmcneill 70370e75d4 evbmips: add ofctl(8) and /dev/openfirm support 2020-07-24 12:07:09 +00:00
simonb 3616bcfaa5 Sort missing IDs (users and groups) by the numeric ID. 2020-07-07 12:01:21 +00:00
riastradh 887193699a (cpuctl/aarch64) Add some more aa64isar0_eli1 flags. 2020-07-05 19:40:27 +00:00
sborrill ce6ed78858 When using show subcommand, display node ID (nid) in hexadecimal to match
the HD audio documentation. Diverge slightly by using 0xXX instead of XXh
format for consistency with the list subcommand.
2020-07-01 12:19:45 +00:00
ryo 1b74214774 show clidr_el1 and ctr_el0. 2020-07-01 08:03:10 +00:00
riastradh 65367154cd Nix trailing whitespace. 2020-06-29 23:04:56 +00:00
msaitoh 9007cd7213 s/successfuly/successfully/ in comment. No functional change. 2020-06-22 07:50:53 +00:00
rin d1e359b744 Fix do_blocklist:
- Respect destination directory specified by -d option.
- Accept check and fix options. For the former, do not modify anything as
  users normally expect.
2020-06-22 06:55:41 +00:00
thorpej 696896edc9 Add evbmips support for u-boot handling. 2020-06-21 17:17:01 +00:00
riastradh dd58a4a54e Nix trailing whitespace. 2020-06-20 18:30:53 +00:00
uwe 55f4124e32 Use ?:: modifier instead of .if to check for ipv6.
This way we don't have to include bsd.init.mk early.
2020-06-19 01:19:50 +00:00
kamil aa97815be0 Include explicitly <rump/rump_syscallshotgun.h> for previous indirect users
via <rump/rump.h>.
2020-06-17 00:16:21 +00:00
wiz 20648b583d Use more markup. Bump date for previous. 2020-06-16 14:26:39 +00:00
sborrill 0a7bddaaad Describe correctly how whitespace is formatted as the docs did not
match the source.
2020-06-16 13:34:38 +00:00
christos e9d9ed6853 handle /etc/blacklistd.conf 2020-06-15 21:56:49 +00:00
christos 8751c455bb correct blocklist script
- removal of rc file is handled by obsolete
- use grep to find if we need more changes
- fix rc population
2020-06-15 21:51:13 +00:00
riastradh 6c262685f8 Nix trailing whitespace. 2020-06-15 20:27:30 +00:00
christos 8f201cf281 fix reversed mv, pointed out by wiz@ 2020-06-15 14:32:07 +00:00
christos 5b4fdaddb2 deal with blacklist -> blocklist 2020-06-15 14:25:40 +00:00
sborrill 39dc86037f Add show subcommand that displays the codec configuration in
human-readable tabulated form
2020-06-15 13:06:39 +00:00
tsutsui 66219e6fed Explicitly print a fs image filename on "fs image is too big" errors.
This will help future analysis of build errors caused by bloated
embedded ramdisk images and possible but unexpected other binaries.

Proposed on port-mips@ in discusson about ews4800mips daily build errors:
 https://mail-index.netbsd.org/port-mips/2020/06/14/msg000950.html
and "Yes please!" from martin@.
2020-06-14 18:24:21 +00:00
uwe 44ebef0f33 Support optional square brackets around the host name.
The brackets are required when using numeric IPv6 addresses as they
contain colons as part of their syntax.  We do not enforce that the
thing in the brackets is a numeric IPv6 address - this matches scp
syntax and behavior.
2020-06-14 00:30:20 +00:00
uwe 943a91a810 Remove -46 from the -c usage. While here, sync usage with man page
(s/devfile/device).
2020-06-13 21:23:27 +00:00
wiz e38e8568c9 Add -46 to usage. 2020-06-13 16:56:46 +00:00
uwe b37b5fea79 Support IPv6.
Use getaddrinfo(3).  Add -4 and -6 command line options.  Obey USE_INET6.
2020-06-13 13:45:06 +00:00
roy 73dd2b525a ndp: Sync usage and SYNPOSIS with reality 2020-06-12 21:08:02 +00:00
roy b05648aa26 Remove in-kernel handling of Router Advertisements
This is much better handled by a user-land tool.
Proposed on tech-net here:
https://mail-index.netbsd.org/tech-net/2020/04/22/msg007766.html

Note that the ioctl SIOCGIFINFO_IN6 no longer sets flags. That now
needs to be done using the pre-existing SIOCSIFINFO_FLAGS ioctl.

Compat is fully provided where it makes sense, but trying to turn on
RA handling will obviously throw an error as it no longer exists.

Note that if you use IPv6 temporary addresses, this now needs to be
turned on in dhcpcd.conf(5) rather than in sysctl.conf(5).
2020-06-12 11:04:44 +00:00
tsutsui 089d36aae0 MBR type for Ext2 should be MBR_PTYPE_LNXEXT2, not MBR_PTYPE_FAT12. 2020-06-10 16:56:22 +00:00
tsutsui 08529c6341 Change mountpoint of boot ext2fs from /stand to /ext2 to avoid conflict.
Should be pulled up to netbsd-9, with fixes of PR/55060.
2020-06-10 16:26:33 +00:00
thorpej abcb66ec85 Update for proplib(3) API changes. 2020-06-07 05:54:00 +00:00
thorpej bba3c68329 Update for proplib(3) API changes. 2020-06-07 00:51:48 +00:00
thorpej bcd1eb151d Update for proplib(3) API changes. 2020-06-07 00:12:00 +00:00
thorpej aebbed3d12 Update for proplib(3) API changes. 2020-06-06 22:33:23 +00:00
wiz 55eb855c31 Use more markup. 2020-06-06 20:38:00 +00:00
wiz c65439fe2c Reduce macro arguments. 2020-06-06 20:30:23 +00:00
tsutsui c332e97e6f Fix ews4800mips example. Its raw partition is rsd0p, not rsd0c. 2020-06-06 10:22:45 +00:00
roy caa3531473 Ensure the dhcpcd log socket is removed. 2020-06-03 11:47:46 +00:00
kamil 16b0614b43 Register ppoll 2020-06-02 15:43:26 +00:00
uwe e03c12d8dc Fix extra whitespace added by accident. 2020-06-01 13:30:52 +00:00
msaitoh 774fa17d8b Add 0xa5 and 0xa6 for Comet Lake. 2020-06-01 08:33:40 +00:00
tnn e097843b4c npf-params.7: s/filer/filter/ 2020-05-31 16:32:07 +00:00
rmind a55d34090b npf-params(7): fix the state.key defaults. 2020-05-31 15:57:15 +00:00
roy 2fc8fc72fa postinstall: Move files out of dhcpcd chroot 2020-05-31 13:45:47 +00:00
nat b35a6d5b1b Avoid running of the end of the array if a file cannot be opened.
Found by plunky@.
2020-05-31 06:17:23 +00:00
rmind 231831948d npftest -- npf_test_init(): add a workaround for NetBSD. 2020-05-30 21:00:31 +00:00
rmind b899bfd96f Major NPF improvements (merge from upstream):
- Switch to the C11-style atomic primitives using atomic_loadstore(9).

- npfkern: introduce the 'state.key.interface' and 'state.key.direction'
  settings.  Users can now choose whether the connection state should be
  strictly per-interface or global at the configuration level.  Keep NAT
  logic to be always per-interface, though.

- npfkern: rewrite the G/C worker logic and make it self-tuning.

- npfkern and libnpf: multiple bug fixes; add param exporting; introduce
  more parameters.  Remove npf_nvlist_{copyin,copyout}() functions and
  refactor npfctl_load_nvlist() with others; add npfctl_run_op() to have
  a single entry point for operations.  Introduce npf_flow_t and clean up
  some code.

- npfctl: lots of fixes for the 'npfctl show' logic; make 'npfctl list'
  more informative; misc usability improvements and more user-friendly
  error messages.

- Amend and improve the manual pages.
2020-05-30 14:16:56 +00:00
uwe 3cee218d31 Initialize puffs9p::server (though it's not used anywhere). 2020-05-30 02:53:30 +00:00
uwe 2da8d56162 Provide list of options for ease of reference. 2020-05-30 00:00:35 +00:00
uwe 22cb1031f1 Fix vio9p device name in a comment. 2020-05-29 23:49:08 +00:00
jmcneill c34f2808e8 DTB are no longer part of kernel set 2020-05-29 10:25:06 +00:00
jmcneill 03c974c07b Set HAVE_INSTALL_IMAGE for evbarm 2020-05-28 19:03:09 +00:00
jmcneill ec07eed79a Remove "If you booted from a floppy" message 2020-05-28 19:00:52 +00:00
uwe 63a7cdaa84 Do not send dummy Tauth, it's completely unnecessary.
The best way to not use authentication is to not use authentication.
Cf. http://man.cat-v.org/plan_9/5/attach
2020-05-28 14:00:05 +00:00
uwe 3e763228f4 puffs9p_node_rename - 9P rename is done with Twstat and can only
change the last pathname component.  Return EXDEV for attempts to move
a file to a different directory to make mv(1) fall back to copying.
2020-05-27 03:25:13 +00:00
uwe 8deaf9c1c0 noderemove - do not call puffs_setback here. noderemove is called
from rename (for existing target) and calling setback is not
appropriate in that context.  Do that call instead directly in the
callers (remove, rmdir).

From Nicola Girardi, part of PR/54829.
2020-05-27 00:36:07 +00:00
uwe b2db326b70 puffs9p_node_rename - noderename takes puffs_node, not p9pnode, but
this goes undetected b/c pn_data we pass is a pointer to void.

From Nicola Girardi, part of PR/54829.
2020-05-27 00:05:22 +00:00
uwe c92f8ba0f7 Use the typedef to declare tag in AUTOVAR. Do not allocate 9P tags in
advance in AUTOVAR, do it right before we need them.  Do no reuse tags.
If we are going to use sequential tags, we might as well try to make
them really sequential.
2020-05-26 22:54:43 +00:00
uwe 41b86583fb Do not allocate 9P tags in advance, do it right before we need them.
If we are going to use sequential tags, we might as well try to make
them really sequential.
2020-05-26 22:33:04 +00:00
uwe 2c2f0a9518 puffs9p_node_lookup - use the right type for tfid. 2020-05-26 22:08:11 +00:00
uwe 80d3119c60 proto_getstat - g/c debug printfs. 2020-05-26 19:41:36 +00:00
uwe 795a40f9c2 getdfwithoffset - do not issue dummy read to seek to offset zero on a
newly opened fid as it's already there.  This is redundant and also
seems to confuse inferno when issued against the root directory.  Now
you can ls the mount point of

    styxlisten -A 'tcp!*!styx' export /

While here fix the seek logic to actually repeatedly seek forward
instead of always doing it from zero.
2020-05-26 19:38:14 +00:00
snj 5ce7b84928 it's "its" 2020-05-26 15:20:45 +00:00
rmind 3f8b631875 PR/55288: npfctl: change parameter syntax to be more permissive. 2020-05-24 15:35:39 +00:00
rmind 07861232b4 Backport selected NPF fixes from the upstream (to be pulled up):
- npf_conndb_lookup: protect the connection lookup with pserialize(9),
  instead of incorrectly assuming that the handler always runs at IPL_SOFNET.
  Should fix crashes reported on high load (PR/55182).

- npf_config_destroy: handle partially initialized config; fixes crashes
  with some invalid configurations.

- NAT policy creation / destruction: set the initial reference and do not
  wait for reference draining on destruction; destroy the policy on the
  last reference drop instead.  Fixes a lockup with the dynamic NAT rules.

- npf_nat_{export,import}: fix a regression since dynamic NAT rules.

- npfctl: fix a regression and restore the default group behaviour.

- Add npf_cache_tcp() and validate the TCP data offset (from maxv@).
2020-05-23 19:56:00 +00:00