Re: [RFC PATCH v1 01/33] mm: introduce common help functions to deal with reserved/managed pages

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

 



On Tue, Mar 05, 2013 at 08:47:22PM +0100, Sam Ravnborg wrote:
> On Tue, Mar 05, 2013 at 10:54:44PM +0800, Jiang Liu wrote:
> > +static inline void free_initmem_default(int poison)
> > +{
> 
> Why request user to supply the poison argumet. If this is the default
> implmentation then use the default poison value too (POISON_FREE_INITMEM)

That poison value is inappropriate on some architectures like ARM - it's
executable.  The default poison value leads to:

   0:	cccccccc 	stclgt	12, cr12, [ip], {204}	; 0xcc

or

   4:	cccc      	ldmia	r4!, {r2, r3, r6, r7}

And we might as well forget using any kind of poison in that case.

The value which use is an undefined instruction on ARM and Thumb.

Notice the calls to poison_init_mem() in arch/arm/mm/init.c, which are
left by these patches, allowing us to continue using an appropriate
architecture specific value which will help to ensure that people
calling discarded init functions get appropriately bitten.
_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux