From: Petr Vorel <pvorel@suse.cz>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: Fabian Vogt <fvogt@suse.com>, Jiri Slaby <jirislaby@kernel.org>,
Vlastimil Babka <vbabka@suse.cz>,
ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 1/1] mremap06: Add mremap() reproducer for 7e7757876f25
Date: Tue, 4 Jul 2023 13:46:58 +0200 [thread overview]
Message-ID: <20230704114658.GC507064@pevik> (raw)
In-Reply-To: <ZKPbSn2qQzxJGxR3@yuki>
Hi Cyril,
> > +#define PAGE_SIZE 4096
> This wouldn't work on 64k page size.
> > +#define MMAP_SIZE ((ARRAY_SIZE(tcases)+1)*PAGE_SIZE)
> > +#define MREMAP_SIZE (ARRAY_SIZE(tcases)*PAGE_SIZE)
> These have to be variables initialized on the fly with getpagesize()
> instead of PAGE_SIZE.
Yep, I thought about getpagesize().
...
> > +static int check_pages(void)
> > +{
> > + int fail = 0, i;
> > + char val;
> > +
> > + for (i = 0; i < (int)ARRAY_SIZE(tcases); i++) {
> > + val = buf[i * PAGE_SIZE];
> > + if (val != 0x30 + i) {
> > + tst_res(TFAIL, "page %d wrong value %d (0x%x)", i, val - 0x30, val);
> Woudn't this generate too many FAILURE messages? Maybe we should just
> break the for cycle here.
It could be. I wasn't sure if it's important to know which pages were wrong.
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2023-07-04 11:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-03 19:49 [LTP] [PATCH 1/1] mremap06: Add mremap() reproducer for 7e7757876f25 Petr Vorel
2023-07-03 19:55 ` Petr Vorel
2023-07-03 20:07 ` Petr Vorel
2023-07-04 8:47 ` Cyril Hrubis
2023-07-04 11:33 ` Petr Vorel
2023-07-04 9:15 ` Jan Stancek
2023-07-04 11:32 ` Petr Vorel
2023-07-04 8:41 ` Cyril Hrubis
2023-07-04 11:46 ` Petr Vorel [this message]
2023-07-10 11:13 ` Vlastimil Babka
2023-07-10 12:26 ` Petr Vorel
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=20230704114658.GC507064@pevik \
--to=pvorel@suse.cz \
--cc=chrubis@suse.cz \
--cc=fvogt@suse.com \
--cc=jirislaby@kernel.org \
--cc=ltp@lists.linux.it \
--cc=vbabka@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