public inbox for linux-mediatek@lists.infradead.org
 help / color / mirror / Atom feed
From: Kobe-CP Wu <Kobe-CP.Wu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
To: Peter Zijlstra <peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
Cc: linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	Ingo Molnar <mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>,
	wsd_upstream-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org,
	Eason Lin <eason-yh.lin-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH] locking/lockdep: Fix UBSAN warnings
Date: Wed, 12 Jun 2019 20:35:41 +0800	[thread overview]
Message-ID: <1560342941.16581.2.camel@mtkswgap22> (raw)
In-Reply-To: <20190612073425.GD3436-Nxj+rRp3nVydTX5a5knrm8zTDFooKrT+cvkQGrU6aU0@public.gmane.org>

On Wed, 2019-06-12 at 09:34 +0200, Peter Zijlstra wrote:
> On Wed, Jun 12, 2019 at 01:49:04PM +0800, Kobe Wu wrote:
> > Fix complaints from UBSAN about signed integer overflow.
> > 
> > ========================================================================
> > UBSAN: Undefined behaviour in kernel/locking/lockdep.c:2998:3
> > signed integer overflow:
> 
> I don't mind the patch, but this is an UBSAN bug and cannot therefore be
> a reason.

I think the description could be amended as follows.
There is unnecessary to mention the UBSAN bug.

locking/lockdep: add size of counters for lockdep statistics

When system has been running for a long time, signed integer counters 
are not enough for some lockdep statistics. Using unsigned long counters
can satisfy the requirement. Besides, most of lockdep statistics are 
unsigned. It is better to use unsigned int instead of int.

      parent reply	other threads:[~2019-06-12 12:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-12  5:49 [PATCH] locking/lockdep: Fix UBSAN warnings Kobe Wu
     [not found] ` <1560318544-27635-1-git-send-email-kobe-cp.wu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2019-06-12  7:34   ` Peter Zijlstra
     [not found]     ` <20190612073425.GD3436-Nxj+rRp3nVydTX5a5knrm8zTDFooKrT+cvkQGrU6aU0@public.gmane.org>
2019-06-12 12:35       ` Kobe-CP Wu [this message]

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=1560342941.16581.2.camel@mtkswgap22 \
    --to=kobe-cp.wu-nus5lvnupcjwk0htik3j/w@public.gmane.org \
    --cc=eason-yh.lin-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
    --cc=linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
    --cc=will.deacon-5wv7dgnIgG8@public.gmane.org \
    --cc=wsd_upstream-NuS5LvNUpcJWk0Htik3J/w@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox