Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 01 Sep 2004 05:03:09 +0000
From:      "Pine Ful" <pineful@hotmail.com>
To:        freebsd-questions@freebsd.org
Subject:   Question::page fault::vm:::encrypt and decrypt file data
Message-ID:  <BAY1-F28gElRFRgNWLW0004001c@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

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963



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