All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Petr Vorel <pvorel@suse.cz>
Cc: Takashi Iwai <tiwai@suse.de>, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 1/1] lsmod01.sh: Whitelist zcrypt
Date: Fri, 21 Feb 2025 14:13:36 +0100	[thread overview]
Message-ID: <Z7h8ABTkW3C2ysWZ@yuki.lan> (raw)
In-Reply-To: <20250221121344.2778278-1-pvorel@suse.cz>

Hi!
> zcrypt (s390x specific module) has different refcnt:
> 
>     lsmod01 1 TINFO: lsmod output different from /proc/modules
>     118c118
>     < zcrypt 131072 9
>     ---
>     > zcrypt 131072 8
> 
> This is probably due libcrypto update to support hardware acceleration
> of some algorithm that kmod is using, which causes increasing refcnt.
> 
> Because it's would not be easy to get a generic mechanism to detect
> affected modules (ATM probably only zcrypt), whitelist parsing it.
> 
> Fixes: https://bugzilla.suse.com/show_bug.cgi?id=1237399

I read the bug, I guess that there isn't anything better than doing
this.

> Suggested-by: Takashi Iwai <tiwai@suse.de>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
>  testcases/commands/lsmod/lsmod01.sh | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/testcases/commands/lsmod/lsmod01.sh b/testcases/commands/lsmod/lsmod01.sh
> index 8b7a0a7943..1fe399aa06 100755
> --- a/testcases/commands/lsmod/lsmod01.sh
> +++ b/testcases/commands/lsmod/lsmod01.sh
> @@ -14,6 +14,9 @@ TST_NEEDS_CMDS="lsmod"
>  
>  module_inserted=
>  
> +# zcrypt has higher refcnt

Maybe a bit better description:

# lsmod triggers zcrypt refcount increase if it links against libssl
# which uses hardware acceleration

Other than that:

Reviewed-by: Cyril Hrubis <chrubis@suse.cz>

> +whitelist_modules='zcrypt'
> +
>  setup()
>  {
>  	if [ -z "$(cat /proc/modules)"  ]; then
> @@ -55,8 +58,8 @@ lsmod_matches_proc_modules()
>  	if [ "$lsmod_output" != "$modules_output" ]; then
>  		tst_res TINFO "lsmod output different from /proc/modules"
>  
> -		echo "$lsmod_output" > temp1
> -		echo "$modules_output" > temp2
> +		echo "$lsmod_output" | grep -v "^$whitelist_modules" > temp1
> +		echo "$modules_output" | grep -v "^$whitelist_modules" > temp2
>  		if tst_cmd_available diff; then
>  			diff temp1 temp2
>  		else

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2025-02-21 13:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-21 12:13 [LTP] [PATCH 1/1] lsmod01.sh: Whitelist zcrypt Petr Vorel
2025-02-21 13:13 ` Cyril Hrubis [this message]
2025-02-21 13:33   ` Petr Vorel

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=Z7h8ABTkW3C2ysWZ@yuki.lan \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=pvorel@suse.cz \
    --cc=tiwai@suse.de \
    /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.