All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Doucha <mdoucha@suse.cz>
To: rpalethorpe@suse.de
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 2/2] Add test for CVE 2021-38198
Date: Tue, 15 Mar 2022 16:04:34 +0100	[thread overview]
Message-ID: <f7972d11-de50-d9bc-3abc-dcba53dc3936@suse.cz> (raw)
In-Reply-To: <87o8275lbi.fsf@suse.de>

On 15. 03. 22 15:19, Richard Palethorpe wrote:
> Hi Martin,
> 
> Martin Doucha <mdoucha@suse.cz> writes:
>> +	if (isdigit(buf[0])) {
>> +		sscanf(buf, "%d", &ret);
> 
> checkpatch complains that the return value is not checked. Also it wants
> you to use tst_parse_int.

if (isdigit()) above ensures that the return value does not matter. But
I'll change it to tst_parse_int() in v2.

>> +static void disable_tdp(void)
>> +{
>> +	if (!access(TDP_MMU_SYSFILE, F_OK)) {
>> +		/* FIXME: Is this sufficient to disable TDP? */
> 
> What happens if this doesn't work and TDP is enabled? I seem to have it
> enabled and the test still passes even if I comment out the call
> to disable_tdp.
> 
> I'm wondering whether it will be easy to tell if a test failure is due
> to TDP or if it can result in silent false negatives?

AFAIK, the kernel bug was fixed before the tdp_mmu sysfile was
introduced. So somebody will have to revert the fix and run the test on
custom kernel to answer that question.

The bug is not reproducible with TDP enabled.

>> +	.save_restore = (const char *const []) {
>> +		"?/sys/module/kvm/parameters/tdp_mmu",
> 
> This needs updating to use struct tst_path_val.

Yes, the patch was sent before the .save_restore structure was changed.

-- 
Martin Doucha   mdoucha@suse.cz
QA Engineer for Software Maintenance
SUSE LINUX, s.r.o.
CORSO IIa
Krizikova 148/34
186 00 Prague 8
Czech Republic

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

  reply	other threads:[~2022-03-15 15:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-09 16:49 [LTP] [PATCH 1/2] KVM test infrastructure Martin Doucha
2022-03-09 16:49 ` [LTP] [PATCH 2/2] Add test for CVE 2021-38198 Martin Doucha
2022-03-15 14:19   ` Richard Palethorpe
2022-03-15 15:04     ` Martin Doucha [this message]
2022-03-15 15:44       ` Richard Palethorpe
2022-03-15 16:14         ` Martin Doucha
2022-03-17  7:35           ` Richard Palethorpe
2022-03-17 11:55             ` Martin Doucha
2022-03-09 19:13 ` [LTP] [PATCH 1/2] KVM test infrastructure Petr Vorel
2022-03-10 14:10   ` Martin Doucha
2022-03-10 20:41     ` Petr Vorel
2022-03-15 15:00 ` Richard Palethorpe
2022-03-16 17:03   ` Martin Doucha
2022-03-17  7:59     ` Richard Palethorpe
2022-03-17  8:16     ` Li Wang
2022-03-17 10:42   ` Richard Palethorpe

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=f7972d11-de50-d9bc-3abc-dcba53dc3936@suse.cz \
    --to=mdoucha@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=rpalethorpe@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.