kernel-hacking-2024-linux-s.../mm
Mimi Zohar 1df9f0a731 Integrity: IMA file free imbalance
The number of calls to ima_path_check()/ima_file_free()
should be balanced.  An extra call to fput(), indicates
the file could have been accessed without first being
measured.

Although f_count is incremented/decremented in places other
than fget/fput, like fget_light/fput_light and get_file, the
current task must already hold a file refcnt.  The call to
__fput() is delayed until the refcnt becomes 0, resulting
in ima_file_free() flagging any changes.

- add hook to increment opencount for IPC shared memory(SYSV),
  shmat files, and /dev/zero
- moved NULL iint test in opencount_get()

Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
2009-02-06 09:05:33 +11:00
..
allocpercpu.c
backing-dev.c mm/backing-dev.c: remove recently-added WARN_ON() 2008-12-10 08:01:52 -08:00
bootmem.c misc: replace __FUNCTION__ with __func__ 2008-10-16 11:21:30 -07:00
bounce.c bounce: don't rely on a zeroed bio_vec list 2008-12-29 08:29:52 +01:00
dmapool.c
fadvise.c Remove Andrew Morton's old email accounts 2008-10-16 11:21:32 -07:00
failslab.c SLUB: failslab support 2008-12-29 11:27:46 +02:00
filemap.c fs: remove prepare_write/commit_write 2008-10-30 11:38:45 -07:00
filemap_xip.c
fremap.c mmap: handle mlocked pages during map, remap, unmap 2008-10-20 08:52:31 -07:00
highmem.c
hugetlb.c hugetlb: make unmap_ref_private multi-size-aware 2008-11-12 17:17:16 -08:00
internal.h hugetlb: pull gigantic page initialisation out of the default path 2008-11-06 15:41:18 -08:00
Kconfig Unevictable LRU Infrastructure 2008-10-20 08:50:26 -07:00
maccess.c
madvise.c
Makefile SLUB: failslab support 2008-12-29 11:27:46 +02:00
memcontrol.c memcg: fix page_cgroup allocation 2008-10-23 08:55:02 -07:00
memory.c Merge branch 'core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-12-30 16:10:19 -08:00
memory_hotplug.c meminit section warnings 2008-11-30 10:03:35 -08:00
mempolicy.c Merge branch 'master' into next 2008-11-14 11:29:12 +11:00
mempool.c
migrate.c Merge branch 'next' into for-linus 2008-12-25 11:40:09 +11:00
mincore.c
mlock.c x86, bts: memory accounting 2008-12-20 09:15:47 +01:00
mm_init.c
mmap.c integrity: IMA hooks 2009-02-06 09:05:30 +11:00
mmu_notifier.c
mmzone.c
mprotect.c
mremap.c mmap: handle mlocked pages during map, remap, unmap 2008-10-20 08:52:31 -07:00
msync.c
nommu.c nfsd: fix vm overcommit crash 2008-10-30 11:38:47 -07:00
oom_kill.c Merge branch 'master' into next 2008-11-14 11:29:12 +11:00
page-writeback.c vmscan: split LRU lists into anon & file sets 2008-10-20 08:50:25 -07:00
page_alloc.c cpusets: update mems allowed in page allocator 2008-11-12 17:17:16 -08:00
page_cgroup.c page_cgroup should ignore empty nodes 2008-12-10 08:01:53 -08:00
page_io.c
page_isolation.c memory hotplug: fix page_zone() calculation in test_pages_isolated() 2008-11-06 15:41:19 -08:00
pagewalk.c
pdflush.c Remove Andrew Morton's old email accounts 2008-10-16 11:21:32 -07:00
prio_tree.c
quicklist.c
readahead.c vmscan: split LRU lists into anon & file sets 2008-10-20 08:50:25 -07:00
rmap.c make mm/rmap.c:anon_vma_cachep static 2008-10-20 08:52:40 -07:00
shmem.c Integrity: IMA file free imbalance 2009-02-06 09:05:33 +11:00
shmem_acl.c
slab.c Merge branch 'topic/failslab' into for-linus 2008-12-29 11:47:05 +02:00
slob.c slob: do not pass the SLAB flags as GFP in kmem_cache_create() 2008-12-15 16:27:06 -08:00
slub.c Merge branch 'topic/failslab' into for-linus 2008-12-29 11:47:05 +02:00
sparse-vmemmap.c vmemmap: warn about page_structs with remote distance 2008-11-06 15:41:19 -08:00
sparse.c meminit section warnings 2008-11-30 10:03:35 -08:00
swap.c mm: remove UP version of lru_add_drain_all() 2008-12-10 08:01:53 -08:00
swap_state.c mm: pagecache insertion fewer atomics 2008-10-20 08:52:31 -07:00
swapfile.c x86: consolidate __swp_XXX() macros 2008-12-16 18:34:51 +01:00
thrash.c
tiny-shmem.c Export tiny shmem_file_setup for DRM-GEM 2008-10-20 16:17:42 -07:00
truncate.c mmap: handle mlocked pages during map, remap, unmap 2008-10-20 08:52:31 -07:00
util.c
vmalloc.c KSYM_SYMBOL_LEN fixes 2008-12-10 08:01:54 -08:00
vmscan.c vmscan: protect zone rotation stats by lru lock 2008-12-01 07:58:06 -08:00
vmstat.c proc: move /proc/zoneinfo boilerplate to mm/vmstat.c 2008-10-23 17:35:04 +04:00