Age | Commit message (Collapse) | Author |
|
And pass the result through to sys$close() return value.
Fixes https://github.com/SerenityOS/serenity/issues/427
|
|
We're going to make use of it in the next commit. But the idea is we want to
know how this File (more specifically, InodeFile) was opened in order to decide
how chown()/chmod() should behave, in particular whether it should be allowed or
not. Note that many other File operations, such as read(), write(), and ioctl(),
already require the caller to pass a FileDescription.
|
|
Since it's often used to pass pointers, it should really be a FlatPtr.
|
|
This was supposed to be the foundation for some kind of pre-kernel
environment, but nobody is working on it right now, so let's move
everything back into the kernel and remove all the confusion.
|
|
|
|
|
|
Since a Region is basically a view into a potentially larger VMObject,
it was always necessary to include the Region starting offset when
accessing its underlying physical pages.
Until now, you had to do that manually, but this patch adds a simple
Region::physical_page() for read-only access and a physical_page_slot()
when you want a mutable reference to the RefPtr<PhysicalPage> itself.
A lot of code is simplified by making use of this.
|
|
The notable piece of code that remains to be converted is Ext2FS.
|
|
This commit is one step forward for pluggable driver modules.
Instead of creating instances of network adapter classes, we let
their detect() methods to figure out if there are existing devices
to initialize.
|
|
|
|
|
|
The PCI access layer was composed of a bunch of virtual functions that
did nothing but call other virtual functions. The first layer was never
overridden so there was no need for them to be virtual.
This patch removes the indirection and moves logic from PCI::Access
down into the various PCI::get_foo() helpers that were the sole users.
|
|
|
|
This patch adds a way for a socket to ask to be routed through a
specific interface.
Currently, this option only applies to sending, however, it should also
apply to receiving...somehow :^)
|
|
|
|
This patch relaxes how we think about UDP packets being "for us" a bit;
the proper way to handle this would be to also check if the matched
socket has SO_BROADCAST set, but we don't have that :)
|
|
This adds IPv4 fragmentation, so now we can send huuuuuuge packets
properly.
|
|
This is not a complete fix, since spurious IRQs under heavy loads can
still occur. However, this fix limits the amount of spurious IRQs.
It is encouraged to provide a better fix in the future, probably
something that takes into account handling of PCI level-triggered
interrupts.
|
|
This change prevents a race condition, in which case we send a command
and we are losing an interrupt.
|
|
Let's rip off the band-aid
|
|
|
|
ioctl can now perform a request for a specific route and change
the address of it's default gateway.
|
|
A new IP address or a new network mask can be specified in the command
line arguments of ifconfig to replace the old values of a given network
adapter. Additionally, more information is being printed for each adapter.
|
|
|
|
|
|
|
|
Use this instead of uintptr_t throughout the codebase. This makes it
possible to pass a FlatPtr to something that has u32 and u64 overloads.
|
|
We unlock/relock around blocking, but outside of that we now keep the
socket locked.
This fixes an intermittent ASSERT(m_can_read) failure.
|
|
Also, GenericInterruptHandler class requires to implement two new
methods.
|
|
Also, duplicate data in dbg() and klog() calls were removed.
In addition, leakage of virtual address to kernel log is prevented.
This is done by replacing kprintf() calls to dbg() calls with the
leaked data instead.
Also, other kprintf() calls were replaced with klog().
|
|
Also, kprintf() calls were replaced with klog() calls.
|
|
|
|
|
|
|
|
|
|
|
|
The Serenity Coding Style tends to not accept the word "get" in
methods' names if possible.
|
|
Those classes will inherit from the PCI::Device class, thus,
they can still implement IRQ handling.
|
|
Suggested by Sergey. The currently running Thread and Process are now
Thread::current and Process::current respectively. :^)
|
|
|
|
|
|
|
|
This was only used by HashTable::dump() which I used when doing the
first HashTable implementation. Removing this allows us to also remove
most includes of <AK/kstdio.h>.
|
|
|
|
This makes it possible to open http://localhost:8000/ in Browser. :^)
|
|
Otherwise the routing decision gets interpreted as "host unreachable."
|
|
Since the routing code currently interprets an all-zero MAC address as
an invalid next hop, let's give the loopback adapter an address.
|
|
|
|
This allows clients to get their EOF after shutting down reading.
|
|
We can now participate in the TCP connection closing handshake. :^)
This implementation is definitely not complete and needs to handle a
bunch of other cases. But it's a huge improvement over not being able
to close connections at all.
Note that we hold on to pending-close sockets indefinitely, until they
are moved into the Closed state. This should also have a timeout but
that's still a FIXME. :^)
Fixes #428.
|