From owner-freebsd-security@FreeBSD.ORG Thu Sep 2 03:00:06 2004 Return-Path: Delivered-To: freebsd-security@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AAACE16A4CE for ; Thu, 2 Sep 2004 03:00:06 +0000 (GMT) Received: from hotmail.com (bay1-f16.bay1.hotmail.com [65.54.245.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D35843D48 for ; Thu, 2 Sep 2004 03:00:06 +0000 (GMT) (envelope-from pineful@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 1 Sep 2004 20:00:06 -0700 Received: from 61.187.54.13 by by1fd.bay1.hotmail.msn.com with HTTP; Thu, 02 Sep 2004 03:00:06 GMT X-Originating-IP: [61.187.54.13] X-Originating-Email: [pineful@hotmail.com] X-Sender: pineful@hotmail.com From: "Pine Ful" To: freebsd-security@freebsd.org Date: Thu, 02 Sep 2004 03:00:06 +0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 02 Sep 2004 03:00:06.0545 (UTC) FILETIME=[F35AA810:01C49098] Subject: Question::page fault::vm:::encrypt and decrypt file data X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Security issues [members-only posting] List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2004 03:00:06 -0000 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