Re: Trapping writes to mmap'd memory.




"John Reiser" <jreiser@xxxxxxxxxxxx> wrote in message news:fe0hii0d92@xxxxxxxxxxxxxxxxxxxxx
With code something like that below (obviously not complete): Are any
updates to the buffer _guaranteed_ to happen (assuming correct
single-thread operation)?

Yes, the updates are guaranteed to happen. The hardware sends a fault,
which stops execution before the update, but saves enough state
so that execution can be resumed as if nothing happened. As long as
the handler does not modify the saved state in *ctx, then return from
the signal handler results in resuming execution with the correct
saved state so it appears as if the fault did not happen. In particular,
if the handler does absolutely nothing then the same logical fault
will happen again. (If the initial context saved by the hardware
represents the middle of an instruction, then the replay may give
different details, but it will look the same to the signal handler.)


That is great information -- thank you!

- Dave

.



Relevant Pages

  • Re: Trapping writes to mmapd memory.
    ... the updates are guaranteed to happen. ... so that execution can be resumed as if nothing happened. ... the handler does not modify the saved state in *ctx, ... saved state so it appears as if the fault did not happen. ...
    (comp.os.linux.development.system)
  • Re: Synthesis friendly code?
    ... Given that the NBA-induced signal updates and the execution ... overlook things when trying to reason about Verilog :-) ... atomic execution of code between scheduling points (event waits, ...
    (comp.lang.verilog)
  • Web Anonymous User
    ... Vulnerability in Windows Shell could allow remote code ... execution, KB840315-Vulnerability in html help could allow ... Concurrent with these updates, Users were ... that made any changes to web anonymous user or ADDED web ...
    (microsoft.public.isa.configuration)
  • Critical Updates
    ... Vulnerability in Windows Shell could allow remote code ... execution, KB840315-Vulnerability in html help could allow ... Concurrent with these updates, Users were ... that made any changes to anonymous user or ADDED anonymous ...
    (microsoft.public.inetserver.iis.security)
  • Re: at_exit handlers and Process.kill
    ... execution when the program exits." ... If you put "sleep 1 while true" before ... handler will never be installed. ... See signalfor descriptions and numbers of the various signals. ...
    (comp.lang.ruby)