From: Richard Palethorpe <rpalethorpe@suse.de>
To: Martin Doucha <mdoucha@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 2/2] Add test for CVE 2021-38198
Date: Tue, 15 Mar 2022 15:44:36 +0000 [thread overview]
Message-ID: <87fsnj5hi9.fsf@suse.de> (raw)
In-Reply-To: <f7972d11-de50-d9bc-3abc-dcba53dc3936@suse.cz>
Hello,
Martin Doucha <mdoucha@suse.cz> writes:
> 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.
Ah I see TDP is very new https://lwn.net/Articles/832835/
> So somebody will have to revert the fix and run the test on
> custom kernel to answer that question.
Did you reproduce the bug?
I could try this next week.
>
> 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.
--
Thank you,
Richard.
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2022-03-15 16:05 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
2022-03-15 15:44 ` Richard Palethorpe [this message]
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=87fsnj5hi9.fsf@suse.de \
--to=rpalethorpe@suse.de \
--cc=ltp@lists.linux.it \
--cc=mdoucha@suse.cz \
/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