!OqhvaDMJdKYUicLDiE:nixos.org

Nixpkgs Stdenv

228 Members
74 Servers

Load older messages


SenderMessageTime
20 Nov 2024
@truby:matrix.orgtruby joined the room.21:08:45
21 Nov 2024
@rosscomputerguy:matrix.orgTristan Rosshttps://github.com/NixOS/nixpkgs/pull/348192 might be good for someone to look at this, I'll fix the conflicts soon.15:00:17
22 Nov 2024
@numinit:matrix.orgMorgan (@numinit) joined the room.17:50:23
23 Nov 2024
@rosscomputerguy:matrix.orgTristan Rosshttps://github.com/NixOS/nixpkgs/pull/335023 anyone around to look at this? I kinda want to use an LLVM kernel but this PR is blocking that.05:30:46
@emilazy:matrix.orgemily while I like the end result, I'm also sceptical of the as32bit/as64bit thing. like is there any AArch64 hardware that implements ARMv5? some of these don't make sense to couple to me 05:33:29
@emilazy:matrix.orgemilylike why does it condition on just cross-bit size when presumably the same problems would apply to other cross scenarios?05:33:47
@emilazy:matrix.orgemilyAFAICT cross shouldn't care if the build and host architectures are "similar" ISAs05:34:31
@rosscomputerguy:matrix.orgTristan Ross
In reply to @emilazy:matrix.org
while I like the end result, I'm also sceptical of the as32bit/as64bit thing. like is there any AArch64 hardware that implements ARMv5? some of these don't make sense to couple to me
I'm not sure.
05:34:35
@emilazy:matrix.orgemilythey should be independent05:34:36
@emilazy:matrix.orgemilyI think what you really want is https://github.com/NixOS/nixpkgs/pull/354622.05:34:54
@rosscomputerguy:matrix.orgTristan RossThe problem is I needed a way to figure out it was compiling for 32-bit or 64-bit05:35:22
@rosscomputerguy:matrix.orgTristan RossAnd then apply the specific hardening options which are applicable05:35:34
@rosscomputerguy:matrix.orgTristan Ross
In reply to @emilazy:matrix.org
I think what you really want is https://github.com/NixOS/nixpkgs/pull/354622.
I'm kinda skeptical if that does fix the problem, would it remove incompatible hardening options when cc-wrapper is compiling a 32-bit object with a 64-bit stdenv?
05:36:48
@emilazy:matrix.orgemilyit would completely separate host and build hardening flags05:37:03
@emilazy:matrix.orgemilywhy would incompatible hardening flags be getting set at all?05:37:11
@emilazy:matrix.orgemilyonly due to build–host–target confusion05:37:18
@emilazy:matrix.orgemilyseparating them out fully is the solution, not hacking around it by trying to filter things out after the fact05:37:28
@rosscomputerguy:matrix.orgTristan Ross

As the title says, this disables incompatible hardening options when cross compiling between the same ISA but different bit size. This prevents the issue of the zerocallregs hardening option from being used when using clang to build Linux and Linux is building for aarch64 but builds vdso32.

From my PR

05:37:35
@rosscomputerguy:matrix.orgTristan Rosszerocallregs isn't supported in 32-bit but it is in 64-bit05:37:58
@rosscomputerguy:matrix.orgTristan Rossvdso32 is compiled as 32-bit05:38:07
@emilazy:matrix.orgemilyyes but we only set hardening flags that are meant to be supported by the platform05:38:16
@emilazy:matrix.orgemilyit's just that we don't mangle them properly05:38:20
@emilazy:matrix.orgemilyif the issue is invoking wrappers designed for AArch64 but feeding them 32-bit ARM code that's just a general problem of wrappers assuming one specific architecture05:38:53
@emilazy:matrix.orgemilyusing an unwrapped compiler probably makes more sense for that05:39:01
@emilazy:matrix.orgemilyespecially with LLVM05:39:17
@rosscomputerguy:matrix.orgTristan RossUsing an unwrapped compiler doesn't feel optimal, what if something needed to output 32-bit code on a 64-bit system but required libc or other stuff which the cc-wrapper needs.05:40:40
@emilazy:matrix.orgemilythat won't work anyway because it'll be the 64-bit libc…05:40:57
@emilazy:matrix.orgemilyso in that case you need another wrapper05:41:07
@emilazy:matrix.orgemilyand rewrapping compilers is more of a pain than it ought to be right now, but that's a separate issue05:41:18
@rosscomputerguy:matrix.orgTristan RossThe other option is we just don't do any kernel hardening lol05:42:21

Show newer messages


Back to Room ListRoom Version: 9