public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: chrubis@suse.cz
To: Li Wang <wangli.ahau@gmail.com>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH] mmap15: don't fail if mmap returns EINVAL
Date: Mon, 25 Aug 2014 13:07:02 +0200	[thread overview]
Message-ID: <20140825110702.GA9330@rei.suse.cz> (raw)
In-Reply-To: <CAE1O6mgqn51jh-ib5vXUL8P2kBuJMbG1Wg6WPFp8y2p6Vp74kQ@mail.gmail.com>

Hi!
If I remember right it's POSIX requirement to return ENOMEM in this case
and EINVAL sometimes slips in into kernel arch specific memory
management code.

Citing POSIX:

[ENOMEM]
	MAP_FIXED was specified, and the range [addr,addr+len) exceeds that
	allowed for the address space of a process;

So if the testcase fails, it's a bug albeit a minor one.

What we should do depends on how strict we are. I would personaly change
the testcase to have specific failure message for EINVAL, ideally
pointing to this discussion on mailing list archive. But if all the rest
of you consider this minor enough to be ignored we can proceed with the
original patch as well.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  parent reply	other threads:[~2014-08-25 11:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-22  6:45 [LTP] [PATCH] mmap15: don't fail if mmap returns EINVAL Jan Stancek
2014-08-22  8:05 ` Wanlong Gao
2014-08-22 13:35   ` Stanislav Kholmanskikh
     [not found]     ` <CAE1O6mgqn51jh-ib5vXUL8P2kBuJMbG1Wg6WPFp8y2p6Vp74kQ@mail.gmail.com>
2014-08-25 11:07       ` chrubis [this message]
     [not found]         ` <1721706552.12305163.1408967269010.JavaMail.zimbra@redhat.com>
2014-08-25 12:05           ` chrubis

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=20140825110702.GA9330@rei.suse.cz \
    --to=chrubis@suse.cz \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=wangli.ahau@gmail.com \
    /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