From: Richard Palethorpe <rpalethorpe@suse.de>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 2/5] syscalls/mmap09: Rewrite the test using new LTP API
Date: Fri, 01 Sep 2023 10:11:52 +0100 [thread overview]
Message-ID: <87bkemgstk.fsf@suse.de> (raw)
In-Reply-To: <ZPGpFfGjj5kxgFY_@yuki>
Hello,
Cyril Hrubis <chrubis@suse.cz> writes:
> Hi!
>> > + addr = mmap(0, mapsize, PROT_READ | PROT_WRITE, MAP_FILE |
>> > MAP_SHARED, fd, 0);
>>
>> Why don't we use SAFE_MMAP?
>
> I guess mainly because that would produce TBROK instead of TFAIL.
>
>> Can we use all file systems?
>>
>> The test is mapping a file and performing an operation on it. So this is
>> basically a file system test.
>>
>> BTW this test seems weak. I don't know what truncating the file without
>> then trying to access the newly OOB memory achieves. However it's what
>> the original test did, so it's up to you if you want to change anything.
>
> I would vote for adding additional checks like this. I suppose that you
> will get SIGBUS when accessing pages beyond new file size, so we should
> probably fork a child, let it touch the truncated part of the file, and
> check that it was killed by SIGBUS.
There is some overlap with mmap13 because that does check for
SIGBUS. Possibly these could be combined?
--
Thank you,
Richard.
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2023-09-01 9:13 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-25 6:38 [LTP] [PATCH 1/5] syscalls/mmap08: Rewrite the test using new LTP API Avinesh Kumar
2023-08-25 6:38 ` [LTP] [PATCH 2/5] syscalls/mmap09: " Avinesh Kumar
2023-09-01 8:27 ` Richard Palethorpe
2023-09-01 9:04 ` Cyril Hrubis
2023-09-01 9:11 ` Richard Palethorpe [this message]
2023-08-25 6:38 ` [LTP] [PATCH 3/5] syscalls/mmap13: Rewrite the test using new API Avinesh Kumar
2023-09-04 8:54 ` Richard Palethorpe
2023-08-25 6:38 ` [LTP] [PATCH 4/5] syscalls/mmap14: Rewrite test using new LTP API Avinesh Kumar
2023-09-01 9:23 ` Richard Palethorpe
2023-09-05 13:28 ` [LTP] [PATCH v2] " Avinesh Kumar
2023-10-09 10:59 ` Richard Palethorpe
2023-10-31 15:39 ` Cyril Hrubis
2023-08-25 6:38 ` [LTP] [PATCH 5/5] syscalls/mmap15: " Avinesh Kumar
2023-09-04 9:23 ` Richard Palethorpe
2023-09-05 16:01 ` [LTP] [PATCH v2] " Avinesh Kumar
2023-10-31 15:31 ` Cyril Hrubis
2023-12-11 20:49 ` [LTP] [PATCH v3] " Avinesh Kumar
2024-01-09 17:15 ` Petr Vorel
2024-01-10 9:41 ` Avinesh Kumar
2023-08-30 12:51 ` [LTP] [PATCH 1/5] syscalls/mmap08: Rewrite the " Cyril Hrubis
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=87bkemgstk.fsf@suse.de \
--to=rpalethorpe@suse.de \
--cc=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