- Mar 31, 2013
-
-
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.
-
- Mar 24, 2013
-
-
Avi Kivity authored
The fpu test was written to be run standalone, but that doesn't work running from testrunner.so since the entry points are different (main vs. osv_main).
-
- Mar 22, 2013
-
-
Dor Laor authored
* 'master' of github.com:cloudius-systems/osv: Replace bizarre uses of free_large in mempool.cc Some minor cleanups in mmu.cc x64: qualify newer cr4 features on cpuid x64: fix cpuid xsave parsing bsd: added a manifest.txt file for the networking stack
-
Dor Laor authored
once the destination interface owns the hard coded mac addr
-
Dor Laor authored
Additional cleanups and tries are needed.
-
Dor Laor authored
-
- Mar 21, 2013
-
-
Nadav Har'El authored
In several places in mempool.cc - free_page, free_huge_page, and free_initial_memory_range, we (ab)used free_large in a really strange way (giving it a pointer lower by page_size, knowing it will add page_size back). Instead, created a new function free_page_range(), which in a much clearer way and without monkey-business, returns a range of pages to the free list. Now all of the above functions, as well as free_large itself, use this new free_page_range().
-
Nadav Har'El authored
-
Avi Kivity authored
Breaks on older processors.
-
Avi Kivity authored
Used the wrong bit.
-
Guy Zana authored
-
Dor Laor authored
We cannot relay on the overlay protocol to provide this length and we must receive it from the hypervisor.
-
- Mar 20, 2013
-
-
Nadav Har'El authored
Rewriten the mmap/unmap/mprotect to be much less repetitive. There is a new "page_range_operation" class, from which the classes "populate", "unpopulate", and "protect" classes derive to implement mmap, munmap and mprotect respectively. The code is now much shorter, less repetitive, clearer (I hope), and also better conforming to the new coding conventions. Note that linear_map is still separate, and page_range_operation keeps its old algorithm (of starting at the root again for each page). Now that we have this clean OO structure, it will be easier to change this algorithm to be similar to linear_map's.
-
- Mar 19, 2013
-
-
Nadav Har'El authored
Java uses mprotect(..., PROT_NONE) for guard pages (e.g., to catch stack overflow). This patch implements it by removing the present bit on these pages' mappings, which does not mean the pages have been unmapped (their memory is kept intact, and running mprotect again can make them readable again.
-