All of lore.kernel.org
 help / color / mirror / Atom feed
From: julia.lawall@lip6.fr (Julia Lawall)
To: cocci@systeme.lip6.fr
Subject: [Cocci] [bug] exists do not work if file group is too big (>49)
Date: Thu, 17 May 2018 22:21:56 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1805172219490.2273@hadrien> (raw)
In-Reply-To: <20180516191634.GB2994@redhat.com>



On Wed, 16 May 2018, Jerome Glisse wrote:

> When operating on too many files the exists keyword no longer work. For
> instance:

It has nothing to do with the number of files.  The problem is that some
property of one file causes a parse error in another file, due to the
various heuristics.  You can see this with the --verbose-parsing option.
I'm not yet sure where the bad interaction comes from, but I get the same
bad behavior with the command line:

spatch --verbose-parsing --no-includes --sp-file test.cocci fs/ceph/addr.c
fs/cifs/cifssmb.c fs/f2fs/gc.c

julia

>
> @exists@
> expression E1;
> @@
> set_page_dirty(
> +NULL,
> E1)
>
> Using linux kernel as playground and looking at at fs/f2fs/gc.c where
> there is set_page_dirty() calls in nested blocks.
>
> Works:
>
> spatch --no-includes --sp-file test.spatch arch/powerpc/kvm/book3s_64_mmu_radix.c arch/powerpc/kvm/e500_mmu.c arch/s390/kvm/interrupt.c arch/x86/kvm/svm.c block/bio.c drivers/block/zram/zram_drv.c drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c drivers/gpu/drm/drm_gem.c drivers/gpu/drm/exynos/exynos_drm_g2d.c drivers/gpu/drm/i915/i915_gem.c drivers/gpu/drm/i915/i915_gem_fence_reg.c drivers/gpu/drm/i915/i915_gem_userptr.c drivers/gpu/drm/radeon/radeon_ttm.c drivers/gpu/drm/ttm/ttm_tt.c drivers/infiniband/core/umem.c drivers/infiniband/core/umem_odp.c drivers/infiniband/hw/hfi1/user_pages.c drivers/infiniband/hw/qib/qib_user_pages.c drivers/infiniband/hw/usnic/usnic_uiom.c drivers/media/common/videobuf2/videobuf2-dma-contig.c drivers/media/common/videobuf2/videobuf2-dma-sg.c drivers/media/common/videobuf2/videobuf2-vmalloc.c drivers/misc/genwqe/card_utils.c drivers/misc/vmw_vmci/vmci_queue_pair.c drivers/mtd/devices/block2mtd.c drivers/platform/goldfish/goldfish_pipe.c drivers/sbus/!
 char/oradax.c drivers/staging/lustre/lustre/llite/rw26.c drivers/staging/lustre/lustre/llite/vvp_io.c drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c drivers/vhost/vhost.c drivers/video/fbdev/core/fb_defio.c fs/9p/vfs_addr.c fs/afs/dir.c fs/afs/file.c --include fs/afs/internal.h fs/afs/write.c fs/aio.c fs/block_dev.c fs/btrfs/disk-io.c fs/btrfs/extent_io.c fs/btrfs/file.c fs/btrfs/inode.c fs/btrfs/ioctl.c fs/btrfs/relocation.c fs/buffer.c fs/ceph/addr.c fs/f2fs/gc.c > toto
>
>
> Don't works:
>
> spatch --no-includes --sp-file test.spatch arch/powerpc/kvm/book3s_64_mmu_radix.c arch/powerpc/kvm/e500_mmu.c arch/s390/kvm/interrupt.c arch/x86/kvm/svm.c block/bio.c drivers/block/zram/zram_drv.c drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c drivers/gpu/drm/drm_gem.c drivers/gpu/drm/exynos/exynos_drm_g2d.c drivers/gpu/drm/i915/i915_gem.c drivers/gpu/drm/i915/i915_gem_fence_reg.c drivers/gpu/drm/i915/i915_gem_userptr.c drivers/gpu/drm/radeon/radeon_ttm.c drivers/gpu/drm/ttm/ttm_tt.c drivers/infiniband/core/umem.c drivers/infiniband/core/umem_odp.c drivers/infiniband/hw/hfi1/user_pages.c drivers/infiniband/hw/qib/qib_user_pages.c drivers/infiniband/hw/usnic/usnic_uiom.c drivers/media/common/videobuf2/videobuf2-dma-contig.c drivers/media/common/videobuf2/videobuf2-dma-sg.c drivers/media/common/videobuf2/videobuf2-vmalloc.c drivers/misc/genwqe/card_utils.c drivers/misc/vmw_vmci/vmci_queue_pair.c drivers/mtd/devices/block2mtd.c drivers/platform/goldfish/goldfish_pipe.c drivers/sbus/!
 char/oradax.c drivers/staging/lustre/lustre/llite/rw26.c drivers/staging/lustre/lustre/llite/vvp_io.c drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c drivers/vhost/vhost.c drivers/video/fbdev/core/fb_defio.c fs/9p/vfs_addr.c fs/afs/dir.c fs/afs/file.c --include fs/afs/internal.h fs/afs/write.c fs/aio.c fs/block_dev.c fs/btrfs/disk-io.c fs/btrfs/extent_io.c fs/btrfs/file.c fs/btrfs/inode.c fs/btrfs/ioctl.c fs/btrfs/relocation.c fs/buffer.c fs/ceph/addr.c fs/cifs/cifssmb.c fs/f2fs/gc.c > toto
>
>
> Exact same command line except the latter have 49 files before
> fs/f2fs/gc.c while the former has 48 (and it works then). Note
> that it seems that running the script multiple times even when
> they are too many files will eventualy work.
>
> Cheers,
> J?r?me
> _______________________________________________
> Cocci mailing list
> Cocci at systeme.lip6.fr
> https://systeme.lip6.fr/mailman/listinfo/cocci
>

  parent reply	other threads:[~2018-05-17 20:21 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-16 19:16 [Cocci] [bug] exists do not work if file group is too big (>49) Jerome Glisse
2018-05-16 19:37 ` Julia Lawall
2018-05-16 19:54   ` Jerome Glisse
2018-05-16 20:02     ` Julia Lawall
2018-05-16 20:15       ` Jerome Glisse
2018-05-16 20:20         ` Julia Lawall
2018-05-16 20:24           ` Jerome Glisse
2018-05-16 20:29             ` Julia Lawall
2018-05-16 20:35               ` Jerome Glisse
     [not found]         ` <10d2d384-95c0-dec1-b284-f5afb7d9ce81@users.sourceforge.net>
2018-05-17 14:50           ` [Cocci] Checking consequences from “exists” usage with big file name selection Jerome Glisse
     [not found] ` <128b6146-5368-12bb-ae42-236982ff3494@users.sourceforge.net>
2018-05-17 14:45   ` [Cocci] exists do not work if file group is too big Jerome Glisse
2018-05-17 20:45     ` Julia Lawall
2018-05-17 21:00       ` Jerome Glisse
2018-05-17 21:11         ` Julia Lawall
2018-05-17 21:32           ` Jerome Glisse
     [not found]       ` <d1902859-7b9b-4dea-0e5b-8d4876f90495@users.sourceforge.net>
2018-05-18 16:03         ` [Cocci] Checking run times for transformation of Linux source code with SmPL Julia Lawall
     [not found]           ` <416a7972-d6ce-38b2-9983-ce0446b5ab61@users.sourceforge.net>
2018-05-18 16:49             ` Julia Lawall
     [not found]               ` <f9b0c961-7182-86ea-bb39-486ffc732db0@users.sourceforge.net>
2018-05-18 17:13                 ` Julia Lawall
2018-05-17 20:21 ` Julia Lawall [this message]
2018-05-17 20:31   ` [Cocci] [bug] exists do not work if file group is too big (>49) Julia Lawall
2018-05-17 21:04     ` Jerome Glisse

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=alpine.DEB.2.20.1805172219490.2273@hadrien \
    --to=julia.lawall@lip6.fr \
    --cc=cocci@systeme.lip6.fr \
    /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.