All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Powertop] A series of patches towards limiting memory corruption and foot print
@ 2014-05-05 22:40 Alexandra Yates
  0 siblings, 0 replies; 4+ messages in thread
From: Alexandra Yates @ 2014-05-05 22:40 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 3842 bytes --]

> 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.

^ permalink raw reply	[flat|nested] 4+ messages in thread
* Re: [Powertop] A series of patches towards limiting memory corruption and foot print
@ 2014-05-01 19:28 Sergey Senozhatsky
  0 siblings, 0 replies; 4+ messages in thread
From: Sergey Senozhatsky @ 2014-05-01 19:28 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 3092 bytes --]

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

>     
> 
>    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


^ permalink raw reply	[flat|nested] 4+ messages in thread
* Re: [Powertop] A series of patches towards limiting memory corruption and foot print
@ 2014-05-01 14:11 Kalowsky, Daniel
  0 siblings, 0 replies; 4+ messages in thread
From: Kalowsky, Daniel @ 2014-05-01 14:11 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 2243 bytes --]

Sorry about a second post, looks like email stripped the attachements.  Second attempt here.

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.

[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 5355 bytes --]

[-- Attachment #3: powertop-patches.7z --]
[-- Type: application/octet-stream, Size: 3998 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread
* [Powertop] A series of patches towards limiting memory corruption and foot print
@ 2014-04-30  0:15 Kalowsky, Daniel
  0 siblings, 0 replies; 4+ messages in thread
From: Kalowsky, Daniel @ 2014-04-30  0:15 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 1899 bytes --]

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.

[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 4512 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-05-05 22:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-05 22:40 [Powertop] A series of patches towards limiting memory corruption and foot print Alexandra Yates
  -- strict thread matches above, loose matches on Subject: below --
2014-05-01 19:28 Sergey Senozhatsky
2014-05-01 14:11 Kalowsky, Daniel
2014-04-30  0:15 Kalowsky, Daniel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.