linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrey Ryabinin <aryabinin@virtuozzo.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Paul Menzel <pmenzel+linux-kasan-dev@molgen.mpg.de>,
	Alexander Potapenko <glider@google.com>,
	Dmitry Vyukov <dvyukov@google.com>,
	kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, stable@vger.kernel.org
Subject: Re: [PATCH] mm/kasan: Don't vfree() nonexistent vm_area.
Date: Mon, 5 Feb 2018 11:48:33 +0300	[thread overview]
Message-ID: <5ea1af5e-213d-5881-652a-c3f2c535254a@virtuozzo.com> (raw)
In-Reply-To: <20180202172027.GB16840@bombadil.infradead.org>



On 02/02/2018 08:20 PM, Matthew Wilcox wrote:
> On Thu, Feb 01, 2018 at 11:22:55PM +0300, Andrey Ryabinin wrote:
>>>> +		vm = find_vm_area((void *)shadow_start);
>>>> +		if (vm)
>>>> +			vfree((void *)shadow_start);
>>>> +	}
>>>
>>> This looks like a complicated way to spell 'is_vmalloc_addr' ...
>>>
>>
>> It's not. shadow_start is never vmalloc address.
> 
> I'm confused.  How can you call vfree() on something that isn't a vmalloc
> address?
> 

a??vfree() is able to free any address returned by __vmalloc_node_range().
And __vmalloc_node_range() gives you any address you ask.
It doesn't have to be an address in [VMALLOC_START, VMALLOC_END] range.

That's also how the module_alloc()/module_memfree() works on architectures that
have designated area for modules.

--
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:[~2018-02-05  8:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <12c9e499-9c11-d248-6a3f-14ec8c4e07f1@molgen.mpg.de>
2018-02-01 16:33 ` [PATCH] mm/kasan: Don't vfree() nonexistent vm_area Andrey Ryabinin
2018-02-01 19:57   ` Matthew Wilcox
2018-02-01 20:22     ` Andrey Ryabinin
2018-02-02 17:20       ` Matthew Wilcox
2018-02-05  8:48         ` Andrey Ryabinin [this message]
2018-05-18 15:57   ` David Hildenbrand
2018-05-18 16:01     ` David Hildenbrand
2018-05-22 16:44   ` Andrey Ryabinin
2018-05-22 21:03     ` Andrew Morton
2018-05-23 12:33       ` Andrey Ryabinin
2018-05-26  3:31         ` [PATCH] mm-kasan-dont-vfree-nonexistent-vm_area-fix kbuild test robot
2018-05-26  3:48           ` Andrew Morton
2018-05-28  4:13             ` Ian Kent
2018-05-28  4:39               ` Ian Kent
2018-05-29  4:01                 ` Ian Kent
2018-05-30 11:53         ` kbuild test robot

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=5ea1af5e-213d-5881-652a-c3f2c535254a@virtuozzo.com \
    --to=aryabinin@virtuozzo.com \
    --cc=akpm@linux-foundation.org \
    --cc=dvyukov@google.com \
    --cc=glider@google.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=pmenzel+linux-kasan-dev@molgen.mpg.de \
    --cc=stable@vger.kernel.org \
    --cc=willy@infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).