From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Thread: fdd80,5cdb0c1dbaceb85b X-Google-NewGroupId: yes X-Google-Thread: 1164f8,5cdb0c1dbaceb85b X-Google-NewGroupId: yes X-Google-Attributes: gide311f70d09,gidd180ab3bd8,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.135.231 with SMTP id pv7mr7876876pbb.8.1329071736827; Sun, 12 Feb 2012 10:35:36 -0800 (PST) Path: wr5ni17030pbc.0!nntp.google.com!news1.google.com!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: paramucho@hotmail.com (paramucho) Newsgroups: alt.sys.pdp11,vmsnet.pdp-11,comp.sys.dec Subject: Re: PDP11 Values from MFPT Date: Sun, 12 Feb 2012 18:35:31 GMT Organization: Aioe.org NNTP Server Message-ID: <4f38003f.338958@nntp.aioe.org> References: <4f313229.43518694@nntp.aioe.org> <4f37717c.29259157@nntp.aioe.org> <4f339e98.40806741@nntp.aioe.org> <4f360d68.39000374@nntp.aioe.org> <4f396a03.27713593@nntp.aioe.org> <4f37ec05.63303162@nntp.aioe.org> Reply-To: paramucho@hotmail.com NNTP-Posting-Host: CmgvwL3sOlojnxUjt8znzA.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: Forte Agent 1.5/32.451 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit On Sun, 12 Feb 2012 17:23:32 GMT, paramucho@hotmail.com (paramucho) wrote: > >> >As noted above, I've implemented the condition code tests (and I'm >running a bit late with the promised code because of that). The test >below shows the PS to be 30000 BEFORE the test. AFTER the test it is >30004. I repeat the test with an initial PS of 30017 (all condition >codes set). The AFTER state is 30005. I only show the repeated test if >there is a difference between its PS BEFORE and AFTER state. > >J11: >SimH: >Test03: mtpi *(r0)+ >Before: R0=100000 SP=740 PC=3110 PS=30000 >After: R0=100002 SP=742 PC=3112 PS=30004 > Vec=250 SR0=100151 SR1=[20|26] SR2=3110 > >Before: R0=100000 SP=740 PC=3110 PS=30017 >After: R0=100002 SP=742 PC=3112 PS=30005 > Vec=250 SR0=100151 SR1=[20|26] SR2=3110 > >E11 doesn't have the condition code problem, but you may recall that >this is one of two tests we marked as a BUG because the AFTER state >has SP+2 but there's no recovery information. > >E11: >Test03: mtpi *(r0)+ >Before: R0=100000 SP=740 PC=3110 PS=30000 >After: R0=100000 SP=742 PC=3112 PS=30000 > Vec=250 SR0=100151 SR1=[0|0] SR2=3110 > >What I realized tonight however is that the E11 bug distracted me from >noticing a bigger problem: The J11 and SimH might give us the backout >information for the stack ([20|26]), but it's of no use because the >MTPI stack operand will have already been overwritten by the MMU trap. >The value we wanted to write to user space (for example) can't be >recovered. > >Basically, if we want to implement demand paging, we're screwed. MFPx >and MTPx are the basic tools used in the kernel to copy information to >and from user space. The workarounds are horrible (i.e. converting the >virtual address to a par/offset pair and mapping via a window). I'll >be very interested to know if the 11/70 has the problem. It occurred to me later that this problem was generic for any kernel instruction which popped the stack before the fault, e.g. mov (sp)+,(r0)+ where R0 was an invalid pointer. In fact a quick test showed identical results as per MTPI above. Clearly, you can't demand-page on the same stack that you take page faults on. Thus, if demand paging is only supported in user and supervisor mode perhaps the idea is to move "paged" system code to supervisor space. Either that or not to page system code at all and use address checks and page locks for every kernel access to user/supervisor mode... Ian