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

glibc, ghc: disable PIE hardening when enabled by default (musl for now :)) #50426

Merged
merged 2 commits into from
Nov 16, 2018

Conversation

dtzWill
Copy link
Member

@dtzWill dtzWill commented Nov 15, 2018

Motivation for this change

Unbreak after well-intentioned (and IMO the right direct long-term anyway) change
enabling PIE by default when using musl.

Still testing that this fixes GHC, currently the build is past where it failed before
but until it finishes who can say ;).

This fixes GHC! :)

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@dtzWill
Copy link
Member Author

dtzWill commented Nov 15, 2018

cc #49704 😁

@GrahamcOfBorg GrahamcOfBorg added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Nov 15, 2018
@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: ghc, glibc

Partial log (click to expand)

these paths will be fetched (113.60 MiB download, 1527.56 MiB unpacked):
  /nix/store/b2g750gih0drp1vb68x2si91iwmxqp5c-ghc-8.4.4-doc
  /nix/store/s9a8h6qqdmignsqphir5jyllr5ivf0p3-ghc-8.4.4
copying path '/nix/store/b2g750gih0drp1vb68x2si91iwmxqp5c-ghc-8.4.4-doc' from 'https://nix-cache.s3.amazonaws.com'...
copying path '/nix/store/s9a8h6qqdmignsqphir5jyllr5ivf0p3-ghc-8.4.4' from 'https://nix-cache.s3.amazonaws.com'...
/nix/store/s9a8h6qqdmignsqphir5jyllr5ivf0p3-ghc-8.4.4
/nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: ghc

The following builds were skipped because they don't evaluate on x86_64-darwin: glibc

Partial log (click to expand)

  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


these paths will be fetched (115.65 MiB download, 1288.21 MiB unpacked):
  /nix/store/dxljd69cp3m5cgfl53h0fjbq202m0fm7-ghc-8.4.4
  /nix/store/hyfz6w4rnw2562il2hx9niv1vjlnbsc8-ghc-8.4.4-doc
copying path '/nix/store/hyfz6w4rnw2562il2hx9niv1vjlnbsc8-ghc-8.4.4-doc' from 'https://cache.nixos.org'...
copying path '/nix/store/dxljd69cp3m5cgfl53h0fjbq202m0fm7-ghc-8.4.4' from 'https://cache.nixos.org'...
/nix/store/dxljd69cp3m5cgfl53h0fjbq202m0fm7-ghc-8.4.4

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: ghc, glibc

Partial log (click to expand)

        padLiveArgs -- i > regNum ??
CallStack (from HasCallStack):
  error, called at compiler/llvmGen/LlvmCodeGen/Base.hs:194:27 in ghc:LlvmCodeGen.Base

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

make[1]: *** [rts/ghc.mk:295: rts/dist/build/HeapStackCheck.o] Error 1
make: *** [Makefile:127: all] Error 2
builder for '/nix/store/q8naayl1j87njk2cj4ylrn8pxq13jxrn-ghc-8.4.4.drv' failed with exit code 2
error: build of '/nix/store/q8naayl1j87njk2cj4ylrn8pxq13jxrn-ghc-8.4.4.drv' failed

@dtzWill
Copy link
Member Author

dtzWill commented Nov 16, 2018

Attempting to build anything in the first place suggests aarch64 failure is unrelated/pre-existing. This shouldn't trigger any new builds for non-musl.

@dtzWill dtzWill merged commit db0abe9 into NixOS:master Nov 16, 2018
@dtzWill dtzWill deleted the fix/disable-pie-in-few-more-places branch November 16, 2018 03:55
@nh2
Copy link
Contributor

nh2 commented Jul 4, 2021

Related problem with writeup: #129247 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: haskell 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants