From: Jan Stancek <jstancek@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 2/2] mm: enlarge mmap HIGH_ADDR value for s390 arch
Date: Fri, 10 Nov 2017 02:45:48 -0500 (EST) [thread overview]
Message-ID: <754021090.38693522.1510299948451.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <CAEemH2eX=pXhvV04RgAHN7DTnYxkv-9edv-2k1k60WtgOQpEpw@mail.gmail.com>
----- Original Message -----
> On Wed, Nov 8, 2017 at 4:13 PM, Jan Stancek <jstancek@redhat.com> wrote:
> >
> >
> > ----- Original Message -----
> >> The kernel commit 1aea9b3f92 (s390/mm: implement 5 level pages tables)
> >> enlarge the maximum address in the tasks address space from (1UL << 53)
> >> to (-PAGE_SIZE) on s390 platform.
> >>
> >> We have to increase the HIGH_ADDR in ltp testcases accordingly otherwise
> >> that would be failed with succeeded mmap into high region:
> >>
> >> mmap15.c:
> >> mmap15 1 TFAIL : mmap15.c:77: mmap into high region succeeded
> >> unexpectedly
> >>
> >> mmapstress03.c:
> >> mmapstress03: errno = 25: really large mmap didn't fail
> >> mmapstress03 0 TINFO : uname.machine=s390x kernel is 32bit
> >
> > Isn't this the problem? ^^
>
> No, It is an misinformation (for s390 platform) from LTP
> tst_kernel_bits() function.
That number is used to calculate size for mmap in mmapstress03.
Are you saying that after commit 1aea9b3f92, mmap for size "(1 << 63) - pagesize"
will succeed?
Regards,
Jan
>
> ====
> # uname -r
> 3.10.0-514.el7.s390x
>
> # readelf -h mmapstress03
> ELF Header:
> Magic: 7f 45 4c 46 02 02 01 00 00 00 00 00 00 00 00 00
> Class: ELF64
> Data: 2's complement, big endian
> Version: 1 (current)
> ...
>
> # ./mmapstress03
> mmapstress03 0 TINFO : uname.machine=s390x kernel is 32bit
> mmapstress03 1 TPASS : Test passed
>
>
>
> I'd suggest to fix this as:
>
> $ git diff
> diff --git a/lib/tst_kernel.c b/lib/tst_kernel.c
> index fd648b1..6d6fd38 100644
> --- a/lib/tst_kernel.c
> +++ b/lib/tst_kernel.c
> @@ -35,7 +35,8 @@ int tst_kernel_bits(void)
> * ARM64 (aarch64) defines 32-bit compatibility modes as
> * armv8l and armv8b (little and big endian).
> */
> - if (!strcmp(buf.machine, "armv8l") || !strcmp(buf.machine, "armv8b"))
> + if (!strcmp(buf.machine, "armv8l") || !strcmp(buf.machine, "armv8b")
> + || !strcmp(buf.machine, "s390x"))
> kernel_bits = 64;
>
> tst_resm(TINFO, "uname.machine=%s kernel is %ibit",
>
>
>
> --
> Li Wang
> liwang@redhat.com
>
next prev parent reply other threads:[~2017-11-10 7:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-25 3:30 [LTP] [PATCH 1/2] ltp: typos correction Li Wang
2017-10-25 3:30 ` [LTP] [PATCH 2/2] mm: enlarge mmap HIGH_ADDR value for s390 arch Li Wang
2017-11-08 8:13 ` Jan Stancek
2017-11-10 3:18 ` Li Wang
2017-11-10 7:45 ` Jan Stancek [this message]
2017-11-10 8:19 ` Li Wang
2017-11-10 6:04 ` Li Wang
2017-11-10 6:04 ` Li Wang
2017-10-25 7:16 ` [LTP] [PATCH 1/2] ltp: typos correction Cyril Hrubis
2017-10-25 7:34 ` Li Wang
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=754021090.38693522.1510299948451.JavaMail.zimbra@redhat.com \
--to=jstancek@redhat.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.