Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3821014ybc; Thu, 21 Nov 2019 14:24:30 -0800 (PST) X-Google-Smtp-Source: APXvYqzn87jMNi3T3p5hbu962Uc9AWklF0sDpEMPR1iVO8FmPzqKozYJmWpeq0P0VsohIk53pK3q X-Received: by 2002:a1c:e0c4:: with SMTP id x187mr13305081wmg.93.1574375070043; Thu, 21 Nov 2019 14:24:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574375070; cv=none; d=google.com; s=arc-20160816; b=nsAbCGqlkXh7MSHH/gVumNoPKKws8GJo3/pLGAhXSqsbcngk5wT4oi9o5mizd3PfKq 6XwYrid1lRwQo5k3/Vjn7k96tZNp3+CR9ieoeMg9PJPatc62WRLIF8a46M3pcYjhK2bY 56F5hyE07B8hhJFfha2zcqtYibP+/OaRVLRNoz+9JqBfCf0TaBbXqDS3U3LaTfPJlDKI XI6IyEbhvZ+ng3ccBgRiEIa46F+1jrIw/Qdnu2XvaOy4jShHxHZqcQlTf+IsH3WIsjuo /LW3ojLKNlhe/J8FprBn8E6pnS3DkVqi5dPM9E/O/2IGx5FUFvbRVqmr/F/Mmm01EtX4 yyDg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=gIww5Y07vN6W+V6n3azwLcMFkSweWNQ7zQvPEI8IlH4=; b=ZANOqqiyMkwaNNns7jRMQ877+FJHcICu89538S9QxIunDT0BV+3Co+qev7cd8mEEic DaSPZ63QhJq9r9sVYx+uMbY0VOFE8GfVO7GM7uutmDwoYasMoSB0ASlAL7Kok+PnX/zi TQw2NPM+vn4N06EyLW5mxugrUmOQ2w43TtGsDG27kmClJ1nCdmjJGEDXRkWdzBTrrlZi 2wB5bYuFPtiLNp3aNg+JtSfHJxHY4NphKykM3FJqLgqNE6wvBnyMHxD0o4A1ey94yluo RHeQAFH00Vyv5TBNpiNg620gbnnvAmGwfJhz1BjHZpjsZOE7Wl1YEdiIcNk4WcdKiYkb +rvw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f21si3407576edf.277.2019.11.21.14.24.04; Thu, 21 Nov 2019 14:24:30 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726722AbfKUWXL (ORCPT + 99 others); Thu, 21 Nov 2019 17:23:11 -0500 Received: from relay.sw.ru ([185.231.240.75]:56126 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726329AbfKUWXK (ORCPT ); Thu, 21 Nov 2019 17:23:10 -0500 Received: from [192.168.15.154] by relay.sw.ru with esmtp (Exim 4.92.3) (envelope-from ) id 1iXuqu-0007wC-R0; Fri, 22 Nov 2019 01:23:04 +0300 Subject: Re: [PATCH v4 2/2] kasan: add test for invalid size in memmove To: Walter Wu , Alexander Potapenko , Dmitry Vyukov , Matthias Brugger Cc: kasan-dev@googlegroups.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, wsd_upstream , linux-mediatek@lists.infradead.org, Andrew Morton References: <20191112065313.7060-1-walter-zh.wu@mediatek.com> From: Andrey Ryabinin Message-ID: <619b898f-f9c2-1185-5ea7-b9bf21924942@virtuozzo.com> Date: Fri, 22 Nov 2019 01:21:17 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <20191112065313.7060-1-walter-zh.wu@mediatek.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/12/19 9:53 AM, Walter Wu wrote: > Test negative size in memmove in order to verify whether it correctly > get KASAN report. > > Casting negative numbers to size_t would indeed turn up as a large > size_t, so it will have out-of-bounds bug and be detected by KASAN. > > Signed-off-by: Walter Wu > Reviewed-by: Dmitry Vyukov Reviewed-by: Andrey Ryabinin