Commit Graph

249798 Commits

Author SHA1 Message Date
scole 1fd0fe6394 Add VM_INIT_KERNEL_ADDRESS from FreeBSD 2017-04-08 18:05:36 +00:00
scole 7cdd8b15ea Make restorectx() and swapctx() match original FreeBSD defs 2017-04-08 18:04:34 +00:00
scole 69d058909c Add more defs from FreeBSD 2017-04-08 18:03:33 +00:00
scole 3901a7fba0 Add more funcs from FreeBSD 2017-04-08 18:02:55 +00:00
scole 08d04d9cf5 Add ia64_handle_intr() declaration 2017-04-08 18:02:21 +00:00
scole 2496faee14 Add ci_vhpt to cpu_info 2017-04-08 18:01:22 +00:00
scole 770c8de0c1 Add include and panic in startlwp() 2017-04-08 17:47:14 +00:00
scole 07e29ac680 Add vmparam.h include 2017-04-08 17:46:30 +00:00
scole da4bb471a7 Add more from FreeBSD 2017-04-08 17:46:01 +00:00
scole 3e92b4dd37 Add kstack_top variable 2017-04-08 17:45:22 +00:00
scole 129bb721c8 Add ia64_handle_intr() stub 2017-04-08 17:44:27 +00:00
scole 386cb0812b Add more PTE and IA64 mem region variables 2017-04-08 17:43:41 +00:00
scole a4a9beb008 Updates from FreeBSD, mostly compile-tested 2017-04-08 17:42:47 +00:00
scole b727c8a444 Add more cpus to identify, from FreeBSD 2017-04-08 17:40:50 +00:00
scole 4fc4ed6792 Convert cpu_switchto() from assembly to C code. Remove comment about
possible cpu_switchto() bug.  Actual issue appears to be new processes
using lwp0 instead of own memory, which is still not fixed.

Thanks to <chs> for figuring this out.
2017-04-08 17:38:43 +00:00
tsutsui 1e2a3ba78f Remove auto-repeat key functions in WSKBD_RAW mode.
Pulled from OpenBSD:
 http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/arch/hp300/dev/Attic/dnkbd.c#rev1.18
 http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/dev/hil/hilkbd.c#rev1.15
> WSKBD_RAW mode used in X, but X independently implements auto-repeat keys.

Tested with Xorg server on HP425t with topcat.
2017-04-08 17:04:56 +00:00
mlelstv 82069e1058 ignore a failed scspi_prevent when accessing the RAW_PART as before. 2017-04-08 13:50:23 +00:00
hannken 9888a178c6 Update mtime when updating file size.
PR kern/51762 (mtime not updated by open(O_TRUNC))
2017-04-08 08:49:44 +00:00
kamil ccacb9cccf Define PT_SETSTEP and PT_CLEARSTEP for i386 (ptrace(2))
Sponsored by <The NetBSD Foundation>
2017-04-08 02:02:30 +00:00
kamil 6708e51bcd ptrace(2): Add operations to single step specified threads:
PT_SETSTEP and PT_CLEARSTEP

Sponsored by <The NetBSD Foundation>
2017-04-08 01:29:31 +00:00
kamil fbd2c6be23 Update TODO.ptrace
Remove entries:
  - research support PT_SYSCALL & PT_STEP combined like in Linux
  - GDB Remote Protocol expects a case with a step with a signal to be sent,
    this is currently unsupported on NetBSD

Implemented as PT_SETSTEP and PT_CLEARSTEP.

Remove:
  - support QPassSignals (PT_SET_SIGPASS/PT_GET_SIGPASS) in the kernel, a way to
    stop routing a set of signals to tracer as they are uninteresting - GDB and
    LLDB expect this feature

This interface has been abandoned and will be handled on the debugger level.

Sponsored by <The NetBSD Foundation>
2017-04-08 01:08:36 +00:00
kamil 049bc8e25e Fix typo in previous (ptrace(2)) 2017-04-08 00:58:35 +00:00
kamil d50fceb568 Document new calls and be more clear about PT_SYSCALL* in ptrace(2)
Document PT_SETSTEP and PT_CLEARSTEP in ptrace(2).

Try to explain more details of PT_SYSCALL and PT_SYSCALLEMU.

The description of PT_*STEP has been obtained from FreeBSD.

Sponsored by <The NetBSD Foundation>
2017-04-08 00:56:38 +00:00
kamil 05ffc73c35 Add new ptrace(2) API: PT_SETSTEP & PT_CLEARSTEP
These operations allow to mark thread as a single-stepping one.

This allows to i.a.:
 - single step and emit a signal (PT_SETSTEP & PT_CONTINUE)
 - single step and trace syscall entry and exit (PT_SETSTEP & PT_SYSCALL)

The former is useful for debuggers like GDB or LLDB. The latter can be used
to singlestep a usermode kernel. These examples don't limit use-cases of
this interface.

Define PT_*STEP only for platforms defining PT_STEP.

Add new ATF tests setstep[1234].

These ptrace(2) operations first appeared in FreeBSD.

Sponsored by <The NetBSD Foundation>
2017-04-08 00:25:49 +00:00
scole a08680a2e0 Add more options, mainly want "options INET" and "pseudo-device loop" so context bug occurs 2017-04-07 17:07:09 +00:00
knakahara b12a9cd69d the processing said "ghastly hacks" is unnecessary now. 2017-04-07 12:17:57 +00:00
knakahara 7c4d1f974f fix race among crypto_done(), cryptoret(), and {cryptodev_op(), cryptodev_key()}.
crypto_op() waited to be set CRYPTO_F_DONE with crp->crp_cv.
However, there is context switch chances between being set CRYPTO_F_DONE in
crypto_done() and done cv_signal(crp->crp_cv) in cryptodev_cb(), that is,
cryptodev_op() thread can run to cv_destroy(crp->crp_cv) before cryptoret()
thread is waken up. As a result, cryptodev_cb() can call invalid(destroyed)
cv_signal(crp->crp_cv).

Furthermore, below two implementations cause other races.
    - waiting CRYPTO_F_DONE with crp->crp_cv
    - context witch chances between set CRYPTO_F_DONE and cv_signal(crp->crp_cv)

So, use other flag(CRYPTO_F_DQRETQ) for cryptodev_op() and cryptodev_key(),
and then call cv_signal(crp->crp_cv) immediately after set CRYPTO_F_DQRETQ.

Tested concurrent over 20 processes with software and hardware drivers.
2017-04-07 12:15:51 +00:00
pgoyette 158c71ad1f Fix typos and some grammar 2017-04-07 07:21:58 +00:00
ozaki-r 0d787d119d Commit a forgotten change for "Prepare netipsec for rump-ification"
- Allow encapinit to be called twice (by ifinit and ipe4_attach)
  - ifinit didn't call encapinit if IPSEC is enabled (ipe4_attach called
    it instead), however, on a rump kernel ipe4_attach may not be called
    even if IPSEC is enabled. So we need to allow ifinit to call it anyway
2017-04-07 03:31:50 +00:00
kamil 2667b4dcaa Correction in ptrace(2) about operations that emit signals
PT_STEP and PT_DETACH cannot emit signals
PT_CONTINUE and PT_SYSCALL can emit signals

Pointed out by <chs>
2017-04-07 00:56:14 +00:00
macallan 07d3115680 don't forget to store bounds rectangle in raw mode 2017-04-06 20:44:39 +00:00
macallan 61671c0073 add bug workaround for ELAN touchscreens 2017-04-06 20:06:44 +00:00
mbalmer 3f1d0adb2f add Turukhansk airport 2017-04-06 19:53:36 +00:00
macallan bcf2e49f81 regen 2017-04-06 16:30:33 +00:00
macallan e5eb3f396c add ELAN Microelectronics 2017-04-06 16:30:09 +00:00
dholland adf6c8215a Add missing .Sh RETURN VALUES 2017-04-06 15:57:23 +00:00
wiz 03d66370c8 Add evbarm/gxio(4).
Based on PR 52137 by Stephan Meisinger, with some man page improvements
by myself.
2017-04-06 14:35:15 +00:00
christos 8bf0b7f8c5 The last stderr message felt lonely and committed suicide. 2017-04-06 14:01:27 +00:00
christos bcf59e7932 transposition police! 2017-04-06 14:00:34 +00:00
abhinav 1a04cf40b6 Add MLINKS for extent_alloc1(9) and extent_alloc_subregion1(9). 2017-04-06 10:46:52 +00:00
abhinav 282ddd74dd Add extent_alloc1 and extent_alloc_subregion1 to the NAME section. 2017-04-06 10:42:14 +00:00
abhinav 036b240ee3 Use Xr to refer uiomove(9) and kcopy(9)
Add kcopy(9) to SEE ALSO as well
2017-04-06 09:52:32 +00:00
wiz a18f8f5ffd Add missing word. 2017-04-06 09:41:05 +00:00
knakahara c85f49ff91 fix build failure ALL 2017-04-06 09:39:12 +00:00
ozaki-r 80d40a78b4 Prepare netipsec for rump-ification
- Include "opt_*.h" only if _KERNEL_OPT is defined
- Allow encapinit to be called twice (by ifinit and ipe4_attach)
  - ifinit didn't call encapinit if IPSEC is enabled (ipe4_attach called
    it instead), however, on a rump kernel ipe4_attach may not be called
    even if IPSEC is enabled. So we need to allow ifinit to call it anyway
- Setup sysctls in ipsec_attach explicitly instead of using SYSCTL_SETUP
- Call ip6flow_invalidate_all in key_spdadd only if in6_present
  - It's possible that a rump kernel loads the ipsec library but not
    the inet6 library
2017-04-06 09:20:07 +00:00
msaitoh a84408c82d Fix typos:
- s/Readness/Readiness/
- s/Presense/Presence/
- s/supportted/supported/
- s/Rquester/Requester/
- s/Check Enab/Check Enable/
2017-04-06 08:57:01 +00:00
kre b55501d5fa Sort (NFC) 2017-04-06 05:08:17 +00:00
pgoyette 9ea30e2990 Fix typo: s/ubc_range/ubc_zerorange/ 2017-04-06 04:28:57 +00:00
ozaki-r 31d0775c4c Revert "Make sure to hold if_ioctl_lock when calling ifp->if_ioctl"
As per pgoyette@ and riastradh@ requests; we shouldn't decide to
hold a lock based on if the lock is held or not.
2017-04-06 03:54:59 +00:00
maya 35cd97ea2e don't guard lfs_sbactive or lfs_log with splbio, lfs_lock is plenty. 2017-04-06 03:21:01 +00:00