From: Petr Vorel <pvorel@suse.cz>
To: Martin Doucha <mdoucha@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] syscalls/madvise11: Ignore unpoison failure under kernel lockdown
Date: Tue, 20 Jun 2023 11:01:30 +0200 [thread overview]
Message-ID: <20230620090130.GA275381@pevik> (raw)
In-Reply-To: <666f5cd5-5f03-95b3-0b33-6e104fd58744@suse.cz>
> On 20. 06. 23 10:24, Petr Vorel wrote:
> > Hi Martin,
> > ...
> > > - return SAFE_OPEN(debugfs_fp, O_WRONLY);
> > > + TEST(open(debugfs_fp, O_WRONLY));
> > > +
> > > + if (TST_RET == -1 && TST_ERR == EPERM && tst_lockdown_enabled()) {
> > > + tst_res(TINFO,
> > > + "Cannot restore soft-offlined memory due to lockdown");
> > > + return TST_RET;
> > > + }
> > > +
> > > + if (TST_RET == -1)
> > > + tst_brk(TBROK | TTERRNO, "open(%s) failed", debugfs_fp);
> > > + else if (TST_RET < 0)
> > > + tst_brk(TBROK | TTERRNO, "Invalid open() return value");
> > nit: I'd print the return value as we do in safe_open():
> > tst_brk(TBROK | TTERRNO, "Invalid open() return value %d", TST_RET);
> Good point. Though TST_RET is long int so it should be %ld. Should I send a
> v2?
Yes, please.
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2023-06-20 9:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-07 14:45 [LTP] [PATCH] syscalls/madvise11: Ignore unpoison failure under kernel lockdown Martin Doucha
2023-06-20 8:24 ` Petr Vorel
2023-06-20 8:28 ` Martin Doucha
2023-06-20 9:01 ` Petr Vorel [this message]
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=20230620090130.GA275381@pevik \
--to=pvorel@suse.cz \
--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 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.