Tips for Writing a File System Filter

Nginx架构及配置详解 概述 Nginx采用C进行编写,是俄罗斯程序员开发的一款轻量级的可构建Web 服务器/反向代理服务器及电子邮件(IMAP/POP3)代理服务器的软件, Nginx服务器是一个高性能的HTTP和反向代理web服务器,同时也可提供了IMAP/POP3/SMTP服务。nginx常用作跑静态和做负载反向代理,动态php交给apache处理,因后者比较稳定,jsp交给tomcat、resin或jboss。n...... 阅读详情

Ariane Jansen

There have been a few questions posted to the newsgroup over the past few months on the scope of the initial setup, and the registry settings of file system filters. I hope to answer some of the most commonly asked questions here.

================
File system filter scope
================

With Windows CE version 4.0, any file system can be filtered with the exception of the ROM/RAM file system. Because version 4.0 allows the boot device to be something other than ROM/RAM when using the hive-based registry, OEMs can put the registry hive on a boot device and filter it. OEMs can filter the boot device, but others may not be able to because the image used to boot must include the registry settings pertaining to the filter early in the boot phase, which requires changing the ROM image.

With other media besides the boot device, the filter registry keys can be added to the registry then the media dismounted and remounted, which loads the filter. If you dismount and remount the boot device, the registry hive will become invalid, leading to crashes, strange behavior, etc… Needless to say, dismounting the boot device is not recommended.

==================
Initial setup
==================

The initial setup of the filter can be taken from the filter example FSDSPY which is under:

%_WINCEROOT%/public/common/oak/drivers/fsd/fsdspy/

The filter is initialized during HookVolume, which will need to set up some type of volume object that will store the FilterHook. Make sure to actually memcpy() the FilterHook. Simply using a pointer to the FilterHook can lead to problems if there are filters loaded above yours, because the API set that the FSDMGR is pointing to can change.

The .def file needs to include every file system function that you plan to implement or pass through to the underlying file system. If you are stubbing a function entirely, then it can be left out of the .def file.

The FILTERHOOK file system functions are declared as .pReadFile, pFlushFileBuffers, etc… (listed in full here) Below the FilterHook declaration are pointers to the various MyFSD functions that describe the function parameters.
===============
Registry keys
===============

 

 

The most important registry key is the one that gets your filter loaded. There are three places that the FSDMGR will look for the DLL for non-autoload file systems when media is loaded. If the media’s profile name is MSFlash, the file system is FATFS, the filter is named MyFilter, and the filter's DLL is named myfilterdll.dll, then the three places are:

This key will add the filter to every volume:
  [HKEY_LOCAL_MACHINE/System/StorageManager/Filters/MyFilter]

This key will add the filter to every volume that has the profile MSFLASH:
  [HKEY_LOCAL_MACHINE/System/StorageManager/Profiles/MSFlash/Filters/MyFilter]

This key will add the filter to every volume that has the profile MSFLASH and uses FATFS:
  [HKEY_LOCAL_MACHINE/System/StorageManager/Profiles/MSFlash/FATFS/Filters/MyFilter]

There are similar places for autoload file system filters to be loaded, such as RELFSD:
  [HKEY_LOCAL_MACHINE/System/StorageManager/AutoLoad/Relfsd/Filters/MyFilter]

The value and its value are: "Dll"="myfilterdll.dll" An additional value, "Order," can be used, with the values from 0 to (DWORD)-1. The lower the filter's order, the higher it is on the file system stack (the farther it is from the FSD and the closer to it is to the user). In other words, the filter with the highest order number is loaded first, with the next highest being loaded on top of it. If there is only one filter, this does not matter, but if you're layering filters, this is quite important. If the order is left unspecified then the ordering of the filters is also unspecified.

If you are able to make your own images, and you want to put the filter on the boot device, wrap the registry key containing your "Dll" value in a hive boot section:

  ; HIVE BOOT SECTION
  [HKEY_LOCAL_MACHINE/System/StorageManager/Profiles/MSFlash/FATFS/Filters/MyFilter]
    "Dll"="myfilterdll.dll"
    "Order"=dword:2
  ; END HIVE BOOT SECTION

 

In Windows CE version 4.0 and up, there are functions available to filters that can be called to easily open registry keys. The functions are those that are prefixed with FSDMGR_GetRegistry*.

The HDSK used as the first parameter for the GetRegistry functions is the HDSK passed to the FilterHook during HookVolume. The registry key these functions look at is:

[HKEY_LOCAL_MACHINE/System/StorageManager/Filters/MyFilter]
  "MyValue"=dword:4

Other registry keys can be used or created, but they need to be opened, read, and closed as usual.

Note: When the filter is installed on the boot device, reading or writing to the registry anytime outside of the HookVolume call is not a good idea, regardless of whether the filter or a function the filter calls does the registry operation. Registry access in this situation can and will lead to deadlocks within the file system.

Ariane Jansen is a developer on the Windows CE Kernel and Storage team, specializing in performance. For more content by Sue Loh and her colleagues, read the Windows CE Base Team Blog.

【信息科学与工程学】计算机科学与自动化——第三百零五篇 数据中心 Scale-Up、Scale-Out、Scale-Across 18 普通CDN在遭遇50Gbps攻击时,节点瘫痪率高达70%。云化安全CDN的零信任模型通过将动态身份验证、最小权限访问与CDN的分布式加速能力深度集成,实现安全与性能的协同优化。云化的安全CDN(如腾讯云EdgeOne)与普通的安全CDN在架构、功能、性能和适用场景上存在显著差异。某视频平台接入腾讯云EdgeOne+零信任方案后,全球平均延迟降至46ms,攻击拦截率99.97%,验证了协同模型在高并发场景的普适性。​:随着边缘计算普及,云化安全CDN将逐步取代传统方案,成为高交互、高安全场景的标配基础设施。 阅读详情

相关推荐

file-system-filter:Windows文件系统筛选器驱动程序-该技术的说明

Windows文件系统筛选器驱动程序开发教程 关于 一个简单的Windows文件系统筛选器驱动程序解决方案,主要用于演示和进一步的自定义目的。 开发文件系统过滤器驱动程序的主要目的是更改文件系统行为。 它在每个I / O操作中都被调用,并提供了附加处理其参数和更改其结果的可能性(“过滤”此请求)。 文件系统筛选器驱动程序开发用于基于上下文的权限管理,配置更改管理,访问管理,连续备份解决方案,反恶意软件解决方案和许多其他应用程序。 作者:@SergiusTheBest 执行 该代码是用C ++编写的。 您还将需要WDK / IFS套件来构建解决方案。 您可以在找到包含代码示例的分步文件系统过滤器驱动程序教程,以及有关如何安装/卸载和启动/停止该驱动程序的。 执照 根据MIT许可获得许可。 :copyright:Apriorit。 如何建造 要构建过滤器驱动程序解决方案,您需要: Visual Studi

一个简单的windows filesystem mini filter 驱动例子

代码网上都有,就讲一下解决安装问题: 1,mini filter 的安装,一开始还是项普通的 legacy driver一样,通过命令函 "sc create servicenam binPath type=kernel"发现一直报错:找不到文件;然后调整"sc create servicename binPath type=filesys";驱动可以起来,然后FltRegisterFilter失败,报错找不到对象(0xc0000034).原来mini filter driver 安装需要通过inf 文件

pureman_mega的博客 2138

从虚拟机到双系统:手把手教你为Gromacs搭建最强Linux环境(含WSL2、Ubuntu22.04配置)

本文详细指导如何在Windows系统下为Gromacs分子动力学模拟搭建高性能Linux环境,涵盖WSL2和Ubuntu22.04双系统配置。通过对比虚拟机、WSL2和原生Linux的性能数据,提供GPU加速、内存优化等实用技巧,帮助科研人员提升计算效率。

weixin_30861797的博客 271

File System Filter Drivers

This section includes the following topics, which describe file system filter drivers: File System Fundamentals Introduction to File System Filter Drivers Filtering IRPs and Fast I/O Writi

zplove003的专栏 457

解决vLLM安装卡在vllm-nccl-cu12依赖项的实战指南

本文提供了解决vLLM安装过程中卡在vllm-nccl-cu12依赖项的详细指南。通过分析CUDA版本兼容性问题,介绍了三种实用解决方案:安装指定版本vLLM、手动安装nccl-cu12依赖以及升级CUDA到12.x版本,并特别针对离线环境提供了安装建议,帮助开发者顺利完成vLLM的安装部署。

weixin_29098367的博客 515

【信息安全】seed-labs实验-Firewall Exploration Lab

本实验主要就是基于LKM和Netfilter实现简单的防火墙,重点是后者。路由器是有两个ip的,一个是外网ip,一个是内网ip每一次做完实验,都要做好收尾工作(比如:模块装入之后,要记得移除;iptables命令设置完规则之后,要把对应规则删掉)

可乐大牛的博客 5995

Recognizer & FS & Filter

注一:File system recognizer 文件系统识别器(下文简称为recognizer)File system            文件系统     (下文简称为fs)File system filter     文件系统过滤器(下文简称为filter)文件系统识别器是一个标准的NT内核模式驱动程序;它只实现一项功能:检查物理介质设备,如果它能够识别存储介质的格式便加载相应的文件

935

手把手教你用Three.js+Vue打造3D机房可视化系统(附完整代码)

本文详细介绍了如何使用Three.js与Vue 3构建企业级3D机房可视化系统。从技术选型、项目架构设计到3D场景构建、设备建模与渲染策略,提供了完整的开发方案和实战代码。重点讲解了如何实现设备状态实时监控、交互操作与性能优化,帮助开发者快速掌握3D可视化开发的核心技术。

ttt77的博客 319

Windows Filesystem filter driver

参考:http://www.codeproject.com/Articles/43586/File-System-Filter-Driver-Tutorial 关键点: To perform attaching, we create a new device object with the device extension (callIoCreateDevice) and the pro...

weixin_33832340的博客 592

PID控制器(位置式和增量式)

PID控制算法

zhinian_hao的博客 4512

【全志V821_FoxPi】6-3 GC2083 MIPI摄像头适配

本文介绍了在全志V821芯片上适配GC2083 MIPI摄像头的方案。GC2083是一款支持1080P@30fps的高性能CMOS图像传感器,采用MIPI CSI-2接口,具有低功耗特性。文章详细列出了传感器的技术参数和工作电压要求,并提供了设备树配置示例,包括CSI接口、ISP处理单元和传感器节点的具体设置。通过快速配置命令one_gc2083_sensor或手动修改设备树即可启用该摄像头模组,适用于IPC等对图像质量有要求的嵌入式应用场景。

第四维度的博客 1930

File System Filter Driver Tutorial

<br />http://www.codeproject.com/KB/system/fs-filter-driver-tutorial.aspx<br /> 

迷茫的小莱 1024

使用Open3D进行RGB-D图像点云处理

在本文中,我们将使用Open3D来处理RGB-D图像,提取点云并进行一些基本的操作。总结起来,本文介绍了如何使用Open3D库处理RGB-D图像并提取点云。我们展示了如何读取RGB-D图像,创建RGB-D图像和点云,并显示点云。除了显示点云,Open3D还提供了许多其他功能,如点云滤波、点云配准、表面重建等。在创建RGB-D图像时,我们需要指定深度图像的缩放因子和截断值,以及是否将RGB图像转换为强度图像。希望本文能够帮助您入门Open3D,并在处理RGB-D图像和点云数据时提供一些指导。

QfcaLinux的博客 446

整理一份我对Windows文件系统过滤驱动的sFilter工程代码的详细说明(精华侨)

标 题: 【分享】整理一份我对Windows文件系统过滤驱动的sFilter工程代码的详细说明 作 者: tianhz 时 间: 2012-06-19,18:32:07 链 接: http://bbs.pediy.com/showthread.php?t=152338 我平时很忙,很少发表主题。我在工作的时候,我身边的很多同事都不停地问我有关Windows文件系统过滤驱动的问题。他们中

多媒体编程、网络编程、系统编程、网络安全编程、驱动编程 6384

Vue3 - Element Plus 日期选择器 el-date-picker,设置 type=week 变成周选择器后,将选择周时修改为 “周一至周日“ 为一组范围(详细示例代码,新手小白秒会)

vue3,element-plus,DatePicker日期选择器,el-date-picker,周,type=week,周选择器,日期选择器week怎么拿到具体的时间范围,如何取week周选择器的value值,format如何设置,时间选择器按周选择时展示具体日期范围,vue3elementPlus日期选择器选择一周7天的数据格式怎么拿到,el-date-picker设置type等于week后怎么设置format属性,format和value-format怎么设置,范围选择器周,一周,选择一周7天时间

🏆 前端领域优质创作者 1万+

C# WinForm 基于DirectShow.dll编写的程序,可边预览边保存视频,音频和图片

基于微软的DirectShow.dll的二次开发1.自动识别连接的摄像头跟麦克风且可以对其进行选择(默认选中第一个)2.可录制wmv和avi两种格式的视频并且都带有音频,avi可以录制的分辨率和帧数进行选择,wmv默认进行了淸晰度优化如不喜欢可去除代码中有相关提示3.可在预览点开之后进行拍照,也可边录制视频边拍照4.添加了视频和音频的压缩功能(酌情使用)这次二次开发发现C#对DirectShow的相关信息太少,这次做完也不敢藏私共享出来,还望大家指正

Python+Agent入门笔记(六):记忆和状态,从“一次性问答”到“能用助手”

滑动窗口的缺点很明显:被扔掉的信息就真没了。如果用户第一轮说“我不吃辣”,隔了二十轮让他推荐餐厅,模型已经忘了。定期把旧的对话压缩成一段总结,作为一条特殊的消息插进去。"""把除 system 和最近 keep_recent 条以外的消息,压缩成一条摘要。返回新的 messages 列表。"""# 把旧消息拼成纯文本,让模型总结content = f"[工具结果]把除 system 和最近 keep_recent 条以外的消息,压缩成一条摘要。返回新的 messages 列表。

qq_41241612的博客 102

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

循环嵌套(多层 for 循环)

表:order(订单表,order_id, user_id)、user(用户表,user_id, user_name)✅ 优化:先查所有订单,拿到所有 user_id 批量 in 查询,内存 join。✅ 优化:先把优惠券转 HashMap,单层循环查找(hash 查找 O (1))SQL 只有 2 次,O (1) 数据库查询,内存遍历 O (n)。需求:查询所有订单列表,同时带出每个订单对应的用户名称。需求:订单列表、优惠券列表,把订单匹配对应的优惠券名称。复杂度:O (M+N),非常快。

weixin_43732943的博客 190

visio安装包

Microsoft Office Visio 是一款专业的制图软件。利用经过更新的形状、协作工具和数据链接图表,创建专业级图表以简化复杂的信息。

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

【数据结构-5】单链表的实现

单链表,具体来说是单向的、不带头的、不循环的链表。链表由一个一个节点组成,每个节点分为数据域和指针域,数据域存放数据,指针域存放下一节点的地址。这样,就可以根据指针域中的地址找到下一个节点,节点就串起来了构成了单链表。

a bit 205

C# 数据结构和特殊类型

.NET Core(现称.NET)提供丰富数据结构,优化性能与开发效率。日常开发首选List<T>和Dictionary<TKey,TValue>;高性能场景推荐Span<T>与Memory<T>减少内存分配;并发环境使用ConcurrentDictionary等线程安全集合;避免非泛型集合如ArrayList。

cccloveforever的博客 708

C++ 入门笔记(十七):list 入门 —— 为什么 list 不能 sort?

第17课:用大白话讲清 list 的双向链表结构、哨兵头、push_back 四步、迭代器封装、merge 与 splice 的区别,以及 vector 排序为什么常比 list 快。

wo_jack的博客 242

工厂设备接MES为什么慢:协议识别与点表配置自动化的技术拆解

工业现场设备接 MES 的周期主要消耗在协议识别与点表配置。本文拆解这条链路的四层结构,给出点表映射的数据模型、两种部署架构的对比,以及可直接落地的三项验收口径与校验代码。适合工控集成、MES 实施、设备联网方向的工程师。

emfuture的博客 401

list

的底层是双向链表结构,双向链表中每个元素存储在互不相关的独立节点中,在节点中通过指针指向其前一个元素和后一个元素。,因此反向迭代器的实现可以借助正向迭代器,即:反向迭代器内部可以包含一个正向迭代器,对正向迭代器的接口进行包装即可。是可以在常数范围内在任意位置进行插入和删除的序列式容器,并且该容器可以前后双向迭代。迭代到该位置,在这段位置上迭代需要线性的时间开销;最大的缺陷是不支持任意位置的随机访问,比如:要访问。还需要一些额外的空间,以保存每个节点的相关联信息。个元素,必须从已知的位置。

xie0510_的博客 286

软件商店常见问题标准处理流程

从底层软件源来看,/etc/apt/sources.list配置错误、源地址失效、公网与内网离线源混用、ARM64与x86_64架构源串用,以及DNS解析异常、系统代理配置错误,都会导致商店无法获取应用数据;打开该应用,确认可正常运行;软件商店作为系统内置的图形化软件分发与安装入口(UKUI桌面配套组件,底层依赖APT软件源),承担着应用软件的浏览、搜索、下载、安装、升级与卸载等核心功能,是终端软件部署与管理的关键通道。覆盖软件商店启动、页面加载、应用下载、安装、卸载、搜索、自身更新等全部业务场景。

qq_39496637的博客 292

【AI 开发从入门到进阶 · 10】收官篇:LoRA 微调、模型评估、推理加速与生产部署全链路

本文系统梳理了大模型微调与生产落地的全流程,从决策是否微调、优选LoRA技术方案,到代码实现、效果评估、推理加速与FastAPI服务封装,最终构建可迭代的生产级AI系统。强调“逐级升级”原则,倡导以数据闭环驱动优化,避免技术冲动。全系列贯穿工程化思维,提供可复用模板与实战建议,助力开发者从模型训练迈向稳定可用的AI服务部署。

信息安全领域优质创作者|操作系统领域专家 120

ARIA规范

ARIA用来补充原生HTML缺失的语义,原则:优先原生标签,ARIA仅做补充。 ARIA角色role:定义组件身份,分为地标角色、构件角色、文档角色;构件角色用于自定义弹窗、tab、下拉菜单等复杂组件; ARIA状态与属性:以aria-开头,描述组件实时状态;常用:aria-label、aria-labelledby、aria-describedby、aria-hidden、aria-expanded、aria-selected、aria-modal、aria-live; 常用场景:图标按钮用aria-l

2401_83227843的博客 460

LangGraph(03):状态归约、并行更新与消息管理

并行节点写入报错?历史消息无法清理?本文拆解 LangGraph 状态归约与消息增删改机制,带你精确控制复杂工作流状态。

专注于 Agent 工程、AI 产品、Harness Engineering、LLM 算法等方向,OpenMathModel、Nivik 等开源项目作者 118
上一篇: Windows Embedded Codenames
下一篇: 快速删除iphone日历中所有的日历项
会思考的草
博客等级 码龄25年 208粉丝 55原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值