Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp4665496ybp; Mon, 14 Oct 2019 08:09:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqw+55vpLBatU7KpGyxnE+QgYqFW3EWcJ8MYoL7auSesXPoyD87kIhjXhgg/eoHUze4mZc7j X-Received: by 2002:a05:6402:2046:: with SMTP id bc6mr7562083edb.147.1571065793816; Mon, 14 Oct 2019 08:09:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571065793; cv=none; d=google.com; s=arc-20160816; b=J2P2hgLvCt6sA9QBAzhhjDL8DVQOcC4jpUQ/mr6uyLp83YP6Dse8+VQt6U0FhnI8Rh pC7vUEQPNbJGKB9cwHoeY7spavW4YXxn6nX0EPEwbtPbihdiZw+/3i4cSAJjX82SzSEe CDLdb7sWP9StzId3cCyrF2xeQ0KYGcy7tG5DoT9riMP8CKxk1hhT+02zk1VsdGkKNjQO XSMA/X38wNl8ENE5ZTKmYVTMJM/VcmO9mezKEGrxTsDPQYFOQp49GfSHnmSySLQtnwPm pnDsd8cfVGkmK4bAXFPLOFLA5d1qw7Z9AKZVzFrMwB6F7I3FJNoN7rzIO176PJjfdAjm B8OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=+kPyuVZ7GikTrqAAnx8uWQZ3WSRuJyPoCPBltjrCcIU=; b=Q6mktllo1Ejf59IPwBW1gZ92Brk7hwzAv4wyjNjlChiV7JZb4sc8VMTPHw1wIoV4kL ETb1DQtRzxK1w8wn1Z3wZrGF92HTRCSAYKk4+THQu9plnShswQFvekSPUx8MW9wdr4kP ITI5yRzQ/z+SvQrtOoa7evGbFa5uMWszjEBc8/rIvizZJhoI/2phMxX7doHXXS9cHx8o HkJenVuCVTECr3E+81vkgU12HNyHkn4/rkRKCplWnuEgNTLmlNesEVSfvekP48Lo4/TT V5ADWhEz1cw3bt0UTVU8X8PVOUKSLxA/78wmaZ1bnEP/KVnmOFr/6mfDimNQI1pwF6FN s/6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=cJB7Budp; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z9si12511901edz.77.2019.10.14.08.09.29; Mon, 14 Oct 2019 08:09:53 -0700 (PDT) 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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=cJB7Budp; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733144AbfJNPHP (ORCPT + 99 others); Mon, 14 Oct 2019 11:07:15 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:54442 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732862AbfJNPHP (ORCPT ); Mon, 14 Oct 2019 11:07:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=+kPyuVZ7GikTrqAAnx8uWQZ3WSRuJyPoCPBltjrCcIU=; b=cJB7BudpxV9Vm6wrq4Qk6hIVv DyQh+zrg8imFWwRvDh9MMDi2m3/9rt/G/uA37uRT3x2WM3cpopzo75xnE8E7X1ZSfbrNbf4TvwJ1+ 0tG+M2W/nl0vg5GBwKNgymmOzQ1/eyMSvFK7wbr36tMh2k4pdyTVwJsuz4D31kp5cjrxc8TCITP+Y UlshVemVVvhOecv5XKlOseJbjLRsEeGsfHIQsWb5nwByuG0WWZQOpzh5YTZv50Zj3c5lsA4u2GH6m vMakhz9E8vEv0duQezUftGWkwJsmmsUk7DwzQldagIOxxU4+dT7e9OCsTR5f4bA5R1+LHmEKrxwbR P6jvq0fOg==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1iK1wE-0000ND-79; Mon, 14 Oct 2019 15:07:10 +0000 Date: Mon, 14 Oct 2019 08:07:10 -0700 From: Matthew Wilcox To: Walter Wu Cc: Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Matthias Brugger , kasan-dev@googlegroups.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, wsd_upstream@mediatek.com Subject: Re: [PATCH 2/2] kasan: add test for invalid size in memmove Message-ID: <20191014150710.GY32665@bombadil.infradead.org> References: <20191014103654.17982-1-walter-zh.wu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191014103654.17982-1-walter-zh.wu@mediatek.com> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 14, 2019 at 06:36:54PM +0800, Walter Wu wrote: > Test size is negative numbers in memmove in order to verify > whether it correctly get KASAN report. You're not testing negative numbers, though. memmove() takes an unsigned type, so you're testing a very large number.