Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

The generation of random numbers is too important to be left to chance.


devel / comp.arch / Re: Binary Incompatibility

SubjectAuthor
* Binary Incompatibilityrobf...@gmail.com
+* Re: Binary IncompatibilityEricP
|`- Re: Binary Incompatibilityrobf...@gmail.com
+* Re: Binary IncompatibilityMitchAlsup
|`* Re: Binary Incompatibilityrobf...@gmail.com
| `- Re: Binary IncompatibilityMitchAlsup
+* Re: Binary IncompatibilityJohn Dallman
|`* Re: Binary Incompatibilityrobf...@gmail.com
| `- Re: Binary IncompatibilityJohn Dallman
`- Re: Binary IncompatibilityMitchAlsup

1
Binary Incompatibility

<91614533-3d1a-474b-aec0-7275177bd169n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=24629&group=comp.arch#24629

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:620a:3184:b0:67d:cce9:bab4 with SMTP id bi4-20020a05620a318400b0067dcce9bab4mr8434759qkb.685.1649321610785;
Thu, 07 Apr 2022 01:53:30 -0700 (PDT)
X-Received: by 2002:a4a:bc84:0:b0:321:74ee:97cf with SMTP id
m4-20020a4abc84000000b0032174ee97cfmr4110255oop.21.1649321609996; Thu, 07 Apr
2022 01:53:29 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Thu, 7 Apr 2022 01:53:29 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=2607:fea8:1dde:6a00:bdc3:7602:fa6f:dacb;
posting-account=QId4bgoAAABV4s50talpu-qMcPp519Eb
NNTP-Posting-Host: 2607:fea8:1dde:6a00:bdc3:7602:fa6f:dacb
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <91614533-3d1a-474b-aec0-7275177bd169n@googlegroups.com>
Subject: Binary Incompatibility
From: robfi...@gmail.com (robf...@gmail.com)
Injection-Date: Thu, 07 Apr 2022 08:53:30 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 22
 by: robf...@gmail.com - Thu, 7 Apr 2022 08:53 UTC

So, I am now using Tomasula’s algorithm for my Thor processor to get OoO
operation. It looks like it should help hiding memory latency and other long running operations. Ordering is being controlled by sequence numbers rather than the buffer position, so instructions may be queued into any open buffer slot. It does not work as a circular buffer as is done in some designs.. There are four stages to the design, Fetch, Decode, Execute, and Write-back. There is a separate scheduler for each stage. Memory operations are strictly ordered, there are bits set aside in control register zero to allow more relaxed memory ordering.

Thor is using a 128-bit data-path mainly to support quad precision decimal floating-point. But the data-bus to registers is up to 512 bits to allow four registers to be updated or read at once.

I am considering adding a random element to the schedulers, so processing may be in a different order from one run to the next. The idea is to make the processor a little bit less predictable.

Also in consideration is encryption of the instruction set. It would not take much to have a simple decryption stage in the core. Installed software would need to use the correct decryption key to get a program to run. The idea is to make every installed base of software binary incompatible.

Re: Binary Incompatibility

<7bB3K.137868$dln7.95047@fx03.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=24631&group=comp.arch#24631

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx03.iad.POSTED!not-for-mail
From: ThatWoul...@thevillage.com (EricP)
User-Agent: Thunderbird 2.0.0.24 (Windows/20100228)
MIME-Version: 1.0
Newsgroups: comp.arch
Subject: Re: Binary Incompatibility
References: <91614533-3d1a-474b-aec0-7275177bd169n@googlegroups.com>
In-Reply-To: <91614533-3d1a-474b-aec0-7275177bd169n@googlegroups.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 10
Message-ID: <7bB3K.137868$dln7.95047@fx03.iad>
X-Complaints-To: abuse@UsenetServer.com
NNTP-Posting-Date: Thu, 07 Apr 2022 12:55:31 UTC
Date: Thu, 07 Apr 2022 08:55:32 -0400
X-Received-Bytes: 1617
 by: EricP - Thu, 7 Apr 2022 12:55 UTC

robf...@gmail.com wrote:
> So, I am now using Tomasula’s algorithm for my Thor processor to get OoO
> operation. It looks like it should help hiding memory latency and other long running operations. Ordering is being controlled by sequence numbers rather than the buffer position, so instructions may be queued into any open buffer slot. It does not work as a circular buffer as is done in some designs.. There are four stages to the design, Fetch, Decode, Execute, and Write-back. There is a separate scheduler for each stage. Memory operations are strictly ordered, there are bits set aside in control register zero to allow more relaxed memory ordering.

Where are the uOps stored if not a circular buffer?
How is that indexed?
How does that do checkpoint/rollback which requires
removing instructions from some mid point to the end?
How does that do Retire?

Re: Binary Incompatibility

<aead8eab-83a8-49ae-a0ce-f4a535857e90n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=24632&group=comp.arch#24632

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:620a:4691:b0:67d:9bab:33d7 with SMTP id bq17-20020a05620a469100b0067d9bab33d7mr9442435qkb.500.1649341654286;
Thu, 07 Apr 2022 07:27:34 -0700 (PDT)
X-Received: by 2002:a05:6870:c595:b0:da:4ea1:991f with SMTP id
ba21-20020a056870c59500b000da4ea1991fmr6661408oab.147.1649341654044; Thu, 07
Apr 2022 07:27:34 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Thu, 7 Apr 2022 07:27:33 -0700 (PDT)
In-Reply-To: <7bB3K.137868$dln7.95047@fx03.iad>
Injection-Info: google-groups.googlegroups.com; posting-host=2607:fea8:1dde:6a00:e9d2:6b0a:492a:72c5;
posting-account=QId4bgoAAABV4s50talpu-qMcPp519Eb
NNTP-Posting-Host: 2607:fea8:1dde:6a00:e9d2:6b0a:492a:72c5
References: <91614533-3d1a-474b-aec0-7275177bd169n@googlegroups.com> <7bB3K.137868$dln7.95047@fx03.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <aead8eab-83a8-49ae-a0ce-f4a535857e90n@googlegroups.com>
Subject: Re: Binary Incompatibility
From: robfi...@gmail.com (robf...@gmail.com)
Injection-Date: Thu, 07 Apr 2022 14:27:34 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 62
 by: robf...@gmail.com - Thu, 7 Apr 2022 14:27 UTC

On Thursday, April 7, 2022 at 8:55:34 AM UTC-4, EricP wrote:
> robf...@gmail.com wrote:
> > So, I am now using Tomasula’s algorithm for my Thor processor to get OoO
> > operation. It looks like it should help hiding memory latency and other long running operations. Ordering is being controlled by sequence numbers rather than the buffer position, so instructions may be queued into any open buffer slot. It does not work as a circular buffer as is done in some designs.. There are four stages to the design, Fetch, Decode, Execute, and Write-back. There is a separate scheduler for each stage. Memory operations are strictly ordered, there are bits set aside in control register zero to allow more relaxed memory ordering.
>
> Where are the uOps stored if not a circular buffer?
> How is that indexed?
> How does that do checkpoint/rollback which requires
> removing instructions from some mid point to the end?
> How does that do Retire?

There are no uOps as most instructions are too simple, and it is a load / store architecture. The instructions are the micro-ops. Instructions are directly stored in any empty slot in the buffer until they are decoded. There are however macro instructions like PUSH, POP, ENTER and LEAVE used to improve code density which are composed of a list of regular instructions. These are stored in a table with its own micro-program counter. Since they are just regular instructions, the micro-program counter is stored in the link register along with the program counter, which allows the instructions to be interruptible. At least in theory. I have not got interrupts tested and working yet. They may work but it is not tested. TLB miss seems to work as that has been run into during testing.

The buffer has a separate index for each of Fetch, Decode, Execute, and Write-back. The index value moves around to where it is needed. They do not increment or decrement.
The rollback uses the sequence number associated with the instruction to determine which instructions to remove. If the sequence number is greater than that of the branch instruction then the instruction will be removed. This works similar to a branch tag only with more bits. It does not matter where in the buffer the instruction is. It does not remove from midpoint to end.. All instructions in the buffer are scanned for their sequence number.

Retirement works by retiring the instruction with the lowest sequence number in the buffer, once it is finished executing.

*It may not be the most hardware efficient solution, but it seems to work. Its more of a pedantic solution. It is easier for me to understand. I was getting a headache trying to fathom how the circular buffer works with rollback. It has a couple of advantages, no logic is required to adjust head and tail pointers, rather its part of scheduling. No need to worry about having consecutive buffer slots to process retirements.
Gets far enough in simulation to activate LEDs, running about 800 instructions, using an eight-entry buffer.

I am tempted to add a simple hardware decryptor that works on 16-bit instruction parcels, using a rotate and xor. The idea being that a binary file cannot just be copied to the machine and run without knowing the decryption key.

Also, the scheduler could possibly schedule instructions in a randomized order when it has more than one to choose from. I think the result may be slightly different run times and memory access patterns. I wonder if this would make virus software more difficult to come up with.

Re: Binary Incompatibility

<ccdd2d90-ce58-408d-b1b6-92cf79b331f5n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=24633&group=comp.arch#24633

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ad4:5de4:0:b0:443:5d80:e379 with SMTP id jn4-20020ad45de4000000b004435d80e379mr11514223qvb.37.1649341975275;
Thu, 07 Apr 2022 07:32:55 -0700 (PDT)
X-Received: by 2002:a4a:ad46:0:b0:324:498e:4fe1 with SMTP id
s6-20020a4aad46000000b00324498e4fe1mr4448667oon.89.1649341974817; Thu, 07 Apr
2022 07:32:54 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Thu, 7 Apr 2022 07:32:54 -0700 (PDT)
In-Reply-To: <91614533-3d1a-474b-aec0-7275177bd169n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:95e0:d42:2491:f372;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:95e0:d42:2491:f372
References: <91614533-3d1a-474b-aec0-7275177bd169n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ccdd2d90-ce58-408d-b1b6-92cf79b331f5n@googlegroups.com>
Subject: Re: Binary Incompatibility
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Thu, 07 Apr 2022 14:32:55 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 38
 by: MitchAlsup - Thu, 7 Apr 2022 14:32 UTC

On Thursday, April 7, 2022 at 3:53:32 AM UTC-5, robf...@gmail.com wrote:
> So, I am now using Tomasula’s algorithm for my Thor processor to get OoO
> operation. It looks like it should help hiding memory latency and other long running operations. Ordering is being
> controlled by sequence numbers rather than the buffer position, so instructions may be queued into any open buffer
<
You should look into Find First circuits. You can do a find-circular-first on 36-entry reservation station
in 4 gates of delay. Use FFs as your "picker", then the queue is circular and the insert logic free. What
you do is make the insert logic require find first.
<
> slot. It does not work as a circular buffer as is done in some designs. There are four stages to the design, Fetch,
> Decode, Execute, and Write-back. There is a separate scheduler for each stage. Memory operations are strictly
> ordered, there are bits set aside in control register zero to allow more relaxed memory ordering.
<
You will find this a bit of a problem.
>
> Thor is using a 128-bit data-path mainly to support quad precision decimal floating-point. But the data-bus to registers is up to 512 bits to allow four registers to be updated or read at once.
>
> I am considering adding a random element to the schedulers, so processing may be in a different order from one run to the next. The idea is to make the processor a little bit less predictable.
<
Unnecessary if you use Find-Firsts.
>
> Also in consideration is encryption of the instruction set. It would not take much to have a simple decryption stage in the core. Installed software would need to use the correct decryption key to get a program to run. The idea is to make every installed base of software binary incompatible.
<
How do you do shared libraries ?

Re: Binary Incompatibility

<0e014988-529b-4096-967a-b2bf1a2444cfn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=24634&group=comp.arch#24634

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:6214:2482:b0:443:9696:4c1 with SMTP id gi2-20020a056214248200b00443969604c1mr12071667qvb.114.1649345588004;
Thu, 07 Apr 2022 08:33:08 -0700 (PDT)
X-Received: by 2002:a05:6830:25d6:b0:5c9:49ef:3c5b with SMTP id
d22-20020a05683025d600b005c949ef3c5bmr4972017otu.331.1649345587733; Thu, 07
Apr 2022 08:33:07 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.mixmin.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Thu, 7 Apr 2022 08:33:07 -0700 (PDT)
In-Reply-To: <ccdd2d90-ce58-408d-b1b6-92cf79b331f5n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2607:fea8:1dde:6a00:e9d2:6b0a:492a:72c5;
posting-account=QId4bgoAAABV4s50talpu-qMcPp519Eb
NNTP-Posting-Host: 2607:fea8:1dde:6a00:e9d2:6b0a:492a:72c5
References: <91614533-3d1a-474b-aec0-7275177bd169n@googlegroups.com> <ccdd2d90-ce58-408d-b1b6-92cf79b331f5n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0e014988-529b-4096-967a-b2bf1a2444cfn@googlegroups.com>
Subject: Re: Binary Incompatibility
From: robfi...@gmail.com (robf...@gmail.com)
Injection-Date: Thu, 07 Apr 2022 15:33:08 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: robf...@gmail.com - Thu, 7 Apr 2022 15:33 UTC

On Thursday, April 7, 2022 at 10:32:56 AM UTC-4, MitchAlsup wrote:
> On Thursday, April 7, 2022 at 3:53:32 AM UTC-5, robf...@gmail.com wrote:
> > So, I am now using Tomasula’s algorithm for my Thor processor to get OoO
> > operation. It looks like it should help hiding memory latency and other long running operations. Ordering is being
> > controlled by sequence numbers rather than the buffer position, so instructions may be queued into any open buffer
> <
> You should look into Find First circuits. You can do a find-circular-first on 36-entry reservation station
> in 4 gates of delay. Use FFs as your "picker", then the queue is circular and the insert logic free. What
> you do is make the insert logic require find first.

That is something I will look into. I was thinking also of using a fifo to store free slot indexes. It would be
only three bits wide, and FPGAs have built in fifos, dynamic shift registers. It may only be a handful of
LUTs to implement. But the logic gets more difficult to understand. I called the buffer a random-entry-buffer or REB
instead of ROB.

> > Also in consideration is encryption of the instruction set. It would not take much to have a simple decryption stage in the core. Installed software would need to use the correct decryption key to get a program to run. The idea is to make every installed base of software binary incompatible.
> <
> How do you do shared libraries ?

Shared libraries can be accommodated if the decryption key is known when they are installed on a machine. The
library could be encrypted during installation. The machine would also be able to run unencrypted software. The
encryption could also be easy to break. The idea is not to turn the machine into a fortress, but to make it more
reliable against the random virus.

Blew the LUT budget. Something I just did added about 35,000 LUTs to the design.

Re: Binary Incompatibility

<d77d4774-ddb9-45c6-9a92-da6f8f4ca991n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=24638&group=comp.arch#24638

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a37:54a:0:b0:69a:f10c:f533 with SMTP id 71-20020a37054a000000b0069af10cf533mr424548qkf.525.1649361807985;
Thu, 07 Apr 2022 13:03:27 -0700 (PDT)
X-Received: by 2002:a05:6870:c595:b0:da:4ea1:991f with SMTP id
ba21-20020a056870c59500b000da4ea1991fmr7389333oab.147.1649361807782; Thu, 07
Apr 2022 13:03:27 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Thu, 7 Apr 2022 13:03:27 -0700 (PDT)
In-Reply-To: <0e014988-529b-4096-967a-b2bf1a2444cfn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:84bc:26de:5f80:6ed0;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:84bc:26de:5f80:6ed0
References: <91614533-3d1a-474b-aec0-7275177bd169n@googlegroups.com>
<ccdd2d90-ce58-408d-b1b6-92cf79b331f5n@googlegroups.com> <0e014988-529b-4096-967a-b2bf1a2444cfn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d77d4774-ddb9-45c6-9a92-da6f8f4ca991n@googlegroups.com>
Subject: Re: Binary Incompatibility
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Thu, 07 Apr 2022 20:03:27 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 54
 by: MitchAlsup - Thu, 7 Apr 2022 20:03 UTC

On Thursday, April 7, 2022 at 10:33:09 AM UTC-5, robf...@gmail.com wrote:
> On Thursday, April 7, 2022 at 10:32:56 AM UTC-4, MitchAlsup wrote:
> > On Thursday, April 7, 2022 at 3:53:32 AM UTC-5, robf...@gmail.com wrote:
> > > So, I am now using Tomasula’s algorithm for my Thor processor to get OoO
> > > operation. It looks like it should help hiding memory latency and other long running operations. Ordering is being
> > > controlled by sequence numbers rather than the buffer position, so instructions may be queued into any open buffer
> > <
> > You should look into Find First circuits. You can do a find-circular-first on 36-entry reservation station
> > in 4 gates of delay. Use FFs as your "picker", then the queue is circular and the insert logic free. What
> > you do is make the insert logic require find first.
> That is something I will look into. I was thinking also of using a fifo to store free slot indexes. It would be
> only three bits wide, and FPGAs have built in fifos, dynamic shift registers. It may only be a handful of
> LUTs to implement. But the logic gets more difficult to understand. I called the buffer a random-entry-buffer or REB
> instead of ROB.
> > > Also in consideration is encryption of the instruction set. It would not take much to have a simple decryption stage in the core. Installed software would need to use the correct decryption key to get a program to run. The idea is to make every installed base of software binary incompatible.
> > <
> > How do you do shared libraries ?
> Shared libraries can be accommodated if the decryption key is known when they are installed on a machine. The
> library could be encrypted during installation. The machine would also be able to run unencrypted software. The
> encryption could also be easy to break.
<
Sounds like you would end up needing 37 keys to run a single application.
Or a single key to a vector of keys.
<
> The idea is not to turn the machine into a fortress, but to make it more
> reliable against the random virus.
<
In my opinion, preventing SW from mangling the stack goes a long way in this direction.
For example: My 66000 has a stack used to preserve the state of the caller which cannot
be accessed by LD and ST instructions (because RWE = 000), but can be used by ENTER
and EXIT. This eliminates stack-smashing attacks, minimizes the opportunity for ROP
attacks, and prevents control flow changes due to buffer overruns.
>
> Blew the LUT budget. Something I just did added about 35,000 LUTs to the design.

Re: Binary Incompatibility

<memo.20220407231422.22520O@jgd.cix.co.uk>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=24640&group=comp.arch#24640

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: jgd...@cix.co.uk (John Dallman)
Newsgroups: comp.arch
Subject: Re: Binary Incompatibility
Date: Thu, 7 Apr 2022 23:14 +0100 (BST)
Organization: A noiseless patient Spider
Lines: 41
Message-ID: <memo.20220407231422.22520O@jgd.cix.co.uk>
References: <91614533-3d1a-474b-aec0-7275177bd169n@googlegroups.com>
Reply-To: jgd@cix.co.uk
Injection-Info: reader02.eternal-september.org; posting-host="05f47102b12b1f6bd97ce9026c9acf9f";
logging-data="20854"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+jPtG84P9ttCED2ftopopjncJn05eI/cY="
Cancel-Lock: sha1:s5dBUC2+r63dJqhrPjl35BIzUYE=
 by: John Dallman - Thu, 7 Apr 2022 22:14 UTC

In article <91614533-3d1a-474b-aec0-7275177bd169n@googlegroups.com>,
robfi680@gmail.com () wrote:

> I am considering adding a random element to the schedulers, so
> processing may be in a different order from one run to the next.
> The idea is to make the processor a little bit less predictable.

This is a poor idea on any architecture that will be used for
computationally intensive work. Tuning software for performance is a lot
harder if performance isn't consistent. Adding randomness without
creating occasional pathological cases will be very hard. Saying it's
unlikely will not help unless the probability is so low that it won't
happen in several hundred hours of full-speed execution. Murphy's law
loves cases like this.

It also won't help in the slightest with avoiding viruses. Viruses are
not built to exploit instruction timing variations: if they were, they'd
fail on different processor models with the same instruction set. You may
be thinking about avoiding the high-resolution timing necessary for some
Spectre-style attacks, but you can't do that by cycle-counting in code on
a processor that's taking interrupts. The way to deprive malware of
high-resolution time information is to not provide it in the sandboxes
used to run downloaded code. Depriving JavaScript code of high-
resolution time access was one of the more effective things that's been
done about Spectre.

> Also in consideration is encryption of the instruction set. It
> would not take much to have a simple decryption stage in the core.
> Installed software would need to use the correct decryption key to
> get a program to run. The idea is to make every installed base of
> software binary incompatible.

To handle shared libraries, and callbacks between applications and shared
libraries, you're going to need to have decryption keys associated with
address ranges, which are going to complicate your page tables and TLBs.
You're also going to have to potentially change the decryption key on
every subroutine call, every subroutine return, and every branch if you
allow tail-call elimination. Your decryption also has to be extremely
fast. Brute-forcing it is likely to be practical.

John

Re: Binary Incompatibility

<0f98ffea-d220-4882-a779-d4452ee2fccan@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=24648&group=comp.arch#24648

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ac8:570c:0:b0:2e1:ee0c:71c5 with SMTP id 12-20020ac8570c000000b002e1ee0c71c5mr16482714qtw.365.1649433027405;
Fri, 08 Apr 2022 08:50:27 -0700 (PDT)
X-Received: by 2002:a05:6870:538d:b0:de:aa91:898e with SMTP id
h13-20020a056870538d00b000deaa91898emr8681398oan.54.1649433027093; Fri, 08
Apr 2022 08:50:27 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Fri, 8 Apr 2022 08:50:26 -0700 (PDT)
In-Reply-To: <memo.20220407231422.22520O@jgd.cix.co.uk>
Injection-Info: google-groups.googlegroups.com; posting-host=2607:fea8:1dde:6a00:f8ed:74b2:e873:dde1;
posting-account=QId4bgoAAABV4s50talpu-qMcPp519Eb
NNTP-Posting-Host: 2607:fea8:1dde:6a00:f8ed:74b2:e873:dde1
References: <91614533-3d1a-474b-aec0-7275177bd169n@googlegroups.com> <memo.20220407231422.22520O@jgd.cix.co.uk>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0f98ffea-d220-4882-a779-d4452ee2fccan@googlegroups.com>
Subject: Re: Binary Incompatibility
From: robfi...@gmail.com (robf...@gmail.com)
Injection-Date: Fri, 08 Apr 2022 15:50:27 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 69
 by: robf...@gmail.com - Fri, 8 Apr 2022 15:50 UTC

On Thursday, April 7, 2022 at 6:14:25 PM UTC-4, John Dallman wrote:
> In article <91614533-3d1a-474b...@googlegroups.com>,
> robf...@gmail.com () wrote:
>
> > I am considering adding a random element to the schedulers, so
> > processing may be in a different order from one run to the next.
> > The idea is to make the processor a little bit less predictable.
> This is a poor idea on any architecture that will be used for
> computationally intensive work. Tuning software for performance is a lot
> harder if performance isn't consistent. Adding randomness without
> creating occasional pathological cases will be very hard. Saying it's
> unlikely will not help unless the probability is so low that it won't
> happen in several hundred hours of full-speed execution. Murphy's law
> loves cases like this.
>
> It also won't help in the slightest with avoiding viruses. Viruses are
> not built to exploit instruction timing variations: if they were, they'd
> fail on different processor models with the same instruction set. You may
> be thinking about avoiding the high-resolution timing necessary for some
> Spectre-style attacks, but you can't do that by cycle-counting in code on
> a processor that's taking interrupts. The way to deprive malware of
> high-resolution time information is to not provide it in the sandboxes
> used to run downloaded code. Depriving JavaScript code of high-
> resolution time access was one of the more effective things that's been
> done about Spectre.

Okay.

> > Also in consideration is encryption of the instruction set. It
> > would not take much to have a simple decryption stage in the core.
> > Installed software would need to use the correct decryption key to
> > get a program to run. The idea is to make every installed base of
> > software binary incompatible.
> To handle shared libraries, and callbacks between applications and shared
> libraries, you're going to need to have decryption keys associated with
> address ranges, which are going to complicate your page tables and TLBs.
> You're also going to have to potentially change the decryption key on
> every subroutine call, every subroutine return, and every branch if you
> allow tail-call elimination. Your decryption also has to be extremely
> fast. Brute-forcing it is likely to be practical.
>
I was thinking the encryption key could be a global entity, so that there is no
need to change it on subroutine call return. It would be using the same key all
the time for the machine. Different libraries would all be using the same key.
It would be by virtual address range. The encryption would just be a 16-bit
rotate and xor so encryption and decryption can occur really quickly.
There is already a table with page related information in my design. It would
not be that difficult to add another key, although unnecessary if it is global. A
24-bit access key associated with a memory page is already present in the
design which is tempting to use. I have included an ‘encrypted’ page indicator
with the page information when I added compressed page indicators so pages
may be stored encrypted on secondary storage. No looking at the swap file
to get at sensitive information.

Re: Binary Incompatibility

<memo.20220408203611.22520U@jgd.cix.co.uk>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=24654&group=comp.arch#24654

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: jgd...@cix.co.uk (John Dallman)
Newsgroups: comp.arch
Subject: Re: Binary Incompatibility
Date: Fri, 8 Apr 2022 20:36 +0100 (BST)
Organization: A noiseless patient Spider
Lines: 36
Message-ID: <memo.20220408203611.22520U@jgd.cix.co.uk>
References: <0f98ffea-d220-4882-a779-d4452ee2fccan@googlegroups.com>
Reply-To: jgd@cix.co.uk
Injection-Info: reader02.eternal-september.org; posting-host="05f47102b12b1f6bd97ce9026c9acf9f";
logging-data="21030"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/72eU+RYeVkNDf/hu7Dhrm4cR9UAifyh0="
Cancel-Lock: sha1:lkLAmQdO0GiWy5YNVNH4m+cCEW8=
 by: John Dallman - Fri, 8 Apr 2022 19:36 UTC

> I was thinking the encryption key could be a global entity, so that
> there is no need to change it on subroutine call return. It would
> be using the same key all the time for the machine.

So it's a global property of the machine, and libraries have to be
encrypted with the machine key at install time. Unencrypted code will
also run, and you need an "encrypted" flag as part of the executable file
format. Is that the idea?

This isn't terribly compatible with the code signing systems that are
already in use, although their usefulness varies.

If this scheme were to become popular, there would be a new kind of
malware for it, whose purpose was to find out machine keys and send them
back to the malware author - or just publish them.

How does this work for the case when storage moves from one machine to
another? Taking disks or SSDs out of a failed machine and plugging them
into a different machine happens, in organisations with lots of computers.

Clustered machines, and machines that run executables from networked
storage that's accessible to many machines, all have to be "the same"
machine. That means the key has to be settable when a machine is set up.

Is this actually providing something useful, as opposed to being a neat
idea?

> I have included an _encrypted_ page indicator with the page
> information when I added compressed page indicators so pages
> may be stored encrypted on secondary storage. No looking at the
> swap file to get at sensitive information.

That's a better idea.

John

Re: Binary Incompatibility

<519fbc2b-7fa5-4435-a44d-3beb8a3cf7cbn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=24655&group=comp.arch#24655

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:620a:470d:b0:67d:d8a8:68c6 with SMTP id bs13-20020a05620a470d00b0067dd8a868c6mr15038858qkb.717.1649464338313;
Fri, 08 Apr 2022 17:32:18 -0700 (PDT)
X-Received: by 2002:a05:6870:1cf:b0:e2:1a67:61f5 with SMTP id
n15-20020a05687001cf00b000e21a6761f5mr9855955oad.27.1649464338080; Fri, 08
Apr 2022 17:32:18 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Fri, 8 Apr 2022 17:32:17 -0700 (PDT)
In-Reply-To: <91614533-3d1a-474b-aec0-7275177bd169n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:807:2257:f906:aab7;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:807:2257:f906:aab7
References: <91614533-3d1a-474b-aec0-7275177bd169n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <519fbc2b-7fa5-4435-a44d-3beb8a3cf7cbn@googlegroups.com>
Subject: Re: Binary Incompatibility
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Sat, 09 Apr 2022 00:32:18 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 23
 by: MitchAlsup - Sat, 9 Apr 2022 00:32 UTC

On Thursday, April 7, 2022 at 3:53:32 AM UTC-5, robf...@gmail.com wrote:
>
> Also in consideration is encryption of the instruction set. It would not take much to have a simple decryption
> stage in the core. Installed software would need to use the correct decryption key to get a program to run. The
> idea is to make every installed base of software binary incompatible.
<
The more I think about this, the worse the idea becomes.
<
First: it basically ruins a whole bunch of stuff computer scientists have desired for a long time.
a) libraries of functionality
b) which can call other libraries of functionality,
c) shared at different virtual addresses by different threads,
d) all stored at the original location on disk/SSD,
e) under the rules of Position Independent Code,
f) so the linking loader has the least amount of work to do,
g) where even the OS can share application code,
h) where the hypervisor can share Guest OS and application library code.
<
It does little to add to real security while greatly increasing the burden on "just running"
<
It vastly complicates libraries "over the network"
<
My guess is that there is a lot more that can be done helping security
without taking even the first step in this direction.

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor