diff options
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 | |||
| 268 | The primary reason for the 'Tainted: ' string is to tell kernel | 271 | The primary reason for the 'Tainted: ' string is to tell kernel |
| 269 | debuggers if this is a clean kernel or if anything unusual has | 272 | debuggers if this is a clean kernel or if anything unusual has |
| 270 | occurred. Tainting is permanent: even if an offending module is | 273 | occurred. 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: | |||
| 785 | 1024 - A module from drivers/staging was loaded. | 785 | 1024 - A module from drivers/staging was loaded. |
| 786 | 2048 - The system is working around a severe firmware bug. | 786 | 2048 - The system is working around a severe firmware bug. |
| 787 | 4096 - An out-of-tree module has been loaded. | 787 | 4096 - An out-of-tree module has been loaded. |
| 788 | 8192 - 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 | ||
| 118 | static struct pci_slot_attribute pci_slot_attr_address = | 118 | static 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); |
| 120 | static struct pci_slot_attribute pci_slot_attr_max_speed = | 120 | static 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); |
| 122 | static struct pci_slot_attribute pci_slot_attr_cur_speed = | 122 | static 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 | ||
| 125 | static struct attribute *pci_slot_default_attrs[] = { | 125 | static 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 | */ |
| 853 | static struct kobj_attribute keymap_attribute = | 853 | static 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); |
| 855 | static struct kobj_attribute silent_attribute = | 855 | static struct kobj_attribute silent_attribute = |
| 856 | __ATTR(silent, USER_W, NULL, silent_store); | 856 | __ATTR(silent, S_IWUGO, NULL, silent_store); |
| 857 | static struct kobj_attribute synth_attribute = | 857 | static 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); |
| 859 | static struct kobj_attribute synth_direct_attribute = | 859 | static 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); |
| 861 | static struct kobj_attribute version_attribute = | 861 | static struct kobj_attribute version_attribute = |
| 862 | __ATTR_RO(version); | 862 | __ATTR_RO(version); |
| 863 | 863 | ||
| 864 | static struct kobj_attribute delimiters_attribute = | 864 | static 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); |
| 866 | static struct kobj_attribute ex_num_attribute = | 866 | static 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); |
| 868 | static struct kobj_attribute punc_all_attribute = | 868 | static 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); |
| 870 | static struct kobj_attribute punc_most_attribute = | 870 | static 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); |
| 872 | static struct kobj_attribute punc_some_attribute = | 872 | static 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); |
| 874 | static struct kobj_attribute repeats_attribute = | 874 | static 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 | ||
| 877 | static struct kobj_attribute attrib_bleep_attribute = | 877 | static 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); |
| 879 | static struct kobj_attribute bell_pos_attribute = | 879 | static 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); |
| 881 | static struct kobj_attribute bleep_time_attribute = | 881 | static 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); |
| 883 | static struct kobj_attribute bleeps_attribute = | 883 | static 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); |
| 885 | static struct kobj_attribute cursor_time_attribute = | 885 | static 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); |
| 887 | static struct kobj_attribute key_echo_attribute = | 887 | static 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); |
| 889 | static struct kobj_attribute no_interrupt_attribute = | 889 | static 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); |
| 891 | static struct kobj_attribute punc_level_attribute = | 891 | static 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); |
| 893 | static struct kobj_attribute reading_punc_attribute = | 893 | static 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); |
| 895 | static struct kobj_attribute say_control_attribute = | 895 | static 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); |
| 897 | static struct kobj_attribute say_word_ctl_attribute = | 897 | static 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); |
| 899 | static struct kobj_attribute spell_delay_attribute = | 899 | static 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 | */ |
| 905 | static struct kobj_attribute announcements_attribute = | 905 | static 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); |
| 907 | static struct kobj_attribute characters_attribute = | 907 | static 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); |
| 909 | static struct kobj_attribute chartab_attribute = | 909 | static 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); |
| 911 | static struct kobj_attribute ctl_keys_attribute = | 911 | static 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); |
| 913 | static struct kobj_attribute colors_attribute = | 913 | static 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); |
| 915 | static struct kobj_attribute formatted_attribute = | 915 | static 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); |
| 917 | static struct kobj_attribute function_names_attribute = | 917 | static 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); |
| 919 | static struct kobj_attribute key_names_attribute = | 919 | static 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); |
| 921 | static struct kobj_attribute states_attribute = | 921 | static 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 | */ |
| 64 | static struct kobj_attribute caps_start_attribute = | 64 | static 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); |
| 66 | static struct kobj_attribute caps_stop_attribute = | 66 | static 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); |
| 68 | static struct kobj_attribute pitch_attribute = | 68 | static 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); |
| 70 | static struct kobj_attribute rate_attribute = | 70 | static 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); |
| 72 | static struct kobj_attribute tone_attribute = | 72 | static 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); |
| 74 | static struct kobj_attribute vol_attribute = | 74 | static 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 | ||
| 77 | static struct kobj_attribute delay_time_attribute = | 77 | static 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); |
| 79 | static struct kobj_attribute direct_attribute = | 79 | static 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); |
| 81 | static struct kobj_attribute full_time_attribute = | 81 | static 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); |
| 83 | static struct kobj_attribute jiffy_delta_attribute = | 83 | static 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); |
| 85 | static struct kobj_attribute trigger_time_attribute = | 85 | static 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 | */ |
| 49 | static struct kobj_attribute caps_start_attribute = | 49 | static 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); |
| 51 | static struct kobj_attribute caps_stop_attribute = | 51 | static 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); |
| 53 | static struct kobj_attribute pitch_attribute = | 53 | static 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); |
| 55 | static struct kobj_attribute rate_attribute = | 55 | static 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); |
| 57 | static struct kobj_attribute tone_attribute = | 57 | static 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); |
| 59 | static struct kobj_attribute vol_attribute = | 59 | static 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 | ||
| 62 | static struct kobj_attribute delay_time_attribute = | 62 | static 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); |
| 64 | static struct kobj_attribute direct_attribute = | 64 | static 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); |
| 66 | static struct kobj_attribute full_time_attribute = | 66 | static 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); |
| 68 | static struct kobj_attribute jiffy_delta_attribute = | 68 | static 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); |
| 70 | static struct kobj_attribute trigger_time_attribute = | 70 | static 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 | */ |
| 55 | static struct kobj_attribute caps_start_attribute = | 55 | static 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); |
| 57 | static struct kobj_attribute caps_stop_attribute = | 57 | static 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); |
| 59 | static struct kobj_attribute lang_attribute = | 59 | static 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); |
| 61 | static struct kobj_attribute pitch_attribute = | 61 | static 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); |
| 63 | static struct kobj_attribute rate_attribute = | 63 | static 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); |
| 65 | static struct kobj_attribute voice_attribute = | 65 | static 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); |
| 67 | static struct kobj_attribute vol_attribute = | 67 | static 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 | ||
| 70 | static struct kobj_attribute delay_time_attribute = | 70 | static 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); |
| 72 | static struct kobj_attribute direct_attribute = | 72 | static 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); |
| 74 | static struct kobj_attribute full_time_attribute = | 74 | static 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); |
| 76 | static struct kobj_attribute jiffy_delta_attribute = | 76 | static 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); |
| 78 | static struct kobj_attribute trigger_time_attribute = | 78 | static 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 | */ |
| 51 | static struct kobj_attribute caps_start_attribute = | 51 | static 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); |
| 53 | static struct kobj_attribute caps_stop_attribute = | 53 | static 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); |
| 55 | static struct kobj_attribute pitch_attribute = | 55 | static 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); |
| 57 | static struct kobj_attribute punct_attribute = | 57 | static 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); |
| 59 | static struct kobj_attribute rate_attribute = | 59 | static 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); |
| 61 | static struct kobj_attribute tone_attribute = | 61 | static 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); |
| 63 | static struct kobj_attribute vol_attribute = | 63 | static 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 | ||
| 66 | static struct kobj_attribute delay_time_attribute = | 66 | static 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); |
| 68 | static struct kobj_attribute direct_attribute = | 68 | static 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); |
| 70 | static struct kobj_attribute full_time_attribute = | 70 | static 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); |
| 72 | static struct kobj_attribute jiffy_delta_attribute = | 72 | static 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); |
| 74 | static struct kobj_attribute trigger_time_attribute = | 74 | static 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 | */ |
| 46 | static struct kobj_attribute caps_start_attribute = | 46 | static 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); |
| 48 | static struct kobj_attribute caps_stop_attribute = | 48 | static 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); |
| 50 | static struct kobj_attribute pitch_attribute = | 50 | static 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); |
| 52 | static struct kobj_attribute rate_attribute = | 52 | static 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); |
| 54 | static struct kobj_attribute tone_attribute = | 54 | static 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); |
| 56 | static struct kobj_attribute vol_attribute = | 56 | static 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 | ||
| 59 | static struct kobj_attribute delay_time_attribute = | 59 | static 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); |
| 61 | static struct kobj_attribute direct_attribute = | 61 | static 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); |
| 63 | static struct kobj_attribute full_time_attribute = | 63 | static 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); |
| 65 | static struct kobj_attribute jiffy_delta_attribute = | 65 | static 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); |
| 67 | static struct kobj_attribute trigger_time_attribute = | 67 | static 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 | */ |
| 72 | static struct kobj_attribute caps_start_attribute = | 72 | static 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); |
| 74 | static struct kobj_attribute caps_stop_attribute = | 74 | static 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); |
| 76 | static struct kobj_attribute pitch_attribute = | 76 | static 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); |
| 78 | static struct kobj_attribute punct_attribute = | 78 | static 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); |
| 80 | static struct kobj_attribute rate_attribute = | 80 | static 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); |
| 82 | static struct kobj_attribute voice_attribute = | 82 | static 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); |
| 84 | static struct kobj_attribute vol_attribute = | 84 | static 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 | ||
| 87 | static struct kobj_attribute delay_time_attribute = | 87 | static 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); |
| 89 | static struct kobj_attribute direct_attribute = | 89 | static 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); |
| 91 | static struct kobj_attribute full_time_attribute = | 91 | static 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); |
| 93 | static struct kobj_attribute jiffy_delta_attribute = | 93 | static 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); |
| 95 | static struct kobj_attribute trigger_time_attribute = | 95 | static 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 | */ |
| 166 | static struct kobj_attribute caps_start_attribute = | 166 | static 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); |
| 168 | static struct kobj_attribute caps_stop_attribute = | 168 | static 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); |
| 170 | static struct kobj_attribute pitch_attribute = | 170 | static 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); |
| 172 | static struct kobj_attribute punct_attribute = | 172 | static 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); |
| 174 | static struct kobj_attribute rate_attribute = | 174 | static 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); |
| 176 | static struct kobj_attribute voice_attribute = | 176 | static 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); |
| 178 | static struct kobj_attribute vol_attribute = | 178 | static 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 | ||
| 181 | static struct kobj_attribute delay_time_attribute = | 181 | static 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); |
| 183 | static struct kobj_attribute direct_attribute = | 183 | static 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); |
| 185 | static struct kobj_attribute full_time_attribute = | 185 | static 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); |
| 187 | static struct kobj_attribute jiffy_delta_attribute = | 187 | static 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); |
| 189 | static struct kobj_attribute trigger_time_attribute = | 189 | static 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 | */ |
| 72 | static struct kobj_attribute caps_start_attribute = | 72 | static 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); |
| 74 | static struct kobj_attribute caps_stop_attribute = | 74 | static 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); |
| 76 | static struct kobj_attribute pitch_attribute = | 76 | static 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); |
| 78 | static struct kobj_attribute punct_attribute = | 78 | static 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); |
| 80 | static struct kobj_attribute rate_attribute = | 80 | static 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); |
| 82 | static struct kobj_attribute voice_attribute = | 82 | static 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); |
| 84 | static struct kobj_attribute vol_attribute = | 84 | static 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 | ||
| 87 | static struct kobj_attribute delay_time_attribute = | 87 | static 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); |
| 89 | static struct kobj_attribute direct_attribute = | 89 | static 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); |
| 91 | static struct kobj_attribute full_time_attribute = | 91 | static 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); |
| 93 | static struct kobj_attribute jiffy_delta_attribute = | 93 | static 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); |
| 95 | static struct kobj_attribute trigger_time_attribute = | 95 | static 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 | */ |
| 69 | static struct kobj_attribute caps_start_attribute = | 69 | static 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); |
| 71 | static struct kobj_attribute caps_stop_attribute = | 71 | static 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); |
| 73 | static struct kobj_attribute freq_attribute = | 73 | static 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); |
| 75 | static struct kobj_attribute pitch_attribute = | 75 | static 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); |
| 77 | static struct kobj_attribute punct_attribute = | 77 | static 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); |
| 79 | static struct kobj_attribute rate_attribute = | 79 | static 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); |
| 81 | static struct kobj_attribute tone_attribute = | 81 | static 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); |
| 83 | static struct kobj_attribute voice_attribute = | 83 | static 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); |
| 85 | static struct kobj_attribute vol_attribute = | 85 | static 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 | ||
| 88 | static struct kobj_attribute delay_time_attribute = | 88 | static 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); |
| 90 | static struct kobj_attribute direct_attribute = | 90 | static 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); |
| 92 | static struct kobj_attribute full_time_attribute = | 92 | static 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); |
| 94 | static struct kobj_attribute jiffy_delta_attribute = | 94 | static 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); |
| 96 | static struct kobj_attribute trigger_time_attribute = | 96 | static 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 | */ |
| 48 | static struct kobj_attribute caps_start_attribute = | 48 | static 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); |
| 50 | static struct kobj_attribute caps_stop_attribute = | 50 | static 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); |
| 52 | static struct kobj_attribute pitch_attribute = | 52 | static 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); |
| 54 | static struct kobj_attribute rate_attribute = | 54 | static 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); |
| 56 | static struct kobj_attribute tone_attribute = | 56 | static 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); |
| 58 | static struct kobj_attribute vol_attribute = | 58 | static 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 | ||
| 61 | static struct kobj_attribute delay_time_attribute = | 61 | static 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); |
| 63 | static struct kobj_attribute direct_attribute = | 63 | static 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); |
| 65 | static struct kobj_attribute full_time_attribute = | 65 | static 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); |
| 67 | static struct kobj_attribute jiffy_delta_attribute = | 67 | static 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); |
| 69 | static struct kobj_attribute trigger_time_attribute = | 69 | static 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 | */ |
| 61 | static struct kobj_attribute caps_start_attribute = | 61 | static 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); |
| 63 | static struct kobj_attribute caps_stop_attribute = | 63 | static 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); |
| 65 | static struct kobj_attribute pitch_attribute = | 65 | static 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); |
| 67 | static struct kobj_attribute rate_attribute = | 67 | static 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 | ||
| 70 | static struct kobj_attribute delay_time_attribute = | 70 | static 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); |
| 72 | static struct kobj_attribute direct_attribute = | 72 | static 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); |
| 74 | static struct kobj_attribute full_time_attribute = | 74 | static 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); |
| 76 | static struct kobj_attribute jiffy_delta_attribute = | 76 | static 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); |
| 78 | static struct kobj_attribute trigger_time_attribute = | 78 | static 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 | */ |
| 52 | static struct kobj_attribute caps_start_attribute = | 52 | static 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); |
| 54 | static struct kobj_attribute caps_stop_attribute = | 54 | static 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); |
| 56 | static struct kobj_attribute freq_attribute = | 56 | static 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); |
| 58 | static struct kobj_attribute pitch_attribute = | 58 | static 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); |
| 60 | static struct kobj_attribute punct_attribute = | 60 | static 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); |
| 62 | static struct kobj_attribute rate_attribute = | 62 | static 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); |
| 64 | static struct kobj_attribute tone_attribute = | 64 | static 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); |
| 66 | static struct kobj_attribute voice_attribute = | 66 | static 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); |
| 68 | static struct kobj_attribute vol_attribute = | 68 | static 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 | ||
| 71 | static struct kobj_attribute delay_time_attribute = | 71 | static 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); |
| 73 | static struct kobj_attribute direct_attribute = | 73 | static 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); |
| 75 | static struct kobj_attribute full_time_attribute = | 75 | static 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); |
| 77 | static struct kobj_attribute jiffy_delta_attribute = | 77 | static 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); |
| 79 | static struct kobj_attribute trigger_time_attribute = | 79 | static 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 | */ |
| 63 | static struct kobj_attribute caps_start_attribute = | 63 | static 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); |
| 65 | static struct kobj_attribute caps_stop_attribute = | 65 | static 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); |
| 67 | static struct kobj_attribute freq_attribute = | 67 | static 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); |
| 69 | static struct kobj_attribute pitch_attribute = | 69 | static 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); |
| 71 | static struct kobj_attribute punct_attribute = | 71 | static 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); |
| 73 | static struct kobj_attribute rate_attribute = | 73 | static 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); |
| 75 | static struct kobj_attribute tone_attribute = | 75 | static 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); |
| 77 | static struct kobj_attribute voice_attribute = | 77 | static 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); |
| 79 | static struct kobj_attribute vol_attribute = | 79 | static 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 | ||
| 89 | static struct kobj_attribute delay_time_attribute = | 89 | static 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); |
| 91 | static struct kobj_attribute direct_attribute = | 91 | static 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); |
| 93 | static struct kobj_attribute full_time_attribute = | 93 | static 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); |
| 95 | static struct kobj_attribute jiffy_delta_attribute = | 95 | static 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); |
| 97 | static struct kobj_attribute trigger_time_attribute = | 97 | static 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 | */ |
| 50 | static struct kobj_attribute caps_start_attribute = | 50 | static 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); |
| 52 | static struct kobj_attribute caps_stop_attribute = | 52 | static 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); |
| 54 | static struct kobj_attribute pitch_attribute = | 54 | static 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); |
| 56 | static struct kobj_attribute punct_attribute = | 56 | static 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); |
| 58 | static struct kobj_attribute rate_attribute = | 58 | static 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); |
| 60 | static struct kobj_attribute tone_attribute = | 60 | static 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); |
| 62 | static struct kobj_attribute vol_attribute = | 62 | static 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 | ||
| 65 | static struct kobj_attribute delay_time_attribute = | 65 | static 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); |
| 67 | static struct kobj_attribute direct_attribute = | 67 | static 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); |
| 69 | static struct kobj_attribute full_time_attribute = | 69 | static 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); |
| 71 | static struct kobj_attribute jiffy_delta_attribute = | 71 | static 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); |
| 73 | static struct kobj_attribute trigger_time_attribute = | 73 | static 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 | */ |
| 46 | static struct kobj_attribute caps_start_attribute = | 46 | static 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); |
| 48 | static struct kobj_attribute caps_stop_attribute = | 48 | static 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); |
| 50 | static struct kobj_attribute pitch_attribute = | 50 | static 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); |
| 52 | static struct kobj_attribute rate_attribute = | 52 | static 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); |
| 54 | static struct kobj_attribute tone_attribute = | 54 | static 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); |
| 56 | static struct kobj_attribute vol_attribute = | 56 | static 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 | ||
| 59 | static struct kobj_attribute delay_time_attribute = | 59 | static 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); |
| 61 | static struct kobj_attribute direct_attribute = | 61 | static 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); |
| 63 | static struct kobj_attribute full_time_attribute = | 63 | static 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); |
| 65 | static struct kobj_attribute jiffy_delta_attribute = | 65 | static 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); |
| 67 | static struct kobj_attribute trigger_time_attribute = | 67 | static 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 | } |
| 572 | static DEVICE_ATTR(waiting, S_IFREG | 0400, cuse_class_waiting_show, NULL); | 572 | static DEVICE_ATTR(waiting, 0400, cuse_class_waiting_show, NULL); |
| 573 | 573 | ||
| 574 | static ssize_t cuse_class_abort_store(struct device *dev, | 574 | static 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 | } |
| 583 | static DEVICE_ATTR(abort, S_IFREG | 0200, NULL, cuse_class_abort_store); | 583 | static DEVICE_ATTR(abort, 0200, NULL, cuse_class_abort_store); |
| 584 | 584 | ||
| 585 | static struct attribute *cuse_class_dev_attrs[] = { | 585 | static 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 | } |
| 43 | static struct kobj_attribute attr_version = | 43 | static 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 | ||
| 46 | static struct attribute *o2cb_attrs[] = { | 46 | static 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 | ||
| 498 | static struct kobj_attribute ocfs2_attr_max_locking_protocol = | 498 | static 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 | ||
| 502 | static ssize_t ocfs2_loaded_cluster_plugins_show(struct kobject *kobj, | 502 | static ssize_t ocfs2_loaded_cluster_plugins_show(struct kobject *kobj, |
| @@ -528,7 +528,7 @@ static ssize_t ocfs2_loaded_cluster_plugins_show(struct kobject *kobj, | |||
| 528 | } | 528 | } |
| 529 | 529 | ||
| 530 | static struct kobj_attribute ocfs2_attr_loaded_cluster_plugins = | 530 | static 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 | ||
| 534 | static ssize_t ocfs2_active_cluster_plugin_show(struct kobject *kobj, | 534 | static ssize_t ocfs2_active_cluster_plugin_show(struct kobject *kobj, |
| @@ -550,7 +550,7 @@ static ssize_t ocfs2_active_cluster_plugin_show(struct kobject *kobj, | |||
| 550 | } | 550 | } |
| 551 | 551 | ||
| 552 | static struct kobj_attribute ocfs2_attr_active_cluster_plugin = | 552 | static 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 | ||
| 556 | static ssize_t ocfs2_cluster_stack_show(struct kobject *kobj, | 556 | static 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 | ||
| 601 | static struct kobj_attribute ocfs2_attr_cluster_stack = | 601 | static 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 | |||
| 63 | struct isapnp_card_id { | 59 | struct 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 | ||
| 473 | extern const char hex_asc[]; | 474 | extern 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, | |||
| 82 | void sort_main_extable(void); | 82 | void sort_main_extable(void); |
| 83 | void trim_init_extable(struct module *m); | 83 | void trim_init_extable(struct module *m); |
| 84 | 84 | ||
| 85 | #ifdef MODULE | ||
| 86 | #define MODULE_GENERIC_TABLE(gtype, name) \ | ||
| 87 | extern 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 | ||
| 351 | extern struct kernel_param_ops param_ops_byte; | 349 | extern struct kernel_param_ops param_ops_byte; |
| 352 | extern int param_set_byte(const char *val, const struct kernel_param *kp); | 350 | extern 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 | ||
| 28 | TRACE_EVENT(module_load, | 30 | TRACE_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 |
| 461 | bool trace_module_has_bad_taint(struct module *mod) | 461 | bool 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 | ||
| 466 | static int tracepoint_module_coming(struct module *mod) | 467 | static 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 | ||
| 39 | struct text_range { | 39 | struct 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 | ||
| 44 | static unsigned long long _text; | 44 | static unsigned long long _text; |
| 45 | static struct text_range text_ranges[] = { | 45 | static 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 | ||
| 54 | static struct addr_range percpu_range = { | ||
| 55 | "__per_cpu_start", "__per_cpu_end", -1ULL, 0 | ||
| 56 | }; | ||
| 57 | |||
| 54 | static struct sym_entry *table; | 58 | static struct sym_entry *table; |
| 55 | static unsigned int table_size, table_cnt; | 59 | static unsigned int table_size, table_cnt; |
| 56 | static int all_symbols = 0; | 60 | static int all_symbols = 0; |
| 61 | static int absolute_percpu = 0; | ||
| 57 | static char symbol_prefix_char = '\0'; | 62 | static char symbol_prefix_char = '\0'; |
| 58 | static unsigned long long kernel_start_addr = 0; | 63 | static 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 | ||
| 86 | static int read_symbol_tr(const char *sym, unsigned long long addr) | 91 | static 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 | ||
| 170 | static int symbol_valid_tr(struct sym_entry *s) | 180 | static 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 | ||
| 315 | static int symbol_absolute(struct sym_entry *s) | ||
| 316 | { | ||
| 317 | return toupper(s->sym[0]) == 'A'; | ||
| 318 | } | ||
| 319 | |||
| 301 | static void write_src(void) | 320 | static 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 | ||
| 668 | static 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 | |||
| 649 | int main(int argc, char **argv) | 677 | int 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 */ |
| 44 | struct devtable { | 44 | struct 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) { |
