rawio
[Top] [All Lists]

Re: request for information

To: erik.dewin@xxxxxxxxxxxxxxxxxxx
Subject: Re: request for information
From: slurn@xxxxxxxxxxxxxxxxxxxx (Scott Lurndal)
Date: Mon, 7 Feb 2000 12:58:19 -0800 (PST)
Cc: rawio@xxxxxxxxxxx
In-reply-to: <Pine.LNX.4.10.10002071902201.24718-100000@xxxxxxxxxxxxxxxxxxxxxxxxxx> from "Erik De Win" at Feb 07, 2000 07:08:10 PM
Sender: owner-rawio@xxxxxxxxxxx
> 
> Hello,
> 
> I would like to obtain more information about the internals (or
> inexistence thereof) of raw devices. How is synchronization with the
> buffer cache guaranteed?

There is, intentionally, _no_ synchronization with the buffer cache. 

The primary advantage of raw devices is to allow arbitrarily large
single I/O requests to take place (128 kbytes per operation isn't
unusual with something like Oracle) directly into the application
address space (eliminating an extraneous copy).

Raw devices are historically intended to be used stand-alone, 
in other words, the block device is never used coincidentally with
the raw device.  This is standard Unix semantics for raw -vs- block
devices that has existed since Ken and Dennis started Unix. 

> 
> In particular, say that I want to insert an intermediate (e.g. encryption)
> layer in between the buffer cache and the device driver; will raw I/O
> bypass this (I presume it will). Is there any possibility to prevent this
> (say that my hard disk is encrypted and I want to decrypt before any
> information is accessed)?

The only way to prevent access to data contained on a raw device is 
to use the existing discretionary access control mechanism (e.g. chmod).

Note that even in the absence of raw devices, your encryption layer
could be bypassed using the sg driver, or by connecting the media
to a different type of unix system.

scott

> 
> Thank for any suggestions,
> 
> Erik De Win
> *******************************************************************************
> Erik De Win
> COSIC research group          e-mail: erik.dewin@xxxxxxxxxxxxxxxxxxx
> K.U.Leuven                    voice:  +32-(0)-16-32.18.85
> K. Mercierlaan 94             fax:    +32-(0)-16-32.19.69
> B-3001 Heverlee                       www:    
> http://www.esat.kuleuven.ac.be/~dewin/
> *******************************************************************************
> 
> 


<Prev in Thread] Current Thread [Next in Thread>