Commit graph

202 commits

Author SHA1 Message Date
Lionel Sambuc
4091fdf5c4 Message type for TTY_FKEY_CONTROL
Change-Id: Ic7a8901089f14f65e840bd88b087b733c3e3bdee
2014-07-28 17:05:51 +02:00
Lionel Sambuc
5277fbe9f6 Message type for SYS_CLEAR
Change-Id: I3d894edcf672d180aee38fd84bd06339bdf7fa9b
2014-07-28 17:05:49 +02:00
Lionel Sambuc
886c867c38 Message type for SYS_EXEC
Change-Id: I349e28b8bb3705386f04e4860cffc6ed74a5532f
2014-07-28 17:05:49 +02:00
Lionel Sambuc
cc0c1fbd75 Message type for SYS_FORK
Change-Id: Ibcf4fdfec51129b2be3d667ec07aea0f42e3fd89
2014-07-28 17:05:49 +02:00
Lionel Sambuc
2027f8bc78 Message type for SYS_{S,G}ETMCONTEXT
Change-Id: I388eee89ba8cc6e6603b3193297b81179c1e6975
2014-07-28 17:05:49 +02:00
Lionel Sambuc
f06c676a47 Message type for SYS_SETGRANT
Change-Id: I542f839d7992d3348fef19c51bfcb58bb408d9f4
2014-07-28 17:05:48 +02:00
Lionel Sambuc
dd2552d6d4 Message type for SYS_PRIVCTL
Change-Id: I5bf4d88ca571f2a701e426aae67c6b04705ce511
2014-07-28 17:05:48 +02:00
Lionel Sambuc
f7c72375ea Message type for SYS_STATECTL
Change-Id: I19443aa018d6c670e2b44f1f98bce2fb297a7f21
2014-07-28 17:05:48 +02:00
Lionel Sambuc
333fd250f5 Message type for SYS_TRACE
Change-Id: Ib579fab949b76797ea7d6cb5ff4ae3d9b32f630c
2014-07-28 17:05:48 +02:00
Lionel Sambuc
c59c5caceb Message type for SYS_SETTIME
Change-Id: I10c2c27c0c9749b49d70735175e530b4341440dc
2014-07-28 17:05:48 +02:00
Lionel Sambuc
9d1ed02a04 Message type for SYS_STIME
Change-Id: Ic4401e736bb66960e2ea4b30f5e1946dd93fd76e
2014-07-28 17:05:48 +02:00
Lionel Sambuc
1ca0b449b2 Message type for SYS_TIMES
Change-Id: Ia408aa7d76c47da9f600a724f82b347ba6ac641b
2014-07-28 17:05:47 +02:00
Lionel Sambuc
dcb7493a05 Message type for SYS_GETINFO and SYS_GETWHOAMI
Change-Id: I9cea3f65b29e30555c8b47865e12c7d19a74a3c3
2014-07-28 17:05:47 +02:00
Lionel Sambuc
f1dff35292 Message type for SYS_VUMAP
Change-Id: I9accdf887c119566429ab0803436b068729bcd85
2014-07-28 17:05:47 +02:00
Lionel Sambuc
dc823abec2 Message type for SYS_UMAP{,_REMOTE}
Change-Id: Id46df10aee6189a0d3673013b498c7cc79edcc7e
2014-07-28 17:05:47 +02:00
Lionel Sambuc
5735105bc8 Message type for SYS_{VIR,PHYS}COPY
Change-Id: I15d1acf9992d1b799f5687adffb186875fcd0c84
2014-07-28 17:05:47 +02:00
Lionel Sambuc
05f155c0a9 Message type for SYS_IOPENABLE
Change-Id: I8b089c30c7f9ae75e404f63495bbb199d583f1cd
2014-07-28 17:05:47 +02:00
Lionel Sambuc
e412a58209 Message type for SYS_ABORT
Change-Id: Ic24a4779cc7955cb94f81fec58a358057ca85cb1
2014-07-28 17:05:46 +02:00
Lionel Sambuc
b3085e334c Message type for SYS_IRQCTL
Change-Id: Idef5a1e49aea3eea690e2a9bf046348766a8b944
2014-07-28 17:05:46 +02:00
Lionel Sambuc
30eae10274 Message type for SYS_SETALARM
Change-Id: I2c2ee24c19085cbd1e7ffba7b2db714b2561ff17
2014-07-28 17:05:46 +02:00
Lionel Sambuc
85e7cb92a9 Message type for SYS_VDEVIO
Change-Id: I62ceb5d487c5acd08cb100f340dd387e733180b4
2014-07-28 17:05:46 +02:00
Lionel Sambuc
a8c16a502a Message type for SYS_SDEVIO
Change-Id: I2d60a2ccad325236998a7f9af9b4e82fe0c8131f
2014-07-28 17:05:46 +02:00
Lionel Sambuc
3ed35f3958 Message type for SYS_MEMSET
Change-Id: Icebd04e0c53d9653301550bb598df8719aa66ada
2014-07-28 17:05:46 +02:00
Lionel Sambuc
ec130c9b4b Message type for {PM,VFS,RS,DS}_GETSYSINFO
Change-Id: I64d89f8a1c4704d0d0f420eb1e434cc96fd6351a
2014-07-28 17:05:45 +02:00
Lionel Sambuc
ff905e5276 Message type for BUSC_PCI_GET_BAR
Change-Id: I5cb21f09a2c80473101f8da3f435e4dcc3b05491
2014-07-28 17:05:43 +02:00
Lionel Sambuc
b562831340 Message type for SCHEDULING_STOP
Change-Id: I372c6b9146b459698a0cead68d7cdd53ea074d77
2014-07-28 17:05:43 +02:00
Lionel Sambuc
9f350d76ef Message type for SCHEDULING_{START,INHERIT}
Change-Id: Iad2b4079f72488ea3c3abef2b4a4fefe26ae9066
2014-07-28 17:05:43 +02:00
Lionel Sambuc
b694a09a53 Message type for SCHEDULING_NO_QUANTUM, SYS_SCHEDULE
Change-Id: Ia0f2689067159b4d821092d4ac60efa75e396f7c
2014-07-28 17:05:42 +02:00
Lionel Sambuc
8ba159d242 Message type for SYS_SCHEDCTL
Change-Id: Iaccbac1ef99124bc494b835e0d0cf999ea2e3f5a
2014-07-28 17:05:42 +02:00
Lionel Sambuc
dbfa59164b Message type for PM_SRV_KILL
Change-Id: I2d74b68db2d006dd375732a7932f20c2cf6a342a
2014-07-28 17:05:42 +02:00
Lionel Sambuc
f88b0001ba libsys/sef.c: cleanup around sef_exit
- use weak_alias for _exit and __exit instead of stub functions
 - remove fallback on PM_EXIT, as sys_exit can't fail, and we busy loop
   afterwards if that fails too. There is no reason that a PM_EXIT would
   work for a driver or server when sys_exit failed anyway.

Change-Id: I0327fb5c6fba25687cc9dc99fbf9c6d4db7d26e8
2014-07-28 17:05:41 +02:00
Lionel Sambuc
e1986cd160 Message type for PM_MCONTEXT
Change-Id: I4ab9fc23ce8d78e03582580feba5ba96541f0f7e
2014-07-28 17:05:37 +02:00
Lionel Sambuc
594521214a Message type for PM_SRV_FORK
Change-Id: I0e112da380805d40901a4041fd82da6e842e1f9b
2014-07-28 17:05:36 +02:00
Lionel Sambuc
de7aa3340b Message type for PM_GETEPINFO
Change-Id: I275f5c50d433fa400c5eddbc85dd3df8eb5dcb90
2014-07-28 17:05:35 +02:00
Lionel Sambuc
a1c31f335c Message type for PM_GETPROCNR
Change-Id: I4fcd682f78255afc1fdc0160fb6f1a3d2fe05d2e
2014-07-28 17:05:34 +02:00
Lionel Sambuc
feb9b541da Message type for VFS_MAPDRIVER
Change-Id: I979a8769b72cd06efbedf0c6735ac3cd0c4dd2e3
2014-07-28 17:05:31 +02:00
Lionel Sambuc
6fb0c605fd Message type for VFS_COPYFD
Change-Id: I7aff1b9551d3a60b2191de1bac3b695ea06b73ce
2014-07-28 17:05:31 +02:00
Lionel Sambuc
8830643ac3 Message type for VFS_CHECKPERMS
Change-Id: Ie97bb7362d108ebba268c719a6614fc2fe1392cf
2014-07-28 17:05:31 +02:00
Ben Gras
3f38115c7b _MINIX_SYSTEM - fixes for in-minix crossbuild
. define _MINIX_SYSTEM for all system code from minix.service.mk
	. hide some system-level declarations and definitions
	  behind _MINIX_SYSTEM to cleanly fix host tool build problems on
	  Minix (such as: NONE being defined and paddr_t being used but not
	  declared)
	. the similar definition _SYSTEM is unsuitable as it changes the
	  values of errno definitions

Change-Id: I407de79e2575115243a074b16e79546a279cfa3e
2014-07-28 17:05:14 +02:00
Ben Gras
565f13088f make vfs & filesystems use failable copying
Change the kernel to add features to vircopy and safecopies so that
transparent copy fixing won't happen to avoid deadlocks, and such copies
fail with EFAULT.

Transparently making copying work from filesystems (as normally done by
the kernel & VM when copying fails because of missing/readonly memory)
is problematic as it can happen that, for file-mapped ranges, that that
same filesystem that is blocked on the copy request is needed to satisfy
the memory range, leading to deadlock. Dito for VFS itself, if done with
a blocking call.

This change makes the copying done from a filesystem fail in such cases
with EFAULT by VFS adding the CPF_TRY flag to the grants. If a FS call
fails with EFAULT, VFS will then request the range to be made available
to VM after the FS is unblocked, allowing it to be used to satisfy the
range if need be in another VFS thread.

Similarly, for datacopies that VFS itself does, it uses the failable
vircopy variant and callers use a wrapper that talk to VM if necessary
to get the copy to work.

	. kernel: add CPF_TRY flag to safecopies
	. kernel: only request writable ranges to VM for the
	  target buffer when copying fails
	. do copying in VFS TRY-first
	. some fixes in VM to build SANITYCHECK mode
	. add regression test for the cases where
	  - a FS system call needs memory mapped in a process that the
	    FS itself must map.
	  - such a range covers more than one file-mapped region.
	. add 'try' mode to vircopy, physcopy
	. add flags field to copy kernel call messages
	. if CP_FLAG_TRY is set, do not transparently try
	  to fix memory ranges
	. for use by VFS when accessing user buffers to avoid
	  deadlock
	. remove some obsolete backwards compatability assignments
        . VFS: let thread scheduling work for VM requests too
          Allows VFS to make calls to VM while suspending and resuming
          the currently running thread. Does currently not work for the
          main thread.
        . VM: add fix memory range call for use by VFS

Change-Id: I295794269cea51a3163519a9cfe5901301d90b32
2014-07-28 17:05:14 +02:00
Lionel Sambuc
03514ba605 Getting rid of "old-style-definition"
Patch submitted by hoefnix. Ref.
https://groups.google.com/d/msg/minix-dev/sHQDVJRyx1c/eJjrYOqk5bgJ

Change-Id: I2fcdf4cf119ef252ccc7df06849baf37ffd08440
2014-07-28 17:05:09 +02:00
Lionel Sambuc
84d9c625bf Synchronize on NetBSD-CVS (2013/12/1 12:00:00 UTC)
- Fix for possible unset uid/gid in toproto
 - Fix for default mtree style
 - Update libelf
 - Importing libexecinfo
 - Resynchronize GCC, mpc, gmp, mpfr
 - build.sh: Replace params with show-params.
     This has been done as the make target has been renamed in the same
     way, while a new target named params has been added. This new
     target generates a file containing all the parameters, instead of
     printing it on the console.
 - Update test48 with new etc/services (Fix by Ben Gras <ben@minix3.org)
     get getservbyport() out of the inner loop

Change-Id: Ie6ad5226fa2621ff9f0dee8782ea48f9443d2091
2014-07-28 17:05:06 +02:00
Ben Gras
dda632a24f drop the minix_ prefixes for mmap and munmap
also cleanup of various minix-specific changes, cleanup of
mmap-related testing.

Change-Id: I289a4fc50cf8a13df4a6082038d860853a4bd024
2014-03-03 20:47:03 +01:00
Lionel Sambuc
94c9376df5 Removing SYS_SIG_* field macros.
Change-Id: Ib4f1b48268d4539ae6d4502ad647ecb73ea87f79
2014-03-03 20:47:00 +01:00
Lionel Sambuc
175d3e7eae Changing the message union to anonymous.
This allows us to write things like this:
  message m;
  m.m_notify.interrupts = new_value;

or
  message *mp;
  mp->m_notify.interrupts = new_value;

The shorthands macro have been adapted for the new scheme, and will be
kept as long as we have generic messages being used.

Change-Id: Icfd02b5f126892b1d5d2cebe8c8fb02b180000f7
2014-03-03 20:46:47 +01:00
Lionel Sambuc
55d9e9954b Extending time_t to 64bits.
Change-Id: Ia96b8bfba19cb8179a0237a7d2122d415c24d73f
2014-03-03 20:45:28 +01:00
Ben Gras
88be7bd333 Use netbsd <sys/mman.h>
Change-Id: I80e9cffc80140383a6faf692248573c64d282b4a
2014-03-03 20:37:27 +01:00
Gerard
78da142dab Replaced common u64.h functions with operators.
Change-Id: I71b7b4879209eeff89ce5748d67102afebf871dc
2014-03-02 12:28:32 +01:00
Lionel Sambuc
37598dccf1 Aligning dev_t to 64bits.
Change-Id: I630f72f8530dd4aaf05c35ca23683ae12c9f8328
2014-03-02 12:28:32 +01:00
Ben Gras
8ccb12bb5a use netbsd <sys/signal.h> and sigset_t
. create signals-related struct message type to store sigset_t
	  directly
	. create notify-specific message types, so the generic NOTIFY_ARG
	  doesn't exist anymore
	. various related test expansions, improvements, fixes
	. add a few error-checks to sigismember() calls
	. rename kernel call specific signals fields to SYS_*

Change-Id: I53c18999b5eaf0cfa0cb25f5330bee9e7ad2b478
2014-03-02 12:28:31 +01:00