青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

小默

[zz]pagefile vs mappedfile & mm vs cc & IRP_PAGING_IO vs IRP_NOCACHE(轉)

轉自:http://blog.csdn.net/sunwang123456/archive/2005/10/20/510036.aspx
*
 * pagefile vs mappedfile & mm vs cc & IRP_PAGING_IO vs IRP_NOCACHE
 * sunwang<sunwangme@hotmail.com>
 * 2005-10-20
 */
---------------------

//osr1
IRP_PAGING_IO means that the IRP is paging i/o, for example if the IRP is IRP_MJ_WRITE, then it is a paging write and since paging writes are not cached (are not wriites to file cache), IRP_PAGING_IO implies IRP_NOCACHE_IO, so to speak.
[是pageing的就不是cache的.不是cache的就是paging的么?不是! 見osr3.但這種情況==FILE_NO_INTERMEDIATE_BUFFERING,并且是以扇區為單位做io的.對于做stream encrypt不用管如rc4,但是如果是block encrypt如des還是要區別一下.FILE_NO_INTERMEDIATE_BUFFERING是自己對齊的.]

IRP_NOCACHE_IO, and not IRP_PAGING_IO so to speak, means that the IRP is not paging i/o, but it is not cached. For example if the IRP is IRP_MJ_WRITE, then it is not a paging write, and it is non cached (is not a write to file cache). By way of example the user has opened the handle with CreateFile and FILE_FLAG_NO_BUFFERING.

There some important differences between these two cases. For example: in the case of paging i/o certain resources have been pre-acquired, whereas in the case of non paging i/o these resources have not been pre-acquired; paging i/o cannot extend the end of file, whereas non paging i/o can extend the end of file.
[paging的標記是mm使用的,如果用戶訪問了invalid page來讀文件,如mapped file/section等,將導致page fault,mm負責調入內存;寫入相同]

//osr2
IRP_NOCACHE means "do not use the data cache"
IRP_PAGING_IO means "this I/O is on behalf of the VM system"

You will always see IRP_NOCACHE set if IRP_PAGING_IO is set in the IRP_MJ_READ or IRP_MJ_WRITE operation.  You can see IRP_NOCACHE for a user level I/O operation that should bypass the data cache.

For example, open a file and specify FILE_NO_INTERMEDIATE_BUFFERING and the I/O operations will be IRP_NOCACHE.
[也就是說,默認文件讀寫是cache的,所以也沒有一個標記是IRP_CACHE,但可以通過FILE_NO_INTERMEDIATE_BUFFERING禁止]

//osr3
IRP_PAGING_IO is always IRP_NOCACHE. The reverse is not true.

    IRP_NOCACHE without IRP_PAGING_IO is:
    - allowed to grow the file
    - delivered to the FSD without any FCB locks already held
    This is the difference between it and IRP_PAGING_IO.

    Such a request is delivered due to WriteFile to a noncached file.

//osr4
IFS FAQ:
https://www.osronline.com/article.cfm?id=17

IRP->Flags  (from Installable File System Kit)
======
There are several different possible IRP flags which control how underlying drivers (notably file systems) will interpret the contents of the I/O request itself.

IRP_NOCACHE – data for this I/O request should be read from the actual backing media and not from cache.

IRP_PAGING_IO – the I/O operation in question is performing paging I/O. This bit is used by the Memory Manager.

IRP_MOUNT_COMPLETION – the I/O operation in question is performing a mount operation.

IRP_SYNCHRONOUS_API – the API in question expects synchronous behavior. While synchronous behavior is advised when this bit is set, it is not required.

IRP_ASSOCIATED_IRP – the IRP in question is associated with some larger I/O operation.

IRP_BUFFERED_IO – the AssociatedIrp.SystemBuffer field is valid.

IRP_DEALLOCATE_BUFFER – the system buffer was allocated from pool and should be deallocated by the I/O Manager.

IRP_INPUT_OPERATION – the I/O operation is for input. This is used by the Memory Manager to indicate a page in operation.

IRP_SYNCHRONOUS_PAGING_IO – the paging operation should complete synchronously. This bit is used by the Memory Manager.

IRP_CREATE_OPERATION – the IRP represents a file system create operation.

IRP_READ_OPERATION – the IRP represents a read operation.

IRP_WRITE_OPERATION – the IRP represents a write operation.

IRP_CLOSE_OPERATION – the IRP represents a close operation.

IRP_DEFER_IO_COMPLETION – the IRP should be processed asynchronously. While asynchronous behavior is advised when this bit is set, it is not required.


IRP_MJ_CREATE::IrpSp->Parameters.Create.Options  (from Installable File System Kit)
======
Specifies the options to be applied when creating or opening the file. These options are specified as a compatible combination of the following flags.

FILE_DIRECTORY_FILE - The file being created or opened is a directory file. If this flag is set, the Disposition parameter must be set to one of FILE_CREATE, FILE_OPEN, or FILE_OPEN_IF. This flag is compatible with the following CreateOptions flags: FILE_SYNCHRONOUS_IO_ALERT, FILE_SYNCHRONOUS_IO_NONALERT, FILE_WRITE_THROUGH, FILE_OPEN_FOR_BACKUP_INTENT, and FILE_OPEN_BY_FILE_ID. 

FILE_NON_DIRECTORY_FILE - The file being opened must not be a directory file or this call will fail. The file object being opened must represent a data file.
 
FILE_WRITE_THROUGH - System services, FSDs, and drivers that write data to the file must actually transfer the data into the file before any requested write operation is considered complete. 

FILE_SEQUENTIAL_ONLY - All accesses to the file will be sequential.

FILE_RANDOM_ACCESS - Accesses to the file can be random, so no sequential read-ahead operations should be performed on the file by FSDs or the system.

FILE_NO_INTERMEDIATE_BUFFERING - The file cannot be cached or buffered in a driver’s internal buffers. This flag is incompatible with the DesiredAccess FILE_APPEND_DATA flag.
[Callers of ZwReadFile must have already called ZwCreateFile with the DesiredAccess flag FILE_READ_DATA set, either explicitly or by setting this flag using GENERIC_READ.If the preceding call to ZwCreateFile set the CreateOptions flag FILE_NO_INTERMEDIATE_BUFFERING, the Length and ByteOffset parameters to ZwReadFile must be an integral of the sector size. For more information, see ZwCreateFile.][如果有這個標記,read/write/FileDispositionInformation都是以扇區為單位]

FILE_SYNCHRONOUS_IO_ALERT - All operations on the file are performed synchronously. Any wait on behalf of the caller is subject to premature termination from alerts. This flag also causes the I/O system to maintain the file position context. If this flag is set, the DesiredAccess SYNCHRONIZE flag also must be set. 

FILE_SYNCHRONOUS_IO_NONALERT - All operations on the file are performed synchronously. Waits that exist in the system to synchronize I/O queuing and completion are not subject to alerts. This flag also causes the I/O system to maintain the file position context. If this flag is set, the DesiredAccess SYNCHRONIZE flag also must be set.

FILE_CREATE_TREE_CONNECTION - Create a tree connection for this file in order to open it over the network. 

FILE_COMPLETE_IF_OPLOCKED - Complete this operation immediately with an alternate success code if the target file is oplocked, rather than blocking the caller's thread. If the file is oplocked, another caller already has access to the file over the network. 

FILE_NO_EA_KNOWLEDGE - If the extended attributes on an existing file being opened indicate that the caller must understand EAs to properly interpret the file, fail this request because the caller does not understand how to deal with EAs. 

FILE_DELETE_ON_CLOSE - Delete the file when the last handle to it is passed to ZwClose. 

FILE_OPEN_BY_FILE_ID - The file name specified in the ObjectAttributes parameter includes the 8-byte file reference number for the file. This number is assigned by the file system and is file-system-specific. If the file is a reparse point, the file name also includes the name of a device. Note: The FAT file system does not support FILE_OPEN_BY_FILE_ID. 

FILE_OPEN_FOR_BACKUP_INTENT - The file is being opened for backup intent, hence, the system should check for certain access rights and grant the caller the appropriate accesses to the file before checking the input DesiredAccess against the file's security descriptor. 


IRP_MJ_CREATE::IrpSp->Parameters.Create.SecurityContext->DesiredAccess  (from Installable File System Kit)
======
Bitmask of flags specifying the type of access that the caller requires to the file or directory. The set of system-defined DesiredAccess flags determines the following specific access rights for file objects. DesiredAccess Flags Meaning

DELETE - The file can be deleted.

FILE_READ_DATA - Data can be read from the file.

FILE_READ_ATTRIBUTES - FileAttributes flags, described later, can be read.

FILE_READ_EA - Extended attributes (EA) associated with the file can be read. 

READ_CONTROL - The access control list (ACL) and ownership information associated with the file can be read.

FILE_WRITE_DATA - Data can be written to the file.

FILE_WRITE_ATTRIBUTES - FileAttributes flags can be written.

FILE_WRITE_EA - Extended attributes associated with the file can be written. 

FILE_APPEND_DATA - Data can be appended to the file.

WRITE_DAC  - The discretionary access control list (DACL) associated with the file can be written.

WRITE_OWNER  - Ownership information associated with the file can be written.

SYNCHRONIZE - The caller can wait on the returned FileHandle to synchronize with the completion of an I/O operation. This flag must be set if the CreateOptions FILE_SYNCHRONOUS_IO_ALERT or FILE_SYNCHRONOUS_IO_NONALERT flag is set. 

FILE_EXECUTE - Data can be read into memory from the file using system paging I/O. 

IRP_MJ_CREATE::Irp->IoStatus (from Installable File System Kit)
======
Pointer to an IO_STATUS_BLOCK structure that receives the final completion status and information about the requested operation. The file system sets the Information member of this structure to one of the following values:

FILE_CREATED [用這個標記可以判斷是不是創建了一個新文件]

FILE_DOES_NOT_EXIST

FILE_EXISTS

FILE_OPENED

FILE_OVERWRITTEN

FILE_SUPERSEDED

NT::FileDispositionInformation (from Installable File System Kit) [可以在這里禁止刪除文件]
NT::FileRenameInformation [可以在這里禁止重命名]
NT::FileEndOfFileInformation [這個也會影響數據]
======
Specifies a value that determines the action to be taken, depending on whether the file already exists. The value can be any of those described following. Disposition Values Meaning

FILE_SUPERSEDE - If the file already exists, replace it with the given file. If it does not, create the given file. 

FILE_CREATE  - If the file already exists, fail the request and do not create or open the given file. If it does not, create the given file.

FILE_OPEN  - If the file already exists, open it instead of creating a new file. If it does not, fail the request and do not create a new file.

FILE_OPEN_IF - If the file already exists, open it. If it does not, create the given file.

FILE_OVERWRITE If - the file already exists, open it and overwrite it. If it does not, fail the request.

FILE_OVERWRITE_IF - If the file already exists, open it and overwrite it. If it does not, create the given file.

 


本文來自CSDN博客,轉載請標明出處:http://blog.csdn.net/sunwang123456/archive/2005/10/20/510036.aspx

posted on 2009-12-31 01:31 小默 閱讀(889) 評論(0)  編輯 收藏 引用 所屬分類: Windows

導航

統計

留言簿(13)

隨筆分類(287)

隨筆檔案(289)

漏洞

搜索

積分與排名

最新評論

閱讀排行榜

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            久久久午夜视频| 亚洲国产一二三| 久久精品视频免费观看| 亚洲午夜未删减在线观看| 9色porny自拍视频一区二区| 亚洲大胆女人| 精品99一区二区| 亚洲国产欧美精品| 一区二区三区高清| 亚洲欧美激情视频在线观看一区二区三区| 亚洲一区二区久久| 欧美综合77777色婷婷| 欧美+日本+国产+在线a∨观看| 久久中文字幕导航| 亚洲欧洲日本在线| 中国成人黄色视屏| 久久久999成人| 欧美黄色小视频| 国产精品视频成人| 91久久中文字幕| 午夜国产精品视频| 亚洲电影免费观看高清完整版在线观看| 亚洲国产高清一区| 午夜电影亚洲| 欧美精品v日韩精品v韩国精品v | 久久精品亚洲一区二区三区浴池| 久久综合五月| 国产精品免费一区豆花| 在线观看三级视频欧美| 在线一区欧美| 男女激情视频一区| 亚洲免费一在线| 欧美久久视频| 一区二区三区在线观看国产| 亚洲一区美女视频在线观看免费| 久久久国产视频91| 亚洲视频在线观看网站| 欧美成人第一页| 尹人成人综合网| 久久久九九九九| 亚洲综合欧美| 国产精品成人国产乱一区| 亚洲精品一区久久久久久| 久久久91精品国产一区二区精品| 9l国产精品久久久久麻豆| 欧美成人在线网站| 91久久国产精品91久久性色| 久久亚洲国产精品日日av夜夜| 亚洲一区二区三区影院| 欧美日韩在线视频观看| 99亚洲精品| 亚洲精品国产无天堂网2021| 欧美成年人网站| 亚洲精品国产日韩| 欧美第一黄色网| 老司机免费视频久久| 在线观看成人网| 开元免费观看欧美电视剧网站| 欧美亚洲视频在线观看| 国产日韩综合| 久久久久综合一区二区三区| 欧美一级大片在线观看| 国产网站欧美日韩免费精品在线观看| 午夜精品久久久久久久久| 中国女人久久久| 国产精品久久久久9999| 午夜激情综合网| 欧美亚洲综合在线| 激情综合久久| 欧美激情一区二区三区全黄 | 亚洲视频在线播放| 日韩一二三在线视频播| 国产精品第一区| 亚洲综合电影一区二区三区| 奶水喷射视频一区| 欧美a级一区二区| 一个色综合av| 亚洲在线一区| 国产综合久久| 欧美成人精品三级在线观看| 欧美成人一品| 午夜亚洲福利| 久久久青草婷婷精品综合日韩| 亚洲丶国产丶欧美一区二区三区| 亚洲国产精品电影| 欧美视频手机在线| 久久久成人精品| 欧美韩日精品| 欧美一区二区三区免费看| 久久久久久久97| 一区二区高清在线| 欧美一区亚洲一区| 夜夜嗨av一区二区三区网站四季av| 亚洲天堂av图片| 亚洲国产精品久久久久秋霞蜜臀| 99ri日韩精品视频| 激情欧美国产欧美| 一道本一区二区| 在线观看亚洲精品| 亚洲一区亚洲二区| 亚洲国产美女| 先锋影音国产精品| 一二三四社区欧美黄| 久久久久久久综合狠狠综合| 亚洲一区激情| 美女被久久久| 久久久久久国产精品mv| 欧美日韩国产页| 免费在线欧美视频| 国产欧美日韩视频一区二区| 亚洲国产精品高清久久久| 国产欧美一区二区三区沐欲| 亚洲精品一区二| 亚洲国产另类精品专区| 香蕉成人啪国产精品视频综合网| av成人激情| 美女主播一区| 狂野欧美一区| 国产一区二区成人| 亚洲在线一区二区| 亚洲一区免费看| 欧美日韩大陆在线| 欧美 亚欧 日韩视频在线| 国产亚洲第一区| 亚洲欧美国产精品专区久久| 中文一区二区在线观看| 欧美日本三级| 亚洲精品乱码久久久久久蜜桃91| 亚洲国产欧美一区| 久久三级福利| 欧美成人激情视频| 亚洲高清不卡| 免费人成网站在线观看欧美高清| 久久久久久久激情视频| 国产毛片一区二区| 香蕉乱码成人久久天堂爱免费| 欧美一区二区成人| 国产日韩精品在线| 午夜欧美大片免费观看| 香蕉久久a毛片| 国产日韩精品视频一区| 亚洲欧美制服另类日韩| 久久国产乱子精品免费女| 国产日韩精品在线观看| 欧美一级片一区| 美乳少妇欧美精品| 亚洲激情自拍| 欧美日韩一区二区在线观看视频| 亚洲精品在线一区二区| 亚洲一区二区在线看| 国产精品乱人伦中文| 亚洲欧美中日韩| 欧美成人午夜激情| 日韩视频在线免费观看| 欧美日韩你懂的| 亚洲一级网站| 久久久久久伊人| 亚洲国产成人在线| 欧美激情网友自拍| 亚洲性夜色噜噜噜7777| 欧美一级久久久久久久大片| 国产亚洲欧美激情| 欧美α欧美αv大片| 中国av一区| 美腿丝袜亚洲色图| 在线综合亚洲欧美在线视频| 国产精品一国产精品k频道56| 久久成人18免费网站| 欧美激情国产日韩| 欧美一区二区三区在线播放| 一区视频在线看| 欧美视频二区| 久久久久久久高潮| 99综合精品| 欧美国产精品一区| 欧美一级久久| 亚洲精品乱码久久久久久蜜桃91 | 亚洲在线免费| 欧美国产日韩亚洲一区| 亚洲欧美日本日韩| 亚洲激情影视| 国产视频久久久久久久| 麻豆freexxxx性91精品| 在线一区亚洲| 欧美福利一区二区| 欧美一区二区三区婷婷月色 | 欧美大片免费| 午夜国产精品视频免费体验区| 欧美激情一二区| 欧美在线亚洲一区| 一区二区三区你懂的| 在线不卡免费欧美| 国产精品亚洲片夜色在线| 免播放器亚洲一区| 亚洲欧美精品伊人久久| 一本久久综合亚洲鲁鲁| 亚洲欧洲在线免费| 国产一区高清视频| 国产精品视频精品| 欧美日韩在线观看一区二区|