summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-08-09Kernel: Do some basic sanity checking on IPv4 packet headersAndreas Kling
Ignore packets that are too small, or not as large as they claim to be.
2019-08-09Kernel: Merge FooSocketHandle classes into a single SocketHandle<Foo>Andreas Kling
- IPv4SocketHandle => SocketHandle<IPv4Socket> - TCPSocketHandle => SocketHandle<TCPSocket> - UDPSocketHandle => SocketHandle<UDPSocket>
2019-08-09Kernel: Improve some network-related log messagesConrad Pankoff
2019-08-09Kernel: Support binding to INADDR_ANY (all IPs)Conrad Pankoff
2019-08-09Kernel: Implement TCP listening sockets and incoming connectionsConrad Pankoff
2019-08-09Kernel: Let pending socket queue keep socket objects alive until accept()Conrad Pankoff
2019-08-09Kernel: Use WeakPtr<NetworkAdapter> instead of NetworkAdapter* in net codeConrad Pankoff
2019-08-08ProcessManager: Add a "Network" tab with live adapter and socket statsAndreas Kling
This fetches info from /proc/netadapters and /proc/net_tcp, updating every second. Very cool. :^)
2019-08-08GTableView: Debug-log the current column width while resizingAndreas Kling
This makes it easier to decide on a good initial width for a column.
2019-08-08ProcessManager: Tweak memory stats widget layout to fit more textAndreas Kling
After a while, the kmalloc/kfree counts got too wide for the label.
2019-08-08AK: Add Optional<T>(const U&)Andreas Kling
This replaces Optional<T>(U&&) which clang-tidy complained may hide the regular copy and move constructors. That's a good point, clang-tidy, and I appreciate you pointing that out!
2019-08-08Kernel: Reorder some Process members to shrink the class by 8 bytesAndreas Kling
2019-08-08Kernel: Use some more InlineLinkedList range-for iterationAndreas Kling
2019-08-08ProcFS: Remove /proc/kmalloc, that info is already in /proc/memstatAndreas Kling
2019-08-08Kernel: Use range-for with InlineLinkedListAndreas Kling
2019-08-08WindowServer: Use range-for with InlineLinkedListAndreas Kling
2019-08-08AK: Add an iterator class for InlineLinkedListAndreas Kling
This makes it possible to iterate over these with range-for. :^)
2019-08-08Kernel: Turns global Custody and Inode tables into InlineLinkedListsAndreas Kling
Yet more of this same thing. Each one of these patches has a small but noticeable impact on the steady-state kmalloc numbers. :^)
2019-08-08Kernel: Put all Regions on InlineLinkedLists (separated by user/kernel)Andreas Kling
Remove the global hash tables and replace them with InlineLinkedLists. This significantly reduces the kernel heap pressure from doing many small mmap()'s.
2019-08-08Kernel: Put all VMObjects in an InlineLinkedList instead of a HashTableAndreas Kling
Using a HashTable to track "all instances of Foo" is only useful if we actually need to look up entries by some kind of index. And since they are HashTable (not HashMap), the pointer *is* the index. Since we have the pointer, we can just use it directly. Duh. This increase sizeof(VMObject) by two pointers, but removes a global table that had an entry for every VMObject, where the cost was higher. It also avoids all the general hash tabling business when creating or destroying VMObjects. Generally we should do more of this. :^)
2019-08-08Userland: Implement -l, -v, -N, -s, and -p for netcatConrad Pankoff
2019-08-08Userland: Implement nc commandConrad Pankoff
This is a very simple version of the nc (netcat) command. It only supports outgoing TCP connections, and has no options aside from the target host and port.
2019-08-08Kernel: Record network statistics and expose as JSONConrad Pankoff
This is comprised of five small changes: * Keep a counter for tx/rx packets/bytes per TCP socket * Keep a counter for tx/rx packets/bytes per network adapter * Expose that data in /proc/net_tcp and /proc/netadapters * Convert /proc/netadapters to JSON * Fix up ifconfig to read the JSON from netadapters
2019-08-08Kernel: Prevent RST spam when we get an unexpected packetConrad Pankoff
2019-08-07Kernel: Remove unused MemoryManager::remove_identity_mapping()Andreas Kling
This was not actually used and just sitting there being confusing.
2019-08-07FormCompiler: Oops, need to use JsonValue::serialized() for propertiesAndreas Kling
When assigning properties, we were relying on the JSON serialization code to wrap strings in double-quotes ("). JsonValue::to_string() does not wrap string values, so what we want here is serialized(). :^)
2019-08-07ChanViewer: Show "" instead of "undefined" for missing thread subjectsAndreas Kling
This broke due to a change in JsonValue API. JsonValue::to_string() now returns the value serialized to a string, which may become "undefined". You kinda want JsonValue::as_string(), but that is only callable when the JsonValue *is* a string. Thankfully there is now as_string_or(alt).
2019-08-07JsonValue: Add as_string_or(String)Andreas Kling
Return the contained string if the value *is* a string, otherwise it returns the alternative string passed in the parameter.
2019-08-07Kernel: Always give back VM to the RangeAllocator when unmapping RegionAndreas Kling
We were only doing this in Process::deallocate_region(), which meant that kernel-only Regions never gave back their VM. With this patch, we can start reusing freed-up address space! :^)
2019-08-07Kernel: Use KBufferBuilder to build ProcFS files and backtracesAndreas Kling
This is not perfect as it uses a lot of VM, but since the buffers are supposed to be temporary it's not super terrible. This could be improved by giving back the unused VM to the kernel's RangeAllocator after finishing the buffer building.
2019-08-07JSON: Templatize the JSON serialization codeAndreas Kling
This makes it possible to use something other than a StringBuilder for serialization (and to produce something other than a String.) :^)
2019-08-07AK: Add a basic unit test for FileSystemPathAndreas Kling
Just to make sure that things are on the up-and-up.
2019-08-07Kernel: Don't create Function objects in the scheduling codeAndreas Kling
Each Function is a heap allocation, so let's make an effort to avoid doing that during scheduling. Because of header dependencies, I had to put the runnables iteration helpers in Thread.h, which is a bit meh but at least this cuts out all the kmalloc() traffic in pick_next().
2019-08-07Vector: Add a test for growing a Vector beyond its inline capacityAndreas Kling
2019-08-07Kernel: Disable kmalloc backtraces during backtrace generationAndreas Kling
If kmalloc backtraces are enabled during backtracing, things don't go super well when the backtrace code calls kmalloc().. With this fixed, it's basically possible to get all kmalloc backtraces on the debugger by running (as root): sysctl kmalloc_stacks=1
2019-08-07Kernel: Use a FixedArray for VMObject::m_physical_pagesAndreas Kling
This makes VMObject 8 bytes smaller since we can use the array size as the page count. The size() is now also computed from the page count instead of being a separate value. This makes sizes always be a multiple of PAGE_SIZE, which is sane.
2019-08-07AK: Add a FixedArray<T> containerAndreas Kling
This is a simple array wrapper that knows its size. It has begin/end so you can use range-for. It also has a resize() that reallocates.
2019-08-07Kernel: Split VMObject into two classes: Anonymous- and InodeVMObjectAndreas Kling
InodeVMObject is a VMObject with an underlying Inode in the filesystem. AnonymousVMObject has no Inode. I'm happy that InodeVMObject::inode() can now return Inode& instead of VMObject::inode() return Inode*. :^)
2019-08-07Kernel: Remove "allow CPU caching" flag on VMObjectAndreas Kling
This wasn't really thought-through, I was just trying anything to see if it would make WindowServer faster. This doesn't seem to make much of a difference either way, so let's just not do it for now. It's easy to bring back if we think we need it in the future.
2019-08-07Kernel: Remove VMObject namesAndreas Kling
The VMObject name was always either the owning region's name, or the absolute path of the underlying inode. We can reconstitute this information if wanted, no need to keep copies of these strings around.
2019-08-07Vector: Use memcpy when dynamically growing Vectors of trivial typesAndreas Kling
2019-08-07Vector: Use TypedTransfer in more parts of VectorAndreas Kling
Make more Vector-of-trivial-type operations go fast :^)
2019-08-07Vector: Use memcmp for comparing two vectors with trivial elementsAndreas Kling
2019-08-07JsonParser: Scan ahead to find the first special char in quoted stringsAndreas Kling
This allows us to take advantage of the now-optimized (to do memmove()) Vector::append(const T*, int count) for collecting these strings. This is a ~15% speedup on the load_4chan_catalog benchmark.
2019-08-07Vector: Use memmove() for moving trivial types around moreAndreas Kling
This can definitely be improved with better trivial type detection and by using the TypedTransfer template in more places. It's a bit annoying that we can't get <type_traits> in Vector.h since it's included in the toolchain compilation before we have libstdc++.
2019-08-07DiskDevice: Add missing override and remove unnecessary class_name()Andreas Kling
This class needs to be fixed up to not hide the read()/write() virtuals at some point.
2019-08-07AK: Fix -Wconsumed warnings in Optional move-ctor and move-assignAndreas Kling
Our protocol says we have to call has_value() before release_value(). The code was already safe, but the compiler had no way of knowing that.
2019-08-06Meta: Make Serenity run on Bochs once againAndreas Kling
It's now possible to run Serenity inside Bochs by executing "./run b" Note that it only works with a GRUB image (i.e ./build-image-grub.sh)
2019-08-06ELFLoader: Remove an uninteresting debug log messageAndreas Kling
This is showing up at the boundary between kernel and userspace stack frames in backtraces, and looks silly.
2019-08-06Kernel: Add KBufferBuilder, similar to StringBuilder but for KBufferAndreas Kling
This class works by eagerly allocating 1MB of virtual memory but only adding physical pages on demand. In other words, when you append to it, its memory usage will increase by 1 page whenever you append across a page boundary (4KB.)