Lines 103-108
static char * ireg_name[] = {"v0", "t0",
Link Here
|
103 |
"t10", "t11", "ra", "pv", "at", "gp", "sp", "zero"}; |
103 |
"t10", "t11", "ra", "pv", "at", "gp", "sp", "zero"}; |
104 |
#endif |
104 |
#endif |
105 |
|
105 |
|
|
|
106 |
#ifdef CONFIG_ALPHA_UAC_SYSCTL |
107 |
|
108 |
#include <linux/sysctl.h> |
109 |
|
110 |
static int enabled_noprint = 0; |
111 |
static int enabled_sigbus = 0; |
112 |
static int enabled_nofix = 0; |
113 |
|
114 |
ctl_table uac_table[] = { |
115 |
{ |
116 |
.ctl_name = CTL_UNNUMBERED, |
117 |
.procname = "noprint", |
118 |
.data = &enabled_noprint, |
119 |
.maxlen = sizeof (int), |
120 |
.mode = 0644, |
121 |
.proc_handler = &proc_dointvec, |
122 |
}, |
123 |
{ |
124 |
.ctl_name = CTL_UNNUMBERED, |
125 |
.procname = "sigbus", |
126 |
.data = &enabled_sigbus, |
127 |
.maxlen = sizeof (int), |
128 |
.mode = 0644, |
129 |
.proc_handler = &proc_dointvec, |
130 |
}, |
131 |
{ |
132 |
.ctl_name = CTL_UNNUMBERED, |
133 |
.procname = "nofix", |
134 |
.data = &enabled_nofix, |
135 |
.maxlen = sizeof (int), |
136 |
.mode = 0644, |
137 |
.proc_handler = &proc_dointvec, |
138 |
}, |
139 |
{ .ctl_name = 0 } |
140 |
}; |
141 |
|
142 |
static int __init init_uac_sysctl(void) |
143 |
{ |
144 |
/* Initialize sysctls with the #defined UAC policy */ |
145 |
enabled_noprint = (test_thread_flag (TIF_UAC_NOPRINT)) ? 1 : 0; |
146 |
enabled_sigbus = (test_thread_flag (TIF_UAC_SIGBUS)) ? 1 : 0; |
147 |
enabled_nofix = (test_thread_flag (TIF_UAC_NOFIX)) ? 1 : 0; |
148 |
return 0; |
149 |
} |
150 |
#endif |
151 |
|
106 |
static void |
152 |
static void |
107 |
dik_show_code(unsigned int *pc) |
153 |
dik_show_code(unsigned int *pc) |
108 |
{ |
154 |
{ |
Lines 782-788
do_entUnaUser(void __user * va, unsigned
Link Here
|
782 |
/* Check the UAC bits to decide what the user wants us to do |
828 |
/* Check the UAC bits to decide what the user wants us to do |
783 |
with the unaliged access. */ |
829 |
with the unaliged access. */ |
784 |
|
830 |
|
|
|
831 |
#ifndef CONFIG_ALPHA_UAC_SYSCTL |
785 |
if (!test_thread_flag (TIF_UAC_NOPRINT)) { |
832 |
if (!test_thread_flag (TIF_UAC_NOPRINT)) { |
|
|
833 |
#else /* CONFIG_ALPHA_UAC_SYSCTL */ |
834 |
if (!(enabled_noprint)) { |
835 |
#endif /* CONFIG_ALPHA_UAC_SYSCTL */ |
786 |
if (cnt >= 5 && time_after(jiffies, last_time + 5 * HZ)) { |
836 |
if (cnt >= 5 && time_after(jiffies, last_time + 5 * HZ)) { |
787 |
cnt = 0; |
837 |
cnt = 0; |
788 |
} |
838 |
} |
Lines 793-802
do_entUnaUser(void __user * va, unsigned
Link Here
|
793 |
} |
843 |
} |
794 |
last_time = jiffies; |
844 |
last_time = jiffies; |
795 |
} |
845 |
} |
|
|
846 |
#ifndef CONFIG_ALPHA_UAC_SYSCTL |
796 |
if (test_thread_flag (TIF_UAC_SIGBUS)) |
847 |
if (test_thread_flag (TIF_UAC_SIGBUS)) |
|
|
848 |
#else /* CONFIG_ALPHA_UAC_SYSCTL */ |
849 |
if (enabled_sigbus) |
850 |
#endif /* CONFIG_ALPHA_UAC_SYSCTL */ |
797 |
goto give_sigbus; |
851 |
goto give_sigbus; |
798 |
/* Not sure why you'd want to use this, but... */ |
852 |
/* Not sure why you'd want to use this, but... */ |
|
|
853 |
#ifndef CONFIG_ALPHA_UAC_SYSCTL |
799 |
if (test_thread_flag (TIF_UAC_NOFIX)) |
854 |
if (test_thread_flag (TIF_UAC_NOFIX)) |
|
|
855 |
#else /* CONFIG_ALPHA_UAC_SYSCTL */ |
856 |
if (enabled_nofix) |
857 |
#endif /* CONFIG_ALPHA_UAC_SYSCTL */ |
800 |
return; |
858 |
return; |
801 |
|
859 |
|
802 |
/* Don't bother reading ds in the access check since we already |
860 |
/* Don't bother reading ds in the access check since we already |
Lines 1091-1093
trap_init(void)
Link Here
|
1091 |
wrent(entSys, 5); |
1149 |
wrent(entSys, 5); |
1092 |
wrent(entDbg, 6); |
1150 |
wrent(entDbg, 6); |
1093 |
} |
1151 |
} |
|
|
1152 |
|
1153 |
#ifdef CONFIG_ALPHA_UAC_SYSCTL |
1154 |
__initcall(init_uac_sysctl); |
1155 |
#endif |