Linux Test Project
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] mtest06/mmap1: Further limit distant mmap size
Date: Thu, 20 May 2021 13:17:29 +0200	[thread overview]
Message-ID: <YKZFSfvZK+79K9Pv@yuki> (raw)
In-Reply-To: <CAASaF6y2XaLjHwfErwez4zo2NYFLoScROGocK0ibH1pVZcia1w@mail.gmail.com>

Hi!
> > Though on recent kernels (starting with 5.2, commit
> > 8c7829b04c523cdc732cb77f59f03320e09f3386 ("mm: fix false-positive
> > OVERCOMMIT_GUESS failures"), overcommit accounting allows for allocating up
> > to MemTotal memory, older kernels have a much more complicated overcommit
> > guess accounting.
> >
> > That leads to mmap failing on small enough systems:
> >
> > mmap1.c:205: TBROK: mmap((nil),2088370176,3,34,-1,0) failed: ENOMEM (12)
> >
> > Allocating only half of the total memory would generally work on test
> > systems.
> >
> > Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
> 
> Thanks for patch.
> 
> Acked-by: Jan Stancek <jstancek@redhat.com>

Looks safe enough for the release, as far as I can tell the test
shouldn't care at all where we map the block of memory.

Jan looks like you originaly wrote the test, do you agree that this
should go in now?

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2021-05-20 11:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-19 13:19 [LTP] [PATCH] mtest06/mmap1: Further limit distant mmap size Thadeu Lima de Souza Cascardo
2021-05-20 10:24 ` Jan Stancek
2021-05-20 11:17   ` Cyril Hrubis [this message]
2021-05-20 11:55     ` Jan Stancek
2021-05-20 11:44 ` 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=YKZFSfvZK+79K9Pv@yuki \
    --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