You'll get a merge issue on Documentation/module-signing.txt: the one in
your tree is more recent, so ignore mine please. Cheers, Rusty. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) iQIcBAABAgAGBQJS4IBbAAoJENkgDmzRrbjxvv4QAJRyid7F0kMMaImqNtLw+8Sc 9QouX5nE0pt9VIDVs0v3JaJVcJrFrML498DaWM8yi1M4l11EIgWH0GYJ2DLHt3yf F9AGNmwZRzSJnPVyG7HWOlMbqycwh95P3ldJ3NmGClI++BKI/Qn9ffa/hdy7O+1E y7K0TWQQmG1HgIA7BVY491bzQTiUtelqrKShup0TQ6hRYYESs1g+JOClQgeGiFLG Q3JInsYjc7mOtijdfivln4sZKbZjW8oP1Sud/3FrXfLEyS6WiZPDSE82H17ZpZrc q+tlGXziXLJKo8G3jcjCDGvM0GsMDZZe5LJQ7Ax28K73I0o9N7JTbC1cePBg3AWz YW7tWS3DQ9aNfQOum6aCFv9Nu9RadsIVOqMCDdlULbe7fCtK0PeIBxdgLZQOBauM Z5+fCwtfiW6VASnz+UFo+n6V5yzmOEsJToem1a8+UySnlKuO+NkdACBOhCxfditj 5nfOmj1rwoTKacc0jqTZ1twVBfVDSa3PYEqFf9e9DYx17ZjKEFZ0FV9NRX3EZnaN n5Z/Pw+jWMDL1FXFBMNfHUpfmq1spAul+h2+OMMc7+91v1TmRI4Xbeu1jWJeYv+S 0woqfOEHhB+0a6vgxhsXg2SWkyTGHGq/UdX0J4tvN2txKwde8zi2f2TIDdyDhSw9 YWghWp9FuiEuKJ8UgRX5 =9fZu -----END PGP SIGNATURE----- Merge tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux Pull module updates from Rusty Russell. * tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: module: Add missing newline in printk call. module: fix coding style export: declare ksymtab symbols module.h: Remove unnecessary semicolon params: improve standard definitions Add Documentation/module-signing.txt file
This commit is contained in:
commit
0dc3fd0249
4 changed files with 43 additions and 51 deletions
|
@ -59,6 +59,7 @@ extern struct module __this_module;
|
||||||
static const char __kstrtab_##sym[] \
|
static const char __kstrtab_##sym[] \
|
||||||
__attribute__((section("__ksymtab_strings"), aligned(1))) \
|
__attribute__((section("__ksymtab_strings"), aligned(1))) \
|
||||||
= VMLINUX_SYMBOL_STR(sym); \
|
= VMLINUX_SYMBOL_STR(sym); \
|
||||||
|
extern const struct kernel_symbol __ksymtab_##sym; \
|
||||||
__visible const struct kernel_symbol __ksymtab_##sym \
|
__visible const struct kernel_symbol __ksymtab_##sym \
|
||||||
__used \
|
__used \
|
||||||
__attribute__((section("___ksymtab" sec "+" #sym), unused)) \
|
__attribute__((section("___ksymtab" sec "+" #sym), unused)) \
|
||||||
|
|
|
@ -29,8 +29,7 @@
|
||||||
|
|
||||||
#define MODULE_NAME_LEN MAX_PARAM_PREFIX_LEN
|
#define MODULE_NAME_LEN MAX_PARAM_PREFIX_LEN
|
||||||
|
|
||||||
struct modversion_info
|
struct modversion_info {
|
||||||
{
|
|
||||||
unsigned long crc;
|
unsigned long crc;
|
||||||
char name[MODULE_NAME_LEN];
|
char name[MODULE_NAME_LEN];
|
||||||
};
|
};
|
||||||
|
@ -84,12 +83,12 @@ void sort_main_extable(void);
|
||||||
void trim_init_extable(struct module *m);
|
void trim_init_extable(struct module *m);
|
||||||
|
|
||||||
#ifdef MODULE
|
#ifdef MODULE
|
||||||
#define MODULE_GENERIC_TABLE(gtype,name) \
|
#define MODULE_GENERIC_TABLE(gtype, name) \
|
||||||
extern const struct gtype##_id __mod_##gtype##_table \
|
extern const struct gtype##_id __mod_##gtype##_table \
|
||||||
__attribute__ ((unused, alias(__stringify(name))))
|
__attribute__ ((unused, alias(__stringify(name))))
|
||||||
|
|
||||||
#else /* !MODULE */
|
#else /* !MODULE */
|
||||||
#define MODULE_GENERIC_TABLE(gtype,name)
|
#define MODULE_GENERIC_TABLE(gtype, name)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Generic info of form tag = "info" */
|
/* Generic info of form tag = "info" */
|
||||||
|
@ -126,7 +125,7 @@ extern const struct gtype##_id __mod_##gtype##_table \
|
||||||
* is a GPL combined work.
|
* is a GPL combined work.
|
||||||
*
|
*
|
||||||
* This exists for several reasons
|
* This exists for several reasons
|
||||||
* 1. So modinfo can show license info for users wanting to vet their setup
|
* 1. So modinfo can show license info for users wanting to vet their setup
|
||||||
* is free
|
* is free
|
||||||
* 2. So the community can ignore bug reports including proprietary modules
|
* 2. So the community can ignore bug reports including proprietary modules
|
||||||
* 3. So vendors can do likewise based on their own policies
|
* 3. So vendors can do likewise based on their own policies
|
||||||
|
@ -138,27 +137,29 @@ extern const struct gtype##_id __mod_##gtype##_table \
|
||||||
* authors use multiple MODULE_AUTHOR() statements/lines.
|
* authors use multiple MODULE_AUTHOR() statements/lines.
|
||||||
*/
|
*/
|
||||||
#define MODULE_AUTHOR(_author) MODULE_INFO(author, _author)
|
#define MODULE_AUTHOR(_author) MODULE_INFO(author, _author)
|
||||||
|
|
||||||
/* What your module does. */
|
/* What your module does. */
|
||||||
#define MODULE_DESCRIPTION(_description) MODULE_INFO(description, _description)
|
#define MODULE_DESCRIPTION(_description) MODULE_INFO(description, _description)
|
||||||
|
|
||||||
#define MODULE_DEVICE_TABLE(type,name) \
|
#define MODULE_DEVICE_TABLE(type, name) \
|
||||||
MODULE_GENERIC_TABLE(type##_device,name)
|
MODULE_GENERIC_TABLE(type##_device, name)
|
||||||
|
|
||||||
/* Version of form [<epoch>:]<version>[-<extra-version>].
|
/* Version of form [<epoch>:]<version>[-<extra-version>].
|
||||||
Or for CVS/RCS ID version, everything but the number is stripped.
|
* Or for CVS/RCS ID version, everything but the number is stripped.
|
||||||
<epoch>: A (small) unsigned integer which allows you to start versions
|
* <epoch>: A (small) unsigned integer which allows you to start versions
|
||||||
anew. If not mentioned, it's zero. eg. "2:1.0" is after
|
* anew. If not mentioned, it's zero. eg. "2:1.0" is after
|
||||||
"1:2.0".
|
* "1:2.0".
|
||||||
<version>: The <version> may contain only alphanumerics and the
|
|
||||||
character `.'. Ordered by numeric sort for numeric parts,
|
|
||||||
ascii sort for ascii parts (as per RPM or DEB algorithm).
|
|
||||||
<extraversion>: Like <version>, but inserted for local
|
|
||||||
customizations, eg "rh3" or "rusty1".
|
|
||||||
|
|
||||||
Using this automatically adds a checksum of the .c files and the
|
* <version>: The <version> may contain only alphanumerics and the
|
||||||
local headers in "srcversion".
|
* character `.'. Ordered by numeric sort for numeric parts,
|
||||||
*/
|
* ascii sort for ascii parts (as per RPM or DEB algorithm).
|
||||||
|
|
||||||
|
* <extraversion>: Like <version>, but inserted for local
|
||||||
|
* customizations, eg "rh3" or "rusty1".
|
||||||
|
|
||||||
|
* Using this automatically adds a checksum of the .c files and the
|
||||||
|
* local headers in "srcversion".
|
||||||
|
*/
|
||||||
|
|
||||||
#if defined(MODULE) || !defined(CONFIG_SYSFS)
|
#if defined(MODULE) || !defined(CONFIG_SYSFS)
|
||||||
#define MODULE_VERSION(_version) MODULE_INFO(version, _version)
|
#define MODULE_VERSION(_version) MODULE_INFO(version, _version)
|
||||||
|
@ -226,8 +227,7 @@ struct module_ref {
|
||||||
unsigned long decs;
|
unsigned long decs;
|
||||||
} __attribute((aligned(2 * sizeof(unsigned long))));
|
} __attribute((aligned(2 * sizeof(unsigned long))));
|
||||||
|
|
||||||
struct module
|
struct module {
|
||||||
{
|
|
||||||
enum module_state state;
|
enum module_state state;
|
||||||
|
|
||||||
/* Member of list of modules */
|
/* Member of list of modules */
|
||||||
|
@ -451,7 +451,7 @@ int module_kallsyms_on_each_symbol(int (*fn)(void *, const char *,
|
||||||
|
|
||||||
extern void __module_put_and_exit(struct module *mod, long code)
|
extern void __module_put_and_exit(struct module *mod, long code)
|
||||||
__attribute__((noreturn));
|
__attribute__((noreturn));
|
||||||
#define module_put_and_exit(code) __module_put_and_exit(THIS_MODULE, code);
|
#define module_put_and_exit(code) __module_put_and_exit(THIS_MODULE, code)
|
||||||
|
|
||||||
#ifdef CONFIG_MODULE_UNLOAD
|
#ifdef CONFIG_MODULE_UNLOAD
|
||||||
unsigned long module_refcount(struct module *mod);
|
unsigned long module_refcount(struct module *mod);
|
||||||
|
@ -480,8 +480,8 @@ static inline void module_put(struct module *module)
|
||||||
static inline void __module_get(struct module *module)
|
static inline void __module_get(struct module *module)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
#define symbol_put(x) do { } while(0)
|
#define symbol_put(x) do { } while (0)
|
||||||
#define symbol_put_addr(p) do { } while(0)
|
#define symbol_put_addr(p) do { } while (0)
|
||||||
|
|
||||||
#endif /* CONFIG_MODULE_UNLOAD */
|
#endif /* CONFIG_MODULE_UNLOAD */
|
||||||
int ref_module(struct module *a, struct module *b);
|
int ref_module(struct module *a, struct module *b);
|
||||||
|
@ -507,8 +507,8 @@ int lookup_module_symbol_attrs(unsigned long addr, unsigned long *size, unsigned
|
||||||
/* For extable.c to search modules' exception tables. */
|
/* For extable.c to search modules' exception tables. */
|
||||||
const struct exception_table_entry *search_module_extables(unsigned long addr);
|
const struct exception_table_entry *search_module_extables(unsigned long addr);
|
||||||
|
|
||||||
int register_module_notifier(struct notifier_block * nb);
|
int register_module_notifier(struct notifier_block *nb);
|
||||||
int unregister_module_notifier(struct notifier_block * nb);
|
int unregister_module_notifier(struct notifier_block *nb);
|
||||||
|
|
||||||
extern void print_modules(void);
|
extern void print_modules(void);
|
||||||
|
|
||||||
|
@ -548,8 +548,8 @@ static inline bool is_module_text_address(unsigned long addr)
|
||||||
|
|
||||||
/* Get/put a kernel symbol (calls should be symmetric) */
|
/* Get/put a kernel symbol (calls should be symmetric) */
|
||||||
#define symbol_get(x) ({ extern typeof(x) x __attribute__((weak)); &(x); })
|
#define symbol_get(x) ({ extern typeof(x) x __attribute__((weak)); &(x); })
|
||||||
#define symbol_put(x) do { } while(0)
|
#define symbol_put(x) do { } while (0)
|
||||||
#define symbol_put_addr(x) do { } while(0)
|
#define symbol_put_addr(x) do { } while (0)
|
||||||
|
|
||||||
static inline void __module_get(struct module *module)
|
static inline void __module_get(struct module *module)
|
||||||
{
|
{
|
||||||
|
@ -606,13 +606,13 @@ static inline int module_kallsyms_on_each_symbol(int (*fn)(void *, const char *,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int register_module_notifier(struct notifier_block * nb)
|
static inline int register_module_notifier(struct notifier_block *nb)
|
||||||
{
|
{
|
||||||
/* no events will happen anyway, so this can always succeed */
|
/* no events will happen anyway, so this can always succeed */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int unregister_module_notifier(struct notifier_block * nb)
|
static inline int unregister_module_notifier(struct notifier_block *nb)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -815,10 +815,8 @@ SYSCALL_DEFINE2(delete_module, const char __user *, name_user,
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
name[MODULE_NAME_LEN-1] = '\0';
|
name[MODULE_NAME_LEN-1] = '\0';
|
||||||
|
|
||||||
if (!(flags & O_NONBLOCK)) {
|
if (!(flags & O_NONBLOCK))
|
||||||
printk(KERN_WARNING
|
pr_warn("waiting module removal not supported: please upgrade\n");
|
||||||
"waiting module removal not supported: please upgrade");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mutex_lock_interruptible(&module_mutex) != 0)
|
if (mutex_lock_interruptible(&module_mutex) != 0)
|
||||||
return -EINTR;
|
return -EINTR;
|
||||||
|
|
|
@ -227,17 +227,10 @@ int parse_args(const char *doing,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Lazy bastard, eh? */
|
/* Lazy bastard, eh? */
|
||||||
#define STANDARD_PARAM_DEF(name, type, format, tmptype, strtolfn) \
|
#define STANDARD_PARAM_DEF(name, type, format, strtolfn) \
|
||||||
int param_set_##name(const char *val, const struct kernel_param *kp) \
|
int param_set_##name(const char *val, const struct kernel_param *kp) \
|
||||||
{ \
|
{ \
|
||||||
tmptype l; \
|
return strtolfn(val, 0, (type *)kp->arg); \
|
||||||
int ret; \
|
|
||||||
\
|
|
||||||
ret = strtolfn(val, 0, &l); \
|
|
||||||
if (ret < 0 || ((type)l != l)) \
|
|
||||||
return ret < 0 ? ret : -EINVAL; \
|
|
||||||
*((type *)kp->arg) = l; \
|
|
||||||
return 0; \
|
|
||||||
} \
|
} \
|
||||||
int param_get_##name(char *buffer, const struct kernel_param *kp) \
|
int param_get_##name(char *buffer, const struct kernel_param *kp) \
|
||||||
{ \
|
{ \
|
||||||
|
@ -253,13 +246,13 @@ int parse_args(const char *doing,
|
||||||
EXPORT_SYMBOL(param_ops_##name)
|
EXPORT_SYMBOL(param_ops_##name)
|
||||||
|
|
||||||
|
|
||||||
STANDARD_PARAM_DEF(byte, unsigned char, "%hhu", unsigned long, kstrtoul);
|
STANDARD_PARAM_DEF(byte, unsigned char, "%hhu", kstrtou8);
|
||||||
STANDARD_PARAM_DEF(short, short, "%hi", long, kstrtol);
|
STANDARD_PARAM_DEF(short, short, "%hi", kstrtos16);
|
||||||
STANDARD_PARAM_DEF(ushort, unsigned short, "%hu", unsigned long, kstrtoul);
|
STANDARD_PARAM_DEF(ushort, unsigned short, "%hu", kstrtou16);
|
||||||
STANDARD_PARAM_DEF(int, int, "%i", long, kstrtol);
|
STANDARD_PARAM_DEF(int, int, "%i", kstrtoint);
|
||||||
STANDARD_PARAM_DEF(uint, unsigned int, "%u", unsigned long, kstrtoul);
|
STANDARD_PARAM_DEF(uint, unsigned int, "%u", kstrtouint);
|
||||||
STANDARD_PARAM_DEF(long, long, "%li", long, kstrtol);
|
STANDARD_PARAM_DEF(long, long, "%li", kstrtol);
|
||||||
STANDARD_PARAM_DEF(ulong, unsigned long, "%lu", unsigned long, kstrtoul);
|
STANDARD_PARAM_DEF(ulong, unsigned long, "%lu", kstrtoul);
|
||||||
|
|
||||||
int param_set_charp(const char *val, const struct kernel_param *kp)
|
int param_set_charp(const char *val, const struct kernel_param *kp)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue