[RFC] glibc AI policy. Round 3. Adopt the GCC AI policy.
Siddhesh Poyarekar
siddhesh@gotplt.org
Wed Nov 4 01:09:47 GMT 2026
On 2026-11-03 18:30, Carlos O'Donell wrote:
> At a high level several things are important to the project:
>
> 1. When you write a test by hand, that test should have a license
> and copyright such that the project can know how you intended
> to contribute and share that work. We encourage that test to
> be LGPLv2+, the same as the project, for simplicity.
> - Example: glibc/misc/tst-mkstemp-fuse-parallel.c
>
> 2. When we copy code from another project into the testsuite in
> order to run it as part of the testsuite, that code must
> preserve the original notices as required by the original
> license (and meet any license obligations).
> - Example: glibc/support/bundled/linux/include/uapi/linux/fuse.h
There is potential for LLM generated code making it into our sources
through, e.g. Linux headers too since Linus' position seems to be that
it's "just a compiler"; there's some loose recommendations[1][2] on
being transparent about what tools were used to generate contributions,
but that's about it.
> What other invariants would we want to preserve?
Everything in libsupport, or enhancements to libsupport through LLM test
contributions. I don't have a strong opinion either way on LLM use for
maintaining libsupport but I do think we need to make a clear enough
statement on what we want to do there. Likewise for benchtests.
> Why would we want to mark LLM-generated tests as such?
>
> LLM-generated tests have git commit history of Assisted-by: LLM.
The Assisted-by: LLM is vague in its scope, as sent out by the
submitter; it assumes that the submitter has done the due diligence (or
the reviewer has, by asking) of limiting their LLM contribution scope to
the test. Explicitly marking files that LLMs touch on the other hand
makes it clear what the copyright status of that file is, since in the
end this is a copyright ownership question.
> If we need to remove them we will go back through the test sources
> to get a version that is clean.
>
> If the goal is to stop from copying from a test into the implementation,
> then I think that's always a goal we should have regardless of LLMs.
It's part of the broader goal of preventing cross contamination, but
this bit is not explicitly spelled out either.
> Some glibc tests are copies of user programs, have no license header,
> or otherwise, and so we should not copy from tests into the
> implementation ever. It's simpler if we just don't do this to avoid
> accidents.
>
> The example above is a good case where we can get in trouble if we copy
> GPLv2 code into an LGPLv2+ library (though UAPI headers use
> "WITH Linux-syscall-note") instead of just making syscalls.
>
> In summary:
> - Do not copy from tests into the implementation.
>
Agreed, lets make this explicit too, independently of our AI policy.
Thanks,
Sid
[1]
https://docs.kernel.org/process/coding-assistants.html#signed-off-by-and-developer-certificate-of-origin
[2] https://docs.kernel.org/process/generated-content.html
More information about the Libc-alpha
mailing list