437 Commits

Author SHA1 Message Date
Bill Zissimopoulos
0eb6912296 sys: FspSiloEnumerate, FspDriverFinalizeDevicesForUnload 2022-10-01 10:47:18 +01:00
Bill Zissimopoulos
c237a55951 Merge branch 'master' into pvt-sxs 2022-09-29 17:00:10 +01:00
Bill Zissimopoulos
a3765d6360 sys: silo: FspSiloPostInitialize 2022-09-27 19:55:08 +01:00
Bill Zissimopoulos
9670caa3fe sys,dll: FSP_FSCTL_UNLOAD 2022-08-18 11:05:45 +01:00
Bill Zissimopoulos
005d3e4fb0 sys: FspUnload, FspSxsIdent 2022-08-05 17:41:12 +01:00
Bill Zissimopoulos
a731f0e5d8 sys,dll: MountUseMountmgrFromFSD 2022-06-27 17:28:24 +01:00
Bill Zissimopoulos
26af6c9363 sys: convert suitable ERESOURCE to FAST_MUTEX 2022-06-10 16:20:24 +01:00
Bill Zissimopoulos
2e441534a3 sys: FspFsvolDeviceLockVolumeNotify 2022-06-10 16:20:19 +01:00
Bill Zissimopoulos
66f3620808 sys: FSP_FSVOL_DEVICE_EXTENSION::VolumeDeleteResource 2022-06-10 16:20:13 +01:00
Bill Zissimopoulos
805742f306 sys: FSP_FSVOL_DEVICE_EXTENSION::VolumeDeleteResource 2022-06-10 16:20:08 +01:00
Bill Zissimopoulos
18842682c8 sys: inline FspFsvolDeviceFileRename* and FspFsvolDeviceLockContextTable 2022-06-10 16:19:57 +01:00
Bill Zissimopoulos
69257949ac sys: FspCompareUnicodeString 2022-06-02 13:09:40 +01:00
Bill Zissimopoulos
c7b3312cf6 sys: disable FSP_FILE_NODE_NO_PGIO 2022-05-17 23:44:16 +01:00
Bill Zissimopoulos
c0fa5696d7 sys: FspVolumeFastTransact 2022-05-17 17:25:18 +01:00
Bill Zissimopoulos
df4c19c113 sys: FSP_FILE_NODE_NO_PGIO 2022-04-19 15:21:54 +01:00
Bill Zissimopoulos
deaf475861 sys: FSP_ENTER_FIO: handle bogus fast I/O to fsctl device 2022-04-19 14:29:29 +01:00
Bill Zissimopoulos
d816d607f4 sys: FspFsvolDeviceDirInfoCacheItemSizeMax: increase to 64K 2022-03-24 18:10:04 +00:00
Bill Zissimopoulos
20680fa5b5 sys: FastIo: read/write implementation 2022-03-20 20:31:54 +00:00
Bill Zissimopoulos
29251dc2be
sys, dll: convert memory barriers to interlocked operations 2022-01-19 10:55:46 +00:00
Bill Zissimopoulos
04c2f0120c
sys: remove wait group (Wgroup) functionality 2022-01-17 14:30:06 +00:00
Bill Zissimopoulos
228f1d658d
sys: FspVolumeNotify: allow multiple outstanding calls to FspFileSystemNotifyBegin 2022-01-15 15:46:56 +00:00
Bill Zissimopoulos
751eaa69df
update source copyright to 2022 2022-01-07 17:30:49 +00:00
Bill Zissimopoulos
41cc70e573
ARM64: initial port 2021-12-07 14:40:28 +00:00
Bill Zissimopoulos
c208e0ecbd
sys: cache FileDesc->DispositionStatus
DeleteFileW and RemoveDirectoryW in recent versions of Windows 10 have
been changed to perform a FileDispositionInformationEx with POSIX
semantics and if that fails to retry with FileDispositionInformation.
Unfortunately this is done even for legitimate error codes such as
STATUS_DIRECTORY_NOT_EMPTY.

This means that user mode file systems have to do unnecessary CanDelete
checks even when they support FileDispositionInformationEx. The extra
check incurs extra context switches, and in some cases it may also be
costly to compute (e.g. FUSE).

We optimize this away by storing the status of the last CanDelete check
in the FileDesc and then continue returning the same status code for
all checks for the same FileDesc.
2021-12-04 12:36:12 +00:00
Bill Zissimopoulos
91211f6ccb
sys: reimplement POSIX unlink 2021-11-24 16:03:31 +00:00
Bill Zissimopoulos
bb3e92df6c
sys, dll: implement POSIX semantics for Rename 2021-10-21 15:39:25 +01:00
Bill Zissimopoulos
19823d84de
sys,dll,inc: implement new Delete design and POSIX semantics 2021-10-19 15:23:15 +01:00
Bill Zissimopoulos
6e3a8f70b2
update source copyright to 2021 2021-05-21 15:57:05 -07:00
Bill Zissimopoulos
ca832988ed
dll,sys: fix issue #369
The original WinFsp protocol for shutting down a file system was to issue
an FSP_FSCTL_STOP control code to the fsctl device. This would set the IOQ
to the "stopped" state and would also cancel all active IRP's. Cancelation
of IRP's would sometimes free buffers that may have still been in use by
the user mode file system threads; hence access violation.

To fix this problem a new control code FSP_FSCTL_STOP0 is introduced. The
new file system shutdown protocol is backwards compatible with the original
one and works as follows:

- First the file system process issues an FSP_FSCTL_STOP0 control code which
sets the IOQ to the "stopped" state but does NOT cancel IRP's.

- Then the file system process waits for its dispatcher threads to complete
(see FspFileSystemStopDispatcher).

- Finally the file system process issues an FSP_FSCTL_STOP control code
which stops the (already stopped) IOQ and cancels all IRP's.
2021-05-18 12:30:17 -07:00
Bill Zissimopoulos
33c6e7ee61
sys: fix issue #364 2021-04-16 16:43:34 -07:00
Bill Zissimopoulos
023c925fb6
WinFsp rebranding support 2021-04-12 17:47:34 -07:00
Bill Zissimopoulos
c5b850be35
sys: improve trace functionality 2021-01-25 13:11:10 -08:00
Bill Zissimopoulos
0af0bfbe7c
sys: FspFsvolClose: convert CLOSE requests to synchronous when above the IOQ watermark 2021-01-25 12:45:33 -08:00
Bill Zissimopoulos
a5726c820b
sys: add trace functionality 2021-01-13 16:15:06 -08:00
Bill Zissimopoulos
3687df53c6
sys: wait groups and notify implementation 2020-10-09 12:40:49 -07:00
Bill Zissimopoulos
7f360827f6
sys: notify implementation 2020-10-08 15:31:41 -07:00
Bill Zissimopoulos
01f91c771d
sys: notify implementation 2020-10-07 17:07:35 -07:00
Bill Zissimopoulos
844fb7171e
inc,dll,sys: notify implementation skeleton 2020-10-06 16:37:33 -07:00
Bill Zissimopoulos
aa3beba928
sys: silo support 2020-06-05 15:47:19 -07:00
Bill Zissimopoulos
899cd5595d
sys: FspIsNtDdiVersionAvailable 2020-06-01 23:11:33 -07:00
Bill Zissimopoulos
42fd57904a
sys: FspFsvolReadNonCached: trim ReadLength
During CreateProcess/CreateSection Windows locks the image file (using AcquireFileForNtCreateSection),
gets the image file size and then reads the image file. Unfortunately if the file system (erroneously) reads
past the file size, Windows can bugcheck. This allows a faulty or malicious file system to crash Windows.

This commit adds a check in WinFsp to mitigate this problem.
2020-04-10 19:24:43 -07:00
Bill Zissimopoulos
24b5d48fed
add shared/ku/config.h and related changes 2020-02-07 15:40:08 -08:00
Bill Zissimopoulos
71995a1fcd
dll,sys: FSP_CFG_REJECT_EARLY_IRP
Includes Avast fix for FUSE.
2020-02-07 15:11:24 -08:00
Bill Zissimopoulos
8497855d80
sys: FSP_DEVICE_REJECT_EARLY_IRP macro 2020-02-07 13:22:09 -08:00
Bill Zissimopoulos
bf6d56ceac
inc,sys,tst: FSP_FSCTL_VOLUME_PARAMS::RejectIrpPriorToTransact0 2020-02-03 16:38:55 -08:00
Bill Zissimopoulos
51350d5a42
inc,sys,tst: FSP_FSCTL_VOLUME_PARAMS::RejectIrpPriorToTransact 2020-02-03 14:59:23 -08:00
Bill Zissimopoulos
aedf01a384
update source copyright for 2020 2020-01-02 17:50:40 -08:00
Bill Zissimopoulos
254174b8e9
sys: avoid using FspFsextProvider unnecessarily 2019-11-04 16:30:30 -08:00
Bill Zissimopoulos
9436fd8402
sys: implement SectorSize queries
- IRP_MJ_QUERY_VOLUME_INFORMATION/FileFsSectorSizeInformation
- IOCTL_STORAGE_QUERY_PROPERTY/StorageAccessAlignmentProperty
2019-09-06 20:52:15 -07:00
Bill Zissimopoulos
4655926d03
sys, dll: mount manager support 2019-09-06 14:24:00 -07:00