Commit Graph

246824 Commits

Author SHA1 Message Date
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
pgoyette
9bdd3a3978 Update for the new "universal" spkr module.
Note that entries in the md.i386 and md.amd64 lists are actually deleted
(rather than being marked "obsolete" as directed in the comments).  This
is OK, since there is now a new module in the mi list to replace them.
2016-12-15 06:50:37 +00:00
pgoyette
3d9d9fc2de Create a single combined module for spkr_pcppi and spkr_audio, and
build it for all architectures.

By doing this, we can handle pcppi, audio, or both attachments with
non-built-in modules.

XXX Still to do: the module currently cannot be unloaded, and the
XXX spkr device(s) currently cannot be detached.  (Really, two
XXX sides of the same problem.)
2016-12-15 06:48:14 +00:00
nonaka
a69e0947f2 handle proxy authentication correctly. 2016-12-15 04:49:15 +00:00
christos
5f025a3088 delete spkr_synth 2016-12-15 04:38:04 +00:00
christos
e4bd8c59b9 delete spkr_synth module 2016-12-15 04:37:00 +00:00
christos
8dfcaa17b1 name attachment after parent per existing convention. 2016-12-15 04:36:07 +00:00
ozaki-r
fffe3b671b Add SCTP to ALL configs to keep it buildable anyway 2016-12-15 04:01:09 +00:00
ozaki-r
e8a9852807 Restore nd6.h inclusion to resolve implicit dependency 2016-12-15 03:54:15 +00:00
pgoyette
d442c42849 Note desire to have a way to selectively build modules (and include them
from the modules/mi sets-list) based on "attributes" rather than having
to enumerate individual architectures on which to build and include.
2016-12-15 03:24:43 +00:00
ozaki-r
d4c2ba5a74 Fix that cleanup doesn't run when DEBUG=false 2016-12-15 02:43:56 +00:00
christos
7ce3281839 print more info during autoconfig 2016-12-14 22:30:42 +00:00
christos
dc64f7ed79 Tidy up and make it look like the other drivers. 2016-12-14 22:21:13 +00:00
christos
f3ef98b2ea correct spkr softc. 2016-12-14 21:52:43 +00:00
skrll
2e2322c9c0 Remove binutils.old as everything has switched. 2016-12-14 21:47:50 +00:00
rjs
e2a8f3aa96 The t_clock_subr test doesn't require rump. 2016-12-14 19:29:31 +00:00
mrg
4141b17a9c remove local lwp_eprio() definition that broke the clang build. 2016-12-14 18:50:56 +00:00
scole
975ce79004 Make ia64 considered 64bit for the _XSERVER64 define so a release with x11 will at least build. 2016-12-14 16:03:19 +00:00
hannken
4349535165 Change the freelists to lrulists, all vnodes are always on one
of the lists.  Speeds up namei on cached vnodes by ~3 percent.

Merge "vrele_thread" into "vdrain_thread" so we have one thread
working on the lrulists.  Adapt vfs_drainvnodes() to always wait
for a complete cycle of vdrain_thread().
2016-12-14 15:49:35 +00:00
hannken
70ec436e39 Move vnode members "v_freelisthd" and "v_freelist" from "struct vnode"
to "struct vnode_impl" and rename to "vi_lrulisthd" and "vi_lrulist".

No functional change intended.

Welcome to 7.99.48
2016-12-14 15:48:54 +00:00
hannken
13fa9cae25 Remove the "target" argment from vfs_drainvnodes() as it is
always equal to "desiredvnodes" and move its definition
from sys/vnode.h to sys/vnode_impl.h.

Extend vfs_drainvnodes() to also wait for deferred vrele to flush
and replace the call to vrele_flush() with a call to vfs_drainvnodes().
2016-12-14 15:46:57 +00:00
abhinav
27174a0ec3 Add a HISTORY section
Move information about exit status to EXIT STATUS section
Add more xrefs

ok wiz@
2016-12-14 15:24:06 +00:00
skrll
599ac212b8 Don't hold softc lock when calling ucom_read
PR/51714: uftdi (on xhci): mutex_vector_enter: locking against myself
2016-12-14 15:11:29 +00:00
martin
01866d4fd0 Comment out spkr at audio, as audio is commented out too 2016-12-14 14:01:10 +00:00
martin
dea2b45782 Comment out spkr at pcppi, as pcppi is commented out too. 2016-12-14 14:00:16 +00:00
kre
820e69dcc0 Simplify (and no need for sub-shells).
Same functionality, same method, simpler exposition.
2016-12-14 13:04:42 +00:00
kre
6fb7898b88 Sort the unsorted sets lists (they should all be correctly sorted now.) 2016-12-14 12:59:51 +00:00
knakahara
237f476937 fix race of gif_softc->gif_ro when we send multiple flows over gif on NET_MPSAFE enabled kernel.
make gif_softc->gif_ro percpu as well as ipforward_rt to resolve this race.
and add future TODO comment for etherip(4).
2016-12-14 11:19:15 +00:00
msaitoh
253a3c48a5 Fix ip[46]csum-tx doesn't work other than TCP and UDP. 2016-12-14 10:46:12 +00:00
ozaki-r
df9d638687 Add tests for flushing prefix and default router entries 2016-12-14 07:37:26 +00:00
ozaki-r
8e7c1da780 Reduce return points
No functional change intended.
2016-12-14 06:33:01 +00:00
kamil
6d08a581a0 Update TODO.ptrace
Add new entries:
 - add support for PT_STEP, PT_GETREGS, PT_SETREGS, PT_GETFPREGS,
   PT_SETFPREGS in all ports
 - integrate all ptrace(2) features in gdb
 - add ptrace(2) NetBSD support in LLDB

Sponsored by <The NetBSD Foundation>
2016-12-14 06:26:04 +00:00
kamil
15bac0f54a Define -D_KERNTYPES in CPPFLAGS unconditionally to fix MKRUMP=no build
Reported by Robert Swindells

Sponsored by <The NetBSD Foundation>
2016-12-14 06:19:59 +00:00
ozaki-r
0195cee9ea Use macro to iterate on the nd_prefix list 2016-12-14 04:13:50 +00:00