lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aSDHOfdaoBJgNqFN@kernel.org>
Date: Fri, 21 Nov 2025 22:10:33 +0200
From: Jarkko Sakkinen <jarkko@...nel.org>
To: Thorsten Blum <thorsten.blum@...ux.dev>
Cc: Mimi Zohar <zohar@...ux.ibm.com>, David Howells <dhowells@...hat.com>,
	Paul Moore <paul@...l-moore.com>, James Morris <jmorris@...ei.org>,
	"Serge E. Hallyn" <serge@...lyn.com>,
	linux-integrity@...r.kernel.org, keyrings@...r.kernel.org,
	linux-security-module@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] KEYS: encrypted: Use pr_fmt()

On Wed, Nov 19, 2025 at 03:45:02PM +0100, Thorsten Blum wrote:
> On 19. Nov 2025, at 03:48, Jarkko Sakkinen wrote:
> > On Thu, Nov 13, 2025 at 01:35:44PM +0100, Thorsten Blum wrote:
> >> Use pr_fmt() to automatically prefix all pr_<level>() log messages with
> > 
> > This fails to describe what "use" means.
> 
> I don't understand what you mean. What's wrong with "use ... to ..."?

I think e.g., "Rewrite the definition of ..." describes better what
you're doing.

> 
> >> "encrypted_key: " and remove all manually added prefixes.
> >> 
> >> Reformat the code accordingly and avoid line breaks in log messages.
> >> 
> >> Signed-off-by: Thorsten Blum <thorsten.blum@...ux.dev>
> >> ---
> >> security/keys/encrypted-keys/encrypted.c | 74 +++++++++++-------------
> >> security/keys/encrypted-keys/encrypted.h |  2 +-
> >> 2 files changed, 35 insertions(+), 41 deletions(-)
> >> 
> >> diff --git a/security/keys/encrypted-keys/encrypted.c b/security/keys/encrypted-keys/encrypted.c
> >> index 513c09e2b01c..a8e8bf949b4b 100644
> >> --- a/security/keys/encrypted-keys/encrypted.c
> >> +++ b/security/keys/encrypted-keys/encrypted.c
> >> @@ -11,6 +11,8 @@
> >>  * See Documentation/security/keys/trusted-encrypted.rst
> >>  */
> >> 
> > 
> > Should have undef prepending.
> 
> Why is this necessary when the #define is at the top of a source file?
> The kernel documentation [1] doesn't mention this anywhere. Isn't #undef
> only needed when redefining 'pr_fmt' in the middle of a file to avoid a
> compiler warning/error?
> 
> >> +#define pr_fmt(fmt) "encrypted_key: " fmt
> >> +
> >> [...]
> 
> Thanks,
> Thorsten
> 
> [1] https://docs.kernel.org/core-api/printk-basics.html
> 

BR, Jarkko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ