From: xuyang <xuyang2018.jy@cn.fujitsu.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v3] syscalls/mmap17.c: Add new regression test
Date: Tue, 16 Apr 2019 18:42:25 +0800 [thread overview]
Message-ID: <5CB5B191.90502@cn.fujitsu.com> (raw)
In-Reply-To: <20180404143157.GA30264@rei>
on 3:59, Cyril Hrubis wrote:
> I wonder if we can address Jan's comment and make it more generic by
> trying to mmap a certain sequence of offsets in /dev/mem and either
> expect them to return a valid pointer or fail with MAP_FAILED. We would
> have to make sure that we got the 1ULL<<phys_addr_bits there for the x86
> case but we wouldn't have to skip the test on non-x86 hardware.
Hi Cyril
This patch has been created long time ago, we should start it again. I think we
should make this case more generic. It should test mmap whether check physical
addr size valid instead of triggering a rare crash.
We can look for a max phys_addr_bit on all arch architectures. AFAIK, the max
phys_addr_bit is 52, we can test it as below:
mmap(NULL, 1, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 1ULL<<52)
next prev parent reply other threads:[~2019-04-16 10:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-02 10:03 [LTP] [PATCH] syscalls/mmap17.c: Add new regression test Xiao Yang
2018-02-02 10:20 ` Jan Stancek
2018-02-05 10:45 ` Xiao Yang
2018-02-05 11:42 ` Jan Stancek
2018-02-06 6:41 ` Xiao Yang
2018-02-06 19:53 ` Jan Stancek
2018-02-06 21:15 ` Jan Stancek
2018-02-07 12:05 ` Xiao Yang
2018-02-11 21:47 ` Jan Stancek
2018-02-14 7:34 ` Xiao Yang
2018-02-22 7:32 ` [LTP] [PATCH v3] " Xiao Yang
2018-04-04 14:31 ` Cyril Hrubis
2019-04-16 10:42 ` xuyang [this message]
2018-02-06 6:43 ` [LTP] [PATCH v2] " Xiao Yang
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=5CB5B191.90502@cn.fujitsu.com \
--to=xuyang2018.jy@cn.fujitsu.com \
--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 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.