Skip to contentSkip to conversation

arm: mach-k3: security: Lower verbosity of cert message for GP

PATCH In review Andrew Davis 3 participants 3 messages Apr 10, 2024 – Apr 18, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: mach-k3: security: Lower verbosity of cert message for GP

When we find a certificate on an image to be booted on a GP device we print out a message explaining that the certificate is being skipped. This message is rather long and is printed for every image. Shorten the message and make the long version into a debug message.

---
 arch/arm/mach-k3/security.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/mach-k3/security.c +2 -1
index 22697a263a8..7c46914d9dd 100644
@@ -50,7 +50,7 @@ void ti_secure_image_check_binary(void **p_image, size_t *p_size)
 
 	if (get_device_type() == K3_DEVICE_TYPE_GP) {
 		if (ti_secure_cert_detected(*p_image)) {
-			printf("Warning: Detected image signing certificate on GP device. "
+			debug("Warning: Detected image signing certificate on GP device. "
 			       "Skipping certificate to prevent boot failure. "
 			       "This will fail if the image was also encrypted\n");
 
@@ -60,6 +60,7 @@ void ti_secure_image_check_binary(void **p_image, size_t *p_size)
 				return;
 			}
 
+			printf("Skipping authentication on GP device\n");
 			*p_image += cert_length;
 			*p_size -= cert_length;
 		}
Signature · 1 line
2.39.2
Tested-by on v1 1/1
#1 lore raw
Quoted 33 lines · Andrew Davis

When we find a certificate on an image to be booted on a GP device we print out a message explaining that the certificate is being skipped. This message is rather long and is printed for every image. Shorten the message and make the long version into a debug message.

---
 arch/arm/mach-k3/security.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/mach-k3/security.c +2 -1
index 22697a263a8..7c46914d9dd 100644
@@ -50,7 +50,7 @@ void ti_secure_image_check_binary(void **p_image, size_t *p_size)
 
 	if (get_device_type() == K3_DEVICE_TYPE_GP) {
 		if (ti_secure_cert_detected(*p_image)) {
-			printf("Warning: Detected image signing certificate on GP device. "
+			debug("Warning: Detected image signing certificate on GP device. "
 			       "Skipping certificate to prevent boot failure. "
 			       "This will fail if the image was also encrypted\n");
 
@@ -60,6 +60,7 @@ void ti_secure_image_check_binary(void **p_image, size_t *p_size)
 				return;
 			}
 
+			printf("Skipping authentication on GP device\n");
 			*p_image += cert_length;
 			*p_size -= cert_length;
 		}
Signature · 1 line
2.39.2

Would be nice if it only emitted the message once!

#2 lore raw
In reply to Andrew Davis
Quoted 6 lines · Andrew Davis

When we find a certificate on an image to be booted on a GP device we print out a message explaining that the certificate is being skipped. This message is rather long and is printed for every image. Shorten the message and make the long version into a debug message.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom