Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754014AbcCIVGZ (ORCPT ); Wed, 9 Mar 2016 16:06:25 -0500 Received: from mail-db5eur01on0041.outbound.protection.outlook.com ([104.47.2.41]:13152 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752167AbcCIVGR (ORCPT ); Wed, 9 Mar 2016 16:06:17 -0500 Authentication-Results: infradead.org; dkim=none (message not signed) header.d=none;infradead.org; dmarc=none action=none header.from=mellanox.com; Subject: Re: [PATCH v10 09/12] arch/x86: enable task isolation functionality To: Andy Lutomirski , Kees Cook References: <1456949376-4910-1-git-send-email-cmetcalf@ezchip.com> <1456949376-4910-10-git-send-email-cmetcalf@ezchip.com> <56D895EA.1060301@mellanox.com> <56DDE9C9.5060900@mellanox.com> <56DF38BA.9030007@mellanox.com> CC: Thomas Gleixner , Christoph Lameter , Andrew Morton , Viresh Kumar , Ingo Molnar , Steven Rostedt , Tejun Heo , Gilad Ben Yossef , Will Deacon , Rik van Riel , Frederic Weisbecker , "Paul E. McKenney" , "linux-kernel@vger.kernel.org" , X86 ML , "H. Peter Anvin" , Catalin Marinas , Peter Zijlstra From: Chris Metcalf Message-ID: <56E09031.8050007@mellanox.com> Date: Wed, 9 Mar 2016 16:05:53 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [173.76.23.146] X-ClientProxiedBy: DM2PR0801CA0010.namprd08.prod.outlook.com (25.162.18.20) To HE1PR05MB1689.eurprd05.prod.outlook.com (25.169.119.155) X-MS-Office365-Filtering-Correlation-Id: 45f72eb1-9430-4af5-1719-08d3485ea618 X-Microsoft-Exchange-Diagnostics: 1;HE1PR05MB1689;2:6Wd1Kq8D0UVfEQ95dS9m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07H3ytHwKqQclU2PpF6XYJ3+Yebmm+xEk4Lc+styDeWJDHg6eyTqOh3IC4h/ysMLpekOnYQBiek+IRclS/EBYcznnAENXggpNrNiN1i6dcdnwRObw8gC2EiAYvtGD2cb7glZsmDU6z5yooTOoyF93SPbS051n3F2Rm26bbZL80pm8N8RCeOA;4:MPE6dNXAD/SdQh7exNbRucoDJbtbogChJUgV+f+iaBhHHbGZLtss6tyjFVEBUigSo5P0TCRhn9bfd3+hqjmP0iNfTEGhZRN+Yn81YPCyTG8dir/gz86r4uQCS24GQOSxSV+LCdbUKoxedMj3+aQ8szfycooEjTixyvDMHfe5Mf57p8ppxmZ/Ehenub2SDNv4G0+LBTfd4yMKqUszWrpDqn9EqQIdNGRp+6xJnktIeRUMa6F/iTYjlgbK6zfEx22bMTewALjf9pLQnhIwdhIwzZQoZ6CoHTX5z+Yw3u4mZlnbzFISKiHSDRivM0IlAZYx/NHp5xd3lCl3GoyX82d2G2rRrAMj0vlCJjFE8ekPzbL36X7JuAJWFdjVZdlF0hqa X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046);SRVR:HE1PR05MB1689;BCL:0;PCL:0;RULEID:;SRVR:HE1PR05MB1689; X-Forefront-PRVS: 0876988AF0 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(6049001)(24454002)(377454003)(479174004)(4326007)(6116002)(59896002)(3846002)(1096002)(2906002)(230700001)(2950100001)(93886004)(42186005)(15975445007)(92566002)(5004730100002)(64126003)(189998001)(33656002)(77096005)(586003)(36756003)(19580395003)(80316001)(65806001)(76176999)(87266999)(50986999)(54356999)(65816999)(23676002)(5001770100001)(65956001)(50466002)(66066001)(117156001)(81166005)(47776003)(86362001)(83506001)(5008740100001)(18886065003);DIR:OUT;SFP:1101;SCL:1;SRVR:HE1PR05MB1689;H:[192.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nFYrm/dPJbHTO/yDNonBqzy4CfDvzB28uL+xp01NxoPMAgIQ==;24:+IVJhYl9QqafgtBWi6yfA/1LbTZTuG9L7xmfWTMiYGCwCmyF918E4QnQ2Va9Eop9a6jOeQ28NM7zbQ3Tzr0Y6SBgUAb8gr7WkegWnqfL928= X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Mar 2016 21:06:06.8998 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR05MB1689 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 904 Lines: 19 On 3/9/2016 3:58 PM, Andy Lutomirski wrote: >> My preference would be not to have to require all task-isolation users >> >to also figure out all the complexities of creating BPF programs, so >> >my intention is to have task isolation automatically generate a BPF >> >program (just allowing prctl/exit/exit_group and failing everything >> >else with SIGSYS). To support having it work this way, I open up >> >the seccomp stuff a little so that kernel clients can effectively >> >push/pop a BPF program into seccomp: > That sounds like a great use case for the new libtaskisolation that > someone is surely writing:) Happily, task isolation is so simple an API that all that is needed is a prctl(). ... Unless somehow a requirement to inflict a huge blob of eBPF into the kernel just to use task isolation safely is added, of course :-) -- Chris Metcalf, Mellanox Technologies http://www.mellanox.com