Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 May 2003 09:46:20 +0200
From:      Vincent Jardin <vjardin@wanadoo.fr>
To:        Mike Silbersack <silby@silby.com>, freebsd-net@freebsd.org
Subject:   Re: More mbuf INVARIANTS code, comments needed
Message-ID:  <200305020946.20514.vjardin@wanadoo.fr>
In-Reply-To: <20030502010545.U610@odysseus.silby.com>
References:  <20030502010545.U610@odysseus.silby.com>

next in thread | previous in thread | raw e-mail | index | archive | help
It is a good idea. I do not see any problems with your patch.

An esthetic comment:
I would prefer to see other trivial hexadecimal values like:
  - 0xd0 (as in "Duh", used by stdlib/malloc())
  - or 0xdeadc0de (used by kern_malloc.c:#define WEIRD_ADDR  0xdeadc0de)
  - or 0xdead0137, 0xdead0138, 0xdead0139, ...

According to me, these values are easier to analyse when you get a panic =
or=20
when you dump the memory.

Regards,
  Vincent

On Friday 02 May 2003 08:08, Mike Silbersack wrote:
> Now that I have the double-free code in (under INVARIANTS), I'm
> considering the attached patch as well; it fills the m_data, m_next, an=
d
> m_nextpkt fields with non-NULL garbage in hopes that any uses after fre=
e
> will be immediately fatal.
>
> Does anyone see problems with this, and/or other simple checks that cou=
ld
> be added cheaply?
>
> Thanks,
>
> Mike "Silby" Silbersack



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200305020946.20514.vjardin>