Commit Graph

246857 Commits

Author SHA1 Message Date
maxv
a3fb0247bf This can actually be enabled in Xen; my rev1.235 fixed the issue. Before
that kern_end was pointing to DUMMY PAGE, which was already kentered
earlier in xen_locore, causing pmap to panic.

This change adds support for kernel modules in Xen.
2016-12-16 20:16:50 +00:00
christos
83d1497cf4 hide functions from userland. 2016-12-16 20:12:11 +00:00
christos
fb7054ae79 Can't hide stuff from userland, because struct route is embedded in other
structures (like inpcb) and things like fstat stop working.
2016-12-16 20:11:52 +00:00
maxv
8a3e058bbd The way the xen dummy page is taken care of makes absolutely no sense at
all, with magic offsets here and there in different layers of the system.
It is just blind luck that everything has always worked as expected so
far.

Due to this wrong design we have a problem now: we allocate one physical
page for lapic, and it happens to overlap with the dummy page, which
causes the system to crash.

Fix this by keeping the dummy va directly in a variable instead of magic
offsets. The asm locore now increments the first pa to hide the dummy page
to machdep and pmap.
2016-12-16 19:52:22 +00:00
abhinav
e5909f155b Fix sentence. 2016-12-16 17:20:52 +00:00
christos
d5a529f19c On failed attach hw_if is NULL, so guard against it in more places. Should
avoid crashes people have been seeing recently.
2016-12-16 16:03:28 +00:00
mlelstv
203fa789e4 Make dk(4) device mpsafe. 2016-12-16 15:06:39 +00:00
mlelstv
37f6f2e866 Add locking for periph_active and flags. The operations aren't atomic. 2016-12-16 15:00:52 +00:00
mlelstv
f572c6cbcd add comment about "missing" dk_start. 2016-12-16 14:58:53 +00:00
maya
947ba5cabb Don't block suspend when uslsa(4) is attached - it works fine. 2016-12-16 14:56:34 +00:00
nonaka
416aac6b10 hdaudio(4): Use pci_intr_alloc(9)/pci_intr_release(9). 2016-12-16 11:34:52 +00:00
ozaki-r
11a1604c2d Add tests for multiple routers 2016-12-16 09:11:18 +00:00
ozaki-r
2e89e8b1dc Unify common routines 2016-12-16 09:10:37 +00:00
ozaki-r
237c29ba3d Avoid using /var/run/rump.rtadvd.pid 2016-12-16 09:10:08 +00:00
ozaki-r
0739b470cb Support -p <pidfile> option
It's needed to avoid using /var/run/rtadvd.pid on ATF tests and
run multiple instances of rump.rtadvd on a test.
2016-12-16 09:09:38 +00:00
knakahara
7ae52b382e fix unlock and splx inversion. Currently, this doesn't cause problem because either one is used. 2016-12-16 08:47:36 +00:00
msaitoh
956e905946 Add missing IFM_FDX. 2016-12-16 08:41:01 +00:00
msaitoh
e9b57edb75 Remove extra newline in debug printfs. ixgbe's *DEBUGOUT* macros automatically
add newline.
2016-12-16 08:30:20 +00:00
msaitoh
048b1c4c30 The rx_bytes event counter is cleared when if_init() is called, but not for
rx_packets. It's inconsistent. It makes rx_packets is bigger than rx_bytes.
IMHO, it's not required to clear them. At least the above comment says
"/* Setup our descriptor indices */". It's not descriptor indice...
2016-12-16 08:24:40 +00:00
rin
010df59ee4 Remove needless goto's. No functional changes. 2016-12-16 06:29:11 +00:00
mrg
f1582e88f7 scandir/alphasort take "const struct dirent **" not "const void *" in
modern unix.  since we claim to be 'IEEE Std 1003.1-2008', make it so.
2016-12-16 04:45:04 +00:00
rin
fcf5a6f169 Fix typo: s/IPKBD/IPKDB/ 2016-12-16 04:27:03 +00:00
rin
d0e34aac46 Fix comments. No functional changes. 2016-12-16 03:59:31 +00:00
ozaki-r
6e275c7668 Add a test case that deletes auto-configured addresses 2016-12-16 03:49:45 +00:00
ozaki-r
da9347803d Improve stability of the tests
- Do ifconfig -w 10 after ifconfig up
- Accept /1d0h0m..s/ in addition to /23h59m..s/ for expiration time
- Prevent new RA messages from coming after flushing entries

The changes should fix flapping of test results on babylon5.
2016-12-16 03:14:23 +00:00
macallan
b882777327 add bit definitions for dither and alpha blending registers 2016-12-16 01:42:04 +00:00
pgoyette
e8e42c0c8c In the n == VAUDIOCHANS case we need to call mutex_exit() before
returning.


Perhaps this will address PR kern/51721
2016-12-15 22:01:57 +00:00
martin
eb1e8b09fb Simplify #ifdefs so this compiles on architectures that do not support
watchpoints.
2016-12-15 20:04:36 +00:00
maya
742267c4a8 allow suspend with uftdi(4). it works fine. 2016-12-15 17:21:21 +00:00
kamil
1779f12820 ptrace(2): Document PT_GETVECREGS and PT_SETVECREGS (ppc ports specific)
Sponsored by <The NetBSD Foundation>
2016-12-15 15:03:17 +00:00
kamil
3c3d6699d5 ptrace(2): Document PT_GETXMMREGS and PT_SETXMMREGS (i386 port specific)
Sponsored by <The NetBSD Foundation>
2016-12-15 14:49:46 +00:00
kamil
091cebb2c4 ptrace(2): Remove dead text, some of it commented in this file for years
For example PT_READ_U/PT_WRITE_U has been removed by <mycroft> in 19950126.

Sponsored by <The NetBSD Foundation>
2016-12-15 13:06:08 +00:00
kre
8064c2168f More sets list sorting (maybe this time they're really all done) 2016-12-15 12:56:52 +00:00
kamil
b9459e4132 ptrace(2): Add hardware assisted breakpoint/watchpoint API:
PT_READ_WATCHPOINT, PT_WRITE_WATCHPOINT and PT_COUNT_WATCHPOINTS
2016-12-15 12:51:02 +00:00
kamil
41a57597c7 Update TODO.ptrace with recent changes
Hardware assisted breakpoint/watchpoint API has been merged with current.

Add note about pthread_dbg(3) API needed to be refactored and limited to
querying POSIX thread private data fields.

Sponsored by <The NetBSD Foundation>
2016-12-15 12:42:38 +00:00
kamil
4eb0cc81cf Welcome to NetBSD 7.99.50!
New ptrace(2) calls for hardware assisted watchpoints/breakpoints:
 - PT_COUNT_WATCHPOINTS,
 - PT_READ_WATCHPOINT,
 - PT_WRITE_WATCHPOINT.

Sponsored by <The NetBSD Foundation>
2016-12-15 12:20:39 +00:00
kamil
b486a76971 Add ATF tests for hardware assisted watchpoints on amd64
Addedd tests:
 - watchpoint_count
 - watchpoint_read
 - watchpoint_write_unmodified
 - watchpoint_trap_code[0123]
 - watchpoint_trap_data_write[0123]
 - watchpoint_trap_data_rw[0123]

These code will be reused later for i386 and moved to a common place like
tests/kernel/arch/x86.

These tests are x86 specific only. The same API but different private
ptrace_watchpoint MD part has to be used on other ports.

All tests pass on amd64.

Sponsored by <The NetBSD Foundation>
2016-12-15 12:15:20 +00:00
rin
6407d3776a Fix build without DDB. 2016-12-15 12:10:01 +00:00
kamil
241cf91ddc Add support for hardware assisted watchpoints/breakpoints API in ptrace(2)
Add new ptrace(2) calls:
 - PT_COUNT_WATCHPOINTS - count the number of available hardware watchpoints
 - PT_READ_WATCHPOINT   - read struct ptrace_watchpoint from the kernel state
 - PT_WRITE_WATCHPOINT  - write new struct ptrace_watchpoint state, this
                          includes enabling and disabling watchpoints

The ptrace_watchpoint structure contains MI and MD parts:

typedef struct ptrace_watchpoint {
	int		pw_index;	/* HW Watchpoint ID (count from 0) */
	lwpid_t		pw_lwpid;	/* LWP described */
	struct mdpw	pw_md;		/* MD fields */
} ptrace_watchpoint_t;

For example amd64 defines MD as follows:
struct mdpw {
	void	*md_address;
	int	 md_condition;
	int	 md_length;
};

These calls are protected with the __HAVE_PTRACE_WATCHPOINTS guard.

Tested on amd64, initial support added for i386 and XEN.

Sponsored by <The NetBSD Foundation>
2016-12-15 12:04:17 +00:00
rin
0e2afb8c30 Fix build without DDB. 2016-12-15 11:32:03 +00:00
rin
e31b62ddaa Skip the initial GP load in function prologue when inserting a breakpoint.
GNU ld for alpha is so clever that the redundant GP load in function
entrypoint is skipped. we must therefore skip initial GP loads; otherwise
breakpoints in function entrypoints can also be skipped.

Reported to upstream (Bug 20969):
  https://sourceware.org/bugzilla/show_bug.cgi?id=20969

ok martin
2016-12-15 10:01:16 +00:00
ozaki-r
1d3f36d5fb Bump for move of bpf_mtap and if_ipackets++
Welcome to 7.99.49
2016-12-15 09:39:24 +00:00
ozaki-r
67cd43d434 Annotate bpf_mtap still running in Rx hardware interrupt with "XXX not in softint" 2016-12-15 09:35:24 +00:00
ozaki-r
1f8ca435f2 Move bpf_mtap in Tx hardware intrrupt to if_start
The intention of the change is to prevent bpf_mtap from running in
hardware interrupt context. if_start is a usual place to do bpf_mtap
on Tx.

Proposed on tech-kern and tech-net
2016-12-15 09:33:25 +00:00
ozaki-r
dd8638eea5 Move bpf_mtap and if_ipackets++ on Rx of each driver to percpuq if_input
The benefits of the change are:
- We can reduce codes
- We can provide the same behavior between drivers
  - Where/When if_ipackets is counted up
  - Note that some drivers still update packet statistics in their own
    way (periodical update)
- Moved bpf_mtap run in softint
  - This makes it easy to MP-ify bpf

Proposed on tech-kern and tech-net
2016-12-15 09:28:02 +00:00
mrg
fc59183457 add the xkeyboard-config manual as a .man, so that the normal X processing
of it happens.
2016-12-15 09:17:26 +00:00
kamil
a513f40fac Prepare t_ptrace_wait.h for hardware watchpoints API
Add new symbol ATF_TP_ADD_TC_HAVE_PTRACE_WATCHPOINTS() to be protected with
the __HAVE_PTRACE_WATCHPOINTS guard.


XXX:
    Mark check_happy() with __attribute__((optimize("O0"))).
    Disabled optimization is required to make tests for hardware assisted
    traps in .text functional.

    Tested with GCC 5.4 on NetBSD 7.99.47 amd64

Sponsored by <The NetBSD Foundation>
2016-12-15 08:57:24 +00:00
kamil
1eb14748db Add new entries to TODO.ptrace
- add support for detecting equivalent events to PTRACE_O_TRACEEXEC,
   PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXIT from Linux
 - exect(3) rething or remove -- maybe PT_TRACE_ME + PTRACE_O_TRACEEXEC?

Sponsored by <The NetBSD Foundation>
2016-12-15 07:47:08 +00:00
pgoyette
d2d369e90b Restore the obsolete entries for spkr_synth, and mark the new spkr
module as not-obsolete.
2016-12-15 07:08:27 +00:00
pgoyette
488d6da54c Add the module glue to the common spkr code. 2016-12-15 06:55:55 +00:00