All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wu Fengguang <fengguang.wu@intel.com>
To: "Américo Wang" <xiyou.wangcong@gmail.com>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>,
	"mrubin@google.com" <mrubin@google.com>,
	"david@fromorbit.com" <david@fromorbit.com>,
	"axboe@kernel.dk" <axboe@kernel.dk>,
	"kosaki.motohiro@jp.fujitsu.com" <kosaki.motohiro@jp.fujitsu.com>,
	"nickpiggin@yahoo.com.au" <nickpiggin@yahoo.com.au>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"torvalds@linux-foundation.org" <torvalds@linux-foundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [2.6.37-rc1] /proc/vmstat failure.
Date: Thu, 4 Nov 2010 10:53:41 +0800	[thread overview]
Message-ID: <20101104025341.GA18429@localhost> (raw)
In-Reply-To: <20101104025251.GA5210@cr0.nay.redhat.com>

On Thu, Nov 04, 2010 at 10:52:51AM +0800, Américo Wang wrote:
> On Thu, Nov 04, 2010 at 10:20:52AM +0800, Wu Fengguang wrote:
> >On Thu, Nov 04, 2010 at 05:54:48AM +0800, Tetsuo Handa wrote:
> >> Wu Fengguang wrote:
> >> > On Wed, Nov 03, 2010 at 07:11:11PM +0800, Tetsuo Handa wrote:
> >> > > Hello.
> >> > > 
> >> > > "cat /proc/vmstat" triggered below failure.
> >> > > 
> >> > > BUG: unable to handle kernel paging request at 07c06d16
> >> > > IP: [<c050c336>] strnlen+0x6/0x20
> >> > 
> >> > It seems that m->private is of type (void *) while the original v is
> >> > (unsigned long *). Can be fixed by the following patch.
> >> 
> >> Fixed by this patch. Thank you.
> >
> >Great, thanks!
> >
> >> By the way, GCC treats "(void *) + offset" as "(char *) + offset"
> >> but it is GCC specific extention. Maybe we should avoid such usage
> >> in order to avoid build failure for other compilers.
> >
> >"(void *) + offset" seems to be used quite often.
> >
> >I tried enable this gcc option, only to see huge amount of warnings.
> >
> >       -Wpointer-arith
> >           Warn about anything that depends on the "size of" a
> >           function type or of "void".  GNU C assigns these types a
> >           size of 1, for convenience in calculations with "void *"
> >           pointers and pointers to functions.
> >
> 
> Yup! I think it is good to have this.
> 
> >/cc/linux-next/scripts/mod/file2alias.c:88: warning: pointer of type ‘void *’ used in arithmetic
> ...
> >/cc/linux-next/scripts/mod/modpost.c:1565: warning: pointer of type ‘void *’ used in arithmetic
> >
> 
> No problem, this is from kbuild and most of them that I checked are actually fine,
> we can send patches to remove these warnings.

Confirmed. Now my full kernel build is complete and the above are the
only warnings I see. So it should be easy to add the -Wpointer-arith
check.

Thanks,
Fengguang

  reply	other threads:[~2010-11-04  2:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-31 15:53 [2.6.36-git17] /proc/vmstat failure Tetsuo Handa
2010-11-03 11:11 ` [2.6.37-rc1] " Tetsuo Handa
2010-11-03 17:43   ` Linus Torvalds
2010-11-03 17:46   ` Wu Fengguang
2010-11-03 17:55     ` Linus Torvalds
2010-11-03 21:54     ` Tetsuo Handa
2010-11-04  2:20       ` Wu Fengguang
2010-11-04  2:52         ` Américo Wang
2010-11-04  2:53           ` Wu Fengguang [this message]
2010-11-04  3:31             ` Américo Wang
2010-11-04  3:43               ` Wu Fengguang

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=20101104025341.GA18429@localhost \
    --to=fengguang.wu@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=david@fromorbit.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mrubin@google.com \
    --cc=nickpiggin@yahoo.com.au \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    --cc=torvalds@linux-foundation.org \
    --cc=xiyou.wangcong@gmail.com \
    /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.