Uh oh!
There was an error while loading. Please reload this page.
Add relro-level tests - #48388
Conversation
rust-highfive
commented
Feb 20, 2018
(rust_highfive has picked a reviewer for you, use r? to override) |
nikomatsakis
commented
Feb 21, 2018
This is basically a stabilization. Is there a tracking issue for this feature? |
nikomatsakis
commented
Feb 21, 2018
I know nothing about this, so it's hard for me to judge if we are happy enough with its implementation to be ready to stabilize. =) cc @rust-lang/compiler |
No tracking issue. This is essentially just a flag to be able to disable RELRO, or use only partial RELRO. Full RELRO has been on by default as of #43170 being merged, but @alexcrichton wanted the flag to disable it to stay unstable for a while at the time. |
nikomatsakis
commented
Feb 21, 2018
Ok. Usually for a stabilization I like to see a little report that shows the test cases that show that this feature is indeed working as expected -- based on the the diffs in this PR, I take it that there are no tests at all for this (i.e., nothing had to be changed from |
kyrias
commented
Feb 21, 2018
Not really sure how to test this from rust honestly. To actually check that it is functioning properly we'd essentially need to actually do a compile and then parse the ELF binary and check for the |
nikomatsakis
commented
Feb 21, 2018
@kyrias usually we would make a |
nikomatsakis
commented
Feb 21, 2018
Maybe it's not worth the trouble, I don't know, but I am a big believer in "if it ain't tested, it's broken". |
kyrias
commented
Feb 22, 2018
Interesting, didn't know about Is there any specific list of dependencies that are guaranteed to exist when they're run? |
kyrias
commented
Feb 22, 2018
So I figured that when you specify Since this is a very small change I just added it in this PR, but if you would prefer I can split it out and file a PR for it separately. |
bors
commented
Feb 25, 2018
☔ The latest upstream changes (presumably #48531) made this pull request unmergeable. Please resolve the merge conflicts. |
alexcrichton
commented
Feb 26, 2018
Thanks @kyrias! For stabilizatin purposes could you also detail a bit what your plans are with the stable flag? I'm realizing now that we don't have a ton of specific paltform-specific options stabilized in the sense that |
emilyalbini
commented
Mar 5, 2018
Hi @kyrias, ping from the release team! @alexcrichton asked you more details about the stabilization in #48388 (comment), can you please reply so we can move forward with this PR? |
Hey, sorry for the delay, been away for a week. Now that I think about it I don't really have any specific plans for it, I just thought that it can be useful to be able to disable it in some rare circumstances. Since the executables end up being slightly bigger, disabling RELRO can be useful for extremely low memory targets. (And BIND_NOW additionally causes some performance impact as it has to resolve all symbols at load time, even if there is a large number of symbols that end up not being used.) But other than that I guess there aren't anything in specific I can think off. |
alexcrichton
commented
Mar 6, 2018
Ah ok thanks for the info @kyrias! In that case I wonder if it's best left unstable for now? That way it's there to tinker with if necessary but otherwise we may want to hold out as it may inform how we stabilize this. |
kyrias
commented
Mar 6, 2018
Yeah, might make sense until the problems become more real. I think I'm mostly just bothered by the fact that Anyway, I could drop the move of the option and just keep the tests and the |
alexcrichton
commented
Mar 6, 2018
Sounds great to me! |
Previously relro-level=off would just not tell the linker to use RELRO, but when you want to disable RELRO you most likely want to entirely prevent. Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
alexcrichton
commented
Mar 9, 2018
@bors: r+ |
bors
commented
Mar 9, 2018
📌 Commit 1dbce4b has been approved by |
bors
commented
Mar 9, 2018
⌛ Testing commit 1dbce4b with merge 7f6687d357f136197ea8285137bfddb7cd99c231... |
bors
commented
Mar 9, 2018
💔 Test failed - status-travis |
emilyalbini
commented
Mar 9, 2018
bors
commented
Mar 10, 2018
⌛ Testing commit 1dbce4b with merge 211c155e8eb32ad9e147edf35471e6a2c73c30b5... |
bors
commented
Mar 10, 2018
💔 Test failed - status-travis |
kennytm
commented
Mar 10, 2018
bors
commented
Mar 10, 2018
Add relro-level tests The `relro-level` debugging flag was added in #43170 which was merged in July 2017. This PR moves this flag to be a proper codegen flag.
bors
commented
Mar 10, 2018
☀️ Test successful - status-appveyor, status-travis |
The
relro-leveldebugging flag was added in #43170 which was merged in July 2017. This PR moves this flag to be a proper codegen flag.