From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2D9D5ECE587 for ; Mon, 14 Oct 2019 15:57:29 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F0CE720873 for ; Mon, 14 Oct 2019 15:57:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="kL5TBX3B" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F0CE720873 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Date:To:From:Subject:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hjeU8wYzM3m3ylzGBTePJydAVZ2M/gJzUJX/YgqmJvY=; b=kL5TBX3BxAuGtg ByM/l8wIEO8FMuuWRDLxTJeD27dW5yztkBAZb2FkQqUfv+l/NZioF5ODRFk3XLd8BjnmEyncOFWyv dOWdibB36NGxCRPbAOFe7eQhSrq8PQdTadlNNwjnRZIbLlqv4aOlJCizdmAX63b84KGsptGX0td8K TnxDPk/MqXUTWL9L9lD/VclIqIJ1Nr6qg1Nixjp/3eTZaMZwA8MXXvqB4iN4yjpmGNgf+2S2xTF6i ZTJCUg44lpYF59QbnhIno4fHONmyFpHXI0BzjIqpbwP96aW4nuhTHK9UHTgiWwEn772gVfR9MD0sQ XIz3rgv0tX067vxvrUQw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iK2io-0003ic-TG; Mon, 14 Oct 2019 15:57:22 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iK2ik-0003ht-Gv; Mon, 14 Oct 2019 15:57:20 +0000 X-UUID: e90314f07f8e453e8a868ef510a901b9-20191014 X-UUID: e90314f07f8e453e8a868ef510a901b9-20191014 Received: from mtkcas68.mediatek.inc [(172.29.94.19)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 215289654; Mon, 14 Oct 2019 07:57:13 -0800 Received: from mtkmbs07n1.mediatek.inc (172.21.101.16) by MTKMBS62N1.mediatek.inc (172.29.193.41) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 14 Oct 2019 08:57:12 -0700 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; Mon, 14 Oct 2019 23:57:10 +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; Mon, 14 Oct 2019 23:57:08 +0800 Message-ID: <1571068631.8898.8.camel@mtksdccf07> Subject: Re: [PATCH 2/2] kasan: add test for invalid size in memmove From: Walter Wu To: Matthew Wilcox Date: Mon, 14 Oct 2019 23:57:11 +0800 In-Reply-To: <20191014150710.GY32665@bombadil.infradead.org> References: <20191014103654.17982-1-walter-zh.wu@mediatek.com> <20191014150710.GY32665@bombadil.infradead.org> X-Mailer: Evolution 3.2.3-0ubuntu6 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191014_085718_566082_808D35AF X-CRM114-Status: UNSURE ( 7.96 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: wsd_upstream@mediatek.com, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, linux-mm@kvack.org, Alexander Potapenko , linux-arm-kernel@lists.infradead.org, Matthias Brugger , Andrey Ryabinin , Dmitry Vyukov Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 2019-10-14 at 08:07 -0700, Matthew Wilcox wrote: > 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. > Casting negative numbers to size_t would indeed turn up as a "large" size_t and its value will be larger than ULONG_MAX/2. We mainly want to express this case. Maybe we can add some descriptions. Thanks for your reminder. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel