Commit Graph

2943 Commits

Author SHA1 Message Date
ozaki-r
0c084e85e9 Make IPsec SPD MP-safe
We use localcount(9), not psref(9), to make the sptree and secpolicy (SP)
entries MP-safe because SPs need to be referenced over opencrypto
processing that executes a callback in a different context.

SPs on sockets aren't managed by the sptree and can be destroyed in softint.
localcount_drain cannot be used in softint so we delay the destruction of
such SPs to a thread context. To do so, a list to manage such SPs is added
(key_socksplist) and key_timehandler_spd deletes dead SPs in the list.

For more details please read the locking notes in key.c.

Proposed on tech-kern@ and tech-net@
2017-08-02 01:28:02 +00:00
riastradh
39f1e86852 Fail, don't panic, on bad dirents from file system.
Controllable via puffs from userland.

From Ilja Van Sprundel.
2017-07-28 15:34:06 +00:00
ozaki-r
a378f6c75a Add localcount to rump kernels 2017-07-25 05:01:25 +00:00
hannken
31624a0218 Regen. 2017-07-12 09:31:59 +00:00
knakahara
e3753d8251 reduce rump waring message. pointed out by ozaki-r@n.o, thanks. 2017-06-29 08:51:27 +00:00
christos
d24826313c should be umodeswitch! 2017-06-22 02:07:26 +00:00
abhinav
2be9ef82e5 Fix typo: s/analoguous/analogous/ 2017-06-04 08:53:38 +00:00
hannken
287643b0da Operations fstrans_start() and fstrans_start_nowait() now always
use FSTRANS_SHARED as lock type so remove the lock type argument.

File system state FSTRANS_SUSPENDING is now unused so remove it.

Regen vnode_if files.

Ride 8.99.1 less than a hour ago.
2017-06-04 08:05:41 +00:00
hannken
48c67e7912 Regen. 2017-06-04 08:00:27 +00:00
pgoyette
ab66491cc5 Add infrastructure for modularization of audio, midi, and sequencer 2017-06-01 09:44:30 +00:00
hannken
1ed4b9f274 Suspend file system for vgone(). 2017-05-28 16:37:16 +00:00
bouyer
6e4cb2b9ab merge the bouyer-socketcan branch to HEAD.
CAN stands for Controller Area Network, a broadcast network used
in automation and automotive fields. For example, the NMEA2000 standard
developped for marine devices uses a CAN network as the link layer.

This is an implementation of the linux socketcan API:
https://www.kernel.org/doc/Documentation/networking/can.txt
you can also see can(4).

This adds a new socket family (AF_CAN) and protocol (PF_CAN),
as well as the canconfig(8) utility, used to set timing parameter of
CAN hardware. Also inclued is a driver for the CAN controller
found in the allwinner A20 SoC (I tested it with an Olimex lime2 board,
connected with PIC18-based CAN devices).

There is also the canloop(4) pseudo-device, which allows to use
the socketcan API without CAN hardware.

At this time the CANFD part of the linux socketcan API is not implemented.
Error frames are not implemented either. But I could get the cansend and
canreceive utilities from the canutils package to build and run with minimal
changes. tcpudmp(8) can also be used to record frames, which can be
decoded with etherreal.
2017-05-27 21:02:54 +00:00
riastradh
f4ad397b3e regen 2017-05-26 14:21:54 +00:00
riastradh
7f7aad09bd Make VOP_RECLAIM do the last unlock of the vnode.
VOP_RECLAIM naturally has exclusive access to the vnode, so having it
locked on entry is not strictly necessary -- but it means if there
are any final operations that must be done on the vnode, such as
ffs_update, requiring exclusive access to it, we can now kassert that
the vnode is locked in those operations.

We can't just have the caller release the last lock because some file
systems don't use genfs_lock, and require the vnode to remain valid
for VOP_UNLOCK to work, notably unionfs.
2017-05-26 14:20:59 +00:00
nat
cf7d446fc1 Add uvm_map_pageable dummy function. This means that the audio tests
should run again.

Ok christos@.
2017-05-14 13:49:55 +00:00
christos
5646f065d1 ... but define RUMP_REGISTER_T if not defined. 2017-05-11 18:16:00 +00:00
christos
8f1d39df7e Use the same exposure rules for register_t as <machine/types.h> does.
Eventually we could remove -D_KERNTYPES from all the rump libraries...
2017-05-11 18:08:10 +00:00
sevan
a3692735fe Match the ioconf name in sys/modules.
Resolves rumprun build process.
Put together with the help & direction of riastradh & paulg.
2017-05-10 06:22:15 +00:00
riastradh
9c32900485 regen 2017-05-10 06:19:47 +00:00
martin
033147ebac Provide stupid uvm_map() and uvm_unmap1() immplementations - might be enough
to get audio tests in rump going again.
XXX needs a RUMP chef to review/replace by something sane!
2017-05-07 14:20:50 +00:00
martin
6e53169a58 Add a dummy (non-working) uvm_map().
XXX someone with a clue please fix this for real!
2017-05-07 11:48:39 +00:00
pgoyette
48e395b1b8 Introduce mutex_ownable() to determine if it is possible for the current
process to acquire a mutex.
2017-05-01 21:35:25 +00:00
riastradh
8e5c8dbff1 regen 2017-04-26 03:04:24 +00:00
riastradh
6fa7b15833 Change VOP_REMOVE and VOP_RMDIR to preserve lock/ref on dvp.
No change to vp -- the plan is to replace the node by the
componentname in the vop parameters, and let all directory vops do
lookups internally.

Proposed on tech-kern with no objections:
https://mail-index.netbsd.org/tech-kern/2017/04/17/msg021825.html
2017-04-26 03:02:47 +00:00
kamil
7d2cd9b2d1 Fix build of rump after change in lwp_create's signature 2017-04-21 19:16:10 +00:00
christos
d7746f2ee3 - Propagate the signal mask from the ucontext_t to the newly created thread
as specified by _lwp_create(2)
- Reset the signal stack for threads created with _lwp_create(2)
2017-04-21 15:10:34 +00:00
riastradh
c248891802 Modularize ualea(4).
Unclear why we have a separate xyz.ioconf for module and XYZ.ioconf
for rump component, but at least xyz_modcmd obviates the need for
xyz_component.c (though evidently the latter could have been replaced
anyway by RUMP_COMPONENT=ioconf in the rump component Makefile).
2017-04-19 00:01:38 +00:00
riastradh
f7eaf9902f Make comment match. 2017-04-18 19:41:27 +00:00
riastradh
4299c62826 New rndsource driver for Araneus Alea II TRNG USB devices.
Disabled by default in x86/GENERIC and usbdevices.config pending
review and testing without rump ugenhc in the way, but enabled in
x86/ALL for compile-testing.

(Hi gson!  Finally found a round tuit in my pocket, next to a certain
rectangular one.)
2017-04-17 08:59:37 +00:00
hannken
20bb034f5b Remove unused argument "nextp" from vfs_busy() and vfs_unbusy().
Remove argument "keepref" from vfs_unbusy() and add vfs_ref() where needed.
2017-04-17 08:32:00 +00:00
riastradh
ee1810e5f9 Fix bulk xfer buffer with usedma = false. 2017-04-17 07:13:30 +00:00
riastradh
ebe393339f Fix order of outputs in rumpuser_open call.
Now ugenhc works again after a four-year hiatus...
2017-04-17 05:11:05 +00:00
riastradh
629022bd8f regen to confirm no functional change 2017-04-16 17:18:54 +00:00
riastradh
d08e9ec7c8 regen 2017-04-16 16:49:25 +00:00
riastradh
5a3d793f2a regen to confirm no functional change 2017-04-15 23:21:46 +00:00
ozaki-r
469c0f099a Rumpify netipsec
Note that we should modularize netipsec and reduce reverse symbol references
(referencing symbols of netipsec from net, netinet and netinet6) though,
the task needs lots of code changes. Prior to doing so, rumpifying it and
having ATF tests should be useful.
2017-04-14 02:43:27 +00:00
riastradh
b7fb52a55b regen to confirm no functional change 2017-04-11 14:30:33 +00:00
riastradh
2b4f5f70bd regen 2017-04-11 14:26:13 +00:00
riastradh
87fb32292e Make VOP_INACTIVE preserve vnode lock on return.
Discussed on tech-kern:
https://mail-index.netbsd.org/tech-kern/2017/04/01/msg021751.html

Ride 7.99.68, a bumpy bus of incremental vfs improvements!
2017-04-11 14:24:59 +00:00
christos
1f1b1925f3 adjust flag. 2017-04-08 23:46:39 +00:00
riastradh
30509f8074 KASSERT(mutex_owned(vp->v_interlock)) in vnode iterator selector. 2017-04-01 19:35:56 +00:00
riastradh
beaabe9bc1 regen 2017-03-21 10:20:38 +00:00
riastradh
626cf737cf regen 2017-03-19 10:21:25 +00:00
riastradh
ba3149fefc regen 2017-03-18 21:04:24 +00:00
riastradh
2fba6ececb regen 2017-03-18 19:43:46 +00:00
ozaki-r
0eaf4e5356 Use if_acquire and if_release instead of using psref API directly
- Provide if_release for consistency to if_acquire
- Use if_acquire and if_release for ifp iterations
- Make ifnet_psref_class static
2017-03-14 09:03:08 +00:00
hannken
90ead62d2f Change the protocol to update a mounted file system from read-write
to read-only and vice versa:

- Add an internal flag IMNT_WANTRDONLY.
- Set either IMNT_WANTRDWR or IMNT_WANTRDONLY if going from or to read-only.
- After successfull call to VFS_MOUNT() set or clear MNT_RDONLY.

Adapt tmpfs and rumpfs to the new protocol.  Other file systems will be
updated when they get the IMNT_CAN_RWTORO property.

Welcome to 7.99.64
2017-03-01 10:44:47 +00:00
maya
b0f6bc04c6 GC some GCC 4.8 specific sh3 HACKS entries.
These existed to avoid compile errors, and haven't been effect
since gcc.old was removed.
2017-02-22 12:17:16 +00:00
hannken
8a83906a50 Add weak aliases for _fstrans_start() and fstrans_done(). 2017-02-22 11:20:59 +00:00
hannken
8c2ff4e99d Regen. 2017-02-22 09:47:18 +00:00