[Openais] totempg assertions patch

Andrew Beekhof beekhof at gmail.com
Mon Sep 17 01:01:33 PDT 2007

On 9/17/07, Steven Dake <sdake at redhat.com> wrote:
> On Mon, 2007-09-17 at 09:29 +0200, Andrew Beekhof wrote:
> > On 9/16/07, Steven Dake <sdake at redhat.com> wrote:
> > > This patch verifies some assertions in totempg to ensure memory
> > > overwrites don't occur.
> >
> > one of the things the crm does* is read the header, check the size of
> > the payload and then read the rest of the message.
> >
> > this avoids the need to have a constant like MESSAGE_SIZE_MAX which,
> > based on experiences with heartbeat can be problematic.
> >
> > if i created a patch that read mar_req_header_t and then dynamically
> > created enough memory for the payload, would you consider applying it?
> >
> The MESSAGE_SIZE_MAX is used in many ways to allocate data structures
> before they are needed in a critical path of delivery where a memory
> allocation failure would result in complete failure of the totem
> protocol.  While there are likely some allocations I intend to remove
> them all or preallocate them in the future.
> mar_req_header_t is an unknown data structure to totempg and is only
> known to the service handler and ipc system components.  I also would
> like to keep the code this way so that people could link to just the
> totem library if they desired.

ok, glad i asked first :-)

have you any thoughts on what happens if that limit is reached (and
needs to be increased)?

More information about the Openais mailing list