Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								97664fad60 
								
							 
						 
						
							
							
								
								Kernel: A bunch of hacking towards initial Ethernet support.  
							
							
							
						 
						
							2019-03-10 20:59:23 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								eda0866992 
								
							 
						 
						
							
							
								
								Add a C++ helper class for working with shared buffers.  
							
							... 
							
							
							
							This is a bit more comfortable than passing the shared buffer ID manually
everywhere and keeping track of size etc. 
							
						 
						
							2019-03-08 12:24:05 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								e56fe71dbc 
								
							 
						 
						
							
							
								
								Kernel: And some more KResult/KResultOr<T> porting work.  
							
							
							
						 
						
							2019-03-06 22:30:13 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								028afabf6b 
								
							 
						 
						
							
							
								
								Kernel: Port more code to KResult and KResultOr<T>.  
							
							
							
						 
						
							2019-03-06 22:14:31 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								1cc32ebc7e 
								
							 
						 
						
							
							
								
								Kernel: Remove "requested wakeups" feature.  
							
							... 
							
							
							
							I only needed this to support the WindowServer living inside the kernel.
Now that it's been migrated to userspace, this can go. :^) 
							
						 
						
							2019-03-05 13:34:36 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								91031346e5 
								
							 
						 
						
							
							
								
								Kernel: More signal handling improvements.  
							
							... 
							
							
							
							Finally fixed the weird flaky crashing when resizing Terminal windows.
It was because we were dispatching a signal to "current" from the scheduler.
Yet another thing I dislike about even having a "current" process while
we're in the scheduler. Not sure yet how to fix this.
Let the signal handler's kernel stack be a kmalloc() allocation for now.
Once we can do allocation of consecutive physical pages in the supervisor
memory region, we can use that for all types of kernel stacks. 
							
						 
						
							2019-03-05 12:52:35 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								9e1fcb74a2 
								
							 
						 
						
							
							
								
								Kernel: Returning from a signal handler reset the signal mask correctly.  
							
							... 
							
							
							
							We were setting the handled signal number as the new signal mask, oops. 
							
						 
						
							2019-03-05 11:00:26 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								251293f2e1 
								
							 
						 
						
							
							
								
								Kernel: Block a signal from being dispatched again until handler returns.  
							
							... 
							
							
							
							We don't handle nesting yet, but this is a step in the right direction. 
							
						 
						
							2019-03-05 10:34:08 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								67fc42f64e 
								
							 
						 
						
							
							
								
								Kernel: SIGCONT should unblock a blocked process.  
							
							... 
							
							
							
							Otherwise we might stay in BlockedSignal state forever. Unblocking just
means that the current syscall may fail with EINTR. 
							
						 
						
							2019-03-04 11:25:24 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								725b57fe1f 
								
							 
						 
						
							
							
								
								Kernel: Try to do the right thing by default for unhandled signals.  
							
							
							
						 
						
							2019-03-03 12:13:41 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								2c5a378ccc 
								
							 
						 
						
							
							
								
								Kernel+Userland: Add symlink() syscall and add "-s" flag to /bin/ln.  
							
							... 
							
							
							
							It's now possible to create symbolic links! :^)
This exposed an issue in Ext2FS where we'd write uninitialized data past
the end of an inode's content. Fix this by zeroing out the tail end of
the last block in a file. 
							
						 
						
							2019-03-02 01:52:24 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								37f6844c6c 
								
							 
						 
						
							
							
								
								Kernel: Port stat() to KResult/KResultOr<T>.  
							
							
							
						 
						
							2019-03-02 00:11:27 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								f75eb9af16 
								
							 
						 
						
							
							
								
								Kernel: Support chdir() to a directory that's executable but not readable.  
							
							... 
							
							
							
							Also the superuser should be allowed to resolve any possible path without
getting tripped up by EACCES. 
							
						 
						
							2019-03-01 23:54:07 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								274b0260f7 
								
							 
						 
						
							
							
								
								Kernel: Don't send SIGCHLD to parent process if he has SA_NOCLDWAIT set.  
							
							... 
							
							
							
							Just transfer ownership of the dead process to the colonel and let the
scheduler reap it on next iteration. 
							
						 
						
							2019-03-01 15:52:05 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								1b16a29044 
								
							 
						 
						
							
							
								
								Kernel+Userland: Implement fchmod() syscall and use it to improve /bin/cp.  
							
							... 
							
							
							
							/bin/cp will now copy the permission bits from source to destination. :^) 
							
						 
						
							2019-03-01 10:39:19 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								e427b514dc 
								
							 
						 
						
							
							
								
								Kernel: Implement basic SIGSTOP and SIGCONT support.  
							
							
							
						 
						
							2019-02-28 12:27:26 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								c09ab7cc40 
								
							 
						 
						
							
							
								
								Kernel: Only allow sending signals to process you own.  
							
							
							
						 
						
							2019-02-28 11:46:38 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								258f4671ea 
								
							 
						 
						
							
							
								
								Kernel: kill() syscall should support sending a signal to yourself.  
							
							
							
						 
						
							2019-02-28 09:44:48 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								60d0a48be5 
								
							 
						 
						
							
							
								
								Kernel: Use KResult in link().  
							
							
							
						 
						
							2019-02-27 15:31:26 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								5b27f11b97 
								
							 
						 
						
							
							
								
								Kernel: Use KResult in unlink() and rmdir().  
							
							
							
						 
						
							2019-02-27 14:11:25 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								1d2529b4a1 
								
							 
						 
						
							
							
								
								Add chown() syscall and a simple /bin/chown program.  
							
							
							
						 
						
							2019-02-27 12:32:53 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								e421c10735 
								
							 
						 
						
							
							
								
								More compat work towards porting vim.  
							
							... 
							
							
							
							It now builds and runs in the small-featureset configuration. :^) 
							
						 
						
							2019-02-27 00:02:01 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								a356746d04 
								
							 
						 
						
							
							
								
								Compat work towards porting vim.  
							
							
							
						 
						
							2019-02-26 15:57:59 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								e0c1541847 
								
							 
						 
						
							
							
								
								Compat work towards making bash-5.0 build with less patches.  
							
							... 
							
							
							
							Hacked implementations of sigsetjmp() and siglongjmp(). I didn't know about
these APIs until just now, but I hope I got them right. 
							
						 
						
							2019-02-26 14:05:28 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								cccc8d8aeb 
								
							 
						 
						
							
							
								
								More compat work.  
							
							... 
							
							
							
							Move syscall to int 0x82 since using int 0x80 was kinda prone to fork bombs
when building things on Linux. :^) 
							
						 
						
							2019-02-26 12:57:02 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								9624b54703 
								
							 
						 
						
							
							
								
								More moving towards using signed types.  
							
							... 
							
							
							
							I'm still feeling this out, but I am starting to like the general idea. 
							
						 
						
							2019-02-25 22:06:55 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								beda478821 
								
							 
						 
						
							
							
								
								Kernel: Make syscalls that take a buffer size use ssize_t instead of size_t.  
							
							... 
							
							
							
							Dealing with the unsigned overflow propagation here just seems unreasonably
error prone. Let's limit ourselves to 2GB buffer sizes instead. 
							
						 
						
							2019-02-25 21:21:12 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								5af4e622b9 
								
							 
						 
						
							
							
								
								Kernel: Add KResult and KResultOr<T> classes.  
							
							... 
							
							
							
							The idea here is to combine a potential syscall error code with an arbitrary
type in the case of success. I feel like this will end up much less error
prone than returning some arbitrary type that kinda sorta has bool semantics
(but sometimes not really) and passing the error through an out-param.
This patch only converts a few syscalls to using it. More to come. 
							
						 
						
							2019-02-25 20:50:22 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								15fb917f28 
								
							 
						 
						
							
							
								
								Convert more RetainPtr use to Retained.  
							
							
							
						 
						
							2019-02-25 16:04:08 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								f98dcbf1d6 
								
							 
						 
						
							
							
								
								Kernel: Respect the process umask in open() and mkdir().  
							
							
							
						 
						
							2019-02-22 02:39:13 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								6d3e12899b 
								
							 
						 
						
							
							
								
								Kernel: Pass process arguments directly on the stack.  
							
							... 
							
							
							
							Get rid of the convoluted get_arguments and get_environment syscalls.
This patch also adds a simple /bin/env that just prints its environment. 
							
						 
						
							2019-02-22 01:55:22 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								e969419202 
								
							 
						 
						
							
							
								
								Kernel: Don't allocate and discard an extra stack for every process.  
							
							
							
						 
						
							2019-02-22 00:27:06 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								920e8e58ed 
								
							 
						 
						
							
							
								
								Kernel+Userland: Implement setuid() and setgid() and add /bin/su  
							
							... 
							
							
							
							Also show setuid and setgid bits in "ls -l" output. :^) 
							
						 
						
							2019-02-21 23:38:10 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								8b64f213a1 
								
							 
						 
						
							
							
								
								Kernel: sigpending() and sigprocmask() should validate memory writes.  
							
							
							
						 
						
							2019-02-21 21:33:52 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								a624fe06b8 
								
							 
						 
						
							
							
								
								Kernel: Add file permission checks to utime() syscall.  
							
							
							
						 
						
							2019-02-21 16:37:41 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								f0a869ea50 
								
							 
						 
						
							
							
								
								Kernel: Process::cwd_inode() should return a reference.  
							
							... 
							
							
							
							There's always a current working directory inode. 
							
						 
						
							2019-02-21 16:19:07 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								ce3b548077 
								
							 
						 
						
							
							
								
								Kernel: Separate VFS stat() from open().  
							
							... 
							
							
							
							It was very confusing that you had to open a FileDescriptor in order to stat
a file. This patch gives VFS a separate stat() function and uses it to
implement the stat() and lstat() syscalls. 
							
						 
						
							2019-02-21 16:09:12 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								7d288aafb2 
								
							 
						 
						
							
							
								
								Kernel: Add link() syscall to create hard links.  
							
							... 
							
							
							
							This accidentally grew into a little bit of VFS cleanup as well.
Also add a simple /bin/ln implementation to exercise it. 
							
						 
						
							2019-02-21 13:26:40 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								0aaec6b19a 
								
							 
						 
						
							
							
								
								Support resizing the Terminal app.  
							
							... 
							
							
							
							I set it up so that TIOCSWINSZ on a master PTY gets forwarded to the slave.
This feels intuitively right. Terminal can then use that to inform the shell
or whoever is inside the slave that the window size has changed.
TIOCSWINSZ also triggers the generation of a SIGWINCH signal. :^) 
							
						 
						
							2019-02-20 23:38:20 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								6158f456fa 
								
							 
						 
						
							
							
								
								Kernel: Don't remove from SharedBuffer map while iterating it.  
							
							... 
							
							
							
							This was causing a finalizer crash when handling a process that co-owned
multiple shared buffers. 
							
						 
						
							2019-02-20 21:31:52 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								59b8183c4b 
								
							 
						 
						
							
							
								
								WindowServer: Support resizing windows.  
							
							... 
							
							
							
							This is pretty limited and not entirely stable, but it does work! :^) 
							
						 
						
							2019-02-20 15:34:55 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								7bb00ea1e3 
								
							 
						 
						
							
							
								
								Kernel: socket() with SOCK_CLOEXEC was setting the wrong fd flag.  
							
							... 
							
							
							
							Turns out FD_CLOEXEC and O_CLOEXEC are different values. Silly mistake.
I noticed that Terminal's shell process still had the Terminal's window
server connection open, albeit in a broken state. 
							
						 
						
							2019-02-17 10:41:37 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								cf8dd312ab 
								
							 
						 
						
							
							
								
								Kernel: Fix String leaks in exec().  
							
							... 
							
							
							
							When the kernel performs a successful exec(), whatever was on the kernel
stack for that process before goes away. For this reason, we need to make
sure we don't have any stack objects holding onto kmalloc memory. 
							
						 
						
							2019-02-17 10:18:25 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								df2d46d5dc 
								
							 
						 
						
							
							
								
								Kernel: Add SocketRole::Listener and report the role nicely in /proc/PID/fds.  
							
							
							
						 
						
							2019-02-17 09:40:52 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								2dc0ef8813 
								
							 
						 
						
							
							
								
								Kernel: munmap() should round up to nearest page size, just like mmap().  
							
							... 
							
							
							
							The mismatch between the two was causing some trouble if you'd mmap e.g 1KB
and then try to munmap() it. The kernel would whine that it couldn't find
any such mapping (because mmap() actually rounded the 1KB to a 4KB page.) 
							
						 
						
							2019-02-17 08:33:13 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								809266a9fb 
								
							 
						 
						
							
							
								
								Kernel: Remove tracking of bitmap memory.  
							
							... 
							
							
							
							There are no more kernel bitmaps. It's much better this way. 
							
						 
						
							2019-02-17 01:16:38 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								640360e958 
								
							 
						 
						
							
							
								
								Move WindowServer to userspace.  
							
							... 
							
							
							
							This is a monster patch that required changing a whole bunch of things.
There are performance and stability issues all over the place, but it works.
Pretty cool, I have to admit :^) 
							
						 
						
							2019-02-17 00:13:47 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								4ea28bf0a5 
								
							 
						 
						
							
							
								
								Kernel: Add a simple shared memory API for two processes only.  
							
							... 
							
							
							
							And use this to implement shared bitmaps between WindowServer and clients. 
							
						 
						
							2019-02-16 12:13:43 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								7210d2ade5 
								
							 
						 
						
							
							
								
								Kernel: Remove knowledge about BochsVGADevice from Process.  
							
							
							
						 
						
							2019-02-16 10:40:47 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								468113422f 
								
							 
						 
						
							
							
								
								Kernel: Add ioctls to BochsVGADevice for mode setting and page flipping.  
							
							... 
							
							
							
							Use these in WindowServer instead of poking at the BochsVGADevice directly. 
							
						 
						
							2019-02-16 10:26:01 +01:00