Andreas Kling
c3b7ace3e0
Kernel: Assign Lock names in class member initializers.
2019-05-02 03:28:20 +02:00
Mustafa Ali CAN
9fa8324f7a
Fix jittery mouse
2019-05-01 21:54:41 +02:00
Andreas Kling
28244039a5
Kernel: Don't symbolicate symbol+offset for obvious non-kernel addresses.
2019-04-30 14:47:22 +02:00
Andreas Kling
14ac77131b
Kernel: The exit_thread() syscall should unlock the big lock.
...
Since exit_thread() never returns, it can't rely on the syscall trap handler
to unlock the big lock before returning.
2019-04-29 15:56:25 +02:00
Andreas Kling
d07be1087a
Kernel+LibC: Add exit_thread() syscall.
2019-04-29 15:17:20 +02:00
Andreas Kling
8cbb7f101f
Kernel: Have File virtuals take a FileDescriptor& rather than a Process&.
...
This will allow us to implement different behaviors depending on the role
of the descriptor a File is being accessed through.
2019-04-29 13:58:40 +02:00
Andreas Kling
0a0d739e98
Kernel: Make FIFO inherit from File.
2019-04-29 04:55:54 +02:00
Andreas Kling
475a17fa4b
VFS: Also respect the sticky bit of the new parent in rename().
...
Obviously we should not allow overwriting someone else's files in a sticky
directory either.
2019-04-28 23:34:33 +02:00
Andreas Kling
e4eca17848
VFS: Implement sticky bit behavior for rename() and unlink().
...
Removing entries from a sticky directory is only allowed when you are either
the owner of the entry, or the superuser. :^)
2019-04-28 22:54:30 +02:00
Andreas Kling
a104d7cc93
Kernel: Make SharedMemory inherit from File.
2019-04-28 22:31:31 +02:00
Andreas Kling
a6d407fec5
Ext2FS: Put some debug spam behind EXT2_DEBUG.
2019-04-28 22:14:37 +02:00
Andreas Kling
899f6a5de2
Ext2FS: Support shrinking inode to a smaller size.
...
Factor out inode resizing into a separate Ext2FSInode::resize() function.
This is then called both from write_bytes() and truncate().
This patch finally implements freeing of blocks when an inode shrinks.
2019-04-28 22:07:25 +02:00
Andreas Kling
89df887e1f
Kernel: Dump backtrace on user process page fault.
2019-04-28 22:05:13 +02:00
Andreas Kling
c91b0d6b5f
FileDescriptor: Let TTY handle its own absolute_path().
2019-04-28 15:09:23 +02:00
Andreas Kling
e886337a67
Kernel: Make ProcessTracer inherit from File.
2019-04-28 15:02:55 +02:00
Andreas Kling
7ec1f6ab3c
Kernel: Add File, a base class for anything that a FileDescriptor can wrap.
...
FileDescriptor is getting out of control, and the layering isn't quite right
so let's make a File class that everything can inherit from. Then we can
stop worrying about all kinds of specifics in FileDescriptor.
2019-04-28 14:53:50 +02:00
Andreas Kling
d32d85e133
Kernel: Fix rename() sometimes failing to move within the same directory.
...
It was wrong to do a reverse name lookup on the old inode after adding
a new name for it, since we might very well get the new inode instead of
the old one, depending on hash table layouts.
2019-04-27 22:38:51 +02:00
Andreas Kling
52139a2392
DiskBackedFS: Flush write cache if it reaches 32 entries before sync.
...
This is just to avoid chewing through all of the kernel memory. There is a
lot of room for improvement here, and 32 is just a number from the place
where numbers come from.
2019-04-27 17:30:32 +02:00
Andreas Kling
dde8d90747
Ext2FS: Fix accidental zero-fill when appending to a file.
...
We were using the old file size, rather than the new file size, to determine
how much to zero-fill in the last block of a file.
2019-04-27 17:14:27 +02:00
Andreas Kling
679ac386eb
Kernel: "Succeed" quietly for zero-length read() and write().
2019-04-27 16:17:24 +02:00
Andreas Kling
490e89e240
LibC: Add execvpe() and make execvp()'ed children inherit environment.
2019-04-26 03:16:26 +02:00
Andreas Kling
1163e0a030
Kernel: Don't count kfree(nullptr) as a call to kfree().
...
This was causing the kmalloc/kfree call delta to accumulate errors.
2019-04-25 23:18:11 +02:00
Andreas Kling
44673c4f3b
Kernel: Add a write cache to DiskBackedFS.
...
This way you can spam small write()s on a file without the kernel writing
to disk every single time. Flushes are included in the FS::sync() operation
and will get triggered regularly by syncd. :^)
2019-04-25 22:05:53 +02:00
Andreas Kling
e0cdc5db0d
Ext2FS: Reduce debug spam in block allocation.
2019-04-25 22:05:32 +02:00
Andreas Kling
6c950f8f83
Kernel: Dump stack trace when kmalloc() fails.
2019-04-25 15:58:49 +02:00
Andreas Kling
d5578826af
Kernel: Make it possible to look up FIFO's by ID.
...
This will be useful when implementing the /proc/PID/fd/N links where N is
a file descriptor referring to a FIFO.
2019-04-25 13:53:24 +02:00
Andreas Kling
16f6a3af3c
Allow passing extra args to qemu via a SERENITY_EXTRA_QEMU_ARGS env var.
2019-04-24 21:06:16 +02:00
Andreas Kling
d7cf841d3d
Kernel: Add a comment block about the Device class.
2019-04-24 02:37:57 +02:00
Andreas Kling
ca9ed13643
Kernel: Simplify Device::open().
2019-04-24 02:20:14 +02:00
Andreas Kling
c5c4e54a67
Kernel: Process destruction should destroy all child threads.
...
We were only destroying the main thread when a process died, leaving any
secondary threads around. They couldn't run, but because they were still
in the global thread list, strange things could happen since they had some
now-stale pointers to their old process.
2019-04-23 22:17:01 +02:00
Andreas Kling
0c898e3c2c
Put assertions behind a DEBUG flag to make it easy to build without them.
2019-04-23 21:52:02 +02:00
Andreas Kling
f3754b8429
Build: Pass --gc-sections to the linker in all builds.
...
This removes unused sections from the output and reduces the binary size
of everything we compile.
2019-04-23 21:37:10 +02:00
Andreas Kling
f042b3adeb
Kernel: Make the right shift key work.
...
I never realized the right shift key wasn't hooked up since my left pinky
always hovers over the left shift key, ready to rock.
2019-04-23 20:47:45 +02:00
Andreas Kling
fd500c79d6
Ext2S: Fix off-by-one error in block allocation.
2019-04-23 16:38:45 +02:00
Andreas Kling
b041fc57de
Ext2FS: Bitmaps aren't always at full capacity.
...
Block bitmaps only have (blocks_per_group) entries, while inode bitmaps
only have (inodes_per_group) entries.
2019-04-23 16:21:07 +02:00
Andreas Kling
14ceabeca8
Ext2FS: More bitmap misunderstanding cleanups.
...
Inode bitmaps are also only ever one block.
2019-04-23 15:07:07 +02:00
Andreas Kling
1bf37db9a9
Ext2FS: Simplify block bitmap stuff.
...
Block bitmaps are only ever one block in size. I don't know why I thought
otherwise, but use this info to simplify the code. :^)
2019-04-23 14:51:47 +02:00
Andreas Kling
58240fdb33
Do a pass of compiler warning fixes.
...
This is really making me question not using 64-bit integers more.
2019-04-23 13:00:53 +02:00
Andreas Kling
243e1d8462
Kernel: Use rep insw/outsw for IDE transfers.
...
There are much faster ways to do disk transfers, but I'm not implementing
those today. In the meantime, this is slightly nicer. :^)
2019-04-23 03:45:55 +02:00
Andreas Kling
37498c1566
Kernel: Send IDE flush command after writing sectors.
2019-04-23 03:16:47 +02:00
Andreas Kling
11e7ce60e5
Kernel: Use IDE LBA addressing instead of the long-obsolete C/H/S.
2019-04-23 02:26:51 +02:00
Andreas Kling
2d7cad6a16
Kernel: Make sure we don't use any FPU/MMX/SSE instructions.
2019-04-22 23:38:33 +02:00
Andreas Kling
5c68929aa1
Kernel: Add a systrace() syscall and implement /bin/strace using it.
...
Calling systrace(pid) gives you a file descriptor with a stream of the
syscalls made by a peer process. The process must be owned by the same
UID who calls systrace(). :^)
2019-04-22 18:44:45 +02:00
Andreas Kling
6693cfb26a
Kernel: Don't use MMX memcpy() in the kernel.
...
I just discovered the hard way that clobbering FPU/MMX/SSE registers in the
kernel makes things very confusing for userspace (and other kernel threads.)
Let's banish all of those things from the kernel to keep things simple.
2019-04-22 17:13:18 +02:00
Andreas Kling
a9d09e9020
Kernel: Get rid of the "cool globals" thingy.
...
This was something I used while debugging with Computron. I haven't needed
it for months, so let's get rid of it. It's trivial to readd if needed.
2019-04-21 12:33:14 +02:00
Andreas Kling
57da00b731
Include Makefile.common in all other Makefiles.
2019-04-21 04:09:39 +02:00
Andreas Kling
5f63f8120c
Kernel: Remove "restorer" field from SignalActionData.
...
I was originally implementing signals by looking at some man page about
sigaction() to see how it works. It seems like the restorer thingy is
system-specific and not required by POSIX, so let's get rid of it.
2019-04-20 19:32:14 +02:00
Andreas Kling
5562ab3f5a
Kernel: Remove some more unnecessary Thread members.
2019-04-20 19:29:48 +02:00
Andreas Kling
b2ebf6c798
Kernel: Shrink Thread by making kernel resume TSS heap-allocated.
2019-04-20 19:23:45 +02:00
Andreas Kling
ec365b82d5
Kernel: Make the colonel run at "Idle" priority (the lowest possible.)
...
This means it won't hog the CPU for more than a single timeslice. :^)
2019-04-20 15:58:45 +02:00