From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 27 19:26:33 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from green.homeunix.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id D31F216A4D5; Thu, 27 Jan 2005 19:26:31 +0000 (GMT) Received: from green.homeunix.org (green@localhost [127.0.0.1]) by green.homeunix.org (8.13.1/8.13.1) with ESMTP id j0RJQVXY080499; Thu, 27 Jan 2005 14:26:31 -0500 (EST) (envelope-from green@green.homeunix.org) Received: (from green@localhost) by green.homeunix.org (8.13.1/8.13.1/Submit) id j0RJQTOh080498; Thu, 27 Jan 2005 14:26:30 -0500 (EST) (envelope-from green) Date: Thu, 27 Jan 2005 14:26:29 -0500 From: Brian Fundakowski Feldman To: Jacques Fourie Message-ID: <20050127192629.GB1009@green.homeunix.org> References: <41F90140.3020705@trispen.com> <20050127160914.GA72454@VARK.MIT.EDU> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i cc: freebsd-hackers@freebsd.org Subject: Re: kernel vm question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Jan 2005 19:26:33 -0000 On Thu, Jan 27, 2005 at 06:48:56PM +0200, Jacques Fourie wrote: > Hi, > > Yes, I am trying to patch a piece of code in the kernel. The strange > thing is that this code works without a problem on FreeBSD 4.8 - has > the VM system changed to such an extent between 4.8 and 4.9 that the > pages in the kernel code segment are not writeable anymore? > > Thanks for the bit about the compiler optimization - at least I > understand that part now :) They should have never been writable. You should be able to change that protection on the page temporarily though to achieve the effect you want; take a look at e.g. mprotect(), you should be able to do much the same thing with kernel_map instead. -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\