| 13 Jan 2023 |
Mic92 | https://github.com/NixOS/nixpkgs/pull/210505 | 09:23:26 |
| @oxalica:matrix.org invited @dramforever:matrix.org. | 16:46:40 |
| @dramforever:matrix.org joined the room. | 16:47:50 |
| 15 Jan 2023 |
| @nickcao:nichi.co joined the room. | 11:33:03 |
@nickcao:nichi.co | Found a regression in systemd/luks: https://hydra.nixos.org/build/205397537 | 11:33:52 |
@nickcao:nichi.co | The offending code is from systemd: src/shared/tpm2-util.c | 11:34:25 |
@nickcao:nichi.co | fn = strjoina("libtss2-tcti-", driver, ".so.0");
/* Better safe than sorry, let's refuse strings that cannot possibly be valid driver early, before going to disk. */
if (!filename_is_valid(fn))
return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "TPM2 driver name '%s' not valid, refusing.", driver);
| 11:34:42 |
@nickcao:nichi.co | Introduced in https://github.com/systemd/systemd/commit/542dbc623e | 11:37:01 |
@nickcao:nichi.co | No upstream bug report yet. | 11:37:08 |
K900 | https://github.com/systemd/systemd/blob/main/src/basic/path-util.c#L1116 | 11:37:10 |
K900 | Doesn't look obviously wrong | 11:37:14 |
@nickcao:nichi.co | Don't our systemd have debug symbols? | 12:05:05 |
K900 | I think it should? | 12:06:03 |
@nickcao:nichi.co | gdb finds nothing? | 12:06:24 |
K900 | With debuginfod? | 12:06:39 |
@nickcao:nichi.co | Let me see | 12:06:49 |
K900 | Or dwarffs | 12:07:26 |
@nickcao:nichi.co | Oh I worked around that | 12:09:24 |
@nickcao:nichi.co | 0x7fffffffbd50: "/nix/store/fgn0li69rvhggzzyq7vzi4s0ka9wxvsw-tpm2-tss-3.2.0/lib/libtss2-tcti-device.so.0" | 12:09:28 |
@nickcao:nichi.co | (The content of fn) | 12:09:34 |
@nickcao:nichi.co | We should patch that check out, It's not happy with absolute filenames. | 12:10:01 |
@nickcao:nichi.co | Or shall we instead setting these dlopened libs to RPATH or whatever search pathes. | 12:11:16 |
K900 | Wait what | 12:11:55 |
K900 | How does it get an absolute path from fn = strjoina("libtss2-tcti-", driver, ".so.0"); | 12:12:28 |
@nickcao:nichi.co | That line is patched | 12:12:39 |
K900 | Oof | 12:12:47 |
@elvishjerricco:matrix.org | Nick Cao: there's intentional code in the nix expression for replacing these dlopen expressions with ones that use absolute paths | 12:12:52 |
@elvishjerricco:matrix.org | IIRC it's very much not easy to get it to work any other way | 12:13:20 |
K900 | So I guess that line should be path_is_valid | 12:13:36 |
@nickcao:nichi.co | In reply to @k900:0upti.me So I guess that line should be path_is_valid I doubt whether upstream would accept this. | 12:14:08 |