Received: by 10.213.65.68 with SMTP id h4csp37879imn; Mon, 19 Mar 2018 18:46:49 -0700 (PDT) X-Google-Smtp-Source: AG47ELusySEAMsTaGhYYXDu1AImVRBnY5COqK2X6VhPGeuSkCYbphtbQdBhUMe5IP1K/s6lRi5WP X-Received: by 10.167.130.130 with SMTP id s2mr11898336pfm.136.1521510409026; Mon, 19 Mar 2018 18:46:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521510408; cv=none; d=google.com; s=arc-20160816; b=FN5sqEc4A+FVnNaxmq1W25mXJduh/h3wG6480bRnEWCh3T1C4MaZOQaZLWrtf3Qwgd PuZnIIk6xCJZ3ckHY0ZM7CZcak6d5n1zyHFxm1rdaWGluEIHp4Oy6RnL3kesBD/1owpR SyJQ/lEzxPtfWzufx0apPfKYaJccVbsLzh0l7PqNjRcV87qO6aAbkSG1eIh2P3v12G5U KSZUeD+Nc418TPV+d5OY3OKwilu/bUvwcBNJiqifWdgBASmBe2UmxSR1cZzT7ZjBvHD5 ds3saPsmltegoxUGKI7aRWu9uck/U4SBzhowgSe4j/lhc5DEWyMp6zG91L1zNCvdX0Mw mZ6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:references:cc :to:subject:from:dkim-signature:dkim-signature :arc-authentication-results; bh=ctVM6kEnurP1ODdrGY3n69E26NQUwNyYlGkG2atoVCU=; b=ftJxNXm0PXCXX1mfyvZ3gTrZiwAfASa5vzhLo3mXkMWo9L1CDqariCjAgyuPs3FcvC g76cURAzh5bhYcdv0T6zpqdd6hjhC35rJ6SsNowLhtCsJIh5uwS05NX0yT5+D5wWbkQP 5xSUBVI4tbwj54uceYVYrZxniF0vE3Qo5A7Ws+jRA0+ZjoLqz7Inz7ozim3g09/UaKEz Uc+K6ILyeBJcNQheq1Tjl/3uqIDB/wvvGV3rXfbietfhPB9iugymTxlwl9pSsNeRKLA9 Obr6RCiin7Ayr/O+TK525ofiy5POawvlKUbEQC0MxqjzklhGkIYA4c5TPD74wLqe6cxp 2RLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=DlHjwATO; dkim=fail header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=goJ+U7wO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fb.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 61-v6si491853plr.136.2018.03.19.18.46.35; Mon, 19 Mar 2018 18:46:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=DlHjwATO; dkim=fail header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=goJ+U7wO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fb.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965777AbeCSTTn (ORCPT + 99 others); Mon, 19 Mar 2018 15:19:43 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:59588 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933619AbeCSTTd (ORCPT ); Mon, 19 Mar 2018 15:19:33 -0400 Received: from pps.filterd (m0109334.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w2JJIwxn001375; Mon, 19 Mar 2018 12:19:18 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : subject : to : cc : references : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=facebook; bh=ctVM6kEnurP1ODdrGY3n69E26NQUwNyYlGkG2atoVCU=; b=DlHjwATOgwA0zuGHPpuXlppYP3ceZGrysCmggJ1ddz+JwZNxIM+IIeEMrtzjQftLi2jB 2+JUZ0EAmfNEIWmF7RITDXgZ+qItZvcJESZKqX+8AQynFj9zYMrqVZBS51iJU2HT7RuJ L//EdXf6Ktf0cLeaOkHS5oGyOf5Yu3+ezPA= Received: from mail.thefacebook.com ([199.201.64.23]) by mx0a-00082601.pphosted.com with ESMTP id 2gtgfprq1u-6 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 19 Mar 2018 12:19:18 -0700 Received: from NAM01-SN1-obe.outbound.protection.outlook.com (192.168.54.28) by o365-in.thefacebook.com (192.168.16.15) with Microsoft SMTP Server (TLS) id 14.3.361.1; Mon, 19 Mar 2018 12:19:15 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.onmicrosoft.com; s=selector1-fb-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=ctVM6kEnurP1ODdrGY3n69E26NQUwNyYlGkG2atoVCU=; b=goJ+U7wOMb9mXJcf2EhTPnl0Z4HCAvYiMK4bBWSEb3YO3HqG+iNPU/GMm1uhBAH5mFLbKP7R1mfxxlAk076PVLCrBVomx9AQNncxFqy6K7ikKYnfyYtdsFKYLjRQnBpQQwswasJtrk5cp2fmAjOoCtw/eFJ3uzq45keiCf2IqG4= Received: from [IPv6:2620:10d:c083:1309::19e] (2620:10d:c090:200::5:d37a) by BN4PR15MB0532.namprd15.prod.outlook.com (10.164.61.154) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.588.14; Mon, 19 Mar 2018 19:18:55 +0000 From: Howard McLauchlan Subject: Re: [PATCH] bpf: whitelist syscalls for error injection To: Andy Lutomirski , Dominik Brodowski CC: Ingo Molnar , LKML , Linux API , Al Viro , Thomas Gleixner , Yonghong Song , "David S . Miller" , Thomas Garnier , kernel-team References: <20180313231627.1247-1-hmclauchlan@fb.com> <20180318064738.GA22649@light.dominikbrodowski.net> Message-ID: <831eeeae-ecfe-efca-79a2-8edd50adc668@fb.com> Date: Mon, 19 Mar 2018 12:18:51 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [2620:10d:c090:200::5:d37a] X-ClientProxiedBy: CY4PR13CA0037.namprd13.prod.outlook.com (10.173.156.151) To BN4PR15MB0532.namprd15.prod.outlook.com (10.164.61.154) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bae6bab0-2a1e-4367-5677-08d58dce42f4 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4604075)(2017052603328)(7153060)(7193020);SRVR:BN4PR15MB0532; X-Microsoft-Exchange-Diagnostics: 1;BN4PR15MB0532;3:kNwmEoBQNMRoXPR9cE7ha5ejD/SNFaEuK+RkKWy7lhfqdaYrYLe1AyZSLGaiU6HsNLrR2yCJL6lqQx9hnQphkzp0Kzv1Wiwhrc08zZKZ+Y1TlvfjRLGrovi+j6UV/eKmumjtNkz2Oe/WxfopxjYAQOiPETG2lGUT5rT3MNWodzQhbeqNsHysnrnlxKYJAtqlhEEKTk+Cwrxn35TvD6NheWi+41axDYL80iY6WCFJERfYnWWdOQ7atDNFJBs//A45;25:kI7aqSa+njIv6gHy3WRbrC0bzhpuJmL3CXp0k4MDy8v+vW3KhQQ6mwF94+LSqIqUGDX8R+h68MAN+KkjaOzAP4pOE4nI87UVuCWKNq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+Eegc4LmRWyjdT2GnYSlkPugpZGlTMksWvhfycy8SGKSwaR7Z/1XE00YYBPyh2BmNtzwCQ0muwAkF3prh3FPx6f2EXY47lo9D7TQH2J1hyacZ7WYSxGuZ4g4zMWpF2MG35GR+e7vFdUmBVLBJDv/3KqwSKUl4AIwOGYz7X0vc6PkxlkiFRE4W9EFDORjUXIRkACzTKzFk/hynhqSjlP/hrr3B3VSEMOKRVNSh6msk9WIZtDpQC7P5fz6lmNmxstaQUaQaRHbX4KF2oXrz8aHdI71bHRIVvgAOth6mpqASWTEMpcPZsxDzsgxBTq X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(67672495146484); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(3231221)(11241501184)(944501244)(52105095)(10201501046)(6041310)(20161123562045)(20161123560045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:BN4PR15MB0532;BCL:0;PCL:0;RULEID:;SRVR:BN4PR15MB0532; X-Forefront-PRVS: 06167FAD59 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(39860400002)(366004)(396003)(376002)(346002)(39380400002)(76104003)(199004)(189003)(305945005)(2486003)(1706002)(4326008)(7736002)(46003)(67846002)(65956001)(76176011)(53546011)(59450400001)(6116002)(52146003)(47776003)(386003)(2906002)(25786009)(36756003)(52116002)(52396003)(16526019)(105586002)(23676004)(316002)(54906003)(53936002)(65826007)(81166006)(97736004)(6486002)(68736007)(229853002)(81156014)(93886005)(86362001)(8936002)(6246003)(8676002)(106356001)(31696002)(478600001)(31686004)(6666003)(5660300001)(65806001)(64126003)(2950100002)(230700001)(110136005)(58126008)(50466002);DIR:OUT;SFP:1102;SCL:1;SRVR:BN4PR15MB0532;H:[IPv6:2620:10d:c083:1309::19e];FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; Received-SPF: None (protection.outlook.com: fb.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTjRQUjE1TUIwNTMyOzIzOjFSTWNKamdJUTJmbGhnbUJELy8rUXk3Y1RB?= =?utf-8?B?ZE0yQVVlTC9JMlo5RzlvNEh6MEQvbWNRUEVUTFRBNENlMTNvTlNObVIzR1lD?= =?utf-8?B?QmRhSUNwL2R1SUFnK0VCYzdEenR4OGdXcEpHM2JZRHNBN3kxTDkzZlZtMmhN?= =?utf-8?B?UWFadFVDcThiNXlrdkMzN1BrdUF3YUhMbzJySjVidXJXbStjU09SU0VHY3R4?= =?utf-8?B?aktqTk14QkpCS0FSY3FEa0VlNElWeXN0bUExR0Z2Skl2dGRmZVo3dmhOYWlp?= =?utf-8?B?bzAxQmd0YW9tOWE5SHRUQXFuaHJ0N1NxQWVIOGxrQ3c5ck1zbERzcFN3Rmw4?= =?utf-8?B?MXVoTWZIcEJzVDVUc1g3RHZPVGpZYlVZZGZuR3RzUmtFeENXbVNTUDdzblRt?= =?utf-8?B?cjZTTGY0OTBlR3prN0FZM3oza1dwdzVXQ0NLUHEvaUlmdGY1enZoZTgyTmN3?= =?utf-8?B?NkJJVmlORE9JdXVCNFpuajNoK01ObzVnanNUMDBHZHc0WUl1TU5NSXJaa0Mv?= =?utf-8?B?TndhRStPUHdsUmM5dDV0amVYbXFuWEZ6UWsyaGZsb1hHY3JPR3YrMFVxZHpI?= =?utf-8?B?WGppWE1uZUxwdXk2akZxNUsrV1d4K0tuYTdWOE1WamlYYlloeGt5bGFZeVR4?= =?utf-8?B?NTh0ODkxZ2s2OW0zUGVCY2Vtb2xqWGRoTzZqL2pqOGdYWVFaN3RNOFdmNUR1?= =?utf-8?B?M1daMjVlbXBxV0hCaXY3emZsT0UvZFhkaXhyQlVnajlFaFNBZzVEUjRtc1g4?= =?utf-8?B?WXV1dWc2ZHg2WVBhSStpQ0U1a1JRYTJsSStGVXFYQk1CQ0Rh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u2vUE5zM4KwKU3WrqVNKbcI=;7:4/DU7M4EK5Pi4uXtP79uceJXw9NJ2WTuhiFsSFj+d6qfkKF5F4FBxSH5HlkcpX1R6+WweaHl7QYXQOMk8ABnoLgbbHwfjifSuN1PGnyAogkeT/OV2uZNctCbHEAC9QQMW/XBgdKUgNog0ufjQz2sHjdI3IgACvylKcBMQkaVG47uSDo2ZcUmUJw8pI5Ac/SMSFCUwc4WGfVVIwgC0gWlfQ0PYz47eSSKq5OdVSbke2TC6xDZJHd4GzbHjLKVE7N5 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BN4PR15MB0532;20:MlcUf3SRoTv5/xFiDYs+jT1MgnqdOOz1VIpcP7JvuGAM3r7zWK4iVhITc1dfOJevTcbM/qc8621J4Mn8fhNoDZ2bMvauzHQGnPsbWpDVmPsk9k/qxrj2wppfphce/hMij5W4/HTSQgtI1LA5j6kNRv5W4MZLCMzG1sC3l/jVzTA= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Mar 2018 19:18:55.0912 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bae6bab0-2a1e-4367-5677-08d58dce42f4 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN4PR15MB0532 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-19_09:,, signatures=0 X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/18/2018 07:13 PM, Andy Lutomirski wrote: > On Sun, Mar 18, 2018 at 6:47 AM, Dominik Brodowski > wrote: >> On Fri, Mar 16, 2018 at 03:55:04PM -0700, Howard McLauchlan wrote: >>> On 03/13/2018 04:56 PM, Andy Lutomirski wrote: >>>> On Tue, Mar 13, 2018 at 11:16 PM, Howard McLauchlan wrote: >>>>> Error injection is a useful mechanism to fail arbitrary kernel >>>>> functions. However, it is often hard to guarantee an error propagates >>>>> appropriately to user space programs. By injecting into syscalls, we can >>>>> return arbitrary values to user space directly; this increases >>>>> flexibility and robustness in testing, allowing us to test user space >>>>> error paths effectively. >>>> >>>> Temporary NAK IMO. Specifically: >>>> >>>>> diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h >>>>> index a78186d826d7..e8c6d63ace78 100644 >>>>> --- a/include/linux/syscalls.h >>>>> +++ b/include/linux/syscalls.h >>>>> @@ -191,6 +191,8 @@ static inline int is_syscall_trace_event(struct trace_event_call *tp_event) >>>>> >>>>> #define SYSCALL_DEFINE0(sname) \ >>>>> SYSCALL_METADATA(_##sname, 0); \ >>>>> + asmlinkage long sys_##sname(void); \ >>>>> + ALLOW_ERROR_INJECTION(sys_##sname, ERRNO); \ >>>> >>>> sys_xyz() is not just the syscall itself; it's also a helper that's >>>> used for entirely silly reasons by various bits of kernel code for >>>> quite a few syscalls. Fortunately, Dominik has patches to fix that, >>>> and Linus is even considering pulling them for 4.16. This patch will >>>> most likely conflict with the final result of Dominik's series. >>>> >>>> Can you and Dominik coordinate a bit to get this patch or its >>>> equivalent landed on top of Dominik's work? It might make sense for >>>> Dominik to just add this patch to his series so it can land with the >>>> rest of it. Dominik, Ingo, what do you think? >>>> >>>> --Andy >>>> >>> >>> Dominik, >>> >>> This patch applies cleanly on top of your patch series. Is there anything you'd need from me to get this in on top of your work? >> >> Howard, >> >> would this form part of the kernel<->userspace interface and therefore needs >> to be kept stable? If so, this patch should wait until the arch-specific >> syscall calling convention is agreed upon. >> >> Moreover, the patches I sent out already do not cover all syscalls yet. >> Until all in-kernel users of sys_*() are gone (or at least outside arch/), >> I'd prefer to postpone this patch. >> > > I was assuming that this ALLOW_ERROR_INJECTION thing is *not* > considered stable ABI. We should be free to change the way that the > syscall entry code calls syscalls whenever we like. > > If you want a stable syscall error injection mechanism, make it work > like seccomp instead, please. > This is not supposed to be considered stable. It's for debug purposes only and would normally be configured off. Howard