Unix, C, int-32-bits and... hardware architecture assumptions

74 views
Skip to first unread message

sur-behoffski

unread,
Jul 31, 2026, 1:16:00 AM (14 days ago) Jul 31
to lua-l
G'day,

UNIX and C grew up together, on a PDP-11 system. In particular,
types became especially important when a floating-point processor
became available.

In the modern world, with "GNU/Linux" becoming more prominent
than "UNIX" (with POSIX in there as well), the compiler and OS
libraries have become more carefully defined.

The real world has moved away, quite considerably, from the naive
model of the PDP-11 hardware.

There's a keynote address from USENIX ATC '21, that shows how
e.g. "QualPwn" can exploit this: A malicious wi-fi packet can
potentially gain access to all of system memory via the SMMU
of the wi-fi connection, bypassing any other MMU infrastructure:

"USENIX ATC '21/OSDI '21 Joint Keynote Address-It's Time
for Operating Systems to Rediscover Hardware
[36myc8wQhLo].webm"

(Presenter: Prof.(CS) Timothy Roscoe, ETH Zurich.)

The address gives a number of other examples where the naive view
does not match real-world reality... and ways in which they're
building hardware to address issues (e.g. a server-like board that
runs several hundreds-of-thousands of lines of code, before the
CPU comes out of reset).

The video is quite comprehensive, at about an hour long.

----

In some ways, this reference is tangential to the very recent
discussion about 32-bit int shifts, C89, POSIX and C99.
However, I believe that Lua, especially because of its small
footprint and being attractive to embedded-systems applications,
is slowly growing into more such situations. (Adoption of
64-bit integers is one "recent" example of this.)

I believe that the "semi-static" MCU MRAM discussion is another
example of where the OS/Kernel and Lua are gradually
overlapping.

Hope this helps, s-b etc.

Paul Merrell

unread,
Jul 31, 2026, 1:48:23 AM (14 days ago) Jul 31
to lu...@googlegroups.com
On Thu, Jul 30, 2026 at 10:16 PM sur-behoffski <sur-be...@grouse.com.au> wrote:
 
There's a keynote address from USENIX ATC '21, that shows how
e.g. "QualPwn" can exploit this:  A malicious wi-fi packet can
potentially gain access to all of system memory via the SMMU
of the wi-fi connection, bypassing any other MMU infrastructure:

        "USENIX ATC '21/OSDI '21 Joint Keynote Address-It's Time
        for Operating Systems to Rediscover Hardware
        [36myc8wQhLo].webm"

        (Presenter: Prof.(CS) Timothy Roscoe, ETH Zurich.)

Sainan

unread,
Jul 31, 2026, 2:16:29 AM (14 days ago) Jul 31
to lu...@googlegroups.com
That's an awful lot of text just to not have a point.

-- Sainan

Roberto Ierusalimschy

unread,
Jul 31, 2026, 10:00:06 AM (13 days ago) Jul 31
to 'Sainan' via lua-l
> That's an awful lot of text just to not have a point.

Let us try to keep the Thumperian Principle in this list (and in life
in general :-).

Thanks,

-- Roberto

sur-behoffski

unread,
Jul 31, 2026, 10:45:17 PM (13 days ago) Jul 31
to lu...@googlegroups.com
On 2026-07-31 23:30, Roberto Ierusalimschy wrote:
>> 'Sainan' wrote:
>> That's an awful lot of text just to not have a point.
> Let us try to keep the Thumperian Principle in this list (and in life
> in general :-). [...]
Apologies for any offense. 'Nuff said. s-b
Reply all
Reply to author
Forward
0 new messages