[OpenSmalltalk/opensmalltalk-vm] replace valloc() with mmap() when allocating executable pages for cal… (#299)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[OpenSmalltalk/opensmalltalk-vm] replace valloc() with mmap() when allocating executable pages for cal… (#299)

David T Lewis
 

…lbacks

Under linux, if SELinux is enabled (i.e. not permisive or disabled), then
the heap memory allocated with vmalloc() and marked as executable with mprotect()
will fail. In order to have this work with SELinux enabled (and not providing
a module policy file to allow execheap) mmap() should be used.

Note, it might be possible to remove the stdlib.h and sys/mman.h header
file references.

See: http://lists.squeakfoundation.org/pipermail/vm-dev/2018-October/029102.html


You can view, comment on, or merge this pull request online at:

  https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/299

Commit Summary

  • replace valloc() with mmap() when allocating executable pages for callbacks

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/OpenSmalltalk/opensmalltalk-vm","title":"OpenSmalltalk/opensmalltalk-vm","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"replace valloc() with mmap() when allocating executable pages for cal… (#299)"}],"action":{"name":"View Pull Request","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/299"}}}</script> <script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/299", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/299", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } }, { "@type": "MessageCard", "@context": "http://schema.org/extensions", "hideOriginalBody": "false", "originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB", "title": "replace valloc() with mmap() when allocating executable pages for cal… (#299)", "sections": [ { "text": "", "activityTitle": "**bwestergaard**", "activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png", "activitySubtitle": "@bwestergaard", "facts": [ ] }, { "title": "Commit Summary", "facts": [ { "name": "8c4b25a", "value": "replace valloc() with mmap() when allocating executable pages for callbacks" } ] }, { "title": "File Changes", "facts": [ { "name": "Modified", "value": "[platforms/Cross/plugins/IA32ABI/ia32abicc.c](https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/299/files#diff-0) (7 changes)" }, { "name": "Modified", "value": "[platforms/Cross/plugins/IA32ABI/x64sysvabicc.c](https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/299/files#diff-1) (7 changes)" } ] } ], "potentialAction": [ { "name": "Add a comment", "@type": "ActionCard", "inputs": [ { "isMultiLine": true, "@type": "TextInput", "id": "IssueComment", "isRequired": false } ], "actions": [ { "name": "Comment", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"OpenSmalltalk/opensmalltalk-vm\",\n\"issueId\": 299,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}" } ] }, { "name": "Close pull request", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"PullRequestClose\",\n\"repositoryFullName\": \"OpenSmalltalk/opensmalltalk-vm\",\n\"pullRequestId\": 299\n}" }, { "targets": [ { "os": "default", "uri": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/299" } ], "@type": "OpenUri", "name": "View on GitHub" }, { "targets": [ { "os": "default", "uri": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/299.patch" } ], "@type": "OpenUri", "name": "View patch" }, { "targets": [ { "os": "default", "uri": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/299.diff" } ], "@type": "OpenUri", "name": "View diff" }, { "name": "Unsubscribe", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 403274887\n}" } ], "themeColor": "26292E" } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] replace valloc() with mmap() when allocating executable pages for cal… (#299)

David T Lewis
 

Bob, could you add a comment in front of the mmap call that says this is equivalent to valloc but that it doesn't work on the version of selinux that gave the grief?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/OpenSmalltalk/opensmalltalk-vm","title":"OpenSmalltalk/opensmalltalk-vm","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm"}},"updates":{"snippets":[{"icon":"PERSON","message":"@eliotmiranda in #299: Bob, could you add a comment in front of the mmap call that says this is equivalent to valloc but that it doesn't work on the version of selinux that gave the grief?"}],"action":{"name":"View Pull Request","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/299#issuecomment-434490154"}}}</script> <script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/299#issuecomment-434490154", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/299#issuecomment-434490154", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } }, { "@type": "MessageCard", "@context": "http://schema.org/extensions", "hideOriginalBody": "false", "originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB", "title": "Re: [OpenSmalltalk/opensmalltalk-vm] replace valloc() with mmap() when allocating executable pages for cal… (#299)", "sections": [ { "text": "", "activityTitle": "**Eliot Miranda**", "activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png", "activitySubtitle": "@eliotmiranda", "facts": [ ] } ], "potentialAction": [ { "name": "Add a comment", "@type": "ActionCard", "inputs": [ { "isMultiLine": true, "@type": "TextInput", "id": "IssueComment", "isRequired": false } ], "actions": [ { "name": "Comment", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"OpenSmalltalk/opensmalltalk-vm\",\n\"issueId\": 299,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}" } ] }, { "name": "Close pull request", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"PullRequestClose\",\n\"repositoryFullName\": \"OpenSmalltalk/opensmalltalk-vm\",\n\"pullRequestId\": 299\n}" }, { "targets": [ { "os": "default", "uri": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/299#issuecomment-434490154" } ], "@type": "OpenUri", "name": "View on GitHub" }, { "name": "Unsubscribe", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 403274887\n}" } ], "themeColor": "26292E" } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] replace valloc() with mmap() when allocating executable pages for cal… (#299)

David T Lewis
In reply to this post by David T Lewis
 

Merged #299 into Cog.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/OpenSmalltalk/opensmalltalk-vm","title":"OpenSmalltalk/opensmalltalk-vm","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"Merged #299 into Cog."}],"action":{"name":"View Pull Request","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/299#event-1938681798"}}}</script> <script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/299#event-1938681798", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/299#event-1938681798", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } }, { "@type": "MessageCard", "@context": "http://schema.org/extensions", "hideOriginalBody": "false", "originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB", "title": "Re: [OpenSmalltalk/opensmalltalk-vm] replace valloc() with mmap() when allocating executable pages for cal… (#299)", "sections": [ { "text": "", "activityTitle": "**Eliot Miranda**", "activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png", "activitySubtitle": "@eliotmiranda", "facts": [ ] } ], "potentialAction": [ { "targets": [ { "os": "default", "uri": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/299#event-1938681798" } ], "@type": "OpenUri", "name": "View on GitHub" }, { "name": "Unsubscribe", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 403274887\n}" } ], "themeColor": "26292E" } ]</script>