From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [RFC PATCH] tst_taint: TCONF when kernel is alreay tainted
Date: Thu, 19 Sep 2019 12:02:05 +0200 [thread overview]
Message-ID: <20190919100205.GA26642@rei> (raw)
In-Reply-To: <20190918053519.26244-1-liwang@redhat.com>
Hi!
> As the tst_taint_init comments described, If the tainted-flags are already set
> by the kernel, there is no reason to continue and TCONF is generated. But in
> the function achieve, it uses TBROK.
>
> cmdline="cve-2017-17053"
> tst_test.c:1096: INFO: Timeout per run is 0h 10m 00s
> tst_taint.c:88: BROK: Kernel is already tainted: 536871424
There is a reason for generating TBROK, we do not want the test to be
skipped silently in this case. If kernel is tainted something went wrong
anyways and we are looking only for a specific flags.
> Signed-off-by: Li Wang <liwang@redhat.com>
> Cc: Chang Yin <cyin@redhat.com>
> Cc: Michael Moese <mmoese@suse.de>
> ---
>
> Notes:
> Hi Cyril & Michael,
>
> I'm not sure if that's a good choice to skip whole test if the kernel already
> tainted, so maybe we could also perform it but not do a strict tainted-flags
> check after testing? The reason I think is it probably have chance to find
> new issue even with a tainted kernel.
>
> Any suggestion?
>
> lib/tst_taint.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/tst_taint.c b/lib/tst_taint.c
> index a5dbf77d2..f7cafb96f 100644
> --- a/lib/tst_taint.c
> +++ b/lib/tst_taint.c
> @@ -85,7 +85,7 @@ void tst_taint_init(unsigned int mask)
>
> taint = tst_taint_read();
> if ((taint & mask) != 0)
> - tst_brk(TBROK, "Kernel is already tainted: %u", taint);
> + tst_brk(TCONF, "Kernel is already tainted: %u", taint);
> }
>
>
> --
> 2.20.1
>
>
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2019-09-19 10:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-18 5:35 [LTP] [RFC PATCH] tst_taint: TCONF when kernel is alreay tainted Li Wang
2019-09-18 5:56 ` Li Wang
2019-09-19 10:02 ` Cyril Hrubis [this message]
2019-09-20 3:00 ` Li Wang
2019-10-15 14:00 ` Jan Stancek
2019-10-15 14:38 ` Cyril Hrubis
2019-10-15 15:19 ` Jan Stancek
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=20190919100205.GA26642@rei \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox