Re: [PATCH] s390/pai: Reduce excessive debug feature size

Thomas Richter <[email protected]>
Newsgroups org.kernel.vger.linux-s390
Organization IBM
Message-ID <[email protected]>
On 8/25/26 11:49, Heiko Carstens wrote:
> The pai debug feature is registered with 256 areas, where each area
> contains 32 pages. This sums up to a total of 32MiB. The code does not use
> any debug exceptions, which means that 255 of those areas are never
> used. In addition all existing debug feature calls have a lower level (5)
> than the default level (3).
> 
> This in turn means that without user interaction the debug feature is
> unused.
> 
> Reduce the number of areas to 1, and also reduce the number of pages for
> the remaining area to 1. Since user interaction is required, the user can
> also increase the size of the remaining area, instead of wasting memory by
> default.
> 
> This reduces the total size of the debug feature to 4KiB.
> 
> Fixes: a3f8423622ef ("s390/pai_crypto: Add PAI crypto characteristics table for parameters")
> Signed-off-by: Heiko Carstens <[email protected]>
> ---
>  arch/s390/kernel/perf_pai.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/s390/kernel/perf_pai.c b/arch/s390/kernel/perf_pai.c
> index cdb8006220ca..ab76ed7ad791 100644
> --- a/arch/s390/kernel/perf_pai.c
> +++ b/arch/s390/kernel/perf_pai.c
> @@ -1221,7 +1221,7 @@ static int __init paipmu_setup(void)
>  static int __init pai_init(void)
>  {
>  	/* Setup s390dbf facility */
> -	paidbg = debug_register("pai", 32, 256, 128);
> +	paidbg = debug_register("pai", 1, 1, 128);
>  	if (!paidbg) {
>  		pr_err("Registration of s390dbf pai failed\n");
>  		return -ENOMEM;

Reviewed-by: Thomas Richter <[email protected]>

-- 
Thomas Richter, Dept 3303, IBM s390 Linux Development, Boeblingen, Germany
--
IBM Deutschland Research & Development GmbH

Vorsitzender des Aufsichtsrats: Wolfgang Wendt

Geschäftsführung: David Faller

Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.