Re: RFC v2: post-init-read-only protection for data allocated dynamically

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri 05-05-17 15:19:19, Igor Stoppa wrote:
> 
> 
> On 04/05/17 17:01, Michal Hocko wrote:
> > On Thu 04-05-17 16:37:55, Igor Stoppa wrote:
> 
> [...]
> 
> >> The disadvantage is that anything can happen, undetected, while the seal
> >> is lifted.
> > 
> > Yes and I think this makes it basically pointless
> 
> ok, this goes a bit beyond what I had in mind initially, but I see your
> point
> 
> [...]
> 
> > Just to make my proposal more clear. I suggest the following workflow
> > 
> > cache = kmem_cache_create(foo, object_size, ..., SLAB_SEAL);
> >
> > obj = kmem_cache_alloc(cache, gfp_mask);
> > init_obj(obj)
> > [more allocations]
> > kmem_cache_seal(cache);
> 
> In case one doesn't want the feature, at which point would it be disabled?
> 
> * not creating the slab
> * not sealing it
> * something else?

If the sealing would be disabled then sealing would be a noop.

-- 
Michal Hocko
SUSE Labs

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



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]
  Powered by Linux