From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] syscalls/openat2: New tests
Date: Mon, 2 Mar 2020 11:16:28 +0100 [thread overview]
Message-ID: <20200302101628.GB5288@rei.lan> (raw)
In-Reply-To: <20200302100244.6syqeskptbsnyf6t@vireshk-i7>
Hi!
> > The code you had there in the first place was passing by accident
> > because the were non-zero bytes on the stack after the structure, which
> > is pretty bad, because if it started to fail randomly nobody would know
> > why.
>
> I know :)
>
> What about this? This doesn't test the success case with pad = 0 though, as it
> is a success case. Don't want to add a separate file for it. :)
This has still one small drawback, the whole purpose of the test buffers
is that there is a PROT_NONE page allocated right behind the end of the
buffer. This is implemented so that we can make sure that kernel does
not touch any data outside of it. So the buffer has to be sized exactly
as the tc->size otherwise there is no point in using it. So I guess we
still need two buffers.
Also I guess that we can add the success case to the openat201.c test
but that would mean that we need two buffers there as well.
--
Cyril Hrubis
chrubis@suse.cz
prev parent reply other threads:[~2020-03-02 10:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-28 10:50 [LTP] [PATCH] syscalls/openat2: New tests Viresh Kumar
2020-02-28 13:22 ` Cyril Hrubis
2020-03-02 6:37 ` Viresh Kumar
2020-03-02 7:31 ` Petr Vorel
2020-03-02 8:46 ` Cyril Hrubis
2020-03-02 9:07 ` Viresh Kumar
2020-03-02 9:36 ` Cyril Hrubis
2020-03-02 10:02 ` Viresh Kumar
2020-03-02 10:16 ` Cyril Hrubis [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=20200302101628.GB5288@rei.lan \
--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