Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"Why should we subsidize intellectual curiosity?" -- Ronald Reagan


devel / comp.lang.c / Here come the 128-bit pointers

SubjectAuthor
* Here come the 128-bit pointersScott Lurndal
+- Re: Here come the 128-bit pointersDan Purgert
+- Re: Here come the 128-bit pointersBGB
+* Re: Here come the 128-bit pointersBonita Montero
|`* Re: Here come the 128-bit pointersBGB
| +* Re: Here come the 128-bit pointersÖö Tiib
| |+- Re: Here come the 128-bit pointersScott Lurndal
| |`* Re: Here come the 128-bit pointersBGB
| | +* Re: Here come the 128-bit pointersScott Lurndal
| | |`- Re: Here come the 128-bit pointersBGB
| | `* Re: Here come the 128-bit pointersDavid Brown
| |  `- Re: Here come the 128-bit pointersTheo
| `* Re: Here come the 128-bit pointersBonita Montero
|  +* Re: Here come the 128-bit pointersBGB
|  |+- Re: Here come the 128-bit pointersScott Lurndal
|  |`* Re: Here come the 128-bit pointersBonita Montero
|  | +* Re: Here come the 128-bit pointersScott Lurndal
|  | |`- Re: Here come the 128-bit pointersBonita Montero
|  | +* Re: Here come the 128-bit pointersMalcolm McLean
|  | |+- Re: Here come the 128-bit pointersBonita Montero
|  | |+* Re: Here come the 128-bit pointersBart
|  | ||+* Re: Here come the 128-bit pointersScott Lurndal
|  | |||`* Re: Here come the 128-bit pointersBart
|  | ||| `* Re: Here come the 128-bit pointersScott Lurndal
|  | |||  `* Re: Here come the 128-bit pointersBart
|  | |||   `- Re: Here come the 128-bit pointersBGB
|  | ||`- Re: Here come the 128-bit pointersBGB
|  | |`* Re: Here come the 128-bit pointersMateusz Viste
|  | | `- Re: Here come the 128-bit pointersScott Lurndal
|  | +- Re: Here come the 128-bit pointerstth
|  | `* Re: Here come the 128-bit pointersBart
|  |  `* Re: Here come the 128-bit pointersBGB
|  |   +* Re: Here come the 128-bit pointersScott Lurndal
|  |   |`- Re: Here come the 128-bit pointersBGB
|  |   `* Re: Here come the 128-bit pointersBart
|  |    `- Re: Here come the 128-bit pointersBGB
|  `- Re: Here come the 128-bit pointersWilliam Ahern
`- Re: Here come the 128-bit pointersTheo Markettos

Pages:12
Here come the 128-bit pointers

<RZBHJ.39378$gX.11188@fx40.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20152&group=comp.lang.c#20152

  copy link   Newsgroups: comp.lang.c
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!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx40.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Newsgroups: comp.lang.c
Subject: Here come the 128-bit pointers
Lines: 3
Message-ID: <RZBHJ.39378$gX.11188@fx40.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Mon, 24 Jan 2022 18:12:01 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Mon, 24 Jan 2022 18:12:01 GMT
X-Received-Bytes: 759
 by: Scott Lurndal - Mon, 24 Jan 2022 18:12 UTC

https://www.theregister.com/2022/01/21/arm_morello_testing/
https://www.arm.com/architecture/cpu/morello
https://developer.arm.com/documentation/ddi0606/latest

Re: Here come the 128-bit pointers

<slrnsuts4s.2qi.dan@djph.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20155&group=comp.lang.c#20155

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: dan...@djph.net (Dan Purgert)
Newsgroups: comp.lang.c
Subject: Re: Here come the 128-bit pointers
Date: Mon, 24 Jan 2022 18:31:18 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <slrnsuts4s.2qi.dan@djph.net>
References: <RZBHJ.39378$gX.11188@fx40.iad>
Injection-Date: Mon, 24 Jan 2022 18:31:18 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="c9cb8f07ee2f474d4b8700f0498d8819";
logging-data="21627"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18iITgUcY3zNWnCo8ZOwzVc13qYwmsGjF8="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:uWaJFowSnPUWUHYH8kEfdNqwWbg=
 by: Dan Purgert - Mon, 24 Jan 2022 18:31 UTC

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Scott Lurndal wrote:
> https://www.theregister.com/2022/01/21/arm_morello_testing/
> https://www.arm.com/architecture/cpu/morello
> https://developer.arm.com/documentation/ddi0606/latest

.... and here I'm having a hard enough time keeping things straight in
16-bit land :/

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE3asj+xn6fYUcweBnbWVw5UznKGAFAmHu8JwACgkQbWVw5Uzn
KGB9aQ/+NzrNULP1zaEUTpVO5KrhCXxfAmGStDDq1yopl95H81ZyOOWOkswUzC0B
n8Xkb/drMtWnbjeHbR0DS3qZ/cSiCjRx9y5sPiioMLMhzwqtLRZtHTWHkx51micS
2e9fKT5+1W1KM/IBvU2biU/6ob3g7u//dcSDQIT/1LHKW4tq4AOdj7L0nGOn9d/t
1FdNyiJhMHWlcidXvQaOR9umGnvRtKPIhjF7cgkY9UMA8Vng6uc1ihjiazG68N65
E6BMTG73DinjgjoG/OCkIVhlkDvKjD5DLIrMUwY6LczGl78IokcFmh+UKGp2vVlW
qHmZuWbWBt4sBrwv4pbsW9gGGCqnf9WfGSBk56DgdU2S46KlRy1ryOxIhpILAofT
r8l5EuHXRc8EWRkAfYY3EBscBrtxMo43MFtZEyyHteHN26h1KCOIldaD+LE9UJGs
6hLZOrRZufN+xiZwygHX++U3jKL8klemozCiiaJmyOq/cQk8RhwNn0Lcp4auT89w
CKqU9o+LoaUw3GJOt4WpmMWVELKpuMovOMrBvXxADYnZxu5bBHjwjzBf+R/jNLOC
9/PeeU1O2/Z6TXzRBci5BxnAJ1q30/jFH7gDp/GtbY1fz5t+C8EHDjLDN2CU+wTj
wPFC0l61le0Gmgf96CtdXyDcrWOw3U49CDf56j743hbIk9NXjsc=
=IzVd
-----END PGP SIGNATURE-----

--
|_|O|_| Github: https://github.com/dpurgert
|_|_|O| PGP: DDAB 23FB 19FA 7D85 1CC1 E067 6D65 70E5 4CE7 2860
|O|O|O|

Re: Here come the 128-bit pointers

<ssn6eq$5nh$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20160&group=comp.lang.c#20160

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: cr88...@gmail.com (BGB)
Newsgroups: comp.lang.c
Subject: Re: Here come the 128-bit pointers
Date: Mon, 24 Jan 2022 15:41:45 -0600
Organization: A noiseless patient Spider
Lines: 103
Message-ID: <ssn6eq$5nh$1@dont-email.me>
References: <RZBHJ.39378$gX.11188@fx40.iad>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 24 Jan 2022 21:41:46 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="d62eb3b8f6d55aa28b22452bb980fd2a";
logging-data="5873"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/v/qwJCyYGOJ9bzfPN+/yL"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.5.0
Cancel-Lock: sha1:kJrjwGXefUjPejAGLWmUE5NXlvw=
In-Reply-To: <RZBHJ.39378$gX.11188@fx40.iad>
Content-Language: en-US
 by: BGB - Mon, 24 Jan 2022 21:41 UTC

On 1/24/2022 12:12 PM, Scott Lurndal wrote:
> https://www.theregister.com/2022/01/21/arm_morello_testing/
> https://www.arm.com/architecture/cpu/morello
> https://developer.arm.com/documentation/ddi0606/latest

Going OT here...

FWIW, when I designed my own ISA (BJX2, mostly on FPGA), I decided to
take a somewhat different approach:
Memory pages can have an associated UID+GID pair and/or ACL;
Execution contexts may have a "keyring" which is checked against the ACL
(this would nominally be per-thread, but there is a possibility of
scoping it based on the page containing the currently executing
instruction, the keyring effectively functioning like an inverted ACL,
nominally limited to 4 entries if encoded directly, but an indirect
approach via ACLs can allow for an expanded set of keys);
....

The model used is fairly similar to that used in Unix style filesystems
(though, it may or may not be a separate namespace from that of the VFS).

In this case, these are handled by the MMU, and the access
determinations are signaled back to the L1 caches (implementation cost
for this being not significantly higher than for a more traditional
"protection ring" scheme).

Note that both TLB miss and ACL miss events would be handled by the OS
in this case (via interrupt handlers), so these are responsible for
fetching the relevant information from the page tables and ACL tables.

Information about the ACL in use by a page is encoded in the TLB entries
(along with the addresses and similar), and is (like the physical
address for the page) fetched from the page table.

From the perspective of the MMU itself, the ACL cache is mostly in
terms of A/B pairs and access-mode flags (with both this cache and the
TLB being set-associative).

In this case, it isn't necessary to expand pointers, and most remain as
64 bits (though the ISA itself is limited to an effective 48 bit address
space with 64-bit pointers).

The remaining 16 bits for pointers serve other purposes:
Data Pointers: Mostly used as type-tags for dynamically-typed objects;
Code Pointers: Can encode flag state and execution mode (*).

*: Function call/return, these capture some parts of the execution
state. These bits are also used for inter-ISA jumps (the CPU core
supports both my own ISA and also RV64I).

For raw C pointers, the high order bits are usually left zeroed.

Though, granted, some people have said that effectively trying to build
a capability system on top of ACLs is a terrible approach, but it seems
to work and makes more sense from an implementation cost perspective.

It is also almost entirely transparent from C (the C code does not need
to know or care that anything special is going on, it just sees
everything in terms of a fairly conventional linear address space with
64-bit pointers; with it just sort of "magically" having a protection
fault if it tries to access memory it doesn't have access permissions
for via its ACLs).

As can be noted, the ACL + keyring protection works in that access in
mostly granted or denied based on the contents of a system register that
is not accessible to the user-level ISA.

There was support for an optional expanded 96-bit address space (using
register pairs as pointers).

There was at one point an idea for "faking" more traditional object
capabilities via using part of the 96-bit address space with randomized
or "encrypted" addresses, but there are tradeoffs here. It would either
be "weak" (pointers would be forgeable) or "annoying" (a pointer is only
accessible within a certain context, and would require special system
calls to transfer the pointer from one context to another, which would
"re-encrypt" the high-order bits of the pointer for the new context).

Using the expanded pointers does visibly effect C code though, mostly:
The integer representation for these are 128 bits rather than 64;
May be cast to/from '__int128' rather than 'long' or similar.
They generally involve the use of the "__huge" modifier:
"int __huge *ptr;" or similar.
They are not generally intended for "general use" though.
...

It is also possible for code to operate within the 96-bit space via
narrow pointers, where it behaves more like 8086 style segmented
addressing, or (more technically accurate) like the addressing scheme in
the 65C816 (just with two 48 bit parts, rather than two 16 bit values).

Implicitly, this latter mode is also still usable from RV64I mode (just
with it being unable to access anything outside of its local 48-bit
"quadrant").

....

Re: Here come the 128-bit pointers

<sso8kg$82t$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20169&group=comp.lang.c#20169

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c
Subject: Re: Here come the 128-bit pointers
Date: Tue, 25 Jan 2022 08:25:04 +0100
Organization: A noiseless patient Spider
Lines: 7
Message-ID: <sso8kg$82t$1@dont-email.me>
References: <RZBHJ.39378$gX.11188@fx40.iad>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 25 Jan 2022 07:25:04 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="3108706cc67be86381bac555081078c5";
logging-data="8285"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18r9iLZfaXrEAmge5Wp/GHedE4RlmiyeOw="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.5.0
Cancel-Lock: sha1:l5kR5sfXAxsb7pXP49aEoQIUAt4=
In-Reply-To: <RZBHJ.39378$gX.11188@fx40.iad>
Content-Language: de-DE
 by: Bonita Montero - Tue, 25 Jan 2022 07:25 UTC

Am 24.01.2022 um 19:12 schrieb Scott Lurndal:

> https://www.theregister.com/2022/01/21/arm_morello_testing/
> https://www.arm.com/architecture/cpu/morello
> https://developer.arm.com/documentation/ddi0606/latest

Where are the 128 bit pointers in Morello ?

Re: Here come the 128-bit pointers

<ssochk$t26$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20170&group=comp.lang.c#20170

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: cr88...@gmail.com (BGB)
Newsgroups: comp.lang.c
Subject: Re: Here come the 128-bit pointers
Date: Tue, 25 Jan 2022 02:31:46 -0600
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <ssochk$t26$1@dont-email.me>
References: <RZBHJ.39378$gX.11188@fx40.iad> <sso8kg$82t$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 25 Jan 2022 08:31:48 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="00ec3774dd4bc1698573d4078f83b292";
logging-data="29766"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX196N68sLWqaYFjc9OgX+0dA"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.5.0
Cancel-Lock: sha1:8BSIGMMTDdFjDlZhAU9QYtr2yMs=
In-Reply-To: <sso8kg$82t$1@dont-email.me>
Content-Language: en-US
 by: BGB - Tue, 25 Jan 2022 08:31 UTC

On 1/25/2022 1:25 AM, Bonita Montero wrote:
> Am 24.01.2022 um 19:12 schrieb Scott Lurndal:
>
>> https://www.theregister.com/2022/01/21/arm_morello_testing/
>> https://www.arm.com/architecture/cpu/morello
>> https://developer.arm.com/documentation/ddi0606/latest
>
> Where are the 128 bit pointers in Morello ?

A quick skim implies that it works like:
64-bit pointers, no special protection;
129-bit pointers (with 128-bit storage), capability addressing, ...

So, implicitly, it involves:
Extra big pointers;
Extra wonkiness for saving/reloading pointers;
Registers that are internally significantly wider than what it visible
in the rest of the ISA;
....

A quick skim makes me suspect that this will have few drawbacks:
More expensive for a hardware implementation (vs normal ARM64);
Unlikely to be widely adopted, as using it would adversely impact
existing C codebases (which tend to assume pointers are either 32 or 64
bits, and the ability to freely cast to and from integer types and
manipulate them at the bit level, ...).

Ideally, one would want a solution which is both "pretty much invisible"
(code should not need to know or care) and "nearly free" (does not
significantly impact performance, memory usage, or the relative
implementation cost).

....

Re: Here come the 128-bit pointers

<a6bbc001-438a-4298-b096-29ed8505fb2bn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20171&group=comp.lang.c#20171

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:620a:29d3:: with SMTP id s19mr14037607qkp.730.1643105074751;
Tue, 25 Jan 2022 02:04:34 -0800 (PST)
X-Received: by 2002:a05:620a:10a9:: with SMTP id h9mr2784998qkk.282.1643105074600;
Tue, 25 Jan 2022 02:04:34 -0800 (PST)
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.lang.c
Date: Tue, 25 Jan 2022 02:04:34 -0800 (PST)
In-Reply-To: <ssochk$t26$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=84.50.190.130; posting-account=pysjKgkAAACLegAdYDFznkqjgx_7vlUK
NNTP-Posting-Host: 84.50.190.130
References: <RZBHJ.39378$gX.11188@fx40.iad> <sso8kg$82t$1@dont-email.me> <ssochk$t26$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a6bbc001-438a-4298-b096-29ed8505fb2bn@googlegroups.com>
Subject: Re: Here come the 128-bit pointers
From: oot...@hot.ee (Öö Tiib)
Injection-Date: Tue, 25 Jan 2022 10:04:34 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 44
 by: Öö Tiib - Tue, 25 Jan 2022 10:04 UTC

On Tuesday, 25 January 2022 at 10:32:01 UTC+2, BGB wrote:
> On 1/25/2022 1:25 AM, Bonita Montero wrote:
> > Am 24.01.2022 um 19:12 schrieb Scott Lurndal:
> >
> >> https://www.theregister.com/2022/01/21/arm_morello_testing/
> >> https://www.arm.com/architecture/cpu/morello
> >> https://developer.arm.com/documentation/ddi0606/latest
> >
> > Where are the 128 bit pointers in Morello ?
> A quick skim implies that it works like:
> 64-bit pointers, no special protection;
> 129-bit pointers (with 128-bit storage), capability addressing, ...
>
> So, implicitly, it involves:
> Extra big pointers;
> Extra wonkiness for saving/reloading pointers;
> Registers that are internally significantly wider than what it visible
> in the rest of the ISA;
> ...
>
> A quick skim makes me suspect that this will have few drawbacks:
> More expensive for a hardware implementation (vs normal ARM64);

That feels likely but to what extent of affect? The grampies at comp.arch
can perhaps estimate it better than we here.

> Unlikely to be widely adopted, as using it would adversely impact
> existing C codebases (which tend to assume pointers are either 32 or 64
> bits, and the ability to freely cast to and from integer types and
> manipulate them at the bit level, ...).

That is unlikely a problem. Very few actual products convert to integers
and crunch pointers at bit level. The one's that do are highly platform
specific and so don't care about Morellos elsewhere in universe.
The portable code bases however support both 32 and 64 bit pointers
without problems already now as rule. Adding 128 is just extending
what is already there.

> Ideally, one would want a solution which is both "pretty much invisible"
> (code should not need to know or care) and "nearly free" (does not
> significantly impact performance, memory usage, or the relative
> implementation cost).

People dream about what is ideal but purchase what is available.
Decisions in businesses are made based on their latter behaviour.

Re: Here come the 128-bit pointers

<o5UHJ.15868$mS1.2718@fx10.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20179&group=comp.lang.c#20179

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx10.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: Here come the 128-bit pointers
Newsgroups: comp.lang.c
References: <RZBHJ.39378$gX.11188@fx40.iad> <sso8kg$82t$1@dont-email.me> <ssochk$t26$1@dont-email.me> <a6bbc001-438a-4298-b096-29ed8505fb2bn@googlegroups.com>
Lines: 63
Message-ID: <o5UHJ.15868$mS1.2718@fx10.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Tue, 25 Jan 2022 14:48:52 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Tue, 25 Jan 2022 14:48:52 GMT
X-Received-Bytes: 3602
 by: Scott Lurndal - Tue, 25 Jan 2022 14:48 UTC

=?UTF-8?B?w5bDtiBUaWli?= <ootiib@hot.ee> writes:
>On Tuesday, 25 January 2022 at 10:32:01 UTC+2, BGB wrote:
>> On 1/25/2022 1:25 AM, Bonita Montero wrote:
>> > Am 24.01.2022 um 19:12 schrieb Scott Lurndal:
>> >
>> >> https://www.theregister.com/2022/01/21/arm_morello_testing/
>> >> https://www.arm.com/architecture/cpu/morello
>> >> https://developer.arm.com/documentation/ddi0606/latest
>> >
>> > Where are the 128 bit pointers in Morello ?
>> A quick skim implies that it works like:
>> 64-bit pointers, no special protection;
>> 129-bit pointers (with 128-bit storage), capability addressing, ...
>>
>> So, implicitly, it involves:
>> Extra big pointers;
>> Extra wonkiness for saving/reloading pointers;
>> Registers that are internally significantly wider than what it visible
>> in the rest of the ISA;
>> ...
>>
>> A quick skim makes me suspect that this will have few drawbacks:
>> More expensive for a hardware implementation (vs normal ARM64);
>
>That feels likely but to what extent of affect? The grampies at comp.arch
>can perhaps estimate it better than we here.

I've spent the last decade working with the ARM64 architecture,
and we've built three generations of high-end ARM64 processors.

The cost for internally widening the register data paths is minimal,
given the current existance of 128-bit (or larger for SVE) SIMD
registers.

One issue is the storage for the capability tags (basically one
bit for every 8-bytes of memory capable of storing capabilities);
this leads to changes of the L1/L2/L3 cache hierarchies to manage
the bit (which is required to be stored where software cannot
reach it - a segregated section of DRAM or on-board SRAM).

The vast majority of ARM customers (Applem Cavium excepted) use IP provided
by ARM (e.g. Cortex A series or the Neoverse N2 series); for those, enabling
Morello will be a simple configuration option in the IP.

>
>> Unlikely to be widely adopted, as using it would adversely impact
>> existing C codebases (which tend to assume pointers are either 32 or 64
>> bits, and the ability to freely cast to and from integer types and
>> manipulate them at the bit level, ...).
>
>That is unlikely a problem. Very few actual products convert to integers
>and crunch pointers at bit level. The one's that do are highly platform
>specific and so don't care about Morellos elsewhere in universe.

Indeed. And such pointer manipulation is still allowed, but provided
via specialized instructions instead of ad-hoc instruction sequences,
which as an added benefit can produce better performance.

>People dream about what is ideal but purchase what is available.
>Decisions in businesses are made based on their latter behaviour.

Note that Morello is still in the nature of an experiment.

Re: Here come the 128-bit pointers

<sspdgi$3sj$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20184&group=comp.lang.c#20184

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: cr88...@gmail.com (BGB)
Newsgroups: comp.lang.c
Subject: Re: Here come the 128-bit pointers
Date: Tue, 25 Jan 2022 11:54:24 -0600
Organization: A noiseless patient Spider
Lines: 149
Message-ID: <sspdgi$3sj$1@dont-email.me>
References: <RZBHJ.39378$gX.11188@fx40.iad> <sso8kg$82t$1@dont-email.me>
<ssochk$t26$1@dont-email.me>
<a6bbc001-438a-4298-b096-29ed8505fb2bn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 25 Jan 2022 17:54:26 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="00ec3774dd4bc1698573d4078f83b292";
logging-data="3987"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+64eX7/8NAKUzA8MOyFYZ4"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.5.0
Cancel-Lock: sha1:nvE99CoOwTbMf7zsIE4X8yWfbOM=
In-Reply-To: <a6bbc001-438a-4298-b096-29ed8505fb2bn@googlegroups.com>
Content-Language: en-US
 by: BGB - Tue, 25 Jan 2022 17:54 UTC

On 1/25/2022 4:04 AM, Öö Tiib wrote:
> On Tuesday, 25 January 2022 at 10:32:01 UTC+2, BGB wrote:
>> On 1/25/2022 1:25 AM, Bonita Montero wrote:
>>> Am 24.01.2022 um 19:12 schrieb Scott Lurndal:
>>>
>>>> https://www.theregister.com/2022/01/21/arm_morello_testing/
>>>> https://www.arm.com/architecture/cpu/morello
>>>> https://developer.arm.com/documentation/ddi0606/latest
>>>
>>> Where are the 128 bit pointers in Morello ?
>> A quick skim implies that it works like:
>> 64-bit pointers, no special protection;
>> 129-bit pointers (with 128-bit storage), capability addressing, ...
>>
>> So, implicitly, it involves:
>> Extra big pointers;
>> Extra wonkiness for saving/reloading pointers;
>> Registers that are internally significantly wider than what it visible
>> in the rest of the ISA;
>> ...
>>
>> A quick skim makes me suspect that this will have few drawbacks:
>> More expensive for a hardware implementation (vs normal ARM64);
>
> That feels likely but to what extent of affect? The grampies at comp.arch
> can perhaps estimate it better than we here.
>

Possible.

I post around there more often than here anymore.

My experience is mostly in the context of custom cores on FPGAs, but can
note that "expand all the GPRs internally to 129-bits but ignore these
bits in most instructions" is kinda, not ideal from a cost POV (at least
on an FPGA).

My ISA does have some 128-bit stuff, but internally it is all done by
essentially pairing up 64-bit ports (using the 6R3W register file as a
virtual 3R1W register file for 128-bit ops; spreading the logic across
multiple lanes). (The core is basically using a 3-wide VLIW design
internally, for an ISA with variable-length VLIW bundling).

Following the cost/benefit curves did lead to the relative oddity of
having an ISA with some 128-bit integer ALU instructions, but only
having a 32-bit integer multiplier, while not having any integer divide
instructions, ...

>> Unlikely to be widely adopted, as using it would adversely impact
>> existing C codebases (which tend to assume pointers are either 32 or 64
>> bits, and the ability to freely cast to and from integer types and
>> manipulate them at the bit level, ...).
>
> That is unlikely a problem. Very few actual products convert to integers
> and crunch pointers at bit level. The one's that do are highly platform
> specific and so don't care about Morellos elsewhere in universe.
> The portable code bases however support both 32 and 64 bit pointers
> without problems already now as rule. Adding 128 is just extending
> what is already there.
>

My experience differs some.

It was sort of a pain porting a lot of 32-bit era code to 64-bit
targets, mostly because of these sorts of issues. Porting 16-bit era
code borders on rewriting much of it (such as to eliminate all the
wrangling with "far pointers"; or to deal with things like 'int' and
'long' now being different sizes; ...).

A lot of this sort of code often still ends up with ifdefs to try to
detect things like target and pointer size.

A few times, one has also gotten bitten by code which assumes things
like whether 'char' is signed or unsigned by default, etc.

My prediction is that porting such code to also be able to deal with
128-bit pointers would be yet another layer of hassle.

Like, about as soon as one runs into a codebase based around "NaN
boxing" a lot of their pointers or similar, what will they do?...

Or, can you even do this sort of bit-munging with capabilities without
breaking them?... Will they have to switch over to treating all the
heaps as Base+Displacement? ...

So, say your NaN boxed value stores the address as
(PointerToObject-HeapBase) and then needs to do
(HeapBase+ObjectDisplacement) to regenerate a valid pointer, or maybe
needs a different base pointer for every heap segment, turning it into, say:
uli=get_double_as_bits(val);
ptr=somevm_heapbase[(uli>>32)&4095]+((uint32_t)uli);

....

Though, the alternative is, say, using 64 bit pointers but then defining
the high 16 bits as being ignored (limiting the address space to 48
bits). On the plus side, now things like NaN boxing and similar can be
made pretty much free (well, though officially I don't use NaN boxing,
but rather a different tagging scheme that makes more economical use of
the bits, and allows for a 62-bit fixnum and similar).

Well, and of course, the other option for "fake" capabilities which is
"make the address space so large that it is pretty much impossible to
guess the high order bits" (in this case, the security would depend less
on hardware level protection and more the strength of the random number
generator).

Though, these faked capabilities still have the drawback of needing to
deal with larger (128-bit) pointers, but if they are treated as an
obscure special case, the overall impact to code is less (most code wont
need to care).

Granted, a memory protection scheme which is opt-in is likely to see
relatively little use in practice.

>> Ideally, one would want a solution which is both "pretty much invisible"
>> (code should not need to know or care) and "nearly free" (does not
>> significantly impact performance, memory usage, or the relative
>> implementation cost).
>
> People dream about what is ideal but purchase what is available.
> Decisions in businesses are made based on their latter behaviour.

I suspect "slightly better security" is going to be a hard sell in the
face of extra porting effort and/or ABI compatibility issues.

So, say:
Well, "we now get more security, and don't need to do anything";
Vs, "we can get more security, but need to recompile";
Vs, "we can get more security, but need to go through porting effort and
also now the ABI is different".

....

Traditionally, "not needing to do anything" has been preferred (hence
probably still why we have 64-bit systems still largely running programs
compiled for 32-bit x86...).

Re: Here come the 128-bit pointers

<8eXHJ.6$h91.4@fx48.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20185&group=comp.lang.c#20185

  copy link   Newsgroups: comp.lang.c
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!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx48.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: Here come the 128-bit pointers
Newsgroups: comp.lang.c
References: <RZBHJ.39378$gX.11188@fx40.iad> <sso8kg$82t$1@dont-email.me> <ssochk$t26$1@dont-email.me> <a6bbc001-438a-4298-b096-29ed8505fb2bn@googlegroups.com> <sspdgi$3sj$1@dont-email.me>
Lines: 46
Message-ID: <8eXHJ.6$h91.4@fx48.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Tue, 25 Jan 2022 18:23:00 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Tue, 25 Jan 2022 18:23:00 GMT
X-Received-Bytes: 2649
 by: Scott Lurndal - Tue, 25 Jan 2022 18:23 UTC

BGB <cr88192@gmail.com> writes:
>On 1/25/2022 4:04 AM, Öö Tiib wrote:
>> On Tuesday, 25 January 2022 at 10:32:01 UTC+2, BGB wrote:
>>> On 1/25/2022 1:25 AM, Bonita Montero wrote:
>>>> Am 24.01.2022 um 19:12 schrieb Scott Lurndal:
>>>>
>>>>> https://www.theregister.com/2022/01/21/arm_morello_testing/
>>>>> https://www.arm.com/architecture/cpu/morello
>>>>> https://developer.arm.com/documentation/ddi0606/latest
>>>>
>>>> Where are the 128 bit pointers in Morello ?
>>> A quick skim implies that it works like:
>>> 64-bit pointers, no special protection;
>>> 129-bit pointers (with 128-bit storage), capability addressing, ...
>>>
>>> So, implicitly, it involves:
>>> Extra big pointers;
>>> Extra wonkiness for saving/reloading pointers;
>>> Registers that are internally significantly wider than what it visible
>>> in the rest of the ISA;
>>> ...
>>>
>>> A quick skim makes me suspect that this will have few drawbacks:
>>> More expensive for a hardware implementation (vs normal ARM64);
>>
>> That feels likely but to what extent of affect? The grampies at comp.arch
>> can perhaps estimate it better than we here.
>>
>
>Possible.
>
>I post around there more often than here anymore.
>
>
>My experience is mostly in the context of custom cores on FPGAs, but can
>note that "expand all the GPRs internally to 129-bits but ignore these
>bits in most instructions" is kinda, not ideal from a cost POV (at least
>on an FPGA).

For a bespoke ASIC that already supports ARM's 128-bit SIMD registers, the
internal bus structures need another bit (129th) for the capability
bit, so its not so bad.

For the general purpose registers, they'll need 65 additional bits
each (for 32 registers, so 264 bytes or so of on-chip flops or
memories per core/thread) - on a 8 billion transister SoC ASIC, that's in the noise.

Re: Here come the 128-bit pointers

<sspgoj$s5l$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20189&group=comp.lang.c#20189

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c
Subject: Re: Here come the 128-bit pointers
Date: Tue, 25 Jan 2022 19:49:56 +0100
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <sspgoj$s5l$1@dont-email.me>
References: <RZBHJ.39378$gX.11188@fx40.iad> <sso8kg$82t$1@dont-email.me>
<ssochk$t26$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 25 Jan 2022 18:49:56 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="3108706cc67be86381bac555081078c5";
logging-data="28853"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/ntOn/zq+7CKWiJKNki3MG3v0ObyPlE44="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.5.0
Cancel-Lock: sha1:gYIaQQh2HpOo88ydJ9vsfWE+RWg=
In-Reply-To: <ssochk$t26$1@dont-email.me>
Content-Language: de-DE
 by: Bonita Montero - Tue, 25 Jan 2022 18:49 UTC

Am 25.01.2022 um 09:31 schrieb BGB:
> On 1/25/2022 1:25 AM, Bonita Montero wrote:
>> Am 24.01.2022 um 19:12 schrieb Scott Lurndal:
>>
>>> https://www.theregister.com/2022/01/21/arm_morello_testing/
>>> https://www.arm.com/architecture/cpu/morello
>>> https://developer.arm.com/documentation/ddi0606/latest
>>
>> Where are the 128 bit pointers in Morello ?
>
> A quick skim implies that it works like:
>   64-bit pointers, no special protection;
>   129-bit pointers (with 128-bit storage), capability addressing, ...
>
> So, implicitly, it involves:
> Extra big pointers;
> Extra wonkiness for saving/reloading pointers;
> Registers that are internally significantly wider than what it visible
> in the rest of the ISA;
> ...
>
> A quick skim makes me suspect that this will have few drawbacks:
> More expensive for a hardware implementation (vs normal ARM64);
> Unlikely to be widely adopted, as using it would adversely impact
> existing C codebases (which tend to assume pointers are either 32 or 64
> bits, and the ability to freely cast to and from integer types and
> manipulate them at the bit level, ...).
>
>
> Ideally, one would want a solution which is both "pretty much invisible"
> (code should not need to know or care) and "nearly free" (does not
> significantly impact performance, memory usage, or the relative
> implementation cost).
>
> ...

Where's the docuemntation for Morello supporting 128 bit pointers ?

Re: Here come the 128-bit pointers

<sspls9$2p9$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20191&group=comp.lang.c#20191

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: cr88...@gmail.com (BGB)
Newsgroups: comp.lang.c
Subject: Re: Here come the 128-bit pointers
Date: Tue, 25 Jan 2022 14:17:11 -0600
Organization: A noiseless patient Spider
Lines: 137
Message-ID: <sspls9$2p9$1@dont-email.me>
References: <RZBHJ.39378$gX.11188@fx40.iad> <sso8kg$82t$1@dont-email.me>
<ssochk$t26$1@dont-email.me>
<a6bbc001-438a-4298-b096-29ed8505fb2bn@googlegroups.com>
<sspdgi$3sj$1@dont-email.me> <8eXHJ.6$h91.4@fx48.iad>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 25 Jan 2022 20:17:13 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="00ec3774dd4bc1698573d4078f83b292";
logging-data="2857"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18xP7Hwfrg6wySsNLeysbb/"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.5.0
Cancel-Lock: sha1:lxP8doAJI4zj2mmoOGYP4ZEwYCI=
In-Reply-To: <8eXHJ.6$h91.4@fx48.iad>
Content-Language: en-US
 by: BGB - Tue, 25 Jan 2022 20:17 UTC

On 1/25/2022 12:23 PM, Scott Lurndal wrote:
> BGB <cr88192@gmail.com> writes:
>> On 1/25/2022 4:04 AM, Öö Tiib wrote:
>>> On Tuesday, 25 January 2022 at 10:32:01 UTC+2, BGB wrote:
>>>> On 1/25/2022 1:25 AM, Bonita Montero wrote:
>>>>> Am 24.01.2022 um 19:12 schrieb Scott Lurndal:
>>>>>
>>>>>> https://www.theregister.com/2022/01/21/arm_morello_testing/
>>>>>> https://www.arm.com/architecture/cpu/morello
>>>>>> https://developer.arm.com/documentation/ddi0606/latest
>>>>>
>>>>> Where are the 128 bit pointers in Morello ?
>>>> A quick skim implies that it works like:
>>>> 64-bit pointers, no special protection;
>>>> 129-bit pointers (with 128-bit storage), capability addressing, ...
>>>>
>>>> So, implicitly, it involves:
>>>> Extra big pointers;
>>>> Extra wonkiness for saving/reloading pointers;
>>>> Registers that are internally significantly wider than what it visible
>>>> in the rest of the ISA;
>>>> ...
>>>>
>>>> A quick skim makes me suspect that this will have few drawbacks:
>>>> More expensive for a hardware implementation (vs normal ARM64);
>>>
>>> That feels likely but to what extent of affect? The grampies at comp.arch
>>> can perhaps estimate it better than we here.
>>>
>>
>> Possible.
>>
>> I post around there more often than here anymore.
>>
>>
>> My experience is mostly in the context of custom cores on FPGAs, but can
>> note that "expand all the GPRs internally to 129-bits but ignore these
>> bits in most instructions" is kinda, not ideal from a cost POV (at least
>> on an FPGA).
>
> For a bespoke ASIC that already supports ARM's 128-bit SIMD registers, the
> internal bus structures need another bit (129th) for the capability
> bit, so its not so bad.
>
> For the general purpose registers, they'll need 65 additional bits
> each (for 32 registers, so 264 bytes or so of on-chip flops or
> memories per core/thread) - on a 8 billion transister SoC ASIC, that's in the noise.

OK.

The core I have is arguably on the lower end (mostly targeting Spartan-7
and Artix-7 FPGAs; boards typically in the $100 to $300 range).

Not exactly huge, lots of corner cutting, ...

Was still able to fit a lot more than I had originally imagined.

Granted, MHz isn't exactly that high (my cores are mostly running at
50MHz), but alas... (can run Doom pretty OK, and Quake with a bit of lag).

Some things were added mostly because I was able to figure out ways to
do them "affordably":
128-bit ALU ops by effectively ganging up 64-bit units horizontally;
FPU SIMD ops via internal pipelining tricks;
...

Granted, it is 3-wide VLIW, which costs more than a 1-wide RISC.
However, the cost differences between a 1-wide RISC and 3-wide VLIW were
relatively modest, but a VLIW is a fair bit more capable and can deliver
better performance.

In terms of the pipeline design, there also isn't a huge difference
between a VLIW and a RISC, apart from a VLIW core having more register
ports and multiple ALUs and similar.

It has a register space which could be interpreted either as 32x
128-bits, or 64x 64-bits. One can choose whether to see them as pairs of
64-bit registers being merged into 128 bits, or as 128-bit registers
being split up and used as 64-bit halves.

It was also a cheaper than going over to superscalar.

Actual higher-performance OoO designs are mostly out of the reach of
what can effectively be pulled off on something like an typical
Spartan-7 or Artix-7 dev board (and higher end boards are significantly
more expensive).

Well, there are also ICE40 boards, but, these are not significantly
cheaper, but somewhat less capable (can maybe fit an RV32I core, but
more commonly people go for 16-bit designs on these).

There is FPU SIMD, but it doesn't have multiple FPUs internally, but
instead feeds each element through the FPU sequentially. Can still work
out faster than using scalar FPU ops though; also the FPU is corner cut
as well, and not strictly IEEE conformant (only does ADD/SUB/MUL,
doesn't reliably give 0.5 ULP, denormal-as-zero semantics, ...).

The ALU ops are because there are multiple ALUs (one for each lane), and
in many cases one can map a 128-bit ALU op to two 64-bit ALU ops running
in parallel (or, for ADD/SUB, it will effectively daisy chain the ALUs).

For 128-bit shift, was able to pull it off internally by using two
64-bit funnel-shift units (which actually worked out cheaper than the
original barrel shift units as well, ...).

As noted, I do have an extension for 96 bit addressing, however:
The L1's mostly handle it with hackery:
Doesn't store a full address, but hashes the high-order bits;
When used, it effectively cuts the TLB associativity in half;
...

So, the L1 effectively stores 96 bit addresses hashed down to 64 bits,
and the TLB runs 48-bit matches in an even/odd configuration (depending
mostly on the tag bits in the TLB entries).

There are also some pretty big costs though related to the L2 cache and
DDR interface. For performance reasons ended up with 64-byte (512 bit)
cache lines in the L2 cache, but these are not so great for LUT cost...

Trying to transfer data to/from DDR as 16-byte / 128-bit bursts though
is not so good for DRAM bandwidth...

As a result, a considerable chunk of FPGA LUT budget is going into the
DDR PHY and L2 cache and similar.

....

Re: Here come the 128-bit pointers

<ssprrc$d8h$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20192&group=comp.lang.c#20192

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: cr88...@gmail.com (BGB)
Newsgroups: comp.lang.c
Subject: Re: Here come the 128-bit pointers
Date: Tue, 25 Jan 2022 15:59:08 -0600
Organization: A noiseless patient Spider
Lines: 95
Message-ID: <ssprrc$d8h$1@dont-email.me>
References: <RZBHJ.39378$gX.11188@fx40.iad> <sso8kg$82t$1@dont-email.me>
<ssochk$t26$1@dont-email.me> <sspgoj$s5l$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 25 Jan 2022 21:59:08 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="00ec3774dd4bc1698573d4078f83b292";
logging-data="13585"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Q6R+bX7deIoM50x79qvoK"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.5.0
Cancel-Lock: sha1:IoNVf3VgWrYErR4W7N0cE30jK6w=
In-Reply-To: <sspgoj$s5l$1@dont-email.me>
Content-Language: en-US
 by: BGB - Tue, 25 Jan 2022 21:59 UTC

On 1/25/2022 12:49 PM, Bonita Montero wrote:
> Am 25.01.2022 um 09:31 schrieb BGB:
>> On 1/25/2022 1:25 AM, Bonita Montero wrote:
>>> Am 24.01.2022 um 19:12 schrieb Scott Lurndal:
>>>
>>>> https://www.theregister.com/2022/01/21/arm_morello_testing/
>>>> https://www.arm.com/architecture/cpu/morello
>>>> https://developer.arm.com/documentation/ddi0606/latest
>>>
>>> Where are the 128 bit pointers in Morello ?
>>
>> A quick skim implies that it works like:
>>    64-bit pointers, no special protection;
>>    129-bit pointers (with 128-bit storage), capability addressing, ...
>>
>> So, implicitly, it involves:
>> Extra big pointers;
>> Extra wonkiness for saving/reloading pointers;
>> Registers that are internally significantly wider than what it visible
>> in the rest of the ISA;
>> ...
>>
>> A quick skim makes me suspect that this will have few drawbacks:
>> More expensive for a hardware implementation (vs normal ARM64);
>> Unlikely to be widely adopted, as using it would adversely impact
>> existing C codebases (which tend to assume pointers are either 32 or
>> 64 bits, and the ability to freely cast to and from integer types and
>> manipulate them at the bit level, ...).
>>
>>
>> Ideally, one would want a solution which is both "pretty much
>> invisible" (code should not need to know or care) and "nearly free"
>> (does not significantly impact performance, memory usage, or the
>> relative implementation cost).
>>
>> ...
>
> Where's the docuemntation for Morello supporting 128 bit pointers ?

It is my understanding of the various pieces of information I have read
about it thus far (some linked to by the pages mentioned in the OP),
that it is a modified Aarch64 where it either runs in normal A64 mode
(with 64-bit pointers), or runs in C64 mode (with 128-bit pointers), and
in C64 mode pretty much all of the pointers are widened to 128 bits.

There is apparently also a different C ABI for it, etc...

Eg:
https://github.com/ARM-software/abi-aa/blob/main/aaelf64-morello/aaelf64-morello.rst

What is unclear is if C64 mode still allows for using 64-bit pointers
(well, or at least without needing to synthesize them at load time or
similar).

However, the address space itself appears to remain as 64 bits, with the
high bits of the capability mostly holding bounds-check information and
permission flags and similar.

....

It is, as noted, all very different from my own approach (eg: ACL
checking and R/W/X permissions).

Well, also my case doesn't have built-in bounds checks, but there were
some instructions which allow for performing bounds-checks, namely an
instruction which would compare an index value against Base(59:48) and
set a flag based on whether it goes out of range (this could be used for
a conditional branch to an array-bounds check handler; used either for a
bounds check handler, or to handle checks specially for arrays with more
than 4095 elements).

In this case, Base(63:60) were interpreted as a type-tag, which would
also be checked to verify that it held the tag for an array (0x2 in this
case).

Say:
Base(63:60)!=2, Branch to handler.
Index>=Base(59:48), Branch to handler.
Perform Access.

The handler would do more advanced checks to determine what to make of
this case.

This case adds a few extra clock cycles per array access (and doing so
was left up to the compiler), but was "mostly sufficient" for Java-style
access patterns (with some restrictions, it can also be used for
dynamically-typed languages).

....

Re: Here come the 128-bit pointers

<QN_HJ.4437$CW.3416@fx17.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20193&group=comp.lang.c#20193

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx17.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: Here come the 128-bit pointers
Newsgroups: comp.lang.c
References: <RZBHJ.39378$gX.11188@fx40.iad> <sso8kg$82t$1@dont-email.me> <ssochk$t26$1@dont-email.me> <sspgoj$s5l$1@dont-email.me> <ssprrc$d8h$1@dont-email.me>
Lines: 62
Message-ID: <QN_HJ.4437$CW.3416@fx17.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Tue, 25 Jan 2022 22:25:52 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Tue, 25 Jan 2022 22:25:52 GMT
X-Received-Bytes: 3154
 by: Scott Lurndal - Tue, 25 Jan 2022 22:25 UTC

BGB <cr88192@gmail.com> writes:
>On 1/25/2022 12:49 PM, Bonita Montero wrote:
>> Am 25.01.2022 um 09:31 schrieb BGB:
>>> On 1/25/2022 1:25 AM, Bonita Montero wrote:
>>>> Am 24.01.2022 um 19:12 schrieb Scott Lurndal:
>>>>
>>>>> https://www.theregister.com/2022/01/21/arm_morello_testing/
>>>>> https://www.arm.com/architecture/cpu/morello
>>>>> https://developer.arm.com/documentation/ddi0606/latest
>>>>
>>>> Where are the 128 bit pointers in Morello ?

If "Bonita" had bothered to read the links quoted, that question
would answer itself.

>>> ...
>>
>> Where's the docuemntation for Morello supporting 128 bit pointers ?

Pointers to all the documentation was in the orignal article "Bonita"
had replied to.

>
>
>It is my understanding of the various pieces of information I have read
>about it thus far (some linked to by the pages mentioned in the OP),
>that it is a modified Aarch64 where it either runs in normal A64 mode
>(with 64-bit pointers), or runs in C64 mode (with 128-bit pointers), and
>in C64 mode pretty much all of the pointers are widened to 128 bits.

This is correct. There is also a PCC (Program Counter Capability) register
and a DDC_ELx (Default Data Capability) register at each exception level.

For example, the ADRDP instruction will create a DDC relative address.

>There is apparently also a different C ABI for it, etc...

By necessity, since function call parameter passing and register
save/restore sequences are defined by the ABI.

>What is unclear is if C64 mode still allows for using 64-bit pointers
>(well, or at least without needing to synthesize them at load time or
>similar).

The DDC and PCC accomodate 64-bit pointers (within the bounds defined by
the capability - which isn't much different from permissions on pages).

>
>
>However, the address space itself appears to remain as 64 bits, with the
>high bits of the capability mostly holding bounds-check information and
>permission flags and similar.

The maximum physical address supported by AArch64 at this point in
time is 52-bits. Most only support 48-bits. The architecture provides
a mechanism where software can use the high 8 bits of a virtual address as
a tag field ignored by the processor - but that needs to be configured
by the Operating system on behalf of the task (tbi bit - top byte ignored).

Re: Here come the 128-bit pointers

<ssr173$ljo$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20204&group=comp.lang.c#20204

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: Here come the 128-bit pointers
Date: Wed, 26 Jan 2022 09:36:50 +0100
Organization: A noiseless patient Spider
Lines: 86
Message-ID: <ssr173$ljo$1@dont-email.me>
References: <RZBHJ.39378$gX.11188@fx40.iad> <sso8kg$82t$1@dont-email.me>
<ssochk$t26$1@dont-email.me>
<a6bbc001-438a-4298-b096-29ed8505fb2bn@googlegroups.com>
<sspdgi$3sj$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 26 Jan 2022 08:36:51 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="a2ebd383bad828fba021fc05cf8bf7a8";
logging-data="22136"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ANfLb2ntt4SAaTge9GiOkZ0qvF/95zks="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:SEr2gSnsEJJlG1FsgVhJMHQSOZA=
In-Reply-To: <sspdgi$3sj$1@dont-email.me>
Content-Language: en-GB
 by: David Brown - Wed, 26 Jan 2022 08:36 UTC

On 25/01/2022 18:54, BGB wrote:
> On 1/25/2022 4:04 AM, Öö Tiib wrote:
>> On Tuesday, 25 January 2022 at 10:32:01 UTC+2, BGB wrote:

>>> Unlikely to be widely adopted, as using it would adversely impact
>>> existing C codebases (which tend to assume pointers are either 32 or 64
>>> bits, and the ability to freely cast to and from integer types and
>>> manipulate them at the bit level, ...).
>>
>> That is unlikely a problem. Very few actual products convert to integers
>> and crunch pointers at bit level. The one's that do are highly platform
>> specific and so don't care about Morellos elsewhere in universe.
>> The portable code bases however support both 32 and 64 bit pointers
>> without problems already now as rule. Adding 128 is just extending
>> what is already there.
>>
>
> My experience differs some.
>
> It was sort of a pain porting a lot of 32-bit era code to 64-bit
> targets, mostly because of these sorts of issues. Porting 16-bit era
> code borders on rewriting much of it (such as to eliminate all the
> wrangling with "far pointers"; or to deal with things like 'int' and
> 'long' now being different sizes; ...).
>
> A lot of this sort of code often still ends up with ifdefs to try to
> detect things like target and pointer size.
>
> A few times, one has also gotten bitten by code which assumes things
> like whether 'char' is signed or unsigned by default, etc.
>
>
>
> My prediction is that porting such code to also be able to deal with
> 128-bit pointers would be yet another layer of hassle.
>

I think this is going to vary depending on the ancestory of the code.
In DOS and 16-bit Windows programming, you had a mess of "far" and
"near" pointers, and different sizes. There were many tricks/hacks used
for re-using high bits of pointers, xor'ing pointers so you get
double-linked lists with just one pointer, and so on. Some of this code
and attitude was moved directly over to 32-bit Windows. Programmers
viewed everything as a fixed ABI - you /knew/ "long int" was 32-bit and
big enough for a pointer. There was no C99 in MS' world at the time,
nor any attempt at standardisation or portability - you didn't use
"uintptr_t" for an integer matching a pointer, you used "unsigned long",
"DWORD", or other such "wintypes.h" name.

The move to 64-bit Windows involved a great deal of work here for a lot
of code. In particular, programmers had made two assumptions about
"long int" - that they were always 32-bit, and that they could always
hold a pointer. One of these had to break (MS choose the later), and
with it broke a lot of code. 30 years after the Alpha brought 64-bit to
the workstation, most of the programs run on Windows systems are still
32-bit.

However, for those that made the fixes and change of styles to get
64-bit to work, I don't /think/ supporting 128-bit pointers will cause
nearly as much of an issue.

For code and programmers from the *nix world, mixing 32-bit and 64-bit
targets has been the norm for decades. Programmers usually make far
fewer assumptions about sizes, endianness, and other portability issues.
It is common that the same source can be compiled for different 32-bit
or 64-bit targets without much trouble. (Yes, there are ifdef's and the
like - but those are mostly in standard headers and library headers, not
application code.) So again, moving to 128-bit pointers will not be as
hard as one might think.

Where I see the problem, however, is the challenge of introducing
128-bit integers to C. (It might be rare to need to convert a pointer
to an integer, but people do it sometimes.) If you want to have a
128-bit "uintptr_t", it means you also need a 128-bit "intmax_t". Are
you going to make size_t 128-bit, or keep it at 64-bit? Should you now
have a 128-bit "long long int"? Should your fundamental 128-bit be an
extended integer type "__int128_t"? "Long long long int" ? Should you
give up on uintptr_t entirely, and say that anyone who wants to
manipulate the bits of a pointer should use memcpy and unsigned char*
pointers?

It will be interesting to see how this all plays out.

Re: Here come the 128-bit pointers

<ssr1jb$nqj$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20206&group=comp.lang.c#20206

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c
Subject: Re: Here come the 128-bit pointers
Date: Wed, 26 Jan 2022 09:43:22 +0100
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <ssr1jb$nqj$1@dont-email.me>
References: <RZBHJ.39378$gX.11188@fx40.iad> <sso8kg$82t$1@dont-email.me>
<ssochk$t26$1@dont-email.me> <sspgoj$s5l$1@dont-email.me>
<ssprrc$d8h$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 26 Jan 2022 08:43:23 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="5670789573f5c51d90b95d844dc97427";
logging-data="24403"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+sKqMkf0qi+skwpO1PjXLTezcwl6Jvgkk="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.5.0
Cancel-Lock: sha1:EPTqWMk0SdPTAyYsClp51IocKEo=
In-Reply-To: <ssprrc$d8h$1@dont-email.me>
Content-Language: de-DE
 by: Bonita Montero - Wed, 26 Jan 2022 08:43 UTC

I don't see any sense in logical or physical 128 bit pointers.
Imagine that memory-density could be shrinked up to 100 times,
so computers could be equipped with much more memory. But it
would be impossible have tolerable access-times with an amount
of memory in the upper margin of 64 bit (that's 16 billion
gigabytes).
So the only usage for me would be a larger address space to
accomodate larger memory-mapped files. But memory-mapped files
are slow anyway as they don't allow pipelined transfers from
the disk (except asynchronous read-ahead). An access-facility
like in a database-system which issues pipelined asynchronous
operations is much more efficient.
And have a look at the filesystems: although ZFS data-layout
allows 128 bit filesystems, its current implementation is
limited to 64 bit.

Re: Here come the 128-bit pointers

<48eIJ.313921$qz4.75552@fx97.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20209&group=comp.lang.c#20209

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx97.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: Here come the 128-bit pointers
Newsgroups: comp.lang.c
References: <RZBHJ.39378$gX.11188@fx40.iad> <sso8kg$82t$1@dont-email.me> <ssochk$t26$1@dont-email.me> <sspgoj$s5l$1@dont-email.me> <ssprrc$d8h$1@dont-email.me> <ssr1jb$nqj$1@dont-email.me>
Lines: 4
Message-ID: <48eIJ.313921$qz4.75552@fx97.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Wed, 26 Jan 2022 15:53:36 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Wed, 26 Jan 2022 15:53:36 GMT
X-Received-Bytes: 907
 by: Scott Lurndal - Wed, 26 Jan 2022 15:53 UTC

Bonita Montero <Bonita.Montero@gmail.com> writes:
>I don't see any sense

That's been pretty clear all along.

Re: Here come the 128-bit pointers

<ssrsmf$rd8$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20210&group=comp.lang.c#20210

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c
Subject: Re: Here come the 128-bit pointers
Date: Wed, 26 Jan 2022 17:25:49 +0100
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <ssrsmf$rd8$1@dont-email.me>
References: <RZBHJ.39378$gX.11188@fx40.iad> <sso8kg$82t$1@dont-email.me>
<ssochk$t26$1@dont-email.me> <sspgoj$s5l$1@dont-email.me>
<ssprrc$d8h$1@dont-email.me> <ssr1jb$nqj$1@dont-email.me>
<48eIJ.313921$qz4.75552@fx97.iad>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 26 Jan 2022 16:25:51 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="5670789573f5c51d90b95d844dc97427";
logging-data="28072"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19MHFWKLJQTJCw7mXE3If1JrLZtA2NkoT4="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.5.0
Cancel-Lock: sha1:AEXx/GzVq5XrIJe8PbXa5SbmWXU=
In-Reply-To: <48eIJ.313921$qz4.75552@fx97.iad>
Content-Language: de-DE
 by: Bonita Montero - Wed, 26 Jan 2022 16:25 UTC

Am 26.01.2022 um 16:53 schrieb Scott Lurndal:

> Bonita Montero <Bonita.Montero@gmail.com> writes:

>> I don't see any sense

> That's been pretty clear all along.

And you also can't say why this would make sense.

Re: Here come the 128-bit pointers

<6ad11052-9d27-4f55-8dd0-4592a8e3229fn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20211&group=comp.lang.c#20211

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:620a:2914:: with SMTP id m20mr2339162qkp.690.1643214874683;
Wed, 26 Jan 2022 08:34:34 -0800 (PST)
X-Received: by 2002:a05:622a:43:: with SMTP id y3mr4540804qtw.233.1643214874543;
Wed, 26 Jan 2022 08:34:34 -0800 (PST)
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!border1.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.lang.c
Date: Wed, 26 Jan 2022 08:34:34 -0800 (PST)
In-Reply-To: <ssr1jb$nqj$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23a8:400a:5601:2846:4fb6:aff6:1436;
posting-account=Dz2zqgkAAADlK5MFu78bw3ab-BRFV4Qn
NNTP-Posting-Host: 2a00:23a8:400a:5601:2846:4fb6:aff6:1436
References: <RZBHJ.39378$gX.11188@fx40.iad> <sso8kg$82t$1@dont-email.me>
<ssochk$t26$1@dont-email.me> <sspgoj$s5l$1@dont-email.me> <ssprrc$d8h$1@dont-email.me>
<ssr1jb$nqj$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6ad11052-9d27-4f55-8dd0-4592a8e3229fn@googlegroups.com>
Subject: Re: Here come the 128-bit pointers
From: malcolm....@gmail.com (Malcolm McLean)
Injection-Date: Wed, 26 Jan 2022 16:34:34 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 18
 by: Malcolm McLean - Wed, 26 Jan 2022 16:34 UTC

On Wednesday, 26 January 2022 at 08:43:35 UTC, Bonita Montero wrote:
> I don't see any sense in logical or physical 128 bit pointers.
> Imagine that memory-density could be shrinked up to 100 times,
> so computers could be equipped with much more memory. But it
> would be impossible have tolerable access-times with an amount
> of memory in the upper margin of 64 bit (that's 16 billion
> gigabytes).
> So the only usage for me would be a larger address space to
> accomodate larger memory-mapped files. But memory-mapped files
> are slow anyway as they don't allow pipelined transfers from
> the disk (except asynchronous read-ahead). An access-facility
> like in a database-system which issues pipelined asynchronous
> operations is much more efficient.
> And have a look at the filesystems: although ZFS data-layout
> allows 128 bit filesystems, its current implementation is
> limited to 64 bit.
>
The idea is to carry meta-data around with the pointer to make
certain operations, particularly with C, less error-prone.

Re: Here come the 128-bit pointers

<ssruhq$9ot$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20212&group=comp.lang.c#20212

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c
Subject: Re: Here come the 128-bit pointers
Date: Wed, 26 Jan 2022 17:57:30 +0100
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <ssruhq$9ot$1@dont-email.me>
References: <RZBHJ.39378$gX.11188@fx40.iad> <sso8kg$82t$1@dont-email.me>
<ssochk$t26$1@dont-email.me> <sspgoj$s5l$1@dont-email.me>
<ssprrc$d8h$1@dont-email.me> <ssr1jb$nqj$1@dont-email.me>
<6ad11052-9d27-4f55-8dd0-4592a8e3229fn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 26 Jan 2022 16:57:31 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="5670789573f5c51d90b95d844dc97427";
logging-data="10013"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/N8Pk4Y4sr8/Ry1osy2j3flqik8hAIrE4="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.5.0
Cancel-Lock: sha1:VmsXOSpWMkpACoRZplFqm/wvSck=
In-Reply-To: <6ad11052-9d27-4f55-8dd0-4592a8e3229fn@googlegroups.com>
Content-Language: de-DE
 by: Bonita Montero - Wed, 26 Jan 2022 16:57 UTC

Am 26.01.2022 um 17:34 schrieb Malcolm McLean:
> On Wednesday, 26 January 2022 at 08:43:35 UTC, Bonita Montero wrote:
>> I don't see any sense in logical or physical 128 bit pointers.
>> Imagine that memory-density could be shrinked up to 100 times,
>> so computers could be equipped with much more memory. But it
>> would be impossible have tolerable access-times with an amount
>> of memory in the upper margin of 64 bit (that's 16 billion
>> gigabytes).
>> So the only usage for me would be a larger address space to
>> accomodate larger memory-mapped files. But memory-mapped files
>> are slow anyway as they don't allow pipelined transfers from
>> the disk (except asynchronous read-ahead). An access-facility
>> like in a database-system which issues pipelined asynchronous
>> operations is much more efficient.
>> And have a look at the filesystems: although ZFS data-layout
>> allows 128 bit filesystems, its current implementation is
>> limited to 64 bit.
>>
> The idea is to carry meta-data around with the pointer to make
> certain operations, particularly with C, less error-prone.

Better avoid C.

Re: Here come the 128-bit pointers

<ssrva7$g8b$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20213&group=comp.lang.c#20213

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (Bart)
Newsgroups: comp.lang.c
Subject: Re: Here come the 128-bit pointers
Date: Wed, 26 Jan 2022 17:10:31 +0000
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <ssrva7$g8b$1@dont-email.me>
References: <RZBHJ.39378$gX.11188@fx40.iad> <sso8kg$82t$1@dont-email.me>
<ssochk$t26$1@dont-email.me> <sspgoj$s5l$1@dont-email.me>
<ssprrc$d8h$1@dont-email.me> <ssr1jb$nqj$1@dont-email.me>
<6ad11052-9d27-4f55-8dd0-4592a8e3229fn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 26 Jan 2022 17:10:31 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="c908c348916be4908411475ff723c0c8";
logging-data="16651"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+OkHrjb0BYLSEQ6xGcUCX5mPc2XdKUV08="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.5.0
Cancel-Lock: sha1:ZtVAYN8A5OYPeJjzf8oKBUqgWZ0=
In-Reply-To: <6ad11052-9d27-4f55-8dd0-4592a8e3229fn@googlegroups.com>
 by: Bart - Wed, 26 Jan 2022 17:10 UTC

On 26/01/2022 16:34, Malcolm McLean wrote:
> On Wednesday, 26 January 2022 at 08:43:35 UTC, Bonita Montero wrote:
>> I don't see any sense in logical or physical 128 bit pointers.
>> Imagine that memory-density could be shrinked up to 100 times,
>> so computers could be equipped with much more memory. But it
>> would be impossible have tolerable access-times with an amount
>> of memory in the upper margin of 64 bit (that's 16 billion
>> gigabytes).
>> So the only usage for me would be a larger address space to
>> accomodate larger memory-mapped files. But memory-mapped files
>> are slow anyway as they don't allow pipelined transfers from
>> the disk (except asynchronous read-ahead). An access-facility
>> like in a database-system which issues pipelined asynchronous
>> operations is much more efficient.
>> And have a look at the filesystems: although ZFS data-layout
>> allows 128 bit filesystems, its current implementation is
>> limited to 64 bit.
>>
> The idea is to carry meta-data around with the pointer to make
> certain operations, particularly with C, less error-prone.

But requiring double the storage for pointers?

People already think that 64-bit pointers are overkill. Most programs
would probably work fine with just 32-bit pointers.

I already have trouble myself because of structs that end up being 64
bytes instead of 32, say, after rounding to a power of two, becauses
they use needlessly large pointers.

A correctly written program, and one using more helpful language
features, should rarely need to validate a pointer. Except for
debugging, but then you can emulate 128 bits in software.

(Also, if the upper 64 bits are accessible from the application, what's
to stop it writing erroneous bounds as well as an erroneous addresss?)

Re: Here come the 128-bit pointers

<ewfIJ.9830$h91.3656@fx48.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20214&group=comp.lang.c#20214

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!aioe.org!feeder1.feed.usenet.farm!feed.usenet.farm!tr3.eu1.usenetexpress.com!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!50.7.236.10.MISMATCH!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx48.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: Here come the 128-bit pointers
Newsgroups: comp.lang.c
References: <RZBHJ.39378$gX.11188@fx40.iad> <sso8kg$82t$1@dont-email.me> <ssochk$t26$1@dont-email.me> <sspgoj$s5l$1@dont-email.me> <ssprrc$d8h$1@dont-email.me> <ssr1jb$nqj$1@dont-email.me> <6ad11052-9d27-4f55-8dd0-4592a8e3229fn@googlegroups.com> <ssrva7$g8b$1@dont-email.me>
Lines: 12
Message-ID: <ewfIJ.9830$h91.3656@fx48.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Wed, 26 Jan 2022 17:27:38 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Wed, 26 Jan 2022 17:27:38 GMT
X-Received-Bytes: 1241
 by: Scott Lurndal - Wed, 26 Jan 2022 17:27 UTC

Bart <bc@freeuk.com> writes:
>On 26/01/2022 16:34, Malcolm McLean wrote:

>> The idea is to carry meta-data around with the pointer to make
>> certain operations, particularly with C, less error-prone.
>
>But requiring double the storage for pointers?
>
>People already think that 64-bit pointers are overkill.

Who are these people, other than you?

Re: Here come the 128-bit pointers

<sss13c$v4n$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20215&group=comp.lang.c#20215

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (Bart)
Newsgroups: comp.lang.c
Subject: Re: Here come the 128-bit pointers
Date: Wed, 26 Jan 2022 17:41:00 +0000
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <sss13c$v4n$1@dont-email.me>
References: <RZBHJ.39378$gX.11188@fx40.iad> <sso8kg$82t$1@dont-email.me>
<ssochk$t26$1@dont-email.me> <sspgoj$s5l$1@dont-email.me>
<ssprrc$d8h$1@dont-email.me> <ssr1jb$nqj$1@dont-email.me>
<6ad11052-9d27-4f55-8dd0-4592a8e3229fn@googlegroups.com>
<ssrva7$g8b$1@dont-email.me> <ewfIJ.9830$h91.3656@fx48.iad>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 26 Jan 2022 17:41:00 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="c908c348916be4908411475ff723c0c8";
logging-data="31895"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX182EvqIAObM18O9C3xUXTEr0Sfi+5GQrdc="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.5.0
Cancel-Lock: sha1:zvNhIkRj54VfDTkUR2U8icS20BY=
In-Reply-To: <ewfIJ.9830$h91.3656@fx48.iad>
 by: Bart - Wed, 26 Jan 2022 17:41 UTC

On 26/01/2022 17:27, Scott Lurndal wrote:
> Bart <bc@freeuk.com> writes:
>> On 26/01/2022 16:34, Malcolm McLean wrote:
>
>>> The idea is to carry meta-data around with the pointer to make
>>> certain operations, particularly with C, less error-prone.
>>
>> But requiring double the storage for pointers?
>>
>> People already think that 64-bit pointers are overkill.
>
> Who are these people, other than you?
>

The people who came up with the x32 ABI for a start.

I also, in my first x64 compiler, kept 32-bit pointers, which worked
great for my own stuff, but unfortunately the 64-bit OS didn't cooperate
as sometimes there were function pointers for shared libraries that
needed more than 32 bits.

Eventually I switched to 64-bit pointers, but my programs also got 5%
slower and used more memory.

Re: Here come the 128-bit pointers

<X3gIJ.31440$%T.12917@fx06.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20216&group=comp.lang.c#20216

  copy link   Newsgroups: comp.lang.c
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!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx06.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: Here come the 128-bit pointers
Newsgroups: comp.lang.c
References: <RZBHJ.39378$gX.11188@fx40.iad> <sso8kg$82t$1@dont-email.me> <ssochk$t26$1@dont-email.me> <sspgoj$s5l$1@dont-email.me> <ssprrc$d8h$1@dont-email.me> <ssr1jb$nqj$1@dont-email.me> <6ad11052-9d27-4f55-8dd0-4592a8e3229fn@googlegroups.com> <ssrva7$g8b$1@dont-email.me> <ewfIJ.9830$h91.3656@fx48.iad> <sss13c$v4n$1@dont-email.me>
Lines: 22
Message-ID: <X3gIJ.31440$%T.12917@fx06.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Wed, 26 Jan 2022 18:05:43 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Wed, 26 Jan 2022 18:05:43 GMT
X-Received-Bytes: 1645
 by: Scott Lurndal - Wed, 26 Jan 2022 18:05 UTC

Bart <bc@freeuk.com> writes:
>On 26/01/2022 17:27, Scott Lurndal wrote:
>> Bart <bc@freeuk.com> writes:
>>> On 26/01/2022 16:34, Malcolm McLean wrote:
>>
>>>> The idea is to carry meta-data around with the pointer to make
>>>> certain operations, particularly with C, less error-prone.
>>>
>>> But requiring double the storage for pointers?
>>>
>>> People already think that 64-bit pointers are overkill.
>>
>> Who are these people, other than you?
>>
>
>The people who came up with the x32 ABI for a start.

My employers have been shipping 64-bit systems for almost 30 years.

I can count on one hand the number of customers that cared
for the 32-bit ABI on a 64-bit processors.

Re: Here come the 128-bit pointers

<sss3is$im9$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20217&group=comp.lang.c#20217

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (Bart)
Newsgroups: comp.lang.c
Subject: Re: Here come the 128-bit pointers
Date: Wed, 26 Jan 2022 18:23:23 +0000
Organization: A noiseless patient Spider
Lines: 31
Message-ID: <sss3is$im9$1@dont-email.me>
References: <RZBHJ.39378$gX.11188@fx40.iad> <sso8kg$82t$1@dont-email.me>
<ssochk$t26$1@dont-email.me> <sspgoj$s5l$1@dont-email.me>
<ssprrc$d8h$1@dont-email.me> <ssr1jb$nqj$1@dont-email.me>
<6ad11052-9d27-4f55-8dd0-4592a8e3229fn@googlegroups.com>
<ssrva7$g8b$1@dont-email.me> <ewfIJ.9830$h91.3656@fx48.iad>
<sss13c$v4n$1@dont-email.me> <X3gIJ.31440$%T.12917@fx06.iad>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 26 Jan 2022 18:23:24 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="c908c348916be4908411475ff723c0c8";
logging-data="19145"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19wt+CJAOBcTolFwbw2iQ+kLXujPPEnHdk="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.5.0
Cancel-Lock: sha1:wdURvsVIoZGxlpiXl33WrFoqrLQ=
In-Reply-To: <X3gIJ.31440$%T.12917@fx06.iad>
 by: Bart - Wed, 26 Jan 2022 18:23 UTC

On 26/01/2022 18:05, Scott Lurndal wrote:
> Bart <bc@freeuk.com> writes:
>> On 26/01/2022 17:27, Scott Lurndal wrote:
>>> Bart <bc@freeuk.com> writes:
>>>> On 26/01/2022 16:34, Malcolm McLean wrote:
>>>
>>>>> The idea is to carry meta-data around with the pointer to make
>>>>> certain operations, particularly with C, less error-prone.
>>>>
>>>> But requiring double the storage for pointers?
>>>>
>>>> People already think that 64-bit pointers are overkill.
>>>
>>> Who are these people, other than you?
>>>
>>
>> The people who came up with the x32 ABI for a start.
>
> My employers have been shipping 64-bit systems for almost 30 years.
>
> I can count on one hand the number of customers that cared
> for the 32-bit ABI on a 64-bit processors.
>

Of /your/ 64-bit customers? Perhaps that not surprising.

But if that x32 ABI means a system that is faster and cheaper (because
it can use a lower spec part or less ram) and maybe uses less power,
then someone is going to be interested, if they want 64-bit registers
and operations, but don't need to address lots of memory.

Re: Here come the 128-bit pointers

<sss4c0$gn5$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20218&group=comp.lang.c#20218

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!aioe.org!299gYy2nqWB43X4cCBV6zg.user.46.165.242.75.POSTED!not-for-mail
From: mate...@xyz.invalid (Mateusz Viste)
Newsgroups: comp.lang.c
Subject: Re: Here come the 128-bit pointers
Date: Wed, 26 Jan 2022 19:36:48 +0100
Organization: . . .
Message-ID: <sss4c0$gn5$1@gioia.aioe.org>
References: <RZBHJ.39378$gX.11188@fx40.iad>
<sso8kg$82t$1@dont-email.me>
<ssochk$t26$1@dont-email.me>
<sspgoj$s5l$1@dont-email.me>
<ssprrc$d8h$1@dont-email.me>
<ssr1jb$nqj$1@dont-email.me>
<6ad11052-9d27-4f55-8dd0-4592a8e3229fn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="17125"; posting-host="299gYy2nqWB43X4cCBV6zg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Notice: Filtered by postfilter v. 0.9.2
 by: Mateusz Viste - Wed, 26 Jan 2022 18:36 UTC

2022-01-26 at 08:34 -0800, Malcolm McLean wrote:
> The idea is to carry meta-data around with the pointer to make
> certain operations, particularly with C, less error-prone.

Perhaps another possible use could be complete address space
randomization, improving existing ASLR techniques.

Mateusz

Pages:12
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor