diff options
author | Michael J. Chudobiak <mjc@avtechpulse.com> | 2016-04-25 10:00:44 -0400 |
---|---|---|
committer | Michael J. Chudobiak <mjc@avtechpulse.com> | 2016-04-25 10:00:44 -0400 |
commit | a1df417e74aa6dae7352dc8cbb0ad471af5b7c69 (patch) | |
tree | c34b2311e37ea31db153c90cb8f4570374d05e78 /linux/fs/notify/dnotify |
initial Olimex linux tree from Daniel, originally Feb 3, 2016
Diffstat (limited to 'linux/fs/notify/dnotify')
-rw-r--r-- | linux/fs/notify/dnotify/.built-in.o.cmd | 1 | ||||
-rw-r--r-- | linux/fs/notify/dnotify/.dnotify.o.cmd | 612 | ||||
-rw-r--r-- | linux/fs/notify/dnotify/Kconfig | 11 | ||||
-rw-r--r-- | linux/fs/notify/dnotify/Makefile | 1 | ||||
-rw-r--r-- | linux/fs/notify/dnotify/built-in.o | bin | 0 -> 4836 bytes | |||
-rw-r--r-- | linux/fs/notify/dnotify/dnotify.c | 388 | ||||
-rw-r--r-- | linux/fs/notify/dnotify/dnotify.o | bin | 0 -> 4836 bytes | |||
-rw-r--r-- | linux/fs/notify/dnotify/modules.builtin | 0 | ||||
-rw-r--r-- | linux/fs/notify/dnotify/modules.order | 0 |
9 files changed, 1013 insertions, 0 deletions
diff --git a/linux/fs/notify/dnotify/.built-in.o.cmd b/linux/fs/notify/dnotify/.built-in.o.cmd new file mode 100644 index 00000000..4fd7ea98 --- /dev/null +++ b/linux/fs/notify/dnotify/.built-in.o.cmd @@ -0,0 +1 @@ +cmd_fs/notify/dnotify/built-in.o := arm-linux-gnueabihf-ld -EL -r -o fs/notify/dnotify/built-in.o fs/notify/dnotify/dnotify.o diff --git a/linux/fs/notify/dnotify/.dnotify.o.cmd b/linux/fs/notify/dnotify/.dnotify.o.cmd new file mode 100644 index 00000000..e6691ccf --- /dev/null +++ b/linux/fs/notify/dnotify/.dnotify.o.cmd @@ -0,0 +1,612 @@ +cmd_fs/notify/dnotify/dnotify.o := arm-linux-gnueabihf-gcc -Wp,-MD,fs/notify/dnotify/.dnotify.o.d -nostdinc -isystem /usr/lib/gcc-cross/arm-linux-gnueabihf/5/include -I./arch/arm/include -Iarch/arm/include/generated/uapi -Iarch/arm/include/generated -Iinclude -I./arch/arm/include/uapi -Iarch/arm/include/generated/uapi -I./include/uapi -Iinclude/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -mlittle-endian -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-dwarf2-cfi-asm -fno-ipa-sra -mabi=aapcs-linux -mno-thumb-interwork -mfpu=vfp -funwind-tables -mthumb -Wa,-mimplicit-it=always -Wa,-mno-warn-deprecated -D__LINUX_ARM_ARCH__=7 -march=armv7-a -msoft-float -Uarm -fno-delete-null-pointer-checks -O2 --param=allow-store-data-races=0 -Wframe-larger-than=1024 -fstack-protector -Wno-unused-but-set-variable -fomit-frame-pointer -fno-var-tracking-assignments -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -DCC_HAVE_ASM_GOTO -D"KBUILD_STR(s)=\#s" -D"KBUILD_BASENAME=KBUILD_STR(dnotify)" -D"KBUILD_MODNAME=KBUILD_STR(dnotify)" -c -o fs/notify/dnotify/.tmp_dnotify.o fs/notify/dnotify/dnotify.c + +source_fs/notify/dnotify/dnotify.o := fs/notify/dnotify/dnotify.c + +deps_fs/notify/dnotify/dnotify.o := \ + include/linux/fs.h \ + $(wildcard include/config/sysfs.h) \ + $(wildcard include/config/smp.h) \ + $(wildcard include/config/fs/posix/acl.h) \ + $(wildcard include/config/security.h) \ + $(wildcard include/config/ima.h) \ + $(wildcard include/config/fsnotify.h) \ + $(wildcard include/config/preempt.h) \ + $(wildcard include/config/epoll.h) \ + $(wildcard include/config/file/locking.h) \ + $(wildcard include/config/debug/lock/alloc.h) \ + $(wildcard include/config/mmu.h) \ + $(wildcard include/config/quota.h) \ + $(wildcard include/config/fs/dax.h) \ + $(wildcard include/config/block.h) \ + $(wildcard include/config/migration.h) \ + include/linux/linkage.h \ + include/linux/compiler.h \ + $(wildcard include/config/sparse/rcu/pointer.h) \ + $(wildcard include/config/trace/branch/profiling.h) \ + $(wildcard include/config/profile/all/branches.h) \ + $(wildcard include/config/enable/must/check.h) \ + $(wildcard include/config/enable/warn/deprecated.h) \ + $(wildcard include/config/kprobes.h) \ + include/linux/compiler-gcc.h \ + $(wildcard include/config/arch/supports/optimized/inlining.h) \ + $(wildcard include/config/optimize/inlining.h) \ + include/linux/compiler-gcc5.h \ + $(wildcard include/config/arch/use/builtin/bswap.h) \ + include/uapi/linux/types.h \ + arch/arm/include/asm/types.h \ + include/asm-generic/int-ll64.h \ + include/uapi/asm-generic/int-ll64.h \ + arch/arm/include/generated/asm/bitsperlong.h \ + include/asm-generic/bitsperlong.h \ + $(wildcard include/config/64bit.h) \ + include/uapi/asm-generic/bitsperlong.h \ + include/uapi/linux/posix_types.h \ + include/linux/stddef.h \ + include/uapi/linux/stddef.h \ + arch/arm/include/uapi/asm/posix_types.h \ + include/uapi/asm-generic/posix_types.h \ + include/linux/stringify.h \ + include/linux/export.h \ + $(wildcard include/config/have/underscore/symbol/prefix.h) \ + $(wildcard include/config/modules.h) \ + $(wildcard include/config/modversions.h) \ + $(wildcard include/config/unused/symbols.h) \ + arch/arm/include/asm/linkage.h \ + include/linux/wait.h \ + $(wildcard include/config/lockdep.h) \ + include/linux/list.h \ + $(wildcard include/config/debug/list.h) \ + include/linux/types.h \ + $(wildcard include/config/uid16.h) \ + $(wildcard include/config/lbdaf.h) \ + $(wildcard include/config/arch/dma/addr/t/64bit.h) \ + $(wildcard include/config/phys/addr/t/64bit.h) \ + include/linux/poison.h \ + $(wildcard include/config/illegal/pointer/value.h) \ + include/uapi/linux/const.h \ + include/linux/kernel.h \ + $(wildcard include/config/preempt/voluntary.h) \ + $(wildcard include/config/debug/atomic/sleep.h) \ + $(wildcard include/config/prove/locking.h) \ + $(wildcard include/config/panic/timeout.h) \ + $(wildcard include/config/ring/buffer.h) \ + $(wildcard include/config/tracing.h) \ + $(wildcard include/config/ftrace/mcount/record.h) \ + /usr/lib/gcc-cross/arm-linux-gnueabihf/5/include/stdarg.h \ + include/linux/bitops.h \ + arch/arm/include/asm/bitops.h \ + include/linux/irqflags.h \ + $(wildcard include/config/trace/irqflags.h) \ + $(wildcard include/config/preempt/rt/full.h) \ + $(wildcard include/config/irqsoff/tracer.h) \ + $(wildcard include/config/preempt/tracer.h) \ + $(wildcard include/config/trace/irqflags/support.h) \ + include/linux/typecheck.h \ + arch/arm/include/asm/irqflags.h \ + $(wildcard include/config/cpu/v7m.h) \ + arch/arm/include/asm/ptrace.h \ + $(wildcard include/config/arm/thumb.h) \ + $(wildcard include/config/thumb2/kernel.h) \ + arch/arm/include/uapi/asm/ptrace.h \ + $(wildcard include/config/cpu/endian/be8.h) \ + arch/arm/include/asm/hwcap.h \ + arch/arm/include/uapi/asm/hwcap.h \ + arch/arm/include/asm/barrier.h \ + $(wildcard include/config/cpu/32v6k.h) \ + $(wildcard include/config/cpu/xsc3.h) \ + $(wildcard include/config/cpu/fa526.h) \ + $(wildcard include/config/arm/heavy/mb.h) \ + $(wildcard include/config/arch/has/barriers.h) \ + $(wildcard include/config/arm/dma/mem/bufferable.h) \ + include/asm-generic/bitops/non-atomic.h \ + include/asm-generic/bitops/fls64.h \ + include/asm-generic/bitops/sched.h \ + include/asm-generic/bitops/hweight.h \ + include/asm-generic/bitops/arch_hweight.h \ + include/asm-generic/bitops/const_hweight.h \ + include/asm-generic/bitops/lock.h \ + include/asm-generic/bitops/le.h \ + arch/arm/include/uapi/asm/byteorder.h \ + include/linux/byteorder/little_endian.h \ + include/uapi/linux/byteorder/little_endian.h \ + include/linux/swab.h \ + include/uapi/linux/swab.h \ + arch/arm/include/asm/swab.h \ + arch/arm/include/uapi/asm/swab.h \ + include/linux/byteorder/generic.h \ + include/asm-generic/bitops/ext2-atomic-setbit.h \ + include/linux/log2.h \ + $(wildcard include/config/arch/has/ilog2/u32.h) \ + $(wildcard include/config/arch/has/ilog2/u64.h) \ + include/linux/printk.h \ + $(wildcard include/config/message/loglevel/default.h) \ + $(wildcard include/config/early/printk.h) \ + $(wildcard include/config/printk.h) \ + $(wildcard include/config/dynamic/debug.h) \ + include/linux/init.h \ + $(wildcard include/config/broken/rodata.h) \ + $(wildcard include/config/lto.h) \ + include/linux/kern_levels.h \ + include/linux/cache.h \ + $(wildcard include/config/arch/has/cache/line/size.h) \ + include/uapi/linux/kernel.h \ + include/uapi/linux/sysinfo.h \ + arch/arm/include/asm/cache.h \ + $(wildcard include/config/arm/l1/cache/shift.h) \ + $(wildcard include/config/aeabi.h) \ + include/linux/dynamic_debug.h \ + arch/arm/include/asm/div64.h \ + arch/arm/include/asm/compiler.h \ + arch/arm/include/asm/bug.h \ + $(wildcard include/config/bug.h) \ + $(wildcard include/config/debug/bugverbose.h) \ + $(wildcard include/config/arm/lpae.h) \ + arch/arm/include/asm/opcodes.h \ + $(wildcard include/config/cpu/endian/be32.h) \ + include/asm-generic/bug.h \ + $(wildcard include/config/generic/bug.h) \ + $(wildcard include/config/generic/bug/relative/pointers.h) \ + $(wildcard include/config/preempt/rt/base.h) \ + include/linux/spinlock.h \ + $(wildcard include/config/debug/spinlock.h) \ + $(wildcard include/config/generic/lockbreak.h) \ + include/linux/preempt.h \ + $(wildcard include/config/debug/preempt.h) \ + $(wildcard include/config/preempt/lazy.h) \ + $(wildcard include/config/preempt/count.h) \ + $(wildcard include/config/context/tracking.h) \ + $(wildcard include/config/preempt/notifiers.h) \ + arch/arm/include/generated/asm/preempt.h \ + include/asm-generic/preempt.h \ + include/linux/thread_info.h \ + $(wildcard include/config/compat.h) \ + $(wildcard include/config/debug/stack/usage.h) \ + include/linux/bug.h \ + arch/arm/include/asm/thread_info.h \ + $(wildcard include/config/crunch.h) \ + $(wildcard include/config/arm/thumbee.h) \ + arch/arm/include/asm/fpstate.h \ + $(wildcard include/config/vfpv3.h) \ + $(wildcard include/config/iwmmxt.h) \ + arch/arm/include/asm/page.h \ + $(wildcard include/config/cpu/copy/v4wt.h) \ + $(wildcard include/config/cpu/copy/v4wb.h) \ + $(wildcard include/config/cpu/copy/feroceon.h) \ + $(wildcard include/config/cpu/copy/fa.h) \ + $(wildcard include/config/cpu/sa1100.h) \ + $(wildcard include/config/cpu/xscale.h) \ + $(wildcard include/config/cpu/copy/v6.h) \ + $(wildcard include/config/kuser/helpers.h) \ + $(wildcard include/config/have/arch/pfn/valid.h) \ + arch/arm/include/asm/glue.h \ + arch/arm/include/asm/pgtable-2level-types.h \ + arch/arm/include/asm/memory.h \ + $(wildcard include/config/need/mach/memory/h.h) \ + $(wildcard include/config/page/offset.h) \ + $(wildcard include/config/highmem.h) \ + $(wildcard include/config/dram/base.h) \ + $(wildcard include/config/dram/size.h) \ + $(wildcard include/config/have/tcm.h) \ + $(wildcard include/config/arm/patch/phys/virt.h) \ + $(wildcard include/config/phys/offset.h) \ + $(wildcard include/config/virt/to/bus.h) \ + include/linux/sizes.h \ + include/asm-generic/memory_model.h \ + $(wildcard include/config/flatmem.h) \ + $(wildcard include/config/discontigmem.h) \ + $(wildcard include/config/sparsemem/vmemmap.h) \ + $(wildcard include/config/sparsemem.h) \ + include/asm-generic/getorder.h \ + arch/arm/include/asm/domain.h \ + $(wildcard include/config/io/36.h) \ + $(wildcard include/config/cpu/use/domains.h) \ + include/linux/bottom_half.h \ + include/linux/preempt_mask.h \ + include/linux/spinlock_types.h \ + include/linux/spinlock_types_raw.h \ + include/linux/spinlock_types_up.h \ + include/linux/lockdep.h \ + $(wildcard include/config/lock/stat.h) \ + include/linux/rtmutex.h \ + $(wildcard include/config/debug/mutexes.h) \ + $(wildcard include/config/debug/rt/mutexes.h) \ + include/linux/rbtree.h \ + include/linux/spinlock_types_rt.h \ + include/linux/rwlock_types_rt.h \ + include/linux/spinlock_up.h \ + arch/arm/include/asm/processor.h \ + $(wildcard include/config/have/hw/breakpoint.h) \ + $(wildcard include/config/arm/errata/754327.h) \ + arch/arm/include/asm/hw_breakpoint.h \ + arch/arm/include/asm/unified.h \ + $(wildcard include/config/arm/asm/unified.h) \ + include/linux/rwlock_rt.h \ + include/linux/spinlock_api_up.h \ + include/linux/spinlock_rt.h \ + arch/arm/include/generated/asm/current.h \ + include/asm-generic/current.h \ + include/uapi/linux/wait.h \ + include/linux/atomic.h \ + $(wildcard include/config/arch/has/atomic/or.h) \ + $(wildcard include/config/generic/atomic64.h) \ + arch/arm/include/asm/atomic.h \ + include/linux/prefetch.h \ + arch/arm/include/asm/cmpxchg.h \ + $(wildcard include/config/cpu/sa110.h) \ + $(wildcard include/config/cpu/v6.h) \ + include/asm-generic/cmpxchg-local.h \ + include/asm-generic/atomic-long.h \ + include/linux/kdev_t.h \ + include/uapi/linux/kdev_t.h \ + include/linux/dcache.h \ + include/linux/rculist.h \ + include/linux/rcupdate.h \ + $(wildcard include/config/tiny/rcu.h) \ + $(wildcard include/config/tree/rcu.h) \ + $(wildcard include/config/preempt/rcu.h) \ + $(wildcard include/config/rcu/trace.h) \ + $(wildcard include/config/rcu/stall/common.h) \ + $(wildcard include/config/rcu/user/qs.h) \ + $(wildcard include/config/rcu/nocb/cpu.h) \ + $(wildcard include/config/tasks/rcu.h) \ + $(wildcard include/config/debug/objects/rcu/head.h) \ + $(wildcard include/config/hotplug/cpu.h) \ + $(wildcard include/config/prove/rcu.h) \ + $(wildcard include/config/rcu/boost.h) \ + $(wildcard include/config/rcu/nocb/cpu/all.h) \ + $(wildcard include/config/no/hz/full/sysidle.h) \ + include/linux/threads.h \ + $(wildcard include/config/nr/cpus.h) \ + $(wildcard include/config/base/small.h) \ + include/linux/cpumask.h \ + $(wildcard include/config/cpumask/offstack.h) \ + $(wildcard include/config/debug/per/cpu/maps.h) \ + include/linux/bitmap.h \ + include/linux/string.h \ + $(wildcard include/config/binary/printf.h) \ + include/uapi/linux/string.h \ + arch/arm/include/asm/string.h \ + include/linux/seqlock.h \ + include/linux/completion.h \ + include/linux/wait-simple.h \ + include/linux/debugobjects.h \ + $(wildcard include/config/debug/objects.h) \ + $(wildcard include/config/debug/objects/free.h) \ + include/linux/rcutree.h \ + include/linux/rculist_bl.h \ + include/linux/list_bl.h \ + include/linux/bit_spinlock.h \ + include/linux/lockref.h \ + $(wildcard include/config/arch/use/cmpxchg/lockref.h) \ + include/generated/bounds.h \ + include/linux/path.h \ + include/linux/stat.h \ + arch/arm/include/uapi/asm/stat.h \ + include/uapi/linux/stat.h \ + include/linux/time.h \ + $(wildcard include/config/arch/uses/gettimeoffset.h) \ + include/linux/math64.h \ + $(wildcard include/config/arch/supports/int128.h) \ + include/linux/time64.h \ + include/uapi/linux/time.h \ + include/linux/uidgid.h \ + $(wildcard include/config/multiuser.h) \ + $(wildcard include/config/user/ns.h) \ + include/linux/highuid.h \ + include/linux/list_lru.h \ + $(wildcard include/config/memcg/kmem.h) \ + include/linux/nodemask.h \ + $(wildcard include/config/movable/node.h) \ + $(wildcard include/config/numa.h) \ + include/linux/numa.h \ + $(wildcard include/config/nodes/shift.h) \ + include/linux/shrinker.h \ + include/linux/llist.h \ + $(wildcard include/config/arch/have/nmi/safe/cmpxchg.h) \ + include/linux/radix-tree.h \ + include/linux/pid.h \ + include/linux/mutex.h \ + $(wildcard include/config/mutex/spin/on/owner.h) \ + include/linux/osq_lock.h \ + include/linux/mutex_rt.h \ + include/linux/rwsem.h \ + $(wildcard include/config/rwsem/spin/on/owner.h) \ + $(wildcard include/config/rwsem/generic/spinlock.h) \ + include/linux/rwsem_rt.h \ + include/linux/capability.h \ + include/uapi/linux/capability.h \ + include/linux/semaphore.h \ + include/uapi/linux/fiemap.h \ + include/linux/migrate_mode.h \ + include/linux/percpu-rwsem.h \ + include/linux/percpu.h \ + $(wildcard include/config/need/per/cpu/embed/first/chunk.h) \ + $(wildcard include/config/need/per/cpu/page/first/chunk.h) \ + $(wildcard include/config/have/setup/per/cpu/area.h) \ + include/linux/mmdebug.h \ + $(wildcard include/config/debug/vm.h) \ + $(wildcard include/config/debug/virtual.h) \ + include/linux/smp.h \ + $(wildcard include/config/up/late/init.h) \ + include/linux/errno.h \ + include/uapi/linux/errno.h \ + arch/arm/include/generated/asm/errno.h \ + include/uapi/asm-generic/errno.h \ + include/uapi/asm-generic/errno-base.h \ + include/linux/pfn.h \ + arch/arm/include/asm/percpu.h \ + include/asm-generic/percpu.h \ + include/linux/percpu-defs.h \ + $(wildcard include/config/debug/force/weak/per/cpu.h) \ + include/linux/blk_types.h \ + $(wildcard include/config/blk/cgroup.h) \ + $(wildcard include/config/blk/dev/integrity.h) \ + include/uapi/linux/fs.h \ + include/uapi/linux/limits.h \ + include/uapi/linux/ioctl.h \ + arch/arm/include/generated/asm/ioctl.h \ + include/asm-generic/ioctl.h \ + include/uapi/asm-generic/ioctl.h \ + include/linux/quota.h \ + $(wildcard include/config/quota/netlink/interface.h) \ + include/linux/percpu_counter.h \ + include/linux/gfp.h \ + $(wildcard include/config/zone/dma.h) \ + $(wildcard include/config/zone/dma32.h) \ + $(wildcard include/config/pm/sleep.h) \ + $(wildcard include/config/cma.h) \ + include/linux/mmzone.h \ + $(wildcard include/config/force/max/zoneorder.h) \ + $(wildcard include/config/memory/isolation.h) \ + $(wildcard include/config/memcg.h) \ + $(wildcard include/config/memory/hotplug.h) \ + $(wildcard include/config/compaction.h) \ + $(wildcard include/config/have/memblock/node/map.h) \ + $(wildcard include/config/flat/node/mem/map.h) \ + $(wildcard include/config/page/extension.h) \ + $(wildcard include/config/no/bootmem.h) \ + $(wildcard include/config/numa/balancing.h) \ + $(wildcard include/config/have/memory/present.h) \ + $(wildcard include/config/have/memoryless/nodes.h) \ + $(wildcard include/config/need/node/memmap/size.h) \ + $(wildcard include/config/need/multiple/nodes.h) \ + $(wildcard include/config/have/arch/early/pfn/to/nid.h) \ + $(wildcard include/config/sparsemem/extreme.h) \ + $(wildcard include/config/nodes/span/other/nodes.h) \ + $(wildcard include/config/holes/in/zone.h) \ + $(wildcard include/config/arch/has/holes/memorymodel.h) \ + include/linux/pageblock-flags.h \ + $(wildcard include/config/hugetlb/page.h) \ + $(wildcard include/config/hugetlb/page/size/variable.h) \ + include/linux/page-flags-layout.h \ + include/linux/memory_hotplug.h \ + $(wildcard include/config/memory/hotremove.h) \ + $(wildcard include/config/have/arch/nodedata/extension.h) \ + $(wildcard include/config/have/bootmem/info/node.h) \ + include/linux/notifier.h \ + include/linux/srcu.h \ + include/linux/workqueue.h \ + $(wildcard include/config/debug/objects/work.h) \ + $(wildcard include/config/freezer.h) \ + include/linux/timer.h \ + $(wildcard include/config/timer/stats.h) \ + $(wildcard include/config/debug/objects/timers.h) \ + include/linux/ktime.h \ + include/linux/jiffies.h \ + include/linux/timex.h \ + include/uapi/linux/timex.h \ + include/uapi/linux/param.h \ + arch/arm/include/generated/asm/param.h \ + include/asm-generic/param.h \ + $(wildcard include/config/hz.h) \ + include/uapi/asm-generic/param.h \ + arch/arm/include/asm/timex.h \ + include/linux/timekeeping.h \ + include/linux/topology.h \ + $(wildcard include/config/use/percpu/numa/node/id.h) \ + $(wildcard include/config/sched/smt.h) \ + arch/arm/include/asm/topology.h \ + $(wildcard include/config/arm/cpu/topology.h) \ + include/asm-generic/topology.h \ + include/uapi/linux/dqblk_xfs.h \ + include/linux/dqblk_v1.h \ + include/linux/dqblk_v2.h \ + include/linux/dqblk_qtree.h \ + include/linux/projid.h \ + include/uapi/linux/quota.h \ + include/linux/nfs_fs_i.h \ + include/linux/fcntl.h \ + include/uapi/linux/fcntl.h \ + arch/arm/include/uapi/asm/fcntl.h \ + include/uapi/asm-generic/fcntl.h \ + include/linux/err.h \ + include/linux/module.h \ + $(wildcard include/config/module/sig.h) \ + $(wildcard include/config/kallsyms.h) \ + $(wildcard include/config/tracepoints.h) \ + $(wildcard include/config/event/tracing.h) \ + $(wildcard include/config/livepatch.h) \ + $(wildcard include/config/module/unload.h) \ + $(wildcard include/config/constructors.h) \ + $(wildcard include/config/debug/set/module/ronx.h) \ + include/linux/kmod.h \ + include/linux/sysctl.h \ + $(wildcard include/config/sysctl.h) \ + include/uapi/linux/sysctl.h \ + include/linux/elf.h \ + arch/arm/include/asm/elf.h \ + $(wildcard include/config/vdso.h) \ + arch/arm/include/asm/auxvec.h \ + arch/arm/include/uapi/asm/auxvec.h \ + arch/arm/include/asm/vdso_datapage.h \ + arch/arm/include/asm/user.h \ + include/uapi/linux/elf.h \ + include/uapi/linux/elf-em.h \ + include/linux/kobject.h \ + $(wildcard include/config/uevent/helper.h) \ + $(wildcard include/config/debug/kobject/release.h) \ + include/linux/sysfs.h \ + include/linux/kernfs.h \ + $(wildcard include/config/kernfs.h) \ + include/linux/idr.h \ + include/linux/kobject_ns.h \ + include/linux/kref.h \ + include/linux/moduleparam.h \ + $(wildcard include/config/alpha.h) \ + $(wildcard include/config/ia64.h) \ + $(wildcard include/config/ppc64.h) \ + include/linux/jump_label.h \ + $(wildcard include/config/jump/label.h) \ + arch/arm/include/asm/module.h \ + $(wildcard include/config/arm/unwind.h) \ + include/asm-generic/module.h \ + $(wildcard include/config/have/mod/arch/specific.h) \ + $(wildcard include/config/modules/use/elf/rel.h) \ + $(wildcard include/config/modules/use/elf/rela.h) \ + include/linux/sched.h \ + $(wildcard include/config/sched/debug.h) \ + $(wildcard include/config/no/hz/common.h) \ + $(wildcard include/config/lockup/detector.h) \ + $(wildcard include/config/detect/hung/task.h) \ + $(wildcard include/config/core/dump/default/elf/headers.h) \ + $(wildcard include/config/sched/autogroup.h) \ + $(wildcard include/config/virt/cpu/accounting/native.h) \ + $(wildcard include/config/bsd/process/acct.h) \ + $(wildcard include/config/taskstats.h) \ + $(wildcard include/config/audit.h) \ + $(wildcard include/config/cgroups.h) \ + $(wildcard include/config/inotify/user.h) \ + $(wildcard include/config/fanotify.h) \ + $(wildcard include/config/posix/mqueue.h) \ + $(wildcard include/config/keys.h) \ + $(wildcard include/config/perf/events.h) \ + $(wildcard include/config/schedstats.h) \ + $(wildcard include/config/task/delay/acct.h) \ + $(wildcard include/config/sched/mc.h) \ + $(wildcard include/config/fair/group/sched.h) \ + $(wildcard include/config/rt/group/sched.h) \ + $(wildcard include/config/cgroup/sched.h) \ + $(wildcard include/config/blk/dev/io/trace.h) \ + $(wildcard include/config/compat/brk.h) \ + $(wildcard include/config/cc/stackprotector.h) \ + $(wildcard include/config/virt/cpu/accounting/gen.h) \ + $(wildcard include/config/sysvipc.h) \ + $(wildcard include/config/auditsyscall.h) \ + $(wildcard include/config/rt/mutexes.h) \ + $(wildcard include/config/task/xacct.h) \ + $(wildcard include/config/cpusets.h) \ + $(wildcard include/config/futex.h) \ + $(wildcard include/config/fault/injection.h) \ + $(wildcard include/config/latencytop.h) \ + $(wildcard include/config/kasan.h) \ + $(wildcard include/config/function/graph/tracer.h) \ + $(wildcard include/config/wakeup/latency/hist.h) \ + $(wildcard include/config/missed/timer/offsets/hist.h) \ + $(wildcard include/config/uprobes.h) \ + $(wildcard include/config/bcache.h) \ + $(wildcard include/config/x86/32.h) \ + $(wildcard include/config/have/unstable/sched/clock.h) \ + $(wildcard include/config/irq/time/accounting.h) \ + $(wildcard include/config/no/hz/full.h) \ + $(wildcard include/config/proc/fs.h) \ + $(wildcard include/config/stack/growsup.h) \ + include/uapi/linux/sched.h \ + include/linux/sched/prio.h \ + include/linux/plist.h \ + $(wildcard include/config/debug/pi/list.h) \ + include/linux/mm_types.h \ + $(wildcard include/config/split/ptlock/cpus.h) \ + $(wildcard include/config/arch/enable/split/pmd/ptlock.h) \ + $(wildcard include/config/have/cmpxchg/double.h) \ + $(wildcard include/config/have/aligned/struct/page.h) \ + $(wildcard include/config/transparent/hugepage.h) \ + $(wildcard include/config/kmemcheck.h) \ + $(wildcard include/config/pgtable/levels.h) \ + $(wildcard include/config/aio.h) \ + $(wildcard include/config/mmu/notifier.h) \ + $(wildcard include/config/x86/intel/mpx.h) \ + include/linux/auxvec.h \ + include/uapi/linux/auxvec.h \ + include/linux/uprobes.h \ + arch/arm/include/asm/mmu.h \ + $(wildcard include/config/cpu/has/asid.h) \ + arch/arm/include/asm/kmap_types.h \ + include/linux/cputime.h \ + arch/arm/include/generated/asm/cputime.h \ + include/asm-generic/cputime.h \ + $(wildcard include/config/virt/cpu/accounting.h) \ + include/asm-generic/cputime_jiffies.h \ + include/linux/sem.h \ + include/uapi/linux/sem.h \ + include/linux/ipc.h \ + include/uapi/linux/ipc.h \ + arch/arm/include/generated/asm/ipcbuf.h \ + include/uapi/asm-generic/ipcbuf.h \ + arch/arm/include/generated/asm/sembuf.h \ + include/uapi/asm-generic/sembuf.h \ + include/linux/shm.h \ + include/uapi/linux/shm.h \ + arch/arm/include/generated/asm/shmbuf.h \ + include/uapi/asm-generic/shmbuf.h \ + arch/arm/include/asm/shmparam.h \ + include/linux/signal.h \ + $(wildcard include/config/old/sigaction.h) \ + include/uapi/linux/signal.h \ + arch/arm/include/asm/signal.h \ + arch/arm/include/uapi/asm/signal.h \ + include/uapi/asm-generic/signal-defs.h \ + arch/arm/include/uapi/asm/sigcontext.h \ + arch/arm/include/generated/asm/siginfo.h \ + include/asm-generic/siginfo.h \ + include/uapi/asm-generic/siginfo.h \ + include/linux/proportions.h \ + include/linux/seccomp.h \ + $(wildcard include/config/seccomp.h) \ + $(wildcard include/config/have/arch/seccomp/filter.h) \ + $(wildcard include/config/seccomp/filter.h) \ + include/uapi/linux/seccomp.h \ + arch/arm/include/generated/asm/seccomp.h \ + include/asm-generic/seccomp.h \ + include/uapi/linux/unistd.h \ + arch/arm/include/asm/unistd.h \ + $(wildcard include/config/oabi/compat.h) \ + arch/arm/include/uapi/asm/unistd.h \ + include/linux/resource.h \ + include/uapi/linux/resource.h \ + arch/arm/include/generated/asm/resource.h \ + include/asm-generic/resource.h \ + include/uapi/asm-generic/resource.h \ + include/linux/hrtimer.h \ + $(wildcard include/config/high/res/timers.h) \ + $(wildcard include/config/timerfd.h) \ + include/linux/timerqueue.h \ + include/linux/task_io_accounting.h \ + $(wildcard include/config/task/io/accounting.h) \ + include/linux/latencytop.h \ + include/linux/cred.h \ + $(wildcard include/config/debug/credentials.h) \ + include/linux/key.h \ + include/linux/assoc_array.h \ + $(wildcard include/config/associative/array.h) \ + include/linux/selinux.h \ + $(wildcard include/config/security/selinux.h) \ + include/uapi/linux/magic.h \ + include/linux/dnotify.h \ + $(wildcard include/config/dnotify.h) \ + include/linux/slab.h \ + $(wildcard include/config/debug/slab.h) \ + $(wildcard include/config/failslab.h) \ + $(wildcard include/config/slab.h) \ + $(wildcard include/config/slub.h) \ + $(wildcard include/config/slob.h) \ + include/linux/kmemleak.h \ + $(wildcard include/config/debug/kmemleak.h) \ + include/linux/kasan.h \ + $(wildcard include/config/kasan/shadow/offset.h) \ + include/linux/fdtable.h \ + include/linux/fsnotify_backend.h \ + $(wildcard include/config/fanotify/access/permissions.h) \ + +fs/notify/dnotify/dnotify.o: $(deps_fs/notify/dnotify/dnotify.o) + +$(deps_fs/notify/dnotify/dnotify.o): diff --git a/linux/fs/notify/dnotify/Kconfig b/linux/fs/notify/dnotify/Kconfig new file mode 100644 index 00000000..f9c1ca13 --- /dev/null +++ b/linux/fs/notify/dnotify/Kconfig @@ -0,0 +1,11 @@ +config DNOTIFY + bool "Dnotify support" + select FSNOTIFY + default y + help + Dnotify is a directory-based per-fd file change notification system + that uses signals to communicate events to user-space. There exist + superior alternatives, but some applications may still rely on + dnotify. + + If unsure, say Y. diff --git a/linux/fs/notify/dnotify/Makefile b/linux/fs/notify/dnotify/Makefile new file mode 100644 index 00000000..f145251d --- /dev/null +++ b/linux/fs/notify/dnotify/Makefile @@ -0,0 +1 @@ +obj-$(CONFIG_DNOTIFY) += dnotify.o diff --git a/linux/fs/notify/dnotify/built-in.o b/linux/fs/notify/dnotify/built-in.o Binary files differnew file mode 100644 index 00000000..1c59e36d --- /dev/null +++ b/linux/fs/notify/dnotify/built-in.o diff --git a/linux/fs/notify/dnotify/dnotify.c b/linux/fs/notify/dnotify/dnotify.c new file mode 100644 index 00000000..44523f4a --- /dev/null +++ b/linux/fs/notify/dnotify/dnotify.c @@ -0,0 +1,388 @@ +/* + * Directory notifications for Linux. + * + * Copyright (C) 2000,2001,2002 Stephen Rothwell + * + * Copyright (C) 2009 Eric Paris <Red Hat Inc> + * dnotify was largly rewritten to use the new fsnotify infrastructure + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + */ +#include <linux/fs.h> +#include <linux/module.h> +#include <linux/sched.h> +#include <linux/dnotify.h> +#include <linux/init.h> +#include <linux/spinlock.h> +#include <linux/slab.h> +#include <linux/fdtable.h> +#include <linux/fsnotify_backend.h> + +int dir_notify_enable __read_mostly = 1; + +static struct kmem_cache *dnotify_struct_cache __read_mostly; +static struct kmem_cache *dnotify_mark_cache __read_mostly; +static struct fsnotify_group *dnotify_group __read_mostly; + +/* + * dnotify will attach one of these to each inode (i_fsnotify_marks) which + * is being watched by dnotify. If multiple userspace applications are watching + * the same directory with dnotify their information is chained in dn + */ +struct dnotify_mark { + struct fsnotify_mark fsn_mark; + struct dnotify_struct *dn; +}; + +/* + * When a process starts or stops watching an inode the set of events which + * dnotify cares about for that inode may change. This function runs the + * list of everything receiving dnotify events about this directory and calculates + * the set of all those events. After it updates what dnotify is interested in + * it calls the fsnotify function so it can update the set of all events relevant + * to this inode. + */ +static void dnotify_recalc_inode_mask(struct fsnotify_mark *fsn_mark) +{ + __u32 new_mask, old_mask; + struct dnotify_struct *dn; + struct dnotify_mark *dn_mark = container_of(fsn_mark, + struct dnotify_mark, + fsn_mark); + + assert_spin_locked(&fsn_mark->lock); + + old_mask = fsn_mark->mask; + new_mask = 0; + for (dn = dn_mark->dn; dn != NULL; dn = dn->dn_next) + new_mask |= (dn->dn_mask & ~FS_DN_MULTISHOT); + fsnotify_set_mark_mask_locked(fsn_mark, new_mask); + + if (old_mask == new_mask) + return; + + if (fsn_mark->inode) + fsnotify_recalc_inode_mask(fsn_mark->inode); +} + +/* + * Mains fsnotify call where events are delivered to dnotify. + * Find the dnotify mark on the relevant inode, run the list of dnotify structs + * on that mark and determine which of them has expressed interest in receiving + * events of this type. When found send the correct process and signal and + * destroy the dnotify struct if it was not registered to receive multiple + * events. + */ +static int dnotify_handle_event(struct fsnotify_group *group, + struct inode *inode, + struct fsnotify_mark *inode_mark, + struct fsnotify_mark *vfsmount_mark, + u32 mask, void *data, int data_type, + const unsigned char *file_name, u32 cookie) +{ + struct dnotify_mark *dn_mark; + struct dnotify_struct *dn; + struct dnotify_struct **prev; + struct fown_struct *fown; + __u32 test_mask = mask & ~FS_EVENT_ON_CHILD; + + /* not a dir, dnotify doesn't care */ + if (!S_ISDIR(inode->i_mode)) + return 0; + + BUG_ON(vfsmount_mark); + + dn_mark = container_of(inode_mark, struct dnotify_mark, fsn_mark); + + spin_lock(&inode_mark->lock); + prev = &dn_mark->dn; + while ((dn = *prev) != NULL) { + if ((dn->dn_mask & test_mask) == 0) { + prev = &dn->dn_next; + continue; + } + fown = &dn->dn_filp->f_owner; + send_sigio(fown, dn->dn_fd, POLL_MSG); + if (dn->dn_mask & FS_DN_MULTISHOT) + prev = &dn->dn_next; + else { + *prev = dn->dn_next; + kmem_cache_free(dnotify_struct_cache, dn); + dnotify_recalc_inode_mask(inode_mark); + } + } + + spin_unlock(&inode_mark->lock); + + return 0; +} + +static void dnotify_free_mark(struct fsnotify_mark *fsn_mark) +{ + struct dnotify_mark *dn_mark = container_of(fsn_mark, + struct dnotify_mark, + fsn_mark); + + BUG_ON(dn_mark->dn); + + kmem_cache_free(dnotify_mark_cache, dn_mark); +} + +static struct fsnotify_ops dnotify_fsnotify_ops = { + .handle_event = dnotify_handle_event, +}; + +/* + * Called every time a file is closed. Looks first for a dnotify mark on the + * inode. If one is found run all of the ->dn structures attached to that + * mark for one relevant to this process closing the file and remove that + * dnotify_struct. If that was the last dnotify_struct also remove the + * fsnotify_mark. + */ +void dnotify_flush(struct file *filp, fl_owner_t id) +{ + struct fsnotify_mark *fsn_mark; + struct dnotify_mark *dn_mark; + struct dnotify_struct *dn; + struct dnotify_struct **prev; + struct inode *inode; + + inode = file_inode(filp); + if (!S_ISDIR(inode->i_mode)) + return; + + fsn_mark = fsnotify_find_inode_mark(dnotify_group, inode); + if (!fsn_mark) + return; + dn_mark = container_of(fsn_mark, struct dnotify_mark, fsn_mark); + + mutex_lock(&dnotify_group->mark_mutex); + + spin_lock(&fsn_mark->lock); + prev = &dn_mark->dn; + while ((dn = *prev) != NULL) { + if ((dn->dn_owner == id) && (dn->dn_filp == filp)) { + *prev = dn->dn_next; + kmem_cache_free(dnotify_struct_cache, dn); + dnotify_recalc_inode_mask(fsn_mark); + break; + } + prev = &dn->dn_next; + } + + spin_unlock(&fsn_mark->lock); + + /* nothing else could have found us thanks to the dnotify_groups + mark_mutex */ + if (dn_mark->dn == NULL) + fsnotify_destroy_mark_locked(fsn_mark, dnotify_group); + + mutex_unlock(&dnotify_group->mark_mutex); + + fsnotify_put_mark(fsn_mark); +} + +/* this conversion is done only at watch creation */ +static __u32 convert_arg(unsigned long arg) +{ + __u32 new_mask = FS_EVENT_ON_CHILD; + + if (arg & DN_MULTISHOT) + new_mask |= FS_DN_MULTISHOT; + if (arg & DN_DELETE) + new_mask |= (FS_DELETE | FS_MOVED_FROM); + if (arg & DN_MODIFY) + new_mask |= FS_MODIFY; + if (arg & DN_ACCESS) + new_mask |= FS_ACCESS; + if (arg & DN_ATTRIB) + new_mask |= FS_ATTRIB; + if (arg & DN_RENAME) + new_mask |= FS_DN_RENAME; + if (arg & DN_CREATE) + new_mask |= (FS_CREATE | FS_MOVED_TO); + + return new_mask; +} + +/* + * If multiple processes watch the same inode with dnotify there is only one + * dnotify mark in inode->i_fsnotify_marks but we chain a dnotify_struct + * onto that mark. This function either attaches the new dnotify_struct onto + * that list, or it |= the mask onto an existing dnofiy_struct. + */ +static int attach_dn(struct dnotify_struct *dn, struct dnotify_mark *dn_mark, + fl_owner_t id, int fd, struct file *filp, __u32 mask) +{ + struct dnotify_struct *odn; + + odn = dn_mark->dn; + while (odn != NULL) { + /* adding more events to existing dnofiy_struct? */ + if ((odn->dn_owner == id) && (odn->dn_filp == filp)) { + odn->dn_fd = fd; + odn->dn_mask |= mask; + return -EEXIST; + } + odn = odn->dn_next; + } + + dn->dn_mask = mask; + dn->dn_fd = fd; + dn->dn_filp = filp; + dn->dn_owner = id; + dn->dn_next = dn_mark->dn; + dn_mark->dn = dn; + + return 0; +} + +/* + * When a process calls fcntl to attach a dnotify watch to a directory it ends + * up here. Allocate both a mark for fsnotify to add and a dnotify_struct to be + * attached to the fsnotify_mark. + */ +int fcntl_dirnotify(int fd, struct file *filp, unsigned long arg) +{ + struct dnotify_mark *new_dn_mark, *dn_mark; + struct fsnotify_mark *new_fsn_mark, *fsn_mark; + struct dnotify_struct *dn; + struct inode *inode; + fl_owner_t id = current->files; + struct file *f; + int destroy = 0, error = 0; + __u32 mask; + + /* we use these to tell if we need to kfree */ + new_fsn_mark = NULL; + dn = NULL; + + if (!dir_notify_enable) { + error = -EINVAL; + goto out_err; + } + + /* a 0 mask means we are explicitly removing the watch */ + if ((arg & ~DN_MULTISHOT) == 0) { + dnotify_flush(filp, id); + error = 0; + goto out_err; + } + + /* dnotify only works on directories */ + inode = file_inode(filp); + if (!S_ISDIR(inode->i_mode)) { + error = -ENOTDIR; + goto out_err; + } + + /* expect most fcntl to add new rather than augment old */ + dn = kmem_cache_alloc(dnotify_struct_cache, GFP_KERNEL); + if (!dn) { + error = -ENOMEM; + goto out_err; + } + + /* new fsnotify mark, we expect most fcntl calls to add a new mark */ + new_dn_mark = kmem_cache_alloc(dnotify_mark_cache, GFP_KERNEL); + if (!new_dn_mark) { + error = -ENOMEM; + goto out_err; + } + + /* convert the userspace DN_* "arg" to the internal FS_* defines in fsnotify */ + mask = convert_arg(arg); + + /* set up the new_fsn_mark and new_dn_mark */ + new_fsn_mark = &new_dn_mark->fsn_mark; + fsnotify_init_mark(new_fsn_mark, dnotify_free_mark); + new_fsn_mark->mask = mask; + new_dn_mark->dn = NULL; + + /* this is needed to prevent the fcntl/close race described below */ + mutex_lock(&dnotify_group->mark_mutex); + + /* add the new_fsn_mark or find an old one. */ + fsn_mark = fsnotify_find_inode_mark(dnotify_group, inode); + if (fsn_mark) { + dn_mark = container_of(fsn_mark, struct dnotify_mark, fsn_mark); + spin_lock(&fsn_mark->lock); + } else { + fsnotify_add_mark_locked(new_fsn_mark, dnotify_group, inode, + NULL, 0); + spin_lock(&new_fsn_mark->lock); + fsn_mark = new_fsn_mark; + dn_mark = new_dn_mark; + /* we used new_fsn_mark, so don't free it */ + new_fsn_mark = NULL; + } + + rcu_read_lock(); + f = fcheck(fd); + rcu_read_unlock(); + + /* if (f != filp) means that we lost a race and another task/thread + * actually closed the fd we are still playing with before we grabbed + * the dnotify_groups mark_mutex and fsn_mark->lock. Since closing the + * fd is the only time we clean up the marks we need to get our mark + * off the list. */ + if (f != filp) { + /* if we added ourselves, shoot ourselves, it's possible that + * the flush actually did shoot this fsn_mark. That's fine too + * since multiple calls to destroy_mark is perfectly safe, if + * we found a dn_mark already attached to the inode, just sod + * off silently as the flush at close time dealt with it. + */ + if (dn_mark == new_dn_mark) + destroy = 1; + goto out; + } + + __f_setown(filp, task_pid(current), PIDTYPE_PID, 0); + + error = attach_dn(dn, dn_mark, id, fd, filp, mask); + /* !error means that we attached the dn to the dn_mark, so don't free it */ + if (!error) + dn = NULL; + /* -EEXIST means that we didn't add this new dn and used an old one. + * that isn't an error (and the unused dn should be freed) */ + else if (error == -EEXIST) + error = 0; + + dnotify_recalc_inode_mask(fsn_mark); +out: + spin_unlock(&fsn_mark->lock); + + if (destroy) + fsnotify_destroy_mark_locked(fsn_mark, dnotify_group); + + mutex_unlock(&dnotify_group->mark_mutex); + fsnotify_put_mark(fsn_mark); +out_err: + if (new_fsn_mark) + fsnotify_put_mark(new_fsn_mark); + if (dn) + kmem_cache_free(dnotify_struct_cache, dn); + return error; +} + +static int __init dnotify_init(void) +{ + dnotify_struct_cache = KMEM_CACHE(dnotify_struct, SLAB_PANIC); + dnotify_mark_cache = KMEM_CACHE(dnotify_mark, SLAB_PANIC); + + dnotify_group = fsnotify_alloc_group(&dnotify_fsnotify_ops); + if (IS_ERR(dnotify_group)) + panic("unable to allocate fsnotify group for dnotify\n"); + return 0; +} + +module_init(dnotify_init) diff --git a/linux/fs/notify/dnotify/dnotify.o b/linux/fs/notify/dnotify/dnotify.o Binary files differnew file mode 100644 index 00000000..24164ab0 --- /dev/null +++ b/linux/fs/notify/dnotify/dnotify.o diff --git a/linux/fs/notify/dnotify/modules.builtin b/linux/fs/notify/dnotify/modules.builtin new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/linux/fs/notify/dnotify/modules.builtin diff --git a/linux/fs/notify/dnotify/modules.order b/linux/fs/notify/dnotify/modules.order new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/linux/fs/notify/dnotify/modules.order |