Commit Graph

11997 Commits

Author SHA1 Message Date
jmcneill
0b7c38e1ef Add ARMv8 support. 2018-07-15 16:25:31 +00:00
jmcneill
de53e8aea9 Fix a crash when running tprof with no arguments; check argc before accessing argv[0] 2018-07-14 16:34:15 +00:00
jmcneill
4ab6de2316 Mark tprof_event_init, tprof_event_list, tprof_event_lookup as dead 2018-07-14 15:38:59 +00:00
maxv
8addf8a6b5 specialreg.h is x86-specific, don't include it 2018-07-14 07:54:37 +00:00
maxv
9896bc73ca Finish the Skylake/Kabylake table, and improve the output of "tprof analyze". 2018-07-14 07:54:04 +00:00
joerg
e290a3e9b8 Mark tprof_monitor as dead 2018-07-13 19:54:53 +00:00
maxv
c52e6df86c Ask for a file path with the "analyze" command, instead of reading stdin. 2018-07-13 12:04:50 +00:00
maxv
5ae6235d0e Remove tpfmt(1). Its code was merged into tprof(8). 2018-07-13 11:14:14 +00:00
maxv
96b21aedb9 Merge tpfmt(1) into tprof(8). We want to have access to everything with
only one tool. The code is copied mostly as-is, and the functionality is
available via the "analyze" command.

Eg:
	tprof monitor -e llc-misses:k -o myfile.out sleep 20
	tprof analyze < myfile.out

Will move soon, I don't like the reading via stdin.
2018-07-13 11:03:36 +00:00
maxv
48aa814610 Skylake/Kabylake are family 6, so add a check for that. While here improve
the layout of "tprof list".
2018-07-13 09:53:42 +00:00
maxv
ab933b7bbb Change the arguments of the tprof tool, to match the behavior of pmc(1) and
cpuctl(8). They become:

	tprof list
	tprof monitor -e name:option [-o outfile] command
2018-07-13 09:04:31 +00:00
maxv
8dd2f31aad Inline the values in amd_f10h_names[], we're not going to use defines for
each CPU model found in the wild.
2018-07-13 08:09:21 +00:00
maxv
a087cb3c40 Revamp tprof.
Rewrite the Intel backend to use the generic PMC interface, which is
available on all Intel CPUs. Synchronize the AMD backend with the new
interface.

The kernel identifies the PMC interface, and gives its id to userland.
Userland then queries the events itself (via cpuid etc). These events
depend on the PMC interface.

The tprof utility is rewritten to allow the user to choose which event
to count (which was not possible until now, the event was hardcoded in
the backend). The command line format is based on usr.bin/pmc, eg:

	tprof -e llc-misses:k -o output sleep 20

The man page is updated too, but the arguments will likely change soon
anyway so it doesn't matter a lot.

The tprof utility has three tables:

	Intel Architectural Version 1
	Intel Skylake/Kabylake
	AMD Family 10h

A CPU can support a combination of tables. For example Kabylake has
Intel-Architectural-Version-1 and its own Intel-Kabylake table.

For now the Intel Skylake/Kabylake table contains only one event, just
to demonstrate that the combination of tables works. Tested on an
Intel Core i5 Kabylake.

The code for AMD Family 10h is taken from the code I had written for
usr.bin/pmc. I haven't tested it yet, but it's the same as pmc(1), so
I guess it works as-is.

The whole thing is written in such a way that (I think) it is not
complicated to add more CPU models, and more architectures (other than
x86).
2018-07-13 07:56:29 +00:00
nonaka
72a00d12fb Use s6, not mysin. 2018-07-12 08:20:49 +00:00
nonaka
727d6d241c ndp(8): host_buf should not be used in delete().
host_buf is passed to the argument host of delete() in do_foreach().
2018-07-12 08:16:14 +00:00
nonaka
818060011e Remove duplicate rtrlist() function prototype. 2018-07-12 07:32:35 +00:00
ozaki-r
54f5265e5a arp: warn if failed to delete a specified arp entry
This restores the original behavior of arp in NetBSD 7.
2018-07-11 03:10:48 +00:00
christos
a87d179511 Fix the logic for the non auto case 2018-07-07 15:44:27 +00:00
christos
67420ca6b3 Add an "auto" keyword to auto-determine the link address from the inet addr. 2018-07-06 00:50:05 +00:00
jmcneill
81f085d69d Print USB_SPEED_SUPER_PLUS capability if present 2018-07-05 19:46:58 +00:00
roy
40ea673919 Remove dhclient references. 2018-07-02 15:10:43 +00:00
christos
fe2acef404 Revert previous, fix iteration loops to be consistent:
All sets that have an id >= SET_LAST have NULL name, so use that like the
loop just below.
2018-06-24 19:53:35 +00:00
kamil
ed22e03d7d Enlarge the set_status[] array by a single element
In the get_and_unpack_sets() function there is accessed the
set_status[SET_GROUP_END] element in the array. The array is allocated on
the stack with SET_GROUP_END elements. This means that it is 1 element too
short.

This has been reported with MKSANITIZER=yes with Address Sanitizer.
2018-06-23 22:35:29 +00:00
kamil
49b4c5f864 Fix integer overflow in installboot(8)
Add a sanity check of the disk_buf first three bytes. The original code on
a disk with nul bytes was causing integer overflow and thus calling the
memcmp(3) functin in is_zero() with enormous length.

Verity that the 0th byte is JMP, 1th a signed byte >=9 to prevent overflow
and 2th byte NOP.

Add a comment explaining the check.

Detected with MKSANITIZER and ASan.
2018-06-23 14:15:57 +00:00
jdolecek
5dfdf5bea8 fix intrctl_io_firstline() to properly return NULL if there are no records
to show
2018-06-23 11:11:00 +00:00
jdolecek
c8af0e8068 fix free() on unitialized value for list -c when there are no
assigned interrupts
2018-06-22 22:50:53 +00:00
kamil
c623d35930 Fix invalid free(3) in sysinst(8)
The path variable is assigned with an allocation on the heap with
strdup(3). Later this pointer is changed with strsep(3) and this caused
invalid free(3).

Store the original pointer in a new helper variable opath and pass it to
free(3). With this change, the problem is going away.

Detected with MKSANITIZER=yes with AddressSanitizer.
2018-06-21 23:05:28 +00:00
msaitoh
d6138c5ea5 Whitespace fix. No functional change. 2018-06-20 04:04:50 +00:00
christos
10a71a2955 PR/53371: Thomas Barabosch: Potential memory leak in usr.sbin/ndp/ndp.c 2018-06-16 13:09:41 +00:00
christos
a583d89315 PR/53367: Thomas Barabosch: Integer overflow in usr.sbin/dumplfs
While here use the "e" functions to always check for allocation errors.
2018-06-15 15:16:05 +00:00
christos
c85e5e1ae4 PR/53365: Thomas Barabosch: memory leak in route6d
XXX: pullup 7, 8
2018-06-14 16:17:18 +00:00
christos
2357fc5dd5 use SUBDIR.roff suggested by uwe@ 2018-06-10 17:55:11 +00:00
zafer
061f0fcc8a Set default homeperm values before writing usermgmt.conf file and honor values in it instead of ignoring it.
Fixes PR bin/40324 by Guy Yur
2018-06-10 07:52:05 +00:00
nonaka
4312665c73 fix usage of `arp -d'. 2018-06-08 04:24:12 +00:00
christos
9e3f92993e add missing brace. 2018-06-03 18:59:45 +00:00
martin
197cc46010 Default console device and speed to that used by syinst 2018-06-03 14:38:28 +00:00
martin
fe12f91a5e Reorder fetch options: http before ftp 2018-06-03 13:23:58 +00:00
martin
c52e6b59cd In the generated /etc/fstab, do not use the (temporary, during sysinst)
path name for the file in the comment, but instead the one it will
have on the target system.
2018-06-03 13:18:06 +00:00
martin
2575b4dcc3 Add an option to install onto a pre-configured wedge.
Greatly simmplifies (U)EFI setups (but does not fully automate them yet).
2018-06-03 13:16:30 +00:00
chs
ba2539a980 merge a new version of the CDDL dtrace and ZFS code.
this changes the upstream vendor from OpenSolaris to FreeBSD,
and this version is based on FreeBSD svn r315983.

in addition to the 10 years of improvements from upstream,
this version also has these NetBSD-specific enhancements:
 - dtrace FBT probes can now be placed in kernel modules.
 - ZFS now supports mmap().
2018-05-28 21:04:59 +00:00
wiz
f99a590c77 Sort options in usage. 2018-05-28 12:42:45 +00:00
wiz
5d25ef3799 Document -l, -r, and -w, based on input by jmcneill@
Bump date.
2018-05-28 12:42:02 +00:00
thorpej
033d68f1b3 Add support for light sensors that report Illuminance in lux. 2018-05-27 01:39:00 +00:00
wiz
5e5fa70115 Merge single-letter options. Use more markup. 2018-05-26 12:40:06 +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
christos
8841d3f7b9 Fix reproducible builds
XXX: pullup-8
2018-05-20 03:09:02 +00:00
thorpej
b936dffb43 Overhaul of GPIO interrupt support (that wasn't even used by anything).
- Remove the old, not-expressive-enough interrupt flags, and replace them
  with a new set of interrupt-specific flags that can express a wide
  variety of interrupt configurations (pos, neg, and double-edge, high
  and low level).
- Remove old, unused gpio_pin_ctl_intr() and gpio_pin_irqen(), and
  replace them with gpio_intr_establish(), gpio_intr_disestablish(),
  and gpio_intr_str().  Corresponding fields in the gpio_chipset_tag
  are also added for back-end controllers, which now handle the actual
  dispatch of GPIO interrupts in order to properly support level-triggered
  interrupts as well as interoperate properly with FDT-registered
  interrupts.

Piggy-back on the 8.99.18 version bump.

Inspired by initial work from Brad Spencer.
PR kern/51676
2018-05-19 13:59:06 +00:00
joerg
b77ea2f710 deconst -> __UNCONST, the former involves UB with NULL arithmetic. 2018-05-18 12:23:22 +00:00
nat
71f2adc779 Use the correct tag options. 2018-05-15 04:25:25 +00:00
wiz
f56171bd03 End sentence with a dot. 2018-05-14 06:52:33 +00:00
sevan
a9f8ca9aa6 Document history. 2018-05-13 22:44:58 +00:00
maxv
5fdd88f8ba Rename allocopy -> xstrdup, and simplify. 2018-05-09 07:30:21 +00:00
maxv
f96ffcb41d Clean up. 2018-05-09 07:21:08 +00:00
maxv
b5155ff2f3 Remove dead/broken code. 2018-05-09 07:05:42 +00:00
ryo
cc7da5d4e5 TGran64 indication was actually the opposite 2018-05-08 11:42:43 +00:00
christos
2ed636d665 grow AF_UNIX receive buffer size 2018-05-06 19:16:36 +00:00
ryo
2972297404 add aarch64 support for cpuctl identify. 2018-05-03 15:47:36 +00:00
maxv
5d73803e75 Remove now unused tcpip.h includes. Some were already unused before. 2018-05-03 07:13:48 +00:00
kre
925396b4ac Change return type of pm_lvm_find() from int to void.
It always returns (returned) 0 which was ignored by the one call.
2018-05-01 21:28:39 +00:00
kre
c45b0e7cfe PR install/53220
Don't call pm_lvm_find() unless have_lvm

pm_lvm_find() assumes that data structs (lvms) has been allocated
for it to use, which doesn't happen if !have_lvm

This avoids a sysinst core dump when the lvm command is not installed
(such as when installing from the embedded RAM root filesys in an
INSTALL kernel.)
2018-05-01 21:26:41 +00:00
christos
bf7113376a Create a new bsd.hostinit.mk file and put the build definitions for all host
programs there; make all Makefiles that use bsd.hostprog.mk include it.
Namely turn off MKREPRO and don't make lint, man pages, info files etc.
Remove the Makefile.inc files that contained these same settings, and
remove the settings from Makefile.host
2018-05-01 19:59:42 +00:00
uwe
a04344bae9 Fix missed s/vnconfig/vndconfig/ in an example. 2018-05-01 09:03:49 +00:00
martin
371d88511b Simplify and get rid of external "grep" dependency which is not available
on all install meadia.
Sugested by kre.
2018-05-01 09:01:45 +00:00
martin
88cbfee136 vnconfig has been renamed to vndconfig. Pointed out by kre. 2018-05-01 08:27:39 +00:00
roy
f8583dbb8c Back out part of the prior commit where we added space for IPV6_HOPLIMIT
to the sending control message buffer.
That code never worked on ERLITE, so I elected to set socket options
instead but forgot to revert this part.
2018-04-24 18:31:48 +00:00
maxv
d7a1d2ebf3 Clean up the IPsec ifdefs, same as ping6. 2018-04-23 18:59:03 +00:00
maxv
b9ad8ce8f1 ... another occurrence of OLDRAWSOCKET ... 2018-04-23 10:23:38 +00:00
maxv
b279793f85 Remove dead code. 2018-04-23 10:22:18 +00:00
maxv
4953d3d3b9 Remove CPPFLAGS+=-DUSE_RFC3542, it's not used anymore. 2018-04-23 10:19:11 +00:00
maxv
11bf0879e5 Remove dead/broken code. We want to favor RFC3542 over RFC2292. No
functional change.
2018-04-23 10:14:12 +00:00
maxv
832b034324 Remove dead code. 2018-04-23 09:58:35 +00:00
maxv
6cf02a93b7 Remove now unused code. 2018-04-23 09:47:03 +00:00
wiz
744b9e9d12 Remove -g from SYNOPSIS. 2018-04-23 07:13:50 +00:00
maxv
e65ec2be3d Remove the "-g" option, it uses RH0, which is deprecated by RFC5095, and
doesn't work on modern networks anymore.
2018-04-23 06:42:02 +00:00
wiz
7734da6b73 Minor improvements. 2018-04-21 09:31:08 +00:00
roy
1aeb87918e Update values from RFC 8319 2018-04-20 16:37:17 +00:00
roy
e673cfdc24 Make the #defines more readable 2018-04-20 16:18:18 +00:00
roy
5f8de401f6 Lack of timeout is a programming error, so use an assert in it's place.
While here, improve the error reported if malloc fails.
2018-04-20 16:07:48 +00:00
roy
27e3ea924d Use EXIT_FAILURE instead of an arbtitary number. 2018-04-20 15:59:17 +00:00
roy
5977af5905 Unicast solicited RA's as per RFC 7772.
This is done by having a secondary timer against rainfo so we
can delay unicasting by the required randomised amount of time
without affecting the unsolicited RA timer.
2018-04-20 15:57:23 +00:00
roy
086575fefe Ensure that the soliciter list is initialised and freed correctly, even if it's not used yet. 2018-04-20 15:29:19 +00:00
roy
3bff93a23c Allow timers to exist but be inactive.
This will be used in a future commit.
2018-04-20 13:27:45 +00:00
roy
4f44b8a30e Insist on newer socket options. 2018-04-20 11:31:54 +00:00
roy
1abb8a3172 Use pidifle_lock(3) 2018-04-20 11:25:39 +00:00
roy
301a345cbf Punt dead code 2018-04-20 10:43:38 +00:00
roy
e4c3b35870 White space police. 2018-04-20 10:39:37 +00:00
roy
7a0904c3ae Fix some unaligned pointer issues. 2018-04-20 10:26:34 +00:00
maxv
82288565a0 Document "debug" in usage(). 2018-04-13 17:43:37 +00:00
mlelstv
3103bce53a Re-evaluate drive selection to catch hog-plug devices. 2018-04-08 11:37:31 +00:00
maxv
64f4aca696 Move NPF's todo list into src/doc/TODO.npf, and add some entries. After a
conversation (two months ago) with rmind and sborrill.
2018-04-08 08:57:37 +00:00
christos
fd434df171 add commented out debugging options. 2018-04-01 23:00:40 +00:00
ryo
fe33aa2786 Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)
- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
2018-04-01 04:35:01 +00:00
msaitoh
d2213cce79 From the latest Intel SDM:
- Add Xeon Phi 7215, 7285 and 7295
- Add Coffee Lake
2018-03-30 09:24:40 +00:00
nonaka
68b0b1ed57 Correctly mark the last El Torito section header.
Pointed out by Benno Rice via DM.
2018-03-28 06:48:55 +00:00
jmcneill
27aaea9d2f Official builds now append a timestamp to the kernel config name, so we
can no longer rely on matching an exact name like "(INSTALL32_IP3x)".

Strip the trailing ) from the version strings checked so sysinst will
install the correct bootloader and kernel again.
2018-03-17 22:27:04 +00:00
ginsbach
617ab226ea Initialize ypbind_resp before first possible error return condition. 2018-03-15 02:25:31 +00:00
christos
68ed0ec4e8 improve previous, use getprogname() to get the invocation name. 2018-03-12 01:15:00 +00:00
khorben
0b9ecbe221 Reflect the new name of vndconfig(8) in the usage screen
vnconfig(8) was renamed to vndconfig(8) in NetBSD 7. While the manual page
now defaults to vndconfig, the usage screen still referred to the old name.
2018-03-12 01:10:25 +00:00
msaitoh
0a42effe43 Add yet another Shared L2 TLB (2M/4M pages).
XXX need redesign.
2018-03-09 08:49:32 +00:00
roy
1914784e96 Remove case labels we will never trigger due to filtering. 2018-03-07 10:06:41 +00:00
mlelstv
f52084a9af print quota pointers in superblock 2018-03-06 07:45:38 +00:00
msaitoh
c27ae56af8 Calculate way and number of entries correctly from CPUID leaf 18H. 2018-03-05 10:54:05 +00:00
msaitoh
cfe5ab1fa2 - Parse the TLB info from `cpuid leaf 18H' on Intel processor. Currently,
this change doesn't decode perfectly.  Tested with Gemini Lake. It has
  two L2 Shared TLB. One is 4MB and another is 2MB/4MB but former isn't
  printed yet:

	cpu0: ITLB 1 4KB entries 48-way
	cpu0: DTLB 1 4KB entries 32-way
	cpu0: L2 STLB 8 4MB entries 4-way

  Need some rework for struct x86_cache_info.
- Use aprint_error_dev() for error output.
2018-03-05 05:50:37 +00:00
mlelstv
8f6bdb48b6 Align with DDB. 2018-03-04 07:15:37 +00:00
mrg
2e19323388 add LIBKRB5_LDADD/LIBKRB5_DPADD and their static counterparts
to bsd.prog.mk.  use them instead of hard coding various lists
of libraries for krb5.

this fixes static builds.
2018-02-25 00:16:48 +00:00
wiz
ec5498f5ad Sort some lists. Use EXIT STATUS instead of RETURN VALUES. 2018-02-14 10:13:25 +00:00
maxv
d33dbf4b86 Use .Cm instead of .Li, same as arp.8. 2018-02-14 06:52:41 +00:00
martin
1ff701ef77 Adapt to ar_tha() changes in if_arp.h rev1.31. 2018-02-13 10:17:04 +00:00
christos
2188bc148a No RC5 for OpenSSL-1.1 2018-02-09 02:51:32 +00:00
christos
26640e8b73 disable compat api setting for openssl 1.1 2018-02-09 02:37:20 +00:00
christos
a00715fdd5 only set api compat for 1.0 2018-02-09 02:23:32 +00:00
jakllsch
57ef96115f define OPENSSL_API_COMPAT
(doesn't entirely unbreak build yet)
2018-02-08 18:28:42 +00:00
christos
e569ada8da include dh.h in the right spot. 2018-02-08 17:45:29 +00:00
dholland
32cded6cc9 Typos. 2018-02-08 09:05:16 +00:00
christos
3123832b23 needs the OpenSSL-1.1 api to build 2018-02-07 13:16:50 +00:00
maya
d17a36957e Correct misleading indentation. 2018-02-06 22:04:22 +00:00
christos
4d91e6767f Adjust to OpenSSL-1.1 2018-02-06 21:36:46 +00:00
mrg
aa20739e7d fixes for GCC 6.4:
mail's execute() needs a volatile for setjmp().

telnet has a missing {} issue.

isdnd's print_config() has a missing/wrong {} issue, and
its p_q931bc() has inconsistent indentation (but not any
actual problem.)

map-mbone's accept_neighbors2() compares a vs. a instead
of a vs. b.

sysinst's pm_cgd_check() has missing {} issue.

timed's main() has missing {} issue.
2018-02-04 09:01:12 +00:00
martin
a9abe48acc Cosmetics: fix the order of calloc() arguments. 2018-01-29 16:24:23 +00:00
maya
c66c60f8a9 Fix copy paste error. from coverity. 2018-01-28 14:34:26 +00:00
sevan
afa0bbc877 Need strings.h for ffs() 2018-01-27 02:07:33 +00:00
christos
a3bd874609 make this build again. 2018-01-26 09:38:26 +00:00
uwe
44fdebe499 .Li is superfluous inside .Bd -literal 2018-01-25 19:15:10 +00:00
sevan
0042c4a241 typo, remove extra bracket 2018-01-24 14:45:44 +00:00
uwe
ad8c206f39 Try to use proper semantic markup. Fix a few formatting nits. 2018-01-24 12:05:50 +00:00
skrll
ac34435581 Remove port-acorn26
OK core@
2018-01-24 09:04:40 +00:00
sevan
0f795805f6 Missed another main() prototype. 2018-01-23 23:02:40 +00:00
sevan
23b04ffd61 Restore rcstag. 2018-01-23 22:40:06 +00:00
sevan
7a75668892 drop main() prototype 2018-01-23 22:12:52 +00:00
sevan
4e188220ed More K&R style prototypes missed in the previous run 2018-01-23 21:27:20 +00:00
sevan
421949a31f ansify - drop the K&R style prototypes & implementations. 2018-01-23 21:06:24 +00:00
sevan
179d97fa32 Ansify 2018-01-23 19:01:33 +00:00
joerg
be61e1101a Ignore pragma warnings with clang for the zfs code. 2018-01-22 01:34:42 +00:00
maxv
d569f28840 Fix build failure, the structure is already defined now. 2018-01-19 14:30:09 +00:00
christos
2966117648 PR/47615: Dr. W. Stukenbrock: Always zero out the result structs in the
svc procs to avoid returning stale request data to the client.
XXX: pullup-6,7,8
2018-01-17 03:16:10 +00:00
mrg
8ea873287d implement cpuctl identify for sparc and sparc64.
sparc:
- move enum vactype and struct cacheinfo into cpu.h
- move the cache flags from cpuinfo.flags into CACHEINFO.c_flags
  (this allows the new cache_printf_backend() to see them.)
  remove unused CPUFLG_CACHEIOMMUTABLES and CPUFLG_CACHEDVMA.
- align xmpsg to 64 bytes
- move cache_print() into cache_print.h so it can be shared with
  cpuctl.  it only depends upon a working printf().
- if found, store the CPU node's "name" into cpu_longname.  this
  changes the default output to show the local CPU not the
  generic CPU family.  eg:
  cpu0 at mainbus0: mid 8: Ross,RT625 @ 90 MHz, on-chip FPU
  vs the generic "RT620/625" previously shown.
- for each CPU export these things:
  - name
  - fpuname
  - mid
  - cloc
  - freq
  - psr impl and version
  - mmu impl, version, and number of contexts
  - cacheinfo structure (which changed for the first time ever
    with this commit.)

sparc64:
- add a minimal "cacheinfo" structure to export the i/d/e-cache
  size and linesize.
- store %ver, cpu node "name" and cacheinfo in cpu_info.
- set cpu_info ver, name and cacheinfo in cpu_attach(), and
  export them via sysctl, as well as CPU ID and clock freq

cpuctl:
- add identifycpu_bind() that returns false on !x86 as their
  identify routines do not need to run on a particular CPU to
  obtain its information, and use it to avoid trying to set
  affinity when not needed.
- add sparc and sparc64 cpu identify support using the newly
  exported values.
2018-01-16 08:23:17 +00:00
maya
e3a81445cb Returns void, mark noreturn.
From Eitan Adler in PR bin/52925
2018-01-16 07:57:58 +00:00
christos
243229af21 avoid passing literal string to unconst. 2018-01-15 14:38:06 +00:00
christos
651232dac7 sprinkle unconst 2018-01-15 00:46:16 +00:00
uwe
252235664d .An -nosplit 2018-01-14 03:17:28 +00:00
uwe
f989de5924 Fix accidental trailing whitespace. 2018-01-14 03:14:46 +00:00
uwe
842435d53f Vertical space before an example in .Dl 2018-01-14 03:09:47 +00:00
uwe
c74ee2dcc5 .An -nosplit 2018-01-14 02:54:55 +00:00
mrg
faba61de75 note the default path for ucode updates can be found in sysctl. 2018-01-14 00:45:54 +00:00
christos
d131c53716 add more __dead/EXIT_FAILURE 2018-01-13 12:36:35 +00:00
nat
ffcb8cef5c Set size of mtusize before calling getsockopt to obtain mtu size. 2018-01-13 10:20:45 +00:00
christos
47cdb20d40 missing printflike 2018-01-12 17:54:36 +00:00
christos
d7d7f74c03 sprinkle __dead, use EXIT_{SUCCESS,FAILURE} 2018-01-11 13:44:26 +00:00
msaitoh
5bd8e5c45d Print Intel cpuid 7 %edx.
Example output of cpuctl -v identify 0:

+cpu0: 00000007: 00000000 000027ab 00000000 0c000000
(snip)
+cpu0: SEF edx 0xc000000<IBRS,STIBP>
2018-01-10 07:08:35 +00:00
martin
1e774d3bb5 Use fseeko instead of fseek to fix the build on some 32bit architectures 2018-01-09 10:47:57 +00:00
wiz
f24dbfeb68 File system police. Add RCS Id. Improve SYNOPSIS. Use more markup. 2018-01-09 09:41:29 +00:00
wiz
2df58e1698 File system police. Sort options. Add RCS Id. Use more markup. Wording. 2018-01-09 09:39:07 +00:00
wiz
67dee3c787 Mostly formatting improvements. 2018-01-09 09:33:00 +00:00
wiz
3d7c11903b file system police. 2018-01-09 09:27:41 +00:00
christos
b985414b8f Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet
2018-01-09 03:31:12 +00:00
christos
09f2d229ee factor out common code from Poul-Henning Kamp. 2017-12-31 03:04:44 +00:00
hannken
d1244e2808 Use stat() information to decide if the backing store is a directory.
Depending on open() returning EISDIR fails for mount points.
2017-12-21 15:52:19 +00:00
wiz
ae3489c219 Add width arguments to tagget lists. 2017-12-21 12:25:03 +00:00
plunky
42f8a9c2e1 for Read_Local_Version, print also the HCI revision 2017-12-21 09:31:22 +00:00
plunky
1bf21e871d fix width/indent of list 2017-12-21 09:00:19 +00:00
plunky
25d91cf46c fix width of list 2017-12-21 08:59:58 +00:00
christos
743f435a2d PR/52828: Mark Johnston: makefs UFS2 lazy inode initialization is buggy
makefs(8) emulates UFS2 in performing lazy initialization of inode
blocks when allocating and writing inodes. However, it only ever
initializes one inode block at a time, which may be insufficient.
If so, a later initialization may clobber an inode, resulting in
an inconsistent filesystem.

I committed a minimal fix for the problem to FreeBSD:
https://svnweb.freebsd.org/changeset/base/326912
2017-12-16 23:08:40 +00:00
christos
ab39b7f428 use uintmax_t for nlink_t from FreeBSD 2017-12-14 18:34:41 +00:00
skrll
ba7c07c65b Fix RPI kernel file after FDTisation.
From Harold Gutch
2017-12-14 14:12:39 +00:00
wiz
4b01aa4e24 Remove superfluous Pp. 2017-12-11 23:07:49 +00:00
rmind
bd05c4c470 npfctl: add support for the 'no-ports' flag in the 'map' statements.
This allows us to create a NAT policy without the port translation.
2017-12-10 22:04:41 +00:00
leot
add6cc459e Fix a typo 2017-12-10 20:45:26 +00:00
bouyer
878cb1cfc5 Fix fallout from hid factorisation:
- need to install sys/dev/hid/hid.h for userland
- include it where needed - most of the time in place if usb/usbhid.h
2017-12-10 20:38:13 +00:00
christos
9e9f13a4e0 Add things implemented 2017-12-10 20:30:45 +00:00
mlelstv
808b264de6 allow PASS opt_proto ALL syntax in map statement. 2017-12-03 23:48:03 +00:00
martin
ee3280f977 Bump MAXARGV from 20 to 64 - with bozohttpd and all config on the command
line it is easy to hit the (silent) limit.
2017-11-28 11:51:11 +00:00
abhinav
357f7b44ef Encapsulate all the arguments required by the query callback function in a struct.
If we want to add or remove arguments from the callback functions, it requires
changing the callback interface all over the place. By letting the callback simply
expect a single struct argument, it would clean things up a bit.

ok christos
2017-11-25 14:29:38 +00:00
kre
a33d800447 When sending log messages to stderr, append the \n that syslog does not need. 2017-11-25 02:37:04 +00:00
nonaka
c7f80e628d Initialize boot_catalog_entry's entry_type properly.
This had been missing but the type was used in cd9660_setup_boot().

From OpenBSD usr.sbin/makefs/cd9660/cd9660_eltorito.c r1.10.
2017-11-09 01:28:05 +00:00
joerg
9a76d3f972 Mark expandm as preserving format strings. 2017-11-06 19:12:23 +00:00
christos
4c18e5f405 Change the meaning of the 'D' flag to print errors to stderr instead of
syslog(3) and exit if poll(2) fails (intended to be used with unit-tests).
2017-11-06 15:15:04 +00:00
abhinav
b0184879c2 Casting variable of type int * to size_t *, may cause
alignment issues on some platforms (e.g. Sparc64)
So, Use a temporary variable to avoid the cast.

Thanks to Martin@ for noticing the issue and also suggesting the issue.
Fixes PR bin/52678
2017-10-31 10:14:27 +00:00
ozaki-r
2acd285552 Fix showing translated port (ntohs-ed twice wrongly) 2017-10-30 04:53:43 +00:00
wiz
3ba65d3d58 New sentence, new line. 2017-10-23 01:07:27 +00:00
abhinav
c59c6bd4a8 Add rtsol to the NAME section as well 2017-10-22 18:09:33 +00:00
abhinav
ec2df1b139 Add quotadump to the NAME section 2017-10-22 18:00:45 +00:00
abhinav
92d8b712af Add irda to the NAME section as well 2017-10-22 17:58:10 +00:00
msaitoh
4a84e4a57f Update from Intel SDM:
0x55: Xeon Scalable (Skylake)
 0x57: Xeon Phi [357]200 (Knights Landing)
 0x66: Future Core (Cannon Lake)
 0x85: Future Xeon Phi (Knights Mill)
2017-10-19 03:09:55 +00:00
msaitoh
798eec36f8 Update from the latest Intel SDM:
0x5c: Atom (Goldmont)
 0x5f: Atom (Goldmont, Denverton)
 0x7a: Atom (Goldmont Plus)
2017-10-17 14:48:42 +00:00
ozaki-r
37c5cac096 Don't setup SPs if no policy sepecifier is specified
We expect that SPs are set up iff some policy sepecifier(s) are specified.

Found on investigating an issue reported by Robert Swindells
2017-10-17 07:13:19 +00:00
christos
5bf5a8b9c7 Treat EOF as a condition to re-open the pcap socket. Since we've been woken
up by poll(2), there must be data to read. If there is not, our socket might
not be ok anymore.
2017-10-16 11:18:43 +00:00
christos
531fc46210 Add a message when we are re-opening the pcap socket. 2017-10-16 11:17:45 +00:00
msaitoh
379e4ad141 - Print ci_feat_val[5] (Structured Extended Feature leaf Fn0000_0007 %ebx) on
AMD, too.
- Print ci_feat_val[6] (Fn0000_0007 %ecx) on Intel.
2017-10-16 10:10:48 +00:00
christos
c06842d6f7 try to re-open the pcap connection on error. 2017-10-15 15:26:10 +00:00
christos
837bece478 PR/52618: Shinichi Doyashiki: Don't exit if adding interface to multicast
group fails. This happens with empty vlan interfaces

- make syscalls checks against -1
- fix errors to print %s: instead of <%s>

XXX: if_vlan is the only pseudo interface in net/ that returns such an
error..
2017-10-14 19:16:26 +00:00
christos
e68fbebd32 use librumpres 2017-10-10 19:30:41 +00:00
msaitoh
761e1e94b4 Print ACPI_HEST_GHES_ASSIST flag (ACPI 6.2). 2017-09-28 06:55:08 +00:00
msaitoh
0fd02e45f9 Cosmetic change (tab and newline). 2017-09-27 08:14:18 +00:00
msaitoh
597a86a670 - Print SAPIC EID of Processor Local APIC/SAPIC Affinity.
- Print GIC Interrupt Translation Service(ITS) Affinity (ACPI 6.2)
- KNF
- Whilte space cleanup.
2017-09-27 05:43:55 +00:00
gson
0eb663cba7 Clear the screen after running installboot. If we don't, there will
be a leftover line saying "Status: Finished" at the top of the next
screen, along with some random punctuation in the left and right
margins.  Inspired by ../landisk/md.c 1.3.
2017-09-11 15:24:28 +00:00
christos
11aeb6ae69 Don't start another copy of rtadvd if one is running. 2017-09-11 14:12:28 +00:00
christos
7931fdd27d KNF, fix time printing formats. 2017-09-11 14:12:07 +00:00
ginsbach
b68988e2c2 Use looked up remote host for remote message without a hostname
An incoming remote message may not necessarily have a hostname
between the timestamp and the message. The the source of the remote
sender is already looked up so use that hostname/IP address rather
than the local hostname.

XXX: pullup-8
XXX: pullup-7
XXX: pullup-6
2017-09-10 17:01:07 +00:00
wiz
96dff12048 Fix enumeration. 2017-09-10 10:13:47 +00:00
mrg
e7f4cf6f3c two minor fixes for -x and -y mode:
- the header is only 1 line not 2, account for this when calculating
  when to display the next header.
- when ndrives > 1, don't display the header every time, but only when
  the previous one disappears.

now i don't feel the need to run "iostat -x wd0 1 & iostat -c wd1 1"
to get less repeated header output on my display.
2017-09-09 23:51:58 +00:00
sevan
5bd038bb6e Remove the ability to generate a signature database with the hash algorithms
MD5, SHA1 & RMD160 which are either broken or on their way to being broken.

Discussed on tech-security
http://mail-index.netbsd.org/tech-security/2017/08/21/msg000936.html

ok riastradh
2017-09-09 21:27:23 +00:00
msaitoh
ed892e9a7b Define CPUID Fn00000001 %ebx bits and use them. No functional change. 2017-09-07 06:40:42 +00:00
msaitoh
50d91653ef Don't define GAS adddess ID constants in acpidump.h and use actypes.h's
definitions. No functional change.
2017-09-07 04:40:56 +00:00
nakayama
d1ef03659a Don't modify strings stored in hash, otherwise filling up of
directory hierarchy stops if the same hash value occurs in
directory and leaf.

Fix the issue that
"./usr/share/locale/pl/LC_MESSAGES/gettext-tools.mo" isn't included
in sets file in the case of MKUNPRIVED=no.
2017-09-07 04:04:13 +00:00
msaitoh
0f0f0fe40a - Space, tab and newline change for consistency output.
- Print a type number for unknown HEST sub entry ID.
2017-09-04 08:12:29 +00:00
msaitoh
084106f3ab - Calculate offset of a sub header correctly in acpi_handle_hest() to print
all of sub entries in HEST correctly.
- Print a SpaceID number for unknown ID in acpi_print_gas().
- Use PRINTFLAG() in acpi_print_hest_notify().
- Use %u instead of %d for unsgined values in acpi_print_hest_generic().
2017-09-04 08:08:41 +00:00
msaitoh
8dabdd9fc2 Fix calculation the offset of the Action Table in WDAT to print each
entries correctly.
2017-09-04 07:59:15 +00:00
nat
866993a422 Fix copyright error.
Ok plunky@.
2017-09-03 22:54:12 +00:00
msaitoh
5d527485aa Decode the following entries:
- DBG2 (Debug Port Table 2)
 - SPMI (Server Platform Management Interface Table)
 - WDDT (Watchdog Timer Description Table)
 - UEFI (UEFI, not fully decoded yet)
2017-09-01 18:35:50 +00:00
msaitoh
ff98ea4622 - Add "Performance Server" and "Tablet" for Preferred_PM_Profile.
- Don't print FADT_RESET_REG if FADT version is 1.
- Print FADT ArmBootFlags, MinorRevision, SleepControl, SleepStatus and
  HypervisorId.
- Print "{}" even if any flags aren't set.
2017-09-01 05:53:09 +00:00
msaitoh
1c01428a98 Part of FreeBSD r323045:
- Print Valid Field in ACPI_NFIT_CONTROL_REGION with 0x%02x.
 - Fix Flags of ACPI_NFIT_CONTROL_REGION.
2017-08-31 09:27:51 +00:00
msaitoh
792e611dc6 - Decode ACPI_HEST_GENERIC_V2.
- Decode ACPI_MADT_GENERIC_MSI_FRAME.
- Add NMI, CMCI, MCE, GPIO-Signal, ARMv8 SEA, ARMv8 SEI and GSIV
  in acpi_print_hest_notify().
- Add ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS and ACPI_EINJ_GET_EXECUTE_TIMINGS
  in acpi_print_einj_action().
- Add ACPI_ERST_EXECUTE_TIMINGS in acpi_print_erst_action().
- Decode NFIT (NVDIMM Firmware Interface Table) from FreeBSD.
2017-08-31 06:53:58 +00:00
wiz
68fe156435 New sentence, new line. Remove superfluous Pp. 2017-08-27 20:45:47 +00:00
nat
eeb06bda56 Connection state machine improvement upon transition from AVDTP_OPEN to
AVDTP_START/SUSPEND.
2017-08-27 10:39:18 +00:00
jmcneill
ae2cfe2a2a Try to use standard wsdisplay ioctls when HPCFBIO_GCONF is not available. 2017-08-27 02:19:08 +00:00
ginsbach
a6da7f121b Support -4 and -6. 2017-08-26 19:26:32 +00:00
ginsbach
6b34aef124 Sort options alphabetically. 2017-08-26 18:16:05 +00:00
christos
b766bbedd5 don't lock for RUMP 2017-08-21 17:01:04 +00:00
msaitoh
8f0f46f919 Add new function acpi_select_address() derived from acpi_get_fadt_revision().
On some systems, 32bit address is used for (X)Dsdt even if (X)Facs uses 64bit.
Don't assume an address size from FADT revision.
2017-08-21 02:58:49 +00:00
msaitoh
9ffd944419 Check DSDT signature in acpi_handle_fadt() for broken ACPI table. 2017-08-18 09:49:24 +00:00
christos
39c7ca3b3a fix path to the warmstart file. 2017-08-17 07:45:24 +00:00
ginsbach
b683e9a94a Fix compile warnings.
(Restore changes clobbered by merge of FreeBSD changes. Hi christos!)
2017-08-17 00:08:10 +00:00
ginsbach
16400a904e Revert accidently committed enabling WARMSTART. 2017-08-17 00:06:00 +00:00
ginsbach
5f912a847a Write the "warm start" file to /var/run rather than /tmp.
(Restore changes clobbered by merge of FreeBSD changes. Hi christos!)
2017-08-16 23:38:16 +00:00
wiz
8b8f265dcd Use today's date. Sort options. Remove superfluous Tn macro. Wording improvement. 2017-08-16 18:23:03 +00:00
christos
6f43c19b6f fix typo, date, document -L 2017-08-16 14:22:58 +00:00
christos
34b7ffd922 merge FreeBSD changes:
- fixes CVE-2015-7236
- adds -h hostip to bind, -6 for only ipv6 access, -a for abort gracefully
- documents -w (warmstart)
XXX: should fix warmstart file to go to /var/run instead of /tmp
2017-08-16 08:44:40 +00:00
wiz
e217b7d046 Remove superfluous Tn macros. 2017-08-15 21:21:18 +00:00
mrg
c62a157eb2 merge the rest of sbmips into evbmips. install the stand files in
/usr/mdec/sbmips/ and document them in installboot(8) even though
it isn't really ported yet.  also build the SBMIPS kernels.

unfortunately, sbmips has been broken since mips64 merge, but the
fix can happen in the evbmips version, which we might merge into
the older trees anyway.

XXX: releng can turn off sbmips* builds now for -current.
2017-08-15 10:11:31 +00:00
nat
52943eab20 Set controller clock based on baud rate. 2017-08-14 05:28:23 +00:00
wiz
3ee579e3bc Indent to avoid line breaks in tag; give tag width in table; use Nm
to refer to hciattach because we'll probably never have hciattach(8).
2017-08-13 18:34:03 +00:00
ginsbach
94951b0fc5 PR bin/42464: Timothy McIntosh: Fix timed interoperability
Fix is a combination of FreeBSD fix and submitted patch.

[From the FreeBSD change]
The timed protocol is not implemented in a compatible way by all
vendors; the size of the tsp_name field is OS-dependent.  4.3BSD
used a 32-byte field, FreeBSD uses MAXHOSTNAMELEN and RedHat
apparently uses a 64-byte field.  As a result, sanity checking code
added a few months ago to detect short packets will fail when
interoperating with one of these other vendors.

Change the short packet detection code to expect a minimum packet
size corresponding to the 4.3BSD implementation, which should be
a safe minimum size.
2017-08-11 16:47:42 +00:00
jmcneill
6ad4d0f8e5 Make the "bcm43xx" type use H4 transport and add a new "bcm43xx-3wire"
type for use with H5 transport. The naming of the types here matches
those used in a series of BlueZ patches from the Raspberry Pi foundation.
2017-08-11 11:54:08 +00:00
jmcneill
8622efc43c Derive the firmware name from the device's local name instead of
hard-coding BCM4340A1. Search hw.firmware.path for the firmware image
instead of loading it from the current directory.
2017-08-10 20:43:12 +00:00
jakllsch
6598524cdc remove currently-unused variables that trip up the build 2017-08-10 18:45:20 +00:00
nat
e5d9803b71 Add support for bcm 43xx devices using the btuart h5 protocol.
Currently It will only load 1 firmware image for rpi3.

To use change to the directory containing the firmware BCM4340A1.hcd.
Then issue: btattach -FPi 115200 bcm43xx /dev/ttydevice 921600.

Then you can use the bluetooth device btfive0.

This enables the embedded bluetooth controller on rpi3.
2017-08-10 13:34:29 +00:00
maya
7db80fab74 evbmips can "boot root FFSv2"
It typically uses a non-NetBSD bootloader (PMON, u-boot...) and those
don't differentiate from v1 from v2 - both are unsupported and it requires
a separate boot partition.
2017-08-09 23:01:06 +00:00
ginsbach
7333bec30e Make use of the defined YP errors when ypbind encounters one rather than
just returning an empty (successful) RPC result.

Don't exit when allocating memory for a new bound domain received via a RPC.
2017-08-09 01:56:42 +00:00
ginsbach
19bce2a53d Fix compile warnings. 2017-08-06 01:55:21 +00:00
ginsbach
17894e71a8 Write the "warm start" file to /var/run rather than /tmp. 2017-08-06 01:02:44 +00:00
wiz
406adb2faa Fix punctuation markup, remove superfluous Pp. 2017-08-05 20:24:17 +00:00
msaitoh
c359a2130c Sync with FreeBSD's r321294:
- Dump TCG ACPI spec table (TCPA) more.
 - Dump DMA Remapping Reporting table (DMAR).
 - Consistently cast ACPICA 64-bit integer types when we print them.
 - Display the 'Flags' field in the HPET Description Table.
 - Do not crash when RSDT/XSDT contains an empty entry.
 - Print 64-bit addresses clearly with leading zeros to avoid confusions.
 - Create temp file safely.
 - Add missing flags into FADT.
 - Print some new ACPI 5.1 MADT entries.
 - Use __arraycount().
 - Warn and exit loop on invalid subtable length.
 - Fix the type used to hold the value returned from getopt. On arm64 char is
   unsigned so will never be -1.
2017-08-04 06:30:36 +00:00
ginsbach
fdcd803e08 Expand the traceroute6 man page
- Add a proper description paragraph before launching into describing the
  options.  More closely follow format of the traceroute(8) man page.
- Improve the wording for some option descriptions.
- Add description what what is printed and define what the possible
  annotations mean.
2017-08-04 02:08:21 +00:00
msaitoh
9b32f8487a On UEFI environment, ACPI table is not at low address. Get ACPI root pointer
from hw.acpi.root first. Same as FreeBSD. This change fixes a problem that
acpidump(8) showed "acpidump: Can't find ACPI information".

XXX pullup-8
2017-08-03 05:54:45 +00:00
jmcneill
1385e4296e Make the 'no results found' message sound less harsh.
Changes "try using better keywords" to "try using different keywords".
2017-08-02 12:52:18 +00:00
abhinav
f56c37233e Don't use the custom tokenizer when compiled with debugging on
Using the custom tokenizer means one cannot interactively query the database
through the SQLite shell, thus thwarting the purpose of the debug build option.

Thanks to leot@ for reporting it.

(While there change the debug macro from DEBUG to APROPOS_DEBUG)
2017-08-01 16:16:32 +00:00
nakayama
1d43d3952b sparc has db_machdep.c now. 2017-07-21 20:58:44 +00:00
wiz
2b8372dc3b Simplify. 2017-07-20 07:42:54 +00:00
dholland
fbbc1f22f4 Rework previous (and the text it modified) for clarity. 2017-07-19 16:37:17 +00:00
gson
c7fa9ad5c0 Clear the screen after running installboot. If we don't, there will
be a leftover line saying "Status: Finished" at the top of subsequent
screens, and the message "Hit enter to continue" will be redrawn after
the set selection is complete, which confuses literal-minded robotic
users such as anita.
2017-07-18 17:15:45 +00:00