Index | Thread | Search

From:
"Theo de Raadt" <deraadt@openbsd.org>
Subject:
Re: fw_update: fix ccp/qccpucp pattern conflict
To:
Tobias Heider <tobias.heider@stusta.de>
Cc:
tech@openbsd.org, bluhm@openbsd.org
Date:
Tue, 20 May 2025 00:46:24 -0600

Download raw body.

Thread
Yes, the pattern should be more strict.

Should it be ^cpp0 ?

> Due to an unfortunate driver name collision the current fw_update
> matching pattern for amdsev checks for ccpX devices using just
> ccp as pattern. This only matches on Qualcomm machines with
> qccpucpX lines in their dmesg.
> 
> Maybe it would make more sense to only consider lines starting
> with ccp?  Tested on my T14s and confirmed this make amdsev go away,
> I'd appreciate if someone could test on an amd machine to see if it
> still works as expected.
> 
> diff --git a/usr.sbin/fw_update/patterns.c b/usr.sbin/fw_update/patterns.c
> index aa2ec49f4a2..070a994f7da 100644
> --- a/usr.sbin/fw_update/patterns.c
> +++ b/usr.sbin/fw_update/patterns.c
> @@ -96,7 +96,7 @@ main(void)
>  	printf("%s\n", "amdgpu ^vendor \"ATI\", unknown product*class display");
>  	printf("%s\n", "amdsev ^\"AMD*Crypto\"");
>  	printf("%s\n", "amdsev ^\"AMD*PSP\"");
> -	printf("%s\n", "amdsev ccp");
> +	printf("%s\n", "amdsev ^ccp");
>  	printf("%s\n", "amdsev psp");
>  	printf("%s\n", "apple-boot ^cpu0*Apple");
>  	printf("%s\n", "arm64-qcom-dtb ^qcgpio0");
>