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

Alternative fix to #6468 #6475

Closed
wants to merge 2 commits into from
Closed

Conversation

indutny
Copy link
Member

@indutny indutny commented Apr 29, 2016

Checklist
  • tests and code linting passes
  • a test and/or benchmark is included
  • documentation is changed or added
  • the commit message follows commit guidelines
Affected core subsystem(s)

deps

Description of change

Note: this PR should not be landed until this patch will be upstreamed to the v8's trunk.

Here I propose, instead of turning off ASLR at either runtime or compile-time, export the ASLR slide in the profile data and parse it to resolve the symbols during --prof-process.

Fix: #6466

@nodejs-github-bot nodejs-github-bot added the v8 engine Issues and PRs related to the V8 dependency. label Apr 29, 2016
@indutny
Copy link
Member Author

indutny commented Apr 29, 2016

cc @bnoordhuis

@indutny
Copy link
Member Author

indutny commented Apr 29, 2016

@jasnell jasnell added the wip Issues and PRs that are still a work in progress. label Apr 29, 2016
@indutny indutny added macos Issues and PRs related to the macOS platform / OSX. security Issues and PRs related to security. labels Apr 29, 2016
@ofrobots
Copy link
Contributor

@indutny I like this approach. Can you propose this upstream?

@indutny
Copy link
Member Author

indutny commented Apr 29, 2016

msg.Append("shared-library,\"%s\",0x%08" V8PRIxPTR ",0x%08" V8PRIxPTR,
library_path.c_str(), start, end);
msg.Append("shared-library,\"%s\",0x%08" V8PRIxPTR ",0x%08" V8PRIxPTR
",0x%08" V8PRIxPTR,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should probably print the slide as a signed base 10 number because it can be < 0. For that matter, the code should really be updated to use intptr_t because that's what _dyld_get_image_vmaddr_slide() returns.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any pros of using unsigned int and base 10 here? I like how things may work both ways here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, may I ask you to raise this concern on CL page?

@bnoordhuis
Copy link
Member

Left a comment. The approach in general looks fine to me.

@indutny
Copy link
Member Author

indutny commented May 2, 2016

CL has just landed. Guess we should revisit this when it will gets to us with a v8 upgrade.

@indutny indutny mentioned this pull request May 4, 2016
2 tasks
@indutny
Copy link
Member Author

indutny commented May 4, 2016

Superseded by #6558

@indutny indutny closed this May 4, 2016
@indutny indutny deleted the feature/alt-gh-6466 branch May 4, 2016 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
macos Issues and PRs related to the macOS platform / OSX. security Issues and PRs related to security. v8 engine Issues and PRs related to the V8 dependency. wip Issues and PRs that are still a work in progress.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

os x: re-enable PIE (ASLR)
6 participants