From: Joerg Roedel <jroedel@suse.de>
To: Joerg Roedel <joro@8bytes.org>
Cc: Tony Luck <tony.luck@intel.com>,
Fenghua Yu <fenghua.yu@intel.com>,
linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ia64: Return -ENOMEM in ia64_mmap_check() error case
Date: Tue, 02 Jun 2015 09:09:18 +0000 [thread overview]
Message-ID: <20150602090918.GE16345@suse.de> (raw)
In-Reply-To: <1431984439-15008-1-git-send-email-joro@8bytes.org>
Ping. Tony, Fenghua, any opinion on this?
On Mon, May 18, 2015 at 11:27:19PM +0200, Joerg Roedel wrote:
> From: Joerg Roedel <jroedel@suse.de>
>
> The value -ENOMEM is the expected return code for mmap when
> the address range verification failes on a MAP_FIXED
> request, as stated in the specification:
>
> [ENOMEM]
> MAP_FIXED was specified, and the range
> [addr,addr+len) exceeds that allowed for the
> address space of a process;
>
> The ia64_mmap_check() function is part of that verification
> and should return -ENOMEM too.
>
> Signed-off-by: Joerg Roedel <jroedel@suse.de>
> ---
> arch/ia64/kernel/sys_ia64.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/ia64/kernel/sys_ia64.c b/arch/ia64/kernel/sys_ia64.c
> index 41e33f8..e927023 100644
> --- a/arch/ia64/kernel/sys_ia64.c
> +++ b/arch/ia64/kernel/sys_ia64.c
> @@ -124,7 +124,7 @@ int ia64_mmap_check(unsigned long addr, unsigned long len,
> */
> roff = REGION_OFFSET(addr);
> if ((len > RGN_MAP_LIMIT) || (roff > (RGN_MAP_LIMIT - len)))
> - return -EINVAL;
> + return -ENOMEM;
> return 0;
> }
>
> --
> 1.8.4.5
WARNING: multiple messages have this Message-ID (diff)
From: Joerg Roedel <jroedel@suse.de>
To: Joerg Roedel <joro@8bytes.org>
Cc: Tony Luck <tony.luck@intel.com>,
Fenghua Yu <fenghua.yu@intel.com>,
linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ia64: Return -ENOMEM in ia64_mmap_check() error case
Date: Tue, 2 Jun 2015 11:09:18 +0200 [thread overview]
Message-ID: <20150602090918.GE16345@suse.de> (raw)
In-Reply-To: <1431984439-15008-1-git-send-email-joro@8bytes.org>
Ping. Tony, Fenghua, any opinion on this?
On Mon, May 18, 2015 at 11:27:19PM +0200, Joerg Roedel wrote:
> From: Joerg Roedel <jroedel@suse.de>
>
> The value -ENOMEM is the expected return code for mmap when
> the address range verification failes on a MAP_FIXED
> request, as stated in the specification:
>
> [ENOMEM]
> MAP_FIXED was specified, and the range
> [addr,addr+len) exceeds that allowed for the
> address space of a process;
>
> The ia64_mmap_check() function is part of that verification
> and should return -ENOMEM too.
>
> Signed-off-by: Joerg Roedel <jroedel@suse.de>
> ---
> arch/ia64/kernel/sys_ia64.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/ia64/kernel/sys_ia64.c b/arch/ia64/kernel/sys_ia64.c
> index 41e33f8..e927023 100644
> --- a/arch/ia64/kernel/sys_ia64.c
> +++ b/arch/ia64/kernel/sys_ia64.c
> @@ -124,7 +124,7 @@ int ia64_mmap_check(unsigned long addr, unsigned long len,
> */
> roff = REGION_OFFSET(addr);
> if ((len > RGN_MAP_LIMIT) || (roff > (RGN_MAP_LIMIT - len)))
> - return -EINVAL;
> + return -ENOMEM;
> return 0;
> }
>
> --
> 1.8.4.5
next prev parent reply other threads:[~2015-06-02 9:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-18 21:27 [PATCH] ia64: Return -ENOMEM in ia64_mmap_check() error case Joerg Roedel
2015-05-18 21:27 ` Joerg Roedel
2015-06-02 9:09 ` Joerg Roedel [this message]
2015-06-02 9:09 ` Joerg Roedel
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=20150602090918.GE16345@suse.de \
--to=jroedel@suse.de \
--cc=fenghua.yu@intel.com \
--cc=joro@8bytes.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tony.luck@intel.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 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.