From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] openposix: mmap/21-1: adjust the test to work with MAP_SHARED_VALIDATE
Date: Thu, 8 Feb 2018 17:34:53 +0100 [thread overview]
Message-ID: <20180208163453.GA2049@rei> (raw)
In-Reply-To: <1518105323-12867-1-git-send-email-stanislav.kholmanskikh@oracle.com>
Hi!
> +int is_valid(int flag)
> +{
> + if (flag == MAP_SHARED || flag == MAP_PRIVATE || flag == MAP_FIXED)
> + return 1;
> +
> +#ifdef __linux__
> +
> +#ifndef MAP_SHARED_VALIDATE
> +#define MAP_SHARED_VALIDATE 0x03
> +#endif
> +
> + if (flag == MAP_SHARED_VALIDATE)
> + return 1;
> +#endif
> +
> + return 0;
> +}
Hmm, this probably does not scale up, what about setting the flag to
have all its bits set (i.e. passing ~0 to the mmap()) from the start
instead?
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2018-02-08 16:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-08 15:55 [LTP] [PATCH] openposix: mmap/21-1: adjust the test to work with MAP_SHARED_VALIDATE Stanislav Kholmanskikh
2018-02-08 16:34 ` Cyril Hrubis [this message]
2018-02-12 12:29 ` Stanislav Kholmanskikh
2018-02-12 15:17 ` Cyril Hrubis
2018-03-01 9:22 ` [LTP] [PATCH] openposix: mmap/21-1: use all bits set as the invalid flag Stanislav Kholmanskikh
2018-03-01 9:50 ` Cyril Hrubis
2018-03-01 10:59 ` Stanislav Kholmanskikh
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=20180208163453.GA2049@rei \
--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