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

小默

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

轉(zhuǎn)自: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,并且是以扇區(qū)為單位做io的.對(duì)于做stream encrypt不用管如rc4,但是如果是block encrypt如des還是要區(qū)別一下.FILE_NO_INTERMEDIATE_BUFFERING是自己對(duì)齊的.]

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的標(biāo)記是mm使用的,如果用戶訪問了invalid page來讀文件,如mapped file/section等,將導(dǎo)致page fault,mm負(fù)責(zé)調(diào)入內(nèi)存;寫入相同]

//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.
[也就是說,默認(rèn)文件讀寫是cache的,所以也沒有一個(gè)標(biāo)記是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.][如果有這個(gè)標(biāo)記,read/write/FileDispositionInformation都是以扇區(qū)為單位]

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 [用這個(gè)標(biāo)記可以判斷是不是創(chuàng)建了一個(gè)新文件]

FILE_DOES_NOT_EXIST

FILE_EXISTS

FILE_OPENED

FILE_OVERWRITTEN

FILE_SUPERSEDED

NT::FileDispositionInformation (from Installable File System Kit) [可以在這里禁止刪除文件]
NT::FileRenameInformation [可以在這里禁止重命名]
NT::FileEndOfFileInformation [這個(gè)也會(huì)影響數(shù)據(jù)]
======
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博客,轉(zhuǎn)載請(qǐng)標(biāo)明出處:http://blog.csdn.net/sunwang123456/archive/2005/10/20/510036.aspx

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

導(dǎo)航

統(tǒng)計(jì)

留言簿(13)

隨筆分類(287)

隨筆檔案(289)

漏洞

搜索

積分與排名

最新評(píng)論

閱讀排行榜

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <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>
            欧美视频在线观看 亚洲欧| 国产精品sm| 欧美电影打屁股sp| 欧美在线地址| 久久久国产一区二区| 亚洲一区二区三区777| 亚洲人成绝费网站色www| 在线激情影院一区| 揄拍成人国产精品视频| 亚洲国产欧美久久| 日韩视频一区| 亚洲一区3d动漫同人无遮挡| 亚洲综合成人婷婷小说| 欧美有码在线观看视频| 蜜臀久久久99精品久久久久久| 女同性一区二区三区人了人一| 欧美高清不卡在线| 日韩视频免费在线观看| 亚洲欧美激情视频在线观看一区二区三区| 香蕉成人伊视频在线观看| 久久精品系列| 另类专区欧美制服同性| 久久人人爽国产| 欧美激情亚洲一区| 国产区欧美区日韩区| 亚洲成人资源| 亚洲欧美日韩国产中文| 美国十次成人| 久久在线播放| 狠狠色丁香久久婷婷综合_中| 亚洲第一综合天堂另类专| 一区二区三区精品视频在线观看| 久久国产夜色精品鲁鲁99| 麻豆九一精品爱看视频在线观看免费| 91久久精品视频| 亚洲精品日韩精品| 久久国产精品亚洲77777| 国产专区综合网| 在线观看欧美视频| 性欧美1819sex性高清| 亚洲二区在线视频| 欧美一级视频精品观看| 欧美日韩在线三区| 亚洲国产精品久久久久婷婷884| 亚洲男人天堂2024| 亚洲人久久久| 美女久久一区| 激情综合中文娱乐网| 香蕉久久夜色精品| 一区二区三区黄色| 欧美日韩精品二区第二页| 亚洲国产精品成人一区二区| 欧美影院成年免费版| 一二三区精品福利视频| 欧美久久视频| 日韩视频一区二区三区在线播放免费观看| 久久激情网站| 欧美亚洲在线| 国产日本欧美一区二区| 午夜欧美大片免费观看| 中国女人久久久| 国产精品yjizz| 在线一区亚洲| 一区二区高清| 国产精品男gay被猛男狂揉视频| 宅男噜噜噜66一区二区66| 亚洲国产精品悠悠久久琪琪 | 国产日韩精品一区二区三区| 亚洲一区在线播放| 在线亚洲一区观看| 国产精品国产一区二区| 亚洲午夜精品福利| 国产精品99久久99久久久二8 | 黑人操亚洲美女惩罚| 久久成人18免费网站| 欧美一区视频在线| 在线精品视频在线观看高清| 美女尤物久久精品| 女人香蕉久久**毛片精品| 亚洲乱码国产乱码精品精| 亚洲精品视频在线| 国产精品毛片大码女人| 久久久精品2019中文字幕神马| 久久九九国产精品| 亚洲精品一区中文| 亚洲午夜伦理| 又紧又大又爽精品一区二区| 91久久精品日日躁夜夜躁欧美| 国产精品h在线观看| 在线亚洲精品| 亚洲免费大片| 亚洲视频在线看| 国产自产在线视频一区| 欧美高清不卡在线| 国产精品理论片在线观看| 久久久水蜜桃| 欧美日韩国产综合视频在线观看中文 | 亚洲人久久久| 一本色道久久综合亚洲精品不卡| 国产精品久久久久aaaa| 老司机成人在线视频| 欧美日韩国产免费观看| 久久精品国产清高在天天线| 欧美成人国产一区二区| 欧美一级理论性理论a| 欧美不卡高清| 久久久久高清| 欧美视频一区二区三区| 免费中文日韩| 国产欧美一级| 日韩午夜免费| 亚洲国产成人午夜在线一区| 国产精品99久久久久久久vr | 亚洲一区二区精品视频| 久久精品国产99国产精品澳门| 一区二区三区产品免费精品久久75 | 欧美在线视频免费播放| 欧美精品一区二区久久婷婷| 久久久久久免费| 国产精品美女久久久浪潮软件 | 欧美三级午夜理伦三级中视频| 久久躁狠狠躁夜夜爽| 国产精品天天摸av网| 亚洲精品一品区二品区三品区| 激情视频亚洲| 亚洲欧美日韩久久精品| 亚洲天堂av在线免费观看| 欧美阿v一级看视频| 久久蜜臀精品av| 国产视频精品xxxx| 亚洲综合首页| 亚洲欧美在线免费| 欧美二区视频| 国产美女精品视频免费观看| 亚洲精品少妇30p| 亚洲精品看片| 免费欧美日韩国产三级电影| 久久一本综合频道| 国产一区视频在线看| 午夜亚洲性色视频| 欧美在线亚洲综合一区| 国产精品亚洲成人| 亚洲在线一区二区三区| 午夜欧美精品久久久久久久| 国产精品白丝黑袜喷水久久久| 一本色道**综合亚洲精品蜜桃冫| 中文一区二区| 国产精品亚洲一区二区三区在线| 亚洲宅男天堂在线观看无病毒| 欧美亚洲日本国产| 国产一区二区丝袜高跟鞋图片| 欧美专区在线观看| 男女激情久久| 一本色道久久综合精品竹菊 | 久久久精品国产免大香伊 | 欧美日韩日本国产亚洲在线| 亚洲精品在线三区| 亚洲综合日韩| 韩国女主播一区| 欧美国产精品人人做人人爱| 亚洲区一区二| 午夜亚洲精品| 在线观看av不卡| 欧美日韩国产限制| 午夜电影亚洲| 亚洲国产精品热久久| 亚洲综合色激情五月| 国语自产精品视频在线看抢先版结局 | 国产日韩精品在线观看| 久久免费视频在线| 亚洲全部视频| 欧美一区二区精品久久911| 一区二区在线不卡| 欧美视频在线观看 亚洲欧| 欧美一区成人| 亚洲精品一区久久久久久| 欧美一级在线视频| 亚洲经典在线| 国产欧美日韩亚州综合| 欧美成ee人免费视频| 亚洲午夜成aⅴ人片| 欧美激情一区在线观看| 欧美一区日韩一区| 一本久久a久久免费精品不卡| 国产亚洲精品激情久久| 欧美日韩在线精品一区二区三区| 久久精品国内一区二区三区| 一区二区欧美日韩| 欧美韩日亚洲| 久久精品五月| 亚洲伊人网站| 日韩一本二本av| 极品中文字幕一区| 亚洲黄色免费网站| 激情丁香综合| 国产精品夜夜嗨| 欧美日韩美女在线观看| 美女网站久久| 久久婷婷国产麻豆91天堂| 亚洲尤物精选|