1. 16 11月, 2008 1 次提交
  2. 31 10月, 2008 1 次提交
  3. 29 10月, 2008 1 次提交
  4. 17 10月, 2008 2 次提交
    • A
      Make the taint flags reliable · 25ddbb18
      Andi Kleen 提交于
      It's somewhat unlikely that it happens, but right now a race window
      between interrupts or machine checks or oopses could corrupt the tainted
      bitmap because it is modified in a non atomic fashion.
      
      Convert the taint variable to an unsigned long and use only atomic bit
      operations on it.
      
      Unfortunately this means the intvec sysctl functions cannot be used on it
      anymore.
      
      It turned out the taint sysctl handler could actually be simplified a bit
      (since it only increases capabilities) so this patch actually removes
      code.
      
      [akpm@linux-foundation.org: remove unneeded include]
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      25ddbb18
    • J
      driver core: basic infrastructure for per-module dynamic debug messages · 346e15be
      Jason Baron 提交于
      Base infrastructure to enable per-module debug messages.
      
      I've introduced CONFIG_DYNAMIC_PRINTK_DEBUG, which when enabled centralizes
      control of debugging statements on a per-module basis in one /proc file,
      currently, <debugfs>/dynamic_printk/modules. When, CONFIG_DYNAMIC_PRINTK_DEBUG,
      is not set, debugging statements can still be enabled as before, often by
      defining 'DEBUG' for the proper compilation unit. Thus, this patch set has no
      affect when CONFIG_DYNAMIC_PRINTK_DEBUG is not set.
      
      The infrastructure currently ties into all pr_debug() and dev_dbg() calls. That
      is, if CONFIG_DYNAMIC_PRINTK_DEBUG is set, all pr_debug() and dev_dbg() calls
      can be dynamically enabled/disabled on a per-module basis.
      
      Future plans include extending this functionality to subsystems, that define 
      their own debug levels and flags.
      
      Usage:
      
      Dynamic debugging is controlled by the debugfs file, 
      <debugfs>/dynamic_printk/modules. This file contains a list of the modules that
      can be enabled. The format of the file is as follows:
      
      	<module_name> <enabled=0/1>
      		.
      		.
      		.
      
      	<module_name> : Name of the module in which the debug call resides
      	<enabled=0/1> : whether the messages are enabled or not
      
      For example:
      
      	snd_hda_intel enabled=0
      	fixup enabled=1
      	driver enabled=0
      
      Enable a module:
      
      	$echo "set enabled=1 <module_name>" > dynamic_printk/modules
      
      Disable a module:
      
      	$echo "set enabled=0 <module_name>" > dynamic_printk/modules
      
      Enable all modules:
      
      	$echo "set enabled=1 all" > dynamic_printk/modules
      
      Disable all modules:
      
      	$echo "set enabled=0 all" > dynamic_printk/modules
      
      Finally, passing "dynamic_printk" at the command line enables
      debugging for all modules. This mode can be turned off via the above
      disable command.
      
      [gkh: minor cleanups and tweaks to make the build work quietly]
      Signed-off-by: NJason Baron <jbaron@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      346e15be
  5. 14 10月, 2008 1 次提交
  6. 12 10月, 2008 1 次提交
  7. 11 10月, 2008 1 次提交
    • G
      Staging: add TAINT_CRAP for all drivers/staging code · 061b1bd3
      Greg Kroah-Hartman 提交于
      We need to add a flag for all code that is in the drivers/staging/
      directory to prevent all other kernel developers from worrying about
      issues here, and to notify users that the drivers might not be as good
      as they are normally used to.
      
      Based on code from Andreas Gruenbacher and Jeff Mahoney to provide a
      TAINT flag for the support level of a kernel module in the Novell
      enterprise kernel release.
      
      This is the kernel portion of this feature, the ability for the flag to
      be set needs to be done in the build process and will happen in a
      follow-up patch.
      
      Cc: Andreas Gruenbacher <agruen@suse.de>
      Cc: Jeff Mahoney <jeffm@suse.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      061b1bd3
  8. 23 9月, 2008 1 次提交
    • T
      Introduce FW_BUG, FW_WARN and FW_INFO to consistenly tell users about BIOS bugs · a0ad05c7
      Thomas Renninger 提交于
      The idea is to add this to printk after the severity:
      printk(KERN_ERR FW_BUG "This is not our fault, BIOS developer: fix it by
      simply add ...\n");
      
      If a Firmware issue should be hidden, because it is
      work-arounded, but you still want to see something popping up e.g.
      for info only:
      printk(KERN_INFO FW_INFO "This is done stupid, we can handle it,
      but it should better be avoided in future\n");
      
      or on the Linuxfirmwarekit to tell vendors that they did something
      stupid or wrong without bothering the user:
      printk(KERN_INFO FW_BUG "This is done stupid, we can handle it,
      but it should better be avoided in future\n");
      
      Some use cases:
        - If a user sees a [Firmware Bug] message in the kernel
          he should first update the BIOS before wasting time with
          debugging and submiting on old firmware code to mailing
          lists.
      
        - The linuxfirmwarekit (http://www.linuxfirmwarekit.org)
          tries to detect firmware bugs. It currently is doing that
          in userspace which results in:
              - Huge test scripts that could be a one liner in the kernel
              - A lot of BIOS bugs are already absorbed by the kernel
      
      What do we need such a stupid linuxfirmwarekit for?
      
        - Vendors: Can test their BIOSes for Linux compatibility.
          There will be the time when vendors realize that the test utils
          on Linux are more strict and using them increases the qualitity
          and stability of their products.
      
        - Vendors: Can easily fix up their BIOSes and be more Linux
          compatible by:
          dmesg |grep "Firmware Bug"
          and send the result to their BIOS developer colleagues who should
          know what the messages are about and how to fix them, without
          the need of studying kernel code.
      
        - Distributions: can do a first automated HW/BIOS checks.
          This can then be done without the need of asking kernel developers
          who need to dig down the code and explain the details.
          Certification can/will just be rejected until
          dmesg |grep "Firmware Bug" is empty.
      
        - Thus this can be used as an instrument to enforce cleaner BIOS
          code. Currently every stupid Windows ACPI bug is
          re-implemented in Linux which is a rather unfortunate situation.
          We already have the power to avoid this in e.g. memory
          or cpu hot-plug ACPI implementations, because Linux certification
          is a must for most vendors in the server area.
          Working towards being able to do that in the laptop area
          (vendors are starting to look at Linux here also and will use this tool)
          is the goal. At least provide them a tool to make it as easy
          for this guys (e.g. not needing to browse kernel code) as possible.
      
        - The ordinary Linux user: can go into the next shop, boots the
          firmwarekit on his most preferred machines. He chooses one without
          BIOS bugs. Unsupported HW is ok, he likes to try out latest projects
          which might support them or likes to dig on it on his own, but he
          hates to workaround broken BIOSes like hell.
      
      I double checked with the firmwarekit.
      There they have:
      So the mapping generally is (also depending on how likely the BIOS is
      to blame, this could sometimes be difficult):
      FW_INFO  = INFO
      FW_WARN  = WARN
      FW_BUG   = FAIL
      
      For more info about the linuxfirmwarekit and why this is needed
      can be found here:
      http://www.linuxfirmwarekit.org
      
      While severity matches with the firmwarekit, it might be tricky
      to hide messages from the user.
      E.g. we recently found out that on HP BIOSes negative temperatures
      are returned, which seem to indicate that the thermal zone is
      invalid.
      We can work around that gracefully by ignoring the thermal zone
      and we do not want to bother the ordinary user with a frightening
      message: Firmware Bug: thermal management absolutely broken
      but want to hide it from the user.
      
      But in the linuxfirmwarekit this should be shown as a real
      show stopper (the temperatures could really be wrong,
      broken thermal management is one of the worst things
      that can happen and the BIOS guys of the machine must
      implement this properly).
      
      It is intended to do that (hide it from the user with
      KERN_INFO msg, but still print it as a BIOS bug) by:
      printk(KERN_INFO FW_BUG "Negativ temperature values detected.
      Try to workarounded, BIOS must get fixed\n");
      Hope that works out..., no idea how to better hide it
      as printk is the only way to easily provide this functionality.
      Signed-off-by: NThomas Renninger <trenn@suse.de>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      a0ad05c7
  9. 11 9月, 2008 1 次提交
  10. 10 9月, 2008 1 次提交
  11. 09 9月, 2008 1 次提交
  12. 07 9月, 2008 2 次提交
  13. 13 8月, 2008 1 次提交
  14. 11 8月, 2008 2 次提交
  15. 31 7月, 2008 1 次提交
  16. 28 7月, 2008 1 次提交
  17. 26 7月, 2008 2 次提交
  18. 06 7月, 2008 1 次提交
  19. 18 6月, 2008 1 次提交
  20. 25 5月, 2008 1 次提交
  21. 15 5月, 2008 1 次提交
  22. 30 4月, 2008 1 次提交
  23. 29 4月, 2008 3 次提交
  24. 20 4月, 2008 1 次提交
    • J
      driver core: Convert debug functions declared inline __attribute__((format... · 1429db83
      Joe Perches 提交于
      driver core: Convert debug functions declared inline __attribute__((format (printf,x,y) to statement expression macros
      
      When DEBUG is not defined, pr_debug and dev_dbg and some
      other local debugging functions are specified as:
      
      "inline __attribute__((format (printf, x, y)))"
      
      This is done to validate printk arguments when not debugging.
      
      Converting these functions to macros or statement expressions
      "do { if (0) printk(fmt, ##arg); } while (0)"
      or
      "({ if (0) printk(fmt, ##arg); 0; })
      makes at least gcc 4.2.2 produce smaller objects.
      
      This has the additional benefit of allowing the optimizer to
      avoid calling functions like print_mac that might have been
      arguments to the printk.
      
      defconfig x86 current:
      
      $ size vmlinux
         text    data     bss     dec     hex filename
      4716770  474560  618496 5809826  58a6a2 vmlinux
      
      all converted: (More patches follow)
      
      $ size vmlinux
         text    data     bss     dec     hex filename
      4716642  474560  618496 5809698  58a622 vmlinux
      
      Even kernel/sched.o, which doesn't even use these
      functions, becomes smaller.
      
      It appears that merely having an indirect include
      of <linux/device.h> can cause bigger objects.
      
      $ size sched.inline.o sched.if0.o
         text    data     bss     dec     hex filename
        31385    2854     328   34567    8707 sched.inline.o
        31366    2854     328   34548    86f4 sched.if0.o
      
      The current preprocessed only kernel/sched.i file contains:
      
      # 612 "include/linux/device.h"
      static inline __attribute__((always_inline)) int __attribute__ ((format (printf, 2, 3)))
      dev_dbg(struct device *dev, const char *fmt, ...)
      {
       return 0;
      }
      # 628 "include/linux/device.h"
      static inline __attribute__((always_inline)) int __attribute__ ((format (printf, 2, 3)))
      dev_vdbg(struct device *dev, const char *fmt, ...)
      {
       return 0;
      }
      
      Removing these unused inlines from sched.i shrinks sched.o
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      1429db83
  25. 09 2月, 2008 5 次提交
    • Y
      Add new string functions strict_strto* and convert kernel params to use them · 06b2a76d
      Yi Yang 提交于
      Currently, for every sysfs node, the callers will be responsible for
      implementing store operation, so many many callers are doing duplicate
      things to validate input, they have the same mistakes because they are
      calling simple_strtol/ul/ll/uul, especially for module params, they are
      just numeric, but you can echo such values as 0x1234xxx, 07777888 and
      1234aaa, for these cases, module params store operation just ignores
      succesive invalid char and converts prefix part to a numeric although input
      is acctually invalid.
      
      This patch tries to fix the aforementioned issues and implements
      strict_strtox serial functions, kernel/params.c uses them to strictly
      validate input, so module params will reject such values as 0x1234xxxx and
      returns an error:
      
      write error: Invalid argument
      
      Any modules which export numeric sysfs node can use strict_strtox instead of
      simple_strtox to reject any invalid input.
      
      Here are some test results:
      
      Before applying this patch:
      
      [root@yangyi-dev /]# cat /sys/module/e1000/parameters/copybreak
      4096
      [root@yangyi-dev /]# echo 0x1000 > /sys/module/e1000/parameters/copybreak
      [root@yangyi-dev /]# cat /sys/module/e1000/parameters/copybreak
      4096
      [root@yangyi-dev /]# echo 0x1000g > /sys/module/e1000/parameters/copybreak
      [root@yangyi-dev /]# cat /sys/module/e1000/parameters/copybreak
      4096
      [root@yangyi-dev /]# echo 0x1000gggggggg > /sys/module/e1000/parameters/copybreak
      [root@yangyi-dev /]# cat /sys/module/e1000/parameters/copybreak
      4096
      [root@yangyi-dev /]# echo 010000 > /sys/module/e1000/parameters/copybreak
      [root@yangyi-dev /]# cat /sys/module/e1000/parameters/copybreak
      4096
      [root@yangyi-dev /]# echo 0100008 > /sys/module/e1000/parameters/copybreak
      [root@yangyi-dev /]# cat /sys/module/e1000/parameters/copybreak
      4096
      [root@yangyi-dev /]# echo 010000aaaaa > /sys/module/e1000/parameters/copybreak
      [root@yangyi-dev /]# cat /sys/module/e1000/parameters/copybreak
      4096
      [root@yangyi-dev /]#
      
      After applying this patch:
      
      [root@yangyi-dev /]# cat /sys/module/e1000/parameters/copybreak
      4096
      [root@yangyi-dev /]# echo 0x1000 > /sys/module/e1000/parameters/copybreak
      [root@yangyi-dev /]# cat /sys/module/e1000/parameters/copybreak
      4096
      [root@yangyi-dev /]# echo 0x1000g > /sys/module/e1000/parameters/copybreak
      -bash: echo: write error: Invalid argument
      [root@yangyi-dev /]# cat /sys/module/e1000/parameters/copybreak
      4096
      [root@yangyi-dev /]# echo 0x1000gggggggg > /sys/module/e1000/parameters/copybreak
      -bash: echo: write error: Invalid argument
      [root@yangyi-dev /]# echo 010000 > /sys/module/e1000/parameters/copybreak
      [root@yangyi-dev /]# echo 0100008 > /sys/module/e1000/parameters/copybreak
      -bash: echo: write error: Invalid argument
      [root@yangyi-dev /]# echo 010000aaaaa > /sys/module/e1000/parameters/copybreak
      -bash: echo: write error: Invalid argument
      [root@yangyi-dev /]# cat /sys/module/e1000/parameters/copybreak
      4096
      [root@yangyi-dev /]# echo -n 4096 > /sys/module/e1000/parameters/copybreak
      [root@yangyi-dev /]# cat /sys/module/e1000/parameters/copybreak
      4096
      [root@yangyi-dev /]#
      
      [akpm@linux-foundation.org: fix compiler warnings]
      [akpm@linux-foundation.org: fix off-by-one found by tiwai@suse.de]
      Signed-off-by: NYi Yang <yi.y.yang@intel.com>
      Cc: Greg KH <greg@kroah.com>
      Cc: "Randy.Dunlap" <rdunlap@xenotime.net>
      Cc: Takashi Iwai <tiwai@suse.de>
      Cc: Hugh Dickins <hugh@veritas.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      06b2a76d
    • J
      printk_ratelimit() functions should use CONFIG_PRINTK · 7ef3d2fd
      Joe Perches 提交于
      Makes an embedded image a bit smaller.
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7ef3d2fd
    • H
      Remove fastcall from linux/include · ec701584
      Harvey Harrison 提交于
      [akpm@linux-foundation.org: coding-style fixes]
      Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ec701584
    • D
      mn10300: add the MN10300/AM33 architecture to the kernel · b920de1b
      David Howells 提交于
      Add architecture support for the MN10300/AM33 CPUs produced by MEI to the
      kernel.
      
      This patch also adds board support for the ASB2303 with the ASB2308 daughter
      board, and the ASB2305.  The only processor supported is the MN103E010, which
      is an AM33v2 core plus on-chip devices.
      
      [akpm@linux-foundation.org: nuke cvs control strings]
      Signed-off-by: NMasakazu Urade <urade.masakazu@jp.panasonic.com>
      Signed-off-by: NKoichi Yasutake <yasutake.koichi@jp.panasonic.com>
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b920de1b
    • D
      aout: suppress A.OUT library support if !CONFIG_ARCH_SUPPORTS_AOUT · 7fa30315
      David Howells 提交于
      Suppress A.OUT library support if CONFIG_ARCH_SUPPORTS_AOUT is not set.
      
      Not all architectures support the A.OUT binfmt, so the ELF binfmt should not
      be permitted to go looking for A.OUT libraries to load in such a case.  Not
      only that, but under such conditions A.OUT core dumps are not produced either.
      
      To make this work, this patch also does the following:
      
       (1) Makes the existence of the contents of linux/a.out.h contingent on
           CONFIG_ARCH_SUPPORTS_AOUT.
      
       (2) Renames dump_thread() to aout_dump_thread() as it's only called by A.OUT
           core dumping code.
      
       (3) Moves aout_dump_thread() into asm/a.out-core.h and makes it inline.  This
           is then included only where needed.  This means that this bit of arch
           code will be stored in the appropriate A.OUT binfmt module rather than
           the core kernel.
      
       (4) Drops A.OUT support for Blackfin (according to Mike Frysinger it's not
           needed) and FRV.
      
      This patch depends on the previous patch to move STACK_TOP[_MAX] out of
      asm/a.out.h and into asm/processor.h as they're required whether or not A.OUT
      format is available.
      
      [jdike@addtoit.com: uml: re-remove accidentally restored code]
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Cc: <linux-arch@vger.kernel.org>
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7fa30315
  26. 07 2月, 2008 2 次提交
  27. 30 1月, 2008 1 次提交
  28. 26 1月, 2008 1 次提交
  29. 17 10月, 2007 1 次提交