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