Re: [patch v12 05/13] task isolation: sync vmstats on return to userspace

Thomas Gleixner
2022-04-27T06:56:36Z

On Tue, Mar 15 2022 at 12:31, Marcelo Tosatti wrote:
> --- linux-2.6.orig/kernel/entry/common.c
> +++ linux-2.6/kernel/entry/common.c
>
> @@ -174,6 +175,9 @@ static unsigned long exit_to_user_mode_l
> if (ti_work & _TIF_NOTIFY_RESUME)
> tracehook_notify_resume(regs);
>
> + if (ti_work & _TIF_TASK_ISOL)
> + task_isol_exit_to_user_mode();
> +
> /* Architecture specific TIF work */
> arch_exit_to_user_mode_work(regs, ti_work);

> --- linux-2.6.orig/include/linux/entry-common.h
> +++ linux-2.6/include/linux/entry-common.h
> @@ -60,7 +60,7 @@
> #define EXIT_TO_USER_MODE_WORK \
> (_TIF_SIGPENDING | _TIF_NOTIFY_RESUME | _TIF_UPROBE | \
> _TIF_NEED_RESCHED | _TIF_PATCH_PENDING | _TIF_NOTIFY_SIGNAL | \
> - ARCH_EXIT_TO_USER_MODE_WORK)
> + _TIF_TASK_ISOL | ARCH_EXIT_TO_USER_MODE_WORK)

How is this supposed to compile when _TIF_TASK_ISOL is not defined by an
architecture?

Hint: Search for _TIF_PATCH_PENDING in the very same header file.

Thanks,

tglx