Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2315550pxb; Thu, 3 Feb 2022 04:09:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJzewQvoQMiE6G5M32lDTOfUlFBrgnV3mD5WWKIMAFcEFGxjSU5ZvIOfYB+oporE8SyxWurO X-Received: by 2002:a17:906:5d0f:: with SMTP id g15mr28356006ejt.169.1643890174640; Thu, 03 Feb 2022 04:09:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643890174; cv=none; d=google.com; s=arc-20160816; b=HYiDI8OPpTbJdRNC2rVhzNd+/AiEho/RyTbLDxetUDQp7bhlZMHrpm63imRnjRzUR/ RGAkyLRu8NsGCWMzqTaLb342qZW0c8c41L5phyHCmiIpTc41n5ippTsgp8WE3pmiI2Ct 9IpvDQqOsfsco/9EEILf/Pj6U6LVhS7Y6LYByUzWkaCkJKuZQWN6VI8bJZVIJMAHgReW 5TjebNIH3RlwSGq8HjzZhfqDGmqJtzFyvbbKF5B9hevZHNaA6IzNtztl/69AxD0U+5fc unou9Pcn5KMUwH0QqICiptMn/FsOErKDtkW0xz+/p9Vv5E80R4vbikEg+dYMM+AXerrx O0fQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=DvlTL8SOIBEnoLADrPhexPMo06dhYqvvFf7mqlCkN+M=; b=CLDKxZbM7qthoXjCe5haCDfvFH5Ya21IxcCX9h3cEGLr7gdbmC55AhXwZrymj+YYnG WmPtfubUHVRwpmbizYE6fu95Fx+a+QSLblINSRlH93ekTz88pXyVhOs7lgYfL9Tsr9Vm VIcdXd526uMqhYVgc2Rf1zHoAxBl8yRmTUslzBAnpd8rbOq+At1moyZnP2yYbJZXK7fG QvYEgZo0lPqhDESEBh5S1SpLjNJTgmbnXMoL03udeGqzC+mkYTddQRMsegIMMRyXdX2E HpKyspRb8bLPKPIhM548FKfq4EpvHHMvzMZjLPX1kc7l5oQYfKnR7odFKuGz1wu4FHI8 j1SQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XlUn8cew; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qa35si13286961ejc.127.2022.02.03.04.09.09; Thu, 03 Feb 2022 04:09:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XlUn8cew; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346712AbiBBSl7 (ORCPT + 99 others); Wed, 2 Feb 2022 13:41:59 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:24175 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232367AbiBBSl6 (ORCPT ); Wed, 2 Feb 2022 13:41:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1643827318; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DvlTL8SOIBEnoLADrPhexPMo06dhYqvvFf7mqlCkN+M=; b=XlUn8cewMm7JlfBGJ1BSPPNy7b1ZeVa4/i9DgXAyZ3t1CmTjPTqdxMwSWPQupt1vv/R7Vy fg+V6aW34viA7CxiHlxQB+6BS5cLqldbYT9FDE4vCNh0zZkXW8ZM+K7c0jMshXNSsaC+74 Aqm1gnu+GVCeHLkIaJy5XSR9SVa32g4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-496-rb38Fz9TNbO11eU0S6GB5A-1; Wed, 02 Feb 2022 13:41:55 -0500 X-MC-Unique: rb38Fz9TNbO11eU0S6GB5A-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8373110626E1; Wed, 2 Feb 2022 18:41:12 +0000 (UTC) Received: from fuller.cnet (ovpn-112-2.gru2.redhat.com [10.97.112.2]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 19D3084D19; Wed, 2 Feb 2022 18:41:11 +0000 (UTC) Received: by fuller.cnet (Postfix, from userid 1000) id 1BF03416CD79; Tue, 1 Feb 2022 15:31:59 -0300 (-03) Date: Tue, 1 Feb 2022 15:31:59 -0300 From: Marcelo Tosatti To: =?utf-8?B?5ZCRIOaZr+S6mA==?= Cc: "linux-kernel@vger.kernel.org" , Nitesh Lal , Nicolas Saenz Julienne , Christoph Lameter , Juri Lelli , Peter Zijlstra , Alex Belits , Peter Xu , Thomas Gleixner , Daniel Bristot de Oliveira , Frederic Weisbecker Subject: Re: [PATCH v10 1/10] add basic task isolation prctl interface Message-ID: References: <20220127173037.318440631@fedora.localdomain> <20220127173206.358254456@fedora.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jan 29, 2022 at 04:22:07AM +0000, 向 景亘 wrote: > Hi, > > On Jan 28, 2022, at 1:30 AM, Marcelo Tosatti 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". Yes, fixed, thanks!