Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1625826

Re: [PATCH v2] mm: add VM_STATIC flag to vmalloc and prevent from removing the areas

From Hoeun Ryu <hoeun.ryu@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2] mm: add VM_STATIC flag to vmalloc and prevent from removing the areas
Date 2017-04-19 07:40 +0200
Message-ID <txQvn-7M4-5@gated-at.bofh.it> (permalink)
References <txulc-2nb-9@gated-at.bofh.it> <txvqW-3eI-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


> On Apr 18, 2017, at 3:59 PM, Michal Hocko <mhocko@kernel.org> wrote:
> 
>> On Tue 18-04-17 14:48:39, Hoeun Ryu wrote:
>> vm_area_add_early/vm_area_register_early() are used to reserve vmalloc area
>> during boot process and those virtually mapped areas are never unmapped.
>> So `OR` VM_STATIC flag to the areas in vmalloc_init() when importing
>> existing vmlist entries and prevent those areas from being removed from the
>> rbtree by accident.
> 
> Has this been a problem in the past or currently so that it is worth
> handling?
> 
>> This flags can be also used by other vmalloc APIs to
>> specify that the area will never go away.
> 
> Do we have a user for that?
> 
>> This makes remove_vm_area() more robust against other kind of errors (eg.
>> programming errors).
> 
> Well, yes it will help to prevent from vfree(early_mem) but we have 4
> users of vm_area_register_early so I am really wondering whether this is
> worth additional code. It would really help to understand your
> motivation for the patch if we were explicit about the problem you are
> trying to solve.

I just think that it would be good to make it robust against various kind of errors.
You might think that's not an enough reason to do so though.

> 
> Thanks
> 
> -- 
> Michal Hocko
> SUSE Labs

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v2] mm: add VM_STATIC flag to vmalloc and prevent from removing the areas Hoeun Ryu <hoeun.ryu@gmail.com> - 2017-04-18 08:00 +0200
  Re: [PATCH v2] mm: add VM_STATIC flag to vmalloc and prevent from  removing the areas Michal Hocko <mhocko@kernel.org> - 2017-04-18 09:10 +0200
    Re: [PATCH v2] mm: add VM_STATIC flag to vmalloc and prevent from removing the areas Hoeun Ryu <hoeun.ryu@gmail.com> - 2017-04-19 07:40 +0200

csiph-web