Re: [PATCH gnumach 1/6] kern: import `macros.h' from x15

2015-05-19 Thread Samuel Thibault
Justus Winter, le Tue 19 May 2015 17:38:59 +0200, a écrit : > Import the macro definitions from the x15 kernel project, and replace > all similar definitions littered all over the place with it. > > Importing this file will make importing code from the x15 kernel > easier. We are already using th

[committed hurd 2/2] fatfs: fix error handling

2015-05-19 Thread Justus Winter
* fatfs/dir.c (diskfs_dirrewrite_hard): Fix error handling. --- fatfs/dir.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fatfs/dir.c b/fatfs/dir.c index 9eea74c..66c95d2 100644 --- a/fatfs/dir.c +++ b/fatfs/dir.c @@ -728,9 +728,10 @@ diskfs_dirrewrite_hard (struct node

[committed hurd 1/2] libdiskfs: fix renaming of directories

2015-05-19 Thread Justus Winter
Previously, file permissions and ownership of the target directory were ignored when renaming a directory: % mkdir a b % chmod 555 a % mv b a % ls a b * libdiskfs/dir-renamed.c (diskfs_rename_dir): Fix error handling. --- libdiskfs/dir-renamed.c | 2 ++ 1 file changed, 2 inse

[PATCH gnumach 4/6] ipc: replace reverse hash table with a radix tree

2015-05-19 Thread Justus Winter
Currently, there is a hash table mapping (space, object) tuples to `ipc_entry' objects. This hash table is intertwined with the IPC tables. There is one hash table per IPC space, but it is only for the entries in the IPC table. This hash table is called `local' in the source. All IPC entries be

[PATCH gnumach 1/6] kern: import `macros.h' from x15

2015-05-19 Thread Justus Winter
Import the macro definitions from the x15 kernel project, and replace all similar definitions littered all over the place with it. Importing this file will make importing code from the x15 kernel easier. We are already using the red-black tree implementation and the slab allocator from it, and we

[PATCH gnumach 2/6] kern: add radix tree library

2015-05-19 Thread Justus Winter
Import a radix tree library from Richard Braun's librbraun. * Makefile.am (clib_routines): Steal `__ffsdi2'. * Makefrag.am (libkernel_a_SOURCES): Add new files. * kern/rdxtree.c: New file. * kern/rdxtree.h: Likewise. * kern/rdxtree_i.h: Likewise. * kern/startup.c (setup_main): Initialize radix tre

[PATCH gnumach 3/6] ipc: undo manual inlining of `ipc_entry_X' functions

2015-05-19 Thread Justus Winter
Today we can rely on the compiler to inline functions. Undoing this manual optimization is a first step to replace the IPC tables. * ipc/mach_msg.c (mach_msg_trap): Undo the manual inlining of `ipc_entry_lookup', `ipc_entry_dealloc', and `ipc_entry_get'. * ipc/ipc_kmsg.c (ipc_kmsg_copyin_header,

[PATCH gnumach 5/6] ipc: replace the IPC table with a radix tree

2015-05-19 Thread Justus Winter
Currently, the port names are mapped to an IPC object (e.g. a port) using a table. This, however, requires large chunks of continuous memory, and leads to scalability problems as virtual kernel memory is a scarce resource. To avoid excessive overhead, non-contiguous port names are spilled into a

[PATCH gnumach 6/6] ipc: inline key ipc entry lookup functions

2015-05-19 Thread Justus Winter
Declare functions looking up IPC entries that were previously inlined manually with `static inline' so that they will be inlined into the fast paths by the compiler. * ipc/ipc_entry.c (ipc_entry_lookup, ipc_entry_get, ipc_entry_dealloc): Move functions... * ipc/ipc_space.h: ... here, and declare t

Replacing the IPC tables with radix trees

2015-05-19 Thread Justus Winter
Hello :) I have polished the patch series and all commit messages. Please have a look and poke me if anything stands out. I've also pushed the changes to darnassus: http://darnassus.sceen.net/gitweb/teythoon/gnumach.git/shortlog/refs/heads/ipc-radix-trees-9 Coccinelle was most helpful for crea

Memory management GSoC progress

2015-05-19 Thread Richard Braun
Hello, As part of the Google Summer of Code (GSoC) 2015, Justus Winter started working on replacing the IPC space data structure. He merged radix tree code into GNU Mach, completely removed the old hash table/splay tree based code, and made IPC spaces use radix trees instead, which implied walking

Re: Bug#785134: Directory permissions not enforced when renaming a directory

2015-05-19 Thread Justus Winter
Quoting Samuel Thibault (2015-05-19 02:00:21) > More concerning, this happens also with different users: Uh, indeed o_O > Can somebody have a look? I will. Justus