]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-module-and-param
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 5 Apr 2009 17:30:21 +0000 (10:30 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 5 Apr 2009 17:30:21 +0000 (10:30 -0700)
* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-module-and-param:
  module: use strstarts()
  strstarts: helper function for !strncmp(str, prefix, strlen(prefix))
  arm: allow usage of string functions in linux/string.h
  module: don't use stop_machine on module load
  module: create a request_module_nowait()
  module: include other structures in module version check
  module: remove the SHF_ALLOC flag on the __versions section.
  module: clarify the force-loading taint message.
  module: Export symbols needed for Ksplice
  Ksplice: Add functions for walking kallsyms symbols
  module: remove module_text_address()
  module: __module_address
  module: Make find_symbol return a struct kernel_symbol
  kernel/module.c: fix an unused goto label
  param: fix charp parameters set via sysfs

Fix trivial conflicts in kernel/extable.c manually.

1  2 
include/linux/string.h
kernel/extable.c

diff --combined include/linux/string.h
index 3c877d686375022f9b69773465e8b80eb92ac864,76ec218bb30f090781ee9b74d27ac290d5c2b32e..489019ef1694fdb883993ef3eafda49ef7ae4cb0
  #include <linux/compiler.h>   /* for inline */
  #include <linux/types.h>      /* for size_t */
  #include <linux/stddef.h>     /* for NULL */
 +#include <stdarg.h>
  
  extern char *strndup_user(const char __user *, long);
 +extern void *memdup_user(const void __user *, size_t);
  
  /*
   * Include machine specific inline routines
@@@ -113,14 -111,17 +113,23 @@@ extern void argv_free(char **argv)
  
  extern bool sysfs_streq(const char *s1, const char *s2);
  
 +#ifdef CONFIG_BINARY_PRINTF
 +int vbin_printf(u32 *bin_buf, size_t size, const char *fmt, va_list args);
 +int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf);
 +int bprintf(u32 *bin_buf, size_t size, const char *fmt, ...) __printf(3, 4);
 +#endif
 +
  extern ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppos,
                        const void *from, size_t available);
  
+ /**
+  * strstarts - does @str start with @prefix?
+  * @str: string to examine
+  * @prefix: prefix to look for.
+  */
+ static inline bool strstarts(const char *str, const char *prefix)
+ {
+       return strncmp(str, prefix, strlen(prefix)) == 0;
+ }
  #endif
  #endif /* _LINUX_STRING_H_ */
diff --combined kernel/extable.c
index c46da6a47036708dc373f074503efe6483bcaf2c,384f0da8a03e9997a6d06ffa624cfbdad7a9063f..81e99d1f0d5be93476ff27761d0a44232463dc9f
@@@ -41,14 -41,6 +41,14 @@@ const struct exception_table_entry *sea
        return e;
  }
  
 +static inline int init_kernel_text(unsigned long addr)
 +{
 +      if (addr >= (unsigned long)_sinittext &&
 +          addr <= (unsigned long)_einittext)
 +              return 1;
 +      return 0;
 +}
 +
  __notrace_funcgraph int core_kernel_text(unsigned long addr)
  {
        if (addr >= (unsigned long)_stext &&
@@@ -56,7 -48,8 +56,7 @@@
                return 1;
  
        if (system_state == SYSTEM_BOOTING &&
 -          addr >= (unsigned long)_sinittext &&
 -          addr <= (unsigned long)_einittext)
 +          init_kernel_text(addr))
                return 1;
        return 0;
  }
@@@ -65,26 -58,14 +65,26 @@@ __notrace_funcgraph int __kernel_text_a
  {
        if (core_kernel_text(addr))
                return 1;
-       if (__module_text_address(addr))
 -      return is_module_text_address(addr);
++      if (is_module_text_address(addr))
 +              return 1;
 +      /*
 +       * There might be init symbols in saved stacktraces.
 +       * Give those symbols a chance to be printed in
 +       * backtraces (such as lockdep traces).
 +       *
 +       * Since we are after the module-symbols check, there's
 +       * no danger of address overlap:
 +       */
 +      if (init_kernel_text(addr))
 +              return 1;
 +      return 0;
  }
  
  int kernel_text_address(unsigned long addr)
  {
        if (core_kernel_text(addr))
                return 1;
-       return module_text_address(addr) != NULL;
+       return is_module_text_address(addr);
  }
  
  /*
@@@ -100,5 -81,5 +100,5 @@@ int func_ptr_is_kernel_text(void *ptr
        addr = (unsigned long) dereference_function_descriptor(ptr);
        if (core_kernel_text(addr))
                return 1;
-       return module_text_address(addr) != NULL;
+       return is_module_text_address(addr);
  }