Commit Graph

12035 Commits

Author SHA1 Message Date
mrg 01d0929d7e - convert 'done' to an unsigned, since it is used as one. 2019-02-04 04:56:35 +00:00
mlelstv fb95d55af4 Fix handling of pushback operation which isn't using negative lengths
for about 10 years.

Found by gcc7.
2019-02-04 01:07:34 +00:00
mrg 93dc402740 - mark logerr(), quit() and done() as __dead. 2019-02-03 12:13:37 +00:00
mrg 607f1423e0 - mark log_err() and log_errx() as __dead. 2019-02-03 12:03:22 +00:00
mrg b6d6f9f529 - don't compare pointer with \0. in this case, *pointer is wanted,
not \0 -> NULL, as we just tested pointer, and this is wanting to
  be the standard "is this string NULL or nul?" idiom.
2019-02-03 12:02:22 +00:00
mrg 37649e4074 - enlarge buffer to avoid snprintf() truncation 2019-02-03 10:48:46 +00:00
mrg fbffadb9f8 - add or adjust /* FALLTHROUGH */ where appropriate
- add __unreachable() after functions that can return but won't in
  this case, and thus can't be marked __dead easily
2019-02-03 03:19:25 +00:00
mrg 8dec05958d don't check the return value of execvp() for failure to call err().
assume if it returns at all something has failed.
2019-02-01 09:06:07 +00:00
mrg 684b182f81 compare pointers with NULL not '\0'. 2019-02-01 08:29:03 +00:00
msaitoh 900e7dd5ab Stop continuing /var/shm check when var_shm_symlink is in /etc/rc.conf.
OK'd by martin.
2019-01-31 10:06:32 +00:00
kre 4b0905d49c Fix merge botch. 2019-01-27 05:12:30 +00:00
oster b402551324 Remove extra #ifdef and duplicated set of #ifdef's. 2019-01-27 04:15:11 +00:00
pgoyette d91f98a871 Merge the [pgoyette-compat] branch 2019-01-27 02:08:33 +00:00
christos a964285a66 - fix wrong size allocation that triggers buffer overflow
- remove unneeded casts and assertions
XXX: pullup-8
2019-01-23 20:46:18 +00:00
skrll 907cdcbbc0 Fix mvfr0.fptrap = 0 description 2019-01-23 07:41:54 +00:00
rmind 3d9a792dd8 Major NPF improvements:
- Convert NPF connection table to thmap.  State lookup is now lock-free.
- Improve connection state G/C: it is now incremental and tunable.
- Add support for dynamic NAT address.  Translation addresses can now be
  selected from a pool of addresses.  There are two selection algorithms,
  "ip-hash" and "round-robin" (see the man page).
- Translation address can be specified as e.g. ifaddrs(wm0) in npf.conf
  to dynamically choose an IP from the interface address(es).
- Add support for the NETMAP algorithm with static NAT for net-to-net
  translation (it is equivalent to iptables NETMAP logic).
- Convert 'ipset' tables to use thmap; the table lookup is now lock-free.
- Misc improvements, bug fixes and more unit tests.
- Bump NPF_VERSION (will also bump libnpf).
2019-01-19 21:19:31 +00:00
wiz 845dfb2f5e Add missing width argument to Bl. Remove Pp before It. 2019-01-17 08:53:17 +00:00
gutteridge e5663ad9a9 btpand(8): replace dhclient(8) references with dhcpcd(8)
Addresses part of PR misc/53669.
2019-01-17 05:52:21 +00:00
martin 019c421601 PR 53869: improve polish "noroot" message 2019-01-15 12:55:03 +00:00
christos 0779cbe997 adjust to new expandm. 2019-01-12 19:09:25 +00:00
christos ea179cc7cf use expandm from libwrap. 2019-01-11 20:41:53 +00:00
martin fd42ea8ecb Some translation fixes/additions from Kamil 2019-01-11 08:14:50 +00:00
martin fffc348d77 PR install/53857: make the pkgsrc menu wider, so the first column fits
in various translations. While there shorten some (misleading) text.
2019-01-10 19:00:17 +00:00
uwe 61417cee53 Actually, according to the grammar the square brackets in the "tcp
flags" are not literal, so use .Op to show that /mask is optional.
2019-01-08 11:36:10 +00:00
uwe 94cd499daa Restore macro with effect. Fix the real problem that prevented it to
have the effect.
2019-01-08 11:28:01 +00:00
wiz 65808c7ffa New sentence, new line. Punctuation fixes. Remove macros without effect. 2019-01-08 10:25:26 +00:00
gutteridge 77213afac9 veriexecgen(8): improve example for appending /etc to the signatures
database. From Edgar Pettijohn in PR misc/53839.
2019-01-08 01:31:49 +00:00
gutteridge a7a743c1a4 npf.conf(5): add a minor clarification about table types that can't
accept masks on IP addresses. Prompted by Rob Hunter in PR bin/51900.
2019-01-08 01:19:16 +00:00
scole 160c07be3d Add GENERIC.MP and GENERIC_601 kernels to sysinst menu 2019-01-07 18:08:28 +00:00
maxv 3426341fca Handle the NVMM signature. 2019-01-06 16:13:51 +00:00
christos 5794a3e6bf check strdup results too
include the function name in out of memory messages
2019-01-03 19:26:50 +00:00
christos 05d4f66d89 Handle memory allocations and error exit codes consistently. 2019-01-03 19:04:21 +00:00
martin 749e26cd22 PR install/53819: fix polish translation of menu exit string 2018-12-30 16:52:26 +00:00
martin 28b7eee0ce PR install/53820: fix column headers in polish translation 2018-12-30 16:48:58 +00:00
msaitoh 9836c9649c Fix acpi_print_string(). Treat NUL termination correctly to not to print
NUL character. For example, this change prints an OEMID "41 4d 44 00 41 4d"
with "AMD". Tested by Patrick Welche.
2018-12-30 05:05:21 +00:00
wiz c7650dafca New sentence, new line. 2018-12-29 18:34:59 +00:00
gutteridge d4c80a9282 Add caveats section to the screenblank(1) man page to note issues will
arise if /dev is on a file system mounted with noatime or nodevmtime.
2018-12-28 23:53:35 +00:00
ryo 7596da58e1 - show detail of debug feature register (ID_AA64DFR0_EL1)
- print raw value of registers when verbose flag is set.
- keep forward compatibility. read kernel's aarch64_sysctl_cpu_id, but avoid unknown system registers.
2018-12-20 07:10:23 +00:00
uwe 5b09983a47 Fix line continuations in previous. 2018-12-17 01:16:49 +00:00
martin abef26c33c Editor mishap in previous, pointed out by leot 2018-12-16 11:40:09 +00:00
martin 009ce0057d Separate binary sets and binary pkg prefix from the machine, and set
it explicitly for evbarm*, evbmips* and evbsh3 so we get the correct
64bit pkgs on aarch64 and also have working defaults on the other
variants.
2018-12-16 11:36:08 +00:00
roy b4a54cc1e6 ndp: SIOCSPFXFLUSH_IN6 and SIOCSRTRFLUSH_IN6 expect struct in6_ifreq
And not just a character string of the interface name.
This only worked before because the interface name is the first member
of the structure.
2018-12-16 08:47:43 +00:00
martin 6275343145 Avoid undefined behaviour, pointed out by maxv 2018-12-13 12:28:25 +00:00
wiz 40e56fc8f4 Use \(en. 2018-12-13 07:34:03 +00:00
dholland f71c1f4842 Fix naming inconsistency; PR 53769 from silas. 2018-12-13 03:18:18 +00:00
maxv 7bc6869364 Retire the LMC driver, and its associated lmcconfig tool. LMC has been
mentioned repeatedly as a non-MP-safe driver that is hard to maintain,
and no one is taking care of it.

LMC was removed from OpenBSD three years ago, and from FreeBSD a few
months ago.
2018-12-12 07:04:05 +00:00
plunky 6de10e4ba8 rc.d/isdnd is obsolete 2018-12-04 16:53:44 +00:00
maxv e5fadd7f81 Introduce KLEAK, a new feature that can detect kernel information leaks.
It works by tainting memory sources with marker values, letting the data
travel through the kernel, and scanning the kernel<->user frontier for
these marker values. Combined with compiler instrumentation and rotation
of the markers, it is able to yield relevant results with little effort.

We taint the pools and the stack, and scan copyout/copyoutstr. KLEAK is
supported on amd64 only for now, but it is not complicated to add more
architectures (just a matter of having the address of .text, and a stack
unwinder).

A userland tool is provided, that allows to execute a command in rounds
and monitor the leaks generated all the while.

KLEAK already detected directly 12 kernel info leaks, and prompted changes
that in total fixed 25+ leaks.

Based on an idea developed jointly with Thomas Barabosch (of Fraunhofer
FKIE).
2018-12-02 21:00:13 +00:00
msaitoh c0f969c5d5 Decode IO Remapping Table. 2018-12-02 10:51:07 +00:00
kre fbb3329fd3 Divide GIG by 512 (DEV_BLKSIZE) so we don't overflow 32 bit u_long
when multiplying by 128 (in 32 bits, 128 * GIG == 0)

Should fix i386 build )and other 32 bit ports).

An alternative would be to use ULL rather than UL for the numbers,
but that would mean needlessly doing 64 bit arith for data that is
resticted to 32 bit results anyway.
2018-11-28 00:44:08 +00:00
martin 72cf5c53dc Cosmetics: consistently use MEG and GIG defines for size calculations 2018-11-27 17:13:41 +00:00
knakahara 4ed6c77e42 tprof: Add goldmont plus support. Tested by msaitoh@n.o, thanks. 2018-11-26 23:20:56 +00:00
ryo 8a4107013c Add ThunderX IDs 2018-11-26 18:08:41 +00:00
knakahara 4fd01caa16 tprof: Add goldmont support.
I tested on Atom C3558 (Denverton).
2018-11-26 07:45:47 +00:00
msaitoh 942ff4944d Print Intel CPUID Architectural Performance Monitoring leaf Fn0000000a. 2018-11-26 04:45:13 +00:00
msaitoh ee702c097f Decode Intel/AMD MONITOR/MWAIT leaf. 2018-11-22 06:15:06 +00:00
martin 87f081f95f A few hints that sets may come in .tar.xz format (instead of .tgz) 2018-11-21 20:18:11 +00:00
martin 444da8f01d Sprinkle a few references to .tar.xz files (as alternative to .tgz files) 2018-11-21 20:13:09 +00:00
msaitoh 7c1e0af10e Decode package, core and SMT id if CPUID 0x0b is available on Intel processor.
If the value is different from the kernel value, we should fix the kernel code.

TODO: Use 0x1f if it's available.
2018-11-21 12:19:51 +00:00
msaitoh b430389aea - AMD also reports CPUID 7's highest subleaf. Print it.
- Use macro.
2018-11-21 10:34:53 +00:00
msaitoh ee8540f68c - Use ci_feat_val[7] as CPUID 7 %edx to match x86/cpu.h
- AMD also has CPUID 6.
- Remove unused code for coretemp.
- Consistently use descs[] instead of data[].
2018-11-21 06:10:25 +00:00
martin 39e506156f Convert all static menu struct initializiations to C99 name initializer
format - prerequisite for an upcoming evil hack (tm).
No functional change intended.
2018-11-20 19:02:07 +00:00
maxv 71256c3b0d Note support for Intel Silvermont/Airmont. 2018-11-20 06:43:26 +00:00
mrg 0e9d255287 rewrite the CPU identification on arm64:
- publish per-cpu data
- publish a whole bunch of info in struct aarch64_sysctl_cpu_id
  instead of various individual nodes (there are 16 total.)
- add MIDR extractor bits
- define ARMv8.2-A id_aa64mmfr2_el1 and id_aa64zfr0_el1 regs,
  but avoid using them until we make sure they exist.  (these
  members are added to aarch64_sysctl_cpu_id to avoid future
  compat issues.)

the arm32 and aarch32 version of these need to be adjusted as
well (and aarch32 data published at all.)  still trying to
work out how to make the same userland binary running on a
real arm32 or an aarch32 system can work sanely here.

ok ryo@.
2018-11-20 01:59:51 +00:00
martin b978e7a9c1 Split positional argument string expansion from msg display, we can make
good use of it elsewhere too.
2018-11-19 17:17:43 +00:00
sevan 05de7c48c1 Adjust test, we only want to return the structure member if the result is not NULL.
Heads up by Sascha Wildner @ DragonFly BSD.
2018-11-18 23:03:36 +00:00
martin 379f075dc1 Yet another size estimate 2018-11-18 10:37:04 +00:00
martin de7834a35d More size estimate fixes 2018-11-18 10:34:45 +00:00
martin b70953c52d Add default for debug sets size 2018-11-17 19:22:48 +00:00
martin a67ab68028 Now that size estimates are not way off anymore, only double the size
for the minimal suggested partition.
2018-11-16 19:55:18 +00:00
martin 7a2eea57bf Sync install size estimates with current reality 2018-11-16 19:54:03 +00:00
ozaki-r 4dae353ba2 rtadvd: use %u to print unsigned variables 2018-11-16 08:57:10 +00:00
martin 352a555edc Make use of the new positional parameters to better describe the first
partitioning step. Remove size limits/hints encoded in the translations
and replace them by values from the code.
2018-11-15 10:34:21 +00:00
martin ac730b5183 Add a new helper function to show messages with positional parameters 2018-11-15 10:23:32 +00:00
knakahara a8700cbec5 tprof: Add silvermont, airmont support.
I tested on Atom C2758 (Rangeley).
2018-11-15 07:20:31 +00:00
wiz a1961053ec Sort sections. New sentence, new line. 2018-11-14 18:28:18 +00:00
martin c4cf3d8d86 Slightly enhance previous: create two utility functions checking for
partitionability and boot code requirements, use a generic match helper
function for both and fully check the device name.
2018-11-14 02:30:00 +00:00
bouyer a5c25858d1 Skip mbr for xbd and raid devices, as it was before Nov. 5 commits.
anita xen installs should work again.
2018-11-13 17:22:04 +00:00
christos 782f459947 FILES section from Dan Plassche 2018-11-12 00:50:54 +00:00
martin 57cf8237b6 Skip floopies when selecting an install target, but do not add them to
the CD list when selecting an installation source device.
2018-11-11 10:06:09 +00:00
martin 8b5066c45d Do not allow installation onto floppy disk - can be overriden by
architectures where it would make sense (none currently), and also
works around a bug in QEMU for sparc that kills our -current anita tests.
2018-11-11 09:17:10 +00:00
maya 0b54191a1c & promotes to int already, so clang warns about the hh modifier.
(and we use -Werror)

ok xtos
2018-11-11 00:24:01 +00:00
abs 5b096803d3 Install the sample slip.login to share/examples/slip/slip.login 2018-11-09 21:33:50 +00:00
martin 5864e121ba Fix test for active root partition when booting from a wedge 2018-11-09 15:20:36 +00:00
martin 1c2e5b02c0 Adapt other cd-device query functions to new world order, fix
default cd device (assume 'a' partition).
2018-11-08 20:29:37 +00:00
martin a48ed55e5c Untangle disk enumeration a bit more. 2018-11-08 11:56:56 +00:00
martin 4bb5c5376d Simplify CD device name matching by using fnmatch(3), suggested
by Christoph Badura.
2018-11-08 11:15:58 +00:00
martin e80b64debe Fix CD_NAMES against concrete instances comparision - if CD_NAMES
entries have a wildcard, strip device instance number off from both
comparands.
2018-11-07 21:59:30 +00:00
martin 3b44a3d7f6 Unify handling of CDROM device names.
Skip CDs when looking for install targets (we do not support installing
onto a blueray with UDF).

Fix search for the default CDROM device and the CD we booted from
for ports with nonstandard CDROM device names.
2018-11-07 21:20:23 +00:00
plunky 7c0fdce822 add rc.d/dhcpd6 2018-11-06 06:16:00 +00:00
martin 7a39103985 Get rid of hard coded disk names and use sysctl hw.disknames
instead.
2018-11-05 19:45:56 +00:00
martin b57ba1ec69 For "unknown" sets (should only happen for pkgsrc.tgz), always use
.tgz suffix.
2018-11-05 17:04:03 +00:00
martin f4ed83519c Revert previous - local merge mishap 2018-11-05 10:27:06 +00:00
wiz 4736bd2c39 Sort options. 2018-11-05 09:22:30 +00:00
martin 4a0babdb00 Make it compilable with gcc 2018-11-05 08:34:20 +00:00
msaitoh 755dd63262 Decode Boot Graghics Resource Table (BGRT). 2018-11-05 07:39:57 +00:00
roy 9adaa956c5 syslogd: allow the reporting of buffer overflows to be disabled.
This generally isn't a good thing, nothing should be discard silently.
However, for systems that don't want big syslogd buffers or are too slow
to log effectively this reporting can now be disabled.
2018-11-04 20:45:21 +00:00
roy 0402a70e1e syslogd: allow the receiving buffer size to be set.
This allows the admin to try and avoid buffer overflow when a log of
logging appears in bursts.
2018-11-04 20:23:08 +00:00
martin eb0dcb1bc7 Remove "usage" translations - they never could be displayed as we only select
the language later.
Extend usage display a bit and sync with reality.
2018-11-03 18:30:00 +00:00
martin 13376b1dc9 Make the debug version compilable with modern gcc.
Do debugging for system(3) calls only when DEBUG_SYSTEM is defined.
2018-11-02 18:07:33 +00:00