Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 02 Sep 2004 03:00:06 +0000
From:      "Pine Ful" <pineful@hotmail.com>
To:        freebsd-security@freebsd.org
Subject:   Question::page fault::vm:::encrypt and decrypt file data
Message-ID:  <BAY1-F16UYkjLpymhbM0006b6bf@hotmail.com>

next in thread | raw e-mail | index | archive | help
hi,
    Q1: How to produce a page fault?
    Q2: How translate physical memory address into virtual memory address? 
Because phys addr is 64 bit and virtual addr is 32 bit.
    Q1 description:: I have succeed to add hook in vfs layer to encrypt file 
data before write and decrypt file data after read. Now, when I use cp 
command, system will reboot, it seem to caused by encrypt data whose addr is 
uio->uio_iov->iov_base. Is it ok if only I produce a page fault manually?
    Q2 description:: I try to decrypt file data when page fault. I find it's 
easy to get physical address from virtual address, but when page fault, kern 
will page in several pages including page we require, how can I get virtual 
memory address of these pages? May I access data in physical memory 
directly? If yes, how tranlate 64 bit phys addr into 32 bit virt addr?

    Thanks!!!!
                            pine

_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BAY1-F16UYkjLpymhbM0006b6bf>