Commit Graph

266299 Commits

Author SHA1 Message Date
cherry
a141ce0848 Rig the hypercall callback page such that when the kernel happens to
run without a XEN domain loader having previously overwritten the
hypercall page with its hypercall trampoline machine code, we still
get to detect its presence by calling the xen_version hypercall stub.

We use this hack to detect the presence or absence of the hypervisor,
without relying on the MSR support on HVM domains.

This works as an added sanity check that the hypercall page
registration has indeed succeeded in HVM mode.
2019-02-13 05:36:59 +00:00
cherry
471cf8eaf8 Missed the crucial header file in previous commit.
struct intrstub; is now uniform across native and XEN

This should fix the XEN builds.
2019-02-13 05:28:50 +00:00
cherry
19888fd484 In preparation for debut-ing PVHVM mode:
- Make the struct intrstub uniform across native and XEN.
 - Introduce vector callback entrypoints for PVHVM mode.
2019-02-13 05:01:57 +00:00
msaitoh
1409f357ac Regen. 2019-02-13 04:35:58 +00:00
msaitoh
58c153cf7e - Sort by model number.
- Add missing white space.
2019-02-13 04:35:28 +00:00
msaitoh
e72b306f65 From FreeBSD:
- Add Broadcom BCM540[24], BCM5424, BCM5466 and BCM54[78]8.
 - Add ICS1893C.
 - Add Micrel KSZ8081 and KSZ9031.
2019-02-13 04:15:01 +00:00
msaitoh
3e3226a854 Sort by model number. 2019-02-13 04:02:11 +00:00
msaitoh
2284889342 Regen. 2019-02-13 03:54:53 +00:00
msaitoh
a43b5bfc86 - Add Tridium, Data Track Technology, Netas, Ralink Technology,
Sunplus Technology and ADMtek's OUI.
- Sort by OUI.
2019-02-13 03:54:16 +00:00
msaitoh
8d51e2f508 From OpenBSD:
- Add ASIX OUI.
 - Add VIA OUI and devices.
 - Add Vitesse OUI and devices.
From FreeBSD:
 - Add BROADCOM4.
2019-02-13 03:44:55 +00:00
christos
a4338b406c cleanup unused stuff now that we execute directly and not in a separate task. 2019-02-13 01:16:30 +00:00
mlelstv
1586b80690 Document options to select alternate GPIO modes. 2019-02-12 21:41:38 +00:00
kamil
e3a629e53f Rename signal1 to signal_mask_unrelated in t_ptrace_wait*
No functional change intended.
2019-02-12 21:35:35 +00:00
martin
c3f237b4de Backout previous snprintf nonsense, instead STFU gcc 7's most
useless warning ever.
2019-02-12 18:32:15 +00:00
prlw1
1500cdfb25 new nsd 2019-02-12 16:13:23 +00:00
prlw1
bd6e42bffb merge conflicts 2019-02-12 16:11:10 +00:00
prlw1
a162002587 Import nsd-4.1.26
29 November 2018: Wouter
	- Tag for 4.1.26rc1.

27 November 2018: Wouter
	- Fix parsezone failure in 4194 fix.

26 November 2018: Wouter
	- Fix to not set GLOB_NOSORT so the nsd.conf include: files are
	  sorted and in a predictable order.
	- Added nsd-control changezone.  nsd-control changezone name pattern
	  allows the change of a zone pattern option without downtime for
	  the zone, in one operation.
	- Fix #3433: document that reconfig does not change per-zone stats.

20 November 2018: Wouter
	- Fix #4205: enable-recvmmsg in mixed IPv4/IPv6 environment fails.
	  This sets the msg_hdr.msg_namelen correctly after receipt.

19 November 2018: Wouter
	- Support SO_REUSEPORT_LB in FreeBSD 12 with the reuseport: yes
	  option in nsd.conf.
	- Fix #4202: nsd-control delzone incorrect exit code on error.
	- Tab style fix to use tab for 8 spaces, from Xiaobo Liu.

25 October 2018: Wouter
	- Adjust dnstap socket path for chroot.

22 October 2018: Wouter
	- Fix #4194: Zone file parser derailed by non-FQDN names in RHS of
	  DNSSEC RRs.
	- Fix some more, neater code and checks for domain length limit.
	- check that the dnstap socket file can be opened and exists, print
	  error if not.

4 October 2018: Wouter
	- dnstap work, the dnstap.proto is a copy of the file from Unbound,
	  also dnstap.m4 configure include file.
	- dnstap collector: free eventbase and memclean nicer.
	- dnstap collector: send data and read it in collector.
	- dnstap/dnstap.c and .h from Unbound's contribution from
	  Farsight Security, added to then adapt it for dnstap logging in NSD.
	- dnstap.c with auth query and auth response, and called from
	  the collector.
	- dnstap work, config nsd.conf parse.
	- dnstap example config.

25 September 2018: Wouter
	- NSD 4.1.25 released, trunk has 4.1.26 in development.

18 September 2018: Wouter
	- tag for NSD 4.1.25rc1.

17 September 2018: Wouter
	- Fix #4156: Fix systemd service manager state change notification

14 September 2018: Wouter
	- Remove unused if clause during server service startup.

13 September 2018: Wouter
	- Fix typo in clang analysis test.
	- Annotate exit functions with noreturn.
	- nsd-control prints neater errors for file failures.

12 September 2018: Wouter
	- clang analysis test.

11 September 2018: Wouter
	- Fix to combine the same error function into one, from Xiaobo Liu.
	- Fix initialisation in remote.c.
	- please clang analyzer and fix parse of IPSECKEY with bad gateway.
	- Fix unit test code for clang analyzer.
	- Fix nsd-checkconf fail on bad zone name.

10 September 2018: Wouter
	- Fix coding style in nsd.c

7 September 2018: Wouter
	- append_trailing_slash has one implementation and is not repeated
	  differently.

4 September 2018: Wouter
	- Fix codingstyle in nsd-checkconf.c in patch from Sharp Liu.

15 August 2018: Wouter
	- Fix use_systemd typo/leftover in remote.c.
2019-02-12 15:49:00 +00:00
maxv
c3f47f49f8 Optimize: the hardware does not clear the TLB flush command after a
VMENTRY, so clear it ourselves, to avoid uselessly flushing the guest
TLB. While here also fix the processing of EFER-induced flushes, they
shouldn't be delayed.
2019-02-12 14:54:59 +00:00
maxv
f911f1c1e1 Optimize: fetch only 5 bytes instead of 15, the instruction can have only
up to five prefixes.
2019-02-12 14:50:21 +00:00
rjs
d642e5f90e Add some fallthrough annotations. 2019-02-12 14:40:38 +00:00
rin
1f6814c121 Fix build with DIAGNOSTIC:
ASSERT() is enabled ifdef DEBUG, not DIAGNOSTIC.
2019-02-12 14:31:45 +00:00
rin
f0d38cd3a3 Do not set p->up_serialise twice in usbd_setup_pipe_flags().
No functional changes.
2019-02-12 14:17:44 +00:00
kardel
0cce4ea2bd Fix, but disable the commented SUN compatibility in st.c to write
final file marks by opening and immediately closing the device
 in O_WRONLY mode. That code has not been working since around 1998.
 It can now be enabled with options ST_SUNCOMPAT.
2019-02-12 13:49:13 +00:00
kardel
60af930abe Fix PR kern/53949:
Fix inconsistent/incomplete file mark handling to conform again
to mtio(4) at close(2) time. This was necessary as the PREVENT/ALLOW
bracket was reduced from a whole mount session to cover only the
open(2)/close(2) time on ~2002-03-22. The rationale was to allow
robots and humans to change the media during a mount session.

Unfortunately this lead to file marks being written to potentially other
media at the beginning on drives that used the two file marks as EOM
pattern. In order for that to happen the media had to be removed after
data and at most one file mark had been written before removal.

The mount error message has been clarified and a warning about
potential data/file mark lossage on UNIT ATTENTION
during an active mount session with unfinished file marks has been
added.

While there, fix, but disable the commented SUN compatibility to write
final file marks by opening and immediately closing the device
in O_WRONLY mode. That code has not been working since around 1998.
It can now be enabled with options ST_SUNCOMPAT.

Additionally debug output coverage has been extended.
2019-02-12 13:43:40 +00:00
rmind
769d827846 libnv: Free the data array for NV_TYPE_DESCRIPTOR_ARRAY case.
Obtained from FreeBSD rev 343987 by oshogbo@.
2019-02-12 12:52:49 +00:00
rmind
b953ce67b4 libnv: fix multiple memory leaks.
- nvpair_create_stringv: free the temporary string; this fix affects
  nvlist_add_stringf() and nvlist_add_stringv().

- nvpair_remove_nvlist_array (NV_TYPE_NVLIST_ARRAY case): free the chain
  of nvpairs (as resetting it prevents nvlist_destroy() from freeing it).
  Note: freeing the chain in nvlist_destroy() is not sufficient, because
  it would still leak through nvlist_take_nvlist_array().  This affects
  all nvlist_*_nvlist_array() users.

Found by clang/gcc ASAN.  These fixes have been contributed to the
upstream (FreeBSD) repository.
2019-02-12 12:49:23 +00:00
mrg
91af807154 hack alert time:
on sparc and sparc64, don't remove .eh_frame section.  it leads
to failure as something is referenced, and objcopy ends up
emitting a broken binary that can't be run -- it attempts to
load at va=0, beyond having missing referenced data.

also, on sparc64 also don't remove .note.netbsd.mcmodel.


the former should be revised when we can avoid it.
2019-02-12 10:16:58 +00:00
cherry
d9eb2ac8fa Move xen event related code which interfaces with the NetBSD interrupt
subsystem into a separate namespace where it can co-exist with the
native equivalent in PVHVM mode.

On PV, we alias and export the native symbols - this means that
although the namespace is different, the semantics must be identical.

Eg: xen_intr_establish_xname() vs. intr_establish_xname().

The specific functions we need in PVHVM are:

 - spllower, xen_spllower (for native as well as XEN event spl
   despatch/defer)
 - xen_disable_intr()/xen_enable_intr() ,
   x86_disable_intr()/x86_enable_intr()
 - xen_read_psl()/xen_write_psl(),
   x86_read_psl()/x86_write_psl()
 - intr_establish() et. al, xen_intr_establish() et. al.

This gives us the ability to manage Paravirtualised drivers such as
xbd(4) as well as fully emulated ones such as wd(4)., for eg
2019-02-12 08:04:53 +00:00
cherry
b4bf0ca2e6 conditionally include XENPV specific code.
This explicitly excludes PV only functionality that would be wrong to
attempt to use in other modes, for eg: p2m table management.
2019-02-12 07:58:26 +00:00
mrg
db4c90ad36 compat_sunos depends upon compat_09. fixes:
[   1.8785495] WARNING: module error: built-in module compat_sunos can't find builtin dependency `compat_09'
[   1.8785495] WARNING: module error: built-in module compat_sunos prerequisite compat_09 failed, error 2
2019-02-12 07:16:55 +00:00
mrg
871f92bd46 add commented QUOTA2 line. 2019-02-12 07:15:58 +00:00
kamil
7439bd598d Refactor lwp_create1 and lwp_exit1 into trace_thread* in ptrace(2) tests
New tests:
 - trace_thread1
 - trace_thread2
 - trace_thread3
 - trace_thread4

These tests verify _lwp_create(2) and _lwp_exit(2) events. They are
currently skipped as not reliable.
2019-02-12 06:00:05 +00:00
cherry
1d238cc743 Fix typo: Parameters are seperated by ','. 2019-02-12 03:13:50 +00:00
christos
2f90ce174f Instead of queuing to a separate task, handle the fdwatch events inline.
Fixes locking. We could simplify the code a lot more now.
2019-02-12 02:38:55 +00:00
gutteridge
794281688a cvs.1 & cvs.texinfo: add information about the "update" command's "-t"
flag to cvs.texinfo, so the installed man and info documentation match
here. This makes cvs.1 auto-generable from cvs.texinfo again, which I
plan to leverage with further additions later.
2019-02-12 01:32:08 +00:00
martin
ccb99dea3b Fix a few off by one (in both directions) in previous, pointed out by mrg.
Avoid open coding snprintf return value checking and introduce a
helper functions that always ensures string termination instead,
suggested by christos.
2019-02-11 20:40:18 +00:00
martin
f9df7d7b5c Remove unconditional truncation - it confuses gcc 2019-02-11 20:03:28 +00:00
martin
997731694f Two more gcc 7 warnings when compiling wiht optimization on, one to go. 2019-02-11 19:58:22 +00:00
mrg
e3dd5b9e43 add parens around defines with expressions that could expand poorly
depending on the usage.
2019-02-11 19:45:54 +00:00
martin
a57c274e80 Make sure we properly truncate snprintf() results when the target buffer
is too small, in a way that appeases gcc 7 warnings.
2019-02-11 19:15:38 +00:00
cherry
728ee35f29 Detect and report running in a XEN hvm container.
This allows the lapic code to apply its x2apic probe logic while
running in a XEN hvm container.
2019-02-11 18:50:15 +00:00
tnn
7d56d81472 -Wno-format-truncation is only needed when using GCC 2019-02-11 17:49:37 +00:00
cherry
98728f360d Remove redundant conditional IDT_VEC() entries. 2019-02-11 17:28:52 +00:00
cherry
427af03728 We reorganise definitions for XEN source support as follows:
XEN - common sources required for baseline XEN support.
XENPV - sources required for support of XEN in PV mode.
XENPVHVM - sources required for support for XEN in HVM mode.
XENPVH - sources required for support for XEN in PVH mode.
2019-02-11 14:59:32 +00:00
maxv
1d0688bc8a Fix previous, pr_size includes the KASAN redzone. Repurpose pr_reqsize and
use it for PR_ZERO, it holds the size requested by the user with no padding
or redzone added, and only these bytes should be zeroed.
2019-02-11 11:12:58 +00:00
macallan
93b767f377 retry timed out IPIs, complain and dump timing info into dmesg
ok martin@
2019-02-11 07:51:46 +00:00
maxv
18110ad999 Increase the max guest ram from 4GB to 128GB. 2019-02-11 07:07:37 +00:00
kamil
2d4745f8b2 Rename the siginfo4 test in ATF t_ptrace_wait*
The siginfo group of ptrace(2) tests has been replaced with new individual
tests or merged into existing ones. This is the last siginfo* test that
has been renamed.

New name: traceme_exec.
2019-02-11 05:59:00 +00:00
kamil
32c33d29c1 Merge siginfo6 into other PT_STEP tests in t_ptrace_wait* 2019-02-11 05:51:20 +00:00
kamil
bfae04bf15 Drop siginfo5 from ATF tests in t_ptrace_wait*
siginfo5 duplicates older tests verifying PTRACE_FORK.
2019-02-11 04:20:06 +00:00