From patchwork Fri Mar 25 01:12:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12791173 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 89286C433F5 for ; Fri, 25 Mar 2022 01:12:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 140D58D001F; Thu, 24 Mar 2022 21:12:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0F12A8D0005; Thu, 24 Mar 2022 21:12:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EF9C28D001F; Thu, 24 Mar 2022 21:12:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.26]) by kanga.kvack.org (Postfix) with ESMTP id E0E9A8D0005 for ; Thu, 24 Mar 2022 21:12:17 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id AFA70B0C for ; Fri, 25 Mar 2022 01:12:17 +0000 (UTC) X-FDA: 79281132714.03.15C49AC Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf05.hostedemail.com (Postfix) with ESMTP id 576D6100033 for ; Fri, 25 Mar 2022 01:12:17 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 24CA7B82708; Fri, 25 Mar 2022 01:12:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D1581C340EE; Fri, 25 Mar 2022 01:12:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1648170734; bh=ziV40QzvrV9ly03fJJHDWWsvddu6N2Q7MaUkm1c7iqE=; h=Date:To:From:In-Reply-To:Subject:From; b=kFbMbVEFQ2rTr1uvhYH4rvIVvX5NMsrybcbBafRSE/JbJrWUomed2tNRmXy++vK01 YK5QPWK1YCbPU1v9dpndNg5JInoeTl+laNpHpIr7S/98zTg/FbMOrWr1pRrFiOLXn1 FBbyKBVFdwq0Es2Uxo5IH1aJRUVBEIEm900W3YGA= Date: Thu, 24 Mar 2022 18:12:14 -0700 To: ryabinin.a.a@gmail.com,glider@google.com,elver@google.com,dvyukov@google.com,andreyknvl@google.com,akpm@linux-foundation.org,patches@lists.linux.dev,linux-mm@kvack.org,mm-commits@vger.kernel.org,torvalds@linux-foundation.org,akpm@linux-foundation.org From: Andrew Morton In-Reply-To: <20220324180758.96b1ac7e17675d6bc474485e@linux-foundation.org> Subject: [patch 073/114] kasan: drop addr check from describe_object_addr Message-Id: <20220325011214.D1581C340EE@smtp.kernel.org> Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=kFbMbVEF; spf=pass (imf05.hostedemail.com: domain of akpm@linux-foundation.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Stat-Signature: 597m6q6gzszdiitsbi4h5txwrcsz4sc6 X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 576D6100033 X-HE-Tag: 1648170737-702777 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Andrey Konovalov Subject: kasan: drop addr check from describe_object_addr Patch series "kasan: report clean-ups and improvements". A number of clean-up patches for KASAN reporting code. Most are non-functional and only improve readability. This patch (of 22): describe_object_addr() used to be called with NULL addr in the early days of KASAN. This no longer happens, so drop the check. Link: https://lkml.kernel.org/r/cover.1646237226.git.andreyknvl@google.com Link: https://lkml.kernel.org/r/761f8e5a6ee040d665934d916a90afe9f322f745.1646237226.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko Cc: Marco Elver Cc: Dmitry Vyukov Cc: Andrey Ryabinin Signed-off-by: Andrew Morton --- mm/kasan/report.c | 3 --- 1 file changed, 3 deletions(-) --- a/mm/kasan/report.c~kasan-drop-addr-check-from-describe_object_addr +++ a/mm/kasan/report.c @@ -162,9 +162,6 @@ static void describe_object_addr(struct " which belongs to the cache %s of size %d\n", object, cache->name, cache->object_size); - if (!addr) - return; - if (access_addr < object_addr) { rel_type = "to the left"; rel_bytes = object_addr - access_addr;