Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp172824ybc; Mon, 11 Nov 2019 22:54:19 -0800 (PST) X-Google-Smtp-Source: APXvYqy7N/TV/uJyONYoySHxV3X61i0la/zFR7YmGlSyepXUdbxwvEdGfmsuZkYXUuOCnjsA1mcD X-Received: by 2002:aa7:c894:: with SMTP id p20mr31850591eds.145.1573541658998; Mon, 11 Nov 2019 22:54:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573541658; cv=none; d=google.com; s=arc-20160816; b=mbOGlrALCcU475tFj3gRrrx9TdgpVm6eOA0sUN86Qne6D6jSLmoQ+jan0qhTvw6eHn lyWpR2npDD7RxHpWUJey03oYQHuARUHjOHf84NCCfY4TrQoIOScUBuA5PZC8d4vhH9Ji Tvhkiqx/AQBOW2TBsaLa9R0/vF8hSq9excIgo7+Eknyv/uogB3W84+n9e2cADNUWCZeA 07bFwfh3Krbk0F9Wmoms0cE93f2QKBXY4EEj2zwfSTDyyYp6MvrDU6Nf0QYIVOBBUelH /dUOiMtz0itp43uVfNnsRxqBeBC+3BfPpamoWfDJcbbRzo1fLHTzdE6DJx4lM1+lnwtY t7sw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=wdSA5MhsOB9Ng3BYMmOZcpPo2w0m19TKE7PUEysk4/I=; b=NOcXL70ZeXJD1WlyU9rGVAoBDNgJM9NOr5tYTKwu6/mHBQlVLIyDE0naUPPBR9r3w2 6eyxIvS/1R4Kycaim8MN7+A8dbKbFwUDeZy/5YLcwCxwBtfttlZVz6uViKq/UKwcGKPs bOCpNdlrMCJBn8/eRP0GyHYPm9zcjxDjigwMsYtwCbw31o9QPZ6sO9/4bYUCyOtSbsna ZeBnobYfTkYm8eWSPZQuVA93aVI5qUammJXrYcBFNb+wjYHGiXnRm2c6ATF0twkj2aJB IWxfHFJg0rViLWrTI+Nk39ugTgk7vIm/NJGcASg5V0dsB1f0eJPm6u3JhPIWt3Q4c0OC jbsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b="SkP0IbH/"; 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 z3si10495264ejb.42.2019.11.11.22.53.54; Mon, 11 Nov 2019 22:54:18 -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="SkP0IbH/"; 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 S1727415AbfKLGwf (ORCPT + 99 others); Tue, 12 Nov 2019 01:52:35 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:7405 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725847AbfKLGwe (ORCPT ); Tue, 12 Nov 2019 01:52:34 -0500 X-UUID: 76bf00009fdb47c4a0739cb4a74a6ebf-20191112 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=wdSA5MhsOB9Ng3BYMmOZcpPo2w0m19TKE7PUEysk4/I=; b=SkP0IbH/QLcjU2jsExzjgYU1k9VtsALKCJE6i0+bOJ8il7W+JBAO8INgUqhoW5yd2xMYC9HyydvrOQ/MwMsEC7auD6Kw6wxkn7bcxQnEBO7aOPvbrFEqjQsqEl2xZYVHAhBCOgPGhwJxn49M3rbWF5sSUqJbNc10PDUuIHpE8eM=; X-UUID: 76bf00009fdb47c4a0739cb4a74a6ebf-20191112 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 139208525; Tue, 12 Nov 2019 14:52:28 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 12 Nov 2019 14:52:25 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Tue, 12 Nov 2019 14:52:26 +0800 From: Walter Wu To: Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Matthias Brugger CC: , , , , wsd_upstream , , Walter Wu Subject: [PATCH v4 0/2] fix the missing underflow in memory operation function Date: Tue, 12 Nov 2019 14:52:25 +0800 Message-ID: <20191112065225.6971-1-walter-zh.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain 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 VGhlIHBhdGNoc2V0cyBoZWxwIHRvIHByb2R1Y2UgS0FTQU4gcmVwb3J0IHdoZW4gc2l6ZSBpcyBu ZWdhdGl2ZSBudW1iZXJzDQppbiBtZW1vcnkgb3BlcmF0aW9uIGZ1bmN0aW9uLiBJdCBpcyBoZWxw ZnVsIGZvciBwcm9ncmFtbWVyIHRvIHNvbHZlIHRoZSANCnVuZGVmaW5lZCBiZWhhdmlvciBpc3N1 ZS4gU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