Re: [PATCH v14 4/5] pkcs7, x509: Add ML-DSA support
From: David Howells
Date: Mon Jan 26 2026 - 06:28:35 EST
Jarkko Sakkinen <jarkko@xxxxxxxxxx> wrote:
> Why don't we have a constant for "none"?
>
> $ git grep "\"none\"" security/
> security/apparmor/audit.c: "none",
> security/apparmor/lib.c: { "none", DEBUG_NONE },
> security/security.c: [LOCKDOWN_NONE] = "none",
>
> $ git grep "\"none\"" crypto
> crypto/asymmetric_keys/public_key.c: hash_algo = "none";
> crypto/asymmetric_keys/public_key.c: hash_algo = "none";
> crypto/testmgr.h: * PKCS#1 RSA test vectors for hash algorithm "none"
>
> IMHO, this a bad practice.
You'd think that the compiler and linker ought to be able to deal with
read-only string sharing within compilation units. I don't particularly want
to deal with combining every "none" string within the kernel into one within
this patchset.
I could move back to using an enum of algorithms, I suppose - though again,
I'd rather not do that in this patchset.
David