aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/ABI/testing/sysfs-module1
-rw-r--r--Documentation/module-signing.txt3
-rw-r--r--Documentation/oops-tracing.txt3
-rw-r--r--Documentation/sysctl/kernel.txt2
-rw-r--r--drivers/pci/slot.c6
-rw-r--r--drivers/staging/speakup/kobjects.c62
-rw-r--r--drivers/staging/speakup/speakup.h2
-rw-r--r--drivers/staging/speakup/speakup_acntpc.c22
-rw-r--r--drivers/staging/speakup/speakup_acntsa.c22
-rw-r--r--drivers/staging/speakup/speakup_apollo.c24
-rw-r--r--drivers/staging/speakup/speakup_audptr.c24
-rw-r--r--drivers/staging/speakup/speakup_bns.c22
-rw-r--r--drivers/staging/speakup/speakup_decext.c24
-rw-r--r--drivers/staging/speakup/speakup_decpc.c24
-rw-r--r--drivers/staging/speakup/speakup_dectlk.c24
-rw-r--r--drivers/staging/speakup/speakup_dtlk.c28
-rw-r--r--drivers/staging/speakup/speakup_dummy.c22
-rw-r--r--drivers/staging/speakup/speakup_keypc.c18
-rw-r--r--drivers/staging/speakup/speakup_ltlk.c28
-rw-r--r--drivers/staging/speakup/speakup_soft.c30
-rw-r--r--drivers/staging/speakup/speakup_spkout.c24
-rw-r--r--drivers/staging/speakup/speakup_txprt.c22
-rw-r--r--fs/fuse/cuse.c4
-rw-r--r--fs/ocfs2/cluster/sys.c2
-rw-r--r--fs/ocfs2/stackglue.c8
-rw-r--r--include/linux/isapnp.h4
-rw-r--r--include/linux/kernel.h9
-rw-r--r--include/linux/module.h19
-rw-r--r--include/linux/moduleparam.h10
-rw-r--r--include/linux/sysfs.h3
-rw-r--r--include/trace/events/module.h4
-rw-r--r--kernel/module.c10
-rw-r--r--kernel/panic.c2
-rw-r--r--kernel/tracepoint.c5
-rw-r--r--scripts/kallsyms.c74
-rw-r--r--scripts/link-vmlinux.sh4
-rw-r--r--scripts/mod/file2alias.c14
37 files changed, 331 insertions, 278 deletions
diff --git a/Documentation/ABI/testing/sysfs-module b/Documentation/ABI/testing/sysfs-module
index 47064c2b1f79..0aac02e7fb0e 100644
--- a/Documentation/ABI/testing/sysfs-module
+++ b/Documentation/ABI/testing/sysfs-module
@@ -49,3 +49,4 @@ Description: Module taint flags:
49 O - out-of-tree module 49 O - out-of-tree module
50 F - force-loaded module 50 F - force-loaded module
51 C - staging driver module 51 C - staging driver module
52 E - unsigned module
diff --git a/Documentation/module-signing.txt b/Documentation/module-signing.txt
index 09b583e38907..09c2382ad055 100644
--- a/Documentation/module-signing.txt
+++ b/Documentation/module-signing.txt
@@ -53,7 +53,8 @@ This has a number of options available:
53 53
54 If this is off (ie. "permissive"), then modules for which the key is not 54 If this is off (ie. "permissive"), then modules for which the key is not
55 available and modules that are unsigned are permitted, but the kernel will 55 available and modules that are unsigned are permitted, but the kernel will
56 be marked as being tainted. 56 be marked as being tainted, and the concerned modules will be marked as
57 tainted, shown with the character 'E'.
57 58
58 If this is on (ie. "restrictive"), only modules that have a valid 59 If this is on (ie. "restrictive"), only modules that have a valid
59 signature that can be verified by a public key in the kernel's possession 60 signature that can be verified by a public key in the kernel's possession
diff --git a/Documentation/oops-tracing.txt b/Documentation/oops-tracing.txt
index 13032c0140d4..e3155995ddd8 100644
--- a/Documentation/oops-tracing.txt
+++ b/Documentation/oops-tracing.txt
@@ -265,6 +265,9 @@ characters, each representing a particular tainted value.
265 265
266 13: 'O' if an externally-built ("out-of-tree") module has been loaded. 266 13: 'O' if an externally-built ("out-of-tree") module has been loaded.
267 267
268 14: 'E' if an unsigned module has been loaded in a kernel supporting
269 module signature.
270
268The primary reason for the 'Tainted: ' string is to tell kernel 271The primary reason for the 'Tainted: ' string is to tell kernel
269debuggers if this is a clean kernel or if anything unusual has 272debuggers if this is a clean kernel or if anything unusual has
270occurred. Tainting is permanent: even if an offending module is 273occurred. Tainting is permanent: even if an offending module is
diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt
index ec8be46bf48d..271a09db6629 100644
--- a/Documentation/sysctl/kernel.txt
+++ b/Documentation/sysctl/kernel.txt
@@ -785,6 +785,8 @@ can be ORed together:
7851024 - A module from drivers/staging was loaded. 7851024 - A module from drivers/staging was loaded.
7862048 - The system is working around a severe firmware bug. 7862048 - The system is working around a severe firmware bug.
7874096 - An out-of-tree module has been loaded. 7874096 - An out-of-tree module has been loaded.
7888192 - An unsigned module has been loaded in a kernel supporting module
789 signature.
788 790
789============================================================== 791==============================================================
790 792
diff --git a/drivers/pci/slot.c b/drivers/pci/slot.c
index 7dd62fa9d0bd..396c200b9ddb 100644
--- a/drivers/pci/slot.c
+++ b/drivers/pci/slot.c
@@ -116,11 +116,11 @@ static void pci_slot_release(struct kobject *kobj)
116} 116}
117 117
118static struct pci_slot_attribute pci_slot_attr_address = 118static struct pci_slot_attribute pci_slot_attr_address =
119 __ATTR(address, (S_IFREG | S_IRUGO), address_read_file, NULL); 119 __ATTR(address, S_IRUGO, address_read_file, NULL);
120static struct pci_slot_attribute pci_slot_attr_max_speed = 120static struct pci_slot_attribute pci_slot_attr_max_speed =
121 __ATTR(max_bus_speed, (S_IFREG | S_IRUGO), max_speed_read_file, NULL); 121 __ATTR(max_bus_speed, S_IRUGO, max_speed_read_file, NULL);
122static struct pci_slot_attribute pci_slot_attr_cur_speed = 122static struct pci_slot_attribute pci_slot_attr_cur_speed =
123 __ATTR(cur_bus_speed, (S_IFREG | S_IRUGO), cur_speed_read_file, NULL); 123 __ATTR(cur_bus_speed, S_IRUGO, cur_speed_read_file, NULL);
124 124
125static struct attribute *pci_slot_default_attrs[] = { 125static struct attribute *pci_slot_default_attrs[] = {
126 &pci_slot_attr_address.attr, 126 &pci_slot_attr_address.attr,
diff --git a/drivers/staging/speakup/kobjects.c b/drivers/staging/speakup/kobjects.c
index e2f597ee6261..1ca91f7092b1 100644
--- a/drivers/staging/speakup/kobjects.c
+++ b/drivers/staging/speakup/kobjects.c
@@ -851,75 +851,75 @@ static ssize_t message_store(struct kobject *kobj, struct kobj_attribute *attr,
851 * Declare the attributes. 851 * Declare the attributes.
852 */ 852 */
853static struct kobj_attribute keymap_attribute = 853static struct kobj_attribute keymap_attribute =
854 __ATTR(keymap, ROOT_W, keymap_show, keymap_store); 854 __ATTR(keymap, S_IWUSR|S_IRUGO, keymap_show, keymap_store);
855static struct kobj_attribute silent_attribute = 855static struct kobj_attribute silent_attribute =
856 __ATTR(silent, USER_W, NULL, silent_store); 856 __ATTR(silent, S_IWUGO, NULL, silent_store);
857static struct kobj_attribute synth_attribute = 857static struct kobj_attribute synth_attribute =
858 __ATTR(synth, USER_RW, synth_show, synth_store); 858 __ATTR(synth, S_IWUGO|S_IRUGO, synth_show, synth_store);
859static struct kobj_attribute synth_direct_attribute = 859static struct kobj_attribute synth_direct_attribute =
860 __ATTR(synth_direct, USER_W, NULL, synth_direct_store); 860 __ATTR(synth_direct, S_IWUGO, NULL, synth_direct_store);
861static struct kobj_attribute version_attribute = 861static struct kobj_attribute version_attribute =
862 __ATTR_RO(version); 862 __ATTR_RO(version);
863 863
864static struct kobj_attribute delimiters_attribute = 864static struct kobj_attribute delimiters_attribute =
865 __ATTR(delimiters, USER_RW, punc_show, punc_store); 865 __ATTR(delimiters, S_IWUGO|S_IRUGO, punc_show, punc_store);
866static struct kobj_attribute ex_num_attribute = 866static struct kobj_attribute ex_num_attribute =
867 __ATTR(ex_num, USER_RW, punc_show, punc_store); 867 __ATTR(ex_num, S_IWUGO|S_IRUGO, punc_show, punc_store);
868static struct kobj_attribute punc_all_attribute = 868static struct kobj_attribute punc_all_attribute =
869 __ATTR(punc_all, USER_RW, punc_show, punc_store); 869 __ATTR(punc_all, S_IWUGO|S_IRUGO, punc_show, punc_store);
870static struct kobj_attribute punc_most_attribute = 870static struct kobj_attribute punc_most_attribute =
871 __ATTR(punc_most, USER_RW, punc_show, punc_store); 871 __ATTR(punc_most, S_IWUGO|S_IRUGO, punc_show, punc_store);
872static struct kobj_attribute punc_some_attribute = 872static struct kobj_attribute punc_some_attribute =
873 __ATTR(punc_some, USER_RW, punc_show, punc_store); 873 __ATTR(punc_some, S_IWUGO|S_IRUGO, punc_show, punc_store);
874static struct kobj_attribute repeats_attribute = 874static struct kobj_attribute repeats_attribute =
875 __ATTR(repeats, USER_RW, punc_show, punc_store); 875 __ATTR(repeats, S_IWUGO|S_IRUGO, punc_show, punc_store);
876 876
877static struct kobj_attribute attrib_bleep_attribute = 877static struct kobj_attribute attrib_bleep_attribute =
878 __ATTR(attrib_bleep, USER_RW, spk_var_show, spk_var_store); 878 __ATTR(attrib_bleep, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
879static struct kobj_attribute bell_pos_attribute = 879static struct kobj_attribute bell_pos_attribute =
880 __ATTR(bell_pos, USER_RW, spk_var_show, spk_var_store); 880 __ATTR(bell_pos, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
881static struct kobj_attribute bleep_time_attribute = 881static struct kobj_attribute bleep_time_attribute =
882 __ATTR(bleep_time, USER_RW, spk_var_show, spk_var_store); 882 __ATTR(bleep_time, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
883static struct kobj_attribute bleeps_attribute = 883static struct kobj_attribute bleeps_attribute =
884 __ATTR(bleeps, USER_RW, spk_var_show, spk_var_store); 884 __ATTR(bleeps, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
885static struct kobj_attribute cursor_time_attribute = 885static struct kobj_attribute cursor_time_attribute =
886 __ATTR(cursor_time, USER_RW, spk_var_show, spk_var_store); 886 __ATTR(cursor_time, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
887static struct kobj_attribute key_echo_attribute = 887static struct kobj_attribute key_echo_attribute =
888 __ATTR(key_echo, USER_RW, spk_var_show, spk_var_store); 888 __ATTR(key_echo, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
889static struct kobj_attribute no_interrupt_attribute = 889static struct kobj_attribute no_interrupt_attribute =
890 __ATTR(no_interrupt, USER_RW, spk_var_show, spk_var_store); 890 __ATTR(no_interrupt, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
891static struct kobj_attribute punc_level_attribute = 891static struct kobj_attribute punc_level_attribute =
892 __ATTR(punc_level, USER_RW, spk_var_show, spk_var_store); 892 __ATTR(punc_level, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
893static struct kobj_attribute reading_punc_attribute = 893static struct kobj_attribute reading_punc_attribute =
894 __ATTR(reading_punc, USER_RW, spk_var_show, spk_var_store); 894 __ATTR(reading_punc, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
895static struct kobj_attribute say_control_attribute = 895static struct kobj_attribute say_control_attribute =
896 __ATTR(say_control, USER_RW, spk_var_show, spk_var_store); 896 __ATTR(say_control, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
897static struct kobj_attribute say_word_ctl_attribute = 897static struct kobj_attribute say_word_ctl_attribute =
898 __ATTR(say_word_ctl, USER_RW, spk_var_show, spk_var_store); 898 __ATTR(say_word_ctl, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
899static struct kobj_attribute spell_delay_attribute = 899static struct kobj_attribute spell_delay_attribute =
900 __ATTR(spell_delay, USER_RW, spk_var_show, spk_var_store); 900 __ATTR(spell_delay, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
901 901
902/* 902/*
903 * These attributes are i18n related. 903 * These attributes are i18n related.
904 */ 904 */
905static struct kobj_attribute announcements_attribute = 905static struct kobj_attribute announcements_attribute =
906 __ATTR(announcements, USER_RW, message_show, message_store); 906 __ATTR(announcements, S_IWUGO|S_IRUGO, message_show, message_store);
907static struct kobj_attribute characters_attribute = 907static struct kobj_attribute characters_attribute =
908 __ATTR(characters, USER_RW, chars_chartab_show, chars_chartab_store); 908 __ATTR(characters, S_IWUGO|S_IRUGO, chars_chartab_show, chars_chartab_store);
909static struct kobj_attribute chartab_attribute = 909static struct kobj_attribute chartab_attribute =
910 __ATTR(chartab, USER_RW, chars_chartab_show, chars_chartab_store); 910 __ATTR(chartab, S_IWUGO|S_IRUGO, chars_chartab_show, chars_chartab_store);
911static struct kobj_attribute ctl_keys_attribute = 911static struct kobj_attribute ctl_keys_attribute =
912 __ATTR(ctl_keys, USER_RW, message_show, message_store); 912 __ATTR(ctl_keys, S_IWUGO|S_IRUGO, message_show, message_store);
913static struct kobj_attribute colors_attribute = 913static struct kobj_attribute colors_attribute =
914 __ATTR(colors, USER_RW, message_show, message_store); 914 __ATTR(colors, S_IWUGO|S_IRUGO, message_show, message_store);
915static struct kobj_attribute formatted_attribute = 915static struct kobj_attribute formatted_attribute =
916 __ATTR(formatted, USER_RW, message_show, message_store); 916 __ATTR(formatted, S_IWUGO|S_IRUGO, message_show, message_store);
917static struct kobj_attribute function_names_attribute = 917static struct kobj_attribute function_names_attribute =
918 __ATTR(function_names, USER_RW, message_show, message_store); 918 __ATTR(function_names, S_IWUGO|S_IRUGO, message_show, message_store);
919static struct kobj_attribute key_names_attribute = 919static struct kobj_attribute key_names_attribute =
920 __ATTR(key_names, USER_RW, message_show, message_store); 920 __ATTR(key_names, S_IWUGO|S_IRUGO, message_show, message_store);
921static struct kobj_attribute states_attribute = 921static struct kobj_attribute states_attribute =
922 __ATTR(states, USER_RW, message_show, message_store); 922 __ATTR(states, S_IWUGO|S_IRUGO, message_show, message_store);
923 923
924/* 924/*
925 * Create groups of attributes so that we can create and destroy them all 925 * Create groups of attributes so that we can create and destroy them all
diff --git a/drivers/staging/speakup/speakup.h b/drivers/staging/speakup/speakup.h
index 0126f714821a..a7bcceec436a 100644
--- a/drivers/staging/speakup/speakup.h
+++ b/drivers/staging/speakup/speakup.h
@@ -12,8 +12,6 @@
12/* proc permissions */ 12/* proc permissions */
13#define USER_R (S_IFREG|S_IRUGO) 13#define USER_R (S_IFREG|S_IRUGO)
14#define USER_W (S_IFREG|S_IWUGO) 14#define USER_W (S_IFREG|S_IWUGO)
15#define USER_RW (S_IFREG|S_IRUGO|S_IWUGO)
16#define ROOT_W (S_IFREG|S_IRUGO|S_IWUSR)
17 15
18#define TOGGLE_0 .u.n = {NULL, 0, 0, 1, 0, 0, NULL } 16#define TOGGLE_0 .u.n = {NULL, 0, 0, 1, 0, 0, NULL }
19#define TOGGLE_1 .u.n = {NULL, 1, 0, 1, 0, 0, NULL } 17#define TOGGLE_1 .u.n = {NULL, 1, 0, 1, 0, 0, NULL }
diff --git a/drivers/staging/speakup/speakup_acntpc.c b/drivers/staging/speakup/speakup_acntpc.c
index 1c8a7f4a0ef5..e7dfa434bd96 100644
--- a/drivers/staging/speakup/speakup_acntpc.c
+++ b/drivers/staging/speakup/speakup_acntpc.c
@@ -62,28 +62,28 @@ static struct var_t vars[] = {
62 * These attributes will appear in /sys/accessibility/speakup/acntpc. 62 * These attributes will appear in /sys/accessibility/speakup/acntpc.
63 */ 63 */
64static struct kobj_attribute caps_start_attribute = 64static struct kobj_attribute caps_start_attribute =
65 __ATTR(caps_start, USER_RW, spk_var_show, spk_var_store); 65 __ATTR(caps_start, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
66static struct kobj_attribute caps_stop_attribute = 66static struct kobj_attribute caps_stop_attribute =
67 __ATTR(caps_stop, USER_RW, spk_var_show, spk_var_store); 67 __ATTR(caps_stop, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
68static struct kobj_attribute pitch_attribute = 68static struct kobj_attribute pitch_attribute =
69 __ATTR(pitch, USER_RW, spk_var_show, spk_var_store); 69 __ATTR(pitch, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
70static struct kobj_attribute rate_attribute = 70static struct kobj_attribute rate_attribute =
71 __ATTR(rate, USER_RW, spk_var_show, spk_var_store); 71 __ATTR(rate, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
72static struct kobj_attribute tone_attribute = 72static struct kobj_attribute tone_attribute =
73 __ATTR(tone, USER_RW, spk_var_show, spk_var_store); 73 __ATTR(tone, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
74static struct kobj_attribute vol_attribute = 74static struct kobj_attribute vol_attribute =
75 __ATTR(vol, USER_RW, spk_var_show, spk_var_store); 75 __ATTR(vol, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
76 76
77static struct kobj_attribute delay_time_attribute = 77static struct kobj_attribute delay_time_attribute =
78 __ATTR(delay_time, ROOT_W, spk_var_show, spk_var_store); 78 __ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
79static struct kobj_attribute direct_attribute = 79static struct kobj_attribute direct_attribute =
80 __ATTR(direct, USER_RW, spk_var_show, spk_var_store); 80 __ATTR(direct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
81static struct kobj_attribute full_time_attribute = 81static struct kobj_attribute full_time_attribute =
82 __ATTR(full_time, ROOT_W, spk_var_show, spk_var_store); 82 __ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
83static struct kobj_attribute jiffy_delta_attribute = 83static struct kobj_attribute jiffy_delta_attribute =
84 __ATTR(jiffy_delta, ROOT_W, spk_var_show, spk_var_store); 84 __ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
85static struct kobj_attribute trigger_time_attribute = 85static struct kobj_attribute trigger_time_attribute =
86 __ATTR(trigger_time, ROOT_W, spk_var_show, spk_var_store); 86 __ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
87 87
88/* 88/*
89 * Create a group of attributes so that we can create and destroy them all 89 * Create a group of attributes so that we can create and destroy them all
diff --git a/drivers/staging/speakup/speakup_acntsa.c b/drivers/staging/speakup/speakup_acntsa.c
index 22a8b7291098..c7f014ed9628 100644
--- a/drivers/staging/speakup/speakup_acntsa.c
+++ b/drivers/staging/speakup/speakup_acntsa.c
@@ -47,28 +47,28 @@ static struct var_t vars[] = {
47 * These attributes will appear in /sys/accessibility/speakup/acntsa. 47 * These attributes will appear in /sys/accessibility/speakup/acntsa.
48 */ 48 */
49static struct kobj_attribute caps_start_attribute = 49static struct kobj_attribute caps_start_attribute =
50 __ATTR(caps_start, USER_RW, spk_var_show, spk_var_store); 50 __ATTR(caps_start, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
51static struct kobj_attribute caps_stop_attribute = 51static struct kobj_attribute caps_stop_attribute =
52 __ATTR(caps_stop, USER_RW, spk_var_show, spk_var_store); 52 __ATTR(caps_stop, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
53static struct kobj_attribute pitch_attribute = 53static struct kobj_attribute pitch_attribute =
54 __ATTR(pitch, USER_RW, spk_var_show, spk_var_store); 54 __ATTR(pitch, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
55static struct kobj_attribute rate_attribute = 55static struct kobj_attribute rate_attribute =
56 __ATTR(rate, USER_RW, spk_var_show, spk_var_store); 56 __ATTR(rate, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
57static struct kobj_attribute tone_attribute = 57static struct kobj_attribute tone_attribute =
58 __ATTR(tone, USER_RW, spk_var_show, spk_var_store); 58 __ATTR(tone, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
59static struct kobj_attribute vol_attribute = 59static struct kobj_attribute vol_attribute =
60 __ATTR(vol, USER_RW, spk_var_show, spk_var_store); 60 __ATTR(vol, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
61 61
62static struct kobj_attribute delay_time_attribute = 62static struct kobj_attribute delay_time_attribute =
63 __ATTR(delay_time, ROOT_W, spk_var_show, spk_var_store); 63 __ATTR(delay_time, S_IRUSR|S_IRUGO, spk_var_show, spk_var_store);
64static struct kobj_attribute direct_attribute = 64static struct kobj_attribute direct_attribute =
65 __ATTR(direct, USER_RW, spk_var_show, spk_var_store); 65 __ATTR(direct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
66static struct kobj_attribute full_time_attribute = 66static struct kobj_attribute full_time_attribute =
67 __ATTR(full_time, ROOT_W, spk_var_show, spk_var_store); 67 __ATTR(full_time, S_IRUSR|S_IRUGO, spk_var_show, spk_var_store);
68static struct kobj_attribute jiffy_delta_attribute = 68static struct kobj_attribute jiffy_delta_attribute =
69 __ATTR(jiffy_delta, ROOT_W, spk_var_show, spk_var_store); 69 __ATTR(jiffy_delta, S_IRUSR|S_IRUGO, spk_var_show, spk_var_store);
70static struct kobj_attribute trigger_time_attribute = 70static struct kobj_attribute trigger_time_attribute =
71 __ATTR(trigger_time, ROOT_W, spk_var_show, spk_var_store); 71 __ATTR(trigger_time, S_IRUSR|S_IRUGO, spk_var_show, spk_var_store);
72 72
73/* 73/*
74 * Create a group of attributes so that we can create and destroy them all 74 * Create a group of attributes so that we can create and destroy them all
diff --git a/drivers/staging/speakup/speakup_apollo.c b/drivers/staging/speakup/speakup_apollo.c
index 70cf1591676a..38c8c2221e4e 100644
--- a/drivers/staging/speakup/speakup_apollo.c
+++ b/drivers/staging/speakup/speakup_apollo.c
@@ -53,30 +53,30 @@ static struct var_t vars[] = {
53 * These attributes will appear in /sys/accessibility/speakup/apollo. 53 * These attributes will appear in /sys/accessibility/speakup/apollo.
54 */ 54 */
55static struct kobj_attribute caps_start_attribute = 55static struct kobj_attribute caps_start_attribute =
56 __ATTR(caps_start, USER_RW, spk_var_show, spk_var_store); 56 __ATTR(caps_start, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
57static struct kobj_attribute caps_stop_attribute = 57static struct kobj_attribute caps_stop_attribute =
58 __ATTR(caps_stop, USER_RW, spk_var_show, spk_var_store); 58 __ATTR(caps_stop, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
59static struct kobj_attribute lang_attribute = 59static struct kobj_attribute lang_attribute =
60 __ATTR(lang, USER_RW, spk_var_show, spk_var_store); 60 __ATTR(lang, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
61static struct kobj_attribute pitch_attribute = 61static struct kobj_attribute pitch_attribute =
62 __ATTR(pitch, USER_RW, spk_var_show, spk_var_store); 62 __ATTR(pitch, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
63static struct kobj_attribute rate_attribute = 63static struct kobj_attribute rate_attribute =
64 __ATTR(rate, USER_RW, spk_var_show, spk_var_store); 64 __ATTR(rate, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
65static struct kobj_attribute voice_attribute = 65static struct kobj_attribute voice_attribute =
66 __ATTR(voice, USER_RW, spk_var_show, spk_var_store); 66 __ATTR(voice, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
67static struct kobj_attribute vol_attribute = 67static struct kobj_attribute vol_attribute =
68 __ATTR(vol, USER_RW, spk_var_show, spk_var_store); 68 __ATTR(vol, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
69 69
70static struct kobj_attribute delay_time_attribute = 70static struct kobj_attribute delay_time_attribute =
71 __ATTR(delay_time, ROOT_W, spk_var_show, spk_var_store); 71 __ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
72static struct kobj_attribute direct_attribute = 72static struct kobj_attribute direct_attribute =
73 __ATTR(direct, USER_RW, spk_var_show, spk_var_store); 73 __ATTR(direct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
74static struct kobj_attribute full_time_attribute = 74static struct kobj_attribute full_time_attribute =
75 __ATTR(full_time, ROOT_W, spk_var_show, spk_var_store); 75 __ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
76static struct kobj_attribute jiffy_delta_attribute = 76static struct kobj_attribute jiffy_delta_attribute =
77 __ATTR(jiffy_delta, ROOT_W, spk_var_show, spk_var_store); 77 __ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
78static struct kobj_attribute trigger_time_attribute = 78static struct kobj_attribute trigger_time_attribute =
79 __ATTR(trigger_time, ROOT_W, spk_var_show, spk_var_store); 79 __ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
80 80
81/* 81/*
82 * Create a group of attributes so that we can create and destroy them all 82 * Create a group of attributes so that we can create and destroy them all
diff --git a/drivers/staging/speakup/speakup_audptr.c b/drivers/staging/speakup/speakup_audptr.c
index 61a3ceeb0d3a..de5b4a5f43b6 100644
--- a/drivers/staging/speakup/speakup_audptr.c
+++ b/drivers/staging/speakup/speakup_audptr.c
@@ -49,30 +49,30 @@ static struct var_t vars[] = {
49 * These attributes will appear in /sys/accessibility/speakup/audptr. 49 * These attributes will appear in /sys/accessibility/speakup/audptr.
50 */ 50 */
51static struct kobj_attribute caps_start_attribute = 51static struct kobj_attribute caps_start_attribute =
52 __ATTR(caps_start, USER_RW, spk_var_show, spk_var_store); 52 __ATTR(caps_start, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
53static struct kobj_attribute caps_stop_attribute = 53static struct kobj_attribute caps_stop_attribute =
54 __ATTR(caps_stop, USER_RW, spk_var_show, spk_var_store); 54 __ATTR(caps_stop, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
55static struct kobj_attribute pitch_attribute = 55static struct kobj_attribute pitch_attribute =
56 __ATTR(pitch, USER_RW, spk_var_show, spk_var_store); 56 __ATTR(pitch, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
57static struct kobj_attribute punct_attribute = 57static struct kobj_attribute punct_attribute =
58 __ATTR(punct, USER_RW, spk_var_show, spk_var_store); 58 __ATTR(punct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
59static struct kobj_attribute rate_attribute = 59static struct kobj_attribute rate_attribute =
60 __ATTR(rate, USER_RW, spk_var_show, spk_var_store); 60 __ATTR(rate, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
61static struct kobj_attribute tone_attribute = 61static struct kobj_attribute tone_attribute =
62 __ATTR(tone, USER_RW, spk_var_show, spk_var_store); 62 __ATTR(tone, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
63static struct kobj_attribute vol_attribute = 63static struct kobj_attribute vol_attribute =
64 __ATTR(vol, USER_RW, spk_var_show, spk_var_store); 64 __ATTR(vol, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
65 65
66static struct kobj_attribute delay_time_attribute = 66static struct kobj_attribute delay_time_attribute =
67 __ATTR(delay_time, ROOT_W, spk_var_show, spk_var_store); 67 __ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
68static struct kobj_attribute direct_attribute = 68static struct kobj_attribute direct_attribute =
69 __ATTR(direct, USER_RW, spk_var_show, spk_var_store); 69 __ATTR(direct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
70static struct kobj_attribute full_time_attribute = 70static struct kobj_attribute full_time_attribute =
71 __ATTR(full_time, ROOT_W, spk_var_show, spk_var_store); 71 __ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
72static struct kobj_attribute jiffy_delta_attribute = 72static struct kobj_attribute jiffy_delta_attribute =
73 __ATTR(jiffy_delta, ROOT_W, spk_var_show, spk_var_store); 73 __ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
74static struct kobj_attribute trigger_time_attribute = 74static struct kobj_attribute trigger_time_attribute =
75 __ATTR(trigger_time, ROOT_W, spk_var_show, spk_var_store); 75 __ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
76 76
77/* 77/*
78 * Create a group of attributes so that we can create and destroy them all 78 * Create a group of attributes so that we can create and destroy them all
diff --git a/drivers/staging/speakup/speakup_bns.c b/drivers/staging/speakup/speakup_bns.c
index 4bfe3d458dc0..4939e8c7272e 100644
--- a/drivers/staging/speakup/speakup_bns.c
+++ b/drivers/staging/speakup/speakup_bns.c
@@ -44,28 +44,28 @@ static struct var_t vars[] = {
44 * These attributes will appear in /sys/accessibility/speakup/bns. 44 * These attributes will appear in /sys/accessibility/speakup/bns.
45 */ 45 */
46static struct kobj_attribute caps_start_attribute = 46static struct kobj_attribute caps_start_attribute =
47 __ATTR(caps_start, USER_RW, spk_var_show, spk_var_store); 47 __ATTR(caps_start, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
48static struct kobj_attribute caps_stop_attribute = 48static struct kobj_attribute caps_stop_attribute =
49 __ATTR(caps_stop, USER_RW, spk_var_show, spk_var_store); 49 __ATTR(caps_stop, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
50static struct kobj_attribute pitch_attribute = 50static struct kobj_attribute pitch_attribute =
51 __ATTR(pitch, USER_RW, spk_var_show, spk_var_store); 51 __ATTR(pitch, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
52static struct kobj_attribute rate_attribute = 52static struct kobj_attribute rate_attribute =
53 __ATTR(rate, USER_RW, spk_var_show, spk_var_store); 53 __ATTR(rate, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
54static struct kobj_attribute tone_attribute = 54static struct kobj_attribute tone_attribute =
55 __ATTR(tone, USER_RW, spk_var_show, spk_var_store); 55 __ATTR(tone, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
56static struct kobj_attribute vol_attribute = 56static struct kobj_attribute vol_attribute =
57 __ATTR(vol, USER_RW, spk_var_show, spk_var_store); 57 __ATTR(vol, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
58 58
59static struct kobj_attribute delay_time_attribute = 59static struct kobj_attribute delay_time_attribute =
60 __ATTR(delay_time, ROOT_W, spk_var_show, spk_var_store); 60 __ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
61static struct kobj_attribute direct_attribute = 61static struct kobj_attribute direct_attribute =
62 __ATTR(direct, USER_RW, spk_var_show, spk_var_store); 62 __ATTR(direct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
63static struct kobj_attribute full_time_attribute = 63static struct kobj_attribute full_time_attribute =
64 __ATTR(full_time, ROOT_W, spk_var_show, spk_var_store); 64 __ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
65static struct kobj_attribute jiffy_delta_attribute = 65static struct kobj_attribute jiffy_delta_attribute =
66 __ATTR(jiffy_delta, ROOT_W, spk_var_show, spk_var_store); 66 __ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
67static struct kobj_attribute trigger_time_attribute = 67static struct kobj_attribute trigger_time_attribute =
68 __ATTR(trigger_time, ROOT_W, spk_var_show, spk_var_store); 68 __ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
69 69
70/* 70/*
71 * Create a group of attributes so that we can create and destroy them all 71 * Create a group of attributes so that we can create and destroy them all
diff --git a/drivers/staging/speakup/speakup_decext.c b/drivers/staging/speakup/speakup_decext.c
index d306e010d3ea..b17af9803929 100644
--- a/drivers/staging/speakup/speakup_decext.c
+++ b/drivers/staging/speakup/speakup_decext.c
@@ -70,30 +70,30 @@ static struct var_t vars[] = {
70 * These attributes will appear in /sys/accessibility/speakup/decext. 70 * These attributes will appear in /sys/accessibility/speakup/decext.
71 */ 71 */
72static struct kobj_attribute caps_start_attribute = 72static struct kobj_attribute caps_start_attribute =
73 __ATTR(caps_start, USER_RW, spk_var_show, spk_var_store); 73 __ATTR(caps_start, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
74static struct kobj_attribute caps_stop_attribute = 74static struct kobj_attribute caps_stop_attribute =
75 __ATTR(caps_stop, USER_RW, spk_var_show, spk_var_store); 75 __ATTR(caps_stop, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
76static struct kobj_attribute pitch_attribute = 76static struct kobj_attribute pitch_attribute =
77 __ATTR(pitch, USER_RW, spk_var_show, spk_var_store); 77 __ATTR(pitch, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
78static struct kobj_attribute punct_attribute = 78static struct kobj_attribute punct_attribute =
79 __ATTR(punct, USER_RW, spk_var_show, spk_var_store); 79 __ATTR(punct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
80static struct kobj_attribute rate_attribute = 80static struct kobj_attribute rate_attribute =
81 __ATTR(rate, USER_RW, spk_var_show, spk_var_store); 81 __ATTR(rate, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
82static struct kobj_attribute voice_attribute = 82static struct kobj_attribute voice_attribute =
83 __ATTR(voice, USER_RW, spk_var_show, spk_var_store); 83 __ATTR(voice, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
84static struct kobj_attribute vol_attribute = 84static struct kobj_attribute vol_attribute =
85 __ATTR(vol, USER_RW, spk_var_show, spk_var_store); 85 __ATTR(vol, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
86 86
87static struct kobj_attribute delay_time_attribute = 87static struct kobj_attribute delay_time_attribute =
88 __ATTR(delay_time, ROOT_W, spk_var_show, spk_var_store); 88 __ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
89static struct kobj_attribute direct_attribute = 89static struct kobj_attribute direct_attribute =
90 __ATTR(direct, USER_RW, spk_var_show, spk_var_store); 90 __ATTR(direct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
91static struct kobj_attribute full_time_attribute = 91static struct kobj_attribute full_time_attribute =
92 __ATTR(full_time, ROOT_W, spk_var_show, spk_var_store); 92 __ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
93static struct kobj_attribute jiffy_delta_attribute = 93static struct kobj_attribute jiffy_delta_attribute =
94 __ATTR(jiffy_delta, ROOT_W, spk_var_show, spk_var_store); 94 __ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
95static struct kobj_attribute trigger_time_attribute = 95static struct kobj_attribute trigger_time_attribute =
96 __ATTR(trigger_time, ROOT_W, spk_var_show, spk_var_store); 96 __ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
97 97
98/* 98/*
99 * Create a group of attributes so that we can create and destroy them all 99 * Create a group of attributes so that we can create and destroy them all
diff --git a/drivers/staging/speakup/speakup_decpc.c b/drivers/staging/speakup/speakup_decpc.c
index ea6b72d40b31..cfa4bc032358 100644
--- a/drivers/staging/speakup/speakup_decpc.c
+++ b/drivers/staging/speakup/speakup_decpc.c
@@ -164,30 +164,30 @@ static struct var_t vars[] = {
164 * These attributes will appear in /sys/accessibility/speakup/decpc. 164 * These attributes will appear in /sys/accessibility/speakup/decpc.
165 */ 165 */
166static struct kobj_attribute caps_start_attribute = 166static struct kobj_attribute caps_start_attribute =
167 __ATTR(caps_start, USER_RW, spk_var_show, spk_var_store); 167 __ATTR(caps_start, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
168static struct kobj_attribute caps_stop_attribute = 168static struct kobj_attribute caps_stop_attribute =
169 __ATTR(caps_stop, USER_RW, spk_var_show, spk_var_store); 169 __ATTR(caps_stop, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
170static struct kobj_attribute pitch_attribute = 170static struct kobj_attribute pitch_attribute =
171 __ATTR(pitch, USER_RW, spk_var_show, spk_var_store); 171 __ATTR(pitch, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
172static struct kobj_attribute punct_attribute = 172static struct kobj_attribute punct_attribute =
173 __ATTR(punct, USER_RW, spk_var_show, spk_var_store); 173 __ATTR(punct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
174static struct kobj_attribute rate_attribute = 174static struct kobj_attribute rate_attribute =
175 __ATTR(rate, USER_RW, spk_var_show, spk_var_store); 175 __ATTR(rate, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
176static struct kobj_attribute voice_attribute = 176static struct kobj_attribute voice_attribute =
177 __ATTR(voice, USER_RW, spk_var_show, spk_var_store); 177 __ATTR(voice, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
178static struct kobj_attribute vol_attribute = 178static struct kobj_attribute vol_attribute =
179 __ATTR(vol, USER_RW, spk_var_show, spk_var_store); 179 __ATTR(vol, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
180 180
181static struct kobj_attribute delay_time_attribute = 181static struct kobj_attribute delay_time_attribute =
182 __ATTR(delay_time, ROOT_W, spk_var_show, spk_var_store); 182 __ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
183static struct kobj_attribute direct_attribute = 183static struct kobj_attribute direct_attribute =
184 __ATTR(direct, USER_RW, spk_var_show, spk_var_store); 184 __ATTR(direct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
185static struct kobj_attribute full_time_attribute = 185static struct kobj_attribute full_time_attribute =
186 __ATTR(full_time, ROOT_W, spk_var_show, spk_var_store); 186 __ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
187static struct kobj_attribute jiffy_delta_attribute = 187static struct kobj_attribute jiffy_delta_attribute =
188 __ATTR(jiffy_delta, ROOT_W, spk_var_show, spk_var_store); 188 __ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
189static struct kobj_attribute trigger_time_attribute = 189static struct kobj_attribute trigger_time_attribute =
190 __ATTR(trigger_time, ROOT_W, spk_var_show, spk_var_store); 190 __ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
191 191
192/* 192/*
193 * Create a group of attributes so that we can create and destroy them all 193 * Create a group of attributes so that we can create and destroy them all
diff --git a/drivers/staging/speakup/speakup_dectlk.c b/drivers/staging/speakup/speakup_dectlk.c
index 756d01535d3e..1fcae55dabba 100644
--- a/drivers/staging/speakup/speakup_dectlk.c
+++ b/drivers/staging/speakup/speakup_dectlk.c
@@ -70,30 +70,30 @@ static struct var_t vars[] = {
70 * These attributes will appear in /sys/accessibility/speakup/dectlk. 70 * These attributes will appear in /sys/accessibility/speakup/dectlk.
71 */ 71 */
72static struct kobj_attribute caps_start_attribute = 72static struct kobj_attribute caps_start_attribute =
73 __ATTR(caps_start, USER_RW, spk_var_show, spk_var_store); 73 __ATTR(caps_start, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
74static struct kobj_attribute caps_stop_attribute = 74static struct kobj_attribute caps_stop_attribute =
75 __ATTR(caps_stop, USER_RW, spk_var_show, spk_var_store); 75 __ATTR(caps_stop, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
76static struct kobj_attribute pitch_attribute = 76static struct kobj_attribute pitch_attribute =
77 __ATTR(pitch, USER_RW, spk_var_show, spk_var_store); 77 __ATTR(pitch, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
78static struct kobj_attribute punct_attribute = 78static struct kobj_attribute punct_attribute =
79 __ATTR(punct, USER_RW, spk_var_show, spk_var_store); 79 __ATTR(punct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
80static struct kobj_attribute rate_attribute = 80static struct kobj_attribute rate_attribute =
81 __ATTR(rate, USER_RW, spk_var_show, spk_var_store); 81 __ATTR(rate, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
82static struct kobj_attribute voice_attribute = 82static struct kobj_attribute voice_attribute =
83 __ATTR(voice, USER_RW, spk_var_show, spk_var_store); 83 __ATTR(voice, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
84static struct kobj_attribute vol_attribute = 84static struct kobj_attribute vol_attribute =
85 __ATTR(vol, USER_RW, spk_var_show, spk_var_store); 85 __ATTR(vol, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
86 86
87static struct kobj_attribute delay_time_attribute = 87static struct kobj_attribute delay_time_attribute =
88 __ATTR(delay_time, ROOT_W, spk_var_show, spk_var_store); 88 __ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
89static struct kobj_attribute direct_attribute = 89static struct kobj_attribute direct_attribute =
90 __ATTR(direct, USER_RW, spk_var_show, spk_var_store); 90 __ATTR(direct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
91static struct kobj_attribute full_time_attribute = 91static struct kobj_attribute full_time_attribute =
92 __ATTR(full_time, ROOT_W, spk_var_show, spk_var_store); 92 __ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
93static struct kobj_attribute jiffy_delta_attribute = 93static struct kobj_attribute jiffy_delta_attribute =
94 __ATTR(jiffy_delta, ROOT_W, spk_var_show, spk_var_store); 94 __ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
95static struct kobj_attribute trigger_time_attribute = 95static struct kobj_attribute trigger_time_attribute =
96 __ATTR(trigger_time, ROOT_W, spk_var_show, spk_var_store); 96 __ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
97 97
98/* 98/*
99 * Create a group of attributes so that we can create and destroy them all 99 * Create a group of attributes so that we can create and destroy them all
diff --git a/drivers/staging/speakup/speakup_dtlk.c b/drivers/staging/speakup/speakup_dtlk.c
index 1feb0fba1b43..5c6c34191e8d 100644
--- a/drivers/staging/speakup/speakup_dtlk.c
+++ b/drivers/staging/speakup/speakup_dtlk.c
@@ -67,34 +67,34 @@ static struct var_t vars[] = {
67 * These attributes will appear in /sys/accessibility/speakup/dtlk. 67 * These attributes will appear in /sys/accessibility/speakup/dtlk.
68 */ 68 */
69static struct kobj_attribute caps_start_attribute = 69static struct kobj_attribute caps_start_attribute =
70 __ATTR(caps_start, USER_RW, spk_var_show, spk_var_store); 70 __ATTR(caps_start, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
71static struct kobj_attribute caps_stop_attribute = 71static struct kobj_attribute caps_stop_attribute =
72 __ATTR(caps_stop, USER_RW, spk_var_show, spk_var_store); 72 __ATTR(caps_stop, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
73static struct kobj_attribute freq_attribute = 73static struct kobj_attribute freq_attribute =
74 __ATTR(freq, USER_RW, spk_var_show, spk_var_store); 74 __ATTR(freq, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
75static struct kobj_attribute pitch_attribute = 75static struct kobj_attribute pitch_attribute =
76 __ATTR(pitch, USER_RW, spk_var_show, spk_var_store); 76 __ATTR(pitch, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
77static struct kobj_attribute punct_attribute = 77static struct kobj_attribute punct_attribute =
78 __ATTR(punct, USER_RW, spk_var_show, spk_var_store); 78 __ATTR(punct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
79static struct kobj_attribute rate_attribute = 79static struct kobj_attribute rate_attribute =
80 __ATTR(rate, USER_RW, spk_var_show, spk_var_store); 80 __ATTR(rate, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
81static struct kobj_attribute tone_attribute = 81static struct kobj_attribute tone_attribute =
82 __ATTR(tone, USER_RW, spk_var_show, spk_var_store); 82 __ATTR(tone, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
83static struct kobj_attribute voice_attribute = 83static struct kobj_attribute voice_attribute =
84 __ATTR(voice, USER_RW, spk_var_show, spk_var_store); 84 __ATTR(voice, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
85static struct kobj_attribute vol_attribute = 85static struct kobj_attribute vol_attribute =
86 __ATTR(vol, USER_RW, spk_var_show, spk_var_store); 86 __ATTR(vol, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
87 87
88static struct kobj_attribute delay_time_attribute = 88static struct kobj_attribute delay_time_attribute =
89 __ATTR(delay_time, ROOT_W, spk_var_show, spk_var_store); 89 __ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
90static struct kobj_attribute direct_attribute = 90static struct kobj_attribute direct_attribute =
91 __ATTR(direct, USER_RW, spk_var_show, spk_var_store); 91 __ATTR(direct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
92static struct kobj_attribute full_time_attribute = 92static struct kobj_attribute full_time_attribute =
93 __ATTR(full_time, ROOT_W, spk_var_show, spk_var_store); 93 __ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
94static struct kobj_attribute jiffy_delta_attribute = 94static struct kobj_attribute jiffy_delta_attribute =
95 __ATTR(jiffy_delta, ROOT_W, spk_var_show, spk_var_store); 95 __ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
96static struct kobj_attribute trigger_time_attribute = 96static struct kobj_attribute trigger_time_attribute =
97 __ATTR(trigger_time, ROOT_W, spk_var_show, spk_var_store); 97 __ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
98 98
99/* 99/*
100 * Create a group of attributes so that we can create and destroy them all 100 * Create a group of attributes so that we can create and destroy them all
diff --git a/drivers/staging/speakup/speakup_dummy.c b/drivers/staging/speakup/speakup_dummy.c
index 4a24b9c1e8e3..e19e9994bbb5 100644
--- a/drivers/staging/speakup/speakup_dummy.c
+++ b/drivers/staging/speakup/speakup_dummy.c
@@ -46,28 +46,28 @@ static struct var_t vars[] = {
46 * These attributes will appear in /sys/accessibility/speakup/dummy. 46 * These attributes will appear in /sys/accessibility/speakup/dummy.
47 */ 47 */
48static struct kobj_attribute caps_start_attribute = 48static struct kobj_attribute caps_start_attribute =
49 __ATTR(caps_start, USER_RW, spk_var_show, spk_var_store); 49 __ATTR(caps_start, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
50static struct kobj_attribute caps_stop_attribute = 50static struct kobj_attribute caps_stop_attribute =
51 __ATTR(caps_stop, USER_RW, spk_var_show, spk_var_store); 51 __ATTR(caps_stop, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
52static struct kobj_attribute pitch_attribute = 52static struct kobj_attribute pitch_attribute =
53 __ATTR(pitch, USER_RW, spk_var_show, spk_var_store); 53 __ATTR(pitch, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
54static struct kobj_attribute rate_attribute = 54static struct kobj_attribute rate_attribute =
55 __ATTR(rate, USER_RW, spk_var_show, spk_var_store); 55 __ATTR(rate, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
56static struct kobj_attribute tone_attribute = 56static struct kobj_attribute tone_attribute =
57 __ATTR(tone, USER_RW, spk_var_show, spk_var_store); 57 __ATTR(tone, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
58static struct kobj_attribute vol_attribute = 58static struct kobj_attribute vol_attribute =
59 __ATTR(vol, USER_RW, spk_var_show, spk_var_store); 59 __ATTR(vol, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
60 60
61static struct kobj_attribute delay_time_attribute = 61static struct kobj_attribute delay_time_attribute =
62 __ATTR(delay_time, ROOT_W, spk_var_show, spk_var_store); 62 __ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
63static struct kobj_attribute direct_attribute = 63static struct kobj_attribute direct_attribute =
64 __ATTR(direct, USER_RW, spk_var_show, spk_var_store); 64 __ATTR(direct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
65static struct kobj_attribute full_time_attribute = 65static struct kobj_attribute full_time_attribute =
66 __ATTR(full_time, ROOT_W, spk_var_show, spk_var_store); 66 __ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
67static struct kobj_attribute jiffy_delta_attribute = 67static struct kobj_attribute jiffy_delta_attribute =
68 __ATTR(jiffy_delta, ROOT_W, spk_var_show, spk_var_store); 68 __ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
69static struct kobj_attribute trigger_time_attribute = 69static struct kobj_attribute trigger_time_attribute =
70 __ATTR(trigger_time, ROOT_W, spk_var_show, spk_var_store); 70 __ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
71 71
72/* 72/*
73 * Create a group of attributes so that we can create and destroy them all 73 * Create a group of attributes so that we can create and destroy them all
diff --git a/drivers/staging/speakup/speakup_keypc.c b/drivers/staging/speakup/speakup_keypc.c
index 2f2fe5eeff63..9c246d701a95 100644
--- a/drivers/staging/speakup/speakup_keypc.c
+++ b/drivers/staging/speakup/speakup_keypc.c
@@ -59,24 +59,24 @@ static struct var_t vars[] = {
59 * These attributes will appear in /sys/accessibility/speakup/keypc. 59 * These attributes will appear in /sys/accessibility/speakup/keypc.
60 */ 60 */
61static struct kobj_attribute caps_start_attribute = 61static struct kobj_attribute caps_start_attribute =
62 __ATTR(caps_start, USER_RW, spk_var_show, spk_var_store); 62 __ATTR(caps_start, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
63static struct kobj_attribute caps_stop_attribute = 63static struct kobj_attribute caps_stop_attribute =
64 __ATTR(caps_stop, USER_RW, spk_var_show, spk_var_store); 64 __ATTR(caps_stop, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
65static struct kobj_attribute pitch_attribute = 65static struct kobj_attribute pitch_attribute =
66 __ATTR(pitch, USER_RW, spk_var_show, spk_var_store); 66 __ATTR(pitch, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
67static struct kobj_attribute rate_attribute = 67static struct kobj_attribute rate_attribute =
68 __ATTR(rate, USER_RW, spk_var_show, spk_var_store); 68 __ATTR(rate, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
69 69
70static struct kobj_attribute delay_time_attribute = 70static struct kobj_attribute delay_time_attribute =
71 __ATTR(delay_time, ROOT_W, spk_var_show, spk_var_store); 71 __ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
72static struct kobj_attribute direct_attribute = 72static struct kobj_attribute direct_attribute =
73 __ATTR(direct, USER_RW, spk_var_show, spk_var_store); 73 __ATTR(direct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
74static struct kobj_attribute full_time_attribute = 74static struct kobj_attribute full_time_attribute =
75 __ATTR(full_time, ROOT_W, spk_var_show, spk_var_store); 75 __ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
76static struct kobj_attribute jiffy_delta_attribute = 76static struct kobj_attribute jiffy_delta_attribute =
77 __ATTR(jiffy_delta, ROOT_W, spk_var_show, spk_var_store); 77 __ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
78static struct kobj_attribute trigger_time_attribute = 78static struct kobj_attribute trigger_time_attribute =
79 __ATTR(trigger_time, ROOT_W, spk_var_show, spk_var_store); 79 __ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
80 80
81/* 81/*
82 * Create a group of attributes so that we can create and destroy them all 82 * Create a group of attributes so that we can create and destroy them all
diff --git a/drivers/staging/speakup/speakup_ltlk.c b/drivers/staging/speakup/speakup_ltlk.c
index 326f94d6b079..c9be6f52c254 100644
--- a/drivers/staging/speakup/speakup_ltlk.c
+++ b/drivers/staging/speakup/speakup_ltlk.c
@@ -50,34 +50,34 @@ static struct var_t vars[] = {
50 * These attributes will appear in /sys/accessibility/speakup/ltlk. 50 * These attributes will appear in /sys/accessibility/speakup/ltlk.
51 */ 51 */
52static struct kobj_attribute caps_start_attribute = 52static struct kobj_attribute caps_start_attribute =
53 __ATTR(caps_start, USER_RW, spk_var_show, spk_var_store); 53 __ATTR(caps_start, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
54static struct kobj_attribute caps_stop_attribute = 54static struct kobj_attribute caps_stop_attribute =
55 __ATTR(caps_stop, USER_RW, spk_var_show, spk_var_store); 55 __ATTR(caps_stop, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
56static struct kobj_attribute freq_attribute = 56static struct kobj_attribute freq_attribute =
57 __ATTR(freq, USER_RW, spk_var_show, spk_var_store); 57 __ATTR(freq, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
58static struct kobj_attribute pitch_attribute = 58static struct kobj_attribute pitch_attribute =
59 __ATTR(pitch, USER_RW, spk_var_show, spk_var_store); 59 __ATTR(pitch, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
60static struct kobj_attribute punct_attribute = 60static struct kobj_attribute punct_attribute =
61 __ATTR(punct, USER_RW, spk_var_show, spk_var_store); 61 __ATTR(punct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
62static struct kobj_attribute rate_attribute = 62static struct kobj_attribute rate_attribute =
63 __ATTR(rate, USER_RW, spk_var_show, spk_var_store); 63 __ATTR(rate, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
64static struct kobj_attribute tone_attribute = 64static struct kobj_attribute tone_attribute =
65 __ATTR(tone, USER_RW, spk_var_show, spk_var_store); 65 __ATTR(tone, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
66static struct kobj_attribute voice_attribute = 66static struct kobj_attribute voice_attribute =
67 __ATTR(voice, USER_RW, spk_var_show, spk_var_store); 67 __ATTR(voice, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
68static struct kobj_attribute vol_attribute = 68static struct kobj_attribute vol_attribute =
69 __ATTR(vol, USER_RW, spk_var_show, spk_var_store); 69 __ATTR(vol, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
70 70
71static struct kobj_attribute delay_time_attribute = 71static struct kobj_attribute delay_time_attribute =
72 __ATTR(delay_time, ROOT_W, spk_var_show, spk_var_store); 72 __ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
73static struct kobj_attribute direct_attribute = 73static struct kobj_attribute direct_attribute =
74 __ATTR(direct, USER_RW, spk_var_show, spk_var_store); 74 __ATTR(direct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
75static struct kobj_attribute full_time_attribute = 75static struct kobj_attribute full_time_attribute =
76 __ATTR(full_time, ROOT_W, spk_var_show, spk_var_store); 76 __ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
77static struct kobj_attribute jiffy_delta_attribute = 77static struct kobj_attribute jiffy_delta_attribute =
78 __ATTR(jiffy_delta, ROOT_W, spk_var_show, spk_var_store); 78 __ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
79static struct kobj_attribute trigger_time_attribute = 79static struct kobj_attribute trigger_time_attribute =
80 __ATTR(trigger_time, ROOT_W, spk_var_show, spk_var_store); 80 __ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
81 81
82/* 82/*
83 * Create a group of attributes so that we can create and destroy them all 83 * Create a group of attributes so that we can create and destroy them all
diff --git a/drivers/staging/speakup/speakup_soft.c b/drivers/staging/speakup/speakup_soft.c
index 243c3d52fe5e..ee6089502a96 100644
--- a/drivers/staging/speakup/speakup_soft.c
+++ b/drivers/staging/speakup/speakup_soft.c
@@ -61,41 +61,41 @@ static struct var_t vars[] = {
61 * These attributes will appear in /sys/accessibility/speakup/soft. 61 * These attributes will appear in /sys/accessibility/speakup/soft.
62 */ 62 */
63static struct kobj_attribute caps_start_attribute = 63static struct kobj_attribute caps_start_attribute =
64 __ATTR(caps_start, USER_RW, spk_var_show, spk_var_store); 64 __ATTR(caps_start, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
65static struct kobj_attribute caps_stop_attribute = 65static struct kobj_attribute caps_stop_attribute =
66 __ATTR(caps_stop, USER_RW, spk_var_show, spk_var_store); 66 __ATTR(caps_stop, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
67static struct kobj_attribute freq_attribute = 67static struct kobj_attribute freq_attribute =
68 __ATTR(freq, USER_RW, spk_var_show, spk_var_store); 68 __ATTR(freq, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
69static struct kobj_attribute pitch_attribute = 69static struct kobj_attribute pitch_attribute =
70 __ATTR(pitch, USER_RW, spk_var_show, spk_var_store); 70 __ATTR(pitch, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
71static struct kobj_attribute punct_attribute = 71static struct kobj_attribute punct_attribute =
72 __ATTR(punct, USER_RW, spk_var_show, spk_var_store); 72 __ATTR(punct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
73static struct kobj_attribute rate_attribute = 73static struct kobj_attribute rate_attribute =
74 __ATTR(rate, USER_RW, spk_var_show, spk_var_store); 74 __ATTR(rate, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
75static struct kobj_attribute tone_attribute = 75static struct kobj_attribute tone_attribute =
76 __ATTR(tone, USER_RW, spk_var_show, spk_var_store); 76 __ATTR(tone, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
77static struct kobj_attribute voice_attribute = 77static struct kobj_attribute voice_attribute =
78 __ATTR(voice, USER_RW, spk_var_show, spk_var_store); 78 __ATTR(voice, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
79static struct kobj_attribute vol_attribute = 79static struct kobj_attribute vol_attribute =
80 __ATTR(vol, USER_RW, spk_var_show, spk_var_store); 80 __ATTR(vol, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
81 81
82/* 82/*
83 * We should uncomment the following definition, when we agree on a 83 * We should uncomment the following definition, when we agree on a
84 * method of passing a language designation to the software synthesizer. 84 * method of passing a language designation to the software synthesizer.
85 * static struct kobj_attribute lang_attribute = 85 * static struct kobj_attribute lang_attribute =
86 * __ATTR(lang, USER_RW, spk_var_show, spk_var_store); 86 * __ATTR(lang, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
87 */ 87 */
88 88
89static struct kobj_attribute delay_time_attribute = 89static struct kobj_attribute delay_time_attribute =
90 __ATTR(delay_time, ROOT_W, spk_var_show, spk_var_store); 90 __ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
91static struct kobj_attribute direct_attribute = 91static struct kobj_attribute direct_attribute =
92 __ATTR(direct, USER_RW, spk_var_show, spk_var_store); 92 __ATTR(direct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
93static struct kobj_attribute full_time_attribute = 93static struct kobj_attribute full_time_attribute =
94 __ATTR(full_time, ROOT_W, spk_var_show, spk_var_store); 94 __ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
95static struct kobj_attribute jiffy_delta_attribute = 95static struct kobj_attribute jiffy_delta_attribute =
96 __ATTR(jiffy_delta, ROOT_W, spk_var_show, spk_var_store); 96 __ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
97static struct kobj_attribute trigger_time_attribute = 97static struct kobj_attribute trigger_time_attribute =
98 __ATTR(trigger_time, ROOT_W, spk_var_show, spk_var_store); 98 __ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
99 99
100/* 100/*
101 * Create a group of attributes so that we can create and destroy them all 101 * Create a group of attributes so that we can create and destroy them all
diff --git a/drivers/staging/speakup/speakup_spkout.c b/drivers/staging/speakup/speakup_spkout.c
index e74f85620c68..711cf114df83 100644
--- a/drivers/staging/speakup/speakup_spkout.c
+++ b/drivers/staging/speakup/speakup_spkout.c
@@ -48,30 +48,30 @@ static struct var_t vars[] = {
48 * These attributes will appear in /sys/accessibility/speakup/spkout. 48 * These attributes will appear in /sys/accessibility/speakup/spkout.
49 */ 49 */
50static struct kobj_attribute caps_start_attribute = 50static struct kobj_attribute caps_start_attribute =
51 __ATTR(caps_start, USER_RW, spk_var_show, spk_var_store); 51 __ATTR(caps_start, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
52static struct kobj_attribute caps_stop_attribute = 52static struct kobj_attribute caps_stop_attribute =
53 __ATTR(caps_stop, USER_RW, spk_var_show, spk_var_store); 53 __ATTR(caps_stop, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
54static struct kobj_attribute pitch_attribute = 54static struct kobj_attribute pitch_attribute =
55 __ATTR(pitch, USER_RW, spk_var_show, spk_var_store); 55 __ATTR(pitch, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
56static struct kobj_attribute punct_attribute = 56static struct kobj_attribute punct_attribute =
57 __ATTR(punct, USER_RW, spk_var_show, spk_var_store); 57 __ATTR(punct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
58static struct kobj_attribute rate_attribute = 58static struct kobj_attribute rate_attribute =
59 __ATTR(rate, USER_RW, spk_var_show, spk_var_store); 59 __ATTR(rate, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
60static struct kobj_attribute tone_attribute = 60static struct kobj_attribute tone_attribute =
61 __ATTR(tone, USER_RW, spk_var_show, spk_var_store); 61 __ATTR(tone, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
62static struct kobj_attribute vol_attribute = 62static struct kobj_attribute vol_attribute =
63 __ATTR(vol, USER_RW, spk_var_show, spk_var_store); 63 __ATTR(vol, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
64 64
65static struct kobj_attribute delay_time_attribute = 65static struct kobj_attribute delay_time_attribute =
66 __ATTR(delay_time, ROOT_W, spk_var_show, spk_var_store); 66 __ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
67static struct kobj_attribute direct_attribute = 67static struct kobj_attribute direct_attribute =
68 __ATTR(direct, USER_RW, spk_var_show, spk_var_store); 68 __ATTR(direct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
69static struct kobj_attribute full_time_attribute = 69static struct kobj_attribute full_time_attribute =
70 __ATTR(full_time, ROOT_W, spk_var_show, spk_var_store); 70 __ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
71static struct kobj_attribute jiffy_delta_attribute = 71static struct kobj_attribute jiffy_delta_attribute =
72 __ATTR(jiffy_delta, ROOT_W, spk_var_show, spk_var_store); 72 __ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
73static struct kobj_attribute trigger_time_attribute = 73static struct kobj_attribute trigger_time_attribute =
74 __ATTR(trigger_time, ROOT_W, spk_var_show, spk_var_store); 74 __ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
75 75
76/* 76/*
77 * Create a group of attributes so that we can create and destroy them all 77 * Create a group of attributes so that we can create and destroy them all
diff --git a/drivers/staging/speakup/speakup_txprt.c b/drivers/staging/speakup/speakup_txprt.c
index 5a29b9fcc930..3f0be04df071 100644
--- a/drivers/staging/speakup/speakup_txprt.c
+++ b/drivers/staging/speakup/speakup_txprt.c
@@ -44,28 +44,28 @@ static struct var_t vars[] = {
44 * These attributes will appear in /sys/accessibility/speakup/txprt. 44 * These attributes will appear in /sys/accessibility/speakup/txprt.
45 */ 45 */
46static struct kobj_attribute caps_start_attribute = 46static struct kobj_attribute caps_start_attribute =
47 __ATTR(caps_start, USER_RW, spk_var_show, spk_var_store); 47 __ATTR(caps_start, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
48static struct kobj_attribute caps_stop_attribute = 48static struct kobj_attribute caps_stop_attribute =
49 __ATTR(caps_stop, USER_RW, spk_var_show, spk_var_store); 49 __ATTR(caps_stop, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
50static struct kobj_attribute pitch_attribute = 50static struct kobj_attribute pitch_attribute =
51 __ATTR(pitch, USER_RW, spk_var_show, spk_var_store); 51 __ATTR(pitch, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
52static struct kobj_attribute rate_attribute = 52static struct kobj_attribute rate_attribute =
53 __ATTR(rate, USER_RW, spk_var_show, spk_var_store); 53 __ATTR(rate, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
54static struct kobj_attribute tone_attribute = 54static struct kobj_attribute tone_attribute =
55 __ATTR(tone, USER_RW, spk_var_show, spk_var_store); 55 __ATTR(tone, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
56static struct kobj_attribute vol_attribute = 56static struct kobj_attribute vol_attribute =
57 __ATTR(vol, USER_RW, spk_var_show, spk_var_store); 57 __ATTR(vol, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
58 58
59static struct kobj_attribute delay_time_attribute = 59static struct kobj_attribute delay_time_attribute =
60 __ATTR(delay_time, ROOT_W, spk_var_show, spk_var_store); 60 __ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
61static struct kobj_attribute direct_attribute = 61static struct kobj_attribute direct_attribute =
62 __ATTR(direct, USER_RW, spk_var_show, spk_var_store); 62 __ATTR(direct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
63static struct kobj_attribute full_time_attribute = 63static struct kobj_attribute full_time_attribute =
64 __ATTR(full_time, ROOT_W, spk_var_show, spk_var_store); 64 __ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
65static struct kobj_attribute jiffy_delta_attribute = 65static struct kobj_attribute jiffy_delta_attribute =
66 __ATTR(jiffy_delta, ROOT_W, spk_var_show, spk_var_store); 66 __ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
67static struct kobj_attribute trigger_time_attribute = 67static struct kobj_attribute trigger_time_attribute =
68 __ATTR(trigger_time, ROOT_W, spk_var_show, spk_var_store); 68 __ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
69 69
70/* 70/*
71 * Create a group of attributes so that we can create and destroy them all 71 * Create a group of attributes so that we can create and destroy them all
diff --git a/fs/fuse/cuse.c b/fs/fuse/cuse.c
index 23e363f38302..13b691a8a7d2 100644
--- a/fs/fuse/cuse.c
+++ b/fs/fuse/cuse.c
@@ -569,7 +569,7 @@ static ssize_t cuse_class_waiting_show(struct device *dev,
569 569
570 return sprintf(buf, "%d\n", atomic_read(&cc->fc.num_waiting)); 570 return sprintf(buf, "%d\n", atomic_read(&cc->fc.num_waiting));
571} 571}
572static DEVICE_ATTR(waiting, S_IFREG | 0400, cuse_class_waiting_show, NULL); 572static DEVICE_ATTR(waiting, 0400, cuse_class_waiting_show, NULL);
573 573
574static ssize_t cuse_class_abort_store(struct device *dev, 574static ssize_t cuse_class_abort_store(struct device *dev,
575 struct device_attribute *attr, 575 struct device_attribute *attr,
@@ -580,7 +580,7 @@ static ssize_t cuse_class_abort_store(struct device *dev,
580 fuse_abort_conn(&cc->fc); 580 fuse_abort_conn(&cc->fc);
581 return count; 581 return count;
582} 582}
583static DEVICE_ATTR(abort, S_IFREG | 0200, NULL, cuse_class_abort_store); 583static DEVICE_ATTR(abort, 0200, NULL, cuse_class_abort_store);
584 584
585static struct attribute *cuse_class_dev_attrs[] = { 585static struct attribute *cuse_class_dev_attrs[] = {
586 &dev_attr_waiting.attr, 586 &dev_attr_waiting.attr,
diff --git a/fs/ocfs2/cluster/sys.c b/fs/ocfs2/cluster/sys.c
index a4b07730b2e1..b7f57271d49c 100644
--- a/fs/ocfs2/cluster/sys.c
+++ b/fs/ocfs2/cluster/sys.c
@@ -41,7 +41,7 @@ static ssize_t version_show(struct kobject *kobj, struct kobj_attribute *attr,
41 return snprintf(buf, PAGE_SIZE, "%u\n", O2NM_API_VERSION); 41 return snprintf(buf, PAGE_SIZE, "%u\n", O2NM_API_VERSION);
42} 42}
43static struct kobj_attribute attr_version = 43static struct kobj_attribute attr_version =
44 __ATTR(interface_revision, S_IFREG | S_IRUGO, version_show, NULL); 44 __ATTR(interface_revision, S_IRUGO, version_show, NULL);
45 45
46static struct attribute *o2cb_attrs[] = { 46static struct attribute *o2cb_attrs[] = {
47 &attr_version.attr, 47 &attr_version.attr,
diff --git a/fs/ocfs2/stackglue.c b/fs/ocfs2/stackglue.c
index 5c8343fe7438..83f1a665ae97 100644
--- a/fs/ocfs2/stackglue.c
+++ b/fs/ocfs2/stackglue.c
@@ -496,7 +496,7 @@ static ssize_t ocfs2_max_locking_protocol_show(struct kobject *kobj,
496} 496}
497 497
498static struct kobj_attribute ocfs2_attr_max_locking_protocol = 498static struct kobj_attribute ocfs2_attr_max_locking_protocol =
499 __ATTR(max_locking_protocol, S_IFREG | S_IRUGO, 499 __ATTR(max_locking_protocol, S_IRUGO,
500 ocfs2_max_locking_protocol_show, NULL); 500 ocfs2_max_locking_protocol_show, NULL);
501 501
502static ssize_t ocfs2_loaded_cluster_plugins_show(struct kobject *kobj, 502static 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,
528} 528}
529 529
530static struct kobj_attribute ocfs2_attr_loaded_cluster_plugins = 530static struct kobj_attribute ocfs2_attr_loaded_cluster_plugins =
531 __ATTR(loaded_cluster_plugins, S_IFREG | S_IRUGO, 531 __ATTR(loaded_cluster_plugins, S_IRUGO,
532 ocfs2_loaded_cluster_plugins_show, NULL); 532 ocfs2_loaded_cluster_plugins_show, NULL);
533 533
534static ssize_t ocfs2_active_cluster_plugin_show(struct kobject *kobj, 534static 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,
550} 550}
551 551
552static struct kobj_attribute ocfs2_attr_active_cluster_plugin = 552static struct kobj_attribute ocfs2_attr_active_cluster_plugin =
553 __ATTR(active_cluster_plugin, S_IFREG | S_IRUGO, 553 __ATTR(active_cluster_plugin, S_IRUGO,
554 ocfs2_active_cluster_plugin_show, NULL); 554 ocfs2_active_cluster_plugin_show, NULL);
555 555
556static ssize_t ocfs2_cluster_stack_show(struct kobject *kobj, 556static ssize_t ocfs2_cluster_stack_show(struct kobject *kobj,
@@ -599,7 +599,7 @@ static ssize_t ocfs2_cluster_stack_store(struct kobject *kobj,
599 599
600 600
601static struct kobj_attribute ocfs2_attr_cluster_stack = 601static struct kobj_attribute ocfs2_attr_cluster_stack =
602 __ATTR(cluster_stack, S_IFREG | S_IRUGO | S_IWUSR, 602 __ATTR(cluster_stack, S_IRUGO | S_IWUSR,
603 ocfs2_cluster_stack_show, 603 ocfs2_cluster_stack_show,
604 ocfs2_cluster_stack_store); 604 ocfs2_cluster_stack_store);
605 605
diff --git a/include/linux/isapnp.h b/include/linux/isapnp.h
index e2d28b026a8c..3c77bf9b1efd 100644
--- a/include/linux/isapnp.h
+++ b/include/linux/isapnp.h
@@ -56,10 +56,6 @@
56#define ISAPNP_DEVICE_ID(_va, _vb, _vc, _function) \ 56#define ISAPNP_DEVICE_ID(_va, _vb, _vc, _function) \
57 { .vendor = ISAPNP_VENDOR(_va, _vb, _vc), .function = ISAPNP_FUNCTION(_function) } 57 { .vendor = ISAPNP_VENDOR(_va, _vb, _vc), .function = ISAPNP_FUNCTION(_function) }
58 58
59/* export used IDs outside module */
60#define ISAPNP_CARD_TABLE(name) \
61 MODULE_GENERIC_TABLE(isapnp_card, name)
62
63struct isapnp_card_id { 59struct isapnp_card_id {
64 unsigned long driver_data; /* data private to the driver */ 60 unsigned long driver_data; /* data private to the driver */
65 unsigned short card_vendor, card_device; 61 unsigned short card_vendor, card_device;
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 08fb02477641..4c52907a6d8b 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -469,6 +469,7 @@ extern enum system_states {
469#define TAINT_CRAP 10 469#define TAINT_CRAP 10
470#define TAINT_FIRMWARE_WORKAROUND 11 470#define TAINT_FIRMWARE_WORKAROUND 11
471#define TAINT_OOT_MODULE 12 471#define TAINT_OOT_MODULE 12
472#define TAINT_UNSIGNED_MODULE 13
472 473
473extern const char hex_asc[]; 474extern const char hex_asc[];
474#define hex_asc_lo(x) hex_asc[((x) & 0x0f)] 475#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) { }
841# define REBUILD_DUE_TO_FTRACE_MCOUNT_RECORD 842# define REBUILD_DUE_TO_FTRACE_MCOUNT_RECORD
842#endif 843#endif
843 844
845/* Permissions on a sysfs file: you didn't miss the 0 prefix did you? */
846#define VERIFY_OCTAL_PERMISSIONS(perms) \
847 (BUILD_BUG_ON_ZERO((perms) < 0) + \
848 BUILD_BUG_ON_ZERO((perms) > 0777) + \
849 /* User perms >= group perms >= other perms */ \
850 BUILD_BUG_ON_ZERO(((perms) >> 6) < (((perms) >> 3) & 7)) + \
851 BUILD_BUG_ON_ZERO((((perms) >> 3) & 7) < ((perms) & 7)) + \
852 (perms))
844#endif 853#endif
diff --git a/include/linux/module.h b/include/linux/module.h
index 5a5053975114..f520a767c86c 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -82,15 +82,6 @@ void sort_extable(struct exception_table_entry *start,
82void sort_main_extable(void); 82void sort_main_extable(void);
83void trim_init_extable(struct module *m); 83void trim_init_extable(struct module *m);
84 84
85#ifdef MODULE
86#define MODULE_GENERIC_TABLE(gtype, name) \
87extern const struct gtype##_id __mod_##gtype##_table \
88 __attribute__ ((unused, alias(__stringify(name))))
89
90#else /* !MODULE */
91#define MODULE_GENERIC_TABLE(gtype, name)
92#endif
93
94/* Generic info of form tag = "info" */ 85/* Generic info of form tag = "info" */
95#define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info) 86#define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)
96 87
@@ -141,8 +132,14 @@ extern const struct gtype##_id __mod_##gtype##_table \
141/* What your module does. */ 132/* What your module does. */
142#define MODULE_DESCRIPTION(_description) MODULE_INFO(description, _description) 133#define MODULE_DESCRIPTION(_description) MODULE_INFO(description, _description)
143 134
144#define MODULE_DEVICE_TABLE(type, name) \ 135#ifdef MODULE
145 MODULE_GENERIC_TABLE(type##_device, name) 136/* Creates an alias so file2alias.c can find device table. */
137#define MODULE_DEVICE_TABLE(type, name) \
138 extern const struct type##_device_id __mod_##type##__##name##_device_table \
139 __attribute__ ((unused, alias(__stringify(name))))
140#else /* !MODULE */
141#define MODULE_DEVICE_TABLE(type, name)
142#endif
146 143
147/* Version of form [<epoch>:]<version>[-<extra-version>]. 144/* Version of form [<epoch>:]<version>[-<extra-version>].
148 * Or for CVS/RCS ID version, everything but the number is stripped. 145 * Or for CVS/RCS ID version, everything but the number is stripped.
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h
index c3eb102a9cc8..204a67743804 100644
--- a/include/linux/moduleparam.h
+++ b/include/linux/moduleparam.h
@@ -186,14 +186,12 @@ struct kparam_array
186 parameters. */ 186 parameters. */
187#define __module_param_call(prefix, name, ops, arg, perm, level) \ 187#define __module_param_call(prefix, name, ops, arg, perm, level) \
188 /* Default value instead of permissions? */ \ 188 /* Default value instead of permissions? */ \
189 static int __param_perm_check_##name __attribute__((unused)) = \ 189 static const char __param_str_##name[] = prefix #name; \
190 BUILD_BUG_ON_ZERO((perm) < 0 || (perm) > 0777 || ((perm) & 2)) \
191 + BUILD_BUG_ON_ZERO(sizeof(""prefix) > MAX_PARAM_PREFIX_LEN); \
192 static const char __param_str_##name[] = prefix #name; \
193 static struct kernel_param __moduleparam_const __param_##name \ 190 static struct kernel_param __moduleparam_const __param_##name \
194 __used \ 191 __used \
195 __attribute__ ((unused,__section__ ("__param"),aligned(sizeof(void *)))) \ 192 __attribute__ ((unused,__section__ ("__param"),aligned(sizeof(void *)))) \
196 = { __param_str_##name, ops, perm, level, { arg } } 193 = { __param_str_##name, ops, VERIFY_OCTAL_PERMISSIONS(perm), \
194 level, { arg } }
197 195
198/* Obsolete - use module_param_cb() */ 196/* Obsolete - use module_param_cb() */
199#define module_param_call(name, set, get, arg, perm) \ 197#define module_param_call(name, set, get, arg, perm) \
@@ -346,7 +344,7 @@ static inline void destroy_params(const struct kernel_param *params,
346/* The macros to do compile-time type checking stolen from Jakub 344/* The macros to do compile-time type checking stolen from Jakub
347 Jelinek, who IIRC came up with this idea for the 2.4 module init code. */ 345 Jelinek, who IIRC came up with this idea for the 2.4 module init code. */
348#define __param_check(name, p, type) \ 346#define __param_check(name, p, type) \
349 static inline type *__check_##name(void) { return(p); } 347 static inline type __always_unused *__check_##name(void) { return(p); }
350 348
351extern struct kernel_param_ops param_ops_byte; 349extern struct kernel_param_ops param_ops_byte;
352extern int param_set_byte(const char *val, const struct kernel_param *kp); 350extern int param_set_byte(const char *val, const struct kernel_param *kp);
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index e0bf210ddffd..084354b0e814 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -71,7 +71,8 @@ struct attribute_group {
71 */ 71 */
72 72
73#define __ATTR(_name, _mode, _show, _store) { \ 73#define __ATTR(_name, _mode, _show, _store) { \
74 .attr = {.name = __stringify(_name), .mode = _mode }, \ 74 .attr = {.name = __stringify(_name), \
75 .mode = VERIFY_OCTAL_PERMISSIONS(_mode) }, \
75 .show = _show, \ 76 .show = _show, \
76 .store = _store, \ 77 .store = _store, \
77} 78}
diff --git a/include/trace/events/module.h b/include/trace/events/module.h
index 161932737416..11fd51b413de 100644
--- a/include/trace/events/module.h
+++ b/include/trace/events/module.h
@@ -22,8 +22,10 @@ struct module;
22 22
23#define show_module_flags(flags) __print_flags(flags, "", \ 23#define show_module_flags(flags) __print_flags(flags, "", \
24 { (1UL << TAINT_PROPRIETARY_MODULE), "P" }, \ 24 { (1UL << TAINT_PROPRIETARY_MODULE), "P" }, \
25 { (1UL << TAINT_OOT_MODULE), "O" }, \
25 { (1UL << TAINT_FORCED_MODULE), "F" }, \ 26 { (1UL << TAINT_FORCED_MODULE), "F" }, \
26 { (1UL << TAINT_CRAP), "C" }) 27 { (1UL << TAINT_CRAP), "C" }, \
28 { (1UL << TAINT_UNSIGNED_MODULE), "X" })
27 29
28TRACE_EVENT(module_load, 30TRACE_EVENT(module_load,
29 31
diff --git a/kernel/module.c b/kernel/module.c
index 8dc7f5e80dd8..29f7790eaa14 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -1013,6 +1013,8 @@ static size_t module_flags_taint(struct module *mod, char *buf)
1013 buf[l++] = 'F'; 1013 buf[l++] = 'F';
1014 if (mod->taints & (1 << TAINT_CRAP)) 1014 if (mod->taints & (1 << TAINT_CRAP))
1015 buf[l++] = 'C'; 1015 buf[l++] = 'C';
1016 if (mod->taints & (1 << TAINT_UNSIGNED_MODULE))
1017 buf[l++] = 'E';
1016 /* 1018 /*
1017 * TAINT_FORCED_RMMOD: could be added. 1019 * TAINT_FORCED_RMMOD: could be added.
1018 * TAINT_CPU_OUT_OF_SPEC, TAINT_MACHINE_CHECK, TAINT_BAD_PAGE don't 1020 * 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,
3218 pr_notice_once("%s: module verification failed: signature " 3220 pr_notice_once("%s: module verification failed: signature "
3219 "and/or required key missing - tainting " 3221 "and/or required key missing - tainting "
3220 "kernel\n", mod->name); 3222 "kernel\n", mod->name);
3221 add_taint_module(mod, TAINT_FORCED_MODULE, LOCKDEP_STILL_OK); 3223 add_taint_module(mod, TAINT_UNSIGNED_MODULE, LOCKDEP_STILL_OK);
3222 } 3224 }
3223#endif 3225#endif
3224 3226
@@ -3813,12 +3815,12 @@ void print_modules(void)
3813 list_for_each_entry_rcu(mod, &modules, list) { 3815 list_for_each_entry_rcu(mod, &modules, list) {
3814 if (mod->state == MODULE_STATE_UNFORMED) 3816 if (mod->state == MODULE_STATE_UNFORMED)
3815 continue; 3817 continue;
3816 printk(" %s%s", mod->name, module_flags(mod, buf)); 3818 pr_cont(" %s%s", mod->name, module_flags(mod, buf));
3817 } 3819 }
3818 preempt_enable(); 3820 preempt_enable();
3819 if (last_unloaded_module[0]) 3821 if (last_unloaded_module[0])
3820 printk(" [last unloaded: %s]", last_unloaded_module); 3822 pr_cont(" [last unloaded: %s]", last_unloaded_module);
3821 printk("\n"); 3823 pr_cont("\n");
3822} 3824}
3823 3825
3824#ifdef CONFIG_MODVERSIONS 3826#ifdef CONFIG_MODVERSIONS
diff --git a/kernel/panic.c b/kernel/panic.c
index cca8a913ae7c..79fd820bb5e8 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -210,6 +210,7 @@ static const struct tnt tnts[] = {
210 { TAINT_CRAP, 'C', ' ' }, 210 { TAINT_CRAP, 'C', ' ' },
211 { TAINT_FIRMWARE_WORKAROUND, 'I', ' ' }, 211 { TAINT_FIRMWARE_WORKAROUND, 'I', ' ' },
212 { TAINT_OOT_MODULE, 'O', ' ' }, 212 { TAINT_OOT_MODULE, 'O', ' ' },
213 { TAINT_UNSIGNED_MODULE, 'E', ' ' },
213}; 214};
214 215
215/** 216/**
@@ -228,6 +229,7 @@ static const struct tnt tnts[] = {
228 * 'C' - modules from drivers/staging are loaded. 229 * 'C' - modules from drivers/staging are loaded.
229 * 'I' - Working around severe firmware bug. 230 * 'I' - Working around severe firmware bug.
230 * 'O' - Out-of-tree module has been loaded. 231 * 'O' - Out-of-tree module has been loaded.
232 * 'E' - Unsigned module has been loaded.
231 * 233 *
232 * The string is overwritten by the next call to print_tainted(). 234 * The string is overwritten by the next call to print_tainted().
233 */ 235 */
diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c
index 50f8329c2042..fb0a38a26555 100644
--- a/kernel/tracepoint.c
+++ b/kernel/tracepoint.c
@@ -460,7 +460,8 @@ EXPORT_SYMBOL_GPL(tracepoint_probe_unregister);
460#ifdef CONFIG_MODULES 460#ifdef CONFIG_MODULES
461bool trace_module_has_bad_taint(struct module *mod) 461bool trace_module_has_bad_taint(struct module *mod)
462{ 462{
463 return mod->taints & ~((1 << TAINT_OOT_MODULE) | (1 << TAINT_CRAP)); 463 return mod->taints & ~((1 << TAINT_OOT_MODULE) | (1 << TAINT_CRAP) |
464 (1 << TAINT_UNSIGNED_MODULE));
464} 465}
465 466
466static int tracepoint_module_coming(struct module *mod) 467static int tracepoint_module_coming(struct module *mod)
@@ -474,7 +475,7 @@ static int tracepoint_module_coming(struct module *mod)
474 /* 475 /*
475 * We skip modules that taint the kernel, especially those with different 476 * We skip modules that taint the kernel, especially those with different
476 * module headers (for forced load), to make sure we don't cause a crash. 477 * module headers (for forced load), to make sure we don't cause a crash.
477 * Staging and out-of-tree GPL modules are fine. 478 * Staging, out-of-tree, and unsigned GPL modules are fine.
478 */ 479 */
479 if (trace_module_has_bad_taint(mod)) 480 if (trace_module_has_bad_taint(mod))
480 return 0; 481 return 0;
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index 10085de886fe..1237dd7fb4ca 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -36,13 +36,13 @@ struct sym_entry {
36 unsigned char *sym; 36 unsigned char *sym;
37}; 37};
38 38
39struct text_range { 39struct addr_range {
40 const char *stext, *etext; 40 const char *start_sym, *end_sym;
41 unsigned long long start, end; 41 unsigned long long start, end;
42}; 42};
43 43
44static unsigned long long _text; 44static unsigned long long _text;
45static struct text_range text_ranges[] = { 45static struct addr_range text_ranges[] = {
46 { "_stext", "_etext" }, 46 { "_stext", "_etext" },
47 { "_sinittext", "_einittext" }, 47 { "_sinittext", "_einittext" },
48 { "_stext_l1", "_etext_l1" }, /* Blackfin on-chip L1 inst SRAM */ 48 { "_stext_l1", "_etext_l1" }, /* Blackfin on-chip L1 inst SRAM */
@@ -51,9 +51,14 @@ static struct text_range text_ranges[] = {
51#define text_range_text (&text_ranges[0]) 51#define text_range_text (&text_ranges[0])
52#define text_range_inittext (&text_ranges[1]) 52#define text_range_inittext (&text_ranges[1])
53 53
54static struct addr_range percpu_range = {
55 "__per_cpu_start", "__per_cpu_end", -1ULL, 0
56};
57
54static struct sym_entry *table; 58static struct sym_entry *table;
55static unsigned int table_size, table_cnt; 59static unsigned int table_size, table_cnt;
56static int all_symbols = 0; 60static int all_symbols = 0;
61static int absolute_percpu = 0;
57static char symbol_prefix_char = '\0'; 62static char symbol_prefix_char = '\0';
58static unsigned long long kernel_start_addr = 0; 63static unsigned long long kernel_start_addr = 0;
59 64
@@ -83,19 +88,20 @@ static inline int is_arm_mapping_symbol(const char *str)
83 && (str[2] == '\0' || str[2] == '.'); 88 && (str[2] == '\0' || str[2] == '.');
84} 89}
85 90
86static int read_symbol_tr(const char *sym, unsigned long long addr) 91static int check_symbol_range(const char *sym, unsigned long long addr,
92 struct addr_range *ranges, int entries)
87{ 93{
88 size_t i; 94 size_t i;
89 struct text_range *tr; 95 struct addr_range *ar;
90 96
91 for (i = 0; i < ARRAY_SIZE(text_ranges); ++i) { 97 for (i = 0; i < entries; ++i) {
92 tr = &text_ranges[i]; 98 ar = &ranges[i];
93 99
94 if (strcmp(sym, tr->stext) == 0) { 100 if (strcmp(sym, ar->start_sym) == 0) {
95 tr->start = addr; 101 ar->start = addr;
96 return 0; 102 return 0;
97 } else if (strcmp(sym, tr->etext) == 0) { 103 } else if (strcmp(sym, ar->end_sym) == 0) {
98 tr->end = addr; 104 ar->end = addr;
99 return 0; 105 return 0;
100 } 106 }
101 } 107 }
@@ -130,7 +136,8 @@ static int read_symbol(FILE *in, struct sym_entry *s)
130 /* Ignore most absolute/undefined (?) symbols. */ 136 /* Ignore most absolute/undefined (?) symbols. */
131 if (strcmp(sym, "_text") == 0) 137 if (strcmp(sym, "_text") == 0)
132 _text = s->addr; 138 _text = s->addr;
133 else if (read_symbol_tr(sym, s->addr) == 0) 139 else if (check_symbol_range(sym, s->addr, text_ranges,
140 ARRAY_SIZE(text_ranges)) == 0)
134 /* nothing to do */; 141 /* nothing to do */;
135 else if (toupper(stype) == 'A') 142 else if (toupper(stype) == 'A')
136 { 143 {
@@ -164,18 +171,22 @@ static int read_symbol(FILE *in, struct sym_entry *s)
164 strcpy((char *)s->sym + 1, str); 171 strcpy((char *)s->sym + 1, str);
165 s->sym[0] = stype; 172 s->sym[0] = stype;
166 173
174 /* Record if we've found __per_cpu_start/end. */
175 check_symbol_range(sym, s->addr, &percpu_range, 1);
176
167 return 0; 177 return 0;
168} 178}
169 179
170static int symbol_valid_tr(struct sym_entry *s) 180static int symbol_in_range(struct sym_entry *s, struct addr_range *ranges,
181 int entries)
171{ 182{
172 size_t i; 183 size_t i;
173 struct text_range *tr; 184 struct addr_range *ar;
174 185
175 for (i = 0; i < ARRAY_SIZE(text_ranges); ++i) { 186 for (i = 0; i < entries; ++i) {
176 tr = &text_ranges[i]; 187 ar = &ranges[i];
177 188
178 if (s->addr >= tr->start && s->addr <= tr->end) 189 if (s->addr >= ar->start && s->addr <= ar->end)
179 return 1; 190 return 1;
180 } 191 }
181 192
@@ -214,7 +225,8 @@ static int symbol_valid(struct sym_entry *s)
214 /* if --all-symbols is not specified, then symbols outside the text 225 /* if --all-symbols is not specified, then symbols outside the text
215 * and inittext sections are discarded */ 226 * and inittext sections are discarded */
216 if (!all_symbols) { 227 if (!all_symbols) {
217 if (symbol_valid_tr(s) == 0) 228 if (symbol_in_range(s, text_ranges,
229 ARRAY_SIZE(text_ranges)) == 0)
218 return 0; 230 return 0;
219 /* Corner case. Discard any symbols with the same value as 231 /* Corner case. Discard any symbols with the same value as
220 * _etext _einittext; they can move between pass 1 and 2 when 232 * _etext _einittext; they can move between pass 1 and 2 when
@@ -223,9 +235,11 @@ static int symbol_valid(struct sym_entry *s)
223 * rules. 235 * rules.
224 */ 236 */
225 if ((s->addr == text_range_text->end && 237 if ((s->addr == text_range_text->end &&
226 strcmp((char *)s->sym + offset, text_range_text->etext)) || 238 strcmp((char *)s->sym + offset,
239 text_range_text->end_sym)) ||
227 (s->addr == text_range_inittext->end && 240 (s->addr == text_range_inittext->end &&
228 strcmp((char *)s->sym + offset, text_range_inittext->etext))) 241 strcmp((char *)s->sym + offset,
242 text_range_inittext->end_sym)))
229 return 0; 243 return 0;
230 } 244 }
231 245
@@ -298,6 +312,11 @@ static int expand_symbol(unsigned char *data, int len, char *result)
298 return total; 312 return total;
299} 313}
300 314
315static int symbol_absolute(struct sym_entry *s)
316{
317 return toupper(s->sym[0]) == 'A';
318}
319
301static void write_src(void) 320static void write_src(void)
302{ 321{
303 unsigned int i, k, off; 322 unsigned int i, k, off;
@@ -325,7 +344,7 @@ static void write_src(void)
325 */ 344 */
326 output_label("kallsyms_addresses"); 345 output_label("kallsyms_addresses");
327 for (i = 0; i < table_cnt; i++) { 346 for (i = 0; i < table_cnt; i++) {
328 if (toupper(table[i].sym[0]) != 'A') { 347 if (!symbol_absolute(&table[i])) {
329 if (_text <= table[i].addr) 348 if (_text <= table[i].addr)
330 printf("\tPTR\t_text + %#llx\n", 349 printf("\tPTR\t_text + %#llx\n",
331 table[i].addr - _text); 350 table[i].addr - _text);
@@ -646,6 +665,15 @@ static void sort_symbols(void)
646 qsort(table, table_cnt, sizeof(struct sym_entry), compare_symbols); 665 qsort(table, table_cnt, sizeof(struct sym_entry), compare_symbols);
647} 666}
648 667
668static void make_percpus_absolute(void)
669{
670 unsigned int i;
671
672 for (i = 0; i < table_cnt; i++)
673 if (symbol_in_range(&table[i], &percpu_range, 1))
674 table[i].sym[0] = 'A';
675}
676
649int main(int argc, char **argv) 677int main(int argc, char **argv)
650{ 678{
651 if (argc >= 2) { 679 if (argc >= 2) {
@@ -653,6 +681,8 @@ int main(int argc, char **argv)
653 for (i = 1; i < argc; i++) { 681 for (i = 1; i < argc; i++) {
654 if(strcmp(argv[i], "--all-symbols") == 0) 682 if(strcmp(argv[i], "--all-symbols") == 0)
655 all_symbols = 1; 683 all_symbols = 1;
684 else if (strcmp(argv[i], "--absolute-percpu") == 0)
685 absolute_percpu = 1;
656 else if (strncmp(argv[i], "--symbol-prefix=", 16) == 0) { 686 else if (strncmp(argv[i], "--symbol-prefix=", 16) == 0) {
657 char *p = &argv[i][16]; 687 char *p = &argv[i][16];
658 /* skip quote */ 688 /* skip quote */
@@ -669,6 +699,8 @@ int main(int argc, char **argv)
669 usage(); 699 usage();
670 700
671 read_map(stdin); 701 read_map(stdin);
702 if (absolute_percpu)
703 make_percpus_absolute();
672 sort_symbols(); 704 sort_symbols();
673 optimize_token_table(); 705 optimize_token_table();
674 write_src(); 706 write_src();
diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
index 2dcb37736d84..86a4fe75f453 100644
--- a/scripts/link-vmlinux.sh
+++ b/scripts/link-vmlinux.sh
@@ -86,6 +86,10 @@ kallsyms()
86 kallsymopt="${kallsymopt} --page-offset=$CONFIG_PAGE_OFFSET" 86 kallsymopt="${kallsymopt} --page-offset=$CONFIG_PAGE_OFFSET"
87 fi 87 fi
88 88
89 if [ -n "${CONFIG_X86_64}" ]; then
90 kallsymopt="${kallsymopt} --absolute-percpu"
91 fi
92
89 local aflags="${KBUILD_AFLAGS} ${KBUILD_AFLAGS_KERNEL} \ 93 local aflags="${KBUILD_AFLAGS} ${KBUILD_AFLAGS_KERNEL} \
90 ${NOSTDINC_FLAGS} ${LINUXINCLUDE} ${KBUILD_CPPFLAGS}" 94 ${NOSTDINC_FLAGS} ${LINUXINCLUDE} ${KBUILD_CPPFLAGS}"
91 95
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index 25f6f5970552..1924990a737f 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -42,7 +42,7 @@ typedef unsigned char __u8;
42 42
43/* This array collects all instances that use the generic do_table */ 43/* This array collects all instances that use the generic do_table */
44struct devtable { 44struct devtable {
45 const char *device_id; /* name of table, __mod_<name>_device_table. */ 45 const char *device_id; /* name of table, __mod_<name>__*_device_table. */
46 unsigned long id_size; 46 unsigned long id_size;
47 void *function; 47 void *function;
48}; 48};
@@ -146,7 +146,8 @@ static void device_id_check(const char *modname, const char *device_id,
146 146
147 if (size % id_size || size < id_size) { 147 if (size % id_size || size < id_size) {
148 fatal("%s: sizeof(struct %s_device_id)=%lu is not a modulo " 148 fatal("%s: sizeof(struct %s_device_id)=%lu is not a modulo "
149 "of the size of section __mod_%s_device_table=%lu.\n" 149 "of the size of "
150 "section __mod_%s__<identifier>_device_table=%lu.\n"
150 "Fix definition of struct %s_device_id " 151 "Fix definition of struct %s_device_id "
151 "in mod_devicetable.h\n", 152 "in mod_devicetable.h\n",
152 modname, device_id, id_size, device_id, size, device_id); 153 modname, device_id, id_size, device_id, size, device_id);
@@ -1216,7 +1217,7 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,
1216{ 1217{
1217 void *symval; 1218 void *symval;
1218 char *zeros = NULL; 1219 char *zeros = NULL;
1219 const char *name; 1220 const char *name, *identifier;
1220 unsigned int namelen; 1221 unsigned int namelen;
1221 1222
1222 /* We're looking for a section relative symbol */ 1223 /* We're looking for a section relative symbol */
@@ -1227,7 +1228,7 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,
1227 if (ELF_ST_TYPE(sym->st_info) != STT_OBJECT) 1228 if (ELF_ST_TYPE(sym->st_info) != STT_OBJECT)
1228 return; 1229 return;
1229 1230
1230 /* All our symbols are of form <prefix>__mod_XXX_device_table. */ 1231 /* All our symbols are of form <prefix>__mod_<name>__<identifier>_device_table. */
1231 name = strstr(symname, "__mod_"); 1232 name = strstr(symname, "__mod_");
1232 if (!name) 1233 if (!name)
1233 return; 1234 return;
@@ -1237,7 +1238,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,
1237 return; 1238 return;
1238 if (strcmp(name + namelen - strlen("_device_table"), "_device_table")) 1239 if (strcmp(name + namelen - strlen("_device_table"), "_device_table"))
1239 return; 1240 return;
1240 namelen -= strlen("_device_table"); 1241 identifier = strstr(name, "__");
1242 if (!identifier)
1243 return;
1244 namelen = identifier - name;
1241 1245
1242 /* Handle all-NULL symbols allocated into .bss */ 1246 /* Handle all-NULL symbols allocated into .bss */
1243 if (info->sechdrs[get_secindex(info, sym)].sh_type & SHT_NOBITS) { 1247 if (info->sechdrs[get_secindex(info, sym)].sh_type & SHT_NOBITS) {