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

src: refine maps parsing for large pages #29973

Conversation

@gabrielschulhof
Copy link
Contributor

gabrielschulhof commented Oct 14, 2019

Multiple sections may be marked as "r-xp" and with the executable's
path. We use the location of the __nodetext symbol added by the linker
script to ensure that the range we retrieve from the maps file does
indeed contain the Node.js text section.

Thanks to @suresh-srinivas!

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
@devnexen

This comment has been minimized.

Copy link
Contributor

devnexen commented Oct 14, 2019

nit: I would make clearer it is Linux even though map implies means /proc reading but no forcing here :-)

src/large_pages/node_large_page.cc Outdated Show resolved Hide resolved
src/large_pages/node_large_page.cc Outdated Show resolved Hide resolved
Multiple sections may be marked as "r-xp" and with the executable's
path. We use the location of the `__nodetext` symbol added by the linker
script to ensure that the range we retrieve from the maps file does
indeed contain the Node.js text section.

Thanks to Suresh Srinivas <suresh.srinivas@intel.com>!
@gabrielschulhof gabrielschulhof force-pushed the gabrielschulhof:fix-largepages-section-misread branch from 4937566 to ecea44c Oct 15, 2019
@gabrielschulhof

This comment has been minimized.

Copy link
Contributor Author

gabrielschulhof commented Oct 15, 2019

@bnoordhuis I fixed the comparison and moved the whole thing to uintptr_t.

@nodejs-github-bot

This comment has been minimized.

@Trott Trott added the author ready label Oct 16, 2019
gabrielschulhof added a commit that referenced this pull request Oct 16, 2019
Multiple sections may be marked as "r-xp" and with the executable's
path. We use the location of the `__nodetext` symbol added by the linker
script to ensure that the range we retrieve from the maps file does
indeed contain the Node.js text section.

Thanks to Suresh Srinivas <suresh.srinivas@intel.com>!

PR-URL: #29973
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
@gabrielschulhof

This comment has been minimized.

Copy link
Contributor Author

gabrielschulhof commented Oct 16, 2019

Landed in 1599aeb.

@gabrielschulhof gabrielschulhof deleted the gabrielschulhof:fix-largepages-section-misread branch Oct 16, 2019
MylesBorins added a commit that referenced this pull request Oct 23, 2019
Multiple sections may be marked as "r-xp" and with the executable's
path. We use the location of the `__nodetext` symbol added by the linker
script to ensure that the range we retrieve from the maps file does
indeed contain the Node.js text section.

Thanks to Suresh Srinivas <suresh.srinivas@intel.com>!

PR-URL: #29973
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
MylesBorins added a commit that referenced this pull request Oct 23, 2019
Multiple sections may be marked as "r-xp" and with the executable's
path. We use the location of the `__nodetext` symbol added by the linker
script to ensure that the range we retrieve from the maps file does
indeed contain the Node.js text section.

Thanks to Suresh Srinivas <suresh.srinivas@intel.com>!

PR-URL: #29973
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Oct 23, 2019
@gabrielschulhof

This comment has been minimized.

Copy link
Contributor Author

gabrielschulhof commented Nov 1, 2019

@BethGriggs currently this patch applies cleanly to v12.x-staging after the previous patch (#29914). May it please be backported?

@targos targos removed the lts-watch-v12.x label Nov 8, 2019
targos added a commit that referenced this pull request Nov 8, 2019
Multiple sections may be marked as "r-xp" and with the executable's
path. We use the location of the `__nodetext` symbol added by the linker
script to ensure that the range we retrieve from the maps file does
indeed contain the Node.js text section.

Thanks to Suresh Srinivas <suresh.srinivas@intel.com>!

PR-URL: #29973
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
targos added a commit that referenced this pull request Nov 10, 2019
Multiple sections may be marked as "r-xp" and with the executable's
path. We use the location of the `__nodetext` symbol added by the linker
script to ensure that the range we retrieve from the maps file does
indeed contain the Node.js text section.

Thanks to Suresh Srinivas <suresh.srinivas@intel.com>!

PR-URL: #29973
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.