From: "Mihai Donțu" <mdontu@bitdefender.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel@lists.xenproject.org
Subject: Re: [PATCH v2] xmalloc: add support for checking the pool integrity
Date: Mon, 8 Dec 2014 18:00:01 +0200 [thread overview]
Message-ID: <20141208180001.086cb5e6@bitdefender.com> (raw)
In-Reply-To: <548588E9020000780004DAF4@mail.emea.novell.com>
On Monday 08 December 2014 10:18:01 Jan Beulich wrote:
> >>> On 08.12.14 at 03:30, <mdontu@bitdefender.com> wrote:
> > +#ifndef NDEBUG
> > +static bool_t xmem_pool_check_size(const struct bhdr *b, int fl, int sl)
> > +{
> > + while ( b )
> > + {
> > + int __fl;
> > + int __sl;
> > +
> > + MAPPING_INSERT(b->size, &__fl, &__sl);
> > + if ( __fl != fl || __sl != sl )
> > + {
> > + printk(XENLOG_ERR "xmem_pool: for block %p size = %u, { fl = %d, sl = %d } should be { fl = %d, sl = %d }\n",
>
> Quoting my reply to v1: "Long line. Only the format message alone
> is allowed to exceed 80 characters."
>
Just so I don't send another faulty patch, you would see that printk()
being:
printk(XENLOG_ERR
"xmem_pool: for block %p size = %u, { fl = %d, sl = %d } should be { fl = %d, sl = %d }\n",
b, b->size, fl, sl, __fl, __sl);
?
> Also with there potentially being multiple pools, shouldn't all of the
> log messages the patch issues be extended to allow identifying the
> offending one?
>
I think I can insert the pool name in that message too. Something like:
printk(XENLOG_ERR
"xmem_pool: %s: for block [...]\n",
pool->name, b, b->size [...]);
would do? A quick preview:
[2014-12-04 15:41:23] (XEN) [ 1374.507125] xmem_pool: xmalloc: for block ffff8304004fb9b0 size = 0, { fl = 3, sl = 9 } should be { fl = 0, sl = 0 }
[2014-12-04 15:41:23] (XEN) [ 1374.507127] xmem_pool: xmalloc: the TLSF chunk matrix is corrupted
> > +bool_t __xmem_pool_check(const char *file, int line, struct xmem_pool *pool)
> > +{
> > + return __xmem_pool_check_unlocked(file, line, pool ? pool : xenpool);
>
> For brevity, the shorter "pool ?: xenpool" is generally preferable. The
> only place using this is not allowed are the public headers.
>
Will do.
Thank you,
--
Mihai DONȚU
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2014-12-08 16:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-08 2:30 [PATCH v2] xmalloc: add support for checking the pool integrity Mihai Donțu
2014-12-08 2:38 ` Mihai Donțu
2014-12-08 10:18 ` Jan Beulich
2014-12-08 16:00 ` Mihai Donțu [this message]
2014-12-08 16:04 ` Ian Campbell
2014-12-08 16:28 ` Mihai Donțu
2014-12-08 16:23 ` Jan Beulich
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=20141208180001.086cb5e6@bitdefender.com \
--to=mdontu@bitdefender.com \
--cc=JBeulich@suse.com \
--cc=xen-devel@lists.xenproject.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.