From 480b33f208a333f2c5dceab96a69a7e8be2cdb9c Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Sat, 10 Mar 2018 19:58:54 +1100 Subject: [PATCH] Add patchset for FltRegisterFilter, FltStartFiltering, FltUnregisterFilter stubs --- .../0001-include-ddk-Add-fltkernel.h.patch | 706 ++++++++++++++++++ ...ltmgr.sys-Add-FltRegisterFilter-stub.patch | 58 ++ ...ltmgr.sys-Add-FltStartFiltering-stub.patch | 42 ++ ...mgr.sys-Add-FltUnregisterFilter-stub.patch | 39 + patches/fltmgr.sys-filters/definition | 2 + patches/patchinstall.sh | 227 +++--- 6 files changed, 978 insertions(+), 96 deletions(-) create mode 100644 patches/fltmgr.sys-filters/0001-include-ddk-Add-fltkernel.h.patch create mode 100644 patches/fltmgr.sys-filters/0002-fltmgr.sys-Add-FltRegisterFilter-stub.patch create mode 100644 patches/fltmgr.sys-filters/0003-fltmgr.sys-Add-FltStartFiltering-stub.patch create mode 100644 patches/fltmgr.sys-filters/0004-fltmgr.sys-Add-FltUnregisterFilter-stub.patch create mode 100644 patches/fltmgr.sys-filters/definition diff --git a/patches/fltmgr.sys-filters/0001-include-ddk-Add-fltkernel.h.patch b/patches/fltmgr.sys-filters/0001-include-ddk-Add-fltkernel.h.patch new file mode 100644 index 00000000..c839189f --- /dev/null +++ b/patches/fltmgr.sys-filters/0001-include-ddk-Add-fltkernel.h.patch @@ -0,0 +1,706 @@ +From 1251e9e48ba25b1cfe032e9f47f7f245e27b40d3 Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Fri, 9 Mar 2018 15:02:09 +1100 +Subject: [PATCH] include/ddk: Add fltkernel.h + +This also updates fltmgr.sys to use this new file. + +Signed-off-by: Alistair Leslie-Hughes +--- + dlls/fltmgr.sys/main.c | 5 +- + include/ddk/fltkernel.h | 667 ++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 669 insertions(+), 3 deletions(-) + create mode 100644 include/ddk/fltkernel.h + +diff --git a/dlls/fltmgr.sys/main.c b/dlls/fltmgr.sys/main.c +index 70ee30728f..09c89a1e2f 100644 +--- a/dlls/fltmgr.sys/main.c ++++ b/dlls/fltmgr.sys/main.c +@@ -25,9 +25,8 @@ + #include "windef.h" + #include "winbase.h" + #include "winternl.h" +-#include "ddk/ntddk.h" +-#include "ddk/ntifs.h" +-#include "ddk/wdm.h" ++#include "ddk/fltkernel.h" ++ + #include "wine/debug.h" + + WINE_DEFAULT_DEBUG_CHANNEL(fltmgr); +diff --git a/include/ddk/fltkernel.h b/include/ddk/fltkernel.h +new file mode 100644 +index 0000000000..fb0c4c3c3c +--- /dev/null ++++ b/include/ddk/fltkernel.h +@@ -0,0 +1,667 @@ ++/* ++ * Copyright (C) 2018 Alistair Leslie-Hughes ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2.1 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA ++ */ ++#ifndef __FLTKERNEL__ ++#define __FLTKERNEL__ ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++#include "ntifs.h" ++ ++typedef struct _FLT_FILTER *PFLT_FILTER; ++typedef struct _FLT_INSTANCE *PFLT_INSTANCE; ++typedef ULONG FLT_CALLBACK_DATA_FLAGS; ++typedef USHORT FLT_CONTEXT_REGISTRATION_FLAGS; ++typedef USHORT FLT_CONTEXT_TYPE; ++typedef ULONG FLT_FILE_NAME_OPTIONS; ++typedef ULONG FLT_FILTER_UNLOAD_FLAGS; ++typedef ULONG FLT_INSTANCE_QUERY_TEARDOWN_FLAGS; ++typedef ULONG FLT_INSTANCE_SETUP_FLAGS; ++typedef ULONG FLT_INSTANCE_TEARDOWN_FLAGS; ++typedef ULONG FLT_NORMALIZE_NAME_FLAGS; ++typedef ULONG FLT_OPERATION_REGISTRATION_FLAGS; ++typedef ULONG FLT_POST_OPERATION_FLAGS; ++typedef ULONG FLT_REGISTRATION_FLAGS; ++typedef void* PFLT_CONTEXT; ++ ++ ++#define FLT_VOLUME_CONTEXT 0x0001 ++#define FLT_INSTANCE_CONTEXT 0x0002 ++#define FLT_FILE_CONTEXT 0x0004 ++#define FLT_STREAM_CONTEXT 0x0008 ++#define FLT_STREAMHANDLE_CONTEXT 0x0010 ++#define FLT_TRANSACTION_CONTEXT 0x0020 ++ ++#define FLTFL_OPERATION_REGISTRATION_SKIP_PAGING_IO 0x00000001 ++#define FLTFL_OPERATION_REGISTRATION_SKIP_CACHED_IO 0x00000002 ++#define FLTFL_OPERATION_REGISTRATION_SKIP_NON_DASD_IO 0x00000004 ++ ++#define FLTFL_INSTANCE_TEARDOWN_MANUAL 0x00000001 ++#define FLTFL_INSTANCE_TEARDOWN_FILTER_UNLOAD 0x00000002 ++#define FLTFL_INSTANCE_TEARDOWN_MANDATORY_FILTER_UNLOAD 0x00000004 ++#define FLTFL_INSTANCE_TEARDOWN_VOLUME_DISMOUNT 0x00000008 ++#define FLTFL_INSTANCE_TEARDOWN_INTERNAL_ERROR 0x00000010 ++ ++/* Belongs in fltuserstructures.h */ ++typedef enum _FLT_FILESYSTEM_TYPE ++{ ++ FLT_FSTYPE_UNKNOWN, ++ FLT_FSTYPE_RAW, ++ FLT_FSTYPE_NTFS, ++ FLT_FSTYPE_FAT, ++ FLT_FSTYPE_CDFS, ++ FLT_FSTYPE_UDFS, ++ FLT_FSTYPE_LANMAN, ++ FLT_FSTYPE_WEBDAV, ++ FLT_FSTYPE_RDPDR, ++ FLT_FSTYPE_NFS, ++ FLT_FSTYPE_MS_NETWARE, ++ FLT_FSTYPE_NETWARE, ++ FLT_FSTYPE_BSUDF, ++ FLT_FSTYPE_MUP, ++ FLT_FSTYPE_RSFX, ++ FLT_FSTYPE_ROXIO_UDF1, ++ FLT_FSTYPE_ROXIO_UDF2, ++ FLT_FSTYPE_ROXIO_UDF3, ++ FLT_FSTYPE_TACIT, ++ FLT_FSTYPE_FS_REC, ++ FLT_FSTYPE_INCD, ++ FLT_FSTYPE_INCD_FAT, ++ FLT_FSTYPE_EXFAT, ++ FLT_FSTYPE_PSFS, ++ FLT_FSTYPE_GPFS, ++ FLT_FSTYPE_NPFS, ++ FLT_FSTYPE_MSFS, ++ FLT_FSTYPE_CSVFS, ++ FLT_FSTYPE_REFS, ++ FLT_FSTYPE_OPENAFS ++} FLT_FILESYSTEM_TYPE, *PFLT_FILESYSTEM_TYPE; ++ ++typedef struct _FLT_NAME_CONTROL ++{ ++ UNICODE_STRING Name; ++} FLT_NAME_CONTROL, *PFLT_NAME_CONTROL; ++ ++typedef enum _FLT_PREOP_CALLBACK_STATUS ++{ ++ FLT_PREOP_SUCCESS_WITH_CALLBACK, ++ FLT_PREOP_SUCCESS_NO_CALLBACK, ++ FLT_PREOP_PENDING, ++ FLT_PREOP_DISALLOW_FASTIO, ++ FLT_PREOP_COMPLETE, ++ FLT_PREOP_SYNCHRONIZE, ++ FLT_PREOP_DISALLOW_FSFILTER_IO ++} FLT_PREOP_CALLBACK_STATUS, *PFLT_PREOP_CALLBACK_STATUS; ++ ++typedef enum _FLT_POSTOP_CALLBACK_STATUS ++{ ++ FLT_POSTOP_FINISHED_PROCESSING, ++ FLT_POSTOP_MORE_PROCESSING_REQUIRED, ++ FLT_POSTOP_DISALLOW_FSFILTER_IO ++} FLT_POSTOP_CALLBACK_STATUS, *PFLT_POSTOP_CALLBACK_STATUS; ++ ++typedef struct _FLT_RELATED_CONTEXTS ++{ ++ PFLT_CONTEXT VolumeContext; ++ PFLT_CONTEXT InstanceContext; ++ PFLT_CONTEXT FileContext; ++ PFLT_CONTEXT StreamContext; ++ PFLT_CONTEXT StreamHandleContext; ++ PFLT_CONTEXT TransactionContext; ++} FLT_RELATED_CONTEXTS, *PFLT_RELATED_CONTEXTS; ++ ++typedef const struct _FLT_RELATED_OBJECTS *PCFLT_RELATED_OBJECTS; ++ ++typedef union _FLT_PARAMETERS ++{ ++ struct ++ { ++ PIO_SECURITY_CONTEXT SecurityContext; ++ ULONG Options; ++ USHORT POINTER_ALIGNMENT FileAttributes; ++ USHORT ShareAccess; ++ ULONG POINTER_ALIGNMENT EaLength; ++ void *EaBuffer; ++ LARGE_INTEGER AllocationSize; ++ } Create; ++ ++ struct ++ { ++ PIO_SECURITY_CONTEXT SecurityContext; ++ ULONG Options; ++ USHORT POINTER_ALIGNMENT Reserved; ++ USHORT ShareAccess; ++ void *Parameters; ++ } CreatePipe; ++ ++#undef CreateMailslot ++ struct ++ { ++ PIO_SECURITY_CONTEXT SecurityContext; ++ ULONG Options; ++ USHORT POINTER_ALIGNMENT Reserved; ++ USHORT ShareAccess; ++ void *Parameters; ++ } CreateMailslot; ++ ++ struct ++ { ++ ULONG Length; ++ ULONG POINTER_ALIGNMENT Key; ++ LARGE_INTEGER ByteOffset; ++ void *ReadBuffer; ++ PMDL MdlAddress; ++ } Read; ++ ++ struct ++ { ++ ULONG Length; ++ ULONG POINTER_ALIGNMENT Key; ++ LARGE_INTEGER ByteOffset; ++ void *WriteBuffer; ++ PMDL MdlAddress; ++ } Write; ++ ++ struct ++ { ++ ULONG Length; ++ FILE_INFORMATION_CLASS POINTER_ALIGNMENT FileInformationClass; ++ void *InfoBuffer; ++ } QueryFileInformation; ++ ++ struct ++ { ++ ULONG Length; ++ FILE_INFORMATION_CLASS POINTER_ALIGNMENT FileInformationClass; ++ PFILE_OBJECT ParentOfTarget; ++ union ++ { ++ struct ++ { ++ BOOLEAN ReplaceIfExists; ++ BOOLEAN AdvanceOnly; ++ }; ++ ULONG ClusterCount; ++ HANDLE DeleteHandle; ++ }; ++ void *InfoBuffer; ++ } SetFileInformation; ++ ++ struct ++ { ++ ULONG Length; ++ void *EaList; ++ ULONG EaListLength; ++ ULONG POINTER_ALIGNMENT EaIndex; ++ void *EaBuffer; ++ PMDL MdlAddress; ++ } QueryEa; ++ ++ struct ++ { ++ ULONG Length; ++ void *EaBuffer; ++ PMDL MdlAddress; ++ } SetEa; ++ ++ struct ++ { ++ ULONG Length; ++ FS_INFORMATION_CLASS POINTER_ALIGNMENT FsInformationClass; ++ void *VolumeBuffer; ++ } QueryVolumeInformation; ++ ++ struct ++ { ++ ULONG Length; ++ FS_INFORMATION_CLASS POINTER_ALIGNMENT FsInformationClass; ++ void *VolumeBuffer; ++ } SetVolumeInformation; ++ ++ union ++ { ++ struct ++ { ++ ULONG Length; ++ PUNICODE_STRING FileName; ++ FILE_INFORMATION_CLASS FileInformationClass; ++ ULONG POINTER_ALIGNMENT FileIndex; ++ void *DirectoryBuffer; ++ PMDL MdlAddress; ++ } QueryDirectory; ++ ++ struct ++ { ++ ULONG Length; ++ ULONG POINTER_ALIGNMENT CompletionFilter; ++ ULONG POINTER_ALIGNMENT Spare1; ++ ULONG POINTER_ALIGNMENT Spare2; ++ void *DirectoryBuffer; ++ PMDL MdlAddress; ++ } NotifyDirectory; ++ ++ struct ++ { ++ ULONG Length; ++ ULONG POINTER_ALIGNMENT CompletionFilter; ++ DIRECTORY_NOTIFY_INFORMATION_CLASS POINTER_ALIGNMENT DirectoryNotifyInformationClass; ++ ULONG POINTER_ALIGNMENT Spare2; ++ void *DirectoryBuffer; ++ PMDL MdlAddress; ++ } NotifyDirectoryEx; ++ } DirectoryControl; ++ ++ union ++ { ++ struct ++ { ++ PVPB Vpb; ++ PDEVICE_OBJECT DeviceObject; ++ } VerifyVolume; ++ ++ struct ++ { ++ ULONG OutputBufferLength; ++ ULONG POINTER_ALIGNMENT InputBufferLength; ++ ULONG POINTER_ALIGNMENT FsControlCode; ++ } Common; ++ ++ struct ++ { ++ ULONG OutputBufferLength; ++ ULONG POINTER_ALIGNMENT InputBufferLength; ++ ULONG POINTER_ALIGNMENT FsControlCode; ++ void *InputBuffer; ++ void *OutputBuffer; ++ PMDL OutputMdlAddress; ++ } Neither; ++ ++ struct ++ { ++ ULONG OutputBufferLength; ++ ULONG POINTER_ALIGNMENT InputBufferLength; ++ ULONG POINTER_ALIGNMENT FsControlCode; ++ void *SystemBuffer; ++ } Buffered; ++ ++ struct ++ { ++ ULONG OutputBufferLength; ++ ULONG POINTER_ALIGNMENT InputBufferLength; ++ ULONG POINTER_ALIGNMENT FsControlCode; ++ void *InputSystemBuffer; ++ void *OutputBuffer; ++ PMDL OutputMdlAddress; ++ } Direct; ++ } FileSystemControl; ++ ++ union ++ { ++ struct ++ { ++ ULONG OutputBufferLength; ++ ULONG POINTER_ALIGNMENT InputBufferLength; ++ ULONG POINTER_ALIGNMENT IoControlCode; ++ } Common; ++ ++ struct ++ { ++ ULONG OutputBufferLength; ++ ULONG POINTER_ALIGNMENT InputBufferLength; ++ ULONG POINTER_ALIGNMENT IoControlCode; ++ void *InputBuffer; ++ void *OutputBuffer; ++ PMDL OutputMdlAddress; ++ } Neither; ++ ++ struct ++ { ++ ULONG OutputBufferLength; ++ ULONG POINTER_ALIGNMENT InputBufferLength; ++ ULONG POINTER_ALIGNMENT IoControlCode; ++ void *SystemBuffer; ++ } Buffered; ++ ++ struct ++ { ++ ULONG OutputBufferLength; ++ ULONG POINTER_ALIGNMENT InputBufferLength; ++ ULONG POINTER_ALIGNMENT IoControlCode; ++ void *InputSystemBuffer; ++ void *OutputBuffer; ++ PMDL OutputMdlAddress; ++ } Direct; ++ ++ struct ++ { ++ ULONG OutputBufferLength; ++ ULONG POINTER_ALIGNMENT InputBufferLength; ++ ULONG POINTER_ALIGNMENT IoControlCode; ++ void *InputBuffer; ++ void *OutputBuffer; ++ } FastIo; ++ } DeviceIoControl; ++ ++ struct ++ { ++ PLARGE_INTEGER Length; ++ ULONG POINTER_ALIGNMENT Key; ++ LARGE_INTEGER ByteOffset; ++ PEPROCESS ProcessId; ++ BOOLEAN FailImmediately; ++ BOOLEAN ExclusiveLock; ++ } LockControl; ++ ++ struct ++ { ++ SECURITY_INFORMATION SecurityInformation; ++ ULONG POINTER_ALIGNMENT Length; ++ void *SecurityBuffer; ++ PMDL MdlAddress; ++ } QuerySecurity; ++ ++ struct ++ { ++ SECURITY_INFORMATION SecurityInformation; ++ PSECURITY_DESCRIPTOR SecurityDescriptor; ++ } SetSecurity; ++ ++ struct ++ { ++ ULONG_PTR ProviderId; ++ void *DataPath; ++ ULONG BufferSize; ++ void *Buffer; ++ } WMI; ++ ++ struct ++ { ++ ULONG Length; ++ PSID StartSid; ++ PFILE_GET_QUOTA_INFORMATION SidList; ++ ULONG SidListLength; ++ void *QuotaBuffer; ++ PMDL MdlAddress; ++ } QueryQuota; ++ ++ struct ++ { ++ ULONG Length; ++ void *QuotaBuffer; ++ PMDL MdlAddress; ++ } SetQuota; ++ ++ union ++ { ++ struct ++ { ++ PCM_RESOURCE_LIST AllocatedResources; ++ PCM_RESOURCE_LIST AllocatedResourcesTranslated; ++ } StartDevice; ++ ++ struct ++ { ++ DEVICE_RELATION_TYPE Type; ++ } QueryDeviceRelations; ++ ++ struct ++ { ++ const GUID *InterfaceType; ++ USHORT Size; ++ USHORT Version; ++ PINTERFACE Interface; ++ void *InterfaceSpecificData; ++ } QueryInterface; ++ ++ struct ++ { ++ PDEVICE_CAPABILITIES Capabilities; ++ } DeviceCapabilities; ++ ++ struct ++ { ++ PIO_RESOURCE_REQUIREMENTS_LIST IoResourceRequirementList; ++ } FilterResourceRequirements; ++ ++ struct ++ { ++ ULONG WhichSpace; ++ void *Buffer; ++ ULONG Offset; ++ ULONG POINTER_ALIGNMENT Length; ++ } ReadWriteConfig; ++ ++ struct ++ { ++ BOOLEAN Lock; ++ } SetLock; ++ ++ struct { ++ BUS_QUERY_ID_TYPE IdType; ++ } QueryId; ++ ++ struct ++ { ++ DEVICE_TEXT_TYPE DeviceTextType; ++ LCID POINTER_ALIGNMENT LocaleId; ++ } QueryDeviceText; ++ ++ struct ++ { ++ BOOLEAN InPath; ++ BOOLEAN Reserved[3]; ++ DEVICE_USAGE_NOTIFICATION_TYPE POINTER_ALIGNMENT Type; ++ } UsageNotification; ++ } Pnp; ++ ++ struct ++ { ++ FS_FILTER_SECTION_SYNC_TYPE SyncType; ++ ULONG PageProtection; ++ PFS_FILTER_SECTION_SYNC_OUTPUT OutputInformation; ++ } AcquireForSectionSynchronization; ++ ++ struct ++ { ++ PLARGE_INTEGER EndingOffset; ++ PERESOURCE *ResourceToRelease; ++ } AcquireForModifiedPageWriter; ++ ++ struct ++ { ++ PERESOURCE ResourceToRelease; ++ } ReleaseForModifiedPageWriter; ++ ++ struct ++ { ++ PIRP Irp; ++ void *FileInformation; ++ PULONG Length; ++ FILE_INFORMATION_CLASS FileInformationClass; ++ } QueryOpen; ++ ++ struct ++ { ++ LARGE_INTEGER FileOffset; ++ ULONG Length; ++ ULONG POINTER_ALIGNMENT LockKey; ++ BOOLEAN POINTER_ALIGNMENT CheckForReadOperation; ++ } FastIoCheckIfPossible; ++ ++ struct ++ { ++ PIRP Irp; ++ PFILE_NETWORK_OPEN_INFORMATION NetworkInformation; ++ } NetworkQueryOpen; ++ ++ struct ++ { ++ LARGE_INTEGER FileOffset; ++ ULONG POINTER_ALIGNMENT Length; ++ ULONG POINTER_ALIGNMENT Key; ++ PMDL *MdlChain; ++ } MdlRead; ++ ++ struct ++ { ++ PMDL MdlChain; ++ } MdlReadComplete; ++ ++ struct ++ { ++ LARGE_INTEGER FileOffset; ++ ULONG POINTER_ALIGNMENT Length; ++ ULONG POINTER_ALIGNMENT Key; ++ PMDL *MdlChain; ++ } PrepareMdlWrite; ++ ++ struct ++ { ++ LARGE_INTEGER FileOffset; ++ PMDL MdlChain; ++ } MdlWriteComplete; ++ ++ struct ++ { ++ ULONG DeviceType; ++ } MountVolume; ++ ++ struct ++ { ++ void *Argument1; ++ void *Argument2; ++ void *Argument3; ++ void *Argument4; ++ void *Argument5; ++ LARGE_INTEGER Argument6; ++ } Others; ++ ++} FLT_PARAMETERS, *PFLT_PARAMETERS; ++ ++typedef struct _FLT_IO_PARAMETER_BLOCK ++{ ++ ULONG IrpFlags; ++ UCHAR MajorFunction; ++ UCHAR MinorFunction; ++ UCHAR OperationFlags; ++ UCHAR Reserved; ++ PFILE_OBJECT TargetFileObject; ++ PFLT_INSTANCE TargetInstance; ++ FLT_PARAMETERS Parameters; ++ ++} FLT_IO_PARAMETER_BLOCK, *PFLT_IO_PARAMETER_BLOCK; ++ ++typedef struct _FLT_CALLBACK_DATA ++{ ++ FLT_CALLBACK_DATA_FLAGS Flags; ++ PETHREAD const Thread; ++ PFLT_IO_PARAMETER_BLOCK const Iopb; ++ IO_STATUS_BLOCK IoStatus; ++ struct _FLT_TAG_DATA_BUFFER *TagData; ++ ++ union ++ { ++ struct ++ { ++ LIST_ENTRY QueueLinks; ++ void *QueueContext[2]; ++ }; ++ void *FilterContext[4]; ++ }; ++ KPROCESSOR_MODE RequestorMode; ++} FLT_CALLBACK_DATA, *PFLT_CALLBACK_DATA; ++ ++typedef void* (WINAPI *PFLT_CONTEXT_ALLOCATE_CALLBACK)(POOL_TYPE,SIZE_T,FLT_CONTEXT_TYPE); ++typedef void (WINAPI *PFLT_CONTEXT_CLEANUP_CALLBACK)(PFLT_CONTEXT, FLT_CONTEXT_TYPE); ++typedef void (WINAPI *PFLT_CONTEXT_FREE_CALLBACK)(void *, FLT_CONTEXT_TYPE); ++typedef NTSTATUS (WINAPI *PFLT_FILTER_UNLOAD_CALLBACK)(FLT_FILTER_UNLOAD_FLAGS); ++typedef NTSTATUS (WINAPI *PFLT_INSTANCE_QUERY_TEARDOWN_CALLBACK)(PCFLT_RELATED_OBJECTS, ++ FLT_INSTANCE_QUERY_TEARDOWN_FLAGS); ++typedef NTSTATUS (WINAPI *PFLT_GENERATE_FILE_NAME)(PFLT_INSTANCE, PFILE_OBJECT,PFLT_CALLBACK_DATA, ++ FLT_FILE_NAME_OPTIONS,PBOOLEAN, PFLT_NAME_CONTROL); ++typedef NTSTATUS (WINAPI *PFLT_INSTANCE_SETUP_CALLBACK)(PCFLT_RELATED_OBJECTS,FLT_INSTANCE_SETUP_FLAGS, ++ DEVICE_TYPE,FLT_FILESYSTEM_TYPE); ++typedef void (WINAPI *PFLT_INSTANCE_TEARDOWN_CALLBACK)(PCFLT_RELATED_OBJECTS, FLT_INSTANCE_TEARDOWN_FLAGS); ++typedef void (WINAPI *PFLT_NORMALIZE_CONTEXT_CLEANUP)(void**); ++typedef NTSTATUS (WINAPI *PFLT_NORMALIZE_NAME_COMPONENT)(PFLT_INSTANCE, PCUNICODE_STRING, USHORT, ++ PCUNICODE_STRING,PFILE_NAMES_INFORMATION,ULONG,FLT_NORMALIZE_NAME_FLAGS, void **); ++typedef NTSTATUS (WINAPI *PFLT_NORMALIZE_NAME_COMPONENT_EX)(PFLT_INSTANCE, PFILE_OBJECT, PCUNICODE_STRING, ++ USHORT, PCUNICODE_STRING,PFILE_NAMES_INFORMATION, ULONG, FLT_NORMALIZE_NAME_FLAGS Flags, ++ void **NormalizationContext); ++typedef FLT_PREOP_CALLBACK_STATUS (WINAPI *PFLT_PRE_OPERATION_CALLBACK)(PFLT_CALLBACK_DATA, ++ PCFLT_RELATED_OBJECTS, void**); ++typedef FLT_POSTOP_CALLBACK_STATUS (WINAPI *PFLT_POST_OPERATION_CALLBACK)(PFLT_CALLBACK_DATA, ++ PCFLT_RELATED_OBJECTS, void*, FLT_POST_OPERATION_FLAGS); ++typedef NTSTATUS (WINAPI *PFLT_SECTION_CONFLICT_NOTIFICATION_CALLBACK)(PFLT_INSTANCE, PFLT_CONTEXT, ++ PFLT_CALLBACK_DATA); ++typedef NTSTATUS (WINAPI *PFLT_TRANSACTION_NOTIFICATION_CALLBACK)(PCFLT_RELATED_OBJECTS, PFLT_CONTEXT, ULONG); ++ ++typedef struct _FLT_CONTEXT_REGISTRATION ++{ ++ FLT_CONTEXT_TYPE ContextType; ++ FLT_CONTEXT_REGISTRATION_FLAGS Flags; ++ PFLT_CONTEXT_CLEANUP_CALLBACK ContextCleanupCallback; ++ SIZE_T Size; ++ ULONG PoolTag; ++ PFLT_CONTEXT_ALLOCATE_CALLBACK ContextAllocateCallback; ++ PFLT_CONTEXT_FREE_CALLBACK ContextFreeCallback; ++ void* Reserved1; ++} FLT_CONTEXT_REGISTRATION, *PFLT_CONTEXT_REGISTRATION; ++ ++typedef const FLT_CONTEXT_REGISTRATION *PCFLT_CONTEXT_REGISTRATION; ++ ++typedef struct _FLT_OPERATION_REGISTRATION ++{ ++ UCHAR MajorFunction; ++ FLT_OPERATION_REGISTRATION_FLAGS Flags; ++ PFLT_PRE_OPERATION_CALLBACK PreOperation; ++ PFLT_POST_OPERATION_CALLBACK PostOperation; ++ void *Reserved1; ++} FLT_OPERATION_REGISTRATION, *PFLT_OPERATION_REGISTRATION; ++ ++typedef struct _FLT_REGISTRATION ++{ ++ USHORT Size; ++ USHORT Version; ++ FLT_REGISTRATION_FLAGS Flags; ++ const FLT_CONTEXT_REGISTRATION *ContextRegistration; ++ const FLT_OPERATION_REGISTRATION *OperationRegistration; ++ PFLT_FILTER_UNLOAD_CALLBACK FilterUnloadCallback; ++ PFLT_INSTANCE_SETUP_CALLBACK InstanceSetupCallback; ++ PFLT_INSTANCE_QUERY_TEARDOWN_CALLBACK InstanceQueryTeardownCallback; ++ PFLT_INSTANCE_TEARDOWN_CALLBACK InstanceTeardownStartCallback; ++ PFLT_INSTANCE_TEARDOWN_CALLBACK InstanceTeardownCompleteCallback; ++ PFLT_GENERATE_FILE_NAME GenerateFileNameCallback; ++ PFLT_NORMALIZE_NAME_COMPONENT NormalizeNameComponentCallback; ++ PFLT_NORMALIZE_CONTEXT_CLEANUP NormalizeContextCleanupCallback; ++ PFLT_TRANSACTION_NOTIFICATION_CALLBACK TransactionNotificationCallback; ++ PFLT_NORMALIZE_NAME_COMPONENT_EX NormalizeNameComponentExCallback; ++ PFLT_SECTION_CONFLICT_NOTIFICATION_CALLBACK SectionNotificationCallback; ++} FLT_REGISTRATION, *PFLT_REGISTRATION; ++ ++ ++NTSTATUS WINAPI FltRegisterFilter (PDRIVER_OBJECT, const FLT_REGISTRATION *, PFLT_FILTER *); ++NTSTATUS WINAPI FltStartFiltering (PFLT_FILTER); ++void WINAPI FltUnregisterFilter (PFLT_FILTER); ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif +-- +2.16.1 + diff --git a/patches/fltmgr.sys-filters/0002-fltmgr.sys-Add-FltRegisterFilter-stub.patch b/patches/fltmgr.sys-filters/0002-fltmgr.sys-Add-FltRegisterFilter-stub.patch new file mode 100644 index 00000000..336897fb --- /dev/null +++ b/patches/fltmgr.sys-filters/0002-fltmgr.sys-Add-FltRegisterFilter-stub.patch @@ -0,0 +1,58 @@ +From a4b5a66b53137496bdfa64b597f633f7520a82a2 Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Fri, 9 Mar 2018 21:41:10 +1100 +Subject: [PATCH 1/3] fltmgr.sys: Add FltRegisterFilter stub + +Signed-off-by: Alistair Leslie-Hughes +--- + dlls/fltmgr.sys/fltmgr.sys.spec | 2 +- + dlls/fltmgr.sys/main.c | 10 ++++++++++ + include/Makefile.in | 1 + + 3 files changed, 12 insertions(+), 1 deletion(-) + +diff --git a/dlls/fltmgr.sys/fltmgr.sys.spec b/dlls/fltmgr.sys/fltmgr.sys.spec +index ea84d81224..000368f47c 100644 +--- a/dlls/fltmgr.sys/fltmgr.sys.spec ++++ b/dlls/fltmgr.sys/fltmgr.sys.spec +@@ -128,7 +128,7 @@ + @ stub FltReadFile + @ stub FltReferenceContext + @ stub FltReferenceFileNameInformation +-@ stub FltRegisterFilter ++@ stdcall FltRegisterFilter(ptr ptr ptr) + @ stub FltReissueSynchronousIo + @ stub FltReleaseContext + @ stub FltReleaseContexts +diff --git a/dlls/fltmgr.sys/main.c b/dlls/fltmgr.sys/main.c +index 09c89a1e2f..efe9b7fde7 100644 +--- a/dlls/fltmgr.sys/main.c ++++ b/dlls/fltmgr.sys/main.c +@@ -42,3 +42,13 @@ void WINAPI FltInitializePushLock( EX_PUSH_LOCK *lock ) + { + FIXME( "(%p): stub\n", lock ); + } ++ ++NTSTATUS WINAPI FltRegisterFilter (PDRIVER_OBJECT driver, const FLT_REGISTRATION *reg, PFLT_FILTER *filter) ++{ ++ FIXME( "(%p,%p,%p): stub\n", driver, reg, filter ); ++ ++ if(filter) ++ *filter = UlongToHandle(0xdeadbeaf); ++ ++ return STATUS_SUCCESS; ++} +diff --git a/include/Makefile.in b/include/Makefile.in +index bdda95592b..ccb571477b 100644 +--- a/include/Makefile.in ++++ b/include/Makefile.in +@@ -156,6 +156,7 @@ SOURCES = \ + ddk/compstui.h \ + ddk/csq.h \ + ddk/d3dkmthk.h \ ++ ddk/fltkernel.h \ + ddk/hidclass.h \ + ddk/hidpi.h \ + ddk/hidport.h \ +-- +2.16.1 + diff --git a/patches/fltmgr.sys-filters/0003-fltmgr.sys-Add-FltStartFiltering-stub.patch b/patches/fltmgr.sys-filters/0003-fltmgr.sys-Add-FltStartFiltering-stub.patch new file mode 100644 index 00000000..0ae97ecb --- /dev/null +++ b/patches/fltmgr.sys-filters/0003-fltmgr.sys-Add-FltStartFiltering-stub.patch @@ -0,0 +1,42 @@ +From b6d7aa902c272e679cf9f4010e1bab35b04aeae2 Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Fri, 9 Mar 2018 21:42:40 +1100 +Subject: [PATCH 2/3] fltmgr.sys: Add FltStartFiltering stub + +Signed-off-by: Alistair Leslie-Hughes +--- + dlls/fltmgr.sys/fltmgr.sys.spec | 2 +- + dlls/fltmgr.sys/main.c | 7 +++++++ + 2 files changed, 8 insertions(+), 1 deletion(-) + +diff --git a/dlls/fltmgr.sys/fltmgr.sys.spec b/dlls/fltmgr.sys/fltmgr.sys.spec +index 000368f47c..0a3b1c69c7 100644 +--- a/dlls/fltmgr.sys/fltmgr.sys.spec ++++ b/dlls/fltmgr.sys/fltmgr.sys.spec +@@ -150,7 +150,7 @@ + @ stub FltSetStreamHandleContext + @ stub FltSetVolumeContext + @ stub FltSetVolumeInformation +-@ stub FltStartFiltering ++@ stdcall FltStartFiltering(ptr) + @ stub FltSupportsFileContexts + @ stub FltSupportsStreamContexts + @ stub FltSupportsStreamHandleContexts +diff --git a/dlls/fltmgr.sys/main.c b/dlls/fltmgr.sys/main.c +index efe9b7fde7..08beb0265d 100644 +--- a/dlls/fltmgr.sys/main.c ++++ b/dlls/fltmgr.sys/main.c +@@ -52,3 +52,10 @@ NTSTATUS WINAPI FltRegisterFilter (PDRIVER_OBJECT driver, const FLT_REGISTRATION + + return STATUS_SUCCESS; + } ++ ++NTSTATUS WINAPI FltStartFiltering (PFLT_FILTER filter) ++{ ++ FIXME( "(%p): stub\n", filter ); ++ ++ return STATUS_SUCCESS; ++} +-- +2.16.1 + diff --git a/patches/fltmgr.sys-filters/0004-fltmgr.sys-Add-FltUnregisterFilter-stub.patch b/patches/fltmgr.sys-filters/0004-fltmgr.sys-Add-FltUnregisterFilter-stub.patch new file mode 100644 index 00000000..5e6c1aae --- /dev/null +++ b/patches/fltmgr.sys-filters/0004-fltmgr.sys-Add-FltUnregisterFilter-stub.patch @@ -0,0 +1,39 @@ +From a63690aa1e35968c0ea6bb1abc05457c048f9ee0 Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Fri, 9 Mar 2018 21:43:33 +1100 +Subject: [PATCH 3/3] fltmgr.sys: Add FltUnregisterFilter stub + +Signed-off-by: Alistair Leslie-Hughes +--- + dlls/fltmgr.sys/fltmgr.sys.spec | 2 +- + dlls/fltmgr.sys/main.c | 5 +++++ + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/dlls/fltmgr.sys/fltmgr.sys.spec b/dlls/fltmgr.sys/fltmgr.sys.spec +index 0a3b1c69c7..c217ad3891 100644 +--- a/dlls/fltmgr.sys/fltmgr.sys.spec ++++ b/dlls/fltmgr.sys/fltmgr.sys.spec +@@ -158,6 +158,6 @@ + @ stub FltUninitializeFileLock + @ stub FltUninitializeOplock + @ stub FltUnloadFilter +-@ stub FltUnregisterFilter ++@ stdcall FltUnregisterFilter(ptr) + @ stub FltUntagFile + @ stub FltWriteFile +diff --git a/dlls/fltmgr.sys/main.c b/dlls/fltmgr.sys/main.c +index 08beb0265d..cedcdb115a 100644 +--- a/dlls/fltmgr.sys/main.c ++++ b/dlls/fltmgr.sys/main.c +@@ -59,3 +59,8 @@ NTSTATUS WINAPI FltStartFiltering (PFLT_FILTER filter) + + return STATUS_SUCCESS; + } ++ ++void WINAPI FltUnregisterFilter (PFLT_FILTER filter) ++{ ++ FIXME( "(%p): stub\n", filter ); ++} +-- +2.16.1 + diff --git a/patches/fltmgr.sys-filters/definition b/patches/fltmgr.sys-filters/definition new file mode 100644 index 00000000..4c230845 --- /dev/null +++ b/patches/fltmgr.sys-filters/definition @@ -0,0 +1,2 @@ +Fixes: [44500] Add stubs for FltRegisterFilter, FltStartFiltering, FltUnregisterFilter +Depends: ntoskrnl-Ob_callbacks diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 521094ca..77fc59bb 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -157,6 +157,7 @@ patch_enable_all () enable_dxgi_MakeWindowAssociation="$1" enable_dxva2_Video_Decoder="$1" enable_explorer_Video_Registry_Key="$1" + enable_fltmgr_sys_filters="$1" enable_fonts_Missing_Fonts="$1" enable_fsutil_Stub_Program="$1" enable_gdi32_GetCharacterPlacement="$1" @@ -692,6 +693,9 @@ patch_enable () explorer-Video_Registry_Key) enable_explorer_Video_Registry_Key="$2" ;; + fltmgr.sys-filters) + enable_fltmgr_sys_filters="$2" + ;; fonts-Missing_Fonts) enable_fonts_Missing_Fonts="$2" ;; @@ -2293,24 +2297,6 @@ if test "$enable_nvapi_Stub_DLL" -eq 1; then enable_nvcuda_CUDA_Support=1 fi -if test "$enable_ntoskrnl_Ob_callbacks" -eq 1; then - if test "$enable_ntoskrnl_Stubs" -gt 1; then - abort "Patchset ntoskrnl-Stubs disabled, but ntoskrnl-Ob_callbacks depends on that." - fi - enable_ntoskrnl_Stubs=1 -fi - -if test "$enable_ntoskrnl_Stubs" -eq 1; then - if test "$enable_Compiler_Warnings" -gt 1; then - abort "Patchset Compiler_Warnings disabled, but ntoskrnl-Stubs depends on that." - fi - if test "$enable_ntdll_NtAllocateUuids" -gt 1; then - abort "Patchset ntdll-NtAllocateUuids disabled, but ntoskrnl-Stubs depends on that." - fi - enable_Compiler_Warnings=1 - enable_ntdll_NtAllocateUuids=1 -fi - if test "$enable_ntdll_SystemRoot_Symlink" -eq 1; then if test "$enable_ntdll_Exception" -gt 1; then abort "Patchset ntdll-Exception disabled, but ntdll-SystemRoot_Symlink depends on that." @@ -2503,6 +2489,31 @@ if test "$enable_imagehlp_ImageLoad" -eq 1; then enable_imagehlp_Cleanup=1 fi +if test "$enable_fltmgr_sys_filters" -eq 1; then + if test "$enable_ntoskrnl_Ob_callbacks" -gt 1; then + abort "Patchset ntoskrnl-Ob_callbacks disabled, but fltmgr.sys-filters depends on that." + fi + enable_ntoskrnl_Ob_callbacks=1 +fi + +if test "$enable_ntoskrnl_Ob_callbacks" -eq 1; then + if test "$enable_ntoskrnl_Stubs" -gt 1; then + abort "Patchset ntoskrnl-Stubs disabled, but ntoskrnl-Ob_callbacks depends on that." + fi + enable_ntoskrnl_Stubs=1 +fi + +if test "$enable_ntoskrnl_Stubs" -eq 1; then + if test "$enable_Compiler_Warnings" -gt 1; then + abort "Patchset Compiler_Warnings disabled, but ntoskrnl-Stubs depends on that." + fi + if test "$enable_ntdll_NtAllocateUuids" -gt 1; then + abort "Patchset ntdll-NtAllocateUuids disabled, but ntoskrnl-Stubs depends on that." + fi + enable_Compiler_Warnings=1 + enable_ntdll_NtAllocateUuids=1 +fi + if test "$enable_dxdiagn_GetChildContainer_Leaf_Nodes" -eq 1; then if test "$enable_dxdiagn_Enumerate_DirectSound" -gt 1; then abort "Patchset dxdiagn-Enumerate_DirectSound disabled, but dxdiagn-GetChildContainer_Leaf_Nodes depends on that." @@ -4290,6 +4301,108 @@ if test "$enable_explorer_Video_Registry_Key" -eq 1; then ) >> "$patchlist" fi +# Patchset ntdll-NtAllocateUuids +# | +# | This patchset fixes the following Wine bugs: +# | * [#35910] Fix API signature of ntdll.NtAllocateUuids +# | +# | Modified files: +# | * dlls/ntdll/ntdll.spec, dlls/ntdll/om.c, dlls/ntoskrnl.exe/ntoskrnl.exe.spec, include/winternl.h +# | +if test "$enable_ntdll_NtAllocateUuids" -eq 1; then + patch_apply ntdll-NtAllocateUuids/0001-ntdll-Improve-stub-for-NtAllocateUuids.patch + ( + printf '%s\n' '+ { "Louis Lenders", "ntdll: Improve stub for NtAllocateUuids.", 1 },'; + ) >> "$patchlist" +fi + +# Patchset ntoskrnl-Stubs +# | +# | This patchset has the following (direct or indirect) dependencies: +# | * Compiler_Warnings, ntdll-NtAllocateUuids +# | +# | Modified files: +# | * dlls/ntoskrnl.exe/ntoskrnl.c, dlls/ntoskrnl.exe/ntoskrnl.exe.spec, include/ddk/wdm.h, include/winnt.h +# | +if test "$enable_ntoskrnl_Stubs" -eq 1; then + patch_apply ntoskrnl-Stubs/0003-ntoskrnl.exe-Add-stubs-for-ExAcquireFastMutexUnsafe-.patch + patch_apply ntoskrnl-Stubs/0004-ntoskrnl.exe-Add-stubs-for-ObReferenceObjectByPointe.patch + patch_apply ntoskrnl-Stubs/0005-ntoskrnl.exe-Improve-KeReleaseMutex-stub.patch + patch_apply ntoskrnl-Stubs/0006-ntoskrnl.exe-Improve-KeInitializeSemaphore-stub.patch + patch_apply ntoskrnl-Stubs/0007-ntoskrnl.exe-Improve-KeInitializeTimerEx-stub.patch + patch_apply ntoskrnl-Stubs/0008-ntoskrnl.exe-Fix-IoReleaseCancelSpinLock-argument.patch + patch_apply ntoskrnl-Stubs/0009-ntoskrnl.exe-Implement-MmMapLockedPages-and-MmUnmapL.patch + patch_apply ntoskrnl-Stubs/0010-ntoskrnl.exe-Implement-KeInitializeMutex.patch + patch_apply ntoskrnl-Stubs/0011-ntoskrnl.exe-Add-IoGetDeviceAttachmentBaseRef-stub.patch + patch_apply ntoskrnl-Stubs/0012-ntoskrnl-Implement-ExInterlockedPopEntrySList.patch + patch_apply ntoskrnl-Stubs/0013-ntoskrnl.exe-Implement-NtBuildNumber.patch + patch_apply ntoskrnl-Stubs/0014-ntoskrnl.exe-Implement-ExInitializeNPagedLookasideLi.patch + ( + printf '%s\n' '+ { "Alexander Morozov", "ntoskrnl.exe: Add stubs for ExAcquireFastMutexUnsafe and ExReleaseFastMutexUnsafe.", 1 },'; + printf '%s\n' '+ { "Alexander Morozov", "ntoskrnl.exe: Add stub for ObReferenceObjectByPointer.", 1 },'; + printf '%s\n' '+ { "Alexander Morozov", "ntoskrnl.exe: Improve KeReleaseMutex stub.", 1 },'; + printf '%s\n' '+ { "Alexander Morozov", "ntoskrnl.exe: Improve KeInitializeSemaphore stub.", 1 },'; + printf '%s\n' '+ { "Alexander Morozov", "ntoskrnl.exe: Improve KeInitializeTimerEx stub.", 1 },'; + printf '%s\n' '+ { "Christian Costa", "ntoskrnl.exe: Fix IoReleaseCancelSpinLock argument.", 1 },'; + printf '%s\n' '+ { "Christian Costa", "ntoskrnl.exe: Implement MmMapLockedPages and MmUnmapLockedPages.", 1 },'; + printf '%s\n' '+ { "Alexander Morozov", "ntoskrnl.exe: Implement KeInitializeMutex.", 1 },'; + printf '%s\n' '+ { "Jarkko Korpi", "ntoskrnl.exe: Add IoGetDeviceAttachmentBaseRef stub.", 1 },'; + printf '%s\n' '+ { "Michael Müller", "ntoskrnl: Implement ExInterlockedPopEntrySList.", 1 },'; + printf '%s\n' '+ { "Michael Müller", "ntoskrnl.exe: Implement NtBuildNumber.", 1 },'; + printf '%s\n' '+ { "Michael Müller", "ntoskrnl.exe: Implement ExInitializeNPagedLookasideList.", 1 },'; + ) >> "$patchlist" +fi + +# Patchset ntoskrnl-Ob_callbacks +# | +# | This patchset has the following (direct or indirect) dependencies: +# | * Compiler_Warnings, ntdll-NtAllocateUuids, ntoskrnl-Stubs +# | +# | This patchset fixes the following Wine bugs: +# | * [#44497] Add stubs for ObRegisterCallbacks, ObUnRegisterCallbacks, ObGetFilterVersion +# | +# | Modified files: +# | * dlls/ntoskrnl.exe/ntoskrnl.c, dlls/ntoskrnl.exe/ntoskrnl.exe.spec, include/ddk/ntifs.h, include/ddk/wdm.h +# | +if test "$enable_ntoskrnl_Ob_callbacks" -eq 1; then + patch_apply ntoskrnl-Ob_callbacks/0001-include-Add-more-typedefs-to-wdm.h.patch + patch_apply ntoskrnl-Ob_callbacks/0002-include-Add-more-types-to-ntifs.h.patch + patch_apply ntoskrnl-Ob_callbacks/0003-ntoskrnl.exe-Add-ObRegisterCallbacks-stub.patch + patch_apply ntoskrnl-Ob_callbacks/0004-ntoskrnl.exe-Add-ObUnRegisterCallbacks-stub.patch + patch_apply ntoskrnl-Ob_callbacks/0005-ntoskrnl.exe-Add-ObGetFilterVersion-stub.patch + ( + printf '%s\n' '+ { "Alistair Leslie-Hughes", "include: Add more typedefs to wdm.h.", 1 },'; + printf '%s\n' '+ { "Alistair Leslie-Hughes", "include: Add more types to ntifs.h.", 1 },'; + printf '%s\n' '+ { "Alistair Leslie-Hughes", "ntoskrnl.exe: Add ObRegisterCallbacks stub.", 1 },'; + printf '%s\n' '+ { "Alistair Leslie-Hughes", "ntoskrnl.exe: Add ObUnRegisterCallbacks stub.", 1 },'; + printf '%s\n' '+ { "Alistair Leslie-Hughes", "ntoskrnl.exe: Add ObGetFilterVersion stub.", 1 },'; + ) >> "$patchlist" +fi + +# Patchset fltmgr.sys-filters +# | +# | This patchset has the following (direct or indirect) dependencies: +# | * Compiler_Warnings, ntdll-NtAllocateUuids, ntoskrnl-Stubs, ntoskrnl-Ob_callbacks +# | +# | This patchset fixes the following Wine bugs: +# | * [#44500] Add stubs for FltRegisterFilter, FltStartFiltering, FltUnregisterFilter +# | +# | Modified files: +# | * dlls/fltmgr.sys/fltmgr.sys.spec, dlls/fltmgr.sys/main.c, include/Makefile.in, include/ddk/fltkernel.h +# | +if test "$enable_fltmgr_sys_filters" -eq 1; then + patch_apply fltmgr.sys-filters/0001-include-ddk-Add-fltkernel.h.patch + patch_apply fltmgr.sys-filters/0002-fltmgr.sys-Add-FltRegisterFilter-stub.patch + patch_apply fltmgr.sys-filters/0003-fltmgr.sys-Add-FltStartFiltering-stub.patch + patch_apply fltmgr.sys-filters/0004-fltmgr.sys-Add-FltUnregisterFilter-stub.patch + ( + printf '%s\n' '+ { "Alistair Leslie-Hughes", "include/ddk: Add fltkernel.h.", 1 },'; + printf '%s\n' '+ { "Alistair Leslie-Hughes", "fltmgr.sys: Add FltRegisterFilter stub.", 1 },'; + printf '%s\n' '+ { "Alistair Leslie-Hughes", "fltmgr.sys: Add FltStartFiltering stub.", 1 },'; + printf '%s\n' '+ { "Alistair Leslie-Hughes", "fltmgr.sys: Add FltUnregisterFilter stub.", 1 },'; + ) >> "$patchlist" +fi + # Patchset fonts-Missing_Fonts # | # | This patchset fixes the following Wine bugs: @@ -5746,21 +5859,6 @@ if test "$enable_ntdll_NtAccessCheck" -eq 1; then ) >> "$patchlist" fi -# Patchset ntdll-NtAllocateUuids -# | -# | This patchset fixes the following Wine bugs: -# | * [#35910] Fix API signature of ntdll.NtAllocateUuids -# | -# | Modified files: -# | * dlls/ntdll/ntdll.spec, dlls/ntdll/om.c, dlls/ntoskrnl.exe/ntoskrnl.exe.spec, include/winternl.h -# | -if test "$enable_ntdll_NtAllocateUuids" -eq 1; then - patch_apply ntdll-NtAllocateUuids/0001-ntdll-Improve-stub-for-NtAllocateUuids.patch - ( - printf '%s\n' '+ { "Louis Lenders", "ntdll: Improve stub for NtAllocateUuids.", 1 },'; - ) >> "$patchlist" -fi - # Patchset ntdll-NtContinue # | # | Modified files: @@ -6204,69 +6302,6 @@ if test "$enable_ntdll_set_full_cpu_context" -eq 1; then ) >> "$patchlist" fi -# Patchset ntoskrnl-Stubs -# | -# | This patchset has the following (direct or indirect) dependencies: -# | * Compiler_Warnings, ntdll-NtAllocateUuids -# | -# | Modified files: -# | * dlls/ntoskrnl.exe/ntoskrnl.c, dlls/ntoskrnl.exe/ntoskrnl.exe.spec, include/ddk/wdm.h, include/winnt.h -# | -if test "$enable_ntoskrnl_Stubs" -eq 1; then - patch_apply ntoskrnl-Stubs/0003-ntoskrnl.exe-Add-stubs-for-ExAcquireFastMutexUnsafe-.patch - patch_apply ntoskrnl-Stubs/0004-ntoskrnl.exe-Add-stubs-for-ObReferenceObjectByPointe.patch - patch_apply ntoskrnl-Stubs/0005-ntoskrnl.exe-Improve-KeReleaseMutex-stub.patch - patch_apply ntoskrnl-Stubs/0006-ntoskrnl.exe-Improve-KeInitializeSemaphore-stub.patch - patch_apply ntoskrnl-Stubs/0007-ntoskrnl.exe-Improve-KeInitializeTimerEx-stub.patch - patch_apply ntoskrnl-Stubs/0008-ntoskrnl.exe-Fix-IoReleaseCancelSpinLock-argument.patch - patch_apply ntoskrnl-Stubs/0009-ntoskrnl.exe-Implement-MmMapLockedPages-and-MmUnmapL.patch - patch_apply ntoskrnl-Stubs/0010-ntoskrnl.exe-Implement-KeInitializeMutex.patch - patch_apply ntoskrnl-Stubs/0011-ntoskrnl.exe-Add-IoGetDeviceAttachmentBaseRef-stub.patch - patch_apply ntoskrnl-Stubs/0012-ntoskrnl-Implement-ExInterlockedPopEntrySList.patch - patch_apply ntoskrnl-Stubs/0013-ntoskrnl.exe-Implement-NtBuildNumber.patch - patch_apply ntoskrnl-Stubs/0014-ntoskrnl.exe-Implement-ExInitializeNPagedLookasideLi.patch - ( - printf '%s\n' '+ { "Alexander Morozov", "ntoskrnl.exe: Add stubs for ExAcquireFastMutexUnsafe and ExReleaseFastMutexUnsafe.", 1 },'; - printf '%s\n' '+ { "Alexander Morozov", "ntoskrnl.exe: Add stub for ObReferenceObjectByPointer.", 1 },'; - printf '%s\n' '+ { "Alexander Morozov", "ntoskrnl.exe: Improve KeReleaseMutex stub.", 1 },'; - printf '%s\n' '+ { "Alexander Morozov", "ntoskrnl.exe: Improve KeInitializeSemaphore stub.", 1 },'; - printf '%s\n' '+ { "Alexander Morozov", "ntoskrnl.exe: Improve KeInitializeTimerEx stub.", 1 },'; - printf '%s\n' '+ { "Christian Costa", "ntoskrnl.exe: Fix IoReleaseCancelSpinLock argument.", 1 },'; - printf '%s\n' '+ { "Christian Costa", "ntoskrnl.exe: Implement MmMapLockedPages and MmUnmapLockedPages.", 1 },'; - printf '%s\n' '+ { "Alexander Morozov", "ntoskrnl.exe: Implement KeInitializeMutex.", 1 },'; - printf '%s\n' '+ { "Jarkko Korpi", "ntoskrnl.exe: Add IoGetDeviceAttachmentBaseRef stub.", 1 },'; - printf '%s\n' '+ { "Michael Müller", "ntoskrnl: Implement ExInterlockedPopEntrySList.", 1 },'; - printf '%s\n' '+ { "Michael Müller", "ntoskrnl.exe: Implement NtBuildNumber.", 1 },'; - printf '%s\n' '+ { "Michael Müller", "ntoskrnl.exe: Implement ExInitializeNPagedLookasideList.", 1 },'; - ) >> "$patchlist" -fi - -# Patchset ntoskrnl-Ob_callbacks -# | -# | This patchset has the following (direct or indirect) dependencies: -# | * Compiler_Warnings, ntdll-NtAllocateUuids, ntoskrnl-Stubs -# | -# | This patchset fixes the following Wine bugs: -# | * [#44497] Add stubs for ObRegisterCallbacks, ObUnRegisterCallbacks, ObGetFilterVersion -# | -# | Modified files: -# | * dlls/ntoskrnl.exe/ntoskrnl.c, dlls/ntoskrnl.exe/ntoskrnl.exe.spec, include/ddk/ntifs.h, include/ddk/wdm.h -# | -if test "$enable_ntoskrnl_Ob_callbacks" -eq 1; then - patch_apply ntoskrnl-Ob_callbacks/0001-include-Add-more-typedefs-to-wdm.h.patch - patch_apply ntoskrnl-Ob_callbacks/0002-include-Add-more-types-to-ntifs.h.patch - patch_apply ntoskrnl-Ob_callbacks/0003-ntoskrnl.exe-Add-ObRegisterCallbacks-stub.patch - patch_apply ntoskrnl-Ob_callbacks/0004-ntoskrnl.exe-Add-ObUnRegisterCallbacks-stub.patch - patch_apply ntoskrnl-Ob_callbacks/0005-ntoskrnl.exe-Add-ObGetFilterVersion-stub.patch - ( - printf '%s\n' '+ { "Alistair Leslie-Hughes", "include: Add more typedefs to wdm.h.", 1 },'; - printf '%s\n' '+ { "Alistair Leslie-Hughes", "include: Add more types to ntifs.h.", 1 },'; - printf '%s\n' '+ { "Alistair Leslie-Hughes", "ntoskrnl.exe: Add ObRegisterCallbacks stub.", 1 },'; - printf '%s\n' '+ { "Alistair Leslie-Hughes", "ntoskrnl.exe: Add ObUnRegisterCallbacks stub.", 1 },'; - printf '%s\n' '+ { "Alistair Leslie-Hughes", "ntoskrnl.exe: Add ObGetFilterVersion stub.", 1 },'; - ) >> "$patchlist" -fi - # Patchset nvcuda-CUDA_Support # | # | This patchset fixes the following Wine bugs: