Skip to content
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

Fix PaX #540

Merged
merged 1 commit into from Feb 20, 2018
Merged

Fix PaX #540

merged 1 commit into from Feb 20, 2018

Conversation

forgottenswitch
Copy link
Contributor

Drop ClosurePool in favor of PaX-compatible libffi functions.

Finished in 2.41 seconds (files took 11.4 seconds to load)
4845 examples, 0 failures

@forgottenswitch
Copy link
Contributor Author

forgottenswitch commented Dec 12, 2016

Verified with

gem uninstall ffi
gem build ffi.gemspec
gem install ./ffi-1.9.14.gem
cd
jekyll new hello_jekyll
cd hello_jekyll
bundle exec jekyll serve
# It works on http://localhost:4000

@forgottenswitch
Copy link
Contributor Author

forgottenswitch commented Dec 13, 2016

Oops, fails on MacOS

@forgottenswitch
Copy link
Contributor Author

forgottenswitch commented Dec 24, 2016

It doesn't rake test with stable libffi 3.2.1, but does with latest master.
Perhaps there should be a 3.2.2 release then?

@tduehr
Copy link
Member

tduehr commented Jan 19, 2017

Thanks, I'll look at this and incorporate some of your changes into the libffi update branch and we'll see what's left after that.

@tduehr
Copy link
Member

tduehr commented Jul 12, 2017

Can you rebase off the current master? Some of this may have been addressed from the ppc64le fixes.

This removes ClosurePool. It has been switching pages protection between
writable and executable, which was making it incompatible with PaX
MPROTECT.

libffi instead leaves its closures (closure trampolines) non-executable,
relying on PaX to recognize and emulate them, which allows it to work
even under such circumstances.

Remove CUSTOM_TRAMPOLINE and USE_RAW to avoid ifdef hassle.
@forgottenswitch
Copy link
Contributor Author

Done.

Feel free to ignore this [and merge anyway], but PaX itself could be patched instead, as being overly-restrictive. Current (incomplete, but sufficient for the case) state:

nhosoi added a commit to nhosoi/origin-aggregated-logging that referenced this pull request Feb 6, 2018
nhosoi added a commit to nhosoi/origin-aggregated-logging that referenced this pull request Feb 6, 2018
@nhosoi nhosoi mentioned this pull request Feb 12, 2018
@headius headius merged commit cf10854 into ffi:master Feb 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants