From: Jarkko Sakkinen <jarkko@kernel.org>
To: David Laight <david.laight.linux@gmail.com>
Cc: Dan Carpenter <error27@gmail.com>,
James Bottomley <James.Bottomley@hansenpartnership.com>,
Mimi Zohar <zohar@linux.ibm.com>,
David Howells <dhowells@redhat.com>,
Paul Moore <paul@paul-moore.com>,
James Morris <jmorris@namei.org>,
"Serge E. Hallyn" <serge@hallyn.com>,
linux-integrity@vger.kernel.org, keyrings@vger.kernel.org,
linux-security-module@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] keys/trusted/tpm2: rename "bool" to "boolean"
Date: Tue, 10 Nov 2026 14:38:43 +0200 [thread overview]
Message-ID: <avMQUxnlSwnSNYYJ@kernel.org> (raw)
In-Reply-To: <20261110110034.0a46b9f7@pumpkin>
On Tue, Nov 10, 2026 at 11:00:34AM +0000, David Laight wrote:
> Hmmm... how can that fail?
> bool[] is just "\1\1\1".
> I bet asn1_encode_bool() isn't inlined - where the compiler would optimise
> most of it away.
>
> It is a horrid variable name, asn1_bool_true[] would be better.
>
> David
Agreed.
ASN.1 deocoder (scripts/asn1_compiler.c) is ugly but elegant (it is) ;-)
Encoding side, well... It would for sure could benefit from some fresh
thinking but more like a turnover than fixing up few variable names
here and there, or addressing other cosmetic/minor details.
I'll put a remark on this to my personal TODO list. I'm doing a couple
of such turnovers for keyrings ATM [1][2], which will keep me busy still
for a while. This is my "post-LLM" strategy now at its core: "when you
see a bug, fix the vector".
If you have a great "big picture" idea on how to do encoding better
overall, I'm happy to look at such patches.
[1] https://lore.kernel.org/keyrings/20261110053323.2936729-1-jarkko@kernel.org/
[2] https://lore.kernel.org/keyrings/20261108222719.304712-1-jarkko@kernel.org/
Br, Jarkko
prev parent reply other threads:[~2026-11-10 12:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-09 5:39 [PATCH] keys/trusted/tpm2: rename "bool" to "boolean" Dan Carpenter
2026-11-09 5:41 ` sashiko-bot
2026-11-09 14:54 ` Jarkko Sakkinen
2026-11-09 19:48 ` Dan Carpenter
2026-11-09 20:08 ` Jarkko Sakkinen
2026-11-09 20:13 ` Jarkko Sakkinen
2026-11-10 11:00 ` David Laight
2026-11-10 12:38 ` Jarkko Sakkinen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=avMQUxnlSwnSNYYJ@kernel.org \
--to=jarkko@kernel.org \
--cc=James.Bottomley@hansenpartnership.com \
--cc=david.laight.linux@gmail.com \
--cc=dhowells@redhat.com \
--cc=error27@gmail.com \
--cc=jmorris@namei.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=keyrings@vger.kernel.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=paul@paul-moore.com \
--cc=serge@hallyn.com \
--cc=zohar@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.