Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3208507ybc; Thu, 21 Nov 2019 05:06:05 -0800 (PST) X-Google-Smtp-Source: APXvYqxfWlL5Frzu1GbUy4x3cEQdQtZz9ElpfjmpaPLZVOZKCSmhWgXT5vxqQyFeZvAd0vE1UyOi X-Received: by 2002:a17:907:1102:: with SMTP id qu2mr13726000ejb.300.1574341565090; Thu, 21 Nov 2019 05:06:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574341565; cv=none; d=google.com; s=arc-20160816; b=hKdUw6Q7wBL01XXQQ5RBP2r0dLSEtiAM9vkDgP5xZgWk41qPKhf2otsMkEfssdw4AF lncPMo1LF7xgfKUf7UAs4BWgOcLP4WqZ4czfyeIA+FWzLL7A8JFMtaCSRcABULkk7vvu GRpdFnsLSsO78mxKZ2qh64z40rRcdhIVKZ+J3VGeVGkm46slTk0DzzJFE8loPXyg8vxo O+wjIMxBWLeKQxA1dRuxNyPEH6ri72tYIEy4eoSfJjvx58uevG5eX59jFZqYFtI99+aa iR5J7/91r4RzTIOrHTASVyS6ogtpDSUFxCnCeM6gnFZOIT1tV4ueTy9sRKM3IHb07N74 G1iA== 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=NsE4689yAaWq1T5b/skLebYVU2kKGZUndAF8Pm3G/5k=; b=0iiy2sKOmMb030zYoFFfKuKZF/uYLH2iXEy1GyVZDaRMmY2YjNwSzCv7dUD6Hqfcik Ps85E7GDvt4Lu3/ooF+ilD0KtTyBNU81TVYYeZqPEsX0xYJxWgbhapIhYfjXGub03sKO 3e5aj3XGi05KDgMz3U5cRLzcOFGzNpZfGRq6r6sw71lY0qhK0hQuOriwpGe6dVGrPk6S goXhkojYnxGrOnUsnNd9ADjDo85fVcfgFuzVmZ2g+CpX/J2i0dq1wJf0EaEWPXAgBBF1 nXZYwvTj0H5jEveGjlDHTSFYfdifLJGBZ4Y9+veQ4Mw1RlSdIes5FnWR1P2tvUZVv7tI rN2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=FssLwQtJ; 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 ob19si1798270ejb.56.2019.11.21.05.05.39; Thu, 21 Nov 2019 05:06:05 -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=FssLwQtJ; 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 S1726719AbfKUNDF (ORCPT + 99 others); Thu, 21 Nov 2019 08:03:05 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:26611 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726293AbfKUNDE (ORCPT ); Thu, 21 Nov 2019 08:03:04 -0500 X-UUID: 1b33c3166c46481bb7e9762f99332aec-20191121 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=NsE4689yAaWq1T5b/skLebYVU2kKGZUndAF8Pm3G/5k=; b=FssLwQtJ0KNeb9sizE3tAftLAkZ0tDyAgdj54n+V1McYT72q5bgXkUjmYn3XPEriUxNMQ94eGTYkKjOXPJxDMENJcDDHjaQ9c8G+5FOh+72A2LyFIC7oFT9MVzhyTmUOp210JMrny2Or2wTFfFY/Ny2ZB88tvanv/d3zGvATxuQ=; X-UUID: 1b33c3166c46481bb7e9762f99332aec-20191121 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 302700734; Thu, 21 Nov 2019 21:02:58 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 21 Nov 2019 21:02:54 +0800 Received: from [172.21.84.99] (172.21.84.99) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 21 Nov 2019 21:02:51 +0800 Message-ID: <1574341376.8338.4.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: Thu, 21 Nov 2019 21:02:56 +0800 In-Reply-To: <040479c3-6f96-91c6-1b1a-9f3e947dac06@virtuozzo.com> References: <20191112065302.7015-1-walter-zh.wu@mediatek.com> <040479c3-6f96-91c6-1b1a-9f3e947dac06@virtuozzo.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 T24gVGh1LCAyMDE5LTExLTIxIGF0IDE1OjI2ICswMzAwLCBBbmRyZXkgUnlhYmluaW4gd3JvdGU6 DQo+IA0KPiBPbiAxMS8xMi8xOSA5OjUzIEFN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