1. 24 1月, 2011 1 次提交
  2. 27 10月, 2010 1 次提交
  3. 11 8月, 2010 6 次提交
  4. 29 10月, 2009 1 次提交
    • R
      param: fix lots of bugs with writing charp params from sysfs, by leaking mem. · 65afac7d
      Rusty Russell 提交于
      e180a6b7 "param: fix charp parameters set via sysfs" fixed the case
      where charp parameters written via sysfs were freed, leaving drivers
      accessing random memory.
      
      Unfortunately, storing a flag in the kparam struct was a bad idea: it's
      rodata so setting it causes an oops on some archs.  But that's not all:
      
      1) module_param_array() on charp doesn't work reliably, since we use an
         uninitialized temporary struct kernel_param.
      2) there's a fundamental race if a module uses this parameter and then
         it's changed: they will still access the old, freed, memory.
      
      The simplest fix (ie. for 2.6.32) is to never free the memory.  This
      prevents all these problems, at cost of a memory leak.  In practice, there
      are only 18 places where a charp is writable via sysfs, and all are
      root-only writable.
      Reported-by: NTakashi Iwai <tiwai@suse.de>
      Cc: Sitsofe Wheeler <sitsofe@yahoo.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Christof Schmitt <christof.schmitt@de.ibm.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Cc: stable@kernel.org
      65afac7d
  5. 12 6月, 2009 3 次提交
  6. 31 3月, 2009 1 次提交
  7. 22 10月, 2008 2 次提交
    • R
      core_param() for genuinely core kernel parameters · 67e67cea
      Rusty Russell 提交于
      There are a lot of one-liner uses of __setup() in the kernel: they're
      cumbersome and not queryable (definitely not settable) via /sys.  Yet
      it's ugly to simplify them to module_param(), because by default that
      inserts a prefix of the module name (usually filename).
      
      So, introduce a "core_param".  The parameter gets no prefix, but
      appears in /sys/module/kernel/parameters/ (if non-zero perms arg).  I
      thought about using the name "core", but that's more common than
      "kernel".  And if you create a module called "kernel", you will die
      a horrible death.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      67e67cea
    • R
      module: check kernel param length at compile time, not runtime · 730b69d2
      Rusty Russell 提交于
      The kparam code tries to handle over-length parameter prefixes at
      runtime.  Not only would I bet this has never been tested, it's not
      clear that truncating names is a good idea either.
      
      So let's check at compile time.  We need to move the #define to
      moduleparam.h to do this, though.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      730b69d2
  8. 14 2月, 2008 1 次提交
  9. 29 1月, 2008 1 次提交
  10. 17 10月, 2007 1 次提交
  11. 18 2月, 2007 1 次提交
  12. 17 2月, 2007 1 次提交
  13. 08 12月, 2006 1 次提交
    • A
      [PATCH] Compile-time check re world-writeable module params · 9774a1f5
      Alexey Dobriyan 提交于
      One of the mistakes a module_param() user can make is to supply default
      value of module parameter as the last argument.  module_param() accepts
      permissions instead.  If default value is, say, 3 (-------wx), parameter
      becomes world-writeable.
      
      So far, the only remedy was to apply grep(1) and read drivers submitted
      to -mm. BTDT.
      
      With this patch applied, compiler will finally do some job.
      
      *) bounds checking on permissions
      *) world-writeable bit checking on permissions
      *) compile breakage if checks trigger
      
      First version of this check (only "& 2" part) directly caught 4 out of 7
      places during my last grep.
      
          Subject: Neverending module_param() bugs
          [X] drivers/acpi/sbs.c:101:module_param(capacity_mode, int, CAPACITY_UNIT);
          [X] drivers/acpi/sbs.c:102:module_param(update_mode, int, UPDATE_MODE);
          [ ] drivers/acpi/sbs.c:103:module_param(update_info_mode, int, UPDATE_INFO_MODE);
          [ ] drivers/acpi/sbs.c:104:module_param(update_time, int, UPDATE_TIME);
          [ ] drivers/acpi/sbs.c:105:module_param(update_time2, int, UPDATE_TIME2);
          [X] drivers/char/watchdog/sbc8360.c:203:module_param(timeout, int, 27);
          [X] drivers/media/video/tuner-simple.c:13:module_param(offset, int, 0666);
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      9774a1f5
  14. 26 3月, 2006 1 次提交
  15. 07 1月, 2006 1 次提交
    • S
      kbuild: un-stringnify KBUILD_MODNAME · 367cb704
      Sam Ravnborg 提交于
      Now when kbuild passes KBUILD_MODNAME with "" do not __stringify it when
      used. Remove __stringnify for all users.
      This also fixes the output of:
      
      $ ls -l /sys/module/
      drwxr-xr-x 4 root root 0 2006-01-05 14:24 pcmcia
      drwxr-xr-x 4 root root 0 2006-01-05 14:24 pcmcia_core
      drwxr-xr-x 3 root root 0 2006-01-05 14:24 "processor"
      drwxr-xr-x 3 root root 0 2006-01-05 14:24 "psmouse"
      
      The quoting of the module names will be gone again.
      Thanks to GregKH + Kay Sievers for reproting this.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      367cb704
  16. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4