-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document kernel settings to run SheepShaver in Linux somewhere obvious #135
Comments
Thanks for contributing this. Is this something that works in CI but fails locally? To say it another way, does the CI config need to be updated in some way to expose this issue? |
This is a setting that has to be set on the local machine where the the software is used, it has nothing to do with building. |
I've edited the issue a bit to try to clarify that. |
If I'm understanding this correctly, you're talking about the proper way to run SheepShaver after it is already built |
Yes, that's correct. |
I highly recommend not messing with vm.mmap_min_addr or encouraging others to do so. It is the way it is for good reason. Compile with --enable-addressing=direct instead. Linux, FreeBSD and probably every other unix OS are moving towards making real addressing impossible going forwards, as it is a security risk. We should really change the default SheepShaver build to use direct addressing. |
Note that if you change the default addressing mode, for arches and compiler versions where the default is to build the JIT using pregenerated stuff, you'll want to reroll the pregenerated stuff to match the new addressing mode (which to some degree is an archaeology project for the taking AFAICT - see cebix/macemu#222) or at least make JIT not the default in the meantime. |
It'd be better to comment on my PR if you want me to change it. :) |
Oh, there was no PR on the issue when I opened the page. :D I'm surprised you got that far without running into a problem? |
I'm able to boot my System 7.6.1 CD in SheepShaver and get the "Welcome to Mac OS" screen, but then it segfaults. I haven't used SheepShaver in ages so I don't know if this ever worked though. I'm going to go find a Mac OS 8.6 CD and see if that works. |
idk what kind of shape this fork is in, but SheepShaver has historically worked with 7.6.1. |
That's the question then. Has SheepShaver ever worked for anyone in this branch? :) |
Testing real addressing JIT builds of 28f61bf on Linux VMs I have handy with Mac OS 7.6.1 installs: Did you maybe land on the non-working combination by sheer chance? |
For more background, that's with the 7200/7500/8500/9500 v1 ROM, the one with Apple checksum 96CD923D |
Moving the discussion to the PR since I see you also commented there |
To run SheepShaver in Linux, one that was made with the default
configure
addressing setting, requires changing the kernel settingvm.mmap_min_addr
to 0.Otherwise you get an error like:
$ SheepShaver
Cannot map Low Memory Globals: Operation not permitted.
It would be nice if this was documented somewhere obvious like the readme.
You can set the setting by echoing 0 to
/proc/sys/vm/mmap_min_addr
as root, or doingsudo sysctl -w vm.mmap_min_addr=0
and you can make it happen automatically at startup by putting
vm.mmap_min_addr = 0
into
/etc/sysctl.d/whatever.conf
Edit:
The kernel null deref protection afforded by mmap minimum address enforcement has defense in depth value. If we can make some working build other than a real addressing build be the default
configure
option, great.This issue is just a practical matter: while real addressing is still the default
configure
option, without instructions, users encounter the error message and show up in the issue tracker for support.The text was updated successfully, but these errors were encountered: