Commit graph

5015 commits

Author SHA1 Message Date
David van Moolenbroek
870f6d08af df(1): use statvfs instead of raw disk access
As of this patch, df(1) no longer performs raw disk access; it
operates exclusively on mounted file systems. This also means
that df no longer needs to be setuid.
2012-10-17 22:51:17 +02:00
David van Moolenbroek
3399c2c966 part(8)/autopart(8): remove partition hack
We have actually had lseek64 for quite a while now, so it's no longer
necessary to do horrible things to the partition table just to be able
to access large offsets into a device.

Also fix the compiler warnings in these commands.
2012-10-16 15:24:26 +02:00
David van Moolenbroek
ab12636b79 Installation CD: add AHCI option to boot menu 2012-10-16 10:34:58 +02:00
David van Moolenbroek
ceefd434f1 update_bootcfg(8): various improvements
- inherit a predefined set of system environment variables
  (the current set of inherited variables is: ahci; acpi; no_apic);
- auto-adjust the default menu option when lines are auto-removed;
- add variable substitution support for /etc/boot.cfg.local;
- make default menu options in boot.cfg.local relative to itself,
  allowing one to set the default to a menu option from this file.
2012-10-16 10:34:58 +02:00
Kees Jongenburger
3fab01cdb2 mmc:Indenting and code cleanup.
Change-Id: Ia1156c6b5e4dbc6c8af37d61b118258053f347ce
2012-10-16 08:40:43 +02:00
Kees Jongenburger
2d5f58d5ef mmc:Small fixup to run the driver on hardware.
Change-Id: I8e8d048da7cdfce5c9f2091969b0db5240e3e89f
2012-10-16 08:40:43 +02:00
Prasanna Kumar T S M
8de781761f Remove some usage of 64bit functions (minix/u64.h)
. Removed the usage of 64 bit functions in top.c. Compiles successfully.
. Scaling 64 bit values to 32 bit is removed.
. Retain make64 instead of using | with shift.
. Add order cycling display
2012-10-15 18:24:30 +02:00
David van Moolenbroek
2e26c872c4 blocktest: make fewer assumptions about driver
In particular, allow partial results to be returned in some cases,
and do not require that the driver fail on word-unaligned access.
2012-10-15 11:50:59 +00:00
David van Moolenbroek
d2be2e7b41 mmc: various small fixes
- call blockdriver_announce() on startup;
- restart statelessly after a crash;
- resolve a clang warning.
2012-10-15 11:50:58 +00:00
David van Moolenbroek
46fca87456 VM: munmap fix 2012-10-13 19:08:28 +02:00
Ben Gras
e12fdad66d expose some terminal definitions by default 2012-10-13 03:15:14 +02:00
Mohamed Katri
d21a633ffb mkfs.mfs: dynamically size image from proto 2012-10-12 15:13:43 +02:00
Ben Gras
d343041caa VM: make mapping types explicit
Introduce explicit abstractions for different mapping types,
handling the instantiation, forking, pagefaults and freeing of
anonymous memory, direct physical mappings, shared memory and
physically contiguous anonymous memory as separate types, making
region.c more generic.

Also some other genericification like merging the 3 munmap cases
into one.

COW and SMAP safemap code is still implicit in region.c.
2012-10-12 14:52:01 +02:00
Ben Gras
fd4ddef49a VM: munmap used by VM for itself is no longer used 2012-10-12 14:51:35 +02:00
David van Moolenbroek
9733fcdb43 bootloader: usability improvements
- add "edit" menu option, to edit menu commands before executing them;
- add "menu" boot command, to return to the menu from the prompt;
- provide more line editing features when getting input;
- fix a few potential buffer overflows as a side effect.
2012-10-12 01:03:36 +02:00
David van Moolenbroek
52cf951fdc tests: fix IPC test set fix
Partial rollback of git-df39752.
2012-10-11 20:38:41 +02:00
Tomas Hruby
420dfe1145 Merge branch 'master' of git.minix3.org:minix 2012-10-11 09:47:24 +00:00
Tomas Hruby
ee99bb81b9 LIBC - getifaddrs() fix
ifpa must be set to something meaningful every time it returns 0.
2012-10-11 09:43:33 +00:00
Ben Gras
39393e7046 minor fixes for safecopy & safemap tests 2012-10-10 19:12:42 +02:00
Kees Jongenburger
49246fcdd5 MMC driver.
Change-Id: I0d460d63070855df9b11eaf3d33eb7bb89c570f1
2012-10-08 09:11:17 +02:00
Kees Jongenburger
4fda063232 Import MMC related bsd headers.
Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>

Change-Id: Ia183d522a6ef1528b045a6fc6cd2e8930c669c32
2012-10-08 09:11:16 +02:00
Arun Thomas
471a03a362 ARM support for kernel and vm 2012-10-07 21:38:03 -04:00
Arne Welzel
e35c4f78d2 VFS: fix check_bsf() locking
The check_bsf() macro uses assert(mutex_trylock(&bsf_lock)) and
assumes bsf_lock is locked afterwards. This breaks when compiling
with NOASSERTS="yes". Also: macro to function transition.
2012-09-28 14:57:34 +02:00
Arne Welzel
7e1074732b VFS: resolve unused parameter if NOASSERTS="yes"
If VFS is compiled with NOASSERTS="yes", ctty_opcl() does not
use the op parameter. Change to "non-assert()" sanity check.
2012-09-28 14:57:32 +02:00
pikpik
be81e4ec74 daily: makewhatis -f
. use a little less memory and the processor will be
	  freer during start-up.
2012-09-27 23:12:14 +02:00
Ben Gras
c595699ca7 unstack, sort: cleanup and improvement
lets unstack
(a) know about in-kernel ipc entry points and
(b) be able handle >2GB symbol offsets.

	. sort: add -x for hex numerical sort
	. unstack: gnm is obsolete
	. unstack: datasizes is obsolete (use nm --size-sort instead)
	. unstack: add ipc entry points read from procfs (hex)
	. unstack: use sort -x to sort symbol order so the procfs ones are
	  sorted independent of position and original ordering
2012-09-26 18:44:55 +02:00
Ben Gras
2cdbb3041d procfs: make ipc vectors available 2012-09-26 17:14:14 +02:00
Arne Welzel
362e4c37a1 memory: use sys_safememset() for /dev/zero 2012-09-26 02:18:00 +02:00
Arne Welzel
bf33a1c097 libsys: add sys_safememset() 2012-09-26 02:18:00 +02:00
Arne Welzel
d8a89dcbe6 kernel: add safememset() kernel call 2012-09-26 02:18:00 +02:00
Arne Welzel
0617743bd1 kernel: handle pagefaults in vm_memset() 2012-09-26 02:17:59 +02:00
Thomas Veerman
e61268c454 TTY: printer better diagnostics
.tell when a line is not initialized
.don't print when a request has failed, we use error codes for that
2012-09-25 09:07:09 +00:00
Thomas Veerman
a458e9d00d getty: return speed option 2012-09-25 09:07:09 +00:00
Ben Gras
2d72cbec41 SYSENTER/SYSCALL support
. add cpufeature detection of both
	. use it for both ipc and kernelcall traps, using a register
	  for call number
	. SYSENTER/SYSCALL does not save any context, therefore userland
	  has to save it
	. to accomodate multiple kernel entry/exit types, the entry
	  type is recorded in the process struct. hitherto all types
	  were interrupt (soft int, exception, hard int); now SYSENTER/SYSCALL
	  is new, with the difference that context is not fully restored
	  from proc struct when running the process again. this can't be
	  done as some information is missing.
	. complication: cases in which the kernel has to fully change
	  process context (i.e. sigreturn). in that case the exit type
	  is changed from SYSENTER/SYSEXIT to soft-int (i.e. iret) and
	  context is fully restored from the proc struct. this does mean
	  the PC and SP must change, as the sysenter/sysexit userland code
	  will otherwise try to restore its own context. this is true in the
	  sigreturn case.
	. override all usage by setting libc_ipc=1
2012-09-24 15:53:43 +02:00
Arne Welzel
629829e69c phys_memset improvements
. verify length argument
	. use rep stosl / stosb
2012-09-21 14:15:44 +02:00
Ben Gras
8a3b6ca3bb remove unused <tools.h> 2012-09-20 12:24:22 +02:00
Ben Gras
b16aacc7f3 vm: fix failed alloc condition 2012-09-19 22:24:56 +02:00
Ben Gras
b6aab00c37 top task uid clear 2012-09-19 19:38:19 +02:00
Thomas Veerman
6cb94cc91b tests: don't chmod 777 everything upon cleanup
rm -rf works just fine no matter what mode bits are set (modulo
file ownership and current user id). Test 43 creates a symlink
to / and the chmod operation would change file permissions outside
of the test directory.
2012-09-19 16:20:41 +00:00
Ben Gras
bc4c07f4f1 coverity appeasement - redundant check 2012-09-19 17:19:57 +02:00
Ben Gras
60014efb3e vfs: pm_dumpcore: always clean up process
. whenever this function is called, pm will expect
	  the process to be cleaned up
	. so don't abort the process entirely on error
	. fixes a later 'forking on top of in-use child' vfs panic
2012-09-19 17:13:17 +02:00
Ben Gras
25817b0854 vm: change NO_MEM to a more impossible value
fixes an assert() firing when starting X. thanks to the report by pikpik.

	. NO_MEM was 0, which is actually an existing piece
	  of physical memory. it can't be allocated because it's reserved
	  for bios data (by the kernel), but it can be mapped in (e.g.
	  by X), causing sanity check disaster.
	. NONCONTIGUOUS is also obsolete as all allocations are single-page
	  now, i.e. NONCONTIGUOUS is really the default and only mode.
2012-09-19 15:31:36 +02:00
Ben Gras
24776434f5 worldstone: add -s for statistical profiling 2012-09-19 13:43:17 +02:00
Ben Gras
7047e014c9 coverity appeasement 2012-09-19 13:07:18 +02:00
Ben Gras
fe6e291f59 vm, kernel, top: report memory usage of vm, kernel 2012-09-18 23:43:52 +02:00
Ben Gras
aa82e375c6 VM: remove dead code 2012-09-18 18:40:57 +02:00
Ben Gras
d526f1a0db some coverity fixes. 2012-09-18 15:11:51 +02:00
Ben Gras
ddf1981004 VM: restore >4k secondary cache functionality
. by storing length in the yielded blocks node again
2012-09-18 13:17:52 +02:00
Ben Gras
ed1af3c86c VM: full munmap
complete munmap implementation; single-page references made
a general munmap() implementation possible to write cleanly.

	. memory: let the MIOCRAMSIZE ioctl set the imgrd device
	  size (but only to 0)
	. let the ramdisk command set sizes to 0
	. use this command to set /dev/imgrd to 0 after mounting /usr
	  in /etc/rc, so the boot time ramdisk is freed (about 4MB
	  currently)
2012-09-18 13:17:52 +02:00
Ben Gras
16c3870b2e VM: abstract datastructures a bit
. a little less duplication in region.c
2012-09-18 13:17:51 +02:00