Re:Xz: Can you spot the single character that disabled Linux...
by astrange on Sunday March 31, 2024 @12:57AM
(#39881564)
configure would print that it's not enabled, so it seems like the kind of thing people would eventually notice.
Re:Xz: Can you spot the single character that disabled Linux...
by takeda on Sunday March 31, 2024 @03:04AM
(#39882086)
Looks like he only introduced that "bug" in CMake. Was there migration in progress from autoconf to cmake?
Re:Xz: Can you spot the single character that disabled Linux...
by masklinn on Sunday March 31, 2024 @02:30AM
(#39881939)
Maybe, eventually, but how many people read the reams of garbage autoconf spouts out until the feature they wanted fails to materialize?
Re:Xz: Can you spot the single character that disabled Linux...
by astrange on Sunday March 31, 2024 @04:17AM
(#39882435)
I used to and it's actually how I got a large part of my computer skills, but unfortunately I got medicated for ADHD and became normal and can't do it anymore.
But I still think reading boring logs is a great way to understand a system. Turning on all the intermediates for a compiler (llvm ghc etc) is very educational too.
Re:Xz: Can you spot the single character that disabled Linux...
by makomk on Sunday March 31, 2024 @07:38AM
(#39883315)
The actual compiler output from the autoconf feature test is one of the things I'd probably look at fairly early on if some feature is disabled when it shouldn't be, but I maybe have a bit more experience running into problems with this than younger folks.
Re:Xz: Can you spot the single character that disabled Linux...
by masklinn on Sunday March 31, 2024 @08:08AM
(#39883526)
> if some feature is disabled when it shouldn't be
That's my point, you're going to look at autoconf's output if a feature you're expecting is missing.
But would you think to have a test or expectation for landlock in xz? How would you even check if landlock is enabled for a process?
Re:Xz: Can you spot the single character that disabled Linux...
by ak39 on Sunday March 31, 2024 @08:28AM
(#39883649)
Shouldn't there be a unit test to confirm landlock is on/off? (I mean, this seems a crucial aspect of the code which needs 100% test coverage.)
Re:Xz: Can you spot the single character that disabled Linux...
by patrakov on Sunday March 31, 2024 @10:37AM
(#39884677)
This is not something that a unit test can catch. First, this 100% coverage rule applies to the program/library code, and only to the subset that is not ifdeffed out (otherwise, you will not be able to have, e.g., Windows-specific code), and definitely not to the build system's code. Second, how would you test that landlock works, in a unit test, when this feature is optional and depends on the system headers being recent enough? You can't fail a unit test just because the software is being compiled on an old but still supported system, so it would be a "SKIPPED" result at best, which is not a failure and which is not normally caught.
Re:Xz: Can you spot the single character that disabled Linux...
by account42 on Monday April 08, 2024 @09:48AM
(#39969688)
The proper way would be to have a minimum glibc version (or whatever it depends on) where you expect landlock to be available and then shout loudly if it is not so that you can either fix the check or correct your expectations. This isn't just for malicious users, these checks can be brittle enough that a small change in the library or even compiler update can occasionally break something. Of course this is ideal and does not match common practice. I can't even claim of doing this consistently myself although I did start that practice before this mess.
The stray dot isn’t valid C, so it will never compile. By ensuring it can never compile, Landlock will never be enabled.