Commit Graph

589 Commits

Author SHA1 Message Date
83ee24014f [+] IProtocolPiece (public interface)
[+] IProtocolPiece::Remove
[+] IProtocolPiece::ToNextWriter
[+] IProtocolPiece::GetNextPieceBuffer
2022-09-29 11:45:08 +01:00
990d0b7b9c [*] Update hex decode to use stream apis. massive optimization over using .write for each byte. 2022-09-29 10:48:02 +01:00
85c29bb203 [*] base32 encode should take a view over pointer
[*] base64->16 typo
[-] redundant explicit static parsers
2022-09-29 08:58:20 +01:00
efc02d24f7 [*] Refactor RandomDef: bSecure, ::SetQuickRng()
[*] Default initialize net protocols to zero (tcp)
[*] Warning under AuUInt8 &ByteBuffer::operator[](AuUInt idx)
2022-09-27 17:30:26 +01:00
8ec993f4c0 [*] oopsie of a regression. compression bytebuffers became linear after the hack for protocolstack interop 2022-09-25 18:04:41 +01:00
f61d5c3b7a [*] i don't believe yarrow_start is necessary, but just in case, register the yarrows cipher state ahead of rsa/ecc calls 2022-09-25 11:19:43 +01:00
cae8788bb6 [-] Redundant AuCrypto::EHashType (replaced with the complete AuHashing::EHashType)
[*] Minor RSA refactor
2022-09-25 10:56:03 +01:00
0ded2ec77c [*] potential bug in x25519 sign: was using the linear base ptr instead of write after alloc or validate
[*] old copy/pasted ecdh function clearly wasnt tested in its now form :(
[*] clean up
2022-09-25 09:28:48 +01:00
184fecb8ab [*] ByteBuffer::begin() and ::end() now guarantee a linear view of available bytes in either ring or linear bytebuffers. This means ::begin() is no longer guranteed to return the base. In almost all real world use cases, this does not matter. In fact, this is what we want to preserve legacy code with streamable buffers.
[*] Update KCryptoAES: use streamable buffers. deprecate legacy vec<8>::size() based logic - AuByteBuffer (replacing vec8)::begin, ::end still works.
[*] IO pipe buffers should no longer be marked as circular
2022-09-25 09:10:26 +01:00
1de0bdb4e7 [*] NT ReadFile: replace GENERIC_READ, FILE_SHARE_READ with GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE
[*] ByteBuffer::IsValid() will now return true if there is no underlying buffer so long as the object is marked with the dynamic scaling flag (no contents isnt an invalid state; alloc failure on construct and ad-hoc failure is. latterly, specify the write flag on failure in the ByteBuffer::Write method.) the alloc error can be safely unwound by state raii helpers bc realloc and frens will not free or dirty the state. write-fail-aware may roll back the write head, like how readers can roll back the read head if the stream is incomplete.
2022-09-23 00:59:08 +01:00
6ac4fd61ab [*] Went over baseN and RSA again 2022-09-19 21:34:54 +01:00
c36f159f95 [+] Added asserts in Digests.cpp and HashStream.cpp for good measure
[*] Fix: eRMD320 was crossed with some other done function
2022-09-19 07:18:44 +01:00
50a3ee76f6 [*] transition parse apis that use the old bytebuffer write-into semantics 2022-09-19 07:08:32 +01:00
a7bb5507bb [*] remove dumb key sharing between private and public rsa keys 2022-09-19 07:01:30 +01:00
050e938f0c [*] transition some of the old vector based AuByteBuffer APIs to be stream aware
[*] fix: runnersRunning was uninitialized
[*] fix: unimplemented path in GetOrAllocateLinearWriteable
2022-09-19 06:42:39 +01:00
8a2947ffc5 [+] RMD128+BScFwd based HashCash (bcrypt DoS mitigation, acc creation, antibot, etc)
[*] Refactor bcrypt api: HashPW[Ex] -> HashPassword[Ex]
[+] ByteBuffer::GetOrAllocateLinearWriteable
[+] ByteBuffer::Can[Read/Write](n)
[+] ByteBuffer::GetLinear[Read/Writable]able(n)
[*] Split RNG.cpp into two files
[+] EHashType::eSHA2_48 (_32, _64 was already in place. missed 48/384 bit)
[+] AuCrypto::HMAC and IHMACContext
(AuHashing)
[+] EHashType::eSHA3_28
[+] EHashType::eSHA3_32
[+] EHashType::eSHA3_48
[+] EHashType::eSHA3_64
(AuCrypto)
[+] EHashType::eSHA2_48_384
[+] EHashType::eSHA2_64_512
[+] EHashType::eSHA3_28_224
[+] EHashType::eSHA3_32_256
[+] EHashType::eSHA3_48_384
[+] EHashType::eSHA3_64_512
[*] (IRandomDevice) class -> struct
[*] Bugfix: cast in Promise<SuccessValue_t, ErrorValue_t>::WriteIntoError
[+] Missing AuHashing namespace alias
[*] Time util: pad ms when fraction of a second to 3 digits
2022-09-19 02:34:57 +01:00
8844e8fe64 [+] AuCrypto::BCrypt
> GetForcedMinRounds
> GenSalt
> HashPW
> HashPWEx
> CheckPassword
> CheckPasswordEx
[*] Refactor AuCompression APIs
[*] Clean up AuTryConstructs
[+] Internal compression API for compression based interceptors
[+] Root-level input stream arg check for all compression apis (harden)
[*] Clean up AuCompression code
[+] Solar Designer / OpenWall blowfish crypt
[*] BlowCrypt: accept length input parameter
[*] Split locale into 2 source files
[-] Ugly comment from Open.Win32.cpp. TODO: Readd later. Might warn on empty string bc it makes sense given, "." and "/" normalizes to nothing, and memory pre-idc-if-drops are dropped siliently.
2022-09-15 20:48:50 +01:00
9c25b112a3 [+] Config: DebugConfig::bIsMemoryErrorFatal
[*] Refactor Aurora::DebugConfig
2022-09-12 23:38:44 +01:00
7c167c90f0 [*] Harden IOPipeProcessor for expansion 2022-09-09 22:54:24 +01:00
01871aee61 [*] Fix clipboard method to work with older noncan apps. still doesnt work under windows terminal 2022-09-09 21:47:53 +01:00
7bfa7911cf [*] Fix: win32 console - copy/paste scroll bug 2022-09-09 21:32:10 +01:00
96e7d5cbcc [*] Linux build error: AuProtocol::ProtocolStack 2022-09-04 16:58:54 +01:00
2a3bd735ac [+] AuProtocol: PrependInterceptor[Ex]/AppendInterceptor[Ex] over now removed AddInterceptor[Ex]
(prepend makes sense for outbound stacks, where you might register the compression/crypto stages first, then return an object to the caller who may wish to prepend the input processors. http might need it.)
2022-09-04 01:18:05 +01:00
af03c5cbf3 [+] IProtocolStack::AddEndInterceptor (optimizes away the output stage buffer, instead of preallocating a massive ring buffer, when the AddInterceptorEx variant is supplied with a uOutputBufferSize of zero)
[*] Typo iServerBadMacLimit
2022-09-02 20:58:56 +01:00
795e5f6569 [*] Net: Unmerged Linux changes 2022-08-31 19:49:35 +01:00
ad4b4aa4ae [*] TLS init for later 2022-08-31 18:46:50 +01:00
f1ac21a379 [+] TLSErrorToString
[*] Send break should always perserve writeptr
2022-08-31 16:09:45 +01:00
2b72228b9e [*] TLS Stack: use new AuByteBuffer apis 2022-08-31 00:06:50 +01:00
d68fc7fc91 [+] ByteBuffer::GetNextLinearRead()
[+] ByteBuffer::GetNextLinearWrite()
[-] ByteBuffer::WriterTryGetWriteHeadFor
[+] ITLSPrivateKeyPair
[+] ITLSContext::GetFatalErrorCodeAsString()
[+] Begin to add certificate chains
[*] Clean up TLS
2022-08-30 22:18:15 +01:00
afa7c8f5f8 [+] TLS::GetDefaultCipherSuites
[+] TLS::GetSupportedCipherSuites
[+] TLS::CipherSuiteFromString
[+] TLS::CipherSuiteToString
[+] internal logic for setting up the ciphersuite array
2022-08-29 19:57:24 +01:00
401cf09962 [*] Cleanup/refactor of AuIO 2022-08-29 16:46:46 +01:00
fa0d46d4c7 [+] Protocol::NewProtocolStackFromPipe 2022-08-29 12:09:53 +01:00
b729e92dd4 [*] Unmerged Linux Entrypoint.cpp 2022-08-29 11:07:27 +01:00
747988e85c [*] Protocol stacks werent allocating ring buffers
[*] Unmerged Linux async changes
2022-08-29 00:39:12 +01:00
67905a4192 [+] Network + Protocol + TLS - Initial Commit
=============================================================================
Network ]====================================================================
=============================================================================

[+] Added (very) early Aurora::IO::Net implementation
[+] AuNet::EHostnameType
[+] AuNet::EIPProtocol
[+] AuNet::ENetworkError
[+] AuNet::ETransportProtocol
[+] AuNet::INetInterface
[+] AuNet::INetSrvDatagram
[+] AuNet::INetSrvResolve
[+] AuNet::INetSrvSockets
[+] AuNet::INetSrvWorkers
[+] AuNet::INetWorker
[+] AuNet::IPAddress
[+] AuNet::IResolver
[+] AuNet::ISocket
[+] AuNet::IResolver
[+] AuNet::ISocketBase
[+] AuNet::ISocketChannel
[+] AuNet::ISocketDriver
[+] AuNet::ISocketDriverFactory
[+] AuNet::ISocketServer
[+] AuNet::ISocketServerDriver
[+] AuNet::NetEndpoint
[+] AuNet::NetError
[+] AuNet::NetHostname
(+implementation)

=============================================================================
Protocol ]===================================================================
=============================================================================

[+] IProtocolInterceptor
[+] IProtocolInterceptorEx
[+] IProtocolStack
(+implementation)

=============================================================================
TLS ]========================================================================
=============================================================================

[+] ITLSContext
[+] TLSProtocolRecv
[+] TLSProtocolSend
(+implementation)

=============================================================================
IO Bug Fixes ]===============================================================
=============================================================================

[*] IOProcessor::SubmitIOWorkItem should signal the CvEvent, forcing at least once future tick (wont optimize with if in tick & not yet dispatched work items)
[*] Split IOPipeWork in into IOPipeProcessor header
[+] IOPipeWork::GetBuffer (internal reallocation)
[*] Harden against IAsyncTransactions without a loop source
[*] Missing null `if (processor->listener)` in IOProcessor
[*] Solved some soft-lock conditions under Linux's LoopQueue (added deferred commits)
[*] Quick hack: IOProcessor::HasItems() should OR the early can-tick check function.

=============================================================================
Other ]======================================================================
=============================================================================

[+] Linux: LSSignalCatcher
[+] `static void AuResetMember(Aurora::Memory::ByteBuffer &ref)` for AuROXTL
[*] Attempt to enforce a normalization and don't overwrite-readptr-under-istreamwriters policy in ByteBuffer_ReadWrite (circular buffers)
[*] Bad ECC ctors

=============================================================================
Known issues ]===============================================================
=============================================================================

> Linux net is nowhere near done
> UDP socket emulation layer isn't implemented
> Ciphersuite API is a stub
> Private key API is a stub
> ...therefore no TLS servers
> Missing thread safety precautions under net
> Net implementation is still beri early
2022-08-28 20:02:06 +01:00
b6b4ef5dd1 [*] Linux: bDirectIO wasn't enabling O_DIRECT (dumb)
[*] Fixed build errors post refactor
[*] Don't create an epoll for a read-poll, reuse fd
[+] AuByteBuffer:Allocate(AuUInt length, AuUInt alignment)
[*] NT+Linux: Ensure IO buffers are aligned to AuHwInfo::GetPageSize()
2022-08-21 04:38:49 +01:00
1341f805b0 [*] Lite clean up/Refactor 2022-08-20 07:53:48 +01:00
42b364840e [*] Cleanup Async.NT.cpp
[*] Fix bug in IOProcessor where work items were not enough to cont execution in a loop checking ::HasItems
[+] PromiseCallbackFunctional constructor with one functor arg
2022-08-18 17:19:32 +01:00
7be001eb61 [*] Trivial fail condition leak 2022-08-16 23:58:18 +01:00
57d31e0212 [*] Adjust comedically small compression chunk buffer size. I guess 64k for a compressor isn't so bad. I'm under the impression all compression libs buffer internally such that the external stream buffer does not matter - maybe this is overkill. 2022-08-15 06:16:50 +01:00
cdb10eb3c6 [*] Refine Linux threads... They were still problematic :( 2022-08-15 03:31:35 +01:00
2e5742dd2f [*] Harden Process Section APIs
[*] Refactor IProcessSectionView::MapIPCMemory length type to machine word
2022-08-15 00:41:43 +01:00
58d53c92c1 [*] Move setjmp to beginning of task invoker function for Linux thread kills 2022-08-15 00:00:52 +01:00
e30e004d04 [*] It'll complain but this shutsdown (with grug crying) relatively cleanly 2022-08-14 22:09:25 +01:00
7fd217a50e [*] Various teardown related fixes/changes under UNIX 2022-08-14 14:41:19 +01:00
0fe4ad2087 [*] Wouldn't it be cool if Linux could safely exit under other conditions without core dumping? 2022-08-14 12:01:54 +01:00
88887434ae [+] IAuroraThread::UnsafeForceTerminateSignal 2022-08-14 00:32:39 +01:00
b886100fc4 [*] Unix map memory bug derived from improper single UNIX+NT patch 2022-08-14 00:23:12 +01:00
c74f1e8bd1 [*] Fix Win32 input bug 2022-08-14 00:00:08 +01:00
30da4bce04 [*] Fixup schedule failure rejection. Fixes crash during safe/good clean up. 2022-08-13 22:59:44 +01:00
d03488eeb0 [+] NT ConsoleStd case: VK_END
[*] Fix NT ConsoleStd: check control state no matter the input type
2022-08-13 22:06:31 +01:00
9aa65a0bda [*] Amend NT IPC memory map 2022-08-13 21:35:19 +01:00
49214dd6f3 [+] Additional keycodes under UNIX ConsoleTTY
[+] Try/catch around LIOS_Process to prevent external exceptions from trashing core io components
2022-08-13 18:32:14 +01:00
1a4fa2d2ff [*] im low iq 2022-08-13 06:10:01 +01:00
fe19a47a2a [+] Missing external class if iterative/codepoint length locale apis
[+] (internal) UTF8::IterateUTF8
2022-08-13 06:03:24 +01:00
592a93c19d [*] Ugly hack: Add additional keys to the win32 wVirtualKeyCode StdConsole tick 2022-08-12 23:17:30 +01:00
51facdb6a3 [+] IProcessSectionView::MapIPCMemory now takes a 'length' parameter 2022-08-11 12:28:20 +01:00
f98174b7a2 [*] IOSubmit.Linux.cpp bugfix: save wasted time cancelling triggered polls resulting in a -1 EINVAL 2022-08-10 18:01:02 +01:00
868de46abd [+] Installed Linux PR_SET_PDEATHSIG hook into eSpawnChildProcessWorker's to better emulate Win32 job workers 2022-08-10 16:36:03 +01:00
b987384d58 [+] chroot after fork. also, removed todos about clone (wont support). the old unix behaviour works fine 2022-08-10 16:05:22 +01:00
eb144f7377 [+] Quick support for IProcessSectionView on Linux 2022-08-10 12:12:36 +01:00
eda8d4255d [+] IProcessSectionMapView
[+] IProcessSectionView (downgraded bc NT)
2022-08-10 10:50:49 +01:00
64cb7404ba [+] Near 1:1 Linux IPC Pipe compared to the NT equivalent (~= CreateNamedPipeA(nMaxInstances=1, dwOpenMode=PIPE_ACCESS_DUPLEX, dwPipeMode=PIPE_TYPE_BYTE))
[+] Ability to bypass blocking limitation of certain io_submit reads, if the blocking subsystem is a pollable stream (ie: a pipe).
[*] Fixed major Linux bug where LoopQueue items weren't being submitted, if no dequeues were in the same tick
[*] Fix various Linux pipe related bugs
[*] Fix futex bug where the callback was nulled on server-release
2022-08-09 07:48:29 +01:00
d60176afb3 [*] NT IPCPipe: fix up renegotiation after termination 2022-08-09 07:16:09 +01:00
03f072f8d6 [*] BUG: OnPipePartialEvent wasn't sent during IOPipeProcessor ticks (common/all platforms)
[*] Build regression: Win32 clipboard-mode-switcher routines weren't ifdef'd out on non-nt pltforms
2022-08-09 01:55:18 +01:00
13480a0473 [*] NT bug fix: pipe breakages were occurring as a non-block instant readfileex operation, and didn't simulate an async read 0 success.
[*] IOProcessor's stop method now returns true on success instea of true on delegated stop
2022-08-08 16:32:45 +01:00
e42efe930c [+] ConsoleStd: Noncanonical input interprets right click as paste 2022-08-08 01:33:32 +01:00
1510beaf49 [*] Superficially fix the ConsoleTTY redraw issue on initial overflow by removing an optimization 2022-08-08 00:22:15 +01:00
5b5b6fa920 [*] Solve NT build regression introduced in a Linux commit 2022-08-07 23:42:13 +01:00
da70053aab [+] Win32 clipboard update check under the ConsoleStd pump to automatically switch between quick edit and gib us the raw input modes 2022-08-07 23:35:13 +01:00
a92467ceb6 [*] Solve UNIX bug: the call to NewOSNamedEventDirectorySinkRelease was disabled under POSIX 2022-08-07 07:37:28 +01:00
5dd2be4763 [+] New Linux futex based IPCMutex to better ensure robust breakage 2022-08-07 07:01:55 +01:00
c730d4fc58 [*] Fix: IOPipeProcessor will now report a failure on nominal stream-end, if non-zero request length was not met 2022-08-06 20:56:21 +01:00
331f139fdd [*] Fix: Termination of Linux C++ code without C++ land whining about NPTL no-rethrow 2022-08-06 20:53:21 +01:00
9c90e96dee [+] Missing ConsoleTTY::IsBuffering() under NT 2022-08-05 19:25:01 +01:00
4ca490e4f3 [*] nt bug? 2022-08-05 11:41:48 +01:00
0a66e6741b [+] Add IOSleep, IOYieldFor utility functions
[*] Add/clean up header comments
2022-08-05 11:28:34 +01:00
a1e479e28e [+] Begin work on UNIX noncanonical input. Currently hacking into the codebase to wrangle minimum viable product 2022-08-04 20:29:41 +01:00
21902a5d5b [+] AuParse::[Stringify/Parse][U/S]Int[16] class of parse APIs
[*] Optimize UNIX IPC ABI: Handle String encodes an array of U16s to optimize space. Could still be better.
2022-08-04 14:08:12 +01:00
e4e0af2f1d [*] Reset stream out variable sooner under filestream 2022-08-02 13:29:01 +01:00
bfd9e339fc [*] Clean up of include headers 2022-08-02 05:58:00 +01:00
fd0c5b51b2 Further Linux support
[+] Begin work on IO futexes for io release on process/thread exit
[+] Linux ::readdir iteration
[+] AuConsole buffering API
[*] Fix sleep as to not get interrupted by signals
[*] Switch the type of FS lock used under Linux
[*] Linux: Use new IPCHandle encoding scheme
[*] Fix undefined behaviour: unintialized timeout values (AuLoop/Linux)
[*] Fix undefined behaviour: ConsoleTTY clear line was called of a color of a random value on stack
[-] Remainings of std dir iterator
[*] Fix pthread_kill (aka send signal to pthread handle) always kills process. This is what you expect bc signal handler inheritance.
[*] Reformat the build Aurora.json file
[+] Added clang warning ignores to the build file
[*] Fix: UNIX need to use STDOUT_FILENO. Was using CRT handle in place of fd by mistake.
[+] Linux implementation for IO yield (AuIO::IOYield() - UNIX::LinuxOverlappedYield())
[*] Fix: Linux async end of stream processing. res 0 = zero bytes consumed. <= was detecting this as an error of code 0. Should succeed with zero bytes.
[+] Linux LoopQueue missing epilogue hook for the IO processor
[*] Various refactors and minor bug fixes
[*] Linux fix: Handle pipe EOS as zero
[*] Linux fix: thread termination via a user signal of 77. Need a force terminate.
[*] IPC handle: fix improper int to bool cast in the header setup within ToString
[*] Linux fix: HWInfo CPU topology regression
[-] Linux fix: remove SIGABRT handler
[*] Missing override in compression, exit, and consoletty headers.
[+] Unix Syslog logger backend
2022-08-02 05:52:57 +01:00
b8bcab1bdc [+] IReadDir
[+] AuIOFS::ReadDir
[*] Fix erroneous return false under fs remove (NT)
2022-07-23 07:41:47 +01:00
2470cbc12a LAAAAAIIIIIIIIN 2022-07-21 23:23:16 +01:00
1f2599f66b [+] Heap::AllocateDivision
[+] AuHeap::RequestHeapOfRegion(void *, size_t)
2022-07-21 10:59:02 +01:00
da51aaf6a7 [*] sleep deprived 2022-07-21 07:34:55 +01:00
ec4b47c15d [*] Increase IPCHandle checksum bitlength 2022-07-21 07:30:25 +01:00
e24c35d2d0 [*] fix ipc handle checksum rng 2022-07-21 07:25:45 +01:00
febd836d99 [+] Improved IPCHandle implementation 2022-07-21 07:19:45 +01:00
cb2b58eb52 [+] bool Aurora::Console::ConsoleStd::IsStdOutTTY[(AuUInt handle), ()]]
[+] Check for TTY validity on ConsoleTTY start
2022-07-21 01:25:38 +01:00
ad4c18abe7 [+] Missing LZ4 compressor
[*] Various compression related bugs under the 1/4th of the AuCompression platform related to compression stream objects. Now all 1/4ths match up.
2022-07-20 21:09:40 +01:00
8fb7b7e1ee [*] IOPipeProcessor improvements
[*] NT async file: error 38 "Reached the end of the file." should be handled as a zero length packet much like ERROR_BROKEN_PIPE for stream read interface consistency
2022-07-20 15:10:07 +01:00
433898709e [*] Check for null handle under LSHandle bc win32 apis are inconsistent as shit
[*] _beginthreadex returns null, nonex returns -1, and it doesnt fucking work with affinity but seems to work with name updates. i dont care to fix this yet. fuck microsoft.
[*] NT: preempt process watch thread of leaders instead of syncing to the process under a watch guard on free (evil, we should use a builtin nt threadpool. also cant be arsed to resolve)
2022-07-08 22:58:49 +01:00
11e5c04bac [*] Update AuParse again. The IO character update was barely shimed in. 2022-07-07 06:42:20 +01:00
f2791e360b [+] Added end of loop queue poll hook for IO Processor frame tick batching 2022-07-06 04:47:27 +01:00
7fb73ccdb4 [+] IPC Logger: Added optional stream frame header (single u32) option
[*] FIX: Missing `this->isStream = isStream;`
[*] FIX: Blocking APIs under async objects under NT were using illegal calls that were for some reason not failing
2022-07-05 20:48:33 +01:00
c20b802da7 [*] "Improve" (bug fix) and "clean up" (hardly) legacy simple parse list tokenizer 2022-07-05 05:58:27 +01:00
97069a1515 [*] Undo fail on pipe broken, restore bytes written = zero behavior for reusable pipes. Will match on Linux. 2022-07-05 04:17:28 +01:00
c0ee48435c [*] More IO bug fixes; a double free, statement that should be uncommented, and wrong IO handle under Async.NT.cpp read 2022-07-04 23:42:02 +01:00
ee07505952 [*] Fix win32 cwd under processes 2022-07-04 03:24:34 +01:00