The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: pnr@planet.nl (Paul Ruizendaal)
Subject: [TUHS] Another odd comment in V6
Date: Tue, 14 Feb 2017 15:35:46 +0100	[thread overview]
Message-ID: <9D5768C7-995F-4C38-A316-E2B8F43E710F@planet.nl> (raw)
In-Reply-To: <20170214141424.A5BC518C0A2@mercury.lcs.mit.edu>


On 14 Feb 2017, at 15:14 , Noel Chiappa wrote:

>> From: Paul Ruizendaal
> 
>> Actually, research Unix does save the complete state of a process and
>> could back up the PC. The reason that it doesn't work is in the syscall
>> API design, using registers to pass values etc. If all values were
>> passed on the stack it would work.
> 
> Sorry, I don't follow this?
> 
> The problem with 'backing up the PC' is that you 'sort of' have to restore the
> arguments to the state they were in at the time the system call was first
> made. This is actually easier if the arguments are in registers.

Yeah, you're right. I was thinking of the 2.9BSD code which only does the backup
in certain cases and when stack parameter mode was used (the 0200 bit), but
stating it like I did is indeed incomplete to say the least.

Another difficulty in stock V6 would be code like this:
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V6/usr/source/s4/chmod.s
where the data at label 9: could be overwritten by a signal handler
and re-executing the sys call would not work as intended.




  reply	other threads:[~2017-02-14 14:35 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-14 14:14 Noel Chiappa
2017-02-14 14:35 ` Paul Ruizendaal [this message]
2017-02-14 15:48 ` Random832
2017-02-14 16:06   ` Dan Cross
  -- strict thread matches above, loose matches on Subject: below --
2017-02-21 19:23 Norman Wilson
2017-02-22  9:59 ` Tony Finch
2017-02-14 16:17 Noel Chiappa
2017-02-14 15:40 Noel Chiappa
2017-02-14  8:46 Paul Ruizendaal
2017-02-14 11:27 ` Nick Downing
2017-02-14 12:27   ` Paul Ruizendaal
2017-02-14 12:46     ` Nick Downing
2017-02-14 14:03   ` Lars Brinkhoff
2017-02-14 14:18     ` Nick Downing
2017-02-14 15:50       ` Random832

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9D5768C7-995F-4C38-A316-E2B8F43E710F@planet.nl \
    --to=pnr@planet.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).