12 Apr, 2010
10 commits
-
Unused hook. Remove.
Signed-off-by: Eric Paris
Signed-off-by: James Morris -
Unused hook. Remove.
Signed-off-by: Eric Paris
Signed-off-by: James Morris -
Unused hook. Remove.
Signed-off-by: Eric Paris
Signed-off-by: James Morris -
Unused hook. Remove.
Signed-off-by: Eric Paris
Signed-off-by: James Morris -
Unused hook. Remove.
Signed-off-by: Eric Paris
Signed-off-by: James Morris -
Unused hook. Remove.
Signed-off-by: Eric Paris
Signed-off-by: James Morris -
Unused hook. Remove.
Signed-off-by: Eric Paris
Signed-off-by: James Morris -
Unused hook. Remove.
Signed-off-by: Eric Paris
Signed-off-by: James Morris -
Unused hook. Remove.
Signed-off-by: Eric Paris
Signed-off-by: James Morris -
Unused hook. Remove it.
Signed-off-by: Eric Paris
Signed-off-by: James Morris
09 Apr, 2010
1 commit
-
Fix coding style in security/
Signed-off-by: Zhitong Wang
Signed-off-by: James Morris
08 Apr, 2010
2 commits
-
This is an unused hook in SMACK so remove it.
Signed-off-by: Eric Paris
Acked-by: Casey Schaufler
Signed-off-by: James Morris -
trying to grep everything that messes with a sk_security_struct isn't easy
since we don't always call it sksec. Just rename everything sksec.Signed-off-by: Eric Paris
Signed-off-by: James Morris
31 Mar, 2010
1 commit
16 Mar, 2010
1 commit
-
Reduce MAX_AVTAB_HASH_BITS so that the avtab allocation is an order 2
allocation rather than an order 4 allocation on x86_64. This
addresses reports of page allocation failures:
http://marc.info/?l=selinux&m=126757230625867&w=2
https://bugzilla.redhat.com/show_bug.cgi?id=570433Reported-by: Russell Coker
Signed-off-by: Stephen D. Smalley
Acked-by: Eric Paris
Signed-off-by: James Morris
15 Mar, 2010
1 commit
-
The original code returns a freed pointer. This function is expected to
return NULL on errors.Signed-off-by: Dan Carpenter
Acked-by: Tetsuo Handa
Signed-off-by: James Morris
10 Mar, 2010
2 commits
-
As noted by checkpatch.pl, __func__ should be used instead of gcc
specific __FUNCTION__.Signed-off-by: H Hartley Sweeten
Signed-off-by: James Morris -
This fixes to include instead and some
code style issues like to put a else sentence below close brace '}' and
to replace a tab instead of some space characters.Signed-off-by: Chihau Chau
Acked-by: David Howells
Signed-off-by: James Morris
09 Mar, 2010
1 commit
08 Mar, 2010
2 commits
-
Conflicts:
Documentation/filesystems/proc.txt
arch/arm/mach-u300/include/mach/debug-macro.S
drivers/net/qlge/qlge_ethtool.c
drivers/net/qlge/qlge_main.c
drivers/net/typhoon.c -
Several places strings tables are used that should be declared
const.Signed-off-by: Stephen Hemminger
Signed-off-by: James Morris
05 Mar, 2010
2 commits
-
Fix some coding styles in security/keys/keyring.c
Signed-off-by: Zhitong Wang
Signed-off-by: James Morris -
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (52 commits)
init: Open /dev/console from rootfs
mqueue: fix typo "failues" -> "failures"
mqueue: only set error codes if they are really necessary
mqueue: simplify do_open() error handling
mqueue: apply mathematics distributivity on mq_bytes calculation
mqueue: remove unneeded info->messages initialization
mqueue: fix mq_open() file descriptor leak on user-space processes
fix race in d_splice_alias()
set S_DEAD on unlink() and non-directory rename() victims
vfs: add NOFOLLOW flag to umount(2)
get rid of ->mnt_parent in tomoyo/realpath
hppfs can use existing proc_mnt, no need for do_kern_mount() in there
Mirror MS_KERNMOUNT in ->mnt_flags
get rid of useless vfsmount_lock use in put_mnt_ns()
Take vfsmount_lock to fs/internal.h
get rid of insanity with namespace roots in tomoyo
take check for new events in namespace (guts of mounts_poll()) to namespace.c
Don't mess with generic_permission() under ->d_lock in hpfs
sanitize const/signedness for udf
nilfs: sanitize const/signedness in dealing with ->d_name.name
...Fix up fairly trivial (famous last words...) conflicts in
drivers/infiniband/core/uverbs_main.c and security/tomoyo/realpath.c
04 Mar, 2010
4 commits
-
skbuff.h is already included by netlink.h, so remove it.
Signed-off-by: Zhitong Wang
Signed-off-by: James Morris -
Signed-off-by: Al Viro
-
passing *any* namespace root to __d_path() as root is equivalent
to just passing it {NULL, NULL}; no need to bother with finding
the root of our namespace in there.Signed-off-by: Al Viro
-
(mnt,mnt_mountpoint) pair is conceptually wrong; if you want
to use it for generating pathname and for nothing else *and*
if you know that vfsmount tree is unchanging, you can get
away with that, but the right solution for that is (mnt,mnt_root).Signed-off-by: Al Viro
03 Mar, 2010
4 commits
-
slab.h is unused in symtab.c, so remove it.
Signed-off-by: Zhitong Wang
Signed-off-by: James Morris -
list.h is unused in netlink.c, so remove it.
Signed-off-by: Zhitong Wang
Signed-off-by: James Morris -
Variable "atmark" is currently unused.
Signed-off-by: Tetsuo Handa
Signed-off-by: James Morris -
LSM framework doesn't allow to load a security module on runtime, it must be loaded on boot time.
but in security/security.c:
int register_security(struct security_operations *ops)
{
...
if (security_ops != &default_security_ops)
return -EAGAIN;
...
}
if security_ops == &default_security_ops, it can access to register a security module. If selinux is enabled,
other security modules can't register, but if selinux is disabled on boot time, the security_ops was set to
default_security_ops, LSM allows other kernel modules to use register_security() to register a not trust
security module. For example:disable selinux on boot time(selinux=0).
#include
#include
#include
#include
#include
#include
#includeMODULE_LICENSE("GPL");
MODULE_AUTHOR("wzt");extern int register_security(struct security_operations *ops);
int (*new_register_security)(struct security_operations *ops);int rootkit_bprm_check_security(struct linux_binprm *bprm)
{
return 0;
}struct security_operations rootkit_ops = {
.bprm_check_security = rootkit_bprm_check_security,
};static int rootkit_init(void)
{
printk("Load LSM rootkit module.\n");/* cat /proc/kallsyms | grep register_security */
new_register_security = 0xc0756689;
if (new_register_security(&rootkit_ops)) {
printk("Can't register rootkit module.\n");
return 0;
}
printk("Register rootkit module ok.\n");return 0;
}static void rootkit_exit(void)
{
printk("Unload LSM rootkit module.\n");
}module_init(rootkit_init);
module_exit(rootkit_exit);Signed-off-by: Zhitong Wang
Signed-off-by: James Morris
01 Mar, 2010
2 commits
-
* 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (44 commits)
rcu: Fix accelerated GPs for last non-dynticked CPU
rcu: Make non-RCU_PROVE_LOCKING rcu_read_lock_sched_held() understand boot
rcu: Fix accelerated grace periods for last non-dynticked CPU
rcu: Export rcu_scheduler_active
rcu: Make rcu_read_lock_sched_held() take boot time into account
rcu: Make lockdep_rcu_dereference() message less alarmist
sched, cgroups: Fix module export
rcu: Add RCU_CPU_STALL_VERBOSE to dump detailed per-task information
rcu: Fix rcutorture mod_timer argument to delay one jiffy
rcu: Fix deadlock in TREE_PREEMPT_RCU CPU stall detection
rcu: Convert to raw_spinlocks
rcu: Stop overflowing signed integers
rcu: Use canonical URL for Mathieu's dissertation
rcu: Accelerate grace period if last non-dynticked CPU
rcu: Fix citation of Mathieu's dissertation
rcu: Documentation update for CONFIG_PROVE_RCU
security: Apply lockdep-based checking to rcu_dereference() uses
idr: Apply lockdep-based diagnostics to rcu_dereference() uses
radix-tree: Disable RCU lockdep checking in radix tree
vfs: Abstract rcu_dereference_check for files-fdtable use
...
26 Feb, 2010
2 commits
-
Make selinux_kernel_create_files_as() return an error when it gets one, rather
than unconditionally returning 0.Without this, cachefiles doesn't return an error if the SELinux policy doesn't
let it create files with the label of the directory at the base of the cache.Signed-off-by: David Howells
Signed-off-by: James Morris -
Holding tasklist_lock is no longer sufficient for find_task_by_vpid().
Explicit rcu_read_lock() is required.Signed-off-by: Tetsuo Handa
--
security/tomoyo/common.c | 4 ++++
1 file changed, 4 insertions(+)
Signed-off-by: James Morris
25 Feb, 2010
3 commits
-
Apply lockdep-ified RCU primitives to key_gc_keyring() and
keyring_destroy().Cc: David Howells
Signed-off-by: Paul E. McKenney
Cc: laijs@cn.fujitsu.com
Cc: dipankar@in.ibm.com
Cc: mathieu.desnoyers@polymtl.ca
Cc: josh@joshtriplett.org
Cc: dvhltc@us.ibm.com
Cc: niv@us.ibm.com
Cc: peterz@infradead.org
Cc: rostedt@goodmis.org
Cc: Valdis.Kletnieks@vt.edu
Cc: dhowells@redhat.com
LKML-Reference:
Signed-off-by: Ingo Molnar -
This fixes corrupted CIPSO packets when SELinux categories greater than 127
are used. The bug occured on the second (and later) loops through the
while; the inner for loop through the ebitmap->maps array used the same
index as the NetLabel catmap->bitmap array, even though the NetLabel bitmap
is twice as long as the SELinux bitmap.Signed-off-by: Joshua Roys
Acked-by: Paul Moore
Signed-off-by: James Morris -
If radix_tree_preload is failed in ima_inode_alloc, we don't need
radix_tree_preload_end because kernel is alread preempt enabledSigned-off-by: Xiaotian Feng
Signed-off-by: Mimi Zohar
Signed-off-by: James Morris
24 Feb, 2010
1 commit
-
Enhance the security framework to support resetting the active security
module. This eliminates the need for direct use of the security_ops and
default_security_ops variables outside of security.c, so make security_ops
and default_security_ops static. Also remove the secondary_ops variable as
a cleanup since there is no use for that. secondary_ops was originally used by
SELinux to call the "secondary" security module (capability or dummy),
but that was replaced by direct calls to capability and the only
remaining use is to save and restore the original security ops pointer
value if SELinux is disabled by early userspace based on /etc/selinux/config.
Further, if we support this directly in the security framework, then we can
just use &default_security_ops for this purpose since that is now available.Signed-off-by: Zhitong Wang
Acked-by: Stephen Smalley
Signed-off-by: James Morris
22 Feb, 2010
1 commit
-
This patch revert the commit of 7d52a155e38d5a165759dbbee656455861bf7801
which removed a part of type_attribute_bounds_av as a dead code.
However, at that time, we didn't find out the target side boundary allows
to handle some of pseudo /proc//* entries with its process's security
context well.Signed-off-by: KaiGai Kohei
Acked-by: Stephen Smalley--
security/selinux/ss/services.c | 43 ++++++++++++++++++++++++++++++++++++---
1 files changed, 39 insertions(+), 4 deletions(-)
Signed-off-by: James Morris