Commit Graph

2865 Commits

Author SHA1 Message Date
ozaki-r 6dc1297521 Support tun devices on rump kernels 2016-09-05 02:25:37 +00:00
christos b77232e0ab need kern_ssp.c for a full SSP build. 2016-08-20 15:50:50 +00:00
hannken 7139aab724 Remove now obsolete operation vcache_remove().
Welcome to 7.99.36
2016-08-20 12:37:06 +00:00
christos ccab2709d8 Don't call loopinit() here. Instead panic if -lrumpnet_net has not been
called to initialize lo0ifp.
2016-08-13 11:19:35 +00:00
martin c4786f8220 Add new file to fix the build. 2016-08-12 20:25:34 +00:00
christos a626a5b30a more loopinit(); 2016-08-12 11:43:04 +00:00
kre d6b671c40b On the first day (that being the eighth day of the eighth month,) the
building was completed only to discover that within there lay havoc.

On the second day all just groaned and moaned, and it must be someone
else's problen.

On the third day, St. Martin stepped in and traced the culprit, which
provided inspiration, and a correction was made.

Forevermore all were agog at just how such a trivial thing could do
so much damage...


OK...   to be a little less vague.   The loopback interface is a truly
"special" thing, and rump knew that - and treated it very specially.
Unfortunately, when the loopback interface is changed, and rump does
not keep up, bad things happen.

This (overall) might, or might not, be the correct fix - but for now
it appears to work.   If someone, sometime, finds a better way to
deal with the issues of the loopback interfaces true majesty, feel
free to revert this and do it another way.
2016-08-10 10:09:42 +00:00
pgoyette 94fcffa368 Part 2 of fixing if_tap module. 2016-08-08 09:29:45 +00:00
christos d3580c2894 finish ifmpls->mpls renaming. 2016-08-07 17:42:18 +00:00
pgoyette 2dc75bdc9e Fix variable names in previous 2016-07-30 23:07:23 +00:00
pgoyette 763a6486bb More adaptation of the rump component init, to avoid EEXIST during
regular module initialization.
2016-07-30 22:36:14 +00:00
pgoyette 7ea3f07f30 When calling devsw_attach() we need to use the expected/official driver
name (as listed in the devsw_conv[] table) to get the expected device
majors.  Once rump initialization is finished (ie, it has created its
required device nodes), we need to detach the [bc]devsw so the module
initialization code doesn't get EEXIST.
2016-07-26 01:49:48 +00:00
pgoyette 9e4ecfb022 When initializing the rump cgd component, use the correct driver name
(as found in the devsw_conv[] table).  This will get us the "official"
major numbers for the cgd device.

After creating the rump file-space nodes for /dev/cgd* we then need to
detach the [bc]devsw's because normal module initialization will do its
own attachment, and we don't want that to fail.

While here, since we're doing the devsw_attach() twice, share the
results from the first call rather than starting from scratch.
2016-07-25 12:45:13 +00:00
christos 986517611c add uvm_km_protect() 2016-07-20 17:03:50 +00:00
pgoyette 7c20c5d3bb Fix regression introduced in tests/net/bpf and tests/net/bpfilter
The rump code needs to call devsw_attach() in order to assign a dev_major
for bpf;  it then uses this to create rumps /dev/bpf node.  Unfortunately,
this leaves the devsw attached, so when the bpf module tries to initialize
itself, it gets an EEXIST error and fails.

So, once rump has figured what the dev_major should be, call devsw_detach()
to remove the devsw.  Then, when the module initialization code calls
devsw_attach() it will succeed.
2016-07-19 02:47:45 +00:00
matt 8a31a6e7a0 Pass down ${CPUFLAGS} 2016-07-09 05:52:22 +00:00
msaitoh 8bc54e5be6 KNF. Remove extra spaces. No functional change. 2016-07-07 06:55:38 +00:00
christos 65120c51fa regen 2016-07-03 14:26:47 +00:00
christos 26488304cc Add new files 2016-06-24 21:31:30 +00:00
ozaki-r e1135cd9b9 Use curlwp_bind and curlwp_bindx instead of open-coding LP_BOUND 2016-06-16 02:38:40 +00:00
ozaki-r d938d837b3 Introduce m_set_rcvif and m_reset_rcvif
The API is used to set (or reset) a received interface of a mbuf.
They are counterpart of m_get_rcvif, which will come in another
commit, hide internal of rcvif operation, and reduce the diff of
the upcoming change.

No functional change.
2016-06-10 13:27:10 +00:00
joerg 56a6d73206 Install new header and fix rump to include the corresponding source as
well.
2016-06-03 21:55:50 +00:00
pooka f3167874d4 Disable PR kern/51135 hack now that the problem is supposedly
fixed (to see if tests pass).
2016-05-30 14:52:06 +00:00
christos 19ea743456 Introduce security.pax.mprotect.ptrace sysctl which can be used to bypass
mprotect settings so that debuggers can write to the text segment of traced
processes so that they can insert breakpoints. Turned off by default.
Ok: chuq (for now)
2016-05-25 17:43:58 +00:00
riastradh 2b38f13330 Actually get as many bytes as requested from rumpuser_random.
rumpuser_random is limited to 32 bytes at a time -- which would be
reasonable, except that there are too many buffers in the way between
entropy sources and users of the entropy pool.

Partial fix for PR kern/51135.
2016-05-21 14:59:45 +00:00
pooka 3bc931a0af Add workaround for PR kern/51135
If the rnd component is present, load extra initial entropy to avoid
/dev/random not being able to request it on demand.  The extra initial
entropy will allow a few instances of /dev/random, but will eventually
go into the failure mode described in the PR.
2016-05-16 16:31:07 +00:00
ozaki-r 040205ae93 Protect ifnet list with psz and psref
The change ensures that ifnet objects in the ifnet list aren't freed during
list iterations by using pserialize(9) and psref(9).

Note that the change adds a pslist(9) for ifnet but doesn't remove the
original ifnet list (ifnet_list) to avoid breaking kvm(3) users. We
shouldn't use the original list in the kernel anymore.
2016-05-12 02:24:16 +00:00
pooka c8a34480e3 Avoid '.' in variable names which are expected to be passed to
this Makefile via the env.

That character is strictly speaking not allowed by POSIX in an exported
variable name, and at least dash >= 0.58 refuses to export such variables.

Furthermore, since the individual CFLAGS/CPPFLAGS/etc. variables
are not comprehensive enough for all cases (e.g. HURD), just
support the .includable version from now on, i.e.
RUMPCOMP_MAKEFILEINC_rumpdev_pci.

curious failure mode debugged by Martin Lucina
2016-05-10 19:38:29 +00:00
pooka 7ddba29e76 regen syscall files 2016-05-06 10:19:40 +00:00
martin 4b3cc0cbac Add lwp_find() - verbatim copy from the hard kernel. 2016-04-24 07:45:10 +00:00
christos ef9bd43259 regen 2016-04-23 23:09:27 +00:00
skrll 4e8e66439e Merge nick-nhusb
- API / infrastructure changes to support memory management changes.
- Memory management improvements and bug fixes.
- HCDs should now be MP safe
- conversion to KERNHIST based debug
- FS/LS isoc support on ehci(4).
- conversion to kmem(9)
- Some USB 3 support - mostly from Takahiro HAYASHI (t-hash).
- interrupt transfers now get proper DMA operations
- general bug fixes
    - kern/48308
    - uhub status notification improvements
    - umass(4) probe fix (applied to HEAD already)
    - ohci(4) short transfer fix
2016-04-23 10:15:27 +00:00
ozaki-r 220ff4e7a0 Prevent LWP migrations between CPUs during upper layer processing
This is a contract of psref(9) that is used by upper layer componenets,
e.g., bridge(4).
2016-04-19 05:48:10 +00:00
ozaki-r 4da47673a2 Rump-ify if_pppoe
From s-yamaguchi@IIJ
2016-04-15 01:35:25 +00:00
martin 8dca0c72be Add a dummy splraiseipl() 2016-04-11 10:53:06 +00:00
ozaki-r 322b6a238d Sweep unncessary radix.h inclusions 2016-04-11 08:56:16 +00:00
ozaki-r 6a82a3a147 Add psref to rump kernel 2016-04-11 06:49:11 +00:00
christos 4fbdf206cb Split p_xstat (composite wait(2) status code, or signal number depending
on context) into:
1. p_xexit:		exit code
2. p_xsig:		signal number
3. p_sflag & WCOREFLAG	bit to indicated that the process core-dumped.

Fix the documentation of the flag bits in <sys/proc.h>
2016-04-04 20:47:57 +00:00
christos cfc738154f regen 2016-04-03 01:22:39 +00:00
christos 2a60134171 regen 2016-04-03 01:01:46 +00:00
christos 3d596ad050 regen 2016-04-02 21:02:39 +00:00
christos 3b88282d06 elide vax compiler bug. 2016-03-23 21:38:51 +00:00
joerg 9adca58c0e Align the message buffer. The kernel routines normally are used only
with page aligned buffers and they assume at least pointer alignment. Be
defensive here and align to 256 Bytes.
2016-03-08 14:30:48 +00:00
christos 3eda01ea39 Avoid void * arithmetic 2016-03-07 00:51:32 +00:00
christos 8e7e68da22 PR/50900: David Binderman: optimize memset 2016-03-06 19:47:41 +00:00
pooka 2657abc4e0 add cpu_lock
from freqlabs on irc
2016-02-19 18:38:37 +00:00
riastradh d80621961e Need <sys/mutex.h> for mutex(9). 2016-02-17 01:48:36 +00:00
riastradh 9e2ce23efb Caller must have exclusive access to rndsource for rnd_add_data(_sync). 2016-02-17 01:48:04 +00:00
riastradh e3389acee7 Make hyperentropy rndsource work synchronously, again.
This time for real!  *crosses fingers*
2016-02-17 01:42:25 +00:00
ozaki-r 9c4cd06355 Introduce softint-based if_input
This change intends to run the whole network stack in softint context
(or normal LWP), not hardware interrupt context. Note that the work is
still incomplete by this change; to that end, we also have to softint-ify
if_link_state_change (and bpf) which can still run in hardware interrupt.

This change softint-ifies at ifp->if_input that is called from
each device driver (and ieee80211_input) to ensure Layer 2 runs
in softint (e.g., ether_input and bridge_input). To this end,
we provide a framework (called percpuq) that utlizes softint(9)
and percpu ifqueues. With this patch, rxintr of most drivers just
queues received packets and schedules a softint, and the softint
dequeues packets and does rest packet processing.

To minimize changes to each driver, percpuq is allocated in struct
ifnet for now and that is initialized by default (in if_attach).
We probably have to move percpuq to softc of each driver, but it's
future work. At this point, only wm(4) has percpuq in its softc
as a reference implementation.

Additional information including performance numbers can be found
in the thread at tech-kern@ and tech-net@:
http://mail-index.netbsd.org/tech-kern/2016/01/14/msg019997.html

Acknowledgment: riastradh@ greatly helped this work.
Thank you very much!
2016-02-09 08:32:07 +00:00