Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp173645ybc; Mon, 11 Nov 2019 22:55:27 -0800 (PST) X-Google-Smtp-Source: APXvYqyd88qXTECsSHzT02xPUTiSBwjzXoTXKXZkz3M4C2tDMO9ffIobwCLwqhlUxRfjAib+vJhq X-Received: by 2002:a17:906:5448:: with SMTP id d8mr26243935ejp.79.1573541727748; Mon, 11 Nov 2019 22:55:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573541727; cv=none; d=google.com; s=arc-20160816; b=EjNdh1i2NZ01AmiC6VvtISQyX475Qa6b+BSxtnTstlGKaCY3PZ3fzaJlsvMAImEm0U G+d83/G63zd3jD2lI33oZuIXmt9Ie6VwGN+aBj1TkIv0dmZidVsL3HLTpeYVHu1RBK7n KE78jnBxD/jMCI/FFyIZu2DuWrnLmchLIJ4MhfqnioaocvNB2rgCcCtW8uMm3vZZjjN/ OMvd35O1tUbZxdaGFLeHbeiEZM2QKs4CcVhzY5/AWQ65Y+sxqNSx1EnsLrmXT4Nt15QO sv3vPxa+56QQosWr7J1RQ2Z/OHJjXuttNoPGD/pYZg1Z6DlsyCan9Lx2G9L5/M6iFS3L Wqug== 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=Ehsd/rqNjquxYwB2rWRhuOLzczdbDyhLWsWEeWLWGxc=; b=UJV7NEsWWg9BaHtBBAm5PpXlkD1IBWq9K0HSwiiayDJY6YN3YP4Ie9LmUR52iHXVOV LTYBdDsv6XjWSQniS55+VCl4Or574d7gKKqs9o6kBxWlIGisGIJKXsWcyArBRpWxsm9g SgKwY/mH68gW/6/SaXnM2pMtbMzYHrBGa3HUOVsriL3nFBBCALyDWaXryeGrsIwc/he0 3/v0P5joAHd9QMBkFbNMgKA5PyUHYQcMy3zlGFV2x2WiP4x1LM/Mch1j9xO2h4LZJ+f6 hzwup2Luz/RluUWCauHOZhaAJ6bMlq8eIUbrmDVrhsglGB/+yo9zQ4jyzgI+XKT+4iCj wNrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=K8jnYRkn; 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 m3si11841300edp.357.2019.11.11.22.55.04; Mon, 11 Nov 2019 22:55:27 -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=K8jnYRkn; 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 S1727470AbfKLGxW (ORCPT + 99 others); Tue, 12 Nov 2019 01:53:22 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:47194 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727031AbfKLGxV (ORCPT ); Tue, 12 Nov 2019 01:53:21 -0500 X-UUID: 9fe46707aa4d41c0bda62169a4f3ff8d-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=Ehsd/rqNjquxYwB2rWRhuOLzczdbDyhLWsWEeWLWGxc=; b=K8jnYRkn+kZXk7AkDZvokwowUaom6Ffop8I4DcSwe3I3PW5aOvV0HVkSrcrYrg2Rcdd+Hvtx3PWF/H1DyeXVNVd1lv1EiKQTWcJjpripGcleWCcA9VS2xd0CupGpO+CVytVoxcMcZllgxp6+HQ5Uc9N2zERf0zHJimQGdZlxoYg=; X-UUID: 9fe46707aa4d41c0bda62169a4f3ff8d-20191112 Received: from mtkmrs01.mediatek.inc [(172.21.131.159)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 2061064915; Tue, 12 Nov 2019 14:53:16 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 12 Nov 2019 14:53:14 +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:53:14 +0800 From: Walter Wu To: Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Matthias Brugger CC: , , , , wsd_upstream , , Walter Wu Subject: [PATCH v4 2/2] kasan: add test for invalid size in memmove Date: Tue, 12 Nov 2019 14:53:13 +0800 Message-ID: <20191112065313.7060-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 VGVzdCBuZWdhdGl2ZSBzaXplIGluIG1lbW1vdmUgaW4gb3JkZXIgdG8gdmVyaWZ5IHdoZXRoZXIg aXQgY29ycmVjdGx5DQpnZXQgS0FTQU4gcmVwb3J0Lg0KDQpDYXN0aW5nIG5lZ2F0aXZlIG51bWJl cnMgdG8gc2l6ZV90IHdvdWxkIGluZGVlZCB0dXJuIHVwIGFzIGEgbGFyZ2UNCnNpemVfdCwgc28g aXQ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