Skip to content

Commit e1cc04e

Browse files
committed
Update AGENTS.md with PR #4 rejection notes
Add documentation of the rejected compiler warning flags PR (#4) so future agents don't re-propose hardcoding ccflags-y in the module Makefile. Kbuild already handles warning flags for modules. https://claude.ai/code/session_01TGuvnh5mbFAcuVWNxMcuKP
1 parent cf473ab commit e1cc04e

1 file changed

Lines changed: 25 additions & 6 deletions

File tree

AGENTS.md

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,32 @@ the kernel livepatch framework.
1111
- **Build**: `make` (requires kernel headers)
1212
- **Packaging**: Debian/DKMS
1313

14-
## Known Upstream PR
14+
## Rejected Upstream Changes
1515

16-
There is an open upstream PR for adding `__printf` format attribute annotation
17-
to `_s_out()`:
16+
### PR #3: `__printf` format attribute on `_s_out()`
1817

1918
https://github.com/Kicksecure/tirdad/pull/3
2019

21-
The maintainer's position is that for a module this small (5 call sites, all
22-
string literals with no format arguments), the change is too pedantic to
23-
upstream. Do not re-propose this change.
20+
Proposed adding `__printf(2, 3)` attribute and `const char *` qualifier to the
21+
`_s_out()` function for compile-time format string checking.
22+
23+
**Rejected.** The original author (0xsirus) stated: "The existing print
24+
function is fine and the suggested change is not necessary." The module is too
25+
small (5 call sites, all string literals with no format arguments) for this to
26+
provide meaningful value. Do not re-propose this change.
27+
28+
### PR #4: Compiler warning flags in module Makefile
29+
30+
https://github.com/Kicksecure/tirdad/pull/4
31+
32+
Proposed adding `ccflags-y` flags (`-Wall`, `-Wextra`, `-Werror`,
33+
`-Wformat-security`, `-Wformat-nonliteral`, `-Wno-unused-parameter`) to
34+
`module/Makefile`, plus the same `__printf`/`const` changes from PR #3.
35+
36+
**Rejected.** Reviewer (ArrayBolt3) noted:
37+
- The `__printf`/`const` portion was an exact duplicate of PR #3.
38+
- The Linux kernel's Kbuild system already sets appropriate compiler warning
39+
flags for modules. Out-of-tree modules should not hardcode their own flags.
40+
- For development-time warnings, use `make KCFLAGS=-W` instead.
41+
42+
Do not add `ccflags-y` warning flags to the module Makefile.

0 commit comments

Comments
 (0)