Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp39508imb; Thu, 28 Feb 2019 15:17:24 -0800 (PST) X-Google-Smtp-Source: APXvYqySXXAO8G1E5Zb84I5gTnFUEQ/K5Ry3Sz7w3fafukHzPKEqfsEpunay65FK9I9jMlg79Zsi X-Received: by 2002:a17:902:2963:: with SMTP id g90mr2079577plb.182.1551395844345; Thu, 28 Feb 2019 15:17:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551395844; cv=none; d=google.com; s=arc-20160816; b=X1rW4De+g5SmFjP6SnWA5CjqYQ2lKwcq/y+sq11iQIdIT7peET0y6LTAGgCYolJSHj v6R3gzPdUmJfUxLiAwnz2asZJhJyvElcMlmK/ZLTLO40BjE7rvrds9YNxjsAxijZEBrQ WDdQ+8VN3VrYGrvhzlOkYfwsHkjIpCW4q3EjJlttk99rZhJH6c+4Vi3Fy41Z6SOc0NPr rxhl/lXhs7cGFfliIDwW/gcy2KkHTn3vljsMlAEPooBftuuwmLIdh7JMwDFs0RINxlsz y+1jmC4v/VRpWfZf7gER9y7MmLusAfVoP1vgCaBsUjkzNKNYCSfO6bEbJG9RUQ3fLlDB tfjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature:dkim-signature; bh=nUupfsTqZkgsiWkzr8UgLmfVSLiM7oZq9YLWUAsjcx4=; b=tkEo9CGkkkMWVf4DJnGauYhDOud7uS1MMQpPt1w3tF5+G9KojU3hSQptLpnEUN1gcG +8fIog8iSja+NXScpsaUUo91HlzxkWbEobNxw00q2YmpYZpTBGRcooQ9jVGHnCAuACDi 7rrEkvYq+0tw1HNdue7rwWUB6tuYd3th3Gz7hDdHu9gPakfMI0/v7YXoPFJISTyfAf0w JJXEi+GPNIJ/q/bMpila5KrZD9s+wAJX5cvItNQvHkTKNI+sFthDeWJsmJxt5EVkGtG3 xPpcjzNRoa4lAfLPZngTLjop6T8pKzM8uLBBg6q0PL+WxTz7Iq8kjZExwy7y0bhrzHxJ kA2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=NmNm8+Q9; dkim=pass header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=Ymfek7lI; 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 s19si18650371plq.148.2019.02.28.15.17.08; Thu, 28 Feb 2019 15:17:24 -0800 (PST) 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=NmNm8+Q9; dkim=pass header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=Ymfek7lI; 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 S1729483AbfB1Wug (ORCPT + 99 others); Thu, 28 Feb 2019 17:50:36 -0500 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:42012 "EHLO mx0b-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726087AbfB1Wuf (ORCPT ); Thu, 28 Feb 2019 17:50:35 -0500 Received: from pps.filterd (m0148460.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x1SMidqw025163; Thu, 28 Feb 2019 14:49:50 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=facebook; bh=nUupfsTqZkgsiWkzr8UgLmfVSLiM7oZq9YLWUAsjcx4=; b=NmNm8+Q9r87V8XQdENic8QO5DgGBlFJb1LRCZnZ9ZCQLIf/GorLNRslACXUMmgc5W1l+ TKMcGbzVaOAdpK0pMjf+yq7m/y3rlZKxR/UeDVuswj9xmOMMbwDRDaFJwVq+O/3/NPLT pQkhPUNiU4ACkZOgZzSdMkJcFNiivT5e8o8= Received: from mail.thefacebook.com ([199.201.64.23]) by mx0a-00082601.pphosted.com with ESMTP id 2qxpcwgjb4-5 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 28 Feb 2019 14:49:50 -0800 Received: from prn-mbx01.TheFacebook.com (2620:10d:c081:6::15) by prn-hub06.TheFacebook.com (2620:10d:c081:35::130) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.1.1531.3; Thu, 28 Feb 2019 14:49:47 -0800 Received: from prn-hub02.TheFacebook.com (2620:10d:c081:35::126) by prn-mbx01.TheFacebook.com (2620:10d:c081:6::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.1.1531.3; Thu, 28 Feb 2019 14:49:46 -0800 Received: from NAM03-BY2-obe.outbound.protection.outlook.com (192.168.54.28) by o365-in.thefacebook.com (192.168.16.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.1.1531.3 via Frontend Transport; Thu, 28 Feb 2019 14:49:46 -0800 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:X-MS-Exchange-SenderADCheck; bh=nUupfsTqZkgsiWkzr8UgLmfVSLiM7oZq9YLWUAsjcx4=; b=Ymfek7lI4sTeN7efK1vszmOuE9g3l4Fx80cjGIekYK0wSja+rhokzDDbZPKIzUD1PoZfU0TBe0PTmqbr7DMC//wzc8s2vt0RQ0VOHNi7Ka1TzEriLpgi8P40D0cGNmCgw5kGetP5wynZPtI6tGyL+UMyHwr+w52QoehPwBz+P5w= Received: from BYAPR15MB3384.namprd15.prod.outlook.com (20.179.59.17) by BYAPR15MB2647.namprd15.prod.outlook.com (20.179.156.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1643.15; Thu, 28 Feb 2019 22:49:44 +0000 Received: from BYAPR15MB3384.namprd15.prod.outlook.com ([fe80::d051:e43:9e14:b94]) by BYAPR15MB3384.namprd15.prod.outlook.com ([fe80::d051:e43:9e14:b94%4]) with mapi id 15.20.1665.015; Thu, 28 Feb 2019 22:49:43 +0000 From: Yonghong Song To: Masami Hiramatsu , Steven Rostedt , Linus Torvalds , "Shuah Khan" CC: "linux-kernel@vger.kernel.org" , "Andy Lutomirski" , Ingo Molnar , "Andrew Morton" , Changbin Du , Jann Horn , Kees Cook , "Andy Lutomirski" , Alexei Starovoitov , Nadav Amit , "Peter Zijlstra" , Joel Fernandes Subject: Re: [PATCH v5 3/6] uaccess: Add non-pagefault user-space read functions Thread-Topic: [PATCH v5 3/6] uaccess: Add non-pagefault user-space read functions Thread-Index: AQHUz39IYmYXzWXlk0md3tL+pQqyDKX10MmA Date: Thu, 28 Feb 2019 22:49:43 +0000 Message-ID: <40eae910-16f3-8c6f-6cc7-c52b77b30ccd@fb.com> References: <155136974478.2968.3105123100519786079.stgit@devbox> <155136983467.2968.13980231890937828195.stgit@devbox> In-Reply-To: <155136983467.2968.13980231890937828195.stgit@devbox> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: MWHPR04CA0054.namprd04.prod.outlook.com (2603:10b6:300:6c::16) To BYAPR15MB3384.namprd15.prod.outlook.com (2603:10b6:a03:10e::17) x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [2620:10d:c090:200::2:e2ab] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e09e5925-0f85-4e79-93d1-08d69dcf07c0 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(2017052603328)(7153060)(7193020);SRVR:BYAPR15MB2647; x-ms-traffictypediagnostic: BYAPR15MB2647: x-microsoft-exchange-diagnostics: 1;BYAPR15MB2647;20:qwrTO+LZqjvGWptTZQd8rSLSQB0J22Dw/J6KVlo1uhLRMsU5FdZYe9jZgJ/hLvIUYLuCC+ROFpr1x0O3X6xJURtNV9KRcsV7Mv1a7ETvvUCHQv6SmgMJUmp58emXdqgltGp4Eu6+DFTXKFhCYq0sMnDimMiKqV0oma/VDW2Cv4E= x-microsoft-antispam-prvs: x-forefront-prvs: 0962D394D2 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(136003)(39860400002)(346002)(396003)(376002)(366004)(199004)(189003)(31696002)(2616005)(6486002)(6506007)(105586002)(7416002)(106356001)(478600001)(6436002)(305945005)(7736002)(14454004)(68736007)(81156014)(6116002)(31686004)(316002)(71190400001)(6512007)(36756003)(8936002)(81166006)(53936002)(8676002)(71200400001)(2906002)(102836004)(446003)(53546011)(4326008)(256004)(14444005)(52116002)(46003)(186003)(54906003)(5660300002)(25786009)(110136005)(229853002)(97736004)(76176011)(386003)(6246003)(99286004)(86362001)(11346002)(476003)(486006);DIR:OUT;SFP:1102;SCL:1;SRVR:BYAPR15MB2647;H:BYAPR15MB3384.namprd15.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: fb.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: LgL8tY1hOVEfK7AbtSv4AdjZ7DTJT/VHur9J73U0MK9JCDhEICYtvyI41bIOZlpP6EgLXXAhhR1rm5Yg1cIFgGjHur9mWZkyA2Dvp1IgRX7eALc9SiWnJtlvhat0n4HEanU7ocR9xIK0NdYVz6/tDSMf2CGMxwkVpUyDrBY7r3Brz17Mgq1UEoqsS8VEAKV3jHtBrQgOrwii8o83xZ7TpdnMEKBczTiNFKZSllbenWY6r6iRHKAcpmGt3LblzBXNYmcJPR5E/dYW+EuLkFgf19wVD6LK8io90mfsGQw29MPICRy/1AhREBdruUQFyKpcCc4emF1HSCG3rylL3HJrbdNKvx87KevmnzyhXgp3YwNwdlbNq4UHl6677CR33DHPGYWD5nRa6Z2X2blGORwBGcVX9qDvapo6EK1TlGLJ+fs= Content-Type: text/plain; charset="utf-8" Content-ID: Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: e09e5925-0f85-4e79-93d1-08d69dcf07c0 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Feb 2019 22:49:43.8259 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR15MB2647 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-02-28_14:,, 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 DQoNCk9uIDIvMjgvMTkgODowMyBBTSwgTWFzYW1pIEhpcmFtYXRzdSB3cm90ZToNCj4gQWRkIHBy b2JlX3VzZXJfcmVhZCgpLCBzdHJuY3B5X2Zyb21fdW5zYWZlX3VzZXIo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