- Apr 02, 2013
-
-
Avi Kivity authored
If a target fails to build, it is probably corrupted. Delete it. Fixes misbuild after a second make with an incorrect bootfs.manifest.
-
Guy Zana authored
-
Guy Zana authored
-
Guy Zana authored
-
Guy Zana authored
-
Christoph Hellwig authored
-
Guy Zana authored
-
Guy Zana authored
-
Dor Laor authored
-
- Mar 31, 2013
-
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
- Mar 28, 2013
-
-
Guy Zana authored
fdrop() may call fo_close() and a private fo_close() may use the FD layer. For example, NFS client may open a socket to flush the file. Another reason is that it's unnecessary and the shorter we hold the mutex, the better.
-
Guy Zana authored
fdset(fd, fp) now installs fp on fd and closes a previousely opened file if there was any, this makes dup2() and dup3() behave as expected.
-
Guy Zana authored
solving a race in fget() where retrieving the file structure and increasing its refcount is not done atomically - a concurrent close() may free the file structure and fhold() may fault. fdfree() was replaced with fdclose() which removes the file from the gfdt and then calls fdrop() - that removes the ugly double fdrop() calls. Credit goes to Avi for that.
-
Guy Zana authored
-
Guy Zana authored
It's more intuitive and aligned with other OS. As appointed out by Christoph.
-
- Mar 27, 2013
-
-
Guy Zana authored
...which defaults to release. in order to debug properly, OSv should be compiled in debug mode and executed using the debug binary.
-
Guy Zana authored
In case there's an error installing the file descriptor (fdalloc() fails), fdrop() should be called since it also functions as a desctructor (encapsulation).
-
Guy Zana authored
as part of the changes to the fd allocator, fdalloc() was changed to hold a refcount on fp. when falloc() returns the refcount is suppose to be 1, not 2
-
Guy Zana authored
The old code didn't really close newfd properly, put an assert and a comment instead for now.
-
Guy Zana authored
this check should be ditched completely...
-
Guy Zana authored
-
Guy Zana authored
-
Guy Zana authored
dup3() may corrupt memory if new_fd is bigger than FDMAX
-
Guy Zana authored
ramfs and fatfs rely on it to function properly.
-
Guy Zana authored
falloc() installs the file structure to the global fd table. in case there's an error with sys_open (common for user applications), fdfree() was never called
-
- Mar 25, 2013
-
-
Christoph Hellwig authored
We now grab an additional long-term reference on open/dup thay stays for the lifetime of the file descriptor. The semantics of the global falloc/falloc_noinstall/etc functions matches those of FreeBSD now. As pointed out by Guy.
-
Guy Zana authored
-
Guy Zana authored
-
Guy Zana authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
This is not needed because each file still keeps a vnode reference and thus pins it, but at the same time makes the close implementation a lot simpler, especially after file operations are added.
-
Dor Laor authored
* 'master' of github.com:cloudius-systems/osv: Coarse-grained lock for mmap()/munmap()/mprotect(). TLB flush and other fixes to mmap/munmap/protect Add working mprotect() tests. tests: fix fpu test for testrunner.so
-
Dor Laor authored
interface we cannot get an answer and it stalls the test execution.
-
Nadav Har'El authored
Added a coarse-grain lock to prevent concurrent mmap()/munmap()/mprotect(). We can implement something more fine-grained if this becomes a performance bottleneck, but I doubt it ever would.
-
Nadav Har'El authored
Added the missing TLB flush to the mmap()/munmap()/mprotect() operations. Note that currently I only do this on the processor running mmap(), which is incorrect (I put in a TODO), but is good enough for Java's use case (which is to do these things on startup). Also added more tests, and fixed a bug on mmap(PROT_NONE) (mprotect(PROT_NONE) used to work, but mmap(PROT_NONE) didn't).
-
Nadav Har'El authored
Automate the tests for mprotect() using sigaction() - verifing that writing to read-only page causes SIGSEGV, and so on. One *failing* test is left commented out - currently we're missing a TLB flush on mprotect(), so if we write to a page and then make it read-only, the new read-only status isn't noticed by the processor.
-