Commit Graph

4337 Commits

Author SHA1 Message Date
dmex 44a1665734 Update MC and RC and disable cvtres and coff conversions 2026-06-13 20:44:50 -06:00
dmex c0a4919a66 fixes 2026-06-13 20:44:26 -06:00
dmex d640c157b4 fixes 2026-06-13 20:44:26 -06:00
dmex f5cf831109 Initial 2026-06-13 20:44:19 -06:00
Johnny Shaw 515b451a23 guisup revert clipping workaround 2026-06-07 14:22:28 -06:00
Johnny Shaw 0c8673a4b6 OnlineChecks settings update and partner prompt 2026-06-07 13:26:02 -06:00
Johnny Shaw 2d6be64a39 kphuser fix SAL and output zeroing 2026-06-06 15:51:07 -06:00
dmex 4769220c25 Refactor module query flow; remove ELF type
Introduce a more flexible module query system and remove the ELF-specific module type. Key changes:

- Remove PH_MODULE_TYPE_ELF_MAPPED_IMAGE from PH_MODULE_TYPE and delete related usages.
- Add PH_MODULE_QUERY_DATA flags (PH_MODULE_QUERY_FULL, PH_MODULE_QUERY_FILE_ATTRIBUTES) to control work performed by background queries.
- Extend query data with file attribute/status fields and verify-result validity tracking.
- Implement PH_MODULE_KEY, hash and equality funcs to build a temporary hashtable of enumerated modules for efficient removed-module detection.
- Create a lazily-initialized module query work queue (PhpModuleQueryWorkQueue) and route module queries through it; PhpQueueModuleQuery now accepts Flags and avoids duplicate queries via QueryPending.
- PhpModuleQueryWorker now conditionally performs file-attribute queries, verification, and image-coherency checks based on flags and provider/process state; it records results into module items and updates modified state accordingly.
- Adjust provider update logic: use the module-key hashtable to detect removed modules, only queue full verification for non-subsystem processes, and queue file-attribute-only queries for subsystem processes; avoid treating subsystem modules as ELF mapped images.
- Misc: reduce initial list size in PhModuleProviderUpdate and ensure module item timestamps/sizes are updated from file attributes.

These changes aim to reduce unnecessary work for subsystem processes, avoid a separate ELF module kind, and make background querying more efficient and robust.
2026-06-03 17:08:30 +10:00
dmex 4c64d8ffa3 Correct PH_NETWORK_TYPE_MASK to 0x7 2026-06-02 23:46:26 +10:00
dmex 73fc36e9d4 Use SymCryptWipe and fix stateTotalSize fallback 2026-06-02 23:45:55 +10:00
dmex ead9910db9 Fix PCLMUL init and ARM64 shuffle implementations
Use InterlockedCompareExchange when initializing the PCLMUL detection state to avoid a race (replace WriteULongRelease with atomic CAS and adjust local variables). Correct parameter documentation in PhAddFLOAT128 (fix Divisor/Dividend descriptions). Update ARM64 NEON implementations for PhShuffleFLOAT128_2301 and PhShuffleFLOAT128_1032 to produce the correct lane ordering that matches the corresponding _MM_SHUFFLE semantics (adjusted use of vget_low/vget_high and vrev64_f32).
2026-06-02 23:43:59 +10:00
dmex e4ebc3ff4f Vectorize alpha handling and fix bitmap sizes
Fix bitmap size fields and loop bugs and add SIMD optimizations for alpha processing and significantly improve performance for alpha testing and conversion on platforms with SIMD support, while keeping safe fallbacks for other targets.
2026-06-02 23:36:45 +10:00
dmex 6c032deb80 Update phintrin.h 2026-06-02 23:33:55 +10:00
dmex 94551bca08 Add PhSymCryptInitialize 2026-06-02 10:12:25 +10:00
dmex 295484637c Add SIMD wrappers for 256 2026-06-01 11:18:11 +10:00
dmex f78c83cbde Use per-crypto buffer and streaming SHA1
Switch to the SymCrypt streaming API (Init/Append/Result) so the code no longer needs to concatenate inputs into a temporary buffer; on init failure the digest is zeroed. Also add missing PhFree calls in native/non-native MD5/SHA1 branches and a small cleanup in PhGenerateClass5Guid.
2026-06-01 04:38:09 +10:00
dmex 2447dec66d Add PhAddMemoryUlong 2026-06-01 04:36:25 +10:00
dmex 309f34d82c Add PhGetItemPointerList 2026-06-01 04:34:54 +10:00
dmex 397dda6135 Fix various warnings 2026-06-01 04:30:30 +10:00
Johnny Shaw 3ce69f16be syssccpu improve cache lookup 2026-05-28 14:06:18 -06:00
dmex cabbc14652 Update phcrypt.c 2026-05-28 05:06:53 +10:00
dmex 0b5209066a Add buffered paint/theme support and helpers 2026-05-28 05:06:20 +10:00
dmex 979acee0d0 Add parallel hash API and key-handle abstraction
Introduce a parallel multi-hash API and a handle-based asymmetric key abstraction. add types, macros and function prototypes for parallel SHA-256/384/512 batching (init/process/cleanup/get capabilities) and for PH_SYMCRYPT_KEY_HANDLE-based key operations and RSA blob generation. phlib/phcrypt.c: implement the parallel hashing routines (allocation, processing, cleanup) and a BCrypt-like key handle layer (generate/finalize/import/export/sign/verify/destroy) plus RSA/ECDSA blob handling. Also add ntintsafe usage and numerous input validation, integer-overflow and buffer-safety checks (RtlSIZETAdd/Mult, parameter NULL checks, memset initializations) to harden existing cryptographic routines.
2026-05-28 04:40:15 +10:00
dmex 5e353a497b Account for v-scroll, avoid redundant column resize
Adjust available column width calculation to subtract the vertical scrollbar width when WS_VSCROLL is set (using PhGetSystemMetrics). Introduce currentWidth to fetch the existing column width (via PhListView_GetColumn or LVM_GETCOLUMN fallback) and skip resizing if the width already matches. Also short-circuit when available width is below 40 to avoid unnecessary operations, and preserve existing code paths for setting column width via ListViewContext or CallWindowProc.
2026-05-28 04:18:39 +10:00
dmex 17d6111701 Fix rndrrs on ARM and build options 2026-05-24 08:59:04 +10:00
dmex cdfad6b311 Update CMakeLists.txt 2026-05-24 08:37:06 +10:00
dmex e4a316ab56 Update CMakeLists.txt 2026-05-24 04:10:14 +10:00
dmex 0b933cf2c6 Move SymCrypt wrapper into phlib
Move the SymCrypt wrapper sources into phlib while simplifying thirdparty project references.
2026-05-23 18:32:29 +10:00
dmex d2561eec02 Update SymCrypt API and hashing, also add PhGenerateGuidEx and ARM64 RDRAND 2026-05-23 16:54:54 +10:00
dmex b0e7e82feb Update nativeuser.c 2026-05-23 10:49:20 +10:00
dmex 7d3d0c3330 Add PhEqualRect 2026-05-22 16:12:32 +10:00
dmex 6b63dcdee0 Add documentation 2026-05-21 08:55:58 +10:00
dmex 80c6725466 Add ThirdParty SymCrypt header to phlib sdk 2026-05-21 08:29:57 +10:00
dmex f674fcfd89 Update phnative.h 2026-05-21 08:07:54 +10:00
dmex 1aa71ebcf4 Update phintrin.h 2026-05-21 08:06:32 +10:00
dmex 410af838c3 phlib: change listview selection 2026-05-21 06:13:53 +10:00
dmex 9691272db1 Update basesup.c 2026-05-21 05:48:07 +10:00
dmex 0983971180 Improve layout manager and centering
Make various fixes and harden the layout manager:

- Ensure root window gets WS_CLIPCHILDREN|WS_CLIPSIBLINGS if missing to avoid painting issues.
- Add null/rect checks: return NULL when allocation or PhGetWindowRect fail in PhAddLayoutItem/PhAddLayoutItemEx to avoid using invalid items.
- Use FlagOn() for PH_LAYOUT_TAB_CONTROL checks.
- Implement centering logic for items that are anchored to neither side (horizontal and vertical) instead of raising STATUS_NOT_IMPLEMENTED.
- Use SWP_NOREDRAW when moving windows to suppress intermediate redraws, and issue a single RedrawWindow for items with PH_LAYOUT_IMMEDIATE_RESIZE after the deferred batch completes to avoid flicker.
- Minor documentation update and remove an outdated commented hack.

These changes prevent crashes with destroyed windows, fix layout behaviour for unanchored controls, and reduce visual flicker during layout updates.
2026-05-21 05:43:38 +10:00
dmex b65500c470 Update symprv.c 2026-05-21 05:03:28 +10:00
dmex 7fd2fb1988 Update nativepipe.c 2026-05-21 04:45:12 +10:00
dmex a37f955d48 Add ReturnLength to file info query APIs 2026-05-21 04:44:45 +10:00
dmex 444e5e03e8 Add ARM64 random number helper 2026-05-19 02:09:11 +10:00
dmex 43186f04d8 Scope /Gz to C/C++ and add nativesession.c
Use a generator expression ($<$<COMPILE_LANGUAGE:C,CXX>:/Gz>) so the MSVC /Gz (stdcall) compiler flag is applied only for C and C++ compilations. This avoids injecting the option for other languages.
2026-05-18 15:11:04 +10:00
dmex 0b2104b7ed Multiple fixes, typos and enhancements 2026-05-18 13:22:48 +10:00
OrbisAI Security 12d69f4ee0 fix memcpy in phlib/nativefile.c (#2910) 2026-05-18 02:30:00 +10:00
dmex 1263ae4d44 Update guisup.c 2026-05-17 21:08:48 +10:00
dmex d6e26981da Add PhGetProcedureAddressT macro 2026-05-17 11:47:21 +10:00
dmex ec4e0d583e Use raw exit code in ExitProcess_Stub
Stop converting the DOS error to an NT status before calling PhExitApplication in ExitProcess_Stub; pass the original uExitCode directly. This removes the PhDosErrorToNtStatus conversion which could produce an incorrect value and aligns the call with PhExitApplication's expected parameter.
2026-05-17 11:44:15 +10:00
dmex 82e36a96b3 Update phbasesup.h 2026-05-16 16:24:10 +10:00
dmex fc2518bae7 Add support for PH_CREATE_PROCESS_SET_LOGON_ID flag 2026-05-16 16:11:50 +10:00