Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1590731ybc; Wed, 20 Nov 2019 00:36:41 -0800 (PST) X-Google-Smtp-Source: APXvYqwjPG6InkvfY7mkuP7Ku0V1lMEeTJK1Ig7Y/AY2Z2KhBOTern0ENwvFbK+7bFgIJMWUp+yi X-Received: by 2002:a17:906:5448:: with SMTP id d8mr3609767ejp.79.1574239001283; Wed, 20 Nov 2019 00:36:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574239001; cv=none; d=google.com; s=arc-20160816; b=Kmr0W7i5BK+0fC5UtvigDagtXyzhxLBIcndeTi/PjDPheJ4rEbq5q3WG6A8gMYT035 8nGMZoXKdsMj6NRZzg6eiESMrciBzZB9L67SpTsO/co54zic3/FUQmlcPkRqEUV8Nbot 1t5vFhM9eUGEceSiGjJez+eZbUstr9F7SdO7MgKeSOEgHm/ercCpX9uWgs6fiy9KNhdl topbj2ftnnU593fdJGX6vhA5IIpdBtmmGGEjKEp41OZhwxDkw8zW6r1PAjf+vumAbVwW fBjQzQEgCP6hi+dvLKUTlxnkMT01nOEDRBARy2SB5VRnhKAvB8Rg5Sp0Ph6wSTIEOFrS EtPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=M2UT7PsbBttLm3d7KtnkpApkgoUAHdiQRcC9lfgSQY4=; b=uQpCIkPVojHAKaBkUwhpSrF+O8/P0fKI9g6oO4Y5WwJ19CcJEftRWqExN4NMoWTdRl veldaJz84ZWIsmF00UU5DezZHc9EGTluBLhPJQ9Qlfkzy0kp3BWhb4unt8C41/1ce66m 4JddtnhaB9UKqVosSf0+wRkUAg31/1lQ0n7vlRLyjcvRwMgew8nCiYu3auAUXxyCmg2D AUlkAqWSIA86ie3iUe/6H3CPHlmb4ELifia5x5royMcoftBIUxaIdycjgC6/vGlJ88t7 4qynSQTIfU0f44vmTvdsUgipSmfGH9GlhsR+otedqwz0XjB1Ek+MnF4uTWterYnF+lwg 1qMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=tIc0hGv8; 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=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k15si16997181ejb.357.2019.11.20.00.36.16; Wed, 20 Nov 2019 00:36:41 -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=@mediatek.com header.s=dk header.b=tIc0hGv8; 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=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727910AbfKTIev (ORCPT + 99 others); Wed, 20 Nov 2019 03:34:51 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:47151 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726687AbfKTIev (ORCPT ); Wed, 20 Nov 2019 03:34:51 -0500 X-UUID: 011dff86c9a24e339ba061cd43622e34-20191120 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=M2UT7PsbBttLm3d7KtnkpApkgoUAHdiQRcC9lfgSQY4=; b=tIc0hGv85d75/m3EVc4EHLT28WAsA0Eog+cs2ueT1CAJTs8wD7TkAgFIFQSqwrJe9Zix2dxzDEjzqFDkB45mfr9ITFApSCeQ5S58uTx7PHSPwgG7wHw8Tr9UAOHA1Q7c1Q6yYUtGfSVxLehaJkBqoW4/MYcQNdvB+kija5AIHGY=; X-UUID: 011dff86c9a24e339ba061cd43622e34-20191120 Received: from mtkcas08.mediatek.inc [(172.21.101.126)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1433983432; Wed, 20 Nov 2019 16:34:43 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 20 Nov 2019 16:34:37 +0800 Received: from [172.21.84.99] (172.21.84.99) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Wed, 20 Nov 2019 16:34:48 +0800 Message-ID: <1574238882.20045.2.camel@mtksdccf07> Subject: Re: [PATCH v4 1/2] kasan: detect negative size in memory operation function From: Walter Wu To: Andrey Ryabinin CC: Alexander Potapenko , Dmitry Vyukov , Matthias Brugger , , , , , wsd_upstream , Date: Wed, 20 Nov 2019 16:34:42 +0800 In-Reply-To: <20191112065302.7015-1-walter-zh.wu@mediatek.com> References: <20191112065302.7015-1-walter-zh.wu@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 MIME-Version: 1.0 X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gVHVlLCAyMDE5LTExLTEyIGF0IDE0OjUzICswODAwLCBXYWx0ZXIgV3Ugd3JvdGU6DQo+IEtB U0FOIG1pc3NlZCBkZXRlY3Rpbmcgc2l6ZSBpcyBhIG5lZ2F0aXZlIG51bWJlciBpbiBtZW1zZXQo KSwgbWVtY3B5KC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