All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Chris Metcalf <cmetcalf@ezchip.com>
Cc: Piotr Kwapulinski <kwapulinski.piotr@gmail.com>,
	akpm@linux-foundation.org, mszeredi@suse.cz,
	viro@zeniv.linux.org.uk, dave@stgolabs.net,
	kirill.shutemov@linux.intel.com, n-horiguchi@ah.jp.nec.com,
	aarcange@redhat.com, mhocko@suse.com, iamjoonsoo.kim@lge.com,
	jack@suse.cz, xiexiuqi@huawei.com, vbabka@suse.cz,
	Vineet.Gupta1@synopsys.com, riel@redhat.com,
	gang.chen.5i5j@gmail.com, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org
Subject: Re: [PATCH] mm: fix incorrect behavior when process virtual address space limit is exceeded
Date: Tue, 17 Nov 2015 20:03:50 +0100	[thread overview]
Message-ID: <20151117190350.GA9790@redhat.com> (raw)
In-Reply-To: <564B6605.8080808@ezchip.com>

On 11/17, Chris Metcalf wrote:
>
> On 11/17/2015 11:19 AM, Oleg Nesterov wrote:
>> On 11/16, Piotr Kwapulinski wrote:
>>> @@ -1551,7 +1552,7 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
>>>   		 * MAP_FIXED may remove pages of mappings that intersects with
>>>   		 * requested mapping. Account for the pages it would unmap.
>>>   		 */
>>> -		if (!(vm_flags & MAP_FIXED))
>>> +		if (!(flags & MAP_FIXED))
>>>   			return -ENOMEM;
>> And afaics arch/tile/mm/elf.c can use do_mmap(MAP_FIXED ...) rather than
>> mmap_region(), it can be changed by a separate patch. In this case we can
>> unexport mmap_region().
>
> The problem is that we are mapping a region of virtual address space that
> the chip provides for setting up interrupt handlers (at 0xfc000000) but that
> is above the TASK_SIZE cutoff,

Ah, I didn't bother to read the comment in arch_setup_additional_pages().
Thanks for your explanation.

Oleg.


WARNING: multiple messages have this Message-ID (diff)
From: Oleg Nesterov <oleg@redhat.com>
To: Chris Metcalf <cmetcalf@ezchip.com>
Cc: Piotr Kwapulinski <kwapulinski.piotr@gmail.com>,
	akpm@linux-foundation.org, mszeredi@suse.cz,
	viro@zeniv.linux.org.uk, dave@stgolabs.net,
	kirill.shutemov@linux.intel.com, n-horiguchi@ah.jp.nec.com,
	aarcange@redhat.com, mhocko@suse.com, iamjoonsoo.kim@lge.com,
	jack@suse.cz, xiexiuqi@huawei.com, vbabka@suse.cz,
	Vineet.Gupta1@synopsys.com, riel@redhat.com,
	gang.chen.5i5j@gmail.com, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org
Subject: Re: [PATCH] mm: fix incorrect behavior when process virtual address space limit is exceeded
Date: Tue, 17 Nov 2015 20:03:50 +0100	[thread overview]
Message-ID: <20151117190350.GA9790@redhat.com> (raw)
In-Reply-To: <564B6605.8080808@ezchip.com>

On 11/17, Chris Metcalf wrote:
>
> On 11/17/2015 11:19 AM, Oleg Nesterov wrote:
>> On 11/16, Piotr Kwapulinski wrote:
>>> @@ -1551,7 +1552,7 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
>>>   		 * MAP_FIXED may remove pages of mappings that intersects with
>>>   		 * requested mapping. Account for the pages it would unmap.
>>>   		 */
>>> -		if (!(vm_flags & MAP_FIXED))
>>> +		if (!(flags & MAP_FIXED))
>>>   			return -ENOMEM;
>> And afaics arch/tile/mm/elf.c can use do_mmap(MAP_FIXED ...) rather than
>> mmap_region(), it can be changed by a separate patch. In this case we can
>> unexport mmap_region().
>
> The problem is that we are mapping a region of virtual address space that
> the chip provides for setting up interrupt handlers (at 0xfc000000) but that
> is above the TASK_SIZE cutoff,

Ah, I didn't bother to read the comment in arch_setup_additional_pages().
Thanks for your explanation.

Oleg.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2015-11-17 18:07 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-16 17:36 [PATCH] mm: fix incorrect behavior when process virtual address space limit is exceeded Piotr Kwapulinski
2015-11-16 17:36 ` Piotr Kwapulinski
2015-11-16 20:52 ` Michal Hocko
2015-11-16 20:52   ` Michal Hocko
2015-11-17  0:33   ` Michal Hocko
2015-11-17  0:33     ` Michal Hocko
2015-11-18 14:32   ` Cyril Hrubis
2015-11-18 14:32     ` Cyril Hrubis
2015-11-17 16:19 ` Oleg Nesterov
2015-11-17 16:19   ` Oleg Nesterov
2015-11-17 16:33   ` Oleg Nesterov
2015-11-17 16:33     ` Oleg Nesterov
2015-11-17 17:26   ` [PATCH] mm/mmap.c: remove incorrect MAP_FIXED flag comparison from mmap_region Piotr Kwapulinski
2015-11-17 17:26     ` Piotr Kwapulinski
2015-11-18  0:52     ` Andrew Morton
2015-11-18  0:52       ` Andrew Morton
2015-11-18 16:29       ` Piotr Kwapulinski
2015-11-18 16:29         ` Piotr Kwapulinski
2015-11-20 16:38         ` [PATCH v2 1/2] mm: fix incorrect behavior when process virtual address space limit is exceeded Piotr Kwapulinski
2015-11-20 16:38           ` Piotr Kwapulinski
2015-11-20 16:42         ` [PATCH v2 2/2] mm/mmap.c: remove incorrect MAP_FIXED flag comparison from mmap_region Piotr Kwapulinski
2015-11-20 16:42           ` Piotr Kwapulinski
2015-11-23  8:19           ` Michal Hocko
2015-11-23  8:19             ` Michal Hocko
2015-11-23 17:36             ` [PATCH v3] " Piotr Kwapulinski
2015-11-23 17:36               ` Piotr Kwapulinski
2015-11-23 22:14               ` Andrew Morton
2015-11-23 22:14                 ` Andrew Morton
2015-11-24 16:12                 ` Piotr Kwapulinski
2015-11-24 16:12                   ` Piotr Kwapulinski
2015-11-27  5:27               ` Naoya Horiguchi
2015-11-27  5:27                 ` Naoya Horiguchi
2015-11-17 17:38   ` [PATCH] mm: fix incorrect behavior when process virtual address space limit is exceeded Chris Metcalf
2015-11-17 17:38     ` Chris Metcalf
2015-11-17 19:03     ` Oleg Nesterov [this message]
2015-11-17 19:03       ` Oleg Nesterov

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=20151117190350.GA9790@redhat.com \
    --to=oleg@redhat.com \
    --cc=Vineet.Gupta1@synopsys.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=cmetcalf@ezchip.com \
    --cc=dave@stgolabs.net \
    --cc=gang.chen.5i5j@gmail.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=jack@suse.cz \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=kwapulinski.piotr@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=mszeredi@suse.cz \
    --cc=n-horiguchi@ah.jp.nec.com \
    --cc=riel@redhat.com \
    --cc=vbabka@suse.cz \
    --cc=viro@zeniv.linux.org.uk \
    --cc=xiexiuqi@huawei.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.