mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Question: Memory change request
@ 2001-01-24  6:44 Leslie Donaldson
  2001-01-24  8:05 ` Chris Wedgwood
  2001-01-25 18:48 ` Jamie Lokier
  0 siblings, 2 replies; 5+ messages in thread
From: Leslie Donaldson @ 2001-01-24  6:44 UTC (permalink / raw)
  To: linux-kernel, donaldlf

Hello,
  I realise this may be a little off topic but I think the kernel is the
only
place I will be able to pull this stunt.

I need a block of memory that can notify me or even a flag set when
it has been written to. I was thinking of letting the user code generate
some sort of page fault... Any random thoughts would be greatly
appreciated.

mmm ... Basically dirty page logic for user space....

Leslie Donaldson

-- 
/----------------------------\ Current Contractor: None
|    Leslie F. Donaldson     | Current Customer  : None
|    Computer Contractor     | Skills:
Unix/OS9/VMS/Linux/SUN-OS/C/C++/assembly
| Have Computer will travel. | WWW  :
http://www.cs.rose-hulman.edu/~donaldlf
\----------------------------/ Email: mail://donaldlf@cs.rose-hulman.edu
Goth Code V1.1: GoCS$$ TYg(T6,T9) B11Bk!^1 C6b-- P0(1,7) M+ a24 n---
b++:+
                H6'11" g m---- w+ r+++ D--~!% h+ s10 k+++ R-- Ssw
LusCA++
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Question: Memory change request
  2001-01-24  6:44 Question: Memory change request Leslie Donaldson
@ 2001-01-24  8:05 ` Chris Wedgwood
  2001-01-24  8:47   ` David Schwartz
  2001-01-25 18:48 ` Jamie Lokier
  1 sibling, 1 reply; 5+ messages in thread
From: Chris Wedgwood @ 2001-01-24  8:05 UTC (permalink / raw)
  To: Leslie Donaldson; +Cc: linux-kernel

On Wed, Jan 24, 2001 at 12:44:58AM -0600, Leslie Donaldson wrote:

    I need a block of memory that can notify me or even a flag set when
    it has been written to. I was thinking of letting the user code generate
    some sort of page fault... Any random thoughts would be greatly
    appreciated.
    
    mmm ... Basically dirty page logic for user space....

mprotect the page(s) you are interested in so you can't write to them
and catch SEGV -- when someone attempts to write you can pull apart
the stack frame mark the page(s) RO and continue.

if you are really stuck i think i have example code to do this
somewhere for ia32 (stack frame is arch. dependent)


  --cw


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: Question: Memory change request
  2001-01-24  8:05 ` Chris Wedgwood
@ 2001-01-24  8:47   ` David Schwartz
  2001-01-24 12:03     ` Chris Wedgwood
  0 siblings, 1 reply; 5+ messages in thread
From: David Schwartz @ 2001-01-24  8:47 UTC (permalink / raw)
  To: Chris Wedgwood, Leslie Donaldson; +Cc: linux-kernel


> mprotect the page(s) you are interested in so you can't write to them
> and catch SEGV -- when someone attempts to write you can pull apart
> the stack frame mark the page(s) RO and continue.
> 
> if you are really stuck i think i have example code to do this
> somewhere for ia32 (stack frame is arch. dependent)

	I bet ElectricFence would serve as example code.

	DS

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Question: Memory change request
  2001-01-24  8:47   ` David Schwartz
@ 2001-01-24 12:03     ` Chris Wedgwood
  0 siblings, 0 replies; 5+ messages in thread
From: Chris Wedgwood @ 2001-01-24 12:03 UTC (permalink / raw)
  To: David Schwartz; +Cc: Leslie Donaldson, linux-kernel

On Wed, Jan 24, 2001 at 12:47:53AM -0800, David Schwartz wrote:
    	I bet ElectricFence would serve as example code.

don't think so.. it doesn't handle pulling the stack frame apart and
continuation


  --cw

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Question: Memory change request
  2001-01-24  6:44 Question: Memory change request Leslie Donaldson
  2001-01-24  8:05 ` Chris Wedgwood
@ 2001-01-25 18:48 ` Jamie Lokier
  1 sibling, 0 replies; 5+ messages in thread
From: Jamie Lokier @ 2001-01-25 18:48 UTC (permalink / raw)
  To: Leslie Donaldson; +Cc: linux-kernel

Leslie Donaldson wrote:
> I need a block of memory that can notify me or even a flag set when
> it has been written to. I was thinking of letting the user code generate
> some sort of page fault... Any random thoughts would be greatly
> appreciated.

Look for the Boehm garbage collector.  It has code for handling and
recovering from dirty page faults.

-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-01-25 18:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-24  6:44 Question: Memory change request Leslie Donaldson
2001-01-24  8:05 ` Chris Wedgwood
2001-01-24  8:47   ` David Schwartz
2001-01-24 12:03     ` Chris Wedgwood
2001-01-25 18:48 ` Jamie Lokier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®