File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -832,9 +832,15 @@ device_initcall(register_warn_debugfs);
832
832
*/
833
833
__visible noinstr void __stack_chk_fail (void )
834
834
{
835
+ unsigned long flags ;
836
+
835
837
instrumentation_begin ();
838
+ flags = user_access_save ();
839
+
836
840
panic ("stack-protector: Kernel stack is corrupted in: %pB" ,
837
841
__builtin_return_address (0 ));
842
+
843
+ user_access_restore (flags );
838
844
instrumentation_end ();
839
845
}
840
846
EXPORT_SYMBOL (__stack_chk_fail );
Original file line number Diff line number Diff line change @@ -1194,12 +1194,15 @@ static const char *uaccess_safe_builtin[] = {
1194
1194
"__ubsan_handle_load_invalid_value" ,
1195
1195
/* STACKLEAK */
1196
1196
"stackleak_track_stack" ,
1197
+ /* TRACE_BRANCH_PROFILING */
1198
+ "ftrace_likely_update" ,
1199
+ /* STACKPROTECTOR */
1200
+ "__stack_chk_fail" ,
1197
1201
/* misc */
1198
1202
"csum_partial_copy_generic" ,
1199
1203
"copy_mc_fragile" ,
1200
1204
"copy_mc_fragile_handle_tail" ,
1201
1205
"copy_mc_enhanced_fast_string" ,
1202
- "ftrace_likely_update" , /* CONFIG_TRACE_BRANCH_PROFILING */
1203
1206
"rep_stos_alternative" ,
1204
1207
"rep_movs_alternative" ,
1205
1208
"__copy_user_nocache" ,
You can’t perform that action at this time.
0 commit comments