Linux-Next discussions
 help / color / mirror / Atom feed
* Re: linux-next: drbd tree build failure
From: Philipp Reisner @ 2009-09-15 14:03 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Nikanth Karthikesan, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	drbd-dev-cunTk1MwBs8qoQakbn7OcQ,
	linux-next-u79uwXL29TY76Z2rM5mHXA, Jens Axboe
In-Reply-To: <20090915165309.f07381ec.sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>

On Tuesday 15 September 2009 08:53:09 Stephen Rothwell wrote:
> Hi Jens,
>
> On Tue, 15 Sep 2009 08:23:06 +0200 Jens Axboe <jens.axboe-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> wrote:
> > Fix looks correct.
>
> Thanks for the confirmation.  So hopefully one of these trees will be
> merged by Linus soon an this can be fixed up in the other.

Thanks everybody.

I have applied Stephens' patch to the DRBD tree.

-phil

^ permalink raw reply

* Re: [linux-next PATCH] MAINTAINERS: Generic UIO use M: "Michael S. Tsirkin" <mst@redhat.com>
From: Michael S. Tsirkin @ 2009-09-15 11:38 UTC (permalink / raw)
  To: Joe Perches; +Cc: linux-next, Andrew Morton
In-Reply-To: <1252999424.19910.6.camel@Joe-Laptop.home>

On Tue, Sep 15, 2009 at 12:23:44AM -0700, Joe Perches wrote:
> Hi Michael.
> 
> Your new entry needs to be updated a bit.
> The P: entry is deprecated and M: is used for "name" <address>
> 
> Your name also needs to be quoted so people can copy/paste
> it and that scripts/get_maintainer.pl works.
> cheers, Joe
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Acked-by: Michael S. Tsirkin <mst@redhat.com>

> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 70ca14b..1246238 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -2237,7 +2237,7 @@ S:	Maintained
>  F:	include/asm-generic
>  
>  GENERIC UIO DRIVER FOR PCI DEVICES
> -P:	Michael S. Tsirkin <mst@redhat.com>
> +M:	"Michael S. Tsirkin" <mst@redhat.com>
>  L:	kvm@vger.kernel.org
>  L:	linux-kernel@vger.kernel.org
>  S:	Supported
> 

^ permalink raw reply

* Re: Warning from ring buffer code (Was: Re: linux-next: tip tree build warning)
From: Frédéric Weisbecker @ 2009-09-15  9:01 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Steven Rostedt, Christopher Li, Jaswinder Singh Rajput,
	Ingo Molnar, Stephen Rothwell, Thomas Gleixner, H. Peter Anvin,
	linux-next, linux-kernel, linux-sparse, Josh Triplett
In-Reply-To: <1252998994.5506.0.camel@laptop>

2009/9/15, Peter Zijlstra <peterz@infradead.org>:
> On Mon, 2009-09-14 at 20:41 +0200, Frederic Weisbecker wrote:
>> On Mon, Sep 14, 2009 at 02:31:16PM -0400, Steven Rostedt wrote:
>> > On Mon, 2009-09-14 at 20:23 +0200, Peter Zijlstra wrote:
>> > > On Mon, 2009-09-14 at 14:17 -0400, Steven Rostedt wrote:
>> > > > Frederic, how big can one of those events get. The ring buffer (and
>> > > > TRACE_EVENT) allow up to almost a page size, which is very hefty for
>> > > > the
>> > > > stack. This code needs to either be rewritten or we need to set a
>> > > > limit
>> > > > to the size of a profile entry.
>> > >
>> > > Yeah, that needs to get a re-write.. I've complained about this when
>> > > it
>> > > went in.
>> >
>> > One answer is to create a per cpu buffer that is big enough to hold the
>> > data needed. Then you can disable interrupts an use it without worry.
>> >
>> > If you need to also handle NMIs, then create a per_cpu NMI buffer too,
>> > and use that if "in_nmi()" is true.
>> >
>> > -- Steve
>>
>>
>> Looks like a nice idea.
>>
>> Peter, does that sound acceptable to you to disable interrupts during a
>> profiled tracepoint event?
>
> It does anyway, a little further down the line, so sure.


Ok I'll fix it soon using Steve's idea then.

Thanks.

^ permalink raw reply

* linux-next: Tree for September 15
From: Stephen Rothwell @ 2009-09-15  8:13 UTC (permalink / raw)
  To: linux-next; +Cc: LKML

[-- Attachment #1: Type: text/plain, Size: 9204 bytes --]

Hi all,

Please do not add code destined for 2.6.33 into linux-next trees until
(at least) 2.6.32-rc1 is out.  This will hopefully give those who have
stuff destined for just after -rc1 a chance.

Changes since 20090914:

We are seeing conflicts move from one tree to another as Linus merges
them.

The sh tree inherited a couple of conflicts.

The net tree lost its merge fix.

The rr tree gained a conflicts against Linus' tree, but it still has a
build failure so I used the version from next-20090908.

The input tree lost its conflict (to the sh tree).

The block tree lost its build failure.

The slab tree lost its conflict.

The drbd tree gained a build failure (due to an interaction with the
block tree - now Linus' tree) for which I applied a patch.

The tip tree lost a conflict.

----------------------------------------------------------------------------

I have created today's linux-next tree at
git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
(patches at http://www.kernel.org/pub/linux/kernel/v2.6/next/ ).  If you
are tracking the linux-next tree using git, you should not use "git pull"
to do so as that will try to merge the new linux-next release with the
old one.  You should use "git fetch" as mentioned in the FAQ on the wiki
(see below).

You can see which trees have been included by looking in the Next/Trees
file in the source.  There are also quilt-import.log and merge.log files
in the Next directory.  Between each merge, the tree was built with
a ppc64_defconfig for powerpc and an allmodconfig for x86_64. After the
final fixups (if any), it is also built with powerpc allnoconfig (32 and
64 bit), ppc44x_defconfig and allyesconfig (minus
CONFIG_PROFILE_ALL_BRANCHES - this fails its final link) and i386, sparc
and sparc64 defconfig. These builds also have
CONFIG_ENABLE_WARN_DEPRECATED, CONFIG_ENABLE_MUST_CHECK and
CONFIG_DEBUG_INFO disabled when necessary.

Below is a summary of the state of the merge.

We are up to 140 trees (counting Linus' and 21 trees of patches pending for
Linus' tree), more are welcome (even if they are currently empty).
Thanks to those who have contributed, and to those who haven't, please do.

Status of my local build tests will be at
http://kisskb.ellerman.id.au/linux-next .  If maintainers want to give
advice about cross compilers/configs that work, we are always open to add
more builds.

Thanks to Jan Dittmer for adding the linux-next tree to his build tests
at http://l4x.org/k/ , the guys at http://test.kernel.org/ and Randy
Dunlap for doing many randconfig builds.

There is a wiki covering stuff to do with linux-next at
http://linux.f-seidel.de/linux-next/pmwiki/ .  Thanks to Frank Seidel.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

$ git checkout master
$ git reset --hard stable
Merging origin/master
Merging fixes/fixes
Merging arm-current/master
Merging m68k-current/for-linus
Merging powerpc-merge/merge
Merging sparc-current/master
Merging scsi-rc-fixes/master
Merging net-current/master
Merging sound-current/for-linus
Merging pci-current/for-linus
Merging wireless-current/master
Merging kbuild-current/master
Merging quilt/driver-core.current
Merging quilt/tty.current
Merging quilt/usb.current
Merging cpufreq-current/fixes
Merging input-current/for-linus
Merging md-current/for-linus
Merging audit-current/for-linus
Merging crypto-current/master
Merging ide-curent/master
Merging dwmw2/master
Merging arm/devel
CONFLICT (content): Merge conflict in arch/arm/kernel/signal.c
Merging davinci/for-next
Merging pxa/for-next
Merging thumb-2/thumb-2
CONFLICT (add/add): Merge conflict in arch/arm/include/asm/unified.h
Merging avr32/avr32-arch
Merging blackfin/for-linus
Merging cris/for-next
Merging ia64/test
Merging m68k/for-next
Merging m68knommu/for-next
Merging microblaze/next
Merging mips/mips-for-linux-next
Merging parisc/next
CONFLICT (content): Merge conflict in arch/parisc/include/asm/thread_info.h
CONFLICT (content): Merge conflict in arch/parisc/kernel/entry.S
CONFLICT (content): Merge conflict in arch/parisc/kernel/signal.c
Merging powerpc/next
CONFLICT (content): Merge conflict in kernel/gcov/Kconfig
Merging 4xx/next
Merging galak/next
Merging s390/features
Merging sh/master
CONFLICT (content): Merge conflict in arch/microblaze/include/asm/device.h
CONFLICT (content): Merge conflict in drivers/base/platform.c
Merging sparc/master
Merging xtensa/master
Merging cifs/master
Merging configfs/linux-next
Merging ecryptfs/next
Merging ext3/for_next
Merging ext4/next
Merging fatfs/master
Merging fuse/for-next
Merging gfs2/master
Merging jfs/next
Merging nfs/linux-next
Merging nfsd/nfsd-next
Merging nilfs2/for-next
Merging ocfs2/linux-next
Merging squashfs/master
Merging udf/for_next
Merging v9fs/for-next
Merging ubifs/linux-next
CONFLICT (content): Merge conflict in fs/ubifs/super.c
Merging xfs/master
CONFLICT (content): Merge conflict in fs/xfs/linux-2.6/xfs_lrw.c
Merging reiserfs-bkl/reiserfs/kill-bkl
Merging vfs/for-next
Merging pci/linux-next
CONFLICT (content): Merge conflict in arch/powerpc/kernel/pci_64.c
Applying: pci: merge fixup for fundamental reset conflict with powerpc tree
Merging hid/for-next
Merging quilt/i2c
Merging quilt/jdelvare-hwmon
Merging quilt/kernel-doc
Merging v4l-dvb/master
CONFLICT (content): Merge conflict in drivers/media/video/sh_mobile_ceu_camera.c
Merging quota/for_next
Merging kbuild/master
Merging kconfig/for-next
CONFLICT (content): Merge conflict in scripts/extract-ikconfig
Merging ide/master
Merging libata/NEXT
Merging infiniband/for-next
Merging acpi/test
CONFLICT (content): Merge conflict in drivers/acpi/power.c
Merging ieee1394/for-next
Merging ubi/linux-next
Merging kvm/linux-next
Merging dlm/next
Merging scsi/master
Merging async_tx/next
Merging net/master
Merging wireless/master
Merging mtd/master
CONFLICT (content): Merge conflict in drivers/mtd/mtdcore.c
Merging crypto/master
Merging sound/for-next
Merging cpufreq/next
Merging quilt/rr
CONFLICT (content): Merge conflict in kernel/module.c
$ git reset --hard HEAD^
Merging refs/next/20090908/rr
CONFLICT (content): Merge conflict in drivers/net/virtio_net.c
Merging mmc/next
Merging input/next
Merging lsm/for-next
Merging block/for-next
Merging quilt/device-mapper
Merging embedded/master
Merging firmware/master
Merging pcmcia/master
Merging battery/master
CONFLICT (content): Merge conflict in drivers/power/wm97xx_battery.c
Merging leds/for-mm
Merging backlight/for-mm
Merging kgdb/kgdb-next
Merging slab/for-next
Merging uclinux/for-next
Merging md/for-next
Merging mfd/for-next
CONFLICT (content): Merge conflict in drivers/input/misc/Kconfig
Merging hdlc/hdlc-next
Merging drm/drm-next
CONFLICT (content): Merge conflict in firmware/Makefile
Merging voltage/for-next
CONFLICT (content): Merge conflict in drivers/regulator/Kconfig
Merging security-testing/next
Merging lblnet/master
Merging agp/agp-next
CONFLICT (content): Merge conflict in drivers/char/agp/uninorth-agp.c
Merging uwb/for-upstream
Merging watchdog/master
Merging bdev/master
Merging dwmw2-iommu/master
Merging cputime/cputime
Merging osd/linux-next
Merging jc_docs/docs-next
Merging nommu/master
Merging trivial/for-next
Merging audit/for-next
Merging omap/for-next
Merging quilt/aoe
Merging suspend/linux-next
Merging bluetooth/master
Merging fsnotify/for-next
Merging irda/for-next
Merging hwlat/for-linus
Merging drbd/drbd
Applying: drbd: fix for in_flight change in block tree
Merging kmemleak/kmemleak
Merging tip/auto-latest
CONFLICT (content): Merge conflict in arch/x86/kernel/setup.c
CONFLICT (content): Merge conflict in drivers/pci/dmar.c
CONFLICT (content): Merge conflict in drivers/pci/intel-iommu.c
Applying: tip: fix merge for cupmask update
Merging oprofile/for-next
Merging percpu/for-next
CONFLICT (content): Merge conflict in arch/sh/kernel/vmlinux.lds.S
CONFLICT (content): Merge conflict in kernel/sched.c
CONFLICT (content): Merge conflict in mm/percpu.c
Merging sfi/sfi-test
CONFLICT (content): Merge conflict in arch/x86/kernel/setup.c
Merging asm-generic/next
Merging hwpoison/hwpoison
Merging quilt/driver-core
CONFLICT (content): Merge conflict in drivers/base/class.c
CONFLICT (content): Merge conflict in drivers/mtd/mtdcore.c
CONFLICT (content): Merge conflict in init/main.c
Merging quilt/tty
CONFLICT (content): Merge conflict in arch/x86/include/asm/termios.h
Merging quilt/usb
Merging quilt/staging
CONFLICT (delete/modify): drivers/staging/at76_usb/at76_usb.c deleted in quilt/staging and modified in HEAD. Version HEAD of drivers/staging/at76_usb/at76_usb.c left in tree.
CONFLICT (delete/modify): drivers/staging/epl/VirtualEthernetLinux.c deleted in quilt/staging and modified in HEAD. Version HEAD of drivers/staging/epl/VirtualEthernetLinux.c left in tree.
$ git rm -f drivers/staging/epl/VirtualEthernetLinux.c
$ git rm -f drivers/staging/at76_usb/at76_usb.c
Merging scsi-post-merge/master
CONFLICT (content): Merge conflict in drivers/scsi/Makefile

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply

* Re: linux-next: drbd tree build failure
From: Stephen Rothwell @ 2009-09-15  7:45 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Philipp Reisner, drbd-dev, linux-next, linux-kernel,
	Nikanth Karthikesan
In-Reply-To: <20090915065721.GQ14984@kernel.dk>

[-- Attachment #1: Type: text/plain, Size: 316 bytes --]

On Tue, 15 Sep 2009 08:57:21 +0200 Jens Axboe <jens.axboe@oracle.com> wrote:
>
> The block one is already merged, so drbd just needs to get fixed up.

Right, that happened after I started this morning.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply

* [linux-next PATCH] MAINTAINERS: Generic UIO use M: "Michael S. Tsirkin" <mst@redhat.com>
From: Joe Perches @ 2009-09-15  7:23 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: linux-next, Andrew Morton

Hi Michael.

Your new entry needs to be updated a bit.
The P: entry is deprecated and M: is used for "name" <address>

Your name also needs to be quoted so people can copy/paste
it and that scripts/get_maintainer.pl works.

cheers, Joe

Signed-off-by: Joe Perches <joe@perches.com>

diff --git a/MAINTAINERS b/MAINTAINERS
index 70ca14b..1246238 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2237,7 +2237,7 @@ S:	Maintained
 F:	include/asm-generic
 
 GENERIC UIO DRIVER FOR PCI DEVICES
-P:	Michael S. Tsirkin <mst@redhat.com>
+M:	"Michael S. Tsirkin" <mst@redhat.com>
 L:	kvm@vger.kernel.org
 L:	linux-kernel@vger.kernel.org
 S:	Supported

^ permalink raw reply related

* Re: Warning from ring buffer code (Was: Re: linux-next: tip tree build warning)
From: Peter Zijlstra @ 2009-09-15  7:16 UTC (permalink / raw)
  To: Frederic Weisbecker
  Cc: Steven Rostedt, Christopher Li, Jaswinder Singh Rajput,
	Ingo Molnar, Stephen Rothwell, Thomas Gleixner, H. Peter Anvin,
	linux-next, linux-kernel, linux-sparse, Josh Triplett
In-Reply-To: <20090914184123.GC6045@nowhere>

On Mon, 2009-09-14 at 20:41 +0200, Frederic Weisbecker wrote:
> On Mon, Sep 14, 2009 at 02:31:16PM -0400, Steven Rostedt wrote:
> > On Mon, 2009-09-14 at 20:23 +0200, Peter Zijlstra wrote:
> > > On Mon, 2009-09-14 at 14:17 -0400, Steven Rostedt wrote:
> > > > Frederic, how big can one of those events get. The ring buffer (and
> > > > TRACE_EVENT) allow up to almost a page size, which is very hefty for the
> > > > stack. This code needs to either be rewritten or we need to set a limit
> > > > to the size of a profile entry.
> > > 
> > > Yeah, that needs to get a re-write.. I've complained about this when it
> > > went in.
> > 
> > One answer is to create a per cpu buffer that is big enough to hold the
> > data needed. Then you can disable interrupts an use it without worry.
> > 
> > If you need to also handle NMIs, then create a per_cpu NMI buffer too,
> > and use that if "in_nmi()" is true.
> > 
> > -- Steve
> 
> 
> Looks like a nice idea.
> 
> Peter, does that sound acceptable to you to disable interrupts during a
> profiled tracepoint event?

It does anyway, a little further down the line, so sure.

^ permalink raw reply

* Re: linux-next: drbd tree build failure
From: Jens Axboe @ 2009-09-15  6:57 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Nikanth Karthikesan, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-next-u79uwXL29TY76Z2rM5mHXA, Philipp Reisner,
	drbd-dev-cunTk1MwBs8qoQakbn7OcQ
In-Reply-To: <20090915165309.f07381ec.sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>

On Tue, Sep 15 2009, Stephen Rothwell wrote:
> Hi Jens,
> 
> On Tue, 15 Sep 2009 08:23:06 +0200 Jens Axboe <jens.axboe-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> wrote:
> >
> > Fix looks correct.
> 
> Thanks for the confirmation.  So hopefully one of these trees will be
> merged by Linus soon an this can be fixed up in the other.

The block one is already merged, so drbd just needs to get fixed up.

-- 
Jens Axboe

^ permalink raw reply

* Re: linux-next: drbd tree build failure
From: Stephen Rothwell @ 2009-09-15  6:53 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Philipp Reisner, drbd-dev, linux-next, linux-kernel,
	Nikanth Karthikesan
In-Reply-To: <20090915062306.GP14984@kernel.dk>

[-- Attachment #1: Type: text/plain, Size: 357 bytes --]

Hi Jens,

On Tue, 15 Sep 2009 08:23:06 +0200 Jens Axboe <jens.axboe@oracle.com> wrote:
>
> Fix looks correct.

Thanks for the confirmation.  So hopefully one of these trees will be
merged by Linus soon an this can be fixed up in the other.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply

* Re: linux-next: drbd tree build failure
From: Jens Axboe @ 2009-09-15  6:23 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Philipp Reisner, drbd-dev, linux-next, linux-kernel,
	Nikanth Karthikesan
In-Reply-To: <20090915160739.86e85ab3.sfr@canb.auug.org.au>

On Tue, Sep 15 2009, Stephen Rothwell wrote:
> Hi Philipp,
> 
> Today's linux-next build (x86_64 allmodconfig) failed like this:
> 
> drivers/block/drbd/drbd_req.c: In function '_drbd_start_io_acct':
> drivers/block/drbd/drbd_req.c:45: error: lvalue required as increment operand
> drivers/block/drbd/drbd_req.c: In function '_drbd_end_io_acct':
> drivers/block/drbd/drbd_req.c:58: error: lvalue required as decrement operand
> 
> Caused by commit 954749162c98ca45c42cbc00c9ed6d5d6c0b8bb7 ("DRBD:
> request") from the drbd tree interacting with commit
> a9327cac440be4d8333bba975cbbf76045096275 ("Seperate read and write
> statistics of in_flight requests") from the block tree.
> 
> I have applied the following merge fix for today, but there may be a
> better fix.

Fix looks correct.

-- 
Jens Axboe

^ permalink raw reply

* linux-next: drbd tree build failure
From: Stephen Rothwell @ 2009-09-15  6:07 UTC (permalink / raw)
  To: Philipp Reisner, drbd-dev
  Cc: linux-next, linux-kernel, Nikanth Karthikesan, Jens Axboe

Hi Philipp,

Today's linux-next build (x86_64 allmodconfig) failed like this:

drivers/block/drbd/drbd_req.c: In function '_drbd_start_io_acct':
drivers/block/drbd/drbd_req.c:45: error: lvalue required as increment operand
drivers/block/drbd/drbd_req.c: In function '_drbd_end_io_acct':
drivers/block/drbd/drbd_req.c:58: error: lvalue required as decrement operand

Caused by commit 954749162c98ca45c42cbc00c9ed6d5d6c0b8bb7 ("DRBD:
request") from the drbd tree interacting with commit
a9327cac440be4d8333bba975cbbf76045096275 ("Seperate read and write
statistics of in_flight requests") from the block tree.

I have applied the following merge fix for today, but there may be a
better fix.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 15 Sep 2009 16:03:50 +1000
Subject: [PATCH] drbd: fix for in_flight change in block tree

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/block/drbd/drbd_req.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c
index cbdc257..0656cf1 100644
--- a/drivers/block/drbd/drbd_req.c
+++ b/drivers/block/drbd/drbd_req.c
@@ -42,7 +42,7 @@ static void _drbd_start_io_acct(struct drbd_conf *mdev, struct drbd_request *req
 	part_stat_inc(cpu, &mdev->vdisk->part0, ios[rw]);
 	part_stat_add(cpu, &mdev->vdisk->part0, sectors[rw], bio_sectors(bio));
 	part_stat_unlock();
-	mdev->vdisk->part0.in_flight++;
+	mdev->vdisk->part0.in_flight[rw]++;
 }
 
 /* Update disk stats when completing request upwards */
@@ -55,7 +55,7 @@ static void _drbd_end_io_acct(struct drbd_conf *mdev, struct drbd_request *req)
 	part_stat_add(cpu, &mdev->vdisk->part0, ticks[rw], duration);
 	part_round_stats(cpu, &mdev->vdisk->part0);
 	part_stat_unlock();
-	mdev->vdisk->part0.in_flight--;
+	mdev->vdisk->part0.in_flight[rw]--;
 }
 
 static void _req_is_done(struct drbd_conf *mdev, struct drbd_request *req, const int rw)
-- 
1.6.3.3


-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

^ permalink raw reply related

* Re: linux-next: rr tree build failure
From: Stephen Rothwell @ 2009-09-15  3:27 UTC (permalink / raw)
  To: Rusty Russell
  Cc: linux-next, linux-kernel, Siarhei Liakh, Xuxian Jiang,
	Arjan van de Ven
In-Reply-To: <20090909134752.f5b8c2e7.sfr@canb.auug.org.au>

[-- Attachment #1: Type: text/plain, Size: 938 bytes --]

Hi Rusty,

On Wed, 9 Sep 2009 13:47:52 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next build (powerpc ppc64_defconfig) failed like this:
> 
> kernel/module.c: In function 'set_section_ro_nx':
> kernel/module.c:1549: error: implicit declaration of function 'set_memory_ro'
> kernel/module.c:1560: error: implicit declaration of function 'set_memory_nx'
> kernel/module.c: In function 'unset_section_ro_nx':
> kernel/module.c:1575: error: implicit declaration of function 'set_memory_rw'
> 
> Caused by commit 25306e21864c2a220d6fa2e0632425028aa9626c
> ("module:ro-nx-protection") which uses these interfaces that are only
> defined on x86 ...
> 
> I have used the version of the rr tree from next-20090908 for today.

Still happening ... Siarhei posted a replacement patch on Sept 11.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply

* linux-next: manual merge of the rr tree with Linus' tree
From: Stephen Rothwell @ 2009-09-15  3:26 UTC (permalink / raw)
  To: Rusty Russell
  Cc: linux-next, linux-kernel, Siarhei Liakh, Xuxian Jiang, Li Zefan

Hi Rusty,

Today's linux-next merge of the rr tree got a conflict in kernel/module.c
between commit 7ead8b8313d92b3a69a1a61b0dcbc4cd66c960dc ("tracing/events:
Add module tracepoints") from Linus' tree and commit
25306e21864c2a220d6fa2e0632425028aa9626c ("module:ro-nx-protection") from
the rr tree.

Just overlapping additions.  I fixed it up (see below) and can carry the
fix for a while.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc kernel/module.c
index 46580ed,6f84bb5..0000000
--- a/kernel/module.c
+++ b/kernel/module.c
@@@ -54,12 -54,8 +54,13 @@@
  #include <linux/async.h>
  #include <linux/percpu.h>
  #include <linux/kmemleak.h>
+ #include <linux/pfn.h>
  
 +#define CREATE_TRACE_POINTS
 +#include <trace/events/module.h>
 +
 +EXPORT_TRACEPOINT_SYMBOL(module_get);
 +
  #if 0
  #define DEBUGP printk
  #else
@@@ -2373,8 -2600,18 +2609,20 @@@ static noinline struct module *load_mod
  	/* Get rid of temporary copy */
  	vfree(hdr);
  
+ 	/* Set RO and NX regions for core */
+ 	set_section_ro_nx(mod->module_core,
+ 			  mod->core_text_size,
+ 			  mod->core_ro_size,
+ 			  mod->core_size);
+ 
+ 	/* Set RO and NX regions for init */
+ 	set_section_ro_nx(mod->module_init,
+ 			  mod->init_text_size,
+ 			  mod->init_ro_size,
+ 			  mod->init_size);
+ 
 +	trace_module_load(mod);
 +
  	/* Done! */
  	return mod;
  

^ permalink raw reply

* Re: Warning from ring buffer code (Was: Re: linux-next: tip tree build warning)
From: Stephen Rothwell @ 2009-09-14 22:36 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: Ingo Molnar, Thomas Gleixner, H. Peter Anvin, Peter Zijlstra,
	linux-next, linux-kernel
In-Reply-To: <1252936201.2964.59.camel@localhost.localdomain>

[-- Attachment #1: Type: text/plain, Size: 746 bytes --]

Hi Steve,

On Mon, 14 Sep 2009 09:50:01 -0400 Steven Rostedt <srostedt@redhat.com> wrote:
>
> On Sat, 2009-09-12 at 09:39 +0200, Ingo Molnar wrote:
> > * Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> > > Now that this is in Linus' tree, can we have a fix for the waning, 
> > > please?
> > 
> > The first warning got fixed 1.5 months ago - the second one at line 
> > 797 is still there but harmless - you can ignore it for now, it will 
> > be fixed.
> 
> The first warning never got fixed. The typecast was placed in the wrong
> spot (my fault). I sent another patch that fixes both warnings.

Thanks for that.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply

* Re: Warning from ring buffer code (Was: Re: linux-next: tip tree build warning)
From: Frederic Weisbecker @ 2009-09-14 18:41 UTC (permalink / raw)
  To: Steven Rostedt, Peter Zijlstra
  Cc: Christopher Li, Jaswinder Singh Rajput, Ingo Molnar,
	Stephen Rothwell, Thomas Gleixner, H. Peter Anvin, linux-next,
	linux-kernel, linux-sparse, Josh Triplett
In-Reply-To: <1252953076.2964.156.camel@localhost.localdomain>

On Mon, Sep 14, 2009 at 02:31:16PM -0400, Steven Rostedt wrote:
> On Mon, 2009-09-14 at 20:23 +0200, Peter Zijlstra wrote:
> > On Mon, 2009-09-14 at 14:17 -0400, Steven Rostedt wrote:
> > > Frederic, how big can one of those events get. The ring buffer (and
> > > TRACE_EVENT) allow up to almost a page size, which is very hefty for the
> > > stack. This code needs to either be rewritten or we need to set a limit
> > > to the size of a profile entry.
> > 
> > Yeah, that needs to get a re-write.. I've complained about this when it
> > went in.
> 
> One answer is to create a per cpu buffer that is big enough to hold the
> data needed. Then you can disable interrupts an use it without worry.
> 
> If you need to also handle NMIs, then create a per_cpu NMI buffer too,
> and use that if "in_nmi()" is true.
> 
> -- Steve


Looks like a nice idea.

Peter, does that sound acceptable to you to disable interrupts during a
profiled tracepoint event?


^ permalink raw reply

* Re: Warning from ring buffer code (Was: Re: linux-next: tip tree build warning)
From: Frederic Weisbecker @ 2009-09-14 18:38 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: Christopher Li, Jaswinder Singh Rajput, Ingo Molnar,
	Stephen Rothwell, Thomas Gleixner, H. Peter Anvin, Peter Zijlstra,
	linux-next, linux-kernel, linux-sparse, Josh Triplett
In-Reply-To: <1252952238.2964.154.camel@localhost.localdomain>

On Mon, Sep 14, 2009 at 02:17:18PM -0400, Steven Rostedt wrote:
> On Mon, 2009-09-14 at 10:09 -0700, Christopher Li wrote:
> > On Mon, Sep 14, 2009 at 8:16 AM, Steven Rostedt <srostedt@redhat.com> wrote:
> > > static void func(int size_me) {
> > >        char array[size_me];
> > >
> > >        memcpy(array, "hello", size);
> > > };
> > >
> > > and sparse failed on it as well. Note, you need to have something call
> > > func, or sparse will ignore it.
> > 
> > Gcc allows variable size. Sparse expects the size of an array is constant.
> > For the kernel using variable array size is consider bad. Because the kernel
> > has very limited stack size. (8K if I remember correctly). Using dynamic array
> > is very easy to overflow the stack without realizing it.
> > 
> > It deserves a warning. I agree the warning message can use a better description
> > though.
> 
> Good point!
> 
> I've added Frederic to the Cc list, since he wrote the code.
> 
> Frederic, how big can one of those events get. The ring buffer (and
> TRACE_EVENT) allow up to almost a page size, which is very hefty for the
> stack. This code needs to either be rewritten or we need to set a limit
> to the size of a profile entry.
> 
> We could add:
> 
> 	if (__entry_size > 256)
> 		return;
> 
> Thoughts?
> 


Well it can be big, especially once we play with array fields or
__string().

I can manage the __string() that said, by only copying their
pointer and later delay the copy.

Well actually I would like to rewrite all that entirely to avoid
any stack allocation, especially for arrays and string.

Lemme think about a CPP magic way to directly interact with perf
buffer. I think it's possible.

^ permalink raw reply

* Re: Warning from ring buffer code (Was: Re: linux-next: tip tree build warning)
From: Steven Rostedt @ 2009-09-14 18:31 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Christopher Li, Jaswinder Singh Rajput, Ingo Molnar,
	Stephen Rothwell, Thomas Gleixner, H. Peter Anvin, linux-next,
	linux-kernel, linux-sparse, Josh Triplett, Frederic Weisbecker
In-Reply-To: <1252952621.31964.0.camel@twins>

On Mon, 2009-09-14 at 20:23 +0200, Peter Zijlstra wrote:
> On Mon, 2009-09-14 at 14:17 -0400, Steven Rostedt wrote:
> > Frederic, how big can one of those events get. The ring buffer (and
> > TRACE_EVENT) allow up to almost a page size, which is very hefty for the
> > stack. This code needs to either be rewritten or we need to set a limit
> > to the size of a profile entry.
> 
> Yeah, that needs to get a re-write.. I've complained about this when it
> went in.

One answer is to create a per cpu buffer that is big enough to hold the
data needed. Then you can disable interrupts an use it without worry.

If you need to also handle NMIs, then create a per_cpu NMI buffer too,
and use that if "in_nmi()" is true.

-- Steve



^ permalink raw reply

* Re: Warning from ring buffer code (Was: Re: linux-next: tip tree build warning)
From: Peter Zijlstra @ 2009-09-14 18:23 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: Christopher Li, Jaswinder Singh Rajput, Ingo Molnar,
	Stephen Rothwell, Thomas Gleixner, H. Peter Anvin, linux-next,
	linux-kernel, linux-sparse, Josh Triplett, Frederic Weisbecker
In-Reply-To: <1252952238.2964.154.camel@localhost.localdomain>

On Mon, 2009-09-14 at 14:17 -0400, Steven Rostedt wrote:
> Frederic, how big can one of those events get. The ring buffer (and
> TRACE_EVENT) allow up to almost a page size, which is very hefty for the
> stack. This code needs to either be rewritten or we need to set a limit
> to the size of a profile entry.

Yeah, that needs to get a re-write.. I've complained about this when it
went in.

^ permalink raw reply

* Re: Warning from ring buffer code (Was: Re: linux-next: tip tree build warning)
From: Steven Rostedt @ 2009-09-14 18:17 UTC (permalink / raw)
  To: Christopher Li
  Cc: Jaswinder Singh Rajput, Ingo Molnar, Stephen Rothwell,
	Thomas Gleixner, H. Peter Anvin, Peter Zijlstra, linux-next,
	linux-kernel, linux-sparse, Josh Triplett, Frederic Weisbecker
In-Reply-To: <70318cbf0909141009v46581785m4c70edf31fcb79fa@mail.gmail.com>

On Mon, 2009-09-14 at 10:09 -0700, Christopher Li wrote:
> On Mon, Sep 14, 2009 at 8:16 AM, Steven Rostedt <srostedt@redhat.com> wrote:
> > static void func(int size_me) {
> >        char array[size_me];
> >
> >        memcpy(array, "hello", size);
> > };
> >
> > and sparse failed on it as well. Note, you need to have something call
> > func, or sparse will ignore it.
> 
> Gcc allows variable size. Sparse expects the size of an array is constant.
> For the kernel using variable array size is consider bad. Because the kernel
> has very limited stack size. (8K if I remember correctly). Using dynamic array
> is very easy to overflow the stack without realizing it.
> 
> It deserves a warning. I agree the warning message can use a better description
> though.

Good point!

I've added Frederic to the Cc list, since he wrote the code.

Frederic, how big can one of those events get. The ring buffer (and
TRACE_EVENT) allow up to almost a page size, which is very hefty for the
stack. This code needs to either be rewritten or we need to set a limit
to the size of a profile entry.

We could add:

	if (__entry_size > 256)
		return;

Thoughts?

-- Steve




^ permalink raw reply

* Re: Warning from ring buffer code (Was: Re: linux-next: tip tree build warning)
From: Christopher Li @ 2009-09-14 17:09 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: Jaswinder Singh Rajput, Ingo Molnar, Stephen Rothwell,
	Thomas Gleixner, H. Peter Anvin, Peter Zijlstra, linux-next,
	linux-kernel, linux-sparse, Josh Triplett
In-Reply-To: <1252941416.2964.143.camel@localhost.localdomain>

On Mon, Sep 14, 2009 at 8:16 AM, Steven Rostedt <srostedt@redhat.com> wrote:
> static void func(int size_me) {
>        char array[size_me];
>
>        memcpy(array, "hello", size);
> };
>
> and sparse failed on it as well. Note, you need to have something call
> func, or sparse will ignore it.

Gcc allows variable size. Sparse expects the size of an array is constant.
For the kernel using variable array size is consider bad. Because the kernel
has very limited stack size. (8K if I remember correctly). Using dynamic array
is very easy to overflow the stack without realizing it.

It deserves a warning. I agree the warning message can use a better description
though.

Chris

^ permalink raw reply

* Re: Warning from ring buffer code (Was: Re: linux-next: tip tree build warning)
From: Steven Rostedt @ 2009-09-14 15:16 UTC (permalink / raw)
  To: Jaswinder Singh Rajput
  Cc: Ingo Molnar, Stephen Rothwell, Thomas Gleixner, H. Peter Anvin,
	Peter Zijlstra, linux-next, linux-kernel, linux-sparse,
	Christopher Li, Josh Triplett
In-Reply-To: <1252753957.12217.10.camel@ht.satnam>

On Sat, 2009-09-12 at 16:42 +0530, Jaswinder Singh Rajput wrote:

> 
> Here are some more trace related warnings in current linus (as well as
> -tip) tree :
> 
>   CHECK   arch/x86/kernel/ptrace.c
> include/trace/events/syscalls.h:18:1: warning: symbol 'ftrace_raw_output_sys_enter' was not declared. Should it be static?
> include/trace/events/syscalls.h:42:1: warning: symbol 'ftrace_raw_output_sys_exit' was not declared. Should it be static?
> include/trace/events/syscalls.h:18:1: warning: symbol 'ftrace_define_fields_sys_enter' was not declared. Should it be static?
> include/trace/events/syscalls.h:42:1: warning: symbol 'ftrace_define_fields_sys_exit' was not declared. Should it be static?

I just wrote a patch to fix the above.

> include/trace/events/syscalls.h:18:1: error: bad constant expression
> include/trace/events/syscalls.h:42:1: error: bad constant expression

Not sure why sparse is failing on this. Looking at the sched.c code, I
ran "make kernel/sched.i" and then removed the CPP expressions and then
expanded the macros and here's where it is failing:

static void ftrace_profile_sched_kthread_stop(struct task_struct *t)
{
	struct ftrace_data_offsets_sched_kthread_stop __attribute__((unused)) __data_offsets;
	struct ftrace_event_call *event_call = &event_sched_kthread_stop;
	extern void perf_tpcounter_event(int, u64, u64, void *, int);
	struct ftrace_raw_sched_kthread_stop *entry;
	u64 __addr = 0, __count = 1;
	unsigned long irq_flags;
	
	int __entry_size;
	int __data_size;
	int pc;

	do { ({ unsigned long __dummy;
				typeof(irq_flags) __dummy2;
				(void)(&__dummy == &__dummy2);
				1;
			});
		do { (irq_flags) = __raw_local_save_flags();
		} while (0);
	} while (0);
	pc = (current_thread_info()->preempt_count);
	__data_size = ftrace_get_offsets_sched_kthread_stop(&__data_offsets, t);
	__entry_size = (((__data_size + sizeof(*entry) + sizeof(u32))+((typeof(__data_size + sizeof(*entry) + sizeof(u32)))(sizeof(u64))-1))&~((typeof(__data_size + sizeof(*entry) + sizeof(u32)))(sizeof(u64))-1));
	__entry_size -= sizeof(u32);
	do {
		char raw_data[__entry_size];   <<<<----------- FAILURE HERE
		struct trace_entry *ent;
		*(u64 *)(&raw_data[__entry_size - sizeof(u64)]) = 0ULL;
		entry = (struct ftrace_raw_sched_kthread_stop *)raw_data;
		ent = &entry->ent;
		tracing_generic_entry_update(ent, irq_flags, pc);
		ent->type = event_call->id;
		{ memcpy(entry->comm, t->comm, 16);
			entry->pid = t->pid;
			;
		} perf_tpcounter_event(event_call->id, __addr, __count, entry, __entry_size);
	} while (0);
};

Sure enough, sparse does not like the __entry_size. I replaced it with
"10" and sparse was happy with it. That is a perfectly legal entry, so
this looks more like a bug with sparse.

I just tested this too:

static void func(int size_me) {
	char array[size_me];

	memcpy(array, "hello", size);
};

and sparse failed on it as well. Note, you need to have something call
func, or sparse will ignore it.


-- Steve



^ permalink raw reply

* Re: Warning from ring buffer code (Was: Re: linux-next: tip tree build warning)
From: Ingo Molnar @ 2009-09-14 13:53 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: Stephen Rothwell, Thomas Gleixner, H. Peter Anvin, Peter Zijlstra,
	linux-next, linux-kernel
In-Reply-To: <1252936201.2964.59.camel@localhost.localdomain>


* Steven Rostedt <srostedt@redhat.com> wrote:

> On Sat, 2009-09-12 at 09:39 +0200, Ingo Molnar wrote:
> > * Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> > > Now that this is in Linus' tree, can we have a fix for the waning, 
> > > please?
> > 
> > The first warning got fixed 1.5 months ago - the second one at line 
> > 797 is still there but harmless - you can ignore it for now, it will 
> > be fixed.
> 
> The first warning never got fixed. The typecast was placed in the 
> wrong spot (my fault). I sent another patch that fixes both warnings.

Pulled it, thanks Steve.

	Ingo

^ permalink raw reply

* Re: Warning from ring buffer code (Was: Re: linux-next: tip tree build warning)
From: Steven Rostedt @ 2009-09-14 13:50 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Stephen Rothwell, Thomas Gleixner, H. Peter Anvin, Peter Zijlstra,
	linux-next, linux-kernel
In-Reply-To: <20090912073906.GA3972@elte.hu>

On Sat, 2009-09-12 at 09:39 +0200, Ingo Molnar wrote:
> * Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> > Now that this is in Linus' tree, can we have a fix for the waning, 
> > please?
> 
> The first warning got fixed 1.5 months ago - the second one at line 
> 797 is still there but harmless - you can ignore it for now, it will 
> be fixed.

The first warning never got fixed. The typecast was placed in the wrong
spot (my fault). I sent another patch that fixes both warnings.

-- Steve

^ permalink raw reply

* Re: linux-next: manual merge of the security-testing tree with the parisc tree
From: Kyle McMartin @ 2009-09-14 13:49 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Kyle McMartin, linux-next, linux-kernel, David Howells,
	James Morris, linux-parisc
In-Reply-To: <20090914153532.2c06eeae.sfr@canb.auug.org.au>

On Mon, Sep 14, 2009 at 03:35:32PM +1000, Stephen Rothwell wrote:
> Hi Kyle,
> > Overlapping changes.  I fixed it up (using the parisc versions and adding
> > the extra change from the latter security-testing patch) and can carry
> > the fixes as necessary.
> 
> This conflict is now between the parisc tree and Linus' tree ...
> 

You don't say.

^ permalink raw reply

* Re: linux-next: manual merge of the security-testing tree with the arm tree
From: Russell King @ 2009-09-14 10:14 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: linux-next, linux-kernel, Mikael Pettersson, James Morris,
	David Howells
In-Reply-To: <20090914185500.fc9cf713.sfr@canb.auug.org.au>

On Mon, Sep 14, 2009 at 06:55:00PM +1000, Stephen Rothwell wrote:
> Actually Linus is probably clever enough to fix the conflict himself -
> after all, I did :-)

In my experience, sending follow-up emails to Linus on issues to do with
pull requests doesn't work - the pull happens long before Linus reads the
follow-up email.  It's entirely possible that Linus has already pulled
my tree, but hasn't published it yet - I've seen that happen several
times when I submit pull requests over a weekend.

If there's a problem, Linus will reply, possibly with a "check my
conflict resolution" or "I've not pulled, please fix it up your tree".

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox