Merge tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 6 Apr 2014 16:38:07 +0000 (09:38 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 6 Apr 2014 16:38:07 +0000 (09:38 -0700)
Pull module updates from Rusty Russell:
 "Nothing major: the stricter permissions checking for sysfs broke a
  staging driver; fix included.  Greg KH said he'd take the patch but
  hadn't as the merge window opened, so it's included here to avoid
  breaking build"

* tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
  staging: fix up speakup kobject mode
  Use 'E' instead of 'X' for unsigned module taint flag.
  VERIFY_OCTAL_PERMISSIONS: stricter checking for sysfs perms.
  kallsyms: fix percpu vars on x86-64 with relocation.
  kallsyms: generalize address range checking
  module: LLVMLinux: Remove unused function warning from __param_check macro
  Fix: module signature vs tracepoints: add new TAINT_UNSIGNED_MODULE
  module: remove MODULE_GENERIC_TABLE
  module: allow multiple calls to MODULE_DEVICE_TABLE() per module
  module: use pr_cont

37 files changed:
Documentation/ABI/testing/sysfs-module
Documentation/module-signing.txt
Documentation/oops-tracing.txt
Documentation/sysctl/kernel.txt
drivers/pci/slot.c
drivers/staging/speakup/kobjects.c
drivers/staging/speakup/speakup.h
drivers/staging/speakup/speakup_acntpc.c
drivers/staging/speakup/speakup_acntsa.c
drivers/staging/speakup/speakup_apollo.c
drivers/staging/speakup/speakup_audptr.c
drivers/staging/speakup/speakup_bns.c
drivers/staging/speakup/speakup_decext.c
drivers/staging/speakup/speakup_decpc.c
drivers/staging/speakup/speakup_dectlk.c
drivers/staging/speakup/speakup_dtlk.c
drivers/staging/speakup/speakup_dummy.c
drivers/staging/speakup/speakup_keypc.c
drivers/staging/speakup/speakup_ltlk.c
drivers/staging/speakup/speakup_soft.c
drivers/staging/speakup/speakup_spkout.c
drivers/staging/speakup/speakup_txprt.c
fs/fuse/cuse.c
fs/ocfs2/cluster/sys.c
fs/ocfs2/stackglue.c
include/linux/isapnp.h
include/linux/kernel.h
include/linux/module.h
include/linux/moduleparam.h
include/linux/sysfs.h
include/trace/events/module.h
kernel/module.c
kernel/panic.c
kernel/tracepoint.c
scripts/kallsyms.c
scripts/link-vmlinux.sh
scripts/mod/file2alias.c

index 47064c2b1f79b3cc4e1039323b7b43e9278735be..0aac02e7fb0e22e532dca3aca30c6fe7472bef95 100644 (file)
@@ -49,3 +49,4 @@ Description:  Module taint flags:
                        O - out-of-tree module
                        F - force-loaded module
                        C - staging driver module
+                       E - unsigned module
index 09b583e38907422b027d62dee999282661c0f583..09c2382ad0556b196a3b4bb941b9e86597e8ebc5 100644 (file)
@@ -53,7 +53,8 @@ This has a number of options available:
 
      If this is off (ie. "permissive"), then modules for which the key is not
      available and modules that are unsigned are permitted, but the kernel will
-     be marked as being tainted.
+     be marked as being tainted, and the concerned modules will be marked as
+     tainted, shown with the character 'E'.
 
      If this is on (ie. "restrictive"), only modules that have a valid
      signature that can be verified by a public key in the kernel's possession
index 13032c0140d430b3bc15a5e4a5771eecfc208f4e..e3155995ddd878c59d60d3519f2addaac716a743 100644 (file)
@@ -265,6 +265,9 @@ characters, each representing a particular tainted value.
 
  13: 'O' if an externally-built ("out-of-tree") module has been loaded.
 
+ 14: 'E' if an unsigned module has been loaded in a kernel supporting
+     module signature.
+
 The primary reason for the 'Tainted: ' string is to tell kernel
 debuggers if this is a clean kernel or if anything unusual has
 occurred.  Tainting is permanent: even if an offending module is
index ec8be46bf48da2146cbf2689a6aa51a315e1f2f4..271a09db6629f539753b864a567e78f011d0efde 100644 (file)
@@ -785,6 +785,8 @@ can be ORed together:
 1024 - A module from drivers/staging was loaded.
 2048 - The system is working around a severe firmware bug.
 4096 - An out-of-tree module has been loaded.
+8192 - An unsigned module has been loaded in a kernel supporting module
+       signature.
 
 ==============================================================
 
index 7dd62fa9d0bdd8c64554ff3f4e737bcee3b2c787..396c200b9ddb3b6d534e571f1827819e221c65e8 100644 (file)
@@ -116,11 +116,11 @@ static void pci_slot_release(struct kobject *kobj)
 }
 
 static struct pci_slot_attribute pci_slot_attr_address =
-       __ATTR(address, (S_IFREG | S_IRUGO), address_read_file, NULL);
+       __ATTR(address, S_IRUGO, address_read_file, NULL);
 static struct pci_slot_attribute pci_slot_attr_max_speed =
-       __ATTR(max_bus_speed, (S_IFREG | S_IRUGO), max_speed_read_file, NULL);
+       __ATTR(max_bus_speed, S_IRUGO, max_speed_read_file, NULL);
 static struct pci_slot_attribute pci_slot_attr_cur_speed =
-       __ATTR(cur_bus_speed, (S_IFREG | S_IRUGO), cur_speed_read_file, NULL);
+       __ATTR(cur_bus_speed, S_IRUGO, cur_speed_read_file, NULL);
 
 static struct attribute *pci_slot_default_attrs[] = {
        &pci_slot_attr_address.attr,
index e2f597ee6261cb143e0f02ef05558734d24e2631..1ca91f7092b176cc8d27d4f1f36ddb694ff32d28 100644 (file)
@@ -851,75 +851,75 @@ static ssize_t message_store(struct kobject *kobj, struct kobj_attribute *attr,
  * Declare the attributes.
  */
 static struct kobj_attribute keymap_attribute =
-       __ATTR(keymap, ROOT_W, keymap_show, keymap_store);
+       __ATTR(keymap, S_IWUSR|S_IRUGO, keymap_show, keymap_store);
 static struct kobj_attribute silent_attribute =
-       __ATTR(silent, USER_W, NULL, silent_store);
+       __ATTR(silent, S_IWUGO, NULL, silent_store);
 static struct kobj_attribute synth_attribute =
-       __ATTR(synth, USER_RW, synth_show, synth_store);
+       __ATTR(synth, S_IWUGO|S_IRUGO, synth_show, synth_store);
 static struct kobj_attribute synth_direct_attribute =
-       __ATTR(synth_direct, USER_W, NULL, synth_direct_store);
+       __ATTR(synth_direct, S_IWUGO, NULL, synth_direct_store);
 static struct kobj_attribute version_attribute =
        __ATTR_RO(version);
 
 static struct kobj_attribute delimiters_attribute =
-       __ATTR(delimiters, USER_RW, punc_show, punc_store);
+       __ATTR(delimiters, S_IWUGO|S_IRUGO, punc_show, punc_store);
 static struct kobj_attribute ex_num_attribute =
-       __ATTR(ex_num, USER_RW, punc_show, punc_store);
+       __ATTR(ex_num, S_IWUGO|S_IRUGO, punc_show, punc_store);
 static struct kobj_attribute punc_all_attribute =
-       __ATTR(punc_all, USER_RW, punc_show, punc_store);
+       __ATTR(punc_all, S_IWUGO|S_IRUGO, punc_show, punc_store);
 static struct kobj_attribute punc_most_attribute =
-       __ATTR(punc_most, USER_RW, punc_show, punc_store);
+       __ATTR(punc_most, S_IWUGO|S_IRUGO, punc_show, punc_store);
 static struct kobj_attribute punc_some_attribute =
-       __ATTR(punc_some, USER_RW, punc_show, punc_store);
+       __ATTR(punc_some, S_IWUGO|S_IRUGO, punc_show, punc_store);
 static struct kobj_attribute repeats_attribute =
-       __ATTR(repeats, USER_RW, punc_show, punc_store);
+       __ATTR(repeats, S_IWUGO|S_IRUGO, punc_show, punc_store);
 
 static struct kobj_attribute attrib_bleep_attribute =
-       __ATTR(attrib_bleep, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(attrib_bleep, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute bell_pos_attribute =
-       __ATTR(bell_pos, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(bell_pos, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute bleep_time_attribute =
-       __ATTR(bleep_time, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(bleep_time, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute bleeps_attribute =
-       __ATTR(bleeps, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(bleeps, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute cursor_time_attribute =
-       __ATTR(cursor_time, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(cursor_time, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute key_echo_attribute =
-       __ATTR(key_echo, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(key_echo, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute no_interrupt_attribute =
-       __ATTR(no_interrupt, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(no_interrupt, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute punc_level_attribute =
-       __ATTR(punc_level, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(punc_level, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute reading_punc_attribute =
-       __ATTR(reading_punc, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(reading_punc, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute say_control_attribute =
-       __ATTR(say_control, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(say_control, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute say_word_ctl_attribute =
-       __ATTR(say_word_ctl, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(say_word_ctl, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute spell_delay_attribute =
-       __ATTR(spell_delay, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(spell_delay, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 
 /*
  * These attributes are i18n related.
  */
 static struct kobj_attribute announcements_attribute =
-       __ATTR(announcements, USER_RW, message_show, message_store);
+       __ATTR(announcements, S_IWUGO|S_IRUGO, message_show, message_store);
 static struct kobj_attribute characters_attribute =
-       __ATTR(characters, USER_RW, chars_chartab_show, chars_chartab_store);
+       __ATTR(characters, S_IWUGO|S_IRUGO, chars_chartab_show, chars_chartab_store);
 static struct kobj_attribute chartab_attribute =
-       __ATTR(chartab, USER_RW, chars_chartab_show, chars_chartab_store);
+       __ATTR(chartab, S_IWUGO|S_IRUGO, chars_chartab_show, chars_chartab_store);
 static struct kobj_attribute ctl_keys_attribute =
-       __ATTR(ctl_keys, USER_RW, message_show, message_store);
+       __ATTR(ctl_keys, S_IWUGO|S_IRUGO, message_show, message_store);
 static struct kobj_attribute colors_attribute =
-       __ATTR(colors, USER_RW, message_show, message_store);
+       __ATTR(colors, S_IWUGO|S_IRUGO, message_show, message_store);
 static struct kobj_attribute formatted_attribute =
-       __ATTR(formatted, USER_RW, message_show, message_store);
+       __ATTR(formatted, S_IWUGO|S_IRUGO, message_show, message_store);
 static struct kobj_attribute function_names_attribute =
-       __ATTR(function_names, USER_RW, message_show, message_store);
+       __ATTR(function_names, S_IWUGO|S_IRUGO, message_show, message_store);
 static struct kobj_attribute key_names_attribute =
-       __ATTR(key_names, USER_RW, message_show, message_store);
+       __ATTR(key_names, S_IWUGO|S_IRUGO, message_show, message_store);
 static struct kobj_attribute states_attribute =
-       __ATTR(states, USER_RW, message_show, message_store);
+       __ATTR(states, S_IWUGO|S_IRUGO, message_show, message_store);
 
 /*
  * Create groups of attributes so that we can create and destroy them all
index 0126f714821a126808670de2655b0017461b5346..a7bcceec436a97d702cfba0a6b63e4862484eb7b 100644 (file)
@@ -12,8 +12,6 @@
 /* proc permissions */
 #define USER_R (S_IFREG|S_IRUGO)
 #define USER_W (S_IFREG|S_IWUGO)
-#define USER_RW (S_IFREG|S_IRUGO|S_IWUGO)
-#define ROOT_W (S_IFREG|S_IRUGO|S_IWUSR)
 
 #define TOGGLE_0 .u.n = {NULL, 0, 0, 1, 0, 0, NULL }
 #define TOGGLE_1 .u.n = {NULL, 1, 0, 1, 0, 0, NULL }
index 1c8a7f4a0ef52035e8954197db31024815974811..e7dfa434bd9607e2ef9dd6087e2244dd7f8a682d 100644 (file)
@@ -62,28 +62,28 @@ static struct var_t vars[] = {
  * These attributes will appear in /sys/accessibility/speakup/acntpc.
  */
 static struct kobj_attribute caps_start_attribute =
-       __ATTR(caps_start, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(caps_start, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute caps_stop_attribute =
-       __ATTR(caps_stop, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(caps_stop, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute pitch_attribute =
-       __ATTR(pitch, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(pitch, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute rate_attribute =
-       __ATTR(rate, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(rate, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute tone_attribute =
-       __ATTR(tone, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(tone, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute vol_attribute =
-       __ATTR(vol, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(vol, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 
 static struct kobj_attribute delay_time_attribute =
-       __ATTR(delay_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute direct_attribute =
-       __ATTR(direct, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(direct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute full_time_attribute =
-       __ATTR(full_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute jiffy_delta_attribute =
-       __ATTR(jiffy_delta, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute trigger_time_attribute =
-       __ATTR(trigger_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 
 /*
  * Create a group of attributes so that we can create and destroy them all
index 22a8b72910986d986b5d41690ac1f81c8556bf03..c7f014ed96280c6c28b58f30a529d910d3317ea1 100644 (file)
@@ -47,28 +47,28 @@ static struct var_t vars[] = {
  * These attributes will appear in /sys/accessibility/speakup/acntsa.
  */
 static struct kobj_attribute caps_start_attribute =
-       __ATTR(caps_start, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(caps_start, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute caps_stop_attribute =
-       __ATTR(caps_stop, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(caps_stop, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute pitch_attribute =
-       __ATTR(pitch, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(pitch, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute rate_attribute =
-       __ATTR(rate, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(rate, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute tone_attribute =
-       __ATTR(tone, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(tone, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute vol_attribute =
-       __ATTR(vol, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(vol, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 
 static struct kobj_attribute delay_time_attribute =
-       __ATTR(delay_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(delay_time, S_IRUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute direct_attribute =
-       __ATTR(direct, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(direct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute full_time_attribute =
-       __ATTR(full_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(full_time, S_IRUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute jiffy_delta_attribute =
-       __ATTR(jiffy_delta, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(jiffy_delta, S_IRUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute trigger_time_attribute =
-       __ATTR(trigger_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(trigger_time, S_IRUSR|S_IRUGO, spk_var_show, spk_var_store);
 
 /*
  * Create a group of attributes so that we can create and destroy them all
index 70cf1591676a2c2acb0f33bec628e83d719cbc30..38c8c2221e4e1c47022d14d6437cf14d3c8e054e 100644 (file)
@@ -53,30 +53,30 @@ static struct var_t vars[] = {
  * These attributes will appear in /sys/accessibility/speakup/apollo.
  */
 static struct kobj_attribute caps_start_attribute =
-       __ATTR(caps_start, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(caps_start, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute caps_stop_attribute =
-       __ATTR(caps_stop, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(caps_stop, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute lang_attribute =
-       __ATTR(lang, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(lang, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute pitch_attribute =
-       __ATTR(pitch, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(pitch, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute rate_attribute =
-       __ATTR(rate, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(rate, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute voice_attribute =
-       __ATTR(voice, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(voice, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute vol_attribute =
-       __ATTR(vol, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(vol, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 
 static struct kobj_attribute delay_time_attribute =
-       __ATTR(delay_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute direct_attribute =
-       __ATTR(direct, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(direct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute full_time_attribute =
-       __ATTR(full_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute jiffy_delta_attribute =
-       __ATTR(jiffy_delta, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute trigger_time_attribute =
-       __ATTR(trigger_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 
 /*
  * Create a group of attributes so that we can create and destroy them all
index 61a3ceeb0d3ae081258400749cfa68110d24e7a2..de5b4a5f43b62f9f732a5d192a446affc039db0d 100644 (file)
@@ -49,30 +49,30 @@ static struct var_t vars[] = {
  * These attributes will appear in /sys/accessibility/speakup/audptr.
  */
 static struct kobj_attribute caps_start_attribute =
-       __ATTR(caps_start, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(caps_start, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute caps_stop_attribute =
-       __ATTR(caps_stop, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(caps_stop, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute pitch_attribute =
-       __ATTR(pitch, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(pitch, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute punct_attribute =
-       __ATTR(punct, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(punct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute rate_attribute =
-       __ATTR(rate, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(rate, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute tone_attribute =
-       __ATTR(tone, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(tone, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute vol_attribute =
-       __ATTR(vol, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(vol, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 
 static struct kobj_attribute delay_time_attribute =
-       __ATTR(delay_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute direct_attribute =
-       __ATTR(direct, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(direct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute full_time_attribute =
-       __ATTR(full_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute jiffy_delta_attribute =
-       __ATTR(jiffy_delta, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute trigger_time_attribute =
-       __ATTR(trigger_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 
 /*
  * Create a group of attributes so that we can create and destroy them all
index 4bfe3d458dc0699b33057cd3fb3a0287e0c7e81c..4939e8c7272ec64a012803769df48f9a1a093f62 100644 (file)
@@ -44,28 +44,28 @@ static struct var_t vars[] = {
  * These attributes will appear in /sys/accessibility/speakup/bns.
  */
 static struct kobj_attribute caps_start_attribute =
-       __ATTR(caps_start, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(caps_start, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute caps_stop_attribute =
-       __ATTR(caps_stop, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(caps_stop, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute pitch_attribute =
-       __ATTR(pitch, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(pitch, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute rate_attribute =
-       __ATTR(rate, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(rate, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute tone_attribute =
-       __ATTR(tone, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(tone, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute vol_attribute =
-       __ATTR(vol, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(vol, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 
 static struct kobj_attribute delay_time_attribute =
-       __ATTR(delay_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute direct_attribute =
-       __ATTR(direct, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(direct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute full_time_attribute =
-       __ATTR(full_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute jiffy_delta_attribute =
-       __ATTR(jiffy_delta, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute trigger_time_attribute =
-       __ATTR(trigger_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 
 /*
  * Create a group of attributes so that we can create and destroy them all
index d306e010d3ea9799f2e60420918041d2a9339cb3..b17af980392984b16b1fda94f31fbe4aebb09492 100644 (file)
@@ -70,30 +70,30 @@ static struct var_t vars[] = {
  * These attributes will appear in /sys/accessibility/speakup/decext.
  */
 static struct kobj_attribute caps_start_attribute =
-       __ATTR(caps_start, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(caps_start, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute caps_stop_attribute =
-       __ATTR(caps_stop, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(caps_stop, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute pitch_attribute =
-       __ATTR(pitch, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(pitch, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute punct_attribute =
-       __ATTR(punct, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(punct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute rate_attribute =
-       __ATTR(rate, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(rate, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute voice_attribute =
-       __ATTR(voice, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(voice, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute vol_attribute =
-       __ATTR(vol, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(vol, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 
 static struct kobj_attribute delay_time_attribute =
-       __ATTR(delay_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute direct_attribute =
-       __ATTR(direct, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(direct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute full_time_attribute =
-       __ATTR(full_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute jiffy_delta_attribute =
-       __ATTR(jiffy_delta, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute trigger_time_attribute =
-       __ATTR(trigger_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 
 /*
  * Create a group of attributes so that we can create and destroy them all
index ea6b72d40b317f9eb342b66c9a3c762b8f6f96cb..cfa4bc0323580a3117a0b572b1862937e2b256f1 100644 (file)
@@ -164,30 +164,30 @@ static struct var_t vars[] = {
  * These attributes will appear in /sys/accessibility/speakup/decpc.
  */
 static struct kobj_attribute caps_start_attribute =
-       __ATTR(caps_start, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(caps_start, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute caps_stop_attribute =
-       __ATTR(caps_stop, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(caps_stop, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute pitch_attribute =
-       __ATTR(pitch, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(pitch, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute punct_attribute =
-       __ATTR(punct, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(punct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute rate_attribute =
-       __ATTR(rate, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(rate, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute voice_attribute =
-       __ATTR(voice, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(voice, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute vol_attribute =
-       __ATTR(vol, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(vol, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 
 static struct kobj_attribute delay_time_attribute =
-       __ATTR(delay_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute direct_attribute =
-       __ATTR(direct, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(direct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute full_time_attribute =
-       __ATTR(full_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute jiffy_delta_attribute =
-       __ATTR(jiffy_delta, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute trigger_time_attribute =
-       __ATTR(trigger_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 
 /*
  * Create a group of attributes so that we can create and destroy them all
index 756d01535d3ec317e2839402c919f240633159ae..1fcae55dabba1fa46e0721480538821e40030e37 100644 (file)
@@ -70,30 +70,30 @@ static struct var_t vars[] = {
  * These attributes will appear in /sys/accessibility/speakup/dectlk.
  */
 static struct kobj_attribute caps_start_attribute =
-       __ATTR(caps_start, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(caps_start, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute caps_stop_attribute =
-       __ATTR(caps_stop, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(caps_stop, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute pitch_attribute =
-       __ATTR(pitch, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(pitch, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute punct_attribute =
-       __ATTR(punct, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(punct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute rate_attribute =
-       __ATTR(rate, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(rate, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute voice_attribute =
-       __ATTR(voice, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(voice, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute vol_attribute =
-       __ATTR(vol, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(vol, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 
 static struct kobj_attribute delay_time_attribute =
-       __ATTR(delay_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute direct_attribute =
-       __ATTR(direct, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(direct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute full_time_attribute =
-       __ATTR(full_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute jiffy_delta_attribute =
-       __ATTR(jiffy_delta, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute trigger_time_attribute =
-       __ATTR(trigger_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 
 /*
  * Create a group of attributes so that we can create and destroy them all
index 1feb0fba1b436bbe13ee619c296f434895c7dda6..5c6c34191e8dc007494b9a6106b2fd93be8c7a13 100644 (file)
@@ -67,34 +67,34 @@ static struct var_t vars[] = {
  * These attributes will appear in /sys/accessibility/speakup/dtlk.
  */
 static struct kobj_attribute caps_start_attribute =
-       __ATTR(caps_start, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(caps_start, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute caps_stop_attribute =
-       __ATTR(caps_stop, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(caps_stop, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute freq_attribute =
-       __ATTR(freq, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(freq, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute pitch_attribute =
-       __ATTR(pitch, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(pitch, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute punct_attribute =
-       __ATTR(punct, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(punct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute rate_attribute =
-       __ATTR(rate, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(rate, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute tone_attribute =
-       __ATTR(tone, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(tone, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute voice_attribute =
-       __ATTR(voice, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(voice, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute vol_attribute =
-       __ATTR(vol, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(vol, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 
 static struct kobj_attribute delay_time_attribute =
-       __ATTR(delay_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute direct_attribute =
-       __ATTR(direct, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(direct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute full_time_attribute =
-       __ATTR(full_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute jiffy_delta_attribute =
-       __ATTR(jiffy_delta, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute trigger_time_attribute =
-       __ATTR(trigger_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 
 /*
  * Create a group of attributes so that we can create and destroy them all
index 4a24b9c1e8e3f099604f4704ddd45a85e2e7fc13..e19e9994bbb557c194dc4ddd2a8508732dc7a734 100644 (file)
@@ -46,28 +46,28 @@ static struct var_t vars[] = {
  * These attributes will appear in /sys/accessibility/speakup/dummy.
  */
 static struct kobj_attribute caps_start_attribute =
-       __ATTR(caps_start, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(caps_start, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute caps_stop_attribute =
-       __ATTR(caps_stop, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(caps_stop, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute pitch_attribute =
-       __ATTR(pitch, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(pitch, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute rate_attribute =
-       __ATTR(rate, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(rate, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute tone_attribute =
-       __ATTR(tone, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(tone, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute vol_attribute =
-       __ATTR(vol, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(vol, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 
 static struct kobj_attribute delay_time_attribute =
-       __ATTR(delay_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute direct_attribute =
-       __ATTR(direct, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(direct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute full_time_attribute =
-       __ATTR(full_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute jiffy_delta_attribute =
-       __ATTR(jiffy_delta, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute trigger_time_attribute =
-       __ATTR(trigger_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 
 /*
  * Create a group of attributes so that we can create and destroy them all
index 2f2fe5eeff63e185f7ccf7e4db22f1308b52a65e..9c246d701a956f5b3c6a5a166199ba01b4df7e37 100644 (file)
@@ -59,24 +59,24 @@ static struct var_t vars[] = {
  * These attributes will appear in /sys/accessibility/speakup/keypc.
  */
 static struct kobj_attribute caps_start_attribute =
-       __ATTR(caps_start, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(caps_start, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute caps_stop_attribute =
-       __ATTR(caps_stop, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(caps_stop, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute pitch_attribute =
-       __ATTR(pitch, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(pitch, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute rate_attribute =
-       __ATTR(rate, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(rate, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 
 static struct kobj_attribute delay_time_attribute =
-       __ATTR(delay_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute direct_attribute =
-       __ATTR(direct, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(direct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute full_time_attribute =
-       __ATTR(full_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute jiffy_delta_attribute =
-       __ATTR(jiffy_delta, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute trigger_time_attribute =
-       __ATTR(trigger_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 
 /*
  * Create a group of attributes so that we can create and destroy them all
index 326f94d6b0798881780a4cc70ef600cbbd83d0aa..c9be6f52c2541a061e3d86e154a56aa6f1050148 100644 (file)
@@ -50,34 +50,34 @@ static struct var_t vars[] = {
  * These attributes will appear in /sys/accessibility/speakup/ltlk.
  */
 static struct kobj_attribute caps_start_attribute =
-       __ATTR(caps_start, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(caps_start, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute caps_stop_attribute =
-       __ATTR(caps_stop, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(caps_stop, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute freq_attribute =
-       __ATTR(freq, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(freq, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute pitch_attribute =
-       __ATTR(pitch, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(pitch, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute punct_attribute =
-       __ATTR(punct, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(punct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute rate_attribute =
-       __ATTR(rate, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(rate, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute tone_attribute =
-       __ATTR(tone, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(tone, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute voice_attribute =
-       __ATTR(voice, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(voice, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute vol_attribute =
-       __ATTR(vol, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(vol, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 
 static struct kobj_attribute delay_time_attribute =
-       __ATTR(delay_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute direct_attribute =
-       __ATTR(direct, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(direct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute full_time_attribute =
-       __ATTR(full_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute jiffy_delta_attribute =
-       __ATTR(jiffy_delta, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute trigger_time_attribute =
-       __ATTR(trigger_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 
 /*
  * Create a group of attributes so that we can create and destroy them all
index 243c3d52fe5e616f75e829df544e3182cbc3ff7e..ee6089502a96301cfd2fb6442b05d9f8598ac468 100644 (file)
@@ -61,41 +61,41 @@ static struct var_t vars[] = {
  * These attributes will appear in /sys/accessibility/speakup/soft.
  */
 static struct kobj_attribute caps_start_attribute =
-       __ATTR(caps_start, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(caps_start, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute caps_stop_attribute =
-       __ATTR(caps_stop, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(caps_stop, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute freq_attribute =
-       __ATTR(freq, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(freq, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute pitch_attribute =
-       __ATTR(pitch, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(pitch, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute punct_attribute =
-       __ATTR(punct, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(punct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute rate_attribute =
-       __ATTR(rate, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(rate, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute tone_attribute =
-       __ATTR(tone, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(tone, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute voice_attribute =
-       __ATTR(voice, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(voice, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute vol_attribute =
-       __ATTR(vol, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(vol, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 
 /*
  * We should uncomment the following definition, when we agree on a
  * method of passing a language designation to the software synthesizer.
  * static struct kobj_attribute lang_attribute =
- *     __ATTR(lang, USER_RW, spk_var_show, spk_var_store);
+ *     __ATTR(lang, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
  */
 
 static struct kobj_attribute delay_time_attribute =
-       __ATTR(delay_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute direct_attribute =
-       __ATTR(direct, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(direct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute full_time_attribute =
-       __ATTR(full_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute jiffy_delta_attribute =
-       __ATTR(jiffy_delta, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute trigger_time_attribute =
-       __ATTR(trigger_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 
 /*
  * Create a group of attributes so that we can create and destroy them all
index e74f85620c68b30bb753a2dcbea5ccbf75cae1af..711cf114df8376be2d6ad6182b3c4ac1f0886151 100644 (file)
@@ -48,30 +48,30 @@ static struct var_t vars[] = {
  * These attributes will appear in /sys/accessibility/speakup/spkout.
  */
 static struct kobj_attribute caps_start_attribute =
-       __ATTR(caps_start, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(caps_start, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute caps_stop_attribute =
-       __ATTR(caps_stop, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(caps_stop, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute pitch_attribute =
-       __ATTR(pitch, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(pitch, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute punct_attribute =
-       __ATTR(punct, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(punct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute rate_attribute =
-       __ATTR(rate, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(rate, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute tone_attribute =
-       __ATTR(tone, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(tone, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute vol_attribute =
-       __ATTR(vol, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(vol, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 
 static struct kobj_attribute delay_time_attribute =
-       __ATTR(delay_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute direct_attribute =
-       __ATTR(direct, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(direct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute full_time_attribute =
-       __ATTR(full_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute jiffy_delta_attribute =
-       __ATTR(jiffy_delta, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute trigger_time_attribute =
-       __ATTR(trigger_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 
 /*
  * Create a group of attributes so that we can create and destroy them all
index 5a29b9fcc93035fa11edad15378b16f5896aabef..3f0be04df071d1356d87a43fec71f49b29877b57 100644 (file)
@@ -44,28 +44,28 @@ static struct var_t vars[] = {
  * These attributes will appear in /sys/accessibility/speakup/txprt.
  */
 static struct kobj_attribute caps_start_attribute =
-       __ATTR(caps_start, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(caps_start, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute caps_stop_attribute =
-       __ATTR(caps_stop, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(caps_stop, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute pitch_attribute =
-       __ATTR(pitch, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(pitch, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute rate_attribute =
-       __ATTR(rate, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(rate, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute tone_attribute =
-       __ATTR(tone, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(tone, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute vol_attribute =
-       __ATTR(vol, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(vol, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 
 static struct kobj_attribute delay_time_attribute =
-       __ATTR(delay_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute direct_attribute =
-       __ATTR(direct, USER_RW, spk_var_show, spk_var_store);
+       __ATTR(direct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute full_time_attribute =
-       __ATTR(full_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute jiffy_delta_attribute =
-       __ATTR(jiffy_delta, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 static struct kobj_attribute trigger_time_attribute =
-       __ATTR(trigger_time, ROOT_W, spk_var_show, spk_var_store);
+       __ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
 
 /*
  * Create a group of attributes so that we can create and destroy them all
index 23e363f38302a88af9d64e0003b8e144ed4228b0..13b691a8a7d2ea4403161213486538dadf75a217 100644 (file)
@@ -569,7 +569,7 @@ static ssize_t cuse_class_waiting_show(struct device *dev,
 
        return sprintf(buf, "%d\n", atomic_read(&cc->fc.num_waiting));
 }
-static DEVICE_ATTR(waiting, S_IFREG | 0400, cuse_class_waiting_show, NULL);
+static DEVICE_ATTR(waiting, 0400, cuse_class_waiting_show, NULL);
 
 static ssize_t cuse_class_abort_store(struct device *dev,
                                      struct device_attribute *attr,
@@ -580,7 +580,7 @@ static ssize_t cuse_class_abort_store(struct device *dev,
        fuse_abort_conn(&cc->fc);
        return count;
 }
-static DEVICE_ATTR(abort, S_IFREG | 0200, NULL, cuse_class_abort_store);
+static DEVICE_ATTR(abort, 0200, NULL, cuse_class_abort_store);
 
 static struct attribute *cuse_class_dev_attrs[] = {
        &dev_attr_waiting.attr,
index a4b07730b2e1d0abb257a126fce7f3911ae1d434..b7f57271d49c7030f81de8779a78d0d64478ede6 100644 (file)
@@ -41,7 +41,7 @@ static ssize_t version_show(struct kobject *kobj, struct kobj_attribute *attr,
        return snprintf(buf, PAGE_SIZE, "%u\n", O2NM_API_VERSION);
 }
 static struct kobj_attribute attr_version =
-       __ATTR(interface_revision, S_IFREG | S_IRUGO, version_show, NULL);
+       __ATTR(interface_revision, S_IRUGO, version_show, NULL);
 
 static struct attribute *o2cb_attrs[] = {
        &attr_version.attr,
index 5c8343fe74382e24a4a42c28ae30c1292ea4355a..83f1a665ae977634fa17ee8b15b9d4ae98abb5af 100644 (file)
@@ -496,7 +496,7 @@ static ssize_t ocfs2_max_locking_protocol_show(struct kobject *kobj,
 }
 
 static struct kobj_attribute ocfs2_attr_max_locking_protocol =
-       __ATTR(max_locking_protocol, S_IFREG | S_IRUGO,
+       __ATTR(max_locking_protocol, S_IRUGO,
               ocfs2_max_locking_protocol_show, NULL);
 
 static ssize_t ocfs2_loaded_cluster_plugins_show(struct kobject *kobj,
@@ -528,7 +528,7 @@ static ssize_t ocfs2_loaded_cluster_plugins_show(struct kobject *kobj,
 }
 
 static struct kobj_attribute ocfs2_attr_loaded_cluster_plugins =
-       __ATTR(loaded_cluster_plugins, S_IFREG | S_IRUGO,
+       __ATTR(loaded_cluster_plugins, S_IRUGO,
               ocfs2_loaded_cluster_plugins_show, NULL);
 
 static ssize_t ocfs2_active_cluster_plugin_show(struct kobject *kobj,
@@ -550,7 +550,7 @@ static ssize_t ocfs2_active_cluster_plugin_show(struct kobject *kobj,
 }
 
 static struct kobj_attribute ocfs2_attr_active_cluster_plugin =
-       __ATTR(active_cluster_plugin, S_IFREG | S_IRUGO,
+       __ATTR(active_cluster_plugin, S_IRUGO,
               ocfs2_active_cluster_plugin_show, NULL);
 
 static ssize_t ocfs2_cluster_stack_show(struct kobject *kobj,
@@ -599,7 +599,7 @@ static ssize_t ocfs2_cluster_stack_store(struct kobject *kobj,
 
 
 static struct kobj_attribute ocfs2_attr_cluster_stack =
-       __ATTR(cluster_stack, S_IFREG | S_IRUGO | S_IWUSR,
+       __ATTR(cluster_stack, S_IRUGO | S_IWUSR,
               ocfs2_cluster_stack_show,
               ocfs2_cluster_stack_store);
 
index e2d28b026a8ca3fb362341decd8f1a6f64904ea5..3c77bf9b1efd03384d0c5527ce93431762252f65 100644 (file)
 #define ISAPNP_DEVICE_ID(_va, _vb, _vc, _function) \
                { .vendor = ISAPNP_VENDOR(_va, _vb, _vc), .function = ISAPNP_FUNCTION(_function) }
 
-/* export used IDs outside module */
-#define ISAPNP_CARD_TABLE(name) \
-               MODULE_GENERIC_TABLE(isapnp_card, name)
-
 struct isapnp_card_id {
        unsigned long driver_data;      /* data private to the driver */
        unsigned short card_vendor, card_device;
index 08fb0247764177a8b96f83f5181a17c9d33b099c..4c52907a6d8b54d41fbd63cc1839f159c0ed5207 100644 (file)
@@ -469,6 +469,7 @@ extern enum system_states {
 #define TAINT_CRAP                     10
 #define TAINT_FIRMWARE_WORKAROUND      11
 #define TAINT_OOT_MODULE               12
+#define TAINT_UNSIGNED_MODULE          13
 
 extern const char hex_asc[];
 #define hex_asc_lo(x)  hex_asc[((x) & 0x0f)]
@@ -841,4 +842,12 @@ static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { }
 # define REBUILD_DUE_TO_FTRACE_MCOUNT_RECORD
 #endif
 
+/* Permissions on a sysfs file: you didn't miss the 0 prefix did you? */
+#define VERIFY_OCTAL_PERMISSIONS(perms)                                        \
+       (BUILD_BUG_ON_ZERO((perms) < 0) +                               \
+        BUILD_BUG_ON_ZERO((perms) > 0777) +                            \
+        /* User perms >= group perms >= other perms */                 \
+        BUILD_BUG_ON_ZERO(((perms) >> 6) < (((perms) >> 3) & 7)) +     \
+        BUILD_BUG_ON_ZERO((((perms) >> 3) & 7) < ((perms) & 7)) +      \
+        (perms))
 #endif
index 5a5053975114c962dd1d1cd1e9adc3e71da9bd23..f520a767c86ca7eb4e91a92d84f0c3f08c70e899 100644 (file)
@@ -82,15 +82,6 @@ void sort_extable(struct exception_table_entry *start,
 void sort_main_extable(void);
 void trim_init_extable(struct module *m);
 
-#ifdef MODULE
-#define MODULE_GENERIC_TABLE(gtype, name)                      \
-extern const struct gtype##_id __mod_##gtype##_table           \
-  __attribute__ ((unused, alias(__stringify(name))))
-
-#else  /* !MODULE */
-#define MODULE_GENERIC_TABLE(gtype, name)
-#endif
-
 /* Generic info of form tag = "info" */
 #define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)
 
@@ -141,8 +132,14 @@ extern const struct gtype##_id __mod_##gtype##_table               \
 /* What your module does. */
 #define MODULE_DESCRIPTION(_description) MODULE_INFO(description, _description)
 
-#define MODULE_DEVICE_TABLE(type, name)                \
-  MODULE_GENERIC_TABLE(type##_device, name)
+#ifdef MODULE
+/* Creates an alias so file2alias.c can find device table. */
+#define MODULE_DEVICE_TABLE(type, name)                                        \
+  extern const struct type##_device_id __mod_##type##__##name##_device_table \
+  __attribute__ ((unused, alias(__stringify(name))))
+#else  /* !MODULE */
+#define MODULE_DEVICE_TABLE(type, name)
+#endif
 
 /* Version of form [<epoch>:]<version>[-<extra-version>].
  * Or for CVS/RCS ID version, everything but the number is stripped.
index c3eb102a9cc81d8ed97f11deb9584aa71830b1c5..204a677438049b13570e779f36078e0450298614 100644 (file)
@@ -186,14 +186,12 @@ struct kparam_array
    parameters. */
 #define __module_param_call(prefix, name, ops, arg, perm, level)       \
        /* Default value instead of permissions? */                     \
-       static int __param_perm_check_##name __attribute__((unused)) =  \
-       BUILD_BUG_ON_ZERO((perm) < 0 || (perm) > 0777 || ((perm) & 2))  \
-       + BUILD_BUG_ON_ZERO(sizeof(""prefix) > MAX_PARAM_PREFIX_LEN);   \
-       static const char __param_str_##name[] = prefix #name;          \
+       static const char __param_str_##name[] = prefix #name; \
        static struct kernel_param __moduleparam_const __param_##name   \
        __used                                                          \
     __attribute__ ((unused,__section__ ("__param"),aligned(sizeof(void *)))) \
-       = { __param_str_##name, ops, perm, level, { arg } }
+       = { __param_str_##name, ops, VERIFY_OCTAL_PERMISSIONS(perm),    \
+           level, { arg } }
 
 /* Obsolete - use module_param_cb() */
 #define module_param_call(name, set, get, arg, perm)                   \
@@ -346,7 +344,7 @@ static inline void destroy_params(const struct kernel_param *params,
 /* The macros to do compile-time type checking stolen from Jakub
    Jelinek, who IIRC came up with this idea for the 2.4 module init code. */
 #define __param_check(name, p, type) \
-       static inline type *__check_##name(void) { return(p); }
+       static inline type __always_unused *__check_##name(void) { return(p); }
 
 extern struct kernel_param_ops param_ops_byte;
 extern int param_set_byte(const char *val, const struct kernel_param *kp);
index e0bf210ddffde0108e77820d81adc318332e2f19..084354b0e81451c651120afebdc75dfbaaec02f8 100644 (file)
@@ -71,7 +71,8 @@ struct attribute_group {
  */
 
 #define __ATTR(_name, _mode, _show, _store) {                          \
-       .attr = {.name = __stringify(_name), .mode = _mode },           \
+       .attr = {.name = __stringify(_name),                            \
+                .mode = VERIFY_OCTAL_PERMISSIONS(_mode) },             \
        .show   = _show,                                                \
        .store  = _store,                                               \
 }
index 1619327374164909b6f8aaea6a730b0821ec6ee2..11fd51b413de25a6a2415c1724dee458d3314ddc 100644 (file)
@@ -22,8 +22,10 @@ struct module;
 
 #define show_module_flags(flags) __print_flags(flags, "",      \
        { (1UL << TAINT_PROPRIETARY_MODULE),    "P" },          \
+       { (1UL << TAINT_OOT_MODULE),            "O" },          \
        { (1UL << TAINT_FORCED_MODULE),         "F" },          \
-       { (1UL << TAINT_CRAP),                  "C" })
+       { (1UL << TAINT_CRAP),                  "C" },          \
+       { (1UL << TAINT_UNSIGNED_MODULE),       "X" })
 
 TRACE_EVENT(module_load,
 
index 8dc7f5e80dd8f75273ef15df03a14615de1579d4..29f7790eaa147a1b0fc7ec223c5356f44caab346 100644 (file)
@@ -1013,6 +1013,8 @@ static size_t module_flags_taint(struct module *mod, char *buf)
                buf[l++] = 'F';
        if (mod->taints & (1 << TAINT_CRAP))
                buf[l++] = 'C';
+       if (mod->taints & (1 << TAINT_UNSIGNED_MODULE))
+               buf[l++] = 'E';
        /*
         * TAINT_FORCED_RMMOD: could be added.
         * TAINT_CPU_OUT_OF_SPEC, TAINT_MACHINE_CHECK, TAINT_BAD_PAGE don't
@@ -3218,7 +3220,7 @@ static int load_module(struct load_info *info, const char __user *uargs,
                pr_notice_once("%s: module verification failed: signature "
                               "and/or  required key missing - tainting "
                               "kernel\n", mod->name);
-               add_taint_module(mod, TAINT_FORCED_MODULE, LOCKDEP_STILL_OK);
+               add_taint_module(mod, TAINT_UNSIGNED_MODULE, LOCKDEP_STILL_OK);
        }
 #endif
 
@@ -3813,12 +3815,12 @@ void print_modules(void)
        list_for_each_entry_rcu(mod, &modules, list) {
                if (mod->state == MODULE_STATE_UNFORMED)
                        continue;
-               printk(" %s%s", mod->name, module_flags(mod, buf));
+               pr_cont(" %s%s", mod->name, module_flags(mod, buf));
        }
        preempt_enable();
        if (last_unloaded_module[0])
-               printk(" [last unloaded: %s]", last_unloaded_module);
-       printk("\n");
+               pr_cont(" [last unloaded: %s]", last_unloaded_module);
+       pr_cont("\n");
 }
 
 #ifdef CONFIG_MODVERSIONS
index cca8a913ae7c8d6314fda34a1f3853a364e32cfd..79fd820bb5e8788338c98a6df1fb45d8e5f9f477 100644 (file)
@@ -210,6 +210,7 @@ static const struct tnt tnts[] = {
        { TAINT_CRAP,                   'C', ' ' },
        { TAINT_FIRMWARE_WORKAROUND,    'I', ' ' },
        { TAINT_OOT_MODULE,             'O', ' ' },
+       { TAINT_UNSIGNED_MODULE,        'E', ' ' },
 };
 
 /**
@@ -228,6 +229,7 @@ static const struct tnt tnts[] = {
  *  'C' - modules from drivers/staging are loaded.
  *  'I' - Working around severe firmware bug.
  *  'O' - Out-of-tree module has been loaded.
+ *  'E' - Unsigned module has been loaded.
  *
  *     The string is overwritten by the next call to print_tainted().
  */
index 50f8329c20425decc51420f5d733b15193a56091..fb0a38a265555c6c846254859c83468d0aba0f35 100644 (file)
@@ -460,7 +460,8 @@ EXPORT_SYMBOL_GPL(tracepoint_probe_unregister);
 #ifdef CONFIG_MODULES
 bool trace_module_has_bad_taint(struct module *mod)
 {
-       return mod->taints & ~((1 << TAINT_OOT_MODULE) | (1 << TAINT_CRAP));
+       return mod->taints & ~((1 << TAINT_OOT_MODULE) | (1 << TAINT_CRAP) |
+                              (1 << TAINT_UNSIGNED_MODULE));
 }
 
 static int tracepoint_module_coming(struct module *mod)
@@ -474,7 +475,7 @@ static int tracepoint_module_coming(struct module *mod)
        /*
         * We skip modules that taint the kernel, especially those with different
         * module headers (for forced load), to make sure we don't cause a crash.
-        * Staging and out-of-tree GPL modules are fine.
+        * Staging, out-of-tree, and unsigned GPL modules are fine.
         */
        if (trace_module_has_bad_taint(mod))
                return 0;
index 10085de886fef49b78a12746a2e0a593545d56e0..1237dd7fb4cac7c2f863b413399df17a9e0c8beb 100644 (file)
@@ -36,13 +36,13 @@ struct sym_entry {
        unsigned char *sym;
 };
 
-struct text_range {
-       const char *stext, *etext;
+struct addr_range {
+       const char *start_sym, *end_sym;
        unsigned long long start, end;
 };
 
 static unsigned long long _text;
-static struct text_range text_ranges[] = {
+static struct addr_range text_ranges[] = {
        { "_stext",     "_etext"     },
        { "_sinittext", "_einittext" },
        { "_stext_l1",  "_etext_l1"  }, /* Blackfin on-chip L1 inst SRAM */
@@ -51,9 +51,14 @@ static struct text_range text_ranges[] = {
 #define text_range_text     (&text_ranges[0])
 #define text_range_inittext (&text_ranges[1])
 
+static struct addr_range percpu_range = {
+       "__per_cpu_start", "__per_cpu_end", -1ULL, 0
+};
+
 static struct sym_entry *table;
 static unsigned int table_size, table_cnt;
 static int all_symbols = 0;
+static int absolute_percpu = 0;
 static char symbol_prefix_char = '\0';
 static unsigned long long kernel_start_addr = 0;
 
@@ -83,19 +88,20 @@ static inline int is_arm_mapping_symbol(const char *str)
               && (str[2] == '\0' || str[2] == '.');
 }
 
-static int read_symbol_tr(const char *sym, unsigned long long addr)
+static int check_symbol_range(const char *sym, unsigned long long addr,
+                             struct addr_range *ranges, int entries)
 {
        size_t i;
-       struct text_range *tr;
+       struct addr_range *ar;
 
-       for (i = 0; i < ARRAY_SIZE(text_ranges); ++i) {
-               tr = &text_ranges[i];
+       for (i = 0; i < entries; ++i) {
+               ar = &ranges[i];
 
-               if (strcmp(sym, tr->stext) == 0) {
-                       tr->start = addr;
+               if (strcmp(sym, ar->start_sym) == 0) {
+                       ar->start = addr;
                        return 0;
-               } else if (strcmp(sym, tr->etext) == 0) {
-                       tr->end = addr;
+               } else if (strcmp(sym, ar->end_sym) == 0) {
+                       ar->end = addr;
                        return 0;
                }
        }
@@ -130,7 +136,8 @@ static int read_symbol(FILE *in, struct sym_entry *s)
        /* Ignore most absolute/undefined (?) symbols. */
        if (strcmp(sym, "_text") == 0)
                _text = s->addr;
-       else if (read_symbol_tr(sym, s->addr) == 0)
+       else if (check_symbol_range(sym, s->addr, text_ranges,
+                                   ARRAY_SIZE(text_ranges)) == 0)
                /* nothing to do */;
        else if (toupper(stype) == 'A')
        {
@@ -164,18 +171,22 @@ static int read_symbol(FILE *in, struct sym_entry *s)
        strcpy((char *)s->sym + 1, str);
        s->sym[0] = stype;
 
+       /* Record if we've found __per_cpu_start/end. */
+       check_symbol_range(sym, s->addr, &percpu_range, 1);
+
        return 0;
 }
 
-static int symbol_valid_tr(struct sym_entry *s)
+static int symbol_in_range(struct sym_entry *s, struct addr_range *ranges,
+                          int entries)
 {
        size_t i;
-       struct text_range *tr;
+       struct addr_range *ar;
 
-       for (i = 0; i < ARRAY_SIZE(text_ranges); ++i) {
-               tr = &text_ranges[i];
+       for (i = 0; i < entries; ++i) {
+               ar = &ranges[i];
 
-               if (s->addr >= tr->start && s->addr <= tr->end)
+               if (s->addr >= ar->start && s->addr <= ar->end)
                        return 1;
        }
 
@@ -214,7 +225,8 @@ static int symbol_valid(struct sym_entry *s)
        /* if --all-symbols is not specified, then symbols outside the text
         * and inittext sections are discarded */
        if (!all_symbols) {
-               if (symbol_valid_tr(s) == 0)
+               if (symbol_in_range(s, text_ranges,
+                                   ARRAY_SIZE(text_ranges)) == 0)
                        return 0;
                /* Corner case.  Discard any symbols with the same value as
                 * _etext _einittext; they can move between pass 1 and 2 when
@@ -223,9 +235,11 @@ static int symbol_valid(struct sym_entry *s)
                 * rules.
                 */
                if ((s->addr == text_range_text->end &&
-                               strcmp((char *)s->sym + offset, text_range_text->etext)) ||
+                               strcmp((char *)s->sym + offset,
+                                      text_range_text->end_sym)) ||
                    (s->addr == text_range_inittext->end &&
-                               strcmp((char *)s->sym + offset, text_range_inittext->etext)))
+                               strcmp((char *)s->sym + offset,
+                                      text_range_inittext->end_sym)))
                        return 0;
        }
 
@@ -298,6 +312,11 @@ static int expand_symbol(unsigned char *data, int len, char *result)
        return total;
 }
 
+static int symbol_absolute(struct sym_entry *s)
+{
+       return toupper(s->sym[0]) == 'A';
+}
+
 static void write_src(void)
 {
        unsigned int i, k, off;
@@ -325,7 +344,7 @@ static void write_src(void)
         */
        output_label("kallsyms_addresses");
        for (i = 0; i < table_cnt; i++) {
-               if (toupper(table[i].sym[0]) != 'A') {
+               if (!symbol_absolute(&table[i])) {
                        if (_text <= table[i].addr)
                                printf("\tPTR\t_text + %#llx\n",
                                        table[i].addr - _text);
@@ -646,6 +665,15 @@ static void sort_symbols(void)
        qsort(table, table_cnt, sizeof(struct sym_entry), compare_symbols);
 }
 
+static void make_percpus_absolute(void)
+{
+       unsigned int i;
+
+       for (i = 0; i < table_cnt; i++)
+               if (symbol_in_range(&table[i], &percpu_range, 1))
+                       table[i].sym[0] = 'A';
+}
+
 int main(int argc, char **argv)
 {
        if (argc >= 2) {
@@ -653,6 +681,8 @@ int main(int argc, char **argv)
                for (i = 1; i < argc; i++) {
                        if(strcmp(argv[i], "--all-symbols") == 0)
                                all_symbols = 1;
+                       else if (strcmp(argv[i], "--absolute-percpu") == 0)
+                               absolute_percpu = 1;
                        else if (strncmp(argv[i], "--symbol-prefix=", 16) == 0) {
                                char *p = &argv[i][16];
                                /* skip quote */
@@ -669,6 +699,8 @@ int main(int argc, char **argv)
                usage();
 
        read_map(stdin);
+       if (absolute_percpu)
+               make_percpus_absolute();
        sort_symbols();
        optimize_token_table();
        write_src();
index 2dcb37736d8469a0e18e4c1ba262281e3fd8cf37..86a4fe75f453735936e3b218f885dcd887216659 100644 (file)
@@ -86,6 +86,10 @@ kallsyms()
                kallsymopt="${kallsymopt} --page-offset=$CONFIG_PAGE_OFFSET"
        fi
 
+       if [ -n "${CONFIG_X86_64}" ]; then
+               kallsymopt="${kallsymopt} --absolute-percpu"
+       fi
+
        local aflags="${KBUILD_AFLAGS} ${KBUILD_AFLAGS_KERNEL}               \
                      ${NOSTDINC_FLAGS} ${LINUXINCLUDE} ${KBUILD_CPPFLAGS}"
 
index 25f6f5970552224f07145f5bc2f093a7f8e925c9..1924990a737f36c61820bd35470c9adf90f49888 100644 (file)
@@ -42,7 +42,7 @@ typedef unsigned char __u8;
 
 /* This array collects all instances that use the generic do_table */
 struct devtable {
-       const char *device_id; /* name of table, __mod_<name>_device_table. */
+       const char *device_id; /* name of table, __mod_<name>__*_device_table. */
        unsigned long id_size;
        void *function;
 };
@@ -146,7 +146,8 @@ static void device_id_check(const char *modname, const char *device_id,
 
        if (size % id_size || size < id_size) {
                fatal("%s: sizeof(struct %s_device_id)=%lu is not a modulo "
-                     "of the size of section __mod_%s_device_table=%lu.\n"
+                     "of the size of "
+                     "section __mod_%s__<identifier>_device_table=%lu.\n"
                      "Fix definition of struct %s_device_id "
                      "in mod_devicetable.h\n",
                      modname, device_id, id_size, device_id, size, device_id);
@@ -1216,7 +1217,7 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,
 {
        void *symval;
        char *zeros = NULL;
-       const char *name;
+       const char *name, *identifier;
        unsigned int namelen;
 
        /* We're looking for a section relative symbol */
@@ -1227,7 +1228,7 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,
        if (ELF_ST_TYPE(sym->st_info) != STT_OBJECT)
                return;
 
-       /* All our symbols are of form <prefix>__mod_XXX_device_table. */
+       /* All our symbols are of form <prefix>__mod_<name>__<identifier>_device_table. */
        name = strstr(symname, "__mod_");
        if (!name)
                return;
@@ -1237,7 +1238,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,
                return;
        if (strcmp(name + namelen - strlen("_device_table"), "_device_table"))
                return;
-       namelen -= strlen("_device_table");
+       identifier = strstr(name, "__");
+       if (!identifier)
+               return;
+       namelen = identifier - name;
 
        /* Handle all-NULL symbols allocated into .bss */
        if (info->sechdrs[get_secindex(info, sym)].sh_type & SHT_NOBITS) {