Earlier quoted context omitted.
MacOS on the M1 processor is the first to use, and require, the W^X bit in memory, meaning that pages of memory are either writable, or can be executed from, but not both. MIT Scheme's front page says this is fundamentally incompatible with their design, and therefore it won't build. When running in the emulator, this requirement would be relaxed for compatibility reasons. There is an escape hatch for writing JIT com…
Wow really? A common intro to security exercise (think CTFs and university courses) is to write increasingly complicated C programs that leverage W&X. Classic buffer overflow into the stack kind of stuff. On M1 it’s now impossible to exploit even a self-compiled toy in this way?
MIT Scheme on Apple Silicon
31–40 of 87 posts
Re: MIT Scheme on Apple Silicon
#32Earlier quoted context omitted.
MacOS on the M1 processor is the first to use, and require, the W^X bit in memory, meaning that pages of memory are either writable, or can be executed from, but not both. MIT Scheme's front page says this is fundamentally incompatible with their design, and therefore it won't build. When running in the emulator, this requirement would be relaxed for compatibility reasons. There is an escape hatch for writing JIT com…
Wow really? A common intro to security exercise (think CTFs and university courses) is to write increasingly complicated C programs that leverage W&X. Classic buffer overflow into the stack kind of stuff. On M1 it’s now impossible to exploit even a self-compiled toy in this way?
I know at least OpenBSD also enforces W^X protection universally, anyone else? I know Linux can with the right SELinux policies, but not sure any distro ships with those by default.
Re: MIT Scheme on Apple Silicon
#33Earlier quoted context omitted.
I'm comfortable making that distinction. JavaScript isn't executed like normal, native code, so... I still agree.
When the majority of programs in the world can't be "run" according to your definition, you might want to reconsider your definition.
Re: MIT Scheme on Apple Silicon
#34What's stopping people from just compiling Scheme for ARM? The website has a separate aarch64 download it seems, so why not patch that instead of relying on Rosetta2? The vfork/fork issue and the compiler upgrade issue don't seem to be too problematic to work around, so there must be some kind of ARM limitation that's preventing Scheme from working, but what?
MacOS on the M1 processor is the first to use, and require, the W^X bit in memory, meaning that pages of memory are either writable, or can be executed from, but not both. MIT Scheme's front page says this is fundamentally incompatible with their design, and therefore it won't build. When running in the emulator, this requirement would be relaxed for compatibility reasons. There is an escape hatch for writing JIT com…
I suppose the wait is on for someone to rewrite the JIT engine to be compatible with Apple's implementation of ARM.
Re: MIT Scheme on Apple Silicon
#35Earlier quoted context omitted.
Wow really? A common intro to security exercise (think CTFs and university courses) is to write increasingly complicated C programs that leverage W&X. Classic buffer overflow into the stack kind of stuff. On M1 it’s now impossible to exploit even a self-compiled toy in this way?
Basically, yeah. In addition, the usual way to bypass W^X memory, using ROP chains, is also mitigated by the pointer authentication the M1 implements. It's not bullet proof, but it prevents most of the old exploit methods from working at all. You'd need to throw up a VM on an M1 Mac to learn much this way (although that'd be ideal anyway, to get an environment without other protections like ASLR) I know at least Open…
There's a per program exception list to handle legacy programs though.
Re: MIT Scheme on Apple Silicon
#36Re: MIT Scheme on Apple Silicon
#37Earlier quoted context omitted.
It's also a bit disingenuous to say it's "on Apple Silicon" when you're running it through a translation layer that won't exist in a few year's time. I'd wager the reason why the GNU folks say it doesn't run on ARM is because... it doesn't. Running it as an x86 program is mandatory, apparently.
Well they do say that they need rosetta just to compile, that once compiled it "works", though I agree it's still too shallow of an article.
Re: MIT Scheme on Apple Silicon
#38Earlier quoted context omitted.
Looks like QuickTransit was a jit engine which was the base of Rosetta 1. Rosetta 2 is AOT translation.
They’re both based on QuickTransit, but Rosetta 2 has an AOT mode as well as JIT. I’m sure the R2 engine is more advanced than the original engine, Apple employed several engineers from the original team, but it still uses and is based on licensed tech.
Even the company that made QuickTransit is gone now, having been bought out by IBM a decade ago.
Re: MIT Scheme on Apple Silicon
#39Earlier quoted context omitted.
They’re both based on QuickTransit, but Rosetta 2 has an AOT mode as well as JIT. I’m sure the R2 engine is more advanced than the original engine, Apple employed several engineers from the original team, but it still uses and is based on licensed tech.
My understanding is that Rosetta 2 is based on LLVM. Even the company that made QuickTransit is gone now, having been bought out by IBM a decade ago.