Skip to content

Commit

Permalink
[PATCH] uml: clear SKAS0/3 flags when running in TT mode
Browse files Browse the repository at this point in the history
SEGV_MAYBE_FIXABLE tests ptrace_faultinfo, and depends on it being 1 only in
SKAS3 mode, while currently when running with mode=tt it will be 1 anyway.
Fix this, and do the same for proc_mm.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Paolo 'Blaisorblade' Giarrusso authored and Linus Torvalds committed Sep 30, 2005
1 parent be662a1 commit 8923648
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/um/include/os.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,10 @@ extern int os_lock_file(int fd, int excl);
extern void os_early_checks(void);
extern int can_do_skas(void);

/* Make sure they are clear when running in TT mode. Required by
* SEGV_MAYBE_FIXABLE */
#define clear_can_do_skas() do { ptrace_faultinfo = proc_mm = 0; } while (0)

/* mem.c */
extern int create_mem_file(unsigned long len);

Expand Down
2 changes: 2 additions & 0 deletions arch/um/kernel/um_arch.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,8 @@ int linux_main(int argc, char **argv)
add_arg(DEFAULT_COMMAND_LINE);

os_early_checks();
if (force_tt)
clear_can_do_skas();
mode_tt = force_tt ? 1 : !can_do_skas();
#ifndef CONFIG_MODE_TT
if (mode_tt) {
Expand Down

0 comments on commit 8923648

Please sign in to comment.