From: Sergey Senozhatsky <sergey.senozhatsky at gmail.com>
To: powertop@lists.01.org
Subject: Re: [Powertop] A series of patches towards limiting memory corruption and foot print
Date: Thu, 01 May 2014 22:28:43 +0300 [thread overview]
Message-ID: <20140501192843.GA938@swordfish> (raw)
In-Reply-To: 4628F0C61321354285DF2950999754456DF935BE@ORSMSX114.amr.corp.intel.com
[-- 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
next reply other threads:[~2014-05-01 19:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-01 19:28 Sergey Senozhatsky [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-05-05 22:40 [Powertop] A series of patches towards limiting memory corruption and foot print Alexandra Yates
2014-05-01 14:11 Kalowsky, Daniel
2014-04-30 0:15 Kalowsky, Daniel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140501192843.GA938@swordfish \
--to=powertop@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.