[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <F94506EB-DA71-43F1-9126-8FBB134F6104@livemail.tw>
Date: Sat, 29 Jan 2022 04:22:07 +0000
From: 向 景亘
<oscar0225@...email.tw>
To: Marcelo Tosatti <mtosatti@...hat.com>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Nitesh Lal <nilal@...hat.com>,
Nicolas Saenz Julienne <nsaenzju@...hat.com>,
Christoph Lameter <cl@...ux.com>,
Juri Lelli <juri.lelli@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Alex Belits <abelits@...its.com>, Peter Xu <peterx@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Daniel Bristot de Oliveira <bristot@...hat.com>,
Frederic Weisbecker <frederic@...nel.org>
Subject: Re: [PATCH v10 1/10] add basic task isolation prctl interface
Hi,
On Jan 28, 2022, at 1:30 AM, Marcelo Tosatti <mtosatti@...hat.com> wrote:
>
> Index: linux-2.6/include/linux/task_isolation.h
> ===================================================================
> --- /dev/null
> +++ linux-2.6/include/linux/task_isolation.h
> @@ -0,0 +1,91 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +
> +#ifndef __LINUX_TASK_ISOL_H
> +#define __LINUX_TASK_ISOL_H
> +
> +#ifdef CONFIG_TASK_ISOLATION
> +
> +struct task_isol_info {
> + /* Which features have been configured */
> + u64 conf_mask;
> + /* Which features are active */
> + u64 active_mask;
> + /* Quiesce mask */
> + u64 quiesce_mask;
> +
> + /* Oneshot mask */
> + u64 oneshot_mask;
> +
> + u8 inherit_mask;
> +};
> +
> +extern void __task_isol_free(struct task_struct *tsk);
> +
> +static inline void task_isol_free(struct task_struct *tsk)
> +{
> + if (tsk->task_isol_info)
> + __task_isol_free(tsk);
> +}
> +
> +int prctl_task_isol_feat_get(unsigned long arg2, unsigned long arg3,
> + unsigned long arg4, unsigned long arg5);
> +int prctl_task_isol_cfg_get(unsigned long arg2, unsigned long arg3,
> + unsigned long arg4, unsigned long arg5);
> +int prctl_task_isol_cfg_set(unsigned long arg2, unsigned long arg3,
> + unsigned long arg4, unsigned long arg5);
> +int prctl_task_isol_activate_get(unsigned long arg2, unsigned long arg3,
> + unsigned long arg4, unsigned long arg5);
> +int prctl_task_isol_activate_set(unsigned long arg2, unsigned long arg3,
> + unsigned long arg4, unsigned long arg5);
> +
> +int __copy_task_isol(struct task_struct *tsk);
> +
> +#else
> +
> +static inline void task_isol_free(struct task_struct *tsk)
> +{
> +}
> +
> +static inline int prctl_task_isol_feat_get(unsigned long arg2,
> + unsigned long arg3,
> + unsigned long arg4,
> + unsigned long arg5)
> +{
> + return -EOPNOTSUPP;
> +}
> +
> +static inline int prctl_task_isoln_cfg_get(unsigned long arg2,
I think this line should be "prctl_task_isol_cfg_get".
> + unsigned long arg3,
> + unsigned long arg4,
> + unsigned long arg5)
> +{
> + return -EOPNOTSUPP;
> +}
> +
> +static inline int prctl_task_isol_cfg_set(unsigned long arg2,
> + unsigned long arg3,
> + unsigned long arg4,
> + unsigned long arg5)
> +{
> + return -EOPNOTSUPP;
> +}
> +
> +static inline int prctl_task_isol_activate_get(unsigned long arg2,
> + unsigned long arg3,
> + unsigned long arg4,
> + unsigned long arg5)
> +{
> + return -EOPNOTSUPP;
> +}
> +
> +static inline int prctl_task_isol_activate_set(unsigned long arg2,
> + unsigned long arg3,
> + unsigned long arg4,
> + unsigned long arg5)
> +{
> + return -EOPNOTSUPP;
> +}
> +
> +#endif /* CONFIG_TASK_ISOLATION */
> +
> +#endif /* __LINUX_TASK_ISOL_H */
Thanks,
Oscar
Powered by blists - more mailing lists