Re: [Powertop] A series of patches towards limiting memory corruption and foot print

Alexandra Yates <alexandra.yates at linux.intel.com>
Newsgroups dev.linux.lists.powertop
Message-ID <[email protected]>
> On (05/01/14 14:11), Kalowsky, Daniel wrote:
>>    Sorry about a second post, looks like email stripped the
>> attachements. 
>>    Second attempt here.
>
> Hello,
>
> it's much easier to review/comment/etc if a patch is inlined in your
> email, in plain text. (http://www.tux.org/lkml/#s1-10)
>
> care to resend using git send-email?
> thanks.
>
> 	-ss

Hi Dan,

Thank you for re-sending your patches.  This time I added the patches to
PowerTOP v2.6-rc2 to facilitate other people's reviews.  However, in the
future please send your patches using git send-mail.  As Sergey indicated
that is a easier way for every one to review patches.

Thank you,
Alexandra.

>
>>     
>>
>>    From: PowerTop [mailto:powertop-bounces(a)lists.01.org] On Behalf Of
>>    Kalowsky, Daniel
>>    Sent: Tuesday, April 29, 2014 5:15 PM
>>    To: powertop(a)lists.01.org
>>    Subject: [Powertop] A series of patches towards limiting memory
>> corruption
>>    and foot print
>>
>>     
>>
>>    Hi Powertop,
>>
>>     
>>
>>    I’ve been working with the interactive mode and have run into cases
>> where
>>    powertop will crash due to a series of memory corruptions.  The
>> following
>>    series of patches have helped to reduce the frequency of the issue,
>>    although not completely solved it.  The issues arise much faster on
>>    platforms where there are constrained amounts of RAM to work within.
>>
>>     
>>
>>    Patch 1 – When shutting down the interactive display, the display
>> bits of
>>    memory is not correctly released.  This patch provides a method for
>>    correctly doing so. 
>>
>>     
>>
>>    Patch 2 – Solving a documented memory leak with a non-elegant
>> solution. 
>>    The path either adds the bundle to the stack, or it forgets about
>> it.  If
>>    it is forgotten about, make sure to clear that memory before moving
>> on. 
>>    This is done with a simple flag variable being set. 
>>
>>     
>>
>>    Patch 3 – When the tuning window is updated, the current pointer is
>> just
>>    set adrift and not properly free’d.  This patch catches that issue
>> and
>>    removes the dangling pointer by holding a reference to the pointer
>> until
>>    it is reset or specifically free’d.
>>
>>     
>>
>>    Patch 4 – Someone actually added in the code to create a onetime
>>    pretty-print array, this patch just puts it to use by setting the
>>    variable. 
>>
>>     
>>
>>    Patch 5 – Limiting the buffer copy to the size of the allocated
>> buffer
>>    with snprintf.
>>
>>     
>>
>>    Patch 6 – There exist some processes and entries that can and do
>> extend
>>    beyond the length of these buffers.  This limits those entries so as
>> not
>>    to corrupt other memory on the system when in interactive mode. 
>>
>>     
>>
>>    Patch 7 – This is an untested patch, but follows along the same
>> lines of
>>    Patch 6.  It applies the same principals only for the report
>> method. 
>>
>>     
>>
>>    Patch 8 – Creates a clean_shutdown function that can be used to
>> cleanup
>>    the memory space at shutdown time.  Calls upon parts of Patch 1 to
>> make
>>    this happen. 
>>
>>     
>>
>>    There will more than likely be some more patches in the future as
>> time
>>    permits. 
>
>
>> _______________________________________________
>> PowerTop mailing list
>> PowerTop(a)lists.01.org
>> https://lists.01.org/mailman/listinfo/powertop
>
> _______________________________________________
> PowerTop mailing list
> PowerTop(a)lists.01.org
> https://lists.01.org/mailman/listinfo/powertop
>


Thank you,
Alexandra.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.