ladybird/Kernel/Devices
kleines Filmröllchen f6af357763 Kernel/Audio: Fix buffer size underflow for non-page-aligned sizes
When the size of the audio data was not a multiple of a page size,
subtracting the page size from this unsigned variable would underflow it
close to 2^32 and be clamped to the page size again. This would lead to
writes into garbage addresses because of an incorrect write size,
interestingly only causing the write() call to error out.

Using saturating math neatly fixes this problem and allows buffer
lengths that are not a multiple of a page size.
2022-06-23 23:26:33 +01:00
..
Audio Kernel/Audio: Fix buffer size underflow for non-page-aligned sizes 2022-06-23 23:26:33 +01:00
HID Kernel/HID: Take a spinlock when calling KeyboardClient::on_key_pressed 2022-05-06 18:05:14 +02:00
AsyncDeviceRequest.cpp Kernel: Convert Processor::in_irq() to static current_in_irq() 2021-08-23 00:02:09 +02:00
AsyncDeviceRequest.h Kernel: Allow WorkQueue items allocation failures propagation 2022-04-20 19:47:18 +02:00
BlockDevice.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
BlockDevice.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
CharacterDevice.cpp Kernel: Use default constructors/destructors 2022-03-17 00:51:36 -07:00
CharacterDevice.h Kernel: Make major and minor numbers to be DistinctNumerics 2021-12-23 23:02:39 +01:00
ConsoleDevice.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
ConsoleDevice.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Device.cpp Kernel/SysFS: Migrate components code from SysFS.cpp to the SysFS folder 2022-06-17 11:01:27 +02:00
Device.h Kernel/SysFS: Migrate components code from SysFS.cpp to the SysFS folder 2022-06-17 11:01:27 +02:00
DeviceControlDevice.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
DeviceControlDevice.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
DeviceManagement.cpp Kernel: Add DeviceManagement::try_for_each() for fallible iteration 2022-02-27 20:37:57 +01:00
DeviceManagement.h Kernel: Add DeviceManagement::try_for_each() for fallible iteration 2022-02-27 20:37:57 +01:00
FullDevice.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
FullDevice.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
KCOVDevice.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
KCOVDevice.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
KCOVInstance.cpp Kernel: Propagate overflow errors from Memory::page_round_up 2021-12-28 23:08:50 +01:00
KCOVInstance.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
MemoryDevice.cpp Kerenl/Firmware: Add map_ebda and map_bios methods in the original place 2022-06-17 11:01:27 +02:00
MemoryDevice.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
NullDevice.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
NullDevice.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
PCISerialDevice.cpp Kernel/PCI: Don't hold spinlocks when doing fast device enumeration 2022-03-14 22:39:09 +01:00
PCISerialDevice.h Kernel: Remove the kmalloc_eternal heap :^) 2021-12-28 21:02:38 +01:00
PCSpeaker.cpp Kernel: Move x86 IO instructions code into the x86 specific folder 2021-10-01 12:27:20 +02:00
PCSpeaker.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
RandomDevice.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
RandomDevice.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
SelfTTYDevice.cpp Kernel: Create SelfTTYDevice class to help replace /dev/tty symlink 2022-03-22 20:26:05 +01:00
SelfTTYDevice.h Kernel: Create SelfTTYDevice class to help replace /dev/tty symlink 2022-03-22 20:26:05 +01:00
SerialDevice.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
SerialDevice.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
ZeroDevice.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
ZeroDevice.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00